@agent-native/core 0.51.15 → 0.53.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 -96
- package/blueprints/action/crud.md +98 -0
- package/blueprints/channel/discord.md +74 -0
- package/blueprints/provider/stripe.md +87 -0
- package/blueprints/sandbox/docker.md +78 -0
- package/dist/action.d.ts +24 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +4 -0
- package/dist/action.js.map +1 -1
- package/dist/agent/observational-memory/compactor.d.ts +43 -0
- package/dist/agent/observational-memory/compactor.d.ts.map +1 -0
- package/dist/agent/observational-memory/compactor.js +50 -0
- package/dist/agent/observational-memory/compactor.js.map +1 -0
- package/dist/agent/observational-memory/config.d.ts +37 -0
- package/dist/agent/observational-memory/config.d.ts.map +1 -0
- package/dist/agent/observational-memory/config.js +48 -0
- package/dist/agent/observational-memory/config.js.map +1 -0
- package/dist/agent/observational-memory/index.d.ts +26 -0
- package/dist/agent/observational-memory/index.d.ts.map +1 -0
- package/dist/agent/observational-memory/index.js +25 -0
- package/dist/agent/observational-memory/index.js.map +1 -0
- package/dist/agent/observational-memory/internal-run.d.ts +37 -0
- package/dist/agent/observational-memory/internal-run.d.ts.map +1 -0
- package/dist/agent/observational-memory/internal-run.js +59 -0
- package/dist/agent/observational-memory/internal-run.js.map +1 -0
- package/dist/agent/observational-memory/message-text.d.ts +13 -0
- package/dist/agent/observational-memory/message-text.d.ts.map +1 -0
- package/dist/agent/observational-memory/message-text.js +46 -0
- package/dist/agent/observational-memory/message-text.js.map +1 -0
- package/dist/agent/observational-memory/migrations.d.ts +13 -0
- package/dist/agent/observational-memory/migrations.d.ts.map +1 -0
- package/dist/agent/observational-memory/migrations.js +43 -0
- package/dist/agent/observational-memory/migrations.js.map +1 -0
- package/dist/agent/observational-memory/observer.d.ts +37 -0
- package/dist/agent/observational-memory/observer.d.ts.map +1 -0
- package/dist/agent/observational-memory/observer.js +82 -0
- package/dist/agent/observational-memory/observer.js.map +1 -0
- package/dist/agent/observational-memory/plugin.d.ts +16 -0
- package/dist/agent/observational-memory/plugin.d.ts.map +1 -0
- package/dist/agent/observational-memory/plugin.js +26 -0
- package/dist/agent/observational-memory/plugin.js.map +1 -0
- package/dist/agent/observational-memory/prompts.d.ts +27 -0
- package/dist/agent/observational-memory/prompts.d.ts.map +1 -0
- package/dist/agent/observational-memory/prompts.js +42 -0
- package/dist/agent/observational-memory/prompts.js.map +1 -0
- package/dist/agent/observational-memory/read.d.ts +47 -0
- package/dist/agent/observational-memory/read.d.ts.map +1 -0
- package/dist/agent/observational-memory/read.js +99 -0
- package/dist/agent/observational-memory/read.js.map +1 -0
- package/dist/agent/observational-memory/reflector.d.ts +31 -0
- package/dist/agent/observational-memory/reflector.d.ts.map +1 -0
- package/dist/agent/observational-memory/reflector.js +76 -0
- package/dist/agent/observational-memory/reflector.js.map +1 -0
- package/dist/agent/observational-memory/schema.d.ts +267 -0
- package/dist/agent/observational-memory/schema.d.ts.map +1 -0
- package/dist/agent/observational-memory/schema.js +48 -0
- package/dist/agent/observational-memory/schema.js.map +1 -0
- package/dist/agent/observational-memory/store.d.ts +52 -0
- package/dist/agent/observational-memory/store.d.ts.map +1 -0
- package/dist/agent/observational-memory/store.js +197 -0
- package/dist/agent/observational-memory/store.js.map +1 -0
- package/dist/agent/observational-memory/types.d.ts +61 -0
- package/dist/agent/observational-memory/types.d.ts.map +1 -0
- package/dist/agent/observational-memory/types.js +9 -0
- package/dist/agent/observational-memory/types.js.map +1 -0
- package/dist/agent/production-agent.d.ts +15 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +240 -1
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
- package/dist/agent/run-loop-with-resume.js +49 -0
- package/dist/agent/run-loop-with-resume.js.map +1 -1
- package/dist/agent/run-store.d.ts +17 -0
- package/dist/agent/run-store.d.ts.map +1 -1
- package/dist/agent/run-store.js +55 -0
- package/dist/agent/run-store.js.map +1 -1
- package/dist/agent/runtime-context.d.ts +30 -0
- package/dist/agent/runtime-context.d.ts.map +1 -1
- package/dist/agent/runtime-context.js +54 -1
- package/dist/agent/runtime-context.js.map +1 -1
- package/dist/agent/tool-call-journal.d.ts +101 -0
- package/dist/agent/tool-call-journal.d.ts.map +1 -0
- package/dist/agent/tool-call-journal.js +214 -0
- package/dist/agent/tool-call-journal.js.map +1 -0
- package/dist/agent/types.d.ts +24 -0
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/cli/add.d.ts +109 -0
- package/dist/cli/add.d.ts.map +1 -0
- package/dist/cli/add.js +352 -0
- package/dist/cli/add.js.map +1 -0
- package/dist/cli/connect.d.ts +5 -4
- package/dist/cli/connect.d.ts.map +1 -1
- package/dist/cli/connect.js +157 -48
- package/dist/cli/connect.js.map +1 -1
- package/dist/cli/eval.d.ts +17 -0
- package/dist/cli/eval.d.ts.map +1 -0
- package/dist/cli/eval.js +121 -0
- package/dist/cli/eval.js.map +1 -0
- package/dist/cli/index.js +44 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/mcp-config-writers.d.ts +20 -13
- package/dist/cli/mcp-config-writers.d.ts.map +1 -1
- package/dist/cli/mcp-config-writers.js +152 -13
- package/dist/cli/mcp-config-writers.js.map +1 -1
- package/dist/cli/mcp.d.ts +2 -2
- package/dist/cli/mcp.d.ts.map +1 -1
- package/dist/cli/mcp.js +50 -196
- package/dist/cli/mcp.js.map +1 -1
- package/dist/cli/plan-local.d.ts +69 -6
- package/dist/cli/plan-local.d.ts.map +1 -1
- package/dist/cli/plan-local.js +517 -23
- package/dist/cli/plan-local.js.map +1 -1
- package/dist/cli/recap.d.ts.map +1 -1
- package/dist/cli/recap.js +1 -1
- package/dist/cli/recap.js.map +1 -1
- package/dist/cli/skills.d.ts +13 -6
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +287 -111
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +118 -92
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +16 -0
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/agent-engine-key.d.ts +6 -4
- package/dist/client/agent-engine-key.d.ts.map +1 -1
- package/dist/client/agent-engine-key.js +9 -6
- package/dist/client/agent-engine-key.js.map +1 -1
- package/dist/client/chat/run-recovery.js +1 -1
- package/dist/client/chat/run-recovery.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts +20 -1
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +32 -7
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +7 -14
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts +13 -0
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +21 -0
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/coding-tools/run-code.d.ts +7 -0
- package/dist/coding-tools/run-code.d.ts.map +1 -1
- package/dist/coding-tools/run-code.js +21 -106
- package/dist/coding-tools/run-code.js.map +1 -1
- package/dist/coding-tools/sandbox/adapter.d.ts +79 -0
- package/dist/coding-tools/sandbox/adapter.d.ts.map +1 -0
- package/dist/coding-tools/sandbox/adapter.js +24 -0
- package/dist/coding-tools/sandbox/adapter.js.map +1 -0
- package/dist/coding-tools/sandbox/index.d.ts +51 -0
- package/dist/coding-tools/sandbox/index.d.ts.map +1 -0
- package/dist/coding-tools/sandbox/index.js +79 -0
- package/dist/coding-tools/sandbox/index.js.map +1 -0
- package/dist/coding-tools/sandbox/local-child-process-adapter.d.ts +24 -0
- package/dist/coding-tools/sandbox/local-child-process-adapter.d.ts.map +1 -0
- package/dist/coding-tools/sandbox/local-child-process-adapter.js +141 -0
- package/dist/coding-tools/sandbox/local-child-process-adapter.js.map +1 -0
- package/dist/db/client.d.ts +4 -2
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +6 -4
- package/dist/db/client.js.map +1 -1
- package/dist/deploy/route-discovery.d.ts.map +1 -1
- package/dist/deploy/route-discovery.js +1 -0
- package/dist/deploy/route-discovery.js.map +1 -1
- package/dist/eval/agent-runner.d.ts +63 -0
- package/dist/eval/agent-runner.d.ts.map +1 -0
- package/dist/eval/agent-runner.js +142 -0
- package/dist/eval/agent-runner.js.map +1 -0
- package/dist/eval/define-eval.d.ts +29 -0
- package/dist/eval/define-eval.d.ts.map +1 -0
- package/dist/eval/define-eval.js +43 -0
- package/dist/eval/define-eval.js.map +1 -0
- package/dist/eval/index.d.ts +18 -0
- package/dist/eval/index.d.ts.map +1 -0
- package/dist/eval/index.js +17 -0
- package/dist/eval/index.js.map +1 -0
- package/dist/eval/report.d.ts +8 -0
- package/dist/eval/report.d.ts.map +1 -0
- package/dist/eval/report.js +44 -0
- package/dist/eval/report.js.map +1 -0
- package/dist/eval/runner.d.ts +67 -0
- package/dist/eval/runner.d.ts.map +1 -0
- package/dist/eval/runner.js +256 -0
- package/dist/eval/runner.js.map +1 -0
- package/dist/eval/scorer.d.ts +83 -0
- package/dist/eval/scorer.d.ts.map +1 -0
- package/dist/eval/scorer.js +195 -0
- package/dist/eval/scorer.js.map +1 -0
- package/dist/eval/types.d.ts +162 -0
- package/dist/eval/types.d.ts.map +1 -0
- package/dist/eval/types.js +20 -0
- package/dist/eval/types.js.map +1 -0
- package/dist/observability/traces.d.ts.map +1 -1
- package/dist/observability/traces.js +100 -1
- package/dist/observability/traces.js.map +1 -1
- package/dist/observability/tracing.d.ts +73 -0
- package/dist/observability/tracing.d.ts.map +1 -0
- package/dist/observability/tracing.js +126 -0
- package/dist/observability/tracing.js.map +1 -0
- package/dist/onboarding/default-steps.d.ts.map +1 -1
- package/dist/onboarding/default-steps.js +4 -1
- package/dist/onboarding/default-steps.js.map +1 -1
- package/dist/provider-api/actions/query-staged-dataset.d.ts +1 -1
- package/dist/scripts/agent-engines/list-agent-engines.d.ts.map +1 -1
- package/dist/scripts/agent-engines/list-agent-engines.js +10 -3
- package/dist/scripts/agent-engines/list-agent-engines.js.map +1 -1
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +4 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +9 -0
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +118 -110
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +37 -0
- package/dist/server/agent-engine-api-key-route.d.ts.map +1 -0
- package/dist/server/agent-engine-api-key-route.js +105 -0
- package/dist/server/agent-engine-api-key-route.js.map +1 -0
- package/dist/server/agent-teams.d.ts +62 -0
- package/dist/server/agent-teams.d.ts.map +1 -1
- package/dist/server/agent-teams.js +99 -2
- package/dist/server/agent-teams.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +17 -10
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/create-server.js +1 -1
- package/dist/server/create-server.js.map +1 -1
- package/dist/server/credential-provider.d.ts.map +1 -1
- package/dist/server/credential-provider.js +2 -0
- package/dist/server/credential-provider.js.map +1 -1
- package/dist/server/framework-request-handler.d.ts.map +1 -1
- package/dist/server/framework-request-handler.js +33 -1
- package/dist/server/framework-request-handler.js.map +1 -1
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +1 -0
- package/dist/server/index.js.map +1 -1
- package/dist/templates/workspace-core/.agents/skills/external-agents/SKILL.md +17 -4
- package/dist/templates/workspace-core/.agents/skills/harness-agents/SKILL.md +20 -0
- package/dist/templates/workspace-core/.agents/skills/observability/SKILL.md +20 -0
- package/docs/content/agent-teams.md +32 -0
- package/docs/content/blueprint-installer.md +73 -0
- package/docs/content/evals.md +141 -0
- package/docs/content/pr-visual-recap.md +7 -4
- package/docs/content/sandbox-adapters.md +134 -0
- package/docs/content/template-plan.md +20 -8
- package/package.json +5 -1
- package/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +17 -4
- package/src/templates/workspace-core/.agents/skills/harness-agents/SKILL.md +20 -0
- package/src/templates/workspace-core/.agents/skills/observability/SKILL.md +20 -0
package/dist/cli/skills.js
CHANGED
|
@@ -19,9 +19,9 @@ const HELP = `npx @agent-native/core@latest skills
|
|
|
19
19
|
|
|
20
20
|
Usage:
|
|
21
21
|
npx @agent-native/core@latest skills list
|
|
22
|
-
npx @agent-native/core@latest skills status [assets|design-exploration|visual-plan|visual-recap|context-xray] [--client codex|claude-code|all] [--scope user|project] [--json]
|
|
23
|
-
npx @agent-native/core@latest skills update [assets|design-exploration|visual-plan|visual-recap|context-xray] [--client codex|claude-code|all] [--scope user|project] [--dry-run] [--json]
|
|
24
|
-
npx @agent-native/core@latest skills add assets|design-exploration|visual-plan|visual-recap|context-xray [--client codex|claude-code|
|
|
22
|
+
npx @agent-native/core@latest skills status [assets|design-exploration|visual-plan|visual-recap|context-xray] [--client codex|claude-code|pi|all] [--scope user|project] [--json]
|
|
23
|
+
npx @agent-native/core@latest skills update [assets|design-exploration|visual-plan|visual-recap|context-xray] [--client codex|claude-code|pi|all] [--scope user|project] [--dry-run] [--json]
|
|
24
|
+
npx @agent-native/core@latest skills add assets|design-exploration|visual-plan|visual-recap|context-xray [--client codex|claude-code|cowork|cursor|opencode|github-copilot|all] [--scope user|project] [--mode hosted|local-files|self-hosted] [--mcp-url <url>] [--no-connect] [--with-github-action] [--yes] [--dry-run] [--json]
|
|
25
25
|
npx @agent-native/core@latest skills add <manifest-or-app-dir|skill-repo> [--skill <name>] [--client ...] [--yes]
|
|
26
26
|
|
|
27
27
|
Examples:
|
|
@@ -44,11 +44,14 @@ Examples:
|
|
|
44
44
|
|
|
45
45
|
The add command installs the SKILL.md instructions, registers the app-backed
|
|
46
46
|
MCP connector, and then authenticates it in one step so you do not hit an OAuth
|
|
47
|
-
wall on the first tool call.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
wall on the first tool call. Hosted installs can configure Claude Code, Codex,
|
|
48
|
+
Claude Cowork, Cursor, OpenCode, and GitHub Copilot / VS Code; local-files
|
|
49
|
+
instruction installs target the shared .agents skill path used by Codex, Pi,
|
|
50
|
+
Cursor, OpenCode, Copilot, and similar agents, plus Claude Code's native skill
|
|
51
|
+
path when selected. Pass --client to narrow it. Authentication reuses
|
|
52
|
+
"npx @agent-native/core@latest connect": OAuth-capable clients (Claude Code,
|
|
53
|
+
Cursor, OpenCode, GitHub Copilot / VS Code) get URL-only entries and authenticate
|
|
54
|
+
inside that host, while Codex / Cowork run the browser device-code flow. In a
|
|
52
55
|
non-interactive shell or CI the auth step is skipped and the exact
|
|
53
56
|
"npx @agent-native/core@latest connect <url> --client all" command is printed instead.
|
|
54
57
|
|
|
@@ -66,12 +69,12 @@ plans and recaps should live: hosted Plans for shareable links/comments, local
|
|
|
66
69
|
files for "No sharing, all local.", or a self-hosted/custom Plan app URL.
|
|
67
70
|
Pass --mode to choose directly. Local-files mode skips MCP registration and
|
|
68
71
|
auth and installs instructions that default to a no-auth block catalog fetch,
|
|
69
|
-
MDX folders, and
|
|
72
|
+
MDX folders, and the localhost bridge viewer.
|
|
70
73
|
|
|
71
74
|
When installing visual-recap interactively, the CLI offers to add the optional PR
|
|
72
75
|
Visual Recap GitHub Action. Pass --with-github-action to write it directly, then
|
|
73
76
|
run "npx @agent-native/core@latest recap setup" / "npx @agent-native/core@latest recap doctor" to configure and
|
|
74
|
-
verify GitHub Actions.
|
|
77
|
+
verify GitHub Actions. Docs: https://www.agent-native.com/docs/pr-visual-recap.
|
|
75
78
|
|
|
76
79
|
The status/update commands inspect copied Agent Native skill folders and refresh
|
|
77
80
|
their instruction files from the current @agent-native/core package.`;
|
|
@@ -271,10 +274,10 @@ npx @agent-native/core@latest skills add visual-plan --mode local-files
|
|
|
271
274
|
This mode does not register the Plan MCP connector. Before authoring structured
|
|
272
275
|
MDX, fetch the no-auth, schema-only block catalog with
|
|
273
276
|
\`npx @agent-native/core@latest plan blocks --out plan-blocks.md\`, read that file,
|
|
274
|
-
write
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
277
|
+
write the MDX folder locally, then run \`plan local serve\`. Plain text skill
|
|
278
|
+
installs (Vercel Skills CLI, copied GitHub files, etc.) can follow that same
|
|
279
|
+
local flow if \`@agent-native/core\` is available. Text alone cannot register
|
|
280
|
+
MCP tools; hosted/shareable Plans still need the Agent-Native CLI
|
|
278
281
|
install/reconnect step above.
|
|
279
282
|
|
|
280
283
|
**Browser (people you share with).** Open the Plans editor and create & edit
|
|
@@ -284,10 +287,10 @@ share; signing in claims the plans you made as a guest into your account.
|
|
|
284
287
|
Sharing and commenting require an account: public/shared plans are viewable by
|
|
285
288
|
anyone with the link, but commenting on them needs an agent-native account.
|
|
286
289
|
|
|
287
|
-
For
|
|
288
|
-
command. The optional \`plan blocks\` lookup reads only public schema metadata
|
|
289
|
-
network access is unavailable, use the bundled references and
|
|
290
|
-
|
|
290
|
+
For no-account, no-DB plan storage, use local-files mode and the local bridge
|
|
291
|
+
command. The optional \`plan blocks\` lookup reads only public schema metadata.
|
|
292
|
+
If network access is unavailable, use the bundled references and a local Plan
|
|
293
|
+
app/runtime for validation.
|
|
291
294
|
|
|
292
295
|
If a Plans tool returns \`needs auth\`, \`Unauthorized\`, or \`Session terminated\`,
|
|
293
296
|
do not keep retrying the tool. Stop and give the user the reconnect step for the
|
|
@@ -1312,7 +1315,7 @@ skill — never hand-edit one stored plan. Turn feedback into better guidance.
|
|
|
1312
1315
|
## Local-Files Privacy Mode
|
|
1313
1316
|
|
|
1314
1317
|
Use local-files privacy mode when the user explicitly asks for no DB writes,
|
|
1315
|
-
no hosted Plan
|
|
1318
|
+
no hosted Plan database writes, no Plan MCP publish, fully local files, offline/private
|
|
1316
1319
|
planning, repo-owned/source-controlled planning artifacts, or when
|
|
1317
1320
|
\`AGENT_NATIVE_PLANS_MODE=local-files\` is set. Also use it when a user or repo
|
|
1318
1321
|
policy says a plan must stay under their own brand, domain, source control, or
|
|
@@ -1330,21 +1333,24 @@ The local-files contract is:
|
|
|
1330
1333
|
\`plan blocks\` command calls the public no-auth \`get-plan-blocks\` route and
|
|
1331
1334
|
writes only registry metadata to disk; use \`--format schema\` if exact nested
|
|
1332
1335
|
fields are needed. If network access is unavailable, use the bundled
|
|
1333
|
-
references and rely on \`plan local
|
|
1334
|
-
- Write the plan as a local MDX folder
|
|
1335
|
-
|
|
1336
|
-
\`.
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1336
|
+
references and rely on \`plan local serve\` to catch invalid tags.
|
|
1337
|
+
- Write the plan as a local MDX folder: use \`plans/<slug>/\` when the user
|
|
1338
|
+
wants the artifact checked into the repo, or use a repo-ignored/temporary
|
|
1339
|
+
folder such as \`.agent-native/plans/<slug>/\` or \`/tmp/agent-native-plans/<slug>/\`
|
|
1340
|
+
when it should not be checked in. The folder contains \`plan.mdx\`, optional
|
|
1341
|
+
\`canvas.mdx\`, optional \`prototype.mdx\`, and optional \`.plan-state.json\`.
|
|
1342
|
+
- Run \`npx @agent-native/core@latest plan local serve --dir plans/<slug> --kind plan --open\`
|
|
1343
|
+
after writing or updating the folder. Report the returned local bridge URL. It opens the hosted Plan UI but reads
|
|
1344
|
+
from the localhost bridge on this machine, so it is not shareable across
|
|
1345
|
+
machines. If the Plan app itself is running locally with the same
|
|
1346
|
+
\`PLAN_LOCAL_DIR\`, the \`/local-plans/<slug>\` route is also valid.
|
|
1341
1347
|
- Do **not** call \`create-visual-plan\`, \`create-ui-plan\`,
|
|
1342
1348
|
\`create-prototype-plan\`, \`create-plan-design\`, \`import-visual-plan-source\`,
|
|
1343
1349
|
\`update-visual-plan\`, \`patch-visual-plan-source\`, \`get-plan-feedback\`,
|
|
1344
1350
|
\`export-visual-plan\`, or any hosted Plan tool for that plan except the
|
|
1345
1351
|
schema-only block catalog lookup above.
|
|
1346
1352
|
- Treat feedback as file or chat feedback: update the MDX files directly, rerun
|
|
1347
|
-
the local
|
|
1353
|
+
the local bridge command, and summarize the new local bridge URL. Hosted
|
|
1348
1354
|
comments, sharing, history, and publish/export receipts are unavailable until
|
|
1349
1355
|
the user explicitly opts into publishing.
|
|
1350
1356
|
|
|
@@ -1463,7 +1469,7 @@ before spending attention on the literal lines.
|
|
|
1463
1469
|
## Local-Files Privacy Mode Exception
|
|
1464
1470
|
|
|
1465
1471
|
Use local-files privacy mode when the user explicitly asks for no DB writes,
|
|
1466
|
-
no hosted Plan
|
|
1472
|
+
no hosted Plan database writes, no Plan MCP publish, fully local files, offline/private
|
|
1467
1473
|
recaps, or when \`AGENT_NATIVE_PLANS_MODE=local-files\` is set. This is the only
|
|
1468
1474
|
exception to the hosted publish rule below.
|
|
1469
1475
|
|
|
@@ -1478,22 +1484,26 @@ In local-files mode:
|
|
|
1478
1484
|
MCP connector is not registered; it calls the public no-auth
|
|
1479
1485
|
\`get-plan-blocks\` route and sends no recap content. If network access is
|
|
1480
1486
|
unavailable, use the bundled references and validate with
|
|
1481
|
-
\`plan local
|
|
1482
|
-
- Write the recap as a local MDX folder
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1487
|
+
\`plan local serve\`.
|
|
1488
|
+
- Write the recap as a local MDX folder: use \`plans/<slug>/\` when the user
|
|
1489
|
+
wants the artifact checked into the repo, or use a repo-ignored/temporary
|
|
1490
|
+
folder such as \`.agent-native/plans/<slug>/\` or \`/tmp/agent-native-plans/<slug>/\`
|
|
1491
|
+
when it should not be checked in. The folder contains \`plan.mdx\`, optional
|
|
1492
|
+
\`canvas.mdx\`, optional \`prototype.mdx\`, and optional \`.plan-state.json\`. Set
|
|
1493
|
+
\`kind: "recap"\` and \`localOnly: true\` in frontmatter/state when authoring
|
|
1494
|
+
the source.
|
|
1495
|
+
- Run \`npx @agent-native/core@latest plan local serve --dir plans/<slug> --kind recap --open\`
|
|
1496
|
+
after writing or updating the folder. Report the returned local bridge URL. It opens the hosted Plan UI but reads
|
|
1497
|
+
from the localhost bridge on this machine, so it is not shareable across
|
|
1498
|
+
machines. If the Plan app itself is running locally with the same
|
|
1499
|
+
\`PLAN_LOCAL_DIR\`, the \`/local-plans/<slug>\` route is also valid.
|
|
1490
1500
|
- Do **not** call \`create-visual-recap\`, \`create-visual-plan\`,
|
|
1491
1501
|
\`import-visual-plan-source\`, \`update-visual-plan\`,
|
|
1492
1502
|
\`patch-visual-plan-source\`, \`get-plan-feedback\`, \`export-visual-plan\`,
|
|
1493
1503
|
\`set-resource-visibility\`, or any hosted Plan tool for that recap except the
|
|
1494
1504
|
schema-only block catalog lookup above.
|
|
1495
1505
|
- Treat review feedback as file or chat feedback: update the MDX files directly,
|
|
1496
|
-
rerun the local
|
|
1506
|
+
rerun the local bridge command, and summarize the new local bridge URL.
|
|
1497
1507
|
Hosted comments, sharing, screenshots, usage attachment, and PR sticky comment
|
|
1498
1508
|
publishing are unavailable until the user explicitly opts into publishing.
|
|
1499
1509
|
|
|
@@ -1704,10 +1714,13 @@ a headless CI agent), state that in the recap handoff instead.
|
|
|
1704
1714
|
|
|
1705
1715
|
## Open And Report The Recap
|
|
1706
1716
|
|
|
1707
|
-
In local-files privacy mode, report the local
|
|
1708
|
-
\`npx @agent-native/core@latest plan local
|
|
1709
|
-
|
|
1710
|
-
|
|
1717
|
+
In local-files privacy mode, report the local bridge URL from
|
|
1718
|
+
\`npx @agent-native/core@latest plan local serve --dir plans/<slug> --kind recap --open\`.
|
|
1719
|
+
It opens the hosted Plan UI but reads from the localhost bridge on this machine,
|
|
1720
|
+
so it is not shareable across machines. If the Plan app itself is running
|
|
1721
|
+
locally with the same \`PLAN_LOCAL_DIR\`, the \`/local-plans/<slug>\` route is also
|
|
1722
|
+
valid. Do not invent a hosted database URL and do not publish just to get an
|
|
1723
|
+
absolute Plan link.
|
|
1711
1724
|
|
|
1712
1725
|
After creating the recap, link the reviewer to the rendered plan with an
|
|
1713
1726
|
**absolute URL on the origin whose database actually holds the plan**. That
|
|
@@ -1861,7 +1874,7 @@ was installed as plain text and no MCP tools are registered, run
|
|
|
1861
1874
|
\`npx @agent-native/core@latest plan blocks --out plan-blocks.md\` and read that
|
|
1862
1875
|
file first. The CLI command calls the public no-auth \`get-plan-blocks\` route and
|
|
1863
1876
|
sends no plan/recap content. If network access is unavailable, use the bundled
|
|
1864
|
-
references and validate with \`plan local
|
|
1877
|
+
references and validate with \`plan local serve\`.
|
|
1865
1878
|
|
|
1866
1879
|
The catalog returns the authoritative, always-current block vocabulary generated
|
|
1867
1880
|
live from the app's own block registry — the same config the renderer and MDX
|
|
@@ -2239,20 +2252,45 @@ const CLIENT_LABELS = {
|
|
|
2239
2252
|
"claude-code-cli": "Claude Code CLI",
|
|
2240
2253
|
codex: "Codex",
|
|
2241
2254
|
cowork: "Claude Cowork",
|
|
2255
|
+
cursor: "Cursor",
|
|
2256
|
+
opencode: "OpenCode",
|
|
2257
|
+
"github-copilot": "GitHub Copilot / VS Code",
|
|
2242
2258
|
};
|
|
2243
2259
|
const CLIENT_HINTS = {
|
|
2244
2260
|
"claude-code": ".mcp.json or ~/.claude.json",
|
|
2245
2261
|
"claude-code-cli": ".mcp.json or ~/.claude.json",
|
|
2246
2262
|
codex: "$CODEX_HOME/config.toml or ~/.codex/config.toml",
|
|
2247
2263
|
cowork: "~/.cowork/mcp.json",
|
|
2264
|
+
cursor: ".cursor/mcp.json or ~/.cursor/mcp.json",
|
|
2265
|
+
opencode: "opencode.json or ~/.config/opencode/opencode.json",
|
|
2266
|
+
"github-copilot": ".vscode/mcp.json or VS Code user mcp.json",
|
|
2267
|
+
};
|
|
2268
|
+
const SKILLS_CLIENTS = [
|
|
2269
|
+
"claude-code",
|
|
2270
|
+
"codex",
|
|
2271
|
+
"cowork",
|
|
2272
|
+
"cursor",
|
|
2273
|
+
"opencode",
|
|
2274
|
+
"github-copilot",
|
|
2275
|
+
];
|
|
2276
|
+
const SKILL_INSTRUCTION_CLIENTS = [
|
|
2277
|
+
"codex",
|
|
2278
|
+
"claude-code",
|
|
2279
|
+
"pi",
|
|
2280
|
+
];
|
|
2281
|
+
const SKILL_INSTRUCTION_CLIENT_LABELS = {
|
|
2282
|
+
"claude-code": "Claude Code",
|
|
2283
|
+
"claude-code-cli": "Claude Code",
|
|
2284
|
+
codex: "Shared .agents skills",
|
|
2285
|
+
cowork: "MCP only",
|
|
2286
|
+
pi: "Pi",
|
|
2248
2287
|
};
|
|
2249
|
-
const SKILLS_CLIENTS = ["claude-code", "codex", "cowork"];
|
|
2250
|
-
const SKILL_INSTRUCTION_CLIENTS = ["claude-code", "codex"];
|
|
2251
2288
|
const SKILL_INSTRUCTION_CLIENT_HINTS = {
|
|
2252
|
-
"claude-code": ".claude/skills
|
|
2253
|
-
"claude-code-cli": ".claude/skills
|
|
2254
|
-
codex: ".agents/
|
|
2289
|
+
"claude-code": "Also write Claude Code's native .claude/skills and commands files.",
|
|
2290
|
+
"claude-code-cli": "Also write Claude Code's native .claude/skills and commands files.",
|
|
2291
|
+
codex: "Project scope writes .agents skills/commands for Codex, Pi, Cursor, OpenCode, Copilot, and similar agents; user scope writes Codex's ~/.codex skills/commands.",
|
|
2255
2292
|
cowork: "MCP only",
|
|
2293
|
+
pi: "Project scope writes .agents/skills plus .pi/prompts; user scope writes ~/.agents/skills plus ~/.pi/agent/prompts.",
|
|
2256
2294
|
};
|
|
2257
2295
|
function normalizeKnownSkillTarget(value) {
|
|
2258
2296
|
const key = value?.trim().toLowerCase();
|
|
@@ -2319,13 +2357,16 @@ function planModeInstructionBlock(input) {
|
|
|
2319
2357
|
return `## Installed Mode
|
|
2320
2358
|
|
|
2321
2359
|
Default storage for this installation: local files. Create and update plans and
|
|
2322
|
-
recaps as MDX folders under \`plans/<slug
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
\`npx @agent-native/core@latest plan
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2360
|
+
recaps as MDX folders under \`plans/<slug>/\` when they should be checked in, or
|
|
2361
|
+
under a repo-ignored/temp folder when they should stay private scratch. Before
|
|
2362
|
+
authoring structured MDX, run
|
|
2363
|
+
\`npx @agent-native/core@latest plan blocks --out plan-blocks.md\` and read the
|
|
2364
|
+
no-auth block catalog; it sends no plan content. Then run
|
|
2365
|
+
\`npx @agent-native/core@latest plan local serve --dir plans/<slug> --kind plan|recap --open\`,
|
|
2366
|
+
and report the local bridge URL. It opens the hosted Plan UI but reads from the
|
|
2367
|
+
localhost bridge on this machine, so it is not shareable across machines. No
|
|
2368
|
+
sharing, all local. Use a hosted or self-hosted Plan MCP connector only if the
|
|
2369
|
+
user explicitly asks to publish or share.`;
|
|
2329
2370
|
}
|
|
2330
2371
|
if (input.mode === "self-hosted") {
|
|
2331
2372
|
return `## Installed Mode
|
|
@@ -2420,17 +2461,68 @@ function writeSkillFolder(dir, bundle, installedAt = new Date().toISOString()) {
|
|
|
2420
2461
|
function builtInSkillsRootForAgent(agent, scope, baseDir) {
|
|
2421
2462
|
const home = homeDir() ?? baseDir;
|
|
2422
2463
|
if (scope === "project") {
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2464
|
+
if (agent === "codex")
|
|
2465
|
+
return path.join(baseDir, ".agents", "skills");
|
|
2466
|
+
if (agent === "pi")
|
|
2467
|
+
return path.join(baseDir, ".agents", "skills");
|
|
2468
|
+
return path.join(baseDir, ".claude", "skills");
|
|
2426
2469
|
}
|
|
2427
2470
|
if (agent === "codex") {
|
|
2428
2471
|
return process.env.CODEX_HOME
|
|
2429
2472
|
? path.join(process.env.CODEX_HOME, "skills")
|
|
2430
2473
|
: path.join(home, ".codex", "skills");
|
|
2431
2474
|
}
|
|
2475
|
+
if (agent === "pi") {
|
|
2476
|
+
return path.join(home, ".agents", "skills");
|
|
2477
|
+
}
|
|
2432
2478
|
return path.join(home, ".claude", "skills");
|
|
2433
2479
|
}
|
|
2480
|
+
function builtInCommandsRootForAgent(agent, scope, baseDir) {
|
|
2481
|
+
const home = homeDir() ?? baseDir;
|
|
2482
|
+
if (scope === "project") {
|
|
2483
|
+
if (agent === "codex")
|
|
2484
|
+
return path.join(baseDir, ".agents", "commands");
|
|
2485
|
+
if (agent === "pi")
|
|
2486
|
+
return path.join(baseDir, ".pi", "prompts");
|
|
2487
|
+
return path.join(baseDir, ".claude", "commands");
|
|
2488
|
+
}
|
|
2489
|
+
if (agent === "codex") {
|
|
2490
|
+
return process.env.CODEX_HOME
|
|
2491
|
+
? path.join(process.env.CODEX_HOME, "commands")
|
|
2492
|
+
: path.join(home, ".codex", "commands");
|
|
2493
|
+
}
|
|
2494
|
+
if (agent === "pi") {
|
|
2495
|
+
const piHome = process.env.PI_CODING_AGENT_DIR || path.join(home, ".pi", "agent");
|
|
2496
|
+
return path.join(piHome, "prompts");
|
|
2497
|
+
}
|
|
2498
|
+
return path.join(home, ".claude", "commands");
|
|
2499
|
+
}
|
|
2500
|
+
function slashCommandForBuiltInSkill(skillName) {
|
|
2501
|
+
if (skillName === "visual-plan") {
|
|
2502
|
+
return `---
|
|
2503
|
+
description: Create an interactive Agent-Native visual plan for the current task.
|
|
2504
|
+
argument-hint: [optional request or scope]
|
|
2505
|
+
---
|
|
2506
|
+
|
|
2507
|
+
Use the visual-plan skill for this task. Treat any arguments as the user's
|
|
2508
|
+
requested plan scope or focus:
|
|
2509
|
+
|
|
2510
|
+
$ARGUMENTS
|
|
2511
|
+
`;
|
|
2512
|
+
}
|
|
2513
|
+
if (skillName === "visual-recap") {
|
|
2514
|
+
return `---
|
|
2515
|
+
description: Create an interactive Agent-Native visual recap for a PR, branch, commit, or diff.
|
|
2516
|
+
argument-hint: [PR, branch, commit, diff, or scope]
|
|
2517
|
+
---
|
|
2518
|
+
|
|
2519
|
+
Use the visual-recap skill. Treat any arguments as the recap target or focus:
|
|
2520
|
+
|
|
2521
|
+
$ARGUMENTS
|
|
2522
|
+
`;
|
|
2523
|
+
}
|
|
2524
|
+
return null;
|
|
2525
|
+
}
|
|
2434
2526
|
/**
|
|
2435
2527
|
* Write a built-in skill's instruction folders straight into each client's
|
|
2436
2528
|
* skills directory. Built-in skills ship their SKILL.md inside this package, so
|
|
@@ -2445,11 +2537,21 @@ function installBuiltInInstructions(input) {
|
|
|
2445
2537
|
const written = [];
|
|
2446
2538
|
for (const agent of input.skillsAgents) {
|
|
2447
2539
|
const root = builtInSkillsRootForAgent(agent, input.scope, input.baseDir);
|
|
2540
|
+
const commandsRoot = builtInCommandsRootForAgent(agent, input.scope, input.baseDir);
|
|
2448
2541
|
for (const bundle of bundles) {
|
|
2449
2542
|
const dir = path.join(root, bundle.skillName);
|
|
2450
2543
|
if (!input.dryRun)
|
|
2451
2544
|
writeSkillFolder(dir, bundle);
|
|
2452
2545
|
written.push(dir);
|
|
2546
|
+
const command = slashCommandForBuiltInSkill(bundle.skillName);
|
|
2547
|
+
if (command) {
|
|
2548
|
+
const commandPath = path.join(commandsRoot, `${bundle.skillName}.md`);
|
|
2549
|
+
if (!input.dryRun) {
|
|
2550
|
+
fs.mkdirSync(path.dirname(commandPath), { recursive: true });
|
|
2551
|
+
fs.writeFileSync(commandPath, command, "utf-8");
|
|
2552
|
+
}
|
|
2553
|
+
written.push(commandPath);
|
|
2554
|
+
}
|
|
2453
2555
|
}
|
|
2454
2556
|
}
|
|
2455
2557
|
return written;
|
|
@@ -2508,6 +2610,10 @@ function skillSearchRoots(input) {
|
|
|
2508
2610
|
if (hasClient("claude-code") || hasClient("claude-code-cli")) {
|
|
2509
2611
|
add(path.join(input.baseDir, ".claude", "skills"), "project", "claude-code");
|
|
2510
2612
|
}
|
|
2613
|
+
if (hasClient("pi")) {
|
|
2614
|
+
add(path.join(input.baseDir, ".agents", "skills"), "project", "pi");
|
|
2615
|
+
add(path.join(input.baseDir, ".pi", "skills"), "project", "pi");
|
|
2616
|
+
}
|
|
2511
2617
|
if (includeAll)
|
|
2512
2618
|
add(path.join(input.baseDir, "skills"), "project", "repo");
|
|
2513
2619
|
}
|
|
@@ -2522,6 +2628,12 @@ function skillSearchRoots(input) {
|
|
|
2522
2628
|
if (hasClient("claude-code") || hasClient("claude-code-cli")) {
|
|
2523
2629
|
add(home ? path.join(home, ".claude", "skills") : undefined, "user", "claude-code");
|
|
2524
2630
|
}
|
|
2631
|
+
if (hasClient("pi")) {
|
|
2632
|
+
const piHome = process.env.PI_CODING_AGENT_DIR ||
|
|
2633
|
+
(home ? path.join(home, ".pi", "agent") : undefined);
|
|
2634
|
+
add(home ? path.join(home, ".agents", "skills") : undefined, "user", "pi");
|
|
2635
|
+
add(piHome ? path.join(piHome, "skills") : undefined, "user", "pi");
|
|
2636
|
+
}
|
|
2525
2637
|
}
|
|
2526
2638
|
const seen = new Set();
|
|
2527
2639
|
return roots.filter((entry) => {
|
|
@@ -2551,7 +2663,7 @@ function scopeFilterForStatus(parsed) {
|
|
|
2551
2663
|
: ["project", "user"];
|
|
2552
2664
|
}
|
|
2553
2665
|
function clientFilterForStatus(parsed) {
|
|
2554
|
-
return parsed.clientExplicit ?
|
|
2666
|
+
return parsed.clientExplicit ? resolveSkillsClientArg(parsed.client) : [];
|
|
2555
2667
|
}
|
|
2556
2668
|
function collectSkillInstallStates(parsed, options) {
|
|
2557
2669
|
const appSkillIds = targetIdsForStatus(parsed);
|
|
@@ -2640,11 +2752,28 @@ function normalizeClientIds(values) {
|
|
|
2640
2752
|
}
|
|
2641
2753
|
return out;
|
|
2642
2754
|
}
|
|
2643
|
-
function
|
|
2755
|
+
function isMcpClientId(value) {
|
|
2756
|
+
return CLIENTS.includes(value);
|
|
2757
|
+
}
|
|
2758
|
+
function normalizeSkillInstructionClientIds(values) {
|
|
2759
|
+
if (!Array.isArray(values))
|
|
2760
|
+
return [];
|
|
2644
2761
|
const seen = new Set();
|
|
2645
2762
|
const out = [];
|
|
2646
|
-
for (const
|
|
2647
|
-
|
|
2763
|
+
for (const value of values) {
|
|
2764
|
+
if (typeof value !== "string")
|
|
2765
|
+
continue;
|
|
2766
|
+
const id = value.toLowerCase();
|
|
2767
|
+
let normalized = null;
|
|
2768
|
+
if (id === "pi") {
|
|
2769
|
+
normalized = "pi";
|
|
2770
|
+
}
|
|
2771
|
+
else if (CLIENTS.includes(id)) {
|
|
2772
|
+
const client = id;
|
|
2773
|
+
normalized = client === "claude-code-cli" ? "claude-code" : client;
|
|
2774
|
+
}
|
|
2775
|
+
if (!normalized)
|
|
2776
|
+
continue;
|
|
2648
2777
|
if (seen.has(normalized))
|
|
2649
2778
|
continue;
|
|
2650
2779
|
seen.add(normalized);
|
|
@@ -2652,22 +2781,37 @@ function normalizeSkillsClientIds(values) {
|
|
|
2652
2781
|
}
|
|
2653
2782
|
return out;
|
|
2654
2783
|
}
|
|
2655
|
-
function resolveSkillsClientArg(client) {
|
|
2656
|
-
|
|
2784
|
+
function resolveSkillsClientArg(client, installsMcp = false) {
|
|
2785
|
+
if (installsMcp)
|
|
2786
|
+
return normalizeSkillInstructionClientIds(resolveClients(client));
|
|
2787
|
+
const values = client.split(",").flatMap((raw) => {
|
|
2788
|
+
const id = raw.trim().toLowerCase();
|
|
2789
|
+
if (!id)
|
|
2790
|
+
return [];
|
|
2791
|
+
if (id === "all")
|
|
2792
|
+
return SKILL_INSTRUCTION_CLIENTS;
|
|
2793
|
+
if (id === "pi")
|
|
2794
|
+
return ["pi"];
|
|
2795
|
+
return resolveClients(id);
|
|
2796
|
+
});
|
|
2797
|
+
return normalizeSkillInstructionClientIds(values);
|
|
2657
2798
|
}
|
|
2658
2799
|
function skillsClients(installsMcp) {
|
|
2659
2800
|
return installsMcp ? SKILLS_CLIENTS : SKILL_INSTRUCTION_CLIENTS;
|
|
2660
2801
|
}
|
|
2661
2802
|
function filterSkillsClients(clients, installsMcp) {
|
|
2662
|
-
if (installsMcp)
|
|
2663
|
-
return clients;
|
|
2803
|
+
if (installsMcp) {
|
|
2804
|
+
return clients.filter((client) => isMcpClientId(client) && SKILLS_CLIENTS.includes(client));
|
|
2805
|
+
}
|
|
2664
2806
|
return clients.filter((client) => SKILL_INSTRUCTION_CLIENTS.includes(client));
|
|
2665
2807
|
}
|
|
2666
2808
|
function clientPromptOptions(installsMcp) {
|
|
2667
2809
|
return skillsClients(installsMcp).map((client) => ({
|
|
2668
2810
|
value: client,
|
|
2669
|
-
label:
|
|
2670
|
-
|
|
2811
|
+
label: installsMcp && isMcpClientId(client)
|
|
2812
|
+
? CLIENT_LABELS[client]
|
|
2813
|
+
: SKILL_INSTRUCTION_CLIENT_LABELS[client],
|
|
2814
|
+
hint: installsMcp && isMcpClientId(client)
|
|
2671
2815
|
? CLIENT_HINTS[client]
|
|
2672
2816
|
: SKILL_INSTRUCTION_CLIENT_HINTS[client],
|
|
2673
2817
|
}));
|
|
@@ -2675,16 +2819,6 @@ function clientPromptOptions(installsMcp) {
|
|
|
2675
2819
|
const DEFAULT_PUBLIC_SKILLS_SOURCE = "BuilderIO/skills";
|
|
2676
2820
|
const PUBLIC_SKILL_TARGET_PREFIX = "public-skills:";
|
|
2677
2821
|
const BUILT_IN_SKILL_PROMPT_OPTIONS = [
|
|
2678
|
-
{
|
|
2679
|
-
value: "assets",
|
|
2680
|
-
label: "assets",
|
|
2681
|
-
hint: BUILT_IN_APP_SKILLS.assets.manifest.description,
|
|
2682
|
-
},
|
|
2683
|
-
{
|
|
2684
|
-
value: "design-exploration",
|
|
2685
|
-
label: "design-exploration",
|
|
2686
|
-
hint: BUILT_IN_APP_SKILLS.design.manifest.description,
|
|
2687
|
-
},
|
|
2688
2822
|
{
|
|
2689
2823
|
value: "visual-plan",
|
|
2690
2824
|
label: "visual-plan",
|
|
@@ -2695,6 +2829,16 @@ const BUILT_IN_SKILL_PROMPT_OPTIONS = [
|
|
|
2695
2829
|
label: "visual-recap",
|
|
2696
2830
|
hint: "Interactive visual recap that maps PRs/diffs with diagrams, annotated diffs, API/schema summaries, and review notes.",
|
|
2697
2831
|
},
|
|
2832
|
+
{
|
|
2833
|
+
value: "assets",
|
|
2834
|
+
label: "assets",
|
|
2835
|
+
hint: BUILT_IN_APP_SKILLS.assets.manifest.description,
|
|
2836
|
+
},
|
|
2837
|
+
{
|
|
2838
|
+
value: "design-exploration",
|
|
2839
|
+
label: "design-exploration",
|
|
2840
|
+
hint: BUILT_IN_APP_SKILLS.design.manifest.description,
|
|
2841
|
+
},
|
|
2698
2842
|
{
|
|
2699
2843
|
value: "context-xray",
|
|
2700
2844
|
label: "context-xray",
|
|
@@ -2702,6 +2846,13 @@ const BUILT_IN_SKILL_PROMPT_OPTIONS = [
|
|
|
2702
2846
|
},
|
|
2703
2847
|
];
|
|
2704
2848
|
const DEFAULT_SKILL_PROMPT_TARGETS = ["visual-plan", "visual-recap"];
|
|
2849
|
+
function hiddenBuiltInSkillTargets(options) {
|
|
2850
|
+
return new Set((options.hiddenBuiltInSkillTargets ?? []).map((target) => target.trim().toLowerCase()));
|
|
2851
|
+
}
|
|
2852
|
+
function builtInSkillPromptOptions(options) {
|
|
2853
|
+
const hidden = hiddenBuiltInSkillTargets(options);
|
|
2854
|
+
return BUILT_IN_SKILL_PROMPT_OPTIONS.filter((entry) => !hidden.has(entry.value));
|
|
2855
|
+
}
|
|
2705
2856
|
function publicSkillEntries(options) {
|
|
2706
2857
|
if (options.catalogMode !== "all")
|
|
2707
2858
|
return [];
|
|
@@ -2732,15 +2883,13 @@ function publicSkillPromptOptions(options) {
|
|
|
2732
2883
|
}
|
|
2733
2884
|
function skillPromptOptions(options = {}) {
|
|
2734
2885
|
return [
|
|
2735
|
-
...
|
|
2886
|
+
...builtInSkillPromptOptions(options),
|
|
2736
2887
|
...publicSkillPromptOptions(options),
|
|
2737
2888
|
];
|
|
2738
2889
|
}
|
|
2739
2890
|
function defaultSkillPromptTargets(options) {
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
...publicSkillEntries(options).map((entry) => entry.name),
|
|
2743
|
-
];
|
|
2891
|
+
const available = new Set(skillPromptOptions(options).map((entry) => entry.value));
|
|
2892
|
+
return DEFAULT_SKILL_PROMPT_TARGETS.filter((target) => available.has(target));
|
|
2744
2893
|
}
|
|
2745
2894
|
function publicSkillSelectionTarget(skillNames) {
|
|
2746
2895
|
return `${PUBLIC_SKILL_TARGET_PREFIX}${skillNames.join(",")}`;
|
|
@@ -2760,6 +2909,7 @@ function prVisualRecapWorkflowPath(baseDir) {
|
|
|
2760
2909
|
function prVisualRecapWorkflowDisplayPath() {
|
|
2761
2910
|
return path.join(".github", "workflows", "pr-visual-recap.yml");
|
|
2762
2911
|
}
|
|
2912
|
+
const PR_VISUAL_RECAP_DOCS_URL = "https://www.agent-native.com/docs/pr-visual-recap";
|
|
2763
2913
|
function prVisualRecapInstallCommand() {
|
|
2764
2914
|
return "npx @agent-native/core@latest skills add visual-recap --with-github-action";
|
|
2765
2915
|
}
|
|
@@ -2773,6 +2923,7 @@ async function promptForGithubAction(context) {
|
|
|
2773
2923
|
" Posts a human-friendly recap on every pull request — a high-altitude\n" +
|
|
2774
2924
|
" overview of what the PR does, with annotated code, diagrams, and\n" +
|
|
2775
2925
|
" before/after notes instead of a raw diff.\n" +
|
|
2926
|
+
` Learn more: ${PR_VISUAL_RECAP_DOCS_URL}\n` +
|
|
2776
2927
|
` Writes ${context.workflowPath}; ${context.setupCommand} finishes the GitHub secrets.`,
|
|
2777
2928
|
initialValue: false,
|
|
2778
2929
|
});
|
|
@@ -2796,9 +2947,9 @@ function shouldPrompt(parsed, options) {
|
|
|
2796
2947
|
async function promptForClients(context) {
|
|
2797
2948
|
const clack = await import("@clack/prompts");
|
|
2798
2949
|
const message = context.installsMcp
|
|
2799
|
-
? "Install the MCP connector
|
|
2950
|
+
? "Install the MCP connector for which clients?\n" +
|
|
2800
2951
|
" (space toggles, enter confirms; saved for next time)"
|
|
2801
|
-
: "
|
|
2952
|
+
: "Where should the skill instructions be written?\n" +
|
|
2802
2953
|
" (space toggles, enter confirms; saved for next time)";
|
|
2803
2954
|
const result = await clack.multiselect({
|
|
2804
2955
|
message,
|
|
@@ -2810,7 +2961,7 @@ async function promptForClients(context) {
|
|
|
2810
2961
|
clack.cancel("Cancelled.");
|
|
2811
2962
|
return null;
|
|
2812
2963
|
}
|
|
2813
|
-
return
|
|
2964
|
+
return normalizeSkillInstructionClientIds(result);
|
|
2814
2965
|
}
|
|
2815
2966
|
async function promptForScope(context) {
|
|
2816
2967
|
const clack = await import("@clack/prompts");
|
|
@@ -2843,13 +2994,13 @@ async function promptForPlanMode(context) {
|
|
|
2843
2994
|
options: [
|
|
2844
2995
|
{
|
|
2845
2996
|
value: "hosted",
|
|
2846
|
-
label: "Hosted Plans, shareable links",
|
|
2997
|
+
label: "Hosted Plans, shareable links (recommended)",
|
|
2847
2998
|
hint: "100% free and open source. Stores plans at plan.agent-native.com with sharing, comments, and browser editor. Requires one-time browser sign-in.",
|
|
2848
2999
|
},
|
|
2849
3000
|
{
|
|
2850
3001
|
value: "local-files",
|
|
2851
3002
|
label: "Local files only",
|
|
2852
|
-
hint: "Writes
|
|
3003
|
+
hint: "Writes local MDX, starts a localhost bridge, and opens the hosted Plan UI. No sharing, all local.",
|
|
2853
3004
|
},
|
|
2854
3005
|
{
|
|
2855
3006
|
value: "self-hosted",
|
|
@@ -2917,15 +3068,17 @@ async function promptForSkills(context) {
|
|
|
2917
3068
|
}
|
|
2918
3069
|
async function resolveSkillsClients(parsed, options, installsMcp) {
|
|
2919
3070
|
if (parsed.clientExplicit || !shouldPrompt(parsed, options)) {
|
|
2920
|
-
const clients = filterSkillsClients(resolveSkillsClientArg(parsed.client), installsMcp);
|
|
3071
|
+
const clients = filterSkillsClients(resolveSkillsClientArg(parsed.client, installsMcp), installsMcp);
|
|
2921
3072
|
if (clients.length === 0) {
|
|
2922
|
-
throw new Error(
|
|
3073
|
+
throw new Error(installsMcp
|
|
3074
|
+
? "MCP setup supports Claude Code, Codex, Claude Cowork, Cursor, OpenCode, or GitHub Copilot / VS Code clients. Use --mode local-files or --no-mcp for Pi."
|
|
3075
|
+
: "Skill instructions use shared .agents for Codex, Pi, Cursor, OpenCode, Copilot, and similar agents, or Claude Code's native files.");
|
|
2923
3076
|
}
|
|
2924
3077
|
return clients;
|
|
2925
3078
|
}
|
|
2926
3079
|
const initialClients = skillsClients(installsMcp);
|
|
2927
3080
|
const prompt = options.promptClients ?? promptForClients;
|
|
2928
|
-
const selected =
|
|
3081
|
+
const selected = normalizeSkillInstructionClientIds(await prompt({
|
|
2929
3082
|
initialClients,
|
|
2930
3083
|
options: clientPromptOptions(installsMcp),
|
|
2931
3084
|
installsMcp,
|
|
@@ -2934,7 +3087,7 @@ async function resolveSkillsClients(parsed, options, installsMcp) {
|
|
|
2934
3087
|
return null;
|
|
2935
3088
|
if (!parsed.dryRun) {
|
|
2936
3089
|
try {
|
|
2937
|
-
writeConnectClientPreferences(selected);
|
|
3090
|
+
writeConnectClientPreferences(selected.filter(isMcpClientId));
|
|
2938
3091
|
}
|
|
2939
3092
|
catch { }
|
|
2940
3093
|
}
|
|
@@ -3225,6 +3378,8 @@ function skillsAgentsForClients(clients) {
|
|
|
3225
3378
|
if (client === "claude-code" || client === "claude-code-cli") {
|
|
3226
3379
|
agents.add("claude-code");
|
|
3227
3380
|
}
|
|
3381
|
+
if (client === "pi")
|
|
3382
|
+
agents.add("pi");
|
|
3228
3383
|
}
|
|
3229
3384
|
return [...agents];
|
|
3230
3385
|
}
|
|
@@ -3237,7 +3392,7 @@ function commandString(cmd, args) {
|
|
|
3237
3392
|
return [cmd, ...args].map(shellArg).join(" ");
|
|
3238
3393
|
}
|
|
3239
3394
|
function clientArgForClients(clients) {
|
|
3240
|
-
if (clients.length === CLIENTS.length)
|
|
3395
|
+
if (clients.length === CLIENTS.length && clients.every(isMcpClientId))
|
|
3241
3396
|
return "all";
|
|
3242
3397
|
if (clients.length === 1)
|
|
3243
3398
|
return clients[0];
|
|
@@ -3272,7 +3427,8 @@ function preserveMcpUrlAppPathOverride(target, input) {
|
|
|
3272
3427
|
};
|
|
3273
3428
|
}
|
|
3274
3429
|
function dryRunInstallCommand(parsed, target) {
|
|
3275
|
-
const clients = parsed.clients ??
|
|
3430
|
+
const clients = parsed.clients ??
|
|
3431
|
+
resolveSkillsClientArg(parsed.client, targetInstallsMcp(target, parsed));
|
|
3276
3432
|
const args = [
|
|
3277
3433
|
"@agent-native/core@latest",
|
|
3278
3434
|
"skills",
|
|
@@ -3410,6 +3566,7 @@ function agentNativeSkillsInstallArgs(parsed, target, clients, baseDir) {
|
|
|
3410
3566
|
"--yes",
|
|
3411
3567
|
"@agent-native/skills@latest",
|
|
3412
3568
|
"add",
|
|
3569
|
+
"--quiet",
|
|
3413
3570
|
"--copy",
|
|
3414
3571
|
target,
|
|
3415
3572
|
"--client",
|
|
@@ -3457,12 +3614,12 @@ async function addPlainSkillRepo(parsed, options) {
|
|
|
3457
3614
|
const skillsAgents = skillsAgentsForClients(clients);
|
|
3458
3615
|
const selectedSkillNames = parsed.plainSkillNames ?? [];
|
|
3459
3616
|
if (skillsAgents.length === 0) {
|
|
3460
|
-
throw new Error("Plain skill repositories
|
|
3617
|
+
throw new Error("Plain skill repositories install through shared .agents for Codex, Pi, Cursor, OpenCode, Copilot, and similar agents, or Claude Code's native files.");
|
|
3461
3618
|
}
|
|
3462
|
-
const args = agentNativeSkillsInstallArgs(parsed, target,
|
|
3619
|
+
const args = agentNativeSkillsInstallArgs(parsed, target, skillsAgents, options.baseDir);
|
|
3463
3620
|
if (!parsed.dryRun) {
|
|
3464
3621
|
const code = await (options.runCommand ?? runCommand)("npx", args, {
|
|
3465
|
-
stdio:
|
|
3622
|
+
stdio: "silent",
|
|
3466
3623
|
});
|
|
3467
3624
|
if (code !== 0)
|
|
3468
3625
|
throw new Error(`npx @agent-native/skills@latest add exited with ${code}.`);
|
|
@@ -3622,7 +3779,7 @@ export async function addAgentNativeSkill(parsed, options = {}) {
|
|
|
3622
3779
|
if (!parsed.instructions && parsed.mcp) {
|
|
3623
3780
|
throw new Error("Context X-Ray does not need MCP config yet. Run without --mcp-only.");
|
|
3624
3781
|
}
|
|
3625
|
-
const clients = parsed.clients ?? resolveSkillsClientArg(parsed.client);
|
|
3782
|
+
const clients = (parsed.clients ?? resolveSkillsClientArg(parsed.client)).filter(isMcpClientId);
|
|
3626
3783
|
const skillsAgents = skillsAgentsForClients(clients);
|
|
3627
3784
|
if (parsed.dryRun) {
|
|
3628
3785
|
const githubActionPath = parsed.withGithubAction && knownTarget === "visual-plans"
|
|
@@ -3677,7 +3834,11 @@ export async function addAgentNativeSkill(parsed, options = {}) {
|
|
|
3677
3834
|
if (parsed.mcpUrl) {
|
|
3678
3835
|
installTarget = withMcpUrlOverride(installTarget, parsed.mcpUrl);
|
|
3679
3836
|
}
|
|
3680
|
-
const clients = parsed.clients ?? resolveSkillsClientArg(parsed.client);
|
|
3837
|
+
const clients = parsed.clients ?? resolveSkillsClientArg(parsed.client, shouldRegisterMcp);
|
|
3838
|
+
const mcpClients = clients.filter(isMcpClientId);
|
|
3839
|
+
if (shouldRegisterMcp && mcpClients.length === 0) {
|
|
3840
|
+
throw new Error("MCP setup supports Claude Code, Codex, Claude Cowork, Cursor, OpenCode, or GitHub Copilot / VS Code clients. Use --mode local-files or --no-mcp for Pi.");
|
|
3841
|
+
}
|
|
3681
3842
|
installTarget = preserveMcpUrlAppPathOverride(installTarget, parsed.mcpUrl);
|
|
3682
3843
|
const skillsAgents = skillsAgentsForClients(clients);
|
|
3683
3844
|
if (parsed.dryRun) {
|
|
@@ -3702,7 +3863,7 @@ export async function addAgentNativeSkill(parsed, options = {}) {
|
|
|
3702
3863
|
mcpUrl: knownTarget === "visual-plans" && planMode === "local-files"
|
|
3703
3864
|
? ""
|
|
3704
3865
|
: installTarget.loaded.manifest.hosted.mcpUrl,
|
|
3705
|
-
mcpClients: shouldRegisterMcp ?
|
|
3866
|
+
mcpClients: shouldRegisterMcp ? mcpClients : [],
|
|
3706
3867
|
dryRun: true,
|
|
3707
3868
|
commands: [dryRunInstallCommand(parsed, target)],
|
|
3708
3869
|
githubActionPath,
|
|
@@ -3720,12 +3881,12 @@ export async function addAgentNativeSkill(parsed, options = {}) {
|
|
|
3720
3881
|
let instructionsWritten;
|
|
3721
3882
|
let connected = false;
|
|
3722
3883
|
let connectCommand;
|
|
3723
|
-
let registeredMcpClients = shouldRegisterMcp ?
|
|
3884
|
+
let registeredMcpClients = shouldRegisterMcp ? mcpClients : [];
|
|
3724
3885
|
try {
|
|
3725
3886
|
if (parsed.instructions) {
|
|
3726
3887
|
if (skillsAgents.length === 0) {
|
|
3727
3888
|
if (!shouldRegisterMcp) {
|
|
3728
|
-
throw new Error("Skill instructions
|
|
3889
|
+
throw new Error("Skill instructions use shared .agents for Codex, Pi, Cursor, OpenCode, Copilot, and similar agents, or Claude Code's native files. Use an MCP-capable client or omit --instructions-only.");
|
|
3729
3890
|
}
|
|
3730
3891
|
}
|
|
3731
3892
|
else if (knownTarget) {
|
|
@@ -3755,6 +3916,7 @@ export async function addAgentNativeSkill(parsed, options = {}) {
|
|
|
3755
3916
|
"--yes",
|
|
3756
3917
|
"@agent-native/skills@latest",
|
|
3757
3918
|
"add",
|
|
3919
|
+
"--quiet",
|
|
3758
3920
|
instructionSource,
|
|
3759
3921
|
"--copy",
|
|
3760
3922
|
...installTarget.skillNames.flatMap((skill) => ["--skill", skill]),
|
|
@@ -3784,7 +3946,7 @@ export async function addAgentNativeSkill(parsed, options = {}) {
|
|
|
3784
3946
|
commands.push(`npx @agent-native/core@latest app-skill ensure --manifest ${installTarget.loaded.file} --client ${parsed.client} --scope ${parsed.scope} --yes`);
|
|
3785
3947
|
if (!parsed.dryRun) {
|
|
3786
3948
|
const ensureResult = await ensureAppSkill(installTarget.loaded, {
|
|
3787
|
-
clients,
|
|
3949
|
+
clients: mcpClients,
|
|
3788
3950
|
scope: parsed.scope,
|
|
3789
3951
|
baseDir: options.baseDir,
|
|
3790
3952
|
yes: parsed.yes || Boolean(knownTarget),
|
|
@@ -3800,16 +3962,16 @@ export async function addAgentNativeSkill(parsed, options = {}) {
|
|
|
3800
3962
|
// does not hit an OAuth wall on the first tool call. `--no-connect`
|
|
3801
3963
|
// opts out; non-interactive shells get the exact command to run.
|
|
3802
3964
|
if (parsed.connect) {
|
|
3803
|
-
const result = await connectAfterEnsure(installTarget,
|
|
3965
|
+
const result = await connectAfterEnsure(installTarget, mcpClients, parsed, options);
|
|
3804
3966
|
connected = result.connected;
|
|
3805
3967
|
connectCommand = result.connectCommand || undefined;
|
|
3806
3968
|
if (connected)
|
|
3807
|
-
registeredMcpClients =
|
|
3969
|
+
registeredMcpClients = mcpClients;
|
|
3808
3970
|
if (connectCommand)
|
|
3809
3971
|
commands.push(connectCommand);
|
|
3810
3972
|
}
|
|
3811
3973
|
else {
|
|
3812
|
-
const pendingClients =
|
|
3974
|
+
const pendingClients = mcpClients.filter((client) => !registeredMcpClients.includes(client));
|
|
3813
3975
|
if (pendingClients.length > 0) {
|
|
3814
3976
|
connectCommand = connectCommandFor(installTarget.loaded.manifest.hosted.url, pendingClients, parsed.scope);
|
|
3815
3977
|
commands.push(connectCommand);
|
|
@@ -3835,6 +3997,7 @@ export async function addAgentNativeSkill(parsed, options = {}) {
|
|
|
3835
3997
|
const choice = await prompt({
|
|
3836
3998
|
workflowPath: prVisualRecapWorkflowDisplayPath(),
|
|
3837
3999
|
setupCommand: prVisualRecapSetupCommand(),
|
|
4000
|
+
docsUrl: PR_VISUAL_RECAP_DOCS_URL,
|
|
3838
4001
|
});
|
|
3839
4002
|
if (choice === null) {
|
|
3840
4003
|
options.telemetry?.track("skills_cli cancelled", {
|
|
@@ -3892,8 +4055,11 @@ export async function addAgentNativeSkill(parsed, options = {}) {
|
|
|
3892
4055
|
}
|
|
3893
4056
|
}
|
|
3894
4057
|
function listSkills(options = {}) {
|
|
4058
|
+
const hidden = hiddenBuiltInSkillTargets(options);
|
|
3895
4059
|
return [
|
|
3896
|
-
...Object.values(BUILT_IN_APP_SKILLS)
|
|
4060
|
+
...Object.values(BUILT_IN_APP_SKILLS)
|
|
4061
|
+
.filter((entry) => !hidden.has(entry.skillName))
|
|
4062
|
+
.map((entry) => ({
|
|
3897
4063
|
id: entry.manifest.id,
|
|
3898
4064
|
aliases: BUILT_IN_APP_SKILL_DISPLAY_ALIASES[entry.manifest.id] ?? [],
|
|
3899
4065
|
name: entry.manifest.displayName,
|
|
@@ -3946,6 +4112,15 @@ function planModeSummary(mode) {
|
|
|
3946
4112
|
return "Self-hosted/custom Plan app";
|
|
3947
4113
|
return "Hosted Plans - shareable links and comments";
|
|
3948
4114
|
}
|
|
4115
|
+
function skillInstructionAgentLabel(agent) {
|
|
4116
|
+
if (agent === "codex")
|
|
4117
|
+
return SKILL_INSTRUCTION_CLIENT_LABELS.codex;
|
|
4118
|
+
if (agent === "claude-code")
|
|
4119
|
+
return SKILL_INSTRUCTION_CLIENT_LABELS["claude-code"];
|
|
4120
|
+
if (agent === "pi")
|
|
4121
|
+
return SKILL_INSTRUCTION_CLIENT_LABELS.pi;
|
|
4122
|
+
return agent;
|
|
4123
|
+
}
|
|
3949
4124
|
function targetInstallsMcp(target, parsed) {
|
|
3950
4125
|
if (!parsed.mcp)
|
|
3951
4126
|
return false;
|
|
@@ -4223,6 +4398,7 @@ export async function runSkills(argv, options = {}) {
|
|
|
4223
4398
|
const choice = await prompt({
|
|
4224
4399
|
workflowPath: prVisualRecapWorkflowDisplayPath(),
|
|
4225
4400
|
setupCommand: prVisualRecapSetupCommand(),
|
|
4401
|
+
docsUrl: PR_VISUAL_RECAP_DOCS_URL,
|
|
4226
4402
|
});
|
|
4227
4403
|
if (choice === null) {
|
|
4228
4404
|
telemetry.track("skills_cli cancelled", { step: "github-action" });
|
|
@@ -4278,7 +4454,7 @@ export async function runSkills(argv, options = {}) {
|
|
|
4278
4454
|
];
|
|
4279
4455
|
const localCommands = [
|
|
4280
4456
|
...new Set(results
|
|
4281
|
-
.filter((result) => result.local)
|
|
4457
|
+
.filter((result) => result.local && result.scriptPath)
|
|
4282
4458
|
.flatMap((result) => result.commands)),
|
|
4283
4459
|
];
|
|
4284
4460
|
const planModes = [
|
|
@@ -4316,10 +4492,10 @@ export async function runSkills(argv, options = {}) {
|
|
|
4316
4492
|
const clack = await import("@clack/prompts");
|
|
4317
4493
|
const summary = [
|
|
4318
4494
|
skillsAgents.length
|
|
4319
|
-
? `Skill instructions ${skillsAgents.join(", ")}`
|
|
4495
|
+
? `Skill instructions ${skillsAgents.map(skillInstructionAgentLabel).join(", ")}`
|
|
4320
4496
|
: "Skill instructions skipped",
|
|
4321
4497
|
mcpClients.length
|
|
4322
|
-
? `MCP config ${mcpClients.join(", ")}`
|
|
4498
|
+
? `MCP config ${mcpClients.map((client) => CLIENT_LABELS[client]).join(", ")}`
|
|
4323
4499
|
: "MCP config not required",
|
|
4324
4500
|
mcpUrls.length ? `MCP URL ${mcpUrls.join(", ")}` : "",
|
|
4325
4501
|
planModes.length
|