@itphx/synth-shared 0.12.4 → 0.13.8

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/dist/config/defaults.js +125 -5
  2. package/dist/config/env-overrides.d.ts +23 -4
  3. package/dist/config/env-overrides.js +103 -4
  4. package/dist/config/index.d.ts +1 -0
  5. package/dist/config/index.js +1 -0
  6. package/dist/config/loader.d.ts +8 -0
  7. package/dist/config/loader.js +6 -1
  8. package/dist/config/redact.d.ts +22 -0
  9. package/dist/config/redact.js +53 -0
  10. package/dist/config/resolve.d.ts +17 -0
  11. package/dist/config/resolve.js +40 -1
  12. package/dist/config/tls.d.ts +7 -4
  13. package/dist/config/tls.js +10 -23
  14. package/dist/config/types.d.ts +496 -11
  15. package/dist/config/types.js +348 -6
  16. package/dist/i18n/index.d.ts +1 -1
  17. package/dist/i18n/index.js +317 -3
  18. package/dist/index.d.ts +4 -4
  19. package/dist/index.js +4 -4
  20. package/dist/model-metadata.d.ts +10 -0
  21. package/dist/model-metadata.js +10 -0
  22. package/dist/schemas/index.d.ts +378 -21
  23. package/dist/schemas/index.js +282 -5
  24. package/dist/types/agent.d.ts +8 -1
  25. package/dist/types/bus-events.d.ts +60 -2
  26. package/dist/types/egress.d.ts +2 -2
  27. package/dist/types/egress.js +2 -2
  28. package/dist/types/file-kind.d.ts +40 -0
  29. package/dist/types/file-kind.js +157 -0
  30. package/dist/types/fs.d.ts +54 -1
  31. package/dist/types/fs.js +43 -0
  32. package/dist/types/git.d.ts +88 -0
  33. package/dist/types/git.js +101 -1
  34. package/dist/types/host-pattern.d.ts +41 -0
  35. package/dist/types/host-pattern.js +143 -0
  36. package/dist/types/index.d.ts +4 -0
  37. package/dist/types/index.js +13 -1
  38. package/dist/types/llm.d.ts +95 -0
  39. package/dist/types/llm.js +58 -0
  40. package/dist/types/maintenance.d.ts +1 -1
  41. package/dist/types/mcp.d.ts +90 -0
  42. package/dist/types/mcp.js +11 -0
  43. package/dist/types/message-stream.d.ts +389 -0
  44. package/dist/types/message-stream.js +41 -0
  45. package/dist/types/message.d.ts +49 -0
  46. package/dist/types/pack.d.ts +6 -6
  47. package/dist/types/permission.d.ts +39 -3
  48. package/dist/types/pipeline-engine.d.ts +2 -2
  49. package/dist/types/project.d.ts +30 -0
  50. package/dist/types/project.js +16 -0
  51. package/dist/types/prompt.d.ts +4 -2
  52. package/dist/types/provider.d.ts +280 -0
  53. package/dist/types/provider.js +289 -0
  54. package/dist/types/service-keys.d.ts +6 -3
  55. package/dist/types/service-keys.js +6 -1
  56. package/dist/types/session.d.ts +178 -3
  57. package/dist/types/skills.d.ts +6 -0
  58. package/dist/types/tools.d.ts +57 -0
  59. package/dist/types/tools.js +49 -1
  60. package/dist/types/user.d.ts +7 -0
  61. package/dist/types/worktree.d.ts +1 -1
  62. package/dist/utils/index.js +1 -1
  63. package/dist/utils/reasoning.d.ts +18 -2
  64. package/dist/utils/reasoning.js +16 -7
  65. package/dist/version.d.ts +1 -1
  66. package/dist/version.js +1 -1
  67. package/package.json +4 -3
@@ -13,17 +13,26 @@
13
13
  */
14
14
  export const ENGINE_MESSAGE_KEYS = [
15
15
  'session.max_iterations',
16
+ 'session.steps_limit',
16
17
  'session.stopped',
17
18
  'session.stopped_reason_denied',
18
19
  'session.denied_blocked',
19
20
  'session.role_tool_blocked',
20
21
  'session.empty_response',
21
- 'session.dialog_title',
22
+ 'session.output_limit',
22
23
  'session.default_title',
23
24
  'session.reference_label',
24
25
  'session.reference_link',
25
26
  'session.retry_cancelled',
26
27
  'session.subtask_title',
28
+ // Управление сессиями из чата (list_sessions/get_session_info/session_rename).
29
+ 'session.list',
30
+ 'session.list_empty',
31
+ 'session.details',
32
+ 'session.not_found',
33
+ 'session.rename_ok',
34
+ 'session.save_error',
35
+ 'session.remote_truncated',
27
36
  'task.stopped_by_user',
28
37
  'task.stopped_before_completion',
29
38
  'task.stopped_by_deny',
@@ -33,7 +42,9 @@ export const ENGINE_MESSAGE_KEYS = [
33
42
  'task.subagent_not_allowed',
34
43
  'task.deps_unavailable',
35
44
  'task.model_unavailable',
45
+ 'task.model_not_in_catalog',
36
46
  'task.subagent_exec_error_after_retries',
47
+ 'task.depth_limit',
37
48
  'task.resume_marker',
38
49
  'task.resume_result',
39
50
  'task.resume_failed',
@@ -46,6 +57,8 @@ export const ENGINE_MESSAGE_KEYS = [
46
57
  'task.resume_provider_unavailable',
47
58
  'task.steps_limit',
48
59
  'task.steps_limit_empty',
60
+ 'task.context_budget',
61
+ 'subagent.context_budget',
49
62
  'task.background_started',
50
63
  'task.background_limit',
51
64
  'task.background_disabled',
@@ -53,14 +66,22 @@ export const ENGINE_MESSAGE_KEYS = [
53
66
  'task.resume_child_busy',
54
67
  'tool.args_error',
55
68
  'tool.exec_error',
69
+ // Вызов инструмента без имени/идентификатора — результат всё равно должен
70
+ // быть записан парным `tool`-сообщением (иначе у провайдера рвётся цепочка).
71
+ 'tool.malformed_call',
56
72
  'tool.not_found',
57
73
  'tool.permission_denied_default',
58
74
  'tool.doom_loop',
75
+ 'tool.disabled_by_step_limit',
59
76
  'tool.empty_output',
60
77
  'tool.output_truncated',
78
+ // Общий предел вывода инструментов: результат усечён по строкам/байтам.
79
+ 'tool.output_bounded',
61
80
  'tool.shell_error',
62
81
  // ADR-113 §detach: сообщение о таймауте detach-готового foreground-пути.
63
82
  'tool.shell_timeout',
83
+ // Таймаут поиска (`grep_files`/`glob`) — actionable-текст с подсказкой.
84
+ 'tool.search_timeout',
64
85
  'tool.command_failed_default',
65
86
  'tool.aborted',
66
87
  'tool.binary_missing',
@@ -68,11 +89,47 @@ export const ENGINE_MESSAGE_KEYS = [
68
89
  'fs.file_edited',
69
90
  'fs.replace_not_found',
70
91
  'fs.replace_multiple',
92
+ // Отказы до записи: идентичные строки, пустой old_string, смешанные переводы строк.
93
+ 'fs.no_changes',
94
+ 'fs.empty_old_string',
95
+ 'fs.mixed_line_endings',
96
+ // Защита от бинаря и гигантских файлов.
97
+ 'fs.edit_binary',
98
+ 'fs.write_binary',
99
+ 'fs.file_too_large',
100
+ 'fs.file_not_found',
71
101
  'fs.dir_created',
72
102
  'fs.file_deleted',
103
+ // Мультифайловая атомарная правка (`patch`, JSON-edits).
104
+ 'fs.patch_applied',
105
+ 'fs.patch_file_line',
106
+ 'fs.patch_not_found',
107
+ 'fs.patch_multiple',
108
+ 'fs.patch_write_failed',
109
+ 'fs.patch_file_missing',
110
+ 'fs.patch_not_regular',
111
+ 'fs.patch_too_large',
112
+ 'fs.patch_binary',
113
+ // Операции патча add/delete/rename (сводка + строки по файлам).
114
+ 'fs.patch_summary',
115
+ 'fs.patch_file_added',
116
+ 'fs.patch_file_deleted',
117
+ 'fs.patch_file_renamed',
118
+ 'fs.patch_add_exists',
119
+ 'fs.patch_delete_missing',
120
+ 'fs.patch_rename_missing',
121
+ 'fs.patch_rename_exists',
122
+ 'fs.patch_path_escapes',
73
123
  'fsread.empty_directory',
124
+ 'fsread.empty_file',
74
125
  'fsread.no_files',
75
126
  'fsread.glob_error',
127
+ 'fsread.truncated',
128
+ 'fsread.directory_truncated',
129
+ 'fsread.line_truncated',
130
+ 'fsread.offset_out_of_range',
131
+ 'fsread.binary',
132
+ 'fsread.glob_truncated',
76
133
  'web.duckduckgo_blocked',
77
134
  'web.search_failed',
78
135
  'web.search_results',
@@ -80,17 +137,29 @@ export const ENGINE_MESSAGE_KEYS = [
80
137
  'web.js_framework_warning',
81
138
  'web.low_content_warning',
82
139
  'web.content_truncated',
140
+ 'web.body_truncated',
83
141
  'web.block_timeout',
84
142
  'web.block_error',
85
143
  'web.fetch_all_failed',
86
144
  'web.no_results',
87
145
  'web.search_error',
146
+ 'web.search_rate_limited',
147
+ 'web.search_auth_failed',
88
148
  'web.ssrf_blocked',
89
149
  'web.too_many_redirects',
90
150
  'search.no_matches',
91
151
  'search.matches_truncated',
152
+ // Кап длины строки совпадения (общий с `read_file`).
153
+ 'search.line_truncated',
154
+ // Скрытые совпадения в исключённых путях (зависимости/артефакты сборки).
155
+ 'search.matches_excluded',
92
156
  'search.rg_not_installed',
93
157
  'search.error',
158
+ // Различимые причины отказа поиска (ADR-041): путь не найден / путь не
159
+ // каталог / невалидный regex — у каждой своя подсказка модели.
160
+ 'search.path_not_found',
161
+ 'search.path_not_directory',
162
+ 'search.invalid_regex',
94
163
  'plan.enter_success',
95
164
  'plan.exit_success',
96
165
  'plan.session_manager_unavailable',
@@ -123,8 +192,28 @@ export const ENGINE_MESSAGE_KEYS = [
123
192
  'todo.priority_high',
124
193
  'todo.priority_medium',
125
194
  'todo.priority_low',
195
+ // Компактный вывод тулов todo (по образцу opencode): сводка + строки пунктов.
196
+ 'todo.summary',
197
+ 'todo.line',
198
+ 'todo.more',
199
+ 'todo.added',
200
+ 'todo.updated',
201
+ 'todo.deleted',
202
+ 'todo.hint_priority',
203
+ 'todo.hint_plan',
126
204
  'project.deps_unavailable',
127
205
  'project.session_read_error',
206
+ // Поиск/список проектов (list_projects/get_project, project_attach по имени).
207
+ 'project.query_not_found',
208
+ 'project.query_ambiguous',
209
+ 'project.list',
210
+ 'project.list_empty',
211
+ 'project.details',
212
+ 'project.attached_no_workspace',
213
+ 'project.cross_instance',
214
+ 'project.hybrid_ambiguous',
215
+ 'project.remote_unavailable',
216
+ 'project.remote_truncated',
128
217
  'project.session_not_found',
129
218
  'project.save_error',
130
219
  'project.workspace_create_error',
@@ -205,6 +294,7 @@ export const ENGINE_MESSAGE_KEYS = [
205
294
  'permission.rule_prefix_matched',
206
295
  'permission.rule_command_matched',
207
296
  'permission.ask_timeout',
297
+ 'permission.ask_cancelled',
208
298
  'permission.ask_no_subscribers',
209
299
  'permission.ask_denied',
210
300
  'permission.authority_denied_unknown',
@@ -215,6 +305,9 @@ export const ENGINE_MESSAGE_KEYS = [
215
305
  'shellguard.deny_prefix',
216
306
  'shellguard.deny_path',
217
307
  'shellguard.ask_path',
308
+ 'shellguard.ask_command',
309
+ 'shellguard.ask_code',
310
+ 'shellguard.ask_stdin_code',
218
311
  'shellguard.deny_dir',
219
312
  'protectedpaths.unresolvable',
220
313
  'protectedpaths.dynamic',
@@ -229,11 +322,14 @@ export const ENGINE_MESSAGE_KEYS = [
229
322
  'router.timeout',
230
323
  'router.network_error',
231
324
  'router.provider_not_found',
325
+ 'router.provider_disabled',
232
326
  'router.provider_unspecified',
327
+ 'router.model_disabled',
233
328
  'router.escalation',
234
329
  'router.context_length_exceeded',
235
330
  'router.rate_limit_exceeded',
236
331
  'router.no_user_query',
332
+ 'router.remote_auth_expired',
237
333
  'qc.min_length_ok',
238
334
  'qc.min_length_fail_detail',
239
335
  'qc.min_length_fail',
@@ -279,6 +375,12 @@ export const ENGINE_MESSAGE_KEYS = [
279
375
  'command.skills_empty',
280
376
  'command.summary_enqueued',
281
377
  'command.summary_unavailable',
378
+ // --- Сжатие контекста (summarization / compaction) ---
379
+ 'context.compression_empty',
380
+ 'context.compression_failed',
381
+ 'context.compression_template',
382
+ 'context.compression_output_limit',
383
+ 'context.summary_applied',
282
384
  // --- Inline shell (ADR-046 §7.4) ---
283
385
  'command.inline_shell_disabled',
284
386
  'command.inline_shell_denied',
@@ -291,9 +393,37 @@ export const ENGINE_MESSAGE_KEYS = [
291
393
  'sshkey.encryption_unavailable',
292
394
  'sshkey.decrypt_failed',
293
395
  'sshkey.env_failed',
396
+ // Отказы единого гейта SSH-ключей (PROP-124 §3) — по одному ключу на
397
+ // машинный код отказа (`SshAccessErrorCode`).
398
+ 'ssh.access.key_not_found',
399
+ 'ssh.access.usage_denied',
400
+ 'ssh.access.agent_not_linked',
401
+ 'ssh.access.host_denied',
402
+ 'ssh.access.port_denied',
403
+ 'ssh.access.policy_required',
404
+ 'ssh.access.ambiguous',
405
+ 'ssh.copy.uploaded',
406
+ 'ssh.copy.downloaded',
407
+ // PROP-124 §4c: адресный ssh-тул проброса порта (`ssh_tunnel`).
408
+ 'ssh.tunnel.started',
409
+ 'ssh.tunnel.socks_unsupported',
294
410
  'git.ssh_key_required',
411
+ 'git.ssh_key_required_hint',
412
+ 'git.ssh_keys_none',
413
+ 'sshkeys.tool.header',
414
+ 'sshkeys.tool.empty',
415
+ 'sshkeys.tool.deps_unavailable',
295
416
  'git.repo_path_invalid',
417
+ 'git.repo_not_a_repo',
296
418
  'git.repo_exists',
419
+ 'git.repo_occupied_repo',
420
+ 'git.repo_occupied_stub',
421
+ 'git.repo_occupied_dir',
422
+ 'git.repo_path_unreadable',
423
+ 'git.clone_timeout',
424
+ 'git.fetch_timeout',
425
+ // Таймаут git-тула агента: величина лимита + что делать дальше.
426
+ 'git.timeout',
297
427
  // --- Git worktrees: per-session рабочий каталог (ADR-114) ---
298
428
  'worktree.directory_missing',
299
429
  'worktree.tool.deps_unavailable',
@@ -321,6 +451,10 @@ export const ENGINE_MESSAGE_KEYS = [
321
451
  'steer.injected',
322
452
  'steer.limit_exceeded',
323
453
  'steer.interrupted',
454
+ 'steer.dropped_aborted',
455
+ 'steer.dropped_turn_ended',
456
+ 'steer.requeued_aborted',
457
+ 'steer.requeued_turn_ended',
324
458
  // --- Профиль пользователя и онбординг ---
325
459
  'profile.deps_unavailable',
326
460
  'profile.session_read_error',
@@ -407,6 +541,11 @@ export const ENGINE_MESSAGE_KEYS = [
407
541
  'process.tool.header',
408
542
  'process.tool.no_log',
409
543
  'process.tool.child_history',
544
+ // ADR-111: управление фоновыми прогонами из агента.
545
+ 'process.tool.not_running',
546
+ 'process.tool.running',
547
+ 'process.tool.stopping',
548
+ 'process.tool.deleted',
410
549
  // --- Повторная привязка файла из workspace (ADR-115) ---
411
550
  'attach.message.from_workspace',
412
551
  'attach.tool.attached',
@@ -436,20 +575,55 @@ export const ENGINE_MESSAGE_KEYS = [
436
575
  'models.list.provider_unknown',
437
576
  'models.list.deps_unavailable',
438
577
  'models.list.unavailable',
578
+ // --- Инстанс и MCP-реестр (Workstream A1): synth_info/synth_mcp_* ---
579
+ 'instance.deps_unavailable',
580
+ 'instance.info',
581
+ 'instance.mcp_list',
582
+ 'instance.mcp_not_found',
583
+ 'instance.mcp_test_ok',
584
+ 'instance.mcp_test_failed',
585
+ // --- Write-мутации MCP (Workstream A2) ---
586
+ 'instance.mcp_add.added',
587
+ 'instance.mcp_update.updated',
588
+ 'instance.mcp_remove.removed',
589
+ 'instance.mcp_enable.session_ok',
590
+ 'instance.mcp_enable.project_ok',
591
+ 'instance.mcp_enable.instance_ok',
592
+ 'instance.mcp_enable.no_project',
593
+ 'instance.mcp_enable.no_session',
594
+ 'instance.mcp_enable.session_forbidden',
595
+ 'instance.mcp_reconnect.ok',
596
+ 'instance.mcp_reconnect.failed',
597
+ 'instance.mcp.forbidden',
598
+ 'instance.mcp.instance_forbidden',
599
+ 'instance.mcp.project_forbidden',
600
+ 'instance.mcp.credential_unsupported',
601
+ 'instance.mcp.secret_header',
602
+ 'instance.mcp.network_denied',
603
+ 'instance.mcp.invalid_config',
604
+ 'instance.mcp.exists',
439
605
  ];
440
606
  export const ENGINE_MESSAGE_PARAMS = {
441
607
  'session.max_iterations': [],
608
+ 'session.steps_limit': ["limit"],
442
609
  'session.stopped': ["reason"],
443
610
  'session.stopped_reason_denied': [],
444
611
  'session.denied_blocked': [],
445
612
  'session.role_tool_blocked': ["tool", "agent"],
446
613
  'session.empty_response': [],
447
- 'session.dialog_title': ["id"],
614
+ 'session.output_limit': ["limit", "reasoning"],
448
615
  'session.default_title': [],
449
616
  'session.reference_label': [],
450
617
  'session.reference_link': ["label", "id", "from", "to"],
451
618
  'session.retry_cancelled': [],
452
619
  'session.subtask_title': ["description"],
620
+ 'session.list': ["count", "items"],
621
+ 'session.list_empty': [],
622
+ 'session.details': ["name", "id", "json"],
623
+ 'session.not_found': ["id"],
624
+ 'session.rename_ok': ["title"],
625
+ 'session.save_error': ["error"],
626
+ 'session.remote_truncated': [],
453
627
  'task.stopped_by_user': [],
454
628
  'task.stopped_before_completion': [],
455
629
  'task.stopped_by_deny': [],
@@ -459,7 +633,9 @@ export const ENGINE_MESSAGE_PARAMS = {
459
633
  'task.subagent_not_allowed': ["type", "modes"],
460
634
  'task.deps_unavailable': [],
461
635
  'task.model_unavailable': ["provider", "model"],
636
+ 'task.model_not_in_catalog': ["provider", "model", "available"],
462
637
  'task.subagent_exec_error_after_retries': ["type", "attempts", "error"],
638
+ 'task.depth_limit': ["limit"],
463
639
  'task.resume_marker': [],
464
640
  'task.resume_result': ["type", "summary"],
465
641
  'task.resume_failed': ["type", "error"],
@@ -472,6 +648,8 @@ export const ENGINE_MESSAGE_PARAMS = {
472
648
  'task.resume_provider_unavailable': ["id"],
473
649
  'task.steps_limit': ["limit"],
474
650
  'task.steps_limit_empty': ["limit"],
651
+ 'task.context_budget': ["tokens", "steps", "tasks"],
652
+ 'subagent.context_budget': ["tokens", "steps"],
475
653
  'task.background_started': ["id"],
476
654
  'task.background_limit': ["limit"],
477
655
  'task.background_disabled': [],
@@ -479,13 +657,17 @@ export const ENGINE_MESSAGE_PARAMS = {
479
657
  'task.resume_child_busy': ["id"],
480
658
  'tool.args_error': ["tool", "issues"],
481
659
  'tool.exec_error': ["tool", "error"],
660
+ 'tool.malformed_call': ["tool", "id"],
482
661
  'tool.not_found': ["tool"],
483
662
  'tool.permission_denied_default': [],
484
663
  'tool.doom_loop': ["tool", "count"],
664
+ 'tool.disabled_by_step_limit': ["tool", "limit"],
485
665
  'tool.empty_output': [],
486
666
  'tool.output_truncated': [],
667
+ 'tool.output_bounded': ["shown", "total"],
487
668
  'tool.shell_error': ["message"],
488
669
  'tool.shell_timeout': ["timeout"],
670
+ 'tool.search_timeout': ["seconds"],
489
671
  'tool.command_failed_default': [],
490
672
  'tool.aborted': [],
491
673
  'tool.binary_missing': ["tool", "binary"],
@@ -493,11 +675,43 @@ export const ENGINE_MESSAGE_PARAMS = {
493
675
  'fs.file_edited': ["path", "count"],
494
676
  'fs.replace_not_found': ["path"],
495
677
  'fs.replace_multiple': ["count"],
678
+ 'fs.no_changes': [],
679
+ 'fs.empty_old_string': [],
680
+ 'fs.mixed_line_endings': [],
681
+ 'fs.edit_binary': ["path"],
682
+ 'fs.write_binary': ["path"],
683
+ 'fs.file_too_large': ["limit"],
684
+ 'fs.file_not_found': ["path"],
496
685
  'fs.dir_created': ["path"],
497
686
  'fs.file_deleted': ["path"],
687
+ 'fs.patch_applied': ["files", "replacements"],
688
+ 'fs.patch_file_line': ["path", "count"],
689
+ 'fs.patch_not_found': ["path", "index"],
690
+ 'fs.patch_multiple': ["path", "index", "count"],
691
+ 'fs.patch_write_failed': ["path", "error"],
692
+ 'fs.patch_file_missing': ["path"],
693
+ 'fs.patch_not_regular': ["path"],
694
+ 'fs.patch_too_large': ["path", "bytes", "limit"],
695
+ 'fs.patch_binary': ["path"],
696
+ 'fs.patch_summary': ["added", "updated", "deleted", "renamed"],
697
+ 'fs.patch_file_added': ["path"],
698
+ 'fs.patch_file_deleted': ["path"],
699
+ 'fs.patch_file_renamed': ["from", "to"],
700
+ 'fs.patch_add_exists': ["path"],
701
+ 'fs.patch_delete_missing': ["path"],
702
+ 'fs.patch_rename_missing': ["from"],
703
+ 'fs.patch_rename_exists': ["to"],
704
+ 'fs.patch_path_escapes': ["path"],
498
705
  'fsread.empty_directory': [],
706
+ 'fsread.empty_file': [],
499
707
  'fsread.no_files': [],
500
708
  'fsread.glob_error': [],
709
+ 'fsread.truncated': ["count", "next"],
710
+ 'fsread.directory_truncated': ["count", "next"],
711
+ 'fsread.line_truncated': [],
712
+ 'fsread.offset_out_of_range': ["offset", "total"],
713
+ 'fsread.binary': ["path"],
714
+ 'fsread.glob_truncated': ["count", "total"],
501
715
  'web.duckduckgo_blocked': [],
502
716
  'web.search_failed': [],
503
717
  'web.search_results': ["query", "count", "items"],
@@ -505,17 +719,25 @@ export const ENGINE_MESSAGE_PARAMS = {
505
719
  'web.js_framework_warning': [],
506
720
  'web.low_content_warning': [],
507
721
  'web.content_truncated': [],
722
+ 'web.body_truncated': ["limit"],
508
723
  'web.block_timeout': [],
509
724
  'web.block_error': ["error"],
510
725
  'web.fetch_all_failed': [],
511
726
  'web.no_results': ["query"],
512
727
  'web.search_error': ["error"],
728
+ 'web.search_rate_limited': [],
729
+ 'web.search_auth_failed': [],
513
730
  'web.ssrf_blocked': ["reason"],
514
731
  'web.too_many_redirects': [],
515
732
  'search.no_matches': [],
516
- 'search.matches_truncated': ["total"],
733
+ 'search.matches_truncated': ["shown", "total"],
734
+ 'search.line_truncated': [],
735
+ 'search.matches_excluded': ["count", "categories"],
517
736
  'search.rg_not_installed': [],
518
737
  'search.error': ["error"],
738
+ 'search.path_not_found': ["path"],
739
+ 'search.path_not_directory': ["path"],
740
+ 'search.invalid_regex': ["error"],
519
741
  'plan.enter_success': [],
520
742
  'plan.exit_success': [],
521
743
  'plan.session_manager_unavailable': ["tool"],
@@ -548,8 +770,26 @@ export const ENGINE_MESSAGE_PARAMS = {
548
770
  'todo.priority_high': [],
549
771
  'todo.priority_medium': [],
550
772
  'todo.priority_low': [],
773
+ 'todo.summary': ["completed", "total", "inProgress"],
774
+ 'todo.line': ["mark", "title", "status"],
775
+ 'todo.more': ["count"],
776
+ 'todo.added': ["ids"],
777
+ 'todo.updated': ["id"],
778
+ 'todo.deleted': ["count"],
779
+ 'todo.hint_priority': ["priority"],
780
+ 'todo.hint_plan': ["plan"],
551
781
  'project.deps_unavailable': ["tool"],
552
782
  'project.session_read_error': [],
783
+ 'project.query_not_found': ["name"],
784
+ 'project.query_ambiguous': ["name", "items"],
785
+ 'project.list': ["count", "items"],
786
+ 'project.list_empty': [],
787
+ 'project.details': ["name", "id", "json"],
788
+ 'project.attached_no_workspace': ["name"],
789
+ 'project.cross_instance': ["name", "id"],
790
+ 'project.hybrid_ambiguous': ["name", "items"],
791
+ 'project.remote_unavailable': [],
792
+ 'project.remote_truncated': [],
553
793
  'project.session_not_found': [],
554
794
  'project.save_error': ["error"],
555
795
  'project.workspace_create_error': ["error"],
@@ -630,6 +870,7 @@ export const ENGINE_MESSAGE_PARAMS = {
630
870
  'permission.rule_prefix_matched': ["key", "action"],
631
871
  'permission.rule_command_matched': ["key", "pattern", "action", "command"],
632
872
  'permission.ask_timeout': [],
873
+ 'permission.ask_cancelled': [],
633
874
  'permission.ask_no_subscribers': [],
634
875
  'permission.ask_denied': [],
635
876
  'permission.authority_denied_unknown': ["action"],
@@ -640,6 +881,9 @@ export const ENGINE_MESSAGE_PARAMS = {
640
881
  'shellguard.deny_prefix': ["prefix"],
641
882
  'shellguard.deny_path': ["path"],
642
883
  'shellguard.ask_path': ["path"],
884
+ 'shellguard.ask_command': ["command"],
885
+ 'shellguard.ask_code': ["code"],
886
+ 'shellguard.ask_stdin_code': [],
643
887
  'shellguard.deny_dir': ["path", "dir"],
644
888
  'protectedpaths.unresolvable': [],
645
889
  'protectedpaths.dynamic': [],
@@ -654,11 +898,14 @@ export const ENGINE_MESSAGE_PARAMS = {
654
898
  'router.timeout': [],
655
899
  'router.network_error': [],
656
900
  'router.provider_not_found': ["provider"],
901
+ 'router.provider_disabled': ["provider"],
657
902
  'router.provider_unspecified': [],
903
+ 'router.model_disabled': ["provider", "model"],
658
904
  'router.escalation': ["provider", "model", "reason"],
659
905
  'router.context_length_exceeded': [],
660
906
  'router.rate_limit_exceeded': [],
661
907
  'router.no_user_query': [],
908
+ 'router.remote_auth_expired': [],
662
909
  'qc.min_length_ok': ["length", "min"],
663
910
  'qc.min_length_fail_detail': ["min", "length"],
664
911
  'qc.min_length_fail': ["min"],
@@ -704,6 +951,12 @@ export const ENGINE_MESSAGE_PARAMS = {
704
951
  'command.skills_empty': [],
705
952
  'command.summary_enqueued': [],
706
953
  'command.summary_unavailable': [],
954
+ // --- Сжатие контекста (summarization / compaction) ---
955
+ 'context.compression_empty': [],
956
+ 'context.compression_failed': ["mode", "reason"],
957
+ 'context.compression_template': [],
958
+ 'context.compression_output_limit': [],
959
+ 'context.summary_applied': ["mode"],
707
960
  // --- Inline shell (ADR-046 §7.4) ---
708
961
  'command.inline_shell_disabled': [],
709
962
  'command.inline_shell_denied': ["command", "reason"],
@@ -716,9 +969,37 @@ export const ENGINE_MESSAGE_PARAMS = {
716
969
  'sshkey.encryption_unavailable': [],
717
970
  'sshkey.decrypt_failed': ["id"],
718
971
  'sshkey.env_failed': [],
972
+ // Отказы гейта SSH-ключей (PROP-124 §3).
973
+ 'ssh.access.key_not_found': ["key"],
974
+ 'ssh.access.usage_denied': ["key", "usage"],
975
+ 'ssh.access.agent_not_linked': ["key", "agent"],
976
+ 'ssh.access.host_denied': ["key", "host"],
977
+ 'ssh.access.port_denied': ["key", "port"],
978
+ 'ssh.access.policy_required': ["key"],
979
+ 'ssh.access.ambiguous': ["keys"],
980
+ 'ssh.copy.uploaded': ["local", "remote", "host"],
981
+ 'ssh.copy.downloaded': ["remote", "host", "local"],
982
+ // PROP-124 §4c: адресный ssh-тул проброса порта (`ssh_tunnel`).
983
+ 'ssh.tunnel.started': ["direction", "listen_port", "target", "host", "id", "log"],
984
+ 'ssh.tunnel.socks_unsupported': [],
719
985
  'git.ssh_key_required': ["path"],
986
+ 'git.ssh_key_required_hint': ["path", "keys"],
987
+ 'git.ssh_keys_none': [],
988
+ 'sshkeys.tool.header': ["count"],
989
+ 'sshkeys.tool.empty': [],
990
+ 'sshkeys.tool.deps_unavailable': [],
720
991
  'git.repo_path_invalid': ["path"],
992
+ 'git.repo_not_a_repo': ["path"],
721
993
  'git.repo_exists': ["path"],
994
+ // ADR-076: занятый путь различается по состоянию (полноценный репозиторий /
995
+ // след прерванного клона / непустой каталог) — сообщения actionable.
996
+ 'git.repo_occupied_repo': ["path"],
997
+ 'git.repo_occupied_stub': ["path"],
998
+ 'git.repo_occupied_dir': ["path", "entries"],
999
+ 'git.repo_path_unreadable': ["path"],
1000
+ 'git.clone_timeout': ["timeout"],
1001
+ 'git.fetch_timeout': ["timeout"],
1002
+ 'git.timeout': ["tool", "timeout"],
722
1003
  // --- Git worktrees: per-session рабочий каталог (ADR-114) ---
723
1004
  'worktree.directory_missing': ["path"],
724
1005
  'worktree.tool.deps_unavailable': [],
@@ -746,6 +1027,10 @@ export const ENGINE_MESSAGE_PARAMS = {
746
1027
  'steer.injected': [],
747
1028
  'steer.limit_exceeded': ["limit"],
748
1029
  'steer.interrupted': [],
1030
+ 'steer.dropped_aborted': ["count"],
1031
+ 'steer.dropped_turn_ended': ["count"],
1032
+ 'steer.requeued_aborted': ["count"],
1033
+ 'steer.requeued_turn_ended': ["count"],
749
1034
  // --- Профиль пользователя и онбординг ---
750
1035
  'profile.deps_unavailable': ["tool"],
751
1036
  'profile.session_read_error': [],
@@ -830,6 +1115,10 @@ export const ENGINE_MESSAGE_PARAMS = {
830
1115
  'process.tool.header': ["count"],
831
1116
  'process.tool.no_log': [],
832
1117
  'process.tool.child_history': ["child_session"],
1118
+ 'process.tool.not_running': ["id"],
1119
+ 'process.tool.running': ["id"],
1120
+ 'process.tool.stopping': ["id"],
1121
+ 'process.tool.deleted': ["id"],
833
1122
  'attach.message.from_workspace': ["path"],
834
1123
  'attach.tool.attached': ["path"],
835
1124
  'attach.tool.deps_unavailable': [],
@@ -855,6 +1144,31 @@ export const ENGINE_MESSAGE_PARAMS = {
855
1144
  'models.list.provider_unknown': ["provider"],
856
1145
  'models.list.deps_unavailable': [],
857
1146
  'models.list.unavailable': ["reason"],
1147
+ 'instance.deps_unavailable': ["tool"],
1148
+ 'instance.info': ["json"],
1149
+ 'instance.mcp_list': ["count", "json"],
1150
+ 'instance.mcp_not_found': ["name", "available"],
1151
+ 'instance.mcp_test_ok': ["name", "count"],
1152
+ 'instance.mcp_test_failed': ["name", "error"],
1153
+ 'instance.mcp_add.added': ["name", "origin"],
1154
+ 'instance.mcp_update.updated': ["name"],
1155
+ 'instance.mcp_remove.removed': ["name"],
1156
+ 'instance.mcp_enable.session_ok': ["name", "enabled"],
1157
+ 'instance.mcp_enable.project_ok': ["name", "enabled"],
1158
+ 'instance.mcp_enable.instance_ok': ["name", "enabled"],
1159
+ 'instance.mcp_enable.no_project': [],
1160
+ 'instance.mcp_enable.no_session': [],
1161
+ 'instance.mcp_enable.session_forbidden': [],
1162
+ 'instance.mcp_reconnect.ok': ["name", "count"],
1163
+ 'instance.mcp_reconnect.failed': ["name", "error"],
1164
+ 'instance.mcp.forbidden': [],
1165
+ 'instance.mcp.instance_forbidden': [],
1166
+ 'instance.mcp.project_forbidden': [],
1167
+ 'instance.mcp.credential_unsupported': [],
1168
+ 'instance.mcp.secret_header': ["error"],
1169
+ 'instance.mcp.network_denied': ["url", "reason"],
1170
+ 'instance.mcp.invalid_config': ["error"],
1171
+ 'instance.mcp.exists': ["name"],
858
1172
  };
859
1173
  /** Достаёт имена {param}-плейсхолдеров из шаблона. Уникальные, в порядке появления. */
860
1174
  export function extractParams(template) {
package/dist/index.d.ts CHANGED
@@ -18,14 +18,14 @@ export { PIPELINE_MODES, pipelineModeSchema, pipelineNodeKindSchema, pipelineExi
18
18
  export type { PipelineMode, PipelineNodeKind, PipelineExitKind, PipelineConditionOp, JsonSchemaLike, PipelineCondition, PipelineTransition, PipelineNode, PipelineExit, PipelineSpec, PipelineRunTrigger, StepResult, PipelineRunStatus, PipelineRun, PipelineRunEventType, PipelineRunEvent, PipelineSpecValidationResult, } from './types/pipeline-engine.js';
19
19
  export { SYNTH_VERSION } from './version.js';
20
20
  export * from './model-metadata.js';
21
- export { type SynthConfig, type ServerConfig, type StorageConfig, type PostgresStorageConfig, postgresStorageConfigSchema, type AuthConfig as SynthAuthConfig, type LLMConfig, type CoreConfig, type RunnerConfig, type UIConfig, type I18nConfig, type LoggingConfig, type TsmConfig, type ContextConfigSchema, type SummarizationConfig, type McpServerConfig, type McpServerAuth, mcpServerAuthSchema, type McpConfig, type ToolsDisabledConfig, toolsDisabledConfigSchema, type SkillsConfig, skillsConfigSchema, type CommandsConfig, commandsConfigSchema, type InstructionsConfig, type InstructionsLazyConfig, type InstructionsFetchConfig, type InstructionSourceConfig, instructionsConfigSchema, instructionSourceConfigSchema, type RouterConfig, type RouterContentConfig, type RouterEscalationConfig, type RouterCostConfig, type RouterSubagentConfig, type DecisionConfig, decisionConfigSchema, type PluginsConfig, pluginsConfigSchema, type AttachmentsConfig, attachmentsConfigSchema, type AttachmentFamily, type ModalityModelRef, type ModalityModelAssignments, modalityModelRefSchema, modalityModelsSchema, ATTACHMENT_FAMILIES, type WebhooksConfig, webhooksConfigSchema, type RemoteConfig, type MicroFirstConfig, type SecurityConfig, securityTlsConfigSchema, type SecurityTlsConfig, type PromptInjectionConfig, type ProtectedPathsConfig, type LLMGatewayConfig, type LLMGatewayRateLimitConfig, type LLMGatewayAuditConfig, } from './config/index.js';
22
- export { defaultConfig, loadConfig } from './config/index.js';
23
- export { resolveDataDir, resolvePort, resolveWorkspacesRoot, resolveDefaultWorkspace, resolveWorkspaceOutsideRootPolicy, resolveSecretKey, resolveStorageBackend, resolvePostgresConfig, resolvePostgresPassword, resolveDegradedMode, resolveStorageFallbackDir, resolveIgnoreRules, resolveHome, resolveProfilesPath, resolveCredentialsPath, ensureDataDir, createDefaultConfig, resolveDeployMode, findConfigPath, defaultConfigPath, ensureConfigFile, ensureFirstRun, resolveDecisionProvider, resolveDecisionModel, resolveMaxUploadBytes } from './config/index.js';
21
+ export { type SynthConfig, type ServerConfig, type StorageConfig, type PostgresStorageConfig, postgresStorageConfigSchema, type AuthConfig as SynthAuthConfig, type LLMConfig, type CoreConfig, type RunnerConfig, type UIConfig, type I18nConfig, type LoggingConfig, type TsmConfig, type ContextConfigSchema, CONTEXT_WINDOW_POLICIES, type ContextWindowPolicy, type SummarizationConfig, type McpServerConfig, type McpServerAuth, mcpServerAuthSchema, type McpConfig, type ToolsDisabledConfig, toolsDisabledConfigSchema, type SkillsConfig, skillsConfigSchema, type CommandsConfig, commandsConfigSchema, type InstructionsConfig, type InstructionsLazyConfig, type InstructionsFetchConfig, type InstructionSourceConfig, instructionsConfigSchema, instructionSourceConfigSchema, type RouterConfig, type RouterContentConfig, type RouterEscalationConfig, type RouterCostConfig, type RouterSubagentConfig, type DecisionConfig, decisionConfigSchema, type PluginsConfig, pluginsConfigSchema, type AttachmentsConfig, attachmentsConfigSchema, type AttachmentsCompressionSettings, type AttachmentCompressionImageSettings, type AttachmentCompressionVideoSettings, type AttachmentCompressionAudioSettings, type AttachmentsThumbnailSettings, attachmentsCompressionSchema, attachmentCompressionImageSchema, attachmentCompressionVideoSchema, attachmentCompressionAudioSchema, attachmentsThumbnailSchema, type AttachmentFamily, type ModalityModelRef, type ModalityModelAssignments, modalityModelRefSchema, modalityModelsSchema, ATTACHMENT_FAMILIES, type UpdatesConfig, updatesConfigSchema, UPDATE_CHANNEL_CHOICES, type UpdateChannelChoiceSetting, type WebhooksConfig, webhooksConfigSchema, type RemoteConfig, type MicroFirstConfig, type SecurityConfig, securityTlsConfigSchema, type SecurityTlsConfig, type PromptInjectionConfig, type ProtectedPathsConfig, type LLMGatewayConfig, type LLMGatewayRateLimitConfig, type LLMGatewayAuditConfig, } from './config/index.js';
22
+ export { defaultConfig, loadConfig, redactConfigSecrets } from './config/index.js';
23
+ export { resolveDataDir, resolvePort, resolveWorkspacesRoot, resolveDefaultWorkspace, resolveWorkspaceOutsideRootPolicy, resolveSecretKey, resolveStorageBackend, resolvePostgresConfig, resolvePostgresPassword, resolveDegradedMode, resolveStorageFallbackDir, resolveIgnoreRules, resolveHome, resolveProfilesPath, resolveCredentialsPath, ensureDataDir, createDefaultConfig, resolveDeployMode, findConfigPath, defaultConfigPath, ensureConfigFile, ensureFirstRun, resolveDecisionProvider, resolveDecisionModel, resolveMaxUploadBytes, resolveMaxReadBytes, resolveMaxPreviewBytes } from './config/index.js';
24
24
  export type { StorageBackend, ResolvedPostgresConfig } from './config/index.js';
25
25
  export { applyEnvOverrides, envOverrideName, toSnakeCase, parseEnvValue, ENV_OVERRIDES } from './config/index.js';
26
26
  export { resolveExecutionConfig, resolveExecutionMode, defaultExecutionConcurrency, parseExecutionUrlList, isExecutionMode, isExecutionFailMode, EXECUTION_ENV, EXECUTION_MODE_CLI_FLAG, } from './config/index.js';
27
27
  export type { ExecutionConfig, ExecutionRemoteConfig, ExecutionMode, ExecutionFailMode, ResolvedExecutionConfig, ResolvedExecutionRemoteConfig, ExecutionCliOverride, } from './config/index.js';
28
- export { resolveTlsConfig, resolveTlsTrust, resolveTlsProfiles, selectTlsClientProfile, matchTlsHostPattern, normalizeTlsHost, isPemContent, TLS_ENV, } from './config/index.js';
28
+ export { resolveTlsConfig, resolveTlsTrust, resolveTlsProfiles, selectTlsClientProfile, isPemContent, TLS_ENV, } from './config/index.js';
29
29
  export type { ResolvedTlsConfig, ResolvedTlsTrust, ResolvedTlsProfiles, TlsClientProfile, TlsClientMaterial, TlsMappingSettings, TlsRuntimeSettings, TlsSource, TlsConfigSource, } from './config/index.js';
30
30
  export { TLS_RUNTIME_FILENAME, TLS_SECRETS_SUBDIR, TLS_MATERIAL_NAMES, tlsRuntimePath, tlsSecretsDir, tlsSecretFilePath, tlsMappingFileName, readTlsRuntimeSettings, writeTlsRuntimeSettings, writeTlsSecretFile, readTlsSecretFile, validateTlsRuntimeSettings, validateCaPem, validateClientPem, isValidHostPattern, assertCertMatchesKey, certificateSubjectFromPem, certificateSubjectFromFile, certificateSubjectsFromPem, countCertificates, } from './config/index.js';
31
31
  export { PROXY_ENV, PROXY_PASSWORD_ENV, PROXY_TLS_ENV, PROXY_URL_FIELDS, STANDARD_PROXY_ENV, ProxyConfigError, NoProxyMatcher, parseProxyUrl, isSocksProxyProtocol, redactProxyUrl, resolveProxyConfig, resolveProxyRoute, resolveProxyTls, mergeProxyConfig, validateProxyConfig, validateProxyHostPatterns, emptyResolvedProxyConfig, proxyUrlFor, proxyEntryFor, defaultProxyEntry, shouldProxyUrl, proxyStatus, proxyProfilePasswordEnv, proxyProfilePasswordPath, readProxyPasswordFile, } from './config/index.js';
package/dist/index.js CHANGED
@@ -22,14 +22,14 @@ export { PIPELINE_MODES, pipelineModeSchema, pipelineNodeKindSchema, pipelineExi
22
22
  export { SYNTH_VERSION } from './version.js';
23
23
  export * from './model-metadata.js';
24
24
  // Конфигурация — выборочный экспорт (избегаем конфликта AuthConfig/TestUser)
25
- export { postgresStorageConfigSchema, mcpServerAuthSchema, toolsDisabledConfigSchema, skillsConfigSchema, commandsConfigSchema, instructionsConfigSchema, instructionSourceConfigSchema, decisionConfigSchema, pluginsConfigSchema, attachmentsConfigSchema, modalityModelRefSchema, modalityModelsSchema, ATTACHMENT_FAMILIES, webhooksConfigSchema, securityTlsConfigSchema, } from './config/index.js';
26
- export { defaultConfig, loadConfig } from './config/index.js';
27
- export { resolveDataDir, resolvePort, resolveWorkspacesRoot, resolveDefaultWorkspace, resolveWorkspaceOutsideRootPolicy, resolveSecretKey, resolveStorageBackend, resolvePostgresConfig, resolvePostgresPassword, resolveDegradedMode, resolveStorageFallbackDir, resolveIgnoreRules, resolveHome, resolveProfilesPath, resolveCredentialsPath, ensureDataDir, createDefaultConfig, resolveDeployMode, findConfigPath, defaultConfigPath, ensureConfigFile, ensureFirstRun, resolveDecisionProvider, resolveDecisionModel, resolveMaxUploadBytes } from './config/index.js';
25
+ export { postgresStorageConfigSchema, CONTEXT_WINDOW_POLICIES, mcpServerAuthSchema, toolsDisabledConfigSchema, skillsConfigSchema, commandsConfigSchema, instructionsConfigSchema, instructionSourceConfigSchema, decisionConfigSchema, pluginsConfigSchema, attachmentsConfigSchema, attachmentsCompressionSchema, attachmentCompressionImageSchema, attachmentCompressionVideoSchema, attachmentCompressionAudioSchema, attachmentsThumbnailSchema, modalityModelRefSchema, modalityModelsSchema, ATTACHMENT_FAMILIES, updatesConfigSchema, UPDATE_CHANNEL_CHOICES, webhooksConfigSchema, securityTlsConfigSchema, } from './config/index.js';
26
+ export { defaultConfig, loadConfig, redactConfigSecrets } from './config/index.js';
27
+ export { resolveDataDir, resolvePort, resolveWorkspacesRoot, resolveDefaultWorkspace, resolveWorkspaceOutsideRootPolicy, resolveSecretKey, resolveStorageBackend, resolvePostgresConfig, resolvePostgresPassword, resolveDegradedMode, resolveStorageFallbackDir, resolveIgnoreRules, resolveHome, resolveProfilesPath, resolveCredentialsPath, ensureDataDir, createDefaultConfig, resolveDeployMode, findConfigPath, defaultConfigPath, ensureConfigFile, ensureFirstRun, resolveDecisionProvider, resolveDecisionModel, resolveMaxUploadBytes, resolveMaxReadBytes, resolveMaxPreviewBytes } from './config/index.js';
28
28
  export { applyEnvOverrides, envOverrideName, toSnakeCase, parseEnvValue, ENV_OVERRIDES } from './config/index.js';
29
29
  // ADR-077: секция `execution` — топология исполнения (переключатель запуска).
30
30
  export { resolveExecutionConfig, resolveExecutionMode, defaultExecutionConcurrency, parseExecutionUrlList, isExecutionMode, isExecutionFailMode, EXECUTION_ENV, EXECUTION_MODE_CLI_FLAG, } from './config/index.js';
31
31
  // ADR-099: резолверы доверия TLS/CA (`security.tls`).
32
- export { resolveTlsConfig, resolveTlsTrust, resolveTlsProfiles, selectTlsClientProfile, matchTlsHostPattern, normalizeTlsHost, isPemContent, TLS_ENV, } from './config/index.js';
32
+ export { resolveTlsConfig, resolveTlsTrust, resolveTlsProfiles, selectTlsClientProfile, isPemContent, TLS_ENV, } from './config/index.js';
33
33
  // ADR-099: bootstrap-хранилище runtime-настроек TLS ({dataDir}/security-tls.json).
34
34
  export { TLS_RUNTIME_FILENAME, TLS_SECRETS_SUBDIR, TLS_MATERIAL_NAMES, tlsRuntimePath, tlsSecretsDir, tlsSecretFilePath, tlsMappingFileName, readTlsRuntimeSettings, writeTlsRuntimeSettings, writeTlsSecretFile, readTlsSecretFile, validateTlsRuntimeSettings, validateCaPem, validateClientPem, isValidHostPattern, assertCertMatchesKey, certificateSubjectFromPem, certificateSubjectFromFile, certificateSubjectsFromPem, countCertificates, } from './config/index.js';
35
35
  // ADR-099 (D1): HTTP/HTTPS-прокси единого egress-слоя.