@probelabs/visor 0.1.171 → 0.1.172
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-protocol/task-store.d.ts +8 -0
- package/dist/agent-protocol/task-store.d.ts.map +1 -1
- package/dist/agent-protocol/tasks-cli-handler.d.ts.map +1 -1
- package/dist/cli-main.d.ts.map +1 -1
- package/dist/index.js +195 -78
- package/dist/output/traces/{run-2026-03-08T07-55-35-120Z.ndjson → run-2026-03-08T09-27-25-067Z.ndjson} +84 -84
- package/dist/{traces/run-2026-03-08T07-56-13-035Z.ndjson → output/traces/run-2026-03-08T09-28-01-928Z.ndjson} +1823 -1823
- package/dist/sdk/{a2a-frontend-FGJ3UBHX.mjs → a2a-frontend-HA6R7QL4.mjs} +37 -2
- package/dist/sdk/a2a-frontend-HA6R7QL4.mjs.map +1 -0
- package/dist/sdk/{a2a-frontend-GUEGI5SX.mjs → a2a-frontend-N4VU3PHW.mjs} +36 -1
- package/dist/sdk/a2a-frontend-N4VU3PHW.mjs.map +1 -0
- package/dist/sdk/{check-provider-registry-YTI4PU5F.mjs → check-provider-registry-4KW2YPZW.mjs} +3 -3
- package/dist/sdk/{check-provider-registry-PVTV5G5R.mjs → check-provider-registry-L5GRGTWU.mjs} +6 -6
- package/dist/sdk/{check-provider-registry-ZUU7KSKR.mjs → check-provider-registry-NGUCQSPB.mjs} +3 -3
- package/dist/sdk/{chunk-XUQSI5SR.mjs → chunk-3L3BLPQL.mjs} +16 -16
- package/dist/sdk/{chunk-AJK3FAA2.mjs → chunk-6IIHIW3R.mjs} +3 -3
- package/dist/sdk/{chunk-CXA3WUOB.mjs → chunk-CNZ7XHLN.mjs} +9 -9
- package/dist/sdk/{chunk-2VDUNKIP.mjs → chunk-I6SWNG25.mjs} +9 -9
- package/dist/sdk/{chunk-6FDBLSGV.mjs → chunk-NG5RNXCG.mjs} +2 -2
- package/dist/sdk/{chunk-AVMMKGLQ.mjs → chunk-PDQTEBOJ.mjs} +18 -18
- package/dist/sdk/chunk-PDQTEBOJ.mjs.map +1 -0
- package/dist/sdk/{chunk-O72J3ORS.mjs → chunk-PGUCWPJE.mjs} +2 -2
- package/dist/sdk/{chunk-O72J3ORS.mjs.map → chunk-PGUCWPJE.mjs.map} +1 -1
- package/dist/sdk/{failure-condition-evaluator-EFMCQVAK.mjs → failure-condition-evaluator-IUQI7HVE.mjs} +3 -3
- package/dist/sdk/{github-frontend-XG55VJ4R.mjs → github-frontend-PRN6AWXM.mjs} +3 -3
- package/dist/sdk/{host-A7UNRBQU.mjs → host-DOJQVREK.mjs} +3 -3
- package/dist/sdk/{host-A4GGQVEN.mjs → host-M4GD22QC.mjs} +4 -4
- package/dist/sdk/{routing-BVEHVZHK.mjs → routing-HT2LBFRB.mjs} +4 -4
- package/dist/sdk/{schedule-tool-PHSF5U2B.mjs → schedule-tool-CHMAKVEA.mjs} +6 -6
- package/dist/sdk/{schedule-tool-DGVJDHJM.mjs → schedule-tool-HCJUIF4H.mjs} +3 -3
- package/dist/sdk/{schedule-tool-4MTFIHCA.mjs → schedule-tool-RTEUHQOP.mjs} +3 -3
- package/dist/sdk/{schedule-tool-handler-EFNCZNS7.mjs → schedule-tool-handler-33C475LK.mjs} +6 -6
- package/dist/sdk/{schedule-tool-handler-LMXQ4BZQ.mjs → schedule-tool-handler-DCMMLWLB.mjs} +3 -3
- package/dist/sdk/{schedule-tool-handler-XLCSBU3E.mjs → schedule-tool-handler-RGHQBSKM.mjs} +3 -3
- package/dist/sdk/sdk.js +53 -18
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +5 -5
- package/dist/sdk/{slack-frontend-QO7LW5BH.mjs → slack-frontend-7T5UISCX.mjs} +2 -2
- package/dist/sdk/{trace-helpers-P5L4COO4.mjs → trace-helpers-4YEMDGXY.mjs} +2 -2
- package/dist/sdk/{workflow-check-provider-KQNLEQEY.mjs → workflow-check-provider-6QSKKY5D.mjs} +3 -3
- package/dist/sdk/{workflow-check-provider-WLMTCFRA.mjs → workflow-check-provider-BEQXAM7O.mjs} +6 -6
- package/dist/sdk/{workflow-check-provider-X5EMAJUZ.mjs → workflow-check-provider-O2SIH3PC.mjs} +3 -3
- package/dist/slack/markdown.d.ts.map +1 -1
- package/dist/traces/{run-2026-03-08T07-55-35-120Z.ndjson → run-2026-03-08T09-27-25-067Z.ndjson} +84 -84
- package/dist/{output/traces/run-2026-03-08T07-56-13-035Z.ndjson → traces/run-2026-03-08T09-28-01-928Z.ndjson} +1823 -1823
- package/package.json +1 -1
- package/dist/sdk/a2a-frontend-FGJ3UBHX.mjs.map +0 -1
- package/dist/sdk/a2a-frontend-GUEGI5SX.mjs.map +0 -1
- package/dist/sdk/chunk-AVMMKGLQ.mjs.map +0 -1
- /package/dist/sdk/{check-provider-registry-PVTV5G5R.mjs.map → check-provider-registry-4KW2YPZW.mjs.map} +0 -0
- /package/dist/sdk/{check-provider-registry-YTI4PU5F.mjs.map → check-provider-registry-L5GRGTWU.mjs.map} +0 -0
- /package/dist/sdk/{check-provider-registry-ZUU7KSKR.mjs.map → check-provider-registry-NGUCQSPB.mjs.map} +0 -0
- /package/dist/sdk/{chunk-2VDUNKIP.mjs.map → chunk-3L3BLPQL.mjs.map} +0 -0
- /package/dist/sdk/{chunk-AJK3FAA2.mjs.map → chunk-6IIHIW3R.mjs.map} +0 -0
- /package/dist/sdk/{chunk-CXA3WUOB.mjs.map → chunk-CNZ7XHLN.mjs.map} +0 -0
- /package/dist/sdk/{chunk-XUQSI5SR.mjs.map → chunk-I6SWNG25.mjs.map} +0 -0
- /package/dist/sdk/{chunk-6FDBLSGV.mjs.map → chunk-NG5RNXCG.mjs.map} +0 -0
- /package/dist/sdk/{failure-condition-evaluator-EFMCQVAK.mjs.map → failure-condition-evaluator-IUQI7HVE.mjs.map} +0 -0
- /package/dist/sdk/{github-frontend-XG55VJ4R.mjs.map → github-frontend-PRN6AWXM.mjs.map} +0 -0
- /package/dist/sdk/{host-A4GGQVEN.mjs.map → host-DOJQVREK.mjs.map} +0 -0
- /package/dist/sdk/{host-A7UNRBQU.mjs.map → host-M4GD22QC.mjs.map} +0 -0
- /package/dist/sdk/{routing-BVEHVZHK.mjs.map → routing-HT2LBFRB.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-4MTFIHCA.mjs.map → schedule-tool-CHMAKVEA.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-DGVJDHJM.mjs.map → schedule-tool-HCJUIF4H.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-PHSF5U2B.mjs.map → schedule-tool-RTEUHQOP.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-EFNCZNS7.mjs.map → schedule-tool-handler-33C475LK.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-LMXQ4BZQ.mjs.map → schedule-tool-handler-DCMMLWLB.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-XLCSBU3E.mjs.map → schedule-tool-handler-RGHQBSKM.mjs.map} +0 -0
- /package/dist/sdk/{slack-frontend-QO7LW5BH.mjs.map → slack-frontend-7T5UISCX.mjs.map} +0 -0
- /package/dist/sdk/{trace-helpers-P5L4COO4.mjs.map → trace-helpers-4YEMDGXY.mjs.map} +0 -0
- /package/dist/sdk/{workflow-check-provider-KQNLEQEY.mjs.map → workflow-check-provider-6QSKKY5D.mjs.map} +0 -0
- /package/dist/sdk/{workflow-check-provider-WLMTCFRA.mjs.map → workflow-check-provider-BEQXAM7O.mjs.map} +0 -0
- /package/dist/sdk/{workflow-check-provider-X5EMAJUZ.mjs.map → workflow-check-provider-O2SIH3PC.mjs.map} +0 -0
|
@@ -17,6 +17,8 @@ export interface ListTasksFilter {
|
|
|
17
17
|
contextId?: string;
|
|
18
18
|
state?: TaskState[];
|
|
19
19
|
workflowId?: string;
|
|
20
|
+
search?: string;
|
|
21
|
+
claimedBy?: string;
|
|
20
22
|
limit?: number;
|
|
21
23
|
offset?: number;
|
|
22
24
|
}
|
|
@@ -58,6 +60,10 @@ export interface TaskStore {
|
|
|
58
60
|
rows: TaskQueueRow[];
|
|
59
61
|
total: number;
|
|
60
62
|
};
|
|
63
|
+
/** Mark all 'working' tasks as 'failed' (crash recovery on startup). */
|
|
64
|
+
failStaleTasks(reason?: string): number;
|
|
65
|
+
/** Delete completed/failed/canceled tasks older than the given age. */
|
|
66
|
+
purgeOldTasks(olderThanMs: number): number;
|
|
61
67
|
deleteExpiredTasks(): string[];
|
|
62
68
|
deleteTask(taskId: string): void;
|
|
63
69
|
}
|
|
@@ -87,6 +93,8 @@ export declare class SqliteTaskStore implements TaskStore {
|
|
|
87
93
|
claimNextSubmitted(workerId: string): AgentTask | null;
|
|
88
94
|
reclaimStaleTasks(_workerId: string, staleTimeoutMs?: number): AgentTask[];
|
|
89
95
|
releaseClaim(taskId: string): void;
|
|
96
|
+
failStaleTasks(reason?: string): number;
|
|
97
|
+
purgeOldTasks(olderThanMs: number): number;
|
|
90
98
|
deleteExpiredTasks(): string[];
|
|
91
99
|
deleteTask(taskId: string): void;
|
|
92
100
|
private resolveContextId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-store.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/agent-protocol/task-store.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EACL,SAAS,EACT,YAAY,EACZ,aAAa,EACb,sBAAsB,EACtB,SAAS,EAGV,MAAM,SAAS,CAAC;AAgFjB,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,YAAY,CAAC;IAC7B,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,MAAM,C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S,GAAG,IAAI;IAyBtD,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE;IAqB1E,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAalC,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM;IAmBvC,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;IAa1C,kBAAkB,IAAI,MAAM,EAAE;IAkB9B,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAShC,OAAO,CAAC,gBAAgB;CAezB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks-cli-handler.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/agent-protocol/tasks-cli-handler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tasks-cli-handler.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/agent-protocol/tasks-cli-handler.ts"],"names":[],"mappings":"AA+gBA,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA0CtE"}
|
package/dist/cli-main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/cli-main.ts"],"names":[],"mappings":"AA6zBA;;GAEG;AACH,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/cli-main.ts"],"names":[],"mappings":"AA6zBA;;GAEG;AACH,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CA4lD1C"}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
process.env.VISOR_VERSION = '0.1.
|
|
2
|
+
process.env.VISOR_VERSION = '0.1.172';
|
|
3
3
|
process.env.PROBE_VERSION = '0.6.0-rc290';
|
|
4
|
-
process.env.VISOR_COMMIT_SHA = '
|
|
5
|
-
process.env.VISOR_COMMIT_SHORT = '
|
|
4
|
+
process.env.VISOR_COMMIT_SHA = 'eb6383c71ff3acd3d32816d705c29ca297eadddd';
|
|
5
|
+
process.env.VISOR_COMMIT_SHORT = 'eb6383c71';
|
|
6
6
|
/******/ (() => { // webpackBootstrap
|
|
7
7
|
/******/ var __webpack_modules__ = ({
|
|
8
8
|
|
|
@@ -168069,6 +168069,16 @@ class SqliteTaskStore {
|
|
|
168069
168069
|
conditions.push('workflow_id = ?');
|
|
168070
168070
|
params.push(filter.workflowId);
|
|
168071
168071
|
}
|
|
168072
|
+
if (filter.search) {
|
|
168073
|
+
// Escape SQL LIKE wildcards to prevent wildcard injection
|
|
168074
|
+
const escaped = filter.search.replace(/[%_\\]/g, '\\$&');
|
|
168075
|
+
conditions.push("request_message LIKE ? ESCAPE '\\'");
|
|
168076
|
+
params.push(`%${escaped}%`);
|
|
168077
|
+
}
|
|
168078
|
+
if (filter.claimedBy) {
|
|
168079
|
+
conditions.push('claimed_by = ?');
|
|
168080
|
+
params.push(filter.claimedBy);
|
|
168081
|
+
}
|
|
168072
168082
|
const where = conditions.length > 0 ? `WHERE ${conditions.join(' AND ')}` : '';
|
|
168073
168083
|
return { where, params };
|
|
168074
168084
|
}
|
|
@@ -168227,6 +168237,32 @@ class SqliteTaskStore {
|
|
|
168227
168237
|
// -------------------------------------------------------------------------
|
|
168228
168238
|
// Cleanup
|
|
168229
168239
|
// -------------------------------------------------------------------------
|
|
168240
|
+
failStaleTasks(reason) {
|
|
168241
|
+
const db = this.getDb();
|
|
168242
|
+
const now = nowISO();
|
|
168243
|
+
const msg = reason || 'Process terminated while task was running';
|
|
168244
|
+
const statusMessage = JSON.stringify({
|
|
168245
|
+
message_id: crypto_1.default.randomUUID(),
|
|
168246
|
+
role: 'agent',
|
|
168247
|
+
parts: [{ text: msg }],
|
|
168248
|
+
});
|
|
168249
|
+
const result = db
|
|
168250
|
+
.prepare(`UPDATE agent_tasks
|
|
168251
|
+
SET state = 'failed', updated_at = ?, status_message = ?
|
|
168252
|
+
WHERE state = 'working'`)
|
|
168253
|
+
.run(now, statusMessage);
|
|
168254
|
+
return result.changes;
|
|
168255
|
+
}
|
|
168256
|
+
purgeOldTasks(olderThanMs) {
|
|
168257
|
+
const db = this.getDb();
|
|
168258
|
+
const cutoff = new Date(Date.now() - olderThanMs).toISOString();
|
|
168259
|
+
const result = db
|
|
168260
|
+
.prepare(`DELETE FROM agent_tasks
|
|
168261
|
+
WHERE state IN ('completed', 'failed', 'canceled', 'rejected')
|
|
168262
|
+
AND updated_at <= ?`)
|
|
168263
|
+
.run(cutoff);
|
|
168264
|
+
return result.changes;
|
|
168265
|
+
}
|
|
168230
168266
|
deleteExpiredTasks() {
|
|
168231
168267
|
const db = this.getDb();
|
|
168232
168268
|
const now = nowISO();
|
|
@@ -168393,10 +168429,13 @@ exports.TaskStreamManager = TaskStreamManager;
|
|
|
168393
168429
|
/***/ }),
|
|
168394
168430
|
|
|
168395
168431
|
/***/ 5932:
|
|
168396
|
-
/***/ ((__unused_webpack_module, exports, __nccwpck_require__)
|
|
168432
|
+
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
168397
168433
|
|
|
168398
168434
|
"use strict";
|
|
168399
168435
|
|
|
168436
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
168437
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
168438
|
+
};
|
|
168400
168439
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
168401
168440
|
exports.handleTasksCommand = handleTasksCommand;
|
|
168402
168441
|
/**
|
|
@@ -168409,6 +168448,7 @@ exports.handleTasksCommand = handleTasksCommand;
|
|
|
168409
168448
|
* visor tasks cancel <task-id> - Cancel a task
|
|
168410
168449
|
* visor tasks help - Show usage
|
|
168411
168450
|
*/
|
|
168451
|
+
const cli_table3_1 = __importDefault(__nccwpck_require__(25832));
|
|
168412
168452
|
const logger_1 = __nccwpck_require__(86999);
|
|
168413
168453
|
const instance_id_1 = __nccwpck_require__(89942);
|
|
168414
168454
|
const task_store_1 = __nccwpck_require__(24711);
|
|
@@ -168478,9 +168518,19 @@ function buildFilter(flags) {
|
|
|
168478
168518
|
if (typeof flags.state === 'string' && (0, state_transitions_1.isValidTaskState)(flags.state)) {
|
|
168479
168519
|
filter.state = [flags.state];
|
|
168480
168520
|
}
|
|
168521
|
+
else if (!flags.all) {
|
|
168522
|
+
// Default: show only active tasks (not completed history)
|
|
168523
|
+
filter.state = ['submitted', 'working', 'input_required', 'auth_required'];
|
|
168524
|
+
}
|
|
168481
168525
|
if (typeof flags.agent === 'string') {
|
|
168482
168526
|
filter.workflowId = flags.agent;
|
|
168483
168527
|
}
|
|
168528
|
+
if (typeof flags.search === 'string') {
|
|
168529
|
+
filter.search = flags.search;
|
|
168530
|
+
}
|
|
168531
|
+
if (typeof flags.instance === 'string') {
|
|
168532
|
+
filter.claimedBy = flags.instance;
|
|
168533
|
+
}
|
|
168484
168534
|
if (typeof flags.limit === 'string') {
|
|
168485
168535
|
const n = parseInt(flags.limit, 10);
|
|
168486
168536
|
if (!isNaN(n) && n > 0)
|
|
@@ -168504,30 +168554,59 @@ function formatMeta(meta) {
|
|
|
168504
168554
|
parts.push(`sched:${meta.schedule_id}`);
|
|
168505
168555
|
return parts.join(' ') || '-';
|
|
168506
168556
|
}
|
|
168557
|
+
function stateColor(state) {
|
|
168558
|
+
switch (state) {
|
|
168559
|
+
case 'working':
|
|
168560
|
+
return '\x1b[33m' + state + '\x1b[0m'; // yellow
|
|
168561
|
+
case 'completed':
|
|
168562
|
+
return '\x1b[32m' + state + '\x1b[0m'; // green
|
|
168563
|
+
case 'failed':
|
|
168564
|
+
return '\x1b[31m' + state + '\x1b[0m'; // red
|
|
168565
|
+
case 'canceled':
|
|
168566
|
+
case 'rejected':
|
|
168567
|
+
return '\x1b[90m' + state + '\x1b[0m'; // grey
|
|
168568
|
+
case 'submitted':
|
|
168569
|
+
return '\x1b[36m' + state + '\x1b[0m'; // cyan
|
|
168570
|
+
case 'input_required':
|
|
168571
|
+
case 'auth_required':
|
|
168572
|
+
return '\x1b[35m' + state + '\x1b[0m'; // magenta
|
|
168573
|
+
default:
|
|
168574
|
+
return state;
|
|
168575
|
+
}
|
|
168576
|
+
}
|
|
168507
168577
|
function formatTable(rows, total) {
|
|
168508
168578
|
if (rows.length === 0)
|
|
168509
168579
|
return 'No tasks found.';
|
|
168510
|
-
const
|
|
168511
|
-
|
|
168580
|
+
const table = new cli_table3_1.default({
|
|
168581
|
+
head: ['ID', 'Source', 'State', 'Workflow', 'Duration', 'Instance', 'Meta', 'Input'],
|
|
168582
|
+
style: {
|
|
168583
|
+
head: ['cyan', 'bold'],
|
|
168584
|
+
border: ['grey'],
|
|
168585
|
+
},
|
|
168586
|
+
wordWrap: false,
|
|
168587
|
+
});
|
|
168588
|
+
for (const r of rows) {
|
|
168512
168589
|
const duration = (0, state_transitions_1.isTerminalState)(r.state)
|
|
168513
168590
|
? formatDuration(r.created_at, r.updated_at)
|
|
168514
168591
|
: formatDuration(r.claimed_at || r.created_at);
|
|
168515
|
-
const instance = r.claimed_by || '-';
|
|
168516
|
-
const workflow = r.workflow_id || '-';
|
|
168517
|
-
const source = r.source || '-';
|
|
168518
|
-
const meta = formatMeta(r.metadata);
|
|
168519
168592
|
const input = r.request_message.length > 60
|
|
168520
168593
|
? r.request_message.slice(0, 57) + '...'
|
|
168521
168594
|
: r.request_message || '-';
|
|
168522
|
-
|
|
168523
|
-
|
|
168524
|
-
|
|
168525
|
-
|
|
168526
|
-
|
|
168527
|
-
|
|
168595
|
+
table.push([
|
|
168596
|
+
r.id.slice(0, 8),
|
|
168597
|
+
r.source || '-',
|
|
168598
|
+
stateColor(r.state),
|
|
168599
|
+
r.workflow_id || '-',
|
|
168600
|
+
duration,
|
|
168601
|
+
r.claimed_by || '-',
|
|
168602
|
+
formatMeta(r.metadata),
|
|
168603
|
+
input,
|
|
168604
|
+
]);
|
|
168605
|
+
}
|
|
168606
|
+
let output = table.toString();
|
|
168528
168607
|
if (total > rows.length)
|
|
168529
|
-
|
|
168530
|
-
return
|
|
168608
|
+
output += `\n(${total} total, showing ${rows.length})`;
|
|
168609
|
+
return output;
|
|
168531
168610
|
}
|
|
168532
168611
|
function formatMarkdown(rows, total) {
|
|
168533
168612
|
if (rows.length === 0)
|
|
@@ -168565,15 +168644,16 @@ async function handleList(flags) {
|
|
|
168565
168644
|
const render = async () => {
|
|
168566
168645
|
await withTaskStore(async (store) => {
|
|
168567
168646
|
const { rows, total } = store.listTasksRaw(filter);
|
|
168647
|
+
const activeOnly = !flags.all && !flags.state;
|
|
168568
168648
|
if (output === 'json') {
|
|
168569
|
-
console.log(JSON.stringify({ instance_id: instanceId, tasks: rows, total }, null, 2));
|
|
168649
|
+
console.log(JSON.stringify({ instance_id: instanceId, active_only: activeOnly, tasks: rows, total }, null, 2));
|
|
168570
168650
|
}
|
|
168571
168651
|
else if (output === 'markdown') {
|
|
168572
|
-
console.log(`Instance: ${instanceId}\n`);
|
|
168652
|
+
console.log(`Instance: ${instanceId}${activeOnly ? ' (active tasks only, use --all for history)' : ''}\n`);
|
|
168573
168653
|
console.log(formatMarkdown(rows, total));
|
|
168574
168654
|
}
|
|
168575
168655
|
else {
|
|
168576
|
-
console.log(`Instance: ${instanceId}\n`);
|
|
168656
|
+
console.log(`Instance: ${instanceId}${activeOnly ? ' (active tasks only, use --all for history)' : ''}\n`);
|
|
168577
168657
|
console.log(formatTable(rows, total));
|
|
168578
168658
|
}
|
|
168579
168659
|
});
|
|
@@ -168644,25 +168724,40 @@ async function handleStats(flags) {
|
|
|
168644
168724
|
}, null, 2));
|
|
168645
168725
|
return;
|
|
168646
168726
|
}
|
|
168647
|
-
|
|
168648
|
-
|
|
168727
|
+
const stateTable = new cli_table3_1.default({
|
|
168728
|
+
head: ['State', 'Count'],
|
|
168729
|
+
style: { head: ['cyan', 'bold'], border: ['grey'] },
|
|
168730
|
+
});
|
|
168649
168731
|
for (const [state, count] of Object.entries(stateCounts)) {
|
|
168650
168732
|
if (count > 0)
|
|
168651
|
-
|
|
168733
|
+
stateTable.push([stateColor(state), String(count)]);
|
|
168652
168734
|
}
|
|
168735
|
+
console.log('Task State Summary');
|
|
168736
|
+
console.log(stateTable.toString());
|
|
168653
168737
|
if (Object.keys(agentCounts).length > 0) {
|
|
168654
|
-
|
|
168655
|
-
|
|
168738
|
+
const agentTable = new cli_table3_1.default({
|
|
168739
|
+
head: ['Workflow', 'Active Tasks'],
|
|
168740
|
+
style: { head: ['cyan', 'bold'], border: ['grey'] },
|
|
168741
|
+
});
|
|
168656
168742
|
for (const [agent, count] of Object.entries(agentCounts)) {
|
|
168657
|
-
|
|
168743
|
+
agentTable.push([agent, String(count)]);
|
|
168658
168744
|
}
|
|
168745
|
+
console.log('\nActive Tasks by Workflow');
|
|
168746
|
+
console.log(agentTable.toString());
|
|
168659
168747
|
}
|
|
168660
|
-
console.log(`\nActive
|
|
168748
|
+
console.log(`\nActive instances: ${workerSet.size}`);
|
|
168661
168749
|
});
|
|
168662
168750
|
}
|
|
168663
168751
|
// ---------------------------------------------------------------------------
|
|
168664
168752
|
// Subcommand: cancel
|
|
168665
168753
|
// ---------------------------------------------------------------------------
|
|
168754
|
+
/**
|
|
168755
|
+
* Find a task by full ID or prefix match.
|
|
168756
|
+
*/
|
|
168757
|
+
function findTaskByPrefix(store, prefix) {
|
|
168758
|
+
const { rows } = store.listTasksRaw({ limit: 500 });
|
|
168759
|
+
return rows.find(r => r.id === prefix || r.id.startsWith(prefix)) ?? null;
|
|
168760
|
+
}
|
|
168666
168761
|
async function handleCancel(positional, _flags) {
|
|
168667
168762
|
const taskId = positional[0];
|
|
168668
168763
|
if (!taskId) {
|
|
@@ -168671,19 +168766,19 @@ async function handleCancel(positional, _flags) {
|
|
|
168671
168766
|
return;
|
|
168672
168767
|
}
|
|
168673
168768
|
await withTaskStore(async (store) => {
|
|
168674
|
-
const
|
|
168675
|
-
if (!
|
|
168769
|
+
const match = findTaskByPrefix(store, taskId);
|
|
168770
|
+
if (!match) {
|
|
168676
168771
|
console.error(`Task not found: ${taskId}`);
|
|
168677
168772
|
process.exitCode = 1;
|
|
168678
168773
|
return;
|
|
168679
168774
|
}
|
|
168680
|
-
if ((0, state_transitions_1.isTerminalState)(
|
|
168681
|
-
console.error(`Cannot cancel task in '${
|
|
168775
|
+
if ((0, state_transitions_1.isTerminalState)(match.state)) {
|
|
168776
|
+
console.error(`Cannot cancel task in '${match.state}' state (already terminal)`);
|
|
168682
168777
|
process.exitCode = 1;
|
|
168683
168778
|
return;
|
|
168684
168779
|
}
|
|
168685
|
-
store.updateTaskState(
|
|
168686
|
-
console.log(`Task ${
|
|
168780
|
+
store.updateTaskState(match.id, 'canceled');
|
|
168781
|
+
console.log(`Task ${match.id.slice(0, 8)} canceled (was: ${match.state})`);
|
|
168687
168782
|
});
|
|
168688
168783
|
}
|
|
168689
168784
|
// ---------------------------------------------------------------------------
|
|
@@ -168698,9 +168793,7 @@ async function handleShow(positional, flags) {
|
|
|
168698
168793
|
}
|
|
168699
168794
|
const output = typeof flags.output === 'string' ? flags.output : 'table';
|
|
168700
168795
|
await withTaskStore(async (store) => {
|
|
168701
|
-
|
|
168702
|
-
const { rows } = store.listTasksRaw({ limit: 200 });
|
|
168703
|
-
const match = rows.find(r => r.id.startsWith(taskId));
|
|
168796
|
+
const match = findTaskByPrefix(store, taskId);
|
|
168704
168797
|
if (!match) {
|
|
168705
168798
|
console.error(`Task not found: ${taskId}`);
|
|
168706
168799
|
process.exitCode = 1;
|
|
@@ -168713,26 +168806,40 @@ async function handleShow(positional, flags) {
|
|
|
168713
168806
|
const duration = (0, state_transitions_1.isTerminalState)(match.state)
|
|
168714
168807
|
? formatDuration(match.created_at, match.updated_at)
|
|
168715
168808
|
: formatDuration(match.claimed_at || match.created_at);
|
|
168716
|
-
|
|
168717
|
-
|
|
168718
|
-
|
|
168719
|
-
|
|
168720
|
-
|
|
168721
|
-
console.log(`Duration: ${duration}`);
|
|
168722
|
-
console.log(`Created: ${match.created_at}`);
|
|
168723
|
-
console.log(`Updated: ${match.updated_at}`);
|
|
168809
|
+
const detailTable = new cli_table3_1.default({
|
|
168810
|
+
style: { head: ['cyan', 'bold'], border: ['grey'] },
|
|
168811
|
+
wordWrap: false,
|
|
168812
|
+
});
|
|
168813
|
+
detailTable.push({ 'Task ID': match.id }, { State: stateColor(match.state) }, { Source: match.source }, { Workflow: match.workflow_id || '-' }, { Instance: match.claimed_by || '-' }, { Duration: duration }, { Created: match.created_at }, { Updated: match.updated_at });
|
|
168724
168814
|
if (match.run_id)
|
|
168725
|
-
|
|
168726
|
-
|
|
168815
|
+
detailTable.push({ 'Run ID': match.run_id });
|
|
168816
|
+
detailTable.push({ Input: match.request_message });
|
|
168727
168817
|
// Show metadata
|
|
168728
168818
|
const meta = match.metadata;
|
|
168729
168819
|
const metaKeys = Object.keys(meta).filter(k => k !== 'source');
|
|
168730
|
-
|
|
168731
|
-
|
|
168732
|
-
for (const key of metaKeys) {
|
|
168733
|
-
console.log(` ${key}: ${JSON.stringify(meta[key])}`);
|
|
168734
|
-
}
|
|
168820
|
+
for (const key of metaKeys) {
|
|
168821
|
+
detailTable.push({ [key]: String(meta[key]) });
|
|
168735
168822
|
}
|
|
168823
|
+
console.log(detailTable.toString());
|
|
168824
|
+
});
|
|
168825
|
+
}
|
|
168826
|
+
// ---------------------------------------------------------------------------
|
|
168827
|
+
// Subcommand: purge
|
|
168828
|
+
// ---------------------------------------------------------------------------
|
|
168829
|
+
async function handlePurge(flags) {
|
|
168830
|
+
const ageStr = typeof flags.age === 'string' ? flags.age : '7d';
|
|
168831
|
+
const match = ageStr.match(/^(\d+)([hdm])$/);
|
|
168832
|
+
if (!match) {
|
|
168833
|
+
console.error('Invalid --age format. Use e.g. 24h, 7d, 30d');
|
|
168834
|
+
process.exitCode = 1;
|
|
168835
|
+
return;
|
|
168836
|
+
}
|
|
168837
|
+
const value = parseInt(match[1], 10);
|
|
168838
|
+
const unit = match[2];
|
|
168839
|
+
const ms = unit === 'h' ? value * 3600_000 : unit === 'd' ? value * 86400_000 : value * 2592000_000;
|
|
168840
|
+
await withTaskStore(async (store) => {
|
|
168841
|
+
const deleted = store.purgeOldTasks(ms);
|
|
168842
|
+
console.log(`Purged ${deleted} terminal task(s) older than ${ageStr}.`);
|
|
168736
168843
|
});
|
|
168737
168844
|
}
|
|
168738
168845
|
// ---------------------------------------------------------------------------
|
|
@@ -168746,28 +168853,33 @@ USAGE:
|
|
|
168746
168853
|
visor tasks [command] [options]
|
|
168747
168854
|
|
|
168748
168855
|
COMMANDS:
|
|
168749
|
-
list List tasks (default)
|
|
168856
|
+
list List active tasks (default)
|
|
168750
168857
|
show <task-id> Show task details (supports prefix match)
|
|
168751
168858
|
stats Queue summary statistics
|
|
168752
168859
|
cancel <task-id> Cancel a task
|
|
168860
|
+
purge [--age 7d] Delete old completed/failed tasks
|
|
168753
168861
|
help Show this help
|
|
168754
168862
|
|
|
168755
168863
|
OPTIONS:
|
|
168756
|
-
--
|
|
168864
|
+
--all Show all tasks including completed/failed history
|
|
168757
168865
|
--state <state> Filter by state: submitted, working, completed, failed, canceled
|
|
168866
|
+
--search <text> Search tasks by input text
|
|
168867
|
+
--instance <id> Filter by visor instance ID
|
|
168758
168868
|
--agent <workflow-id> Filter by agent/workflow
|
|
168759
168869
|
--limit <n> Number of tasks to show (default: 20)
|
|
168870
|
+
--output <format> Output format: table (default), json, markdown
|
|
168760
168871
|
--watch Refresh every 2 seconds
|
|
168761
168872
|
|
|
168762
168873
|
EXAMPLES:
|
|
168763
|
-
visor tasks List
|
|
168874
|
+
visor tasks List active tasks only
|
|
168875
|
+
visor tasks --all List all tasks including history
|
|
168876
|
+
visor tasks --state failed Show failed tasks
|
|
168877
|
+
visor tasks --search "auth" Search tasks by text
|
|
168764
168878
|
visor tasks show abc123 Show full task details
|
|
168765
|
-
visor tasks list --state working Show only working tasks
|
|
168766
|
-
visor tasks list --agent security-review Show tasks for a specific agent
|
|
168767
|
-
visor tasks list --output json JSON output
|
|
168768
168879
|
visor tasks list --watch Live monitoring
|
|
168769
168880
|
visor tasks stats Show queue statistics
|
|
168770
168881
|
visor tasks cancel abc123 Cancel a task
|
|
168882
|
+
visor tasks purge --age 30d Delete tasks older than 30 days
|
|
168771
168883
|
`);
|
|
168772
168884
|
}
|
|
168773
168885
|
// ---------------------------------------------------------------------------
|
|
@@ -168794,6 +168906,9 @@ async function handleTasksCommand(argv) {
|
|
|
168794
168906
|
case 'cancel':
|
|
168795
168907
|
await handleCancel(positional, flags);
|
|
168796
168908
|
break;
|
|
168909
|
+
case 'purge':
|
|
168910
|
+
await handlePurge(flags);
|
|
168911
|
+
break;
|
|
168797
168912
|
case 'help':
|
|
168798
168913
|
printHelp();
|
|
168799
168914
|
break;
|
|
@@ -172806,6 +172921,11 @@ async function main() {
|
|
|
172806
172921
|
const { SqliteTaskStore } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(24711)));
|
|
172807
172922
|
sharedTaskStore = new SqliteTaskStore();
|
|
172808
172923
|
await sharedTaskStore.initialize();
|
|
172924
|
+
// Recover stale tasks from previous crashed runs
|
|
172925
|
+
const recovered = sharedTaskStore.failStaleTasks('Process terminated unexpectedly');
|
|
172926
|
+
if (recovered > 0) {
|
|
172927
|
+
logger_1.logger.info(`[TaskTracking] Recovered ${recovered} stale working task(s) → failed`);
|
|
172928
|
+
}
|
|
172809
172929
|
logger_1.logger.info('[TaskTracking] Shared task store initialized');
|
|
172810
172930
|
}
|
|
172811
172931
|
catch (err) {
|
|
@@ -209266,32 +209386,28 @@ function replaceMermaidBlocks(text, diagrams, replacement = '_(See diagram above
|
|
|
209266
209386
|
function markdownToSlack(text) {
|
|
209267
209387
|
if (!text || typeof text !== 'string')
|
|
209268
209388
|
return '';
|
|
209269
|
-
|
|
209270
|
-
|
|
209271
|
-
// We intentionally keep only the URL + alt text; Slack will usually unfurl.
|
|
209272
|
-
out = out.replace(/!\[([^\]]*)\]\(([^)\s]+)(?:\s+"[^"]*")?\)/g, (_m, alt, url) => `<${url}|${alt || 'image'}>`);
|
|
209273
|
-
// Links: [label](url) → <url|label>
|
|
209274
|
-
out = out.replace(/\[([^\]]+)\]\(([^)\s]+)(?:\s+"[^"]*")?\)/g, (_m, label, url) => `<${url}|${label}>`);
|
|
209275
|
-
// Bold: **text** or __text__ → *text*
|
|
209276
|
-
out = out.replace(/\*\*([^*]+)\*\*/g, (_m, inner) => `*${inner}*`);
|
|
209277
|
-
out = out.replace(/__([^_]+)__/g, (_m, inner) => `*${inner}*`);
|
|
209278
|
-
// Process lines for headers and bullet lists.
|
|
209279
|
-
// Slack's mrkdwn handles "•" bullets more naturally than raw "-" Markdown.
|
|
209280
|
-
const lines = out.split(/\r?\n/);
|
|
209389
|
+
// Process line-by-line so ALL transformations respect code blocks.
|
|
209390
|
+
const lines = text.split(/\r?\n/);
|
|
209281
209391
|
let inCodeBlock = false;
|
|
209282
209392
|
for (let i = 0; i < lines.length; i++) {
|
|
209283
|
-
const
|
|
209284
|
-
|
|
209285
|
-
// Track fenced code blocks and avoid rewriting inside them
|
|
209393
|
+
const trimmed = lines[i].trimStart();
|
|
209394
|
+
// Track fenced code blocks — skip all transformations inside them
|
|
209286
209395
|
if (/^```/.test(trimmed)) {
|
|
209287
209396
|
inCodeBlock = !inCodeBlock;
|
|
209288
209397
|
continue;
|
|
209289
209398
|
}
|
|
209290
209399
|
if (inCodeBlock)
|
|
209291
209400
|
continue;
|
|
209401
|
+
let line = lines[i];
|
|
209402
|
+
// Images:  → <url|alt>
|
|
209403
|
+
line = line.replace(/!\[([^\]]*)\]\(([^)\s]+)(?:\s+"[^"]*")?\)/g, (_m, alt, url) => `<${url}|${alt || 'image'}>`);
|
|
209404
|
+
// Links: [label](url) → <url|label>
|
|
209405
|
+
line = line.replace(/\[([^\]]+)\]\(([^)\s]+)(?:\s+"[^"]*")?\)/g, (_m, label, url) => `<${url}|${label}>`);
|
|
209406
|
+
// Bold: **text** or __text__ → *text*
|
|
209407
|
+
line = line.replace(/\*\*([^*]+)\*\*/g, (_m, inner) => `*${inner}*`);
|
|
209408
|
+
line = line.replace(/__([^_]+)__/g, (_m, inner) => `*${inner}*`);
|
|
209292
209409
|
// Headers: # Header → *Header* (Slack doesn't have native headers)
|
|
209293
|
-
|
|
209294
|
-
const headerMatch = /^(#{1,6})\s+(.+)$/.exec(trimmed);
|
|
209410
|
+
const headerMatch = /^(#{1,6})\s+(.+)$/.exec(line.trimStart());
|
|
209295
209411
|
if (headerMatch) {
|
|
209296
209412
|
const [, hashes, headerText] = headerMatch;
|
|
209297
209413
|
// For h1/h2, add extra emphasis with newline before (if not first line
|
|
@@ -209311,10 +209427,11 @@ function markdownToSlack(text) {
|
|
|
209311
209427
|
if (bulletMatch) {
|
|
209312
209428
|
const [, indent, , rest] = bulletMatch;
|
|
209313
209429
|
lines[i] = `${indent}• ${rest}`;
|
|
209430
|
+
continue;
|
|
209314
209431
|
}
|
|
209432
|
+
lines[i] = line;
|
|
209315
209433
|
}
|
|
209316
|
-
|
|
209317
|
-
return out;
|
|
209434
|
+
return lines.join('\n');
|
|
209318
209435
|
}
|
|
209319
209436
|
/**
|
|
209320
209437
|
* Extract all file sections delimited by --- filename.ext --- from text.
|
|
@@ -398651,7 +398768,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"100":"Continue","101":"Switching Pro
|
|
|
398651
398768
|
/***/ ((module) => {
|
|
398652
398769
|
|
|
398653
398770
|
"use strict";
|
|
398654
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@probelabs/visor","version":"0.1.
|
|
398771
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@probelabs/visor","version":"0.1.172","main":"dist/index.js","bin":{"visor":"./dist/index.js"},"exports":{".":{"require":"./dist/index.js","import":"./dist/index.js"},"./sdk":{"types":"./dist/sdk/sdk.d.ts","import":"./dist/sdk/sdk.mjs","require":"./dist/sdk/sdk.js"},"./cli":{"require":"./dist/index.js"}},"files":["dist/","defaults/","action.yml","README.md","LICENSE"],"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build:cli":"ncc build src/index.ts -o dist && cp -r defaults dist/ && cp -r output dist/ && cp -r docs dist/ && cp -r examples dist/ && cp -r src/debug-visualizer/ui dist/debug-visualizer/ && node scripts/inject-version.js && echo \'#!/usr/bin/env node\' | cat - dist/index.js > temp && mv temp dist/index.js && chmod +x dist/index.js","build:sdk":"tsup src/sdk.ts --dts --sourcemap --format esm,cjs --out-dir dist/sdk","build":"./scripts/build-oss.sh","build:ee":"npm run build:cli && npm run build:sdk","test":"jest && npm run test:yaml","test:unit":"jest","prepublishOnly":"npm run build","test:watch":"jest --watch","test:coverage":"jest --coverage","test:ee":"jest --testPathPatterns=\'tests/ee\' --testPathIgnorePatterns=\'/node_modules/\' --no-coverage","test:manual:bash":"RUN_MANUAL_TESTS=true jest tests/manual/bash-config-manual.test.ts","lint":"eslint src tests --ext .ts","lint:fix":"eslint src tests --ext .ts --fix","format":"prettier --write src tests","format:check":"prettier --check src tests","clean":"","clean:traces":"node scripts/clean-traces.js","prebuild":"npm run clean && node scripts/generate-config-schema.js","pretest":"npm run clean:traces && node scripts/generate-config-schema.js && npm run build:cli","pretest:unit":"npm run clean:traces && node scripts/generate-config-schema.js && npm run build:cli","test:with-build":"npm run build:cli && jest","test:yaml":"node dist/index.js test --progress compact","test:yaml:parallel":"node dist/index.js test --progress compact --max-parallel 4","prepare":"husky","pre-commit":"lint-staged","deploy:site":"cd site && npx wrangler pages deploy . --project-name=visor-site --commit-dirty=true","deploy:worker":"npx wrangler deploy","deploy":"npm run deploy:site && npm run deploy:worker","publish:ee":"./scripts/publish-ee.sh","release":"./scripts/release.sh","release:patch":"./scripts/release.sh patch","release:minor":"./scripts/release.sh minor","release:major":"./scripts/release.sh major","release:prerelease":"./scripts/release.sh prerelease","docs:validate":"node scripts/validate-readme-links.js","workshop:setup":"npm install -D reveal-md@6.1.2","workshop:serve":"cd workshop && reveal-md slides.md -w","workshop:export":"reveal-md workshop/slides.md --static workshop/build","workshop:pdf":"reveal-md workshop/slides.md --print workshop/Visor-Workshop.pdf --print-size letter","workshop:pdf:ci":"reveal-md workshop/slides.md --print workshop/Visor-Workshop.pdf --print-size letter --puppeteer-launch-args=\\"--no-sandbox --disable-dev-shm-usage\\"","workshop:pdf:a4":"reveal-md workshop/slides.md --print workshop/Visor-Workshop-A4.pdf --print-size A4","workshop:build":"npm run workshop:export && npm run workshop:pdf","simulate:issue":"TS_NODE_TRANSPILE_ONLY=1 ts-node scripts/simulate-gh-run.ts --event issues --action opened --debug","simulate:comment":"TS_NODE_TRANSPILE_ONLY=1 ts-node scripts/simulate-gh-run.ts --event issue_comment --action created --debug"},"keywords":["code-review","ai","github-action","cli","pr-review","visor"],"author":"Probe Labs","license":"MIT","description":"AI workflow engine for code review, assistants, and automation — orchestrate checks, MCP tools, and AI providers with YAML-driven pipelines","repository":{"type":"git","url":"git+https://github.com/probelabs/visor.git"},"bugs":{"url":"https://github.com/probelabs/visor/issues"},"homepage":"https://github.com/probelabs/visor#readme","dependencies":{"@actions/core":"^1.11.1","@apidevtools/swagger-parser":"^12.1.0","@modelcontextprotocol/sdk":"^1.25.3","@nyariv/sandboxjs":"github:probelabs/SandboxJS#f1c13b8eee98734a8ea024061eada4aa9a9ff2e9","@octokit/action":"^8.0.2","@octokit/auth-app":"^8.1.0","@octokit/core":"^7.0.3","@octokit/rest":"^22.0.0","@opentelemetry/api":"^1.9.0","@opentelemetry/core":"^1.30.1","@opentelemetry/exporter-trace-otlp-grpc":"^0.203.0","@opentelemetry/exporter-trace-otlp-http":"^0.203.0","@opentelemetry/instrumentation":"^0.203.0","@opentelemetry/resources":"^1.30.1","@opentelemetry/sdk-metrics":"^1.30.1","@opentelemetry/sdk-node":"^0.203.0","@opentelemetry/sdk-trace-base":"^1.30.1","@opentelemetry/semantic-conventions":"^1.30.1","@probelabs/probe":"^0.6.0-rc290","@types/commander":"^2.12.0","@types/uuid":"^10.0.0","acorn":"^8.16.0","acorn-walk":"^8.3.5","ajv":"^8.17.1","ajv-formats":"^3.0.1","better-sqlite3":"^11.0.0","blessed":"^0.1.81","cli-table3":"^0.6.5","commander":"^14.0.0","deepmerge":"^4.3.1","dotenv":"^17.2.3","ignore":"^7.0.5","js-yaml":"^4.1.0","jsonpath-plus":"^10.4.0","liquidjs":"^10.21.1","minimatch":"^10.2.2","node-cron":"^3.0.3","open":"^9.1.0","simple-git":"^3.28.0","uuid":"^11.1.0","ws":"^8.18.3"},"optionalDependencies":{"@anthropic/claude-code-sdk":"npm:null@*","@open-policy-agent/opa-wasm":"^1.10.0","knex":"^3.1.0","mysql2":"^3.11.0","pg":"^8.13.0","tedious":"^19.0.0"},"devDependencies":{"@eslint/js":"^9.34.0","@kie/act-js":"^2.6.2","@kie/mock-github":"^2.0.1","@swc/core":"^1.13.2","@swc/jest":"^0.2.37","@types/better-sqlite3":"^7.6.0","@types/blessed":"^0.1.27","@types/jest":"^30.0.0","@types/js-yaml":"^4.0.9","@types/node":"^24.3.0","@types/node-cron":"^3.0.11","@types/ws":"^8.18.1","@typescript-eslint/eslint-plugin":"^8.42.0","@typescript-eslint/parser":"^8.42.0","@vercel/ncc":"^0.38.4","eslint":"^9.34.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","husky":"^9.1.7","jest":"^30.1.3","lint-staged":"^16.1.6","prettier":"^3.6.2","reveal-md":"^6.1.2","ts-json-schema-generator":"^1.5.1","ts-node":"^10.9.2","tsup":"^8.5.0","typescript":"^5.9.2","wrangler":"^3.0.0"},"peerDependenciesMeta":{"@anthropic/claude-code-sdk":{"optional":true}},"directories":{"test":"tests"},"lint-staged":{"src/**/*.{ts,js}":["eslint --fix","prettier --write"],"tests/**/*.{ts,js}":["eslint --fix","prettier --write"],"*.{json,md,yml,yaml}":["prettier --write"]}}');
|
|
398655
398772
|
|
|
398656
398773
|
/***/ })
|
|
398657
398774
|
|