@amaster.ai/pi-teamwork

中文文档
0.1.37发布于 2026/11/09Apache-2.0TypeScriptES Module近 30 天下载 3435

Pi extension for team collaboration and issue management via Multica

原始使用文档
文档目录11 节
  1. Supported Providers
  2. Configuration
  3. Auto-Install
  4. Mode 1 — Self-hosted server
  5. Mode 2 — Pre-configured environment
  6. Mode 3 — Headless token (Multica Cloud)
  7. Tools
  8. Commands
  9. Architecture
  10. Structured results (Pi 0.99+)
  11. Failure diagnostics

@amaster.ai/pi-teamwork

pi-teamwork preview

Pi extension for team collaboration and project management. Provides LLM-callable tools to interact with issue trackers and project management systems.

Supported Providers

  • Multica — CLI-based adapter via multica

Configuration

Auto-Install

Runtime auto-installation is disabled because mutable package-manager taps and download scripts cannot provide the pinned artifact verification required in a credential-bearing agent process. Install a pinned Multica release separately and put the verified binary on $PATH, or configure multica.binary.

The deprecated autoInstall: true setting no longer executes an installer. It only reports a clear error when the binary is missing.

Configuration may live in user/agent settings or in a trusted project's .pi/settings.json. Project settings are ignored when trust is declined and do not expand ${ENV_VAR}; keep environment-backed credentials in user or agent settings.

Mode 1 — Self-hosted server

For teams running their own Multica server. The extension runs multica setup self-host with the provided URLs, then authenticates with the token:

{
  "pi-teamwork": {
    "enabled": true,
    "provider": "multica",
    "multica": {
      "serverUrl": "https://api.your-server.com",
      "appUrl": "https://your-server.com",
      "token": "<token-from-multica-server>"
    }
  }
}

Mode 2 — Pre-configured environment

Run multica setup once on the machine and finish login through multica's normal flow. The extension will reuse that state:

{
  "pi-teamwork": {
    "enabled": true,
    "provider": "multica",
    "multica": {
      "workspace": ""
    }
  }
}

Mode 3 — Headless token (Multica Cloud)

For CI or non-interactive environments where you can't run multica setup. The extension will run multica login --token <token> on every session_start:

{
  "pi-teamwork": {
    "enabled": true,
    "provider": "multica",
    "multica": {
      "token": "<token-from-multica-server>"
    }
  }
}

⚠️ token is a credential. Keep it out of version control — put it in a local-only settings file or inject via env-substituted config.

FieldDescription
enabledEnable/disable the extension
providerProvider name (multica)
multica.binaryPath to multica binary (default: multica)
multica.workspaceWorkspace ID override; leave empty to use multica's default
multica.tokenHeadless-login token. Omit when multica is already logged in on the machine
multica.serverUrlSelf-hosted server API URL. Triggers multica setup self-host --server-url on start
multica.appUrlSelf-hosted server frontend URL. Required when serverUrl is a remote address
multica.autoInstallDeprecated compatibility flag; no installer is executed (default: false)

Tools

ToolDescription
issue_listList issues with optional filters (status, assignee, project, limit)
issue_getGet detailed info about a specific issue
issue_createCreate a new issue
issue_updateUpdate an existing issue (title, description, status, priority, assignee)
issue_commentAdd a comment to an issue
project_listList all projects in the workspace
teamwork_statusCheck provider/daemon status

Commands

  • /teamwork-status — Show current provider status

Architecture

src/
├── index.ts              # Generic tool layer (provider-agnostic)
├── types.ts              # TeamworkProvider interface + shared types
└── adapters/
    └── multica.ts        # Multica CLI adapter + initialization

The extension uses a provider pattern — index.ts registers tools that delegate to a TeamworkProvider interface. Adding a new provider (Linear, Jira, etc.) only requires implementing the interface and adding a factory branch in session_start.

Structured results (Pi 0.99+)

Teamwork tools declare outputSchema: workspace_list/issue_list/project_list return { workspaces | issues | projects, total, truncated }; issue_get/create/update return { issue, truncated }; issue_comment returns { comment, truncated }. Issue objects retain their existing IDs/statuses and public fields; arbitrary provider metadata is excluded. teamwork_status exposes the provider and available running/pid/status fields, excluding raw CLI output. Failures return { error, truncated } with isError: true, without CLI diagnostics or credentials. Tracker writes still require user authorization.

const result = await tools.issue_list({ status: "todo" });
if (result.error) throw new Error(result.error);
text(result.issues.map(issue => ({ id: issue.id, title: issue.title, status: issue.status })));
// Once the user has authorized this issue's status update:
// await tools.issue_update({ id: result.issues[0].id, status: "in_progress" });

Structured output is limited to 12 KiB and top-level lists to 100 complete records. truncated: true indicates omitted records; total retains the original count where available. Oversized records with an id retain that complete ID and small scalar metadata, omit large fields, and carry truncated: true both on the record and envelope; callers must check that flag before reusing content for an update. Oversized results without a record ID return a typed output-limit error instead of clipped paths or content. A write may already have completed when that happens: inspect saved state before retrying. Readable text and renderer details are independently bounded.

Multica initialization runs in the background with one 10-second budget across CLI checks, setup, daemon startup, and login. Ordinary prompts do not wait for it; teamwork tools wait for initialization. Each later tool or status-command invocation has one 30-second deadline covering initialization waits and all CLI steps. Caller cancellation reaches the running CLI and prevents subsequent commands (including the remaining update/get steps); session shutdown cancels outstanding CLI work.

Failure diagnostics

Configuration and login failures stop initialization and remain visible to waiting tools with a safe error category. A failed daemon start is accepted only after a status check confirms that the daemon is running. A version-probe timeout is not treated as evidence that the CLI needs installation.

版本与发布记录

@amaster.ai/pi-teamwork 共发布 126 个版本,首次发布于 2026/05/25;过去 12 个月发布了 126 个版本。

版本发布日期距今
0.1.37latest2026/11/09今天
0.1.2-beta.91beta2026/11/072 天前
0.1.2-beta.902026/11/062 天前
0.1.2-beta.892026/11/053 天前
0.1.2-beta.882026/11/054 天前
0.1.362026/11/054 天前

关于 @amaster.ai/pi-teamwork 的常见问题

@amaster.ai/pi-teamwork 是什么?

Pi extension for team collaboration and issue management via Multica

如何安装 @amaster.ai/pi-teamwork?

在项目目录运行 npm install @amaster.ai/pi-teamwork,或使用 pnpm add / yarn add / bun add。

@amaster.ai/pi-teamwork 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@amaster.ai/pi-teamwork 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@amaster.ai/pi-teamwork 可以商用吗?

@amaster.ai/pi-teamwork 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@amaster.ai/pi-teamwork 的下载量有多少?

根据 npm 官方下载统计,@amaster.ai/pi-teamwork 在 2026/10/06 – 2026/11/04 这 30 天内被下载 3,435 次,日均约 115 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@amaster.ai/pi-teamwork 还在维护吗?

最新版本 0.1.37 发布于 2026/11/09(今天);至今共发布 126 个版本,其中过去 12 个月发布了 126 个;首次发布于 2026/05/25。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。