@namzu/sdk 0.1.7 → 0.2.0
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.
- package/CHANGELOG.md +23 -5
- package/README.md +14 -9
- package/dist/agents/ReactiveAgent.d.ts.map +1 -1
- package/dist/agents/ReactiveAgent.js +5 -3
- package/dist/agents/ReactiveAgent.js.map +1 -1
- package/dist/agents/RouterAgent.d.ts.map +1 -1
- package/dist/agents/RouterAgent.js +3 -0
- package/dist/agents/RouterAgent.js.map +1 -1
- package/dist/agents/SupervisorAgent.d.ts.map +1 -1
- package/dist/agents/SupervisorAgent.js +18 -5
- package/dist/agents/SupervisorAgent.js.map +1 -1
- package/dist/bridge/a2a/mapper.d.ts.map +1 -1
- package/dist/bridge/a2a/mapper.js +6 -0
- package/dist/bridge/a2a/mapper.js.map +1 -1
- package/dist/bridge/a2a/task.d.ts +2 -2
- package/dist/bridge/a2a/task.d.ts.map +1 -1
- package/dist/bridge/a2a/task.js.map +1 -1
- package/dist/bridge/sse/mapper.d.ts.map +1 -1
- package/dist/bridge/sse/mapper.js +6 -0
- package/dist/bridge/sse/mapper.js.map +1 -1
- package/dist/constants/a2a/index.d.ts +2 -2
- package/dist/constants/a2a/index.d.ts.map +1 -1
- package/dist/constants/a2a/index.js.map +1 -1
- package/dist/contracts/api.d.ts +22 -3
- package/dist/contracts/api.d.ts.map +1 -1
- package/dist/contracts/index.d.ts +3 -1
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js.map +1 -1
- package/dist/gateway/local.d.ts.map +1 -1
- package/dist/gateway/local.js +6 -0
- package/dist/gateway/local.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/manager/agent/__tests__/lifecycle.test.d.ts +2 -0
- package/dist/manager/agent/__tests__/lifecycle.test.d.ts.map +1 -0
- package/dist/manager/agent/__tests__/lifecycle.test.js +302 -0
- package/dist/manager/agent/__tests__/lifecycle.test.js.map +1 -0
- package/dist/manager/agent/lifecycle.d.ts +58 -3
- package/dist/manager/agent/lifecycle.d.ts.map +1 -1
- package/dist/manager/agent/lifecycle.js +311 -12
- package/dist/manager/agent/lifecycle.js.map +1 -1
- package/dist/manager/run/persistence.d.ts +8 -1
- package/dist/manager/run/persistence.d.ts.map +1 -1
- package/dist/manager/run/persistence.js +15 -0
- package/dist/manager/run/persistence.js.map +1 -1
- package/dist/run/reporter.d.ts.map +1 -1
- package/dist/run/reporter.js +25 -0
- package/dist/run/reporter.js.map +1 -1
- package/dist/runtime/query/__tests__/context.test.d.ts +2 -0
- package/dist/runtime/query/__tests__/context.test.d.ts.map +1 -0
- package/dist/runtime/query/__tests__/context.test.js +84 -0
- package/dist/runtime/query/__tests__/context.test.js.map +1 -0
- package/dist/runtime/query/context.d.ts +55 -2
- package/dist/runtime/query/context.d.ts.map +1 -1
- package/dist/runtime/query/context.js +48 -8
- package/dist/runtime/query/context.js.map +1 -1
- package/dist/runtime/query/events.d.ts.map +1 -1
- package/dist/runtime/query/events.js +8 -0
- package/dist/runtime/query/events.js.map +1 -1
- package/dist/runtime/query/index.d.ts +25 -2
- package/dist/runtime/query/index.d.ts.map +1 -1
- package/dist/runtime/query/index.js +11 -1
- package/dist/runtime/query/index.js.map +1 -1
- package/dist/session/__tests__/integration/_fixtures.d.ts +115 -0
- package/dist/session/__tests__/integration/_fixtures.d.ts.map +1 -0
- package/dist/session/__tests__/integration/_fixtures.js +198 -0
- package/dist/session/__tests__/integration/_fixtures.js.map +1 -0
- package/dist/session/__tests__/integration/capacity-caps.test.d.ts +13 -0
- package/dist/session/__tests__/integration/capacity-caps.test.d.ts.map +1 -0
- package/dist/session/__tests__/integration/capacity-caps.test.js +116 -0
- package/dist/session/__tests__/integration/capacity-caps.test.js.map +1 -0
- package/dist/session/__tests__/integration/e2e-spawn.test.d.ts +18 -0
- package/dist/session/__tests__/integration/e2e-spawn.test.d.ts.map +1 -0
- package/dist/session/__tests__/integration/e2e-spawn.test.js +226 -0
- package/dist/session/__tests__/integration/e2e-spawn.test.js.map +1 -0
- package/dist/session/__tests__/integration/event-stream-ordering.test.d.ts +15 -0
- package/dist/session/__tests__/integration/event-stream-ordering.test.d.ts.map +1 -0
- package/dist/session/__tests__/integration/event-stream-ordering.test.js +323 -0
- package/dist/session/__tests__/integration/event-stream-ordering.test.js.map +1 -0
- package/dist/session/__tests__/integration/handoff-broadcast-e2e.test.d.ts +12 -0
- package/dist/session/__tests__/integration/handoff-broadcast-e2e.test.d.ts.map +1 -0
- package/dist/session/__tests__/integration/handoff-broadcast-e2e.test.js +170 -0
- package/dist/session/__tests__/integration/handoff-broadcast-e2e.test.js.map +1 -0
- package/dist/session/__tests__/integration/handoff-illegal-transition.test.d.ts +18 -0
- package/dist/session/__tests__/integration/handoff-illegal-transition.test.d.ts.map +1 -0
- package/dist/session/__tests__/integration/handoff-illegal-transition.test.js +146 -0
- package/dist/session/__tests__/integration/handoff-illegal-transition.test.js.map +1 -0
- package/dist/session/__tests__/integration/handoff-single-e2e.test.d.ts +15 -0
- package/dist/session/__tests__/integration/handoff-single-e2e.test.d.ts.map +1 -0
- package/dist/session/__tests__/integration/handoff-single-e2e.test.js +163 -0
- package/dist/session/__tests__/integration/handoff-single-e2e.test.js.map +1 -0
- package/dist/session/__tests__/integration/hierarchy-lifecycle.test.d.ts +12 -0
- package/dist/session/__tests__/integration/hierarchy-lifecycle.test.d.ts.map +1 -0
- package/dist/session/__tests__/integration/hierarchy-lifecycle.test.js +157 -0
- package/dist/session/__tests__/integration/hierarchy-lifecycle.test.js.map +1 -0
- package/dist/session/__tests__/integration/migration-filesystem.test.d.ts +11 -0
- package/dist/session/__tests__/integration/migration-filesystem.test.d.ts.map +1 -0
- package/dist/session/__tests__/integration/migration-filesystem.test.js +140 -0
- package/dist/session/__tests__/integration/migration-filesystem.test.js.map +1 -0
- package/dist/session/__tests__/integration/migration-id-prefix.test.d.ts +13 -0
- package/dist/session/__tests__/integration/migration-id-prefix.test.d.ts.map +1 -0
- package/dist/session/__tests__/integration/migration-id-prefix.test.js +84 -0
- package/dist/session/__tests__/integration/migration-id-prefix.test.js.map +1 -0
- package/dist/session/__tests__/integration/prev-artifact-dag.test.d.ts +14 -0
- package/dist/session/__tests__/integration/prev-artifact-dag.test.d.ts.map +1 -0
- package/dist/session/__tests__/integration/prev-artifact-dag.test.js +241 -0
- package/dist/session/__tests__/integration/prev-artifact-dag.test.js.map +1 -0
- package/dist/session/__tests__/integration/retention-archive.test.d.ts +12 -0
- package/dist/session/__tests__/integration/retention-archive.test.d.ts.map +1 -0
- package/dist/session/__tests__/integration/retention-archive.test.js +186 -0
- package/dist/session/__tests__/integration/retention-archive.test.js.map +1 -0
- package/dist/session/__tests__/integration/summary-materialization-e2e.test.d.ts +18 -0
- package/dist/session/__tests__/integration/summary-materialization-e2e.test.d.ts.map +1 -0
- package/dist/session/__tests__/integration/summary-materialization-e2e.test.js +200 -0
- package/dist/session/__tests__/integration/summary-materialization-e2e.test.js.map +1 -0
- package/dist/session/__tests__/integration/tenant-isolation.test.d.ts +14 -0
- package/dist/session/__tests__/integration/tenant-isolation.test.d.ts.map +1 -0
- package/dist/session/__tests__/integration/tenant-isolation.test.js +180 -0
- package/dist/session/__tests__/integration/tenant-isolation.test.js.map +1 -0
- package/dist/session/errors.d.ts +60 -0
- package/dist/session/errors.d.ts.map +1 -0
- package/dist/session/errors.js +50 -0
- package/dist/session/errors.js.map +1 -0
- package/dist/session/events/index.d.ts +4 -0
- package/dist/session/events/index.d.ts.map +1 -0
- package/dist/session/events/index.js +8 -0
- package/dist/session/events/index.js.map +1 -0
- package/dist/session/events/schema-version.d.ts +13 -0
- package/dist/session/events/schema-version.d.ts.map +1 -0
- package/dist/session/events/schema-version.js +12 -0
- package/dist/session/events/schema-version.js.map +1 -0
- package/dist/session/events/types.d.ts +64 -0
- package/dist/session/events/types.d.ts.map +1 -0
- package/dist/session/events/types.js +2 -0
- package/dist/session/events/types.js.map +1 -0
- package/dist/session/handoff/__tests__/broadcast.test.d.ts +2 -0
- package/dist/session/handoff/__tests__/broadcast.test.d.ts.map +1 -0
- package/dist/session/handoff/__tests__/broadcast.test.js +243 -0
- package/dist/session/handoff/__tests__/broadcast.test.js.map +1 -0
- package/dist/session/handoff/__tests__/capacity.test.d.ts +2 -0
- package/dist/session/handoff/__tests__/capacity.test.d.ts.map +1 -0
- package/dist/session/handoff/__tests__/capacity.test.js +100 -0
- package/dist/session/handoff/__tests__/capacity.test.js.map +1 -0
- package/dist/session/handoff/__tests__/single.test.d.ts +2 -0
- package/dist/session/handoff/__tests__/single.test.d.ts.map +1 -0
- package/dist/session/handoff/__tests__/single.test.js +230 -0
- package/dist/session/handoff/__tests__/single.test.js.map +1 -0
- package/dist/session/handoff/assignment.d.ts +59 -0
- package/dist/session/handoff/assignment.d.ts.map +1 -0
- package/dist/session/handoff/assignment.js +11 -0
- package/dist/session/handoff/assignment.js.map +1 -0
- package/dist/session/handoff/broadcast.d.ts +47 -0
- package/dist/session/handoff/broadcast.d.ts.map +1 -0
- package/dist/session/handoff/broadcast.js +296 -0
- package/dist/session/handoff/broadcast.js.map +1 -0
- package/dist/session/handoff/capacity.d.ts +66 -0
- package/dist/session/handoff/capacity.d.ts.map +1 -0
- package/dist/session/handoff/capacity.js +60 -0
- package/dist/session/handoff/capacity.js.map +1 -0
- package/dist/session/handoff/events.d.ts +66 -0
- package/dist/session/handoff/events.d.ts.map +1 -0
- package/dist/session/handoff/events.js +13 -0
- package/dist/session/handoff/events.js.map +1 -0
- package/dist/session/handoff/index.d.ts +12 -0
- package/dist/session/handoff/index.d.ts.map +1 -0
- package/dist/session/handoff/index.js +9 -0
- package/dist/session/handoff/index.js.map +1 -0
- package/dist/session/handoff/single.d.ts +62 -0
- package/dist/session/handoff/single.d.ts.map +1 -0
- package/dist/session/handoff/single.js +217 -0
- package/dist/session/handoff/single.js.map +1 -0
- package/dist/session/handoff/version.d.ts +52 -0
- package/dist/session/handoff/version.d.ts.map +1 -0
- package/dist/session/handoff/version.js +36 -0
- package/dist/session/handoff/version.js.map +1 -0
- package/dist/session/hierarchy/__tests__/session.test.d.ts +2 -0
- package/dist/session/hierarchy/__tests__/session.test.d.ts.map +1 -0
- package/dist/session/hierarchy/__tests__/session.test.js +67 -0
- package/dist/session/hierarchy/__tests__/session.test.js.map +1 -0
- package/dist/session/hierarchy/actor.d.ts +26 -0
- package/dist/session/hierarchy/actor.d.ts.map +1 -0
- package/dist/session/hierarchy/actor.js +2 -0
- package/dist/session/hierarchy/actor.js.map +1 -0
- package/dist/session/hierarchy/index.d.ts +8 -0
- package/dist/session/hierarchy/index.d.ts.map +1 -0
- package/dist/session/hierarchy/index.js +4 -0
- package/dist/session/hierarchy/index.js.map +1 -0
- package/dist/session/hierarchy/lineage.d.ts +15 -0
- package/dist/session/hierarchy/lineage.d.ts.map +1 -0
- package/dist/session/hierarchy/lineage.js +2 -0
- package/dist/session/hierarchy/lineage.js.map +1 -0
- package/dist/session/hierarchy/project.d.ts +40 -0
- package/dist/session/hierarchy/project.d.ts.map +1 -0
- package/dist/session/hierarchy/project.js +2 -0
- package/dist/session/hierarchy/project.js.map +1 -0
- package/dist/session/hierarchy/session.d.ts +59 -0
- package/dist/session/hierarchy/session.d.ts.map +1 -0
- package/dist/session/hierarchy/session.js +51 -0
- package/dist/session/hierarchy/session.js.map +1 -0
- package/dist/session/hierarchy/sub-session.d.ts +76 -0
- package/dist/session/hierarchy/sub-session.d.ts.map +1 -0
- package/dist/session/hierarchy/sub-session.js +2 -0
- package/dist/session/hierarchy/sub-session.js.map +1 -0
- package/dist/session/hierarchy/tenant.d.ts +13 -0
- package/dist/session/hierarchy/tenant.d.ts.map +1 -0
- package/dist/session/hierarchy/tenant.js +2 -0
- package/dist/session/hierarchy/tenant.js.map +1 -0
- package/dist/session/index.d.ts +10 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/index.js +15 -0
- package/dist/session/index.js.map +1 -0
- package/dist/session/intervention/__tests__/prev-artifact.test.d.ts +2 -0
- package/dist/session/intervention/__tests__/prev-artifact.test.d.ts.map +1 -0
- package/dist/session/intervention/__tests__/prev-artifact.test.js +179 -0
- package/dist/session/intervention/__tests__/prev-artifact.test.js.map +1 -0
- package/dist/session/intervention/index.d.ts +3 -0
- package/dist/session/intervention/index.d.ts.map +1 -0
- package/dist/session/intervention/index.js +8 -0
- package/dist/session/intervention/index.js.map +1 -0
- package/dist/session/intervention/prev-artifact.d.ts +103 -0
- package/dist/session/intervention/prev-artifact.d.ts.map +1 -0
- package/dist/session/intervention/prev-artifact.js +112 -0
- package/dist/session/intervention/prev-artifact.js.map +1 -0
- package/dist/session/migration/__tests__/filesystem.test.d.ts +2 -0
- package/dist/session/migration/__tests__/filesystem.test.d.ts.map +1 -0
- package/dist/session/migration/__tests__/filesystem.test.js +188 -0
- package/dist/session/migration/__tests__/filesystem.test.js.map +1 -0
- package/dist/session/migration/__tests__/id-prefix.test.d.ts +2 -0
- package/dist/session/migration/__tests__/id-prefix.test.d.ts.map +1 -0
- package/dist/session/migration/__tests__/id-prefix.test.js +83 -0
- package/dist/session/migration/__tests__/id-prefix.test.js.map +1 -0
- package/dist/session/migration/__tests__/marker.test.d.ts +2 -0
- package/dist/session/migration/__tests__/marker.test.d.ts.map +1 -0
- package/dist/session/migration/__tests__/marker.test.js +75 -0
- package/dist/session/migration/__tests__/marker.test.js.map +1 -0
- package/dist/session/migration/errors.d.ts +26 -0
- package/dist/session/migration/errors.d.ts.map +1 -0
- package/dist/session/migration/errors.js +22 -0
- package/dist/session/migration/errors.js.map +1 -0
- package/dist/session/migration/filesystem.d.ts +94 -0
- package/dist/session/migration/filesystem.d.ts.map +1 -0
- package/dist/session/migration/filesystem.js +319 -0
- package/dist/session/migration/filesystem.js.map +1 -0
- package/dist/session/migration/id-prefix.d.ts +98 -0
- package/dist/session/migration/id-prefix.d.ts.map +1 -0
- package/dist/session/migration/id-prefix.js +116 -0
- package/dist/session/migration/id-prefix.js.map +1 -0
- package/dist/session/migration/index.d.ts +8 -0
- package/dist/session/migration/index.d.ts.map +1 -0
- package/dist/session/migration/index.js +8 -0
- package/dist/session/migration/index.js.map +1 -0
- package/dist/session/migration/marker.d.ts +57 -0
- package/dist/session/migration/marker.d.ts.map +1 -0
- package/dist/session/migration/marker.js +111 -0
- package/dist/session/migration/marker.js.map +1 -0
- package/dist/session/retention/__tests__/archive.test.d.ts +2 -0
- package/dist/session/retention/__tests__/archive.test.d.ts.map +1 -0
- package/dist/session/retention/__tests__/archive.test.js +252 -0
- package/dist/session/retention/__tests__/archive.test.js.map +1 -0
- package/dist/session/retention/__tests__/disk-backend.test.d.ts +2 -0
- package/dist/session/retention/__tests__/disk-backend.test.d.ts.map +1 -0
- package/dist/session/retention/__tests__/disk-backend.test.js +154 -0
- package/dist/session/retention/__tests__/disk-backend.test.js.map +1 -0
- package/dist/session/retention/archive-backend-ref.d.ts +18 -0
- package/dist/session/retention/archive-backend-ref.d.ts.map +1 -0
- package/dist/session/retention/archive-backend-ref.js +2 -0
- package/dist/session/retention/archive-backend-ref.js.map +1 -0
- package/dist/session/retention/archive.d.ts +130 -0
- package/dist/session/retention/archive.d.ts.map +1 -0
- package/dist/session/retention/archive.js +203 -0
- package/dist/session/retention/archive.js.map +1 -0
- package/dist/session/retention/backend.d.ts +101 -0
- package/dist/session/retention/backend.d.ts.map +1 -0
- package/dist/session/retention/backend.js +15 -0
- package/dist/session/retention/backend.js.map +1 -0
- package/dist/session/retention/disk-backend.d.ts +59 -0
- package/dist/session/retention/disk-backend.d.ts.map +1 -0
- package/dist/session/retention/disk-backend.js +236 -0
- package/dist/session/retention/disk-backend.js.map +1 -0
- package/dist/session/retention/index.d.ts +9 -0
- package/dist/session/retention/index.d.ts.map +1 -0
- package/dist/session/retention/index.js +6 -0
- package/dist/session/retention/index.js.map +1 -0
- package/dist/session/retention/policy.d.ts +49 -0
- package/dist/session/retention/policy.d.ts.map +1 -0
- package/dist/session/retention/policy.js +21 -0
- package/dist/session/retention/policy.js.map +1 -0
- package/dist/session/summary/__tests__/materialize.test.d.ts +2 -0
- package/dist/session/summary/__tests__/materialize.test.d.ts.map +1 -0
- package/dist/session/summary/__tests__/materialize.test.js +269 -0
- package/dist/session/summary/__tests__/materialize.test.js.map +1 -0
- package/dist/session/summary/deliverable.d.ts +74 -0
- package/dist/session/summary/deliverable.d.ts.map +1 -0
- package/dist/session/summary/deliverable.js +20 -0
- package/dist/session/summary/deliverable.js.map +1 -0
- package/dist/session/summary/index.d.ts +6 -0
- package/dist/session/summary/index.d.ts.map +1 -0
- package/dist/session/summary/index.js +9 -0
- package/dist/session/summary/index.js.map +1 -0
- package/dist/session/summary/materialize.d.ts +82 -0
- package/dist/session/summary/materialize.d.ts.map +1 -0
- package/dist/session/summary/materialize.js +117 -0
- package/dist/session/summary/materialize.js.map +1 -0
- package/dist/session/summary/ref.d.ts +91 -0
- package/dist/session/summary/ref.d.ts.map +1 -0
- package/dist/session/summary/ref.js +51 -0
- package/dist/session/summary/ref.js.map +1 -0
- package/dist/session/workspace/__tests__/git-worktree.test.d.ts +2 -0
- package/dist/session/workspace/__tests__/git-worktree.test.d.ts.map +1 -0
- package/dist/session/workspace/__tests__/git-worktree.test.js +244 -0
- package/dist/session/workspace/__tests__/git-worktree.test.js.map +1 -0
- package/dist/session/workspace/__tests__/path-builder.test.d.ts +2 -0
- package/dist/session/workspace/__tests__/path-builder.test.d.ts.map +1 -0
- package/dist/session/workspace/__tests__/path-builder.test.js +37 -0
- package/dist/session/workspace/__tests__/path-builder.test.js.map +1 -0
- package/dist/session/workspace/driver.d.ts +55 -0
- package/dist/session/workspace/driver.d.ts.map +1 -0
- package/dist/session/workspace/driver.js +12 -0
- package/dist/session/workspace/driver.js.map +1 -0
- package/dist/session/workspace/git-worktree.d.ts +65 -0
- package/dist/session/workspace/git-worktree.d.ts.map +1 -0
- package/dist/session/workspace/git-worktree.js +156 -0
- package/dist/session/workspace/git-worktree.js.map +1 -0
- package/dist/session/workspace/index.d.ts +8 -0
- package/dist/session/workspace/index.d.ts.map +1 -0
- package/dist/session/workspace/index.js +7 -0
- package/dist/session/workspace/index.js.map +1 -0
- package/dist/session/workspace/path-builder.d.ts +50 -0
- package/dist/session/workspace/path-builder.d.ts.map +1 -0
- package/dist/session/workspace/path-builder.js +50 -0
- package/dist/session/workspace/path-builder.js.map +1 -0
- package/dist/session/workspace/ref.d.ts +46 -0
- package/dist/session/workspace/ref.d.ts.map +1 -0
- package/dist/session/workspace/ref.js +11 -0
- package/dist/session/workspace/ref.js.map +1 -0
- package/dist/session/workspace/registry.d.ts +26 -0
- package/dist/session/workspace/registry.d.ts.map +1 -0
- package/dist/session/workspace/registry.js +35 -0
- package/dist/session/workspace/registry.js.map +1 -0
- package/dist/store/conversation/memory.d.ts +22 -0
- package/dist/store/conversation/memory.d.ts.map +1 -1
- package/dist/store/conversation/memory.js +22 -0
- package/dist/store/conversation/memory.js.map +1 -1
- package/dist/store/session/__tests__/disk.test.d.ts +2 -0
- package/dist/store/session/__tests__/disk.test.d.ts.map +1 -0
- package/dist/store/session/__tests__/disk.test.js +240 -0
- package/dist/store/session/__tests__/disk.test.js.map +1 -0
- package/dist/store/session/__tests__/memory.test.d.ts +2 -0
- package/dist/store/session/__tests__/memory.test.d.ts.map +1 -0
- package/dist/store/session/__tests__/memory.test.js +217 -0
- package/dist/store/session/__tests__/memory.test.js.map +1 -0
- package/dist/store/session/disk.d.ts +85 -0
- package/dist/store/session/disk.d.ts.map +1 -0
- package/dist/store/session/disk.js +757 -0
- package/dist/store/session/disk.js.map +1 -0
- package/dist/store/session/index.d.ts +7 -0
- package/dist/store/session/index.d.ts.map +1 -0
- package/dist/store/session/index.js +11 -0
- package/dist/store/session/index.js.map +1 -0
- package/dist/store/session/linkage.d.ts +38 -0
- package/dist/store/session/linkage.d.ts.map +1 -0
- package/dist/store/session/linkage.js +64 -0
- package/dist/store/session/linkage.js.map +1 -0
- package/dist/store/session/memory.d.ts +48 -0
- package/dist/store/session/memory.d.ts.map +1 -0
- package/dist/store/session/memory.js +322 -0
- package/dist/store/session/memory.js.map +1 -0
- package/dist/store/session/messages.d.ts +20 -0
- package/dist/store/session/messages.d.ts.map +1 -0
- package/dist/store/session/messages.js +12 -0
- package/dist/store/session/messages.js.map +1 -0
- package/dist/tools/builtins/__tests__/structuredOutput.example.d.ts +1 -1
- package/dist/types/agent/base.d.ts +28 -1
- package/dist/types/agent/base.d.ts.map +1 -1
- package/dist/types/agent/task.d.ts +50 -2
- package/dist/types/agent/task.d.ts.map +1 -1
- package/dist/types/agent/task.js.map +1 -1
- package/dist/types/conversation/index.d.ts +7 -0
- package/dist/types/conversation/index.d.ts.map +1 -1
- package/dist/types/ids/index.d.ts +26 -3
- package/dist/types/ids/index.d.ts.map +1 -1
- package/dist/types/ids/index.js +8 -1
- package/dist/types/ids/index.js.map +1 -1
- package/dist/types/invocation/__tests__/state.test.js +36 -29
- package/dist/types/invocation/__tests__/state.test.js.map +1 -1
- package/dist/types/invocation/index.d.ts +20 -4
- package/dist/types/invocation/index.d.ts.map +1 -1
- package/dist/types/invocation/index.js +10 -7
- package/dist/types/invocation/index.js.map +1 -1
- package/dist/types/run/config.d.ts +11 -1
- package/dist/types/run/config.d.ts.map +1 -1
- package/dist/types/run/events.d.ts +26 -1
- package/dist/types/run/events.d.ts.map +1 -1
- package/dist/types/run/index.d.ts.map +1 -1
- package/dist/types/run/index.js +8 -0
- package/dist/types/run/index.js.map +1 -1
- package/dist/types/run/metadata.d.ts +24 -1
- package/dist/types/run/metadata.d.ts.map +1 -1
- package/dist/types/run/status.d.ts +26 -0
- package/dist/types/run/status.d.ts.map +1 -0
- package/dist/types/run/status.js +2 -0
- package/dist/types/run/status.js.map +1 -0
- package/dist/types/session/ids.d.ts +18 -0
- package/dist/types/session/ids.d.ts.map +1 -0
- package/dist/types/session/ids.js +12 -0
- package/dist/types/session/ids.js.map +1 -0
- package/dist/types/session/index.d.ts +3 -0
- package/dist/types/session/index.d.ts.map +1 -0
- package/dist/types/session/index.js +5 -0
- package/dist/types/session/index.js.map +1 -0
- package/dist/types/session/store.d.ts +188 -0
- package/dist/types/session/store.d.ts.map +1 -0
- package/dist/types/session/store.js +14 -0
- package/dist/types/session/store.js.map +1 -0
- package/dist/utils/id.d.ts +18 -1
- package/dist/utils/id.d.ts.map +1 -1
- package/dist/utils/id.js +42 -4
- package/dist/utils/id.js.map +1 -1
- package/package.json +1 -1
- package/src/agents/ReactiveAgent.ts +7 -3
- package/src/agents/RouterAgent.ts +5 -0
- package/src/agents/SupervisorAgent.ts +26 -6
- package/src/bridge/a2a/mapper.ts +7 -0
- package/src/bridge/a2a/task.ts +2 -2
- package/src/bridge/sse/mapper.ts +8 -1
- package/src/constants/a2a/index.ts +2 -2
- package/src/contracts/api.ts +23 -3
- package/src/contracts/index.ts +2 -0
- package/src/gateway/local.ts +6 -0
- package/src/index.ts +14 -0
- package/src/manager/agent/__tests__/lifecycle.test.ts +452 -0
- package/src/manager/agent/lifecycle.ts +434 -19
- package/src/manager/run/persistence.ts +20 -1
- package/src/run/reporter.ts +28 -0
- package/src/runtime/query/__tests__/context.test.ts +101 -0
- package/src/runtime/query/context.ts +106 -10
- package/src/runtime/query/events.ts +8 -0
- package/src/runtime/query/index.ts +41 -3
- package/src/session/__tests__/integration/_fixtures.ts +282 -0
- package/src/session/__tests__/integration/capacity-caps.test.ts +164 -0
- package/src/session/__tests__/integration/e2e-spawn.test.ts +278 -0
- package/src/session/__tests__/integration/event-stream-ordering.test.ts +403 -0
- package/src/session/__tests__/integration/handoff-broadcast-e2e.test.ts +245 -0
- package/src/session/__tests__/integration/handoff-illegal-transition.test.ts +179 -0
- package/src/session/__tests__/integration/handoff-single-e2e.test.ts +220 -0
- package/src/session/__tests__/integration/hierarchy-lifecycle.test.ts +237 -0
- package/src/session/__tests__/integration/migration-filesystem.test.ts +209 -0
- package/src/session/__tests__/integration/migration-id-prefix.test.ts +101 -0
- package/src/session/__tests__/integration/prev-artifact-dag.test.ts +318 -0
- package/src/session/__tests__/integration/retention-archive.test.ts +231 -0
- package/src/session/__tests__/integration/summary-materialization-e2e.test.ts +237 -0
- package/src/session/__tests__/integration/tenant-isolation.test.ts +282 -0
- package/src/session/errors.ts +70 -0
- package/src/session/events/index.ts +16 -0
- package/src/session/events/schema-version.ts +13 -0
- package/src/session/events/types.ts +71 -0
- package/src/session/handoff/__tests__/broadcast.test.ts +350 -0
- package/src/session/handoff/__tests__/capacity.test.ts +123 -0
- package/src/session/handoff/__tests__/single.test.ts +316 -0
- package/src/session/handoff/assignment.ts +62 -0
- package/src/session/handoff/broadcast.ts +381 -0
- package/src/session/handoff/capacity.ts +121 -0
- package/src/session/handoff/events.ts +72 -0
- package/src/session/handoff/index.ts +29 -0
- package/src/session/handoff/single.ts +288 -0
- package/src/session/handoff/version.ts +59 -0
- package/src/session/hierarchy/__tests__/session.test.ts +92 -0
- package/src/session/hierarchy/actor.ts +17 -0
- package/src/session/hierarchy/index.ts +17 -0
- package/src/session/hierarchy/lineage.ts +15 -0
- package/src/session/hierarchy/project.ts +41 -0
- package/src/session/hierarchy/session.ts +97 -0
- package/src/session/hierarchy/sub-session.ts +92 -0
- package/src/session/hierarchy/tenant.ts +13 -0
- package/src/session/index.ts +15 -0
- package/src/session/intervention/__tests__/prev-artifact.test.ts +234 -0
- package/src/session/intervention/index.ts +16 -0
- package/src/session/intervention/prev-artifact.ts +180 -0
- package/src/session/migration/__tests__/filesystem.test.ts +263 -0
- package/src/session/migration/__tests__/id-prefix.test.ts +101 -0
- package/src/session/migration/__tests__/marker.test.ts +84 -0
- package/src/session/migration/errors.ts +23 -0
- package/src/session/migration/filesystem.ts +401 -0
- package/src/session/migration/id-prefix.ts +146 -0
- package/src/session/migration/index.ts +38 -0
- package/src/session/migration/marker.ts +131 -0
- package/src/session/retention/__tests__/archive.test.ts +316 -0
- package/src/session/retention/__tests__/disk-backend.test.ts +180 -0
- package/src/session/retention/archive-backend-ref.ts +17 -0
- package/src/session/retention/archive.ts +281 -0
- package/src/session/retention/backend.ts +107 -0
- package/src/session/retention/disk-backend.ts +304 -0
- package/src/session/retention/index.ts +16 -0
- package/src/session/retention/policy.ts +53 -0
- package/src/session/summary/__tests__/materialize.test.ts +341 -0
- package/src/session/summary/deliverable.ts +84 -0
- package/src/session/summary/index.ts +31 -0
- package/src/session/summary/materialize.ts +169 -0
- package/src/session/summary/ref.ts +104 -0
- package/src/session/workspace/__tests__/git-worktree.test.ts +258 -0
- package/src/session/workspace/__tests__/path-builder.test.ts +51 -0
- package/src/session/workspace/driver.ts +60 -0
- package/src/session/workspace/git-worktree.ts +209 -0
- package/src/session/workspace/index.ts +25 -0
- package/src/session/workspace/path-builder.ts +71 -0
- package/src/session/workspace/ref.ts +50 -0
- package/src/session/workspace/registry.ts +42 -0
- package/src/store/conversation/memory.ts +23 -0
- package/src/store/session/__tests__/disk.test.ts +346 -0
- package/src/store/session/__tests__/memory.test.ts +327 -0
- package/src/store/session/disk.ts +920 -0
- package/src/store/session/index.ts +14 -0
- package/src/store/session/linkage.ts +80 -0
- package/src/store/session/memory.ts +400 -0
- package/src/store/session/messages.ts +21 -0
- package/src/types/agent/base.ts +31 -1
- package/src/types/agent/task.ts +58 -2
- package/src/types/conversation/index.ts +7 -0
- package/src/types/ids/index.ts +41 -3
- package/src/types/invocation/__tests__/state.test.ts +37 -29
- package/src/types/invocation/index.ts +26 -10
- package/src/types/run/config.ts +12 -1
- package/src/types/run/events.ts +36 -1
- package/src/types/run/index.ts +8 -0
- package/src/types/run/metadata.ts +24 -1
- package/src/types/run/status.ts +33 -0
- package/src/types/session/ids.ts +34 -0
- package/src/types/session/index.ts +28 -0
- package/src/types/session/store.ts +229 -0
- package/src/utils/id.ts +55 -4
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { describe, expect, it, vi } from 'vitest'
|
|
2
|
+
import { DefaultPathBuilder, type PathBuilder } from '../../../session/workspace/path-builder.js'
|
|
3
|
+
import type { RunId, SessionId, TenantId } from '../../../types/ids/index.js'
|
|
4
|
+
import type { LLMProvider } from '../../../types/provider/index.js'
|
|
5
|
+
import type { AgentRunConfig } from '../../../types/run/index.js'
|
|
6
|
+
import type { ProjectId } from '../../../types/session/ids.js'
|
|
7
|
+
import { RunContextFactory } from '../context.js'
|
|
8
|
+
|
|
9
|
+
function mockProvider(): LLMProvider {
|
|
10
|
+
return {
|
|
11
|
+
id: 'mock',
|
|
12
|
+
supports: () => true,
|
|
13
|
+
chat: async () => ({ message: { role: 'assistant', content: '' } }),
|
|
14
|
+
} as unknown as LLMProvider
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function buildConfig(overrides: Partial<Parameters<typeof RunContextFactory.build>[0]> = {}) {
|
|
18
|
+
const sessionId = 'ses_test' as SessionId
|
|
19
|
+
const projectId = 'prj_test' as ProjectId
|
|
20
|
+
const tenantId = 'tnt_test' as TenantId
|
|
21
|
+
const runConfig: AgentRunConfig = {
|
|
22
|
+
model: 'test',
|
|
23
|
+
tokenBudget: 1_000,
|
|
24
|
+
timeoutMs: 5_000,
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
agentId: 'agent-1',
|
|
29
|
+
agentName: 'agent-1',
|
|
30
|
+
runConfig,
|
|
31
|
+
provider: mockProvider(),
|
|
32
|
+
messages: [],
|
|
33
|
+
sessionId,
|
|
34
|
+
projectId,
|
|
35
|
+
tenantId,
|
|
36
|
+
workingDirectory: '/tmp/run-context-test',
|
|
37
|
+
...overrides,
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
describe('RunContextFactory.build — Phase 6', () => {
|
|
42
|
+
it('requires sessionId, projectId, tenantId and returns them on the context', () => {
|
|
43
|
+
const cfg = buildConfig()
|
|
44
|
+
const ctx = RunContextFactory.build(cfg)
|
|
45
|
+
|
|
46
|
+
expect(ctx.sessionId).toBe(cfg.sessionId)
|
|
47
|
+
expect(ctx.projectId).toBe(cfg.projectId)
|
|
48
|
+
expect(ctx.tenantId).toBe(cfg.tenantId)
|
|
49
|
+
// threadId remains as a deprecated mirror of projectId.
|
|
50
|
+
expect(ctx.threadId).toBe(cfg.projectId)
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
it('uses the injected PathBuilder to resolve the output dir (no hardcoded .namzu/threads)', () => {
|
|
54
|
+
const pathBuilderMock: PathBuilder = {
|
|
55
|
+
rootDir: vi.fn(() => '/mock/root'),
|
|
56
|
+
projectDir: vi.fn((pid) => `/mock/root/projects/${pid}`),
|
|
57
|
+
sessionDir: vi.fn((pid, sid) => `/mock/root/projects/${pid}/sessions/${sid}`),
|
|
58
|
+
subSessionDir: vi.fn(),
|
|
59
|
+
runDir: vi.fn(),
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const cfg = buildConfig({ pathBuilder: pathBuilderMock })
|
|
63
|
+
const ctx = RunContextFactory.build(cfg)
|
|
64
|
+
|
|
65
|
+
expect(pathBuilderMock.sessionDir).toHaveBeenCalledWith(cfg.projectId, cfg.sessionId)
|
|
66
|
+
expect(ctx.outputDir).toBe(`/mock/root/projects/${cfg.projectId}/sessions/${cfg.sessionId}`)
|
|
67
|
+
// Legacy hardcoded path must not leak.
|
|
68
|
+
expect(ctx.outputDir).not.toContain('.namzu/threads')
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
it('falls back to DefaultPathBuilder rooted at {cwd}/.namzu when no pathBuilder is provided', () => {
|
|
72
|
+
const cfg = buildConfig()
|
|
73
|
+
const ctx = RunContextFactory.build(cfg)
|
|
74
|
+
|
|
75
|
+
// No more `/.namzu/threads/{threadId}/runs` — the new layout lives under
|
|
76
|
+
// projects/{pid}/sessions/{sid}.
|
|
77
|
+
expect(ctx.outputDir).toContain('/.namzu/projects/prj_test/sessions/ses_test')
|
|
78
|
+
expect(ctx.outputDir).not.toContain('threads')
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
it('seeds RunPersistence with propagated sessionId/tenantId/projectId', () => {
|
|
82
|
+
const cfg = buildConfig()
|
|
83
|
+
const ctx = RunContextFactory.build(cfg)
|
|
84
|
+
|
|
85
|
+
expect(ctx.runMgr.sessionId).toBe(cfg.sessionId)
|
|
86
|
+
expect(ctx.runMgr.tenantId).toBe(cfg.tenantId)
|
|
87
|
+
expect(ctx.runMgr.projectId).toBe(cfg.projectId)
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
it('reuses the runId supplied by the caller', () => {
|
|
91
|
+
const runId = 'run_fixed' as RunId
|
|
92
|
+
const ctx = RunContextFactory.build(buildConfig({ runId }))
|
|
93
|
+
expect(ctx.runId).toBe(runId)
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
it('DefaultPathBuilder lays out runs under sessions/{sessionId}/runs', () => {
|
|
97
|
+
const builder = new DefaultPathBuilder('/base/.namzu')
|
|
98
|
+
const runDir = builder.runDir('prj_x' as ProjectId, 'ses_y' as SessionId, 'run_z' as RunId)
|
|
99
|
+
expect(runDir).toBe('/base/.namzu/projects/prj_x/sessions/ses_y/runs/run_z')
|
|
100
|
+
})
|
|
101
|
+
})
|
|
@@ -1,17 +1,44 @@
|
|
|
1
1
|
import { join } from 'node:path'
|
|
2
2
|
import { PlanManager } from '../../manager/plan/lifecycle.js'
|
|
3
3
|
import { RunPersistence } from '../../manager/run/persistence.js'
|
|
4
|
+
import {
|
|
5
|
+
DefaultFilesystemMigrator,
|
|
6
|
+
type FilesystemMigrationResult,
|
|
7
|
+
type FilesystemMigrationSink,
|
|
8
|
+
type FilesystemMigrator,
|
|
9
|
+
NOOP_FILESYSTEM_MIGRATION_SINK,
|
|
10
|
+
} from '../../session/migration/index.js'
|
|
11
|
+
import { DefaultPathBuilder, type PathBuilder } from '../../session/workspace/path-builder.js'
|
|
4
12
|
import { ActivityStore } from '../../store/activity/memory.js'
|
|
5
13
|
import { type ActivityTrackingConfig, resolveActivityTracking } from '../../types/activity/index.js'
|
|
6
|
-
import type { RunId, ThreadId } from '../../types/ids/index.js'
|
|
14
|
+
import type { RunId, SessionId, TenantId, ThreadId } from '../../types/ids/index.js'
|
|
7
15
|
import type { Message } from '../../types/message/index.js'
|
|
8
16
|
import type { PermissionMode } from '../../types/permission/index.js'
|
|
9
17
|
import type { LLMProvider } from '../../types/provider/index.js'
|
|
10
18
|
import type { AgentRunConfig } from '../../types/run/index.js'
|
|
19
|
+
import type { ProjectId } from '../../types/session/ids.js'
|
|
11
20
|
import type { ModelPricing } from '../../utils/cost.js'
|
|
12
21
|
import { generateRunId } from '../../utils/id.js'
|
|
13
22
|
import { type Logger, getRootLogger } from '../../utils/logger.js'
|
|
14
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Config accepted by {@link RunContextFactory.build}. Phase 6 promotes
|
|
26
|
+
* `sessionId`, `projectId`, and `tenantId` to required — runs are scoped
|
|
27
|
+
* under a Session within a Project within a Tenant (session-hierarchy.md
|
|
28
|
+
* §12.1). `threadId` is retained only as a deprecated compat alias of
|
|
29
|
+
* `projectId` — consumers can still pass it, but no new path layout honors it.
|
|
30
|
+
*
|
|
31
|
+
* `pathBuilder` is optional; when absent a {@link DefaultPathBuilder} is
|
|
32
|
+
* constructed against `{workingDirectory}/.namzu` — no more hardcoded
|
|
33
|
+
* `.namzu/threads` path.
|
|
34
|
+
*
|
|
35
|
+
* Phase 7 adds `filesystemMigrator` + `migrationSink`. These are also
|
|
36
|
+
* optional; when absent a {@link DefaultFilesystemMigrator} wired to the
|
|
37
|
+
* {@link NOOP_FILESYSTEM_MIGRATION_SINK} is used. Migration runs once per
|
|
38
|
+
* process via {@link RunContextFactory.ensureMigrated}; the static `build`
|
|
39
|
+
* method stays synchronous so existing call sites are not broken — async
|
|
40
|
+
* callers (e.g. `query()`) invoke `ensureMigrated` themselves before build.
|
|
41
|
+
*/
|
|
15
42
|
export interface RunContextConfig {
|
|
16
43
|
agentId: string
|
|
17
44
|
agentName: string
|
|
@@ -23,7 +50,21 @@ export interface RunContextConfig {
|
|
|
23
50
|
messages: Message[]
|
|
24
51
|
signal?: AbortSignal
|
|
25
52
|
|
|
26
|
-
|
|
53
|
+
sessionId: SessionId
|
|
54
|
+
projectId: ProjectId
|
|
55
|
+
tenantId: TenantId
|
|
56
|
+
|
|
57
|
+
pathBuilder?: PathBuilder
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Optional injected migrator — tests pass a stub; production code relies
|
|
61
|
+
* on the {@link DefaultFilesystemMigrator}. See session-hierarchy.md
|
|
62
|
+
* §13.4.1.
|
|
63
|
+
*/
|
|
64
|
+
filesystemMigrator?: FilesystemMigrator
|
|
65
|
+
|
|
66
|
+
/** Optional sink for `filesystem.migrated` events. Defaults to no-op. */
|
|
67
|
+
migrationSink?: FilesystemMigrationSink
|
|
27
68
|
|
|
28
69
|
runId?: RunId
|
|
29
70
|
|
|
@@ -32,8 +73,20 @@ export interface RunContextConfig {
|
|
|
32
73
|
depth?: number
|
|
33
74
|
}
|
|
34
75
|
|
|
76
|
+
/**
|
|
77
|
+
* Result of {@link RunContextFactory.build}. `threadId` remains as a
|
|
78
|
+
* deprecated read-only mirror of `projectId` for consumers still referencing
|
|
79
|
+
* the old name — scheduled for removal in 0.3.0 (session-hierarchy.md §13.1).
|
|
80
|
+
*/
|
|
35
81
|
export interface RunContext {
|
|
36
82
|
runId: RunId
|
|
83
|
+
sessionId: SessionId
|
|
84
|
+
projectId: ProjectId
|
|
85
|
+
tenantId: TenantId
|
|
86
|
+
/**
|
|
87
|
+
* @deprecated Mirrors `projectId` — remove when callers migrate off the
|
|
88
|
+
* legacy name.
|
|
89
|
+
*/
|
|
37
90
|
threadId: ThreadId
|
|
38
91
|
runMgr: RunPersistence
|
|
39
92
|
activityStore: ActivityStore
|
|
@@ -46,7 +99,44 @@ export interface RunContext {
|
|
|
46
99
|
trackingConfig: ActivityTrackingConfig
|
|
47
100
|
}
|
|
48
101
|
|
|
102
|
+
/**
|
|
103
|
+
* Module-level first-call guard for the boot-time filesystem migration
|
|
104
|
+
* (session-hierarchy.md §13.4.1). Keyed on the root directory so a single
|
|
105
|
+
* process that spans multiple `.namzu` roots (unusual but legal) migrates
|
|
106
|
+
* each one once. Subsequent calls short-circuit via the cached promise —
|
|
107
|
+
* never re-reading the on-disk marker per call.
|
|
108
|
+
*/
|
|
109
|
+
const migrationPromises = new Map<string, Promise<FilesystemMigrationResult>>()
|
|
110
|
+
|
|
111
|
+
/** Testing hook — clears the first-call guard cache. */
|
|
112
|
+
export function __resetMigrationGuardForTests(): void {
|
|
113
|
+
migrationPromises.clear()
|
|
114
|
+
}
|
|
115
|
+
|
|
49
116
|
export class RunContextFactory {
|
|
117
|
+
/**
|
|
118
|
+
* Run the boot-time filesystem migration for `rootDir` at most once per
|
|
119
|
+
* process. Safe to `await` from any async entry point; concurrent callers
|
|
120
|
+
* for the same root share a single migration promise (no duplicate work,
|
|
121
|
+
* no race with the on-disk `.tmp` lock).
|
|
122
|
+
*/
|
|
123
|
+
static ensureMigrated(
|
|
124
|
+
rootDir: string,
|
|
125
|
+
migrator: FilesystemMigrator = new DefaultFilesystemMigrator(NOOP_FILESYSTEM_MIGRATION_SINK),
|
|
126
|
+
): Promise<FilesystemMigrationResult> {
|
|
127
|
+
const cached = migrationPromises.get(rootDir)
|
|
128
|
+
if (cached) return cached
|
|
129
|
+
const promise = migrator.migrate(rootDir)
|
|
130
|
+
migrationPromises.set(rootDir, promise)
|
|
131
|
+
// Crash-safety: if the migration rejects, drop the cached promise so
|
|
132
|
+
// the next caller gets a fresh attempt. Successful results stay cached
|
|
133
|
+
// (idempotency — further calls short-circuit without re-running).
|
|
134
|
+
promise.catch(() => {
|
|
135
|
+
migrationPromises.delete(rootDir)
|
|
136
|
+
})
|
|
137
|
+
return promise
|
|
138
|
+
}
|
|
139
|
+
|
|
50
140
|
static build(config: RunContextConfig): RunContext {
|
|
51
141
|
const abortController = new AbortController()
|
|
52
142
|
if (config.signal) {
|
|
@@ -57,17 +147,17 @@ export class RunContextFactory {
|
|
|
57
147
|
const permissionMode = config.runConfig.permissionMode ?? 'auto'
|
|
58
148
|
const runId = config.runId ?? generateRunId()
|
|
59
149
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
const threadId: ThreadId = config.threadId
|
|
64
|
-
const outputDir = join(cwd, '.namzu', 'threads', threadId, 'runs')
|
|
150
|
+
const pathBuilder = config.pathBuilder ?? new DefaultPathBuilder(join(cwd, '.namzu'))
|
|
151
|
+
const outputDir = pathBuilder.sessionDir(config.projectId, config.sessionId)
|
|
152
|
+
const runsDir = join(outputDir, 'runs')
|
|
65
153
|
|
|
66
154
|
const log = getRootLogger().child({
|
|
67
155
|
component: 'query',
|
|
68
156
|
agent: config.agentName,
|
|
69
157
|
runId,
|
|
70
|
-
|
|
158
|
+
sessionId: config.sessionId,
|
|
159
|
+
projectId: config.projectId,
|
|
160
|
+
tenantId: config.tenantId,
|
|
71
161
|
})
|
|
72
162
|
|
|
73
163
|
const runMgr = new RunPersistence({
|
|
@@ -76,9 +166,12 @@ export class RunContextFactory {
|
|
|
76
166
|
agentName: config.agentName,
|
|
77
167
|
runConfig: config.runConfig,
|
|
78
168
|
providerId: config.provider.id,
|
|
79
|
-
outputDir,
|
|
169
|
+
outputDir: runsDir,
|
|
80
170
|
pricing: config.pricing,
|
|
81
171
|
log,
|
|
172
|
+
sessionId: config.sessionId,
|
|
173
|
+
tenantId: config.tenantId,
|
|
174
|
+
projectId: config.projectId,
|
|
82
175
|
parentRunId: config.parentRunId,
|
|
83
176
|
depth: config.depth,
|
|
84
177
|
})
|
|
@@ -89,7 +182,10 @@ export class RunContextFactory {
|
|
|
89
182
|
|
|
90
183
|
return {
|
|
91
184
|
runId,
|
|
92
|
-
|
|
185
|
+
sessionId: config.sessionId,
|
|
186
|
+
projectId: config.projectId,
|
|
187
|
+
tenantId: config.tenantId,
|
|
188
|
+
threadId: config.projectId as ThreadId,
|
|
93
189
|
runMgr,
|
|
94
190
|
activityStore,
|
|
95
191
|
planManager,
|
|
@@ -80,6 +80,10 @@ export class EventTranslator {
|
|
|
80
80
|
})
|
|
81
81
|
break
|
|
82
82
|
default: {
|
|
83
|
+
// `TaskEvent.type` is scoped to task-store events; sub-session
|
|
84
|
+
// lifecycle events (subsession_spawned / _messaged / _idled) and
|
|
85
|
+
// run-scoped `RunEvent` variants never reach this wrapper. The
|
|
86
|
+
// exhaustiveness guard below enforces that at compile time.
|
|
83
87
|
const _exhaustive: never = event.type
|
|
84
88
|
throw new Error(`Unhandled task event type: ${_exhaustive}`)
|
|
85
89
|
}
|
|
@@ -134,6 +138,10 @@ export class EventTranslator {
|
|
|
134
138
|
case 'plan.failed':
|
|
135
139
|
break
|
|
136
140
|
default: {
|
|
141
|
+
// `PlanEvent.type` is scoped to plan-manager events; sub-session
|
|
142
|
+
// lifecycle events and other `RunEvent` variants never reach this
|
|
143
|
+
// wrapper. The exhaustiveness guard below enforces that at compile
|
|
144
|
+
// time.
|
|
137
145
|
const _exhaustive: never = event.type
|
|
138
146
|
throw new Error(`Unhandled plan event type: ${_exhaustive}`)
|
|
139
147
|
}
|
|
@@ -8,6 +8,7 @@ import { extractFromUserMessage } from '../../compaction/extractor.js'
|
|
|
8
8
|
import { WorkingStateManager } from '../../compaction/manager.js'
|
|
9
9
|
import type { CompactionConfig } from '../../config/runtime.js'
|
|
10
10
|
import { getTracer } from '../../provider/telemetry/setup.js'
|
|
11
|
+
import type { PathBuilder } from '../../session/workspace/path-builder.js'
|
|
11
12
|
import { GENAI, NAMZU, agentRunSpanName } from '../../telemetry/attributes.js'
|
|
12
13
|
import { buildAdvisoryTools } from '../../tools/advisory/index.js'
|
|
13
14
|
import { SearchToolsTool } from '../../tools/builtins/search-tools.js'
|
|
@@ -20,7 +21,7 @@ import {
|
|
|
20
21
|
type ResumeHandler,
|
|
21
22
|
autoApproveHandler,
|
|
22
23
|
} from '../../types/hitl/index.js'
|
|
23
|
-
import type { RunId, ThreadId } from '../../types/ids/index.js'
|
|
24
|
+
import type { RunId, SessionId, TenantId, ThreadId } from '../../types/ids/index.js'
|
|
24
25
|
import type { InvocationState } from '../../types/invocation/index.js'
|
|
25
26
|
import { type Message, createSystemMessage } from '../../types/message/index.js'
|
|
26
27
|
import type { AgentPersona } from '../../types/persona/index.js'
|
|
@@ -28,6 +29,7 @@ import type { LLMProvider } from '../../types/provider/index.js'
|
|
|
28
29
|
import type { TaskRouterConfig } from '../../types/router/index.js'
|
|
29
30
|
import type { AgentRun, AgentRunConfig, RunEvent, RunEventListener } from '../../types/run/index.js'
|
|
30
31
|
import type { Sandbox, SandboxProvider } from '../../types/sandbox/index.js'
|
|
32
|
+
import type { ProjectId } from '../../types/session/ids.js'
|
|
31
33
|
import type { Skill } from '../../types/skills/index.js'
|
|
32
34
|
import type { TaskStore } from '../../types/task/index.js'
|
|
33
35
|
import type { ToolRegistryContract } from '../../types/tool/index.js'
|
|
@@ -65,7 +67,32 @@ export interface QueryParams {
|
|
|
65
67
|
resumeHandler: ResumeHandler
|
|
66
68
|
resumeFromCheckpoint?: CheckpointId
|
|
67
69
|
|
|
68
|
-
|
|
70
|
+
/**
|
|
71
|
+
* Session scope for the run. Required in 0.2.0 — every run is attributed to
|
|
72
|
+
* a Session (session-hierarchy.md §12.1).
|
|
73
|
+
*/
|
|
74
|
+
sessionId: SessionId
|
|
75
|
+
|
|
76
|
+
/** Long-lived goal scope for the run. Required. */
|
|
77
|
+
projectId: ProjectId
|
|
78
|
+
|
|
79
|
+
/** Isolation boundary. Required. */
|
|
80
|
+
tenantId: TenantId
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated Pass `projectId` instead. When both are present, `projectId`
|
|
84
|
+
* wins. During the 0.2.x migration window a caller supplying only
|
|
85
|
+
* `threadId` must also supply `projectId` — the kernel no longer infers
|
|
86
|
+
* `projectId` from a bare `threadId` on the QueryParams shape.
|
|
87
|
+
*/
|
|
88
|
+
threadId?: ThreadId
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Optional path layout override. Defaults to a {@link DefaultPathBuilder}
|
|
92
|
+
* rooted at `{workingDirectory}/.namzu` (§13.4). Phase 7 wires first-call
|
|
93
|
+
* filesystem migration onto this same entry point.
|
|
94
|
+
*/
|
|
95
|
+
pathBuilder?: PathBuilder
|
|
69
96
|
|
|
70
97
|
runId?: RunId
|
|
71
98
|
|
|
@@ -112,6 +139,14 @@ export interface QueryParams {
|
|
|
112
139
|
}
|
|
113
140
|
|
|
114
141
|
export async function* query(params: QueryParams): AsyncGenerator<RunEvent, AgentRun> {
|
|
142
|
+
// Boot-time filesystem migration (session-hierarchy.md §13.4.1). First
|
|
143
|
+
// call per process per root actually runs; subsequent calls short-circuit
|
|
144
|
+
// via the in-memory guard in `context.ts`. Kept here rather than inside
|
|
145
|
+
// the synchronous `RunContextFactory.build` so the factory signature stays
|
|
146
|
+
// sync for tests / non-async call sites.
|
|
147
|
+
const cwdForMigration = params.workingDirectory ?? process.cwd()
|
|
148
|
+
await RunContextFactory.ensureMigrated(`${cwdForMigration}/.namzu`)
|
|
149
|
+
|
|
115
150
|
const ctx = RunContextFactory.build({
|
|
116
151
|
agentId: params.agentId,
|
|
117
152
|
agentName: params.agentName,
|
|
@@ -122,7 +157,10 @@ export async function* query(params: QueryParams): AsyncGenerator<RunEvent, Agen
|
|
|
122
157
|
enableActivityTracking: params.enableActivityTracking,
|
|
123
158
|
messages: params.messages,
|
|
124
159
|
signal: params.signal,
|
|
125
|
-
|
|
160
|
+
sessionId: params.sessionId,
|
|
161
|
+
projectId: params.projectId,
|
|
162
|
+
tenantId: params.tenantId,
|
|
163
|
+
pathBuilder: params.pathBuilder,
|
|
126
164
|
runId: params.runId,
|
|
127
165
|
parentRunId: params.parentRunId,
|
|
128
166
|
depth: params.depth,
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared test fixtures for the Task 10 integration coverage matrix.
|
|
3
|
+
*
|
|
4
|
+
* Factors out the `AgentManager` + `SessionStore` + `WorkspaceBackendRegistry`
|
|
5
|
+
* + `SessionSummaryMaterializer` + `DefaultCapacityValidator` wiring that
|
|
6
|
+
* every integration test rebuilds. Keeping this in an underscore-prefixed
|
|
7
|
+
* internal module (Convention #4: `_fixtures.ts` does not bleed into any
|
|
8
|
+
* barrel) lets the 11 integration files focus on invariant assertions rather
|
|
9
|
+
* than boilerplate.
|
|
10
|
+
*
|
|
11
|
+
* DO NOT export from `src/session/index.ts` or any other public barrel.
|
|
12
|
+
* This module is test-only and has no runtime consumers.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { vi } from 'vitest'
|
|
16
|
+
import { EMPTY_TOKEN_USAGE } from '../../../constants/limits.js'
|
|
17
|
+
import { AgentManager } from '../../../manager/agent/lifecycle.js'
|
|
18
|
+
import { AgentRegistry } from '../../../registry/agent/definitions.js'
|
|
19
|
+
import { InMemorySessionStore } from '../../../store/session/memory.js'
|
|
20
|
+
import type {
|
|
21
|
+
AgentCapabilities,
|
|
22
|
+
AgentInput,
|
|
23
|
+
BaseAgentConfig,
|
|
24
|
+
BaseAgentResult,
|
|
25
|
+
} from '../../../types/agent/base.js'
|
|
26
|
+
import type { Agent } from '../../../types/agent/core.js'
|
|
27
|
+
import type { AgentDefinition } from '../../../types/agent/factory.js'
|
|
28
|
+
import type { AgentTaskContext, SendMessageOptions } from '../../../types/agent/task.js'
|
|
29
|
+
import type { AgentId, RunId, SessionId, TenantId, UserId } from '../../../types/ids/index.js'
|
|
30
|
+
import { createAssistantMessage } from '../../../types/message/index.js'
|
|
31
|
+
import type { ProjectId, SummaryId } from '../../../types/session/ids.js'
|
|
32
|
+
import { ZERO_COST } from '../../../utils/cost.js'
|
|
33
|
+
import { DefaultCapacityValidator } from '../../handoff/capacity.js'
|
|
34
|
+
import type { ActorRef } from '../../hierarchy/actor.js'
|
|
35
|
+
import type { Session } from '../../hierarchy/session.js'
|
|
36
|
+
import { SessionSummaryMaterializer } from '../../summary/materialize.js'
|
|
37
|
+
import type { ExecFile, ExecFileResult } from '../../workspace/git-worktree.js'
|
|
38
|
+
import { GitWorktreeDriver } from '../../workspace/git-worktree.js'
|
|
39
|
+
import { WorkspaceBackendRegistry } from '../../workspace/registry.js'
|
|
40
|
+
|
|
41
|
+
export const DEFAULT_TENANT = 'tnt_alpha' as TenantId
|
|
42
|
+
export const OTHER_TENANT = 'tnt_beta' as TenantId
|
|
43
|
+
|
|
44
|
+
export function stubLogger() {
|
|
45
|
+
return {
|
|
46
|
+
debug: vi.fn(),
|
|
47
|
+
info: vi.fn(),
|
|
48
|
+
warn: vi.fn(),
|
|
49
|
+
error: vi.fn(),
|
|
50
|
+
child() {
|
|
51
|
+
return stubLogger()
|
|
52
|
+
},
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function okExec(stdout = '', stderr = ''): ExecFileResult {
|
|
57
|
+
return { stdout, stderr }
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function userActor(userId: string, tenantId: TenantId = DEFAULT_TENANT): ActorRef {
|
|
61
|
+
return { kind: 'user', userId: userId as UserId, tenantId }
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function agentActor(agentId: string, tenantId: TenantId = DEFAULT_TENANT): ActorRef {
|
|
65
|
+
return { kind: 'agent', agentId: agentId as AgentId, tenantId }
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const BASE_CAPABILITIES: AgentCapabilities = {
|
|
69
|
+
supportsTools: false,
|
|
70
|
+
supportsStreaming: false,
|
|
71
|
+
supportsConcurrency: false,
|
|
72
|
+
supportsSubAgents: false,
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Builds a minimal {@link Agent} whose `run` produces a deterministic
|
|
77
|
+
* assistant message. Tests that need custom output shape override via
|
|
78
|
+
* {@link buildAgentCustom}.
|
|
79
|
+
*/
|
|
80
|
+
export function buildAgent(
|
|
81
|
+
id: string,
|
|
82
|
+
result = 'child did the work',
|
|
83
|
+
): Agent<BaseAgentConfig, BaseAgentResult> {
|
|
84
|
+
return {
|
|
85
|
+
type: 'reactive',
|
|
86
|
+
metadata: {
|
|
87
|
+
type: 'reactive',
|
|
88
|
+
id,
|
|
89
|
+
name: id,
|
|
90
|
+
version: '1.0.0',
|
|
91
|
+
category: 'test',
|
|
92
|
+
description: id,
|
|
93
|
+
capabilities: BASE_CAPABILITIES,
|
|
94
|
+
},
|
|
95
|
+
run: async (_input: AgentInput, _config: BaseAgentConfig): Promise<BaseAgentResult> => ({
|
|
96
|
+
runId: `run_${id}_result` as RunId,
|
|
97
|
+
status: 'completed',
|
|
98
|
+
usage: { ...EMPTY_TOKEN_USAGE },
|
|
99
|
+
cost: { ...ZERO_COST },
|
|
100
|
+
iterations: 1,
|
|
101
|
+
durationMs: 1,
|
|
102
|
+
messages: [createAssistantMessage(result)],
|
|
103
|
+
result,
|
|
104
|
+
}),
|
|
105
|
+
cancel: async () => undefined,
|
|
106
|
+
getCapabilities: () => BASE_CAPABILITIES,
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Builds an agent with a caller-supplied `run`. Useful for tests that need
|
|
112
|
+
* to simulate failures or spawn cascading agents.
|
|
113
|
+
*/
|
|
114
|
+
export function buildAgentCustom(
|
|
115
|
+
id: string,
|
|
116
|
+
run: Agent<BaseAgentConfig, BaseAgentResult>['run'],
|
|
117
|
+
): Agent<BaseAgentConfig, BaseAgentResult> {
|
|
118
|
+
return {
|
|
119
|
+
type: 'reactive',
|
|
120
|
+
metadata: {
|
|
121
|
+
type: 'reactive',
|
|
122
|
+
id,
|
|
123
|
+
name: id,
|
|
124
|
+
version: '1.0.0',
|
|
125
|
+
category: 'test',
|
|
126
|
+
description: id,
|
|
127
|
+
capabilities: BASE_CAPABILITIES,
|
|
128
|
+
},
|
|
129
|
+
run,
|
|
130
|
+
cancel: async () => undefined,
|
|
131
|
+
getCapabilities: () => BASE_CAPABILITIES,
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function buildDefinition(agent: Agent<BaseAgentConfig, BaseAgentResult>): AgentDefinition {
|
|
136
|
+
return {
|
|
137
|
+
info: {
|
|
138
|
+
id: agent.metadata.id,
|
|
139
|
+
name: agent.metadata.name,
|
|
140
|
+
version: agent.metadata.version,
|
|
141
|
+
category: agent.metadata.category,
|
|
142
|
+
description: agent.metadata.description,
|
|
143
|
+
tools: [],
|
|
144
|
+
defaults: { model: 'test', tokenBudget: 1_000 },
|
|
145
|
+
},
|
|
146
|
+
typedAgent: agent,
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface IntegrationHarness {
|
|
151
|
+
readonly store: InMemorySessionStore
|
|
152
|
+
readonly registry: AgentRegistry
|
|
153
|
+
readonly manager: AgentManager
|
|
154
|
+
readonly materializer: SessionSummaryMaterializer
|
|
155
|
+
readonly workspaceRegistry: WorkspaceBackendRegistry
|
|
156
|
+
readonly capacity: DefaultCapacityValidator
|
|
157
|
+
readonly tenantId: TenantId
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface IntegrationHarnessOptions {
|
|
161
|
+
readonly tenantId?: TenantId
|
|
162
|
+
/** Pass `true` to register a no-op stubbed git-worktree driver. */
|
|
163
|
+
readonly withWorktreeDriver?: boolean
|
|
164
|
+
readonly execFile?: ExecFile
|
|
165
|
+
/**
|
|
166
|
+
* Deterministic summary ID generator — defaults to `sum_test_<n>`. Tests
|
|
167
|
+
* asserting on the exact id should override.
|
|
168
|
+
*/
|
|
169
|
+
readonly summaryIdGenerator?: () => SummaryId
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Builds a full AgentManager + SessionStore + Materializer harness wired with
|
|
174
|
+
* real components (not mocks). The `GitWorktreeDriver` uses a stubbed
|
|
175
|
+
* `execFile` that returns empty stdout by default — tests exercising failure
|
|
176
|
+
* modes inject a real {@link ExecFile}.
|
|
177
|
+
*/
|
|
178
|
+
export function buildHarness(options: IntegrationHarnessOptions = {}): IntegrationHarness {
|
|
179
|
+
const tenantId = options.tenantId ?? DEFAULT_TENANT
|
|
180
|
+
const store = new InMemorySessionStore()
|
|
181
|
+
|
|
182
|
+
const workspaceRegistry = new WorkspaceBackendRegistry()
|
|
183
|
+
if (options.withWorktreeDriver !== false) {
|
|
184
|
+
const exec: ExecFile = options.execFile ?? (async () => okExec())
|
|
185
|
+
const driver = new GitWorktreeDriver({
|
|
186
|
+
repoRoot: '/repo',
|
|
187
|
+
logger: stubLogger(),
|
|
188
|
+
execFile: exec,
|
|
189
|
+
})
|
|
190
|
+
workspaceRegistry.register(driver)
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
let counter = 0
|
|
194
|
+
const generateSummaryId =
|
|
195
|
+
options.summaryIdGenerator ?? (() => `sum_test_${++counter}` as SummaryId)
|
|
196
|
+
|
|
197
|
+
const materializer = new SessionSummaryMaterializer({
|
|
198
|
+
store,
|
|
199
|
+
generateSummaryId,
|
|
200
|
+
})
|
|
201
|
+
|
|
202
|
+
const capacity = new DefaultCapacityValidator(store)
|
|
203
|
+
const registry = new AgentRegistry()
|
|
204
|
+
const manager = new AgentManager(registry, undefined, {
|
|
205
|
+
sessionStore: store,
|
|
206
|
+
summaryMaterializer: materializer,
|
|
207
|
+
workspaceRegistry,
|
|
208
|
+
capacity,
|
|
209
|
+
})
|
|
210
|
+
|
|
211
|
+
return { store, registry, manager, materializer, workspaceRegistry, capacity, tenantId }
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Seeds a Tenant → Project → Session triple and flips the session into
|
|
216
|
+
* `active` so it is a legal spawn parent. Returns the project + active
|
|
217
|
+
* session for the caller to drive spawns against.
|
|
218
|
+
*/
|
|
219
|
+
export async function seedActiveParent(
|
|
220
|
+
harness: IntegrationHarness,
|
|
221
|
+
options?: { actor?: ActorRef; projectName?: string; tenantId?: TenantId },
|
|
222
|
+
) {
|
|
223
|
+
const tenantId = options?.tenantId ?? harness.tenantId
|
|
224
|
+
const actor: ActorRef = options?.actor ?? userActor('usr_root', tenantId)
|
|
225
|
+
const project = await harness.store.createProject(
|
|
226
|
+
{ tenantId, name: options?.projectName ?? 'integration-project' },
|
|
227
|
+
tenantId,
|
|
228
|
+
)
|
|
229
|
+
const session = await harness.store.createSession(
|
|
230
|
+
{ projectId: project.id, currentActor: actor },
|
|
231
|
+
tenantId,
|
|
232
|
+
)
|
|
233
|
+
await harness.store.updateSession({ ...session, status: 'active' as Session['status'] }, tenantId)
|
|
234
|
+
return { project, session, actor }
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Constructs a fully populated {@link AgentTaskContext} bound to the supplied
|
|
239
|
+
* parent session + actor. Tests override individual fields (depth, budget)
|
|
240
|
+
* by merging.
|
|
241
|
+
*/
|
|
242
|
+
export function buildTaskContext(params: {
|
|
243
|
+
sessionId: SessionId
|
|
244
|
+
projectId: ProjectId
|
|
245
|
+
tenantId: TenantId
|
|
246
|
+
parentActor: ActorRef
|
|
247
|
+
depth?: number
|
|
248
|
+
budget?: number
|
|
249
|
+
parentRunId?: RunId
|
|
250
|
+
}): AgentTaskContext {
|
|
251
|
+
return {
|
|
252
|
+
parentRunId: params.parentRunId ?? ('run_parent' as RunId),
|
|
253
|
+
parentAgentId: 'supervisor',
|
|
254
|
+
parentAbortController: new AbortController(),
|
|
255
|
+
depth: params.depth ?? 0,
|
|
256
|
+
budgetTracker: {
|
|
257
|
+
total: params.budget ?? 100_000,
|
|
258
|
+
remaining: params.budget ?? 100_000,
|
|
259
|
+
},
|
|
260
|
+
tenantId: params.tenantId,
|
|
261
|
+
sessionId: params.sessionId,
|
|
262
|
+
projectId: params.projectId,
|
|
263
|
+
parentActor: params.parentActor,
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export function buildSendMessageOptions(params: {
|
|
268
|
+
agentId: string
|
|
269
|
+
parentSessionId: SessionId
|
|
270
|
+
projectId: ProjectId
|
|
271
|
+
tenantId: TenantId
|
|
272
|
+
parentActor: ActorRef
|
|
273
|
+
}): SendMessageOptions {
|
|
274
|
+
return {
|
|
275
|
+
agentId: params.agentId,
|
|
276
|
+
input: { messages: [], workingDirectory: '/tmp' },
|
|
277
|
+
parentSessionId: params.parentSessionId,
|
|
278
|
+
tenantId: params.tenantId,
|
|
279
|
+
projectId: params.projectId,
|
|
280
|
+
parentActor: params.parentActor,
|
|
281
|
+
}
|
|
282
|
+
}
|