@hegemonart/get-design-done 1.26.0 → 1.27.1
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +74 -0
- package/README.md +10 -8
- package/SKILL.md +3 -0
- package/agents/README.md +29 -0
- package/package.json +2 -2
- package/reference/peer-cli-capabilities.md +151 -0
- package/reference/peer-protocols.md +266 -0
- package/reference/registry.json +14 -0
- package/reference/runtime-models.md +3 -3
- package/scripts/install.cjs +100 -1
- package/scripts/lib/bandit-router.cjs +214 -7
- package/scripts/lib/budget-enforcer.cjs +69 -1
- package/scripts/lib/event-stream/index.ts +14 -1
- package/scripts/lib/event-stream/types.ts +125 -1
- package/scripts/lib/install/runtimes.cjs +58 -0
- package/scripts/lib/peer-cli/acp-client.cjs +375 -0
- package/scripts/lib/peer-cli/adapters/codex.cjs +101 -0
- package/scripts/lib/peer-cli/adapters/copilot.cjs +79 -0
- package/scripts/lib/peer-cli/adapters/cursor.cjs +78 -0
- package/scripts/lib/peer-cli/adapters/gemini.cjs +81 -0
- package/scripts/lib/peer-cli/adapters/qwen.cjs +72 -0
- package/scripts/lib/peer-cli/asp-client.cjs +587 -0
- package/scripts/lib/peer-cli/broker-lifecycle.cjs +406 -0
- package/scripts/lib/peer-cli/registry.cjs +434 -0
- package/scripts/lib/peer-cli/spawn-cmd.cjs +149 -0
- package/scripts/lib/runtime-detect.cjs +1 -1
- package/scripts/lib/session-runner/index.ts +362 -0
- package/scripts/lib/session-runner/types.ts +60 -0
- package/scripts/validate-frontmatter.ts +159 -1
- package/skills/peer-cli-add/SKILL.md +170 -0
- package/skills/peer-cli-customize/SKILL.md +110 -0
- package/skills/peers/SKILL.md +101 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// scripts/lib/peer-cli/adapters/gemini.cjs
|
|
2
|
+
//
|
|
3
|
+
// Plan 27-04 — Per-peer adapter for the Gemini CLI.
|
|
4
|
+
//
|
|
5
|
+
// Gemini speaks ACP (line-delimited JSON-RPC over stdio); see
|
|
6
|
+
// scripts/lib/peer-cli/acp-client.cjs.
|
|
7
|
+
//
|
|
8
|
+
// Capability matrix (CONTEXT.md D-05):
|
|
9
|
+
// * Gemini claims the `research` and `exploration` roles.
|
|
10
|
+
//
|
|
11
|
+
// Gemini's CLI does not expose first-class slash commands like
|
|
12
|
+
// `/research`; instead it adjusts behavior based on phrasing in the
|
|
13
|
+
// prompt. We surface that as a prose prefix per role — "deep research
|
|
14
|
+
// mode" + "exploratory mode" — so Gemini's planner picks the right
|
|
15
|
+
// posture without us reaching into Gemini-specific configuration.
|
|
16
|
+
|
|
17
|
+
'use strict';
|
|
18
|
+
|
|
19
|
+
const { createAcpClient } = require('../acp-client.cjs');
|
|
20
|
+
|
|
21
|
+
/** Roles this peer claims. */
|
|
22
|
+
const ROLES_CLAIMED = Object.freeze(['research', 'exploration']);
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Per-role prompt prefix. Prose-style prefixes (no slash) — Gemini
|
|
26
|
+
* doesn't ship `/research` or `/exploration` slash commands as of the
|
|
27
|
+
* `2025-06-18` ACP version we negotiate with.
|
|
28
|
+
*/
|
|
29
|
+
const ROLE_PREFIX = Object.freeze({
|
|
30
|
+
research: 'Deep research mode. Investigate the following thoroughly: ',
|
|
31
|
+
exploration: 'Exploratory mode. Survey options and trade-offs for: ',
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
function claims(role) {
|
|
35
|
+
return ROLES_CLAIMED.includes(role);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Drive one Gemini ACP `prompt` for the supplied role + text.
|
|
40
|
+
*
|
|
41
|
+
* @param {{command: string, args?: string[], cwd?: string, env?: object}} peer
|
|
42
|
+
* @param {string} role Must satisfy `claims(role)`.
|
|
43
|
+
* @param {string} text
|
|
44
|
+
* @param {{onNotification?: (n: object) => void}} [opts]
|
|
45
|
+
* @returns {Promise<object>} The ACP `prompt` result payload, returned
|
|
46
|
+
* unchanged from acp-client.
|
|
47
|
+
*/
|
|
48
|
+
async function dispatch(peer, role, text, opts) {
|
|
49
|
+
if (!claims(role)) {
|
|
50
|
+
throw new Error(`gemini adapter does not claim role: ${role}`);
|
|
51
|
+
}
|
|
52
|
+
if (typeof text !== 'string') {
|
|
53
|
+
throw new TypeError('gemini adapter: text must be a string');
|
|
54
|
+
}
|
|
55
|
+
const onNotification = opts && typeof opts.onNotification === 'function'
|
|
56
|
+
? opts.onNotification
|
|
57
|
+
: undefined;
|
|
58
|
+
|
|
59
|
+
const client = createAcpClient({
|
|
60
|
+
command: peer.command,
|
|
61
|
+
args: peer.args,
|
|
62
|
+
cwd: peer.cwd,
|
|
63
|
+
env: peer.env,
|
|
64
|
+
});
|
|
65
|
+
try {
|
|
66
|
+
await client.initialize({ protocolVersion: '2025-06-18' });
|
|
67
|
+
const prompt = ROLE_PREFIX[role] + text;
|
|
68
|
+
return await client.prompt(prompt, { onNotification });
|
|
69
|
+
} finally {
|
|
70
|
+
await client.close();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
module.exports = {
|
|
75
|
+
name: 'gemini',
|
|
76
|
+
protocol: 'acp',
|
|
77
|
+
ROLES_CLAIMED,
|
|
78
|
+
ROLE_PREFIX,
|
|
79
|
+
claims,
|
|
80
|
+
dispatch,
|
|
81
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// scripts/lib/peer-cli/adapters/qwen.cjs
|
|
2
|
+
//
|
|
3
|
+
// Plan 27-04 — Per-peer adapter for the Qwen CLI.
|
|
4
|
+
//
|
|
5
|
+
// Qwen speaks ACP (line-delimited JSON-RPC over stdio); see
|
|
6
|
+
// scripts/lib/peer-cli/acp-client.cjs.
|
|
7
|
+
//
|
|
8
|
+
// Capability matrix (CONTEXT.md D-05):
|
|
9
|
+
// * Qwen claims the `write` role only.
|
|
10
|
+
//
|
|
11
|
+
// Qwen recognizes `/write` as a slash command for prose-generation
|
|
12
|
+
// flows; we use it as the role prefix.
|
|
13
|
+
|
|
14
|
+
'use strict';
|
|
15
|
+
|
|
16
|
+
const { createAcpClient } = require('../acp-client.cjs');
|
|
17
|
+
|
|
18
|
+
/** Roles this peer claims. */
|
|
19
|
+
const ROLES_CLAIMED = Object.freeze(['write']);
|
|
20
|
+
|
|
21
|
+
/** Per-role slash-command prefix. */
|
|
22
|
+
const ROLE_PREFIX = Object.freeze({
|
|
23
|
+
write: '/write ',
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
function claims(role) {
|
|
27
|
+
return ROLES_CLAIMED.includes(role);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Drive one Qwen ACP `prompt` for the supplied role + text.
|
|
32
|
+
*
|
|
33
|
+
* @param {{command: string, args?: string[], cwd?: string, env?: object}} peer
|
|
34
|
+
* @param {string} role
|
|
35
|
+
* @param {string} text
|
|
36
|
+
* @param {{onNotification?: (n: object) => void}} [opts]
|
|
37
|
+
* @returns {Promise<object>}
|
|
38
|
+
*/
|
|
39
|
+
async function dispatch(peer, role, text, opts) {
|
|
40
|
+
if (!claims(role)) {
|
|
41
|
+
throw new Error(`qwen adapter does not claim role: ${role}`);
|
|
42
|
+
}
|
|
43
|
+
if (typeof text !== 'string') {
|
|
44
|
+
throw new TypeError('qwen adapter: text must be a string');
|
|
45
|
+
}
|
|
46
|
+
const onNotification = opts && typeof opts.onNotification === 'function'
|
|
47
|
+
? opts.onNotification
|
|
48
|
+
: undefined;
|
|
49
|
+
|
|
50
|
+
const client = createAcpClient({
|
|
51
|
+
command: peer.command,
|
|
52
|
+
args: peer.args,
|
|
53
|
+
cwd: peer.cwd,
|
|
54
|
+
env: peer.env,
|
|
55
|
+
});
|
|
56
|
+
try {
|
|
57
|
+
await client.initialize({ protocolVersion: '2025-06-18' });
|
|
58
|
+
const prompt = ROLE_PREFIX[role] + text;
|
|
59
|
+
return await client.prompt(prompt, { onNotification });
|
|
60
|
+
} finally {
|
|
61
|
+
await client.close();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
module.exports = {
|
|
66
|
+
name: 'qwen',
|
|
67
|
+
protocol: 'acp',
|
|
68
|
+
ROLES_CLAIMED,
|
|
69
|
+
ROLE_PREFIX,
|
|
70
|
+
claims,
|
|
71
|
+
dispatch,
|
|
72
|
+
};
|