@itphx/synth-shared 0.13.4 → 0.13.10
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/dist/config/defaults.js +102 -3
- package/dist/config/env-overrides.d.ts +39 -4
- package/dist/config/env-overrides.js +174 -4
- package/dist/config/execution-runtime.d.ts +89 -0
- package/dist/config/execution-runtime.js +506 -0
- package/dist/config/execution.d.ts +202 -1
- package/dist/config/execution.js +459 -3
- package/dist/config/index.d.ts +3 -0
- package/dist/config/index.js +3 -0
- package/dist/config/loader.d.ts +8 -0
- package/dist/config/loader.js +6 -1
- package/dist/config/redact.d.ts +22 -0
- package/dist/config/redact.js +53 -0
- package/dist/config/security.d.ts +77 -0
- package/dist/config/security.js +116 -0
- package/dist/config/tls.d.ts +7 -4
- package/dist/config/tls.js +10 -23
- package/dist/config/types.d.ts +568 -38
- package/dist/config/types.js +390 -33
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/index.js +325 -13
- package/dist/index.d.ts +7 -6
- package/dist/index.js +17 -4
- package/dist/model-metadata.d.ts +10 -0
- package/dist/model-metadata.js +10 -0
- package/dist/schemas/index.d.ts +444 -30
- package/dist/schemas/index.js +354 -17
- package/dist/skills/frontmatter.js +1 -1
- package/dist/types/agent.d.ts +29 -1
- package/dist/types/authority.d.ts +10 -0
- package/dist/types/authority.js +8 -0
- package/dist/types/bus-events.d.ts +88 -2
- package/dist/types/catalog.d.ts +1 -1
- package/dist/types/catalog.js +1 -1
- package/dist/types/command-audit.d.ts +91 -0
- package/dist/types/command-audit.js +44 -0
- package/dist/types/commands.d.ts +29 -11
- package/dist/types/commands.js +2 -2
- package/dist/types/egress.d.ts +18 -3
- package/dist/types/egress.js +18 -3
- package/dist/types/events.d.ts +23 -2
- package/dist/types/execution.d.ts +424 -0
- package/dist/types/execution.js +355 -0
- package/dist/types/file-kind.d.ts +3 -2
- package/dist/types/file-kind.js +11 -2
- package/dist/types/git.d.ts +131 -0
- package/dist/types/git.js +101 -1
- package/dist/types/host-pattern.d.ts +41 -0
- package/dist/types/host-pattern.js +143 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.js +25 -3
- package/dist/types/maintenance.d.ts +1 -1
- package/dist/types/mcp.d.ts +90 -0
- package/dist/types/mcp.js +11 -0
- package/dist/types/mentions.d.ts +96 -0
- package/dist/types/mentions.js +9 -0
- package/dist/types/message-stream.d.ts +41 -0
- package/dist/types/message.d.ts +24 -1
- package/dist/types/message.js +13 -0
- package/dist/types/pack.d.ts +21 -21
- package/dist/types/pack.js +4 -4
- package/dist/types/permission.d.ts +20 -3
- package/dist/types/pipeline.d.ts +2 -2
- package/dist/types/plugin-protocol.d.ts +203 -4
- package/dist/types/plugin-protocol.js +77 -4
- package/dist/types/project-access.d.ts +94 -0
- package/dist/types/project-access.js +140 -0
- package/dist/types/project.d.ts +89 -2
- package/dist/types/project.js +36 -0
- package/dist/types/prompt.d.ts +4 -2
- package/dist/types/schedules.d.ts +49 -3
- package/dist/types/schedules.js +50 -1
- package/dist/types/scripts.d.ts +98 -0
- package/dist/types/scripts.js +14 -0
- package/dist/types/service-keys.d.ts +16 -3
- package/dist/types/service-keys.js +19 -1
- package/dist/types/session.d.ts +68 -3
- package/dist/types/skills.d.ts +21 -11
- package/dist/types/skills.js +6 -6
- package/dist/types/timers.d.ts +402 -0
- package/dist/types/timers.js +166 -0
- package/dist/types/tools.d.ts +160 -1
- package/dist/types/tools.js +70 -0
- package/dist/types/user.d.ts +24 -0
- package/dist/types/worktree.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './types/index.js';
|
|
2
2
|
export * from './i18n/index.js';
|
|
3
|
-
export { type ToolDefinition, type ToolForLLM, type ToolContext, type ToolResult, type ToolAttachmentRef, type ToolExecutor, type PendingToolCall, type CompletedToolCall, ToolCapability, TOOL_CAPABILITY_META, } from './types/tools.js';
|
|
3
|
+
export { type ToolDefinition, type ToolForLLM, type ToolContext, type ToolResult, type ToolAttachmentRef, type ToolExecutor, type PendingToolCall, type CompletedToolCall, type PluginRuntime, type PluginRuntimeExecOptions, type PluginRuntimeExecResult, type PluginRuntimeFs, ToolCapability, TOOL_CAPABILITY_META, } from './types/tools.js';
|
|
4
4
|
export * from './interfaces/index.js';
|
|
5
5
|
export * from './schemas/index.js';
|
|
6
6
|
export * from './protocols/index.js';
|
|
@@ -18,14 +18,15 @@ 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 ScriptsConfig, scriptsConfigSchema, 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 CommandAuditConfig, commandAuditConfigSchema, type CommandPolicyConfig, commandPolicyConfigSchema, type CommandPolicyProviderName, type CommandPolicyFailMode, COMMAND_POLICY_PROVIDERS, COMMAND_POLICY_FAIL_MODES, 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
|
-
export { resolveExecutionConfig, resolveExecutionMode, defaultExecutionConcurrency, parseExecutionUrlList, isExecutionMode, isExecutionFailMode, EXECUTION_ENV, EXECUTION_MODE_CLI_FLAG, } from './config/index.js';
|
|
27
|
-
export type { ExecutionConfig, ExecutionRemoteConfig, ExecutionMode, ExecutionFailMode, ResolvedExecutionConfig, ResolvedExecutionRemoteConfig, ExecutionCliOverride, } from './config/index.js';
|
|
28
|
-
export {
|
|
26
|
+
export { resolveExecutionConfig, resolveExecutionMode, defaultExecutionConcurrency, parseExecutionUrlList, normalizeProfileNameList, resolveBrowserProfileNames, resolveExecutionProfileNames, effectiveProfileClass, isExecutionMode, isExecutionFailMode, isExecutionPooling, isExecutionFallback, isExecutionPoolProvider, EXECUTION_PROFILE_NETWORKS, EXECUTION_ENV, EXECUTION_MODE_CLI_FLAG, } from './config/index.js';
|
|
27
|
+
export type { ExecutionConfig, ExecutionRemoteConfig, ExecutionMode, ExecutionFailMode, ExecutionPooling, ExecutionFallback, ExecutionPoolProviderKind, ExecutionProfileNetwork, ExecutionProfileResourceList, ExecutionProfileResources, ResolvedExecutionConfig, ResolvedExecutionRemoteConfig, ResolvedExecutionProfile, ResolvedExecutionProvisioner, ExecutionCliOverride, } from './config/index.js';
|
|
28
|
+
export { applyExecutionRuntimeSettings, parseExecutionRuntimeSettings, executionRuntimeSettingsFromResolved, mergeExecutionRuntimeSettings, effectiveExecutionProfileNames, effectiveExecutionCatalog, executionRuntimeFingerprint, } from './config/index.js';
|
|
29
|
+
export { resolveTlsConfig, resolveTlsTrust, resolveTlsProfiles, selectTlsClientProfile, isPemContent, TLS_ENV, } from './config/index.js';
|
|
29
30
|
export type { ResolvedTlsConfig, ResolvedTlsTrust, ResolvedTlsProfiles, TlsClientProfile, TlsClientMaterial, TlsMappingSettings, TlsRuntimeSettings, TlsSource, TlsConfigSource, } from './config/index.js';
|
|
30
31
|
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
32
|
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,27 @@ 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, scriptsConfigSchema, instructionsConfigSchema, instructionSourceConfigSchema, decisionConfigSchema, pluginsConfigSchema, attachmentsConfigSchema, attachmentsCompressionSchema, attachmentCompressionImageSchema, attachmentCompressionVideoSchema, attachmentCompressionAudioSchema, attachmentsThumbnailSchema, modalityModelRefSchema, modalityModelsSchema, ATTACHMENT_FAMILIES, updatesConfigSchema, UPDATE_CHANNEL_CHOICES, webhooksConfigSchema, securityTlsConfigSchema, commandAuditConfigSchema, commandPolicyConfigSchema, COMMAND_POLICY_PROVIDERS, COMMAND_POLICY_FAIL_MODES, } 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
|
-
export { resolveExecutionConfig, resolveExecutionMode, defaultExecutionConcurrency, parseExecutionUrlList,
|
|
30
|
+
export { resolveExecutionConfig, resolveExecutionMode, defaultExecutionConcurrency, parseExecutionUrlList,
|
|
31
|
+
// PROP-135 (браузерный контур): каталоги профилей (exec — без браузерных).
|
|
32
|
+
normalizeProfileNameList, resolveBrowserProfileNames, resolveExecutionProfileNames,
|
|
33
|
+
// ADR-135 (аддендум §11): эффективный класс профиля (exec|browser|both).
|
|
34
|
+
effectiveProfileClass, isExecutionMode, isExecutionFailMode,
|
|
35
|
+
// PROP-135 Ф4a: пулы и профили исполнения.
|
|
36
|
+
isExecutionPooling, isExecutionFallback,
|
|
37
|
+
// PROP-135 Ф4b-1: провайдер пулов исполнения.
|
|
38
|
+
isExecutionPoolProvider,
|
|
39
|
+
// PROP-135: метаданные профилей исполнения (description/image/network/…).
|
|
40
|
+
EXECUTION_PROFILE_NETWORKS, EXECUTION_ENV, EXECUTION_MODE_CLI_FLAG, } from './config/index.js';
|
|
41
|
+
// ADR-135: runtime-каталог профилей исполнения (admin-owned runtime-секция:
|
|
42
|
+
// `/api/v2/settings/execution`). Приоритет env/CLI > runtime > config.yaml.
|
|
43
|
+
export { applyExecutionRuntimeSettings, parseExecutionRuntimeSettings, executionRuntimeSettingsFromResolved, mergeExecutionRuntimeSettings, effectiveExecutionProfileNames, effectiveExecutionCatalog, executionRuntimeFingerprint, } from './config/index.js';
|
|
31
44
|
// ADR-099: резолверы доверия TLS/CA (`security.tls`).
|
|
32
|
-
export { resolveTlsConfig, resolveTlsTrust, resolveTlsProfiles, selectTlsClientProfile,
|
|
45
|
+
export { resolveTlsConfig, resolveTlsTrust, resolveTlsProfiles, selectTlsClientProfile, isPemContent, TLS_ENV, } from './config/index.js';
|
|
33
46
|
// ADR-099: bootstrap-хранилище runtime-настроек TLS ({dataDir}/security-tls.json).
|
|
34
47
|
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
48
|
// ADR-099 (D1): HTTP/HTTPS-прокси единого egress-слоя.
|
package/dist/model-metadata.d.ts
CHANGED
|
@@ -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 или имени.
|
package/dist/model-metadata.js
CHANGED
|
@@ -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,
|