@agent-native/core 0.49.6 → 0.49.9

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 (44) hide show
  1. package/dist/agent/production-agent.d.ts.map +1 -1
  2. package/dist/agent/production-agent.js +6 -2
  3. package/dist/agent/production-agent.js.map +1 -1
  4. package/dist/agent/types.d.ts +6 -1
  5. package/dist/agent/types.d.ts.map +1 -1
  6. package/dist/agent/types.js.map +1 -1
  7. package/dist/cli/app-skill.d.ts.map +1 -1
  8. package/dist/cli/app-skill.js +21 -5
  9. package/dist/cli/app-skill.js.map +1 -1
  10. package/dist/cli/connect.d.ts.map +1 -1
  11. package/dist/cli/connect.js +46 -2
  12. package/dist/cli/connect.js.map +1 -1
  13. package/dist/cli/pr-visual-recap-workflow.d.ts +1 -1
  14. package/dist/cli/pr-visual-recap-workflow.d.ts.map +1 -1
  15. package/dist/cli/pr-visual-recap-workflow.js +1 -1
  16. package/dist/cli/pr-visual-recap-workflow.js.map +1 -1
  17. package/dist/cli/recap.d.ts +6 -11
  18. package/dist/cli/recap.d.ts.map +1 -1
  19. package/dist/cli/recap.js +14 -24
  20. package/dist/cli/recap.js.map +1 -1
  21. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  22. package/dist/client/agent-chat-adapter.js +30 -11
  23. package/dist/client/agent-chat-adapter.js.map +1 -1
  24. package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts.map +1 -1
  25. package/dist/client/blocks/library/AnnotatedCodeBlock.js +20 -4
  26. package/dist/client/blocks/library/AnnotatedCodeBlock.js.map +1 -1
  27. package/dist/client/blocks/library/DiffBlock.d.ts.map +1 -1
  28. package/dist/client/blocks/library/DiffBlock.js +33 -9
  29. package/dist/client/blocks/library/DiffBlock.js.map +1 -1
  30. package/dist/client/blocks/library/annotation-rail.d.ts +41 -3
  31. package/dist/client/blocks/library/annotation-rail.d.ts.map +1 -1
  32. package/dist/client/blocks/library/annotation-rail.js +157 -29
  33. package/dist/client/blocks/library/annotation-rail.js.map +1 -1
  34. package/dist/client/blocks/types.d.ts +19 -0
  35. package/dist/client/blocks/types.d.ts.map +1 -1
  36. package/dist/client/blocks/types.js.map +1 -1
  37. package/dist/client/sse-event-processor.d.ts.map +1 -1
  38. package/dist/client/sse-event-processor.js +13 -12
  39. package/dist/client/sse-event-processor.js.map +1 -1
  40. package/dist/vite/client.d.ts.map +1 -1
  41. package/dist/vite/client.js +6 -8
  42. package/dist/vite/client.js.map +1 -1
  43. package/docs/content/pr-visual-recap.md +11 -12
  44. package/package.json +1 -1
package/dist/cli/recap.js CHANGED
@@ -1319,6 +1319,7 @@ export function buildRecapPrompt(input) {
1319
1319
  else {
1320
1320
  lines.push("## Publish (this is the only way to produce output)");
1321
1321
  lines.push(`The \`plan\` MCP server is configured for you. Call its tools by name (your host may expose them as \`get-plan-blocks\` / \`create-visual-recap\` or \`mcp__plan__get-plan-blocks\` / \`mcp__plan__create-visual-recap\` — same tools).`);
1322
+ lines.push("This is a one-shot GitHub Actions run. Do not schedule wakeups, reminders, follow-ups, or retries in another turn; either publish the recap and write `recap-url.txt` in this process, or report the MCP/tool failure plainly.");
1322
1323
  lines.push("First call `get-plan-blocks`, then call `create-visual-recap`. If `create-visual-recap` is available but `get-plan-blocks` is not, the Plan MCP is connected but the block-registry tool is not visible to this runner. Report that the runner must expose `get-plan-blocks` through the workflow/tool allowlist or compact MCP catalog; do not describe that case as a disconnected Plan MCP.");
1323
1324
  lines.push(`1. Call the **create-visual-recap** tool on the \`plan\` MCP server with grounded MDX derived ONLY from the real diff, passing \`visibility: "org"\` so the recap is published org-scoped (never public) server-side${input.prevPlanId
1324
1325
  ? `, and also passing \`planId: "${input.prevPlanId}"\` so this REPLACES the existing recap plan`
@@ -1939,18 +1940,13 @@ function recoverRecapFailureEnv(env = process.env) {
1939
1940
  return recovered;
1940
1941
  }
1941
1942
  /**
1942
- * Files that, if a PR touches them, would let that PR rewrite what the trusted
1943
- * recap job runs (the workflow itself, the skill, the local CLI, or any agent
1944
- * config the runner loads) so the whole job is skipped, not just the agent
1945
- * step, to keep untrusted PR code away from the publish/API secrets.
1946
- *
1947
- * The `packages/core/**` rule is scoped to the BuilderIO/agent-native monorepo
1948
- * (where packages/core IS the recap CLI source) so that consumer repos with an
1949
- * unrelated `packages/core/` directory are not silently gated. Pass the
1950
- * `repository` ("owner/name") to apply that scoping; omit it to match the old
1951
- * unconditional behaviour (safe for the gate's self-test).
1943
+ * Files that, if a PR touches them, would let that PR rewrite the workflow,
1944
+ * skill, or agent config the trusted recap job loads. The workflow runs the
1945
+ * recap CLI from trusted base-branch source (or an installed package), so normal
1946
+ * package code such as `packages/core/**` can be recapped without executing
1947
+ * PR-modified CLI code.
1952
1948
  */
1953
- export function isRecapSensitivePath(p, repository) {
1949
+ export function isRecapSensitivePath(p) {
1954
1950
  if (p === ".github/workflows/pr-visual-recap.yml" ||
1955
1951
  /(^|\/)skills\/visual-(recap|plan|plans)\//.test(p) ||
1956
1952
  /(^|\/)\.claude\//.test(p) ||
@@ -1959,12 +1955,6 @@ export function isRecapSensitivePath(p, repository) {
1959
1955
  /(^|\/)\.mcp\.json$/.test(p)) {
1960
1956
  return true;
1961
1957
  }
1962
- // packages/core is the recap-CLI source only in the agent-native monorepo.
1963
- // In consumer repos an unrelated packages/core/ must not gate recaps.
1964
- const isAgentNativeMonorepo = !repository || repository === "BuilderIO/agent-native";
1965
- if (isAgentNativeMonorepo && /(^|\/)packages\/core\//.test(p)) {
1966
- return true;
1967
- }
1968
1958
  return false;
1969
1959
  }
1970
1960
  /**
@@ -2025,11 +2015,11 @@ export function evaluateRecapGate(input) {
2025
2015
  reasons.push("invalid VISUAL_RECAP_MODEL value (must match [a-zA-Z0-9._-]{1,80})");
2026
2016
  }
2027
2017
  // Self-modifying guard: if this PR changes the workflow, the
2028
- // visual-recap/visual-plan skill, the local CLI (packages/core), or any agent
2029
- // config the runner would load (.claude/**, CLAUDE.md, .mcp.json), skip the
2030
- // ENTIRE job — not just the agent — so a PR can never rewrite what runs
2031
- // (skill, hooks, settings, CLI) and exfiltrate the publish/API secrets.
2032
- const hits = input.changedFiles.filter((p) => isRecapSensitivePath(p, input.repository));
2018
+ // visual-recap/visual-plan skill, or any agent config the runner would load
2019
+ // (.claude/**, CLAUDE.md, .mcp.json), skip the ENTIRE job — not just the
2020
+ // agent — so a PR can never rewrite what runs (skill, hooks, settings) and
2021
+ // exfiltrate the publish/API secrets.
2022
+ const hits = input.changedFiles.filter((p) => isRecapSensitivePath(p));
2033
2023
  if (hits.length) {
2034
2024
  reasons.push(`PR modifies recap-control files (${hits.slice(0, 3).join(", ")}${hits.length > 3 ? ", …" : ""}) — skipping so untrusted PR code never runs with secrets`);
2035
2025
  }
@@ -2716,8 +2706,8 @@ Usage:
2716
2706
  files from the GitHub REST API (paged, with GH_TOKEN/GITHUB_TOKEN). Skips
2717
2707
  drafts, forks, bot authors, the missing-secret case, an invalid agent/model,
2718
2708
  and any PR that touches recap-control files (the workflow, the skill,
2719
- packages/core, .claude/**, CLAUDE.md, AGENTS.md, .mcp.json) — failing CLOSED
2720
- on any file-list error. Writes run=<true|false> and agent=<claude|codex> to
2709
+ .claude/**, CLAUDE.md, AGENTS.md, .mcp.json) — failing CLOSED on any
2710
+ file-list error. Writes run=<true|false> and agent=<claude|codex> to
2721
2711
  $GITHUB_OUTPUT.
2722
2712
  npx @agent-native/core@latest recap agent-summary
2723
2713
  Read the captured Claude/Codex result file and write a sanitized one-line