@gobing-ai/spur 0.3.78 → 0.3.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/config/templates/AGENTS.md +26 -23
- package/config/templates/docs/00_ADR.md +13 -23
- package/config/templates/docs/01_PRD.md +5 -2
- package/config/templates/docs/02_ROADMAP.md +9 -13
- package/config/templates/docs/03_ARCHITECTURE.md +2 -2
- package/config/templates/docs/04_DESIGN.md +12 -31
- package/config/templates/docs/05_FEATURES.md +6 -18
- package/config/templates/docs/99_PROJECT_CONSTITUTION.md +162 -394
- package/package.json +9 -9
- package/plugins/sp/README.md +12 -7
- package/plugins/sp/agents/super-reviewer.md +43 -8
- package/plugins/sp/plugin.json +1 -1
- package/plugins/sp/scripts/verify-answer-lint.ts +21 -3
- package/plugins/sp/skills/conflict-finding/SKILL.md +6 -0
- package/plugins/sp/skills/daily-summary/SKILL.md +1 -1
- package/plugins/sp/skills/doc-evolve/SKILL.md +26 -40
- package/plugins/sp/skills/doc-evolve/references/operations.md +17 -30
- package/plugins/sp/skills/spur-cli/references/tasks/verbs.md +17 -1
- package/plugins/sp/skills/spur-cli/references/tasks.md +31 -1
- package/plugins/sp/skills/spur-dev/references/ac-style-guide.md +14 -0
- package/plugins/sp/skills/spur-dev/references/cross-cutting.md +3 -3
- package/plugins/sp/skills/spur-dev/references/done-housekeeping.md +12 -0
- package/plugins/sp/skills/spur-dev/references/inline-pipeline-driver.md +46 -4
- package/spur.js +363 -258
package/spur.js
CHANGED
|
@@ -48,7 +48,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
48
48
|
var __promiseAll = (args) => Promise.all(args);
|
|
49
49
|
var __require = import.meta.require;
|
|
50
50
|
|
|
51
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.
|
|
51
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.62/node_modules/@gobing-ai/ts-utils/dist/errors.js
|
|
52
52
|
var ErrorCode, AppError, ValidationError;
|
|
53
53
|
var init_errors = __esm(() => {
|
|
54
54
|
ErrorCode = {
|
|
@@ -73,7 +73,7 @@ var init_errors = __esm(() => {
|
|
|
73
73
|
};
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.
|
|
76
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.62/node_modules/@gobing-ai/ts-utils/dist/api-response.js
|
|
77
77
|
var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
|
|
78
78
|
var init_api_response = __esm(() => {
|
|
79
79
|
init_errors();
|
|
@@ -96,13 +96,13 @@ var init_api_response = __esm(() => {
|
|
|
96
96
|
CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
|
|
97
97
|
});
|
|
98
98
|
|
|
99
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.
|
|
99
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.62/node_modules/@gobing-ai/ts-utils/dist/cursor.js
|
|
100
100
|
var init_cursor = () => {};
|
|
101
101
|
|
|
102
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.
|
|
102
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.62/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
|
|
103
103
|
var init_event_severity = () => {};
|
|
104
104
|
|
|
105
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.
|
|
105
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.62/node_modules/@gobing-ai/ts-utils/dist/object.js
|
|
106
106
|
function isPlainObject(value) {
|
|
107
107
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
108
108
|
}
|
|
@@ -120,7 +120,7 @@ function deepMerge(target, source) {
|
|
|
120
120
|
return result;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.
|
|
123
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.62/node_modules/@gobing-ai/ts-utils/dist/output.js
|
|
124
124
|
function processStream(name) {
|
|
125
125
|
const proc = globalThis.process;
|
|
126
126
|
const stream = proc?.[name];
|
|
@@ -141,7 +141,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
|
|
|
141
141
|
}
|
|
142
142
|
var defaultStdoutTarget, defaultStderrTarget;
|
|
143
143
|
|
|
144
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.
|
|
144
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.62/node_modules/@gobing-ai/ts-utils/dist/index.js
|
|
145
145
|
var init_dist = __esm(() => {
|
|
146
146
|
init_api_response();
|
|
147
147
|
init_cursor();
|
|
@@ -21764,7 +21764,7 @@ var init_zod = __esm(() => {
|
|
|
21764
21764
|
init_external();
|
|
21765
21765
|
});
|
|
21766
21766
|
|
|
21767
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
21767
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+7984b2f1c2109363/node_modules/@gobing-ai/ts-runtime/dist/config.js
|
|
21768
21768
|
function getProcessEnv() {
|
|
21769
21769
|
return process.env;
|
|
21770
21770
|
}
|
|
@@ -21842,7 +21842,7 @@ var init_config = __esm(() => {
|
|
|
21842
21842
|
};
|
|
21843
21843
|
});
|
|
21844
21844
|
|
|
21845
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
21845
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+7984b2f1c2109363/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
|
|
21846
21846
|
import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
|
|
21847
21847
|
import { dirname, resolve as resolvePath } from "path";
|
|
21848
21848
|
function createNodeFileSystem(root, paths) {
|
|
@@ -21929,7 +21929,7 @@ function findProjectRoot(startDir) {
|
|
|
21929
21929
|
}
|
|
21930
21930
|
var init_file_system_node = () => {};
|
|
21931
21931
|
|
|
21932
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
21932
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+7984b2f1c2109363/node_modules/@gobing-ai/ts-runtime/dist/db-errors.js
|
|
21933
21933
|
var DbModuleNotInstalledError;
|
|
21934
21934
|
var init_db_errors = __esm(() => {
|
|
21935
21935
|
DbModuleNotInstalledError = class DbModuleNotInstalledError extends Error {
|
|
@@ -29140,7 +29140,7 @@ var init_execa = __esm(() => {
|
|
|
29140
29140
|
} = getIpcExport());
|
|
29141
29141
|
});
|
|
29142
29142
|
|
|
29143
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
29143
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+7984b2f1c2109363/node_modules/@gobing-ai/ts-runtime/dist/process-executor.js
|
|
29144
29144
|
import { isatty } from "tty";
|
|
29145
29145
|
function processEventSeverity(reason, exitCode) {
|
|
29146
29146
|
if (reason === "error")
|
|
@@ -29602,7 +29602,7 @@ var init_process_executor = __esm(() => {
|
|
|
29602
29602
|
init_config();
|
|
29603
29603
|
});
|
|
29604
29604
|
|
|
29605
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
29605
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+7984b2f1c2109363/node_modules/@gobing-ai/ts-runtime/dist/runtime-node-bun.js
|
|
29606
29606
|
function getNodeFileSystem() {
|
|
29607
29607
|
if (!_nodeFileSystem)
|
|
29608
29608
|
_nodeFileSystem = createNodeFileSystem();
|
|
@@ -29662,7 +29662,7 @@ var init_runtime_node_bun = __esm(() => {
|
|
|
29662
29662
|
};
|
|
29663
29663
|
});
|
|
29664
29664
|
|
|
29665
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
29665
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+7984b2f1c2109363/node_modules/@gobing-ai/ts-runtime/dist/context.js
|
|
29666
29666
|
class RuntimeContext {
|
|
29667
29667
|
scope;
|
|
29668
29668
|
runtimeName;
|
|
@@ -29732,7 +29732,7 @@ var init_context = __esm(() => {
|
|
|
29732
29732
|
init_runtime_node_bun();
|
|
29733
29733
|
});
|
|
29734
29734
|
|
|
29735
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
29735
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+7984b2f1c2109363/node_modules/@gobing-ai/ts-runtime/dist/path.js
|
|
29736
29736
|
function normalizeSeparators(path6) {
|
|
29737
29737
|
return path6.replaceAll("\\", "/");
|
|
29738
29738
|
}
|
|
@@ -29793,17 +29793,17 @@ var init_path = __esm(() => {
|
|
|
29793
29793
|
SEP = globalThis.process?.platform === "win32" ? "\\" : "/";
|
|
29794
29794
|
});
|
|
29795
29795
|
|
|
29796
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
29796
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+7984b2f1c2109363/node_modules/@gobing-ai/ts-runtime/dist/schema-validation.js
|
|
29797
29797
|
var REMOTE_SCHEMA_MAX_BYTES;
|
|
29798
29798
|
var init_schema_validation = __esm(() => {
|
|
29799
29799
|
init_dist2();
|
|
29800
29800
|
REMOTE_SCHEMA_MAX_BYTES = 5 * 1024 * 1024;
|
|
29801
29801
|
});
|
|
29802
29802
|
|
|
29803
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
29803
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+7984b2f1c2109363/node_modules/@gobing-ai/ts-runtime/dist/types.js
|
|
29804
29804
|
var init_types = () => {};
|
|
29805
29805
|
|
|
29806
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
29806
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+7984b2f1c2109363/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
29807
29807
|
var init_dist3 = __esm(() => {
|
|
29808
29808
|
init_config();
|
|
29809
29809
|
init_context();
|
|
@@ -29812,7 +29812,7 @@ var init_dist3 = __esm(() => {
|
|
|
29812
29812
|
init_types();
|
|
29813
29813
|
});
|
|
29814
29814
|
|
|
29815
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
29815
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+7984b2f1c2109363/node_modules/@gobing-ai/ts-runtime/dist/bun-sqlite.js
|
|
29816
29816
|
import { Database } from "bun:sqlite";
|
|
29817
29817
|
var init_bun_sqlite = () => {};
|
|
29818
29818
|
|
|
@@ -34242,7 +34242,7 @@ var init_bun_sqlite2 = __esm(() => {
|
|
|
34242
34242
|
init_session2();
|
|
34243
34243
|
});
|
|
34244
34244
|
|
|
34245
|
-
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.
|
|
34245
|
+
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.62+39fe09901e9c1f39/node_modules/@gobing-ai/ts-db/dist/schema/inbox-messages.js
|
|
34246
34246
|
var inboxMessages;
|
|
34247
34247
|
var init_inbox_messages = __esm(() => {
|
|
34248
34248
|
init_sqlite_core();
|
|
@@ -34261,7 +34261,7 @@ var init_inbox_messages = __esm(() => {
|
|
|
34261
34261
|
}, (table2) => [index("idx_inbox_messages_to_status").on(table2.toId, table2.status)]);
|
|
34262
34262
|
});
|
|
34263
34263
|
|
|
34264
|
-
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.
|
|
34264
|
+
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.62+39fe09901e9c1f39/node_modules/@gobing-ai/ts-db/dist/schema/common.js
|
|
34265
34265
|
function nowTimestamp() {
|
|
34266
34266
|
return Date.now();
|
|
34267
34267
|
}
|
|
@@ -34290,7 +34290,7 @@ var init_common3 = __esm(() => {
|
|
|
34290
34290
|
appendOnlyColumns = buildAppendOnlyColumns();
|
|
34291
34291
|
});
|
|
34292
34292
|
|
|
34293
|
-
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.
|
|
34293
|
+
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.62+39fe09901e9c1f39/node_modules/@gobing-ai/ts-db/dist/schema/queue-jobs.js
|
|
34294
34294
|
var queueJobs;
|
|
34295
34295
|
var init_queue_jobs = __esm(() => {
|
|
34296
34296
|
init_sqlite_core();
|
|
@@ -34314,7 +34314,7 @@ var init_queue_jobs = __esm(() => {
|
|
|
34314
34314
|
}, (table2) => [index("queue_jobs_ready_idx").on(table2.status, table2.nextRetryAt, table2.createdAt)]);
|
|
34315
34315
|
});
|
|
34316
34316
|
|
|
34317
|
-
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.
|
|
34317
|
+
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.62+39fe09901e9c1f39/node_modules/@gobing-ai/ts-db/dist/schema/runtime.js
|
|
34318
34318
|
var exports_runtime = {};
|
|
34319
34319
|
__export(exports_runtime, {
|
|
34320
34320
|
queueJobs: () => queueJobs,
|
|
@@ -34325,7 +34325,7 @@ var init_runtime = __esm(() => {
|
|
|
34325
34325
|
init_queue_jobs();
|
|
34326
34326
|
});
|
|
34327
34327
|
|
|
34328
|
-
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.
|
|
34328
|
+
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.62+39fe09901e9c1f39/node_modules/@gobing-ai/ts-db/dist/adapters/bun-sqlite.js
|
|
34329
34329
|
var exports_bun_sqlite = {};
|
|
34330
34330
|
__export(exports_bun_sqlite, {
|
|
34331
34331
|
BunSqliteAdapter: () => BunSqliteAdapter
|
|
@@ -34372,7 +34372,7 @@ class BunSqliteAdapter {
|
|
|
34372
34372
|
}
|
|
34373
34373
|
async queryFirst(sql3, ...params) {
|
|
34374
34374
|
const stmt = this.getStatement(sql3);
|
|
34375
|
-
return stmt.get(...params);
|
|
34375
|
+
return stmt.get(...params) ?? undefined;
|
|
34376
34376
|
}
|
|
34377
34377
|
async queryAll(sql3, ...params) {
|
|
34378
34378
|
const stmt = this.getStatement(sql3);
|
|
@@ -34636,7 +34636,7 @@ var init_d1 = __esm(() => {
|
|
|
34636
34636
|
init_session3();
|
|
34637
34637
|
});
|
|
34638
34638
|
|
|
34639
|
-
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.
|
|
34639
|
+
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.62+39fe09901e9c1f39/node_modules/@gobing-ai/ts-db/dist/adapters/d1.js
|
|
34640
34640
|
var exports_d1 = {};
|
|
34641
34641
|
__export(exports_d1, {
|
|
34642
34642
|
D1Adapter: () => D1Adapter
|
|
@@ -34700,7 +34700,7 @@ var init_d12 = __esm(() => {
|
|
|
34700
34700
|
init_runtime();
|
|
34701
34701
|
});
|
|
34702
34702
|
|
|
34703
|
-
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.
|
|
34703
|
+
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.62+39fe09901e9c1f39/node_modules/@gobing-ai/ts-db/dist/adapter.js
|
|
34704
34704
|
async function createDbAdapter(config3) {
|
|
34705
34705
|
switch (config3.driver) {
|
|
34706
34706
|
case "bun-sqlite": {
|
|
@@ -34734,7 +34734,7 @@ var init_drizzle_orm = __esm(() => {
|
|
|
34734
34734
|
init_view_common();
|
|
34735
34735
|
});
|
|
34736
34736
|
|
|
34737
|
-
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.
|
|
34737
|
+
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.62+39fe09901e9c1f39/node_modules/@gobing-ai/ts-db/dist/query-spec.js
|
|
34738
34738
|
function compilePredicate(predicate) {
|
|
34739
34739
|
if ("and" in predicate) {
|
|
34740
34740
|
const parts = predicate.and.map(compilePredicate).filter((p) => p !== undefined);
|
|
@@ -34772,7 +34772,7 @@ var init_query_spec = __esm(() => {
|
|
|
34772
34772
|
};
|
|
34773
34773
|
});
|
|
34774
34774
|
|
|
34775
|
-
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.
|
|
34775
|
+
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.62+39fe09901e9c1f39/node_modules/@gobing-ai/ts-db/dist/base-dao.js
|
|
34776
34776
|
function asSelectQuery(query) {
|
|
34777
34777
|
return query;
|
|
34778
34778
|
}
|
|
@@ -34814,7 +34814,7 @@ var init_base_dao = __esm(() => {
|
|
|
34814
34814
|
init_query_spec();
|
|
34815
34815
|
});
|
|
34816
34816
|
|
|
34817
|
-
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.
|
|
34817
|
+
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.62+39fe09901e9c1f39/node_modules/@gobing-ai/ts-db/dist/embedded-migrations.js
|
|
34818
34818
|
var embeddedMigrations;
|
|
34819
34819
|
var init_embedded_migrations = __esm(() => {
|
|
34820
34820
|
embeddedMigrations = [
|
|
@@ -34851,7 +34851,7 @@ var init_embedded_migrations = __esm(() => {
|
|
|
34851
34851
|
];
|
|
34852
34852
|
});
|
|
34853
34853
|
|
|
34854
|
-
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.
|
|
34854
|
+
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.62+39fe09901e9c1f39/node_modules/@gobing-ai/ts-db/dist/entity-dao.js
|
|
34855
34855
|
var EntityDao;
|
|
34856
34856
|
var init_entity_dao = __esm(() => {
|
|
34857
34857
|
init_drizzle_orm();
|
|
@@ -35013,7 +35013,7 @@ var init_entity_dao = __esm(() => {
|
|
|
35013
35013
|
};
|
|
35014
35014
|
});
|
|
35015
35015
|
|
|
35016
|
-
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.
|
|
35016
|
+
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.62+39fe09901e9c1f39/node_modules/@gobing-ai/ts-db/dist/inbox-message-dao.js
|
|
35017
35017
|
function isPromiseLike(value) {
|
|
35018
35018
|
return value !== null && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
|
|
35019
35019
|
}
|
|
@@ -35191,7 +35191,7 @@ var init_migrator2 = __esm(() => {
|
|
|
35191
35191
|
init_migrator();
|
|
35192
35192
|
});
|
|
35193
35193
|
|
|
35194
|
-
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.
|
|
35194
|
+
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.62+39fe09901e9c1f39/node_modules/@gobing-ai/ts-db/dist/migrate.js
|
|
35195
35195
|
async function ensureJournalTable(adapter, table3) {
|
|
35196
35196
|
await adapter.exec(`CREATE TABLE IF NOT EXISTS "${table3}" (` + "id INTEGER PRIMARY KEY AUTOINCREMENT, " + "hash text NOT NULL, " + "created_at numeric" + ")");
|
|
35197
35197
|
}
|
|
@@ -35266,7 +35266,7 @@ var init_migrate = __esm(() => {
|
|
|
35266
35266
|
init_embedded_migrations();
|
|
35267
35267
|
});
|
|
35268
35268
|
|
|
35269
|
-
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.
|
|
35269
|
+
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.62+39fe09901e9c1f39/node_modules/@gobing-ai/ts-db/dist/queue-job-dao.js
|
|
35270
35270
|
function assertValidTimeoutMs(value) {
|
|
35271
35271
|
if (value === undefined || value === null)
|
|
35272
35272
|
return;
|
|
@@ -35463,7 +35463,7 @@ var init_queue_job_dao = __esm(() => {
|
|
|
35463
35463
|
};
|
|
35464
35464
|
});
|
|
35465
35465
|
|
|
35466
|
-
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.
|
|
35466
|
+
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.62+39fe09901e9c1f39/node_modules/@gobing-ai/ts-db/dist/index.js
|
|
35467
35467
|
var exports_dist = {};
|
|
35468
35468
|
__export(exports_dist, {
|
|
35469
35469
|
embeddedMigrations: () => embeddedMigrations,
|
|
@@ -37596,7 +37596,7 @@ var require_extra_typings = __commonJS((exports, module) => {
|
|
|
37596
37596
|
exports.createArgument = (name, description) => new commander.Argument(name, description);
|
|
37597
37597
|
});
|
|
37598
37598
|
|
|
37599
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
37599
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/config.js
|
|
37600
37600
|
function parseYamlObject(text3) {
|
|
37601
37601
|
let parsed;
|
|
37602
37602
|
try {
|
|
@@ -37723,7 +37723,7 @@ var init_config2 = __esm(() => {
|
|
|
37723
37723
|
};
|
|
37724
37724
|
});
|
|
37725
37725
|
|
|
37726
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
37726
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
|
|
37727
37727
|
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";
|
|
37728
37728
|
import { dirname as dirname2, resolve as resolvePath3 } from "path";
|
|
37729
37729
|
function createNodeFileSystem3(root, paths) {
|
|
@@ -37810,7 +37810,7 @@ function findProjectRoot3(startDir) {
|
|
|
37810
37810
|
}
|
|
37811
37811
|
var init_file_system_node2 = () => {};
|
|
37812
37812
|
|
|
37813
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
37813
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/db-errors.js
|
|
37814
37814
|
var D1NotConfiguredError2, DbModuleNotInstalledError3;
|
|
37815
37815
|
var init_db_errors2 = __esm(() => {
|
|
37816
37816
|
D1NotConfiguredError2 = class D1NotConfiguredError2 extends Error {
|
|
@@ -37827,7 +37827,7 @@ var init_db_errors2 = __esm(() => {
|
|
|
37827
37827
|
};
|
|
37828
37828
|
});
|
|
37829
37829
|
|
|
37830
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
37830
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/file-system-cf.js
|
|
37831
37831
|
function createCfFileSystem2() {
|
|
37832
37832
|
return {
|
|
37833
37833
|
getProjectRoot: () => "/bundle",
|
|
@@ -37866,7 +37866,7 @@ function createCfFileSystem2() {
|
|
|
37866
37866
|
}
|
|
37867
37867
|
var UNSUPPORTED = "FileSystem is not available on Cloudflare Workers. Use D1, KV, or R2 for persistent storage.";
|
|
37868
37868
|
|
|
37869
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
37869
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/runtime-cf.js
|
|
37870
37870
|
var exports_runtime_cf = {};
|
|
37871
37871
|
__export(exports_runtime_cf, {
|
|
37872
37872
|
cloudflareWorkersFactory: () => cloudflareWorkersFactory2
|
|
@@ -37904,7 +37904,7 @@ var init_runtime_cf = __esm(() => {
|
|
|
37904
37904
|
};
|
|
37905
37905
|
});
|
|
37906
37906
|
|
|
37907
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
37907
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/process-executor.js
|
|
37908
37908
|
import { isatty as isatty2 } from "tty";
|
|
37909
37909
|
function processEventSeverity2(reason, exitCode) {
|
|
37910
37910
|
if (reason === "error")
|
|
@@ -38412,7 +38412,7 @@ var init_process_executor2 = __esm(() => {
|
|
|
38412
38412
|
ProcessExecutor2 = NodeProcessExecutor3;
|
|
38413
38413
|
});
|
|
38414
38414
|
|
|
38415
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
38415
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/runtime-node-bun.js
|
|
38416
38416
|
var exports_runtime_node_bun = {};
|
|
38417
38417
|
__export(exports_runtime_node_bun, {
|
|
38418
38418
|
nodeBunFactory: () => nodeBunFactory3,
|
|
@@ -38480,7 +38480,7 @@ var init_runtime_node_bun2 = __esm(() => {
|
|
|
38480
38480
|
};
|
|
38481
38481
|
});
|
|
38482
38482
|
|
|
38483
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
38483
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/platform.js
|
|
38484
38484
|
function isCloudflareWorkerRuntime2() {
|
|
38485
38485
|
return globalThis.navigator?.userAgent?.startsWith("Cloudflare-Workers") ?? false;
|
|
38486
38486
|
}
|
|
@@ -38510,7 +38510,7 @@ function _resetRuntimeFactory2() {
|
|
|
38510
38510
|
}
|
|
38511
38511
|
var _factory, _runtimeName;
|
|
38512
38512
|
|
|
38513
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
38513
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/context.js
|
|
38514
38514
|
class RuntimeContext2 {
|
|
38515
38515
|
scope;
|
|
38516
38516
|
runtimeName;
|
|
@@ -38600,7 +38600,7 @@ var init_context2 = __esm(() => {
|
|
|
38600
38600
|
init_runtime_node_bun2();
|
|
38601
38601
|
});
|
|
38602
38602
|
|
|
38603
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
38603
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/path.js
|
|
38604
38604
|
function normalizeSeparators2(path7) {
|
|
38605
38605
|
return path7.replaceAll("\\", "/");
|
|
38606
38606
|
}
|
|
@@ -38723,7 +38723,7 @@ var init_path2 = __esm(() => {
|
|
|
38723
38723
|
SEP2 = globalThis.process?.platform === "win32" ? "\\" : "/";
|
|
38724
38724
|
});
|
|
38725
38725
|
|
|
38726
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
38726
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/fs.js
|
|
38727
38727
|
async function ensureDirForFile2(path7, fs2 = createNodeFileSystem3()) {
|
|
38728
38728
|
await fs2.ensureDir(dirnamePath(path7));
|
|
38729
38729
|
}
|
|
@@ -38791,7 +38791,7 @@ var init_fs = __esm(() => {
|
|
|
38791
38791
|
init_path2();
|
|
38792
38792
|
});
|
|
38793
38793
|
|
|
38794
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
38794
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/process-registry.js
|
|
38795
38795
|
function allocateId() {
|
|
38796
38796
|
nextIdSeq += 1;
|
|
38797
38797
|
return `pe_${Date.now().toString(36)}_${nextIdSeq.toString(36)}`;
|
|
@@ -38915,7 +38915,7 @@ function createInMemoryProcessRegistry2(options) {
|
|
|
38915
38915
|
}
|
|
38916
38916
|
var nextIdSeq = 0;
|
|
38917
38917
|
|
|
38918
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
38918
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/runtime-paths.js
|
|
38919
38919
|
function ambientRuntimePaths2() {
|
|
38920
38920
|
const cwd = getProcessCwd2();
|
|
38921
38921
|
return { cwd, home: getHomeDir() ?? cwd };
|
|
@@ -38925,7 +38925,7 @@ var init_runtime_paths = __esm(() => {
|
|
|
38925
38925
|
init_path2();
|
|
38926
38926
|
});
|
|
38927
38927
|
|
|
38928
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
38928
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/schema-validation.js
|
|
38929
38929
|
async function loadStructuredConfig(path7, options = {}) {
|
|
38930
38930
|
const content = await (options.fileSystem ?? createNodeFileSystem3()).readFile(path7);
|
|
38931
38931
|
return await parseStructuredConfig(content, path7, options);
|
|
@@ -39208,10 +39208,10 @@ var init_schema_validation2 = __esm(() => {
|
|
|
39208
39208
|
defaultResolve = typeof Bun !== "undefined" ? (specifier, from) => Bun.resolveSync(specifier, from) : undefined;
|
|
39209
39209
|
});
|
|
39210
39210
|
|
|
39211
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
39211
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/types.js
|
|
39212
39212
|
var init_types2 = () => {};
|
|
39213
39213
|
|
|
39214
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
39214
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
39215
39215
|
var exports_dist2 = {};
|
|
39216
39216
|
__export(exports_dist2, {
|
|
39217
39217
|
writeJsonFile: () => writeJsonFile2,
|
|
@@ -40082,9 +40082,12 @@ function resolveSchemaSpecifier(specifier, manifestSpecifier) {
|
|
|
40082
40082
|
}
|
|
40083
40083
|
function resolveConfigLayers(cwd) {
|
|
40084
40084
|
const layers = {};
|
|
40085
|
-
const
|
|
40086
|
-
if (
|
|
40087
|
-
|
|
40085
|
+
const skipProject = cwd === undefined && process.env.SPUR_SKIP_PROJECT_CONFIG === "true";
|
|
40086
|
+
if (!skipProject) {
|
|
40087
|
+
const projectConfig = join4(cwd ?? process.cwd(), SPUR_CONFIG_DIR, SPUR_CONFIG_FILE);
|
|
40088
|
+
if (existsSync4(projectConfig))
|
|
40089
|
+
layers.project = projectConfig;
|
|
40090
|
+
}
|
|
40088
40091
|
if (process.env.SPUR_SKIP_GLOBAL_CONFIG !== "true" && existsSync4(GLOBAL_CONFIG_FILE)) {
|
|
40089
40092
|
layers.global = GLOBAL_CONFIG_FILE;
|
|
40090
40093
|
}
|
|
@@ -40107,7 +40110,7 @@ function makeEmbeddedReader(embeddedSchemas) {
|
|
|
40107
40110
|
return createNodeFileSystem3().readFile(path8);
|
|
40108
40111
|
};
|
|
40109
40112
|
}
|
|
40110
|
-
async function loadSpurConfig(cwd
|
|
40113
|
+
async function loadSpurConfig(cwd, opts) {
|
|
40111
40114
|
const layers = resolveConfigLayers(cwd);
|
|
40112
40115
|
if (layers.global === undefined && layers.project === undefined) {
|
|
40113
40116
|
return spurConfigSchema.parse({});
|
|
@@ -42267,7 +42270,7 @@ var init_mod = __esm(() => {
|
|
|
42267
42270
|
init_config3();
|
|
42268
42271
|
});
|
|
42269
42272
|
|
|
42270
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
42273
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/logger.js
|
|
42271
42274
|
function toLogTapeLevel(level) {
|
|
42272
42275
|
return level === "warn" ? "warning" : level;
|
|
42273
42276
|
}
|
|
@@ -43820,7 +43823,7 @@ var require_src = __commonJS((exports) => {
|
|
|
43820
43823
|
};
|
|
43821
43824
|
});
|
|
43822
43825
|
|
|
43823
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
43826
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/telemetry/sdk.js
|
|
43824
43827
|
function getTelemetryConfig(configPartial = {}) {
|
|
43825
43828
|
return {
|
|
43826
43829
|
enabled: configPartial.enabled ?? CONFIG_DEFAULTS.enabled,
|
|
@@ -43856,7 +43859,7 @@ var init_sdk = __esm(() => {
|
|
|
43856
43859
|
resolvedConfig = getTelemetryConfig();
|
|
43857
43860
|
});
|
|
43858
43861
|
|
|
43859
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
43862
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/telemetry/tracing.js
|
|
43860
43863
|
function isSuppressed(tracer2) {
|
|
43861
43864
|
return tracer2 === undefined && !getResolvedConfig().enabled;
|
|
43862
43865
|
}
|
|
@@ -43896,7 +43899,7 @@ var init_tracing2 = __esm(() => {
|
|
|
43896
43899
|
import_api2 = __toESM(require_src(), 1);
|
|
43897
43900
|
});
|
|
43898
43901
|
|
|
43899
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
43902
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/telemetry/metrics.js
|
|
43900
43903
|
function getMeter() {
|
|
43901
43904
|
return import_api3.metrics.getMeter(METER_NAME, METER_VERSION);
|
|
43902
43905
|
}
|
|
@@ -43993,7 +43996,7 @@ var init_metrics = __esm(() => {
|
|
|
43993
43996
|
instruments = {};
|
|
43994
43997
|
});
|
|
43995
43998
|
|
|
43996
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
43999
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/event-bus/event-bus.js
|
|
43997
44000
|
function busLogger() {
|
|
43998
44001
|
if (!_busLogger)
|
|
43999
44002
|
_busLogger = getLogger2("event-bus");
|
|
@@ -44246,7 +44249,7 @@ var init_event_bus = __esm(() => {
|
|
|
44246
44249
|
init_metrics();
|
|
44247
44250
|
});
|
|
44248
44251
|
|
|
44249
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
44252
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/event-bus/default-observers.js
|
|
44250
44253
|
function obsLogger() {
|
|
44251
44254
|
if (!_obsLogger)
|
|
44252
44255
|
_obsLogger = getLogger2("event-bus.observers");
|
|
@@ -44310,7 +44313,7 @@ var init_default_observers = __esm(() => {
|
|
|
44310
44313
|
init_event_bus();
|
|
44311
44314
|
});
|
|
44312
44315
|
|
|
44313
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
44316
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/event-bus/file-observer.js
|
|
44314
44317
|
function parentDir(filePath) {
|
|
44315
44318
|
const idx = filePath.lastIndexOf("/");
|
|
44316
44319
|
return idx <= 0 ? "." : filePath.slice(0, idx);
|
|
@@ -44408,7 +44411,7 @@ var init_file_observer = __esm(() => {
|
|
|
44408
44411
|
init_logger3();
|
|
44409
44412
|
});
|
|
44410
44413
|
|
|
44411
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
44414
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/execution-policy.js
|
|
44412
44415
|
function resolveExecutionTimeoutMs(scope, value, inherited) {
|
|
44413
44416
|
if (value === undefined) {
|
|
44414
44417
|
return inherited ?? null;
|
|
@@ -44485,7 +44488,7 @@ async function runWithExecutionDeadline(action, options) {
|
|
|
44485
44488
|
return { outcome: "completed", result, elapsedMs, timedOut };
|
|
44486
44489
|
}
|
|
44487
44490
|
|
|
44488
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
44491
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/internals/drain.js
|
|
44489
44492
|
function settleWithin(promise2, deadline) {
|
|
44490
44493
|
const remaining = deadline - Date.now();
|
|
44491
44494
|
if (remaining <= 0)
|
|
@@ -51093,6 +51096,33 @@ function derivedWarnings(derived) {
|
|
|
51093
51096
|
return warnings;
|
|
51094
51097
|
}
|
|
51095
51098
|
|
|
51099
|
+
// ../../packages/domain/src/analytics/derived-assistant-duration.ts
|
|
51100
|
+
async function deriveMissingAssistantDurations(db2, ceilingMs) {
|
|
51101
|
+
await db2.run(`
|
|
51102
|
+
WITH ordered AS (
|
|
51103
|
+
SELECT record_hash AS recordHash,
|
|
51104
|
+
role,
|
|
51105
|
+
duration_ms,
|
|
51106
|
+
CAST(ROUND((unixepoch(ts, 'subsec') - unixepoch(LAG(ts) OVER (
|
|
51107
|
+
PARTITION BY source, session_id ORDER BY seq
|
|
51108
|
+
), 'subsec')) * 1000) AS INTEGER) AS deltaMs
|
|
51109
|
+
FROM history_message
|
|
51110
|
+
WHERE ts IS NOT NULL AND ts LIKE '____-__-__T%'
|
|
51111
|
+
)
|
|
51112
|
+
UPDATE history_message
|
|
51113
|
+
SET duration_ms = ordered.deltaMs,
|
|
51114
|
+
duration_source = 'derived'
|
|
51115
|
+
FROM ordered
|
|
51116
|
+
WHERE history_message.record_hash = ordered.recordHash
|
|
51117
|
+
AND ordered.role = 'assistant'
|
|
51118
|
+
AND ordered.duration_ms IS NULL
|
|
51119
|
+
AND history_message.duration_ms IS NULL
|
|
51120
|
+
AND ordered.deltaMs IS NOT NULL
|
|
51121
|
+
AND ordered.deltaMs > 0
|
|
51122
|
+
AND ordered.deltaMs <= ${ceilingMs}
|
|
51123
|
+
`);
|
|
51124
|
+
}
|
|
51125
|
+
|
|
51096
51126
|
// ../../packages/domain/src/analytics/tool-name-sql.ts
|
|
51097
51127
|
var EFFECTIVE_TOOL_NAME_SQL = `CASE
|
|
51098
51128
|
WHEN tc.tool_name IS NOT NULL AND TRIM(tc.tool_name) != '' AND tc.tool_name != 'unknown'
|
|
@@ -54543,6 +54573,10 @@ async function recordHistoryBoardRollupMeta(db2, historyVersion, refreshedAt = n
|
|
|
54543
54573
|
VALUES (1, ?, ?)
|
|
54544
54574
|
ON CONFLICT(id) DO UPDATE SET history_version = excluded.history_version, refreshed_at = excluded.refreshed_at`, historyVersion, refreshedAt);
|
|
54545
54575
|
}
|
|
54576
|
+
async function latestHistoryImportedAt(db2) {
|
|
54577
|
+
const rows = await db2.queryAll("SELECT MAX(imported_at) AS v FROM history_message");
|
|
54578
|
+
return rows[0]?.v ?? null;
|
|
54579
|
+
}
|
|
54546
54580
|
async function hasHistoryBoardRollupRows(db2, table3) {
|
|
54547
54581
|
const validTables = {
|
|
54548
54582
|
history_board_message_5m: true,
|
|
@@ -54615,7 +54649,7 @@ END`;
|
|
|
54615
54649
|
];
|
|
54616
54650
|
});
|
|
54617
54651
|
|
|
54618
|
-
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.
|
|
54652
|
+
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.62+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/errors.js
|
|
54619
54653
|
var HistoryImportError, ImportCancelledError;
|
|
54620
54654
|
var init_errors5 = __esm(() => {
|
|
54621
54655
|
HistoryImportError = class HistoryImportError extends Error {
|
|
@@ -54636,8 +54670,35 @@ var init_errors5 = __esm(() => {
|
|
|
54636
54670
|
};
|
|
54637
54671
|
});
|
|
54638
54672
|
|
|
54639
|
-
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.
|
|
54640
|
-
|
|
54673
|
+
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.62+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/cancellation.js
|
|
54674
|
+
function throwIfImportAborted(signal) {
|
|
54675
|
+
if (signal?.aborted) {
|
|
54676
|
+
throw new ImportCancelledError("Import cancelled by abort signal", signal.reason);
|
|
54677
|
+
}
|
|
54678
|
+
}
|
|
54679
|
+
var init_cancellation = __esm(() => {
|
|
54680
|
+
init_errors5();
|
|
54681
|
+
});
|
|
54682
|
+
|
|
54683
|
+
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.62+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/hash.js
|
|
54684
|
+
import { createHash as createHash3 } from "crypto";
|
|
54685
|
+
function stableJson(value) {
|
|
54686
|
+
if (Array.isArray(value)) {
|
|
54687
|
+
return `[${value.map((entry) => entry === undefined ? "null" : stableJson(entry)).join(",")}]`;
|
|
54688
|
+
}
|
|
54689
|
+
if (value !== null && typeof value === "object") {
|
|
54690
|
+
const record2 = value;
|
|
54691
|
+
return `{${Object.keys(record2).filter((key) => record2[key] !== undefined).sort().map((key) => `${JSON.stringify(key)}:${stableJson(record2[key])}`).join(",")}}`;
|
|
54692
|
+
}
|
|
54693
|
+
return JSON.stringify(value) ?? "null";
|
|
54694
|
+
}
|
|
54695
|
+
function sha256(value) {
|
|
54696
|
+
return createHash3("sha256").update(stableJson(value)).digest("hex");
|
|
54697
|
+
}
|
|
54698
|
+
var init_hash = () => {};
|
|
54699
|
+
|
|
54700
|
+
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.62+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/schema-sql.js
|
|
54701
|
+
var HISTORY_IMPORT_SCHEMA_VERSION = "0.4.62", HISTORY_IMPORT_SCHEMA_SQL;
|
|
54641
54702
|
var init_schema_sql = __esm(() => {
|
|
54642
54703
|
HISTORY_IMPORT_SCHEMA_SQL = `
|
|
54643
54704
|
CREATE TABLE IF NOT EXISTS history_import_checkpoint (
|
|
@@ -54759,24 +54820,7 @@ CREATE INDEX IF NOT EXISTS idx_history_skill_call_invocation_kind
|
|
|
54759
54820
|
`.trim();
|
|
54760
54821
|
});
|
|
54761
54822
|
|
|
54762
|
-
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.
|
|
54763
|
-
import { createHash as createHash3 } from "crypto";
|
|
54764
|
-
function stableJson(value) {
|
|
54765
|
-
if (Array.isArray(value)) {
|
|
54766
|
-
return `[${value.map((entry) => entry === undefined ? "null" : stableJson(entry)).join(",")}]`;
|
|
54767
|
-
}
|
|
54768
|
-
if (value !== null && typeof value === "object") {
|
|
54769
|
-
const record2 = value;
|
|
54770
|
-
return `{${Object.keys(record2).filter((key) => record2[key] !== undefined).sort().map((key) => `${JSON.stringify(key)}:${stableJson(record2[key])}`).join(",")}}`;
|
|
54771
|
-
}
|
|
54772
|
-
return JSON.stringify(value) ?? "null";
|
|
54773
|
-
}
|
|
54774
|
-
function sha256(value) {
|
|
54775
|
-
return createHash3("sha256").update(stableJson(value)).digest("hex");
|
|
54776
|
-
}
|
|
54777
|
-
var init_hash = () => {};
|
|
54778
|
-
|
|
54779
|
-
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.60+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/mappers.js
|
|
54823
|
+
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.62+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/mappers.js
|
|
54780
54824
|
function identityFieldMap(keys) {
|
|
54781
54825
|
const map2 = {};
|
|
54782
54826
|
for (const key of keys) {
|
|
@@ -56350,7 +56394,7 @@ var init_mappers = __esm(() => {
|
|
|
56350
56394
|
GEMINI_SCHEMA = passthroughSchema;
|
|
56351
56395
|
});
|
|
56352
56396
|
|
|
56353
|
-
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.
|
|
56397
|
+
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.62+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/sources.js
|
|
56354
56398
|
function firstString(...values) {
|
|
56355
56399
|
for (const value of values) {
|
|
56356
56400
|
if (typeof value === "string" && value.length > 0)
|
|
@@ -56507,7 +56551,7 @@ var init_sources = __esm(() => {
|
|
|
56507
56551
|
};
|
|
56508
56552
|
});
|
|
56509
56553
|
|
|
56510
|
-
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.
|
|
56554
|
+
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.62+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/jsonl-importer-dao.js
|
|
56511
56555
|
function targetTableFor(table3) {
|
|
56512
56556
|
if (!VALID_TABLE_NAME.test(table3)) {
|
|
56513
56557
|
throw new HistoryImportError(`Invalid history ETL target table: ${table3}`, { table: table3 });
|
|
@@ -56704,26 +56748,6 @@ async function ledgerExistingHashes(db2, hashes) {
|
|
|
56704
56748
|
}
|
|
56705
56749
|
return existing;
|
|
56706
56750
|
}
|
|
56707
|
-
async function findAssistantDurationCandidates(db2) {
|
|
56708
|
-
const candidateSql = `
|
|
56709
|
-
WITH ordered AS (
|
|
56710
|
-
SELECT record_hash,
|
|
56711
|
-
role,
|
|
56712
|
-
duration_ms,
|
|
56713
|
-
ts,
|
|
56714
|
-
LAG(ts) OVER (PARTITION BY source, session_id ORDER BY seq) AS prev_ts
|
|
56715
|
-
FROM history_message
|
|
56716
|
-
WHERE ts IS NOT NULL AND ts LIKE '____-__-__T%'
|
|
56717
|
-
)
|
|
56718
|
-
SELECT record_hash AS recordHash,
|
|
56719
|
-
CAST(ROUND((unixepoch(ts, 'subsec') - unixepoch(prev_ts, 'subsec')) * 1000) AS INTEGER) AS deltaMs
|
|
56720
|
-
FROM ordered
|
|
56721
|
-
WHERE role = 'assistant' AND duration_ms IS NULL AND prev_ts IS NOT NULL`;
|
|
56722
|
-
return db2.queryAll(candidateSql);
|
|
56723
|
-
}
|
|
56724
|
-
async function updateAssistantDuration(db2, recordHash, durationMs, durationSource) {
|
|
56725
|
-
await db2.run("UPDATE history_message SET duration_ms = ?, duration_source = ? WHERE record_hash = ? AND duration_ms IS NULL", durationMs, durationSource, recordHash);
|
|
56726
|
-
}
|
|
56727
56751
|
async function reconcileFullImport(db2, source, desiredHashes, discoveredFiles, dryRun) {
|
|
56728
56752
|
const ledgerRows = await db2.queryAll("SELECT record_hash, target_table FROM history_import_ledger WHERE source = ?", source);
|
|
56729
56753
|
const stale = [];
|
|
@@ -56950,40 +56974,7 @@ var init_jsonl_importer_dao = __esm(() => {
|
|
|
56950
56974
|
ARGS_TOOL_NAME_KEYS = ["tool", "tool_name", "toolName", "name", "command"];
|
|
56951
56975
|
});
|
|
56952
56976
|
|
|
56953
|
-
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.
|
|
56954
|
-
async function deriveAssistantDurations(db2) {
|
|
56955
|
-
const rows = await findAssistantDurationCandidates(db2);
|
|
56956
|
-
let derived = 0;
|
|
56957
|
-
let skippedOverCeiling = 0;
|
|
56958
|
-
for (const row of rows) {
|
|
56959
|
-
if (row.deltaMs === null || row.deltaMs <= 0)
|
|
56960
|
-
continue;
|
|
56961
|
-
if (row.deltaMs > DERIVED_DURATION_CEILING_MS) {
|
|
56962
|
-
skippedOverCeiling += 1;
|
|
56963
|
-
continue;
|
|
56964
|
-
}
|
|
56965
|
-
await updateAssistantDuration(db2, row.recordHash, row.deltaMs, DURATION_SOURCE_DERIVED);
|
|
56966
|
-
derived += 1;
|
|
56967
|
-
}
|
|
56968
|
-
return { derived, skippedOverCeiling };
|
|
56969
|
-
}
|
|
56970
|
-
var DURATION_SOURCE_DERIVED = "derived", DERIVED_DURATION_CEILING_MS;
|
|
56971
|
-
var init_assistant_duration = __esm(() => {
|
|
56972
|
-
init_jsonl_importer_dao();
|
|
56973
|
-
DERIVED_DURATION_CEILING_MS = 30 * 60 * 1000;
|
|
56974
|
-
});
|
|
56975
|
-
|
|
56976
|
-
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.60+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/cancellation.js
|
|
56977
|
-
function throwIfImportAborted(signal) {
|
|
56978
|
-
if (signal?.aborted) {
|
|
56979
|
-
throw new ImportCancelledError("Import cancelled by abort signal", signal.reason);
|
|
56980
|
-
}
|
|
56981
|
-
}
|
|
56982
|
-
var init_cancellation = __esm(() => {
|
|
56983
|
-
init_errors5();
|
|
56984
|
-
});
|
|
56985
|
-
|
|
56986
|
-
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.60+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/redaction.js
|
|
56977
|
+
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.62+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/redaction.js
|
|
56987
56978
|
function redactValue(value, rules = DEFAULT_REDACTION_RULES) {
|
|
56988
56979
|
if (typeof value === "string") {
|
|
56989
56980
|
return rules.reduce((current, rule) => current.replace(rule.pattern, rule.replacement), value);
|
|
@@ -57035,7 +57026,7 @@ var init_redaction = __esm(() => {
|
|
|
57035
57026
|
];
|
|
57036
57027
|
});
|
|
57037
57028
|
|
|
57038
|
-
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.
|
|
57029
|
+
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.62+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/importer.js
|
|
57039
57030
|
function toolCallKey(source, sessionId, callId) {
|
|
57040
57031
|
return `${source}${TOOL_CALL_KEY_SEP}${sessionId}${TOOL_CALL_KEY_SEP}${callId}`;
|
|
57041
57032
|
}
|
|
@@ -57445,7 +57436,7 @@ var init_importer = __esm(() => {
|
|
|
57445
57436
|
init_sources();
|
|
57446
57437
|
});
|
|
57447
57438
|
|
|
57448
|
-
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.
|
|
57439
|
+
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.62+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/opencode-importer.js
|
|
57449
57440
|
async function runOpenCodeImport(options) {
|
|
57450
57441
|
throwIfImportAborted(options.signal);
|
|
57451
57442
|
const paths = options.paths ?? ambientRuntimePaths2();
|
|
@@ -57737,7 +57728,7 @@ var init_opencode_importer = __esm(() => {
|
|
|
57737
57728
|
init_redaction();
|
|
57738
57729
|
});
|
|
57739
57730
|
|
|
57740
|
-
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.
|
|
57731
|
+
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.62+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/tables.js
|
|
57741
57732
|
var BOOKKEEPING_HISTORY_TABLES, IMPORTER_OWNED_TABLES;
|
|
57742
57733
|
var init_tables = __esm(() => {
|
|
57743
57734
|
init_jsonl_importer_dao();
|
|
@@ -57750,9 +57741,8 @@ var init_tables = __esm(() => {
|
|
|
57750
57741
|
];
|
|
57751
57742
|
});
|
|
57752
57743
|
|
|
57753
|
-
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.
|
|
57744
|
+
// ../../node_modules/.bun/@gobing-ai+ts-llm-jsonl-importer@0.4.62+f66f1d7f0d37c145/node_modules/@gobing-ai/ts-llm-jsonl-importer/dist/index.js
|
|
57754
57745
|
var init_dist6 = __esm(() => {
|
|
57755
|
-
init_assistant_duration();
|
|
57756
57746
|
init_importer();
|
|
57757
57747
|
init_mappers();
|
|
57758
57748
|
init_opencode_importer();
|
|
@@ -57845,6 +57835,20 @@ async function checkImporterSchemaVersion(db2) {
|
|
|
57845
57835
|
remediation
|
|
57846
57836
|
};
|
|
57847
57837
|
}
|
|
57838
|
+
async function repairImporterSchemaVersion(db2) {
|
|
57839
|
+
const installed = HISTORY_IMPORT_SCHEMA_VERSION;
|
|
57840
|
+
for (const statement of HISTORY_IMPORT_SCHEMA_SQL.split(";").map((s2) => s2.trim()).filter((s2) => s2.length > 0)) {
|
|
57841
|
+
await db2.exec(statement);
|
|
57842
|
+
}
|
|
57843
|
+
await db2.run('DELETE FROM "__spur_cli_migrations" WHERE id LIKE ? AND id != ?', [
|
|
57844
|
+
`${IMPORTER_SCHEMA_LEDGER_PREFIX}%`,
|
|
57845
|
+
`${IMPORTER_SCHEMA_LEDGER_PREFIX}${installed}`
|
|
57846
|
+
]);
|
|
57847
|
+
await db2.run('INSERT OR REPLACE INTO "__spur_cli_migrations" (id, applied_at) VALUES (?, ?)', [
|
|
57848
|
+
`${IMPORTER_SCHEMA_LEDGER_PREFIX}${installed}`,
|
|
57849
|
+
Date.now()
|
|
57850
|
+
]);
|
|
57851
|
+
}
|
|
57848
57852
|
var IMPORTER_SCHEMA_LEDGER_PREFIX = "importer_schema@";
|
|
57849
57853
|
var init_importer_schema_version = __esm(() => {
|
|
57850
57854
|
init_dist6();
|
|
@@ -60607,7 +60611,7 @@ function observationIsNewer(leftAt, leftId, rightAt, rightId) {
|
|
|
60607
60611
|
}
|
|
60608
60612
|
var AGENT_EXECUTOR_UPDATE_COLUMNS = "project_id, executor_name, observation_id, observed_at, agent, model, disabled, applied_observation_id, applied_at, attempts, retry_after, last_error";
|
|
60609
60613
|
|
|
60610
|
-
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.
|
|
60614
|
+
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.62+39fe09901e9c1f39/node_modules/@gobing-ai/ts-db/dist/schema/drizzle-internals.js
|
|
60611
60615
|
function sqlExpressionToText(value) {
|
|
60612
60616
|
if (typeof value !== "object" || value === null || !("queryChunks" in value)) {
|
|
60613
60617
|
return;
|
|
@@ -60630,7 +60634,7 @@ function getDrizzleTableName(table3) {
|
|
|
60630
60634
|
return String(table3[nameSym]);
|
|
60631
60635
|
}
|
|
60632
60636
|
|
|
60633
|
-
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.
|
|
60637
|
+
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.62+39fe09901e9c1f39/node_modules/@gobing-ai/ts-db/dist/schema/ddl.js
|
|
60634
60638
|
function quoteIdent(name) {
|
|
60635
60639
|
return `"${name.replace(/"/g, '""')}"`;
|
|
60636
60640
|
}
|
|
@@ -61002,7 +61006,7 @@ var init_drizzle_zod = __esm(() => {
|
|
|
61002
61006
|
};
|
|
61003
61007
|
});
|
|
61004
61008
|
|
|
61005
|
-
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.
|
|
61009
|
+
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.62+39fe09901e9c1f39/node_modules/@gobing-ai/ts-db/dist/schema/define-table.js
|
|
61006
61010
|
function defineTable(name, columns2) {
|
|
61007
61011
|
const table3 = sqliteTable(name, columns2);
|
|
61008
61012
|
let insert2;
|
|
@@ -61036,7 +61040,7 @@ var init_define_table = __esm(() => {
|
|
|
61036
61040
|
init_ddl();
|
|
61037
61041
|
});
|
|
61038
61042
|
|
|
61039
|
-
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.
|
|
61043
|
+
// ../../node_modules/.bun/@gobing-ai+ts-db@0.4.62+39fe09901e9c1f39/node_modules/@gobing-ai/ts-db/dist/schema/index.js
|
|
61040
61044
|
var exports_schema = {};
|
|
61041
61045
|
__export(exports_schema, {
|
|
61042
61046
|
text: () => text,
|
|
@@ -61731,7 +61735,7 @@ var init_dao = __esm(() => {
|
|
|
61731
61735
|
init_workspace_dao();
|
|
61732
61736
|
});
|
|
61733
61737
|
|
|
61734
|
-
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.
|
|
61738
|
+
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/errors.js
|
|
61735
61739
|
var WorkflowValidationError, FSMError, RunCollisionError, WorkflowResumeError;
|
|
61736
61740
|
var init_errors6 = __esm(() => {
|
|
61737
61741
|
WorkflowValidationError = class WorkflowValidationError extends Error {
|
|
@@ -61766,12 +61770,12 @@ var init_errors6 = __esm(() => {
|
|
|
61766
61770
|
};
|
|
61767
61771
|
});
|
|
61768
61772
|
|
|
61769
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
61773
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/event-bus/index.js
|
|
61770
61774
|
var init_event_bus2 = __esm(() => {
|
|
61771
61775
|
init_event_bus();
|
|
61772
61776
|
});
|
|
61773
61777
|
|
|
61774
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
61778
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/api-client.js
|
|
61775
61779
|
function sanitizeUrlForObservability(url2) {
|
|
61776
61780
|
try {
|
|
61777
61781
|
const parsed = new URL(url2);
|
|
@@ -62002,12 +62006,12 @@ var init_api_client = __esm(() => {
|
|
|
62002
62006
|
};
|
|
62003
62007
|
});
|
|
62004
62008
|
|
|
62005
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
62009
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/telemetry/index.js
|
|
62006
62010
|
var init_telemetry = __esm(() => {
|
|
62007
62011
|
init_tracing2();
|
|
62008
62012
|
});
|
|
62009
62013
|
|
|
62010
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
62014
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/index.js
|
|
62011
62015
|
var init_dist7 = __esm(() => {
|
|
62012
62016
|
init_api_client();
|
|
62013
62017
|
init_event_bus2();
|
|
@@ -62015,7 +62019,7 @@ var init_dist7 = __esm(() => {
|
|
|
62015
62019
|
init_telemetry();
|
|
62016
62020
|
});
|
|
62017
62021
|
|
|
62018
|
-
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.
|
|
62022
|
+
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/run-lifecycle.js
|
|
62019
62023
|
function runtimeBuiltins(workflowName, stateOrNodeId, runId, transitionsTaken, mode) {
|
|
62020
62024
|
return {
|
|
62021
62025
|
workflow: workflowName,
|
|
@@ -62299,7 +62303,7 @@ var init_run_lifecycle = __esm(() => {
|
|
|
62299
62303
|
];
|
|
62300
62304
|
});
|
|
62301
62305
|
|
|
62302
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
62306
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/extension/capability-registry.js
|
|
62303
62307
|
class CapabilityRegistry {
|
|
62304
62308
|
kind;
|
|
62305
62309
|
capabilities = new Map;
|
|
@@ -62330,7 +62334,7 @@ class CapabilityRegistry {
|
|
|
62330
62334
|
}
|
|
62331
62335
|
}
|
|
62332
62336
|
|
|
62333
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
62337
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/extension/extension-path.js
|
|
62334
62338
|
function assertRelativeExtensionPath(path9, options = {}) {
|
|
62335
62339
|
const where = options.sourceName !== undefined ? ` declared by "${options.sourceName}"` : "";
|
|
62336
62340
|
if (/^([/\\]|[A-Za-z]:[/\\])/.test(path9)) {
|
|
@@ -62341,7 +62345,7 @@ function assertRelativeExtensionPath(path9, options = {}) {
|
|
|
62341
62345
|
}
|
|
62342
62346
|
}
|
|
62343
62347
|
|
|
62344
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
62348
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/extension/extension-loader.js
|
|
62345
62349
|
import { isAbsolute, resolve } from "path";
|
|
62346
62350
|
async function loadExtensionModules(refs, options, register) {
|
|
62347
62351
|
if (refs.length === 0)
|
|
@@ -62380,17 +62384,17 @@ async function loadExtensionModules(refs, options, register) {
|
|
|
62380
62384
|
}
|
|
62381
62385
|
var init_extension_loader = () => {};
|
|
62382
62386
|
|
|
62383
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
62387
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/extension/index.js
|
|
62384
62388
|
var init_extension = __esm(() => {
|
|
62385
62389
|
init_extension_loader();
|
|
62386
62390
|
});
|
|
62387
62391
|
|
|
62388
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.
|
|
62392
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.62+9fbf929b070eed81/node_modules/@gobing-ai/ts-runtime/dist/extension.js
|
|
62389
62393
|
var init_extension2 = __esm(() => {
|
|
62390
62394
|
init_extension();
|
|
62391
62395
|
});
|
|
62392
62396
|
|
|
62393
|
-
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.
|
|
62397
|
+
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/schema.js
|
|
62394
62398
|
var RESERVED_VAR_NAMES, IDENTIFIER, VarsSchema, EnvSchema, relativeExtensionPath, WorkflowExtensionsSchema, ActionDefSchema, GuardDefSchema, StateMachineWorkflowDefSchema, TransitionFlowWorkflowDefSchema, WorkflowDefSchema;
|
|
62395
62399
|
var init_schema2 = __esm(() => {
|
|
62396
62400
|
init_extension2();
|
|
@@ -62492,7 +62496,7 @@ var init_schema2 = __esm(() => {
|
|
|
62492
62496
|
WorkflowDefSchema = exports_external.union([StateMachineWorkflowDefSchema, TransitionFlowWorkflowDefSchema]);
|
|
62493
62497
|
});
|
|
62494
62498
|
|
|
62495
|
-
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.
|
|
62499
|
+
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/config.js
|
|
62496
62500
|
async function loadWorkflowDef(path9, options = {}) {
|
|
62497
62501
|
return parseWorkflowDef(await loadStructuredConfig(path9, options), path9);
|
|
62498
62502
|
}
|
|
@@ -62659,7 +62663,7 @@ var init_config4 = __esm(() => {
|
|
|
62659
62663
|
RUNTIME_TEMPLATE_NAMESPACES = new Set(RUNTIME_BUILTIN_KEYS);
|
|
62660
62664
|
});
|
|
62661
62665
|
|
|
62662
|
-
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.
|
|
62666
|
+
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/extensions.js
|
|
62663
62667
|
function collectWorkflowExtensions(sourceName, sourceDir, extensions) {
|
|
62664
62668
|
if (extensions === undefined)
|
|
62665
62669
|
return [];
|
|
@@ -62723,7 +62727,7 @@ var init_extensions = __esm(() => {
|
|
|
62723
62727
|
init_errors6();
|
|
62724
62728
|
});
|
|
62725
62729
|
|
|
62726
|
-
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.
|
|
62730
|
+
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/host.js
|
|
62727
62731
|
class WorkflowEngineHost {
|
|
62728
62732
|
lifecycleBus;
|
|
62729
62733
|
actions = new CapabilityRegistry("workflow action");
|
|
@@ -62893,7 +62897,7 @@ var init_host = __esm(() => {
|
|
|
62893
62897
|
init_errors6();
|
|
62894
62898
|
});
|
|
62895
62899
|
|
|
62896
|
-
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.
|
|
62900
|
+
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/schema-sql.js
|
|
62897
62901
|
var WORKFLOW_ENGINE_SCHEMA_SQL;
|
|
62898
62902
|
var init_schema_sql2 = __esm(() => {
|
|
62899
62903
|
WORKFLOW_ENGINE_SCHEMA_SQL = `
|
|
@@ -62966,7 +62970,7 @@ CREATE TABLE IF NOT EXISTS action_runs (
|
|
|
62966
62970
|
`.trim();
|
|
62967
62971
|
});
|
|
62968
62972
|
|
|
62969
|
-
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.
|
|
62973
|
+
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/persistence.js
|
|
62970
62974
|
async function applyWorkflowEngineSchema(db2) {
|
|
62971
62975
|
for (const statement of WORKFLOW_ENGINE_SCHEMA_SQL.split(";")) {
|
|
62972
62976
|
const sql4 = statement.trim();
|
|
@@ -63282,7 +63286,7 @@ var init_persistence = __esm(() => {
|
|
|
63282
63286
|
init_schema_sql2();
|
|
63283
63287
|
});
|
|
63284
63288
|
|
|
63285
|
-
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.
|
|
63289
|
+
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/variables.js
|
|
63286
63290
|
function mergeVars(workflowVars = {}, overrideVars = {}) {
|
|
63287
63291
|
return { ...workflowVars, ...overrideVars };
|
|
63288
63292
|
}
|
|
@@ -63342,7 +63346,7 @@ var init_variables = __esm(() => {
|
|
|
63342
63346
|
TEMPLATE_REF = /\$\{([^}]+)\}/g;
|
|
63343
63347
|
});
|
|
63344
63348
|
|
|
63345
|
-
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.
|
|
63349
|
+
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/action-step.js
|
|
63346
63350
|
async function runActionStep(action, vars, deps) {
|
|
63347
63351
|
const { host, persistence, lifecycle, stateOrNodeId, runId } = deps;
|
|
63348
63352
|
const resolved = resolveTemplates(action.options ?? {}, {
|
|
@@ -63406,7 +63410,7 @@ var init_action_step = __esm(() => {
|
|
|
63406
63410
|
init_variables();
|
|
63407
63411
|
});
|
|
63408
63412
|
|
|
63409
|
-
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.
|
|
63413
|
+
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/state-machine.js
|
|
63410
63414
|
class StateMachineDriver {
|
|
63411
63415
|
options;
|
|
63412
63416
|
constructor(options) {
|
|
@@ -63542,7 +63546,7 @@ var init_state_machine = __esm(() => {
|
|
|
63542
63546
|
EMPTY_OUTCOME = { outcome: "completed", result: undefined, setVars: undefined };
|
|
63543
63547
|
});
|
|
63544
63548
|
|
|
63545
|
-
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.
|
|
63549
|
+
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/transition-flow.js
|
|
63546
63550
|
class TransitionFlowDriver {
|
|
63547
63551
|
options;
|
|
63548
63552
|
constructor(options) {
|
|
@@ -63661,7 +63665,7 @@ var init_transition_flow = __esm(() => {
|
|
|
63661
63665
|
init_variables();
|
|
63662
63666
|
});
|
|
63663
63667
|
|
|
63664
|
-
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.
|
|
63668
|
+
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/service.js
|
|
63665
63669
|
class WorkflowService {
|
|
63666
63670
|
host;
|
|
63667
63671
|
persistence;
|
|
@@ -63886,7 +63890,7 @@ var init_service = __esm(() => {
|
|
|
63886
63890
|
init_variables();
|
|
63887
63891
|
});
|
|
63888
63892
|
|
|
63889
|
-
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.
|
|
63893
|
+
// ../../node_modules/.bun/@gobing-ai+ts-dual-workflow-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-dual-workflow-engine/dist/index.js
|
|
63890
63894
|
var init_dist8 = __esm(() => {
|
|
63891
63895
|
init_config4();
|
|
63892
63896
|
init_extensions();
|
|
@@ -63896,7 +63900,7 @@ var init_dist8 = __esm(() => {
|
|
|
63896
63900
|
init_service();
|
|
63897
63901
|
});
|
|
63898
63902
|
|
|
63899
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
63903
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/config/extensions.js
|
|
63900
63904
|
function collectExtensions(sourceName, sourceDir, extensions) {
|
|
63901
63905
|
if (extensions === undefined)
|
|
63902
63906
|
return [];
|
|
@@ -63910,7 +63914,7 @@ function collectExtensions(sourceName, sourceDir, extensions) {
|
|
|
63910
63914
|
}
|
|
63911
63915
|
var init_extensions2 = () => {};
|
|
63912
63916
|
|
|
63913
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
63917
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/types.js
|
|
63914
63918
|
function createFinding(rule, message, filePath, extras = {}) {
|
|
63915
63919
|
return {
|
|
63916
63920
|
ruleId: rule.id,
|
|
@@ -63981,7 +63985,7 @@ var init_types3 = __esm(() => {
|
|
|
63981
63985
|
});
|
|
63982
63986
|
});
|
|
63983
63987
|
|
|
63984
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
63988
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/config/loader.js
|
|
63985
63989
|
async function loadPreset(name, options) {
|
|
63986
63990
|
const merged = await buildMergedRoots(options.roots.map((root) => resolvePath4(root)), options.fileSystem);
|
|
63987
63991
|
const presetPath = findMergedPreset(merged, name);
|
|
@@ -64196,7 +64200,7 @@ var init_loader2 = __esm(() => {
|
|
|
64196
64200
|
FIX_MODE_AUTHORITY = { none: 0, suggest: 1, auto: 2 };
|
|
64197
64201
|
});
|
|
64198
64202
|
|
|
64199
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
64203
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/fixers/test-stub-fixer.js
|
|
64200
64204
|
function normalizeFindingPath(filePath) {
|
|
64201
64205
|
if (!filePath || isAbsolutePath2(filePath))
|
|
64202
64206
|
return null;
|
|
@@ -64261,7 +64265,7 @@ var init_test_stub_fixer = __esm(() => {
|
|
|
64261
64265
|
realFileSystem = createNodeFileSystem3();
|
|
64262
64266
|
});
|
|
64263
64267
|
|
|
64264
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
64268
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/fixers/fixers.js
|
|
64265
64269
|
function registerBuiltinFixers(host, exec) {
|
|
64266
64270
|
const regexFixer = new RegexFixerProvider;
|
|
64267
64271
|
const pathFixer = new PathFixerProvider;
|
|
@@ -64464,7 +64468,7 @@ var init_fixers = __esm(() => {
|
|
|
64464
64468
|
};
|
|
64465
64469
|
});
|
|
64466
64470
|
|
|
64467
|
-
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.
|
|
64471
|
+
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.62+04fc4d7e2750298b/node_modules/@gobing-ai/ts-ai-runner/dist/agents/shims.js
|
|
64468
64472
|
function getAgentSessionCapability(agent) {
|
|
64469
64473
|
return AGENT_SESSION_CAPABILITY[agent];
|
|
64470
64474
|
}
|
|
@@ -64760,7 +64764,7 @@ var init_shims = __esm(() => {
|
|
|
64760
64764
|
ALIAS_TO_CANONICAL = Object.fromEntries(Object.values(AGENT_SHIMS).flatMap((shim) => (shim.aliases ?? []).map((alias3) => [alias3, shim.name])));
|
|
64761
64765
|
});
|
|
64762
64766
|
|
|
64763
|
-
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.
|
|
64767
|
+
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.62+04fc4d7e2750298b/node_modules/@gobing-ai/ts-ai-runner/dist/identity.js
|
|
64764
64768
|
function buildIdentityPreamble(ctx) {
|
|
64765
64769
|
const sections = [
|
|
64766
64770
|
`You are agent \`${ctx.agentId}\` (${ctx.agentType}) in workspace \`${ctx.workspace}\`.`
|
|
@@ -64836,7 +64840,7 @@ var init_identity = __esm(() => {
|
|
|
64836
64840
|
init_dist5();
|
|
64837
64841
|
});
|
|
64838
64842
|
|
|
64839
|
-
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.
|
|
64843
|
+
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.62+04fc4d7e2750298b/node_modules/@gobing-ai/ts-ai-runner/dist/quota.js
|
|
64840
64844
|
import { createHash as createHash4 } from "crypto";
|
|
64841
64845
|
function classifyQuotaErrorRecord(record2) {
|
|
64842
64846
|
const bounded = record2.length > MAX_QUOTA_EVIDENCE_BYTES ? record2.slice(-MAX_QUOTA_EVIDENCE_BYTES) : record2;
|
|
@@ -64937,7 +64941,7 @@ var init_quota = __esm(() => {
|
|
|
64937
64941
|
]);
|
|
64938
64942
|
});
|
|
64939
64943
|
|
|
64940
|
-
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.
|
|
64944
|
+
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.62+04fc4d7e2750298b/node_modules/@gobing-ai/ts-ai-runner/dist/slash-command.js
|
|
64941
64945
|
function isClaudeStyleSlashCommand(input) {
|
|
64942
64946
|
return SLASH_COMMAND_RE2.test(input);
|
|
64943
64947
|
}
|
|
@@ -64965,7 +64969,7 @@ var init_slash_command = __esm(() => {
|
|
|
64965
64969
|
SLASH_COMMAND_RE2 = /^\/([a-zA-Z0-9._-]+):([a-zA-Z0-9._-]+)(\s.*)?$/;
|
|
64966
64970
|
});
|
|
64967
64971
|
|
|
64968
|
-
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.
|
|
64972
|
+
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.62+04fc4d7e2750298b/node_modules/@gobing-ai/ts-ai-runner/dist/ai-runner.js
|
|
64969
64973
|
function buildCorrelationEnv(correlation) {
|
|
64970
64974
|
return {
|
|
64971
64975
|
[AGENT_RUN_ID_ENV]: correlation.runId,
|
|
@@ -65123,7 +65127,7 @@ var init_ai_runner = __esm(() => {
|
|
|
65123
65127
|
init_slash_command();
|
|
65124
65128
|
});
|
|
65125
65129
|
|
|
65126
|
-
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.
|
|
65130
|
+
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.62+04fc4d7e2750298b/node_modules/@gobing-ai/ts-ai-runner/dist/agent-detector.js
|
|
65127
65131
|
class AgentDetector {
|
|
65128
65132
|
runner;
|
|
65129
65133
|
timeout;
|
|
@@ -65199,7 +65203,7 @@ var init_agent_detector = __esm(() => {
|
|
|
65199
65203
|
VERSION_PATTERN = /(?<version>\d+\.\d+(?:\.\d+)?)/;
|
|
65200
65204
|
});
|
|
65201
65205
|
|
|
65202
|
-
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.
|
|
65206
|
+
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.62+04fc4d7e2750298b/node_modules/@gobing-ai/ts-ai-runner/dist/agent-spec.js
|
|
65203
65207
|
function validateAgentId(id) {
|
|
65204
65208
|
if (!/^[a-z][a-z0-9_-]{1,63}$/.test(id)) {
|
|
65205
65209
|
throw new ValueError(`Invalid agent id "${id}": expected 2-64 chars, lowercase alphanumeric, "_" or "-"`);
|
|
@@ -65298,7 +65302,7 @@ var init_agent_spec = __esm(() => {
|
|
|
65298
65302
|
};
|
|
65299
65303
|
});
|
|
65300
65304
|
|
|
65301
|
-
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.
|
|
65305
|
+
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.62+04fc4d7e2750298b/node_modules/@gobing-ai/ts-ai-runner/dist/agents/auth-shims.js
|
|
65302
65306
|
function isNonEmpty(value) {
|
|
65303
65307
|
return value !== undefined && value.trim().length > 0;
|
|
65304
65308
|
}
|
|
@@ -65423,7 +65427,7 @@ var init_auth_shims = __esm(() => {
|
|
|
65423
65427
|
};
|
|
65424
65428
|
});
|
|
65425
65429
|
|
|
65426
|
-
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.
|
|
65430
|
+
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.62+04fc4d7e2750298b/node_modules/@gobing-ai/ts-ai-runner/dist/model-health-probe.js
|
|
65427
65431
|
class ModelHealthProbeRegistry {
|
|
65428
65432
|
probes = new Map;
|
|
65429
65433
|
register(providerPrefix, probe) {
|
|
@@ -65547,7 +65551,7 @@ var init_model_health_probe = __esm(() => {
|
|
|
65547
65551
|
};
|
|
65548
65552
|
});
|
|
65549
65553
|
|
|
65550
|
-
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.
|
|
65554
|
+
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.62+04fc4d7e2750298b/node_modules/@gobing-ai/ts-ai-runner/dist/doctor-runner.js
|
|
65551
65555
|
class DoctorRunner {
|
|
65552
65556
|
detector;
|
|
65553
65557
|
runner;
|
|
@@ -65687,15 +65691,15 @@ var init_doctor_runner = __esm(() => {
|
|
|
65687
65691
|
init_model_health_probe();
|
|
65688
65692
|
});
|
|
65689
65693
|
|
|
65690
|
-
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.
|
|
65694
|
+
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.62+04fc4d7e2750298b/node_modules/@gobing-ai/ts-ai-runner/dist/events.js
|
|
65691
65695
|
var init_events = () => {};
|
|
65692
65696
|
|
|
65693
|
-
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.
|
|
65697
|
+
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.62+04fc4d7e2750298b/node_modules/@gobing-ai/ts-ai-runner/dist/messages.js
|
|
65694
65698
|
function formatMessage(msg) {
|
|
65695
65699
|
return `[task from=${msg.fromId ?? "operator"} id=${msg.id}] ${msg.body}`;
|
|
65696
65700
|
}
|
|
65697
65701
|
|
|
65698
|
-
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.
|
|
65702
|
+
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.62+04fc4d7e2750298b/node_modules/@gobing-ai/ts-ai-runner/dist/team-agent-process.js
|
|
65699
65703
|
import { Buffer as Buffer5 } from "buffer";
|
|
65700
65704
|
|
|
65701
65705
|
class TeamAgentProcess {
|
|
@@ -65860,7 +65864,7 @@ var init_team_agent_process = __esm(() => {
|
|
|
65860
65864
|
init_quota();
|
|
65861
65865
|
});
|
|
65862
65866
|
|
|
65863
|
-
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.
|
|
65867
|
+
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.62+04fc4d7e2750298b/node_modules/@gobing-ai/ts-ai-runner/dist/team-orchestrator.js
|
|
65864
65868
|
class TeamOrchestrator {
|
|
65865
65869
|
configDir;
|
|
65866
65870
|
inbox;
|
|
@@ -66001,7 +66005,7 @@ var init_team_orchestrator = __esm(() => {
|
|
|
66001
66005
|
init_team_agent_process();
|
|
66002
66006
|
});
|
|
66003
66007
|
|
|
66004
|
-
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.
|
|
66008
|
+
// ../../node_modules/.bun/@gobing-ai+ts-ai-runner@0.4.62+04fc4d7e2750298b/node_modules/@gobing-ai/ts-ai-runner/dist/index.js
|
|
66005
66009
|
var exports_dist3 = {};
|
|
66006
66010
|
__export(exports_dist3, {
|
|
66007
66011
|
validateAgentId: () => validateAgentId,
|
|
@@ -66061,7 +66065,7 @@ var init_dist9 = __esm(() => {
|
|
|
66061
66065
|
init_team_orchestrator();
|
|
66062
66066
|
});
|
|
66063
66067
|
|
|
66064
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
66068
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/config-access.js
|
|
66065
66069
|
function stringArray(value) {
|
|
66066
66070
|
return Array.isArray(value) && value.every((item) => typeof item === "string") ? value : undefined;
|
|
66067
66071
|
}
|
|
@@ -66099,7 +66103,7 @@ function parseInlineFlags(source) {
|
|
|
66099
66103
|
return { flags, rest: source.slice(match[0].length) };
|
|
66100
66104
|
}
|
|
66101
66105
|
|
|
66102
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
66106
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/glob-match.js
|
|
66103
66107
|
function matchesAny(path9, patterns) {
|
|
66104
66108
|
if (patterns === undefined || patterns.length === 0)
|
|
66105
66109
|
return true;
|
|
@@ -66147,7 +66151,7 @@ function escapeRegExp(value) {
|
|
|
66147
66151
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
66148
66152
|
}
|
|
66149
66153
|
|
|
66150
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
66154
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/file-discovery.js
|
|
66151
66155
|
async function discoverFiles2(options) {
|
|
66152
66156
|
const fs3 = options.fs ?? createNodeFileSystem3();
|
|
66153
66157
|
const allFiles = await walkDir2(options.workdir, fs3, DEFAULT_EXCLUDES);
|
|
@@ -66178,12 +66182,12 @@ var init_file_discovery = __esm(() => {
|
|
|
66178
66182
|
DEFAULT_EXCLUDES = new Set([".git", "node_modules", "dist", ".coverage", ".astro", ".wrangler"]);
|
|
66179
66183
|
});
|
|
66180
66184
|
|
|
66181
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
66185
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/file-utils.js
|
|
66182
66186
|
var init_file_utils = __esm(() => {
|
|
66183
66187
|
init_file_discovery();
|
|
66184
66188
|
});
|
|
66185
66189
|
|
|
66186
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
66190
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/agent-detection-evaluator.js
|
|
66187
66191
|
class AgentDetectionEvaluator {
|
|
66188
66192
|
detector;
|
|
66189
66193
|
constructor(detector = new AgentDetector) {
|
|
@@ -66211,7 +66215,7 @@ var init_agent_detection_evaluator = __esm(() => {
|
|
|
66211
66215
|
init_file_utils();
|
|
66212
66216
|
});
|
|
66213
66217
|
|
|
66214
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
66218
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/coverage-gate-evaluator.js
|
|
66215
66219
|
class CoverageGateEvaluator {
|
|
66216
66220
|
constructor() {}
|
|
66217
66221
|
async evaluate(rule, context4) {
|
|
@@ -66295,7 +66299,7 @@ var init_coverage_gate_evaluator = __esm(() => {
|
|
|
66295
66299
|
init_file_utils();
|
|
66296
66300
|
});
|
|
66297
66301
|
|
|
66298
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
66302
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/exit-code-evaluator.js
|
|
66299
66303
|
class ExitCodeEvaluator {
|
|
66300
66304
|
executor;
|
|
66301
66305
|
constructor(executor = nodeBunFactory3.createProcessExecutor()) {
|
|
@@ -66331,7 +66335,7 @@ var init_exit_code_evaluator = __esm(() => {
|
|
|
66331
66335
|
init_file_utils();
|
|
66332
66336
|
});
|
|
66333
66337
|
|
|
66334
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
66338
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/forbidden-import-evaluator.js
|
|
66335
66339
|
class ForbiddenImportEvaluator {
|
|
66336
66340
|
constructor() {}
|
|
66337
66341
|
async evaluate(rule, context4) {
|
|
@@ -66412,7 +66416,7 @@ var init_forbidden_import_evaluator = __esm(() => {
|
|
|
66412
66416
|
init_file_utils();
|
|
66413
66417
|
});
|
|
66414
66418
|
|
|
66415
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
66419
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/import-boundary-evaluator.js
|
|
66416
66420
|
class ImportBoundaryEvaluator {
|
|
66417
66421
|
async evaluate(rule, context4) {
|
|
66418
66422
|
const config4 = rule.evaluator.config ?? {};
|
|
@@ -66505,7 +66509,7 @@ var init_import_boundary_evaluator = __esm(() => {
|
|
|
66505
66509
|
init_file_utils();
|
|
66506
66510
|
});
|
|
66507
66511
|
|
|
66508
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
66512
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/path-evaluator.js
|
|
66509
66513
|
class PathEvaluator {
|
|
66510
66514
|
constructor() {}
|
|
66511
66515
|
async evaluate(rule, context4) {
|
|
@@ -66566,7 +66570,7 @@ var init_path_evaluator = __esm(() => {
|
|
|
66566
66570
|
init_file_utils();
|
|
66567
66571
|
});
|
|
66568
66572
|
|
|
66569
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
66573
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/regex-evaluator.js
|
|
66570
66574
|
class RegexEvaluator {
|
|
66571
66575
|
constructor() {}
|
|
66572
66576
|
async evaluate(rule, context4) {
|
|
@@ -66644,7 +66648,7 @@ var init_regex_evaluator = __esm(() => {
|
|
|
66644
66648
|
init_file_utils();
|
|
66645
66649
|
});
|
|
66646
66650
|
|
|
66647
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
66651
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/ripgrep-evaluator.js
|
|
66648
66652
|
class RipgrepEvaluator {
|
|
66649
66653
|
executor;
|
|
66650
66654
|
constructor(executor = nodeBunFactory3.createProcessExecutor()) {
|
|
@@ -66737,7 +66741,7 @@ var init_ripgrep_evaluator = __esm(() => {
|
|
|
66737
66741
|
init_file_utils();
|
|
66738
66742
|
});
|
|
66739
66743
|
|
|
66740
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
66744
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/schema-artifact-evaluator.js
|
|
66741
66745
|
class SchemaArtifactEvaluator {
|
|
66742
66746
|
constructor() {}
|
|
66743
66747
|
async evaluate(rule, context4) {
|
|
@@ -66815,7 +66819,7 @@ var init_schema_artifact_evaluator = __esm(() => {
|
|
|
66815
66819
|
init_file_utils();
|
|
66816
66820
|
});
|
|
66817
66821
|
|
|
66818
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
66822
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/secrets-scanner-evaluator.js
|
|
66819
66823
|
class SecretsScannerEvaluator {
|
|
66820
66824
|
constructor() {}
|
|
66821
66825
|
async evaluate(rule, context4) {
|
|
@@ -66883,7 +66887,7 @@ var init_secrets_scanner_evaluator = __esm(() => {
|
|
|
66883
66887
|
ALL_CATEGORIES = Object.keys(BUILTIN_PATTERNS);
|
|
66884
66888
|
});
|
|
66885
66889
|
|
|
66886
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
66890
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/sg-evaluator.js
|
|
66887
66891
|
class SgEvaluator {
|
|
66888
66892
|
executor;
|
|
66889
66893
|
constructor(executor = nodeBunFactory3.createProcessExecutor()) {
|
|
@@ -66980,7 +66984,7 @@ var init_sg_evaluator = __esm(() => {
|
|
|
66980
66984
|
init_file_utils();
|
|
66981
66985
|
});
|
|
66982
66986
|
|
|
66983
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
66987
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/resolvers/test-path-resolver.js
|
|
66984
66988
|
class TypeScriptTestPathResolver {
|
|
66985
66989
|
name = "typescript";
|
|
66986
66990
|
constructor() {}
|
|
@@ -67063,7 +67067,7 @@ function testify(rel) {
|
|
|
67063
67067
|
return `${dir}test_${base2}`;
|
|
67064
67068
|
}
|
|
67065
67069
|
|
|
67066
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
67070
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/test-location-evaluator.js
|
|
67067
67071
|
class TestLocationEvaluator {
|
|
67068
67072
|
resolvers;
|
|
67069
67073
|
constructor(resolvers) {
|
|
@@ -67138,7 +67142,7 @@ var init_test_location_evaluator = __esm(() => {
|
|
|
67138
67142
|
TYPESCRIPT_FALLBACK = new TypeScriptTestPathResolver;
|
|
67139
67143
|
});
|
|
67140
67144
|
|
|
67141
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
67145
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/evaluators/tsdoc-export-evaluator.js
|
|
67142
67146
|
class TsdocExportEvaluator {
|
|
67143
67147
|
constructor() {}
|
|
67144
67148
|
async evaluate(rule, context4) {
|
|
@@ -67223,7 +67227,7 @@ var init_tsdoc_export_evaluator = __esm(() => {
|
|
|
67223
67227
|
};
|
|
67224
67228
|
});
|
|
67225
67229
|
|
|
67226
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
67230
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/formatters/json.js
|
|
67227
67231
|
class JsonFormatter {
|
|
67228
67232
|
constructor() {}
|
|
67229
67233
|
format(result) {
|
|
@@ -67231,7 +67235,7 @@ class JsonFormatter {
|
|
|
67231
67235
|
}
|
|
67232
67236
|
}
|
|
67233
67237
|
|
|
67234
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
67238
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/formatters/text.js
|
|
67235
67239
|
class TextFormatter {
|
|
67236
67240
|
constructor() {}
|
|
67237
67241
|
format(result) {
|
|
@@ -67245,7 +67249,7 @@ class TextFormatter {
|
|
|
67245
67249
|
}
|
|
67246
67250
|
}
|
|
67247
67251
|
|
|
67248
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
67252
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/host/builtins.js
|
|
67249
67253
|
function registerBuiltins(host, executor) {
|
|
67250
67254
|
const path9 = new PathEvaluator;
|
|
67251
67255
|
host.evaluators.register("regex", new RegexEvaluator, "builtin");
|
|
@@ -67285,7 +67289,7 @@ var init_builtins = __esm(() => {
|
|
|
67285
67289
|
init_tsdoc_export_evaluator();
|
|
67286
67290
|
});
|
|
67287
67291
|
|
|
67288
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
67292
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/host/rule-engine-host.js
|
|
67289
67293
|
class RuleEngineHost {
|
|
67290
67294
|
evaluators;
|
|
67291
67295
|
formatters;
|
|
@@ -67302,7 +67306,7 @@ var init_rule_engine_host = __esm(() => {
|
|
|
67302
67306
|
init_extension2();
|
|
67303
67307
|
});
|
|
67304
67308
|
|
|
67305
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
67309
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/engine.js
|
|
67306
67310
|
class RuleEngine {
|
|
67307
67311
|
host;
|
|
67308
67312
|
events;
|
|
@@ -67488,7 +67492,7 @@ var init_engine = __esm(() => {
|
|
|
67488
67492
|
init_types3();
|
|
67489
67493
|
});
|
|
67490
67494
|
|
|
67491
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
67495
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/host/bundled-rules.js
|
|
67492
67496
|
async function bundledRulesRoot() {
|
|
67493
67497
|
if (cachedRoot2 !== undefined)
|
|
67494
67498
|
return cachedRoot2;
|
|
@@ -67539,7 +67543,7 @@ var init_bundled_rules = __esm(() => {
|
|
|
67539
67543
|
init_dist5();
|
|
67540
67544
|
});
|
|
67541
67545
|
|
|
67542
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
67546
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/persistence/db-adapter.js
|
|
67543
67547
|
class DbRulePersistenceAdapter {
|
|
67544
67548
|
db;
|
|
67545
67549
|
constructor(db2) {
|
|
@@ -67573,7 +67577,7 @@ class DbRulePersistenceAdapter {
|
|
|
67573
67577
|
}
|
|
67574
67578
|
}
|
|
67575
67579
|
|
|
67576
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
67580
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/persistence/schema.js
|
|
67577
67581
|
var RULE_ENGINE_SCHEMA_SQL = `
|
|
67578
67582
|
CREATE TABLE IF NOT EXISTS rule_runs (
|
|
67579
67583
|
id TEXT PRIMARY KEY,
|
|
@@ -67619,10 +67623,10 @@ CREATE TABLE IF NOT EXISTS rule_eval_runs (
|
|
|
67619
67623
|
CREATE INDEX IF NOT EXISTS idx_rule_eval_runs_run_id ON rule_eval_runs (run_id);
|
|
67620
67624
|
`;
|
|
67621
67625
|
|
|
67622
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
67626
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/persistence/index.js
|
|
67623
67627
|
var init_persistence2 = () => {};
|
|
67624
67628
|
|
|
67625
|
-
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.
|
|
67629
|
+
// ../../node_modules/.bun/@gobing-ai+ts-rule-engine@0.4.62+df32fe902834add3/node_modules/@gobing-ai/ts-rule-engine/dist/index.js
|
|
67626
67630
|
var init_dist10 = __esm(() => {
|
|
67627
67631
|
init_extensions2();
|
|
67628
67632
|
init_loader2();
|
|
@@ -67757,11 +67761,13 @@ async function applyCliMigrations(adapter, migrations = CLI_MIGRATIONS) {
|
|
|
67757
67761
|
const runsStatusDoneSkip = migration.id === "0017_spur_cli_runs_status_completed_to_done" && (!await tableExists(adapter, "runs") || !await columnExists(adapter, "runs", "status"));
|
|
67758
67762
|
const historyBoardToolStatsColumnsSkip = migration.id === "0031_spur_cli_history_board_tool_stats_columns" && (!await tableExists(adapter, "history_board_tool_stats") || await columnExists(adapter, "history_board_tool_stats", "fresh_input_tokens"));
|
|
67759
67763
|
const queueJobsActiveIndexSkip = migration.id === "0027_spur_cli_history_refresh_active_unique" && !await tableExists(adapter, "queue_jobs");
|
|
67764
|
+
const queueJobsDeadlineLeaseSkip = migration.id === "0041_spur_cli_queue_jobs_deadline_lease_columns" && !await tableExists(adapter, "queue_jobs");
|
|
67760
67765
|
const historyToolIdentitySkip = migration.id === "0034_spur_cli_history_tool_identity" && !await tableExists(adapter, "history_tool_call");
|
|
67761
67766
|
const historyMeasureVectorSkip = migration.id === "0035_spur_cli_history_measure_vector" && (!await tableExists(adapter, "history_board_message_5m") || await columnExists(adapter, "history_board_message_5m", "cache_write_tokens"));
|
|
67762
67767
|
const historyRollupWatermarkSkip = migration.id === "0036_spur_cli_history_rollup_watermark" && (await tableExists(adapter, "history_board_rollup_watermark") || !await tableExists(adapter, "history_message") || !await columnExists(adapter, "history_message", "imported_at"));
|
|
67763
67768
|
const boundedRollupDerivationsSkip = migration.id === "0039_spur_cli_bounded_rollup_derivations" && (!await tableExists(adapter, "history_message") || !await columnExists(adapter, "history_message", "source_file") || !await tableExists(adapter, "history_board_source_daily"));
|
|
67764
|
-
|
|
67769
|
+
const historyModelFallbackIndexSkip = migration.id === "0042_spur_cli_history_model_fallback_index" && (!await tableExists(adapter, "history_message") || !await columnExists(adapter, "history_message", "model"));
|
|
67770
|
+
if (shouldApplySql && !sequenceIndexSkip && !argsRawSkip && !runsStatusDoneSkip && !nameOccurredIndexSkip && !historyBoardQueryIndexesSkip && !historyPerformanceIndexesSkip && !historyToolCallIndexesSkip && !historyBoardCoveringIndexesSkip && !historyBoardToolStatsColumnsSkip && !callIdSkip && !tsNullableSkip && !queueJobsActiveIndexSkip && !queueJobsDeadlineLeaseSkip && !historyToolIdentitySkip && !historyMeasureVectorSkip && !historyRollupWatermarkSkip && !boundedRollupDerivationsSkip && !historyModelFallbackIndexSkip) {
|
|
67765
67771
|
for (const statement of splitSqlStatements(migration.sql)) {
|
|
67766
67772
|
await adapter.exec(statement);
|
|
67767
67773
|
}
|
|
@@ -67969,6 +67975,10 @@ ALTER TABLE history_message ADD COLUMN request_id TEXT;
|
|
|
67969
67975
|
CREATE INDEX IF NOT EXISTS idx_history_message_request_id
|
|
67970
67976
|
ON history_message (request_id)
|
|
67971
67977
|
WHERE request_id IS NOT NULL;
|
|
67978
|
+
`, HISTORY_MESSAGE_MODEL_FALLBACK_INDEX_SCHEMA_SQL = `
|
|
67979
|
+
CREATE INDEX IF NOT EXISTS idx_history_message_session_model
|
|
67980
|
+
ON history_message (source, session_id)
|
|
67981
|
+
WHERE model IS NOT NULL AND model != '' AND model != 'unknown';
|
|
67972
67982
|
`, HISTORY_ETL_TABLES_DROP_SCHEMA_SQL = `
|
|
67973
67983
|
DROP TABLE IF EXISTS history_etl_pi;
|
|
67974
67984
|
DROP TABLE IF EXISTS history_etl_claude;
|
|
@@ -68471,6 +68481,11 @@ CREATE INDEX IF NOT EXISTS idx_history_message_source_file
|
|
|
68471
68481
|
|
|
68472
68482
|
ALTER TABLE history_board_source_daily ADD COLUMN raw_messages INTEGER NOT NULL DEFAULT 0;
|
|
68473
68483
|
ALTER TABLE history_board_source_daily ADD COLUMN last_imported_at TEXT;
|
|
68484
|
+
`, QUEUE_JOBS_DEADLINE_LEASE_COLUMNS_SCHEMA_SQL = `
|
|
68485
|
+
ALTER TABLE queue_jobs ADD COLUMN timeout_ms INTEGER;
|
|
68486
|
+
ALTER TABLE queue_jobs ADD COLUMN timeout_unlimited INTEGER NOT NULL DEFAULT 0;
|
|
68487
|
+
ALTER TABLE queue_jobs ADD COLUMN attempt_token TEXT;
|
|
68488
|
+
ALTER TABLE queue_jobs ADD COLUMN lease_expires_at INTEGER;
|
|
68474
68489
|
`, CLI_MIGRATIONS, CLI_MIGRATION_FILE_MARKER = "_spur_cli_";
|
|
68475
68490
|
var init_migrations = __esm(() => {
|
|
68476
68491
|
init_dist8();
|
|
@@ -68639,11 +68654,20 @@ ${HISTORY_TASK_SESSION_SCHEMA_SQL}
|
|
|
68639
68654
|
{
|
|
68640
68655
|
id: "0040_spur_cli_agent_executor_updates",
|
|
68641
68656
|
sql: AGENT_EXECUTOR_UPDATES_SCHEMA_SQL
|
|
68657
|
+
},
|
|
68658
|
+
{
|
|
68659
|
+
id: "0041_spur_cli_queue_jobs_deadline_lease_columns",
|
|
68660
|
+
sql: QUEUE_JOBS_DEADLINE_LEASE_COLUMNS_SCHEMA_SQL,
|
|
68661
|
+
addColumnIfMissing: { table: "queue_jobs", column: "timeout_ms" }
|
|
68662
|
+
},
|
|
68663
|
+
{
|
|
68664
|
+
id: "0042_spur_cli_history_model_fallback_index",
|
|
68665
|
+
sql: HISTORY_MESSAGE_MODEL_FALLBACK_INDEX_SCHEMA_SQL
|
|
68642
68666
|
}
|
|
68643
68667
|
];
|
|
68644
68668
|
});
|
|
68645
68669
|
|
|
68646
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
68670
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/job-queue/db-job-queue.js
|
|
68647
68671
|
function queueLogger() {
|
|
68648
68672
|
if (!_queueLogger)
|
|
68649
68673
|
_queueLogger = getLogger2("job-queue");
|
|
@@ -69046,7 +69070,7 @@ var init_db_job_queue = __esm(() => {
|
|
|
69046
69070
|
init_tracing2();
|
|
69047
69071
|
});
|
|
69048
69072
|
|
|
69049
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
69073
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/job-queue-db.js
|
|
69050
69074
|
var exports_job_queue_db = {};
|
|
69051
69075
|
__export(exports_job_queue_db, {
|
|
69052
69076
|
DBQueueConsumer: () => DBQueueConsumer,
|
|
@@ -71686,6 +71710,7 @@ __export(exports_src, {
|
|
|
71686
71710
|
resolvePricing: () => resolvePricing,
|
|
71687
71711
|
resetHistoryTables: () => resetHistoryTables,
|
|
71688
71712
|
replaceHistoryBoardRollups: () => replaceHistoryBoardRollups,
|
|
71713
|
+
repairImporterSchemaVersion: () => repairImporterSchemaVersion,
|
|
71689
71714
|
renderTaskTemplate: () => renderTaskTemplate,
|
|
71690
71715
|
renderScenarioStub: () => renderScenarioStub,
|
|
71691
71716
|
renderReport: () => renderReport,
|
|
@@ -71731,6 +71756,7 @@ __export(exports_src, {
|
|
|
71731
71756
|
loadSqlMigrations: () => loadSqlMigrations,
|
|
71732
71757
|
loadAttributionEvidence: () => loadAttributionEvidence,
|
|
71733
71758
|
listAttributionSessions: () => listAttributionSessions,
|
|
71759
|
+
latestHistoryImportedAt: () => latestHistoryImportedAt,
|
|
71734
71760
|
isTierEligible: () => isTierEligible,
|
|
71735
71761
|
isStale: () => isStale,
|
|
71736
71762
|
isCompatibleStageVersion: () => isCompatibleStageVersion,
|
|
@@ -71797,6 +71823,7 @@ __export(exports_src, {
|
|
|
71797
71823
|
deterministicExecutionSchema: () => deterministicExecutionSchema,
|
|
71798
71824
|
derivedWarnings: () => derivedWarnings,
|
|
71799
71825
|
deriveVerifiedOutcomeStat: () => deriveVerifiedOutcomeStat,
|
|
71826
|
+
deriveMissingAssistantDurations: () => deriveMissingAssistantDurations,
|
|
71800
71827
|
deriveDimensionMartsOps: () => deriveDimensionMartsOps,
|
|
71801
71828
|
deriveDimensionMarts: () => deriveDimensionMarts,
|
|
71802
71829
|
dbHealthCheck: () => dbHealthCheck,
|
|
@@ -75732,6 +75759,23 @@ function describeBoundedFailure(parts) {
|
|
|
75732
75759
|
return base2;
|
|
75733
75760
|
return `${base2}; shell chain did not complete, so later configured stages did not run ` + `and any exit_code in the tail is a subcommand result, not the chain verdict: ${outputTail}`;
|
|
75734
75761
|
}
|
|
75762
|
+
function terminateJobChildren(registry2, signal) {
|
|
75763
|
+
const signaled = [];
|
|
75764
|
+
for (const execution of registry2.listExecutions({ running: true })) {
|
|
75765
|
+
if (execution.pid === undefined)
|
|
75766
|
+
continue;
|
|
75767
|
+
try {
|
|
75768
|
+
process.kill(-execution.pid, 0);
|
|
75769
|
+
process.kill(-execution.pid, signal);
|
|
75770
|
+
} catch {
|
|
75771
|
+
try {
|
|
75772
|
+
process.kill(execution.pid, signal);
|
|
75773
|
+
} catch {}
|
|
75774
|
+
}
|
|
75775
|
+
signaled.push(execution.pid);
|
|
75776
|
+
}
|
|
75777
|
+
return signaled;
|
|
75778
|
+
}
|
|
75735
75779
|
var CHILD_KILL_GRACE_MS = 5000;
|
|
75736
75780
|
|
|
75737
75781
|
// ../../packages/app/src/services/verify-verdict.ts
|
|
@@ -84752,8 +84796,7 @@ class LiveHistoryBoardService {
|
|
|
84752
84796
|
modelComparison: compItems
|
|
84753
84797
|
};
|
|
84754
84798
|
}
|
|
84755
|
-
async
|
|
84756
|
-
const db2 = await this.resolveDb();
|
|
84799
|
+
async buildSources(db2) {
|
|
84757
84800
|
if (!db2) {
|
|
84758
84801
|
return {
|
|
84759
84802
|
overview: {
|
|
@@ -84836,6 +84879,17 @@ class LiveHistoryBoardService {
|
|
|
84836
84879
|
}));
|
|
84837
84880
|
return projectSources(Array.from(sources.values()), daily, databaseBytes2);
|
|
84838
84881
|
}
|
|
84882
|
+
async getSources() {
|
|
84883
|
+
const db2 = await this.resolveDb();
|
|
84884
|
+
const data = await this.buildSources(db2);
|
|
84885
|
+
if (!db2)
|
|
84886
|
+
return data;
|
|
84887
|
+
const lastImportedAt = await latestHistoryImportedAt(db2);
|
|
84888
|
+
return {
|
|
84889
|
+
...data,
|
|
84890
|
+
overview: { ...data.overview, lastImportedAt: lastImportedAt ?? data.overview.lastImportedAt }
|
|
84891
|
+
};
|
|
84892
|
+
}
|
|
84839
84893
|
async triggerImport(mode) {
|
|
84840
84894
|
if (!this.deps.triggerImport) {
|
|
84841
84895
|
throw new Error("History import queue is not configured");
|
|
@@ -85433,20 +85487,17 @@ function assertPiImporterSafe(input) {
|
|
|
85433
85487
|
throw new UnsafeHistoryImporterError(`refusing full pi history import \u2014 installed @gobing-ai/ts-llm-jsonl-importer version ` + `${input.importerVersion ?? "unknown"} destroys history_tool_call.args_raw on pi imports ` + `(todo-tool arguments collapse to their first line; bash commands are lost). ` + `Minimum safe version: ${MIN_SAFE_PI_BASH_IMPORTER_VERSION}. ` + `Remedy: upgrade or relink @gobing-ai/ts-libs to a release containing ts-libs commit 96762d5, ` + `or preview the import with --dry-run.`, input.importerVersion ?? "unknown");
|
|
85434
85488
|
}
|
|
85435
85489
|
async function raceSourceImport(importPromise, source, timeoutMs) {
|
|
85436
|
-
const
|
|
85437
|
-
const
|
|
85438
|
-
|
|
85439
|
-
abort.signal.addEventListener("abort", () => reject(abort.signal.reason));
|
|
85490
|
+
const signal = AbortSignal.timeout(timeoutMs);
|
|
85491
|
+
const deadline = new Promise((_, reject) => {
|
|
85492
|
+
signal.addEventListener("abort", () => reject(new Error(`source '${source}' exceeded ${timeoutMs}ms timeout`, { cause: signal.reason })), { once: true });
|
|
85440
85493
|
});
|
|
85441
85494
|
try {
|
|
85442
|
-
await Promise.race([importPromise,
|
|
85495
|
+
await Promise.race([importPromise, deadline]);
|
|
85443
85496
|
return "completed";
|
|
85444
85497
|
} catch (e) {
|
|
85445
|
-
if (
|
|
85498
|
+
if (signal.aborted)
|
|
85446
85499
|
return "timeout";
|
|
85447
85500
|
throw e;
|
|
85448
|
-
} finally {
|
|
85449
|
-
clearTimeout(timer);
|
|
85450
85501
|
}
|
|
85451
85502
|
}
|
|
85452
85503
|
async function buildRefreshCoverage(db2, selector, fanOut) {
|
|
@@ -85521,7 +85572,7 @@ class HistoryService {
|
|
|
85521
85572
|
});
|
|
85522
85573
|
}
|
|
85523
85574
|
await dao2.alignMessageProvenance();
|
|
85524
|
-
await
|
|
85575
|
+
await deriveMissingAssistantDurations(db2, DERIVED_DURATION_CEILING_MS2);
|
|
85525
85576
|
}
|
|
85526
85577
|
const attribution2 = await this.attributeSource({
|
|
85527
85578
|
source: parsedSource,
|
|
@@ -86188,7 +86239,7 @@ function pruneReports(cwd, retentionDays = REPORT_RETENTION_DAYS, now2 = new Dat
|
|
|
86188
86239
|
}
|
|
86189
86240
|
return pruned.sort((a2, b) => a2.localeCompare(b));
|
|
86190
86241
|
}
|
|
86191
|
-
var MIN_SAFE_PI_BASH_IMPORTER_VERSION = "0.4.49", UnsafeHistoryImporterError, SOURCES, FULL_FIDELITY_SOURCES, DEFERRED_SOURCES, MODES, MAX_ERROR_SAMPLES2 = 20, DEFAULT_SOURCE_TIMEOUT_MS = 600000, HISTORY_BUSY_ABORT_THRESHOLD = 2, HISTORY_BUSY_ERROR_PATTERN, REPORT_RETENTION_DAYS = 90;
|
|
86242
|
+
var MIN_SAFE_PI_BASH_IMPORTER_VERSION = "0.4.49", UnsafeHistoryImporterError, SOURCES, FULL_FIDELITY_SOURCES, DEFERRED_SOURCES, MODES, MAX_ERROR_SAMPLES2 = 20, DEFAULT_SOURCE_TIMEOUT_MS = 600000, DERIVED_DURATION_CEILING_MS2, HISTORY_BUSY_ABORT_THRESHOLD = 2, HISTORY_BUSY_ERROR_PATTERN, REPORT_RETENTION_DAYS = 90;
|
|
86192
86243
|
var init_history_service = __esm(() => {
|
|
86193
86244
|
init_src2();
|
|
86194
86245
|
init_dist6();
|
|
@@ -86222,6 +86273,7 @@ var init_history_service = __esm(() => {
|
|
|
86222
86273
|
FULL_FIDELITY_SOURCES = ["claude", "codex", "pi", "omp", "agy", "grok"];
|
|
86223
86274
|
DEFERRED_SOURCES = ["gemini", "opencode", "antigravity", "openclaw", "hermes"];
|
|
86224
86275
|
MODES = ["full", "incremental", "force-file"];
|
|
86276
|
+
DERIVED_DURATION_CEILING_MS2 = 30 * 60 * 1000;
|
|
86225
86277
|
HISTORY_BUSY_ERROR_PATTERN = /database is locked|SQLITE_BUSY/i;
|
|
86226
86278
|
});
|
|
86227
86279
|
|
|
@@ -88400,6 +88452,21 @@ var init_http_request = __esm(() => {
|
|
|
88400
88452
|
import crypto4 from "crypto";
|
|
88401
88453
|
import { tmpdir as tmpdir2 } from "os";
|
|
88402
88454
|
import { dirname as dirname15, join as join21, resolve as resolve8, sep as sep4 } from "path";
|
|
88455
|
+
function taskDocumentShapeError(content) {
|
|
88456
|
+
const doc2 = MarkdownDocument.parse(content, "task");
|
|
88457
|
+
const heading = CANONICAL_TASK_HEADING_RE.exec(doc2.bodyWithoutFrontmatter);
|
|
88458
|
+
if (heading === null) {
|
|
88459
|
+
return "no canonical task heading (`## <WBS>. <title>`) was found";
|
|
88460
|
+
}
|
|
88461
|
+
if ((heading[2] ?? "").trim() === "") {
|
|
88462
|
+
return `the canonical task heading for WBS ${heading[1]} has an empty title`;
|
|
88463
|
+
}
|
|
88464
|
+
const present = TASK_SPEC_SECTIONS.filter((section) => doc2.hasSection(section));
|
|
88465
|
+
if (present.length === 0) {
|
|
88466
|
+
return `no task specification section (${TASK_SPEC_SECTIONS.join(", ")}) was found`;
|
|
88467
|
+
}
|
|
88468
|
+
return null;
|
|
88469
|
+
}
|
|
88403
88470
|
async function readProofInputContents(fileSystem, workdir, options) {
|
|
88404
88471
|
for (const name of ["taskFile", "featureFile"]) {
|
|
88405
88472
|
const value = options[name];
|
|
@@ -88430,11 +88497,21 @@ async function readProofInputContents(fileSystem, workdir, options) {
|
|
|
88430
88497
|
if (!stat2.isFile()) {
|
|
88431
88498
|
return { error: `${name} is not a regular file: ${resolved}` };
|
|
88432
88499
|
}
|
|
88500
|
+
let content;
|
|
88433
88501
|
try {
|
|
88434
|
-
|
|
88502
|
+
content = await fileSystem.readFile(resolved);
|
|
88435
88503
|
} catch (error51) {
|
|
88436
88504
|
return { error: `${name} is not readable: ${error51.message}` };
|
|
88437
88505
|
}
|
|
88506
|
+
if (name === "taskFile") {
|
|
88507
|
+
const shapeError = taskDocumentShapeError(content);
|
|
88508
|
+
if (shapeError !== null) {
|
|
88509
|
+
return {
|
|
88510
|
+
error: `taskFile is not a task document: ${raw} (resolved ${resolved}) \u2014 ${shapeError}. ` + "Supply the task specification markdown itself: a `## <WBS>. <title>` heading plus at " + `least one of ${TASK_SPEC_SECTIONS.join(", ")}. A file containing only a path is not ` + "dereferenced."
|
|
88511
|
+
};
|
|
88512
|
+
}
|
|
88513
|
+
}
|
|
88514
|
+
return { content };
|
|
88438
88515
|
};
|
|
88439
88516
|
const task = await readOne("taskFile");
|
|
88440
88517
|
if (task.error !== undefined)
|
|
@@ -88548,7 +88625,7 @@ async function computeProofInputFingerprint(options = {}) {
|
|
|
88548
88625
|
const hash2 = crypto4.createHash("sha256").update(canonical, "utf8").digest("hex");
|
|
88549
88626
|
return `sha256:${hash2}`;
|
|
88550
88627
|
}
|
|
88551
|
-
var ProofCaptureError, DEFAULT_EXCLUDE_GLOBS, ProofInputFingerprint;
|
|
88628
|
+
var ProofCaptureError, TASK_SPEC_SECTIONS, CANONICAL_TASK_HEADING_RE, DEFAULT_EXCLUDE_GLOBS, ProofInputFingerprint;
|
|
88552
88629
|
var init_proof_input_fingerprint = __esm(() => {
|
|
88553
88630
|
init_src2();
|
|
88554
88631
|
init_dist5();
|
|
@@ -88561,6 +88638,8 @@ var init_proof_input_fingerprint = __esm(() => {
|
|
|
88561
88638
|
this.name = "ProofCaptureError";
|
|
88562
88639
|
}
|
|
88563
88640
|
};
|
|
88641
|
+
TASK_SPEC_SECTIONS = ["Background", "Requirements", "Acceptance Criteria", "Design", "Plan"];
|
|
88642
|
+
CANONICAL_TASK_HEADING_RE = /^##[ \t]+(\d+)\.[ \t]+(\S.*)$/m;
|
|
88564
88643
|
DEFAULT_EXCLUDE_GLOBS = ["docs/tasks*", "docs/features*"];
|
|
88565
88644
|
ProofInputFingerprint = {
|
|
88566
88645
|
compute: computeProofInputFingerprint
|
|
@@ -88960,7 +89039,7 @@ class RunArtifactActionRunner {
|
|
|
88960
89039
|
};
|
|
88961
89040
|
}
|
|
88962
89041
|
const db2 = await this.getDb();
|
|
88963
|
-
const runRow = await new RunDao(db2).traceRowById(context4.runId)
|
|
89042
|
+
const runRow = await new RunDao(db2).traceRowById(context4.runId);
|
|
88964
89043
|
if (runRow === undefined) {
|
|
88965
89044
|
return {
|
|
88966
89045
|
ok: false,
|
|
@@ -90695,7 +90774,7 @@ async function createOrAttachInlineRun(input) {
|
|
|
90695
90774
|
const source = { path: resolved.path, layer: resolved.layer, workdir };
|
|
90696
90775
|
const db2 = await input.getDb();
|
|
90697
90776
|
const runDao = new RunDao(db2);
|
|
90698
|
-
const existing = await runDao.traceRowById(runId)
|
|
90777
|
+
const existing = await runDao.traceRowById(runId);
|
|
90699
90778
|
if (existing !== undefined) {
|
|
90700
90779
|
const metadata = parseIdentityMetadata(existing.metadata_json);
|
|
90701
90780
|
if (metadata === null) {
|
|
@@ -96742,6 +96821,7 @@ __export(exports_src2, {
|
|
|
96742
96821
|
validateHistoryRefreshPayload: () => validateHistoryRefreshPayload,
|
|
96743
96822
|
toEnvelopeJson: () => toEnvelopeJson,
|
|
96744
96823
|
toEnvelopeError: () => toEnvelopeError,
|
|
96824
|
+
terminateJobChildren: () => terminateJobChildren,
|
|
96745
96825
|
tailTokenLedgerFile: () => tailTokenLedgerFile,
|
|
96746
96826
|
systemEventProjectContext: () => systemEventProjectContext,
|
|
96747
96827
|
systemEventCatalogEntry: () => systemEventCatalogEntry,
|
|
@@ -97171,19 +97251,19 @@ var {
|
|
|
97171
97251
|
// src/index.ts
|
|
97172
97252
|
init_loader();
|
|
97173
97253
|
|
|
97174
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
97254
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/application-node.js
|
|
97175
97255
|
init_dist4();
|
|
97176
97256
|
init_dist5();
|
|
97177
97257
|
import { appendFileSync as appendFileSync4, mkdirSync as mkdirSync3, readFileSync as readFileSync5 } from "fs";
|
|
97178
97258
|
import { dirname as dirname6 } from "path";
|
|
97179
97259
|
|
|
97180
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
97260
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/application/index.js
|
|
97181
97261
|
init_default_observers();
|
|
97182
97262
|
init_event_bus();
|
|
97183
97263
|
init_file_observer();
|
|
97184
97264
|
init_logger3();
|
|
97185
97265
|
|
|
97186
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
97266
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/scheduler/noop.js
|
|
97187
97267
|
class NoopSchedulerAdapter {
|
|
97188
97268
|
constructor() {}
|
|
97189
97269
|
register(_cron, _action) {}
|
|
@@ -97191,7 +97271,7 @@ class NoopSchedulerAdapter {
|
|
|
97191
97271
|
async stop() {}
|
|
97192
97272
|
}
|
|
97193
97273
|
|
|
97194
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
97274
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/scheduler/factory.js
|
|
97195
97275
|
function initScheduler(adapter, cronEntries) {
|
|
97196
97276
|
const resolved = adapter ?? new NoopSchedulerAdapter;
|
|
97197
97277
|
if (cronEntries) {
|
|
@@ -97202,7 +97282,7 @@ function initScheduler(adapter, cronEntries) {
|
|
|
97202
97282
|
return resolved;
|
|
97203
97283
|
}
|
|
97204
97284
|
|
|
97205
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
97285
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/application/plugins/builtins.js
|
|
97206
97286
|
init_logger3();
|
|
97207
97287
|
init_metrics();
|
|
97208
97288
|
init_sdk();
|
|
@@ -97295,7 +97375,7 @@ function dbPlugin(db2) {
|
|
|
97295
97375
|
};
|
|
97296
97376
|
}
|
|
97297
97377
|
|
|
97298
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
97378
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/application/plugins/host.js
|
|
97299
97379
|
init_logger3();
|
|
97300
97380
|
|
|
97301
97381
|
class PluginHost {
|
|
@@ -97383,7 +97463,7 @@ class PluginHost {
|
|
|
97383
97463
|
}
|
|
97384
97464
|
}
|
|
97385
97465
|
|
|
97386
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
97466
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/application/index.js
|
|
97387
97467
|
async function performShutdown(state, reason) {
|
|
97388
97468
|
if (state.stopped)
|
|
97389
97469
|
return;
|
|
@@ -97495,7 +97575,7 @@ async function runApplication(options) {
|
|
|
97495
97575
|
throw error51;
|
|
97496
97576
|
}
|
|
97497
97577
|
}
|
|
97498
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
97578
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/scheduler/cron.js
|
|
97499
97579
|
var MAX_SCAN_MINUTES = 8 * 366 * 24 * 60;
|
|
97500
97580
|
var DAYS_OF_WEEK = 7;
|
|
97501
97581
|
function parseField(raw, min, max) {
|
|
@@ -97609,7 +97689,7 @@ function nextCronTime(expr, nowMs) {
|
|
|
97609
97689
|
throw new RangeError(`unsupported cron expression "${expr.source}": no matching time within 8 years`);
|
|
97610
97690
|
}
|
|
97611
97691
|
|
|
97612
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
97692
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/scheduler/node.js
|
|
97613
97693
|
init_logger3();
|
|
97614
97694
|
init_metrics();
|
|
97615
97695
|
var MAX_TIMEOUT = 2147483647;
|
|
@@ -97763,7 +97843,7 @@ class NodeSchedulerAdapter {
|
|
|
97763
97843
|
}
|
|
97764
97844
|
}
|
|
97765
97845
|
}
|
|
97766
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
97846
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/telemetry/otel-node.js
|
|
97767
97847
|
var import_api14 = __toESM(require_src(), 1);
|
|
97768
97848
|
|
|
97769
97849
|
// ../../node_modules/.bun/@opentelemetry+exporter-metrics-otlp-http@0.218.0+e40b0dfdd726a224/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/esm/OTLPMetricExporterBase.js
|
|
@@ -100779,7 +100859,7 @@ class OTLPTraceExporter extends import_otlp_exporter_base2.OTLPExporterBase {
|
|
|
100779
100859
|
}), JsonTraceSerializer));
|
|
100780
100860
|
}
|
|
100781
100861
|
}
|
|
100782
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
100862
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/telemetry/otel-node.js
|
|
100783
100863
|
var import_resources2 = __toESM(require_src4(), 1);
|
|
100784
100864
|
var import_sdk_trace_node = __toESM(require_src8(), 1);
|
|
100785
100865
|
var import_semantic_conventions = __toESM(require_src2(), 1);
|
|
@@ -100830,7 +100910,7 @@ async function shutdownNodeTelemetry() {
|
|
|
100830
100910
|
await Promise.all(pending);
|
|
100831
100911
|
}
|
|
100832
100912
|
|
|
100833
|
-
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.
|
|
100913
|
+
// ../../node_modules/.bun/@gobing-ai+ts-infra@0.4.62+c884df390da1a1e8/node_modules/@gobing-ai/ts-infra/dist/application-node.js
|
|
100834
100914
|
class ConfigValidationError extends Error {
|
|
100835
100915
|
constructor(message) {
|
|
100836
100916
|
super(message);
|
|
@@ -106354,7 +106434,7 @@ import { createRequire } from "module";
|
|
|
106354
106434
|
var CLI_CONFIG = {
|
|
106355
106435
|
binaryName: "spur",
|
|
106356
106436
|
binaryLabel: "spur",
|
|
106357
|
-
binaryVersion: "0.3.
|
|
106437
|
+
binaryVersion: "0.3.80",
|
|
106358
106438
|
configDir: ".spur",
|
|
106359
106439
|
configFile: ".spur/config.yaml",
|
|
106360
106440
|
databaseFile: ".spur/spur.db"
|
|
@@ -118114,6 +118194,7 @@ var TASK_ACTION_JOB = "task-action";
|
|
|
118114
118194
|
var FEATURE_ACTION_JOB = "feature-action";
|
|
118115
118195
|
var SYSTEM_EVENTS_PRUNE_CRON = "300000";
|
|
118116
118196
|
var SMOKE_CRON = "600000";
|
|
118197
|
+
var JOB_WORKER_START_DELAY_MS = 30000;
|
|
118117
118198
|
var defaultDeps = {
|
|
118118
118199
|
serverBootstrapConfig,
|
|
118119
118200
|
runNodeApplication,
|
|
@@ -118179,7 +118260,7 @@ function registerSchedulerEntries(scheduler3, ctx, jobs = [], options = {}) {
|
|
|
118179
118260
|
const now3 = Date.now();
|
|
118180
118261
|
const stale = sweepThresholdMs !== null && active.status === "processing" && now3 - (active.processingAt ?? active.updatedAt) > sweepThresholdMs;
|
|
118181
118262
|
if (stale) {
|
|
118182
|
-
const reason = `
|
|
118263
|
+
const reason = `age-sweep: processing exceeded ${sweepThresholdMs}ms`;
|
|
118183
118264
|
const swept = await failStaleSchedulerCustomJob(db2, active.id, now3, reason);
|
|
118184
118265
|
if (swept) {
|
|
118185
118266
|
ctx.eventBus().emit("scheduler.job.executed", {
|
|
@@ -118369,6 +118450,8 @@ async function startServer(options, deps = defaultDeps) {
|
|
|
118369
118450
|
...spurConfig !== undefined ? { spurConfig } : {}
|
|
118370
118451
|
});
|
|
118371
118452
|
let jobWorker;
|
|
118453
|
+
let jobProcessRegistry;
|
|
118454
|
+
let jobWorkerStartTimer;
|
|
118372
118455
|
let quotaConsumer;
|
|
118373
118456
|
try {
|
|
118374
118457
|
quotaConsumer = startAgentQuotaUpdateConsumer(ctx.eventBus(), {
|
|
@@ -118435,7 +118518,10 @@ async function startServer(options, deps = defaultDeps) {
|
|
|
118435
118518
|
}
|
|
118436
118519
|
const app = deps.createApp(appRt, { fs: fs3, ctx });
|
|
118437
118520
|
const schedulerCustomTimeoutMs = resolveSchedulerCustomTimeoutMs(env);
|
|
118438
|
-
|
|
118521
|
+
const startJobQueueWorker = async () => {
|
|
118522
|
+
if (jobWorker !== undefined)
|
|
118523
|
+
return;
|
|
118524
|
+
jobProcessRegistry = createInMemoryProcessRegistry2();
|
|
118439
118525
|
const registry2 = new JobHandlerRegistry;
|
|
118440
118526
|
const retentionQuotas = resolveRetentionQuotas(bootConfig.events.retention);
|
|
118441
118527
|
registry2.register(SYSTEM_EVENTS_PRUNE_JOB, async () => {
|
|
@@ -118445,7 +118531,7 @@ async function startServer(options, deps = defaultDeps) {
|
|
|
118445
118531
|
registry2.register(SMOKE_JOB, async () => {});
|
|
118446
118532
|
registry2.register(TASK_ACTION_JOB, (payload) => handleTaskActionJob(ctx, env, payload));
|
|
118447
118533
|
registry2.register(FEATURE_ACTION_JOB, (payload) => handleFeatureActionJob(ctx, env, payload));
|
|
118448
|
-
const childExecutor = new NodeProcessExecutor3;
|
|
118534
|
+
const childExecutor = new NodeProcessExecutor3({ registry: jobProcessRegistry });
|
|
118449
118535
|
registry2.register(HISTORY_REFRESH_JOB, async (job) => {
|
|
118450
118536
|
await emitQueueJobStarted(ctx, job);
|
|
118451
118537
|
return handleHistoryRefreshJob({
|
|
@@ -118477,7 +118563,7 @@ async function startServer(options, deps = defaultDeps) {
|
|
|
118477
118563
|
});
|
|
118478
118564
|
await jobWorker.start();
|
|
118479
118565
|
appRt.logger.info("Job worker started");
|
|
118480
|
-
}
|
|
118566
|
+
};
|
|
118481
118567
|
if (scheduler3) {
|
|
118482
118568
|
registerSchedulerEntries(scheduler3, ctx, appRt.config.scheduler.jobs, {
|
|
118483
118569
|
timeoutMs: schedulerCustomTimeoutMs,
|
|
@@ -118498,6 +118584,15 @@ async function startServer(options, deps = defaultDeps) {
|
|
|
118498
118584
|
} catch (err) {
|
|
118499
118585
|
appRt.logger.warn("Failed to register project in ProjectRegistry", { error: String(err) });
|
|
118500
118586
|
}
|
|
118587
|
+
if (bootConfig.jobqueue.enabled) {
|
|
118588
|
+
jobWorkerStartTimer = setTimeout(() => {
|
|
118589
|
+
jobWorkerStartTimer = undefined;
|
|
118590
|
+
startJobQueueWorker().catch((error51) => {
|
|
118591
|
+
appRt.logger.error("Job worker startup failed", { error: String(error51) });
|
|
118592
|
+
});
|
|
118593
|
+
}, options.jobWorkerStartDelayMs ?? JOB_WORKER_START_DELAY_MS);
|
|
118594
|
+
jobWorkerStartTimer.unref?.();
|
|
118595
|
+
}
|
|
118501
118596
|
let shuttingDown = false;
|
|
118502
118597
|
const onSigInt = () => {
|
|
118503
118598
|
shutdown("SIGINT");
|
|
@@ -118512,6 +118607,13 @@ async function startServer(options, deps = defaultDeps) {
|
|
|
118512
118607
|
process.off("SIGINT", onSigInt);
|
|
118513
118608
|
process.off("SIGTERM", onSigTerm);
|
|
118514
118609
|
appRt.logger.info("Shutting down server", { signal });
|
|
118610
|
+
if (jobWorkerStartTimer) {
|
|
118611
|
+
clearTimeout(jobWorkerStartTimer);
|
|
118612
|
+
jobWorkerStartTimer = undefined;
|
|
118613
|
+
}
|
|
118614
|
+
if (jobProcessRegistry) {
|
|
118615
|
+
terminateJobChildren(jobProcessRegistry, "SIGTERM");
|
|
118616
|
+
}
|
|
118515
118617
|
if (quotaConsumer) {
|
|
118516
118618
|
try {
|
|
118517
118619
|
await quotaConsumer.stop();
|
|
@@ -118533,6 +118635,9 @@ async function startServer(options, deps = defaultDeps) {
|
|
|
118533
118635
|
}
|
|
118534
118636
|
server.stop(true);
|
|
118535
118637
|
await appRt.stop("shutdown");
|
|
118638
|
+
if (jobProcessRegistry) {
|
|
118639
|
+
terminateJobChildren(jobProcessRegistry, "SIGKILL");
|
|
118640
|
+
}
|
|
118536
118641
|
process.exit(0);
|
|
118537
118642
|
};
|
|
118538
118643
|
process.on("SIGINT", onSigInt);
|
|
@@ -123556,11 +123661,11 @@ async function main(argv = process.argv.slice(2), options = {}) {
|
|
|
123556
123661
|
let exitCode = 0;
|
|
123557
123662
|
const cwd = options.cwd ?? process.cwd();
|
|
123558
123663
|
const env = options.env ?? process.env;
|
|
123559
|
-
const configFile = resolveConfigFile(cwd);
|
|
123664
|
+
const configFile = resolveConfigFile(options.cwd);
|
|
123560
123665
|
const db2 = options.db ?? await createMigratedDbAdapter(cwd, env, options.dbUrl);
|
|
123561
123666
|
let spurConfig;
|
|
123562
123667
|
try {
|
|
123563
|
-
spurConfig = await loadSpurConfig(cwd, { embeddedSchemas: EMBEDDED_SPUR_SCHEMAS });
|
|
123668
|
+
spurConfig = await loadSpurConfig(options.cwd, { embeddedSchemas: EMBEDDED_SPUR_SCHEMAS });
|
|
123564
123669
|
} catch (err) {
|
|
123565
123670
|
const message = errorMessage4(err);
|
|
123566
123671
|
if (argv.includes("--json")) {
|