@juicesharp/rpiv-pi 2.5.2 → 2.6.1
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/models-config.md +5 -4
- package/extensions/rpiv-core/built-in-workflows.ts +123 -7
- package/extensions/rpiv-core/models-config.ts +27 -7
- package/extensions/rpiv-core/rpiv-models/command.ts +6 -6
- package/extensions/rpiv-core/rpiv-models/index.ts +8 -8
- package/extensions/rpiv-core/rpiv-models/items.ts +8 -19
- package/extensions/rpiv-core/rpiv-models/overrides.ts +17 -0
- package/package.json +3 -2
package/docs/models-config.md
CHANGED
|
@@ -107,12 +107,13 @@ your current session model stays sovereign for anything you invoke by hand.
|
|
|
107
107
|
|
|
108
108
|
### Reasoning levels
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
session baseline, `off` explicitly disables reasoning. Anything else is warned about
|
|
110
|
+
`thinking` accepts the explicit `off` plus every graded level Pi reports (`minimal` → `max`).
|
|
111
|
+
Omitting the field and setting it to `off` are different: omitting inherits the
|
|
112
|
+
session baseline, `off` explicitly disables reasoning. Anything else is warned about
|
|
113
|
+
(the warning enumerates the accepted set):
|
|
113
114
|
|
|
114
115
|
```
|
|
115
|
-
[rpiv-pi] models.json: unknown thinking level "<v>" — valid values: off, minimal,
|
|
116
|
+
[rpiv-pi] models.json: unknown thinking level "<v>" — valid values: off, minimal, …, max
|
|
116
117
|
```
|
|
117
118
|
|
|
118
119
|
### Model key form
|
|
@@ -1035,7 +1035,9 @@ const sliceCovers = (entry: Record<string, unknown>): string[] => {
|
|
|
1035
1035
|
* tree file whose path ends with it on whole segments — bare basenames and
|
|
1036
1036
|
* package-relative forms both back the citation iff exactly ONE tree file
|
|
1037
1037
|
* matches; an ambiguous suffix stays unresolved (the finding names the
|
|
1038
|
-
* candidates so the fix arm can disambiguate)
|
|
1038
|
+
* candidates so the fix arm can disambiguate) unless one of two tiebreaks names
|
|
1039
|
+
* a single candidate: the caller's declared-`files:` union, then the nearest
|
|
1040
|
+
* preceding prose mention of a candidate's full path. A citation that names no real
|
|
1039
1041
|
* file, or points past end-of-file, is UNBACKED precision — a fabricated
|
|
1040
1042
|
* reference that must fail the gate rather than propagate into design. A bare
|
|
1041
1043
|
* `path` with no `:line` is not checked (the contract is "verifiable line
|
|
@@ -1061,8 +1063,11 @@ type BasenameIndex = { index: Map<string, string[]>; truncated: boolean };
|
|
|
1061
1063
|
* (`validate/stage-rules.ts:70` for `packages/rpiv-workflow/validate/stage-rules.ts`)
|
|
1062
1064
|
* — mechanical path-prefix omissions, not fabricated references. The basename
|
|
1063
1065
|
* keys the candidates; `verifyCitations` narrows them by whole-segment suffix.
|
|
1064
|
-
* A UNIQUE match backs the citation; an AMBIGUOUS one stays unresolved
|
|
1065
|
-
*
|
|
1066
|
+
* A UNIQUE match backs the citation; an AMBIGUOUS one stays unresolved — unless
|
|
1067
|
+
* one of `verifyCitations`' tiebreaks (the caller's declared-`files:` union,
|
|
1068
|
+
* then the nearest preceding prose mention) names exactly one
|
|
1069
|
+
* candidate — so the producer must disambiguate with the repo-root-relative
|
|
1070
|
+
* path. Skips
|
|
1066
1071
|
* vendored/generated trees so a citation never resolves to a build copy or a
|
|
1067
1072
|
* prior artifact. Bounded by the file cap.
|
|
1068
1073
|
*/
|
|
@@ -1172,7 +1177,60 @@ const resolveCitationPath = (
|
|
|
1172
1177
|
* for zero risk averted (three of f329's floor failures were this class). */
|
|
1173
1178
|
const PLACEHOLDER_CITATION_PREFIXES: readonly string[] = ["path/to/", "packages/x/"];
|
|
1174
1179
|
|
|
1175
|
-
|
|
1180
|
+
/**
|
|
1181
|
+
* Proximity tiebreak for a citation left ambiguous by the declared-`files:`
|
|
1182
|
+
* intersection: resolve to the candidate whose repo-root-relative path has the
|
|
1183
|
+
* nearest PRECEDING prose mention — the common artifact idiom of naming a file
|
|
1184
|
+
* once in full, then citing it by bare basename. Prose only: mentions inside
|
|
1185
|
+
* YAML frontmatter (`files:` ordering carries no authorial intent — a tie there
|
|
1186
|
+
* stays a tie) or fenced spans (example/fixture territory) don't count, and
|
|
1187
|
+
* matches are token-bounded so a candidate never back-matches inside a longer
|
|
1188
|
+
* path mention (`a/dup.ts` inside `x/a/dup.ts`). Returns the winner's absolute
|
|
1189
|
+
* path, or `undefined` — the citation then stays unbacked as before.
|
|
1190
|
+
*/
|
|
1191
|
+
const nearestProseMention = (
|
|
1192
|
+
body: string,
|
|
1193
|
+
upTo: number,
|
|
1194
|
+
candidates: readonly string[],
|
|
1195
|
+
cwd: string,
|
|
1196
|
+
fenced: readonly [number, number][],
|
|
1197
|
+
proseStart: number,
|
|
1198
|
+
): string | undefined => {
|
|
1199
|
+
let bestAbs: string | undefined;
|
|
1200
|
+
let bestIdx = -1;
|
|
1201
|
+
for (const abs of candidates) {
|
|
1202
|
+
if (!abs.startsWith(cwd + sep)) continue;
|
|
1203
|
+
const rel = abs
|
|
1204
|
+
.slice(cwd.length + 1)
|
|
1205
|
+
.split(sep)
|
|
1206
|
+
.join("/");
|
|
1207
|
+
// Walk mentions nearest-first; the first CLEAN one (token-bounded, in
|
|
1208
|
+
// prose, outside fences) is this candidate's best — earlier ones can't win.
|
|
1209
|
+
let from = upTo - rel.length;
|
|
1210
|
+
while (from >= 0) {
|
|
1211
|
+
const i = body.lastIndexOf(rel, from);
|
|
1212
|
+
if (i < 0 || i < proseStart) break;
|
|
1213
|
+
from = i - 1;
|
|
1214
|
+
const prev = i > 0 ? (body[i - 1] as string) : "";
|
|
1215
|
+
const next = body[i + rel.length] ?? "";
|
|
1216
|
+
if (prev !== "" && /[\w.@/-]/.test(prev)) continue;
|
|
1217
|
+
if (next !== "" && /[\w-]/.test(next)) continue;
|
|
1218
|
+
if (fenced.some(([s, e]) => i >= s && i < e)) continue;
|
|
1219
|
+
if (i > bestIdx) {
|
|
1220
|
+
bestIdx = i;
|
|
1221
|
+
bestAbs = abs;
|
|
1222
|
+
}
|
|
1223
|
+
break;
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
return bestAbs;
|
|
1227
|
+
};
|
|
1228
|
+
|
|
1229
|
+
const verifyCitations = (
|
|
1230
|
+
body: string,
|
|
1231
|
+
cwd: string,
|
|
1232
|
+
declared?: ReadonlySet<string>,
|
|
1233
|
+
): { detail: string; where: string }[] => {
|
|
1176
1234
|
const findings: { detail: string; where: string }[] = [];
|
|
1177
1235
|
const seen = new Set<string>();
|
|
1178
1236
|
// Fenced text is example/fixture territory, not prose asserting a real
|
|
@@ -1181,6 +1239,14 @@ const verifyCitations = (body: string, cwd: string): { detail: string; where: st
|
|
|
1181
1239
|
// placeholder-pattern skip: a REAL citation that merely looks placeholder-ish
|
|
1182
1240
|
// still verifies when it appears in prose.
|
|
1183
1241
|
const fenced = fencedSpans(body);
|
|
1242
|
+
// Prose begins past the YAML frontmatter: the proximity tiebreak must not
|
|
1243
|
+
// read the `files:` array as a mention (its ordering carries no intent — a
|
|
1244
|
+
// tie inside the declared set stays a tie).
|
|
1245
|
+
let proseStart = 0;
|
|
1246
|
+
if (body.startsWith("---\n")) {
|
|
1247
|
+
const end = body.indexOf("\n---\n", 3);
|
|
1248
|
+
if (end !== -1) proseStart = end + "\n---\n".length;
|
|
1249
|
+
}
|
|
1184
1250
|
// Built lazily and reused across citations — only the first direct-resolution
|
|
1185
1251
|
// miss pays the tree walk, and only when at least one such citation exists.
|
|
1186
1252
|
const indexHolder: { value: BasenameIndex | undefined } = { value: undefined };
|
|
@@ -1192,7 +1258,32 @@ const verifyCitations = (body: string, cwd: string): { detail: string; where: st
|
|
|
1192
1258
|
const key = `${path}:${startStr}${endStr ? `-${endStr}` : ""}`;
|
|
1193
1259
|
if (seen.has(key)) continue;
|
|
1194
1260
|
seen.add(key);
|
|
1195
|
-
|
|
1261
|
+
let resolved = resolveCitationPath(path, cwd, indexHolder);
|
|
1262
|
+
if (resolved && "ambiguous" in resolved && declared !== undefined) {
|
|
1263
|
+
// Declared-write-set tiebreak: when the caller supplies the artifact's own
|
|
1264
|
+
// declared `files:` union and exactly ONE ambiguous candidate is in it, the
|
|
1265
|
+
// artifact has already named the file it means — resolve there instead of
|
|
1266
|
+
// halting the run over a path-prefix omission. A tie INSIDE the declared
|
|
1267
|
+
// set (two declared `command.ts` files) stays ambiguous: the citation is
|
|
1268
|
+
// then genuinely unreadable even against the artifact's own write-set.
|
|
1269
|
+
const declaredMatches = resolved.ambiguous.filter(
|
|
1270
|
+
(abs) =>
|
|
1271
|
+
abs.startsWith(cwd + sep) &&
|
|
1272
|
+
declared.has(
|
|
1273
|
+
abs
|
|
1274
|
+
.slice(cwd.length + 1)
|
|
1275
|
+
.split(sep)
|
|
1276
|
+
.join("/"),
|
|
1277
|
+
),
|
|
1278
|
+
);
|
|
1279
|
+
if (declaredMatches.length === 1) resolved = { abs: declaredMatches[0] };
|
|
1280
|
+
}
|
|
1281
|
+
if (resolved && "ambiguous" in resolved) {
|
|
1282
|
+
// Proximity tiebreak: the nearest preceding prose mention of a
|
|
1283
|
+
// candidate's full path names the file the author means.
|
|
1284
|
+
const near = nearestProseMention(body, m.index, resolved.ambiguous, cwd, fenced, proseStart);
|
|
1285
|
+
if (near !== undefined) resolved = { abs: near };
|
|
1286
|
+
}
|
|
1196
1287
|
if (resolved && "ambiguous" in resolved) {
|
|
1197
1288
|
// More than one tree file matches — name the candidates so the fix arm can disambiguate.
|
|
1198
1289
|
const shown = resolved.ambiguous
|
|
@@ -1756,6 +1847,29 @@ const verifyPhaseFilesCoverage = (content: string, who: string, path: string): {
|
|
|
1756
1847
|
return findings;
|
|
1757
1848
|
};
|
|
1758
1849
|
|
|
1850
|
+
/**
|
|
1851
|
+
* The union of every phase's declared `files:` across the plan's frontmatter —
|
|
1852
|
+
* the disambiguation pool `planCitationCheck` hands `verifyCitations`. A plan's
|
|
1853
|
+
* write-set is the one place the plan itself names its files repo-root-relative
|
|
1854
|
+
* (the coverage floor enforces exactly that), so it is a deterministic
|
|
1855
|
+
* tiebreaker for the ambiguous-suffix findings that would otherwise STOP a
|
|
1856
|
+
* loop-less preset (ship) over a bare `messages.ts:18` whose owning file the
|
|
1857
|
+
* plan already declares. Degrades to the empty set on malformed frontmatter —
|
|
1858
|
+
* never throws out of the deterministic floor.
|
|
1859
|
+
*/
|
|
1860
|
+
const declaredPlanFiles = (content: string): ReadonlySet<string> => {
|
|
1861
|
+
let fm: Record<string, unknown>;
|
|
1862
|
+
try {
|
|
1863
|
+
fm = parseFrontmatter(content).frontmatter as Record<string, unknown>;
|
|
1864
|
+
} catch {
|
|
1865
|
+
return new Set();
|
|
1866
|
+
}
|
|
1867
|
+
const phases = Array.isArray(fm.phases) ? fm.phases : [];
|
|
1868
|
+
const declared = new Set<string>();
|
|
1869
|
+
for (const entry of phases) for (const f of phaseFiles(entry)) declared.add(f);
|
|
1870
|
+
return declared;
|
|
1871
|
+
};
|
|
1872
|
+
|
|
1759
1873
|
/**
|
|
1760
1874
|
* Deterministic citation floor for a synthesized/spliced plan — the plan-scope
|
|
1761
1875
|
* twin of `sliceStructureCheck`'s citation backing, extending the citation
|
|
@@ -1765,7 +1879,9 @@ const verifyPhaseFilesCoverage = (content: string, who: string, path: string): {
|
|
|
1765
1879
|
* "structure" }` verdict on `who`'s channel that the gate route folds via
|
|
1766
1880
|
* `allDimensionsPass`; the matching `<fix>` stage reads `fanin(who)` so the
|
|
1767
1881
|
* findings DRIVE the amend rather than blind-halt. Reuses `verifyCitations` — no
|
|
1768
|
-
* fuzzy wrong-symbol heuristic
|
|
1882
|
+
* fuzzy wrong-symbol heuristic — threading the plan's declared `files:` union so
|
|
1883
|
+
* an ambiguous suffix citation resolves when exactly one candidate is in the
|
|
1884
|
+
* plan's own write-set. Basename-keyed ⇒ idempotent across fix rounds.
|
|
1769
1885
|
*/
|
|
1770
1886
|
const planCitationCheck =
|
|
1771
1887
|
(who: string) =>
|
|
@@ -1779,7 +1895,7 @@ const planCitationCheck =
|
|
|
1779
1895
|
);
|
|
1780
1896
|
}
|
|
1781
1897
|
const body = readArtifactFile(latest.handle.path, cwd);
|
|
1782
|
-
const findings = verifyCitations(body, cwd);
|
|
1898
|
+
const findings = verifyCitations(body, cwd, declaredPlanFiles(body));
|
|
1783
1899
|
// Plan-time coverage floor: a body edit not declared in its phase's `files:`
|
|
1784
1900
|
// fails structurally, same channel/verdict/route as an unbacked citation.
|
|
1785
1901
|
findings.push(...verifyPhaseFilesCoverage(body, who, latest.handle.path));
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* take effect on the next session start or /rpiv-update-agents.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
import type { ModelThinkingLevel, ThinkingLevel } from "@earendil-works/pi-ai";
|
|
15
16
|
import { configPath, loadJsonConfigWithLegacyFallback, validateConfig } from "@juicesharp/rpiv-config";
|
|
16
17
|
import { type Static, Type } from "typebox";
|
|
17
18
|
|
|
@@ -21,20 +22,38 @@ import { type Static, Type } from "typebox";
|
|
|
21
22
|
// The host's setThinkingLevel (pi-agent-core ThinkingLevel) AND agent
|
|
22
23
|
// frontmatter both accept "off" — "off" is a first-class level meaning "no
|
|
23
24
|
// reasoning" (it's even the session default). models.json therefore persists
|
|
24
|
-
//
|
|
25
|
+
// every value. Note the distinction from ABSENCE: a missing `thinking`
|
|
25
26
|
// field means "inherit the session/baseline level"; an explicit "off" means
|
|
26
|
-
// "disable reasoning". THINKING_LEVEL_VALUES (the
|
|
27
|
-
// for surfaces that list only the graded levels (e.g. the picker).
|
|
27
|
+
// "disable reasoning". THINKING_LEVEL_VALUES (the graded reasoning levels) is
|
|
28
|
+
// kept for surfaces that list only the graded levels (e.g. the picker).
|
|
28
29
|
// ---------------------------------------------------------------------------
|
|
29
30
|
|
|
30
|
-
/** The
|
|
31
|
-
export const THINKING_LEVEL_VALUES = ["minimal", "low", "medium", "high", "xhigh"] as const;
|
|
31
|
+
/** The graded reasoning levels (excludes "off"). */
|
|
32
|
+
export const THINKING_LEVEL_VALUES = ["minimal", "low", "medium", "high", "xhigh", "max"] as const;
|
|
32
33
|
export type ThinkingLevelValue = (typeof THINKING_LEVEL_VALUES)[number];
|
|
33
34
|
|
|
34
|
-
/** All
|
|
35
|
+
/** All persistable thinking values, including the explicit "off" (disable reasoning). */
|
|
35
36
|
export const MODEL_THINKING_LEVEL_VALUES = ["off", ...THINKING_LEVEL_VALUES] as const;
|
|
36
37
|
export type ModelThinkingLevelValue = (typeof MODEL_THINKING_LEVEL_VALUES)[number];
|
|
37
38
|
|
|
39
|
+
// Guards: the local vocabulary must stay in lockstep with pi-ai's thinking-level
|
|
40
|
+
// universe (type-only imports — erased at runtime, no runtime dep). If pi-ai
|
|
41
|
+
// adds or removes a level, the bidirectional extends checks fail and this file
|
|
42
|
+
// won't compile until the arrays follow. They also make casts of
|
|
43
|
+
// pi.getThinkingLevel() to the local types provably safe.
|
|
44
|
+
type _GradedLevelsMatchPiAi = ThinkingLevelValue extends ThinkingLevel
|
|
45
|
+
? ThinkingLevel extends ThinkingLevelValue
|
|
46
|
+
? true
|
|
47
|
+
: never
|
|
48
|
+
: never;
|
|
49
|
+
const _gradedLevelsMatchPiAi: _GradedLevelsMatchPiAi = true;
|
|
50
|
+
type _PersistableLevelsMatchPiAi = ModelThinkingLevelValue extends ModelThinkingLevel
|
|
51
|
+
? ModelThinkingLevel extends ModelThinkingLevelValue
|
|
52
|
+
? true
|
|
53
|
+
: never
|
|
54
|
+
: never;
|
|
55
|
+
const _persistableLevelsMatchPiAi: _PersistableLevelsMatchPiAi = true;
|
|
56
|
+
|
|
38
57
|
/**
|
|
39
58
|
* Background-lane concurrency cap fallback. The fail-soft default applied by
|
|
40
59
|
* `resolveMaxConcurrency` when `~/.config/rpiv-pi/models.json` is absent or
|
|
@@ -56,8 +75,9 @@ const ThinkingLevelSchema = Type.Union(
|
|
|
56
75
|
Type.Literal("medium"),
|
|
57
76
|
Type.Literal("high"),
|
|
58
77
|
Type.Literal("xhigh"),
|
|
78
|
+
Type.Literal("max"),
|
|
59
79
|
] as const,
|
|
60
|
-
{ description: "Effort/thinking level: off | minimal | low | medium | high | xhigh" },
|
|
80
|
+
{ description: "Effort/thinking level: off | minimal | low | medium | high | xhigh | max" },
|
|
61
81
|
);
|
|
62
82
|
|
|
63
83
|
// Guard: schema literals must stay in lockstep with MODEL_THINKING_LEVEL_VALUES.
|
|
@@ -28,12 +28,6 @@ import {
|
|
|
28
28
|
buildModelItems,
|
|
29
29
|
INHERIT_VALUE,
|
|
30
30
|
loadRawConfig,
|
|
31
|
-
MSG_REQUIRES_INTERACTIVE,
|
|
32
|
-
MSG_RESET_ALL,
|
|
33
|
-
MSG_RESET_ALL_BODY,
|
|
34
|
-
MSG_RESET_ALL_CANCELLED,
|
|
35
|
-
MSG_RESET_ALL_TITLE,
|
|
36
|
-
MSG_SAVE_FAILED,
|
|
37
31
|
RESET_LABEL,
|
|
38
32
|
RESET_VALUE,
|
|
39
33
|
scopeItems,
|
|
@@ -42,6 +36,12 @@ import {
|
|
|
42
36
|
applyOverride,
|
|
43
37
|
floatChecked,
|
|
44
38
|
type KeyStep,
|
|
39
|
+
MSG_REQUIRES_INTERACTIVE,
|
|
40
|
+
MSG_RESET_ALL,
|
|
41
|
+
MSG_RESET_ALL_BODY,
|
|
42
|
+
MSG_RESET_ALL_CANCELLED,
|
|
43
|
+
MSG_RESET_ALL_TITLE,
|
|
44
|
+
MSG_SAVE_FAILED,
|
|
45
45
|
removeOverride,
|
|
46
46
|
SCOPE_DEFAULTS,
|
|
47
47
|
SCOPE_RESET_ALL,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* rpiv-models — Directory barrel for the /rpiv-models cascade picker.
|
|
3
3
|
*
|
|
4
4
|
* Module map:
|
|
5
|
-
* overrides — ScopeDescriptor table, CRUD convenience functions, UI helpers
|
|
6
|
-
* items — SelectItem builders,
|
|
5
|
+
* overrides — ScopeDescriptor table, CRUD convenience functions, UI helpers, string constants
|
|
6
|
+
* items — SelectItem builders, picker sentinels, loadRawConfig
|
|
7
7
|
* command — /rpiv-models command registration
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -13,12 +13,6 @@ export {
|
|
|
13
13
|
buildModelItems,
|
|
14
14
|
INHERIT_VALUE,
|
|
15
15
|
loadRawConfig,
|
|
16
|
-
MSG_REQUIRES_INTERACTIVE,
|
|
17
|
-
MSG_RESET_ALL,
|
|
18
|
-
MSG_RESET_ALL_BODY,
|
|
19
|
-
MSG_RESET_ALL_CANCELLED,
|
|
20
|
-
MSG_RESET_ALL_TITLE,
|
|
21
|
-
MSG_SAVE_FAILED,
|
|
22
16
|
RESET_LABEL,
|
|
23
17
|
RESET_VALUE,
|
|
24
18
|
scopeItems,
|
|
@@ -28,6 +22,12 @@ export {
|
|
|
28
22
|
CHECK,
|
|
29
23
|
floatChecked,
|
|
30
24
|
keyItems,
|
|
25
|
+
MSG_REQUIRES_INTERACTIVE,
|
|
26
|
+
MSG_RESET_ALL,
|
|
27
|
+
MSG_RESET_ALL_BODY,
|
|
28
|
+
MSG_RESET_ALL_CANCELLED,
|
|
29
|
+
MSG_RESET_ALL_TITLE,
|
|
30
|
+
MSG_SAVE_FAILED,
|
|
31
31
|
type OverrideEntry,
|
|
32
32
|
removeOverride,
|
|
33
33
|
SCOPE_AGENTS,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* rpiv-models/items — UI item builders and picker utilities for /rpiv-models.
|
|
3
3
|
*
|
|
4
4
|
* Pure functions that construct SelectItem arrays for the cascade pickers
|
|
5
|
-
* (scope, key, model, effort)
|
|
6
|
-
*
|
|
5
|
+
* (scope, key, model, effort), plus the picker sentinel values. User-facing
|
|
6
|
+
* string constants live in overrides.ts with the rest of the command prose.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import type { Api, Model } from "@earendil-works/pi-ai";
|
|
@@ -33,23 +33,6 @@ const RESET_LABEL = "Reset to default";
|
|
|
33
33
|
// distinct from the real "off" value, which persists thinking:"off" (disable).
|
|
34
34
|
const INHERIT_VALUE = "__inherit__";
|
|
35
35
|
|
|
36
|
-
// ---------------------------------------------------------------------------
|
|
37
|
-
// String constants
|
|
38
|
-
// ---------------------------------------------------------------------------
|
|
39
|
-
|
|
40
|
-
export const MSG_REQUIRES_INTERACTIVE = "/rpiv-models requires an interactive UI session.";
|
|
41
|
-
export const MSG_SAVE_FAILED = "Failed to save models.json (disk error or permissions).";
|
|
42
|
-
export const MSG_RESET_ALL = "All model overrides cleared.";
|
|
43
|
-
export const MSG_RESET_ALL_TITLE = "Reset ALL model overrides?";
|
|
44
|
-
export const MSG_RESET_ALL_BODY = [
|
|
45
|
-
"This clears every override in `~/.config/rpiv-pi/models.json` (defaults,",
|
|
46
|
-
"agents, stages, skills, presets). This cannot be undone.",
|
|
47
|
-
"",
|
|
48
|
-
"Per-agent overrides already written into agent frontmatter revert on the",
|
|
49
|
-
"next agent sync / session start, not immediately.",
|
|
50
|
-
].join("\n");
|
|
51
|
-
export const MSG_RESET_ALL_CANCELLED = "Reset cancelled.";
|
|
52
|
-
|
|
53
36
|
// ---------------------------------------------------------------------------
|
|
54
37
|
// Re-exported sentinel values for command.ts
|
|
55
38
|
// ---------------------------------------------------------------------------
|
|
@@ -71,6 +54,9 @@ export function scopeItems(raw: ModelsConfigSchema): SelectItem[] {
|
|
|
71
54
|
];
|
|
72
55
|
}
|
|
73
56
|
|
|
57
|
+
// Mirror: packages/rpiv-advisor/advisor/command.ts buildModelItems — structural
|
|
58
|
+
// twin kept in a separate package by the zero-cross-imports contract; evolve
|
|
59
|
+
// model-picker semantics together.
|
|
74
60
|
export function buildModelItems(models: Model<Api>[], currentKey?: string): SelectItem[] {
|
|
75
61
|
const items = models.map((m) => {
|
|
76
62
|
const key = modelKey(m);
|
|
@@ -86,6 +72,9 @@ export function buildModelItems(models: Model<Api>[], currentKey?: string): Sele
|
|
|
86
72
|
return items;
|
|
87
73
|
}
|
|
88
74
|
|
|
75
|
+
// Mirror: packages/rpiv-advisor/advisor/command.ts buildEffortItems — same
|
|
76
|
+
// filter-in/map-out shape, different sentinels and persist target; evolve
|
|
77
|
+
// level-picker semantics together.
|
|
89
78
|
export function buildEffortItems(picked: Model<Api>): SelectItem[] {
|
|
90
79
|
const supported = getSupportedThinkingLevels(picked);
|
|
91
80
|
const levels = supported.filter((l): l is ThinkingLevelValue => THINKING_LEVEL_VALUES.includes(l as never));
|
|
@@ -31,6 +31,23 @@ export const SCOPE_SKILLS = "skills";
|
|
|
31
31
|
export const SCOPE_PRESETS = "presets";
|
|
32
32
|
export const SCOPE_RESET_ALL = "__reset_all__";
|
|
33
33
|
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
35
|
+
// User-facing string constants (command prose; item builders stay pure)
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
|
|
38
|
+
export const MSG_REQUIRES_INTERACTIVE = "/rpiv-models requires an interactive UI session.";
|
|
39
|
+
export const MSG_SAVE_FAILED = "Failed to save models.json (disk error or permissions).";
|
|
40
|
+
export const MSG_RESET_ALL = "All model overrides cleared.";
|
|
41
|
+
export const MSG_RESET_ALL_TITLE = "Reset ALL model overrides?";
|
|
42
|
+
export const MSG_RESET_ALL_BODY = [
|
|
43
|
+
"This clears every override in `~/.config/rpiv-pi/models.json` (defaults,",
|
|
44
|
+
"agents, stages, skills, presets). This cannot be undone.",
|
|
45
|
+
"",
|
|
46
|
+
"Per-agent overrides already written into agent frontmatter revert on the",
|
|
47
|
+
"next agent sync / session start, not immediately.",
|
|
48
|
+
].join("\n");
|
|
49
|
+
export const MSG_RESET_ALL_CANCELLED = "Reset cancelled.";
|
|
50
|
+
|
|
34
51
|
// ---------------------------------------------------------------------------
|
|
35
52
|
// Small UI helpers (shared with items.ts and command.ts)
|
|
36
53
|
// ---------------------------------------------------------------------------
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juicesharp/rpiv-pi",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"description": "A skill-based development workflow for Pi Agent. 29 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",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"!**/*.test.ts"
|
|
42
42
|
],
|
|
43
43
|
"pi": {
|
|
44
|
+
"image": "https://raw.githubusercontent.com/juicesharp/rpiv-mono/main/packages/rpiv-pi/docs/cover.png",
|
|
44
45
|
"extensions": [
|
|
45
46
|
"./extensions"
|
|
46
47
|
],
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
]
|
|
50
51
|
},
|
|
51
52
|
"dependencies": {
|
|
52
|
-
"@juicesharp/rpiv-config": "^2.
|
|
53
|
+
"@juicesharp/rpiv-config": "^2.6.1",
|
|
53
54
|
"typebox": "^1.1.24"
|
|
54
55
|
},
|
|
55
56
|
"peerDependencies": {
|