lastlight-core 0.34.0 → 0.35.0

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 (106) hide show
  1. package/config/default.yaml +100 -138
  2. package/dist/admin/routes.js +3 -0
  3. package/dist/admin/routes.js.map +1 -1
  4. package/dist/config/config.d.ts +11 -0
  5. package/dist/config/config.js +93 -30
  6. package/dist/config/config.js.map +1 -1
  7. package/dist/engine/executors/orchestrator.d.ts +13 -0
  8. package/dist/engine/executors/orchestrator.js +22 -2
  9. package/dist/engine/executors/orchestrator.js.map +1 -1
  10. package/dist/engine/github/github.d.ts +42 -0
  11. package/dist/engine/github/github.js +41 -0
  12. package/dist/engine/github/github.js.map +1 -1
  13. package/dist/engine/github/review-poster.d.ts +16 -3
  14. package/dist/engine/github/review-poster.js +3 -3
  15. package/dist/engine/github/review-poster.js.map +1 -1
  16. package/dist/engine/github/review-summary.d.ts +2 -2
  17. package/dist/engine/github/review-summary.js +1 -1
  18. package/dist/engine/github/review-summary.js.map +1 -1
  19. package/dist/engine/pr-decisions.d.ts +7 -0
  20. package/dist/engine/pr-decisions.js +84 -97
  21. package/dist/engine/pr-decisions.js.map +1 -1
  22. package/dist/engine/pr-discussion.d.ts +23 -0
  23. package/dist/engine/pr-discussion.js +55 -0
  24. package/dist/engine/pr-discussion.js.map +1 -0
  25. package/dist/engine/pr-intent.d.ts +32 -0
  26. package/dist/engine/pr-intent.js +55 -0
  27. package/dist/engine/pr-intent.js.map +1 -0
  28. package/dist/engine/pr-state.d.ts +10 -2
  29. package/dist/engine/pr-state.js +14 -2
  30. package/dist/engine/pr-state.js.map +1 -1
  31. package/dist/engine/review-spec.d.ts +2 -87
  32. package/dist/engine/review-spec.js +2 -445
  33. package/dist/engine/review-spec.js.map +1 -1
  34. package/dist/engine/review-triage.d.ts +27 -9
  35. package/dist/engine/review-triage.js +20 -7
  36. package/dist/engine/review-triage.js.map +1 -1
  37. package/dist/evals-api.d.ts +7 -0
  38. package/dist/evals-api.js +21 -0
  39. package/dist/evals-api.js.map +1 -1
  40. package/dist/sandbox/docker.d.ts +8 -0
  41. package/dist/sandbox/docker.js +25 -0
  42. package/dist/sandbox/docker.js.map +1 -1
  43. package/dist/sandbox/k8s/kubernetes-sandbox.d.ts +5 -0
  44. package/dist/sandbox/k8s/kubernetes-sandbox.js +46 -2
  45. package/dist/sandbox/k8s/kubernetes-sandbox.js.map +1 -1
  46. package/dist/sandbox/k8s/run-agent-script.d.ts +3 -1
  47. package/dist/sandbox/k8s/run-agent-script.js +5 -2
  48. package/dist/sandbox/k8s/run-agent-script.js.map +1 -1
  49. package/dist/sandbox/resource-usage.d.ts +64 -0
  50. package/dist/sandbox/resource-usage.js +115 -0
  51. package/dist/sandbox/resource-usage.js.map +1 -0
  52. package/dist/sandbox/sandbox.d.ts +38 -0
  53. package/dist/sandbox/sandbox.js +106 -14
  54. package/dist/sandbox/sandbox.js.map +1 -1
  55. package/dist/state/execution-store.d.ts +33 -1
  56. package/dist/state/execution-store.js +54 -12
  57. package/dist/state/execution-store.js.map +1 -1
  58. package/dist/state/schema/pg.d.ts +51 -0
  59. package/dist/state/schema/pg.js +7 -1
  60. package/dist/state/schema/pg.js.map +1 -1
  61. package/dist/state/schema/sqlite.d.ts +51 -0
  62. package/dist/state/schema/sqlite.js +6 -0
  63. package/dist/state/schema/sqlite.js.map +1 -1
  64. package/dist/state/workflow-run-store.d.ts +5 -2
  65. package/dist/state/workflow-run-store.js +10 -4
  66. package/dist/state/workflow-run-store.js.map +1 -1
  67. package/dist/workflows/handlers/fanout.d.ts +29 -4
  68. package/dist/workflows/handlers/fanout.js +128 -41
  69. package/dist/workflows/handlers/fanout.js.map +1 -1
  70. package/dist/workflows/handlers/host-repo-dir.d.ts +38 -0
  71. package/dist/workflows/handlers/host-repo-dir.js +55 -0
  72. package/dist/workflows/handlers/host-repo-dir.js.map +1 -0
  73. package/dist/workflows/handlers/post-review.d.ts +9 -1
  74. package/dist/workflows/handlers/post-review.js +39 -16
  75. package/dist/workflows/handlers/post-review.js.map +1 -1
  76. package/dist/workflows/handlers/survey-units.d.ts +323 -0
  77. package/dist/workflows/handlers/survey-units.js +1211 -0
  78. package/dist/workflows/handlers/survey-units.js.map +1 -0
  79. package/dist/workflows/runner.js +42 -15
  80. package/dist/workflows/runner.js.map +1 -1
  81. package/drizzle/pg/0002_luxuriant_screwball.sql +3 -0
  82. package/drizzle/pg/meta/0002_snapshot.json +1894 -0
  83. package/drizzle/pg/meta/_journal.json +7 -0
  84. package/drizzle/sqlite/0003_first_namorita.sql +3 -0
  85. package/drizzle/sqlite/meta/0003_snapshot.json +1725 -0
  86. package/drizzle/sqlite/meta/_journal.json +7 -0
  87. package/package.json +9 -9
  88. package/skills/code-review/SKILL.md +2 -3
  89. package/skills/pr-review/SKILL.md +3 -2
  90. package/skills/pr-review/references/findings-schema.md +5 -5
  91. package/workflows/pr-review.yaml +491 -271
  92. package/workflows/prompts/review-falsify.md +17 -9
  93. package/workflows/prompts/review-select.md +113 -0
  94. package/workflows/prompts/review-site-summary.md +48 -0
  95. package/workflows/prompts/review-site.md +305 -0
  96. package/workflows/prompts/review.md +0 -60
  97. package/workflows/prompts/survey-unit.md +60 -0
  98. package/skills/adjudicate-pass/SKILL.md +0 -149
  99. package/skills/survey-pass/SKILL.md +0 -139
  100. package/workflows/prompts/review-adjudicate.md +0 -474
  101. package/workflows/prompts/survey-contract.md +0 -121
  102. package/workflows/prompts/survey-enforcement.md +0 -105
  103. package/workflows/prompts/survey-security.md +0 -162
  104. package/workflows/prompts/survey-spec.md +0 -131
  105. package/workflows/prompts/survey-state.md +0 -152
  106. package/workflows/prompts/survey-tests.md +0 -99
@@ -22,6 +22,13 @@
22
22
  "when": 1787758571818,
23
23
  "tag": "0002_aromatic_vector",
24
24
  "breakpoints": true
25
+ },
26
+ {
27
+ "idx": 3,
28
+ "version": "6",
29
+ "when": 1790482056291,
30
+ "tag": "0003_first_namorita",
31
+ "breakpoints": true
25
32
  }
26
33
  ]
27
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lastlight-core",
3
- "version": "0.34.0",
3
+ "version": "0.35.0",
4
4
  "description": "GitHub repository maintenance agent — Agent SDK harness",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -75,19 +75,19 @@
75
75
  "pino-pretty": "13.1.3",
76
76
  "yaml": "^2.8.3",
77
77
  "zod": "^4.3.6",
78
- "agentic-pi": "0.7.0",
79
- "lastlight-workflow-engine": "0.8.0",
80
- "lastlight-shared": "0.9.0"
78
+ "lastlight-shared": "0.10.0",
79
+ "lastlight-workflow-engine": "0.9.0",
80
+ "agentic-pi": "0.7.0"
81
81
  },
82
82
  "devDependencies": {
83
- "@electric-sql/pglite": "^0.5.5",
84
- "@opentelemetry/context-async-hooks": "^2.10.0",
83
+ "@electric-sql/pglite": "^0.5.8",
84
+ "@opentelemetry/context-async-hooks": "^2.11.0",
85
85
  "@opentelemetry/sdk-trace-base": "^2.10.0",
86
- "@types/node": "^26.2.0",
86
+ "@types/node": "^26.6.2",
87
87
  "@types/pg": "^8.23.1",
88
88
  "concurrently": "^10.0.5",
89
- "drizzle-kit": "^0.31.10",
90
- "tsx": "^4.23.12",
89
+ "drizzle-kit": "^0.31.11",
90
+ "tsx": "^4.23.15",
91
91
  "typescript": "^7.0.2",
92
92
  "vitest": "^4.1.11"
93
93
  },
@@ -56,9 +56,8 @@ those you are doing decides whether it fires at all.
56
56
  formal review, or recording a verdict on a branch diff. **The gate fires.**
57
57
  Everything in this section applies: yours is the last hand on the work before
58
58
  a human reads it, so an ungrounded finding costs real credibility.
59
- - **You are one pass of a multi-pass review** — discharging obligations and
60
- appending hypotheses to a per-family file for a later phase to probe and
61
- adjudicate. **The gate does not fire.** Record the mechanism you cannot yet
59
+ - **You are one pass of a multi-pass review** — recording hypotheses for a
60
+ later stage to verify and select. **The gate does not fire.** Record the mechanism you cannot yet
62
61
  refute. Every downstream stage can only *remove*, so nothing there can recover
63
62
  a hypothesis you declined to write down, and a pass that self-censors is
64
63
  deleting evidence on behalf of a stage that has not run yet.
@@ -286,8 +286,9 @@ Rules:
286
286
  cross-referenced: this skill is `chat: true` and is read in threads where
287
287
  `code-review` is not staged. Same rule, same words — change both together.)
288
288
  - `suggestion` is optional — include it only when a concrete one-to-few-line fix
289
- is obvious. It must be the exact replacement text for the anchored line(s),
290
- nothing else; GitHub renders it as an applyable suggestion.
289
+ is obvious. It must be the exact replacement code for the anchored line(s),
290
+ nothing else; GitHub renders it as an applyable suggestion, and Apply commits
291
+ it verbatim. Never a description of the change — that belongs in `body`.
291
292
  - `event` is `APPROVE` / `REQUEST_CHANGES` / `COMMENT`, matching what survived
292
293
  the gate. A clean PR is an `APPROVE` with an empty `findings` array and a short
293
294
  `summary`. Two hard constraints on it:
@@ -19,10 +19,10 @@ You never call `github_create_pull_request_review` yourself; writing this file i
19
19
  how you submit.
20
20
 
21
21
  > **Analysis mode writes a superset.** When the review evidence pipeline is on,
22
- > the adjudicate phase owns this file and adds `tier` / `family` / `hypotheses` /
23
- > `confidence` per finding and a `dropped[]` list. That contract lives in the
24
- > adjudicate prompt (`workflows/prompts/review-adjudicate.md`); everything below
25
- > is the shape both modes share.
22
+ > no agent writes this file: `site-finalize` (`lastlight-facts sites
23
+ > --finalize`, `packages/code-facts/src/site-review.ts`) builds it from the
24
+ > sites engine's selection and adds pipeline fields such as `tier` and an
25
+ > `internal[]` list; everything below is the shape both modes share.
26
26
 
27
27
  ## Top-level object
28
28
 
@@ -45,7 +45,7 @@ how you submit.
45
45
  | `severity` | string | yes | `Critical` or `Important` only. `Critical` needs a **trust boundary**, not a category: data loss, a breaking change, silent data-dropping, or a security issue where you can name the boundary the input crosses AND a capability its supplier does not already have. A tool parsing a file the invoking user wrote is robustness, not a boundary. Everything else worth posting is `Important`. Severity is what the poster ranks the inline budget on, so an inflated one spends a scarce slot. |
46
46
  | `title` | string | yes | Short label for the finding. |
47
47
  | `body` | string | yes | Concrete impact — what breaks, for which input or caller. |
48
- | `suggestion` | string | no | Exact replacement text for the anchored line(s). Rendered as an applyable ```suggestion block. Include only when a concrete one-to-few-line fix is obvious. |
48
+ | `suggestion` | string | no | Exact replacement **code** for the lines `existingCode` quotes — same indentation, nothing before or after. Rendered as an applyable ```suggestion block: pressing Apply commits it verbatim over those lines, so it is never a description of a change ("Add …", "Move …"). Omit it unless the fix is a drop-in edit of exactly those lines as they are at head — another file, a new test or a choice between options belongs in `body`. |
49
49
 
50
50
  ## Quote the code; do not count the lines
51
51