botinabox 2.0.1 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +51 -2
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -189,6 +189,51 @@ interface AgentConfig {
|
|
|
189
189
|
skipPermissions?: boolean;
|
|
190
190
|
config?: Record<string, unknown>;
|
|
191
191
|
}
|
|
192
|
+
interface ExecutionConfig {
|
|
193
|
+
/** Model for task execution. Default: models.routing.task_execution */
|
|
194
|
+
model?: string;
|
|
195
|
+
/** Max tool loop iterations per task. Default: 5 */
|
|
196
|
+
maxIterations?: number;
|
|
197
|
+
/** Max tokens per LLM call. Default: 4096 */
|
|
198
|
+
maxTokens?: number;
|
|
199
|
+
/** Additional system prompt text appended to agent prompt */
|
|
200
|
+
systemPromptSuffix?: string;
|
|
201
|
+
}
|
|
202
|
+
interface ChatConfig {
|
|
203
|
+
/** System prompt for the conversational responder */
|
|
204
|
+
systemPrompt?: string;
|
|
205
|
+
/** Max tokens for context window. Default: 4000 */
|
|
206
|
+
contextWindowTokens?: number;
|
|
207
|
+
/** Max recent outbound messages for redundancy check. Default: 10 */
|
|
208
|
+
redundancyWindow?: number;
|
|
209
|
+
/** Message dedup window in ms. Default: 300000 (5 min) */
|
|
210
|
+
dedupWindowMs?: number;
|
|
211
|
+
/** Max tokens for ack responses. Default: 500 */
|
|
212
|
+
responseMaxTokens?: number;
|
|
213
|
+
}
|
|
214
|
+
interface RoutingConfig {
|
|
215
|
+
/** Routing rules for message triage */
|
|
216
|
+
rules: Array<{
|
|
217
|
+
agentSlug: string;
|
|
218
|
+
keywords?: string[];
|
|
219
|
+
patterns?: string[];
|
|
220
|
+
priority?: number;
|
|
221
|
+
}>;
|
|
222
|
+
/** Default agent when no rule matches */
|
|
223
|
+
fallbackAgent: string;
|
|
224
|
+
/** Use LLM for ambiguous messages. Default: false */
|
|
225
|
+
llmFallback?: boolean;
|
|
226
|
+
}
|
|
227
|
+
interface SafetyConfig {
|
|
228
|
+
/** Circuit breaker failure threshold. Default: 3 */
|
|
229
|
+
circuitBreakerThreshold?: number;
|
|
230
|
+
/** Circuit breaker reset timeout ms. Default: 300000 (5 min) */
|
|
231
|
+
circuitBreakerResetMs?: number;
|
|
232
|
+
/** Max agent followup chain depth. Default: 5 */
|
|
233
|
+
maxChainDepth?: number;
|
|
234
|
+
/** Stale run detection threshold ms. Default: 1800000 (30 min) */
|
|
235
|
+
staleRunThresholdMs?: number;
|
|
236
|
+
}
|
|
192
237
|
interface BotConfig {
|
|
193
238
|
data: DataConfig;
|
|
194
239
|
channels: Record<string, {
|
|
@@ -210,6 +255,10 @@ interface BotConfig {
|
|
|
210
255
|
render: RenderConfig;
|
|
211
256
|
updates: UpdateConfig;
|
|
212
257
|
budget: BudgetConfig;
|
|
258
|
+
execution?: ExecutionConfig;
|
|
259
|
+
chat?: ChatConfig;
|
|
260
|
+
routing?: RoutingConfig;
|
|
261
|
+
safety?: SafetyConfig;
|
|
213
262
|
workflows?: Record<string, WorkflowConfigEntry>;
|
|
214
263
|
}
|
|
215
264
|
interface WorkflowConfigEntry {
|
|
@@ -350,7 +399,7 @@ declare function loadConfig(opts?: {
|
|
|
350
399
|
overrides?: Partial<BotConfig>;
|
|
351
400
|
env?: Record<string, string | undefined>;
|
|
352
401
|
}): ConfigLoadResult;
|
|
353
|
-
/** Get the loaded config singleton.
|
|
402
|
+
/** Get the loaded config singleton. Auto-initializes with defaults if not loaded. */
|
|
354
403
|
declare function getConfig(): BotConfig;
|
|
355
404
|
/** Initialize the config singleton. Returns errors if any. */
|
|
356
405
|
declare function initConfig(opts?: Parameters<typeof loadConfig>[0]): ConfigLoadError[];
|
|
@@ -2080,4 +2129,4 @@ declare function isLoginRequired(stdout: string): boolean;
|
|
|
2080
2129
|
/** Rewrite local image paths to prevent CLI auto-embedding as vision content. */
|
|
2081
2130
|
declare function deactivateLocalImagePaths(prompt: string): string;
|
|
2082
2131
|
|
|
2083
|
-
export { AGENT_STATUSES, type AgentConfig, type AgentDefinition, type AgentFilter, type AgentRecord, AgentRegistry, type AgentStatus, ApiExecutionAdapter, type ApprovalResponse, type ApprovalStatus, AuditEmitter, type AuditEvent, BackupManager, type BotConfig, BreakerState, type BudgetCheck, type BudgetConfig, BudgetController, CORE_MIGRATIONS, ChannelAdapter, ChannelRegistry, ChannelRegistryError, ChatMessage, ChatResponderConfig, ChatSessionManager, CircuitBreaker, type CircuitBreakerConfig, CliExecutionAdapter, type ColumnValidator, ColumnValidatorImpl, type ConfigLoadError, type ConfigLoadResult, ConnectorConfig, DEFAULTS, DEFAULT_CONFIG, type DataConfig, DataStore, type DefaultLLMCallConfig, DeterministicAdapter, type DeterministicConfig, type DomainEntityContextOptions, type DomainSchemaOptions, DriftGate, EVENTS, type EntityColumnDef, type EntityConfig, type ExecutionAdapter, type ExecutionEngineConfig, type FeedbackEntry, type GateFinding, type GateInput, type GateResult, GateRunner, type GateVerdict, GovernanceGate, HealthStatus, HookBus, InboundMessage, LLMProvider, LearningPipeline, type LearningPipelineConfig, type LoopDetection, LoopDetector, type LoopDetectorConfig, LoopType, MAX_CHAIN_DEPTH, MessagePipeline, type ModelConfig, ModelInfo, ModelRouter, NdjsonLogger, NotificationQueue, type PackageMigration, type PackageUpdate, type ParsedStream, type PermissionPrompt, type PermissionProvider, PermissionRelay, type PermissionRelayConfig, type PlaybookEntry, ProviderRegistry, QAGate, QualityGate, RUN_STATUSES, type RenderConfig, ResolvedModel, type RetryPolicy, type RunContext, RunManager, type RunResult, type RunStatus, type SanitizerOptions, type Schedule, type ScheduleDef, Scheduler, type SchemaError, type SecretInput, type SecretMeta, SecretStore, type SecurityConfig, SessionKey, SessionManager, type SkillEntry, type StepRef, type SystemContextOptions, TASK_STATUSES, type TaskDefinition, TaskQueue, type TaskRecord, type TaskStatus, TokenUsage, type ToolContext, type ToolDefinition, type ToolHandler, UpdateChecker, type UpdateConfig, UpdateManager, type UpdateManifest, type UsageSummary, type User, type UserInput, UserRegistry, WakeupQueue, type WorkflowConfigEntry, type WorkflowDefinition$1 as WorkflowDefinition, WorkflowEngine, type WorkflowRunRecord, type WorkflowRunStatus, type WorkflowStep$1 as WorkflowStep, type WorkflowStepConfig, type WorkflowTrigger, _resetConfig, addTaskCommentTool, areDependenciesMet, autoUpdate, buildAgentBindings, buildChainOrigin, buildProcessEnv, buildSystemContext, cancelTaskTool, checkAllowlist, checkChainDepth, checkMentionGate, chunkText, classifyUpdate, compareVersions, createAgentTool, createConfigRevision, createDefaultLLMCall, createProjectTool, deactivateLocalImagePaths, defineCoreEntityContexts, defineCoreTables, defineDomainEntityContexts, defineDomainTables, detectCycle, discoverChannels, discoverProviders, dispatchTaskTool, formatText, getActiveTasksTool, getAgentDetailTool, getAgentStatusTool, getConfig, getSystemStatusTool, getTaskStatusTool, initConfig, interpolate, interpolateEnv, isLoginRequired, isMaxTurns, listAgentsTool, listFilesTool, listProjectsTool, loadConfig, parseClaudeStream, parseVersion, readConversationTool, readFileTool, reassignTaskTool, registerExecutionEngine, registerFileTool, runPackageMigrations, sanitize, searchConversationTool, sendFileTool, sendMessageTool, topologicalSort, truncateAtWord, validateConfig };
|
|
2132
|
+
export { AGENT_STATUSES, type AgentConfig, type AgentDefinition, type AgentFilter, type AgentRecord, AgentRegistry, type AgentStatus, ApiExecutionAdapter, type ApprovalResponse, type ApprovalStatus, AuditEmitter, type AuditEvent, BackupManager, type BotConfig, BreakerState, type BudgetCheck, type BudgetConfig, BudgetController, CORE_MIGRATIONS, ChannelAdapter, ChannelRegistry, ChannelRegistryError, type ChatConfig, ChatMessage, ChatResponderConfig, ChatSessionManager, CircuitBreaker, type CircuitBreakerConfig, CliExecutionAdapter, type ColumnValidator, ColumnValidatorImpl, type ConfigLoadError, type ConfigLoadResult, ConnectorConfig, DEFAULTS, DEFAULT_CONFIG, type DataConfig, DataStore, type DefaultLLMCallConfig, DeterministicAdapter, type DeterministicConfig, type DomainEntityContextOptions, type DomainSchemaOptions, DriftGate, EVENTS, type EntityColumnDef, type EntityConfig, type ExecutionAdapter, type ExecutionConfig, type ExecutionEngineConfig, type FeedbackEntry, type GateFinding, type GateInput, type GateResult, GateRunner, type GateVerdict, GovernanceGate, HealthStatus, HookBus, InboundMessage, LLMProvider, LearningPipeline, type LearningPipelineConfig, type LoopDetection, LoopDetector, type LoopDetectorConfig, LoopType, MAX_CHAIN_DEPTH, MessagePipeline, type ModelConfig, ModelInfo, ModelRouter, NdjsonLogger, NotificationQueue, type PackageMigration, type PackageUpdate, type ParsedStream, type PermissionPrompt, type PermissionProvider, PermissionRelay, type PermissionRelayConfig, type PlaybookEntry, ProviderRegistry, QAGate, QualityGate, RUN_STATUSES, type RenderConfig, ResolvedModel, type RetryPolicy, type RoutingConfig, type RunContext, RunManager, type RunResult, type RunStatus, type SafetyConfig, type SanitizerOptions, type Schedule, type ScheduleDef, Scheduler, type SchemaError, type SecretInput, type SecretMeta, SecretStore, type SecurityConfig, SessionKey, SessionManager, type SkillEntry, type StepRef, type SystemContextOptions, TASK_STATUSES, type TaskDefinition, TaskQueue, type TaskRecord, type TaskStatus, TokenUsage, type ToolContext, type ToolDefinition, type ToolHandler, UpdateChecker, type UpdateConfig, UpdateManager, type UpdateManifest, type UsageSummary, type User, type UserInput, UserRegistry, WakeupQueue, type WorkflowConfigEntry, type WorkflowDefinition$1 as WorkflowDefinition, WorkflowEngine, type WorkflowRunRecord, type WorkflowRunStatus, type WorkflowStep$1 as WorkflowStep, type WorkflowStepConfig, type WorkflowTrigger, _resetConfig, addTaskCommentTool, areDependenciesMet, autoUpdate, buildAgentBindings, buildChainOrigin, buildProcessEnv, buildSystemContext, cancelTaskTool, checkAllowlist, checkChainDepth, checkMentionGate, chunkText, classifyUpdate, compareVersions, createAgentTool, createConfigRevision, createDefaultLLMCall, createProjectTool, deactivateLocalImagePaths, defineCoreEntityContexts, defineCoreTables, defineDomainEntityContexts, defineDomainTables, detectCycle, discoverChannels, discoverProviders, dispatchTaskTool, formatText, getActiveTasksTool, getAgentDetailTool, getAgentStatusTool, getConfig, getSystemStatusTool, getTaskStatusTool, initConfig, interpolate, interpolateEnv, isLoginRequired, isMaxTurns, listAgentsTool, listFilesTool, listProjectsTool, loadConfig, parseClaudeStream, parseVersion, readConversationTool, readFileTool, reassignTaskTool, registerExecutionEngine, registerFileTool, runPackageMigrations, sanitize, searchConversationTool, sendFileTool, sendMessageTool, topologicalSort, truncateAtWord, validateConfig };
|
package/dist/index.js
CHANGED
|
@@ -290,7 +290,9 @@ function loadConfig(opts) {
|
|
|
290
290
|
}
|
|
291
291
|
var _config = null;
|
|
292
292
|
function getConfig() {
|
|
293
|
-
if (!_config)
|
|
293
|
+
if (!_config) {
|
|
294
|
+
initConfig({});
|
|
295
|
+
}
|
|
294
296
|
return _config;
|
|
295
297
|
}
|
|
296
298
|
function initConfig(opts) {
|