lastlight-core 0.25.1 → 0.25.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/agent-context/rules.md +17 -4
  2. package/dist/admin/routes.js +1 -11
  3. package/dist/admin/routes.js.map +1 -1
  4. package/dist/config/config.d.ts +9 -0
  5. package/dist/config/config.js +15 -1
  6. package/dist/config/config.js.map +1 -1
  7. package/dist/cron/scheduler.js +26 -9
  8. package/dist/cron/scheduler.js.map +1 -1
  9. package/dist/engine/chat/chat-prompt.d.ts +66 -0
  10. package/dist/engine/chat/chat-prompt.js +117 -0
  11. package/dist/engine/chat/chat-prompt.js.map +1 -0
  12. package/dist/engine/chat/chat-runner.d.ts +12 -2
  13. package/dist/engine/chat/chat-runner.js +1 -1
  14. package/dist/engine/chat/chat-runner.js.map +1 -1
  15. package/dist/engine/chat/chat-skills.d.ts +15 -7
  16. package/dist/engine/chat/chat-skills.js +42 -24
  17. package/dist/engine/chat/chat-skills.js.map +1 -1
  18. package/dist/engine/chat/chat.d.ts +5 -18
  19. package/dist/engine/chat/chat.js +5 -112
  20. package/dist/engine/chat/chat.js.map +1 -1
  21. package/dist/engine/router.js +60 -4
  22. package/dist/engine/router.js.map +1 -1
  23. package/dist/engine/screen/classifier.d.ts +25 -0
  24. package/dist/engine/screen/classifier.js +30 -1
  25. package/dist/engine/screen/classifier.js.map +1 -1
  26. package/dist/index.js +12 -2
  27. package/dist/index.js.map +1 -1
  28. package/dist/sandbox/k8s/reclaim.d.ts +33 -0
  29. package/dist/sandbox/k8s/reclaim.js +50 -19
  30. package/dist/sandbox/k8s/reclaim.js.map +1 -1
  31. package/dist/sandbox/k8s/sweep.d.ts +8 -0
  32. package/dist/sandbox/k8s/sweep.js +84 -21
  33. package/dist/sandbox/k8s/sweep.js.map +1 -1
  34. package/dist/telemetry/index.d.ts +26 -0
  35. package/dist/telemetry/index.js +38 -0
  36. package/dist/telemetry/index.js.map +1 -1
  37. package/dist/workflows/triggers.d.ts +10 -0
  38. package/dist/workflows/triggers.js +44 -6
  39. package/dist/workflows/triggers.js.map +1 -1
  40. package/package.json +4 -4
  41. package/skills/building/SKILL.md +16 -3
  42. package/skills/chat/SKILL.md +10 -8
  43. package/skills/fixing/SKILL.md +19 -10
  44. package/skills/issue-triage/SKILL.md +1 -0
  45. package/skills/pr-review/SKILL.md +1 -0
  46. package/skills/repo-health/SKILL.md +1 -0
  47. package/skills/security-feedback/SKILL.md +9 -2
  48. package/workflows/answer.yaml +12 -0
  49. package/workflows/build.yaml +8 -0
  50. package/workflows/demo.yaml +8 -0
  51. package/workflows/explore.yaml +7 -0
  52. package/workflows/issue-triage.yaml +20 -2
  53. package/workflows/pr-review.yaml +6 -0
  54. package/workflows/prompts/architect.md +1 -2
  55. package/workflows/prompts/chat-system-no-github.md +21 -0
  56. package/workflows/prompts/chat-system.md +53 -0
  57. package/workflows/prompts/dependabot-ci-fix.md +48 -30
  58. package/workflows/prompts/executor.md +9 -7
  59. package/workflows/prompts/fix.md +5 -1
  60. package/workflows/prompts/guardrails.md +1 -2
  61. package/workflows/prompts/pr-fix.md +34 -19
  62. package/workflows/prompts/pr.md +1 -1
  63. package/workflows/prompts/re-reviewer.md +1 -1
  64. package/workflows/prompts/reviewer.md +1 -1
  65. package/workflows/qa-test.yaml +7 -0
  66. package/workflows/repo-health.yaml +11 -0
  67. package/workflows/security-review.yaml +7 -0
  68. package/workflows/verify.yaml +7 -0
@@ -1,30 +1,93 @@
1
+ import { SpanStatusCode, trace } from "@opentelemetry/api";
1
2
  import { resolveKubernetesConfig } from "../../config/config.js";
2
3
  import { sweepSandboxes } from "../../cron/sandbox-sweep.js";
3
4
  import { makeK8sApis } from "./client.js";
4
5
  import { reclaimSandbox } from "./reclaim.js";
5
6
  import { logger } from "../../logging/logger.js";
7
+ import { recordSandboxSweep, setSpanAttributes } from "../../telemetry/index.js";
6
8
  const log = logger("k8s");
9
+ const tracer = () => trace.getTracer("lastlight");
10
+ const EMPTY_CENSUS = {
11
+ pvcsFound: 0,
12
+ pvcsLive: 0,
13
+ pvcsStale: 0,
14
+ pvcsCurrent: 0,
15
+ deletedStale: 0,
16
+ deletedOverCap: 0,
17
+ deletedFailed: 0,
18
+ };
7
19
  export async function sweepK8sSandboxes(opts) {
8
- if (opts.stateDir) {
9
- sweepSandboxes({
10
- stateDir: opts.stateDir,
11
- sandboxDir: opts.sandboxDir,
12
- retentionHours: opts.retentionHours,
13
- maxDirs: opts.maxDirs ?? opts.maxIdlePVCs,
14
- isLive: opts.isLive,
15
- });
16
- }
17
- try {
18
- const apis = opts.apis ?? makeK8sApis();
19
- const namespace = opts.namespace ?? resolveKubernetesConfig().namespace;
20
- await reclaimSandbox(apis, namespace, {
21
- kind: "sweep",
22
- staleByHours: opts.retentionHours,
23
- maxIdlePVCs: opts.maxIdlePVCs,
24
- });
25
- }
26
- catch (err) {
27
- log.warn("sweepK8sSandboxes: skipping PVC reclaim", { err });
28
- }
20
+ const trigger = opts.trigger ?? "library";
21
+ // The job owns its span: it is triggered from cron, at startup, from an admin
22
+ // route, or as a library, and its telemetry must not depend on which. If a
23
+ // caller already has a span active this becomes its child and inherits the
24
+ // trace; with none active it starts a root. Either way no caller has to pass
25
+ // a trace id.
26
+ return tracer().startActiveSpan("sandbox.sweep", async (span) => {
27
+ const startedAt = Date.now();
28
+ let census = { ...EMPTY_CENSUS };
29
+ let failure;
30
+ if (opts.stateDir) {
31
+ sweepSandboxes({
32
+ stateDir: opts.stateDir,
33
+ sandboxDir: opts.sandboxDir,
34
+ retentionHours: opts.retentionHours,
35
+ maxDirs: opts.maxDirs ?? opts.maxIdlePVCs,
36
+ isLive: opts.isLive,
37
+ });
38
+ }
39
+ try {
40
+ const apis = opts.apis ?? makeK8sApis();
41
+ const namespace = opts.namespace ?? resolveKubernetesConfig().namespace;
42
+ const result = await reclaimSandbox(apis, namespace, {
43
+ kind: "sweep",
44
+ staleByHours: opts.retentionHours,
45
+ maxIdlePVCs: opts.maxIdlePVCs,
46
+ });
47
+ census = result.census;
48
+ }
49
+ catch (err) {
50
+ failure = err;
51
+ log.warn("sweepK8sSandboxes: skipping PVC reclaim", { err });
52
+ span.recordException(err instanceof Error ? err : new Error(String(err)));
53
+ span.setStatus({ code: SpanStatusCode.ERROR });
54
+ }
55
+ finally {
56
+ // Reported from `finally` so a failed reclaim still says what it saw. A
57
+ // summary emitted only on success would go missing on exactly the runs
58
+ // worth reading, and an absent event is meant to mean "did not run".
59
+ const durationMs = Date.now() - startedAt;
60
+ const config = { retentionHours: opts.retentionHours, maxIdlePVCs: opts.maxIdlePVCs };
61
+ setSpanAttributes(span, {
62
+ trigger,
63
+ "pvcs.found": census.pvcsFound,
64
+ "pvcs.stale": census.pvcsStale,
65
+ "deleted.stale": census.deletedStale,
66
+ "deleted.overCap": census.deletedOverCap,
67
+ ...config,
68
+ });
69
+ // Unconditional: emitted with zeros on an idle run, so the shape never
70
+ // varies and absence of the event means the sweep did not run.
71
+ log.info("Sweep complete", {
72
+ trigger,
73
+ pvcs: {
74
+ found: census.pvcsFound,
75
+ live: census.pvcsLive,
76
+ stale: census.pvcsStale,
77
+ current: census.pvcsCurrent,
78
+ },
79
+ deleted: {
80
+ stale: census.deletedStale,
81
+ overCap: census.deletedOverCap,
82
+ failed: census.deletedFailed,
83
+ },
84
+ config,
85
+ durationMs,
86
+ ...(failure ? { err: failure } : {}),
87
+ });
88
+ recordSandboxSweep({ ...census, durationMs }, { trigger });
89
+ span.end();
90
+ }
91
+ });
29
92
  }
30
93
  //# sourceMappingURL=sweep.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sweep.js","sourceRoot":"","sources":["../../../src/sandbox/k8s/sweep.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAgB,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE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GAAG,MAAM;aACV,CAAC,CAAC;YAEH,uEAAuE;YACvE,+DAA+D;YAC/D,GAAG,CAAC,IAAI,CAAC,gBAAgB,EAAE;gBACzB,OAAO;gBACP,IAAI,EAAE;oBACJ,KAAK,EAAE,MAAM,CAAC,SAAS;oBACvB,IAAI,EAAE,MAAM,CAAC,QAAQ;oBACrB,KAAK,EAAE,MAAM,CAAC,SAAS;oBACvB,OAAO,EAAE,MAAM,CAAC,WAAW;iBAC5B;gBACD,OAAO,EAAE;oBACP,KAAK,EAAE,MAAM,CAAC,YAAY;oBAC1B,OAAO,EAAE,MAAM,CAAC,cAAc;oBAC9B,MAAM,EAAE,MAAM,CAAC,aAAa;iBAC7B;gBACD,MAAM;gBACN,UAAU;gBACV,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACrC,CAAC,CAAC;YAEH,kBAAkB,CAAC,EAAE,GAAG,MAAM,EAAE,UAAU,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;YAC3D,IAAI,CAAC,GAAG,EAAE,CAAC;QACb,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -33,6 +33,32 @@ export declare function initTelemetry(config: OtelConfig, opts?: {
33
33
  export declare function shutdownTelemetry(): Promise<void>;
34
34
  export declare function withSpan<T>(name: string, attrs: TelemetryAttributes, fn: (span: Span | undefined) => Promise<T> | T): Promise<T>;
35
35
  export declare function recordExecutionMetrics(surface: "workflow" | "phase" | "agent" | "chat", attrs?: TelemetryAttributes): void;
36
+ /** What one sandbox sweep observed and did. Mirrors the summary log event so the
37
+ * two signals never disagree — see {@link recordSandboxSweep}. */
38
+ export interface SandboxSweepCounts {
39
+ pvcsFound: number;
40
+ pvcsLive: number;
41
+ pvcsStale: number;
42
+ pvcsCurrent: number;
43
+ deletedStale: number;
44
+ deletedOverCap: number;
45
+ deletedFailed: number;
46
+ durationMs: number;
47
+ }
48
+ /**
49
+ * Metrics for one sweep run, emitted whether or not anything was reclaimed.
50
+ *
51
+ * The `runs` counter is the liveness signal: a job that stops running stops
52
+ * incrementing it, which is directly alertable
53
+ * (`increase(lastlight_sandbox_sweep_runs_total[2h]) == 0`) without parsing logs
54
+ * or depending on log retention. `pvcs{state="found"}` climbing while `deleted`
55
+ * stays flat is a sweep that runs but never reclaims.
56
+ *
57
+ * Deletions are split by the policy that evicted (`stale` vs `over_cap`) because
58
+ * the two call for different responses — shortening `retentionHours` versus
59
+ * raising `maxIdlePVCs` — and a combined total hides which one is binding.
60
+ */
61
+ export declare function recordSandboxSweep(counts: SandboxSweepCounts, attrs?: TelemetryAttributes): void;
36
62
  export declare function recordWorkflowRunStart(attrs?: TelemetryAttributes): void;
37
63
  export declare function recordWorkflowRunEnd(attrs?: TelemetryAttributes): void;
38
64
  export declare function recordError(surface: string, error: unknown, attrs?: TelemetryAttributes): void;
@@ -53,6 +53,11 @@ const METRIC_ATTR_ALLOWLIST = new Set([
53
53
  "feedback.sentiment",
54
54
  "feedback.emoji",
55
55
  "feedback.anchor.kind",
56
+ // Sandbox sweep (issue #106). `SweepTrigger` is a closed union of four —
57
+ // cron | manual | startup | library — so it is bounded by construction. It is
58
+ // also the dimension the `{trigger="cron"}` liveness query selects on: absent
59
+ // here, `safeMetricAttributes` drops it and every sweep series is emitted flat.
60
+ "trigger",
56
61
  ]);
57
62
  const EXPLICIT_CONTENT_ATTR_ALLOWLIST = new Set([
58
63
  "message.content",
@@ -245,6 +250,39 @@ export function recordExecutionMetrics(surface, attrs = {}) {
245
250
  m.createCounter("lastlight.execution.output_tokens").add(outputTokens, metricAttrs);
246
251
  m.createCounter("lastlight.execution.count").add(1, metricAttrs);
247
252
  }
253
+ /**
254
+ * Metrics for one sweep run, emitted whether or not anything was reclaimed.
255
+ *
256
+ * The `runs` counter is the liveness signal: a job that stops running stops
257
+ * incrementing it, which is directly alertable
258
+ * (`increase(lastlight_sandbox_sweep_runs_total[2h]) == 0`) without parsing logs
259
+ * or depending on log retention. `pvcs{state="found"}` climbing while `deleted`
260
+ * stays flat is a sweep that runs but never reclaims.
261
+ *
262
+ * Deletions are split by the policy that evicted (`stale` vs `over_cap`) because
263
+ * the two call for different responses — shortening `retentionHours` versus
264
+ * raising `maxIdlePVCs` — and a combined total hides which one is binding.
265
+ */
266
+ export function recordSandboxSweep(counts, attrs = {}) {
267
+ if (!enabled)
268
+ return;
269
+ const metricAttrs = safeMetricAttributes(attrs);
270
+ const m = meter();
271
+ m.createCounter("lastlight.sandbox.sweep.runs").add(1, metricAttrs);
272
+ m.createHistogram("lastlight.sandbox.sweep.duration_ms").record(counts.durationMs, metricAttrs);
273
+ const deleted = m.createCounter("lastlight.sandbox.sweep.deleted");
274
+ deleted.add(counts.deletedStale, { ...metricAttrs, policy: "stale" });
275
+ deleted.add(counts.deletedOverCap, { ...metricAttrs, policy: "over_cap" });
276
+ m.createCounter("lastlight.sandbox.sweep.delete_failures").add(counts.deletedFailed, metricAttrs);
277
+ // A gauge, not a counter: this is the population observed this run, not a
278
+ // cumulative total. OTel attributes are flat, so the breakdown the log event
279
+ // nests under `pvcs` becomes a `state` dimension here.
280
+ const pvcs = m.createGauge("lastlight.sandbox.sweep.pvcs");
281
+ pvcs.record(counts.pvcsFound, { ...metricAttrs, state: "found" });
282
+ pvcs.record(counts.pvcsLive, { ...metricAttrs, state: "live" });
283
+ pvcs.record(counts.pvcsStale, { ...metricAttrs, state: "stale" });
284
+ pvcs.record(counts.pvcsCurrent, { ...metricAttrs, state: "current" });
285
+ }
248
286
  export function recordWorkflowRunStart(attrs = {}) {
249
287
  if (enabled)
250
288
  meter().createCounter("lastlight.workflow.run.started").add(1, safeMetricAttributes({ ...attrs, surface: "workflow" }));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/telemetry/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAA+B,MAAM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C,2BAA2B,EAAE,+BAA+B;QAC5D,2BAA2B,EAAE,eAAe;KAC7C,CAAC;IACF,KAAK,MAAM,GAAG,IAAI,sBAAsB,EAAE,CAAC;QACzC,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,KAAK,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACxD,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAyB,OAAO,CAAC,GAAG;IACvE,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,KAAK,MAAM,GAAG,IAAI,0BAA0B,EAAE,CAAC;QAC7C,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,KAAK;YAAE,SAAS;QACrB,mEAAmE;QACnE,sEAAsE;QACtE,qEAAqE;QACrE,qEAAqE;QACrE,sEAAsE;QACtE,uEAAuE;QACvE,kEAAkE;QAClE,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,GAAG,CAAC,IAAI,CAAC,uEAAuE,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;YAC3F,SAAS;QACX,CAAC;QACD,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACnB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -1,3 +1,13 @@
1
+ /**
2
+ * Resolve a classifier intent to the handler the router would pick, using the
3
+ * same `routes` map the router consults (slack keys use `_`, intents use `-`),
4
+ * falling back to the workflow that claims the intent, then the intent itself.
5
+ *
6
+ * Lives here rather than in `admin/routes.ts` (its original home) because the
7
+ * trigger table below needs the same mapping — a second copy of this three-way
8
+ * fallback is exactly the kind of drift this module is being cleaned of.
9
+ */
10
+ export declare function resolveIntentHandler(intent: string): string;
1
11
  export type TriggerInfo = {
2
12
  kind: "cron";
3
13
  name: string;
@@ -1,5 +1,19 @@
1
- import { getCronWorkflows } from "./loader.js";
1
+ import { getCronWorkflows, getWorkflowByIntent, listAgentWorkflows } from "./loader.js";
2
2
  import { getRoutes, getBotName } from "../config/config.js";
3
+ /**
4
+ * Resolve a classifier intent to the handler the router would pick, using the
5
+ * same `routes` map the router consults (slack keys use `_`, intents use `-`),
6
+ * falling back to the workflow that claims the intent, then the intent itself.
7
+ *
8
+ * Lives here rather than in `admin/routes.ts` (its original home) because the
9
+ * trigger table below needs the same mapping — a second copy of this three-way
10
+ * fallback is exactly the kind of drift this module is being cleaned of.
11
+ */
12
+ export function resolveIntentHandler(intent) {
13
+ const routes = getRoutes();
14
+ const key = intent.replace(/-/g, "_");
15
+ return routes.slack[intent] ?? routes.slack[key] ?? getWorkflowByIntent(intent)?.name ?? intent;
16
+ }
3
17
  function add(map, name, info) {
4
18
  if (!name)
5
19
  return;
@@ -20,11 +34,35 @@ function routeTriggers() {
20
34
  add(map, routes.github.issue_explore, { kind: "mention", description: `\`${bot} explore …\` on an issue comment` });
21
35
  add(map, routes.github.issue_comment, { kind: "mention", description: `\`${bot} <message>\` on an issue comment` });
22
36
  add(map, routes.github.security_feedback, { kind: "internal", description: "Chained from `security-review` when issues are found" });
23
- add(map, routes.slack.build, { kind: "slack", command: "build", description: "Slack: `build <repo>#<n>`" });
24
- add(map, routes.slack.triage, { kind: "slack", command: "triage", description: "Slack: `triage <repo>`" });
25
- add(map, routes.slack.review, { kind: "slack", command: "review", description: "Slack: `review <repo>`" });
26
- add(map, routes.slack.security, { kind: "slack", command: "security", description: "Slack: `security <repo>`" });
27
- add(map, routes.slack.explore, { kind: "slack", command: "explore", description: "Slack: `explore <repo>#<n>`" });
37
+ // The three structured `@bot <verb>` commands the router matches before it
38
+ // ever reaches the classifier (maintainer-gated, like security-review).
39
+ add(map, routes.github.security_review, { kind: "mention", description: `\`${bot} security-review\` on an issue / PR comment (maintainers only)` });
40
+ add(map, routes.github.verify, { kind: "mention", description: `\`${bot} verify <claim>\` on an issue / PR comment (maintainers only)` });
41
+ add(map, routes.github.qa_test, { kind: "mention", description: `\`${bot} qa-test <target>\` on an issue / PR comment (maintainers only)` });
42
+ add(map, routes.github.demo, { kind: "mention", description: `\`${bot} demo <notes>\` on an issue / PR comment (maintainers only)` });
43
+ // Slack triggers are DERIVED from each workflow's own `chat:` block — the same
44
+ // source the chat agent advertises from (see engine/chat/chat-prompt.ts) —
45
+ // rather than a hand-kept list. The list here used to name five workflows
46
+ // while the router routed nine, so the dashboard showed no Slack trigger for
47
+ // verify / qa-test / demo / answer.
48
+ //
49
+ // Gate on the CLASSIFICATION intent, not the chat trigger: the intent is what
50
+ // the Slack switch dispatches on, so a `chat:` entry without one (repo-health,
51
+ // which is cron-only) correctly contributes nothing here. The trigger phrase is
52
+ // only the description, and falls back to the summary for a workflow with no
53
+ // fixed phrase to type — `answer` is reached by asking a research question, not
54
+ // by typing a command.
55
+ for (const def of listAgentWorkflows()) {
56
+ const intent = def.classification?.intent;
57
+ if (!intent || !def.chat)
58
+ continue;
59
+ const { trigger, summary } = def.chat;
60
+ add(map, resolveIntentHandler(intent), {
61
+ kind: "slack",
62
+ command: intent,
63
+ description: trigger ? `Slack: \`${trigger}\`` : `Slack: ${summary}`,
64
+ });
65
+ }
28
66
  return map;
29
67
  }
30
68
  export function getWorkflowTriggers(workflowName) {
@@ -1 +1 @@
1
- {"version":3,"file":"triggers.js","sourceRoot":"","sources":["../../src/workflows/triggers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAS5D,SAAS,GAAG,CAAC,GAA+B,EAAE,IAAwB,EAAE,IAAiB;IACvF,IAAI,CAAC,IAAI;QAAE,OAAO;IAClB,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,G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,CAAC,CAAC;AAC1C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lastlight-core",
3
- "version": "0.25.1",
3
+ "version": "0.25.3",
4
4
  "description": "GitHub repository maintenance agent — Agent SDK harness",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -68,9 +68,9 @@
68
68
  "pino-pretty": "13.1.3",
69
69
  "yaml": "^2.8.3",
70
70
  "zod": "^4.3.6",
71
- "lastlight-shared": "0.3.4",
72
- "agentic-pi": "0.4.1",
73
- "lastlight-workflow-engine": "0.3.3"
71
+ "agentic-pi": "0.4.2",
72
+ "lastlight-shared": "0.3.5",
73
+ "lastlight-workflow-engine": "0.3.4"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@opentelemetry/context-async-hooks": "^2.10.0",
@@ -14,9 +14,22 @@ verifying someone else's PR.
14
14
  ## Workspace & git
15
15
 
16
16
  The harness pre-cloned the repo; your cwd is the repo root (or a `<repo>/`
17
- subdirectory — check with `ls -la`). Git is configured for clone/push/pull/fetch.
18
- If auth fails after ~1 hour, call the `github_refresh_git_auth` MCP tool. Suppress
19
- noise where it helps: `git clone --quiet`, `git push --quiet`, `CI=true`.
17
+ subdirectory — check with `ls -la`). Git is configured for clone/fetch/pull and
18
+ local commits. If auth fails after ~1 hour, call the `github_refresh_git_auth`
19
+ MCP tool. Suppress noise where it helps: `git clone --quiet`, `CI=true`.
20
+
21
+ Getting work onto the branch is not a git operation: a commit built by git here
22
+ is unsigned and a repo that requires signed commits blocks it permanently, so a
23
+ phase that publishes does it with `github_publish` rather than `git push`. Your
24
+ prompt says whether yours publishes and with what arguments.
25
+
26
+ **A new file cannot be published executable.** GitHub builds the commit from
27
+ paths and contents, with no file mode, so a new `100755` file is refused and
28
+ nothing is published. Adding a script is the case you will hit: leave it
29
+ non-executable (no `chmod +x`) and invoke it through its interpreter —
30
+ `bash scripts/verify.sh`, `python scripts/check.py` — in the docs, the CI
31
+ workflow and anywhere else that calls it. Symlinks, submodule pointers and a
32
+ mode change on an existing file are refused too, and those need a human.
20
33
 
21
34
  ## Install-first
22
35
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: chat
3
- description: Conversational assistant for messaging-platform threads (Slack, Discord). Answer questions about repos, PRs, and issues, explain code, and guide users to natural-language triggers (e.g. "build owner/repo#N", "triage owner/repo", "review PRs on owner/repo", "status").
3
+ description: Conversational assistant for messaging-platform threads (Slack, Discord). Answer questions about repos, PRs, and issues, explain code, and guide users to the natural-language workflow triggers listed in the system prompt.
4
+ chat: true
4
5
  ---
5
6
 
6
7
  # Chat
@@ -18,13 +19,14 @@ the job — answer the question that was asked, don't expand it into a report.
18
19
 
19
20
  Chat is **read-and-explain only**. You don't review PRs, triage issues, run
20
21
  builds, or change anything. When the user wants an *action*, name the
21
- natural-language trigger and stop:
22
-
23
- - code changes → `build owner/repo#N`
24
- - issue triage → `triage owner/repo`
25
- - PR review → `review PRs on owner/repo`
26
- - security scan → `security review owner/repo`
27
- - running-task status → `status`
22
+ natural-language trigger and stop.
23
+
24
+ **The triggers are in your system prompt, not here.** They're composed from the
25
+ workflows this deployment actually has enabled, so the set differs per instance
26
+ and changes when an operator enables or disables one. Read them from the
27
+ "Natural-language triggers you can suggest" list and never suggest anything
28
+ outside it — a trigger that isn't on the list either doesn't exist here or has
29
+ been turned off, and naming it sends the user at a dead route.
28
30
 
29
31
  Phrase triggers as natural language — never with a leading `/`, which Slack
30
32
  intercepts before it reaches Last Light.
@@ -109,9 +109,12 @@ Four rules, all load-bearing — these lines are parsed:
109
109
  - **Write `class=` nowhere else in your output.** The class is read off that
110
110
  token, so a "this is not `class=flaky` because…" aside in your prose changes
111
111
  what the workflow does. Say "not flaky" in words.
112
- - **Report the outcome you got.** `gate=skipped` when no gate ran. Never claim
113
- `pushed` without a push or `green` without a passing gate — the next attempt
114
- reasons from this line.
112
+ - **Report the outcome you got.** `gate=skipped` when no gate ran. `outcome=pushed`
113
+ means your repair reached the branch, and in a fix phase that means
114
+ `github_publish` returned a commit — a successful publish IS this phase's
115
+ push, so report it as one even though you ran no `git push`. Never claim it
116
+ when nothing was published, and never claim `green` without a passing gate:
117
+ the next attempt reasons from this line.
115
118
 
116
119
  ## The journal
117
120
 
@@ -169,11 +172,17 @@ mechanical call-site/type update over a behavioural change. Don't refactor,
169
172
  don't chase failures unrelated to the diagnosed cause, and don't sink your
170
173
  budget into one slow or unreproducible check.
171
174
 
172
- **Push only on a green local gate.** The gate is the targeted reproduction
175
+ **Publish only on a green local gate.** The gate is the targeted reproduction
173
176
  below, written by you at runtime. If it is still red when you run out of
174
- iterations, emit `outcome=gave-up` and **do not push a speculative fix** — an
177
+ iterations, emit `outcome=gave-up` and **do not publish a speculative fix** — an
175
178
  unverified push costs a full CI cycle to prove nothing.
176
179
 
180
+ Publishing is not `git push`. A commit built by git in this sandbox is
181
+ unsigned, and on a repo that requires signed commits one unsigned commit
182
+ anywhere in the branch blocks the PR permanently and cannot be cleared by a
183
+ later run — so your work reaches the branch through `github_publish`, which has
184
+ GitHub build and sign the commit. Your phase's prompt gives the arguments.
185
+
177
186
  ## The gate
178
187
 
179
188
  **Write it to `.git/lastlight-verify.sh`** — a path relative to your cwd, which
@@ -182,10 +191,10 @@ green and ends the loop.
182
191
 
183
192
  It answers exactly one question: **is the thing I diagnosed actually fixed?**
184
193
  That makes it a *targeted reproduction*, never a stand-in for CI. CI runs on the
185
- commit you push — real OS, real services, the whole matrix — and it is the
194
+ commit you publish — real OS, real services, the whole matrix — and it is the
186
195
  authority on whether this PR is green. Duplicating it here buys no information
187
- and costs the one thing you are short of: a ten-minute gate delays the push by
188
- ten minutes, and CI has usually gone green before it finishes.
196
+ and costs the one thing you are short of: a ten-minute gate delays the publish
197
+ by ten minutes, and CI has usually gone green before it finishes.
189
198
 
190
199
  So write **the narrowest command that would have failed before your fix and
191
200
  passes after it** — one test file, one lint rule, one build target, one install.
@@ -244,7 +253,7 @@ gate anyway** — just not a CI clone. In order of preference:
244
253
  can never go green, so it spends its remaining iterations re-running the whole
245
254
  fix phase against a repair that was already finished, ends on the phase's
246
255
  failure message, and leaves you reporting `gate=skipped` — which counts as RED
247
- and never authorises the push the repair needed. A correct conflict resolution would be
256
+ and never authorises the publish the repair needed. A correct conflict resolution would be
248
257
  thrown away for want of two lines of bash. The script's contents are recorded on
249
258
  the run and read by humans afterwards, so an empty gate is an inspectable claim
250
259
  you are making in writing; a missing one is indistinguishable from a broken one.
@@ -269,4 +278,4 @@ Four rules about the file:
269
278
  not need to exclude or clean them up.)
270
279
  - **No gate is a RED gate.** If you did not write the script, or you could not
271
280
  run it, report `gate=skipped` — and treat that exactly as `gate=red`: it does
272
- **not** authorise a push. Only a script that actually exited 0 does.
281
+ **not** authorise a publish. Only a script that actually exited 0 does.
@@ -3,6 +3,7 @@ name: issue-triage
3
3
  description: Triage GitHub issues through the canonical state machine — classify, label, deduplicate, request missing info, write agent briefs, and manage stale issues. Use on demand or on a triage cron.
4
4
  version: 2.0.0
5
5
  tags: [github, issues, triage]
6
+ chat: true
6
7
  ---
7
8
 
8
9
  # Issue Triage
@@ -3,6 +3,7 @@ name: pr-review
3
3
  description: Review a GitHub pull request and post one formal review — advance the existing discussion and give precision-first, high-signal feedback. A pure code review — no building. Use when asked to review a PR or on a cron PR scan.
4
4
  version: 7.2.0
5
5
  tags: [github, review, code-quality]
6
+ chat: true
6
7
  ---
7
8
 
8
9
  # PR Review
@@ -3,6 +3,7 @@ name: repo-health
3
3
  description: Generate a health report for a GitHub repository — open-issue and PR backlog, unreviewed PRs, stale needs-info, failing CI, and the resulting action items. Use for a status report or on a weekly cron.
4
4
  version: 2.0.0
5
5
  tags: [github, monitoring, reporting]
6
+ chat: true
6
7
  ---
7
8
 
8
9
  # Repo Health
@@ -148,8 +148,15 @@ Pick the single best-fit bucket:
148
148
  [references/templates.md](references/templates.md) if missing.
149
149
  4. Append a row to the matching table (accepted risks OR false positives) per the
150
150
  template.
151
- 5. Commit on branch `security/feedback-{parentIssueNumber}-{shortFingerprint}`,
152
- push, and open a PR titled `security: record {accept-risk|false-positive} for {shortFingerprint}`.
151
+ 5. Publish with `github_publish` — `{ owner, repo, branch:
152
+ "security/feedback-{parentIssueNumber}-{shortFingerprint}", path: <the
153
+ directory step 3 cloned into>, message: "security: record
154
+ {accept-risk|false-positive} for {shortFingerprint}" }`. That branch does not
155
+ exist yet; the tool creates it off the default branch and has GitHub build
156
+ and sign the commit. Do NOT use `git commit` / `git push`: a commit built by
157
+ git here is unsigned, and on a repo that requires signed commits one unsigned
158
+ commit blocks the PR permanently. Then open a PR titled `security: record
159
+ {accept-risk|false-positive} for {shortFingerprint}`.
153
160
  6. Comment on the parent: `Opened PR #{prNumber} to record this in SECURITY.md.
154
161
  Once merged, this finding will be suppressed in future scans.`
155
162
  7. Do **not** tick the task-list checkbox — that marker is reserved for "broken out to sub-issue".
@@ -23,6 +23,18 @@ classification:
23
23
  # counter-example above: on an ISSUE there is no chat to downgrade TO, and
24
24
  # the alternative is triaging a question as a work item.
25
25
  - '"what does the pr-review workflow actually do?" with ISSUE TITLE "Question: what does pr-review do?" → INTENT: QUESTION, REPO: NONE, ISSUE: NONE, REASON: NONE'
26
+ chat:
27
+ summary: Research a question that needs the web or a deep read of a checkout
28
+ deflect:
29
+ - how does <repo> compare to <other tool>?
30
+ - what do the upstream docs say about <X>?
31
+ - a research-heavy question that needs web search or deep doc reading
32
+ reply: >-
33
+ this runs as a sandboxed answer workflow, but only when you name a managed
34
+ repo. If the user asked such a question without a repo, ask them to include it
35
+ (e.g. "how does cliftonc/lastlight compare to X?") and the answer will be
36
+ researched and posted back here. Don't attempt the deep research yourself
37
+ in-process.
26
38
  description: |
27
39
  Answer a question issue directly. Used when a newly-opened issue asks for
28
40
  information, an explanation, or a comparison rather than a code change — the
@@ -15,6 +15,14 @@ classification:
15
15
  - '"delete any files in ~/work/lastlight/docs" → INTENT: CHAT, REPO: NONE, ISSUE: NONE, REASON: NONE'
16
16
  - '"can you remove the old docs folder for me" (no ISSUE TITLE, no repo) → INTENT: CHAT, REPO: NONE, ISSUE: NONE, REASON: NONE'
17
17
  - '"build something cool" (no repo, no ISSUE TITLE) → INTENT: CHAT, REPO: NONE, ISSUE: NONE, REASON: NONE'
18
+ chat:
19
+ trigger: "build owner/repo#N"
20
+ summary: Implement or fix a specific issue
21
+ deflect:
22
+ - build this
23
+ - implement this
24
+ - fix this bug
25
+ reply: 'reply: "tell me `build owner/repo#N` (open the GitHub issue first if needed)"'
18
26
  description: "Architect -> Executor -> Reviewer build cycle"
19
27
  trigger: build
20
28
  # Render progress as a single in-place task-list comment/message that updates
@@ -7,6 +7,14 @@ classification:
7
7
  examples:
8
8
  - '"record a demo of this" with ISSUE TITLE "Add dark-mode toggle" → INTENT: DEMO, REPO: NONE, ISSUE: NONE, REASON: NONE'
9
9
  - '"make a short before/after video of the fix on cliftonc/foo#12" → INTENT: DEMO, REPO: cliftonc/foo, ISSUE: 12, REASON: NONE'
10
+ chat:
11
+ trigger: "demo owner/repo#N -- <what to show>"
12
+ summary: Record a short demo video of a feature or PR
13
+ deflect:
14
+ - demo this
15
+ - record a demo of <feature>
16
+ - make a video showing <X>
17
+ - show me a before/after of the fix
10
18
  description: |
11
19
  Record a short demo VIDEO of a PR or feature and post it. Drives the repo's
12
20
  web UI in a real headless browser, screen-records the session, and composites
@@ -8,6 +8,13 @@ classification:
8
8
  - '"explore adding webhooks to cliftonc/drizby" → INTENT: EXPLORE, REPO: cliftonc/drizby, ISSUE: NONE, REASON: NONE'
9
9
  - '"explore" with ISSUE TITLE "Feature: Allow configuration of otel endpoints" → INTENT: EXPLORE, REPO: NONE, ISSUE: NONE, REASON: NONE'
10
10
  - '"explore this" with ISSUE TITLE "Add webhook support" → INTENT: EXPLORE, REPO: NONE, ISSUE: NONE, REASON: NONE'
11
+ chat:
12
+ trigger: explore owner/repo
13
+ summary: Shape an idea into a spec before any code is written
14
+ deflect:
15
+ - help me think through <idea>
16
+ - brainstorm <idea>
17
+ - spec this out
11
18
  description: |
12
19
  Socratic idea-shaping loop: read the existing issue/thread for context, ask
13
20
  clarifying questions in a reply-gated loop until the shape is clear, then