@tomflow/proflow-platform-host 0.1.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.
- package/README.md +5 -0
- package/conformance.json +1 -0
- package/dist/deployment/adapter.d.ts +458 -0
- package/dist/deployment/adapter.js +243 -0
- package/dist/deployment/descriptor.d.ts +96 -0
- package/dist/deployment/descriptor.js +108 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.js +55 -0
- package/dist/src/index.d.ts +252 -0
- package/dist/src/index.js +1928 -0
- package/dist/src/role-operations.d.ts +9 -0
- package/dist/src/role-operations.js +51 -0
- package/package.json +65 -0
- package/proflow.module.json +129 -0
package/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# @tomflow/proflow-platform-host
|
|
2
|
+
|
|
3
|
+
Local application composition root for ProFlow. It constructs the independent Task and Agent packages, binds HTTP public clients for Execution and Model, exposes a loopback owner router, and aggregates current dependency readiness.
|
|
4
|
+
|
|
5
|
+
The Host owns no domain repository, business fact, recovery cache, Execution effect, Model provider, Deployment plan, Task Observer loop, System Observer assessment store, or Browser Carrier scheduler. Extension observers/carrier may use Host public transport/client composition, but their runtime semantics remain outside Host ownership.
|
package/conformance.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "contract": "proflow.conformance.v1", "levels": ["C1", "C2", "C3"] }
|
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
type PlatformHostService = {
|
|
2
|
+
start(): Promise<{
|
|
3
|
+
host: string;
|
|
4
|
+
port: number;
|
|
5
|
+
}>;
|
|
6
|
+
stop(): Promise<void>;
|
|
7
|
+
restart(): Promise<{
|
|
8
|
+
host: string;
|
|
9
|
+
port: number;
|
|
10
|
+
}>;
|
|
11
|
+
status(): Promise<{
|
|
12
|
+
readiness: "READY" | "NOT_READY";
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
export declare function createBehaviorAdapter(service?: PlatformHostService): {
|
|
16
|
+
describe: () => {
|
|
17
|
+
result: {
|
|
18
|
+
readonly contract: "deployment.result.v1";
|
|
19
|
+
readonly ok: true;
|
|
20
|
+
readonly status: "SUCCEEDED";
|
|
21
|
+
readonly moduleRef: "platform-host";
|
|
22
|
+
readonly moduleVersion: "0.1.0";
|
|
23
|
+
};
|
|
24
|
+
observedEffects: never[];
|
|
25
|
+
};
|
|
26
|
+
preflight: () => {
|
|
27
|
+
result: {
|
|
28
|
+
readonly contract: "deployment.result.v1";
|
|
29
|
+
readonly ok: true;
|
|
30
|
+
readonly status: "SUCCEEDED";
|
|
31
|
+
readonly moduleRef: "platform-host";
|
|
32
|
+
readonly moduleVersion: "0.1.0";
|
|
33
|
+
};
|
|
34
|
+
observedEffects: never[];
|
|
35
|
+
};
|
|
36
|
+
status: () => Promise<{
|
|
37
|
+
result: {
|
|
38
|
+
readonly contract: "deployment.result.v1";
|
|
39
|
+
readonly moduleRef: "platform-host";
|
|
40
|
+
readonly moduleVersion: "0.1.0";
|
|
41
|
+
readonly ok: false;
|
|
42
|
+
readonly status: "ACTION_REQUIRED";
|
|
43
|
+
readonly actionRequired: {
|
|
44
|
+
readonly action: "compose-platform-host";
|
|
45
|
+
readonly description: "Provide validated Host configuration and owner transports";
|
|
46
|
+
};
|
|
47
|
+
} | {
|
|
48
|
+
contract: "deployment.result.v1";
|
|
49
|
+
ok: true;
|
|
50
|
+
status: "SUCCEEDED";
|
|
51
|
+
moduleRef: "platform-host";
|
|
52
|
+
moduleVersion: "0.1.0";
|
|
53
|
+
data: {
|
|
54
|
+
readiness: "READY" | "NOT_READY";
|
|
55
|
+
} | undefined;
|
|
56
|
+
checks: {
|
|
57
|
+
id: string;
|
|
58
|
+
status: "FAIL" | "PASS";
|
|
59
|
+
message: string;
|
|
60
|
+
}[];
|
|
61
|
+
} | {
|
|
62
|
+
contract: "deployment.result.v1";
|
|
63
|
+
moduleRef: "platform-host";
|
|
64
|
+
moduleVersion: "0.1.0";
|
|
65
|
+
ok: false;
|
|
66
|
+
status: "ACTION_REQUIRED";
|
|
67
|
+
actionRequired: {
|
|
68
|
+
action: string;
|
|
69
|
+
description: string;
|
|
70
|
+
};
|
|
71
|
+
data: {
|
|
72
|
+
readiness: "READY" | "NOT_READY";
|
|
73
|
+
} | undefined;
|
|
74
|
+
checks: {
|
|
75
|
+
id: string;
|
|
76
|
+
status: "FAIL" | "PASS";
|
|
77
|
+
message: string;
|
|
78
|
+
}[];
|
|
79
|
+
};
|
|
80
|
+
observedEffects: never[];
|
|
81
|
+
}>;
|
|
82
|
+
verify: () => Promise<{
|
|
83
|
+
result: {
|
|
84
|
+
contract: "deployment.result.v1";
|
|
85
|
+
ok: true;
|
|
86
|
+
status: "SUCCEEDED";
|
|
87
|
+
moduleRef: "platform-host";
|
|
88
|
+
moduleVersion: "0.1.0";
|
|
89
|
+
checks: {
|
|
90
|
+
id: string;
|
|
91
|
+
status: "FAIL" | "PASS";
|
|
92
|
+
message: string;
|
|
93
|
+
}[];
|
|
94
|
+
} | {
|
|
95
|
+
contract: "deployment.result.v1";
|
|
96
|
+
moduleRef: "platform-host";
|
|
97
|
+
moduleVersion: "0.1.0";
|
|
98
|
+
ok: false;
|
|
99
|
+
status: "ACTION_REQUIRED";
|
|
100
|
+
actionRequired: {
|
|
101
|
+
readonly action: "compose-platform-host";
|
|
102
|
+
readonly description: "Provide validated Host configuration and owner transports";
|
|
103
|
+
};
|
|
104
|
+
checks: {
|
|
105
|
+
id: string;
|
|
106
|
+
status: "FAIL" | "PASS";
|
|
107
|
+
message: string;
|
|
108
|
+
}[];
|
|
109
|
+
} | {
|
|
110
|
+
contract: "deployment.result.v1";
|
|
111
|
+
moduleRef: "platform-host";
|
|
112
|
+
moduleVersion: "0.1.0";
|
|
113
|
+
ok: false;
|
|
114
|
+
status: "ACTION_REQUIRED";
|
|
115
|
+
actionRequired: {
|
|
116
|
+
action: string;
|
|
117
|
+
description: string;
|
|
118
|
+
};
|
|
119
|
+
checks: {
|
|
120
|
+
id: string;
|
|
121
|
+
status: "FAIL" | "PASS";
|
|
122
|
+
message: string;
|
|
123
|
+
}[];
|
|
124
|
+
};
|
|
125
|
+
observedEffects: never[];
|
|
126
|
+
}>;
|
|
127
|
+
doctor: () => {
|
|
128
|
+
result: {
|
|
129
|
+
readonly contract: "deployment.result.v1";
|
|
130
|
+
readonly ok: true;
|
|
131
|
+
readonly status: "SUCCEEDED";
|
|
132
|
+
readonly moduleRef: "platform-host";
|
|
133
|
+
readonly moduleVersion: "0.1.0";
|
|
134
|
+
};
|
|
135
|
+
observedEffects: never[];
|
|
136
|
+
};
|
|
137
|
+
start: () => Promise<{
|
|
138
|
+
result: {
|
|
139
|
+
readonly contract: "deployment.result.v1";
|
|
140
|
+
readonly moduleRef: "platform-host";
|
|
141
|
+
readonly moduleVersion: "0.1.0";
|
|
142
|
+
readonly ok: false;
|
|
143
|
+
readonly status: "ACTION_REQUIRED";
|
|
144
|
+
readonly actionRequired: {
|
|
145
|
+
readonly action: "compose-platform-host";
|
|
146
|
+
readonly description: "Provide validated Host configuration and owner transports";
|
|
147
|
+
};
|
|
148
|
+
} | {
|
|
149
|
+
contract: "deployment.result.v1";
|
|
150
|
+
ok: true;
|
|
151
|
+
status: "SUCCEEDED";
|
|
152
|
+
moduleRef: "platform-host";
|
|
153
|
+
moduleVersion: "0.1.0";
|
|
154
|
+
data: {
|
|
155
|
+
host: string;
|
|
156
|
+
port: number;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
observedEffects: string[];
|
|
160
|
+
}>;
|
|
161
|
+
stop: () => Promise<{
|
|
162
|
+
result: {
|
|
163
|
+
readonly contract: "deployment.result.v1";
|
|
164
|
+
readonly ok: true;
|
|
165
|
+
readonly status: "SUCCEEDED";
|
|
166
|
+
readonly moduleRef: "platform-host";
|
|
167
|
+
readonly moduleVersion: "0.1.0";
|
|
168
|
+
} | {
|
|
169
|
+
readonly contract: "deployment.result.v1";
|
|
170
|
+
readonly moduleRef: "platform-host";
|
|
171
|
+
readonly moduleVersion: "0.1.0";
|
|
172
|
+
readonly ok: false;
|
|
173
|
+
readonly status: "ACTION_REQUIRED";
|
|
174
|
+
readonly actionRequired: {
|
|
175
|
+
readonly action: "compose-platform-host";
|
|
176
|
+
readonly description: "Provide validated Host configuration and owner transports";
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
observedEffects: string[];
|
|
180
|
+
}>;
|
|
181
|
+
restart: () => Promise<{
|
|
182
|
+
result: {
|
|
183
|
+
readonly contract: "deployment.result.v1";
|
|
184
|
+
readonly moduleRef: "platform-host";
|
|
185
|
+
readonly moduleVersion: "0.1.0";
|
|
186
|
+
readonly ok: false;
|
|
187
|
+
readonly status: "ACTION_REQUIRED";
|
|
188
|
+
readonly actionRequired: {
|
|
189
|
+
readonly action: "compose-platform-host";
|
|
190
|
+
readonly description: "Provide validated Host configuration and owner transports";
|
|
191
|
+
};
|
|
192
|
+
} | {
|
|
193
|
+
contract: "deployment.result.v1";
|
|
194
|
+
ok: true;
|
|
195
|
+
status: "SUCCEEDED";
|
|
196
|
+
moduleRef: "platform-host";
|
|
197
|
+
moduleVersion: "0.1.0";
|
|
198
|
+
data: {
|
|
199
|
+
host: string;
|
|
200
|
+
port: number;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
observedEffects: string[];
|
|
204
|
+
}>;
|
|
205
|
+
uninstall: () => Promise<{
|
|
206
|
+
result: {
|
|
207
|
+
readonly contract: "deployment.result.v1";
|
|
208
|
+
readonly ok: true;
|
|
209
|
+
readonly status: "SUCCEEDED";
|
|
210
|
+
readonly moduleRef: "platform-host";
|
|
211
|
+
readonly moduleVersion: "0.1.0";
|
|
212
|
+
} | {
|
|
213
|
+
readonly contract: "deployment.result.v1";
|
|
214
|
+
readonly moduleRef: "platform-host";
|
|
215
|
+
readonly moduleVersion: "0.1.0";
|
|
216
|
+
readonly ok: false;
|
|
217
|
+
readonly status: "ACTION_REQUIRED";
|
|
218
|
+
readonly actionRequired: {
|
|
219
|
+
readonly action: "compose-platform-host";
|
|
220
|
+
readonly description: "Provide validated Host configuration and owner transports";
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
observedEffects: string[];
|
|
224
|
+
}>;
|
|
225
|
+
};
|
|
226
|
+
export declare const behaviorAdapter: {
|
|
227
|
+
describe: () => {
|
|
228
|
+
result: {
|
|
229
|
+
readonly contract: "deployment.result.v1";
|
|
230
|
+
readonly ok: true;
|
|
231
|
+
readonly status: "SUCCEEDED";
|
|
232
|
+
readonly moduleRef: "platform-host";
|
|
233
|
+
readonly moduleVersion: "0.1.0";
|
|
234
|
+
};
|
|
235
|
+
observedEffects: never[];
|
|
236
|
+
};
|
|
237
|
+
preflight: () => {
|
|
238
|
+
result: {
|
|
239
|
+
readonly contract: "deployment.result.v1";
|
|
240
|
+
readonly ok: true;
|
|
241
|
+
readonly status: "SUCCEEDED";
|
|
242
|
+
readonly moduleRef: "platform-host";
|
|
243
|
+
readonly moduleVersion: "0.1.0";
|
|
244
|
+
};
|
|
245
|
+
observedEffects: never[];
|
|
246
|
+
};
|
|
247
|
+
status: () => Promise<{
|
|
248
|
+
result: {
|
|
249
|
+
readonly contract: "deployment.result.v1";
|
|
250
|
+
readonly moduleRef: "platform-host";
|
|
251
|
+
readonly moduleVersion: "0.1.0";
|
|
252
|
+
readonly ok: false;
|
|
253
|
+
readonly status: "ACTION_REQUIRED";
|
|
254
|
+
readonly actionRequired: {
|
|
255
|
+
readonly action: "compose-platform-host";
|
|
256
|
+
readonly description: "Provide validated Host configuration and owner transports";
|
|
257
|
+
};
|
|
258
|
+
} | {
|
|
259
|
+
contract: "deployment.result.v1";
|
|
260
|
+
ok: true;
|
|
261
|
+
status: "SUCCEEDED";
|
|
262
|
+
moduleRef: "platform-host";
|
|
263
|
+
moduleVersion: "0.1.0";
|
|
264
|
+
data: {
|
|
265
|
+
readiness: "READY" | "NOT_READY";
|
|
266
|
+
} | undefined;
|
|
267
|
+
checks: {
|
|
268
|
+
id: string;
|
|
269
|
+
status: "FAIL" | "PASS";
|
|
270
|
+
message: string;
|
|
271
|
+
}[];
|
|
272
|
+
} | {
|
|
273
|
+
contract: "deployment.result.v1";
|
|
274
|
+
moduleRef: "platform-host";
|
|
275
|
+
moduleVersion: "0.1.0";
|
|
276
|
+
ok: false;
|
|
277
|
+
status: "ACTION_REQUIRED";
|
|
278
|
+
actionRequired: {
|
|
279
|
+
action: string;
|
|
280
|
+
description: string;
|
|
281
|
+
};
|
|
282
|
+
data: {
|
|
283
|
+
readiness: "READY" | "NOT_READY";
|
|
284
|
+
} | undefined;
|
|
285
|
+
checks: {
|
|
286
|
+
id: string;
|
|
287
|
+
status: "FAIL" | "PASS";
|
|
288
|
+
message: string;
|
|
289
|
+
}[];
|
|
290
|
+
};
|
|
291
|
+
observedEffects: never[];
|
|
292
|
+
}>;
|
|
293
|
+
verify: () => Promise<{
|
|
294
|
+
result: {
|
|
295
|
+
contract: "deployment.result.v1";
|
|
296
|
+
ok: true;
|
|
297
|
+
status: "SUCCEEDED";
|
|
298
|
+
moduleRef: "platform-host";
|
|
299
|
+
moduleVersion: "0.1.0";
|
|
300
|
+
checks: {
|
|
301
|
+
id: string;
|
|
302
|
+
status: "FAIL" | "PASS";
|
|
303
|
+
message: string;
|
|
304
|
+
}[];
|
|
305
|
+
} | {
|
|
306
|
+
contract: "deployment.result.v1";
|
|
307
|
+
moduleRef: "platform-host";
|
|
308
|
+
moduleVersion: "0.1.0";
|
|
309
|
+
ok: false;
|
|
310
|
+
status: "ACTION_REQUIRED";
|
|
311
|
+
actionRequired: {
|
|
312
|
+
readonly action: "compose-platform-host";
|
|
313
|
+
readonly description: "Provide validated Host configuration and owner transports";
|
|
314
|
+
};
|
|
315
|
+
checks: {
|
|
316
|
+
id: string;
|
|
317
|
+
status: "FAIL" | "PASS";
|
|
318
|
+
message: string;
|
|
319
|
+
}[];
|
|
320
|
+
} | {
|
|
321
|
+
contract: "deployment.result.v1";
|
|
322
|
+
moduleRef: "platform-host";
|
|
323
|
+
moduleVersion: "0.1.0";
|
|
324
|
+
ok: false;
|
|
325
|
+
status: "ACTION_REQUIRED";
|
|
326
|
+
actionRequired: {
|
|
327
|
+
action: string;
|
|
328
|
+
description: string;
|
|
329
|
+
};
|
|
330
|
+
checks: {
|
|
331
|
+
id: string;
|
|
332
|
+
status: "FAIL" | "PASS";
|
|
333
|
+
message: string;
|
|
334
|
+
}[];
|
|
335
|
+
};
|
|
336
|
+
observedEffects: never[];
|
|
337
|
+
}>;
|
|
338
|
+
doctor: () => {
|
|
339
|
+
result: {
|
|
340
|
+
readonly contract: "deployment.result.v1";
|
|
341
|
+
readonly ok: true;
|
|
342
|
+
readonly status: "SUCCEEDED";
|
|
343
|
+
readonly moduleRef: "platform-host";
|
|
344
|
+
readonly moduleVersion: "0.1.0";
|
|
345
|
+
};
|
|
346
|
+
observedEffects: never[];
|
|
347
|
+
};
|
|
348
|
+
start: () => Promise<{
|
|
349
|
+
result: {
|
|
350
|
+
readonly contract: "deployment.result.v1";
|
|
351
|
+
readonly moduleRef: "platform-host";
|
|
352
|
+
readonly moduleVersion: "0.1.0";
|
|
353
|
+
readonly ok: false;
|
|
354
|
+
readonly status: "ACTION_REQUIRED";
|
|
355
|
+
readonly actionRequired: {
|
|
356
|
+
readonly action: "compose-platform-host";
|
|
357
|
+
readonly description: "Provide validated Host configuration and owner transports";
|
|
358
|
+
};
|
|
359
|
+
} | {
|
|
360
|
+
contract: "deployment.result.v1";
|
|
361
|
+
ok: true;
|
|
362
|
+
status: "SUCCEEDED";
|
|
363
|
+
moduleRef: "platform-host";
|
|
364
|
+
moduleVersion: "0.1.0";
|
|
365
|
+
data: {
|
|
366
|
+
host: string;
|
|
367
|
+
port: number;
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
observedEffects: string[];
|
|
371
|
+
}>;
|
|
372
|
+
stop: () => Promise<{
|
|
373
|
+
result: {
|
|
374
|
+
readonly contract: "deployment.result.v1";
|
|
375
|
+
readonly ok: true;
|
|
376
|
+
readonly status: "SUCCEEDED";
|
|
377
|
+
readonly moduleRef: "platform-host";
|
|
378
|
+
readonly moduleVersion: "0.1.0";
|
|
379
|
+
} | {
|
|
380
|
+
readonly contract: "deployment.result.v1";
|
|
381
|
+
readonly moduleRef: "platform-host";
|
|
382
|
+
readonly moduleVersion: "0.1.0";
|
|
383
|
+
readonly ok: false;
|
|
384
|
+
readonly status: "ACTION_REQUIRED";
|
|
385
|
+
readonly actionRequired: {
|
|
386
|
+
readonly action: "compose-platform-host";
|
|
387
|
+
readonly description: "Provide validated Host configuration and owner transports";
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
observedEffects: string[];
|
|
391
|
+
}>;
|
|
392
|
+
restart: () => Promise<{
|
|
393
|
+
result: {
|
|
394
|
+
readonly contract: "deployment.result.v1";
|
|
395
|
+
readonly moduleRef: "platform-host";
|
|
396
|
+
readonly moduleVersion: "0.1.0";
|
|
397
|
+
readonly ok: false;
|
|
398
|
+
readonly status: "ACTION_REQUIRED";
|
|
399
|
+
readonly actionRequired: {
|
|
400
|
+
readonly action: "compose-platform-host";
|
|
401
|
+
readonly description: "Provide validated Host configuration and owner transports";
|
|
402
|
+
};
|
|
403
|
+
} | {
|
|
404
|
+
contract: "deployment.result.v1";
|
|
405
|
+
ok: true;
|
|
406
|
+
status: "SUCCEEDED";
|
|
407
|
+
moduleRef: "platform-host";
|
|
408
|
+
moduleVersion: "0.1.0";
|
|
409
|
+
data: {
|
|
410
|
+
host: string;
|
|
411
|
+
port: number;
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
observedEffects: string[];
|
|
415
|
+
}>;
|
|
416
|
+
uninstall: () => Promise<{
|
|
417
|
+
result: {
|
|
418
|
+
readonly contract: "deployment.result.v1";
|
|
419
|
+
readonly ok: true;
|
|
420
|
+
readonly status: "SUCCEEDED";
|
|
421
|
+
readonly moduleRef: "platform-host";
|
|
422
|
+
readonly moduleVersion: "0.1.0";
|
|
423
|
+
} | {
|
|
424
|
+
readonly contract: "deployment.result.v1";
|
|
425
|
+
readonly moduleRef: "platform-host";
|
|
426
|
+
readonly moduleVersion: "0.1.0";
|
|
427
|
+
readonly ok: false;
|
|
428
|
+
readonly status: "ACTION_REQUIRED";
|
|
429
|
+
readonly actionRequired: {
|
|
430
|
+
readonly action: "compose-platform-host";
|
|
431
|
+
readonly description: "Provide validated Host configuration and owner transports";
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
observedEffects: string[];
|
|
435
|
+
}>;
|
|
436
|
+
};
|
|
437
|
+
export declare function createServiceProcessBinding(input: {
|
|
438
|
+
moduleRef: string;
|
|
439
|
+
config: Record<string, string>;
|
|
440
|
+
workspaceRoot: string;
|
|
441
|
+
configByModuleRef: ReadonlyMap<string, Record<string, string>>;
|
|
442
|
+
}): Promise<{
|
|
443
|
+
serviceProcess: {
|
|
444
|
+
contract: "deployment.service-process.v1";
|
|
445
|
+
bin: "proflow-platform-host";
|
|
446
|
+
startCommand: "start";
|
|
447
|
+
config: Record<string, unknown>;
|
|
448
|
+
};
|
|
449
|
+
behaviorAdapter: Record<string, unknown>;
|
|
450
|
+
} | undefined>;
|
|
451
|
+
export declare function createProductionBinding(input: {
|
|
452
|
+
moduleRef: string;
|
|
453
|
+
config: Record<string, string>;
|
|
454
|
+
configByModuleRef: ReadonlyMap<string, Record<string, string>>;
|
|
455
|
+
}): Promise<{
|
|
456
|
+
behaviorAdapter: Record<string, unknown>;
|
|
457
|
+
} | undefined>;
|
|
458
|
+
export {};
|