@tomflow/proflow-execution-browser-extension 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 +7 -0
- package/conformance.json +1 -0
- package/deployment/browser-extension.json +6 -0
- package/dist/deployment/adapter.d.ts +61 -0
- package/dist/deployment/adapter.js +47 -0
- package/dist/deployment/descriptor.d.ts +103 -0
- package/dist/deployment/descriptor.js +109 -0
- package/dist/extension/background.d.ts +1 -0
- package/dist/extension/background.js +752 -0
- package/dist/extension/content.d.ts +1 -0
- package/dist/extension/content.js +90 -0
- package/dist/extension/options.d.ts +1 -0
- package/dist/extension/options.js +68 -0
- package/dist/extension/side-panel.d.ts +1 -0
- package/dist/extension/side-panel.js +262 -0
- package/dist/src/bridge.d.ts +26 -0
- package/dist/src/bridge.js +288 -0
- package/dist/src/collaboration-carrier.d.ts +65 -0
- package/dist/src/collaboration-carrier.js +138 -0
- package/dist/src/index.d.ts +137 -0
- package/dist/src/index.js +779 -0
- package/dist/src/runtime-composition.d.ts +97 -0
- package/dist/src/runtime-composition.js +124 -0
- package/dist/src/system-observer.d.ts +86 -0
- package/dist/src/system-observer.js +252 -0
- package/dist/src/task-observer.d.ts +118 -0
- package/dist/src/task-observer.js +105 -0
- package/dist/src/vision.d.ts +73 -0
- package/dist/src/vision.js +82 -0
- package/extension/background.ts +997 -0
- package/extension/content.ts +138 -0
- package/extension/options.html +54 -0
- package/extension/options.ts +98 -0
- package/extension/side-panel.html +77 -0
- package/extension/side-panel.ts +349 -0
- package/manifest.json +20 -0
- package/package.json +58 -0
- package/proflow.module.json +127 -0
- package/self-install.mjs +27 -0
package/README.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# @tomflow/proflow-execution-browser-extension
|
|
2
|
+
|
|
3
|
+
Execution-owned MV3 Browser executor/evidence provider plus the v1 Extension application surface: Task UI/New Task, Approval/Alert UI, deterministic Task Observer, low-priority System Observer, and Background Carrier Controller. These application blocks consume owner facts only through public ports and do **not** become Task/Agent/Collaboration business owners.
|
|
4
|
+
|
|
5
|
+
The Carrier uses stable `workerRef/conversationLocator` and transient tab/content identities; v1 has no frame registry, frame-role handshake, iframe team workspace, persistent-tab business identity, per-Action Browser scheduler, or ordinary Browser file manager. DOM/programmatic input is primary; screenshot→Vision is fallback. Real Browser writes reuse durable Execution semantics and UNKNOWN is never blindly replayed.
|
|
6
|
+
|
|
7
|
+
The optional `./bridge` export provides the loopback-only, token-authenticated runtime transport selected by real MV3 integration. It binds only `127.0.0.1`; the extension performs an explicit session hello, fresh polling heartbeat, typed command delivery, and result reporting. The bridge is never a public ingress or a second business truth.
|
package/conformance.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "contract": "proflow.conformance.v1", "levels": ["C1", "C2", "C3"] }
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export declare const behaviorAdapter: {
|
|
2
|
+
readonly describe: () => {
|
|
3
|
+
result: {
|
|
4
|
+
contract: "deployment.result.v1";
|
|
5
|
+
moduleRef: "execution-browser-extension";
|
|
6
|
+
moduleVersion: "0.1.0";
|
|
7
|
+
ok: boolean;
|
|
8
|
+
status: string;
|
|
9
|
+
};
|
|
10
|
+
observedEffects: never[];
|
|
11
|
+
};
|
|
12
|
+
readonly preflight: () => {
|
|
13
|
+
result: {
|
|
14
|
+
contract: "deployment.result.v1";
|
|
15
|
+
moduleRef: "execution-browser-extension";
|
|
16
|
+
moduleVersion: "0.1.0";
|
|
17
|
+
ok: boolean;
|
|
18
|
+
status: string;
|
|
19
|
+
};
|
|
20
|
+
observedEffects: never[];
|
|
21
|
+
};
|
|
22
|
+
readonly status: () => {
|
|
23
|
+
result: {
|
|
24
|
+
contract: "deployment.result.v1";
|
|
25
|
+
moduleRef: "execution-browser-extension";
|
|
26
|
+
moduleVersion: "0.1.0";
|
|
27
|
+
ok: boolean;
|
|
28
|
+
status: string;
|
|
29
|
+
actionRequired: {
|
|
30
|
+
action: string;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
observedEffects: never[];
|
|
35
|
+
};
|
|
36
|
+
readonly verify: () => {
|
|
37
|
+
result: {
|
|
38
|
+
contract: "deployment.result.v1";
|
|
39
|
+
moduleRef: "execution-browser-extension";
|
|
40
|
+
moduleVersion: "0.1.0";
|
|
41
|
+
ok: boolean;
|
|
42
|
+
status: string;
|
|
43
|
+
checks: {
|
|
44
|
+
id: string;
|
|
45
|
+
status: string;
|
|
46
|
+
message: string;
|
|
47
|
+
}[];
|
|
48
|
+
};
|
|
49
|
+
observedEffects: never[];
|
|
50
|
+
};
|
|
51
|
+
readonly doctor: () => {
|
|
52
|
+
result: {
|
|
53
|
+
contract: "deployment.result.v1";
|
|
54
|
+
moduleRef: "execution-browser-extension";
|
|
55
|
+
moduleVersion: "0.1.0";
|
|
56
|
+
ok: boolean;
|
|
57
|
+
status: string;
|
|
58
|
+
};
|
|
59
|
+
observedEffects: never[];
|
|
60
|
+
};
|
|
61
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { descriptor } from "./descriptor.js";
|
|
2
|
+
const base = {
|
|
3
|
+
contract: "deployment.result.v1",
|
|
4
|
+
moduleRef: descriptor.moduleRef,
|
|
5
|
+
moduleVersion: descriptor.moduleVersion,
|
|
6
|
+
};
|
|
7
|
+
export const behaviorAdapter = {
|
|
8
|
+
describe: () => ({
|
|
9
|
+
result: { ...base, ok: true, status: "SUCCEEDED" },
|
|
10
|
+
observedEffects: [],
|
|
11
|
+
}),
|
|
12
|
+
preflight: () => ({
|
|
13
|
+
result: { ...base, ok: true, status: "SUCCEEDED" },
|
|
14
|
+
observedEffects: [],
|
|
15
|
+
}),
|
|
16
|
+
status: () => ({
|
|
17
|
+
result: {
|
|
18
|
+
...base,
|
|
19
|
+
ok: false,
|
|
20
|
+
status: "ACTION_REQUIRED",
|
|
21
|
+
actionRequired: {
|
|
22
|
+
action: "verify-real-carrier",
|
|
23
|
+
description: "Load in real Chrome and collect ChatGPT E3/E4 evidence",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
observedEffects: [],
|
|
27
|
+
}),
|
|
28
|
+
verify: () => ({
|
|
29
|
+
result: {
|
|
30
|
+
...base,
|
|
31
|
+
ok: true,
|
|
32
|
+
status: "SUCCEEDED",
|
|
33
|
+
checks: [
|
|
34
|
+
{
|
|
35
|
+
id: "extension-package",
|
|
36
|
+
status: "PASS",
|
|
37
|
+
message: "The MV3 package is structurally verified; real Carrier readiness remains ACTION_REQUIRED in status",
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
observedEffects: [],
|
|
42
|
+
}),
|
|
43
|
+
doctor: () => ({
|
|
44
|
+
result: { ...base, ok: true, status: "SUCCEEDED" },
|
|
45
|
+
observedEffects: [],
|
|
46
|
+
}),
|
|
47
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
export declare const descriptor: {
|
|
2
|
+
readonly contract: "module";
|
|
3
|
+
readonly contractVersion: "1.0.0";
|
|
4
|
+
readonly moduleRef: "execution-browser-extension";
|
|
5
|
+
readonly packageName: "@tomflow/proflow-execution-browser-extension";
|
|
6
|
+
readonly moduleVersion: "0.1.0";
|
|
7
|
+
readonly kind: "browser-extension";
|
|
8
|
+
readonly templateVersion: "1.0.0";
|
|
9
|
+
readonly platformCompatibility: ">=1.0.0 <2.0.0";
|
|
10
|
+
readonly installClass: "core";
|
|
11
|
+
readonly identity: {
|
|
12
|
+
readonly domain: "execution";
|
|
13
|
+
readonly summary: "Execution-owned MV3 Browser executor, evidence provider and browser application surface.";
|
|
14
|
+
};
|
|
15
|
+
readonly provides: readonly [{
|
|
16
|
+
readonly contractRef: "execution-browser-executor";
|
|
17
|
+
readonly version: "1.0.0";
|
|
18
|
+
}];
|
|
19
|
+
readonly requires: readonly [{
|
|
20
|
+
readonly contractRef: "execution";
|
|
21
|
+
readonly versionRange: ">=1.0.0 <2.0.0";
|
|
22
|
+
}, {
|
|
23
|
+
readonly contractRef: "task-orchestration";
|
|
24
|
+
readonly versionRange: ">=1.0.0 <2.0.0";
|
|
25
|
+
}, {
|
|
26
|
+
readonly contractRef: "agent-runtime";
|
|
27
|
+
readonly versionRange: ">=1.0.0 <2.0.0";
|
|
28
|
+
}];
|
|
29
|
+
readonly requirements: readonly [{
|
|
30
|
+
readonly kind: "runtime";
|
|
31
|
+
readonly runtime: "browser";
|
|
32
|
+
readonly versionRange: ">=1";
|
|
33
|
+
}, {
|
|
34
|
+
readonly kind: "human";
|
|
35
|
+
readonly action: "Load and verify the unpacked MV3 extension in the real Chrome profile";
|
|
36
|
+
}];
|
|
37
|
+
readonly configSlots: readonly [{
|
|
38
|
+
readonly key: "bridge.endpoint";
|
|
39
|
+
readonly type: "url";
|
|
40
|
+
readonly required: true;
|
|
41
|
+
readonly description: "Loopback Browser Reality Bridge endpoint";
|
|
42
|
+
}, {
|
|
43
|
+
readonly key: "bridge.token";
|
|
44
|
+
readonly type: "secretRef";
|
|
45
|
+
readonly required: true;
|
|
46
|
+
readonly sensitive: true;
|
|
47
|
+
readonly description: "Browser Reality Bridge extension token reference";
|
|
48
|
+
}, {
|
|
49
|
+
readonly key: "taskApplication.endpoint";
|
|
50
|
+
readonly type: "url";
|
|
51
|
+
readonly required: true;
|
|
52
|
+
readonly description: "Loopback Platform Host Task application endpoint";
|
|
53
|
+
}, {
|
|
54
|
+
readonly key: "taskApplication.token";
|
|
55
|
+
readonly type: "secretRef";
|
|
56
|
+
readonly required: true;
|
|
57
|
+
readonly sensitive: true;
|
|
58
|
+
readonly description: "Platform Host Task application token reference";
|
|
59
|
+
}, {
|
|
60
|
+
readonly key: "approvalApplication.endpoint";
|
|
61
|
+
readonly type: "url";
|
|
62
|
+
readonly required: true;
|
|
63
|
+
readonly description: "Loopback Platform Host Approval application endpoint";
|
|
64
|
+
}, {
|
|
65
|
+
readonly key: "approvalApplication.token";
|
|
66
|
+
readonly type: "secretRef";
|
|
67
|
+
readonly required: true;
|
|
68
|
+
readonly sensitive: true;
|
|
69
|
+
readonly description: "Platform Host Approval application token reference";
|
|
70
|
+
}, {
|
|
71
|
+
readonly key: "chromeRuntimeModuleRef";
|
|
72
|
+
readonly type: "moduleRef";
|
|
73
|
+
readonly required: false;
|
|
74
|
+
readonly description: "External resource module governing the Chrome runtime";
|
|
75
|
+
readonly default: "chrome-runtime";
|
|
76
|
+
}, {
|
|
77
|
+
readonly key: "carrierModuleRef";
|
|
78
|
+
readonly type: "moduleRef";
|
|
79
|
+
readonly required: false;
|
|
80
|
+
readonly description: "External resource module governing the Custom GPT carrier";
|
|
81
|
+
readonly default: "chatgpt-carrier";
|
|
82
|
+
}];
|
|
83
|
+
readonly lifecycle: {
|
|
84
|
+
readonly supported: readonly ["describe", "preflight", "status", "verify", "doctor"];
|
|
85
|
+
};
|
|
86
|
+
readonly verification: {
|
|
87
|
+
readonly checks: readonly [{
|
|
88
|
+
readonly id: "real-carrier-e3-e4";
|
|
89
|
+
readonly description: "Real Chrome and ChatGPT E3/E4 evidence is present";
|
|
90
|
+
readonly lifecycle: "verify";
|
|
91
|
+
}];
|
|
92
|
+
};
|
|
93
|
+
readonly effects: readonly [{
|
|
94
|
+
readonly kind: "external-resource";
|
|
95
|
+
readonly description: "Package an MV3 extension that performs Execution-authorized Browser effects";
|
|
96
|
+
readonly retention: "preserve";
|
|
97
|
+
}];
|
|
98
|
+
readonly documentation: readonly [{
|
|
99
|
+
readonly id: "overview";
|
|
100
|
+
readonly path: "./README.md";
|
|
101
|
+
readonly description: "Package-owned module overview";
|
|
102
|
+
}];
|
|
103
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export const descriptor = {
|
|
2
|
+
contract: "module",
|
|
3
|
+
contractVersion: "1.0.0",
|
|
4
|
+
moduleRef: "execution-browser-extension",
|
|
5
|
+
packageName: "@tomflow/proflow-execution-browser-extension",
|
|
6
|
+
moduleVersion: "0.1.0",
|
|
7
|
+
kind: "browser-extension",
|
|
8
|
+
templateVersion: "1.0.0",
|
|
9
|
+
platformCompatibility: ">=1.0.0 <2.0.0",
|
|
10
|
+
installClass: "core",
|
|
11
|
+
identity: {
|
|
12
|
+
domain: "execution",
|
|
13
|
+
summary: "Execution-owned MV3 Browser executor, evidence provider and browser application surface.",
|
|
14
|
+
},
|
|
15
|
+
provides: [{ contractRef: "execution-browser-executor", version: "1.0.0" }],
|
|
16
|
+
requires: [
|
|
17
|
+
{ contractRef: "execution", versionRange: ">=1.0.0 <2.0.0" },
|
|
18
|
+
{ contractRef: "task-orchestration", versionRange: ">=1.0.0 <2.0.0" },
|
|
19
|
+
{ contractRef: "agent-runtime", versionRange: ">=1.0.0 <2.0.0" },
|
|
20
|
+
],
|
|
21
|
+
requirements: [
|
|
22
|
+
{ kind: "runtime", runtime: "browser", versionRange: ">=1" },
|
|
23
|
+
{
|
|
24
|
+
kind: "human",
|
|
25
|
+
action: "Load and verify the unpacked MV3 extension in the real Chrome profile",
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
configSlots: [
|
|
29
|
+
{
|
|
30
|
+
key: "bridge.endpoint",
|
|
31
|
+
type: "url",
|
|
32
|
+
required: true,
|
|
33
|
+
description: "Loopback Browser Reality Bridge endpoint",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
key: "bridge.token",
|
|
37
|
+
type: "secretRef",
|
|
38
|
+
required: true,
|
|
39
|
+
sensitive: true,
|
|
40
|
+
description: "Browser Reality Bridge extension token reference",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
key: "taskApplication.endpoint",
|
|
44
|
+
type: "url",
|
|
45
|
+
required: true,
|
|
46
|
+
description: "Loopback Platform Host Task application endpoint",
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: "taskApplication.token",
|
|
50
|
+
type: "secretRef",
|
|
51
|
+
required: true,
|
|
52
|
+
sensitive: true,
|
|
53
|
+
description: "Platform Host Task application token reference",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
key: "approvalApplication.endpoint",
|
|
57
|
+
type: "url",
|
|
58
|
+
required: true,
|
|
59
|
+
description: "Loopback Platform Host Approval application endpoint",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
key: "approvalApplication.token",
|
|
63
|
+
type: "secretRef",
|
|
64
|
+
required: true,
|
|
65
|
+
sensitive: true,
|
|
66
|
+
description: "Platform Host Approval application token reference",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
key: "chromeRuntimeModuleRef",
|
|
70
|
+
type: "moduleRef",
|
|
71
|
+
required: false,
|
|
72
|
+
description: "External resource module governing the Chrome runtime",
|
|
73
|
+
default: "chrome-runtime",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
key: "carrierModuleRef",
|
|
77
|
+
type: "moduleRef",
|
|
78
|
+
required: false,
|
|
79
|
+
description: "External resource module governing the Custom GPT carrier",
|
|
80
|
+
default: "chatgpt-carrier",
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
lifecycle: {
|
|
84
|
+
supported: ["describe", "preflight", "status", "verify", "doctor"],
|
|
85
|
+
},
|
|
86
|
+
verification: {
|
|
87
|
+
checks: [
|
|
88
|
+
{
|
|
89
|
+
id: "real-carrier-e3-e4",
|
|
90
|
+
description: "Real Chrome and ChatGPT E3/E4 evidence is present",
|
|
91
|
+
lifecycle: "verify",
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
effects: [
|
|
96
|
+
{
|
|
97
|
+
kind: "external-resource",
|
|
98
|
+
description: "Package an MV3 extension that performs Execution-authorized Browser effects",
|
|
99
|
+
retention: "preserve",
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
documentation: [
|
|
103
|
+
{
|
|
104
|
+
id: "overview",
|
|
105
|
+
path: "./README.md",
|
|
106
|
+
description: "Package-owned module overview",
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|