@powerhousedao/ph-cli 6.2.3-dev.7 → 6.2.3-dev.70
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/dist/{auth-AR3VxAIk.mjs → auth-BFUq7CvE.mjs} +3 -3
- package/dist/{auth-AR3VxAIk.mjs.map → auth-BFUq7CvE.mjs.map} +1 -1
- package/dist/auth-CNhbN5UM.mjs +4 -0
- package/dist/build-C78yPntL.mjs +4 -0
- package/dist/build-Dj8qfSSe.mjs +349 -0
- package/dist/build-Dj8qfSSe.mjs.map +1 -0
- package/dist/{cli-connect-override-D3hh4aH_.mjs → cli-connect-override-Cf7WutqU.mjs} +38 -26
- package/dist/cli-connect-override-Cf7WutqU.mjs.map +1 -0
- package/dist/cli.d.mts +2 -1
- package/dist/cli.mjs +31 -1175
- package/dist/cli.mjs.map +1 -1
- package/dist/connect-build-BtKpvcQK.mjs +253 -0
- package/dist/connect-build-BtKpvcQK.mjs.map +1 -0
- package/dist/{connect-config-BWGiW3IB.mjs → connect-config-9EZB_0H_.mjs} +19 -12
- package/dist/connect-config-9EZB_0H_.mjs.map +1 -0
- package/dist/connect-preview-8-qLgWKt.mjs +215 -0
- package/dist/connect-preview-8-qLgWKt.mjs.map +1 -0
- package/dist/connect-studio-BehPZzN7.mjs +4 -0
- package/dist/{connect-studio-D6rfWCNB.mjs → connect-studio-Bhlc77WI.mjs} +17 -11
- package/dist/connect-studio-Bhlc77WI.mjs.map +1 -0
- package/dist/dist-BqeDFgEy.mjs +223 -0
- package/dist/dist-BqeDFgEy.mjs.map +1 -0
- package/dist/explain-BDHmXgw3.mjs +27 -0
- package/dist/explain-BDHmXgw3.mjs.map +1 -0
- package/dist/feature-flags-xwqcHEWC.mjs +4 -0
- package/dist/{generate-all-DrT4ZxHX.mjs → generate-all-C_sPGBuk.mjs} +5 -3
- package/dist/generate-all-C_sPGBuk.mjs.map +1 -0
- package/dist/{generate-app-DNNqA-H3.mjs → generate-app-BTs1u-9l.mjs} +7 -5
- package/dist/{generate-app-DNNqA-H3.mjs.map → generate-app-BTs1u-9l.mjs.map} +1 -1
- package/dist/generate-desktop-shell-BBSGpmud.mjs +212 -0
- package/dist/generate-desktop-shell-BBSGpmud.mjs.map +1 -0
- package/dist/{generate-document-model-BJXyODfm.mjs → generate-document-model-BfFIQ35q.mjs} +19 -7
- package/dist/generate-document-model-BfFIQ35q.mjs.map +1 -0
- package/dist/{generate-editor-BejvaVVT.mjs → generate-editor-CW7Do69u.mjs} +7 -5
- package/dist/{generate-editor-BejvaVVT.mjs.map → generate-editor-CW7Do69u.mjs.map} +1 -1
- package/dist/generate-piece-QTt-ddt2.mjs +65 -0
- package/dist/generate-piece-QTt-ddt2.mjs.map +1 -0
- package/dist/generate-piece-action-DbxrzfKY.mjs +29 -0
- package/dist/generate-piece-action-DbxrzfKY.mjs.map +1 -0
- package/dist/generate-piece-trigger-CqVOcL9g.mjs +30 -0
- package/dist/generate-piece-trigger-CqVOcL9g.mjs.map +1 -0
- package/dist/{generate-processor-_WOx-mMe.mjs → generate-processor-DBtTkgo5.mjs} +15 -8
- package/dist/generate-processor-DBtTkgo5.mjs.map +1 -0
- package/dist/{generate-subgraph-BsHUstpl.mjs → generate-subgraph-CVlTo7qk.mjs} +12 -6
- package/dist/generate-subgraph-CVlTo7qk.mjs.map +1 -0
- package/dist/host-schemas-CtPNRr5v-BQyKKFbS.mjs +493 -0
- package/dist/host-schemas-CtPNRr5v-BQyKKFbS.mjs.map +1 -0
- package/dist/index-CspiP73o.d.mts +4295 -0
- package/dist/index-CspiP73o.d.mts.map +1 -0
- package/dist/{init-BZP6gvYd.mjs → init-ScuT3z7P.mjs} +7 -5
- package/dist/init-ScuT3z7P.mjs.map +1 -0
- package/dist/{inspect-DXjbQEV_.mjs → inspect-zWJnBDMJ.mjs} +11 -4
- package/dist/inspect-zWJnBDMJ.mjs.map +1 -0
- package/dist/install-added-dependencies-DVSbzler.mjs +33 -0
- package/dist/install-added-dependencies-DVSbzler.mjs.map +1 -0
- package/dist/{migrate-jGKfE02L.mjs → migrate-DK4HK7Dn.mjs} +4 -4
- package/dist/{migrate-jGKfE02L.mjs.map → migrate-DK4HK7Dn.mjs.map} +1 -1
- package/dist/ph-cli-commands-3ptdQ0NI.mjs +1476 -0
- package/dist/ph-cli-commands-3ptdQ0NI.mjs.map +1 -0
- package/dist/ph-cli-commands-Dx8hNj6W.mjs +4 -0
- package/dist/plugins-CHVv4qup.mjs +91 -0
- package/dist/plugins-CHVv4qup.mjs.map +1 -0
- package/dist/precompress-P6cJDPVC.mjs +77 -0
- package/dist/precompress-P6cJDPVC.mjs.map +1 -0
- package/dist/reactor-env-BbR86_Li.mjs +29 -0
- package/dist/reactor-env-BbR86_Li.mjs.map +1 -0
- package/dist/reactor-env-D_EvBtLB.mjs +4 -0
- package/dist/{registry-auth-DxEWCJu2.mjs → registry-auth-Bm5AR-fB.mjs} +4 -4
- package/dist/{registry-auth-DxEWCJu2.mjs.map → registry-auth-Bm5AR-fB.mjs.map} +1 -1
- package/dist/run-sugar-BdjKTPGO.mjs +39 -0
- package/dist/run-sugar-BdjKTPGO.mjs.map +1 -0
- package/dist/runners/compound.d.mts +127 -0
- package/dist/runners/compound.d.mts.map +1 -0
- package/dist/runners/compound.mjs +72 -0
- package/dist/runners/compound.mjs.map +1 -0
- package/dist/runners/connect.d.mts +145 -0
- package/dist/runners/connect.d.mts.map +1 -0
- package/dist/runners/connect.mjs +198 -0
- package/dist/runners/connect.mjs.map +1 -0
- package/dist/runners/switchboard.d.mts +198 -0
- package/dist/runners/switchboard.d.mts.map +1 -0
- package/dist/runners/switchboard.mjs +172 -0
- package/dist/runners/switchboard.mjs.map +1 -0
- package/dist/schemas-BQSPev1x.mjs +5537 -0
- package/dist/schemas-BQSPev1x.mjs.map +1 -0
- package/dist/scripts/generate-commands-docs.ts +8 -0
- package/dist/scripts/manage-environment +0 -0
- package/dist/scripts/setup.sh +0 -0
- package/dist/start-run-CmDxyMw0.mjs +36 -0
- package/dist/start-run-CmDxyMw0.mjs.map +1 -0
- package/dist/superseded-config-9D7BdLvd.mjs +53 -0
- package/dist/superseded-config-9D7BdLvd.mjs.map +1 -0
- package/dist/switchboard-C5zgkRl2.mjs +4 -0
- package/dist/switchboard-h4-XgP1h.mjs +129 -0
- package/dist/switchboard-h4-XgP1h.mjs.map +1 -0
- package/dist/{switchboard-migrate-NQ7LHWSi.mjs → switchboard-migrate-7JQZM7-5.mjs} +5 -4
- package/dist/{switchboard-migrate-NQ7LHWSi.mjs.map → switchboard-migrate-7JQZM7-5.mjs.map} +1 -1
- package/dist/{switchboard-reset-BcQXlcVf.mjs → switchboard-reset-MtTB_GAI.mjs} +8 -6
- package/dist/switchboard-reset-MtTB_GAI.mjs.map +1 -0
- package/dist/{utils-C4isxXSO.mjs → utils-9KyRM0mf.mjs} +6 -34
- package/dist/{utils-C4isxXSO.mjs.map → utils-9KyRM0mf.mjs.map} +1 -1
- package/dist/utils-TO9lB8Xs.mjs +4 -0
- package/dist/{vetra-DkF6EJMY.mjs → vetra-BD-34wGs.mjs} +68 -33
- package/dist/vetra-BD-34wGs.mjs.map +1 -0
- package/dist/warn-subgraph-type-conflicts-BOHBmThq.mjs +19 -0
- package/dist/warn-subgraph-type-conflicts-BOHBmThq.mjs.map +1 -0
- package/package.json +43 -17
- package/dist/auth-BNkN6kS9.mjs +0 -4
- package/dist/build-C-A5-ipO.mjs +0 -4
- package/dist/build-uQXq6_HU.mjs +0 -71
- package/dist/build-uQXq6_HU.mjs.map +0 -1
- package/dist/cli-connect-override-D3hh4aH_.mjs.map +0 -1
- package/dist/connect-build-WL4axo4z.mjs +0 -43
- package/dist/connect-build-WL4axo4z.mjs.map +0 -1
- package/dist/connect-config-BWGiW3IB.mjs.map +0 -1
- package/dist/connect-preview-D7ypzFDc.mjs +0 -28
- package/dist/connect-preview-D7ypzFDc.mjs.map +0 -1
- package/dist/connect-studio-BIQzyq5B.mjs +0 -5
- package/dist/connect-studio-D6rfWCNB.mjs.map +0 -1
- package/dist/generate-all-DrT4ZxHX.mjs.map +0 -1
- package/dist/generate-document-model-BJXyODfm.mjs.map +0 -1
- package/dist/generate-processor-_WOx-mMe.mjs.map +0 -1
- package/dist/generate-subgraph-BsHUstpl.mjs.map +0 -1
- package/dist/init-BZP6gvYd.mjs.map +0 -1
- package/dist/inspect-DXjbQEV_.mjs.map +0 -1
- package/dist/switchboard-CJMoMzWx.mjs +0 -75
- package/dist/switchboard-CJMoMzWx.mjs.map +0 -1
- package/dist/switchboard-iRFugh8I.mjs +0 -4
- package/dist/switchboard-reset-BcQXlcVf.mjs.map +0 -1
- package/dist/utils-BzwczAW-.mjs +0 -4
- package/dist/vetra-DkF6EJMY.mjs.map +0 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { a as ZodBoolean, c as ZodNumber, d as ZodRecord, f as ZodString, g as $strict, h as $loose, i as ZodArray, l as ZodObject, n as RunnerContext, o as ZodEnum, p as ZodUnion, r as external_d_exports, s as ZodLiteral, t as HostDefinition, u as ZodOptional } from "../index-CspiP73o.mjs";
|
|
2
|
+
//#region src/runners/compound.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* BRIDGE compound runner (uniform-runners phase 0): args derivation, not
|
|
5
|
+
* supervision. It reads the compound's member wrappers plus the member host
|
|
6
|
+
* files they reference, derives exactly the args today's `startVetra` takes,
|
|
7
|
+
* and calls it — so `ph run vetra` and classic `ph vetra` share one code
|
|
8
|
+
* path. Real supervision (members started via their own runners, instance-
|
|
9
|
+
* fact projection, .ph/run records) is the phase-1 generic compound in
|
|
10
|
+
* @powerhousedao/host-core; this file is deleted when that lands.
|
|
11
|
+
*/
|
|
12
|
+
export declare const kind = "compound";
|
|
13
|
+
/** Phase-2 schema (D2.d): children member shapes + profile come from
|
|
14
|
+
* host-core — member reactor overrides now validate strictly. */
|
|
15
|
+
export declare const hostSchema: ZodObject<{
|
|
16
|
+
name: ZodString;
|
|
17
|
+
runner: ZodObject<{
|
|
18
|
+
module: ZodString;
|
|
19
|
+
defaultVerb: ZodOptional<ZodString>;
|
|
20
|
+
}, $loose>;
|
|
21
|
+
children: ZodRecord<ZodString, ZodObject<{
|
|
22
|
+
host: ZodString;
|
|
23
|
+
runner: ZodOptional<ZodObject<{}, $loose>>;
|
|
24
|
+
config: ZodOptional<ZodObject<{}, $loose>>;
|
|
25
|
+
reactor: ZodOptional<ZodObject<{
|
|
26
|
+
backends: ZodOptional<ZodRecord<ZodString, ZodObject<{
|
|
27
|
+
kind: ZodOptional<ZodEnum<{
|
|
28
|
+
"in-process": "in-process";
|
|
29
|
+
remote: "remote";
|
|
30
|
+
worker: "worker";
|
|
31
|
+
}>>;
|
|
32
|
+
storage: ZodOptional<ZodObject<{
|
|
33
|
+
kind: ZodEnum<{
|
|
34
|
+
idb: "idb";
|
|
35
|
+
memory: "memory";
|
|
36
|
+
path: "path";
|
|
37
|
+
postgres: "postgres";
|
|
38
|
+
}>;
|
|
39
|
+
dataDir: ZodOptional<ZodString>;
|
|
40
|
+
url: ZodOptional<ZodString>;
|
|
41
|
+
}, $strict>>;
|
|
42
|
+
readModel: ZodOptional<ZodObject<{
|
|
43
|
+
url: ZodOptional<ZodString>;
|
|
44
|
+
}, $strict>>;
|
|
45
|
+
packages: ZodOptional<ZodObject<{
|
|
46
|
+
cdnUrl: ZodOptional<ZodString>;
|
|
47
|
+
specs: ZodOptional<ZodArray<ZodString>>;
|
|
48
|
+
dynamic: ZodOptional<ZodBoolean>;
|
|
49
|
+
}, $strict>>;
|
|
50
|
+
remote: ZodOptional<ZodObject<{
|
|
51
|
+
host: ZodOptional<ZodString>;
|
|
52
|
+
url: ZodOptional<ZodString>;
|
|
53
|
+
}, $strict>>;
|
|
54
|
+
projection: ZodOptional<ZodObject<{
|
|
55
|
+
enabled: ZodOptional<ZodBoolean>;
|
|
56
|
+
dbPoolSize: ZodOptional<ZodNumber>;
|
|
57
|
+
}, $strict>>;
|
|
58
|
+
executors: ZodOptional<ZodObject<{
|
|
59
|
+
numWorkers: ZodOptional<ZodUnion<readonly [ZodNumber, ZodLiteral<"auto">]>>;
|
|
60
|
+
}, $strict>>;
|
|
61
|
+
}, $strict>>>;
|
|
62
|
+
placement: ZodOptional<ZodObject<{
|
|
63
|
+
primary: ZodOptional<ZodString>;
|
|
64
|
+
default: ZodOptional<ZodObject<{}, $loose>>;
|
|
65
|
+
}, $strict>>;
|
|
66
|
+
protocol: ZodOptional<ZodObject<{
|
|
67
|
+
featureFlags: ZodOptional<ZodObject<{
|
|
68
|
+
documentDecisions: ZodOptional<ZodBoolean>;
|
|
69
|
+
authEnforcement: ZodOptional<ZodBoolean>;
|
|
70
|
+
authGroups: ZodOptional<ZodBoolean>;
|
|
71
|
+
authConditions: ZodOptional<ZodBoolean>;
|
|
72
|
+
}, $strict>>;
|
|
73
|
+
createSignaturePolicy: ZodOptional<ZodEnum<{
|
|
74
|
+
legacy: "legacy";
|
|
75
|
+
"v2-required": "v2-required";
|
|
76
|
+
}>>;
|
|
77
|
+
unsupportedStoredDocuments: ZodOptional<ZodEnum<{
|
|
78
|
+
"read-only": "read-only";
|
|
79
|
+
refuse: "refuse";
|
|
80
|
+
}>>;
|
|
81
|
+
}, $strict>>;
|
|
82
|
+
workflows: ZodOptional<ZodBoolean>;
|
|
83
|
+
renown: ZodOptional<ZodObject<{
|
|
84
|
+
url: ZodOptional<ZodString>;
|
|
85
|
+
networkId: ZodOptional<ZodString>;
|
|
86
|
+
chainId: ZodOptional<ZodNumber>;
|
|
87
|
+
}, $strict>>;
|
|
88
|
+
packages: ZodOptional<ZodObject<{
|
|
89
|
+
registryUrl: ZodOptional<ZodString>;
|
|
90
|
+
}, $strict>>;
|
|
91
|
+
namespace: ZodOptional<ZodString>;
|
|
92
|
+
auth: ZodOptional<ZodObject<{
|
|
93
|
+
enabled: ZodOptional<ZodBoolean>;
|
|
94
|
+
admins: ZodOptional<ZodArray<ZodString>>;
|
|
95
|
+
renown: ZodOptional<ZodObject<{}, $loose>>;
|
|
96
|
+
}, $strict>>;
|
|
97
|
+
drives: ZodOptional<ZodArray<ZodObject<{
|
|
98
|
+
slug: ZodString;
|
|
99
|
+
id: ZodOptional<ZodString>;
|
|
100
|
+
projectHash: ZodOptional<ZodBoolean>;
|
|
101
|
+
name: ZodOptional<ZodString>;
|
|
102
|
+
icon: ZodOptional<ZodString>;
|
|
103
|
+
preferredEditor: ZodOptional<ZodString>;
|
|
104
|
+
sharingType: ZodOptional<ZodEnum<{
|
|
105
|
+
private: "private";
|
|
106
|
+
public: "public";
|
|
107
|
+
shared: "shared";
|
|
108
|
+
}>>;
|
|
109
|
+
availableOffline: ZodOptional<ZodBoolean>;
|
|
110
|
+
remote: ZodOptional<ZodObject<{
|
|
111
|
+
url: ZodString;
|
|
112
|
+
}, $strict>>;
|
|
113
|
+
}, $strict>>>;
|
|
114
|
+
}, $strict>>;
|
|
115
|
+
}, $strict>>;
|
|
116
|
+
config: ZodOptional<ZodObject<{}, $loose>>;
|
|
117
|
+
profile: ZodOptional<ZodObject<{
|
|
118
|
+
appId: ZodOptional<ZodString>;
|
|
119
|
+
name: ZodOptional<ZodString>;
|
|
120
|
+
description: ZodOptional<ZodString>;
|
|
121
|
+
icon: ZodOptional<ZodString>;
|
|
122
|
+
}, $strict>>;
|
|
123
|
+
}, $loose>;
|
|
124
|
+
export declare function run(host: HostDefinition, ctx: RunnerContext): Promise<void>;
|
|
125
|
+
//#endregion
|
|
126
|
+
export {};
|
|
127
|
+
//# sourceMappingURL=compound.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compound.d.mts","names":[],"sources":["../../src/runners/compound.ts"],"mappings":";;;;;;;;;;;qBAqBa;;;qBAIA,YAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GASrB;wBAkCoB,IACpB,MAAM,gBACN,KAAK,gBACJ"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="33908ac1-e0c2-5b7a-b255-a5d71dbe11d6")}catch(e){}}();
|
|
3
|
+
import { a as looseObject, l as string } from "../schemas-BQSPev1x.mjs";
|
|
4
|
+
import { c as profileSchema, i as loadHost, t as childrenSchema } from "../host-schemas-CtPNRr5v-BQyKKFbS.mjs";
|
|
5
|
+
//#region src/runners/compound.ts
|
|
6
|
+
/**
|
|
7
|
+
* BRIDGE compound runner (uniform-runners phase 0): args derivation, not
|
|
8
|
+
* supervision. It reads the compound's member wrappers plus the member host
|
|
9
|
+
* files they reference, derives exactly the args today's `startVetra` takes,
|
|
10
|
+
* and calls it — so `ph run vetra` and classic `ph vetra` share one code
|
|
11
|
+
* path. Real supervision (members started via their own runners, instance-
|
|
12
|
+
* fact projection, .ph/run records) is the phase-1 generic compound in
|
|
13
|
+
* @powerhousedao/host-core; this file is deleted when that lands.
|
|
14
|
+
*/
|
|
15
|
+
const kind = "compound";
|
|
16
|
+
/** Phase-2 schema (D2.d): children member shapes + profile come from
|
|
17
|
+
* host-core — member reactor overrides now validate strictly. */
|
|
18
|
+
const hostSchema = looseObject({
|
|
19
|
+
name: string().min(1),
|
|
20
|
+
runner: looseObject({
|
|
21
|
+
module: string(),
|
|
22
|
+
defaultVerb: string().optional()
|
|
23
|
+
}),
|
|
24
|
+
children: childrenSchema,
|
|
25
|
+
config: looseObject({}).optional(),
|
|
26
|
+
profile: profileSchema
|
|
27
|
+
});
|
|
28
|
+
function members(host) {
|
|
29
|
+
return Object.entries(host.children ?? {}).map(([name, wrapper]) => {
|
|
30
|
+
const w = wrapper;
|
|
31
|
+
return {
|
|
32
|
+
name,
|
|
33
|
+
host: w.host,
|
|
34
|
+
runnerPort: typeof w.runner?.port === "number" ? w.runner.port : void 0
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
async function memberPort(projectRoot, ref) {
|
|
39
|
+
if (ref.runnerPort !== void 0) return ref.runnerPort;
|
|
40
|
+
const port = (await loadHost(projectRoot, ref.host)).host.runner.port;
|
|
41
|
+
return typeof port === "number" ? port : void 0;
|
|
42
|
+
}
|
|
43
|
+
async function run(host, ctx) {
|
|
44
|
+
const defaultVerb = host.runner.defaultVerb ?? "run";
|
|
45
|
+
if (defaultVerb !== "dev") throw new Error(`The phase-0 compound bridge only supports defaultVerb "dev" (vetra semantics); got "${defaultVerb}". Other member verbs arrive with the host-core compound.`);
|
|
46
|
+
const refs = members(host);
|
|
47
|
+
const connectRef = refs.find((r) => r.host === "connect");
|
|
48
|
+
const switchboardRef = refs.find((r) => r.host === "switchboard");
|
|
49
|
+
if (!connectRef || !switchboardRef) throw new Error(`The phase-0 compound bridge expects children wrapping the "connect" and "switchboard" hosts (vetra shape); found members for: ${refs.map((r) => r.host).join(", ") || "<none>"}.`);
|
|
50
|
+
const connectPort = await memberPort(ctx.projectRoot, connectRef);
|
|
51
|
+
const switchboardPort = await memberPort(ctx.projectRoot, switchboardRef);
|
|
52
|
+
if (connectPort === void 0 || switchboardPort === void 0) throw new Error(`Cannot derive member ports: connect=${connectPort}, switchboard=${switchboardPort}. Set runner.port in the member host files or override it in the compound's wrappers.`);
|
|
53
|
+
const sbMember = await loadHost(ctx.projectRoot, switchboardRef.host);
|
|
54
|
+
const sbWrapper = (host.children ?? {})[switchboardRef.name];
|
|
55
|
+
const sbReactor = {
|
|
56
|
+
...sbMember.host.reactor ?? {},
|
|
57
|
+
...sbWrapper?.reactor ?? {}
|
|
58
|
+
};
|
|
59
|
+
const { applyReactorEnvProjection } = await import("../reactor-env-D_EvBtLB.mjs");
|
|
60
|
+
applyReactorEnvProjection(sbReactor, `hosts/${switchboardRef.host}/host.js`);
|
|
61
|
+
const args = {
|
|
62
|
+
connectPort,
|
|
63
|
+
switchboardPort
|
|
64
|
+
};
|
|
65
|
+
const { startVetra } = await import("../vetra-BD-34wGs.mjs");
|
|
66
|
+
await startVetra(args);
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
export { hostSchema, kind, run };
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=compound.mjs.map
|
|
72
|
+
//# debugId=33908ac1-e0c2-5b7a-b255-a5d71dbe11d6
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compound.mjs","sources":["../../src/runners/compound.ts"],"sourcesContent":["import { z } from \"zod\";\nimport {\n childrenSchema,\n loadHost,\n profileSchema,\n type HostDefinition,\n type ReactorConfig,\n type RunnerContext,\n} from \"@powerhousedao/host-core\";\nimport type { VetraArgs } from \"../types.js\";\n\n/**\n * BRIDGE compound runner (uniform-runners phase 0): args derivation, not\n * supervision. It reads the compound's member wrappers plus the member host\n * files they reference, derives exactly the args today's `startVetra` takes,\n * and calls it — so `ph run vetra` and classic `ph vetra` share one code\n * path. Real supervision (members started via their own runners, instance-\n * fact projection, .ph/run records) is the phase-1 generic compound in\n * @powerhousedao/host-core; this file is deleted when that lands.\n */\n\nexport const kind = \"compound\";\n\n/** Phase-2 schema (D2.d): children member shapes + profile come from\n * host-core — member reactor overrides now validate strictly. */\nexport const hostSchema = z.looseObject({\n name: z.string().min(1),\n runner: z.looseObject({\n module: z.string(),\n defaultVerb: z.string().optional(),\n }),\n children: childrenSchema,\n config: z.looseObject({}).optional(),\n profile: profileSchema,\n});\n\ninterface MemberRef {\n name: string;\n host: string;\n runnerPort?: number;\n}\n\nfunction members(host: HostDefinition): MemberRef[] {\n return Object.entries(host.children ?? {}).map(([name, wrapper]) => {\n const w = wrapper as {\n host: string;\n runner?: { port?: unknown };\n };\n return {\n name,\n host: w.host,\n runnerPort:\n typeof w.runner?.port === \"number\" ? w.runner.port : undefined,\n };\n });\n}\n\nasync function memberPort(\n projectRoot: string,\n ref: MemberRef,\n): Promise<number | undefined> {\n // wrapper override wins; otherwise the member host's own runner.port\n if (ref.runnerPort !== undefined) return ref.runnerPort;\n const member = await loadHost(projectRoot, ref.host);\n const port = member.host.runner.port;\n return typeof port === \"number\" ? port : undefined;\n}\n\nexport async function run(\n host: HostDefinition,\n ctx: RunnerContext,\n): Promise<void> {\n const defaultVerb = (host.runner.defaultVerb as string | undefined) ?? \"run\";\n if (defaultVerb !== \"dev\") {\n throw new Error(\n `The phase-0 compound bridge only supports defaultVerb \"dev\" (vetra semantics); ` +\n `got \"${defaultVerb}\". Other member verbs arrive with the host-core compound.`,\n );\n }\n\n const refs = members(host);\n const connectRef = refs.find((r) => r.host === \"connect\");\n const switchboardRef = refs.find((r) => r.host === \"switchboard\");\n if (!connectRef || !switchboardRef) {\n throw new Error(\n `The phase-0 compound bridge expects children wrapping the \"connect\" and ` +\n `\"switchboard\" hosts (vetra shape); found members for: ${\n refs.map((r) => r.host).join(\", \") || \"<none>\"\n }.`,\n );\n }\n\n const connectPort = await memberPort(ctx.projectRoot, connectRef);\n const switchboardPort = await memberPort(ctx.projectRoot, switchboardRef);\n if (connectPort === undefined || switchboardPort === undefined) {\n throw new Error(\n `Cannot derive member ports: connect=${connectPort}, switchboard=${switchboardPort}. ` +\n `Set runner.port in the member host files or override it in the compound's wrappers.`,\n );\n }\n\n // The switchboard member's reactor block applies on this path too: startVetra\n // boots the switchboard in-process without going through the switchboard\n // runner's verbs, so project the block onto env HERE (P2.4 via the vetra\n // path). Wrapper override wins over the member host file, as everywhere.\n const sbMember = await loadHost(ctx.projectRoot, switchboardRef.host);\n const sbWrapper = (host.children ?? {})[switchboardRef.name] as\n | { reactor?: Record<string, unknown> }\n | undefined;\n const sbReactor = {\n ...((sbMember.host.reactor as Record<string, unknown> | undefined) ?? {}),\n ...(sbWrapper?.reactor ?? {}),\n } as ReactorConfig;\n const { applyReactorEnvProjection } = await import(\"./reactor-env.js\");\n applyReactorEnvProjection(sbReactor, `hosts/${switchboardRef.host}/host.js`);\n\n // Classic `ph vetra` resolves these through flag>env>.env>config>constant;\n // a hosts project carries the values in its host files (the projection\n // already resolved powerhouse.config.json references), so the derived args\n // land on the same numbers. The equivalence suite pins this.\n const args: Partial<VetraArgs> = {\n connectPort,\n switchboardPort,\n };\n const { startVetra } = await import(\"../services/vetra.js\");\n await startVetra(args as VetraArgs);\n}\n"],"names":["z.looseObject","z.string"],"mappings":";;;;;;;;;;;;;;AAqBA,MAAa,OAAO;;;AAIpB,MAAa,aAAaA,YAAc;CACtC,MAAMC,OAAS,CAAC,CAAC,IAAI,CAAC;CACtB,QAAQD,YAAc;EACpB,QAAQC,OAAS;EACjB,aAAaA,OAAS,CAAC,CAAC,SAAS;CACnC,CAAC;CACD,UAAU;CACV,QAAQD,YAAc,CAAC,CAAC,CAAC,CAAC,SAAS;CACnC,SAAS;AACX,CAAC;AAQD,SAAS,QAAQ,MAAmC;CAClD,OAAO,OAAO,QAAQ,KAAK,YAAY,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,aAAa;EAClE,MAAM,IAAI;EAIV,OAAO;GACL;GACA,MAAM,EAAE;GACR,YACE,OAAO,EAAE,QAAQ,SAAS,WAAW,EAAE,OAAO,OAAO,KAAA;EACzD;CACF,CAAC;AACH;AAEA,eAAe,WACb,aACA,KAC6B;CAE7B,IAAI,IAAI,eAAe,KAAA,GAAW,OAAO,IAAI;CAE7C,MAAM,QAAO,MADQ,SAAS,aAAa,IAAI,IAAI,EAAA,CAC/B,KAAK,OAAO;CAChC,OAAO,OAAO,SAAS,WAAW,OAAO,KAAA;AAC3C;AAEA,eAAsB,IACpB,MACA,KACe;CACf,MAAM,cAAe,KAAK,OAAO,eAAsC;CACvE,IAAI,gBAAgB,OAClB,MAAM,IAAI,MACR,uFACU,YAAY,0DACxB;CAGF,MAAM,OAAO,QAAQ,IAAI;CACzB,MAAM,aAAa,KAAK,MAAM,MAAM,EAAE,SAAS,SAAS;CACxD,MAAM,iBAAiB,KAAK,MAAM,MAAM,EAAE,SAAS,aAAa;CAChE,IAAI,CAAC,cAAc,CAAC,gBAClB,MAAM,IAAI,MACR,iIAEI,KAAK,KAAK,MAAM,EAAE,IAAI,CAAC,CAAC,KAAK,IAAI,KAAK,SACvC,EACL;CAGF,MAAM,cAAc,MAAM,WAAW,IAAI,aAAa,UAAU;CAChE,MAAM,kBAAkB,MAAM,WAAW,IAAI,aAAa,cAAc;CACxE,IAAI,gBAAgB,KAAA,KAAa,oBAAoB,KAAA,GACnD,MAAM,IAAI,MACR,uCAAuC,YAAY,gBAAgB,gBAAgB,sFAErF;CAOF,MAAM,WAAW,MAAM,SAAS,IAAI,aAAa,eAAe,IAAI;CACpE,MAAM,aAAa,KAAK,YAAY,CAAC,EAAA,CAAG,eAAe;CAGvD,MAAM,YAAY;EAChB,GAAK,SAAS,KAAK,WAAmD,CAAC;EACvE,GAAI,WAAW,WAAW,CAAC;CAC7B;CACA,MAAM,EAAE,8BAA8B,MAAM,OAAO;CACnD,0BAA0B,WAAW,SAAS,eAAe,KAAK,SAAS;CAM3E,MAAM,OAA2B;EAC/B;EACA;CACF;CACA,MAAM,EAAE,eAAe,MAAM,OAAO;CACpC,MAAM,WAAW,IAAiB;AACpC","debug_id":"33908ac1-e0c2-5b7a-b255-a5d71dbe11d6"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { a as ZodBoolean, c as ZodNumber, d as ZodRecord, f as ZodString, g as $strict, h as $loose, i as ZodArray, l as ZodObject, m as ZodUnknown, n as RunnerContext, o as ZodEnum, p as ZodUnion, r as external_d_exports, s as ZodLiteral, t as HostDefinition, u as ZodOptional } from "../index-CspiP73o.mjs";
|
|
2
|
+
//#region src/runners/connect.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* BRIDGE runner for Connect hosts (uniform-runners phase 0): maps a
|
|
5
|
+
* hosts/connect/host.js definition onto the SAME service the classic
|
|
6
|
+
* `ph connect studio` command calls — no forked behavior. Real verbs
|
|
7
|
+
* (`build`, `serve`) arrive with later phases; their absence here is
|
|
8
|
+
* deliberate and surfaces through the verb-listing error.
|
|
9
|
+
*/
|
|
10
|
+
export declare const kind = "reactor";
|
|
11
|
+
/** Phase-2 schema (D2.d): `reactor` and `profile` validate strictly via the
|
|
12
|
+
* shared host-core schemas — a typo'd protocol key fails instead of silently
|
|
13
|
+
* not applying. `config` stays loose: it is runner-defined by design. */
|
|
14
|
+
export declare const hostSchema: ZodObject<{
|
|
15
|
+
name: ZodString;
|
|
16
|
+
runner: ZodObject<{
|
|
17
|
+
module: ZodString;
|
|
18
|
+
port: ZodOptional<ZodNumber>;
|
|
19
|
+
host: ZodOptional<ZodString>;
|
|
20
|
+
https: ZodOptional<ZodBoolean>;
|
|
21
|
+
openBrowser: ZodOptional<ZodBoolean>;
|
|
22
|
+
routes: ZodOptional<ZodUnion<readonly [ZodString, ZodLiteral<false>]>>;
|
|
23
|
+
plugins: ZodOptional<ZodArray<ZodUnion<readonly [ZodString, ZodObject<{
|
|
24
|
+
module: ZodString;
|
|
25
|
+
enabled: ZodOptional<ZodBoolean>;
|
|
26
|
+
verbs: ZodOptional<ZodUnion<readonly [ZodLiteral<"*">, ZodArray<ZodString>]>>;
|
|
27
|
+
config: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
28
|
+
}, $strict>]>>>;
|
|
29
|
+
}, $loose>;
|
|
30
|
+
config: ZodOptional<ZodObject<{}, $loose>>;
|
|
31
|
+
profile: ZodOptional<ZodObject<{
|
|
32
|
+
appId: ZodOptional<ZodString>;
|
|
33
|
+
name: ZodOptional<ZodString>;
|
|
34
|
+
description: ZodOptional<ZodString>;
|
|
35
|
+
icon: ZodOptional<ZodString>;
|
|
36
|
+
}, $strict>>;
|
|
37
|
+
reactor: ZodOptional<ZodObject<{
|
|
38
|
+
backends: ZodOptional<ZodRecord<ZodString, ZodObject<{
|
|
39
|
+
kind: ZodOptional<ZodEnum<{
|
|
40
|
+
"in-process": "in-process";
|
|
41
|
+
remote: "remote";
|
|
42
|
+
worker: "worker";
|
|
43
|
+
}>>;
|
|
44
|
+
storage: ZodOptional<ZodObject<{
|
|
45
|
+
kind: ZodEnum<{
|
|
46
|
+
idb: "idb";
|
|
47
|
+
memory: "memory";
|
|
48
|
+
path: "path";
|
|
49
|
+
postgres: "postgres";
|
|
50
|
+
}>;
|
|
51
|
+
dataDir: ZodOptional<ZodString>;
|
|
52
|
+
url: ZodOptional<ZodString>;
|
|
53
|
+
}, $strict>>;
|
|
54
|
+
readModel: ZodOptional<ZodObject<{
|
|
55
|
+
url: ZodOptional<ZodString>;
|
|
56
|
+
}, $strict>>;
|
|
57
|
+
packages: ZodOptional<ZodObject<{
|
|
58
|
+
cdnUrl: ZodOptional<ZodString>;
|
|
59
|
+
specs: ZodOptional<ZodArray<ZodString>>;
|
|
60
|
+
dynamic: ZodOptional<ZodBoolean>;
|
|
61
|
+
}, $strict>>;
|
|
62
|
+
remote: ZodOptional<ZodObject<{
|
|
63
|
+
host: ZodOptional<ZodString>;
|
|
64
|
+
url: ZodOptional<ZodString>;
|
|
65
|
+
}, $strict>>;
|
|
66
|
+
projection: ZodOptional<ZodObject<{
|
|
67
|
+
enabled: ZodOptional<ZodBoolean>;
|
|
68
|
+
dbPoolSize: ZodOptional<ZodNumber>;
|
|
69
|
+
}, $strict>>;
|
|
70
|
+
executors: ZodOptional<ZodObject<{
|
|
71
|
+
numWorkers: ZodOptional<ZodUnion<readonly [ZodNumber, ZodLiteral<"auto">]>>;
|
|
72
|
+
}, $strict>>;
|
|
73
|
+
}, $strict>>>;
|
|
74
|
+
placement: ZodOptional<ZodObject<{
|
|
75
|
+
primary: ZodOptional<ZodString>;
|
|
76
|
+
default: ZodOptional<ZodObject<{}, $loose>>;
|
|
77
|
+
}, $strict>>;
|
|
78
|
+
protocol: ZodOptional<ZodObject<{
|
|
79
|
+
featureFlags: ZodOptional<ZodObject<{
|
|
80
|
+
documentDecisions: ZodOptional<ZodBoolean>;
|
|
81
|
+
authEnforcement: ZodOptional<ZodBoolean>;
|
|
82
|
+
authGroups: ZodOptional<ZodBoolean>;
|
|
83
|
+
authConditions: ZodOptional<ZodBoolean>;
|
|
84
|
+
}, $strict>>;
|
|
85
|
+
createSignaturePolicy: ZodOptional<ZodEnum<{
|
|
86
|
+
legacy: "legacy";
|
|
87
|
+
"v2-required": "v2-required";
|
|
88
|
+
}>>;
|
|
89
|
+
unsupportedStoredDocuments: ZodOptional<ZodEnum<{
|
|
90
|
+
"read-only": "read-only";
|
|
91
|
+
refuse: "refuse";
|
|
92
|
+
}>>;
|
|
93
|
+
}, $strict>>;
|
|
94
|
+
workflows: ZodOptional<ZodBoolean>;
|
|
95
|
+
renown: ZodOptional<ZodObject<{
|
|
96
|
+
url: ZodOptional<ZodString>;
|
|
97
|
+
networkId: ZodOptional<ZodString>;
|
|
98
|
+
chainId: ZodOptional<ZodNumber>;
|
|
99
|
+
}, $strict>>;
|
|
100
|
+
packages: ZodOptional<ZodObject<{
|
|
101
|
+
registryUrl: ZodOptional<ZodString>;
|
|
102
|
+
}, $strict>>;
|
|
103
|
+
namespace: ZodOptional<ZodString>;
|
|
104
|
+
auth: ZodOptional<ZodObject<{
|
|
105
|
+
enabled: ZodOptional<ZodBoolean>;
|
|
106
|
+
admins: ZodOptional<ZodArray<ZodString>>;
|
|
107
|
+
renown: ZodOptional<ZodObject<{}, $loose>>;
|
|
108
|
+
}, $strict>>;
|
|
109
|
+
drives: ZodOptional<ZodArray<ZodObject<{
|
|
110
|
+
slug: ZodString;
|
|
111
|
+
id: ZodOptional<ZodString>;
|
|
112
|
+
projectHash: ZodOptional<ZodBoolean>;
|
|
113
|
+
name: ZodOptional<ZodString>;
|
|
114
|
+
icon: ZodOptional<ZodString>;
|
|
115
|
+
preferredEditor: ZodOptional<ZodString>;
|
|
116
|
+
sharingType: ZodOptional<ZodEnum<{
|
|
117
|
+
private: "private";
|
|
118
|
+
public: "public";
|
|
119
|
+
shared: "shared";
|
|
120
|
+
}>>;
|
|
121
|
+
availableOffline: ZodOptional<ZodBoolean>;
|
|
122
|
+
remote: ZodOptional<ZodObject<{
|
|
123
|
+
url: ZodString;
|
|
124
|
+
}, $strict>>;
|
|
125
|
+
}, $strict>>>;
|
|
126
|
+
}, $strict>>;
|
|
127
|
+
}, $loose>;
|
|
128
|
+
export declare function dev(host: HostDefinition, ctx: RunnerContext): Promise<void>;
|
|
129
|
+
/** `run` is dev-studio until the plugin phases give hosts a production
|
|
130
|
+
* runtime; `serve` (below) is the static production server. */
|
|
131
|
+
export declare const run: typeof dev;
|
|
132
|
+
/** P3.3 — `build`: the SAME service as classic `ph connect build`. */
|
|
133
|
+
export declare function build(host: HostDefinition, ctx: RunnerContext): Promise<void>;
|
|
134
|
+
/** P3.3 — `serve`: the SAME vite preview server as classic
|
|
135
|
+
* `ph connect preview` (static serve of a built Connect; run `build` first).
|
|
136
|
+
* The host's connect config (including a supervising compound's projected
|
|
137
|
+
* drives and the reactor projection) rides a serve override: the baked
|
|
138
|
+
* powerhouse.config.json merges with it at request time, and
|
|
139
|
+
* `runner.cspRegistrySync` (set by the compound's wiring) patches the baked
|
|
140
|
+
* CSP's script-src for the runtime registry — together these replace the
|
|
141
|
+
* ph-win-desktop sidecar's hand-rolled static server (desktop shape). */
|
|
142
|
+
export declare function serve(host: HostDefinition, ctx: RunnerContext): Promise<void>;
|
|
143
|
+
//#endregion
|
|
144
|
+
export {};
|
|
145
|
+
//# sourceMappingURL=connect.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.d.mts","names":[],"sources":["../../src/runners/connect.ts"],"mappings":";;;;;;;;;qBAuCa;;;;qBAKA,YAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgBrB;wBAsKoB,IACpB,MAAM,gBACN,KAAK,gBACJ;;;qBAYU,YAAG;;wBAGM,MACpB,MAAM,gBACN,KAAK,gBACJ;;;;;;;;;wBAsBmB,MACpB,MAAM,gBACN,KAAK,gBACJ"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="89f11518-df5f-57f9-9d5a-04d707d8f29c")}catch(e){}}();
|
|
3
|
+
import { a as looseObject, i as literal, l as string, n as array, o as number, r as boolean, u as union } from "../schemas-BQSPev1x.mjs";
|
|
4
|
+
import { a as pluginEntrySchema, i as normalizePluginEntries, n as entryActiveForVerb } from "../plugins-CHVv4qup.mjs";
|
|
5
|
+
import { a as mergeDefaultDrives, c as profileSchema, f as resolveDriveDeclaration, l as projectDrivesIntoConnect, u as reactorSchema } from "../host-schemas-CtPNRr5v-BQyKKFbS.mjs";
|
|
6
|
+
import { i as projectReactorToConnect, n as isStructuralMultiReactor, o as remoteBackendUrls } from "../dist-BqeDFgEy.mjs";
|
|
7
|
+
import { DEFAULT_CONNECT_STUDIO_PORT } from "@powerhousedao/shared/clis";
|
|
8
|
+
//#region src/runners/connect.ts
|
|
9
|
+
/**
|
|
10
|
+
* BRIDGE runner for Connect hosts (uniform-runners phase 0): maps a
|
|
11
|
+
* hosts/connect/host.js definition onto the SAME service the classic
|
|
12
|
+
* `ph connect studio` command calls — no forked behavior. Real verbs
|
|
13
|
+
* (`build`, `serve`) arrive with later phases; their absence here is
|
|
14
|
+
* deliberate and surfaces through the verb-listing error.
|
|
15
|
+
*/
|
|
16
|
+
const kind = "reactor";
|
|
17
|
+
/** Phase-2 schema (D2.d): `reactor` and `profile` validate strictly via the
|
|
18
|
+
* shared host-core schemas — a typo'd protocol key fails instead of silently
|
|
19
|
+
* not applying. `config` stays loose: it is runner-defined by design. */
|
|
20
|
+
const hostSchema = looseObject({
|
|
21
|
+
name: string().min(1),
|
|
22
|
+
runner: looseObject({
|
|
23
|
+
module: string(),
|
|
24
|
+
port: number().int().positive().optional(),
|
|
25
|
+
host: string().optional(),
|
|
26
|
+
https: boolean().optional(),
|
|
27
|
+
openBrowser: boolean().optional(),
|
|
28
|
+
routes: union([string(), literal(false)]).optional(),
|
|
29
|
+
plugins: array(pluginEntrySchema).optional()
|
|
30
|
+
}),
|
|
31
|
+
config: looseObject({}).optional(),
|
|
32
|
+
profile: profileSchema,
|
|
33
|
+
reactor: reactorSchema.optional()
|
|
34
|
+
});
|
|
35
|
+
/** The studio arg surface is wide (commonArgs + server args); the service only
|
|
36
|
+
* reads a known subset, and the repo's own tests build these objects the same
|
|
37
|
+
* way (Partial + cast — see connect-build.test.ts `mk()`). */
|
|
38
|
+
function toStudioArgs(host) {
|
|
39
|
+
const runner = host.runner;
|
|
40
|
+
return {
|
|
41
|
+
port: typeof runner.port === "number" ? runner.port : DEFAULT_CONNECT_STUDIO_PORT,
|
|
42
|
+
open: runner.openBrowser === true,
|
|
43
|
+
strictPort: runner.strictPort === true,
|
|
44
|
+
printUrls: true,
|
|
45
|
+
bindCLIShortcuts: false
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/** Merge the reactor-block projection (protocol → connect.reactor,
|
|
49
|
+
* backend kind → instance.reactorWorker, workflows → app.workflowsEnabled)
|
|
50
|
+
* into the host's connect config, which rides the studio caller-override.
|
|
51
|
+
* The host config wins on conflict (an explicit connect.* value is intent) —
|
|
52
|
+
* EXCEPT structural multi-reactor (P4.2): declaring a remote backend next to
|
|
53
|
+
* a local one IS the intent, so it beats a scaffold-default
|
|
54
|
+
* instance.multiReactor: false, and the remote's drive url merges FIRST into
|
|
55
|
+
* drives.defaultDrives (the first url entry is what the routing client dials). */
|
|
56
|
+
/** host.js reactor.drives -> the served drives.defaultDrives shapes: locals
|
|
57
|
+
* carry id/name/icon and the preferredEditor under its Connect alias `app`;
|
|
58
|
+
* remotes carry their URL. */
|
|
59
|
+
function declaredDrivesToDefaults(projectRoot, declarations) {
|
|
60
|
+
return declarations.map((declaration) => {
|
|
61
|
+
const drive = resolveDriveDeclaration(projectRoot, declaration);
|
|
62
|
+
if (drive.kind === "remote") return {
|
|
63
|
+
url: drive.remoteUrl,
|
|
64
|
+
name: drive.name,
|
|
65
|
+
icon: drive.icon ?? null
|
|
66
|
+
};
|
|
67
|
+
return {
|
|
68
|
+
local: true,
|
|
69
|
+
id: drive.id,
|
|
70
|
+
name: drive.name,
|
|
71
|
+
icon: drive.icon ?? null,
|
|
72
|
+
...drive.preferredEditor ? { app: drive.preferredEditor } : {}
|
|
73
|
+
};
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function callerOverride(host, ctx, verb = "dev") {
|
|
77
|
+
const base = host.config ?? {};
|
|
78
|
+
const reactor = host.reactor;
|
|
79
|
+
const entries = host.runner.plugins;
|
|
80
|
+
const composition = entries === void 0 ? void 0 : normalizePluginEntries(entries, `hosts/${host.name}/host.js`).filter((entry) => entryActiveForVerb(entry, verb)).map((entry) => ({
|
|
81
|
+
module: entry.module,
|
|
82
|
+
config: entry.config
|
|
83
|
+
}));
|
|
84
|
+
if (entries !== void 0) {
|
|
85
|
+
const all = normalizePluginEntries(entries, `hosts/${host.name}/host.js`);
|
|
86
|
+
console.log(`[connect] composition plan (verb=${verb}): ${composition?.length ?? 0} active of ${all.length} declared`);
|
|
87
|
+
for (const entry of all) {
|
|
88
|
+
const active = entryActiveForVerb(entry, verb);
|
|
89
|
+
const scope = entry.verbs === "*" ? "" : ` verbs=[${entry.verbs.join(",")}]`;
|
|
90
|
+
const cfg = Object.keys(entry.config ?? {});
|
|
91
|
+
console.log(`[connect] ${active ? "•" : "○"} ${entry.module}${scope}` + (cfg.length ? ` config: {${cfg.join(", ")}}` : "") + (active ? "" : " (inactive for this verb)"));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
const declared = reactor?.drives;
|
|
95
|
+
const declaredDefaults = declared && ctx ? declaredDrivesToDefaults(ctx.projectRoot, declared) : void 0;
|
|
96
|
+
const reactorRenown = reactor?.renown;
|
|
97
|
+
const reactorNamespace = reactor?.namespace;
|
|
98
|
+
base.drives = declaredDefaults ? {
|
|
99
|
+
...base.drives,
|
|
100
|
+
defaultDrives: mergeDefaultDrives(declaredDefaults, base.drives?.defaultDrives ?? []),
|
|
101
|
+
preserveStrategy: base.drives?.preserveStrategy ?? "preserve-all"
|
|
102
|
+
} : base.drives;
|
|
103
|
+
if (composition) base.composition = composition;
|
|
104
|
+
if (reactorRenown) base.renown = {
|
|
105
|
+
...reactorRenown,
|
|
106
|
+
...base.renown
|
|
107
|
+
};
|
|
108
|
+
if (reactorNamespace !== void 0) base.instance = {
|
|
109
|
+
...base.instance,
|
|
110
|
+
namespace: base.instance?.namespace ?? reactorNamespace
|
|
111
|
+
};
|
|
112
|
+
const { connect } = projectReactorToConnect(reactor);
|
|
113
|
+
const structural = isStructuralMultiReactor(reactor);
|
|
114
|
+
if (!connect.reactor && !connect.instance && !connect.app && !structural) return host.config !== void 0 || composition ? base : void 0;
|
|
115
|
+
const drives = structural ? projectDrivesIntoConnect({
|
|
116
|
+
createdDriveUrls: remoteBackendUrls(reactor),
|
|
117
|
+
configuredDefaultDrives: base.drives?.defaultDrives
|
|
118
|
+
}).drives : base.drives;
|
|
119
|
+
const instance = Object.keys(reactor?.backends ?? {}).length > 0 ? {
|
|
120
|
+
...base.instance,
|
|
121
|
+
...connect.instance,
|
|
122
|
+
...structural ? { multiReactor: true } : {}
|
|
123
|
+
} : {
|
|
124
|
+
...connect.instance,
|
|
125
|
+
...base.instance
|
|
126
|
+
};
|
|
127
|
+
return {
|
|
128
|
+
...base,
|
|
129
|
+
reactor: {
|
|
130
|
+
...connect.reactor,
|
|
131
|
+
...base.reactor
|
|
132
|
+
},
|
|
133
|
+
instance,
|
|
134
|
+
app: {
|
|
135
|
+
...connect.app,
|
|
136
|
+
...base.app
|
|
137
|
+
},
|
|
138
|
+
...drives ? { drives: {
|
|
139
|
+
...base.drives,
|
|
140
|
+
...drives
|
|
141
|
+
} } : {}
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
function withoutFavicon(config) {
|
|
145
|
+
if (config?.branding?.favicon === void 0) return config;
|
|
146
|
+
const { favicon: _, ...branding } = config.branding;
|
|
147
|
+
return {
|
|
148
|
+
...config,
|
|
149
|
+
branding
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
const routesOf = (host) => {
|
|
153
|
+
const routes = host.runner.routes;
|
|
154
|
+
return typeof routes === "string" || routes === false ? routes : void 0;
|
|
155
|
+
};
|
|
156
|
+
async function dev(host, ctx) {
|
|
157
|
+
const { runConnectStudio } = await import("../connect-studio-BehPZzN7.mjs");
|
|
158
|
+
await runConnectStudio(toStudioArgs(host), void 0, callerOverride(host, ctx, ctx.verb ?? "dev"), { routes: routesOf(host) });
|
|
159
|
+
}
|
|
160
|
+
/** `run` is dev-studio until the plugin phases give hosts a production
|
|
161
|
+
* runtime; `serve` (below) is the static production server. */
|
|
162
|
+
const run = dev;
|
|
163
|
+
/** P3.3 — `build`: the SAME service as classic `ph connect build`. */
|
|
164
|
+
async function build(host, ctx) {
|
|
165
|
+
const { runConnectBuild } = await import("../connect-build-BtKpvcQK.mjs");
|
|
166
|
+
const runner = host.runner;
|
|
167
|
+
await runConnectBuild({ outDir: typeof runner.outDir === "string" ? runner.outDir : "dist" }, callerOverride(host, ctx, ctx.verb ?? "build"), { routes: routesOf(host) });
|
|
168
|
+
}
|
|
169
|
+
/** P3.3 — `serve`: the SAME vite preview server as classic
|
|
170
|
+
* `ph connect preview` (static serve of a built Connect; run `build` first).
|
|
171
|
+
* The host's connect config (including a supervising compound's projected
|
|
172
|
+
* drives and the reactor projection) rides a serve override: the baked
|
|
173
|
+
* powerhouse.config.json merges with it at request time, and
|
|
174
|
+
* `runner.cspRegistrySync` (set by the compound's wiring) patches the baked
|
|
175
|
+
* CSP's script-src for the runtime registry — together these replace the
|
|
176
|
+
* ph-win-desktop sidecar's hand-rolled static server (desktop shape). */
|
|
177
|
+
async function serve(host, ctx) {
|
|
178
|
+
const { runConnectPreview } = await import("../connect-preview-8-qLgWKt.mjs");
|
|
179
|
+
const runner = host.runner;
|
|
180
|
+
await runConnectPreview({
|
|
181
|
+
port: typeof runner.port === "number" ? runner.port : DEFAULT_CONNECT_STUDIO_PORT,
|
|
182
|
+
outDir: typeof runner.outDir === "string" ? runner.outDir : "dist",
|
|
183
|
+
open: runner.openBrowser === true,
|
|
184
|
+
strictPort: runner.strictPort === true,
|
|
185
|
+
cors: true,
|
|
186
|
+
printUrls: true,
|
|
187
|
+
bindCLIShortcuts: false,
|
|
188
|
+
host: typeof runner.host === "string" ? runner.host : "127.0.0.1"
|
|
189
|
+
}, {
|
|
190
|
+
connect: withoutFavicon(callerOverride(host, ctx, ctx.verb ?? "serve")),
|
|
191
|
+
cspRegistrySync: runner.cspRegistrySync === true
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
//#endregion
|
|
195
|
+
export { build, dev, hostSchema, kind, run, serve };
|
|
196
|
+
|
|
197
|
+
//# sourceMappingURL=connect.mjs.map
|
|
198
|
+
//# debugId=89f11518-df5f-57f9-9d5a-04d707d8f29c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.mjs","sources":["../../src/runners/connect.ts"],"sourcesContent":["import {\n DEFAULT_CONNECT_STUDIO_PORT,\n type PHConnectCompositionEntry,\n type PHConnectDefaultDrive,\n type PHConnectRuntimeConfig,\n} from \"@powerhousedao/shared/clis\";\nimport {\n entryActiveForVerb,\n isStructuralMultiReactor,\n mergeDefaultDrives,\n normalizePluginEntries,\n pluginEntrySchema,\n profileSchema,\n resolveDriveDeclaration,\n type DriveDeclaration,\n type PluginEntry,\n projectDrivesIntoConnect,\n projectReactorToConnect,\n reactorSchema,\n remoteBackendUrls,\n type HostDefinition,\n type ReactorConfig,\n type RunnerContext,\n} from \"@powerhousedao/host-core\";\nimport { z } from \"zod\";\nimport type {\n ConnectBuildArgs,\n ConnectPreviewArgs,\n ConnectStudioArgs,\n} from \"../types.js\";\n\n/**\n * BRIDGE runner for Connect hosts (uniform-runners phase 0): maps a\n * hosts/connect/host.js definition onto the SAME service the classic\n * `ph connect studio` command calls — no forked behavior. Real verbs\n * (`build`, `serve`) arrive with later phases; their absence here is\n * deliberate and surfaces through the verb-listing error.\n */\n\nexport const kind = \"reactor\";\n\n/** Phase-2 schema (D2.d): `reactor` and `profile` validate strictly via the\n * shared host-core schemas — a typo'd protocol key fails instead of silently\n * not applying. `config` stays loose: it is runner-defined by design. */\nexport const hostSchema = z.looseObject({\n name: z.string().min(1),\n runner: z.looseObject({\n module: z.string(),\n port: z.number().int().positive().optional(),\n host: z.string().optional(),\n https: z.boolean().optional(),\n openBrowser: z.boolean().optional(),\n // The host's routes folder, project-relative; false for none. Default: hosts/connect/routes.\n routes: z.union([z.string(), z.literal(false)]).optional(),\n // THE COMPOSITION (rewire R3): plugin entries, presence is activation.\n plugins: z.array(pluginEntrySchema).optional(),\n }),\n config: z.looseObject({}).optional(),\n profile: profileSchema,\n reactor: reactorSchema.optional(),\n});\n\n/** The studio arg surface is wide (commonArgs + server args); the service only\n * reads a known subset, and the repo's own tests build these objects the same\n * way (Partial + cast — see connect-build.test.ts `mk()`). */\nfunction toStudioArgs(host: HostDefinition): ConnectStudioArgs {\n const runner = host.runner;\n const args: Partial<ConnectStudioArgs> = {\n port:\n typeof runner.port === \"number\"\n ? runner.port\n : DEFAULT_CONNECT_STUDIO_PORT,\n open: runner.openBrowser === true,\n strictPort: runner.strictPort === true,\n printUrls: true,\n bindCLIShortcuts: false,\n };\n return args as ConnectStudioArgs;\n}\n\n/** Merge the reactor-block projection (protocol → connect.reactor,\n * backend kind → instance.reactorWorker, workflows → app.workflowsEnabled)\n * into the host's connect config, which rides the studio caller-override.\n * The host config wins on conflict (an explicit connect.* value is intent) —\n * EXCEPT structural multi-reactor (P4.2): declaring a remote backend next to\n * a local one IS the intent, so it beats a scaffold-default\n * instance.multiReactor: false, and the remote's drive url merges FIRST into\n * drives.defaultDrives (the first url entry is what the routing client dials). */\n/** host.js reactor.drives -> the served drives.defaultDrives shapes: locals\n * carry id/name/icon and the preferredEditor under its Connect alias `app`;\n * remotes carry their URL. */\nfunction declaredDrivesToDefaults(\n projectRoot: string,\n declarations: readonly DriveDeclaration[],\n): PHConnectDefaultDrive[] {\n return declarations.map((declaration) => {\n const drive = resolveDriveDeclaration(projectRoot, declaration);\n if (drive.kind === \"remote\") {\n return {\n url: drive.remoteUrl!,\n name: drive.name,\n icon: drive.icon ?? null,\n };\n }\n return {\n local: true as const,\n id: drive.id,\n name: drive.name,\n icon: drive.icon ?? null,\n ...(drive.preferredEditor ? { app: drive.preferredEditor } : {}),\n };\n });\n}\n\nfunction callerOverride(\n host: HostDefinition,\n ctx?: RunnerContext,\n verb = \"dev\",\n): PHConnectRuntimeConfig | undefined {\n const base = (host.config ?? {}) as PHConnectRuntimeConfig;\n const reactor = host.reactor as ReactorConfig | undefined;\n\n // R3: the composition (verb-filtered, projected as DATA — the browser\n // pipeline resolves and runs the entries), declared drives, and the\n // reactor-core identity/namespace keys.\n const entries = (host.runner as { plugins?: PluginEntry[] }).plugins;\n const composition: PHConnectCompositionEntry[] | undefined =\n entries === undefined\n ? undefined\n : normalizePluginEntries(entries, `hosts/${host.name}/host.js`)\n .filter((entry) => entryActiveForVerb(entry, verb))\n .map((entry) => ({ module: entry.module, config: entry.config }));\n if (entries !== undefined) {\n // Change 2: show the composition plan on the `ph run connect` terminal.\n // The pipeline itself runs in the browser (hook execution logs to the\n // browser console); here we report WHAT will be served and for which verb.\n const all = normalizePluginEntries(entries, `hosts/${host.name}/host.js`);\n console.log(\n `[connect] composition plan (verb=${verb}): ${composition?.length ?? 0} active of ${all.length} declared`,\n );\n for (const entry of all) {\n const active = entryActiveForVerb(entry, verb);\n const scope =\n entry.verbs === \"*\"\n ? \"\"\n : ` verbs=[${(entry.verbs as string[]).join(\",\")}]`;\n const cfg = Object.keys(entry.config ?? {});\n console.log(\n `[connect] ${active ? \"•\" : \"○\"} ${entry.module}${scope}` +\n (cfg.length ? ` config: {${cfg.join(\", \")}}` : \"\") +\n (active ? \"\" : \" (inactive for this verb)\"),\n );\n }\n }\n const declared = (reactor as { drives?: DriveDeclaration[] } | undefined)\n ?.drives;\n const declaredDefaults =\n declared && ctx\n ? declaredDrivesToDefaults(ctx.projectRoot, declared)\n : undefined;\n const reactorRenown = (reactor as { renown?: unknown } | undefined)?.renown;\n const reactorNamespace = (reactor as { namespace?: string } | undefined)\n ?.namespace;\n base.drives = declaredDefaults\n ? {\n ...base.drives,\n defaultDrives: mergeDefaultDrives(\n declaredDefaults,\n base.drives?.defaultDrives ?? [],\n ),\n preserveStrategy: base.drives?.preserveStrategy ?? \"preserve-all\",\n }\n : base.drives;\n if (composition) base.composition = composition;\n if (reactorRenown)\n base.renown = { ...(reactorRenown as object), ...base.renown };\n if (reactorNamespace !== undefined)\n base.instance = {\n ...base.instance,\n namespace: base.instance?.namespace ?? reactorNamespace,\n } as typeof base.instance;\n const { connect } = projectReactorToConnect(reactor);\n const structural = isStructuralMultiReactor(reactor);\n if (!connect.reactor && !connect.instance && !connect.app && !structural) {\n // `base` is host.config when there is one; without, it may still carry the composition.\n return host.config !== undefined || composition ? base : undefined;\n }\n const drives = structural\n ? projectDrivesIntoConnect({\n createdDriveUrls: remoteBackendUrls(reactor),\n configuredDefaultDrives: base.drives?.defaultDrives,\n }).drives\n : base.drives;\n // When the host DECLARES backends, instance facts derive from them and win\n // over config defaults (declaring `kind: \"worker\"` is more explicit intent\n // than a scaffold's `reactorWorker: false`); without backends the P2 rule\n // stands — an explicit connect.* value wins over descriptive projection.\n const declaresBackends = Object.keys(reactor?.backends ?? {}).length > 0;\n const instance = declaresBackends\n ? {\n ...base.instance,\n ...connect.instance,\n ...(structural ? { multiReactor: true } : {}),\n }\n : { ...connect.instance, ...base.instance };\n return {\n ...base,\n reactor: { ...connect.reactor, ...base.reactor },\n instance: instance as never,\n app: { ...connect.app, ...base.app },\n ...(drives ? { drives: { ...base.drives, ...drives } } : {}),\n };\n}\n\n// The favicon was built into the dist; served, its path would mean nothing.\nfunction withoutFavicon(config: PHConnectRuntimeConfig | undefined) {\n if (config?.branding?.favicon === undefined) return config;\n const { favicon: _, ...branding } = config.branding;\n return { ...config, branding };\n}\n\nconst routesOf = (host: HostDefinition) => {\n const routes = host.runner.routes;\n return typeof routes === \"string\" || routes === false ? routes : undefined;\n};\n\nexport async function dev(\n host: HostDefinition,\n ctx: RunnerContext,\n): Promise<void> {\n const { runConnectStudio } = await import(\"../services/connect-studio.js\");\n await runConnectStudio(\n toStudioArgs(host),\n undefined,\n callerOverride(host, ctx, ctx.verb ?? \"dev\"),\n { routes: routesOf(host) },\n );\n}\n\n/** `run` is dev-studio until the plugin phases give hosts a production\n * runtime; `serve` (below) is the static production server. */\nexport const run = dev;\n\n/** P3.3 — `build`: the SAME service as classic `ph connect build`. */\nexport async function build(\n host: HostDefinition,\n ctx: RunnerContext,\n): Promise<void> {\n const { runConnectBuild } = await import(\"../services/connect-build.js\");\n const runner = host.runner;\n const args: Partial<ConnectBuildArgs> = {\n outDir: typeof runner.outDir === \"string\" ? runner.outDir : \"dist\",\n };\n // The host's config bakes in: its title, favicon, manifest, base path and loading shell.\n await runConnectBuild(\n args as ConnectBuildArgs,\n callerOverride(host, ctx, ctx.verb ?? \"build\"),\n { routes: routesOf(host) },\n );\n}\n\n/** P3.3 — `serve`: the SAME vite preview server as classic\n * `ph connect preview` (static serve of a built Connect; run `build` first).\n * The host's connect config (including a supervising compound's projected\n * drives and the reactor projection) rides a serve override: the baked\n * powerhouse.config.json merges with it at request time, and\n * `runner.cspRegistrySync` (set by the compound's wiring) patches the baked\n * CSP's script-src for the runtime registry — together these replace the\n * ph-win-desktop sidecar's hand-rolled static server (desktop shape). */\nexport async function serve(\n host: HostDefinition,\n ctx: RunnerContext,\n): Promise<void> {\n const { runConnectPreview } = await import(\"../services/connect-preview.js\");\n const runner = host.runner;\n const args: Partial<ConnectPreviewArgs> = {\n port:\n typeof runner.port === \"number\"\n ? runner.port\n : DEFAULT_CONNECT_STUDIO_PORT,\n outDir: typeof runner.outDir === \"string\" ? runner.outDir : \"dist\",\n open: runner.openBrowser === true,\n strictPort: runner.strictPort === true,\n cors: true,\n printUrls: true,\n bindCLIShortcuts: false,\n // Explicit IPv4 loopback (runner.host overrides): vite's default\n // \"localhost\" can bind ::1 only on Windows, and a supervising shell\n // (ph-win) probes 127.0.0.1 — the sidecar this replaces bound 127.0.0.1.\n host: typeof runner.host === \"string\" ? runner.host : \"127.0.0.1\",\n };\n const override = withoutFavicon(\n callerOverride(host, ctx, ctx.verb ?? \"serve\"),\n );\n await runConnectPreview(args as ConnectPreviewArgs, {\n connect: override,\n cspRegistrySync: runner.cspRegistrySync === true,\n });\n}\n"],"names":["z.looseObject","z.string","z.number","z.boolean","z.union","z.literal","z.array"],"mappings":"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","debug_id":"89f11518-df5f-57f9-9d5a-04d707d8f29c"}
|