@whooshbang/contracts 2.2.0 → 2.3.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 (96) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/contract-manifest.json +32 -32
  3. package/dist/generated/artifact-index.d.ts +33 -33
  4. package/dist/generated/artifact-index.js +32 -32
  5. package/dist/generated/interaction-v1.d.ts +72 -4
  6. package/dist/generated/validators-standalone.d.ts +492 -480
  7. package/dist/generated/validators-standalone.js +4191 -2276
  8. package/dist/generated/validators-standalone.js.map +1 -1
  9. package/dist/generated/validators.d.ts +2 -1
  10. package/dist/generated/validators.js +2 -1
  11. package/dist/generated/validators.js.map +1 -1
  12. package/dist/generated/whooshbang-v1.d.ts +94 -17
  13. package/dist/index.d.ts +3 -2
  14. package/dist/index.js +2 -1
  15. package/dist/index.js.map +1 -1
  16. package/dist/interaction-expiry.d.ts +17 -0
  17. package/dist/interaction-expiry.js +67 -0
  18. package/dist/interaction-expiry.js.map +1 -0
  19. package/fixtures/core-v1/fixture-index.json +1 -1
  20. package/fixtures/core-v1/scenarios/api-credential-invalid-indistinguishable.json +1 -1
  21. package/fixtures/core-v1/scenarios/api-credential-one-time-reveal.json +1 -1
  22. package/fixtures/core-v1/scenarios/api-credential-revocation-replay.json +1 -1
  23. package/fixtures/core-v1/scenarios/api-credential-rotation-overlap.json +1 -1
  24. package/fixtures/core-v1/scenarios/cancellation-too-late.json +1 -1
  25. package/fixtures/core-v1/scenarios/cross-organization-project.json +1 -1
  26. package/fixtures/core-v1/scenarios/cross-project-resource.json +1 -1
  27. package/fixtures/core-v1/scenarios/environment-mismatch.json +1 -1
  28. package/fixtures/core-v1/scenarios/idempotency-conflict.json +1 -1
  29. package/fixtures/core-v1/scenarios/idempotency-equivalent-replay.json +1 -1
  30. package/fixtures/core-v1/scenarios/malformed-bearer.json +1 -1
  31. package/fixtures/core-v1/scenarios/metadata-overrun.json +1 -1
  32. package/fixtures/core-v1/scenarios/missing-scope.json +1 -1
  33. package/fixtures/core-v1/scenarios/project-create-equivalent-replay.json +1 -1
  34. package/fixtures/core-v1/scenarios/project-slug-conflict.json +1 -1
  35. package/fixtures/core-v1/scenarios/provider-outcome-unknown.json +1 -1
  36. package/fixtures/core-v1/scenarios/subscription-activation-replay.json +1 -1
  37. package/fixtures/core-v1/scenarios/subscription-authorization-capability-opacity.json +1 -1
  38. package/fixtures/core-v1/scenarios/subscription-cross-connection-callback-rejected.json +1 -1
  39. package/fixtures/core-v1/scenarios/subscription-expired-replay.json +1 -1
  40. package/fixtures/core-v1/scenarios/subscription-selected-connection-replay.json +1 -1
  41. package/fixtures/interaction-machine-v1/scenarios/ack-conflict.json +1 -1
  42. package/fixtures/interaction-machine-v1/scenarios/ack-cross-machine.json +1 -1
  43. package/fixtures/interaction-machine-v1/scenarios/ack-out-of-order.json +1 -1
  44. package/fixtures/interaction-machine-v1/scenarios/ack-replay.json +1 -1
  45. package/fixtures/interaction-machine-v1/scenarios/ambiguous-free-text.json +1 -1
  46. package/fixtures/interaction-machine-v1/scenarios/callback-token-opacity.json +1 -1
  47. package/fixtures/interaction-machine-v1/scenarios/credential-registration-conflict.json +1 -1
  48. package/fixtures/interaction-machine-v1/scenarios/credential-registration-replay.json +1 -1
  49. package/fixtures/interaction-machine-v1/scenarios/credential-revocation-replay.json +1 -1
  50. package/fixtures/interaction-machine-v1/scenarios/credential-rotation.json +1 -1
  51. package/fixtures/interaction-machine-v1/scenarios/first-credential-activates.json +1 -1
  52. package/fixtures/interaction-machine-v1/scenarios/interaction-duplicate.json +1 -1
  53. package/fixtures/interaction-machine-v1/scenarios/interaction-expired.json +1 -1
  54. package/fixtures/interaction-machine-v1/scenarios/interaction-mismatch.json +1 -1
  55. package/fixtures/interaction-machine-v1/scenarios/interaction-retired.json +1 -1
  56. package/fixtures/interaction-machine-v1/scenarios/interaction-stale.json +1 -1
  57. package/fixtures/interaction-machine-v1/scenarios/machine-admin-denied.json +1 -1
  58. package/fixtures/interaction-machine-v1/scenarios/machine-bound-message-create.json +1 -1
  59. package/fixtures/interaction-machine-v1/scenarios/machine-cancel-denied.json +1 -1
  60. package/fixtures/interaction-machine-v1/scenarios/machine-crash-before-ack.json +1 -1
  61. package/fixtures/interaction-machine-v1/scenarios/machine-notifier-mismatch.json +1 -1
  62. package/fixtures/interaction-machine-v1/scenarios/machine-other-message-read.json +1 -1
  63. package/fixtures/interaction-machine-v1/scenarios/machine-owned-message-read.json +1 -1
  64. package/fixtures/interaction-machine-v1/scenarios/machine-subscriber-mismatch.json +1 -1
  65. package/fixtures/interaction-machine-v1/scenarios/poll-uncommitted-cursor-rejected.json +1 -1
  66. package/fixtures/interaction-machine-v1/scenarios/project-credential-machine-endpoint-denied.json +1 -1
  67. package/fixtures/interaction-machine-v1/scenarios/quarantine-integrity-rejected.json +1 -1
  68. package/fixtures/interaction-machine-v1/scenarios/quarantine-signature-rejected.json +1 -1
  69. package/fixtures/interaction-machine-v1/scenarios/quarantine-valid.json +1 -1
  70. package/fixtures/interaction-machine-v1/scenarios/revoked-machine-credential.json +1 -1
  71. package/fixtures/recipient-experience-v1/scenarios/membership-broadcast-snapshot.json +1 -1
  72. package/fixtures/recipient-experience-v1/scenarios/preferred-binding-resolution.json +1 -1
  73. package/fixtures/recipient-experience-v1/scenarios/recipient-session-security.json +1 -1
  74. package/fixtures/recipient-experience-v1/scenarios/subscriber-initial-groups-transaction.json +1 -1
  75. package/openapi/generated/whooshbang-v1.bundle.json +128 -20
  76. package/openapi/whooshbang-v1.yaml +4 -2
  77. package/package.json +1 -1
  78. package/schemas/core-scenario.schema.json +1 -1
  79. package/schemas/events/agent-binding-degraded-v1.schema.json +1 -1
  80. package/schemas/events/interaction-expired-v1.schema.json +1 -1
  81. package/schemas/events/interaction-received-v1.schema.json +1 -1
  82. package/schemas/events/message-delivered-v1.schema.json +1 -1
  83. package/schemas/events/message-expired-v1.schema.json +1 -1
  84. package/schemas/events/message-failed-v1.schema.json +1 -1
  85. package/schemas/events/message-provider-accepted-v1.schema.json +1 -1
  86. package/schemas/events/subscription-activated-v1.schema.json +1 -1
  87. package/schemas/events/subscription-revoked-v1.schema.json +1 -1
  88. package/schemas/events/whooshbang-event-v1.schema.json +1 -1
  89. package/schemas/fixture-index.schema.json +1 -1
  90. package/schemas/interaction-machine-scenario.schema.json +1 -1
  91. package/schemas/interaction-v1.schema.json +151 -19
  92. package/schemas/machine-v1.schema.json +1 -1
  93. package/schemas/provider-capabilities-v1.schema.json +1 -1
  94. package/schemas/webhooks/webhook-delivery-case-v1.schema.json +1 -1
  95. package/schemas/webhooks/webhook-signing-vector-v1.schema.json +1 -1
  96. package/schemas/whooshbang-v1.schema.json +52 -48
@@ -5,115 +5,115 @@
5
5
  export const contractManifest = {
6
6
  schema: "flowxo.contract-manifest.v1",
7
7
  artifact: "@whooshbang/contracts",
8
- version: "2.2.0",
8
+ version: "2.3.0",
9
9
  openapi: [
10
10
  {
11
11
  id: "whooshbang-rest-v1",
12
- version: "2.2.0",
12
+ version: "2.3.0",
13
13
  path: "openapi/whooshbang-v1.yaml",
14
14
  },
15
15
  ],
16
16
  schemas: [
17
17
  {
18
18
  id: "whooshbang-v1",
19
- version: "2.2.0",
19
+ version: "2.3.0",
20
20
  path: "schemas/whooshbang-v1.schema.json",
21
21
  },
22
22
  {
23
23
  id: "interaction-v1",
24
- version: "2.2.0",
24
+ version: "2.3.0",
25
25
  path: "schemas/interaction-v1.schema.json",
26
26
  },
27
27
  {
28
28
  id: "machine-v1",
29
- version: "2.2.0",
29
+ version: "2.3.0",
30
30
  path: "schemas/machine-v1.schema.json",
31
31
  },
32
32
  {
33
33
  id: "provider-capabilities-v1",
34
- version: "2.2.0",
34
+ version: "2.3.0",
35
35
  path: "schemas/provider-capabilities-v1.schema.json",
36
36
  },
37
37
  {
38
38
  id: "whooshbang-event-v1",
39
- version: "2.2.0",
39
+ version: "2.3.0",
40
40
  path: "schemas/events/whooshbang-event-v1.schema.json",
41
41
  },
42
42
  {
43
43
  id: "subscription-activated-event-v1",
44
- version: "2.2.0",
44
+ version: "2.3.0",
45
45
  path: "schemas/events/subscription-activated-v1.schema.json",
46
46
  },
47
47
  {
48
48
  id: "subscription-revoked-event-v1",
49
- version: "2.2.0",
49
+ version: "2.3.0",
50
50
  path: "schemas/events/subscription-revoked-v1.schema.json",
51
51
  },
52
52
  {
53
53
  id: "message-provider-accepted-event-v1",
54
- version: "2.2.0",
54
+ version: "2.3.0",
55
55
  path: "schemas/events/message-provider-accepted-v1.schema.json",
56
56
  },
57
57
  {
58
58
  id: "message-delivered-event-v1",
59
- version: "2.2.0",
59
+ version: "2.3.0",
60
60
  path: "schemas/events/message-delivered-v1.schema.json",
61
61
  },
62
62
  {
63
63
  id: "message-failed-event-v1",
64
- version: "2.2.0",
64
+ version: "2.3.0",
65
65
  path: "schemas/events/message-failed-v1.schema.json",
66
66
  },
67
67
  {
68
68
  id: "message-expired-event-v1",
69
- version: "2.2.0",
69
+ version: "2.3.0",
70
70
  path: "schemas/events/message-expired-v1.schema.json",
71
71
  },
72
72
  {
73
73
  id: "interaction-received-event-v1",
74
- version: "2.2.0",
74
+ version: "2.3.0",
75
75
  path: "schemas/events/interaction-received-v1.schema.json",
76
76
  },
77
77
  {
78
78
  id: "interaction-expired-event-v1",
79
- version: "2.2.0",
79
+ version: "2.3.0",
80
80
  path: "schemas/events/interaction-expired-v1.schema.json",
81
81
  },
82
82
  {
83
83
  id: "agent-binding-degraded-event-v1",
84
- version: "2.2.0",
84
+ version: "2.3.0",
85
85
  path: "schemas/events/agent-binding-degraded-v1.schema.json",
86
86
  },
87
87
  {
88
88
  id: "webhook-signing-vector-v1",
89
- version: "2.2.0",
89
+ version: "2.3.0",
90
90
  path: "schemas/webhooks/webhook-signing-vector-v1.schema.json",
91
91
  },
92
92
  {
93
93
  id: "webhook-delivery-case-v1",
94
- version: "2.2.0",
94
+ version: "2.3.0",
95
95
  path: "schemas/webhooks/webhook-delivery-case-v1.schema.json",
96
96
  },
97
97
  {
98
98
  id: "interaction-machine-scenario",
99
- version: "2.2.0",
99
+ version: "2.3.0",
100
100
  path: "schemas/interaction-machine-scenario.schema.json",
101
101
  },
102
102
  {
103
103
  id: "core-contract-scenario",
104
- version: "2.2.0",
104
+ version: "2.3.0",
105
105
  path: "schemas/core-scenario.schema.json",
106
106
  },
107
107
  {
108
108
  id: "core-fixture-index",
109
- version: "2.2.0",
109
+ version: "2.3.0",
110
110
  path: "schemas/fixture-index.schema.json",
111
111
  },
112
112
  ],
113
113
  fixture_sets: [
114
114
  {
115
115
  id: "core-api-bodies",
116
- version: "2.2.0",
116
+ version: "2.3.0",
117
117
  schema: "schemas/whooshbang-v1.schema.json",
118
118
  fixtures: [
119
119
  "fixtures/core-v1/requests/create-project.json",
@@ -306,7 +306,7 @@ export const contractManifest = {
306
306
  },
307
307
  {
308
308
  id: "core-semantic-scenarios",
309
- version: "2.2.0",
309
+ version: "2.3.0",
310
310
  schema: "schemas/core-scenario.schema.json",
311
311
  fixtures: [
312
312
  "fixtures/core-v1/scenarios/project-create-equivalent-replay.json",
@@ -338,7 +338,7 @@ export const contractManifest = {
338
338
  },
339
339
  {
340
340
  id: "interaction-message-api-bodies",
341
- version: "2.2.0",
341
+ version: "2.3.0",
342
342
  schema: "schemas/whooshbang-v1.schema.json",
343
343
  fixtures: [
344
344
  "fixtures/interaction-machine-v1/requests/create-message-confirm.json",
@@ -350,7 +350,7 @@ export const contractManifest = {
350
350
  },
351
351
  {
352
352
  id: "interaction-contract-bodies",
353
- version: "2.2.0",
353
+ version: "2.3.0",
354
354
  schema: "schemas/interaction-v1.schema.json",
355
355
  fixtures: [
356
356
  "fixtures/interaction-machine-v1/success/interaction-open.json",
@@ -367,7 +367,7 @@ export const contractManifest = {
367
367
  },
368
368
  {
369
369
  id: "machine-api-bodies",
370
- version: "2.2.0",
370
+ version: "2.3.0",
371
371
  schema: "schemas/machine-v1.schema.json",
372
372
  fixtures: [
373
373
  "fixtures/interaction-machine-v1/requests/create-machine-client.json",
@@ -388,13 +388,13 @@ export const contractManifest = {
388
388
  },
389
389
  {
390
390
  id: "provider-capability-bodies",
391
- version: "2.2.0",
391
+ version: "2.3.0",
392
392
  schema: "schemas/provider-capabilities-v1.schema.json",
393
393
  fixtures: ["fixtures/interaction-machine-v1/capabilities/telegram.json"],
394
394
  },
395
395
  {
396
396
  id: "interaction-machine-semantic-scenarios",
397
- version: "2.2.0",
397
+ version: "2.3.0",
398
398
  schema: "schemas/interaction-machine-scenario.schema.json",
399
399
  fixtures: [
400
400
  "fixtures/interaction-machine-v1/scenarios/interaction-duplicate.json",
@@ -431,7 +431,7 @@ export const contractManifest = {
431
431
  },
432
432
  {
433
433
  id: "customer-event-bodies",
434
- version: "2.2.0",
434
+ version: "2.3.0",
435
435
  schema: "schemas/events/whooshbang-event-v1.schema.json",
436
436
  fixtures: [
437
437
  "fixtures/whooshbang-events-v1/events/subscription-activated.json",
@@ -449,19 +449,19 @@ export const contractManifest = {
449
449
  },
450
450
  {
451
451
  id: "webhook-signing-vectors",
452
- version: "2.2.0",
452
+ version: "2.3.0",
453
453
  schema: "schemas/webhooks/webhook-signing-vector-v1.schema.json",
454
454
  fixtures: ["fixtures/whooshbang-events-v1/signing/vectors.json"],
455
455
  },
456
456
  {
457
457
  id: "webhook-delivery-cases",
458
- version: "2.2.0",
458
+ version: "2.3.0",
459
459
  schema: "schemas/webhooks/webhook-delivery-case-v1.schema.json",
460
460
  fixtures: ["fixtures/whooshbang-events-v1/delivery/cases.json"],
461
461
  },
462
462
  {
463
463
  id: "core-fixture-index",
464
- version: "2.2.0",
464
+ version: "2.3.0",
465
465
  schema: "schemas/fixture-index.schema.json",
466
466
  fixtures: ["fixtures/core-v1/fixture-index.json"],
467
467
  },
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Provider-neutral confirm, single-select, input, lifecycle, callback-token, and authenticated answer-event contracts.
7
7
  */
8
- export type InteractionV1ContractDocument = InteractionRequest | InteractionSummary | InteractionEvent | ProviderCallbackToken;
8
+ export type InteractionV1ContractDocument = InteractionRequest | InteractionSummary | InteractionEvent | ProviderCallbackToken | InteractionSendRequest;
9
9
  /**
10
10
  * A required-type tagged union. C0 supports confirm, single-select, and input only.
11
11
  */
@@ -73,13 +73,17 @@ export type TrimmedInputAnswer = string;
73
73
  * An opaque single-purpose reference containing exactly 128 random bits and no trusted identity, answer, command, or business data.
74
74
  */
75
75
  export type ProviderCallbackToken = string;
76
+ /**
77
+ * Send-time interaction. Choose expires_in_seconds or expires_at; omit both for 24 hours from server acceptance. Idempotent replays retain the original resolved deadline.
78
+ */
79
+ export type InteractionSendRequest = ConfirmInteractionSendRequest | SelectInteractionSendRequest | InputInteractionSendRequest;
76
80
  export interface ConfirmInteractionRequest {
77
81
  type: "confirm";
78
82
  prompt: InteractionPrompt;
79
83
  confirm_label?: string;
80
84
  deny_label?: string;
81
85
  /**
82
- * Must be 30 seconds through 24 hours after server acceptance.
86
+ * At least 30 seconds after server acceptance; no fixed maximum. A resolved RFC3339 deadline with millisecond precision, no later than 9999-12-31T23:59:59.999Z.
83
87
  */
84
88
  expires_at: string;
85
89
  correlation_id?: InteractionCorrelationId;
@@ -111,7 +115,7 @@ export interface SelectInteractionRequest {
111
115
  InteractionOption
112
116
  ];
113
117
  /**
114
- * Must be 30 seconds through 24 hours after server acceptance.
118
+ * At least 30 seconds after server acceptance; no fixed maximum. A resolved RFC3339 deadline with millisecond precision, no later than 9999-12-31T23:59:59.999Z.
115
119
  */
116
120
  expires_at: string;
117
121
  correlation_id?: InteractionCorrelationId;
@@ -131,7 +135,7 @@ export interface InputInteractionRequest {
131
135
  type: "input";
132
136
  prompt: InteractionPrompt;
133
137
  /**
134
- * Must be 30 seconds through 24 hours after server acceptance.
138
+ * At least 30 seconds after server acceptance; no fixed maximum. A resolved RFC3339 deadline with millisecond precision, no later than 9999-12-31T23:59:59.999Z.
135
139
  */
136
140
  expires_at: string;
137
141
  correlation_id?: InteractionCorrelationId;
@@ -157,3 +161,67 @@ export interface SafeChannelContext {
157
161
  conversation_kind: "private_chat" | "thread" | "group";
158
162
  display_name?: string;
159
163
  }
164
+ export interface ConfirmInteractionSendRequest {
165
+ type: "confirm";
166
+ prompt: InteractionPrompt;
167
+ confirm_label?: string;
168
+ deny_label?: string;
169
+ /**
170
+ * Absolute RFC3339 deadline with an explicit timezone and at most millisecond precision. At least 30 seconds after server acceptance. Mutually exclusive with expires_in_seconds.
171
+ */
172
+ expires_at?: string;
173
+ correlation_id?: InteractionCorrelationId;
174
+ /**
175
+ * Whole seconds from server acceptance. No fixed maximum; the resolved timestamp must be representable through year 9999. Mutually exclusive with expires_at. Omit both for 86400 seconds (24 hours).
176
+ */
177
+ expires_in_seconds?: number;
178
+ }
179
+ export interface SelectInteractionSendRequest {
180
+ type: "select";
181
+ prompt: InteractionPrompt;
182
+ /**
183
+ * @minItems 2
184
+ * @maxItems 6
185
+ */
186
+ options: [InteractionOption, InteractionOption] | [InteractionOption, InteractionOption, InteractionOption] | [
187
+ InteractionOption,
188
+ InteractionOption,
189
+ InteractionOption,
190
+ InteractionOption
191
+ ] | [
192
+ InteractionOption,
193
+ InteractionOption,
194
+ InteractionOption,
195
+ InteractionOption,
196
+ InteractionOption
197
+ ] | [
198
+ InteractionOption,
199
+ InteractionOption,
200
+ InteractionOption,
201
+ InteractionOption,
202
+ InteractionOption,
203
+ InteractionOption
204
+ ];
205
+ /**
206
+ * Absolute RFC3339 deadline with an explicit timezone and at most millisecond precision. At least 30 seconds after server acceptance. Mutually exclusive with expires_in_seconds.
207
+ */
208
+ expires_at?: string;
209
+ correlation_id?: InteractionCorrelationId;
210
+ /**
211
+ * Whole seconds from server acceptance. No fixed maximum; the resolved timestamp must be representable through year 9999. Mutually exclusive with expires_at. Omit both for 86400 seconds (24 hours).
212
+ */
213
+ expires_in_seconds?: number;
214
+ }
215
+ export interface InputInteractionSendRequest {
216
+ type: "input";
217
+ prompt: InteractionPrompt;
218
+ /**
219
+ * Absolute RFC3339 deadline with an explicit timezone and at most millisecond precision. At least 30 seconds after server acceptance. Mutually exclusive with expires_in_seconds.
220
+ */
221
+ expires_at?: string;
222
+ correlation_id?: InteractionCorrelationId;
223
+ /**
224
+ * Whole seconds from server acceptance. No fixed maximum; the resolved timestamp must be representable through year 9999. Mutually exclusive with expires_at. Omit both for 86400 seconds (24 hours).
225
+ */
226
+ expires_in_seconds?: number;
227
+ }