plexus-agent-config 0.0.2 → 0.0.3
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/bin.js +2 -1
- package/dist/bin.js.map +1 -1
- package/package.json +2 -10
- package/vendor/plexus-agent-config-core/package.json +1 -1
- package/vendor/plexus-agent-config-web/.next/BUILD_ID +1 -1
- package/vendor/plexus-agent-config-web/.next/app-path-routes-manifest.json +10 -10
- package/vendor/plexus-agent-config-web/.next/build-manifest.json +2 -2
- package/vendor/plexus-agent-config-web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/_global-error.html +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/_global-error.rsc +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/about/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/api/debug/route.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/backups/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/debug/page.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/debug/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/mcp/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/mirror/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/rules/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/spread/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app/team/page_client-reference-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/app-paths-manifest.json +10 -10
- package/vendor/plexus-agent-config-web/.next/server/chunks/620.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/middleware-build-manifest.js +1 -1
- package/vendor/plexus-agent-config-web/.next/server/pages/500.html +1 -1
- package/vendor/plexus-agent-config-web/.next/static/chunks/app/{layout-2d0506b46622a8c9.js → layout-c148ba3a96b46ad6.js} +1 -1
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/adapters/base.d.ts +38 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/adapters/base.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/adapters/base.js +125 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/adapters/base.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/adapters/codex.d.ts +9 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/adapters/codex.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/adapters/codex.js +96 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/adapters/codex.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/adapters/index.d.ts +8 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/adapters/index.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/adapters/index.js +12 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/adapters/index.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/adapters/json-mcp.d.ts +25 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/adapters/json-mcp.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/adapters/json-mcp.js +182 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/adapters/json-mcp.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/catalog.d.ts +15 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/catalog.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/catalog.js +153 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/catalog.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/detect.d.ts +14 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/detect.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/detect.js +92 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/detect.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/index.d.ts +5 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/index.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/index.js +5 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/index.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/inspect.d.ts +74 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/inspect.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/inspect.js +169 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/agents/inspect.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/backup/index.d.ts +70 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/backup/index.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/backup/index.js +258 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/backup/index.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/debug/index.d.ts +71 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/debug/index.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/debug/index.js +263 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/debug/index.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/effective/index.d.ts +65 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/effective/index.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/effective/index.js +227 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/effective/index.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/import/from-agents.d.ts +59 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/import/from-agents.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/import/from-agents.js +212 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/import/from-agents.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/import/index.d.ts +26 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/import/index.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/import/index.js +100 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/import/index.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/index.d.ts +12 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/index.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/index.js +12 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/index.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/rules/index.d.ts +6 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/rules/index.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/rules/index.js +292 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/rules/index.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/spread/index.d.ts +38 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/spread/index.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/spread/index.js +190 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/spread/index.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/config.d.ts +5 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/config.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/config.js +62 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/config.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/custom-agents.d.ts +45 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/custom-agents.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/custom-agents.js +103 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/custom-agents.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/fs-utils.d.ts +16 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/fs-utils.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/fs-utils.js +45 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/fs-utils.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/index.d.ts +9 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/index.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/index.js +9 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/index.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/mcp.d.ts +5 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/mcp.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/mcp.js +30 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/mcp.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/merge.d.ts +15 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/merge.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/merge.js +28 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/merge.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/paths.d.ts +22 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/paths.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/paths.js +107 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/paths.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/rules.d.ts +12 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/rules.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/rules.js +32 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/rules.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/scaffolding.d.ts +11 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/scaffolding.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/scaffolding.js +32 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/scaffolding.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/skills.d.ts +13 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/skills.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/skills.js +84 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/skills.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/sync/index.d.ts +89 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/sync/index.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/sync/index.js +423 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/sync/index.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/team/git.d.ts +23 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/team/git.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/team/git.js +132 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/team/git.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/team/index.d.ts +2 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/team/index.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/team/index.js +2 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/team/index.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/types.d.ts +142 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/types.d.ts.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/types.js +13 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/types.js.map +1 -0
- package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/package.json +29 -0
- package/vendor/plexus-agent-config-web/package.json +1 -1
- /package/vendor/plexus-agent-config-web/.next/static/{FKr7yvzxSzNS1oAjTyP1N → cYvZNrsyPRNUjzvxkVMIa}/_buildManifest.js +0 -0
- /package/vendor/plexus-agent-config-web/.next/static/{FKr7yvzxSzNS1oAjTyP1N → cYvZNrsyPRNUjzvxkVMIa}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Custom agents (Lite) — user-defined agents managed only at the
|
|
4
|
+
* "instruction file" (CLAUDE.md / AGENTS.md / etc.) layer. Stored at
|
|
5
|
+
* `<plexus root>/personal/custom-agents.json`.
|
|
6
|
+
*
|
|
7
|
+
* Built-in agents from ALL_AGENTS are NOT stored here; they live in
|
|
8
|
+
* `AGENT_PATHS` and behave as before. Custom agents surface in the
|
|
9
|
+
* dashboard's Agent Catalog and let users view/edit a single declared
|
|
10
|
+
* instruction file path.
|
|
11
|
+
*/
|
|
12
|
+
export declare const CustomAgentSchema: z.ZodObject<{
|
|
13
|
+
id: z.ZodString;
|
|
14
|
+
displayName: z.ZodString;
|
|
15
|
+
/** Absolute path to the agent's instruction file (e.g. ~/.copilot/AGENTS.md). */
|
|
16
|
+
instructionFile: z.ZodString;
|
|
17
|
+
/** Optional free-form note shown in the UI. */
|
|
18
|
+
note: z.ZodOptional<z.ZodString>;
|
|
19
|
+
/** ISO timestamp when this entry was created. */
|
|
20
|
+
createdAt: z.ZodString;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
id: string;
|
|
23
|
+
displayName: string;
|
|
24
|
+
instructionFile: string;
|
|
25
|
+
createdAt: string;
|
|
26
|
+
note?: string | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
id: string;
|
|
29
|
+
displayName: string;
|
|
30
|
+
instructionFile: string;
|
|
31
|
+
createdAt: string;
|
|
32
|
+
note?: string | undefined;
|
|
33
|
+
}>;
|
|
34
|
+
export type CustomAgent = z.infer<typeof CustomAgentSchema>;
|
|
35
|
+
export declare function listCustomAgents(): Promise<CustomAgent[]>;
|
|
36
|
+
export declare function getCustomAgent(id: string): Promise<CustomAgent | undefined>;
|
|
37
|
+
export interface CustomAgentInput {
|
|
38
|
+
id: string;
|
|
39
|
+
displayName: string;
|
|
40
|
+
instructionFile: string;
|
|
41
|
+
note?: string;
|
|
42
|
+
}
|
|
43
|
+
export declare function addCustomAgent(input: CustomAgentInput): Promise<CustomAgent>;
|
|
44
|
+
export declare function removeCustomAgent(id: string): Promise<boolean>;
|
|
45
|
+
//# sourceMappingURL=custom-agents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-agents.d.ts","sourceRoot":"","sources":["../../src/store/custom-agents.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;GASG;AAEH,eAAO,MAAM,iBAAiB;;;IAS5B,iFAAiF;;IAEjF,+CAA+C;;IAE/C,iDAAiD;;;;;;;;;;;;;;EAEjD,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AA+B5D,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAG/D;AAED,wBAAsB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAGjF;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAsB,cAAc,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC,CAuBlF;AAED,wBAAsB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOpE"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { pathExists } from "./fs-utils.js";
|
|
5
|
+
import { ALL_AGENTS, PLEXUS_PATHS } from "./paths.js";
|
|
6
|
+
/**
|
|
7
|
+
* Custom agents (Lite) — user-defined agents managed only at the
|
|
8
|
+
* "instruction file" (CLAUDE.md / AGENTS.md / etc.) layer. Stored at
|
|
9
|
+
* `<plexus root>/personal/custom-agents.json`.
|
|
10
|
+
*
|
|
11
|
+
* Built-in agents from ALL_AGENTS are NOT stored here; they live in
|
|
12
|
+
* `AGENT_PATHS` and behave as before. Custom agents surface in the
|
|
13
|
+
* dashboard's Agent Catalog and let users view/edit a single declared
|
|
14
|
+
* instruction file path.
|
|
15
|
+
*/
|
|
16
|
+
export const CustomAgentSchema = z.object({
|
|
17
|
+
id: z
|
|
18
|
+
.string()
|
|
19
|
+
.min(1)
|
|
20
|
+
.max(64)
|
|
21
|
+
.regex(/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/, {
|
|
22
|
+
message: "id must be lowercase alphanumeric with optional dashes",
|
|
23
|
+
}),
|
|
24
|
+
displayName: z.string().min(1).max(80),
|
|
25
|
+
/** Absolute path to the agent's instruction file (e.g. ~/.copilot/AGENTS.md). */
|
|
26
|
+
instructionFile: z.string().min(1),
|
|
27
|
+
/** Optional free-form note shown in the UI. */
|
|
28
|
+
note: z.string().max(280).optional(),
|
|
29
|
+
/** ISO timestamp when this entry was created. */
|
|
30
|
+
createdAt: z.string(),
|
|
31
|
+
});
|
|
32
|
+
const FileSchema = z.object({
|
|
33
|
+
agents: z.array(CustomAgentSchema),
|
|
34
|
+
});
|
|
35
|
+
const STORE_PATH = path.join(PLEXUS_PATHS.personal, "custom-agents.json");
|
|
36
|
+
const RESERVED_IDS = new Set(ALL_AGENTS);
|
|
37
|
+
async function readRaw() {
|
|
38
|
+
if (!(await pathExists(STORE_PATH)))
|
|
39
|
+
return { agents: [] };
|
|
40
|
+
try {
|
|
41
|
+
const raw = await fs.readFile(STORE_PATH, "utf8");
|
|
42
|
+
const parsed = FileSchema.safeParse(JSON.parse(raw));
|
|
43
|
+
if (!parsed.success) {
|
|
44
|
+
// Don't throw at read time — surface as empty list and let the user
|
|
45
|
+
// re-add. The original file stays on disk, untouched.
|
|
46
|
+
return { agents: [] };
|
|
47
|
+
}
|
|
48
|
+
return parsed.data;
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
return { agents: [] };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
async function writeRaw(file) {
|
|
55
|
+
await fs.mkdir(path.dirname(STORE_PATH), { recursive: true });
|
|
56
|
+
await fs.writeFile(STORE_PATH, `${JSON.stringify(file, null, 2)}\n`, "utf8");
|
|
57
|
+
}
|
|
58
|
+
export async function listCustomAgents() {
|
|
59
|
+
const { agents } = await readRaw();
|
|
60
|
+
return agents;
|
|
61
|
+
}
|
|
62
|
+
export async function getCustomAgent(id) {
|
|
63
|
+
const all = await listCustomAgents();
|
|
64
|
+
return all.find((a) => a.id === id);
|
|
65
|
+
}
|
|
66
|
+
export async function addCustomAgent(input) {
|
|
67
|
+
const next = {
|
|
68
|
+
...input,
|
|
69
|
+
instructionFile: path.resolve(expandTilde(input.instructionFile)),
|
|
70
|
+
createdAt: new Date().toISOString(),
|
|
71
|
+
};
|
|
72
|
+
// Validate via zod.
|
|
73
|
+
const parsed = CustomAgentSchema.safeParse(next);
|
|
74
|
+
if (!parsed.success) {
|
|
75
|
+
throw new Error(`Invalid custom agent: ${parsed.error.errors.map((e) => e.message).join("; ")}`);
|
|
76
|
+
}
|
|
77
|
+
if (RESERVED_IDS.has(parsed.data.id)) {
|
|
78
|
+
throw new Error(`Agent id '${parsed.data.id}' is reserved for a built-in agent.`);
|
|
79
|
+
}
|
|
80
|
+
const file = await readRaw();
|
|
81
|
+
if (file.agents.some((a) => a.id === parsed.data.id)) {
|
|
82
|
+
throw new Error(`Custom agent '${parsed.data.id}' already exists.`);
|
|
83
|
+
}
|
|
84
|
+
file.agents.push(parsed.data);
|
|
85
|
+
await writeRaw(file);
|
|
86
|
+
return parsed.data;
|
|
87
|
+
}
|
|
88
|
+
export async function removeCustomAgent(id) {
|
|
89
|
+
const file = await readRaw();
|
|
90
|
+
const before = file.agents.length;
|
|
91
|
+
file.agents = file.agents.filter((a) => a.id !== id);
|
|
92
|
+
if (file.agents.length === before)
|
|
93
|
+
return false;
|
|
94
|
+
await writeRaw(file);
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
function expandTilde(p) {
|
|
98
|
+
if (p.startsWith("~/") || p === "~") {
|
|
99
|
+
return path.join(process.env.HOME ?? "", p.slice(1));
|
|
100
|
+
}
|
|
101
|
+
return p;
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=custom-agents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-agents.js","sourceRoot":"","sources":["../../src/store/custom-agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEtD;;;;;;;;;GASG;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,EAAE,EAAE,CAAC;SACF,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,EAAE,CAAC;SACP,KAAK,CAAC,mCAAmC,EAAE;QAC1C,OAAO,EAAE,wDAAwD;KAClE,CAAC;IACJ,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IACtC,iFAAiF;IACjF,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAClC,+CAA+C;IAC/C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IACpC,iDAAiD;IACjD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAIH,MAAM,UAAU,GAA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,CAAC,EAAE,CAAC;QACrD,MAAM,IAAI,KAAK,CAAC,iBAAiB,MAAM,CAAC,IAAI,CAAC,EAAE,mBAAmB,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC9B,MAAM,QAAQ,CAAC,IAAI,CAAC,CAAC;IACrB,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,EAAU;IAChD,MAAM,IAAI,GAAG,MAAM,OAAO,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;IAClC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IACrD,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,MAAM;QAAE,OAAO,KAAK,CAAC;IAChD,MAAM,QAAQ,CAAC,IAAI,CAAC,CAAC;IACrB,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,WAAW,CAAC,CAAS;IAC5B,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QACpC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare function ensureDir(dir: string): Promise<void>;
|
|
2
|
+
export declare function pathExists(p: string): Promise<boolean>;
|
|
3
|
+
/**
|
|
4
|
+
* Symlink-safe removal (ADR-003).
|
|
5
|
+
*
|
|
6
|
+
* `fs.rm(p, { recursive: true })` will follow a symlink and recursively delete
|
|
7
|
+
* its target — for Plexus that target is the canonical store under
|
|
8
|
+
* `~/.config/plexus/`, which is catastrophic data loss.
|
|
9
|
+
*
|
|
10
|
+
* This helper always `lstat`s first: if the entry is a symlink, only the
|
|
11
|
+
* link itself is removed; otherwise we recursively delete the real entry.
|
|
12
|
+
*
|
|
13
|
+
* Returns `false` when the path didn't exist (no-op).
|
|
14
|
+
*/
|
|
15
|
+
export declare function safeRemove(p: string): Promise<boolean>;
|
|
16
|
+
//# sourceMappingURL=fs-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs-utils.d.ts","sourceRoot":"","sources":["../../src/store/fs-utils.ts"],"names":[],"mappings":"AAEA,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1D;AAED,wBAAsB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO5D;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAe5D"}
|
package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/fs-utils.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
export async function ensureDir(dir) {
|
|
3
|
+
await fs.mkdir(dir, { recursive: true });
|
|
4
|
+
}
|
|
5
|
+
export async function pathExists(p) {
|
|
6
|
+
try {
|
|
7
|
+
await fs.access(p);
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Symlink-safe removal (ADR-003).
|
|
16
|
+
*
|
|
17
|
+
* `fs.rm(p, { recursive: true })` will follow a symlink and recursively delete
|
|
18
|
+
* its target — for Plexus that target is the canonical store under
|
|
19
|
+
* `~/.config/plexus/`, which is catastrophic data loss.
|
|
20
|
+
*
|
|
21
|
+
* This helper always `lstat`s first: if the entry is a symlink, only the
|
|
22
|
+
* link itself is removed; otherwise we recursively delete the real entry.
|
|
23
|
+
*
|
|
24
|
+
* Returns `false` when the path didn't exist (no-op).
|
|
25
|
+
*/
|
|
26
|
+
export async function safeRemove(p) {
|
|
27
|
+
let lst;
|
|
28
|
+
try {
|
|
29
|
+
lst = await fs.lstat(p);
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
if (lst.isSymbolicLink()) {
|
|
35
|
+
await fs.unlink(p);
|
|
36
|
+
}
|
|
37
|
+
else if (lst.isDirectory()) {
|
|
38
|
+
await fs.rm(p, { recursive: true, force: true });
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
await fs.unlink(p);
|
|
42
|
+
}
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=fs-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs-utils.js","sourceRoot":"","sources":["../../src/store/fs-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAElC,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,GAAW;IACzC,MAAM,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,CAAS;IACxC,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,CAAS;IACxC,IAAI,GAAyC,CAAC;IAC9C,IAAI,CAAC;QACH,GAAG,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,GAAG,CAAC,cAAc,EAAE,EAAE,CAAC;QACzB,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACrB,CAAC;SAAM,IAAI,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC;QAC7B,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACnD,CAAC;SAAM,CAAC;QACN,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./paths.js";
|
|
2
|
+
export * from "./scaffolding.js";
|
|
3
|
+
export * from "./config.js";
|
|
4
|
+
export * from "./mcp.js";
|
|
5
|
+
export * from "./skills.js";
|
|
6
|
+
export * from "./rules.js";
|
|
7
|
+
export * from "./merge.js";
|
|
8
|
+
export * from "./custom-agents.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC"}
|
package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./paths.js";
|
|
2
|
+
export * from "./scaffolding.js";
|
|
3
|
+
export * from "./config.js";
|
|
4
|
+
export * from "./mcp.js";
|
|
5
|
+
export * from "./skills.js";
|
|
6
|
+
export * from "./rules.js";
|
|
7
|
+
export * from "./merge.js";
|
|
8
|
+
export * from "./custom-agents.js";
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC"}
|
package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/mcp.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ConfigLayer, MCPServerDef } from "../types.js";
|
|
2
|
+
export declare function readMCP(layer: ConfigLayer): Promise<MCPServerDef[]>;
|
|
3
|
+
export declare function writeMCP(layer: ConfigLayer, servers: MCPServerDef[]): Promise<void>;
|
|
4
|
+
export declare function readAllMCP(): Promise<MCPServerDef[]>;
|
|
5
|
+
//# sourceMappingURL=mcp.d.ts.map
|
package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/mcp.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/store/mcp.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAS7D,wBAAsB,OAAO,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAQzE;AAED,wBAAsB,QAAQ,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAKzF;AAED,wBAAsB,UAAU,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAG1D"}
|
package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/mcp.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import YAML from "yaml";
|
|
4
|
+
import { pathExists } from "./fs-utils.js";
|
|
5
|
+
import { PLEXUS_PATHS } from "./paths.js";
|
|
6
|
+
import { ensureStoreScaffolding, layerRoot } from "./scaffolding.js";
|
|
7
|
+
function mcpFile(layer) {
|
|
8
|
+
return path.join(layerRoot(layer), PLEXUS_PATHS.mcpDirRel, "servers.yaml");
|
|
9
|
+
}
|
|
10
|
+
export async function readMCP(layer) {
|
|
11
|
+
await ensureStoreScaffolding();
|
|
12
|
+
const file = mcpFile(layer);
|
|
13
|
+
if (!(await pathExists(file)))
|
|
14
|
+
return [];
|
|
15
|
+
const raw = await fs.readFile(file, "utf8");
|
|
16
|
+
const parsed = YAML.parse(raw) ?? {};
|
|
17
|
+
const list = Array.isArray(parsed?.servers) ? parsed.servers : [];
|
|
18
|
+
return list.map((s) => ({ ...s, layer }));
|
|
19
|
+
}
|
|
20
|
+
export async function writeMCP(layer, servers) {
|
|
21
|
+
await ensureStoreScaffolding();
|
|
22
|
+
const stripped = servers.map(({ layer: _l, ...rest }) => rest);
|
|
23
|
+
const payload = { servers: stripped };
|
|
24
|
+
await fs.writeFile(mcpFile(layer), YAML.stringify(payload), "utf8");
|
|
25
|
+
}
|
|
26
|
+
export async function readAllMCP() {
|
|
27
|
+
const [team, personal] = await Promise.all([readMCP("team"), readMCP("personal")]);
|
|
28
|
+
return [...team, ...personal];
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=mcp.js.map
|
package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/mcp.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../src/store/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAErE,SAAS,OAAO,CAAC,KAAkB;IACjC,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;AAC7E,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,KAAkB;IAC9C,MAAM,sBAAsB,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC5B,IAAI,CAAC,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,CAAC;QAAE,OAAO,EAAE,CAAC;IACzC,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC5C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;IACrC,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;IAClE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,CAAmB,CAAC;AACnE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,KAAkB,EAAE,OAAuB;IACxE,MAAM,sBAAsB,EAAE,CAAC;IAC/B,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;IAC/D,MAAM,OAAO,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;IACtC,MAAM,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;AACtE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACnF,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,QAAQ,CAAC,CAAC;AAChC,CAAC"}
|
package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/merge.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MCPServerDef, SkillDef } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Merge personal layer over team layer.
|
|
4
|
+
*
|
|
5
|
+
* Rule: an item with the same `id` in `personal` overrides the team one.
|
|
6
|
+
* Items only in `personal` are added on top.
|
|
7
|
+
* Items only in `team` are kept as-is.
|
|
8
|
+
*
|
|
9
|
+
* MVP semantics: members can ADD on top of team baseline but not REMOVE.
|
|
10
|
+
* That means if a team item exists and personal has no entry with same id,
|
|
11
|
+
* the team item is kept regardless of personal preference.
|
|
12
|
+
*/
|
|
13
|
+
export declare function mergeMCP(team: MCPServerDef[], personal: MCPServerDef[]): MCPServerDef[];
|
|
14
|
+
export declare function mergeSkills(team: SkillDef[], personal: SkillDef[]): SkillDef[];
|
|
15
|
+
//# sourceMappingURL=merge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../src/store/merge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE1D;;;;;;;;;;GAUG;AAEH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CAKvF;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAK9E"}
|
package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/merge.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Merge personal layer over team layer.
|
|
3
|
+
*
|
|
4
|
+
* Rule: an item with the same `id` in `personal` overrides the team one.
|
|
5
|
+
* Items only in `personal` are added on top.
|
|
6
|
+
* Items only in `team` are kept as-is.
|
|
7
|
+
*
|
|
8
|
+
* MVP semantics: members can ADD on top of team baseline but not REMOVE.
|
|
9
|
+
* That means if a team item exists and personal has no entry with same id,
|
|
10
|
+
* the team item is kept regardless of personal preference.
|
|
11
|
+
*/
|
|
12
|
+
export function mergeMCP(team, personal) {
|
|
13
|
+
const byId = new Map();
|
|
14
|
+
for (const t of team)
|
|
15
|
+
byId.set(t.id, t);
|
|
16
|
+
for (const p of personal)
|
|
17
|
+
byId.set(p.id, p);
|
|
18
|
+
return Array.from(byId.values());
|
|
19
|
+
}
|
|
20
|
+
export function mergeSkills(team, personal) {
|
|
21
|
+
const byId = new Map();
|
|
22
|
+
for (const t of team)
|
|
23
|
+
byId.set(t.id, t);
|
|
24
|
+
for (const p of personal)
|
|
25
|
+
byId.set(p.id, p);
|
|
26
|
+
return Array.from(byId.values());
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=merge.js.map
|
package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/merge.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../src/store/merge.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,MAAM,UAAU,QAAQ,CAAC,IAAoB,EAAE,QAAwB;IACrE,MAAM,IAAI,GAAG,IAAI,GAAG,EAAwB,CAAC;IAC7C,KAAK,MAAM,CAAC,IAAI,IAAI;QAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACxC,KAAK,MAAM,CAAC,IAAI,QAAQ;QAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAC5C,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAgB,EAAE,QAAoB;IAChE,MAAM,IAAI,GAAG,IAAI,GAAG,EAAoB,CAAC;IACzC,KAAK,MAAM,CAAC,IAAI,IAAI;QAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACxC,KAAK,MAAM,CAAC,IAAI,QAAQ;QAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAC5C,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;AACnC,CAAC"}
|
package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/paths.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AgentCapabilities, AgentId } from "../types.js";
|
|
2
|
+
/** Where Plexus stores its central source of truth. */
|
|
3
|
+
export declare const PLEXUS_ROOT: string;
|
|
4
|
+
export declare const PLEXUS_PATHS: {
|
|
5
|
+
root: string;
|
|
6
|
+
team: string;
|
|
7
|
+
personal: string;
|
|
8
|
+
config: string;
|
|
9
|
+
mcpDirRel: string;
|
|
10
|
+
skillsDirRel: string;
|
|
11
|
+
/** Plexus-owned canonical generated MCP files, symlinked from agent paths. */
|
|
12
|
+
mcpCache: string;
|
|
13
|
+
/** Timestamped snapshots of agent native configs taken before each sync. */
|
|
14
|
+
backups: string;
|
|
15
|
+
};
|
|
16
|
+
/** Per-agent native config locations. */
|
|
17
|
+
export declare const AGENT_PATHS: Record<AgentId, AgentCapabilities>;
|
|
18
|
+
export declare const AGENT_DISPLAY_NAMES: Record<AgentId, string>;
|
|
19
|
+
/** Root directory we use to "detect" each agent. */
|
|
20
|
+
export declare const AGENT_ROOTS: Record<AgentId, string>;
|
|
21
|
+
export declare const ALL_AGENTS: AgentId[];
|
|
22
|
+
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/store/paths.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAK9D,uDAAuD;AACvD,eAAO,MAAM,WAAW,QAAuC,CAAC;AAEhE,eAAO,MAAM,YAAY;;;;;;;IAOvB,8EAA8E;;IAE9E,4EAA4E;;CAE7E,CAAC;AAEF,yCAAyC;AACzC,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,OAAO,EAAE,iBAAiB,CA6D1D,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAOvD,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAO/C,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,OAAO,EAO/B,CAAC"}
|
package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/paths.js
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import os from "node:os";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
const home = os.homedir();
|
|
4
|
+
const platform = process.platform;
|
|
5
|
+
/** Where Plexus stores its central source of truth. */
|
|
6
|
+
export const PLEXUS_ROOT = path.join(home, ".config", "plexus");
|
|
7
|
+
export const PLEXUS_PATHS = {
|
|
8
|
+
root: PLEXUS_ROOT,
|
|
9
|
+
team: path.join(PLEXUS_ROOT, "team"),
|
|
10
|
+
personal: path.join(PLEXUS_ROOT, "personal"),
|
|
11
|
+
config: path.join(PLEXUS_ROOT, "config.yaml"),
|
|
12
|
+
mcpDirRel: "mcp",
|
|
13
|
+
skillsDirRel: "skills",
|
|
14
|
+
/** Plexus-owned canonical generated MCP files, symlinked from agent paths. */
|
|
15
|
+
mcpCache: path.join(PLEXUS_ROOT, ".cache", "mcp"),
|
|
16
|
+
/** Timestamped snapshots of agent native configs taken before each sync. */
|
|
17
|
+
backups: path.join(PLEXUS_ROOT, "backups"),
|
|
18
|
+
};
|
|
19
|
+
/** Per-agent native config locations. */
|
|
20
|
+
export const AGENT_PATHS = {
|
|
21
|
+
"claude-code": {
|
|
22
|
+
mcp: true,
|
|
23
|
+
skills: true,
|
|
24
|
+
mcpFormat: "json",
|
|
25
|
+
// Claude Code stores user-scope MCPs in `~/.claude.json` (alongside many
|
|
26
|
+
// other client state keys). NOT to be confused with Claude *Desktop*
|
|
27
|
+
// which uses `~/Library/Application Support/Claude/claude_desktop_config.json`.
|
|
28
|
+
mcpPath: path.join(home, ".claude.json"),
|
|
29
|
+
skillsDir: path.join(home, ".claude", "skills"),
|
|
30
|
+
// ~/.claude.json carries auth, history, settings, etc. — never replace
|
|
31
|
+
// the whole file; only rewrite the mcpServers section.
|
|
32
|
+
mcpFileMode: "shared",
|
|
33
|
+
},
|
|
34
|
+
cursor: {
|
|
35
|
+
mcp: true,
|
|
36
|
+
skills: true,
|
|
37
|
+
mcpFormat: "json",
|
|
38
|
+
mcpPath: path.join(home, ".cursor", "mcp.json"),
|
|
39
|
+
// Cursor doesn't have a true "skill" concept yet; we publish to commands.
|
|
40
|
+
skillsDir: path.join(home, ".cursor", "commands"),
|
|
41
|
+
// ~/.cursor/mcp.json is exclusively for MCP — safe to fully own via
|
|
42
|
+
// a symlink to the Plexus canonical cache.
|
|
43
|
+
mcpFileMode: "exclusive",
|
|
44
|
+
},
|
|
45
|
+
codex: {
|
|
46
|
+
mcp: true,
|
|
47
|
+
skills: true,
|
|
48
|
+
mcpFormat: "toml",
|
|
49
|
+
mcpPath: path.join(home, ".codex", "config.toml"),
|
|
50
|
+
skillsDir: path.join(home, ".codex", "skills"),
|
|
51
|
+
// config.toml has [profile], [auth], [mcp_servers], ... — partial-write.
|
|
52
|
+
mcpFileMode: "shared",
|
|
53
|
+
},
|
|
54
|
+
"gemini-cli": {
|
|
55
|
+
mcp: true,
|
|
56
|
+
skills: true,
|
|
57
|
+
mcpFormat: "json",
|
|
58
|
+
mcpPath: path.join(home, ".gemini", "settings.json"),
|
|
59
|
+
skillsDir: path.join(home, ".gemini", "skills"),
|
|
60
|
+
// settings.json also carries model/UI/privacy fields — partial-write.
|
|
61
|
+
mcpFileMode: "shared",
|
|
62
|
+
},
|
|
63
|
+
"qwen-code": {
|
|
64
|
+
mcp: true,
|
|
65
|
+
skills: true,
|
|
66
|
+
mcpFormat: "json",
|
|
67
|
+
mcpPath: path.join(home, ".qwen", "settings.json"),
|
|
68
|
+
skillsDir: path.join(home, ".qwen", "skills"),
|
|
69
|
+
// settings.json also carries model/UI/privacy fields — partial-write.
|
|
70
|
+
mcpFileMode: "shared",
|
|
71
|
+
},
|
|
72
|
+
"factory-droid": {
|
|
73
|
+
mcp: true,
|
|
74
|
+
skills: true,
|
|
75
|
+
mcpFormat: "json",
|
|
76
|
+
mcpPath: path.join(home, ".factory", "mcp.json"),
|
|
77
|
+
skillsDir: path.join(home, ".factory", "skills"),
|
|
78
|
+
// Plexus can fully own this file.
|
|
79
|
+
mcpFileMode: "exclusive",
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
export const AGENT_DISPLAY_NAMES = {
|
|
83
|
+
"claude-code": "Claude Code",
|
|
84
|
+
cursor: "Cursor",
|
|
85
|
+
codex: "Codex",
|
|
86
|
+
"gemini-cli": "Gemini CLI",
|
|
87
|
+
"qwen-code": "Qwen Code",
|
|
88
|
+
"factory-droid": "Factory Droid",
|
|
89
|
+
};
|
|
90
|
+
/** Root directory we use to "detect" each agent. */
|
|
91
|
+
export const AGENT_ROOTS = {
|
|
92
|
+
"claude-code": path.join(home, ".claude"),
|
|
93
|
+
cursor: path.join(home, ".cursor"),
|
|
94
|
+
codex: path.join(home, ".codex"),
|
|
95
|
+
"gemini-cli": path.join(home, ".gemini"),
|
|
96
|
+
"qwen-code": path.join(home, ".qwen"),
|
|
97
|
+
"factory-droid": path.join(home, ".factory"),
|
|
98
|
+
};
|
|
99
|
+
export const ALL_AGENTS = [
|
|
100
|
+
"claude-code",
|
|
101
|
+
"cursor",
|
|
102
|
+
"codex",
|
|
103
|
+
"gemini-cli",
|
|
104
|
+
"qwen-code",
|
|
105
|
+
"factory-droid",
|
|
106
|
+
];
|
|
107
|
+
//# sourceMappingURL=paths.js.map
|
package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/paths.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/store/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;AAC1B,MAAM,QAAQ,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AU,EAAE,QAAQ,CAAC;QAChD,kCAAkC;QAClC,WAAW,EAAE,WAAW;KACzB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAA4B;IAC1D,aAAa,EAAE,aAAa;IAC5B,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,YAAY,EAAE,YAAY;IAC1B,WAAW,EAAE,WAAW;IACxB,eAAe,EAAE,eAAe;CACjC,CAAC;AAEF,oDAAoD;AACpD,MAAM,CAAC,MAAM,WAAW,GAA4B;IAClD,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC;IACzC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC;IAClC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;IAChC,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC;IACxC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC;IACrC,eAAe,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC;CAC7C,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAc;IACnC,aAAa;IACb,QAAQ;IACR,OAAO;IACP,YAAY;IACZ,WAAW;IACX,eAAe;CAChB,CAAC"}
|
package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/rules.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ConfigLayer } from "../types.js";
|
|
2
|
+
export interface RulesDocument {
|
|
3
|
+
layer: ConfigLayer;
|
|
4
|
+
path: string;
|
|
5
|
+
content: string;
|
|
6
|
+
updatedAt: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function rulesFile(layer: ConfigLayer): string;
|
|
9
|
+
export declare function readRules(layer: ConfigLayer): Promise<RulesDocument | null>;
|
|
10
|
+
export declare function readEffectiveRules(): Promise<RulesDocument | null>;
|
|
11
|
+
export declare function writePersonalRules(content: string): Promise<void>;
|
|
12
|
+
//# sourceMappingURL=rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/store/rules.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO/C,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAEpD;AAED,wBAAsB,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAWjF;AAED,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAExE;AAED,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAKvE"}
|
package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/rules.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { ensureDir, pathExists } from "./fs-utils.js";
|
|
4
|
+
import { ensureStoreScaffolding, layerRoot } from "./scaffolding.js";
|
|
5
|
+
const RULES_DIR = "rules";
|
|
6
|
+
const GLOBAL_RULES_FILE = "global.md";
|
|
7
|
+
export function rulesFile(layer) {
|
|
8
|
+
return path.join(layerRoot(layer), RULES_DIR, GLOBAL_RULES_FILE);
|
|
9
|
+
}
|
|
10
|
+
export async function readRules(layer) {
|
|
11
|
+
await ensureStoreScaffolding();
|
|
12
|
+
const file = rulesFile(layer);
|
|
13
|
+
if (!(await pathExists(file)))
|
|
14
|
+
return null;
|
|
15
|
+
const stat = await fs.stat(file);
|
|
16
|
+
return {
|
|
17
|
+
layer,
|
|
18
|
+
path: file,
|
|
19
|
+
content: await fs.readFile(file, "utf8"),
|
|
20
|
+
updatedAt: stat.mtime.toISOString(),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export async function readEffectiveRules() {
|
|
24
|
+
return (await readRules("personal")) ?? (await readRules("team"));
|
|
25
|
+
}
|
|
26
|
+
export async function writePersonalRules(content) {
|
|
27
|
+
await ensureStoreScaffolding();
|
|
28
|
+
const file = rulesFile("personal");
|
|
29
|
+
await ensureDir(path.dirname(file));
|
|
30
|
+
await fs.writeFile(file, content, "utf8");
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=rules.js.map
|
package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/rules.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../src/store/rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAErE,MAAM,SAAS,GAAG,OAAO,CAAC;AAC1B,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAStC,MAAM,UAAU,SAAS,CAAC,KAAkB;IAC1C,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAC;AACnE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,KAAkB;IAChD,MAAM,sBAAsB,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAC9B,IAAI,CAAC,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3C,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO;QACL,KAAK;QACL,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACxC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB;IACtC,OAAO,CAAC,MAAM,SAAS,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,MAAM,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;AACpE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,OAAe;IACtD,MAAM,sBAAsB,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;IACnC,MAAM,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACpC,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ConfigLayer } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Create the on-disk store layout under ~/.config/plexus/ if it doesn't exist
|
|
4
|
+
* yet, and write a default config.yaml on first run.
|
|
5
|
+
*
|
|
6
|
+
* Called by every public read/write API for safety.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ensureStoreScaffolding(): Promise<void>;
|
|
9
|
+
/** Resolve the root directory for a given config layer. */
|
|
10
|
+
export declare function layerRoot(layer: ConfigLayer): string;
|
|
11
|
+
//# sourceMappingURL=scaffolding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaffolding.d.ts","sourceRoot":"","sources":["../../src/store/scaffolding.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,aAAa,CAAC;AAI7D;;;;;GAKG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,CAgB5D;AAED,2DAA2D;AAC3D,wBAAgB,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAEpD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import YAML from "yaml";
|
|
4
|
+
import { ensureDir, pathExists } from "./fs-utils.js";
|
|
5
|
+
import { ALL_AGENTS, PLEXUS_PATHS } from "./paths.js";
|
|
6
|
+
/**
|
|
7
|
+
* Create the on-disk store layout under ~/.config/plexus/ if it doesn't exist
|
|
8
|
+
* yet, and write a default config.yaml on first run.
|
|
9
|
+
*
|
|
10
|
+
* Called by every public read/write API for safety.
|
|
11
|
+
*/
|
|
12
|
+
export async function ensureStoreScaffolding() {
|
|
13
|
+
await ensureDir(PLEXUS_PATHS.root);
|
|
14
|
+
for (const layer of ["team", "personal"]) {
|
|
15
|
+
const base = layer === "team" ? PLEXUS_PATHS.team : PLEXUS_PATHS.personal;
|
|
16
|
+
await ensureDir(path.join(base, PLEXUS_PATHS.mcpDirRel));
|
|
17
|
+
await ensureDir(path.join(base, PLEXUS_PATHS.skillsDirRel));
|
|
18
|
+
await ensureDir(path.join(base, "rules"));
|
|
19
|
+
}
|
|
20
|
+
if (!(await pathExists(PLEXUS_PATHS.config))) {
|
|
21
|
+
const defaults = {
|
|
22
|
+
agents: Object.fromEntries(ALL_AGENTS.map((a) => [a, true])),
|
|
23
|
+
syncStrategy: "symlink",
|
|
24
|
+
};
|
|
25
|
+
await fs.writeFile(PLEXUS_PATHS.config, YAML.stringify(defaults), "utf8");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/** Resolve the root directory for a given config layer. */
|
|
29
|
+
export function layerRoot(layer) {
|
|
30
|
+
return layer === "team" ? PLEXUS_PATHS.team : PLEXUS_PATHS.personal;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=scaffolding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaffolding.js","sourceRoot":"","sources":["../../src/store/scaffolding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB;IAC1C,MAAM,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACnC,KAAK,MAAM,KAAK,IAAI,CAAC,MAAM,EAAE,UAAU,CAAkB,EAAE,CAAC;QAC1D,MAAM,IAAI,GAAG,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC;QAC1E,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;QACzD,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC;QAC5D,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,IAAI,CAAC,CAAC,MAAM,UAAU,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;QAC7C,MAAM,QAAQ,GAAiB;YAC7B,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAA2B;YACtF,YAAY,EAAE,SAAS;SACxB,CAAC;QACF,MAAM,EAAE,CAAC,SAAS,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;IAC5E,CAAC;AACH,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,SAAS,CAAC,KAAkB;IAC1C,OAAO,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC;AACtE,CAAC"}
|
package/vendor/plexus-agent-config-web/node_modules/plexus-agent-config-core/dist/store/skills.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ConfigLayer, SkillDef } from "../types.js";
|
|
2
|
+
export declare function parseSkillMarkdown(raw: string): {
|
|
3
|
+
frontmatter: Record<string, unknown>;
|
|
4
|
+
body: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function serializeSkillMarkdown(skill: SkillDef): string;
|
|
7
|
+
export declare function readSkills(layer: ConfigLayer): Promise<SkillDef[]>;
|
|
8
|
+
export declare function writeSkill(skill: SkillDef): Promise<void>;
|
|
9
|
+
export declare function deleteSkill(layer: ConfigLayer, skillId: string): Promise<void>;
|
|
10
|
+
export declare function readAllSkills(): Promise<SkillDef[]>;
|
|
11
|
+
/** Resolve the on-disk source directory for a single skill (used by sync). */
|
|
12
|
+
export declare function resolveSkillSourceDir(layer: ConfigLayer, skillId: string): string;
|
|
13
|
+
//# sourceMappingURL=skills.d.ts.map
|