@tomflow/proflow-execution-runtime 0.1.14 → 0.1.16

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.
@@ -6,7 +6,7 @@ export declare const behaviorAdapter: {
6
6
  ok: true;
7
7
  status: "SUCCEEDED";
8
8
  moduleRef: "execution-runtime";
9
- moduleVersion: "0.1.14";
9
+ moduleVersion: "0.1.16";
10
10
  data: {
11
11
  endpoint: string;
12
12
  transportCredentialFile: string;
@@ -23,7 +23,7 @@ export declare const behaviorAdapter: {
23
23
  readonly ok: true;
24
24
  readonly status: "SUCCEEDED";
25
25
  readonly moduleRef: "execution-runtime";
26
- readonly moduleVersion: "0.1.14";
26
+ readonly moduleVersion: "0.1.16";
27
27
  };
28
28
  observedEffects: ("Persists execution state, output references and evidence in WAL SQLite" | "Runs the single backend Execution Runtime service")[];
29
29
  }>;
@@ -33,12 +33,12 @@ export declare const behaviorAdapter: {
33
33
  ok: true;
34
34
  status: "SUCCEEDED";
35
35
  moduleRef: "execution-runtime";
36
- moduleVersion: "0.1.14";
36
+ moduleVersion: "0.1.16";
37
37
  data: {
38
- setupStatus: "BLOCKED" | "READY";
38
+ setupStatus: "READY";
39
39
  runtimeStatus: "RUNNING" | "STOPPED";
40
40
  issues?: {
41
- scope: "SETUP";
41
+ scope: "RUNTIME";
42
42
  code: string;
43
43
  message: string;
44
44
  relatedModuleRefs: string[];
@@ -50,65 +50,17 @@ export declare const behaviorAdapter: {
50
50
  }>;
51
51
  readonly setup: (context: ModuleCommandContext) => Promise<{
52
52
  result: {
53
- readonly contract: "deployment.result.v1";
54
- readonly ok: true;
55
- readonly status: "SUCCEEDED";
56
- readonly moduleRef: "execution-runtime";
57
- readonly moduleVersion: "0.1.14";
58
- } | {
59
53
  contract: "deployment.result.v1";
54
+ ok: true;
55
+ status: "SUCCEEDED";
60
56
  moduleRef: "execution-runtime";
61
- moduleVersion: "0.1.14";
62
- ok: false;
63
- status: "FAILED";
64
- error: {
65
- code: "SETUP_FAILED" | "START_FAILED" | "STOP_FAILED";
66
- message: string;
67
- retryable: boolean;
68
- };
57
+ moduleVersion: "0.1.16";
69
58
  data: {
70
- readonly steps: readonly [{
71
- readonly id: "STEP-EXECUTION-RUNTIME-01";
72
- readonly title: "等待 Platform Host";
73
- readonly state: "BLOCKED";
74
- readonly responsible: "EXTERNAL";
75
- readonly execution: {
76
- readonly interactive: "platform setup --module platform-host";
77
- readonly nonInteractive: "platform setup --module platform-host";
78
- };
79
- readonly requiredInputs: readonly [];
80
- readonly verify: "platform status";
81
- readonly successCondition: "配置状态变为“已就绪”";
82
- readonly blockedReason: "platform-host 尚未发布 endpoint 与 identityTokenFile";
83
- }, {
84
- readonly id: "STEP-EXECUTION-RUNTIME-02";
85
- readonly title: "等待 Model Runtime";
86
- readonly description: "Execution 的模型决策入口尚不可用。";
87
- readonly state: "BLOCKED";
88
- readonly responsible: "EXTERNAL";
89
- readonly execution: {
90
- readonly interactive: "platform setup --module model-runtime";
91
- readonly nonInteractive: "platform setup --module model-runtime";
92
- };
93
- readonly requiredInputs: readonly [];
94
- readonly verify: "platform status";
95
- readonly successCondition: "model-runtime 已发布 endpoint 与 transportCredentialFile";
96
- readonly blockedReason: "model-runtime 尚未就绪";
97
- }, {
98
- readonly id: "STEP-EXECUTION-RUNTIME-03";
99
- readonly title: "等待 Browser Executor";
100
- readonly description: "Browser Effect 配置尚不可用。";
101
- readonly state: "BLOCKED";
102
- readonly responsible: "EXTERNAL";
103
- readonly execution: {
104
- readonly interactive: "platform setup --module execution-browser-extension";
105
- readonly nonInteractive: "platform setup --module execution-browser-extension";
106
- };
107
- readonly requiredInputs: readonly [];
108
- readonly verify: "platform status";
109
- readonly successCondition: "execution-browser-extension 已发布 browserExecutorConfigPath";
110
- readonly blockedReason: "execution-browser-extension 尚未就绪";
111
- }];
59
+ endpoint: string;
60
+ transportCredentialFile: string;
61
+ databasePath: string;
62
+ projectRoot: string;
63
+ artifactRoot: string;
112
64
  };
113
65
  };
114
66
  observedEffects: never[];
@@ -119,7 +71,7 @@ export declare const behaviorAdapter: {
119
71
  ok: true;
120
72
  status: "SUCCEEDED";
121
73
  moduleRef: "execution-runtime";
122
- moduleVersion: "0.1.14";
74
+ moduleVersion: "0.1.16";
123
75
  data: {
124
76
  docs: string;
125
77
  };
@@ -132,7 +84,7 @@ export declare const behaviorAdapter: {
132
84
  ok: true;
133
85
  status: "SUCCEEDED";
134
86
  moduleRef: "execution-runtime";
135
- moduleVersion: "0.1.14";
87
+ moduleVersion: "0.1.16";
136
88
  data: unknown;
137
89
  };
138
90
  observedEffects: ("Persists execution state, output references and evidence in WAL SQLite" | "Runs the single backend Execution Runtime service")[];
@@ -140,7 +92,7 @@ export declare const behaviorAdapter: {
140
92
  result: {
141
93
  contract: "deployment.result.v1";
142
94
  moduleRef: "execution-runtime";
143
- moduleVersion: "0.1.14";
95
+ moduleVersion: "0.1.16";
144
96
  ok: false;
145
97
  status: "FAILED";
146
98
  error: {
@@ -157,7 +109,7 @@ export declare const behaviorAdapter: {
157
109
  readonly ok: true;
158
110
  readonly status: "SUCCEEDED";
159
111
  readonly moduleRef: "execution-runtime";
160
- readonly moduleVersion: "0.1.14";
112
+ readonly moduleVersion: "0.1.16";
161
113
  };
162
114
  observedEffects: ("Persists execution state, output references and evidence in WAL SQLite" | "Runs the single backend Execution Runtime service")[];
163
115
  } | {
@@ -166,11 +118,11 @@ export declare const behaviorAdapter: {
166
118
  readonly ok: true;
167
119
  readonly status: "SUCCEEDED";
168
120
  readonly moduleRef: "execution-runtime";
169
- readonly moduleVersion: "0.1.14";
121
+ readonly moduleVersion: "0.1.16";
170
122
  } | {
171
123
  contract: "deployment.result.v1";
172
124
  moduleRef: "execution-runtime";
173
- moduleVersion: "0.1.14";
125
+ moduleVersion: "0.1.16";
174
126
  ok: false;
175
127
  status: "FAILED";
176
128
  error: {
@@ -11,54 +11,6 @@ const base = {
11
11
  moduleRef: descriptor.moduleRef,
12
12
  moduleVersion: descriptor.moduleVersion,
13
13
  };
14
- const blockedSetupPlan = {
15
- steps: [
16
- {
17
- id: "STEP-EXECUTION-RUNTIME-01",
18
- title: "等待 Platform Host",
19
- state: "BLOCKED",
20
- responsible: "EXTERNAL",
21
- execution: {
22
- interactive: "platform setup --module platform-host",
23
- nonInteractive: "platform setup --module platform-host",
24
- },
25
- requiredInputs: [],
26
- verify: "platform status",
27
- successCondition: "配置状态变为“已就绪”",
28
- blockedReason: "platform-host 尚未发布 endpoint 与 identityTokenFile",
29
- },
30
- {
31
- id: "STEP-EXECUTION-RUNTIME-02",
32
- title: "等待 Model Runtime",
33
- description: "Execution 的模型决策入口尚不可用。",
34
- state: "BLOCKED",
35
- responsible: "EXTERNAL",
36
- execution: {
37
- interactive: "platform setup --module model-runtime",
38
- nonInteractive: "platform setup --module model-runtime",
39
- },
40
- requiredInputs: [],
41
- verify: "platform status",
42
- successCondition: "model-runtime 已发布 endpoint 与 transportCredentialFile",
43
- blockedReason: "model-runtime 尚未就绪",
44
- },
45
- {
46
- id: "STEP-EXECUTION-RUNTIME-03",
47
- title: "等待 Browser Executor",
48
- description: "Browser Effect 配置尚不可用。",
49
- state: "BLOCKED",
50
- responsible: "EXTERNAL",
51
- execution: {
52
- interactive: "platform setup --module execution-browser-extension",
53
- nonInteractive: "platform setup --module execution-browser-extension",
54
- },
55
- requiredInputs: [],
56
- verify: "platform status",
57
- successCondition: "execution-browser-extension 已发布 browserExecutorConfigPath",
58
- blockedReason: "execution-browser-extension 尚未就绪",
59
- },
60
- ],
61
- };
62
14
  const key = (context) => resolve(context.workspaceRoot);
63
15
  const factString = (facts, name) => (typeof facts?.[name] === "string" ? String(facts[name]) : undefined);
64
16
  async function ownFacts(context) {
@@ -75,6 +27,27 @@ async function ownFacts(context) {
75
27
  await writeModuleSharedFacts(context, descriptor.moduleRef, facts);
76
28
  return facts;
77
29
  }
30
+ async function readOwnFacts(context) {
31
+ const facts = await readModuleSharedFacts(context, descriptor.moduleRef);
32
+ const endpoint = factString(facts, "endpoint");
33
+ const transportCredentialFile = factString(facts, "transportCredentialFile");
34
+ const databasePath = factString(facts, "databasePath");
35
+ const projectRoot = factString(facts, "projectRoot");
36
+ const artifactRoot = factString(facts, "artifactRoot");
37
+ return endpoint &&
38
+ transportCredentialFile &&
39
+ databasePath &&
40
+ projectRoot &&
41
+ artifactRoot
42
+ ? {
43
+ endpoint,
44
+ transportCredentialFile,
45
+ databasePath,
46
+ projectRoot,
47
+ artifactRoot,
48
+ }
49
+ : undefined;
50
+ }
78
51
  async function baseDependencies(context) {
79
52
  const host = await readModuleSharedFacts(context, "platform-host");
80
53
  const model = await readModuleSharedFacts(context, "model-runtime");
@@ -106,7 +79,9 @@ async function dependencies(context) {
106
79
  : undefined;
107
80
  }
108
81
  async function running(context) {
109
- const own = await ownFacts(context);
82
+ const own = await readOwnFacts(context);
83
+ if (!own)
84
+ return false;
110
85
  try {
111
86
  const token = (await readFile(own.transportCredentialFile, "utf8")).trim();
112
87
  return (await fetch(`${own.endpoint}/ready`, {
@@ -174,21 +149,20 @@ export const behaviorAdapter = {
174
149
  };
175
150
  },
176
151
  status: async (context) => {
177
- const ready = await dependencies(context);
152
+ const missingRuntimeDependencies = await dependencies(context);
178
153
  return {
179
154
  result: {
180
155
  ...base,
181
156
  data: {
182
- setupStatus: ready ? "READY" : "BLOCKED",
157
+ setupStatus: "READY",
183
158
  runtimeStatus: (await running(context))
184
159
  ? "RUNNING"
185
160
  : "STOPPED",
186
- ...(ready
187
- ? {}
188
- : {
161
+ ...(!missingRuntimeDependencies
162
+ ? {
189
163
  issues: [
190
164
  {
191
- scope: "SETUP",
165
+ scope: "RUNTIME",
192
166
  code: "UPSTREAM_NOT_READY",
193
167
  message: "等待 platform-host、model-runtime 与 execution-browser-extension 发布运行所需信息",
194
168
  relatedModuleRefs: [
@@ -196,22 +170,18 @@ export const behaviorAdapter = {
196
170
  "model-runtime",
197
171
  "execution-browser-extension",
198
172
  ],
199
- nextCommand: "platform setup --module model-runtime",
173
+ nextCommand: "platform setup",
200
174
  },
201
175
  ],
202
- }),
176
+ }
177
+ : {}),
203
178
  },
204
179
  },
205
180
  observedEffects: [],
206
181
  };
207
182
  },
208
183
  setup: async (context) => ({
209
- result: (await dependencies(context))
210
- ? base
211
- : {
212
- ...failed("SETUP_FAILED", "required producer shared facts are unavailable"),
213
- data: blockedSetupPlan,
214
- },
184
+ result: { ...base, data: await ownFacts(context) },
215
185
  observedEffects: [],
216
186
  }),
217
187
  docs: async (_context) => ({
@@ -3,7 +3,7 @@ export declare const descriptor: {
3
3
  readonly contractVersion: "1.0.0";
4
4
  readonly moduleRef: "execution-runtime";
5
5
  readonly packageName: "@tomflow/proflow-execution-runtime";
6
- readonly moduleVersion: "0.1.14";
6
+ readonly moduleVersion: "0.1.16";
7
7
  readonly kind: "service";
8
8
  readonly templateVersion: "1.0.0";
9
9
  readonly platformCompatibility: ">=1.0.0 <2.0.0";
@@ -3,7 +3,7 @@ export const descriptor = {
3
3
  contractVersion: "1.0.0",
4
4
  moduleRef: "execution-runtime",
5
5
  packageName: "@tomflow/proflow-execution-runtime",
6
- moduleVersion: "0.1.14",
6
+ moduleVersion: "0.1.16",
7
7
  kind: "service",
8
8
  templateVersion: "1.0.0",
9
9
  platformCompatibility: ">=1.0.0 <2.0.0",
@@ -131,7 +131,10 @@ export function createExecutionModelDecisionClient(config) {
131
131
  throw new TypeError("modelDecision.endpoint must be loopback HTTP root");
132
132
  if (config.credential && config.credential.length < 32)
133
133
  throw new TypeError("modelDecision credential must contain at least 32 characters");
134
- const timeoutMs = config.timeoutMs ?? 12_000;
134
+ // Normal model-decision flow is Promise-driven. This timeout is only a
135
+ // transport watchdog for an abnormally hung call; it is not forwarded to
136
+ // Model Runtime as a queue or inference-stage budget.
137
+ const watchdogMs = config.timeoutMs ?? 120_000;
135
138
  const authorizationHeaders = config.credential
136
139
  ? { authorization: `Bearer ${config.credential}` }
137
140
  : {};
@@ -139,7 +142,7 @@ export function createExecutionModelDecisionClient(config) {
139
142
  const status = async () => {
140
143
  const response = await fetch(`${endpoint.origin}/status`, {
141
144
  headers: authorizationHeaders,
142
- signal: AbortSignal.timeout(Math.min(timeoutMs, 3_000)),
145
+ signal: AbortSignal.timeout(Math.min(watchdogMs, 3_000)),
143
146
  });
144
147
  if (!response.ok)
145
148
  throw new Error(`MODEL_STATUS_HTTP_${response.status}`);
@@ -183,9 +186,8 @@ export function createExecutionModelDecisionClient(config) {
183
186
  : {}),
184
187
  },
185
188
  payload,
186
- timeoutMs,
187
189
  }),
188
- signal: AbortSignal.timeout(timeoutMs + 1_000),
190
+ signal: AbortSignal.timeout(watchdogMs),
189
191
  });
190
192
  if (!response.ok) {
191
193
  ready = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomflow/proflow-execution-runtime",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -24,14 +24,14 @@
24
24
  "SETUP.md"
25
25
  ],
26
26
  "dependencies": {
27
- "@tomflow/proflow-module-contract": "^0.1.13",
28
- "@tomflow/proflow-execution-browser-extension": "^0.1.13",
29
- "@tomflow/proflow-execution-contracts": "^0.1.10",
27
+ "@tomflow/proflow-execution-local": "^0.1.15",
28
+ "@tomflow/proflow-execution-browser-extension": "^0.1.32",
30
29
  "@tomflow/proflow-model-contracts": "^0.1.10",
31
- "@tomflow/proflow-execution-local": "^0.1.12"
30
+ "@tomflow/proflow-execution-contracts": "^0.1.10",
31
+ "@tomflow/proflow-module-contract": "^0.1.13"
32
32
  },
33
33
  "devDependencies": {
34
- "@tomflow/proflow-deployment-conformance": "^0.1.11"
34
+ "@tomflow/proflow-deployment-conformance": "^0.1.13"
35
35
  },
36
36
  "description": "Durable, policy-controlled Execution Core orchestration over SQLite and controlled executor ports.",
37
37
  "keywords": [
@@ -3,7 +3,7 @@
3
3
  "contractVersion": "1.0.0",
4
4
  "moduleRef": "execution-runtime",
5
5
  "packageName": "@tomflow/proflow-execution-runtime",
6
- "moduleVersion": "0.1.14",
6
+ "moduleVersion": "0.1.16",
7
7
  "kind": "service",
8
8
  "templateVersion": "1.0.0",
9
9
  "platformCompatibility": ">=1.0.0 <2.0.0",
package/CHANGELOG.md DELETED
@@ -1,43 +0,0 @@
1
- # @tomflow/proflow-execution-runtime
2
-
3
- ## 0.1.14
4
-
5
- ### Patch Changes
6
-
7
- - Ship the Phase 3 browser, tunnel, model automation, platform readiness, and documentation closure as one verifiable platform snapshot.
8
-
9
- ## 0.1.13
10
-
11
- ### Patch Changes
12
-
13
- - Distinguish dependency blocking from verified failure, expose Module-owned status diagnostics, remove automatic docs paging, consolidate start checks, add contextual help, and clarify uninstall output.
14
-
15
- ## 0.1.12
16
-
17
- ### Patch Changes
18
-
19
- - Upgrade the ProFlow terminal experience, stream Registry and package-manager progress, publish structured Chinese Module documentation, and provide numbered package-owned Setup assistants.
20
-
21
- ## 0.1.11
22
-
23
- ### Patch Changes
24
-
25
- - Improve terminal progress and localized status output, publish readable Chinese module docs, and add guided setup assistants for external resources.
26
-
27
- ## 0.1.10
28
-
29
- ### Patch Changes
30
-
31
- - Resolve DOCS.md from both source and built deployment adapters, prove all 24 built adapters return the published body, and announce package synchronization before the package manager blocks.
32
-
33
- ## 0.1.9
34
-
35
- ### Patch Changes
36
-
37
- - Replace JSON terminal protocols with typed CLI outcomes, add real-time Chinese progress and lifecycle summaries, publish DOCS content, standardize executable setup plans and package-owned setup commands, and preserve only user-owned pnpm policy during uninstall.
38
-
39
- ## 0.1.8
40
-
41
- ### Patch Changes
42
-
43
- - Align all Modules to the seven-command setup contract with executable package-owned setup guidance and full Platform setup aggregation.