agent-relay 9.1.4 → 9.1.5
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/dist/cli/bootstrap.d.ts.map +1 -1
- package/dist/cli/bootstrap.js +4 -0
- package/dist/cli/bootstrap.js.map +1 -1
- package/dist/cli/commands/integration.d.ts +24 -0
- package/dist/cli/commands/integration.d.ts.map +1 -1
- package/dist/cli/commands/integration.js +309 -4
- package/dist/cli/commands/integration.js.map +1 -1
- package/dist/cli/commands/reflex.d.ts +20 -0
- package/dist/cli/commands/reflex.d.ts.map +1 -0
- package/dist/cli/commands/reflex.js +192 -0
- package/dist/cli/commands/reflex.js.map +1 -0
- package/dist/cli/commands/skills.d.ts +22 -0
- package/dist/cli/commands/skills.d.ts.map +1 -0
- package/dist/cli/commands/skills.js +147 -0
- package/dist/cli/commands/skills.js.map +1 -0
- package/dist/cli/lib/skills-install.d.ts +97 -0
- package/dist/cli/lib/skills-install.d.ts.map +1 -0
- package/dist/cli/lib/skills-install.js +182 -0
- package/dist/cli/lib/skills-install.js.map +1 -0
- package/dist/cli/lib/skills-tui.d.ts +31 -0
- package/dist/cli/lib/skills-tui.d.ts.map +1 -0
- package/dist/cli/lib/skills-tui.js +165 -0
- package/dist/cli/lib/skills-tui.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core logic for `agent-relay skills add` — fetching a published skill and
|
|
3
|
+
* installing it into the right per-harness directory for either the current
|
|
4
|
+
* project or the user's global config.
|
|
5
|
+
*
|
|
6
|
+
* This module is deliberately free of any interactive/TTY concerns so it can
|
|
7
|
+
* be unit-tested in isolation. The TUI lives in `./skills-tui.ts` and the
|
|
8
|
+
* command wiring in `../commands/skills.ts`.
|
|
9
|
+
*/
|
|
10
|
+
import fs from 'node:fs';
|
|
11
|
+
import os from 'node:os';
|
|
12
|
+
import path from 'node:path';
|
|
13
|
+
/** The `/orchestrate` skill published at agentrelay.com. */
|
|
14
|
+
export const ORCHESTRATE_SKILL = {
|
|
15
|
+
/** Slug used for the installed file/directory name (the slash command). */
|
|
16
|
+
slug: 'orchestrate',
|
|
17
|
+
/** Canonical source of the skill markdown. */
|
|
18
|
+
url: 'https://agentrelay.com/skill.md',
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Parse a skill markdown document, extracting `name`/`description` from the
|
|
22
|
+
* leading `---` YAML frontmatter block (if any) and the body that follows.
|
|
23
|
+
* Tolerant by design: a document with no frontmatter yields `body === raw`.
|
|
24
|
+
*/
|
|
25
|
+
export function parseSkill(raw) {
|
|
26
|
+
const normalized = raw.replace(/^\uFEFF/, '');
|
|
27
|
+
const match = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?/.exec(normalized);
|
|
28
|
+
if (!match) {
|
|
29
|
+
return { raw, body: normalized.trim() };
|
|
30
|
+
}
|
|
31
|
+
const frontmatter = match[1];
|
|
32
|
+
const body = normalized.slice(match[0].length).trim();
|
|
33
|
+
const name = readScalar(frontmatter, 'name');
|
|
34
|
+
const description = readScalar(frontmatter, 'description');
|
|
35
|
+
return { raw, body, name, description };
|
|
36
|
+
}
|
|
37
|
+
function readScalar(frontmatter, key) {
|
|
38
|
+
const re = new RegExp(`^${key}\\s*:\\s*(.+)$`, 'm');
|
|
39
|
+
const m = re.exec(frontmatter);
|
|
40
|
+
if (!m)
|
|
41
|
+
return undefined;
|
|
42
|
+
return m[1].trim().replace(/^["']|["']$/g, '');
|
|
43
|
+
}
|
|
44
|
+
function tomlEscape(body) {
|
|
45
|
+
// Triple-quoted TOML strings only need `"""` and backslash escaped.
|
|
46
|
+
return body.replace(/\\/g, '\\\\').replace(/"""/g, '\\"\\"\\"');
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The set of harnesses `skills add` can target. Each maps the skill onto the
|
|
50
|
+
* harness's native custom-command / skill convention.
|
|
51
|
+
*/
|
|
52
|
+
export const HARNESS_TARGETS = [
|
|
53
|
+
{
|
|
54
|
+
id: 'claude',
|
|
55
|
+
label: 'Claude Code',
|
|
56
|
+
resolvePath: (scope, ctx) => path.join(scope === 'global' ? ctx.homeDir : ctx.projectRoot, '.claude', 'skills', ORCHESTRATE_SKILL.slug, 'SKILL.md'),
|
|
57
|
+
// Claude skills are directories with a SKILL.md carrying frontmatter.
|
|
58
|
+
render: (skill) => ensureTrailingNewline(skill.raw),
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: 'codex',
|
|
62
|
+
label: 'Codex CLI',
|
|
63
|
+
resolvePath: (scope, ctx) => path.join(scope === 'global' ? ctx.homeDir : ctx.projectRoot, '.agents', 'skills', ORCHESTRATE_SKILL.slug, 'SKILL.md'),
|
|
64
|
+
// Codex discovers skills as `.agents/skills/<name>/SKILL.md` directories
|
|
65
|
+
// (the portable SKILL.md standard), scanning from the cwd up to the repo
|
|
66
|
+
// root and from $HOME. The full skill — frontmatter included — is required.
|
|
67
|
+
render: (skill) => ensureTrailingNewline(skill.raw),
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: 'cursor',
|
|
71
|
+
label: 'Cursor',
|
|
72
|
+
resolvePath: (scope, ctx) => path.join(scope === 'global' ? ctx.homeDir : ctx.projectRoot, '.cursor', 'commands', `${ORCHESTRATE_SKILL.slug}.md`),
|
|
73
|
+
// Cursor commands accept frontmatter (it surfaces the description).
|
|
74
|
+
render: (skill) => ensureTrailingNewline(skill.raw),
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'gemini',
|
|
78
|
+
label: 'Gemini CLI',
|
|
79
|
+
resolvePath: (scope, ctx) => path.join(scope === 'global' ? ctx.homeDir : ctx.projectRoot, '.gemini', 'commands', `${ORCHESTRATE_SKILL.slug}.toml`),
|
|
80
|
+
// Gemini custom commands are TOML with a `prompt` field.
|
|
81
|
+
render: (skill) => {
|
|
82
|
+
const description = skill.description ?? `The /${ORCHESTRATE_SKILL.slug} skill`;
|
|
83
|
+
return (`description = ${JSON.stringify(description)}\n` + `prompt = """\n${tomlEscape(skill.body)}\n"""\n`);
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: 'opencode',
|
|
88
|
+
label: 'OpenCode',
|
|
89
|
+
resolvePath: (scope, ctx) => scope === 'global'
|
|
90
|
+
? path.join(ctx.homeDir, '.config', 'opencode', 'commands', `${ORCHESTRATE_SKILL.slug}.md`)
|
|
91
|
+
: path.join(ctx.projectRoot, '.opencode', 'commands', `${ORCHESTRATE_SKILL.slug}.md`),
|
|
92
|
+
// OpenCode commands are plain markdown prompts.
|
|
93
|
+
render: (skill) => ensureTrailingNewline(skill.body),
|
|
94
|
+
},
|
|
95
|
+
];
|
|
96
|
+
function ensureTrailingNewline(text) {
|
|
97
|
+
return text.endsWith('\n') ? text : `${text}\n`;
|
|
98
|
+
}
|
|
99
|
+
/** Look up a harness target by id. */
|
|
100
|
+
export function findHarnessTarget(id) {
|
|
101
|
+
return HARNESS_TARGETS.find((t) => t.id === id);
|
|
102
|
+
}
|
|
103
|
+
/** Default resolution context: real project root + home directory. */
|
|
104
|
+
export function defaultTargetContext(projectRoot) {
|
|
105
|
+
return { projectRoot, homeDir: os.homedir() };
|
|
106
|
+
}
|
|
107
|
+
/** Default writer: mkdir -p the parent and write the file. */
|
|
108
|
+
export const fsWriter = {
|
|
109
|
+
exists: (filePath) => fs.existsSync(filePath),
|
|
110
|
+
write: (filePath, content) => {
|
|
111
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
112
|
+
fs.writeFileSync(filePath, content, 'utf8');
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Install the skill into each requested harness for the given scope.
|
|
117
|
+
* Never throws for a single-harness failure — it is recorded in the result so
|
|
118
|
+
* the caller can report a partial success.
|
|
119
|
+
*/
|
|
120
|
+
export function installSkill(opts) {
|
|
121
|
+
const writer = opts.writer ?? fsWriter;
|
|
122
|
+
const slug = opts.slug ?? ORCHESTRATE_SKILL.slug;
|
|
123
|
+
return opts.harnesses.map((target) => {
|
|
124
|
+
const filePath = target.resolvePath(opts.scope, opts.ctx);
|
|
125
|
+
try {
|
|
126
|
+
const existed = writer.exists(filePath);
|
|
127
|
+
writer.write(filePath, target.render(opts.skill, slug));
|
|
128
|
+
return {
|
|
129
|
+
harnessId: target.id,
|
|
130
|
+
label: target.label,
|
|
131
|
+
path: filePath,
|
|
132
|
+
status: existed ? 'overwritten' : 'installed',
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
catch (err) {
|
|
136
|
+
return {
|
|
137
|
+
harnessId: target.id,
|
|
138
|
+
label: target.label,
|
|
139
|
+
path: filePath,
|
|
140
|
+
status: 'failed',
|
|
141
|
+
error: err instanceof Error ? err.message : String(err),
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
/** Default time budget for the skill download before it is aborted. */
|
|
147
|
+
export const FETCH_SKILL_TIMEOUT_MS = 15_000;
|
|
148
|
+
/**
|
|
149
|
+
* Fetch the published skill markdown over HTTPS. Bounded by an abort timeout so
|
|
150
|
+
* a stalled connection can't hang `skills add` (notably in CI). Throws a clear
|
|
151
|
+
* error on timeout or a non-2xx response so the command can surface it.
|
|
152
|
+
*/
|
|
153
|
+
export async function fetchSkill(url = ORCHESTRATE_SKILL.url, timeoutMs = FETCH_SKILL_TIMEOUT_MS) {
|
|
154
|
+
const controller = new AbortController();
|
|
155
|
+
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
156
|
+
let res;
|
|
157
|
+
try {
|
|
158
|
+
res = await fetch(url, {
|
|
159
|
+
headers: { accept: 'text/markdown, text/plain, */*' },
|
|
160
|
+
signal: controller.signal,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
catch (err) {
|
|
164
|
+
if (controller.signal.aborted) {
|
|
165
|
+
throw new Error(`Timed out downloading skill from ${url} after ${timeoutMs}ms`);
|
|
166
|
+
}
|
|
167
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
168
|
+
throw new Error(`Failed to reach ${url}: ${message}`);
|
|
169
|
+
}
|
|
170
|
+
finally {
|
|
171
|
+
clearTimeout(timer);
|
|
172
|
+
}
|
|
173
|
+
if (!res.ok) {
|
|
174
|
+
throw new Error(`Failed to download skill from ${url} (HTTP ${res.status})`);
|
|
175
|
+
}
|
|
176
|
+
const text = await res.text();
|
|
177
|
+
if (!text.trim()) {
|
|
178
|
+
throw new Error(`Skill at ${url} was empty`);
|
|
179
|
+
}
|
|
180
|
+
return text;
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=skills-install.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills-install.js","sourceRoot":"","sources":["../../../src/cli/lib/skills-install.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAK7B,4DAA4D;AAC5D,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,2EAA2E;IAC3E,IAAI,EAAE,aAAa;IACnB,8CAA8C;IAC9C,GAAG,EAAE,iCAAiC;CAC9B,CAAC;AAcX;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAG,mCAAmC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACnE,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC;IAC1C,CAAC;IAED,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC7B,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CA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AAC,CAAC;IACtB,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,iCAAiC,GAAG,UAAU,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;IAC/E,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;IAC9B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal terminal UI for `agent-relay skills add`.
|
|
3
|
+
*
|
|
4
|
+
* Two interactions:
|
|
5
|
+
* - {@link selectScope}: a single-choice picker (project vs global).
|
|
6
|
+
* - {@link selectHarnesses}: a multi-select checklist (which harnesses).
|
|
7
|
+
*
|
|
8
|
+
* Both are driven by raw keypress events so they work without any third-party
|
|
9
|
+
* prompt dependency. They require a TTY; callers must fall back to flags when
|
|
10
|
+
* `process.stdin.isTTY` is false (handled in the command layer).
|
|
11
|
+
*/
|
|
12
|
+
import type { HarnessTarget, SkillScope } from './skills-install.js';
|
|
13
|
+
interface TtyStreams {
|
|
14
|
+
input: NodeJS.ReadStream;
|
|
15
|
+
output: NodeJS.WriteStream;
|
|
16
|
+
}
|
|
17
|
+
export interface ScopeChoice {
|
|
18
|
+
value: SkillScope;
|
|
19
|
+
label: string;
|
|
20
|
+
hint: string;
|
|
21
|
+
}
|
|
22
|
+
/** Single-choice picker for the install scope. Returns null if aborted. */
|
|
23
|
+
export declare function selectScope(streams?: TtyStreams, choices?: ScopeChoice[]): Promise<SkillScope | null>;
|
|
24
|
+
/**
|
|
25
|
+
* Multi-select checklist of harnesses. Space toggles, enter confirms.
|
|
26
|
+
* Returns the selected harness ids, or null if aborted. An empty selection at
|
|
27
|
+
* confirm time is treated as an abort (null) by the caller.
|
|
28
|
+
*/
|
|
29
|
+
export declare function selectHarnesses(harnesses: HarnessTarget[], streams?: TtyStreams, preselected?: string[]): Promise<string[] | null>;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=skills-tui.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills-tui.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/skills-tui.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAMrE,UAAU,UAAU;IAClB,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC;CAC5B;AA2DD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAOD,2EAA2E;AAC3E,wBAAsB,WAAW,CAC/B,OAAO,GAAE,UAA6B,EACtC,OAAO,GAAE,WAAW,EAAkB,GACrC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAsC5B;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,SAAS,EAAE,aAAa,EAAE,EAC1B,OAAO,GAAE,UAA6B,EACtC,WAAW,GAAE,MAAM,EAAO,GACzB,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAkD1B"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal terminal UI for `agent-relay skills add`.
|
|
3
|
+
*
|
|
4
|
+
* Two interactions:
|
|
5
|
+
* - {@link selectScope}: a single-choice picker (project vs global).
|
|
6
|
+
* - {@link selectHarnesses}: a multi-select checklist (which harnesses).
|
|
7
|
+
*
|
|
8
|
+
* Both are driven by raw keypress events so they work without any third-party
|
|
9
|
+
* prompt dependency. They require a TTY; callers must fall back to flags when
|
|
10
|
+
* `process.stdin.isTTY` is false (handled in the command layer).
|
|
11
|
+
*/
|
|
12
|
+
import readline from 'node:readline';
|
|
13
|
+
const ESC = '\x1b';
|
|
14
|
+
const HIDE_CURSOR = `${ESC}[?25l`;
|
|
15
|
+
const SHOW_CURSOR = `${ESC}[?25h`;
|
|
16
|
+
function defaultStreams() {
|
|
17
|
+
return { input: process.stdin, output: process.stdout };
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Run a keypress-driven interaction. Handles raw mode setup/teardown, cursor
|
|
21
|
+
* hiding, and Ctrl+C, then resolves with whatever `onKey` returns (or null if
|
|
22
|
+
* the user aborted).
|
|
23
|
+
*/
|
|
24
|
+
async function runKeyLoop(streams, render, onKey) {
|
|
25
|
+
const { input, output } = streams;
|
|
26
|
+
readline.emitKeypressEvents(input);
|
|
27
|
+
const wasRaw = input.isRaw ?? false;
|
|
28
|
+
if (input.isTTY)
|
|
29
|
+
input.setRawMode(true);
|
|
30
|
+
output.write(HIDE_CURSOR);
|
|
31
|
+
return await new Promise((resolve) => {
|
|
32
|
+
const cleanup = () => {
|
|
33
|
+
input.off('keypress', handler);
|
|
34
|
+
if (input.isTTY)
|
|
35
|
+
input.setRawMode(wasRaw);
|
|
36
|
+
output.write(SHOW_CURSOR);
|
|
37
|
+
input.pause();
|
|
38
|
+
};
|
|
39
|
+
const handler = (_str, key) => {
|
|
40
|
+
const k = key ?? {};
|
|
41
|
+
if (k.ctrl && k.name === 'c') {
|
|
42
|
+
cleanup();
|
|
43
|
+
output.write('\n');
|
|
44
|
+
resolve(null);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const result = onKey(k);
|
|
48
|
+
if (result.done) {
|
|
49
|
+
cleanup();
|
|
50
|
+
resolve(result.value);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
render();
|
|
54
|
+
};
|
|
55
|
+
input.resume();
|
|
56
|
+
input.on('keypress', handler);
|
|
57
|
+
render();
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
const SCOPE_CHOICES = [
|
|
61
|
+
{ value: 'project', label: 'This project', hint: 'install into the current directory' },
|
|
62
|
+
{ value: 'global', label: 'Global', hint: 'install into your home config for all projects' },
|
|
63
|
+
];
|
|
64
|
+
/** Single-choice picker for the install scope. Returns null if aborted. */
|
|
65
|
+
export async function selectScope(streams = defaultStreams(), choices = SCOPE_CHOICES) {
|
|
66
|
+
let index = 0;
|
|
67
|
+
const { output } = streams;
|
|
68
|
+
let lines = 0;
|
|
69
|
+
const render = () => {
|
|
70
|
+
if (lines > 0)
|
|
71
|
+
output.write(`${ESC}[${lines}A`);
|
|
72
|
+
const out = [];
|
|
73
|
+
out.push('Where should the /orchestrate skill be installed?');
|
|
74
|
+
choices.forEach((choice, i) => {
|
|
75
|
+
const pointer = i === index ? '❯' : ' ';
|
|
76
|
+
const label = i === index ? `\x1b[36m${choice.label}\x1b[0m` : choice.label;
|
|
77
|
+
out.push(`${ESC}[2K${pointer} ${label} \x1b[2m${choice.hint}\x1b[0m`);
|
|
78
|
+
});
|
|
79
|
+
out.push(`${ESC}[2K\x1b[2m(↑/↓ to move, enter to select, Ctrl+C to cancel)\x1b[0m`);
|
|
80
|
+
lines = out.length;
|
|
81
|
+
output.write(`${out.join('\n')}\n`);
|
|
82
|
+
};
|
|
83
|
+
return runKeyLoop(streams, render, (key) => {
|
|
84
|
+
switch (key.name) {
|
|
85
|
+
case 'up':
|
|
86
|
+
case 'k':
|
|
87
|
+
index = (index - 1 + choices.length) % choices.length;
|
|
88
|
+
return { done: false };
|
|
89
|
+
case 'down':
|
|
90
|
+
case 'j':
|
|
91
|
+
index = (index + 1) % choices.length;
|
|
92
|
+
return { done: false };
|
|
93
|
+
case 'return':
|
|
94
|
+
case 'enter':
|
|
95
|
+
return { done: true, value: choices[index].value };
|
|
96
|
+
case 'escape':
|
|
97
|
+
return { done: true, value: null };
|
|
98
|
+
default:
|
|
99
|
+
return { done: false };
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Multi-select checklist of harnesses. Space toggles, enter confirms.
|
|
105
|
+
* Returns the selected harness ids, or null if aborted. An empty selection at
|
|
106
|
+
* confirm time is treated as an abort (null) by the caller.
|
|
107
|
+
*/
|
|
108
|
+
export async function selectHarnesses(harnesses, streams = defaultStreams(), preselected = []) {
|
|
109
|
+
let index = 0;
|
|
110
|
+
const selected = new Set(preselected);
|
|
111
|
+
const { output } = streams;
|
|
112
|
+
let lines = 0;
|
|
113
|
+
const render = () => {
|
|
114
|
+
if (lines > 0)
|
|
115
|
+
output.write(`${ESC}[${lines}A`);
|
|
116
|
+
const out = [];
|
|
117
|
+
out.push('Which coding harnesses? (space to toggle, a to toggle all)');
|
|
118
|
+
harnesses.forEach((harness, i) => {
|
|
119
|
+
const pointer = i === index ? '❯' : ' ';
|
|
120
|
+
const box = selected.has(harness.id) ? '\x1b[32m◉\x1b[0m' : '◯';
|
|
121
|
+
const label = i === index ? `\x1b[36m${harness.label}\x1b[0m` : harness.label;
|
|
122
|
+
out.push(`${ESC}[2K${pointer} ${box} ${label}`);
|
|
123
|
+
});
|
|
124
|
+
out.push(`${ESC}[2K\x1b[2m(↑/↓ move, space toggle, enter confirm, Ctrl+C cancel)\x1b[0m`);
|
|
125
|
+
lines = out.length;
|
|
126
|
+
output.write(`${out.join('\n')}\n`);
|
|
127
|
+
};
|
|
128
|
+
return runKeyLoop(streams, render, (key) => {
|
|
129
|
+
switch (key.name) {
|
|
130
|
+
case 'up':
|
|
131
|
+
case 'k':
|
|
132
|
+
index = (index - 1 + harnesses.length) % harnesses.length;
|
|
133
|
+
return { done: false };
|
|
134
|
+
case 'down':
|
|
135
|
+
case 'j':
|
|
136
|
+
index = (index + 1) % harnesses.length;
|
|
137
|
+
return { done: false };
|
|
138
|
+
case 'space':
|
|
139
|
+
toggle(selected, harnesses[index].id);
|
|
140
|
+
return { done: false };
|
|
141
|
+
case 'a':
|
|
142
|
+
if (selected.size === harnesses.length) {
|
|
143
|
+
selected.clear();
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
harnesses.forEach((h) => selected.add(h.id));
|
|
147
|
+
}
|
|
148
|
+
return { done: false };
|
|
149
|
+
case 'return':
|
|
150
|
+
case 'enter':
|
|
151
|
+
return { done: true, value: harnesses.filter((h) => selected.has(h.id)).map((h) => h.id) };
|
|
152
|
+
case 'escape':
|
|
153
|
+
return { done: true, value: null };
|
|
154
|
+
default:
|
|
155
|
+
return { done: false };
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
function toggle(set, id) {
|
|
160
|
+
if (set.has(id))
|
|
161
|
+
set.delete(id);
|
|
162
|
+
else
|
|
163
|
+
set.add(id);
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=skills-tui.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills-tui.js","sourceRoot":"","sources":["../../../src/cli/lib/skills-tui.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,QAAQ,MAAM,eAAe,CAAC;AAIrC,MAAM,GAAG,GAAG,MAAM,CAAC;AACnB,MAAM,WAAW,GAAG,GAAG,GAAG,OAAO,CAAC;AAClC,MAAM,WAAW,GAAG,GAAG,GAAG,OAAO,CAAC;AAOlC,SAAS,cAAc;IACrB,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;AAC1D,CAAC;AAQD;;;;GAIG;AACH,KAAK,UAAU,UAAU,CACvB,OAAmB,EACnB,MAAkB,EAClB,KAAsE;IAEtE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAClC,QAAQ,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC;IACpC,IAAI,K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AAC,GAAG,CAAC,EAAE,CAAC,CAAC;AACnB,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -283,7 +283,7 @@ __export(index_exports, {
|
|
|
283
283
|
module.exports = __toCommonJS(index_exports);
|
|
284
284
|
|
|
285
285
|
// ../sdk/node_modules/@relaycast/sdk/dist/version.js
|
|
286
|
-
var SDK_VERSION = "5.0.
|
|
286
|
+
var SDK_VERSION = "5.0.6";
|
|
287
287
|
|
|
288
288
|
// ../sdk/node_modules/zod/v4/classic/external.js
|
|
289
289
|
var external_exports = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-relay",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.5",
|
|
4
4
|
"description": "Real-time agent-to-agent communication system",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"pack:validate": "npm pack --dry-run"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@agent-relay/cloud": "9.1.
|
|
47
|
-
"@agent-relay/config": "9.1.
|
|
48
|
-
"@agent-relay/fleet": "9.1.
|
|
49
|
-
"@agent-relay/harness-driver": "9.1.
|
|
50
|
-
"@agent-relay/sdk": "9.1.
|
|
51
|
-
"@agent-relay/utils": "9.1.
|
|
46
|
+
"@agent-relay/cloud": "9.1.5",
|
|
47
|
+
"@agent-relay/config": "9.1.5",
|
|
48
|
+
"@agent-relay/fleet": "9.1.5",
|
|
49
|
+
"@agent-relay/harness-driver": "9.1.5",
|
|
50
|
+
"@agent-relay/sdk": "9.1.5",
|
|
51
|
+
"@agent-relay/utils": "9.1.5",
|
|
52
52
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
53
53
|
"@relaycast/sdk": "^5.0.5",
|
|
54
54
|
"@relayflows/cli": "^1.0.1",
|