lastlight 0.1.8 → 0.2.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.
- package/README.md +265 -118
- package/agent-context/rules.md +62 -9
- package/agent-context/security.md +69 -0
- package/config/default.yaml +89 -0
- package/deploy/.env.production.example +20 -2
- package/deploy/entrypoint.sh +16 -17
- package/deploy/native/README.md +160 -0
- package/deploy/native/install.sh +110 -0
- package/deploy/native/lastlight.env.example +95 -0
- package/deploy/native/lastlight.service +50 -0
- package/deploy/sandbox-entrypoint.sh +59 -42
- package/dist/admin/auth.d.ts +1 -1
- package/dist/admin/auth.js +3 -1
- package/dist/admin/auth.js.map +1 -1
- package/dist/admin/chat-session-reader.d.ts +11 -14
- package/dist/admin/chat-session-reader.js +27 -51
- package/dist/admin/chat-session-reader.js.map +1 -1
- package/dist/admin/docker.d.ts +37 -0
- package/dist/admin/docker.js +86 -1
- package/dist/admin/docker.js.map +1 -1
- package/dist/admin/index.js +38 -3
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/log-search.test.d.ts +1 -0
- package/dist/admin/log-search.test.js +78 -0
- package/dist/admin/log-search.test.js.map +1 -0
- package/dist/admin/routes.d.ts +52 -3
- package/dist/admin/routes.js +780 -63
- package/dist/admin/routes.js.map +1 -1
- package/dist/admin/routes.test.js +680 -14
- package/dist/admin/routes.test.js.map +1 -1
- package/dist/admin/server-logs.test.d.ts +1 -0
- package/dist/admin/server-logs.test.js +58 -0
- package/dist/admin/server-logs.test.js.map +1 -0
- package/dist/admin/sessions.d.ts +26 -39
- package/dist/admin/sessions.js +86 -310
- package/dist/admin/sessions.js.map +1 -1
- package/dist/admin/sessions.test.d.ts +1 -0
- package/dist/admin/sessions.test.js +78 -0
- package/dist/admin/sessions.test.js.map +1 -0
- package/dist/admin/version.d.ts +15 -0
- package/dist/admin/version.js +73 -0
- package/dist/admin/version.js.map +1 -0
- package/dist/admin/version.test.d.ts +1 -0
- package/dist/admin/version.test.js +71 -0
- package/dist/admin/version.test.js.map +1 -0
- package/dist/cli-config.d.ts +55 -0
- package/dist/cli-config.js +119 -0
- package/dist/cli-config.js.map +1 -0
- package/dist/cli-config.test.d.ts +1 -0
- package/dist/cli-config.test.js +92 -0
- package/dist/cli-config.test.js.map +1 -0
- package/dist/cli-format.d.ts +19 -0
- package/dist/cli-format.js +107 -0
- package/dist/cli-format.js.map +1 -0
- package/dist/cli-server.d.ts +73 -0
- package/dist/cli-server.js +347 -0
- package/dist/cli-server.js.map +1 -0
- package/dist/cli-server.test.d.ts +1 -0
- package/dist/cli-server.test.js +38 -0
- package/dist/cli-server.test.js.map +1 -0
- package/dist/cli-timeline.d.ts +35 -0
- package/dist/cli-timeline.js +373 -0
- package/dist/cli-timeline.js.map +1 -0
- package/dist/cli-timeline.test.d.ts +1 -0
- package/dist/cli-timeline.test.js +104 -0
- package/dist/cli-timeline.test.js.map +1 -0
- package/dist/cli.d.ts +0 -19
- package/dist/cli.js +910 -194
- package/dist/cli.js.map +1 -1
- package/dist/config-overlay.test.d.ts +1 -0
- package/dist/config-overlay.test.js +112 -0
- package/dist/config-overlay.test.js.map +1 -0
- package/dist/config-resolve.d.ts +28 -0
- package/dist/config-resolve.js +47 -0
- package/dist/config-resolve.js.map +1 -0
- package/dist/config-resolve.test.d.ts +1 -0
- package/dist/config-resolve.test.js +68 -0
- package/dist/config-resolve.test.js.map +1 -0
- package/dist/config.d.ts +62 -49
- package/dist/config.js +452 -76
- package/dist/config.js.map +1 -1
- package/dist/config.test.js +201 -32
- package/dist/config.test.js.map +1 -1
- package/dist/connectors/github-webhook.js +83 -5
- package/dist/connectors/github-webhook.js.map +1 -1
- package/dist/connectors/github-webhook.test.d.ts +1 -0
- package/dist/connectors/github-webhook.test.js +156 -0
- package/dist/connectors/github-webhook.test.js.map +1 -0
- package/dist/connectors/messaging/session-manager.d.ts +18 -0
- package/dist/connectors/messaging/session-manager.js +83 -2
- package/dist/connectors/messaging/session-manager.js.map +1 -1
- package/dist/connectors/messaging/session-manager.test.d.ts +1 -0
- package/dist/connectors/messaging/session-manager.test.js +144 -0
- package/dist/connectors/messaging/session-manager.test.js.map +1 -0
- package/dist/connectors/slack/connector.d.ts +9 -0
- package/dist/connectors/slack/connector.js +15 -0
- package/dist/connectors/slack/connector.js.map +1 -1
- package/dist/connectors/slack/mrkdwn.js +81 -0
- package/dist/connectors/slack/mrkdwn.js.map +1 -1
- package/dist/connectors/slack/mrkdwn.test.js +49 -0
- package/dist/connectors/slack/mrkdwn.test.js.map +1 -1
- package/dist/connectors/types.d.ts +1 -1
- package/dist/cron/fanout.d.ts +33 -0
- package/dist/cron/fanout.js +55 -0
- package/dist/cron/fanout.js.map +1 -0
- package/dist/cron/fanout.test.d.ts +1 -0
- package/dist/cron/fanout.test.js +73 -0
- package/dist/cron/fanout.test.js.map +1 -0
- package/dist/cron/jobs.d.ts +5 -0
- package/dist/cron/jobs.js +10 -3
- package/dist/cron/jobs.js.map +1 -1
- package/dist/cron/scheduler.d.ts +12 -0
- package/dist/cron/scheduler.js +27 -1
- package/dist/cron/scheduler.js.map +1 -1
- package/dist/engine/agent-executor.d.ts +158 -0
- package/dist/engine/agent-executor.js +1140 -0
- package/dist/engine/agent-executor.js.map +1 -0
- package/dist/engine/agent-executor.test.d.ts +1 -0
- package/dist/engine/agent-executor.test.js +395 -0
- package/dist/engine/agent-executor.test.js.map +1 -0
- package/dist/engine/chat-runner.d.ts +123 -0
- package/dist/engine/chat-runner.js +379 -0
- package/dist/engine/chat-runner.js.map +1 -0
- package/dist/engine/chat-runner.test.d.ts +1 -0
- package/dist/engine/chat-runner.test.js +104 -0
- package/dist/engine/chat-runner.test.js.map +1 -0
- package/dist/engine/chat-skills.d.ts +45 -0
- package/dist/engine/chat-skills.js +184 -0
- package/dist/engine/chat-skills.js.map +1 -0
- package/dist/engine/chat-skills.test.d.ts +1 -0
- package/dist/engine/chat-skills.test.js +20 -0
- package/dist/engine/chat-skills.test.js.map +1 -0
- package/dist/engine/chat.d.ts +20 -23
- package/dist/engine/chat.js +251 -155
- package/dist/engine/chat.js.map +1 -1
- package/dist/engine/chat.test.d.ts +1 -0
- package/dist/engine/chat.test.js +42 -0
- package/dist/engine/chat.test.js.map +1 -0
- package/dist/engine/classifier.d.ts +35 -2
- package/dist/engine/classifier.js +170 -31
- package/dist/engine/classifier.js.map +1 -1
- package/dist/engine/classifier.test.d.ts +1 -0
- package/dist/engine/classifier.test.js +115 -0
- package/dist/engine/classifier.test.js.map +1 -0
- package/dist/engine/dispatcher.d.ts +60 -0
- package/dist/engine/dispatcher.js +601 -0
- package/dist/engine/dispatcher.js.map +1 -0
- package/dist/engine/dispatcher.test.d.ts +1 -0
- package/dist/engine/dispatcher.test.js +511 -0
- package/dist/engine/dispatcher.test.js.map +1 -0
- package/dist/engine/event-shim.d.ts +117 -0
- package/dist/engine/event-shim.js +435 -0
- package/dist/engine/event-shim.js.map +1 -0
- package/dist/engine/event-shim.test.d.ts +1 -0
- package/dist/engine/event-shim.test.js +194 -0
- package/dist/engine/event-shim.test.js.map +1 -0
- package/dist/engine/git-auth.d.ts +13 -17
- package/dist/engine/git-auth.js +99 -42
- package/dist/engine/git-auth.js.map +1 -1
- package/dist/engine/git-auth.test.d.ts +1 -0
- package/dist/engine/git-auth.test.js +117 -0
- package/dist/engine/git-auth.test.js.map +1 -0
- package/dist/engine/github-app-client.d.ts +7 -0
- package/dist/engine/github-app-client.js +16 -0
- package/dist/engine/github-app-client.js.map +1 -0
- package/dist/engine/github-app-client.test.d.ts +1 -0
- package/dist/engine/github-app-client.test.js +44 -0
- package/dist/engine/github-app-client.test.js.map +1 -0
- package/dist/engine/github-tools.d.ts +12 -0
- package/dist/engine/github-tools.js +261 -0
- package/dist/engine/github-tools.js.map +1 -0
- package/dist/engine/github.d.ts +1027 -43
- package/dist/engine/github.js +153 -14
- package/dist/engine/github.js.map +1 -1
- package/dist/engine/llm.d.ts +47 -0
- package/dist/engine/llm.js +221 -0
- package/dist/engine/llm.js.map +1 -0
- package/dist/engine/llm.test.d.ts +1 -0
- package/dist/engine/llm.test.js +189 -0
- package/dist/engine/llm.test.js.map +1 -0
- package/dist/engine/profiles.d.ts +249 -0
- package/dist/engine/profiles.js +42 -0
- package/dist/engine/profiles.js.map +1 -0
- package/dist/engine/router.d.ts +12 -6
- package/dist/engine/router.js +339 -81
- package/dist/engine/router.js.map +1 -1
- package/dist/engine/router.test.js +428 -78
- package/dist/engine/router.test.js.map +1 -1
- package/dist/engine/screen.d.ts +41 -0
- package/dist/engine/screen.js +93 -0
- package/dist/engine/screen.js.map +1 -0
- package/dist/engine/screen.test.d.ts +1 -0
- package/dist/engine/screen.test.js +82 -0
- package/dist/engine/screen.test.js.map +1 -0
- package/dist/index.js +423 -437
- package/dist/index.js.map +1 -1
- package/dist/managed-repos.d.ts +7 -9
- package/dist/managed-repos.js +12 -15
- package/dist/managed-repos.js.map +1 -1
- package/dist/managed-repos.test.js +24 -19
- package/dist/managed-repos.test.js.map +1 -1
- package/dist/notify/index.d.ts +15 -0
- package/dist/notify/index.js +6 -0
- package/dist/notify/index.js.map +1 -0
- package/dist/notify/model.d.ts +57 -0
- package/dist/notify/model.js +89 -0
- package/dist/notify/model.js.map +1 -0
- package/dist/notify/model.test.d.ts +1 -0
- package/dist/notify/model.test.js +109 -0
- package/dist/notify/model.test.js.map +1 -0
- package/dist/notify/notifier.d.ts +17 -0
- package/dist/notify/notifier.js +87 -0
- package/dist/notify/notifier.js.map +1 -0
- package/dist/notify/notifier.test.d.ts +1 -0
- package/dist/notify/notifier.test.js +100 -0
- package/dist/notify/notifier.test.js.map +1 -0
- package/dist/notify/render.d.ts +21 -0
- package/dist/notify/render.js +59 -0
- package/dist/notify/render.js.map +1 -0
- package/dist/notify/render.test.d.ts +1 -0
- package/dist/notify/render.test.js +65 -0
- package/dist/notify/render.test.js.map +1 -0
- package/dist/notify/transports/github.d.ts +26 -0
- package/dist/notify/transports/github.js +26 -0
- package/dist/notify/transports/github.js.map +1 -0
- package/dist/notify/transports/slack.d.ts +26 -0
- package/dist/notify/transports/slack.js +28 -0
- package/dist/notify/transports/slack.js.map +1 -0
- package/dist/notify/transports.test.d.ts +1 -0
- package/dist/notify/transports.test.js +71 -0
- package/dist/notify/transports.test.js.map +1 -0
- package/dist/notify/types.d.ts +95 -0
- package/dist/notify/types.js +16 -0
- package/dist/notify/types.js.map +1 -0
- package/dist/sandbox/docker-compose.test.d.ts +1 -0
- package/dist/sandbox/docker-compose.test.js +128 -0
- package/dist/sandbox/docker-compose.test.js.map +1 -0
- package/dist/sandbox/docker.d.ts +97 -9
- package/dist/sandbox/docker.js +192 -41
- package/dist/sandbox/docker.js.map +1 -1
- package/dist/sandbox/docker.test.d.ts +1 -0
- package/dist/sandbox/docker.test.js +137 -0
- package/dist/sandbox/docker.test.js.map +1 -0
- package/dist/sandbox/egress-allowlist.d.ts +69 -0
- package/dist/sandbox/egress-allowlist.js +164 -0
- package/dist/sandbox/egress-allowlist.js.map +1 -0
- package/dist/sandbox/egress-allowlist.test.d.ts +1 -0
- package/dist/sandbox/egress-allowlist.test.js +65 -0
- package/dist/sandbox/egress-allowlist.test.js.map +1 -0
- package/dist/sandbox/egress-firewall-config.d.ts +127 -0
- package/dist/sandbox/egress-firewall-config.js +434 -0
- package/dist/sandbox/egress-firewall-config.js.map +1 -0
- package/dist/sandbox/egress-firewall-config.test.d.ts +1 -0
- package/dist/sandbox/egress-firewall-config.test.js +244 -0
- package/dist/sandbox/egress-firewall-config.test.js.map +1 -0
- package/dist/sandbox/images.d.ts +23 -0
- package/dist/sandbox/images.js +55 -0
- package/dist/sandbox/images.js.map +1 -0
- package/dist/sandbox/index.d.ts +82 -3
- package/dist/sandbox/index.js +223 -93
- package/dist/sandbox/index.js.map +1 -1
- package/dist/sandbox/index.test.d.ts +1 -0
- package/dist/sandbox/index.test.js +157 -0
- package/dist/sandbox/index.test.js.map +1 -0
- package/dist/session-log.d.ts +63 -0
- package/dist/session-log.js +290 -0
- package/dist/session-log.js.map +1 -0
- package/dist/session-log.test.d.ts +1 -0
- package/dist/session-log.test.js +85 -0
- package/dist/session-log.test.js.map +1 -0
- package/dist/setup.d.ts +31 -12
- package/dist/setup.js +516 -174
- package/dist/setup.js.map +1 -1
- package/dist/setup.test.js +138 -6
- package/dist/setup.test.js.map +1 -1
- package/dist/state/approval-store.d.ts +86 -0
- package/dist/state/approval-store.js +140 -0
- package/dist/state/approval-store.js.map +1 -0
- package/dist/state/build-assets.d.ts +50 -0
- package/dist/state/build-assets.js +154 -0
- package/dist/state/build-assets.js.map +1 -0
- package/dist/state/build-assets.test.d.ts +1 -0
- package/dist/state/build-assets.test.js +106 -0
- package/dist/state/build-assets.test.js.map +1 -0
- package/dist/state/db.d.ts +65 -333
- package/dist/state/db.js +112 -835
- package/dist/state/db.js.map +1 -1
- package/dist/state/db.test.js +127 -91
- package/dist/state/db.test.js.map +1 -1
- package/dist/state/execution-store.d.ts +257 -0
- package/dist/state/execution-store.js +527 -0
- package/dist/state/execution-store.js.map +1 -0
- package/dist/state/migrate.d.ts +15 -0
- package/dist/state/migrate.js +175 -0
- package/dist/state/migrate.js.map +1 -0
- package/dist/state/workflow-run-store.d.ts +195 -0
- package/dist/state/workflow-run-store.js +363 -0
- package/dist/state/workflow-run-store.js.map +1 -0
- package/dist/state/workflow-run-store.test.d.ts +1 -0
- package/dist/state/workflow-run-store.test.js +264 -0
- package/dist/state/workflow-run-store.test.js.map +1 -0
- package/dist/telemetry/index.d.ts +38 -0
- package/dist/telemetry/index.js +253 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/telemetry/index.test.d.ts +1 -0
- package/dist/telemetry/index.test.js +73 -0
- package/dist/telemetry/index.test.js.map +1 -0
- package/dist/telemetry/pi-events.d.ts +12 -0
- package/dist/telemetry/pi-events.js +134 -0
- package/dist/telemetry/pi-events.js.map +1 -0
- package/dist/telemetry/pi-events.test.d.ts +1 -0
- package/dist/telemetry/pi-events.test.js +69 -0
- package/dist/telemetry/pi-events.test.js.map +1 -0
- package/dist/workflows/dag.d.ts +13 -1
- package/dist/workflows/dag.js +7 -3
- package/dist/workflows/dag.js.map +1 -1
- package/dist/workflows/dag.test.js +22 -0
- package/dist/workflows/dag.test.js.map +1 -1
- package/dist/workflows/golden-build.test.d.ts +1 -0
- package/dist/workflows/golden-build.test.js +45 -0
- package/dist/workflows/golden-build.test.js.map +1 -0
- package/dist/workflows/loader-overlay.test.d.ts +1 -0
- package/dist/workflows/loader-overlay.test.js +101 -0
- package/dist/workflows/loader-overlay.test.js.map +1 -0
- package/dist/workflows/loader.d.ts +36 -11
- package/dist/workflows/loader.js +311 -87
- package/dist/workflows/loader.js.map +1 -1
- package/dist/workflows/loader.test.js +114 -10
- package/dist/workflows/loader.test.js.map +1 -1
- package/dist/workflows/loop-eval.js +2 -0
- package/dist/workflows/loop-eval.js.map +1 -1
- package/dist/workflows/loop-eval.test.js +14 -0
- package/dist/workflows/loop-eval.test.js.map +1 -1
- package/dist/workflows/phase-executor.d.ts +145 -0
- package/dist/workflows/phase-executor.js +691 -0
- package/dist/workflows/phase-executor.js.map +1 -0
- package/dist/workflows/phase-executor.test.d.ts +1 -0
- package/dist/workflows/phase-executor.test.js +434 -0
- package/dist/workflows/phase-executor.test.js.map +1 -0
- package/dist/workflows/phase-ref.d.ts +44 -0
- package/dist/workflows/phase-ref.js +78 -0
- package/dist/workflows/phase-ref.js.map +1 -0
- package/dist/workflows/phase-ref.test.d.ts +1 -0
- package/dist/workflows/phase-ref.test.js +24 -0
- package/dist/workflows/phase-ref.test.js.map +1 -0
- package/dist/workflows/resume.d.ts +5 -11
- package/dist/workflows/resume.js +88 -7
- package/dist/workflows/resume.js.map +1 -1
- package/dist/workflows/runner.d.ts +34 -27
- package/dist/workflows/runner.js +252 -930
- package/dist/workflows/runner.js.map +1 -1
- package/dist/workflows/runner.test.js +346 -35
- package/dist/workflows/runner.test.js.map +1 -1
- package/dist/workflows/schema.d.ts +52 -10
- package/dist/workflows/schema.js +147 -7
- package/dist/workflows/schema.js.map +1 -1
- package/dist/workflows/simple.d.ts +67 -3
- package/dist/workflows/simple.js +248 -87
- package/dist/workflows/simple.js.map +1 -1
- package/dist/workflows/simple.test.d.ts +1 -0
- package/dist/workflows/simple.test.js +107 -0
- package/dist/workflows/simple.test.js.map +1 -0
- package/dist/workflows/templates.d.ts +29 -0
- package/dist/workflows/templates.js +42 -4
- package/dist/workflows/templates.js.map +1 -1
- package/dist/workflows/templates.test.js +103 -0
- package/dist/workflows/templates.test.js.map +1 -1
- package/dist/workflows/triggers.d.ts +21 -0
- package/dist/workflows/triggers.js +44 -0
- package/dist/workflows/triggers.js.map +1 -0
- package/dist/workflows/verdict.d.ts +19 -0
- package/dist/workflows/verdict.js +30 -0
- package/dist/workflows/verdict.js.map +1 -0
- package/dist/workflows/verdict.test.d.ts +1 -0
- package/dist/workflows/verdict.test.js +44 -0
- package/dist/workflows/verdict.test.js.map +1 -0
- package/dist/worktree/manager.d.ts +1 -1
- package/dist/worktree/manager.js +14 -14
- package/dist/worktree/manager.js.map +1 -1
- package/dist/worktree/manager.test.d.ts +1 -0
- package/dist/worktree/manager.test.js +87 -0
- package/dist/worktree/manager.test.js.map +1 -0
- package/docker-compose.yml +206 -5
- package/package.json +19 -7
- package/sandbox.Dockerfile +97 -18
- package/skills/README.md +40 -0
- package/skills/browser-qa/SKILL.md +193 -0
- package/skills/browser-qa/scripts/agent-browser.mjs +380 -0
- package/skills/building/SKILL.md +95 -0
- package/skills/chat/SKILL.md +30 -11
- package/skills/code-review/SKILL.md +59 -0
- package/skills/debug-production/SKILL.md +108 -0
- package/skills/demo/SKILL.md +194 -0
- package/skills/demo/scripts/compose-demo.sh +205 -0
- package/skills/issue-answer/SKILL.md +90 -0
- package/skills/issue-comment/SKILL.md +38 -24
- package/skills/issue-triage/SKILL.md +103 -37
- package/skills/issue-triage/references/AGENT-BRIEF.md +61 -0
- package/skills/pr-comment/SKILL.md +64 -0
- package/skills/pr-review/SKILL.md +65 -49
- package/skills/qa-test/SKILL.md +97 -0
- package/skills/repo-health/SKILL.md +48 -45
- package/skills/security-feedback/SKILL.md +173 -0
- package/skills/security-feedback/references/templates.md +77 -0
- package/skills/security-review/SKILL.md +213 -0
- package/skills/security-review/references/issue-format.md +302 -0
- package/skills/verify/SKILL.md +118 -0
- package/workflows/answer.yaml +37 -0
- package/workflows/build.yaml +32 -22
- package/workflows/cron-security.yaml +6 -0
- package/workflows/demo.yaml +55 -0
- package/workflows/explore.yaml +9 -0
- package/workflows/pr-comment.yaml +16 -0
- package/workflows/pr-fix.yaml +3 -0
- package/workflows/pr-review.yaml +4 -1
- package/workflows/prompts/answer.md +67 -0
- package/workflows/prompts/architect.md +24 -7
- package/workflows/prompts/demo.md +100 -0
- package/workflows/prompts/executor.md +29 -20
- package/workflows/prompts/explore-ask.md +51 -22
- package/workflows/prompts/explore-publish.md +2 -2
- package/workflows/prompts/explore-read.md +24 -10
- package/workflows/prompts/explore-synthesize.md +15 -8
- package/workflows/prompts/fix.md +9 -10
- package/workflows/prompts/guardrails.md +26 -8
- package/workflows/prompts/pr-fix.md +6 -7
- package/workflows/prompts/pr.md +11 -10
- package/workflows/prompts/qa-browser.md +95 -0
- package/workflows/prompts/qa-synth.md +44 -0
- package/workflows/prompts/qa-test.md +60 -0
- package/workflows/prompts/re-reviewer.md +8 -9
- package/workflows/prompts/reviewer.md +10 -9
- package/workflows/prompts/verify-browser.md +93 -0
- package/workflows/prompts/verify-synth.md +44 -0
- package/workflows/prompts/verify.md +63 -0
- package/workflows/qa-test.yaml +87 -0
- package/workflows/security-feedback.yaml +25 -0
- package/workflows/security-review.yaml +29 -0
- package/workflows/verify.yaml +85 -0
- package/deploy/mcp-config.tmpl.json +0 -14
- package/dist/cron/rate-limits.d.ts +0 -26
- package/dist/cron/rate-limits.js +0 -193
- package/dist/cron/rate-limits.js.map +0 -1
- package/dist/engine/executor.d.ts +0 -75
- package/dist/engine/executor.js +0 -292
- package/dist/engine/executor.js.map +0 -1
- package/mcp-github-app/package.json +0 -18
- package/mcp-github-app/src/auth.js +0 -66
- package/mcp-github-app/src/github.js +0 -371
- package/mcp-github-app/src/index.js +0 -534
- package/skills/devops/webhook-subscriptions/SKILL.md +0 -180
- package/skills/github/DESCRIPTION.md +0 -3
- package/skills/github/codebase-inspection/SKILL.md +0 -115
- package/skills/github/github-auth/SKILL.md +0 -54
- package/skills/github/github-auth/scripts/gh-env.sh +0 -66
- package/skills/github/github-code-review/SKILL.md +0 -480
- package/skills/github/github-code-review/references/review-output-template.md +0 -74
- package/skills/github/github-issues/SKILL.md +0 -369
- package/skills/github/github-issues/templates/bug-report.md +0 -35
- package/skills/github/github-issues/templates/feature-request.md +0 -31
- package/skills/github/github-pr-workflow/SKILL.md +0 -395
- package/skills/github/github-pr-workflow/references/ci-troubleshooting.md +0 -183
- package/skills/github/github-pr-workflow/references/conventional-commits.md +0 -71
- package/skills/github/github-pr-workflow/templates/pr-body-bugfix.md +0 -35
- package/skills/github/github-pr-workflow/templates/pr-body-feature.md +0 -33
- package/skills/github/github-repo-management/SKILL.md +0 -515
- package/skills/github/github-repo-management/references/github-api-cheatsheet.md +0 -161
- package/skills/github-orchestrator/SKILL.md +0 -103
- package/skills/mcp/DESCRIPTION.md +0 -3
- package/skills/mcp/mcporter/SKILL.md +0 -122
- package/skills/mcp/native-mcp/SKILL.md +0 -356
- package/skills/software-development/architect/SKILL.md +0 -154
- package/skills/software-development/assure-guardrails/SKILL.md +0 -239
- package/skills/software-development/plan/SKILL.md +0 -64
- package/skills/software-development/requesting-code-review/SKILL.md +0 -291
- package/skills/software-development/subagent-driven-development/SKILL.md +0 -433
- package/skills/software-development/systematic-debugging/SKILL.md +0 -366
- package/skills/software-development/test-driven-development/SKILL.md +0 -342
|
@@ -1,371 +0,0 @@
|
|
|
1
|
-
// Thin wrapper around Octokit that refreshes the token automatically.
|
|
2
|
-
|
|
3
|
-
import { Octokit } from "@octokit/rest";
|
|
4
|
-
|
|
5
|
-
// Retry config
|
|
6
|
-
const MAX_RETRIES = 3;
|
|
7
|
-
const BASE_DELAY_MS = 1000;
|
|
8
|
-
const RETRYABLE_STATUSES = new Set([408, 429, 500, 502, 503, 504]);
|
|
9
|
-
|
|
10
|
-
export class GitHubClient {
|
|
11
|
-
constructor(auth) {
|
|
12
|
-
this.auth = auth;
|
|
13
|
-
this._octokit = null;
|
|
14
|
-
this._tokenUsed = null;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
async octokit() {
|
|
18
|
-
const token = await this.auth.getToken();
|
|
19
|
-
if (token !== this._tokenUsed) {
|
|
20
|
-
this._octokit = new Octokit({ auth: token });
|
|
21
|
-
this._tokenUsed = token;
|
|
22
|
-
}
|
|
23
|
-
return this._octokit;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Retry wrapper with exponential backoff for transient failures.
|
|
28
|
-
* Handles rate limits (429) by respecting Retry-After header.
|
|
29
|
-
*/
|
|
30
|
-
async _withRetry(fn) {
|
|
31
|
-
let lastError;
|
|
32
|
-
for (let attempt = 0; attempt <= MAX_RETRIES; attempt++) {
|
|
33
|
-
try {
|
|
34
|
-
return await fn();
|
|
35
|
-
} catch (err) {
|
|
36
|
-
lastError = err;
|
|
37
|
-
const status = err.status || err.response?.status;
|
|
38
|
-
|
|
39
|
-
// Don't retry client errors (except rate limit and timeout)
|
|
40
|
-
if (status && status >= 400 && status < 500 && !RETRYABLE_STATUSES.has(status)) {
|
|
41
|
-
throw err;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// Don't retry if we've exhausted attempts
|
|
45
|
-
if (attempt === MAX_RETRIES) break;
|
|
46
|
-
|
|
47
|
-
// Rate limit: respect Retry-After header
|
|
48
|
-
let delayMs;
|
|
49
|
-
if (status === 429) {
|
|
50
|
-
const retryAfter = err.response?.headers?.["retry-after"];
|
|
51
|
-
delayMs = retryAfter ? parseInt(retryAfter, 10) * 1000 : BASE_DELAY_MS * Math.pow(2, attempt);
|
|
52
|
-
} else {
|
|
53
|
-
delayMs = BASE_DELAY_MS * Math.pow(2, attempt);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// If token might be expired (401), force refresh before retry
|
|
57
|
-
if (status === 401) {
|
|
58
|
-
this._tokenUsed = null;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
await new Promise((r) => setTimeout(r, delayMs));
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
throw lastError;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// ── Repositories ──────────────────────────────────────────────────
|
|
68
|
-
|
|
69
|
-
async getFileContents(owner, repo, path, branch) {
|
|
70
|
-
return this._withRetry(async () => {
|
|
71
|
-
const ok = await this.octokit();
|
|
72
|
-
const params = { owner, repo, path };
|
|
73
|
-
if (branch) params.ref = branch;
|
|
74
|
-
const { data } = await ok.repos.getContent(params);
|
|
75
|
-
if (data.content) {
|
|
76
|
-
data.decoded_content = Buffer.from(data.content, "base64").toString("utf8");
|
|
77
|
-
}
|
|
78
|
-
return data;
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
async createOrUpdateFile(owner, repo, path, content, message, branch, sha) {
|
|
83
|
-
return this._withRetry(async () => {
|
|
84
|
-
const ok = await this.octokit();
|
|
85
|
-
const params = {
|
|
86
|
-
owner, repo, path, message,
|
|
87
|
-
content: Buffer.from(content).toString("base64"),
|
|
88
|
-
};
|
|
89
|
-
if (branch) params.branch = branch;
|
|
90
|
-
if (sha) params.sha = sha;
|
|
91
|
-
const { data } = await ok.repos.createOrUpdateFileContents(params);
|
|
92
|
-
return data;
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
async pushFiles(owner, repo, branch, files, message) {
|
|
97
|
-
return this._withRetry(async () => {
|
|
98
|
-
const ok = await this.octokit();
|
|
99
|
-
|
|
100
|
-
// Get the ref
|
|
101
|
-
let ref;
|
|
102
|
-
try {
|
|
103
|
-
const { data } = await ok.git.getRef({ owner, repo, ref: `heads/${branch}` });
|
|
104
|
-
ref = data;
|
|
105
|
-
} catch (e) {
|
|
106
|
-
// Branch doesn't exist — create from default branch
|
|
107
|
-
const { data: repoData } = await ok.repos.get({ owner, repo });
|
|
108
|
-
const { data: defaultRef } = await ok.git.getRef({
|
|
109
|
-
owner, repo, ref: `heads/${repoData.default_branch}`,
|
|
110
|
-
});
|
|
111
|
-
const { data: newRef } = await ok.git.createRef({
|
|
112
|
-
owner, repo,
|
|
113
|
-
ref: `refs/heads/${branch}`,
|
|
114
|
-
sha: defaultRef.object.sha,
|
|
115
|
-
});
|
|
116
|
-
ref = newRef;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// Create blobs
|
|
120
|
-
const blobs = await Promise.all(
|
|
121
|
-
files.map(async (f) => {
|
|
122
|
-
const { data } = await ok.git.createBlob({
|
|
123
|
-
owner, repo, content: f.content, encoding: "utf-8",
|
|
124
|
-
});
|
|
125
|
-
return { path: f.path, sha: data.sha, mode: "100644", type: "blob" };
|
|
126
|
-
})
|
|
127
|
-
);
|
|
128
|
-
|
|
129
|
-
// Create tree
|
|
130
|
-
const { data: tree } = await ok.git.createTree({
|
|
131
|
-
owner, repo, base_tree: ref.object.sha, tree: blobs,
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
// Create commit
|
|
135
|
-
const { data: commit } = await ok.git.createCommit({
|
|
136
|
-
owner, repo, message, tree: tree.sha, parents: [ref.object.sha],
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
// Update ref
|
|
140
|
-
const { data: updated } = await ok.git.updateRef({
|
|
141
|
-
owner, repo, ref: `heads/${branch}`, sha: commit.sha,
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
return { commit: commit.sha, branch, ref: updated };
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
async searchRepositories(query, page = 1, perPage = 30) {
|
|
149
|
-
return this._withRetry(async () => {
|
|
150
|
-
const ok = await this.octokit();
|
|
151
|
-
const { data } = await ok.search.repos({ q: query, page, per_page: perPage });
|
|
152
|
-
return data;
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
async getRepository(owner, repo) {
|
|
157
|
-
return this._withRetry(async () => {
|
|
158
|
-
const ok = await this.octokit();
|
|
159
|
-
const { data } = await ok.repos.get({ owner, repo });
|
|
160
|
-
return data;
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
async listBranches(owner, repo, page = 1, perPage = 30) {
|
|
165
|
-
return this._withRetry(async () => {
|
|
166
|
-
const ok = await this.octokit();
|
|
167
|
-
const { data } = await ok.repos.listBranches({ owner, repo, page, per_page: perPage });
|
|
168
|
-
return data;
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
// ── Issues ────────────────────────────────────────────────────────
|
|
173
|
-
|
|
174
|
-
async listIssues(owner, repo, opts = {}) {
|
|
175
|
-
return this._withRetry(async () => {
|
|
176
|
-
const ok = await this.octokit();
|
|
177
|
-
const { data } = await ok.issues.listForRepo({
|
|
178
|
-
owner, repo, state: "open", per_page: 30, ...opts,
|
|
179
|
-
});
|
|
180
|
-
return data;
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
async getIssue(owner, repo, issue_number) {
|
|
185
|
-
return this._withRetry(async () => {
|
|
186
|
-
const ok = await this.octokit();
|
|
187
|
-
const { data } = await ok.issues.get({ owner, repo, issue_number });
|
|
188
|
-
return data;
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
async createIssue(owner, repo, title, body, opts = {}) {
|
|
193
|
-
return this._withRetry(async () => {
|
|
194
|
-
const ok = await this.octokit();
|
|
195
|
-
const { data } = await ok.issues.create({ owner, repo, title, body, ...opts });
|
|
196
|
-
return data;
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
async updateIssue(owner, repo, issue_number, updates) {
|
|
201
|
-
return this._withRetry(async () => {
|
|
202
|
-
const ok = await this.octokit();
|
|
203
|
-
const { data } = await ok.issues.update({ owner, repo, issue_number, ...updates });
|
|
204
|
-
return data;
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
async addIssueComment(owner, repo, issue_number, body) {
|
|
209
|
-
return this._withRetry(async () => {
|
|
210
|
-
const ok = await this.octokit();
|
|
211
|
-
const { data } = await ok.issues.createComment({ owner, repo, issue_number, body });
|
|
212
|
-
return data;
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
async listIssueComments(owner, repo, issue_number, opts = {}) {
|
|
217
|
-
return this._withRetry(async () => {
|
|
218
|
-
const ok = await this.octokit();
|
|
219
|
-
const { data } = await ok.issues.listComments({
|
|
220
|
-
owner, repo, issue_number, per_page: 30, ...opts,
|
|
221
|
-
});
|
|
222
|
-
return data;
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
async addLabels(owner, repo, issue_number, labels) {
|
|
227
|
-
return this._withRetry(async () => {
|
|
228
|
-
const ok = await this.octokit();
|
|
229
|
-
const { data } = await ok.issues.addLabels({ owner, repo, issue_number, labels });
|
|
230
|
-
return data;
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
async removeLabel(owner, repo, issue_number, name) {
|
|
235
|
-
return this._withRetry(async () => {
|
|
236
|
-
const ok = await this.octokit();
|
|
237
|
-
const { data } = await ok.issues.removeLabel({ owner, repo, issue_number, name });
|
|
238
|
-
return data;
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
// ── Pull Requests ─────────────────────────────────────────────────
|
|
243
|
-
|
|
244
|
-
async listPullRequests(owner, repo, opts = {}) {
|
|
245
|
-
return this._withRetry(async () => {
|
|
246
|
-
const ok = await this.octokit();
|
|
247
|
-
const { data } = await ok.pulls.list({
|
|
248
|
-
owner, repo, state: "open", per_page: 30, ...opts,
|
|
249
|
-
});
|
|
250
|
-
return data;
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
async getPullRequest(owner, repo, pull_number) {
|
|
255
|
-
return this._withRetry(async () => {
|
|
256
|
-
const ok = await this.octokit();
|
|
257
|
-
const { data } = await ok.pulls.get({ owner, repo, pull_number });
|
|
258
|
-
return data;
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
async createPullRequest(owner, repo, title, body, head, base) {
|
|
263
|
-
return this._withRetry(async () => {
|
|
264
|
-
const ok = await this.octokit();
|
|
265
|
-
const { data } = await ok.pulls.create({ owner, repo, title, body, head, base });
|
|
266
|
-
return data;
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
async listPullRequestFiles(owner, repo, pull_number) {
|
|
271
|
-
return this._withRetry(async () => {
|
|
272
|
-
const ok = await this.octokit();
|
|
273
|
-
const { data } = await ok.pulls.listFiles({ owner, repo, pull_number, per_page: 100 });
|
|
274
|
-
return data;
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
async createPullRequestReview(owner, repo, pull_number, body, event, comments = []) {
|
|
279
|
-
return this._withRetry(async () => {
|
|
280
|
-
const ok = await this.octokit();
|
|
281
|
-
const params = { owner, repo, pull_number, body, event };
|
|
282
|
-
if (comments.length) params.comments = comments;
|
|
283
|
-
const { data } = await ok.pulls.createReview(params);
|
|
284
|
-
return data;
|
|
285
|
-
});
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
async getPullRequestDiff(owner, repo, pull_number) {
|
|
289
|
-
return this._withRetry(async () => {
|
|
290
|
-
const ok = await this.octokit();
|
|
291
|
-
const { data } = await ok.pulls.get({
|
|
292
|
-
owner, repo, pull_number,
|
|
293
|
-
mediaType: { format: "diff" },
|
|
294
|
-
});
|
|
295
|
-
return data;
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
async mergePullRequest(owner, repo, pull_number, opts = {}) {
|
|
300
|
-
return this._withRetry(async () => {
|
|
301
|
-
const ok = await this.octokit();
|
|
302
|
-
const { data } = await ok.pulls.merge({ owner, repo, pull_number, ...opts });
|
|
303
|
-
return data;
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
// ── Commits & Branches ────────────────────────────────────────────
|
|
308
|
-
|
|
309
|
-
async listCommits(owner, repo, opts = {}) {
|
|
310
|
-
return this._withRetry(async () => {
|
|
311
|
-
const ok = await this.octokit();
|
|
312
|
-
const { data } = await ok.repos.listCommits({
|
|
313
|
-
owner, repo, per_page: 30, ...opts,
|
|
314
|
-
});
|
|
315
|
-
return data;
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
async createBranch(owner, repo, branch, fromBranch) {
|
|
320
|
-
return this._withRetry(async () => {
|
|
321
|
-
const ok = await this.octokit();
|
|
322
|
-
const { data: ref } = await ok.git.getRef({
|
|
323
|
-
owner, repo, ref: `heads/${fromBranch}`,
|
|
324
|
-
});
|
|
325
|
-
const { data } = await ok.git.createRef({
|
|
326
|
-
owner, repo,
|
|
327
|
-
ref: `refs/heads/${branch}`,
|
|
328
|
-
sha: ref.object.sha,
|
|
329
|
-
});
|
|
330
|
-
return data;
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
// ── Search ────────────────────────────────────────────────────────
|
|
335
|
-
|
|
336
|
-
async searchIssues(query, page = 1, perPage = 30) {
|
|
337
|
-
return this._withRetry(async () => {
|
|
338
|
-
const ok = await this.octokit();
|
|
339
|
-
const { data } = await ok.search.issuesAndPullRequests({
|
|
340
|
-
q: query, page, per_page: perPage,
|
|
341
|
-
});
|
|
342
|
-
return data;
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
async searchCode(query, page = 1, perPage = 30) {
|
|
347
|
-
return this._withRetry(async () => {
|
|
348
|
-
const ok = await this.octokit();
|
|
349
|
-
const { data } = await ok.search.code({ q: query, page, per_page: perPage });
|
|
350
|
-
return data;
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
// ── Labels ────────────────────────────────────────────────────────
|
|
355
|
-
|
|
356
|
-
async listLabels(owner, repo) {
|
|
357
|
-
return this._withRetry(async () => {
|
|
358
|
-
const ok = await this.octokit();
|
|
359
|
-
const { data } = await ok.issues.listLabelsForRepo({ owner, repo, per_page: 100 });
|
|
360
|
-
return data;
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
async createLabel(owner, repo, name, color, description) {
|
|
365
|
-
return this._withRetry(async () => {
|
|
366
|
-
const ok = await this.octokit();
|
|
367
|
-
const { data } = await ok.issues.createLabel({ owner, repo, name, color, description });
|
|
368
|
-
return data;
|
|
369
|
-
});
|
|
370
|
-
}
|
|
371
|
-
}
|