@clowder-ai/plugin-contract 0.1.0-beta.8 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/codegen/generate-contract.d.ts +7 -0
  2. package/dist/codegen/generate-contract.d.ts.map +1 -1
  3. package/dist/codegen/generate-contract.js +350 -19
  4. package/dist/codegen/generate-contract.js.map +1 -1
  5. package/dist/conformance/fixtures.d.ts +3 -1
  6. package/dist/conformance/fixtures.d.ts.map +1 -1
  7. package/dist/conformance/fixtures.js +2 -1
  8. package/dist/conformance/fixtures.js.map +1 -1
  9. package/dist/conformance/index.d.ts +2 -1
  10. package/dist/conformance/index.d.ts.map +1 -1
  11. package/dist/conformance/index.js +2 -1
  12. package/dist/conformance/index.js.map +1 -1
  13. package/dist/conformance/messaging-behavior-fixture.d.ts +12 -0
  14. package/dist/conformance/messaging-behavior-fixture.d.ts.map +1 -0
  15. package/dist/conformance/messaging-behavior-fixture.js +30 -0
  16. package/dist/conformance/messaging-behavior-fixture.js.map +1 -0
  17. package/dist/conformance/runner.d.ts.map +1 -1
  18. package/dist/conformance/runner.js +23 -3
  19. package/dist/conformance/runner.js.map +1 -1
  20. package/dist/conformance/stdio-harness/wire-shape.d.ts +1 -1
  21. package/dist/docx-materialization.d.ts +8 -0
  22. package/dist/docx-materialization.d.ts.map +1 -0
  23. package/dist/docx-materialization.js +19 -0
  24. package/dist/docx-materialization.js.map +1 -0
  25. package/dist/generated/contract.generated.d.ts +1665 -33
  26. package/dist/generated/contract.generated.d.ts.map +1 -1
  27. package/dist/generated/contract.generated.js +72 -3
  28. package/dist/generated/contract.generated.js.map +1 -1
  29. package/dist/index.d.ts +2 -1
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +2 -1
  32. package/dist/index.js.map +1 -1
  33. package/dist/validation/catalog.d.ts +21 -0
  34. package/dist/validation/catalog.d.ts.map +1 -0
  35. package/dist/validation/catalog.js +140 -0
  36. package/dist/validation/catalog.js.map +1 -0
  37. package/dist/validation/cloud-conversation-host.d.ts +18 -0
  38. package/dist/validation/cloud-conversation-host.d.ts.map +1 -0
  39. package/dist/validation/cloud-conversation-host.js +83 -0
  40. package/dist/validation/cloud-conversation-host.js.map +1 -0
  41. package/dist/validation/companion-bridge.d.ts +6 -0
  42. package/dist/validation/companion-bridge.d.ts.map +1 -0
  43. package/dist/validation/companion-bridge.js +198 -0
  44. package/dist/validation/companion-bridge.js.map +1 -0
  45. package/dist/validation/docx-materialization.d.ts +6 -0
  46. package/dist/validation/docx-materialization.d.ts.map +1 -0
  47. package/dist/validation/docx-materialization.js +36 -0
  48. package/dist/validation/docx-materialization.js.map +1 -0
  49. package/dist/validation/index.d.ts +9 -0
  50. package/dist/validation/index.d.ts.map +1 -1
  51. package/dist/validation/index.js +9 -0
  52. package/dist/validation/index.js.map +1 -1
  53. package/dist/validation/manifest.d.ts.map +1 -1
  54. package/dist/validation/manifest.js +324 -1
  55. package/dist/validation/manifest.js.map +1 -1
  56. package/dist/validation/members.d.ts +4 -0
  57. package/dist/validation/members.d.ts.map +1 -0
  58. package/dist/validation/members.js +11 -0
  59. package/dist/validation/members.js.map +1 -0
  60. package/dist/validation/messaging-semantic.d.ts.map +1 -1
  61. package/dist/validation/messaging-semantic.js +98 -0
  62. package/dist/validation/messaging-semantic.js.map +1 -1
  63. package/dist/validation/messaging-wire.d.ts +42 -0
  64. package/dist/validation/messaging-wire.d.ts.map +1 -0
  65. package/dist/validation/messaging-wire.js +184 -0
  66. package/dist/validation/messaging-wire.js.map +1 -0
  67. package/dist/validation/operation-rows.d.ts +25 -0
  68. package/dist/validation/operation-rows.d.ts.map +1 -0
  69. package/dist/validation/operation-rows.js +135 -0
  70. package/dist/validation/operation-rows.js.map +1 -0
  71. package/dist/validation/signals.d.ts +17 -0
  72. package/dist/validation/signals.d.ts.map +1 -0
  73. package/dist/validation/signals.js +32 -0
  74. package/dist/validation/signals.js.map +1 -0
  75. package/dist/variant.d.ts +114 -0
  76. package/dist/variant.d.ts.map +1 -0
  77. package/dist/variant.js +305 -0
  78. package/dist/variant.js.map +1 -0
  79. package/dist/wire/constants.d.ts +2 -1
  80. package/dist/wire/constants.d.ts.map +1 -1
  81. package/dist/wire/constants.js +2 -1
  82. package/dist/wire/constants.js.map +1 -1
  83. package/dist/wire/dispatch.d.ts +49 -0
  84. package/dist/wire/dispatch.d.ts.map +1 -0
  85. package/dist/wire/dispatch.js +880 -0
  86. package/dist/wire/dispatch.js.map +1 -0
  87. package/dist/wire/disposition-fixtures.d.ts +10 -0
  88. package/dist/wire/disposition-fixtures.d.ts.map +1 -1
  89. package/dist/wire/disposition-fixtures.js +661 -75
  90. package/dist/wire/disposition-fixtures.js.map +1 -1
  91. package/dist/wire/envelope.d.ts +31 -0
  92. package/dist/wire/envelope.d.ts.map +1 -1
  93. package/dist/wire/envelope.js +48 -1
  94. package/dist/wire/envelope.js.map +1 -1
  95. package/dist/wire/errors.d.ts +31 -1
  96. package/dist/wire/errors.d.ts.map +1 -1
  97. package/dist/wire/errors.js +36 -0
  98. package/dist/wire/errors.js.map +1 -1
  99. package/dist/wire/grants.d.ts +4 -4
  100. package/dist/wire/grants.js +3 -3
  101. package/dist/wire/handshake-byte-bounds.d.ts.map +1 -1
  102. package/dist/wire/handshake-byte-bounds.js +5 -2
  103. package/dist/wire/handshake-byte-bounds.js.map +1 -1
  104. package/dist/wire/handshake.d.ts +6 -0
  105. package/dist/wire/handshake.d.ts.map +1 -1
  106. package/dist/wire/handshake.js +6 -3
  107. package/dist/wire/handshake.js.map +1 -1
  108. package/dist/wire/index.d.ts +13 -6
  109. package/dist/wire/index.d.ts.map +1 -1
  110. package/dist/wire/index.js +31 -6
  111. package/dist/wire/index.js.map +1 -1
  112. package/dist/wire/lifecycle-byte-bounds.d.ts +40 -0
  113. package/dist/wire/lifecycle-byte-bounds.d.ts.map +1 -0
  114. package/dist/wire/lifecycle-byte-bounds.js +149 -0
  115. package/dist/wire/lifecycle-byte-bounds.js.map +1 -0
  116. package/dist/wire/messaging-byte-bounds.d.ts +62 -0
  117. package/dist/wire/messaging-byte-bounds.d.ts.map +1 -0
  118. package/dist/wire/messaging-byte-bounds.js +581 -0
  119. package/dist/wire/messaging-byte-bounds.js.map +1 -0
  120. package/dist/wire/registry.d.ts +63 -77
  121. package/dist/wire/registry.d.ts.map +1 -1
  122. package/dist/wire/registry.js +47 -76
  123. package/dist/wire/registry.js.map +1 -1
  124. package/dist/wire/row-shapes.d.ts +87 -70
  125. package/dist/wire/row-shapes.d.ts.map +1 -1
  126. package/dist/wire/row-shapes.js +31 -4
  127. package/dist/wire/row-shapes.js.map +1 -1
  128. package/fixtures/behavior/messaging/adversarial-invariants.json +92 -2
  129. package/fixtures/manifest/invalid/duplicate-signal-type.json +35 -0
  130. package/fixtures/manifest/invalid/icon-package-escape.json +22 -0
  131. package/fixtures/manifest/valid/localized-product-metadata.json +27 -0
  132. package/fixtures/messaging/valid/subscription-delivery.json +1 -1
  133. package/fixtures/signals/invalid/dynamic-schema-url.json +10 -0
  134. package/fixtures/signals/invalid/forbidden-raw-privacy.json +10 -0
  135. package/fixtures/signals/valid/remote-service-declaration.json +10 -0
  136. package/package.json +17 -3
  137. package/src/schemas/behavior-fixture.schema.json +903 -116
  138. package/src/schemas/catalog.schema.json +91 -0
  139. package/src/schemas/companion-bridge.schema.json +2256 -0
  140. package/src/schemas/docx-materialization.schema.json +302 -0
  141. package/src/schemas/manifest.schema.json +2276 -88
  142. package/src/schemas/messaging.schema.json +692 -41
  143. package/src/schemas/plugin-metadata.schema.json +62 -0
  144. package/src/schemas/signal.schema.json +119 -0
@@ -1,11 +1,35 @@
1
1
  /**
2
- * Generated from manifest.schema.json, messaging.schema.json, physical-limb.schema.json, and behavior-fixture.schema.json.
2
+ * Generated from plugin-metadata.schema.json, manifest.schema.json, catalog.schema.json, signal.schema.json, messaging.schema.json, physical-limb.schema.json, docx-materialization.schema.json, and behavior-fixture.schema.json.
3
3
  * Do not edit by hand. Run `pnpm generate` after changing a schema.
4
4
  */
5
+ export type LocalizedDescriptionObject = {
6
+ readonly default: string;
7
+ readonly translations: Readonly<Record<string, string>>;
8
+ };
9
+ export type LocalizedDescription = string | LocalizedDescriptionObject;
10
+ export type PackageAssetPath = string;
11
+ export type PackageIcon = {
12
+ readonly type: 'svg';
13
+ readonly src: PackageAssetPath & `${string}.svg`;
14
+ } | {
15
+ readonly type: 'png';
16
+ readonly src: PackageAssetPath & `${string}.png`;
17
+ };
18
+ export type PluginIcon = 'github' | PackageIcon;
19
+ export type PluginMember = {
20
+ readonly catId: string;
21
+ readonly displayName: string;
22
+ readonly defaultModel: string;
23
+ readonly nickname?: string;
24
+ readonly variantLabel?: string;
25
+ readonly roleDescription?: string;
26
+ readonly avatar?: string;
27
+ readonly available: boolean;
28
+ };
5
29
  export type SemVer = string;
6
30
  export type DataClass = 'cache' | 'ephemeral' | 'user-authored' | 'derived-user-visible' | 'relationship' | 'interaction-history';
7
31
  export type DataStrategy = 'lifecycle' | 'retained' | 'ask-on-uninstall';
8
- export type Capability = 'plugin.config.read' | 'plugin.state.get' | 'plugin.state.set' | 'messaging.send' | 'schedule.register' | 'events.publish' | 'messaging.appendElements' | 'onMessage' | 'message.event.subscribe' | 'secret.read' | 'thread.listMetadata' | 'thread.readContent' | 'memory.query' | 'memory.append' | 'memory.retrieve' | 'windows.create' | 'whisper.extend';
32
+ export type Capability = 'plugin.config.read' | 'plugin.state.get' | 'plugin.state.set' | 'messaging.send' | 'schedule.register' | 'messaging.appendElements' | 'streams.read' | 'onMessage' | 'message.event.subscribe' | 'secret.read' | 'thread.listMetadata' | 'thread.readContent' | 'thread.write' | 'task.read' | 'task.write' | 'task.admitEntrusted' | 'memory.query' | 'memory.append' | 'memory.retrieve' | 'windows.create' | 'whisper.extend' | 'cloud.conversation.host';
9
33
  export type DataDeclaration = {
10
34
  readonly name: string;
11
35
  readonly dataClass: 'cache';
@@ -41,21 +65,449 @@ export type ResourceReference = {
41
65
  readonly type: string;
42
66
  readonly id: string;
43
67
  };
68
+ export type ContributionReference = {
69
+ readonly type: 'identity' | 'schedule' | 'tool' | 'mcp' | 'skill' | 'limb' | 'webhook' | 'message-subscription' | 'media-source' | 'service' | 'connector' | 'cloud-conversation-host' | 'ui' | 'content-editor-provider' | 'desktop-window';
70
+ readonly id: string;
71
+ };
72
+ export type PackageRelativePath = string;
73
+ export type ConfigurationOption = {
74
+ readonly value: string;
75
+ readonly label: string;
76
+ readonly hint?: string;
77
+ readonly docsUrl?: string;
78
+ };
79
+ export type RequiredWhen = {
80
+ readonly key: string;
81
+ readonly value: string | number | boolean | readonly (string | number | boolean)[];
82
+ };
83
+ export type ConfigurationVariantBranch = {
84
+ readonly id: string;
85
+ readonly when: Readonly<Record<string, unknown>>;
86
+ readonly fields: readonly string[];
87
+ };
88
+ export type ConfigurationVariants = {
89
+ readonly discriminator: string;
90
+ readonly branches: readonly ConfigurationVariantBranch[];
91
+ };
92
+ export type ConfigurationField = {
93
+ readonly key: string;
94
+ readonly label: string;
95
+ readonly description?: string;
96
+ readonly kind: 'string';
97
+ readonly required: boolean;
98
+ readonly hidden?: boolean;
99
+ readonly requiredWhen?: RequiredWhen;
100
+ readonly default?: string;
101
+ readonly options?: never;
102
+ readonly target?: never;
103
+ readonly actions?: never;
104
+ } | {
105
+ readonly key: string;
106
+ readonly label: string;
107
+ readonly description?: string;
108
+ readonly kind: 'secret';
109
+ readonly required: boolean;
110
+ readonly hidden?: boolean;
111
+ readonly requiredWhen?: RequiredWhen;
112
+ readonly default?: never;
113
+ readonly options?: never;
114
+ readonly target?: never;
115
+ readonly actions?: never;
116
+ } | {
117
+ readonly key: string;
118
+ readonly label: string;
119
+ readonly description?: string;
120
+ readonly kind: 'select';
121
+ readonly required: boolean;
122
+ readonly hidden?: boolean;
123
+ readonly requiredWhen?: RequiredWhen;
124
+ readonly default?: string;
125
+ readonly options: readonly ConfigurationOption[];
126
+ readonly target?: never;
127
+ readonly actions?: never;
128
+ } | {
129
+ readonly key: string;
130
+ readonly label: string;
131
+ readonly description?: string;
132
+ readonly kind: 'boolean';
133
+ readonly required: boolean;
134
+ readonly hidden?: boolean;
135
+ readonly requiredWhen?: RequiredWhen;
136
+ readonly default?: boolean;
137
+ readonly options?: never;
138
+ readonly target?: never;
139
+ readonly actions?: never;
140
+ } | {
141
+ readonly key: string;
142
+ readonly label: string;
143
+ readonly description?: string;
144
+ readonly kind: 'number';
145
+ readonly required: boolean;
146
+ readonly hidden?: boolean;
147
+ readonly requiredWhen?: RequiredWhen;
148
+ readonly default?: number;
149
+ readonly options?: never;
150
+ readonly target?: never;
151
+ readonly actions?: never;
152
+ } | {
153
+ readonly key: string;
154
+ readonly label: string;
155
+ readonly description?: string;
156
+ readonly kind: 'url';
157
+ readonly required: boolean;
158
+ readonly hidden?: boolean;
159
+ readonly requiredWhen?: RequiredWhen;
160
+ readonly default?: string;
161
+ readonly options?: never;
162
+ readonly target?: never;
163
+ readonly actions?: never;
164
+ } | {
165
+ readonly key: string;
166
+ readonly label: string;
167
+ readonly description?: string;
168
+ readonly kind: 'operation';
169
+ readonly required: boolean;
170
+ readonly hidden?: never;
171
+ readonly requiredWhen?: never;
172
+ readonly default?: never;
173
+ readonly options?: never;
174
+ readonly target?: readonly string[];
175
+ readonly actions: readonly ActionDef[];
176
+ };
177
+ export type EnvironmentBinding = {
178
+ readonly source: 'config';
179
+ readonly key: string;
180
+ } | {
181
+ readonly source: 'secret';
182
+ readonly key: string;
183
+ };
184
+ export type ContributionRuntime = {
185
+ readonly transport: 'stdio' | 'ipc';
186
+ readonly entrypoint: PackageRelativePath;
187
+ readonly args?: readonly string[];
188
+ };
189
+ export type CallbackAction = {
190
+ readonly method: string;
191
+ readonly params?: Readonly<Record<string, unknown>>;
192
+ };
193
+ export type ActionDef = {
194
+ readonly id: string;
195
+ readonly label: string;
196
+ readonly render: 'button' | 'polling' | 'status' | 'row';
197
+ readonly confirm?: string;
198
+ readonly action: CallbackAction;
199
+ readonly resultRender?: string;
200
+ readonly next?: string;
201
+ readonly rollback?: string;
202
+ readonly timeout?: number;
203
+ };
204
+ export type OperationRows = {
205
+ readonly rows: readonly OperationRow[];
206
+ readonly empty?: string;
207
+ };
208
+ export type OperationRow = {
209
+ readonly key: string;
210
+ readonly label: string;
211
+ readonly detail?: string;
212
+ readonly actions?: readonly OperationRowAction[];
213
+ };
214
+ export type OperationRowAction = {
215
+ readonly action: string;
216
+ readonly label?: string;
217
+ readonly input: Readonly<Record<string, string | number | boolean>>;
218
+ readonly confirm?: string;
219
+ };
220
+ export type OperationActionResult = {
221
+ readonly render: string;
222
+ readonly data: unknown;
223
+ readonly label?: string;
224
+ readonly targetValues?: Readonly<Record<string, string>>;
225
+ readonly advance?: boolean;
226
+ readonly activate?: boolean;
227
+ };
228
+ export type PluginTestDeclaration = {
229
+ readonly action: CallbackAction;
230
+ };
231
+ export type PluginTestResult = {
232
+ readonly ok: boolean;
233
+ readonly message?: string;
234
+ readonly details?: Readonly<Record<string, unknown>>;
235
+ };
236
+ export type SetupStep = {
237
+ readonly text: string;
238
+ readonly mode?: string;
239
+ };
240
+ export type ConnectorPermissions = {
241
+ readonly label: string;
242
+ };
243
+ export type IdentityContribution = {
244
+ readonly type: 'identity';
245
+ readonly id: string;
246
+ readonly displayName: string;
247
+ readonly icon?: string;
248
+ readonly color?: string;
249
+ };
250
+ export type ScheduleContribution = {
251
+ readonly type: 'schedule';
252
+ readonly id: string;
253
+ readonly schedule: {
254
+ readonly kind: 'interval';
255
+ readonly everyMs: number;
256
+ } | {
257
+ readonly kind: 'cron';
258
+ readonly expression: string;
259
+ };
260
+ readonly action: CallbackAction;
261
+ readonly policy: {
262
+ readonly overlap: 'skip';
263
+ readonly timeoutMs: number;
264
+ };
265
+ };
266
+ export type DirectToolContribution = {
267
+ readonly type: 'tool';
268
+ readonly id: string;
269
+ readonly name: string;
270
+ readonly description?: string;
271
+ readonly inputSchema: Readonly<Record<string, unknown>>;
272
+ readonly action: CallbackAction;
273
+ };
274
+ export type McpActionMethod = {
275
+ readonly method: string;
276
+ };
277
+ export type McpContribution = {
278
+ readonly type: 'mcp';
279
+ readonly id: string;
280
+ readonly runtime: ContributionRuntime;
281
+ readonly actions?: readonly McpActionMethod[];
282
+ readonly environment?: Readonly<Record<string, EnvironmentBinding>>;
283
+ };
284
+ export type SkillContribution = {
285
+ readonly type: 'skill';
286
+ readonly id: string;
287
+ readonly path: PackageRelativePath;
288
+ };
289
+ export type LimbContribution = {
290
+ readonly type: 'limb';
291
+ readonly id: string;
292
+ readonly manifestPath: PackageRelativePath;
293
+ };
294
+ export type WebhookContribution = {
295
+ readonly type: 'webhook';
296
+ readonly id: string;
297
+ readonly path: string;
298
+ readonly methods: readonly ('GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE')[];
299
+ readonly action: CallbackAction;
300
+ readonly verificationSecretRef?: string;
301
+ };
302
+ export type MessageSubscriptionContribution = {
303
+ readonly type: 'message-subscription';
304
+ readonly id: string;
305
+ readonly binding: string;
306
+ readonly filter?: Readonly<Record<string, unknown>>;
307
+ readonly action: CallbackAction;
308
+ readonly presentation?: 'v1' | 'v2';
309
+ };
310
+ export type MediaSourceContribution = {
311
+ readonly type: 'media-source';
312
+ readonly id: string;
313
+ readonly binding: string;
314
+ };
315
+ export type ServiceContribution = {
316
+ readonly type: 'service';
317
+ readonly id: string;
318
+ readonly runtime: ContributionRuntime;
319
+ readonly healthMethod: string;
320
+ readonly environment?: Readonly<Record<string, EnvironmentBinding>>;
321
+ };
322
+ export type ConnectorContribution = {
323
+ readonly type: 'connector';
324
+ readonly id: string;
325
+ readonly identityRef: string;
326
+ readonly inboundMethod: string;
327
+ readonly outboundMethod: string;
328
+ };
329
+ export type CloudConversationHostMethod = {
330
+ readonly method: string;
331
+ };
332
+ export type CloudConversationHostContribution = {
333
+ readonly type: 'cloud-conversation-host';
334
+ readonly id: string;
335
+ readonly provider: 'chatgpt';
336
+ readonly appendMessage: CloudConversationHostMethod;
337
+ readonly assistantReturns: {
338
+ readonly list: CloudConversationHostMethod;
339
+ readonly ack: CloudConversationHostMethod;
340
+ };
341
+ };
342
+ export type CloudBridgeDomFingerprintNodeV1 = {
343
+ readonly path: string;
344
+ readonly kind: 'text' | 'element' | 'other';
345
+ readonly empty?: boolean;
346
+ readonly tag?: string;
347
+ readonly nodeType?: number;
348
+ readonly childCount?: number;
349
+ readonly contentEditable?: boolean;
350
+ readonly proseMirror?: boolean;
351
+ readonly placeholder?: boolean;
352
+ readonly virtualKeyboard?: boolean;
353
+ readonly trailingBreak?: boolean;
354
+ };
355
+ export type CloudBridgeDomFingerprintV1 = {
356
+ readonly v: 1;
357
+ readonly phase: string;
358
+ readonly adapterRevision: string;
359
+ readonly artifactRevision: string;
360
+ readonly firstUnsupportedPath?: string;
361
+ readonly nodes: readonly CloudBridgeDomFingerprintNodeV1[];
362
+ readonly truncated: boolean;
363
+ };
364
+ export type CloudBridgeFailureDiagnosticV1 = {
365
+ readonly v: 1;
366
+ readonly errorCode: string;
367
+ readonly nextAction: 'inspect_bound_tab';
368
+ readonly fingerprint: CloudBridgeDomFingerprintV1;
369
+ };
370
+ export type CloudConversationAppendMessageInput = {
371
+ readonly conversationId: string;
372
+ readonly text: string;
373
+ readonly idempotencyKey: MessageId;
374
+ };
375
+ export type CloudConversationAppendMessageAppendedResult = {
376
+ readonly status: 'appended';
377
+ readonly providerMessageId: string;
378
+ readonly idempotentReplay?: boolean;
379
+ };
380
+ export type CloudConversationAppendMessageFailedResult = {
381
+ readonly status: 'failed';
382
+ readonly errorCode: string;
383
+ readonly diagnostic?: CloudBridgeFailureDiagnosticV1;
384
+ readonly idempotentReplay?: boolean;
385
+ };
386
+ export type CloudConversationAppendMessageResult = CloudConversationAppendMessageAppendedResult | CloudConversationAppendMessageFailedResult;
387
+ export type CloudConversationReturnCursor = {
388
+ readonly conversationId: string;
389
+ readonly sourceMessageId: MessageId;
390
+ readonly assistantMessageId: string;
391
+ };
392
+ export type CloudConversationAssistantReturn = {
393
+ readonly conversationId: string;
394
+ readonly sourceMessageId: MessageId;
395
+ readonly assistantMessageId: string;
396
+ readonly content: string;
397
+ };
398
+ export type CloudConversationListInput = {
399
+ readonly after?: CloudConversationReturnCursor;
400
+ };
401
+ export type CloudConversationListResult = {
402
+ readonly returns: readonly CloudConversationAssistantReturn[];
403
+ };
404
+ export type CloudConversationAckInput = {
405
+ readonly conversationId: string;
406
+ readonly sourceMessageId: MessageId;
407
+ readonly assistantMessageId: string;
408
+ };
409
+ export type CloudConversationAcknowledgedResult = {
410
+ readonly status: 'acknowledged';
411
+ };
412
+ export type CloudConversationAckFailedResult = {
413
+ readonly status: 'failed';
414
+ readonly errorCode: string;
415
+ readonly diagnostic?: CloudBridgeFailureDiagnosticV1;
416
+ };
417
+ export type CloudConversationAckResult = CloudConversationAcknowledgedResult | CloudConversationAckFailedResult;
418
+ export type UiWhenClause = {
419
+ readonly featureEnabled?: boolean;
420
+ readonly requiresCapabilities?: readonly Capability[];
421
+ };
422
+ export type UiAnchor = {
423
+ readonly position: 'before' | 'after';
424
+ readonly target: string;
425
+ };
426
+ export type UiCommandContribution = {
427
+ readonly type: 'ui';
428
+ readonly id: string;
429
+ readonly kind: 'command';
430
+ readonly label: string;
431
+ readonly action: CallbackAction;
432
+ readonly when?: UiWhenClause;
433
+ };
434
+ export type UiSlotItemContribution = {
435
+ readonly type: 'ui';
436
+ readonly id: string;
437
+ readonly kind: 'slot-item';
438
+ readonly label: string;
439
+ readonly command: string;
440
+ readonly group: string;
441
+ readonly anchor?: UiAnchor;
442
+ readonly order?: number;
443
+ readonly when?: UiWhenClause;
444
+ };
445
+ export type UiMessageElementContribution = {
446
+ readonly type: 'ui';
447
+ readonly id: string;
448
+ readonly kind: 'message-element';
449
+ readonly label: string;
450
+ readonly elementKind: string;
451
+ readonly renderer: string;
452
+ readonly when?: UiWhenClause;
453
+ };
454
+ export type UiContribution = UiCommandContribution | UiSlotItemContribution | UiMessageElementContribution;
455
+ export type SemanticMaterializerDeclaration = {
456
+ readonly executionClass: 'dedicated-browser-worker';
457
+ readonly entrypoint: PackageRelativePath & `${string}.js`;
458
+ readonly integrity: string;
459
+ readonly protocolVersion: '1.0.0';
460
+ };
461
+ export type DesktopWindowContribution = {
462
+ readonly type: 'desktop-window';
463
+ readonly id: string;
464
+ readonly role: 'companion';
465
+ readonly surface: {
466
+ readonly entrypoint: PackageRelativePath & `${string}.html`;
467
+ readonly integrity: string;
468
+ };
469
+ readonly bridgeVersion: '1.0.0' | '1.1.0' | '1.2.0' | '1.3.0' | '1.4.0' | '1.5.0' | '1.6.0';
470
+ readonly presentation: {
471
+ readonly width: number;
472
+ readonly height: number;
473
+ readonly transparent: true;
474
+ readonly frame: false;
475
+ readonly alwaysOnTop: boolean;
476
+ readonly skipTaskbar: boolean;
477
+ };
478
+ };
479
+ export type ContentEditorProviderContribution = {
480
+ readonly type: 'content-editor-provider';
481
+ readonly id: string;
482
+ readonly mediaTypes: readonly ['application/vnd.openxmlformats-officedocument.wordprocessingml.document'];
483
+ readonly surface: {
484
+ readonly entrypoint: PackageRelativePath;
485
+ readonly integrity: string;
486
+ readonly sandbox: 'dedicated-origin-iframe';
487
+ readonly navigationPolicy: 'navigation-api-deny';
488
+ };
489
+ readonly bridgeVersion: '1.0.0';
490
+ readonly semanticMaterializer?: SemanticMaterializerDeclaration;
491
+ readonly operations: readonly ['load' | 'settle' | 'comment' | 'tracked-change', 'load' | 'settle' | 'comment' | 'tracked-change', 'load' | 'settle' | 'comment' | 'tracked-change', 'load' | 'settle' | 'comment' | 'tracked-change'];
492
+ };
493
+ export type StaticContribution = IdentityContribution | ScheduleContribution | DirectToolContribution | McpContribution | SkillContribution | LimbContribution | WebhookContribution | MessageSubscriptionContribution | MediaSourceContribution | ServiceContribution | ConnectorContribution | CloudConversationHostContribution | UiContribution | ContentEditorProviderContribution | DesktopWindowContribution;
44
494
  export type PluginFeature = {
45
495
  readonly id: string;
46
496
  readonly name: string;
47
497
  readonly resources: readonly ResourceReference[];
498
+ readonly contributions?: readonly ContributionReference[];
48
499
  readonly capabilities: readonly Capability[];
49
500
  };
50
501
  export type RuntimeTransport = 'stdio' | 'ipc' | 'builtin';
51
502
  export type ExternalRuntimeTransport = 'stdio' | 'ipc';
52
503
  export type ExternalRuntimeDeclaration = {
53
504
  readonly transport: ExternalRuntimeTransport;
54
- readonly entrypoint: string;
505
+ readonly entrypoint: PackageRelativePath;
55
506
  };
56
507
  export type BuiltinRuntimeDeclaration = {
57
508
  readonly transport: 'builtin';
58
509
  readonly entrypoint?: string;
510
+ readonly dataDirectory?: string;
59
511
  };
60
512
  export type RuntimeDeclaration = ExternalRuntimeDeclaration | BuiltinRuntimeDeclaration;
61
513
  export type PluginManifest = {
@@ -63,10 +515,72 @@ export type PluginManifest = {
63
515
  readonly version: SemVer;
64
516
  readonly contractVersion: SemVer;
65
517
  readonly name: string;
66
- readonly description?: string;
518
+ readonly description?: LocalizedDescription;
519
+ readonly icon?: PluginIcon;
520
+ readonly configuration?: readonly ConfigurationField[];
521
+ readonly configurationVariants?: ConfigurationVariants;
522
+ readonly contributions?: readonly StaticContribution[];
67
523
  readonly features: readonly PluginFeature[];
68
524
  readonly data?: readonly DataDeclaration[];
69
- readonly runtime: RuntimeDeclaration;
525
+ readonly runtime?: RuntimeDeclaration;
526
+ readonly test?: PluginTestDeclaration;
527
+ readonly permissions?: ConnectorPermissions;
528
+ readonly steps?: readonly SetupStep[];
529
+ readonly signals?: SignalContribution;
530
+ };
531
+ export type CatalogSemVer = string;
532
+ export type CatalogPublisher = {
533
+ readonly id: string;
534
+ readonly name: string;
535
+ };
536
+ export type ArtifactProvenance = {
537
+ readonly repository: string;
538
+ readonly sourceDirectory: string;
539
+ };
540
+ export type NpmArtifact = {
541
+ readonly kind: 'npm';
542
+ readonly packageName: string;
543
+ readonly version: CatalogSemVer;
544
+ readonly tarballUrl: string;
545
+ readonly integrity: string;
546
+ readonly shasum: string;
547
+ readonly provenance: ArtifactProvenance;
548
+ };
549
+ export type CatalogPluginVersion = {
550
+ readonly version: CatalogSemVer;
551
+ readonly contractVersion: CatalogSemVer;
552
+ readonly manifestPath: 'plugin.yaml';
553
+ readonly artifact: NpmArtifact;
554
+ };
555
+ export type CatalogPluginEntry = {
556
+ readonly pluginId: string;
557
+ readonly name: string;
558
+ readonly description: LocalizedDescription;
559
+ readonly icon: PluginIcon;
560
+ readonly publisher: CatalogPublisher;
561
+ readonly keywords?: readonly string[];
562
+ readonly versions: readonly CatalogPluginVersion[];
563
+ };
564
+ export type PluginCatalog = {
565
+ readonly schemaVersion: '1';
566
+ readonly plugins: readonly CatalogPluginEntry[];
567
+ };
568
+ export type SignalType = string;
569
+ export type SignalSchemaRef = string;
570
+ export type SignalEpistemicStatus = 'observation' | 'inference';
571
+ export type SignalPrivacyClass = 'behavioral' | 'content-adjacent' | 'content' | 'av-raw' | 'input-raw';
572
+ export type AdmissibleSignalPrivacyClass = 'behavioral' | 'content-adjacent' | 'content';
573
+ export type SignalSourceClass = 'os-metadata' | 'accessibility-api' | 'remote-service' | 'av-capture' | 'input-hardware';
574
+ export type AdmissibleSignalSourceClass = 'os-metadata' | 'accessibility-api' | 'remote-service';
575
+ export type SignalDeclaration = {
576
+ readonly type: SignalType;
577
+ readonly schemaRef: SignalSchemaRef;
578
+ readonly epistemicStatus: SignalEpistemicStatus;
579
+ readonly privacyClass: AdmissibleSignalPrivacyClass;
580
+ readonly sourceClass: AdmissibleSignalSourceClass;
581
+ };
582
+ export type SignalContribution = {
583
+ readonly provides: readonly SignalDeclaration[];
70
584
  };
71
585
  export type ActorKind = 'user' | 'cat' | 'plugin' | 'device' | 'system';
72
586
  export type ActorRef = {
@@ -102,12 +616,34 @@ export type DraftProvenance = {
102
616
  readonly origin?: DraftOrigin;
103
617
  readonly epistemicStatus: EpistemicStatus;
104
618
  };
105
- export type ElementKind = 'text' | 'media_ref' | 'rich_block';
619
+ export type MediaType = 'image' | 'file' | 'audio' | 'video';
620
+ export type ElementKind = 'text' | 'media_ref' | 'rich_block' | 'media_unavailable' | 'media_warning';
106
621
  export type TextElementPayload = {
107
622
  readonly text: string;
108
623
  };
109
- export type MediaRefElementPayload = Readonly<Record<string, unknown>>;
110
- export type RichBlockElementPayload = Readonly<Record<string, unknown>>;
624
+ export type MediaRefElementPayload = {
625
+ readonly type: MediaType;
626
+ readonly reference: string;
627
+ readonly sourceId?: string;
628
+ readonly fileName?: string;
629
+ readonly [key: string]: unknown;
630
+ };
631
+ export type RichBlockElementPayload = {
632
+ readonly id: string;
633
+ readonly kind: string;
634
+ readonly v: 1;
635
+ readonly [key: string]: unknown;
636
+ };
637
+ export type MediaUnavailableElementPayload = {
638
+ readonly type: MediaType;
639
+ readonly fileName?: string;
640
+ readonly reason: 'source_expired' | 'timeout' | 'unavailable';
641
+ };
642
+ export type MediaWarningElementPayload = {
643
+ readonly mediaElementId: string;
644
+ readonly stage: 'transcription' | 'preview';
645
+ readonly reason: 'timeout' | 'processing_failed';
646
+ };
111
647
  export type TextMessageElement = {
112
648
  readonly elementId: string;
113
649
  readonly kind: 'text';
@@ -122,6 +658,12 @@ export type MediaRefMessageElement = {
122
658
  readonly derivedFromElementId?: string;
123
659
  readonly epistemicStatus?: EpistemicStatus;
124
660
  };
661
+ export type PmrMediaRefElementMatch = {
662
+ readonly kind: 'media_ref';
663
+ readonly payload: {
664
+ readonly reference: string;
665
+ };
666
+ };
125
667
  export type RichBlockMessageElement = {
126
668
  readonly elementId: string;
127
669
  readonly kind: 'rich_block';
@@ -129,7 +671,21 @@ export type RichBlockMessageElement = {
129
671
  readonly derivedFromElementId?: string;
130
672
  readonly epistemicStatus?: EpistemicStatus;
131
673
  };
132
- export type MessageElement = TextMessageElement | MediaRefMessageElement | RichBlockMessageElement;
674
+ export type MediaUnavailableMessageElement = {
675
+ readonly elementId: string;
676
+ readonly kind: 'media_unavailable';
677
+ readonly payload: MediaUnavailableElementPayload;
678
+ readonly derivedFromElementId?: string;
679
+ readonly epistemicStatus?: EpistemicStatus;
680
+ };
681
+ export type MediaWarningMessageElement = {
682
+ readonly elementId: string;
683
+ readonly kind: 'media_warning';
684
+ readonly payload: MediaWarningElementPayload;
685
+ readonly derivedFromElementId?: string;
686
+ readonly epistemicStatus?: EpistemicStatus;
687
+ };
688
+ export type MessageElement = TextMessageElement | MediaRefMessageElement | RichBlockMessageElement | MediaUnavailableMessageElement | MediaWarningMessageElement;
133
689
  export type MessagePayload = {
134
690
  readonly provenance: MessageProvenance;
135
691
  readonly elements: readonly MessageElement[];
@@ -163,22 +719,25 @@ export type SystemAudience = {
163
719
  };
164
720
  export type DraftAudience = PublicAudience | WhisperAudience;
165
721
  export type CanonicalAudience = PublicAudience | WhisperAudience | SystemAudience;
722
+ export type MessageId = string;
166
723
  export type MessageDraft = {
167
724
  readonly address: MessageAddress;
168
725
  readonly draftAudience?: DraftAudience;
169
726
  readonly idempotencyKey: string;
170
727
  readonly sourceEventId?: string;
171
- readonly replyTo?: string;
728
+ readonly replyTo?: MessageId;
172
729
  readonly payload: DraftPayload;
173
730
  };
731
+ export type OccurredAt = string | string;
732
+ export type ThreadId = string;
174
733
  export type MessageEnvelope = {
175
- readonly messageId: string;
734
+ readonly messageId: MessageId;
176
735
  readonly revision: number;
177
- readonly threadId: string;
178
- readonly replyTo?: string;
736
+ readonly threadId: ThreadId;
737
+ readonly replyTo?: MessageId;
179
738
  readonly actor: ActorRef;
180
739
  readonly audience: CanonicalAudience;
181
- readonly occurredAt: string;
740
+ readonly occurredAt: OccurredAt;
182
741
  readonly payload: MessagePayload;
183
742
  };
184
743
  export type MessagePublishEvent = {
@@ -191,8 +750,8 @@ export type MessageElementsAppendEvent = {
191
750
  readonly eventId: string;
192
751
  readonly sequence: number;
193
752
  readonly type: 'message.elements.append';
194
- readonly messageId: string;
195
- readonly threadId: string;
753
+ readonly messageId: MessageId;
754
+ readonly threadId: ThreadId;
196
755
  readonly operationId: string;
197
756
  readonly baseRevision?: number;
198
757
  readonly revision: number;
@@ -200,19 +759,20 @@ export type MessageElementsAppendEvent = {
200
759
  };
201
760
  export type MessageOutputEvent = MessagePublishEvent | MessageElementsAppendEvent;
202
761
  export type SendReceipt = {
203
- readonly messageId: string;
204
- readonly threadId: string;
762
+ readonly messageId: MessageId;
763
+ readonly threadId: ThreadId;
205
764
  readonly revision: number;
206
- readonly handle?: MessageHandle;
765
+ readonly messageHandle: MessageHandle;
207
766
  readonly publishSequence?: number;
767
+ readonly pendingPublication?: true;
208
768
  };
209
769
  export type AppendReceipt = {
210
- readonly messageId: string;
770
+ readonly messageId: MessageId;
211
771
  readonly revision: number;
212
772
  readonly appendSequence?: number;
213
773
  readonly appliedElementIds: readonly string[];
214
774
  };
215
- export type MessagingErrorCode = 'VALIDATION' | 'PERMISSION' | 'NOT_FOUND' | 'CONFLICT' | 'RETRYABLE_INFLIGHT' | 'STALE_CURSOR';
775
+ export type MessagingErrorCode = 'VALIDATION' | 'PERMISSION' | 'NOT_FOUND' | 'CONFLICT' | 'RETRYABLE_INFLIGHT' | 'STALE_CURSOR' | 'MEDIA_ACCESS_DENIED' | 'MESSAGE_NOT_PUBLISHED';
216
776
  export type MessageHandle = {
217
777
  readonly kind: 'message';
218
778
  readonly token: string;
@@ -230,12 +790,12 @@ export type SubscriptionNormalResponse = {
230
790
  readonly stale: false;
231
791
  };
232
792
  export type SubscriptionEmptyResponse = {
233
- readonly events: readonly MessageOutputEvent[];
793
+ readonly events: readonly [];
234
794
  readonly ackToken: null;
235
795
  readonly stale: false;
236
796
  };
237
797
  export type SubscriptionStaleResponse = {
238
- readonly events: readonly MessageOutputEvent[];
798
+ readonly events: readonly [];
239
799
  readonly ackToken: null;
240
800
  readonly stale: true;
241
801
  };
@@ -244,6 +804,195 @@ export type SnapshotResponse = {
244
804
  readonly envelopes: readonly MessageEnvelope[];
245
805
  readonly resumeSequence: number;
246
806
  };
807
+ export type FrontendDisplayUrl = string;
808
+ export type DeliveryPresentationActor = {
809
+ readonly displayName: string;
810
+ readonly emoji: string;
811
+ };
812
+ export type DeliveryPresentationThread = {
813
+ readonly shortId: string;
814
+ readonly title?: string;
815
+ readonly featId?: string;
816
+ };
817
+ export type DeliveryPresentationContext = {
818
+ readonly actor: DeliveryPresentationActor;
819
+ readonly thread: DeliveryPresentationThread;
820
+ readonly deepLinkUrl?: FrontendDisplayUrl;
821
+ };
822
+ export type MediaReadInput = {
823
+ readonly reference: string;
824
+ readonly offset: number;
825
+ readonly limit: number;
826
+ };
827
+ export type MediaReadResult = {
828
+ readonly offset: number;
829
+ readonly dataBase64: string;
830
+ readonly nextOffset?: number;
831
+ readonly done: boolean;
832
+ };
833
+ export type PluginMessageDelivery = {
834
+ readonly kind: 'message';
835
+ readonly deliveryId: string;
836
+ readonly threadId: ThreadId;
837
+ readonly executionId?: string;
838
+ readonly envelope: MessageEnvelope;
839
+ readonly presentation?: DeliveryPresentationContext;
840
+ };
841
+ export type PluginExecutionStartedDelivery = {
842
+ readonly deliveryId: string;
843
+ readonly threadId: ThreadId;
844
+ readonly state: 'started';
845
+ readonly presentation: DeliveryPresentationContext;
846
+ readonly placeholderLine?: string;
847
+ readonly replyTo?: MessageId;
848
+ readonly executionId: string;
849
+ readonly kind: 'execution_status';
850
+ };
851
+ export type PluginExecutionCatchingUpDelivery = {
852
+ readonly deliveryId: string;
853
+ readonly threadId: ThreadId;
854
+ readonly state: 'catching_up';
855
+ readonly executionId: string;
856
+ readonly kind: 'execution_status';
857
+ };
858
+ export type PluginExecutionBlockedDelivery = {
859
+ readonly deliveryId: string;
860
+ readonly threadId: ThreadId;
861
+ readonly state: 'blocked';
862
+ readonly reason: string;
863
+ readonly recoveryUrl?: FrontendDisplayUrl;
864
+ readonly executionId: string;
865
+ readonly kind: 'execution_status';
866
+ };
867
+ export type PluginExecutionResumedDelivery = {
868
+ readonly deliveryId: string;
869
+ readonly threadId: ThreadId;
870
+ readonly state: 'resumed';
871
+ readonly executionId: string;
872
+ readonly kind: 'execution_status';
873
+ };
874
+ export type PluginExecutionSettledDelivery = {
875
+ readonly deliveryId: string;
876
+ readonly threadId: ThreadId;
877
+ readonly state: 'settled';
878
+ readonly chainDone: boolean;
879
+ readonly outcome: 'completed' | 'failed' | 'cancelled';
880
+ readonly executionId: string;
881
+ readonly kind: 'execution_status';
882
+ };
883
+ export type PluginExecutionStatusDelivery = PluginExecutionStartedDelivery | PluginExecutionCatchingUpDelivery | PluginExecutionBlockedDelivery | PluginExecutionResumedDelivery | PluginExecutionSettledDelivery;
884
+ export type PluginDeliveryInput = PluginMessageDelivery | PluginExecutionStatusDelivery;
885
+ export type PluginDeliveryReceipt = {
886
+ readonly deliveryId: string;
887
+ };
888
+ export type M0CSubscribeInput = {
889
+ readonly handle: string;
890
+ };
891
+ export type M0CSubscribeResult = {
892
+ readonly subscriptionId: string;
893
+ };
894
+ export type M0CReadInput = {
895
+ readonly subscriptionId: string;
896
+ readonly limit: number;
897
+ };
898
+ export type M0CReadNormalResult = {
899
+ readonly events: readonly MessageOutputEvent[];
900
+ readonly ackToken: string;
901
+ readonly stale: false;
902
+ };
903
+ export type M0CReadEmptyResult = {
904
+ readonly events: readonly [];
905
+ readonly ackToken: null;
906
+ readonly stale: false;
907
+ };
908
+ export type M0CReadStaleResult = {
909
+ readonly events: readonly [];
910
+ readonly ackToken: null;
911
+ readonly stale: true;
912
+ };
913
+ export type M0CReadResult = M0CReadNormalResult | M0CReadEmptyResult | M0CReadStaleResult;
914
+ export type M0CAckInput = {
915
+ readonly subscriptionId: string;
916
+ readonly ackToken: string;
917
+ };
918
+ export type M0CAckResult = null;
919
+ export type M0CSnapshotInput = {
920
+ readonly subscriptionId: string;
921
+ readonly maxItems: number;
922
+ readonly pageToken?: string;
923
+ };
924
+ export type M0CSnapshotIntermediateResult = {
925
+ readonly items: readonly MessageEnvelope[];
926
+ readonly nextPageToken: string;
927
+ readonly snapshotAckToken: null;
928
+ };
929
+ export type M0CSnapshotFinalResult = {
930
+ readonly items: readonly MessageEnvelope[];
931
+ readonly nextPageToken: null;
932
+ readonly snapshotAckToken: string;
933
+ };
934
+ export type M0CSnapshotResult = M0CSnapshotIntermediateResult | M0CSnapshotFinalResult;
935
+ export declare const ACTOR_KIND_VALUES: readonly ["user", "cat", "plugin", "device", "system"];
936
+ export declare const ACTOR_REF_KEYS: readonly ["kind", "id"];
937
+ export declare const EPISTEMIC_STATUS_VALUES: readonly ["observation", "user_intent", "inference"];
938
+ export declare const EXTERNAL_SOURCE_ADDRESS_KEYS: readonly ["connectorId", "chatId", "messageId"];
939
+ export declare const PLUGIN_ORIGIN_KEYS: readonly ["kind", "instanceId"];
940
+ export declare const EXTERNAL_ORIGIN_KEYS: readonly ["kind", "connectorId", "sourceAddress"];
941
+ export declare const HOST_ORIGIN_KEYS: readonly ["kind"];
942
+ export declare const MESSAGE_PROVENANCE_KEYS: readonly ["origin", "epistemicStatus"];
943
+ export declare const DRAFT_PROVENANCE_KEYS: readonly ["origin", "epistemicStatus"];
944
+ export declare const MEDIA_TYPE_VALUES: readonly ["image", "file", "audio", "video"];
945
+ export declare const ELEMENT_KIND_VALUES: readonly ["text", "media_ref", "rich_block", "media_unavailable", "media_warning"];
946
+ export declare const TEXT_ELEMENT_PAYLOAD_KEYS: readonly ["text"];
947
+ export declare const MEDIA_UNAVAILABLE_ELEMENT_PAYLOAD_KEYS: readonly ["type", "fileName", "reason"];
948
+ export declare const MEDIA_WARNING_ELEMENT_PAYLOAD_KEYS: readonly ["mediaElementId", "stage", "reason"];
949
+ export declare const TEXT_MESSAGE_ELEMENT_KEYS: readonly ["elementId", "kind", "payload", "derivedFromElementId", "epistemicStatus"];
950
+ export declare const MEDIA_REF_MESSAGE_ELEMENT_KEYS: readonly ["elementId", "kind", "payload", "derivedFromElementId", "epistemicStatus"];
951
+ export declare const RICH_BLOCK_MESSAGE_ELEMENT_KEYS: readonly ["elementId", "kind", "payload", "derivedFromElementId", "epistemicStatus"];
952
+ export declare const MEDIA_UNAVAILABLE_MESSAGE_ELEMENT_KEYS: readonly ["elementId", "kind", "payload", "derivedFromElementId", "epistemicStatus"];
953
+ export declare const MEDIA_WARNING_MESSAGE_ELEMENT_KEYS: readonly ["elementId", "kind", "payload", "derivedFromElementId", "epistemicStatus"];
954
+ export declare const MESSAGE_PAYLOAD_KEYS: readonly ["provenance", "elements", "correlationId", "causationId"];
955
+ export declare const DRAFT_PAYLOAD_KEYS: readonly ["provenance", "elements", "correlationId", "causationId"];
956
+ export declare const THREAD_HANDLE_ADDRESS_KEYS: readonly ["kind", "handle"];
957
+ export declare const CONNECTOR_BINDING_ADDRESS_KEYS: readonly ["kind", "handle"];
958
+ export declare const PUBLIC_AUDIENCE_KEYS: readonly ["kind"];
959
+ export declare const WHISPER_AUDIENCE_KEYS: readonly ["kind", "targets"];
960
+ export declare const SYSTEM_AUDIENCE_KEYS: readonly ["kind"];
961
+ export declare const MESSAGE_DRAFT_KEYS: readonly ["address", "draftAudience", "idempotencyKey", "sourceEventId", "replyTo", "payload"];
962
+ export declare const MESSAGE_ENVELOPE_KEYS: readonly ["messageId", "revision", "threadId", "replyTo", "actor", "audience", "occurredAt", "payload"];
963
+ export declare const MESSAGE_PUBLISH_EVENT_KEYS: readonly ["eventId", "sequence", "type", "envelope"];
964
+ export declare const MESSAGE_ELEMENTS_APPEND_EVENT_KEYS: readonly ["eventId", "sequence", "type", "messageId", "threadId", "operationId", "baseRevision", "revision", "elements"];
965
+ export declare const SEND_RECEIPT_KEYS: readonly ["messageId", "threadId", "revision", "messageHandle", "publishSequence", "pendingPublication"];
966
+ export declare const APPEND_RECEIPT_KEYS: readonly ["messageId", "revision", "appendSequence", "appliedElementIds"];
967
+ export declare const MESSAGING_ERROR_CODE_VALUES: readonly ["VALIDATION", "PERMISSION", "NOT_FOUND", "CONFLICT", "RETRYABLE_INFLIGHT", "STALE_CURSOR", "MEDIA_ACCESS_DENIED", "MESSAGE_NOT_PUBLISHED"];
968
+ export declare const MESSAGE_HANDLE_KEYS: readonly ["kind", "token"];
969
+ export declare const APPEND_ELEMENTS_REQUEST_KEYS: readonly ["handle", "operationId", "baseRevision", "elements"];
970
+ export declare const SUBSCRIPTION_NORMAL_RESPONSE_KEYS: readonly ["events", "ackToken", "stale"];
971
+ export declare const SUBSCRIPTION_EMPTY_RESPONSE_KEYS: readonly ["events", "ackToken", "stale"];
972
+ export declare const SUBSCRIPTION_STALE_RESPONSE_KEYS: readonly ["events", "ackToken", "stale"];
973
+ export declare const SNAPSHOT_RESPONSE_KEYS: readonly ["envelopes", "resumeSequence"];
974
+ export declare const DELIVERY_PRESENTATION_ACTOR_KEYS: readonly ["displayName", "emoji"];
975
+ export declare const DELIVERY_PRESENTATION_THREAD_KEYS: readonly ["shortId", "title", "featId"];
976
+ export declare const DELIVERY_PRESENTATION_CONTEXT_KEYS: readonly ["actor", "thread", "deepLinkUrl"];
977
+ export declare const MEDIA_READ_INPUT_KEYS: readonly ["reference", "offset", "limit"];
978
+ export declare const MEDIA_READ_RESULT_KEYS: readonly ["offset", "dataBase64", "nextOffset", "done"];
979
+ export declare const PLUGIN_MESSAGE_DELIVERY_KEYS: readonly ["kind", "deliveryId", "threadId", "executionId", "envelope", "presentation"];
980
+ export declare const PLUGIN_EXECUTION_STARTED_DELIVERY_KEYS: readonly ["deliveryId", "threadId", "state", "presentation", "placeholderLine", "replyTo", "executionId", "kind"];
981
+ export declare const PLUGIN_EXECUTION_CATCHING_UP_DELIVERY_KEYS: readonly ["deliveryId", "threadId", "state", "executionId", "kind"];
982
+ export declare const PLUGIN_EXECUTION_BLOCKED_DELIVERY_KEYS: readonly ["deliveryId", "threadId", "state", "reason", "recoveryUrl", "executionId", "kind"];
983
+ export declare const PLUGIN_EXECUTION_RESUMED_DELIVERY_KEYS: readonly ["deliveryId", "threadId", "state", "executionId", "kind"];
984
+ export declare const PLUGIN_EXECUTION_SETTLED_DELIVERY_KEYS: readonly ["deliveryId", "threadId", "state", "chainDone", "outcome", "executionId", "kind"];
985
+ export declare const PLUGIN_DELIVERY_RECEIPT_KEYS: readonly ["deliveryId"];
986
+ export declare const M0CSUBSCRIBE_INPUT_KEYS: readonly ["handle"];
987
+ export declare const M0CSUBSCRIBE_RESULT_KEYS: readonly ["subscriptionId"];
988
+ export declare const M0CREAD_INPUT_KEYS: readonly ["subscriptionId", "limit"];
989
+ export declare const M0CREAD_NORMAL_RESULT_KEYS: readonly ["events", "ackToken", "stale"];
990
+ export declare const M0CREAD_EMPTY_RESULT_KEYS: readonly ["events", "ackToken", "stale"];
991
+ export declare const M0CREAD_STALE_RESULT_KEYS: readonly ["events", "ackToken", "stale"];
992
+ export declare const M0CACK_INPUT_KEYS: readonly ["subscriptionId", "ackToken"];
993
+ export declare const M0CSNAPSHOT_INPUT_KEYS: readonly ["subscriptionId", "maxItems", "pageToken"];
994
+ export declare const M0CSNAPSHOT_INTERMEDIATE_RESULT_KEYS: readonly ["items", "nextPageToken", "snapshotAckToken"];
995
+ export declare const M0CSNAPSHOT_FINAL_RESULT_KEYS: readonly ["items", "nextPageToken", "snapshotAckToken"];
247
996
  export type PhysicalLimbIdentifier = string;
248
997
  export type PhysicalLimbGrant = 'limb.action.motion' | 'limb.action.display' | 'limb.action.light' | 'limb.action.speaker' | 'limb.observe.touch' | 'limb.sensor.microphone' | 'limb.sensor.camera';
249
998
  export type PhysicalLimbSafePose = {
@@ -382,6 +1131,718 @@ export type PhysicalLimbUnavailableReadiness = {
382
1131
  readonly observedAt: string;
383
1132
  };
384
1133
  export type PhysicalLimbReadiness = PhysicalLimbReadyReadiness | PhysicalLimbUnavailableReadiness;
1134
+ export type DocxMaterializationText = string;
1135
+ export type DocxMaterializationAuthor = string;
1136
+ export type DocxMaterializationBytes = string;
1137
+ export type DocxMaterializationAnchor = {
1138
+ readonly paragraphId: string;
1139
+ readonly textQuote: string;
1140
+ };
1141
+ export type DocxMaterializationAttribution = {
1142
+ readonly author: DocxMaterializationAuthor;
1143
+ readonly operationId: string;
1144
+ readonly timestamp: string;
1145
+ };
1146
+ export type DocxMaterializationOperation = {
1147
+ readonly kind: 'inspect';
1148
+ readonly cursor: number;
1149
+ readonly limit: number;
1150
+ } | {
1151
+ readonly kind: 'tracked-change';
1152
+ readonly target: DocxMaterializationAnchor;
1153
+ readonly replacement: DocxMaterializationText;
1154
+ readonly attribution: DocxMaterializationAttribution;
1155
+ } | {
1156
+ readonly kind: 'comment';
1157
+ readonly target: DocxMaterializationAnchor;
1158
+ readonly body: DocxMaterializationText;
1159
+ readonly attribution: DocxMaterializationAttribution;
1160
+ };
1161
+ export type DocxMaterializationRequest = {
1162
+ readonly protocolVersion: '1.0.0';
1163
+ readonly requestId: string;
1164
+ readonly mediaType: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
1165
+ readonly bytesBase64: DocxMaterializationBytes;
1166
+ readonly operation: DocxMaterializationOperation;
1167
+ };
1168
+ export type DocxMaterializationResult = {
1169
+ readonly kind: 'inspection';
1170
+ readonly paragraphs: readonly ({
1171
+ readonly target: DocxMaterializationAnchor;
1172
+ readonly editable: boolean;
1173
+ })[];
1174
+ readonly nextCursor: number | null;
1175
+ } | {
1176
+ readonly kind: 'document';
1177
+ readonly bytesBase64: DocxMaterializationBytes;
1178
+ } | {
1179
+ readonly kind: 'rejected';
1180
+ readonly code: 'INVALID_DOCX' | 'TARGET_MISMATCH' | 'UNSUPPORTED_TARGET' | 'LIMIT_EXCEEDED' | 'INVALID_REQUEST';
1181
+ };
1182
+ export type DocxMaterializationResponse = {
1183
+ readonly protocolVersion: '1.0.0';
1184
+ readonly requestId: string;
1185
+ readonly result: DocxMaterializationResult;
1186
+ };
1187
+ export type CompanionSelectionId = string;
1188
+ export type CompanionCallId = string;
1189
+ export type CompanionClientMessageId = string;
1190
+ export type CompanionAppAssistRef = string;
1191
+ export type CompanionAppAssistAction = 'dismiss' | 'timeout' | 'accept';
1192
+ export type CompanionCorrelatableId = string;
1193
+ export type CompanionOpaqueReadReference = string;
1194
+ export type CompanionConversationScopeRef = string;
1195
+ export type CompanionPresentationReference = {
1196
+ readonly kind: 'message';
1197
+ readonly messageId: CompanionCorrelatableId;
1198
+ } | {
1199
+ readonly kind: 'native-item';
1200
+ readonly nativeItemId: CompanionCorrelatableId;
1201
+ };
1202
+ export type CompanionScreenFrame = {
1203
+ readonly image: string;
1204
+ readonly width: number;
1205
+ readonly height: number;
1206
+ readonly frameId: string;
1207
+ readonly sourceLabel: string;
1208
+ readonly observedAt: number;
1209
+ };
1210
+ export type CompanionCommand = {
1211
+ readonly kind: 'state';
1212
+ } | {
1213
+ readonly kind: 'work.read';
1214
+ } | {
1215
+ readonly kind: 'work.open';
1216
+ readonly entryRef: string;
1217
+ } | {
1218
+ readonly kind: 'prepare';
1219
+ } | {
1220
+ readonly kind: 'audio.connect';
1221
+ readonly mode?: 'receive_only';
1222
+ } | {
1223
+ readonly kind: 'audio.close';
1224
+ } | {
1225
+ readonly kind: 'audio.microphone';
1226
+ readonly muted: boolean;
1227
+ } | {
1228
+ readonly kind: 'audio.speaker';
1229
+ readonly muted: boolean;
1230
+ } | {
1231
+ readonly kind: 'stop';
1232
+ } | {
1233
+ readonly kind: 'text';
1234
+ readonly text: string;
1235
+ readonly clientMessageId: string;
1236
+ } | {
1237
+ readonly kind: 'documents';
1238
+ readonly allowed: boolean;
1239
+ } | {
1240
+ readonly kind: 'screen.pick';
1241
+ } | {
1242
+ readonly kind: 'screen.open';
1243
+ readonly selectionId: CompanionSelectionId;
1244
+ readonly label: string;
1245
+ } | {
1246
+ readonly kind: 'screen.frame';
1247
+ readonly selectionId: CompanionSelectionId;
1248
+ readonly frame: CompanionScreenFrame;
1249
+ } | {
1250
+ readonly kind: 'screen.close';
1251
+ } | {
1252
+ readonly kind: 'conversation.open';
1253
+ } | {
1254
+ readonly kind: 'presentation.observe';
1255
+ readonly event: 'first_text_visible';
1256
+ readonly observedAt: number;
1257
+ readonly callId: CompanionCallId;
1258
+ readonly reference: CompanionPresentationReference;
1259
+ } | {
1260
+ readonly kind: 'decisions.read';
1261
+ readonly offset: number;
1262
+ readonly limit: number;
1263
+ } | {
1264
+ readonly kind: 'decision.open';
1265
+ readonly variantRef: string;
1266
+ readonly target: CompanionDecisionNavigationTarget;
1267
+ } | {
1268
+ readonly kind: 'f221.inspect';
1269
+ readonly proposalId: string;
1270
+ } | {
1271
+ readonly kind: 'view.resize';
1272
+ readonly expanded: boolean;
1273
+ } | {
1274
+ readonly kind: 'view.layout';
1275
+ readonly panel: 'none' | 'bubble' | 'actions' | 'menu' | 'chat' | 'decisions' | 'transcript' | 'settings' | 'app-assist';
1276
+ readonly width: number;
1277
+ readonly height: number;
1278
+ readonly call?: {
1279
+ readonly presentation: 'lite' | 'controls';
1280
+ readonly bubble?: {
1281
+ readonly width: number;
1282
+ readonly height: number;
1283
+ };
1284
+ };
1285
+ } | {
1286
+ readonly kind: 'view.drag';
1287
+ readonly phase: 'start' | 'end';
1288
+ } | {
1289
+ readonly kind: 'view.hide';
1290
+ } | {
1291
+ readonly kind: 'view.reset';
1292
+ } | {
1293
+ readonly kind: 'settings.read';
1294
+ } | {
1295
+ readonly kind: 'settings.update';
1296
+ readonly field: 'dutyCatProfileId';
1297
+ readonly value: string;
1298
+ } | {
1299
+ readonly kind: 'settings.update';
1300
+ readonly field: 'skin';
1301
+ readonly value: 'yarn-ball' | 'ragdoll-v1' | 'yanyan-codex' | 'xianxian-codex';
1302
+ } | {
1303
+ readonly kind: 'settings.update';
1304
+ readonly field: 'ballSize';
1305
+ readonly value: number;
1306
+ } | {
1307
+ readonly kind: 'settings.update';
1308
+ readonly field: 'behaviorEnabled';
1309
+ readonly value: boolean;
1310
+ } | {
1311
+ readonly kind: 'settings.update';
1312
+ readonly field: 'proactivePolicy';
1313
+ readonly value: 'ambient' | 'quiet-badge';
1314
+ } | {
1315
+ readonly kind: 'settings.update';
1316
+ readonly field: 'personaTone';
1317
+ readonly value: string;
1318
+ } | {
1319
+ readonly kind: 'settings.update';
1320
+ readonly field: 'householdReadsAllowed';
1321
+ readonly value: boolean;
1322
+ } | {
1323
+ readonly kind: 'settings.update';
1324
+ readonly field: 'appAssistEnabled';
1325
+ readonly value: boolean;
1326
+ } | {
1327
+ readonly kind: 'app-assist.settle';
1328
+ readonly scopeRef: CompanionAppAssistRef;
1329
+ readonly offerRef: CompanionAppAssistRef;
1330
+ readonly action: CompanionAppAssistAction;
1331
+ } | {
1332
+ readonly kind: 'companion.disable';
1333
+ } | {
1334
+ readonly kind: 'conversation.read';
1335
+ } | {
1336
+ readonly kind: 'conversation.read';
1337
+ readonly v: 2;
1338
+ readonly before?: CompanionOpaqueReadReference;
1339
+ readonly limit?: number;
1340
+ } | {
1341
+ readonly kind: 'conversation.body.read';
1342
+ readonly v: 2;
1343
+ readonly continuation: CompanionOpaqueReadReference;
1344
+ } | {
1345
+ readonly kind: 'conversation.draft.read';
1346
+ readonly v: 1;
1347
+ } | {
1348
+ readonly kind: 'conversation.draft.save';
1349
+ readonly v: 1;
1350
+ readonly scopeRef: CompanionConversationScopeRef;
1351
+ readonly expectedRevision: number;
1352
+ readonly text: string;
1353
+ } | {
1354
+ readonly kind: 'conversation.delivery.read';
1355
+ readonly v: 1;
1356
+ readonly scopeRef: CompanionConversationScopeRef;
1357
+ readonly clientMessageId: CompanionClientMessageId;
1358
+ } | {
1359
+ readonly kind: 'transcript.read';
1360
+ } | {
1361
+ readonly kind: 'text';
1362
+ readonly v: 2;
1363
+ readonly scopeRef: CompanionConversationScopeRef;
1364
+ readonly text: string;
1365
+ readonly clientMessageId: CompanionClientMessageId;
1366
+ readonly submissionRevision: number;
1367
+ };
1368
+ export type CompanionActor = {
1369
+ readonly catId: string;
1370
+ readonly displayName: string;
1371
+ };
1372
+ export type CompanionWorkCoverage = {
1373
+ readonly source: 'tasks' | 'messages' | 'artifacts';
1374
+ readonly status: 'available' | 'partial' | 'unavailable';
1375
+ };
1376
+ export type CompanionWorkActive = {
1377
+ readonly entryRef: string;
1378
+ readonly title: string;
1379
+ readonly actor: CompanionActor | null;
1380
+ readonly activity: 'working' | 'waiting';
1381
+ readonly taskId: string | null;
1382
+ readonly homeThreadId: string | null;
1383
+ readonly sourceRef: string;
1384
+ readonly updatedAt: number;
1385
+ };
1386
+ export type CompanionWorkDelivery = {
1387
+ readonly entryRef: string;
1388
+ readonly title: string;
1389
+ readonly taskId: string | null;
1390
+ readonly homeThreadId: string | null;
1391
+ readonly sourceRef: string;
1392
+ readonly deliveredAt: number;
1393
+ readonly artifact: null | {
1394
+ readonly artifactId: string;
1395
+ readonly version: string | null;
1396
+ readonly versionState: 'current' | 'superseded' | 'unknown';
1397
+ };
1398
+ };
1399
+ export type CompanionWorkOverview = {
1400
+ readonly kind: 'work';
1401
+ readonly v: 1;
1402
+ readonly status: 'available' | 'partial' | 'unavailable';
1403
+ readonly observedAt: number;
1404
+ readonly scope: {
1405
+ readonly kind: 'current-project';
1406
+ readonly label: string;
1407
+ };
1408
+ readonly coverage: readonly [CompanionWorkCoverage, CompanionWorkCoverage, CompanionWorkCoverage];
1409
+ readonly active: readonly CompanionWorkActive[];
1410
+ readonly recentDeliveries: readonly CompanionWorkDelivery[];
1411
+ };
1412
+ export type CompanionIdentitySnapshotV1 = {
1413
+ readonly v: 1;
1414
+ readonly name: '猫猫球';
1415
+ readonly partner: {
1416
+ readonly catId: string;
1417
+ readonly displayName: string;
1418
+ readonly skin: string;
1419
+ };
1420
+ readonly live: {
1421
+ readonly catId: string;
1422
+ readonly displayName: string;
1423
+ readonly transport: 'gpt_live_v3';
1424
+ readonly verifiedModel: string | null;
1425
+ };
1426
+ readonly deep: {
1427
+ readonly catId: string;
1428
+ readonly displayName: string;
1429
+ readonly verifiedModel: string | null;
1430
+ };
1431
+ };
1432
+ export type CompanionLiveTransport = {
1433
+ readonly kind: 'gpt_live_v3';
1434
+ readonly verifiedModel: null;
1435
+ };
1436
+ export type CompanionAudioState = {
1437
+ readonly supportedModes: readonly ('duplex' | 'receive_only')[];
1438
+ readonly activeMode: 'duplex' | 'receive_only' | null;
1439
+ };
1440
+ export type CompanionNativeWorkEntry = {
1441
+ readonly taskId: string;
1442
+ readonly nativeTurnId: string;
1443
+ readonly kind: 'reasoning' | 'tool' | 'workspace_fetch' | 'workspace_dispatch' | 'screen_read';
1444
+ readonly startedAt: number;
1445
+ readonly expiresAt: number;
1446
+ };
1447
+ export type CompanionNativeWorkEvent = {
1448
+ readonly eventId: string;
1449
+ readonly taskId: string;
1450
+ readonly kind: 'reasoning' | 'tool' | 'workspace_fetch' | 'workspace_dispatch' | 'screen_read' | 'result';
1451
+ readonly phase: 'started' | 'completed' | 'failed' | 'cancelled' | 'expired' | 'result_handed_to_voice';
1452
+ readonly occurredAt: number;
1453
+ readonly expiresAt: number;
1454
+ readonly resultId?: string;
1455
+ readonly nativeCarrierCatId?: string;
1456
+ };
1457
+ export type CompanionNativeWork = {
1458
+ readonly scopeId: string | null;
1459
+ readonly revision: number;
1460
+ readonly active: readonly CompanionNativeWorkEntry[];
1461
+ readonly recent: readonly CompanionNativeWorkEvent[];
1462
+ };
1463
+ export type CompanionMeetingState = {
1464
+ readonly kind: 'running';
1465
+ readonly sharing: boolean;
1466
+ readonly paused: boolean;
1467
+ readonly sourceLabel: string | null;
1468
+ } | {
1469
+ readonly kind: 'idle' | 'stopped' | 'unconfirmed' | 'needs_source';
1470
+ readonly sharing: false;
1471
+ readonly paused: false;
1472
+ readonly sourceLabel: null;
1473
+ };
1474
+ export type CompanionAppAssistState = {
1475
+ readonly scopeRef: CompanionAppAssistRef;
1476
+ readonly revision: number;
1477
+ readonly status: 'ready';
1478
+ readonly offer: null | {
1479
+ readonly offerRef: CompanionAppAssistRef;
1480
+ readonly appName: string;
1481
+ };
1482
+ } | {
1483
+ readonly scopeRef: CompanionAppAssistRef;
1484
+ readonly revision: number;
1485
+ readonly status: 'off' | 'suspended' | 'unsupported' | 'source_unavailable' | 'permission_required' | 'timezone_required' | 'identity_unavailable';
1486
+ readonly offer: null;
1487
+ };
1488
+ export type CompanionAppAssistSettlement = {
1489
+ readonly kind: 'app-assist-settlement';
1490
+ readonly scopeRef: CompanionAppAssistRef;
1491
+ readonly revision: number;
1492
+ readonly offerRef: CompanionAppAssistRef;
1493
+ readonly action: CompanionAppAssistAction;
1494
+ readonly outcome: 'settled' | 'stale_offer';
1495
+ };
1496
+ export type CompanionState = {
1497
+ readonly kind: 'state';
1498
+ readonly phase: 'idle' | 'preparing' | 'ready' | 'connecting' | 'talking' | 'closed' | 'failed';
1499
+ readonly displayName: string;
1500
+ readonly skin: string;
1501
+ readonly duty: CompanionActor;
1502
+ readonly carrier: CompanionActor;
1503
+ readonly documentsAllowed: boolean;
1504
+ readonly behaviorEnabled: boolean;
1505
+ readonly toolsReady: boolean;
1506
+ readonly nativeActivity: 'none' | 'reasoning' | 'tool_running';
1507
+ readonly liveTransport: CompanionLiveTransport;
1508
+ readonly audio?: CompanionAudioState;
1509
+ readonly meeting: CompanionMeetingState;
1510
+ readonly appAssist: CompanionAppAssistState;
1511
+ readonly nativeWork: CompanionNativeWork;
1512
+ };
1513
+ export type CompanionDecisionNavigationTarget = 'origin' | 'approval_card' | 'action';
1514
+ export type CompanionDecisionNavigation = {
1515
+ readonly targets: readonly CompanionDecisionNavigationTarget[];
1516
+ };
1517
+ export type CompanionDecisionSourceRead = {
1518
+ readonly status: 'available' | 'unavailable' | 'unauthenticated' | 'forbidden' | 'invalid';
1519
+ readonly coverage: 'complete' | 'partial' | 'unknown';
1520
+ };
1521
+ export type CompanionDecisionSources = {
1522
+ readonly approvals: CompanionDecisionSourceRead;
1523
+ readonly needsMe: CompanionDecisionSourceRead;
1524
+ };
1525
+ export type CompanionDecisionApproval = {
1526
+ readonly resolution: 'open' | 'accepted' | 'rejected' | 'closed_without_decision';
1527
+ readonly materializationState: 'not_started' | 'outcome_unknown' | 'in_progress' | 'succeeded' | 'failed';
1528
+ readonly linkedNeedsMe: boolean;
1529
+ };
1530
+ export type CompanionDecisionItem = {
1531
+ readonly variantRef: string;
1532
+ readonly kind: 'approval';
1533
+ readonly summary: string;
1534
+ readonly navigation: CompanionDecisionNavigation;
1535
+ readonly approval: CompanionDecisionApproval;
1536
+ } | {
1537
+ readonly variantRef: string;
1538
+ readonly kind: 'judgment' | 'repair';
1539
+ readonly summary: string;
1540
+ readonly navigation: CompanionDecisionNavigation;
1541
+ };
1542
+ export type CompanionLegacyDecisions = {
1543
+ readonly kind: 'decisions';
1544
+ readonly status: 'available' | 'unavailable';
1545
+ readonly approvalCount: number | null;
1546
+ readonly needsMeCount: number | null;
1547
+ readonly otherNeedsMeCount: number | null;
1548
+ readonly approvals: readonly ({
1549
+ readonly proposalId: string;
1550
+ readonly sourceFeatureId: string;
1551
+ readonly summary: string;
1552
+ readonly resolution: 'open' | 'accepted' | 'rejected' | 'closed_without_decision';
1553
+ readonly materializationState: 'not_started' | 'outcome_unknown' | 'in_progress' | 'succeeded' | 'failed';
1554
+ readonly linkedNeedsMe: boolean;
1555
+ })[];
1556
+ readonly otherNeedsMe: readonly ({
1557
+ readonly subjectRef: string;
1558
+ readonly summary: string;
1559
+ })[];
1560
+ readonly page: {
1561
+ readonly offset: number;
1562
+ readonly limit: number;
1563
+ readonly hasMoreApprovals: boolean;
1564
+ readonly hasMoreNeedsMe: boolean;
1565
+ };
1566
+ };
1567
+ export type CompanionUnifiedDecisions = {
1568
+ readonly kind: 'decisions';
1569
+ readonly version: 1;
1570
+ readonly status: 'available' | 'partial' | 'unavailable';
1571
+ readonly observedAt: number;
1572
+ readonly sources: CompanionDecisionSources;
1573
+ readonly items: readonly CompanionDecisionItem[];
1574
+ readonly totalCount?: number;
1575
+ readonly page: {
1576
+ readonly offset: number;
1577
+ readonly limit: number;
1578
+ readonly scope: 'known_rows';
1579
+ readonly hasMore: boolean;
1580
+ };
1581
+ };
1582
+ export type CompanionDecisions = CompanionLegacyDecisions | CompanionUnifiedDecisions;
1583
+ export type CompanionDecisionTrial = {
1584
+ readonly kind: 'decision-trial';
1585
+ readonly status: 'dismissed' | 'trial_confirmed' | 'stale' | 'unavailable';
1586
+ };
1587
+ export type CompanionSettingField = 'dutyCatProfileId' | 'skin' | 'ballSize' | 'behaviorEnabled' | 'proactivePolicy' | 'personaTone' | 'householdReadsAllowed' | 'appAssistEnabled';
1588
+ export type CompanionSettingsValues = {
1589
+ readonly dutyCatProfileId: string;
1590
+ readonly skin: 'yarn-ball' | 'ragdoll-v1' | 'yanyan-codex' | 'xianxian-codex';
1591
+ readonly ballSize: number;
1592
+ readonly behaviorEnabled: boolean;
1593
+ readonly proactivePolicy: 'ambient' | 'quiet-badge';
1594
+ readonly personaTone: string;
1595
+ readonly householdReadsAllowed: boolean;
1596
+ readonly appAssistEnabled: boolean;
1597
+ };
1598
+ export type CompanionSettingsRosterEntry = {
1599
+ readonly catProfileId: string;
1600
+ readonly displayName: string;
1601
+ readonly available: boolean;
1602
+ };
1603
+ export type CompanionSettings = {
1604
+ readonly kind: 'settings';
1605
+ readonly status: 'available';
1606
+ readonly values: CompanionSettingsValues;
1607
+ readonly companions: readonly CompanionSettingsRosterEntry[];
1608
+ readonly selectedCompanionStatus: 'available' | 'unavailable';
1609
+ } | {
1610
+ readonly kind: 'settings';
1611
+ readonly status: 'unavailable';
1612
+ readonly reason: 'host_upgrade_required' | 'temporarily_unavailable';
1613
+ };
1614
+ export type CompanionSettingsUpdateReceipt = {
1615
+ readonly kind: 'settings-update';
1616
+ readonly field: CompanionSettingField;
1617
+ readonly outcome: 'saved';
1618
+ readonly callStatus: 'unchanged' | 'stopped';
1619
+ readonly applies: 'now' | 'next_call';
1620
+ } | {
1621
+ readonly kind: 'settings-update';
1622
+ readonly field: CompanionSettingField;
1623
+ readonly outcome: 'rejected';
1624
+ readonly callStatus: 'unchanged' | 'stopped' | 'stop_failed';
1625
+ readonly reason: 'invalid_value' | 'selection_unavailable' | 'permission_denied' | 'call_stop_failed' | 'save_failed' | 'unsupported';
1626
+ } | {
1627
+ readonly kind: 'settings-update';
1628
+ readonly field: CompanionSettingField;
1629
+ readonly outcome: 'unconfirmed';
1630
+ readonly callStatus: 'unchanged' | 'stopped';
1631
+ readonly reconcile: 'settings.read';
1632
+ };
1633
+ export type CompanionLifecycleReceipt = {
1634
+ readonly kind: 'companion-lifecycle';
1635
+ readonly action: 'disable';
1636
+ readonly outcome: 'disabled';
1637
+ };
1638
+ export type CompanionTranscriptScope = {
1639
+ readonly callId: CompanionCallId;
1640
+ readonly realtimeSessionId: string;
1641
+ };
1642
+ export type CompanionTranscriptVoiceSource = {
1643
+ readonly kind: 'voice';
1644
+ readonly nativeThreadId: string;
1645
+ readonly realtimeSessionId: string;
1646
+ readonly nativeItemId: CompanionCorrelatableId;
1647
+ readonly nativeTurnId?: string;
1648
+ };
1649
+ export type CompanionTranscriptTypedSource = {
1650
+ readonly kind: 'typed';
1651
+ readonly clientMessageId: CompanionClientMessageId;
1652
+ readonly callId: CompanionCallId;
1653
+ };
1654
+ export type CompanionTranscriptRow = {
1655
+ readonly messageId: CompanionCorrelatableId;
1656
+ readonly role: 'user' | 'assistant';
1657
+ readonly text: string;
1658
+ readonly source: CompanionTranscriptVoiceSource;
1659
+ } | {
1660
+ readonly messageId: CompanionCorrelatableId;
1661
+ readonly role: 'user';
1662
+ readonly text: string;
1663
+ readonly source: CompanionTranscriptTypedSource;
1664
+ };
1665
+ export type CompanionDeliveryReceipt = {
1666
+ readonly kind: 'delivery';
1667
+ readonly delivery: 'accepted';
1668
+ readonly clientMessageId: CompanionClientMessageId;
1669
+ readonly messageId: CompanionCorrelatableId;
1670
+ readonly callId: CompanionCallId | null;
1671
+ } | {
1672
+ readonly kind: 'delivery';
1673
+ readonly delivery: 'unconfirmed';
1674
+ readonly clientMessageId: CompanionClientMessageId;
1675
+ readonly messageId: null;
1676
+ readonly callId: CompanionCallId | null;
1677
+ };
1678
+ export type CompanionDeliveryAcceptedV2 = {
1679
+ readonly kind: 'delivery';
1680
+ readonly v: 2;
1681
+ readonly delivery: 'accepted';
1682
+ readonly clientMessageId: CompanionClientMessageId;
1683
+ readonly messageId: CompanionCorrelatableId;
1684
+ readonly callId: CompanionCallId | null;
1685
+ };
1686
+ export type CompanionDeliveryUnconfirmedV2 = {
1687
+ readonly kind: 'delivery';
1688
+ readonly v: 2;
1689
+ readonly delivery: 'unconfirmed';
1690
+ readonly clientMessageId: CompanionClientMessageId;
1691
+ readonly messageId: null;
1692
+ readonly callId: CompanionCallId | null;
1693
+ };
1694
+ export type CompanionDeliveryRejectedV2 = {
1695
+ readonly kind: 'delivery';
1696
+ readonly v: 2;
1697
+ readonly delivery: 'rejected';
1698
+ readonly clientMessageId: CompanionClientMessageId;
1699
+ readonly reason: 'draft_changed' | 'unsupported_draft' | 'pending_limit';
1700
+ readonly draftRevision: number;
1701
+ };
1702
+ export type CompanionDeliveryReceiptV2 = CompanionDeliveryAcceptedV2 | CompanionDeliveryUnconfirmedV2 | CompanionDeliveryRejectedV2;
1703
+ export type CompanionConversationDraftSubmissionV1 = {
1704
+ readonly clientMessageId: CompanionClientMessageId;
1705
+ readonly text: string;
1706
+ readonly submissionRevision: number;
1707
+ readonly receipt: CompanionDeliveryAcceptedV2 | CompanionDeliveryUnconfirmedV2;
1708
+ };
1709
+ export type CompanionConversationDraftV1 = {
1710
+ readonly kind: 'conversation-draft';
1711
+ readonly v: 1;
1712
+ readonly status: 'available';
1713
+ readonly scopeRef: CompanionConversationScopeRef;
1714
+ readonly revision: number;
1715
+ readonly text: string;
1716
+ readonly writable: boolean;
1717
+ readonly submissions: readonly CompanionConversationDraftSubmissionV1[];
1718
+ } | {
1719
+ readonly kind: 'conversation-draft';
1720
+ readonly v: 1;
1721
+ readonly status: 'conflict' | 'readonly';
1722
+ readonly revision: number;
1723
+ };
1724
+ export type CompanionConversationResponsePhase = 'processing' | 'completed' | 'failed' | 'canceled' | 'interrupted' | null;
1725
+ export type CompanionConversationBodyProjection = {
1726
+ readonly revision: CompanionCorrelatableId;
1727
+ readonly complete: true;
1728
+ readonly continuation: null;
1729
+ } | {
1730
+ readonly revision: CompanionCorrelatableId;
1731
+ readonly complete: false;
1732
+ readonly continuation: CompanionOpaqueReadReference;
1733
+ };
1734
+ export type CompanionConversationRowV2 = {
1735
+ readonly id: CompanionCorrelatableId;
1736
+ readonly role: 'user' | 'assistant';
1737
+ readonly name: string;
1738
+ readonly text: string;
1739
+ readonly companionIdentity?: CompanionIdentitySnapshotV1;
1740
+ readonly inputMessageIds: readonly CompanionCorrelatableId[];
1741
+ readonly responsePhase: CompanionConversationResponsePhase;
1742
+ readonly body: CompanionConversationBodyProjection;
1743
+ readonly deliveryReceipt?: CompanionDeliveryAcceptedV2;
1744
+ };
1745
+ export type CompanionConversationPageV2 = {
1746
+ readonly kind: 'conversation';
1747
+ readonly v: 2;
1748
+ readonly status: 'available';
1749
+ readonly threadTitle: string;
1750
+ readonly messages: readonly CompanionConversationRowV2[];
1751
+ readonly hasMoreOlder: boolean;
1752
+ readonly olderCursor: CompanionOpaqueReadReference | null;
1753
+ } | {
1754
+ readonly kind: 'conversation';
1755
+ readonly v: 2;
1756
+ readonly status: 'stale';
1757
+ };
1758
+ export type CompanionConversationBodyV2 = {
1759
+ readonly kind: 'conversation-body';
1760
+ readonly v: 2;
1761
+ readonly status: 'available';
1762
+ readonly messageId: CompanionCorrelatableId;
1763
+ readonly text: string;
1764
+ readonly body: CompanionConversationBodyProjection;
1765
+ } | {
1766
+ readonly kind: 'conversation-body';
1767
+ readonly v: 2;
1768
+ readonly status: 'stale' | 'withdrawn';
1769
+ };
1770
+ export type CompanionErrorCode = 'invalid_request' | 'permission_required' | 'unavailable' | 'session_required' | 'busy' | 'selection_changed' | 'carrier_unavailable' | 'cancelled' | 'unconfirmed';
1771
+ export type CompanionReply = {
1772
+ readonly kind: 'ok';
1773
+ } | CompanionState | CompanionWorkOverview | CompanionDecisions | CompanionDecisionTrial | CompanionDeliveryReceipt | CompanionDeliveryReceiptV2 | CompanionConversationDraftV1 | CompanionSettings | CompanionSettingsUpdateReceipt | CompanionLifecycleReceipt | CompanionAppAssistSettlement | {
1774
+ readonly kind: 'selection';
1775
+ readonly selectionId: CompanionSelectionId;
1776
+ } | CompanionConversationPageV2 | CompanionConversationBodyV2 | {
1777
+ readonly kind: 'navigation';
1778
+ readonly delivery: 'requested' | 'applied' | 'queued' | 'blocked' | 'unconfirmed';
1779
+ } | {
1780
+ readonly kind: 'error';
1781
+ readonly code: CompanionErrorCode;
1782
+ } | {
1783
+ readonly kind: 'layout';
1784
+ readonly pet: {
1785
+ readonly x: number;
1786
+ readonly y: number;
1787
+ };
1788
+ readonly panel: {
1789
+ readonly x: number;
1790
+ readonly y: number;
1791
+ readonly width: number;
1792
+ readonly height: number;
1793
+ };
1794
+ readonly bubble?: {
1795
+ readonly x: number;
1796
+ readonly y: number;
1797
+ readonly width: number;
1798
+ readonly height: number;
1799
+ };
1800
+ readonly width: number;
1801
+ readonly height: number;
1802
+ } | {
1803
+ readonly kind: 'conversation';
1804
+ readonly threadTitle: string;
1805
+ readonly messages: readonly ({
1806
+ readonly id: string;
1807
+ readonly role: 'user' | 'assistant';
1808
+ readonly text: string;
1809
+ readonly name: string;
1810
+ readonly companionIdentity?: CompanionIdentitySnapshotV1;
1811
+ })[];
1812
+ readonly hasMore: boolean;
1813
+ } | {
1814
+ readonly kind: 'transcript';
1815
+ readonly scope: CompanionTranscriptScope;
1816
+ readonly rows: readonly CompanionTranscriptRow[];
1817
+ readonly hasMore: boolean;
1818
+ };
1819
+ export type CompanionEvent = {
1820
+ readonly kind: 'media-stopped';
1821
+ readonly reason: 'locked' | 'suspended' | 'hidden' | 'closed' | 'revoked';
1822
+ } | {
1823
+ readonly kind: 'audio';
1824
+ readonly type: 'connected' | 'recovering' | 'recovered' | 'error';
1825
+ readonly callId: CompanionCallId;
1826
+ } | {
1827
+ readonly kind: 'audio';
1828
+ readonly type: 'transcript';
1829
+ readonly role: 'user' | 'assistant';
1830
+ readonly text: string;
1831
+ readonly callId: CompanionCallId;
1832
+ readonly turnId?: string;
1833
+ readonly itemId?: CompanionCorrelatableId;
1834
+ } | {
1835
+ readonly kind: 'audio';
1836
+ readonly type: 'turn-done';
1837
+ readonly role?: 'user' | 'assistant';
1838
+ readonly transcript?: string;
1839
+ readonly callId: CompanionCallId;
1840
+ readonly turnId?: string;
1841
+ } | {
1842
+ readonly kind: 'view-dismiss';
1843
+ };
1844
+ export declare const DOCX_MATERIALIZATION_TEXT_PATTERN = "^[\\u0009\\u000A\\u0020-\\uD7FF\\uE000-\\uFFFD\\u{10000}-\\u{10FFFF}]*(?![\\s\\S])";
1845
+ export declare const DOCX_MATERIALIZATION_AUTHOR_PATTERN = "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\u{10000}-\\u{10FFFF}]*(?![\\s\\S])";
385
1846
  export type FixtureMetadata = {
386
1847
  readonly executor: 'loopback';
387
1848
  readonly domain: 'messaging';
@@ -441,6 +1902,31 @@ export type FixtureOperation = {
441
1902
  readonly operation: 'deleteReplayEvents';
442
1903
  readonly input: DeleteReplayEventsInput;
443
1904
  };
1905
+ export type PluginToHostMethod = 'messaging.send' | 'messaging.appendElements' | 'messaging.subscribe' | 'messaging.read' | 'messaging.ack' | 'messaging.snapshot';
1906
+ export type BehaviorExpectationOracle = {
1907
+ readonly kind: 'behavior-expectation';
1908
+ };
1909
+ export type JsonRpcAdmissionOracle = {
1910
+ readonly kind: 'json-rpc-error';
1911
+ readonly code: -32602;
1912
+ readonly sideEffects: 'behavior-expectation';
1913
+ };
1914
+ export type BehaviorExecution = {
1915
+ readonly plane: 'plugin-to-host-wire';
1916
+ readonly method: PluginToHostMethod;
1917
+ readonly verdictOracle: BehaviorExpectationOracle;
1918
+ } | {
1919
+ readonly plane: 'wire-admission';
1920
+ readonly method: PluginToHostMethod;
1921
+ readonly verdictOracle: JsonRpcAdmissionOracle;
1922
+ } | {
1923
+ readonly plane: 'host-to-plugin-delivery';
1924
+ readonly method: 'host.messaging.deliver';
1925
+ readonly verdictOracle: BehaviorExpectationOracle;
1926
+ } | {
1927
+ readonly plane: 'host-control';
1928
+ readonly verdictOracle: BehaviorExpectationOracle;
1929
+ };
444
1930
  export type SendOperationInput = {
445
1931
  readonly address: Readonly<Record<string, unknown>>;
446
1932
  readonly idempotencyKey: string;
@@ -483,7 +1969,7 @@ export type PermissionMatrixEntry = {
483
1969
  readonly firstPartyPreset: boolean;
484
1970
  };
485
1971
  export type PermissionMatrixInput = {
486
- readonly entries: readonly [PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry];
1972
+ readonly entries: readonly [PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry, PermissionMatrixEntry];
487
1973
  };
488
1974
  export type DeleteReplayEventsInput = {
489
1975
  readonly subscriptionId: string;
@@ -491,19 +1977,159 @@ export type DeleteReplayEventsInput = {
491
1977
  };
492
1978
  export type SideEffectAssertion = {
493
1979
  readonly target: 'messages' | 'output_events' | 'idempotency_ledger' | 'subscription' | 'snapshot' | 'reply_preview' | 'provenance' | 'grant_state' | 'permission_matrix' | 'replay_events';
494
- readonly assertion: 'unchanged' | 'none' | 'state_equals' | 'round_trip' | 'matches';
495
- readonly value?: unknown;
1980
+ readonly assertion: 'unchanged';
1981
+ readonly value?: never;
1982
+ } | {
1983
+ readonly target: 'messages' | 'output_events' | 'idempotency_ledger' | 'subscription' | 'snapshot' | 'reply_preview' | 'provenance' | 'grant_state' | 'permission_matrix' | 'replay_events';
1984
+ readonly assertion: 'none';
1985
+ readonly value?: never;
1986
+ } | {
1987
+ readonly target: 'messages' | 'output_events' | 'idempotency_ledger' | 'subscription' | 'snapshot' | 'reply_preview' | 'provenance' | 'grant_state' | 'permission_matrix' | 'replay_events';
1988
+ readonly assertion: 'state_equals';
1989
+ readonly value: unknown;
1990
+ } | {
1991
+ readonly target: 'messages' | 'output_events' | 'idempotency_ledger' | 'subscription' | 'snapshot' | 'reply_preview' | 'provenance' | 'grant_state' | 'permission_matrix' | 'replay_events';
1992
+ readonly assertion: 'round_trip';
1993
+ readonly value: unknown;
1994
+ } | {
1995
+ readonly target: 'messages' | 'output_events' | 'idempotency_ledger' | 'subscription' | 'snapshot' | 'reply_preview' | 'provenance' | 'grant_state' | 'permission_matrix' | 'replay_events';
1996
+ readonly assertion: 'matches';
1997
+ readonly value: unknown;
496
1998
  };
497
1999
  export type ExpectedVerdict = {
498
- readonly status: 'success' | 'error';
499
- readonly errorCode?: MessagingErrorCode;
2000
+ readonly status: 'success';
2001
+ readonly errorCode?: never;
2002
+ readonly sideEffects: readonly SideEffectAssertion[];
2003
+ } | {
2004
+ readonly status: 'error';
2005
+ readonly errorCode: MessagingErrorCode;
500
2006
  readonly sideEffects: readonly SideEffectAssertion[];
501
2007
  };
502
2008
  export type BehaviorCase = {
503
2009
  readonly id: string;
504
2010
  readonly invariant: string;
2011
+ readonly execution: Extract<BehaviorExecution, {
2012
+ readonly plane: 'plugin-to-host-wire';
2013
+ }> & {
2014
+ readonly method: 'messaging.send';
2015
+ } | Extract<BehaviorExecution, {
2016
+ readonly plane: 'wire-admission';
2017
+ }> & {
2018
+ readonly method: 'messaging.send';
2019
+ };
2020
+ readonly given: FixtureSetup;
2021
+ readonly when: Extract<FixtureOperation, {
2022
+ readonly operation: 'send';
2023
+ }>;
2024
+ readonly expect: ExpectedVerdict;
2025
+ } | {
2026
+ readonly id: string;
2027
+ readonly invariant: string;
2028
+ readonly execution: Extract<BehaviorExecution, {
2029
+ readonly plane: 'plugin-to-host-wire';
2030
+ }> & {
2031
+ readonly method: 'messaging.appendElements';
2032
+ } | Extract<BehaviorExecution, {
2033
+ readonly plane: 'wire-admission';
2034
+ }> & {
2035
+ readonly method: 'messaging.appendElements';
2036
+ };
2037
+ readonly given: FixtureSetup;
2038
+ readonly when: Extract<FixtureOperation, {
2039
+ readonly operation: 'appendElements';
2040
+ }>;
2041
+ readonly expect: ExpectedVerdict;
2042
+ } | {
2043
+ readonly id: string;
2044
+ readonly invariant: string;
2045
+ readonly execution: Extract<BehaviorExecution, {
2046
+ readonly plane: 'plugin-to-host-wire';
2047
+ }> & {
2048
+ readonly method: 'messaging.subscribe';
2049
+ } | Extract<BehaviorExecution, {
2050
+ readonly plane: 'wire-admission';
2051
+ }> & {
2052
+ readonly method: 'messaging.subscribe';
2053
+ };
2054
+ readonly given: FixtureSetup;
2055
+ readonly when: Extract<FixtureOperation, {
2056
+ readonly operation: 'subscribe';
2057
+ }>;
2058
+ readonly expect: ExpectedVerdict;
2059
+ } | {
2060
+ readonly id: string;
2061
+ readonly invariant: string;
2062
+ readonly execution: Extract<BehaviorExecution, {
2063
+ readonly plane: 'plugin-to-host-wire';
2064
+ }> & {
2065
+ readonly method: 'messaging.read';
2066
+ } | Extract<BehaviorExecution, {
2067
+ readonly plane: 'wire-admission';
2068
+ }> & {
2069
+ readonly method: 'messaging.read';
2070
+ };
2071
+ readonly given: FixtureSetup;
2072
+ readonly when: Extract<FixtureOperation, {
2073
+ readonly operation: 'read';
2074
+ }>;
2075
+ readonly expect: ExpectedVerdict;
2076
+ } | {
2077
+ readonly id: string;
2078
+ readonly invariant: string;
2079
+ readonly execution: Extract<BehaviorExecution, {
2080
+ readonly plane: 'plugin-to-host-wire';
2081
+ }> & {
2082
+ readonly method: 'messaging.ack';
2083
+ } | Extract<BehaviorExecution, {
2084
+ readonly plane: 'wire-admission';
2085
+ }> & {
2086
+ readonly method: 'messaging.ack';
2087
+ };
2088
+ readonly given: FixtureSetup;
2089
+ readonly when: Extract<FixtureOperation, {
2090
+ readonly operation: 'ack';
2091
+ }>;
2092
+ readonly expect: ExpectedVerdict;
2093
+ } | {
2094
+ readonly id: string;
2095
+ readonly invariant: string;
2096
+ readonly execution: Extract<BehaviorExecution, {
2097
+ readonly plane: 'plugin-to-host-wire';
2098
+ }> & {
2099
+ readonly method: 'messaging.snapshot';
2100
+ } | Extract<BehaviorExecution, {
2101
+ readonly plane: 'wire-admission';
2102
+ }> & {
2103
+ readonly method: 'messaging.snapshot';
2104
+ };
2105
+ readonly given: FixtureSetup;
2106
+ readonly when: Extract<FixtureOperation, {
2107
+ readonly operation: 'snapshot';
2108
+ }>;
2109
+ readonly expect: ExpectedVerdict;
2110
+ } | {
2111
+ readonly id: string;
2112
+ readonly invariant: string;
2113
+ readonly execution: Extract<BehaviorExecution, {
2114
+ readonly plane: 'host-to-plugin-delivery';
2115
+ }> & {
2116
+ readonly method: 'host.messaging.deliver';
2117
+ };
2118
+ readonly given: FixtureSetup;
2119
+ readonly when: Extract<FixtureOperation, {
2120
+ readonly operation: 'deliverOnMessage';
2121
+ }>;
2122
+ readonly expect: ExpectedVerdict;
2123
+ } | {
2124
+ readonly id: string;
2125
+ readonly invariant: string;
2126
+ readonly execution: Extract<BehaviorExecution, {
2127
+ readonly plane: 'host-control';
2128
+ }>;
505
2129
  readonly given: FixtureSetup;
506
- readonly when: FixtureOperation;
2130
+ readonly when: Extract<FixtureOperation, {
2131
+ readonly operation: 'applyGrantPreset' | 'revokeGrant' | 'checkPermissionMatrix' | 'deleteReplayEvents';
2132
+ }>;
507
2133
  readonly expect: ExpectedVerdict;
508
2134
  };
509
2135
  export type BehaviorFixture = {
@@ -512,14 +2138,14 @@ export type BehaviorFixture = {
512
2138
  };
513
2139
  export declare const L0_CAPABILITIES: readonly ["plugin.config.read", "plugin.state.get", "plugin.state.set"];
514
2140
  export type L0Capability = (typeof L0_CAPABILITIES)[number];
515
- export declare const L1_CAPABILITIES: readonly ["messaging.send", "schedule.register", "events.publish", "messaging.appendElements"];
2141
+ export declare const L1_CAPABILITIES: readonly ["messaging.send", "schedule.register", "messaging.appendElements", "streams.read"];
516
2142
  export type L1Capability = (typeof L1_CAPABILITIES)[number];
517
- export declare const L2_CAPABILITIES: readonly ["onMessage", "message.event.subscribe", "secret.read", "thread.listMetadata", "thread.readContent", "memory.query", "memory.append", "memory.retrieve", "windows.create", "whisper.extend"];
2143
+ export declare const L2_CAPABILITIES: readonly ["onMessage", "message.event.subscribe", "secret.read", "thread.listMetadata", "thread.readContent", "thread.write", "task.read", "task.write", "task.admitEntrusted", "memory.query", "memory.append", "memory.retrieve", "windows.create", "whisper.extend", "cloud.conversation.host"];
518
2144
  export type L2Capability = (typeof L2_CAPABILITIES)[number];
519
2145
  export declare const CAPABILITY_TABLE: {
520
2146
  readonly L0: readonly ["plugin.config.read", "plugin.state.get", "plugin.state.set"];
521
- readonly L1: readonly ["messaging.send", "schedule.register", "events.publish", "messaging.appendElements"];
522
- readonly L2: readonly ["onMessage", "message.event.subscribe", "secret.read", "thread.listMetadata", "thread.readContent", "memory.query", "memory.append", "memory.retrieve", "windows.create", "whisper.extend"];
2147
+ readonly L1: readonly ["messaging.send", "schedule.register", "messaging.appendElements", "streams.read"];
2148
+ readonly L2: readonly ["onMessage", "message.event.subscribe", "secret.read", "thread.listMetadata", "thread.readContent", "thread.write", "task.read", "task.write", "task.admitEntrusted", "memory.query", "memory.append", "memory.retrieve", "windows.create", "whisper.extend", "cloud.conversation.host"];
523
2149
  };
524
2150
  export type AuthorizationLayer = keyof typeof CAPABILITY_TABLE;
525
2151
  export declare const DATA_CLASS_ALLOWED_STRATEGIES: {
@@ -539,6 +2165,12 @@ export declare const MESSAGING_BOUNDS: {
539
2165
  readonly maxElementIdLength: 128;
540
2166
  readonly maxElementsPerMessage: 128;
541
2167
  readonly maxAppendOpsPerMessage: 64;
2168
+ readonly maxMessageIdLength: 512;
2169
+ readonly maxThreadIdLength: 512;
2170
+ readonly maxActorIdLength: 512;
2171
+ readonly maxMessageHandleTokenLength: 512;
2172
+ readonly maxEventIdLength: 720;
2173
+ readonly maxOccurredAtLength: 27;
542
2174
  };
543
2175
  /**
544
2176
  * @signed(G-0 2026-07-15)