@fluidgrids/cli 2026.1028.1 → 2026.1028.2

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 (81) hide show
  1. package/README.md +52 -0
  2. package/dist/code-first/api.d.ts +187 -0
  3. package/dist/code-first/api.d.ts.map +1 -1
  4. package/dist/code-first/api.js +122 -0
  5. package/dist/code-first/api.js.map +1 -1
  6. package/dist/code-first/code-upload.d.ts +52 -0
  7. package/dist/code-first/code-upload.d.ts.map +1 -0
  8. package/dist/code-first/code-upload.js +161 -0
  9. package/dist/code-first/code-upload.js.map +1 -0
  10. package/dist/code-first/commands/hotfix.d.ts +54 -0
  11. package/dist/code-first/commands/hotfix.d.ts.map +1 -0
  12. package/dist/code-first/commands/hotfix.js +225 -0
  13. package/dist/code-first/commands/hotfix.js.map +1 -0
  14. package/dist/code-first/commands/push.d.ts +47 -1
  15. package/dist/code-first/commands/push.d.ts.map +1 -1
  16. package/dist/code-first/commands/push.js +115 -19
  17. package/dist/code-first/commands/push.js.map +1 -1
  18. package/dist/code-first/commands/replay.d.ts +44 -0
  19. package/dist/code-first/commands/replay.d.ts.map +1 -0
  20. package/dist/code-first/commands/replay.js +238 -0
  21. package/dist/code-first/commands/replay.js.map +1 -0
  22. package/dist/code-first/commands/runs.d.ts +94 -0
  23. package/dist/code-first/commands/runs.d.ts.map +1 -0
  24. package/dist/code-first/commands/runs.js +304 -0
  25. package/dist/code-first/commands/runs.js.map +1 -0
  26. package/dist/code-first/commands/validate.d.ts +4 -0
  27. package/dist/code-first/commands/validate.d.ts.map +1 -1
  28. package/dist/code-first/commands/validate.js +31 -6
  29. package/dist/code-first/commands/validate.js.map +1 -1
  30. package/dist/code-first/commands/versions.d.ts +14 -0
  31. package/dist/code-first/commands/versions.d.ts.map +1 -0
  32. package/dist/code-first/commands/versions.js +30 -0
  33. package/dist/code-first/commands/versions.js.map +1 -0
  34. package/dist/code-first/durable-operations.d.ts +42 -0
  35. package/dist/code-first/durable-operations.d.ts.map +1 -0
  36. package/dist/code-first/durable-operations.js +136 -0
  37. package/dist/code-first/durable-operations.js.map +1 -0
  38. package/dist/code-first/history.d.ts +30 -0
  39. package/dist/code-first/history.d.ts.map +1 -0
  40. package/dist/code-first/history.js +139 -0
  41. package/dist/code-first/history.js.map +1 -0
  42. package/dist/code-first/imports.d.ts +22 -0
  43. package/dist/code-first/imports.d.ts.map +1 -0
  44. package/dist/code-first/imports.js +67 -0
  45. package/dist/code-first/imports.js.map +1 -0
  46. package/dist/code-first/index.d.ts +4 -1
  47. package/dist/code-first/index.d.ts.map +1 -1
  48. package/dist/code-first/index.js +6 -2
  49. package/dist/code-first/index.js.map +1 -1
  50. package/dist/code-first/lowering.d.ts +40 -1
  51. package/dist/code-first/lowering.d.ts.map +1 -1
  52. package/dist/code-first/lowering.js +103 -6
  53. package/dist/code-first/lowering.js.map +1 -1
  54. package/dist/code-first/presigned.d.ts +21 -0
  55. package/dist/code-first/presigned.d.ts.map +1 -0
  56. package/dist/code-first/presigned.js +85 -0
  57. package/dist/code-first/presigned.js.map +1 -0
  58. package/dist/code-first/project.d.ts +9 -0
  59. package/dist/code-first/project.d.ts.map +1 -1
  60. package/dist/code-first/project.js +22 -0
  61. package/dist/code-first/project.js.map +1 -1
  62. package/dist/code-first/python.d.ts +11 -0
  63. package/dist/code-first/python.d.ts.map +1 -1
  64. package/dist/code-first/python.js +31 -1
  65. package/dist/code-first/python.js.map +1 -1
  66. package/dist/code-first/register.d.ts +6 -0
  67. package/dist/code-first/register.d.ts.map +1 -1
  68. package/dist/code-first/register.js +146 -2
  69. package/dist/code-first/register.js.map +1 -1
  70. package/dist/code-first/remote.d.ts.map +1 -1
  71. package/dist/code-first/remote.js +6 -0
  72. package/dist/code-first/remote.js.map +1 -1
  73. package/dist/code-first/replay.d.ts +36 -0
  74. package/dist/code-first/replay.d.ts.map +1 -0
  75. package/dist/code-first/replay.js +52 -0
  76. package/dist/code-first/replay.js.map +1 -0
  77. package/dist/code-first/shared.d.ts +12 -0
  78. package/dist/code-first/shared.d.ts.map +1 -1
  79. package/dist/code-first/shared.js +36 -0
  80. package/dist/code-first/shared.js.map +1 -1
  81. package/package.json +2 -2
@@ -0,0 +1,42 @@
1
+ /**
2
+ * GraphQL documents for durable functions (managed tier-2 workflows, BOFF-9905
3
+ * Phase B): code bundle upload and hotfix, durable run start, history, signal,
4
+ * terminate and stack trace.
5
+ *
6
+ * Every document targets the WORKSPACE gateway (wspace-workflow-svc). The names
7
+ * and shapes are the Phase B contract (PLAN-B §5 B8 and B9, spec 08 §4). They
8
+ * are validated by `tests/code-first/durable-operations.test.ts` against the
9
+ * vendored supergraph once `bun run schema:pull` brings the service release
10
+ * in, and against `schema/durable.pending.graphql` until then.
11
+ *
12
+ * The service gates every operation that starts new durable work
13
+ * (`prepareWorkflowCodeUpload`, `replaceWorkflowVersionCode`, `startWorkflow`,
14
+ * `signalWorkflowRun` on a DURABLE_FN run, and versions with a `codeBundle`) on
15
+ * the `fluidgrids.durable-functions` feature flag, fail closed. A workspace
16
+ * without the flag gets a GraphQL error that the CLI prints as it is; the CLI
17
+ * never decides the flag itself.
18
+ */
19
+ /** A presigned bundle PUT (skipped when `alreadyStored`) and a presigned source PUT. */
20
+ export declare const CF_PREPARE_WORKFLOW_CODE_UPLOAD = "\n mutation FluidgridsCodePrepareWorkflowCodeUpload($input: PrepareWorkflowCodeUploadInput!) {\n prepareWorkflowCodeUpload(input: $input) {\n uploadId\n bundle { url method headers expiresAt alreadyStored }\n source { url method headers expiresAt alreadyStored }\n }\n }\n";
21
+ /** Hotfix: replace the bundle of an existing version; an asynchronous, replay-verified job. */
22
+ export declare const CF_REPLACE_WORKFLOW_VERSION_CODE = "\n mutation FluidgridsCodeReplaceWorkflowVersionCode(\n $workflowKey: String!\n $version: String!\n $codeBundle: CodeBundleInput!\n $verifyReplay: Boolean\n ) {\n replaceWorkflowVersionCode(\n workflowKey: $workflowKey\n version: $version\n codeBundle: $codeBundle\n verifyReplay: $verifyReplay\n ) { \n id status buildId previousBuildId verifiedRuns\n violations { runId seq message }\n }\n }\n";
23
+ /** Poll a hotfix job. */
24
+ export declare const CF_WORKFLOW_CODE_REPLACE = "\n query FluidgridsCodeWorkflowCodeReplace($id: ID!) {\n workflowCodeReplace(id: $id) { \n id status buildId previousBuildId verifiedRuns\n violations { runId seq message }\n }\n }\n";
25
+ /** The code bundle a version references, or null for a version without code. */
26
+ export declare const CF_WORKFLOW_CODE_BUNDLE = "\n query FluidgridsCodeWorkflowCodeBundle($workflowKey: String!, $version: String!) {\n workflowCodeBundle(workflowKey: $workflowKey, version: $version) {\n id buildId language sdkVersion entry exports determinism\n bundleBytes sourceBytes compatibleBuildIds replacedAt createdAt\n }\n }\n";
27
+ /** Start a root durable-function run (DB18). */
28
+ export declare const CF_START_WORKFLOW = "\n mutation FluidgridsCodeStartWorkflow($input: StartWorkflowInput!) {\n startWorkflow(input: $input) {\n existing\n run { \n id workflowId workflowKey version status mode triggerNodeId\n executionKind workflowFn taskQueue buildId historyLength parentClosePolicy\n parentRunId rootRunId cancelRequestedAt\n createdAt startedAt completedAt errorMessage errorType\n determinism { failing cause attempts since lastFailureSeq message }\n }\n }\n }\n";
29
+ /** One run with its durable fields. */
30
+ export declare const CF_DESCRIBE_RUN = "\n query FluidgridsCodeDescribeRun($id: ID!) {\n workflowRun(id: $id) { \n id workflowId workflowKey version status mode triggerNodeId\n executionKind workflowFn taskQueue buildId historyLength parentClosePolicy\n parentRunId rootRunId cancelRequestedAt\n createdAt startedAt completedAt errorMessage errorType\n determinism { failing cause attempts since lastFailureSeq message }\n }\n }\n";
31
+ /** One page of a run's event history. */
32
+ export declare const CF_WORKFLOW_RUN_HISTORY = "\n query FluidgridsCodeWorkflowRunHistory($runId: ID!, $after: Int, $limit: Int) {\n workflowRunHistory(runId: $runId, after: $after, limit: $limit) {\n events { runId seq type taskId payload payloadUrl createdAt }\n nextAfter hasMore historyLength historyBytes\n }\n }\n";
33
+ export declare const CF_SIGNAL_WORKFLOW_RUN = "\n mutation FluidgridsCodeSignalWorkflowRun(\n $runId: ID!\n $name: String!\n $payload: JSON\n $idempotencyKey: String\n ) {\n signalWorkflowRun(runId: $runId, name: $name, payload: $payload, idempotencyKey: $idempotencyKey) {\n accepted delivered buffered forwardedToRunId seq duplicate\n }\n }\n";
34
+ /** Terminate a run of either kind; no code runs (durable) and no node runs (graph). */
35
+ export declare const CF_TERMINATE_WORKFLOW_RUN = "\n mutation FluidgridsCodeTerminateWorkflowRun($runId: ID!, $reason: String) {\n terminateWorkflowRun(runId: $runId, reason: $reason) { id status completedAt errorMessage }\n }\n";
36
+ /** The built-in `__stack_trace` / `__enhanced_stack_trace` query, replayed in the service. */
37
+ export declare const CF_WORKFLOW_RUN_STACK_TRACE = "\n query FluidgridsCodeWorkflowRunStackTrace($runId: ID!, $enhanced: Boolean) {\n workflowRunStackTrace(runId: $runId, enhanced: $enhanced) { trace enhanced }\n }\n";
38
+ /** Runs of one workflow key (newest first), for `push --hotfix --replay-sample`. */
39
+ export declare const CF_LIST_RUNS = "\n query FluidgridsCodeListRuns($input: ListWorkflowRunsInput!) {\n workflowRuns(input: $input) {\n items { id workflowKey version status executionKind }\n hasMore\n }\n }\n";
40
+ /** Trigger a stored version from one of its trigger nodes (`fluidgrids run`). */
41
+ export declare const CF_TRIGGER_WORKFLOW = "\n mutation FluidgridsCodeTriggerWorkflow($input: TriggerWorkflowInput!) {\n triggerWorkflow(input: $input) { runId status workflowKey version triggerNodeId }\n }\n";
42
+ //# sourceMappingURL=durable-operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"durable-operations.d.ts","sourceRoot":"","sources":["../../src/code-first/durable-operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,wFAAwF;AACxF,eAAO,MAAM,+BAA+B,4SAQ3C,CAAC;AAOF,+FAA+F;AAC/F,eAAO,MAAM,gCAAgC,2bAc5C,CAAC;AAEF,yBAAyB;AACzB,eAAO,MAAM,wBAAwB,kMAIpC,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,uBAAuB,wTAOnC,CAAC;AAWF,gDAAgD;AAChD,eAAO,MAAM,iBAAiB,ydAO7B,CAAC;AAEF,uCAAuC;AACvC,eAAO,MAAM,eAAe,qZAI3B,CAAC;AAEF,yCAAyC;AACzC,eAAO,MAAM,uBAAuB,sSAOnC,CAAC;AAEF,eAAO,MAAM,sBAAsB,wUAWlC,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,yBAAyB,4LAIrC,CAAC;AAEF,8FAA8F;AAC9F,eAAO,MAAM,2BAA2B,8KAIvC,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,YAAY,oMAOxB,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,8KAI/B,CAAC"}
@@ -0,0 +1,136 @@
1
+ /**
2
+ * GraphQL documents for durable functions (managed tier-2 workflows, BOFF-9905
3
+ * Phase B): code bundle upload and hotfix, durable run start, history, signal,
4
+ * terminate and stack trace.
5
+ *
6
+ * Every document targets the WORKSPACE gateway (wspace-workflow-svc). The names
7
+ * and shapes are the Phase B contract (PLAN-B §5 B8 and B9, spec 08 §4). They
8
+ * are validated by `tests/code-first/durable-operations.test.ts` against the
9
+ * vendored supergraph once `bun run schema:pull` brings the service release
10
+ * in, and against `schema/durable.pending.graphql` until then.
11
+ *
12
+ * The service gates every operation that starts new durable work
13
+ * (`prepareWorkflowCodeUpload`, `replaceWorkflowVersionCode`, `startWorkflow`,
14
+ * `signalWorkflowRun` on a DURABLE_FN run, and versions with a `codeBundle`) on
15
+ * the `fluidgrids.durable-functions` feature flag, fail closed. A workspace
16
+ * without the flag gets a GraphQL error that the CLI prints as it is; the CLI
17
+ * never decides the flag itself.
18
+ */
19
+ const PRESIGNED_PUT_FIELDS = 'url method headers expiresAt alreadyStored';
20
+ /** A presigned bundle PUT (skipped when `alreadyStored`) and a presigned source PUT. */
21
+ export const CF_PREPARE_WORKFLOW_CODE_UPLOAD = `
22
+ mutation FluidgridsCodePrepareWorkflowCodeUpload($input: PrepareWorkflowCodeUploadInput!) {
23
+ prepareWorkflowCodeUpload(input: $input) {
24
+ uploadId
25
+ bundle { ${PRESIGNED_PUT_FIELDS} }
26
+ source { ${PRESIGNED_PUT_FIELDS} }
27
+ }
28
+ }
29
+ `;
30
+ const CODE_REPLACE_FIELDS = `
31
+ id status buildId previousBuildId verifiedRuns
32
+ violations { runId seq message }
33
+ `;
34
+ /** Hotfix: replace the bundle of an existing version; an asynchronous, replay-verified job. */
35
+ export const CF_REPLACE_WORKFLOW_VERSION_CODE = `
36
+ mutation FluidgridsCodeReplaceWorkflowVersionCode(
37
+ $workflowKey: String!
38
+ $version: String!
39
+ $codeBundle: CodeBundleInput!
40
+ $verifyReplay: Boolean
41
+ ) {
42
+ replaceWorkflowVersionCode(
43
+ workflowKey: $workflowKey
44
+ version: $version
45
+ codeBundle: $codeBundle
46
+ verifyReplay: $verifyReplay
47
+ ) { ${CODE_REPLACE_FIELDS} }
48
+ }
49
+ `;
50
+ /** Poll a hotfix job. */
51
+ export const CF_WORKFLOW_CODE_REPLACE = `
52
+ query FluidgridsCodeWorkflowCodeReplace($id: ID!) {
53
+ workflowCodeReplace(id: $id) { ${CODE_REPLACE_FIELDS} }
54
+ }
55
+ `;
56
+ /** The code bundle a version references, or null for a version without code. */
57
+ export const CF_WORKFLOW_CODE_BUNDLE = `
58
+ query FluidgridsCodeWorkflowCodeBundle($workflowKey: String!, $version: String!) {
59
+ workflowCodeBundle(workflowKey: $workflowKey, version: $version) {
60
+ id buildId language sdkVersion entry exports determinism
61
+ bundleBytes sourceBytes compatibleBuildIds replacedAt createdAt
62
+ }
63
+ }
64
+ `;
65
+ /** Run fields the durable commands print. */
66
+ const DURABLE_RUN_FIELDS = `
67
+ id workflowId workflowKey version status mode triggerNodeId
68
+ executionKind workflowFn taskQueue buildId historyLength parentClosePolicy
69
+ parentRunId rootRunId cancelRequestedAt
70
+ createdAt startedAt completedAt errorMessage errorType
71
+ determinism { failing cause attempts since lastFailureSeq message }
72
+ `;
73
+ /** Start a root durable-function run (DB18). */
74
+ export const CF_START_WORKFLOW = `
75
+ mutation FluidgridsCodeStartWorkflow($input: StartWorkflowInput!) {
76
+ startWorkflow(input: $input) {
77
+ existing
78
+ run { ${DURABLE_RUN_FIELDS} }
79
+ }
80
+ }
81
+ `;
82
+ /** One run with its durable fields. */
83
+ export const CF_DESCRIBE_RUN = `
84
+ query FluidgridsCodeDescribeRun($id: ID!) {
85
+ workflowRun(id: $id) { ${DURABLE_RUN_FIELDS} }
86
+ }
87
+ `;
88
+ /** One page of a run's event history. */
89
+ export const CF_WORKFLOW_RUN_HISTORY = `
90
+ query FluidgridsCodeWorkflowRunHistory($runId: ID!, $after: Int, $limit: Int) {
91
+ workflowRunHistory(runId: $runId, after: $after, limit: $limit) {
92
+ events { runId seq type taskId payload payloadUrl createdAt }
93
+ nextAfter hasMore historyLength historyBytes
94
+ }
95
+ }
96
+ `;
97
+ export const CF_SIGNAL_WORKFLOW_RUN = `
98
+ mutation FluidgridsCodeSignalWorkflowRun(
99
+ $runId: ID!
100
+ $name: String!
101
+ $payload: JSON
102
+ $idempotencyKey: String
103
+ ) {
104
+ signalWorkflowRun(runId: $runId, name: $name, payload: $payload, idempotencyKey: $idempotencyKey) {
105
+ accepted delivered buffered forwardedToRunId seq duplicate
106
+ }
107
+ }
108
+ `;
109
+ /** Terminate a run of either kind; no code runs (durable) and no node runs (graph). */
110
+ export const CF_TERMINATE_WORKFLOW_RUN = `
111
+ mutation FluidgridsCodeTerminateWorkflowRun($runId: ID!, $reason: String) {
112
+ terminateWorkflowRun(runId: $runId, reason: $reason) { id status completedAt errorMessage }
113
+ }
114
+ `;
115
+ /** The built-in `__stack_trace` / `__enhanced_stack_trace` query, replayed in the service. */
116
+ export const CF_WORKFLOW_RUN_STACK_TRACE = `
117
+ query FluidgridsCodeWorkflowRunStackTrace($runId: ID!, $enhanced: Boolean) {
118
+ workflowRunStackTrace(runId: $runId, enhanced: $enhanced) { trace enhanced }
119
+ }
120
+ `;
121
+ /** Runs of one workflow key (newest first), for `push --hotfix --replay-sample`. */
122
+ export const CF_LIST_RUNS = `
123
+ query FluidgridsCodeListRuns($input: ListWorkflowRunsInput!) {
124
+ workflowRuns(input: $input) {
125
+ items { id workflowKey version status executionKind }
126
+ hasMore
127
+ }
128
+ }
129
+ `;
130
+ /** Trigger a stored version from one of its trigger nodes (`fluidgrids run`). */
131
+ export const CF_TRIGGER_WORKFLOW = `
132
+ mutation FluidgridsCodeTriggerWorkflow($input: TriggerWorkflowInput!) {
133
+ triggerWorkflow(input: $input) { runId status workflowKey version triggerNodeId }
134
+ }
135
+ `;
136
+ //# sourceMappingURL=durable-operations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"durable-operations.js","sourceRoot":"","sources":["../../src/code-first/durable-operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,oBAAoB,GAAG,4CAA4C,CAAC;AAE1E,wFAAwF;AACxF,MAAM,CAAC,MAAM,+BAA+B,GAAG;;;;iBAI9B,oBAAoB;iBACpB,oBAAoB;;;CAGpC,CAAC;AAEF,MAAM,mBAAmB,GAAG;;;CAG3B,CAAC;AAEF,+FAA+F;AAC/F,MAAM,CAAC,MAAM,gCAAgC,GAAG;;;;;;;;;;;;UAYtC,mBAAmB;;CAE5B,CAAC;AAEF,yBAAyB;AACzB,MAAM,CAAC,MAAM,wBAAwB,GAAG;;qCAEH,mBAAmB;;CAEvD,CAAC;AAEF,gFAAgF;AAChF,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;CAOtC,CAAC;AAEF,6CAA6C;AAC7C,MAAM,kBAAkB,GAAG;;;;;;CAM1B,CAAC;AAEF,gDAAgD;AAChD,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;cAInB,kBAAkB;;;CAG/B,CAAC;AAEF,uCAAuC;AACvC,MAAM,CAAC,MAAM,eAAe,GAAG;;6BAEF,kBAAkB;;CAE9C,CAAC;AAEF,yCAAyC;AACzC,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;CAOtC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;;;;;CAWrC,CAAC;AAEF,uFAAuF;AACvF,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;CAIxC,CAAC;AAEF,8FAA8F;AAC9F,MAAM,CAAC,MAAM,2BAA2B,GAAG;;;;CAI1C,CAAC;AAEF,oFAAoF;AACpF,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;CAO3B,CAAC;AAEF,iFAAiF;AACjF,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;CAIlC,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * A durable run's history as a `fluidgrids.history` file (C-HIST,
3
+ * `schema/history-file.schema.json` of `@fluidgrids/workflows`): every page of
4
+ * `workflowRunHistory`, with offloaded payloads fetched through their
5
+ * presigned `payloadUrl` and inlined, so the file replays on its own.
6
+ */
7
+ import { type HistoryFile, type RunEventRecord } from '@fluidgrids/workflows/history';
8
+ import { type DurableRun } from './api.js';
9
+ import { type CommandEnv } from './shared.js';
10
+ /** Events per `workflowRunHistory` page (the service's default and maximum). */
11
+ export declare const HISTORY_PAGE_SIZE = 500;
12
+ /** Largest offloaded payload the CLI reads (the service's resolved-bytes cap). */
13
+ export declare const MAX_OFFLOADED_PAYLOAD_BYTES: number;
14
+ export interface FetchedHistory {
15
+ run: DurableRun;
16
+ file: HistoryFile;
17
+ historyBytes: number;
18
+ }
19
+ /** The run's events, every page, offloaded payloads inlined. */
20
+ export declare function fetchRunEvents(env: CommandEnv, runId: string): Promise<{
21
+ events: RunEventRecord[];
22
+ historyBytes: number;
23
+ }>;
24
+ /** Refuse a run that has no event history (a canvas run). */
25
+ export declare function assertDurable(run: DurableRun): void;
26
+ /** Download a durable run's history as a validated history file. */
27
+ export declare function fetchHistory(env: CommandEnv, runId: string): Promise<FetchedHistory>;
28
+ /** Read and validate a history file from disk. */
29
+ export declare function parseHistoryText(text: string, path: string): HistoryFile;
30
+ //# sourceMappingURL=history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../src/code-first/history.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,cAAc,EAEpB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAa,KAAK,UAAU,EAAuB,MAAM,UAAU,CAAC;AAE3E,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAE7D,gFAAgF;AAChF,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC,kFAAkF;AAClF,eAAO,MAAM,2BAA2B,QAAmB,CAAC;AAE5D,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,EAAE,WAAW,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB;AAoDD,gEAAgE;AAChE,wBAAsB,cAAc,CAClC,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;IAAE,MAAM,EAAE,cAAc,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC,CA2B7D;AAED,6DAA6D;AAC7D,wBAAgB,aAAa,CAAC,GAAG,EAAE,UAAU,GAAG,IAAI,CAOnD;AAED,oEAAoE;AACpE,wBAAsB,YAAY,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAmC1F;AAED,kDAAkD;AAClD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAWxE"}
@@ -0,0 +1,139 @@
1
+ /**
2
+ * A durable run's history as a `fluidgrids.history` file (C-HIST,
3
+ * `schema/history-file.schema.json` of `@fluidgrids/workflows`): every page of
4
+ * `workflowRunHistory`, with offloaded payloads fetched through their
5
+ * presigned `payloadUrl` and inlined, so the file replays on its own.
6
+ */
7
+ import { CliUserError } from '@burdenoff/cli-sdk/core';
8
+ import { createHistoryFile, HistoryFileError, parseHistoryFile, } from '@fluidgrids/workflows/history';
9
+ import { MAX_PAGES } from './api.js';
10
+ import { presignedUrl, readCapped } from './presigned.js';
11
+ import { describeError } from './shared.js';
12
+ /** Events per `workflowRunHistory` page (the service's default and maximum). */
13
+ export const HISTORY_PAGE_SIZE = 500;
14
+ /** Largest offloaded payload the CLI reads (the service's resolved-bytes cap). */
15
+ export const MAX_OFFLOADED_PAYLOAD_BYTES = 64 * 1024 * 1024;
16
+ function isRecord(value) {
17
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
18
+ }
19
+ /** A JSON object from a parsed value; the history contract has object payloads only. */
20
+ function objectPayload(value, where) {
21
+ if (value === null || value === undefined)
22
+ return {};
23
+ if (!isRecord(value))
24
+ throw new CliUserError(`${where}: the payload is not a JSON object.`);
25
+ // Parsed JSON (from the gateway or the payload object) is JSON by construction.
26
+ return value;
27
+ }
28
+ async function offloadedPayload(env, event, runId) {
29
+ const where = `Run ${runId} event ${event.seq}`;
30
+ const raw = event.payloadUrl ?? '';
31
+ presignedUrl(raw, `offloaded payload of event ${event.seq}`);
32
+ let response;
33
+ try {
34
+ response = await env.fetch(raw, { method: 'GET' });
35
+ }
36
+ catch (error) {
37
+ // The presigned URL carries a signature; it is never printed.
38
+ throw new CliUserError(`${where}: fetching the offloaded payload failed: ${describeError(error)}`);
39
+ }
40
+ if (!response.ok) {
41
+ throw new CliUserError(`${where}: fetching the offloaded payload failed with HTTP ${response.status}.`);
42
+ }
43
+ const tooLarge = () => new CliUserError(`${where}: the offloaded payload is larger than the history cap (${MAX_OFFLOADED_PAYLOAD_BYTES} bytes).`);
44
+ const text = new TextDecoder().decode(await readCapped(response, MAX_OFFLOADED_PAYLOAD_BYTES, tooLarge));
45
+ let parsed;
46
+ try {
47
+ parsed = JSON.parse(text);
48
+ }
49
+ catch {
50
+ throw new CliUserError(`${where}: the offloaded payload is not JSON.`);
51
+ }
52
+ return objectPayload(parsed, where);
53
+ }
54
+ /** The run's events, every page, offloaded payloads inlined. */
55
+ export async function fetchRunEvents(env, runId) {
56
+ const events = [];
57
+ let after = 0;
58
+ let historyBytes = 0;
59
+ for (let page = 0; page < MAX_PAGES; page++) {
60
+ const result = await env.api.runHistoryPage(runId, after, HISTORY_PAGE_SIZE);
61
+ historyBytes = result.historyBytes;
62
+ for (const event of result.events) {
63
+ const payload = event.payloadUrl
64
+ ? await offloadedPayload(env, event, runId)
65
+ : objectPayload(event.payload, `Run ${runId} event ${event.seq}`);
66
+ events.push({
67
+ seq: event.seq,
68
+ // Validated against the event enum by parseHistoryFile below.
69
+ type: event.type,
70
+ ...(event.taskId ? { taskId: event.taskId } : {}),
71
+ payload,
72
+ createdAt: event.createdAt,
73
+ });
74
+ }
75
+ const last = result.events[result.events.length - 1];
76
+ if (!result.hasMore || !last)
77
+ return { events, historyBytes };
78
+ after = result.nextAfter ?? last.seq;
79
+ }
80
+ throw new CliUserError(`The history of run ${runId} did not end after ${MAX_PAGES} pages; refusing to continue.`);
81
+ }
82
+ /** Refuse a run that has no event history (a canvas run). */
83
+ export function assertDurable(run) {
84
+ if (run.executionKind !== 'DURABLE_FN') {
85
+ throw new CliUserError(`Run ${run.id} is a ${run.executionKind} run; only durable-function runs have an event history.`, { hint: `Use \`fluidgrids runs logs ${run.id}\` for a canvas run.` });
86
+ }
87
+ }
88
+ /** Download a durable run's history as a validated history file. */
89
+ export async function fetchHistory(env, runId) {
90
+ const run = await env.api.describeRun(runId);
91
+ assertDurable(run);
92
+ const { events, historyBytes } = await fetchRunEvents(env, runId);
93
+ const started = events[0]?.type === 'WORKFLOW_STARTED' ? events[0].payload : undefined;
94
+ const workflowFn = run.workflowFn ??
95
+ (started && typeof started['workflowFn'] === 'string' ? started['workflowFn'] : undefined);
96
+ if (!workflowFn) {
97
+ throw new CliUserError(`Run ${runId} records no workflow function.`);
98
+ }
99
+ const workspaceId = env.ctx.auth.read()?.workspaceId ?? 'unknown';
100
+ const file = createHistoryFile(workflowFn, events, {
101
+ name: run.id,
102
+ info: {
103
+ runId: run.id,
104
+ workspaceId,
105
+ workflowKey: run.workflowKey,
106
+ version: run.version,
107
+ ...(run.buildId ? { buildId: run.buildId } : {}),
108
+ ...(run.taskQueue ? { taskQueue: run.taskQueue } : {}),
109
+ parentRunId: run.parentRunId,
110
+ rootRunId: run.rootRunId,
111
+ },
112
+ });
113
+ try {
114
+ return { run, file: parseHistoryFile(file), historyBytes };
115
+ }
116
+ catch (error) {
117
+ if (error instanceof HistoryFileError) {
118
+ throw new CliUserError(`The history of run ${runId} is not a valid history file.`, {
119
+ hint: [error.message, ...error.issues].join('\n'),
120
+ });
121
+ }
122
+ throw error;
123
+ }
124
+ }
125
+ /** Read and validate a history file from disk. */
126
+ export function parseHistoryText(text, path) {
127
+ try {
128
+ return parseHistoryFile(text);
129
+ }
130
+ catch (error) {
131
+ if (error instanceof HistoryFileError) {
132
+ throw new CliUserError(`${path} is not a valid history file: ${error.message}`, {
133
+ ...(error.issues.length > 0 ? { hint: error.issues.join('\n') } : {}),
134
+ });
135
+ }
136
+ throw error;
137
+ }
138
+ }
139
+ //# sourceMappingURL=history.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"history.js","sourceRoot":"","sources":["../../src/code-first/history.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,GAIjB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,SAAS,EAAwC,MAAM,UAAU,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAmB,MAAM,aAAa,CAAC;AAE7D,gFAAgF;AAChF,MAA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G,CAAC,SAAS;SACzB;KACF,CAAC,CAAC;IACH,IAAI,CAAC;QACH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,gBAAgB,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,CAAC;IAC7D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,gBAAgB,EAAE,CAAC;YACtC,MAAM,IAAI,YAAY,CAAC,sBAAsB,KAAK,+BAA+B,EAAE;gBACjF,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;aAClD,CAAC,CAAC;QACL,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED,kDAAkD;AAClD,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,IAAY;IACzD,IAAI,CAAC;QACH,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,gBAAgB,EAAE,CAAC;YACtC,MAAM,IAAI,YAAY,CAAC,GAAG,IAAI,iCAAiC,KAAK,CAAC,OAAO,EAAE,EAAE;gBAC9E,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACtE,CAAC,CAAC;QACL,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The project files a set of TypeScript entry modules reaches through
3
+ * relative imports, found by a static scan of the import statements.
4
+ *
5
+ * A durable project's code bundle is built from exactly these files (plus the
6
+ * sidecars), and the source archive carries exactly these files, so the
7
+ * service's rebuild (`buildBundle` over the archive with the SDK's default
8
+ * entries) sees the same modules the CLI bundled. Files no workflow imports,
9
+ * such as co-located `*.spec.ts` tests or Node-only scripts under
10
+ * `activities/`, stay out of both.
11
+ *
12
+ * The scan errs on the side of including a file: a commented-out import adds
13
+ * a file the bundle does not need, which is harmless. A missed import cannot
14
+ * produce a wrong bundle silently: the bundler then fails to resolve it.
15
+ */
16
+ /** The relative specifiers a module imports at runtime (type-only imports excluded). */
17
+ export declare function relativeImports(source: string): string[];
18
+ /** The project file a relative specifier names, the way the bundler resolves it. */
19
+ export declare function resolveRelative(importer: string, specifier: string, files: ReadonlySet<string>): string | undefined;
20
+ /** Every file in `sources` the entries reach, the entries included. */
21
+ export declare function importClosure(sources: ReadonlyMap<string, string>, entries: readonly string[]): Set<string>;
22
+ //# sourceMappingURL=imports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imports.d.ts","sourceRoot":"","sources":["../../src/code-first/imports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAWH,wFAAwF;AACxF,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAaxD;AAED,oFAAoF;AACpF,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,GACzB,MAAM,GAAG,SAAS,CAMpB;AAED,uEAAuE;AACvE,wBAAgB,aAAa,CAC3B,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,OAAO,EAAE,SAAS,MAAM,EAAE,GACzB,GAAG,CAAC,MAAM,CAAC,CAab"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * The project files a set of TypeScript entry modules reaches through
3
+ * relative imports, found by a static scan of the import statements.
4
+ *
5
+ * A durable project's code bundle is built from exactly these files (plus the
6
+ * sidecars), and the source archive carries exactly these files, so the
7
+ * service's rebuild (`buildBundle` over the archive with the SDK's default
8
+ * entries) sees the same modules the CLI bundled. Files no workflow imports,
9
+ * such as co-located `*.spec.ts` tests or Node-only scripts under
10
+ * `activities/`, stay out of both.
11
+ *
12
+ * The scan errs on the side of including a file: a commented-out import adds
13
+ * a file the bundle does not need, which is harmless. A missed import cannot
14
+ * produce a wrong bundle silently: the bundler then fails to resolve it.
15
+ */
16
+ import { posix } from 'path';
17
+ /** `import … from '…'` and `export … from '…'`, with an optional `type` modifier. */
18
+ const FROM_CLAUSE = /\b(import|export)(\s+type\b)?[^'"`;]*?\bfrom\s*(['"])([^'"\r\n]+)\3/g;
19
+ /** `import '…'` (side effects only). */
20
+ const BARE_IMPORT = /\bimport\s*(['"])([^'"\r\n]+)\1/g;
21
+ /** `import('…')`. */
22
+ const DYNAMIC_IMPORT = /\bimport\s*\(\s*(['"])([^'"\r\n]+)\1\s*\)/g;
23
+ /** The relative specifiers a module imports at runtime (type-only imports excluded). */
24
+ export function relativeImports(source) {
25
+ const found = [];
26
+ for (const match of source.matchAll(FROM_CLAUSE)) {
27
+ const specifier = match[4];
28
+ if (match[2] === undefined && specifier !== undefined)
29
+ found.push(specifier);
30
+ }
31
+ for (const match of source.matchAll(BARE_IMPORT)) {
32
+ if (match[2] !== undefined)
33
+ found.push(match[2]);
34
+ }
35
+ for (const match of source.matchAll(DYNAMIC_IMPORT)) {
36
+ if (match[2] !== undefined)
37
+ found.push(match[2]);
38
+ }
39
+ return found.filter((specifier) => specifier.startsWith('./') || specifier.startsWith('../'));
40
+ }
41
+ /** The project file a relative specifier names, the way the bundler resolves it. */
42
+ export function resolveRelative(importer, specifier, files) {
43
+ const base = posix.normalize(posix.join(posix.dirname(importer), specifier));
44
+ const candidates = [base];
45
+ if (/\.m?js$/.test(base))
46
+ candidates.push(base.replace(/\.(m?)js$/, '.$1ts'));
47
+ candidates.push(`${base}.ts`, `${base}/index.ts`);
48
+ return candidates.find((candidate) => files.has(candidate));
49
+ }
50
+ /** Every file in `sources` the entries reach, the entries included. */
51
+ export function importClosure(sources, entries) {
52
+ const paths = new Set(sources.keys());
53
+ const reached = new Set();
54
+ const pending = entries.filter((entry) => paths.has(entry));
55
+ for (let path = pending.pop(); path !== undefined; path = pending.pop()) {
56
+ if (reached.has(path))
57
+ continue;
58
+ reached.add(path);
59
+ for (const specifier of relativeImports(sources.get(path) ?? '')) {
60
+ const target = resolveRelative(path, specifier, paths);
61
+ if (target !== undefined && !reached.has(target))
62
+ pending.push(target);
63
+ }
64
+ }
65
+ return reached;
66
+ }
67
+ //# sourceMappingURL=imports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imports.js","sourceRoot":"","sources":["../../src/code-first/imports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAE7B,qFAAqF;AACrF,MAAM,WAAW,GAAG,sEAAsE,CAAC;AAC3F,wCAAwC;AACxC,MAAM,WAAW,GAAG,kCAAkC,CAAC;AACvD,qBAAqB;AACrB,MAAM,cAAc,GAAG,4CAA4C,CAAC;AAEpE,wFAAwF;AACxF,MAAM,UAAU,eAAe,CAAC,MAAc;IAC5C,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QACjD,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAC3B,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,IAAI,SAAS,KAAK,SAAS;YAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/E,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QACjD,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS;YAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACnD,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,QAAQ,CAA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AC,KAAK,CAAC,CAAC,CAAC;IAC5D,KAAK,IAAI,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,KAAK,SAAS,EAAE,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;QACxE,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,SAAS;QAChC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClB,KAAK,MAAM,SAAS,IAAI,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;YACjE,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;YACvD,IAAI,MAAM,KAAK,SAAS,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;gBAAE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1,7 +1,10 @@
1
1
  /**
2
2
  * The code-first commands (spec 07 §7, Phase A): `init`, `codegen`, `pull`,
3
3
  * `push`, `diff`, `validate`, plus `import` (a new workflow from one file,
4
- * through the service's import path) and `interface`.
4
+ * through the service's import path) and `interface`; and the durable-function
5
+ * commands of Phase B (`push --hotfix`, `runs start|describe|history|signal|
6
+ * terminate|stack`, `history`, `signal`, `replay`, `test`, `run`,
7
+ * `versions list`).
5
8
  *
6
9
  * Product-local rather than in `@burdenoff/cli-sdk`: they depend on
7
10
  * `@fluidgrids/workflows` (esbuild, Prettier, QuickJS), which the other product
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/code-first/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAczD,QAAA,MAAM,eAAe,EAAE,SAgBtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/code-first/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAezD,QAAA,MAAM,eAAe,EAAE,SAiBtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,14 +1,17 @@
1
1
  /**
2
2
  * The code-first commands (spec 07 §7, Phase A): `init`, `codegen`, `pull`,
3
3
  * `push`, `diff`, `validate`, plus `import` (a new workflow from one file,
4
- * through the service's import path) and `interface`.
4
+ * through the service's import path) and `interface`; and the durable-function
5
+ * commands of Phase B (`push --hotfix`, `runs start|describe|history|signal|
6
+ * terminate|stack`, `history`, `signal`, `replay`, `test`, `run`,
7
+ * `versions list`).
5
8
  *
6
9
  * Product-local rather than in `@burdenoff/cli-sdk`: they depend on
7
10
  * `@fluidgrids/workflows` (esbuild, Prettier, QuickJS), which the other product
8
11
  * CLIs built on cli-sdk must not pull in. The implementations load on first
9
12
  * use (see `register.ts`), so the other commands do not pay for them.
10
13
  */
11
- import { registerCodegen, registerDiff, registerImport, registerInit, registerInterface, registerPull, registerPush, registerValidate, } from './register.js';
14
+ import { registerCodegen, registerDiff, registerDurable, registerImport, registerInit, registerInterface, registerPull, registerPush, registerValidate, } from './register.js';
12
15
  import { createCommandEnv } from './shared.js';
13
16
  const codeFirstModule = {
14
17
  id: 'fluidgrids-code-first',
@@ -25,6 +28,7 @@ const codeFirstModule = {
25
28
  registerValidate(program, env);
26
29
  registerImport(program, env);
27
30
  registerInterface(program, env);
31
+ registerDurable(program, env);
28
32
  },
29
33
  };
30
34
  export default codeFirstModule;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/code-first/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EACL,eAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,iBAA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,EAAE,YAAY,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,GAAG;QACnB,MAAM,GAAG,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;QAClC,YAAY,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC3B,eAAe,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC9B,YAAY,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC3B,YAAY,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC3B,YAAY,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC3B,gBAAgB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC/B,cAAc,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC7B,iBAAiB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAChC,eAAe,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IAChC,CAAC;CACF,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -7,14 +7,29 @@
7
7
  * - JSON: canvas workflows kept as the export envelope are read as they are.
8
8
  */
9
9
  import type { ConnectionRef } from '@fluidgrids/workflows/ir';
10
- import { type Project, type WorkflowFormat } from './project.js';
10
+ import { type VendoredDeps } from '@fluidgrids/workflows/roundtrip';
11
+ import { type Project, type ProjectFile, type WorkflowFormat } from './project.js';
11
12
  export interface LocalWorkflow {
12
13
  key: string;
13
14
  format: WorkflowFormat;
14
15
  /** Project-relative file the workflow is defined in. */
15
16
  path: string;
16
17
  definition: Record<string, unknown>;
18
+ /** True when the definition runs code (a `code` block: tier-2 functions or `wf.codeWorkflow`). */
19
+ durable: boolean;
17
20
  }
21
+ /**
22
+ * A finding in durable-function sources that `push` refuses: `durable.phaseC`
23
+ * (a feature that arrives in Phase C) or `durable.activityTypeNotAllowed`.
24
+ */
25
+ export interface DurableIssue {
26
+ code: string;
27
+ message: string;
28
+ module: string;
29
+ key?: string;
30
+ }
31
+ /** Largest code bundle the service accepts (C-S3, spec 01 §5). */
32
+ export declare const MAX_BUNDLE_BYTES: number;
18
33
  export interface LoweredProject {
19
34
  /** `buildId` of the TypeScript bundle, when the project has TypeScript workflows. */
20
35
  buildId?: string;
@@ -23,6 +38,14 @@ export interface LoweredProject {
23
38
  workflows: LocalWorkflow[];
24
39
  /** Notes about the lowering (for example SDK disagreements), one line each. */
25
40
  warnings: string[];
41
+ /** The TypeScript bundle (one ES module that serves every code workflow of the push). */
42
+ bundle?: string;
43
+ /** The project files the bundle was built from, by path (the source archive's `files`). */
44
+ sourceFiles?: Record<string, string>;
45
+ /** Pure-ESM packages vendored from the project's `node_modules`. */
46
+ vendored?: VendoredDeps;
47
+ /** Durable-function findings; `push` refuses a project that has any. */
48
+ issues: DurableIssue[];
26
49
  }
27
50
  export interface LowerProjectOptions {
28
51
  /** How connection names resolve. A function is called once per name. */
@@ -36,6 +59,22 @@ export interface LowerProjectOptions {
36
59
  * anything else is rethrown as it is.
37
60
  */
38
61
  export declare function lowerFailure(error: unknown, what: string): unknown;
62
+ /** True when a definition carries a `code` block, so a version of it needs a code bundle. */
63
+ export declare function runsCode(definition: Record<string, unknown>): boolean;
64
+ /**
65
+ * The project's runtime dependencies, vendored for the bundle: only when
66
+ * `package.json` lists `dependencies` besides the SDK itself (which the bundle
67
+ * embeds). Returns undefined when there is nothing to vendor.
68
+ */
69
+ export declare function vendorProjectDependencies(root: string): VendoredDeps | undefined;
70
+ /**
71
+ * The files a durable project's bundle and source archive are built from: the
72
+ * workflow modules, the TypeScript files they import (transitively) and the
73
+ * sidecars. A co-located `*.spec.ts` test, or an `activities/` module no
74
+ * workflow imports, is neither bundled nor archived, so the service's rebuild
75
+ * with the SDK's default entries sees exactly the modules the CLI bundled.
76
+ */
77
+ export declare function durableBundleFiles(files: readonly ProjectFile[], entries: readonly string[]): ProjectFile[];
39
78
  export declare function lowerProject(project: Project, options: LowerProjectOptions & {
40
79
  connectionNames: readonly string[];
41
80
  }): Promise<LoweredProject>;
@@ -1 +1 @@
1
- {"version":3,"file":"lowering.d.ts","sourceRoot":"","sources":["../../src/code-first/lowering.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAK9D,OAAO,EAML,KAAK,OAAO,EACZ,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAOtB,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,cAAc,CAAC;IACvB,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,cAAc;IAC7B,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,wEAAwE;IACxE,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,aAAa,GAAG,SAAS,CAAC;IACzD,gDAAgD;IAChD,iBAAiB,EAAE,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,KAAK,MAAM,EAAE,CAAC;CAC3D;AAMD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAKlE;AA8CD,wBAAsB,YAAY,CAChC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,mBAAmB,GAAG;IAAE,eAAe,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GACpE,OAAO,CAAC,cAAc,CAAC,CAuEzB"}
1
+ {"version":3,"file":"lowering.d.ts","sourceRoot":"","sources":["../../src/code-first/lowering.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EA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