omp-fabric 1.20.0 → 1.22.0
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/CHANGELOG.md +21 -0
- package/README.md +6 -2
- package/dist/agents/manager.d.ts +4 -0
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/chunks/{chunk-BAHZYDFD.js → chunk-3FYXXYAG.js} +67 -1
- package/dist/chunks/{chunk-BAHZYDFD.js.map → chunk-3FYXXYAG.js.map} +2 -2
- package/dist/chunks/{chunk-PUGB6NGD.js → chunk-3GMSYFLT.js} +3 -3
- package/dist/chunks/{chunk-LWD4273F.js → chunk-5SSQD7TW.js} +52 -2
- package/dist/chunks/{chunk-LWD4273F.js.map → chunk-5SSQD7TW.js.map} +2 -2
- package/dist/chunks/{chunk-5FYSQRJ4.js → chunk-GUJNTA7Z.js} +22 -3
- package/dist/chunks/chunk-GUJNTA7Z.js.map +7 -0
- package/dist/chunks/{chunk-NP5U3BJZ.js → chunk-P4GPBAQS.js} +166 -17
- package/dist/chunks/chunk-P4GPBAQS.js.map +7 -0
- package/dist/chunks/{chunk-RAWYAQQJ.js → chunk-RGAGLSFG.js} +171 -1
- package/dist/chunks/chunk-RGAGLSFG.js.map +7 -0
- package/dist/config.d.ts +12 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/execution-service.d.ts +2 -0
- package/dist/execution-service.d.ts.map +1 -1
- package/dist/fabric-runtime-state.d.ts +3 -0
- package/dist/fabric-runtime-state.d.ts.map +1 -1
- package/dist/fabric-runtime-state.js +390 -9
- package/dist/fabric-runtime-state.js.map +4 -4
- package/dist/fabric-state.d.ts +1 -0
- package/dist/fabric-state.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +175 -20
- package/dist/index.js.map +4 -4
- package/dist/judgment/gates/delegation.d.ts +31 -0
- package/dist/judgment/gates/delegation.d.ts.map +1 -0
- package/dist/judgment/gates/skills.d.ts +20 -0
- package/dist/judgment/gates/skills.d.ts.map +1 -0
- package/dist/judgment/gates/tool-exec.d.ts +31 -0
- package/dist/judgment/gates/tool-exec.d.ts.map +1 -0
- package/dist/judgment/gates/tool-output.d.ts +40 -0
- package/dist/judgment/gates/tool-output.d.ts.map +1 -0
- package/dist/residency/host.js +3 -3
- package/dist/residency/omp-entry.js +3 -3
- package/dist/runtime/core-override-guest-types.js +1 -1
- package/dist/runtime/guest-types.d.ts +1 -1
- package/dist/runtime/guest-types.d.ts.map +1 -1
- package/dist/runtime/guest-types.js +1 -1
- package/dist/runtime/node-process-runtime.js +1 -1
- package/dist/runtime/quickjs-runtime.d.ts +1 -1
- package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
- package/dist/runtime/quickjs-runtime.js +1 -1
- package/dist/ui/dashboard.js +1 -1
- package/dist/ui/fabric-render.d.ts.map +1 -1
- package/dist/ui/settings.d.ts.map +1 -1
- package/dist/ui/settings.js +37 -3
- package/dist/ui/settings.js.map +2 -2
- package/docs/configuration.md +4 -0
- package/docs/judgment.md +45 -0
- package/package.json +2 -1
- package/dist/chunks/chunk-5FYSQRJ4.js.map +0 -7
- package/dist/chunks/chunk-NP5U3BJZ.js.map +0 -7
- package/dist/chunks/chunk-RAWYAQQJ.js.map +0 -7
- /package/dist/chunks/{chunk-PUGB6NGD.js.map → chunk-3GMSYFLT.js.map} +0 -0
package/dist/fabric-state.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export declare class FabricState {
|
|
|
47
47
|
get execution(): FabricRuntimeState["execution"];
|
|
48
48
|
/** Speculative-PTC stream tap; undefined pre-init or when speculation is disabled. */
|
|
49
49
|
get speculationTap(): FabricRuntimeState["speculationTap"];
|
|
50
|
+
get judgment(): FabricRuntimeState["judgment"];
|
|
50
51
|
/** Turn-boundary backstop for the speculation store; safe before initialization. */
|
|
51
52
|
resetSpeculation(): void;
|
|
52
53
|
get agents(): FabricRuntimeState["agents"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fabric-state.d.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,IAAI;IAoB7C,aAAa,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,gBAAgB,GAAG,IAAI;IAmBtE,SAAS,IAAI,UAAU,CAAC,WAAW,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC,CAAC;IAItE,YAAY,CAAC,OAAO,EAAE,gBAAgB,GAAG;QACvC,IAAI,EAAE,gBAAgB,CAAC;QACvB,MAAM,EAAE,QAAQ,GAAG,kBAAkB,CAAC;QACtC,eAAe,EAAE,MAAM,CAAC;KACzB;IAoBK,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAuHhC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,2BAA2B,CAAC;AAsKnC,wBAA8B,SAAS,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA4yBxE;AAED,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
spinnerFrame,
|
|
34
34
|
updateSpinner,
|
|
35
35
|
wrapRowLimitFor
|
|
36
|
-
} from "./chunks/chunk-
|
|
36
|
+
} from "./chunks/chunk-5SSQD7TW.js";
|
|
37
37
|
import {
|
|
38
38
|
formatCost,
|
|
39
39
|
formatDuration,
|
|
@@ -81,7 +81,7 @@ import "./chunks/chunk-DLXPTBPL.js";
|
|
|
81
81
|
import {
|
|
82
82
|
GUEST_TYPE_DECLARATIONS,
|
|
83
83
|
OMP_CORE_COMPATIBILITY_ARGUMENT_TYPE_NAMES
|
|
84
|
-
} from "./chunks/chunk-
|
|
84
|
+
} from "./chunks/chunk-3FYXXYAG.js";
|
|
85
85
|
import {
|
|
86
86
|
NESTED_TOOL_CALL_ID_PREFIX,
|
|
87
87
|
getActiveRepairCompiler,
|
|
@@ -203,7 +203,7 @@ import {
|
|
|
203
203
|
modelOutputBudget,
|
|
204
204
|
resolveAgentDir,
|
|
205
205
|
saveFabricConfig
|
|
206
|
-
} from "./chunks/chunk-
|
|
206
|
+
} from "./chunks/chunk-GUJNTA7Z.js";
|
|
207
207
|
import {
|
|
208
208
|
FABRIC_ACTOR_OMP_HOST_EVENTS
|
|
209
209
|
} from "./chunks/chunk-3LI7YO4M.js";
|
|
@@ -448,11 +448,11 @@ var BorderedToolCall = class {
|
|
|
448
448
|
this.cachedRows = void 0;
|
|
449
449
|
}
|
|
450
450
|
renderUncached(width) {
|
|
451
|
-
const
|
|
451
|
+
const body2 = [
|
|
452
452
|
...this.callComponent?.render(Math.max(1, width - 4)) ?? [],
|
|
453
453
|
...this.resultComponent?.render(Math.max(1, width - 4)) ?? []
|
|
454
454
|
];
|
|
455
|
-
if (width < 4) return
|
|
455
|
+
if (width < 4) return body2;
|
|
456
456
|
const innerWidth = width - 4;
|
|
457
457
|
const border = (value) => this.theme.fg(this.color, value);
|
|
458
458
|
const label = this.timingLabel ? ` ${this.theme.fg("muted", this.timingLabel)} ` : "";
|
|
@@ -460,7 +460,7 @@ var BorderedToolCall = class {
|
|
|
460
460
|
const top = labelWidth > 0 && labelWidth <= width - 2 ? `${border("\u256D")}${border("\u2500".repeat(width - 2 - labelWidth))}${label}${border("\u256E")}` : border(`\u256D${"\u2500".repeat(width - 2)}\u256E`);
|
|
461
461
|
return [
|
|
462
462
|
top,
|
|
463
|
-
...
|
|
463
|
+
...body2.map((line) => this.frameLine(line, innerWidth, border)),
|
|
464
464
|
border(`\u2570${"\u2500".repeat(width - 2)}\u256F`)
|
|
465
465
|
];
|
|
466
466
|
}
|
|
@@ -830,8 +830,8 @@ var summarizeLogLine = (entry) => {
|
|
|
830
830
|
const role = typeof m.role === "string" ? m.role : "message";
|
|
831
831
|
const model = typeof m.model === "string" ? m.model : void 0;
|
|
832
832
|
const text = extractContentText(m.content);
|
|
833
|
-
const
|
|
834
|
-
return `${role}${model ? ` [${model}]` : ""}: ${truncateMiddle(
|
|
833
|
+
const body2 = (text || JSON.stringify(m)).replace(/\s+/g, " ");
|
|
834
|
+
return `${role}${model ? ` [${model}]` : ""}: ${truncateMiddle(body2, 160)}`;
|
|
835
835
|
}
|
|
836
836
|
if (type) {
|
|
837
837
|
const bits = [type];
|
|
@@ -1309,7 +1309,7 @@ Task: ${status.task}` : ""}`,
|
|
|
1309
1309
|
const actor = state.actors.status(id);
|
|
1310
1310
|
const messages = state.actors.messages(actor.id, 20);
|
|
1311
1311
|
const shortId = actor.id.slice(0, 8);
|
|
1312
|
-
const
|
|
1312
|
+
const body2 = messages.length > 0 ? messages.map((message) => {
|
|
1313
1313
|
const value = message.text ?? message.error ?? message.action ?? "data";
|
|
1314
1314
|
const summary = truncateMiddle(value.replace(/\s+/g, " "), 500);
|
|
1315
1315
|
const runTag = message.runId ? ` [${message.runId.slice(0, 8)}]` : "";
|
|
@@ -1318,7 +1318,7 @@ Task: ${status.task}` : ""}`,
|
|
|
1318
1318
|
}).join("\n") : `No messages for ${actor.name}`;
|
|
1319
1319
|
const footer = `
|
|
1320
1320
|
Inspect LLM I/O: /fabric log ${shortId} \xB7 Export: /fabric export-log ${actor.name}`;
|
|
1321
|
-
context.ui.notify(`${
|
|
1321
|
+
context.ui.notify(`${body2}${footer}`, "info");
|
|
1322
1322
|
} catch (error) {
|
|
1323
1323
|
context.ui.notify(error instanceof Error ? error.message : String(error), "error");
|
|
1324
1324
|
}
|
|
@@ -2183,7 +2183,7 @@ var fabricExecutionKernelGuidance = (fullCodeMode, deniedCoreTools = []) => [
|
|
|
2183
2183
|
...fullCodeMode && !deniedCoreTools.includes("edit") && !deniedCoreTools.includes("write") ? ["Prefer `omp.edit`/`omp.write` for source edits over hand-assembled shell or Node string literals, where nested escaping breaks; running a formatter or codemod through `omp.bash` is a different case."] : [],
|
|
2184
2184
|
...fullCodeMode && deniedCoreTools.length > 0 ? [`OMP has these core tools turned off, so ${deniedCoreTools.map((name) => `\`omp.${name}\``).join(", ")} ${deniedCoreTools.length === 1 ? "is" : "are"} unavailable and calling ${deniedCoreTools.length === 1 ? "it" : "them"} fails.`] : []
|
|
2185
2185
|
].join(" ");
|
|
2186
|
-
var defaultFabricExecutionGuidance = (fullCodeMode) => fullCodeMode ? "Examples and returns: `omp.read('/x')`, `omp.grep('TODO','src')` / `omp.grep({pattern:'TODO', path:'src', ignoreCase:true, context:2})`, `omp.find({pattern:'*.ts', path:'src', limit:20})`, and `omp.ls('src')` return strings; `omp.bash({cmd:'ls'})`, `omp.edit({path:'/x', old:'a', new:'b'})`, and `omp.write({path:'/y', text:'z'})` return `{ok, output, details}` (read `.output`); failed core calls reject, including shell tools on an ordinary nonzero exit; pass `settle: true` to `omp.bash` to get `{ ok: false, exitCode, output, error }` instead. Timeout, cancellation, approval, and security failures still reject.\n`tools` is discovery + generic calls only (`providers`/`catalog`/`list`/`search`/`describe`/`call`/`models`). Call known MCP tools as `mcp.<sanitized_server>.<sanitized_tool>(args)`, captured tools as `extensions.<tool>(args)`, and stable providers as `memory.*`, `state.*`, `schema.*`, `compact.*`, or `judgment.*` (calibrated choice/bool/score answers about one state). Use `tools.call({ref,args})` for computed refs. `omp` is the core tools; `omp.<key>` reads a named `payloads` value (not a tool)." : "Call known actions through `mcp.<sanitized_server>.<sanitized_tool>(args)`, `memory.*`, `state.*`, `schema.*`, `components.*`, `compact.*`, `codemap.*`, `judgment.*`, `agents.*`, or `mesh.*`; use `tools.catalog`/`search`/`describe`/`list` for discovery and `tools.call({ref,args})` for computed refs. Other surfaces are opt-in via user-loaded skills.";
|
|
2186
|
+
var defaultFabricExecutionGuidance = (fullCodeMode) => fullCodeMode ? "Examples and returns: `omp.read('/x')`, `omp.grep('TODO','src')` / `omp.grep({pattern:'TODO', path:'src', ignoreCase:true, context:2})`, `omp.find({pattern:'*.ts', path:'src', limit:20})`, and `omp.ls('src')` return strings; `omp.bash({cmd:'ls'})`, `omp.edit({path:'/x', old:'a', new:'b'})`, and `omp.write({path:'/y', text:'z'})` return `{ok, output, details}` (read `.output`); failed core calls reject, including shell tools on an ordinary nonzero exit; pass `settle: true` to `omp.bash` to get `{ ok: false, exitCode, output, error }` instead. Timeout, cancellation, approval, and security failures still reject.\n`tools` is discovery + generic calls only (`providers`/`catalog`/`list`/`search`/`describe`/`call`/`models`). Call known MCP tools as `mcp.<sanitized_server>.<sanitized_tool>(args)`, captured tools as `extensions.<tool>(args)`, and stable providers as `memory.*`, `state.*`, `schema.*`, `compact.*`, or `judgment.*` (calibrated choice/bool/score answers about one state). Use `tools.call({ref,args})` for computed refs. Use `judge.filter(items, instructions)` or `judge.bool(state, instructions)` for fast semantic triage in one request without subagents (e.g. `await judge.filter(logs, 'fatal error')`). `omp` is the core tools; `omp.<key>` reads a named `payloads` value (not a tool)." : "Call known actions through `mcp.<sanitized_server>.<sanitized_tool>(args)`, `memory.*`, `state.*`, `schema.*`, `components.*`, `compact.*`, `codemap.*`, `judgment.*`, `agents.*`, or `mesh.*`; use `tools.catalog`/`search`/`describe`/`list` for discovery and `tools.call({ref,args})` for computed refs. Other surfaces are opt-in via user-loaded skills.";
|
|
2187
2187
|
var manifestNameCache = /* @__PURE__ */ new Map();
|
|
2188
2188
|
var packageNameFromManifest = (startPath) => {
|
|
2189
2189
|
if (!startPath) return void 0;
|
|
@@ -2423,8 +2423,8 @@ var buildSkillReferenceGuidance = (prompt, skills) => {
|
|
|
2423
2423
|
if (closingTag < 0) return void 0;
|
|
2424
2424
|
const openingEnd = prompt.indexOf("\n\n");
|
|
2425
2425
|
if (openingEnd < 0 || openingEnd >= closingTag) return void 0;
|
|
2426
|
-
const
|
|
2427
|
-
const invocationLines =
|
|
2426
|
+
const body2 = prompt.slice(openingEnd + 2, closingTag);
|
|
2427
|
+
const invocationLines = body2.split("\n").filter((line) => INVOCATION_VERB.test(line) && !NEGATED_INVOCATION.test(line));
|
|
2428
2428
|
const referenced = skills.filter(
|
|
2429
2429
|
(skill) => skill.name !== active.name && skill.hide !== true && invocationLines.some((line) => referencesSkill(line, skill.name))
|
|
2430
2430
|
);
|
|
@@ -2438,6 +2438,143 @@ var buildSkillReferenceGuidance = (prompt, skills) => {
|
|
|
2438
2438
|
].join("\n");
|
|
2439
2439
|
};
|
|
2440
2440
|
|
|
2441
|
+
// src/judgment/gates/skills.ts
|
|
2442
|
+
import { readFileSync as readFileSync3 } from "node:fs";
|
|
2443
|
+
var NONE = "__none__";
|
|
2444
|
+
var SHORTLIST = 3;
|
|
2445
|
+
var MAX_CHOICE_OPTIONS = 254;
|
|
2446
|
+
var ROSTER_DESCRIPTION_CHARS = 200;
|
|
2447
|
+
var ROSTER_NARROW_CHARS = 96;
|
|
2448
|
+
var ROSTER_BYTE_BUDGET = 48 * 1024;
|
|
2449
|
+
var DETAIL_CHARS = 700;
|
|
2450
|
+
var ACTS_THRESHOLD = 0.5;
|
|
2451
|
+
var PROCEDURE_THRESHOLD = 0.5;
|
|
2452
|
+
var CONVERSATION_CEILING = 0.5;
|
|
2453
|
+
var FITS_THRESHOLD = 0.6;
|
|
2454
|
+
var SKILL_GATE_BUDGET_MS = 6e3;
|
|
2455
|
+
var clip = (value, chars) => value.length <= chars ? value : `${value.slice(0, chars - 1)}\u2026`;
|
|
2456
|
+
var rosterCriteria = (skills, chars) => {
|
|
2457
|
+
const criteria = {};
|
|
2458
|
+
for (const skill of skills) criteria[skill.name] = clip(skill.description, chars);
|
|
2459
|
+
criteria[NONE] = "No skill in this roster fits the request.";
|
|
2460
|
+
return criteria;
|
|
2461
|
+
};
|
|
2462
|
+
var budgetedRoster = (skills) => {
|
|
2463
|
+
const wide = rosterCriteria(skills, ROSTER_DESCRIPTION_CHARS);
|
|
2464
|
+
const bytes = Buffer.byteLength(JSON.stringify(wide), "utf-8");
|
|
2465
|
+
return bytes <= ROSTER_BYTE_BUDGET ? wide : rosterCriteria(skills, ROSTER_NARROW_CHARS);
|
|
2466
|
+
};
|
|
2467
|
+
var shards = (skills) => {
|
|
2468
|
+
const count = Math.ceil(skills.length / MAX_CHOICE_OPTIONS);
|
|
2469
|
+
const size = Math.ceil(skills.length / count);
|
|
2470
|
+
const groups = [];
|
|
2471
|
+
for (let index = 0; index < skills.length; index += size) {
|
|
2472
|
+
groups.push(skills.slice(index, index + size));
|
|
2473
|
+
}
|
|
2474
|
+
return groups;
|
|
2475
|
+
};
|
|
2476
|
+
var body = (source) => {
|
|
2477
|
+
if (!source.startsWith("---")) return source;
|
|
2478
|
+
const end = source.indexOf("\n---", 3);
|
|
2479
|
+
return end < 0 ? source : source.slice(end + 4).trimStart();
|
|
2480
|
+
};
|
|
2481
|
+
var opening = (skill) => {
|
|
2482
|
+
if (!skill.filePath) return skill.description;
|
|
2483
|
+
try {
|
|
2484
|
+
const text = body(readFileSync3(skill.filePath, "utf-8")).trim();
|
|
2485
|
+
return text.length === 0 ? skill.description : clip(text, DETAIL_CHARS);
|
|
2486
|
+
} catch {
|
|
2487
|
+
return skill.description;
|
|
2488
|
+
}
|
|
2489
|
+
};
|
|
2490
|
+
var suggestSkill = async (lane, prompt, skills, options) => {
|
|
2491
|
+
if (skills.length < 2) return void 0;
|
|
2492
|
+
const ask = options?.signal !== void 0 ? { signal: options.signal } : void 0;
|
|
2493
|
+
const groups = shards(skills);
|
|
2494
|
+
const picks = {};
|
|
2495
|
+
groups.forEach((group, index) => {
|
|
2496
|
+
picks[`pick_${index}`] = {
|
|
2497
|
+
type: "choice",
|
|
2498
|
+
instructions: "Which of these skills covers what this request asks for? Each option is a skill name and the situation it is written for.",
|
|
2499
|
+
criteria: budgetedRoster(group)
|
|
2500
|
+
};
|
|
2501
|
+
});
|
|
2502
|
+
const ranked = await lane.ask(
|
|
2503
|
+
prompt,
|
|
2504
|
+
{
|
|
2505
|
+
...picks,
|
|
2506
|
+
acts_on_their_work: {
|
|
2507
|
+
type: "noul",
|
|
2508
|
+
instructions: "Does answering this request mean acting on the user's own files, systems, or data?"
|
|
2509
|
+
},
|
|
2510
|
+
follows_a_procedure: {
|
|
2511
|
+
type: "noul",
|
|
2512
|
+
instructions: "Does this request call for an established procedure with steps, gates, or known pitfalls?"
|
|
2513
|
+
},
|
|
2514
|
+
conversation_only: {
|
|
2515
|
+
type: "noul",
|
|
2516
|
+
instructions: "Is the user only asking something answerable from general knowledge?"
|
|
2517
|
+
}
|
|
2518
|
+
},
|
|
2519
|
+
ask
|
|
2520
|
+
);
|
|
2521
|
+
if (!ranked.ok) return void 0;
|
|
2522
|
+
const acts = ranked.answers.acts_on_their_work.noul;
|
|
2523
|
+
const procedure = ranked.answers.follows_a_procedure.noul;
|
|
2524
|
+
const conversation = ranked.answers.conversation_only.noul;
|
|
2525
|
+
if (conversation > CONVERSATION_CEILING) return void 0;
|
|
2526
|
+
if (acts < ACTS_THRESHOLD && procedure < PROCEDURE_THRESHOLD) return void 0;
|
|
2527
|
+
const scored = ranked.answers;
|
|
2528
|
+
const best = /* @__PURE__ */ new Map();
|
|
2529
|
+
for (const key2 of Object.keys(picks)) {
|
|
2530
|
+
const probabilities = scored[key2]?.probabilities ?? {};
|
|
2531
|
+
for (const [name, probability] of Object.entries(probabilities)) {
|
|
2532
|
+
if (name === NONE) continue;
|
|
2533
|
+
const seen = best.get(name) ?? 0;
|
|
2534
|
+
if (probability > seen) best.set(name, probability);
|
|
2535
|
+
}
|
|
2536
|
+
}
|
|
2537
|
+
const shortlist = [...best.entries()].sort(([, left], [, right]) => right - left).slice(0, SHORTLIST).map(([name]) => skills.find((skill) => skill.name === name)).filter((skill) => skill !== void 0);
|
|
2538
|
+
if (shortlist.length === 0) return void 0;
|
|
2539
|
+
const detail = {};
|
|
2540
|
+
for (const skill of shortlist) detail[skill.name] = opening(skill);
|
|
2541
|
+
detail[NONE] = "None of these three fits the request.";
|
|
2542
|
+
const fits = {};
|
|
2543
|
+
for (const skill of shortlist) {
|
|
2544
|
+
fits[`fits_${skill.name.replaceAll(/[^A-Za-z0-9]/gu, "_")}`] = {
|
|
2545
|
+
type: "noul",
|
|
2546
|
+
instructions: `Does the skill "${skill.name}" do what this request asks for?`
|
|
2547
|
+
};
|
|
2548
|
+
}
|
|
2549
|
+
const verified = await lane.ask(
|
|
2550
|
+
{ request: prompt, candidates: detail },
|
|
2551
|
+
{
|
|
2552
|
+
pick: {
|
|
2553
|
+
type: "choice",
|
|
2554
|
+
instructions: "Read these three skills properly and pick the one this request needs, or reject all three.",
|
|
2555
|
+
criteria: detail
|
|
2556
|
+
},
|
|
2557
|
+
...fits
|
|
2558
|
+
},
|
|
2559
|
+
ask
|
|
2560
|
+
);
|
|
2561
|
+
if (!verified.ok) return void 0;
|
|
2562
|
+
const winner = verified.answers.pick.choice;
|
|
2563
|
+
if (winner === NONE) return void 0;
|
|
2564
|
+
const key = `fits_${winner.replaceAll(/[^A-Za-z0-9]/gu, "_")}`;
|
|
2565
|
+
const answered = verified.answers;
|
|
2566
|
+
const fit = answered[key];
|
|
2567
|
+
if (!fit || fit.type !== "noul" || (fit.noul ?? 0) < FITS_THRESHOLD) return void 0;
|
|
2568
|
+
return {
|
|
2569
|
+
name: winner,
|
|
2570
|
+
probability: fit.noul ?? 0,
|
|
2571
|
+
confidence: verified.answers.pick.confidence
|
|
2572
|
+
};
|
|
2573
|
+
};
|
|
2574
|
+
var skillSuggestionBlock = (suggestion) => `<skill_relevance>
|
|
2575
|
+
Relevant to the current request: ${suggestion.name}. Ignore this if it does not fit what the user asked for.
|
|
2576
|
+
</skill_relevance>`;
|
|
2577
|
+
|
|
2441
2578
|
// src/fabric-exec-tool.ts
|
|
2442
2579
|
import { Container as Container2, Text as Text2 } from "@oh-my-pi/pi-tui";
|
|
2443
2580
|
import { Type } from "@oh-my-pi/omptype/typebox";
|
|
@@ -3074,9 +3211,9 @@ ${preview}` : ""}${hiddenHint}`,
|
|
|
3074
3211
|
});
|
|
3075
3212
|
if (core) return { body: core.lines.join(nl), hidden: core.hidden };
|
|
3076
3213
|
if (coreToolRendererEnabled(audit, codePreviewSettings)) return null;
|
|
3077
|
-
const
|
|
3078
|
-
if (!
|
|
3079
|
-
const bodyLines = safeTerminalText(
|
|
3214
|
+
const body2 = nestedCallBody(audit);
|
|
3215
|
+
if (!body2) return null;
|
|
3216
|
+
const bodyLines = safeTerminalText(body2).split(nl);
|
|
3080
3217
|
while (bodyLines.length > 0) {
|
|
3081
3218
|
const last = bodyLines[bodyLines.length - 1];
|
|
3082
3219
|
if (last === void 0 || last.trim() === "") bodyLines.pop();
|
|
@@ -3598,6 +3735,9 @@ var FabricState = class {
|
|
|
3598
3735
|
get speculationTap() {
|
|
3599
3736
|
return this.#runtime?.speculationTap;
|
|
3600
3737
|
}
|
|
3738
|
+
get judgment() {
|
|
3739
|
+
return this.#runtime?.judgment;
|
|
3740
|
+
}
|
|
3601
3741
|
/** Turn-boundary backstop for the speculation store; safe before initialization. */
|
|
3602
3742
|
resetSpeculation() {
|
|
3603
3743
|
this.#runtime?.resetSpeculation();
|
|
@@ -4089,7 +4229,7 @@ var classifyToolResult = (input) => {
|
|
|
4089
4229
|
};
|
|
4090
4230
|
|
|
4091
4231
|
// src/host-compatibility.ts
|
|
4092
|
-
import { existsSync as existsSync3, readFileSync as
|
|
4232
|
+
import { existsSync as existsSync3, readFileSync as readFileSync4, realpathSync as realpathSync2 } from "node:fs";
|
|
4093
4233
|
import path6 from "node:path";
|
|
4094
4234
|
var MINIMUM_OMP_HOST_VERSION = "18.1.10";
|
|
4095
4235
|
var OMP_HOST_PACKAGE_NAMES = {
|
|
@@ -4128,7 +4268,7 @@ var detectOmpHostVersion = (cliPath = process.argv[1]) => {
|
|
|
4128
4268
|
const manifestPath = path6.join(directory, "package.json");
|
|
4129
4269
|
if (existsSync3(manifestPath)) {
|
|
4130
4270
|
try {
|
|
4131
|
-
const manifest = JSON.parse(
|
|
4271
|
+
const manifest = JSON.parse(readFileSync4(manifestPath, "utf8"));
|
|
4132
4272
|
if (typeof manifest.name === "string" && OMP_HOST_PACKAGE_NAMES[manifest.name] === true && typeof manifest.version === "string") {
|
|
4133
4273
|
return manifest.version;
|
|
4134
4274
|
}
|
|
@@ -5891,6 +6031,17 @@ async function ompFabric(omp) {
|
|
|
5891
6031
|
listableSkills(skills)
|
|
5892
6032
|
) : event.systemPrompt.join("\n");
|
|
5893
6033
|
const skillReferenceGuidance = effectiveFullCodeMode ? buildSkillReferenceGuidance(event.prompt, skills) : void 0;
|
|
6034
|
+
const lane = state.config.judgment.gates.skills ? state.judgment : void 0;
|
|
6035
|
+
const suggestion = lane ? await suggestSkill(
|
|
6036
|
+
lane,
|
|
6037
|
+
event.prompt,
|
|
6038
|
+
listableSkills(skills).map((skill) => ({
|
|
6039
|
+
name: skill.name,
|
|
6040
|
+
description: skill.description,
|
|
6041
|
+
filePath: skill.filePath
|
|
6042
|
+
})),
|
|
6043
|
+
{ signal: AbortSignal.timeout(SKILL_GATE_BUDGET_MS) }
|
|
6044
|
+
) : void 0;
|
|
5894
6045
|
const currentModel = context.model ? `${context.model.provider}/${context.model.id}` : void 0;
|
|
5895
6046
|
const resolvedGuidance = resolveFabricModelGuidance(state.modelGuidance(), {
|
|
5896
6047
|
...currentModel ? { model: currentModel } : {},
|
|
@@ -5913,7 +6064,11 @@ async function ompFabric(omp) {
|
|
|
5913
6064
|
extensionRoster,
|
|
5914
6065
|
resolvedGuidance.appendText
|
|
5915
6066
|
].filter((section) => Boolean(section)).join("\n\n");
|
|
5916
|
-
|
|
6067
|
+
const turnContent = [
|
|
6068
|
+
skillReferenceGuidance,
|
|
6069
|
+
suggestion ? skillSuggestionBlock(suggestion) : void 0
|
|
6070
|
+
].filter((section) => Boolean(section)).join("\n\n");
|
|
6071
|
+
if (!turnContent) return {
|
|
5917
6072
|
systemPrompt: [`${systemPrompt}
|
|
5918
6073
|
|
|
5919
6074
|
${guidance}`]
|
|
@@ -5924,7 +6079,7 @@ ${guidance}`]
|
|
|
5924
6079
|
${guidance}`],
|
|
5925
6080
|
message: {
|
|
5926
6081
|
customType: SKILL_REFERENCE_CUSTOM_TYPE,
|
|
5927
|
-
content:
|
|
6082
|
+
content: turnContent,
|
|
5928
6083
|
display: false,
|
|
5929
6084
|
details: {}
|
|
5930
6085
|
}
|