jules-orchestrator-kit 0.32.7 → 0.32.8
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/README.md +1 -1
- package/bin/agentctl.mjs +2 -2
- package/package.json +1 -1
- package/scripts/utils.mjs +9 -3
- package/src/engine.mjs +15 -6
package/README.md
CHANGED
|
@@ -120,7 +120,7 @@ Autonomous coding agents can write software at 100× human speed—but unconstra
|
|
|
120
120
|
|
|
121
121
|
* **🚀 Zero-Test Bootstrapping (`agentctl bootstrap`):** Synthesizes deterministic syntax-check and smoke-test verification oracles for untested legacy repositories so agents always operate against a falsifiable feedback loop.
|
|
122
122
|
|
|
123
|
-
* **📈 Proven Scale & Reliability:** Empirically tested with **
|
|
123
|
+
* **📈 Proven Scale & Reliability:** Empirically tested with **461 unit tests across 66 suites passing in < 10.0s**, supporting 300+ daily agent sessions per repository. An adversarial red-team suite (`test/adversarial-claims.test.mjs`) continuously attempts to falsify the safety guarantees documented above — including cross-platform probes for the case-insensitive filesystems on macOS and Windows — and a documentation-sync gate (`scripts/doc-sync-check.mjs`) blocks any release whose docs have drifted from the code.
|
|
124
124
|
|
|
125
125
|
<br/>
|
|
126
126
|
|
package/bin/agentctl.mjs
CHANGED
|
@@ -12,11 +12,11 @@ import { reapOrphanedIntents, reapStaleMutexDirs } from "../src/journal.mjs";
|
|
|
12
12
|
const args = process.argv.slice(2);
|
|
13
13
|
const command = args[0];
|
|
14
14
|
|
|
15
|
-
export const VERSION = "0.32.
|
|
15
|
+
export const VERSION = "0.32.8";
|
|
16
16
|
|
|
17
17
|
export function printHelp() {
|
|
18
18
|
console.log(`
|
|
19
|
-
🚀 agentctl v0.32.
|
|
19
|
+
🚀 agentctl v0.32.8 — Universal Agent Orchestrator & Safety Gatekeeper
|
|
20
20
|
|
|
21
21
|
Usage: agentctl <command> [options]
|
|
22
22
|
|
package/package.json
CHANGED
package/scripts/utils.mjs
CHANGED
|
@@ -135,9 +135,15 @@ export function checkDailyBudget(arg1 = resolveRoot(), arg2 = 300) {
|
|
|
135
135
|
return res;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
/**
|
|
139
|
+
* @param {number} [maxSessions=300]
|
|
140
|
+
* @param {string} [taskKey=""]
|
|
141
|
+
* @param {string} [root] - Ledger root. Defaults to the git toplevel. Pass an
|
|
142
|
+
* explicit root to keep callers (notably tests) off the operator's real ledger.
|
|
143
|
+
*/
|
|
144
|
+
export function reserveDailyBudget(maxSessions = 300, taskKey = "", root = resolveRoot()) {
|
|
145
|
+
appendLedger({ event: "budget_reserved", key: taskKey }, root);
|
|
146
|
+
const check = checkDailyBudget(root, maxSessions);
|
|
141
147
|
return { ok: check.ok, used: check.used, budget: maxSessions };
|
|
142
148
|
}
|
|
143
149
|
|
package/src/engine.mjs
CHANGED
|
@@ -695,7 +695,12 @@ export async function dispatch(task = {}, opts = {}) {
|
|
|
695
695
|
}
|
|
696
696
|
const root = opts.config?._root || opts.root || process.cwd();
|
|
697
697
|
const config = opts.config || loadConfig(root);
|
|
698
|
-
|
|
698
|
+
// opts.provider mirrors gate()'s existing injection point, so a caller can
|
|
699
|
+
// exercise dispatch without reaching a live provider.
|
|
700
|
+
const resolved = resolveRoutedProvider(task, config);
|
|
701
|
+
const provider = opts.provider || resolved.provider;
|
|
702
|
+
const routed = opts.provider ? false : resolved.routed;
|
|
703
|
+
const classification = opts.provider ? null : resolved.classification;
|
|
699
704
|
if (routed && classification) {
|
|
700
705
|
appendTelemetry(root, "router_decision", {
|
|
701
706
|
tier: classification.tier,
|
|
@@ -739,12 +744,16 @@ export async function dispatch(task = {}, opts = {}) {
|
|
|
739
744
|
|
|
740
745
|
const cleanTask = { ...task, prompt: envelopedPrompt };
|
|
741
746
|
|
|
747
|
+
const runDispatch = () => provider.dispatch(cleanTask, { root, dryRun: opts.dryRun });
|
|
748
|
+
|
|
742
749
|
try {
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
750
|
+
// A dry run performs no provider call and produces no work, so it must not
|
|
751
|
+
// consume one of the operator's finite daily task slots. Reserving here also
|
|
752
|
+
// made every `npm test` burn real budget, which eventually exhausted the
|
|
753
|
+
// ledger and turned the suite red for reasons unrelated to any code change.
|
|
754
|
+
const session = opts.dryRun
|
|
755
|
+
? await runDispatch()
|
|
756
|
+
: await withBudget(runDispatch, root, config.limits.dailyTasks);
|
|
748
757
|
return classification ? { ...session, _routeTier: classification.tier, _routeReason: classification.reason } : session;
|
|
749
758
|
} catch (err) {
|
|
750
759
|
if (err instanceof ProviderRateLimitError || err instanceof ProviderUnavailableError) {
|