@agent-native/core 0.72.3 → 0.73.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/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +38 -0
- package/corpus/core/docs/content/skills-guide.md +14 -0
- package/corpus/core/docs/content/template-clips.md +7 -1
- package/corpus/core/package.json +6 -6
- package/corpus/core/src/a2a/client.ts +7 -3
- package/corpus/core/src/agent/durable-background.ts +25 -12
- package/corpus/core/src/cli/create.ts +1 -1
- package/corpus/core/src/cli/skills.ts +450 -19
- package/corpus/core/src/client/api-path.ts +28 -0
- package/corpus/core/src/client/embed-auth.ts +26 -0
- package/corpus/core/src/client/mcp-app-host.ts +6 -0
- package/corpus/core/src/client/mcp-apps/McpAppRenderer.tsx +227 -33
- package/corpus/core/src/client/resources/use-mcp-servers.ts +1 -0
- package/corpus/core/src/client/settings/DemoModeSection.tsx +3 -1
- package/corpus/core/src/demo/fetch-interceptor.ts +1 -1
- package/corpus/core/src/embedding/agent.ts +6 -1
- package/corpus/core/src/embedding/bridge.ts +34 -1
- package/corpus/core/src/mcp/build-server.ts +38 -10
- package/corpus/core/src/mcp/embed-app.ts +120 -45
- package/corpus/core/src/mcp/index.ts +5 -0
- package/corpus/core/src/mcp/org-directory.ts +70 -11
- package/corpus/core/src/mcp/server.ts +14 -0
- package/corpus/core/src/mcp-client/config.ts +12 -0
- package/corpus/core/src/mcp-client/index.ts +2 -0
- package/corpus/core/src/mcp-client/manager.ts +268 -9
- package/corpus/core/src/mcp-client/remote-store.ts +154 -0
- package/corpus/core/src/mcp-client/routes.ts +2 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +8 -0
- package/corpus/core/src/server/auth.ts +7 -0
- package/corpus/core/src/server/index.ts +1 -0
- package/corpus/core/src/server/onboarding-html.ts +95 -9
- package/corpus/core/src/shared/mcp-embed-headers.ts +44 -3
- package/corpus/core/src/templates/default/AGENTS.md +4 -0
- package/corpus/core/src/templates/default/package.json +2 -1
- package/corpus/core/src/templates/headless/AGENTS.md +4 -0
- package/corpus/core/src/templates/headless/package.json +1 -0
- package/corpus/core/src/templates/workspace-root/AGENTS.md +4 -0
- package/corpus/core/src/templates/workspace-root/README.md +4 -0
- package/corpus/core/src/templates/workspace-root/package.json +1 -0
- package/corpus/core/src/vite/client.ts +53 -0
- package/corpus/templates/analytics/actions/update-dashboard.ts +3 -4
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +144 -40
- package/corpus/templates/analytics/app/global.css +15 -13
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +9 -32
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +0 -26
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +0 -23
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/pivot.ts +65 -2
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +3 -4
- package/corpus/templates/analytics/changelog/2026-06-24-dashboard-charts-now-fill-sparse-template-time-series-suppor.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-24-dashboard-rows-now-auto-fit-panels-so-one-two-or-three-chart.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-24-dashboard-traffic-tables-now-show-top-urls-and-shared-clips-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-24-first-party-signup-and-pageview-panels-now-honor-dashboard-filters.md +5 -0
- package/corpus/templates/analytics/changelog/2026-06-24-first-party-template-dashboards-now-include-repeat-users-ret.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-24-retention-charts-now-break-out-1-day-and-7-day-return-rates-.md +6 -0
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +256 -44
- package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +7 -2
- package/corpus/templates/analytics/server/lib/first-party-analytics.ts +35 -8
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +287 -42
- package/corpus/templates/assets/.agents/skills/a2a-assets/SKILL.md +17 -10
- package/corpus/templates/assets/.agents/skills/asset-generation/SKILL.md +15 -6
- package/corpus/templates/assets/AGENTS.md +7 -5
- package/corpus/templates/assets/actions/generate-asset.ts +161 -0
- package/corpus/templates/assets/actions/list-assets.ts +4 -2
- package/corpus/templates/assets/actions/open-asset-picker.ts +84 -3
- package/corpus/templates/assets/app/routes/library.tsx +243 -40
- package/corpus/templates/calendar/changelog/2026-06-23-added-a-heads-up-explaining-google-s-app-not-verified-screen.md +1 -1
- package/corpus/templates/calendar/server/plugins/auth.ts +12 -0
- package/corpus/templates/clips/.agents/skills/recording/SKILL.md +7 -7
- package/corpus/templates/clips/AGENTS.md +6 -2
- package/corpus/templates/clips/app/components/capture-install-options.tsx +20 -4
- package/corpus/templates/clips/app/components/player/player-controls.tsx +62 -32
- package/corpus/templates/clips/app/lib/capture-install-options.ts +39 -5
- package/corpus/templates/clips/app/routes/download.tsx +2 -2
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +1 -1
- package/corpus/templates/clips/changelog/2026-06-24-inline-slack-playback-controls-no-longer-shift-when-adjustin.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-24-shared-clips-now-expose-their-full-console-log-stream-all-le.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-24-shared-clips-now-expose-their-full-fetch-xhr-network-request.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-24-the-chrome-extension-option-now-only-appears-on-supported-hosts.md +5 -0
- package/corpus/templates/clips/chrome-extension/STORE_DRAFT.md +13 -8
- package/corpus/templates/clips/chrome-extension/public/manifest.json +1 -1
- package/corpus/templates/clips/chrome-extension/scripts/package.ts +15 -2
- package/corpus/templates/clips/chrome-extension/src/overlay.css +4 -25
- package/corpus/templates/clips/chrome-extension/src/overlay.ts +1 -3
- package/corpus/templates/clips/desktop/src-tauri/src/native_speech.rs +9 -0
- package/corpus/templates/clips/server/lib/public-agent-context.ts +67 -24
- package/corpus/templates/design/AGENTS.md +10 -5
- package/corpus/templates/design/actions/connect-assets-mcp.ts +131 -0
- package/corpus/templates/design/actions/insert-asset.ts +219 -0
- package/corpus/templates/design/actions/view-screen.ts +3 -1
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +1 -1
- package/corpus/templates/design/app/pages/DesignEditor.tsx +53 -0
- package/corpus/templates/design/server/plugins/agent-chat.ts +5 -1
- package/corpus/templates/design/server/plugins/assets-mcp.ts +60 -0
- package/corpus/templates/mail/server/plugins/auth.ts +4 -1
- package/corpus/templates/plan/app/pages/PlansPage.tsx +271 -197
- package/corpus/templates/plan/server/plan-content.ts +45 -2
- package/dist/a2a/client.d.ts +1 -0
- package/dist/a2a/client.d.ts.map +1 -1
- package/dist/a2a/client.js +5 -3
- package/dist/a2a/client.js.map +1 -1
- package/dist/agent/durable-background.d.ts +9 -4
- package/dist/agent/durable-background.d.ts.map +1 -1
- package/dist/agent/durable-background.js +24 -11
- package/dist/agent/durable-background.js.map +1 -1
- package/dist/cli/create.js +1 -1
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +361 -19
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/api-path.d.ts.map +1 -1
- package/dist/client/api-path.js +27 -0
- package/dist/client/api-path.js.map +1 -1
- package/dist/client/embed-auth.d.ts.map +1 -1
- package/dist/client/embed-auth.js +27 -0
- package/dist/client/embed-auth.js.map +1 -1
- package/dist/client/mcp-app-host.d.ts.map +1 -1
- package/dist/client/mcp-app-host.js +5 -0
- package/dist/client/mcp-app-host.js.map +1 -1
- package/dist/client/mcp-apps/McpAppRenderer.d.ts +1 -0
- package/dist/client/mcp-apps/McpAppRenderer.d.ts.map +1 -1
- package/dist/client/mcp-apps/McpAppRenderer.js +179 -33
- package/dist/client/mcp-apps/McpAppRenderer.js.map +1 -1
- package/dist/client/resources/use-mcp-servers.d.ts +1 -0
- package/dist/client/resources/use-mcp-servers.d.ts.map +1 -1
- package/dist/client/resources/use-mcp-servers.js.map +1 -1
- package/dist/client/settings/DemoModeSection.d.ts.map +1 -1
- package/dist/client/settings/DemoModeSection.js +3 -1
- package/dist/client/settings/DemoModeSection.js.map +1 -1
- package/dist/demo/fetch-interceptor.js +1 -1
- package/dist/demo/fetch-interceptor.js.map +1 -1
- package/dist/embedding/agent.d.ts +1 -1
- package/dist/embedding/agent.d.ts.map +1 -1
- package/dist/embedding/agent.js +1 -1
- package/dist/embedding/agent.js.map +1 -1
- package/dist/embedding/bridge.d.ts.map +1 -1
- package/dist/embedding/bridge.js +27 -1
- package/dist/embedding/bridge.js.map +1 -1
- package/dist/extensions/schema.d.ts +2 -2
- package/dist/mcp/build-server.d.ts +2 -0
- package/dist/mcp/build-server.d.ts.map +1 -1
- package/dist/mcp/build-server.js +32 -9
- package/dist/mcp/build-server.js.map +1 -1
- package/dist/mcp/embed-app.d.ts.map +1 -1
- package/dist/mcp/embed-app.js +120 -45
- package/dist/mcp/embed-app.js.map +1 -1
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +1 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/org-directory.d.ts +1 -0
- package/dist/mcp/org-directory.d.ts.map +1 -1
- package/dist/mcp/org-directory.js +59 -11
- package/dist/mcp/org-directory.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +9 -0
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp-client/config.d.ts +12 -0
- package/dist/mcp-client/config.d.ts.map +1 -1
- package/dist/mcp-client/config.js.map +1 -1
- package/dist/mcp-client/index.d.ts +1 -1
- package/dist/mcp-client/index.d.ts.map +1 -1
- package/dist/mcp-client/index.js +1 -1
- package/dist/mcp-client/index.js.map +1 -1
- package/dist/mcp-client/manager.d.ts +2 -0
- package/dist/mcp-client/manager.d.ts.map +1 -1
- package/dist/mcp-client/manager.js +201 -9
- package/dist/mcp-client/manager.js.map +1 -1
- package/dist/mcp-client/remote-store.d.ts +27 -0
- package/dist/mcp-client/remote-store.d.ts.map +1 -1
- package/dist/mcp-client/remote-store.js +105 -0
- package/dist/mcp-client/remote-store.js.map +1 -1
- package/dist/mcp-client/routes.d.ts +1 -0
- package/dist/mcp-client/routes.d.ts.map +1 -1
- package/dist/mcp-client/routes.js +1 -0
- package/dist/mcp-client/routes.js.map +1 -1
- package/dist/provider-api/actions/github-repo-files.d.ts +2 -2
- package/dist/provider-api/actions/query-staged-dataset.d.ts +3 -3
- package/dist/provider-api/corpus-jobs.d.ts +8 -8
- package/dist/server/agent-chat-plugin.d.ts +2 -0
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +8 -0
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/auth.d.ts +7 -0
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +1 -0
- package/dist/server/auth.js.map +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/onboarding-html.d.ts +15 -0
- package/dist/server/onboarding-html.d.ts.map +1 -1
- package/dist/server/onboarding-html.js +73 -9
- package/dist/server/onboarding-html.js.map +1 -1
- package/dist/shared/mcp-embed-headers.d.ts +3 -1
- package/dist/shared/mcp-embed-headers.d.ts.map +1 -1
- package/dist/shared/mcp-embed-headers.js +40 -3
- package/dist/shared/mcp-embed-headers.js.map +1 -1
- package/dist/sharing/actions/list-resource-shares.d.ts +1 -1
- package/dist/sharing/actions/set-resource-visibility.d.ts +2 -2
- package/dist/sharing/actions/share-resource.d.ts +1 -1
- package/dist/sharing/schema.d.ts +1 -1
- package/dist/templates/default/AGENTS.md +4 -0
- package/dist/templates/default/package.json +2 -1
- package/dist/templates/headless/AGENTS.md +4 -0
- package/dist/templates/headless/package.json +1 -0
- package/dist/templates/workspace-root/AGENTS.md +4 -0
- package/dist/templates/workspace-root/README.md +4 -0
- package/dist/templates/workspace-root/package.json +1 -0
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +44 -0
- package/dist/vite/client.js.map +1 -1
- package/docs/content/skills-guide.md +14 -0
- package/docs/content/template-clips.md +7 -1
- package/package.json +6 -6
- package/src/templates/default/AGENTS.md +4 -0
- package/src/templates/default/package.json +2 -1
- package/src/templates/headless/AGENTS.md +4 -0
- package/src/templates/headless/package.json +1 -0
- package/src/templates/workspace-root/AGENTS.md +4 -0
- package/src/templates/workspace-root/README.md +4 -0
- package/src/templates/workspace-root/package.json +1 -0
package/dist/cli/skills.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/cli/skills.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAKL,KAAK,gBAAgB,EAEtB,MAAM,gBAAgB,CAAC;AAUxB,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/cli/skills.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAKL,KAAK,gBAAgB,EAEtB,MAAM,gBAAgB,CAAC;AAUxB,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AA8rBjE,eAAO,MAAM,sBAAsB,m7fAQlC,CAAC;AA6WF,eAAO,MAAM,mBAAmB,yiQAQ/B,CAAC;AAEF,eAAO,MAAM,6BAA6B,8hYASzC,CAAC;AAEF,eAAO,MAAM,qBAAqB,+gIAOjC,CAAC;AAyBF,eAAO,MAAM,qBAAqB,umgCAghBjC,CAAC;AAEF,eAAO,MAAM,qBAAqB,murCAumBjC,CAAC;AAEF,eAAO,MAAM,mBAA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,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C;;;;;OAKG;IACH,SAAS,CAAC,EAAE,YAAY,CAAC;CAC1B;AAED,UAAU,yBAAyB;IACjC,cAAc,EAAE,wBAAwB,EAAE,CAAC;IAC3C,OAAO,EAAE,KAAK,CAAC;QACb,KAAK,EAAE,wBAAwB,CAAC;QAChC,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;IACH,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,UAAU,yBAAyB;IACjC,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChE;AAED,UAAU,+BAA+B;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,wBAAwB;IAChC,YAAY,EAAE,SAAS,GAAG,MAAM,CAAC;CAClC;AAED,UAAU,2BAA2B;IACnC,WAAW,EAAE,eAAe,CAAC;CAC9B;AAiqDD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,gBAAgB,CA8GhE;AAkiBD,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,gBAAgB,EACxB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,eAAe,CAAC,CA6Y1B;AAyQD,wBAAsB,SAAS,CAC7B,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC,CA8Zf"}
|
package/dist/cli/skills.js
CHANGED
|
@@ -15,12 +15,13 @@ import { resolveClients, runConnect, writeConnectClientPreferences, } from "./co
|
|
|
15
15
|
import { CONTEXT_XRAY_SKILL_MD, installLocalContextXray, } from "./context-xray-local.js";
|
|
16
16
|
import { CLIENTS } from "./mcp-config-writers.js";
|
|
17
17
|
import { PR_VISUAL_RECAP_SETUP, writePrVisualRecapWorkflow } from "./recap.js";
|
|
18
|
+
import { setupAgentSymlinks } from "./setup-agents.js";
|
|
18
19
|
const HELP = `npx @agent-native/core@latest skills
|
|
19
20
|
|
|
20
21
|
Usage:
|
|
21
22
|
npx @agent-native/core@latest skills list
|
|
22
|
-
npx @agent-native/core@latest skills status [assets|content|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|content|design-exploration|visual-plan|visual-recap|context-xray] [--client codex|claude-code|pi|all] [--scope user|project] [--dry-run] [--json]
|
|
23
|
+
npx @agent-native/core@latest skills status [assets|content|design-exploration|visual-plan|visual-recap|context-xray|scaffold] [--client codex|claude-code|pi|all] [--scope user|project] [--json]
|
|
24
|
+
npx @agent-native/core@latest skills update [assets|content|design-exploration|visual-plan|visual-recap|context-xray|scaffold] [--client codex|claude-code|pi|all] [--scope user|project] [--dry-run] [--json]
|
|
24
25
|
npx @agent-native/core@latest skills add assets|content|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
26
|
npx @agent-native/core@latest skills add <manifest-or-app-dir|skill-repo> [--skill <name>] [--client ...] [--yes]
|
|
26
27
|
|
|
@@ -35,6 +36,7 @@ Examples:
|
|
|
35
36
|
npx @agent-native/core@latest skills add visual-plan --mode self-hosted --mcp-url https://my-plan-app.example.com
|
|
36
37
|
npx @agent-native/core@latest skills status visual-plan
|
|
37
38
|
npx @agent-native/core@latest skills update visual-plan
|
|
39
|
+
npx @agent-native/core@latest skills update scaffold --project
|
|
38
40
|
npx @agent-native/core@latest skills add visual-plan --no-connect
|
|
39
41
|
npx @agent-native/core@latest skills add context-xray --client all
|
|
40
42
|
npx @agent-native/core@latest skills add assets --client claude-code
|
|
@@ -84,7 +86,10 @@ run "npx @agent-native/core@latest recap setup" / "npx @agent-native/core@latest
|
|
|
84
86
|
verify GitHub Actions. Docs: https://www.agent-native.com/docs/pr-visual-recap.
|
|
85
87
|
|
|
86
88
|
The status/update commands inspect copied Agent Native skill folders and refresh
|
|
87
|
-
their instruction files from the current @agent-native/core package
|
|
89
|
+
their instruction files from the current @agent-native/core package. In generated
|
|
90
|
+
apps/workspaces, "skills update scaffold --project" refreshes the framework
|
|
91
|
+
skills copied into the scaffold and repairs AGENTS.md / CLAUDE.md and
|
|
92
|
+
.agents/skills / .claude/skills compatibility links.`;
|
|
88
93
|
const ASSETS_SKILL_MD = `---
|
|
89
94
|
name: assets
|
|
90
95
|
description: >-
|
|
@@ -3099,7 +3104,302 @@ function skillSearchRoots(input) {
|
|
|
3099
3104
|
return true;
|
|
3100
3105
|
});
|
|
3101
3106
|
}
|
|
3107
|
+
const SCAFFOLD_GUIDANCE_TARGETS = new Set([
|
|
3108
|
+
"scaffold",
|
|
3109
|
+
"generated",
|
|
3110
|
+
"generated-app",
|
|
3111
|
+
"generated-workspace",
|
|
3112
|
+
"workspace",
|
|
3113
|
+
"workspace-core",
|
|
3114
|
+
"framework-guidance",
|
|
3115
|
+
]);
|
|
3116
|
+
function isScaffoldGuidanceTarget(value) {
|
|
3117
|
+
if (!value)
|
|
3118
|
+
return false;
|
|
3119
|
+
return SCAFFOLD_GUIDANCE_TARGETS.has(value.trim().toLowerCase());
|
|
3120
|
+
}
|
|
3121
|
+
function corePackageRootDir() {
|
|
3122
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
3123
|
+
return path.resolve(here, "../..");
|
|
3124
|
+
}
|
|
3125
|
+
function bundledScaffoldSkillsDir(templateName) {
|
|
3126
|
+
return path.join(corePackageRootDir(), "src", "templates", templateName, ".agents", "skills");
|
|
3127
|
+
}
|
|
3128
|
+
function readJsonRecord(file) {
|
|
3129
|
+
try {
|
|
3130
|
+
const parsed = JSON.parse(fs.readFileSync(file, "utf-8"));
|
|
3131
|
+
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
3132
|
+
return parsed;
|
|
3133
|
+
}
|
|
3134
|
+
}
|
|
3135
|
+
catch { }
|
|
3136
|
+
return undefined;
|
|
3137
|
+
}
|
|
3138
|
+
function readPackageJson(dir) {
|
|
3139
|
+
return readJsonRecord(path.join(dir, "package.json"));
|
|
3140
|
+
}
|
|
3141
|
+
function packageName(pkg) {
|
|
3142
|
+
return typeof pkg?.name === "string" ? pkg.name : null;
|
|
3143
|
+
}
|
|
3144
|
+
function workspaceCorePackageName(pkg) {
|
|
3145
|
+
const agentNative = pkg?.["agent-native"];
|
|
3146
|
+
if (agentNative &&
|
|
3147
|
+
typeof agentNative === "object" &&
|
|
3148
|
+
!Array.isArray(agentNative) &&
|
|
3149
|
+
typeof agentNative.workspaceCore === "string") {
|
|
3150
|
+
return agentNative.workspaceCore;
|
|
3151
|
+
}
|
|
3152
|
+
return null;
|
|
3153
|
+
}
|
|
3154
|
+
function hasAgentNativeCoreDependency(pkg) {
|
|
3155
|
+
for (const field of ["dependencies", "devDependencies", "peerDependencies"]) {
|
|
3156
|
+
const deps = pkg?.[field];
|
|
3157
|
+
if (deps &&
|
|
3158
|
+
typeof deps === "object" &&
|
|
3159
|
+
!Array.isArray(deps) &&
|
|
3160
|
+
"@agent-native/core" in deps) {
|
|
3161
|
+
return true;
|
|
3162
|
+
}
|
|
3163
|
+
}
|
|
3164
|
+
return false;
|
|
3165
|
+
}
|
|
3166
|
+
function findWorkspaceCorePackageDir(workspaceRoot, workspaceCoreName) {
|
|
3167
|
+
const packagesDir = path.join(workspaceRoot, "packages");
|
|
3168
|
+
if (!fs.existsSync(packagesDir))
|
|
3169
|
+
return undefined;
|
|
3170
|
+
for (const entry of fs.readdirSync(packagesDir, { withFileTypes: true })) {
|
|
3171
|
+
if (!entry.isDirectory())
|
|
3172
|
+
continue;
|
|
3173
|
+
const candidate = path.join(packagesDir, entry.name);
|
|
3174
|
+
if (packageName(readPackageJson(candidate)) === workspaceCoreName) {
|
|
3175
|
+
return candidate;
|
|
3176
|
+
}
|
|
3177
|
+
}
|
|
3178
|
+
const fallback = path.join(workspaceRoot, "packages", "shared");
|
|
3179
|
+
return fs.existsSync(path.join(fallback, "package.json"))
|
|
3180
|
+
? fallback
|
|
3181
|
+
: undefined;
|
|
3182
|
+
}
|
|
3183
|
+
function findGeneratedWorkspace(startDir) {
|
|
3184
|
+
let current = path.resolve(startDir);
|
|
3185
|
+
while (true) {
|
|
3186
|
+
const pkg = readPackageJson(current);
|
|
3187
|
+
const workspaceCoreName = workspaceCorePackageName(pkg);
|
|
3188
|
+
if (workspaceCoreName && fs.existsSync(path.join(current, "apps"))) {
|
|
3189
|
+
const sharedPackageDir = findWorkspaceCorePackageDir(current, workspaceCoreName);
|
|
3190
|
+
if (sharedPackageDir) {
|
|
3191
|
+
return { workspaceRoot: current, sharedPackageDir };
|
|
3192
|
+
}
|
|
3193
|
+
}
|
|
3194
|
+
const parent = path.dirname(current);
|
|
3195
|
+
if (parent === current)
|
|
3196
|
+
break;
|
|
3197
|
+
current = parent;
|
|
3198
|
+
}
|
|
3199
|
+
return undefined;
|
|
3200
|
+
}
|
|
3201
|
+
function detectStandaloneScaffoldTemplate(projectRoot) {
|
|
3202
|
+
const pkg = readPackageJson(projectRoot);
|
|
3203
|
+
if (!hasAgentNativeCoreDependency(pkg))
|
|
3204
|
+
return undefined;
|
|
3205
|
+
if (!fs.existsSync(path.join(projectRoot, ".agents", "skills"))) {
|
|
3206
|
+
return undefined;
|
|
3207
|
+
}
|
|
3208
|
+
const hasAppDir = fs.existsSync(path.join(projectRoot, "app"));
|
|
3209
|
+
const hasHeadlessHello = fs.existsSync(path.join(projectRoot, "actions", "hello.ts"));
|
|
3210
|
+
if (!hasAppDir && hasHeadlessHello)
|
|
3211
|
+
return "headless";
|
|
3212
|
+
const looksLikeDefaultTemplate = fs.existsSync(path.join(projectRoot, "app", "routes", "database.tsx")) &&
|
|
3213
|
+
fs.existsSync(path.join(projectRoot, "app", "routes", "_index.tsx")) &&
|
|
3214
|
+
fs.existsSync(path.join(projectRoot, "actions", "view-screen.ts"));
|
|
3215
|
+
return looksLikeDefaultTemplate ? "default" : undefined;
|
|
3216
|
+
}
|
|
3217
|
+
function listImmediateSkillDirs(dir) {
|
|
3218
|
+
if (!fs.existsSync(dir))
|
|
3219
|
+
return [];
|
|
3220
|
+
return fs
|
|
3221
|
+
.readdirSync(dir, { withFileTypes: true })
|
|
3222
|
+
.filter((entry) => entry.isDirectory())
|
|
3223
|
+
.map((entry) => entry.name)
|
|
3224
|
+
.sort();
|
|
3225
|
+
}
|
|
3226
|
+
function skillDirContentsMatch(sourceDir, targetDir) {
|
|
3227
|
+
const expected = listSkillFolderFiles(sourceDir);
|
|
3228
|
+
const actual = listSkillFolderFiles(targetDir);
|
|
3229
|
+
const expectedFiles = Object.keys(expected).sort();
|
|
3230
|
+
const actualFiles = Object.keys(actual).sort();
|
|
3231
|
+
if (expectedFiles.length !== actualFiles.length)
|
|
3232
|
+
return false;
|
|
3233
|
+
for (let i = 0; i < expectedFiles.length; i += 1) {
|
|
3234
|
+
if (expectedFiles[i] !== actualFiles[i])
|
|
3235
|
+
return false;
|
|
3236
|
+
}
|
|
3237
|
+
return expectedFiles.every((file) => expected[file] === actual[file]);
|
|
3238
|
+
}
|
|
3239
|
+
function scaffoldGuidanceCurrent(sourceRoot, targetRoot) {
|
|
3240
|
+
const skills = listImmediateSkillDirs(sourceRoot);
|
|
3241
|
+
if (skills.length === 0)
|
|
3242
|
+
return false;
|
|
3243
|
+
return skills.every((skill) => skillDirContentsMatch(path.join(sourceRoot, skill), path.join(targetRoot, skill)));
|
|
3244
|
+
}
|
|
3245
|
+
function collectScaffoldGuidanceStates(parsed, options) {
|
|
3246
|
+
if (parsed.target && !isScaffoldGuidanceTarget(parsed.target))
|
|
3247
|
+
return [];
|
|
3248
|
+
if (parsed.scopeExplicit && parsed.scope !== "project")
|
|
3249
|
+
return [];
|
|
3250
|
+
const baseDir = path.resolve(options.baseDir ?? process.cwd());
|
|
3251
|
+
const workspace = findGeneratedWorkspace(baseDir);
|
|
3252
|
+
if (workspace) {
|
|
3253
|
+
const sourcePath = bundledScaffoldSkillsDir("workspace-core");
|
|
3254
|
+
const targetPath = path.join(workspace.sharedPackageDir, ".agents", "skills");
|
|
3255
|
+
if (!fs.existsSync(sourcePath))
|
|
3256
|
+
return [];
|
|
3257
|
+
return [
|
|
3258
|
+
{
|
|
3259
|
+
kind: "workspace-core",
|
|
3260
|
+
displayName: "Generated workspace framework skills",
|
|
3261
|
+
templateName: "workspace-core",
|
|
3262
|
+
path: targetPath,
|
|
3263
|
+
sourcePath,
|
|
3264
|
+
projectRoot: workspace.workspaceRoot,
|
|
3265
|
+
workspaceRoot: workspace.workspaceRoot,
|
|
3266
|
+
sharedPackageDir: workspace.sharedPackageDir,
|
|
3267
|
+
current: scaffoldGuidanceCurrent(sourcePath, targetPath),
|
|
3268
|
+
skillCount: listImmediateSkillDirs(sourcePath).length,
|
|
3269
|
+
},
|
|
3270
|
+
];
|
|
3271
|
+
}
|
|
3272
|
+
const templateName = detectStandaloneScaffoldTemplate(baseDir);
|
|
3273
|
+
if (!templateName)
|
|
3274
|
+
return [];
|
|
3275
|
+
const sourcePath = bundledScaffoldSkillsDir(templateName);
|
|
3276
|
+
const targetPath = path.join(baseDir, ".agents", "skills");
|
|
3277
|
+
if (!fs.existsSync(sourcePath))
|
|
3278
|
+
return [];
|
|
3279
|
+
return [
|
|
3280
|
+
{
|
|
3281
|
+
kind: "standalone",
|
|
3282
|
+
displayName: `Generated ${templateName} app framework skills`,
|
|
3283
|
+
templateName,
|
|
3284
|
+
path: targetPath,
|
|
3285
|
+
sourcePath,
|
|
3286
|
+
projectRoot: baseDir,
|
|
3287
|
+
current: scaffoldGuidanceCurrent(sourcePath, targetPath),
|
|
3288
|
+
skillCount: listImmediateSkillDirs(sourcePath).length,
|
|
3289
|
+
},
|
|
3290
|
+
];
|
|
3291
|
+
}
|
|
3292
|
+
function copyScaffoldGuidanceSkills(sourceRoot, targetRoot) {
|
|
3293
|
+
fs.mkdirSync(targetRoot, { recursive: true });
|
|
3294
|
+
for (const skill of listImmediateSkillDirs(sourceRoot)) {
|
|
3295
|
+
const targetSkillDir = path.join(targetRoot, skill);
|
|
3296
|
+
if (fs.existsSync(targetSkillDir) &&
|
|
3297
|
+
fs.lstatSync(targetSkillDir).isSymbolicLink()) {
|
|
3298
|
+
continue;
|
|
3299
|
+
}
|
|
3300
|
+
fs.rmSync(targetSkillDir, { recursive: true, force: true });
|
|
3301
|
+
fs.cpSync(path.join(sourceRoot, skill), targetSkillDir, {
|
|
3302
|
+
recursive: true,
|
|
3303
|
+
});
|
|
3304
|
+
}
|
|
3305
|
+
}
|
|
3306
|
+
function updateScaffoldGuidanceStates(states, dryRun) {
|
|
3307
|
+
const updated = [];
|
|
3308
|
+
for (const state of states) {
|
|
3309
|
+
if (state.current)
|
|
3310
|
+
continue;
|
|
3311
|
+
if (!dryRun) {
|
|
3312
|
+
copyScaffoldGuidanceSkills(state.sourcePath, state.path);
|
|
3313
|
+
}
|
|
3314
|
+
updated.push({
|
|
3315
|
+
...state,
|
|
3316
|
+
current: !dryRun,
|
|
3317
|
+
});
|
|
3318
|
+
}
|
|
3319
|
+
return updated;
|
|
3320
|
+
}
|
|
3321
|
+
function ensureWorkspaceRootSkillsLink(workspaceRoot, sharedPackageDir) {
|
|
3322
|
+
const sharedSkillsDir = path.join(sharedPackageDir, ".agents", "skills");
|
|
3323
|
+
if (!fs.existsSync(sharedSkillsDir))
|
|
3324
|
+
return;
|
|
3325
|
+
const agentsDir = path.join(workspaceRoot, ".agents");
|
|
3326
|
+
const linkPath = path.join(agentsDir, "skills");
|
|
3327
|
+
const target = path.relative(agentsDir, sharedSkillsDir);
|
|
3328
|
+
fs.mkdirSync(agentsDir, { recursive: true });
|
|
3329
|
+
try {
|
|
3330
|
+
const stat = fs.lstatSync(linkPath);
|
|
3331
|
+
if (stat.isSymbolicLink()) {
|
|
3332
|
+
if (fs.readlinkSync(linkPath) === target)
|
|
3333
|
+
return;
|
|
3334
|
+
fs.unlinkSync(linkPath);
|
|
3335
|
+
}
|
|
3336
|
+
else {
|
|
3337
|
+
copyScaffoldGuidanceSkills(sharedSkillsDir, linkPath);
|
|
3338
|
+
return;
|
|
3339
|
+
}
|
|
3340
|
+
}
|
|
3341
|
+
catch { }
|
|
3342
|
+
try {
|
|
3343
|
+
fs.symlinkSync(target, linkPath, process.platform === "win32" ? "junction" : "dir");
|
|
3344
|
+
}
|
|
3345
|
+
catch {
|
|
3346
|
+
try {
|
|
3347
|
+
fs.cpSync(sharedSkillsDir, linkPath, { recursive: true });
|
|
3348
|
+
}
|
|
3349
|
+
catch { }
|
|
3350
|
+
}
|
|
3351
|
+
}
|
|
3352
|
+
function refreshCopiedClaudeSkills(projectRoot) {
|
|
3353
|
+
const agentsSkillsDir = path.join(projectRoot, ".agents", "skills");
|
|
3354
|
+
const claudeSkillsDir = path.join(projectRoot, ".claude", "skills");
|
|
3355
|
+
if (!fs.existsSync(agentsSkillsDir) || !fs.existsSync(claudeSkillsDir)) {
|
|
3356
|
+
return;
|
|
3357
|
+
}
|
|
3358
|
+
try {
|
|
3359
|
+
if (fs.lstatSync(claudeSkillsDir).isSymbolicLink())
|
|
3360
|
+
return;
|
|
3361
|
+
copyScaffoldGuidanceSkills(agentsSkillsDir, claudeSkillsDir);
|
|
3362
|
+
}
|
|
3363
|
+
catch { }
|
|
3364
|
+
}
|
|
3365
|
+
function repairScaffoldAgentLinks(states) {
|
|
3366
|
+
const seen = new Set();
|
|
3367
|
+
for (const state of states) {
|
|
3368
|
+
if (state.workspaceRoot && state.sharedPackageDir) {
|
|
3369
|
+
const key = `workspace:${state.workspaceRoot}`;
|
|
3370
|
+
if (seen.has(key))
|
|
3371
|
+
continue;
|
|
3372
|
+
seen.add(key);
|
|
3373
|
+
ensureWorkspaceRootSkillsLink(state.workspaceRoot, state.sharedPackageDir);
|
|
3374
|
+
setupAgentSymlinks(state.workspaceRoot);
|
|
3375
|
+
refreshCopiedClaudeSkills(state.workspaceRoot);
|
|
3376
|
+
setupAgentSymlinks(state.sharedPackageDir);
|
|
3377
|
+
refreshCopiedClaudeSkills(state.sharedPackageDir);
|
|
3378
|
+
const appsDir = path.join(state.workspaceRoot, "apps");
|
|
3379
|
+
if (fs.existsSync(appsDir)) {
|
|
3380
|
+
for (const entry of fs.readdirSync(appsDir, { withFileTypes: true })) {
|
|
3381
|
+
if (!entry.isDirectory())
|
|
3382
|
+
continue;
|
|
3383
|
+
const appDir = path.join(appsDir, entry.name);
|
|
3384
|
+
if (fs.existsSync(path.join(appDir, "package.json"))) {
|
|
3385
|
+
setupAgentSymlinks(appDir);
|
|
3386
|
+
refreshCopiedClaudeSkills(appDir);
|
|
3387
|
+
}
|
|
3388
|
+
}
|
|
3389
|
+
}
|
|
3390
|
+
continue;
|
|
3391
|
+
}
|
|
3392
|
+
const key = `standalone:${state.projectRoot}`;
|
|
3393
|
+
if (seen.has(key))
|
|
3394
|
+
continue;
|
|
3395
|
+
seen.add(key);
|
|
3396
|
+
setupAgentSymlinks(state.projectRoot);
|
|
3397
|
+
refreshCopiedClaudeSkills(state.projectRoot);
|
|
3398
|
+
}
|
|
3399
|
+
}
|
|
3102
3400
|
function targetIdsForStatus(parsed) {
|
|
3401
|
+
if (isScaffoldGuidanceTarget(parsed.target))
|
|
3402
|
+
return [];
|
|
3103
3403
|
if (!parsed.target) {
|
|
3104
3404
|
return Object.keys(BUILT_IN_APP_SKILLS).filter((id) => !isLocalOnlyBuiltInSkill(BUILT_IN_APP_SKILLS[id]));
|
|
3105
3405
|
}
|
|
@@ -4677,6 +4977,25 @@ function formatSkillState(state) {
|
|
|
4677
4977
|
: "";
|
|
4678
4978
|
return `${state.skillName.padEnd(22)} ${status.padEnd(7)} ${state.scope}/${state.client} ${managed}${hashes}\n ${state.path}`;
|
|
4679
4979
|
}
|
|
4980
|
+
function scaffoldStateJson(state) {
|
|
4981
|
+
return {
|
|
4982
|
+
kind: state.kind,
|
|
4983
|
+
displayName: state.displayName,
|
|
4984
|
+
templateName: state.templateName,
|
|
4985
|
+
path: state.path,
|
|
4986
|
+
sourcePath: state.sourcePath,
|
|
4987
|
+
projectRoot: state.projectRoot,
|
|
4988
|
+
workspaceRoot: state.workspaceRoot,
|
|
4989
|
+
sharedPackageDir: state.sharedPackageDir,
|
|
4990
|
+
skillCount: state.skillCount,
|
|
4991
|
+
status: state.current ? "current" : "stale",
|
|
4992
|
+
managed: true,
|
|
4993
|
+
};
|
|
4994
|
+
}
|
|
4995
|
+
function formatScaffoldState(state) {
|
|
4996
|
+
const status = state.current ? "current" : "stale";
|
|
4997
|
+
return `${"scaffold".padEnd(22)} ${status.padEnd(7)} project/${state.kind} managed (${state.skillCount} skills)\n ${state.path}`;
|
|
4998
|
+
}
|
|
4680
4999
|
function planModeSummary(mode) {
|
|
4681
5000
|
if (mode === "local-files")
|
|
4682
5001
|
return "Local files - no hosted writes by default";
|
|
@@ -4743,42 +5062,65 @@ function hasManagedInstructionBlock(skillNames) {
|
|
|
4743
5062
|
return skillNames.some((name) => Boolean(instructionContentForSkill(name)));
|
|
4744
5063
|
}
|
|
4745
5064
|
function runSkillsStatusOrUpdate(parsed, options, update) {
|
|
4746
|
-
const
|
|
4747
|
-
const
|
|
4748
|
-
const
|
|
5065
|
+
const skillBefore = collectSkillInstallStates(parsed, options);
|
|
5066
|
+
const scaffoldBefore = collectScaffoldGuidanceStates(parsed, options);
|
|
5067
|
+
const skillChanged = update
|
|
5068
|
+
? updateSkillInstallStates(skillBefore, parsed.dryRun)
|
|
5069
|
+
: [];
|
|
5070
|
+
const scaffoldChanged = update
|
|
5071
|
+
? updateScaffoldGuidanceStates(scaffoldBefore, parsed.dryRun)
|
|
5072
|
+
: [];
|
|
5073
|
+
if (update && !parsed.dryRun && scaffoldChanged.length > 0) {
|
|
5074
|
+
repairScaffoldAgentLinks(scaffoldChanged);
|
|
5075
|
+
}
|
|
5076
|
+
const skillAfter = update && !parsed.dryRun
|
|
4749
5077
|
? collectSkillInstallStates(parsed, options)
|
|
4750
|
-
:
|
|
5078
|
+
: skillBefore;
|
|
5079
|
+
const scaffoldAfter = update && !parsed.dryRun
|
|
5080
|
+
? collectScaffoldGuidanceStates(parsed, options)
|
|
5081
|
+
: scaffoldBefore;
|
|
5082
|
+
const beforeCount = skillBefore.length + scaffoldBefore.length;
|
|
5083
|
+
const changedCount = skillChanged.length + scaffoldChanged.length;
|
|
4751
5084
|
if (parsed.printJson) {
|
|
4752
|
-
const
|
|
5085
|
+
const outputSkillStates = update && !parsed.dryRun ? skillAfter : skillBefore;
|
|
5086
|
+
const outputScaffoldStates = update && !parsed.dryRun ? scaffoldAfter : scaffoldBefore;
|
|
4753
5087
|
process.stdout.write(`${JSON.stringify({
|
|
4754
5088
|
ok: true,
|
|
4755
5089
|
command: parsed.command,
|
|
4756
5090
|
dryRun: parsed.dryRun,
|
|
4757
|
-
found:
|
|
4758
|
-
stale:
|
|
4759
|
-
|
|
4760
|
-
|
|
5091
|
+
found: beforeCount,
|
|
5092
|
+
stale: outputSkillStates.filter((state) => !state.current).length +
|
|
5093
|
+
outputScaffoldStates.filter((state) => !state.current).length,
|
|
5094
|
+
updated: changedCount,
|
|
5095
|
+
skills: outputSkillStates.map(skillStateJson),
|
|
5096
|
+
scaffold: outputScaffoldStates.map(scaffoldStateJson),
|
|
4761
5097
|
}, null, 2)}\n`);
|
|
4762
5098
|
return;
|
|
4763
5099
|
}
|
|
4764
|
-
if (
|
|
5100
|
+
if (beforeCount === 0) {
|
|
4765
5101
|
const target = parsed.target ? ` for ${parsed.target}` : "";
|
|
4766
|
-
|
|
5102
|
+
const hint = isScaffoldGuidanceTarget(parsed.target)
|
|
5103
|
+
? `Run this from a generated Agent Native app or workspace root.\n`
|
|
5104
|
+
: `Run "npx @agent-native/core@latest skills add ${parsed.target ?? "visual-plan"}" to install one.\n`;
|
|
5105
|
+
process.stdout.write(`No installed Agent Native skill copies found${target}.\n${hint}`);
|
|
4767
5106
|
return;
|
|
4768
5107
|
}
|
|
4769
5108
|
if (update) {
|
|
4770
5109
|
if (parsed.dryRun) {
|
|
4771
|
-
process.stdout.write(
|
|
4772
|
-
? `Would update ${
|
|
5110
|
+
process.stdout.write(changedCount
|
|
5111
|
+
? `Would update ${changedCount} skill folder${changedCount === 1 ? "" : "s"}:\n`
|
|
4773
5112
|
: "All discovered skill folders are already current.\n");
|
|
4774
5113
|
}
|
|
4775
5114
|
else {
|
|
4776
|
-
process.stdout.write(
|
|
4777
|
-
? `Updated ${
|
|
5115
|
+
process.stdout.write(changedCount
|
|
5116
|
+
? `Updated ${changedCount} skill folder${changedCount === 1 ? "" : "s"}.\n`
|
|
4778
5117
|
: "All discovered skill folders are already current.\n");
|
|
4779
5118
|
}
|
|
4780
5119
|
}
|
|
4781
|
-
const rows =
|
|
5120
|
+
const rows = [
|
|
5121
|
+
...(update && parsed.dryRun ? skillBefore : skillAfter).map(formatSkillState),
|
|
5122
|
+
...(update && parsed.dryRun ? scaffoldBefore : scaffoldAfter).map(formatScaffoldState),
|
|
5123
|
+
];
|
|
4782
5124
|
process.stdout.write(`${rows.join("\n")}\n`);
|
|
4783
5125
|
}
|
|
4784
5126
|
/**
|