@rulemetric/cli 0.2.2 → 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 +4 -4
- 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
package/dist/lib/manual-tasks.js
CHANGED
|
@@ -1,20 +1,77 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import
|
|
2
|
+
processChangelog
|
|
3
|
+
} from "../chunk-RDIH4AG2.js";
|
|
4
|
+
import {
|
|
5
|
+
cronRefreshSkills
|
|
6
|
+
} from "../chunk-RQ2TMLKG.js";
|
|
7
|
+
import {
|
|
8
|
+
cronSuggestInstructions
|
|
9
|
+
} from "../chunk-YBNW7ARH.js";
|
|
8
10
|
import "../chunk-FZKLLNDS.js";
|
|
9
11
|
import "../chunk-K3BFZ7KG.js";
|
|
10
12
|
import "../chunk-NIDLJO6F.js";
|
|
11
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-4A7FKR2O.js";
|
|
12
14
|
import "../chunk-EKP32DLN.js";
|
|
13
15
|
import "../chunk-OQSQC7VB.js";
|
|
14
16
|
import "../chunk-KRBQLMOP.js";
|
|
17
|
+
import {
|
|
18
|
+
MANUAL_TASK_META
|
|
19
|
+
} from "../chunk-JFDWKLQC.js";
|
|
15
20
|
import "../chunk-EJOI2ZGU.js";
|
|
16
21
|
import "../chunk-KZRFUXGF.js";
|
|
17
22
|
import "../chunk-NSBPE2FW.js";
|
|
23
|
+
|
|
24
|
+
// src/lib/manual-tasks.ts
|
|
25
|
+
var HANDLERS = {
|
|
26
|
+
cron_check_changelog: async (_payload, helpers) => {
|
|
27
|
+
const result = await processChangelog({
|
|
28
|
+
logger: {
|
|
29
|
+
info: (m) => helpers.logger.info(m),
|
|
30
|
+
warn: (m) => helpers.logger.warn(m)
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
helpers.logger.info(
|
|
34
|
+
`[cron_check_changelog] result: created=${result.createdCount} skipped=${result.skippedCount}`
|
|
35
|
+
);
|
|
36
|
+
},
|
|
37
|
+
cron_suggest_instructions: (payload, helpers) => cronSuggestInstructions(payload, helpers),
|
|
38
|
+
cron_refresh_skills: (payload, helpers) => cronRefreshSkills(payload, helpers)
|
|
39
|
+
};
|
|
40
|
+
var MANUAL_TASKS = MANUAL_TASK_META.map((meta) => {
|
|
41
|
+
const handler = HANDLERS[meta.name];
|
|
42
|
+
if (!handler) {
|
|
43
|
+
throw new Error(`manual-tasks: no handler registered for "${meta.name}"`);
|
|
44
|
+
}
|
|
45
|
+
return { ...meta, handler };
|
|
46
|
+
});
|
|
47
|
+
async function runManualTask(name) {
|
|
48
|
+
const def = MANUAL_TASKS.find((t) => t.name === name);
|
|
49
|
+
if (!def) {
|
|
50
|
+
return { name, durationMs: 0, ok: false, error: `Unknown task: ${name}`, logs: [] };
|
|
51
|
+
}
|
|
52
|
+
const logs = [];
|
|
53
|
+
const helpers = {
|
|
54
|
+
logger: {
|
|
55
|
+
info: (message) => logs.push({ level: "info", message }),
|
|
56
|
+
warn: (message) => logs.push({ level: "warn", message }),
|
|
57
|
+
error: (message) => logs.push({ level: "error", message })
|
|
58
|
+
},
|
|
59
|
+
job: { attempts: 0 }
|
|
60
|
+
};
|
|
61
|
+
const start = Date.now();
|
|
62
|
+
try {
|
|
63
|
+
await def.handler({}, helpers);
|
|
64
|
+
return { name, durationMs: Date.now() - start, ok: true, logs };
|
|
65
|
+
} catch (err) {
|
|
66
|
+
return {
|
|
67
|
+
name,
|
|
68
|
+
durationMs: Date.now() - start,
|
|
69
|
+
ok: false,
|
|
70
|
+
error: err instanceof Error ? err.message : String(err),
|
|
71
|
+
logs
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
18
75
|
export {
|
|
19
76
|
MANUAL_TASKS,
|
|
20
77
|
runManualTask
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [],
|
|
4
|
-
"sourcesContent": [],
|
|
5
|
-
"mappings": "",
|
|
3
|
+
"sources": ["../../src/lib/manual-tasks.ts"],
|
|
4
|
+
"sourcesContent": ["// Manually-runnable maintenance tasks for `rulemetric crons run` / `crons list`.\n// Replaces the graphile cron-registry/cron-runner pair (deleted in Phase 4c\n// Stage 4): scheduled crons now live in Supabase pg_cron (see migrations\n// 00064/00065/00082/00083), so the only thing the CLI still needs is an\n// on-demand entry point for tasks an operator triggers by hand.\n\nimport type { JobHelpers } from './job-helpers.js';\nimport { processChangelog } from './handlers/process-changelog.js';\nimport { cronSuggestInstructions } from './handlers/cron-suggest-instructions.js';\nimport { cronRefreshSkills } from './handlers/cron-refresh-skills.js';\nimport { MANUAL_TASK_META, type ManualTaskMeta } from './manual-tasks-meta.js';\n\nexport interface ManualTaskDefinition extends ManualTaskMeta {\n handler: (payload: unknown, helpers: JobHelpers) => Promise<unknown>;\n}\n\n// Handlers keyed by task name. Deliberately kept SEPARATE from the task metadata\n// (manual-tasks-meta.ts) so `crons list` can render the task table without ever\n// importing these handler modules, which transitively pull `@rulemetric/db` ->\n// `postgres` plus OTel/Sentry. The metadata is the single source of truth for the\n// task list; this map only attaches behaviour. See manual-tasks-meta.ts.\nconst HANDLERS: Record<string, ManualTaskDefinition['handler']> = {\n cron_check_changelog: async (_payload, helpers) => {\n const result = await processChangelog({\n logger: {\n info: (m: string) => helpers.logger.info(m),\n warn: (m: string) => helpers.logger.warn(m),\n },\n });\n helpers.logger.info(\n `[cron_check_changelog] result: created=${result.createdCount} skipped=${result.skippedCount}`,\n );\n },\n cron_suggest_instructions: (payload, helpers) => cronSuggestInstructions(payload, helpers),\n cron_refresh_skills: (payload, helpers) => cronRefreshSkills(payload, helpers),\n};\n\nexport const MANUAL_TASKS: readonly ManualTaskDefinition[] = MANUAL_TASK_META.map((meta) => {\n const handler = HANDLERS[meta.name];\n if (!handler) {\n // Guards against a metadata entry being added without a matching handler.\n throw new Error(`manual-tasks: no handler registered for \"${meta.name}\"`);\n }\n return { ...meta, handler };\n});\n\nexport interface ManualTaskResult {\n name: string;\n durationMs: number;\n ok: boolean;\n error?: string;\n logs: Array<{ level: string; message: string }>;\n}\n\n/**\n * Synchronously invoke a manual task by name. Returns a structured result\n * with captured log lines so callers (CLI, tests) can render or assert.\n */\nexport async function runManualTask(name: string): Promise<ManualTaskResult> {\n const def = MANUAL_TASKS.find((t) => t.name === name);\n if (!def) {\n return { name, durationMs: 0, ok: false, error: `Unknown task: ${name}`, logs: [] };\n }\n\n const logs: Array<{ level: string; message: string }> = [];\n const helpers: JobHelpers = {\n logger: {\n info: (message) => logs.push({ level: 'info', message }),\n warn: (message) => logs.push({ level: 'warn', message }),\n error: (message) => logs.push({ level: 'error', message }),\n },\n job: { attempts: 0 },\n };\n\n const start = Date.now();\n try {\n await def.handler({}, helpers);\n return { name, durationMs: Date.now() - start, ok: true, logs };\n } catch (err) {\n return {\n name,\n durationMs: Date.now() - start,\n ok: false,\n error: err instanceof Error ? err.message : String(err),\n logs,\n };\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAM,WAA4D;AAAA,EAC9D,sBAAsB,OAAO,UAAU,YAAY;AAC/C,UAAM,SAAS,MAAM,iBAAiB;AAAA,MAClC,QAAQ;AAAA,QACJ,MAAM,CAAC,MAAc,QAAQ,OAAO,KAAK,CAAC;AAAA,QAC1C,MAAM,CAAC,MAAc,QAAQ,OAAO,KAAK,CAAC;AAAA,MAC9C;AAAA,IACJ,CAAC;AACD,YAAQ,OAAO;AAAA,MACX,0CAA0C,OAAO,YAAY,YAAY,OAAO,YAAY;AAAA,IAChG;AAAA,EACJ;AAAA,EACA,2BAA2B,CAAC,SAAS,YAAY,wBAAwB,SAAS,OAAO;AAAA,EACzF,qBAAqB,CAAC,SAAS,YAAY,kBAAkB,SAAS,OAAO;AACjF;AAEO,IAAM,eAAgD,iBAAiB,IAAI,CAAC,SAAS;AACxF,QAAM,UAAU,SAAS,KAAK,IAAI;AAClC,MAAI,CAAC,SAAS;AAEV,UAAM,IAAI,MAAM,4CAA4C,KAAK,IAAI,GAAG;AAAA,EAC5E;AACA,SAAO,EAAE,GAAG,MAAM,QAAQ;AAC9B,CAAC;AAcD,eAAsB,cAAc,MAAyC;AACzE,QAAM,MAAM,aAAa,KAAK,CAAC,MAAM,EAAE,SAAS,IAAI;AACpD,MAAI,CAAC,KAAK;AACN,WAAO,EAAE,MAAM,YAAY,GAAG,IAAI,OAAO,OAAO,iBAAiB,IAAI,IAAI,MAAM,CAAC,EAAE;AAAA,EACtF;AAEA,QAAM,OAAkD,CAAC;AACzD,QAAM,UAAsB;AAAA,IACxB,QAAQ;AAAA,MACJ,MAAM,CAAC,YAAY,KAAK,KAAK,EAAE,OAAO,QAAQ,QAAQ,CAAC;AAAA,MACvD,MAAM,CAAC,YAAY,KAAK,KAAK,EAAE,OAAO,QAAQ,QAAQ,CAAC;AAAA,MACvD,OAAO,CAAC,YAAY,KAAK,KAAK,EAAE,OAAO,SAAS,QAAQ,CAAC;AAAA,IAC7D;AAAA,IACA,KAAK,EAAE,UAAU,EAAE;AAAA,EACvB;AAEA,QAAM,QAAQ,KAAK,IAAI;AACvB,MAAI;AACA,UAAM,IAAI,QAAQ,CAAC,GAAG,OAAO;AAC7B,WAAO,EAAE,MAAM,YAAY,KAAK,IAAI,IAAI,OAAO,IAAI,MAAM,KAAK;AAAA,EAClE,SAAS,KAAK;AACV,WAAO;AAAA,MACH;AAAA,MACA,YAAY,KAAK,IAAI,IAAI;AAAA,MACzB,IAAI;AAAA,MACJ,OAAO,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAAA,MACtD;AAAA,IACJ;AAAA,EACJ;AACJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/lib/worktree.js
CHANGED
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
ensureWorktree,
|
|
3
3
|
removeWorktree,
|
|
4
4
|
runGit
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-PIOVE3TN.js";
|
|
6
6
|
import {
|
|
7
7
|
sanitizeBranch
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-ISDA2QFX.js";
|
|
9
9
|
import "../chunk-KRBQLMOP.js";
|
|
10
10
|
import "../chunk-NSBPE2FW.js";
|
|
11
11
|
export {
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulemetric/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"ink-text-input": "^6.0.0",
|
|
63
63
|
"react": "^19.0.0",
|
|
64
64
|
"zod": "^3.24.0",
|
|
65
|
-
"@rulemetric/proxy": "0.2.
|
|
66
|
-
"@rulemetric/
|
|
67
|
-
"@rulemetric/
|
|
65
|
+
"@rulemetric/proxy": "0.2.4",
|
|
66
|
+
"@rulemetric/skills-registry": "0.2.4",
|
|
67
|
+
"@rulemetric/hooks": "0.2.4"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@hono/node-server": "^1.13.0",
|
package/dist/chunk-DU73QUS3.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
processChangelog
|
|
3
|
-
} from "./chunk-R5MFHGHR.js";
|
|
4
|
-
import {
|
|
5
|
-
cronRefreshSkills
|
|
6
|
-
} from "./chunk-RQ2TMLKG.js";
|
|
7
|
-
import {
|
|
8
|
-
cronSuggestInstructions
|
|
9
|
-
} from "./chunk-YBNW7ARH.js";
|
|
10
|
-
|
|
11
|
-
// src/lib/manual-tasks.ts
|
|
12
|
-
var MANUAL_TASKS = [
|
|
13
|
-
{
|
|
14
|
-
name: "cron_check_changelog",
|
|
15
|
-
description: "Parse CHANGELOG.md and create draft announcement rows for new versions.",
|
|
16
|
-
scheduledBy: "manual only \u2014 announcement drafts are reminder-driven, never scheduled",
|
|
17
|
-
handler: async (_payload, helpers) => {
|
|
18
|
-
const result = await processChangelog({
|
|
19
|
-
logger: {
|
|
20
|
-
info: (m) => helpers.logger.info(m),
|
|
21
|
-
warn: (m) => helpers.logger.warn(m)
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
helpers.logger.info(
|
|
25
|
-
`[cron_check_changelog] result: created=${result.createdCount} skipped=${result.skippedCount}`
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: "cron_suggest_instructions",
|
|
31
|
-
description: "Precompute per-project instruction suggestions for the SessionStart hook.",
|
|
32
|
-
scheduledBy: "Supabase pg_cron daily 04:30 UTC \u2192 agent_jobs \u2192 agent loop (migration 00083)",
|
|
33
|
-
handler: (payload, helpers) => cronSuggestInstructions(payload, helpers)
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
name: "cron_refresh_skills",
|
|
37
|
-
description: "Refresh the skills registry from GitHub sources (disk JSON + public instructions sync). Requires GITHUB_TOKEN.",
|
|
38
|
-
scheduledBy: "Supabase pg_cron daily 03:30 UTC \u2192 agent_jobs \u2192 agent loop (migration 00086)",
|
|
39
|
-
handler: (payload, helpers) => cronRefreshSkills(payload, helpers)
|
|
40
|
-
}
|
|
41
|
-
];
|
|
42
|
-
async function runManualTask(name) {
|
|
43
|
-
const def = MANUAL_TASKS.find((t) => t.name === name);
|
|
44
|
-
if (!def) {
|
|
45
|
-
return { name, durationMs: 0, ok: false, error: `Unknown task: ${name}`, logs: [] };
|
|
46
|
-
}
|
|
47
|
-
const logs = [];
|
|
48
|
-
const helpers = {
|
|
49
|
-
logger: {
|
|
50
|
-
info: (message) => logs.push({ level: "info", message }),
|
|
51
|
-
warn: (message) => logs.push({ level: "warn", message }),
|
|
52
|
-
error: (message) => logs.push({ level: "error", message })
|
|
53
|
-
},
|
|
54
|
-
job: { attempts: 0 }
|
|
55
|
-
};
|
|
56
|
-
const start = Date.now();
|
|
57
|
-
try {
|
|
58
|
-
await def.handler({}, helpers);
|
|
59
|
-
return { name, durationMs: Date.now() - start, ok: true, logs };
|
|
60
|
-
} catch (err) {
|
|
61
|
-
return {
|
|
62
|
-
name,
|
|
63
|
-
durationMs: Date.now() - start,
|
|
64
|
-
ok: false,
|
|
65
|
-
error: err instanceof Error ? err.message : String(err),
|
|
66
|
-
logs
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export {
|
|
72
|
-
MANUAL_TASKS,
|
|
73
|
-
runManualTask
|
|
74
|
-
};
|
|
75
|
-
//# sourceMappingURL=chunk-DU73QUS3.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/lib/manual-tasks.ts"],
|
|
4
|
-
"sourcesContent": ["// Manually-runnable maintenance tasks for `rulemetric crons run` / `crons list`.\n// Replaces the graphile cron-registry/cron-runner pair (deleted in Phase 4c\n// Stage 4): scheduled crons now live in Supabase pg_cron (see migrations\n// 00064/00065/00082/00083), so the only thing the CLI still needs is an\n// on-demand entry point for tasks an operator triggers by hand.\n\nimport type { JobHelpers } from './job-helpers.js';\nimport { processChangelog } from './handlers/process-changelog.js';\nimport { cronSuggestInstructions } from './handlers/cron-suggest-instructions.js';\nimport { cronRefreshSkills } from './handlers/cron-refresh-skills.js';\n\nexport interface ManualTaskDefinition {\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 handler: (payload: unknown, helpers: JobHelpers) => Promise<unknown>;\n}\n\nexport const MANUAL_TASKS: readonly ManualTaskDefinition[] = [\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 handler: async (_payload, helpers) => {\n const result = await processChangelog({\n logger: {\n info: (m: string) => helpers.logger.info(m),\n warn: (m: string) => helpers.logger.warn(m),\n },\n });\n helpers.logger.info(\n `[cron_check_changelog] result: created=${result.createdCount} skipped=${result.skippedCount}`,\n );\n },\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 handler: (payload, helpers) => cronSuggestInstructions(payload, helpers),\n },\n {\n name: 'cron_refresh_skills',\n description: '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 handler: (payload, helpers) => cronRefreshSkills(payload, helpers),\n },\n];\n\nexport interface ManualTaskResult {\n name: string;\n durationMs: number;\n ok: boolean;\n error?: string;\n logs: Array<{ level: string; message: string }>;\n}\n\n/**\n * Synchronously invoke a manual task by name. Returns a structured result\n * with captured log lines so callers (CLI, tests) can render or assert.\n */\nexport async function runManualTask(name: string): Promise<ManualTaskResult> {\n const def = MANUAL_TASKS.find((t) => t.name === name);\n if (!def) {\n return { name, durationMs: 0, ok: false, error: `Unknown task: ${name}`, logs: [] };\n }\n\n const logs: Array<{ level: string; message: string }> = [];\n const helpers: JobHelpers = {\n logger: {\n info: (message) => logs.push({ level: 'info', message }),\n warn: (message) => logs.push({ level: 'warn', message }),\n error: (message) => logs.push({ level: 'error', message }),\n },\n job: { attempts: 0 },\n };\n\n const start = Date.now();\n try {\n await def.handler({}, helpers);\n return { name, durationMs: Date.now() - start, ok: true, logs };\n } catch (err) {\n return {\n name,\n durationMs: Date.now() - start,\n ok: false,\n error: err instanceof Error ? err.message : String(err),\n logs,\n };\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;AAqBO,IAAM,eAAgD;AAAA,EACzD;AAAA,IACI,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,SAAS,OAAO,UAAU,YAAY;AAClC,YAAM,SAAS,MAAM,iBAAiB;AAAA,QAClC,QAAQ;AAAA,UACJ,MAAM,CAAC,MAAc,QAAQ,OAAO,KAAK,CAAC;AAAA,UAC1C,MAAM,CAAC,MAAc,QAAQ,OAAO,KAAK,CAAC;AAAA,QAC9C;AAAA,MACJ,CAAC;AACD,cAAQ,OAAO;AAAA,QACX,0CAA0C,OAAO,YAAY,YAAY,OAAO,YAAY;AAAA,MAChG;AAAA,IACJ;AAAA,EACJ;AAAA,EACA;AAAA,IACI,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,SAAS,CAAC,SAAS,YAAY,wBAAwB,SAAS,OAAO;AAAA,EAC3E;AAAA,EACA;AAAA,IACI,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,SAAS,CAAC,SAAS,YAAY,kBAAkB,SAAS,OAAO;AAAA,EACrE;AACJ;AAcA,eAAsB,cAAc,MAAyC;AACzE,QAAM,MAAM,aAAa,KAAK,CAAC,MAAM,EAAE,SAAS,IAAI;AACpD,MAAI,CAAC,KAAK;AACN,WAAO,EAAE,MAAM,YAAY,GAAG,IAAI,OAAO,OAAO,iBAAiB,IAAI,IAAI,MAAM,CAAC,EAAE;AAAA,EACtF;AAEA,QAAM,OAAkD,CAAC;AACzD,QAAM,UAAsB;AAAA,IACxB,QAAQ;AAAA,MACJ,MAAM,CAAC,YAAY,KAAK,KAAK,EAAE,OAAO,QAAQ,QAAQ,CAAC;AAAA,MACvD,MAAM,CAAC,YAAY,KAAK,KAAK,EAAE,OAAO,QAAQ,QAAQ,CAAC;AAAA,MACvD,OAAO,CAAC,YAAY,KAAK,KAAK,EAAE,OAAO,SAAS,QAAQ,CAAC;AAAA,IAC7D;AAAA,IACA,KAAK,EAAE,UAAU,EAAE;AAAA,EACvB;AAEA,QAAM,QAAQ,KAAK,IAAI;AACvB,MAAI;AACA,UAAM,IAAI,QAAQ,CAAC,GAAG,OAAO;AAC7B,WAAO,EAAE,MAAM,YAAY,KAAK,IAAI,IAAI,OAAO,IAAI,MAAM,KAAK;AAAA,EAClE,SAAS,KAAK;AACV,WAAO;AAAA,MACH;AAAA,MACA,YAAY,KAAK,IAAI,IAAI;AAAA,MACzB,IAAI;AAAA,MACJ,OAAO,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAAA,MACtD;AAAA,IACJ;AAAA,EACJ;AACJ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|