@mmerterden/multi-agent-pipeline 20.41.0 → 20.42.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 +44 -0
- package/README.md +1 -1
- package/README.tr.md +1 -1
- package/docs/ecosystem.md +45 -8
- package/docs/facts.json +7 -7
- package/docs/features.md +9 -4
- package/install/claude.mjs +34 -1
- package/install/templates/claude-hooks.json +12 -1
- package/manifest.json +106 -86
- package/package.json +3 -2
- package/pipeline/commands/multi-agent/autopilot/SKILL.md +11 -0
- package/pipeline/commands/multi-agent/setup/SKILL.md +1 -1
- package/pipeline/lib/args.mjs +131 -4
- package/pipeline/lib/bg-launch.mjs +5 -2
- package/pipeline/lib/credential-store.sh +11 -1
- package/pipeline/lib/hook-once.mjs +134 -0
- package/pipeline/lib/isotonic.mjs +73 -0
- package/pipeline/lib/low-disk.mjs +153 -0
- package/pipeline/lib/mcp-schema-load.mjs +90 -0
- package/pipeline/lib/md2confluence-v3.py +8 -7
- package/pipeline/lib/model-dispatch.sh +26 -2
- package/pipeline/lib/normalize-text.mjs +135 -0
- package/pipeline/lib/outbound-gate.mjs +21 -3
- package/pipeline/lib/plan-todos.sh +17 -4
- package/pipeline/lib/redact.mjs +12 -3
- package/pipeline/lib/risky-settings.mjs +198 -0
- package/pipeline/lib/route-state.sh +1 -0
- package/pipeline/lib/secret-patterns.generated.mjs +6 -2
- package/pipeline/lib/session-usage.mjs +232 -0
- package/pipeline/lib/source-digest.mjs +211 -0
- package/pipeline/lib/tdd-evidence.mjs +250 -17
- package/pipeline/lib/untrusted-fence.mjs +132 -1
- package/pipeline/multi-agent-refs/analysis/locked.md +1 -1
- package/pipeline/multi-agent-refs/features/cost-analysis.md +37 -2
- package/pipeline/multi-agent-refs/features/doctor.md +51 -4
- package/pipeline/multi-agent-refs/features/model-fallback.md +25 -0
- package/pipeline/multi-agent-refs/features/plan-todos.md +4 -0
- package/pipeline/multi-agent-refs/features/unattended-gates.md +5 -3
- package/pipeline/multi-agent-refs/features/usage-reporting.md +4 -2
- package/pipeline/multi-agent-refs/help/en.md +1 -1
- package/pipeline/multi-agent-refs/help/tr.md +1 -1
- package/pipeline/multi-agent-refs/outside-the-pipeline.md +6 -0
- package/pipeline/multi-agent-refs/phases/phase-1-plan.md +1 -1
- package/pipeline/multi-agent-refs/phases/phase-2-dev.md +4 -4
- package/pipeline/multi-agent-refs/phases/phase-3-review.md +2 -2
- package/pipeline/multi-agent-refs/phases/phase-5-report.md +2 -0
- package/pipeline/multi-agent-refs/progress-contract.md +3 -1
- package/pipeline/office/toolkit.json +1 -1
- package/pipeline/rules/outside-the-pipeline.md +1 -1
- package/pipeline/schemas/doctor-report.schema.json +47 -0
- package/pipeline/schemas/plan-todos.schema.json +29 -1
- package/pipeline/schemas/prefs.schema.json +63 -0
- package/pipeline/schemas/route-config.schema.json +51 -0
- package/pipeline/schemas/secret-patterns.json +17 -1
- package/pipeline/schemas/toolkit-path-params.json +15 -1
- package/pipeline/scripts/_cost-advise.mjs +357 -0
- package/pipeline/scripts/_cost-budget.mjs +78 -0
- package/pipeline/scripts/_cost.mjs +29 -0
- package/pipeline/scripts/_decode_text.py +107 -0
- package/pipeline/scripts/_guard-probe.mjs +406 -0
- package/pipeline/scripts/_guard_rules.py +206 -0
- package/pipeline/scripts/_memory-policy.mjs +1 -25
- package/pipeline/scripts/_retrieval.mjs +148 -2
- package/pipeline/scripts/_secret-scan.mjs +6 -1
- package/pipeline/scripts/_stack-routing.mjs +1 -0
- package/pipeline/scripts/_test-gaming.mjs +346 -0
- package/pipeline/scripts/agent-guard.py +8 -1
- package/pipeline/scripts/argv-secret-scan.mjs +2 -1
- package/pipeline/scripts/autopilot-loop.mjs +407 -0
- package/pipeline/scripts/autopilot-runner.mjs +38 -25
- package/pipeline/scripts/capture-resume.sh +9 -1
- package/pipeline/scripts/cost-analyze.mjs +66 -4
- package/pipeline/scripts/cost-budget-check.mjs +5 -13
- package/pipeline/scripts/disk-cleaner.mjs +1418 -0
- package/pipeline/scripts/doctor.mjs +169 -44
- package/pipeline/scripts/evidence-gate.mjs +90 -0
- package/pipeline/scripts/gate-ledger.mjs +76 -21
- package/pipeline/scripts/gc-tmp.sh +5 -0
- package/pipeline/scripts/guard-probe-known-holes.json +3 -0
- package/pipeline/scripts/learnings-ledger.mjs +16 -12
- package/pipeline/scripts/note-agent-event.mjs +2 -0
- package/pipeline/scripts/note-mcp-failure.mjs +9 -2
- package/pipeline/scripts/note-skill-use.mjs +4 -1
- package/pipeline/scripts/pre-commit-check.sh +2 -2
- package/pipeline/scripts/pre-push-check.sh +8 -1
- package/pipeline/scripts/publish-staged.mjs +324 -0
- package/pipeline/scripts/route-learn.mjs +628 -0
- package/pipeline/scripts/run-scope-guard.mjs +55 -1
- package/pipeline/scripts/scan-agent-config.sh +1 -1
- package/pipeline/scripts/statusline.mjs +309 -0
- package/pipeline/scripts/test-integrity-gate.mjs +97 -2
- package/pipeline/scripts/triage-memory.mjs +12 -4
- package/pipeline/scripts/uninstall.mjs +1 -0
- package/pipeline/skills/.skill-manifest.json +8 -4
- package/pipeline/skills/.skills-index.json +14 -3
- package/pipeline/skills/shared/README.md +5 -4
- package/pipeline/skills/shared/external/backlog/SKILL.md +1 -1
- package/pipeline/skills/shared/external/disk-cleaner/SKILL.md +105 -0
- package/pipeline/skills/shared/external/disk-cleaner/evals/evals.json +62 -0
- package/pipeline/skills/shared/external/disk-cleaner/scripts/disk-cleaner.mjs +1418 -0
- package/pipeline/skills/shared/external/localization-reuse-map/SKILL.md +1 -1
- package/pipeline/skills/skill-copies.json +4 -0
- package/pipeline/skills/skills-index.md +3 -2
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
import { readFileSync, existsSync } from "fs";
|
|
38
38
|
import { dirname, join } from "path";
|
|
39
39
|
import { fileURLToPath } from "url";
|
|
40
|
-
import {
|
|
40
|
+
import { budgetLevel, trackerSpend } from "./_cost-budget.mjs";
|
|
41
41
|
import { resolveRunFile } from "./_run-paths.mjs";
|
|
42
42
|
import { parseArgs } from "../lib/args.mjs";
|
|
43
43
|
import { helpRequested } from "../lib/cli-help.mjs";
|
|
@@ -117,16 +117,8 @@ const costTable = JSON.parse(readFileSync(join(__dirname, "cost-table.json"), "u
|
|
|
117
117
|
const rate = costTable.prices?.[cfg.pricingModel];
|
|
118
118
|
if (!rate) die(`no price for model "${cfg.pricingModel}" in cost-table.json`);
|
|
119
119
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
let tokensCached = 0;
|
|
123
|
-
for (const p of Object.values(tracker.phases || {})) {
|
|
124
|
-
tokensIn += Number(p?.tokens_in || 0);
|
|
125
|
-
tokensOut += Number(p?.tokens_out || 0);
|
|
126
|
-
tokensCached += Number(p?.tokens_cached || 0);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
const usd = costUsd(rate, tokensIn, tokensOut, tokensCached);
|
|
120
|
+
const { usd, tokensIn, tokensOut, tokensCached } = trackerSpend(tracker, rate);
|
|
121
|
+
const level = budgetLevel(usd, cfg);
|
|
130
122
|
const pctOfMax = (usd / cfg.maxUsd) * 100;
|
|
131
123
|
const usdStr = `$${usd.toFixed(2)}`;
|
|
132
124
|
const totalTok = tokensIn + tokensOut + tokensCached;
|
|
@@ -135,13 +127,13 @@ const base =
|
|
|
135
127
|
`cost-budget: ${usdStr} of $${cfg.maxUsd.toFixed(2)} ` +
|
|
136
128
|
`(${pctOfMax.toFixed(0)}%, ${totalTok.toLocaleString("en-US")} tok @ ${cfg.pricingModel})`;
|
|
137
129
|
|
|
138
|
-
if (
|
|
130
|
+
if (level === "exceeded") {
|
|
139
131
|
const action =
|
|
140
132
|
cfg.onExceed === "halt" ? "HALT - run multi-agent:resume to continue" : "over budget";
|
|
141
133
|
process.stdout.write(`EXCEEDED: ${base} - ${action}\n`);
|
|
142
134
|
process.exit(11);
|
|
143
135
|
}
|
|
144
|
-
if (
|
|
136
|
+
if (level === "warn") {
|
|
145
137
|
process.stdout.write(`WARN: ${base} - approaching ceiling\n`);
|
|
146
138
|
process.exit(10);
|
|
147
139
|
}
|