@contraagent/ui 0.7.2 → 0.8.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 (67) hide show
  1. package/custom-elements.json +1 -1
  2. package/dist/adapters/filters.d.ts +7 -1
  3. package/dist/adapters/filters.d.ts.map +1 -1
  4. package/dist/adapters/filters.js +8 -2
  5. package/dist/adapters/filters.js.map +1 -1
  6. package/dist/adapters/journal-columns.js +2 -2
  7. package/dist/adapters/journal-columns.js.map +1 -1
  8. package/dist/adapters/kpi-tiles.d.ts.map +1 -1
  9. package/dist/adapters/kpi-tiles.js +3 -2
  10. package/dist/adapters/kpi-tiles.js.map +1 -1
  11. package/dist/contraagent-ui.js +172 -171
  12. package/dist/elements/lists/ca-contracts.js +2 -2
  13. package/dist/elements/lists/ca-contracts.js.map +1 -1
  14. package/dist/elements/shared/file-card.d.ts.map +1 -1
  15. package/dist/elements/shared/file-card.js +2 -2
  16. package/dist/elements/shared/file-card.js.map +1 -1
  17. package/dist/elements/task/ca-transcript.js +2 -2
  18. package/dist/elements/task/ca-transcript.js.map +1 -1
  19. package/dist/elements/task/context.d.ts +1 -3
  20. package/dist/elements/task/context.d.ts.map +1 -1
  21. package/dist/elements/task/context.js +2 -1
  22. package/dist/elements/task/context.js.map +1 -1
  23. package/dist/elements/task/header.d.ts.map +1 -1
  24. package/dist/elements/task/header.js +4 -2
  25. package/dist/elements/task/header.js.map +1 -1
  26. package/dist/elements/task/panes/io.d.ts.map +1 -1
  27. package/dist/elements/task/panes/io.js +7 -4
  28. package/dist/elements/task/panes/io.js.map +1 -1
  29. package/dist/locales/ja.d.ts +11 -5
  30. package/dist/locales/ja.d.ts.map +1 -1
  31. package/dist/locales/ja.js +11 -5
  32. package/dist/locales/ja.js.map +1 -1
  33. package/dist/words/contract.d.ts +4 -2
  34. package/dist/words/contract.d.ts.map +1 -1
  35. package/dist/words/contract.js +7 -5
  36. package/dist/words/contract.js.map +1 -1
  37. package/dist/words/index.d.ts +1 -0
  38. package/dist/words/index.d.ts.map +1 -1
  39. package/dist/words/index.js +1 -0
  40. package/dist/words/index.js.map +1 -1
  41. package/dist/words/lineage.d.ts +11 -0
  42. package/dist/words/lineage.d.ts.map +1 -1
  43. package/dist/words/lineage.js +13 -1
  44. package/dist/words/lineage.js.map +1 -1
  45. package/dist/words/rounds.d.ts +2 -2
  46. package/dist/words/rounds.js +4 -4
  47. package/dist/words/rounds.js.map +1 -1
  48. package/dist/words/working-directory.d.ts +5 -0
  49. package/dist/words/working-directory.d.ts.map +1 -0
  50. package/dist/words/working-directory.js +7 -0
  51. package/dist/words/working-directory.js.map +1 -0
  52. package/package.json +3 -3
  53. package/src/adapters/filters.ts +10 -2
  54. package/src/adapters/journal-columns.ts +2 -2
  55. package/src/adapters/kpi-tiles.ts +3 -2
  56. package/src/elements/lists/ca-contracts.ts +2 -2
  57. package/src/elements/shared/file-card.ts +2 -2
  58. package/src/elements/task/ca-transcript.ts +2 -2
  59. package/src/elements/task/context.ts +2 -1
  60. package/src/elements/task/header.ts +4 -2
  61. package/src/elements/task/panes/io.ts +7 -4
  62. package/src/locales/ja.ts +11 -5
  63. package/src/words/contract.ts +9 -5
  64. package/src/words/index.ts +1 -0
  65. package/src/words/lineage.ts +16 -2
  66. package/src/words/rounds.ts +4 -4
  67. package/src/words/working-directory.ts +8 -0
@@ -14,7 +14,7 @@ import { getLocale } from '../../core/i18n.js';
14
14
  import { RememberedSet, SessionSet, memoryOf, pageMemory } from '../../core/memory.js';
15
15
  import { promptText } from '../shared/prompt-text.js';
16
16
  import { retryTip } from '../../words/attempts.js';
17
- import { correctionTip } from '../../words/contract.js';
17
+ import { correctionRoundTip } from '../../words/contract.js';
18
18
  import { modelSwitchTip } from '../../words/hops.js';
19
19
 
20
20
  /** The transcript's words, in the reader's language (call at render time). */
@@ -22,7 +22,7 @@ const strings = (): TranscriptStrings => ({
22
22
  sections: msg('Agent sessions'),
23
23
  sectionsTip: [
24
24
  `${msg('Retry')}: ${retryTip()}`,
25
- `${msg('Correction')}: ${correctionTip()}`,
25
+ `${msg('Correction round')}: ${correctionRoundTip()}`,
26
26
  `${msg('Model switch')}: ${modelSwitchTip()}`,
27
27
  ].join('\n'),
28
28
  loadEarlier: (n) => (n === 1 ? msg('Show 1 earlier line') : msg(str`Show ${n} earlier lines`)),
@@ -16,6 +16,7 @@ import {
16
16
  type UpstreamTask,
17
17
  } from '@contraagent/api';
18
18
  import { html } from 'lit';
19
+ import { correctionCount } from '../../adapters/filters.js';
19
20
  import { emit, type RoundInfo } from '../../core/events.js';
20
21
  import { kindUnit } from '../../words/format.js';
21
22
  import { correctionsText, inputCause, notStartedCause } from '../../words/index.js';
@@ -95,7 +96,7 @@ export function culprit(c: TaskContext): { key: string; kind: string; unit: stri
95
96
  }
96
97
 
97
98
  /** `N corrections` for a journal row whose attempt needed them ('' when none). */
98
- export const correctionsOf = (r: { rounds?: number | null }): string => correctionsText((r.rounds || 1) - 1);
99
+ export const correctionsOf = (r: Pick<JournalRow, 'rounds' | 'hook_errors'>): string => correctionsText(correctionCount(r));
99
100
 
100
101
  /** A task's name as a link that sends `ca-open-task`. */
101
102
  export const taskLink = (c: TaskContext, u: { key: string; kind: string; unit: string }) =>
@@ -6,7 +6,7 @@ import { html, nothing, type TemplateResult } from 'lit';
6
6
  import { toneAttr } from '@contraagent/elements';
7
7
  import { pill } from '@contraagent/elements/primitives';
8
8
  import { facts, fmtDur, kindUnit, listText, localTime, tokenCount, unreadEvents, usageUnknown, usageUnknownWords, usd } from '../../words/format.js';
9
- import { attemptNames, deferredText, changedFiles, changedFilesTip, changeLabel, credentialLabel, credentialTip, locksLabel, locksTip, modelSwitch, outcomeLabel, priorityText, priorityTip, replayedLabel, replayedTip, stopLabel, type ChangeKind } from '../../words/index.js';
9
+ import { attemptNames, deferredText, changedFiles, changedFilesTip, changeLabel, credentialLabel, credentialTip, locksLabel, locksTip, modelSwitch, outcomeLabel, priorityText, priorityTip, replayedLabel, replayedTip, stopLabel, workingDirectoryText, workingDirectoryTip, type ChangeKind } from '../../words/index.js';
10
10
  import { contextWarnedText, contextWarnedTip, peakContextLine, peakContextTip, peakTry } from '../../words/context.js';
11
11
  import { readingShort, readingTip } from '../../words/quota.js';
12
12
  import { safetyStopCount, safetyStopLine, safetyStopTip } from '../../words/safety.js';
@@ -17,6 +17,7 @@ import { isStop, type Tone } from '../../lib/tone.js';
17
17
  import { executorIcon } from '../../words/executor.js';
18
18
  import '@contraagent/elements/json-tree/define';
19
19
  import { tagChips, type TranscriptTag } from '@contraagent/elements/transcript';
20
+ import { correctionCount } from '../../adapters/filters.js';
20
21
  import { checkMessage } from '../../adapters/transcript/rounds.js';
21
22
  import { agentLabel, launchWho, whoTags, type Who } from '../../adapters/transcript/who.js';
22
23
  import { correctionsOf, hadSession, isPy, notStartedWhy, stateOf, type TaskContext } from './context.js';
@@ -73,7 +74,7 @@ function verdict(c: TaskContext): [text: string, tone: Tone] {
73
74
  'neutral',
74
75
  ];
75
76
  }
76
- const corrections = (last.rounds || 1) - 1 + (last.hook_errors ?? []).length;
77
+ const corrections = correctionCount(last);
77
78
  if (corrections > 0) {
78
79
  const errors = [...(last.hook_errors ?? []).flat(), ...(last.round_errors ?? []).flat(), ...c.rounds.flatMap((r) => r.rejectedWith)];
79
80
  const first = errors[0] ? checkMessage(runRelative(errors[0], c.run)) : '';
@@ -139,6 +140,7 @@ export function taskHeader(c: TaskContext, key: string, onSearch: (query: string
139
140
  </div>`
140
141
  : nothing}
141
142
  ${node?.priority ? html`<div class="meta" title=${priorityTip()}>${priorityText(node.priority)}</div>` : nothing}
143
+ ${node?.cwd ? html`<div class="meta" title=${workingDirectoryTip()}>${workingDirectoryText(node.cwd)}</div>` : nothing}
142
144
  ${rerunMeta(rows, node?.rerun)}
143
145
  ${stoppedFlowCalls(c)}
144
146
  ${session
@@ -30,7 +30,7 @@ import { ioFileCard } from '../../shared/file-card.js';
30
30
  import { taskChip } from '../../shared/task-chip.js';
31
31
  import { inputView, notPassed, type EarlierTask, type InputFile } from '../inputs.js';
32
32
  import { roundLabel, roundWhy } from '../../../words/rounds.js';
33
- import { inputFileCheckWord, lineageTip, lineageWord } from '../../../words/lineage.js';
33
+ import { inputFileCheckWord, inputRootPath, inputRootTip, lineageTip, lineageWord } from '../../../words/lineage.js';
34
34
  import { correctionsOf, hadSession, isPy, producerOf, stateOf, taskLink, type TaskContext } from '../context.js';
35
35
 
36
36
  const valueText = (v: unknown): string => (typeof v === 'string' ? v : JSON.stringify(v) ?? String(v));
@@ -81,8 +81,9 @@ export function inputPane(c: TaskContext): TemplateResult {
81
81
  }
82
82
 
83
83
  /**
84
- * One input file of the task (an `InputFile` param): its check at the start, its path,
85
- * the param that holds it, its hash, and the earlier task whose output file it is.
84
+ * One input file of the task (an `InputFile` param): its check at the start, its path
85
+ * (with its input root), the param that holds it, its hash, and the earlier task whose
86
+ * output file it is.
86
87
  */
87
88
  function inputFileCard(c: TaskContext, f: TaskInputFile) {
88
89
  const tone = f.check === 'passed' ? 'done' : f.check === 'refused' ? 'failed' : 'neutral';
@@ -91,8 +92,10 @@ function inputFileCard(c: TaskContext, f: TaskInputFile) {
91
92
  const origin = f.writer
92
93
  ? html`<span>${msg(html`Output of ${taskLink(c, writer ?? { key: f.writer, kind: f.writer, unit: '' })}`)}</span>`
93
94
  : nothing;
95
+ const rooted = inputRootPath(f);
96
+ const tip = f.root && f.root !== 'out' ? inputRootTip(f.root, f.path) : f.path;
94
97
  return html`<div class="io-card one infile">
95
- <div class="io-hd">${pill({ text: inputFileCheckWord(f.check), tone, mark })}<span class="jmono ct-path" title=${f.path}>${runRelative(f.path, c.run)}</span></div>
98
+ <div class="io-hd">${pill({ text: inputFileCheckWord(f.check), tone, mark })}<span class="jmono ct-path" title=${tip}>${rooted ?? runRelative(f.path, c.run)}</span></div>
96
99
  <div class="meta io-from"><span title=${f.sha256}>${facts(msg(str`Param ${f.param}`), `sha256 ${f.sha256.slice(0, 12)}`)}</span>${f.writer
97
100
  ? html` | ${origin}`
98
101
  : nothing}</div>
package/src/locales/ja.ts CHANGED
@@ -33,6 +33,7 @@
33
33
  'part-input-files': `入力ファイル`,
34
34
  'part-params': `パラメータ`,
35
35
  's0007e74d64dabdbc': `実行履歴の未実行のタスク`,
36
+ 's0094a2c710d4521a': `修正ラウンド 1 回後`,
36
37
  's00cfc1e282ce46d7': str`HTTP ステータス ${0}`,
37
38
  's02f7b7c4ece3e097': `実行されず`,
38
39
  's02f936d07f478eb8': str`アカウント: ${0}`,
@@ -176,7 +177,6 @@
176
177
  's2f54740b39931f87': `定義なし`,
177
178
  's2faec8a0d7db08dd': str`5 時間枠の利用率 ${0}(リセット ${1})`,
178
179
  's2fe3f0ef38a252c7': `ツール`,
179
- 's2fea0e9e542e5b47': str`修正依頼 ${0}`,
180
180
  's31377c5b29515e8b': `終了(未実行のタスク 1 件)`,
181
181
  's31ad37e9f51902fd': str`待たれなかったタスク ${0} 件`,
182
182
  's321b04e2b2f863d5': `余分なフィールド`,
@@ -200,6 +200,7 @@
200
200
  's3786b7768c22d7fd': `検証エラーの後に、同じエージェントのセッションで続けるラウンド(rounds)`,
201
201
  's37da018e1fe6a0d7': `スキーマ以外の検証(validators)`,
202
202
  's3841eba6a1c038af': str`${0} を展開`,
203
+ 's3850111242895c2f': str`修正ラウンド ${0}`,
203
204
  's387a4a41718122cb': str`検索結果 ${0} 件`,
204
205
  's38e65cca012f316f': `修正依頼のプロンプトに含めて送信`,
205
206
  's38e6a13eab00995b': `日ごとの料金`,
@@ -247,6 +248,7 @@
247
248
  's48e186fb300e5464': `所要時間`,
248
249
  's49098dfd8a30a9b7': `モニターのサーバーに接続済み`,
249
250
  's491765412b82838e': str`${0} のループ`,
251
+ 's49c85c93fd66fbe4': str`修正ラウンド ${0} 回`,
250
252
  's4abcddbf0c24a4e2': str`${0} 日前`,
251
253
  's4cd75aa2c080e64a': `あと 1 件の見込み(forecast)`,
252
254
  's4d613d768e2faa0d': `検索結果 1 件`,
@@ -255,6 +257,7 @@
255
257
  's4efee5b48a4593cb': `ループ`,
256
258
  's4f0af1e75e3f4e0d': `スキーマにない`,
257
259
  's4f901d8830793b99': str`ホスト ${0}`,
260
+ 's4fca51e2e890a0f0': `検証エラーを示し、同じエージェントのセッションで出力の修正を求める依頼。ラウンドの途中、または修正ラウンドで(hook_errors, rounds)`,
258
261
  's4fed3c544c5791df': `エージェントタスク`,
259
262
  's5013070506ff1eda': str`取り消し ${0} 件`,
260
263
  's50182c197f93c873': str`${0}: ${1} → ${2}`,
@@ -283,6 +286,7 @@
283
286
  's5590dbf7e425789d': `項目`,
284
287
  's559ffe740d166c8d': `その他のモデル`,
285
288
  's55fa598b754cc3cc': str`${0}(${1})`,
289
+ 's5657377baae212e4': `修正ラウンド 1 回`,
286
290
  's5667ab3a2fddedf6': str`(ほか ${0} 文字は未保存)`,
287
291
  's567f1fa5829fb0c2': `未実行(依存先タスクが失敗)`,
288
292
  's56838581fa8422a5': str`後続タスク: ${0}`,
@@ -335,7 +339,6 @@
335
339
  's670ef751f29dc9ae': str`${0} ユニット`,
336
340
  's673f9ec66716c84a': `停止でエラー`,
337
341
  's680fc90489553ed6': `タイムライン`,
338
- 's685f61cef2e55d31': `修正依頼`,
339
342
  's68818ff23f9c3cd6': `その他の検証`,
340
343
  's68d5849bad94a91d': str`仕上げの猶予 ${0}`,
341
344
  's69522c8fd29e217c': `修正依頼 1 回`,
@@ -411,7 +414,6 @@
411
414
  's8273cf03c84a59ef': `認証情報が休止中`,
412
415
  's837f3597be0e0bda': str`書き込み ${0}`,
413
416
  's84126fa92f00b4ef': `たった今`,
414
- 's843c1705315bbf4e': str`修正依頼 ${0} 回後`,
415
417
  's84fb675fb17d4455': `リトライ`,
416
418
  's851220394bf4ca62': str`テーマ: ${0}`,
417
419
  's851d0f73d02cf0b5': `ファイルの値`,
@@ -425,11 +427,9 @@
425
427
  's877a8bf58317ec9e': str`${0} 回目の失敗後の、新しいエージェントのセッション`,
426
428
  's87aaf1391fb727b7': `実行されず`,
427
429
  's87b0c0d87ec9c3a1': str`モデル切り替え後に完了: ${0}`,
428
- 's87cfcf0fecad5ace': `修正依頼 1 回後`,
429
430
  's8807d2925482479b': `全試行の合計`,
430
431
  's888d98a196a240d8': `入力`,
431
432
  's88be8b2eafea1028': `表で表示`,
432
- 's88e6f151026426e7': str`修正依頼 ${0}`,
433
433
  's892f20ba2aadea33': str`入力 ${0}(${1} の出力)がありません`,
434
434
  's89ece7813063852e': `パラメータなし`,
435
435
  's8a56a8c8bd19c9c7': `なし`,
@@ -500,10 +500,12 @@
500
500
  's9bd11c2c49c08916': str`${0} 回目で完了 | 失敗 ${1} 回 | 最初の失敗: ${2}`,
501
501
  's9c325e901c43f27a': str`上限を超えた利用: ${0}`,
502
502
  's9c5f040496c9716b': str`${0} の出力`,
503
+ 's9c64a5e5cd2b70e9': `修正ラウンド`,
503
504
  's9c77b049b9f43ad5': `すべての中を表示`,
504
505
  's9cb7a149bc9abd88': `実装する種別`,
505
506
  's9d313ec614917a38': str`${0} 時点の書き出し`,
506
507
  's9d60d7651126c205': `最終応答なしで終了`,
508
+ 's9da88e027753b536': str`修正ラウンド ${0} 回後`,
507
509
  's9de543933e6e703a': `モデル`,
508
510
  's9e06cbf9c5f57859': str`状態: ${0}`,
509
511
  's9e8afbe69b10d822': `未実行(入力ファイルに検証エラー)`,
@@ -695,6 +697,7 @@
695
697
  'sd5c13f0d5d88c035': str`変更: ${0}`,
696
698
  'sd5da7ee4a43a6b2d': str`トークン: 入力 ${0}、出力 ${1}、キャッシュ読み込み ${2}、キャッシュ書き込み ${3}`,
697
699
  'sd5e28ee1c3ede3b6': `所要時間の合計`,
700
+ 'sd6a08709ccdbf95c': `タスク呼び出しが実行全体の代わりに指定した、このタスクの作業ディレクトリ(cwd)`,
698
701
  'sd7338946b42394f4': `失敗`,
699
702
  'sd7445330352af2c5': `検証対象のファイル`,
700
703
  'sd747248fb64d7bb2': `なし(任意)`,
@@ -718,6 +721,7 @@
718
721
  'sdd4a8ac67f7885c1': `モデル 1 種類`,
719
722
  'sdd826d4b3e02f41b': `修正依頼なし`,
720
723
  'sddf65e6dc438188d': `ビューを表示`,
724
+ 'sde3961511d128fcd': str`作業ディレクトリ ${0}`,
721
725
  'sde7cbc4291a82cc4': `履歴にほか 1 件`,
722
726
  'sde88e8c24887ecfe': str`アカウント ${0}`,
723
727
  'sdf14d39488c16f16': str`${0} 回目で完了 | 失敗 1 回 | 最初の失敗: ${1}`,
@@ -736,6 +740,7 @@
736
740
  'se4ba2b7d91bd3060': `修正依頼のあったタスク 1 件`,
737
741
  'se55f1e3401225b3f': `エージェントのセッションの所要時間の合計`,
738
742
  'se5ad61b61dc5c4f6': `モデル切り替え`,
743
+ 'se5af45314a3a6b0f': str`修正ラウンド ${0}`,
739
744
  'se5bc88938f3b6e59': `推移`,
740
745
  'se5d1247fe34fbb95': `monitor.Panel`,
741
746
  'se60a4867465d5d31': `ハイコントラスト`,
@@ -770,6 +775,7 @@
770
775
  'sede9056322866918': `ステージなし`,
771
776
  'seea0f53b4dbb2fb3': `結果`,
772
777
  'seea18d10f66cb015': `ホスト ID なし`,
778
+ 'seed22b61a74bd723': str`入力ルート ${1} の ${0}`,
773
779
  'seee13c69133b70b7': `スキップ`,
774
780
  'seee3885e38ae0126': `完了しなかった試行`,
775
781
  'sef0ce050d92c35e2': str`実行中 ${0} 件`,
@@ -29,14 +29,18 @@ export function contractStatusWhy(s: ContractStatus): string {
29
29
  }
30
30
 
31
31
  /** What a correction is, for tooltips. */
32
- export const correctionTip = (): string => msg('Another round in the same agent session after failed checks (rounds)');
32
+ export const correctionTip = (): string =>
33
+ msg('Failed checks sent back to the same agent session, within its round or in a correction round (hook_errors, rounds)');
33
34
 
34
- /** How many corrections a file took (`rounds` counts the first round too), in words; '' for none. */
35
- export function correctionsLabel(rounds: number | null | undefined, passed: boolean): string {
35
+ /** What a correction round is, for tooltips. */
36
+ export const correctionRoundTip = (): string => msg('Another round in the same agent session after failed checks (rounds)');
37
+
38
+ /** How many correction rounds a file took (`rounds` counts the first round too), in words; '' for none. */
39
+ export function correctionRoundsLabel(rounds: number | null | undefined, passed: boolean): string {
36
40
  const n = (rounds ?? 1) - 1;
37
41
  if (n < 1) return '';
38
- if (passed) return n === 1 ? msg('after 1 correction') : msg(str`after ${n} corrections`);
39
- return n === 1 ? msg('1 correction') : msg(str`${n} corrections`);
42
+ if (passed) return n === 1 ? msg('after 1 correction round') : msg(str`after ${n} correction rounds`);
43
+ return n === 1 ? msg('1 correction round') : msg(str`${n} correction rounds`);
40
44
  }
41
45
 
42
46
  /** Who writes a file, for naming the task an input should have come from. */
@@ -26,6 +26,7 @@ export * from './panels.js';
26
26
  export * from './export.js';
27
27
  export * from './trends.js';
28
28
  export * from './priority.js';
29
+ export * from './working-directory.js';
29
30
  export * from './context.js';
30
31
  export * from './preflight.js';
31
32
  export * from './task-definition.js';
@@ -1,8 +1,9 @@
1
1
  // How a task is joined to an earlier one (`Lineage`), in the words of the graph's
2
2
  // edges: each word names the edge from the earlier task to the later one, in the
3
- // task's earlier and later tasks alike. And an input file's check at the start.
3
+ // task's earlier and later tasks alike. And an input file's check at the start, and
4
+ // its path with its input root.
4
5
  import type { InputFileCheck, Lineage } from '@contraagent/api';
5
- import { msg } from '@lit/localize';
6
+ import { msg, str } from '@lit/localize';
6
7
 
7
8
  /** A lineage as the graph's legend names its edge: given output (solid), runs after (dotted), created after result (dashed). */
8
9
  export function lineageWord(l: Lineage): string {
@@ -28,6 +29,19 @@ export function lineageTip(l: Lineage): string {
28
29
  }
29
30
  }
30
31
 
32
+ /**
33
+ * An input file's path as the task detail shows it (`TaskInputFile`): `data: 2026/x.csv` for
34
+ * a file of an input root the run names, `out/review/a.md` for an output file of the run
35
+ * (the root `out`), else its path; null for a file of no input root.
36
+ */
37
+ export function inputRootPath(f: { root?: string | null; path: string }): string | null {
38
+ if (!f.root) return null;
39
+ return f.root === 'out' ? `out/${f.path}` : `${f.root}: ${f.path}`;
40
+ }
41
+
42
+ /** The tooltip of a file of an input root the run names: its path under the root. */
43
+ export const inputRootTip = (root: string, path: string): string => msg(str`${path} in the input root ${root}`);
44
+
31
45
  /** An input file's check as its task was about to start. */
32
46
  export function inputFileCheckWord(c: InputFileCheck): string {
33
47
  switch (c) {
@@ -7,17 +7,17 @@ import { stopLabel } from './stop.js';
7
7
  import type { RoundInfo } from '../core/events.js';
8
8
 
9
9
  /**
10
- * "Attempt 1", "Correction 1", "Model switch"; with more than one attempt,
11
- * "Attempt 2 | correction 1" and "Attempt 2 | model switch". `name` is the name of
10
+ * "Attempt 1", "Correction round 1", "Model switch"; with more than one attempt,
11
+ * "Attempt 2 | correction round 1" and "Attempt 2 | model switch". `name` is the name of
12
12
  * the round's attempt (`attemptNames`: "Attempt 1 | resumed run" in a resumed run).
13
13
  */
14
14
  export function roundLabel(r: RoundInfo, tries: number, name = attemptLabel(r.tryNo - 1)): string {
15
15
  if (tries > 1) {
16
- if (r.fixupNo) return facts(name, msg(str`correction ${r.fixupNo}`));
16
+ if (r.fixupNo) return facts(name, msg(str`correction round ${r.fixupNo}`));
17
17
  if (r.hopNo) return facts(name, msg('model switch'));
18
18
  return name;
19
19
  }
20
- if (r.fixupNo) return msg(str`Correction ${r.fixupNo}`);
20
+ if (r.fixupNo) return msg(str`Correction round ${r.fixupNo}`);
21
21
  if (r.hopNo) return msg('Model switch');
22
22
  return attemptLabel(0);
23
23
  }
@@ -0,0 +1,8 @@
1
+ // Words for a task's own working directory (`PlanNode.cwd`): the directory its call options named.
2
+ import { msg, str } from '@lit/localize';
3
+
4
+ /** A task's own working directory as a fact: `Working directory /repo.worktrees/alpha`; '' for none (the run's). */
5
+ export const workingDirectoryText = (cwd: string | null | undefined): string => (cwd ? msg(str`Working directory ${cwd}`) : '');
6
+
7
+ /** What a task's own working directory is, for its tooltip. */
8
+ export const workingDirectoryTip = (): string => msg("Directory the task worked in, named by its task call in place of the run's (cwd)");