reply-cli 0.18.0 → 0.19.0
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 +42 -38
- package/dist/commands/skills.js +13 -14
- package/dist/commands/skills.js.map +1 -1
- package/dist/operations/commands.js +4 -2
- package/dist/operations/commands.js.map +1 -1
- package/dist/skills/adapter-flat.d.ts +7 -18
- package/dist/skills/adapter-flat.js +69 -165
- package/dist/skills/adapter-flat.js.map +1 -1
- package/dist/skills/detect.js +2 -3
- package/dist/skills/detect.js.map +1 -1
- package/dist/skills/hosts.js +16 -16
- package/dist/skills/hosts.js.map +1 -1
- package/dist/skills/journal.d.ts +1 -1
- package/dist/skills/journal.js.map +1 -1
- package/dist/skills/orchestrate.d.ts +3 -8
- package/dist/skills/orchestrate.js +80 -73
- package/dist/skills/orchestrate.js.map +1 -1
- package/dist/skills/packs.d.ts +11 -15
- package/dist/skills/packs.js +66 -138
- package/dist/skills/packs.js.map +1 -1
- package/dist/skills/plugins.d.ts +19 -0
- package/dist/skills/plugins.js +67 -0
- package/dist/skills/plugins.js.map +1 -0
- package/dist/skills/report.d.ts +1 -2
- package/dist/skills/report.js +75 -20
- package/dist/skills/report.js.map +1 -1
- package/dist/skills/types.d.ts +18 -22
- package/package.json +2 -1
- package/skills/reply-adapter/reply-api/SKILL.md +231 -0
- package/skills/reply-adapter/reply-auth/SKILL.md +111 -0
- package/skills/reply-adapter/reply-cli/SKILL.md +178 -0
- package/skills/reply-adapter/reply-mcp/SKILL.md +115 -0
- package/skills/reply-adapter/reply-operations-mapping/SKILL.md +469 -0
- package/skills/reply-adapter/reply-operations-mapping/fulfilment.yaml +2986 -0
- package/skills/reply-adapter/reply-operations-mapping/references/fulfilment.md +872 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-01-discovery.md +35 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-02-contacts.md +46 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-03-audiences.md +39 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-04-import.md +28 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-05-campaigns.md +49 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-06-steps.md +41 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-07-messages.md +28 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-08-enrollment.md +30 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-09-conversations.md +32 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-10-tasks.md +35 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-11-meetings.md +40 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-12-signals.md +33 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-13-inbound.md +34 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-14-privacy.md +46 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-15-sending.md +57 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-16-social.md +36 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-17-oversight.md +55 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-18-team.md +38 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-19-accounts.md +35 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-20-measurement.md +33 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-21-introspection.md +38 -0
- package/dist/skills/adapter-native.d.ts +0 -22
- package/dist/skills/adapter-native.js +0 -335
- package/dist/skills/adapter-native.js.map +0 -1
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import { type Clone_fn } from './adapter-flat';
|
|
2
1
|
import { type Detect_deps } from './detect';
|
|
3
2
|
import type { Env } from '../config';
|
|
4
|
-
import type { Operation,
|
|
3
|
+
import type { Operation, Report, Runner } from './types';
|
|
5
4
|
type Skills_deps = {
|
|
6
5
|
detect?: Detect_deps;
|
|
7
6
|
run?: Runner;
|
|
8
|
-
clone?: Clone_fn;
|
|
9
7
|
home?: string;
|
|
10
8
|
cwd?: string;
|
|
11
|
-
tmp_root?: string;
|
|
12
9
|
env?: Env;
|
|
13
|
-
|
|
14
|
-
ref?: string;
|
|
10
|
+
source?: string;
|
|
15
11
|
};
|
|
16
12
|
type Skills_opts = {
|
|
17
13
|
operation: Operation;
|
|
@@ -21,7 +17,6 @@ type Skills_opts = {
|
|
|
21
17
|
dry_run: boolean;
|
|
22
18
|
deps?: Skills_deps;
|
|
23
19
|
};
|
|
24
|
-
declare const guard_remove: (packs: Pack[], all: Pack[]) => void;
|
|
25
20
|
declare const run_skills: (opts: Skills_opts) => Promise<Report>;
|
|
26
|
-
export {
|
|
21
|
+
export { run_skills };
|
|
27
22
|
export type { Skills_deps, Skills_opts };
|
|
@@ -1,41 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.run_skills =
|
|
7
|
-
const os_1 = __importDefault(require("os"));
|
|
3
|
+
exports.run_skills = void 0;
|
|
8
4
|
const adapter_flat_1 = require("./adapter-flat");
|
|
9
|
-
const adapter_native_1 = require("./adapter-native");
|
|
10
5
|
const detect_1 = require("./detect");
|
|
11
6
|
const hosts_1 = require("./hosts");
|
|
12
7
|
const journal_1 = require("./journal");
|
|
13
8
|
const packs_1 = require("./packs");
|
|
9
|
+
const plugins_1 = require("./plugins");
|
|
14
10
|
const report_1 = require("./report");
|
|
15
|
-
const
|
|
16
|
-
// A dependency may not be removed while something that needs it could stay
|
|
17
|
-
// behind: that is exactly the adapter-without-core state the installer exists to
|
|
18
|
-
// avoid. Deliberately conservative — it refuses based on the dependency graph
|
|
19
|
-
// alone, without first asking every host what it has installed. A selective
|
|
20
|
-
// removal is the rare path, the fix is one flag away, and being wrong in this
|
|
21
|
-
// direction only costs an extra keystroke, while being wrong in the other
|
|
22
|
-
// direction breaks a working assistant.
|
|
23
|
-
const guard_remove = (packs, all) => {
|
|
24
|
-
const going = new Set(packs.map(p => p.name));
|
|
25
|
-
for (const pack of all) {
|
|
26
|
-
if (going.has(pack.name)) {
|
|
27
|
-
continue;
|
|
28
|
-
}
|
|
29
|
-
const needed = pack.dependencies.filter(d => going.has(d));
|
|
30
|
-
if (needed.length) {
|
|
31
|
-
throw new errors_1.UsageError(`${pack.name} depends on ${needed.join(', ')}; removing it alone can leave that pack broken.`, {
|
|
32
|
-
code: 'usage.skills_remove',
|
|
33
|
-
hint: `remove ${pack.name} too, or run \`reply skills remove\` to remove everything`,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
exports.guard_remove = guard_remove;
|
|
11
|
+
const config_1 = require("../config");
|
|
39
12
|
const not_detected = (def) => ({
|
|
40
13
|
host: def.id, label: def.label, kind: def.kind, status: 'skipped', reason: 'not-detected',
|
|
41
14
|
detail: `${def.label} was requested with --agent but is not installed on this machine`,
|
|
@@ -69,40 +42,88 @@ const orphaned_packs = (env) => {
|
|
|
69
42
|
}
|
|
70
43
|
return orphans;
|
|
71
44
|
};
|
|
45
|
+
// Whether this run can ask the host's own CLI about the plugins an earlier
|
|
46
|
+
// version installed: the host has one, it resolved, and its plugins live in
|
|
47
|
+
// the scope this run acts on (Codex's are user-scoped only).
|
|
48
|
+
const reaches_plugins = (host, scope) => !!host.def.plugin_cli && !!host.bin && !(scope === 'project' && host.def.id === 'codex');
|
|
49
|
+
// The plugin rows `list` adds beside the copies, under the plugin's own id.
|
|
50
|
+
const listed_plugins = (packs, plugins) => packs
|
|
51
|
+
.filter(pack => plugins[pack.name] !== undefined)
|
|
52
|
+
.map(pack => {
|
|
53
|
+
const name = (0, packs_1.plugin_id)(pack.name);
|
|
54
|
+
const version = plugins[pack.name];
|
|
55
|
+
if (pack.retired) {
|
|
56
|
+
return { name, action: 'current', version, retired: true };
|
|
57
|
+
}
|
|
58
|
+
return version === pack.version
|
|
59
|
+
? { name, action: 'current', version }
|
|
60
|
+
: { name, action: 'upgraded', version: pack.version, from: version };
|
|
61
|
+
});
|
|
62
|
+
const run_host = async (opts, host, packs, scope, detect) => {
|
|
63
|
+
const deps = opts.deps ?? {};
|
|
64
|
+
const run = deps.run ?? plugins_1.default_runner;
|
|
65
|
+
const { operation, dry_run } = opts;
|
|
66
|
+
const listing = reaches_plugins(host, scope) ? await (0, plugins_1.old_plugins)(host, run, scope) : undefined;
|
|
67
|
+
const plugins = listing?.ok ? listing.versions : {};
|
|
68
|
+
const copying = operation === 'install' || operation === 'update';
|
|
69
|
+
const adopt = copying && plugins[packs_1.PACK_NAME] !== undefined
|
|
70
|
+
? { [packs_1.PACK_NAME]: plugins[packs_1.PACK_NAME] }
|
|
71
|
+
: {};
|
|
72
|
+
const outcome = await (0, adapter_flat_1.run_flat)({
|
|
73
|
+
operation, host, packs, scope, dry_run, adopt,
|
|
74
|
+
home: deps.home ?? detect.home, cwd: deps.cwd, env: deps.env, source: deps.source,
|
|
75
|
+
});
|
|
76
|
+
const rows = [...outcome.packs ?? []];
|
|
77
|
+
const extra = {};
|
|
78
|
+
if (copying) {
|
|
79
|
+
// The old plugin goes only once the copy that replaces it is in
|
|
80
|
+
// place, so a refused or failed copy never leaves the host with
|
|
81
|
+
// neither.
|
|
82
|
+
const copied = rows.find(p => p.name === packs_1.PACK_NAME);
|
|
83
|
+
if (plugins[packs_1.PACK_NAME] !== undefined && copied && copied.action !== 'failed') {
|
|
84
|
+
const id = (0, packs_1.plugin_id)(packs_1.PACK_NAME);
|
|
85
|
+
const removed = dry_run ? { ok: true } : await (0, plugins_1.remove_plugin)(host, run, id, scope);
|
|
86
|
+
extra.old_plugin = removed.ok
|
|
87
|
+
? { id, action: 'removed' }
|
|
88
|
+
: { id, action: 'failed', detail: removed.detail };
|
|
89
|
+
}
|
|
90
|
+
const retired = packs_1.RETIRED_PACKS.filter(name => plugins[name] !== undefined).map(packs_1.plugin_id);
|
|
91
|
+
if (retired.length) {
|
|
92
|
+
extra.retired_plugins = retired;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
else if (operation === 'list') {
|
|
96
|
+
rows.push(...listed_plugins(packs, plugins));
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
for (const pack of packs.filter(p => plugins[p.name] !== undefined)) {
|
|
100
|
+
const id = (0, packs_1.plugin_id)(pack.name);
|
|
101
|
+
const removed = dry_run ? { ok: true } : await (0, plugins_1.remove_plugin)(host, run, id, scope);
|
|
102
|
+
rows.push(removed.ok
|
|
103
|
+
? { name: id, action: 'removed', version: plugins[pack.name] }
|
|
104
|
+
: { name: id, action: 'failed', detail: removed.detail });
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (listing && !listing.ok && !outcome.hint) {
|
|
108
|
+
extra.hint = `${host.def.label} did not list its plugins (${listing.detail}), so a`
|
|
109
|
+
+ ` ${(0, packs_1.plugin_id)(packs_1.PACK_NAME)} plugin an earlier version installed, if there is one, was not reached`;
|
|
110
|
+
}
|
|
111
|
+
// A copy that failed outright keeps its own status; anything else is
|
|
112
|
+
// recomputed over the plugin rows too.
|
|
113
|
+
const status = outcome.reason ? outcome.status : (0, adapter_flat_1.status_of)(rows);
|
|
114
|
+
return { ...outcome, ...extra, packs: rows, status };
|
|
115
|
+
};
|
|
72
116
|
const run_skills = async (opts) => {
|
|
73
117
|
const deps = opts.deps ?? {};
|
|
74
118
|
const detect = deps.detect ?? (0, detect_1.default_detect_deps)();
|
|
75
|
-
const
|
|
76
|
-
const registry = await (0, packs_1.load_packs)({ ref, fetch_impl: deps.fetch_impl });
|
|
77
|
-
// Install and update pull dependencies; remove must not — see resolve_packs.
|
|
78
|
-
const packs = (0, packs_1.resolve_packs)(opts.requested, registry, {
|
|
79
|
-
dependencies: opts.operation !== 'remove',
|
|
80
|
-
});
|
|
119
|
+
const packs = (0, packs_1.resolve_packs)(opts.requested, opts.operation);
|
|
81
120
|
const scope = opts.project ? 'project' : 'user';
|
|
82
|
-
if (opts.operation === 'remove' && opts.requested.length) {
|
|
83
|
-
guard_remove(packs, registry.packs);
|
|
84
|
-
}
|
|
85
121
|
const { selected, missing } = (0, detect_1.select_hosts)(opts.agents, detect);
|
|
86
122
|
const hosts = [];
|
|
87
123
|
for (const host of selected) {
|
|
88
|
-
// A native host under --project falls back to the flat adapter only
|
|
89
|
-
// when its plugin mechanism cannot express project scope; Claude Code
|
|
90
|
-
// can, Codex cannot.
|
|
91
|
-
const native = host.def.kind === 'native-plugin'
|
|
92
|
-
&& !(scope === 'project' && host.def.id === 'codex');
|
|
93
124
|
let outcome;
|
|
94
125
|
try {
|
|
95
|
-
outcome =
|
|
96
|
-
? await (0, adapter_native_1.run_native)({
|
|
97
|
-
operation: opts.operation, host, packs, scope,
|
|
98
|
-
run: deps.run, dry_run: opts.dry_run,
|
|
99
|
-
})
|
|
100
|
-
: await (0, adapter_flat_1.run_flat)({
|
|
101
|
-
operation: opts.operation, host, packs, scope, ref,
|
|
102
|
-
run: deps.run, clone: deps.clone, dry_run: opts.dry_run,
|
|
103
|
-
home: deps.home ?? detect.home, cwd: deps.cwd,
|
|
104
|
-
tmp_root: deps.tmp_root ?? os_1.default.tmpdir(), env: deps.env,
|
|
105
|
-
});
|
|
126
|
+
outcome = await run_host(opts, host, packs, scope, detect);
|
|
106
127
|
}
|
|
107
128
|
catch (error) {
|
|
108
129
|
// An adapter is expected to turn every failure it knows about
|
|
@@ -129,29 +150,15 @@ const run_skills = async (opts) => {
|
|
|
129
150
|
for (const def of missing) {
|
|
130
151
|
hosts.push(not_detected(def));
|
|
131
152
|
}
|
|
132
|
-
// The commit is only known when this run itself cloned something: a flat
|
|
133
|
-
// host stamps its own outcome with the commit it cloned (see
|
|
134
|
-
// adapter-flat.ts), and only then — never on a native host, a skip, or a
|
|
135
|
-
// failure that never reached a clone. Reading it off the outcomes (rather
|
|
136
|
-
// than the journal) means a stale entry from an earlier run, or one that
|
|
137
|
-
// belongs to a different host, can never be attributed to this run. If
|
|
138
|
-
// flat hosts somehow disagree — cloning at different moments within the
|
|
139
|
-
// same run — no commit is reported rather than an arbitrary one.
|
|
140
|
-
const commits = new Set(hosts.map(h => h.commit).filter((c) => !!c));
|
|
141
|
-
const commit = commits.size === 1 ? [...commits][0] : undefined;
|
|
142
|
-
// `requested` is what the user asked for in canonical form; `resolved` is
|
|
143
|
-
// that plus dependencies. Both are reported so an agent sees the pull
|
|
144
|
-
// without parsing prose. resolve_packs puts dependencies first, so the
|
|
145
|
-
// requested pack itself is always the last element.
|
|
146
|
-
const canonical = opts.requested.map(r => (0, packs_1.resolve_packs)([r], registry).slice(-1)[0].name);
|
|
147
153
|
// `list` alone: it answers "what is installed where". The other operations
|
|
148
154
|
// act on hosts, and can do nothing about one they no longer know.
|
|
149
155
|
const orphans = opts.operation === 'list' ? orphaned_packs(deps.env) : [];
|
|
156
|
+
const names = packs.map(p => p.name);
|
|
150
157
|
return {
|
|
151
158
|
action: opts.operation,
|
|
152
|
-
source:
|
|
153
|
-
requested:
|
|
154
|
-
resolved:
|
|
159
|
+
source: { version: (0, config_1.cli_version)() },
|
|
160
|
+
requested: names,
|
|
161
|
+
resolved: names,
|
|
155
162
|
hosts,
|
|
156
163
|
summary: (0, report_1.summarize)(hosts, opts.operation),
|
|
157
164
|
...(orphans.length ? { orphans } : {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrate.js","sourceRoot":"","sources":["../../src/skills/orchestrate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"orchestrate.js","sourceRoot":"","sources":["../../src/skills/orchestrate.ts"],"names":[],"mappings":";;;AAAA,iDAAmD;AACnD,qCAAiG;AACjG,mCAAiC;AACjC,uCAAuC;AACvC,mCAA2E;AAC3E,uCAAqE;AACrE,qCAAmC;AACnC,sCAAsC;AA+BtC,MAAM,YAAY,GAAG,CAAC,GA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,KAAK,cAAc;aAChH,CAAC;QACN,CAAC;QACD,oEAAoE;QACpE,iDAAiD;QACjD,KAAK,CAAC,IAAI,CAAC;YACP,GAAG,OAAO;YACV,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ;YAC3B,iBAAiB,EAAE,IAAI,CAAC,GAAG,CAAC,iBAAiB;SAChD,CAAC,CAAC;IACP,CAAC;IACD,KAAK,MAAM,GAAG,IAAI,OAAO,EACzB,CAAC;QACG,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IAClC,CAAC;IAED,2EAA2E;IAC3E,kEAAkE;IAClE,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1E,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAA,EAAE,CAAA,CAAC,CAAC,IAAI,CAAC,CAAC;IAEnC,OAAO;QACH,MAAM,EAAE,IAAI,CAAC,SAAS;QACtB,MAAM,EAAE,EAAC,OAAO,EAAE,IAAA,oBAAW,GAAE,EAAC;QAChC,SAAS,EAAE,KAAK;QAChB,QAAQ,EAAE,KAAK;QACf,KAAK;QACL,OAAO,EAAE,IAAA,kBAAS,EAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;QACzC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAC,OAAO,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KACvC,CAAC;AACN,CAAC,CAAC;AAEM,gCAAU"}
|
package/dist/skills/packs.d.ts
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const
|
|
3
|
-
declare const MARKETPLACE = "reply-skills";
|
|
4
|
-
declare const DEFAULT_REF = "main";
|
|
1
|
+
import type { Operation, Pack } from './types';
|
|
2
|
+
declare const PACK_NAME = "reply-adapter";
|
|
5
3
|
declare const ALIASES: Record<string, string>;
|
|
6
|
-
declare const
|
|
7
|
-
declare const
|
|
8
|
-
declare const
|
|
9
|
-
declare const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
declare const resolve_packs: (requested: string[],
|
|
14
|
-
|
|
15
|
-
}) => Pack[];
|
|
16
|
-
export { REPO, MARKETPLACE, DEFAULT_REF, ALIASES, PACKS_FALLBACK, packs_url, parse_packs, load_packs, resolve_packs, };
|
|
4
|
+
declare const RETIRED: Record<string, string>;
|
|
5
|
+
declare const RETIRED_PACKS: string[];
|
|
6
|
+
declare const OLD_MARKETPLACE = "reply-skills";
|
|
7
|
+
declare const MOVED: string;
|
|
8
|
+
declare const pack_dir: (from?: string) => string;
|
|
9
|
+
declare const plugin_id: (pack: string) => string;
|
|
10
|
+
declare const the_pack: () => Pack;
|
|
11
|
+
declare const resolve_packs: (requested: string[], operation: Operation) => Pack[];
|
|
12
|
+
export { PACK_NAME, ALIASES, RETIRED, RETIRED_PACKS, OLD_MARKETPLACE, MOVED, pack_dir, plugin_id, the_pack, resolve_packs, };
|
package/dist/skills/packs.js
CHANGED
|
@@ -1,153 +1,81 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolve_packs = exports.
|
|
6
|
+
exports.resolve_packs = exports.the_pack = exports.plugin_id = exports.pack_dir = exports.MOVED = exports.OLD_MARKETPLACE = exports.RETIRED_PACKS = exports.RETIRED = exports.ALIASES = exports.PACK_NAME = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const config_1 = require("../config");
|
|
4
9
|
const errors_1 = require("../utils/errors");
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
const
|
|
9
|
-
exports.
|
|
10
|
-
const MARKETPLACE = 'reply-skills';
|
|
11
|
-
exports.MARKETPLACE = MARKETPLACE;
|
|
12
|
-
const DEFAULT_REF = 'main';
|
|
13
|
-
exports.DEFAULT_REF = DEFAULT_REF;
|
|
10
|
+
// The one pack this CLI ships: Reply's own skills, carried in the package
|
|
11
|
+
// beside dist/ and installed at the CLI's own version, so a skill that
|
|
12
|
+
// describes a release's commands is released with them.
|
|
13
|
+
const PACK_NAME = 'reply-adapter';
|
|
14
|
+
exports.PACK_NAME = PACK_NAME;
|
|
14
15
|
const ALIASES = {
|
|
15
|
-
|
|
16
|
-
adapter: 'reply-adapter',
|
|
17
|
-
runtime: 'agentic-runtime',
|
|
16
|
+
adapter: PACK_NAME,
|
|
18
17
|
};
|
|
19
18
|
exports.ALIASES = ALIASES;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
dependencies: [],
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: 'reply-adapter',
|
|
32
|
-
display_name: 'Reply.io Adapter',
|
|
33
|
-
version: '0.1.0',
|
|
34
|
-
description: 'Executes the AI SDR Core contract against Reply.io: CLI, API v3, MCP, auth.',
|
|
35
|
-
dependencies: ['ai-sdr-core'],
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
name: 'agentic-runtime',
|
|
39
|
-
display_name: 'Agentic Runtime',
|
|
40
|
-
version: '0.1.0',
|
|
41
|
-
description: 'Durable multi-session work: plans, work items, checkpoints, reports, memory.',
|
|
42
|
-
dependencies: ['ai-sdr-core'],
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
};
|
|
46
|
-
exports.PACKS_FALLBACK = PACKS_FALLBACK;
|
|
47
|
-
const packs_url = (ref = DEFAULT_REF) => `https://raw.githubusercontent.com/${REPO}/${ref}/packs.json`;
|
|
48
|
-
exports.packs_url = packs_url;
|
|
49
|
-
const bad_document = (detail) => new errors_1.RuntimeError('The skills pack registry is malformed.', { code: 'skills.packs_malformed', detail });
|
|
50
|
-
const as_string = (value, field) => {
|
|
51
|
-
if (typeof value !== 'string' || !value.trim()) {
|
|
52
|
-
throw bad_document(`missing or non-string field: ${field}`);
|
|
53
|
-
}
|
|
54
|
-
return value;
|
|
19
|
+
// Packs an earlier version of this CLI installed and this one no longer
|
|
20
|
+
// offers, under every name it accepted for them. `list` and `remove` still
|
|
21
|
+
// reach what was installed under them; `install` and `update` refuse them.
|
|
22
|
+
const RETIRED = {
|
|
23
|
+
'core': 'ai-sdr-core',
|
|
24
|
+
'ai-sdr-core': 'ai-sdr-core',
|
|
25
|
+
'runtime': 'agentic-runtime',
|
|
26
|
+
'agentic-runtime': 'agentic-runtime',
|
|
55
27
|
};
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
28
|
+
exports.RETIRED = RETIRED;
|
|
29
|
+
const RETIRED_PACKS = ['ai-sdr-core', 'agentic-runtime'];
|
|
30
|
+
exports.RETIRED_PACKS = RETIRED_PACKS;
|
|
31
|
+
// A name's own entry only: a plain object also answers `constructor`,
|
|
32
|
+
// `toString` and `__proto__` from its prototype.
|
|
33
|
+
const own = (table, key) => Object.hasOwn(table, key) ? table[key] : undefined;
|
|
34
|
+
// The plugin marketplace an earlier version registered in Claude Code and
|
|
35
|
+
// Codex. Its plugins are named `<pack>@<marketplace>`; this CLI only finds
|
|
36
|
+
// and removes them, and never registers the marketplace again.
|
|
37
|
+
const OLD_MARKETPLACE = 'reply-skills';
|
|
38
|
+
exports.OLD_MARKETPLACE = OLD_MARKETPLACE;
|
|
39
|
+
const MOVED = 'The SDR expertise and the runtime skills ship with Jason (github.com/reply-team/jason-ai)'
|
|
40
|
+
+ ' and are not installed by this CLI.';
|
|
41
|
+
exports.MOVED = MOVED;
|
|
42
|
+
// The pack's directory in the installed package. This module sits one level
|
|
43
|
+
// under the package root in both layouts — src/skills from a checkout,
|
|
44
|
+
// dist/skills once built — so the same relative path finds it from either.
|
|
45
|
+
const pack_dir = (from = __dirname) => path_1.default.join(from, '..', '..', 'skills', PACK_NAME);
|
|
46
|
+
exports.pack_dir = pack_dir;
|
|
47
|
+
const plugin_id = (pack) => `${pack}@${OLD_MARKETPLACE}`;
|
|
48
|
+
exports.plugin_id = plugin_id;
|
|
49
|
+
const the_pack = () => ({ name: PACK_NAME, version: (0, config_1.cli_version)() });
|
|
50
|
+
exports.the_pack = the_pack;
|
|
51
|
+
// Requested names (aliases allowed) → the packs to act on. With no name,
|
|
52
|
+
// `install` and `update` mean the one pack, and `list` and `remove` mean
|
|
53
|
+
// everything this CLI ever installed, retired packs included.
|
|
54
|
+
const resolve_packs = (requested, operation) => {
|
|
55
|
+
const reaches_retired = operation === 'list' || operation === 'remove';
|
|
56
|
+
if (!requested.length) {
|
|
57
|
+
return reaches_retired
|
|
58
|
+
? [the_pack(), ...RETIRED_PACKS.map(name => ({ name, version: '', retired: true }))]
|
|
59
|
+
: [the_pack()];
|
|
65
60
|
}
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
throw bad_document(`packs[${i}].dependencies must be an array of strings`);
|
|
61
|
+
const wanted = [];
|
|
62
|
+
for (const raw of requested) {
|
|
63
|
+
const retired = own(RETIRED, raw);
|
|
64
|
+
if (retired !== undefined && !reaches_retired) {
|
|
65
|
+
throw new errors_1.UsageError(MOVED, { code: 'usage.skills_pack_moved' });
|
|
72
66
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
};
|
|
80
|
-
});
|
|
81
|
-
const known = new Set(packs.map(p => p.name));
|
|
82
|
-
for (const pack of packs) {
|
|
83
|
-
for (const dep of pack.dependencies) {
|
|
84
|
-
if (!known.has(dep)) {
|
|
85
|
-
throw bad_document(`${pack.name} depends on unknown pack '${dep}'`);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return { marketplace: as_string(marketplace.name ?? MARKETPLACE, 'marketplace.name'), packs };
|
|
90
|
-
};
|
|
91
|
-
exports.parse_packs = parse_packs;
|
|
92
|
-
// Fetches the registry, degrading to the embedded copy on any problem —
|
|
93
|
-
// unreachable network, HTTP error, or a document we cannot trust. Installing a
|
|
94
|
-
// known-good pack set beats failing because GitHub is having a bad day.
|
|
95
|
-
const load_packs = async (opts = {}) => {
|
|
96
|
-
const fetch_impl = opts.fetch_impl ?? fetch;
|
|
97
|
-
try {
|
|
98
|
-
const response = await fetch_impl(packs_url(opts.ref));
|
|
99
|
-
if (!response.ok) {
|
|
100
|
-
return PACKS_FALLBACK;
|
|
101
|
-
}
|
|
102
|
-
return parse_packs(await response.json());
|
|
103
|
-
}
|
|
104
|
-
catch {
|
|
105
|
-
return PACKS_FALLBACK;
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
exports.load_packs = load_packs;
|
|
109
|
-
// Requested names (aliases allowed, empty means everything) → the packs to act
|
|
110
|
-
// on, dependencies always before their dependents.
|
|
111
|
-
//
|
|
112
|
-
// `dependencies: false` returns exactly the requested packs, still in registry
|
|
113
|
-
// order. Removal uses it: `remove reply-adapter` must not drag `ai-sdr-core`
|
|
114
|
-
// along, because other installed packs still need it.
|
|
115
|
-
const resolve_packs = (requested, registry, opts = {}) => {
|
|
116
|
-
const by_name = new Map(registry.packs.map(p => [p.name, p]));
|
|
117
|
-
const valid = registry.packs.map(p => p.name).join(', ');
|
|
118
|
-
const wanted = requested.length
|
|
119
|
-
? requested.map(raw => {
|
|
120
|
-
const name = ALIASES[raw] ?? raw;
|
|
121
|
-
if (!by_name.has(name)) {
|
|
122
|
-
throw new errors_1.UsageError(`Unknown skills pack '${raw}'.`, {
|
|
123
|
-
code: 'usage.skills_pack',
|
|
124
|
-
hint: `Valid packs: ${valid} (aliases: ${Object.keys(ALIASES).join(', ')})`,
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
return name;
|
|
128
|
-
})
|
|
129
|
-
: registry.packs.map(p => p.name);
|
|
130
|
-
if (opts.dependencies === false) {
|
|
131
|
-
const chosen = new Set(wanted);
|
|
132
|
-
return registry.packs.filter(p => chosen.has(p.name));
|
|
133
|
-
}
|
|
134
|
-
const ordered = [];
|
|
135
|
-
const seen = new Set();
|
|
136
|
-
const visit = (name) => {
|
|
137
|
-
if (seen.has(name)) {
|
|
138
|
-
return;
|
|
67
|
+
const name = retired ?? own(ALIASES, raw) ?? raw;
|
|
68
|
+
if (name !== PACK_NAME && retired === undefined) {
|
|
69
|
+
throw new errors_1.UsageError(`Unknown skills pack '${raw}'.`, {
|
|
70
|
+
code: 'usage.skills_pack',
|
|
71
|
+
hint: `The pack is ${PACK_NAME} (alias: ${Object.keys(ALIASES).join(', ')})`,
|
|
72
|
+
});
|
|
139
73
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
for (const dep of pack.dependencies) {
|
|
143
|
-
visit(dep);
|
|
74
|
+
if (!wanted.some(p => p.name === name)) {
|
|
75
|
+
wanted.push(retired === undefined ? the_pack() : { name, version: '', retired: true });
|
|
144
76
|
}
|
|
145
|
-
ordered.push(pack);
|
|
146
|
-
};
|
|
147
|
-
for (const name of wanted) {
|
|
148
|
-
visit(name);
|
|
149
77
|
}
|
|
150
|
-
return
|
|
78
|
+
return wanted;
|
|
151
79
|
};
|
|
152
80
|
exports.resolve_packs = resolve_packs;
|
|
153
81
|
//# sourceMappingURL=packs.js.map
|
package/dist/skills/packs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packs.js","sourceRoot":"","sources":["../../src/skills/packs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"packs.js","sourceRoot":"","sources":["../../src/skills/packs.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,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O,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;aAC/E,CAAC,CAAC;QACP,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAA,EAAE,CAAA,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,EACpC,CAAC;YACG,MAAM,CAAC,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC;QACzF,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAIiC,sCAAa"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Detected_host } from './detect';
|
|
2
|
+
import type { Runner, Scope } from './types';
|
|
3
|
+
declare const default_runner: Runner;
|
|
4
|
+
type Listing_result = {
|
|
5
|
+
ok: true;
|
|
6
|
+
versions: Record<string, string>;
|
|
7
|
+
} | {
|
|
8
|
+
ok: false;
|
|
9
|
+
detail: string;
|
|
10
|
+
};
|
|
11
|
+
declare const old_plugins: (host: Detected_host, run: Runner, scope: Scope) => Promise<Listing_result>;
|
|
12
|
+
declare const remove_plugin: (host: Detected_host, run: Runner, id: string, scope: Scope) => Promise<{
|
|
13
|
+
ok: true;
|
|
14
|
+
} | {
|
|
15
|
+
ok: false;
|
|
16
|
+
detail: string;
|
|
17
|
+
}>;
|
|
18
|
+
export { default_runner, old_plugins, remove_plugin };
|
|
19
|
+
export type { Listing_result };
|