@dharma-ai-labs/agent-fabric-task-runner

中文文档
0.1.43发布于 2026/11/09MITTypeScriptES Module构建来源已验证近 30 天下载 2066

Signed, leased, policy-bound local task runner for Dharma Agent Fabric

原始使用文档

@dharma-ai-labs/agent-fabric-task-runner

Signed, leased, policy-bound execution for local Agent Fabric tasks. Tasks run in relay-owned Git worktrees using registered command IDs and canonical arguments under explicit path, network, Git, budget, and Skill-pin authority. It is not a general remote shell.

Receipt-required tasks

A signed task opts into action-time authorization with requiredCapabilities: ["action_decision_receipts_v1"] and a UUID target.endpointId. HQ embeds exactly one task-level decision as actionDecision: { id, actionDigest, receipt, signature, keyVersion } in the signed task. executeTask() verifies and consumes that decision immediately before provider or acceptance execution. Missing, expired, mismatched, unknown-key, replayed, or non-release receipts fail closed before any effect.

The default FileActionDecisionReplayGuard atomically consumes each decision ID once under the relay state directory. A gated task receipt includes one HQ enforcement acknowledgement: executed after complete execution, unknown after an indeterminate release attempt, or contained for a valid non-release. Tasks that omit the capability retain the previous behavior and receipt shape.

Required Artifacts

acceptance.requiredArtifacts names workspace-relative regular files that must be present and readable after the provider and registered acceptance commands, before the runner records completion. References use / separators, must be within signed read authority, and cannot contain traversal, empty segments, wildcards, Windows device names or ambiguous platform-specific aliases. Invalid or unauthorized references are rejected before provider execution. The signed required-file list is included as data in provider instructions; callers do not have to repeat it in their natural-language request.

Artifact sets use conservative portable names: distinct entries cannot collide after NFC normalization and Unicode lower/upper/lower mapping, even on case-sensitive hosts. This catches final-sigma and sharp-S aliases; it is a conservative admission rule, not an exact implementation of every filesystem's Unicode version. Both signed envelope schemas cap raw entries at 100 and each reference at 1,000 Unicode characters. Bounded exact duplicates remain compatible and are deduplicated; they still count toward the raw-entry cap. Acceptance commands are capped at 98, reserving the 100-result receipt capacity for one provider result and one late runner failure. Excess commands are rejected before effects, rather than losing the durable failure receipt. Windows device-name restrictions include the superscript COM/LPT aliases and CONIN$/CONOUT$. Ill-formed Unicode (lone surrogates) is rejected rather than replaced during filesystem encoding. Components are limited to 255 UTF-8 bytes. Resolved paths are limited to 259 UTF-16 units on Windows (without changing long-path settings), 1023 UTF-8 bytes on macOS and 4095 on Linux. These supported runner limits do not establish every filesystem or registered tool's limits.

Generated artifact metadata has its own 256,000 UTF-16-unit hard bound, separate from the existing 20,000-unit task/context instruction limit. This accommodates the schema's 100 paths of up to 1,000 characters without consuming task text's allowance. Neither instructions nor signed paths are truncated; provider and task budget enforcement still applies. Empty lists add no metadata. Agy/Hermes carry text in argv and fail before process invocation if the complete argument estimate exceeds 32,760 conservatively quoted UTF-16 units on Windows or 65,536 UTF-8 bytes elsewhere. Codex/Claude use stdin. These supported limits do not attest provider acceptance or all operating-system environment limits.

Missing, unreadable, non-file, symbolic-link/junction or hard-linked artifacts fail acceptance. Artifact contents and target paths are not copied into failure messages. Empty regular files satisfy presence, not quality; an empty required list preserves existing behavior. A late failure after released work retains an unknown action acknowledgement rather than claiming containment or execution.

Required paths without signed write authority must already exist before the provider starts. The runner fingerprints their regular-file metadata and hashes their contents without exposing either, then checks them after the provider and after acceptance commands. Ignored files do not gain write authority from being required artifacts. Write-authorized outputs still use final presence checks. Git path inventories must be complete and NUL-terminated; exceeding the bounded capture limit fails closed rather than authorizing a partial inventory.

This is a final-state completion check, not an OS sandbox, immutable artifact snapshot, quality grader or proof of external effects. The integrity checks do not prevent all concurrent filesystem mutation; native containment and independent acceptance remain separate requirements.

Licensed under MIT.

版本与发布记录

@dharma-ai-labs/agent-fabric-task-runner 共发布 42 个版本,首次发布于 2026/08/09;过去 12 个月发布了 42 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.1.43latest2026/11/095 天前
0.1.422026/11/068 天前
0.1.412026/10/3114 天前
0.1.392026/10/2124 天前
0.1.382026/10/1629 天前
0.1.372026/10/1629 天前

关于 @dharma-ai-labs/agent-fabric-task-runner 的常见问题

@dharma-ai-labs/agent-fabric-task-runner 是什么?

Signed, leased, policy-bound local task runner for Dharma Agent Fabric

如何安装 @dharma-ai-labs/agent-fabric-task-runner?

在项目目录运行 npm install @dharma-ai-labs/agent-fabric-task-runner,或使用 pnpm add / yarn add / bun add。

@dharma-ai-labs/agent-fabric-task-runner 支持 TypeScript 吗?

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

@dharma-ai-labs/agent-fabric-task-runner 支持 ESM 还是 CommonJS?

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

@dharma-ai-labs/agent-fabric-task-runner 可以商用吗?

@dharma-ai-labs/agent-fabric-task-runner 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@dharma-ai-labs/agent-fabric-task-runner 的下载量有多少?

根据 npm 官方下载统计,@dharma-ai-labs/agent-fabric-task-runner 在 2026/10/12 – 2026/11/10 这 30 天内被下载 2,066 次,日均约 69 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@dharma-ai-labs/agent-fabric-task-runner 还在维护吗?

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