@rulemetric/cli 0.2.3 → 0.2.4
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/{chunk-IGXX624H.js → chunk-3IU7GFXS.js} +2 -2
- package/dist/{chunk-AULP2OWH.js → chunk-3LHLSY7V.js} +6 -6
- package/dist/{chunk-7FAA3YNB.js → chunk-4A7FKR2O.js} +1 -1
- package/dist/{chunk-7FAA3YNB.js.map → chunk-4A7FKR2O.js.map} +2 -2
- package/dist/{chunk-GQCISMAH.js → chunk-B3HILODD.js} +5 -5
- package/dist/{chunk-XPUEGHXN.js → chunk-EHABPBGH.js} +4 -4
- package/dist/{chunk-4WFE4PFP.js → chunk-ELL34R3K.js} +3 -3
- package/dist/{chunk-B5KNTGMJ.js → chunk-ISDA2QFX.js} +1 -1
- package/dist/chunk-JFDWKLQC.js +23 -0
- package/dist/chunk-JFDWKLQC.js.map +7 -0
- package/dist/{chunk-WFULKPEQ.js → chunk-JM6BQSRE.js} +12 -12
- package/dist/{chunk-RJ7BHDLM.js → chunk-PDURR7O3.js} +2 -2
- package/dist/{chunk-EOOP6WTC.js → chunk-PIOVE3TN.js} +2 -2
- package/dist/{chunk-R5MFHGHR.js → chunk-RDIH4AG2.js} +2 -2
- package/dist/commands/crons/list.js +3 -13
- package/dist/commands/crons/list.js.map +2 -2
- package/dist/commands/crons/run.js +16 -14
- package/dist/commands/crons/run.js.map +2 -2
- package/dist/commands/evals/agent.js +18 -18
- package/dist/commands/hooks/install.js +1 -1
- package/dist/commands/suggestions/accept.js +3 -3
- package/dist/commands/suggestions/dismiss.js +3 -3
- package/dist/dashboard/Dashboard.js +3 -3
- package/dist/dashboard/data.js +2 -2
- package/dist/{dist-CSUYFYKI.js → dist-I6BCOLNG.js} +2 -2
- package/dist/lib/agent-loop.js +17 -17
- package/dist/lib/handlers/process-announcement.js +3 -3
- package/dist/lib/handlers/process-changelog.js +2 -2
- package/dist/lib/handlers/process-insights.js +2 -2
- package/dist/lib/handlers/process-launch.js +3 -3
- package/dist/lib/handlers/process-run-cleanup.js +4 -4
- package/dist/lib/handlers/process-session-goal.js +2 -2
- package/dist/lib/manual-tasks-meta.js +8 -0
- package/dist/lib/manual-tasks-meta.js.map +7 -0
- package/dist/lib/manual-tasks.js +64 -7
- package/dist/lib/manual-tasks.js.map +3 -3
- package/dist/lib/worktree.js +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +6 -6
- package/dist/chunk-DU73QUS3.js +0 -75
- package/dist/chunk-DU73QUS3.js.map +0 -7
- /package/dist/{chunk-IGXX624H.js.map → chunk-3IU7GFXS.js.map} +0 -0
- /package/dist/{chunk-AULP2OWH.js.map → chunk-3LHLSY7V.js.map} +0 -0
- /package/dist/{chunk-GQCISMAH.js.map → chunk-B3HILODD.js.map} +0 -0
- /package/dist/{chunk-XPUEGHXN.js.map → chunk-EHABPBGH.js.map} +0 -0
- /package/dist/{chunk-4WFE4PFP.js.map → chunk-ELL34R3K.js.map} +0 -0
- /package/dist/{chunk-B5KNTGMJ.js.map → chunk-ISDA2QFX.js.map} +0 -0
- /package/dist/{chunk-WFULKPEQ.js.map → chunk-JM6BQSRE.js.map} +0 -0
- /package/dist/{chunk-RJ7BHDLM.js.map → chunk-PDURR7O3.js.map} +0 -0
- /package/dist/{chunk-EOOP6WTC.js.map → chunk-PIOVE3TN.js.map} +0 -0
- /package/dist/{chunk-R5MFHGHR.js.map → chunk-RDIH4AG2.js.map} +0 -0
- /package/dist/{dist-CSUYFYKI.js.map → dist-I6BCOLNG.js.map} +0 -0
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PermanentJobError
|
|
3
|
-
} from "./chunk-DGHWRQXL.js";
|
|
4
1
|
import {
|
|
5
2
|
sendEmail
|
|
6
3
|
} from "./chunk-NIDLJO6F.js";
|
|
@@ -10,7 +7,10 @@ import {
|
|
|
10
7
|
getDb,
|
|
11
8
|
notificationPreferences,
|
|
12
9
|
profiles
|
|
13
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4A7FKR2O.js";
|
|
11
|
+
import {
|
|
12
|
+
PermanentJobError
|
|
13
|
+
} from "./chunk-DGHWRQXL.js";
|
|
14
14
|
|
|
15
15
|
// src/lib/handlers/process-announcement.ts
|
|
16
16
|
import { and, asc, eq, gt, isNotNull } from "drizzle-orm";
|
|
@@ -154,4 +154,4 @@ async function sendOne(args) {
|
|
|
154
154
|
export {
|
|
155
155
|
processAnnouncement
|
|
156
156
|
};
|
|
157
|
-
//# sourceMappingURL=chunk-
|
|
157
|
+
//# sourceMappingURL=chunk-B3HILODD.js.map
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
FACET_GENERATION_PROMPT,
|
|
4
4
|
RECOMMENDATION_PROMPTS
|
|
5
5
|
} from "./chunk-XZXS2W24.js";
|
|
6
|
-
import {
|
|
7
|
-
PermanentJobError
|
|
8
|
-
} from "./chunk-DGHWRQXL.js";
|
|
9
6
|
import {
|
|
10
7
|
detectLlmBackend,
|
|
11
8
|
runLlmPrompt,
|
|
12
9
|
runToolPrompt
|
|
13
10
|
} from "./chunk-FZKLLNDS.js";
|
|
11
|
+
import {
|
|
12
|
+
PermanentJobError
|
|
13
|
+
} from "./chunk-DGHWRQXL.js";
|
|
14
14
|
import {
|
|
15
15
|
apiGet,
|
|
16
16
|
apiPatch,
|
|
@@ -240,4 +240,4 @@ async function buildDataSummaryFromApi(projectPath, projectId) {
|
|
|
240
240
|
export {
|
|
241
241
|
processInsights
|
|
242
242
|
};
|
|
243
|
-
//# sourceMappingURL=chunk-
|
|
243
|
+
//# sourceMappingURL=chunk-EHABPBGH.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureWorktree
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PIOVE3TN.js";
|
|
4
4
|
import {
|
|
5
5
|
PermanentJobError
|
|
6
6
|
} from "./chunk-DGHWRQXL.js";
|
|
@@ -39,7 +39,7 @@ async function processLaunch(payload, helpers) {
|
|
|
39
39
|
log(`Worktree resolved: ${config.projectPath} (branch ${config.gitBranch})`);
|
|
40
40
|
}
|
|
41
41
|
log(`Launching ${tool}...`);
|
|
42
|
-
const { getLauncher } = await import("./dist-
|
|
42
|
+
const { getLauncher } = await import("./dist-I6BCOLNG.js");
|
|
43
43
|
const launcher = getLauncher(tool);
|
|
44
44
|
const launcherResult = await launcher.launch(config);
|
|
45
45
|
log(`Launch completed: sessionId=${launcherResult.sessionId}`);
|
|
@@ -58,4 +58,4 @@ export {
|
|
|
58
58
|
resolveWorktreeForLaunch,
|
|
59
59
|
processLaunch
|
|
60
60
|
};
|
|
61
|
-
//# sourceMappingURL=chunk-
|
|
61
|
+
//# sourceMappingURL=chunk-ELL34R3K.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/lib/manual-tasks-meta.ts
|
|
2
|
+
var MANUAL_TASK_META = [
|
|
3
|
+
{
|
|
4
|
+
name: "cron_check_changelog",
|
|
5
|
+
description: "Parse CHANGELOG.md and create draft announcement rows for new versions.",
|
|
6
|
+
scheduledBy: "manual only \u2014 announcement drafts are reminder-driven, never scheduled"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
name: "cron_suggest_instructions",
|
|
10
|
+
description: "Precompute per-project instruction suggestions for the SessionStart hook.",
|
|
11
|
+
scheduledBy: "Supabase pg_cron daily 04:30 UTC \u2192 agent_jobs \u2192 agent loop (migration 00083)"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: "cron_refresh_skills",
|
|
15
|
+
description: "Refresh the skills registry from GitHub sources (disk JSON + public instructions sync). Requires GITHUB_TOKEN.",
|
|
16
|
+
scheduledBy: "Supabase pg_cron daily 03:30 UTC \u2192 agent_jobs \u2192 agent loop (migration 00086)"
|
|
17
|
+
}
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
MANUAL_TASK_META
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=chunk-JFDWKLQC.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/lib/manual-tasks-meta.ts"],
|
|
4
|
+
"sourcesContent": ["// Pure, dependency-free metadata for the manual maintenance tasks.\n//\n// `crons list` imports ONLY this file, so listing tasks never pulls the heavy\n// worker handlers \u2014 and their `@rulemetric/db` -> `postgres` / OpenTelemetry /\n// Sentry dependencies \u2014 into the command's bundle chunk. With esbuild\n// `splitting: true`, a single shared chunk reachable from any statically-imported\n// module is loaded eagerly; keeping the handlers out of the static graph is what\n// stops a standalone `npm i -g @rulemetric/cli` install from crashing at\n// module-load with `Cannot find package 'postgres'`.\n//\n// The executable handlers + `runManualTask` live in `manual-tasks.ts`, which\n// `crons/run.ts` lazy-imports only when a task is actually executed.\n\nexport interface ManualTaskMeta {\n /** Task name, kept identical to the old cron names so muscle memory works. */\n name: string;\n /** One-line human description shown by `rulemetric crons list`. */\n description: string;\n /** Where the scheduled firing lives now (shown by `crons list`). */\n scheduledBy: string;\n}\n\nexport const MANUAL_TASK_META: readonly ManualTaskMeta[] = [\n {\n name: 'cron_check_changelog',\n description: 'Parse CHANGELOG.md and create draft announcement rows for new versions.',\n scheduledBy: 'manual only \u2014 announcement drafts are reminder-driven, never scheduled',\n },\n {\n name: 'cron_suggest_instructions',\n description: 'Precompute per-project instruction suggestions for the SessionStart hook.',\n scheduledBy: 'Supabase pg_cron daily 04:30 UTC \u2192 agent_jobs \u2192 agent loop (migration 00083)',\n },\n {\n name: 'cron_refresh_skills',\n description:\n 'Refresh the skills registry from GitHub sources (disk JSON + public instructions sync). Requires GITHUB_TOKEN.',\n scheduledBy: 'Supabase pg_cron daily 03:30 UTC \u2192 agent_jobs \u2192 agent loop (migration 00086)',\n },\n];\n"],
|
|
5
|
+
"mappings": ";AAsBO,IAAM,mBAA8C;AAAA,EACvD;AAAA,IACI,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,EACjB;AAAA,EACA;AAAA,IACI,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,EACjB;AAAA,EACA;AAAA,IACI,MAAM;AAAA,IACN,aACI;AAAA,IACJ,aAAa;AAAA,EACjB;AACJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -3,22 +3,28 @@ import {
|
|
|
3
3
|
} from "./chunk-JX5UI6RW.js";
|
|
4
4
|
import {
|
|
5
5
|
processInsights
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EHABPBGH.js";
|
|
7
7
|
import {
|
|
8
8
|
processLaunch
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ELL34R3K.js";
|
|
10
10
|
import {
|
|
11
11
|
processRunCleanup
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3LHLSY7V.js";
|
|
13
13
|
import {
|
|
14
14
|
processSendMessage
|
|
15
15
|
} from "./chunk-W53GKIZQ.js";
|
|
16
16
|
import {
|
|
17
17
|
processSessionGoal
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3IU7GFXS.js";
|
|
19
|
+
import {
|
|
20
|
+
cronRefreshSkills
|
|
21
|
+
} from "./chunk-RQ2TMLKG.js";
|
|
22
|
+
import {
|
|
23
|
+
cronSuggestInstructions
|
|
24
|
+
} from "./chunk-YBNW7ARH.js";
|
|
19
25
|
import {
|
|
20
26
|
processAnnouncement
|
|
21
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-B3HILODD.js";
|
|
22
28
|
import {
|
|
23
29
|
processConversation
|
|
24
30
|
} from "./chunk-BD7CY42U.js";
|
|
@@ -28,12 +34,6 @@ import {
|
|
|
28
34
|
import {
|
|
29
35
|
isPermanentJobError
|
|
30
36
|
} from "./chunk-DGHWRQXL.js";
|
|
31
|
-
import {
|
|
32
|
-
cronRefreshSkills
|
|
33
|
-
} from "./chunk-RQ2TMLKG.js";
|
|
34
|
-
import {
|
|
35
|
-
cronSuggestInstructions
|
|
36
|
-
} from "./chunk-YBNW7ARH.js";
|
|
37
37
|
import {
|
|
38
38
|
ApiError,
|
|
39
39
|
apiGet,
|
|
@@ -266,4 +266,4 @@ export {
|
|
|
266
266
|
pollForWork,
|
|
267
267
|
runAgentLoop
|
|
268
268
|
};
|
|
269
|
-
//# sourceMappingURL=chunk-
|
|
269
|
+
//# sourceMappingURL=chunk-JM6BQSRE.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClaudeCodeAdapter,
|
|
3
3
|
discoverAllSessions
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ISDA2QFX.js";
|
|
5
5
|
|
|
6
6
|
// src/dashboard/data.ts
|
|
7
7
|
import * as fs from "node:fs";
|
|
@@ -118,4 +118,4 @@ export {
|
|
|
118
118
|
loadApiInsights,
|
|
119
119
|
loadLinkedInstructions
|
|
120
120
|
};
|
|
121
|
-
//# sourceMappingURL=chunk-
|
|
121
|
+
//# sourceMappingURL=chunk-PDURR7O3.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
worktreePathFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ISDA2QFX.js";
|
|
4
4
|
import {
|
|
5
5
|
tmuxSpawnEnv
|
|
6
6
|
} from "./chunk-KRBQLMOP.js";
|
|
@@ -145,4 +145,4 @@ export {
|
|
|
145
145
|
ensureWorktree,
|
|
146
146
|
removeWorktree
|
|
147
147
|
};
|
|
148
|
-
//# sourceMappingURL=chunk-
|
|
148
|
+
//# sourceMappingURL=chunk-PIOVE3TN.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
announcements,
|
|
10
10
|
getDb
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4A7FKR2O.js";
|
|
12
12
|
|
|
13
13
|
// src/lib/handlers/process-changelog.ts
|
|
14
14
|
import * as fs from "node:fs/promises";
|
|
@@ -119,4 +119,4 @@ async function processChangelog(deps = {}) {
|
|
|
119
119
|
export {
|
|
120
120
|
processChangelog
|
|
121
121
|
};
|
|
122
|
-
//# sourceMappingURL=chunk-
|
|
122
|
+
//# sourceMappingURL=chunk-RDIH4AG2.js.map
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-R5MFHGHR.js";
|
|
5
|
-
import "../../chunk-RQ2TMLKG.js";
|
|
6
|
-
import "../../chunk-YBNW7ARH.js";
|
|
7
|
-
import "../../chunk-FZKLLNDS.js";
|
|
8
|
-
import "../../chunk-K3BFZ7KG.js";
|
|
9
|
-
import "../../chunk-NIDLJO6F.js";
|
|
10
|
-
import "../../chunk-7FAA3YNB.js";
|
|
11
|
-
import "../../chunk-EKP32DLN.js";
|
|
12
|
-
import "../../chunk-OQSQC7VB.js";
|
|
13
|
-
import "../../chunk-KRBQLMOP.js";
|
|
2
|
+
MANUAL_TASK_META
|
|
3
|
+
} from "../../chunk-JFDWKLQC.js";
|
|
14
4
|
import {
|
|
15
5
|
BaseCommand
|
|
16
6
|
} from "../../chunk-S56LOTGQ.js";
|
|
@@ -31,7 +21,7 @@ var CronsList = class _CronsList extends BaseCommand {
|
|
|
31
21
|
async run() {
|
|
32
22
|
await this.parse(_CronsList);
|
|
33
23
|
printTable({
|
|
34
|
-
data:
|
|
24
|
+
data: MANUAL_TASK_META.map((t) => ({
|
|
35
25
|
Name: t.name,
|
|
36
26
|
"Scheduled by": t.scheduledBy,
|
|
37
27
|
Description: t.description
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/commands/crons/list.ts"],
|
|
4
|
-
"sourcesContent": ["import { printTable } from '@oclif/table';\nimport { BaseCommand } from '../../base-command.js';\nimport {
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { printTable } from '@oclif/table';\nimport { BaseCommand } from '../../base-command.js';\n// Metadata-only import: pulling the full manual-tasks module here would drag the\n// heavy worker handlers (postgres/OTel/Sentry) into this command's bundle chunk\n// and crash a standalone npm install at load. See manual-tasks-meta.ts.\nimport { MANUAL_TASK_META } from '../../lib/manual-tasks-meta.js';\n\nexport default class CronsList extends BaseCommand {\n static override description = 'List manually-runnable maintenance tasks';\n\n static override examples = [\n '<%= config.bin %> crons list',\n ];\n\n async run(): Promise<void> {\n await this.parse(CronsList);\n printTable({\n data: MANUAL_TASK_META.map((t) => ({\n Name: t.name,\n 'Scheduled by': t.scheduledBy,\n Description: t.description,\n })),\n columns: ['Name', 'Scheduled by', 'Description'],\n });\n this.log('');\n this.log('Scheduled crons run in Supabase pg_cron \u2014 audit them with:');\n this.log(\" psql \\\"$DATABASE_URL\\\" -c 'select jobname, schedule, active from cron.job;'\");\n this.log('Run any task above on demand with: rulemetric crons run <name>');\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA,SAAS,kBAAkB;AAO3B,IAAqB,YAArB,MAAqB,mBAAkB,YAAY;AAAA,EAC/C,OAAgB,cAAc;AAAA,EAE9B,OAAgB,WAAW;AAAA,IACvB;AAAA,EACJ;AAAA,EAEA,MAAM,MAAqB;AACvB,UAAM,KAAK,MAAM,UAAS;AAC1B,eAAW;AAAA,MACP,MAAM,iBAAiB,IAAI,CAAC,OAAO;AAAA,QAC/B,MAAM,EAAE;AAAA,QACR,gBAAgB,EAAE;AAAA,QAClB,aAAa,EAAE;AAAA,MACnB,EAAE;AAAA,MACF,SAAS,CAAC,QAAQ,gBAAgB,aAAa;AAAA,IACnD,CAAC;AACD,SAAK,IAAI,EAAE;AACX,SAAK,IAAI,iEAA4D;AACrE,SAAK,IAAI,6EAA+E;AACxF,SAAK,IAAI,gEAAgE;AAAA,EAC7E;AACJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "../../chunk-DU73QUS3.js";
|
|
5
|
-
import "../../chunk-R5MFHGHR.js";
|
|
6
|
-
import "../../chunk-RQ2TMLKG.js";
|
|
7
|
-
import "../../chunk-YBNW7ARH.js";
|
|
8
|
-
import "../../chunk-FZKLLNDS.js";
|
|
9
|
-
import "../../chunk-K3BFZ7KG.js";
|
|
10
|
-
import "../../chunk-NIDLJO6F.js";
|
|
11
|
-
import "../../chunk-7FAA3YNB.js";
|
|
12
|
-
import "../../chunk-EKP32DLN.js";
|
|
13
|
-
import "../../chunk-OQSQC7VB.js";
|
|
14
|
-
import "../../chunk-KRBQLMOP.js";
|
|
2
|
+
MANUAL_TASK_META
|
|
3
|
+
} from "../../chunk-JFDWKLQC.js";
|
|
15
4
|
import {
|
|
16
5
|
BaseCommand
|
|
17
6
|
} from "../../chunk-S56LOTGQ.js";
|
|
@@ -45,11 +34,24 @@ var CronsRun = class _CronsRun extends BaseCommand {
|
|
|
45
34
|
async run() {
|
|
46
35
|
const { args, flags } = await this.parse(_CronsRun);
|
|
47
36
|
this.requireAuth();
|
|
48
|
-
const def =
|
|
37
|
+
const def = MANUAL_TASK_META.find((t) => t.name === args.name);
|
|
49
38
|
if (!def) {
|
|
50
39
|
this.error(`Unknown task: ${args.name}
|
|
51
40
|
Run \`rulemetric crons list\` to see available tasks.`);
|
|
52
41
|
}
|
|
42
|
+
let runManualTask;
|
|
43
|
+
try {
|
|
44
|
+
({ runManualTask } = await import("../../lib/manual-tasks.js"));
|
|
45
|
+
} catch (err) {
|
|
46
|
+
const code = err?.code;
|
|
47
|
+
if (code === "ERR_MODULE_NOT_FOUND" || code === "MODULE_NOT_FOUND") {
|
|
48
|
+
this.error(
|
|
49
|
+
`\`crons run\` needs the worker runtime, which isn't available in this install.
|
|
50
|
+
These maintenance tasks connect to the database directly \u2014 run them from a full RuleMetric checkout with DATABASE_URL and the worker dependencies installed.`
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
throw err;
|
|
54
|
+
}
|
|
53
55
|
this.log(`\u25B6 Running ${def.name} \u2026`);
|
|
54
56
|
const startedAt = Date.now();
|
|
55
57
|
const result = await runManualTask(args.name);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/commands/crons/run.ts"],
|
|
4
|
-
"sourcesContent": ["import { Args, Flags } from '@oclif/core';\nimport { BaseCommand } from '../../base-command.js';\nimport {
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { Args, Flags } from '@oclif/core';\nimport { BaseCommand } from '../../base-command.js';\n// Metadata-only static import (dependency-free). The executor (runManualTask) and\n// its heavy db/OTel/Sentry handlers are lazy-imported inside run(), so loading\n// this command never pulls `postgres` into its bundle chunk and a standalone\n// npm install no longer crashes at module-load. See manual-tasks-meta.ts.\nimport { MANUAL_TASK_META } from '../../lib/manual-tasks-meta.js';\n\nexport default class CronsRun extends BaseCommand {\n static override description = 'Run a maintenance task synchronously, right now';\n\n static override examples = [\n '<%= config.bin %> crons run cron_check_changelog',\n '<%= config.bin %> crons run cron_suggest_instructions --quiet',\n ];\n\n static override args = {\n name: Args.string({\n description: 'Task name (run `rulemetric crons list` to see all)',\n required: true,\n }),\n };\n\n static override flags = {\n quiet: Flags.boolean({\n char: 'q',\n description: 'Suppress per-line log output; print summary only',\n }),\n };\n\n async run(): Promise<void> {\n const { args, flags } = await this.parse(CronsRun);\n this.requireAuth();\n\n // Validate against the dependency-free metadata first, so an unknown task\n // never triggers the lazy load of the heavy executor below.\n const def = MANUAL_TASK_META.find((t) => t.name === args.name);\n if (!def) {\n this.error(`Unknown task: ${args.name}\\nRun \\`rulemetric crons list\\` to see available tasks.`);\n }\n\n // Lazy-load the executor only when a task is actually run. This keeps the\n // heavy handler chunk (postgres/OTel/Sentry) out of this command's static\n // import graph. Executing a task still needs the worker runtime\n // (DATABASE_URL + those deps); a standalone npm install lacks them, so\n // turn the raw MODULE_NOT_FOUND into an actionable message.\n let runManualTask: typeof import('../../lib/manual-tasks.js').runManualTask;\n try {\n ({ runManualTask } = await import('../../lib/manual-tasks.js'));\n } catch (err) {\n const code = (err as { code?: string } | null)?.code;\n if (code === 'ERR_MODULE_NOT_FOUND' || code === 'MODULE_NOT_FOUND') {\n this.error(\n `\\`crons run\\` needs the worker runtime, which isn't available in this install.\\n` +\n `These maintenance tasks connect to the database directly \u2014 run them from a full ` +\n `RuleMetric checkout with DATABASE_URL and the worker dependencies installed.`,\n );\n }\n throw err;\n }\n\n this.log(`\u25B6 Running ${def.name} \u2026`);\n const startedAt = Date.now();\n const result = await runManualTask(args.name);\n\n if (!flags.quiet) {\n for (const line of result.logs) {\n const prefix = line.level === 'error' || line.level === 'warn' ? `[${line.level}]` : '';\n this.log(` ${prefix} ${line.message}`);\n }\n }\n\n const seconds = ((result.durationMs ?? Date.now() - startedAt) / 1000).toFixed(1);\n if (result.ok) {\n this.log(`\u2713 ${def.name} completed in ${seconds}s (${result.logs.length} log line${result.logs.length === 1 ? '' : 's'})`);\n } else {\n this.error(`\u2717 ${def.name} failed after ${seconds}s: ${result.error}`);\n }\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA,SAAS,MAAM,aAAa;AAQ5B,IAAqB,WAArB,MAAqB,kBAAiB,YAAY;AAAA,EAC9C,OAAgB,cAAc;AAAA,EAE9B,OAAgB,WAAW;AAAA,IACvB;AAAA,IACA;AAAA,EACJ;AAAA,EAEA,OAAgB,OAAO;AAAA,IACnB,MAAM,KAAK,OAAO;AAAA,MACd,aAAa;AAAA,MACb,UAAU;AAAA,IACd,CAAC;AAAA,EACL;AAAA,EAEA,OAAgB,QAAQ;AAAA,IACpB,OAAO,MAAM,QAAQ;AAAA,MACjB,MAAM;AAAA,MACN,aAAa;AAAA,IACjB,CAAC;AAAA,EACL;AAAA,EAEA,MAAM,MAAqB;AACvB,UAAM,EAAE,MAAM,MAAM,IAAI,MAAM,KAAK,MAAM,SAAQ;AACjD,SAAK,YAAY;AAIjB,UAAM,MAAM,iBAAiB,KAAK,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI;AAC7D,QAAI,CAAC,KAAK;AACN,WAAK,MAAM,iBAAiB,KAAK,IAAI;AAAA,sDAAyD;AAAA,IAClG;AAOA,QAAI;AACJ,QAAI;AACA,OAAC,EAAE,cAAc,IAAI,MAAM,OAAO,2BAA2B;AAAA,IACjE,SAAS,KAAK;AACV,YAAM,OAAQ,KAAkC;AAChD,UAAI,SAAS,0BAA0B,SAAS,oBAAoB;AAChE,aAAK;AAAA,UACD;AAAA;AAAA,QAGJ;AAAA,MACJ;AACA,YAAM;AAAA,IACV;AAEA,SAAK,IAAI,kBAAa,IAAI,IAAI,SAAI;AAClC,UAAM,YAAY,KAAK,IAAI;AAC3B,UAAM,SAAS,MAAM,cAAc,KAAK,IAAI;AAE5C,QAAI,CAAC,MAAM,OAAO;AACd,iBAAW,QAAQ,OAAO,MAAM;AAC5B,cAAM,SAAS,KAAK,UAAU,WAAW,KAAK,UAAU,SAAS,IAAI,KAAK,KAAK,MAAM;AACrF,aAAK,IAAI,KAAK,MAAM,IAAI,KAAK,OAAO,EAAE;AAAA,MAC1C;AAAA,IACJ;AAEA,UAAM,YAAY,OAAO,cAAc,KAAK,IAAI,IAAI,aAAa,KAAM,QAAQ,CAAC;AAChF,QAAI,OAAO,IAAI;AACX,WAAK,IAAI,UAAK,IAAI,IAAI,iBAAiB,OAAO,MAAM,OAAO,KAAK,MAAM,YAAY,OAAO,KAAK,WAAW,IAAI,KAAK,GAAG,GAAG;AAAA,IAC5H,OAAO;AACH,WAAK,MAAM,UAAK,IAAI,IAAI,iBAAiB,OAAO,MAAM,OAAO,KAAK,EAAE;AAAA,IACxE;AAAA,EACJ;AACJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runAgentLoop
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-JM6BQSRE.js";
|
|
4
4
|
import "../../chunk-JX5UI6RW.js";
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-EHABPBGH.js";
|
|
6
|
+
import "../../chunk-ELL34R3K.js";
|
|
7
|
+
import "../../chunk-3LHLSY7V.js";
|
|
8
|
+
import "../../chunk-PIOVE3TN.js";
|
|
9
9
|
import "../../chunk-W53GKIZQ.js";
|
|
10
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-3IU7GFXS.js";
|
|
11
11
|
import "../../chunk-XZXS2W24.js";
|
|
12
|
-
import "../../chunk-GQCISMAH.js";
|
|
13
|
-
import "../../chunk-BD7CY42U.js";
|
|
14
|
-
import "../../chunk-QJXAULRC.js";
|
|
15
|
-
import "../../chunk-DGHWRQXL.js";
|
|
16
|
-
import "../../chunk-J7N3DLH6.js";
|
|
17
|
-
import "../../chunk-52WIYRZH.js";
|
|
18
|
-
import "../../chunk-IWYCRLEK.js";
|
|
19
|
-
import "../../chunk-B5KNTGMJ.js";
|
|
20
|
-
import "../../chunk-3TIMQ3O6.js";
|
|
21
|
-
import "../../chunk-YNIH3KMU.js";
|
|
22
|
-
import "../../chunk-QN34TGD3.js";
|
|
23
12
|
import "../../chunk-RQ2TMLKG.js";
|
|
24
13
|
import "../../chunk-YBNW7ARH.js";
|
|
25
14
|
import "../../chunk-FZKLLNDS.js";
|
|
15
|
+
import "../../chunk-B3HILODD.js";
|
|
26
16
|
import "../../chunk-K3BFZ7KG.js";
|
|
27
17
|
import "../../chunk-NIDLJO6F.js";
|
|
28
18
|
import {
|
|
29
19
|
closeDb
|
|
30
|
-
} from "../../chunk-
|
|
20
|
+
} from "../../chunk-4A7FKR2O.js";
|
|
21
|
+
import "../../chunk-BD7CY42U.js";
|
|
22
|
+
import "../../chunk-QJXAULRC.js";
|
|
23
|
+
import "../../chunk-DGHWRQXL.js";
|
|
24
|
+
import "../../chunk-J7N3DLH6.js";
|
|
25
|
+
import "../../chunk-52WIYRZH.js";
|
|
26
|
+
import "../../chunk-IWYCRLEK.js";
|
|
31
27
|
import "../../chunk-EKP32DLN.js";
|
|
28
|
+
import "../../chunk-ISDA2QFX.js";
|
|
32
29
|
import "../../chunk-OQSQC7VB.js";
|
|
33
30
|
import "../../chunk-KRBQLMOP.js";
|
|
31
|
+
import "../../chunk-3TIMQ3O6.js";
|
|
32
|
+
import "../../chunk-YNIH3KMU.js";
|
|
33
|
+
import "../../chunk-QN34TGD3.js";
|
|
34
34
|
import {
|
|
35
35
|
BaseCommand
|
|
36
36
|
} from "../../chunk-S56LOTGQ.js";
|
|
@@ -19,12 +19,12 @@ import {
|
|
|
19
19
|
writeVSCodeProxyConfig,
|
|
20
20
|
writeVSCodeUserProxyConfig
|
|
21
21
|
} from "../../chunk-L674RNKQ.js";
|
|
22
|
+
import "../../chunk-KRBQLMOP.js";
|
|
22
23
|
import {
|
|
23
24
|
GATEWAY_PORT,
|
|
24
25
|
isGatewayRunning,
|
|
25
26
|
spawnGateway
|
|
26
27
|
} from "../../chunk-FTJRMUID.js";
|
|
27
|
-
import "../../chunk-KRBQLMOP.js";
|
|
28
28
|
import {
|
|
29
29
|
BaseCommand
|
|
30
30
|
} from "../../chunk-S56LOTGQ.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
loadApiInsights,
|
|
19
19
|
loadLinkedInstructions,
|
|
20
20
|
loadLocalStats
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-PDURR7O3.js";
|
|
22
22
|
import {
|
|
23
23
|
LauncherOverlay
|
|
24
24
|
} from "../chunk-CROYS75W.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
PERIODS,
|
|
34
34
|
PERIOD_LABELS
|
|
35
35
|
} from "../chunk-QJQS6TUN.js";
|
|
36
|
-
import "../chunk-
|
|
36
|
+
import "../chunk-ISDA2QFX.js";
|
|
37
37
|
import {
|
|
38
38
|
readActiveOrg
|
|
39
39
|
} from "../chunk-EKJ2CABV.js";
|
|
@@ -149,7 +149,7 @@ function InteractiveDashboard({ initialLocal, initialApi, initialInstructions, i
|
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
151
|
if (input === "n") {
|
|
152
|
-
import("../dist-
|
|
152
|
+
import("../dist-I6BCOLNG.js").then(({ getLauncher }) => {
|
|
153
153
|
getLauncher("claude_code").launch({ projectPath: process.cwd(), mode: "interactive" });
|
|
154
154
|
});
|
|
155
155
|
return;
|
package/dist/dashboard/data.js
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
loadApiInsights,
|
|
3
3
|
loadLinkedInstructions,
|
|
4
4
|
loadLocalStats
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-PDURR7O3.js";
|
|
6
|
+
import "../chunk-ISDA2QFX.js";
|
|
7
7
|
import "../chunk-NSBPE2FW.js";
|
|
8
8
|
export {
|
|
9
9
|
loadApiInsights,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
sanitizeBranch,
|
|
23
23
|
sanitizeTmuxName,
|
|
24
24
|
worktreePathFor
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ISDA2QFX.js";
|
|
26
26
|
import "./chunk-NSBPE2FW.js";
|
|
27
27
|
export {
|
|
28
28
|
ClaudeCodeAdapter,
|
|
@@ -49,4 +49,4 @@ export {
|
|
|
49
49
|
sanitizeTmuxName,
|
|
50
50
|
worktreePathFor
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=dist-
|
|
52
|
+
//# sourceMappingURL=dist-I6BCOLNG.js.map
|
package/dist/lib/agent-loop.js
CHANGED
|
@@ -3,35 +3,35 @@ import {
|
|
|
3
3
|
HANDLERS,
|
|
4
4
|
pollForWork,
|
|
5
5
|
runAgentLoop
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-JM6BQSRE.js";
|
|
7
7
|
import "../chunk-JX5UI6RW.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-EHABPBGH.js";
|
|
9
|
+
import "../chunk-ELL34R3K.js";
|
|
10
|
+
import "../chunk-3LHLSY7V.js";
|
|
11
|
+
import "../chunk-PIOVE3TN.js";
|
|
12
12
|
import "../chunk-W53GKIZQ.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-3IU7GFXS.js";
|
|
14
14
|
import "../chunk-XZXS2W24.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-RQ2TMLKG.js";
|
|
16
|
+
import "../chunk-YBNW7ARH.js";
|
|
17
|
+
import "../chunk-FZKLLNDS.js";
|
|
18
|
+
import "../chunk-B3HILODD.js";
|
|
19
|
+
import "../chunk-K3BFZ7KG.js";
|
|
20
|
+
import "../chunk-NIDLJO6F.js";
|
|
21
|
+
import "../chunk-4A7FKR2O.js";
|
|
16
22
|
import "../chunk-BD7CY42U.js";
|
|
17
23
|
import "../chunk-QJXAULRC.js";
|
|
18
24
|
import "../chunk-DGHWRQXL.js";
|
|
19
25
|
import "../chunk-J7N3DLH6.js";
|
|
20
26
|
import "../chunk-52WIYRZH.js";
|
|
21
27
|
import "../chunk-IWYCRLEK.js";
|
|
22
|
-
import "../chunk-B5KNTGMJ.js";
|
|
23
|
-
import "../chunk-3TIMQ3O6.js";
|
|
24
|
-
import "../chunk-YNIH3KMU.js";
|
|
25
|
-
import "../chunk-QN34TGD3.js";
|
|
26
|
-
import "../chunk-RQ2TMLKG.js";
|
|
27
|
-
import "../chunk-YBNW7ARH.js";
|
|
28
|
-
import "../chunk-FZKLLNDS.js";
|
|
29
|
-
import "../chunk-K3BFZ7KG.js";
|
|
30
|
-
import "../chunk-NIDLJO6F.js";
|
|
31
|
-
import "../chunk-7FAA3YNB.js";
|
|
32
28
|
import "../chunk-EKP32DLN.js";
|
|
29
|
+
import "../chunk-ISDA2QFX.js";
|
|
33
30
|
import "../chunk-OQSQC7VB.js";
|
|
34
31
|
import "../chunk-KRBQLMOP.js";
|
|
32
|
+
import "../chunk-3TIMQ3O6.js";
|
|
33
|
+
import "../chunk-YNIH3KMU.js";
|
|
34
|
+
import "../chunk-QN34TGD3.js";
|
|
35
35
|
import "../chunk-EJOI2ZGU.js";
|
|
36
36
|
import "../chunk-KZRFUXGF.js";
|
|
37
37
|
import "../chunk-NSBPE2FW.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
processAnnouncement
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-DGHWRQXL.js";
|
|
3
|
+
} from "../../chunk-B3HILODD.js";
|
|
5
4
|
import "../../chunk-NIDLJO6F.js";
|
|
6
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-4A7FKR2O.js";
|
|
6
|
+
import "../../chunk-DGHWRQXL.js";
|
|
7
7
|
import "../../chunk-NSBPE2FW.js";
|
|
8
8
|
export {
|
|
9
9
|
processAnnouncement
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
processChangelog
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-RDIH4AG2.js";
|
|
4
4
|
import "../../chunk-K3BFZ7KG.js";
|
|
5
5
|
import "../../chunk-NIDLJO6F.js";
|
|
6
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-4A7FKR2O.js";
|
|
7
7
|
import "../../chunk-NSBPE2FW.js";
|
|
8
8
|
export {
|
|
9
9
|
processChangelog
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
processInsights
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-EHABPBGH.js";
|
|
4
4
|
import "../../chunk-XZXS2W24.js";
|
|
5
|
-
import "../../chunk-DGHWRQXL.js";
|
|
6
5
|
import "../../chunk-FZKLLNDS.js";
|
|
6
|
+
import "../../chunk-DGHWRQXL.js";
|
|
7
7
|
import "../../chunk-KRBQLMOP.js";
|
|
8
8
|
import "../../chunk-EJOI2ZGU.js";
|
|
9
9
|
import "../../chunk-KZRFUXGF.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
processLaunch,
|
|
3
3
|
resolveWorktreeForLaunch
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-ELL34R3K.js";
|
|
5
|
+
import "../../chunk-PIOVE3TN.js";
|
|
6
6
|
import "../../chunk-DGHWRQXL.js";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-ISDA2QFX.js";
|
|
8
8
|
import "../../chunk-KRBQLMOP.js";
|
|
9
9
|
import "../../chunk-EJOI2ZGU.js";
|
|
10
10
|
import "../../chunk-KZRFUXGF.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
processRunCleanup
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-3LHLSY7V.js";
|
|
4
|
+
import "../../chunk-PIOVE3TN.js";
|
|
5
|
+
import "../../chunk-4A7FKR2O.js";
|
|
5
6
|
import "../../chunk-DGHWRQXL.js";
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-7FAA3YNB.js";
|
|
7
|
+
import "../../chunk-ISDA2QFX.js";
|
|
8
8
|
import "../../chunk-KRBQLMOP.js";
|
|
9
9
|
import "../../chunk-NSBPE2FW.js";
|
|
10
10
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
processSessionGoal
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-3IU7GFXS.js";
|
|
4
4
|
import "../../chunk-FZKLLNDS.js";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-4A7FKR2O.js";
|
|
6
6
|
import "../../chunk-KRBQLMOP.js";
|
|
7
7
|
import "../../chunk-NSBPE2FW.js";
|
|
8
8
|
export {
|