even-keel 0.2.4 → 0.3.0-rc.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/.claude-plugin/marketplace.json +16 -4
- package/.env.example +2 -2
- package/CHANGELOG.md +23 -0
- package/README.md +10 -8
- package/dist/src/account/aws.js +76 -0
- package/dist/src/account/azure.js +36 -0
- package/dist/src/account/cloud-errors.js +72 -0
- package/dist/src/account/cloud.js +335 -0
- package/dist/src/account/credit.js +49 -7
- package/dist/src/account/gcloud.js +71 -0
- package/dist/src/account/header-levels.js +3 -2
- package/dist/src/account/homes.js +49 -5
- package/dist/src/account/keycheck.js +57 -4
- package/dist/src/account/management.js +41 -0
- package/dist/src/account/model.js +41 -18
- package/dist/src/account/network.js +8 -3
- package/dist/src/account/service-defaults.js +12 -3
- package/dist/src/account/settingsGuard.js +92 -0
- package/dist/src/account/settingsGuardStrip.js +36 -0
- package/dist/src/account/settingsHook.js +15 -0
- package/dist/src/account/settingsLayer.js +190 -0
- package/dist/src/account/settingsUninstall.js +7 -0
- package/dist/src/account/share.js +23 -6
- package/dist/src/account/spend.js +155 -0
- package/dist/src/account/watcher.js +189 -24
- package/dist/src/agent/adapters.js +13 -2
- package/dist/src/agent/env.js +22 -7
- package/dist/src/agent/model-slots.js +32 -0
- package/dist/src/agent/process.js +32 -6
- package/dist/src/agent/projectRules.js +3 -2
- package/dist/src/agent/providers.js +18 -1
- package/dist/src/agent/scripted.js +319 -0
- package/dist/src/agent/windows.js +35 -3
- package/dist/src/badge/action.js +41 -0
- package/dist/src/badge/check.js +60 -0
- package/dist/src/badge/collect.js +174 -0
- package/dist/src/badge/dates.js +29 -0
- package/dist/src/badge/drawing.js +3 -0
- package/dist/src/badge/fonts.generated.js +11 -0
- package/dist/src/badge/model.js +9 -0
- package/dist/src/badge/privacy.js +151 -0
- package/dist/src/badge/push.js +117 -0
- package/dist/src/badge/render.js +490 -0
- package/dist/src/badge/settings.js +43 -0
- package/dist/src/badge/stats.js +31 -0
- package/dist/src/badge/status.js +57 -0
- package/dist/src/badge/text.js +52 -0
- package/dist/src/badge/theme.js +54 -0
- package/dist/src/badge/translate.js +162 -0
- package/dist/src/builtin/adapter.js +40 -0
- package/dist/src/builtin/control.js +179 -0
- package/dist/src/builtin/editor.js +117 -0
- package/dist/src/builtin/export-store.js +67 -0
- package/dist/src/builtin/export.js +202 -0
- package/dist/src/builtin/exporting.js +25 -0
- package/dist/src/builtin/files.js +155 -0
- package/dist/src/builtin/links.js +25 -0
- package/dist/src/builtin/model.js +59 -0
- package/dist/src/builtin/routes.js +108 -0
- package/dist/src/builtin/source.js +240 -0
- package/dist/src/builtin/store.js +520 -0
- package/dist/src/builtin/switch.js +77 -0
- package/dist/src/chain/answers.js +27 -0
- package/dist/src/chain/archive.js +0 -1
- package/dist/src/chain/dispatcher.js +105 -12
- package/dist/src/chain/fence.js +30 -0
- package/dist/src/chain/handover.js +27 -9
- package/dist/src/chain/launches.js +4 -4
- package/dist/src/chain/limitNotice.js +1 -1
- package/dist/src/chain/lists.js +42 -6
- package/dist/src/chain/log.js +3 -1
- package/dist/src/chain/maincheck.js +116 -10
- package/dist/src/chain/mainci.js +26 -7
- package/dist/src/chain/mainfix.js +12 -1
- package/dist/src/chain/milestone-sequence.js +40 -0
- package/dist/src/chain/milestones.js +3 -2
- package/dist/src/chain/order.js +20 -5
- package/dist/src/chain/overage.js +7 -2
- package/dist/src/chain/places.js +1 -1
- package/dist/src/chain/prompts.js +64 -6
- package/dist/src/chain/relay.js +35 -14
- package/dist/src/chain/reviews.js +8 -4
- package/dist/src/chain/rules.js +40 -11
- package/dist/src/chain/snapshots.js +2 -0
- package/dist/src/chain/start.js +21 -1
- package/dist/src/chain/store.js +16 -6
- package/dist/src/chain/unchanged.js +68 -5
- package/dist/src/ci/adapters.js +3 -1
- package/dist/src/ci/forgejo-profile.js +3 -24
- package/dist/src/ci/forgejo.js +2 -1
- package/dist/src/ci/github.js +10 -2
- package/dist/src/ci/gitlab.js +10 -3
- package/dist/src/ci/http.js +4 -0
- package/dist/src/ci/model.js +79 -6
- package/dist/src/ci/report.js +6 -3
- package/dist/src/ci/shared.js +9 -0
- package/dist/src/ci/verdict.js +18 -7
- package/dist/src/ci/watcher.js +95 -23
- package/dist/src/ci/wiring.js +15 -0
- package/dist/src/claude/adapter.js +34 -8
- package/dist/src/claude/cli.js +32 -8
- package/dist/src/claude/instructions.js +42 -7
- package/dist/src/claude/oauth.js +67 -0
- package/dist/src/claude/sdk/host.js +9 -4
- package/dist/src/claude/tree.js +45 -14
- package/dist/src/cli-check/run.js +3 -3
- package/dist/src/cli-check/support.js +4 -4
- package/dist/src/cli.js +54 -17
- package/dist/src/codex/adapter.js +2 -0
- package/dist/src/codex/cli.js +34 -18
- package/dist/src/codex/protection.js +17 -11
- package/dist/src/codex/rollout.js +9 -2
- package/dist/src/codex/turns.js +6 -3
- package/dist/src/codex/window.js +14 -0
- package/dist/src/config-form.js +63 -7
- package/dist/src/config-store.js +29 -7
- package/dist/src/config.js +45 -15
- package/dist/src/copilot/adapter.js +2 -0
- package/dist/src/copilot/cli.js +8 -11
- package/dist/src/copilot/home.js +1 -1
- package/dist/src/copilot/transcript.js +1 -2
- package/dist/src/demo/agent.js +97 -0
- package/dist/src/demo/model.js +6 -0
- package/dist/src/demo/scenario.js +139 -0
- package/dist/src/demo/service.js +161 -0
- package/dist/src/diagnostics/stop.js +16 -0
- package/dist/src/env-file.js +4 -0
- package/dist/src/error-reason.js +10 -0
- package/dist/src/event-log/log.js +97 -0
- package/dist/src/event-log/model.js +1 -0
- package/dist/src/event-log/page-events.js +71 -0
- package/dist/src/event-log/watch.js +236 -0
- package/dist/src/events.js +57 -1
- package/dist/src/forgejo/adapter.js +49 -0
- package/dist/src/forgejo/api.js +95 -0
- package/dist/src/forgejo/editor.js +196 -0
- package/dist/src/forgejo/model.js +90 -0
- package/dist/src/forgejo/profile.js +24 -0
- package/dist/src/forgejo/source.js +292 -0
- package/dist/src/forgejo/trust.js +45 -0
- package/dist/src/git/branches.js +88 -0
- package/dist/src/git/clone-progress.js +168 -0
- package/dist/src/git/remote-run.js +162 -0
- package/dist/src/git/run.js +6 -2
- package/dist/src/git/setup.js +4 -5
- package/dist/src/git/slot.js +9 -7
- package/dist/src/git/worktree.js +13 -10
- package/dist/src/github/adapter.js +1 -0
- package/dist/src/github/editor.js +214 -0
- package/dist/src/github/edits.js +31 -0
- package/dist/src/github/model.js +10 -4
- package/dist/src/github/source.js +66 -15
- package/dist/src/gitlab/adapter.js +1 -0
- package/dist/src/gitlab/api.js +4 -2
- package/dist/src/gitlab/editor.js +248 -0
- package/dist/src/gitlab/model.js +43 -4
- package/dist/src/gitlab/source.js +113 -22
- package/dist/src/guard.js +26 -10
- package/dist/src/hotkeys.js +51 -0
- package/dist/src/huly/adapter.js +1 -0
- package/dist/src/huly/collab.js +15 -0
- package/dist/src/huly/editor.js +241 -0
- package/dist/src/huly/marks.js +48 -0
- package/dist/src/huly/model.js +22 -5
- package/dist/src/huly/source.js +111 -48
- package/dist/src/intake/github.js +10 -0
- package/dist/src/intake/intake.js +41 -1
- package/dist/src/intake/model.js +8 -3
- package/dist/src/jira/adapter.js +1 -0
- package/dist/src/jira/api.js +28 -7
- package/dist/src/jira/editor.js +243 -0
- package/dist/src/jira/model.js +19 -5
- package/dist/src/jira/source.js +41 -9
- package/dist/src/jobs/model.js +1 -0
- package/dist/src/jobs/runner.js +236 -0
- package/dist/src/limits/chatgpt.js +11 -0
- package/dist/src/limits/copilot.js +51 -18
- package/dist/src/limits/model.js +62 -8
- package/dist/src/limits/overage-session.js +2 -2
- package/dist/src/limits/overage.js +8 -5
- package/dist/src/limits/reset.js +7 -0
- package/dist/src/limits/usage.js +60 -5
- package/dist/src/linear/adapter.js +1 -0
- package/dist/src/linear/editor.js +220 -0
- package/dist/src/linear/estimate.js +32 -0
- package/dist/src/linear/model.js +24 -3
- package/dist/src/linear/source.js +74 -21
- package/dist/src/main.js +53 -23
- package/dist/src/notice/en-advice.js +28 -0
- package/dist/src/notice/en-review.js +29 -0
- package/dist/src/notice/en-startup.js +21 -0
- package/dist/src/notice/en-values.js +47 -0
- package/dist/src/notice/en.js +265 -96
- package/dist/src/notice/kinds.js +26 -0
- package/dist/src/notice/notice.js +49 -6
- package/dist/src/npm-access.js +58 -0
- package/dist/src/opencode/adapter.js +4 -2
- package/dist/src/opencode/cli.js +34 -25
- package/dist/src/opencode/go.js +51 -0
- package/dist/src/opencode/home.js +41 -8
- package/dist/src/opencode/transcript.js +5 -5
- package/dist/src/opencode/usage.js +10 -4
- package/dist/src/opencode/window.js +54 -0
- package/dist/src/packages/check.js +11 -5
- package/dist/src/packages/gateway.js +76 -6
- package/dist/src/packages/launch.js +6 -3
- package/dist/src/packages/model.js +61 -2
- package/dist/src/packages/npm.js +55 -6
- package/dist/src/packages/plugins.js +23 -2
- package/dist/src/packages/service.js +104 -17
- package/dist/src/packages/settings.js +13 -0
- package/dist/src/packages/store.js +1 -1
- package/dist/src/paths.js +32 -0
- package/dist/src/profiles/control.js +1 -0
- package/dist/src/profiles/model.js +2 -2
- package/dist/src/profiles/oauth-error.js +1 -9
- package/dist/src/profiles/oauth-response.js +2 -0
- package/dist/src/profiles/service.js +46 -4
- package/dist/src/profiles/store.js +10 -5
- package/dist/src/projects/add.js +25 -2
- package/dist/src/projects/branch-control.js +86 -0
- package/dist/src/projects/branch-move.js +39 -0
- package/dist/src/projects/branch.js +13 -0
- package/dist/src/projects/check.js +80 -36
- package/dist/src/projects/creation.js +166 -0
- package/dist/src/projects/git-found.js +62 -0
- package/dist/src/projects/git-mode.js +116 -0
- package/dist/src/projects/own-folder.js +8 -0
- package/dist/src/projects/place.js +235 -0
- package/dist/src/projects/remote-branches.js +24 -0
- package/dist/src/projects/target-read.js +95 -0
- package/dist/src/projects/target.js +56 -0
- package/dist/src/review/events.js +1 -1
- package/dist/src/review/note.js +58 -0
- package/dist/src/review/open.js +3 -3
- package/dist/src/review/wiring.js +25 -3
- package/dist/src/secrets/catalog.js +4 -1
- package/dist/src/server-control.js +1 -0
- package/dist/src/server-guard.js +4 -0
- package/dist/src/server-request.js +88 -10
- package/dist/src/server-response.js +143 -0
- package/dist/src/server-security.js +16 -0
- package/dist/src/server.js +105 -117
- package/dist/src/service/account-packages.js +116 -0
- package/dist/src/service/accounts.js +109 -81
- package/dist/src/service/badge-private.js +62 -0
- package/dist/src/service/badge.js +203 -0
- package/dist/src/service/chain-prompts.js +87 -0
- package/dist/src/service/chain.js +120 -190
- package/dist/src/service/cleanup.js +114 -0
- package/dist/src/service/cli-check.js +1 -1
- package/dist/src/service/closing.js +57 -0
- package/dist/src/service/demo.js +46 -0
- package/dist/src/service/hosting.js +239 -18
- package/dist/src/service/install-check.js +78 -0
- package/dist/src/service/lifecycle.js +4 -7
- package/dist/src/service/stats.js +3 -3
- package/dist/src/service/trackers.js +27 -1
- package/dist/src/service/vocabulary.js +17 -0
- package/dist/src/service.js +215 -19
- package/dist/src/sessions/agents.js +10 -2
- package/dist/src/sessions/approvals.js +1 -1
- package/dist/src/sessions/ask.js +32 -6
- package/dist/src/sessions/boot.js +7 -0
- package/dist/src/sessions/chat.js +16 -4
- package/dist/src/sessions/commandPrompt.js +13 -6
- package/dist/src/sessions/history.js +2 -0
- package/dist/src/sessions/keepwarm.js +1 -1
- package/dist/src/sessions/launch.js +21 -25
- package/dist/src/sessions/lingering.js +30 -7
- package/dist/src/sessions/mail.js +7 -6
- package/dist/src/sessions/mailRelay.js +2 -2
- package/dist/src/sessions/mailbox.js +1 -1
- package/dist/src/sessions/monitor.js +47 -3
- package/dist/src/sessions/note.js +44 -19
- package/dist/src/sessions/permission.js +32 -10
- package/dist/src/sessions/protection.js +38 -14
- package/dist/src/sessions/rare.js +130 -0
- package/dist/src/sessions/runs-store.js +20 -0
- package/dist/src/sessions/runs.js +140 -0
- package/dist/src/sessions/tail.js +4 -0
- package/dist/src/sessions/transcript.js +64 -8
- package/dist/src/settings/defaults.js +1 -0
- package/dist/src/settings/registry.js +86 -24
- package/dist/src/settings/store.js +14 -5
- package/dist/src/setup.js +5 -0
- package/dist/src/shown-work.js +22 -0
- package/dist/src/state/settings.js +1 -0
- package/dist/src/stats/base-sql.js +7 -1
- package/dist/src/stats/checkpoint.js +8 -5
- package/dist/src/stats/model.js +1 -1
- package/dist/src/stats/reader.js +50 -25
- package/dist/src/stats/rules-reader.js +6 -2
- package/dist/src/stats/steps-reader.js +5 -0
- package/dist/src/stats/tally-schema.js +1 -1
- package/dist/src/storage/backup-model.js +3 -0
- package/dist/src/storage/backup-schedule.js +197 -0
- package/dist/src/storage/backup-worker.js +9 -0
- package/dist/src/storage/backup.js +141 -0
- package/dist/src/storage/browser-hotkeys.js +25 -0
- package/dist/src/storage/context-windows.js +39 -0
- package/dist/src/storage/copy.js +44 -13
- package/dist/src/storage/database.js +343 -4
- package/dist/src/storage/left-folders.js +16 -0
- package/dist/src/storage/migrations.js +98 -1
- package/dist/src/storage/owner.js +12 -7
- package/dist/src/storage/schema.js +1 -1
- package/dist/src/storage/startup.js +25 -0
- package/dist/src/storage/state-files.js +1 -1
- package/dist/src/storage/vacuum.js +29 -0
- package/dist/src/taskmcp/args.js +146 -0
- package/dist/src/taskmcp/calls.js +741 -0
- package/dist/src/taskmcp/downloads.js +87 -0
- package/dist/src/taskmcp/files.js +58 -0
- package/dist/src/taskmcp/retries.js +57 -0
- package/dist/src/taskmcp/server.js +81 -0
- package/dist/src/taskmcp/tools.js +128 -0
- package/dist/src/taskmcp/vocabulary.js +75 -0
- package/dist/src/tools/panel.js +41 -8
- package/dist/src/tools/sessionSettings.js +2 -1
- package/dist/src/tools/settings.js +16 -3
- package/dist/src/tracker/adapters.js +3 -1
- package/dist/src/tracker/card.js +16 -12
- package/dist/src/tracker/close.js +57 -0
- package/dist/src/tracker/closer.js +18 -15
- package/dist/src/tracker/closes.js +6 -0
- package/dist/src/tracker/control.js +32 -13
- package/dist/src/tracker/diagnostics.js +5 -2
- package/dist/src/tracker/editor.js +108 -0
- package/dist/src/tracker/export-target.js +30 -0
- package/dist/src/tracker/export.js +168 -0
- package/dist/src/tracker/health.js +5 -0
- package/dist/src/tracker/link.js +127 -24
- package/dist/src/tracker/markers.js +7 -0
- package/dist/src/tracker/model.js +0 -12
- package/dist/src/tracker/parents.js +8 -0
- package/dist/src/tracker/questions.js +24 -3
- package/dist/src/tracker/readers.js +19 -3
- package/dist/src/tracker/source.js +5 -0
- package/dist/src/tracker/start.js +61 -6
- package/dist/src/tracker/templates.js +102 -0
- package/dist/src/tracker/trackers.js +20 -10
- package/dist/src/updates/runner.js +1 -1
- package/dist/src/updates/settle.js +11 -3
- package/dist/src/updates/updater.js +4 -4
- package/dist/tally/src/builtin-tasks.js +45 -0
- package/dist/tally/src/catalogue.js +70 -0
- package/dist/tally/src/classify.js +1 -0
- package/dist/tally/src/collect.js +33 -10
- package/dist/tally/src/copilot.js +1 -0
- package/dist/tally/src/db-classify.js +46 -0
- package/dist/tally/src/db.js +66 -60
- package/dist/tally/src/migrations/10-rework-label.sql +73 -0
- package/dist/tally/src/migrations/11-catalogue-prices.sql +53 -0
- package/dist/tally/src/migrations/12-key-spends.sql +30 -0
- package/dist/tally/src/migrations/13-normal-spans.sql +110 -0
- package/dist/tally/src/migrations/14-model-families.sql +25 -0
- package/dist/tally/src/migrations/15-task-moves.sql +32 -0
- package/dist/tally/src/migrations.js +1 -1
- package/dist/tally/src/opencode.js +1 -0
- package/dist/tally/src/parse.js +3 -0
- package/dist/tally/src/rollout.js +2 -1
- package/dist/tally/src/rule-hook-size.js +2 -1
- package/dist/tally/src/rule-hook.js +3 -0
- package/dist/tally/src/task-moves.js +32 -0
- package/dist/web/assets/BadgeDialog-Dx2EERWr.js +1 -0
- package/dist/web/assets/BadgeDialog-W0giN4k2.css +1 -0
- package/dist/web/assets/DescriptionEditor-BL_6314d.js +216 -0
- package/dist/web/assets/ProjectPackages-D-Hqs0sG.js +1 -0
- package/dist/web/assets/Select-B5xZpiCG.js +1 -0
- package/dist/web/assets/Select-CYemy5Na.css +1 -0
- package/dist/web/assets/TaskCard-B9EJ_Qa2.js +2 -0
- package/dist/web/assets/TaskCard-BV2lQojC.css +1 -0
- package/dist/web/assets/TranscriptWindow-BN6jSpev.css +1 -0
- package/dist/web/assets/TranscriptWindow-E8DxggYC.js +4 -0
- package/dist/web/assets/accountParts-c2gPSGKK.js +3 -0
- package/dist/web/assets/accountParts-tFRVownp.css +1 -0
- package/dist/web/assets/blocks-B03KxlgQ.js +12 -0
- package/dist/web/assets/blocks-Dx3DACiG.css +1 -0
- package/dist/web/assets/cardDrafts-Cb5dNpJ3.js +12 -0
- package/dist/web/assets/cardDrafts-izWnctoh.css +1 -0
- package/dist/web/assets/cardSide-63fNWHHv.css +1 -0
- package/dist/web/assets/cardSide-CIGvmTwG.js +2 -0
- package/dist/web/assets/description-C-o9LBbp.css +1 -0
- package/dist/web/assets/feedLine-Buzox_AA.js +1 -0
- package/dist/web/assets/feedLine-CBjZXWwX.css +1 -0
- package/dist/web/assets/hooks-DdmIE6gF.js +1 -0
- package/dist/web/assets/index-CkYiatZt.css +1 -0
- package/dist/web/assets/index-DELgEMlH.js +25 -0
- package/dist/web/assets/lib-B8qNeB0X.css +1 -0
- package/dist/web/assets/lib-C1i2rKJZ.js +18 -0
- package/dist/web/assets/overview-B7iEgjQD.css +1 -0
- package/dist/web/assets/overview-D9PUjFeR.js +7 -0
- package/dist/web/assets/packageGroups-B34vA6-0.js +1 -0
- package/dist/web/assets/packages-Dld4uH9X.css +1 -0
- package/dist/web/assets/react-dom-vGPErQYp.js +1 -0
- package/dist/web/assets/rules-BVB-I2tg.js +1 -0
- package/dist/web/assets/rules-Bgil4ZBp.css +1 -0
- package/dist/web/assets/secret-CmK85pY6.js +1 -0
- package/dist/web/assets/secret-DldsC74x.css +1 -0
- package/dist/web/assets/useFileDrop-eZtIxL1H.js +1 -0
- package/dist/web/assets/useHeightGlide-BmtdsmN0.css +1 -0
- package/dist/web/assets/useHeightGlide-DQvvOoIL.js +3 -0
- package/dist/web/assets/useRowFocus-CwOoEmzD.js +1 -0
- package/dist/web/index.html +30 -9
- package/dist/web/theme.js +6 -0
- package/even-keel.config.example.json +5 -4
- package/package.json +21 -5
- package/plugins/agent-bridge/.claude-plugin/plugin.json +16 -0
- package/plugins/{checkpoint → agent-bridge}/README.md +20 -6
- package/plugins/agent-bridge/hooks/addressban.mjs +64 -0
- package/plugins/{checkpoint → agent-bridge}/hooks/checkpoint-mark.mjs +4 -3
- package/plugins/{checkpoint → agent-bridge}/hooks/evenkeel.mjs +28 -11
- package/plugins/agent-bridge/hooks/git-ban.mjs +31 -0
- package/plugins/agent-bridge/hooks/gitban.mjs +83 -0
- package/plugins/agent-bridge/hooks/handoff.mjs +20 -0
- package/plugins/{checkpoint → agent-bridge}/hooks/hooks.json +10 -0
- package/plugins/{checkpoint → agent-bridge}/hooks/mailbox.mjs +6 -3
- package/plugins/{checkpoint → agent-bridge}/hooks/nudges.mjs +11 -7
- package/plugins/{checkpoint/opencode/checkpoint.mjs → agent-bridge/opencode/agent-bridge.mjs} +15 -9
- package/plugins/forgejo/.claude-plugin/plugin.json +7 -0
- package/plugins/forgejo/.mcp.json +13 -0
- package/plugins/forgejo/README.md +23 -0
- package/plugins/forgejo/skills/task/SKILL.md +55 -0
- package/plugins/github/.claude-plugin/plugin.json +1 -1
- package/plugins/github/README.md +1 -1
- package/plugins/github/skills/task/SKILL.md +2 -2
- package/plugins/gitlab/.claude-plugin/plugin.json +1 -1
- package/plugins/gitlab/skills/task/SKILL.md +2 -2
- package/plugins/huly/.claude-plugin/plugin.json +1 -1
- package/plugins/huly/skills/task/SKILL.md +4 -4
- package/plugins/jira/.claude-plugin/plugin.json +1 -1
- package/plugins/jira/skills/task/SKILL.md +3 -3
- package/plugins/linear/.claude-plugin/plugin.json +1 -1
- package/plugins/linear/README.md +1 -1
- package/plugins/linear/skills/task/SKILL.md +3 -3
- package/plugins/tally/.claude-plugin/plugin.json +1 -1
- package/plugins/tally/skills/session-audit/SKILL.md +5 -5
- package/plugins/tasks/.claude-plugin/plugin.json +9 -0
- package/plugins/tasks/.mcp.json +8 -0
- package/plugins/tasks/README.md +42 -0
- package/plugins/tasks/hooks/calibration-context.mjs +45 -0
- package/plugins/tasks/hooks/calibration.mjs +92 -0
- package/plugins/tasks/hooks/check-service.mjs +15 -0
- package/plugins/tasks/hooks/hooks.json +28 -0
- package/plugins/tasks/hooks/service-check.mjs +34 -0
- package/plugins/tasks/hooks/show-calibration.mjs +19 -0
- package/plugins/tasks/opencode/tasks.mjs +28 -0
- package/plugins/tasks/skills/split/SKILL.md +29 -0
- package/plugins/tasks/skills/task/SKILL.md +61 -0
- package/service/EvenKeelTray.cs +4 -20
- package/service/install.sh +25 -2
- package/service/uninstall.ps1 +16 -0
- package/service/uninstall.sh +10 -0
- package/tally/tally.config.json +2 -0
- package/dist/web/assets/Loader-CRe-GCoI.js +0 -31
- package/dist/web/assets/Loader-DJJTBsaF.css +0 -1
- package/dist/web/assets/TaskCard-Br2QIllc.css +0 -1
- package/dist/web/assets/TaskCard-C2xeaHWD.js +0 -2
- package/dist/web/assets/TranscriptWindow-B9zsSmIg.css +0 -1
- package/dist/web/assets/TranscriptWindow-COL_WTrF.js +0 -4
- package/dist/web/assets/feedLine-D0lnFyBZ.js +0 -1
- package/dist/web/assets/index-DQje9Nfo.js +0 -25
- package/dist/web/assets/index-mDBlgk2Y.css +0 -1
- package/dist/web/assets/media-BlW-XXN0.js +0 -1
- package/dist/web/assets/media-DR8nAbPy.css +0 -1
- package/dist/web/assets/useModels-1oIk0mDX.css +0 -1
- package/dist/web/assets/useModels-DRW63oka.js +0 -15
- package/plugins/checkpoint/.claude-plugin/plugin.json +0 -9
- package/plugins/checkpoint/hooks/handoff.mjs +0 -9
- /package/plugins/{checkpoint → agent-bridge}/hooks/context-checkpoint.mjs +0 -0
- /package/plugins/{checkpoint → agent-bridge}/hooks/merge-check.mjs +0 -0
- /package/plugins/{checkpoint → agent-bridge}/hooks/merges.mjs +0 -0
- /package/plugins/{checkpoint → agent-bridge}/hooks/permission.mjs +0 -0
- /package/plugins/{checkpoint → agent-bridge}/hooks/schema-hint.mjs +0 -0
- /package/plugins/{checkpoint → agent-bridge}/hooks/standard-gate.mjs +0 -0
- /package/plugins/{checkpoint → agent-bridge}/hooks/standards.mjs +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
|
|
3
3
|
"name": "even-keel",
|
|
4
|
-
"description": "Plugins for sessions run by Even Keel:
|
|
4
|
+
"description": "Plugins for sessions run by Even Keel: tracker tools and task skills, and the bridge between agent sessions and the service",
|
|
5
5
|
"owner": {
|
|
6
6
|
"name": "Even Keel"
|
|
7
7
|
},
|
|
@@ -37,9 +37,21 @@
|
|
|
37
37
|
"category": "productivity"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
|
-
"name": "
|
|
41
|
-
"description": "
|
|
42
|
-
"source": "./plugins/
|
|
40
|
+
"name": "forgejo",
|
|
41
|
+
"description": "Forgejo Issues for Even Keel sessions, Gitea and Codeberg too: the official gitea-mcp server signed in with the profile's token and a skill to read the issue, record decisions, file blockers and questions, and close the issue by merging",
|
|
42
|
+
"source": "./plugins/forgejo",
|
|
43
|
+
"category": "productivity"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "tasks",
|
|
47
|
+
"description": "Any tracker of an Even Keel project for sessions: its own tasks server with five tools — list, read, create in batches, update with description patches, comment — and skills to work a task and split it into subtasks",
|
|
48
|
+
"source": "./plugins/tasks",
|
|
49
|
+
"category": "productivity"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "agent-bridge",
|
|
53
|
+
"description": "Bridge between agent sessions and Even Keel: context handoffs, chat messages mid-turn, permission questions, checks before merges, project standards, badge status and MCP schema hints. Context checkpoints for Even Keel chain sessions of Claude Code, Codex and OpenCode: once the context passes 200k tokens (and every 50k after, every 25k past 250k), the session is asked to write a handoff note and end its turn with `CHECKPOINT: <path>`, so that Even Keel continues the task in a fresh session instead of re-reading the whole context on every turn. A session that writes the note but forgets the line is sent back to add it. In a project without git, where every task shares one folder, the note is the task's own `.temp/handoff-<task>.md` instead of `.temp/handoff.md`. The context and the note come from Even Keel, which reads the transcripts of both agents, so a session it did not start is left alone. The first threshold is the project's calibrated one, and a task that has had three handoffs is asked only from 300k; on a small context window the late and hard thresholds come down to 85 % and 95 % of it. A project that turns handoffs by context off in Even Keel gets no nudge at all and is left to the agent's own compaction. Thresholds: CHECKPOINT_FIRST_TOKENS, CHECKPOINT_STEP_TOKENS, CHECKPOINT_LATE_TOKENS, CHECKPOINT_LATE_STEP_TOKENS, CHECKPOINT_HARD_TOKENS and CHECKPOINT_MAX_HANDOFFS. In a chain session of a project without a CI to judge its main branch, the merge of the task branch waits for the project's check commands from Even Keel and is blocked while they fail. A message the user writes from Even Keel's chat to a working session reaches it mid-turn: before or after its next tool call, at its stop (the turn goes on), or in place of a question it was about to ask. With the same call Even Keel may add a note of its own to a tool call's context: for a project that publishes a README badge, a request for one `status: …` line in the session's next message. A tool call Claude Code stops on a permission dialog for is asked on Even Keel's page too, and the user's \"Allow\" or \"Deny\" there answers the dialog without stopping the session. An MCP call Claude Code made before loading the tool's schema, whose numbers or lists went as strings and failed the server's validation, gets a hint in the context: load the schema with ToolSearch and repeat the call. A project's standards, set on Even Keel's page (a document of the repository and the files it guards): the first read of a guarded file brings the document into the context, the first edit of one before that is refused with the document, a compaction brings it again, and a standard that asks for it holds the merge (in PR mode, the PULL REQUEST mark) of a branch that changed its files until `.temp/shot/` has shots newer than the change and `.temp/<document>-check.md` answers each question of the document's section \"The check\". OpenCode sessions get the nudges and the chat's messages after each tool call, the standards, the merge check and the CHECKPOINT line from the plugin's OpenCode plugin (opencode/agent-bridge.mjs): a turn that wrote the note gets the line added to its last text instead of being sent back.",
|
|
54
|
+
"source": "./plugins/agent-bridge",
|
|
43
55
|
"category": "productivity"
|
|
44
56
|
},
|
|
45
57
|
{
|
package/.env.example
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copy to .env (ignored by git).
|
|
2
|
-
# The trackers' credentials are profiles: /settings ->
|
|
2
|
+
# The trackers' credentials are profiles: /settings -> Trackers and CI -> Add profile. Tracker variables found here
|
|
3
3
|
# on the first start become the default profile of their tracker, once; after that they are not read.
|
|
4
4
|
# HULY_URL=https://huly.example.com
|
|
5
5
|
# HULY_WORKSPACE=example
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
# The local MCP gateway chain sessions reach their packages' servers through (docs/packages.md); always on 127.0.0.1.
|
|
27
27
|
# EVEN_KEEL_MCP_PORT=4748
|
|
28
28
|
|
|
29
|
-
# The page's token for requests from other machines; required when EVEN_KEEL_HOST is not loopback (
|
|
29
|
+
# The page's token for requests from other machines; required when EVEN_KEEL_HOST is not loopback (docs/guide/setup.md).
|
|
30
30
|
# EVEN_KEEL_TOKEN=change-me-0123456789abcdef
|
|
31
31
|
|
|
32
32
|
# Folder with one Claude config folder per extra account; defaults to ~/.claude-accounts.
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,29 @@ All notable changes to Even Keel are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **What a task runs on is set on its card, not by a tracker label.** A task's run — provider, model and effort — is kept by Even Keel: the card's **Runs on** picks it, and a session can set it through the tasks server's `run` field of `tasks_create` and `task_update`. The effort is new: Claude Code's `low` to `max` and Codex's `minimal` to `xhigh`; empty passes none. Labels `<Provider> | <model>` are no longer read. The update moves the run label of each open task into its run once, in the projects that had run labels on; the labels stay in the tracker. The setting `modelLabels` is removed.
|
|
12
|
+
- **OpenCode keeps a model for each provider it signs in to.** Switching OpenCode's account to one on another sign-in (ChatGPT, an Anthropic key, OpenRouter, Copilot, Go, the free models) and back no longer loses the model you set: the model field shows the one of the account's sign-in and says which it is, in the settings of Even Keel and of a project. In the config `models.opencode` becomes `models.opencode/<provider>`; the update moves yours by its model's prefix. On a task's card, picking another provider and back brings back the model you typed for it.
|
|
13
|
+
|
|
14
|
+
- **No label is kept out of the chain by default.** `chain.excludedLabels` starts empty and the built-in tracker no longer offers `Manual`: name the label you mark your own tasks with in the chain rules. An installation that relied on the default keeps `Manual` in its shared list after the update, so the same tasks stay out.
|
|
15
|
+
- **The main branch field offers the repository's branches, and saving another branch switches the main checkout to it**, in a project's settings and in the wizard that adds one: a branch the repository lacks is created from where the checkout stands, one only on a remote is taken from there, and the line under the field says which before you save. The wizard fills in the checkout's current branch and no longer refuses a branch the repository lacks. A checkout switched by hand is shown in the settings and on the chain's card, with buttons to make its branch the main one or to put the folder back, instead of only when a task fails to start.
|
|
16
|
+
|
|
17
|
+
### Security
|
|
18
|
+
|
|
19
|
+
- **A chain session's request to Even Keel's own address is refused.** Even Keel lets a request from its own machine through without the page's token, so a session under someone else's text could change Protection, answer a question for you or create a task in another project with a plain `curl`. The new Protection group **Requests to Even Keel's address**, on by default, makes the `agent-bridge` plugin (1.2.0) refuse a shell command that sends such a request, on every agent. It is a pattern, not isolation: a script the session wrote gets past it. Turn it off for a project whose tasks work with Even Keel's API.
|
|
20
|
+
- **The page takes a request only from its own origin, port included.** Before, the `Origin` check compared only the name, so a page on another port of an allowed name — a project's dev server on `localhost`, another service on your tailnet name — could post commands to Even Keel: start a chain, answer a session, add an MCP server. Now `Origin` must match the request's `Host` with its port, and a `POST` to `/api/` must be `Content-Type: application/json` (415 otherwise). A script posting to the API without that header has to add it.
|
|
21
|
+
- **An MCP server's whole dependency tree is pinned, and npm runs no install scripts.** A server started as `npx -y <package>@<range>` keeps its npm lock file next to its install, so two installs of one version run the same code; an update that changes a dependency says how many in a notice and lists them in the log. Install scripts of the package and its dependencies no longer run as the service's user: a package that needs them gets the **Install scripts** switch in its details. A server started any other way (`uvx`, `docker run`, `npx` without `-y`) shows "version not pinned" in its row. The new installs happen at a package's next update or check; one already installed keeps running as it was.
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- **A project's lone `AGENTS.md` is no longer in a Claude session's context twice.** Claude Code reads the file by itself, so Even Keel stopped appending it to the system prompt; the same text reached every turn twice before.
|
|
26
|
+
- **A project's lone `AGENTS.md` reaches a Claude session again when a `CLAUDE.md` lies in a folder above the checkout**, such as `~/.claude/CLAUDE.md` for a checkout in your home folder. Claude Code skips the file then, so Even Keel appends it to the system prompt in that case only.
|
|
27
|
+
- The Forgejo plugin's `forgejo:task` skill loads again: its description is quoted, so the skill's frontmatter parses and chain sessions on Forgejo, Gitea and Codeberg projects get the skill (plugin 0.1.1). A test now parses the frontmatter of every bundled skill.
|
|
28
|
+
- **`npx even-keel` on macOS and Linux says what to do when npm cannot write its global folder**, as with Node from the nodejs.org installer, whose folder under `/usr/local` belongs to root: it installs nothing and prints the commands that move the folder into your home, also after an `EACCES` of npm itself. It refuses to run as root, since the service would then be installed for root.
|
|
29
|
+
|
|
7
30
|
## [0.2.4] - 2026-11-11
|
|
8
31
|
|
|
9
32
|
### Fixed
|
package/README.md
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
</picture>
|
|
6
6
|
</h1>
|
|
7
7
|
|
|
8
|
+
<a href="https://github.com/NamerekT/even-keel/releases"><picture><source media="(prefers-color-scheme: light)" srcset="https://even-keel-badge.nykolai-tymchenko.workers.dev/even-keel.svg?theme=light"><img alt="Even Keel: what the chain is building now" src="https://even-keel-badge.nykolai-tymchenko.workers.dev/even-keel.svg?theme=dark"></picture></a>
|
|
9
|
+
|
|
8
10
|
**You write the tickets. It takes the night shift.** Even Keel takes the open tasks of a project from your tracker, in the order of their `blocks` links, and works through them one at a time with [Claude Code](https://docs.claude.com/en/docs/claude-code/overview), [Codex](https://github.com/openai/codex), [OpenCode](https://opencode.ai) or [GitHub Copilot](https://github.com/github/copilot-cli) while you do something else. It waits out a spent usage limit, hands a long session over to a fresh one and keeps going while you are away. Only what really needs you — a question, a decision — waits for you: on its page, in the tracker or on your phone.
|
|
9
11
|
|
|
10
12
|
**Already inside, so you don't glue five tools together:**
|
|
@@ -13,9 +15,9 @@
|
|
|
13
15
|
- **A full context, your way.** A session past its context threshold writes a handoff note and a fresh one takes over in the same worktree — or leaves it to Claude Code's auto-compact, per project or per task by a [label](docs/guide/reference.md#configuration). The statistics count both, so you can compare what each cost on your own tasks.
|
|
14
16
|
- **What each task cost.** Built-in statistics (optional): cost and time per task, where sessions got stuck, how full the context ran, and before/after every change to your rule files. A session audit skill reads them and proposes what to change in your rules.
|
|
15
17
|
- **Every account on one page.** Claude, Codex, OpenCode and Copilot — subscriptions and API keys — each with its limits or spend and what runs on it right now. You pick the account a project runs on.
|
|
16
|
-
- **`CLAUDE.md` or `AGENTS.md`.** One instruction file reaches every agent: Claude Code
|
|
18
|
+
- **`CLAUDE.md` or `AGENTS.md`.** One instruction file reaches every agent: Claude Code reads your `AGENTS.md` by itself, Codex your `CLAUDE.md`.
|
|
17
19
|
|
|
18
|
-
It runs as a service on your own machine, next to your repositories, on your own subscription, through the unmodified `claude`, `codex`, `opencode` and `copilot` CLIs. Trackers out of the box: [Huly](https://huly.io), GitHub Issues, [Linear](https://linear.app), GitLab Issues (GitLab.com or your own server) and
|
|
20
|
+
It runs as a service on your own machine, next to your repositories, on your own subscription, through the unmodified `claude`, `codex`, `opencode` and `copilot` CLIs. Trackers out of the box: [Huly](https://huly.io), GitHub Issues, [Linear](https://linear.app), GitLab Issues (GitLab.com or your own server), Jira Cloud and Forgejo Issues (Forgejo, Gitea or Codeberg).
|
|
19
21
|
|
|
20
22
|

|
|
21
23
|
|
|
@@ -34,7 +36,7 @@ Even Keel wins in time, not in width: the agent keeps working while you are away
|
|
|
34
36
|
|
|
35
37
|
## What it does
|
|
36
38
|
|
|
37
|
-
- **A chain per project**, ordered by blockers first, then the order you drag on the page, then milestone and priority. A task
|
|
39
|
+
- **A chain per project**, ordered by blockers first, then the order you drag on the page, then milestone and priority. A task with a label you exclude stays yours.
|
|
38
40
|
- **A session per task**, in its own git worktree. It does the task and merges; Even Keel closes the task and starts the next.
|
|
39
41
|
- **Several trackers in one chain**, say the GitHub issues others file next to your private Huly project; or **several chains on one tracker project**, say fixes of a released version beside the next one.
|
|
40
42
|
- **Unattended mode** for nights: a task that needs your answer is left on its branch with the question, and the chain moves on.
|
|
@@ -49,21 +51,21 @@ Even Keel wins in time, not in width: the agent keeps working while you are away
|
|
|
49
51
|
| --- | --- | --- |
|
|
50
52
|
|  |  |  |
|
|
51
53
|
|
|
52
|
-
Every feature in full: [docs/guide
|
|
54
|
+
Every feature in full: [docs/guide](docs/guide/README.md), a page per area.
|
|
53
55
|
|
|
54
56
|
## Requirements
|
|
55
57
|
|
|
56
|
-
- **Node.js 24** or newer ([nodejs.org](https://nodejs.org/en/download); on Linux nvm needs no `sudo`).
|
|
58
|
+
- **Node.js 24** or newer ([nodejs.org](https://nodejs.org/en/download); on Linux nvm needs no `sudo`). On macOS the nodejs.org installer leaves npm's global folder to root: move it into your home first, with the [commands `npx even-keel` prints](docs/guide/setup.md#npms-global-folder-on-macos-and-linux), and never use `sudo`.
|
|
57
59
|
- **git** ([git-scm.com](https://git-scm.com/downloads)) with your name and e-mail set (`git config --global user.name` and `user.email`): sessions commit and merge under that name.
|
|
58
60
|
- **An agent and an account of it:** [Claude Code](https://docs.claude.com/en/docs/claude-code/setup), [Codex](https://github.com/openai/codex), [OpenCode](https://opencode.ai) (preview) or [GitHub Copilot CLI](https://github.com/github/copilot-cli) (preview), on a subscription or an API key; OpenCode also runs its free models. The setup can download the CLI for you.
|
|
59
|
-
- **A tracker:** a Huly workspace, GitHub or
|
|
61
|
+
- **A tracker:** a Huly workspace, GitHub, GitLab or Forgejo projects with Issues, a Linear workspace or a Jira Cloud site.
|
|
60
62
|
- **Windows, Linux or macOS.** Windows is where it runs every day; Linux and macOS (Apple silicon) were checked end to end. The MSI installer of Node can sit on "Preparing to install…" for over 10 minutes: wait it out.
|
|
61
63
|
|
|
62
64
|
## Before you run it
|
|
63
65
|
|
|
64
66
|
- **Even Keel depends on undocumented behaviour of the agents' CLIs**, none of it a public API. Last checked against **Claude Code 2.1.319**, **codex-cli 0.167.0**, **OpenCode 1.19.5** and **Copilot CLI 1.0.106**; the page warns when yours is another version and can run sessions on the checked one instead. A CLI update may break a part of Even Keel until it is adapted — please open an issue when it does. Details: [setup](docs/guide/setup.md#the-clis-it-depends-on).
|
|
65
67
|
- **Your subscription, the providers' terms.** A project runs on one account per provider, and a spent limit is waited out, never got round by switching accounts. Even Keel does not share, pool or resell access. Each agent's sessions fall under its provider's terms, listed below.
|
|
66
|
-
- **Sessions don't ask you before each tool call** (Claude in auto mode, Codex with `--approve-for-me` or, if you choose, with no sandbox). Protection refuses destructive commands; set up any other permissions and hooks in your agents' settings before you start a chain.
|
|
68
|
+
- **Sessions don't ask you before each tool call** (Claude in auto mode, Codex with `--approve-for-me` or, if you choose, with no sandbox). Protection refuses destructive commands; set up any other permissions and hooks in your agents' settings before you start a chain. Whoever writes a task's text steers its session: read [whose text a session reads and what it may do](docs/guide/security.md) before a chain runs on a public repository.
|
|
67
69
|
- **Your sign-in stays with the CLIs.** Even Keel reads only expiry dates, the e-mail and the plan; tokens are never copied or sent anywhere. An API key you add goes only to its own provider.
|
|
68
70
|
- **Some behaviour has never been checked live**, such as long chains on Codex, OpenCode and Copilot. Read [What has not been verified](docs/unverified.md) before relying on it; every live check is logged in [What has been verified](docs/verified.md).
|
|
69
71
|
|
|
@@ -100,7 +102,7 @@ Its data — `.env`, the state and the logs — lives in `%LOCALAPPDATA%\even-ke
|
|
|
100
102
|
|
|
101
103
|
Open `http://localhost:4747`. The first start walks a short setup — the languages, the agent and its account, a tracker profile, update checks, statistics — and then a wizard that adds a project: the agent, the repository folder, a tracker profile and the project in that tracker. What each tracker's token needs: [Token permissions](docs/guide/setup.md#token-permissions). For Claude Code the wizard also trusts the repository folder, unless you turn that off. Then press **Start** on the project: the chain takes its first task.
|
|
102
104
|
|
|
103
|
-
To let sessions read the task themselves, file blockers and leave comments, add the tracker's plugin (`huly@even-keel` and the like)
|
|
105
|
+
To let sessions read the task themselves, file blockers and leave comments, add the tracker's plugin (`huly@even-keel` and the like) in **Settings → Packages** → **Add a package**. Without it a session gets the task's title and description in its prompt and writes nothing to the tracker. Several trackers, CI and reaching the page from your phone: [setup](docs/guide/setup.md).
|
|
104
106
|
|
|
105
107
|
Running it from a clone, or a look at the page on fake data first: [From a clone](docs/guide/setup.md#from-a-clone).
|
|
106
108
|
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { homedir, userInfo } from 'node:os';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
/** The keys that make a profile's credentials expire within hours. */
|
|
5
|
+
const SHORT_LIVED_KEYS = ['sso_session', 'sso_start_url', 'login_session', 'aws_session_token'];
|
|
6
|
+
/** The AWS CLI's files where the SDK reads them: `AWS_CONFIG_FILE` and `AWS_SHARED_CREDENTIALS_FILE` move them. */
|
|
7
|
+
export function awsFiles(env) {
|
|
8
|
+
return {
|
|
9
|
+
config: env.AWS_CONFIG_FILE ?? join(homedir(), '.aws', 'config'),
|
|
10
|
+
credentials: env.AWS_SHARED_CREDENTIALS_FILE ?? join(homedir(), '.aws', 'credentials'),
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export function readAwsProfiles(env) {
|
|
14
|
+
const files = awsFiles(env);
|
|
15
|
+
return { profiles: awsProfiles(readText(files.config), readText(files.credentials)), user: currentUser(), home: homedir() };
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The named profiles of both files, `default` first, the rest by name. In `config` a profile is `[profile name]` (the
|
|
19
|
+
* default — `[default]`) and `[sso-session …]` is no profile; in `credentials` it is `[name]`.
|
|
20
|
+
*/
|
|
21
|
+
export function awsProfiles(config, credentials) {
|
|
22
|
+
const merged = new Map();
|
|
23
|
+
const add = (name, keys) => merged.set(name, new Map([...(merged.get(name) ?? []), ...keys]));
|
|
24
|
+
for (const [section, keys] of parseIni(config)) {
|
|
25
|
+
const name = section === 'default' ? 'default' : /^profile\s+(.+)$/.exec(section)?.[1]?.trim();
|
|
26
|
+
if (name !== undefined && name !== '')
|
|
27
|
+
add(name, keys);
|
|
28
|
+
}
|
|
29
|
+
for (const [section, keys] of parseIni(credentials))
|
|
30
|
+
add(section, keys);
|
|
31
|
+
return [...merged]
|
|
32
|
+
.map(([name, keys]) => ({ name, region: keys.get('region') ?? null, shortLived: SHORT_LIVED_KEYS.some((key) => keys.has(key)) }))
|
|
33
|
+
.sort((a, b) => Number(b.name === 'default') - Number(a.name === 'default') || a.name.localeCompare(b.name));
|
|
34
|
+
}
|
|
35
|
+
/** Whether the named profile's credentials expire within hours; false for one not found. */
|
|
36
|
+
export function shortLivedProfile(env, name) {
|
|
37
|
+
const files = awsFiles(env);
|
|
38
|
+
return awsProfiles(readText(files.config), readText(files.credentials)).find((profile) => profile.name === name)?.shortLived ?? false;
|
|
39
|
+
}
|
|
40
|
+
function parseIni(text) {
|
|
41
|
+
const sections = new Map();
|
|
42
|
+
let current = null;
|
|
43
|
+
for (const raw of text.split(/\r?\n/)) {
|
|
44
|
+
const line = raw.trim();
|
|
45
|
+
if (line === '' || line.startsWith('#') || line.startsWith(';'))
|
|
46
|
+
continue;
|
|
47
|
+
const head = /^\[([^\]]+)\]$/.exec(line);
|
|
48
|
+
if (head !== null) {
|
|
49
|
+
const name = head[1].trim();
|
|
50
|
+
current = sections.get(name) ?? new Map();
|
|
51
|
+
sections.set(name, current);
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
const pair = /^([^=]+?)\s*=\s*(.*)$/.exec(line);
|
|
55
|
+
if (pair !== null && current !== null && !/^\s/.test(raw))
|
|
56
|
+
current.set(pair[1].toLowerCase(), pair[2]);
|
|
57
|
+
}
|
|
58
|
+
return sections;
|
|
59
|
+
}
|
|
60
|
+
function readText(file) {
|
|
61
|
+
try {
|
|
62
|
+
return readFileSync(file, 'utf8');
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
return '';
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/** The account Even Keel runs as: the one whose home holds `~/.aws`. */
|
|
69
|
+
export function currentUser() {
|
|
70
|
+
try {
|
|
71
|
+
return userInfo().username;
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
return '';
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { homedir } from 'node:os';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { currentUser } from './aws.js';
|
|
5
|
+
/** The Azure CLI's folder, where `az login` leaves the profile: `AZURE_CONFIG_DIR` moves it. */
|
|
6
|
+
export function azureDir(env) {
|
|
7
|
+
if (env.AZURE_CONFIG_DIR !== undefined && env.AZURE_CONFIG_DIR !== '')
|
|
8
|
+
return env.AZURE_CONFIG_DIR;
|
|
9
|
+
return join(homedir(), '.azure');
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The Azure sign-in of the user Even Keel runs as, for the Foundry form's Entra ID way (BTN-824). The Azure SDK's chain
|
|
13
|
+
* the CLI uses tries a service principal of the environment before `az login`, so both are told.
|
|
14
|
+
*/
|
|
15
|
+
export function readAzure(env) {
|
|
16
|
+
const profileFile = join(azureDir(env), 'azureProfile.json');
|
|
17
|
+
const secret = env.AZURE_CLIENT_SECRET || env.AZURE_CLIENT_CERTIFICATE_PATH || env.AZURE_FEDERATED_TOKEN_FILE;
|
|
18
|
+
return {
|
|
19
|
+
user: currentUser(),
|
|
20
|
+
home: homedir(),
|
|
21
|
+
profileFile,
|
|
22
|
+
signedIn: subscriptions(profileFile) > 0,
|
|
23
|
+
environment: Boolean(env.AZURE_CLIENT_ID && env.AZURE_TENANT_ID && secret),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/** The subscriptions of the profile; the Azure CLI writes it with a byte order mark on Windows. */
|
|
27
|
+
function subscriptions(file) {
|
|
28
|
+
try {
|
|
29
|
+
const value = JSON.parse(readFileSync(file, 'utf8').replace(/^/, ''));
|
|
30
|
+
const list = typeof value === 'object' && value !== null ? value.subscriptions : undefined;
|
|
31
|
+
return Array.isArray(list) ? list.length : 0;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return 0;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { notice } from '../notice/notice.js';
|
|
2
|
+
const NOBODY = { user: '', home: '' };
|
|
3
|
+
/**
|
|
4
|
+
* Bedrock's refusals as the CLI words them (its own table of `refused`, `denied` and `credential` in 2.1.319) and as AWS
|
|
5
|
+
* answers, first match wins: a payment refusal also says access is denied, and a credential timeout is a credential error.
|
|
6
|
+
*/
|
|
7
|
+
const BEDROCK_ERRORS = [
|
|
8
|
+
[/INVALID_PAYMENT_INSTRUMENT|valid payment instrument/i, () => notice('cloud.bedrockPayment', {})],
|
|
9
|
+
[/default-chain credential resolve timed out/i, (whose) => notice('cloud.awsTimeout', whose)],
|
|
10
|
+
[
|
|
11
|
+
/Could not load credentials|No AWS credentials found|ExpiredToken|InvalidSignature|SignatureDoesNotMatch|UnrecognizedClient|InvalidClientTokenId|security token.*(invalid|expired)|SSO session.*expired|Token has expired|profile .* could not be found|CredentialsProviderError/i,
|
|
12
|
+
(whose) => notice('cloud.awsCredentials', whose),
|
|
13
|
+
],
|
|
14
|
+
[/on-demand throughput|provided model identifier is invalid/i, () => notice('cloud.bedrockRegion', {})],
|
|
15
|
+
[
|
|
16
|
+
/you don't have access to the model|anthropic\.\S+ is not available for this account|marketplace subscription for this model cannot be completed|is not authorized to perform: bedrock:InvokeModel|AccessDeniedException/i,
|
|
17
|
+
() => notice('cloud.bedrockModelDenied', {}),
|
|
18
|
+
],
|
|
19
|
+
[/ThrottlingException|TooManyRequestsException|Too many (requests|tokens), please wait/i, () => notice('cloud.throttled', {})],
|
|
20
|
+
];
|
|
21
|
+
/**
|
|
22
|
+
* Vertex AI's refusals (BTN-823): Google's auth library as the CLI's own Vertex wizard reads it in 2.1.319, and Google
|
|
23
|
+
* Cloud's error bodies. Billing goes before the disabled API, which a project without billing may also report. Every
|
|
24
|
+
* pattern names Google's own words, so an `invalid_grant` or a 404 of Anthropic's API is left alone.
|
|
25
|
+
*/
|
|
26
|
+
const VERTEX_ERRORS = [
|
|
27
|
+
[
|
|
28
|
+
/Could not load the default credentials|does not exist, or it is not a file|The incoming JSON object does not|Must pass in a JSON object containing|invalid_rapt|reauth related error|Token has been expired or revoked|Timed out waiting for GCP credentials|Unable to detect a Project Id/i,
|
|
29
|
+
(whose) => notice('cloud.gcpCredentials', whose),
|
|
30
|
+
],
|
|
31
|
+
[/BILLING_DISABLED|requires billing to be enabled/i, () => notice('cloud.vertexBilling', {})],
|
|
32
|
+
[/SERVICE_DISABLED|has not been used in project \S+ before or it is disabled/i, () => notice('cloud.vertexApi', {})],
|
|
33
|
+
[/Publisher Model .*(not found|does not have access)/i, () => notice('cloud.vertexModel', {})],
|
|
34
|
+
[/Quota exceeded for aiplatform\.googleapis\.com|RESOURCE_EXHAUSTED/i, () => notice('cloud.vertexQuota', {})],
|
|
35
|
+
[/Permission '?aiplatform\.\S+'? denied/i, () => notice('cloud.vertexPermission', {})],
|
|
36
|
+
];
|
|
37
|
+
/**
|
|
38
|
+
* Microsoft Foundry's refusals (BTN-824): the Azure SDK's chain and the CLI's own Foundry wording in 2.1.319, and Azure's
|
|
39
|
+
* error bodies. Every pattern names Azure's or the CLI's Foundry words, never a bare 401, 404 or 429.
|
|
40
|
+
*/
|
|
41
|
+
const FOUNDRY_ERRORS = [
|
|
42
|
+
[
|
|
43
|
+
/Failed to get token from azureADTokenProvider|ChainedTokenCredential authentication failed|CredentialUnavailableError|Please run 'az login'/i,
|
|
44
|
+
(whose) => notice('cloud.azureCredentials', whose),
|
|
45
|
+
],
|
|
46
|
+
[/DeploymentNotFound|The API deployment for this resource does not exist/i, () => notice('cloud.foundryDeployment', {})],
|
|
47
|
+
[
|
|
48
|
+
/MarketplacePurchaseEligibilityFailed|marketplace (offer|purchase|subscription).*(not eligible|failed|not available)|subscription is not (eligible|supported) for|not available (for|in) (this|your) (Azure )?subscription/i,
|
|
49
|
+
() => notice('cloud.foundrySubscription', {}),
|
|
50
|
+
],
|
|
51
|
+
[
|
|
52
|
+
/refresh your Foundry credential|Access denied due to invalid subscription key|Access token is missing, invalid, audience is incorrect|lacks the required data action/i,
|
|
53
|
+
() => notice('cloud.foundryRefused', {}),
|
|
54
|
+
],
|
|
55
|
+
[/RateLimitReached|have exceeded (the )?(token|call) rate limit/i, () => notice('cloud.foundryThrottled', {})],
|
|
56
|
+
];
|
|
57
|
+
/**
|
|
58
|
+
* The first message of a Foundry account that cannot reach its resource: the CLI retries the connection and gives up.
|
|
59
|
+
* Only a Foundry account's check reads it so: the words are the same for any host.
|
|
60
|
+
*/
|
|
61
|
+
const FOUNDRY_UNREACHABLE = /Connection error|ENOTFOUND|EAI_AGAIN|getaddrinfo|ECONNREFUSED|Unable to connect to API/i;
|
|
62
|
+
const CLOUD_ERRORS = [...FOUNDRY_ERRORS, ...VERTEX_ERRORS, ...BEDROCK_ERRORS];
|
|
63
|
+
/**
|
|
64
|
+
* What a cloud refusal means and what to do, by the error's text; undefined for any other error. `cloud` is the
|
|
65
|
+
* account's cloud where it is known, as at the check of a new account, for the errors only that cloud words so.
|
|
66
|
+
*/
|
|
67
|
+
export function cloudErrorNotice(text, whose = NOBODY, cloud) {
|
|
68
|
+
const known = CLOUD_ERRORS.find(([pattern]) => pattern.test(text))?.[1](whose);
|
|
69
|
+
if (known === undefined && cloud === 'foundry' && FOUNDRY_UNREACHABLE.test(text))
|
|
70
|
+
return notice('cloud.foundryUnreachable', {});
|
|
71
|
+
return known;
|
|
72
|
+
}
|