@sidebutton/core
Advanced tools
+69
-1
@@ -402,2 +402,11 @@ /** | ||
| agent_role?: string; | ||
| llm_usage?: { | ||
| input_tokens: number; | ||
| output_tokens: number; | ||
| cache_read_tokens: number; | ||
| cache_create_tokens: number; | ||
| turns: number; | ||
| model: string; | ||
| cost_usd: number; | ||
| }; | ||
| } | ||
@@ -422,2 +431,3 @@ interface RunLog { | ||
| recording: boolean; | ||
| connection_id?: string; | ||
| } | ||
@@ -623,2 +633,6 @@ interface RoleContext { | ||
| }[]; | ||
| compactions?: { | ||
| count: number; | ||
| last_at?: string; | ||
| } | null; | ||
| dependency_versions?: { | ||
@@ -876,2 +890,10 @@ claude_code?: string; | ||
| llmConfig: LlmConfig; | ||
| llmUsage: { | ||
| input_tokens: number; | ||
| output_tokens: number; | ||
| cache_read_tokens: number; | ||
| cache_create_tokens: number; | ||
| turns: number; | ||
| model: string; | ||
| }; | ||
| repos: Record<string, string>; | ||
@@ -952,2 +974,48 @@ envVars: Record<string, string>; | ||
| /** | ||
| * Shared LLM pricing — used by the local server/dashboard where there is no | ||
| * portal DB. The portal keeps its own historical-pricing table in | ||
| * `website/src/lib/pricing.ts`; this module exists so the dashboard can still | ||
| * show a cost figure without round-tripping to the portal. | ||
| * | ||
| * Keep `DEFAULT_MODEL_PRICES` in sync with the seed in | ||
| * `website/scripts/seed.ts`. | ||
| */ | ||
| interface Usage { | ||
| input_tokens: number; | ||
| output_tokens: number; | ||
| cache_read_tokens?: number; | ||
| cache_create_tokens?: number; | ||
| } | ||
| interface ModelPrice { | ||
| input_per_1m_usd: number; | ||
| output_per_1m_usd: number; | ||
| cache_read_per_1m_usd?: number; | ||
| cache_create_per_1m_usd?: number; | ||
| } | ||
| declare const DEFAULT_MODEL_PRICES: Record<string, ModelPrice>; | ||
| declare function computeCost(usage: Usage, price: ModelPrice): number; | ||
| declare function lookupDefaultPrice(modelId: string): ModelPrice | null; | ||
| /** | ||
| * Per-workflow LLM usage accumulator (mirrors `ExecutionContext.llmUsage`). | ||
| */ | ||
| interface AccumulatedUsage extends Usage { | ||
| turns: number; | ||
| model: string; | ||
| } | ||
| /** | ||
| * Build the run-log `llm_usage` block for a finished workflow. | ||
| * Returns `undefined` when no LLM call was made, so run logs from non-LLM | ||
| * workflows stay free of empty usage fields. | ||
| */ | ||
| declare function buildRunLogUsage(usage: AccumulatedUsage): { | ||
| input_tokens: number; | ||
| output_tokens: number; | ||
| cache_read_tokens: number; | ||
| cache_create_tokens: number; | ||
| turns: number; | ||
| model: string; | ||
| cost_usd: number; | ||
| } | undefined; | ||
| /** | ||
| * Step executor registry | ||
@@ -1253,2 +1321,2 @@ * Delegates step execution to the appropriate handler | ||
| export { AcliJiraProvider, type AgentJob, type AgentMetrics, type AgentStatus, type Attachment, type AttachmentResult, BASE_RETRY_DELAY_MS, type Category, type CategoryDomain, type CategoryLevel, type ChatProvider, type ConnectorDefinition, type ConnectorStatus, type ConnectorType, type ContextConfig, type ContextSource, type ContextSummary, DELAY_BASE, type DashboardShortcut, type DelayConstant, type DelayValue, type EmbedConfig, type EmbedPosition, ExecutionContext, type ExecutionStatus, type ExtensionClient, type ExtensionStatus, type ExternalMcpConfig, type ExternalMcpToolConfig, type ExternalMcpTransport, type ExtractConfig, type FullLlmConfig, GhCliProvider, type GitProvider, type HealthResponse, type InstalledPack, type IssuesProvider, JiraProvider, type LlmConfig, type LlmProvider, MAX_RETRIES, MAX_WORKFLOW_DEPTH, type MatchCriteria, PROVIDER_DEFINITIONS, type ParamType, type ParentFilter, type PersonaContext, type Policies, type ProviderDefinition, type ProviderStatus, type ProviderStatusOptions, type ProviderType, type Publisher, type RecordedEvent, type Recording, type RecordingMetadata, type RecordingStatus, type ReportingConfig, type RoleContext, type RunLog, type RunLogMetadata, type RunLogStatus, type RunningWorkflowInfo, type ScrollDirection, type Settings, type SkillModule, type SkillPackDetail, type SkillPackManifest, type SkillRegistry, type Step, type TargetContext, type UserContext, type Workflow, WorkflowError, type WorkflowEvent, type WorkflowEventMessage, type WorkflowStats, type WorkflowSummary, countStepType, countSteps, detectCli, evaluateCondition, executeStep, executeSteps, executeWorkflow, getActiveUsageFile, getAllStepTypes, getChatProvider, getContextSource, getGitProvider, getIssuesProvider, getJiraAuth, getProviderStatuses, getSkillDomain, getStepTypeName, hasBrowserSteps, hasOwnRetryLogic, hasStepType, interpolate, loadWorkflow, loadWorkflowsFromDir, parseWorkflow, resolveDelay, truncateForDisplay }; | ||
| export { type AccumulatedUsage, AcliJiraProvider, type AgentJob, type AgentMetrics, type AgentStatus, type Attachment, type AttachmentResult, BASE_RETRY_DELAY_MS, type Category, type CategoryDomain, type CategoryLevel, type ChatProvider, type ConnectorDefinition, type ConnectorStatus, type ConnectorType, type ContextConfig, type ContextSource, type ContextSummary, DEFAULT_MODEL_PRICES, DELAY_BASE, type DashboardShortcut, type DelayConstant, type DelayValue, type EmbedConfig, type EmbedPosition, ExecutionContext, type ExecutionStatus, type ExtensionClient, type ExtensionStatus, type ExternalMcpConfig, type ExternalMcpToolConfig, type ExternalMcpTransport, type ExtractConfig, type FullLlmConfig, GhCliProvider, type GitProvider, type HealthResponse, type InstalledPack, type IssuesProvider, JiraProvider, type LlmConfig, type LlmProvider, MAX_RETRIES, MAX_WORKFLOW_DEPTH, type MatchCriteria, type ModelPrice, PROVIDER_DEFINITIONS, type ParamType, type ParentFilter, type PersonaContext, type Policies, type ProviderDefinition, type ProviderStatus, type ProviderStatusOptions, type ProviderType, type Publisher, type RecordedEvent, type Recording, type RecordingMetadata, type RecordingStatus, type ReportingConfig, type RoleContext, type RunLog, type RunLogMetadata, type RunLogStatus, type RunningWorkflowInfo, type ScrollDirection, type Settings, type SkillModule, type SkillPackDetail, type SkillPackManifest, type SkillRegistry, type Step, type TargetContext, type Usage, type UserContext, type Workflow, WorkflowError, type WorkflowEvent, type WorkflowEventMessage, type WorkflowStats, type WorkflowSummary, buildRunLogUsage, computeCost, countStepType, countSteps, detectCli, evaluateCondition, executeStep, executeSteps, executeWorkflow, getActiveUsageFile, getAllStepTypes, getChatProvider, getContextSource, getGitProvider, getIssuesProvider, getJiraAuth, getProviderStatuses, getSkillDomain, getStepTypeName, hasBrowserSteps, hasOwnRetryLogic, hasStepType, interpolate, loadWorkflow, loadWorkflowsFromDir, lookupDefaultPrice, parseWorkflow, resolveDelay, truncateForDisplay }; |
+1
-1
| { | ||
| "name": "@sidebutton/core", | ||
| "version": "1.1.1", | ||
| "version": "1.1.3", | ||
| "description": "Core workflow automation engine for AI agents — agentic workflows in YAML", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
328489
4.78%3767
4.26%