@tomflow/proflow-platform-host 0.1.29 → 0.1.31
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 +12 -0
- package/dist/deployment/adapter.d.ts +10 -10
- package/dist/deployment/adapter.js +22 -14
- package/dist/deployment/descriptor.d.ts +1 -1
- package/dist/deployment/descriptor.js +1 -1
- package/dist/src/browser-permission-context.js +6 -3
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.js +437 -15
- package/dist/src/monitor-rotation-coordinator.d.ts +76 -0
- package/dist/src/monitor-rotation-coordinator.js +782 -0
- package/dist/src/operation-observability.js +4 -1
- package/dist/src/product-campaign-continuation.d.ts +132 -0
- package/dist/src/product-campaign-continuation.js +279 -0
- package/dist/src/product-discussion-admission.d.ts +92 -0
- package/dist/src/product-discussion-admission.js +191 -0
- package/dist/src/product-discussion-host.d.ts +43 -0
- package/dist/src/product-discussion-host.js +167 -0
- package/dist/src/reconciliation-coordinator.d.ts +1 -0
- package/dist/src/reconciliation-coordinator.js +7 -2
- package/dist/src/role-operations.js +8 -0
- package/package.json +7 -7
- package/proflow.module.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @tomflow/proflow-platform-host
|
|
2
2
|
|
|
3
|
+
## 0.1.31
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Close the initial Monitor lifecycle with owner-backed seed/recover, activation-time rotation clocks, automatic bootstrap, and exact-target Monitor delivery.
|
|
8
|
+
|
|
9
|
+
## 0.1.30
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Fail closed on ambiguous Task/Worker Permission identity and keep generic application-boundary observability from fabricating an authoritative side-effect state.
|
|
14
|
+
|
|
3
15
|
## 0.1.29
|
|
4
16
|
|
|
5
17
|
### 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.31";
|
|
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.31";
|
|
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.31";
|
|
38
38
|
data: {
|
|
39
39
|
setupStatus: "READY";
|
|
40
40
|
runtimeStatus: "RUNNING" | "STOPPED";
|
|
@@ -48,7 +48,7 @@ export declare const behaviorAdapter: {
|
|
|
48
48
|
ok: true;
|
|
49
49
|
status: "SUCCEEDED";
|
|
50
50
|
moduleRef: "platform-host";
|
|
51
|
-
moduleVersion: "0.1.
|
|
51
|
+
moduleVersion: "0.1.31";
|
|
52
52
|
data: {
|
|
53
53
|
endpoint: string;
|
|
54
54
|
stateRoot: string;
|
|
@@ -66,7 +66,7 @@ export declare const behaviorAdapter: {
|
|
|
66
66
|
ok: true;
|
|
67
67
|
status: "SUCCEEDED";
|
|
68
68
|
moduleRef: "platform-host";
|
|
69
|
-
moduleVersion: "0.1.
|
|
69
|
+
moduleVersion: "0.1.31";
|
|
70
70
|
data: {
|
|
71
71
|
docs: string;
|
|
72
72
|
};
|
|
@@ -79,7 +79,7 @@ export declare const behaviorAdapter: {
|
|
|
79
79
|
ok: true;
|
|
80
80
|
status: "SUCCEEDED";
|
|
81
81
|
moduleRef: "platform-host";
|
|
82
|
-
moduleVersion: "0.1.
|
|
82
|
+
moduleVersion: "0.1.31";
|
|
83
83
|
data: {
|
|
84
84
|
host: string;
|
|
85
85
|
port: number;
|
|
@@ -90,7 +90,7 @@ export declare const behaviorAdapter: {
|
|
|
90
90
|
result: {
|
|
91
91
|
contract: "deployment.result.v1";
|
|
92
92
|
moduleRef: "platform-host";
|
|
93
|
-
moduleVersion: "0.1.
|
|
93
|
+
moduleVersion: "0.1.31";
|
|
94
94
|
ok: false;
|
|
95
95
|
status: "FAILED";
|
|
96
96
|
error: {
|
|
@@ -107,7 +107,7 @@ export declare const behaviorAdapter: {
|
|
|
107
107
|
readonly ok: true;
|
|
108
108
|
readonly status: "SUCCEEDED";
|
|
109
109
|
readonly moduleRef: "platform-host";
|
|
110
|
-
readonly moduleVersion: "0.1.
|
|
110
|
+
readonly moduleVersion: "0.1.31";
|
|
111
111
|
};
|
|
112
112
|
observedEffects: string[];
|
|
113
113
|
} | {
|
|
@@ -116,11 +116,11 @@ export declare const behaviorAdapter: {
|
|
|
116
116
|
readonly ok: true;
|
|
117
117
|
readonly status: "SUCCEEDED";
|
|
118
118
|
readonly moduleRef: "platform-host";
|
|
119
|
-
readonly moduleVersion: "0.1.
|
|
119
|
+
readonly moduleVersion: "0.1.31";
|
|
120
120
|
} | {
|
|
121
121
|
contract: "deployment.result.v1";
|
|
122
122
|
moduleRef: "platform-host";
|
|
123
|
-
moduleVersion: "0.1.
|
|
123
|
+
moduleVersion: "0.1.31";
|
|
124
124
|
ok: false;
|
|
125
125
|
status: "FAILED";
|
|
126
126
|
error: {
|
|
@@ -63,25 +63,33 @@ async function running(context) {
|
|
|
63
63
|
return false;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
+
async function readPrivateConnection(context, input) {
|
|
67
|
+
const facts = await readModuleSharedFacts(context, "execution-browser-extension");
|
|
68
|
+
const endpoint = factString(facts, input.endpointFact);
|
|
69
|
+
const tokenFile = factString(facts, input.tokenFileFact);
|
|
70
|
+
if (!endpoint || !tokenFile)
|
|
71
|
+
return undefined;
|
|
72
|
+
const info = await stat(tokenFile);
|
|
73
|
+
if (process.platform !== "win32" && (info.mode & 0o077) !== 0)
|
|
74
|
+
throw new Error(`${input.tokenFileFact} permissions must be owner-only`);
|
|
75
|
+
const credential = (await readFile(tokenFile, "utf8")).trim();
|
|
76
|
+
if (credential.length < 32)
|
|
77
|
+
throw new Error(`invalid ${input.tokenFileFact} credential`);
|
|
78
|
+
return { endpoint, credential };
|
|
79
|
+
}
|
|
66
80
|
async function compose(context) {
|
|
67
81
|
const own = await ownFacts(context);
|
|
68
82
|
const { createPlatformHost, parsePlatformHostConfig } = await import("../src/index.js");
|
|
69
83
|
const url = new URL(own.endpoint);
|
|
70
84
|
const host = createPlatformHost({
|
|
71
|
-
resolveLocalToolConnection:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
throw new Error("local tool credential permissions must be owner-only");
|
|
80
|
-
const credential = (await readFile(tokenFile, "utf8")).trim();
|
|
81
|
-
if (credential.length < 32)
|
|
82
|
-
throw new Error("invalid local tool credential");
|
|
83
|
-
return { endpoint, credential };
|
|
84
|
-
},
|
|
85
|
+
resolveLocalToolConnection: () => readPrivateConnection(context, {
|
|
86
|
+
endpointFact: "localToolBridgeEndpoint",
|
|
87
|
+
tokenFileFact: "localToolHostTokenFile",
|
|
88
|
+
}),
|
|
89
|
+
resolveMonitorControlConnection: () => readPrivateConnection(context, {
|
|
90
|
+
endpointFact: "monitorControlEndpoint",
|
|
91
|
+
tokenFileFact: "monitorControlTokenFile",
|
|
92
|
+
}),
|
|
85
93
|
resolveOwnerConnection: async (owner) => {
|
|
86
94
|
const facts = await readModuleSharedFacts(context, owner === "execution" ? "execution-runtime" : "model-runtime");
|
|
87
95
|
const baseUrl = factString(facts, "endpoint"), tokenFile = factString(facts, "transportCredentialFile");
|
|
@@ -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.31";
|
|
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.31",
|
|
7
7
|
kind: "service",
|
|
8
8
|
templateVersion: "1.0.0",
|
|
9
9
|
platformCompatibility: ">=1.0.0 <2.0.0",
|
|
@@ -21,9 +21,12 @@ export function resolveBrowserPermissionTaskBinding(input) {
|
|
|
21
21
|
binding.workerRef !== input.workerRef ||
|
|
22
22
|
binding.conversationLocator !== input.conversationLocator)
|
|
23
23
|
return null;
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
|
|
24
|
+
// Worker/Conversation identity is Task-scoped. A second Task match is
|
|
25
|
+
// ambiguous even when every field is byte-identical; fail closed rather
|
|
26
|
+
// than authorizing a permission against the wrong Task occurrence.
|
|
27
|
+
if (match !== null)
|
|
28
|
+
return null;
|
|
29
|
+
match = binding;
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
32
|
return match;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -99,6 +99,10 @@ export type LocalToolConnectionResolver = () => Promise<{
|
|
|
99
99
|
endpoint: string;
|
|
100
100
|
credential: string;
|
|
101
101
|
} | undefined>;
|
|
102
|
+
export type MonitorControlConnectionResolver = () => Promise<{
|
|
103
|
+
endpoint: string;
|
|
104
|
+
credential: string;
|
|
105
|
+
} | undefined>;
|
|
102
106
|
export type PlatformHostBrowserOwnerPorts = {
|
|
103
107
|
task: {
|
|
104
108
|
getWorkerBinding(taskId: string, roleRef: string): Promise<{
|
|
@@ -232,6 +236,7 @@ export declare function createPlatformHost(input: {
|
|
|
232
236
|
executionCredential?: string;
|
|
233
237
|
resolveOwnerConnection?: OwnerConnectionResolver;
|
|
234
238
|
resolveLocalToolConnection?: LocalToolConnectionResolver;
|
|
239
|
+
resolveMonitorControlConnection?: MonitorControlConnectionResolver;
|
|
235
240
|
}): Readonly<{
|
|
236
241
|
start: () => Promise<{
|
|
237
242
|
host: string;
|