phargus-setup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Phargus Setup

Phargus 设置

Connect Phargus to the actual application and leave a reproducible start recipe. Read compatibility before selecting a package and setup for the integration procedure. Use tools for bundled command options.
  1. Inspect the application, its start command, module format, Node version and logging. Resolve the absolute directory of this SKILL.md; run scripts/phargus.mjs from that directory, with --project pointing to the application.
  2. Use doctor to inspect an existing installation. When needed, install the tested release from npm (@pharn-dev/phargus@0.1.0) with the application's package manager; build the v0.1.0 source tag only when the registry is unavailable.
  3. Configure early preload and a dedicated NDJSON file. Create a portable application-side collector recipe by copying the bundled scripts directory; save commands using those application-owned paths, not plugin-cache paths.
  4. Start the application and collector, exercise a suitable existing endpoint/workload, capture SSE, and inspect actual samples and incoming spans. Read data semantics when interpreting that verification.
  5. Restart with the saved recipe and verify again. Clean up test processes you started.
  6. When the request names a file for a helper result (for example a summarize result in tool-result.json), write that helper's JSON output to exactly the named path. Resolve a relative name against the application directory itself, not .phargus/ or the capture directory, and confirm the file exists there before finishing.
Return the changed files, reproducible launch commands, the saved result paths and observed data proving the connection. Report missing requirements or incomplete verification explicitly.
Example request: "Add Phargus to this Express app and show that its dashboard receives data."
将 Phargus 连接到实际应用程序,并留下一套可复现的启动流程。 选择软件包前阅读 兼容性,并参阅 设置了解集成步骤。使用 工具了解随附的命令选项。
  1. 检查应用程序、启动命令、模块格式、Node 版本和日志记录。 确定此 SKILL.md 所在目录的绝对路径;从该目录运行 scripts/phargus.mjs, 并让 --project 指向应用程序。
  2. 使用 doctor 检查现有安装。必要时,使用应用程序的包管理器从 npm 安装经过测试的 发行版(@pharn-dev/phargus@0.1.0);只有在 registry 不可用时,才基于 v0.1.0 源码标签进行构建。
  3. 配置早期 preload 和专用的 NDJSON 文件。通过复制随附的 scripts 目录, 创建可移植的应用端 collector 配置;使用应用自身拥有的路径保存命令, 而不是 plugin-cache 路径。
  4. 启动应用程序和 collector,调用一个合适的现有 endpoint/workload, 捕获 SSE,并检查实际 samples 和传入的 spans。解释验证结果时, 阅读 数据语义。
  5. 使用保存的启动流程重启并再次验证。清理你启动的测试进程。
  6. 当请求指定用于存放 helper 结果的文件时(例如 tool-result.json 中的 summarize 结果),将 helper 的 JSON 输出写入准确命名的路径。相对路径 必须以应用程序目录本身为基准进行解析,而不是 .phargus/ 或捕获目录, 并在完成前确认文件确实存在于该位置。
返回已更改的文件、可复现的启动命令、保存的结果路径,以及证明连接已建立的实际数据。 明确报告缺失的要求或尚未完成的验证。
示例请求:“为此 Express 应用添加 Phargus,并展示其 dashboard 已收到数据。”