@peer-agent/protocol 0.1.0-rc.34 → 0.1.0-rc.36

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.
@@ -87,6 +87,7 @@ export interface WorkSessionConversationMeta extends SessionQueueFacts {
87
87
  readonly executionOwnership?: ExecutionOwnership;
88
88
  }
89
89
  export interface WorkSession extends SessionQueueFacts {
90
+ readonly executionOwnership?: ExecutionOwnership;
90
91
  readonly followUp?: import('./task-overview.ts').FollowUpProjection;
91
92
  readonly verificationProgress?: VerificationProgress;
92
93
  readonly completionReviewRequired?: boolean;
@@ -285,6 +286,13 @@ export interface VerificationVerdict {
285
286
  export interface SessionVerificationDetail {
286
287
  readonly sessionId: string;
287
288
  readonly outcome: VerificationOutcome;
289
+ /** A host review is active. The outcome describes evidence already recorded. */
290
+ readonly verificationInProgress?: true;
291
+ /** A persisted explicit review of the current task and report. */
292
+ readonly explicitVerification?: {
293
+ readonly verdictRef: string;
294
+ readonly outcome: VerificationOutcome;
295
+ };
288
296
  readonly checks: readonly {
289
297
  readonly name: string;
290
298
  readonly result: 'passed' | 'failed';
@@ -89,6 +89,7 @@ export function projectWorkSession(plan, conversationMeta) {
89
89
  statusLabel: projected.statusLabel,
90
90
  cancelable: projected.cancelable,
91
91
  followUp: projected.followUp,
92
+ ...(conversationMeta.executionOwnership ? { executionOwnership: conversationMeta.executionOwnership } : {}),
92
93
  ...(projected.needsYouReason ? { needsYouReason: projected.needsYouReason } : {}),
93
94
  ...(conversationMeta.coordination ? { coordination: conversationMeta.coordination } : {}),
94
95
  spawnedAt: conversationMeta.spawnedAt ?? plan.updatedAt ?? '',
@@ -1,4 +1,5 @@
1
1
  import type { BotDocumentReference } from './document-reference.ts';
2
+ import type { InteractiveResultReference } from './interactive-result.ts';
2
3
  /** Read-only display facts. A saved operation is not proof that its task completed. */
3
4
  export interface EvidenceSourceDescription {
4
5
  readonly evidenceRef: string;
@@ -15,6 +16,7 @@ export interface ProjectAgentEvidenceReadRequest {
15
16
  readonly evidenceRefs?: readonly string[];
16
17
  }
17
18
  export interface ProjectAgentEvidenceReadResult {
19
+ readonly interactiveAvailability?: 'origin_only';
18
20
  readonly deliveryStatus?: 'available' | 'scope_denied' | 'unavailable';
19
21
  readonly deliveries?: readonly EvidenceDelivery[];
20
22
  readonly ok: boolean;
@@ -32,7 +34,7 @@ export interface EvidenceDeliveryBinding {
32
34
  readonly evidenceRef: string;
33
35
  readonly artifactRef: string;
34
36
  }
35
- export interface EvidenceDelivery extends EvidenceDeliveryBinding {
37
+ export interface EvidenceFileDelivery extends EvidenceDeliveryBinding {
36
38
  readonly kind: 'file' | 'code-change' | 'image';
37
39
  readonly label: string;
38
40
  /** A locator, never a grant or proof of historical bytes. Read through the existing scoped service. */
@@ -49,3 +51,14 @@ export interface EvidenceDelivery extends EvidenceDeliveryBinding {
49
51
  };
50
52
  readonly previewUnavailable?: boolean;
51
53
  }
54
+ /** A published domain reference. Never a filesystem locator or execution/verification receipt. */
55
+ export interface EvidenceInteractiveDelivery extends EvidenceDeliveryBinding {
56
+ readonly kind: 'interactive';
57
+ readonly label: string;
58
+ readonly interactiveReference: InteractiveResultReference;
59
+ readonly specHash: string;
60
+ readonly reference?: never;
61
+ readonly savedPreview?: never;
62
+ readonly previewUnavailable?: never;
63
+ }
64
+ export type EvidenceDelivery = EvidenceFileDelivery | EvidenceInteractiveDelivery;
package/dist/goal.d.ts CHANGED
@@ -163,6 +163,7 @@ export interface EvidenceIndexRecord {
163
163
  readonly capabilityId?: string;
164
164
  readonly toolName?: string;
165
165
  readonly createdAt: string;
166
+ readonly interactiveInspection?: import('./interactive-verification.ts').InteractiveInspectionReceipt;
166
167
  readonly artifactRefs?: readonly string[];
167
168
  /** Redacted, bounded execution-time snapshot of a successful local Tool Result. */
168
169
  readonly bodyPreview?: {
package/dist/index.d.ts CHANGED
@@ -2,6 +2,8 @@ export type { AttentionCard, BotDecisionSnapshot, BotAttentionItem, BotAttention
2
2
  export type { ProjectWorkBudgetLimits, ProjectWorkBudgetBoundary, ProjectReplyRecoveryAction, ProjectWorkReceipt, ProjectWorkRecovery, ProjectWorkState, ProjectTurnEnd, ProjectReplyFailureStatus, ProjectAgentSilentWait, } from './work-coordination.ts';
3
3
  export type { CoordinationAction, CoordinationLifecycle, CoordinationMandate, CoordinationDecision, TaskTransitionPhase, TaskTransition, CoordinationExecutionBinding, CoordinationSessionFacts, } from './delegation-coordination.ts';
4
4
  export { deriveSessionFacts, type SessionFactSnapshot } from './session-facts.ts';
5
+ export { runtimeSessionFacts, runtimeSessionOwnership, hasPendingRuntimeSessions } from './runtime-session-facts.ts';
6
+ export type { RuntimeHandling, RuntimeSessionFacts, RuntimeSessionOwnership, ResourceWaitScope, ResourceWaitReference, ResourceWaitFact, ResourceWaitInspection, ResourceWaitPort } from './runtime-session-facts.ts';
5
7
  export { projectAgentFailureKind, classifyProjectAgentFailure, type ProjectRecoveryFailureKind, type ProviderRequestRecovery, type ProjectAgentTurnRecovery, type ReplyAnchorCandidate } from './project-agent-failure.ts';
6
8
  export type { EvidenceSourceDescription, EvidenceDeliveryBinding, EvidenceDelivery, ProjectAgentEvidenceReadRequest, ProjectAgentEvidenceReadResult } from './evidence-inspection.ts';
7
9
  export { toolActivityPreview, toolActivitySummary } from './tool-activity-preview.ts';
@@ -15,7 +17,7 @@ export type { UiDeliveryIdentity, UiDeliveryRequirement, UiDeliveryObservation,
15
17
  export { REMOTE_PROTOCOL_VERSION, parseRemoteReadRequest, admitRemoteRead } from './remote-access.ts';
16
18
  export type { RemoteReadRequest, RemoteReadContext, RemoteReadRejection, RemoteReadAdmission } from './remote-access.ts';
17
19
  export { REMOTE_PROJECT_LIMITS, parseRemoteProjectRequest, admitRemoteProject, parseRemoteDelegationProjection } from './remote-access.ts';
18
- export type { RemoteProjectGrant, RemoteProjectRequest, RemoteProjectContext, RemoteProjectRejection, RemoteProjectAdmission, RemoteDelegationProjection, } from './remote-access.ts';
20
+ export type { RemoteProjectGrant, RemoteProjectRequest, RemoteProjectInteractiveResult, RemoteProjectContext, RemoteProjectRejection, RemoteProjectAdmission, RemoteDelegationProjection, } from './remote-access.ts';
19
21
  export type LocalAccessLevel = 'ask_before_local' | 'session_local' | 'restricted_local' | 'full_local';
20
22
  export type { BotAccessPolicy, BotAccessPolicyReadRequest, BotAccessPolicyUpdateRequest, BotAccessPolicyResult } from './bot-access-policy.ts';
21
23
  export type { ConversationLifetimeUsage, ProviderRequestUsage, RuntimeTurnUsage, UsageAmounts, UsageScope, } from './usage-accounting.ts';
@@ -904,13 +906,17 @@ export type { CapabilityBlocker, DelegationCapabilityAdmission } from './capabil
904
906
  export * from './project-input-recovery.ts';
905
907
  export { botResourceReferences } from './resource-reference-hints.ts';
906
908
  export type { ResourceWindowCheckpointRequest, ResourceWindowCheckpointAck, ResourceWindowCloseBlocked, ResourceWindowReturnRequest, ResourceWindowReturnAck, ResourceWindowHistoryEntry, ResourceWindowHistoryResult, ResourceWindowReadRequest, ResourceWindowReadResult, ResourceWindowResource, ResourceWindowNavigation, ResourceWindowOpenRequest, ResourceWindowOwner, ResourceWindowIdentity, ResourceWindowContext, ResourceWindowStatus, ResourceWindowResult } from './resource-window.ts';
907
- export { normalizeResourceWindowRequest, normalizeResourceWindowOwner, normalizeResourceWindowNavigation } from './resource-window.ts';
909
+ export { normalizeResourceWindowRequest, normalizeResourceWindowOwner, normalizeResourceWindowNavigation, resourceWindowWorkspaceId, resourceWindowTask, normalizeResourceLayout, normalizeResourceLayoutSnapshot, normalizeResourceInteractiveSession, normalizeResourceRecentReference, interactiveReferenceKey } from './resource-window.ts';
910
+ export type { ResourceLayoutSnapshot, ResourcePresentationApi, ResourceInteractiveTab, ResourceInteractiveSession, ResourceRecentReference } from './resource-window.ts';
908
911
  export * from './browser-window.js';
909
912
  export * from './resource-feedback.js';
913
+ export * from './resource-feedback-transport.js';
910
914
  export * from './resource-edit.ts';
911
915
  export * from './resource-file-replace.ts';
912
916
  export * from './resource-edit-execution.ts';
913
917
  export { decideFollowUp, type FollowUpOwner, type FollowUpReason, type FollowUpProjection } from './task-overview.ts';
914
918
  export type { SessionExecutionIdentity, StopBarrierReceipt, SessionControlOperation, ExecutionResourceBlocker, ExecutionResourceClaim, ExecutionResourceScope } from './session-control.ts';
915
- export { controlPhasesForOrigin } from './session-control.ts';
919
+ export { controlPhasesForOrigin, normalizeSessionExecutionIdentity } from './session-control.ts';
916
920
  export * from './input-prediction.ts';
921
+ export * from './interactive-result.ts';
922
+ export * from './interactive-verification.ts';
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export { deriveSessionFacts } from "./session-facts.js";
2
+ export { runtimeSessionFacts, runtimeSessionOwnership, hasPendingRuntimeSessions } from "./runtime-session-facts.js";
2
3
  export { projectAgentFailureKind, classifyProjectAgentFailure } from "./project-agent-failure.js";
3
4
  export { toolActivityPreview, toolActivitySummary } from "./tool-activity-preview.js";
4
5
  export { isModelReasoningEffort, modelReasoningLevels, modelDefaultReasoningEffort } from "./model-reasoning.js";
@@ -49,12 +50,15 @@ export * from "./local-git.js";
49
50
  export * from "./agent-supervision.js";
50
51
  export * from "./project-input-recovery.js";
51
52
  export { botResourceReferences } from "./resource-reference-hints.js";
52
- export { normalizeResourceWindowRequest, normalizeResourceWindowOwner, normalizeResourceWindowNavigation } from "./resource-window.js";
53
+ export { normalizeResourceWindowRequest, normalizeResourceWindowOwner, normalizeResourceWindowNavigation, resourceWindowWorkspaceId, resourceWindowTask, normalizeResourceLayout, normalizeResourceLayoutSnapshot, normalizeResourceInteractiveSession, normalizeResourceRecentReference, interactiveReferenceKey } from "./resource-window.js";
53
54
  export * from './browser-window.js';
54
55
  export * from './resource-feedback.js';
56
+ export * from './resource-feedback-transport.js';
55
57
  export * from "./resource-edit.js";
56
58
  export * from "./resource-file-replace.js";
57
59
  export * from "./resource-edit-execution.js";
58
60
  export { decideFollowUp } from "./task-overview.js";
59
- export { controlPhasesForOrigin } from "./session-control.js";
61
+ export { controlPhasesForOrigin, normalizeSessionExecutionIdentity } from "./session-control.js";
60
62
  export * from "./input-prediction.js";
63
+ export * from "./interactive-result.js";
64
+ export * from "./interactive-verification.js";
@@ -131,6 +131,8 @@ export type IntentCoordinationRequest = {
131
131
  };
132
132
  /** Bounded host projection. Available actions are a snapshot, not grants. */
133
133
  export interface CoordinationDecisionFrame {
134
+ readonly resourceWaits?: readonly import('./runtime-session-facts.ts').ResourceWaitFact[];
135
+ readonly resourceWaitError?: string;
134
136
  readonly workId: string;
135
137
  readonly workRevision: number;
136
138
  readonly goalRevision: number;
@@ -0,0 +1,363 @@
1
+ import type { DataLevel } from './index.ts';
2
+ import type { SessionExecutionIdentity } from './session-control.ts';
3
+ /** Host-neutral content and presentation contracts. References never grant access. */
4
+ export type InteractiveJSON = null | boolean | number | string | readonly InteractiveJSON[] | {
5
+ readonly [key: string]: InteractiveJSON;
6
+ };
7
+ export interface InteractiveOwner {
8
+ readonly workspaceId: string;
9
+ readonly conversationId: string;
10
+ }
11
+ export interface InteractiveResultReference {
12
+ readonly owner: InteractiveOwner;
13
+ readonly resultId: string;
14
+ readonly contentVersion: string;
15
+ }
16
+ export interface InteractivePublicationCallReference {
17
+ readonly owner: InteractiveOwner;
18
+ readonly conversationId: string;
19
+ readonly toolCallId: string;
20
+ }
21
+ export type InteractivePublicationIntent = {
22
+ readonly kind: 'create';
23
+ } | {
24
+ readonly kind: 'revise';
25
+ readonly base: InteractiveResultReference;
26
+ };
27
+ export type AdmittedMaterialReference = {
28
+ readonly kind: 'tool-result';
29
+ readonly conversationId: string;
30
+ readonly toolCallId: string;
31
+ readonly expectedContentVersion: string;
32
+ } | {
33
+ readonly kind: 'user-material';
34
+ readonly messageId: string;
35
+ readonly attachmentId: string;
36
+ readonly expectedContentVersion: string;
37
+ } | {
38
+ readonly kind: 'model-data';
39
+ readonly value: InteractiveJSON;
40
+ };
41
+ export interface BoundedDataSelector {
42
+ readonly path?: readonly string[];
43
+ readonly fields?: readonly string[];
44
+ readonly start?: number;
45
+ readonly limit?: number;
46
+ }
47
+ export interface InteractiveInputBinding {
48
+ readonly bindingId: string;
49
+ readonly source: AdmittedMaterialReference;
50
+ readonly selector?: BoundedDataSelector;
51
+ }
52
+ export interface InteractiveMaterialNotice {
53
+ readonly source: Exclude<AdmittedMaterialReference, {
54
+ readonly kind: 'model-data';
55
+ }>;
56
+ readonly format: 'peer-tool-observation-1' | 'peer-user-upload-1';
57
+ readonly selectorRoots: readonly string[];
58
+ readonly dataLevel: DataLevel;
59
+ readonly truncated: boolean;
60
+ readonly redacted: boolean;
61
+ }
62
+ /** Host-only Provider observation, attached non-enumerably to its actual Tool Result. */
63
+ export interface CanonicalToolMaterialObservation {
64
+ readonly schemaVersion: 1;
65
+ readonly toolCallId: string;
66
+ readonly capabilityId: string;
67
+ readonly evidenceId: string;
68
+ readonly payload: InteractiveJSON;
69
+ }
70
+ export interface InteractiveResultDraft {
71
+ readonly publication: InteractivePublicationIntent;
72
+ readonly title: string;
73
+ readonly textFallback: string;
74
+ readonly program: string;
75
+ readonly inputs: readonly InteractiveInputBinding[];
76
+ }
77
+ export interface InteractiveMaterialProvenance {
78
+ readonly bindingId: string;
79
+ readonly source: Exclude<AdmittedMaterialReference, {
80
+ readonly kind: 'model-data';
81
+ }> | {
82
+ readonly kind: 'model-data';
83
+ readonly contentDigest: string;
84
+ };
85
+ readonly contentVersion: string;
86
+ readonly selectedDigest: string;
87
+ readonly selector?: BoundedDataSelector;
88
+ readonly observedAt: string;
89
+ readonly capturedAt: string;
90
+ readonly truncated: boolean;
91
+ readonly redacted: boolean;
92
+ readonly dataLevel: DataLevel;
93
+ readonly evidenceRefs: readonly string[];
94
+ }
95
+ export type InteractiveStateValue = string | number | boolean;
96
+ export interface InteractiveStateField {
97
+ readonly type: 'string' | 'number' | 'boolean';
98
+ readonly min?: number;
99
+ readonly max?: number;
100
+ readonly options?: readonly string[];
101
+ }
102
+ export type InteractiveStateSchema = Readonly<Record<string, InteractiveStateField>>;
103
+ export type InteractiveStateValues = Readonly<Record<string, InteractiveStateValue>>;
104
+ export interface InteractiveStateSnapshot {
105
+ readonly result: InteractiveResultReference;
106
+ readonly specHash: string;
107
+ readonly stateSchemaHash: string;
108
+ readonly stateRevision: number;
109
+ readonly values: InteractiveStateValues;
110
+ readonly inputDrafts: Readonly<Record<string, string>>;
111
+ readonly stateDigest: string;
112
+ readonly updatedAt: string;
113
+ readonly requestId: string;
114
+ }
115
+ export interface InteractiveElement {
116
+ readonly type: 'element';
117
+ readonly typeName: string;
118
+ readonly statementId?: string;
119
+ readonly stateTarget?: string;
120
+ readonly props: Readonly<Record<string, unknown>>;
121
+ }
122
+ export interface InteractiveContent {
123
+ readonly schemaVersion: 1;
124
+ readonly engine: string;
125
+ readonly libraryVersion: string;
126
+ readonly specHash: string;
127
+ readonly title: string;
128
+ readonly textFallback: string;
129
+ readonly program: string;
130
+ readonly bindings: Readonly<Record<string, InteractiveJSON>>;
131
+ readonly initialValues: InteractiveStateValues;
132
+ readonly stateSchema: InteractiveStateSchema;
133
+ readonly stateSchemaHash: string;
134
+ readonly numberPolicy: string;
135
+ readonly tree?: InteractiveElement;
136
+ }
137
+ export interface InteractivePublishedResult {
138
+ readonly reference: InteractiveResultReference;
139
+ readonly content: InteractiveContent;
140
+ readonly source: SessionExecutionIdentity & {
141
+ readonly conversationId: string;
142
+ readonly workId?: string;
143
+ readonly toolCallId: string;
144
+ };
145
+ readonly provenance: readonly InteractiveMaterialProvenance[];
146
+ readonly predecessor?: InteractiveResultReference;
147
+ readonly evidenceRef: string;
148
+ readonly artifactRef: string;
149
+ readonly dataLevel: InteractiveMaterialProvenance['dataLevel'];
150
+ readonly createdAt: string;
151
+ }
152
+ export interface InteractivePublicationPermissionScope {
153
+ readonly kind: 'interactive-result';
154
+ readonly capabilityId: typeof INTERACTIVE_PUBLISH_CAPABILITY;
155
+ readonly owner: InteractiveOwner;
156
+ readonly source: InteractivePublishedResult['source'];
157
+ readonly parameterDigest: string;
158
+ readonly dataLevel: DataLevel;
159
+ }
160
+ export interface InteractiveUserArtifact {
161
+ readonly kind: 'interactive';
162
+ readonly ref: string;
163
+ readonly label: string;
164
+ readonly reference: InteractiveResultReference;
165
+ readonly specHash: string;
166
+ }
167
+ export type InteractivePublicationStatus = 'not_committed' | 'index_pending' | 'published' | 'unknown';
168
+ export interface InteractiveInspectRequest {
169
+ readonly target: {
170
+ readonly kind: 'result';
171
+ readonly reference: InteractiveResultReference;
172
+ } | {
173
+ readonly kind: 'publication';
174
+ readonly reference: InteractivePublicationCallReference;
175
+ };
176
+ readonly view: 'metadata' | 'text' | 'program' | 'data' | 'evaluate';
177
+ readonly bindingId?: string;
178
+ readonly selector?: BoundedDataSelector;
179
+ /** Only an explicitly admitted, immutable user selection; never the latest mutable state. */
180
+ readonly followupId?: string;
181
+ readonly offset?: number;
182
+ readonly limit?: number;
183
+ }
184
+ export interface InteractiveViewHandle {
185
+ readonly viewId: string;
186
+ readonly windowId: string;
187
+ readonly generation: string;
188
+ }
189
+ export interface InteractiveWriter {
190
+ readonly viewId: string;
191
+ readonly generation: string;
192
+ readonly token: string;
193
+ }
194
+ export interface InteractiveFollowup {
195
+ readonly followupId: string;
196
+ readonly recipient: InteractiveOwner;
197
+ readonly result: InteractiveResultReference;
198
+ readonly specHash: string;
199
+ readonly stateRevision: number;
200
+ readonly stateDigest: string;
201
+ readonly selectionDigest: string;
202
+ readonly values: InteractiveStateValues;
203
+ readonly dataLevel: DataLevel;
204
+ readonly capturedAt: string;
205
+ readonly excerpt: string;
206
+ }
207
+ export type InteractiveResultSummary = {
208
+ readonly reference: InteractiveResultReference;
209
+ readonly title: string;
210
+ readonly textFallback: string;
211
+ readonly dataLevel: DataLevel;
212
+ } & ({
213
+ readonly availability?: 'available';
214
+ readonly specHash: string;
215
+ readonly libraryVersion: string;
216
+ } | {
217
+ readonly availability: 'cleaned';
218
+ readonly cleanedAt: string;
219
+ readonly truncated: boolean;
220
+ });
221
+ export type InteractiveResult<T extends object = Record<never, never>> = ({
222
+ readonly ok: true;
223
+ } & T) | {
224
+ readonly ok: false;
225
+ readonly code: string;
226
+ readonly summary?: InteractiveResultSummary;
227
+ };
228
+ export interface InteractiveSourceIssue {
229
+ readonly bindingId: string;
230
+ readonly status: 'attachment_removed' | 'source_changed' | 'source_unavailable';
231
+ }
232
+ export interface InteractiveOpenView {
233
+ readonly handle: InteractiveViewHandle;
234
+ readonly result: InteractivePublishedResult;
235
+ readonly state: InteractiveStateSnapshot;
236
+ readonly sourceIssues?: readonly InteractiveSourceIssue[];
237
+ }
238
+ export interface InteractiveVersionNavigation {
239
+ readonly reference: InteractiveResultReference;
240
+ readonly head: InteractiveResultReference;
241
+ readonly predecessor?: InteractiveResultReference;
242
+ }
243
+ export type InteractiveSaveResult = {
244
+ readonly ok: true;
245
+ readonly state: InteractiveStateSnapshot;
246
+ readonly writerCurrent?: boolean;
247
+ } | {
248
+ readonly ok: false;
249
+ readonly code: 'interactive_owner_replaced';
250
+ readonly saveStatus?: 'committed' | 'not_committed';
251
+ } | {
252
+ readonly ok: false;
253
+ readonly code: string;
254
+ readonly saveStatus?: 'not_committed';
255
+ };
256
+ export interface InteractiveResultsApi {
257
+ open(request: {
258
+ readonly reference: InteractiveResultReference;
259
+ readonly requestId: string;
260
+ }): Promise<InteractiveResult<InteractiveOpenView>>;
261
+ cancelOpen?(request: {
262
+ readonly requestId: string;
263
+ }): Promise<InteractiveResult>;
264
+ readState(request: {
265
+ readonly handle: InteractiveViewHandle;
266
+ }): Promise<InteractiveResult<{
267
+ readonly state: InteractiveStateSnapshot;
268
+ }>>;
269
+ readVersions?(request: {
270
+ readonly handle: InteractiveViewHandle;
271
+ }): Promise<InteractiveResult<{
272
+ readonly versions: InteractiveVersionNavigation;
273
+ }>>;
274
+ openVersion?(request: {
275
+ readonly handle: InteractiveViewHandle;
276
+ readonly relation: 'head' | 'predecessor';
277
+ readonly expectedReference: InteractiveResultReference;
278
+ }): Promise<InteractiveResult<{
279
+ readonly reference: InteractiveResultReference;
280
+ }>>;
281
+ acquire(request: {
282
+ readonly handle: InteractiveViewHandle;
283
+ readonly expectedRevision: number;
284
+ readonly takeover?: boolean;
285
+ }): Promise<InteractiveResult<{
286
+ readonly writer: InteractiveWriter;
287
+ }>>;
288
+ save(request: {
289
+ readonly handle: InteractiveViewHandle;
290
+ readonly writer: InteractiveWriter;
291
+ readonly expectedRevision: number;
292
+ readonly requestId: string;
293
+ readonly values: InteractiveStateValues;
294
+ readonly inputDrafts: Readonly<Record<string, string>>;
295
+ }): Promise<InteractiveSaveResult>;
296
+ release(request: {
297
+ readonly handle: InteractiveViewHandle;
298
+ readonly writer?: InteractiveWriter;
299
+ }): Promise<InteractiveResult>;
300
+ prepareFollowup(request: {
301
+ readonly handle: InteractiveViewHandle;
302
+ readonly stateRevision: number;
303
+ readonly stateDigest: string;
304
+ readonly fields: readonly string[];
305
+ readonly requestId: string;
306
+ }): Promise<InteractiveResult<{
307
+ readonly followup: InteractiveFollowup;
308
+ }>>;
309
+ prepareDraft?(request: {
310
+ readonly handle: InteractiveViewHandle;
311
+ readonly followupId: string;
312
+ }): Promise<InteractiveResult<{
313
+ readonly followupId: string;
314
+ }>>;
315
+ }
316
+ export declare const INTERACTIVE_PUBLISH_CAPABILITY = "local.interactive.publish";
317
+ export declare const INTERACTIVE_INSPECT_CAPABILITY = "local.interactive.inspect";
318
+ export declare const INTERACTIVE_PUBLISH_TOOL = "publish_interactive_result";
319
+ export declare const INTERACTIVE_INSPECT_TOOL = "inspect_interactive_result";
320
+ export declare const INTERACTIVE_RESULT_SCHEMA_VERSION = 1;
321
+ export declare const INTERACTIVE_RESULT_LIMITS: Readonly<{
322
+ programBytes: number;
323
+ fallbackBytes: number;
324
+ inputBytes: number;
325
+ bindings: 16;
326
+ astNodes: 1000;
327
+ astDepth: 24;
328
+ expandedNodes: 300;
329
+ expandedDepth: 12;
330
+ stateFields: 64;
331
+ stateBytes: number;
332
+ collectionItems: 500;
333
+ textChars: 8192;
334
+ tablePageRows: 100;
335
+ tablePageCells: 1000;
336
+ chartSeries: 6;
337
+ chartPoints: 500;
338
+ evaluationSteps: 40000;
339
+ workerTimeoutMs: 2000;
340
+ resultsPerBot: 256;
341
+ storeBytes: number;
342
+ manifestBytes: number;
343
+ contentRepairs: 2;
344
+ localActionSteps: 16;
345
+ }>;
346
+ export declare const interactiveBindingId: (v: unknown) => v is string;
347
+ export declare const interactiveToken: (v: unknown) => v is string;
348
+ export declare const interactiveDigest: (v: unknown) => v is string;
349
+ export declare function normalizeInteractiveMaterialNotice(raw: unknown): InteractiveMaterialNotice | undefined;
350
+ export declare function normalizeInteractiveOwner(raw: unknown): InteractiveOwner | undefined;
351
+ export declare function normalizeInteractiveReference(raw: unknown): InteractiveResultReference | undefined;
352
+ /** Syntax and budget only. The host must match the actual immutable freeze receipt. */
353
+ export declare function normalizeInteractiveFollowup(raw: unknown): InteractiveFollowup | undefined;
354
+ export declare function normalizeInteractiveViewHandle(raw: unknown): InteractiveViewHandle | undefined;
355
+ export declare function normalizeInteractiveWriter(raw: unknown): InteractiveWriter | undefined;
356
+ export declare function normalizeInteractivePublicationReference(raw: unknown): InteractivePublicationCallReference | undefined;
357
+ export declare function normalizeInteractiveSelector(raw: unknown): BoundedDataSelector | undefined;
358
+ export declare function normalizeInteractiveDraft(raw: unknown): InteractiveResultDraft | undefined;
359
+ export declare function normalizeInteractiveInspect(raw: unknown): InteractiveInspectRequest | undefined;
360
+ /** An opaque, version-pinned locator. Hosts must revalidate the canonical publication receipt. */
361
+ export declare function interactiveArtifactRef(ref: InteractiveResultReference): string;
362
+ export declare function parseInteractiveArtifactRef(raw: unknown): InteractiveResultReference | undefined;
363
+ export declare function normalizeInteractiveUserArtifact(raw: unknown): InteractiveUserArtifact | undefined;