@peer-agent/protocol 0.1.0-rc.4 → 0.1.0-rc.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/dist/acceptance-close-gate.d.ts +10 -1
  2. package/dist/acceptance-close-gate.js +12 -0
  3. package/dist/agent-supervision.d.ts +81 -0
  4. package/dist/agent-supervision.js +1 -0
  5. package/dist/attention.d.ts +44 -0
  6. package/dist/attention.js +1 -0
  7. package/dist/bot-access-policy.d.ts +29 -0
  8. package/dist/bot-access-policy.js +1 -0
  9. package/dist/bot-conversation-read.d.ts +25 -0
  10. package/dist/bot-conversation-read.js +9 -0
  11. package/dist/bot-model-selection.d.ts +13 -0
  12. package/dist/bot-model-selection.js +1 -0
  13. package/dist/browser-window.d.ts +48 -0
  14. package/dist/browser-window.js +23 -0
  15. package/dist/capability-admission.d.ts +20 -0
  16. package/dist/capability-admission.js +1 -0
  17. package/dist/delegation-coordination.d.ts +81 -0
  18. package/dist/delegation-coordination.js +1 -0
  19. package/dist/delegation.d.ts +216 -7
  20. package/dist/delegation.js +43 -39
  21. package/dist/document-reference.d.ts +83 -0
  22. package/dist/document-reference.js +1 -0
  23. package/dist/evidence-inspection.d.ts +64 -0
  24. package/dist/evidence-inspection.js +1 -0
  25. package/dist/goal.d.ts +50 -2
  26. package/dist/index.d.ts +56 -5
  27. package/dist/index.js +25 -0
  28. package/dist/input-prediction.d.ts +86 -0
  29. package/dist/input-prediction.js +48 -0
  30. package/dist/intent-coordination.d.ts +201 -0
  31. package/dist/intent-coordination.js +1 -0
  32. package/dist/interactive-result.d.ts +363 -0
  33. package/dist/interactive-result.js +215 -0
  34. package/dist/interactive-verification.d.ts +41 -0
  35. package/dist/interactive-verification.js +65 -0
  36. package/dist/local-git.d.ts +44 -0
  37. package/dist/local-git.js +3 -0
  38. package/dist/local-image.d.ts +53 -0
  39. package/dist/local-image.js +5 -0
  40. package/dist/model-reasoning.d.ts +13 -0
  41. package/dist/model-reasoning.js +18 -0
  42. package/dist/model-routing.d.ts +37 -3
  43. package/dist/model-routing.js +31 -5
  44. package/dist/project-agent-failure.d.ts +30 -0
  45. package/dist/project-agent-failure.js +44 -0
  46. package/dist/project-input-recovery.d.ts +65 -0
  47. package/dist/project-input-recovery.js +5 -0
  48. package/dist/project-recovery.d.ts +43 -0
  49. package/dist/project-recovery.js +1 -0
  50. package/dist/project.d.ts +81 -0
  51. package/dist/project.js +8 -5
  52. package/dist/remote-access.d.ts +15 -0
  53. package/dist/remote-access.js +1 -1
  54. package/dist/reply-delivery.d.ts +28 -0
  55. package/dist/reply-delivery.js +1 -0
  56. package/dist/resource-edit-execution.d.ts +68 -0
  57. package/dist/resource-edit-execution.js +96 -0
  58. package/dist/resource-edit.d.ts +237 -0
  59. package/dist/resource-edit.js +134 -0
  60. package/dist/resource-feedback-transport.d.ts +25 -0
  61. package/dist/resource-feedback-transport.js +93 -0
  62. package/dist/resource-feedback.d.ts +98 -0
  63. package/dist/resource-feedback.js +151 -0
  64. package/dist/resource-file-replace.d.ts +36 -0
  65. package/dist/resource-file-replace.js +40 -0
  66. package/dist/resource-reference-hints.d.ts +3 -0
  67. package/dist/resource-reference-hints.js +58 -0
  68. package/dist/resource-window.d.ts +222 -0
  69. package/dist/resource-window.js +252 -0
  70. package/dist/runtime-session-facts.d.ts +58 -0
  71. package/dist/runtime-session-facts.js +55 -0
  72. package/dist/session-control.d.ts +196 -0
  73. package/dist/session-control.js +48 -0
  74. package/dist/session-facts.d.ts +29 -0
  75. package/dist/session-facts.js +35 -0
  76. package/dist/system-context.d.ts +6 -0
  77. package/dist/task-overview.d.ts +90 -0
  78. package/dist/task-overview.js +322 -17
  79. package/dist/tool-activity-preview.d.ts +4 -0
  80. package/dist/tool-activity-preview.js +72 -0
  81. package/dist/usage-accounting.d.ts +1 -1
  82. package/dist/user-anchor.d.ts +17 -0
  83. package/dist/user-anchor.js +1 -0
  84. package/dist/work-coordination.d.ts +165 -0
  85. package/dist/work-coordination.js +1 -0
  86. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import type { GoalCriterionResult, GoalManualConfirmation, GoalSuccessCriterion } from './goal.ts';
1
+ import type { GoalCriterionResult, GoalManualConfirmation, GoalSuccessCriterion, GoalModelReview } from './goal.ts';
2
2
  export declare const ACCEPTANCE_CLOSE_GATE_CODE = "acceptance_evidence_incomplete";
3
3
  export type AcceptanceCloseGapReason = 'missing' | 'failed' | 'unresolved';
4
4
  export interface AcceptanceCloseGap {
@@ -17,6 +17,15 @@ export interface AcceptanceCloseTaskLike {
17
17
  }
18
18
  export interface AcceptanceClosePlanLike {
19
19
  readonly successCriteria?: readonly GoalSuccessCriterion[] | null;
20
+ /** Current content revision derived by the host store, never admitted from a model patch. */
21
+ readonly modelReviewSourceRevision?: string;
22
+ readonly modelReviews?: readonly GoalModelReview[];
23
+ readonly runner?: {
24
+ readonly verifierRuns?: readonly {
25
+ readonly verifierRunId: string;
26
+ readonly status: string;
27
+ }[];
28
+ };
20
29
  readonly criterionResults?: readonly GoalCriterionResult[] | null;
21
30
  readonly manualConfirmations?: readonly GoalManualConfirmation[] | null;
22
31
  readonly evidenceRefs?: readonly string[] | null;
@@ -85,6 +85,18 @@ export function evaluateAcceptanceCloseGate(plan, options = {}) {
85
85
  const description = criterion.description?.trim() || id;
86
86
  const isAuto = AUTO_CRITERION_KINDS.has(criterion.kind);
87
87
  const result = results.get(id) ?? null;
88
+ if (criterion.kind === 'model_review') {
89
+ const review = plan?.modelReviews?.slice().reverse().find(row => row.criterionId === id);
90
+ const current = review && plan?.modelReviewSourceRevision && review.sourceRevision === plan.modelReviewSourceRevision;
91
+ const verified = current && plan?.runner?.verifierRuns?.some(run => run.verifierRunId === review.verifierRunId && run.status === 'passed');
92
+ if (!current || !verified)
93
+ gaps.push({ criterionId: id, description, reason: 'missing' });
94
+ else if (!review.passed)
95
+ gaps.push({ criterionId: id, description, reason: 'failed' });
96
+ else if (!review.evidenceRefs.length || !review.evidenceRefs.every(ref => known.has(ref)))
97
+ gaps.push({ criterionId: id, description, reason: 'unresolved' });
98
+ continue;
99
+ }
88
100
  if (!isAuto && latestManualApproval(plan ?? {}, id))
89
101
  continue;
90
102
  if (!result) {
@@ -0,0 +1,81 @@
1
+ /** Local coordination facts. These records never grant project capabilities or human approval. */
2
+ export type AgentDeliveryIntent = 'mailbox_only' | 'ensure_turn';
3
+ export type InterruptionOrigin = 'user' | 'provider' | 'host_handoff' | 'lease_loss' | 'tool' | 'budget' | 'unknown';
4
+ export interface AgentDecisionRequest {
5
+ readonly sessionId: string;
6
+ readonly workId: string;
7
+ readonly parentConversationId: string;
8
+ readonly requestId: string;
9
+ readonly revision: number;
10
+ readonly question: string;
11
+ readonly options?: readonly {
12
+ readonly optionId: string;
13
+ readonly label: string;
14
+ }[];
15
+ readonly multiple?: boolean;
16
+ readonly allowText: boolean;
17
+ readonly responder: 'parent' | 'user';
18
+ readonly status: 'open' | 'answered' | 'cancelled';
19
+ readonly goalRevision: number;
20
+ readonly answerId?: string;
21
+ readonly userRequestRef?: string;
22
+ }
23
+ export interface AgentDecisionAnswer {
24
+ /** Host-issued linkage to a current native user answer; never model arguments. */
25
+ readonly sourceInputId?: string;
26
+ readonly userRequestRef?: string;
27
+ readonly requestId: string;
28
+ readonly expectedRequestRevision: number;
29
+ readonly optionIds?: readonly string[];
30
+ readonly text?: string;
31
+ }
32
+ export interface AgentCommandReceipt {
33
+ readonly workspaceId: string;
34
+ readonly operationId: string;
35
+ readonly messageId: string;
36
+ readonly sessionId: string;
37
+ readonly goalRevision: number;
38
+ readonly executionEpoch?: string;
39
+ readonly delivery: 'queued' | 'observed';
40
+ readonly admission: 'not_requested' | 'pending' | 'admitted' | 'rejected';
41
+ readonly effect: 'not_requested' | 'pending' | 'applied' | 'unknown' | 'rejected';
42
+ readonly error?: string;
43
+ readonly observedAt?: string;
44
+ readonly attemptRef?: string;
45
+ readonly completionRecorded?: boolean;
46
+ }
47
+ export interface ContextWindowRecord {
48
+ readonly state: 'prepared';
49
+ readonly windowId: string;
50
+ readonly workId: string;
51
+ readonly conversationId: string;
52
+ readonly previousWindowId?: string;
53
+ readonly historyCursor?: string;
54
+ readonly hint: string;
55
+ readonly obligationRefs: readonly string[];
56
+ readonly budgetRef: string;
57
+ readonly at: string;
58
+ }
59
+ export interface WorkNoteRevision {
60
+ readonly noteId: string;
61
+ readonly revision: number;
62
+ readonly workId: string;
63
+ readonly conversationId: string;
64
+ readonly text: string;
65
+ readonly sourceRefs: readonly string[];
66
+ readonly at: string;
67
+ }
68
+ /** Bounded task-detail projection; roster queries do not hydrate the mailbox. */
69
+ export interface AgentSupervisionReport {
70
+ readonly recovery?: {
71
+ readonly state: 'settled' | 'waiting_user' | 'waiting_agent' | 'observing' | 'reconciliation_required' | 'user_stopped' | 'legacy_unbound' | 'blocked' | 'repairable';
72
+ readonly blockers: readonly string[];
73
+ readonly nextAction: 'none' | 'native_user_decision' | 'inspect_original_results' | 'current_user_required' | 'adopt_with_current_user' | 'inspect_blocker_and_change_method' | 'inspect_current_facts' | 'coordinate_resume' | 'answer_agent_request' | 'observe_current_attempt';
74
+ readonly expectedRevision?: number;
75
+ readonly requestId?: string;
76
+ readonly expectedRequestRevision?: number;
77
+ readonly replayAllowed?: false;
78
+ };
79
+ readonly requests: readonly AgentDecisionRequest[];
80
+ readonly receipts: readonly AgentCommandReceipt[];
81
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,44 @@
1
+ /** Read-only presentation facts. Actions remain subject to their original host gates. */
2
+ export interface AttentionCard {
3
+ readonly cardId: string;
4
+ readonly kind: string;
5
+ readonly content: string;
6
+ readonly resolvedState?: 'open' | 'resolved';
7
+ readonly actions?: readonly {
8
+ readonly id: string;
9
+ readonly channel?: string;
10
+ readonly seam?: string;
11
+ readonly payload?: Readonly<Record<string, unknown>>;
12
+ }[];
13
+ readonly refs?: Readonly<Record<string, string>>;
14
+ readonly resolution?: {
15
+ readonly state: string;
16
+ };
17
+ readonly completionReview?: import('./delegation.ts').SessionCompletionReview;
18
+ }
19
+ export interface BotAttentionItem {
20
+ readonly id: string;
21
+ readonly workspaceId: string;
22
+ readonly botName: string;
23
+ readonly kind: 'question' | 'approval' | 'confirmation';
24
+ readonly title: string;
25
+ readonly createdAt?: string;
26
+ readonly expiresAt?: string;
27
+ readonly messageId?: string;
28
+ readonly sessionId?: string;
29
+ readonly card?: AttentionCard;
30
+ }
31
+ export interface BotAttentionRequest {
32
+ readonly workspaceId?: string;
33
+ }
34
+ export type BotAttentionResult = {
35
+ readonly ok: true;
36
+ readonly items: readonly BotAttentionItem[];
37
+ } | {
38
+ readonly ok: false;
39
+ readonly code: string;
40
+ };
41
+ /** Current conversational decision, including when its source lies outside the returned page. */
42
+ export interface BotDecisionSnapshot {
43
+ readonly activeReplyQuestionId: string | null;
44
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,29 @@
1
+ import type { LocalAccessLevel } from './index.ts';
2
+ /** Device-local user authority. Never supplied by a model or copied into a worker profile. */
3
+ export interface BotAccessPolicy {
4
+ readonly workspaceId: string;
5
+ readonly conversationId: string;
6
+ readonly accessLevel: LocalAccessLevel;
7
+ readonly revision: number;
8
+ readonly updatedAt: string;
9
+ readonly source: 'legacy_migration' | 'new_bot' | 'local_ui';
10
+ }
11
+ export interface BotAccessPolicyReadRequest {
12
+ readonly workspaceId?: string;
13
+ readonly conversationId?: string;
14
+ }
15
+ export interface BotAccessPolicyUpdateRequest {
16
+ readonly workspaceId: string;
17
+ readonly expectedRevision: number;
18
+ readonly accessLevel: LocalAccessLevel;
19
+ }
20
+ export type BotAccessPolicyResult = {
21
+ readonly ok: true;
22
+ readonly policy: BotAccessPolicy | null;
23
+ readonly inherited: boolean;
24
+ readonly botName?: string;
25
+ } | {
26
+ readonly ok: false;
27
+ readonly code: 'INVALID_INPUT' | 'NOT_FOUND' | 'OUT_OF_SCOPE' | 'POLICY_CONFLICT' | 'POLICY_UNAVAILABLE' | 'PROJECT_AGENT_DISABLED';
28
+ readonly policy?: BotAccessPolicy;
29
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ /** Independent read sections; availability never grants execution authority. */
2
+ export type BotConversationReadView = 'interactions' | 'cards';
3
+ export interface BotConversationReadAvailability {
4
+ readonly section: 'messages' | 'cards';
5
+ readonly state: 'ready' | 'rebuilding' | 'unavailable';
6
+ readonly sourceVersion?: string;
7
+ readonly code?: string;
8
+ }
9
+ /** Small durable accounting event; full results and provider checkpoints remain referenced. */
10
+ export interface CoordinationUsageObservation {
11
+ readonly kind: 'usage_observed';
12
+ readonly workId: string;
13
+ readonly observationId: string;
14
+ readonly tokens: number | null;
15
+ readonly costUsd: number | null;
16
+ }
17
+ /** A durable input receipt is independent of this execution/recovery barrier. */
18
+ export interface BotRecoveryStatus {
19
+ readonly state: 'blocked';
20
+ readonly reason: 'history_conflict' | 'reconciliation_required' | 'recovery_failed';
21
+ readonly code: string;
22
+ readonly phase: string;
23
+ readonly retryable: boolean;
24
+ }
25
+ export declare function projectBotRecoveryStatus(error: unknown, phase?: string): BotRecoveryStatus;
@@ -0,0 +1,9 @@
1
+ export function projectBotRecoveryStatus(error, phase = 'unknown') {
2
+ const code = typeof error === 'string' && /^[a-zA-Z0-9_:-]{1,120}$/.test(error) ? error : 'RECOVERY_FAILED';
3
+ const conflict = ['coordination_legacy_changed', 'coordination_hash_mismatch', 'coordination_journal_missing',
4
+ 'coordination_legacy_seal_invalid', 'coordination_repair_incomplete', 'coordination_fence_incomplete', 'coordination_fence_invalid', 'coordination_writer_fence_missing',
5
+ 'coordination_writer_upgrade_required', 'coordination_schema_unsupported'].includes(code);
6
+ const held = code === 'coordination_reconciliation_required';
7
+ return { state: 'blocked', reason: held ? 'reconciliation_required' : conflict ? 'history_conflict' : 'recovery_failed', code,
8
+ phase: /^[a-z_]{1,40}$/.test(phase) ? phase : 'unknown', retryable: !conflict && !held };
9
+ }
@@ -0,0 +1,13 @@
1
+ import type { BotProfile } from './project.ts';
2
+ import type { ModelReasoningEffort } from './model-reasoning.ts';
3
+ /** A user choice for the Bot's future replies; never a per-input runtime override. */
4
+ export interface BotModelSelectionUpdateRequest {
5
+ readonly workspaceId: string;
6
+ readonly modelProviderId: string;
7
+ readonly reasoningEffort?: ModelReasoningEffort;
8
+ }
9
+ export interface BotModelSelectionUpdateResult {
10
+ readonly ok: boolean;
11
+ readonly code?: string;
12
+ readonly profile?: BotProfile;
13
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,48 @@
1
+ /** Native address copies have independent instance identities; never a migrated webview. */
2
+ export interface BrowserWindowIdentity {
3
+ readonly viewId: string;
4
+ readonly windowId: string;
5
+ readonly generation: string;
6
+ }
7
+ export interface BrowserWindowCopyRequest {
8
+ readonly conversationId: string;
9
+ readonly browserTabId: string;
10
+ readonly webContentsId: number;
11
+ }
12
+ export type BrowserWindowAction = 'navigate' | 'back' | 'forward' | 'reload' | 'stop' | 'return' | 'close';
13
+ export interface BrowserWindowState {
14
+ readonly identity: BrowserWindowIdentity;
15
+ readonly conversationId: string;
16
+ readonly browserTabId: string;
17
+ readonly url: string;
18
+ readonly title: string;
19
+ readonly loading: boolean;
20
+ readonly canBack: boolean;
21
+ readonly canForward: boolean;
22
+ readonly failure: string | null;
23
+ readonly sequence: number;
24
+ readonly copy: true;
25
+ }
26
+ export type BrowserWindowResult = {
27
+ readonly ok: true;
28
+ readonly state: BrowserWindowState;
29
+ readonly returnStatus?: 'returned' | 'source_tab_closed';
30
+ } | {
31
+ readonly ok: false;
32
+ readonly status: 'invalid_request' | 'scope_denied' | 'source_unavailable' | 'limit_reached' | 'stale_view' | 'cancelled';
33
+ };
34
+ export interface BrowserWindowReturnRequest {
35
+ readonly requestId: string;
36
+ readonly identity: BrowserWindowIdentity;
37
+ readonly conversationId: string;
38
+ readonly workspaceId?: string;
39
+ readonly browserTabId: string;
40
+ readonly expiresAt: number;
41
+ }
42
+ export interface BrowserWindowReturnAck {
43
+ readonly requestId: string;
44
+ readonly identity: BrowserWindowIdentity;
45
+ readonly status: 'returned' | 'source_tab_closed' | 'cancelled';
46
+ }
47
+ export declare function normalizeBrowserWindowUrl(raw: unknown): string | null;
48
+ export declare function normalizeBrowserWindowCopyRequest(raw: unknown): BrowserWindowCopyRequest | null;
@@ -0,0 +1,23 @@
1
+ export function normalizeBrowserWindowUrl(raw) {
2
+ if (typeof raw !== 'string' || raw.length > 8192)
3
+ return null;
4
+ try {
5
+ const url = new URL(raw);
6
+ return ['http:', 'https:'].includes(url.protocol) && !url.username && !url.password ? url.href : null;
7
+ }
8
+ catch {
9
+ return null;
10
+ }
11
+ }
12
+ export function normalizeBrowserWindowCopyRequest(raw) {
13
+ if (!raw || typeof raw !== 'object' || Array.isArray(raw))
14
+ return null;
15
+ const v = raw;
16
+ if (Object.keys(v).some(k => !['conversationId', 'browserTabId', 'webContentsId'].includes(k)))
17
+ return null;
18
+ if (![v.conversationId, v.browserTabId].every(x => typeof x === 'string' && x.length > 0 && x.length <= 256))
19
+ return null;
20
+ if (!Number.isSafeInteger(v.webContentsId) || v.webContentsId <= 0)
21
+ return null;
22
+ return { conversationId: v.conversationId, browserTabId: v.browserTabId, webContentsId: v.webContentsId };
23
+ }
@@ -0,0 +1,20 @@
1
+ /** A factual refusal layer; it never grants permission or changes acceptance. */
2
+ export interface CapabilityBlocker {
3
+ readonly stage: 'projection' | 'role' | 'delegation_admission' | 'permission' | 'execution';
4
+ readonly reason: string;
5
+ readonly capabilityId?: string;
6
+ readonly required?: readonly string[];
7
+ readonly available?: readonly string[];
8
+ readonly missing?: readonly string[];
9
+ readonly criterionIds?: readonly string[];
10
+ readonly alternatives?: readonly string[];
11
+ readonly retryable: boolean;
12
+ readonly userActionRequired: boolean;
13
+ }
14
+ export interface DelegationCapabilityAdmission {
15
+ readonly required: readonly string[];
16
+ readonly inventoryHash: string | null;
17
+ readonly inventoryKnown: boolean;
18
+ readonly requirementsDeclared: boolean;
19
+ readonly checkedAt: string;
20
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,81 @@
1
+ /** Coordination authority is issued by the local host, never by model arguments. */
2
+ export type { ReplyDeliveryReceipt, IntentReplyBinding, ReplyGoalScope } from './reply-delivery.ts';
3
+ export type { InputDispositionKind, InputDisposition, IntentRequirement, IntentInterpretation, GoalCoverageItem, WorkDisposition, IntentAssessment, IntentCoordination, IntentClosureRequest, IntentDecisionReceipt, IntentCoordinationRequest, CoordinationDecisionFrame, ProgressObservation } from './intent-coordination.ts';
4
+ export type CoordinationAction = 'parallel' | 'augment' | 'revise' | 'query' | 'answer' | 'cancel' | 'replace' | 'handoff' | 'resume';
5
+ export type CoordinationLifecycle = 'active' | 'paused' | 'cancelled' | 'fulfilled';
6
+ export interface CoordinationMandate {
7
+ schemaVersion: 1;
8
+ intentSchemaVersion?: 1;
9
+ mandateId: string;
10
+ workId: string;
11
+ workspaceId: string;
12
+ parentConversationId: string;
13
+ rootInputIds: string[];
14
+ revisionInputIds: string[];
15
+ goalRevision: number;
16
+ allowedActions: CoordinationAction[];
17
+ sessionIds: string[];
18
+ revokedSessionIds?: string[];
19
+ executionBindings?: Record<string, CoordinationExecutionBinding>;
20
+ materialRefs: string[];
21
+ policyRevision: string;
22
+ lifecycle: CoordinationLifecycle;
23
+ }
24
+ /** Semantic routing is the model's decision; identity, authority and versions are host facts. */
25
+ export interface CoordinationDecision {
26
+ operationId: string;
27
+ workId: string;
28
+ expectedRevision: number;
29
+ action: CoordinationAction;
30
+ sourceInputIds: string[];
31
+ sourceDecisionRef?: string;
32
+ sourceEventIds: string[];
33
+ sessionId?: string;
34
+ reason: string;
35
+ }
36
+ export type TaskTransitionPhase = 'recorded' | 'stopping' | 'awaiting_outcome' | 'ready' | 'started' | 'completed' | 'blocked';
37
+ export interface TaskTransition {
38
+ diagnostic?: import('./capability-admission.ts').CapabilityBlocker;
39
+ schemaVersion: 1;
40
+ operationId: string;
41
+ workId: string;
42
+ mandateId: string;
43
+ expectedGoalRevision: number;
44
+ sourceInputIds: string[];
45
+ sourceEventIds: string[];
46
+ initiator: 'project_agent';
47
+ decisionSource: 'user_revision' | 'execution_repair';
48
+ action: CoordinationAction;
49
+ reason: string;
50
+ oldSessionId?: string;
51
+ replacementSessionId?: string;
52
+ executionEpoch: string;
53
+ phase: TaskTransitionPhase;
54
+ minimumExecutorVersion: 1 | 2 | 3;
55
+ executionAdmission?: 'queued' | 'admitted' | 'rejected';
56
+ executionEffect?: 'pending' | 'applied' | 'unknown' | 'rejected';
57
+ executionAttemptRef?: string;
58
+ reconciliationRef?: string;
59
+ controlOperationRef?: string;
60
+ updatedAt: string;
61
+ }
62
+ export interface CoordinationExecutionBinding {
63
+ sessionId?: string;
64
+ workId: string;
65
+ goalRevision: number;
66
+ executionEpoch: string;
67
+ }
68
+ /** Factual view of a durable operation; completed means disposition applied, not task success. */
69
+ export interface CoordinationSessionFacts {
70
+ readonly executionAdmission?: TaskTransition['executionAdmission'];
71
+ readonly executionEffect?: TaskTransition['executionEffect'];
72
+ readonly executionAttemptRef?: string;
73
+ readonly operationId: string;
74
+ readonly action: CoordinationAction;
75
+ readonly phase: TaskTransitionPhase;
76
+ readonly reason: string;
77
+ readonly goalRevision: number;
78
+ readonly priorSessionId?: string;
79
+ readonly replacementSessionId?: string;
80
+ readonly replacementTitle?: string;
81
+ }
@@ -0,0 +1 @@
1
+ export {};