@powerhousedao/host-core 6.4.0-next.1 → 6.4.0-next.2

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.
@@ -1,3 +1,4 @@
1
+ import { s as ControlRecord } from "./control-channel-eqvyUF03.mjs";
1
2
  import { z } from "zod";
2
3
  import { ArrayMapToken, ConcatToken, EnvToken, ItemToken, KeyToken, MapToken, OutputPath, OutputToken, RecordMapToken, RefFn, TOKEN_ESCAPE_KEY, TOKEN_KEYS, Template, Token, TokenFor, TokenKey, TokenMode, TokenableSchema, concatTokenSchema, envTokenSchema, envTokenable, findToken, forbidRef, isToken, itemTokenSchema, keyTokenSchema, mapTokenSchema, outputTokenSchema, ref, tokenKeyOf, tokenSchema, tokenable } from "@powerhousedao/shared/host-tokens";
3
4
  //#region src/host-ref.d.ts
@@ -2420,6 +2421,10 @@ interface ForegroundContext {
2420
2421
  * for this run, which reads its outputs from the live record and must
2421
2422
  * end (a command beside the stack). */
2422
2423
  beside: boolean;
2424
+ /** The stack as `ph run` addresses it (its run record's key). */
2425
+ stack?: string;
2426
+ /** Beside a stack that answers on a control channel: where. */
2427
+ control?: ControlRecord;
2423
2428
  }
2424
2429
  /**
2425
2430
  * One member of a running compound, in the fields a services manager shows
@@ -2829,4 +2834,4 @@ declare function memberCycle(projectRoot: string, prepared: readonly PreparedMem
2829
2834
  //#endregion
2830
2835
  export { validateHost as $, profileSchema as $t, ForegroundContext as A, findToken as An, ReactorHostInput as At, RunnerVerb as B, tokenable as Bn, compoundWiringSchema as Bt, planCompound as C, TokenFor as Cn, PACKAGE_NAME_PATTERN as Ct, BootIssue as D, concatTokenSchema as Dn, ReactorBackendKind as Dt, BootCheckContext as E, TokenableSchema as En, ReactorBackend as Et, ONE_SHOT_VERBS as F, mapTokenSchema as Fn, RunnerBase as Ft, hostSchemaIssues as G, findHostPackage as Gn, emitHostJsonSchema as Gt, SchemaIssue as H, HostLocation as Hn, declaredGenericCompoundHostSchema as Ht, RunnerContext as I, outputTokenSchema as In, RunnerKind as It, knownVerbIssues as J, locateHost as Jn, hostNameSchema as Jt, isSchemaLike as K, formatHostRef as Kn, emittedHostSchemas as Kt, RunnerError as L, ref as Ln, childWrapperSchema as Lt, HostSchemaIssues as M, isToken as Mn, ReactorProtocol as Mt, HostSchemaLike as N, itemTokenSchema as Nn, ReactorRemoteConfig as Nt, CONNECT_RUNNER as O, envTokenSchema as On, ReactorConfig as Ot, MemberStatus as P, keyTokenSchema as Pn, ReactorStorageConfig as Pt, validateDeclaredHost as Q, placementKeyIssues as Qt, RunnerIssue as R, tokenKeyOf as Rn, childrenSchema as Rt, memberForRef as S, Token as Sn, MemberProcess as St, applyChildWrapper as T, TokenMode as Tn, Profile as Tt, ValidateHostOptions as U, HostPackage as Un, declaredHostSchemas as Ut, STORE_VERBS as V, HostLoadError as Vn, connectReactorIssues as Vt, getVerb as W, HostRef as Wn, defineHostSchemas as Wt, packageBuildRefusal as X, resolvePackageRoot as Xn, memberProcessSchema as Xt, listVerbs as Y, parseHostRef as Yn, makeHostSchemas as Yt, resolveRunnerModule as Z, originOrUrlSchema as Zt, toStartedHandle as _, RecordMapToken as _n, HOST_NAME_PATTERN as _t, RunCompoundResult as a, refineConnectReactor as an, envSitesOf as at, PlanError as b, TOKEN_KEYS as bn, HostDefinition as bt, memberCycle as c, runnerKindSchema as cn, refKey as ct, runCompound as d, EnvToken as dn, ChildWrapper as dt, reactorBackendKindSchema as en, DeclaredIssue as et, stopStreamOf as f, ItemToken as fn, CompoundHost as ft, runnerHandleSchema as g, OutputToken as gn, HOST_NAME_MESSAGE as gt, StartedHandle as h, OutputPath as hn, HOST_NAME_MAX_LENGTH as ht, RunCompoundOptions as i, reactorSchema as in, checkTokenSites as it, HostSchemaIssue as j, forbidRef as jn, ReactorPackageConfig as jt, DeclaredHostOptions as k, envTokenable as kn, ReactorHost as kt, memberProcessOf as l, ArrayMapToken as ln, schemaAtPath as lt, RunnerHandleData as m, MapToken as mn, CompoundWiring as mt, ForegroundPlan as n, reactorHostSchema as nn, OutputsSchemaLookup as nt, STOP_STREAM_LIMIT_MS as o, refineStartOrder as on, outputRefsOf as ot, RunnerHandle as p, KeyToken as pn, CompoundHostInput as pt, kindShapeIssues as q, hostFileLabel as qn, genericCompoundHostSchema as qt, HoldStopOptions as r, reactorProtocolSchema as rn, checkOutputPaths as rt, holdStopRequests as s, runnerBaseSchema as sn, outputSitesOf as st, ForegroundCandidate as t, reactorBackendSchema as tn, OutputRef as tt, planForeground as u, ConcatToken as un, CONNECT_PRIMARY_MESSAGE as ut, CompoundPlan as v, RefFn as vn, HOST_REF_MESSAGE as vt, MemberDraft as w, TokenKey as wn, PlacementKeyIssue as wt, PlanMember as x, Template as xn, HostSchemas as xt, PlanEdge as y, TOKEN_ESCAPE_KEY as yn, HOST_REF_PATTERN as yt, RunnerModule as z, tokenSchema as zn, compoundHostSchema as zt };
2831
2836
  export {};
2832
- //# sourceMappingURL=compound-D2dh2VUh.d.mts.map
2837
+ //# sourceMappingURL=compound-L62ALvYc.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compound-L62ALvYc.d.mts","names":[],"sources":["../src/host-ref.ts","../src/host-schemas.ts","../src/resolve/declared.ts","../src/runner-resolver.ts","../src/child-wrapper.ts","../src/resolve/plan.ts","../src/runner-handle.ts","../src/compound.ts"],"mappings":";;;;;;;;;;;;;cAsBa,sBAAsB;EACjC,YAAY,iBAAiB;;;;UAQd;EACf;EACA;;UAGe;;EAEf;;EAEA;;;iBAIc,aAAa,cAAc;iBAyB3B,cAAc,KAAK;;;iBAMnB,cACd,gBACA,cAAc;;;;;;;;;iBA2BA,mBACd,kBACA;;;iBAkBc,gBACd,qBACA,cACA,eACC;;UAgCc;;;;EAIf;;EAEA;;EAEA;;EAEA,UAAU;;;;;;;;;;iBAgCI,WACd,qBACA,aACA,QAAQ,cACP;;;;;;;;;;;;;;;;cCnLU,mBAAiB;cACjB;cACA;cAEA,gBAAc,EAAA;;;;;cAUd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AAQ,KAAK,0BACb;;EAEE;;EAEA;;EAEA;IAED;UAKc;EACf,SAAS;;;EAGT,gBAAgB;;;;EAIhB,eAAe,iCAAiC;;iBAsB5B,YACpB,WAAW,gBACX,KAAK,eACL,SAAS,qBACR,QAAQ;;;;;;;;iBAmkBW,YACpB,qBACA,mBAAmB,mBAClB"}
@@ -1,3 +1,4 @@
1
+ import { closeProcessControlChannel, controlRecordOf, ensureProcessControlChannel } from "./control-channel.mjs";
1
2
  import { killTree } from "./kill-tree.mjs";
2
3
  import { createRequire } from "node:module";
3
4
  import { createHash } from "node:crypto";
@@ -3350,7 +3351,14 @@ function writeRunRecord(projectDir, record) {
3350
3351
  const target = recordPath(projectDir, recordKeyOf(record));
3351
3352
  const valid = runRecordSchema.parse(record);
3352
3353
  fs.mkdirSync(path.dirname(target), { recursive: true });
3353
- fs.writeFileSync(target, `${JSON.stringify(valid, null, 2)}\n`);
3354
+ const text = `${JSON.stringify(valid, null, 2)}\n`;
3355
+ if (valid.extra?.control === void 0) {
3356
+ fs.writeFileSync(target, text);
3357
+ return;
3358
+ }
3359
+ fs.rmSync(target, { force: true });
3360
+ fs.writeFileSync(target, text, { mode: 384 });
3361
+ if (process.platform !== "win32") fs.chmodSync(target, 384);
3354
3362
  }
3355
3363
  function clearRunRecord(projectDir, hostName, env = process.env) {
3356
3364
  try {
@@ -4430,6 +4438,7 @@ async function runCompound(hostInput, ctx, options) {
4430
4438
  key: m.key,
4431
4439
  host: m.member.host
4432
4440
  }));
4441
+ const control = keepsRecord && foreground !== void 0 ? (await ensureProcessControlChannel())?.record : void 0;
4433
4442
  if (wiring.cspRegistrySync && !prepared.some(takesCspRegistrySync)) console.warn(`${compoundFile}: config.cspRegistrySync is set, but no member's runner declares runner.cspRegistrySync (members run: ${prepared.map((m) => m.specifier).join(", ")}); the baked Connect CSP is not patched for the runtime registry.`);
4434
4443
  const started = [];
4435
4444
  const liveOutputs = /* @__PURE__ */ new Map();
@@ -4452,6 +4461,7 @@ async function runCompound(hostInput, ctx, options) {
4452
4461
  if (status?.status === "stopping") status.status = "stopped";
4453
4462
  }
4454
4463
  if (keepsRecord) clearRunRecord(projectRoot, recordKey);
4464
+ if (control) await closeProcessControlChannel();
4455
4465
  })();
4456
4466
  const death = {};
4457
4467
  try {
@@ -4529,7 +4539,9 @@ async function runCompound(hostInput, ctx, options) {
4529
4539
  ...argv.length > 0 ? { argv } : {},
4530
4540
  ...isForeground ? { foreground: {
4531
4541
  members: othersSeen,
4532
- beside
4542
+ beside,
4543
+ stack: recordKey,
4544
+ ...beside && controlRecordOf(live) ? { control: controlRecordOf(live) } : {}
4533
4545
  } } : {}
4534
4546
  }), where);
4535
4547
  status.pid = process.pid;
@@ -4581,7 +4593,10 @@ async function runCompound(hostInput, ctx, options) {
4581
4593
  pid: process.pid,
4582
4594
  startedAt: (/* @__PURE__ */ new Date()).toISOString(),
4583
4595
  members: recordMembers,
4584
- ...options.recordExtra ? { extra: options.recordExtra } : {}
4596
+ ...options.recordExtra || control ? { extra: {
4597
+ ...options.recordExtra,
4598
+ ...control ? { control } : {}
4599
+ } } : {}
4585
4600
  });
4586
4601
  }
4587
4602
  const exit = options.exit ?? ((code) => process.exit(code));
@@ -4704,4 +4719,4 @@ async function memberCycle(projectRoot, prepared) {
4704
4719
  //#endregion
4705
4720
  export { computeOutputsHash as $, runProvideHook as $n, resolveHostPlugins as $t, STOP_RUN_TIMEOUT_MS as A, placementKeyIssues as An, resolveHostOutputs as At, probeRun as B, runnerKindSchema as Bn, checkTokenSites as Bt, applyChildWrapper as C, emitHostJsonSchema as Cn, packageBuildRefusal as Ct, COMPOUND_MEMBER_ENV as D, makeHostSchemas as Dn, TokenResolutionError as Dt, spawnHost as E, hostNameSchema as En, validateHost as Et, stopChannelPath as F, reactorProtocolSchema as Fn, BUILTIN_ENV_NAMES as Ft, writeRunRecord as G, normalizePluginEntries as Gn, schemaAtPath as Gt, readRunRecord as H, entryActiveForVerb as Hn, outputRefsOf as Ht, stopRun as I, reactorSchema as In, isBuiltinEnvName as It, checkRunnerArgv as J, pluginEntrySchema as Jn, formatPath as Jt, runRecordMemberSchema as K, normalizePluginEntry as Kn, collectTokenSites as Kt, clearRunRecord as L, refineConnectReactor as Ln, substituteBuiltinEnv as Lt, installStopChannel as M, reactorBackendKindSchema as Mn, PlanError as Mt, listenForStop as N, reactorBackendSchema as Nn, memberForRef as Nt, takeCompoundMember as O, memberProcessSchema as On, describeMapElements as Ot, requestStop as P, reactorHostSchema as Pn, planCompound as Pt, OUTPUTS_FILE as Q, runObserveHookSequential as Qn, findDeadConnectConfig as Qt, isPidAlive as R, refineStartOrder as Rn, findRemovedForms as Rt, resolveUserDataPlaceholders as S, defineHostSchemas as Sn, tokenable as Sr, listVerbs as St, SpawnHostError as T, genericCompoundHostSchema as Tn, validateDeclaredHost as Tt, recordKeyOf as U, hostTypeSatisfies as Un, outputSitesOf as Ut, readProjectName as V, PluginError as Vn, envSitesOf as Vt, runRecordKey as W, mergeContributions as Wn, refKey as Wt, splitCompoundArgv as X, resolveOrder as Xn, renderTokens as Xt, isRunnerArgsSchema as Y, registerHostType as Yn, isPlainObject as Yt, splitRunArgv as Z, runObserveHook as Zn, unwrapEscapes as Zt, processResolveEnv as _, compoundHostSchema as _n, mapTokenSchema as _r, getVerb as _t, memberProcessOf as a, locateHost as an, drivesSchema as ar, loadHost as at, runnerOutputsSchema as b, declaredGenericCompoundHostSchema as bn, tokenKeyOf as br, kindShapeIssues as bt, prepareMember as c, CONNECT_PRIMARY_MESSAGE as cn, TOKEN_KEYS as cr, probeHostsFolder as ct, takesCspRegistrySync as d, HOST_NAME_PATTERN as dn, envTokenable as dr, stripComments as dt, resolvePluginContributions as en, runTransformHook as er, describeHostOutputs as et, runnerHandleSchema as f, HOST_REF_MESSAGE as fn, findToken as fr, withoutHostsMessage as ft, loadProducers as g, childrenSchema as gn, keyTokenSchema as gr, STORE_VERBS as gt, OUTPUT_DATA_DIRS_ENV as h, childWrapperSchema as hn, itemTokenSchema as hr, RunnerError as ht, memberCycle as i, hostFileLabel as in, driveDeclarationSchema as ir, lintOutputsFile as it, askToStop as j, profileSchema as jn, unsetEnvMessage as jt, STOP_ON_STDIN_ENV as k, originOrUrlSchema as kn, emptyMaps as kt, runCompound as l, HOST_NAME_MAX_LENGTH as ln, concatTokenSchema as lr, readOutputsFileHash as lt, compoundOutputSource as m, PACKAGE_NAME_PATTERN as mn, isToken as mr, ONE_SHOT_VERBS as mt, compoundStartVerb as n, findHostPackage as nn, defaultConnectComposition as nr, lintHostImportGraph as nt, memberVerbOf as o, parseHostRef as on, projectDriveIdWith as or, loadHostFresh as ot, toStartedHandle as p, HOST_REF_PATTERN as pn, forbidRef as pr, CONNECT_RUNNER as pt, runRecordSchema as q, pluginEntryObjectSchema as qn, describeToken as qt, holdStopRequests as r, formatHostRef as rn, buildDriveDeclarationSchema as rr, lintHostImports as rt, planForeground as s, resolvePackageRoot as sn, TOKEN_ESCAPE_KEY as sr, moduleRootOf as st, STOP_STREAM_LIMIT_MS as t, HostLoadError as tn, CONNECT_PLUGIN_OWNED_SLICES as tr, findNonStaticValue as tt, stopStreamOf as u, HOST_NAME_MESSAGE as un, envTokenSchema as ur, scanHostImports as ut, producerOutputsSchemas as v, compoundWiringSchema as vn, outputTokenSchema as vr, hostSchemaIssues as vt, SPAWN_STOPPING_NOTE as w, emittedHostSchemas as wn, resolveRunnerModule as wt, defaultUserDataDir as x, declaredHostSchemas as xn, tokenSchema as xr, knownVerbIssues as xt, runRecordOutputSource as y, connectReactorIssues as yn, ref as yr, isSchemaLike as yt, listRunRecords as z, runnerBaseSchema as zn, checkOutputPaths as zt };
4706
4721
 
4707
- //# sourceMappingURL=compound-BWLJ0KBw.mjs.map
4722
+ //# sourceMappingURL=compound-Q9sZSEZF.mjs.map