@substrat-run/contracts 0.214.0 → 0.216.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 (59) hide show
  1. package/dist/broker-dead-letters.d.ts +114 -0
  2. package/dist/broker-dead-letters.d.ts.map +1 -0
  3. package/dist/broker-dead-letters.js +110 -0
  4. package/dist/broker-dead-letters.js.map +1 -0
  5. package/dist/broker-relay.d.ts +127 -0
  6. package/dist/broker-relay.d.ts.map +1 -0
  7. package/dist/broker-relay.js +100 -0
  8. package/dist/broker-relay.js.map +1 -0
  9. package/dist/control-plane.d.ts +68 -0
  10. package/dist/control-plane.d.ts.map +1 -1
  11. package/dist/control-plane.js +93 -1
  12. package/dist/control-plane.js.map +1 -1
  13. package/dist/deploy.d.ts +12 -3
  14. package/dist/deploy.d.ts.map +1 -1
  15. package/dist/deploy.js +22 -5
  16. package/dist/deploy.js.map +1 -1
  17. package/dist/index.d.ts +3 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +3 -0
  20. package/dist/index.js.map +1 -1
  21. package/dist/introspection.d.ts.map +1 -1
  22. package/dist/introspection.js +3 -2
  23. package/dist/introspection.js.map +1 -1
  24. package/dist/lake.d.ts +22 -5
  25. package/dist/lake.d.ts.map +1 -1
  26. package/dist/lake.js +18 -5
  27. package/dist/lake.js.map +1 -1
  28. package/dist/manifest.d.ts +72 -0
  29. package/dist/manifest.d.ts.map +1 -1
  30. package/dist/manifest.js +71 -0
  31. package/dist/manifest.js.map +1 -1
  32. package/dist/model-usage.d.ts +36 -1
  33. package/dist/model-usage.d.ts.map +1 -1
  34. package/dist/model-usage.js +40 -5
  35. package/dist/model-usage.js.map +1 -1
  36. package/dist/model.d.ts +2 -0
  37. package/dist/model.d.ts.map +1 -1
  38. package/dist/model.js.map +1 -1
  39. package/dist/platform-usage.d.ts +2 -1
  40. package/dist/platform-usage.d.ts.map +1 -1
  41. package/dist/platform-usage.js +9 -1
  42. package/dist/platform-usage.js.map +1 -1
  43. package/dist/registry.d.ts +42 -0
  44. package/dist/registry.d.ts.map +1 -1
  45. package/dist/registry.js +48 -0
  46. package/dist/registry.js.map +1 -1
  47. package/dist/runtime-tables.d.ts +12 -0
  48. package/dist/runtime-tables.d.ts.map +1 -0
  49. package/dist/runtime-tables.js +15 -0
  50. package/dist/runtime-tables.js.map +1 -0
  51. package/dist/source-build.d.ts +16 -0
  52. package/dist/source-build.d.ts.map +1 -1
  53. package/dist/source-build.js +10 -0
  54. package/dist/source-build.js.map +1 -1
  55. package/dist/wire-signing.d.ts +1 -1
  56. package/dist/wire-signing.d.ts.map +1 -1
  57. package/dist/wire-signing.js +22 -9
  58. package/dist/wire-signing.js.map +1 -1
  59. package/package.json +1 -1
@@ -0,0 +1,114 @@
1
+ import { z } from 'zod';
2
+ /** The door on an app's deployment that reads its broker's dead letters (POST, the body below). */
3
+ export declare const BROKER_DEAD_LETTERS_PATH = "/internal/broker/dead-letters";
4
+ /** The doors that resend a dead letter (it is due again, its attempts reset) and discard one. */
5
+ export declare const BROKER_DEAD_LETTER_RESEND_PATH = "/internal/broker/dead-letters/resend";
6
+ export declare const BROKER_DEAD_LETTER_DISCARD_PATH = "/internal/broker/dead-letters/discard";
7
+ /** How many dead letters one read returns at most; the broker reads oldest first. */
8
+ export declare const BROKER_DEAD_LETTERS_MAX = 200;
9
+ /** One dead letter: a message the broker gave up on for one receiver. */
10
+ export declare const brokerDeadLetter: z.ZodObject<{
11
+ messageId: z.ZodString;
12
+ receiver: z.ZodString;
13
+ kind: z.ZodEnum<{
14
+ event: "event";
15
+ intent: "intent";
16
+ }>;
17
+ type: z.ZodString;
18
+ scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
19
+ committedAt: z.ZodString;
20
+ key: z.ZodNullable<z.ZodString>;
21
+ attempts: z.ZodNumber;
22
+ lastStatus: z.ZodNullable<z.ZodNumber>;
23
+ deadAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
24
+ expiresAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
25
+ resends: z.ZodNumber;
26
+ traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
+ invocationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
28
+ lastError: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29
+ body: z.ZodOptional<z.ZodString>;
30
+ }, z.core.$strict>;
31
+ export type BrokerDeadLetter = z.infer<typeof brokerDeadLetter>;
32
+ /** What the dead-letter door is asked. `content` is the control plane's decision, never the caller's. */
33
+ export declare const brokerDeadLettersRequest: z.ZodObject<{
34
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
35
+ receiver: z.ZodOptional<z.ZodString>;
36
+ limit: z.ZodOptional<z.ZodNumber>;
37
+ content: z.ZodBoolean;
38
+ }, z.core.$strict>;
39
+ export type BrokerDeadLettersRequest = z.infer<typeof brokerDeadLettersRequest>;
40
+ /** The read's answer: the entries, and whether they carry content. */
41
+ export declare const brokerDeadLettersPage: z.ZodObject<{
42
+ entries: z.ZodArray<z.ZodObject<{
43
+ messageId: z.ZodString;
44
+ receiver: z.ZodString;
45
+ kind: z.ZodEnum<{
46
+ event: "event";
47
+ intent: "intent";
48
+ }>;
49
+ type: z.ZodString;
50
+ scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
51
+ committedAt: z.ZodString;
52
+ key: z.ZodNullable<z.ZodString>;
53
+ attempts: z.ZodNumber;
54
+ lastStatus: z.ZodNullable<z.ZodNumber>;
55
+ deadAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
56
+ expiresAt: z.core.$ZodBranded<z.ZodString, "Instant", "out">;
57
+ resends: z.ZodNumber;
58
+ traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
59
+ invocationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
+ lastError: z.ZodOptional<z.ZodNullable<z.ZodString>>;
61
+ body: z.ZodOptional<z.ZodString>;
62
+ }, z.core.$strict>>;
63
+ content: z.ZodBoolean;
64
+ }, z.core.$strip>;
65
+ export type BrokerDeadLettersPage = z.infer<typeof brokerDeadLettersPage>;
66
+ /** The query a person's read carries: which receiver, and how many. */
67
+ export declare const brokerDeadLettersQuery: z.ZodObject<{
68
+ receiver: z.ZodOptional<z.ZodString>;
69
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
70
+ }, z.core.$strict>;
71
+ export type BrokerDeadLettersQuery = z.infer<typeof brokerDeadLettersQuery>;
72
+ /** One dead letter named for a resend or a discard. No receiver: every receiver it is dead at. */
73
+ export declare const brokerDeadLetterTarget: z.ZodObject<{
74
+ messageId: z.ZodString;
75
+ receiver: z.ZodOptional<z.ZodString>;
76
+ }, z.core.$strict>;
77
+ export type BrokerDeadLetterTarget = z.infer<typeof brokerDeadLetterTarget>;
78
+ /** What the door is asked to resend or discard. */
79
+ export declare const brokerDeadLetterActionRequest: z.ZodObject<{
80
+ messageId: z.ZodString;
81
+ receiver: z.ZodOptional<z.ZodString>;
82
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
83
+ }, z.core.$strict>;
84
+ export type BrokerDeadLetterActionRequest = z.infer<typeof brokerDeadLetterActionRequest>;
85
+ /** How many deliveries moved: 0 when none was dead (already resent, discarded or expired). */
86
+ export declare const brokerDeadLetterActionAnswer: z.ZodObject<{
87
+ moved: z.ZodNumber;
88
+ }, z.core.$strip>;
89
+ export type BrokerDeadLetterActionAnswer = z.infer<typeof brokerDeadLetterActionAnswer>;
90
+ /**
91
+ * One resend or discard, as the admin log keeps it: the app instance it was asked through, the
92
+ * message and receiver named, and how many deliveries moved. No content: the row is the platform's.
93
+ */
94
+ export declare const brokerDeadLetterAudit: z.ZodObject<{
95
+ action: z.ZodEnum<{
96
+ discard: "discard";
97
+ resend: "resend";
98
+ }>;
99
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
100
+ scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
101
+ messageId: z.ZodString;
102
+ receiver: z.ZodOptional<z.ZodString>;
103
+ moved: z.ZodNumber;
104
+ }, z.core.$strict>;
105
+ export type BrokerDeadLetterAudit = z.infer<typeof brokerDeadLetterAudit>;
106
+ /** A dead letter with its content removed: what a staff read is given. */
107
+ export declare function withoutContent(entry: BrokerDeadLetter): BrokerDeadLetter;
108
+ /**
109
+ * The page a reader is given, whatever the deployment answered: with content only when `content`
110
+ * is true, and stripped of it otherwise, so a deployment that ignored the flag still shows staff
111
+ * nothing of a message. Parsed, so a field the schema does not name never rides through.
112
+ */
113
+ export declare function deadLetterView(answer: unknown, content: boolean): BrokerDeadLettersPage;
114
+ //# sourceMappingURL=broker-dead-letters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"broker-dead-letters.d.ts","sourceRoot":"","sources":["../src/broker-dead-letters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,mGAAmG;AACnG,eAAO,MAAM,wBAAwB,kCAAkC,CAAC;AACxE,iGAAiG;AACjG,eAAO,MAAM,8BAA8B,yCAAyC,CAAC;AACrF,eAAO,MAAM,+BAA+B,0CAA0C,CAAC;AAEvF,qFAAqF;AACrF,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAM3C,yEAAyE;AACzE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;kBA2BlB,CAAC;AACZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,yGAAyG;AACzG,eAAO,MAAM,wBAAwB;;;;;kBAO1B,CAAC;AACZ,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEhF,sEAAsE;AACtE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;iBAIhC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E,uEAAuE;AACvE,eAAO,MAAM,sBAAsB;;;kBAKxB,CAAC;AACZ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE5E,kGAAkG;AAClG,eAAO,MAAM,sBAAsB;;;kBAAkE,CAAC;AACtG,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE5E,mDAAmD;AACnD,eAAO,MAAM,6BAA6B;;;;kBAAuD,CAAC;AAClG,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAE1F,8FAA8F;AAC9F,eAAO,MAAM,4BAA4B;;iBAAsD,CAAC;AAChG,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAExF;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;kBASvB,CAAC;AACZ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,KAAK,EAAE,gBAAgB,GAAG,gBAAgB,CAGxE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,qBAAqB,CAGvF"}
@@ -0,0 +1,110 @@
1
+ import { z } from 'zod';
2
+ import { instant, scopeId, tenantId } from './ids.js';
3
+ // The delivery broker's dead letter, as people see it (K-74, rfc/broker-and-tenant-isolation.md
4
+ // §4.6 and §9.1, #3474). A broker runs per (tenant, app) in the app's own deployment, and keeps a
5
+ // message it gave up on for one receiver for 14 days, to be resent or discarded.
6
+ //
7
+ // **Who sees what is decided here, once.** The tenant's admin sees their own tenant's dead letters
8
+ // WITH content: the message's row as the scope committed it, and the receiver's error text about it
9
+ // (which may echo what it was handed). The platform's operators see the same entries WITHOUT either:
10
+ // ids, the declared type, counts, times and the receiver's status code. The control plane is what
11
+ // applies the rule (`deadLetterView`), on the answer it relays, whatever the deployment sent; the
12
+ // deployment's door is also asked without content for a staff read, so content never leaves the
13
+ // app's script for one. A subject's erasure reaches a dead letter's content in the broker itself
14
+ // (#3484), so an erased subject's content is never shown to anyone.
15
+ /** The door on an app's deployment that reads its broker's dead letters (POST, the body below). */
16
+ export const BROKER_DEAD_LETTERS_PATH = '/internal/broker/dead-letters';
17
+ /** The doors that resend a dead letter (it is due again, its attempts reset) and discard one. */
18
+ export const BROKER_DEAD_LETTER_RESEND_PATH = '/internal/broker/dead-letters/resend';
19
+ export const BROKER_DEAD_LETTER_DISCARD_PATH = '/internal/broker/dead-letters/discard';
20
+ /** How many dead letters one read returns at most; the broker reads oldest first. */
21
+ export const BROKER_DEAD_LETTERS_MAX = 200;
22
+ const messageId = z.string().min(1).max(64);
23
+ /** A receiver is a subscription's name, unique per broker (`'default'`, the relay's, the lake's). */
24
+ const receiver = z.string().min(1).max(200);
25
+ /** One dead letter: a message the broker gave up on for one receiver. */
26
+ export const brokerDeadLetter = z
27
+ .object({
28
+ messageId,
29
+ receiver,
30
+ /** `event`: an outbox row the scope emitted. `intent`: a platform intent it raised. */
31
+ kind: z.enum(['event', 'intent']),
32
+ /** The event's declared type, or the intent's kind. */
33
+ type: z.string().min(1),
34
+ scopeId,
35
+ committedAt: z.string().min(1),
36
+ /** The sender's ordering key: while this one is dead, later messages with the key wait behind it. */
37
+ key: z.string().nullable(),
38
+ attempts: z.number().int().nonnegative(),
39
+ /** The receiver's HTTP status on the last failure, when it gave one. */
40
+ lastStatus: z.number().int().nullable(),
41
+ deadAt: instant,
42
+ /** When the broker drops it unless it is resent first. */
43
+ expiresAt: instant,
44
+ resends: z.number().int().nonnegative(),
45
+ /** The W3C trace id the message was committed under, and the invocation that wrote it, where known. Ids, not content. */
46
+ traceId: z.string().nullable().optional(),
47
+ invocationId: z.string().nullable().optional(),
48
+ /** Content: the receiver's error text about the last attempt. The tenant's view only. */
49
+ lastError: z.string().nullable().optional(),
50
+ /** Content: the message's row, as JSON text. The tenant's view only. */
51
+ body: z.string().optional(),
52
+ })
53
+ .strict();
54
+ /** What the dead-letter door is asked. `content` is the control plane's decision, never the caller's. */
55
+ export const brokerDeadLettersRequest = z
56
+ .object({
57
+ tenantId,
58
+ receiver: receiver.optional(),
59
+ limit: z.number().int().min(1).max(BROKER_DEAD_LETTERS_MAX).optional(),
60
+ content: z.boolean(),
61
+ })
62
+ .strict();
63
+ /** The read's answer: the entries, and whether they carry content. */
64
+ export const brokerDeadLettersPage = z.object({
65
+ entries: z.array(brokerDeadLetter),
66
+ /** True only on the tenant's own read. A staff read is always false. */
67
+ content: z.boolean(),
68
+ });
69
+ /** The query a person's read carries: which receiver, and how many. */
70
+ export const brokerDeadLettersQuery = z
71
+ .object({
72
+ receiver: receiver.optional(),
73
+ limit: z.coerce.number().int().min(1).max(BROKER_DEAD_LETTERS_MAX).optional(),
74
+ })
75
+ .strict();
76
+ /** One dead letter named for a resend or a discard. No receiver: every receiver it is dead at. */
77
+ export const brokerDeadLetterTarget = z.object({ messageId, receiver: receiver.optional() }).strict();
78
+ /** What the door is asked to resend or discard. */
79
+ export const brokerDeadLetterActionRequest = brokerDeadLetterTarget.extend({ tenantId }).strict();
80
+ /** How many deliveries moved: 0 when none was dead (already resent, discarded or expired). */
81
+ export const brokerDeadLetterActionAnswer = z.object({ moved: z.number().int().nonnegative() });
82
+ /**
83
+ * One resend or discard, as the admin log keeps it: the app instance it was asked through, the
84
+ * message and receiver named, and how many deliveries moved. No content: the row is the platform's.
85
+ */
86
+ export const brokerDeadLetterAudit = z
87
+ .object({
88
+ action: z.enum(['resend', 'discard']),
89
+ tenantId,
90
+ scopeId,
91
+ messageId,
92
+ receiver: receiver.optional(),
93
+ moved: z.number().int().nonnegative(),
94
+ })
95
+ .strict();
96
+ /** A dead letter with its content removed: what a staff read is given. */
97
+ export function withoutContent(entry) {
98
+ const { body: _body, lastError: _lastError, ...metadata } = entry;
99
+ return metadata;
100
+ }
101
+ /**
102
+ * The page a reader is given, whatever the deployment answered: with content only when `content`
103
+ * is true, and stripped of it otherwise, so a deployment that ignored the flag still shows staff
104
+ * nothing of a message. Parsed, so a field the schema does not name never rides through.
105
+ */
106
+ export function deadLetterView(answer, content) {
107
+ const entries = z.object({ entries: z.array(brokerDeadLetter) }).parse(answer).entries;
108
+ return { entries: content ? entries : entries.map(withoutContent), content };
109
+ }
110
+ //# sourceMappingURL=broker-dead-letters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"broker-dead-letters.js","sourceRoot":"","sources":["../src/broker-dead-letters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEtD,gGAAgG;AAChG,kGAAkG;AAClG,iFAAiF;AACjF,EAAE;AACF,mGAAmG;AACnG,oGAAoG;AACpG,qGAAqG;AACrG,kGAAkG;AAClG,kGAAkG;AAClG,gGAAgG;AAChG,iGAAiG;AACjG,oEAAoE;AAEpE,mGAAmG;AACnG,MAAM,CAAC,MAAM,wBAAwB,GAAG,+BAA+B,CAAC;AACxE,iGAAiG;AACjG,MAAM,CAAC,MAAM,8BAA8B,GAAG,sCAAsC,CAAC;AACrF,MAAM,CAAC,MAAM,+BAA+B,GAAG,uCAAuC,CAAC;AAEvF,qFAAqF;AACrF,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAE3C,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC5C,qGAAqG;AACrG,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CA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,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AAGhG;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC;KACnC,MAAM,CAAC;IACN,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IACrC,QAAQ;IACR,OAAO;IACP,SAAS;IACT,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAAE;IAC7B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CACtC,CAAC;KACD,MAAM,EAAE,CAAC;AAGZ,0EAA0E;AAC1E,MAAM,UAAU,cAAc,CAAC,KAAuB;IACpD,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK,CAAC;IAClE,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,MAAe,EAAE,OAAgB;IAC9D,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;IACvF,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,CAAC;AAC/E,CAAC"}
@@ -0,0 +1,127 @@
1
+ import { z } from 'zod';
2
+ /** The path the router delivers a relayed message to, on the receiving app's deployment. */
3
+ export declare const BROKER_RELAY_PATH = "/internal/broker-relay";
4
+ export declare const relayKind: z.ZodEnum<{
5
+ event: "event";
6
+ reply: "reply";
7
+ request: "request";
8
+ }>;
9
+ export type RelayKind = z.infer<typeof relayKind>;
10
+ /**
11
+ * One message as the sending broker hands it to the router for ONE receiving app. Strict, so no
12
+ * field naming the caller can ride along: who sent it is the router's to write ({@link relayEnvelope}).
13
+ */
14
+ export declare const relayMessage: z.ZodObject<{
15
+ id: z.ZodString;
16
+ kind: z.ZodEnum<{
17
+ event: "event";
18
+ reply: "reply";
19
+ request: "request";
20
+ }>;
21
+ scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
22
+ type: z.ZodString;
23
+ body: z.ZodUnknown;
24
+ committedAt: z.ZodString;
25
+ requestId: z.ZodOptional<z.ZodString>;
26
+ deadline: z.ZodOptional<z.ZodNumber>;
27
+ }, z.core.$strict>;
28
+ export type RelayMessage = z.infer<typeof relayMessage>;
29
+ /** What a sending broker asks the router to carry: one message, to one app of its tenant. */
30
+ export declare const relayHandoff: z.ZodObject<{
31
+ to: z.ZodString;
32
+ message: z.ZodObject<{
33
+ id: z.ZodString;
34
+ kind: z.ZodEnum<{
35
+ event: "event";
36
+ reply: "reply";
37
+ request: "request";
38
+ }>;
39
+ scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
40
+ type: z.ZodString;
41
+ body: z.ZodUnknown;
42
+ committedAt: z.ZodString;
43
+ requestId: z.ZodOptional<z.ZodString>;
44
+ deadline: z.ZodOptional<z.ZodNumber>;
45
+ }, z.core.$strict>;
46
+ }, z.core.$strict>;
47
+ export type RelayHandoff = z.infer<typeof relayHandoff>;
48
+ /**
49
+ * K-66's three lines, as the router writes them from what it verified and never from the sender:
50
+ * the calling app is the deployment the call came from, the calling scope is the message's scope
51
+ * once the directory says it is an instance of that app, and the actor is the app itself.
52
+ */
53
+ export declare const brokerRelayCaller: z.ZodObject<{
54
+ app: z.ZodString;
55
+ scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
56
+ actor: z.ZodLiteral<"app">;
57
+ }, z.core.$strict>;
58
+ export type BrokerRelayCaller = z.infer<typeof brokerRelayCaller>;
59
+ /** What the router hands the receiving app's broker. */
60
+ export declare const relayEnvelope: z.ZodObject<{
61
+ tenantId: z.core.$ZodBranded<z.ZodString, "TenantId", "out">;
62
+ caller: z.ZodObject<{
63
+ app: z.ZodString;
64
+ scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
65
+ actor: z.ZodLiteral<"app">;
66
+ }, z.core.$strict>;
67
+ target: z.ZodObject<{
68
+ app: z.ZodString;
69
+ scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
70
+ }, z.core.$strict>;
71
+ message: z.ZodObject<{
72
+ id: z.ZodString;
73
+ kind: z.ZodEnum<{
74
+ event: "event";
75
+ reply: "reply";
76
+ request: "request";
77
+ }>;
78
+ scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
79
+ type: z.ZodString;
80
+ body: z.ZodUnknown;
81
+ committedAt: z.ZodString;
82
+ requestId: z.ZodOptional<z.ZodString>;
83
+ deadline: z.ZodOptional<z.ZodNumber>;
84
+ }, z.core.$strict>;
85
+ }, z.core.$strict>;
86
+ export type RelayEnvelope = z.infer<typeof relayEnvelope>;
87
+ /**
88
+ * Why a receiving broker refused a message. Each is final for that message: the sender records it
89
+ * and stops, rather than retrying what can never be accepted.
90
+ *
91
+ * - `late`: a reply after its request's deadline (K-62: refused and logged, never applied).
92
+ * - `unknown-request`: a reply to no request this broker sent.
93
+ * - `wrong-app`: a reply from an app the request did not go to.
94
+ * - `already-answered`: a second, different reply to a request already answered.
95
+ * - `forbidden`: the router refused the call (an undeclared target, a caller that is not who it says).
96
+ */
97
+ export declare const relayRefusal: z.ZodEnum<{
98
+ "already-answered": "already-answered";
99
+ forbidden: "forbidden";
100
+ late: "late";
101
+ "unknown-request": "unknown-request";
102
+ "wrong-app": "wrong-app";
103
+ }>;
104
+ export type RelayRefusal = z.infer<typeof relayRefusal>;
105
+ /**
106
+ * A hop's answer. `accepted`: the receiving broker holds it (a duplicate included, then
107
+ * `duplicate: true`). `no-broker`: the receiving app does not run a broker yet (a mixed fleet), so
108
+ * this path does not carry it and the existing path still does. `refused`: final, with its reason.
109
+ */
110
+ export declare const relayAnswer: z.ZodDiscriminatedUnion<[z.ZodObject<{
111
+ outcome: z.ZodLiteral<"accepted">;
112
+ duplicate: z.ZodBoolean;
113
+ }, z.core.$strict>, z.ZodObject<{
114
+ outcome: z.ZodLiteral<"no-broker">;
115
+ }, z.core.$strict>, z.ZodObject<{
116
+ outcome: z.ZodLiteral<"refused">;
117
+ reason: z.ZodEnum<{
118
+ "already-answered": "already-answered";
119
+ forbidden: "forbidden";
120
+ late: "late";
121
+ "unknown-request": "unknown-request";
122
+ "wrong-app": "wrong-app";
123
+ }>;
124
+ message: z.ZodString;
125
+ }, z.core.$strict>], "outcome">;
126
+ export type RelayAnswer = z.infer<typeof relayAnswer>;
127
+ //# sourceMappingURL=broker-relay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"broker-relay.d.ts","sourceRoot":"","sources":["../src/broker-relay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,4FAA4F;AAC5F,eAAO,MAAM,iBAAiB,2BAA2B,CAAC;AAE1D,eAAO,MAAM,SAAS;;;;EAAwC,CAAC;AAC/D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAIlD;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;kBA2BrB,CAAC;AACL,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD,6FAA6F;AAC7F,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;kBAAiE,CAAC;AAC3F,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;kBAMnB,CAAC;AACZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,wDAAwD;AACxD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;kBAQf,CAAC;AACZ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY;;;;;;EAAoF,CAAC;AAC9G,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;+BAItB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
@@ -0,0 +1,100 @@
1
+ import { z } from 'zod';
2
+ import { scopeId, tenantId, verticalSlug } from './ids.js';
3
+ // Broker to broker (K-74, rfc/broker-and-tenant-isolation.md §4.3–§4.4, #3469): the messages one
4
+ // app's delivery broker hands another's, through the router, in the same tenant.
5
+ //
6
+ // Three kinds cross. An `event` is one the sending app EXPORTS (#1705), in the form the producer's
7
+ // own export read released it: the domain fact without the producer's record of who caused it, or
8
+ // a withheld row named without its payload. A `request` asks the receiving app for an answer that
9
+ // arrives later as a `reply`, carrying the request's id; the sending broker records who waits for
10
+ // it and until when, and refuses a reply that comes after.
11
+ //
12
+ // Every hop drops a duplicate by message id: the sending broker per (message, receiving app), the
13
+ // receiving broker per (calling app, message), and that broker per (message, scope). So a message
14
+ // is applied once inside the platform however often a hop repeats it (K-74's "effectively once").
15
+ /** The path the router delivers a relayed message to, on the receiving app's deployment. */
16
+ export const BROKER_RELAY_PATH = '/internal/broker-relay';
17
+ export const relayKind = z.enum(['event', 'request', 'reply']);
18
+ const messageId = z.string().min(1).max(64);
19
+ /**
20
+ * One message as the sending broker hands it to the router for ONE receiving app. Strict, so no
21
+ * field naming the caller can ride along: who sent it is the router's to write ({@link relayEnvelope}).
22
+ */
23
+ export const relayMessage = z
24
+ .object({
25
+ /** The message's own id: the event's, or the request's or reply's. Dedup at every hop is by this. */
26
+ id: messageId,
27
+ kind: relayKind,
28
+ /** The sending scope: the app's claim, which the router holds to an instance of that app in its tenant. */
29
+ scopeId,
30
+ /** The event's type, or the request's or reply's name. */
31
+ type: z.string().min(1).max(200),
32
+ /**
33
+ * The content. An event: `{ event: ExportedEvent }` or `{ withheld: WithheldEvent }` (#1705's
34
+ * shapes, which the receiving scope's import door parses). A request or reply: what the two
35
+ * apps agree on, carried unread.
36
+ */
37
+ body: z.unknown(),
38
+ committedAt: z.string().min(1),
39
+ /** A reply: the request it answers. */
40
+ requestId: messageId.optional(),
41
+ /** A request: epoch ms the requester stops waiting. The receiver may read it; the requester enforces it. */
42
+ deadline: z.number().int().positive().optional(),
43
+ })
44
+ .strict()
45
+ .superRefine((m, ctx) => {
46
+ if (m.kind === 'reply' && !m.requestId)
47
+ ctx.addIssue({ code: 'custom', message: 'a reply names the request it answers' });
48
+ if (m.kind !== 'reply' && m.requestId)
49
+ ctx.addIssue({ code: 'custom', message: 'only a reply names a request' });
50
+ if (m.kind === 'request' && m.deadline === undefined)
51
+ ctx.addIssue({ code: 'custom', message: 'a request carries a deadline' });
52
+ if (m.kind !== 'request' && m.deadline !== undefined)
53
+ ctx.addIssue({ code: 'custom', message: 'only a request carries a deadline' });
54
+ });
55
+ /** What a sending broker asks the router to carry: one message, to one app of its tenant. */
56
+ export const relayHandoff = z.object({ to: verticalSlug, message: relayMessage }).strict();
57
+ /**
58
+ * K-66's three lines, as the router writes them from what it verified and never from the sender:
59
+ * the calling app is the deployment the call came from, the calling scope is the message's scope
60
+ * once the directory says it is an instance of that app, and the actor is the app itself.
61
+ */
62
+ export const brokerRelayCaller = z
63
+ .object({
64
+ app: verticalSlug,
65
+ scopeId,
66
+ actor: z.literal('app'),
67
+ })
68
+ .strict();
69
+ /** What the router hands the receiving app's broker. */
70
+ export const relayEnvelope = z
71
+ .object({
72
+ tenantId,
73
+ caller: brokerRelayCaller,
74
+ /** The receiving app, and the instance the router resolved for it, by the peer call's one rule. */
75
+ target: z.object({ app: verticalSlug, scopeId }).strict(),
76
+ message: relayMessage,
77
+ })
78
+ .strict();
79
+ /**
80
+ * Why a receiving broker refused a message. Each is final for that message: the sender records it
81
+ * and stops, rather than retrying what can never be accepted.
82
+ *
83
+ * - `late`: a reply after its request's deadline (K-62: refused and logged, never applied).
84
+ * - `unknown-request`: a reply to no request this broker sent.
85
+ * - `wrong-app`: a reply from an app the request did not go to.
86
+ * - `already-answered`: a second, different reply to a request already answered.
87
+ * - `forbidden`: the router refused the call (an undeclared target, a caller that is not who it says).
88
+ */
89
+ export const relayRefusal = z.enum(['late', 'unknown-request', 'wrong-app', 'already-answered', 'forbidden']);
90
+ /**
91
+ * A hop's answer. `accepted`: the receiving broker holds it (a duplicate included, then
92
+ * `duplicate: true`). `no-broker`: the receiving app does not run a broker yet (a mixed fleet), so
93
+ * this path does not carry it and the existing path still does. `refused`: final, with its reason.
94
+ */
95
+ export const relayAnswer = z.discriminatedUnion('outcome', [
96
+ z.object({ outcome: z.literal('accepted'), duplicate: z.boolean() }).strict(),
97
+ z.object({ outcome: z.literal('no-broker') }).strict(),
98
+ z.object({ outcome: z.literal('refused'), reason: relayRefusal, message: z.string() }).strict(),
99
+ ]);
100
+ //# sourceMappingURL=broker-relay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"broker-relay.js","sourceRoot":"","sources":["../src/broker-relay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE3D,iGAAiG;AACjG,iFAAiF;AACjF,EAAE;AACF,mGAAmG;AACnG,kGAAkG;AAClG,kGAAkG;AAClG,kGAAkG;AAClG,2DAA2D;AAC3D,EAAE;AACF,kGAAkG;AAClG,kGAAkG;AAClG,kGAAkG;AAElG,4FA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