@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.
- package/docs/architecture.md +14 -5
- package/docs/lanes.md +8 -2
- package/extensions/rpiv-core/agents-inject.ts +3 -3
- package/extensions/rpiv-core/agents-manifest.ts +3 -3
- package/extensions/rpiv-core/agents-sync.ts +19 -15
- package/extensions/rpiv-core/agents.ts +6 -6
- package/extensions/rpiv-core/built-in-workflows.ts +6 -6
- package/extensions/rpiv-core/built-ins/citations.ts +2 -2
- package/extensions/rpiv-core/built-ins/design.ts +2 -2
- package/extensions/rpiv-core/built-ins/elaboration.ts +3 -3
- package/extensions/rpiv-core/built-ins/gate-passes.ts +2 -2
- package/extensions/rpiv-core/built-ins/gate-rosters.ts +2 -2
- package/extensions/rpiv-core/built-ins/gates.ts +3 -3
- package/extensions/rpiv-core/built-ins/goal-baseline.ts +1 -1
- package/extensions/rpiv-core/built-ins/grade-panel.ts +4 -4
- package/extensions/rpiv-core/built-ins/index.ts +16 -16
- package/extensions/rpiv-core/built-ins/plan-cite.ts +4 -4
- package/extensions/rpiv-core/built-ins/plan-phases.ts +2 -2
- package/extensions/rpiv-core/built-ins/priors.ts +2 -2
- package/extensions/rpiv-core/built-ins/reconcile.ts +2 -2
- package/extensions/rpiv-core/built-ins/scope-checks.ts +3 -3
- package/extensions/rpiv-core/built-ins/slice-checks.ts +5 -5
- package/extensions/rpiv-core/built-ins/slices.ts +2 -2
- package/extensions/rpiv-core/built-ins/verdict-collector.ts +1 -1
- package/extensions/rpiv-core/built-ins/verdict-core.ts +1 -1
- package/extensions/rpiv-core/built-ins/verdict-outcome.ts +2 -2
- package/extensions/rpiv-core/git-context.ts +1 -1
- package/extensions/rpiv-core/guidance.ts +1 -1
- package/extensions/rpiv-core/index.ts +14 -14
- package/extensions/rpiv-core/lane-console.ts +40 -8
- package/extensions/rpiv-core/lane-dock-editor.ts +1 -1
- package/extensions/rpiv-core/lane-dock.ts +2 -2
- package/extensions/rpiv-core/lane-list.ts +4 -4
- package/extensions/rpiv-core/lane-progress.ts +5 -5
- package/extensions/rpiv-core/lane-relay-ui.ts +1 -1
- package/extensions/rpiv-core/lane-streaming.ts +1 -1
- package/extensions/rpiv-core/lane-switcher.ts +6 -6
- package/extensions/rpiv-core/lane-transcript-disk.ts +2 -2
- package/extensions/rpiv-core/lane-transcript-view.ts +3 -3
- package/extensions/rpiv-core/loaded-siblings.ts +41 -0
- package/extensions/rpiv-core/meta/checks.ts +2 -2
- package/extensions/rpiv-core/meta/presets.ts +3 -3
- package/extensions/rpiv-core/meta/unit-graph.ts +4 -4
- package/extensions/rpiv-core/meta/wip-guard.ts +3 -3
- package/extensions/rpiv-core/models-config-sources.ts +1 -1
- package/extensions/rpiv-core/models-config-validate.ts +2 -2
- package/extensions/rpiv-core/outcome-derivation.ts +2 -2
- package/extensions/rpiv-core/package-checks.ts +52 -20
- package/extensions/rpiv-core/pi-installer.ts +1 -1
- package/extensions/rpiv-core/pipeline-pointer.ts +1 -1
- package/extensions/rpiv-core/prune-legacy-siblings.ts +2 -2
- package/extensions/rpiv-core/register-built-in-workflows.ts +2 -2
- package/extensions/rpiv-core/rpiv-models/command.ts +4 -4
- package/extensions/rpiv-core/rpiv-models/index.ts +3 -3
- package/extensions/rpiv-core/rpiv-models/items.ts +2 -2
- package/extensions/rpiv-core/rpiv-models/overrides.ts +3 -3
- package/extensions/rpiv-core/run-lane-registry.ts +5 -5
- package/extensions/rpiv-core/run-lane-types.ts +2 -2
- package/extensions/rpiv-core/sdk-workflow-host.ts +7 -7
- package/extensions/rpiv-core/session-capture.ts +3 -3
- package/extensions/rpiv-core/session-hooks.ts +18 -13
- package/extensions/rpiv-core/setup-command.ts +16 -9
- package/extensions/rpiv-core/siblings.ts +18 -3
- package/extensions/rpiv-core/skill-bracket.ts +2 -2
- package/extensions/rpiv-core/skill-contracts-source.ts +3 -3
- package/extensions/rpiv-core/subagent-usage.ts +1 -1
- package/extensions/rpiv-core/update-agents-command.ts +6 -4
- package/extensions/rpiv-core/workflow-execution-host.ts +7 -7
- package/extensions/rpiv-core/workflow-question-warp-bridge.ts +3 -3
- package/extensions/rpiv-core/workflows/build.ts +3 -3
- package/extensions/rpiv-core/workflows/polish.ts +2 -2
- package/extensions/rpiv-core/workflows/shared.ts +2 -2
- package/extensions/rpiv-core/workflows/ship.ts +2 -2
- package/extensions/rpiv-core/workflows/vet.ts +2 -2
- package/package.json +2 -2
package/docs/architecture.md
CHANGED
|
@@ -96,12 +96,21 @@ into the first real user turn after compaction — hidden by default, visible un
|
|
|
96
96
|
|
|
97
97
|
## Sibling coupling
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
`packages[]` array in the active Pi settings file (`<agent dir>/settings.json`, honoring
|
|
101
|
-
`PI_CODING_AGENT_DIR`). No sibling is statically imported from the entry graph; a test
|
|
102
|
-
enforces that.
|
|
99
|
+
A sibling counts as **present** when either signal finds it:
|
|
103
100
|
|
|
104
|
-
|
|
101
|
+
- a case-insensitive regex over the `packages[]` array in the active Pi settings file
|
|
102
|
+
(`<agent dir>/settings.json`, honoring `PI_CODING_AGENT_DIR`);
|
|
103
|
+
- or it is actually loaded in this session: the same regex matched against the source
|
|
104
|
+
path of every loaded tool and extension command, plus a presence marker for
|
|
105
|
+
`rpiv-args`, which registers neither.
|
|
106
|
+
|
|
107
|
+
The second signal covers siblings that load without a settings entry of their own:
|
|
108
|
+
bundled inside another Pi package (a kit), installed per project (`pi install -l`), or
|
|
109
|
+
loaded with `pi -e`. They no longer trigger the missing-siblings banner, and
|
|
110
|
+
`/rpiv-setup` does not install a second copy whose tools would conflict. No sibling is
|
|
111
|
+
statically imported from the entry graph; a test enforces that.
|
|
112
|
+
|
|
113
|
+
`/rpiv-setup` installs whichever of these eight packages are neither declared nor loaded:
|
|
105
114
|
|
|
106
115
|
| Package | Provides |
|
|
107
116
|
| --- | --- |
|
package/docs/lanes.md
CHANGED
|
@@ -35,7 +35,7 @@ The browser replays the selected lane's transcript, tool calls included.
|
|
|
35
35
|
| --- | --- |
|
|
36
36
|
| `↑` / `↓` | Move along the lane spine. `↑` on the top row backs out |
|
|
37
37
|
| `⏎` | Arm the parked question on a flagged lane, inline |
|
|
38
|
-
| `PgUp` / `PgDn
|
|
38
|
+
| `u` / `d`, `PgUp` / `PgDn`, mouse wheel | Scroll the transcript |
|
|
39
39
|
| `t` | Expand or collapse tool output |
|
|
40
40
|
| `s` | Show or hide the per-stage token breakdown |
|
|
41
41
|
| `x` | Stop the selected run |
|
|
@@ -44,9 +44,15 @@ The browser replays the selected lane's transcript, tool calls included.
|
|
|
44
44
|
The footer states the live contract:
|
|
45
45
|
|
|
46
46
|
```
|
|
47
|
-
↑/↓ lanes · ⏎ answer ·
|
|
47
|
+
↑/↓ lanes · ⏎ answer · u/d scroll · t expand · s stages · x stop · ↑/←/esc back
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
+
In Pi's fullscreen TUI (`--tui-mode fullscreen`), Pi keeps `PgUp`/`PgDn` for its own
|
|
51
|
+
transcript, so page the lane with `u`/`d` instead. The mouse wheel scrolls the lane
|
|
52
|
+
transcript while the pointer is over the browser (Pi 0.87 or newer), including while
|
|
53
|
+
you answer a parked question; over the rest of the screen it scrolls Pi's transcript
|
|
54
|
+
as usual.
|
|
55
|
+
|
|
50
56
|
## Parked questions
|
|
51
57
|
|
|
52
58
|
When a detached stage needs an answer, it does not steal your session. The question
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* hash-after-transform.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import { mergeCsvAdditions, mergeFlowSeqAdditions, resolveAgentEnablement } from "./agent-enablement.
|
|
12
|
-
import { parseFrontmatterBounds, readFrontmatterKey } from "./frontmatter.
|
|
13
|
-
import { getAgentModelConfig, type ModelsConfig } from "./models-config.
|
|
11
|
+
import { mergeCsvAdditions, mergeFlowSeqAdditions, resolveAgentEnablement } from "./agent-enablement.ts";
|
|
12
|
+
import { parseFrontmatterBounds, readFrontmatterKey } from "./frontmatter.ts";
|
|
13
|
+
import { getAgentModelConfig, type ModelsConfig } from "./models-config.ts";
|
|
14
14
|
|
|
15
15
|
// ---------------------------------------------------------------------------
|
|
16
16
|
// Frontmatter injection — pure transform
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
import { createHash } from "node:crypto";
|
|
20
20
|
import { existsSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
|
|
21
21
|
import { join } from "node:path";
|
|
22
|
-
import { isManagedAgentName } from "./agents-allowlist.
|
|
23
|
-
import { SYNC_OP, type SyncResult } from "./agents-types.
|
|
24
|
-
import { isPlainObject, toErrorMessage } from "./utils.
|
|
22
|
+
import { isManagedAgentName } from "./agents-allowlist.ts";
|
|
23
|
+
import { SYNC_OP, type SyncResult } from "./agents-types.ts";
|
|
24
|
+
import { isPlainObject, toErrorMessage } from "./utils.ts";
|
|
25
25
|
|
|
26
26
|
// ---------------------------------------------------------------------------
|
|
27
27
|
// Manifest
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
12
12
|
import { join } from "node:path";
|
|
13
13
|
import { getAgentDir } from "@earendil-works/pi-coding-agent";
|
|
14
|
-
import { installedExtensionNames } from "./agent-enablement.
|
|
15
|
-
import { safeJoin } from "./agents-allowlist.
|
|
16
|
-
import { type AgentInjectionContext, injectModelFrontmatter } from "./agents-inject.
|
|
17
|
-
import { MANIFEST_FILE, type Manifest, readManifest, sha256, writeManifest } from "./agents-manifest.
|
|
14
|
+
import { installedExtensionNames } from "./agent-enablement.ts";
|
|
15
|
+
import { safeJoin } from "./agents-allowlist.ts";
|
|
16
|
+
import { type AgentInjectionContext, injectModelFrontmatter } from "./agents-inject.ts";
|
|
17
|
+
import { MANIFEST_FILE, type Manifest, readManifest, sha256, writeManifest } from "./agents-manifest.ts";
|
|
18
18
|
import {
|
|
19
19
|
CLEANUP_SKIP_REASON,
|
|
20
20
|
type CleanupResult,
|
|
@@ -22,11 +22,11 @@ import {
|
|
|
22
22
|
emptySyncResult,
|
|
23
23
|
SYNC_OP,
|
|
24
24
|
type SyncResult,
|
|
25
|
-
} from "./agents-types.
|
|
26
|
-
import { loadModelsConfig } from "./models-config.
|
|
27
|
-
import { findInstalledSiblings } from "./package-checks.
|
|
28
|
-
import { BUNDLED_AGENTS_DIR } from "./paths.
|
|
29
|
-
import { toErrorMessage } from "./utils.
|
|
25
|
+
} from "./agents-types.ts";
|
|
26
|
+
import { loadModelsConfig } from "./models-config.ts";
|
|
27
|
+
import { findInstalledSiblings, type LoadedSiblingSources } from "./package-checks.ts";
|
|
28
|
+
import { BUNDLED_AGENTS_DIR } from "./paths.ts";
|
|
29
|
+
import { toErrorMessage } from "./utils.ts";
|
|
30
30
|
|
|
31
31
|
// ---------------------------------------------------------------------------
|
|
32
32
|
// Predicate consolidation
|
|
@@ -69,6 +69,7 @@ function processSourceEntries(
|
|
|
69
69
|
manifest: Manifest,
|
|
70
70
|
apply: boolean,
|
|
71
71
|
result: SyncResult,
|
|
72
|
+
loaded: LoadedSiblingSources | undefined,
|
|
72
73
|
): Manifest {
|
|
73
74
|
const newManifest: Manifest = {};
|
|
74
75
|
|
|
@@ -81,7 +82,7 @@ function processSourceEntries(
|
|
|
81
82
|
// mid-pass would tear the recorded hashes and falsely flag agents
|
|
82
83
|
// diverged.
|
|
83
84
|
const injection: AgentInjectionContext = {
|
|
84
|
-
installedExtensions: installedExtensionNames(findInstalledSiblings().map((s) => s.pkg)),
|
|
85
|
+
installedExtensions: installedExtensionNames(findInstalledSiblings(loaded).map((s) => s.pkg)),
|
|
85
86
|
};
|
|
86
87
|
|
|
87
88
|
for (const entry of sourceEntries) {
|
|
@@ -254,9 +255,12 @@ function commitStaleUnlinks(
|
|
|
254
255
|
* mid-sync leaves the manifest claiming files-already-removed (next run picks
|
|
255
256
|
* those up via the vanish branch and reports them in result.removed).
|
|
256
257
|
*
|
|
258
|
+
* `loaded` is the caller's one-per-pass runtime snapshot (`readLoadedSiblingSources`)
|
|
259
|
+
* for the sibling enablement gate; omitted, the gate reads settings only.
|
|
260
|
+
*
|
|
257
261
|
* Never throws — errors are collected in `result.errors`.
|
|
258
262
|
*/
|
|
259
|
-
export function syncBundledAgents(apply: boolean): SyncResult {
|
|
263
|
+
export function syncBundledAgents(apply: boolean, loaded?: LoadedSiblingSources): SyncResult {
|
|
260
264
|
const result = emptySyncResult();
|
|
261
265
|
|
|
262
266
|
if (!existsSync(BUNDLED_AGENTS_DIR)) {
|
|
@@ -280,7 +284,7 @@ export function syncBundledAgents(apply: boolean): SyncResult {
|
|
|
280
284
|
const sourceNames = new Set(sourceEntries);
|
|
281
285
|
const manifest = readManifest(targetDir);
|
|
282
286
|
|
|
283
|
-
const newManifest = processSourceEntries(sourceEntries, targetDir, manifest, apply, result);
|
|
287
|
+
const newManifest = processSourceEntries(sourceEntries, targetDir, manifest, apply, result, loaded);
|
|
284
288
|
|
|
285
289
|
const toUnlink = classifyStaleEntries(manifest, sourceNames, targetDir, apply, newManifest, result);
|
|
286
290
|
|
|
@@ -302,9 +306,9 @@ export function syncBundledAgents(apply: boolean): SyncResult {
|
|
|
302
306
|
* 3. No non-managed files exist in the directory
|
|
303
307
|
*
|
|
304
308
|
* If any check fails, the directory is left intact. Never throws — errors
|
|
305
|
-
* are collected in the CleanupResult.
|
|
309
|
+
* are collected in the CleanupResult. `loaded`: same snapshot as syncBundledAgents.
|
|
306
310
|
*/
|
|
307
|
-
export function cleanupPerCwdAgents(cwd: string): CleanupResult {
|
|
311
|
+
export function cleanupPerCwdAgents(cwd: string, loaded?: LoadedSiblingSources): CleanupResult {
|
|
308
312
|
const result = emptyCleanupResult();
|
|
309
313
|
const perCwdDir = join(cwd, ".pi", "agents");
|
|
310
314
|
|
|
@@ -324,7 +328,7 @@ export function cleanupPerCwdAgents(cwd: string): CleanupResult {
|
|
|
324
328
|
// must use one settings read for the whole pass — the identical gate a
|
|
325
329
|
// sync pass with the same settings would have used.
|
|
326
330
|
const cleanupInjection: AgentInjectionContext = {
|
|
327
|
-
installedExtensions: installedExtensionNames(findInstalledSiblings().map((s) => s.pkg)),
|
|
331
|
+
installedExtensions: installedExtensionNames(findInstalledSiblings(loaded).map((s) => s.pkg)),
|
|
328
332
|
};
|
|
329
333
|
for (const [name] of Object.entries(manifest)) {
|
|
330
334
|
const srcPath = safeJoin(BUNDLED_AGENTS_DIR, name);
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
* re-export statements keep every child on the extension's static import
|
|
20
20
|
* graph. Internal layer symbols (safeJoin, readManifest, writeManifest,
|
|
21
21
|
* sha256, the result factories, …) are intentionally NOT re-exported.
|
|
22
|
-
* Consumers import "./agents.
|
|
22
|
+
* Consumers import "./agents.ts" unchanged.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
export type { AgentInjectionContext } from "./agents-inject.
|
|
26
|
-
export { injectModelFrontmatter } from "./agents-inject.
|
|
27
|
-
export { cleanupPerCwdAgents, isSafeDestructiveOp, syncBundledAgents } from "./agents-sync.
|
|
25
|
+
export type { AgentInjectionContext } from "./agents-inject.ts";
|
|
26
|
+
export { injectModelFrontmatter } from "./agents-inject.ts";
|
|
27
|
+
export { cleanupPerCwdAgents, isSafeDestructiveOp, syncBundledAgents } from "./agents-sync.ts";
|
|
28
28
|
export type {
|
|
29
29
|
CleanupResult,
|
|
30
30
|
CleanupSkip,
|
|
@@ -32,5 +32,5 @@ export type {
|
|
|
32
32
|
SyncError,
|
|
33
33
|
SyncOp,
|
|
34
34
|
SyncResult,
|
|
35
|
-
} from "./agents-types.
|
|
36
|
-
export { CLEANUP_SKIP_REASON, SYNC_OP, summarizeCleanupSkips } from "./agents-types.
|
|
35
|
+
} from "./agents-types.ts";
|
|
36
|
+
export { CLEANUP_SKIP_REASON, SYNC_OP, summarizeCleanupSkips } from "./agents-types.ts";
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import type { Workflow } from "@juicesharp/rpiv-workflow/registration";
|
|
13
|
-
import { metaWorkflow } from "./meta/presets.
|
|
14
|
-
import { buildWorkflow } from "./workflows/build.
|
|
15
|
-
import { polishWorkflow } from "./workflows/polish.
|
|
16
|
-
import { shipWorkflow } from "./workflows/ship.
|
|
17
|
-
import { vetWorkflow } from "./workflows/vet.
|
|
13
|
+
import { metaWorkflow } from "./meta/presets.ts";
|
|
14
|
+
import { buildWorkflow } from "./workflows/build.ts";
|
|
15
|
+
import { polishWorkflow } from "./workflows/polish.ts";
|
|
16
|
+
import { shipWorkflow } from "./workflows/ship.ts";
|
|
17
|
+
import { vetWorkflow } from "./workflows/vet.ts";
|
|
18
18
|
|
|
19
|
-
export { SHIP_DIMENSION_FANOUT, SHIP_DIMENSIONS, shipGatePasses, shipVerdictOutcome } from "./built-ins/index.
|
|
19
|
+
export { SHIP_DIMENSION_FANOUT, SHIP_DIMENSIONS, shipGatePasses, shipVerdictOutcome } from "./built-ins/index.ts";
|
|
20
20
|
|
|
21
21
|
// Position 0 is load-bearing: `build` is the default `/wf` workflow when no
|
|
22
22
|
// project/user config sets one (resolve-default.ts resolves
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
|
|
8
8
|
import { basename, join, sep } from "node:path";
|
|
9
|
-
import { fencedSpans } from "./markdown-fence.
|
|
10
|
-
import { containedPath, FILE_LINE_CITATION_RE, type StructureFinding } from "./shared.
|
|
9
|
+
import { fencedSpans } from "./markdown-fence.ts";
|
|
10
|
+
import { containedPath, FILE_LINE_CITATION_RE, type StructureFinding } from "./shared.ts";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Verify every `file:line` citation in `body` resolves against the working tree:
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { basename } from "node:path";
|
|
11
11
|
import { defineParser, type Outcome, type ParseContext } from "@juicesharp/rpiv-workflow/registration";
|
|
12
|
-
import { frontmatterParser, rpivBucketOutcome } from "../artifact-collector.
|
|
13
|
-
import { DESIGN_SLICE_RE } from "./slices.
|
|
12
|
+
import { frontmatterParser, rpivBucketOutcome } from "../artifact-collector.ts";
|
|
13
|
+
import { DESIGN_SLICE_RE } from "./slices.ts";
|
|
14
14
|
|
|
15
15
|
interface DesignStructure {
|
|
16
16
|
/** `"matches"`, or the diagnosis the contract's enum failure surfaces verbatim. */
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
import { readFileSync } from "node:fs";
|
|
8
8
|
import { isAbsolute, join } from "node:path";
|
|
9
9
|
import { defineParser, type Outcome, type ParseContext } from "@juicesharp/rpiv-workflow/registration";
|
|
10
|
-
import { frontmatterParser, rpivBucketOutcome } from "../artifact-collector.
|
|
11
|
-
import { countHeadingsOutsideFences, openFenceLine } from "./markdown-fence.
|
|
12
|
-
import { PLAN_PHASE_RE } from "./plan-phases.
|
|
10
|
+
import { frontmatterParser, rpivBucketOutcome } from "../artifact-collector.ts";
|
|
11
|
+
import { countHeadingsOutsideFences, openFenceLine } from "./markdown-fence.ts";
|
|
12
|
+
import { PLAN_PHASE_RE } from "./plan-phases.ts";
|
|
13
13
|
|
|
14
14
|
interface ElaborationStructure {
|
|
15
15
|
/** `"balanced"`, or the diagnosis the contract's enum failure surfaces verbatim. */
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
rulingEffectivePass,
|
|
17
17
|
shipRoster,
|
|
18
18
|
verdictRiskRulings,
|
|
19
|
-
} from "./gate-rosters.
|
|
19
|
+
} from "./gate-rosters.ts";
|
|
20
20
|
import {
|
|
21
21
|
freshVerdicts,
|
|
22
22
|
latestArtifactPath,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
SLICE_DIMENSIONS,
|
|
26
26
|
type VerdictRecord,
|
|
27
27
|
verdictBlocks,
|
|
28
|
-
} from "./verdict-core.
|
|
28
|
+
} from "./verdict-core.ts";
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* The subset of `dimensions` a re-grade must actually re-run, given the latest
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* that consult it stay resume-safe.
|
|
10
10
|
*/
|
|
11
11
|
import type { Output, RunView } from "@juicesharp/rpiv-workflow/registration";
|
|
12
|
-
import { FILE_LINE_CITATION_RE } from "./shared.
|
|
13
|
-
import { anchorNitsOnly, channelNumber, latestChannelData, RISK_DIMENSION, SHIP_DIMENSIONS } from "./verdict-core.
|
|
12
|
+
import { FILE_LINE_CITATION_RE } from "./shared.ts";
|
|
13
|
+
import { anchorNitsOnly, channelNumber, latestChannelData, RISK_DIMENSION, SHIP_DIMENSIONS } from "./verdict-core.ts";
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Gate scrutiny tier, derived ONLY from signals already replayed by the resume
|
|
@@ -25,7 +25,7 @@ export {
|
|
|
25
25
|
sliceGatePasses,
|
|
26
26
|
subplanGatePasses,
|
|
27
27
|
unitFailedDimensions,
|
|
28
|
-
} from "./gate-passes.
|
|
28
|
+
} from "./gate-passes.ts";
|
|
29
29
|
export {
|
|
30
30
|
evidenceCitesFileLine,
|
|
31
31
|
gateRoster,
|
|
@@ -37,7 +37,7 @@ export {
|
|
|
37
37
|
rulingEffectivePass,
|
|
38
38
|
shipRoster,
|
|
39
39
|
verdictRiskRulings,
|
|
40
|
-
} from "./gate-rosters.
|
|
40
|
+
} from "./gate-rosters.ts";
|
|
41
41
|
export {
|
|
42
42
|
anchorNitsOnly,
|
|
43
43
|
freshVerdicts,
|
|
@@ -50,4 +50,4 @@ export {
|
|
|
50
50
|
SLICE_DIMENSIONS,
|
|
51
51
|
type VerdictRecord,
|
|
52
52
|
verdictBlocks,
|
|
53
|
-
} from "./verdict-core.
|
|
53
|
+
} from "./verdict-core.ts";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
type RunView,
|
|
13
13
|
type ScriptContext,
|
|
14
14
|
} from "@juicesharp/rpiv-workflow/registration";
|
|
15
|
-
import { haltPreflight, latestFsArtifact, readArtifactFile } from "./shared.
|
|
15
|
+
import { haltPreflight, latestFsArtifact, readArtifactFile } from "./shared.ts";
|
|
16
16
|
|
|
17
17
|
/** Bucket directory the goal capture writes into — build's verbatim-brief channel. */
|
|
18
18
|
const GOAL_DIR = ".rpiv/artifacts/goal";
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
SHIP_DIMENSIONS,
|
|
17
17
|
SLICE_DIMENSIONS,
|
|
18
18
|
shipRoster,
|
|
19
|
-
} from "./gates.
|
|
20
|
-
import { isSurgicalFix, priorArtifact } from "./priors.
|
|
21
|
-
import { haltPreflight, latestFsArtifact } from "./shared.
|
|
22
|
-
import { verdictOutcome } from "./verdict-outcome.
|
|
19
|
+
} from "./gates.ts";
|
|
20
|
+
import { isSurgicalFix, priorArtifact } from "./priors.ts";
|
|
21
|
+
import { haltPreflight, latestFsArtifact } from "./shared.ts";
|
|
22
|
+
import { verdictOutcome } from "./verdict-outcome.ts";
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* The dimension-scoped artifact flags every panel body composes — ONE
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* `.ts`).
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
export { designOutcome, designParser, designStructure } from "./design.
|
|
10
|
-
export { elaborationOutcome, elaborationParser, elaborationStructure } from "./elaboration.
|
|
9
|
+
export { designOutcome, designParser, designStructure } from "./design.ts";
|
|
10
|
+
export { elaborationOutcome, elaborationParser, elaborationStructure } from "./elaboration.ts";
|
|
11
11
|
export {
|
|
12
12
|
allDimensionsPass,
|
|
13
13
|
anchorNitsOnly,
|
|
@@ -38,13 +38,13 @@ export {
|
|
|
38
38
|
type VerdictRecord,
|
|
39
39
|
verdictBlocks,
|
|
40
40
|
verdictRiskRulings,
|
|
41
|
-
} from "./gates.
|
|
41
|
+
} from "./gates.ts";
|
|
42
42
|
export {
|
|
43
43
|
COMMIT_BASELINE_PROMPT,
|
|
44
44
|
captureGoal,
|
|
45
45
|
captureReviewScope,
|
|
46
46
|
VALIDATE_GOAL_PROMPT,
|
|
47
|
-
} from "./goal-baseline.
|
|
47
|
+
} from "./goal-baseline.ts";
|
|
48
48
|
export {
|
|
49
49
|
CODE_CONFIRM_FANOUT,
|
|
50
50
|
CODE_DIMENSION_FANOUT,
|
|
@@ -57,7 +57,7 @@ export {
|
|
|
57
57
|
SLICE_DIMENSION_FANOUT,
|
|
58
58
|
SLICE_PANEL_PROGRESS,
|
|
59
59
|
shipVerdictOutcome,
|
|
60
|
-
} from "./grade-panel.
|
|
60
|
+
} from "./grade-panel.ts";
|
|
61
61
|
export {
|
|
62
62
|
closesFence,
|
|
63
63
|
countHeadingsOutsideFences,
|
|
@@ -65,8 +65,8 @@ export {
|
|
|
65
65
|
fencedSpans,
|
|
66
66
|
forEachLineOutsideFences,
|
|
67
67
|
openFenceLine,
|
|
68
|
-
} from "./markdown-fence.
|
|
69
|
-
export { planCitationCheck } from "./plan-cite.
|
|
68
|
+
} from "./markdown-fence.ts";
|
|
69
|
+
export { planCitationCheck } from "./plan-cite.ts";
|
|
70
70
|
export {
|
|
71
71
|
ELABORATE_PHASE_FANOUT,
|
|
72
72
|
FRONTMATTER_PHASE_FANOUT,
|
|
@@ -74,11 +74,11 @@ export {
|
|
|
74
74
|
IMPLEMENT_PLANS_FANOUT,
|
|
75
75
|
latestPlans,
|
|
76
76
|
REVIEW_PHASE_ITERATE,
|
|
77
|
-
} from "./plan-phases.
|
|
78
|
-
export { codeDemote, codeSnapshot, planDemote, planSnapshot } from "./priors.
|
|
79
|
-
export { reconcile } from "./reconcile.
|
|
80
|
-
export { remediationOutcome } from "./remediation.
|
|
81
|
-
export { implementScopeCheck, implementScopeCheckVet, ScopeVerdict, scopeQuarantine } from "./scope-checks.
|
|
77
|
+
} from "./plan-phases.ts";
|
|
78
|
+
export { codeDemote, codeSnapshot, planDemote, planSnapshot } from "./priors.ts";
|
|
79
|
+
export { reconcile } from "./reconcile.ts";
|
|
80
|
+
export { remediationOutcome } from "./remediation.ts";
|
|
81
|
+
export { implementScopeCheck, implementScopeCheckVet, ScopeVerdict, scopeQuarantine } from "./scope-checks.ts";
|
|
82
82
|
export {
|
|
83
83
|
FILE_LINE_CITATION_RE,
|
|
84
84
|
FsArtifact,
|
|
@@ -93,7 +93,7 @@ export {
|
|
|
93
93
|
VERDICT_FAIL_SCORE,
|
|
94
94
|
VERDICT_PASS_SCORE,
|
|
95
95
|
writeStructureVerdict,
|
|
96
|
-
} from "./shared.
|
|
97
|
-
export { sliceSeedLift, sliceStructureCheck, subplanCoverageCheck } from "./slice-checks.
|
|
98
|
-
export { SLICE_DESIGN_FANOUT, SYNTH_CLUSTER_FANOUT } from "./slices.
|
|
99
|
-
export { verdictOutcome } from "./verdict-outcome.
|
|
96
|
+
} from "./shared.ts";
|
|
97
|
+
export { sliceSeedLift, sliceStructureCheck, subplanCoverageCheck } from "./slice-checks.ts";
|
|
98
|
+
export { SLICE_DESIGN_FANOUT, SYNTH_CLUSTER_FANOUT } from "./slices.ts";
|
|
99
|
+
export { verdictOutcome } from "./verdict-outcome.ts";
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { parseFrontmatter } from "@earendil-works/pi-coding-agent";
|
|
7
7
|
import type { Output, ScriptContext } from "@juicesharp/rpiv-workflow/registration";
|
|
8
|
-
import { verifyCitations } from "./citations.
|
|
9
|
-
import { forEachLineOutsideFences } from "./markdown-fence.
|
|
10
|
-
import { PLAN_PHASE_RE, phaseFiles } from "./plan-phases.
|
|
11
|
-
import { haltPreflight, latestFsArtifact, readArtifactFile, writeStructureVerdict } from "./shared.
|
|
8
|
+
import { verifyCitations } from "./citations.ts";
|
|
9
|
+
import { forEachLineOutsideFences } from "./markdown-fence.ts";
|
|
10
|
+
import { PLAN_PHASE_RE, phaseFiles } from "./plan-phases.ts";
|
|
11
|
+
import { haltPreflight, latestFsArtifact, readArtifactFile, writeStructureVerdict } from "./shared.ts";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Slice a plan body into per-phase text keyed by phase number, splitting on
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
type RunView,
|
|
15
15
|
type Unit,
|
|
16
16
|
} from "@juicesharp/rpiv-workflow/registration";
|
|
17
|
-
import { countHeadingsOutsideFences } from "./markdown-fence.
|
|
17
|
+
import { countHeadingsOutsideFences } from "./markdown-fence.ts";
|
|
18
18
|
import {
|
|
19
19
|
haltPreflight,
|
|
20
20
|
latestFsArtifact,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
type PhaseRecord,
|
|
23
23
|
readArtifactFile,
|
|
24
24
|
TEST_PATH_RE,
|
|
25
|
-
} from "./shared.
|
|
25
|
+
} from "./shared.ts";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* `## Phase N:` headings — the source of truth a plan's `phases:` frontmatter
|
|
@@ -21,8 +21,8 @@ import {
|
|
|
21
21
|
type RiskRecord,
|
|
22
22
|
rulingEffectivePass,
|
|
23
23
|
verdictRiskRulings,
|
|
24
|
-
} from "./gates.
|
|
25
|
-
import { haltPreflight, latestFsArtifact, readArtifactFile } from "./shared.
|
|
24
|
+
} from "./gates.ts";
|
|
25
|
+
import { haltPreflight, latestFsArtifact, readArtifactFile } from "./shared.ts";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Copy the latest graded plan off `plans` into `.rpiv/artifacts/priors/`
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
12
12
|
import { basename, isAbsolute, join } from "node:path";
|
|
13
13
|
import { handleToString, type Output, type ScriptContext } from "@juicesharp/rpiv-workflow/registration";
|
|
14
|
-
import { phaseFiles, planPhaseRecords, withTestTwins } from "./plan-phases.
|
|
14
|
+
import { phaseFiles, planPhaseRecords, withTestTwins } from "./plan-phases.ts";
|
|
15
15
|
import { classifyApplication, type ReconciliationDirective, reconciliationRecords } from "./reconcile-directives.mjs";
|
|
16
16
|
import {
|
|
17
17
|
containedPath,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
VERDICT_DIR,
|
|
22
22
|
VERDICT_FAIL_SCORE,
|
|
23
23
|
VERDICT_PASS_SCORE,
|
|
24
|
-
} from "./shared.
|
|
24
|
+
} from "./shared.ts";
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Apply each `#### Reconciliation` directive, write-restricted to the plan's
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
import { mkdirSync, renameSync, writeFileSync } from "node:fs";
|
|
10
10
|
import { basename, dirname, join } from "node:path";
|
|
11
11
|
import { handleToString, type Output, type RunView, type ScriptContext } from "@juicesharp/rpiv-workflow/registration";
|
|
12
|
-
import { gitDirtyEntries, goalBaselinePath, readGoalBaseline, scopeExcess } from "./goal-baseline.
|
|
13
|
-
import { phaseFiles, planPhaseRecords, withTestTwins } from "./plan-phases.
|
|
12
|
+
import { gitDirtyEntries, goalBaselinePath, readGoalBaseline, scopeExcess } from "./goal-baseline.ts";
|
|
13
|
+
import { phaseFiles, planPhaseRecords, withTestTwins } from "./plan-phases.ts";
|
|
14
14
|
import {
|
|
15
15
|
containedPath,
|
|
16
16
|
type FsArtifact,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
VERDICT_DIR,
|
|
21
21
|
VERDICT_FAIL_SCORE,
|
|
22
22
|
VERDICT_PASS_SCORE,
|
|
23
|
-
} from "./shared.
|
|
23
|
+
} from "./shared.ts";
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Union the per-phase `files:` write-set declared across the FULL `plans`
|
|
@@ -7,9 +7,9 @@ import { writeFileSync } from "node:fs";
|
|
|
7
7
|
import { basename, isAbsolute, join } from "node:path";
|
|
8
8
|
import { parseFrontmatter } from "@earendil-works/pi-coding-agent";
|
|
9
9
|
import { handleToString, type Output, type RunView, type ScriptContext } from "@juicesharp/rpiv-workflow/registration";
|
|
10
|
-
import { verifyCitations } from "./citations.
|
|
11
|
-
import { latestVerdictPerDimension, type SeedOnlyVerdict, seedOnlyFindings } from "./gates.
|
|
12
|
-
import { fencedSpans, forEachLineOutsideFences } from "./markdown-fence.
|
|
10
|
+
import { verifyCitations } from "./citations.ts";
|
|
11
|
+
import { latestVerdictPerDimension, type SeedOnlyVerdict, seedOnlyFindings } from "./gates.ts";
|
|
12
|
+
import { fencedSpans, forEachLineOutsideFences } from "./markdown-fence.ts";
|
|
13
13
|
import {
|
|
14
14
|
haltPreflight,
|
|
15
15
|
latestFsArtifact,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
readArtifactFile,
|
|
18
18
|
type StructureFinding,
|
|
19
19
|
writeStructureVerdict,
|
|
20
|
-
} from "./shared.
|
|
20
|
+
} from "./shared.ts";
|
|
21
21
|
import {
|
|
22
22
|
clusterSliceDag,
|
|
23
23
|
DESIGN_SLICE_RE,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
sliceCovers,
|
|
27
27
|
sliceDepCycle,
|
|
28
28
|
sliceRecords,
|
|
29
|
-
} from "./slices.
|
|
29
|
+
} from "./slices.ts";
|
|
30
30
|
|
|
31
31
|
/** A dispatched sub-plan basename with its `_cluster-<k>` ordinal resolved. */
|
|
32
32
|
type DispatchedCluster = { path: string; k: number };
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
import { basename } from "node:path";
|
|
7
7
|
import { parseFrontmatter } from "@earendil-works/pi-coding-agent";
|
|
8
8
|
import { fanout, handleToString, type RunView } from "@juicesharp/rpiv-workflow/registration";
|
|
9
|
-
import { countHeadingsOutsideFences } from "./markdown-fence.
|
|
10
|
-
import { haltPreflight, latestFsArtifact, MAX_PHASES, type PhaseRecord, readArtifactFile } from "./shared.
|
|
9
|
+
import { countHeadingsOutsideFences } from "./markdown-fence.ts";
|
|
10
|
+
import { haltPreflight, latestFsArtifact, MAX_PHASES, type PhaseRecord, readArtifactFile } from "./shared.ts";
|
|
11
11
|
|
|
12
12
|
/** `## Slice N:` headings — the source of truth a slice map's `slices:` array is derived from. */
|
|
13
13
|
const SLICE_HEADING_RE = /^## Slice (\d+):/gm;
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
toolCallCollector,
|
|
42
42
|
transcriptPathCollector,
|
|
43
43
|
} from "@juicesharp/rpiv-workflow/registration";
|
|
44
|
-
import { latestFsArtifact } from "./shared.
|
|
44
|
+
import { latestFsArtifact } from "./shared.ts";
|
|
45
45
|
|
|
46
46
|
/** The verdict dir listing at unit start — filename → mtimeMs. `undefined`
|
|
47
47
|
* when the dir was absent/unreadable (fail-soft: everything present then
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { basename } from "node:path";
|
|
10
10
|
import { handleToString, type Output, type RunView } from "@juicesharp/rpiv-workflow/registration";
|
|
11
|
-
import { latestFsArtifact } from "./shared.
|
|
11
|
+
import { latestFsArtifact } from "./shared.ts";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* The single LLM dimension the EARLY gate grades the slice map against — before
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
import { jsonBodyParser, type Outcome } from "@juicesharp/rpiv-workflow/registration";
|
|
25
|
-
import { VERDICT_DIR } from "./shared.
|
|
26
|
-
import { verdictCollector } from "./verdict-collector.
|
|
25
|
+
import { VERDICT_DIR } from "./shared.ts";
|
|
26
|
+
import { verdictCollector } from "./verdict-collector.ts";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* The verdict outcome factory: one instance per channel, over the channel
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
13
|
-
import { GIT_EXEC_TIMEOUT_MS } from "./constants.
|
|
13
|
+
import { GIT_EXEC_TIMEOUT_MS } from "./constants.ts";
|
|
14
14
|
|
|
15
15
|
type GitContext = { branch: string; commit: string; user: string };
|
|
16
16
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
import { existsSync, readFileSync } from "node:fs";
|
|
23
23
|
import { dirname, isAbsolute, join, relative, sep } from "node:path";
|
|
24
24
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
25
|
-
import { FLAG_DEBUG, MSG_TYPE_GUIDANCE } from "./constants.
|
|
25
|
+
import { FLAG_DEBUG, MSG_TYPE_GUIDANCE } from "./constants.ts";
|
|
26
26
|
|
|
27
27
|
// ---------------------------------------------------------------------------
|
|
28
28
|
// Module-local constants
|
|
@@ -13,20 +13,20 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
16
|
-
import { FLAG_DEBUG } from "./constants.
|
|
17
|
-
import { registerLaneProgressHook } from "./lane-progress.
|
|
18
|
-
import { registerLaneSwitcher } from "./lane-switcher.
|
|
19
|
-
import { registerModelsConfigValidation } from "./models-config-validate.
|
|
20
|
-
import { registerBuiltInWorkflows } from "./register-built-in-workflows.
|
|
21
|
-
import { registerRpivModelsCommand } from "./rpiv-models/index.
|
|
22
|
-
import { registerSessionCapture } from "./session-capture.
|
|
23
|
-
import { registerSessionHooks } from "./session-hooks.
|
|
24
|
-
import { registerSetupCommand } from "./setup-command.
|
|
25
|
-
import { registerSkillBracket } from "./skill-bracket.
|
|
26
|
-
import { registerSkillContractsSource, registerUserSkillContractsSource } from "./skill-contracts-source.
|
|
27
|
-
import { registerUpdateAgentsCommand } from "./update-agents-command.
|
|
28
|
-
import { registerWorkflowExecutionHostProviderHook } from "./workflow-execution-host.
|
|
29
|
-
import { registerWorkflowQuestionWarpBridgeHook } from "./workflow-question-warp-bridge.
|
|
16
|
+
import { FLAG_DEBUG } from "./constants.ts";
|
|
17
|
+
import { registerLaneProgressHook } from "./lane-progress.ts";
|
|
18
|
+
import { registerLaneSwitcher } from "./lane-switcher.ts";
|
|
19
|
+
import { registerModelsConfigValidation } from "./models-config-validate.ts";
|
|
20
|
+
import { registerBuiltInWorkflows } from "./register-built-in-workflows.ts";
|
|
21
|
+
import { registerRpivModelsCommand } from "./rpiv-models/index.ts";
|
|
22
|
+
import { registerSessionCapture } from "./session-capture.ts";
|
|
23
|
+
import { registerSessionHooks } from "./session-hooks.ts";
|
|
24
|
+
import { registerSetupCommand } from "./setup-command.ts";
|
|
25
|
+
import { registerSkillBracket } from "./skill-bracket.ts";
|
|
26
|
+
import { registerSkillContractsSource, registerUserSkillContractsSource } from "./skill-contracts-source.ts";
|
|
27
|
+
import { registerUpdateAgentsCommand } from "./update-agents-command.ts";
|
|
28
|
+
import { registerWorkflowExecutionHostProviderHook } from "./workflow-execution-host.ts";
|
|
29
|
+
import { registerWorkflowQuestionWarpBridgeHook } from "./workflow-question-warp-bridge.ts";
|
|
30
30
|
|
|
31
31
|
export default function (pi: ExtensionAPI) {
|
|
32
32
|
pi.registerFlag(FLAG_DEBUG, {
|