@cmodjs/core 8.8.3 → 8.9.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.
@@ -1 +1 @@
1
- {"version":3,"file":"sessions.d.ts","sourceRoot":"","sources":["../src/runtime/sessions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAC5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAM5D,OAAO,EAAE,UAAU,EAAE,MAAM,gDAAgD,CAAA;AAC3E,OAAO,EAAsB,KAAK,IAAI,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,EAA+D,KAAK,aAAa,EAAE,KAAK,WAAW,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAG5K,OAAO,EAAuD,KAAK,WAAW,EAA8G,KAAK,WAAW,EAA8D,KAAK,YAAY,EAAuC,KAAK,QAAQ,EAAkB,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,KAAK,EAAE,MAAM,uBAAuB,CAAA;AACjb,OAAO,EAAsC,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAC1F,OAAO,EAAkF,KAAK,KAAK,EAAE,MAAM,aAAa,CAAA;AACxH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAIzC,OAAO,EAA+B,KAAK,UAAU,EAAE,MAAM,YAAY,CAAA;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,MAAM,MAAM,QAAQ,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC;IAAC,QAAQ,CA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AAM,EAAE,OAAO,CAAC,CAAqH,CAAA;AAE/L,eAAO,MAAM,OAAO,WAAY,UAAU,KAAG,UAAmG,CAAA;AAqChJ,KAAK,iBAAiB,GAAG,OAAO,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAA;AAmChE,wBAAsB,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAc1H;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,OAAO,GAAG,UAAU,CAGrF;AAkBD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE,YAAY,GAAG;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,UAAU,CAI7L"}
@@ -42,7 +42,7 @@ export function pickedColor(args) {
42
42
  const picked = args.trim().toLowerCase();
43
43
  return resetColors.includes(picked) ? undefined : picked;
44
44
  }
45
- const acts = ['send', 'startTask', 'fork', 'clone', 'startBackgroundTask', 'callTool', 'usage', 'surfaces', 'abort', 'end', 'visit', 'delete'];
45
+ const acts = ['send', 'startTask', 'fork', 'clone', 'startBackgroundTask', 'callTool', 'usage', 'surfaces', 'abort', 'end', 'visit', 'delete', 'compact', 'sendTo'];
46
46
  export const isAct = (action) => acts.includes(action);
47
47
  export async function usageOf(claude) {
48
48
  const [model, usage] = await Promise.all([claude.session.model(), claude.session.usage()]);
package/runtime/web.js CHANGED
@@ -156,7 +156,18 @@ const elements = {
156
156
  },
157
157
  Progress: (props) => {
158
158
  const label = typeof props['label'] === 'string' ? props['label'] : undefined;
159
- return `<progress class="progress" max="100" value="${numberOr(props['value'], 0)}"${attribute('aria-label', label)}${attribute('style', `width:${across(numberOr(props['width'], 24))}`)}></progress>`;
159
+ const value = numberOr(props['value'], 0);
160
+ const shared = `${attribute('aria-label', label)}${attribute('style', `width:${across(numberOr(props['width'], 24))}`)}`;
161
+ const buffer = Math.min(numberOr(props['buffer'], value), 100) - value;
162
+ if (!Array.isArray(props['sections']) && buffer <= 0)
163
+ return `<progress class="progress" max="100" value="${value}"${shared}></progress>`;
164
+ const sections = Array.isArray(props['sections']) ? props['sections'].filter((each) => typeof each === 'object' && each !== null) : [{ value }];
165
+ const section = (each) => {
166
+ const color = colorOf(each['color']);
167
+ return `<span class="progress-section${each['tone'] === undefined ? '' : ` tone-${toneOf(each['tone'])}`}" style="width:${numberOr(each['value'], 0)}%${color === undefined ? '' : `;background:${color}`}"></span>`;
168
+ };
169
+ const buffered = buffer > 0 ? `<span class="progress-buffer" style="width:${buffer}%"></span>` : '';
170
+ return `<div class="progress-bar" role="meter" aria-valuemin="0" aria-valuemax="100" aria-valuenow="${value}"${shared}>${sections.map(section).join('')}${buffered}</div>`;
160
171
  },
161
172
  List: (props, drawing) => `<ul class="list"${attribute('aria-label', textOr(props['label'], ''))}>${nodeHtml(props['children'], drawing)}</ul>`,
162
173
  ListItem: (props, drawing) => {
@@ -170,17 +170,17 @@ export function serveWidgets({ claude, router, store, report, turnClosedBy, part
170
170
  };
171
171
  const isHidden = (key) => layout.hidden.includes(key);
172
172
  const shown = (keys) => keys.filter((key) => !isHidden(key));
173
- const rowsNow = (area, at, turn) => layout.areas[area].flatMap((row) => {
173
+ const rowsNow = (area, at, turn, isBesideMode = false) => layout.areas[area].flatMap((row) => {
174
174
  const side = (keys) => shown(keys).map((key) => elementFor(key, area, at, turn)).filter((each) => each !== undefined);
175
175
  const left = side(row.left);
176
176
  const right = side(row.right);
177
177
  const group = (keys, children) => Box({ flexShrink: shown(keys).some((key) => widgetOf(key)?.place?.size === 'fill') ? 1 : 0, minWidth: 0, columnGap: 2, children });
178
- return left.length + right.length === 0 ? [] : [Box({ justifyContent: 'space-between', width: at.columns, columnGap: 2, children: [group(row.left, left), group(row.right, right)] })];
178
+ return left.length + right.length === 0 ? [] : [Box({ ...(isBesideMode ? {} : { justifyContent: 'space-between', width: at.columns }), columnGap: 2, children: [group(row.left, left), group(row.right, right)] })];
179
179
  });
180
180
  const keysIn = (area) => layout.areas[area].flatMap((row) => shown([...row.left, ...row.right]));
181
- const draw = async (area, table, at, turn) => {
181
+ const draw = async (area, table, at, turn, isBesideMode = false) => {
182
182
  await Promise.all(keysIn(area).map((key) => fill(key, area, at, turn)));
183
- return drawWith(table, () => rowsNow(area, at, turn), markdownIn(table, at));
183
+ return drawWith(table, () => rowsNow(area, at, turn, isBesideMode), markdownIn(table, at));
184
184
  };
185
185
  const rows = (area, at) => {
186
186
  const started = keysIn(area).flatMap((key) => fill(key, area, at, undefined) ?? []);
@@ -196,8 +196,8 @@ export function serveWidgets({ claude, router, store, report, turnClosedBy, part
196
196
  if (e.component === 'AbovePrompt')
197
197
  return e.props.hasSurvey ? next(e) : below(table, await next(e), await draw(AbovePrompt, table, styledAt(e, e.props.bodyColumns)));
198
198
  if (e.component === 'PromptHint') {
199
- const added = await draw(BelowPrompt, table, styledAt(e, viewportColumns(e) - promptIndent));
200
- return isHidden(claudeHint) ? column(table, added) : below(table, await next(e), added);
199
+ const at = styledAt(e, viewportColumns(e) - promptIndent);
200
+ return isHidden(claudeHint) ? column(table, await draw(BelowPrompt, table, at, undefined, true)) : below(table, await next(e), await draw(BelowPrompt, table, at));
201
201
  }
202
202
  if (e.component === 'SessionMode')
203
203
  return isHidden(claudeModes) ? column(table, []) : next(e);
package/src/records.ts CHANGED
@@ -381,14 +381,14 @@ export function preferencesPath(store: string): string {
381
381
  return `${store}/preferences.json`
382
382
  }
383
383
 
384
- export type Preferences = { readonly showsInstalledModErrors: boolean; readonly servesWebUi: boolean; readonly servesTailnet: boolean }
384
+ export type Preferences = { readonly showsInstalledModErrors: boolean; readonly servesWebUi: boolean; readonly servesTailnet: boolean; readonly roundsBarEnds: boolean }
385
385
 
386
- const preferenceKeys = ['showsInstalledModErrors', 'servesWebUi', 'servesTailnet'] as const satisfies readonly (keyof Preferences)[]
386
+ const preferenceKeys = ['showsInstalledModErrors', 'servesWebUi', 'servesTailnet', 'roundsBarEnds'] as const satisfies readonly (keyof Preferences)[]
387
387
 
388
388
  export function parsePreferences(value: unknown, path: string): Preferences {
389
389
  if (value !== undefined && (!isObject(value) || preferenceKeys.some((key) => value[key] !== undefined && typeof value[key] !== 'boolean'))) throw new Error(`${path} is not a map of cmod's preferences to true or false. Delete it, and cmod uses its defaults.`)
390
390
  const saved = isObject(value) ? value : {}
391
- return { showsInstalledModErrors: saved['showsInstalledModErrors'] === true, servesWebUi: saved['servesWebUi'] === true, servesTailnet: saved['servesTailnet'] !== false }
391
+ return { showsInstalledModErrors: saved['showsInstalledModErrors'] === true, servesWebUi: saved['servesWebUi'] === true, servesTailnet: saved['servesTailnet'] !== false, roundsBarEnds: saved['roundsBarEnds'] === true }
392
392
  }
393
393
 
394
394
  export function tailnetFolder(store: string, mod: string): string {
@@ -422,6 +422,14 @@ export function parseWebUi(value: unknown, path: string): WebUi | undefined {
422
422
 
423
423
  export type BrowserEnv = { readonly os: string; readonly browser?: string | undefined; readonly sshConnection?: string | undefined; readonly display?: string | undefined; readonly waylandDisplay?: string | undefined }
424
424
 
425
+ export type TerminalVariables = { readonly program?: string | undefined; readonly ghostty?: string | undefined; readonly wezterm?: string | undefined }
426
+
427
+ const nerdFontTerminals: readonly string[] = ['herdr', 'ghostty', 'WezTerm']
428
+
429
+ export function isNerdFontTerminal({ program, ghostty, wezterm }: TerminalVariables): boolean {
430
+ return nerdFontTerminals.includes(program ?? '') || (ghostty ?? '') !== '' || (wezterm ?? '') !== ''
431
+ }
432
+
425
433
  export function browserCommand(env: BrowserEnv, href: string): readonly string[] | undefined {
426
434
  if (env.browser === 'true') return undefined
427
435
  if (env.browser) return [env.browser, href]
@@ -499,7 +507,7 @@ function readHotkeys(hotkeys: unknown): Steps {
499
507
  return { hotkeys: checkHotkeys('package.json "cmod"', hotkeys as Record<string, HotkeyInit>) }
500
508
  }
501
509
 
502
- export const coreVersion = '8.8.3'
510
+ export const coreVersion = '8.9.0'
503
511
 
504
512
  export const oldestCmodVersion = '8.0.0'
505
513
 
package/src/register.ts CHANGED
@@ -114,6 +114,7 @@ async function startMod($: EngineInterface, eventInput: Frozen<Args<'session.sta
114
114
  sshConnection: () => $.env.get('SSH_CONNECTION'),
115
115
  display: () => $.env.get('DISPLAY'),
116
116
  waylandDisplay: () => $.env.get('WAYLAND_DISPLAY'),
117
+ terminal: async () => ({ program: await $.env.get('TERM_PROGRAM'), ghostty: await $.env.get('GHOSTTY_RESOURCES_DIR'), wezterm: await $.env.get('WEZTERM_EXECUTABLE') }),
117
118
  },
118
119
  device: { read: () => readDevice(claude) },
119
120
  cmod: { call: (input) => $.cmod.call(input) },
@@ -45,6 +45,7 @@ import type {
45
45
  UiScrollResult,
46
46
  } from 'claude-code'
47
47
  import type { Device } from '../session/context/turn/device.js'
48
+ import type { TerminalVariables } from '../records.js'
48
49
 
49
50
  export const heldInput = 'the session was stopped and nobody has sent input since'
50
51
 
@@ -121,6 +122,7 @@ export type Claude = {
121
122
  sshConnection(): Promise<string | undefined>
122
123
  display(): Promise<string | undefined>
123
124
  waylandDisplay(): Promise<string | undefined>
125
+ terminal(): Promise<TerminalVariables>
124
126
  }
125
127
  readonly device: { read(): Promise<Device> }
126
128
  readonly cmod: { call(input: Args<'cmod.call'>): Promise<unknown> }
@@ -46,6 +46,8 @@ const questionTool = 'AskUserQuestion'
46
46
 
47
47
  const permissionPrompt = 'permission prompt'
48
48
 
49
+ const carryOn = 'The conversation was compacted. Carry on with the work from before the compaction.'
50
+
49
51
  export type Conversations = {
50
52
  answer(e: Frozen<Args<'cmod.call'>> & { readonly caller?: string }): Promise<EventResult<'cmod.call'> | undefined>
51
53
  moved(): void
@@ -114,6 +116,7 @@ export function serveConversations({
114
116
  const waitingRows = new Map<string, Row[]>()
115
117
  const engineTurns = new Map<string, string>()
116
118
  let endsAfterTurn = false
119
+ let compactsAfterTurn: { readonly keep?: string } | undefined
117
120
  let isWorking = false
118
121
  let waitingFor: HeldStatus['waitingFor']
119
122
  let waitingOn: string | undefined
@@ -184,8 +187,20 @@ export function serveConversations({
184
187
  engineTurns.delete(task ?? '')
185
188
  if (!isInterrupted) dispatch(conversation.endTurn(new Date().toISOString(), ending, task))
186
189
  if (task === undefined && endsAfterTurn) claude.clock.after(0, () => void exitNow())
190
+ if (task === undefined && compactsAfterTurn !== undefined && !isInterrupted) claude.clock.after(1, () => void compactNow())
187
191
  return below
188
192
  }
193
+ const compactNow = async () => {
194
+ const asked = compactsAfterTurn
195
+ compactsAfterTurn = undefined
196
+ if (asked === undefined) return
197
+ try {
198
+ await claude.command.run({ command: 'compact', ...(asked.keep === undefined ? {} : { args: asked.keep }) })
199
+ await claude.prompt.submit({ text: carryOn })
200
+ } catch (error) {
201
+ report('compact', 'Could not compact the conversation', error)
202
+ }
203
+ }
189
204
  router.add('classic.Stop', async (e, next) => endTurn({ reason: 'answer', ...(e.last_assistant_message === undefined ? {} : { answer: e.last_assistant_message }) })(await next(e), next.signal.aborted))
190
205
  router.add('classic.StopFailure', async (e, next) => {
191
206
  const text = e.error_details ?? e.last_assistant_message ?? String(e.error)
@@ -213,7 +228,10 @@ export function serveConversations({
213
228
 
214
229
  const liveTasksOver = async (saved: readonly TaskData[], request: Readonly<Record<string, unknown>>): Promise<TaskData[]> => {
215
230
  await starting
216
- const kept = liveTasks().filter((task) => request['all'] === true || task.parent === request['task'])
231
+ const closed = new Map(saved.flatMap((task) => (task.closedAt === undefined ? [] : [[task.id, task] as const])))
232
+ const kept = liveTasks()
233
+ .filter((task) => request['all'] === true || task.parent === request['task'])
234
+ .map((task) => (task.closedAt === undefined ? (closed.get(task.id) ?? task) : task))
217
235
  const running = await claude.agent.list().catch((error: unknown) => (claude.ui.warn('tasks:status', `cmod: the tasks show no status, because Claude Code listed no agents: ${messageOf(error)}`), []))
218
236
  const background = saved.flatMap(({ id, status, isBackground }) => (status === undefined || isBackground !== true ? [] : [{ id, status }]))
219
237
  return tasksWithAgents(merged(saved, kept, (task) => task.id), [...running, ...background])
@@ -330,7 +348,10 @@ export function serveConversations({
330
348
  throw last instanceof Error ? last : new Error(String(last))
331
349
  }
332
350
 
333
- const read = <Value>(id: string, part: string, options: Request = {}): Promise<Value> => firstHolding((client) => client.request<Value>(`${sessionsInterface}.read`, [id, part, { project: project(), ...options }]))
351
+ const read = <Value>(id: string, part: string, options: Request = {}): Promise<Value> =>
352
+ firstHolding((client) => client.request<Value>(`${sessionsInterface}.read`, [id, part, { project: project(), ...options }])).catch((error: unknown) => {
353
+ throw isNotHeld(error) ? new Error(`no session ${id} on any of your devices.`) : error
354
+ })
334
355
 
335
356
  const listAll = async (scope: Request): Promise<SessionData[]> => {
336
357
  const lists = await Promise.all((await providers()).map((client) => client.request<SessionData[]>(`${sessionsInterface}.sessions`, [scope]).catch((error: unknown) => (client === local.client ? Promise.reject(error) : (report('store', 'Lists no sessions of another sessions provider', error), [])))))
@@ -633,6 +654,12 @@ export function serveConversations({
633
654
  start(e.session_id, e.source, e.agent_type)
634
655
  return next(e)
635
656
  })
657
+ void (async () => {
658
+ const id = await claude.session.id()
659
+ if (id === '') return
660
+ const isRunning = await claude.fs.exists((await claude.session.info()).transcriptPath)
661
+ if (session === '' && isRunning) start(id, 'resume', undefined)
662
+ })().catch((error: unknown) => claude.ui.warn('serve:hold', `cmod: other sessions reach this one after its next prompt: ${messageOf(error)}`))
636
663
  router.add('classic.SessionEnd', async (e, next) => {
637
664
  if (subscribed.size > 0 || watched.size > 0 || served.listened().length > 0) await saveListeners(true).catch((error: unknown) => report('follow', 'Left its listeners registered', error))
638
665
  return next(e)
@@ -724,6 +751,17 @@ export function serveConversations({
724
751
  else claude.clock.after(0, () => void exitNow())
725
752
  return null
726
753
  }
754
+ if (action === 'compact') {
755
+ const { keep } = (isObject(input) ? input : {}) as { readonly keep?: string }
756
+ compactsAfterTurn = typeof keep === 'string' && keep.trim() !== '' ? { keep } : {}
757
+ if (!engineTurns.has('')) claude.clock.after(0, () => void compactNow())
758
+ return null
759
+ }
760
+ if (action === 'sendTo') {
761
+ const { to, type, text } = input as Pick<SessionSend, 'type' | 'text'> & { readonly to: string }
762
+ if (to === session) throw new Error(`session ${session} cannot send as itself to itself.`)
763
+ return actElsewhere(caller, to, 'send', { type, text, as: Session } satisfies SessionSend, undefined)
764
+ }
727
765
  if (action === 'send') {
728
766
  const { type, text, as } = input as SessionSend
729
767
  if (as === Session) throw new Error(`session ${session} cannot send as itself to itself.`)
@@ -896,9 +934,10 @@ export function serveConversations({
896
934
  },
897
935
  async [conversationMethods.search](request) {
898
936
  const record = fields(request, ['session', 'task', 'turn', 'context', 'isAgent'])
899
- const options = { project: project(), ...fields(request, ['since', 'everyProject', 'running', 'before']), record }
937
+ const options = { project: project(), ...fields(request, ['since', 'everyProject', 'running', 'before', 'limit']), record }
900
938
  const pages = await Promise.all((await providers()).map((client) => client.request<Message[]>(`${sessionsInterface}.search`, [String(request['text']), options]).catch((error: unknown) => (client === local.client ? Promise.reject(error) : []))))
901
- return pages.flat().sort((first, second) => second.at.localeCompare(first.at))
939
+ const found = pages.flat().sort((first, second) => second.at.localeCompare(first.at))
940
+ return typeof request['limit'] === 'number' ? found.slice(0, request['limit']) : found
902
941
  },
903
942
  async [conversationMethods.messages](request) {
904
943
  const id = String(request['session'])
@@ -335,7 +335,7 @@ export type SessionRouting = {
335
335
  close(): void
336
336
  }
337
337
 
338
- export const sessionActions = ['send', 'abort', 'end', 'fork', 'startTask', 'callTool', 'usage', 'surfaces', 'visit', 'delete'] as const
338
+ export const sessionActions = ['send', 'abort', 'end', 'fork', 'startTask', 'callTool', 'usage', 'surfaces', 'visit', 'delete', 'compact', 'startBackgroundTask', 'sendTo'] as const
339
339
 
340
340
  export const showLeaseMs = 16_000
341
341
 
@@ -386,8 +386,24 @@ export function routeSessions({
386
386
  return null
387
387
  }
388
388
  const holder = holderOf(session)
389
- if (holder === undefined) return computer.unheld(session, action, input, context, holding)
390
- return holder.connection.request(sessionActs.act, { action, input, ...context })
389
+ if (holder !== undefined) return holder.connection.request(sessionActs.act, { action, input, ...context })
390
+ const runner = action === 'startTask' ? undefined : await runnerElsewhere(session)
391
+ if (runner !== undefined) throw new RpcError(rpcCodes.notHeld, `Session ${session} runs on ${runner}, so this computer takes no ${action} for it.`)
392
+ return computer.unheld(session, action, input, context, holding)
393
+ }
394
+
395
+ const runnerElsewhere = async (session: string): Promise<string | undefined> => {
396
+ for (const other of await providers.list(sessionsInterface)) {
397
+ const ask = (method: string, args: readonly unknown[]) => providers.call({ interface: sessionsInterface, method, args, ...other })
398
+ const isAnswer = (error: unknown, code: number) => error instanceof RpcError && error.code === code
399
+ const found = await ask('session', [session]).catch(async (error: unknown) => {
400
+ if (isAnswer(error, rpcCodes.notHeld)) return undefined
401
+ if (isAnswer(error, rpcCodes.methodNotFound)) return ((await ask('sessions', [{ everyProject: true, running: true }])) as readonly SessionData[]).find((each) => each.id === session)
402
+ throw new Error(`cmod could not ask ${other.device?.name ?? other.mod} whether it runs session ${session}, so it starts no copy of it here: ${messageOf(error)}`)
403
+ })
404
+ if (isObject(found) && found['isRunning'] === true) return other.device?.name ?? other.mod
405
+ }
406
+ return undefined
391
407
  }
392
408
 
393
409
  const withStatus = (listed: SessionData, told: HeldStatus | undefined): SessionData => {
@@ -3,7 +3,7 @@ import type { Step } from '../installer.js'
3
3
 
4
4
  import type { Imports, Mod, ModDefinition, Reservation, SettingsFile, SettingsFileChange, Subscription, Timer as ModTimer } from '../mod.js'
5
5
  import type { Options, OptionValues } from '../options.js'
6
- import { cacheFolder, dataFolder, finishStepsMethod, isAtLeast, isProgramNewer, oldestCmodVersion, pendingStepsMethod, parseEvent, programModifiedMs, readRecord, readSteps, recordPath, scriptsSha256, serviceFolder, type ReadFile, type RunnerEvent, type Steps } from '../records.js'
6
+ import { cacheFolder, dataFolder, finishStepsMethod, isAtLeast, isNerdFontTerminal, parsePreferences, preferencesPath, isProgramNewer, oldestCmodVersion, pendingStepsMethod, parseEvent, programModifiedMs, readRecord, readSteps, recordPath, scriptsSha256, serviceFolder, type ReadFile, type RunnerEvent, type Steps } from '../records.js'
7
7
  import { homePrefix, ifMissing, relativePath } from '../utils/paths.js'
8
8
  import { firstLine, formatExit, messageOf } from '../utils/text.js'
9
9
  import type { Claude } from './claude.js'
@@ -141,6 +141,12 @@ const settingsLoadMs = 500
141
141
 
142
142
  const shellTools: readonly string[] = ['Bash', 'PowerShell']
143
143
 
144
+ async function roundsBarEnds(claude: Claude): Promise<boolean> {
145
+ const path = preferencesPath(await cmodStore(claude))
146
+ const text = await claude.fs.read(path).catch(ifMissing(undefined))
147
+ return parsePreferences(text === undefined ? undefined : (JSON.parse(text) as unknown), path).roundsBarEnds
148
+ }
149
+
144
150
  export async function readPlugin(claude: Claude): Promise<Plugin> {
145
151
  const { name, root } = claude.plugin
146
152
  const read: ReadFile = async (path) => {
@@ -732,12 +738,13 @@ export function createLifecycle<State extends object, Declared extends Options =
732
738
  (done) => done === 'copied' && runtime?.toaster.toast.success('Copied the link', { description: 'Paste it in your browser.' }),
733
739
  (error: unknown) => toastFailure({ id: 'open-link', message: 'Could not open the link', error, isCritical: true }),
734
740
  )
741
+ let hasNerdFont = false
735
742
  const naming: Claude = {
736
743
  ...claudeCalls,
737
744
  ui: {
738
745
  ...claudeCalls.ui,
739
746
  warn: (id, text) => (runtime === undefined ? claudeCalls.ui.warn(id, text) : runtime.toaster.warn(id, text)),
740
- resolve: (e) => forClaudeCode(claudeCalls.ui.resolve(e), e.surface, open),
747
+ resolve: (e) => forClaudeCode(claudeCalls.ui.resolve(e), e.surface, open, { hasNerdFont }),
741
748
  },
742
749
  session: { ...claudeCalls.session, id: async () => startingSession ?? claudeCalls.session.id() },
743
750
  }
@@ -755,6 +762,7 @@ export function createLifecycle<State extends object, Declared extends Options =
755
762
  readStarted = read
756
763
  try {
757
764
  drawCount = (await claudeCalls.clock.now()) * drawsPerMs
765
+ hasNerdFont = (await roundsBarEnds(claudeCalls).catch((error: unknown) => (claudeCalls.ui.warn('preferences:read', `${definition.name} rounds its bars only in a terminal it knows: ${messageOf(error)}`), false))) || isNerdFontTerminal(await claudeCalls.env.terminal())
758
766
  await programs.refresh()
759
767
  await begin().catch(report)
760
768
  } finally {
@@ -57,7 +57,7 @@ export function pickedColor(args: string): string | undefined {
57
57
  return resetColors.includes(picked) ? undefined : picked
58
58
  }
59
59
 
60
- const acts = ['send', 'startTask', 'fork', 'clone', 'startBackgroundTask', 'callTool', 'usage', 'surfaces', 'abort', 'end', 'visit', 'delete'] as const
60
+ const acts = ['send', 'startTask', 'fork', 'clone', 'startBackgroundTask', 'callTool', 'usage', 'surfaces', 'abort', 'end', 'visit', 'delete', 'compact', 'sendTo'] as const
61
61
 
62
62
  export type Act = (typeof acts)[number]
63
63
 
@@ -174,7 +174,17 @@ const elements: Readonly<Record<string, (props: Props, drawing: Drawing) => stri
174
174
  },
175
175
  Progress: (props) => {
176
176
  const label = typeof props['label'] === 'string' ? props['label'] : undefined
177
- return `<progress class="progress" max="100" value="${numberOr(props['value'], 0)}"${attribute('aria-label', label)}${attribute('style', `width:${across(numberOr(props['width'], 24))}`)}></progress>`
177
+ const value = numberOr(props['value'], 0)
178
+ const shared = `${attribute('aria-label', label)}${attribute('style', `width:${across(numberOr(props['width'], 24))}`)}`
179
+ const buffer = Math.min(numberOr(props['buffer'], value), 100) - value
180
+ if (!Array.isArray(props['sections']) && buffer <= 0) return `<progress class="progress" max="100" value="${value}"${shared}></progress>`
181
+ const sections = Array.isArray(props['sections']) ? props['sections'].filter((each): each is Props => typeof each === 'object' && each !== null) : [{ value }]
182
+ const section = (each: Props) => {
183
+ const color = colorOf(each['color'])
184
+ return `<span class="progress-section${each['tone'] === undefined ? '' : ` tone-${toneOf(each['tone'])}`}" style="width:${numberOr(each['value'], 0)}%${color === undefined ? '' : `;background:${color}`}"></span>`
185
+ }
186
+ const buffered = buffer > 0 ? `<span class="progress-buffer" style="width:${buffer}%"></span>` : ''
187
+ return `<div class="progress-bar" role="meter" aria-valuemin="0" aria-valuemax="100" aria-valuenow="${value}"${shared}>${sections.map(section).join('')}${buffered}</div>`
178
188
  },
179
189
  List: (props, drawing) => `<ul class="list"${attribute('aria-label', textOr(props['label'], ''))}>${nodeHtml(props['children'], drawing)}</ul>`,
180
190
  ListItem: (props, drawing) => {
@@ -239,20 +239,20 @@ export function serveWidgets({
239
239
 
240
240
  const shown = (keys: readonly string[]) => keys.filter((key) => !isHidden(key))
241
241
 
242
- const rowsNow = (area: Area, at: StyledAt, turn: TurnData | undefined): RenderElement[] =>
242
+ const rowsNow = (area: Area, at: StyledAt, turn: TurnData | undefined, isBesideMode = false): RenderElement[] =>
243
243
  layout.areas[area].flatMap((row) => {
244
244
  const side = (keys: readonly string[]) => shown(keys).map((key) => elementFor(key, area, at, turn)).filter((each) => each !== undefined)
245
245
  const left = side(row.left)
246
246
  const right = side(row.right)
247
247
  const group = (keys: readonly string[], children: readonly RenderElement[]) => Box({ flexShrink: shown(keys).some((key) => widgetOf(key)?.place?.size === 'fill') ? 1 : 0, minWidth: 0, columnGap: 2, children })
248
- return left.length + right.length === 0 ? [] : [Box({ justifyContent: 'space-between', width: at.columns, columnGap: 2, children: [group(row.left, left), group(row.right, right)] })]
248
+ return left.length + right.length === 0 ? [] : [Box({ ...(isBesideMode ? {} : { justifyContent: 'space-between' as const, width: at.columns }), columnGap: 2, children: [group(row.left, left), group(row.right, right)] })]
249
249
  })
250
250
 
251
251
  const keysIn = (area: Area) => layout.areas[area].flatMap((row) => shown([...row.left, ...row.right]))
252
252
 
253
- const draw = async (area: Area, table: ElementTable, at: StyledAt, turn?: TurnData): Promise<RenderElement[]> => {
253
+ const draw = async (area: Area, table: ElementTable, at: StyledAt, turn?: TurnData, isBesideMode = false): Promise<RenderElement[]> => {
254
254
  await Promise.all(keysIn(area).map((key) => fill(key, area, at, turn)))
255
- return drawWith(table, () => rowsNow(area, at, turn), markdownIn(table, at))
255
+ return drawWith(table, () => rowsNow(area, at, turn, isBesideMode), markdownIn(table, at))
256
256
  }
257
257
 
258
258
  const rows = (area: Area, at: StyledAt): RenderElement[] => {
@@ -270,8 +270,8 @@ export function serveWidgets({
270
270
  const inTranscript = styledAt(e, viewportColumns(e) - transcriptIndent)
271
271
  if (e.component === 'AbovePrompt') return e.props.hasSurvey ? next(e) : below(table, await next(e), await draw(AbovePrompt, table, styledAt(e, e.props.bodyColumns)))
272
272
  if (e.component === 'PromptHint') {
273
- const added = await draw(BelowPrompt, table, styledAt(e, viewportColumns(e) - promptIndent))
274
- return isHidden(claudeHint) ? column(table, added) : below(table, await next(e), added)
273
+ const at = styledAt(e, viewportColumns(e) - promptIndent)
274
+ return isHidden(claudeHint) ? column(table, await draw(BelowPrompt, table, at, undefined, true)) : below(table, await next(e), await draw(BelowPrompt, table, at))
275
275
  }
276
276
  if (e.component === 'SessionMode') return isHidden(claudeModes) ? column(table, []) : next(e)
277
277
  if (e.component === 'Spinner') return below(table, await next(e), await draw(Working, table, inTranscript))
@@ -267,6 +267,7 @@ export function fakeClaude(plugin: { readonly name: string; readonly root: strin
267
267
  sshConnection: async () => undefined,
268
268
  display: async () => undefined,
269
269
  waylandDisplay: async () => undefined,
270
+ terminal: async () => ({}),
270
271
  },
271
272
  device: { read: rejected('device.read', () => fakes.device.read ?? (async () => testDevice)) },
272
273
  cmod: { call: async (args) => cmodCall(clonedAsClaudeCodeDoes(args)) },
@@ -1,4 +1,4 @@
1
- import { Box, Button, hostComponent, Text } from './elements.js'
1
+ import { Box, Button, drawnIn, hostComponent, Text, type Color } from './elements.js'
2
2
 
3
3
  export type Tab = { readonly key: string; readonly label: string; readonly hotkey?: string }
4
4
 
@@ -117,15 +117,74 @@ export const Pagination = hostComponent(
117
117
  }),
118
118
  )
119
119
 
120
+ export type ProgressSection = { readonly value: number } & ({ readonly tone?: Tone } | { readonly color: Color })
121
+
122
+ type ProgressProps = ({ readonly value: number; readonly tone?: Tone } | { readonly sections: readonly ProgressSection[] }) & { readonly buffer?: number; readonly width?: number; readonly label?: string }
123
+
124
+ type ProgressData = { readonly value: number; readonly width: number; readonly label?: string; readonly sections?: readonly ProgressSection[]; readonly buffer?: number }
125
+
126
+ const eighths = ['', '▏', '▎', '▍', '▌', '▋', '▊', '▉']
127
+
128
+ const roundedLeft = '\u{E0B6}'
129
+
130
+ const roundedRight = '\u{E0B4}'
131
+
132
+ const barColors: Readonly<Record<Tone, string>> = { neutral: 'inactive', info: 'suggestion', success: 'success', warning: 'warning', critical: 'error' }
133
+
134
+ function filledSections(sections: readonly ProgressSection[]): ProgressSection[] {
135
+ let reached = 0
136
+ return sections.map((section) => {
137
+ const filled = Math.min(Math.max(section.value, 0), 100 - reached)
138
+ reached += filled
139
+ return { ...section, value: filled }
140
+ })
141
+ }
142
+
120
143
  export const Progress = hostComponent(
121
144
  'Progress',
122
- ({ value, width = 24, label }: { readonly value: number; readonly width?: number; readonly label?: string }) => ({ value: Math.min(Math.max(value, 0), 100), width, ...(label === undefined ? {} : { label }) }),
123
- ({ value, width }: { readonly value: number; readonly width: number; readonly label?: string }) => {
124
- const filled = Math.round((value / 100) * width)
125
- return Text({ children: [Text({ color: 'claude', children: '█'.repeat(filled) }), Text({ color: 'subtle', children: '░'.repeat(width - filled) })] })
145
+ ({ width = 24, label, buffer, ...given }: ProgressProps): ProgressData => {
146
+ const sections = 'sections' in given ? filledSections(given.sections) : given.tone === undefined ? undefined : filledSections([given])
147
+ const value = sections === undefined && 'value' in given ? Math.min(Math.max(given.value, 0), 100) : (sections ?? []).reduce((sum, each) => sum + each.value, 0)
148
+ const buffered = buffer === undefined ? undefined : Math.min(Math.max(buffer, value), 100)
149
+ return { value, width, ...(label === undefined ? {} : { label }), ...(sections === undefined ? {} : { sections }), ...(buffered === undefined || buffered === value ? {} : { buffer: buffered }) }
150
+ },
151
+ ({ value, width, sections, buffer }: ProgressData) => {
152
+ const isRounded = drawnIn().hasNerdFont && width > 2
153
+ const cells = isRounded ? width - 2 : width
154
+ const units = cells * eighths.length
155
+ let reached = 0
156
+ const ends = (sections ?? [{ value }]).map((section) => {
157
+ reached += section.value
158
+ return { end: Math.round((reached / 100) * units), color: 'color' in section ? section.color : section.tone === undefined ? 'claude' : barColors[section.tone] }
159
+ })
160
+ const buffered = Math.round(((buffer ?? 0) / 100) * units)
161
+ const colorAt = (unit: number) => ends.find(({ end }) => unit < end)?.color ?? (unit < buffered ? 'promptBorder' : 'subtle')
162
+ const drawn: BarCell[] = []
163
+ for (let cell = 0; cell < cells; cell++) {
164
+ const from = cell * eighths.length
165
+ const left = colorAt(from)
166
+ const right = colorAt(from + eighths.length - 1)
167
+ let edge = 1
168
+ while (edge < eighths.length && colorAt(from + edge) === left) edge++
169
+ drawn.push(left === right ? { color: left, children: '█' } : { color: left, backgroundColor: right, children: eighths[edge] ?? '█' })
170
+ }
171
+ const capped = isRounded ? [{ color: colorAt(0), children: roundedLeft }, ...drawn, { color: colorAt(units - 1), children: roundedRight }] : drawn
172
+ return Text({ children: runsOf(capped).map((run) => Text(run)) })
126
173
  },
127
174
  )
128
175
 
176
+ type BarCell = { color: string; backgroundColor?: string; children: string }
177
+
178
+ function runsOf(cells: readonly BarCell[]): BarCell[] {
179
+ const runs: BarCell[] = []
180
+ for (const cell of cells) {
181
+ const last = runs.at(-1)
182
+ if (last !== undefined && last.color === cell.color && last.backgroundColor === cell.backgroundColor && last.children !== roundedLeft && cell.children !== roundedRight) last.children += cell.children
183
+ else runs.push({ ...cell })
184
+ }
185
+ return runs
186
+ }
187
+
129
188
  export const List = hostComponent(
130
189
  'List',
131
190
  ({ label, children }: { readonly label: string; readonly children?: JSX.Children }) => ({ label, ...(children === undefined ? {} : { children }) }),
@@ -40,7 +40,17 @@ type Terminal = Elements['terminal'] & Elements['desktop']
40
40
 
41
41
  type CompletedTable = Record<ElementName, (props: object) => RenderElement>
42
42
 
43
- type Drawing = { readonly table: CompletedTable; readonly markdown: ((props: MarkdownProps) => RenderElement) | undefined }
43
+ export type DrawnIn = { readonly hasNerdFont: boolean }
44
+
45
+ type Drawing = { readonly table: CompletedTable; readonly markdown: ((props: MarkdownProps) => RenderElement) | undefined; readonly drawnIn: DrawnIn }
46
+
47
+ const tableFacts = new WeakMap<ElementTable, DrawnIn>()
48
+
49
+ const plainTerminal: DrawnIn = { hasNerdFont: false }
50
+
51
+ export function drawnIn(): DrawnIn {
52
+ return drawing?.drawnIn ?? plainTerminal
53
+ }
44
54
 
45
55
  const unbuilt = Symbol('an element built outside a render')
46
56
 
@@ -61,7 +71,7 @@ function elementNamed(name: string, props: object): RenderElement {
61
71
 
62
72
  export function drawWith<Drawn>(table: ElementTable, draw: () => Drawn, markdown?: (props: MarkdownProps) => RenderElement): Drawn {
63
73
  const outer = drawing
64
- const current = { table: table as CompletedTable, markdown }
74
+ const current = { table: table as CompletedTable, markdown, drawnIn: tableFacts.get(table) ?? plainTerminal }
65
75
  drawing = current
66
76
  try {
67
77
  return built(current, draw()) as Drawn
@@ -153,7 +163,7 @@ export function drawsFocusable(data: unknown, key: string): boolean {
153
163
  return Object.values(fields).some((each) => drawsFocusable(each, key))
154
164
  }
155
165
 
156
- export function forClaudeCode(table: ElementTable, surface: RenderSurface, open: (href: string, press: UiPressArgument) => void): ElementTable {
166
+ export function forClaudeCode(table: ElementTable, surface: RenderSurface, open: (href: string, press: UiPressArgument) => void, { hasNerdFont }: DrawnIn = plainTerminal): ElementTable {
157
167
  const { Button: button, Link: link, Image: image, Svg: svg, Raster: raster } = table as CompletedTable
158
168
  const opening = (props: Readonly<Record<string, unknown>>) => {
159
169
  const { href, ...rest } = props
@@ -167,7 +177,9 @@ export function forClaudeCode(table: ElementTable, surface: RenderSurface, open:
167
177
  (draw: (props: object) => RenderElement) =>
168
178
  ({ label, ...rest }: Readonly<Record<string, unknown>>) =>
169
179
  draw({ alt: label, ...rest })
170
- return { ...table, Button: opening, Image: named(image), Svg: named(svg), Raster: ({ label, ...rest }: Readonly<Record<string, unknown>>) => raster(rest) }
180
+ const resolved = { ...table, Button: opening, Image: named(image), Svg: named(svg), Raster: ({ label, ...rest }: Readonly<Record<string, unknown>>) => raster(rest) }
181
+ tableFacts.set(resolved, { hasNerdFont: hasNerdFont && surface === 'terminal' })
182
+ return resolved
171
183
  }
172
184
 
173
185
  export const Box = element('Box')
@@ -1 +1 @@
1
- {"version":3,"file":"fake-claude.d.ts","sourceRoot":"","sources":["../src/testing/fake-claude.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAS,MAAM,aAAa,CAAA;AAEhE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAA;AAK/D,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAE/D,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,SAAS,OAAO,EAAE,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,KAAK,GAAG;IAClB,OAAO,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAA;KAAE,CAAA;IAC/E,EAAE,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,MAA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IAAI,CAAA;CAC5B,CAAA;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,WAAW,CAAC,GAAG,OAAO,CAGtF;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,UAAU,CAyN/F"}
@@ -214,6 +214,7 @@ export function fakeClaude(plugin) {
214
214
  sshConnection: async () => undefined,
215
215
  display: async () => undefined,
216
216
  waylandDisplay: async () => undefined,
217
+ terminal: async () => ({}),
217
218
  },
218
219
  device: { read: rejected('device.read', () => fakes.device.read ?? (async () => testDevice)) },
219
220
  cmod: { call: async (args) => cmodCall(clonedAsClaudeCodeDoes(args)) },