@tencent-ai/agent-harness 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +19 -7
  2. package/bin/native/darwin-arm64/agent-harness-process-snapshot.node +0 -0
  3. package/bin/native/darwin-x64/agent-harness-process-snapshot.node +0 -0
  4. package/cli/dist/codebuddy-headless.js +1 -1
  5. package/cli/dist/codebuddy-server.js +1 -1
  6. package/cli/product.cloudhosted.json +2 -2
  7. package/cli/product.internal.json +2 -2
  8. package/cli/product.ioa.json +2 -2
  9. package/cli/product.json +2 -2
  10. package/cli/product.selfhosted.json +2 -2
  11. package/docs/authentication-guide.md +4 -2
  12. package/executor/lib/capsule/entry.mjs +2 -2
  13. package/lib/integration/executor-supervisor.d.ts +4 -1
  14. package/lib/integration/executor-supervisor.js +7 -3
  15. package/lib/integration/stdio-guardian-child.js +11 -21
  16. package/lib/integration/stdio-guardian.d.ts +2 -1
  17. package/lib/integration/stdio-guardian.js +7 -5
  18. package/lib/runtime/agent-harness.d.ts +3 -1
  19. package/lib/runtime/agent-harness.js +12 -3
  20. package/lib/runtime/codebuddy-code.d.ts +5 -1
  21. package/lib/runtime/codebuddy-code.js +13 -3
  22. package/lib/runtime/codebuddy-prewarm-pool.d.ts +2 -0
  23. package/lib/runtime/codebuddy-prewarm-pool.js +9 -1
  24. package/lib/runtime/codebuddy-process.d.ts +2 -1
  25. package/lib/runtime/codebuddy-process.js +5 -22
  26. package/lib/runtime/codebuddy-resource-management.d.ts +2 -0
  27. package/lib/runtime/codebuddy-resource-management.js +13 -1
  28. package/lib/runtime/codebuddy-resource-process.d.ts +5 -2
  29. package/lib/runtime/codebuddy-resource-process.js +28 -8
  30. package/lib/runtime/codebuddy-v2-private-child.js +14 -1
  31. package/lib/runtime/node-runtime.d.ts +35 -0
  32. package/lib/runtime/node-runtime.js +46 -0
  33. package/lib/runtime/posix-contained-process.d.ts +3 -0
  34. package/lib/runtime/posix-contained-process.js +5 -3
  35. package/lib/runtime/posix-process-snapshot.d.ts +28 -0
  36. package/lib/runtime/posix-process-snapshot.js +183 -0
  37. package/lib/runtime/process-tree.d.ts +6 -8
  38. package/lib/runtime/process-tree.js +9 -37
  39. package/lib/transport/network.d.ts +7 -1
  40. package/lib/transport/network.js +15 -1
  41. package/package.json +5 -3
package/README.md CHANGED
@@ -308,6 +308,7 @@ corepack pnpm --dir packages/agent-harness build
308
308
  corepack pnpm --dir packages/agent-harness test
309
309
  corepack pnpm --dir packages/agent-harness typecheck
310
310
  corepack pnpm --dir packages/agent-harness test:e2e
311
+ corepack pnpm --dir packages/agent-harness check:native:darwin
311
312
  corepack pnpm --dir packages/agent-harness check:native:windows
312
313
  ```
313
314
 
@@ -377,6 +378,9 @@ resume,以及进程树强制回收。
377
378
  POSIX process-boundary E2E 还会在 Resource/session/Executor target 已启动但尚未提交 ready/ACK 时
378
379
  分别 SIGKILL Harness 与 private process-group anchor,并验证同组 target 及 setsid/forkpty 型后代均由
379
380
  已提前绑定的 guardian 回收。
381
+ Darwin 的 process-tree snapshot 由 Harness 自有的 N-API addon 直接调用 `libproc`,Linux 直接读取
382
+ `/proc`;两者都不依赖全局 process-list executable。snapshot 缺失、不可加载或无法证明完整 ancestry
383
+ 时继续 fail-closed,不会静默降级为只清理 process group。
380
384
  另有一条 ChatGPT.app 复杂度的 reference journey 覆盖 snapshot/live merge、Subagent、
381
385
  compact、fork/rewind 和 cold reopen;stability soak 重复验证 connection handoff、
382
386
  per-session child 回收与 Executor crash/rehydrate/fuse。Windows lifecycle E2E 只在
@@ -390,7 +394,7 @@ allowlist 同步到 package-owned `cli/` 目录;发布和安装都只有一个
390
394
  `optionalDependencies` 安装,内嵌 manifest 只保存 CodeBuddy 自己的版本与运行时 contract,不能单独发布。
391
395
  Harness 自己声明 ACP SDK 依赖并在 package boundary 内使用它,不把该版本提升为 monorepo root 或
392
396
  共享 schema source。workspace identity 是 `@genie/agent-harness`,pnpm 11 原生
393
- `publishConfig.name` 将发布 identity 设为 `@tencent-ai/agent-harness`;源码版本当前是 `0.1.0`。
397
+ `publishConfig.name` 将发布 identity 设为 `@tencent-ai/agent-harness`;源码版本当前是 `0.1.1`。
394
398
  JSON-RPC `serverInfo.name` 仍是稳定的协议实现标识 `@genie/agent-harness`,不把 npm locator 当成 wire identity。
395
399
  公开支持的 API surface 是 binary、`./protocol`、Host sink 类型用的
396
400
  `./telemetry` 与 Product authoring 用的
@@ -432,9 +436,9 @@ corepack pnpm --dir packages/agent-harness test:package
432
436
  这两个命令用于本地归档与 current-workspace bundle 验证;当前交付分支的 npm 包必须由
433
437
  “发布 Agent Harness”按钮生成。按钮提供 `snapshot` 与 `latest` 两个 npm dist-tag:选择 `snapshot` 时,
434
438
  流水线以源码中的稳定 SemVer 为目标版本线,把外层版本设为
435
- `<源码版本>-snapshot-<完整 40 位 commit SHA>`;例如源码版本为 `0.1.0` 时即
436
- `0.1.0-snapshot-<完整 40 位 commit SHA>`。同一 commit 在同一版本线只对应一个不可变版本,重复执行会
437
- 复用已存在的版本并把 `snapshot` tag 指向它。选择 `latest` 时直接发布源码中的稳定版本,例如 `0.1.0`;
439
+ `<源码版本>-snapshot-<完整 40 位 commit SHA>`;例如源码版本为 `0.1.1` 时即
440
+ `0.1.1-snapshot-<完整 40 位 commit SHA>`。同一 commit 在同一版本线只对应一个不可变版本,重复执行会
441
+ 复用已存在的版本并把 `snapshot` tag 指向它。选择 `latest` 时直接发布源码中的稳定版本,例如 `0.1.1`;
438
442
  该版本已存在时流水线会拒绝覆盖,必须先更新 `package.json` 版本。按钮不提供 `dev` tag,也不发布独立
439
443
  CodeBuddy Code 包。
440
444
 
@@ -452,6 +456,14 @@ request/message identity 和 namespaced timestamp 在 live/replay 间稳定。
452
456
  运行 public server 前的 preflight 还会校验内嵌 CodeBuddy runtime 包含 managed server
453
457
  入口 `dist/codebuddy-server.js`;旧版 npm 包会在监听 socket/端口前直接报错,避免到
454
458
  首个 Resource operation 才暴露不完整的发布产物。
455
- 归档还固定包含 x64/ARM64 两个 Windows Job launcher;普通 TypeScript build 不依赖
456
- Zig,维护二进制时使用固定 Zig 0.16.0 执行 `build:native:windows`,随后运行
457
- `check:native:windows` byte-for-byte 校验。
459
+ 归档固定包含 Harness-owned Darwin ARM64/x64 process-snapshot N-API addon;它属于 Harness
460
+ containment,而不是内嵌 CodeBuddy runtime 或外部 npm 原生依赖。普通 TypeScript build 不重编 addon;
461
+ macOS 上维护其 C source 后运行:
462
+
463
+ ```bash
464
+ corepack pnpm --dir packages/agent-harness build:native:darwin
465
+ corepack pnpm --dir packages/agent-harness check:native:darwin
466
+ ```
467
+
468
+ 归档还固定包含 x64/ARM64 两个 Windows Job launcher;普通 TypeScript build 不依赖 Zig,维护二进制时
469
+ 使用固定 Zig 0.16.0 执行 `build:native:windows`,随后运行 `check:native:windows` 做 byte-for-byte 校验。