@tomflow/proflow-platform-host 0.1.17 → 0.1.18
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/CHANGELOG.md +6 -0
- package/dist/deployment/adapter.d.ts +10 -10
- package/dist/deployment/descriptor.d.ts +1 -1
- package/dist/deployment/descriptor.js +1 -1
- package/dist/src/index.js +70 -4
- package/package.json +9 -9
- package/proflow.module.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @tomflow/proflow-platform-host
|
|
2
2
|
|
|
3
|
+
## 0.1.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Close Real-3 node generation identity fencing across Platform Host admission, durable Execution idempotency, and Observer/Approval resume provenance.
|
|
8
|
+
|
|
3
9
|
## 0.1.17
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -6,7 +6,7 @@ export declare const behaviorAdapter: {
|
|
|
6
6
|
ok: true;
|
|
7
7
|
status: "SUCCEEDED";
|
|
8
8
|
moduleRef: "platform-host";
|
|
9
|
-
moduleVersion: "0.1.
|
|
9
|
+
moduleVersion: "0.1.18";
|
|
10
10
|
data: {
|
|
11
11
|
endpoint: string;
|
|
12
12
|
stateRoot: string;
|
|
@@ -24,7 +24,7 @@ export declare const behaviorAdapter: {
|
|
|
24
24
|
readonly ok: true;
|
|
25
25
|
readonly status: "SUCCEEDED";
|
|
26
26
|
readonly moduleRef: "platform-host";
|
|
27
|
-
readonly moduleVersion: "0.1.
|
|
27
|
+
readonly moduleVersion: "0.1.18";
|
|
28
28
|
};
|
|
29
29
|
observedEffects: string[];
|
|
30
30
|
}>;
|
|
@@ -34,7 +34,7 @@ export declare const behaviorAdapter: {
|
|
|
34
34
|
ok: true;
|
|
35
35
|
status: "SUCCEEDED";
|
|
36
36
|
moduleRef: "platform-host";
|
|
37
|
-
moduleVersion: "0.1.
|
|
37
|
+
moduleVersion: "0.1.18";
|
|
38
38
|
data: {
|
|
39
39
|
setupStatus: "READY";
|
|
40
40
|
runtimeStatus: "RUNNING" | "STOPPED";
|
|
@@ -55,7 +55,7 @@ export declare const behaviorAdapter: {
|
|
|
55
55
|
ok: true;
|
|
56
56
|
status: "SUCCEEDED";
|
|
57
57
|
moduleRef: "platform-host";
|
|
58
|
-
moduleVersion: "0.1.
|
|
58
|
+
moduleVersion: "0.1.18";
|
|
59
59
|
data: {
|
|
60
60
|
endpoint: string;
|
|
61
61
|
stateRoot: string;
|
|
@@ -73,7 +73,7 @@ export declare const behaviorAdapter: {
|
|
|
73
73
|
ok: true;
|
|
74
74
|
status: "SUCCEEDED";
|
|
75
75
|
moduleRef: "platform-host";
|
|
76
|
-
moduleVersion: "0.1.
|
|
76
|
+
moduleVersion: "0.1.18";
|
|
77
77
|
data: {
|
|
78
78
|
docs: string;
|
|
79
79
|
};
|
|
@@ -86,7 +86,7 @@ export declare const behaviorAdapter: {
|
|
|
86
86
|
ok: true;
|
|
87
87
|
status: "SUCCEEDED";
|
|
88
88
|
moduleRef: "platform-host";
|
|
89
|
-
moduleVersion: "0.1.
|
|
89
|
+
moduleVersion: "0.1.18";
|
|
90
90
|
data: {
|
|
91
91
|
host: string;
|
|
92
92
|
port: number;
|
|
@@ -97,7 +97,7 @@ export declare const behaviorAdapter: {
|
|
|
97
97
|
result: {
|
|
98
98
|
contract: "deployment.result.v1";
|
|
99
99
|
moduleRef: "platform-host";
|
|
100
|
-
moduleVersion: "0.1.
|
|
100
|
+
moduleVersion: "0.1.18";
|
|
101
101
|
ok: false;
|
|
102
102
|
status: "FAILED";
|
|
103
103
|
error: {
|
|
@@ -114,7 +114,7 @@ export declare const behaviorAdapter: {
|
|
|
114
114
|
readonly ok: true;
|
|
115
115
|
readonly status: "SUCCEEDED";
|
|
116
116
|
readonly moduleRef: "platform-host";
|
|
117
|
-
readonly moduleVersion: "0.1.
|
|
117
|
+
readonly moduleVersion: "0.1.18";
|
|
118
118
|
};
|
|
119
119
|
observedEffects: string[];
|
|
120
120
|
} | {
|
|
@@ -123,11 +123,11 @@ export declare const behaviorAdapter: {
|
|
|
123
123
|
readonly ok: true;
|
|
124
124
|
readonly status: "SUCCEEDED";
|
|
125
125
|
readonly moduleRef: "platform-host";
|
|
126
|
-
readonly moduleVersion: "0.1.
|
|
126
|
+
readonly moduleVersion: "0.1.18";
|
|
127
127
|
} | {
|
|
128
128
|
contract: "deployment.result.v1";
|
|
129
129
|
moduleRef: "platform-host";
|
|
130
|
-
moduleVersion: "0.1.
|
|
130
|
+
moduleVersion: "0.1.18";
|
|
131
131
|
ok: false;
|
|
132
132
|
status: "FAILED";
|
|
133
133
|
error: {
|
|
@@ -3,7 +3,7 @@ export declare const descriptor: {
|
|
|
3
3
|
readonly contractVersion: "1.0.0";
|
|
4
4
|
readonly moduleRef: "platform-host";
|
|
5
5
|
readonly packageName: "@tomflow/proflow-platform-host";
|
|
6
|
-
readonly moduleVersion: "0.1.
|
|
6
|
+
readonly moduleVersion: "0.1.18";
|
|
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: "platform-host",
|
|
5
5
|
packageName: "@tomflow/proflow-platform-host",
|
|
6
|
-
moduleVersion: "0.1.
|
|
6
|
+
moduleVersion: "0.1.18",
|
|
7
7
|
kind: "service",
|
|
8
8
|
templateVersion: "1.0.0",
|
|
9
9
|
platformCompatibility: ">=1.0.0 <2.0.0",
|
package/dist/src/index.js
CHANGED
|
@@ -389,6 +389,7 @@ async function constructGraph(config, executionCredential, modelCredential) {
|
|
|
389
389
|
return {
|
|
390
390
|
taskId: value.taskId,
|
|
391
391
|
status: value.status,
|
|
392
|
+
currentNodeId: value.currentNodeId,
|
|
392
393
|
roleBindings: value.roleBindings,
|
|
393
394
|
};
|
|
394
395
|
};
|
|
@@ -823,7 +824,11 @@ async function constructGraph(config, executionCredential, modelCredential) {
|
|
|
823
824
|
if (request.projectRoot &&
|
|
824
825
|
resolve(request.projectRoot) !== config.workspaceRoot)
|
|
825
826
|
return false;
|
|
826
|
-
|
|
827
|
+
const nodeScoped = request.nodeId !== undefined || request.runNo !== undefined;
|
|
828
|
+
if (nodeScoped &&
|
|
829
|
+
(request.nodeId === undefined || request.runNo === undefined))
|
|
830
|
+
return false;
|
|
831
|
+
if (nodeScoped && !request.taskId)
|
|
827
832
|
return false;
|
|
828
833
|
if (request.workerRef && !request.taskId)
|
|
829
834
|
return false;
|
|
@@ -842,12 +847,30 @@ async function constructGraph(config, executionCredential, modelCredential) {
|
|
|
842
847
|
taskId: request.taskId,
|
|
843
848
|
workerRef: request.workerRef,
|
|
844
849
|
});
|
|
845
|
-
if (request.nodeId)
|
|
846
|
-
unwrap(task.queries.getNodeContext({
|
|
850
|
+
if (request.nodeId) {
|
|
851
|
+
const nodeContext = unwrap(task.queries.getNodeContext({
|
|
847
852
|
taskId: request.taskId,
|
|
848
853
|
nodeId: request.nodeId,
|
|
849
|
-
...(request.runNo ? { runNo: request.runNo } : {}),
|
|
850
854
|
}));
|
|
855
|
+
if (taskFact.status !== "ACTIVE")
|
|
856
|
+
return false;
|
|
857
|
+
if (taskFact.currentNodeId !== nodeContext.node.nodeId)
|
|
858
|
+
return false;
|
|
859
|
+
if (request.runNo !== nodeContext.node.runNo)
|
|
860
|
+
return false;
|
|
861
|
+
if (!browserCapability &&
|
|
862
|
+
nodeContext.node.status !== "IN_PROGRESS")
|
|
863
|
+
return false;
|
|
864
|
+
const nodeBinding = taskFact.roleBindings.find((candidate) => candidate.agentPackageRef ===
|
|
865
|
+
nodeContext.node.requiredAgentPackageRef);
|
|
866
|
+
if (!nodeBinding?.workerRef)
|
|
867
|
+
return false;
|
|
868
|
+
const scopedRoleRef = request.roleRef ?? (internalBrowserCaller ? undefined : request.callerRef);
|
|
869
|
+
if (scopedRoleRef !== nodeBinding.roleRef)
|
|
870
|
+
return false;
|
|
871
|
+
if (request.workerRef !== nodeBinding.workerRef)
|
|
872
|
+
return false;
|
|
873
|
+
}
|
|
851
874
|
const browserInput = object(request.input, "execution input");
|
|
852
875
|
if (browserCapability) {
|
|
853
876
|
const targetRoleRef = string(browserInput.roleRef, "input.roleRef");
|
|
@@ -861,6 +884,29 @@ async function constructGraph(config, executionCredential, modelCredential) {
|
|
|
861
884
|
const targetWorkerRef = string(browserInput.workerRef, "input.workerRef");
|
|
862
885
|
if (binding.workerRef !== targetWorkerRef)
|
|
863
886
|
return false;
|
|
887
|
+
if (request.capability === "worker.wake" &&
|
|
888
|
+
(targetRoleRef !== request.roleRef ||
|
|
889
|
+
targetWorkerRef !== request.workerRef ||
|
|
890
|
+
browserInput.taskId !== request.taskId ||
|
|
891
|
+
browserInput.nodeId !== request.nodeId ||
|
|
892
|
+
browserInput.runNo !== request.runNo))
|
|
893
|
+
return false;
|
|
894
|
+
if (request.capability === "worker.wake") {
|
|
895
|
+
const nodeContext = unwrap(task.queries.getNodeContext({
|
|
896
|
+
taskId: request.taskId,
|
|
897
|
+
nodeId: string(browserInput.nodeId, "input.nodeId"),
|
|
898
|
+
}));
|
|
899
|
+
const trigger = string(browserInput.trigger, "input.trigger");
|
|
900
|
+
const readyWake = nodeContext.node.status === "READY" &&
|
|
901
|
+
((trigger === "NODE_READY" && nodeContext.node.runNo === 1) ||
|
|
902
|
+
(trigger === "REOPEN" && nodeContext.node.runNo > 1));
|
|
903
|
+
const resumeWake = nodeContext.node.status === "IN_PROGRESS" &&
|
|
904
|
+
(trigger === "RECOVERY_RESUME" ||
|
|
905
|
+
trigger === "EXECUTION_RESULT_READY" ||
|
|
906
|
+
trigger === "PEER_REPLY_READY");
|
|
907
|
+
if (!readyWake && !resumeWake)
|
|
908
|
+
return false;
|
|
909
|
+
}
|
|
864
910
|
}
|
|
865
911
|
}
|
|
866
912
|
}
|
|
@@ -1164,6 +1210,26 @@ async function constructGraph(config, executionCredential, modelCredential) {
|
|
|
1164
1210
|
const value = object(rawInput, "observer application input");
|
|
1165
1211
|
if (operation === "task.projection")
|
|
1166
1212
|
return taskDriverPorts.getTaskDriveProjection(string(value.taskId, "taskId"));
|
|
1213
|
+
if (operation === "approval.executionContext") {
|
|
1214
|
+
const approval = object(await execution.invoke("getExecutionApproval", {
|
|
1215
|
+
approvalRef: string(value.approvalRef, "approvalRef"),
|
|
1216
|
+
}), "approval fact");
|
|
1217
|
+
const executionFact = object(await execution.invoke("getExecution", {
|
|
1218
|
+
executionRef: string(approval.executionRef, "executionRef"),
|
|
1219
|
+
callerRef: string(approval.callerRef, "callerRef"),
|
|
1220
|
+
}), "execution fact");
|
|
1221
|
+
const runNo = Number(executionFact.runNo);
|
|
1222
|
+
if (!Number.isInteger(runNo) || runNo <= 0)
|
|
1223
|
+
throw new Error("EXECUTION_RUN_GENERATION_REQUIRED");
|
|
1224
|
+
return {
|
|
1225
|
+
executionRef: string(executionFact.executionRef, "executionRef"),
|
|
1226
|
+
taskId: string(executionFact.taskId, "taskId"),
|
|
1227
|
+
nodeId: string(executionFact.nodeId, "nodeId"),
|
|
1228
|
+
runNo,
|
|
1229
|
+
roleRef: string(executionFact.roleRef, "roleRef"),
|
|
1230
|
+
workerRef: string(executionFact.workerRef, "workerRef"),
|
|
1231
|
+
};
|
|
1232
|
+
}
|
|
1167
1233
|
if (operation === "browser.permission.classify") {
|
|
1168
1234
|
const roleRef = string(value.roleRef, "roleRef");
|
|
1169
1235
|
const taskId = string(value.taskId, "taskId");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomflow/proflow-platform-host",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -24,19 +24,19 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"zod": "4.1.12",
|
|
27
|
-
"@tomflow/proflow-task-migration-runner": "^0.1.11",
|
|
28
|
-
"@tomflow/proflow-execution-browser-extension": "^0.1.38",
|
|
29
|
-
"@tomflow/proflow-task-orchestration": "^0.1.10",
|
|
30
|
-
"@tomflow/proflow-task-store-sqlite": "^0.1.11",
|
|
31
27
|
"@tomflow/proflow-agent-runtime": "^0.1.13",
|
|
28
|
+
"@tomflow/proflow-execution-browser-extension": "^0.1.42",
|
|
29
|
+
"@tomflow/proflow-execution-contracts": "^0.1.10",
|
|
32
30
|
"@tomflow/proflow-module-contract": "^0.1.13",
|
|
33
|
-
"@tomflow/proflow-
|
|
31
|
+
"@tomflow/proflow-task-migration-runner": "^0.1.11",
|
|
32
|
+
"@tomflow/proflow-task-store-sqlite": "^0.1.11",
|
|
33
|
+
"@tomflow/proflow-task-orchestration": "^0.1.10"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@tomflow/proflow-model-runtime": "^0.1.22",
|
|
37
|
-
"@tomflow/proflow-deployment-conformance": "^0.1.13",
|
|
38
36
|
"@tomflow/proflow-agent-gateway": "^0.1.15",
|
|
39
|
-
"@tomflow/proflow-
|
|
37
|
+
"@tomflow/proflow-deployment-conformance": "^0.1.13",
|
|
38
|
+
"@tomflow/proflow-execution-runtime": "^0.1.18",
|
|
39
|
+
"@tomflow/proflow-model-runtime": "^0.1.24"
|
|
40
40
|
},
|
|
41
41
|
"description": "Provides the ProFlow local application composition root that binds Task, Agent, Execution and Model owner transports.",
|
|
42
42
|
"keywords": [
|
package/proflow.module.json
CHANGED