@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.
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +6 -2
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/types.d.ts +6 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/cli/app-skill.d.ts.map +1 -1
- package/dist/cli/app-skill.js +21 -5
- package/dist/cli/app-skill.js.map +1 -1
- package/dist/cli/connect.d.ts.map +1 -1
- package/dist/cli/connect.js +46 -2
- package/dist/cli/connect.js.map +1 -1
- package/dist/cli/pr-visual-recap-workflow.d.ts +1 -1
- package/dist/cli/pr-visual-recap-workflow.d.ts.map +1 -1
- package/dist/cli/pr-visual-recap-workflow.js +1 -1
- package/dist/cli/pr-visual-recap-workflow.js.map +1 -1
- package/dist/cli/recap.d.ts +6 -11
- package/dist/cli/recap.d.ts.map +1 -1
- package/dist/cli/recap.js +14 -24
- package/dist/cli/recap.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +30 -11
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/AnnotatedCodeBlock.js +20 -4
- package/dist/client/blocks/library/AnnotatedCodeBlock.js.map +1 -1
- package/dist/client/blocks/library/DiffBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/DiffBlock.js +33 -9
- package/dist/client/blocks/library/DiffBlock.js.map +1 -1
- package/dist/client/blocks/library/annotation-rail.d.ts +41 -3
- package/dist/client/blocks/library/annotation-rail.d.ts.map +1 -1
- package/dist/client/blocks/library/annotation-rail.js +157 -29
- package/dist/client/blocks/library/annotation-rail.js.map +1 -1
- package/dist/client/blocks/types.d.ts +19 -0
- package/dist/client/blocks/types.d.ts.map +1 -1
- package/dist/client/blocks/types.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +13 -12
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +6 -8
- package/dist/vite/client.js.map +1 -1
- package/docs/content/pr-visual-recap.md +11 -12
- 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
|
|
1943
|
-
*
|
|
1944
|
-
*
|
|
1945
|
-
*
|
|
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
|
|
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,
|
|
2029
|
-
//
|
|
2030
|
-
//
|
|
2031
|
-
//
|
|
2032
|
-
const hits = input.changedFiles.filter((p) => isRecapSensitivePath(p
|
|
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
|
-
|
|
2720
|
-
|
|
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
|