@the-open-engine/zeroshot 5.4.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/CHANGELOG.md +539 -0
- package/LICENSE +21 -0
- package/README.md +508 -0
- package/cli/commands/inspect-render.js +135 -0
- package/cli/commands/inspect.js +294 -0
- package/cli/commands/providers.js +149 -0
- package/cli/index.js +5431 -0
- package/cli/lib/first-run.js +211 -0
- package/cli/lib/update-checker.js +281 -0
- package/cli/message-formatter-utils.js +75 -0
- package/cli/message-formatters-normal.js +275 -0
- package/cli/message-formatters-watch.js +185 -0
- package/cluster-templates/base-templates/debug-workflow.json +422 -0
- package/cluster-templates/base-templates/full-workflow.json +727 -0
- package/cluster-templates/base-templates/heavy-validation.json +272 -0
- package/cluster-templates/base-templates/quick-validation.json +285 -0
- package/cluster-templates/base-templates/single-worker.json +71 -0
- package/cluster-templates/base-templates/worker-validator.json +230 -0
- package/cluster-templates/conductor-bootstrap.json +130 -0
- package/docker/zeroshot-cluster/Dockerfile +153 -0
- package/docker/zeroshot-cluster/pre-baked-deps.json +28 -0
- package/lib/agent-cli-provider/adapters/claude-parser.d.ts +3 -0
- package/lib/agent-cli-provider/adapters/claude-parser.d.ts.map +1 -0
- package/lib/agent-cli-provider/adapters/claude-parser.js +122 -0
- package/lib/agent-cli-provider/adapters/claude-parser.js.map +1 -0
- package/lib/agent-cli-provider/adapters/claude-recovery.d.ts +15 -0
- package/lib/agent-cli-provider/adapters/claude-recovery.d.ts.map +1 -0
- package/lib/agent-cli-provider/adapters/claude-recovery.js +165 -0
- package/lib/agent-cli-provider/adapters/claude-recovery.js.map +1 -0
- package/lib/agent-cli-provider/adapters/claude.d.ts +3 -0
- package/lib/agent-cli-provider/adapters/claude.d.ts.map +1 -0
- package/lib/agent-cli-provider/adapters/claude.js +181 -0
- package/lib/agent-cli-provider/adapters/claude.js.map +1 -0
- package/lib/agent-cli-provider/adapters/codex-parser.d.ts +3 -0
- package/lib/agent-cli-provider/adapters/codex-parser.d.ts.map +1 -0
- package/lib/agent-cli-provider/adapters/codex-parser.js +192 -0
- package/lib/agent-cli-provider/adapters/codex-parser.js.map +1 -0
- package/lib/agent-cli-provider/adapters/codex.d.ts +3 -0
- package/lib/agent-cli-provider/adapters/codex.d.ts.map +1 -0
- package/lib/agent-cli-provider/adapters/codex.js +151 -0
- package/lib/agent-cli-provider/adapters/codex.js.map +1 -0
- package/lib/agent-cli-provider/adapters/common.d.ts +28 -0
- package/lib/agent-cli-provider/adapters/common.d.ts.map +1 -0
- package/lib/agent-cli-provider/adapters/common.js +71 -0
- package/lib/agent-cli-provider/adapters/common.js.map +1 -0
- package/lib/agent-cli-provider/adapters/gemini.d.ts +3 -0
- package/lib/agent-cli-provider/adapters/gemini.d.ts.map +1 -0
- package/lib/agent-cli-provider/adapters/gemini.js +176 -0
- package/lib/agent-cli-provider/adapters/gemini.js.map +1 -0
- package/lib/agent-cli-provider/adapters/index.d.ts +9 -0
- package/lib/agent-cli-provider/adapters/index.d.ts.map +1 -0
- package/lib/agent-cli-provider/adapters/index.js +95 -0
- package/lib/agent-cli-provider/adapters/index.js.map +1 -0
- package/lib/agent-cli-provider/adapters/opencode.d.ts +3 -0
- package/lib/agent-cli-provider/adapters/opencode.d.ts.map +1 -0
- package/lib/agent-cli-provider/adapters/opencode.js +228 -0
- package/lib/agent-cli-provider/adapters/opencode.js.map +1 -0
- package/lib/agent-cli-provider/contract-actions.d.ts +5 -0
- package/lib/agent-cli-provider/contract-actions.d.ts.map +1 -0
- package/lib/agent-cli-provider/contract-actions.js +140 -0
- package/lib/agent-cli-provider/contract-actions.js.map +1 -0
- package/lib/agent-cli-provider/contract-env.d.ts +11 -0
- package/lib/agent-cli-provider/contract-env.d.ts.map +1 -0
- package/lib/agent-cli-provider/contract-env.js +113 -0
- package/lib/agent-cli-provider/contract-env.js.map +1 -0
- package/lib/agent-cli-provider/contract-envelope.d.ts +49 -0
- package/lib/agent-cli-provider/contract-envelope.d.ts.map +1 -0
- package/lib/agent-cli-provider/contract-envelope.js +52 -0
- package/lib/agent-cli-provider/contract-envelope.js.map +1 -0
- package/lib/agent-cli-provider/contract-errors.d.ts +22 -0
- package/lib/agent-cli-provider/contract-errors.d.ts.map +1 -0
- package/lib/agent-cli-provider/contract-errors.js +71 -0
- package/lib/agent-cli-provider/contract-errors.js.map +1 -0
- package/lib/agent-cli-provider/contract-fallback.d.ts +7 -0
- package/lib/agent-cli-provider/contract-fallback.d.ts.map +1 -0
- package/lib/agent-cli-provider/contract-fallback.js +102 -0
- package/lib/agent-cli-provider/contract-fallback.js.map +1 -0
- package/lib/agent-cli-provider/contract-invoke.d.ts +5 -0
- package/lib/agent-cli-provider/contract-invoke.d.ts.map +1 -0
- package/lib/agent-cli-provider/contract-invoke.js +89 -0
- package/lib/agent-cli-provider/contract-invoke.js.map +1 -0
- package/lib/agent-cli-provider/contract-options.d.ts +3 -0
- package/lib/agent-cli-provider/contract-options.d.ts.map +1 -0
- package/lib/agent-cli-provider/contract-options.js +140 -0
- package/lib/agent-cli-provider/contract-options.js.map +1 -0
- package/lib/agent-cli-provider/contract-parse.d.ts +15 -0
- package/lib/agent-cli-provider/contract-parse.d.ts.map +1 -0
- package/lib/agent-cli-provider/contract-parse.js +81 -0
- package/lib/agent-cli-provider/contract-parse.js.map +1 -0
- package/lib/agent-cli-provider/contract-support.d.ts +18 -0
- package/lib/agent-cli-provider/contract-support.d.ts.map +1 -0
- package/lib/agent-cli-provider/contract-support.js +154 -0
- package/lib/agent-cli-provider/contract-support.js.map +1 -0
- package/lib/agent-cli-provider/contract.d.ts +13 -0
- package/lib/agent-cli-provider/contract.d.ts.map +1 -0
- package/lib/agent-cli-provider/contract.js +30 -0
- package/lib/agent-cli-provider/contract.js.map +1 -0
- package/lib/agent-cli-provider/env-safety.d.ts +11 -0
- package/lib/agent-cli-provider/env-safety.d.ts.map +1 -0
- package/lib/agent-cli-provider/env-safety.js +83 -0
- package/lib/agent-cli-provider/env-safety.js.map +1 -0
- package/lib/agent-cli-provider/errors.d.ts +5 -0
- package/lib/agent-cli-provider/errors.d.ts.map +1 -0
- package/lib/agent-cli-provider/errors.js +115 -0
- package/lib/agent-cli-provider/errors.js.map +1 -0
- package/lib/agent-cli-provider/executable.d.ts +3 -0
- package/lib/agent-cli-provider/executable.d.ts.map +1 -0
- package/lib/agent-cli-provider/executable.js +24 -0
- package/lib/agent-cli-provider/executable.js.map +1 -0
- package/lib/agent-cli-provider/index.d.ts +8 -0
- package/lib/agent-cli-provider/index.d.ts.map +1 -0
- package/lib/agent-cli-provider/index.js +31 -0
- package/lib/agent-cli-provider/index.js.map +1 -0
- package/lib/agent-cli-provider/invoke-evidence.d.ts +4 -0
- package/lib/agent-cli-provider/invoke-evidence.d.ts.map +1 -0
- package/lib/agent-cli-provider/invoke-evidence.js +17 -0
- package/lib/agent-cli-provider/invoke-evidence.js.map +1 -0
- package/lib/agent-cli-provider/json.d.ts +16 -0
- package/lib/agent-cli-provider/json.d.ts.map +1 -0
- package/lib/agent-cli-provider/json.js +110 -0
- package/lib/agent-cli-provider/json.js.map +1 -0
- package/lib/agent-cli-provider/log-prefix.d.ts +2 -0
- package/lib/agent-cli-provider/log-prefix.d.ts.map +1 -0
- package/lib/agent-cli-provider/log-prefix.js +22 -0
- package/lib/agent-cli-provider/log-prefix.js.map +1 -0
- package/lib/agent-cli-provider/process-runner.d.ts +17 -0
- package/lib/agent-cli-provider/process-runner.d.ts.map +1 -0
- package/lib/agent-cli-provider/process-runner.js +89 -0
- package/lib/agent-cli-provider/process-runner.js.map +1 -0
- package/lib/agent-cli-provider/redaction.d.ts +9 -0
- package/lib/agent-cli-provider/redaction.d.ts.map +1 -0
- package/lib/agent-cli-provider/redaction.js +227 -0
- package/lib/agent-cli-provider/redaction.js.map +1 -0
- package/lib/agent-cli-provider/schema.d.ts +5 -0
- package/lib/agent-cli-provider/schema.d.ts.map +1 -0
- package/lib/agent-cli-provider/schema.js +136 -0
- package/lib/agent-cli-provider/schema.js.map +1 -0
- package/lib/agent-cli-provider/single-agent-runtime.d.ts +15 -0
- package/lib/agent-cli-provider/single-agent-runtime.d.ts.map +1 -0
- package/lib/agent-cli-provider/single-agent-runtime.js +228 -0
- package/lib/agent-cli-provider/single-agent-runtime.js.map +1 -0
- package/lib/agent-cli-provider/types.d.ts +194 -0
- package/lib/agent-cli-provider/types.d.ts.map +1 -0
- package/lib/agent-cli-provider/types.js +12 -0
- package/lib/agent-cli-provider/types.js.map +1 -0
- package/lib/completion.js +174 -0
- package/lib/detached-startup.js +220 -0
- package/lib/docker-config.js +220 -0
- package/lib/git-remote-utils.js +165 -0
- package/lib/id-detector.js +55 -0
- package/lib/provider-defaults.js +62 -0
- package/lib/provider-detection.js +59 -0
- package/lib/provider-names.js +57 -0
- package/lib/repo-settings.js +69 -0
- package/lib/settings/claude-auth.js +78 -0
- package/lib/settings.js +542 -0
- package/lib/start-cluster.js +321 -0
- package/lib/stream-json-parser.js +67 -0
- package/package.json +162 -0
- package/scripts/fix-node-pty-permissions.js +75 -0
- package/scripts/record-demo.sh +279 -0
- package/scripts/setup-merge-queue.sh +170 -0
- package/scripts/test-install.sh +40 -0
- package/scripts/validate-templates.js +107 -0
- package/src/agent/agent-config.js +266 -0
- package/src/agent/agent-context-builder.js +189 -0
- package/src/agent/agent-context-sections.js +338 -0
- package/src/agent/agent-context-sources.js +147 -0
- package/src/agent/agent-hook-executor.js +721 -0
- package/src/agent/agent-input-injector.js +141 -0
- package/src/agent/agent-lifecycle.js +982 -0
- package/src/agent/agent-quality-gate-schema.js +93 -0
- package/src/agent/agent-quality-gates-context.js +51 -0
- package/src/agent/agent-stuck-detector.js +256 -0
- package/src/agent/agent-task-executor.js +2028 -0
- package/src/agent/agent-trigger-evaluator.js +67 -0
- package/src/agent/context-metrics.js +160 -0
- package/src/agent/context-pack-builder.js +367 -0
- package/src/agent/context-replay-policy.js +51 -0
- package/src/agent/guidance-queue.js +77 -0
- package/src/agent/output-extraction.js +367 -0
- package/src/agent/output-reformatter.js +175 -0
- package/src/agent/pr-verification.js +653 -0
- package/src/agent/rate-limit-backoff.js +82 -0
- package/src/agent/schema-utils.js +146 -0
- package/src/agent/validation-platform.js +35 -0
- package/src/agent-cli-provider/adapters/claude-parser.ts +133 -0
- package/src/agent-cli-provider/adapters/claude-recovery.ts +203 -0
- package/src/agent-cli-provider/adapters/claude.ts +247 -0
- package/src/agent-cli-provider/adapters/codex-parser.ts +211 -0
- package/src/agent-cli-provider/adapters/codex.ts +217 -0
- package/src/agent-cli-provider/adapters/common.ts +124 -0
- package/src/agent-cli-provider/adapters/gemini.ts +243 -0
- package/src/agent-cli-provider/adapters/index.ts +126 -0
- package/src/agent-cli-provider/adapters/opencode.ts +286 -0
- package/src/agent-cli-provider/contract-actions.ts +150 -0
- package/src/agent-cli-provider/contract-env.ts +111 -0
- package/src/agent-cli-provider/contract-envelope.ts +110 -0
- package/src/agent-cli-provider/contract-errors.ts +66 -0
- package/src/agent-cli-provider/contract-fallback.ts +121 -0
- package/src/agent-cli-provider/contract-invoke.ts +104 -0
- package/src/agent-cli-provider/contract-options.ts +173 -0
- package/src/agent-cli-provider/contract-parse.ts +94 -0
- package/src/agent-cli-provider/contract-support.ts +167 -0
- package/src/agent-cli-provider/contract.ts +56 -0
- package/src/agent-cli-provider/env-safety.ts +82 -0
- package/src/agent-cli-provider/errors.ts +122 -0
- package/src/agent-cli-provider/executable.ts +24 -0
- package/src/agent-cli-provider/index.ts +83 -0
- package/src/agent-cli-provider/invoke-evidence.ts +18 -0
- package/src/agent-cli-provider/json.ts +114 -0
- package/src/agent-cli-provider/log-prefix.ts +20 -0
- package/src/agent-cli-provider/process-runner.ts +145 -0
- package/src/agent-cli-provider/redaction.ts +282 -0
- package/src/agent-cli-provider/schema.ts +115 -0
- package/src/agent-cli-provider/single-agent-runtime.ts +311 -0
- package/src/agent-cli-provider/types.ts +237 -0
- package/src/agent-wrapper.js +615 -0
- package/src/agents/git-pusher-template.js +705 -0
- package/src/attach/attach-client.js +438 -0
- package/src/attach/attach-server.js +543 -0
- package/src/attach/index.js +37 -0
- package/src/attach/protocol.js +220 -0
- package/src/attach/ring-buffer.js +121 -0
- package/src/attach/send-input.js +88 -0
- package/src/attach/socket-discovery.js +267 -0
- package/src/claude-task-runner.js +661 -0
- package/src/config-router.js +89 -0
- package/src/config-validator.js +2202 -0
- package/src/copy-worker.js +43 -0
- package/src/guidance-topics.js +10 -0
- package/src/input-helpers.js +65 -0
- package/src/isolation-manager.js +1734 -0
- package/src/issue-providers/README.md +305 -0
- package/src/issue-providers/azure-devops-provider.js +307 -0
- package/src/issue-providers/base-provider.js +232 -0
- package/src/issue-providers/github-provider.js +210 -0
- package/src/issue-providers/gitlab-provider.js +262 -0
- package/src/issue-providers/index.js +196 -0
- package/src/issue-providers/jira-provider.js +260 -0
- package/src/ledger.js +692 -0
- package/src/lib/gc.js +232 -0
- package/src/lib/safe-exec.js +88 -0
- package/src/logic-engine.js +201 -0
- package/src/message-buffer.js +81 -0
- package/src/message-bus-bridge.js +144 -0
- package/src/message-bus.js +256 -0
- package/src/name-generator.js +232 -0
- package/src/orchestrator.js +3924 -0
- package/src/preflight.js +712 -0
- package/src/process-metrics.js +608 -0
- package/src/providers/anthropic/index.js +3 -0
- package/src/providers/base-provider.js +355 -0
- package/src/providers/capabilities.js +60 -0
- package/src/providers/google/index.js +3 -0
- package/src/providers/index.js +293 -0
- package/src/providers/openai/index.js +3 -0
- package/src/providers/opencode/index.js +3 -0
- package/src/quality-gates.js +143 -0
- package/src/schemas/sub-cluster.js +208 -0
- package/src/state-snapshot.js +398 -0
- package/src/state-snapshotter.js +142 -0
- package/src/status-footer.js +1026 -0
- package/src/sub-cluster-wrapper.js +693 -0
- package/src/task-runner.js +30 -0
- package/src/template-resolver.js +425 -0
- package/src/template-validation/index.js +338 -0
- package/src/template-validation/simulate-consensus-gates.js +324 -0
- package/src/template-validation/simulate-random-topology.js +541 -0
- package/src/template-validation/simulate-two-stage-validation.js +270 -0
- package/src/worktree-claude-config.js +135 -0
- package/src/worktree-tooling-env.js +150 -0
- package/task-lib/attachable-watcher.js +381 -0
- package/task-lib/commands/clean.js +50 -0
- package/task-lib/commands/episodes.js +105 -0
- package/task-lib/commands/get-log-path.js +23 -0
- package/task-lib/commands/kill.js +32 -0
- package/task-lib/commands/list.js +105 -0
- package/task-lib/commands/logs.js +439 -0
- package/task-lib/commands/resume.js +42 -0
- package/task-lib/commands/run.js +57 -0
- package/task-lib/commands/schedule.js +105 -0
- package/task-lib/commands/scheduler-cmd.js +96 -0
- package/task-lib/commands/schedules.js +148 -0
- package/task-lib/commands/status.js +44 -0
- package/task-lib/commands/unschedule.js +16 -0
- package/task-lib/completion.js +9 -0
- package/task-lib/config.js +11 -0
- package/task-lib/name-generator.js +230 -0
- package/task-lib/package.json +3 -0
- package/task-lib/provider-helper-runtime.js +29 -0
- package/task-lib/runner.js +190 -0
- package/task-lib/scheduler.js +252 -0
- package/task-lib/store.js +529 -0
- package/task-lib/watcher.js +305 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import { getProviderAdapter } from './adapters';
|
|
2
|
+
import { isRecord } from './json';
|
|
3
|
+
import type {
|
|
4
|
+
BuildProviderCommandOptions,
|
|
5
|
+
CliFeatureOverrides,
|
|
6
|
+
CommandSpec,
|
|
7
|
+
LevelOverrides,
|
|
8
|
+
ModelLevel,
|
|
9
|
+
ModelSpec,
|
|
10
|
+
ProviderAdapter,
|
|
11
|
+
ProviderCliFeatures,
|
|
12
|
+
ProviderId,
|
|
13
|
+
ReasoningEffort,
|
|
14
|
+
} from './types';
|
|
15
|
+
|
|
16
|
+
type UnknownFunction = (...args: readonly unknown[]) => unknown;
|
|
17
|
+
|
|
18
|
+
interface CommandParts {
|
|
19
|
+
readonly command: string;
|
|
20
|
+
readonly args: readonly string[];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface RuntimeProviderSettings {
|
|
24
|
+
readonly defaultLevel?: ModelLevel;
|
|
25
|
+
readonly levelOverrides: LevelOverrides;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface SingleAgentProviderCommandInput {
|
|
29
|
+
readonly provider?: string | null;
|
|
30
|
+
readonly context: string;
|
|
31
|
+
readonly options?: BuildProviderCommandOptions;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface PreparedSingleAgentProviderCommand {
|
|
35
|
+
readonly adapter: ProviderAdapter;
|
|
36
|
+
readonly commandSpec: CommandSpec;
|
|
37
|
+
readonly options: BuildProviderCommandOptions;
|
|
38
|
+
readonly cliFeatures: CliFeatureOverrides;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
type MutableModelSpec = {
|
|
42
|
+
level?: ModelLevel;
|
|
43
|
+
model?: string | null;
|
|
44
|
+
reasoningEffort?: ReasoningEffort;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const MODEL_LEVELS: readonly ModelLevel[] = ['level1', 'level2', 'level3'];
|
|
48
|
+
const REASONING_EFFORTS: readonly ReasoningEffort[] = ['low', 'medium', 'high', 'xhigh'];
|
|
49
|
+
|
|
50
|
+
const settingsModule: unknown = require('../../lib/settings');
|
|
51
|
+
const providerDetectionModule: unknown = require('../../lib/provider-detection');
|
|
52
|
+
const claudeAuthModule: unknown = require('../../lib/settings/claude-auth');
|
|
53
|
+
|
|
54
|
+
const loadSettingsFn = moduleFunction(settingsModule, 'loadSettings');
|
|
55
|
+
const getClaudeCommandFn = moduleFunction(settingsModule, 'getClaudeCommand');
|
|
56
|
+
const getHelpOutputFn = moduleFunction(providerDetectionModule, 'getHelpOutput');
|
|
57
|
+
const resolveClaudeAuthFn = moduleFunction(claudeAuthModule, 'resolveClaudeAuth');
|
|
58
|
+
|
|
59
|
+
export function prepareSingleAgentProviderCommand(
|
|
60
|
+
input: SingleAgentProviderCommandInput
|
|
61
|
+
): PreparedSingleAgentProviderCommand {
|
|
62
|
+
const settings = loadRuntimeSettings();
|
|
63
|
+
const adapter = adapterForRuntimeInput(input.provider, settings);
|
|
64
|
+
const providerSettings = runtimeProviderSettings(settings, adapter.id);
|
|
65
|
+
const baseOptions = input.options ?? {};
|
|
66
|
+
const cliFeatures = baseOptions.cliFeatures ?? detectRuntimeProviderCliFeatures(adapter.id);
|
|
67
|
+
const authEnv = baseOptions.authEnv ?? resolveRuntimeAuthEnv(adapter.id, settings);
|
|
68
|
+
const options = buildRuntimeOptions(baseOptions, adapter, providerSettings, cliFeatures, authEnv);
|
|
69
|
+
return {
|
|
70
|
+
adapter,
|
|
71
|
+
options,
|
|
72
|
+
cliFeatures,
|
|
73
|
+
commandSpec: adapter.buildCommand(input.context, options),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function detectRuntimeProviderCliFeatures(provider: string): ProviderCliFeatures {
|
|
78
|
+
const adapter = getProviderAdapter(provider);
|
|
79
|
+
const helpCommand = runtimeHelpCommand(adapter.id);
|
|
80
|
+
const helpText = stringResult(getHelpOutputFn(helpCommand.command, helpCommand.args));
|
|
81
|
+
return adapter.detectCliFeatures(helpText);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function buildRuntimeOptions(
|
|
85
|
+
baseOptions: BuildProviderCommandOptions,
|
|
86
|
+
adapter: ProviderAdapter,
|
|
87
|
+
providerSettings: RuntimeProviderSettings,
|
|
88
|
+
cliFeatures: CliFeatureOverrides,
|
|
89
|
+
authEnv: Readonly<Record<string, string>>
|
|
90
|
+
): BuildProviderCommandOptions {
|
|
91
|
+
const resolved = {
|
|
92
|
+
...baseOptions,
|
|
93
|
+
modelSpec: resolveRuntimeModelSpec(adapter, baseOptions.modelSpec, providerSettings),
|
|
94
|
+
cliFeatures,
|
|
95
|
+
};
|
|
96
|
+
if (!shouldIncludeAuthEnv(baseOptions, authEnv)) return resolved;
|
|
97
|
+
return { ...resolved, authEnv };
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function shouldIncludeAuthEnv(
|
|
101
|
+
baseOptions: BuildProviderCommandOptions,
|
|
102
|
+
authEnv: Readonly<Record<string, string>>
|
|
103
|
+
): boolean {
|
|
104
|
+
return baseOptions.authEnv !== undefined || Object.keys(authEnv).length > 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function resolveRuntimeModelSpec(
|
|
108
|
+
adapter: ProviderAdapter,
|
|
109
|
+
explicit: ModelSpec | undefined,
|
|
110
|
+
providerSettings: RuntimeProviderSettings
|
|
111
|
+
): ModelSpec {
|
|
112
|
+
if (explicit?.model !== undefined) {
|
|
113
|
+
adapter.validateModelId(explicit.model);
|
|
114
|
+
return explicit;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const level = explicit?.level ?? providerSettings.defaultLevel ?? adapter.defaultLevel;
|
|
118
|
+
const resolved = adapter.resolveModelSpec(level, providerSettings.levelOverrides);
|
|
119
|
+
const modelSpec = modelSpecFromResolved(resolved);
|
|
120
|
+
if (explicit?.reasoningEffort === undefined) return modelSpec;
|
|
121
|
+
return { ...modelSpec, reasoningEffort: explicit.reasoningEffort };
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function modelSpecFromResolved(resolved: {
|
|
125
|
+
readonly level: ModelLevel;
|
|
126
|
+
readonly model: string | null;
|
|
127
|
+
readonly reasoningEffort: ReasoningEffort | undefined;
|
|
128
|
+
}): ModelSpec {
|
|
129
|
+
const result: MutableModelSpec = {
|
|
130
|
+
level: resolved.level,
|
|
131
|
+
model: resolved.model,
|
|
132
|
+
};
|
|
133
|
+
if (resolved.reasoningEffort !== undefined) result.reasoningEffort = resolved.reasoningEffort;
|
|
134
|
+
return result;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function resolveRuntimeAuthEnv(
|
|
138
|
+
provider: ProviderId,
|
|
139
|
+
settings: Record<string, unknown>
|
|
140
|
+
): Readonly<Record<string, string>> {
|
|
141
|
+
if (provider !== 'claude') return {};
|
|
142
|
+
return stringRecordFromUnknown(resolveClaudeAuthFn(settings), 'resolveClaudeAuth');
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function adapterForRuntimeInput(
|
|
146
|
+
provider: string | null | undefined,
|
|
147
|
+
settings: Record<string, unknown>
|
|
148
|
+
): ProviderAdapter {
|
|
149
|
+
const configured = provider ?? optionalString(settings.defaultProvider, 'settings.defaultProvider');
|
|
150
|
+
return getProviderAdapter(configured ?? 'claude');
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function runtimeProviderSettings(
|
|
154
|
+
settings: Record<string, unknown>,
|
|
155
|
+
provider: ProviderId
|
|
156
|
+
): RuntimeProviderSettings {
|
|
157
|
+
const allSettings = optionalRecord(settings.providerSettings, 'settings.providerSettings');
|
|
158
|
+
const providerValue = allSettings?.[provider];
|
|
159
|
+
if (providerValue === undefined) return { levelOverrides: {} };
|
|
160
|
+
const providerSettings = requiredRecord(providerValue, `settings.providerSettings.${provider}`);
|
|
161
|
+
const defaultLevel = optionalModelLevel(
|
|
162
|
+
providerSettings.defaultLevel,
|
|
163
|
+
`settings.providerSettings.${provider}.defaultLevel`
|
|
164
|
+
);
|
|
165
|
+
const levelOverrides = levelOverridesFromUnknown(
|
|
166
|
+
providerSettings.levelOverrides,
|
|
167
|
+
`settings.providerSettings.${provider}.levelOverrides`
|
|
168
|
+
);
|
|
169
|
+
if (defaultLevel === undefined) return { levelOverrides };
|
|
170
|
+
return { defaultLevel, levelOverrides };
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function runtimeHelpCommand(provider: ProviderId): CommandParts {
|
|
174
|
+
if (provider === 'claude') return getClaudeRuntimeCommand();
|
|
175
|
+
if (provider === 'codex') return { command: 'codex', args: ['exec'] };
|
|
176
|
+
if (provider === 'opencode') return { command: 'opencode', args: ['run'] };
|
|
177
|
+
return { command: 'gemini', args: [] };
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function getClaudeRuntimeCommand(): CommandParts {
|
|
181
|
+
return commandPartsFromUnknown(getClaudeCommandFn(), 'getClaudeCommand');
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function loadRuntimeSettings(): Record<string, unknown> {
|
|
185
|
+
const settings = loadSettingsFn();
|
|
186
|
+
return requiredRecord(settings, 'loadSettings');
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function moduleFunction(moduleValue: unknown, field: string): UnknownFunction {
|
|
190
|
+
const record = requiredRecord(moduleValue, 'module');
|
|
191
|
+
const value = record[field];
|
|
192
|
+
if (isUnknownFunction(value)) return value;
|
|
193
|
+
throw new Error(`Expected ${field} to be a function.`);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function isUnknownFunction(value: unknown): value is UnknownFunction {
|
|
197
|
+
return typeof value === 'function';
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function commandPartsFromUnknown(value: unknown, field: string): CommandParts {
|
|
201
|
+
const record = requiredRecord(value, field);
|
|
202
|
+
return {
|
|
203
|
+
command: requiredStringValue(record.command, `${field}.command`),
|
|
204
|
+
args: stringArray(record.args, `${field}.args`),
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
function levelOverridesFromUnknown(value: unknown, field: string): LevelOverrides {
|
|
209
|
+
if (value === undefined) return {};
|
|
210
|
+
const record = requiredRecord(value, field);
|
|
211
|
+
const result: Partial<Record<ModelLevel, ModelSpec>> = {};
|
|
212
|
+
for (const level of MODEL_LEVELS) {
|
|
213
|
+
if (record[level] !== undefined) result[level] = modelSpecFromUnknown(record[level], field);
|
|
214
|
+
}
|
|
215
|
+
return result;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function modelSpecFromUnknown(value: unknown, field: string): ModelSpec {
|
|
219
|
+
const record = requiredRecord(value, field);
|
|
220
|
+
const result: MutableModelSpec = {};
|
|
221
|
+
addModelLevel(result, record.level, `${field}.level`);
|
|
222
|
+
addModel(result, record.model, `${field}.model`);
|
|
223
|
+
addReasoningEffort(result, record.reasoningEffort, `${field}.reasoningEffort`);
|
|
224
|
+
return result;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function addModelLevel(result: MutableModelSpec, value: unknown, field: string): void {
|
|
228
|
+
const level = optionalModelLevel(value, field);
|
|
229
|
+
if (level !== undefined) result.level = level;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
function addModel(result: MutableModelSpec, value: unknown, field: string): void {
|
|
233
|
+
if (value === undefined) return;
|
|
234
|
+
if (value === null || typeof value === 'string') {
|
|
235
|
+
result.model = value;
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
throw new Error(`${field} must be a string or null.`);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
function addReasoningEffort(result: MutableModelSpec, value: unknown, field: string): void {
|
|
242
|
+
const effort = optionalReasoningEffort(value, field);
|
|
243
|
+
if (effort !== undefined) result.reasoningEffort = effort;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
function optionalModelLevel(value: unknown, field: string): ModelLevel | undefined {
|
|
247
|
+
if (value === undefined) return undefined;
|
|
248
|
+
if (value === 'level1' || value === 'level2' || value === 'level3') return value;
|
|
249
|
+
throw new Error(`${field} must be one of: ${MODEL_LEVELS.join(', ')}.`);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
function optionalReasoningEffort(value: unknown, field: string): ReasoningEffort | undefined {
|
|
253
|
+
if (value === undefined) return undefined;
|
|
254
|
+
if (value === 'low' || value === 'medium' || value === 'high' || value === 'xhigh') {
|
|
255
|
+
return value;
|
|
256
|
+
}
|
|
257
|
+
throw new Error(`${field} must be one of: ${REASONING_EFFORTS.join(', ')}.`);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
function optionalString(value: unknown, field: string): string | undefined {
|
|
261
|
+
if (value === undefined || value === null) return undefined;
|
|
262
|
+
if (typeof value === 'string') return value;
|
|
263
|
+
throw new Error(`${field} must be a string.`);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
function requiredStringValue(value: unknown, field: string): string {
|
|
267
|
+
if (typeof value === 'string' && value.length > 0) return value;
|
|
268
|
+
throw new Error(`${field} must be a non-empty string.`);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
function optionalRecord(
|
|
272
|
+
value: unknown,
|
|
273
|
+
field: string
|
|
274
|
+
): Readonly<Record<string, unknown>> | undefined {
|
|
275
|
+
if (value === undefined || value === null) return undefined;
|
|
276
|
+
return requiredRecord(value, field);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
function requiredRecord(value: unknown, field: string): Record<string, unknown> {
|
|
280
|
+
if (isRecord(value)) return value;
|
|
281
|
+
throw new Error(`${field} must be an object.`);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function stringRecordFromUnknown(
|
|
285
|
+
value: unknown,
|
|
286
|
+
field: string
|
|
287
|
+
): Readonly<Record<string, string>> {
|
|
288
|
+
if (value === undefined || value === null) return {};
|
|
289
|
+
const record = requiredRecord(value, field);
|
|
290
|
+
const result: Record<string, string> = {};
|
|
291
|
+
for (const [key, item] of Object.entries(record)) {
|
|
292
|
+
if (typeof item !== 'string') throw new Error(`${field}.${key} must be a string.`);
|
|
293
|
+
result[key] = item;
|
|
294
|
+
}
|
|
295
|
+
return result;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
function stringArray(value: unknown, field: string): readonly string[] {
|
|
299
|
+
if (!Array.isArray(value)) throw new Error(`${field} must be an array.`);
|
|
300
|
+
const result: string[] = [];
|
|
301
|
+
for (const item of value) {
|
|
302
|
+
if (typeof item !== 'string') throw new Error(`${field} entries must be strings.`);
|
|
303
|
+
result.push(item);
|
|
304
|
+
}
|
|
305
|
+
return result;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
function stringResult(value: unknown): string {
|
|
309
|
+
if (typeof value === 'string') return value;
|
|
310
|
+
throw new Error('Provider help output must be a string.');
|
|
311
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
export type ProviderId = 'claude' | 'codex' | 'gemini' | 'opencode';
|
|
2
|
+
export type ProviderAlias = 'anthropic' | 'openai' | 'google';
|
|
3
|
+
export type KnownProviderName = ProviderId | ProviderAlias;
|
|
4
|
+
export type ModelLevel = 'level1' | 'level2' | 'level3';
|
|
5
|
+
export type ReasoningEffort = 'low' | 'medium' | 'high' | 'xhigh';
|
|
6
|
+
export type OutputFormat = 'text' | 'json' | 'stream-json';
|
|
7
|
+
|
|
8
|
+
export interface AgentCliProviderHelperMetadata {
|
|
9
|
+
readonly packageName: '@the-open-engine/zeroshot';
|
|
10
|
+
readonly buildOutputDir: 'lib/agent-cli-provider';
|
|
11
|
+
readonly contractVersion: 1;
|
|
12
|
+
readonly adapterVersion: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ModelCatalogEntry {
|
|
16
|
+
readonly rank: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface LevelModelSpec {
|
|
20
|
+
readonly rank: number;
|
|
21
|
+
readonly model: string | null;
|
|
22
|
+
readonly reasoningEffort?: ReasoningEffort;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ModelSpec {
|
|
26
|
+
readonly level?: ModelLevel;
|
|
27
|
+
readonly model?: string | null;
|
|
28
|
+
readonly reasoningEffort?: ReasoningEffort;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface ResolvedModelSpec {
|
|
32
|
+
readonly level: ModelLevel;
|
|
33
|
+
readonly model: string | null;
|
|
34
|
+
readonly reasoningEffort: ReasoningEffort | undefined;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type LevelOverrides = Readonly<Partial<Record<ModelLevel, ModelSpec>>>;
|
|
38
|
+
|
|
39
|
+
export interface BaseCliFeatures {
|
|
40
|
+
readonly provider?: ProviderId;
|
|
41
|
+
readonly unknown?: boolean;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface ClaudeCliFeatures extends BaseCliFeatures {
|
|
45
|
+
readonly provider: 'claude';
|
|
46
|
+
readonly supportsOutputFormat: boolean;
|
|
47
|
+
readonly supportsStreamJson: boolean;
|
|
48
|
+
readonly supportsJsonSchema: boolean;
|
|
49
|
+
readonly supportsAutoApprove: boolean;
|
|
50
|
+
readonly supportsIncludePartials: boolean;
|
|
51
|
+
readonly supportsVerbose: boolean;
|
|
52
|
+
readonly supportsModel: boolean;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface CodexCliFeatures extends BaseCliFeatures {
|
|
56
|
+
readonly provider: 'codex';
|
|
57
|
+
readonly supportsJson: boolean;
|
|
58
|
+
readonly supportsOutputSchema: boolean;
|
|
59
|
+
readonly supportsAutoApprove: boolean;
|
|
60
|
+
readonly supportsCwd: boolean;
|
|
61
|
+
readonly supportsConfigOverride: boolean;
|
|
62
|
+
readonly supportsModel: boolean;
|
|
63
|
+
readonly supportsSkipGitRepoCheck: boolean;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface GeminiCliFeatures extends BaseCliFeatures {
|
|
67
|
+
readonly provider: 'gemini';
|
|
68
|
+
readonly supportsStreamJson: boolean;
|
|
69
|
+
readonly supportsAutoApprove: boolean;
|
|
70
|
+
readonly supportsCwd: boolean;
|
|
71
|
+
readonly supportsModel: boolean;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface OpencodeCliFeatures extends BaseCliFeatures {
|
|
75
|
+
readonly provider: 'opencode';
|
|
76
|
+
readonly supportsJson: boolean;
|
|
77
|
+
readonly supportsModel: boolean;
|
|
78
|
+
readonly supportsVariant: boolean;
|
|
79
|
+
readonly supportsCwd: boolean;
|
|
80
|
+
readonly supportsAutoApprove: false;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export type ProviderCliFeatures =
|
|
84
|
+
| ClaudeCliFeatures
|
|
85
|
+
| CodexCliFeatures
|
|
86
|
+
| GeminiCliFeatures
|
|
87
|
+
| OpencodeCliFeatures;
|
|
88
|
+
|
|
89
|
+
export interface CliFeatureOverrides {
|
|
90
|
+
readonly supportsOutputFormat?: boolean;
|
|
91
|
+
readonly supportsStreamJson?: boolean;
|
|
92
|
+
readonly supportsJsonSchema?: boolean;
|
|
93
|
+
readonly supportsAutoApprove?: boolean;
|
|
94
|
+
readonly supportsIncludePartials?: boolean;
|
|
95
|
+
readonly supportsVerbose?: boolean;
|
|
96
|
+
readonly supportsModel?: boolean;
|
|
97
|
+
readonly supportsJson?: boolean;
|
|
98
|
+
readonly supportsOutputSchema?: boolean;
|
|
99
|
+
readonly supportsCwd?: boolean;
|
|
100
|
+
readonly supportsConfigOverride?: boolean;
|
|
101
|
+
readonly supportsSkipGitRepoCheck?: boolean;
|
|
102
|
+
readonly supportsVariant?: boolean;
|
|
103
|
+
readonly unknown?: boolean;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface CleanupMetadata {
|
|
107
|
+
readonly kind: 'temp-file';
|
|
108
|
+
readonly provider: ProviderId;
|
|
109
|
+
readonly path: string;
|
|
110
|
+
readonly reason: 'output-schema';
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface WarningMetadata {
|
|
114
|
+
readonly provider: ProviderId;
|
|
115
|
+
readonly code: string;
|
|
116
|
+
readonly message: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface RedactionMetadata {
|
|
120
|
+
readonly kind: 'env' | 'secret-key' | 'secret-value';
|
|
121
|
+
readonly key: string;
|
|
122
|
+
readonly source?: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface CommandSpec {
|
|
126
|
+
readonly binary: string;
|
|
127
|
+
readonly args: readonly string[];
|
|
128
|
+
readonly env: Readonly<Record<string, string>>;
|
|
129
|
+
readonly cwd?: string;
|
|
130
|
+
readonly cleanup?: readonly string[];
|
|
131
|
+
readonly cleanupMetadata: readonly CleanupMetadata[];
|
|
132
|
+
readonly warnings: readonly WarningMetadata[];
|
|
133
|
+
readonly redactions: readonly RedactionMetadata[];
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface BuildProviderCommandOptions {
|
|
137
|
+
readonly modelSpec?: ModelSpec;
|
|
138
|
+
readonly outputFormat?: OutputFormat;
|
|
139
|
+
readonly jsonSchema?: unknown;
|
|
140
|
+
readonly cwd?: string;
|
|
141
|
+
readonly autoApprove?: boolean;
|
|
142
|
+
readonly resumeSessionId?: string;
|
|
143
|
+
readonly continueSession?: boolean;
|
|
144
|
+
readonly cliFeatures?: CliFeatureOverrides;
|
|
145
|
+
readonly authEnv?: Readonly<Record<string, string>>;
|
|
146
|
+
readonly strictSchema?: boolean;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface TextEvent {
|
|
150
|
+
readonly type: 'text';
|
|
151
|
+
readonly text: string;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface ThinkingEvent {
|
|
155
|
+
readonly type: 'thinking';
|
|
156
|
+
readonly text: string;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface ToolCallEvent {
|
|
160
|
+
readonly type: 'tool_call';
|
|
161
|
+
readonly toolName: string | null | undefined;
|
|
162
|
+
readonly toolId: string | null | undefined;
|
|
163
|
+
readonly input: unknown;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export interface ToolResultEvent {
|
|
167
|
+
readonly type: 'tool_result';
|
|
168
|
+
readonly toolId: string | null | undefined;
|
|
169
|
+
readonly content: unknown;
|
|
170
|
+
readonly isError: unknown;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface ResultEvent {
|
|
174
|
+
readonly type: 'result';
|
|
175
|
+
readonly success: boolean;
|
|
176
|
+
readonly result?: unknown;
|
|
177
|
+
readonly error?: unknown;
|
|
178
|
+
readonly cost?: unknown;
|
|
179
|
+
readonly duration?: unknown;
|
|
180
|
+
readonly inputTokens?: number;
|
|
181
|
+
readonly outputTokens?: number;
|
|
182
|
+
readonly cacheReadInputTokens?: number;
|
|
183
|
+
readonly cacheCreationInputTokens?: number;
|
|
184
|
+
readonly modelUsage?: unknown;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export type OutputEvent = TextEvent | ThinkingEvent | ToolCallEvent | ToolResultEvent | ResultEvent;
|
|
188
|
+
|
|
189
|
+
export type ProviderParseResult = OutputEvent | readonly OutputEvent[] | null;
|
|
190
|
+
|
|
191
|
+
export interface ProviderParserState {
|
|
192
|
+
provider: ProviderId;
|
|
193
|
+
lastToolId: string | null | undefined;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export type ErrorClassificationKind =
|
|
197
|
+
| 'status-retryable'
|
|
198
|
+
| 'status-permanent'
|
|
199
|
+
| 'code-retryable'
|
|
200
|
+
| 'permanent-pattern'
|
|
201
|
+
| 'retryable-pattern'
|
|
202
|
+
| 'unknown-retryable';
|
|
203
|
+
|
|
204
|
+
export interface ErrorClassification {
|
|
205
|
+
readonly retryable: boolean;
|
|
206
|
+
readonly kind: ErrorClassificationKind;
|
|
207
|
+
readonly matchedPattern?: string;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export interface ProviderAdapter {
|
|
211
|
+
readonly id: ProviderId;
|
|
212
|
+
readonly displayName: string;
|
|
213
|
+
readonly binary: string;
|
|
214
|
+
readonly adapterVersion: string;
|
|
215
|
+
readonly credentialEnvKeys: readonly string[];
|
|
216
|
+
readonly modelCatalog: Readonly<Record<string, ModelCatalogEntry>>;
|
|
217
|
+
readonly levelMapping: Readonly<Record<ModelLevel, LevelModelSpec>>;
|
|
218
|
+
readonly defaultLevel: ModelLevel;
|
|
219
|
+
readonly defaultMaxLevel: ModelLevel;
|
|
220
|
+
readonly defaultMinLevel: ModelLevel;
|
|
221
|
+
detectCliFeatures(helpText?: string | null): ProviderCliFeatures;
|
|
222
|
+
buildCommand(context: string, options?: BuildProviderCommandOptions): CommandSpec;
|
|
223
|
+
parseEvent(line: string, state: ProviderParserState): ProviderParseResult;
|
|
224
|
+
createParserState(): ProviderParserState;
|
|
225
|
+
resolveModelSpec(level: ModelLevel, overrides?: LevelOverrides): ResolvedModelSpec;
|
|
226
|
+
validateModelId(modelId: string | null | undefined): string | null | undefined;
|
|
227
|
+
classifyError(error: unknown): ErrorClassification;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export class InvalidProviderModelError extends Error {
|
|
231
|
+
readonly permanent = true;
|
|
232
|
+
|
|
233
|
+
constructor(message: string) {
|
|
234
|
+
super(message);
|
|
235
|
+
this.name = 'InvalidProviderModelError';
|
|
236
|
+
}
|
|
237
|
+
}
|