@juicesharp/rpiv-pi 2.13.7 → 2.13.9

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.
Files changed (75) hide show
  1. package/docs/architecture.md +14 -5
  2. package/docs/lanes.md +8 -2
  3. package/extensions/rpiv-core/agents-inject.ts +3 -3
  4. package/extensions/rpiv-core/agents-manifest.ts +3 -3
  5. package/extensions/rpiv-core/agents-sync.ts +19 -15
  6. package/extensions/rpiv-core/agents.ts +6 -6
  7. package/extensions/rpiv-core/built-in-workflows.ts +6 -6
  8. package/extensions/rpiv-core/built-ins/citations.ts +2 -2
  9. package/extensions/rpiv-core/built-ins/design.ts +2 -2
  10. package/extensions/rpiv-core/built-ins/elaboration.ts +3 -3
  11. package/extensions/rpiv-core/built-ins/gate-passes.ts +2 -2
  12. package/extensions/rpiv-core/built-ins/gate-rosters.ts +2 -2
  13. package/extensions/rpiv-core/built-ins/gates.ts +3 -3
  14. package/extensions/rpiv-core/built-ins/goal-baseline.ts +1 -1
  15. package/extensions/rpiv-core/built-ins/grade-panel.ts +4 -4
  16. package/extensions/rpiv-core/built-ins/index.ts +16 -16
  17. package/extensions/rpiv-core/built-ins/plan-cite.ts +4 -4
  18. package/extensions/rpiv-core/built-ins/plan-phases.ts +2 -2
  19. package/extensions/rpiv-core/built-ins/priors.ts +2 -2
  20. package/extensions/rpiv-core/built-ins/reconcile.ts +2 -2
  21. package/extensions/rpiv-core/built-ins/scope-checks.ts +3 -3
  22. package/extensions/rpiv-core/built-ins/slice-checks.ts +5 -5
  23. package/extensions/rpiv-core/built-ins/slices.ts +2 -2
  24. package/extensions/rpiv-core/built-ins/verdict-collector.ts +1 -1
  25. package/extensions/rpiv-core/built-ins/verdict-core.ts +1 -1
  26. package/extensions/rpiv-core/built-ins/verdict-outcome.ts +2 -2
  27. package/extensions/rpiv-core/git-context.ts +1 -1
  28. package/extensions/rpiv-core/guidance.ts +1 -1
  29. package/extensions/rpiv-core/index.ts +14 -14
  30. package/extensions/rpiv-core/lane-console.ts +40 -8
  31. package/extensions/rpiv-core/lane-dock-editor.ts +1 -1
  32. package/extensions/rpiv-core/lane-dock.ts +2 -2
  33. package/extensions/rpiv-core/lane-list.ts +4 -4
  34. package/extensions/rpiv-core/lane-progress.ts +5 -5
  35. package/extensions/rpiv-core/lane-relay-ui.ts +1 -1
  36. package/extensions/rpiv-core/lane-streaming.ts +1 -1
  37. package/extensions/rpiv-core/lane-switcher.ts +6 -6
  38. package/extensions/rpiv-core/lane-transcript-disk.ts +2 -2
  39. package/extensions/rpiv-core/lane-transcript-view.ts +3 -3
  40. package/extensions/rpiv-core/loaded-siblings.ts +41 -0
  41. package/extensions/rpiv-core/meta/checks.ts +2 -2
  42. package/extensions/rpiv-core/meta/presets.ts +3 -3
  43. package/extensions/rpiv-core/meta/unit-graph.ts +4 -4
  44. package/extensions/rpiv-core/meta/wip-guard.ts +3 -3
  45. package/extensions/rpiv-core/models-config-sources.ts +1 -1
  46. package/extensions/rpiv-core/models-config-validate.ts +2 -2
  47. package/extensions/rpiv-core/outcome-derivation.ts +2 -2
  48. package/extensions/rpiv-core/package-checks.ts +52 -20
  49. package/extensions/rpiv-core/pi-installer.ts +1 -1
  50. package/extensions/rpiv-core/pipeline-pointer.ts +1 -1
  51. package/extensions/rpiv-core/prune-legacy-siblings.ts +2 -2
  52. package/extensions/rpiv-core/register-built-in-workflows.ts +2 -2
  53. package/extensions/rpiv-core/rpiv-models/command.ts +4 -4
  54. package/extensions/rpiv-core/rpiv-models/index.ts +3 -3
  55. package/extensions/rpiv-core/rpiv-models/items.ts +2 -2
  56. package/extensions/rpiv-core/rpiv-models/overrides.ts +3 -3
  57. package/extensions/rpiv-core/run-lane-registry.ts +5 -5
  58. package/extensions/rpiv-core/run-lane-types.ts +2 -2
  59. package/extensions/rpiv-core/sdk-workflow-host.ts +7 -7
  60. package/extensions/rpiv-core/session-capture.ts +3 -3
  61. package/extensions/rpiv-core/session-hooks.ts +18 -13
  62. package/extensions/rpiv-core/setup-command.ts +16 -9
  63. package/extensions/rpiv-core/siblings.ts +18 -3
  64. package/extensions/rpiv-core/skill-bracket.ts +2 -2
  65. package/extensions/rpiv-core/skill-contracts-source.ts +3 -3
  66. package/extensions/rpiv-core/subagent-usage.ts +1 -1
  67. package/extensions/rpiv-core/update-agents-command.ts +6 -4
  68. package/extensions/rpiv-core/workflow-execution-host.ts +7 -7
  69. package/extensions/rpiv-core/workflow-question-warp-bridge.ts +3 -3
  70. package/extensions/rpiv-core/workflows/build.ts +3 -3
  71. package/extensions/rpiv-core/workflows/polish.ts +2 -2
  72. package/extensions/rpiv-core/workflows/shared.ts +2 -2
  73. package/extensions/rpiv-core/workflows/ship.ts +2 -2
  74. package/extensions/rpiv-core/workflows/vet.ts +2 -2
  75. package/package.json +2 -2
@@ -16,8 +16,8 @@
16
16
 
17
17
  import type { RunRecap } from "@juicesharp/rpiv-workflow";
18
18
 
19
- import { addLaneUsage, type LaneUsage, toLaneUsage } from "./lane-usage.js";
20
- import { emitQuestionAsked, emitQuestionResolved } from "./question-lifecycle.js";
19
+ import { addLaneUsage, type LaneUsage, toLaneUsage } from "./lane-usage.ts";
20
+ import { emitQuestionAsked, emitQuestionResolved } from "./question-lifecycle.ts";
21
21
  import type {
22
22
  DisplayRow,
23
23
  LaneEntry,
@@ -26,7 +26,7 @@ import type {
26
26
  LaneStatus,
27
27
  PendingInput,
28
28
  UnitLane,
29
- } from "./run-lane-types.js";
29
+ } from "./run-lane-types.ts";
30
30
 
31
31
  // ---------------------------------------------------------------------------
32
32
  // Lane data model — the type surface lives in ./run-lane-types.ts (this
@@ -46,8 +46,8 @@ export type {
46
46
  LaneStatus,
47
47
  PendingInput,
48
48
  UnitLane,
49
- } from "./run-lane-types.js";
50
- export { SINGLE_UNIT_KEY } from "./run-lane-types.js";
49
+ } from "./run-lane-types.ts";
50
+ export { SINGLE_UNIT_KEY } from "./run-lane-types.ts";
51
51
 
52
52
  type Listener = () => void;
53
53
 
@@ -4,7 +4,7 @@
4
4
  * requests, unit sub-lanes, stage progress, lane entries, dock display rows)
5
5
  * with zero runtime surface except the SINGLE_UNIT_KEY sentinel const. The
6
6
  * registry owns all state and behavior and re-exports everything declared
7
- * here — consumers keep importing from "./run-lane-registry.js", never from
7
+ * here — consumers keep importing from "./run-lane-registry.ts", never from
8
8
  * this module directly.
9
9
  */
10
10
 
@@ -12,7 +12,7 @@ import type { ExtensionUIContext } from "@earendil-works/pi-coding-agent";
12
12
 
13
13
  import type { RunRecap } from "@juicesharp/rpiv-workflow";
14
14
 
15
- import type { LaneUsage } from "./lane-usage.js";
15
+ import type { LaneUsage } from "./lane-usage.ts";
16
16
 
17
17
  /** Lane status taxonomy — mirrors rpiv-workflow's RunTermination.status (types.ts:145-149). */
18
18
  export type LaneStatus = "running" | "completed" | "failed" | "aborted" | "cancelled";
@@ -54,19 +54,19 @@ import {
54
54
  } from "@earendil-works/pi-coding-agent";
55
55
  import { parseModelKey } from "@juicesharp/rpiv-config";
56
56
  import type { ModelSelection, WorkflowHostContext, WorkflowSessionContext } from "@juicesharp/rpiv-workflow";
57
- import { armBashWatchdog, type BashWatchdog } from "./bash-timeout.js";
58
- import { createLaneRelayUiContext } from "./lane-relay-ui.js";
59
- import { createLaneSessionView } from "./lane-streaming.js";
60
- import { harvestToolDefs } from "./lane-tool-defs.js";
61
- import { childModelServices } from "./pi-compat.js";
57
+ import { armBashWatchdog, type BashWatchdog } from "./bash-timeout.ts";
58
+ import { createLaneRelayUiContext } from "./lane-relay-ui.ts";
59
+ import { createLaneSessionView } from "./lane-streaming.ts";
60
+ import { harvestToolDefs } from "./lane-tool-defs.ts";
61
+ import { childModelServices } from "./pi-compat.ts";
62
62
  import {
63
63
  captureFinalSnapshot,
64
64
  getLane,
65
65
  SINGLE_UNIT_KEY,
66
66
  setCurrentSession,
67
67
  setLaneSessionFile,
68
- } from "./run-lane-registry.js";
69
- import { recordSubagentCompletion } from "./subagent-usage.js";
68
+ } from "./run-lane-registry.ts";
69
+ import { recordSubagentCompletion } from "./subagent-usage.ts";
70
70
 
71
71
  /**
72
72
  * Launcher-only "ambient observer" extensions: they register session-lifecycle
@@ -19,9 +19,9 @@
19
19
 
20
20
  import type { ExtensionAPI, ExtensionUIContext, ModelRegistry } from "@earendil-works/pi-coding-agent";
21
21
  import { parseModelKey } from "@juicesharp/rpiv-config";
22
- import { isLaneRelayUiContext } from "./lane-relay-ui.js";
23
- import type { ModelThinkingLevelValue } from "./models-config.js";
24
- import { isStaleCtxError } from "./utils.js";
22
+ import { isLaneRelayUiContext } from "./lane-relay-ui.ts";
23
+ import type { ModelThinkingLevelValue } from "./models-config.ts";
24
+ import { isStaleCtxError } from "./utils.ts";
25
25
 
26
26
  /** First parameter type of pi.setModel() — avoids importing Pi's Model<Api> generic. */
27
27
  export type CapturedModel = Parameters<ExtensionAPI["setModel"]>[0];
@@ -18,20 +18,21 @@ import {
18
18
  type SyncResult,
19
19
  summarizeCleanupSkips,
20
20
  syncBundledAgents,
21
- } from "./agents.js";
22
- import { renderBanner } from "./banner.js";
23
- import { FLAG_DEBUG, MSG_TYPE_GIT_CONTEXT, MSG_TYPE_POST_COMPACT_CONTEXT } from "./constants.js";
21
+ } from "./agents.ts";
22
+ import { renderBanner } from "./banner.ts";
23
+ import { FLAG_DEBUG, MSG_TYPE_GIT_CONTEXT, MSG_TYPE_POST_COMPACT_CONTEXT } from "./constants.ts";
24
24
  import {
25
25
  clearGitContextCache,
26
26
  isGitMutatingCommand,
27
27
  refreshGitContextForInjection,
28
28
  resetInjectedMarker,
29
29
  takeGitContextIfChanged,
30
- } from "./git-context.js";
31
- import { clearInjectionState, handleToolCallGuidance, injectRootGuidance, takeRootGuidance } from "./guidance.js";
32
- import { findMissingSiblings } from "./package-checks.js";
33
- import { injectPipelinePointer, PIPELINE_POINTER } from "./pipeline-pointer.js";
34
- import { isStaleCtxError } from "./utils.js";
30
+ } from "./git-context.ts";
31
+ import { clearInjectionState, handleToolCallGuidance, injectRootGuidance, takeRootGuidance } from "./guidance.ts";
32
+ import { readLoadedSiblingSources } from "./loaded-siblings.ts";
33
+ import { findMissingSiblings, type LoadedSiblingSources } from "./package-checks.ts";
34
+ import { injectPipelinePointer, PIPELINE_POINTER } from "./pipeline-pointer.ts";
35
+ import { isStaleCtxError } from "./utils.ts";
35
36
 
36
37
  /**
37
38
  * Module-local latch for the startup-maintenance block (per-cwd agent cleanup,
@@ -137,14 +138,18 @@ async function onSessionStart(
137
138
  if (startupMaintenanceDone) return;
138
139
  startupMaintenanceDone = true;
139
140
 
140
- const cleanup = cleanupPerCwdAgents(ctx.cwd);
141
- const agents = syncBundledAgents(false);
141
+ // One loaded-siblings snapshot for the whole maintenance pass (#216): every
142
+ // extension has registered by session_start, and cleanup, sync and the banner
143
+ // must agree on which siblings are present.
144
+ const loaded = readLoadedSiblingSources(pi);
145
+ const cleanup = cleanupPerCwdAgents(ctx.cwd, loaded);
146
+ const agents = syncBundledAgents(false, loaded);
142
147
  // Banner only when a UI is bound; the filesystem work above runs regardless,
143
148
  // so a headless first session still installs agents.
144
149
  if (ctx.hasUI) {
145
150
  notifyCleanup(ctx.ui, cleanup);
146
151
  notifyAgentSyncDrift(ctx.ui, agents);
147
- warnMissingSiblings(ctx.ui);
152
+ warnMissingSiblings(ctx.ui, loaded);
148
153
  }
149
154
  }
150
155
 
@@ -262,8 +267,8 @@ function notifyCleanup(ui: UI, result: CleanupResult): void {
262
267
  }
263
268
  }
264
269
 
265
- function warnMissingSiblings(ui: UI): void {
266
- const missing = findMissingSiblings();
270
+ function warnMissingSiblings(ui: UI, loaded: LoadedSiblingSources): void {
271
+ const missing = findMissingSiblings(loaded);
267
272
  if (missing.length === 0) return;
268
273
  // Leading newline so Pi's "Warning: " severity prefix sits on its own
269
274
  // line; every box row then gets Pi's 1-space continuation indent
@@ -1,5 +1,7 @@
1
1
  /**
2
- * /rpiv-setup — installs any SIBLINGS not present in the active Pi settings file
2
+ * /rpiv-setup — installs any SIBLINGS neither declared in the active Pi settings
3
+ * file nor already loaded (bundled in another package, a project install — #216:
4
+ * installing those again makes both copies register the same tools)
3
5
  * and prunes deprecated entries (e.g. the unscoped `npm:pi-subagents` from
4
6
  * the rpiv-pi 0.12.x → 0.14.0 line). Both mutations are previewed in the
5
7
  * confirmation dialog and only executed after the user agrees.
@@ -9,11 +11,12 @@
9
11
  */
10
12
 
11
13
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
12
- import { findMissingSiblings } from "./package-checks.js";
13
- import { spawnPiInstall } from "./pi-installer.js";
14
- import { findLegacySiblings, pruneLegacySiblings } from "./prune-legacy-siblings.js";
15
- import type { SiblingPlugin } from "./siblings.js";
16
- import { getPiAgentSettingsPath, toErrorMessage } from "./utils.js";
14
+ import { readLoadedSiblingSources } from "./loaded-siblings.ts";
15
+ import { findMissingSiblings } from "./package-checks.ts";
16
+ import { spawnPiInstall } from "./pi-installer.ts";
17
+ import { findLegacySiblings, pruneLegacySiblings } from "./prune-legacy-siblings.ts";
18
+ import type { SiblingPlugin } from "./siblings.ts";
19
+ import { getPiAgentSettingsPath, toErrorMessage } from "./utils.ts";
17
20
 
18
21
  const INSTALL_TIMEOUT_MS = 120_000;
19
22
  const STDERR_SNIPPET_CHARS = 300;
@@ -56,17 +59,21 @@ function buildConfirmBody(missing: SiblingPlugin[], legacyEntries: string[]): st
56
59
  export function registerSetupCommand(pi: ExtensionAPI): void {
57
60
  pi.registerCommand("rpiv-setup", {
58
61
  description: "Install rpiv-pi's sibling extension plugins",
59
- handler: handleSetupCommand,
62
+ handler: (args, ctx) => handleSetupCommand(args, ctx, pi),
60
63
  });
61
64
  }
62
65
 
63
- async function handleSetupCommand(_args: string, ctx: { hasUI: boolean; ui: UI }): Promise<void> {
66
+ async function handleSetupCommand(
67
+ _args: string,
68
+ ctx: { hasUI: boolean; ui: UI },
69
+ pi: Pick<ExtensionAPI, "getAllTools" | "getCommands">,
70
+ ): Promise<void> {
64
71
  if (!ctx.hasUI) {
65
72
  ctx.ui.notify(MSG_INTERACTIVE_ONLY, "error");
66
73
  return;
67
74
  }
68
75
 
69
- const missing = findMissingSiblings();
76
+ const missing = findMissingSiblings(readLoadedSiblingSources(pi));
70
77
  const legacyEntries = findLegacySiblings();
71
78
  if (missing.length === 0 && legacyEntries.length === 0) {
72
79
  ctx.ui.notify(MSG_NOTHING_TO_DO, "info");
@@ -6,15 +6,28 @@
6
6
  * /rpiv-setup installer (setup-command.ts). Add a sibling here and every
7
7
  * consumer picks it up automatically.
8
8
  *
9
- * Detection is filesystem-based via a regex over the active Pi settings file
10
- * — no runtime import of sibling packages (keeps rpiv-core pure-orchestrator).
9
+ * Detection (package-checks.ts) is the union of a regex over the active Pi
10
+ * settings file and what is actually loaded: `matches` is also tested against
11
+ * the source path of every loaded tool / extension command, and `marker` names
12
+ * the presence slot of a sibling that registers neither (#216). No runtime
13
+ * import of sibling packages (keeps rpiv-core pure-orchestrator).
11
14
  */
12
15
 
13
16
  export interface SiblingPlugin {
14
17
  /** Install spec passed to `pi install`. Prefixed with `npm:` for Pi's installer. */
15
18
  readonly pkg: string;
16
- /** Case-insensitive regex that matches the package in settings.json. */
19
+ /**
20
+ * Case-insensitive regex that matches the package in settings.json AND in the
21
+ * source path of its loaded extension (e.g. `…/@juicesharp/rpiv-todo/index.ts`
22
+ * bundled inside another package).
23
+ */
17
24
  readonly matches: RegExp;
25
+ /**
26
+ * `Symbol.for` key the sibling sets on `globalThis` when it loads — only for a
27
+ * sibling with no tool or command to find by source path. Keep in sync with
28
+ * the sibling's own constant.
29
+ */
30
+ readonly marker?: string;
18
31
  /** What the sibling provides — shown in /rpiv-setup confirmation and reports. */
19
32
  readonly provides: string;
20
33
  }
@@ -55,6 +68,8 @@ export const SIBLINGS: readonly SiblingPlugin[] = [
55
68
  {
56
69
  pkg: "npm:@juicesharp/rpiv-args",
57
70
  matches: /rpiv-args(?![-\w])/i,
71
+ // Hooks events only — nothing to find by source path (`LOADED_MARKER`, rpiv-args/index.ts).
72
+ marker: "@juicesharp/rpiv-args:loaded",
58
73
  provides: "skill-argument resolver — substitutes $N/$ARGUMENTS in skill bodies",
59
74
  },
60
75
  {
@@ -22,14 +22,14 @@
22
22
  */
23
23
 
24
24
  import { type ExtensionAPI, type InputEvent, parseSkillBlock } from "@earendil-works/pi-coding-agent";
25
- import { loadModelsConfig, type ModelThinkingLevelValue } from "./models-config.js";
25
+ import { loadModelsConfig, type ModelThinkingLevelValue } from "./models-config.ts";
26
26
  import {
27
27
  applyEffectiveModel,
28
28
  applyOrSkipIfStale,
29
29
  type BaselineSnapshot,
30
30
  getCapturedModel,
31
31
  restoreBaseline,
32
- } from "./session-capture.js";
32
+ } from "./session-capture.ts";
33
33
 
34
34
  const SKILL_PREFIX = "/skill:";
35
35
 
@@ -20,8 +20,8 @@ import type {
20
20
  SchemaCompatResult,
21
21
  SkillContract,
22
22
  } from "@juicesharp/rpiv-workflow/registration";
23
- import { BUNDLED_SKILLS_DIR } from "./paths.js";
24
- import { isModuleNotFound } from "./utils.js";
23
+ import { BUNDLED_SKILLS_DIR } from "./paths.ts";
24
+ import { isModuleNotFound } from "./utils.ts";
25
25
 
26
26
  const JSON_SCHEMA_ROOT_KEYWORDS = new Set([
27
27
  "type",
@@ -253,7 +253,7 @@ export async function registerSkillContractsSource(): Promise<void> {
253
253
  // edge off the entry path: it only resolves after the `/startup` import above
254
254
  // already succeeded, and a missing/non-resolvable sibling degrades to the
255
255
  // isModuleNotFound no-op below instead of crashing the extension.
256
- const { registerOutcomeDerivation } = await import("./outcome-derivation.js");
256
+ const { registerOutcomeDerivation } = await import("./outcome-derivation.ts");
257
257
  await registerOutcomeDerivation();
258
258
  } catch (err) {
259
259
  if (isModuleNotFound(err)) return; // sibling absent — /rpiv-setup prompts the user
@@ -37,7 +37,7 @@
37
37
  * into `test/setup.ts` beforeEach.
38
38
  */
39
39
 
40
- import { addLaneUsage, type LaneUsage } from "./lane-usage.js";
40
+ import { addLaneUsage, type LaneUsage } from "./lane-usage.ts";
41
41
 
42
42
  /** A minimal structural view of a `subagents:completed` payload, used only for
43
43
  * defensive narrowing. Typed loose so the module imports no pi-subagents type. */
@@ -5,8 +5,9 @@
5
5
  */
6
6
 
7
7
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
8
- import { cleanupPerCwdAgents, type SyncResult, summarizeCleanupSkips, syncBundledAgents } from "./agents.js";
9
- import { invalidateModelsConfigCache } from "./models-config.js";
8
+ import { cleanupPerCwdAgents, type SyncResult, summarizeCleanupSkips, syncBundledAgents } from "./agents.ts";
9
+ import { readLoadedSiblingSources } from "./loaded-siblings.ts";
10
+ import { invalidateModelsConfigCache } from "./models-config.ts";
10
11
 
11
12
  const MSG_UP_TO_DATE = "All agents already up-to-date.";
12
13
  const MSG_NO_CHANGES = "No changes needed.";
@@ -27,8 +28,9 @@ export function registerUpdateAgentsCommand(pi: ExtensionAPI): void {
27
28
  // breaking the "/rpiv-update-agents applies edits" promise
28
29
  // (models-config.ts module doc).
29
30
  invalidateModelsConfigCache();
30
- const cleanup = cleanupPerCwdAgents(ctx.cwd);
31
- const result = syncBundledAgents(true);
31
+ const loaded = readLoadedSiblingSources(pi);
32
+ const cleanup = cleanupPerCwdAgents(ctx.cwd, loaded);
33
+ const result = syncBundledAgents(true, loaded);
32
34
  if (!ctx.hasUI) return;
33
35
  const parts: string[] = [];
34
36
  if (cleanup.cleanedUp.length > 0) parts.push(`${cleanup.cleanedUp.length} old dir(s) cleaned up`);
@@ -20,12 +20,12 @@
20
20
  import type { ExtensionAPI, ExtensionUIContext } from "@earendil-works/pi-coding-agent";
21
21
  import { SessionManager } from "@earendil-works/pi-coding-agent";
22
22
  import type { BranchEntry, ModelSelection, WorkflowHostContext } from "@juicesharp/rpiv-workflow";
23
- import { isLaneRelayUiContext } from "./lane-relay-ui.js";
24
- import { loadModelsConfig, resolveMaxConcurrency, resolveStageModel } from "./models-config.js";
25
- import { getFocusedRun, getLane, recordRun, retireRun, setLaneAbort } from "./run-lane-registry.js";
26
- import { SdkWorkflowHost } from "./sdk-workflow-host.js";
27
- import { getCapturedModelRegistry, getCapturedUiContext } from "./session-capture.js";
28
- import { isModuleNotFound } from "./utils.js";
23
+ import { isLaneRelayUiContext } from "./lane-relay-ui.ts";
24
+ import { loadModelsConfig, resolveMaxConcurrency, resolveStageModel } from "./models-config.ts";
25
+ import { getFocusedRun, getLane, recordRun, retireRun, setLaneAbort } from "./run-lane-registry.ts";
26
+ import { SdkWorkflowHost } from "./sdk-workflow-host.ts";
27
+ import { getCapturedModelRegistry, getCapturedUiContext } from "./session-capture.ts";
28
+ import { isModuleNotFound } from "./utils.ts";
29
29
 
30
30
  /** Build the detached executor + abort tap from the live observer ctx + run identity. */
31
31
  type WorkflowExecution = {
@@ -40,7 +40,7 @@ type WorkflowExecution = {
40
40
  * preserve the tested public surface; the live cap is driven through
41
41
  * `resolveMaxConcurrency(loadModelsConfig())` at the consumer below.
42
42
  */
43
- export { DEFAULT_MAX_CONCURRENCY } from "./models-config.js";
43
+ export { DEFAULT_MAX_CONCURRENCY } from "./models-config.ts";
44
44
 
45
45
  /**
46
46
  * Map the config layer's `ResolvedModelConfig` ({ model?, thinking? }) to the
@@ -36,9 +36,9 @@
36
36
  */
37
37
 
38
38
  import type { ExtensionAPI, ExtensionUIContext } from "@earendil-works/pi-coding-agent";
39
- import { isLaneRelayUiContext } from "./lane-relay-ui.js";
40
- import { type QuestionLifecycleEvent, subscribeQuestionLifecycle } from "./question-lifecycle.js";
41
- import { isModuleNotFound } from "./utils.js";
39
+ import { isLaneRelayUiContext } from "./lane-relay-ui.ts";
40
+ import { type QuestionLifecycleEvent, subscribeQuestionLifecycle } from "./question-lifecycle.ts";
41
+ import { isModuleNotFound } from "./utils.ts";
42
42
 
43
43
  /**
44
44
  * Process-global guard holding the active lifecycle unsubscribe fn + a ref to the
@@ -40,7 +40,7 @@ import {
40
40
  produces,
41
41
  setRouteNote,
42
42
  } from "@juicesharp/rpiv-workflow/registration";
43
- import { rpivBucketOutcome } from "../artifact-collector.js";
43
+ import { rpivBucketOutcome } from "../artifact-collector.ts";
44
44
  import {
45
45
  CODE_CONFIRM_FANOUT,
46
46
  CODE_DIMENSION_FANOUT,
@@ -85,7 +85,7 @@ import {
85
85
  unitFailedDimensions,
86
86
  VALIDATE_GOAL_PROMPT,
87
87
  verdictOutcome,
88
- } from "../built-ins/index.js";
88
+ } from "../built-ins/index.ts";
89
89
  import {
90
90
  RECONCILE_FIX_OUTCOME,
91
91
  RECONCILE_FIX_PROMPT,
@@ -94,7 +94,7 @@ import {
94
94
  unitFailedNote,
95
95
  validateFixGate,
96
96
  validateGate,
97
- } from "./shared.js";
97
+ } from "./shared.ts";
98
98
 
99
99
  /**
100
100
  * `goal` displaces `research` as build's start stage, and ONLY the start stage
@@ -14,8 +14,8 @@ import {
14
14
  type PromptFn,
15
15
  produces,
16
16
  } from "@juicesharp/rpiv-workflow/registration";
17
- import { IMPLEMENT_PLANS_FANOUT, latestPlans, REVIEW_PHASE_ITERATE } from "../built-ins/index.js";
18
- import { codeReviewGate } from "./shared.js";
17
+ import { IMPLEMENT_PLANS_FANOUT, latestPlans, REVIEW_PHASE_ITERATE } from "../built-ins/index.ts";
18
+ import { codeReviewGate } from "./shared.ts";
19
19
 
20
20
  /**
21
21
  * Hand the single validate session EVERY plan from the latest blueprint pass
@@ -26,8 +26,8 @@ import {
26
26
  type PromptFn,
27
27
  setRouteNote,
28
28
  } from "@juicesharp/rpiv-workflow/registration";
29
- import { rpivBucketOutcome } from "../artifact-collector.js";
30
- import { latestFsArtifact, verdictRiskRulings } from "../built-ins/index.js";
29
+ import { rpivBucketOutcome } from "../artifact-collector.ts";
30
+ import { latestFsArtifact, verdictRiskRulings } from "../built-ins/index.ts";
31
31
 
32
32
  // The code-review stage's output schema is no longer declared here — every
33
33
  // code-review stage sources it from the skill's contract `produces.data`
@@ -41,7 +41,7 @@ import {
41
41
  type VerdictRecord,
42
42
  verdictBlocks,
43
43
  verdictRiskRulings,
44
- } from "../built-ins/index.js";
44
+ } from "../built-ins/index.ts";
45
45
  import {
46
46
  RECONCILE_FIX_OUTCOME,
47
47
  RECONCILE_FIX_PROMPT,
@@ -49,7 +49,7 @@ import {
49
49
  unitFailedNote,
50
50
  validateFixGate,
51
51
  validateGate,
52
- } from "./shared.js";
52
+ } from "./shared.ts";
53
53
 
54
54
  /**
55
55
  * ship's research front-load — a LEANER grounding than build's `/skill:research`
@@ -17,14 +17,14 @@ import {
17
17
  implementScopeCheckVet,
18
18
  reconcile,
19
19
  scopeQuarantine,
20
- } from "../built-ins/index.js";
20
+ } from "../built-ins/index.ts";
21
21
  import {
22
22
  codeReviewGate,
23
23
  RECONCILE_FIX_OUTCOME,
24
24
  RECONCILE_FIX_PROMPT,
25
25
  reconcileGate,
26
26
  scopeFloorGate,
27
- } from "./shared.js";
27
+ } from "./shared.ts";
28
28
 
29
29
  const vetWorkflow = defineWorkflow({
30
30
  name: "vet",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juicesharp/rpiv-pi",
3
- "version": "2.13.7",
3
+ "version": "2.13.9",
4
4
  "description": "A skill-based development workflow for Pi Agent. 30 contract-carrying skills (discover → research → design → plan → implement → validate → code-review → commit, and more), the 15 named subagents they dispatch, and four built-in /wf workflows that chain them end to end in detached parallel runs.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -52,7 +52,7 @@
52
52
  ]
53
53
  },
54
54
  "dependencies": {
55
- "@juicesharp/rpiv-config": "^2.13.7"
55
+ "@juicesharp/rpiv-config": "^2.13.9"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "@earendil-works/pi-ai": "*",