@inerrata-corporation/errata 2.0.2-dev.610 → 2.0.2-dev.612

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 (2) hide show
  1. package/errata.mjs +22 -2
  2. package/package.json +1 -1
package/errata.mjs CHANGED
@@ -47833,6 +47833,15 @@ function extractExecutables(command) {
47833
47833
  }
47834
47834
  return out2;
47835
47835
  }
47836
+ function commandToolNodeIds(command) {
47837
+ const out2 = [];
47838
+ for (const name2 of extractExecutables(command)) {
47839
+ if (!PUBLIC_TOOLS.has(name2)) continue;
47840
+ if (PLUMBING.has(name2)) continue;
47841
+ out2.push(toolNodeId(name2));
47842
+ }
47843
+ return out2;
47844
+ }
47836
47845
  function observeCommandTools(store, command, ts) {
47837
47846
  const result = { minted: [], reinforced: [], nodeIds: [] };
47838
47847
  const osName = currentOsName();
@@ -51728,6 +51737,7 @@ function parseAssistantTurns(raw2, includeThinking) {
51728
51737
  }
51729
51738
  if (obj.type !== "assistant" || !Array.isArray(obj.message?.content)) continue;
51730
51739
  const parts2 = [];
51740
+ const commands = [];
51731
51741
  for (const b of obj.message.content) {
51732
51742
  if (b["type"] === "text" && typeof b["text"] === "string") parts2.push(b["text"]);
51733
51743
  else if (includeThinking && b["type"] === "thinking" && typeof b["thinking"] === "string")
@@ -51744,6 +51754,10 @@ function parseAssistantTurns(raw2, includeThinking) {
51744
51754
  editedFileTurnSeq = turnSeq;
51745
51755
  }
51746
51756
  }
51757
+ } else if (b["type"] === "tool_use" && b["name"] === "Bash") {
51758
+ const input = b["input"];
51759
+ const cmd2 = input && typeof input === "object" ? input["command"] : void 0;
51760
+ if (typeof cmd2 === "string" && cmd2) commands.push(cmd2);
51747
51761
  }
51748
51762
  }
51749
51763
  const provenance = lastFile ? lastFileTurnSeq === turnSeq ? lastFileIsWrite ? "edited" : "read" : "carried" : void 0;
@@ -51752,7 +51766,8 @@ function parseAssistantTurns(raw2, includeThinking) {
51752
51766
  text: parts2.join("\n\n"),
51753
51767
  ...lastFile ? { workingFile: lastFile } : {},
51754
51768
  ...provenance ? { workingFileProvenance: provenance } : {},
51755
- ...editedFile && editedFileTurnSeq === turnSeq ? { editedFile } : {}
51769
+ ...editedFile && editedFileTurnSeq === turnSeq ? { editedFile } : {},
51770
+ ...commands.length > 0 ? { commands } : {}
51756
51771
  });
51757
51772
  }
51758
51773
  return turns;
@@ -54151,6 +54166,7 @@ function createToolRunState() {
54151
54166
  }
54152
54167
 
54153
54168
  // src/engine.ts
54169
+ init_tool_index();
54154
54170
  init_paths();
54155
54171
 
54156
54172
  // src/profile.ts
@@ -54669,7 +54685,7 @@ function startLoopLagMonitor(thresholdMs = 1e3) {
54669
54685
  }
54670
54686
 
54671
54687
  // src/engine.ts
54672
- var DAEMON_VERSION = true ? "2.0.2-dev.610" : "2.0.0-alpha.0";
54688
+ var DAEMON_VERSION = true ? "2.0.2-dev.612" : "2.0.0-alpha.0";
54673
54689
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
54674
54690
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
54675
54691
  var GIT_OP_MUTE_MS = 4e3;
@@ -55501,6 +55517,10 @@ function createWorkspaceEngine(opts) {
55501
55517
  }
55502
55518
  try {
55503
55519
  const touchedFileId = turnFile ? resolveFileId(turnFile) : void 0;
55520
+ if (turn.commands) {
55521
+ const ids = turn.commands.flatMap(commandToolNodeIds);
55522
+ if (ids.length > 0) toolRuns.record(sessionId, ids);
55523
+ }
55504
55524
  const touched = new Set(toolRuns.get(sessionId));
55505
55525
  if (touchedFileId) touched.add(touchedFileId);
55506
55526
  for (const fence of parseIntentFences(turn.text)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.2-dev.610",
3
+ "version": "2.0.2-dev.612",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {