@bastani/atomic 0.8.1-1 → 0.8.2-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/CHANGELOG.md +13 -0
- package/dist/builtin/intercom/config.ts +3 -4
- package/dist/builtin/intercom/index.ts +6 -6
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/agent-dir.ts +11 -2
- package/dist/builtin/mcp/cli.js +12 -6
- package/dist/builtin/mcp/config.ts +31 -22
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/agents/agents.ts +63 -23
- package/dist/builtin/subagents/src/agents/skills.ts +21 -21
- package/dist/builtin/subagents/src/extension/index.ts +9 -8
- package/dist/builtin/subagents/src/runs/shared/run-history.ts +13 -10
- package/dist/builtin/subagents/src/runs/shared/subagent-prompt-runtime.ts +3 -3
- package/dist/builtin/subagents/src/shared/artifacts.ts +18 -17
- package/dist/builtin/subagents/src/shared/types.ts +4 -4
- package/dist/builtin/web-access/config-paths.ts +11 -0
- package/dist/builtin/web-access/exa.ts +3 -2
- package/dist/builtin/web-access/gemini-api.ts +2 -1
- package/dist/builtin/web-access/gemini-search.ts +2 -1
- package/dist/builtin/web-access/gemini-web-config.ts +2 -1
- package/dist/builtin/web-access/github-extract.ts +2 -1
- package/dist/builtin/web-access/index.ts +11 -8
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/web-access/perplexity.ts +2 -1
- package/dist/builtin/web-access/video-extract.ts +2 -1
- package/dist/builtin/web-access/youtube-extract.ts +2 -1
- package/dist/builtin/workflows/builtin/deep-research-codebase.ts +4 -0
- package/dist/builtin/workflows/builtin/open-claude-design.ts +39 -22
- package/dist/builtin/workflows/builtin/ralph.ts +7 -0
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/skills/workflow/SKILL.md +28 -20
- package/dist/builtin/workflows/skills/workflow/references/design-checklist.md +8 -4
- package/dist/builtin/workflows/skills/workflow/references/running-workflows.md +52 -23
- package/dist/builtin/workflows/skills/workflow/references/sdk-authoring.md +41 -12
- package/dist/builtin/workflows/src/extension/config-loader.ts +13 -14
- package/dist/builtin/workflows/src/extension/discovery.ts +4 -6
- package/dist/builtin/workflows/src/extension/index.ts +675 -524
- package/dist/builtin/workflows/src/extension/runtime.ts +40 -16
- package/dist/builtin/workflows/src/extension/wiring.ts +3 -0
- package/dist/builtin/workflows/src/extension/workflow-schema.ts +43 -33
- package/dist/builtin/workflows/src/runs/foreground/executor.ts +34 -10
- package/dist/builtin/workflows/src/shared/types.ts +1 -5
- package/dist/builtin/workflows/src/tui/graph-view.ts +245 -75
- package/dist/builtin/workflows/src/tui/overlay-adapter.ts +23 -0
- package/dist/builtin/workflows/src/tui/stage-chat-view.ts +259 -149
- package/dist/builtin/workflows/src/tui/status-helpers.ts +3 -3
- package/dist/builtin/workflows/src/tui/store-widget-installer.ts +99 -10
- package/dist/builtin/workflows/src/tui/switcher.ts +4 -5
- package/dist/builtin/workflows/src/tui/workflow-attach-pane.ts +29 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +11 -8
- package/dist/cli/args.js.map +1 -1
- package/dist/config.d.ts +21 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +59 -4
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session.d.ts +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +2 -2
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts +3 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +31 -8
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +9 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +11 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/model-registry.d.ts +3 -2
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +25 -8
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/package-manager.d.ts +3 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +97 -58
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/resource-loader.d.ts +1 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +37 -36
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts +5 -4
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +2 -2
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager.d.ts +7 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +29 -8
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/system-prompt.d.ts +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/telemetry.d.ts.map +1 -1
- package/dist/core/telemetry.js +2 -2
- package/dist/core/telemetry.js.map +1 -1
- package/dist/core/timings.d.ts.map +1 -1
- package/dist/core/timings.js +2 -2
- package/dist/core/timings.js.map +1 -1
- package/dist/core/tools/index.d.ts +1 -0
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +8 -0
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/todos.d.ts.map +1 -1
- package/dist/core/tools/todos.js +3 -3
- package/dist/core/tools/todos.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +6 -6
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/atomic-banner.d.ts +4 -0
- package/dist/modes/interactive/components/atomic-banner.d.ts.map +1 -0
- package/dist/modes/interactive/components/atomic-banner.js +34 -0
- package/dist/modes/interactive/components/atomic-banner.js.map +1 -0
- package/dist/modes/interactive/components/chat-message-renderer.d.ts +99 -0
- package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -0
- package/dist/modes/interactive/components/chat-message-renderer.js +450 -0
- package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -0
- package/dist/modes/interactive/components/chat-transcript.d.ts +69 -0
- package/dist/modes/interactive/components/chat-transcript.d.ts.map +1 -0
- package/dist/modes/interactive/components/chat-transcript.js +183 -0
- package/dist/modes/interactive/components/chat-transcript.js.map +1 -0
- package/dist/modes/interactive/components/footer.d.ts +16 -4
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +110 -137
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +2 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +2 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +9 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +192 -137
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/catppuccin-mocha.json +5 -5
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +11 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +2 -2
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +2 -2
- package/dist/utils/version-check.js.map +1 -1
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@ import { basename, dirname, join, relative, resolve, sep } from "node:path";
|
|
|
25
25
|
import { globSync } from "glob";
|
|
26
26
|
import ignore from "ignore";
|
|
27
27
|
import { minimatch } from "minimatch";
|
|
28
|
-
import { CONFIG_DIR_NAME, ENV_OFFLINE } from "../config.js";
|
|
28
|
+
import { CONFIG_DIR_NAME, ENV_OFFLINE, getAgentDir, getAgentDirs, getEnvValue, getProjectConfigDirs } from "../config.js";
|
|
29
29
|
import { shouldUseWindowsShell } from "../utils/child-process.js";
|
|
30
30
|
import { parseGitUrl } from "../utils/git.js";
|
|
31
31
|
import { canonicalizePath, isLocalPath } from "../utils/paths.js";
|
|
@@ -34,7 +34,7 @@ const NETWORK_TIMEOUT_MS = 10000;
|
|
|
34
34
|
const UPDATE_CHECK_CONCURRENCY = 4;
|
|
35
35
|
const GIT_UPDATE_CONCURRENCY = 4;
|
|
36
36
|
function isOfflineModeEnabled() {
|
|
37
|
-
const value =
|
|
37
|
+
const value = getEnvValue(ENV_OFFLINE);
|
|
38
38
|
if (!value)
|
|
39
39
|
return false;
|
|
40
40
|
return value === "1" || value.toLowerCase() === "true" || value.toLowerCase() === "yes";
|
|
@@ -617,17 +617,48 @@ export class DefaultPackageManager {
|
|
|
617
617
|
getInstalledPath(source, scope) {
|
|
618
618
|
const parsed = this.parseSource(source);
|
|
619
619
|
if (parsed.type === "npm") {
|
|
620
|
-
|
|
621
|
-
return existsSync(path) ? path : undefined;
|
|
620
|
+
return this.getExistingNpmInstallPath(parsed, scope);
|
|
622
621
|
}
|
|
623
622
|
if (parsed.type === "git") {
|
|
624
|
-
|
|
625
|
-
return existsSync(path) ? path : undefined;
|
|
623
|
+
return this.getExistingGitInstallPath(parsed, scope);
|
|
626
624
|
}
|
|
627
625
|
if (parsed.type === "local") {
|
|
628
|
-
const baseDir
|
|
629
|
-
|
|
630
|
-
|
|
626
|
+
for (const baseDir of this.getBaseDirsForScope(scope)) {
|
|
627
|
+
const path = this.resolvePathFromBase(parsed.path, baseDir);
|
|
628
|
+
if (existsSync(path))
|
|
629
|
+
return path;
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
return undefined;
|
|
633
|
+
}
|
|
634
|
+
getExistingNpmInstallPath(source, scope) {
|
|
635
|
+
const candidates = [this.getNpmInstallPath(source, scope)];
|
|
636
|
+
if (scope === "project") {
|
|
637
|
+
for (const configDir of getProjectConfigDirs(this.cwd)) {
|
|
638
|
+
candidates.push(join(configDir, "npm", "node_modules", source.name));
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
for (const candidate of Array.from(new Set(candidates))) {
|
|
642
|
+
if (existsSync(candidate))
|
|
643
|
+
return candidate;
|
|
644
|
+
}
|
|
645
|
+
return undefined;
|
|
646
|
+
}
|
|
647
|
+
getExistingGitInstallPath(source, scope) {
|
|
648
|
+
const candidates = [this.getGitInstallPath(source, scope)];
|
|
649
|
+
if (scope === "project") {
|
|
650
|
+
for (const configDir of getProjectConfigDirs(this.cwd)) {
|
|
651
|
+
candidates.push(join(configDir, "git", source.host, source.path));
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
else if (scope === "user") {
|
|
655
|
+
for (const agentDir of this.getBaseDirsForScope("user")) {
|
|
656
|
+
candidates.push(join(agentDir, "git", source.host, source.path));
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
for (const candidate of Array.from(new Set(candidates))) {
|
|
660
|
+
if (existsSync(candidate))
|
|
661
|
+
return candidate;
|
|
631
662
|
}
|
|
632
663
|
return undefined;
|
|
633
664
|
}
|
|
@@ -663,20 +694,28 @@ export class DefaultPackageManager {
|
|
|
663
694
|
await this.resolvePackageSources(packageSources, accumulator, onMissing);
|
|
664
695
|
const globalBaseDir = this.agentDir;
|
|
665
696
|
const projectBaseDir = join(this.cwd, CONFIG_DIR_NAME);
|
|
697
|
+
const globalBaseDirs = this.getBaseDirsForScope("user");
|
|
698
|
+
const projectBaseDirs = this.getBaseDirsForScope("project");
|
|
666
699
|
for (const resourceType of RESOURCE_TYPES) {
|
|
667
700
|
const target = this.getTargetMap(accumulator, resourceType);
|
|
668
701
|
const globalEntries = (globalSettings[resourceType] ?? []);
|
|
669
702
|
const projectEntries = (projectSettings[resourceType] ?? []);
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
703
|
+
for (const baseDir of projectBaseDirs) {
|
|
704
|
+
this.resolveLocalEntries(projectEntries, resourceType, target, {
|
|
705
|
+
source: "local",
|
|
706
|
+
scope: "project",
|
|
707
|
+
origin: "top-level",
|
|
708
|
+
baseDir,
|
|
709
|
+
}, baseDir);
|
|
710
|
+
}
|
|
711
|
+
for (const baseDir of globalBaseDirs) {
|
|
712
|
+
this.resolveLocalEntries(globalEntries, resourceType, target, {
|
|
713
|
+
source: "local",
|
|
714
|
+
scope: "user",
|
|
715
|
+
origin: "top-level",
|
|
716
|
+
baseDir,
|
|
717
|
+
}, baseDir);
|
|
718
|
+
}
|
|
680
719
|
}
|
|
681
720
|
this.addAutoDiscoveredResources(accumulator, globalSettings, projectSettings, globalBaseDir, projectBaseDir);
|
|
682
721
|
return this.toResolvedPaths(accumulator);
|
|
@@ -839,8 +878,8 @@ export class DefaultPackageManager {
|
|
|
839
878
|
await Promise.all(tasks);
|
|
840
879
|
}
|
|
841
880
|
async shouldUpdateNpmSource(source, scope) {
|
|
842
|
-
const installedPath = this.
|
|
843
|
-
const installedVersion =
|
|
881
|
+
const installedPath = this.getExistingNpmInstallPath(source, scope);
|
|
882
|
+
const installedVersion = installedPath ? this.getInstalledNpmVersion(installedPath) : undefined;
|
|
844
883
|
if (!installedVersion) {
|
|
845
884
|
return true;
|
|
846
885
|
}
|
|
@@ -896,8 +935,8 @@ export class DefaultPackageManager {
|
|
|
896
935
|
return undefined;
|
|
897
936
|
}
|
|
898
937
|
if (parsed.type === "npm") {
|
|
899
|
-
const installedPath = this.
|
|
900
|
-
if (!
|
|
938
|
+
const installedPath = this.getExistingNpmInstallPath(parsed, entry.scope);
|
|
939
|
+
if (!installedPath) {
|
|
901
940
|
return undefined;
|
|
902
941
|
}
|
|
903
942
|
const hasUpdate = await this.npmHasAvailableUpdate(parsed, installedPath);
|
|
@@ -911,8 +950,8 @@ export class DefaultPackageManager {
|
|
|
911
950
|
scope: entry.scope,
|
|
912
951
|
};
|
|
913
952
|
}
|
|
914
|
-
const installedPath = this.
|
|
915
|
-
if (!
|
|
953
|
+
const installedPath = this.getExistingGitInstallPath(parsed, entry.scope);
|
|
954
|
+
if (!installedPath) {
|
|
916
955
|
return undefined;
|
|
917
956
|
}
|
|
918
957
|
const hasUpdate = await this.gitHasAvailableUpdate(installedPath);
|
|
@@ -936,8 +975,9 @@ export class DefaultPackageManager {
|
|
|
936
975
|
const parsed = this.parseSource(sourceStr);
|
|
937
976
|
const metadata = { source: sourceStr, scope, origin: "package" };
|
|
938
977
|
if (parsed.type === "local") {
|
|
939
|
-
const baseDir
|
|
940
|
-
|
|
978
|
+
for (const baseDir of this.getBaseDirsForScope(scope)) {
|
|
979
|
+
this.resolveLocalExtensionSource(parsed, accumulator, filter, { ...metadata, baseDir }, baseDir);
|
|
980
|
+
}
|
|
941
981
|
continue;
|
|
942
982
|
}
|
|
943
983
|
const installMissing = async () => {
|
|
@@ -957,20 +997,24 @@ export class DefaultPackageManager {
|
|
|
957
997
|
return true;
|
|
958
998
|
};
|
|
959
999
|
if (parsed.type === "npm") {
|
|
960
|
-
|
|
961
|
-
const needsInstall = !
|
|
1000
|
+
let installedPath = this.getExistingNpmInstallPath(parsed, scope);
|
|
1001
|
+
const needsInstall = !installedPath ||
|
|
962
1002
|
(parsed.pinned && !(await this.installedNpmMatchesPinnedVersion(parsed, installedPath)));
|
|
1003
|
+
if (needsInstall)
|
|
1004
|
+
installedPath = this.getNpmInstallPath(parsed, scope);
|
|
963
1005
|
if (needsInstall) {
|
|
964
1006
|
const installed = await installMissing();
|
|
965
1007
|
if (!installed)
|
|
966
1008
|
continue;
|
|
967
1009
|
}
|
|
1010
|
+
if (!installedPath)
|
|
1011
|
+
continue;
|
|
968
1012
|
metadata.baseDir = installedPath;
|
|
969
1013
|
this.collectPackageResources(installedPath, accumulator, filter, metadata);
|
|
970
1014
|
continue;
|
|
971
1015
|
}
|
|
972
1016
|
if (parsed.type === "git") {
|
|
973
|
-
|
|
1017
|
+
let installedPath = this.getExistingGitInstallPath(parsed, scope) ?? this.getGitInstallPath(parsed, scope);
|
|
974
1018
|
if (!existsSync(installedPath)) {
|
|
975
1019
|
const installed = await installMissing();
|
|
976
1020
|
if (!installed)
|
|
@@ -1413,7 +1457,7 @@ export class DefaultPackageManager {
|
|
|
1413
1457
|
}
|
|
1414
1458
|
}
|
|
1415
1459
|
async updateGit(source, scope) {
|
|
1416
|
-
const targetDir = this.getGitInstallPath(source, scope);
|
|
1460
|
+
const targetDir = this.getExistingGitInstallPath(source, scope) ?? this.getGitInstallPath(source, scope);
|
|
1417
1461
|
if (!existsSync(targetDir)) {
|
|
1418
1462
|
await this.installGit(source, scope);
|
|
1419
1463
|
return;
|
|
@@ -1564,13 +1608,16 @@ export class DefaultPackageManager {
|
|
|
1564
1608
|
return join(tmpdir(), "pi-extensions", prefix, hash, suffix ?? "");
|
|
1565
1609
|
}
|
|
1566
1610
|
getBaseDirForScope(scope) {
|
|
1611
|
+
return this.getBaseDirsForScope(scope)[0];
|
|
1612
|
+
}
|
|
1613
|
+
getBaseDirsForScope(scope) {
|
|
1567
1614
|
if (scope === "project") {
|
|
1568
|
-
return
|
|
1615
|
+
return getProjectConfigDirs(this.cwd);
|
|
1569
1616
|
}
|
|
1570
1617
|
if (scope === "user") {
|
|
1571
|
-
return this.agentDir;
|
|
1618
|
+
return this.agentDir === getAgentDir() ? getAgentDirs() : [this.agentDir];
|
|
1572
1619
|
}
|
|
1573
|
-
return this.cwd;
|
|
1620
|
+
return [this.cwd];
|
|
1574
1621
|
}
|
|
1575
1622
|
resolvePath(input) {
|
|
1576
1623
|
const trimmed = input.trim();
|
|
@@ -1761,18 +1808,8 @@ export class DefaultPackageManager {
|
|
|
1761
1808
|
prompts: (projectSettings.prompts ?? []),
|
|
1762
1809
|
themes: (projectSettings.themes ?? []),
|
|
1763
1810
|
};
|
|
1764
|
-
const
|
|
1765
|
-
|
|
1766
|
-
skills: join(globalBaseDir, "skills"),
|
|
1767
|
-
prompts: join(globalBaseDir, "prompts"),
|
|
1768
|
-
themes: join(globalBaseDir, "themes"),
|
|
1769
|
-
};
|
|
1770
|
-
const projectDirs = {
|
|
1771
|
-
extensions: join(projectBaseDir, "extensions"),
|
|
1772
|
-
skills: join(projectBaseDir, "skills"),
|
|
1773
|
-
prompts: join(projectBaseDir, "prompts"),
|
|
1774
|
-
themes: join(projectBaseDir, "themes"),
|
|
1775
|
-
};
|
|
1811
|
+
const userConfigDirs = this.getBaseDirsForScope("user");
|
|
1812
|
+
const projectConfigDirs = this.getBaseDirsForScope("project");
|
|
1776
1813
|
const userAgentsSkillsDir = join(getHomeDir(), ".agents", "skills");
|
|
1777
1814
|
const projectAgentsSkillDirs = collectAncestorAgentsSkillDirs(this.cwd).filter((dir) => resolve(dir) !== resolve(userAgentsSkillsDir));
|
|
1778
1815
|
const addResources = (resourceType, paths, metadata, overrides, baseDir) => {
|
|
@@ -1782,10 +1819,13 @@ export class DefaultPackageManager {
|
|
|
1782
1819
|
this.addResource(target, path, metadata, enabled);
|
|
1783
1820
|
}
|
|
1784
1821
|
};
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1822
|
+
for (const configDir of projectConfigDirs) {
|
|
1823
|
+
const metadata = { ...projectMetadata, baseDir: configDir };
|
|
1824
|
+
addResources("extensions", collectAutoExtensionEntries(join(configDir, "extensions")), metadata, projectOverrides.extensions, configDir);
|
|
1825
|
+
addResources("skills", collectAutoSkillEntries(join(configDir, "skills"), "pi"), metadata, projectOverrides.skills, configDir);
|
|
1826
|
+
addResources("prompts", collectAutoPromptEntries(join(configDir, "prompts")), metadata, projectOverrides.prompts, configDir);
|
|
1827
|
+
addResources("themes", collectAutoThemeEntries(join(configDir, "themes")), metadata, projectOverrides.themes, configDir);
|
|
1828
|
+
}
|
|
1789
1829
|
// Project skills from .agents/ (each with its own baseDir)
|
|
1790
1830
|
for (const agentsSkillsDir of projectAgentsSkillDirs) {
|
|
1791
1831
|
const agentsBaseDir = dirname(agentsSkillsDir); // the .agents directory
|
|
@@ -1795,12 +1835,13 @@ export class DefaultPackageManager {
|
|
|
1795
1835
|
};
|
|
1796
1836
|
addResources("skills", collectAutoSkillEntries(agentsSkillsDir, "agents"), agentsMetadata, projectOverrides.skills, agentsBaseDir);
|
|
1797
1837
|
}
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1838
|
+
for (const configDir of userConfigDirs) {
|
|
1839
|
+
const metadata = { ...userMetadata, baseDir: configDir };
|
|
1840
|
+
addResources("extensions", collectAutoExtensionEntries(join(configDir, "extensions")), metadata, userOverrides.extensions, configDir);
|
|
1841
|
+
addResources("skills", collectAutoSkillEntries(join(configDir, "skills"), "pi"), metadata, userOverrides.skills, configDir);
|
|
1842
|
+
addResources("prompts", collectAutoPromptEntries(join(configDir, "prompts")), metadata, userOverrides.prompts, configDir);
|
|
1843
|
+
addResources("themes", collectAutoThemeEntries(join(configDir, "themes")), metadata, userOverrides.themes, configDir);
|
|
1844
|
+
}
|
|
1804
1845
|
// User skills from ~/.agents/ (with its own baseDir)
|
|
1805
1846
|
const userAgentsBaseDir = dirname(userAgentsSkillsDir);
|
|
1806
1847
|
const userAgentsMetadata = {
|
|
@@ -1808,8 +1849,6 @@ export class DefaultPackageManager {
|
|
|
1808
1849
|
baseDir: userAgentsBaseDir,
|
|
1809
1850
|
};
|
|
1810
1851
|
addResources("skills", collectAutoSkillEntries(userAgentsSkillsDir, "agents"), userAgentsMetadata, userOverrides.skills, userAgentsBaseDir);
|
|
1811
|
-
addResources("prompts", collectAutoPromptEntries(userDirs.prompts), userMetadata, userOverrides.prompts, globalBaseDir);
|
|
1812
|
-
addResources("themes", collectAutoThemeEntries(userDirs.themes), userMetadata, userOverrides.themes, globalBaseDir);
|
|
1813
1852
|
}
|
|
1814
1853
|
collectFilesFromPaths(paths, resourceType) {
|
|
1815
1854
|
const files = [];
|