@contraagent/ui 0.6.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +24 -3
- package/dist/adapters/forecast.d.ts +20 -0
- package/dist/adapters/forecast.d.ts.map +1 -0
- package/dist/adapters/forecast.js +35 -0
- package/dist/adapters/forecast.js.map +1 -0
- package/dist/adapters/graph/compound.d.ts.map +1 -1
- package/dist/adapters/graph/compound.js +7 -5
- package/dist/adapters/graph/compound.js.map +1 -1
- package/dist/adapters/graph/highlight.d.ts +21 -5
- package/dist/adapters/graph/highlight.d.ts.map +1 -1
- package/dist/adapters/graph/highlight.js +49 -21
- package/dist/adapters/graph/highlight.js.map +1 -1
- package/dist/adapters/graph/input.d.ts +3 -1
- package/dist/adapters/graph/input.d.ts.map +1 -1
- package/dist/adapters/graph/input.js +7 -1
- package/dist/adapters/graph/input.js.map +1 -1
- package/dist/adapters/graph/project.d.ts +5 -3
- package/dist/adapters/graph/project.d.ts.map +1 -1
- package/dist/adapters/graph/project.js +13 -9
- package/dist/adapters/graph/project.js.map +1 -1
- package/dist/adapters/graph/selection.js +1 -1
- package/dist/adapters/graph/selection.js.map +1 -1
- package/dist/adapters/graph/states.d.ts.map +1 -1
- package/dist/adapters/graph/states.js +1 -1
- package/dist/adapters/graph/states.js.map +1 -1
- package/dist/adapters/graph/types.d.ts +12 -4
- package/dist/adapters/graph/types.d.ts.map +1 -1
- package/dist/adapters/graph/types.js +2 -0
- package/dist/adapters/graph/types.js.map +1 -1
- package/dist/adapters/graph/words.d.ts +5 -4
- package/dist/adapters/graph/words.d.ts.map +1 -1
- package/dist/adapters/graph/words.js +11 -9
- package/dist/adapters/graph/words.js.map +1 -1
- package/dist/adapters/index.d.ts +1 -0
- package/dist/adapters/index.d.ts.map +1 -1
- package/dist/adapters/index.js +1 -0
- package/dist/adapters/index.js.map +1 -1
- package/dist/adapters/journal-columns.d.ts.map +1 -1
- package/dist/adapters/journal-columns.js +4 -1
- package/dist/adapters/journal-columns.js.map +1 -1
- package/dist/adapters/kpi-tiles.d.ts.map +1 -1
- package/dist/adapters/kpi-tiles.js +1 -0
- package/dist/adapters/kpi-tiles.js.map +1 -1
- package/dist/contraagent-ui.js +674 -657
- package/dist/core/scroll.d.ts +13 -1
- package/dist/core/scroll.d.ts.map +1 -1
- package/dist/core/scroll.js +46 -12
- package/dist/core/scroll.js.map +1 -1
- package/dist/elements/overview/ca-overview.d.ts.map +1 -1
- package/dist/elements/overview/ca-overview.js +3 -3
- package/dist/elements/overview/ca-overview.js.map +1 -1
- package/dist/elements/overview/ca-pipeline-graph.d.ts +6 -1
- package/dist/elements/overview/ca-pipeline-graph.d.ts.map +1 -1
- package/dist/elements/overview/ca-pipeline-graph.js +30 -13
- package/dist/elements/overview/ca-pipeline-graph.js.map +1 -1
- package/dist/elements/overview/pipeline-graph/crumbs.d.ts +5 -0
- package/dist/elements/overview/pipeline-graph/crumbs.d.ts.map +1 -1
- package/dist/elements/overview/pipeline-graph/crumbs.js +27 -1
- package/dist/elements/overview/pipeline-graph/crumbs.js.map +1 -1
- package/dist/elements/overview/pipeline-graph/inspector.d.ts.map +1 -1
- package/dist/elements/overview/pipeline-graph/inspector.js +39 -5
- package/dist/elements/overview/pipeline-graph/inspector.js.map +1 -1
- package/dist/elements/overview/pipeline-graph/outline.js +1 -1
- package/dist/elements/overview/pipeline-graph/outline.js.map +1 -1
- package/dist/elements/overview/pipeline-graph/strings.d.ts.map +1 -1
- package/dist/elements/overview/pipeline-graph/strings.js +6 -3
- package/dist/elements/overview/pipeline-graph/strings.js.map +1 -1
- package/dist/elements/overview/pipeline-graph/styles.d.ts.map +1 -1
- package/dist/elements/overview/pipeline-graph/styles.js +6 -2
- package/dist/elements/overview/pipeline-graph/styles.js.map +1 -1
- package/dist/elements/shell/ca-monitor.d.ts +2 -0
- package/dist/elements/shell/ca-monitor.d.ts.map +1 -1
- package/dist/elements/shell/ca-monitor.js +11 -0
- package/dist/elements/shell/ca-monitor.js.map +1 -1
- package/dist/elements/shell/ca-run-picker.d.ts.map +1 -1
- package/dist/elements/shell/ca-run-picker.js +2 -0
- package/dist/elements/shell/ca-run-picker.js.map +1 -1
- package/dist/elements/task/ca-task-view.d.ts.map +1 -1
- package/dist/elements/task/ca-task-view.js +4 -1
- package/dist/elements/task/ca-task-view.js.map +1 -1
- package/dist/elements/task/header.d.ts.map +1 -1
- package/dist/elements/task/header.js +34 -3
- package/dist/elements/task/header.js.map +1 -1
- package/dist/elements/task/panes/io.d.ts +5 -1
- package/dist/elements/task/panes/io.d.ts.map +1 -1
- package/dist/elements/task/panes/io.js +56 -8
- package/dist/elements/task/panes/io.js.map +1 -1
- package/dist/elements/task/styles.d.ts.map +1 -1
- package/dist/elements/task/styles.js +6 -2
- package/dist/elements/task/styles.js.map +1 -1
- package/dist/lib/tone.d.ts.map +1 -1
- package/dist/lib/tone.js +2 -0
- package/dist/lib/tone.js.map +1 -1
- package/dist/locales/ja.d.ts +47 -5
- package/dist/locales/ja.d.ts.map +1 -1
- package/dist/locales/ja.js +47 -5
- package/dist/locales/ja.js.map +1 -1
- package/dist/words/flow-calls.d.ts +12 -0
- package/dist/words/flow-calls.d.ts.map +1 -0
- package/dist/words/flow-calls.js +31 -0
- package/dist/words/flow-calls.js.map +1 -0
- package/dist/words/forecast.d.ts +16 -0
- package/dist/words/forecast.d.ts.map +1 -0
- package/dist/words/forecast.js +17 -0
- package/dist/words/forecast.js.map +1 -0
- package/dist/words/format.d.ts +10 -0
- package/dist/words/format.d.ts.map +1 -1
- package/dist/words/format.js +17 -0
- package/dist/words/format.js.map +1 -1
- package/dist/words/index.d.ts +4 -0
- package/dist/words/index.d.ts.map +1 -1
- package/dist/words/index.js +4 -0
- package/dist/words/index.js.map +1 -1
- package/dist/words/lineage.d.ts +8 -0
- package/dist/words/lineage.d.ts.map +1 -0
- package/dist/words/lineage.js +35 -0
- package/dist/words/lineage.js.map +1 -0
- package/dist/words/outcome.d.ts.map +1 -1
- package/dist/words/outcome.js +4 -0
- package/dist/words/outcome.js.map +1 -1
- package/dist/words/rerun.d.ts +24 -0
- package/dist/words/rerun.d.ts.map +1 -0
- package/dist/words/rerun.js +41 -0
- package/dist/words/rerun.js.map +1 -0
- package/dist/words/stop.js +2 -0
- package/dist/words/stop.js.map +1 -1
- package/package.json +3 -3
- package/src/adapters/forecast.ts +43 -0
- package/src/adapters/graph/compound.ts +10 -9
- package/src/adapters/graph/highlight.ts +53 -22
- package/src/adapters/graph/input.ts +10 -2
- package/src/adapters/graph/plans.fixture.ts +2 -2
- package/src/adapters/graph/project.ts +16 -12
- package/src/adapters/graph/selection.ts +1 -1
- package/src/adapters/graph/states.ts +1 -1
- package/src/adapters/graph/types.ts +14 -4
- package/src/adapters/graph/words.ts +17 -12
- package/src/adapters/index.ts +1 -0
- package/src/adapters/journal-columns.ts +4 -1
- package/src/adapters/kpi-tiles.ts +1 -0
- package/src/core/scroll.ts +43 -11
- package/src/elements/overview/ca-overview.ts +3 -2
- package/src/elements/overview/ca-pipeline-graph.ts +34 -18
- package/src/elements/overview/pipeline-graph/crumbs.ts +28 -0
- package/src/elements/overview/pipeline-graph/inspector.ts +45 -5
- package/src/elements/overview/pipeline-graph/outline.ts +1 -1
- package/src/elements/overview/pipeline-graph/strings.ts +6 -3
- package/src/elements/overview/pipeline-graph/styles.ts +6 -2
- package/src/elements/shell/ca-monitor.ts +9 -0
- package/src/elements/shell/ca-run-picker.ts +1 -0
- package/src/elements/task/ca-task-view.ts +7 -2
- package/src/elements/task/header.ts +34 -3
- package/src/elements/task/panes/io.ts +72 -8
- package/src/elements/task/styles.ts +6 -2
- package/src/lib/tone.ts +2 -0
- package/src/locales/ja.ts +47 -5
- package/src/words/flow-calls.ts +36 -0
- package/src/words/forecast.ts +28 -0
- package/src/words/format.ts +19 -0
- package/src/words/index.ts +4 -0
- package/src/words/lineage.ts +41 -0
- package/src/words/outcome.ts +4 -0
- package/src/words/rerun.ts +61 -0
- package/src/words/stop.ts +2 -0
package/src/locales/ja.ts
CHANGED
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
export const templates = {
|
|
12
12
|
'col-runs': `実行`,
|
|
13
13
|
'definition-output': `出力`,
|
|
14
|
+
'edge-after': `完了を待つ`,
|
|
15
|
+
'edge-created': `結果を受けて作成`,
|
|
16
|
+
'edge-given': `出力を受け取る`,
|
|
17
|
+
'flow-call-stopped': `停止`,
|
|
14
18
|
'h0ddbe8131d040868': html`JSON Lines(1 行ごとに JSON オブジェクト、スキーマ ${0})`,
|
|
15
19
|
'h5665d16ae525ca0b': html`${0} の出力`,
|
|
16
20
|
'h612ee972e5585763': html`JSON オブジェクト(スキーマ ${0})`,
|
|
@@ -19,10 +23,15 @@
|
|
|
19
23
|
'had57861b5eb1998e': html`ファイルなし | Python コードで定義(<code>TaskAdapter</code>)`,
|
|
20
24
|
'hca6c01d40814d5b0': html`実行中 ${0}${1}`,
|
|
21
25
|
'hf139a496c0f9b763': html`${0} の出力から`,
|
|
26
|
+
'input-file-not-checked': `未確認`,
|
|
22
27
|
'no-runs-yet': `実行はまだありません`,
|
|
23
28
|
'none': `なし`,
|
|
29
|
+
'outcome-cancelled': `取り消し`,
|
|
24
30
|
'outcome-done': `完了`,
|
|
25
31
|
'outcome-partial': `一部のみ完了`,
|
|
32
|
+
'part-definition': `定義`,
|
|
33
|
+
'part-input-files': `入力ファイル`,
|
|
34
|
+
'part-params': `パラメータ`,
|
|
26
35
|
's0007e74d64dabdbc': `実行履歴の未実行のタスク`,
|
|
27
36
|
's00cfc1e282ce46d7': str`HTTP ステータス ${0}`,
|
|
28
37
|
's02f7b7c4ece3e097': `実行されず`,
|
|
@@ -37,6 +46,7 @@
|
|
|
37
46
|
's041489fa7f9e6fe6': str`ほか ${0} 件`,
|
|
38
47
|
's04286bec7654cf3f': `タスクが宣言したパターンの下で、試行が作成・変更・削除したファイル(changes)`,
|
|
39
48
|
's044f7ee7915b22a3': str`一部のみ完了 ${0} 件`,
|
|
49
|
+
's048f821b3dc73ec2': `再開後に再実行`,
|
|
40
50
|
's04f1babead09ec6b': `停止した部分`,
|
|
41
51
|
's051e95917479e3a4': `実行中のエージェントのセッション`,
|
|
42
52
|
's05548eaadd7b3e53': `選択中の項目`,
|
|
@@ -46,7 +56,6 @@
|
|
|
46
56
|
's0668067982f84dcb': `ユニットごとのステージとステップ(CursorStore)`,
|
|
47
57
|
's066d70cf9d5e2915': `出力`,
|
|
48
58
|
's06a59d9f860b0c38': `Esc: 1 つ上の階層`,
|
|
49
|
-
's06ac9901d5ec124e': `依存先`,
|
|
50
59
|
's06b0f7bc0e6f72bd': `実行中ではありません`,
|
|
51
60
|
's06bff69a662d11b0': `中を表示`,
|
|
52
61
|
's07760df6abc2f6a0': `テキストフィルター(/)`,
|
|
@@ -57,11 +66,11 @@
|
|
|
57
66
|
's08b1e44d0f35109e': str`${0}(認証情報が休止中)`,
|
|
58
67
|
's08b35907b5589afa': `いいえ`,
|
|
59
68
|
's08c43a07b566d980': `稼働中`,
|
|
60
|
-
's08f830c89607bf9e': str`依存先: ${0}`,
|
|
61
69
|
's09323b2ac0a8afed': `出力の検証: OK`,
|
|
62
70
|
's09353907b5c79284': `終了日`,
|
|
63
71
|
's09459a62b70ff1a2': `最初のエージェントのセッションの前に終了`,
|
|
64
72
|
's09bb59cd137c1af4': `プロンプトなし`,
|
|
73
|
+
's0a99b40429080168': str`入力元: ${0}`,
|
|
65
74
|
's0b05cbe8c9314a2b': str`作成元: ${0}`,
|
|
66
75
|
's0b237aba4a56eb22': `エージェントのセッション開始時のサブスクリプション利用率(アカウント全体)`,
|
|
67
76
|
's0b355fde970b0df9': `OK`,
|
|
@@ -88,6 +97,7 @@
|
|
|
88
97
|
's12c35dcdc5890192': `型の不一致`,
|
|
89
98
|
's13843960cf657713': str`最終報告 ${0}`,
|
|
90
99
|
's14bd607323778cb3': `コーディングエージェントが報告した値`,
|
|
100
|
+
's14c898307fc12ee3': str`この失敗で ${0} が ${1} で停止`,
|
|
91
101
|
's150f53f8651b4384': `出力`,
|
|
92
102
|
's156d30b96fb26c7f': `なし(任意)`,
|
|
93
103
|
's158eba9bc2227ce3': str`週の利用率 ${0}`,
|
|
@@ -96,6 +106,7 @@
|
|
|
96
106
|
's165ee7508f443a3e': str`${0} 回目で完了 | 失敗 1 回`,
|
|
97
107
|
's168ae294e3e72ce4': `検証のタイミング`,
|
|
98
108
|
's1703f5cfa8ed0cc9': str`実行されず ${0} 件`,
|
|
109
|
+
's1725258e65a9f38f': str`同じフローの実行 ${0} から見込んだ、この実行がまだ作成していないタスク(forecast)`,
|
|
99
110
|
's179ba9809bdf35c7': `アカウントごと、最初の値 → 最後の値`,
|
|
100
111
|
's17d7937260be87a6': `利用率のルール`,
|
|
101
112
|
's17ee023c53dcd83c': `書き込み待ち(タスクが待機中)`,
|
|
@@ -115,6 +126,7 @@
|
|
|
115
126
|
's1c4244f27dc0a0ad': str`セッション開始時の利用率(アカウント全体): ${0}`,
|
|
116
127
|
's1c76dcdfd0d3326d': `実行に登録されたすべてのタスク(種別ごと、plan.jsonl)`,
|
|
117
128
|
's1cc744978f1e1e36': `実行中の Python タスク`,
|
|
129
|
+
's1d4bd752f1174aaf': `どのフローも結果を待たず、after= にも渡さず、戻り値にも含めなかったタスク(unawaited)。出力ファイルと変更のために実行された`,
|
|
118
130
|
's1db2936d905dfc71': `API エラー`,
|
|
119
131
|
's1dc338639fe7aae9': str`試行 ${0} 回`,
|
|
120
132
|
's1dd7ab260efc97bf': `実行中のタスクなし`,
|
|
@@ -137,6 +149,7 @@
|
|
|
137
149
|
's23f40d3ffdd352a6': `定義はまだありません`,
|
|
138
150
|
's2413de2aeb2cad27': str`完了 ${0}`,
|
|
139
151
|
's2575361362fcf642': `OutputContract・InputContract を宣言したタスクはありません`,
|
|
152
|
+
's25f66969239538c1': str`まだ登録されていない種別: ${0}`,
|
|
140
153
|
's26012de2ae38a284': `API 呼び出し 1 回`,
|
|
141
154
|
's26bae2d058ab07f8': `ユニットなし`,
|
|
142
155
|
's26bb7d0992115fe1': `実行した試行の回数(リトライを含む、journal.jsonl)`,
|
|
@@ -149,10 +162,12 @@
|
|
|
149
162
|
's28f91da403800c05': `InputContract`,
|
|
150
163
|
's29b6d46649a71377': str`最大コンテキスト: ${0}`,
|
|
151
164
|
's2a2e8a5afcc8d89a': `現在`,
|
|
165
|
+
's2c0c7686db4c5c18': str`パラメータ ${0}`,
|
|
152
166
|
's2c8189544e3ea679': `リトライ`,
|
|
153
167
|
's2cd5d653677e6881': `モデルの利用可否`,
|
|
154
168
|
's2dd7dfcce562730a': `試行の結果(stop)`,
|
|
155
169
|
's2df075aface0dab8': `割合`,
|
|
170
|
+
's2df66a4e587b3718': `開始時も同じ内容`,
|
|
156
171
|
's2e3f7c747d87ba60': str`ほかの出力 ${0} 件`,
|
|
157
172
|
's2e422519ed38f7d8': `周`,
|
|
158
173
|
's2f3435308f48080e': str`${0} 周`,
|
|
@@ -163,10 +178,12 @@
|
|
|
163
178
|
's2fe3f0ef38a252c7': `ツール`,
|
|
164
179
|
's2fea0e9e542e5b47': str`修正依頼 ${0}`,
|
|
165
180
|
's31377c5b29515e8b': `終了(未実行のタスク 1 件)`,
|
|
181
|
+
's31ad37e9f51902fd': str`待たれなかったタスク ${0} 件`,
|
|
166
182
|
's321b04e2b2f863d5': `余分なフィールド`,
|
|
167
183
|
's326385425f7ff3c5': str`キャッシュ読み込み ${0}`,
|
|
168
184
|
's32d229c81273f461': `最大コンテキスト`,
|
|
169
185
|
's33b572e03cbb49a2': `パイプラインの階層`,
|
|
186
|
+
's33fc35415f8b1c49': str`${0} で停止`,
|
|
170
187
|
's343dead26eec35c9': `新しいイベント 1 件を表示`,
|
|
171
188
|
's34bb12befe88eb1b': `終了`,
|
|
172
189
|
's34e46e4e30ae57bd': `降順に並べ替え`,
|
|
@@ -205,6 +222,7 @@
|
|
|
205
222
|
's3f18b1a78ce1a960': `各タスクが書き込むファイル`,
|
|
206
223
|
's3f7074a6bbbd7726': `修正依頼`,
|
|
207
224
|
's3fd6bd99e3f6a5be': `開始`,
|
|
225
|
+
's3fda7269dc9d47ba': `このタスクの出力が後続タスクのパラメータに含まれる(given_from)`,
|
|
208
226
|
's40750d44c5ea3271': str`${0}: 入力`,
|
|
209
227
|
's4085b471de2e2215': `週の利用率`,
|
|
210
228
|
's4134711b0b981089': `Tab: 次のノード`,
|
|
@@ -230,14 +248,15 @@
|
|
|
230
248
|
's49098dfd8a30a9b7': `モニターのサーバーに接続済み`,
|
|
231
249
|
's491765412b82838e': str`${0} のループ`,
|
|
232
250
|
's4abcddbf0c24a4e2': str`${0} 日前`,
|
|
251
|
+
's4cd75aa2c080e64a': `あと 1 件の見込み(forecast)`,
|
|
233
252
|
's4d613d768e2faa0d': `検索結果 1 件`,
|
|
234
253
|
's4d890c06c9c42dee': `モデル切り替え`,
|
|
235
254
|
's4e7c49654e9033f5': str`修正依頼 ${0} 回で完了 | 最初の検証エラー: ${1}`,
|
|
236
255
|
's4efee5b48a4593cb': `ループ`,
|
|
237
256
|
's4f0af1e75e3f4e0d': `スキーマにない`,
|
|
238
|
-
's4f0b2143a5fc9bf2': str`再開後に再実行: ${0}`,
|
|
239
257
|
's4f901d8830793b99': str`ホスト ${0}`,
|
|
240
258
|
's4fed3c544c5791df': `エージェントタスク`,
|
|
259
|
+
's5013070506ff1eda': str`取り消し ${0} 件`,
|
|
241
260
|
's50182c197f93c873': str`${0}: ${1} → ${2}`,
|
|
242
261
|
's504d83b92c9ed51e': `日付指定`,
|
|
243
262
|
's51316118c75cbced': `そのモデルで始めたエージェントのセッションの数`,
|
|
@@ -258,6 +277,7 @@
|
|
|
258
277
|
's5410888308ba73df': `開始できず`,
|
|
259
278
|
's54393bfa280ea55b': `プロンプト`,
|
|
260
279
|
's552240946fb80e49': str`フロー呼び出し ${0}`,
|
|
280
|
+
's552a2945ecbbf679': str`${0} の失敗により停止`,
|
|
261
281
|
's5552cf25dfb16715': `プラグインディレクトリ`,
|
|
262
282
|
's558d71789938dd8d': `認証情報の不一致`,
|
|
263
283
|
's5590dbf7e425789d': `項目`,
|
|
@@ -281,6 +301,7 @@
|
|
|
281
301
|
's5b91c14a6a040e1e': `種別ごとのトークンと料金`,
|
|
282
302
|
's5bd56661dc3d893f': `フロー呼び出しごとの締め切り(time_box)`,
|
|
283
303
|
's5c7b236b3fa997c2': `サービスなし`,
|
|
304
|
+
's5cb32dedd20156b7': `分岐`,
|
|
284
305
|
's5cd51fca94ab558d': str`エージェントのセッション ${0} 回`,
|
|
285
306
|
's5cfa1889ee16f534': `値なし`,
|
|
286
307
|
's5d0bd939d106436c': `実行中にこのタスクが占有する名前(claims)`,
|
|
@@ -303,6 +324,7 @@
|
|
|
303
324
|
's629576c6b305d539': `任意`,
|
|
304
325
|
's647582a62a567663': `応答が JSON ではなく HTML`,
|
|
305
326
|
's649816288746372b': `後続タスク`,
|
|
327
|
+
's64a9094d5926ab69': `前のタスクの出力は同じなのに、フローが別のパラメータを渡した(divergence)。時刻、乱数、外部の状態、フローのコードの変更による`,
|
|
306
328
|
's64f4ede4c120d468': `変更禁止の箇所`,
|
|
307
329
|
's652e7d36f0a948dd': str`ロック ${0} 件`,
|
|
308
330
|
's65387e16091fbf16': `締め切りを過ぎた`,
|
|
@@ -333,6 +355,7 @@
|
|
|
333
355
|
's6ebc9bd6feae62a3': `読み込み中…`,
|
|
334
356
|
's6f145ecab7e01aae': `API 呼び出し`,
|
|
335
357
|
's6f2d39e45dc290b5': `出力ファイル 1 件`,
|
|
358
|
+
's6f5367f58dce0037': str`見込み: あと ${0} タスク`,
|
|
336
359
|
's6fa4fa0db6637ca7': `フロー呼び出しがエラーで終了`,
|
|
337
360
|
's7009515e0b51ee67': `書き出しに含まれない`,
|
|
338
361
|
's70348dd289d771d5': str`${0} まで休止`,
|
|
@@ -356,6 +379,7 @@
|
|
|
356
379
|
's76f396a17f89a5e0': `原因`,
|
|
357
380
|
's7718ef97e5fb3426': str`入力 ${0} は失敗したタスク ${1} の出力`,
|
|
358
381
|
's77ec32fb8248c021': str`未実行 ${0} 件`,
|
|
382
|
+
's782db3652547623c': `書き足す対象のファイル`,
|
|
359
383
|
's786837e1e48f17c8': `トランスクリプト`,
|
|
360
384
|
's78fd8c03f8c967f3': `トークン`,
|
|
361
385
|
's7975cad0458a3b12': `すべての中を隠す`,
|
|
@@ -417,6 +441,7 @@
|
|
|
417
441
|
's8b41b9223ed7838d': `同じロックを持つタスクが共有する常駐の補助プロセス(services.jsonl)`,
|
|
418
442
|
's8bbe7f1c618318b1': `終了したすべての試行から集計(journal.jsonl)`,
|
|
419
443
|
's8c1837e74a81ad0d': str`${0} 分前`,
|
|
444
|
+
's8c563da286fe5cb7': `このタスクの結果を受け取った直後に、フロー呼び出しが後続タスクを作成した(created_from)`,
|
|
420
445
|
's8d3d06c785c3c433': `コーディングエージェントが使ったアカウントまたは API キー(credential)`,
|
|
421
446
|
's8d4bb019f3bc7202': `PID`,
|
|
422
447
|
's8dd1924ee42c1f45': str`キャッシュ読み込み ${0}`,
|
|
@@ -441,6 +466,7 @@
|
|
|
441
466
|
's9147091d090a92d4': str`最大 ${0} 周`,
|
|
442
467
|
's915525f01e5ebdb9': str`モデル ${0} 種類`,
|
|
443
468
|
's919d209719302bd3': str`${0}d ${1}h`,
|
|
469
|
+
's91d2138e1db80125': `順序のみの依存先`,
|
|
444
470
|
's9246c889a0392130': str`モデル ${0}`,
|
|
445
471
|
's92a32f8361a3a3b0': str`依存先タスク ${0} 件の出力待ち`,
|
|
446
472
|
's92b7e489ad4779c7': str`5 時間枠 ${0}`,
|
|
@@ -489,7 +515,6 @@
|
|
|
489
515
|
's9fbbc819fe7e66aa': `実行`,
|
|
490
516
|
's9fd13600c5948a5d': `タスクの開始前からあるファイルも有効`,
|
|
491
517
|
's9ff6bfdb36b47dd6': `モデル切り替え`,
|
|
492
|
-
'sa0a6e71350fd953b': `出力を待つ`,
|
|
493
518
|
'sa116cd3e2e650be3': `リプレイした試行`,
|
|
494
519
|
'sa23567d1be73e6a7': `ターン数の上限`,
|
|
495
520
|
'sa24de5df07476150': str`${0} の締め切りまでに終わらない`,
|
|
@@ -509,6 +534,7 @@
|
|
|
509
534
|
'sa4f4addc6a836fcf': str`最大 ${0} 回`,
|
|
510
535
|
'sa508a8fb4e60520e': `安全分類器による停止 1 件`,
|
|
511
536
|
'sa50a6326530d8a0d': `折りたたむ`,
|
|
537
|
+
'sa5441ff1c4c71a32': `API 呼び出しごとのトークンは不明`,
|
|
512
538
|
'sa57b5e86ecb7d735': `権限エラーになったツール呼び出し`,
|
|
513
539
|
'sa58fd816ed43f98e': `周回数`,
|
|
514
540
|
'sa6295f265bf36f55': str`${0}: トランスクリプト`,
|
|
@@ -534,10 +560,12 @@
|
|
|
534
560
|
'sac1ead3bc64c3402': `モニターのサーバーに未接続`,
|
|
535
561
|
'sac76f55d909ff9fd': str`${0} に利用できるモデルなし`,
|
|
536
562
|
'sacaf895f9cac7377': `期間内の実行の合計`,
|
|
563
|
+
'sacbf23fb29caa9f9': `分かっているのはコーディングエージェントが出力したトークンの合計だけ。API 呼び出しごとのトークンは不明(usage_unknown)`,
|
|
537
564
|
'sacc7621b51cc2743': `可`,
|
|
538
565
|
'sad131e152d238fb4': str`ほかに休止中の認証情報 ${0} 件`,
|
|
539
566
|
'sad3e3c8146fc920f': `状態`,
|
|
540
567
|
'sad951affb16c18e8': `API リクエストを再送`,
|
|
568
|
+
'sadb0119c6d963645': `トークンは不明`,
|
|
541
569
|
'sae5d87e99fe081e0': `必須`,
|
|
542
570
|
'sae675aed0baadfc5': `実行履歴のリトライしたタスク`,
|
|
543
571
|
'saee49dc66c73b95a': `プロセス`,
|
|
@@ -554,6 +582,7 @@
|
|
|
554
582
|
'sb1454106d9fa9d78': str`報告なし ${0} 台`,
|
|
555
583
|
'sb16ea30b732565de': str`${0} 行`,
|
|
556
584
|
'sb1ffef0fea624d13': `前の 1 行を表示`,
|
|
585
|
+
'sb24e2c9c9f983470': str`この失敗で ${0} が停止`,
|
|
557
586
|
'sb26a93fd31e2f700': `登録順`,
|
|
558
587
|
'sb26f6e41558f71ed': `表示中の階層の外`,
|
|
559
588
|
'sb271968591691cd3': `Enter: 開く`,
|
|
@@ -570,6 +599,7 @@
|
|
|
570
599
|
'sb5ae7a6b849639af': `未実行`,
|
|
571
600
|
'sb6bb16aa7550533d': `タスク実行中の書き込みが必須`,
|
|
572
601
|
'sb76f9199c15fe03c': str`${0} に停止`,
|
|
602
|
+
'sb8127ffb12a5fb54': `実行したエージェントのセッションのトークンは不明(usage_unknown)`,
|
|
573
603
|
'sb89b16909f010061': `エージェントのセッション 1 回`,
|
|
574
604
|
'sb945184259a5d73c': str`5 時間枠(${0})`,
|
|
575
605
|
'sb9724d1e7908c74c': `コンテキストの上限に接近`,
|
|
@@ -584,6 +614,7 @@
|
|
|
584
614
|
'sbb202211084591ed': `開始時の利用率`,
|
|
585
615
|
'sbb77dd1d4c08e701': str`${1} タスク中 ${0} 件が未完了`,
|
|
586
616
|
'sbb99d4ec27fbb263': `終了`,
|
|
617
|
+
'sbbe1ac88d71c2fec': `入力元`,
|
|
587
618
|
'sbc65d1b9648966de': str`${0} 周: ${1}`,
|
|
588
619
|
'sbc95529382a8202f': str`以前の試行のモデル: ${0}`,
|
|
589
620
|
'sbca0391cb2c7c054': `タスクの開始時`,
|
|
@@ -628,6 +659,7 @@
|
|
|
628
659
|
'sc9474bf7a0668d73': `全体`,
|
|
629
660
|
'sc9757b387904aaba': `タイムゾーン`,
|
|
630
661
|
'sc9e494c8346b7cb5': `その他`,
|
|
662
|
+
'sca175b60e0f8cc35': `開始前に変更された`,
|
|
631
663
|
'sca4ca1724004c913': `プロセスなし`,
|
|
632
664
|
'sca68313fa6851125': `プレビューを表示`,
|
|
633
665
|
'sca7fed2bef53cb99': `ロール`,
|
|
@@ -650,14 +682,17 @@
|
|
|
650
682
|
'sd0ea7366ebc403ff': `出来事`,
|
|
651
683
|
'sd173bb96eb4d2577': `入力 / 出力 | キャッシュ読み込み / キャッシュ書き込み`,
|
|
652
684
|
'sd1f67ae2a58049b0': `ファイルの検証に使うスキーマ`,
|
|
685
|
+
'sd201d977e9a204cb': str`順序のみの依存先: ${0}`,
|
|
653
686
|
'sd26f6fb3acfd5ca0': str`${0} 件を同時実行`,
|
|
654
687
|
'sd3458f28f628e82d': str`${0} に開始(${1})`,
|
|
655
688
|
'sd381b19c7fd35852': `変更`,
|
|
656
689
|
'sd3c028fcc08b18ab': `登録済みのタスクなし`,
|
|
657
690
|
'sd3ec6686aaaf1324': str`終了(未完了のタスク ${0} 件)`,
|
|
691
|
+
'sd406591b0914aab7': `読み込むファイル(検証あり)`,
|
|
658
692
|
'sd47e3a005069edb9': `ローカルの認証情報(ambient)`,
|
|
659
693
|
'sd58f7e67529b30b0': `終了(失敗したタスク 1 件)`,
|
|
660
694
|
'sd5a1f34cfcac265f': `実行がシグナルで停止された`,
|
|
695
|
+
'sd5c13f0d5d88c035': str`変更: ${0}`,
|
|
661
696
|
'sd5da7ee4a43a6b2d': str`トークン: 入力 ${0}、出力 ${1}、キャッシュ読み込み ${2}、キャッシュ書き込み ${3}`,
|
|
662
697
|
'sd5e28ee1c3ede3b6': `所要時間の合計`,
|
|
663
698
|
'sd7338946b42394f4': `失敗`,
|
|
@@ -666,7 +701,6 @@
|
|
|
666
701
|
'sd757815e3da2dde5': `検証エラー`,
|
|
667
702
|
'sd7768c230e48ac70': str`全体の ${0}%`,
|
|
668
703
|
'sd77d82bf43357ecd': `実行中のエージェントのセッションの新しいイベント 1 件を表示`,
|
|
669
|
-
'sd798aaccd0308806': `結果を受けて作成`,
|
|
670
704
|
'sd7d77bef673bd45f': str`入力 ${0}(${1} の出力)に検証エラー`,
|
|
671
705
|
'sd8284849892c5c5a': `タスクの開始前からあるファイルは無効`,
|
|
672
706
|
'sd8a0d0cc52fdaf39': str`${0} まで`,
|
|
@@ -707,9 +741,11 @@
|
|
|
707
741
|
'se60a4867465d5d31': `ハイコントラスト`,
|
|
708
742
|
'se61f0dc09b51fd35': `パイプラインのプロセス内の関数`,
|
|
709
743
|
'se66872955dc59191': `1 タスク`,
|
|
744
|
+
'se6982e1c5d0986ac': `後続タスクはこのタスクの完了を待つが、出力は受け取らない(after)`,
|
|
710
745
|
'se6de387a56331077': `下の階層あり`,
|
|
711
746
|
'se7102b7d5942a59c': str`${0} 回目`,
|
|
712
747
|
'se751edc73f4d0062': `リプレイと新しいセッション`,
|
|
748
|
+
'se7bc5096d48d4c1c': str`タスクの所要時間 ${0}`,
|
|
713
749
|
'se8d06d5375424a9c': str`安全分類器による停止 ${0} 件`,
|
|
714
750
|
'se90f184c6aa3ffbb': `認証情報`,
|
|
715
751
|
'se99de5c72fecbbc3': `ロック`,
|
|
@@ -767,7 +803,9 @@
|
|
|
767
803
|
'sf93c7009f950942a': `合計`,
|
|
768
804
|
'sf9bbecb9ed98e966': `エージェントのセッションが始まらなかった`,
|
|
769
805
|
'sfa04f4ef1995407e': `テキスト`,
|
|
806
|
+
'sfa069139277176df': `待たれなかったタスク 1 件`,
|
|
770
807
|
'sfa251e3af0f9c14c': str`${0} 〜 ${1}`,
|
|
808
|
+
'sfa29dd1ad553ce38': str`あと ${0} 件の見込み(forecast)`,
|
|
771
809
|
'sfa6a5b4597c720bc': `フィルターに一致するタスクなし`,
|
|
772
810
|
'sfa82224480602f92': `ツールのリクエスト`,
|
|
773
811
|
'sfadf0e9dfc4b3030': `修正依頼 1 回で完了`,
|
|
@@ -775,6 +813,8 @@
|
|
|
775
813
|
'sfb33dc608ac218c4': `実行を切り替え`,
|
|
776
814
|
'sfb65f5d860c9a106': str`実行中のエージェントのセッション ${0} 件`,
|
|
777
815
|
'sfbb1f6b888aed522': `失敗した試行`,
|
|
816
|
+
'sfbb84dc71ed5b92e': str`${1} の失敗により ${0} で停止`,
|
|
817
|
+
'sfc4c7372f2d13e91': `外部の状態`,
|
|
778
818
|
'sfc7ed987d0fe9679': `再開カーソルなし`,
|
|
779
819
|
'sfd313341ca75a38d': str`リトライ後に完了 ${0} 件`,
|
|
780
820
|
'sfd5b8cae918b42cb': str`要素 ${0} 個: ${1}`,
|
|
@@ -785,12 +825,14 @@
|
|
|
785
825
|
'sfde497acd6a6a561': `ファイルにない必須フィールド`,
|
|
786
826
|
'sfe771bfc3355dd51': str`${0}: 入力と出力`,
|
|
787
827
|
'sfe9c9abcded61e50': str`プロセス ${0}`,
|
|
828
|
+
'sfefeb008c3ce14ef': `見込み: あと 1 タスク`,
|
|
788
829
|
'sff660af26c203189': `登録済みのタスクはまだありません`,
|
|
789
830
|
'sff83af1548f682c0': str`${0} のタスク`,
|
|
790
831
|
'sffa12312d4ff4b9c': `定義なし`,
|
|
791
832
|
'sfff7f6b9ec291984': str`Python タスク ${0} 回`,
|
|
792
833
|
'stage-done': `完了`,
|
|
793
834
|
'status': `状態`,
|
|
835
|
+
'stop-cancelled': `取り消し`,
|
|
794
836
|
'stop-completed': `完了`,
|
|
795
837
|
'stop-invalid-input': `未実行`,
|
|
796
838
|
'stop-partial': `一部のみ完了`,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Where a flow call stopped (`FlowCallNode.raised_at`, `raised_by`), and the tasks it
|
|
2
|
+
// created that no flow awaited (`FlowCallNode.unawaited`).
|
|
3
|
+
import { runRelative, type FlowCallNode } from '@contraagent/api';
|
|
4
|
+
import { msg, str } from '@lit/localize';
|
|
5
|
+
|
|
6
|
+
/** `module.qualname` as the graph names a function: its last part. */
|
|
7
|
+
const shortFn = (fn: string): string => fn.slice(fn.lastIndexOf('.') + 1) || fn;
|
|
8
|
+
|
|
9
|
+
/** Where an exception left a flow call's own code: `flow.py:42`; '' when not recorded. */
|
|
10
|
+
export function raisedWhere(f: Pick<FlowCallNode, 'raised_at'>, run = ''): string {
|
|
11
|
+
const at = f.raised_at;
|
|
12
|
+
return at ? `${runRelative(at.file, run)}:${at.line}` : '';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** On the failed task: "This failure stopped review_loop at flow.py:42" (without a place: "This failure stopped review_loop"). */
|
|
16
|
+
export function stoppedAt(f: FlowCallNode, run = ''): string {
|
|
17
|
+
const fn = shortFn(f.function);
|
|
18
|
+
const where = raisedWhere(f, run);
|
|
19
|
+
return where ? msg(str`This failure stopped ${fn} at ${where}`) : msg(str`This failure stopped ${fn}`);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** On a flow call that raised: "Stopped at flow.py:42" with the failed task's name, or its own error. */
|
|
23
|
+
export function stoppedHere(f: FlowCallNode, by: string, run = ''): string {
|
|
24
|
+
const where = raisedWhere(f, run);
|
|
25
|
+
if (by) return where ? msg(str`Stopped at ${where} by the failure of ${by}`) : msg(str`Stopped by the failure of ${by}`);
|
|
26
|
+
return where ? msg(str`Stopped at ${where}`) : '';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** A count of a top flow call's unawaited tasks: "2 tasks not awaited". */
|
|
30
|
+
export function unawaitedCount(n: number): string {
|
|
31
|
+
return n === 1 ? msg('1 task not awaited') : msg(str`${n} tasks not awaited`);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** The tooltip of unawaited tasks. */
|
|
35
|
+
export const unawaitedTip = (): string =>
|
|
36
|
+
msg('Tasks whose result no flow awaited, ordered a task after or returned (unawaited); they ran for their output files and changes');
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// The forecast (`Forecast`): the tasks a run is expected to create and has not yet,
|
|
2
|
+
// from the run of its flow that finished last before it.
|
|
3
|
+
import type { Forecast } from '@contraagent/api';
|
|
4
|
+
import { msg, str } from '@lit/localize';
|
|
5
|
+
import { facts, fmtDur, listText, usd } from './format.js';
|
|
6
|
+
|
|
7
|
+
/** A kind node's expected tasks: "+3", and its words. */
|
|
8
|
+
export function expectedPill(n: number): { text: string; label: string } {
|
|
9
|
+
return { text: msg(str`+${n}`), label: n === 1 ? msg('1 more task expected (forecast)') : msg(str`${n} more tasks expected (forecast)`) };
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** The forecast in one line: "Forecast: 7 more tasks | 46s of task time | $0.60". */
|
|
13
|
+
export function forecastLine(f: Forecast): string {
|
|
14
|
+
return facts(
|
|
15
|
+
f.remaining === 1 ? msg('Forecast: 1 more task') : msg(str`Forecast: ${f.remaining} more tasks`),
|
|
16
|
+
f.wall_s ? msg(str`${fmtDur(f.wall_s)} of task time`) : '',
|
|
17
|
+
f.cost_usd !== null && f.cost_usd !== undefined ? usd(f.cost_usd) : '',
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Where the forecast comes from, as its tooltip. */
|
|
22
|
+
export const forecastTip = (f: Forecast): string =>
|
|
23
|
+
msg(str`Tasks this run is expected to create and has not yet, from the run ${f.earlier_run} of the same flow (forecast)`);
|
|
24
|
+
|
|
25
|
+
/** The groups the plan has no task of yet, with how many each is expected to have: "Not in the plan yet: review +3, report +1". */
|
|
26
|
+
export function notInPlanLine(items: readonly { group: string; remaining: number }[]): string {
|
|
27
|
+
return items.length ? msg(str`Not in the plan yet: ${listText(items.map((x) => `${x.group} +${x.remaining}`))}`) : '';
|
|
28
|
+
}
|
package/src/words/format.ts
CHANGED
|
@@ -99,6 +99,25 @@ export function usd(v: number | null | undefined): string {
|
|
|
99
99
|
return `$${v.toFixed(2)}`;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
/** What of the rows' tokens could not be read (`usage_unknown`): `tokens` when any row's,
|
|
103
|
+
* else `calls` when any row's, else ''. */
|
|
104
|
+
export function usageUnknown(rows: readonly { usage_unknown?: string | null }[]): '' | 'calls' | 'tokens' {
|
|
105
|
+
const all = new Set(rows.map((r) => r.usage_unknown ?? ''));
|
|
106
|
+
return all.has('tokens') ? 'tokens' : all.has('calls') ? 'calls' : '';
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** The words for `usage_unknown` (`usageUnknown`): a short label and its tooltip; null when nothing is unknown. */
|
|
110
|
+
export function usageUnknownWords(unknown: '' | 'calls' | 'tokens'): { label: string; tip: string } | null {
|
|
111
|
+
if (unknown === 'calls')
|
|
112
|
+
return {
|
|
113
|
+
label: msg('Tokens per API call unknown'),
|
|
114
|
+
tip: msg('Only the token totals that the coding agent printed are known, not the tokens of each API call (usage_unknown)'),
|
|
115
|
+
};
|
|
116
|
+
if (unknown === 'tokens')
|
|
117
|
+
return { label: msg('Tokens unknown'), tip: msg('The tokens of an agent session that ran are not known (usage_unknown)') };
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
|
|
102
121
|
/** A row's unread event types with their counts (`session_settled ×2, x ×1`); '' when none. */
|
|
103
122
|
export function unreadEvents(rows: readonly { unread_events?: Record<string, number> | null }[]): string {
|
|
104
123
|
const total = new Map<string, number>();
|
package/src/words/index.ts
CHANGED
|
@@ -30,3 +30,7 @@ export * from './context.js';
|
|
|
30
30
|
export * from './preflight.js';
|
|
31
31
|
export * from './task-definition.js';
|
|
32
32
|
export * from './safety.js';
|
|
33
|
+
export * from './lineage.js';
|
|
34
|
+
export * from './rerun.js';
|
|
35
|
+
export * from './flow-calls.js';
|
|
36
|
+
export * from './forecast.js';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// How a task is joined to an earlier one (`Lineage`), in the words of the graph's
|
|
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.
|
|
4
|
+
import type { InputFileCheck, Lineage } from '@contraagent/api';
|
|
5
|
+
import { msg } from '@lit/localize';
|
|
6
|
+
|
|
7
|
+
/** A lineage as the graph's legend names its edge: given output (solid), runs after (dotted), created after result (dashed). */
|
|
8
|
+
export function lineageWord(l: Lineage): string {
|
|
9
|
+
switch (l) {
|
|
10
|
+
case 'given_from':
|
|
11
|
+
return msg('given output', { id: 'edge-given', desc: 'An edge of the pipeline graph: the later task was given the earlier task\'s output (given_from)' });
|
|
12
|
+
case 'after':
|
|
13
|
+
return msg('runs after', { id: 'edge-after', desc: 'An edge of the pipeline graph: the later task waits for the earlier task and is not given its output (order only)' });
|
|
14
|
+
case 'created_from':
|
|
15
|
+
return msg('created after result', { id: 'edge-created', desc: 'An edge of the pipeline graph: the later task was created after the earlier task\'s result (created_from)' });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** A lineage's tooltip: the field of the plan it comes from. */
|
|
20
|
+
export function lineageTip(l: Lineage): string {
|
|
21
|
+
switch (l) {
|
|
22
|
+
case 'given_from':
|
|
23
|
+
return msg('Its output is in the params of the later task (given_from)');
|
|
24
|
+
case 'after':
|
|
25
|
+
return msg('The later task waits for it and is not given its output (after)');
|
|
26
|
+
case 'created_from':
|
|
27
|
+
return msg('Its result reached the flow call just before the flow call created the later task (created_from)');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** An input file's check as its task was about to start. */
|
|
32
|
+
export function inputFileCheckWord(c: InputFileCheck): string {
|
|
33
|
+
switch (c) {
|
|
34
|
+
case 'passed':
|
|
35
|
+
return msg('same content at the start');
|
|
36
|
+
case 'refused':
|
|
37
|
+
return msg('changed before the start');
|
|
38
|
+
case 'not_checked':
|
|
39
|
+
return msg('not checked', { id: 'input-file-not-checked', desc: 'An input file whose task has not started: its content was not compared yet' });
|
|
40
|
+
}
|
|
41
|
+
}
|
package/src/words/outcome.ts
CHANGED
|
@@ -23,6 +23,8 @@ export function outcomeLabel(o: Outcome): string {
|
|
|
23
23
|
return msg('waiting');
|
|
24
24
|
case 'skipped':
|
|
25
25
|
return msg('skipped');
|
|
26
|
+
case 'cancelled':
|
|
27
|
+
return msg('cancelled', { id: 'outcome-cancelled', desc: 'The status of a task that was stopped, or never started, because no part of the pipeline waited for its result any longer (cancelled)' });
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
|
|
@@ -55,6 +57,8 @@ export function stateCount(s: Outcome | 'not_run', n: number): string {
|
|
|
55
57
|
return msg(str`${n} waiting`);
|
|
56
58
|
case 'skipped':
|
|
57
59
|
return msg(str`${n} skipped`);
|
|
60
|
+
case 'cancelled':
|
|
61
|
+
return msg(str`${n} cancelled`);
|
|
58
62
|
case 'not_run':
|
|
59
63
|
return msg(str`${n} not run`);
|
|
60
64
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// Why a resume ran a task again (`JournalRow.rerun`): the parts of its fingerprint that
|
|
2
|
+
// changed, read from `fingerprint_parts`, and a divergence.
|
|
3
|
+
import type { JournalRow } from '@contraagent/api';
|
|
4
|
+
import { msg, str } from '@lit/localize';
|
|
5
|
+
import { facts, listText } from './format.js';
|
|
6
|
+
|
|
7
|
+
/** What a journal row says about a rerun: the parts of the fingerprint that changed since the row before, and whether it is a divergence. */
|
|
8
|
+
export interface Rerun {
|
|
9
|
+
/** The reason as the journal records it. */
|
|
10
|
+
text: string;
|
|
11
|
+
/** The fingerprint's parts whose digest differs from the earlier row's (`definition`, `params`, ...), in the row's order. */
|
|
12
|
+
changed: string[];
|
|
13
|
+
/** The flow gave other params for the same outputs (`divergence: ...`). */
|
|
14
|
+
divergence: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The rerun of `rows[i]` (one task's journal rows, in journal order), or null when the
|
|
19
|
+
* row is no rerun: its `rerun`, the parts of `fingerprint_parts` that differ from the
|
|
20
|
+
* latest earlier row that has them, and whether the reason is a divergence.
|
|
21
|
+
*/
|
|
22
|
+
export function rerunOf(rows: readonly JournalRow[], i: number): Rerun | null {
|
|
23
|
+
const row = rows[i];
|
|
24
|
+
if (!row?.rerun) return null;
|
|
25
|
+
const now = row.fingerprint_parts ?? {};
|
|
26
|
+
const before = rows.slice(0, i).reverse().find((r) => Object.keys(r.fingerprint_parts ?? {}).length)?.fingerprint_parts ?? {};
|
|
27
|
+
const changed = Object.keys(now).length && Object.keys(before).length ? [...new Set([...Object.keys(now), ...Object.keys(before)])].filter((k) => now[k] !== before[k]) : [];
|
|
28
|
+
return { text: row.rerun, changed, divergence: row.rerun.startsWith('divergence') };
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** A part of a fingerprint (`fingerprint_parts`) in words; one these words do not know, as it is recorded. */
|
|
32
|
+
export function fingerprintPartWord(part: string): string {
|
|
33
|
+
switch (part) {
|
|
34
|
+
case 'definition':
|
|
35
|
+
return msg('definition', { id: 'part-definition', desc: 'A part of what defines a task: its instructions, role, schemas, validators or source' });
|
|
36
|
+
case 'params':
|
|
37
|
+
return msg('params', { id: 'part-params', desc: 'A part of what defines a task: what it was given (params)' });
|
|
38
|
+
case 'outside':
|
|
39
|
+
return msg('outside state');
|
|
40
|
+
case 'output_of':
|
|
41
|
+
return msg('the file it fills in');
|
|
42
|
+
case 'input_files':
|
|
43
|
+
return msg('input files', { id: 'part-input-files', desc: 'A part of what defines a task: the files given to it by path and hash' });
|
|
44
|
+
default:
|
|
45
|
+
return part;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** The word for a divergence, and its tooltip. */
|
|
50
|
+
export const divergenceWord = (): string => msg('divergence');
|
|
51
|
+
export const divergenceTip = (): string =>
|
|
52
|
+
msg('The flow gave other params for the same outputs of the tasks before it (divergence): a clock, randomness, outside state or changed flow code');
|
|
53
|
+
|
|
54
|
+
/** A rerun in one line: "Ran again after a resume | divergence | Changed: params"; the recorded reason when no part is known to have changed. */
|
|
55
|
+
export function rerunLine(r: Rerun): string {
|
|
56
|
+
return facts(
|
|
57
|
+
msg('Ran again after a resume'),
|
|
58
|
+
r.divergence ? divergenceWord() : '',
|
|
59
|
+
r.changed.length ? msg(str`Changed: ${listText(r.changed.map(fingerprintPartWord))}`) : r.divergence ? '' : r.text,
|
|
60
|
+
);
|
|
61
|
+
}
|
package/src/words/stop.ts
CHANGED
|
@@ -19,6 +19,8 @@ function knownStopLabel(stop: Stop, reason?: string | null): string {
|
|
|
19
19
|
return msg('done', { id: 'stop-completed', desc: 'How an attempt ended: completed' });
|
|
20
20
|
case 'skipped':
|
|
21
21
|
return msg('skipped');
|
|
22
|
+
case 'cancelled':
|
|
23
|
+
return msg('cancelled', { id: 'stop-cancelled', desc: 'How an attempt ended: cancelled, because no part of the pipeline waited for its result any longer' });
|
|
22
24
|
case 'partial':
|
|
23
25
|
return msg('partly done', { id: 'stop-partial', desc: 'How an attempt ended: partial, its output a placeholder' });
|
|
24
26
|
case 'invalid_input': {
|