lastlight-core 0.28.1 → 0.28.2
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/activity.d.ts +19 -0
- package/dist/activity.js +28 -0
- package/dist/activity.js.map +1 -0
- package/dist/admin/activity.d.ts +16 -0
- package/dist/admin/activity.js +21 -0
- package/dist/admin/activity.js.map +1 -0
- package/dist/admin/auth.d.ts +10 -0
- package/dist/admin/auth.js +22 -1
- package/dist/admin/auth.js.map +1 -1
- package/dist/admin/routes.js +211 -7
- package/dist/admin/routes.js.map +1 -1
- package/dist/cron/dependabot-discovery.d.ts +1 -1
- package/dist/cron/handlers.js +20 -0
- package/dist/cron/handlers.js.map +1 -1
- package/dist/cron/runner.js +24 -2
- package/dist/cron/runner.js.map +1 -1
- package/dist/engine/dispatcher.js +77 -2
- package/dist/engine/dispatcher.js.map +1 -1
- package/dist/engine/fix-harvest.js +2 -2
- package/dist/engine/fix-harvest.js.map +1 -1
- package/dist/engine/pr-decisions.js +3 -3
- package/dist/engine/pr-decisions.js.map +1 -1
- package/dist/engine/pr-state.d.ts +1 -1
- package/dist/engine/pr-state.js +3 -3
- package/dist/engine/pr-state.js.map +1 -1
- package/dist/index.js +47 -6
- package/dist/index.js.map +1 -1
- package/dist/sandbox/reap.d.ts +1 -1
- package/dist/sandbox/reap.js +1 -1
- package/dist/state/activity-store.d.ts +118 -0
- package/dist/state/activity-store.js +173 -0
- package/dist/state/activity-store.js.map +1 -0
- package/dist/state/data-migrate.js +3 -0
- package/dist/state/data-migrate.js.map +1 -1
- package/dist/state/db.d.ts +9 -0
- package/dist/state/db.js +9 -0
- package/dist/state/db.js.map +1 -1
- package/dist/state/schema/pg.d.ts +171 -0
- package/dist/state/schema/pg.js +16 -0
- package/dist/state/schema/pg.js.map +1 -1
- package/dist/state/schema/sqlite.d.ts +197 -0
- package/dist/state/schema/sqlite.js +30 -0
- package/dist/state/schema/sqlite.js.map +1 -1
- package/dist/workflows/runner.d.ts +11 -0
- package/dist/workflows/runner.js +17 -33
- package/dist/workflows/runner.js.map +1 -1
- package/dist/workflows/simple.d.ts +3 -4
- package/dist/workflows/simple.js +32 -25
- package/dist/workflows/simple.js.map +1 -1
- package/dist/workflows/target-policy.d.ts +95 -73
- package/dist/workflows/target-policy.js +147 -96
- package/dist/workflows/target-policy.js.map +1 -1
- package/drizzle/pg/0001_brief_gargoyle.sql +15 -0
- package/drizzle/pg/meta/0001_snapshot.json +1876 -0
- package/drizzle/pg/meta/_journal.json +7 -0
- package/drizzle/sqlite/0002_aromatic_vector.sql +15 -0
- package/drizzle/sqlite/meta/0002_snapshot.json +1704 -0
- package/drizzle/sqlite/meta/_journal.json +8 -1
- package/package.json +4 -4
- package/workflows/answer.yaml +4 -0
- package/workflows/build.yaml +8 -0
- package/workflows/demo.yaml +10 -0
- package/workflows/dependabot-ci-fix.yaml +7 -0
- package/workflows/dependabot-pr-merge.yaml +7 -0
- package/workflows/explore.yaml +4 -0
- package/workflows/issue-comment.yaml +4 -0
- package/workflows/issue-triage.yaml +4 -0
- package/workflows/pr-comment.yaml +4 -0
- package/workflows/pr-fix.yaml +7 -0
- package/workflows/pr-review.yaml +9 -0
- package/workflows/qa-test.yaml +10 -0
- package/workflows/repo-health.yaml +5 -0
- package/workflows/security-feedback.yaml +4 -0
- package/workflows/security-review.yaml +4 -0
- package/workflows/verify.yaml +10 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lastlight-core",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.2",
|
|
4
4
|
"description": "GitHub repository maintenance agent — Agent SDK harness",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"node": ">=22.12"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@earendil-works/pi-ai": "^0.84.
|
|
48
|
+
"@earendil-works/pi-ai": "^0.84.3",
|
|
49
49
|
"@hono/node-server": "^2.1.1",
|
|
50
50
|
"@kubernetes/client-node": "1.4.0",
|
|
51
51
|
"@libsql/client": "^0.17.4",
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
"@opentelemetry/semantic-conventions": "^1.41.1",
|
|
65
65
|
"@sinclair/typebox": "^0.34.49",
|
|
66
66
|
"@slack/bolt": "^5.0.0",
|
|
67
|
-
"@slack/web-api": "^8.
|
|
67
|
+
"@slack/web-api": "^8.1.1",
|
|
68
68
|
"arctic": "^3.7.0",
|
|
69
69
|
"croner": "^10.0.1",
|
|
70
70
|
"drizzle-orm": "^0.45.2",
|
|
71
|
-
"hono": "^4.13.
|
|
71
|
+
"hono": "^4.13.5",
|
|
72
72
|
"octokit": "^5.0.5",
|
|
73
73
|
"pg": "^8.23.0",
|
|
74
74
|
"pino": "10.3.1",
|
package/workflows/answer.yaml
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
kind: answer
|
|
2
2
|
name: answer
|
|
3
|
+
# Runtime policy (issue #368) — read + post the answer as a comment; never
|
|
4
|
+
# pushes code. Full prose for each key is in the workflow schema
|
|
5
|
+
# (packages/workflow-engine/src/core/schema.ts).
|
|
6
|
+
git_access: issues-write
|
|
3
7
|
classification:
|
|
4
8
|
intent: question
|
|
5
9
|
description: |
|
package/workflows/build.yaml
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
kind: build
|
|
2
2
|
name: build
|
|
3
|
+
# Runtime policy (issue #368) — pushes code, and recreates its workspace from
|
|
4
|
+
# the default branch so an incomplete build is disposable (issue #153).
|
|
5
|
+
# Pre-populates despite synthesizing its own `lastlight/N-slug` branch — it
|
|
6
|
+
# CREATES that branch off the default. Full prose for each key is in the
|
|
7
|
+
# workflow schema (packages/workflow-engine/src/core/schema.ts).
|
|
8
|
+
git_access: repo-write
|
|
9
|
+
workspace: per-target-recreate
|
|
10
|
+
prepopulate_synth_branch: true
|
|
3
11
|
classification:
|
|
4
12
|
intent: build
|
|
5
13
|
description: |
|
package/workflows/demo.yaml
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
kind: demo
|
|
2
2
|
name: demo
|
|
3
|
+
# Runtime policy (issue #368) — reads the repo and posts the demo comment (the
|
|
4
|
+
# mp4 is an artifact, not a push). Pre-populates its synthesized branch so
|
|
5
|
+
# `demo.mp4` lands under `.lastlight/<key>/` where `serverArtifacts()`
|
|
6
|
+
# harvests it; against a real PR it pins to the PR's head ref, or the "after"
|
|
7
|
+
# would collapse onto the default branch and match "before". Full prose for
|
|
8
|
+
# each key is in the workflow schema
|
|
9
|
+
# (packages/workflow-engine/src/core/schema.ts).
|
|
10
|
+
git_access: issues-write
|
|
11
|
+
prepopulate_synth_branch: true
|
|
12
|
+
prepopulate_pr_head_ref: true
|
|
3
13
|
classification:
|
|
4
14
|
intent: demo
|
|
5
15
|
description: |
|
|
@@ -7,6 +7,13 @@ name: dependabot-ci-fix
|
|
|
7
7
|
# drops the key silently loses all four; `validateAssets` warns when a
|
|
8
8
|
# `routes.github.pr_*` target is missing it.
|
|
9
9
|
pr_scoped: true
|
|
10
|
+
# Runtime policy (issue #368) — pushes a fix to the PR's head branch, through
|
|
11
|
+
# `handlePrFix`. Shares the fix family's one workspace per PR
|
|
12
|
+
# (`${repo}-${N}-fix`). Full prose for each key is in the workflow schema
|
|
13
|
+
# (packages/workflow-engine/src/core/schema.ts).
|
|
14
|
+
git_access: repo-write
|
|
15
|
+
workspace: per-target-reuse
|
|
16
|
+
pr_fix_shaped: true
|
|
10
17
|
description: |
|
|
11
18
|
Fix a dependency-update PR (Dependabot / Renovate) that can't merge on its
|
|
12
19
|
own — CI is red, or it's `behind` its base / `dirty` (merge conflict) /
|
|
@@ -7,6 +7,13 @@ name: dependabot-pr-merge
|
|
|
7
7
|
# drops the key silently loses all four; `validateAssets` warns when a
|
|
8
8
|
# `routes.github.pr_*` target is missing it.
|
|
9
9
|
pr_scoped: true
|
|
10
|
+
# Runtime policy (issue #368) — never pushes code, but
|
|
11
|
+
# `github_enable_auto_merge` lives in the repo-write tool profile. Always
|
|
12
|
+
# single-PR, so it keys its (checkout-free) run by (repo, PR) and a repeated
|
|
13
|
+
# webhook + the daily cron backstop dedup onto one run. Full prose for each
|
|
14
|
+
# key is in the workflow schema (packages/workflow-engine/src/core/schema.ts).
|
|
15
|
+
git_access: repo-write
|
|
16
|
+
workspace: per-target-reuse
|
|
10
17
|
description: |
|
|
11
18
|
Assess an already-GREEN dependency-update PR (Dependabot / Renovate) and, when
|
|
12
19
|
the change is trivial, enable GitHub auto-merge (squash) so it lands once its
|
package/workflows/explore.yaml
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
kind: explore
|
|
2
2
|
name: explore
|
|
3
|
+
# Runtime policy (issue #368) — reads, researches and publishes a spec as an
|
|
4
|
+
# issue/comment; never pushes code. Full prose for each key is in the workflow
|
|
5
|
+
# schema (packages/workflow-engine/src/core/schema.ts).
|
|
6
|
+
git_access: issues-write
|
|
3
7
|
classification:
|
|
4
8
|
intent: explore
|
|
5
9
|
description: |
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
kind: comment
|
|
2
2
|
name: issue-comment
|
|
3
|
+
# Runtime policy (issue #368) — replies in-thread; never pushes code. Full
|
|
4
|
+
# prose for each key is in the workflow schema
|
|
5
|
+
# (packages/workflow-engine/src/core/schema.ts).
|
|
6
|
+
git_access: issues-write
|
|
3
7
|
description: |
|
|
4
8
|
Respond conversationally to a comment on an issue. Used when a maintainer
|
|
5
9
|
comments on an issue without explicitly asking for a build — the bot
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
kind: triage
|
|
2
2
|
name: issue-triage
|
|
3
|
+
# Runtime policy (issue #368) — labels the issue and comments; never pushes
|
|
4
|
+
# code. Full prose for each key is in the workflow schema
|
|
5
|
+
# (packages/workflow-engine/src/core/schema.ts).
|
|
6
|
+
git_access: issues-write
|
|
3
7
|
classification:
|
|
4
8
|
intent: triage
|
|
5
9
|
description: |
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
kind: comment
|
|
2
2
|
name: pr-comment
|
|
3
|
+
# Runtime policy (issue #368) — answers on the PR; never pushes code. Full
|
|
4
|
+
# prose for each key is in the workflow schema
|
|
5
|
+
# (packages/workflow-engine/src/core/schema.ts).
|
|
6
|
+
git_access: issues-write
|
|
3
7
|
description: |
|
|
4
8
|
Answer a maintainer's question about an open PR with concrete, code-cited
|
|
5
9
|
evidence. The PR-side counterpart to `issue-comment` — distinguished
|
package/workflows/pr-fix.yaml
CHANGED
|
@@ -7,6 +7,13 @@ name: pr-fix
|
|
|
7
7
|
# drops the key silently loses all four; `validateAssets` warns when a
|
|
8
8
|
# `routes.github.pr_*` target is missing it.
|
|
9
9
|
pr_scoped: true
|
|
10
|
+
# Runtime policy (issue #368) — pushes a fix to the PR's head branch, through
|
|
11
|
+
# `handlePrFix`. Shares the fix family's one workspace per PR
|
|
12
|
+
# (`${repo}-${N}-fix`). Full prose for each key is in the workflow schema
|
|
13
|
+
# (packages/workflow-engine/src/core/schema.ts).
|
|
14
|
+
git_access: repo-write
|
|
15
|
+
workspace: per-target-reuse
|
|
16
|
+
pr_fix_shaped: true
|
|
10
17
|
description: "Lightweight PR fix — no architect/reviewer, just fix and push"
|
|
11
18
|
trigger: pr-fix
|
|
12
19
|
# Single in-place task-list comment/message instead of a comment per phase.
|
package/workflows/pr-review.yaml
CHANGED
|
@@ -7,6 +7,15 @@ name: pr-review
|
|
|
7
7
|
# drops the key silently loses all four; `validateAssets` warns when a
|
|
8
8
|
# `routes.github.pr_*` target is missing it.
|
|
9
9
|
pr_scoped: true
|
|
10
|
+
# Runtime policy (issue #368) — SUBMITS a formal review, which is its own
|
|
11
|
+
# profile above issues-write. Reuses one warm workspace per PR across
|
|
12
|
+
# re-reviews (issue #107), pinned to the PR's real head ref — the synthesized
|
|
13
|
+
# branch name never matches it, so without the pin the review would silently
|
|
14
|
+
# read the BASE branch. Full prose for each key is in the workflow schema
|
|
15
|
+
# (packages/workflow-engine/src/core/schema.ts).
|
|
16
|
+
git_access: review-write
|
|
17
|
+
workspace: per-target-reuse
|
|
18
|
+
prepopulate_pr_head_ref: true
|
|
10
19
|
classification:
|
|
11
20
|
intent: review
|
|
12
21
|
description: |
|
package/workflows/qa-test.yaml
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
kind: qa-test
|
|
2
2
|
name: qa-test
|
|
3
|
+
# Runtime policy (issue #368) — reads the repo and posts a step-level QA
|
|
4
|
+
# report; never pushes code. Pre-populates its synthesized branch so
|
|
5
|
+
# browser-QA screenshots land under `.lastlight/<key>/` where
|
|
6
|
+
# `serverArtifacts()` harvests them; against a real PR it pins to the PR's
|
|
7
|
+
# head ref, or it would QA the base branch and report the PR's feature
|
|
8
|
+
# missing. Full prose for each key is in the workflow schema
|
|
9
|
+
# (packages/workflow-engine/src/core/schema.ts).
|
|
10
|
+
git_access: issues-write
|
|
11
|
+
prepopulate_synth_branch: true
|
|
12
|
+
prepopulate_pr_head_ref: true
|
|
3
13
|
classification:
|
|
4
14
|
intent: qa-test
|
|
5
15
|
description: |
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
kind: health
|
|
2
2
|
name: repo-health
|
|
3
|
+
# Runtime policy (issue #368) — the report is delivered by the harness, not
|
|
4
|
+
# written to GitHub by the agent, so this workflow needs nothing beyond
|
|
5
|
+
# contents:read. Full prose for each key is in the workflow schema
|
|
6
|
+
# (packages/workflow-engine/src/core/schema.ts).
|
|
7
|
+
git_access: read
|
|
3
8
|
chat:
|
|
4
9
|
summary: A weekly repo health report
|
|
5
10
|
deflect:
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
kind: health
|
|
2
2
|
name: security-feedback
|
|
3
|
+
# Runtime policy (issue #368) — opens issues AND pushes a SECURITY.md
|
|
4
|
+
# suppression PR, so it needs contents:write. Full prose for each key is in
|
|
5
|
+
# the workflow schema (packages/workflow-engine/src/core/schema.ts).
|
|
6
|
+
git_access: repo-write
|
|
3
7
|
description: |
|
|
4
8
|
Process maintainer feedback on a security-labelled issue (usually a
|
|
5
9
|
per-run scan summary). Classifies the comment and acts:
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
kind: health
|
|
2
2
|
name: security-review
|
|
3
|
+
# Runtime policy (issue #368) — scans and files findings as issues/comments;
|
|
4
|
+
# never pushes code. Full prose for each key is in the workflow schema
|
|
5
|
+
# (packages/workflow-engine/src/core/schema.ts).
|
|
6
|
+
git_access: issues-write
|
|
3
7
|
classification:
|
|
4
8
|
intent: security
|
|
5
9
|
description: |
|
package/workflows/verify.yaml
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
kind: verify
|
|
2
2
|
name: verify
|
|
3
|
+
# Runtime policy (issue #368) — reads the repo and posts a CONFIRMED/REFUTED
|
|
4
|
+
# verdict; never pushes code. Pre-populates its synthesized branch so
|
|
5
|
+
# browser-QA artifacts land under `.lastlight/<key>/` where
|
|
6
|
+
# `serverArtifacts()` harvests them; against a real PR it pins to the PR's
|
|
7
|
+
# head ref, or it would verify the base branch and refute a claim the PR
|
|
8
|
+
# actually satisfies. Full prose for each key is in the workflow schema
|
|
9
|
+
# (packages/workflow-engine/src/core/schema.ts).
|
|
10
|
+
git_access: issues-write
|
|
11
|
+
prepopulate_synth_branch: true
|
|
12
|
+
prepopulate_pr_head_ref: true
|
|
3
13
|
classification:
|
|
4
14
|
intent: verify
|
|
5
15
|
description: |
|