@gobing-ai/spur 0.3.63 → 0.3.64

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 (36) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/config/corpus-baseline.json +3326 -3886
  3. package/config/workflows/history-anatomy.yaml +2 -2
  4. package/package.json +9 -9
  5. package/plugins/sp/README.md +6 -3
  6. package/plugins/sp/agents/expert-spur.md +20 -4
  7. package/plugins/sp/commands/dev-find-issue.md +1 -1
  8. package/plugins/sp/commands/dev-gitmsg.md +12 -6
  9. package/plugins/sp/commands/dev-gtd.md +8 -19
  10. package/plugins/sp/commands/dev-idea.md +1 -1
  11. package/plugins/sp/commands/dev-plan.md +1 -1
  12. package/plugins/sp/commands/dev-run.md +2 -2
  13. package/plugins/sp/commands/dev-runall.md +2 -2
  14. package/plugins/sp/commands/dev-wrap.md +5 -6
  15. package/plugins/sp/commands/dev-wrapall.md +5 -7
  16. package/plugins/sp/plugin.json +1 -1
  17. package/plugins/sp/scripts/history-anatomy-cache.mjs +3 -2
  18. package/plugins/sp/scripts/history-anatomy-cache.ts +7 -2
  19. package/plugins/sp/skills/dogfood-testing/SKILL.md +14 -1
  20. package/plugins/sp/skills/history-anatomy/references/report-contract.md +8 -0
  21. package/plugins/sp/skills/next-router/SKILL.md +4 -4
  22. package/plugins/sp/skills/pr-reviewing/SKILL.md +2 -3
  23. package/plugins/sp/skills/redesign-web-ui/SKILL.md +184 -0
  24. package/plugins/sp/skills/redesign-web-ui/references/audit-checklist.md +121 -0
  25. package/plugins/sp/skills/redesign-web-ui/references/upgrade-techniques.md +66 -0
  26. package/plugins/sp/skills/spur-cli/references/agent.md +1 -1
  27. package/plugins/sp/skills/spur-cli/references/workflows/authoring-workflows.md +5 -0
  28. package/plugins/sp/skills/spur-cli/references/workflows/operations.md +20 -5
  29. package/plugins/sp/skills/spur-cli/references/workflows/workflow-fit-and-tuning.md +230 -0
  30. package/plugins/sp/skills/spur-cli/references/workflows.md +26 -4
  31. package/plugins/sp/skills/spur-dev/references/cross-cutting.md +22 -30
  32. package/plugins/sp/skills/spur-dev/references/dev-operations.md +62 -20
  33. package/plugins/sp/skills/spur-dev/references/execution-workflow.md +1 -1
  34. package/plugins/sp/skills/spur-dev/references/flag-glossary.md +18 -8
  35. package/plugins/sp/skills/spur-dev/references/inline-pipeline-driver.md +7 -6
  36. package/spur.js +297 -214
package/spur.js CHANGED
@@ -47,7 +47,7 @@ var __export = (target, all) => {
47
47
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
48
48
  var __require = import.meta.require;
49
49
 
50
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.43/node_modules/@gobing-ai/ts-utils/dist/errors.js
50
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.45/node_modules/@gobing-ai/ts-utils/dist/errors.js
51
51
  var ErrorCode;
52
52
  var init_errors = __esm(() => {
53
53
  ErrorCode = {
@@ -58,7 +58,7 @@ var init_errors = __esm(() => {
58
58
  };
59
59
  });
60
60
 
61
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.43/node_modules/@gobing-ai/ts-utils/dist/api-response.js
61
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.45/node_modules/@gobing-ai/ts-utils/dist/api-response.js
62
62
  var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
63
63
  var init_api_response = __esm(() => {
64
64
  init_errors();
@@ -81,13 +81,13 @@ var init_api_response = __esm(() => {
81
81
  CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
82
82
  });
83
83
 
84
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.43/node_modules/@gobing-ai/ts-utils/dist/cursor.js
84
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.45/node_modules/@gobing-ai/ts-utils/dist/cursor.js
85
85
  var init_cursor = () => {};
86
86
 
87
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.43/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
87
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.45/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
88
88
  var init_event_severity = () => {};
89
89
 
90
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.43/node_modules/@gobing-ai/ts-utils/dist/object.js
90
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.45/node_modules/@gobing-ai/ts-utils/dist/object.js
91
91
  function isPlainObject(value) {
92
92
  return typeof value === "object" && value !== null && !Array.isArray(value);
93
93
  }
@@ -105,7 +105,7 @@ function deepMerge(target, source) {
105
105
  return result;
106
106
  }
107
107
 
108
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.43/node_modules/@gobing-ai/ts-utils/dist/output.js
108
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.45/node_modules/@gobing-ai/ts-utils/dist/output.js
109
109
  function processStream(name) {
110
110
  const proc = globalThis.process;
111
111
  const stream = proc?.[name];
@@ -126,7 +126,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
126
126
  }
127
127
  var defaultStdoutTarget, defaultStderrTarget;
128
128
 
129
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.43/node_modules/@gobing-ai/ts-utils/dist/index.js
129
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.45/node_modules/@gobing-ai/ts-utils/dist/index.js
130
130
  var init_dist = __esm(() => {
131
131
  init_api_response();
132
132
  init_cursor();
@@ -21749,7 +21749,7 @@ var init_zod = __esm(() => {
21749
21749
  init_external();
21750
21750
  });
21751
21751
 
21752
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+292f49f11139e86a/node_modules/@gobing-ai/ts-runtime/dist/config.js
21752
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+3976d6402491c270/node_modules/@gobing-ai/ts-runtime/dist/config.js
21753
21753
  function getProcessEnv() {
21754
21754
  return process.env;
21755
21755
  }
@@ -21827,7 +21827,7 @@ var init_config = __esm(() => {
21827
21827
  };
21828
21828
  });
21829
21829
 
21830
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+292f49f11139e86a/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
21830
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+3976d6402491c270/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
21831
21831
  import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
21832
21832
  import { dirname, resolve as resolvePath } from "path";
21833
21833
  function createNodeFileSystem(root, paths) {
@@ -21914,7 +21914,7 @@ function findProjectRoot(startDir) {
21914
21914
  }
21915
21915
  var init_file_system_node = () => {};
21916
21916
 
21917
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+292f49f11139e86a/node_modules/@gobing-ai/ts-runtime/dist/db-errors.js
21917
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+3976d6402491c270/node_modules/@gobing-ai/ts-runtime/dist/db-errors.js
21918
21918
  var DbModuleNotInstalledError;
21919
21919
  var init_db_errors = __esm(() => {
21920
21920
  DbModuleNotInstalledError = class DbModuleNotInstalledError extends Error {
@@ -29125,7 +29125,7 @@ var init_execa = __esm(() => {
29125
29125
  } = getIpcExport());
29126
29126
  });
29127
29127
 
29128
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+292f49f11139e86a/node_modules/@gobing-ai/ts-runtime/dist/process-executor.js
29128
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+3976d6402491c270/node_modules/@gobing-ai/ts-runtime/dist/process-executor.js
29129
29129
  import { isatty } from "tty";
29130
29130
  function processEventSeverity(reason, exitCode) {
29131
29131
  if (reason === "error")
@@ -29489,7 +29489,7 @@ var init_process_executor = __esm(() => {
29489
29489
  init_config();
29490
29490
  });
29491
29491
 
29492
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+292f49f11139e86a/node_modules/@gobing-ai/ts-runtime/dist/runtime-node-bun.js
29492
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+3976d6402491c270/node_modules/@gobing-ai/ts-runtime/dist/runtime-node-bun.js
29493
29493
  function getNodeFileSystem() {
29494
29494
  if (!_nodeFileSystem)
29495
29495
  _nodeFileSystem = createNodeFileSystem();
@@ -29549,7 +29549,7 @@ var init_runtime_node_bun = __esm(() => {
29549
29549
  };
29550
29550
  });
29551
29551
 
29552
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+292f49f11139e86a/node_modules/@gobing-ai/ts-runtime/dist/context.js
29552
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+3976d6402491c270/node_modules/@gobing-ai/ts-runtime/dist/context.js
29553
29553
  class RuntimeContext {
29554
29554
  scope;
29555
29555
  runtimeName;
@@ -29619,7 +29619,7 @@ var init_context = __esm(() => {
29619
29619
  init_runtime_node_bun();
29620
29620
  });
29621
29621
 
29622
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+292f49f11139e86a/node_modules/@gobing-ai/ts-runtime/dist/path.js
29622
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+3976d6402491c270/node_modules/@gobing-ai/ts-runtime/dist/path.js
29623
29623
  function normalizeSeparators(path6) {
29624
29624
  return path6.replaceAll("\\", "/");
29625
29625
  }
@@ -29680,17 +29680,17 @@ var init_path = __esm(() => {
29680
29680
  SEP = globalThis.process?.platform === "win32" ? "\\" : "/";
29681
29681
  });
29682
29682
 
29683
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+292f49f11139e86a/node_modules/@gobing-ai/ts-runtime/dist/schema-validation.js
29683
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+3976d6402491c270/node_modules/@gobing-ai/ts-runtime/dist/schema-validation.js
29684
29684
  var REMOTE_SCHEMA_MAX_BYTES;
29685
29685
  var init_schema_validation = __esm(() => {
29686
29686
  init_dist2();
29687
29687
  REMOTE_SCHEMA_MAX_BYTES = 5 * 1024 * 1024;
29688
29688
  });
29689
29689
 
29690
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+292f49f11139e86a/node_modules/@gobing-ai/ts-runtime/dist/types.js
29690
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+3976d6402491c270/node_modules/@gobing-ai/ts-runtime/dist/types.js
29691
29691
  var init_types = () => {};
29692
29692
 
29693
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+292f49f11139e86a/node_modules/@gobing-ai/ts-runtime/dist/index.js
29693
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+3976d6402491c270/node_modules/@gobing-ai/ts-runtime/dist/index.js
29694
29694
  var init_dist3 = __esm(() => {
29695
29695
  init_config();
29696
29696
  init_context();
@@ -29699,7 +29699,7 @@ var init_dist3 = __esm(() => {
29699
29699
  init_types();
29700
29700
  });
29701
29701
 
29702
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+292f49f11139e86a/node_modules/@gobing-ai/ts-runtime/dist/bun-sqlite.js
29702
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+3976d6402491c270/node_modules/@gobing-ai/ts-runtime/dist/bun-sqlite.js
29703
29703
  import { Database } from "bun:sqlite";
29704
29704
  var init_bun_sqlite = () => {};
29705
29705
 
@@ -34129,7 +34129,7 @@ var init_bun_sqlite2 = __esm(() => {
34129
34129
  init_session2();
34130
34130
  });
34131
34131
 
34132
- // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.43+0f4912dac59dd9a6/node_modules/@gobing-ai/ts-db/dist/schema/inbox-messages.js
34132
+ // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.45+6d1591eb73338c5d/node_modules/@gobing-ai/ts-db/dist/schema/inbox-messages.js
34133
34133
  var inboxMessages;
34134
34134
  var init_inbox_messages = __esm(() => {
34135
34135
  init_sqlite_core();
@@ -34148,7 +34148,7 @@ var init_inbox_messages = __esm(() => {
34148
34148
  }, (table2) => [index("idx_inbox_messages_to_status").on(table2.toId, table2.status)]);
34149
34149
  });
34150
34150
 
34151
- // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.43+0f4912dac59dd9a6/node_modules/@gobing-ai/ts-db/dist/schema/common.js
34151
+ // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.45+6d1591eb73338c5d/node_modules/@gobing-ai/ts-db/dist/schema/common.js
34152
34152
  function nowTimestamp() {
34153
34153
  return Date.now();
34154
34154
  }
@@ -34177,7 +34177,7 @@ var init_common3 = __esm(() => {
34177
34177
  appendOnlyColumns = buildAppendOnlyColumns();
34178
34178
  });
34179
34179
 
34180
- // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.43+0f4912dac59dd9a6/node_modules/@gobing-ai/ts-db/dist/schema/queue-jobs.js
34180
+ // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.45+6d1591eb73338c5d/node_modules/@gobing-ai/ts-db/dist/schema/queue-jobs.js
34181
34181
  var queueJobs;
34182
34182
  var init_queue_jobs = __esm(() => {
34183
34183
  init_sqlite_core();
@@ -34197,7 +34197,7 @@ var init_queue_jobs = __esm(() => {
34197
34197
  }, (table2) => [index("queue_jobs_ready_idx").on(table2.status, table2.nextRetryAt, table2.createdAt)]);
34198
34198
  });
34199
34199
 
34200
- // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.43+0f4912dac59dd9a6/node_modules/@gobing-ai/ts-db/dist/schema/runtime.js
34200
+ // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.45+6d1591eb73338c5d/node_modules/@gobing-ai/ts-db/dist/schema/runtime.js
34201
34201
  var exports_runtime = {};
34202
34202
  __export(exports_runtime, {
34203
34203
  queueJobs: () => queueJobs,
@@ -34208,7 +34208,7 @@ var init_runtime = __esm(() => {
34208
34208
  init_queue_jobs();
34209
34209
  });
34210
34210
 
34211
- // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.43+0f4912dac59dd9a6/node_modules/@gobing-ai/ts-db/dist/adapters/bun-sqlite.js
34211
+ // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.45+6d1591eb73338c5d/node_modules/@gobing-ai/ts-db/dist/adapters/bun-sqlite.js
34212
34212
  var exports_bun_sqlite = {};
34213
34213
  __export(exports_bun_sqlite, {
34214
34214
  BunSqliteAdapter: () => BunSqliteAdapter
@@ -34519,7 +34519,7 @@ var init_d1 = __esm(() => {
34519
34519
  init_session3();
34520
34520
  });
34521
34521
 
34522
- // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.43+0f4912dac59dd9a6/node_modules/@gobing-ai/ts-db/dist/adapters/d1.js
34522
+ // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.45+6d1591eb73338c5d/node_modules/@gobing-ai/ts-db/dist/adapters/d1.js
34523
34523
  var exports_d1 = {};
34524
34524
  __export(exports_d1, {
34525
34525
  D1Adapter: () => D1Adapter
@@ -34583,7 +34583,7 @@ var init_d12 = __esm(() => {
34583
34583
  init_runtime();
34584
34584
  });
34585
34585
 
34586
- // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.43+0f4912dac59dd9a6/node_modules/@gobing-ai/ts-db/dist/adapter.js
34586
+ // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.45+6d1591eb73338c5d/node_modules/@gobing-ai/ts-db/dist/adapter.js
34587
34587
  async function createDbAdapter(config3) {
34588
34588
  switch (config3.driver) {
34589
34589
  case "bun-sqlite": {
@@ -34617,7 +34617,7 @@ var init_drizzle_orm = __esm(() => {
34617
34617
  init_view_common();
34618
34618
  });
34619
34619
 
34620
- // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.43+0f4912dac59dd9a6/node_modules/@gobing-ai/ts-db/dist/query-spec.js
34620
+ // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.45+6d1591eb73338c5d/node_modules/@gobing-ai/ts-db/dist/query-spec.js
34621
34621
  function compilePredicate(predicate) {
34622
34622
  if ("and" in predicate) {
34623
34623
  const parts = predicate.and.map(compilePredicate).filter((p) => p !== undefined);
@@ -34655,7 +34655,7 @@ var init_query_spec = __esm(() => {
34655
34655
  };
34656
34656
  });
34657
34657
 
34658
- // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.43+0f4912dac59dd9a6/node_modules/@gobing-ai/ts-db/dist/base-dao.js
34658
+ // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.45+6d1591eb73338c5d/node_modules/@gobing-ai/ts-db/dist/base-dao.js
34659
34659
  function asSelectQuery(query) {
34660
34660
  return query;
34661
34661
  }
@@ -34697,7 +34697,7 @@ var init_base_dao = __esm(() => {
34697
34697
  init_query_spec();
34698
34698
  });
34699
34699
 
34700
- // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.43+0f4912dac59dd9a6/node_modules/@gobing-ai/ts-db/dist/embedded-migrations.js
34700
+ // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.45+6d1591eb73338c5d/node_modules/@gobing-ai/ts-db/dist/embedded-migrations.js
34701
34701
  var embeddedMigrations;
34702
34702
  var init_embedded_migrations = __esm(() => {
34703
34703
  embeddedMigrations = [
@@ -34729,7 +34729,7 @@ var init_embedded_migrations = __esm(() => {
34729
34729
  ];
34730
34730
  });
34731
34731
 
34732
- // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.43+0f4912dac59dd9a6/node_modules/@gobing-ai/ts-db/dist/entity-dao.js
34732
+ // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.45+6d1591eb73338c5d/node_modules/@gobing-ai/ts-db/dist/entity-dao.js
34733
34733
  var EntityDao;
34734
34734
  var init_entity_dao = __esm(() => {
34735
34735
  init_drizzle_orm();
@@ -34891,7 +34891,7 @@ var init_entity_dao = __esm(() => {
34891
34891
  };
34892
34892
  });
34893
34893
 
34894
- // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.43+0f4912dac59dd9a6/node_modules/@gobing-ai/ts-db/dist/inbox-message-dao.js
34894
+ // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.45+6d1591eb73338c5d/node_modules/@gobing-ai/ts-db/dist/inbox-message-dao.js
34895
34895
  function isPromiseLike(value) {
34896
34896
  return value !== null && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
34897
34897
  }
@@ -35069,7 +35069,7 @@ var init_migrator2 = __esm(() => {
35069
35069
  init_migrator();
35070
35070
  });
35071
35071
 
35072
- // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.43+0f4912dac59dd9a6/node_modules/@gobing-ai/ts-db/dist/migrate.js
35072
+ // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.45+6d1591eb73338c5d/node_modules/@gobing-ai/ts-db/dist/migrate.js
35073
35073
  async function ensureJournalTable(adapter, table3) {
35074
35074
  await adapter.exec(`CREATE TABLE IF NOT EXISTS "${table3}" (` + "id INTEGER PRIMARY KEY AUTOINCREMENT, " + "hash text NOT NULL, " + "created_at numeric" + ")");
35075
35075
  }
@@ -35144,7 +35144,7 @@ var init_migrate = __esm(() => {
35144
35144
  init_embedded_migrations();
35145
35145
  });
35146
35146
 
35147
- // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.43+0f4912dac59dd9a6/node_modules/@gobing-ai/ts-db/dist/queue-job-dao.js
35147
+ // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.45+6d1591eb73338c5d/node_modules/@gobing-ai/ts-db/dist/queue-job-dao.js
35148
35148
  var QueueJobDao;
35149
35149
  var init_queue_job_dao = __esm(() => {
35150
35150
  init_drizzle_orm();
@@ -35285,7 +35285,7 @@ var init_queue_job_dao = __esm(() => {
35285
35285
  };
35286
35286
  });
35287
35287
 
35288
- // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.43+0f4912dac59dd9a6/node_modules/@gobing-ai/ts-db/dist/index.js
35288
+ // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.45+6d1591eb73338c5d/node_modules/@gobing-ai/ts-db/dist/index.js
35289
35289
  var exports_dist = {};
35290
35290
  __export(exports_dist, {
35291
35291
  embeddedMigrations: () => embeddedMigrations,
@@ -37418,7 +37418,7 @@ var require_extra_typings = __commonJS((exports, module) => {
37418
37418
  exports.createArgument = (name, description) => new commander.Argument(name, description);
37419
37419
  });
37420
37420
 
37421
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/config.js
37421
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/config.js
37422
37422
  function parseYamlObject(text3) {
37423
37423
  let parsed;
37424
37424
  try {
@@ -37545,7 +37545,7 @@ var init_config2 = __esm(() => {
37545
37545
  };
37546
37546
  });
37547
37547
 
37548
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
37548
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
37549
37549
  import { appendFileSync as appendFileSync3, cpSync as cpSync2, createReadStream as createReadStream3, createWriteStream as createWriteStream3, existsSync as existsSync2, mkdirSync as mkdirSync2, readdirSync as readdirSync2, readFileSync as readFileSync4, realpathSync as realpathSync2, renameSync as renameSync2, rmSync as rmSync2, statSync as statSync3, writeFileSync as writeFileSync3 } from "fs";
37550
37550
  import { dirname as dirname2, resolve as resolvePath3 } from "path";
37551
37551
  function createNodeFileSystem3(root, paths) {
@@ -37632,7 +37632,7 @@ function findProjectRoot3(startDir) {
37632
37632
  }
37633
37633
  var init_file_system_node2 = () => {};
37634
37634
 
37635
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/db-errors.js
37635
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/db-errors.js
37636
37636
  var D1NotConfiguredError2, DbModuleNotInstalledError3;
37637
37637
  var init_db_errors2 = __esm(() => {
37638
37638
  D1NotConfiguredError2 = class D1NotConfiguredError2 extends Error {
@@ -37649,7 +37649,7 @@ var init_db_errors2 = __esm(() => {
37649
37649
  };
37650
37650
  });
37651
37651
 
37652
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/file-system-cf.js
37652
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/file-system-cf.js
37653
37653
  function createCfFileSystem2() {
37654
37654
  return {
37655
37655
  getProjectRoot: () => "/bundle",
@@ -37688,7 +37688,7 @@ function createCfFileSystem2() {
37688
37688
  }
37689
37689
  var UNSUPPORTED = "FileSystem is not available on Cloudflare Workers. Use D1, KV, or R2 for persistent storage.";
37690
37690
 
37691
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/runtime-cf.js
37691
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/runtime-cf.js
37692
37692
  var exports_runtime_cf = {};
37693
37693
  __export(exports_runtime_cf, {
37694
37694
  cloudflareWorkersFactory: () => cloudflareWorkersFactory2
@@ -37726,7 +37726,7 @@ var init_runtime_cf = __esm(() => {
37726
37726
  };
37727
37727
  });
37728
37728
 
37729
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/process-executor.js
37729
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/process-executor.js
37730
37730
  import { isatty as isatty2 } from "tty";
37731
37731
  function processEventSeverity2(reason, exitCode) {
37732
37732
  if (reason === "error")
@@ -38137,7 +38137,7 @@ var init_process_executor2 = __esm(() => {
38137
38137
  ProcessExecutor2 = NodeProcessExecutor3;
38138
38138
  });
38139
38139
 
38140
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/runtime-node-bun.js
38140
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/runtime-node-bun.js
38141
38141
  var exports_runtime_node_bun = {};
38142
38142
  __export(exports_runtime_node_bun, {
38143
38143
  nodeBunFactory: () => nodeBunFactory3,
@@ -38205,7 +38205,7 @@ var init_runtime_node_bun2 = __esm(() => {
38205
38205
  };
38206
38206
  });
38207
38207
 
38208
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/platform.js
38208
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/platform.js
38209
38209
  function isCloudflareWorkerRuntime2() {
38210
38210
  return globalThis.navigator?.userAgent?.startsWith("Cloudflare-Workers") ?? false;
38211
38211
  }
@@ -38235,7 +38235,7 @@ function _resetRuntimeFactory2() {
38235
38235
  }
38236
38236
  var _factory, _runtimeName;
38237
38237
 
38238
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/context.js
38238
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/context.js
38239
38239
  class RuntimeContext2 {
38240
38240
  scope;
38241
38241
  runtimeName;
@@ -38325,7 +38325,7 @@ var init_context2 = __esm(() => {
38325
38325
  init_runtime_node_bun2();
38326
38326
  });
38327
38327
 
38328
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/path.js
38328
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/path.js
38329
38329
  function normalizeSeparators2(path7) {
38330
38330
  return path7.replaceAll("\\", "/");
38331
38331
  }
@@ -38448,7 +38448,7 @@ var init_path2 = __esm(() => {
38448
38448
  SEP2 = globalThis.process?.platform === "win32" ? "\\" : "/";
38449
38449
  });
38450
38450
 
38451
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/fs.js
38451
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/fs.js
38452
38452
  async function ensureDirForFile2(path7, fs2 = createNodeFileSystem3()) {
38453
38453
  await fs2.ensureDir(dirnamePath(path7));
38454
38454
  }
@@ -38516,7 +38516,7 @@ var init_fs = __esm(() => {
38516
38516
  init_path2();
38517
38517
  });
38518
38518
 
38519
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/process-registry.js
38519
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/process-registry.js
38520
38520
  function allocateId() {
38521
38521
  nextIdSeq += 1;
38522
38522
  return `pe_${Date.now().toString(36)}_${nextIdSeq.toString(36)}`;
@@ -38640,7 +38640,7 @@ function createInMemoryProcessRegistry2(options) {
38640
38640
  }
38641
38641
  var nextIdSeq = 0;
38642
38642
 
38643
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/runtime-paths.js
38643
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/runtime-paths.js
38644
38644
  function ambientRuntimePaths2() {
38645
38645
  const cwd = getProcessCwd2();
38646
38646
  return { cwd, home: getHomeDir() ?? cwd };
@@ -38650,7 +38650,7 @@ var init_runtime_paths = __esm(() => {
38650
38650
  init_path2();
38651
38651
  });
38652
38652
 
38653
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/schema-validation.js
38653
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/schema-validation.js
38654
38654
  async function loadStructuredConfig(path7, options = {}) {
38655
38655
  const content = await (options.fileSystem ?? createNodeFileSystem3()).readFile(path7);
38656
38656
  return await parseStructuredConfig(content, path7, options);
@@ -38933,10 +38933,10 @@ var init_schema_validation2 = __esm(() => {
38933
38933
  defaultResolve = typeof Bun !== "undefined" ? (specifier, from) => Bun.resolveSync(specifier, from) : undefined;
38934
38934
  });
38935
38935
 
38936
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/types.js
38936
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/types.js
38937
38937
  var init_types2 = () => {};
38938
38938
 
38939
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/index.js
38939
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/index.js
38940
38940
  var exports_dist2 = {};
38941
38941
  __export(exports_dist2, {
38942
38942
  writeJsonFile: () => writeJsonFile2,
@@ -39036,7 +39036,7 @@ var init_finding_codes = __esm(() => {
39036
39036
  "L3.ac-requirement-coverage",
39037
39037
  "L3.solution-file-line",
39038
39038
  "L3.review-priority-table",
39039
- "L3.testing-coverage",
39039
+ "L3.status-claim-contradiction",
39040
39040
  "L3.required-section-placeholder",
39041
39041
  "L3.plan-format",
39042
39042
  "L3.unchecked-checklist",
@@ -39089,7 +39089,7 @@ var init_finding_codes = __esm(() => {
39089
39089
  L3_AC_REQUIREMENT_COVERAGE: "L3.ac-requirement-coverage",
39090
39090
  L3_SOLUTION_FILE_LINE: "L3.solution-file-line",
39091
39091
  L3_REVIEW_PRIORITY_TABLE: "L3.review-priority-table",
39092
- L3_TESTING_COVERAGE: "L3.testing-coverage",
39092
+ L3_STATUS_CLAIM_CONTRADICTION: "L3.status-claim-contradiction",
39093
39093
  L3_REQUIRED_SECTION_PLACEHOLDER: "L3.required-section-placeholder",
39094
39094
  L3_PLAN_FORMAT: "L3.plan-format",
39095
39095
  L3_UNCHECKED_CHECKLIST: "L3.unchecked-checklist",
@@ -41792,7 +41792,7 @@ var init_mod = __esm(() => {
41792
41792
  init_config3();
41793
41793
  });
41794
41794
 
41795
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/logger.js
41795
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/logger.js
41796
41796
  function toLogTapeLevel(level) {
41797
41797
  return level === "warn" ? "warning" : level;
41798
41798
  }
@@ -43345,7 +43345,7 @@ var require_src = __commonJS((exports) => {
43345
43345
  };
43346
43346
  });
43347
43347
 
43348
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/telemetry/sdk.js
43348
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/telemetry/sdk.js
43349
43349
  function getTelemetryConfig(configPartial = {}) {
43350
43350
  return {
43351
43351
  enabled: configPartial.enabled ?? CONFIG_DEFAULTS.enabled,
@@ -43381,7 +43381,7 @@ var init_sdk = __esm(() => {
43381
43381
  resolvedConfig = getTelemetryConfig();
43382
43382
  });
43383
43383
 
43384
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/telemetry/tracing.js
43384
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/telemetry/tracing.js
43385
43385
  function isSuppressed(tracer2) {
43386
43386
  return tracer2 === undefined && !getResolvedConfig().enabled;
43387
43387
  }
@@ -43421,7 +43421,7 @@ var init_tracing2 = __esm(() => {
43421
43421
  import_api2 = __toESM(require_src(), 1);
43422
43422
  });
43423
43423
 
43424
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/telemetry/metrics.js
43424
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/telemetry/metrics.js
43425
43425
  function getMeter() {
43426
43426
  return import_api3.metrics.getMeter(METER_NAME, METER_VERSION);
43427
43427
  }
@@ -43518,7 +43518,7 @@ var init_metrics = __esm(() => {
43518
43518
  instruments = {};
43519
43519
  });
43520
43520
 
43521
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/event-bus/event-bus.js
43521
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/event-bus/event-bus.js
43522
43522
  function busLogger() {
43523
43523
  if (!_busLogger)
43524
43524
  _busLogger = getLogger2("event-bus");
@@ -43771,7 +43771,7 @@ var init_event_bus = __esm(() => {
43771
43771
  init_metrics();
43772
43772
  });
43773
43773
 
43774
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/event-bus/default-observers.js
43774
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/event-bus/default-observers.js
43775
43775
  function obsLogger() {
43776
43776
  if (!_obsLogger)
43777
43777
  _obsLogger = getLogger2("event-bus.observers");
@@ -43835,7 +43835,7 @@ var init_default_observers = __esm(() => {
43835
43835
  init_event_bus();
43836
43836
  });
43837
43837
 
43838
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/event-bus/file-observer.js
43838
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/event-bus/file-observer.js
43839
43839
  function parentDir(filePath) {
43840
43840
  const idx = filePath.lastIndexOf("/");
43841
43841
  return idx <= 0 ? "." : filePath.slice(0, idx);
@@ -43933,7 +43933,7 @@ var init_file_observer = __esm(() => {
43933
43933
  init_logger3();
43934
43934
  });
43935
43935
 
43936
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/internals/drain.js
43936
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/internals/drain.js
43937
43937
  function settleWithin(promise2, deadline) {
43938
43938
  const remaining = deadline - Date.now();
43939
43939
  if (remaining <= 0)
@@ -43948,7 +43948,7 @@ function settleWithin(promise2, deadline) {
43948
43948
  return settled;
43949
43949
  }
43950
43950
 
43951
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/scheduler/node.js
43951
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/scheduler/node.js
43952
43952
  function parseInterval(cron) {
43953
43953
  const trimmed = cron.trim();
43954
43954
  const num = Number(trimmed);
@@ -44042,7 +44042,7 @@ var init_node3 = __esm(() => {
44042
44042
  init_metrics();
44043
44043
  });
44044
44044
 
44045
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/scheduler-node.js
44045
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/scheduler-node.js
44046
44046
  var exports_scheduler_node = {};
44047
44047
  __export(exports_scheduler_node, {
44048
44048
  NodeSchedulerAdapter: () => NodeSchedulerAdapter
@@ -54336,7 +54336,7 @@ class ActionRunDao {
54336
54336
  }
54337
54337
  }
54338
54338
 
54339
- // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.43+0f4912dac59dd9a6/node_modules/@gobing-ai/ts-db/dist/schema/drizzle-internals.js
54339
+ // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.45+6d1591eb73338c5d/node_modules/@gobing-ai/ts-db/dist/schema/drizzle-internals.js
54340
54340
  function sqlExpressionToText(value) {
54341
54341
  if (typeof value !== "object" || value === null || !("queryChunks" in value)) {
54342
54342
  return;
@@ -54359,7 +54359,7 @@ function getDrizzleTableName(table3) {
54359
54359
  return String(table3[nameSym]);
54360
54360
  }
54361
54361
 
54362
- // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.43+0f4912dac59dd9a6/node_modules/@gobing-ai/ts-db/dist/schema/ddl.js
54362
+ // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.45+6d1591eb73338c5d/node_modules/@gobing-ai/ts-db/dist/schema/ddl.js
54363
54363
  function quoteIdent(name) {
54364
54364
  return `"${name.replace(/"/g, '""')}"`;
54365
54365
  }
@@ -54731,7 +54731,7 @@ var init_drizzle_zod = __esm(() => {
54731
54731
  };
54732
54732
  });
54733
54733
 
54734
- // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.43+0f4912dac59dd9a6/node_modules/@gobing-ai/ts-db/dist/schema/define-table.js
54734
+ // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.45+6d1591eb73338c5d/node_modules/@gobing-ai/ts-db/dist/schema/define-table.js
54735
54735
  function defineTable(name, columns2) {
54736
54736
  const table3 = sqliteTable(name, columns2);
54737
54737
  let insert2;
@@ -54765,7 +54765,7 @@ var init_define_table = __esm(() => {
54765
54765
  init_ddl();
54766
54766
  });
54767
54767
 
54768
- // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.43+0f4912dac59dd9a6/node_modules/@gobing-ai/ts-db/dist/schema/index.js
54768
+ // ../../node_modules/.bun/@gobing-ai+ts-db@0.4.45+6d1591eb73338c5d/node_modules/@gobing-ai/ts-db/dist/schema/index.js
54769
54769
  var exports_schema = {};
54770
54770
  __export(exports_schema, {
54771
54771
  text: () => text,
@@ -55387,7 +55387,7 @@ var init_dao = __esm(() => {
55387
55387
  init_workspace_dao();
55388
55388
  });
55389
55389
 
55390
- // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/errors.js
55390
+ // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/errors.js
55391
55391
  var WorkflowValidationError, FSMError, RunCollisionError, WorkflowResumeError;
55392
55392
  var init_errors5 = __esm(() => {
55393
55393
  WorkflowValidationError = class WorkflowValidationError extends Error {
@@ -55422,12 +55422,12 @@ var init_errors5 = __esm(() => {
55422
55422
  };
55423
55423
  });
55424
55424
 
55425
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/event-bus/index.js
55425
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/event-bus/index.js
55426
55426
  var init_event_bus2 = __esm(() => {
55427
55427
  init_event_bus();
55428
55428
  });
55429
55429
 
55430
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/api-client.js
55430
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/api-client.js
55431
55431
  function sanitizeUrlForObservability(url2) {
55432
55432
  try {
55433
55433
  const parsed = new URL(url2);
@@ -55658,12 +55658,12 @@ var init_api_client = __esm(() => {
55658
55658
  };
55659
55659
  });
55660
55660
 
55661
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/telemetry/index.js
55661
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/telemetry/index.js
55662
55662
  var init_telemetry = __esm(() => {
55663
55663
  init_tracing2();
55664
55664
  });
55665
55665
 
55666
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/index.js
55666
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/index.js
55667
55667
  var init_dist6 = __esm(() => {
55668
55668
  init_api_client();
55669
55669
  init_event_bus2();
@@ -55671,7 +55671,7 @@ var init_dist6 = __esm(() => {
55671
55671
  init_telemetry();
55672
55672
  });
55673
55673
 
55674
- // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/run-lifecycle.js
55674
+ // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/run-lifecycle.js
55675
55675
  function runtimeBuiltins(workflowName, stateOrNodeId, runId, transitionsTaken, mode) {
55676
55676
  return {
55677
55677
  workflow: workflowName,
@@ -55955,7 +55955,7 @@ var init_run_lifecycle = __esm(() => {
55955
55955
  ];
55956
55956
  });
55957
55957
 
55958
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/extension/capability-registry.js
55958
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/extension/capability-registry.js
55959
55959
  class CapabilityRegistry {
55960
55960
  kind;
55961
55961
  capabilities = new Map;
@@ -55986,7 +55986,7 @@ class CapabilityRegistry {
55986
55986
  }
55987
55987
  }
55988
55988
 
55989
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/extension/extension-path.js
55989
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/extension/extension-path.js
55990
55990
  function assertRelativeExtensionPath(path9, options = {}) {
55991
55991
  const where = options.sourceName !== undefined ? ` declared by "${options.sourceName}"` : "";
55992
55992
  if (/^([/\\]|[A-Za-z]:[/\\])/.test(path9)) {
@@ -55997,7 +55997,7 @@ function assertRelativeExtensionPath(path9, options = {}) {
55997
55997
  }
55998
55998
  }
55999
55999
 
56000
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/extension/extension-loader.js
56000
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/extension/extension-loader.js
56001
56001
  import { isAbsolute, resolve } from "path";
56002
56002
  async function loadExtensionModules(refs, options, register) {
56003
56003
  if (refs.length === 0)
@@ -56036,17 +56036,17 @@ async function loadExtensionModules(refs, options, register) {
56036
56036
  }
56037
56037
  var init_extension_loader = () => {};
56038
56038
 
56039
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/extension/index.js
56039
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/extension/index.js
56040
56040
  var init_extension = __esm(() => {
56041
56041
  init_extension_loader();
56042
56042
  });
56043
56043
 
56044
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.43+2903c6de41d25eca/node_modules/@gobing-ai/ts-runtime/dist/extension.js
56044
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.45+6331fb8cbb13f69c/node_modules/@gobing-ai/ts-runtime/dist/extension.js
56045
56045
  var init_extension2 = __esm(() => {
56046
56046
  init_extension();
56047
56047
  });
56048
56048
 
56049
- // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/schema.js
56049
+ // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/schema.js
56050
56050
  var RESERVED_VAR_NAMES, IDENTIFIER, VarsSchema, EnvSchema, relativeExtensionPath, WorkflowExtensionsSchema, ActionDefSchema, GuardDefSchema, StateMachineWorkflowDefSchema, TransitionFlowWorkflowDefSchema, WorkflowDefSchema;
56051
56051
  var init_schema2 = __esm(() => {
56052
56052
  init_extension2();
@@ -56148,7 +56148,7 @@ var init_schema2 = __esm(() => {
56148
56148
  WorkflowDefSchema = exports_external.union([StateMachineWorkflowDefSchema, TransitionFlowWorkflowDefSchema]);
56149
56149
  });
56150
56150
 
56151
- // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/config.js
56151
+ // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/config.js
56152
56152
  async function loadWorkflowDef(path9, options = {}) {
56153
56153
  return parseWorkflowDef(await loadStructuredConfig(path9, options), path9);
56154
56154
  }
@@ -56315,7 +56315,7 @@ var init_config4 = __esm(() => {
56315
56315
  RUNTIME_TEMPLATE_NAMESPACES = new Set(RUNTIME_BUILTIN_KEYS);
56316
56316
  });
56317
56317
 
56318
- // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/extensions.js
56318
+ // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/extensions.js
56319
56319
  function collectWorkflowExtensions(sourceName, sourceDir, extensions) {
56320
56320
  if (extensions === undefined)
56321
56321
  return [];
@@ -56379,7 +56379,7 @@ var init_extensions = __esm(() => {
56379
56379
  init_errors5();
56380
56380
  });
56381
56381
 
56382
- // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/host.js
56382
+ // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/host.js
56383
56383
  class WorkflowEngineHost {
56384
56384
  lifecycleBus;
56385
56385
  actions = new CapabilityRegistry("workflow action");
@@ -56549,7 +56549,7 @@ var init_host = __esm(() => {
56549
56549
  init_errors5();
56550
56550
  });
56551
56551
 
56552
- // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/schema-sql.js
56552
+ // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/schema-sql.js
56553
56553
  var WORKFLOW_ENGINE_SCHEMA_SQL;
56554
56554
  var init_schema_sql = __esm(() => {
56555
56555
  WORKFLOW_ENGINE_SCHEMA_SQL = `
@@ -56622,7 +56622,7 @@ CREATE TABLE IF NOT EXISTS action_runs (
56622
56622
  `.trim();
56623
56623
  });
56624
56624
 
56625
- // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/persistence.js
56625
+ // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/persistence.js
56626
56626
  async function applyWorkflowEngineSchema(db2) {
56627
56627
  for (const statement of WORKFLOW_ENGINE_SCHEMA_SQL.split(";")) {
56628
56628
  const sql4 = statement.trim();
@@ -56938,7 +56938,7 @@ var init_persistence = __esm(() => {
56938
56938
  init_schema_sql();
56939
56939
  });
56940
56940
 
56941
- // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/variables.js
56941
+ // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/variables.js
56942
56942
  function mergeVars(workflowVars = {}, overrideVars = {}) {
56943
56943
  return { ...workflowVars, ...overrideVars };
56944
56944
  }
@@ -56998,7 +56998,7 @@ var init_variables = __esm(() => {
56998
56998
  TEMPLATE_REF = /\$\{([^}]+)\}/g;
56999
56999
  });
57000
57000
 
57001
- // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/action-step.js
57001
+ // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/action-step.js
57002
57002
  async function runActionStep(action, vars, deps) {
57003
57003
  const { host, persistence, lifecycle, stateOrNodeId, runId } = deps;
57004
57004
  const resolved = resolveTemplates(action.options ?? {}, {
@@ -57062,7 +57062,7 @@ var init_action_step = __esm(() => {
57062
57062
  init_variables();
57063
57063
  });
57064
57064
 
57065
- // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/state-machine.js
57065
+ // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/state-machine.js
57066
57066
  class StateMachineDriver {
57067
57067
  options;
57068
57068
  constructor(options) {
@@ -57198,7 +57198,7 @@ var init_state_machine = __esm(() => {
57198
57198
  EMPTY_OUTCOME = { outcome: "completed", result: undefined, setVars: undefined };
57199
57199
  });
57200
57200
 
57201
- // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/transition-flow.js
57201
+ // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/transition-flow.js
57202
57202
  class TransitionFlowDriver {
57203
57203
  options;
57204
57204
  constructor(options) {
@@ -57317,7 +57317,7 @@ var init_transition_flow = __esm(() => {
57317
57317
  init_variables();
57318
57318
  });
57319
57319
 
57320
- // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/service.js
57320
+ // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/service.js
57321
57321
  class WorkflowService {
57322
57322
  host;
57323
57323
  persistence;
@@ -57542,7 +57542,7 @@ var init_service = __esm(() => {
57542
57542
  init_variables();
57543
57543
  });
57544
57544
 
57545
- // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/index.js
57545
+ // ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/index.js
57546
57546
  var init_dist7 = __esm(() => {
57547
57547
  init_config4();
57548
57548
  init_extensions();
@@ -57552,7 +57552,7 @@ var init_dist7 = __esm(() => {
57552
57552
  init_service();
57553
57553
  });
57554
57554
 
57555
- // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.43+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/hash.js
57555
+ // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.45+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/hash.js
57556
57556
  import { createHash as createHash3 } from "crypto";
57557
57557
  function stableJson(value) {
57558
57558
  if (Array.isArray(value)) {
@@ -57569,7 +57569,7 @@ function sha256(value) {
57569
57569
  }
57570
57570
  var init_hash = () => {};
57571
57571
 
57572
- // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.43+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/errors.js
57572
+ // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.45+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/errors.js
57573
57573
  var HistoryImportError;
57574
57574
  var init_errors6 = __esm(() => {
57575
57575
  HistoryImportError = class HistoryImportError extends Error {
@@ -57582,7 +57582,7 @@ var init_errors6 = __esm(() => {
57582
57582
  };
57583
57583
  });
57584
57584
 
57585
- // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.43+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/schema-sql.js
57585
+ // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.45+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/schema-sql.js
57586
57586
  var HISTORY_IMPORT_SCHEMA_SQL;
57587
57587
  var init_schema_sql2 = __esm(() => {
57588
57588
  HISTORY_IMPORT_SCHEMA_SQL = `
@@ -57669,7 +57669,7 @@ CREATE INDEX IF NOT EXISTS idx_history_tool_call_message_hash
57669
57669
  `.trim();
57670
57670
  });
57671
57671
 
57672
- // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.43+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/mappers.js
57672
+ // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.45+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/mappers.js
57673
57673
  function identityFieldMap(keys) {
57674
57674
  const map2 = {};
57675
57675
  for (const key of keys) {
@@ -58934,7 +58934,7 @@ var init_mappers = __esm(() => {
58934
58934
  GEMINI_SCHEMA = passthroughSchema;
58935
58935
  });
58936
58936
 
58937
- // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.43+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/sources.js
58937
+ // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.45+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/sources.js
58938
58938
  function firstString(...values) {
58939
58939
  for (const value of values) {
58940
58940
  if (typeof value === "string" && value.length > 0)
@@ -59091,7 +59091,7 @@ var init_sources = __esm(() => {
59091
59091
  };
59092
59092
  });
59093
59093
 
59094
- // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.43+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/jsonl-importer-dao.js
59094
+ // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.45+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/jsonl-importer-dao.js
59095
59095
  function targetTableFor(table3) {
59096
59096
  if (!VALID_TABLE_NAME.test(table3)) {
59097
59097
  throw new HistoryImportError(`Invalid history ETL target table: ${table3}`, { table: table3 });
@@ -59215,6 +59215,14 @@ function toolCallResultBytesUpdateOp(recordHash, resultBytes) {
59215
59215
  params: [resultBytes, recordHash]
59216
59216
  };
59217
59217
  }
59218
+ function codexUsageAttributionUpdateOp(recordHash, tokens) {
59219
+ return {
59220
+ sql: `UPDATE history_message
59221
+ SET input_tokens = ?, output_tokens = ?, cache_read_tokens = ?
59222
+ WHERE record_hash = ?`,
59223
+ params: [tokens.input, tokens.output, tokens.cacheRead, recordHash]
59224
+ };
59225
+ }
59218
59226
  async function ledgerExistingHashes(db2, hashes) {
59219
59227
  const existing = new Set;
59220
59228
  for (let i2 = 0;i2 < hashes.length; i2 += 200) {
@@ -59415,7 +59423,7 @@ var init_jsonl_importer_dao = __esm(() => {
59415
59423
  TYPED_IGNORED_KEYS = new Set(["_meta", "split_index"]);
59416
59424
  });
59417
59425
 
59418
- // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.43+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/redaction.js
59426
+ // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.45+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/redaction.js
59419
59427
  function redactValue(value, rules = DEFAULT_REDACTION_RULES) {
59420
59428
  if (typeof value === "string") {
59421
59429
  return rules.reduce((current, rule) => current.replace(rule.pattern, rule.replacement), value);
@@ -59467,7 +59475,7 @@ var init_redaction = __esm(() => {
59467
59475
  ];
59468
59476
  });
59469
59477
 
59470
- // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.43+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/importer.js
59478
+ // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.45+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/importer.js
59471
59479
  function toolCallKey(source, sessionId, callId) {
59472
59480
  return `${source}${TOOL_CALL_KEY_SEP}${sessionId}${TOOL_CALL_KEY_SEP}${callId}`;
59473
59481
  }
@@ -59639,15 +59647,14 @@ async function runJsonlImport(source, options) {
59639
59647
  const carrier = normalized._codexUsageCarrier;
59640
59648
  delete normalized._codexUsageCarrier;
59641
59649
  if (carrier !== undefined && typeof normalized.session_id === "string" && codexLastAssistant.has(normalized.session_id)) {
59642
- ops.push({
59643
- sql: "UPDATE history_message SET input_tokens = ?, output_tokens = ?, cache_read_tokens = ? WHERE record_hash = ?",
59644
- params: [
59645
- carrier.input,
59646
- carrier.output,
59647
- carrier.cacheRead,
59648
- codexLastAssistant.get(normalized.session_id)
59649
- ]
59650
- });
59650
+ const lastHash = codexLastAssistant.get(normalized.session_id);
59651
+ if (lastHash !== undefined) {
59652
+ ops.push(codexUsageAttributionUpdateOp(lastHash, {
59653
+ input: carrier.input,
59654
+ output: carrier.output,
59655
+ cacheRead: carrier.cacheRead
59656
+ }));
59657
+ }
59651
59658
  }
59652
59659
  ops.push(recordInsertOp(split.targetTable, recordHash, file2, lineNumber, splitIndex, normalized, options.now));
59653
59660
  ops.push(ledgerInsertOp(recordHash, resolvedSource, file2, lineNumber, splitIndex, split.targetTable, options.now));
@@ -59872,7 +59879,7 @@ var init_importer = __esm(() => {
59872
59879
  init_sources();
59873
59880
  });
59874
59881
 
59875
- // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.43+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/opencode-importer.js
59882
+ // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.45+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/opencode-importer.js
59876
59883
  async function runOpenCodeImport(options) {
59877
59884
  const paths = options.paths ?? ambientRuntimePaths2();
59878
59885
  const sourceDatabase = options.sourceDatabase ?? joinPath2(paths.home, ".local/share/opencode/opencode.db");
@@ -60129,7 +60136,7 @@ var init_opencode_importer = __esm(() => {
60129
60136
  init_redaction();
60130
60137
  });
60131
60138
 
60132
- // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.43+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/index.js
60139
+ // ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.45+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/index.js
60133
60140
  var init_dist8 = __esm(() => {
60134
60141
  init_importer();
60135
60142
  init_mappers();
@@ -60138,7 +60145,7 @@ var init_dist8 = __esm(() => {
60138
60145
  init_sources();
60139
60146
  });
60140
60147
 
60141
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/config/extensions.js
60148
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/config/extensions.js
60142
60149
  function collectExtensions(sourceName, sourceDir, extensions) {
60143
60150
  if (extensions === undefined)
60144
60151
  return [];
@@ -60152,7 +60159,7 @@ function collectExtensions(sourceName, sourceDir, extensions) {
60152
60159
  }
60153
60160
  var init_extensions2 = () => {};
60154
60161
 
60155
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/types.js
60162
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/types.js
60156
60163
  function createFinding(rule, message, filePath, extras = {}) {
60157
60164
  return {
60158
60165
  ruleId: rule.id,
@@ -60223,7 +60230,7 @@ var init_types3 = __esm(() => {
60223
60230
  });
60224
60231
  });
60225
60232
 
60226
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/config/loader.js
60233
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/config/loader.js
60227
60234
  async function loadPreset(name, options) {
60228
60235
  const merged = await buildMergedRoots(options.roots.map((root) => resolvePath4(root)), options.fileSystem);
60229
60236
  const presetPath = findMergedPreset(merged, name);
@@ -60438,7 +60445,7 @@ var init_loader2 = __esm(() => {
60438
60445
  FIX_MODE_AUTHORITY = { none: 0, suggest: 1, auto: 2 };
60439
60446
  });
60440
60447
 
60441
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/fixers/test-stub-fixer.js
60448
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/fixers/test-stub-fixer.js
60442
60449
  function normalizeFindingPath(filePath) {
60443
60450
  if (!filePath || isAbsolutePath2(filePath))
60444
60451
  return null;
@@ -60503,7 +60510,7 @@ var init_test_stub_fixer = __esm(() => {
60503
60510
  realFileSystem = createNodeFileSystem3();
60504
60511
  });
60505
60512
 
60506
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/fixers/fixers.js
60513
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/fixers/fixers.js
60507
60514
  function registerBuiltinFixers(host, exec) {
60508
60515
  const regexFixer = new RegexFixerProvider;
60509
60516
  const pathFixer = new PathFixerProvider;
@@ -60706,7 +60713,7 @@ var init_fixers = __esm(() => {
60706
60713
  };
60707
60714
  });
60708
60715
 
60709
- // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.43+196da29841148d73/node_modules/@gobing-ai/ts-ai-runner/dist/agents/shims.js
60716
+ // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.45+e6176d7fb9f2801d/node_modules/@gobing-ai/ts-ai-runner/dist/agents/shims.js
60710
60717
  function getAgentSessionCapability(agent) {
60711
60718
  return AGENT_SESSION_CAPABILITY[agent];
60712
60719
  }
@@ -60856,11 +60863,13 @@ var init_shims = __esm(() => {
60856
60863
  name: "antigravity-cli",
60857
60864
  command: "agy",
60858
60865
  tier: 1,
60859
- aliases: ["antigravity"],
60866
+ aliases: ["antigravity", "agy"],
60860
60867
  getHelpCommand: () => ({ command: "agy", args: ["--help"] }),
60861
60868
  getVersionCommand: () => ({ command: "agy", args: ["--version"] }),
60862
60869
  getPromptCommand: (options) => {
60863
- const args = ["-p", options.input ?? ""];
60870
+ const args = ["-p", options.input ?? "", "--dangerously-skip-permissions"];
60871
+ if (options.workspace !== undefined)
60872
+ args.push("--add-dir", options.workspace);
60864
60873
  const hasSession = options.sessionId !== undefined || options.sessionDir !== undefined;
60865
60874
  if (hasSession) {
60866
60875
  if (options.sessionId !== undefined)
@@ -60998,7 +61007,7 @@ var init_shims = __esm(() => {
60998
61007
  ALIAS_TO_CANONICAL = Object.fromEntries(Object.values(AGENT_SHIMS).flatMap((shim) => (shim.aliases ?? []).map((alias3) => [alias3, shim.name])));
60999
61008
  });
61000
61009
 
61001
- // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.43+196da29841148d73/node_modules/@gobing-ai/ts-ai-runner/dist/identity.js
61010
+ // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.45+e6176d7fb9f2801d/node_modules/@gobing-ai/ts-ai-runner/dist/identity.js
61002
61011
  function buildIdentityPreamble(ctx) {
61003
61012
  const sections = [
61004
61013
  `You are agent \`${ctx.agentId}\` (${ctx.agentType}) in workspace \`${ctx.workspace}\`.`
@@ -61074,7 +61083,7 @@ var init_identity = __esm(() => {
61074
61083
  init_dist5();
61075
61084
  });
61076
61085
 
61077
- // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.43+196da29841148d73/node_modules/@gobing-ai/ts-ai-runner/dist/slash-command.js
61086
+ // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.45+e6176d7fb9f2801d/node_modules/@gobing-ai/ts-ai-runner/dist/slash-command.js
61078
61087
  function isClaudeStyleSlashCommand(input) {
61079
61088
  return SLASH_COMMAND_RE.test(input);
61080
61089
  }
@@ -61102,7 +61111,7 @@ var init_slash_command = __esm(() => {
61102
61111
  SLASH_COMMAND_RE = /^\/([a-zA-Z0-9._-]+):([a-zA-Z0-9._-]+)(\s.*)?$/;
61103
61112
  });
61104
61113
 
61105
- // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.43+196da29841148d73/node_modules/@gobing-ai/ts-ai-runner/dist/ai-runner.js
61114
+ // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.45+e6176d7fb9f2801d/node_modules/@gobing-ai/ts-ai-runner/dist/ai-runner.js
61106
61115
  function buildCorrelationEnv(correlation) {
61107
61116
  return {
61108
61117
  [AGENT_RUN_ID_ENV]: correlation.runId,
@@ -61213,7 +61222,10 @@ function hasIdentityOptions(options) {
61213
61222
  return options.purpose !== undefined || options.systemPrompt !== undefined || options.taskId !== undefined || options.peers !== undefined && options.peers.length > 0;
61214
61223
  }
61215
61224
  function buildAgentCommand(agent, promptOptions, context4) {
61216
- return getAgentShim(agent).getPromptCommand(applyIdentityPreamble(agent, promptOptions, context4));
61225
+ return getAgentShim(agent).getPromptCommand({
61226
+ workspace: context4.workspace,
61227
+ ...applyIdentityPreamble(agent, promptOptions, context4)
61228
+ });
61217
61229
  }
61218
61230
  function applyIdentityPreamble(agent, promptOptions, context4) {
61219
61231
  if (!hasIdentityOptions(promptOptions))
@@ -61240,7 +61252,7 @@ var init_ai_runner = __esm(() => {
61240
61252
  init_slash_command();
61241
61253
  });
61242
61254
 
61243
- // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.43+196da29841148d73/node_modules/@gobing-ai/ts-ai-runner/dist/agent-detector.js
61255
+ // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.45+e6176d7fb9f2801d/node_modules/@gobing-ai/ts-ai-runner/dist/agent-detector.js
61244
61256
  class AgentDetector {
61245
61257
  runner;
61246
61258
  timeout;
@@ -61316,7 +61328,7 @@ var init_agent_detector = __esm(() => {
61316
61328
  VERSION_PATTERN = /(?<version>\d+\.\d+(?:\.\d+)?)/;
61317
61329
  });
61318
61330
 
61319
- // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.43+196da29841148d73/node_modules/@gobing-ai/ts-ai-runner/dist/agent-spec.js
61331
+ // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.45+e6176d7fb9f2801d/node_modules/@gobing-ai/ts-ai-runner/dist/agent-spec.js
61320
61332
  function validateAgentId(id) {
61321
61333
  if (!/^[a-z][a-z0-9_-]{1,63}$/.test(id)) {
61322
61334
  throw new ValueError(`Invalid agent id "${id}": expected 2-64 chars, lowercase alphanumeric, "_" or "-"`);
@@ -61415,7 +61427,7 @@ var init_agent_spec = __esm(() => {
61415
61427
  };
61416
61428
  });
61417
61429
 
61418
- // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.43+196da29841148d73/node_modules/@gobing-ai/ts-ai-runner/dist/agents/auth-shims.js
61430
+ // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.45+e6176d7fb9f2801d/node_modules/@gobing-ai/ts-ai-runner/dist/agents/auth-shims.js
61419
61431
  function isNonEmpty(value) {
61420
61432
  return value !== undefined && value.trim().length > 0;
61421
61433
  }
@@ -61540,7 +61552,7 @@ var init_auth_shims = __esm(() => {
61540
61552
  };
61541
61553
  });
61542
61554
 
61543
- // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.43+196da29841148d73/node_modules/@gobing-ai/ts-ai-runner/dist/model-health-probe.js
61555
+ // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.45+e6176d7fb9f2801d/node_modules/@gobing-ai/ts-ai-runner/dist/model-health-probe.js
61544
61556
  class ModelHealthProbeRegistry {
61545
61557
  probes = new Map;
61546
61558
  register(providerPrefix, probe) {
@@ -61648,7 +61660,7 @@ var init_model_health_probe = __esm(() => {
61648
61660
  };
61649
61661
  });
61650
61662
 
61651
- // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.43+196da29841148d73/node_modules/@gobing-ai/ts-ai-runner/dist/doctor-runner.js
61663
+ // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.45+e6176d7fb9f2801d/node_modules/@gobing-ai/ts-ai-runner/dist/doctor-runner.js
61652
61664
  class DoctorRunner {
61653
61665
  detector;
61654
61666
  runner;
@@ -61699,7 +61711,8 @@ class DoctorRunner {
61699
61711
  const byName = new Map(detected.map((agent) => [agent.name, agent]));
61700
61712
  const results = [];
61701
61713
  for (const executor of this.executors) {
61702
- const agentDetected = byName.get(executor.agent) ?? {
61714
+ const canonical = resolveAgentName(executor.agent);
61715
+ const agentDetected = byName.get(executor.agent) ?? (canonical !== undefined ? byName.get(canonical) : undefined) ?? {
61703
61716
  name: executor.agent,
61704
61717
  installed: false,
61705
61718
  version: null,
@@ -61787,15 +61800,15 @@ var init_doctor_runner = __esm(() => {
61787
61800
  init_model_health_probe();
61788
61801
  });
61789
61802
 
61790
- // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.43+196da29841148d73/node_modules/@gobing-ai/ts-ai-runner/dist/events.js
61803
+ // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.45+e6176d7fb9f2801d/node_modules/@gobing-ai/ts-ai-runner/dist/events.js
61791
61804
  var init_events = () => {};
61792
61805
 
61793
- // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.43+196da29841148d73/node_modules/@gobing-ai/ts-ai-runner/dist/messages.js
61806
+ // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.45+e6176d7fb9f2801d/node_modules/@gobing-ai/ts-ai-runner/dist/messages.js
61794
61807
  function formatMessage(msg) {
61795
61808
  return `[task from=${msg.fromId ?? "operator"} id=${msg.id}] ${msg.body}`;
61796
61809
  }
61797
61810
 
61798
- // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.43+196da29841148d73/node_modules/@gobing-ai/ts-ai-runner/dist/team-agent-process.js
61811
+ // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.45+e6176d7fb9f2801d/node_modules/@gobing-ai/ts-ai-runner/dist/team-agent-process.js
61799
61812
  import { Buffer as Buffer5 } from "buffer";
61800
61813
 
61801
61814
  class TeamAgentProcess {
@@ -61929,7 +61942,7 @@ var init_team_agent_process = __esm(() => {
61929
61942
  init_dist5();
61930
61943
  });
61931
61944
 
61932
- // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.43+196da29841148d73/node_modules/@gobing-ai/ts-ai-runner/dist/team-orchestrator.js
61945
+ // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.45+e6176d7fb9f2801d/node_modules/@gobing-ai/ts-ai-runner/dist/team-orchestrator.js
61933
61946
  class TeamOrchestrator {
61934
61947
  configDir;
61935
61948
  inbox;
@@ -62070,7 +62083,7 @@ var init_team_orchestrator = __esm(() => {
62070
62083
  init_team_agent_process();
62071
62084
  });
62072
62085
 
62073
- // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.43+196da29841148d73/node_modules/@gobing-ai/ts-ai-runner/dist/index.js
62086
+ // ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.45+e6176d7fb9f2801d/node_modules/@gobing-ai/ts-ai-runner/dist/index.js
62074
62087
  var exports_dist3 = {};
62075
62088
  __export(exports_dist3, {
62076
62089
  validateAgentId: () => validateAgentId,
@@ -62123,7 +62136,7 @@ var init_dist9 = __esm(() => {
62123
62136
  init_team_orchestrator();
62124
62137
  });
62125
62138
 
62126
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/config-access.js
62139
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/config-access.js
62127
62140
  function stringArray(value) {
62128
62141
  return Array.isArray(value) && value.every((item) => typeof item === "string") ? value : undefined;
62129
62142
  }
@@ -62161,7 +62174,7 @@ function parseInlineFlags(source) {
62161
62174
  return { flags, rest: source.slice(match[0].length) };
62162
62175
  }
62163
62176
 
62164
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/glob-match.js
62177
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/glob-match.js
62165
62178
  function matchesAny(path9, patterns) {
62166
62179
  if (patterns === undefined || patterns.length === 0)
62167
62180
  return true;
@@ -62209,7 +62222,7 @@ function escapeRegExp(value) {
62209
62222
  return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
62210
62223
  }
62211
62224
 
62212
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/file-discovery.js
62225
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/file-discovery.js
62213
62226
  async function discoverFiles2(options) {
62214
62227
  const fs3 = options.fs ?? createNodeFileSystem3();
62215
62228
  const allFiles = await walkDir2(options.workdir, fs3, DEFAULT_EXCLUDES);
@@ -62240,12 +62253,12 @@ var init_file_discovery = __esm(() => {
62240
62253
  DEFAULT_EXCLUDES = new Set([".git", "node_modules", "dist", ".coverage", ".astro", ".wrangler"]);
62241
62254
  });
62242
62255
 
62243
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/file-utils.js
62256
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/file-utils.js
62244
62257
  var init_file_utils = __esm(() => {
62245
62258
  init_file_discovery();
62246
62259
  });
62247
62260
 
62248
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/agent-detection-evaluator.js
62261
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/agent-detection-evaluator.js
62249
62262
  class AgentDetectionEvaluator {
62250
62263
  detector;
62251
62264
  constructor(detector = new AgentDetector) {
@@ -62273,7 +62286,7 @@ var init_agent_detection_evaluator = __esm(() => {
62273
62286
  init_file_utils();
62274
62287
  });
62275
62288
 
62276
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/coverage-gate-evaluator.js
62289
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/coverage-gate-evaluator.js
62277
62290
  class CoverageGateEvaluator {
62278
62291
  constructor() {}
62279
62292
  async evaluate(rule, context4) {
@@ -62357,7 +62370,7 @@ var init_coverage_gate_evaluator = __esm(() => {
62357
62370
  init_file_utils();
62358
62371
  });
62359
62372
 
62360
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/exit-code-evaluator.js
62373
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/exit-code-evaluator.js
62361
62374
  class ExitCodeEvaluator {
62362
62375
  executor;
62363
62376
  constructor(executor = nodeBunFactory3.createProcessExecutor()) {
@@ -62393,7 +62406,7 @@ var init_exit_code_evaluator = __esm(() => {
62393
62406
  init_file_utils();
62394
62407
  });
62395
62408
 
62396
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/forbidden-import-evaluator.js
62409
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/forbidden-import-evaluator.js
62397
62410
  class ForbiddenImportEvaluator {
62398
62411
  constructor() {}
62399
62412
  async evaluate(rule, context4) {
@@ -62474,7 +62487,7 @@ var init_forbidden_import_evaluator = __esm(() => {
62474
62487
  init_file_utils();
62475
62488
  });
62476
62489
 
62477
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/import-boundary-evaluator.js
62490
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/import-boundary-evaluator.js
62478
62491
  class ImportBoundaryEvaluator {
62479
62492
  async evaluate(rule, context4) {
62480
62493
  const config4 = rule.evaluator.config ?? {};
@@ -62567,7 +62580,7 @@ var init_import_boundary_evaluator = __esm(() => {
62567
62580
  init_file_utils();
62568
62581
  });
62569
62582
 
62570
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/path-evaluator.js
62583
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/path-evaluator.js
62571
62584
  class PathEvaluator {
62572
62585
  constructor() {}
62573
62586
  async evaluate(rule, context4) {
@@ -62628,7 +62641,7 @@ var init_path_evaluator = __esm(() => {
62628
62641
  init_file_utils();
62629
62642
  });
62630
62643
 
62631
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/regex-evaluator.js
62644
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/regex-evaluator.js
62632
62645
  class RegexEvaluator {
62633
62646
  constructor() {}
62634
62647
  async evaluate(rule, context4) {
@@ -62706,7 +62719,7 @@ var init_regex_evaluator = __esm(() => {
62706
62719
  init_file_utils();
62707
62720
  });
62708
62721
 
62709
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/ripgrep-evaluator.js
62722
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/ripgrep-evaluator.js
62710
62723
  class RipgrepEvaluator {
62711
62724
  executor;
62712
62725
  constructor(executor = nodeBunFactory3.createProcessExecutor()) {
@@ -62799,7 +62812,7 @@ var init_ripgrep_evaluator = __esm(() => {
62799
62812
  init_file_utils();
62800
62813
  });
62801
62814
 
62802
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/schema-artifact-evaluator.js
62815
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/schema-artifact-evaluator.js
62803
62816
  class SchemaArtifactEvaluator {
62804
62817
  constructor() {}
62805
62818
  async evaluate(rule, context4) {
@@ -62877,7 +62890,7 @@ var init_schema_artifact_evaluator = __esm(() => {
62877
62890
  init_file_utils();
62878
62891
  });
62879
62892
 
62880
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/secrets-scanner-evaluator.js
62893
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/secrets-scanner-evaluator.js
62881
62894
  class SecretsScannerEvaluator {
62882
62895
  constructor() {}
62883
62896
  async evaluate(rule, context4) {
@@ -62945,7 +62958,7 @@ var init_secrets_scanner_evaluator = __esm(() => {
62945
62958
  ALL_CATEGORIES = Object.keys(BUILTIN_PATTERNS);
62946
62959
  });
62947
62960
 
62948
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/sg-evaluator.js
62961
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/sg-evaluator.js
62949
62962
  class SgEvaluator {
62950
62963
  executor;
62951
62964
  constructor(executor = nodeBunFactory3.createProcessExecutor()) {
@@ -63042,7 +63055,7 @@ var init_sg_evaluator = __esm(() => {
63042
63055
  init_file_utils();
63043
63056
  });
63044
63057
 
63045
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/resolvers/test-path-resolver.js
63058
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/resolvers/test-path-resolver.js
63046
63059
  class TypeScriptTestPathResolver {
63047
63060
  name = "typescript";
63048
63061
  constructor() {}
@@ -63125,7 +63138,7 @@ function testify(rel) {
63125
63138
  return `${dir}test_${base2}`;
63126
63139
  }
63127
63140
 
63128
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/test-location-evaluator.js
63141
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/test-location-evaluator.js
63129
63142
  class TestLocationEvaluator {
63130
63143
  resolvers;
63131
63144
  constructor(resolvers) {
@@ -63200,7 +63213,7 @@ var init_test_location_evaluator = __esm(() => {
63200
63213
  TYPESCRIPT_FALLBACK = new TypeScriptTestPathResolver;
63201
63214
  });
63202
63215
 
63203
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/tsdoc-export-evaluator.js
63216
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/tsdoc-export-evaluator.js
63204
63217
  class TsdocExportEvaluator {
63205
63218
  constructor() {}
63206
63219
  async evaluate(rule, context4) {
@@ -63285,7 +63298,7 @@ var init_tsdoc_export_evaluator = __esm(() => {
63285
63298
  };
63286
63299
  });
63287
63300
 
63288
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/formatters/json.js
63301
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/formatters/json.js
63289
63302
  class JsonFormatter {
63290
63303
  constructor() {}
63291
63304
  format(result) {
@@ -63293,7 +63306,7 @@ class JsonFormatter {
63293
63306
  }
63294
63307
  }
63295
63308
 
63296
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/formatters/text.js
63309
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/formatters/text.js
63297
63310
  class TextFormatter {
63298
63311
  constructor() {}
63299
63312
  format(result) {
@@ -63307,7 +63320,7 @@ class TextFormatter {
63307
63320
  }
63308
63321
  }
63309
63322
 
63310
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/host/builtins.js
63323
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/host/builtins.js
63311
63324
  function registerBuiltins(host, executor) {
63312
63325
  const path9 = new PathEvaluator;
63313
63326
  host.evaluators.register("regex", new RegexEvaluator, "builtin");
@@ -63347,7 +63360,7 @@ var init_builtins = __esm(() => {
63347
63360
  init_tsdoc_export_evaluator();
63348
63361
  });
63349
63362
 
63350
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/host/rule-engine-host.js
63363
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/host/rule-engine-host.js
63351
63364
  class RuleEngineHost {
63352
63365
  evaluators;
63353
63366
  formatters;
@@ -63364,7 +63377,7 @@ var init_rule_engine_host = __esm(() => {
63364
63377
  init_extension2();
63365
63378
  });
63366
63379
 
63367
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/engine.js
63380
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/engine.js
63368
63381
  class RuleEngine {
63369
63382
  host;
63370
63383
  events;
@@ -63550,7 +63563,7 @@ var init_engine = __esm(() => {
63550
63563
  init_types3();
63551
63564
  });
63552
63565
 
63553
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/host/bundled-rules.js
63566
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/host/bundled-rules.js
63554
63567
  async function bundledRulesRoot() {
63555
63568
  if (cachedRoot2 !== undefined)
63556
63569
  return cachedRoot2;
@@ -63601,7 +63614,7 @@ var init_bundled_rules = __esm(() => {
63601
63614
  init_dist5();
63602
63615
  });
63603
63616
 
63604
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/persistence/db-adapter.js
63617
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/persistence/db-adapter.js
63605
63618
  class DbRulePersistenceAdapter {
63606
63619
  db;
63607
63620
  constructor(db2) {
@@ -63635,7 +63648,7 @@ class DbRulePersistenceAdapter {
63635
63648
  }
63636
63649
  }
63637
63650
 
63638
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/persistence/schema.js
63651
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/persistence/schema.js
63639
63652
  var RULE_ENGINE_SCHEMA_SQL = `
63640
63653
  CREATE TABLE IF NOT EXISTS rule_runs (
63641
63654
  id TEXT PRIMARY KEY,
@@ -63681,10 +63694,10 @@ CREATE TABLE IF NOT EXISTS rule_eval_runs (
63681
63694
  CREATE INDEX IF NOT EXISTS idx_rule_eval_runs_run_id ON rule_eval_runs (run_id);
63682
63695
  `;
63683
63696
 
63684
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/persistence/index.js
63697
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/persistence/index.js
63685
63698
  var init_persistence2 = () => {};
63686
63699
 
63687
- // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.43+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/index.js
63700
+ // ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.45+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/index.js
63688
63701
  var init_dist10 = __esm(() => {
63689
63702
  init_extensions2();
63690
63703
  init_loader2();
@@ -64306,7 +64319,7 @@ ${HISTORY_RUN_SESSION_SCHEMA_SQL}
64306
64319
  ];
64307
64320
  });
64308
64321
 
64309
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/job-queue/db-job-queue.js
64322
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/job-queue/db-job-queue.js
64310
64323
  function queueLogger() {
64311
64324
  if (!_queueLogger)
64312
64325
  _queueLogger = getLogger2("job-queue");
@@ -64609,7 +64622,7 @@ var init_db_job_queue = __esm(() => {
64609
64622
  init_tracing2();
64610
64623
  });
64611
64624
 
64612
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/job-queue-db.js
64625
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/job-queue-db.js
64613
64626
  var exports_job_queue_db = {};
64614
64627
  __export(exports_job_queue_db, {
64615
64628
  DBQueueConsumer: () => DBQueueConsumer,
@@ -67918,12 +67931,21 @@ function extractStatusCodes(text4) {
67918
67931
  }
67919
67932
  return codes;
67920
67933
  }
67934
+ function permissionFailureEvidence(text4) {
67935
+ if (!PERMISSION_PATTERNS.some((pattern) => pattern.test(text4)))
67936
+ return;
67937
+ const line = text4.split(`
67938
+ `).map((candidate) => candidate.trim()).find((candidate) => PERMISSION_PATTERNS.some((pattern) => pattern.test(candidate)));
67939
+ return line !== undefined && line !== "" ? line : undefined;
67940
+ }
67921
67941
  function classifyDispatch(result) {
67922
67942
  if (result.signal !== undefined)
67923
67943
  return "timeout";
67924
67944
  if (result.exitCode === 0)
67925
67945
  return;
67926
67946
  const text4 = `${result.stderr ?? ""} ${result.stdout ?? ""}`;
67947
+ if (permissionFailureEvidence(text4) !== undefined)
67948
+ return;
67927
67949
  const statusCodes = extractStatusCodes(text4);
67928
67950
  for (const rule of FAILURE_RULES) {
67929
67951
  const statusMatch = rule.statusCodes?.some((code) => statusCodes.has(code)) ?? false;
@@ -67933,7 +67955,7 @@ function classifyDispatch(result) {
67933
67955
  }
67934
67956
  return;
67935
67957
  }
67936
- var FAILURE_RULES, HTTP_STATUS_PATTERN;
67958
+ var FAILURE_RULES, PERMISSION_PATTERNS, HTTP_STATUS_PATTERN;
67937
67959
  var init_failure_classification = __esm(() => {
67938
67960
  FAILURE_RULES = [
67939
67961
  {
@@ -67977,14 +67999,23 @@ var init_failure_classification = __esm(() => {
67977
67999
  {
67978
68000
  provider: "ollama",
67979
68001
  signal: "resource-exhaustion",
67980
- patterns: [/(?:out of tokens?|token[_ -]?(?:limit|budget)|context[_ -]?(?:length|window)|maximum context)/i]
68002
+ patterns: [/(?:out of tokens?|token[_ -]?(?:limit|budget)|context[_ -](?:length|window)|maximum context)/i]
67981
68003
  },
67982
68004
  {
67983
68005
  provider: "gemini",
67984
68006
  signal: "resource-exhaustion",
67985
- patterns: [/(?:usage[_ -]?limit|quota|overloaded|resource exhausted)/i]
68007
+ patterns: [
68008
+ /(?:usage[_ -]?limit|quota (?:exceeded|exhausted|reached)|exceeded[^.\n]{0,40}quota|overloaded|resource exhausted)/i
68009
+ ]
67986
68010
  }
67987
68011
  ];
68012
+ PERMISSION_PATTERNS = [
68013
+ /\bEPERM\b/,
68014
+ /\bEACCES\b/,
68015
+ /operation not permitted/i,
68016
+ /permission denied/i,
68017
+ /FS_PERMISSION_DENIED/i
68018
+ ];
67988
68019
  HTTP_STATUS_PATTERN = /(?:\bstatus|\bhttp(?:\/\d(?:\.\d)?)?|\bapi error)\s*(?:code\s*)?[:(=-]?\s*(\d{3})\b/gi;
67989
68020
  });
67990
68021
 
@@ -68759,11 +68790,16 @@ class AgentService {
68759
68790
  };
68760
68791
  }
68761
68792
  async resolveAgent(flags, doctorRunner, exclude) {
68762
- const raw = stringFlag(flags, "agent", "auto");
68793
+ const raw = stringFlag(flags, "agent", "inline");
68763
68794
  if (raw === "auto")
68764
68795
  return this.resolveAgentAuto(flags, doctorRunner, exclude);
68765
68796
  if (raw === "inline") {
68766
- return { ok: false, exitCode: 2, message: AGENT_INLINE_HEADLESS_MESSAGE };
68797
+ const res = await this.resolveAgentAuto(flags, doctorRunner, exclude);
68798
+ if (res.ok) {
68799
+ const target = res.role !== undefined ? `${res.executor ?? res.agent} via role/${res.tier ?? res.role}` : res.executor ?? res.agent;
68800
+ this.ctx.output.error(`--agent inline requested on a headless surface (no host session); resolved ${target} \u2014 substituted tier resolution`);
68801
+ }
68802
+ return res;
68767
68803
  }
68768
68804
  return this.resolvePinned(raw, flags, doctorRunner, exclude);
68769
68805
  }
@@ -69517,7 +69553,7 @@ function buildRoutingAttribution(result) {
69517
69553
  ...result.model !== undefined ? { model: result.model } : {}
69518
69554
  };
69519
69555
  }
69520
- var AGENT_INLINE_HEADLESS_MESSAGE = "--agent inline requires a host session: this surface is headless and never dispatches inline runs (no fallback to agent.default). Use 'auto', a role, or an executor name.", PidObservingProcessExecutor, RolePropagatingProcessExecutor, DOCTOR_CACHE_REL = ".spur/run/agent-doctor.json", DOCTOR_CACHE_TTL_MS = 60000, TRACE_SAFE_SLASH_COMMAND, TRACE_SAFE_SLASH_TOKEN, SENSITIVE_FLAG, SENSITIVE_INLINE_FLAG, warnedBareBinary, warnedAgentDefaultExecutor;
69556
+ var PidObservingProcessExecutor, RolePropagatingProcessExecutor, DOCTOR_CACHE_REL = ".spur/run/agent-doctor.json", DOCTOR_CACHE_TTL_MS = 60000, TRACE_SAFE_SLASH_COMMAND, TRACE_SAFE_SLASH_TOKEN, SENSITIVE_FLAG, SENSITIVE_INLINE_FLAG, warnedBareBinary, warnedAgentDefaultExecutor;
69521
69557
  var init_agent_service = __esm(() => {
69522
69558
  init_src2();
69523
69559
  init_dist9();
@@ -71529,13 +71565,13 @@ function classifyExternalEvidence(body) {
71529
71565
  }
71530
71566
  return out;
71531
71567
  }
71532
- function extractSubjectTokens(row, excludeCitation) {
71568
+ function extractSubjectTokens(row) {
71533
71569
  const tokens = new Set;
71534
71570
  const ROW_METADATA = new Set(["met", "partial", "unmet", "n/a", "na", "pass", "fail", "todo", "done"]);
71535
71571
  const excluded = new Set;
71536
- if (excludeCitation !== undefined && excludeCitation !== "") {
71537
- excluded.add(excludeCitation.toLowerCase());
71538
- excluded.add(excludeCitation.replace(/:(\d+)(?:-(\d+))?$/, "").toLowerCase());
71572
+ for (const anchor of extractBacktickLineAnchors(row)) {
71573
+ excluded.add(anchor.raw.toLowerCase());
71574
+ excluded.add(anchor.path.toLowerCase());
71539
71575
  }
71540
71576
  for (const m of row.matchAll(/`([^`]+)`/g)) {
71541
71577
  const t = m[1]?.trim();
@@ -71581,6 +71617,13 @@ function citedLinesNameSubject(subjectTokens, cited) {
71581
71617
  const isRowId = (t) => /^(r|ac)-?\d+$/.test(t);
71582
71618
  return subjectTokens.every(isRowId);
71583
71619
  }
71620
+ function claimsOpen(line, id) {
71621
+ return new RegExp(`\\bR${id}\\b[^.;]{0,80}?\\b(?:${OPEN_CLAIM_WORDS})\\b`, "i").test(line) || new RegExp(`\\b(?:${OPEN_CLAIM_WORDS})\\b[^.;]{0,80}?\\bR${id}\\b`, "i").test(line);
71622
+ }
71623
+ function claimsDone(line, id) {
71624
+ const word = `(?<!not |never )(?:${DONE_CLAIM_WORDS})`;
71625
+ return new RegExp(`\\bR${id}\\b[^.;]{0,80}?\\b${word}\\b`, "i").test(line) || new RegExp(`\\b${word}\\b[^.;]{0,80}?\\bR${id}\\b`, "i").test(line);
71626
+ }
71584
71627
  function extractPathSubjectTokens(path9) {
71585
71628
  const basename4 = path9.split("/").pop() ?? "";
71586
71629
  const stem = basename4.replace(/\.[^.]+$/, "");
@@ -71622,7 +71665,7 @@ function hasSolutionFileLineCitation(body) {
71622
71665
  const hasFileLine = /`[^`]+?:\d+(-\d+)?`/.test(body) || /[^\s`]\.\w+:\d+/.test(body);
71623
71666
  return hasFileLine || hasAdjacentFileLineColumns(body);
71624
71667
  }
71625
- var TESTING_VERDICT_STUB_RE, EXTERNAL_EVIDENCE_RE, TaskCheckService;
71668
+ var TESTING_VERDICT_STUB_RE, EXTERNAL_EVIDENCE_RE, ANCHOR_WINDOW_LINES = 20, OPEN_CLAIM_WORDS = "remains open|still open|pending|unfinished|unimplemented|not implemented|outstanding|todo", DONE_CLAIM_WORDS = "done|landed|implemented|completed|shipped|closed|resolved|fixed", TaskCheckService;
71626
71669
  var init_task_check = __esm(() => {
71627
71670
  init_src2();
71628
71671
  init_planning_check_base();
@@ -71831,17 +71874,50 @@ var init_task_check = __esm(() => {
71831
71874
  message: `${sectionName} is required at status '${status}' but is still placeholder-only \u2014 run \`spur task record <wbs>\` to fill it from the verdict artifact, or author it directly`
71832
71875
  });
71833
71876
  }
71834
- const testBody = doc2.getSection("Testing");
71835
- if (testBody !== null && !isPlaceholderBody(testBody)) {
71836
- const hasCoverage = /coverage|\u2265\d+%|\d+\.\d+%|N\/A/i.test(testBody);
71837
- if (!hasCoverage) {
71838
- findings.push({
71839
- layer: "L3",
71840
- code: FINDING_CODES.L3_TESTING_COVERAGE,
71841
- severity: "warning",
71842
- section: "Testing",
71843
- message: "Testing should include numeric coverage claim or N/A"
71844
- });
71877
+ const checkboxBody = doc2.getSection("Requirements");
71878
+ if (checkboxBody !== null && !isPlaceholderBody(checkboxBody)) {
71879
+ const checked = new Set;
71880
+ const unchecked = new Set;
71881
+ for (const cbLine of checkboxBody.split(`
71882
+ `)) {
71883
+ const m = /^\s*[-*]\s*\[([ xX])\]\s*[`*_]{0,2}R(\d+)\b/.exec(cbLine);
71884
+ if (m === null)
71885
+ continue;
71886
+ (m[1]?.toLowerCase() === "x" ? checked : unchecked).add(m[2] ?? "");
71887
+ }
71888
+ if (checked.size > 0 || unchecked.size > 0) {
71889
+ for (const claimSection of ["Solution", "Testing"]) {
71890
+ const claimBody = doc2.getSection(claimSection);
71891
+ if (claimBody === null || isPlaceholderBody(claimBody))
71892
+ continue;
71893
+ for (const rawClaimLine of claimBody.split(`
71894
+ `)) {
71895
+ const claimLine = rawClaimLine.replace(/`[^`]*`/g, " ");
71896
+ const excerpt = rawClaimLine.trim().slice(0, 100);
71897
+ for (const id of checked) {
71898
+ if (claimsOpen(claimLine, id)) {
71899
+ findings.push({
71900
+ layer: "L3",
71901
+ code: FINDING_CODES.L3_STATUS_CLAIM_CONTRADICTION,
71902
+ severity: "error",
71903
+ section: claimSection,
71904
+ message: `R${id} is checked in Requirements but ${claimSection} claims it is still open \u2014 reconcile: "${excerpt}"`
71905
+ });
71906
+ }
71907
+ }
71908
+ for (const id of unchecked) {
71909
+ if (claimsDone(claimLine, id)) {
71910
+ findings.push({
71911
+ layer: "L3",
71912
+ code: FINDING_CODES.L3_STATUS_CLAIM_CONTRADICTION,
71913
+ severity: "error",
71914
+ section: claimSection,
71915
+ message: `R${id} is unchecked in Requirements but ${claimSection} claims it is done \u2014 reconcile: "${excerpt}"`
71916
+ });
71917
+ }
71918
+ }
71919
+ }
71920
+ }
71845
71921
  }
71846
71922
  }
71847
71923
  const planBody = doc2.getSection("Plan");
@@ -72219,15 +72295,15 @@ var init_task_check = __esm(() => {
72219
72295
  });
72220
72296
  reported++;
72221
72297
  } else {
72222
- const rawLow = raw.toLowerCase();
72223
- const basename4 = cite.path.split("/").pop() ?? "";
72224
- const citedWindow = (raw.split(`
72225
- `).slice(cite.startLine - 1, cite.endLine ?? cite.startLine).join(`
72226
- `) || "") + (rawLow.includes(basename4.toLowerCase()) ? ` ${basename4}` : "");
72298
+ const start = Math.max(1, cite.startLine - ANCHOR_WINDOW_LINES);
72299
+ const end2 = Math.min(lineCount, (cite.endLine ?? cite.startLine) + ANCHOR_WINDOW_LINES);
72300
+ const citedWindow = raw.split(`
72301
+ `).slice(start - 1, end2).join(`
72302
+ `) || "";
72227
72303
  const citingRow = body.split(`
72228
72304
  `).find((l) => l.includes(`\`${cite.raw}\``)) ?? body.split(`
72229
72305
  `).find((l) => l.includes(cite.raw)) ?? "";
72230
- const tokens = extractSubjectTokens(citingRow, cite.raw);
72306
+ const tokens = extractSubjectTokens(citingRow);
72231
72307
  const effectiveTokens = tokens.length === 0 && section === "Solution" ? extractPathSubjectTokens(cite.path) : tokens;
72232
72308
  if (!citedLinesNameSubject(effectiveTokens, citedWindow)) {
72233
72309
  findings.push({
@@ -83403,12 +83479,6 @@ class AgentRunActionRunner {
83403
83479
  async execute(options, context4) {
83404
83480
  const input = asOptionalString(options.input);
83405
83481
  const agent = asOptionalString(options.agent);
83406
- if (agent === "inline") {
83407
- return {
83408
- ok: false,
83409
- error: `agent.run: ${AGENT_INLINE_HEADLESS_MESSAGE}`
83410
- };
83411
- }
83412
83482
  const role = asOptionalString(options.role);
83413
83483
  const dispatchAgent = agent;
83414
83484
  const model = asOptionalString(options.model);
@@ -83482,6 +83552,15 @@ class AgentRunActionRunner {
83482
83552
  const expectFile = asOptionalString(options.expectFile);
83483
83553
  const requireDiff = asOptionalBoolean(options.requireDiff);
83484
83554
  const capture = asOptionalBoolean(options.capture) || answerFile !== undefined;
83555
+ const absoluteArtifactHint = (() => {
83556
+ const rel = expectFile ?? answerFile;
83557
+ if (rel === undefined || isAbsolute5(rel))
83558
+ return;
83559
+ return `
83560
+
83561
+ Write the required artifact to this absolute path: ${join20(cwd, rel)}`;
83562
+ })();
83563
+ const dispatchInput = input === undefined || absoluteArtifactHint === undefined ? input : `${input}${absoluteArtifactHint}`;
83485
83564
  const observer = this.observabilityBus === undefined ? undefined : (event) => {
83486
83565
  this.observabilityBus?.emit("workflow.agent", event);
83487
83566
  };
@@ -83496,7 +83575,7 @@ class AgentRunActionRunner {
83496
83575
  steeringNote = undefined;
83497
83576
  let steeringSignal = this.steeringController?.begin(context4.runId, actionId, steeringPolicy);
83498
83577
  while (true) {
83499
- traced = await this.agentService.runTraced(input, flags, undefined, {
83578
+ traced = await this.agentService.runTraced(dispatchInput, flags, undefined, {
83500
83579
  correlation: {
83501
83580
  runId: context4.runId,
83502
83581
  executionId: crypto.randomUUID(),
@@ -83577,8 +83656,12 @@ class AgentRunActionRunner {
83577
83656
  if (!ok) {
83578
83657
  await writePartialWorkArtifact(context4, agentLabel, model, traced, cwd, sessionDir);
83579
83658
  }
83580
- const partialWorkHint = `partial work (if any) preserved at .spur/run/${context4.runId}-${stepLabel}-partial.md; resume from that tree per the timed-out-implement runbook (plugins/sp/skills/spur-dev/references/execution-workflow.md)`;
83581
- const error51 = ok ? undefined : traced.signal !== undefined ? timeoutMs !== undefined ? `agent.run '${stepLabel}' (${agentLabel}) terminated by signal ${traced.signal} (configured timeout: ${timeoutMs}ms; timeout or cancellation); ${partialWorkHint}` : `agent.run '${stepLabel}' (${agentLabel}) was cancelled by signal ${traced.signal}; ${partialWorkHint}` : traced.message !== undefined ? `agent.run '${stepLabel}' (${agentLabel}) dispatch failed: ${traced.message}` : `agent.run '${stepLabel}' (${agentLabel}) exited with code ${exitCode}; ${partialWorkHint}`;
83659
+ const partialWorkPath = `.spur/run/${context4.runId}-${stepLabel}-partial.md`;
83660
+ const partialWorkHint = `partial work (if any) preserved at ${partialWorkPath}; resume from that tree per the timed-out-implement runbook (plugins/sp/skills/spur-dev/references/execution-workflow.md)`;
83661
+ const exitWorkHint = `partial work (if any) preserved at ${partialWorkPath}; the executor exited on its own, so inspect that tree and the executor's stderr before retrying (plugins/sp/skills/spur-dev/references/execution-workflow.md)`;
83662
+ const permissionEvidence = permissionFailureEvidence(`${traced.stderr ?? ""}
83663
+ ${traced.stdout ?? ""}`);
83664
+ const error51 = ok ? undefined : traced.signal !== undefined ? timeoutMs !== undefined ? `agent.run '${stepLabel}' (${agentLabel}) terminated by signal ${traced.signal} (configured timeout: ${timeoutMs}ms; timeout or cancellation); ${partialWorkHint}` : `agent.run '${stepLabel}' (${agentLabel}) was cancelled by signal ${traced.signal}; ${partialWorkHint}` : traced.message !== undefined ? `agent.run '${stepLabel}' (${agentLabel}) dispatch failed: ${traced.message}` : permissionEvidence !== undefined ? `agent.run '${stepLabel}' (${agentLabel}) exited with code ${exitCode}: the executor was denied an OS permission \u2014 ${permissionEvidence}. This is an environment constraint, not a model or quota failure; grant the executor its state directory and any local socket bind it needs, then retry` : `agent.run '${stepLabel}' (${agentLabel}) exited with code ${exitCode}; ${exitWorkHint}`;
83582
83665
  const resolvedAgent = invocation?.agent ?? targetAgentDir;
83583
83666
  let resolvedSessionDir = sessionDir;
83584
83667
  if (ok && affinityOn && resolvedAgent !== targetAgentDir && !context4.vars.__agentSessionDir) {
@@ -83985,7 +84068,7 @@ var init_agent_run = __esm(() => {
83985
84068
  init_src();
83986
84069
  init_dist5();
83987
84070
  init_agent_execution();
83988
- init_agent_service();
84071
+ init_failure_classification();
83989
84072
  init_task_locator();
83990
84073
  init_steering();
83991
84074
  });
@@ -87351,6 +87434,7 @@ __export(exports_src2, {
87351
87434
  projectLifecycle: () => projectLifecycle,
87352
87435
  probePort: () => probePort,
87353
87436
  portBindingAvailable: () => portBindingAvailable,
87437
+ permissionFailureEvidence: () => permissionFailureEvidence,
87354
87438
  parseVerdict: () => parseVerdict,
87355
87439
  parseSteeringPolicy: () => parseSteeringPolicy,
87356
87440
  parsePsOutput: () => parsePsOutput,
@@ -87501,8 +87585,7 @@ __export(exports_src2, {
87501
87585
  AgentRunActionRunner: () => AgentRunActionRunner,
87502
87586
  AgentExecutionLifecycle: () => AgentExecutionLifecycle,
87503
87587
  ALL_FINDING_CODES: () => ALL_FINDING_CODES,
87504
- AGENT_SESSION_SOURCES: () => AGENT_SESSION_SOURCES,
87505
- AGENT_INLINE_HEADLESS_MESSAGE: () => AGENT_INLINE_HEADLESS_MESSAGE
87588
+ AGENT_SESSION_SOURCES: () => AGENT_SESSION_SOURCES
87506
87589
  });
87507
87590
  var init_src3 = __esm(async () => {
87508
87591
  init_src2();
@@ -87650,19 +87733,19 @@ var {
87650
87733
  // src/index.ts
87651
87734
  init_loader();
87652
87735
 
87653
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/application-node.js
87736
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/application-node.js
87654
87737
  init_dist4();
87655
87738
  init_dist5();
87656
87739
  import { appendFileSync as appendFileSync4, mkdirSync as mkdirSync3, readFileSync as readFileSync5 } from "fs";
87657
87740
  import { dirname as dirname5 } from "path";
87658
87741
 
87659
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/application/index.js
87742
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/application/index.js
87660
87743
  init_default_observers();
87661
87744
  init_event_bus();
87662
87745
  init_file_observer();
87663
87746
  init_logger3();
87664
87747
 
87665
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/scheduler/noop.js
87748
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/scheduler/noop.js
87666
87749
  class NoopSchedulerAdapter {
87667
87750
  constructor() {}
87668
87751
  register(_cron, _action) {}
@@ -87670,7 +87753,7 @@ class NoopSchedulerAdapter {
87670
87753
  async stop() {}
87671
87754
  }
87672
87755
 
87673
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/scheduler/factory.js
87756
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/scheduler/factory.js
87674
87757
  function initScheduler(adapter, cronEntries) {
87675
87758
  const resolved = adapter ?? new NoopSchedulerAdapter;
87676
87759
  if (cronEntries) {
@@ -87681,7 +87764,7 @@ function initScheduler(adapter, cronEntries) {
87681
87764
  return resolved;
87682
87765
  }
87683
87766
 
87684
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/application/plugins/builtins.js
87767
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/application/plugins/builtins.js
87685
87768
  init_logger3();
87686
87769
  init_metrics();
87687
87770
  init_sdk();
@@ -87774,7 +87857,7 @@ function dbPlugin(db2) {
87774
87857
  };
87775
87858
  }
87776
87859
 
87777
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/application/plugins/host.js
87860
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/application/plugins/host.js
87778
87861
  init_logger3();
87779
87862
 
87780
87863
  class PluginHost {
@@ -87862,7 +87945,7 @@ class PluginHost {
87862
87945
  }
87863
87946
  }
87864
87947
 
87865
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/application/index.js
87948
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/application/index.js
87866
87949
  async function performShutdown(state, reason) {
87867
87950
  if (state.stopped)
87868
87951
  return;
@@ -87973,10 +88056,10 @@ async function runApplication(options) {
87973
88056
  }
87974
88057
  }
87975
88058
 
87976
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/application-node.js
88059
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/application-node.js
87977
88060
  init_scheduler_node();
87978
88061
 
87979
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/telemetry/otel-node.js
88062
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/telemetry/otel-node.js
87980
88063
  var import_api14 = __toESM(require_src(), 1);
87981
88064
 
87982
88065
  // ../../node_modules/.bun/@opentelemetry+exporter-metrics-otlp-http@0.218.0+e40b0dfdd726a224/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/esm/OTLPMetricExporterBase.js
@@ -90992,7 +91075,7 @@ class OTLPTraceExporter extends import_otlp_exporter_base2.OTLPExporterBase {
90992
91075
  }), JsonTraceSerializer));
90993
91076
  }
90994
91077
  }
90995
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/telemetry/otel-node.js
91078
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/telemetry/otel-node.js
90996
91079
  var import_resources2 = __toESM(require_src4(), 1);
90997
91080
  var import_sdk_trace_node = __toESM(require_src8(), 1);
90998
91081
  var import_semantic_conventions = __toESM(require_src2(), 1);
@@ -91043,7 +91126,7 @@ async function shutdownNodeTelemetry() {
91043
91126
  await Promise.all(pending);
91044
91127
  }
91045
91128
 
91046
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.43+db68697b5a8b90df/node_modules/@gobing-ai/ts-infra/dist/application-node.js
91129
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.45+497c20e6aa4ee57e/node_modules/@gobing-ai/ts-infra/dist/application-node.js
91047
91130
  class ConfigValidationError extends Error {
91048
91131
  constructor(message) {
91049
91132
  super(message);
@@ -95077,7 +95160,7 @@ function validateAgentSelector(flags, context4) {
95077
95160
  if (raw === undefined || raw === "auto")
95078
95161
  return null;
95079
95162
  if (raw === "inline")
95080
- return AGENT_INLINE_HEADLESS_MESSAGE;
95163
+ return null;
95081
95164
  if (context4.agentRoles.has(raw))
95082
95165
  return null;
95083
95166
  if ((context4.agentConfig?.executors ?? []).some((e) => e.name === raw))
@@ -96458,7 +96541,7 @@ import { createRequire } from "module";
96458
96541
  var CLI_CONFIG = {
96459
96542
  binaryName: "spur",
96460
96543
  binaryLabel: "spur",
96461
- binaryVersion: "0.3.63",
96544
+ binaryVersion: "0.3.64",
96462
96545
  configDir: ".spur",
96463
96546
  configFile: ".spur/config.yaml",
96464
96547
  databaseFile: ".spur/spur.db"
@@ -110278,7 +110361,7 @@ function registerWorkflowCommand(program2, context4) {
110278
110361
  secretValues: configuredSecretValues(context4.env),
110279
110362
  warn: (message) => context4.output.error(`Warning: ${message}`),
110280
110363
  getDb: () => context4.getDb(),
110281
- agentService: () => context4.agentService(),
110364
+ agentService: () => bus ? context4.agentService({ events: bus }) : context4.agentService(),
110282
110365
  ruleService: () => context4.ruleService(),
110283
110366
  hitlResponder: () => context4.hitlResponder(json3),
110284
110367
  embeddedSchemas: () => EMBEDDED_SPUR_SCHEMAS,