@namzu/cli 26.2.0 → 27.0.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/CHANGELOG.md +312 -0
- package/README.md +49 -34
- package/dist/bin.js +7 -0
- package/dist/bin.js.map +1 -1
- package/dist/checkpoints/store.d.ts +17 -4
- package/dist/checkpoints/store.d.ts.map +1 -1
- package/dist/checkpoints/store.js +20 -5
- package/dist/checkpoints/store.js.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/acp.d.ts +23 -1
- package/dist/commands/acp.d.ts.map +1 -1
- package/dist/commands/acp.js +41 -2
- package/dist/commands/acp.js.map +1 -1
- package/dist/commands/drain.d.ts +69 -2
- package/dist/commands/drain.d.ts.map +1 -1
- package/dist/commands/drain.js +214 -134
- package/dist/commands/drain.js.map +1 -1
- package/dist/commands/eval.js +1 -1
- package/dist/commands/eval.js.map +1 -1
- package/dist/commands/provider-wait.d.ts +5 -5
- package/dist/commands/provider-wait.d.ts.map +1 -1
- package/dist/commands/provider-wait.js +2 -2
- package/dist/commands/resident.d.ts.map +1 -1
- package/dist/commands/resident.js +2 -1
- package/dist/commands/resident.js.map +1 -1
- package/dist/commands/run-flags.d.ts +7 -7
- package/dist/commands/run-flags.js +4 -4
- package/dist/commands/run-stream.d.ts +16 -12
- package/dist/commands/run-stream.d.ts.map +1 -1
- package/dist/commands/run-stream.js +142 -98
- package/dist/commands/run-stream.js.map +1 -1
- package/dist/commands/run.d.ts +6 -4
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +129 -45
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/serve.js +2 -2
- package/dist/commands/serve.js.map +1 -1
- package/dist/commands/state.js +8 -8
- package/dist/commands/state.js.map +1 -1
- package/dist/config/load.d.ts +1 -1
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/load.js +17 -5
- package/dist/config/load.js.map +1 -1
- package/dist/config/run-limits.d.ts +20 -8
- package/dist/config/run-limits.d.ts.map +1 -1
- package/dist/config/run-limits.js +28 -46
- package/dist/config/run-limits.js.map +1 -1
- package/dist/config/schema.d.ts +44 -19
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js.map +1 -1
- package/dist/config/tool-result-screens.js +1 -1
- package/dist/context/directories.d.ts +37 -0
- package/dist/context/directories.d.ts.map +1 -0
- package/dist/context/directories.js +69 -0
- package/dist/context/directories.js.map +1 -0
- package/dist/context/environment.d.ts +55 -0
- package/dist/context/environment.d.ts.map +1 -1
- package/dist/context/environment.js +96 -0
- package/dist/context/environment.js.map +1 -1
- package/dist/context/project-tracker.d.ts +3 -3
- package/dist/context/project-tracker.d.ts.map +1 -1
- package/dist/context/project-tracker.js +3 -3
- package/dist/context/project-tracker.js.map +1 -1
- package/dist/context/project.d.ts +1 -1
- package/dist/context/project.js +1 -1
- package/dist/context/sandbox.d.ts +22 -3
- package/dist/context/sandbox.d.ts.map +1 -1
- package/dist/context/sandbox.js +42 -4
- package/dist/context/sandbox.js.map +1 -1
- package/dist/doctor/checks/chain.d.ts +1 -1
- package/dist/doctor/checks/chain.js +5 -5
- package/dist/doctor/checks/chain.js.map +1 -1
- package/dist/doctor/checks/invariants.d.ts +2 -2
- package/dist/doctor/checks/invariants.js +5 -5
- package/dist/doctor/checks/invariants.js.map +1 -1
- package/dist/doctor/checks/logging.js +1 -1
- package/dist/doctor/checks/logging.js.map +1 -1
- package/dist/doctor/checks/sandbox.js +1 -1
- package/dist/doctor/checks/sandbox.js.map +1 -1
- package/dist/doctor/checks/session-export.d.ts +1 -1
- package/dist/doctor/checks/session-export.js +2 -2
- package/dist/doctor/checks/session-export.js.map +1 -1
- package/dist/doctor/checks/telemetry.d.ts +1 -1
- package/dist/doctor/checks/telemetry.js +1 -1
- package/dist/doctor/registry.js +2 -2
- package/dist/doctor/registry.js.map +1 -1
- package/dist/exit-codes.d.ts +2 -2
- package/dist/exit-codes.js +2 -2
- package/dist/integrations/mcp/servers.d.ts +1 -1
- package/dist/integrations/providers/chain-capabilities.d.ts +6 -6
- package/dist/integrations/providers/chain-capabilities.js +8 -8
- package/dist/integrations/providers/chain-capabilities.js.map +1 -1
- package/dist/integrations/providers/index.d.ts +1 -1
- package/dist/integrations/providers/index.d.ts.map +1 -1
- package/dist/integrations/providers/index.js +1 -1
- package/dist/integrations/providers/index.js.map +1 -1
- package/dist/integrations/providers/register.d.ts +1 -1
- package/dist/integrations/providers/register.js +1 -1
- package/dist/integrations/providers/registry.d.ts +74 -1
- package/dist/integrations/providers/registry.d.ts.map +1 -1
- package/dist/integrations/providers/registry.js +75 -0
- package/dist/integrations/providers/registry.js.map +1 -1
- package/dist/integrations/resident/inspection.d.ts +4 -1
- package/dist/integrations/resident/inspection.d.ts.map +1 -1
- package/dist/integrations/resident/inspection.js +53 -34
- package/dist/integrations/resident/inspection.js.map +1 -1
- package/dist/integrations/resident/learning-storage.d.ts +7 -2
- package/dist/integrations/resident/learning-storage.d.ts.map +1 -1
- package/dist/integrations/resident/learning-storage.js +12 -8
- package/dist/integrations/resident/learning-storage.js.map +1 -1
- package/dist/integrations/resident/runner-store.d.ts +1 -1
- package/dist/integrations/resident/runner-store.d.ts.map +1 -1
- package/dist/integrations/resident/runner-store.js +5 -2
- package/dist/integrations/resident/runner-store.js.map +1 -1
- package/dist/integrations/resident/runner-worker.js +1 -0
- package/dist/integrations/resident/runner-worker.js.map +1 -1
- package/dist/integrations/resident/session-log-reads.d.ts +37 -0
- package/dist/integrations/resident/session-log-reads.d.ts.map +1 -0
- package/dist/integrations/resident/session-log-reads.js +125 -0
- package/dist/integrations/resident/session-log-reads.js.map +1 -0
- package/dist/integrations/resident/session-step.d.ts +2 -0
- package/dist/integrations/resident/session-step.d.ts.map +1 -1
- package/dist/integrations/resident/session-step.js +15 -13
- package/dist/integrations/resident/session-step.js.map +1 -1
- package/dist/integrations/resident/storage.d.ts +23 -1
- package/dist/integrations/resident/storage.d.ts.map +1 -1
- package/dist/integrations/resident/storage.js +60 -17
- package/dist/integrations/resident/storage.js.map +1 -1
- package/dist/integrations/resident/tool-evidence.d.ts +4 -2
- package/dist/integrations/resident/tool-evidence.d.ts.map +1 -1
- package/dist/integrations/resident/tool-evidence.js +36 -30
- package/dist/integrations/resident/tool-evidence.js.map +1 -1
- package/dist/integrations/resident/verification.d.ts +2 -2
- package/dist/integrations/resident/verification.d.ts.map +1 -1
- package/dist/integrations/resident/verification.js +4 -4
- package/dist/integrations/resident/verification.js.map +1 -1
- package/dist/integrations/sessions/checkpoint-view.d.ts +13 -0
- package/dist/integrations/sessions/checkpoint-view.d.ts.map +1 -0
- package/dist/integrations/sessions/checkpoint-view.js +48 -0
- package/dist/integrations/sessions/checkpoint-view.js.map +1 -0
- package/dist/integrations/sessions/context-inventory.js +1 -1
- package/dist/integrations/sessions/context-inventory.js.map +1 -1
- package/dist/integrations/sessions/conversation-search.d.ts +16 -20
- package/dist/integrations/sessions/conversation-search.d.ts.map +1 -1
- package/dist/integrations/sessions/conversation-search.js +305 -731
- package/dist/integrations/sessions/conversation-search.js.map +1 -1
- package/dist/integrations/sessions/evidence-page-validation.d.ts +4 -4
- package/dist/integrations/sessions/evidence-page-validation.d.ts.map +1 -1
- package/dist/integrations/sessions/evidence-page-validation.js +1 -1
- package/dist/integrations/sessions/evidence-page-validation.js.map +1 -1
- package/dist/integrations/sessions/evidence-recall.d.ts +40 -2
- package/dist/integrations/sessions/evidence-recall.d.ts.map +1 -1
- package/dist/integrations/sessions/evidence-recall.js +41 -97
- package/dist/integrations/sessions/evidence-recall.js.map +1 -1
- package/dist/integrations/sessions/store.d.ts +153 -85
- package/dist/integrations/sessions/store.d.ts.map +1 -1
- package/dist/integrations/sessions/store.js +414 -484
- package/dist/integrations/sessions/store.js.map +1 -1
- package/dist/integrations/sessions/task-context.d.ts +15 -2
- package/dist/integrations/sessions/task-context.d.ts.map +1 -1
- package/dist/integrations/sessions/task-context.js +34 -11
- package/dist/integrations/sessions/task-context.js.map +1 -1
- package/dist/integrations/sessions/transcript-export.d.ts +13 -6
- package/dist/integrations/sessions/transcript-export.d.ts.map +1 -1
- package/dist/integrations/sessions/transcript-export.js +148 -263
- package/dist/integrations/sessions/transcript-export.js.map +1 -1
- package/dist/integrations/state/home.d.ts +4 -16
- package/dist/integrations/state/home.d.ts.map +1 -1
- package/dist/integrations/state/home.js +6 -42
- package/dist/integrations/state/home.js.map +1 -1
- package/dist/integrations/state/project.d.ts +6 -7
- package/dist/integrations/state/project.d.ts.map +1 -1
- package/dist/integrations/state/project.js +7 -9
- package/dist/integrations/state/project.js.map +1 -1
- package/dist/integrations/state/report.d.ts +27 -41
- package/dist/integrations/state/report.d.ts.map +1 -1
- package/dist/integrations/state/report.js +172 -464
- package/dist/integrations/state/report.js.map +1 -1
- package/dist/integrations/state/retention.d.ts +18 -0
- package/dist/integrations/state/retention.d.ts.map +1 -0
- package/dist/integrations/state/retention.js +18 -0
- package/dist/integrations/state/retention.js.map +1 -0
- package/dist/integrations/subagents/activity.d.ts +36 -31
- package/dist/integrations/subagents/activity.d.ts.map +1 -1
- package/dist/integrations/subagents/activity.js +27 -23
- package/dist/integrations/subagents/activity.js.map +1 -1
- package/dist/integrations/subagents/batches.d.ts +91 -0
- package/dist/integrations/subagents/batches.d.ts.map +1 -0
- package/dist/integrations/subagents/batches.js +172 -0
- package/dist/integrations/subagents/batches.js.map +1 -0
- package/dist/integrations/subagents/parent.d.ts +26 -11
- package/dist/integrations/subagents/parent.d.ts.map +1 -1
- package/dist/integrations/subagents/parent.js +13 -28
- package/dist/integrations/subagents/parent.js.map +1 -1
- package/dist/integrations/subagents/policy.d.ts +2 -2
- package/dist/integrations/subagents/policy.d.ts.map +1 -1
- package/dist/integrations/subagents/policy.js +2 -2
- package/dist/integrations/subagents/policy.js.map +1 -1
- package/dist/integrations/subagents/replay.d.ts +91 -26
- package/dist/integrations/subagents/replay.d.ts.map +1 -1
- package/dist/integrations/subagents/replay.js +216 -114
- package/dist/integrations/subagents/replay.js.map +1 -1
- package/dist/integrations/subagents/runtime.d.ts +50 -26
- package/dist/integrations/subagents/runtime.d.ts.map +1 -1
- package/dist/integrations/subagents/runtime.js +132 -126
- package/dist/integrations/subagents/runtime.js.map +1 -1
- package/dist/integrations/subagents/saved-agents.d.ts +57 -0
- package/dist/integrations/subagents/saved-agents.d.ts.map +1 -0
- package/dist/integrations/subagents/saved-agents.js +102 -0
- package/dist/integrations/subagents/saved-agents.js.map +1 -0
- package/dist/integrations/subagents/slash.d.ts +55 -0
- package/dist/integrations/subagents/slash.d.ts.map +1 -0
- package/dist/integrations/subagents/slash.js +45 -0
- package/dist/integrations/subagents/slash.js.map +1 -0
- package/dist/integrations/telemetry/session-export.d.ts +6 -6
- package/dist/integrations/telemetry/session-export.d.ts.map +1 -1
- package/dist/integrations/telemetry/session-export.js +2 -2
- package/dist/memory/presentation.d.ts +11 -0
- package/dist/memory/presentation.d.ts.map +1 -1
- package/dist/memory/presentation.js +25 -0
- package/dist/memory/presentation.js.map +1 -1
- package/dist/memory/store.d.ts +13 -7
- package/dist/memory/store.d.ts.map +1 -1
- package/dist/memory/store.js +37 -11
- package/dist/memory/store.js.map +1 -1
- package/dist/memory/typed.d.ts +116 -0
- package/dist/memory/typed.d.ts.map +1 -0
- package/dist/memory/typed.js +336 -0
- package/dist/memory/typed.js.map +1 -0
- package/dist/permissions/checks.d.ts +1 -1
- package/dist/permissions/checks.js +1 -1
- package/dist/permissions/headless-trust.d.ts +2 -2
- package/dist/permissions/headless-trust.d.ts.map +1 -1
- package/dist/permissions/headless-trust.js +3 -3
- package/dist/permissions/headless-trust.js.map +1 -1
- package/dist/permissions/mode.d.ts +4 -4
- package/dist/permissions/mode.js +1 -1
- package/dist/permissions/rules.d.ts +1 -1
- package/dist/permissions/rules.js +1 -1
- package/dist/termination.d.ts +75 -0
- package/dist/termination.d.ts.map +1 -0
- package/dist/termination.js +143 -0
- package/dist/termination.js.map +1 -0
- package/dist/tui/AgentExplorer.d.ts +2 -2
- package/dist/tui/AgentExplorer.js +4 -4
- package/dist/tui/AgentExplorer.js.map +1 -1
- package/dist/tui/App.d.ts +9 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/App.js +458 -304
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/LiveActivity.d.ts +1 -1
- package/dist/tui/LiveActivity.d.ts.map +1 -1
- package/dist/tui/PermissionOverlay.d.ts +8 -0
- package/dist/tui/PermissionOverlay.d.ts.map +1 -1
- package/dist/tui/PermissionOverlay.js +25 -2
- package/dist/tui/PermissionOverlay.js.map +1 -1
- package/dist/tui/Picker.d.ts +14 -1
- package/dist/tui/Picker.d.ts.map +1 -1
- package/dist/tui/Picker.js +598 -132
- package/dist/tui/Picker.js.map +1 -1
- package/dist/tui/agent.d.ts +208 -132
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/agent.js +523 -313
- package/dist/tui/agent.js.map +1 -1
- package/dist/tui/conversation-evidence-view.js +3 -3
- package/dist/tui/conversation-evidence-view.js.map +1 -1
- package/dist/tui/conversation-history.d.ts +4 -21
- package/dist/tui/conversation-history.d.ts.map +1 -1
- package/dist/tui/conversation-history.js +4 -28
- package/dist/tui/conversation-history.js.map +1 -1
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/index.js +27 -1
- package/dist/tui/index.js.map +1 -1
- package/dist/tui/log-pane.js +1 -1
- package/dist/tui/markdownParser.d.ts +1 -1
- package/dist/tui/markdownParser.js +1 -1
- package/dist/tui/model-choices.d.ts.map +1 -1
- package/dist/tui/model-choices.js +20 -1
- package/dist/tui/model-choices.js.map +1 -1
- package/dist/tui/permission-review.d.ts +16 -0
- package/dist/tui/permission-review.d.ts.map +1 -1
- package/dist/tui/permission-review.js +25 -2
- package/dist/tui/permission-review.js.map +1 -1
- package/dist/tui/provider-list.d.ts +206 -41
- package/dist/tui/provider-list.d.ts.map +1 -1
- package/dist/tui/provider-list.js +248 -52
- package/dist/tui/provider-list.js.map +1 -1
- package/dist/tui/slashCommands.d.ts +29 -40
- package/dist/tui/slashCommands.d.ts.map +1 -1
- package/dist/tui/slashCommands.js +70 -61
- package/dist/tui/slashCommands.js.map +1 -1
- package/dist/tui/terminal-choice-text.d.ts +22 -0
- package/dist/tui/terminal-choice-text.d.ts.map +1 -1
- package/dist/tui/terminal-choice-text.js +81 -0
- package/dist/tui/terminal-choice-text.js.map +1 -1
- package/dist/tui/{run-interruption.d.ts → turn-interruption.d.ts} +4 -4
- package/dist/tui/turn-interruption.d.ts.map +1 -0
- package/dist/tui/{run-interruption.js → turn-interruption.js} +20 -20
- package/dist/tui/turn-interruption.js.map +1 -0
- package/dist/tui/turn-limits-settings.d.ts +39 -0
- package/dist/tui/turn-limits-settings.d.ts.map +1 -0
- package/dist/tui/{run-limits-settings.js → turn-limits-settings.js} +18 -18
- package/dist/tui/turn-limits-settings.js.map +1 -0
- package/dist/tui/types.d.ts +3 -3
- package/dist/tui/types.d.ts.map +1 -1
- package/dist/user-commands/store.d.ts +1 -1
- package/dist/user-commands/store.js +1 -1
- package/package.json +8 -8
- package/dist/integrations/sessions/compaction-evidence.d.ts +0 -5
- package/dist/integrations/sessions/compaction-evidence.d.ts.map +0 -1
- package/dist/integrations/sessions/compaction-evidence.js +0 -59
- package/dist/integrations/sessions/compaction-evidence.js.map +0 -1
- package/dist/integrations/sessions/database.d.ts +0 -5
- package/dist/integrations/sessions/database.d.ts.map +0 -1
- package/dist/integrations/sessions/database.js +0 -34
- package/dist/integrations/sessions/database.js.map +0 -1
- package/dist/integrations/sessions/paths.d.ts +0 -7
- package/dist/integrations/sessions/paths.d.ts.map +0 -1
- package/dist/integrations/sessions/paths.js +0 -14
- package/dist/integrations/sessions/paths.js.map +0 -1
- package/dist/integrations/sessions/run-discovery.d.ts +0 -24
- package/dist/integrations/sessions/run-discovery.d.ts.map +0 -1
- package/dist/integrations/sessions/run-discovery.js +0 -142
- package/dist/integrations/sessions/run-discovery.js.map +0 -1
- package/dist/integrations/sessions/turn-evidence.d.ts +0 -129
- package/dist/integrations/sessions/turn-evidence.d.ts.map +0 -1
- package/dist/integrations/sessions/turn-evidence.js +0 -517
- package/dist/integrations/sessions/turn-evidence.js.map +0 -1
- package/dist/integrations/subagents/history.d.ts +0 -26
- package/dist/integrations/subagents/history.d.ts.map +0 -1
- package/dist/integrations/subagents/history.js +0 -76
- package/dist/integrations/subagents/history.js.map +0 -1
- package/dist/integrations/subagents/runs.d.ts +0 -72
- package/dist/integrations/subagents/runs.d.ts.map +0 -1
- package/dist/integrations/subagents/runs.js +0 -155
- package/dist/integrations/subagents/runs.js.map +0 -1
- package/dist/tui/run-interruption.d.ts.map +0 -1
- package/dist/tui/run-interruption.js.map +0 -1
- package/dist/tui/run-limits-settings.d.ts +0 -39
- package/dist/tui/run-limits-settings.d.ts.map +0 -1
- package/dist/tui/run-limits-settings.js.map +0 -1
|
@@ -1,19 +1,47 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The rows the provider picker lists:
|
|
3
|
-
*
|
|
2
|
+
* The rows the provider picker lists: one per vendor, each saying what this
|
|
3
|
+
* machine can currently do with it.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* the
|
|
11
|
-
*
|
|
5
|
+
* ## One vendor is one row
|
|
6
|
+
*
|
|
7
|
+
* The screen used to draw a row per provider id, so one vendor could be two
|
|
8
|
+
* rows: the session on the device under the subscription's own label, and below
|
|
9
|
+
* it the same vendor's name asking for the key it did not need. The operator
|
|
10
|
+
* holding the key had to work out which of the two rows was theirs.
|
|
11
|
+
*
|
|
12
|
+
* Rows are grouped by `ProviderRegistryEntry.vendor` — a field on the registry
|
|
13
|
+
* rather than a table here, because which ids are one vendor is a fact about
|
|
14
|
+
* the providers and the picker is only the first surface to need it; see
|
|
15
|
+
* `VENDOR_NAMES` for that field and for which ids are one vendor. A vendor
|
|
16
|
+
* whose ids reach the same service through different credentials is one row,
|
|
17
|
+
* which is the shape one entry in this registry has had all along: a single id
|
|
18
|
+
* taking an API key, a token variable, or a signed-in session. A vendor with
|
|
19
|
+
* two catalogues keeps two rows, because merging those would put a product
|
|
20
|
+
* decision inside a screen about credentials.
|
|
21
|
+
*
|
|
22
|
+
* ## What a row says, and what it holds
|
|
23
|
+
*
|
|
24
|
+
* The second column is what the machine has, not what the ideal setup is: the
|
|
25
|
+
* source of a session discovery found (`Codex session · this device`), or — when
|
|
26
|
+
* nothing was found for that vendor — the variable that would set it up
|
|
27
|
+
* (`needs OPENAI_API_KEY`). The variable is named rather than "not configured"
|
|
28
|
+
* because it is the one action that both makes the provider work now and keeps
|
|
29
|
+
* it working after a restart.
|
|
30
|
+
*
|
|
31
|
+
* Every way in that this build can offer is below in `paths`, in the order the
|
|
32
|
+
* screen offers them: what is already detected, then the API key, then — where
|
|
33
|
+
* nothing works yet — a sign-in the registry declares. A row with ONE way in
|
|
34
|
+
* leads straight to that way's flow, exactly as it did before this file grouped
|
|
35
|
+
* anything — Enter on an unconfigured row opens its paste field, Enter on a
|
|
36
|
+
* detected one opens its models. A row with SEVERAL cannot answer Enter by
|
|
37
|
+
* itself, so the screen asks how the operator means to use it; that is the only
|
|
38
|
+
* place this change added a step to, and it is a count of WAYS rather than of
|
|
39
|
+
* ids — see `rowNeedsChoice` and `vendorPaths`.
|
|
12
40
|
*
|
|
13
41
|
* ## What is added, and what is deliberately not
|
|
14
42
|
*
|
|
15
|
-
* A
|
|
16
|
-
* **takes a credential the operator can type** — the registry's
|
|
43
|
+
* A vendor joins the list only when **this build can construct something in it**
|
|
44
|
+
* and it **takes a credential the operator can type** — the registry's
|
|
17
45
|
* `constructible` and `acceptsTypedCredential` flags, read together and read
|
|
18
46
|
* from the registry rather than listed here. Entering a key for anything else
|
|
19
47
|
* produces a row that leads nowhere, which is worse than an absent row:
|
|
@@ -22,58 +50,189 @@
|
|
|
22
50
|
* region, a session token, or a role the SDK assumes) rather than one
|
|
23
51
|
* string. A single API-key field cannot express it, so the picker does not
|
|
24
52
|
* offer it.
|
|
25
|
-
* - `http` is a generic endpoint whose base URL is half the
|
|
26
|
-
*
|
|
27
|
-
* - `lmstudio` cannot be constructed by this build at all.
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
53
|
+
* - `http` is a generic endpoint whose base URL is half the credential. A key
|
|
54
|
+
* with nowhere to send it is not a setup.
|
|
55
|
+
* - `lmstudio` cannot be constructed by this build at all. Discovery may still
|
|
56
|
+
* find it, and a row for something genuinely on the machine stays on the
|
|
57
|
+
* machine's list — it just refuses, with the reason, when accepted.
|
|
58
|
+
* - `ollama` needs a local server, not a secret. A running server is how
|
|
59
|
+
* discovery finds it, and that is the only way it is listed.
|
|
60
|
+
*
|
|
61
|
+
* The sign-in inside a vendor row is not a second way to set that vendor up
|
|
62
|
+
* beside the first; it is the same path `l` reaches today, offered where the
|
|
63
|
+
* operator is already looking. Nothing here starts a credential flow of its
|
|
64
|
+
* own: a path names a provider the rest of the screen already knows how to
|
|
65
|
+
* handle.
|
|
32
66
|
*
|
|
33
67
|
* `provider-list.test.ts` asserts that exclusion list by NAME, so a registry
|
|
34
68
|
* flag that flips turns the test red instead of silently adding or dropping a
|
|
35
69
|
* row.
|
|
36
70
|
*/
|
|
37
|
-
import { type DetectedProvider, type ProviderId, type ProviderRegistryEntry } from '../integrations/providers/index.js';
|
|
71
|
+
import { type DetectedProvider, type ProviderId, type ProviderRegistryEntry, type VendorId } from '../integrations/providers/index.js';
|
|
38
72
|
/**
|
|
39
|
-
* One
|
|
73
|
+
* One way this build can be set up to use a vendor.
|
|
40
74
|
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
75
|
+
* A union rather than a `ProviderRegistryEntry` with flags, because the three
|
|
76
|
+
* lead to three different places and carry three different things: a detected
|
|
77
|
+
* source leads to a model listing that only exists because a credential was
|
|
78
|
+
* found, a credential leads to the field that takes one, and a sign-in leads to
|
|
79
|
+
* an operation that is not a value at all. A type that flattened them would let
|
|
80
|
+
* a caller ask a path that has no credential what models it has.
|
|
46
81
|
*/
|
|
47
|
-
export type
|
|
82
|
+
export type VendorPath =
|
|
83
|
+
/** Something on this machine already works. */
|
|
84
|
+
{
|
|
48
85
|
readonly kind: 'detected';
|
|
49
86
|
readonly detected: DetectedProvider;
|
|
50
|
-
}
|
|
51
|
-
|
|
87
|
+
}
|
|
88
|
+
/** A provider whose credential the operator can type into the paste field. */
|
|
89
|
+
| {
|
|
90
|
+
readonly kind: 'credential';
|
|
91
|
+
readonly entry: ProviderRegistryEntry;
|
|
92
|
+
}
|
|
93
|
+
/** A Namzu-owned sign-in — the operation `l` starts today. */
|
|
94
|
+
| {
|
|
95
|
+
readonly kind: 'sign-in';
|
|
52
96
|
readonly entry: ProviderRegistryEntry;
|
|
53
97
|
};
|
|
54
|
-
/** The provider a
|
|
55
|
-
export declare function
|
|
98
|
+
/** The provider a path is about, whichever kind of path it is. */
|
|
99
|
+
export declare function pathProviderId(path: VendorPath): ProviderId;
|
|
100
|
+
/**
|
|
101
|
+
* One row of the picker: a vendor, what this machine has for it, and every way
|
|
102
|
+
* in this build can offer.
|
|
103
|
+
*
|
|
104
|
+
* `detected` is kept beside `paths` rather than folded into it because the two
|
|
105
|
+
* answer different questions. `paths` is what the row can DO — and a detected
|
|
106
|
+
* provider this build cannot construct is therefore not a path, since following
|
|
107
|
+
* it only reaches a refusal — while `detected` is what the machine HAS, which
|
|
108
|
+
* is what the row's second column reports and what the refusal names. A row
|
|
109
|
+
* that dropped the second would hide a discovery that genuinely happened.
|
|
110
|
+
*/
|
|
111
|
+
export interface VendorRow {
|
|
112
|
+
readonly vendor: VendorId;
|
|
113
|
+
/** What the row is called, from the registry's one name for that vendor. */
|
|
114
|
+
readonly label: string;
|
|
115
|
+
/** What this machine has for the vendor, in discovery order. */
|
|
116
|
+
readonly detected: readonly DetectedProvider[];
|
|
117
|
+
/** The ways in, in the order the screen offers them. */
|
|
118
|
+
readonly paths: readonly VendorPath[];
|
|
119
|
+
}
|
|
56
120
|
/**
|
|
57
121
|
* Providers this screen can set up by taking a credential from the operator.
|
|
58
122
|
*
|
|
59
|
-
* Derived from the registry, in registry order.
|
|
123
|
+
* Derived from the registry, in registry order. Five of the twelve entries have
|
|
60
124
|
* a driver in this repository and are not listed here, for the reasons in the
|
|
61
|
-
* module comment.
|
|
125
|
+
* module comment. `codex` is not among them either, and for a different reason:
|
|
126
|
+
* it takes no typed credential at all, and it is offered instead as the
|
|
127
|
+
* sign-in path of the vendor row it shares with the key entry beside it.
|
|
62
128
|
*/
|
|
63
129
|
export declare function settableProviders(): readonly ProviderRegistryEntry[];
|
|
130
|
+
/**
|
|
131
|
+
* Every way one vendor can be used, in the order the screen offers them:
|
|
132
|
+
* what is already detected, then the API key, then — where nothing works yet —
|
|
133
|
+
* a sign-in the registry declares.
|
|
134
|
+
*
|
|
135
|
+
* `entries` is passed rather than looked up so this can be read by a test
|
|
136
|
+
* against a vendor no registry holds — the shape of the answer is a fact about
|
|
137
|
+
* the flags, and the alternative is a rule only checkable by editing the
|
|
138
|
+
* registry.
|
|
139
|
+
*
|
|
140
|
+
* ## What counts as a second way in
|
|
141
|
+
*
|
|
142
|
+
* Not a second id — a second WAY. One entry can take an API key AND be found as
|
|
143
|
+
* a signed-in session, and a machine in that state has two genuinely different
|
|
144
|
+
* ways to use it: keep using the session discovery found, or enter a key of
|
|
145
|
+
* one's own. The same is true of a vendor whose free catalogue works without a
|
|
146
|
+
* credential. So the key path is offered beside what was found whenever what was
|
|
147
|
+
* found is not itself a key — a signed-in session is a different way in, and a
|
|
148
|
+
* key that discovery already hands over is the same way twice.
|
|
149
|
+
*
|
|
150
|
+
* "Is what was found a key?" is asked with the predicate the sign-in screen
|
|
151
|
+
* already decides it by (`signedInSubscriptionProviders`), rather than a second
|
|
152
|
+
* opinion written here: an OAuth token in an environment variable is a session
|
|
153
|
+
* on that screen and must be one here too, or the two screens would disagree
|
|
154
|
+
* about the same machine.
|
|
155
|
+
*
|
|
156
|
+
* ## Why a sign-in is offered only where nothing works yet
|
|
157
|
+
*
|
|
158
|
+
* A sign-in is how a vendor with nothing becomes usable. A vendor that is
|
|
159
|
+
* already usable has no such gap, and the operator who wants a SECOND way in —
|
|
160
|
+
* a Namzu-owned session beside the key they exported — is asking for something
|
|
161
|
+
* else: `l` starts one from any screen, and the footer says so. Offering it
|
|
162
|
+
* here as well would put a question in front of every operator whose key works
|
|
163
|
+
* and stop them answering it, once per launch, to serve a case that has another
|
|
164
|
+
* door. The vendor with a signed-in session and no key still shows both, which
|
|
165
|
+
* is the case this row was reported for.
|
|
166
|
+
*
|
|
167
|
+
* `includeUnconfigured` is false on the signed-in-subscription screen, which
|
|
168
|
+
* offers only sessions that are already usable; an API key path there would
|
|
169
|
+
* contradict that screen's one sentence.
|
|
170
|
+
*/
|
|
171
|
+
export declare function vendorPaths(entries: readonly ProviderRegistryEntry[], detected: readonly DetectedProvider[], includeUnconfigured: boolean): readonly VendorPath[];
|
|
64
172
|
/**
|
|
65
173
|
* The full list, detected first and in the order discovery produced.
|
|
66
174
|
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
175
|
+
* A vendor takes the position of the first provider detected for it, so the
|
|
176
|
+
* detected block keeps discovery's order and one vendor never appears in it
|
|
177
|
+
* twice. The block below keeps registry order — the order of the entries that
|
|
178
|
+
* can be set up, which is the order the screen drew those rows in before
|
|
179
|
+
* anything was grouped.
|
|
71
180
|
*
|
|
72
181
|
* `includeUnconfigured` is false on the signed-in-subscription screen, which
|
|
73
|
-
* offers only sessions that are already usable
|
|
74
|
-
|
|
182
|
+
* offers only sessions that are already usable.
|
|
183
|
+
*/
|
|
184
|
+
export declare function providerListRows(detected: readonly DetectedProvider[], includeUnconfigured?: boolean): readonly VendorRow[];
|
|
185
|
+
/**
|
|
186
|
+
* Whether anything on this row can be used at all.
|
|
187
|
+
*
|
|
188
|
+
* False means the row is a discovery this build cannot construct — the one case
|
|
189
|
+
* where the screen may list something it must then refuse, rather than a row
|
|
190
|
+
* that needs a credential first.
|
|
191
|
+
*/
|
|
192
|
+
export declare function rowIsUsable(row: VendorRow): boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Whether entering the row has to ask how the operator means to use it.
|
|
195
|
+
*
|
|
196
|
+
* True exactly when the row has more than one way in — by the ways that exist,
|
|
197
|
+
* and not by how many registry ids they come from. One id can have two ways (a
|
|
198
|
+
* signed-in session beside an API key) and two ids can share one way, so
|
|
199
|
+
* counting ids answered the wrong question in both directions: it asked nothing
|
|
200
|
+
* about a vendor that had a session AND a key to choose between, and it would
|
|
201
|
+
* have asked twice about two ids that were one and the same key.
|
|
202
|
+
*
|
|
203
|
+
* A row with ONE way is not asked. That is the common case and the one the
|
|
204
|
+
* owner's rule protects: nothing stands between the operator and their model
|
|
205
|
+
* list when there is nothing to choose, and Enter goes on meaning what it has
|
|
206
|
+
* always meant — the detected session's models, or the field that takes the
|
|
207
|
+
* credential this row is missing.
|
|
208
|
+
*/
|
|
209
|
+
export declare function rowNeedsChoice(row: VendorRow): boolean;
|
|
210
|
+
/**
|
|
211
|
+
* The entry a typed credential would be taken for on this row, if there is one.
|
|
212
|
+
*
|
|
213
|
+
* Asked of the whole vendor and not of the row's paths, deliberately: `k` takes
|
|
214
|
+
* a credential for the provider under the cursor so it can be used for THIS
|
|
215
|
+
* session, which is meaningful even when that provider is already detected and
|
|
216
|
+
* therefore has no credential path — a detected vendor is not one whose key the
|
|
217
|
+
* operator may not replace for the next hour.
|
|
218
|
+
*
|
|
219
|
+
* `acceptsTypedCredential` alone, and not `constructible` beside it, because
|
|
220
|
+
* this is the question `k` has always asked of the highlighted row. A detected
|
|
221
|
+
* provider this build cannot construct still takes a typed credential, and
|
|
222
|
+
* answering "it does not" would be false about the provider to make a point
|
|
223
|
+
* about the build — which is the refusal the row itself gives when it is
|
|
224
|
+
* accepted, in the words `unsupportedProviderMessage` writes.
|
|
225
|
+
*/
|
|
226
|
+
export declare function typedCredentialEntry(row: VendorRow | undefined): ProviderRegistryEntry | undefined;
|
|
227
|
+
/**
|
|
228
|
+
* What a row with nothing detected is missing, named as the thing to act on.
|
|
229
|
+
*
|
|
230
|
+
* Null for a vendor whose members take no typed credential — a local server, or
|
|
231
|
+
* a vendor this build cannot construct — because those rows have a source
|
|
232
|
+
* column that says something else and a sentence here would name a variable
|
|
233
|
+
* nobody can use.
|
|
75
234
|
*/
|
|
76
|
-
export declare function
|
|
235
|
+
export declare function rowCredentialNeed(row: VendorRow): string | null;
|
|
77
236
|
/**
|
|
78
237
|
* What an unconfigured row is missing, named as the thing to act on.
|
|
79
238
|
*
|
|
@@ -89,6 +248,10 @@ export declare function providerListRows(detected: readonly DetectedProvider[],
|
|
|
89
248
|
* future entry without one prints a sentence rather than "needs undefined".
|
|
90
249
|
*/
|
|
91
250
|
export declare function credentialNeed(entry: ProviderRegistryEntry): string;
|
|
251
|
+
/** Whether a row is about a given provider id — detected there, or a way in. */
|
|
252
|
+
export declare function rowHasProvider(row: VendorRow, id: string): boolean;
|
|
253
|
+
/** The index of the row holding a provider, or -1 when no row does. */
|
|
254
|
+
export declare function rowIndexOfProvider(rows: readonly VendorRow[], id: string | null | undefined): number;
|
|
92
255
|
/**
|
|
93
256
|
* Where the cursor starts.
|
|
94
257
|
*
|
|
@@ -100,7 +263,9 @@ export declare function credentialNeed(entry: ProviderRegistryEntry): string;
|
|
|
100
263
|
* `detected`, so it used to fall through to row 1: the picker opened saying
|
|
101
264
|
* "no credential found" for the saved provider with the cursor elsewhere. Now the
|
|
102
265
|
* highlighted row IS the row that needs the key, which is also the row `k`
|
|
103
|
-
* targets.
|
|
266
|
+
* targets. Both lookups ask the row, not the vendor: a saved `codex` and a
|
|
267
|
+
* saved subscription id and a saved key id are the same row, and either one
|
|
268
|
+
* lands the cursor on it.
|
|
104
269
|
*/
|
|
105
|
-
export declare function initialProviderRow(rows: readonly
|
|
270
|
+
export declare function initialProviderRow(rows: readonly VendorRow[], currentProvider: string | null | undefined, keyEntryFor: ProviderId | null | undefined): number;
|
|
106
271
|
//# sourceMappingURL=provider-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-list.d.ts","sourceRoot":"","sources":["../../src/tui/provider-list.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"provider-list.d.ts","sourceRoot":"","sources":["../../src/tui/provider-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AAEH,OAAO,EAEN,KAAK,gBAAgB,EAErB,KAAK,UAAU,EACf,KAAK,qBAAqB,EAE1B,KAAK,QAAQ,EAGb,MAAM,oCAAoC,CAAA;AAE3C;;;;;;;;;GASG;AACH,MAAM,MAAM,UAAU;AACrB,+CAA+C;AAC7C;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAA;CAAE;AACpE,8EAA8E;GAC5E;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,qBAAqB,CAAA;CAAE;AACxE,8DAA8D;GAC5D;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,qBAAqB,CAAA;CAAE,CAAA;AAEtE,kEAAkE;AAClE,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,CAE3D;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,SAAS;IACzB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAA;IACzB,4EAA4E;IAC5E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,gEAAgE;IAChE,QAAQ,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,CAAA;IAC9C,wDAAwD;IACxD,QAAQ,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,CAAA;CACrC;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,IAAI,SAAS,qBAAqB,EAAE,CAIpE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,WAAW,CAC1B,OAAO,EAAE,SAAS,qBAAqB,EAAE,EACzC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EACrC,mBAAmB,EAAE,OAAO,GAC1B,SAAS,UAAU,EAAE,CA4BvB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC/B,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EACrC,mBAAmB,UAAO,GACxB,SAAS,SAAS,EAAE,CA6BtB;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAEnD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAEtD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CACnC,GAAG,EAAE,SAAS,GAAG,SAAS,GACxB,qBAAqB,GAAG,SAAS,CAGnC;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAG/D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,qBAAqB,GAAG,MAAM,CAInE;AAED,gFAAgF;AAChF,wBAAgB,cAAc,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAKlE;AAED,uEAAuE;AACvE,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,SAAS,SAAS,EAAE,EAC1B,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC3B,MAAM,CAGR;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,SAAS,SAAS,EAAE,EAC1B,eAAe,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC1C,WAAW,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,GACxC,MAAM,CAMR"}
|