@sixb/cli 0.1.26 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/commands/agent.d.ts.map +1 -1
  2. package/dist/commands/api.d.ts.map +1 -1
  3. package/dist/commands/check.d.ts.map +1 -1
  4. package/dist/commands/deploy.d.ts.map +1 -1
  5. package/dist/commands/dev-runner.d.ts.map +1 -1
  6. package/dist/commands/dev.d.ts.map +1 -1
  7. package/dist/commands/env.d.ts +31 -0
  8. package/dist/commands/env.d.ts.map +1 -0
  9. package/dist/lib/command-line.d.ts +26 -1
  10. package/dist/lib/command-line.d.ts.map +1 -1
  11. package/dist/lib/deploy-release.d.ts +2 -0
  12. package/dist/lib/deploy-release.d.ts.map +1 -1
  13. package/dist/lib/deploy-source.d.ts +2 -0
  14. package/dist/lib/deploy-source.d.ts.map +1 -1
  15. package/dist/lib/env-config.d.ts +17 -0
  16. package/dist/lib/env-config.d.ts.map +1 -0
  17. package/dist/lib/env-file.d.ts +16 -0
  18. package/dist/lib/env-file.d.ts.map +1 -0
  19. package/dist/lib/hidden-prompt.d.ts +19 -0
  20. package/dist/lib/hidden-prompt.d.ts.map +1 -0
  21. package/dist/tui/app.d.ts +8 -0
  22. package/dist/tui/app.d.ts.map +1 -1
  23. package/dist/tui/computer.d.ts +5 -0
  24. package/dist/tui/computer.d.ts.map +1 -1
  25. package/dist/tui/context.d.ts +13 -0
  26. package/dist/tui/context.d.ts.map +1 -0
  27. package/dist/tui/format.d.ts +85 -0
  28. package/dist/tui/format.d.ts.map +1 -1
  29. package/dist/tui/index.d.ts.map +1 -1
  30. package/dist/tui/markdown.d.ts +18 -0
  31. package/dist/tui/markdown.d.ts.map +1 -0
  32. package/dist/tui/parts.d.ts +8 -0
  33. package/dist/tui/parts.d.ts.map +1 -1
  34. package/dist/tui/runner.d.ts +37 -14
  35. package/dist/tui/runner.d.ts.map +1 -1
  36. package/dist/tui/settings.d.ts +13 -1
  37. package/dist/tui/settings.d.ts.map +1 -1
  38. package/dist/tui/transcript.d.ts +1 -1
  39. package/dist/tui/transcript.d.ts.map +1 -1
  40. package/dist/tui/ui.d.ts +7 -0
  41. package/dist/tui/ui.d.ts.map +1 -1
  42. package/dist/ui/deploy-screens.d.ts +3 -1
  43. package/dist/ui/deploy-screens.d.ts.map +1 -1
  44. package/dist/ui/env-screens.d.ts +37 -0
  45. package/dist/ui/env-screens.d.ts.map +1 -0
  46. package/package.json +19 -19
  47. package/src/commands/agent.ts +17 -10
  48. package/src/commands/api.ts +2 -1
  49. package/src/commands/check.ts +5 -1
  50. package/src/commands/deploy.ts +29 -3
  51. package/src/commands/dev-runner.ts +3 -1
  52. package/src/commands/dev.ts +3 -0
  53. package/src/commands/env.ts +422 -0
  54. package/src/index.tsx +39 -1
  55. package/src/lib/command-line.ts +59 -1
  56. package/src/lib/deploy-release.ts +3 -0
  57. package/src/lib/deploy-source.ts +10 -0
  58. package/src/lib/env-config.ts +96 -0
  59. package/src/lib/env-file.ts +104 -0
  60. package/src/lib/hidden-prompt.ts +97 -0
  61. package/src/tui/app.tsx +315 -179
  62. package/src/tui/computer.ts +37 -0
  63. package/src/tui/context.tsx +149 -0
  64. package/src/tui/format.ts +218 -1
  65. package/src/tui/index.tsx +13 -2
  66. package/src/tui/markdown.ts +91 -0
  67. package/src/tui/parts.ts +23 -3
  68. package/src/tui/runner.ts +113 -30
  69. package/src/tui/settings.ts +54 -5
  70. package/src/tui/transcript.tsx +90 -8
  71. package/src/tui/ui.tsx +40 -11
  72. package/src/ui/deploy-screens.ts +12 -1
  73. package/src/ui/env-screens.ts +81 -0
  74. package/dist/tui/folders.d.ts +0 -7
  75. package/dist/tui/folders.d.ts.map +0 -1
  76. package/src/tui/folders.ts +0 -41
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/commands/agent.ts"],"names":[],"mappings":"AA+BA;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE;IACtC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;IAChC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,oGAAoG;IACpG,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B,GAAG,OAAO,CAAC,IAAI,CAAC,CAgGhB"}
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/commands/agent.ts"],"names":[],"mappings":"AAgCA;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE;IACtC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;IAChC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,oGAAoG;IACpG,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B,GAAG,OAAO,CAAC,IAAI,CAAC,CAsGhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/commands/api.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,wBAAsB,MAAM,CAAC,OAAO,GAAE,UAAe,iBAoFpD"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/commands/api.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,wBAAsB,MAAM,CAAC,OAAO,GAAE,UAAe,iBAqFpD"}
@@ -1 +1 @@
1
- {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/commands/check.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wBAAsB,QAAQ,CAAC,OAAO,GAAE,YAAiB,iBAiExD"}
1
+ {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/commands/check.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wBAAsB,QAAQ,CAAC,OAAO,GAAE,YAAiB,iBAoExD"}
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAIV,mBAAmB,EAGpB,MAAM,mBAAmB,CAAA;AA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,CAAA;IAChB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,yBAAyB,CAAC,EAAE,MAAM,CAAA;IAClC,mGAAmG;IACnG,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAsB,aAAa,CAAC,OAAO,GAAE,UAAe,iBAkJ3D;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,SAAS,EAAE;IAAE,GAAG,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;CAAE,EAC7E,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC;IAAE,QAAQ,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAOpF"}
@@ -1 +1 @@
1
- {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9C,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9C,wBAAsB,MAAM,CAAC,OAAO,GAAE,UAAe,iBA2BpD"}
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAG9C,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9C,wBAAsB,MAAM,CAAC,OAAO,GAAE,UAAe,iBA4BpD"}
@@ -0,0 +1,31 @@
1
+ import { type EnvConfig, type EnvSource } from "@sixb/core/env";
2
+ export declare function runEnvPull(options: {
3
+ readonly env?: string;
4
+ readonly tokenFile?: string;
5
+ readonly force?: boolean;
6
+ readonly cwd?: string;
7
+ }): Promise<void>;
8
+ /** Before `sixb dev`: stops on a missing variable, offering to pull when there's a source. */
9
+ export declare function assertDevEnv(cwd: string): Promise<void>;
10
+ /**
11
+ * Bun read `.env` when this process started, and the processes `sixb dev` starts inherit what it
12
+ * read. So a pull also has to update this process, or they run on the old values. `.env.local`
13
+ * still wins, as it does when Bun loads the files itself. A variable exported in the shell loses
14
+ * here, which only happens on the rare start that pulls.
15
+ */
16
+ export declare function pullIntoThisProcess(cwd: string, config: EnvConfig, source: EnvSource): Promise<void>;
17
+ export declare function runEnvSet(options: {
18
+ readonly name: string;
19
+ readonly env: string | undefined;
20
+ readonly cwd?: string;
21
+ }): Promise<void>;
22
+ export declare function runEnvStatus(options?: {
23
+ readonly cwd?: string;
24
+ }): Promise<void>;
25
+ export declare function runEnvInit(options: {
26
+ readonly project: string;
27
+ readonly dev?: string;
28
+ readonly prod?: string;
29
+ readonly cwd?: string;
30
+ }): Promise<void>;
31
+ //# sourceMappingURL=env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/commands/env.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,SAAS,EAEd,KAAK,SAAS,EAGf,MAAM,gBAAgB,CAAA;AA6BvB,wBAAsB,UAAU,CAAC,OAAO,EAAE;IACxC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CACtB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoChB;AAoFD,8FAA8F;AAC9F,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAc7D;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,SAAS,GAChB,OAAO,CAAC,IAAI,CAAC,CAYf;AAID,wBAAsB,SAAS,CAAC,OAAO,EAAE;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CACtB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBhB;AAID,wBAAsB,YAAY,CAAC,OAAO,GAAE;IAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BzF;AAID,wBAAsB,UAAU,CAAC,OAAO,EAAE;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CACtB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwDhB"}
@@ -154,6 +154,31 @@ export declare const CLI_OPTION_DEFINITIONS: {
154
154
  readonly summary: "Keep printing new log lines";
155
155
  readonly kind: "boolean";
156
156
  };
157
+ readonly env: {
158
+ readonly syntax: "--env <dev|prod>";
159
+ readonly summary: "Environment (default for pull: dev)";
160
+ readonly kind: "string";
161
+ };
162
+ readonly dev: {
163
+ readonly syntax: "--dev <file>";
164
+ readonly summary: "The file holding the current dev values";
165
+ readonly kind: "string";
166
+ };
167
+ readonly prod: {
168
+ readonly syntax: "--prod <file>";
169
+ readonly summary: "The file holding the current prod values";
170
+ readonly kind: "string";
171
+ };
172
+ readonly "token-file": {
173
+ readonly syntax: "--token-file <path>";
174
+ readonly summary: "Read the source's token from this file, as a server does";
175
+ readonly kind: "string";
176
+ };
177
+ readonly force: {
178
+ readonly syntax: "--force";
179
+ readonly summary: "Replace a hand-written .env, losing what the source doesn't have";
180
+ readonly kind: "boolean";
181
+ };
157
182
  readonly admin: {
158
183
  readonly syntax: "--admin <login>";
159
184
  readonly summary: "Login with sudo that prepares the server (default: root)";
@@ -191,7 +216,7 @@ export declare const CLI_OPTION_DEFINITIONS: {
191
216
  };
192
217
  };
193
218
  export type CliOptionName = keyof typeof CLI_OPTION_DEFINITIONS;
194
- export type LocalCommandId = "agent" | "dev" | "api" | "app" | "login" | "logout" | "status" | "profile:list" | "profile:show" | "profile:use" | "token:list" | "token:create" | "token:revoke" | "service-account:list" | "service-account:create" | "service-account:disable" | "service-account:token:list" | "service-account:token:create" | "service-account:token:revoke" | "scheduler" | "orchestrator" | "rules" | "worker" | "worker-group" | "check" | "typegen" | "build" | "desktop:build" | "db:migrate" | "db:prepare" | "lake:check" | "lake:cleanup" | "deploy" | "deploy:status" | "deploy:logs" | "deploy:restart" | "deploy:start" | "deploy:stop" | "deploy:setup" | "deploy:check" | "deploy:ci" | "deploy:access:list" | "deploy:access:add" | "deploy:access:remove" | "init";
219
+ export type LocalCommandId = "agent" | "dev" | "api" | "app" | "login" | "logout" | "status" | "profile:list" | "profile:show" | "profile:use" | "token:list" | "token:create" | "token:revoke" | "service-account:list" | "service-account:create" | "service-account:disable" | "service-account:token:list" | "service-account:token:create" | "service-account:token:revoke" | "scheduler" | "orchestrator" | "rules" | "worker" | "worker-group" | "check" | "typegen" | "build" | "desktop:build" | "db:migrate" | "db:prepare" | "lake:check" | "lake:cleanup" | "deploy" | "deploy:status" | "deploy:logs" | "deploy:restart" | "deploy:start" | "deploy:stop" | "deploy:setup" | "deploy:check" | "deploy:ci" | "deploy:access:list" | "deploy:access:add" | "deploy:access:remove" | "env:init" | "env:pull" | "env:set" | "env:status" | "init";
195
220
  export interface CliHelpItem {
196
221
  readonly label: string;
197
222
  readonly value: string;
@@ -1 +1 @@
1
- {"version":3,"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AAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;IAChC,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAA;IACvC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAA;CACnC,CAAA;AAEL,qBAAa,aAAc,SAAQ,KAAK;IACtC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,QAAQ,KAAI;gBAET,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO;CAK3C;AAED,eAAO,MAAM,SAAS,EAAE,OAWvB,CAAA;AAwBD,eAAO,MAAM,gBAAgB,EAAE,SAAS;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,WAAW,EAAE,CAAA;IACtC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAC3B,EAoBG,CAAA;AAEJ,eAAO,MAAM,YAAY,oGAKf,CAAA;AAEV,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAkB/D;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAG/F;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAErF;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,GAAG,SAAS,MAAM,EAAE,CAGhG;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAcpE"}
@@ -2,6 +2,8 @@ import type { DeployConfig, DeployHttpServiceName, DeployRelease } from "@sixb/c
2
2
  export interface DeployReleaseOptions {
3
3
  /** The Bun version the project runs on, from its `packageManager` or the running Bun. */
4
4
  readonly bunVersion: string;
5
+ /** Whether a deploy writes the target's `.env` from the project's source. */
6
+ readonly envFromSource?: boolean;
5
7
  }
6
8
  export declare function buildDeployRelease(config: DeployConfig, options: DeployReleaseOptions): DeployRelease;
7
9
  /** Where browsers reach each HTTP service the deployment runs. */
@@ -1 +1 @@
1
- {"version":3,"file":"deploy-release.d.ts","sourceRoot":"","sources":["../../src/lib/deploy-release.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,YAAY,EAEZ,qBAAqB,EAErB,aAAa,EAOd,MAAM,mBAAmB,CAAA;AA4D1B,MAAM,WAAW,oBAAoB;IACnC,yFAAyF;IACzF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,oBAAoB,GAC5B,aAAa,CAgCf;AAED,kEAAkE;AAClE,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAOhD"}
1
+ {"version":3,"file":"deploy-release.d.ts","sourceRoot":"","sources":["../../src/lib/deploy-release.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,YAAY,EAEZ,qBAAqB,EAErB,aAAa,EAOd,MAAM,mBAAmB,CAAA;AA4D1B,MAAM,WAAW,oBAAoB;IACnC,yFAAyF;IACzF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,6EAA6E;IAC7E,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAA;CACjC;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,oBAAoB,GAC5B,aAAa,CAiCf;AAED,kEAAkE;AAClE,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAOhD"}
@@ -20,4 +20,6 @@ export declare function projectPathOf(projectDir: string): Promise<string>;
20
20
  export declare function repoRootOf(projectDir: string): Promise<string>;
21
21
  /** Who deploys, recorded with the release. */
22
22
  export declare function deployer(projectDir: string): Promise<string>;
23
+ /** Whether a commit being deployed has this file in the project's directory. */
24
+ export declare function commitHasProjectFile(projectDir: string, source: Pick<DeploySource, "commit" | "projectPath">, file: string): Promise<boolean>;
23
25
  //# sourceMappingURL=deploy-source.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deploy-source.d.ts","sourceRoot":"","sources":["../../src/lib/deploy-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAuB,MAAM,mBAAmB,CAAA;AAG1E,MAAM,WAAW,YAAa,SAAQ,YAAY;IAChD,yEAAyE;IACzE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CACxB;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAkCxF;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,aAAa,CAAC,GACpD,OAAO,CAAC,MAAM,CAAC,CAmCjB;AAED,qFAAqF;AACrF,wBAAsB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGvE;AAED,wDAAwD;AACxD,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAE9D;AAED,8CAA8C;AAC9C,wBAAsB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAMlE"}
1
+ {"version":3,"file":"deploy-source.d.ts","sourceRoot":"","sources":["../../src/lib/deploy-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAuB,MAAM,mBAAmB,CAAA;AAG1E,MAAM,WAAW,YAAa,SAAQ,YAAY;IAChD,yEAAyE;IACzE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CACxB;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAkCxF;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,aAAa,CAAC,GACpD,OAAO,CAAC,MAAM,CAAC,CAmCjB;AAED,qFAAqF;AACrF,wBAAsB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGvE;AAED,wDAAwD;AACxD,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAE9D;AAED,8CAA8C;AAC9C,wBAAsB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAMlE;AA4DD,gFAAgF;AAChF,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,aAAa,CAAC,EACpD,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,OAAO,CAAC,CAGlB"}
@@ -0,0 +1,17 @@
1
+ import type { EnvConfig, EnvName, EnvVarRule } from "@sixb/core/env";
2
+ import { SixbCliError } from "./errors";
3
+ export declare const ENV_CONFIG_FILE = "sixb.env.ts";
4
+ export declare const VAR_NAME_PATTERN: RegExp;
5
+ /** Loads `sixb.env.ts` from the project directory. A project without one has no declared names. */
6
+ export declare function loadEnvConfig(cwd?: string): Promise<EnvConfig | null>;
7
+ /** The names `env` must have a value for and doesn't. An empty value counts as none. */
8
+ export declare function missingEnvVars(config: EnvConfig, values: Readonly<Record<string, string | undefined>>, env: EnvName): string[];
9
+ /** Whether a variable with this rule must have a value in `env`. */
10
+ export declare function envVarNeeded(rule: EnvVarRule, env: EnvName): boolean;
11
+ /** The sentence every command uses to name what is missing. */
12
+ export declare function missingEnvSentence(names: readonly string[]): string;
13
+ /** Stops a command that is about to run the project without a variable it declares. */
14
+ export declare function assertDeclaredEnv(cwd: string): Promise<void>;
15
+ /** The failure for a project about to run without these variables, and what fixes it. */
16
+ export declare function missingEnvError(config: EnvConfig, names: readonly string[]): SixbCliError;
17
+ //# sourceMappingURL=env-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env-config.d.ts","sourceRoot":"","sources":["../../src/lib/env-config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,eAAO,MAAM,eAAe,gBAAgB,CAAA;AAE5C,eAAO,MAAM,gBAAgB,QAA6B,CAAA;AAG1D,mGAAmG;AACnG,wBAAsB,aAAa,CAAC,GAAG,SAAgB,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAWlF;AAmCD,wFAAwF;AACxF,wBAAgB,cAAc,CAC5B,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,EACpD,GAAG,EAAE,OAAO,GACX,MAAM,EAAE,CAIV;AAED,oEAAoE;AACpE,wBAAgB,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAEpE;AAED,+DAA+D;AAC/D,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAEnE;AAED,uFAAuF;AACvF,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAOlE;AAED,yFAAyF;AACzF,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,YAAY,CAMzF"}
@@ -0,0 +1,16 @@
1
+ import type { EnvName } from "@sixb/core/env";
2
+ /**
3
+ * What Bun reads from a `.env` file, by asking Bun: a second parser would disagree with the one the
4
+ * app runs on. The child has an empty environment and an empty directory, so the result holds this
5
+ * file's values and nothing else. A `$NAME` in the file sees only that file.
6
+ */
7
+ export declare function readEnvFile(path: string): Promise<Record<string, string>>;
8
+ /** Whether this `.env` came from `sixb env pull`, so overwriting it loses nothing. */
9
+ export declare function isGeneratedEnvFile(path: string): Promise<boolean>;
10
+ /**
11
+ * Writes `.env` readable only by its owner, or not at all. The new file is read back through Bun
12
+ * before it replaces the old one, because Bun's `.env` format can't hold every value: a trailing
13
+ * backslash swallows the closing quote and the next line, and a carriage return becomes a newline.
14
+ */
15
+ export declare function writeEnvFile(path: string, values: Readonly<Record<string, string>>, env: EnvName): Promise<void>;
16
+ //# sourceMappingURL=env-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env-file.d.ts","sourceRoot":"","sources":["../../src/lib/env-file.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAM7C;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CA+B/E;AAED,sFAAsF;AACtF,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGvE;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACxC,GAAG,EAAE,OAAO,GACX,OAAO,CAAC,IAAI,CAAC,CAwBf"}
@@ -0,0 +1,19 @@
1
+ export interface HiddenInput {
2
+ readonly value: string;
3
+ /** The start of a paste that hasn't finished arriving. */
4
+ readonly pending: string;
5
+ /** `refused`: lines arrived that this terminal didn't mark as one paste. */
6
+ readonly outcome?: "done" | "cancelled" | "refused";
7
+ }
8
+ /**
9
+ * Applies what the terminal sent. A terminal that supports it marks a paste, so a multi-line value
10
+ * stays whole. Without the marks, a newline with more behind it is refused: keeping only the first
11
+ * line would store a broken value, and "Set" would still print.
12
+ */
13
+ export declare function readHiddenKeys(input: HiddenInput, text: string): HiddenInput;
14
+ /**
15
+ * Reads a value from a terminal without showing it. It never joins the scrollback or the shell's
16
+ * history.
17
+ */
18
+ export declare function promptHidden(label: string): Promise<string>;
19
+ //# sourceMappingURL=hidden-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hidden-prompt.d.ts","sourceRoot":"","sources":["../../src/lib/hidden-prompt.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,4EAA4E;IAC5E,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAA;CACpD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAgC5E;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAmC3D"}
package/dist/tui/app.d.ts CHANGED
@@ -3,6 +3,7 @@ import type { Connection } from "./connection";
3
3
  import { type LocalRunner } from "./runner";
4
4
  import { type Settings } from "./settings";
5
5
  import type { TuiColors } from "./theme";
6
+ import { type Run } from "./transcript";
6
7
  export interface WorkspaceProps {
7
8
  readonly connection: Connection;
8
9
  readonly runner: LocalRunner;
@@ -16,4 +17,11 @@ export interface WorkspaceProps {
16
17
  }
17
18
  /** Everything once connected: the home screen or a conversation, and the dialogs over them. */
18
19
  export declare function Workspace(props: WorkspaceProps): import("react").ReactNode;
20
+ export declare function activityLabel(runs: readonly Run[], runId: string | null, where: {
21
+ readonly onComputer: boolean;
22
+ readonly mine: boolean;
23
+ readonly here: boolean;
24
+ readonly continueFromWeb: boolean;
25
+ readonly runningHere: boolean;
26
+ }): string;
19
27
  //# sourceMappingURL=app.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/tui/app.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAiC,WAAW,EAAE,MAAM,eAAe,CAAA;AA0B/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAK9C,OAAO,EAAE,KAAK,WAAW,EAA4B,MAAM,UAAU,CAAA;AACrE,OAAO,EASL,KAAK,QAAQ,EAEd,MAAM,YAAY,CAAA;AAEnB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAiBxC,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAA;IAC/B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;IAC5B,mFAAmF;IACnF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAA;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAA;CAC5B;AAED,+FAA+F;AAC/F,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,6BA+T9C"}
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/tui/app.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAiC,WAAW,EAAE,MAAM,eAAe,CAAA;AA4B/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAK9C,OAAO,EAAE,KAAK,WAAW,EAAQ,MAAM,UAAU,CAAA;AACjD,OAAO,EAUL,KAAK,QAAQ,EAEd,MAAM,YAAY,CAAA;AAEnB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAmC,KAAK,GAAG,EAAuB,MAAM,cAAc,CAAA;AAgB7F,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAA;IAC/B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;IAC5B,mFAAmF;IACnF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAA;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAA;CAC5B;AAED,+FAA+F;AAC/F,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,6BA4V9C;AAiqBD,wBAAgB,aAAa,CAC3B,IAAI,EAAE,SAAS,GAAG,EAAE,EACpB,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,KAAK,EAAE;IACL,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAA;IACjC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAA;CAC9B,GACA,MAAM,CAcR"}
@@ -1,3 +1,8 @@
1
1
  /** This computer's id: named once, the first time `sixb` runs here, and kept. */
2
2
  export declare function thisComputerId(): Promise<string>;
3
+ /** This computer: its id, and what its owner calls it, as the web shows where a thread runs. */
4
+ export declare function thisComputer(): Promise<{
5
+ readonly id: string;
6
+ readonly name: string;
7
+ }>;
3
8
  //# sourceMappingURL=computer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"computer.d.ts","sourceRoot":"","sources":["../../src/tui/computer.ts"],"names":[],"mappings":"AAaA,iFAAiF;AACjF,wBAAgB,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAUhD"}
1
+ {"version":3,"file":"computer.d.ts","sourceRoot":"","sources":["../../src/tui/computer.ts"],"names":[],"mappings":"AAeA,iFAAiF;AACjF,wBAAgB,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAUhD;AAED,gGAAgG;AAChG,wBAAsB,YAAY,IAAI,OAAO,CAAC;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAG5F"}
@@ -0,0 +1,13 @@
1
+ import { type ContextUse } from "./format";
2
+ import type { TuiColors } from "./theme";
3
+ /**
4
+ * `/context`: what the conversation uses of its model's window, part by part. Opens centered over
5
+ * the screen like the palettes; esc or enter closes it.
6
+ */
7
+ export declare function ContextPanel({ colors, context, modelName, onClose, }: {
8
+ readonly colors: TuiColors;
9
+ readonly context: ContextUse | null;
10
+ readonly modelName?: string;
11
+ readonly onClose: () => void;
12
+ }): import("react").ReactNode;
13
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/tui/context.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,UAAU,CAAA;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAMxC;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,OAAO,EACP,SAAS,EACT,OAAO,GACR,EAAE;IACD,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,CAAA;IACnC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAC7B,6BAqHA"}
@@ -18,6 +18,91 @@ export interface ToolLine {
18
18
  }
19
19
  /** `outcomes` says how the held calls ended, by approval id: a decided call is no longer held. */
20
20
  export declare function toolLine(part: ToolPart, outcomes?: ReadonlyMap<string, ApprovalOutcome>): ToolLine;
21
+ /** Why a run failed, in a line; a conversation too long for its model says how to go on. */
22
+ export declare function runFailureText(error: {
23
+ readonly code: string;
24
+ readonly message: string;
25
+ }): string;
26
+ /** A part of what a conversation uses, as the API names it. */
27
+ export type ContextPartName = "system" | "instructions" | "memory" | "skills" | "ontology" | "tools" | "summary" | "messages" | "toolResults" | "files";
28
+ /** What the status line and `/context` need of a conversation's context against its limits. */
29
+ export interface ContextUse {
30
+ /** The model the limits are this one's. */
31
+ readonly model?: {
32
+ readonly provider: string;
33
+ readonly modelId: string;
34
+ };
35
+ readonly windowTokens?: number;
36
+ readonly limitTokens: number;
37
+ readonly usedTokens?: number;
38
+ readonly parts?: readonly {
39
+ readonly part: ContextPartName;
40
+ readonly tokens: number;
41
+ }[];
42
+ readonly lastCall?: {
43
+ readonly inputTokens: number;
44
+ readonly cacheReadInputTokens?: number;
45
+ };
46
+ readonly lastCompaction?: {
47
+ readonly createdAt: string;
48
+ readonly estimatedInputTokensBefore: number;
49
+ readonly estimatedInputTokensAfter: number;
50
+ };
51
+ }
52
+ /** How full the context is: amber from 80% of the model's limit, red past it. */
53
+ export type ContextTone = "quiet" | "near" | "over";
54
+ /**
55
+ * The context as the status line shows it, `ctx 38k/100k · 92% cached`, then shorter where room is
56
+ * short: `ctx 38k/100k`, then `ctx 21%`. Undefined before the first answer.
57
+ */
58
+ export declare function contextStatus(context: ContextUse): {
59
+ readonly text: string;
60
+ readonly short: string;
61
+ readonly shortest: string;
62
+ readonly tone: ContextTone;
63
+ } | undefined;
64
+ /**
65
+ * What of the context fits at the end of a status line whose items take `columns` of `room`: it
66
+ * whole, without the cache share, its share alone, or nothing, so the line never wraps.
67
+ */
68
+ export declare function fittedContextText(context: {
69
+ readonly text: string;
70
+ readonly short: string;
71
+ readonly shortest: string;
72
+ }, columns: number, room: number): string | undefined;
73
+ /** One row of `/context`: a part, the room left, or the room kept for the answer. */
74
+ export interface ContextRow {
75
+ readonly label: string;
76
+ readonly tokens: string;
77
+ /** Its share of what the conversation uses; none for the room left or kept. */
78
+ readonly share?: string;
79
+ /** A part's tiles: its share of what the conversation uses, out of the row's. */
80
+ readonly tiles: number;
81
+ readonly kind: "part" | "free" | "reserved";
82
+ }
83
+ /**
84
+ * What `/context` shows: the use against the limit, the window as one bar of `columns.bar` tiles
85
+ * (used, free, kept for the answer), then a row per part with its share in up to `columns.row`
86
+ * tiles, the room left and the room kept for the answer, and when it was last condensed.
87
+ * Undefined before the first answer.
88
+ */
89
+ export declare function contextBreakdown(context: ContextUse, columns: {
90
+ readonly bar: number;
91
+ readonly row: number;
92
+ }, now?: number): {
93
+ readonly headline: string;
94
+ readonly share: string;
95
+ readonly tone: ContextTone;
96
+ /** What a conversation near or past its limit is about to go through. */
97
+ readonly warning?: string;
98
+ readonly bar: {
99
+ readonly used: number;
100
+ readonly free: number;
101
+ readonly reserved: number;
102
+ };
103
+ readonly rows: readonly ContextRow[];
104
+ readonly notes: readonly string[];
105
+ } | undefined;
21
106
  /** `1m 04s`, `12.4s`, `820ms`. */
22
107
  export declare function duration(ms: number): string;
23
108
  /** A path with the home directory as `~`, and its middle elided past `max` characters. */
@@ -1 +1 @@
1
- {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/tui/format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAEpD,KAAK,QAAQ,GAAG,OAAO,CAAC,IAAI,EAAE;IAAE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AAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAUlE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tui/index.tsx"],"names":[],"mappings":"AA0BA,6FAA6F;AAC7F,eAAO,MAAM,OAAO,QAAiC,CAAA;AAErD;;;GAGG;AACH,wBAAsB,MAAM,CAAC,OAAO,EAAE;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B,GAAG,OAAO,CAAC,IAAI,CAAC,CA0EhB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tui/index.tsx"],"names":[],"mappings":"AA8BA,6FAA6F;AAC7F,eAAO,MAAM,OAAO,QAAiC,CAAA;AAErD;;;GAGG;AACH,wBAAsB,MAAM,CAAC,OAAO,EAAE;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B,GAAG,OAAO,CAAC,IAAI,CAAC,CAiFhB"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The markdown of an answer still being written, as it can be drawn without moving: what is on
3
+ * screen only ever grows. Raw markdown that the next characters would turn into something else is
4
+ * closed early or held back:
5
+ *
6
+ * - an emphasis or code span the last line opened is closed, so `**sum` is drawn bold now rather
7
+ * than as `**sum` that loses its two stars when `**` arrives;
8
+ * - a link waits for its label, then shows as that label until its address is complete: a
9
+ * terminal without clickable links draws the address after it, which would grow mid-line;
10
+ * - a last line holding only a block's marker (`##`, `-`, `2`, `>`) waits for its text;
11
+ * - a table waits until it is complete: its columns are sized to its widest cell, so every row
12
+ * could resize the ones above it;
13
+ * - so does a quote, whose text OpenTUI draws raw until it is highlighted.
14
+ *
15
+ * Inside an open code fence everything is code, drawn as it arrives.
16
+ */
17
+ export declare function steadyMarkdown(text: string): string;
18
+ //# sourceMappingURL=markdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/tui/markdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAsBnD"}
@@ -39,6 +39,10 @@ export interface ShownMessage {
39
39
  readonly parts: readonly Part[];
40
40
  /** How the held calls before it ended: not shown, but the calls' own lines say it. */
41
41
  readonly outcomes: readonly ApprovalOutcome[];
42
+ /** Its run condensed the conversation first; `contextFull` when the provider refused it whole. */
43
+ readonly compaction?: {
44
+ readonly contextFull: boolean;
45
+ };
42
46
  readonly createdAt: string;
43
47
  }
44
48
  /** A stored message as shown: what is context for the agent alone stays hidden. */
@@ -51,8 +55,12 @@ export interface LiveRun {
51
55
  readonly parts: readonly Part[];
52
56
  readonly keys: readonly string[];
53
57
  readonly step: number;
58
+ /** How many parts came before the current step: a step asked again drops the ones after. */
59
+ readonly stepStart: number;
54
60
  readonly working: boolean;
55
61
  readonly compacting: boolean;
62
+ /** The condensing follows a request the provider refused as too long: the turn goes on after. */
63
+ readonly contextFull: boolean;
56
64
  /** Set once the run's answer is stored: the transcript then shows it. */
57
65
  readonly finalized: boolean;
58
66
  readonly finished?: {
@@ -1 +1 @@
1
- {"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../src/tui/parts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,gCAAgC,EAEjC,MAAM,cAAc,CAAA;AAKrB,MAAM,MAAM,aAAa,GAAG,gCAAgC,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC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,MAAM,CAAA;IACrB,4FAA4F;IAC5F,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;IAC5B,iGAAiG;IACjG,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAA;IAC7B,yEAAyE;IACzE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CACzE;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAY9C;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,mBAAmB,GAAG,OAAO,CA2B9E"}
@@ -1,4 +1,5 @@
1
1
  import { type GetAgentThreadResponses } from "@sixb/client";
2
+ import type { ConversationAgentRunRecord } from "@sixb/core/storage";
2
3
  import type { Connection } from "./connection";
3
4
  /**
4
5
  * What the agent's commands never read on this computer, whatever the folder: the CLI's own
@@ -7,46 +8,68 @@ import type { Connection } from "./connection";
7
8
  export declare function deniedPaths(): readonly string[];
8
9
  /**
9
10
  * This computer as a runner: it claims its owner's turns from the project and runs them in the
10
- * folder `sixb` was opened in, one at a time per turn, each until it ends or is stopped.
11
+ * folder `sixb` was opened in, one at a time per turn, each until it ends or is stopped. While its
12
+ * session is open, the project knows `sixb` is open here, and the turns sent from elsewhere to the
13
+ * conversations of this folder run here too.
11
14
  */
12
15
  export declare class LocalRunner {
13
16
  private readonly connection;
17
+ /** The folder `sixb` was opened in: its real path, as the project keeps it. */
14
18
  readonly folder: string;
15
19
  private readonly onFailure;
16
20
  private readonly runner;
17
21
  private readonly running;
18
- constructor(connection: Connection, folder: string, onFailure: (error: unknown) => void);
22
+ private readonly elsewhereListeners;
23
+ private session;
24
+ /** The session's last call: its release follows a renewal, which would open it again. */
25
+ private lastCall;
26
+ constructor(connection: Connection,
27
+ /** The folder `sixb` was opened in: its real path, as the project keeps it. */
28
+ folder: string, onFailure: (error: unknown) => void);
29
+ /** Hear each turn sent from elsewhere as it starts to run here. Returns the unsubscribe. */
30
+ onElsewhere(listener: (run: ConversationAgentRunRecord) => void): () => void;
19
31
  /** Whether this computer runs `runId` now. */
20
32
  runs(runId: string): boolean;
21
33
  /**
22
34
  * Claim a queued turn and run it, unless this computer runs it already. Resolves once the turn
23
35
  * ended here: false when it was not this computer's to run, or could not be claimed.
24
36
  */
25
- claim(runId: string): Promise<boolean>;
37
+ claim(runId: string, onClaimed?: (run: ConversationAgentRunRecord) => void): Promise<boolean>;
26
38
  /**
27
- * Claim a conversation's turn when this computer runs it: its owner's, on this computer and in
28
- * this folder, and still queued. A running turn is another sixb's, or one whose sixb closed,
29
- * which the API ends interrupted: claiming it again would run its commands twice.
39
+ * Hold this `sixb`'s session while it is open: the conversations of this folder read as online,
40
+ * and the turns waiting for them are claimed. Idempotent.
41
+ */
42
+ openSession(): void;
43
+ /** Close the session: the conversations of this folder read as offline at once. */
44
+ closeSession(): Promise<void>;
45
+ /**
46
+ * Claim a turn sent from elsewhere when this computer runs its conversation: its owner's, on this
47
+ * computer and in this folder, and still queued, while the session is open. A running turn is
48
+ * another sixb's, or one whose sixb closed, which the API ends interrupted: claiming it again
49
+ * would run its commands twice.
30
50
  */
31
51
  claimIfHere(threadId: string, runId?: string): Promise<void>;
52
+ /** Whether this `sixb` runs `thread`'s turns: its owner's, on this computer, in this folder. */
53
+ runsHere(thread: GetAgentThreadResponses[200], computerId: string): boolean;
32
54
  /** After a stop was asked for: the turn hears it now, not at its next lease renewal. */
33
55
  hearStop(runId: string): void;
34
56
  /** Whether a turn runs here now. */
35
57
  get busy(): boolean;
36
- /** Stop every turn this computer runs: each ends interrupted, its end recorded. */
58
+ /**
59
+ * Stop every turn this computer runs, each ending interrupted with its end recorded, and close
60
+ * the session.
61
+ */
37
62
  stop(): Promise<void>;
63
+ /** A turn this computer already runs joins that run, and is no news. */
64
+ private claimElsewhere;
38
65
  }
39
66
  /** Whether the person signed in owns `thread`: with sign-in off, the system owns what it starts. */
40
67
  export declare function owns(connection: Pick<Connection, "user">, thread: Pick<GetAgentThreadResponses[200], "ownerPrincipal">): boolean;
41
- /**
42
- * Whether this computer runs a computer's thread: the one it runs on. A thread none claimed a turn
43
- * of yet runs on the first that does, the one it started on.
44
- */
45
- export declare function runsOnThisComputer(thread: Pick<GetAgentThreadResponses[200], "computerId">, computerId: string): boolean;
46
68
  /**
47
69
  * A closed terminal, or a kill, ends sixb as quitting does: the turns running here stop, each
48
70
  * ending interrupted with its end recorded, instead of renewing their lease from a process nobody
49
- * sees. Then `exit`, after a bounded wait. Returns the removal of the handlers.
71
+ * sees, and the session closes. Then `exit`, after a bounded wait. Returns the removal of the
72
+ * handlers.
50
73
  */
51
- export declare function stopOnHangUp(runner: () => Pick<LocalRunner, "busy" | "stop"> | null, exit: (signal: "SIGHUP" | "SIGTERM") => void): () => void;
74
+ export declare function stopOnHangUp(runner: () => Pick<LocalRunner, "stop"> | null, exit: (signal: "SIGHUP" | "SIGTERM") => void): () => void;
52
75
  //# sourceMappingURL=runner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/tui/runner.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,uBAAuB,EAA+B,MAAM,cAAc,CAAA;AAIxF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAM9C;;;GAGG;AACH,wBAAgB,WAAW,IAAI,SAAS,MAAM,EAAE,CAE/C;AAED;;;GAGG;AACH,qBAAa,WAAW;IAQpB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAT5B,OAAO,CAAC,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GAAG,OAAO,CAAC,IAAI,CAAC;IAYlE,gGAAgG;IAChG,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC,GAAG,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO;IAS3E,wFAAwF;IACxF,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI7B,oCAAoC;IACpC,IAAI,IAAI,IAAI,OAAO,CAElB;IAED;;;OAGG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAO3B,wEAAwE;IACxE,OAAO,CAAC,cAAc;CAKvB;AAED,oGAAoG;AACpG,wBAAgB,IAAI,CAClB,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,EACpC,MAAM,EAAE,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,EAAE,gBAAgB,CAAC,GAC3D,OAAO,CAKT;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,GAAG,IAAI,EAC9C,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,GAAG,SAAS,KAAK,IAAI,GAC3C,MAAM,IAAI,CAuBZ"}
@@ -15,6 +15,12 @@ export interface Settings {
15
15
  readonly modelId: string;
16
16
  };
17
17
  readonly reasoning?: ReasoningLevel;
18
+ /**
19
+ * Whether your messages from the web, or another device, run in this folder: while it is on,
20
+ * `sixb` tells the project it is open here, and runs the turns sent to its conversations here.
21
+ * Kept per folder, apart from the settings every `sixb` rewrites: see {@link rememberWebMessages}.
22
+ */
23
+ readonly continueFromWeb: boolean;
18
24
  }
19
25
  export declare const DEFAULT_SETTINGS: Settings;
20
26
  export declare const APPROVAL_MODES: readonly {
@@ -26,7 +32,13 @@ export declare function approvalLabel(mode: ApprovalMode): string;
26
32
  /** What this computer is called where the person picks where a conversation runs. */
27
33
  export declare function computerName(): string;
28
34
  export declare function placeLabel(place: Place): string;
29
- export declare function loadSettings(): Promise<Settings>;
35
+ /**
36
+ * Keep the choice for this folder alone. Reads the file first, as another `sixb` may have written
37
+ * it, and refuses one it can't read rather than lose the other folders' choices. Written whole, so
38
+ * no reader ever finds half of it.
39
+ */
40
+ export declare function rememberWebMessages(folder: string, on: boolean): Promise<void>;
41
+ export declare function loadSettings(folder: string): Promise<Settings>;
30
42
  export declare function saveSettings(settings: Settings): Promise<void>;
31
43
  /** The model the next message runs on, as the composer names it. */
32
44
  export declare function modelLabel(models: readonly LanguageModel[], settings: Settings): {