@inerrata-corporation/errata 2.0.17-dev.3537 → 2.0.17-dev.3538
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/errata.mjs +11 -9
- package/package.json +1 -1
package/errata.mjs
CHANGED
|
@@ -25568,7 +25568,7 @@ function renderSnapshot(s) {
|
|
|
25568
25568
|
lines.push("");
|
|
25569
25569
|
lines.push("### \u270D\uFE0F CAPTURE PROTOCOL \u2014 tags are the record");
|
|
25570
25570
|
lines.push(
|
|
25571
|
-
"For
|
|
25571
|
+
"For ALL project work \u2014 features, UX, refactors, research, not just debugging \u2014 errata records inline tags: `[!one line]` for every problem you state (even in code you just wrote), `(constraint: why)` for each design decision, `(fix:[id])` when your edit fixed a shown problem, and to JUDGE a prior shown below \u2014 `(confirm:[id])` if it held, `(refute:[id] why)` if it's wrong or didn't hold. Untagged prose is silently lost \u2014 tag as you write. Requested errata-* answer blocks keep their fences; put them in your turn-final reply."
|
|
25572
25572
|
);
|
|
25573
25573
|
lines.push("");
|
|
25574
25574
|
lines.push(SEARCH_IMPERATIVE_HEADER);
|
|
@@ -26037,7 +26037,7 @@ function diffRenderLedger(before, after) {
|
|
|
26037
26037
|
for (const i2 of before) (survived.has(key(i2)) ? shown : evicted).push(i2);
|
|
26038
26038
|
return { shown, evicted };
|
|
26039
26039
|
}
|
|
26040
|
-
var RECENT_OPEN, RECENT_RESOLVED, RECENT_CONSTRAINTS, SCOPE_POOL_FACTOR, RECALL_FIRST_HEADER, RECALL_FIRST_BODY, RECALL_FIRST_BLOCK, SEARCH_IMPERATIVE_HEADER, SEARCH_IMPERATIVE_BODY, SPAWN_SHARE_HINT, SUBAGENT_OWN_BLOCK_NOTE, EVICTION_ORDER, MOTIF_FLOOR, REMOTE_FLOOR, PROBLEM_FLOOR, REVIEW_ITEM_FLOOR, DEFAULT_AGENT_CONTEXT_BUDGET;
|
|
26040
|
+
var RECENT_OPEN, RECENT_RESOLVED, RECENT_CONSTRAINTS, SCOPE_POOL_FACTOR, RECALL_FIRST_HEADER, RECALL_FIRST_BODY, RECALL_FIRST_BLOCK, SEARCH_IMPERATIVE_HEADER, SEARCH_IMPERATIVE_BODY, PROMPT_RECUE, SPAWN_SHARE_HINT, SUBAGENT_OWN_BLOCK_NOTE, EVICTION_ORDER, MOTIF_FLOOR, REMOTE_FLOOR, PROBLEM_FLOOR, REVIEW_ITEM_FLOOR, DEFAULT_AGENT_CONTEXT_BUDGET;
|
|
26041
26041
|
var init_render = __esm({
|
|
26042
26042
|
"../../packages/context-writer/src/render.ts"() {
|
|
26043
26043
|
"use strict";
|
|
@@ -26054,7 +26054,8 @@ var init_render = __esm({
|
|
|
26054
26054
|
|
|
26055
26055
|
${RECALL_FIRST_BODY}`;
|
|
26056
26056
|
SEARCH_IMPERATIVE_HEADER = "### \u{1F50E} PRIORS ARE SEEDS \u2014 a sample, not the whole graph";
|
|
26057
|
-
SEARCH_IMPERATIVE_BODY = "Everything below is a budgeted slice of a much larger graph, not all errata knows.
|
|
26057
|
+
SEARCH_IMPERATIVE_BODY = "Everything below is a budgeted slice of a much larger graph, not all errata knows. New request \u2014 any task, not just a bug? Say what it is \u2014 we search on it between your tool calls and put what we find here:\n```errata-intent\nintent: <the work in hand, in your words>\n```\nNarration, not a detour: no tool call, no plan change. It is the one signal we cannot derive from your edits \u2014 everything else here is guessed from the files you touched.";
|
|
26058
|
+
PROMPT_RECUE = "errata (context block above unchanged): new request \u2192 state it first:\n```errata-intent\nintent: <this request, in your words>\n```\nTag ALL project work, not just bugs \u2014 features, UX, refactors, research: problems you hit (even in code you just wrote) [!\u2026], decisions (constraint: why), approaches (tried: \u2026)/(failed: \u2026), the area (domain: \u2026). Restate tags in your final reply.";
|
|
26058
26059
|
SPAWN_SHARE_HINT = "_Spawning a subagent? It gets its own errata block, seeded from its task \u2014 none of the priors here. To hand it some, put this in its prompt (or `priors: all` for this whole block):_\n```errata-share\npriors: [handle], [handle]\n```";
|
|
26059
26060
|
SUBAGENT_OWN_BLOCK_NOTE = "_This block is yours: seeded from the task you were given, then from what you state and touch. The agent that spawned you sees a different one._";
|
|
26060
26061
|
EVICTION_ORDER = [
|
|
@@ -32244,7 +32245,7 @@ function buildAgentInstruction(opts = {}) {
|
|
|
32244
32245
|
const signals = opts.signals ?? ["prior", "problem", "vulnerability", "domain", "fix", "constraint", "triage", "attempt", "link"];
|
|
32245
32246
|
const ref = opts.referent ?? "its-handle";
|
|
32246
32247
|
const token = (s) => s === "problem" ? TAG_EXAMPLE.problem() : s === "constraint" ? TAG_EXAMPLE.constraint() : s === "attempt" ? TAG_EXAMPLE.tried() : s === "domain" ? TAG_EXAMPLE.domain() : s === "link" ? TAG_EXAMPLE.pattern() : s === "verdict" ? TAG_EXAMPLE.confirm(ref) : TAG_EXAMPLE[s](ref);
|
|
32247
|
-
const head2 = "Tag inline (no fences
|
|
32248
|
+
const head2 = "Tag inline (no fences/backticks) on ALL work, not just bugs. Untagged findings are silently lost. Cite short handles; we filter downstream. Requested errata-* answer blocks are the exception: keep their fences in your turn-final reply:";
|
|
32248
32249
|
const tail = "Restate mid-turn tags in your final reply; the harness can drop mid-turn text. EXCEPT one already shown with an id: cite [its-handle] instead of retyping (drift mints a duplicate).";
|
|
32249
32250
|
return [
|
|
32250
32251
|
head2,
|
|
@@ -53386,7 +53387,7 @@ function decideContextInject(args2) {
|
|
|
53386
53387
|
if (event === "SessionStart" || event === "SubagentStart") {
|
|
53387
53388
|
if (sessionId) lastInjectedHash.set(sessionId, block.hash);
|
|
53388
53389
|
} else if (sessionId && lastInjectedHash.get(sessionId) === block.hash) {
|
|
53389
|
-
return null;
|
|
53390
|
+
return event === "UserPromptSubmit" ? { hookEventName: event, additionalContext: PROMPT_RECUE } : null;
|
|
53390
53391
|
} else {
|
|
53391
53392
|
if (sessionId) lastInjectedHash.set(sessionId, block.hash);
|
|
53392
53393
|
}
|
|
@@ -53835,13 +53836,14 @@ function buildWebUi(deps) {
|
|
|
53835
53836
|
});
|
|
53836
53837
|
if (decision && subagent !== null) lastSubagentInjectAt.set(contextKey2, Date.now());
|
|
53837
53838
|
let systemMessage = null;
|
|
53838
|
-
|
|
53839
|
+
const delivered = decision !== null && decision.additionalContext !== PROMPT_RECUE;
|
|
53840
|
+
if (sid && block && recallCardEnabled() && (delivered || atPrompt)) {
|
|
53839
53841
|
const card = storedCard && subagent !== null ? forSubagent(storedCard, subagent) : storedCard;
|
|
53840
53842
|
if (card) {
|
|
53841
53843
|
if (subagent !== null && storedCard) rememberAgentCard(sid, agentId, storedCard);
|
|
53842
53844
|
else rememberCard(sid, card);
|
|
53843
|
-
if (
|
|
53844
|
-
else if (
|
|
53845
|
+
if (delivered && hookEvent === "SubagentStart") systemMessage = renderRecallLine(card);
|
|
53846
|
+
else if (delivered && sid.startsWith("codex:")) systemMessage = renderRecallLine(card);
|
|
53845
53847
|
}
|
|
53846
53848
|
}
|
|
53847
53849
|
if (!decision) return c.json({});
|
|
@@ -82432,7 +82434,7 @@ function createWatchBreaker(deps) {
|
|
|
82432
82434
|
}
|
|
82433
82435
|
|
|
82434
82436
|
// src/engine.ts
|
|
82435
|
-
var DAEMON_VERSION = true ? "2.0.17-dev.
|
|
82437
|
+
var DAEMON_VERSION = true ? "2.0.17-dev.3538" : "2.0.0-alpha.0";
|
|
82436
82438
|
var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
|
|
82437
82439
|
var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
|
|
82438
82440
|
var GIT_OP_MUTE_MS = 4e3;
|