@inhuman.tools/harness-tui 0.0.0-bootstrap.0 → 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 (167) hide show
  1. package/LICENSE.md +7 -0
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +2 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/interpreter/ComputedExecBox.d.ts +12 -0
  7. package/dist/interpreter/ComputedExecBox.d.ts.map +1 -0
  8. package/dist/interpreter/ComputedExecBox.js +88 -0
  9. package/dist/interpreter/ComputedExecBox.js.map +1 -0
  10. package/dist/interpreter/imageCapability.d.ts +9 -0
  11. package/dist/interpreter/imageCapability.d.ts.map +1 -0
  12. package/dist/interpreter/imageCapability.js +49 -0
  13. package/dist/interpreter/imageCapability.js.map +1 -0
  14. package/dist/interpreter/rpcCapability.d.ts +11 -0
  15. package/dist/interpreter/rpcCapability.d.ts.map +1 -0
  16. package/dist/interpreter/rpcCapability.js +91 -0
  17. package/dist/interpreter/rpcCapability.js.map +1 -0
  18. package/dist/interpreter/uiCapability.d.ts +34 -0
  19. package/dist/interpreter/uiCapability.d.ts.map +1 -0
  20. package/dist/interpreter/uiCapability.js +207 -0
  21. package/dist/interpreter/uiCapability.js.map +1 -0
  22. package/dist/schemas/index.d.ts +2 -0
  23. package/dist/schemas/index.d.ts.map +1 -0
  24. package/dist/schemas/index.js +2 -0
  25. package/dist/schemas/index.js.map +1 -0
  26. package/dist/schemas/worker-boot.d.ts +14 -0
  27. package/dist/schemas/worker-boot.d.ts.map +1 -0
  28. package/dist/schemas/worker-boot.js +15 -0
  29. package/dist/schemas/worker-boot.js.map +1 -0
  30. package/dist/tui/ack-prompt.d.ts +53 -0
  31. package/dist/tui/ack-prompt.d.ts.map +1 -0
  32. package/dist/tui/ack-prompt.js +61 -0
  33. package/dist/tui/ack-prompt.js.map +1 -0
  34. package/dist/tui/agents-drawer.d.ts +47 -0
  35. package/dist/tui/agents-drawer.d.ts.map +1 -0
  36. package/dist/tui/agents-drawer.js +314 -0
  37. package/dist/tui/agents-drawer.js.map +1 -0
  38. package/dist/tui/ask-shortcuts.d.ts +59 -0
  39. package/dist/tui/ask-shortcuts.d.ts.map +1 -0
  40. package/dist/tui/ask-shortcuts.js +96 -0
  41. package/dist/tui/ask-shortcuts.js.map +1 -0
  42. package/dist/tui/channel.d.ts +59 -0
  43. package/dist/tui/channel.d.ts.map +1 -0
  44. package/dist/tui/channel.js +27 -0
  45. package/dist/tui/channel.js.map +1 -0
  46. package/dist/tui/host-verbs.d.ts +7 -0
  47. package/dist/tui/host-verbs.d.ts.map +1 -0
  48. package/dist/tui/host-verbs.js +19 -0
  49. package/dist/tui/host-verbs.js.map +1 -0
  50. package/dist/tui/host.d.ts +25 -0
  51. package/dist/tui/host.d.ts.map +1 -0
  52. package/dist/tui/host.js +380 -0
  53. package/dist/tui/host.js.map +1 -0
  54. package/dist/tui/omnibox-seat.d.ts +132 -0
  55. package/dist/tui/omnibox-seat.d.ts.map +1 -0
  56. package/dist/tui/omnibox-seat.js +182 -0
  57. package/dist/tui/omnibox-seat.js.map +1 -0
  58. package/dist/tui/paint-controller.d.ts +170 -0
  59. package/dist/tui/paint-controller.d.ts.map +1 -0
  60. package/dist/tui/paint-controller.js +965 -0
  61. package/dist/tui/paint-controller.js.map +1 -0
  62. package/dist/tui/paint-dom.d.ts +336 -0
  63. package/dist/tui/paint-dom.d.ts.map +1 -0
  64. package/dist/tui/paint-dom.js +709 -0
  65. package/dist/tui/paint-dom.js.map +1 -0
  66. package/dist/tui/paint-source.d.ts +57 -0
  67. package/dist/tui/paint-source.d.ts.map +1 -0
  68. package/dist/tui/paint-source.js +570 -0
  69. package/dist/tui/paint-source.js.map +1 -0
  70. package/dist/tui/paint-transport.d.ts +42 -0
  71. package/dist/tui/paint-transport.d.ts.map +1 -0
  72. package/dist/tui/paint-transport.js +207 -0
  73. package/dist/tui/paint-transport.js.map +1 -0
  74. package/dist/tui/paint-types.d.ts +15 -0
  75. package/dist/tui/paint-types.d.ts.map +1 -0
  76. package/dist/tui/paint-types.js +6 -0
  77. package/dist/tui/paint-types.js.map +1 -0
  78. package/dist/tui/paint-widgets.d.ts +94 -0
  79. package/dist/tui/paint-widgets.d.ts.map +1 -0
  80. package/dist/tui/paint-widgets.js +877 -0
  81. package/dist/tui/paint-widgets.js.map +1 -0
  82. package/dist/tui/parse-args.d.ts +3 -0
  83. package/dist/tui/parse-args.d.ts.map +1 -0
  84. package/dist/tui/parse-args.js +13 -0
  85. package/dist/tui/parse-args.js.map +1 -0
  86. package/dist/tui/permissions-view.d.ts +93 -0
  87. package/dist/tui/permissions-view.d.ts.map +1 -0
  88. package/dist/tui/permissions-view.js +174 -0
  89. package/dist/tui/permissions-view.js.map +1 -0
  90. package/dist/tui/present-visual/approve.d.ts +10 -0
  91. package/dist/tui/present-visual/approve.d.ts.map +1 -0
  92. package/dist/tui/present-visual/approve.js +156 -0
  93. package/dist/tui/present-visual/approve.js.map +1 -0
  94. package/dist/tui/present-visual/dump.d.ts +47 -0
  95. package/dist/tui/present-visual/dump.d.ts.map +1 -0
  96. package/dist/tui/present-visual/dump.js +144 -0
  97. package/dist/tui/present-visual/dump.js.map +1 -0
  98. package/dist/tui/present-visual/journey-teardown.d.ts +3 -0
  99. package/dist/tui/present-visual/journey-teardown.d.ts.map +1 -0
  100. package/dist/tui/present-visual/journey-teardown.js +188 -0
  101. package/dist/tui/present-visual/journey-teardown.js.map +1 -0
  102. package/dist/tui/present-visual/journey.d.ts +15 -0
  103. package/dist/tui/present-visual/journey.d.ts.map +1 -0
  104. package/dist/tui/present-visual/journey.js +88 -0
  105. package/dist/tui/present-visual/journey.js.map +1 -0
  106. package/dist/tui/present-visual/raster.d.ts +3 -0
  107. package/dist/tui/present-visual/raster.d.ts.map +1 -0
  108. package/dist/tui/present-visual/raster.js +75 -0
  109. package/dist/tui/present-visual/raster.js.map +1 -0
  110. package/dist/tui/queue-shortcuts.d.ts +13 -0
  111. package/dist/tui/queue-shortcuts.d.ts.map +1 -0
  112. package/dist/tui/queue-shortcuts.js +23 -0
  113. package/dist/tui/queue-shortcuts.js.map +1 -0
  114. package/dist/tui/read-widen.d.ts +14 -0
  115. package/dist/tui/read-widen.d.ts.map +1 -0
  116. package/dist/tui/read-widen.js +45 -0
  117. package/dist/tui/read-widen.js.map +1 -0
  118. package/dist/tui/rewind-chrome.d.ts +29 -0
  119. package/dist/tui/rewind-chrome.d.ts.map +1 -0
  120. package/dist/tui/rewind-chrome.js +77 -0
  121. package/dist/tui/rewind-chrome.js.map +1 -0
  122. package/dist/tui/rust-present.d.ts +37 -0
  123. package/dist/tui/rust-present.d.ts.map +1 -0
  124. package/dist/tui/rust-present.js +205 -0
  125. package/dist/tui/rust-present.js.map +1 -0
  126. package/dist/tui/spinner-phase.d.ts +24 -0
  127. package/dist/tui/spinner-phase.d.ts.map +1 -0
  128. package/dist/tui/spinner-phase.js +25 -0
  129. package/dist/tui/spinner-phase.js.map +1 -0
  130. package/dist/tui/statusline-path.d.ts +10 -0
  131. package/dist/tui/statusline-path.d.ts.map +1 -0
  132. package/dist/tui/statusline-path.js +42 -0
  133. package/dist/tui/statusline-path.js.map +1 -0
  134. package/dist/tui/sugarcoat-paint.d.ts +14 -0
  135. package/dist/tui/sugarcoat-paint.d.ts.map +1 -0
  136. package/dist/tui/sugarcoat-paint.js +146 -0
  137. package/dist/tui/sugarcoat-paint.js.map +1 -0
  138. package/dist/tui/tape-spans.d.ts +64 -0
  139. package/dist/tui/tape-spans.d.ts.map +1 -0
  140. package/dist/tui/tape-spans.js +93 -0
  141. package/dist/tui/tape-spans.js.map +1 -0
  142. package/dist/tui/tea.d.ts +75 -0
  143. package/dist/tui/tea.d.ts.map +1 -0
  144. package/dist/tui/tea.js +2952 -0
  145. package/dist/tui/tea.js.map +1 -0
  146. package/dist/tui/vt-paint.d.ts +12 -0
  147. package/dist/tui/vt-paint.d.ts.map +1 -0
  148. package/dist/tui/vt-paint.js +123 -0
  149. package/dist/tui/vt-paint.js.map +1 -0
  150. package/dist/tui/wait-phrase.d.ts +31 -0
  151. package/dist/tui/wait-phrase.d.ts.map +1 -0
  152. package/dist/tui/wait-phrase.js +26 -0
  153. package/dist/tui/wait-phrase.js.map +1 -0
  154. package/dist/tui/widget-host.d.ts +34 -0
  155. package/dist/tui/widget-host.d.ts.map +1 -0
  156. package/dist/tui/widget-host.js +80 -0
  157. package/dist/tui/widget-host.js.map +1 -0
  158. package/dist/tui/work-cells.d.ts +47 -0
  159. package/dist/tui/work-cells.d.ts.map +1 -0
  160. package/dist/tui/work-cells.js +606 -0
  161. package/dist/tui/work-cells.js.map +1 -0
  162. package/dist/tui/worker-entry.d.ts +2 -0
  163. package/dist/tui/worker-entry.d.ts.map +1 -0
  164. package/dist/tui/worker-entry.js +98 -0
  165. package/dist/tui/worker-entry.js.map +1 -0
  166. package/package.json +84 -4
  167. package/README.md +0 -1
@@ -0,0 +1,15 @@
1
+ import { z } from "zod";
2
+ export const workerBootSchema = z
3
+ .object({
4
+ kernel: z.string(),
5
+ path: z.string(),
6
+ sessionId: z.string().optional(),
7
+ restore: z.boolean().optional(),
8
+ draft: z.string().optional(),
9
+ cols: z.number().int().positive().optional(),
10
+ rows: z.number().int().positive().optional(),
11
+ connection: z.string().optional(),
12
+ model: z.string().optional(),
13
+ })
14
+ .strict();
15
+ //# sourceMappingURL=worker-boot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-boot.js","sourceRoot":"","sources":["../../src/schemas/worker-boot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC;KAC9B,MAAM,CAAC;IACN,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC/B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC;KACD,MAAM,EAAE,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * The acknowledgement prompt, as data. A flag (`needsAcknowledgement`) makes a call wait for a person
3
+ * even when the license would let it run. Three shapes:
4
+ *
5
+ * - `ack` the call is allowed; only the acknowledgement is asked.
6
+ * - `ask+ack` an ask, also flagged: one prompt, a human yes settles both.
7
+ * - `soft-deny+ack` a soft-deny, also flagged: the soft-deny is never remembered, the ack may be.
8
+ *
9
+ * Pure: no job, no RPC. Tea feeds it the job's stamps and sends what the chords say.
10
+ */
11
+ import type { AckOption, GrantSubject, MatchedAck } from "@inhuman.tools/harness-model";
12
+ export type AckScope = "session" | "project" | "bot" | "global";
13
+ export type AckVariant = "ack" | "ask+ack" | "soft-deny+ack";
14
+ /** What a prompt-created ack lasts in the daemon (`ack/pending` storeOptions[].defaultTtlMs): session ends with the session. */
15
+ export declare const ACK_PROMPT_TTL_DAYS = 7;
16
+ export type AckChoice = {
17
+ readonly scope: AckScope;
18
+ readonly subject: GrantSubject;
19
+ readonly label: string;
20
+ /** "this session" or "7 days". */
21
+ readonly ttl: string;
22
+ /** "<label> · <scope> · <ttl>" (session scope drops the ttl), as the chord shows it. */
23
+ readonly text: string;
24
+ };
25
+ export type AckPromptModel = {
26
+ readonly variant: AckVariant;
27
+ /** "✉ Acknowledge · gmail · send_email" (ack-only) or "Also flagged · ..." (combined). */
28
+ readonly header: string;
29
+ /** Quoted `why` of each flag that gave one. */
30
+ readonly whys: readonly string[];
31
+ readonly copy: string;
32
+ readonly choices: readonly AckChoice[];
33
+ };
34
+ /** Each offered subject at each scope the session can store to. */
35
+ export declare function ackChoices(options: readonly AckOption[], session: {
36
+ readonly bot: boolean;
37
+ }): AckChoice[];
38
+ export declare function ackVariant(input: {
39
+ readonly ackPending: boolean;
40
+ readonly policyResult: "policyApprove" | "ask" | "deny" | "block" | null;
41
+ /** `baseLicenseDetail.decision`: true when the license alone would let the call run. */
42
+ readonly baseDecision: boolean | null;
43
+ }): AckVariant | null;
44
+ export declare function ackPromptModel(input: {
45
+ readonly variant: AckVariant;
46
+ readonly flags: readonly MatchedAck[];
47
+ readonly options: readonly AckOption[];
48
+ readonly bot: boolean;
49
+ }): AckPromptModel;
50
+ /** The text the prompt pins over the box. */
51
+ export declare function ackAnnotation(model: AckPromptModel): string;
52
+ export declare function cycleAck(index: number, size: number, step: 1 | -1): number;
53
+ //# sourceMappingURL=ack-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ack-prompt.d.ts","sourceRoot":"","sources":["../../src/tui/ack-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAExF,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,KAAK,GAAG,QAAQ,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,SAAS,GAAG,eAAe,CAAC;AAE7D,gIAAgI;AAChI,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IACzB,QAAQ,CAAC,OAAO,EA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AgB,aAAa,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAI3D;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAE1E"}
@@ -0,0 +1,61 @@
1
+ /** What a prompt-created ack lasts in the daemon (`ack/pending` storeOptions[].defaultTtlMs): session ends with the session. */
2
+ export const ACK_PROMPT_TTL_DAYS = 7;
3
+ const SCOPE_PHRASE = {
4
+ session: "this session",
5
+ project: "this project",
6
+ bot: "this bot",
7
+ global: "everywhere",
8
+ };
9
+ /** Each offered subject at each scope the session can store to. */
10
+ export function ackChoices(options, session) {
11
+ const scopes = session.bot ? ["session", "project", "bot", "global"] : ["session", "project", "global"];
12
+ const out = [];
13
+ for (const option of options) {
14
+ for (const scope of scopes) {
15
+ const ttl = scope === "session" ? "this session" : `${ACK_PROMPT_TTL_DAYS} days`;
16
+ out.push({
17
+ scope,
18
+ subject: option.subject,
19
+ label: option.label,
20
+ ttl,
21
+ // The session's own life is both scope and expiry: say it once.
22
+ text: scope === "session"
23
+ ? `${option.label} · ${SCOPE_PHRASE[scope]}`
24
+ : `${option.label} · ${SCOPE_PHRASE[scope]} · ${ttl}`,
25
+ });
26
+ }
27
+ }
28
+ return out;
29
+ }
30
+ export function ackVariant(input) {
31
+ if (!input.ackPending || input.policyResult === "block" || input.policyResult === null)
32
+ return null;
33
+ if (input.baseDecision === true)
34
+ return "ack";
35
+ return input.policyResult === "deny" ? "soft-deny+ack" : "ask+ack";
36
+ }
37
+ export function ackPromptModel(input) {
38
+ const labels = [...new Set(input.flags.map((flag) => flag.label))];
39
+ const whys = input.flags.flatMap((flag) => (flag.why === undefined || flag.why === "" ? [] : [flag.why]));
40
+ const what = labels.join(", ");
41
+ const head = input.variant === "ack" ? "✉ Acknowledge" : "✉ Also flagged";
42
+ return {
43
+ variant: input.variant,
44
+ header: what === "" ? head : `${head} · ${what}`,
45
+ whys: [...new Set(whys)].map((why) => `"${why}"`),
46
+ copy: input.variant === "ack"
47
+ ? "Allowed by policy; you asked to confirm this first."
48
+ : "You asked to confirm this call too: your answer settles both.",
49
+ choices: ackChoices(input.options, { bot: input.bot }),
50
+ };
51
+ }
52
+ /** The text the prompt pins over the box. */
53
+ export function ackAnnotation(model) {
54
+ return [model.header, model.whys.length === 0 ? undefined : model.whys.join(" "), model.copy]
55
+ .filter((part) => part !== undefined && part !== "")
56
+ .join(" · ");
57
+ }
58
+ export function cycleAck(index, size, step) {
59
+ return size <= 0 ? 0 : (index + step + size) % size;
60
+ }
61
+ //# sourceMappingURL=ack-prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ack-prompt.js","sourceRoot":"","sources":["../../src/tui/ack-prompt.ts"],"names":[],"mappings":"AAeA,gIAAgI;AAChI,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAsBrC,MAAM,YAAY,GAAuC;IACvD,OAAO,EAAE,cAAc;IACvB,OAAO,EAAE,cAAc;IACvB,GAAG,EAAE,UAAU;IACf,MAAM,EAAE,YAAY;CACrB,CAAC;AAEF,mEAAmE;AACnE,MAAM,UAAU,UAAU,CAAC,OAA6B,EAAE,OAAkC;IAC1F,MAAM,MAAM,GAAe,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IACpH,MAAM,GAAG,GAAgB,EAAE,CAAC;IAC5B,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,MAAM,GAAG,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,mBAAmB,OAAO,CAAC;YACjF,GAAG,CAAC,IAAI,CA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CAAC,GAAG,IAAI,CAAC;AACtD,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Agents drawer paint. Compact meter is a 0/1 composer-adjacent row.
3
+ * Drawer body is the overlay list — not a nested tape.
4
+ */
5
+ import { type Client } from "@inhuman.tools/harness-sdk";
6
+ import { type LayoutNode } from "@inhuman.tools/quickdraw/layout";
7
+ export type AgentsReplicaRow = {
8
+ readonly key: string;
9
+ readonly kind: "call" | "bot" | "session";
10
+ readonly name: string;
11
+ readonly recap: string;
12
+ readonly indent: number;
13
+ readonly prompt: string;
14
+ readonly notifies: readonly string[];
15
+ readonly result: string;
16
+ readonly mark: string;
17
+ readonly model: string;
18
+ readonly lastPrompt: string;
19
+ readonly askLine: string;
20
+ readonly unfinished: string;
21
+ readonly current: boolean;
22
+ readonly sessionId: string;
23
+ };
24
+ export type AgentsReplicaFace = {
25
+ readonly meterLeft: string;
26
+ readonly meterRight: string;
27
+ readonly open: boolean;
28
+ readonly focusKey: string;
29
+ readonly scroll: number;
30
+ readonly rows: readonly AgentsReplicaRow[];
31
+ /** Call key whose sneak-peek modal is open. Empty hides the modal. */
32
+ readonly previewKey: string;
33
+ };
34
+ export type AgentsDrawerChrome = {
35
+ readonly open: boolean;
36
+ readonly focusKey: string | null;
37
+ readonly scroll: number;
38
+ readonly previewKey?: string | null;
39
+ };
40
+ export declare function agentsPaintFace(client: Client, chrome: AgentsDrawerChrome): AgentsReplicaFace | null;
41
+ /** Left of the top overview row. The arrow is the empty-prompt chord, not a name. */
42
+ export declare const AGENTS_OVERVIEW_LABEL = "\u2190: overview";
43
+ export declare function prepareAgentsMeter(calls: string, bots: string, width: number): LayoutNode;
44
+ export declare function prepareAgentsDrawer(face: AgentsReplicaFace, width: number): LayoutNode;
45
+ export declare function agentsPreviewTitle(face: Pick<AgentsReplicaFace, "previewKey" | "rows">): string;
46
+ export declare function prepareAgentsPeek(face: AgentsReplicaFace): LayoutNode | null;
47
+ //# sourceMappingURL=agents-drawer.d.ts.map
@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Q,CAAC,IAAI,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC3C,sEAAsE;IACtE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC,CAAC;AAEF,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,GAAG,iBAAiB,GAAG,IAAI,CAwCpG;AAED,qFAAqF;AACrF,eAAO,MAAM,qBAAqB,qBAAgB,CAAC;AAEnD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAqCzF;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAkBtF;AAID,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,MAAM,CAAC,GAAG,MAAM,CAG/F;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,GAAG,UAAU,GAAG,IAAI,CAoF5E"}
@@ -0,0 +1,314 @@
1
+ /**
2
+ * Agents drawer paint. Compact meter is a 0/1 composer-adjacent row.
3
+ * Drawer body is the overlay list — not a nested tape.
4
+ */
5
+ import { flattenAgentDrawer, projectAgentDrawer, projectAgentMeter, SESSION_FACE_ASK, } from "@inhuman.tools/harness-sdk";
6
+ import { titleAgentSpec } from "@inhuman.tools/harness-sdk/text";
7
+ import { INDICATION_VOID_GLYPH } from "@inhuman.tools/quickdraw/layout";
8
+ import { BgP, FgP } from "@inhuman.tools/quickdraw/lexicon";
9
+ import { AGENTS_PEEK_MAX_HEIGHT, APP_AGENTS_PEEK_KEY, STATUSLINE_PAD_L, STATUSLINE_PAD_R, } from "@inhuman.tools/quickdraw/runtime";
10
+ import { Indication, Text } from "@inhuman.tools/quickdraw/widgets";
11
+ const LOUD = { role: "foreground", prominence: FgP.rising };
12
+ const FOCUS = { role: "foreground", prominence: FgP.primary };
13
+ const DIM = { role: "foreground", prominence: FgP.ghost };
14
+ /** Same hue as the omnibox `always approve` chip. */
15
+ const ASK = { role: "attention", prominence: FgP.secondary };
16
+ export function agentsPaintFace(client, chrome) {
17
+ const drawer = projectAgentDrawer(client);
18
+ const meter = projectAgentMeter(client, drawer);
19
+ const rows = flattenAgentDrawer(drawer).map((row) => {
20
+ const spec = typeof row.spec === "string" ? row.spec : "";
21
+ return {
22
+ key: row.key,
23
+ kind: row.kind,
24
+ name: row.kind === "session" ? spec : displayName(spec),
25
+ recap: row.recap,
26
+ indent: row.indent,
27
+ prompt: row.prompt,
28
+ notifies: row.notifies,
29
+ result: row.result,
30
+ mark: row.mark,
31
+ model: row.model ?? "",
32
+ lastPrompt: row.lastPrompt ?? "",
33
+ askLine: row.askLine ?? "",
34
+ unfinished: row.unfinished ?? "",
35
+ current: row.current === true,
36
+ sessionId: row.sessionId ?? "",
37
+ };
38
+ });
39
+ const previewKey = chrome.previewKey ?? "";
40
+ if (meter == null && !chrome.open && previewKey === "")
41
+ return null;
42
+ return {
43
+ meterLeft: meter == null ? "" : meterLeft(meter.calls),
44
+ meterRight: meter == null
45
+ ? ""
46
+ : meter.bots
47
+ .map(displayName)
48
+ .filter((name) => name !== "")
49
+ .join(", "),
50
+ open: chrome.open,
51
+ focusKey: chrome.focusKey ?? "",
52
+ scroll: chrome.scroll,
53
+ rows,
54
+ previewKey,
55
+ };
56
+ }
57
+ /** Left of the top overview row. The arrow is the empty-prompt chord, not a name. */
58
+ export const AGENTS_OVERVIEW_LABEL = "←: overview";
59
+ export function prepareAgentsMeter(calls, bots, width) {
60
+ const names = [calls, bots].filter((part) => part !== "").join(", ");
61
+ const children = [
62
+ Text(AGENTS_OVERVIEW_LABEL, {
63
+ key: "agents:meter:label",
64
+ whiteSpace: "nowrap",
65
+ style: { role: "foreground", prominence: FgP.secondary },
66
+ }),
67
+ {
68
+ type: "box",
69
+ key: "agents:meter:gap",
70
+ style: { flex: 1 },
71
+ children: [],
72
+ },
73
+ ];
74
+ if (names !== "") {
75
+ children.push(Text(names, {
76
+ key: "agents:meter:names",
77
+ whiteSpace: "nowrap",
78
+ ellipsis: true,
79
+ style: { role: "foreground", prominence: FgP.rising },
80
+ }));
81
+ }
82
+ return {
83
+ type: "flex",
84
+ key: "agents:meter:line",
85
+ style: {
86
+ direction: "row",
87
+ width,
88
+ height: 1,
89
+ gap: 1,
90
+ padding: { l: STATUSLINE_PAD_L, r: STATUSLINE_PAD_R },
91
+ },
92
+ children,
93
+ };
94
+ }
95
+ export function prepareAgentsDrawer(face, width) {
96
+ const children = [];
97
+ const calls = face.rows.filter((row) => row.kind === "call");
98
+ const bots = face.rows.filter((row) => row.kind === "bot");
99
+ const sessions = face.rows.filter((row) => row.kind === "session");
100
+ if (calls.length > 0) {
101
+ children.push(bandHeader("agents:subagents", "Subagents", width));
102
+ for (const row of calls)
103
+ children.push(rowNode(row, face, width));
104
+ }
105
+ if (bots.length > 0) {
106
+ children.push(bandHeader("agents:bots", "Collaborators", width));
107
+ for (const row of bots)
108
+ children.push(rowNode(row, face, width));
109
+ }
110
+ if (sessions.length > 0) {
111
+ children.push(bandHeader("agents:sessions", "Sessions", width));
112
+ for (const row of sessions)
113
+ children.push(rowNode(row, face, width));
114
+ }
115
+ return { type: "box", key: "agents:body", style: { width }, children };
116
+ }
117
+ const PANEL_FILL = { bgRole: "surface", bgProminence: BgP.panel };
118
+ export function agentsPreviewTitle(face) {
119
+ if (face.previewKey === "")
120
+ return "";
121
+ return face.rows.find((row) => row.key === face.previewKey)?.name ?? "";
122
+ }
123
+ export function prepareAgentsPeek(face) {
124
+ if (!face.open || face.focusKey === "" || face.previewKey !== "")
125
+ return null;
126
+ const row = face.rows.find((item) => item.key === face.focusKey);
127
+ if (row === undefined || row.kind === "bot")
128
+ return null;
129
+ if (row.kind === "session" && row.current)
130
+ return null;
131
+ const children = [];
132
+ const push = (node) => {
133
+ children.push(node);
134
+ };
135
+ if (row.recap !== "") {
136
+ push(Text(row.recap, {
137
+ key: `${APP_AGENTS_PEEK_KEY}:status`,
138
+ whiteSpace: "normal",
139
+ ellipsis: true,
140
+ lineClamp: row.kind === "call" ? 3 : 5,
141
+ style: LOUD,
142
+ }));
143
+ }
144
+ if (row.kind === "call" && (row.unfinished === "ask" || row.unfinished === "question") && row.askLine !== "") {
145
+ push(Text(row.askLine, {
146
+ key: `${APP_AGENTS_PEEK_KEY}:ask`,
147
+ whiteSpace: "nowrap",
148
+ ellipsis: true,
149
+ style: ASK,
150
+ }));
151
+ }
152
+ const notify = row.kind === "call" ? (row.notifies.find((line) => line.trim() !== "") ?? "") : "";
153
+ if (notify !== "") {
154
+ push(Text(notify, {
155
+ key: `${APP_AGENTS_PEEK_KEY}:notify`,
156
+ whiteSpace: "normal",
157
+ ellipsis: true,
158
+ lineClamp: 2,
159
+ style: DIM,
160
+ }));
161
+ }
162
+ if (row.kind === "call" && row.result !== "") {
163
+ push(Text(row.result, {
164
+ key: `${APP_AGENTS_PEEK_KEY}:result`,
165
+ whiteSpace: "normal",
166
+ ellipsis: true,
167
+ lineClamp: 3,
168
+ style: LOUD,
169
+ }));
170
+ }
171
+ if (row.model !== "") {
172
+ if (children.length > 0) {
173
+ push({
174
+ type: "box",
175
+ key: `${APP_AGENTS_PEEK_KEY}:gap`,
176
+ style: { height: 1 },
177
+ children: [],
178
+ });
179
+ }
180
+ push(Text(row.model, {
181
+ key: `${APP_AGENTS_PEEK_KEY}:model`,
182
+ whiteSpace: "nowrap",
183
+ ellipsis: true,
184
+ style: DIM,
185
+ }));
186
+ }
187
+ if (children.length === 0)
188
+ return null;
189
+ return {
190
+ type: "box",
191
+ key: APP_AGENTS_PEEK_KEY,
192
+ userSelect: "none",
193
+ style: {
194
+ padding: 1,
195
+ maxHeight: AGENTS_PEEK_MAX_HEIGHT,
196
+ overflow: "hidden",
197
+ background: PANEL_FILL,
198
+ },
199
+ children,
200
+ };
201
+ }
202
+ function meterLeft(groups) {
203
+ if (groups.length === 0)
204
+ return "";
205
+ return groups
206
+ .map((group) => {
207
+ const name = displayName(group.spec);
208
+ return group.count > 1 ? `${String(group.count)}× ${name}` : name;
209
+ })
210
+ .join(", ");
211
+ }
212
+ function displayName(spec) {
213
+ const titled = titleAgentSpec(spec);
214
+ return titled === "" ? spec : titled;
215
+ }
216
+ function bandHeader(key, label, _width) {
217
+ return Text(label, {
218
+ key,
219
+ whiteSpace: "nowrap",
220
+ style: DIM,
221
+ });
222
+ }
223
+ function rowNode(row, face, width) {
224
+ const focused = row.key === face.focusKey;
225
+ const indent = row.indent > 0 ? Math.min(row.indent, 6) : 0;
226
+ const pad = indent * 2;
227
+ const allocW = Math.max(8, width - pad);
228
+ const body = row.kind === "bot" ? [identityLine(row, focused, allocW)] : [sessionLine(row, focused, allocW)];
229
+ const block = {
230
+ type: "box",
231
+ key: row.key,
232
+ ...(row.kind === "session" || row.kind === "call"
233
+ ? { intent: "activate", userSelect: "none" }
234
+ : {}),
235
+ style: { width: allocW },
236
+ children: [
237
+ Indication({
238
+ key: `${row.key}:id`,
239
+ gutter: { kind: "top", glyph: INDICATION_VOID_GLYPH },
240
+ children: body,
241
+ }),
242
+ ],
243
+ };
244
+ if (indent === 0)
245
+ return block;
246
+ return {
247
+ type: "box",
248
+ key: `${row.key}:indent`,
249
+ style: { padding: { l: pad }, width },
250
+ children: [block],
251
+ };
252
+ }
253
+ function sessionLine(row, focused, width) {
254
+ const children = [
255
+ {
256
+ type: "box",
257
+ key: `${row.key}:title`,
258
+ style: { flex: 1, height: 1 },
259
+ children: [
260
+ Text(row.name, {
261
+ key: `${row.key}:name`,
262
+ whiteSpace: "nowrap",
263
+ ellipsis: true,
264
+ style: focused ? FOCUS : LOUD,
265
+ }),
266
+ ],
267
+ },
268
+ ];
269
+ if (row.mark !== "") {
270
+ children.push(Text(row.mark, {
271
+ key: `${row.key}:mark`,
272
+ whiteSpace: "nowrap",
273
+ style: row.mark === SESSION_FACE_ASK ? ASK : DIM,
274
+ }));
275
+ }
276
+ return {
277
+ type: "box",
278
+ key: `${row.key}:id-line`,
279
+ style: { width, height: 1 },
280
+ children: [
281
+ {
282
+ type: "flex",
283
+ key: `${row.key}:id-row`,
284
+ style: { direction: "row", height: 1, gap: 1 },
285
+ children,
286
+ },
287
+ ],
288
+ };
289
+ }
290
+ function identityLine(row, focused, width) {
291
+ const name = Text(row.recap === "" ? row.name : `${row.name} `, {
292
+ key: `${row.key}:name`,
293
+ whiteSpace: "nowrap",
294
+ style: focused ? FOCUS : LOUD,
295
+ });
296
+ if (row.recap === "")
297
+ return name;
298
+ return {
299
+ type: "flex",
300
+ key: `${row.key}:id-line`,
301
+ style: { direction: "row", width },
302
+ children: [
303
+ name,
304
+ Text(row.recap, {
305
+ key: `${row.key}:recap`,
306
+ whiteSpace: "nowrap",
307
+ ellipsis: true,
308
+ lineClamp: 1,
309
+ style: DIM,
310
+ }),
311
+ ],
312
+ };
313
+ }
314
+ //# sourceMappingURL=agents-drawer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents-drawer.js","sourceRoot":"","sources":["../../src/tui/agents-drawer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,GAEjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAmB,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EACL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O,IAAI,CAAC;IAClC,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,GAAG,GAAG,CAAC,GAAG,UAAU;QACzB,KAAK,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE;QAClC,QAAQ,EAAE;YACR,IAAI;YACJ,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE;gBACd,GAAG,EAAE,GAAG,GAAG,CAAC,GAAG,QAAQ;gBACvB,UAAU,EAAE,QAAQ;gBACpB,QAAQ,EAAE,IAAI;gBACd,SAAS,EAAE,CAAC;gBACZ,KAAK,EAAE,GAAG;aACX,CAAC;SACH;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Ask-cover shortcut chrome. Persist chords store `Ctrl` (`config.json`
3
+ * `superKey`; `cmd` stores `Cmd`). Paint writes ⏎ / ⌃ / ⌘. Remember chords
4
+ * only where the daemon offers a family to remember (an ask, never a soft-deny
5
+ * or a block); "Treat <folder> as part of this session" on a suggested
6
+ * extra-root read parent; deny-persist chords on a hidden MCP tool name.
7
+ * Comment cover owns modifier Esc and does not remember or widen. Each binding
8
+ * bears the named event Tea fires on a match.
9
+ */
10
+ import { type SuperKey } from "@inhuman.tools/harness-model";
11
+ import type { ChromeHotkey } from "@inhuman.tools/quickdraw/layout";
12
+ export declare const HOTKEY_EVENT: {
13
+ readonly allow: "allow";
14
+ readonly deny: "deny";
15
+ readonly allowSession: "allow-session";
16
+ readonly allowAlways: "allow-always";
17
+ readonly allowWiden: "allow-widen";
18
+ readonly denySession: "deny-session";
19
+ readonly denyAlways: "deny-always";
20
+ readonly ackRemember: "ack-remember";
21
+ readonly ackNext: "ack-next";
22
+ readonly ackPrev: "ack-prev";
23
+ readonly retry: "retry";
24
+ readonly queueMessage: "queue-message";
25
+ readonly steerFirst: "steer-first";
26
+ readonly continue: "continue";
27
+ readonly clear: "clear";
28
+ readonly cancelTurn: "cancel-turn";
29
+ };
30
+ export type HotkeyEvent = (typeof HOTKEY_EVENT)[keyof typeof HOTKEY_EVENT];
31
+ export declare function superChord(rest: string, superKey?: SuperKey): string;
32
+ export declare function isPersistMod(event: {
33
+ readonly ctrl?: boolean;
34
+ readonly meta?: boolean;
35
+ }, superKey?: SuperKey): boolean;
36
+ export declare function askCoverShortcuts(input: {
37
+ readonly comment: boolean;
38
+ /**
39
+ * What a human yes to an ask can be remembered as (the daemon's offer for this exact call), in the
40
+ * words the button shows. Empty for a soft-deny: it is licensed every time and nothing is remembered.
41
+ */
42
+ readonly remember?: string;
43
+ readonly persistDeny?: boolean;
44
+ /** Label of a suggested folder: "Treat <folder> as part of this session?" */
45
+ readonly widen?: string;
46
+ /**
47
+ * The call is also flagged `needsAcknowledgement`. `ack`: the call is allowed and only the flag is asked
48
+ * (Enter acknowledges, Esc refuses). `ask+ack`: the ask's yes settles the flag; a grant remember also
49
+ * remembers it. `soft-deny+ack`: nothing of the soft-deny is remembered, the flag may be.
50
+ * `choice` is the selected remember option as the chord shows it; `cycle` says there is more than one.
51
+ */
52
+ readonly ack?: {
53
+ readonly variant: "ack" | "ask+ack" | "soft-deny+ack";
54
+ readonly choice?: string;
55
+ readonly cycle?: boolean;
56
+ };
57
+ readonly superKey?: SuperKey;
58
+ }): ChromeHotkey[];
59
+ //# sourceMappingURL=ask-shortcuts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ask-shortcuts.d.ts","sourceRoot":"","sources":["../../src/tui/ask-shortcuts.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAoC,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC/F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;CAiBf,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE3E,wBAAgB,UAAU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