@phyzess/pappra 0.1.0-beta.13 → 0.1.0-beta.18
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/README.md +134 -15
- package/assets/integrations/skills/pappra/SKILL.md +28 -7
- package/assets/integrations/skills/pappra/references/collaboration.md +633 -0
- package/assets/integrations/skills/pappra/references/environment.md +360 -0
- package/assets/integrations/skills/pappra/references/hosts.md +20 -0
- package/assets/integrations/skills/pappra/references/operations.md +36 -5
- package/dist/adapters/pi/recovery-extension.d.ts +65 -0
- package/dist/adapters/pi/recovery-extension.js +238 -0
- package/dist/adapters/pi/session-transition-extension.d.ts +30 -0
- package/dist/adapters/pi/session-transition-extension.js +265 -0
- package/dist/app/automatic-handoff-events.d.ts +26 -0
- package/dist/app/automatic-handoff-events.js +134 -0
- package/dist/app/bounded-file.d.ts +2 -0
- package/dist/app/bounded-file.js +2 -0
- package/dist/app/capability-evidence/claude.d.ts +37 -0
- package/dist/app/capability-evidence/claude.js +206 -0
- package/dist/app/capability-evidence/codex.d.ts +35 -0
- package/dist/app/capability-evidence/codex.js +193 -0
- package/dist/app/capability-evidence/index.d.ts +33 -0
- package/dist/app/capability-evidence/index.js +117 -0
- package/dist/app/capability-evidence/pi.d.ts +73 -0
- package/dist/app/capability-evidence/pi.js +669 -0
- package/dist/app/capability-evidence/shared.d.ts +69 -0
- package/dist/app/capability-evidence/shared.js +195 -0
- package/dist/app/collab-auto-handoff.d.ts +55 -0
- package/dist/app/collab-auto-handoff.js +384 -0
- package/dist/app/collab-bindings.d.ts +57 -0
- package/dist/app/collab-bindings.js +1006 -0
- package/dist/app/collab-bootstrap-transport.d.ts +163 -0
- package/dist/app/collab-bootstrap-transport.js +769 -0
- package/dist/app/collab-bootstrap.d.ts +137 -0
- package/dist/app/collab-bootstrap.js +3455 -0
- package/dist/app/collab-handoff.d.ts +12 -0
- package/dist/app/collab-handoff.js +511 -0
- package/dist/app/collab-messages.d.ts +2 -0
- package/dist/app/collab-messages.js +2 -0
- package/dist/app/collab-notify.d.ts +156 -0
- package/dist/app/collab-notify.js +1208 -0
- package/dist/app/collab-preflight.d.ts +34 -0
- package/dist/app/collab-preflight.js +96 -0
- package/dist/app/collab-recovery-executor.d.ts +161 -0
- package/dist/app/collab-recovery-executor.js +1153 -0
- package/dist/app/collab-recovery-projection.d.ts +103 -0
- package/dist/app/collab-recovery-projection.js +659 -0
- package/dist/app/collab-recovery.d.ts +25 -0
- package/dist/app/collab-recovery.js +429 -0
- package/dist/app/collab-resources.d.ts +16 -0
- package/dist/app/collab-resources.js +278 -0
- package/dist/app/collab-role-events.d.ts +22 -0
- package/dist/app/collab-role-events.js +329 -0
- package/dist/app/collab-role-orchestration.d.ts +53 -0
- package/dist/app/collab-role-orchestration.js +601 -0
- package/dist/app/collab-role-plan.d.ts +81 -0
- package/dist/app/collab-role-plan.js +504 -0
- package/dist/app/collab-role-repair.d.ts +109 -0
- package/dist/app/collab-role-repair.js +821 -0
- package/dist/app/collab-rollover.d.ts +263 -0
- package/dist/app/collab-rollover.js +1112 -0
- package/dist/app/collab-route.d.ts +64 -0
- package/dist/app/collab-route.js +240 -0
- package/dist/app/collab-session-transition.d.ts +221 -0
- package/dist/app/collab-session-transition.js +3334 -0
- package/dist/app/collab-state.d.ts +7 -0
- package/dist/app/collab-state.js +162 -0
- package/dist/app/collab-task-store.d.ts +22 -0
- package/dist/app/collab-task-store.js +204 -0
- package/dist/app/collab-work-execution.d.ts +127 -0
- package/dist/app/collab-work-execution.js +1027 -0
- package/dist/app/collab-work-plan.d.ts +87 -0
- package/dist/app/collab-work-plan.js +437 -0
- package/dist/app/collaboration.d.ts +8 -2
- package/dist/app/collaboration.js +101 -12
- package/dist/app/doctor.js +108 -5
- package/dist/app/host-mcp.js +34 -8
- package/dist/app/host-probe.js +4 -4
- package/dist/app/init.d.ts +58 -4
- package/dist/app/init.js +768 -155
- package/dist/app/managed-pi-bootstrap-admission.d.ts +14 -0
- package/dist/app/managed-pi-bootstrap-admission.js +104 -0
- package/dist/app/managed-pi-bootstrap-refresh.d.ts +10 -0
- package/dist/app/managed-pi-bootstrap-refresh.js +78 -0
- package/dist/app/managed-pi-delivery.d.ts +8 -0
- package/dist/app/managed-pi-delivery.js +110 -0
- package/dist/app/managed-pi-handoff-receiver.d.ts +15 -0
- package/dist/app/managed-pi-handoff-receiver.js +263 -0
- package/dist/app/managed-pi-handoff-reference.d.ts +3 -0
- package/dist/app/managed-pi-handoff-reference.js +60 -0
- package/dist/app/managed-pi-herdr.d.ts +21 -0
- package/dist/app/managed-pi-herdr.js +185 -0
- package/dist/app/managed-pi-initial-admission.d.ts +28 -0
- package/dist/app/managed-pi-initial-admission.js +416 -0
- package/dist/app/managed-pi-initial-launch.d.ts +5 -0
- package/dist/app/managed-pi-initial-launch.js +61 -0
- package/dist/app/managed-pi-native-observation.d.ts +36 -0
- package/dist/app/managed-pi-native-observation.js +191 -0
- package/dist/app/managed-pi-readiness.d.ts +29 -0
- package/dist/app/managed-pi-readiness.js +288 -0
- package/dist/app/managed-pi-repair-stop.d.ts +21 -0
- package/dist/app/managed-pi-repair-stop.js +371 -0
- package/dist/app/managed-pi-resume-admission.d.ts +32 -0
- package/dist/app/managed-pi-resume-admission.js +618 -0
- package/dist/app/managed-pi-retirement.d.ts +28 -0
- package/dist/app/managed-pi-retirement.js +112 -0
- package/dist/app/managed-pi-sdk-control.d.ts +7 -0
- package/dist/app/managed-pi-sdk-control.js +169 -0
- package/dist/app/managed-pi-sdk-runtime.d.ts +3 -0
- package/dist/app/managed-pi-sdk-runtime.js +483 -0
- package/dist/app/managed-pi-source-admission.d.ts +14 -0
- package/dist/app/managed-pi-source-admission.js +323 -0
- package/dist/app/managed-pi-transition-host.d.ts +36 -0
- package/dist/app/managed-pi-transition-host.js +292 -0
- package/dist/app/managed-pi.d.ts +54 -0
- package/dist/app/managed-pi.js +248 -0
- package/dist/app/shell-readiness.d.ts +66 -0
- package/dist/app/shell-readiness.js +368 -0
- package/dist/app/task-pin.d.ts +2 -23
- package/dist/app/task-pin.js +2 -113
- package/dist/cli/commands/collaboration-binding.d.ts +13 -0
- package/dist/cli/commands/collaboration-binding.js +118 -0
- package/dist/cli/commands/collaboration-bootstrap.d.ts +10 -0
- package/dist/cli/commands/collaboration-bootstrap.js +84 -0
- package/dist/cli/commands/collaboration-capabilities.d.ts +13 -0
- package/dist/cli/commands/collaboration-capabilities.js +127 -0
- package/dist/cli/commands/collaboration-handoff.d.ts +13 -0
- package/dist/cli/commands/collaboration-handoff.js +102 -0
- package/dist/cli/commands/collaboration-message.d.ts +17 -0
- package/dist/cli/commands/collaboration-message.js +177 -0
- package/dist/cli/commands/collaboration-plan.d.ts +8 -0
- package/dist/cli/commands/collaboration-plan.js +108 -0
- package/dist/cli/commands/collaboration-preflight.d.ts +10 -0
- package/dist/cli/commands/collaboration-preflight.js +167 -0
- package/dist/cli/commands/collaboration-recovery-run.d.ts +46 -0
- package/dist/cli/commands/collaboration-recovery-run.js +224 -0
- package/dist/cli/commands/collaboration-recovery.d.ts +11 -0
- package/dist/cli/commands/collaboration-recovery.js +104 -0
- package/dist/cli/commands/collaboration-resources.d.ts +11 -0
- package/dist/cli/commands/collaboration-resources.js +96 -0
- package/dist/cli/commands/collaboration-role-plan.d.ts +9 -0
- package/dist/cli/commands/collaboration-role-plan.js +69 -0
- package/dist/cli/commands/collaboration-role-run.d.ts +11 -0
- package/dist/cli/commands/collaboration-role-run.js +128 -0
- package/dist/cli/commands/collaboration-rollover.d.ts +10 -0
- package/dist/cli/commands/collaboration-rollover.js +103 -0
- package/dist/cli/commands/collaboration-state.d.ts +10 -0
- package/dist/cli/commands/collaboration-state.js +96 -0
- package/dist/cli/commands/collaboration-transition.d.ts +10 -0
- package/dist/cli/commands/collaboration-transition.js +75 -0
- package/dist/cli/commands/collaboration-work-run.d.ts +34 -0
- package/dist/cli/commands/collaboration-work-run.js +178 -0
- package/dist/cli/commands/collaboration.d.ts +4 -0
- package/dist/cli/commands/collaboration.js +39 -4
- package/dist/cli/commands/continuity.js +2 -6
- package/dist/cli/commands/docs.d.ts +2 -0
- package/dist/cli/commands/docs.js +89 -15
- package/dist/cli/commands/host.d.ts +7 -1
- package/dist/cli/commands/host.js +122 -7
- package/dist/cli/commands/init.d.ts +20 -3
- package/dist/cli/commands/init.js +897 -232
- package/dist/cli/commands/mcp.d.ts +1 -0
- package/dist/cli/commands/mcp.js +11 -5
- package/dist/cli/commands/repair.d.ts +12 -0
- package/dist/cli/commands/repair.js +41 -0
- package/dist/cli/commands/runtime.d.ts +1 -1
- package/dist/cli/commands/runtime.js +139 -38
- package/dist/cli/commands/session.d.ts +7 -0
- package/dist/cli/commands/session.js +82 -0
- package/dist/cli/commands/task.js +19 -5
- package/dist/cli/run.js +866 -24
- package/dist/code/identity.d.ts +7 -0
- package/dist/code/identity.js +7 -3
- package/dist/code/registration.js +7 -0
- package/dist/code/service.d.ts +9 -0
- package/dist/code/service.js +16 -3
- package/dist/code/text.js +19 -7
- package/dist/collab/admission.d.ts +91 -66
- package/dist/collab/admission.js +21 -6
- package/dist/collab/canonical.d.ts +1 -1
- package/dist/collab/canonical.js +44 -3
- package/dist/collab/envelope.d.ts +2 -2
- package/dist/collab/envelope.js +12 -12
- package/dist/collab/first-work.d.ts +3 -0
- package/dist/collab/first-work.js +15 -0
- package/dist/collab/handoff.d.ts +16 -0
- package/dist/collab/handoff.js +39 -5
- package/dist/collab/index.d.ts +97 -1
- package/dist/collab/index.js +9 -1
- package/dist/collab/messages.js +126 -3
- package/dist/collab/persisted-messages.d.ts +123 -0
- package/dist/collab/persisted-messages.js +496 -0
- package/dist/collab/preflight.d.ts +1 -1
- package/dist/collab/resources.d.ts +13 -3
- package/dist/collab/resources.js +37 -6
- package/dist/collab/rollover.d.ts +311 -0
- package/dist/collab/rollover.js +1024 -0
- package/dist/collab/store.d.ts +1 -0
- package/dist/collab/store.js +1 -4
- package/dist/collab/types.d.ts +2 -354
- package/dist/collab/validation.d.ts +2 -10
- package/dist/collab/validation.js +2 -303
- package/dist/collab/work-plan.d.ts +105 -0
- package/dist/collab/work-plan.js +843 -0
- package/dist/continuity/context.d.ts +11 -2
- package/dist/continuity/context.js +100 -13
- package/dist/continuity/handoff-bundle.d.ts +296 -0
- package/dist/continuity/handoff-bundle.js +477 -0
- package/dist/continuity/index.d.ts +2 -0
- package/dist/continuity/index.js +1 -0
- package/dist/continuity/paths.js +10 -2
- package/dist/continuity/service.js +91 -15
- package/dist/continuity/task-pin.d.ts +24 -0
- package/dist/continuity/task-pin.js +590 -0
- package/dist/doctor.d.ts +1 -0
- package/dist/doctor.js +6 -0
- package/dist/experimental/index.d.ts +13 -0
- package/dist/experimental/index.js +25 -0
- package/dist/experimental/pi.d.ts +4 -0
- package/dist/experimental/pi.js +12 -0
- package/dist/hosts/claude/native.js +1 -1
- package/dist/hosts/codex/native.js +1 -1
- package/dist/hosts/codex/protocol.js +1 -1
- package/dist/hosts/integration/bootstrap-config.d.ts +58 -0
- package/dist/hosts/integration/bootstrap-config.js +254 -0
- package/dist/hosts/integration/bundle-export.d.ts +44 -0
- package/dist/hosts/integration/bundle-export.js +366 -3
- package/dist/hosts/integration/bundle.js +3 -0
- package/dist/hosts/integration/hook.js +36 -9
- package/dist/hosts/integration/pappra-bootstrap-extension.mjs +80 -0
- package/dist/hosts/integration/pappra-extension-runtime.mjs +59 -24631
- package/dist/hosts/integration/pappra-hook.mjs +61 -24749
- package/dist/hosts/integration/pappra-recovery-extension.mjs +259 -0
- package/dist/hosts/integration/pappra-session-transition-extension.mjs +276 -0
- package/dist/hosts/integration/pi-bootstrap-extension.d.ts +36 -0
- package/dist/hosts/integration/pi-bootstrap-extension.js +101 -0
- package/dist/hosts/integration/pi-bootstrap-guard.d.ts +125 -0
- package/dist/hosts/integration/pi-bootstrap-guard.js +438 -0
- package/dist/hosts/integration/pi-bootstrap-runtime.d.ts +63 -0
- package/dist/hosts/integration/pi-bootstrap-runtime.js +223 -0
- package/dist/hosts/integration/pi-native-events.d.ts +112 -0
- package/dist/hosts/integration/pi-native-events.js +348 -0
- package/dist/hosts/integration/pi-rollover-extension.d.ts +166 -0
- package/dist/hosts/integration/pi-rollover-extension.js +431 -0
- package/dist/hosts/integration/recovery-config.d.ts +48 -0
- package/dist/hosts/integration/recovery-config.js +117 -0
- package/dist/hosts/integration/service.d.ts +6 -1
- package/dist/hosts/integration/service.js +485 -35
- package/dist/hosts/integration/support.d.ts +7 -0
- package/dist/hosts/integration/support.js +9 -1
- package/dist/hosts/integration/templates.d.ts +3 -0
- package/dist/hosts/integration/templates.js +26 -3
- package/dist/hosts/pi/managed-host-identity.d.ts +2 -0
- package/dist/hosts/pi/managed-host-identity.js +40 -0
- package/dist/hosts/pi/managed-provider-diagnostics.d.ts +6 -0
- package/dist/hosts/pi/managed-provider-diagnostics.js +184 -0
- package/dist/hosts/pi/managed-sdk-session.d.ts +335 -0
- package/dist/hosts/pi/managed-sdk-session.js +1639 -0
- package/dist/hosts/pi/managed-session-extension.d.ts +20 -0
- package/dist/hosts/pi/managed-session-extension.js +84 -0
- package/dist/hosts/pi/managed-session.d.ts +177 -0
- package/dist/hosts/pi/managed-session.js +1557 -0
- package/dist/hosts/pi/protocol.js +1 -1
- package/dist/hosts/pi/query-result.js +1 -1
- package/dist/hosts/pi/resume-capability.d.ts +41 -0
- package/dist/hosts/pi/resume-capability.js +33 -0
- package/dist/hosts/pi/rpc.d.ts +182 -134
- package/dist/hosts/pi/rpc.js +230 -37
- package/dist/hosts/pilot.d.ts +97 -74
- package/dist/hosts/pilot.js +5 -1
- package/dist/hosts/version.d.ts +3 -0
- package/dist/hosts/version.js +18 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/infra/bounded-file.d.ts +19 -0
- package/dist/infra/bounded-file.js +66 -0
- package/dist/infra/fs.js +10 -2
- package/dist/infra/git.d.ts +29 -0
- package/dist/infra/git.js +45 -9
- package/dist/infra/json-property.d.ts +2 -0
- package/dist/infra/json-property.js +69 -0
- package/dist/infra/json.d.ts +4 -0
- package/dist/infra/json.js +24 -0
- package/dist/infra/owned-process-group.js +1 -1
- package/dist/infra/private-lock.d.ts +16 -0
- package/dist/infra/private-lock.js +148 -0
- package/dist/infra/private-state.d.ts +7 -0
- package/dist/infra/private-state.js +146 -0
- package/dist/infra/process-identity.d.ts +12 -0
- package/dist/infra/process-identity.js +142 -0
- package/dist/infra/validation.d.ts +5 -0
- package/dist/infra/validation.js +15 -0
- package/dist/init.d.ts +1 -0
- package/dist/init.js +6 -0
- package/dist/install/apply.d.ts +9 -1
- package/dist/install/apply.js +176 -12
- package/dist/install/dependencies.d.ts +38 -0
- package/dist/install/dependencies.js +282 -0
- package/dist/install/ownership.js +30 -1
- package/dist/install/references.d.ts +31 -0
- package/dist/install/references.js +208 -0
- package/dist/install/repair.d.ts +37 -0
- package/dist/install/repair.js +798 -0
- package/dist/install/reset-local.d.ts +16 -0
- package/dist/install/reset-local.js +304 -0
- package/dist/install/rollback.d.ts +3 -0
- package/dist/install/rollback.js +9 -3
- package/dist/install/runtime.d.ts +10 -6
- package/dist/install/runtime.js +299 -59
- package/dist/install/source-fingerprint.d.ts +2 -0
- package/dist/install/source-fingerprint.js +103 -0
- package/dist/knowledge/catalog.d.ts +1 -0
- package/dist/knowledge/catalog.js +143 -10
- package/dist/knowledge/journal.js +17 -7
- package/dist/knowledge/paths.js +2 -1
- package/dist/knowledge/refs.js +4 -0
- package/dist/knowledge/register-batch.d.ts +4 -0
- package/dist/knowledge/register-batch.js +225 -0
- package/dist/knowledge/relocate.d.ts +5 -0
- package/dist/knowledge/relocate.js +92 -0
- package/dist/knowledge/scan.js +103 -47
- package/dist/knowledge/service.d.ts +3 -0
- package/dist/knowledge/service.js +33 -1
- package/dist/knowledge/write.d.ts +4 -1
- package/dist/knowledge/write.js +1 -1
- package/dist/mcp/server.d.ts +4 -2
- package/dist/mcp/server.js +87 -136
- package/dist/schemas/collaboration-state-validation.d.ts +6 -0
- package/dist/schemas/collaboration-state-validation.js +342 -0
- package/dist/schemas/collaboration-state.d.ts +436 -0
- package/dist/schemas/collaboration-state.js +1 -0
- package/dist/schemas/collaboration.d.ts +335 -0
- package/dist/schemas/collaboration.js +272 -0
- package/dist/schemas/continuity.d.ts +8 -0
- package/dist/schemas/continuity.js +13 -3
- package/dist/schemas/doctor.d.ts +1 -0
- package/dist/schemas/doctor.js +1 -0
- package/dist/schemas/document.d.ts +61 -0
- package/dist/schemas/document.js +9 -0
- package/dist/schemas/errors.d.ts +1 -0
- package/dist/schemas/errors.js +1 -0
- package/dist/schemas/host.d.ts +24 -0
- package/dist/schemas/host.js +19 -0
- package/dist/schemas/install.d.ts +8 -2
- package/dist/schemas/install.js +11 -1
- package/dist/schemas/managed-pi-execution.d.ts +16 -0
- package/dist/schemas/managed-pi-execution.js +2 -0
- package/dist/schemas/outcome.d.ts +9 -5
- package/dist/workspace/config-file.js +1 -3
- package/dist/workspace/documents.js +12 -2
- package/dist/workspace/repositories.d.ts +7 -0
- package/dist/workspace/repositories.js +14 -5
- package/package.json +35 -35
- package/skills/pappra/SKILL.md +28 -7
- package/skills/pappra/references/collaboration.md +633 -0
- package/skills/pappra/references/environment.md +360 -0
- package/skills/pappra/references/hosts.md +20 -0
- package/skills/pappra/references/operations.md +36 -5
- package/dist/app/collab-from.d.ts +0 -35
- package/dist/app/collab-from.js +0 -84
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
/** Legacy protocol data. Unknown extension fields are preserved without being executed. */
|
|
2
|
+
export interface Identity {
|
|
3
|
+
agent_id: string;
|
|
4
|
+
session_id: string;
|
|
5
|
+
harness: string | null;
|
|
6
|
+
cwd?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface Coordinator extends Identity {
|
|
9
|
+
owner_epoch: number;
|
|
10
|
+
since: string;
|
|
11
|
+
previous?: Pick<Coordinator, 'agent_id' | 'session_id' | 'owner_epoch'> | null;
|
|
12
|
+
}
|
|
13
|
+
export interface ResourceInput {
|
|
14
|
+
kind?: string;
|
|
15
|
+
path?: string;
|
|
16
|
+
scope?: string;
|
|
17
|
+
port?: number;
|
|
18
|
+
value?: string;
|
|
19
|
+
label?: string;
|
|
20
|
+
origin?: string;
|
|
21
|
+
derived?: boolean;
|
|
22
|
+
shared?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface Resource {
|
|
25
|
+
kind: string;
|
|
26
|
+
scope: string;
|
|
27
|
+
key: string;
|
|
28
|
+
path?: string | null;
|
|
29
|
+
port?: number | null;
|
|
30
|
+
existing?: boolean;
|
|
31
|
+
label: string;
|
|
32
|
+
origin?: string;
|
|
33
|
+
derived_from?: string | null;
|
|
34
|
+
}
|
|
35
|
+
export interface Claim extends Resource {
|
|
36
|
+
claim_id: string;
|
|
37
|
+
access: string;
|
|
38
|
+
holder: Identity;
|
|
39
|
+
resource_epoch: number;
|
|
40
|
+
claimed_at: string;
|
|
41
|
+
released_at: string | null;
|
|
42
|
+
subtask_id: string | null;
|
|
43
|
+
attempt: number | null;
|
|
44
|
+
note: string | null;
|
|
45
|
+
cancel_pending?: boolean;
|
|
46
|
+
released_by?: string;
|
|
47
|
+
release_reason?: string | null;
|
|
48
|
+
transferred_from?: Identity;
|
|
49
|
+
transferred_at?: string;
|
|
50
|
+
}
|
|
51
|
+
export interface MessageBody {
|
|
52
|
+
[key: string]: unknown;
|
|
53
|
+
assignment_ref?: string | null;
|
|
54
|
+
assignment_digest?: string | null;
|
|
55
|
+
input_revision?: string | null;
|
|
56
|
+
approval?: {
|
|
57
|
+
approved_by: string;
|
|
58
|
+
reason: string;
|
|
59
|
+
};
|
|
60
|
+
status?: string;
|
|
61
|
+
kind?: string;
|
|
62
|
+
phase?: string;
|
|
63
|
+
handoff_id?: string;
|
|
64
|
+
resources?: string[];
|
|
65
|
+
reason?: string | null;
|
|
66
|
+
outputs?: unknown[];
|
|
67
|
+
native_ref?: unknown;
|
|
68
|
+
evidence_ref?: string | null;
|
|
69
|
+
stop_evidence?: unknown;
|
|
70
|
+
}
|
|
71
|
+
export interface Message {
|
|
72
|
+
[key: string]: unknown;
|
|
73
|
+
schema: string;
|
|
74
|
+
message_id: string;
|
|
75
|
+
type: string;
|
|
76
|
+
task_id: string;
|
|
77
|
+
from: Identity;
|
|
78
|
+
to: Identity;
|
|
79
|
+
reply_to: string | null;
|
|
80
|
+
subtask_id: string | null;
|
|
81
|
+
attempt: number | null;
|
|
82
|
+
owner_epoch: number | null;
|
|
83
|
+
created_at: string;
|
|
84
|
+
content_digest: string | null;
|
|
85
|
+
body: MessageBody;
|
|
86
|
+
}
|
|
87
|
+
export type MessageInput = Pick<Message, 'type' | 'task_id' | 'from' | 'to'> & Partial<Pick<Message, 'message_id' | 'reply_to' | 'subtask_id' | 'attempt' | 'owner_epoch' | 'created_at' | 'body'>>;
|
|
88
|
+
/** Reference to a registered/applied cancellation intent; it conveys no native ownership. */
|
|
89
|
+
export interface CancellationIntentReference {
|
|
90
|
+
readonly messageId: string;
|
|
91
|
+
readonly contentDigest: string;
|
|
92
|
+
readonly fileDigest: string;
|
|
93
|
+
}
|
|
94
|
+
export interface Transition {
|
|
95
|
+
from: string | null;
|
|
96
|
+
to: string;
|
|
97
|
+
at: string;
|
|
98
|
+
actor: string;
|
|
99
|
+
reason: string | null;
|
|
100
|
+
evidence: unknown;
|
|
101
|
+
forced?: boolean | undefined;
|
|
102
|
+
}
|
|
103
|
+
export interface NativeBinding {
|
|
104
|
+
runner: string | null;
|
|
105
|
+
session_id: string | null;
|
|
106
|
+
run_id: string | null;
|
|
107
|
+
mission_id: string | null;
|
|
108
|
+
observation: string;
|
|
109
|
+
observed_at: string | null;
|
|
110
|
+
evidence_ref: string | null;
|
|
111
|
+
manager?: string;
|
|
112
|
+
launch_kind?: string;
|
|
113
|
+
mode?: string;
|
|
114
|
+
identity_status?: string;
|
|
115
|
+
}
|
|
116
|
+
export interface Attempt {
|
|
117
|
+
subtask_id: string;
|
|
118
|
+
attempt: number;
|
|
119
|
+
state: string;
|
|
120
|
+
owner_epoch: number | null;
|
|
121
|
+
assignee: Identity;
|
|
122
|
+
assignment_message_id: string;
|
|
123
|
+
assignment_ref: string | null;
|
|
124
|
+
assignment_digest: string | null;
|
|
125
|
+
input_revision: string | null;
|
|
126
|
+
created_at: string;
|
|
127
|
+
updated_at: string;
|
|
128
|
+
native: NativeBinding;
|
|
129
|
+
approval: MessageBody['approval'] | null;
|
|
130
|
+
transitions: Transition[];
|
|
131
|
+
closed_at?: string;
|
|
132
|
+
awaiting?: string;
|
|
133
|
+
ownership?: string;
|
|
134
|
+
cancel_requested_at?: string;
|
|
135
|
+
cwd?: string;
|
|
136
|
+
}
|
|
137
|
+
export interface ResultEntry {
|
|
138
|
+
schema: string;
|
|
139
|
+
subtask_id: string;
|
|
140
|
+
attempt: number;
|
|
141
|
+
status: string;
|
|
142
|
+
message_id: string;
|
|
143
|
+
input_revision: string | null;
|
|
144
|
+
outputs: unknown[];
|
|
145
|
+
native_ref: unknown;
|
|
146
|
+
recorded_at: string;
|
|
147
|
+
evidence_ref: string | null;
|
|
148
|
+
classification: string;
|
|
149
|
+
reason: string | null;
|
|
150
|
+
}
|
|
151
|
+
export interface Uncertainty {
|
|
152
|
+
uncertainty_id: string;
|
|
153
|
+
kind: string;
|
|
154
|
+
subtask_id: string | null;
|
|
155
|
+
attempt: number | null;
|
|
156
|
+
detail: string | null;
|
|
157
|
+
evidence_ref: string | null;
|
|
158
|
+
resolution_hint: string | null;
|
|
159
|
+
opened_at: string;
|
|
160
|
+
resolved_at: string | null;
|
|
161
|
+
resolution: string | null;
|
|
162
|
+
resolution_evidence: unknown;
|
|
163
|
+
auto_restart: boolean;
|
|
164
|
+
resolved_by?: string;
|
|
165
|
+
resolution_source?: string;
|
|
166
|
+
}
|
|
167
|
+
export interface OwnershipSnapshot {
|
|
168
|
+
claim_id: string;
|
|
169
|
+
holder?: Identity | null;
|
|
170
|
+
resource_epoch?: number | null;
|
|
171
|
+
released_at?: string | null;
|
|
172
|
+
missing?: boolean;
|
|
173
|
+
}
|
|
174
|
+
export interface HandoffStep {
|
|
175
|
+
[key: string]: unknown;
|
|
176
|
+
state: string;
|
|
177
|
+
at: string;
|
|
178
|
+
actor: string;
|
|
179
|
+
}
|
|
180
|
+
export interface Handoff {
|
|
181
|
+
schema: string;
|
|
182
|
+
handoff_id: string;
|
|
183
|
+
kind: string;
|
|
184
|
+
subtask_id: string | null;
|
|
185
|
+
attempt: number | null;
|
|
186
|
+
from: Identity;
|
|
187
|
+
to: Identity;
|
|
188
|
+
resources: string[];
|
|
189
|
+
ownership_snapshot: OwnershipSnapshot[];
|
|
190
|
+
state: string;
|
|
191
|
+
owner_epoch: number;
|
|
192
|
+
created_at: string;
|
|
193
|
+
updated_at: string;
|
|
194
|
+
reason: string | null;
|
|
195
|
+
steps: HandoffStep[];
|
|
196
|
+
partial_outputs: unknown[];
|
|
197
|
+
inflight: unknown[];
|
|
198
|
+
pending_approvals: unknown[];
|
|
199
|
+
confirmation_message_id: string | null;
|
|
200
|
+
snapshot_at?: string;
|
|
201
|
+
previous_coordinator?: Coordinator | null;
|
|
202
|
+
resource_transfers?: {
|
|
203
|
+
claim_id: string;
|
|
204
|
+
resource_epoch: number;
|
|
205
|
+
from: Identity;
|
|
206
|
+
}[];
|
|
207
|
+
}
|
|
208
|
+
export interface AppliedMessage {
|
|
209
|
+
message_id: string;
|
|
210
|
+
type: string;
|
|
211
|
+
subtask_id: string | null;
|
|
212
|
+
attempt: number | null;
|
|
213
|
+
from: Identity;
|
|
214
|
+
to: Identity | null;
|
|
215
|
+
reply_to: string | null;
|
|
216
|
+
owner_epoch: number | null;
|
|
217
|
+
content_digest: string;
|
|
218
|
+
at: string;
|
|
219
|
+
applied_at: string;
|
|
220
|
+
state: string;
|
|
221
|
+
detail: string;
|
|
222
|
+
body_kind: string | null;
|
|
223
|
+
}
|
|
224
|
+
export interface Notification {
|
|
225
|
+
schema: string;
|
|
226
|
+
kind: string;
|
|
227
|
+
origin_session: string;
|
|
228
|
+
target_session: string;
|
|
229
|
+
depth?: number;
|
|
230
|
+
task_id: string;
|
|
231
|
+
subtask_id?: string | null;
|
|
232
|
+
attempt?: number | null;
|
|
233
|
+
event?: unknown;
|
|
234
|
+
}
|
|
235
|
+
export interface NotificationEntry {
|
|
236
|
+
notification_id: string;
|
|
237
|
+
key: string;
|
|
238
|
+
kind: string;
|
|
239
|
+
task_id: string;
|
|
240
|
+
subtask_id: string | null;
|
|
241
|
+
attempt: number | null;
|
|
242
|
+
origin_session: string;
|
|
243
|
+
target_session: string;
|
|
244
|
+
depth: number;
|
|
245
|
+
at: string;
|
|
246
|
+
decision: string;
|
|
247
|
+
reason: string | null;
|
|
248
|
+
}
|
|
249
|
+
/** Bounded writer-rollover records retained on the task record. */
|
|
250
|
+
export interface RolloverClaimReference {
|
|
251
|
+
claim_id: string;
|
|
252
|
+
resource_epoch: number;
|
|
253
|
+
}
|
|
254
|
+
export interface RolloverBundleReference {
|
|
255
|
+
ref: string;
|
|
256
|
+
digest: string;
|
|
257
|
+
}
|
|
258
|
+
/** The native session identity of one writer; never inferred from another pointer. */
|
|
259
|
+
export interface RolloverNativeIdentity {
|
|
260
|
+
agent_id: string | null;
|
|
261
|
+
runner: string | null;
|
|
262
|
+
session_id: string | null;
|
|
263
|
+
run_id: string | null;
|
|
264
|
+
mission_id: string | null;
|
|
265
|
+
}
|
|
266
|
+
/** Explicit captured boundary for post-transfer correlation (message application order). */
|
|
267
|
+
export interface RolloverTransferBoundary {
|
|
268
|
+
message_count: number;
|
|
269
|
+
state_revision: number;
|
|
270
|
+
at: string;
|
|
271
|
+
}
|
|
272
|
+
/** Recorded quiescence evidence and the exact inventory it was recorded with. */
|
|
273
|
+
export interface RolloverPreparedStep {
|
|
274
|
+
evidence_ref: string;
|
|
275
|
+
inventory: string;
|
|
276
|
+
at: string;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Immutable intent inputs for one writer rollover. `transfer_boundary` and `old_native` are
|
|
280
|
+
* completion annotations; the intent inputs themselves are never rewritten.
|
|
281
|
+
*/
|
|
282
|
+
export interface RolloverIntent {
|
|
283
|
+
schema: string;
|
|
284
|
+
intent_id: string;
|
|
285
|
+
generation: number;
|
|
286
|
+
task_id: string;
|
|
287
|
+
handoff_id: string;
|
|
288
|
+
subtask_id: string;
|
|
289
|
+
attempt: number;
|
|
290
|
+
input_revision: string;
|
|
291
|
+
coordinator_epoch: number;
|
|
292
|
+
from: Identity;
|
|
293
|
+
to: Identity;
|
|
294
|
+
claims: RolloverClaimReference[];
|
|
295
|
+
bundle: RolloverBundleReference;
|
|
296
|
+
created_at: string;
|
|
297
|
+
/** Confirmed source native identity pinned at intent creation. */
|
|
298
|
+
source_native: RolloverNativeIdentity;
|
|
299
|
+
prepared?: RolloverPreparedStep | null;
|
|
300
|
+
transfer_boundary?: RolloverTransferBoundary | null;
|
|
301
|
+
successor_native?: RolloverNativeIdentity | null;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Source-session history marker. It archives the old native identity, never the reassigned
|
|
305
|
+
* attempt, and never claims that active routing was removed.
|
|
306
|
+
*/
|
|
307
|
+
export interface SuccessionEntry {
|
|
308
|
+
schema: string;
|
|
309
|
+
intent_id: string;
|
|
310
|
+
handoff_id: string;
|
|
311
|
+
generation: number;
|
|
312
|
+
old_native: RolloverNativeIdentity;
|
|
313
|
+
successor_native: RolloverNativeIdentity;
|
|
314
|
+
archived_at: string;
|
|
315
|
+
history_retained: true;
|
|
316
|
+
routing: 'pending';
|
|
317
|
+
native_archive: 'unavailable';
|
|
318
|
+
proof: {
|
|
319
|
+
message_id: string;
|
|
320
|
+
digest: string;
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
export interface TaskRecord {
|
|
324
|
+
[key: string]: unknown;
|
|
325
|
+
schema: string;
|
|
326
|
+
task_id: string;
|
|
327
|
+
domain_id: string;
|
|
328
|
+
domain_root: string;
|
|
329
|
+
task_root: string;
|
|
330
|
+
created_at: string;
|
|
331
|
+
updated_at: string;
|
|
332
|
+
state_revision: number;
|
|
333
|
+
coordinator: Coordinator | null;
|
|
334
|
+
input_revision: string | null;
|
|
335
|
+
policy: {
|
|
336
|
+
[key: string]: unknown;
|
|
337
|
+
};
|
|
338
|
+
attempts: Attempt[];
|
|
339
|
+
messages: AppliedMessage[];
|
|
340
|
+
claims: Claim[];
|
|
341
|
+
handoffs: Handoff[];
|
|
342
|
+
uncertainty: Uncertainty[];
|
|
343
|
+
results: ResultEntry[];
|
|
344
|
+
native: unknown[];
|
|
345
|
+
dispatch_frozen?: boolean;
|
|
346
|
+
dispatch_released_at?: string;
|
|
347
|
+
dispatch_released_by?: string;
|
|
348
|
+
notifications?: NotificationEntry[];
|
|
349
|
+
notifications_trimmed?: number;
|
|
350
|
+
launch_reservations?: LaunchReservation[];
|
|
351
|
+
rollover?: RolloverIntent[];
|
|
352
|
+
successions?: SuccessionEntry[];
|
|
353
|
+
}
|
|
354
|
+
export interface ReservationInput {
|
|
355
|
+
reservation_id: string;
|
|
356
|
+
subtask_id: string;
|
|
357
|
+
attempt: number;
|
|
358
|
+
kind: string;
|
|
359
|
+
mode: string;
|
|
360
|
+
holder: Identity;
|
|
361
|
+
requested_session_id: string | null;
|
|
362
|
+
phase?: string;
|
|
363
|
+
pid?: number;
|
|
364
|
+
resume_selector?: string | null;
|
|
365
|
+
transport?: string;
|
|
366
|
+
[key: string]: unknown;
|
|
367
|
+
}
|
|
368
|
+
export interface LaunchReservation extends ReservationInput {
|
|
369
|
+
reserved_at: string;
|
|
370
|
+
released_at: string | null;
|
|
371
|
+
outcome: string | null;
|
|
372
|
+
exit_code?: number | null;
|
|
373
|
+
session_id?: string | null;
|
|
374
|
+
run_id?: string | null;
|
|
375
|
+
detail?: string | null;
|
|
376
|
+
identity_status?: string;
|
|
377
|
+
expected_identity?: string | null;
|
|
378
|
+
observed_identity?: string | null;
|
|
379
|
+
}
|
|
380
|
+
export interface Failure {
|
|
381
|
+
ok: false;
|
|
382
|
+
reason: string;
|
|
383
|
+
record?: never;
|
|
384
|
+
result?: never;
|
|
385
|
+
commit?: never;
|
|
386
|
+
[key: string]: unknown;
|
|
387
|
+
}
|
|
388
|
+
export interface UnreadableRecord {
|
|
389
|
+
task_id: string;
|
|
390
|
+
__unreadable: true;
|
|
391
|
+
claims: Claim[];
|
|
392
|
+
}
|
|
393
|
+
export interface Mutation<T = unknown> {
|
|
394
|
+
ok?: boolean;
|
|
395
|
+
commit?: boolean;
|
|
396
|
+
record: TaskRecord;
|
|
397
|
+
op?: string;
|
|
398
|
+
summary?: unknown;
|
|
399
|
+
result?: T;
|
|
400
|
+
[key: string]: unknown;
|
|
401
|
+
}
|
|
402
|
+
export interface MessageEffect {
|
|
403
|
+
[key: string]: unknown;
|
|
404
|
+
entry?: ResultEntry;
|
|
405
|
+
}
|
|
406
|
+
export type TransactionResult<T> = {
|
|
407
|
+
ok: true;
|
|
408
|
+
state_revision: number;
|
|
409
|
+
result: T | null;
|
|
410
|
+
op: string;
|
|
411
|
+
} | {
|
|
412
|
+
ok: false;
|
|
413
|
+
reason: string;
|
|
414
|
+
[key: string]: unknown;
|
|
415
|
+
};
|
|
416
|
+
export interface LockHolder {
|
|
417
|
+
schema: string;
|
|
418
|
+
nonce: string;
|
|
419
|
+
actor: string;
|
|
420
|
+
purpose: string;
|
|
421
|
+
pid: number;
|
|
422
|
+
hostname: string;
|
|
423
|
+
acquired_at: string;
|
|
424
|
+
}
|
|
425
|
+
export interface TransactionFile {
|
|
426
|
+
file: string;
|
|
427
|
+
revision: unknown;
|
|
428
|
+
purpose: unknown;
|
|
429
|
+
actor: unknown;
|
|
430
|
+
}
|
|
431
|
+
export interface Finding {
|
|
432
|
+
code: string;
|
|
433
|
+
severity: string;
|
|
434
|
+
detail: string;
|
|
435
|
+
[key: string]: unknown;
|
|
436
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|