@agent-native/core 0.45.0 → 0.45.1

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.
Files changed (93) hide show
  1. package/dist/action.d.ts +8 -1
  2. package/dist/action.d.ts.map +1 -1
  3. package/dist/action.js +20 -10
  4. package/dist/action.js.map +1 -1
  5. package/dist/cli/app-skill.d.ts +3 -1
  6. package/dist/cli/app-skill.d.ts.map +1 -1
  7. package/dist/cli/app-skill.js +50 -8
  8. package/dist/cli/app-skill.js.map +1 -1
  9. package/dist/cli/connect.d.ts.map +1 -1
  10. package/dist/cli/connect.js +39 -5
  11. package/dist/cli/connect.js.map +1 -1
  12. package/dist/cli/create.d.ts.map +1 -1
  13. package/dist/cli/create.js +9 -7
  14. package/dist/cli/create.js.map +1 -1
  15. package/dist/cli/index.js +42 -10
  16. package/dist/cli/index.js.map +1 -1
  17. package/dist/cli/mcp-config-writers.d.ts +10 -0
  18. package/dist/cli/mcp-config-writers.d.ts.map +1 -1
  19. package/dist/cli/mcp-config-writers.js +60 -6
  20. package/dist/cli/mcp-config-writers.js.map +1 -1
  21. package/dist/cli/mcp.d.ts.map +1 -1
  22. package/dist/cli/mcp.js +4 -6
  23. package/dist/cli/mcp.js.map +1 -1
  24. package/dist/cli/plan-local.d.ts.map +1 -1
  25. package/dist/cli/plan-local.js +15 -2
  26. package/dist/cli/plan-local.js.map +1 -1
  27. package/dist/cli/plan-publish-store.d.ts +17 -7
  28. package/dist/cli/plan-publish-store.d.ts.map +1 -1
  29. package/dist/cli/plan-publish-store.js +33 -8
  30. package/dist/cli/plan-publish-store.js.map +1 -1
  31. package/dist/cli/pr-visual-recap-workflow.d.ts +1 -1
  32. package/dist/cli/pr-visual-recap-workflow.d.ts.map +1 -1
  33. package/dist/cli/pr-visual-recap-workflow.js +1 -1
  34. package/dist/cli/pr-visual-recap-workflow.js.map +1 -1
  35. package/dist/cli/recap.d.ts +63 -5
  36. package/dist/cli/recap.d.ts.map +1 -1
  37. package/dist/cli/recap.js +641 -48
  38. package/dist/cli/recap.js.map +1 -1
  39. package/dist/cli/skills.d.ts +26 -11
  40. package/dist/cli/skills.d.ts.map +1 -1
  41. package/dist/cli/skills.js +644 -972
  42. package/dist/cli/skills.js.map +1 -1
  43. package/dist/cli/templates-meta.d.ts.map +1 -1
  44. package/dist/cli/templates-meta.js +3 -2
  45. package/dist/cli/templates-meta.js.map +1 -1
  46. package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts.map +1 -1
  47. package/dist/client/blocks/library/AnnotatedCodeBlock.js +37 -9
  48. package/dist/client/blocks/library/AnnotatedCodeBlock.js.map +1 -1
  49. package/dist/client/blocks/library/DiffBlock.d.ts.map +1 -1
  50. package/dist/client/blocks/library/DiffBlock.js +44 -12
  51. package/dist/client/blocks/library/DiffBlock.js.map +1 -1
  52. package/dist/client/blocks/library/annotation-rail.d.ts +12 -3
  53. package/dist/client/blocks/library/annotation-rail.d.ts.map +1 -1
  54. package/dist/client/blocks/library/annotation-rail.js +29 -3
  55. package/dist/client/blocks/library/annotation-rail.js.map +1 -1
  56. package/dist/client/blocks/library/html.d.ts.map +1 -1
  57. package/dist/client/blocks/library/html.js +3 -1
  58. package/dist/client/blocks/library/html.js.map +1 -1
  59. package/dist/client/blocks/library/question-form.d.ts.map +1 -1
  60. package/dist/client/blocks/library/question-form.js +4 -1
  61. package/dist/client/blocks/library/question-form.js.map +1 -1
  62. package/dist/db/migrations.d.ts.map +1 -1
  63. package/dist/db/migrations.js +2 -1
  64. package/dist/db/migrations.js.map +1 -1
  65. package/dist/extensions/routes.d.ts +18 -0
  66. package/dist/extensions/routes.d.ts.map +1 -1
  67. package/dist/extensions/routes.js +30 -8
  68. package/dist/extensions/routes.js.map +1 -1
  69. package/dist/oauth-tokens/store.d.ts.map +1 -1
  70. package/dist/oauth-tokens/store.js +42 -5
  71. package/dist/oauth-tokens/store.js.map +1 -1
  72. package/dist/scripts/db/index.d.ts.map +1 -1
  73. package/dist/scripts/db/index.js +1 -0
  74. package/dist/scripts/db/index.js.map +1 -1
  75. package/dist/scripts/db/migrate-encrypt-oauth-tokens.d.ts +28 -0
  76. package/dist/scripts/db/migrate-encrypt-oauth-tokens.d.ts.map +1 -0
  77. package/dist/scripts/db/migrate-encrypt-oauth-tokens.js +164 -0
  78. package/dist/scripts/db/migrate-encrypt-oauth-tokens.js.map +1 -0
  79. package/dist/scripts/db/scoping.d.ts.map +1 -1
  80. package/dist/scripts/db/scoping.js +7 -5
  81. package/dist/scripts/db/scoping.js.map +1 -1
  82. package/dist/secrets/index.d.ts +1 -0
  83. package/dist/secrets/index.d.ts.map +1 -1
  84. package/dist/secrets/index.js +4 -0
  85. package/dist/secrets/index.js.map +1 -1
  86. package/dist/sharing/actions/set-resource-visibility.d.ts.map +1 -1
  87. package/dist/sharing/actions/set-resource-visibility.js +4 -1
  88. package/dist/sharing/actions/set-resource-visibility.js.map +1 -1
  89. package/docs/content/plan-plugin.md +21 -6
  90. package/docs/content/pr-visual-recap.md +52 -3
  91. package/docs/content/skills-guide.md +13 -0
  92. package/docs/content/template-plan.md +18 -7
  93. package/package.json +5 -1
@@ -12,7 +12,7 @@ The Agent-Native **Plan** app ships as one installable bundle. A single install
12
12
  One install gives you:
13
13
 
14
14
  - **Two skills** — `/visual-plan` (the canonical entry point) and `/visual-recap`.
15
- - **The Plan MCP connector** — registered against the hosted app at `https://plan.agent-native.com` (MCP endpoint `https://plan.agent-native.com/_agent-native/mcp`, server name `agent-native-plans`).
15
+ - **The Plan MCP connector** — registered against the hosted app at `https://plan.agent-native.com` (MCP endpoint `https://plan.agent-native.com/_agent-native/mcp`, server name `plan`, with legacy alias `agent-native-plans` during migration).
16
16
 
17
17
  By default, both skills publish to the hosted Plan app — they create a plan via
18
18
  the MCP connector and hand you a link or inline plan to review. They never dump
@@ -49,14 +49,27 @@ npx @agent-native/core@latest skills add visual-plan
49
49
  agent-native skills add visual-plan
50
50
  ```
51
51
 
52
- This installs `visual-plan` plus the companion `visual-recap` skill, then registers the `agent-native-plans` connector and runs auth (OAuth prompt for hosted/account-backed sharing). Useful flags:
52
+ This installs `visual-plan` plus the companion `visual-recap` skill, then registers the `plan` connector and its legacy `agent-native-plans` alias, then runs auth (OAuth prompt for hosted/account-backed sharing). Useful flags:
53
53
 
54
54
  - `--client codex|claude-code|claude-code-cli|cowork|all` — which local agents to write the MCP config for (default `codex`).
55
55
  - `--no-connect` — register the connector without authenticating; run `agent-native connect https://plan.agent-native.com` later.
56
56
  - `--mcp-url <url>` — point the connector at a custom origin (an ngrok tunnel, a local dev server, or a self-hosted deployment) instead of the hosted default.
57
57
  - `--with-github-action` — also write the PR Visual Recap GitHub Action (see [PR Visual Recap](/docs/pr-visual-recap)).
58
58
 
59
- After it finishes, restart or reload the agent client so the new skills and tools load, then run `/visual-plan`.
59
+ Interactive installs also offer the PR Visual Recap Action when no workflow is
60
+ present. Say yes to add it during skill setup, or run the command above later
61
+ with `--with-github-action`. After the workflow is written, run:
62
+
63
+ ```bash
64
+ agent-native recap setup
65
+ agent-native recap doctor
66
+ ```
67
+
68
+ `recap setup` configures the GitHub Action secrets and variables where possible,
69
+ and `recap doctor` verifies the workflow, local publish token, GitHub repo
70
+ access, and required Actions configuration. After install finishes, restart or
71
+ reload the agent client so the new skills and tools load, then run
72
+ `/visual-plan`.
60
73
 
61
74
  > Note: the bare `npx skills add BuilderIO/agent-native --skill visual-plan` (Vercel/open Skills CLI) installs **instructions only** — it does not register the MCP connector. Use the Agent-Native CLI above when you want the connector wired up too.
62
75
 
@@ -82,10 +95,12 @@ The same repo is a Codex plugin marketplace. Add it, install the plugin, then au
82
95
  ```bash
83
96
  codex plugin marketplace add BuilderIO/agent-native
84
97
  codex plugin add agent-native-visual-plans@agent-native-apps
85
- codex mcp login agent-native-plans # OAuth in the browser
98
+ codex mcp login plan # OAuth in the browser
99
+ # Existing installs may already be authenticated as:
100
+ codex mcp login agent-native-plans
86
101
  ```
87
102
 
88
- After install, **start a new Codex thread** so the skills and MCP tools load into the session. The plugin ships a URL-only connector (`[mcp_servers.agent-native-plans]` → `https://plan.agent-native.com/_agent-native/mcp`); `codex mcp login` runs the OAuth flow. The universal CLI route above also works for Codex (`agent-native skills add visual-plan --client codex`) if you prefer one command that installs and authenticates together.
103
+ After install, **start a new Codex thread** so the skills and MCP tools load into the session. The plugin ships URL-only connectors (`[mcp_servers.plan]` and legacy `[mcp_servers.agent-native-plans]` → `https://plan.agent-native.com/_agent-native/mcp`); `codex mcp login` runs the OAuth flow. The universal CLI route above also works for Codex (`agent-native skills add visual-plan --client codex`) if you prefer one command that installs and authenticates together.
89
104
 
90
105
  ## Updates {#updates}
91
106
 
@@ -93,7 +108,7 @@ The plugin routes auto-update — you do not re-pack or re-add the marketplace f
93
108
 
94
109
  - **Claude Code** — the marketplace entry sets `autoUpdate: true` and the plugin uses commit-SHA versioning, so Claude Code pulls new versions from the repo at startup; run `/reload-plugins` to activate. Every push to the repo's default branch reaches installed users automatically.
95
110
  - **Codex** — the plugin `version` embeds a content hash of the bundled skills and MCP endpoint (e.g. `1.0.0+codex.<hash>`), so any skill or endpoint change yields a new version. Codex's startup auto-upgrade re-installs configured git marketplaces on its own; just **start a new thread** to pick up the change. No manual `codex plugin marketplace upgrade` is needed for routine updates.
96
- - **Universal CLI route** — re-run `npx @agent-native/core@latest skills add visual-plan` to refresh the skills and re-register the connector. `@latest` always pulls the current skills from the published `@agent-native/core` package.
111
+ - **Universal CLI route** — run `npx @agent-native/core@latest skills status visual-plan` to check copied skill folders, or `npx @agent-native/core@latest skills update visual-plan` to refresh them in place. Re-running `skills add visual-plan` still works when you also want to re-register/authenticate the connector. `@latest` always pulls the current skills from the published `@agent-native/core` package.
97
112
 
98
113
  The connector points at a **hosted** app, so the Plan app's actions and live tool surface always reflect the deployed version regardless of when you installed; only the bundled skill instructions follow the update mechanisms above.
99
114
 
@@ -28,13 +28,34 @@ A re-push updates the same plan and the same sticky comment in place — no orph
28
28
 
29
29
  ## Installing it
30
30
 
31
- The Agent-Native CLI writes the workflow into your repository and prints the secrets to set:
31
+ When you install Plans interactively, the Agent-Native CLI asks whether to add
32
+ automatic PR Visual Recaps. Say yes to write the GitHub Action, or add it
33
+ explicitly at any time:
32
34
 
33
35
  ```bash
34
36
  agent-native skills add visual-plan --with-github-action
35
37
  ```
36
38
 
37
- This installs the `visual-plan` skill (which includes the `visual-recap` skill the action runs) and writes `.github/workflows/pr-visual-recap.yml` into your repo. The workflow calls **published CLI subcommands** — `agent-native recap scan|build-prompt|shot|comment` — so nothing is copied into your repo as helper scripts. Commit the generated workflow file, set the secrets below, and open a PR to see it run.
39
+ This installs the `visual-plan` skill (which includes the `visual-recap` skill the action runs) and writes `.github/workflows/pr-visual-recap.yml` into your repo. The workflow calls **published CLI subcommands** — `agent-native recap scan|build-prompt|shot|comment` — so nothing is copied into your repo as helper scripts.
40
+
41
+ Then run the guided setup helper:
42
+
43
+ ```bash
44
+ agent-native recap setup
45
+ agent-native recap doctor
46
+ ```
47
+
48
+ `recap setup` refreshes the workflow, uses `gh` to set GitHub Actions
49
+ secrets/variables when values are available from env or the local Plans
50
+ publish-token store, and prints exact missing commands for anything it cannot
51
+ set. Secret values are sent to `gh` through stdin, not command arguments. Commit
52
+ the generated workflow file and open a PR to see it run.
53
+
54
+ By default, the workflow builds its agent prompt from the latest bundled
55
+ `visual-recap` guidance in `@agent-native/core@latest`, including any sibling
56
+ reference files the skill ships with. If your repo intentionally customizes and
57
+ pins its committed `visual-recap` folder, set the repository variable
58
+ `VISUAL_RECAP_SKILL_SOURCE=repo`.
38
59
 
39
60
  ## Backend selection
40
61
 
@@ -53,6 +74,7 @@ Beyond the backend, two repository variables tune _how_ the agent runs:
53
74
 
54
75
  - **`VISUAL_RECAP_MODEL`** pins the model passed to the CLI (`--model`) — for example `gpt-5.5` for Codex, or a Claude model id. Leave it unset to use the CLI's own default model.
55
76
  - **`VISUAL_RECAP_REASONING`** sets the reasoning depth: `none`, `minimal`, `low`, `medium`, `high`, or `xhigh`. It applies to the Codex backend; Claude's reasoning is model-driven, so this variable is ignored there.
77
+ - **`VISUAL_RECAP_SKILL_SOURCE`** controls prompt freshness: `auto`/unset uses the latest bundled skill guidance, while `repo` pins to the committed repo-local `visual-recap` skill folder.
56
78
 
57
79
  For example, to run the recap on Codex with GPT-5.5 at high reasoning, set the repository variables `VISUAL_RECAP_AGENT=codex`, `VISUAL_RECAP_MODEL=gpt-5.5`, and `VISUAL_RECAP_REASONING=high`.
58
80
 
@@ -67,7 +89,18 @@ Set these in your repository's **Settings → Secrets and variables → Actions*
67
89
  | `PLAN_RECAP_TOKEN` | Per-user, revocable token minted by `agent-native connect`. Authorizes publishing the recap plan and the screenshot upload. |
68
90
  | `ANTHROPIC_API_KEY` | The LLM key for the default Claude Code backend. |
69
91
 
70
- Mint `PLAN_RECAP_TOKEN` with `agent-native connect` against your Plans app, then paste the printed token into the secret. Use a placeholder like `plan_recap_xxxxxxxxxxxxxxxx` only for examples — never commit a real token.
92
+ Mint `PLAN_RECAP_TOKEN` with `agent-native connect` against your Plans app. For
93
+ the hosted app, this also writes a local publish-token file that
94
+ `agent-native recap setup` can read:
95
+
96
+ ```bash
97
+ agent-native connect https://plan.agent-native.com --client codex
98
+ agent-native recap setup
99
+ ```
100
+
101
+ If you prefer manual setup, paste the token into the GitHub secret. Use a
102
+ placeholder like `plan_recap_xxxxxxxxxxxxxxxx` only for examples — never commit a
103
+ real token.
71
104
 
72
105
  ### Optional (only if you change defaults)
73
106
 
@@ -91,6 +124,22 @@ The workflow uses the plain `pull_request` trigger, **not** `pull_request_target
91
124
 
92
125
  This also means you can merge the workflow file **before** the secrets exist: with no token configured, every run is a quiet no-op until you set the secrets.
93
126
 
127
+ ## Self-modifying guard (sensitive paths)
128
+
129
+ The workflow's gate job skips the recap entirely if a PR touches any of the following paths, so a PR can never rewrite what the trusted recap job runs and exfiltrate secrets:
130
+
131
+ | Path pattern | Reason |
132
+ | ------------------------------------------ | --------------------------------------------------------- |
133
+ | `.github/workflows/pr-visual-recap.yml` | The workflow itself |
134
+ | `**/skills/visual-(recap\|plan\|plans)/**` | The visual-recap skill the agent follows |
135
+ | `**/.claude/**` | Agent settings the runner loads |
136
+ | `**/CLAUDE.md` | Agent instructions the runner loads |
137
+ | `**/AGENTS.md` | Agent instructions the runner loads |
138
+ | `**/.mcp.json` | MCP server config the runner loads |
139
+ | `packages/core/**` | Recap CLI source _(BuilderIO/agent-native monorepo only)_ |
140
+
141
+ The `packages/core/**` rule applies only in the `BuilderIO/agent-native` monorepo where `packages/core` is the recap CLI source. In consumer repos an unrelated `packages/core/` directory does not trigger the guard.
142
+
94
143
  ## Local-files privacy mode
95
144
 
96
145
  The GitHub Action is designed for hosted, shareable PR review. If you want a
@@ -132,6 +132,19 @@ Plan app is published this way as a ready-to-add marketplace at the repo root
132
132
  see [Plan plugin & marketplace](/docs/plan-plugin) for the end-to-end install
133
133
  and auto-update flow.
134
134
 
135
+ For users who install copied skills through the universal CLI instead of a
136
+ plugin marketplace, use the CLI freshness commands:
137
+
138
+ ```bash
139
+ npx @agent-native/core@latest skills status visual-plan
140
+ npx @agent-native/core@latest skills update visual-plan
141
+ ```
142
+
143
+ `skills update` scans known Codex/Claude project and user skill folders, compares
144
+ the copied folder hash to the latest bundled skill, and rewrites stale folders in
145
+ place. Newly copied Agent Native skills include an `agent-native-skill.json`
146
+ marker so future status output can identify the source and hash.
147
+
135
148
  ## Creating custom skills {#creating-skills}
136
149
 
137
150
  Create a skill when:
@@ -7,8 +7,8 @@ description: "Agent-Native Plans turns your coding agent's plan into a structure
7
7
 
8
8
  Agent-Native Plans is visual plan mode for coding agents. It turns an ordinary
9
9
  Codex, Claude Code, Markdown, or pasted implementation plan into a structured
10
- review surface with rich text, diagrams, wireframes, implementation maps,
11
- annotations, comments, and shareable links.
10
+ review surface with rich text, diagrams, wireframes, annotated code walkthroughs
11
+ and file trees, annotations, comments, and shareable links.
12
12
 
13
13
  It comes down to two commands. `/visual-plan` builds a plan **before** the agent
14
14
  writes code. `/visual-recap` turns a change that **already** happened — a PR,
@@ -45,6 +45,10 @@ agent-native skills add visual-plan
45
45
 
46
46
  The command installs both commands: `/visual-plan` and `/visual-recap`.
47
47
 
48
+ If you are using a chat-based host that accepts MCP connector URLs directly
49
+ (rather than a CLI-configured client), connect the hosted Plans connector at
50
+ `https://plan.agent-native.com/_agent-native/mcp` — see [MCP Clients](/docs/mcp-clients) for client-specific setup.
51
+
48
52
  Authentication is a one-time browser sign-in at setup — this is intended, and it
49
53
  is what lets the agent persist and share the plans it generates. What the auth
50
54
  step does depends on your client:
@@ -79,6 +83,10 @@ see [PR Visual Recap](/docs/pr-visual-recap).
79
83
  npx @agent-native/core@latest skills add visual-plan --with-github-action
80
84
  ```
81
85
 
86
+ After the workflow is written, run `agent-native recap setup` to configure
87
+ GitHub Actions secrets/variables where possible and `agent-native recap doctor`
88
+ to verify the repo is ready.
89
+
82
90
  If you only want the portable instruction file through the open Skills CLI, use:
83
91
 
84
92
  ```bash
@@ -99,8 +107,8 @@ After installation, ask your agent for the command that fits the work:
99
107
 
100
108
  - `/visual-plan` creates a structured plan **before** implementation — for
101
109
  architecture, backend, refactor, UI, or mixed product work — pulling in
102
- diagrams, wireframes, mockups, clickable prototypes, and implementation maps
103
- as the work calls for them.
110
+ diagrams, wireframes, mockups, clickable prototypes, and annotated code
111
+ walkthroughs and file trees as the work calls for them.
104
112
  - `/visual-recap` creates a high-altitude **review** of a change that already
105
113
  happened — a PR, commit, branch, or git diff — as schema, API, file, and
106
114
  before/after blocks instead of a wall of raw diff.
@@ -121,8 +129,8 @@ it to the agent starts a revision turn against the existing plan.
121
129
  ## What you can do with it
122
130
 
123
131
  - **Review before implementation.** React to diagrams, wireframes, option tabs,
124
- Open Questions forms, risk notes, file maps, and code previews before the
125
- agent edits files.
132
+ Open Questions forms, risk notes, annotated code walkthroughs, and code
133
+ previews before the agent edits files.
126
134
  - **Comment directly on the plan.** Pin feedback to text, images, wireframes, or
127
135
  canvas locations; choose whether the comment is for the agent or a human
128
136
  reviewer; @mention teammates with inline chips; and resolve comments as the
@@ -199,7 +207,10 @@ http://localhost:<port>/local-plans/<slug>
199
207
 
200
208
  Local-files mode prevents plan or recap content from going to the Agent-Native
201
209
  Plan database. It also disables hosted sharing, browser comments, plan history,
202
- and publish/export receipts until you explicitly opt into publishing. It does
210
+ and publish/export receipts until you explicitly opt into publishing. To move a
211
+ local plan into the hosted database, call `publish-visual-plan` with the local
212
+ MDX folder path; this uploads the plan, assigns it a hosted ID, enables sharing
213
+ and commenting, and returns the hosted URL. It does
203
214
  not automatically make your coding agent's LLM local; choose a local or approved
204
215
  model if that privacy boundary matters too.
205
216
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.45.0",
3
+ "version": "0.45.1",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=22"
@@ -72,6 +72,7 @@
72
72
  "./resources/metadata": "./dist/resources/metadata.js",
73
73
  "./oauth-tokens": "./dist/oauth-tokens/index.js",
74
74
  "./secrets": "./dist/secrets/index.js",
75
+ "./secrets/crypto": "./dist/secrets/crypto.js",
75
76
  "./org": "./dist/org/index.js",
76
77
  "./client/org": "./dist/client/org/index.js",
77
78
  "./client/db-admin": "./dist/client/db-admin/index.js",
@@ -240,6 +241,9 @@
240
241
  "vite": ">=5",
241
242
  "ws": ">=8"
242
243
  },
244
+ "optionalDependencies": {
245
+ "playwright": "^1.60.0"
246
+ },
243
247
  "peerDependenciesMeta": {
244
248
  "ai": {
245
249
  "optional": true