teamsmith 0.2.0 → 0.3.1

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 (163) hide show
  1. package/README.md +4 -4
  2. package/package.json +1 -1
  3. package/skills/teamsmith/CHANGELOG.md +69 -0
  4. package/skills/teamsmith/SKILL.md +20 -13
  5. package/skills/teamsmith/extension/team-inbox-watch.ts +5 -3
  6. package/skills/teamsmith/extension/team-notify.ts +37 -6
  7. package/skills/teamsmith/extension/team.ts +438 -0
  8. package/skills/teamsmith/references/config.md +39 -6
  9. package/skills/teamsmith/references/migration.md +197 -47
  10. package/skills/teamsmith/references/protocol.md +201 -30
  11. package/skills/teamsmith/references/troubleshooting.md +130 -10
  12. package/skills/teamsmith/references/workflows.md +36 -2
  13. package/skills/teamsmith/scripts/lib/cmd-agents.sh +318 -23
  14. package/skills/teamsmith/scripts/lib/cmd-bootstrap.sh +2 -2
  15. package/skills/teamsmith/scripts/lib/cmd-config.sh +349 -67
  16. package/skills/teamsmith/scripts/lib/cmd-draft.sh +4 -4
  17. package/skills/teamsmith/scripts/lib/cmd-help.sh +677 -0
  18. package/skills/teamsmith/scripts/lib/cmd-init.sh +157 -5
  19. package/skills/teamsmith/scripts/lib/cmd-interrupt.sh +461 -0
  20. package/skills/teamsmith/scripts/lib/cmd-meeting.sh +2 -25
  21. package/skills/teamsmith/scripts/lib/cmd-project.sh +30 -103
  22. package/skills/teamsmith/scripts/lib/cmd-reap.sh +277 -0
  23. package/skills/teamsmith/scripts/lib/cmd-reply.sh +3 -3
  24. package/skills/teamsmith/scripts/lib/cmd-review.sh +182 -32
  25. package/skills/teamsmith/scripts/lib/cmd-status.sh +234 -21
  26. package/skills/teamsmith/scripts/lib/cmd-update.sh +36 -7
  27. package/skills/teamsmith/scripts/lib/cmd-watch.sh +564 -46
  28. package/skills/teamsmith/scripts/lib/common.sh +1004 -245
  29. package/skills/teamsmith/scripts/lib/gate-lock.sh +582 -0
  30. package/skills/teamsmith/scripts/panel/draft-send.sh +11 -1
  31. package/skills/teamsmith/scripts/panel/panel.js +211 -211
  32. package/skills/teamsmith/scripts/panel/src/App.tsx +58 -21
  33. package/skills/teamsmith/scripts/panel/src/clipboard.ts +12 -5
  34. package/skills/teamsmith/scripts/panel/src/compose.ts +6 -3
  35. package/skills/teamsmith/scripts/panel/src/data.ts +51 -5
  36. package/skills/teamsmith/scripts/panel/src/layout.ts +209 -69
  37. package/skills/teamsmith/scripts/panel/src/main.tsx +37 -8
  38. package/skills/teamsmith/scripts/panel/src/strings/en.ts +39 -29
  39. package/skills/teamsmith/scripts/panel/src/strings/zh.ts +41 -31
  40. package/skills/teamsmith/scripts/panel/src/types.ts +28 -3
  41. package/skills/teamsmith/scripts/replies.mjs +4 -1
  42. package/skills/teamsmith/scripts/shim/killall +10 -0
  43. package/skills/teamsmith/scripts/shim/pgrep +10 -0
  44. package/skills/teamsmith/scripts/shim/pidof +10 -0
  45. package/skills/teamsmith/scripts/shim/pkill +10 -0
  46. package/skills/teamsmith/scripts/shim/signal-gate +108 -31
  47. package/skills/teamsmith/scripts/shim/tmux +18 -0
  48. package/skills/teamsmith/scripts/strings/commands.tsv +86 -0
  49. package/skills/teamsmith/scripts/strings/help.en.tsv +503 -0
  50. package/skills/teamsmith/scripts/strings/help.zh.tsv +489 -0
  51. package/skills/teamsmith/scripts/team +19 -6
  52. package/skills/teamsmith/templates/AGENTS.section.md.tmpl +8 -1
  53. package/skills/teamsmith/templates/config.sh.tmpl +20 -1
  54. package/skills/teamsmith/templates/pm-prompt.md.tmpl +21 -0
  55. package/skills/teamsmith/tests/README.md +31 -0
  56. package/skills/teamsmith/tests/bg-ledger-harness.mjs +464 -40
  57. package/skills/teamsmith/tests/bg-ledger.sh +168 -10
  58. package/skills/teamsmith/tests/checkout-shape-probe.sh +83 -54
  59. package/skills/teamsmith/tests/config-cli.sh +184 -32
  60. package/skills/teamsmith/tests/fixtures/delivery-truth-real/scenario.sh +7 -1
  61. package/skills/teamsmith/tests/fixtures/p287/lint-good.sh.in +3 -0
  62. package/skills/teamsmith/tests/fixtures/p287/lint-hardcoded.sh.in +3 -0
  63. package/skills/teamsmith/tests/fixtures/p287/lint-no-ns.sh.in +3 -0
  64. package/skills/teamsmith/tests/fixtures/p55/flip-p49.sh +18 -6
  65. package/skills/teamsmith/tests/flip-m33.sh +5 -3
  66. package/skills/teamsmith/tests/flip-p158.sh +2 -1
  67. package/skills/teamsmith/tests/flip-p308-skip-not-pass.sh +151 -0
  68. package/skills/teamsmith/tests/flip-p310-lock.sh +210 -0
  69. package/skills/teamsmith/tests/flip-p310-socket.sh +125 -0
  70. package/skills/teamsmith/tests/gate-guard.sh +52 -79
  71. package/skills/teamsmith/tests/help-surface.sh +1664 -0
  72. package/skills/teamsmith/tests/install-shape.sh +359 -22
  73. package/skills/teamsmith/tests/key-replies-pty.sh +9 -10
  74. package/skills/teamsmith/tests/key-replies-ui.sh +2 -8
  75. package/skills/teamsmith/tests/key-replies.sh +281 -28
  76. package/skills/teamsmith/tests/ledger-ban.sh +5 -4
  77. package/skills/teamsmith/tests/ledger-claim.sh +2 -1
  78. package/skills/teamsmith/tests/lib/bounded-spin.sh +90 -0
  79. package/skills/teamsmith/tests/lib/model-policy.sh +4 -0
  80. package/skills/teamsmith/tests/lib/model-routing-flips.py +51 -0
  81. package/skills/teamsmith/tests/lib/pty-wait.sh +21 -111
  82. package/skills/teamsmith/tests/lib/reply-fixture.sh +4 -9
  83. package/skills/teamsmith/tests/lib/section-guard.sh +316 -164
  84. package/skills/teamsmith/tests/lib/tmp-root.sh +139 -27
  85. package/skills/teamsmith/tests/lib/tmux-cap.sh +10 -1
  86. package/skills/teamsmith/tests/lib/tmux-iso.sh +31 -13
  87. package/skills/teamsmith/tests/loop-inventory.tsv +83 -77
  88. package/skills/teamsmith/tests/panel-b2.sh +430 -352
  89. package/skills/teamsmith/tests/panel-b3-stub.sh +112 -4
  90. package/skills/teamsmith/tests/panel-b3.sh +314 -62
  91. package/skills/teamsmith/tests/panel-choices.sh +11 -6
  92. package/skills/teamsmith/tests/panel-cpu.sh +43 -130
  93. package/skills/teamsmith/tests/panel-p21.sh +251 -265
  94. package/skills/teamsmith/tests/panel-snapshots.sh +41 -225
  95. package/skills/teamsmith/tests/panel-strings.mjs +33 -18
  96. package/skills/teamsmith/tests/perf.sh +187 -396
  97. package/skills/teamsmith/tests/routes.sh +440 -117
  98. package/skills/teamsmith/tests/seat-interrupt.sh +1012 -0
  99. package/skills/teamsmith/tests/seat-visibility.sh +675 -0
  100. package/skills/teamsmith/tests/section-guard.sh +13 -102
  101. package/skills/teamsmith/tests/section-needs-audit.sh +24 -7
  102. package/skills/teamsmith/tests/section-paths.tsv +32 -18
  103. package/skills/teamsmith/tests/section-select.sh +371 -19
  104. package/skills/teamsmith/tests/signal-gate.sh +249 -27
  105. package/skills/teamsmith/tests/signal-lint-legacy.txt +4 -1
  106. package/skills/teamsmith/tests/slash-team-e2e.sh +323 -0
  107. package/skills/teamsmith/tests/slash-team.sh +617 -0
  108. package/skills/teamsmith/tests/slice-coverage.sh +206 -0
  109. package/skills/teamsmith/tests/smoke.sh +3595 -788
  110. package/skills/teamsmith/tests/task-model-routing.sh +530 -15
  111. package/skills/teamsmith/tests/team-bg-stop.sh +18 -10
  112. package/skills/teamsmith/tests/tmp-hygiene.sh +782 -45
  113. package/skills/teamsmith/tests/tmux-identity-leak.sh +773 -0
  114. package/skills/teamsmith/tests/tmux-lint-legacy.txt +12 -18
  115. package/skills/teamsmith/tests/upgrade-recipe.sh +537 -0
  116. package/skills/teamsmith/tests/workflow-entry.sh +207 -0
  117. package/skills/teamsmith-init/SKILL.md +12 -12
  118. package/skills/teamsmith-init/references/bootstrap.md +3 -3
  119. package/skills/teamsmith/tests/flip-glue.sh +0 -162
  120. package/skills/teamsmith/tests/flip-m12-26c.sh +0 -129
  121. package/skills/teamsmith/tests/flip-m12.sh +0 -185
  122. package/skills/teamsmith/tests/flip-m16.sh +0 -166
  123. package/skills/teamsmith/tests/flip-m17.sh +0 -204
  124. package/skills/teamsmith/tests/flip-m34.sh +0 -96
  125. package/skills/teamsmith/tests/flip-m37.sh +0 -185
  126. package/skills/teamsmith/tests/flip-m4.3.sh +0 -375
  127. package/skills/teamsmith/tests/flip-m43.sh +0 -128
  128. package/skills/teamsmith/tests/flip-m45.sh +0 -244
  129. package/skills/teamsmith/tests/flip-m46.sh +0 -238
  130. package/skills/teamsmith/tests/flip-m48.sh +0 -304
  131. package/skills/teamsmith/tests/flip-m6.2.sh +0 -205
  132. package/skills/teamsmith/tests/flip-m6.3.sh +0 -283
  133. package/skills/teamsmith/tests/flip-m6.4.sh +0 -267
  134. package/skills/teamsmith/tests/flip-m6.5.sh +0 -113
  135. package/skills/teamsmith/tests/flip-m7.1.sh +0 -135
  136. package/skills/teamsmith/tests/flip-m7.2.sh +0 -321
  137. package/skills/teamsmith/tests/flip-p144.sh +0 -112
  138. package/skills/teamsmith/tests/flip-p156.sh +0 -133
  139. package/skills/teamsmith/tests/flip-p160.sh +0 -182
  140. package/skills/teamsmith/tests/flip-p171.sh +0 -249
  141. package/skills/teamsmith/tests/flip-p18.1.sh +0 -95
  142. package/skills/teamsmith/tests/flip-p20.sh +0 -286
  143. package/skills/teamsmith/tests/flip-p201.sh +0 -249
  144. package/skills/teamsmith/tests/flip-p210.sh +0 -239
  145. package/skills/teamsmith/tests/flip-p211.sh +0 -152
  146. package/skills/teamsmith/tests/flip-p217.sh +0 -288
  147. package/skills/teamsmith/tests/flip-p22.sh +0 -123
  148. package/skills/teamsmith/tests/flip-p23.sh +0 -239
  149. package/skills/teamsmith/tests/flip-p25.sh +0 -165
  150. package/skills/teamsmith/tests/flip-p71.sh +0 -184
  151. package/skills/teamsmith/tests/flip-p72.sh +0 -202
  152. package/skills/teamsmith/tests/load-experiment.sh +0 -290
  153. package/skills/teamsmith/tests/panel-cpu-premise.sh +0 -173
  154. package/skills/teamsmith/tests/panel-flip-m54.sh +0 -207
  155. package/skills/teamsmith/tests/panel-flip-p123.sh +0 -278
  156. package/skills/teamsmith/tests/panel-flip-p125.sh +0 -318
  157. package/skills/teamsmith/tests/panel-flip-p128.sh +0 -259
  158. package/skills/teamsmith/tests/panel-keyprobe-stub.sh +0 -41
  159. package/skills/teamsmith/tests/panel-keyprobe.sh +0 -82
  160. package/skills/teamsmith/tests/panel-knobs.sh +0 -83
  161. package/skills/teamsmith/tests/section-budgets.tsv +0 -154
  162. package/skills/teamsmith/tests/team-bg-flip.sh +0 -239
  163. package/skills/teamsmith/tests/team-inbox-watch-flip.sh +0 -191
@@ -99,6 +99,7 @@ export const en = {
99
99
  // Detail view (read-only)
100
100
  detailTitle: 'detail {id}',
101
101
  detailNoFiles: '(no associated files for this entry)',
102
+ detailUnavailable: '(source unavailable: {reason})',
102
103
  detailTruncated: '… truncated (first 128 KiB shown)',
103
104
  detailLoading: '… loading',
104
105
 
@@ -185,19 +186,18 @@ export const en = {
185
186
  group_workflow: 'Workflow & gates',
186
187
  group_delivery: 'Capacity & delivery',
187
188
  group_panel: 'Pulse & panel',
188
- group_patrol: 'Patrol policy',
189
+ group_patrol: 'Patrol',
189
190
  'group_pm-lifecycle': 'PM lifecycle',
190
191
  group_session: 'Live sessions',
191
192
  group_meeting: 'Cross-project meetings',
192
193
  settingsGroupUngrouped: 'Ungrouped',
193
- settingsGroupCategories: 'Task categories (future policy)',
194
- settingsGroupAssignments: 'Committed assignments (read-only)',
194
+ settingsGroupCategories: 'The model the next task will use',
195
+ settingsGroupAssignments: 'The model running tasks actually use',
195
196
  settingsBadgeApply: 'apply',
196
197
  settingsBadgeRestart: 'restart',
197
- settingsBadgeRefuse: 'read-only',
198
- settingsUnknownBadge: 'unknown key',
198
+ settingsBadgeRefuse: 'change in file',
199
+ settingsUnknownBadge: 'not recognized',
199
200
  settingsUnset: 'unset · default {value}',
200
- settingsAuditHeading: 'Audit (newest)',
201
201
  settingsKeyHint: '↑/↓ rows · Enter edit · / filter · Esc back',
202
202
  keyFilter: '/ filter',
203
203
  settingFilterTitle: 'Filter settings',
@@ -207,51 +207,52 @@ export const en = {
207
207
  settingDanger: 'Danger: {reason} (press Enter once more to confirm)',
208
208
  settingRejected: '✗ refused: {line}',
209
209
  settingWritten: '✓ wrote {key} = {value} · {timing}',
210
- settingRefused: '✗ read-only key: {line}',
210
+ settingRefused: '✗ this value is changed in the project config file: {line}',
211
211
  settingInvalid: '✗ invalid value: {line}',
212
212
  settingConflict: '! the contract changed under the editor (fingerprint mismatch) — nothing written; reloaded',
213
213
  settingWriteError: '✗ write failed (file unchanged): {line}',
214
- settingsRefusedRoute: 'read-only key: edit .pi/team/config.sh by hand',
215
- settingsCategoryHint: 'category {category}: team config set-task-model {category} <model> — new tasks only; a committed task keeps its model/SID (this row never composes the map)',
214
+ settingsRefusedRoute: 'change this value in the project config file .pi/team/config.sh; the panel cannot change it',
215
+ settingsCategoryHint: 'category {category}: team config set-task-model {category} <model> — new tasks only; a task already dispatched keeps the model it was given (this row never composes the map)',
216
216
  settingsCategoryRow: 'category {category}',
217
217
  settingsCategoryModel: 'model {model}',
218
218
  settingsCategoryBadge: 'new tasks',
219
219
  settingsCategoryPickerTitle: 'Pick the model for category {category}',
220
- settingsCategoryPickerHint: '↑/↓ choose · Enter writes that value now · only free text opens the editor · Esc back (new tasks only; a committed task keeps its model/SID and no process is restarted)',
220
+ settingsCategoryPickerHint: '↑/↓ choose · Enter writes that value now · only free text opens the editor · Esc back (new tasks only; a task already dispatched keeps the model it was given and no process is restarted)',
221
221
  settingsCategoryMapHint: 'the categories block is this row’s editor (command: team config set-task-model <category> <model>) — the pair list is never composed in the console',
222
222
  settingsCategoryMapEmpty: 'the categories block is this row’s editor (command: team config set-task-model <category> <model>) — the map is empty today; add a category through the CLI first',
223
- settingsAssignmentHint: 'read-only: the actual model comes from a committed dispatch record (decided by dispatch/resume), not from the future policy above',
224
- settingsAssignmentNote: 'task {task} · category {category} · SID {sid} · origin {selected}/{launch}',
225
- settingsAssignmentNone: 'no complete dispatch record: {diagnostic}',
226
- settingsReadOnlyBadge: 'read-only',
227
- settingsPmLaunchLabel: 'PM launch record',
223
+ settingsAssignmentHint: 'once a task is dispatched it keeps the model it was given; this setting does not change it',
224
+ settingsAssignmentNote: 'task {task} · category {category} · session {sid} · origin {selected}/{launch}',
225
+ settingsAssignmentNone: 'this seat has not been given a task yet',
226
+ settingsAssignmentUnreadable: 'this seat was given a task, but its record could not be read, so the panel does not show its model',
227
+ settingsReadOnlyBadge: 'change in file',
228
+ settingsPmLaunchLabel: 'last PM start',
228
229
  settingsPmLaunchNote: 'window {window} · {mode} · {time}',
229
- settingsPmLaunchHint: 'read-only: the PM’s actual launch record (state/pm-launch.env)',
230
- settingsDiagnosisHeading: 'Policy migration diagnosis',
230
+ settingsPmLaunchHint: 'the model the PM used the last time it started; it cannot be changed here',
231
+ settingsDiagnosisHeading: 'these settings need an upgrade',
231
232
  settingsCliHint: 'CLI: team config set {key} <value>',
232
- settingsRefusedHint: 'read-only: edit {key} in .pi/team/config.sh by hand',
233
- settingsUnknownHint: 'unknown key: {key} is in the file but not in the command schema',
233
+ settingsRefusedHint: 'change this value in the project config file .pi/team/config.sh; the panel cannot change it',
234
+ settingsUnknownHint: '{key}: the file carries this setting but the tool does not know it; the panel cannot change it',
234
235
  settingsChoiceTitle: 'Choose a value for {label} · {key}',
235
236
  settingsChoiceHint: '↑/↓ choose · Enter writes that value now (danger needs one more) · only free text opens the editor · Esc back',
236
237
  settingsChoiceCurrent: 'current',
237
238
  settingsChoiceDefault: 'default',
238
- settingsChoiceKeepUnset: 'keep unset (cancel writes nothing and leaves no audit line)',
239
+ settingsChoiceKeepUnset: 'keep unset (cancel, nothing written)',
239
240
  settingsChoiceClear: 'clear (write the empty value)',
240
241
  settingsChoiceFree: '… (free text)',
241
242
  settingsChoiceInterval: 'accepted interval {min}–{max} (empty = unbounded)',
242
243
  settingsChoiceNoChoice: 'the kind {kind} has no choice set; the command still validates the write (Enter opens free text)',
243
- settingCategoryConfirm: 'Confirm category {category}: {old} → {next} · new tasks only; a committed task keeps its model/SID (Enter again to write)',
244
- settingCategoryWritten: '✓ wrote category {category} = {value} · new tasks only; committed tasks keep their model/SID; no process was restarted',
245
- settingPmWritten: '✓ wrote the PM model = {value} · takes effect on the next team up (changing the model needs fresh-pm, judged by the launch guard); no process was restarted',
244
+ settingCategoryConfirm: 'Confirm category {category}: {old} → {next} · new tasks only; a task already dispatched keeps the model it was given (Enter again to write)',
245
+ settingCategoryWritten: '✓ wrote category {category} = {value} · new tasks only; tasks already dispatched keep the model they were given; no process was restarted',
246
+ settingPmWritten: '✓ wrote the PM model = {value} · changing the model needs team up --fresh-pm, which starts a new conversation; no process was restarted',
246
247
  settingsBoolOn: 'on (1)',
247
248
  settingsBoolOff: 'off (0)',
248
249
  settingsPathExists: 'exists',
249
250
  settingsPathMissing: 'missing',
250
251
  settingsPathNotExec: 'not executable',
251
252
  keyCategoryPick: 'Enter edit',
252
- seatSourceExplicit: 'explicit',
253
- seatSourcePolicy: 'category policy',
254
- seatSourceAssignment: 'assignment',
253
+ seatSourceExplicit: 'chosen at dispatch',
254
+ seatSourcePolicy: 'set by category',
255
+ seatSourceAssignment: 'kept from the record',
255
256
 
256
257
  // The human labels of the contract keys (M49): one per key of `lib/cmd-config.sh`'s schema, and
257
258
  // the row's main text — the bare TEAM_* stays where it aligns with the CLI (the editor's title,
@@ -270,6 +271,7 @@ export const en = {
270
271
  label_TEAM_SPEC_DIR: 'Spec dir',
271
272
  label_TEAM_ROOT: 'Project root',
272
273
  label_TEAM_MAIN_ROOT: 'Main checkout root',
274
+ label_TEAM_TMP_ROOT: 'Temp root',
273
275
  label_TEAM_CONFIG_FILE: 'Contract file',
274
276
  // -- branch and forge (read-only)
275
277
  label_TEAM_BRANCH_MODE: 'Branch naming mode',
@@ -314,7 +316,9 @@ export const en = {
314
316
  // -- task categories and the PM model (apply/restart)
315
317
  label_TEAM_TASK_MODELS: 'Task category models',
316
318
  label_TEAM_PM_MODEL: 'PM model',
319
+ label_TEAM_CONFIG_VERSION: 'Config shape version',
317
320
  // -- workflow and gates
321
+ label_TEAM_UPDATE_CHECK: 'Startup version notice',
318
322
  label_TEAM_GATES: 'Gate commands',
319
323
  label_TEAM_INSTALL_CMD: 'Install command',
320
324
  label_TEAM_TASK_BRANCH_RESET: 'Reset task branch',
@@ -342,9 +346,13 @@ export const en = {
342
346
  label_TEAM_NOTIFY_DEDUP_SEC: 'Notify dedup window',
343
347
  label_TEAM_INBOX_MAX_CHARS: 'Inbox summary chars',
344
348
  label_TEAM_NOTIFY_LOG: 'Notify debug log',
349
+ label_TEAM_NOTIFY_DETAIL_MAX: 'Notify detail bound',
345
350
  label_TEAM_DEFER_TTL: 'Queued delivery TTL',
346
351
  label_TEAM_OUTBOX_MAX: 'Outbox cap',
347
352
  label_TEAM_PANEL_DETAIL_CAP: 'Detail read cap',
353
+ label_TEAM_ORPHAN_WARN_MB: 'Orphan memory hint',
354
+ label_TEAM_ORPHAN_SCAN: 'Scan orphan seats',
355
+ label_TEAM_ORPHAN_PROC_ROOT: 'Census proc root',
348
356
  // -- pulse and panel (needs a restart)
349
357
  label_TEAM_PULSE_INTERVAL: 'Patrol interval',
350
358
  label_TEAM_MONITOR_REFRESH: 'Panel refresh period',
@@ -395,18 +403,19 @@ export const en = {
395
403
  replyEmpty: '(no key replies yet)',
396
404
  replyUnavailable: '(unavailable)',
397
405
  replyLatestUnavailable: 'latest reply unavailable: {reason}',
398
- replyDeclared: 'declared by {from} · {at}',
399
- replyDeclaredShort: 'declared by {from}',
406
+ replyDeclared: 'from {from} · {at}',
407
+ replyDeclaredShort: 'from {from}',
400
408
  replySlotUnavailable: '#{no} unavailable',
401
409
  replyLoading: '… loading',
402
410
  replyBodyMissing: 'this reply is unavailable',
403
- replyBodyHint: 'read-only · declared publisher, not verified',
411
+ replyBodyHint: 'read-only · shown as published',
404
412
  replyOlder: 'Older',
405
413
  replyNewer: 'Newer',
406
414
  replyBack: 'Back',
407
415
  replyScrollHint: '↑/↓ PgUp/PgDn Home/End scroll',
408
416
  replyTotalSlots: '{n} numbered slots',
409
417
  replyTailWarning: 'the index tail is incomplete (the last append did not finish)',
418
+ replyPageNote: '"who is this reply written for?" — replies the PM wrote for the user',
410
419
 
411
420
  // Global keys (footer)
412
421
  keyCompose: 'm compose',
@@ -437,6 +446,7 @@ export const en = {
437
446
  receiptQueued: '… queued (the PM is typing) · queued',
438
447
  receiptHeld: '! held (copy under state/outbox/held/) · held',
439
448
  receiptError: '✗ delivery unconfirmed · {detail}',
449
+ draftNotCleared: '✗ settled, but the draft file could not be emptied: {file} (the text stays in the input line)',
440
450
  flushOk: '✓ flush · {detail}',
441
451
  flushFail: '✗ flush failed · {detail}',
442
452
  standbyOkOn: '✓ standby on (reason: {reason})',
@@ -99,6 +99,7 @@ export const zh = {
99
99
  // 详情视图(只读)
100
100
  detailTitle: '详情 {id}',
101
101
  detailNoFiles: '(这个入口没有关联文件)',
102
+ detailUnavailable: '(来源不可用:{reason})',
102
103
  detailTruncated: '… 已截断(只显示前 128 KiB)',
103
104
  detailLoading: '… 读取中',
104
105
 
@@ -178,25 +179,24 @@ export const zh = {
178
179
  // P30/D2:分组按 schema 行的第 10 列(`group_<token>`),不再是类分组——三个类分组标签已删。
179
180
  group_identity: '身份与账本布局',
180
181
  group_branch: '分支与 forge',
181
- group_policy: '权限与依赖策略',
182
+ group_policy: '权限与依赖',
182
183
  group_roster: '名册、模型解析与适配器',
183
184
  'group_task-model': '任务类别与 PM 模型',
184
185
  group_workflow: '工作流与门禁',
185
186
  group_delivery: '容量与投递通知',
186
187
  group_panel: '巡检与面板',
187
- group_patrol: '巡检策略',
188
+ group_patrol: '巡检',
188
189
  'group_pm-lifecycle': 'PM 生命周期',
189
190
  group_session: '活着的会话',
190
191
  group_meeting: '跨项目会议',
191
192
  settingsGroupUngrouped: '未分组',
192
- settingsGroupCategories: '任务类别(未来策略)',
193
- settingsGroupAssignments: '实际派单记录(只读)',
193
+ settingsGroupCategories: '下一次派任务会用的模型',
194
+ settingsGroupAssignments: '正在运行的任务实际使用的模型',
194
195
  settingsBadgeApply: '立即生效',
195
196
  settingsBadgeRestart: '需重启',
196
- settingsBadgeRefuse: '只读',
197
- settingsUnknownBadge: '未知键',
197
+ settingsBadgeRefuse: '不可改',
198
+ settingsUnknownBadge: '不认识',
198
199
  settingsUnset: '未设 · 默认 {value}',
199
- settingsAuditHeading: '审计(最近)',
200
200
  settingsKeyHint: '↑/↓ 行 · Enter 编辑 · / 筛选 · Esc 返回',
201
201
  keyFilter: '/ 筛选',
202
202
  settingFilterTitle: '筛选设置',
@@ -206,51 +206,52 @@ export const zh = {
206
206
  settingDanger: '危险:{reason}(再按一次 Enter 确认)',
207
207
  settingRejected: '✗ 被拒:{line}',
208
208
  settingWritten: '✓ 已写入 {key} = {value} · {timing}',
209
- settingRefused: '✗ 只读键:{line}',
209
+ settingRefused: '✗ 这个值要在项目配置文件里改:{line}',
210
210
  settingInvalid: '✗ 值不合法:{line}',
211
211
  settingConflict: '! 契约在编辑器打开后变过(指纹不符)—— 什么都没写;已重读',
212
212
  settingWriteError: '✗ 写入失败(原文件未动):{line}',
213
- settingsRefusedRoute: '只读键:手改 .pi/team/config.sh',
214
- settingsCategoryHint: '类别 {category}:team config set-task-model {category} <model> —— 只影响新任务;已派任务保留原模型/SID(这一行不组合映射)',
213
+ settingsRefusedRoute: '这个值要改项目配置文件 .pi/team/config.sh,界面不能改',
214
+ settingsCategoryHint: '类别 {category}:team config set-task-model {category} <model> —— 只影响以后派的新任务;已经派出去的任务继续用它当时的模型(这一行不组合映射)',
215
215
  settingsCategoryRow: '类别 {category}',
216
216
  settingsCategoryModel: '模型 {model}',
217
217
  settingsCategoryBadge: '新任务',
218
218
  settingsCategoryPickerTitle: '选择类别 {category} 的模型',
219
- settingsCategoryPickerHint: '↑/↓ 选择 · Enter 直接写入该值 ·「自由输入」才进编辑器 · Esc 返回(只影响新任务;已派任务保留原模型/SID,没有进程被重启)',
219
+ settingsCategoryPickerHint: '↑/↓ 选择 · Enter 直接写入该值 ·「自由输入」才进编辑器 · Esc 返回(只影响以后派的新任务;已经派出去的任务继续用它当时的模型,没有进程被重启)',
220
220
  settingsCategoryMapHint: '类别块就是这一行的编辑器(命令:team config set-task-model <category> <model>)—— 映射在面板里绝不被组合',
221
221
  settingsCategoryMapEmpty: '类别块就是这一行的编辑器(命令:team config set-task-model <category> <model>)—— 当前映射为空,先用 CLI 添加一个类别',
222
- settingsAssignmentHint: '只读:实际模型来自已提交的派单记录(由 dispatch/resume 决定),不是上面的未来策略',
223
- settingsAssignmentNote: '任务 {task} · 类别 {category} · SID {sid} · 来源 {selected}/{launch}',
224
- settingsAssignmentNone: '没有完整派单记录:{diagnostic}',
225
- settingsReadOnlyBadge: '只读',
226
- settingsPmLaunchLabel: 'PM 启动记录',
222
+ settingsAssignmentHint: '任务派出去以后就固定用它当时的模型,不跟着上面的设置变',
223
+ settingsAssignmentNote: '任务 {task} · 类别 {category} · 会话 {sid} · 来源 {selected}/{launch}',
224
+ settingsAssignmentNone: '这个席位还没有派过任务',
225
+ settingsAssignmentUnreadable: '这个席位派过任务,但它的记录读不出来,面板不显示它在用的模型',
226
+ settingsReadOnlyBadge: '不可改',
227
+ settingsPmLaunchLabel: 'PM 上次启动',
227
228
  settingsPmLaunchNote: '窗口 {window} · {mode} · {time}',
228
- settingsPmLaunchHint: '只读:PM 的实际启动记录(state/pm-launch.env)',
229
- settingsDiagnosisHeading: '策略迁移诊断',
229
+ settingsPmLaunchHint: 'PM 上一次启动时用的模型,这里不能改',
230
+ settingsDiagnosisHeading: '旧设置需要升级',
230
231
  settingsCliHint: '命令行:team config set {key} <新值>',
231
- settingsRefusedHint: '只读:手改 .pi/team/config.sh 里的 {key}',
232
- settingsUnknownHint: '未知键:{key} 在文件里,命令的 schema 不认识',
232
+ settingsRefusedHint: '这个值要改项目配置文件 .pi/team/config.sh,界面不能改',
233
+ settingsUnknownHint: '{key}:这个设置在文件里,工具不认识它,面板不能改',
233
234
  settingsChoiceTitle: '选择 {label} 的值 · {key}',
234
235
  settingsChoiceHint: '↑/↓ 选择 · Enter 直接写入该值(危险值再按一次确认)· 「自由输入」才进编辑器 · Esc 返回',
235
236
  settingsChoiceCurrent: '当前',
236
237
  settingsChoiceDefault: '默认',
237
- settingsChoiceKeepUnset: '保持未设(取消 = 不写、不留审计)',
238
+ settingsChoiceKeepUnset: '保持未设(取消,什么都不写)',
238
239
  settingsChoiceClear: '清空(写入空值)',
239
240
  settingsChoiceFree: '…(自由输入)',
240
241
  settingsChoiceInterval: '接受区间 {min}–{max}(空 = 无界)',
241
242
  settingsChoiceNoChoice: '{kind} 这种 kind 没有选项集;写入仍由命令校验(Enter 打开自由输入)',
242
- settingCategoryConfirm: '确认类别 {category}:{old} → {next} · 只影响新任务;已派任务保留原模型/SID(再按 Enter 写入)',
243
- settingCategoryWritten: '✓ 已写入类别 {category} = {value} · 只影响新任务;已派任务保留原模型/SID;没有重启任何进程',
244
- settingPmWritten: '✓ 已写入 PM 模型 = {value} · 下次 team up 启动时生效(换模型须 fresh-pm,由启动守卫判定);没有重启任何进程',
243
+ settingCategoryConfirm: '确认类别 {category}:{old} → {next} · 只影响以后派的新任务;已经派出去的任务继续用它当时的模型(再按 Enter 写入)',
244
+ settingCategoryWritten: '✓ 已写入类别 {category} = {value} · 只影响以后派的新任务;已经派出去的任务继续用它当时的模型;没有重启任何进程',
245
+ settingPmWritten: '✓ 已写入 PM 模型 = {value} · 换模型要用 team up --fresh-pm 重开一场对话;没有重启任何进程',
245
246
  settingsBoolOn: '开(1)',
246
247
  settingsBoolOff: '关(0)',
247
248
  settingsPathExists: '存在',
248
249
  settingsPathMissing: '不存在',
249
250
  settingsPathNotExec: '不是可执行文件',
250
251
  keyCategoryPick: 'Enter 编辑',
251
- seatSourceExplicit: '显式',
252
- seatSourcePolicy: '类别策略',
253
- seatSourceAssignment: '已派记录',
252
+ seatSourceExplicit: '派单时指定',
253
+ seatSourcePolicy: '按类别设置',
254
+ seatSourceAssignment: '沿用原记录',
254
255
 
255
256
  // 契约键的人话标签(M49):`lib/cmd-config.sh` 的 schema 每个键一条,行的主文本用它,
256
257
  // 裸 TEAM_* 只留在与 CLI 对齐的地方(编辑器标题、确认行、视图底部的命令行提示)。
@@ -268,6 +269,7 @@ export const zh = {
268
269
  label_TEAM_SPEC_DIR: '规格目录',
269
270
  label_TEAM_ROOT: '项目根',
270
271
  label_TEAM_MAIN_ROOT: '主检出根',
272
+ label_TEAM_TMP_ROOT: '临时根目录',
271
273
  label_TEAM_CONFIG_FILE: '契约文件',
272
274
  // —— 分支与托管平台(只读)
273
275
  label_TEAM_BRANCH_MODE: '分支命名模式',
@@ -281,7 +283,7 @@ export const zh = {
281
283
  label_TEAM_GITLAB_PROJECT: 'GitLab 项目',
282
284
  label_TEAM_GITLAB_TOKEN_FILE: 'GitLab 凭据文件',
283
285
  label_TEAM_MERGE_PREFER_THEIRS: '冲突默认取分支侧',
284
- // —— 权限与依赖策略(只读)
286
+ // —— 权限与依赖(不可改)
285
287
  label_TEAM_CONFIRM_WRITES: '写入前确认',
286
288
  label_TEAM_ALLOW_FOREIGN_IDENTITY: '放行外部身份',
287
289
  label_TEAM_ALLOW_FOREIGN_SESSION: '放行外部会话',
@@ -312,7 +314,9 @@ export const zh = {
312
314
  // —— 任务类别与 PM 模型(apply/restart)
313
315
  label_TEAM_TASK_MODELS: '任务类别模型',
314
316
  label_TEAM_PM_MODEL: 'PM 模型',
317
+ label_TEAM_CONFIG_VERSION: '配置形状号',
315
318
  // —— 工作流与门禁
319
+ label_TEAM_UPDATE_CHECK: '启动时提示新版本',
316
320
  label_TEAM_GATES: '门禁命令',
317
321
  label_TEAM_INSTALL_CMD: '安装命令',
318
322
  label_TEAM_TASK_BRANCH_RESET: '派单时重置分支',
@@ -340,9 +344,13 @@ export const zh = {
340
344
  label_TEAM_NOTIFY_DEDUP_SEC: '通知去重窗口',
341
345
  label_TEAM_INBOX_MAX_CHARS: '收件箱摘要字数',
342
346
  label_TEAM_NOTIFY_LOG: '通知调试日志',
347
+ label_TEAM_NOTIFY_DETAIL_MAX: '通知明细条数上限',
343
348
  label_TEAM_DEFER_TTL: '排队过期时间',
344
349
  label_TEAM_OUTBOX_MAX: '发件箱条数上限',
345
350
  label_TEAM_PANEL_DETAIL_CAP: '详情文件读取上限',
351
+ label_TEAM_ORPHAN_WARN_MB: '孤儿内存提示阈值',
352
+ label_TEAM_ORPHAN_SCAN: '扫描孤儿席位进程',
353
+ label_TEAM_ORPHAN_PROC_ROOT: '普查 /proc 接缝',
346
354
  // —— 巡检与面板(需重启)
347
355
  label_TEAM_PULSE_INTERVAL: '巡检周期',
348
356
  label_TEAM_MONITOR_REFRESH: '面板刷新周期',
@@ -393,18 +401,19 @@ export const zh = {
393
401
  replyEmpty: '(还没有关键回复)',
394
402
  replyUnavailable: '(不可用)',
395
403
  replyLatestUnavailable: '最新回复不可用:{reason}',
396
- replyDeclared: '自称来自 {from} · {at}',
397
- replyDeclaredShort: '自称来自 {from}',
404
+ replyDeclared: '来自 {from} · {at}',
405
+ replyDeclaredShort: '来自 {from}',
398
406
  replySlotUnavailable: '#{no} 不可用',
399
407
  replyLoading: '… 载入中',
400
408
  replyBodyMissing: '这份回复不可用',
401
- replyBodyHint: '只读 · 发布者自称,未经核验',
409
+ replyBodyHint: '只读 · 按发布的原文显示',
402
410
  replyOlder: '更早',
403
411
  replyNewer: '更新',
404
412
  replyBack: '返回',
405
413
  replyScrollHint: '↑/↓ PgUp/PgDn Home/End 滚动',
406
414
  replyTotalSlots: '{n} 个编号槽位',
407
415
  replyTailWarning: '索引尾部不完整(上一次追加没有写完)',
416
+ replyPageNote: '「这条回复是写给谁的?」——PM 写给用户的回复都在这里',
408
417
 
409
418
  // 全局键位(页脚)
410
419
  keyCompose: 'm 写信',
@@ -435,6 +444,7 @@ export const zh = {
435
444
  receiptQueued: '… 已入队(PM 的输入框在忙)· queued',
436
445
  receiptHeld: '! 滞留(副本在 state/outbox/held/)· held',
437
446
  receiptError: '✗ 投递未确认 · {detail}',
447
+ draftNotCleared: '✗ 已结算,但草稿文件清不掉:{file}(文字保留在输入行)',
438
448
  flushOk: '✓ 冲刷 · {detail}',
439
449
  flushFail: '✗ 冲刷失败 · {detail}',
440
450
  standbyOkOn: '✓ 待命 on(原因:{reason})',
@@ -87,6 +87,9 @@ export interface PanelCapacity {
87
87
  ram_avail_mb: number
88
88
  swap_free_mb: number
89
89
  agents: number
90
+ /** P309: the resolved temp root (`team_tmp_root`) and how it was resolved. */
91
+ temp_root?: string
92
+ temp_root_source?: string
90
93
  /** P144: one entry per judged filesystem (temp root + worktrees root). */
91
94
  disk?: PanelDiskEntry[]
92
95
  spark: number[]
@@ -304,7 +307,10 @@ export interface SettingsKey {
304
307
  comment: string
305
308
  /** A command-side warning (an unknown seat token in TEAM_AGENT_MODELS, …). */
306
309
  warning: string
307
- /** The refusal's route for a read-only key (`team add-agent`, hand-edit the file, …). */
310
+ /**
311
+ * The read's own note for the row (`memory-and-deps` owns its words): a `refuse` key's route, an
312
+ * `apply` key's remark or the declared `fixture-only: ` marker the view refuses to render.
313
+ */
308
314
  route?: string
309
315
  /**
310
316
  * The key's schema-derived choice set (M55), verbatim from `team config list --json`. The
@@ -381,12 +387,18 @@ export interface SettingsCategory {
381
387
 
382
388
  /**
383
389
  * One seat's **committed** launch assignment (P232): the record a dispatch published, read-only.
384
- * `assigned=false` means there is no complete record — `diagnostic` then says why, and no model is
385
- * invented (the future policy above is never displayed as this seat's actual model).
390
+ * `assigned=false` means there is no complete record, and no model is invented (the future policy
391
+ * above is never displayed as this seat's actual model). The plain reason the view shows is chosen
392
+ * from `record_present` (P266) — never from the command's `diagnostic`, which is forbidden on screen.
386
393
  */
387
394
  export interface SettingsAssignment {
388
395
  agent: string
389
396
  assigned: boolean
397
+ /**
398
+ * P266 (`memory-and-deps` owns the fact): does a record file exist for this seat at all — true even
399
+ * when the file cannot be read, false when there is none. Absent against an older command.
400
+ */
401
+ record_present?: boolean
390
402
  task: string
391
403
  category: string
392
404
  model: string
@@ -454,8 +466,21 @@ export interface DetailBlock {
454
466
  /** True when the served file was cut at the cap. */
455
467
  truncated: boolean
456
468
  files: DetailFile[]
469
+ /**
470
+ * The reader's one-line reason when the requested target is unavailable: a missing capability,
471
+ * change or decision, or a discovered symbolic link it refused to read through. Absent on a
472
+ * served read (change: panel-preview-and-compose).
473
+ */
474
+ reason?: string
457
475
  }
458
476
 
477
+ /**
478
+ * The read-only preview source a detail view addresses (change: panel-preview-and-compose).
479
+ * `entry` is the original entry-id discovery (task briefs, reports, reviews); the other three are
480
+ * the closed set the reader's explicit `--source` accepts.
481
+ */
482
+ export type DetailSource = 'entry' | 'spec' | 'change' | 'decision'
483
+
459
484
  // ---------------------------------------------------------------- key replies (pulse-key-replies)
460
485
 
461
486
  /** One numbered slot as the readers report it: metadata only, or a numbered unavailable row. */
@@ -799,7 +799,10 @@ function cmdShow(args) {
799
799
  }
800
800
  process.stdout.write(`#${meta.no} ${sanitize(meta.title)}\n`)
801
801
  process.stdout.write(
802
- `来自 ${sanitize(meta.from)}(自称)· ${meta.at} · ${meta.bytes} 字节 · sha256 ${meta.sha256.slice(0, 16)}…\n\n`,
802
+ // P266: the human header shows the label exactly as the record carries it, with no qualifier
803
+ // beside it. "The tool authenticates nothing" belongs in the docs and the key-replies
804
+ // requirement, not in a suffix on every display (machine outputs keep the label verbatim).
805
+ `来自 ${sanitize(meta.from)} · ${meta.at} · ${meta.bytes} 字节 · sha256 ${meta.sha256.slice(0, 16)}…\n\n`,
803
806
  )
804
807
  process.stdout.write(sanitize(display))
805
808
  if (!display.endsWith('\n')) process.stdout.write('\n')
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bash
2
+ # teamsmith · 信号闸门的入口之一(pkill / killall / pgrep / pidof 共用一个实现)
3
+ #
4
+ # 为什么是普通文件而不是软链:npm 的 tarball 不携带 120000 软链 —— 0.3.0 的包里这四个名字全部缺失,
5
+ # 安装后 PATH 解析到 /usr/bin 的系统命令(docs/team/reviews/release-0.3.0.md)。本文件只做一件事:
6
+ # 把自己的**名字**和调用者的原始 argv 原样交给同目录的共享实现 signal-gate —— 判定与记录只有一份,
7
+ # 不是四份闸门。
8
+ set -u
9
+ _self="$(readlink -f "$0" 2>/dev/null || printf '%s' "$0")"
10
+ exec "$(dirname "$_self")/signal-gate" "$(basename "$0")" "$@"
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bash
2
+ # teamsmith · 信号闸门的入口之一(pkill / killall / pgrep / pidof 共用一个实现)
3
+ #
4
+ # 为什么是普通文件而不是软链:npm 的 tarball 不携带 120000 软链 —— 0.3.0 的包里这四个名字全部缺失,
5
+ # 安装后 PATH 解析到 /usr/bin 的系统命令(docs/team/reviews/release-0.3.0.md)。本文件只做一件事:
6
+ # 把自己的**名字**和调用者的原始 argv 原样交给同目录的共享实现 signal-gate —— 判定与记录只有一份,
7
+ # 不是四份闸门。
8
+ set -u
9
+ _self="$(readlink -f "$0" 2>/dev/null || printf '%s' "$0")"
10
+ exec "$(dirname "$_self")/signal-gate" "$(basename "$0")" "$@"
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bash
2
+ # teamsmith · 信号闸门的入口之一(pkill / killall / pgrep / pidof 共用一个实现)
3
+ #
4
+ # 为什么是普通文件而不是软链:npm 的 tarball 不携带 120000 软链 —— 0.3.0 的包里这四个名字全部缺失,
5
+ # 安装后 PATH 解析到 /usr/bin 的系统命令(docs/team/reviews/release-0.3.0.md)。本文件只做一件事:
6
+ # 把自己的**名字**和调用者的原始 argv 原样交给同目录的共享实现 signal-gate —— 判定与记录只有一份,
7
+ # 不是四份闸门。
8
+ set -u
9
+ _self="$(readlink -f "$0" 2>/dev/null || printf '%s' "$0")"
10
+ exec "$(dirname "$_self")/signal-gate" "$(basename "$0")" "$@"
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bash
2
+ # teamsmith · 信号闸门的入口之一(pkill / killall / pgrep / pidof 共用一个实现)
3
+ #
4
+ # 为什么是普通文件而不是软链:npm 的 tarball 不携带 120000 软链 —— 0.3.0 的包里这四个名字全部缺失,
5
+ # 安装后 PATH 解析到 /usr/bin 的系统命令(docs/team/reviews/release-0.3.0.md)。本文件只做一件事:
6
+ # 把自己的**名字**和调用者的原始 argv 原样交给同目录的共享实现 signal-gate —— 判定与记录只有一份,
7
+ # 不是四份闸门。
8
+ set -u
9
+ _self="$(readlink -f "$0" 2>/dev/null || printf '%s' "$0")"
10
+ exec "$(dirname "$_self")/signal-gate" "$(basename "$0")" "$@"