@danieldeusing/seedr 0.1.98 → 0.1.99
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/{chunk-NQOS5TI7.js → chunk-3KPB5CCX.js} +27 -7
- package/dist/cli.js +51 -13
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -773,9 +773,21 @@ async function fetchItemToDestination(item, destPath) {
|
|
|
773
773
|
}
|
|
774
774
|
|
|
775
775
|
// src/config/agents.ts
|
|
776
|
+
import { existsSync as existsSync12 } from "fs";
|
|
776
777
|
import { homedir as homedir2 } from "os";
|
|
777
778
|
import { join as join14 } from "path";
|
|
778
779
|
var home = homedir2();
|
|
780
|
+
function claudeUserJsonPath() {
|
|
781
|
+
const configDir = process.env.CLAUDE_CONFIG_DIR;
|
|
782
|
+
if (configDir) {
|
|
783
|
+
const scoped = join14(configDir, ".config.json");
|
|
784
|
+
if (existsSync12(scoped)) return scoped;
|
|
785
|
+
}
|
|
786
|
+
return join14(configDir || home, ".claude.json");
|
|
787
|
+
}
|
|
788
|
+
var copilotUserRoot = () => process.env.COPILOT_HOME || join14(home, ".copilot");
|
|
789
|
+
var codexUserRoot = () => process.env.CODEX_HOME || join14(home, ".codex");
|
|
790
|
+
var openCodeUserConfigDir = () => process.env.OPENCODE_CONFIG_DIR || (process.env.XDG_CONFIG_HOME ? join14(process.env.XDG_CONFIG_HOME, "opencode") : join14(home, ".config", "opencode"));
|
|
779
791
|
var claudeUserRoot = () => process.env.CLAUDE_CONFIG_DIR || join14(home, ".claude");
|
|
780
792
|
var SKILL_DIRECTORY = {
|
|
781
793
|
path: "skills"
|
|
@@ -827,7 +839,7 @@ var CODING_AGENTS = {
|
|
|
827
839
|
// the two are not the same spelling. `~/.github/skills` is read by nothing;
|
|
828
840
|
// `~/.copilot/skills` is what the CLI itself populates.
|
|
829
841
|
projectRoot: ".github",
|
|
830
|
-
userRoot:
|
|
842
|
+
userRoot: copilotUserRoot(),
|
|
831
843
|
// Subagents are `<name>.agent.md` under `agents/`, with the same
|
|
832
844
|
// `name` + `description` frontmatter a Claude subagent carries — confirmed
|
|
833
845
|
// from files on a real machine.
|
|
@@ -839,14 +851,19 @@ var CODING_AGENTS = {
|
|
|
839
851
|
name: "OpenAI Codex CLI",
|
|
840
852
|
shortName: "codex",
|
|
841
853
|
projectRoot: ".codex",
|
|
842
|
-
userRoot:
|
|
854
|
+
userRoot: codexUserRoot(),
|
|
843
855
|
contentTypes: { skill: SKILL_DIRECTORY }
|
|
844
856
|
},
|
|
845
857
|
opencode: {
|
|
846
858
|
name: "OpenCode",
|
|
847
859
|
shortName: "opencode",
|
|
860
|
+
// `~/.opencode` is the LEGACY user directory. The global config directory
|
|
861
|
+
// is `~/.config/opencode`, which is where this package already writes
|
|
862
|
+
// `opencode.json` and `AGENTS.md` — splitting one agent across two roots
|
|
863
|
+
// made `list` and `remove` diverge, and creating `~/.opencode` on a machine
|
|
864
|
+
// that had none adds a capability directory ranked above every project one.
|
|
848
865
|
projectRoot: ".opencode",
|
|
849
|
-
userRoot:
|
|
866
|
+
userRoot: openCodeUserConfigDir(),
|
|
850
867
|
contentTypes: { skill: SKILL_DIRECTORY }
|
|
851
868
|
}
|
|
852
869
|
};
|
|
@@ -887,13 +904,13 @@ function getMcpConfigPath(agent, scope, cwd = process.cwd()) {
|
|
|
887
904
|
const isUser = scope === "user";
|
|
888
905
|
switch (canonicalAgent(agent) ?? agent) {
|
|
889
906
|
case "claude":
|
|
890
|
-
return isUser ?
|
|
907
|
+
return isUser ? claudeUserJsonPath() : join14(cwd, ".mcp.json");
|
|
891
908
|
case "codex":
|
|
892
|
-
return isUser ? join14(
|
|
909
|
+
return isUser ? join14(codexUserRoot(), "config.toml") : join14(cwd, ".codex", "config.toml");
|
|
893
910
|
case "opencode":
|
|
894
|
-
return isUser ? join14(
|
|
911
|
+
return isUser ? join14(openCodeUserConfigDir(), "opencode.json") : join14(cwd, "opencode.json");
|
|
895
912
|
case "copilot":
|
|
896
|
-
return isUser ? join14(
|
|
913
|
+
return isUser ? join14(copilotUserRoot(), "mcp-config.json") : join14(cwd, ".mcp.json");
|
|
897
914
|
default:
|
|
898
915
|
throw new Error(`${agent} has no verified MCP configuration format`);
|
|
899
916
|
}
|
|
@@ -1375,6 +1392,9 @@ export {
|
|
|
1375
1392
|
fetchItemFile,
|
|
1376
1393
|
getItemSourcePath,
|
|
1377
1394
|
fetchItemToDestination,
|
|
1395
|
+
copilotUserRoot,
|
|
1396
|
+
codexUserRoot,
|
|
1397
|
+
openCodeUserConfigDir,
|
|
1378
1398
|
claudeUserRoot,
|
|
1379
1399
|
CODING_AGENTS,
|
|
1380
1400
|
ALL_AGENTS,
|
package/dist/cli.js
CHANGED
|
@@ -14,7 +14,9 @@ import {
|
|
|
14
14
|
canonicalAgent,
|
|
15
15
|
canonicalAgents,
|
|
16
16
|
claudeUserRoot,
|
|
17
|
+
codexUserRoot,
|
|
17
18
|
confirm,
|
|
19
|
+
copilotUserRoot,
|
|
18
20
|
copyDirectory,
|
|
19
21
|
deepMerge,
|
|
20
22
|
ensureDir,
|
|
@@ -42,6 +44,7 @@ import {
|
|
|
42
44
|
listItems,
|
|
43
45
|
mainFileName,
|
|
44
46
|
moveDirectory,
|
|
47
|
+
openCodeUserConfigDir,
|
|
45
48
|
outro,
|
|
46
49
|
p,
|
|
47
50
|
parseAgentsArgStrict,
|
|
@@ -64,7 +67,7 @@ import {
|
|
|
64
67
|
writeFileAtomic,
|
|
65
68
|
writeJson,
|
|
66
69
|
writeTextFile
|
|
67
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-3KPB5CCX.js";
|
|
68
71
|
|
|
69
72
|
// src/cli.ts
|
|
70
73
|
import { Command as Command5 } from "commander";
|
|
@@ -144,7 +147,7 @@ function isTelemetryDisabled(env = process.env) {
|
|
|
144
147
|
return env[TELEMETRY_OPT_OUT_VARIABLE] !== void 0;
|
|
145
148
|
}
|
|
146
149
|
function cliVersion() {
|
|
147
|
-
return true ? "0.1.
|
|
150
|
+
return true ? "0.1.99" : "dev";
|
|
148
151
|
}
|
|
149
152
|
async function sendEvent(event) {
|
|
150
153
|
try {
|
|
@@ -258,8 +261,9 @@ async function getInstalledAgents(agent, scope, cwd = process.cwd()) {
|
|
|
258
261
|
if (!destDir || !await exists(destDir)) {
|
|
259
262
|
return [];
|
|
260
263
|
}
|
|
264
|
+
const suffix = subagentFileName(agent, "");
|
|
261
265
|
const files = await readdir(destDir);
|
|
262
|
-
return files.filter((
|
|
266
|
+
return files.filter((file) => file.endsWith(suffix)).map((file) => file.slice(0, -suffix.length));
|
|
263
267
|
}
|
|
264
268
|
async function planAgent(item, agents, scope, method, cwd) {
|
|
265
269
|
assertValidSlug(item.slug, SLUG_LABEL);
|
|
@@ -414,7 +418,7 @@ function getScopeRoot(scope, cwd) {
|
|
|
414
418
|
return scope === "user" ? homedir3() : cwd;
|
|
415
419
|
}
|
|
416
420
|
function getHooksDir(scope, cwd) {
|
|
417
|
-
return join3(getScopeRoot(scope, cwd), ".claude", "hooks");
|
|
421
|
+
return scope === "user" ? join3(claudeUserRoot(), "hooks") : join3(getScopeRoot(scope, cwd), ".claude", "hooks");
|
|
418
422
|
}
|
|
419
423
|
function getScriptPath(scope, scriptName) {
|
|
420
424
|
switch (scope) {
|
|
@@ -1382,7 +1386,7 @@ var claudeStore = {
|
|
|
1382
1386
|
return true;
|
|
1383
1387
|
}
|
|
1384
1388
|
};
|
|
1385
|
-
var COPILOT_DIR =
|
|
1389
|
+
var COPILOT_DIR = copilotUserRoot();
|
|
1386
1390
|
var COPILOT_SETTINGS_PATH = join4(COPILOT_DIR, "settings.json");
|
|
1387
1391
|
var COPILOT_PLUGINS_DIR = join4(COPILOT_DIR, "installed-plugins");
|
|
1388
1392
|
var copilotStore = {
|
|
@@ -1432,7 +1436,7 @@ var copilotStore = {
|
|
|
1432
1436
|
return true;
|
|
1433
1437
|
}
|
|
1434
1438
|
};
|
|
1435
|
-
var CODEX_DIR =
|
|
1439
|
+
var CODEX_DIR = codexUserRoot();
|
|
1436
1440
|
var CODEX_CONFIG_PATH = join4(CODEX_DIR, "config.toml");
|
|
1437
1441
|
var CODEX_CACHE_DIR = join4(CODEX_DIR, "plugins", "cache");
|
|
1438
1442
|
function toCodexMarketplaceTable(marketplace, url, revision) {
|
|
@@ -1504,7 +1508,7 @@ var codexStore = {
|
|
|
1504
1508
|
}
|
|
1505
1509
|
};
|
|
1506
1510
|
function openCodeConfigPath(scope, cwd) {
|
|
1507
|
-
return scope === "user" ? join4(
|
|
1511
|
+
return scope === "user" ? join4(openCodeUserConfigDir(), "opencode.json") : join4(cwd, "opencode.json");
|
|
1508
1512
|
}
|
|
1509
1513
|
function toOpenCodePluginSpec(item, name) {
|
|
1510
1514
|
const source = item.pluginSource;
|
|
@@ -1570,6 +1574,27 @@ var antigravityStore = {
|
|
|
1570
1574
|
cacheRoot: GEMINI_PLUGINS_DIR,
|
|
1571
1575
|
// Antigravity files plugins by name only — it has no marketplace dimension.
|
|
1572
1576
|
cachePath: (_marketplace, name) => resolveContained(GEMINI_PLUGINS_DIR, name),
|
|
1577
|
+
/**
|
|
1578
|
+
* Antigravity discovers a plugin by a `plugin.json` at the tree ROOT, and
|
|
1579
|
+
* `.claude-plugin/plugin.json` is not a substitute: the cross-tool matrix
|
|
1580
|
+
* marks it a migration path (`agy plugin import claude`), never a reader.
|
|
1581
|
+
* `agy plugin validate` on a Claude-manifest-only tree answers
|
|
1582
|
+
* "missing plugin.json"; with a root manifest it answers "skills: 1 processed".
|
|
1583
|
+
*
|
|
1584
|
+
* Most plugins in the wild ship only the Claude manifest, so without this the
|
|
1585
|
+
* install lands a directory Antigravity refuses — reporting success while the
|
|
1586
|
+
* plugin does nothing. A tree that already carries its own root manifest
|
|
1587
|
+
* (compound-engineering does) is left exactly as it is.
|
|
1588
|
+
*/
|
|
1589
|
+
async prepareTree(contentPath, { name, version, item }) {
|
|
1590
|
+
const manifestPath = join4(contentPath, "plugin.json");
|
|
1591
|
+
if (await exists(manifestPath)) return;
|
|
1592
|
+
await writeJson(manifestPath, {
|
|
1593
|
+
name,
|
|
1594
|
+
version,
|
|
1595
|
+
...item.description ? { description: item.description } : {}
|
|
1596
|
+
});
|
|
1597
|
+
},
|
|
1573
1598
|
mutations: (context) => [
|
|
1574
1599
|
{
|
|
1575
1600
|
path: GEMINI_IMPORT_MANIFEST_PATH,
|
|
@@ -1667,7 +1692,7 @@ async function readManifestForPlan(item, manifestPaths) {
|
|
|
1667
1692
|
} catch {
|
|
1668
1693
|
}
|
|
1669
1694
|
}
|
|
1670
|
-
|
|
1695
|
+
return {};
|
|
1671
1696
|
}
|
|
1672
1697
|
async function createStagingDir(cacheRoot, slug) {
|
|
1673
1698
|
const tmpRoot = await resolveContained(cacheRoot, ".tmp");
|
|
@@ -1737,6 +1762,9 @@ async function installPluginForAgent(item, agent, scope, _method, force, cwd) {
|
|
|
1737
1762
|
const fetched = contentPath ? await stageContent(item, contentPath) : null;
|
|
1738
1763
|
const pluginJson = contentPath ? await readManifestFromDir(contentPath, store.manifestPaths) : await readManifestForPlan(item, store.manifestPaths);
|
|
1739
1764
|
const { name, version } = resolvePluginIdentity(item, pluginJson);
|
|
1765
|
+
if (contentPath && store.prepareTree) {
|
|
1766
|
+
await store.prepareTree(contentPath, { name, version, item });
|
|
1767
|
+
}
|
|
1740
1768
|
const gitCommitSha = resolveGitCommitSha(item, fetched);
|
|
1741
1769
|
const pluginId = getPluginId(name, marketplace);
|
|
1742
1770
|
const cachePath = await store.cachePath(marketplace, name, version);
|
|
@@ -1904,17 +1932,17 @@ var antigravityTarget = {
|
|
|
1904
1932
|
};
|
|
1905
1933
|
var copilotTarget = {
|
|
1906
1934
|
kind: "file",
|
|
1907
|
-
dir: (scope, cwd) => join6(scope === "user" ?
|
|
1935
|
+
dir: (scope, cwd) => join6(scope === "user" ? copilotUserRoot() : join6(cwd, ".github"), "instructions"),
|
|
1908
1936
|
fileName: (slug) => `${slug}.instructions.md`,
|
|
1909
1937
|
keepsFrontmatter: true
|
|
1910
1938
|
};
|
|
1911
1939
|
var codexTarget = {
|
|
1912
1940
|
kind: "section",
|
|
1913
|
-
file: (scope, cwd) => scope === "user" ? join6(
|
|
1941
|
+
file: (scope, cwd) => scope === "user" ? join6(codexUserRoot(), "AGENTS.md") : join6(cwd, "AGENTS.md")
|
|
1914
1942
|
};
|
|
1915
1943
|
var openCodeTarget = {
|
|
1916
1944
|
kind: "section",
|
|
1917
|
-
file: (scope, cwd) => scope === "user" ? join6(
|
|
1945
|
+
file: (scope, cwd) => scope === "user" ? join6(openCodeUserConfigDir(), "AGENTS.md") : join6(cwd, "AGENTS.md")
|
|
1918
1946
|
};
|
|
1919
1947
|
var TARGETS = {
|
|
1920
1948
|
claude: claudeTarget,
|
|
@@ -2331,7 +2359,17 @@ async function runAdd(name, options, cwd = process.cwd()) {
|
|
|
2331
2359
|
}
|
|
2332
2360
|
if (options.dryRun) {
|
|
2333
2361
|
info("Dry run - no files will be written");
|
|
2334
|
-
|
|
2362
|
+
const planned = await planInstall(handler, item, agents, scope, method, cwd);
|
|
2363
|
+
printPlan("Would write:", planned);
|
|
2364
|
+
const blocked = decideForce(options) ? [] : planned.filter((change) => change.kind === "modify");
|
|
2365
|
+
if (blocked.length > 0) {
|
|
2366
|
+
warn(
|
|
2367
|
+
`${blocked.length} destination(s) already exist and would be refused without --force:`
|
|
2368
|
+
);
|
|
2369
|
+
for (const change of blocked) console.log(chalk9.gray(` ${change.path}`));
|
|
2370
|
+
outro("Dry run complete - the real run would fail without --force");
|
|
2371
|
+
return 1;
|
|
2372
|
+
}
|
|
2335
2373
|
outro("Dry run complete");
|
|
2336
2374
|
return 0;
|
|
2337
2375
|
}
|
|
@@ -2714,7 +2752,7 @@ var initCommand = new Command4("init").description("Initialize coding agent conf
|
|
|
2714
2752
|
// package.json
|
|
2715
2753
|
var package_default = {
|
|
2716
2754
|
name: "@danieldeusing/seedr",
|
|
2717
|
-
version: "0.1.
|
|
2755
|
+
version: "0.1.99",
|
|
2718
2756
|
description: "Seed your projects with AI configurations",
|
|
2719
2757
|
type: "module",
|
|
2720
2758
|
bin: {
|
package/dist/index.js
CHANGED