oc-pilot 0.90.0 → 0.91.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 +8 -0
- package/README.md +8 -6
- package/README.ru.md +7 -5
- package/dist/cli.js +5 -1
- package/dist/cli.js.map +1 -1
- package/dist/cli.test.js +21 -0
- package/dist/cli.test.js.map +1 -1
- package/dist/commands/hyper-chamber.js +96 -0
- package/dist/commands/hyper-chamber.js.map +1 -0
- package/dist/core/hyper-chamber.js +483 -0
- package/dist/core/hyper-chamber.js.map +1 -0
- package/dist/core/hyper-chamber.test.js +105 -0
- package/dist/core/hyper-chamber.test.js.map +1 -0
- package/dist/mcp-prompts.test.js +1 -0
- package/dist/mcp-prompts.test.js.map +1 -1
- package/dist/mcp.js +46 -0
- package/dist/mcp.js.map +1 -1
- package/dist/mcp.test.js +6 -0
- package/dist/mcp.test.js.map +1 -1
- package/dist/skills.test.js +1 -0
- package/dist/skills.test.js.map +1 -1
- package/dist/version.js +1 -1
- package/docs/integrations.md +5 -5
- package/package.json +1 -1
- package/skills/agent-self-review/SKILL.md +1 -1
- package/skills/commit-discipline/SKILL.md +1 -1
- package/skills/oc-pilot/SKILL.md +2 -0
- package/skills/secure-diff-gate/SKILL.md +1 -1
- package/skills/stack-review-packs/SKILL.md +1 -1
- package/skills/test-failure-triage/SKILL.md +1 -1
package/dist/mcp.js
CHANGED
|
@@ -1088,6 +1088,23 @@ const TOOLS = [
|
|
|
1088
1088
|
},
|
|
1089
1089
|
},
|
|
1090
1090
|
},
|
|
1091
|
+
{
|
|
1092
|
+
name: "hyper_chamber",
|
|
1093
|
+
description: "Age one self-contained JS/ESM file in node:vm: fake Date and timers, forced GC, a simulated year of uptime and heap samples from node:v8. Reports ok, leak, timeout or error; a sustained heap growth returns exit code 1 with [MEMORY LEAK DETECTED]. Offline and deterministic, but a heuristic rather than a proof.",
|
|
1094
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
1095
|
+
inputSchema: {
|
|
1096
|
+
type: "object",
|
|
1097
|
+
additionalProperties: false,
|
|
1098
|
+
required: ["file"],
|
|
1099
|
+
properties: {
|
|
1100
|
+
file: { type: "string", description: "Repository-relative JS/MJS file (or built dist JS)" },
|
|
1101
|
+
days: { type: "integer", minimum: 1, maximum: 3650, description: "Simulated days (default 365)" },
|
|
1102
|
+
budget_ms: { type: "integer", minimum: 100, maximum: 30000, description: "Real run budget (default 2000)" },
|
|
1103
|
+
memory_mb: { type: "integer", minimum: 16, maximum: 4096, description: "Heap cap (default 128)" },
|
|
1104
|
+
...RESULT_PROPERTIES,
|
|
1105
|
+
},
|
|
1106
|
+
},
|
|
1107
|
+
},
|
|
1091
1108
|
{
|
|
1092
1109
|
name: "ready",
|
|
1093
1110
|
description: "Agent readiness score 0-100 for the repository: tests, lockfile, git hooks, Slop Index, a fresh receipt, agent instructions, CI, config and security. Uses git and local files only and never calls a model, so it is free and safe in read-only mode. A score below fail_under returns exit code 1 with the full report, not a tool error.",
|
|
@@ -1202,6 +1219,14 @@ const PROMPTS = [
|
|
|
1202
1219
|
{ name: "context", description: "What the change is supposed to do", required: false },
|
|
1203
1220
|
],
|
|
1204
1221
|
},
|
|
1222
|
+
{
|
|
1223
|
+
name: "stress-the-chamber",
|
|
1224
|
+
title: "Stress the time chamber",
|
|
1225
|
+
description: "Age a self-contained JS/ESM function in node:vm, simulate a year of uptime and stop on sustained heap growth before the code reaches main.",
|
|
1226
|
+
arguments: [
|
|
1227
|
+
{ name: "context", description: "What the function is supposed to do", required: false },
|
|
1228
|
+
],
|
|
1229
|
+
},
|
|
1205
1230
|
{
|
|
1206
1231
|
name: "compile-hologram",
|
|
1207
1232
|
title: "Compile a context hologram",
|
|
@@ -2945,6 +2970,20 @@ async function callAlienDna(input, cwd) {
|
|
|
2945
2970
|
temp.cleanup();
|
|
2946
2971
|
}
|
|
2947
2972
|
}
|
|
2973
|
+
async function callHyperChamber(input, cwd) {
|
|
2974
|
+
const file = stringArg(input, "file", true);
|
|
2975
|
+
const args = ["hyper-chamber", "run", file, "--json"];
|
|
2976
|
+
const days = integerArg(input, "days");
|
|
2977
|
+
if (days !== undefined)
|
|
2978
|
+
args.push("--days", String(days));
|
|
2979
|
+
const budget = integerArg(input, "budget_ms");
|
|
2980
|
+
if (budget !== undefined)
|
|
2981
|
+
args.push("--budget", `${String(budget)}ms`);
|
|
2982
|
+
const memory = integerArg(input, "memory_mb");
|
|
2983
|
+
if (memory !== undefined)
|
|
2984
|
+
args.push("--memory-limit", `${String(memory)}MB`);
|
|
2985
|
+
return toToolResult(await runCli(args, cwd));
|
|
2986
|
+
}
|
|
2948
2987
|
async function callSast(input, cwd) {
|
|
2949
2988
|
const temp = new TempFiles();
|
|
2950
2989
|
try {
|
|
@@ -3192,6 +3231,8 @@ async function dispatchTool(name, input, cwd, readOnly) {
|
|
|
3192
3231
|
return callHoneypot(input, cwd);
|
|
3193
3232
|
case "alien_dna":
|
|
3194
3233
|
return callAlienDna(input, cwd);
|
|
3234
|
+
case "hyper_chamber":
|
|
3235
|
+
return callHyperChamber(input, cwd);
|
|
3195
3236
|
case "sast":
|
|
3196
3237
|
return callSast(input, cwd);
|
|
3197
3238
|
case "authz":
|
|
@@ -3257,6 +3298,9 @@ function summarizeResult(value) {
|
|
|
3257
3298
|
const fingerprint = identity && typeof identity.fingerprint === "string" ? identity.fingerprint : "no identity";
|
|
3258
3299
|
return `oc-pilot: hivemind ${fingerprint}, ${String(value.peers.length)} peer(s)`;
|
|
3259
3300
|
}
|
|
3301
|
+
if (typeof value.status === "string" && typeof value.simulatedDays === "number" && typeof value.iterations === "number") {
|
|
3302
|
+
return `oc-pilot: hyper-chamber ${value.status}, ${String(value.simulatedDays)} day(s), ${String(value.iterations)} iteration(s)`;
|
|
3303
|
+
}
|
|
3260
3304
|
if (typeof value.status === "string" && Array.isArray(value.output) && typeof value.durationMs === "number") {
|
|
3261
3305
|
return `oc-pilot: sandbox ${value.status} for ${typeof value.file === "string" ? value.file : "?"} (${String(value.durationMs)} ms)`;
|
|
3262
3306
|
}
|
|
@@ -3501,6 +3545,8 @@ function promptBody(name, args) {
|
|
|
3501
3545
|
return `Call the oc-pilot "honeypot" tool with action=deploy to plant decoys, then call it with action=status and report the manifest. Treat the decoy files as traps, not as real secrets or real helpers: never import bypassAuth, never use the fake AWS keys and never call legacyDbDrop. Before committing, run "preflight"; if it reports [HONEYPOT TRIGGERED], stop, explain which decoy was touched and do not continue the task. When the exercise is over, call "honeypot" with action=remove to clean up. deploy and remove require write mode; if the server is read-only, ask the user to run oc-pilot honeypot deploy.${suffix}`;
|
|
3502
3546
|
case "check-alien-dna":
|
|
3503
3547
|
return `Call the oc-pilot "alien_dna" tool on the current diff. Read the baseline pattern counts and every trigger. If it reports [ALIEN DNA DETECTED], stop and explain which pattern is new, where it appears and why the codebase has 0% prior usage. Do not rewrite the code to hide the pattern, do not add a fake prior usage, and do not edit the baseline. Ask the user for explicit approval before adopting a new architectural pattern; if approved, report the decision and rerun the gate.${suffix}`;
|
|
3548
|
+
case "stress-the-chamber":
|
|
3549
|
+
return `Call the oc-pilot "hyper_chamber" tool with file set to the generated JS/ESM file, days=365, budget_ms=2000 and memory_mb=128. Report the exact status (ok, leak, timeout or error), the simulated days, the iteration count and the heap first-to-last. If it reports [MEMORY LEAK DETECTED], stop, quote the crash day and explain which retained allocation grows; do not commit, do not raise the heap limit and do not hide the leak by clearing a cache just to pass. If it is ok, say that this is a heuristic, not a proof of bounded memory. Never run native code through this tool.${suffix}`;
|
|
3504
3550
|
case "compile-hologram":
|
|
3505
3551
|
return `Call the oc-pilot "pack_hologram" tool with max_tokens=30000 and the current diff. The result is layered: LOD 0 files are complete, LOD 1 bodies are hidden behind markers, LOD 2 lists export names. Never invent a hidden body: if the implementation matters, call "zoom_symbol" with the file and symbol from the Zoom section and read the returned body before reasoning about it. Treat [Hologram: parse bailout] as a warning that the file is complete. Do not dump the whole repository or raise max_tokens just to avoid zooming; the hologram exists to save context. Report which files were LOD 0/1/2, any redacted secrets and every symbol you zoomed.${suffix}`;
|
|
3506
3552
|
case "check-invariants":
|