@gajae-code/coding-agent 0.18.7 → 0.18.9
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 +377 -1
- package/dist/types/async/endpoint-id.d.ts +16 -0
- package/dist/types/async/job-manager.d.ts +1 -1
- package/dist/types/async/support.d.ts +0 -14
- package/dist/types/capability/mcp.d.ts +2 -0
- package/dist/types/capability/skill.d.ts +2 -0
- package/dist/types/capability/types.d.ts +2 -0
- package/dist/types/cli/public-command-errors.d.ts +3 -1
- package/dist/types/cli/setup-cli.d.ts +1 -1
- package/dist/types/commands/deep-interview.d.ts +3 -0
- package/dist/types/commands/mcp-serve.d.ts +4 -0
- package/dist/types/config/autorouting-tier-map.d.ts +348 -9
- package/dist/types/config/file-lock.d.ts +1 -0
- package/dist/types/config/model-bindings-applier.d.ts +2 -0
- package/dist/types/config/model-profile-activation.d.ts +11 -3
- package/dist/types/config/model-registry.d.ts +4 -9
- package/dist/types/config/skill-settings-defaults.d.ts +2 -0
- package/dist/types/cursor-delete-path.d.ts +1 -0
- package/dist/types/cursor-mcp-name.d.ts +8 -0
- package/dist/types/customization/inventory.d.ts +2 -0
- package/dist/types/debug/report-bundle-parent.d.ts +2 -0
- package/dist/types/defaults/gjc/extensions/grok-cli-vendor/src/provider/stream.d.ts +1 -0
- package/dist/types/defaults/gjc/extensions/grok-cli-vendor/src/provider/version-manager.d.ts +31 -0
- package/dist/types/defaults/gjc-skills.generated.d.ts +5 -6
- package/dist/types/discovery/helpers.d.ts +6 -1
- package/dist/types/discovery/mcp-json.d.ts +1 -0
- package/dist/types/eval/py/kernel.d.ts +18 -0
- package/dist/types/export/html/css-color.d.ts +2 -0
- package/dist/types/export/html/html-export-destination.d.ts +2 -0
- package/dist/types/export/html/template.generated.d.ts +1 -1
- package/dist/types/extensibility/extensions/function-hooks-internal.d.ts +5 -0
- package/dist/types/extensibility/extensions/types.d.ts +7 -0
- package/dist/types/extensibility/gjc-plugins/runtime-adapters.d.ts +14 -1
- package/dist/types/extensibility/plugins/marketplace/cache.d.ts +2 -0
- package/dist/types/extensibility/plugins/plugin-link-path.d.ts +2 -0
- package/dist/types/extensibility/runtime-skill-discovery.d.ts +3 -1
- package/dist/types/extensibility/skill-management.d.ts +4 -1
- package/dist/types/extensibility/skills.d.ts +2 -0
- package/dist/types/gjc-runtime/deep-interview-crystallize.d.ts +74 -0
- package/dist/types/gjc-runtime/deep-interview-runtime.d.ts +11 -0
- package/dist/types/gjc-runtime/gc-runtime.d.ts +5 -0
- package/dist/types/gjc-runtime/psmux-detect.d.ts +3 -3
- package/dist/types/gjc-runtime/ralplan-runtime.d.ts +0 -5
- package/dist/types/gjc-runtime/sidecar-bootstrap-env.d.ts +6 -0
- package/dist/types/gjc-runtime/state-argv.d.ts +1 -1
- package/dist/types/gjc-runtime/state-migrations.d.ts +8 -0
- package/dist/types/gjc-runtime/state-runtime.d.ts +95 -0
- package/dist/types/gjc-runtime/state-writer.d.ts +14 -1
- package/dist/types/gjc-runtime/tmux-common.d.ts +8 -5
- package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +8 -0
- package/dist/types/internal-urls/skill-path.d.ts +1 -0
- package/dist/types/lsp/config.d.ts +8 -5
- package/dist/types/lsp/workspace-path.d.ts +1 -0
- package/dist/types/modes/acp/acp-agent.d.ts +7 -0
- package/dist/types/modes/components/custom-editor.d.ts +6 -0
- package/dist/types/modes/components/customization/customization-dashboard.d.ts +1 -0
- package/dist/types/modes/components/extensions/state-manager.d.ts +4 -3
- package/dist/types/modes/controllers/input-controller.d.ts +9 -0
- package/dist/types/modes/interactive-mode.d.ts +1 -0
- package/dist/types/modes/utils/interrupt-ownership.d.ts +3 -0
- package/dist/types/modes/utils/keybinding-matchers.d.ts +1 -0
- package/dist/types/modes/utils/macos-option-forwarding.d.ts +17 -0
- package/dist/types/progress/collect-project-progress.d.ts +38 -0
- package/dist/types/progress/progress-contract.d.ts +154 -0
- package/dist/types/progress/progress-snapshot.d.ts +11 -0
- package/dist/types/progress/project-progress.d.ts +141 -0
- package/dist/types/progress/render-progress.d.ts +28 -0
- package/dist/types/runtime-mcp/manager.d.ts +2 -1
- package/dist/types/runtime-mcp/mcp-redirect.d.ts +9 -0
- package/dist/types/runtime-mcp/oauth-public-url.d.ts +3 -0
- package/dist/types/runtime-mcp/plugin-network-boundary.d.ts +1 -0
- package/dist/types/runtime-mcp/project-host-values.d.ts +27 -0
- package/dist/types/runtime-mcp/smithery-registry.d.ts +24 -0
- package/dist/types/runtime-mcp/types.d.ts +6 -0
- package/dist/types/sdk/acp/adapter.d.ts +1 -1
- package/dist/types/sdk/broker/broker-exit.d.ts +6 -2
- package/dist/types/sdk/broker/broker.d.ts +24 -2
- package/dist/types/sdk/broker/doctor-restart.d.ts +5 -0
- package/dist/types/sdk/broker/ensure.d.ts +14 -1
- package/dist/types/sdk/broker/session-index.d.ts +12 -6
- package/dist/types/sdk/bus/index.d.ts +12 -1
- package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +6 -1
- package/dist/types/sdk/client/client.d.ts +2 -0
- package/dist/types/sdk/host/query/handlers.d.ts +3 -0
- package/dist/types/sdk/index.d.ts +1 -0
- package/dist/types/sdk/router/session-router.d.ts +2 -0
- package/dist/types/sdk/session-list.d.ts +1 -1
- package/dist/types/sdk/session.d.ts +8 -0
- package/dist/types/session/agent-session.d.ts +38 -9
- package/dist/types/session/artifacts.d.ts +2 -2
- package/dist/types/session/internal/managed-gc-retirement-codec.d.ts +32 -0
- package/dist/types/session/internal/managed-session-scope.d.ts +79 -2
- package/dist/types/session/internal/managed-session-storage.d.ts +26 -1
- package/dist/types/session/internal/managed-task-owner-cleanup.d.ts +62 -0
- package/dist/types/session/internal/task-artifact-owner-access.d.ts +2 -0
- package/dist/types/session/internal/task-artifact-owner-transcript.d.ts +9 -1
- package/dist/types/session/session-manager.d.ts +31 -5
- package/dist/types/session/session-retirement.d.ts +31 -7
- package/dist/types/session/session-storage.d.ts +69 -2
- package/dist/types/session/task-artifact-owner-codec.d.ts +2 -0
- package/dist/types/setup/credential-auto-import.d.ts +1 -1
- package/dist/types/setup/credential-import.d.ts +6 -4
- package/dist/types/skill-state/active-state.d.ts +38 -0
- package/dist/types/skill-state/workflow-mutation-guard.d.ts +3 -0
- package/dist/types/slash-commands/helpers/progress-report.d.ts +8 -0
- package/dist/types/task/executor.d.ts +3 -0
- package/dist/types/task/isolation-dir.d.ts +26 -0
- package/dist/types/tools/ast-edit-write-path.d.ts +13 -0
- package/dist/types/tools/bash-skill-urls.d.ts +1 -1
- package/dist/types/tools/browser/cdp-url.d.ts +2 -0
- package/dist/types/tools/github-side-effect.d.ts +22 -0
- package/dist/types/tools/index.d.ts +3 -0
- package/dist/types/tools/monitor-mutation.d.ts +9 -0
- package/dist/types/tools/python.d.ts +9 -1
- package/dist/types/tools/recipe/recipe-guard.d.ts +7 -0
- package/dist/types/tools/restricted-cwd.d.ts +1 -0
- package/dist/types/tools/todo-write.d.ts +6 -0
- package/dist/types/utils/tools-checksum.d.ts +7 -0
- package/package.json +7 -7
- package/scripts/generate-sdk-operation-inventory.ts +21 -0
- package/scripts/verify-managed-empty-stop.ts +28 -0
- package/src/async/endpoint-id.ts +26 -0
- package/src/async/job-manager.ts +247 -132
- package/src/async/support.ts +0 -25
- package/src/capability/index.ts +15 -0
- package/src/capability/mcp.ts +2 -0
- package/src/capability/skill.ts +2 -0
- package/src/capability/types.ts +2 -0
- package/src/cli/auth-broker-cli.ts +1 -1
- package/src/cli/customize-doctor.ts +15 -2
- package/src/cli/doctor/repairs.ts +4 -1
- package/src/cli/doctor-supervisor.ts +3 -0
- package/src/cli/public-command-errors.ts +21 -1
- package/src/cli/public-command-registry.ts +28 -6
- package/src/cli/setup-cli.ts +4 -4
- package/src/cli/skills-cli.ts +5 -0
- package/src/commands/deep-interview.ts +47 -8
- package/src/commands/mcp-serve.ts +7 -0
- package/src/commands/sdk.ts +455 -397
- package/src/config/autorouting-tier-map.ts +117 -7
- package/src/config/file-lock.ts +316 -79
- package/src/config/mcp-schema.json +4 -0
- package/src/config/model-bindings-applier.ts +20 -0
- package/src/config/model-profile-activation.ts +240 -46
- package/src/config/model-registry.ts +47 -153
- package/src/config/skill-settings-defaults.ts +7 -0
- package/src/coordinator-mcp/policy.ts +3 -2
- package/src/coordinator-mcp/server.ts +2 -0
- package/src/cursor-delete-path.ts +10 -0
- package/src/cursor-mcp-name.ts +15 -0
- package/src/cursor.ts +13 -2
- package/src/customization/inventory.ts +4 -13
- package/src/dap/config.ts +2 -2
- package/src/debug/report-bundle-parent.ts +22 -0
- package/src/debug/report-bundle.ts +3 -0
- package/src/debug/system-info.ts +13 -1
- package/src/defaults/gjc/extensions/grok-cli-vendor/src/provider/register.ts +10 -6
- package/src/defaults/gjc/extensions/grok-cli-vendor/src/provider/stream.ts +67 -4
- package/src/defaults/gjc/extensions/grok-cli-vendor/src/provider/version-manager.ts +80 -0
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +105 -10
- package/src/defaults/gjc/skills/ralplan/SKILL.md +6 -4
- package/src/defaults/gjc-defaults.test.ts +18 -1
- package/src/defaults/gjc-defaults.ts +3 -0
- package/src/defaults/gjc-skills.generated.ts +58 -36
- package/src/discovery/agents.ts +6 -1
- package/src/discovery/builtin.ts +13 -1
- package/src/discovery/helpers.ts +171 -29
- package/src/discovery/mcp-json.ts +26 -12
- package/src/discovery/ssh.ts +1 -1
- package/src/discovery/substitute-plugin-root.ts +3 -1
- package/src/edit/file-read-cache.ts +1 -1
- package/src/eval/py/executor.ts +796 -154
- package/src/eval/py/kernel.ts +79 -13
- package/src/eval/py/tool-bridge.ts +4 -0
- package/src/export/html/css-color.ts +9 -0
- package/src/export/html/html-export-destination.ts +16 -0
- package/src/export/html/index.ts +7 -10
- package/src/export/html/template.generated.ts +1 -1
- package/src/extensibility/extensions/function-hooks-internal.ts +27 -0
- package/src/extensibility/extensions/runner.ts +15 -1
- package/src/extensibility/extensions/types.ts +7 -0
- package/src/extensibility/gjc-plugins/mcp-policy.ts +2 -1
- package/src/extensibility/gjc-plugins/runtime-adapters.ts +85 -8
- package/src/extensibility/plugins/manager.ts +3 -2
- package/src/extensibility/plugins/marketplace/cache.ts +15 -0
- package/src/extensibility/plugins/marketplace/manager.ts +11 -3
- package/src/extensibility/plugins/plugin-link-path.ts +12 -0
- package/src/extensibility/runtime-skill-discovery.ts +20 -2
- package/src/extensibility/skill-management.ts +9 -2
- package/src/extensibility/skills.ts +6 -1
- package/src/gjc-runtime/deep-interview-crystallize.ts +1814 -0
- package/src/gjc-runtime/deep-interview-recorder.ts +20 -2
- package/src/gjc-runtime/deep-interview-runtime.ts +1415 -13
- package/src/gjc-runtime/deep-interview-stage.ts +98 -21
- package/src/gjc-runtime/gc-runtime.ts +206 -9
- package/src/gjc-runtime/launch-worktree.ts +70 -9
- package/src/gjc-runtime/psmux-detect.ts +28 -4
- package/src/gjc-runtime/ralplan-runtime.ts +447 -52
- package/src/gjc-runtime/session-state-sidecar.ts +3 -2
- package/src/gjc-runtime/sidecar-bootstrap-env.ts +19 -0
- package/src/gjc-runtime/state-argv.ts +2 -0
- package/src/gjc-runtime/state-migrations.ts +91 -29
- package/src/gjc-runtime/state-runtime.ts +3716 -135
- package/src/gjc-runtime/state-writer.ts +105 -16
- package/src/gjc-runtime/tmux-common.ts +8 -5
- package/src/gjc-runtime/ultragoal-runtime.ts +16 -4
- package/src/gjc-runtime/workflow-manifest.generated.json +70 -42
- package/src/gjc-runtime/workflow-manifest.ts +54 -21
- package/src/harness-control-plane/operate.ts +12 -4
- package/src/harness-control-plane/owner.ts +5 -1
- package/src/hashline/parser.ts +48 -9
- package/src/hashline/recovery.ts +13 -4
- package/src/internal-urls/docs-index.generated.ts +20 -19
- package/src/internal-urls/skill-path.ts +19 -0
- package/src/internal-urls/skill-protocol.ts +2 -0
- package/src/lsp/config.ts +12 -63
- package/src/lsp/edits.ts +6 -0
- package/src/lsp/workspace-path.ts +51 -0
- package/src/main.ts +195 -31
- package/src/memories/index.ts +88 -7
- package/src/modes/acp/acp-agent.ts +88 -4
- package/src/modes/components/custom-editor.ts +14 -0
- package/src/modes/components/customization/customization-dashboard.ts +12 -0
- package/src/modes/components/extensions/extension-dashboard.ts +2 -2
- package/src/modes/components/extensions/state-manager.ts +15 -5
- package/src/modes/components/hook-editor.ts +1 -1
- package/src/modes/components/hook-selector.ts +1 -1
- package/src/modes/components/model-selector.ts +1 -4
- package/src/modes/components/provider-onboarding-selector.ts +1 -1
- package/src/modes/components/status-line/segments.ts +4 -0
- package/src/modes/controllers/event-controller.ts +11 -4
- package/src/modes/controllers/input-controller.ts +76 -31
- package/src/modes/controllers/runtime-mcp-command-controller.ts +29 -16
- package/src/modes/controllers/selector-controller.ts +24 -15
- package/src/modes/controllers/todo-command-controller.ts +1 -1
- package/src/modes/interactive-mode.ts +5 -1
- package/src/modes/runtime-init.ts +4 -0
- package/src/modes/utils/abort-message.ts +3 -1
- package/src/modes/utils/interrupt-ownership.ts +12 -0
- package/src/modes/utils/keybinding-matchers.ts +4 -0
- package/src/modes/utils/macos-option-forwarding.ts +80 -0
- package/src/progress/collect-project-progress.ts +153 -0
- package/src/progress/progress-contract.ts +172 -0
- package/src/progress/progress-snapshot.ts +140 -0
- package/src/progress/project-progress.ts +446 -0
- package/src/progress/render-progress.ts +209 -0
- package/src/prompts/system/master-mode.md +1 -0
- package/src/prompts/tools/skill-discovery.md +1 -1
- package/src/runtime-mcp/client.ts +4 -2
- package/src/runtime-mcp/config-writer.ts +10 -6
- package/src/runtime-mcp/config.ts +1 -0
- package/src/runtime-mcp/json-rpc.ts +2 -1
- package/src/runtime-mcp/manager.ts +29 -11
- package/src/runtime-mcp/mcp-redirect.ts +73 -0
- package/src/runtime-mcp/oauth-flow.ts +14 -2
- package/src/runtime-mcp/oauth-public-url.ts +14 -0
- package/src/runtime-mcp/plugin-network-boundary.ts +4 -0
- package/src/runtime-mcp/pool.ts +6 -0
- package/src/runtime-mcp/project-host-values.ts +46 -0
- package/src/runtime-mcp/smithery-registry.ts +22 -3
- package/src/runtime-mcp/transports/http.ts +4 -3
- package/src/runtime-mcp/types.ts +6 -0
- package/src/sdk/acp/adapter.ts +95 -8
- package/src/sdk/broker/broker-exit.ts +52 -23
- package/src/sdk/broker/broker.ts +81 -6
- package/src/sdk/broker/doctor-restart.ts +4 -0
- package/src/sdk/broker/ensure.ts +31 -2
- package/src/sdk/broker/lifecycle.ts +711 -66
- package/src/sdk/broker/session-index.ts +191 -81
- package/src/sdk/bus/chat-daemon-cli.ts +38 -1
- package/src/sdk/bus/chat-daemon-control.ts +2 -2
- package/src/sdk/bus/index.ts +238 -43
- package/src/sdk/bus/telegram-daemon-contract.ts +6 -1
- package/src/sdk/cli/session-cli.ts +17 -3
- package/src/sdk/client/client.ts +28 -8
- package/src/sdk/host/query/handlers.ts +9 -1
- package/src/sdk/host/session-runtime.test.ts +2705 -303
- package/src/sdk/host/session-runtime.ts +490 -143
- package/src/sdk/host/surface-policy.ts +1 -0
- package/src/sdk/index.ts +8 -0
- package/src/sdk/lifecycle-session.ts +3 -1
- package/src/sdk/prompt-deadline-manager.ts +15 -0
- package/src/sdk/protocol/operation-inventory.generated.json +146 -0
- package/src/sdk/protocol/operation-registry.ts +9 -2
- package/src/sdk/router/session-router.ts +82 -18
- package/src/sdk/session-list.ts +1 -0
- package/src/sdk/session.ts +69 -45
- package/src/session/agent-session.ts +679 -238
- package/src/session/artifacts.ts +176 -71
- package/src/session/internal/managed-gc-retirement-codec.ts +319 -0
- package/src/session/internal/managed-session-scope.ts +3779 -462
- package/src/session/internal/managed-session-storage.ts +501 -78
- package/src/session/internal/managed-task-owner-cleanup.ts +473 -0
- package/src/session/internal/task-artifact-owner-access.ts +19 -3
- package/src/session/internal/task-artifact-owner-transcript.ts +547 -1
- package/src/session/session-manager.ts +951 -133
- package/src/session/session-retirement.ts +573 -14
- package/src/session/session-storage.ts +447 -15
- package/src/session/task-artifact-owner-codec.ts +71 -8
- package/src/session/task-artifact-owner-retirement.ts +21 -19
- package/src/setup/credential-auto-import.ts +12 -3
- package/src/setup/credential-import.ts +176 -5
- package/src/setup/paseo/announce.ts +6 -1
- package/src/skill-state/active-state.ts +145 -2
- package/src/skill-state/workflow-mutation-guard.ts +102 -10
- package/src/slash-commands/builtin-registry.ts +39 -9
- package/src/slash-commands/helpers/mcp.ts +8 -4
- package/src/slash-commands/helpers/progress-report.ts +23 -0
- package/src/stt/setup.ts +3 -5
- package/src/task/commands.ts +3 -1
- package/src/task/executor.ts +4 -0
- package/src/task/index.ts +6 -0
- package/src/task/isolation-dir.ts +143 -0
- package/src/task/worktree.ts +16 -7
- package/src/tools/ask.ts +205 -6
- package/src/tools/ast-edit-write-path.ts +68 -0
- package/src/tools/ast-edit.ts +10 -1
- package/src/tools/bash-allowed-prefixes.ts +15 -0
- package/src/tools/bash-skill-urls.ts +56 -3
- package/src/tools/bash.ts +48 -79
- package/src/tools/browser/cdp-url.ts +18 -0
- package/src/tools/browser.ts +8 -1
- package/src/tools/descriptors.ts +5 -1
- package/src/tools/eval.ts +56 -36
- package/src/tools/gh.ts +10 -0
- package/src/tools/github-side-effect.ts +112 -0
- package/src/tools/image-gen.ts +1 -1
- package/src/tools/index.ts +3 -0
- package/src/tools/monitor-mutation.ts +27 -0
- package/src/tools/monitor.ts +7 -0
- package/src/tools/python.ts +188 -66
- package/src/tools/recipe/index.ts +9 -0
- package/src/tools/recipe/recipe-guard.ts +19 -0
- package/src/tools/restricted-cwd.ts +10 -0
- package/src/tools/skill-discovery.ts +5 -0
- package/src/tools/skill.ts +28 -1
- package/src/tools/todo-write.ts +10 -1
- package/src/tools/tool-catalog.generated.ts +1 -1
- package/src/tools/write.ts +1 -0
- package/src/utils/external-editor.ts +3 -2
- package/src/utils/tools-checksum.ts +34 -0
- package/src/utils/tools-manager.ts +24 -6
- package/src/web/insane/url-guard.ts +2 -1
- package/src/web/search/providers/codex.ts +3 -2
|
@@ -192,10 +192,12 @@ export declare class SessionIndex {
|
|
|
192
192
|
* stamp of the last completed locked pass, the in-memory projection is
|
|
193
193
|
* already current and the locked rescan is skipped entirely — this is what
|
|
194
194
|
* keeps an idle SessionRouter reconcile (2s cadence) from re-parsing and
|
|
195
|
-
* re-checksumming the whole index forever.
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
195
|
+
* re-checksumming the whole index forever. The unchanged check runs before
|
|
196
|
+
* the local queue so unrelated heartbeat work cannot delay ordinary creates.
|
|
197
|
+
* Admission that requires serialized authority must use refresh() instead.
|
|
198
|
+
* An append committed before the stat always changes
|
|
199
|
+
* the stamp; a change landing after the stat is seen on the next poll, the
|
|
200
|
+
* same TOCTOU envelope a locked read has. A corrupt suffix never takes the fast path: re-scanning
|
|
199
201
|
* preserves the existing re-diagnosis behavior. Returns true when state was
|
|
200
202
|
* reloaded. Authority revalidation that needs the strongest available
|
|
201
203
|
* snapshot inside an already-locked write (append, unregister) keeps using
|
|
@@ -229,7 +231,11 @@ export declare class SessionIndex {
|
|
|
229
231
|
* injected retention policy to a fresh snapshot and truncates the log.
|
|
230
232
|
*/
|
|
231
233
|
compact(): Promise<void>;
|
|
232
|
-
|
|
234
|
+
/**
|
|
235
|
+
* Public session rows. `sessionIds` scopes the projection to those sessions:
|
|
236
|
+
* rows for them are identical to the unscoped read, other sessions are absent.
|
|
237
|
+
*/
|
|
238
|
+
listSessions(probedIncarnations?: ReadonlyMap<string, string | undefined>, sessionIds?: ReadonlySet<string>): SessionList;
|
|
233
239
|
/**
|
|
234
240
|
* Credential-free proof for one exact public endpoint generation.
|
|
235
241
|
*
|
|
@@ -274,7 +280,7 @@ export declare class SessionIndex {
|
|
|
274
280
|
* while the broker was down keep their stale or missing heartbeat and read as
|
|
275
281
|
* unknown/not-live (never fresh forever). Returns the number of checkpoints written.
|
|
276
282
|
*/
|
|
277
|
-
checkpointLiveHeartbeats(now?: number): Promise<number>;
|
|
283
|
+
checkpointLiveHeartbeats(now?: number, abortSignal?: AbortSignal, deadlineAt?: number): Promise<number>;
|
|
278
284
|
hostUnregisteredAfter(registration: Pick<IndexedSession, "sessionId" | "locator" | "endpointGeneration" | "pid" | "indexSeq" | "lifecycleRequestId" | "hostIncarnation" | "processIncarnation" | "endpointFileId">): {
|
|
279
285
|
indexSeq: number;
|
|
280
286
|
lifecycleRequestId?: string;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* Enable with Settings notifications config, `GJC_NOTIFICATIONS=1` (a token is
|
|
18
18
|
* generated), or `GJC_NOTIFICATIONS_TOKEN`.
|
|
19
19
|
*/
|
|
20
|
-
import { type RunSettlementProof } from "@gajae-code/agent-core";
|
|
20
|
+
import { type AgentTerminalOwnerContext, type RunCancellationDomain, type RunSettlementProof } from "@gajae-code/agent-core";
|
|
21
21
|
import type { Tool } from "@gajae-code/ai/core";
|
|
22
22
|
import type { NotificationServer as NativeNotificationServer } from "@gajae-code/natives";
|
|
23
23
|
type NotificationServer = NativeNotificationServer;
|
|
@@ -266,6 +266,15 @@ export declare class PresentationArbiter {
|
|
|
266
266
|
interface SessionRuntime {
|
|
267
267
|
server: NotificationServer;
|
|
268
268
|
host: SessionSdkHost;
|
|
269
|
+
getJoinedPromptCorrelations: (owner: AgentTerminalOwnerContext) => Array<{
|
|
270
|
+
commandId: string;
|
|
271
|
+
turnId: string;
|
|
272
|
+
}>;
|
|
273
|
+
isPromptRunOwner: (correlation: {
|
|
274
|
+
commandId: string;
|
|
275
|
+
turnId: string;
|
|
276
|
+
}, owner: AgentTerminalOwnerContext) => boolean;
|
|
277
|
+
retireJoinedPromptOwners: () => void;
|
|
269
278
|
/** Delivers one ring-positioned event envelope to every attached subscriber
|
|
270
279
|
* connection, applying the same capability gate as event replay. */
|
|
271
280
|
broadcastEventFrame: (event: SdkFrame) => string[];
|
|
@@ -640,6 +649,8 @@ export declare function createNotificationsExtension(api: ExtensionAPI, options?
|
|
|
640
649
|
* preflight outside the durable admission path (review thread P2).
|
|
641
650
|
*/
|
|
642
651
|
terminalAbortSeams?: {
|
|
652
|
+
getTerminalRunOwnerForEvent?: (event: object) => AgentTerminalOwnerContext | undefined;
|
|
653
|
+
getRunOwnerDomain?: (handle: string) => RunCancellationDomain | undefined;
|
|
643
654
|
getTerminalTurnEpoch: () => number | undefined;
|
|
644
655
|
cancelPendingPreflightForTerminalAbort: () => void;
|
|
645
656
|
captureTerminalAbortSteeringSnapshot?: () => void;
|
|
@@ -291,8 +291,13 @@ export declare const SDK_LIFECYCLE_ROUTER_PROTOCOL_VERSION = 1;
|
|
|
291
291
|
* so generation-191 owners cannot reap hosts with queued or promoted work.
|
|
292
292
|
* Generation 193 gates streamed content on negotiated observer capabilities,
|
|
293
293
|
* so existing owners are replaced before exposing the new observer path.
|
|
294
|
+
* Generation 201 binds queued cancellation and terminal deadlines to the exact
|
|
295
|
+
* consuming run, so pre-fix owners cannot serve the new generic lifecycle path.
|
|
296
|
+
* Generation 202 joins queued-removal terminal publication before ordinary
|
|
297
|
+
* abort acknowledgement, replacing owners that still acknowledge cancellation
|
|
298
|
+
* before its terminal record is durable.
|
|
294
299
|
*/
|
|
295
|
-
export declare const DAEMON_GENERATION =
|
|
300
|
+
export declare const DAEMON_GENERATION = 202;
|
|
296
301
|
/**
|
|
297
302
|
* Serving-compatibility boundary for daemon lifecycle requests. Epoch 7
|
|
298
303
|
* requires durable publication receipts and acknowledged attachment dispatch,
|
|
@@ -58,6 +58,8 @@ export interface SdkClientOptions {
|
|
|
58
58
|
}
|
|
59
59
|
export interface SdkRequestOptions {
|
|
60
60
|
timeoutMs?: number;
|
|
61
|
+
/** Absolute wall-clock deadline for this request, including connection setup. */
|
|
62
|
+
deadline?: number;
|
|
61
63
|
idempotencyKey?: string;
|
|
62
64
|
confirm?: boolean;
|
|
63
65
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ProjectProgressSnapshot } from "../../../progress/progress-contract.js";
|
|
1
2
|
import type { ActiveProviderDescriptor } from "../../providers.js";
|
|
2
3
|
import { type CursorRegistry } from "./cursor.js";
|
|
3
4
|
import type { RevisionStore } from "./revision-store.js";
|
|
@@ -33,6 +34,8 @@ export interface SessionSurface {
|
|
|
33
34
|
totalBytes: number;
|
|
34
35
|
} | undefined>;
|
|
35
36
|
getJobs(): unknown | Promise<unknown>;
|
|
37
|
+
/** Q32 read-only project progress snapshot (`gjc.project_progress.v1`). */
|
|
38
|
+
getProjectProgress?(): ProjectProgressSnapshot | Promise<ProjectProgressSnapshot>;
|
|
36
39
|
/** Q26 keyed lookup of a submitted prompt's authoritative reconciliation status. */
|
|
37
40
|
getPromptStatus?(selector: {
|
|
38
41
|
commandId?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { MODEL_PROFILE_DISCOVERY_QUERY, MODEL_PROFILE_ERROR_DETAIL_MAX_BYTES, type ModelProfileCatalogItem, type ModelProfileErrorCode, type ModelProfileErrorDetails, ModelProfileRegistryError, type ModelProfileRegistryErrorDetails, type UnknownModelProfileDetails, UnknownModelProfileError, } from "../config/model-profile-contract";
|
|
2
|
+
export { PROJECT_PROGRESS_SNAPSHOT_SCHEMA, type ProgressSnapshotAttention, type ProgressSnapshotStory, type ProgressSnapshotTodo, type ProgressSnapshotWorkflow, type ProjectProgressSnapshot, } from "../progress/progress-contract";
|
|
2
3
|
export type { QueuedInputAdmission, QueuedInputDelivery, QueuedInputExecution, QueuedInputQueuePolicy, QueuedInputRemovalReason, QueuedInputSubmission, QueuedInputTerminal, SendUserMessageOptions, TrackedSendUserMessageOptions, } from "../session/agent-session";
|
|
3
4
|
export * as bus from "./bus";
|
|
4
5
|
export * from "./diagnostics/observe-broker";
|
|
@@ -112,6 +112,7 @@ export interface SessionRouterClient {
|
|
|
112
112
|
connect?(): Promise<void>;
|
|
113
113
|
request(frame: Record<string, unknown>, options?: {
|
|
114
114
|
timeoutMs?: number;
|
|
115
|
+
deadline?: number;
|
|
115
116
|
connectedOnly?: boolean;
|
|
116
117
|
/** Synchronous pre-send observer; a throw aborts the dispatch before the wire. */
|
|
117
118
|
beforeDispatch?: (context: SdkDispatchContext) => void;
|
|
@@ -224,6 +225,7 @@ export declare class SessionRouter {
|
|
|
224
225
|
/** Sends an SDK command through the current attachment without exposing its client. */
|
|
225
226
|
request(sessionId: string, frame: Record<string, unknown>, expectedGeneration?: number, expectedAttachment?: SessionAttachment, options?: {
|
|
226
227
|
timeoutMs?: number;
|
|
228
|
+
deadline?: number;
|
|
227
229
|
beforeDispatch?: (context: SdkDispatchContext) => void;
|
|
228
230
|
onDispatch?: SdkDispatchHandler;
|
|
229
231
|
dispatchFence?: (dispatch: () => Promise<Record<string, unknown>>) => Promise<Record<string, unknown>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type SessionListPageRecord = Record<string, unknown>;
|
|
2
2
|
export type SessionListSavedSessionOmissionReason = "scope_unavailable" | "candidate_scan_failed" | "candidate_not_found" | "candidate_ambiguous" | "candidate_invalid" | "identity_incomplete";
|
|
3
|
-
export declare const SESSION_LIST_SAVED_SESSION_OMISSION_DETAIL_CODES: readonly ["cwd_missing", "cwd_not_directory", "identity_unavailable", "network_unsupported", "sessions_root_unavailable", "binding_conflict", "binding_invalid", "migration_busy", "atomic_unavailable", "invalid_request", "durability_failed", "durability_not_provable", "capacity_exceeded", "scan_failed", "unsafe_root", "invalid_candidate", "invalid_header", "unreadable_candidate", "source_changed", "cwd_not_found", "cwd_not_utf8", "cwd_network_unsupported", "cwd_identity_unavailable", "cwd_io_error"];
|
|
3
|
+
export declare const SESSION_LIST_SAVED_SESSION_OMISSION_DETAIL_CODES: readonly ["cwd_missing", "cwd_not_directory", "identity_unavailable", "network_unsupported", "sessions_root_unavailable", "binding_conflict", "binding_invalid", "migration_busy", "managed_gc_journal_capacity_exceeded", "atomic_unavailable", "invalid_request", "durability_failed", "durability_not_provable", "capacity_exceeded", "scan_failed", "unsafe_root", "invalid_candidate", "invalid_header", "unreadable_candidate", "source_changed", "cwd_not_found", "cwd_not_utf8", "cwd_network_unsupported", "cwd_identity_unavailable", "cwd_io_error"];
|
|
4
4
|
export type SessionListSavedSessionOmissionDetailCode = (typeof SESSION_LIST_SAVED_SESSION_OMISSION_DETAIL_CODES)[number];
|
|
5
5
|
/** Path-free diagnostic for a requested managed transcript that could not be selected safely. */
|
|
6
6
|
export interface SessionListSavedSessionOmission {
|
|
@@ -3,6 +3,7 @@ import { type AuthCredentialSelector, type Model, type ProviderSessionState } fr
|
|
|
3
3
|
import { createAppendOnlyContextManager, providerSupportsAppendOnlyAuto, resolveAppendOnlyMode } from "../append-only-mode";
|
|
4
4
|
import { AsyncJobManager } from "../async";
|
|
5
5
|
import { type Rule } from "../capability/rule";
|
|
6
|
+
import type { ModelProfileOwnershipMarker } from "../config/model-profile-ownership";
|
|
6
7
|
import { ModelRegistry } from "../config/model-registry";
|
|
7
8
|
import { type ScopedModelSelection } from "../config/model-resolver";
|
|
8
9
|
import { type PromptTemplate } from "../config/prompt-templates";
|
|
@@ -82,6 +83,8 @@ export interface CreateAgentSessionOptions {
|
|
|
82
83
|
modelPattern?: string;
|
|
83
84
|
/** Active profile inherited by a nested SDK/subagent session. */
|
|
84
85
|
activeModelProfile?: string;
|
|
86
|
+
/** Model profile ownership marker for propagating parent profile ownership to subagent sessions. */
|
|
87
|
+
modelProfileOwnershipMarker?: ModelProfileOwnershipMarker;
|
|
85
88
|
/** Thinking selector. Default: from settings, else unset */
|
|
86
89
|
thinkingLevel?: ThinkingLevel;
|
|
87
90
|
/** Runtime substitution metadata for the initial model_change session event. */
|
|
@@ -194,6 +197,11 @@ export interface CreateAgentSessionOptions {
|
|
|
194
197
|
* @internal lifecycle-only startup guard.
|
|
195
198
|
*/
|
|
196
199
|
deferOptionalModelRefresh?: boolean;
|
|
200
|
+
/**
|
|
201
|
+
* Defer model profile activation until explicit model pin validation occurs.
|
|
202
|
+
* @internal Lifecycle-only: prevents default profile activation before pin resolution.
|
|
203
|
+
*/
|
|
204
|
+
deferModelProfileActivation?: boolean;
|
|
197
205
|
/** Enable LSP integration (tool, formatting, diagnostics, warmup). Default: true */
|
|
198
206
|
enableLsp?: boolean;
|
|
199
207
|
/** Skip Python kernel availability check and prelude warmup */
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* Modes use this class and add their own I/O layer on top.
|
|
14
14
|
*/
|
|
15
|
-
import { type Agent, type AgentContext, type AgentEvent, type AgentLoopConfig, type AgentMessage, type AgentState, type AgentTool, type MidRunMaintenanceOutcome, type RunSettlementProof, type StablePrefixSnapshot, ThinkingLevel } from "@gajae-code/agent-core";
|
|
15
|
+
import { type Agent, type AgentContext, type AgentEvent, type AgentLoopConfig, type AgentMessage, type AgentState, type AgentTerminalOwnerContext, type AgentTool, type MidRunMaintenanceOutcome, type RunCancellationDomain, type RunSettlementProof, type StablePrefixSnapshot, ThinkingLevel } from "@gajae-code/agent-core";
|
|
16
16
|
import type { AttemptScope } from "@gajae-code/agent-core/attempt-scope";
|
|
17
17
|
import { type CompactionResult, type EmergencyCompactionSample } from "@gajae-code/agent-core/compaction";
|
|
18
18
|
import type { AssistantMessage, AttemptScopeRef, Effort, ImageContent, Message, MessageAttribution, Model, ProviderSessionState, ServiceTier, SimpleStreamOptions, TextContent, ToolCall, ToolChoice, Usage, UsageReport } from "@gajae-code/ai/core";
|
|
@@ -68,7 +68,7 @@ export interface ForkContextSeedOptions {
|
|
|
68
68
|
signal?: AbortSignal;
|
|
69
69
|
}
|
|
70
70
|
import type { AuthCredentialSelector } from "@gajae-code/ai/core";
|
|
71
|
-
import { type AsyncJob, type AsyncJobDeliveryState, AsyncJobManager, type FoldReason, type JobFoldEvent } from "../async";
|
|
71
|
+
import { type AsyncJob, type AsyncJobDeliveryState, AsyncJobManager, type FoldReason, type JobFoldEvent, type SubagentLifecycle } from "../async";
|
|
72
72
|
import type { Rule } from "../capability/rule";
|
|
73
73
|
import { type ModelRegistry } from "../config/model-registry";
|
|
74
74
|
import { type ResolvedModelRoleValue, type ScopedModelSelection } from "../config/model-resolver";
|
|
@@ -84,7 +84,7 @@ import type { ExtensionRunner } from "../extensibility/extensions";
|
|
|
84
84
|
import { type CompactOptions, type ContextUsage, type ExtensionTranscriptEntry } from "../extensibility/extensions/types";
|
|
85
85
|
import type { GjcRuntimeSnapshotProvider } from "../extensibility/gjc-plugins/runtime-quarantine";
|
|
86
86
|
import type { SessionSwitchEvent } from "../extensibility/shared-events";
|
|
87
|
-
import { type Skill, type SkillWarning } from "../extensibility/skills";
|
|
87
|
+
import { type ParsedSkillInvocation, type Skill, type SkillWarning } from "../extensibility/skills";
|
|
88
88
|
import { type FileSlashCommand } from "../extensibility/slash-commands";
|
|
89
89
|
import { type MemoryGuardClaimsLease } from "../gjc-runtime/memory-guard-owner-claims";
|
|
90
90
|
import { GoalRuntime } from "../goals/runtime";
|
|
@@ -113,7 +113,7 @@ import { type ContributionPrepOptions, type ContributionPrepResult } from "./con
|
|
|
113
113
|
import { type FoldAdapter, FoldCoordinator, type ForegroundFoldOutcome } from "./fold-coordinator";
|
|
114
114
|
import type { MemoryGuardRestoreResult } from "./memory-guard-checkpoint-participant";
|
|
115
115
|
import { type CustomMessage } from "./messages";
|
|
116
|
-
import type { BranchSummaryEntry, CompactionEntry, NewSessionOptions, PreparedNewSession, RecoveryHydrationContext, RecoveryHydrationPromotionFence, SessionContext, SessionManagerCloseOutcome, SessionMemoryStats } from "./session-manager";
|
|
116
|
+
import type { BranchSummaryEntry, CompactionEntry, NewSessionOptions, PreparedNewSession, RecoveryHydrationContext, RecoveryHydrationPromotionFence, SessionContext, SessionManagerCloseOutcome, SessionMemoryStats, SessionArtifactPublication } from "./session-manager";
|
|
117
117
|
import { SessionManager } from "./session-manager";
|
|
118
118
|
import { ToolChoiceQueue } from "./tool-choice-queue";
|
|
119
119
|
import { YieldQueue } from "./yield-queue";
|
|
@@ -603,11 +603,7 @@ export declare class SessionDisposalIncompleteError extends Error {
|
|
|
603
603
|
constructor(label?: string);
|
|
604
604
|
}
|
|
605
605
|
export declare function isSessionDisposalIncompleteError(error: unknown): error is SessionDisposalIncompleteError;
|
|
606
|
-
export
|
|
607
|
-
saveArtifact(content: string, toolType: string): Promise<string | undefined>;
|
|
608
|
-
getArtifactPath(id: string): Promise<string | null>;
|
|
609
|
-
}
|
|
610
|
-
export declare function saveAgentBashOriginalArtifact(store: AgentBashArtifactStore, originalText: string): Promise<BashArtifactSaveResult>;
|
|
606
|
+
export declare function saveAgentBashOriginalArtifact(publication: SessionArtifactPublication, originalText: string): Promise<BashArtifactSaveResult>;
|
|
611
607
|
type IrcRosterClaim = {
|
|
612
608
|
token: symbol;
|
|
613
609
|
signature: string;
|
|
@@ -854,6 +850,11 @@ export declare class AgentSession {
|
|
|
854
850
|
getAsyncJobSnapshot(options?: {
|
|
855
851
|
recentLimit?: number;
|
|
856
852
|
}): AsyncJobSnapshot | null;
|
|
853
|
+
/**
|
|
854
|
+
* Lifecycle status of every subagent owned by this session, read from the
|
|
855
|
+
* manager's stable control-plane records (they outlive AsyncJob eviction).
|
|
856
|
+
*/
|
|
857
|
+
getSubagentLifecycleStatuses(): SubagentLifecycle[];
|
|
857
858
|
/**
|
|
858
859
|
* Emit a UI-only notice to the session. Surfaces in interactive mode as a
|
|
859
860
|
* `showWarning` / `showError` / `showStatus` line; non-interactive modes
|
|
@@ -1212,6 +1213,20 @@ export declare class AgentSession {
|
|
|
1212
1213
|
* @throws Error if no model selected or no API key available (when not streaming)
|
|
1213
1214
|
*/
|
|
1214
1215
|
prompt(text: string, options?: PromptOptions): Promise<void>;
|
|
1216
|
+
/**
|
|
1217
|
+
* The loaded skill a prompt's text dispatches to, or undefined when `prompt`
|
|
1218
|
+
* would submit it as ordinary text (unknown or disabled `/skill:` names,
|
|
1219
|
+
* chains, or attached images). Single source for dispatch and for callers
|
|
1220
|
+
* that must mirror it, such as startup title seeding.
|
|
1221
|
+
*/
|
|
1222
|
+
resolvePromptSkillInvocation(text: string, images?: readonly unknown[]): ParsedSkillInvocation | undefined;
|
|
1223
|
+
/**
|
|
1224
|
+
* Whether `prompt` intercepts this slash text as an extension or custom/MCP
|
|
1225
|
+
* command. Used to keep command arguments away from the title model. Mirrors the
|
|
1226
|
+
* command lookup in `#tryExecuteExtensionCommand` / `#tryExecuteCustomCommand`
|
|
1227
|
+
* without executing anything.
|
|
1228
|
+
*/
|
|
1229
|
+
isLocallyHandledSlashCommand(text: string): boolean;
|
|
1215
1230
|
promptCustomMessage<T = unknown>(message: Pick<CustomMessage<T>, "customType" | "content" | "display" | "details" | "attribution">, options?: Pick<PromptOptions, "streamingBehavior" | "toolChoice" | "followUpQueuePolicy" | "steerQueuePolicy" | "onPreflightAccepted" | "onPreflightAcceptCommit" | "preflightSignal" | "sdkRunCapability">): Promise<void>;
|
|
1216
1231
|
/**
|
|
1217
1232
|
* Queue a steering message to interrupt the agent mid-run.
|
|
@@ -1397,6 +1412,8 @@ export declare class AgentSession {
|
|
|
1397
1412
|
rebindTerminalAbortSteeringSnapshot(token: number): void;
|
|
1398
1413
|
discardTerminalAbortSteeringSnapshot(token: number): void;
|
|
1399
1414
|
getTerminalTurnEpoch(): number | undefined;
|
|
1415
|
+
getTerminalRunOwnerForEvent(event: object): AgentTerminalOwnerContext | undefined;
|
|
1416
|
+
getRunOwnerDomain(handle: string): RunCancellationDomain | undefined;
|
|
1400
1417
|
/**
|
|
1401
1418
|
* Tool call ids the run resource ledger currently holds for `handle` (#5637).
|
|
1402
1419
|
*
|
|
@@ -1464,6 +1481,17 @@ export declare class AgentSession {
|
|
|
1464
1481
|
}): Promise<void>;
|
|
1465
1482
|
setActiveModelProfile(name: string | undefined): void;
|
|
1466
1483
|
getActiveModelProfile(): string | undefined;
|
|
1484
|
+
setUnavailableModelProfile(name: string | undefined): void;
|
|
1485
|
+
getUnavailableModelProfile(): string | undefined;
|
|
1486
|
+
/** Revision fence for deferred activation after a user model selection. */
|
|
1487
|
+
getUserModelSelectionRevision(): number;
|
|
1488
|
+
/** Latest concrete user choice that seeded or cleared the session's sticky canonical variant. */
|
|
1489
|
+
getUserCanonicalVariantSelection(): {
|
|
1490
|
+
revision: number;
|
|
1491
|
+
canonicalVariant: string | undefined;
|
|
1492
|
+
};
|
|
1493
|
+
/** Fence deferred startup profile recovery before an explicit control-surface selection. */
|
|
1494
|
+
markUserModelSelection(): void;
|
|
1467
1495
|
/**
|
|
1468
1496
|
* Re-apply vendor-separated delegation after a profile activation changed the
|
|
1469
1497
|
* role layer. `eagerTasks` is resolved at prompt build time, but under
|
|
@@ -1597,6 +1625,7 @@ export declare class AgentSession {
|
|
|
1597
1625
|
reason?: TemporaryModelReason;
|
|
1598
1626
|
providerSessionScope?: TemporaryProviderSessionScope;
|
|
1599
1627
|
signal?: AbortSignal;
|
|
1628
|
+
shouldMutate?: () => boolean;
|
|
1600
1629
|
onMutationStarted?: () => void;
|
|
1601
1630
|
}): Promise<TemporaryProviderSessionScope | void>;
|
|
1602
1631
|
/** Restore the exact live-model state captured before a failed selector transaction. */
|
|
@@ -77,8 +77,8 @@ export declare class ArtifactManager {
|
|
|
77
77
|
* Best-effort removal of a previously published named artifact. Used to roll
|
|
78
78
|
* back staged publications when a transactional operation (e.g. gated
|
|
79
79
|
* maintenance pruning) is rejected after publication succeeded. Returns false
|
|
80
|
-
* when the artifact could not be removed
|
|
81
|
-
*
|
|
80
|
+
* when the exact named artifact is absent or could not be removed; success does
|
|
81
|
+
* not claim that unrelated native cleanup residue was reclaimed.
|
|
82
82
|
*/
|
|
83
83
|
removeNamedBestEffort(filename: string): Promise<boolean>;
|
|
84
84
|
/**
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { SessionStorageFileIdentity } from "../session-storage";
|
|
2
|
+
import { type TaskArtifactOwnerDeletionEvidence, type TaskArtifactOwnerLocator, type TaskArtifactOwnerRetirementContinuation, type TaskArtifactOwnerRetirementOutcome, type TaskArtifactOwnerStorageContext } from "../task-artifact-owner-codec";
|
|
3
|
+
export type ManagedGcSessionRetirementState = "prepared" | "artifacts_removed" | "owner_pending" | "owner_retired";
|
|
4
|
+
export interface ManagedGcSessionRetirementTarget {
|
|
5
|
+
readonly transcriptPath: string;
|
|
6
|
+
readonly sessionId: string;
|
|
7
|
+
readonly cwd: string;
|
|
8
|
+
readonly transcriptIdentity: SessionStorageFileIdentity;
|
|
9
|
+
readonly taskArtifactOwnerLocator: TaskArtifactOwnerLocator;
|
|
10
|
+
}
|
|
11
|
+
export interface ManagedGcSessionRetirementReceipt extends ManagedGcSessionRetirementTarget {
|
|
12
|
+
readonly state: ManagedGcSessionRetirementState;
|
|
13
|
+
readonly taskArtifactOwnerDeletionEvidence: TaskArtifactOwnerDeletionEvidence;
|
|
14
|
+
readonly artifactsRemoved?: true;
|
|
15
|
+
readonly ownerRetirementAttempt?: number;
|
|
16
|
+
readonly taskArtifactOwnerRetirementOutcome?: TaskArtifactOwnerRetirementOutcome;
|
|
17
|
+
readonly taskArtifactOwnerRetirementContinuation?: TaskArtifactOwnerRetirementContinuation;
|
|
18
|
+
readonly taskArtifactOwnerPayloadRetired?: true;
|
|
19
|
+
readonly taskArtifactOwnerNamespaceRetained?: true;
|
|
20
|
+
readonly taskArtifactOwnerRetired?: true;
|
|
21
|
+
}
|
|
22
|
+
export declare function managedGcRetirementIdentityRecord(identity: SessionStorageFileIdentity): Record<string, unknown>;
|
|
23
|
+
export declare function sameIdentity(left: SessionStorageFileIdentity, right: SessionStorageFileIdentity): boolean;
|
|
24
|
+
export declare function managedGcRetirementIdentityValue(value: unknown): SessionStorageFileIdentity;
|
|
25
|
+
/**
|
|
26
|
+
* Strictly decode one persisted managed-GC receipt. A decoded `owner_retired` outcome is persisted DTO data only;
|
|
27
|
+
* this pure parser does not verify current filesystem state, payload destruction, or writer quiescence. A future
|
|
28
|
+
* journal reader must perform the live physical-retirement proof for the relevant state before treating it as done.
|
|
29
|
+
*/
|
|
30
|
+
export declare function parseManagedGcRetirementReceipt(value: unknown, scopeDigest: string, ownerContext: TaskArtifactOwnerStorageContext, target: ManagedGcSessionRetirementTarget): ManagedGcSessionRetirementReceipt;
|
|
31
|
+
/** Check only monotone DTO history; this does not establish physical cleanup or current authority. */
|
|
32
|
+
export declare function continuationExtendsPrevious(previous: TaskArtifactOwnerRetirementContinuation, next: TaskArtifactOwnerRetirementContinuation): boolean;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { RecoveryFsRoot } from "@gajae-code/natives";
|
|
2
2
|
import type { ResumeSessionIdentity } from "../session-manager";
|
|
3
3
|
import { type NativeDirectoryTreeSnapshot } from "../session-storage";
|
|
4
|
+
import { type TaskArtifactOwnerStorageContext } from "../task-artifact-owner-codec";
|
|
5
|
+
import { type ManagedGcSessionRetirementReceipt, type ManagedGcSessionRetirementTarget } from "./managed-gc-retirement-codec";
|
|
4
6
|
import { type ManagedDirectoryRoot, type ManagedSessionSecurityPolicy, type ManagedStorageLock } from "./managed-session-storage";
|
|
5
7
|
export declare const MANAGED_SESSION_LAYOUT_VERSION: 2;
|
|
6
8
|
export declare const MANAGED_SESSION_IDENTITY_VERSION: 1;
|
|
@@ -17,6 +19,57 @@ export interface ManagedScope {
|
|
|
17
19
|
directoryPath: string;
|
|
18
20
|
platform: "posix" | "win32";
|
|
19
21
|
}
|
|
22
|
+
export interface ManagedGcProtocolPathIdentity {
|
|
23
|
+
readonly path: string;
|
|
24
|
+
readonly dev: string;
|
|
25
|
+
readonly ino: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ManagedGcProtocolFileSnapshot {
|
|
28
|
+
readonly name: string;
|
|
29
|
+
readonly dev: string;
|
|
30
|
+
readonly ino: string;
|
|
31
|
+
readonly nlink: string;
|
|
32
|
+
readonly size: number;
|
|
33
|
+
readonly mtimeNs: string;
|
|
34
|
+
readonly ctimeNs: string;
|
|
35
|
+
readonly mode: number;
|
|
36
|
+
readonly sha256: string;
|
|
37
|
+
}
|
|
38
|
+
export type ManagedGcProtocolRole = "locks" | "receipts" | "tombstones";
|
|
39
|
+
export interface ManagedGcProtocolDirectorySnapshot {
|
|
40
|
+
readonly role: ManagedGcProtocolRole;
|
|
41
|
+
readonly path: string;
|
|
42
|
+
readonly dev: string;
|
|
43
|
+
readonly ino: string;
|
|
44
|
+
readonly mtimeNs: string;
|
|
45
|
+
readonly ctimeNs: string;
|
|
46
|
+
readonly mode: number;
|
|
47
|
+
readonly files: readonly ManagedGcProtocolFileSnapshot[];
|
|
48
|
+
}
|
|
49
|
+
/** Read-only protocol data; never a deletion capability. */
|
|
50
|
+
export interface ManagedGcProtocolScopeSnapshot {
|
|
51
|
+
readonly configuredRoot: ManagedGcProtocolPathIdentity;
|
|
52
|
+
readonly profile: ManagedGcProtocolPathIdentity;
|
|
53
|
+
readonly sessionsRoot: ManagedGcProtocolPathIdentity;
|
|
54
|
+
readonly scope: ManagedGcProtocolPathIdentity;
|
|
55
|
+
readonly binding: ManagedGcProtocolFileSnapshot;
|
|
56
|
+
readonly protocol: ManagedGcProtocolPathIdentity;
|
|
57
|
+
readonly protocolMtimeNs: string;
|
|
58
|
+
readonly protocolCtimeNs: string;
|
|
59
|
+
readonly protocolMode: number;
|
|
60
|
+
readonly directories: readonly ManagedGcProtocolDirectorySnapshot[];
|
|
61
|
+
}
|
|
62
|
+
export interface ManagedGcProtocolScopeInput {
|
|
63
|
+
readonly scopePath: string;
|
|
64
|
+
readonly scopeIdentity: ManagedGcProtocolPathIdentity;
|
|
65
|
+
readonly bindingIdentity: ManagedGcProtocolFileSnapshot;
|
|
66
|
+
readonly protocolIdentity: ManagedGcProtocolScopeSnapshot["protocol"] & {
|
|
67
|
+
readonly mtimeNs: string;
|
|
68
|
+
readonly ctimeNs: string;
|
|
69
|
+
readonly mode: number;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
export type ManagedGcProtocolScopeInspector = (inputs: readonly ManagedGcProtocolScopeInput[]) => Promise<readonly ManagedGcProtocolScopeSnapshot[]>;
|
|
20
73
|
/**
|
|
21
74
|
* Opaque managed writer authority captured by a trusted destination. The open
|
|
22
75
|
* transaction must use this authority rather than reacquiring its root from a
|
|
@@ -34,7 +87,7 @@ export declare function managedDirectoryIdentityForScope(scope: ManagedScope): {
|
|
|
34
87
|
};
|
|
35
88
|
export declare function managedRootForScope(scope: ManagedScope): ManagedDirectoryRoot;
|
|
36
89
|
export type ManagedMigrationPolicy = "copy-retain" | "disabled";
|
|
37
|
-
export type ManagedScopeErrorCode = "cwd_missing" | "cwd_not_directory" | "identity_unavailable" | "network_unsupported" | "sessions_root_unavailable" | "binding_conflict" | "binding_invalid" | "migration_busy" | "atomic_unavailable" | "invalid_request" | "durability_failed" | "durability_not_provable" | "capacity_exceeded";
|
|
90
|
+
export type ManagedScopeErrorCode = "cwd_missing" | "cwd_not_directory" | "identity_unavailable" | "network_unsupported" | "sessions_root_unavailable" | "binding_conflict" | "binding_invalid" | "migration_busy" | "managed_gc_journal_capacity_exceeded" | "atomic_unavailable" | "invalid_request" | "durability_failed" | "durability_not_provable" | "capacity_exceeded";
|
|
38
91
|
export type ManagedScopeResolution = {
|
|
39
92
|
kind: "resolved";
|
|
40
93
|
scope: ManagedScope;
|
|
@@ -69,7 +122,7 @@ export type ManagedCandidateListing = {
|
|
|
69
122
|
code: "scan_failed" | "unsafe_root" | "invalid_candidate";
|
|
70
123
|
message: string;
|
|
71
124
|
};
|
|
72
|
-
export type ManagedOpenFailure = "migration_busy" | "binding_conflict" | "binding_invalid" | "destination_conflict" | "source_changed" | "unsafe_artifacts" | "artifact_capacity_exceeded" | "durability_failed" | "atomic_unavailable" | "invalid_request" | "durability_not_provable" | "migration_retired" | "legacy_migration_disabled" | "managed_storage_unsupported";
|
|
125
|
+
export type ManagedOpenFailure = "migration_busy" | "binding_conflict" | "binding_invalid" | "destination_conflict" | "source_changed" | "unsafe_artifacts" | "artifact_capacity_exceeded" | "managed_gc_journal_capacity_exceeded" | "durability_failed" | "atomic_unavailable" | "invalid_request" | "durability_not_provable" | "migration_retired" | "legacy_migration_disabled" | "managed_storage_unsupported";
|
|
73
126
|
export type ManagedOpenCandidateResult = {
|
|
74
127
|
kind: "opened";
|
|
75
128
|
path: string;
|
|
@@ -132,6 +185,8 @@ interface ManagedScopeInput {
|
|
|
132
185
|
export declare function resolveManagedScope(input: ManagedScopeInput): ManagedScopeResolution;
|
|
133
186
|
/** Resolve a scope for a synchronous write without mutating an existing ACL mismatch. */
|
|
134
187
|
export declare function resolveManagedScopeForWrite(input: ManagedScopeInput): ManagedScopeResolution;
|
|
188
|
+
/** Resolve only an existing, authenticated v2 scope; this path never initializes or repairs storage. */
|
|
189
|
+
export declare function resolveManagedGcScopeForRead(input: ManagedScopeInput): ManagedScopeResolution;
|
|
135
190
|
export declare function canonicalBindingOpenFlags(platform?: NodeJS.Platform): number;
|
|
136
191
|
export declare function fsyncCanonicalBinding(bindingPath: string, expected: string): void;
|
|
137
192
|
export declare function ensureManagedScope(scope: ManagedScope, policy?: ManagedSessionSecurityPolicy): Promise<ManagedScopeResolution>;
|
|
@@ -201,6 +256,28 @@ export declare function isRecoverableOwnerOnlyModeDrift(error: unknown): boolean
|
|
|
201
256
|
/** Synchronously create and validate the v2 binding before a default session writer exists. */
|
|
202
257
|
export declare function prepareManagedSessionScopeForWriteSync(scope: ManagedScope, policy?: ManagedSessionSecurityPolicy, authority?: ManagedCandidateWriteAuthority): ManagedScopeResolution;
|
|
203
258
|
export declare function listManagedCandidates(scope: ManagedScope): ManagedCandidateListing;
|
|
259
|
+
/** Build owner-storage authority only from a previously prepared trusted managed scope. */
|
|
260
|
+
export declare function taskArtifactOwnerStorageContextForScope(scope: ManagedScope): TaskArtifactOwnerStorageContext;
|
|
261
|
+
/** Bind the first transcript header through FileSessionStorage's descriptor-bound, no-follow snapshot. */
|
|
262
|
+
export declare function bindManagedGcSessionRetirementTarget(scope: ManagedScope, transcriptPathValue: string): ManagedGcSessionRetirementTarget;
|
|
263
|
+
/** Read the prepared authority first, then strictly validate every later receipt against it. */
|
|
264
|
+
export declare function readManagedGcSessionRetirementReceipt(scope: ManagedScope, transcriptPath: string): Promise<ManagedGcSessionRetirementReceipt | undefined>;
|
|
265
|
+
/** Read an authenticated journal without creating lock/receipt directories or repairing security state. */
|
|
266
|
+
export declare function readManagedGcSessionRetirementReceiptReadOnly(scope: ManagedScope, transcriptPath: string): Promise<ManagedGcSessionRetirementReceipt | undefined>;
|
|
267
|
+
/** Discover complete owner journals under authenticated existing v2 scopes without initializing storage. */
|
|
268
|
+
export declare function discoverManagedGcSessionRetirementReceipts(input: {
|
|
269
|
+
agentDir: string;
|
|
270
|
+
sessionsRoot: string;
|
|
271
|
+
}): Promise<readonly {
|
|
272
|
+
readonly scope: ManagedScope;
|
|
273
|
+
readonly receipt: ManagedGcSessionRetirementReceipt;
|
|
274
|
+
}[]>;
|
|
275
|
+
/** Inspect under a live operation lease; returned snapshots never authorize effects. */
|
|
276
|
+
export declare function managedGcProtocolInspectorForLock(scope: ManagedScope, lock: ManagedStorageLock): ManagedGcProtocolScopeInspector;
|
|
277
|
+
/** Bind a read-only protocol inventory to an already prepared scope's root/profile/session identities. */
|
|
278
|
+
export declare function managedGcProtocolScopeInspectorForScope(scope: ManagedScope): ManagedGcProtocolScopeInspector;
|
|
279
|
+
/** Atomically publish one journal state under the managed scope lock; no GC effects are activated here. */
|
|
280
|
+
export declare function publishManagedGcSessionRetirementReceipt(scope: ManagedScope, receipt: ManagedGcSessionRetirementReceipt): Promise<ManagedGcSessionRetirementReceipt>;
|
|
204
281
|
export declare function artifactTreeReplayCompatible(observed: NativeDirectoryTreeSnapshot, expected: NativeDirectoryTreeSnapshot): boolean;
|
|
205
282
|
type DetachedArtifactRoot = {
|
|
206
283
|
originalPath: string;
|
|
@@ -5,6 +5,7 @@ export declare const MANAGED_ARTIFACT_MAX_DEPTH = 32;
|
|
|
5
5
|
export declare const MANAGED_ARTIFACT_MAX_FILES = 50000;
|
|
6
6
|
export declare const MANAGED_ARTIFACT_MAX_FILE_BYTES: number;
|
|
7
7
|
export declare const MANAGED_ARTIFACT_MAX_TOTAL_BYTES: number;
|
|
8
|
+
export declare const MANAGED_SESSION_READ_RANGE_MAX_BYTES: number;
|
|
8
9
|
export declare const MANAGED_ARTIFACT_COPY_BATCH_SIZE = 256;
|
|
9
10
|
/** A pre-mutation append fence rejection: no bytes from this append were written. */
|
|
10
11
|
export declare class ManagedAppendIdentityMismatchError extends Error {
|
|
@@ -104,6 +105,8 @@ export interface ManagedBoundedAppendExpectation {
|
|
|
104
105
|
readonly ctimeNs: string;
|
|
105
106
|
readonly sha256: string;
|
|
106
107
|
}
|
|
108
|
+
/** Exact quarantine names used when native exact-unlink leaves a scrubbed lock inode. */
|
|
109
|
+
export declare function isManagedLockQuarantineName(name: string): boolean;
|
|
107
110
|
export interface ScrubbedProtocolRemnantReapResult {
|
|
108
111
|
readonly reaped: number;
|
|
109
112
|
readonly failures: number;
|
|
@@ -135,6 +138,16 @@ export declare function reapScrubbedProtocolRemnantsSync(directory: string, minA
|
|
|
135
138
|
*/
|
|
136
139
|
export declare function reapScrubbedProtocolRemnants(directory: string, minAgeMs?: number): Promise<ScrubbedProtocolRemnantReapResult>;
|
|
137
140
|
export declare function validateNativeSecurityResult(value: unknown, operation: "apply" | "verify", kind: "directory" | "file"): NativeOwnerOnlySecurityResult;
|
|
141
|
+
export type LockRecord = {
|
|
142
|
+
attemptId: string;
|
|
143
|
+
pid: number;
|
|
144
|
+
bootId?: string;
|
|
145
|
+
processStartId: string;
|
|
146
|
+
createdAt: number;
|
|
147
|
+
heartbeatAt: number;
|
|
148
|
+
leaseExpiresAt: number;
|
|
149
|
+
released?: boolean;
|
|
150
|
+
};
|
|
138
151
|
export interface ManagedLockRetirementTestEvent {
|
|
139
152
|
readonly path: string;
|
|
140
153
|
readonly attemptId: string;
|
|
@@ -168,13 +181,18 @@ export declare function retainManagedDirectoryAuthority(root: ManagedDirectoryRo
|
|
|
168
181
|
}): RecoveryFsRoot | undefined;
|
|
169
182
|
export declare function assertManagedDirectoryRoot(root: ManagedDirectoryRoot): void;
|
|
170
183
|
export declare function managedSecurityFailureClassification(error: unknown): string | undefined;
|
|
184
|
+
/** Exact, identity-bound read access retained for the lifetime of one managed stream. */
|
|
185
|
+
export interface ManagedSessionReadLease {
|
|
186
|
+
readRange(start: number, length: number): Uint8Array;
|
|
187
|
+
close(): void;
|
|
188
|
+
}
|
|
171
189
|
/** Internal retained-root capability for one managed descendant subtree. */
|
|
172
190
|
export declare class ManagedSessionDescendantStore {
|
|
173
191
|
#private;
|
|
174
192
|
constructor(root: ManagedDirectoryRoot, baseDir: string, retained?: {
|
|
175
193
|
authority: RecoveryFsRoot;
|
|
176
194
|
authorityBaseDir: string;
|
|
177
|
-
}, policy?: ManagedSessionSecurityPolicy, profileAgentDir?: string, expectedSubtreeRoot?: ManagedDirectoryRoot);
|
|
195
|
+
}, policy?: ManagedSessionSecurityPolicy, profileAgentDir?: string, expectedSubtreeRoot?: ManagedDirectoryRoot, access?: "read-only" | "read-write");
|
|
178
196
|
get dir(): string;
|
|
179
197
|
get rootAuthority(): ManagedDirectoryRoot;
|
|
180
198
|
get subtreeRootAuthority(): ManagedDirectoryRoot;
|
|
@@ -223,8 +241,12 @@ export declare class ManagedSessionDescendantStore {
|
|
|
223
241
|
* managed-session indexing without weakening pathname authority.
|
|
224
242
|
*/
|
|
225
243
|
readRangeExpectedSync(relativePath: string, start: number, length: number, expectedDescriptor?: Pick<SessionStorageStat, "dev" | "ino" | "nlink" | "size" | "mtimeNs" | "ctimeNs">): SessionStorageRangeSnapshot;
|
|
244
|
+
/** Open an identity-bound stream lease; Darwin uses exact bounded range reads per chunk. */
|
|
245
|
+
openReadLease(relativePath: string, expectedDescriptor: Pick<SessionStorageStat, "dev" | "ino" | "nlink" | "size" | "mtimeNs" | "ctimeNs">): ManagedSessionReadLease;
|
|
226
246
|
/** Read an exact managed file without exposing its pathname as authority. */
|
|
227
247
|
readExpected(relativePath: string): ManagedFileSnapshot | null;
|
|
248
|
+
/** Read one complete managed file through retained authority after descriptor-size admission. */
|
|
249
|
+
readExpectedBounded(relativePath: string, maxBytes: number, admitSize?: (size: number, descriptor: ManagedFileIdentity) => void): ManagedFileSnapshot | null;
|
|
228
250
|
/** Remove an exact captured file without reopening its pathname as authority. */
|
|
229
251
|
removeExpected(relativePath: string, expected: ManagedFileSnapshot): void;
|
|
230
252
|
/** Remove one exact file without allocating its contents. */
|
|
@@ -253,10 +275,13 @@ export declare class ManagedSessionDescendantStore {
|
|
|
253
275
|
fsyncTree(): NativeDirectoryTreeSnapshot;
|
|
254
276
|
}
|
|
255
277
|
export declare function shouldFsyncManagedDirectory(platform?: NodeJS.Platform): boolean;
|
|
278
|
+
export declare function parseManagedLockRecord(bytes: Uint8Array): LockRecord | undefined;
|
|
256
279
|
/** Create a managed directory and fail closed unless its owner-only mode/ACL verifies. */
|
|
257
280
|
export declare function ensureManagedDirectory(pathname: string, root?: ManagedDirectoryRoot, policy?: ManagedSessionSecurityPolicy): void;
|
|
258
281
|
/** Captures a bounded prefix from one no-follow descriptor and rechecks the pathname before use. */
|
|
259
282
|
export declare function captureManagedFilePrefixNoFollow(pathname: string, maxBytes: number): ManagedFileSnapshot;
|
|
283
|
+
/** Captures a complete no-follow file only after descriptor-size admission and before allocating its bytes. */
|
|
284
|
+
export declare function captureManagedFileNoFollowBounded(pathname: string, maxBytes: number, admitSize?: (size: number, descriptor: ManagedFileIdentity) => void): ManagedFileSnapshot;
|
|
260
285
|
/** Captures header/hash/copy input from one no-follow descriptor and rechecks the pathname before use. */
|
|
261
286
|
export declare function captureManagedFileNoFollow(pathname: string): ManagedFileSnapshot;
|
|
262
287
|
/** Streams a managed file once while retaining only a bounded header prefix and the full descriptor-bound digest. */
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { ResumeSessionIdentity } from "../session-manager";
|
|
2
|
+
import { type VerifiedSessionDeleteResult, type VerifiedSessionDeleteTarget } from "../session-storage";
|
|
3
|
+
import type { TaskArtifactOwnerDeletionEvidence, TaskArtifactOwnerStorageContext } from "../task-artifact-owner-codec";
|
|
4
|
+
import type { ManagedGcSessionRetirementReceipt, ManagedGcSessionRetirementTarget } from "./managed-gc-retirement-codec";
|
|
5
|
+
import type { ManagedGcProtocolScopeInspector } from "./managed-session-scope";
|
|
6
|
+
export interface ManagedGcOwnerCleanupTarget {
|
|
7
|
+
readonly path: string;
|
|
8
|
+
readonly sessionId: string;
|
|
9
|
+
readonly cwd: string;
|
|
10
|
+
readonly identity: ResumeSessionIdentity;
|
|
11
|
+
readonly taskArtifactOwnerDeletionEvidence?: TaskArtifactOwnerDeletionEvidence;
|
|
12
|
+
}
|
|
13
|
+
/** Authenticated receipt operations and fencing supplied by the prepared managed scope. */
|
|
14
|
+
export interface ManagedGcOwnerCleanupAuthority {
|
|
15
|
+
readonly agentDir: string;
|
|
16
|
+
readonly sessionsRoot: string;
|
|
17
|
+
readonly directoryPath: string;
|
|
18
|
+
readonly storageContext: TaskArtifactOwnerStorageContext;
|
|
19
|
+
readonly inspectProtocol: ManagedGcProtocolScopeInspector;
|
|
20
|
+
readonly assertOwned: () => void;
|
|
21
|
+
readonly bindTarget: (transcriptPath: string) => ManagedGcSessionRetirementTarget;
|
|
22
|
+
readonly readReceipt: (transcriptPath: string) => Promise<ManagedGcSessionRetirementReceipt | undefined>;
|
|
23
|
+
readonly publishReceipt: (receipt: ManagedGcSessionRetirementReceipt) => Promise<ManagedGcSessionRetirementReceipt>;
|
|
24
|
+
readonly findCompletedRetirement: (evidence: TaskArtifactOwnerDeletionEvidence, exceptTranscriptPath: string) => Promise<{
|
|
25
|
+
scope: {
|
|
26
|
+
readonly agentDir: string;
|
|
27
|
+
readonly sessionsRoot: string;
|
|
28
|
+
readonly directoryPath: string;
|
|
29
|
+
};
|
|
30
|
+
receipt: ManagedGcSessionRetirementReceipt;
|
|
31
|
+
} | undefined>;
|
|
32
|
+
}
|
|
33
|
+
export type ManagedGcOwnerProgress = {
|
|
34
|
+
readonly state: "none" | "owner_retired" | "payload_retired" | "pending";
|
|
35
|
+
readonly message?: string;
|
|
36
|
+
};
|
|
37
|
+
export type ManagedGcOwnerDeleteFields = Pick<VerifiedSessionDeleteTarget, "taskArtifactOwnerStorageContext" | "taskArtifactOwnerDeletionEvidence" | "taskArtifactOwnerRetirementOutcome" | "taskArtifactOwnerRetirementContinuation" | "taskArtifactOwnerPayloadRetired" | "taskArtifactOwnerNamespaceRetained" | "deferTaskArtifactOwnerRetirement" | "taskArtifactOwnerRetired">;
|
|
38
|
+
export declare function hasUnsupportedLegacyOwnerTarget(scopeDirectory: string, target: ManagedGcOwnerCleanupTarget): boolean;
|
|
39
|
+
export declare function prepareManagedGcOwnerTarget<T extends ManagedGcOwnerCleanupTarget>(authority: ManagedGcOwnerCleanupAuthority, target: T): Promise<T & ManagedGcOwnerCleanupTarget>;
|
|
40
|
+
export declare function prepareManagedGcOwnerTargets<T extends ManagedGcOwnerCleanupTarget>(authority: ManagedGcOwnerCleanupAuthority, targets: readonly T[]): Promise<(T & ManagedGcOwnerCleanupTarget)[]>;
|
|
41
|
+
export declare function managedGcOwnerDeleteFields(authority: ManagedGcOwnerCleanupAuthority, target: ManagedGcOwnerCleanupTarget): Promise<ManagedGcOwnerDeleteFields>;
|
|
42
|
+
export declare function publishManagedGcArtifactsRemoved(authority: ManagedGcOwnerCleanupAuthority, target: ManagedGcOwnerCleanupTarget): Promise<ManagedGcSessionRetirementReceipt | undefined>;
|
|
43
|
+
export declare function retireManagedGcOwnerAfterArtifacts(authority: ManagedGcOwnerCleanupAuthority, target: ManagedGcOwnerCleanupTarget, tombstoneTargets: readonly ManagedGcOwnerCleanupTarget[]): Promise<ManagedGcOwnerProgress>;
|
|
44
|
+
export declare function persistManagedGcStorageOwnerDisposition(authority: ManagedGcOwnerCleanupAuthority, target: ManagedGcOwnerCleanupTarget, deletion: Extract<VerifiedSessionDeleteResult, {
|
|
45
|
+
kind: "cleanup_pending";
|
|
46
|
+
phase: "task_artifact_owner";
|
|
47
|
+
}>): Promise<ManagedGcOwnerProgress>;
|
|
48
|
+
export declare function managedGcOwnerProgressBeforeDelete(authority: ManagedGcOwnerCleanupAuthority, target: ManagedGcOwnerCleanupTarget, tombstoneTargets: readonly ManagedGcOwnerCleanupTarget[], artifactsRemoved: boolean): Promise<ManagedGcOwnerProgress>;
|
|
49
|
+
export declare function taskArtifactOwnerTranscriptResult(authority: ManagedGcOwnerCleanupAuthority, target: ManagedGcOwnerCleanupTarget): Promise<"none" | "retired" | "payload_retired">;
|
|
50
|
+
export interface ManagedGcOwnerTranscriptDeleteReceipt {
|
|
51
|
+
readonly taskArtifactOwnerTranscriptDeleted?: true;
|
|
52
|
+
}
|
|
53
|
+
export declare function persistManagedGcOwnerTranscriptDeletion<T extends ManagedGcOwnerTranscriptDeleteReceipt>(input: {
|
|
54
|
+
target: ManagedGcOwnerCleanupTarget;
|
|
55
|
+
fallback: T;
|
|
56
|
+
deletion: Extract<VerifiedSessionDeleteResult, {
|
|
57
|
+
kind: "deleted";
|
|
58
|
+
}>;
|
|
59
|
+
readLatest: () => T | undefined;
|
|
60
|
+
nextReceipt: (latest: T) => T;
|
|
61
|
+
publishPending: (receipt: T) => Promise<void>;
|
|
62
|
+
}): Promise<void>;
|
|
@@ -5,6 +5,8 @@ export interface OwnerManifest extends TaskArtifactOwnerLocator {
|
|
|
5
5
|
readonly sessionId: string;
|
|
6
6
|
}
|
|
7
7
|
export declare function newSessionRootStore(context: TaskArtifactOwnerStorageContext): ManagedSessionDescendantStore;
|
|
8
|
+
/** Path-backed reader with no retained or recovery-mutable native authority. */
|
|
9
|
+
export declare function newSessionRootReaderStore(context: TaskArtifactOwnerStorageContext): ManagedSessionDescendantStore;
|
|
8
10
|
export declare function readOwnerManifest(store: ManagedSessionDescendantStore, locator: TaskArtifactOwnerLocator, relativePath?: string): OwnerManifest;
|
|
9
11
|
export declare function assertOwnerDirectoryExists(context: TaskArtifactOwnerStorageContext, ownerId: string): void;
|
|
10
12
|
export declare function assertOwnerIdentity(store: ManagedSessionDescendantStore, locator: TaskArtifactOwnerLocator): void;
|