@yemi33/minions 0.1.2261 → 0.1.2263
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/engine/cli.js +0 -22
- package/engine/create-pr-worktree.js +1 -1
- package/engine/shared.js +1 -101
- package/package.json +1 -1
package/engine/cli.js
CHANGED
|
@@ -609,28 +609,6 @@ const commands = {
|
|
|
609
609
|
try { shared.applyLegacyCcModelMigration(config, { logger: e.log }); }
|
|
610
610
|
catch (err) { e.log('warn', `legacy ccModel migration failed: ${err.message}`); }
|
|
611
611
|
|
|
612
|
-
// One-time force-on of the CC worker pool. The pool has been the resolved
|
|
613
|
-
// default for copilot CC since PR #2492, but configs still carrying an
|
|
614
|
-
// explicit `ccUseWorkerPool: false` (set before the default flipped) stay
|
|
615
|
-
// opted out forever. Flip those to ON once, persisting the
|
|
616
|
-
// `engine._ccPoolForcedOnV1` marker so a deliberate later opt-out sticks.
|
|
617
|
-
// Disk-side re-derives from the on-disk copy so a concurrent dashboard
|
|
618
|
-
// write isn't clobbered; skipWriteIfUnchanged makes it a no-op once marked.
|
|
619
|
-
try {
|
|
620
|
-
const forced = shared.applyCcWorkerPoolForceOnMigration(config);
|
|
621
|
-
if (forced.changed) {
|
|
622
|
-
const configPath = path.join(shared.MINIONS_DIR, 'config.json');
|
|
623
|
-
shared.mutateJsonFileLocked(configPath, (onDisk) => {
|
|
624
|
-
shared.applyCcWorkerPoolForceOnMigration(onDisk);
|
|
625
|
-
return onDisk;
|
|
626
|
-
}, { defaultValue: {}, skipWriteIfUnchanged: true });
|
|
627
|
-
if (forced.flipped.length) {
|
|
628
|
-
e.log('info', `Forced CC worker pool ON — flipped explicit opt-out in: ${forced.flipped.join(', ')}`);
|
|
629
|
-
console.log(` Forced CC worker pool ON (was explicitly off in: ${forced.flipped.join(', ')}).`);
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
} catch (err) { e.log('warn', `cc worker pool force-on migration failed: ${err.message}`); }
|
|
633
|
-
|
|
634
612
|
// Repair work-item note links that broke before the rewriter covered
|
|
635
613
|
// completion-report artifact links (W-mq1j85cj00055a8f). Notes the engine
|
|
636
614
|
// auto-archived back then left the WI pill pointing at the gone
|
|
@@ -121,7 +121,7 @@ async function prepareCreatePrWorktree({
|
|
|
121
121
|
try {
|
|
122
122
|
await git(['-C', localPath, 'checkout', '--', '.']);
|
|
123
123
|
for (const rel of untracked) {
|
|
124
|
-
try { fsm.rmSync(path.join(localPath, rel.replace(/\/$/, '')), { recursive: true, force: true }); } catch {
|
|
124
|
+
try { fsm.rmSync(path.join(localPath, rel.replace(/\/$/, '')), { recursive: true, force: true }); } catch (rmErr) { log('warn', `[cc-create-pr] could not remove untracked ${rel} from live checkout (will remain dirty): ${rmErr.message}`); }
|
|
125
125
|
}
|
|
126
126
|
} catch (e) {
|
|
127
127
|
try { await git(['-C', localPath, 'worktree', 'remove', '--force', wtPath]); } catch { /* leak rather than double-throw */ }
|
package/engine/shared.js
CHANGED
|
@@ -3523,51 +3523,6 @@ function _resetLegacyCcModelMigrationFlag() {
|
|
|
3523
3523
|
_legacyCcModelMigrationLogged = false;
|
|
3524
3524
|
}
|
|
3525
3525
|
|
|
3526
|
-
/**
|
|
3527
|
-
* One-time force-on for the CC worker pool.
|
|
3528
|
-
*
|
|
3529
|
-
* The pool has been the resolved default for copilot CC since PR #2492
|
|
3530
|
-
* (`resolveCcUseWorkerPool` returns true when the config has no explicit
|
|
3531
|
-
* value). But configs that carried an explicit `ccUseWorkerPool: false` —
|
|
3532
|
-
* set before the default flipped, or copied from an old template — stay
|
|
3533
|
-
* opted out forever. This migration flips those explicit-false opt-outs to
|
|
3534
|
-
* `true` ONCE, on both surfaces the value lives in (`engine.ccUseWorkerPool`
|
|
3535
|
-
* which the resolver reads, and `features.ccUseWorkerPool` which drives the
|
|
3536
|
-
* Settings toggle / `isFeatureOn`), so the two stay consistent.
|
|
3537
|
-
*
|
|
3538
|
-
* Idempotency: records `engine._ccPoolForcedOnV1` after running. Once that
|
|
3539
|
-
* marker is set the migration never touches the value again — so an operator
|
|
3540
|
-
* who *deliberately* turns the pool off afterward is never re-forced. The
|
|
3541
|
-
* marker is persisted even when nothing needed flipping, which is what lets a
|
|
3542
|
-
* later opt-out be distinguished from a never-migrated config.
|
|
3543
|
-
*
|
|
3544
|
-
* Pure + idempotent: safe to call in-memory then re-apply to the on-disk copy
|
|
3545
|
-
* under a lock (mirrors backfillProjectWorkSourceDefaults). Returns
|
|
3546
|
-
* `{ changed, flipped }` — `changed` true means the config was mutated (marker
|
|
3547
|
-
* set and/or values flipped) and should be persisted; `flipped` lists which
|
|
3548
|
-
* surfaces ('engine'/'features') were actually turned on.
|
|
3549
|
-
*/
|
|
3550
|
-
function applyCcWorkerPoolForceOnMigration(config) {
|
|
3551
|
-
const result = { changed: false, flipped: [] };
|
|
3552
|
-
if (!config || typeof config !== 'object') return result;
|
|
3553
|
-
const engine = (config.engine && typeof config.engine === 'object') ? config.engine : null;
|
|
3554
|
-
if (!engine) return result; // no engine section — retry next start, harmless
|
|
3555
|
-
if (engine._ccPoolForcedOnV1) return result; // already forced once; respect later opt-out
|
|
3556
|
-
|
|
3557
|
-
if (engine.ccUseWorkerPool === false) {
|
|
3558
|
-
engine.ccUseWorkerPool = true;
|
|
3559
|
-
result.flipped.push('engine');
|
|
3560
|
-
}
|
|
3561
|
-
const features = (config.features && typeof config.features === 'object') ? config.features : null;
|
|
3562
|
-
if (features && features.ccUseWorkerPool === false) {
|
|
3563
|
-
features.ccUseWorkerPool = true;
|
|
3564
|
-
result.flipped.push('features');
|
|
3565
|
-
}
|
|
3566
|
-
engine._ccPoolForcedOnV1 = true; // marker — never force again
|
|
3567
|
-
result.changed = true; // marker always needs persisting on first run
|
|
3568
|
-
return result;
|
|
3569
|
-
}
|
|
3570
|
-
|
|
3571
3526
|
// ─── Runtime Config Preflight Warnings ──────────────────────────────────────
|
|
3572
3527
|
//
|
|
3573
3528
|
// Emit non-fatal warnings about runtime/CLI configuration drift. Consumed by
|
|
@@ -4362,13 +4317,6 @@ const FAILURE_CLASS = {
|
|
|
4362
4317
|
VERIFY_MISSING_PR: 'verify-missing-pr', // W-mqsk1ip00006cbae: a verify WI exited done but no PR was attached (neither _prUrl/_pr on the item nor a matching pull-requests.json entry for the plan). Flipped to failed so the plan doesn't silently advance without an E2E PR. Retryable — agent may have phantom-crashed before pushing the branch.
|
|
4363
4318
|
UNKNOWN: 'unknown', // Unclassified failure
|
|
4364
4319
|
};
|
|
4365
|
-
const ESCALATION_POLICY = {
|
|
4366
|
-
NO_RETRY: 'no-retry', // CONFIG_ERROR, PERMISSION_BLOCKED — never retry
|
|
4367
|
-
RETRY_SAME: 'retry-same', // MERGE_CONFLICT, BUILD_FAILURE, MAX_TURNS — retry same agent
|
|
4368
|
-
RETRY_FRESH: 'retry-fresh', // TIMEOUT, SPAWN_ERROR — retry with fresh session
|
|
4369
|
-
HUMAN_REVIEW: 'human-review', // EMPTY_OUTPUT, OUT_OF_CONTEXT — flag for human
|
|
4370
|
-
AUTO: 'auto', // UNKNOWN, NETWORK_ERROR — use default retry logic
|
|
4371
|
-
};
|
|
4372
4320
|
|
|
4373
4321
|
// Structured completion protocol — fields agents must produce in ```completion blocks
|
|
4374
4322
|
const COMPLETION_FIELDS = ['status', 'summary', 'files_changed', 'tests', 'pr', 'not_changed', 'failure_class', 'retryable', 'needs_rerun', 'verdict', 'artifacts', 'nonce', 'securityFlags'];
|
|
@@ -4724,51 +4672,6 @@ function agentCanUseRepo(agent, repoTarget) {
|
|
|
4724
4672
|
return false;
|
|
4725
4673
|
}
|
|
4726
4674
|
|
|
4727
|
-
/**
|
|
4728
|
-
* Check whether `agent` may invoke `toolName`. Case-sensitive comparison —
|
|
4729
|
-
* tool names are canonical (e.g. `Edit`, `Read`, `Bash`).
|
|
4730
|
-
*
|
|
4731
|
-
* Null/missing `allowed_tools` → permissive.
|
|
4732
|
-
* Empty array → denies everything.
|
|
4733
|
-
*/
|
|
4734
|
-
function agentCanUseTool(agent, toolName) {
|
|
4735
|
-
const manifest = resolveAgentManifest(agent);
|
|
4736
|
-
if (manifest.allowed_tools == null) return true;
|
|
4737
|
-
if (typeof toolName !== 'string' || toolName.length === 0) return false;
|
|
4738
|
-
return manifest.allowed_tools.includes(toolName);
|
|
4739
|
-
}
|
|
4740
|
-
|
|
4741
|
-
/**
|
|
4742
|
-
* Check whether `agent` may fetch `urlString`. Wildcard entries of the form
|
|
4743
|
-
* `*.example.com` match any subdomain AND the apex (`example.com`). Bare
|
|
4744
|
-
* `example.com` matches only the exact host.
|
|
4745
|
-
*
|
|
4746
|
-
* Null/missing `allowed_external_urls` → permissive.
|
|
4747
|
-
* Empty array → denies everything.
|
|
4748
|
-
* Malformed URL → denied (cannot extract host to compare).
|
|
4749
|
-
*/
|
|
4750
|
-
function agentCanFetchUrl(agent, urlString) {
|
|
4751
|
-
const manifest = resolveAgentManifest(agent);
|
|
4752
|
-
if (manifest.allowed_external_urls == null) return true;
|
|
4753
|
-
let host = '';
|
|
4754
|
-
try {
|
|
4755
|
-
host = new URL(String(urlString)).hostname.toLowerCase();
|
|
4756
|
-
} catch { return false; }
|
|
4757
|
-
if (!host) return false;
|
|
4758
|
-
if (manifest.allowed_external_urls.length === 0) return false;
|
|
4759
|
-
for (const raw of manifest.allowed_external_urls) {
|
|
4760
|
-
const entry = String(raw).trim().toLowerCase();
|
|
4761
|
-
if (!entry) continue;
|
|
4762
|
-
if (entry.startsWith('*.')) {
|
|
4763
|
-
const suffix = entry.slice(2);
|
|
4764
|
-
if (host === suffix || host.endsWith('.' + suffix)) return true;
|
|
4765
|
-
} else if (host === entry) {
|
|
4766
|
-
return true;
|
|
4767
|
-
}
|
|
4768
|
-
}
|
|
4769
|
-
return false;
|
|
4770
|
-
}
|
|
4771
|
-
|
|
4772
4675
|
/** Return the agent's effective memory scope. Unknown values fall back to 'shared'. */
|
|
4773
4676
|
function agentMemoryScope(agent) {
|
|
4774
4677
|
const manifest = resolveAgentManifest(agent);
|
|
@@ -8854,7 +8757,6 @@ module.exports = {
|
|
|
8854
8757
|
resolveCopilotAgentDisabledMcpServers,
|
|
8855
8758
|
resolveAgentHermeticHarness,
|
|
8856
8759
|
applyLegacyCcModelMigration, _resetLegacyCcModelMigrationFlag,
|
|
8857
|
-
applyCcWorkerPoolForceOnMigration,
|
|
8858
8760
|
runtimeConfigWarnings,
|
|
8859
8761
|
projectWorkSourceWarnings,
|
|
8860
8762
|
backfillProjectWorkSourceDefaults,
|
|
@@ -8862,7 +8764,7 @@ module.exports = {
|
|
|
8862
8764
|
WATCH_STATUS, WATCH_TARGET_TYPE, WATCH_CONDITION, WATCH_ABSOLUTE_CONDITIONS, WATCH_ACTION_TYPE,
|
|
8863
8765
|
WATCH_STALLED_DEFAULT_TICKS, WATCH_STUCK_STAGE_DEFAULT_TICKS,
|
|
8864
8766
|
PIPELINE_STATUS, STAGE_TYPE, MEETING_STATUS, AGENT_STATUS,
|
|
8865
|
-
FAILURE_CLASS,
|
|
8767
|
+
FAILURE_CLASS, COMPLETION_FIELDS,
|
|
8866
8768
|
HARNESS_USED_KINDS, HARNESS_USED_MAX_ENTRIES, HARNESS_USED_MAX_FIELD_LEN, normalizeHarnessUsed, groundHarnessUsed,
|
|
8867
8769
|
DEFAULT_AGENT_METRICS,
|
|
8868
8770
|
DEFAULT_AGENTS,
|
|
@@ -8874,8 +8776,6 @@ module.exports = {
|
|
|
8874
8776
|
validateWorkspaceManifest,
|
|
8875
8777
|
resolveAgentManifest,
|
|
8876
8778
|
agentCanUseRepo,
|
|
8877
|
-
agentCanUseTool,
|
|
8878
|
-
agentCanFetchUrl,
|
|
8879
8779
|
agentMemoryScope,
|
|
8880
8780
|
mergeManifestAllowedTools,
|
|
8881
8781
|
formatManifestRejection,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2263",
|
|
4
4
|
"description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minions": "bin/minions.js"
|