@itphx/synth-shared 0.13.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 (50) hide show
  1. package/dist/config/defaults.js +28 -1
  2. package/dist/config/env-overrides.d.ts +23 -4
  3. package/dist/config/env-overrides.js +74 -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/tls.d.ts +7 -4
  11. package/dist/config/tls.js +10 -23
  12. package/dist/config/types.d.ts +102 -4
  13. package/dist/config/types.js +73 -0
  14. package/dist/i18n/index.d.ts +1 -1
  15. package/dist/i18n/index.js +129 -0
  16. package/dist/index.d.ts +3 -3
  17. package/dist/index.js +3 -3
  18. package/dist/model-metadata.d.ts +10 -0
  19. package/dist/model-metadata.js +10 -0
  20. package/dist/schemas/index.d.ts +288 -11
  21. package/dist/schemas/index.js +228 -2
  22. package/dist/types/bus-events.d.ts +2 -2
  23. package/dist/types/egress.d.ts +2 -2
  24. package/dist/types/egress.js +2 -2
  25. package/dist/types/git.d.ts +83 -0
  26. package/dist/types/git.js +101 -1
  27. package/dist/types/host-pattern.d.ts +41 -0
  28. package/dist/types/host-pattern.js +143 -0
  29. package/dist/types/index.d.ts +2 -0
  30. package/dist/types/index.js +7 -1
  31. package/dist/types/maintenance.d.ts +1 -1
  32. package/dist/types/mcp.d.ts +90 -0
  33. package/dist/types/mcp.js +11 -0
  34. package/dist/types/message-stream.d.ts +41 -0
  35. package/dist/types/permission.d.ts +13 -3
  36. package/dist/types/project.d.ts +30 -0
  37. package/dist/types/project.js +16 -0
  38. package/dist/types/prompt.d.ts +4 -2
  39. package/dist/types/service-keys.d.ts +6 -3
  40. package/dist/types/service-keys.js +6 -1
  41. package/dist/types/session.d.ts +8 -0
  42. package/dist/types/skills.d.ts +6 -0
  43. package/dist/types/tools.d.ts +36 -0
  44. package/dist/types/tools.js +48 -0
  45. package/dist/types/user.d.ts +7 -0
  46. package/dist/types/worktree.d.ts +1 -1
  47. package/dist/utils/index.js +1 -1
  48. package/dist/version.d.ts +1 -1
  49. package/dist/version.js +1 -1
  50. package/package.json +3 -2
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, 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 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';
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
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, CONTEXT_WINDOW_POLICIES, mcpServerAuthSchema, toolsDisabledConfigSchema, skillsConfigSchema, commandsConfigSchema, instructionsConfigSchema, instructionSourceConfigSchema, decisionConfigSchema, pluginsConfigSchema, attachmentsConfigSchema, attachmentsCompressionSchema, attachmentCompressionImageSchema, attachmentCompressionVideoSchema, attachmentCompressionAudioSchema, attachmentsThumbnailSchema, modalityModelRefSchema, modalityModelsSchema, ATTACHMENT_FAMILIES, webhooksConfigSchema, securityTlsConfigSchema, } from './config/index.js';
26
- export { defaultConfig, loadConfig } 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
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-слоя.
@@ -13,6 +13,16 @@
13
13
  * Не задано — модальности неизвестны, и вложения **не фильтруются** (ADR-115 §4).
14
14
  */
15
15
  export type AttachmentModality = 'text' | 'image' | 'pdf' | 'audio' | 'video';
16
+ /**
17
+ * Оценка контекстного окна, когда у модели не задано `contextWindow` (0/undefined).
18
+ *
19
+ * Единый источник для бэкенда и UI: оптимизатор контекста (авто-триггеры
20
+ * суммаризации/компактизации/скользящего окна) и индикатор заполнения в UI
21
+ * считают по одному и тому же значению. Осознанная оценка, а не «0 = отключено»:
22
+ * модель без известного окна всё равно сжимается, пусть и консервативно.
23
+ * Явно заданное окно модели всегда приоритетнее.
24
+ */
25
+ export declare const DEFAULT_CONTEXT_WINDOW = 200000;
16
26
  export declare const KNOWN_MODEL_WINDOWS: Record<string, number>;
17
27
  /**
18
28
  * Ищет известное контекстное окно для модели по её ID или имени.
@@ -3,6 +3,16 @@
3
3
  * Используется при fetch для автоматического заполнения contextWindow.
4
4
  * Источники: официальная документация провайдеров, OpenRouter.
5
5
  */
6
+ /**
7
+ * Оценка контекстного окна, когда у модели не задано `contextWindow` (0/undefined).
8
+ *
9
+ * Единый источник для бэкенда и UI: оптимизатор контекста (авто-триггеры
10
+ * суммаризации/компактизации/скользящего окна) и индикатор заполнения в UI
11
+ * считают по одному и тому же значению. Осознанная оценка, а не «0 = отключено»:
12
+ * модель без известного окна всё равно сжимается, пусть и консервативно.
13
+ * Явно заданное окно модели всегда приоритетнее.
14
+ */
15
+ export const DEFAULT_CONTEXT_WINDOW = 200_000;
6
16
  export const KNOWN_MODEL_WINDOWS = {
7
17
  // OpenAI
8
18
  'gpt-4o': 128_000,
@@ -21,6 +21,7 @@ export declare const projectIconKeySchema: z.ZodEnum<{
21
21
  chat: "chat";
22
22
  image: "image";
23
23
  task: "task";
24
+ todo: "todo";
24
25
  code: "code";
25
26
  terminal: "terminal";
26
27
  rocket: "rocket";
@@ -44,7 +45,6 @@ export declare const projectIconKeySchema: z.ZodEnum<{
44
45
  cpu: "cpu";
45
46
  "file-code": "file-code";
46
47
  docs: "docs";
47
- todo: "todo";
48
48
  bug: "bug";
49
49
  robot: "robot";
50
50
  brain: "brain";
@@ -228,6 +228,7 @@ export declare const sessionCreateSchema: z.ZodObject<{
228
228
  chat: "chat";
229
229
  image: "image";
230
230
  task: "task";
231
+ todo: "todo";
231
232
  code: "code";
232
233
  terminal: "terminal";
233
234
  rocket: "rocket";
@@ -251,7 +252,6 @@ export declare const sessionCreateSchema: z.ZodObject<{
251
252
  cpu: "cpu";
252
253
  "file-code": "file-code";
253
254
  docs: "docs";
254
- todo: "todo";
255
255
  bug: "bug";
256
256
  robot: "robot";
257
257
  brain: "brain";
@@ -351,6 +351,7 @@ export declare const sessionUpdateSchema: z.ZodObject<{
351
351
  chat: "chat";
352
352
  image: "image";
353
353
  task: "task";
354
+ todo: "todo";
354
355
  code: "code";
355
356
  terminal: "terminal";
356
357
  rocket: "rocket";
@@ -374,7 +375,6 @@ export declare const sessionUpdateSchema: z.ZodObject<{
374
375
  cpu: "cpu";
375
376
  "file-code": "file-code";
376
377
  docs: "docs";
377
- todo: "todo";
378
378
  bug: "bug";
379
379
  robot: "robot";
380
380
  brain: "brain";
@@ -476,8 +476,8 @@ export declare const gitRepoConfigSchema: z.ZodObject<{
476
476
  name: z.ZodOptional<z.ZodString>;
477
477
  url: z.ZodOptional<z.ZodString>;
478
478
  type: z.ZodOptional<z.ZodEnum<{
479
- https: "https";
480
479
  ssh: "ssh";
480
+ https: "https";
481
481
  }>>;
482
482
  path: z.ZodString;
483
483
  defaultBranch: z.ZodOptional<z.ZodString>;
@@ -499,6 +499,7 @@ export declare const projectCreateSchema: z.ZodObject<{
499
499
  chat: "chat";
500
500
  image: "image";
501
501
  task: "task";
502
+ todo: "todo";
502
503
  code: "code";
503
504
  terminal: "terminal";
504
505
  rocket: "rocket";
@@ -522,7 +523,6 @@ export declare const projectCreateSchema: z.ZodObject<{
522
523
  cpu: "cpu";
523
524
  "file-code": "file-code";
524
525
  docs: "docs";
525
- todo: "todo";
526
526
  bug: "bug";
527
527
  robot: "robot";
528
528
  brain: "brain";
@@ -556,8 +556,8 @@ export declare const projectCreateSchema: z.ZodObject<{
556
556
  name: z.ZodOptional<z.ZodString>;
557
557
  url: z.ZodOptional<z.ZodString>;
558
558
  type: z.ZodOptional<z.ZodEnum<{
559
- https: "https";
560
559
  ssh: "ssh";
560
+ https: "https";
561
561
  }>>;
562
562
  path: z.ZodString;
563
563
  defaultBranch: z.ZodOptional<z.ZodString>;
@@ -580,6 +580,7 @@ export declare const projectUpdateSchema: z.ZodObject<{
580
580
  chat: "chat";
581
581
  image: "image";
582
582
  task: "task";
583
+ todo: "todo";
583
584
  code: "code";
584
585
  terminal: "terminal";
585
586
  rocket: "rocket";
@@ -603,7 +604,6 @@ export declare const projectUpdateSchema: z.ZodObject<{
603
604
  cpu: "cpu";
604
605
  "file-code": "file-code";
605
606
  docs: "docs";
606
- todo: "todo";
607
607
  bug: "bug";
608
608
  robot: "robot";
609
609
  brain: "brain";
@@ -637,8 +637,8 @@ export declare const projectUpdateSchema: z.ZodObject<{
637
637
  name: z.ZodOptional<z.ZodString>;
638
638
  url: z.ZodOptional<z.ZodString>;
639
639
  type: z.ZodOptional<z.ZodEnum<{
640
- https: "https";
641
640
  ssh: "ssh";
641
+ https: "https";
642
642
  }>>;
643
643
  path: z.ZodString;
644
644
  defaultBranch: z.ZodOptional<z.ZodString>;
@@ -649,13 +649,25 @@ export declare const projectUpdateSchema: z.ZodObject<{
649
649
  enabled: z.ZodOptional<z.ZodBoolean>;
650
650
  }, z.core.$strip>>;
651
651
  }, z.core.$strip>;
652
- /** ADR-076: тело создания SSH-ключа (`POST /api/v2/ssh-keys`). */
652
+ /**
653
+ * ADR-076: тело создания SSH-ключа (`POST /api/v2/ssh-keys`).
654
+ *
655
+ * PROP-124: дополнительно принимает `usages` (`git`/`ssh`), `allowHosts`
656
+ * (правила хостов) и `allowPorts` (порты 1..65535) — политику ключа для
657
+ * режима инстанса `tools`.
658
+ */
653
659
  export declare const sshKeyCreateSchema: z.ZodObject<{
654
660
  name: z.ZodString;
655
661
  type: z.ZodOptional<z.ZodString>;
656
662
  privateKey: z.ZodString;
657
663
  passphrase: z.ZodOptional<z.ZodString>;
658
664
  agentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
665
+ usages: z.ZodOptional<z.ZodArray<z.ZodEnum<{
666
+ git: "git";
667
+ ssh: "ssh";
668
+ }>>>;
669
+ allowHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
670
+ allowPorts: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
659
671
  }, z.core.$strip>;
660
672
  /** ADR-076: тело обновления SSH-ключа (без id/createdAt). */
661
673
  export declare const sshKeyUpdateSchema: z.ZodObject<{
@@ -664,6 +676,12 @@ export declare const sshKeyUpdateSchema: z.ZodObject<{
664
676
  privateKey: z.ZodOptional<z.ZodString>;
665
677
  passphrase: z.ZodOptional<z.ZodOptional<z.ZodString>>;
666
678
  agentIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
679
+ usages: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodEnum<{
680
+ git: "git";
681
+ ssh: "ssh";
682
+ }>>>>;
683
+ allowHosts: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
684
+ allowPorts: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodNumber>>>;
667
685
  }, z.core.$strip>;
668
686
  /**
669
687
  * ADR-071 §2.4: проектный скоуп MCP (ссылки на реестр по имени).
@@ -774,8 +792,8 @@ export declare const gitReposRegisterBodySchema: z.ZodObject<{
774
792
  name: z.ZodOptional<z.ZodString>;
775
793
  url: z.ZodOptional<z.ZodString>;
776
794
  type: z.ZodOptional<z.ZodEnum<{
777
- https: "https";
778
795
  ssh: "ssh";
796
+ https: "https";
779
797
  }>>;
780
798
  defaultBranch: z.ZodOptional<z.ZodString>;
781
799
  sshKeyId: z.ZodOptional<z.ZodString>;
@@ -1056,6 +1074,7 @@ export declare const sessionRequestSchema: z.ZodObject<{
1056
1074
  chat: "chat";
1057
1075
  image: "image";
1058
1076
  task: "task";
1077
+ todo: "todo";
1059
1078
  code: "code";
1060
1079
  terminal: "terminal";
1061
1080
  rocket: "rocket";
@@ -1079,7 +1098,6 @@ export declare const sessionRequestSchema: z.ZodObject<{
1079
1098
  cpu: "cpu";
1080
1099
  "file-code": "file-code";
1081
1100
  docs: "docs";
1082
- todo: "todo";
1083
1101
  bug: "bug";
1084
1102
  robot: "robot";
1085
1103
  brain: "brain";
@@ -1843,3 +1861,262 @@ export declare const mediaPartSchema: z.ZodObject<{
1843
1861
  transcript: z.ZodOptional<z.ZodString>;
1844
1862
  }, z.core.$strip>;
1845
1863
  export type MediaPartInput = z.infer<typeof mediaPartSchema>;
1864
+ /** Приоритет пункта плана (ADR-039). */
1865
+ export declare const PLAN_PRIORITIES: readonly ["high", "medium", "low"];
1866
+ /** Отношение зависимости пункта плана (ADR-039). */
1867
+ export declare const PLAN_DEPENDENCY_RELATIONS: readonly ["blocked_by", "blocks", "relates_to"];
1868
+ /** Зависимость пункта плана (ADR-039): `projectId` пуст = тот же проект. */
1869
+ export declare const planDependencySchema: z.ZodObject<{
1870
+ projectId: z.ZodOptional<z.ZodString>;
1871
+ itemId: z.ZodString;
1872
+ relation: z.ZodEnum<{
1873
+ blocked_by: "blocked_by";
1874
+ blocks: "blocks";
1875
+ relates_to: "relates_to";
1876
+ }>;
1877
+ }, z.core.$loose>;
1878
+ /** Колонка плана (ADR-039) — статус пункта. */
1879
+ export declare const planColumnSchema: z.ZodObject<{
1880
+ id: z.ZodString;
1881
+ name: z.ZodString;
1882
+ order: z.ZodNumber;
1883
+ wipLimit: z.ZodOptional<z.ZodNumber>;
1884
+ }, z.core.$loose>;
1885
+ /** Пункт плана (ADR-039). `description` — Markdown (лимит `MARKDOWN_LIMITS`). */
1886
+ export declare const planItemSchema: z.ZodObject<{
1887
+ id: z.ZodString;
1888
+ title: z.ZodString;
1889
+ description: z.ZodOptional<z.ZodString>;
1890
+ columnId: z.ZodString;
1891
+ priority: z.ZodEnum<{
1892
+ high: "high";
1893
+ medium: "medium";
1894
+ low: "low";
1895
+ }>;
1896
+ order: z.ZodNumber;
1897
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodObject<{
1898
+ projectId: z.ZodOptional<z.ZodString>;
1899
+ itemId: z.ZodString;
1900
+ relation: z.ZodEnum<{
1901
+ blocked_by: "blocked_by";
1902
+ blocks: "blocks";
1903
+ relates_to: "relates_to";
1904
+ }>;
1905
+ }, z.core.$loose>>>;
1906
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
1907
+ createdAt: z.ZodString;
1908
+ updatedAt: z.ZodString;
1909
+ }, z.core.$loose>;
1910
+ /** План проекта целиком (ADR-039). */
1911
+ export declare const projectPlanSchema: z.ZodObject<{
1912
+ version: z.ZodNumber;
1913
+ updatedAt: z.ZodString;
1914
+ columns: z.ZodArray<z.ZodObject<{
1915
+ id: z.ZodString;
1916
+ name: z.ZodString;
1917
+ order: z.ZodNumber;
1918
+ wipLimit: z.ZodOptional<z.ZodNumber>;
1919
+ }, z.core.$loose>>;
1920
+ items: z.ZodArray<z.ZodObject<{
1921
+ id: z.ZodString;
1922
+ title: z.ZodString;
1923
+ description: z.ZodOptional<z.ZodString>;
1924
+ columnId: z.ZodString;
1925
+ priority: z.ZodEnum<{
1926
+ high: "high";
1927
+ medium: "medium";
1928
+ low: "low";
1929
+ }>;
1930
+ order: z.ZodNumber;
1931
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodObject<{
1932
+ projectId: z.ZodOptional<z.ZodString>;
1933
+ itemId: z.ZodString;
1934
+ relation: z.ZodEnum<{
1935
+ blocked_by: "blocked_by";
1936
+ blocks: "blocks";
1937
+ relates_to: "relates_to";
1938
+ }>;
1939
+ }, z.core.$loose>>>;
1940
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
1941
+ createdAt: z.ZodString;
1942
+ updatedAt: z.ZodString;
1943
+ }, z.core.$loose>>;
1944
+ }, z.core.$loose>;
1945
+ /** Пункт ToDo сессии (ADR-039). `content` — Markdown (лимит `MARKDOWN_LIMITS`). */
1946
+ export declare const todoItemSchema: z.ZodObject<{
1947
+ id: z.ZodString;
1948
+ content: z.ZodString;
1949
+ status: z.ZodEnum<{
1950
+ pending: "pending";
1951
+ in_progress: "in_progress";
1952
+ completed: "completed";
1953
+ cancelled: "cancelled";
1954
+ }>;
1955
+ priority: z.ZodEnum<{
1956
+ high: "high";
1957
+ medium: "medium";
1958
+ low: "low";
1959
+ }>;
1960
+ planItemId: z.ZodOptional<z.ZodString>;
1961
+ }, z.core.$loose>;
1962
+ /** Запись журнала проекта (PROP-054): `updatedAt`/`updatedBy` — аддитивные. */
1963
+ export declare const projectLogEntrySchema: z.ZodObject<{
1964
+ id: z.ZodString;
1965
+ text: z.ZodString;
1966
+ createdAt: z.ZodString;
1967
+ sessionId: z.ZodOptional<z.ZodString>;
1968
+ author: z.ZodOptional<z.ZodString>;
1969
+ updatedAt: z.ZodOptional<z.ZodString>;
1970
+ updatedBy: z.ZodOptional<z.ZodString>;
1971
+ }, z.core.$loose>;
1972
+ export type PlanDependencyInput = z.infer<typeof planDependencySchema>;
1973
+ export type PlanColumnInput = z.infer<typeof planColumnSchema>;
1974
+ export type PlanItemInput = z.infer<typeof planItemSchema>;
1975
+ export type ProjectPlanInput = z.infer<typeof projectPlanSchema>;
1976
+ export type TodoItemInput = z.infer<typeof todoItemSchema>;
1977
+ export type ProjectLogEntryInput = z.infer<typeof projectLogEntrySchema>;
1978
+ /** Создание пункта плана. */
1979
+ export declare const planItemCreateSchema: z.ZodObject<{
1980
+ title: z.ZodString;
1981
+ description: z.ZodOptional<z.ZodString>;
1982
+ columnId: z.ZodOptional<z.ZodString>;
1983
+ priority: z.ZodOptional<z.ZodEnum<{
1984
+ high: "high";
1985
+ medium: "medium";
1986
+ low: "low";
1987
+ }>>;
1988
+ dependsOn: z.ZodOptional<z.ZodArray<z.ZodObject<{
1989
+ projectId: z.ZodOptional<z.ZodString>;
1990
+ itemId: z.ZodString;
1991
+ relation: z.ZodEnum<{
1992
+ blocked_by: "blocked_by";
1993
+ blocks: "blocks";
1994
+ relates_to: "relates_to";
1995
+ }>;
1996
+ }, z.core.$loose>>>;
1997
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
1998
+ }, z.core.$strict>;
1999
+ /** Точечная правка полей пункта плана (версия не требуется). */
2000
+ export declare const planItemUpdateSchema: z.ZodObject<{
2001
+ title: z.ZodOptional<z.ZodString>;
2002
+ description: z.ZodOptional<z.ZodString>;
2003
+ priority: z.ZodOptional<z.ZodEnum<{
2004
+ high: "high";
2005
+ medium: "medium";
2006
+ low: "low";
2007
+ }>>;
2008
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
2009
+ dependsOn: z.ZodOptional<z.ZodArray<z.ZodObject<{
2010
+ projectId: z.ZodOptional<z.ZodString>;
2011
+ itemId: z.ZodString;
2012
+ relation: z.ZodEnum<{
2013
+ blocked_by: "blocked_by";
2014
+ blocks: "blocks";
2015
+ relates_to: "relates_to";
2016
+ }>;
2017
+ }, z.core.$loose>>>;
2018
+ }, z.core.$strict>;
2019
+ /**
2020
+ * Перемещение пункта плана: `beforeItemId`/`afterItemId` — соседи-ориентиры
2021
+ * (упорядочивание без ручного `order`); `version` — оптимистичная блокировка.
2022
+ */
2023
+ export declare const planItemMoveSchema: z.ZodObject<{
2024
+ columnId: z.ZodString;
2025
+ beforeItemId: z.ZodOptional<z.ZodString>;
2026
+ afterItemId: z.ZodOptional<z.ZodString>;
2027
+ version: z.ZodOptional<z.ZodNumber>;
2028
+ }, z.core.$strict>;
2029
+ /** Создание колонки плана. */
2030
+ export declare const planColumnCreateSchema: z.ZodObject<{
2031
+ name: z.ZodString;
2032
+ wipLimit: z.ZodOptional<z.ZodNumber>;
2033
+ }, z.core.$strict>;
2034
+ /** Правка колонки плана (имя/WIP-лимит). */
2035
+ export declare const planColumnUpdateSchema: z.ZodObject<{
2036
+ name: z.ZodOptional<z.ZodString>;
2037
+ wipLimit: z.ZodOptional<z.ZodNumber>;
2038
+ }, z.core.$strict>;
2039
+ /**
2040
+ * Удаление колонки: `moveItemsTo` — куда переносятся её пункты (`null` —
2041
+ * удалить вместе с колонкой); `version` — оптимистичная блокировка.
2042
+ */
2043
+ export declare const planColumnDeleteSchema: z.ZodObject<{
2044
+ moveItemsTo: z.ZodNullable<z.ZodString>;
2045
+ version: z.ZodNumber;
2046
+ }, z.core.$strict>;
2047
+ /** Порядок колонок плана (полный список id) + версия. */
2048
+ export declare const planColumnsOrderSchema: z.ZodObject<{
2049
+ order: z.ZodArray<z.ZodString>;
2050
+ version: z.ZodNumber;
2051
+ }, z.core.$strict>;
2052
+ export type PlanItemCreateRequest = z.infer<typeof planItemCreateSchema>;
2053
+ export type PlanItemUpdateRequest = z.infer<typeof planItemUpdateSchema>;
2054
+ export type PlanItemMoveRequest = z.infer<typeof planItemMoveSchema>;
2055
+ export type PlanColumnCreateRequest = z.infer<typeof planColumnCreateSchema>;
2056
+ export type PlanColumnUpdateRequest = z.infer<typeof planColumnUpdateSchema>;
2057
+ export type PlanColumnDeleteRequest = z.infer<typeof planColumnDeleteSchema>;
2058
+ export type PlanColumnsOrderRequest = z.infer<typeof planColumnsOrderSchema>;
2059
+ /** Создание пункта ToDo. */
2060
+ export declare const todoCreateSchema: z.ZodObject<{
2061
+ content: z.ZodString;
2062
+ status: z.ZodOptional<z.ZodEnum<{
2063
+ pending: "pending";
2064
+ in_progress: "in_progress";
2065
+ completed: "completed";
2066
+ cancelled: "cancelled";
2067
+ }>>;
2068
+ priority: z.ZodOptional<z.ZodEnum<{
2069
+ high: "high";
2070
+ medium: "medium";
2071
+ low: "low";
2072
+ }>>;
2073
+ planItemId: z.ZodOptional<z.ZodString>;
2074
+ }, z.core.$strict>;
2075
+ /** Точечная правка пункта ToDo (`planItemId: null` — отвязать от пункта плана). */
2076
+ export declare const todoUpdateSchema: z.ZodObject<{
2077
+ content: z.ZodOptional<z.ZodString>;
2078
+ status: z.ZodOptional<z.ZodEnum<{
2079
+ pending: "pending";
2080
+ in_progress: "in_progress";
2081
+ completed: "completed";
2082
+ cancelled: "cancelled";
2083
+ }>>;
2084
+ priority: z.ZodOptional<z.ZodEnum<{
2085
+ high: "high";
2086
+ medium: "medium";
2087
+ low: "low";
2088
+ }>>;
2089
+ planItemId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2090
+ }, z.core.$strict>;
2091
+ /** Новый порядок пунктов ToDo (только существующие id; новые — в конец). */
2092
+ export declare const todoOrderSchema: z.ZodObject<{
2093
+ ids: z.ZodArray<z.ZodString>;
2094
+ }, z.core.$strict>;
2095
+ /** Очистка пунктов ToDo по статусам (по умолчанию — `completed` + `cancelled`). */
2096
+ export declare const todoClearSchema: z.ZodObject<{
2097
+ statuses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2098
+ pending: "pending";
2099
+ in_progress: "in_progress";
2100
+ completed: "completed";
2101
+ cancelled: "cancelled";
2102
+ }>>>;
2103
+ }, z.core.$strict>;
2104
+ export type TodoCreateRequest = z.infer<typeof todoCreateSchema>;
2105
+ export type TodoUpdateRequest = z.infer<typeof todoUpdateSchema>;
2106
+ export type TodoOrderRequest = z.infer<typeof todoOrderSchema>;
2107
+ export type TodoClearRequest = z.infer<typeof todoClearSchema>;
2108
+ /** Новая запись журнала проекта (Markdown, лимит `MARKDOWN_LIMITS.journalEntry`). */
2109
+ export declare const projectLogCreateSchema: z.ZodObject<{
2110
+ text: z.ZodString;
2111
+ }, z.core.$strict>;
2112
+ /** Правка текста записи журнала. */
2113
+ export declare const projectLogUpdateSchema: z.ZodObject<{
2114
+ text: z.ZodString;
2115
+ }, z.core.$strict>;
2116
+ /** Замена текста инвариантов проекта (Markdown, лимит `MARKDOWN_LIMITS.invariants`). */
2117
+ export declare const projectInvariantsUpdateSchema: z.ZodObject<{
2118
+ invariants: z.ZodString;
2119
+ }, z.core.$strict>;
2120
+ export type ProjectLogCreateRequest = z.infer<typeof projectLogCreateSchema>;
2121
+ export type ProjectLogUpdateRequest = z.infer<typeof projectLogUpdateSchema>;
2122
+ export type ProjectInvariantsUpdateRequest = z.infer<typeof projectInvariantsUpdateSchema>;