dispach 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +596 -0
- package/dist/App-dxqm39zx.js +11 -0
- package/dist/App-dxqm39zx.js.map +25 -0
- package/dist/ConfigEditor-7v5nebvy.js +6 -0
- package/dist/ConfigEditor-7v5nebvy.js.map +11 -0
- package/dist/KeyProbe-vjhmdpx6.js +5 -0
- package/dist/KeyProbe-vjhmdpx6.js.map +11 -0
- package/dist/Picker-jxaesaxy.js +5 -0
- package/dist/Picker-jxaesaxy.js.map +10 -0
- package/dist/SessionPicker-z2t0p4b5.js +5 -0
- package/dist/SessionPicker-z2t0p4b5.js.map +11 -0
- package/dist/SkillBrowser-yyf2gy0q.js +5 -0
- package/dist/SkillBrowser-yyf2gy0q.js.map +11 -0
- package/dist/WizardApp-12ndxgqv.js +5 -0
- package/dist/WizardApp-12ndxgqv.js.map +13 -0
- package/dist/agents.d.ts +9 -0
- package/dist/agents.d.ts.map +1 -0
- package/dist/browse.d.ts +63 -0
- package/dist/browse.d.ts.map +1 -0
- package/dist/client.d.ts +25 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +34 -0
- package/dist/client.js.map +11 -0
- package/dist/components/App.d.ts +28 -0
- package/dist/components/App.d.ts.map +1 -0
- package/dist/components/Banner.d.ts +16 -0
- package/dist/components/Banner.d.ts.map +1 -0
- package/dist/components/Brandmark.d.ts +31 -0
- package/dist/components/Brandmark.d.ts.map +1 -0
- package/dist/components/CheckList.d.ts +38 -0
- package/dist/components/CheckList.d.ts.map +1 -0
- package/dist/components/CommandOutput.d.ts +29 -0
- package/dist/components/CommandOutput.d.ts.map +1 -0
- package/dist/components/ConfigEditor.d.ts +64 -0
- package/dist/components/ConfigEditor.d.ts.map +1 -0
- package/dist/components/HistorySearch.d.ts +23 -0
- package/dist/components/HistorySearch.d.ts.map +1 -0
- package/dist/components/KeyProbe.d.ts +36 -0
- package/dist/components/KeyProbe.d.ts.map +1 -0
- package/dist/components/LineCursor.d.ts +55 -0
- package/dist/components/LineCursor.d.ts.map +1 -0
- package/dist/components/Live.d.ts +17 -0
- package/dist/components/Live.d.ts.map +1 -0
- package/dist/components/Palette.d.ts +21 -0
- package/dist/components/Palette.d.ts.map +1 -0
- package/dist/components/Picker.d.ts +23 -0
- package/dist/components/Picker.d.ts.map +1 -0
- package/dist/components/Prompt.d.ts +20 -0
- package/dist/components/Prompt.d.ts.map +1 -0
- package/dist/components/Screen.d.ts +39 -0
- package/dist/components/Screen.d.ts.map +1 -0
- package/dist/components/SelectList.d.ts +34 -0
- package/dist/components/SelectList.d.ts.map +1 -0
- package/dist/components/SessionPicker.d.ts +26 -0
- package/dist/components/SessionPicker.d.ts.map +1 -0
- package/dist/components/SkillBrowser.d.ts +39 -0
- package/dist/components/SkillBrowser.d.ts.map +1 -0
- package/dist/components/Spinner.d.ts +13 -0
- package/dist/components/Spinner.d.ts.map +1 -0
- package/dist/components/StatusBar.d.ts +11 -0
- package/dist/components/StatusBar.d.ts.map +1 -0
- package/dist/components/SummaryCard.d.ts +11 -0
- package/dist/components/SummaryCard.d.ts.map +1 -0
- package/dist/components/TextField.d.ts +39 -0
- package/dist/components/TextField.d.ts.map +1 -0
- package/dist/components/Transcript.d.ts +23 -0
- package/dist/components/Transcript.d.ts.map +1 -0
- package/dist/components/WizardApp.d.ts +18 -0
- package/dist/components/WizardApp.d.ts.map +1 -0
- package/dist/components/WizardFrame.d.ts +19 -0
- package/dist/components/WizardFrame.d.ts.map +1 -0
- package/dist/config-yz0nz51b.js +24 -0
- package/dist/config-yz0nz51b.js.map +10 -0
- package/dist/config.d.ts +71 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/credential-wgt4gvcz.js +19 -0
- package/dist/credential-wgt4gvcz.js.map +10 -0
- package/dist/credential.d.ts +68 -0
- package/dist/credential.d.ts.map +1 -0
- package/dist/daemon.d.ts +47 -0
- package/dist/daemon.d.ts.map +1 -0
- package/dist/editor.d.ts +81 -0
- package/dist/editor.d.ts.map +1 -0
- package/dist/hooks/useElapsed.d.ts +10 -0
- package/dist/hooks/useElapsed.d.ts.map +1 -0
- package/dist/hooks/useTerminalSize.d.ts +14 -0
- package/dist/hooks/useTerminalSize.d.ts.map +1 -0
- package/dist/hooks/useTurn.d.ts +41 -0
- package/dist/hooks/useTurn.d.ts.map +1 -0
- package/dist/index-2cvtz0fy.js +903 -0
- package/dist/index-2cvtz0fy.js.map +194 -0
- package/dist/index-3nwfz9jq.js +12 -0
- package/dist/index-3nwfz9jq.js.map +11 -0
- package/dist/index-6b7qvh1x.js +6 -0
- package/dist/index-6b7qvh1x.js.map +10 -0
- package/dist/index-6z0yr17z.js +12 -0
- package/dist/index-6z0yr17z.js.map +11 -0
- package/dist/index-7da4fqcr.js +7 -0
- package/dist/index-7da4fqcr.js.map +11 -0
- package/dist/index-8bmhd2hj.js +6 -0
- package/dist/index-8bmhd2hj.js.map +10 -0
- package/dist/index-9d011p3q.js +6 -0
- package/dist/index-9d011p3q.js.map +10 -0
- package/dist/index-9f9pp2ef.js +6 -0
- package/dist/index-9f9pp2ef.js.map +10 -0
- package/dist/index-9nsfs0vy.js +6 -0
- package/dist/index-9nsfs0vy.js.map +10 -0
- package/dist/index-9pj1ws0p.js +77 -0
- package/dist/index-9pj1ws0p.js.map +12 -0
- package/dist/index-b5wwtxzk.js +66 -0
- package/dist/index-b5wwtxzk.js.map +12 -0
- package/dist/index-b8zwg8a3.js +6 -0
- package/dist/index-b8zwg8a3.js.map +10 -0
- package/dist/index-bry9bzt3.js +427 -0
- package/dist/index-bry9bzt3.js.map +11 -0
- package/dist/index-bwckzbf8.js +6 -0
- package/dist/index-bwckzbf8.js.map +10 -0
- package/dist/index-cx3vz7sf.js +6 -0
- package/dist/index-cx3vz7sf.js.map +11 -0
- package/dist/index-e8n70sgj.js +6 -0
- package/dist/index-e8n70sgj.js.map +11 -0
- package/dist/index-fvhg0xyd.js +167 -0
- package/dist/index-fvhg0xyd.js.map +19 -0
- package/dist/index-gbnc99j8.js +14 -0
- package/dist/index-gbnc99j8.js.map +13 -0
- package/dist/index-h2yds678.js +7 -0
- package/dist/index-h2yds678.js.map +11 -0
- package/dist/index-j97vttdt.js +10 -0
- package/dist/index-j97vttdt.js.map +10 -0
- package/dist/index-jk0def33.js +6 -0
- package/dist/index-jk0def33.js.map +12 -0
- package/dist/index-jym27m75.js +6 -0
- package/dist/index-jym27m75.js.map +10 -0
- package/dist/index-mgdgx22q.js +10 -0
- package/dist/index-mgdgx22q.js.map +10 -0
- package/dist/index-mrtb5y08.js +6 -0
- package/dist/index-mrtb5y08.js.map +11 -0
- package/dist/index-my5cjx00.js +6 -0
- package/dist/index-my5cjx00.js.map +10 -0
- package/dist/index-qc2vrq9z.js +7 -0
- package/dist/index-qc2vrq9z.js.map +11 -0
- package/dist/index-rqbtm761.js +6 -0
- package/dist/index-rqbtm761.js.map +10 -0
- package/dist/index-rqzg861g.js +6 -0
- package/dist/index-rqzg861g.js.map +10 -0
- package/dist/index-t1xvacym.js +6 -0
- package/dist/index-t1xvacym.js.map +11 -0
- package/dist/index-xgqzk5cq.js +9 -0
- package/dist/index-xgqzk5cq.js.map +12 -0
- package/dist/index-xqyms08r.js +6 -0
- package/dist/index-xqyms08r.js.map +10 -0
- package/dist/index-yr25dnf5.js +6 -0
- package/dist/index-yr25dnf5.js.map +10 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +527 -0
- package/dist/index.js.map +48 -0
- package/dist/init.d.ts +34 -0
- package/dist/init.d.ts.map +1 -0
- package/dist/keymap.d.ts +126 -0
- package/dist/keymap.d.ts.map +1 -0
- package/dist/keys.d.ts +17 -0
- package/dist/keys.d.ts.map +1 -0
- package/dist/lib/ambient.d.ts +69 -0
- package/dist/lib/ambient.d.ts.map +1 -0
- package/dist/lib/args.d.ts +33 -0
- package/dist/lib/args.d.ts.map +1 -0
- package/dist/lib/bootstrap.d.ts +84 -0
- package/dist/lib/bootstrap.d.ts.map +1 -0
- package/dist/lib/browse.d.ts +89 -0
- package/dist/lib/browse.d.ts.map +1 -0
- package/dist/lib/browser.d.ts +55 -0
- package/dist/lib/browser.d.ts.map +1 -0
- package/dist/lib/chat-frame.d.ts +156 -0
- package/dist/lib/chat-frame.d.ts.map +1 -0
- package/dist/lib/clipboard.d.ts +32 -0
- package/dist/lib/clipboard.d.ts.map +1 -0
- package/dist/lib/commands.d.ts +26 -0
- package/dist/lib/commands.d.ts.map +1 -0
- package/dist/lib/composer.d.ts +85 -0
- package/dist/lib/composer.d.ts.map +1 -0
- package/dist/lib/config-apply.d.ts +51 -0
- package/dist/lib/config-apply.d.ts.map +1 -0
- package/dist/lib/config-editor.d.ts +113 -0
- package/dist/lib/config-editor.d.ts.map +1 -0
- package/dist/lib/config-env.d.ts +110 -0
- package/dist/lib/config-env.d.ts.map +1 -0
- package/dist/lib/config-rows.d.ts +37 -0
- package/dist/lib/config-rows.d.ts.map +1 -0
- package/dist/lib/config-view.d.ts +133 -0
- package/dist/lib/config-view.d.ts.map +1 -0
- package/dist/lib/confirm.d.ts +86 -0
- package/dist/lib/confirm.d.ts.map +1 -0
- package/dist/lib/const.d.ts +213 -0
- package/dist/lib/const.d.ts.map +1 -0
- package/dist/lib/csi.d.ts +70 -0
- package/dist/lib/csi.d.ts.map +1 -0
- package/dist/lib/curated.d.ts +44 -0
- package/dist/lib/curated.d.ts.map +1 -0
- package/dist/lib/daemon-plan.d.ts +151 -0
- package/dist/lib/daemon-plan.d.ts.map +1 -0
- package/dist/lib/dotenv-edit.d.ts +30 -0
- package/dist/lib/dotenv-edit.d.ts.map +1 -0
- package/dist/lib/env.d.ts +10 -0
- package/dist/lib/env.d.ts.map +1 -0
- package/dist/lib/exit.d.ts +170 -0
- package/dist/lib/exit.d.ts.map +1 -0
- package/dist/lib/help.d.ts +10 -0
- package/dist/lib/help.d.ts.map +1 -0
- package/dist/lib/init-flow.d.ts +539 -0
- package/dist/lib/init-flow.d.ts.map +1 -0
- package/dist/lib/init-skills.d.ts +46 -0
- package/dist/lib/init-skills.d.ts.map +1 -0
- package/dist/lib/keyboard.d.ts +76 -0
- package/dist/lib/keyboard.d.ts.map +1 -0
- package/dist/lib/keys-view.d.ts +57 -0
- package/dist/lib/keys-view.d.ts.map +1 -0
- package/dist/lib/launchd.d.ts +151 -0
- package/dist/lib/launchd.d.ts.map +1 -0
- package/dist/lib/lifecycle.d.ts +126 -0
- package/dist/lib/lifecycle.d.ts.map +1 -0
- package/dist/lib/log-follow.d.ts +71 -0
- package/dist/lib/log-follow.d.ts.map +1 -0
- package/dist/lib/mouse.d.ts +84 -0
- package/dist/lib/mouse.d.ts.map +1 -0
- package/dist/lib/multiselect.d.ts +37 -0
- package/dist/lib/multiselect.d.ts.map +1 -0
- package/dist/lib/origins.d.ts +40 -0
- package/dist/lib/origins.d.ts.map +1 -0
- package/dist/lib/output.d.ts +29 -0
- package/dist/lib/output.d.ts.map +1 -0
- package/dist/lib/palette.d.ts +69 -0
- package/dist/lib/palette.d.ts.map +1 -0
- package/dist/lib/probe.d.ts +158 -0
- package/dist/lib/probe.d.ts.map +1 -0
- package/dist/lib/providers.d.ts +63 -0
- package/dist/lib/providers.d.ts.map +1 -0
- package/dist/lib/provision.d.ts +163 -0
- package/dist/lib/provision.d.ts.map +1 -0
- package/dist/lib/remove-plan.d.ts +120 -0
- package/dist/lib/remove-plan.d.ts.map +1 -0
- package/dist/lib/render.d.ts +78 -0
- package/dist/lib/render.d.ts.map +1 -0
- package/dist/lib/resume.d.ts +69 -0
- package/dist/lib/resume.d.ts.map +1 -0
- package/dist/lib/rows.d.ts +69 -0
- package/dist/lib/rows.d.ts.map +1 -0
- package/dist/lib/sandbox.d.ts +101 -0
- package/dist/lib/sandbox.d.ts.map +1 -0
- package/dist/lib/schema.d.ts +491 -0
- package/dist/lib/schema.d.ts.map +1 -0
- package/dist/lib/screen.d.ts +102 -0
- package/dist/lib/screen.d.ts.map +1 -0
- package/dist/lib/scroll.d.ts +64 -0
- package/dist/lib/scroll.d.ts.map +1 -0
- package/dist/lib/select.d.ts +23 -0
- package/dist/lib/select.d.ts.map +1 -0
- package/dist/lib/service-env.d.ts +38 -0
- package/dist/lib/service-env.d.ts.map +1 -0
- package/dist/lib/service.d.ts +102 -0
- package/dist/lib/service.d.ts.map +1 -0
- package/dist/lib/session-commands.d.ts +229 -0
- package/dist/lib/session-commands.d.ts.map +1 -0
- package/dist/lib/session-key.d.ts +55 -0
- package/dist/lib/session-key.d.ts.map +1 -0
- package/dist/lib/sessions-view.d.ts +31 -0
- package/dist/lib/sessions-view.d.ts.map +1 -0
- package/dist/lib/source-cache.d.ts +105 -0
- package/dist/lib/source-cache.d.ts.map +1 -0
- package/dist/lib/source.d.ts +281 -0
- package/dist/lib/source.d.ts.map +1 -0
- package/dist/lib/sources.d.ts +107 -0
- package/dist/lib/sources.d.ts.map +1 -0
- package/dist/lib/spawn.d.ts +56 -0
- package/dist/lib/spawn.d.ts.map +1 -0
- package/dist/lib/stdin-tap.d.ts +41 -0
- package/dist/lib/stdin-tap.d.ts.map +1 -0
- package/dist/lib/subcommand.d.ts +57 -0
- package/dist/lib/subcommand.d.ts.map +1 -0
- package/dist/lib/systemd.d.ts +60 -0
- package/dist/lib/systemd.d.ts.map +1 -0
- package/dist/lib/templates.d.ts +35 -0
- package/dist/lib/templates.d.ts.map +1 -0
- package/dist/lib/terminal.d.ts +98 -0
- package/dist/lib/terminal.d.ts.map +1 -0
- package/dist/lib/text-selection.d.ts +75 -0
- package/dist/lib/text-selection.d.ts.map +1 -0
- package/dist/lib/theme.d.ts +90 -0
- package/dist/lib/theme.d.ts.map +1 -0
- package/dist/lib/types.d.ts +467 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/warnings.d.ts +79 -0
- package/dist/lib/warnings.d.ts.map +1 -0
- package/dist/lib/width.d.ts +39 -0
- package/dist/lib/width.d.ts.map +1 -0
- package/dist/lib/wizard.d.ts +95 -0
- package/dist/lib/wizard.d.ts.map +1 -0
- package/dist/lib/wordmark.d.ts +60 -0
- package/dist/lib/wordmark.d.ts.map +1 -0
- package/dist/lib/wrap.d.ts +74 -0
- package/dist/lib/wrap.d.ts.map +1 -0
- package/dist/memory.d.ts +25 -0
- package/dist/memory.d.ts.map +1 -0
- package/dist/model.d.ts +47 -0
- package/dist/model.d.ts.map +1 -0
- package/dist/plugins.d.ts +15 -0
- package/dist/plugins.d.ts.map +1 -0
- package/dist/remove.d.ts +52 -0
- package/dist/remove.d.ts.map +1 -0
- package/dist/run.d.ts +42 -0
- package/dist/run.d.ts.map +1 -0
- package/dist/schedules.d.ts +41 -0
- package/dist/schedules.d.ts.map +1 -0
- package/dist/serve.d.ts +41 -0
- package/dist/serve.d.ts.map +1 -0
- package/dist/sessions.d.ts +13 -0
- package/dist/sessions.d.ts.map +1 -0
- package/dist/skills.d.ts +80 -0
- package/dist/skills.d.ts.map +1 -0
- package/dist/soul.d.ts +19 -0
- package/dist/soul.d.ts.map +1 -0
- package/dist/sources.d.ts +32 -0
- package/dist/sources.d.ts.map +1 -0
- package/dist/start.d.ts +26 -0
- package/dist/start.d.ts.map +1 -0
- package/dist/stop.d.ts +58 -0
- package/dist/stop.d.ts.map +1 -0
- package/dist/terminal-setup.d.ts +31 -0
- package/dist/terminal-setup.d.ts.map +1 -0
- package/dist/tools.d.ts +22 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/transcript.d.ts +124 -0
- package/dist/transcript.d.ts.map +1 -0
- package/dist/validate.d.ts +36 -0
- package/dist/validate.d.ts.map +1 -0
- package/dist/web-w7r68df1.js +14 -0
- package/dist/web-w7r68df1.js.map +11 -0
- package/dist/web.d.ts +36 -0
- package/dist/web.d.ts.map +1 -0
- package/dist/wire.d.ts +10 -0
- package/dist/wire.d.ts.map +1 -0
- package/dist/wire.js +33 -0
- package/dist/wire.js.map +10 -0
- package/dist/workspace.d.ts +19 -0
- package/dist/workspace.d.ts.map +1 -0
- package/package.json +78 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the config editor shows, and what one confirmed row does. Reads files; no Ink.
|
|
3
|
+
*
|
|
4
|
+
* Its own module because **both hosts import it statically** — `config.ts` for the standalone editor and
|
|
5
|
+
* `App.tsx` for the pane — while `index.ts` imports `config.ts` *dynamically* to keep Ink off the
|
|
6
|
+
* startup path. A module reached both ways makes `bun build --splitting` emit its exports twice and the
|
|
7
|
+
* binary refuses to parse, and `bun test` sails straight through it because tests import source. So the
|
|
8
|
+
* shared half lives where nothing has to be lazy about it.
|
|
9
|
+
*/
|
|
10
|
+
import type { EditorRow } from "#lib/config-editor";
|
|
11
|
+
import { type SettingValue } from "#lib/config-view";
|
|
12
|
+
/**
|
|
13
|
+
* Every setting with whatever the file currently holds.
|
|
14
|
+
*
|
|
15
|
+
* Two rows do not have a readable dotted path — `allowFrom` lives inside a list entry and `writeRoots`
|
|
16
|
+
* inside a provider — so they are gathered by walking the block instead. Shown rather than omitted: a
|
|
17
|
+
* field missing from a listing reads as "no such concept", which is the same reasoning that puts a
|
|
18
|
+
* `none` row in slot 2 instead of leaving the line out.
|
|
19
|
+
*/
|
|
20
|
+
export declare function currentValues(manifestPath: string): readonly SettingValue[];
|
|
21
|
+
/**
|
|
22
|
+
* The rows the editor shows, read fresh from the manifest and its `.env`.
|
|
23
|
+
*
|
|
24
|
+
* Exported because both hosts build them: this command mounts the editor standalone, and the chat opens
|
|
25
|
+
* it as a pane. Two builders would drift on the first row either one grew.
|
|
26
|
+
*/
|
|
27
|
+
export declare function editorRowsFor(manifestPath: string): readonly EditorRow[];
|
|
28
|
+
/**
|
|
29
|
+
* Perform one row's edit. The editor's only asynchronous part, and the plain commands' path too.
|
|
30
|
+
*
|
|
31
|
+
* A blank buffer means different things per row and each is the useful reading: no handles is "allow
|
|
32
|
+
* nobody", which is a real thing to want; an empty *setting* would be a value nobody typed on purpose;
|
|
33
|
+
* and an empty secret is refused by `applySecret`, because a variable set to nothing fails the load
|
|
34
|
+
* exactly as a missing one does.
|
|
35
|
+
*/
|
|
36
|
+
export declare function applyEditorRow(manifestPath: string, row: EditorRow, raw: string): Promise<string>;
|
|
37
|
+
//# sourceMappingURL=config-rows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-rows.d.ts","sourceRoot":"","sources":["../../src/lib/config-rows.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAEnD,OAAO,EAAwB,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE1E;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,YAAY,EAAE,CA8B3E;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,SAAS,EAAE,CAuBxE;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAChC,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,SAAS,EACd,GAAG,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC,CAsBjB"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What `config` prints, and what a person has to confirm. Pure, so both are asserted as strings.
|
|
3
|
+
*
|
|
4
|
+
* The policy lives here rather than in the command for the same reason `remove-plan.ts` does: this
|
|
5
|
+
* surface can disable the write gate and open a bind address to the network, and "which edits need a
|
|
6
|
+
* confirmation" is exactly the thing that must be checkable without performing one.
|
|
7
|
+
*
|
|
8
|
+
* ## Why the person's policy is not the agent's
|
|
9
|
+
*
|
|
10
|
+
* Decision 11.29: *enabling a capability answers "what may I do"; a write root, an allowlist and a
|
|
11
|
+
* bind address answer "who and where", and those are the person's by definition.* The agent's floor
|
|
12
|
+
* exists because an agent that could widen its own inbound gate could be **talked into** widening it
|
|
13
|
+
* by the very message it is reading — `config_set` sits in `policy.allow` on a real manifest, so the
|
|
14
|
+
* write gate would not stop that. A person typing at a terminal is not that threat, and refusing them
|
|
15
|
+
* is what left the fields reserved for them with the worst ergonomics in the system.
|
|
16
|
+
*
|
|
17
|
+
* So nothing here is floored. Two edits are confirmed, both from decision 4.50, and only those two:
|
|
18
|
+
* a confirmation that fires on `limits.maxSteps` is one nobody reads by the time it fires on the
|
|
19
|
+
* write gate.
|
|
20
|
+
*/
|
|
21
|
+
import { type Setting } from "@dispach/core";
|
|
22
|
+
import type { EditorRow } from "#lib/config-editor";
|
|
23
|
+
/** A setting with whatever the manifest currently has in it. */
|
|
24
|
+
export interface SettingValue {
|
|
25
|
+
readonly setting: Setting;
|
|
26
|
+
/** Plain JS, or `undefined` when the field is absent from the file. */
|
|
27
|
+
readonly value: unknown;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* How a value appears in a listing.
|
|
31
|
+
*
|
|
32
|
+
* Lists and maps as JSON rather than flattened YAML, which is the lesson from `config_read`: collapsing
|
|
33
|
+
* a block's newlines rendered `[type: telegram id: tg tokenEnv: …]`, one run-on string where the reader
|
|
34
|
+
* needed fields. A sequence of maps went through `String(entry)` and wrote `[object Object]` — the same
|
|
35
|
+
* defect, three times, in three renderers.
|
|
36
|
+
*/
|
|
37
|
+
export declare function showValue(value: unknown): string;
|
|
38
|
+
/**
|
|
39
|
+
* The whole catalogue, grouped by the block it lives in, each row carrying who owns it.
|
|
40
|
+
*
|
|
41
|
+
* Grouped by manifest block rather than by owner, because the question a reader arrives with is "what
|
|
42
|
+
* can I change about tools" far more often than "what is mine versus the agent's" — and the ownership
|
|
43
|
+
* still shows on every row that is not the default.
|
|
44
|
+
*/
|
|
45
|
+
export declare function renderSettings(rows: readonly SettingValue[], file: string): string;
|
|
46
|
+
/** One field, for `config get`. */
|
|
47
|
+
export declare function renderOne(setting: Setting, value: unknown): string;
|
|
48
|
+
/**
|
|
49
|
+
* What a confirmation says before a guard-weakening edit, or `undefined` when none is needed.
|
|
50
|
+
*
|
|
51
|
+
* The value matters, not only the path: `onMutate: confirm` tightens the gate and `allow` removes it,
|
|
52
|
+
* and asking about both would teach people to agree to the one that matters. Same asymmetry the agent's
|
|
53
|
+
* floor has, where `confirm` is settable and `allow` is refused.
|
|
54
|
+
*/
|
|
55
|
+
export declare function confirmationFor(setting: Setting, value: unknown): string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* The report after a successful set.
|
|
58
|
+
*
|
|
59
|
+
* `reflowed` is surfaced rather than swallowed: the file is correct and its comments have moved, which
|
|
60
|
+
* is a surprise better heard from the command than found later in a diff.
|
|
61
|
+
*/
|
|
62
|
+
export declare function renderChange(input: {
|
|
63
|
+
readonly path: string;
|
|
64
|
+
readonly before: unknown;
|
|
65
|
+
readonly after: unknown;
|
|
66
|
+
readonly file: string;
|
|
67
|
+
readonly reflowed: boolean;
|
|
68
|
+
/** A live process holding this agent, if there is one. */
|
|
69
|
+
readonly running?: {
|
|
70
|
+
readonly pid: number;
|
|
71
|
+
readonly mode: string;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Env variables this edit has *newly* made load-bearing and that are not set.
|
|
75
|
+
*
|
|
76
|
+
* Newly, not "all of them": a note about tokens printed on every `limits.maxSteps` change is a note
|
|
77
|
+
* nobody reads by the time it matters — the same reasoning that makes `config_set` report a pending
|
|
78
|
+
* secret only for a write that could have introduced one. What is already missing is `config list`'s
|
|
79
|
+
* to report, because that is the command whose job is the overview.
|
|
80
|
+
*/
|
|
81
|
+
readonly pending: readonly EnvNeed[];
|
|
82
|
+
readonly restartHint: string;
|
|
83
|
+
}): string;
|
|
84
|
+
/** Every setting with a real dotted path, in catalogue order. `config set`'s accepted list. */
|
|
85
|
+
export declare function settablePaths(): readonly string[];
|
|
86
|
+
/** An env variable this manifest depends on, and what actually happens without it. */
|
|
87
|
+
export interface EnvNeed {
|
|
88
|
+
readonly name: string;
|
|
89
|
+
/** The real consequence, which differs per source and is not interchangeable. */
|
|
90
|
+
readonly why: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* The env variables a manifest depends on, each with the consequence of it being unset.
|
|
94
|
+
*
|
|
95
|
+
* One message for all of them was wrong, and a live run showed it: the API token variable reported as
|
|
96
|
+
* "read at boot — the agent will refuse to start until it is filled in", printed for an agent with
|
|
97
|
+
* `server.enabled: false` that starts perfectly well. Three sources, three different outcomes:
|
|
98
|
+
*
|
|
99
|
+
* - `model.<role>.apiKeyEnv` — a **load failure**. `validateApiKeyEnv` refuses the manifest outright.
|
|
100
|
+
* - an enabled channel's `tokenEnv` — a **boot failure**, because the factory reads it inside
|
|
101
|
+
* `Runtime.create`. A channel with `enabled: false` is never constructed, so it needs nothing.
|
|
102
|
+
* - `server.tokenEnv` — **no failure at all**. The API serves unauthenticated and the banner says so,
|
|
103
|
+
* which is worth telling somebody and is not the same sentence as "will not start".
|
|
104
|
+
* - a provider's `apiKeyEnv` — that provider's tools do not work; the agent runs.
|
|
105
|
+
*
|
|
106
|
+
* A disabled block contributes nothing. Claiming a dependency that does not exist is worse than
|
|
107
|
+
* claiming none, because it is the kind of warning that teaches people to ignore this line.
|
|
108
|
+
*/
|
|
109
|
+
export declare function envNeeds(document: unknown): readonly EnvNeed[];
|
|
110
|
+
/** Those of `needs` the environment does not supply. */
|
|
111
|
+
export declare function unmet(needs: readonly EnvNeed[], env: Readonly<Record<string, string | undefined>>): readonly EnvNeed[];
|
|
112
|
+
/**
|
|
113
|
+
* The editor's rows for a manifest: every setting, one `allowFrom` per channel, and every secret.
|
|
114
|
+
*
|
|
115
|
+
* Here rather than in the component because it is the whole shape of the surface and it is pure — what
|
|
116
|
+
* appears, in what order, under which heading — and because both hosts build it the same way.
|
|
117
|
+
*
|
|
118
|
+
* The two catalogue rows that are not dotted paths are *replaced* by their expansions rather than shown
|
|
119
|
+
* beside them: `channels[].allowFrom` becomes one row per declared channel, and
|
|
120
|
+
* `tools.providers.<id>.writeRoots` is left as a listing-only row, because writing it means naming a
|
|
121
|
+
* provider and the editor has no way to ask which. A row nobody can act on would be the dead end this
|
|
122
|
+
* surface exists to remove, so it is not offered at all — `config list` still shows it.
|
|
123
|
+
*/
|
|
124
|
+
export declare function editorRows(settings: readonly SettingValue[], input: {
|
|
125
|
+
readonly channels: readonly {
|
|
126
|
+
readonly id: string;
|
|
127
|
+
readonly type: string;
|
|
128
|
+
readonly allowFrom: readonly string[];
|
|
129
|
+
}[];
|
|
130
|
+
readonly secrets: readonly EnvNeed[];
|
|
131
|
+
readonly present: (name: string) => boolean;
|
|
132
|
+
}): readonly EditorRow[];
|
|
133
|
+
//# sourceMappingURL=config-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-view.d.ts","sourceRoot":"","sources":["../../src/lib/config-view.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAY,KAAK,OAAO,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAGnD,gEAAgE;AAChE,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,uEAAuE;IACvE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CAC1B;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAKhD;AAOD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,YAAY,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAkClF;AAED,mCAAmC;AACnC,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,CAMlE;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAMpF;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;IAC1B,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IAClE;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,OAAO,EAAE,CAAA;IACpC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAC/B,GAAG,MAAM,CAkCT;AAED,+FAA+F;AAC/F,wBAAgB,aAAa,IAAI,SAAS,MAAM,EAAE,CAIjD;AAED,sFAAsF;AACtF,MAAM,WAAW,OAAO;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,iFAAiF;IACjF,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS,OAAO,EAAE,CAuC9D;AAOD,wDAAwD;AACxD,wBAAgB,KAAK,CACjB,KAAK,EAAE,SAAS,OAAO,EAAE,EACzB,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,GAClD,SAAS,OAAO,EAAE,CAEpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CACtB,QAAQ,EAAE,SAAS,YAAY,EAAE,EACjC,KAAK,EAAE;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS;QACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;QACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;QACrB,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;KACxC,EAAE,CAAA;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,OAAO,EAAE,CAAA;IACpC,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;CAC9C,GACF,SAAS,SAAS,EAAE,CAgDtB"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A yes/no question on the plain path.
|
|
3
|
+
*
|
|
4
|
+
* One question, one place. The wizard has its own confirm *screen* under Ink and the picker has a
|
|
5
|
+
* selection; what was missing was the shape a single command needs before doing something outside its
|
|
6
|
+
* own workspace — and the only current caller, `terminal-setup`, is the only command that does that.
|
|
7
|
+
*
|
|
8
|
+
* **Not a TTY means no.** A piped or CI run cannot answer, so the safe answer is the one that changes
|
|
9
|
+
* nothing — and the caller reports that nothing was written rather than treating it as a failure.
|
|
10
|
+
* Defaulting to yes here would make a redirected invocation edit somebody's editor keybindings, which is
|
|
11
|
+
* the kind of surprise that is only discovered later.
|
|
12
|
+
*
|
|
13
|
+
* Deliberately not a general prompt library. A second kind of question can have a second function; a
|
|
14
|
+
* configurable one would grow options nobody needs and hide the TTY rule above inside them. There are
|
|
15
|
+
* three now — `askExactly` is a different bar, and `askSecret` is a different *channel*, because a
|
|
16
|
+
* value that must not be echoed cannot go through readline at all.
|
|
17
|
+
*/
|
|
18
|
+
export interface ConfirmOptions {
|
|
19
|
+
/** Injected by tests. The process streams otherwise. */
|
|
20
|
+
readonly input?: NodeJS.ReadableStream & {
|
|
21
|
+
isTTY?: boolean;
|
|
22
|
+
};
|
|
23
|
+
readonly output?: NodeJS.WritableStream;
|
|
24
|
+
}
|
|
25
|
+
export declare function askYesNo(question: string, options?: ConfirmOptions): Promise<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* A question answered only by typing something back exactly.
|
|
28
|
+
*
|
|
29
|
+
* The bar for an irreversible, multi-part deletion. `askYesNo` is one keypress, which is right for
|
|
30
|
+
* "shall I edit your keybindings" and too cheap for "delete this agent, its conversations and its
|
|
31
|
+
* memory" — a stray `y` against the wrong listing is a mistake with nothing to undo it, and the whole
|
|
32
|
+
* point of showing the listing first is that somebody reads it. Typing the name is what proves they did.
|
|
33
|
+
*
|
|
34
|
+
* Compared after trimming and nothing else. Case is **not** folded: an agent's ref is the name of a
|
|
35
|
+
* directory, so `Milo` and `milo` are two different agents on a case-sensitive filesystem, and
|
|
36
|
+
* accepting either here would accept the wrong one somewhere else.
|
|
37
|
+
*
|
|
38
|
+
* Not a TTY means no, for the reason `askYesNo` has it: a piped or CI run cannot answer, and the safe
|
|
39
|
+
* answer is the one that changes nothing. The caller reports that nothing was deleted, and `--yes` is
|
|
40
|
+
* how a script says it meant it.
|
|
41
|
+
*/
|
|
42
|
+
export declare function askExactly(question: string, expected: string, options?: ConfirmOptions): Promise<boolean>;
|
|
43
|
+
/**
|
|
44
|
+
* A value typed at a prompt and never echoed. `undefined` means cancelled or unavailable.
|
|
45
|
+
*
|
|
46
|
+
* ## Why this is not readline
|
|
47
|
+
*
|
|
48
|
+
* readline echoes what it reads, and the documented way to stop it is to overwrite a private method on
|
|
49
|
+
* the interface — which needs a cast this codebase does not allow. Reading the bytes is a dozen more
|
|
50
|
+
* lines and it is the honest version: raw mode on, one `*` written per character, raw mode off in a
|
|
51
|
+
* `finally` so a thrown error cannot leave the terminal unable to echo anything the person types next.
|
|
52
|
+
*
|
|
53
|
+
* ## Why a secret never comes from an argument
|
|
54
|
+
*
|
|
55
|
+
* The alternative was `--value`, and it puts the secret in two places nobody intends: the shell's
|
|
56
|
+
* history file, and `ps` output, where every local process can read it for the lifetime of the call.
|
|
57
|
+
* That is the same exposure `renderPlist` throws to prevent — launchd echoes a job's environment in
|
|
58
|
+
* plaintext, so a plist carries no secret — and the reasoning does not change because the process is
|
|
59
|
+
* short-lived. Not a TTY returns `undefined` rather than reading a pipe, so a CI run is *told* that
|
|
60
|
+
* nothing was written instead of a secret arriving from somewhere the caller did not audit.
|
|
61
|
+
*
|
|
62
|
+
* ^C cancels and ^D on an empty line cancels; both return `undefined`, and the caller reports that
|
|
63
|
+
* nothing changed. Backspace is honoured because a mistyped key in a value you cannot see is otherwise
|
|
64
|
+
* unrecoverable without starting the command again.
|
|
65
|
+
*/
|
|
66
|
+
/**
|
|
67
|
+
* The narrow surface `askSecret` touches, rather than a widened `ConfirmOptions.input`.
|
|
68
|
+
*
|
|
69
|
+
* `process.stdin`'s declared `on` is a union of overloads, and intersecting that with an object type
|
|
70
|
+
* makes it uncallable — the compiler cannot pick a signature. Declaring only what is used and asserting
|
|
71
|
+
* the real stream against it once keeps the check where it is useful: anything else this function
|
|
72
|
+
* reached for would be a type error here rather than a runtime surprise.
|
|
73
|
+
*/
|
|
74
|
+
export interface SecretInput {
|
|
75
|
+
readonly isTTY?: boolean;
|
|
76
|
+
setRawMode?: (mode: boolean) => unknown;
|
|
77
|
+
resume?: () => unknown;
|
|
78
|
+
on(event: "data", listener: (chunk: Buffer | string) => void): unknown;
|
|
79
|
+
removeListener(event: "data", listener: (chunk: Buffer | string) => void): unknown;
|
|
80
|
+
}
|
|
81
|
+
export interface SecretOptions {
|
|
82
|
+
readonly input?: SecretInput;
|
|
83
|
+
readonly output?: NodeJS.WritableStream;
|
|
84
|
+
}
|
|
85
|
+
export declare function askSecret(question: string, options?: SecretOptions): Promise<string | undefined>;
|
|
86
|
+
//# sourceMappingURL=confirm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirm.d.ts","sourceRoot":"","sources":["../../src/lib/confirm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,MAAM,WAAW,cAAc;IAC3B,wDAAwD;IACxD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,cAAc,GAAG;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;IAC5D,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,cAAc,CAAA;CAC1C;AAED,wBAAsB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,CAe/F;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,UAAU,CAC5B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,cAAmB,GAC7B,OAAO,CAAC,OAAO,CAAC,CAclB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;IACxB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAA;IACvC,MAAM,CAAC,EAAE,MAAM,OAAO,CAAA;IACtB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,GAAG,OAAO,CAAA;IACtE,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,GAAG,OAAO,CAAA;CACrF;AAED,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAA;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,cAAc,CAAA;CAC1C;AAED,wBAAsB,SAAS,CAC3B,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,aAAkB,GAC5B,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAmE7B"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every constant the CLI uses, in one place.
|
|
3
|
+
*
|
|
4
|
+
* The rule is the one termheat follows: no magic number inline. A width, a limit, or a control
|
|
5
|
+
* sequence buried in a component is invisible to anyone tuning behaviour later, and two copies of
|
|
6
|
+
* the same number drift.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SHOW_CURSOR = "\u001B[?25h";
|
|
9
|
+
export declare const RESET_STYLE = "\u001B[0m";
|
|
10
|
+
/**
|
|
11
|
+
* Faint text, for the one thing written outside Ink that is not the point of the output.
|
|
12
|
+
*
|
|
13
|
+
* SGR 2 rather than a grey foreground: a fixed colour is wrong on half the terminals in existence,
|
|
14
|
+
* and dim is the terminal's own opinion about what recedes on the theme in use. It persists across a
|
|
15
|
+
* newline, so a multi-line note opens it once and resets once — and the reset lands before the final
|
|
16
|
+
* newline, or the shell prompt that follows inherits it.
|
|
17
|
+
*/
|
|
18
|
+
export declare const DIM_STYLE = "\u001B[2m";
|
|
19
|
+
/**
|
|
20
|
+
* The alternate screen buffer — a second, empty screen the terminal swaps in, discards on the way
|
|
21
|
+
* out, and never adds to the scrollback.
|
|
22
|
+
*
|
|
23
|
+
* `1049` rather than the older `47`: it saves the cursor position and clears the new buffer in one
|
|
24
|
+
* sequence, which is what lands the shell prompt back where it was rather than wherever the app left
|
|
25
|
+
* the cursor.
|
|
26
|
+
*
|
|
27
|
+
* The order on the way out is easy to get backwards. A style reset applies to whichever buffer is
|
|
28
|
+
* *current*, so it has to be written before the swap away — reset afterwards and any colour the app
|
|
29
|
+
* left on lands on the shell's screen instead of the one being discarded. `restoreTerminal` does them
|
|
30
|
+
* in that order and says so there too.
|
|
31
|
+
*/
|
|
32
|
+
export declare const ENTER_ALT_SCREEN = "\u001B[?1049h";
|
|
33
|
+
export declare const LEAVE_ALT_SCREEN = "\u001B[?1049l";
|
|
34
|
+
/**
|
|
35
|
+
* Pop the kitty keyboard protocol: `CSI < u`, the counterpart to the `CSI > flags u` Ink pushes.
|
|
36
|
+
*
|
|
37
|
+
* Here rather than in `lib/keyboard.ts` so the dependency runs one way — `lib/exit.ts` needs the
|
|
38
|
+
* sequence and `lib/keyboard.ts` needs `markEnhancedKeys`, and only one of those two can import the
|
|
39
|
+
* other. Terminal-mode sequences already live in this module, which makes this the side that moves.
|
|
40
|
+
*/
|
|
41
|
+
export declare const DISABLE_ENHANCED_KEYS = "\u001B[<u";
|
|
42
|
+
/**
|
|
43
|
+
* Fallback width. A pty can genuinely report `columns === 0` — measured, under `script -q`, which
|
|
44
|
+
* is how this repo drives a real TTY in a test harness. Any layout maths that divides by the
|
|
45
|
+
* terminal width has to survive that.
|
|
46
|
+
*/
|
|
47
|
+
export declare const FALLBACK_COLUMNS = 80;
|
|
48
|
+
export declare const FALLBACK_ROWS = 24;
|
|
49
|
+
/**
|
|
50
|
+
* Rows the live pane may occupy before it starts showing only its tail.
|
|
51
|
+
*
|
|
52
|
+
* Ink erases and redraws its whole dynamic tree every frame, so an unbounded live region means
|
|
53
|
+
* redrawing hundreds of lines per token. Finished messages move into `<Static>`, which is written
|
|
54
|
+
* once and never touched again; this cap is what keeps the *unfinished* one cheap.
|
|
55
|
+
*/
|
|
56
|
+
export declare const LIVE_PANE_MAX_ROWS = 12;
|
|
57
|
+
export declare const PROMPT = "\u203A ";
|
|
58
|
+
/**
|
|
59
|
+
* The width a screen is laid out for, clamped at both ends.
|
|
60
|
+
*
|
|
61
|
+
* The floor is where the row layout drops its description column rather than wrapping — below it
|
|
62
|
+
* nothing sensible is possible, and a wrapped row is what made the first skills list unreadable. The
|
|
63
|
+
* ceiling stops a 300-column window putting a description a screen away from the name it belongs to.
|
|
64
|
+
*
|
|
65
|
+
* Here rather than in the one command that first needed them, because every screen now shares a frame
|
|
66
|
+
* and two screens clamping differently is the drift `render.ts` was written to end.
|
|
67
|
+
*/
|
|
68
|
+
export declare const MIN_SCREEN_COLUMNS = 40;
|
|
69
|
+
export declare const MAX_SCREEN_COLUMNS = 140;
|
|
70
|
+
/** Rows a scrolling list may occupy, before and after the frame takes its share. */
|
|
71
|
+
export declare const MIN_SCREEN_ROWS = 8;
|
|
72
|
+
export declare const MAX_SCREEN_ROWS = 40;
|
|
73
|
+
/** Header, footer, margins and the counter — what the frame costs a list. */
|
|
74
|
+
export declare const SCREEN_CHROME_ROWS = 8;
|
|
75
|
+
/** Lines of input history kept for the up/down arrows. */
|
|
76
|
+
export declare const HISTORY_LIMIT = 200;
|
|
77
|
+
/**
|
|
78
|
+
* Undo points kept for the input buffer.
|
|
79
|
+
*
|
|
80
|
+
* Bounded because a snapshot holds a whole copy of the text, and a long composing session with a
|
|
81
|
+
* pasted document in it would otherwise keep every intermediate version alive for the life of the
|
|
82
|
+
* process. A run of typing is one point, not one per keystroke, so this is deeper than it looks.
|
|
83
|
+
*/
|
|
84
|
+
export declare const UNDO_LIMIT = 100;
|
|
85
|
+
/**
|
|
86
|
+
* Rows the input box may grow to before it scrolls internally.
|
|
87
|
+
*
|
|
88
|
+
* The same reasoning as `LIVE_PANE_MAX_ROWS`: the input is in Ink's dynamic region, which is erased and
|
|
89
|
+
* redrawn every frame, so an unbounded box means redrawing a pasted document on every keystroke. It
|
|
90
|
+
* also stops a long paste pushing the conversation off the screen.
|
|
91
|
+
*/
|
|
92
|
+
export declare const MAX_INPUT_ROWS = 10;
|
|
93
|
+
/**
|
|
94
|
+
* Rows of a reasoning block shown before it folds to a count.
|
|
95
|
+
*
|
|
96
|
+
* Reasoning is secondary and routinely the longest item in a conversation — a real turn produced a
|
|
97
|
+
* twenty-three-row block for a one-sentence answer, which filled a thirty-row terminal on its own and made
|
|
98
|
+
* the reply itself something you had to scroll to find. Four rows is enough to see what it was thinking
|
|
99
|
+
* about; `⌥r` shows the rest.
|
|
100
|
+
*
|
|
101
|
+
* Folding is a *view* decision, applied when items become rows. The whole text is always in the item, so
|
|
102
|
+
* expanding needs no re-derivation and nothing is lost.
|
|
103
|
+
*/
|
|
104
|
+
export declare const REASONING_FOLD_ROWS = 4;
|
|
105
|
+
/** Matches `^R` shows at once. Enough to recognise one, few enough to leave the prompt on screen. */
|
|
106
|
+
export declare const SEARCH_ROWS = 6;
|
|
107
|
+
/**
|
|
108
|
+
* Rows a single-value field may wrap to before it scrolls to follow the caret.
|
|
109
|
+
*
|
|
110
|
+
* Smaller than `MAX_INPUT_ROWS`, because a *value* is not a message: a wizard answer and a manifest
|
|
111
|
+
* setting are one line of intent that happens to be long. Three is enough for the longest thing a
|
|
112
|
+
* generated manifest holds — `tools.pinned` at 92 characters is two rows on an 80-column terminal — and
|
|
113
|
+
* few enough that the field never pushes the rest of the screen around.
|
|
114
|
+
*
|
|
115
|
+
* There was no bound at all before, because the field passed no width: in the settings editor a long
|
|
116
|
+
* value was clipped at the terminal's edge with the caret past the clip, and you could not see what you
|
|
117
|
+
* were typing. The wizard escaped it — a bordered box bounds its text whatever the field passes.
|
|
118
|
+
*/
|
|
119
|
+
export declare const FIELD_ROWS = 3;
|
|
120
|
+
/**
|
|
121
|
+
* Transcript items kept before the oldest are dropped.
|
|
122
|
+
*
|
|
123
|
+
* Load-bearing rather than prudent, and it was missing for three phases. While the conversation lived
|
|
124
|
+
* in `<Static>` a finished item was written once and cost nothing afterwards; the alternate screen took
|
|
125
|
+
* that away, so every item is now re-derived and re-wrapped on every frame — an unbounded buffer means
|
|
126
|
+
* unbounded work per keystroke, and the case that reaches it is an agent looping tool calls overnight
|
|
127
|
+
* rather than anybody typing.
|
|
128
|
+
*
|
|
129
|
+
* Counted in **items**, not rows, because the row count depends on the terminal width and the reducer
|
|
130
|
+
* that owns the buffer is pure and has none. That does not contradict the scroll layer's rule that the
|
|
131
|
+
* unit is a row: that rule is about addressing an *offset*, where paging by item steps over a forty-row
|
|
132
|
+
* reply in one keystroke.
|
|
133
|
+
*
|
|
134
|
+
* Deliberately far past any session a person reads end to end — roughly four hundred turns — so the cap
|
|
135
|
+
* is a backstop nobody meets rather than a limit that shapes ordinary use. Eviction is also gated on the
|
|
136
|
+
* reader following the tail; see `TRIM` in `transcript.ts` for why that gate is not optional.
|
|
137
|
+
*/
|
|
138
|
+
export declare const MAX_TRANSCRIPT_ITEMS = 2000;
|
|
139
|
+
export declare const DEFAULT_ROW_LIMIT = 50;
|
|
140
|
+
export declare const MIN_ROW_LIMIT = 1;
|
|
141
|
+
export declare const EXIT_OK = 0;
|
|
142
|
+
export declare const EXIT_FAILURE = 1;
|
|
143
|
+
/** 128 + SIGTERM, the shell convention. */
|
|
144
|
+
export declare const EXIT_SIGTERM = 143;
|
|
145
|
+
/** Rows a pane over the conversation may use — a command's output, or a hosted view. */
|
|
146
|
+
export declare const PANE_ROWS = 16;
|
|
147
|
+
/**
|
|
148
|
+
* The fewest rows a scrolling body is ever given.
|
|
149
|
+
*
|
|
150
|
+
* A floor rather than a target. At eight terminal rows the chrome alone — header, composer, status —
|
|
151
|
+
* accounts for most of the screen, and the alternative to a floor is a body of zero rows: a session
|
|
152
|
+
* that shows the prompt and no conversation at all, which reads as a broken renderer rather than as a
|
|
153
|
+
* window somebody should make taller.
|
|
154
|
+
*/
|
|
155
|
+
export declare const MIN_BODY_ROWS = 3;
|
|
156
|
+
/**
|
|
157
|
+
* Rows a list may take while landing — before anything has been sent.
|
|
158
|
+
*
|
|
159
|
+
* Deliberately larger than `SEARCH_ROWS`, which is tuned for a live conversation where every row of list is a
|
|
160
|
+
* row of conversation hidden. There is no conversation yet on the landing screen and its whole job is
|
|
161
|
+
* discovery: showing six of fifteen commands behind a `… 9 below` is the wrong trade on the screen somebody
|
|
162
|
+
* opens before they know what the commands are. The brand mark gives up a tier to pay for it, which the tier
|
|
163
|
+
* ladder already knows how to do.
|
|
164
|
+
*
|
|
165
|
+
* **This tracks the size of the in-session command table**, so a phase that adds a command has to raise it —
|
|
166
|
+
* which is why `commands.test.ts` asserts the relationship rather than leaving it to whoever notices the
|
|
167
|
+
* `… 1 below`. It is not derived from `COMMANDS` directly because `commands.ts` reads this module, and the
|
|
168
|
+
* cycle would cost more than the assertion does.
|
|
169
|
+
*/
|
|
170
|
+
export declare const LANDING_LIST_ROWS = 22;
|
|
171
|
+
/**
|
|
172
|
+
* Rows of conversation the landing screen keeps, whatever the brand mark would like.
|
|
173
|
+
*
|
|
174
|
+
* The banner is written into the transcript, so a wordmark that squeezed it to nothing would hide the boot
|
|
175
|
+
* notes and every load warning behind a picture — which is the trimmed-catalogue failure with better
|
|
176
|
+
* typography: true of what is on screen, false of what is the case.
|
|
177
|
+
*
|
|
178
|
+
* Eight rather than four, measured against a real banner: four left the window showing the *tail* of it, so
|
|
179
|
+
* the first thing on screen was the second half of a wrapped store path. The banner runs six to eight rows
|
|
180
|
+
* depending on how many load warnings there are.
|
|
181
|
+
*/
|
|
182
|
+
export declare const MIN_LANDING_TRANSCRIPT = 8;
|
|
183
|
+
/**
|
|
184
|
+
* How long after a press a second one still counts as a double-click.
|
|
185
|
+
*
|
|
186
|
+
* A terminal reports three presses and never a "double click", so the grouping is ours to infer — from time
|
|
187
|
+
* *and* position, because two clicks 300 ms apart on different words are two clicks. 400 ms is the common
|
|
188
|
+
* platform default; longer makes a deliberate second selection turn into a word-select, shorter makes a
|
|
189
|
+
* real double-click fail on a slow hand.
|
|
190
|
+
*/
|
|
191
|
+
export declare const MULTI_CLICK_MS = 400;
|
|
192
|
+
/** The blank row between the brand mark and the one-line header under it. */
|
|
193
|
+
export declare const BRAND_GAP_ROWS = 1;
|
|
194
|
+
/** Conversations the session picker shows at once. The list scrolls inside this. */
|
|
195
|
+
export declare const SESSION_PICKER_ROWS = 12;
|
|
196
|
+
/**
|
|
197
|
+
* How often `daemon logs --follow` checks a service log for new bytes.
|
|
198
|
+
*
|
|
199
|
+
* Polled rather than watched: `fs.watch` on macOS reports another process's appends unreliably, and a
|
|
200
|
+
* follower that misses the line somebody is waiting for is worse than one that arrives a third of a
|
|
201
|
+
* second late — the reason to watch a log live is not trusting what you have been told. Ctrl-C wakes the
|
|
202
|
+
* pending sleep rather than waiting it out, so this interval never delays a stop.
|
|
203
|
+
*/
|
|
204
|
+
export declare const LOG_POLL_MS = 300;
|
|
205
|
+
/**
|
|
206
|
+
* How long a ^C at an idle prompt stays armed.
|
|
207
|
+
*
|
|
208
|
+
* The chord is doubled rather than immediate because a single ^C means "cancel the turn" everywhere
|
|
209
|
+
* else in this session, and the two are one keystroke apart. Long enough to be a deliberate second
|
|
210
|
+
* press, short enough that an armed prompt left alone goes back to being safe.
|
|
211
|
+
*/
|
|
212
|
+
export declare const EXIT_ARM_MS = 2000;
|
|
213
|
+
//# sourceMappingURL=const.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../src/lib/const.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,eAAO,MAAM,WAAW,gBAAgB,CAAA;AACxC,eAAO,MAAM,WAAW,cAAc,CAAA;AACtC;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,cAAc,CAAA;AAEpC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,kBAAkB,CAAA;AAC/C,eAAO,MAAM,gBAAgB,kBAAkB,CAAA;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,cAAc,CAAA;AAEhD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,KAAK,CAAA;AAClC,eAAO,MAAM,aAAa,KAAK,CAAA;AAE/B;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,KAAK,CAAA;AAEpC,eAAO,MAAM,MAAM,YAAO,CAAA;AAE1B;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,KAAK,CAAA;AACpC,eAAO,MAAM,kBAAkB,MAAM,CAAA;AAErC,oFAAoF;AACpF,eAAO,MAAM,eAAe,IAAI,CAAA;AAChC,eAAO,MAAM,eAAe,KAAK,CAAA;AACjC,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB,IAAI,CAAA;AAQnC,0DAA0D;AAC1D,eAAO,MAAM,aAAa,MAAM,CAAA;AAEhC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,MAAM,CAAA;AAE7B;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,KAAK,CAAA;AAEhC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAA;AAEpC,qGAAqG;AACrG,eAAO,MAAM,WAAW,IAAI,CAAA;AAE5B;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,IAAI,CAAA;AAE3B;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,oBAAoB,OAAO,CAAA;AAIxC,eAAO,MAAM,iBAAiB,KAAK,CAAA;AACnC,eAAO,MAAM,aAAa,IAAI,CAAA;AAI9B,eAAO,MAAM,OAAO,IAAI,CAAA;AACxB,eAAO,MAAM,YAAY,IAAI,CAAA;AAC7B,2CAA2C;AAC3C,eAAO,MAAM,YAAY,MAAM,CAAA;AAE/B,wFAAwF;AACxF,eAAO,MAAM,SAAS,KAAK,CAAA;AAE3B;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,IAAI,CAAA;AAE9B;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,KAAK,CAAA;AAEnC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,IAAI,CAAA;AAEvC;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,MAAM,CAAA;AAEjC,6EAA6E;AAC7E,eAAO,MAAM,cAAc,IAAI,CAAA;AAE/B,oFAAoF;AACpF,eAAO,MAAM,mBAAmB,KAAK,CAAA;AAErC;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,MAAM,CAAA;AAE9B;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,OAAO,CAAA"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading a modifier off the bytes, because Ink's reading of it is lossy.
|
|
3
|
+
*
|
|
4
|
+
* ## The defect this exists for
|
|
5
|
+
*
|
|
6
|
+
* Warp sends `cmd+left` as `CSI 1;9D` — modifier 9, which decodes to the super bit — and **omits the
|
|
7
|
+
* event-type field**. Ink's kitty branch for special keys requires that field (its regex demands a
|
|
8
|
+
* `:<event>` group), so the sequence falls through to its legacy branch, which does:
|
|
9
|
+
*
|
|
10
|
+
* key.meta = key.meta || !!(modifier & 10)
|
|
11
|
+
*
|
|
12
|
+
* `10` is `alt | super`. With modifier 8 that is `8 & 10 === 8`, truthy — so **super arrives as meta**,
|
|
13
|
+
* and `cmd+left` becomes indistinguishable from `option+left` before our keymap is called at all.
|
|
14
|
+
* Reported from a real session: both chords navigated by word, which is the only symptom this can have.
|
|
15
|
+
*
|
|
16
|
+
* Negotiating `reportEventTypes` was supposed to avoid this by making Warp include the field. It does not
|
|
17
|
+
* — measured by the symptom, not assumed — and a fix that depends on a terminal populating an optional
|
|
18
|
+
* field is a fix that works on some terminals. So the modifier is decoded here, from the bytes, where it
|
|
19
|
+
* is unambiguous: bit 8 is super whether or not an event type follows it.
|
|
20
|
+
*
|
|
21
|
+
* ## Why this is not a second parser
|
|
22
|
+
*
|
|
23
|
+
* It reads *one* field. Key identity still comes from Ink — `leftArrow`, `home`, `input` — and this only
|
|
24
|
+
* overrides the four modifier flags, and only when a sequence was actually found and matched to the key
|
|
25
|
+
* Ink reported. Anything unrecognised leaves the key exactly as it arrived, so the worst case is today's
|
|
26
|
+
* behaviour rather than a new class of wrong.
|
|
27
|
+
*/
|
|
28
|
+
import type { KeyState } from "#lib/types";
|
|
29
|
+
/** One modified key found in a chunk. `final` identifies the key for CSI forms, `param` for `u`. */
|
|
30
|
+
export interface CsiKey {
|
|
31
|
+
readonly modifier: number;
|
|
32
|
+
readonly final: string;
|
|
33
|
+
/** The first parameter: a key number for `~` forms, a codepoint for `u`, else 1. */
|
|
34
|
+
readonly param: number;
|
|
35
|
+
readonly eventType: "press" | "repeat" | "release" | undefined;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Every modified key in a chunk, oldest first.
|
|
39
|
+
*
|
|
40
|
+
* Matches `CSI <param> ; <modifier> [: <event>] <final>`, which covers the arrows (`A`-`D`), Home and End
|
|
41
|
+
* (`H`/`F`), the tilde forms (`1~` `3~` `4~` `5~` `6~` `7~` `8~`) and kitty's letter form (`u`) in one
|
|
42
|
+
* expression, because they differ only in the final byte. A sequence with no modifier parameter is skipped
|
|
43
|
+
* — there is nothing to correct on an unmodified key. The leading escape is not required: Ink strips one
|
|
44
|
+
* from the front of a chunk before a handler sees it, the same reason `lib/mouse.ts` anchors instead.
|
|
45
|
+
*/
|
|
46
|
+
export declare function csiKeys(chunk: string): readonly CsiKey[];
|
|
47
|
+
/**
|
|
48
|
+
* A terminal *reply*, not a keystroke: `CSI ? <flags> u`.
|
|
49
|
+
*
|
|
50
|
+
* Ink asks the terminal for its kitty-keyboard flags at mount, waits 200 ms, and strips the answer out of
|
|
51
|
+
* stdin if one arrives in time. Measured in a real Warp session: it arrived **late**, the window had
|
|
52
|
+
* closed, and the bytes fell through to `useInput` as ordinary text — `input "[?0u"`, resolving to an
|
|
53
|
+
* insert. Left unclaimed that types `[?0u` into somebody's first message, which is the same class of
|
|
54
|
+
* defect as a mouse report reaching the buffer and is claimed here for the same reason.
|
|
55
|
+
*
|
|
56
|
+
* Deliberately narrow. Only this one reply is recognised, because it is the only one this runtime *asks*
|
|
57
|
+
* for — and the finals it would be tempting to generalise to are dangerous: `CSI 1;2R` is a real modified
|
|
58
|
+
* F3 key, so claiming `R` would swallow a keystroke to catch a reply nobody requested.
|
|
59
|
+
*/
|
|
60
|
+
export declare function isTerminalReply(input: string): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* The key Ink reported, with its modifiers taken from the bytes when they can be.
|
|
63
|
+
*
|
|
64
|
+
* `records` is consumed: the matched entry is removed, so two keys in one chunk stay in step. Matching by
|
|
65
|
+
* identity rather than by position is what makes that safe — a record that does not correspond to the key
|
|
66
|
+
* Ink is reporting is left in the queue for whichever keystroke it belongs to, instead of being applied to
|
|
67
|
+
* this one.
|
|
68
|
+
*/
|
|
69
|
+
export declare function withRealModifiers(key: KeyState, input: string, records: CsiKey[]): KeyState;
|
|
70
|
+
//# sourceMappingURL=csi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"csi.d.ts","sourceRoot":"","sources":["../../src/lib/csi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAQ1C,oGAAoG;AACpG,MAAM,WAAW,MAAM;IACnB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,oFAAoF;IACpF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAA;CACjE;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAwBxD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAMtD;AA8CD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,QAAQ,CAe3F"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The curated list: what `skills` shows before anybody types a query.
|
|
3
|
+
*
|
|
4
|
+
* ## Why a catalogue needs curating at all
|
|
5
|
+
*
|
|
6
|
+
* `anthropics/skills` is 17 skills and every one of them is broadly useful, so it ships whole.
|
|
7
|
+
* `github/awesome-copilot` is **425**, and the great majority are developer tooling — Azure resource
|
|
8
|
+
* naming, language-specific refactorings, IDE plugin scaffolds. Showing all 442 as a browsable list is
|
|
9
|
+
* not a catalogue, it is a directory listing, and the person who opens it has to already know what they
|
|
10
|
+
* are looking for. Which was the original problem.
|
|
11
|
+
*
|
|
12
|
+
* So the community source has an allowlist and the anthropic source does not. The entries below are the
|
|
13
|
+
* subset that is useful to somebody running an agent rather than writing one: specs and planning,
|
|
14
|
+
* documents, communications, go-to-market, diagrams, prompt craft, research.
|
|
15
|
+
*
|
|
16
|
+
* ## Verified against upstream, and one name removed
|
|
17
|
+
*
|
|
18
|
+
* Every folder here was checked against `github/awesome-copilot`'s tree on 2026-08-17. Of the 38 first
|
|
19
|
+
* drafted, **37 exist and `prompt-builder` does not** — and that is the failure mode this comment is here
|
|
20
|
+
* to prevent, because a name that matches no folder is silently absent from the list rather than an error.
|
|
21
|
+
* `npm run check:curated`-style verification is `sources search --json` plus a diff; the test in
|
|
22
|
+
* `curated.test.ts` asserts the shape, not the remote, so it cannot start failing when upstream renames
|
|
23
|
+
* something. **Re-check by hand when adding entries.**
|
|
24
|
+
*
|
|
25
|
+
* Curation applies to *browsing*, never to searching. `sources search` reaches all 442 on purpose: a
|
|
26
|
+
* curated list is a recommendation, and refusing to find a skill somebody knows the name of would make
|
|
27
|
+
* curation a restriction. Two different questions — "what should I look at" and "is this thing here".
|
|
28
|
+
*/
|
|
29
|
+
/** One group in the browse list. Order is the order on screen. */
|
|
30
|
+
export interface CuratedGroup {
|
|
31
|
+
readonly title: string;
|
|
32
|
+
readonly skills: readonly string[];
|
|
33
|
+
}
|
|
34
|
+
export declare const CURATED_COMMUNITY: readonly CuratedGroup[];
|
|
35
|
+
/** Flat allowlist, for the catalogue filter. */
|
|
36
|
+
export declare const CURATED_COMMUNITY_SKILLS: readonly string[];
|
|
37
|
+
/**
|
|
38
|
+
* Which group a curated skill belongs to, for the browse list's headers.
|
|
39
|
+
*
|
|
40
|
+
* Anything not in the map — every anthropic skill, and anything reached by search — falls into the
|
|
41
|
+
* source's own heading rather than being hidden.
|
|
42
|
+
*/
|
|
43
|
+
export declare function curatedGroupOf(skill: string): string | undefined;
|
|
44
|
+
//# sourceMappingURL=curated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"curated.d.ts","sourceRoot":"","sources":["../../src/lib/curated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,kEAAkE;AAClE,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;CACrC;AAED,eAAO,MAAM,iBAAiB,EAAE,SAAS,YAAY,EA+DpD,CAAA;AAED,gDAAgD;AAChD,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAErD,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEhE"}
|