@yemi33/minions 0.1.1683 → 0.1.1684
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 +5 -0
- package/engine/cooldown.js +1 -0
- package/engine/copilot-models.json +1 -1
- package/engine/playbook.js +3 -2
- package/engine/runtimes/claude.js +28 -23
- package/engine/runtimes/copilot.js +36 -35
- package/engine/spawn-agent.js +7 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/engine/cooldown.js
CHANGED
package/engine/playbook.js
CHANGED
|
@@ -395,7 +395,7 @@ function renderPlaybook(type, vars) {
|
|
|
395
395
|
content += '````\n```skill\n';
|
|
396
396
|
content += `---\nname: short-descriptive-name\ndescription: One-line description of what this skill does\nallowed-tools: Bash, Read, Edit\ntrigger: when should an agent use this\nscope: minions\nproject: any\n---\n\n# Skill Title\n\n## Steps\n1. ...\n2. ...\n\n## Notes\n...\n`;
|
|
397
397
|
content += '```\n````\n\n';
|
|
398
|
-
content += `- Set \`scope: minions\` for cross-project or Minions-wide skills; the engine writes them to the selected runtime's native personal skills directory\n`;
|
|
398
|
+
content += `- Set \`scope: minions\` for cross-project or Minions-wide skills; the engine writes them to the selected runtime's native personal skills directory so they are available in normal runtime windows too\n`;
|
|
399
399
|
content += `- Set \`scope: project\` + \`project: <name>\` only for repo-specific skills; the engine queues a PR to the selected runtime's native project skills directory\n`;
|
|
400
400
|
content += `- Emit at most one skill block per task unless you uncovered two clearly distinct reusable workflows\n`;
|
|
401
401
|
content += `- Do NOT create a skill for one-off bug fixes, isolated command output, obvious repo facts, or anything already covered by existing docs/playbooks/skills\n`;
|
|
@@ -546,7 +546,8 @@ function buildAgentContext(agentId, config, project) {
|
|
|
546
546
|
context += `## Your Recent History (last 5 tasks)\n\n${trimmed}\n\n`;
|
|
547
547
|
}
|
|
548
548
|
|
|
549
|
-
// Project conventions
|
|
549
|
+
// Project conventions and instruction files — explicit, inert context for
|
|
550
|
+
// every runtime. Runtime-native skills/commands stay in their native indexes.
|
|
550
551
|
if (project.localPath) {
|
|
551
552
|
appendContextFile('Project Conventions (from CLAUDE.md)', path.join(project.localPath, 'CLAUDE.md'), 8192);
|
|
552
553
|
appendContextFile('Project Agent Instructions (from AGENTS.md)', path.join(project.localPath, 'AGENTS.md'), 8192,
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
* - spawnScript: absolute path of the spawn wrapper (or null if direct-only)
|
|
17
17
|
* - buildArgs(opts) → string[] — CLI args excluding the binary
|
|
18
18
|
* - buildPrompt(promptText, sysPromptText) → string — final prompt delivered
|
|
19
|
+
* - getUserAssetDirs(opts) → string[] — runtime-native global asset roots
|
|
20
|
+
* - getSkillRoots(opts) → {scope,dir,projectName?}[] — skill discovery roots
|
|
21
|
+
* - getSkillWriteTargets(opts) → {personal,project} — extraction targets
|
|
19
22
|
* - resolveModel(input) → string|undefined — shorthand expansion / passthrough
|
|
20
23
|
* - parseOutput(raw) → { text, usage, sessionId, model }
|
|
21
24
|
* - parseStreamChunk(line) → parsed event object or null
|
|
@@ -247,6 +250,31 @@ function buildSpawnFlags(opts = {}) {
|
|
|
247
250
|
return flags;
|
|
248
251
|
}
|
|
249
252
|
|
|
253
|
+
function getUserAssetDirs({ homeDir = os.homedir() } = {}) {
|
|
254
|
+
return [path.join(homeDir, '.claude')];
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
function getSkillRoots({ homeDir = os.homedir(), project = null } = {}) {
|
|
258
|
+
const roots = [
|
|
259
|
+
{ scope: 'claude-code', dir: path.join(homeDir, '.claude', 'skills') },
|
|
260
|
+
];
|
|
261
|
+
if (project?.localPath) {
|
|
262
|
+
roots.push({
|
|
263
|
+
scope: 'project',
|
|
264
|
+
projectName: project.name,
|
|
265
|
+
dir: path.join(project.localPath, '.claude', 'skills'),
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
return roots;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
function getSkillWriteTargets({ homeDir = os.homedir(), project = null } = {}) {
|
|
272
|
+
return {
|
|
273
|
+
personal: path.join(homeDir, '.claude', 'skills'),
|
|
274
|
+
project: project?.localPath ? path.join(project.localPath, '.claude', 'skills') : null,
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
|
|
250
278
|
function getResumeSessionId({ agentId, branchName, agentsDir, maxAgeMs = 2 * 60 * 60 * 1000, logger = console } = {}) {
|
|
251
279
|
if (!agentId || agentId.startsWith('temp-') || !agentsDir) return null;
|
|
252
280
|
try {
|
|
@@ -322,29 +350,6 @@ function buildPrompt(promptText, /* sysPromptText */ _sys) {
|
|
|
322
350
|
return String(promptText == null ? '' : promptText);
|
|
323
351
|
}
|
|
324
352
|
|
|
325
|
-
function getUserAssetDirs({ homeDir = os.homedir() } = {}) {
|
|
326
|
-
return [path.join(homeDir, '.claude')];
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
function getSkillRoots({ homeDir = os.homedir(), project = null } = {}) {
|
|
330
|
-
const roots = [{ dir: path.join(homeDir, '.claude', 'skills'), scope: 'claude-code' }];
|
|
331
|
-
if (project?.localPath) {
|
|
332
|
-
roots.push({
|
|
333
|
-
dir: path.resolve(project.localPath, '.claude', 'skills'),
|
|
334
|
-
scope: 'project',
|
|
335
|
-
projectName: project.name,
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
return roots;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
function getSkillWriteTargets({ homeDir = os.homedir(), project = null } = {}) {
|
|
342
|
-
return {
|
|
343
|
-
personal: path.join(homeDir, '.claude', 'skills'),
|
|
344
|
-
project: project?.localPath ? path.resolve(project.localPath, '.claude', 'skills') : null,
|
|
345
|
-
};
|
|
346
|
-
}
|
|
347
|
-
|
|
348
353
|
// ── Output Parsing ───────────────────────────────────────────────────────────
|
|
349
354
|
|
|
350
355
|
/**
|
|
@@ -270,6 +270,42 @@ function buildSpawnFlags(opts = {}) {
|
|
|
270
270
|
return flags;
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
+
function getUserAssetDirs({ homeDir = os.homedir() } = {}) {
|
|
274
|
+
return [
|
|
275
|
+
path.join(homeDir, '.copilot'),
|
|
276
|
+
path.join(homeDir, '.agents'),
|
|
277
|
+
];
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
function getSkillRoots({ homeDir = os.homedir(), project = null } = {}) {
|
|
281
|
+
const roots = [
|
|
282
|
+
{ scope: 'copilot', dir: path.join(homeDir, '.copilot', 'skills') },
|
|
283
|
+
{ scope: 'agent-skill', dir: path.join(homeDir, '.agents', 'skills') },
|
|
284
|
+
];
|
|
285
|
+
if (project?.localPath) {
|
|
286
|
+
roots.push(
|
|
287
|
+
{
|
|
288
|
+
scope: 'project',
|
|
289
|
+
projectName: project.name,
|
|
290
|
+
dir: path.join(project.localPath, '.github', 'skills'),
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
scope: 'project',
|
|
294
|
+
projectName: project.name,
|
|
295
|
+
dir: path.join(project.localPath, '.agents', 'skills'),
|
|
296
|
+
},
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
return roots;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
function getSkillWriteTargets({ homeDir = os.homedir(), project = null } = {}) {
|
|
303
|
+
return {
|
|
304
|
+
personal: path.join(homeDir, '.copilot', 'skills'),
|
|
305
|
+
project: project?.localPath ? path.join(project.localPath, '.github', 'skills') : null,
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
|
|
273
309
|
function getResumeSessionId({ agentId, branchName, agentsDir, maxAgeMs = 2 * 60 * 60 * 1000, logger = console } = {}) {
|
|
274
310
|
if (!agentId || agentId.startsWith('temp-') || !agentsDir) return null;
|
|
275
311
|
try {
|
|
@@ -349,41 +385,6 @@ function buildPrompt(promptText, sysPromptText, opts = {}) {
|
|
|
349
385
|
return `<system>\n${String(sysPromptText)}\n</system>\n\n${user}`;
|
|
350
386
|
}
|
|
351
387
|
|
|
352
|
-
function getUserAssetDirs({ homeDir = os.homedir() } = {}) {
|
|
353
|
-
return [
|
|
354
|
-
path.join(homeDir, '.copilot'),
|
|
355
|
-
path.join(homeDir, '.agents'),
|
|
356
|
-
];
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
function getSkillRoots({ homeDir = os.homedir(), project = null } = {}) {
|
|
360
|
-
const roots = [
|
|
361
|
-
{ dir: path.join(homeDir, '.copilot', 'skills'), scope: 'copilot' },
|
|
362
|
-
{ dir: path.join(homeDir, '.agents', 'skills'), scope: 'agent-skill' },
|
|
363
|
-
];
|
|
364
|
-
if (project?.localPath) {
|
|
365
|
-
for (const rel of [
|
|
366
|
-
['.github', 'skills'],
|
|
367
|
-
['.claude', 'skills'],
|
|
368
|
-
['.agents', 'skills'],
|
|
369
|
-
]) {
|
|
370
|
-
roots.push({
|
|
371
|
-
dir: path.resolve(project.localPath, ...rel),
|
|
372
|
-
scope: 'project',
|
|
373
|
-
projectName: project.name,
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
return roots;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
function getSkillWriteTargets({ homeDir = os.homedir(), project = null } = {}) {
|
|
381
|
-
return {
|
|
382
|
-
personal: path.join(homeDir, '.copilot', 'skills'),
|
|
383
|
-
project: project?.localPath ? path.resolve(project.localPath, '.github', 'skills') : null,
|
|
384
|
-
};
|
|
385
|
-
}
|
|
386
|
-
|
|
387
388
|
// ── Output Parsing ──────────────────────────────────────────────────────────
|
|
388
389
|
//
|
|
389
390
|
// Whitelist of event types observed during the spike (docs/copilot-cli-schema.md
|
package/engine/spawn-agent.js
CHANGED
|
@@ -174,17 +174,17 @@ function main() {
|
|
|
174
174
|
opts.sysPromptFile = sysTmpPath;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
//
|
|
178
|
-
// worktree, so
|
|
179
|
-
//
|
|
177
|
+
// Skill discovery dirs — agents run with CWD set to an external repo
|
|
178
|
+
// worktree, so runtime-native global assets would otherwise be invisible.
|
|
179
|
+
// The adapter owns both where those assets live and how to surface them.
|
|
180
180
|
const minionsDir = path.resolve(__dirname, '..');
|
|
181
|
+
const addDirs = [minionsDir];
|
|
181
182
|
const runtimeAssetDirs = typeof runtime.getUserAssetDirs === 'function'
|
|
182
183
|
? runtime.getUserAssetDirs({ homeDir: os.homedir() })
|
|
183
184
|
: [];
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
addDirs.push(userAssetDir);
|
|
185
|
+
for (const dir of runtimeAssetDirs) {
|
|
186
|
+
if (dir && fs.existsSync(dir) && path.resolve(dir) !== path.resolve(minionsDir)) {
|
|
187
|
+
addDirs.push(dir);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1684",
|
|
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"
|