@ixo/flow-work 0.6.0 → 0.7.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 (74) hide show
  1. package/README.md +9 -0
  2. package/dist/bounded-canonical.d.ts +10 -0
  3. package/dist/bounded-canonical.d.ts.map +1 -0
  4. package/dist/bounded-canonical.js +77 -0
  5. package/dist/bounded-canonical.js.map +1 -0
  6. package/dist/bounded-codec.d.ts +20 -0
  7. package/dist/bounded-codec.d.ts.map +1 -0
  8. package/dist/bounded-codec.js +301 -0
  9. package/dist/bounded-codec.js.map +1 -0
  10. package/dist/bounded-contracts.d.ts +114 -0
  11. package/dist/bounded-contracts.d.ts.map +1 -0
  12. package/dist/bounded-contracts.js +311 -0
  13. package/dist/bounded-contracts.js.map +1 -0
  14. package/dist/bounded-definitions.d.ts +44 -0
  15. package/dist/bounded-definitions.d.ts.map +1 -0
  16. package/dist/bounded-definitions.js +340 -0
  17. package/dist/bounded-definitions.js.map +1 -0
  18. package/dist/bounded-protocol.d.ts +461 -0
  19. package/dist/bounded-protocol.d.ts.map +1 -0
  20. package/dist/bounded-protocol.js +193 -0
  21. package/dist/bounded-protocol.js.map +1 -0
  22. package/dist/bounded.d.ts +18 -0
  23. package/dist/bounded.d.ts.map +1 -0
  24. package/dist/bounded.js +18 -0
  25. package/dist/bounded.js.map +1 -0
  26. package/dist/capability-adapter.d.ts +6 -0
  27. package/dist/capability-adapter.d.ts.map +1 -0
  28. package/dist/capability-adapter.js +56 -0
  29. package/dist/capability-adapter.js.map +1 -0
  30. package/dist/capability.d.ts +2 -0
  31. package/dist/capability.d.ts.map +1 -1
  32. package/dist/capability.js.map +1 -1
  33. package/dist/durable-input.d.ts +18 -0
  34. package/dist/durable-input.d.ts.map +1 -0
  35. package/dist/durable-input.js +126 -0
  36. package/dist/durable-input.js.map +1 -0
  37. package/dist/durable-listener.d.ts +55 -0
  38. package/dist/durable-listener.d.ts.map +1 -0
  39. package/dist/durable-listener.js +202 -0
  40. package/dist/durable-listener.js.map +1 -0
  41. package/dist/durable-store.d.ts +43 -0
  42. package/dist/durable-store.d.ts.map +1 -0
  43. package/dist/durable-store.js +188 -0
  44. package/dist/durable-store.js.map +1 -0
  45. package/dist/execution-rpc.d.ts +19 -0
  46. package/dist/execution-rpc.d.ts.map +1 -0
  47. package/dist/execution-rpc.js +72 -0
  48. package/dist/execution-rpc.js.map +1 -0
  49. package/dist/execution-service.d.ts +117 -0
  50. package/dist/execution-service.d.ts.map +1 -0
  51. package/dist/execution-service.js +343 -0
  52. package/dist/execution-service.js.map +1 -0
  53. package/dist/external-catalog.d.ts +43 -0
  54. package/dist/external-catalog.d.ts.map +1 -0
  55. package/dist/external-catalog.js +121 -0
  56. package/dist/external-catalog.js.map +1 -0
  57. package/dist/gateway-client.d.ts +30 -0
  58. package/dist/gateway-client.d.ts.map +1 -0
  59. package/dist/gateway-client.js +97 -0
  60. package/dist/gateway-client.js.map +1 -0
  61. package/dist/node-sqlite.d.ts +12 -0
  62. package/dist/node-sqlite.d.ts.map +1 -0
  63. package/dist/node-sqlite.js +45 -0
  64. package/dist/node-sqlite.js.map +1 -0
  65. package/dist/protocol.d.ts +4 -4
  66. package/dist/provider-journal.d.ts +26 -0
  67. package/dist/provider-journal.d.ts.map +1 -0
  68. package/dist/provider-journal.js +94 -0
  69. package/dist/provider-journal.js.map +1 -0
  70. package/dist/work-authority.d.ts +16 -0
  71. package/dist/work-authority.d.ts.map +1 -0
  72. package/dist/work-authority.js +31 -0
  73. package/dist/work-authority.js.map +1 -0
  74. package/package.json +9 -1
@@ -0,0 +1,97 @@
1
+ import { z } from 'zod';
2
+ import { readBoundedRecord } from './bounded-codec.js';
3
+ import { bounded, encodeBoundedJson, id, } from './bounded-protocol.js';
4
+ const gatewayEvent = z
5
+ .object({
6
+ eventId: id,
7
+ roomId: id,
8
+ sender: id,
9
+ type: id,
10
+ content: z.custom(() => true),
11
+ encrypted: z.boolean(),
12
+ originServerTs: z.number().int().safe().nonnegative(),
13
+ })
14
+ .strict();
15
+ export class GatewayClient {
16
+ binding;
17
+ consumer;
18
+ constructor(binding, consumer) {
19
+ this.binding = binding;
20
+ this.consumer = consumer;
21
+ id.parse(consumer);
22
+ }
23
+ async call(path, body) {
24
+ const response = await this.binding.fetch(`https://flow.internal${path}`, {
25
+ method: 'POST',
26
+ headers: { 'content-type': 'application/json' },
27
+ body: encodeBoundedJson(body),
28
+ signal: AbortSignal.timeout(25_000),
29
+ });
30
+ if (!response.ok) {
31
+ let code = '';
32
+ if (response.body) {
33
+ try {
34
+ const failure = await readBoundedRecord(response.body);
35
+ if (failure &&
36
+ typeof failure === 'object' &&
37
+ !Array.isArray(failure) &&
38
+ typeof failure.error === 'string')
39
+ code = `:${failure.error}`;
40
+ }
41
+ catch {
42
+ await response.body?.cancel();
43
+ }
44
+ }
45
+ throw new Error(`GATEWAY_HTTP_${response.status}${code}`);
46
+ }
47
+ if (!response.body)
48
+ throw new Error('GATEWAY_RESPONSE_MISSING');
49
+ return readBoundedRecord(response.body);
50
+ }
51
+ async read() {
52
+ // A single event can consume the complete record allowance. Never request an unbounded batch.
53
+ return bounded(z
54
+ .object({ events: z.array(gatewayEvent).max(1), hasMore: z.boolean() })
55
+ .strict(), await this.call('/v1/events/read', { consumer: this.consumer, limit: 1 }));
56
+ }
57
+ async ack(eventId) {
58
+ bounded(z.object({ acknowledged: z.literal(true) }).strict(), await this.call('/v1/events/ack', { consumer: this.consumer, eventId }));
59
+ }
60
+ async send(request) {
61
+ const response = bounded(z.object({ eventId: id }).strict(), await this.call('/v1/events/send', request));
62
+ return response.eventId;
63
+ }
64
+ }
65
+ /** Node hosts use a fixed configured service URL and a distinct private credential. */
66
+ export class AuthenticatedServiceBinding {
67
+ baseUrl;
68
+ credential;
69
+ constructor(baseUrl, credential) {
70
+ this.baseUrl = baseUrl;
71
+ this.credential = credential;
72
+ const url = new URL(baseUrl);
73
+ const loopback = ['localhost', '127.0.0.1', '::1'].includes(url.hostname);
74
+ if (credential.length < 32 ||
75
+ credential.length > 4096 ||
76
+ url.username ||
77
+ url.password ||
78
+ (url.protocol !== 'https:' && !(url.protocol === 'http:' && loopback)) ||
79
+ url.pathname !== '/' ||
80
+ url.search ||
81
+ url.hash)
82
+ throw new Error('INVALID_SERVICE_CONFIGURATION');
83
+ this.baseUrl = url.toString();
84
+ }
85
+ fetch(input, init) {
86
+ const path = new URL(typeof input === 'string' ? input : input.url)
87
+ .pathname;
88
+ const headers = new Headers(init?.headers);
89
+ headers.set('authorization', `Bearer ${this.credential}`);
90
+ return fetch(new URL(path, this.baseUrl), {
91
+ ...init,
92
+ headers,
93
+ redirect: 'error',
94
+ });
95
+ }
96
+ }
97
+ //# sourceMappingURL=gateway-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gateway-client.js","sourceRoot":"","sources":["../src/gateway-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EACL,OAAO,EACP,iBAAiB,EACjB,EAAE,GAGH,MAAM,uBAAuB,CAAC;AAK/B,MAAM,YAAY,GAAG,CAAC;KACnB,MAAM,CAAC;IACN,OAAO,EAAE,EAAE;IACX,MAAM,EAAE,EAAE;IACV,MAAM,EAAE,EAAE;IACV,IAAI,EAAE,EAAE;IACR,OAAO,EAAE,CAAC,CAAC,MAAM,CAAc,GAAG,EAAE,CAAC,IAAI,CAAC;IAC1C,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE;CACtD,CAAC;KACD,MAAM,EAAE,CAAC;AACZ,MAAM,OAAO,aAAa;IAEL;IACR;IAFX,YACmB,OAAuB,EAC/B,QAAgB;QADR,YAAO,GAAP,OAAO,CAAgB;QAC/B,aAAQ,GAAR,QAAQ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CAAC,QAAQ,CAAC,CAAC;QAC1E,IACE,UAAU,CAAC,MAAM,GAAG,EAAE;YACtB,UAAU,CAAC,MAAM,GAAG,IAAI;YACxB,GAAG,CAAC,QAAQ;YACZ,GAAG,CAAC,QAAQ;YACZ,CAAC,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,QAAQ,CAAC,CAAC;YACtE,GAAG,CAAC,QAAQ,KAAK,GAAG;YACpB,GAAG,CAAC,MAAM;YACV,GAAG,CAAC,IAAI;YAER,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACnD,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC;IAChC,CAAC;IACD,KAAK,CAAC,KAAuB,EAAE,IAAkB;QAC/C,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;aAChE,QAAQ,CAAC;QACZ,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC3C,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QAC1D,OAAO,KAAK,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE;YACxC,GAAG,IAAI;YACP,OAAO;YACP,QAAQ,EAAE,OAAO;SAClB,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,12 @@
1
+ import { DatabaseSync } from 'node:sqlite';
2
+ import type { WorkSql } from './durable-store.js';
3
+ /** One local SQLite file per helper process group. SQL claims serialize concurrent helper instances. */
4
+ export declare class NodeWorkSql implements WorkSql {
5
+ readonly database: DatabaseSync;
6
+ private transactionDepth;
7
+ readonly sql: WorkSql['sql'];
8
+ constructor(path: string);
9
+ transactionSync<T>(body: () => T): T;
10
+ close(): void;
11
+ }
12
+ //# sourceMappingURL=node-sqlite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-sqlite.d.ts","sourceRoot":"","sources":["../src/node-sqlite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,wGAAwG;AACxG,qBAAa,WAAY,YAAW,OAAO;IACzC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,OAAO,CAAC,gBAAgB,CAAK;IAC7B,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;gBACjB,IAAI,EAAE,MAAM;IAkBxB,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC;IAoBpC,KAAK,IAAI,IAAI;CAGd"}
@@ -0,0 +1,45 @@
1
+ import { DatabaseSync } from 'node:sqlite';
2
+ /** One local SQLite file per helper process group. SQL claims serialize concurrent helper instances. */
3
+ export class NodeWorkSql {
4
+ database;
5
+ transactionDepth = 0;
6
+ sql;
7
+ constructor(path) {
8
+ this.database = new DatabaseSync(path);
9
+ this.database.exec('PRAGMA journal_mode=WAL; PRAGMA synchronous=FULL; PRAGMA busy_timeout=5000;');
10
+ this.sql = {
11
+ exec: (statement, ...args) => {
12
+ const query = this.database.prepare(statement);
13
+ if (/^\s*(SELECT|WITH|PRAGMA)\b/i.test(statement))
14
+ return { toArray: () => query.all(...args) };
15
+ query.run(...args);
16
+ return { toArray: () => [] };
17
+ },
18
+ };
19
+ }
20
+ transactionSync(body) {
21
+ const depth = this.transactionDepth++;
22
+ const name = `work_${depth}`;
23
+ try {
24
+ this.database.exec(depth ? `SAVEPOINT ${name}` : 'BEGIN IMMEDIATE');
25
+ try {
26
+ const result = body();
27
+ this.database.exec(depth ? `RELEASE SAVEPOINT ${name}` : 'COMMIT');
28
+ return result;
29
+ }
30
+ catch (error) {
31
+ this.database.exec(depth ? `ROLLBACK TO SAVEPOINT ${name}` : 'ROLLBACK');
32
+ if (depth)
33
+ this.database.exec(`RELEASE SAVEPOINT ${name}`);
34
+ throw error;
35
+ }
36
+ }
37
+ finally {
38
+ this.transactionDepth--;
39
+ }
40
+ }
41
+ close() {
42
+ this.database.close();
43
+ }
44
+ }
45
+ //# sourceMappingURL=node-sqlite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-sqlite.js","sourceRoot":"","sources":["../src/node-sqlite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,wGAAwG;AACxG,MAAM,OAAO,WAAW;IACb,QAAQ,CAAe;IACxB,gBAAgB,GAAG,CAAC,CAAC;IACpB,GAAG,CAAiB;IAC7B,YAAY,IAAY;QACtB,IAAI,CAAC,QAAQ,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAChB,6EAA6E,CAC9E,CAAC;QACF,IAAI,CAAC,GAAG,GAAG;YACT,IAAI,EAAE,CACJ,SAAiB,EACjB,GAAG,IAAgC,EACnC,EAAE;gBACF,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;gBAC/C,IAAI,6BAA6B,CAAC,IAAI,CAAC,SAAS,CAAC;oBAC/C,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAQ,EAAE,CAAC;gBACtD,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;gBACnB,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EAAS,EAAE,CAAC;YACtC,CAAC;SACF,CAAC;IACJ,CAAC;IACD,eAAe,CAAI,IAAa;QAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtC,MAAM,IAAI,GAAG,QAAQ,KAAK,EAAE,CAAC;QAC7B,IAAI,CAAC;YACH,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;YACpE,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,IAAI,EAAE,CAAC;gBACtB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;gBACnE,OAAO,MAAM,CAAC;YAChB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,QAAQ,CAAC,IAAI,CAChB,KAAK,CAAC,CAAC,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC,CAAC,UAAU,CACrD,CAAC;gBACF,IAAI,KAAK;oBAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAC;gBAC3D,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC1B,CAAC;IACH,CAAC;IACD,KAAK;QACH,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;CACF"}
@@ -76,12 +76,12 @@ export declare const flowWorkInvokeSchema: z.ZodObject<{
76
76
  }, z.core.$strict>;
77
77
  export type FlowWorkInvoke = z.infer<typeof flowWorkInvokeSchema>;
78
78
  export declare const flowWorkErrorCodeSchema: z.ZodEnum<{
79
+ delegation_expired: "delegation_expired";
80
+ delegation_invalid: "delegation_invalid";
79
81
  assignment_missing: "assignment_missing";
80
82
  sender_untrusted: "sender_untrusted";
81
83
  binding_mismatch: "binding_mismatch";
82
84
  deadline_expired: "deadline_expired";
83
- delegation_invalid: "delegation_invalid";
84
- delegation_expired: "delegation_expired";
85
85
  capability_not_declared: "capability_not_declared";
86
86
  input_invalid: "input_invalid";
87
87
  output_invalid: "output_invalid";
@@ -109,12 +109,12 @@ export declare const flowWorkReceiptSchema: z.ZodDiscriminatedUnion<[z.ZodObject
109
109
  output: z.ZodNull;
110
110
  error: z.ZodObject<{
111
111
  code: z.ZodEnum<{
112
+ delegation_expired: "delegation_expired";
113
+ delegation_invalid: "delegation_invalid";
112
114
  assignment_missing: "assignment_missing";
113
115
  sender_untrusted: "sender_untrusted";
114
116
  binding_mismatch: "binding_mismatch";
115
117
  deadline_expired: "deadline_expired";
116
- delegation_invalid: "delegation_invalid";
117
- delegation_expired: "delegation_expired";
118
118
  capability_not_declared: "capability_not_declared";
119
119
  input_invalid: "input_invalid";
120
120
  output_invalid: "output_invalid";
@@ -0,0 +1,26 @@
1
+ import { type BoundedJson } from './bounded-protocol.js';
2
+ import type { WorkSql } from './durable-store.js';
3
+ export declare class ProviderOutcomeUnknown extends Error {
4
+ constructor();
5
+ }
6
+ /** Provider attempts and pure preparation records share a durable business key, never an attempt id. */
7
+ export declare class ProviderJournal {
8
+ private readonly storage;
9
+ constructor(storage: WorkSql);
10
+ prepare(key: string, stage: string, inputs: BoundedJson, compute: () => Promise<BoundedJson>): Promise<BoundedJson>;
11
+ execute(options: {
12
+ key: string;
13
+ stage: string;
14
+ submitted: BoundedJson;
15
+ invoke(): Promise<BoundedJson>;
16
+ readback(submitted: BoundedJson): Promise<{
17
+ proven: true;
18
+ result: BoundedJson;
19
+ } | {
20
+ proven: false;
21
+ }>;
22
+ }): Promise<BoundedJson>;
23
+ /** Restore the exact provider request before any model or calendar default can change it. */
24
+ submitted(key: string, stage: string): BoundedJson | null;
25
+ }
26
+ //# sourceMappingURL=provider-journal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-journal.d.ts","sourceRoot":"","sources":["../src/provider-journal.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD,qBAAa,sBAAuB,SAAQ,KAAK;;CAIhD;AACD,wGAAwG;AACxG,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,OAAO;IASvC,OAAO,CACX,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,GAClC,OAAO,CAAC,WAAW,CAAC;IA+BjB,OAAO,CAAC,OAAO,EAAE;QACrB,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,WAAW,CAAC;QACvB,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;QAC/B,QAAQ,CACN,SAAS,EAAE,WAAW,GACrB,OAAO,CAAC;YAAE,MAAM,EAAE,IAAI,CAAC;YAAC,MAAM,EAAE,WAAW,CAAA;SAAE,GAAG;YAAE,MAAM,EAAE,KAAK,CAAA;SAAE,CAAC,CAAC;KACvE,GAAG,OAAO,CAAC,WAAW,CAAC;IAkExB,6FAA6F;IAC7F,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI;CAU1D"}
@@ -0,0 +1,94 @@
1
+ import { z } from 'zod';
2
+ import { hash, text, parse, same, } from './bounded-protocol.js';
3
+ const json = z.custom(() => true);
4
+ export class ProviderOutcomeUnknown extends Error {
5
+ constructor() {
6
+ super('PROVIDER_OUTCOME_UNKNOWN');
7
+ }
8
+ }
9
+ /** Provider attempts and pure preparation records share a durable business key, never an attempt id. */
10
+ export class ProviderJournal {
11
+ storage;
12
+ constructor(storage) {
13
+ this.storage = storage;
14
+ storage.sql.exec(`CREATE TABLE IF NOT EXISTS helper_provider (
15
+ operation_key TEXT NOT NULL, stage TEXT NOT NULL, fingerprint TEXT NOT NULL,
16
+ submitted TEXT NOT NULL, state TEXT NOT NULL, result TEXT,
17
+ PRIMARY KEY(operation_key,stage))`);
18
+ storage.sql.exec(`CREATE TABLE IF NOT EXISTS helper_preparation (
19
+ operation_key TEXT NOT NULL, stage TEXT NOT NULL, fingerprint TEXT NOT NULL,
20
+ result TEXT NOT NULL, PRIMARY KEY(operation_key,stage))`);
21
+ }
22
+ async prepare(key, stage, inputs, compute) {
23
+ const fingerprint = await hash(inputs);
24
+ const read = () => this.storage.sql
25
+ .exec('SELECT fingerprint,result FROM helper_preparation WHERE operation_key=? AND stage=?', key, stage)
26
+ .toArray()[0];
27
+ const prior = read();
28
+ if (prior) {
29
+ if (prior.fingerprint !== fingerprint)
30
+ throw new Error('PREPARATION_INPUT_CONFLICT');
31
+ return parse(json, String(prior.result));
32
+ }
33
+ const result = text(await compute());
34
+ return this.storage.transactionSync(() => {
35
+ this.storage.sql.exec('INSERT OR IGNORE INTO helper_preparation VALUES (?,?,?,?)', key, stage, fingerprint, result);
36
+ const accepted = read();
37
+ if (accepted.fingerprint !== fingerprint)
38
+ throw new Error('PREPARATION_INPUT_CONFLICT');
39
+ return parse(json, String(accepted.result));
40
+ });
41
+ }
42
+ async execute(options) {
43
+ const fingerprint = await hash(options.submitted);
44
+ const read = () => this.storage.sql
45
+ .exec('SELECT * FROM helper_provider WHERE operation_key=? AND stage=?', options.key, options.stage)
46
+ .toArray()[0];
47
+ const first = this.storage.transactionSync(() => {
48
+ const prior = read();
49
+ if (prior) {
50
+ if (prior.fingerprint !== fingerprint ||
51
+ prior.submitted !== text(options.submitted))
52
+ throw new Error('PROVIDER_FINGERPRINT_CONFLICT');
53
+ return false;
54
+ }
55
+ this.storage.sql.exec(`INSERT INTO helper_provider VALUES (?,?,?,?,'armed',NULL)`, options.key, options.stage, fingerprint, text(options.submitted));
56
+ return true;
57
+ });
58
+ const prior = read();
59
+ if (prior.state === 'complete')
60
+ return parse(json, String(prior.result));
61
+ let result;
62
+ try {
63
+ if (first)
64
+ result = await options.invoke();
65
+ else {
66
+ const evidence = await options.readback(parse(json, String(prior.submitted)));
67
+ if (!evidence.proven)
68
+ throw new ProviderOutcomeUnknown();
69
+ result = evidence.result;
70
+ }
71
+ const encoded = text(result);
72
+ this.storage.transactionSync(() => {
73
+ const current = read();
74
+ if (current.result !== null &&
75
+ !same(parse(json, String(current.result)), result))
76
+ throw new Error('PROVIDER_RESULT_CONFLICT');
77
+ this.storage.sql.exec(`UPDATE helper_provider SET state='complete',result=? WHERE operation_key=? AND stage=?`, encoded, options.key, options.stage);
78
+ });
79
+ return result;
80
+ }
81
+ catch (error) {
82
+ this.storage.sql.exec(`UPDATE helper_provider SET state='needs_verification' WHERE operation_key=? AND stage=? AND state<>'complete'`, options.key, options.stage);
83
+ throw error;
84
+ }
85
+ }
86
+ /** Restore the exact provider request before any model or calendar default can change it. */
87
+ submitted(key, stage) {
88
+ const row = this.storage.sql
89
+ .exec('SELECT submitted FROM helper_provider WHERE operation_key=? AND stage=?', key, stage)
90
+ .toArray()[0];
91
+ return row ? parse(json, String(row.submitted)) : null;
92
+ }
93
+ }
94
+ //# sourceMappingURL=provider-journal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-journal.js","sourceRoot":"","sources":["../src/provider-journal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,IAAI,GAEL,MAAM,uBAAuB,CAAC;AAI/B,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAc,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;AAC/C,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAC/C;QACE,KAAK,CAAC,0BAA0B,CAAC,CAAC;IACpC,CAAC;CACF;AACD,wGAAwG;AACxG,MAAM,OAAO,eAAe;IACG;IAA7B,YAA6B,OAAgB;QAAhB,YAAO,GAAP,OAAO,CA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I,CAAC;IACzD,CAAC;CACF"}
@@ -0,0 +1,16 @@
1
+ import { type BoundedWorkBinding } from './bounded-protocol.js';
2
+ import { type ExecutionCatalog, type ExecutionAuthorityPort, type ExecutionDefinitionPort } from './execution-service.js';
3
+ import type { WorkAuthority } from './durable-listener.js';
4
+ /** The helper verifies its exact independently stored routing grant and the current execution authority. */
5
+ export declare class DefinitionWorkAuthority implements WorkAuthority {
6
+ private readonly definitions;
7
+ private readonly authority;
8
+ private readonly catalog;
9
+ constructor(definitions: ExecutionDefinitionPort, authority: ExecutionAuthorityPort, catalog: Pick<ExecutionCatalog, 'validate'>);
10
+ authorize(binding: BoundedWorkBinding): Promise<{
11
+ expiresAt: number;
12
+ stateVersion: number;
13
+ grantDigest: string;
14
+ }>;
15
+ }
16
+ //# sourceMappingURL=work-authority.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"work-authority.d.ts","sourceRoot":"","sources":["../src/work-authority.ts"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC7B,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,4GAA4G;AAC5G,qBAAa,uBAAwB,YAAW,aAAa;IAEzD,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAFP,WAAW,EAAE,uBAAuB,EACpC,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC;IAExD,SAAS,CAAC,OAAO,EAAE,kBAAkB;;;;;CA2B5C"}
@@ -0,0 +1,31 @@
1
+ import { decodeDefinitionRecord } from './bounded-definitions.js';
2
+ import { bounded, decodeBoundedJson, encodeBoundedJson, same, } from './bounded-protocol.js';
3
+ import { actionReferenceSchema, workAuthorizationSchema, } from './execution-service.js';
4
+ /** The helper verifies its exact independently stored routing grant and the current execution authority. */
5
+ export class DefinitionWorkAuthority {
6
+ definitions;
7
+ authority;
8
+ catalog;
9
+ constructor(definitions, authority, catalog) {
10
+ this.definitions = definitions;
11
+ this.authority = authority;
12
+ this.catalog = catalog;
13
+ }
14
+ async authorize(binding) {
15
+ const a = binding.admission;
16
+ const stored = workAuthorizationSchema.parse(decodeBoundedJson(await this.definitions.readExecutionAuthorization(a.flowId, a.id)));
17
+ if (!('binding' in stored) || !same(stored.binding, binding))
18
+ throw new Error('STORED_WORK_AUTHORITY_MISMATCH');
19
+ const definition = decodeDefinitionRecord(await this.definitions.readExecutionDefinition(a.flowId, a.id));
20
+ if (definition.category !== 'step' ||
21
+ definition.value.stepId !== a.stepId ||
22
+ definition.value.resource !== binding.resource)
23
+ throw new Error('HELPER_DEFINITION_MISMATCH');
24
+ const action = bounded(actionReferenceSchema, definition.value.action);
25
+ if (action.type !== binding.actionType || action.can !== binding.capability)
26
+ throw new Error('HELPER_CONTRACT_MISMATCH');
27
+ this.catalog.validate(action);
28
+ return this.authority.authorizeExecution(a.flowId, encodeBoundedJson(a));
29
+ }
30
+ }
31
+ //# sourceMappingURL=work-authority.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"work-authority.js","sourceRoot":"","sources":["../src/work-authority.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,OAAO,EACP,iBAAiB,EACjB,iBAAiB,EACjB,IAAI,GAGL,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,qBAAqB,EACrB,uBAAuB,GAIxB,MAAM,wBAAwB,CAAC;AAGhC,4GAA4G;AAC5G,MAAM,OAAO,uBAAuB;IAEf;IACA;IACA;IAHnB,YACmB,WAAoC,EACpC,SAAiC,EACjC,OAA2C;QAF3C,g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kB,CACtC,CAAC,CAAC,MAAM,EACR,iBAAiB,CAAC,CAA2B,CAAC,CAC/C,CAAC;IACJ,CAAC;CACF"}
package/package.json CHANGED
@@ -1,12 +1,20 @@
1
1
  {
2
2
  "name": "@ixo/flow-work",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Oracle-side flow-work plugin: accept UCAN-delegated ixo.flow.work invocations from the IXO flow-manager over Matrix and post receipts.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
9
  "exports": {
10
+ "./bounded": {
11
+ "types": "./dist/bounded.d.ts",
12
+ "import": "./dist/bounded.js"
13
+ },
14
+ "./node-sqlite": {
15
+ "types": "./dist/node-sqlite.d.ts",
16
+ "import": "./dist/node-sqlite.js"
17
+ },
10
18
  ".": {
11
19
  "types": "./dist/index.d.ts",
12
20
  "import": "./dist/index.js"