@itphx/synth-shared 0.8.3 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 itphx
3
+ Copyright (c) 2026 Дмитрий Рамазанов <ramazanov_dv@mail.ru>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
6
6
  associated documentation files (the "Software"), to deal in the Software without restriction, including
package/LICENSE.ru.md ADDED
@@ -0,0 +1,31 @@
1
+ # Лицензия MIT (перевод)
2
+
3
+ > **Внимание.** Этот файл — неофициальный перевод лицензии MIT на русский язык,
4
+ > предоставленный исключительно в информационных целях. Юридическую силу имеет
5
+ > оригинальный текст на английском языке — файл [LICENSE](./LICENSE).
6
+ > При любых расхождениях приоритет имеет английская версия.
7
+
8
+ MIT License
9
+
10
+ Copyright (c) 2026 Дмитрий Рамазанов <ramazanov_dv@mail.ru>
11
+
12
+ Настоящим предоставляется бесплатное разрешение любому лицу, получившему копию
13
+ данного программного обеспечения и сопутствующих файлов документации (далее —
14
+ «Программное обеспечение»), безвозмездно распоряжаться Программным обеспечением
15
+ без ограничений, включая, помимо прочего, права на использование, копирование,
16
+ изменение, объединение, публикацию, распространение, сублицензирование и/или
17
+ продажу копий Программного обеспечения, а также разрешать лицам, которым
18
+ предоставляется Программное обеспечение, делать то же самое при соблюдении
19
+ следующих условий:
20
+
21
+ Указанное выше уведомление об авторских правах и настоящее уведомление о
22
+ разрешении должны быть включены во все копии или существенные части
23
+ Программного обеспечения.
24
+
25
+ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ «КАК ЕСТЬ», БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ,
26
+ ЯВНЫХ ИЛИ ПОДРАЗУМЕВАЕМЫХ, ВКЛЮЧАЯ, ПОМИМО ПРОЧЕГО, ГАРАНТИИ ТОВАРНОЙ
27
+ ПРИГОДНОСТИ, ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЁННОЙ ЦЕЛИ И НЕНАРУШЕНИЯ ПРАВ. НИ В КАКОМ
28
+ СЛУЧАЕ АВТОРЫ ИЛИ ПРАВООБЛАДАТЕЛИ НЕ НЕСУТ ОТВЕТСТВЕННОСТИ ПО КАКИМ-ЛИБО
29
+ ИСКАМ, УБЫТКАМ ИЛИ ИНЫМ ОБЯЗАТЕЛЬСТВАМ, БУДЬ ТО ПО ДОГОВОРУ, ДЕЛИКТУ ИЛИ ИНЫМ
30
+ ОСНОВАНИЯМ, ВОЗНИКАЮЩИМ ИЗ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ, В СВЯЗИ С НИМ ИЛИ В
31
+ РЕЗУЛЬТАТЕ ЕГО ИСПОЛЬЗОВАНИЯ ИЛИ ИНЫХ ДЕЙСТВИЙ С НИМ.
@@ -40,7 +40,7 @@ export const defaultConfig = {
40
40
  ui: {
41
41
  port: 5002,
42
42
  backendUrl: 'http://localhost:5000',
43
- theme: 'flexoki',
43
+ theme: 'synthesis',
44
44
  themeMode: 'system',
45
45
  locale: 'ru',
46
46
  },
@@ -42,5 +42,12 @@ export declare function resolveWorkspaceOutsideRootPolicy(config: SynthConfig, e
42
42
  * (пусто — core использует файл `{dataDir}/secrets/master.key`).
43
43
  */
44
44
  export declare function resolveSecretKey(config: SynthConfig, env?: NodeJS.ProcessEnv): string;
45
+ /**
46
+ * AD-069 §9.2: нейтральная сессия без проектных инструкций.
47
+ * Приоритет: явный флаг CLI `--ignore-rules`/`--safe-mode` (`explicit`) >
48
+ * env `SYNTH_IGNORE_RULES` (`1`/`true`). Значение — эффективный
49
+ * `instructions.enabled=false`.
50
+ */
51
+ export declare function resolveIgnoreRules(explicit?: boolean, env?: NodeJS.ProcessEnv): boolean;
45
52
  export declare function ensureDataDir(dataDir: string): Promise<void>;
46
53
  export declare function createDefaultConfig(targetPath: string): Promise<void>;
@@ -228,6 +228,18 @@ export function resolveSecretKey(config, env) {
228
228
  return config.security.secretKey;
229
229
  return '';
230
230
  }
231
+ /**
232
+ * AD-069 §9.2: нейтральная сессия без проектных инструкций.
233
+ * Приоритет: явный флаг CLI `--ignore-rules`/`--safe-mode` (`explicit`) >
234
+ * env `SYNTH_IGNORE_RULES` (`1`/`true`). Значение — эффективный
235
+ * `instructions.enabled=false`.
236
+ */
237
+ export function resolveIgnoreRules(explicit, env) {
238
+ if (explicit)
239
+ return true;
240
+ const envVal = (env ?? process.env).SYNTH_IGNORE_RULES;
241
+ return envVal === '1' || envVal?.toLowerCase() === 'true';
242
+ }
231
243
  export async function ensureDataDir(dataDir) {
232
244
  await mkdir(dataDir, { recursive: true });
233
245
  for (const subdir of DATA_SUBDIRS) {
@@ -71,7 +71,7 @@ export const runnerConfigSchema = z.object({
71
71
  export const uiConfigSchema = z.object({
72
72
  port: z.number().int().min(1).max(65535).default(5002),
73
73
  backendUrl: z.string().default('http://localhost:5000'),
74
- theme: z.string().default('flexoki'),
74
+ theme: z.string().default('synthesis'),
75
75
  themeMode: z.enum(['system', 'light', 'dark']).default('system'),
76
76
  locale: z.string().default('ru'),
77
77
  });
@@ -11,7 +11,7 @@
11
11
  * - `ENGINE_MESSAGE_PARAMS` — для каждого ключа имена {param}-плейсхолдеров en-шаблона.
12
12
  * - `extractParams` — утилита извлечения плейсхолдеров (без логики движка).
13
13
  */
14
- export declare const ENGINE_MESSAGE_KEYS: readonly ["session.max_iterations", "session.stopped", "session.stopped_reason_denied", "session.denied_blocked", "session.empty_response", "session.dialog_title", "session.default_title", "session.reference_label", "session.reference_link", "session.retry_cancelled", "session.subtask_title", "task.stopped_by_user", "task.stopped_before_completion", "task.stopped_by_deny", "task.empty_response", "task.subagent_exec_error", "task.subagent_not_found", "task.subagent_not_allowed", "task.deps_unavailable", "task.subagent_exec_error_after_retries", "task.resume_marker", "task.resume_result", "task.resume_failed", "task.resume_aborted", "task.resume_session_not_found", "task.resume_no_parent", "task.resume_parent_not_found", "task.resume_locked", "task.resume_agent_not_found", "task.resume_provider_unavailable", "tool.args_error", "tool.exec_error", "tool.not_found", "tool.permission_denied_default", "tool.doom_loop", "tool.empty_output", "tool.output_truncated", "tool.shell_error", "tool.command_failed_default", "tool.aborted", "tool.binary_missing", "fs.file_written", "fs.file_edited", "fs.replace_not_found", "fs.replace_multiple", "fs.dir_created", "fs.file_deleted", "fsread.empty_directory", "fsread.no_files", "fsread.glob_error", "web.duckduckgo_blocked", "web.search_failed", "web.search_results", "web.fetch_args_url_required", "web.js_framework_warning", "web.low_content_warning", "web.content_truncated", "web.block_timeout", "web.block_error", "web.fetch_all_failed", "web.no_results", "web.search_error", "search.no_matches", "search.matches_truncated", "search.rg_not_installed", "search.error", "plan.enter_success", "plan.exit_success", "plan.session_manager_unavailable", "plan.enter_failed", "plan.exit_failed", "plan.project_store_unavailable", "plan.no_project", "plan.no_project_read", "plan.column_not_found", "plan.item_not_found", "plan.save_error", "plan.markdown_title", "plan.markdown_empty", "plan.markdown_column_empty", "plan.markdown_dependencies", "plan.default_column_backlog", "plan.default_column_todo", "plan.default_column_in_progress", "plan.default_column_done", "todo.save_error", "todo.read_error", "todo.list_empty", "todo.list", "todo.item_not_found", "todo.items_not_found", "todo.status_pending", "todo.status_in_progress", "todo.status_completed", "todo.status_cancelled", "todo.priority_high", "todo.priority_medium", "todo.priority_low", "project.deps_unavailable", "project.session_read_error", "project.session_not_found", "project.save_error", "project.workspace_create_error", "project.created", "project.read_error", "project.not_found", "project.attached", "project.log_no_project", "project.log_save_error", "project.log_added", "project.log_empty", "project.log_list", "project.invariants_no_project", "project.invariants_empty", "project.invariants_saved", "project.invariants_save_error", "project.write_forbidden", "project.updated", "project.updated_ok", "project.invalid_icon", "project.invalid_color", "project.no_project", "project.workspace_set", "project.workspace_invalid", "project.workspace_denied", "project.workspace_confirm_required", "project.workspace_missing", "project.repo_cloned", "project.repo_initialized", "project.repo_registered", "project.repo_fetched", "project.repo_removed", "project.repo_not_found", "projectctx.info_title", "projectctx.info_id", "projectctx.info_workspace", "projectctx.info_description", "projectctx.not_found", "projectctx.missing", "projectctx.working_dir", "projectctx.no_plan_hint", "projectctx.git_section", "projectctx.repo_branch", "projectctx.repo_remote", "projectctx.repo_state", "projectctx.repo_state_dirty", "projectctx.repo_state_clean", "projectctx.repo_last_commit", "projectctx.repos_title", "projectctx.repo_not_found", "projectctx.repos_none", "projectctx.repos_found", "projectctx.repo_destination", "projectctx.repo_name", "projectctx.repo_url", "projectctx.repo_type", "projectctx.repo_default_branch", "projectctx.repo_ssh_key", "projectctx.repo_last_fetch", "tool.classified", "reference.session_manager_unavailable", "reference.session_not_found", "reference.no_messages", "reference.session_title", "permission.yolo_auto_approved", "permission.plan_write_blocked", "permission.plan_source_mode", "permission.plan_source_strict", "permission.plan_shell_denied", "permission.mcp_unavailable", "permission.dep_unavailable", "permission.no_rules", "permission.rule_matched", "permission.rule_pattern_matched", "permission.rule_prefix_matched", "permission.rule_command_matched", "permission.ask_timeout", "permission.ask_no_subscribers", "permission.ask_denied", "shellguard.allow_default", "shellguard.deny_prefix", "shellguard.deny_path", "shellguard.ask_path", "shellguard.deny_dir", "protectedpaths.unresolvable", "protectedpaths.dynamic", "protectedpaths.allow_default", "security.warn_prefix", "security.injection_blocked", "gateway.input_blocked", "gateway.rate_limit_warning", "gateway.output_secrets_reason", "router.timeout", "router.network_error", "router.provider_not_found", "router.provider_unspecified", "router.escalation", "router.context_length_exceeded", "router.rate_limit_exceeded", "qc.min_length_ok", "qc.min_length_fail_detail", "qc.min_length_fail", "qc.constraint_empty", "qc.constraint_parse_error", "qc.constraint_ok", "qc.self_check_skipped", "qc.self_check_unparsed", "qc.self_check_low", "qc.self_check_low_reason", "qc.self_check_ok", "qc.self_check_error", "qc.all_passed", "micro.greeting", "micro.farewell", "micro.thanks", "micro.enum.yes", "micro.enum.no", "micro.enum.approve", "micro.enum.reject", "micro.enum.mode_plan", "micro.enum.mode_act", "micro.intent.question", "micro.intent.command", "micro.intent.review", "micro.intent.explain", "micro.intent.debug", "micro.intent.fix", "micro.intent.test", "skill.args_error", "skill.not_found", "skill.untrusted", "skill.delegation", "skill.file_not_found", "skill.scope_disabled", "command.unknown", "command.denied", "command.unavailable", "command.help", "command.list_empty", "command.skills_empty", "command.summary_enqueued", "command.summary_unavailable", "command.inline_shell_disabled", "command.inline_shell_denied", "command.inline_shell_failed", "command.inline_shell_truncated", "command.inline_shell_unavailable", "sshkey.not_found", "sshkey.name_exists", "sshkey.encryption_unavailable", "sshkey.decrypt_failed", "sshkey.env_failed", "git.ssh_key_required", "git.repo_path_invalid", "git.repo_exists"];
14
+ export declare const ENGINE_MESSAGE_KEYS: readonly ["session.max_iterations", "session.stopped", "session.stopped_reason_denied", "session.denied_blocked", "session.empty_response", "session.dialog_title", "session.default_title", "session.reference_label", "session.reference_link", "session.retry_cancelled", "session.subtask_title", "task.stopped_by_user", "task.stopped_before_completion", "task.stopped_by_deny", "task.empty_response", "task.subagent_exec_error", "task.subagent_not_found", "task.subagent_not_allowed", "task.deps_unavailable", "task.subagent_exec_error_after_retries", "task.resume_marker", "task.resume_result", "task.resume_failed", "task.resume_aborted", "task.resume_session_not_found", "task.resume_no_parent", "task.resume_parent_not_found", "task.resume_locked", "task.resume_agent_not_found", "task.resume_provider_unavailable", "tool.args_error", "tool.exec_error", "tool.not_found", "tool.permission_denied_default", "tool.doom_loop", "tool.empty_output", "tool.output_truncated", "tool.shell_error", "tool.command_failed_default", "tool.aborted", "tool.binary_missing", "fs.file_written", "fs.file_edited", "fs.replace_not_found", "fs.replace_multiple", "fs.dir_created", "fs.file_deleted", "fsread.empty_directory", "fsread.no_files", "fsread.glob_error", "web.duckduckgo_blocked", "web.search_failed", "web.search_results", "web.fetch_args_url_required", "web.js_framework_warning", "web.low_content_warning", "web.content_truncated", "web.block_timeout", "web.block_error", "web.fetch_all_failed", "web.no_results", "web.search_error", "search.no_matches", "search.matches_truncated", "search.rg_not_installed", "search.error", "plan.enter_success", "plan.exit_success", "plan.session_manager_unavailable", "plan.enter_failed", "plan.exit_failed", "plan.project_store_unavailable", "plan.no_project", "plan.no_project_read", "plan.column_not_found", "plan.item_not_found", "plan.save_error", "plan.markdown_title", "plan.markdown_empty", "plan.markdown_column_empty", "plan.markdown_dependencies", "plan.default_column_backlog", "plan.default_column_todo", "plan.default_column_in_progress", "plan.default_column_done", "todo.save_error", "todo.read_error", "todo.list_empty", "todo.list", "todo.item_not_found", "todo.items_not_found", "todo.status_pending", "todo.status_in_progress", "todo.status_completed", "todo.status_cancelled", "todo.priority_high", "todo.priority_medium", "todo.priority_low", "project.deps_unavailable", "project.session_read_error", "project.session_not_found", "project.save_error", "project.workspace_create_error", "project.created", "project.read_error", "project.not_found", "project.attached", "project.log_no_project", "project.log_save_error", "project.log_added", "project.log_empty", "project.log_list", "project.invariants_no_project", "project.invariants_empty", "project.invariants_saved", "project.invariants_save_error", "project.write_forbidden", "project.updated", "project.updated_ok", "project.invalid_icon", "project.invalid_color", "project.no_project", "project.workspace_set", "project.workspace_invalid", "project.workspace_denied", "project.workspace_confirm_required", "project.workspace_missing", "project.repo_cloned", "project.repo_initialized", "project.repo_registered", "project.repo_fetched", "project.repo_removed", "project.repo_not_found", "projectctx.info_title", "projectctx.info_id", "projectctx.info_workspace", "projectctx.info_description", "projectctx.not_found", "projectctx.missing", "projectctx.working_dir", "projectctx.no_plan_hint", "projectctx.git_section", "projectctx.repo_branch", "projectctx.repo_remote", "projectctx.repo_state", "projectctx.repo_state_dirty", "projectctx.repo_state_clean", "projectctx.repo_last_commit", "projectctx.repos_title", "projectctx.repo_not_found", "projectctx.repos_none", "projectctx.repos_found", "projectctx.repo_destination", "projectctx.repo_name", "projectctx.repo_url", "projectctx.repo_type", "projectctx.repo_default_branch", "projectctx.repo_ssh_key", "projectctx.repo_last_fetch", "tool.classified", "reference.session_manager_unavailable", "reference.session_not_found", "reference.no_messages", "reference.session_title", "permission.yolo_auto_approved", "permission.plan_write_blocked", "permission.plan_source_mode", "permission.plan_source_strict", "permission.plan_shell_denied", "permission.mcp_unavailable", "permission.dep_unavailable", "permission.workspace_unavailable", "permission.no_rules", "permission.rule_matched", "permission.rule_pattern_matched", "permission.rule_prefix_matched", "permission.rule_command_matched", "permission.ask_timeout", "permission.ask_no_subscribers", "permission.ask_denied", "shellguard.allow_default", "shellguard.deny_prefix", "shellguard.deny_path", "shellguard.ask_path", "shellguard.deny_dir", "protectedpaths.unresolvable", "protectedpaths.dynamic", "protectedpaths.allow_default", "security.warn_prefix", "security.injection_blocked", "gateway.input_blocked", "gateway.rate_limit_warning", "gateway.output_secrets_reason", "router.timeout", "router.network_error", "router.provider_not_found", "router.provider_unspecified", "router.escalation", "router.context_length_exceeded", "router.rate_limit_exceeded", "qc.min_length_ok", "qc.min_length_fail_detail", "qc.min_length_fail", "qc.constraint_empty", "qc.constraint_parse_error", "qc.constraint_ok", "qc.self_check_skipped", "qc.self_check_unparsed", "qc.self_check_low", "qc.self_check_low_reason", "qc.self_check_ok", "qc.self_check_error", "qc.all_passed", "micro.greeting", "micro.farewell", "micro.thanks", "micro.enum.yes", "micro.enum.no", "micro.enum.approve", "micro.enum.reject", "micro.enum.mode_plan", "micro.enum.mode_act", "micro.intent.question", "micro.intent.command", "micro.intent.review", "micro.intent.explain", "micro.intent.debug", "micro.intent.fix", "micro.intent.test", "skill.args_error", "skill.not_found", "skill.untrusted", "skill.delegation", "skill.file_not_found", "skill.scope_disabled", "command.unknown", "command.denied", "command.unavailable", "command.help", "command.list_empty", "command.skills_empty", "command.summary_enqueued", "command.summary_unavailable", "command.inline_shell_disabled", "command.inline_shell_denied", "command.inline_shell_failed", "command.inline_shell_truncated", "command.inline_shell_unavailable", "sshkey.not_found", "sshkey.name_exists", "sshkey.encryption_unavailable", "sshkey.decrypt_failed", "sshkey.env_failed", "git.ssh_key_required", "git.repo_path_invalid", "git.repo_exists"];
15
15
  export type EngineMessageKey = (typeof ENGINE_MESSAGE_KEYS)[number];
16
16
  export declare const ENGINE_MESSAGE_PARAMS: Record<EngineMessageKey, readonly string[]>;
17
17
  /** Достаёт имена {param}-плейсхолдеров из шаблона. Уникальные, в порядке появления. */
@@ -183,6 +183,7 @@ export const ENGINE_MESSAGE_KEYS = [
183
183
  'permission.plan_shell_denied',
184
184
  'permission.mcp_unavailable',
185
185
  'permission.dep_unavailable',
186
+ 'permission.workspace_unavailable',
186
187
  'permission.no_rules',
187
188
  'permission.rule_matched',
188
189
  'permission.rule_pattern_matched',
@@ -444,6 +445,7 @@ export const ENGINE_MESSAGE_PARAMS = {
444
445
  'permission.plan_shell_denied': [],
445
446
  'permission.mcp_unavailable': ["mode"],
446
447
  'permission.dep_unavailable': ["binary"],
448
+ 'permission.workspace_unavailable': [],
447
449
  'permission.no_rules': ["tool"],
448
450
  'permission.rule_matched': ["key", "action"],
449
451
  'permission.rule_pattern_matched': ["key", "pattern", "action", "path"],
package/dist/index.d.ts CHANGED
@@ -10,5 +10,5 @@ export { SYNTH_VERSION } from './version.js';
10
10
  export * from './model-metadata.js';
11
11
  export { type SynthConfig, type ServerConfig, type StorageConfig, 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 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 RemoteConfig, type MicroFirstConfig, type SecurityConfig, type PromptInjectionConfig, type ProtectedPathsConfig, type LLMGatewayConfig, type LLMGatewayRateLimitConfig, type LLMGatewayAuditConfig, } from './config/index.js';
12
12
  export { defaultConfig, loadConfig } from './config/index.js';
13
- export { resolveDataDir, resolvePort, resolveWorkspacesRoot, resolveDefaultWorkspace, resolveWorkspaceOutsideRootPolicy, resolveSecretKey, resolveHome, resolveProfilesPath, resolveCredentialsPath, ensureDataDir, createDefaultConfig, resolveDeployMode, findConfigPath, defaultConfigPath, ensureConfigFile, ensureFirstRun } from './config/index.js';
13
+ export { resolveDataDir, resolvePort, resolveWorkspacesRoot, resolveDefaultWorkspace, resolveWorkspaceOutsideRootPolicy, resolveSecretKey, resolveIgnoreRules, resolveHome, resolveProfilesPath, resolveCredentialsPath, ensureDataDir, createDefaultConfig, resolveDeployMode, findConfigPath, defaultConfigPath, ensureConfigFile, ensureFirstRun } from './config/index.js';
14
14
  export type { DeployMode } from './config/index.js';
package/dist/index.js CHANGED
@@ -12,4 +12,4 @@ export * from './model-metadata.js';
12
12
  // Конфигурация — выборочный экспорт (избегаем конфликта AuthConfig/TestUser)
13
13
  export { toolsDisabledConfigSchema, skillsConfigSchema, commandsConfigSchema, instructionsConfigSchema, instructionSourceConfigSchema, } from './config/index.js';
14
14
  export { defaultConfig, loadConfig } from './config/index.js';
15
- export { resolveDataDir, resolvePort, resolveWorkspacesRoot, resolveDefaultWorkspace, resolveWorkspaceOutsideRootPolicy, resolveSecretKey, resolveHome, resolveProfilesPath, resolveCredentialsPath, ensureDataDir, createDefaultConfig, resolveDeployMode, findConfigPath, defaultConfigPath, ensureConfigFile, ensureFirstRun } from './config/index.js';
15
+ export { resolveDataDir, resolvePort, resolveWorkspacesRoot, resolveDefaultWorkspace, resolveWorkspaceOutsideRootPolicy, resolveSecretKey, resolveIgnoreRules, resolveHome, resolveProfilesPath, resolveCredentialsPath, ensureDataDir, createDefaultConfig, resolveDeployMode, findConfigPath, defaultConfigPath, ensureConfigFile, ensureFirstRun } from './config/index.js';
@@ -7,10 +7,10 @@ export declare const projectRoleSchema: z.ZodNativeEnum<typeof ProjectRole>;
7
7
  export declare const statusMessageTypeSchema: z.ZodNativeEnum<typeof StatusMessageType>;
8
8
  /** Zod-схемы канонических ключей иконок/цветов (единые для project и session). */
9
9
  export declare const projectIconKeySchema: z.ZodEnum<["code", "terminal", "rocket", "flask", "gamepad", "briefcase", "home", "globe", "leaf", "shield", "palette", "server", "phone", "database", "lightbulb", "music", "camera", "book", "heart", "folder", "chat", "cpu", "file", "file-code", "docs", "task", "todo", "bug", "robot", "brain", "git", "repo", "test", "chart", "star", "image", "calendar"]>;
10
- export declare const projectColorKeySchema: z.ZodEnum<["keyword", "string", "number", "type", "comment", "error", "primary", "success"]>;
11
- /** true, если значение — канонический ключ иконки (без алиасов; для записи). */
10
+ export declare const projectColorKeySchema: z.ZodEnum<["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "a11", "a12", "a13", "a14", "a15", "a16"]>;
11
+ /** true, если значение — канонический ключ иконки (для записи и чтения). */
12
12
  export declare function isProjectIconKey(value: unknown): value is ProjectIconKey;
13
- /** true, если значение — канонический ключ цвета (без алиасов; для записи). */
13
+ /** true, если значение — канонический ключ цвета (без алиасов; для записи и чтения). */
14
14
  export declare function isProjectColorKey(value: unknown): value is ProjectColorKey;
15
15
  /**
16
16
  * Нормализация иконки при ЧТЕНИИ. Канонический ключ → как есть; всё прочее
@@ -18,8 +18,8 @@ export declare function isProjectColorKey(value: unknown): value is ProjectColor
18
18
  */
19
19
  export declare function normalizeIconKey(value: unknown): ProjectIconKey | undefined;
20
20
  /**
21
- * Нормализация цвета при ЧТЕНИИ: канонический ключ или legacy-алиас → ключ
22
- * палитры; всё прочее → `undefined`.
21
+ * Нормализация цвета при ЧТЕНИИ: канонический ключ палитры → как есть; всё
22
+ * прочее (включая legacy-алиасы) → `undefined`.
23
23
  */
24
24
  export declare function normalizeColorKey(value: unknown): ProjectColorKey | undefined;
25
25
  export declare const tokenUsageSchema: z.ZodObject<{
@@ -124,7 +124,7 @@ export declare const sessionCreateSchema: z.ZodObject<{
124
124
  name: z.ZodOptional<z.ZodString>;
125
125
  title: z.ZodOptional<z.ZodString>;
126
126
  icon: z.ZodNullable<z.ZodOptional<z.ZodEnum<["code", "terminal", "rocket", "flask", "gamepad", "briefcase", "home", "globe", "leaf", "shield", "palette", "server", "phone", "database", "lightbulb", "music", "camera", "book", "heart", "folder", "chat", "cpu", "file", "file-code", "docs", "task", "todo", "bug", "robot", "brain", "git", "repo", "test", "chart", "star", "image", "calendar"]>>>;
127
- color: z.ZodNullable<z.ZodOptional<z.ZodEnum<["keyword", "string", "number", "type", "comment", "error", "primary", "success"]>>>;
127
+ color: z.ZodNullable<z.ZodOptional<z.ZodEnum<["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "a11", "a12", "a13", "a14", "a15", "a16"]>>>;
128
128
  projectId: z.ZodOptional<z.ZodString>;
129
129
  engine: z.ZodDefault<z.ZodEnum<["synth", "opencode", "cline"]>>;
130
130
  settings: z.ZodOptional<z.ZodObject<{
@@ -217,7 +217,7 @@ export declare const sessionCreateSchema: z.ZodObject<{
217
217
  name?: string | undefined;
218
218
  title?: string | undefined;
219
219
  icon?: "task" | "code" | "terminal" | "rocket" | "flask" | "gamepad" | "briefcase" | "home" | "globe" | "leaf" | "shield" | "palette" | "server" | "phone" | "database" | "lightbulb" | "music" | "camera" | "book" | "heart" | "folder" | "chat" | "cpu" | "file" | "file-code" | "docs" | "todo" | "bug" | "robot" | "brain" | "git" | "repo" | "test" | "chart" | "star" | "image" | "calendar" | null | undefined;
220
- color?: "string" | "number" | "type" | "keyword" | "comment" | "error" | "primary" | "success" | null | undefined;
220
+ color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
221
221
  projectId?: string | undefined;
222
222
  settings?: {
223
223
  temperature: number;
@@ -252,7 +252,7 @@ export declare const sessionCreateSchema: z.ZodObject<{
252
252
  name?: string | undefined;
253
253
  title?: string | undefined;
254
254
  icon?: "task" | "code" | "terminal" | "rocket" | "flask" | "gamepad" | "briefcase" | "home" | "globe" | "leaf" | "shield" | "palette" | "server" | "phone" | "database" | "lightbulb" | "music" | "camera" | "book" | "heart" | "folder" | "chat" | "cpu" | "file" | "file-code" | "docs" | "todo" | "bug" | "robot" | "brain" | "git" | "repo" | "test" | "chart" | "star" | "image" | "calendar" | null | undefined;
255
- color?: "string" | "number" | "type" | "keyword" | "comment" | "error" | "primary" | "success" | null | undefined;
255
+ color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
256
256
  projectId?: string | undefined;
257
257
  engine?: "synth" | "opencode" | "cline" | undefined;
258
258
  settings?: {
@@ -288,7 +288,7 @@ export declare const sessionCreateSchema: z.ZodObject<{
288
288
  export declare const sessionUpdateSchema: z.ZodObject<{
289
289
  name: z.ZodOptional<z.ZodString>;
290
290
  icon: z.ZodNullable<z.ZodOptional<z.ZodEnum<["code", "terminal", "rocket", "flask", "gamepad", "briefcase", "home", "globe", "leaf", "shield", "palette", "server", "phone", "database", "lightbulb", "music", "camera", "book", "heart", "folder", "chat", "cpu", "file", "file-code", "docs", "task", "todo", "bug", "robot", "brain", "git", "repo", "test", "chart", "star", "image", "calendar"]>>>;
291
- color: z.ZodNullable<z.ZodOptional<z.ZodEnum<["keyword", "string", "number", "type", "comment", "error", "primary", "success"]>>>;
291
+ color: z.ZodNullable<z.ZodOptional<z.ZodEnum<["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "a11", "a12", "a13", "a14", "a15", "a16"]>>>;
292
292
  projectId: z.ZodOptional<z.ZodString>;
293
293
  engine: z.ZodOptional<z.ZodEnum<["synth", "opencode", "cline"]>>;
294
294
  settings: z.ZodOptional<z.ZodObject<{
@@ -379,7 +379,7 @@ export declare const sessionUpdateSchema: z.ZodObject<{
379
379
  }, "strip", z.ZodTypeAny, {
380
380
  name?: string | undefined;
381
381
  icon?: "task" | "code" | "terminal" | "rocket" | "flask" | "gamepad" | "briefcase" | "home" | "globe" | "leaf" | "shield" | "palette" | "server" | "phone" | "database" | "lightbulb" | "music" | "camera" | "book" | "heart" | "folder" | "chat" | "cpu" | "file" | "file-code" | "docs" | "todo" | "bug" | "robot" | "brain" | "git" | "repo" | "test" | "chart" | "star" | "image" | "calendar" | null | undefined;
382
- color?: "string" | "number" | "type" | "keyword" | "comment" | "error" | "primary" | "success" | null | undefined;
382
+ color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
383
383
  projectId?: string | undefined;
384
384
  engine?: "synth" | "opencode" | "cline" | undefined;
385
385
  settings?: z.objectOutputType<{
@@ -414,7 +414,7 @@ export declare const sessionUpdateSchema: z.ZodObject<{
414
414
  }, {
415
415
  name?: string | undefined;
416
416
  icon?: "task" | "code" | "terminal" | "rocket" | "flask" | "gamepad" | "briefcase" | "home" | "globe" | "leaf" | "shield" | "palette" | "server" | "phone" | "database" | "lightbulb" | "music" | "camera" | "book" | "heart" | "folder" | "chat" | "cpu" | "file" | "file-code" | "docs" | "todo" | "bug" | "robot" | "brain" | "git" | "repo" | "test" | "chart" | "star" | "image" | "calendar" | null | undefined;
417
- color?: "string" | "number" | "type" | "keyword" | "comment" | "error" | "primary" | "success" | null | undefined;
417
+ color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
418
418
  projectId?: string | undefined;
419
419
  engine?: "synth" | "opencode" | "cline" | undefined;
420
420
  settings?: z.objectInputType<{
@@ -490,7 +490,7 @@ export declare const projectCreateSchema: z.ZodObject<{
490
490
  name: z.ZodString;
491
491
  description: z.ZodDefault<z.ZodString>;
492
492
  icon: z.ZodNullable<z.ZodOptional<z.ZodEnum<["code", "terminal", "rocket", "flask", "gamepad", "briefcase", "home", "globe", "leaf", "shield", "palette", "server", "phone", "database", "lightbulb", "music", "camera", "book", "heart", "folder", "chat", "cpu", "file", "file-code", "docs", "task", "todo", "bug", "robot", "brain", "git", "repo", "test", "chart", "star", "image", "calendar"]>>>;
493
- color: z.ZodNullable<z.ZodOptional<z.ZodEnum<["keyword", "string", "number", "type", "comment", "error", "primary", "success"]>>>;
493
+ color: z.ZodNullable<z.ZodOptional<z.ZodEnum<["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "a11", "a12", "a13", "a14", "a15", "a16"]>>>;
494
494
  workspace: z.ZodOptional<z.ZodString>;
495
495
  repos: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
496
496
  id: z.ZodOptional<z.ZodString>;
@@ -523,9 +523,9 @@ export declare const projectCreateSchema: z.ZodObject<{
523
523
  }, "strip", z.ZodTypeAny, {
524
524
  name: string;
525
525
  description: string;
526
- icon?: "task" | "code" | "terminal" | "rocket" | "flask" | "gamepad" | "briefcase" | "home" | "globe" | "leaf" | "shield" | "palette" | "server" | "phone" | "database" | "lightbulb" | "music" | "camera" | "book" | "heart" | "folder" | "chat" | "cpu" | "file" | "file-code" | "docs" | "todo" | "bug" | "robot" | "brain" | "git" | "repo" | "test" | "chart" | "star" | "image" | "calendar" | null | undefined;
527
- color?: "string" | "number" | "type" | "keyword" | "comment" | "error" | "primary" | "success" | null | undefined;
528
526
  workspace?: string | undefined;
527
+ icon?: "task" | "code" | "terminal" | "rocket" | "flask" | "gamepad" | "briefcase" | "home" | "globe" | "leaf" | "shield" | "palette" | "server" | "phone" | "database" | "lightbulb" | "music" | "camera" | "book" | "heart" | "folder" | "chat" | "cpu" | "file" | "file-code" | "docs" | "todo" | "bug" | "robot" | "brain" | "git" | "repo" | "test" | "chart" | "star" | "image" | "calendar" | null | undefined;
528
+ color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
529
529
  repos?: (string | {
530
530
  path: string;
531
531
  type?: "https" | "ssh" | undefined;
@@ -538,10 +538,10 @@ export declare const projectCreateSchema: z.ZodObject<{
538
538
  })[] | undefined;
539
539
  }, {
540
540
  name: string;
541
+ workspace?: string | undefined;
541
542
  icon?: "task" | "code" | "terminal" | "rocket" | "flask" | "gamepad" | "briefcase" | "home" | "globe" | "leaf" | "shield" | "palette" | "server" | "phone" | "database" | "lightbulb" | "music" | "camera" | "book" | "heart" | "folder" | "chat" | "cpu" | "file" | "file-code" | "docs" | "todo" | "bug" | "robot" | "brain" | "git" | "repo" | "test" | "chart" | "star" | "image" | "calendar" | null | undefined;
542
- color?: "string" | "number" | "type" | "keyword" | "comment" | "error" | "primary" | "success" | null | undefined;
543
+ color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
543
544
  description?: string | undefined;
544
- workspace?: string | undefined;
545
545
  repos?: (string | {
546
546
  path: string;
547
547
  type?: "https" | "ssh" | undefined;
@@ -559,7 +559,7 @@ export declare const projectUpdateSchema: z.ZodObject<{
559
559
  currentTask: z.ZodOptional<z.ZodString>;
560
560
  invariants: z.ZodOptional<z.ZodString>;
561
561
  icon: z.ZodNullable<z.ZodOptional<z.ZodEnum<["code", "terminal", "rocket", "flask", "gamepad", "briefcase", "home", "globe", "leaf", "shield", "palette", "server", "phone", "database", "lightbulb", "music", "camera", "book", "heart", "folder", "chat", "cpu", "file", "file-code", "docs", "task", "todo", "bug", "robot", "brain", "git", "repo", "test", "chart", "star", "image", "calendar"]>>>;
562
- color: z.ZodNullable<z.ZodOptional<z.ZodEnum<["keyword", "string", "number", "type", "comment", "error", "primary", "success"]>>>;
562
+ color: z.ZodNullable<z.ZodOptional<z.ZodEnum<["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "a11", "a12", "a13", "a14", "a15", "a16"]>>>;
563
563
  workspace: z.ZodOptional<z.ZodString>;
564
564
  repos: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
565
565
  id: z.ZodOptional<z.ZodString>;
@@ -590,11 +590,11 @@ export declare const projectUpdateSchema: z.ZodObject<{
590
590
  lastFetch?: string | undefined;
591
591
  }>]>, "many">>;
592
592
  }, "strip", z.ZodTypeAny, {
593
+ workspace?: string | undefined;
593
594
  name?: string | undefined;
594
595
  icon?: "task" | "code" | "terminal" | "rocket" | "flask" | "gamepad" | "briefcase" | "home" | "globe" | "leaf" | "shield" | "palette" | "server" | "phone" | "database" | "lightbulb" | "music" | "camera" | "book" | "heart" | "folder" | "chat" | "cpu" | "file" | "file-code" | "docs" | "todo" | "bug" | "robot" | "brain" | "git" | "repo" | "test" | "chart" | "star" | "image" | "calendar" | null | undefined;
595
- color?: "string" | "number" | "type" | "keyword" | "comment" | "error" | "primary" | "success" | null | undefined;
596
+ color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
596
597
  description?: string | undefined;
597
- workspace?: string | undefined;
598
598
  repos?: (string | {
599
599
  path: string;
600
600
  type?: "https" | "ssh" | undefined;
@@ -608,11 +608,11 @@ export declare const projectUpdateSchema: z.ZodObject<{
608
608
  currentTask?: string | undefined;
609
609
  invariants?: string | undefined;
610
610
  }, {
611
+ workspace?: string | undefined;
611
612
  name?: string | undefined;
612
613
  icon?: "task" | "code" | "terminal" | "rocket" | "flask" | "gamepad" | "briefcase" | "home" | "globe" | "leaf" | "shield" | "palette" | "server" | "phone" | "database" | "lightbulb" | "music" | "camera" | "book" | "heart" | "folder" | "chat" | "cpu" | "file" | "file-code" | "docs" | "todo" | "bug" | "robot" | "brain" | "git" | "repo" | "test" | "chart" | "star" | "image" | "calendar" | null | undefined;
613
- color?: "string" | "number" | "type" | "keyword" | "comment" | "error" | "primary" | "success" | null | undefined;
614
+ color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
614
615
  description?: string | undefined;
615
- workspace?: string | undefined;
616
616
  repos?: (string | {
617
617
  path: string;
618
618
  type?: "https" | "ssh" | undefined;
@@ -8,31 +8,11 @@ export const statusMessageTypeSchema = z.nativeEnum(StatusMessageType);
8
8
  /** Zod-схемы канонических ключей иконок/цветов (единые для project и session). */
9
9
  export const projectIconKeySchema = z.enum(PROJECT_ICON_KEYS);
10
10
  export const projectColorKeySchema = z.enum(PROJECT_COLOR_KEYS);
11
- /**
12
- * Legacy-алиасы цветов (нормализация при ЧТЕНИИ, не при записи):
13
- * `blue→primary`, `red→error`, `green→success`, а также CSS-переменные
14
- * `--primary`/`--status-info`/`--syntax-*`, которыми пользуются агенты.
15
- * `--status-info` отдельного ключа не имеет — трактуем как `primary`.
16
- */
17
- const COLOR_KEY_ALIASES = {
18
- blue: 'primary',
19
- red: 'error',
20
- green: 'success',
21
- '--primary': 'primary',
22
- '--status-info': 'primary',
23
- '--syntax-keyword': 'keyword',
24
- '--syntax-string': 'string',
25
- '--syntax-number': 'number',
26
- '--syntax-type': 'type',
27
- '--syntax-comment': 'comment',
28
- '--status-error': 'error',
29
- '--status-success': 'success',
30
- };
31
- /** true, если значение — канонический ключ иконки (без алиасов; для записи). */
11
+ /** true, если значение — канонический ключ иконки (для записи и чтения). */
32
12
  export function isProjectIconKey(value) {
33
13
  return typeof value === 'string' && PROJECT_ICON_KEYS.includes(value);
34
14
  }
35
- /** true, если значение — канонический ключ цвета (без алиасов; для записи). */
15
+ /** true, если значение — канонический ключ цвета (без алиасов; для записи и чтения). */
36
16
  export function isProjectColorKey(value) {
37
17
  return typeof value === 'string' && PROJECT_COLOR_KEYS.includes(value);
38
18
  }
@@ -44,14 +24,11 @@ export function normalizeIconKey(value) {
44
24
  return isProjectIconKey(value) ? value : undefined;
45
25
  }
46
26
  /**
47
- * Нормализация цвета при ЧТЕНИИ: канонический ключ или legacy-алиас → ключ
48
- * палитры; всё прочее → `undefined`.
27
+ * Нормализация цвета при ЧТЕНИИ: канонический ключ палитры → как есть; всё
28
+ * прочее (включая legacy-алиасы) → `undefined`.
49
29
  */
50
30
  export function normalizeColorKey(value) {
51
- if (typeof value !== 'string')
52
- return undefined;
53
- const canonical = COLOR_KEY_ALIASES[value] ?? value;
54
- return isProjectColorKey(canonical) ? canonical : undefined;
31
+ return isProjectColorKey(value) ? value : undefined;
55
32
  }
56
33
  export const tokenUsageSchema = z.object({
57
34
  inputTokens: z.number().int().min(0),
@@ -154,9 +154,10 @@ export interface PromptToolDetail {
154
154
  /**
155
155
  * Причина недоступности: `mode` (переключить режим), `role` (делегировать),
156
156
  * `admin_disabled` (жёстко отключён администратором через `tools.disabled`),
157
- * `dependency` (в окружении нет нужной программы — git/rg/sh).
157
+ * `dependency` (в окружении нет нужной программы — git/rg/sh),
158
+ * `workspace` (не задан рабочий каталог проекта).
158
159
  */
159
- reason?: 'mode' | 'role' | 'admin_disabled' | 'dependency';
160
+ reason?: 'mode' | 'role' | 'admin_disabled' | 'dependency' | 'workspace';
160
161
  /** AD-071 §2.1: источник инструмента (`built-in` — слой `tools`). */
161
162
  source: 'built-in';
162
163
  /** AD-071 §2.6: длина `JSON.stringify` LLM-определения тула (как слой `tools`). */
@@ -603,7 +604,7 @@ export interface Session {
603
604
  title?: string;
604
605
  /** Канонический ключ иконки (PROJECT_ICON_KEYS); legacy-значения → undefined. */
605
606
  icon?: string;
606
- /** Канонический ключ цвета (PROJECT_COLOR_KEYS); legacy-значения нормализуются. */
607
+ /** Канонический ключ цвета (PROJECT_COLOR_KEYS); невалидные значения сбрасываются. */
607
608
  color?: string;
608
609
  sessionOrigin: SessionOrigin;
609
610
  parentId?: string;
@@ -804,8 +805,11 @@ export interface Project {
804
805
  */
805
806
  export declare const PROJECT_ICON_KEYS: readonly ["code", "terminal", "rocket", "flask", "gamepad", "briefcase", "home", "globe", "leaf", "shield", "palette", "server", "phone", "database", "lightbulb", "music", "camera", "book", "heart", "folder", "chat", "cpu", "file", "file-code", "docs", "task", "todo", "bug", "robot", "brain", "git", "repo", "test", "chart", "star", "image", "calendar"];
806
807
  export type ProjectIconKey = (typeof PROJECT_ICON_KEYS)[number];
807
- /** Канонические ключи цветов проектов и сессий (единый список для server и UI). */
808
- export declare const PROJECT_COLOR_KEYS: readonly ["keyword", "string", "number", "type", "comment", "error", "primary", "success"];
808
+ /**
809
+ * Канонические ключи цветов проектов и сессий — 16 цветов палитры темы
810
+ * (`palette.colors[].key` в `a1..a16`; единый список для server и UI).
811
+ */
812
+ export declare const PROJECT_COLOR_KEYS: readonly ["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "a11", "a12", "a13", "a14", "a15", "a16"];
809
813
  export type ProjectColorKey = (typeof PROJECT_COLOR_KEYS)[number];
810
814
  export interface PlanColumn {
811
815
  id: string;
@@ -1040,7 +1044,7 @@ export interface QueueItem {
1040
1044
  streamId: string;
1041
1045
  enqueuedAt: string;
1042
1046
  }
1043
- export type EventType = 'session.created' | 'session.updated' | 'session.deleted' | 'session.renamed' | 'session.forked' | 'session.fork.created' | 'session.reference.added' | 'session.reference.removed' | 'session.messages.merged' | 'session.moved' | 'project.updated' | 'message.added' | 'message.updated' | 'child.message.added' | 'child.session.updated' | 'stream.start' | 'stream.chunk' | 'stream.usage' | 'stream.done' | 'stream.ended' | 'stream.cancelled' | 'stream.error' | 'stream.retry' | 'queue.stalled' | 'message.queued' | 'permission.asked' | 'permission.replied' | 'permission.hold' | 'question.asked' | 'question.replied' | 'context.summarization_pending' | 'context.summarized' | 'context.sliding_window_applied' | 'context.limit_warning' | 'context.sticky_note_added' | 'context.sticky_note_updated' | 'context.sticky_note_deleted' | 'context.instructions_loaded' | 'tool_call.started' | 'tool_call.result' | 'tool_call.loop' | 'subagent.progress' | 'subagent.retry' | 'subagent.resume.started' | 'subagent.resume.finished' | 'permission.asked' | 'permission.replied' | 'permission.denied' | 'message.quality_check' | 'session.routing_category' | 'plan.approved' | 'todos.updated' | 'skill.invoked' | 'command.invoked' | 'command.inline_shell' | 'error';
1047
+ export type EventType = 'session.created' | 'session.updated' | 'session.deleted' | 'session.renamed' | 'session.forked' | 'session.fork.created' | 'session.reference.added' | 'session.reference.removed' | 'session.messages.merged' | 'session.moved' | 'project.updated' | 'fs.changed' | 'message.added' | 'message.updated' | 'child.message.added' | 'child.session.updated' | 'stream.start' | 'stream.chunk' | 'stream.usage' | 'stream.done' | 'stream.ended' | 'stream.cancelled' | 'stream.error' | 'stream.retry' | 'queue.stalled' | 'message.queued' | 'permission.asked' | 'permission.replied' | 'permission.hold' | 'question.asked' | 'question.replied' | 'context.summarization_pending' | 'context.summarized' | 'context.sliding_window_applied' | 'context.limit_warning' | 'context.sticky_note_added' | 'context.sticky_note_updated' | 'context.sticky_note_deleted' | 'context.instructions_loaded' | 'tool_call.started' | 'tool_call.result' | 'tool_call.loop' | 'subagent.progress' | 'subagent.retry' | 'subagent.resume.started' | 'subagent.resume.finished' | 'permission.asked' | 'permission.replied' | 'permission.denied' | 'message.quality_check' | 'session.routing_category' | 'plan.approved' | 'todos.updated' | 'skill.invoked' | 'command.invoked' | 'command.inline_shell' | 'error';
1044
1048
  export interface BusEvent {
1045
1049
  type: EventType;
1046
1050
  sessionId: string;
@@ -141,16 +141,15 @@ export const PROJECT_ICON_KEYS = [
141
141
  'image',
142
142
  'calendar',
143
143
  ];
144
- /** Канонические ключи цветов проектов и сессий (единый список для server и UI). */
144
+ /**
145
+ * Канонические ключи цветов проектов и сессий — 16 цветов палитры темы
146
+ * (`palette.colors[].key` в `a1..a16`; единый список для server и UI).
147
+ */
145
148
  export const PROJECT_COLOR_KEYS = [
146
- 'keyword',
147
- 'string',
148
- 'number',
149
- 'type',
150
- 'comment',
151
- 'error',
152
- 'primary',
153
- 'success',
149
+ 'a1', 'a2', 'a3', 'a4',
150
+ 'a5', 'a6', 'a7', 'a8',
151
+ 'a9', 'a10', 'a11', 'a12',
152
+ 'a13', 'a14', 'a15', 'a16',
154
153
  ];
155
154
  // --- Currency ---
156
155
  /** Валюта цен моделей. Отсутствует у модели → валюта провайдера → USD. */
@@ -38,13 +38,14 @@ export interface PermissionDecision {
38
38
  params?: Record<string, string>;
39
39
  /**
40
40
  * AD-070 §2.9.1: тул недоступен не по жёсткому запрету, а из-за текущего
41
- * режима (`mode`), роли агента (`role`) или отсутствия внешней программы
42
- * окружения (`dependency`). Отличие от `deny`-политики: доступ открывается
43
- * переключением режима / делегированием / установкой программы, поэтому модель
44
- * получает соответствующую подсказку (messageId).
41
+ * режима (`mode`), роли агента (`role`), отсутствия внешней программы
42
+ * окружения (`dependency`) или не заданного рабочего каталога проекта
43
+ * (`workspace`). Отличие от `deny`-политики: доступ открывается
44
+ * переключением режима / делегированием / установкой программы / заданием
45
+ * workspace, поэтому модель получает соответствующую подсказку (messageId).
45
46
  */
46
47
  unavailable?: {
47
- reason: 'mode' | 'role' | 'dependency';
48
+ reason: 'mode' | 'role' | 'dependency' | 'workspace';
48
49
  };
49
50
  }
50
51
  /**
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SYNTH_VERSION = "0.8.3";
1
+ export declare const SYNTH_VERSION = "0.9.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const SYNTH_VERSION = '0.8.3';
1
+ export const SYNTH_VERSION = '0.9.0';
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@itphx/synth-shared",
3
- "version": "0.8.3",
3
+ "version": "0.9.0",
4
+ "license": "MIT",
4
5
  "type": "module",
5
6
  "main": "./dist/index.js",
6
7
  "types": "./dist/index.d.ts",