pi-improve-interation 0.0.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/LICENSE +21 -0
- package/README.en.md +57 -0
- package/README.md +57 -0
- package/extensions/plus.ts +93 -0
- package/node_modules/acorn/CHANGELOG.md +998 -0
- package/node_modules/acorn/LICENSE +21 -0
- package/node_modules/acorn/README.md +309 -0
- package/node_modules/acorn/bin/acorn +4 -0
- package/node_modules/acorn/dist/acorn.d.mts +897 -0
- package/node_modules/acorn/dist/acorn.d.ts +897 -0
- package/node_modules/acorn/dist/acorn.js +6342 -0
- package/node_modules/acorn/dist/acorn.mjs +6313 -0
- package/node_modules/acorn/dist/bin.js +90 -0
- package/node_modules/acorn/package.json +50 -0
- package/node_modules/jiti/LICENSE +21 -0
- package/node_modules/jiti/README.md +258 -0
- package/node_modules/jiti/dist/babel.cjs +257 -0
- package/node_modules/jiti/dist/jiti.cjs +1 -0
- package/node_modules/jiti/lib/jiti-cli.mjs +34 -0
- package/node_modules/jiti/lib/jiti-hooks.mjs +124 -0
- package/node_modules/jiti/lib/jiti-native.mjs +121 -0
- package/node_modules/jiti/lib/jiti-register.d.mts +1 -0
- package/node_modules/jiti/lib/jiti-register.mjs +4 -0
- package/node_modules/jiti/lib/jiti-static.mjs +23 -0
- package/node_modules/jiti/lib/jiti.cjs +30 -0
- package/node_modules/jiti/lib/jiti.d.cts +8 -0
- package/node_modules/jiti/lib/jiti.d.mts +8 -0
- package/node_modules/jiti/lib/jiti.mjs +29 -0
- package/node_modules/jiti/lib/types.d.ts +420 -0
- package/node_modules/jiti/package.json +146 -0
- package/node_modules/pi-subagents/CHANGELOG.md +2282 -0
- package/node_modules/pi-subagents/LICENSE +21 -0
- package/node_modules/pi-subagents/README.md +126 -0
- package/node_modules/pi-subagents/agents/claude-code-writer.md +15 -0
- package/node_modules/pi-subagents/agents/claude-code.md +15 -0
- package/node_modules/pi-subagents/agents/codex-exec-writer.md +15 -0
- package/node_modules/pi-subagents/agents/codex-exec.md +15 -0
- package/node_modules/pi-subagents/agents/cursor-agent-writer.md +14 -0
- package/node_modules/pi-subagents/agents/cursor-agent.md +14 -0
- package/node_modules/pi-subagents/agents/delegate.md +14 -0
- package/node_modules/pi-subagents/agents/oracle.md +78 -0
- package/node_modules/pi-subagents/agents/researcher.md +52 -0
- package/node_modules/pi-subagents/agents/reviewer.md +89 -0
- package/node_modules/pi-subagents/agents/scout.md +50 -0
- package/node_modules/pi-subagents/agents/worker.md +59 -0
- package/node_modules/pi-subagents/async-retention-discovery-worker.mjs +180 -0
- package/node_modules/pi-subagents/docs/agents.md +492 -0
- package/node_modules/pi-subagents/docs/configuration.md +508 -0
- package/node_modules/pi-subagents/docs/extension-api.md +443 -0
- package/node_modules/pi-subagents/docs/missions.md +121 -0
- package/node_modules/pi-subagents/docs/models.md +258 -0
- package/node_modules/pi-subagents/docs/observability.md +262 -0
- package/node_modules/pi-subagents/docs/tool-reference.md +482 -0
- package/node_modules/pi-subagents/docs/watchdog.md +176 -0
- package/node_modules/pi-subagents/docs/workflows.md +475 -0
- package/node_modules/pi-subagents/index.ts +10 -0
- package/node_modules/pi-subagents/inspector-runner.mjs +11 -0
- package/node_modules/pi-subagents/install.mjs +93 -0
- package/node_modules/pi-subagents/package.json +109 -0
- package/node_modules/pi-subagents/prompts/council.md +60 -0
- package/node_modules/pi-subagents/prompts/gather-context-and-clarify.md +13 -0
- package/node_modules/pi-subagents/prompts/parallel-cleanup.md +59 -0
- package/node_modules/pi-subagents/prompts/parallel-research.md +50 -0
- package/node_modules/pi-subagents/prompts/parallel-review.md +58 -0
- package/node_modules/pi-subagents/prompts/review-loop.md +47 -0
- package/node_modules/pi-subagents/skills/council-mode/SKILL.md +59 -0
- package/node_modules/pi-subagents/skills/council-mode/references/pass-contracts.md +150 -0
- package/node_modules/pi-subagents/skills/pi-subagents/SKILL.md +103 -0
- package/node_modules/pi-subagents/skills/pi-subagents/references/constraints-and-recipes.md +70 -0
- package/node_modules/pi-subagents/skills/pi-subagents/references/execution-controls.md +538 -0
- package/node_modules/pi-subagents/skills/pi-subagents/references/management-authoring-rpc.md +161 -0
- package/node_modules/pi-subagents/skills/pi-subagents/references/multi-lane-orchestration.md +51 -0
- package/node_modules/pi-subagents/skills/pi-subagents/references/prompting-and-roles.md +295 -0
- package/node_modules/pi-subagents/skills/pi-subagents/references/review-and-validation.md +73 -0
- package/node_modules/pi-subagents/src/agents/agent-management.ts +1355 -0
- package/node_modules/pi-subagents/src/agents/agent-memory.ts +254 -0
- package/node_modules/pi-subagents/src/agents/agent-refinements.ts +624 -0
- package/node_modules/pi-subagents/src/agents/agent-scope.ts +6 -0
- package/node_modules/pi-subagents/src/agents/agent-selection.ts +25 -0
- package/node_modules/pi-subagents/src/agents/agent-serializer.ts +179 -0
- package/node_modules/pi-subagents/src/agents/agents.ts +2808 -0
- package/node_modules/pi-subagents/src/agents/builtin-names.ts +15 -0
- package/node_modules/pi-subagents/src/agents/chain-serializer.ts +280 -0
- package/node_modules/pi-subagents/src/agents/frontmatter.ts +153 -0
- package/node_modules/pi-subagents/src/agents/identity.ts +30 -0
- package/node_modules/pi-subagents/src/agents/proactive-skills.ts +194 -0
- package/node_modules/pi-subagents/src/agents/runtime-agent-events.ts +70 -0
- package/node_modules/pi-subagents/src/agents/runtime-agent-registry.ts +429 -0
- package/node_modules/pi-subagents/src/agents/skills.ts +754 -0
- package/node_modules/pi-subagents/src/api/agents.ts +12 -0
- package/node_modules/pi-subagents/src/api/background-work.ts +206 -0
- package/node_modules/pi-subagents/src/api/capability-ceiling.ts +17 -0
- package/node_modules/pi-subagents/src/api/control-channel.ts +4 -0
- package/node_modules/pi-subagents/src/api/delegation.ts +112 -0
- package/node_modules/pi-subagents/src/api/external-job-provider.ts +195 -0
- package/node_modules/pi-subagents/src/api/external-runs.ts +282 -0
- package/node_modules/pi-subagents/src/api/intercom-bridge.ts +3 -0
- package/node_modules/pi-subagents/src/api/pi-args.ts +5 -0
- package/node_modules/pi-subagents/src/api/preflight.ts +501 -0
- package/node_modules/pi-subagents/src/api/project-panes.ts +32 -0
- package/node_modules/pi-subagents/src/api/shared-types.ts +24 -0
- package/node_modules/pi-subagents/src/extension/config.ts +235 -0
- package/node_modules/pi-subagents/src/extension/control-notices.ts +58 -0
- package/node_modules/pi-subagents/src/extension/doctor.ts +278 -0
- package/node_modules/pi-subagents/src/extension/fanout-child.ts +205 -0
- package/node_modules/pi-subagents/src/extension/index.ts +1093 -0
- package/node_modules/pi-subagents/src/extension/public-execution.ts +210 -0
- package/node_modules/pi-subagents/src/extension/rpc.ts +860 -0
- package/node_modules/pi-subagents/src/extension/schemas.ts +419 -0
- package/node_modules/pi-subagents/src/extension/steering-notices.ts +35 -0
- package/node_modules/pi-subagents/src/extension/subagent-guide.ts +39 -0
- package/node_modules/pi-subagents/src/extension/tool-description.ts +221 -0
- package/node_modules/pi-subagents/src/extension/tool-result.ts +19 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/actions.ts +235 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/client.ts +130 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/focus.ts +55 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/inspector-runner.ts +147 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/project-panes.ts +730 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/session-roots-codec.ts +42 -0
- package/node_modules/pi-subagents/src/inspectors/herdr/shell-command.ts +16 -0
- package/node_modules/pi-subagents/src/integrations/herdr-status.ts +400 -0
- package/node_modules/pi-subagents/src/intercom/intercom-bridge.ts +191 -0
- package/node_modules/pi-subagents/src/intercom/native-supervisor-channel.ts +812 -0
- package/node_modules/pi-subagents/src/intercom/result-intercom.ts +423 -0
- package/node_modules/pi-subagents/src/missions/actions.ts +433 -0
- package/node_modules/pi-subagents/src/missions/goal-driver.ts +164 -0
- package/node_modules/pi-subagents/src/missions/lifecycle.ts +367 -0
- package/node_modules/pi-subagents/src/missions/store.ts +584 -0
- package/node_modules/pi-subagents/src/missions/types.ts +190 -0
- package/node_modules/pi-subagents/src/missions/workflow-state.ts +260 -0
- package/node_modules/pi-subagents/src/policy/authority.ts +46 -0
- package/node_modules/pi-subagents/src/profiles/profiles.ts +662 -0
- package/node_modules/pi-subagents/src/runs/background/active-async-capacity.ts +517 -0
- package/node_modules/pi-subagents/src/runs/background/active-run-index.ts +139 -0
- package/node_modules/pi-subagents/src/runs/background/async-execution.ts +2031 -0
- package/node_modules/pi-subagents/src/runs/background/async-job-tracker.ts +781 -0
- package/node_modules/pi-subagents/src/runs/background/async-resume.ts +628 -0
- package/node_modules/pi-subagents/src/runs/background/async-retention.ts +903 -0
- package/node_modules/pi-subagents/src/runs/background/async-status-snapshot.ts +48 -0
- package/node_modules/pi-subagents/src/runs/background/async-status.ts +736 -0
- package/node_modules/pi-subagents/src/runs/background/auto-drain.ts +68 -0
- package/node_modules/pi-subagents/src/runs/background/chain-append.ts +321 -0
- package/node_modules/pi-subagents/src/runs/background/chain-root-attachment.ts +270 -0
- package/node_modules/pi-subagents/src/runs/background/completion-batcher.ts +168 -0
- package/node_modules/pi-subagents/src/runs/background/completion-dedupe.ts +58 -0
- package/node_modules/pi-subagents/src/runs/background/completion-replay.ts +287 -0
- package/node_modules/pi-subagents/src/runs/background/control-channel.ts +768 -0
- package/node_modules/pi-subagents/src/runs/background/fleet-view.ts +620 -0
- package/node_modules/pi-subagents/src/runs/background/index-segment.ts +59 -0
- package/node_modules/pi-subagents/src/runs/background/inspect-rpc.ts +443 -0
- package/node_modules/pi-subagents/src/runs/background/notify.ts +594 -0
- package/node_modules/pi-subagents/src/runs/background/owned-process-tree.ts +104 -0
- package/node_modules/pi-subagents/src/runs/background/parallel-groups.ts +45 -0
- package/node_modules/pi-subagents/src/runs/background/process-terminal.ts +310 -0
- package/node_modules/pi-subagents/src/runs/background/result-delivery-ownership.ts +45 -0
- package/node_modules/pi-subagents/src/runs/background/result-files.ts +519 -0
- package/node_modules/pi-subagents/src/runs/background/result-watcher.ts +792 -0
- package/node_modules/pi-subagents/src/runs/background/resume-guidance.ts +56 -0
- package/node_modules/pi-subagents/src/runs/background/retained-children.ts +135 -0
- package/node_modules/pi-subagents/src/runs/background/run-id-query.ts +7 -0
- package/node_modules/pi-subagents/src/runs/background/run-id-resolver.ts +175 -0
- package/node_modules/pi-subagents/src/runs/background/run-status.ts +694 -0
- package/node_modules/pi-subagents/src/runs/background/scheduled-runs.ts +965 -0
- package/node_modules/pi-subagents/src/runs/background/stale-run-reconciler.ts +410 -0
- package/node_modules/pi-subagents/src/runs/background/steering.ts +242 -0
- package/node_modules/pi-subagents/src/runs/background/subagent-runner.ts +5649 -0
- package/node_modules/pi-subagents/src/runs/background/subagent-wait.ts +725 -0
- package/node_modules/pi-subagents/src/runs/background/terminal-run-index.ts +138 -0
- package/node_modules/pi-subagents/src/runs/background/top-level-async.ts +14 -0
- package/node_modules/pi-subagents/src/runs/background/wait-completions.ts +196 -0
- package/node_modules/pi-subagents/src/runs/background/wait-config.ts +50 -0
- package/node_modules/pi-subagents/src/runs/background/wait-subscriptions.ts +348 -0
- package/node_modules/pi-subagents/src/runs/background/wait-tool.ts +43 -0
- package/node_modules/pi-subagents/src/runs/foreground/async-dismiss-action.ts +86 -0
- package/node_modules/pi-subagents/src/runs/foreground/async-steering-action.ts +262 -0
- package/node_modules/pi-subagents/src/runs/foreground/async-stop-action.ts +86 -0
- package/node_modules/pi-subagents/src/runs/foreground/execution.ts +2437 -0
- package/node_modules/pi-subagents/src/runs/foreground/foreground-control.ts +153 -0
- package/node_modules/pi-subagents/src/runs/foreground/foreground-history.ts +160 -0
- package/node_modules/pi-subagents/src/runs/foreground/prompt-audit.ts +172 -0
- package/node_modules/pi-subagents/src/runs/foreground/subagent-executor.ts +6916 -0
- package/node_modules/pi-subagents/src/runs/foreground/workflow-detach-reconcile.ts +299 -0
- package/node_modules/pi-subagents/src/runs/foreground/workflow-foreground-steering.ts +188 -0
- package/node_modules/pi-subagents/src/runs/shared/abort-recovery.ts +119 -0
- package/node_modules/pi-subagents/src/runs/shared/acceptance.ts +1509 -0
- package/node_modules/pi-subagents/src/runs/shared/agent-contract.ts +38 -0
- package/node_modules/pi-subagents/src/runs/shared/async-status-projection.ts +597 -0
- package/node_modules/pi-subagents/src/runs/shared/background-process-options.ts +9 -0
- package/node_modules/pi-subagents/src/runs/shared/capability-ceiling.ts +210 -0
- package/node_modules/pi-subagents/src/runs/shared/chain-outputs.ts +116 -0
- package/node_modules/pi-subagents/src/runs/shared/child-identity.ts +51 -0
- package/node_modules/pi-subagents/src/runs/shared/child-launch-plan.ts +151 -0
- package/node_modules/pi-subagents/src/runs/shared/child-protocol.ts +415 -0
- package/node_modules/pi-subagents/src/runs/shared/claude-code-adapter.ts +129 -0
- package/node_modules/pi-subagents/src/runs/shared/codex-exec-adapter.ts +129 -0
- package/node_modules/pi-subagents/src/runs/shared/completion-evidence.ts +89 -0
- package/node_modules/pi-subagents/src/runs/shared/completion-guard.ts +252 -0
- package/node_modules/pi-subagents/src/runs/shared/context-mode.ts +44 -0
- package/node_modules/pi-subagents/src/runs/shared/cursor-agent-adapter.ts +114 -0
- package/node_modules/pi-subagents/src/runs/shared/dynamic-fanout.ts +297 -0
- package/node_modules/pi-subagents/src/runs/shared/extension-bindings.ts +78 -0
- package/node_modules/pi-subagents/src/runs/shared/external-cli-contract.ts +167 -0
- package/node_modules/pi-subagents/src/runs/shared/external-cli-preflight.ts +122 -0
- package/node_modules/pi-subagents/src/runs/shared/external-cli-runner.ts +429 -0
- package/node_modules/pi-subagents/src/runs/shared/external-job-bridge.ts +460 -0
- package/node_modules/pi-subagents/src/runs/shared/external-job-runner.ts +389 -0
- package/node_modules/pi-subagents/src/runs/shared/fast-mode-extension.ts +10 -0
- package/node_modules/pi-subagents/src/runs/shared/host-step-status.ts +231 -0
- package/node_modules/pi-subagents/src/runs/shared/lane-metadata.ts +105 -0
- package/node_modules/pi-subagents/src/runs/shared/launch-cwd.ts +16 -0
- package/node_modules/pi-subagents/src/runs/shared/llm-intent-arbiter.ts +302 -0
- package/node_modules/pi-subagents/src/runs/shared/long-running-guard.ts +221 -0
- package/node_modules/pi-subagents/src/runs/shared/mcp-config-sources.ts +422 -0
- package/node_modules/pi-subagents/src/runs/shared/mcp-direct-tool-allowlist.ts +483 -0
- package/node_modules/pi-subagents/src/runs/shared/mcp-direct-tool-grant.ts +194 -0
- package/node_modules/pi-subagents/src/runs/shared/model-exclusions.ts +305 -0
- package/node_modules/pi-subagents/src/runs/shared/model-fallback.ts +578 -0
- package/node_modules/pi-subagents/src/runs/shared/model-scope.ts +205 -0
- package/node_modules/pi-subagents/src/runs/shared/mutation-evidence.ts +199 -0
- package/node_modules/pi-subagents/src/runs/shared/nested-events.ts +1086 -0
- package/node_modules/pi-subagents/src/runs/shared/nested-path.ts +52 -0
- package/node_modules/pi-subagents/src/runs/shared/nested-render.ts +127 -0
- package/node_modules/pi-subagents/src/runs/shared/orca-progress-tabs.ts +499 -0
- package/node_modules/pi-subagents/src/runs/shared/parallel-handoff.ts +692 -0
- package/node_modules/pi-subagents/src/runs/shared/parallel-utils.ts +275 -0
- package/node_modules/pi-subagents/src/runs/shared/permissions.ts +99 -0
- package/node_modules/pi-subagents/src/runs/shared/pi-args.ts +1056 -0
- package/node_modules/pi-subagents/src/runs/shared/pi-spawn.ts +197 -0
- package/node_modules/pi-subagents/src/runs/shared/process-signal.ts +32 -0
- package/node_modules/pi-subagents/src/runs/shared/run-fanout-budget.ts +280 -0
- package/node_modules/pi-subagents/src/runs/shared/run-history.ts +201 -0
- package/node_modules/pi-subagents/src/runs/shared/runtime-acknowledged-extensions.ts +71 -0
- package/node_modules/pi-subagents/src/runs/shared/session-lease.ts +293 -0
- package/node_modules/pi-subagents/src/runs/shared/single-output.ts +304 -0
- package/node_modules/pi-subagents/src/runs/shared/spawn-budget.ts +128 -0
- package/node_modules/pi-subagents/src/runs/shared/structured-output.ts +223 -0
- package/node_modules/pi-subagents/src/runs/shared/subagent-control.ts +290 -0
- package/node_modules/pi-subagents/src/runs/shared/subagent-prompt-runtime.ts +824 -0
- package/node_modules/pi-subagents/src/runs/shared/subagent-startup-retry.ts +116 -0
- package/node_modules/pi-subagents/src/runs/shared/task-intent.ts +208 -0
- package/node_modules/pi-subagents/src/runs/shared/tool-availability.ts +81 -0
- package/node_modules/pi-subagents/src/runs/shared/tool-budget.ts +80 -0
- package/node_modules/pi-subagents/src/runs/shared/tool-timeout.ts +93 -0
- package/node_modules/pi-subagents/src/runs/shared/usage-budget.ts +65 -0
- package/node_modules/pi-subagents/src/runs/shared/workflow-graph.ts +225 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree-cleanup-plan.ts +847 -0
- package/node_modules/pi-subagents/src/runs/shared/worktree.ts +802 -0
- package/node_modules/pi-subagents/src/shared/accessible-dir.ts +47 -0
- package/node_modules/pi-subagents/src/shared/agent-stream-options.ts +5 -0
- package/node_modules/pi-subagents/src/shared/artifacts.ts +281 -0
- package/node_modules/pi-subagents/src/shared/atomic-json.ts +83 -0
- package/node_modules/pi-subagents/src/shared/capacity-resilient-json.ts +102 -0
- package/node_modules/pi-subagents/src/shared/child-session-name.ts +46 -0
- package/node_modules/pi-subagents/src/shared/child-transcript.ts +264 -0
- package/node_modules/pi-subagents/src/shared/completion-owner.ts +14 -0
- package/node_modules/pi-subagents/src/shared/display-text.ts +150 -0
- package/node_modules/pi-subagents/src/shared/extension-context.ts +24 -0
- package/node_modules/pi-subagents/src/shared/file-coalescer.ts +49 -0
- package/node_modules/pi-subagents/src/shared/file-system-retry.ts +95 -0
- package/node_modules/pi-subagents/src/shared/fork-context.ts +293 -0
- package/node_modules/pi-subagents/src/shared/fork-session-cwd.ts +27 -0
- package/node_modules/pi-subagents/src/shared/formatters.ts +146 -0
- package/node_modules/pi-subagents/src/shared/jsonl-writer.ts +81 -0
- package/node_modules/pi-subagents/src/shared/launch-contract.ts +138 -0
- package/node_modules/pi-subagents/src/shared/model-info.ts +101 -0
- package/node_modules/pi-subagents/src/shared/node-executable.ts +21 -0
- package/node_modules/pi-subagents/src/shared/post-exit-stdio-guard.ts +85 -0
- package/node_modules/pi-subagents/src/shared/prompt-resources.ts +11 -0
- package/node_modules/pi-subagents/src/shared/pruned-fork.ts +450 -0
- package/node_modules/pi-subagents/src/shared/session-file-trust.ts +19 -0
- package/node_modules/pi-subagents/src/shared/session-identity.ts +10 -0
- package/node_modules/pi-subagents/src/shared/session-tokens.ts +55 -0
- package/node_modules/pi-subagents/src/shared/settings.ts +409 -0
- package/node_modules/pi-subagents/src/shared/shortcuts.ts +17 -0
- package/node_modules/pi-subagents/src/shared/status-format.ts +55 -0
- package/node_modules/pi-subagents/src/shared/thinking-ceiling.ts +52 -0
- package/node_modules/pi-subagents/src/shared/types.ts +2836 -0
- package/node_modules/pi-subagents/src/shared/utf8.ts +11 -0
- package/node_modules/pi-subagents/src/shared/utils.ts +590 -0
- package/node_modules/pi-subagents/src/shared/watch-strategy.ts +10 -0
- package/node_modules/pi-subagents/src/shared/workflow-child-permit.ts +207 -0
- package/node_modules/pi-subagents/src/slash/delegation-adapters.ts +426 -0
- package/node_modules/pi-subagents/src/slash/delegation-json.ts +108 -0
- package/node_modules/pi-subagents/src/slash/delegation-request.ts +162 -0
- package/node_modules/pi-subagents/src/slash/prompt-template-bridge.ts +419 -0
- package/node_modules/pi-subagents/src/slash/prompt-workflows.ts +287 -0
- package/node_modules/pi-subagents/src/slash/selector.ts +147 -0
- package/node_modules/pi-subagents/src/slash/slash-bridge.ts +192 -0
- package/node_modules/pi-subagents/src/slash/slash-commands.ts +1336 -0
- package/node_modules/pi-subagents/src/slash/slash-live-state.ts +310 -0
- package/node_modules/pi-subagents/src/slash/subagents-admin.ts +437 -0
- package/node_modules/pi-subagents/src/tui/fleet-status.ts +905 -0
- package/node_modules/pi-subagents/src/tui/fleet-transcript.ts +536 -0
- package/node_modules/pi-subagents/src/tui/fleet.ts +1436 -0
- package/node_modules/pi-subagents/src/tui/render-helpers.ts +111 -0
- package/node_modules/pi-subagents/src/tui/render.ts +3146 -0
- package/node_modules/pi-subagents/src/types/pi-runtime-compat.d.ts +8 -0
- package/node_modules/pi-subagents/src/watchdog/change-signature.ts +260 -0
- package/node_modules/pi-subagents/src/watchdog/child-status.ts +205 -0
- package/node_modules/pi-subagents/src/watchdog/emission-guard.ts +123 -0
- package/node_modules/pi-subagents/src/watchdog/lsp-diagnostics.ts +538 -0
- package/node_modules/pi-subagents/src/watchdog/model-selection.ts +167 -0
- package/node_modules/pi-subagents/src/watchdog/permission-arbiter.ts +154 -0
- package/node_modules/pi-subagents/src/watchdog/register-child.ts +117 -0
- package/node_modules/pi-subagents/src/watchdog/register-main.ts +440 -0
- package/node_modules/pi-subagents/src/watchdog/render.ts +54 -0
- package/node_modules/pi-subagents/src/watchdog/review.ts +303 -0
- package/node_modules/pi-subagents/src/watchdog/runtime.ts +868 -0
- package/node_modules/pi-subagents/src/watchdog/scope.ts +62 -0
- package/node_modules/pi-subagents/src/watchdog/settings.ts +568 -0
- package/node_modules/pi-subagents/src/watchdog/tool-actions.ts +155 -0
- package/node_modules/pi-subagents/src/watchdog/turn-delta.ts +161 -0
- package/node_modules/pi-subagents/src/watchdog/types.ts +198 -0
- package/node_modules/pi-subagents/src/watchdog/warning-format.ts +73 -0
- package/node_modules/pi-subagents/src/workflows/chat-progress.ts +151 -0
- package/node_modules/pi-subagents/src/workflows/host-command.ts +235 -0
- package/node_modules/pi-subagents/src/workflows/scripted-workflow.ts +2183 -0
- package/node_modules/pi-subagents/src/workflows/workflow-child-summary.ts +121 -0
- package/node_modules/pi-subagents/src/workflows/workflow-preflight.ts +270 -0
- package/node_modules/pi-subagents/src/workflows/workflow-receipt.ts +366 -0
- package/node_modules/pi-subagents/src/workflows/workflow-resources.ts +150 -0
- package/node_modules/pi-subagents/src/workflows/workflow-settlement.ts +246 -0
- package/node_modules/typebox/build/compile/code.d.mts +12 -0
- package/node_modules/typebox/build/compile/code.mjs +65 -0
- package/node_modules/typebox/build/compile/compile.d.mts +6 -0
- package/node_modules/typebox/build/compile/compile.mjs +12 -0
- package/node_modules/typebox/build/compile/index.d.mts +8 -0
- package/node_modules/typebox/build/compile/index.mjs +14 -0
- package/node_modules/typebox/build/compile/validator.d.mts +43 -0
- package/node_modules/typebox/build/compile/validator.mjs +121 -0
- package/node_modules/typebox/build/error/errors.d.mts +214 -0
- package/node_modules/typebox/build/error/errors.mjs +18 -0
- package/node_modules/typebox/build/error/index.d.mts +1 -0
- package/node_modules/typebox/build/error/index.mjs +1 -0
- package/node_modules/typebox/build/format/_idna.d.mts +2 -0
- package/node_modules/typebox/build/format/_idna.mjs +216 -0
- package/node_modules/typebox/build/format/_puny.d.mts +1 -0
- package/node_modules/typebox/build/format/_puny.mjs +74 -0
- package/node_modules/typebox/build/format/_registry.d.mts +15 -0
- package/node_modules/typebox/build/format/_registry.mjs +96 -0
- package/node_modules/typebox/build/format/date.d.mts +6 -0
- package/node_modules/typebox/build/format/date.mjs +19 -0
- package/node_modules/typebox/build/format/date_time.d.mts +6 -0
- package/node_modules/typebox/build/format/date_time.mjs +11 -0
- package/node_modules/typebox/build/format/duration.d.mts +5 -0
- package/node_modules/typebox/build/format/duration.mjs +8 -0
- package/node_modules/typebox/build/format/email.d.mts +5 -0
- package/node_modules/typebox/build/format/email.mjs +8 -0
- package/node_modules/typebox/build/format/format.d.mts +22 -0
- package/node_modules/typebox/build/format/format.mjs +22 -0
- package/node_modules/typebox/build/format/hostname.d.mts +7 -0
- package/node_modules/typebox/build/format/hostname.mjs +18 -0
- package/node_modules/typebox/build/format/idn_email.d.mts +5 -0
- package/node_modules/typebox/build/format/idn_email.mjs +8 -0
- package/node_modules/typebox/build/format/idn_hostname.d.mts +7 -0
- package/node_modules/typebox/build/format/idn_hostname.mjs +19 -0
- package/node_modules/typebox/build/format/index.d.mts +4 -0
- package/node_modules/typebox/build/format/index.mjs +4 -0
- package/node_modules/typebox/build/format/ipv4.d.mts +6 -0
- package/node_modules/typebox/build/format/ipv4.mjs +38 -0
- package/node_modules/typebox/build/format/ipv6.d.mts +5 -0
- package/node_modules/typebox/build/format/ipv6.mjs +67 -0
- package/node_modules/typebox/build/format/iri.d.mts +5 -0
- package/node_modules/typebox/build/format/iri.mjs +13 -0
- package/node_modules/typebox/build/format/iri_reference.d.mts +5 -0
- package/node_modules/typebox/build/format/iri_reference.mjs +60 -0
- package/node_modules/typebox/build/format/json_pointer.d.mts +6 -0
- package/node_modules/typebox/build/format/json_pointer.mjs +9 -0
- package/node_modules/typebox/build/format/json_pointer_uri_fragment.d.mts +6 -0
- package/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs +9 -0
- package/node_modules/typebox/build/format/regex.d.mts +6 -0
- package/node_modules/typebox/build/format/regex.mjs +17 -0
- package/node_modules/typebox/build/format/relative_json_pointer.d.mts +6 -0
- package/node_modules/typebox/build/format/relative_json_pointer.mjs +9 -0
- package/node_modules/typebox/build/format/time.d.mts +5 -0
- package/node_modules/typebox/build/format/time.mjs +27 -0
- package/node_modules/typebox/build/format/uri.d.mts +5 -0
- package/node_modules/typebox/build/format/uri.mjs +135 -0
- package/node_modules/typebox/build/format/uri_reference.d.mts +5 -0
- package/node_modules/typebox/build/format/uri_reference.mjs +9 -0
- package/node_modules/typebox/build/format/uri_template.d.mts +6 -0
- package/node_modules/typebox/build/format/uri_template.mjs +10 -0
- package/node_modules/typebox/build/format/url.d.mts +6 -0
- package/node_modules/typebox/build/format/url.mjs +9 -0
- package/node_modules/typebox/build/format/uuid.d.mts +6 -0
- package/node_modules/typebox/build/format/uuid.mjs +9 -0
- package/node_modules/typebox/build/guard/emit.d.mts +58 -0
- package/node_modules/typebox/build/guard/emit.mjs +194 -0
- package/node_modules/typebox/build/guard/globals.d.mts +35 -0
- package/node_modules/typebox/build/guard/globals.mjs +90 -0
- package/node_modules/typebox/build/guard/guard.d.mts +69 -0
- package/node_modules/typebox/build/guard/guard.mjs +217 -0
- package/node_modules/typebox/build/guard/index.d.mts +6 -0
- package/node_modules/typebox/build/guard/index.mjs +6 -0
- package/node_modules/typebox/build/guard/native.d.mts +20 -0
- package/node_modules/typebox/build/guard/native.mjs +60 -0
- package/node_modules/typebox/build/guard/string.d.mts +6 -0
- package/node_modules/typebox/build/guard/string.mjs +164 -0
- package/node_modules/typebox/build/index.d.mts +8 -0
- package/node_modules/typebox/build/index.mjs +14 -0
- package/node_modules/typebox/build/schema/build.d.mts +39 -0
- package/node_modules/typebox/build/schema/build.mjs +118 -0
- package/node_modules/typebox/build/schema/check.d.mts +6 -0
- package/node_modules/typebox/build/schema/check.mjs +14 -0
- package/node_modules/typebox/build/schema/compile.d.mts +22 -0
- package/node_modules/typebox/build/schema/compile.mjs +46 -0
- package/node_modules/typebox/build/schema/engine/_context.d.mts +35 -0
- package/node_modules/typebox/build/schema/engine/_context.mjs +129 -0
- package/node_modules/typebox/build/schema/engine/_exact_optional.d.mts +3 -0
- package/node_modules/typebox/build/schema/engine/_exact_optional.mjs +20 -0
- package/node_modules/typebox/build/schema/engine/_externals.d.mts +7 -0
- package/node_modules/typebox/build/schema/engine/_externals.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/_functions.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/_functions.mjs +47 -0
- package/node_modules/typebox/build/schema/engine/_guard.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/_guard.mjs +26 -0
- package/node_modules/typebox/build/schema/engine/_reducer.d.mts +4 -0
- package/node_modules/typebox/build/schema/engine/_reducer.mjs +45 -0
- package/node_modules/typebox/build/schema/engine/_refine.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/_refine.mjs +29 -0
- package/node_modules/typebox/build/schema/engine/_stack.d.mts +18 -0
- package/node_modules/typebox/build/schema/engine/_stack.mjs +107 -0
- package/node_modules/typebox/build/schema/engine/_unique.d.mts +2 -0
- package/node_modules/typebox/build/schema/engine/_unique.mjs +5 -0
- package/node_modules/typebox/build/schema/engine/additionalItems.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +50 -0
- package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +9 -0
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +110 -0
- package/node_modules/typebox/build/schema/engine/allOf.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/allOf.mjs +47 -0
- package/node_modules/typebox/build/schema/engine/anyOf.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/anyOf.mjs +52 -0
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +5 -0
- package/node_modules/typebox/build/schema/engine/boolean.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/const.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/const.mjs +30 -0
- package/node_modules/typebox/build/schema/engine/contains.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/contains.mjs +42 -0
- package/node_modules/typebox/build/schema/engine/dependencies.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/dependencies.mjs +45 -0
- package/node_modules/typebox/build/schema/engine/dependentRequired.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/dependentRequired.mjs +40 -0
- package/node_modules/typebox/build/schema/engine/dependentSchemas.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/dependentSchemas.mjs +38 -0
- package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/enum.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/enum.mjs +33 -0
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/format.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/format.mjs +26 -0
- package/node_modules/typebox/build/schema/engine/if.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/if.mjs +47 -0
- package/node_modules/typebox/build/schema/engine/index.d.mts +49 -0
- package/node_modules/typebox/build/schema/engine/index.mjs +55 -0
- package/node_modules/typebox/build/schema/engine/items.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/items.mjs +68 -0
- package/node_modules/typebox/build/schema/engine/maxContains.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +42 -0
- package/node_modules/typebox/build/schema/engine/maxItems.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/maxItems.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/maxLength.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/maxLength.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/maxProperties.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/maxProperties.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/maximum.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/maximum.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/minContains.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/minContains.mjs +41 -0
- package/node_modules/typebox/build/schema/engine/minItems.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/minItems.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/minLength.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/minLength.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/minProperties.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/minProperties.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/minimum.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/minimum.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/multipleOf.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/multipleOf.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/not.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/not.mjs +37 -0
- package/node_modules/typebox/build/schema/engine/oneOf.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +58 -0
- package/node_modules/typebox/build/schema/engine/pattern.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/pattern.mjs +28 -0
- package/node_modules/typebox/build/schema/engine/patternProperties.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +44 -0
- package/node_modules/typebox/build/schema/engine/prefixItems.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/prefixItems.mjs +35 -0
- package/node_modules/typebox/build/schema/engine/properties.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/properties.mjs +75 -0
- package/node_modules/typebox/build/schema/engine/propertyNames.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +39 -0
- package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/ref.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/ref.mjs +58 -0
- package/node_modules/typebox/build/schema/engine/required.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/required.mjs +32 -0
- package/node_modules/typebox/build/schema/engine/schema.d.mts +9 -0
- package/node_modules/typebox/build/schema/engine/schema.mjs +352 -0
- package/node_modules/typebox/build/schema/engine/type.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/type.mjs +74 -0
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +51 -0
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +51 -0
- package/node_modules/typebox/build/schema/engine/uniqueItems.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/uniqueItems.mjs +51 -0
- package/node_modules/typebox/build/schema/errors.d.mts +6 -0
- package/node_modules/typebox/build/schema/errors.mjs +24 -0
- package/node_modules/typebox/build/schema/index.d.mts +3 -0
- package/node_modules/typebox/build/schema/index.mjs +9 -0
- package/node_modules/typebox/build/schema/parse.d.mts +13 -0
- package/node_modules/typebox/build/schema/parse.mjs +27 -0
- package/node_modules/typebox/build/schema/pointer/index.d.mts +2 -0
- package/node_modules/typebox/build/schema/pointer/index.mjs +2 -0
- package/node_modules/typebox/build/schema/pointer/pointer.d.mts +10 -0
- package/node_modules/typebox/build/schema/pointer/pointer.mjs +106 -0
- package/node_modules/typebox/build/schema/pointer/pointer_get.d.mts +9 -0
- package/node_modules/typebox/build/schema/pointer/pointer_get.mjs +2 -0
- package/node_modules/typebox/build/schema/resolve/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/resolve/index.mjs +1 -0
- package/node_modules/typebox/build/schema/resolve/ref.d.mts +3 -0
- package/node_modules/typebox/build/schema/resolve/ref.mjs +146 -0
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +1 -0
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +1 -0
- package/node_modules/typebox/build/schema/schema.d.mts +10 -0
- package/node_modules/typebox/build/schema/schema.mjs +10 -0
- package/node_modules/typebox/build/schema/static/_canonical.d.mts +7 -0
- package/node_modules/typebox/build/schema/static/_canonical.mjs +2 -0
- package/node_modules/typebox/build/schema/static/_comparer.d.mts +6 -0
- package/node_modules/typebox/build/schema/static/_comparer.mjs +2 -0
- package/node_modules/typebox/build/schema/static/_elements.d.mts +18 -0
- package/node_modules/typebox/build/schema/static/_elements.mjs +2 -0
- package/node_modules/typebox/build/schema/static/additionalProperties.d.mts +7 -0
- package/node_modules/typebox/build/schema/static/additionalProperties.mjs +3 -0
- package/node_modules/typebox/build/schema/static/allOf.d.mts +3 -0
- package/node_modules/typebox/build/schema/static/allOf.mjs +2 -0
- package/node_modules/typebox/build/schema/static/anyOf.d.mts +3 -0
- package/node_modules/typebox/build/schema/static/anyOf.mjs +2 -0
- package/node_modules/typebox/build/schema/static/const.d.mts +1 -0
- package/node_modules/typebox/build/schema/static/const.mjs +2 -0
- package/node_modules/typebox/build/schema/static/enum.d.mts +1 -0
- package/node_modules/typebox/build/schema/static/enum.mjs +2 -0
- package/node_modules/typebox/build/schema/static/if.d.mts +15 -0
- package/node_modules/typebox/build/schema/static/if.mjs +2 -0
- package/node_modules/typebox/build/schema/static/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/static/index.mjs +1 -0
- package/node_modules/typebox/build/schema/static/items.d.mts +7 -0
- package/node_modules/typebox/build/schema/static/items.mjs +2 -0
- package/node_modules/typebox/build/schema/static/oneOf.d.mts +3 -0
- package/node_modules/typebox/build/schema/static/oneOf.mjs +2 -0
- package/node_modules/typebox/build/schema/static/patternProperties.d.mts +7 -0
- package/node_modules/typebox/build/schema/static/patternProperties.mjs +2 -0
- package/node_modules/typebox/build/schema/static/prefixItems.d.mts +3 -0
- package/node_modules/typebox/build/schema/static/prefixItems.mjs +2 -0
- package/node_modules/typebox/build/schema/static/properties.d.mts +32 -0
- package/node_modules/typebox/build/schema/static/properties.mjs +2 -0
- package/node_modules/typebox/build/schema/static/ref.d.mts +8 -0
- package/node_modules/typebox/build/schema/static/ref.mjs +3 -0
- package/node_modules/typebox/build/schema/static/required.d.mts +3 -0
- package/node_modules/typebox/build/schema/static/required.mjs +3 -0
- package/node_modules/typebox/build/schema/static/schema.d.mts +56 -0
- package/node_modules/typebox/build/schema/static/schema.mjs +2 -0
- package/node_modules/typebox/build/schema/static/static.d.mts +4 -0
- package/node_modules/typebox/build/schema/static/static.mjs +3 -0
- package/node_modules/typebox/build/schema/static/type.d.mts +4 -0
- package/node_modules/typebox/build/schema/static/type.mjs +3 -0
- package/node_modules/typebox/build/schema/static/unevaluatedProperties.d.mts +7 -0
- package/node_modules/typebox/build/schema/static/unevaluatedProperties.mjs +3 -0
- package/node_modules/typebox/build/schema/types/_guard.d.mts +10 -0
- package/node_modules/typebox/build/schema/types/_guard.mjs +16 -0
- package/node_modules/typebox/build/schema/types/_refine.d.mts +13 -0
- package/node_modules/typebox/build/schema/types/_refine.mjs +18 -0
- package/node_modules/typebox/build/schema/types/additionalItems.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/additionalItems.mjs +14 -0
- package/node_modules/typebox/build/schema/types/additionalProperties.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/additionalProperties.mjs +14 -0
- package/node_modules/typebox/build/schema/types/allOf.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/allOf.mjs +15 -0
- package/node_modules/typebox/build/schema/types/anchor.d.mts +8 -0
- package/node_modules/typebox/build/schema/types/anchor.mjs +12 -0
- package/node_modules/typebox/build/schema/types/anyOf.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/anyOf.mjs +15 -0
- package/node_modules/typebox/build/schema/types/const.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/const.mjs +12 -0
- package/node_modules/typebox/build/schema/types/contains.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/contains.mjs +14 -0
- package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/contentEncoding.mjs +13 -0
- package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/contentMediaType.mjs +13 -0
- package/node_modules/typebox/build/schema/types/default.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/default.mjs +12 -0
- package/node_modules/typebox/build/schema/types/defs.d.mts +6 -0
- package/node_modules/typebox/build/schema/types/defs.mjs +12 -0
- package/node_modules/typebox/build/schema/types/dependencies.d.mts +11 -0
- package/node_modules/typebox/build/schema/types/dependencies.mjs +16 -0
- package/node_modules/typebox/build/schema/types/dependentRequired.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/dependentRequired.mjs +15 -0
- package/node_modules/typebox/build/schema/types/dependentSchemas.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/dependentSchemas.mjs +15 -0
- package/node_modules/typebox/build/schema/types/dynamicAnchor.d.mts +8 -0
- package/node_modules/typebox/build/schema/types/dynamicAnchor.mjs +12 -0
- package/node_modules/typebox/build/schema/types/dynamicRef.d.mts +8 -0
- package/node_modules/typebox/build/schema/types/dynamicRef.mjs +12 -0
- package/node_modules/typebox/build/schema/types/else.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/else.mjs +14 -0
- package/node_modules/typebox/build/schema/types/enum.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/enum.mjs +13 -0
- package/node_modules/typebox/build/schema/types/exclusiveMaximum.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/exclusiveMaximum.mjs +13 -0
- package/node_modules/typebox/build/schema/types/exclusiveMinimum.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/exclusiveMinimum.mjs +13 -0
- package/node_modules/typebox/build/schema/types/format.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/format.mjs +13 -0
- package/node_modules/typebox/build/schema/types/id.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/id.mjs +13 -0
- package/node_modules/typebox/build/schema/types/if.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/if.mjs +14 -0
- package/node_modules/typebox/build/schema/types/index.d.mts +54 -0
- package/node_modules/typebox/build/schema/types/index.mjs +60 -0
- package/node_modules/typebox/build/schema/types/items.d.mts +19 -0
- package/node_modules/typebox/build/schema/types/items.mjs +26 -0
- package/node_modules/typebox/build/schema/types/maxContains.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/maxContains.mjs +13 -0
- package/node_modules/typebox/build/schema/types/maxItems.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/maxItems.mjs +13 -0
- package/node_modules/typebox/build/schema/types/maxLength.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/maxLength.mjs +13 -0
- package/node_modules/typebox/build/schema/types/maxProperties.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/maxProperties.mjs +13 -0
- package/node_modules/typebox/build/schema/types/maximum.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/maximum.mjs +13 -0
- package/node_modules/typebox/build/schema/types/minContains.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/minContains.mjs +13 -0
- package/node_modules/typebox/build/schema/types/minItems.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/minItems.mjs +13 -0
- package/node_modules/typebox/build/schema/types/minLength.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/minLength.mjs +13 -0
- package/node_modules/typebox/build/schema/types/minProperties.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/minProperties.mjs +13 -0
- package/node_modules/typebox/build/schema/types/minimum.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/minimum.mjs +13 -0
- package/node_modules/typebox/build/schema/types/multipleOf.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/multipleOf.mjs +13 -0
- package/node_modules/typebox/build/schema/types/not.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/not.mjs +14 -0
- package/node_modules/typebox/build/schema/types/oneOf.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/oneOf.mjs +15 -0
- package/node_modules/typebox/build/schema/types/pattern.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/pattern.mjs +14 -0
- package/node_modules/typebox/build/schema/types/patternProperties.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/patternProperties.mjs +15 -0
- package/node_modules/typebox/build/schema/types/prefixItems.d.mts +8 -0
- package/node_modules/typebox/build/schema/types/prefixItems.mjs +14 -0
- package/node_modules/typebox/build/schema/types/properties.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/properties.mjs +15 -0
- package/node_modules/typebox/build/schema/types/propertyNames.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/propertyNames.mjs +15 -0
- package/node_modules/typebox/build/schema/types/recursiveAnchor.d.mts +12 -0
- package/node_modules/typebox/build/schema/types/recursiveAnchor.mjs +19 -0
- package/node_modules/typebox/build/schema/types/recursiveRef.d.mts +8 -0
- package/node_modules/typebox/build/schema/types/recursiveRef.mjs +12 -0
- package/node_modules/typebox/build/schema/types/ref.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/ref.mjs +13 -0
- package/node_modules/typebox/build/schema/types/required.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/required.mjs +14 -0
- package/node_modules/typebox/build/schema/types/schema.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/schema.mjs +14 -0
- package/node_modules/typebox/build/schema/types/then.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/then.mjs +14 -0
- package/node_modules/typebox/build/schema/types/type.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/type.mjs +15 -0
- package/node_modules/typebox/build/schema/types/unevaluatedItems.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/unevaluatedItems.mjs +14 -0
- package/node_modules/typebox/build/schema/types/unevaluatedProperties.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/unevaluatedProperties.mjs +14 -0
- package/node_modules/typebox/build/schema/types/uniqueItems.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/uniqueItems.mjs +13 -0
- package/node_modules/typebox/build/system/arguments/arguments.d.mts +5 -0
- package/node_modules/typebox/build/system/arguments/arguments.mjs +9 -0
- package/node_modules/typebox/build/system/arguments/index.d.mts +1 -0
- package/node_modules/typebox/build/system/arguments/index.mjs +1 -0
- package/node_modules/typebox/build/system/environment/environment.d.mts +1 -0
- package/node_modules/typebox/build/system/environment/environment.mjs +1 -0
- package/node_modules/typebox/build/system/environment/evaluate.d.mts +9 -0
- package/node_modules/typebox/build/system/environment/evaluate.mjs +37 -0
- package/node_modules/typebox/build/system/environment/index.d.mts +1 -0
- package/node_modules/typebox/build/system/environment/index.mjs +1 -0
- package/node_modules/typebox/build/system/hashing/hash.d.mts +4 -0
- package/node_modules/typebox/build/system/hashing/hash.mjs +232 -0
- package/node_modules/typebox/build/system/hashing/index.d.mts +1 -0
- package/node_modules/typebox/build/system/hashing/index.mjs +1 -0
- package/node_modules/typebox/build/system/index.d.mts +4 -0
- package/node_modules/typebox/build/system/index.mjs +4 -0
- package/node_modules/typebox/build/system/locale/_config.d.mts +7 -0
- package/node_modules/typebox/build/system/locale/_config.mjs +15 -0
- package/node_modules/typebox/build/system/locale/_locale.d.mts +40 -0
- package/node_modules/typebox/build/system/locale/_locale.mjs +40 -0
- package/node_modules/typebox/build/system/locale/ar_001.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/ar_001.mjs +41 -0
- package/node_modules/typebox/build/system/locale/bn_BD.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/bn_BD.mjs +41 -0
- package/node_modules/typebox/build/system/locale/cs_CZ.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/cs_CZ.mjs +41 -0
- package/node_modules/typebox/build/system/locale/de_DE.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/de_DE.mjs +41 -0
- package/node_modules/typebox/build/system/locale/el_GR.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/el_GR.mjs +41 -0
- package/node_modules/typebox/build/system/locale/en_US.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/en_US.mjs +40 -0
- package/node_modules/typebox/build/system/locale/es_419.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/es_419.mjs +41 -0
- package/node_modules/typebox/build/system/locale/es_AR.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/es_AR.mjs +41 -0
- package/node_modules/typebox/build/system/locale/es_ES.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/es_ES.mjs +41 -0
- package/node_modules/typebox/build/system/locale/es_MX.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/es_MX.mjs +41 -0
- package/node_modules/typebox/build/system/locale/fa_IR.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/fa_IR.mjs +41 -0
- package/node_modules/typebox/build/system/locale/fil_PH.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/fil_PH.mjs +41 -0
- package/node_modules/typebox/build/system/locale/fr_CA.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/fr_CA.mjs +41 -0
- package/node_modules/typebox/build/system/locale/fr_FR.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/fr_FR.mjs +41 -0
- package/node_modules/typebox/build/system/locale/ha_NG.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/ha_NG.mjs +41 -0
- package/node_modules/typebox/build/system/locale/hi_IN.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/hi_IN.mjs +41 -0
- package/node_modules/typebox/build/system/locale/hu_HU.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/hu_HU.mjs +41 -0
- package/node_modules/typebox/build/system/locale/id_ID.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/id_ID.mjs +41 -0
- package/node_modules/typebox/build/system/locale/index.d.mts +1 -0
- package/node_modules/typebox/build/system/locale/index.mjs +1 -0
- package/node_modules/typebox/build/system/locale/it_IT.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/it_IT.mjs +41 -0
- package/node_modules/typebox/build/system/locale/ja_JP.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/ja_JP.mjs +41 -0
- package/node_modules/typebox/build/system/locale/ko_KR.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/ko_KR.mjs +41 -0
- package/node_modules/typebox/build/system/locale/ms_MY.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/ms_MY.mjs +41 -0
- package/node_modules/typebox/build/system/locale/nl_NL.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/nl_NL.mjs +41 -0
- package/node_modules/typebox/build/system/locale/pl_PL.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/pl_PL.mjs +41 -0
- package/node_modules/typebox/build/system/locale/pt_BR.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/pt_BR.mjs +41 -0
- package/node_modules/typebox/build/system/locale/pt_PT.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/pt_PT.mjs +41 -0
- package/node_modules/typebox/build/system/locale/ro_RO.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/ro_RO.mjs +41 -0
- package/node_modules/typebox/build/system/locale/ru_RU.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/ru_RU.mjs +41 -0
- package/node_modules/typebox/build/system/locale/sv_SE.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/sv_SE.mjs +41 -0
- package/node_modules/typebox/build/system/locale/sw_TZ.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/sw_TZ.mjs +41 -0
- package/node_modules/typebox/build/system/locale/th_TH.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/th_TH.mjs +41 -0
- package/node_modules/typebox/build/system/locale/tr_TR.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/tr_TR.mjs +41 -0
- package/node_modules/typebox/build/system/locale/uk_UA.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/uk_UA.mjs +41 -0
- package/node_modules/typebox/build/system/locale/ur_PK.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/ur_PK.mjs +41 -0
- package/node_modules/typebox/build/system/locale/vi_VN.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/vi_VN.mjs +41 -0
- package/node_modules/typebox/build/system/locale/yo_NG.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/yo_NG.mjs +41 -0
- package/node_modules/typebox/build/system/locale/zh_Hans.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/zh_Hans.mjs +41 -0
- package/node_modules/typebox/build/system/locale/zh_Hant.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/zh_Hant.mjs +41 -0
- package/node_modules/typebox/build/system/memory/assign.d.mts +14 -0
- package/node_modules/typebox/build/system/memory/assign.mjs +11 -0
- package/node_modules/typebox/build/system/memory/clone.d.mts +6 -0
- package/node_modules/typebox/build/system/memory/clone.mjs +63 -0
- package/node_modules/typebox/build/system/memory/create.d.mts +8 -0
- package/node_modules/typebox/build/system/memory/create.mjs +30 -0
- package/node_modules/typebox/build/system/memory/discard.d.mts +4 -0
- package/node_modules/typebox/build/system/memory/discard.mjs +17 -0
- package/node_modules/typebox/build/system/memory/index.d.mts +1 -0
- package/node_modules/typebox/build/system/memory/index.mjs +1 -0
- package/node_modules/typebox/build/system/memory/memory.d.mts +6 -0
- package/node_modules/typebox/build/system/memory/memory.mjs +7 -0
- package/node_modules/typebox/build/system/memory/metrics.d.mts +14 -0
- package/node_modules/typebox/build/system/memory/metrics.mjs +8 -0
- package/node_modules/typebox/build/system/memory/update.d.mts +7 -0
- package/node_modules/typebox/build/system/memory/update.mjs +32 -0
- package/node_modules/typebox/build/system/settings/index.d.mts +1 -0
- package/node_modules/typebox/build/system/settings/index.mjs +1 -0
- package/node_modules/typebox/build/system/settings/settings.d.mts +56 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +32 -0
- package/node_modules/typebox/build/system/system.d.mts +6 -0
- package/node_modules/typebox/build/system/system.mjs +6 -0
- package/node_modules/typebox/build/system/unreachable/index.d.mts +1 -0
- package/node_modules/typebox/build/system/unreachable/index.mjs +1 -0
- package/node_modules/typebox/build/system/unreachable/unreachable.d.mts +3 -0
- package/node_modules/typebox/build/system/unreachable/unreachable.mjs +6 -0
- package/node_modules/typebox/build/type/action/_optional.d.mts +19 -0
- package/node_modules/typebox/build/type/action/_optional.mjs +40 -0
- package/node_modules/typebox/build/type/action/_readonly.d.mts +19 -0
- package/node_modules/typebox/build/type/action/_readonly.mjs +40 -0
- package/node_modules/typebox/build/type/action/awaited.d.mts +15 -0
- package/node_modules/typebox/build/type/action/awaited.mjs +15 -0
- package/node_modules/typebox/build/type/action/capitalize.d.mts +11 -0
- package/node_modules/typebox/build/type/action/capitalize.mjs +11 -0
- package/node_modules/typebox/build/type/action/conditional.d.mts +13 -0
- package/node_modules/typebox/build/type/action/conditional.mjs +12 -0
- package/node_modules/typebox/build/type/action/constructor_parameters.d.mts +11 -0
- package/node_modules/typebox/build/type/action/constructor_parameters.mjs +11 -0
- package/node_modules/typebox/build/type/action/evaluate.d.mts +11 -0
- package/node_modules/typebox/build/type/action/evaluate.mjs +11 -0
- package/node_modules/typebox/build/type/action/exclude.d.mts +11 -0
- package/node_modules/typebox/build/type/action/exclude.mjs +11 -0
- package/node_modules/typebox/build/type/action/extract.d.mts +11 -0
- package/node_modules/typebox/build/type/action/extract.mjs +11 -0
- package/node_modules/typebox/build/type/action/index.d.mts +27 -0
- package/node_modules/typebox/build/type/action/index.mjs +27 -0
- package/node_modules/typebox/build/type/action/indexed.d.mts +14 -0
- package/node_modules/typebox/build/type/action/indexed.mjs +14 -0
- package/node_modules/typebox/build/type/action/instance_type.d.mts +11 -0
- package/node_modules/typebox/build/type/action/instance_type.mjs +11 -0
- package/node_modules/typebox/build/type/action/interface.d.mts +14 -0
- package/node_modules/typebox/build/type/action/interface.mjs +22 -0
- package/node_modules/typebox/build/type/action/keyof.d.mts +11 -0
- package/node_modules/typebox/build/type/action/keyof.mjs +11 -0
- package/node_modules/typebox/build/type/action/lowercase.d.mts +11 -0
- package/node_modules/typebox/build/type/action/lowercase.mjs +11 -0
- package/node_modules/typebox/build/type/action/mapped.d.mts +14 -0
- package/node_modules/typebox/build/type/action/mapped.mjs +12 -0
- package/node_modules/typebox/build/type/action/module.d.mts +12 -0
- package/node_modules/typebox/build/type/action/module.mjs +12 -0
- package/node_modules/typebox/build/type/action/non_nullable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/non_nullable.mjs +11 -0
- package/node_modules/typebox/build/type/action/omit.d.mts +14 -0
- package/node_modules/typebox/build/type/action/omit.mjs +14 -0
- package/node_modules/typebox/build/type/action/options.d.mts +11 -0
- package/node_modules/typebox/build/type/action/options.mjs +11 -0
- package/node_modules/typebox/build/type/action/parameters.d.mts +11 -0
- package/node_modules/typebox/build/type/action/parameters.mjs +11 -0
- package/node_modules/typebox/build/type/action/partial.d.mts +11 -0
- package/node_modules/typebox/build/type/action/partial.mjs +11 -0
- package/node_modules/typebox/build/type/action/pick.d.mts +14 -0
- package/node_modules/typebox/build/type/action/pick.mjs +14 -0
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +16 -0
- package/node_modules/typebox/build/type/action/readonly_object.mjs +16 -0
- package/node_modules/typebox/build/type/action/required.d.mts +11 -0
- package/node_modules/typebox/build/type/action/required.mjs +11 -0
- package/node_modules/typebox/build/type/action/return_type.d.mts +11 -0
- package/node_modules/typebox/build/type/action/return_type.mjs +11 -0
- package/node_modules/typebox/build/type/action/uncapitalize.d.mts +11 -0
- package/node_modules/typebox/build/type/action/uncapitalize.mjs +11 -0
- package/node_modules/typebox/build/type/action/uppercase.d.mts +11 -0
- package/node_modules/typebox/build/type/action/uppercase.mjs +11 -0
- package/node_modules/typebox/build/type/engine/awaited/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/awaited/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +11 -0
- package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +20 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +15 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +53 -0
- package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +23 -0
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +48 -0
- package/node_modules/typebox/build/type/engine/call/resolve_arguments.d.mts +13 -0
- package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +33 -0
- package/node_modules/typebox/build/type/engine/call/resolve_target.d.mts +25 -0
- package/node_modules/typebox/build/type/engine/call/resolve_target.mjs +27 -0
- package/node_modules/typebox/build/type/engine/conditional/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/conditional/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/conditional/instantiate.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/conditional/instantiate.mjs +23 -0
- package/node_modules/typebox/build/type/engine/constructor_parameters/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/constructor_parameters/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +15 -0
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +24 -0
- package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +19 -0
- package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +24 -0
- package/node_modules/typebox/build/type/engine/cyclic/check.mjs +51 -0
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +25 -0
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +53 -0
- package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +31 -0
- package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +53 -0
- package/node_modules/typebox/build/type/engine/cyclic/index.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/cyclic/index.mjs +6 -0
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +20 -0
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +30 -0
- package/node_modules/typebox/build/type/engine/cyclic/target.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/cyclic/target.mjs +16 -0
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +14 -0
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +24 -0
- package/node_modules/typebox/build/type/engine/enum/index.d.mts +2 -0
- package/node_modules/typebox/build/type/engine/enum/index.mjs +2 -0
- package/node_modules/typebox/build/type/engine/enum/typescript_enum_to_enum_values.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/enum/typescript_enum_to_enum_values.mjs +9 -0
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +16 -0
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +47 -0
- package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +15 -0
- package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +22 -0
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +30 -0
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +63 -0
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +27 -0
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +45 -0
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +14 -0
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +27 -0
- package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +11 -0
- package/node_modules/typebox/build/type/engine/evaluate/index.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/evaluate/index.mjs +8 -0
- package/node_modules/typebox/build/type/engine/evaluate/instantiate.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/evaluate/instantiate.mjs +12 -0
- package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +11 -0
- package/node_modules/typebox/build/type/engine/exclude/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/exclude/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/exclude/instantiate.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/exclude/instantiate.mjs +16 -0
- package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +11 -0
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +24 -0
- package/node_modules/typebox/build/type/engine/extract/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/extract/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/extract/instantiate.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/extract/instantiate.mjs +16 -0
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +11 -0
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +24 -0
- package/node_modules/typebox/build/type/engine/helpers/index.d.mts +3 -0
- package/node_modules/typebox/build/type/engine/helpers/index.mjs +3 -0
- package/node_modules/typebox/build/type/engine/helpers/keys.d.mts +3 -0
- package/node_modules/typebox/build/type/engine/helpers/keys.mjs +8 -0
- package/node_modules/typebox/build/type/engine/helpers/keys_to_indexer.d.mts +7 -0
- package/node_modules/typebox/build/type/engine/helpers/keys_to_indexer.mjs +15 -0
- package/node_modules/typebox/build/type/engine/helpers/union.d.mts +7 -0
- package/node_modules/typebox/build/type/engine/helpers/union.mjs +3 -0
- package/node_modules/typebox/build/type/engine/index.d.mts +31 -0
- package/node_modules/typebox/build/type/engine/index.mjs +37 -0
- package/node_modules/typebox/build/type/engine/indexable/from_cyclic.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/indexable/from_cyclic.mjs +8 -0
- package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +8 -0
- package/node_modules/typebox/build/type/engine/indexable/from_intersect.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/indexable/from_intersect.mjs +8 -0
- package/node_modules/typebox/build/type/engine/indexable/from_literal.d.mts +3 -0
- package/node_modules/typebox/build/type/engine/indexable/from_literal.mjs +5 -0
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +8 -0
- package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +17 -0
- package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +22 -0
- package/node_modules/typebox/build/type/engine/indexable/from_union.d.mts +4 -0
- package/node_modules/typebox/build/type/engine/indexable/from_union.mjs +7 -0
- package/node_modules/typebox/build/type/engine/indexable/to_indexable.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/indexable/to_indexable.mjs +14 -0
- package/node_modules/typebox/build/type/engine/indexable/to_indexable_keys.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/indexable/to_indexable_keys.mjs +12 -0
- package/node_modules/typebox/build/type/engine/indexed/array_indexer.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/indexed/array_indexer.mjs +18 -0
- package/node_modules/typebox/build/type/engine/indexed/from_array.d.mts +15 -0
- package/node_modules/typebox/build/type/engine/indexed/from_array.mjs +35 -0
- package/node_modules/typebox/build/type/engine/indexed/from_object.d.mts +16 -0
- package/node_modules/typebox/build/type/engine/indexed/from_object.mjs +40 -0
- package/node_modules/typebox/build/type/engine/indexed/from_tuple.d.mts +13 -0
- package/node_modules/typebox/build/type/engine/indexed/from_tuple.mjs +35 -0
- package/node_modules/typebox/build/type/engine/indexed/from_type.d.mts +11 -0
- package/node_modules/typebox/build/type/engine/indexed/from_type.mjs +14 -0
- package/node_modules/typebox/build/type/engine/indexed/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/indexed/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +15 -0
- package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +25 -0
- package/node_modules/typebox/build/type/engine/instance_type/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/instance_type/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/instance_type/instantiate.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/instance_type/instantiate.mjs +21 -0
- package/node_modules/typebox/build/type/engine/instantiate.d.mts +165 -0
- package/node_modules/typebox/build/type/engine/instantiate.mjs +159 -0
- package/node_modules/typebox/build/type/engine/interface/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/interface/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +18 -0
- package/node_modules/typebox/build/type/engine/interface/instantiate.mjs +23 -0
- package/node_modules/typebox/build/type/engine/intrinsics/from_literal.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/intrinsics/from_literal.mjs +9 -0
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +8 -0
- package/node_modules/typebox/build/type/engine/intrinsics/from_type.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/intrinsics/from_type.mjs +13 -0
- package/node_modules/typebox/build/type/engine/intrinsics/from_union.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/intrinsics/from_union.mjs +7 -0
- package/node_modules/typebox/build/type/engine/intrinsics/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/intrinsics/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/intrinsics/instantiate.d.mts +38 -0
- package/node_modules/typebox/build/type/engine/intrinsics/instantiate.mjs +52 -0
- package/node_modules/typebox/build/type/engine/intrinsics/mapping.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/intrinsics/mapping.mjs +4 -0
- package/node_modules/typebox/build/type/engine/keyof/from_any.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/keyof/from_any.mjs +8 -0
- package/node_modules/typebox/build/type/engine/keyof/from_array.d.mts +4 -0
- package/node_modules/typebox/build/type/engine/keyof/from_array.mjs +5 -0
- package/node_modules/typebox/build/type/engine/keyof/from_object.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/keyof/from_object.mjs +20 -0
- package/node_modules/typebox/build/type/engine/keyof/from_record.d.mts +4 -0
- package/node_modules/typebox/build/type/engine/keyof/from_record.mjs +5 -0
- package/node_modules/typebox/build/type/engine/keyof/from_tuple.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/keyof/from_tuple.mjs +7 -0
- package/node_modules/typebox/build/type/engine/keyof/from_type.d.mts +15 -0
- package/node_modules/typebox/build/type/engine/keyof/from_type.mjs +23 -0
- package/node_modules/typebox/build/type/engine/keyof/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/keyof/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +15 -0
- package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +25 -0
- package/node_modules/typebox/build/type/engine/mapped/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/mapped/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/mapped/instantiate.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/mapped/instantiate.mjs +15 -0
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +22 -0
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +42 -0
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +16 -0
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +34 -0
- package/node_modules/typebox/build/type/engine/module/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/module/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +21 -0
- package/node_modules/typebox/build/type/engine/module/instantiate.mjs +34 -0
- package/node_modules/typebox/build/type/engine/non_nullable/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/non_nullable/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/non_nullable/instantiate.d.mts +14 -0
- package/node_modules/typebox/build/type/engine/non_nullable/instantiate.mjs +22 -0
- package/node_modules/typebox/build/type/engine/object/collapse.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/object/collapse.mjs +14 -0
- package/node_modules/typebox/build/type/engine/object/from_cyclic.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/object/from_cyclic.mjs +8 -0
- package/node_modules/typebox/build/type/engine/object/from_intersect.d.mts +17 -0
- package/node_modules/typebox/build/type/engine/object/from_intersect.mjs +22 -0
- package/node_modules/typebox/build/type/engine/object/from_object.d.mts +3 -0
- package/node_modules/typebox/build/type/engine/object/from_object.mjs +4 -0
- package/node_modules/typebox/build/type/engine/object/from_tuple.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/object/from_tuple.mjs +9 -0
- package/node_modules/typebox/build/type/engine/object/from_type.d.mts +14 -0
- package/node_modules/typebox/build/type/engine/object/from_type.mjs +20 -0
- package/node_modules/typebox/build/type/engine/object/from_union.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +19 -0
- package/node_modules/typebox/build/type/engine/object/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/object/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/omit/from_type.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/omit/from_type.mjs +18 -0
- package/node_modules/typebox/build/type/engine/omit/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/omit/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/omit/instantiate.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/omit/instantiate.mjs +16 -0
- package/node_modules/typebox/build/type/engine/options/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/options/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/options/instantiate.mjs +14 -0
- package/node_modules/typebox/build/type/engine/parameters/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/parameters/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +15 -0
- package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +24 -0
- package/node_modules/typebox/build/type/engine/partial/from_cyclic.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/partial/from_cyclic.mjs +11 -0
- package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +7 -0
- package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/partial/from_object.mjs +11 -0
- package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/partial/from_type.mjs +17 -0
- package/node_modules/typebox/build/type/engine/partial/from_union.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/partial/from_union.mjs +7 -0
- package/node_modules/typebox/build/type/engine/partial/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/partial/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/partial/instantiate.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/partial/instantiate.mjs +15 -0
- package/node_modules/typebox/build/type/engine/patterns/index.d.mts +2 -0
- package/node_modules/typebox/build/type/engine/patterns/index.mjs +2 -0
- package/node_modules/typebox/build/type/engine/patterns/pattern.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/patterns/pattern.mjs +11 -0
- package/node_modules/typebox/build/type/engine/patterns/template.d.mts +7 -0
- package/node_modules/typebox/build/type/engine/patterns/template.mjs +20 -0
- package/node_modules/typebox/build/type/engine/pick/from_type.d.mts +13 -0
- package/node_modules/typebox/build/type/engine/pick/from_type.mjs +20 -0
- package/node_modules/typebox/build/type/engine/pick/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/pick/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/pick/instantiate.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/pick/instantiate.mjs +16 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +7 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_cyclic.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_cyclic.mjs +11 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +7 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +11 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +7 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +16 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +22 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_union.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_union.mjs +7 -0
- package/node_modules/typebox/build/type/engine/readonly_object/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/readonly_object/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/readonly_object/instantiate.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/readonly_object/instantiate.mjs +15 -0
- package/node_modules/typebox/build/type/engine/record/from_key.d.mts +24 -0
- package/node_modules/typebox/build/type/engine/record/from_key.mjs +40 -0
- package/node_modules/typebox/build/type/engine/record/from_key_any.d.mts +4 -0
- package/node_modules/typebox/build/type/engine/record/from_key_any.mjs +6 -0
- package/node_modules/typebox/build/type/engine/record/from_key_boolean.d.mts +7 -0
- package/node_modules/typebox/build/type/engine/record/from_key_boolean.mjs +5 -0
- package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +8 -0
- package/node_modules/typebox/build/type/engine/record/from_key_integer.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/record/from_key_integer.mjs +7 -0
- package/node_modules/typebox/build/type/engine/record/from_key_intersect.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/record/from_key_intersect.mjs +8 -0
- package/node_modules/typebox/build/type/engine/record/from_key_literal.d.mts +11 -0
- package/node_modules/typebox/build/type/engine/record/from_key_literal.mjs +10 -0
- package/node_modules/typebox/build/type/engine/record/from_key_number.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/record/from_key_number.mjs +7 -0
- package/node_modules/typebox/build/type/engine/record/from_key_string.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/record/from_key_string.mjs +12 -0
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +12 -0
- package/node_modules/typebox/build/type/engine/record/from_key_union.d.mts +20 -0
- package/node_modules/typebox/build/type/engine/record/from_key_union.mjs +39 -0
- package/node_modules/typebox/build/type/engine/record/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/record/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/record/instantiate.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/record/instantiate.mjs +17 -0
- package/node_modules/typebox/build/type/engine/record/record_create.d.mts +3 -0
- package/node_modules/typebox/build/type/engine/record/record_create.mjs +7 -0
- package/node_modules/typebox/build/type/engine/ref/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/ref/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +10 -0
- package/node_modules/typebox/build/type/engine/required/from_cyclic.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/required/from_cyclic.mjs +11 -0
- package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +7 -0
- package/node_modules/typebox/build/type/engine/required/from_object.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/required/from_object.mjs +11 -0
- package/node_modules/typebox/build/type/engine/required/from_type.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/required/from_type.mjs +17 -0
- package/node_modules/typebox/build/type/engine/required/from_union.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/required/from_union.mjs +7 -0
- package/node_modules/typebox/build/type/engine/required/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/required/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/required/instantiate.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/required/instantiate.mjs +15 -0
- package/node_modules/typebox/build/type/engine/rest/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/rest/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/rest/spread.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/rest/spread.mjs +19 -0
- package/node_modules/typebox/build/type/engine/return_type/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/return_type/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/return_type/instantiate.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/return_type/instantiate.mjs +21 -0
- package/node_modules/typebox/build/type/engine/template_literal/create.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/template_literal/create.mjs +5 -0
- package/node_modules/typebox/build/type/engine/template_literal/decode.d.mts +30 -0
- package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +81 -0
- package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +33 -0
- package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +81 -0
- package/node_modules/typebox/build/type/engine/template_literal/index.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/template_literal/index.mjs +6 -0
- package/node_modules/typebox/build/type/engine/template_literal/instantiate.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/template_literal/instantiate.mjs +15 -0
- package/node_modules/typebox/build/type/engine/template_literal/is_finite.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +26 -0
- package/node_modules/typebox/build/type/engine/template_literal/is_pattern.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +9 -0
- package/node_modules/typebox/build/type/engine/template_literal/static.d.mts +18 -0
- package/node_modules/typebox/build/type/engine/template_literal/static.mjs +2 -0
- package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +19 -0
- package/node_modules/typebox/build/type/engine/this/expand_this.mjs +32 -0
- package/node_modules/typebox/build/type/engine/tuple/to_object.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/tuple/to_object.mjs +14 -0
- package/node_modules/typebox/build/type/extends/any.d.mts +9 -0
- package/node_modules/typebox/build/type/extends/any.mjs +12 -0
- package/node_modules/typebox/build/type/extends/array.d.mts +20 -0
- package/node_modules/typebox/build/type/extends/array.mjs +21 -0
- package/node_modules/typebox/build/type/extends/async_iterator.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/async_iterator.mjs +9 -0
- package/node_modules/typebox/build/type/extends/bigint.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/bigint.mjs +9 -0
- package/node_modules/typebox/build/type/extends/boolean.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/boolean.mjs +9 -0
- package/node_modules/typebox/build/type/extends/constructor.d.mts +10 -0
- package/node_modules/typebox/build/type/extends/constructor.mjs +17 -0
- package/node_modules/typebox/build/type/extends/enum.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/enum.mjs +6 -0
- package/node_modules/typebox/build/type/extends/extends.d.mts +13 -0
- package/node_modules/typebox/build/type/extends/extends.mjs +17 -0
- package/node_modules/typebox/build/type/extends/extends_left.d.mts +55 -0
- package/node_modules/typebox/build/type/extends/extends_left.mjs +83 -0
- package/node_modules/typebox/build/type/extends/extends_right.d.mts +25 -0
- package/node_modules/typebox/build/type/extends/extends_right.mjs +44 -0
- package/node_modules/typebox/build/type/extends/function.d.mts +10 -0
- package/node_modules/typebox/build/type/extends/function.mjs +17 -0
- package/node_modules/typebox/build/type/extends/index.d.mts +2 -0
- package/node_modules/typebox/build/type/extends/index.mjs +2 -0
- package/node_modules/typebox/build/type/extends/inference.d.mts +34 -0
- package/node_modules/typebox/build/type/extends/inference.mjs +62 -0
- package/node_modules/typebox/build/type/extends/integer.d.mts +8 -0
- package/node_modules/typebox/build/type/extends/integer.mjs +10 -0
- package/node_modules/typebox/build/type/extends/intersect.d.mts +6 -0
- package/node_modules/typebox/build/type/extends/intersect.mjs +15 -0
- package/node_modules/typebox/build/type/extends/iterator.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/iterator.mjs +9 -0
- package/node_modules/typebox/build/type/extends/literal.d.mts +18 -0
- package/node_modules/typebox/build/type/extends/literal.mjs +44 -0
- package/node_modules/typebox/build/type/extends/never.d.mts +8 -0
- package/node_modules/typebox/build/type/extends/never.mjs +9 -0
- package/node_modules/typebox/build/type/extends/null.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/null.mjs +9 -0
- package/node_modules/typebox/build/type/extends/number.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/number.mjs +9 -0
- package/node_modules/typebox/build/type/extends/object.d.mts +25 -0
- package/node_modules/typebox/build/type/extends/object.mjs +87 -0
- package/node_modules/typebox/build/type/extends/parameters.d.mts +15 -0
- package/node_modules/typebox/build/type/extends/parameters.mjs +28 -0
- package/node_modules/typebox/build/type/extends/promise.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/promise.mjs +9 -0
- package/node_modules/typebox/build/type/extends/result.d.mts +24 -0
- package/node_modules/typebox/build/type/extends/result.mjs +36 -0
- package/node_modules/typebox/build/type/extends/return_type.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/return_type.mjs +9 -0
- package/node_modules/typebox/build/type/extends/string.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/string.mjs +9 -0
- package/node_modules/typebox/build/type/extends/symbol.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/symbol.mjs +9 -0
- package/node_modules/typebox/build/type/extends/template_literal.d.mts +6 -0
- package/node_modules/typebox/build/type/extends/template_literal.mjs +7 -0
- package/node_modules/typebox/build/type/extends/tuple.d.mts +25 -0
- package/node_modules/typebox/build/type/extends/tuple.mjs +60 -0
- package/node_modules/typebox/build/type/extends/undefined.d.mts +8 -0
- package/node_modules/typebox/build/type/extends/undefined.mjs +10 -0
- package/node_modules/typebox/build/type/extends/union.d.mts +11 -0
- package/node_modules/typebox/build/type/extends/union.mjs +24 -0
- package/node_modules/typebox/build/type/extends/unknown.d.mts +9 -0
- package/node_modules/typebox/build/type/extends/unknown.mjs +12 -0
- package/node_modules/typebox/build/type/extends/void.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/void.mjs +9 -0
- package/node_modules/typebox/build/type/index.d.mts +5 -0
- package/node_modules/typebox/build/type/index.mjs +5 -0
- package/node_modules/typebox/build/type/script/index.d.mts +1 -0
- package/node_modules/typebox/build/type/script/index.mjs +1 -0
- package/node_modules/typebox/build/type/script/mapping.d.mts +365 -0
- package/node_modules/typebox/build/type/script/mapping.mjs +532 -0
- package/node_modules/typebox/build/type/script/parser.d.mts +260 -0
- package/node_modules/typebox/build/type/script/parser.mjs +135 -0
- package/node_modules/typebox/build/type/script/script.d.mts +17 -0
- package/node_modules/typebox/build/type/script/script.mjs +21 -0
- package/node_modules/typebox/build/type/script/token/bigint.d.mts +8 -0
- package/node_modules/typebox/build/type/script/token/bigint.mjs +14 -0
- package/node_modules/typebox/build/type/script/token/const.d.mts +11 -0
- package/node_modules/typebox/build/type/script/token/const.mjs +18 -0
- package/node_modules/typebox/build/type/script/token/ident.d.mts +16 -0
- package/node_modules/typebox/build/type/script/token/ident.mjs +26 -0
- package/node_modules/typebox/build/type/script/token/index.d.mts +12 -0
- package/node_modules/typebox/build/type/script/token/index.mjs +12 -0
- package/node_modules/typebox/build/type/script/token/integer.d.mts +11 -0
- package/node_modules/typebox/build/type/script/token/integer.mjs +19 -0
- package/node_modules/typebox/build/type/script/token/internal/char.d.mts +75 -0
- package/node_modules/typebox/build/type/script/token/internal/char.mjs +26 -0
- package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -0
- package/node_modules/typebox/build/type/script/token/internal/guard.mjs +15 -0
- package/node_modules/typebox/build/type/script/token/internal/many.d.mts +7 -0
- package/node_modules/typebox/build/type/script/token/internal/many.mjs +14 -0
- package/node_modules/typebox/build/type/script/token/internal/match.d.mts +6 -0
- package/node_modules/typebox/build/type/script/token/internal/match.mjs +11 -0
- package/node_modules/typebox/build/type/script/token/internal/optional.d.mts +5 -0
- package/node_modules/typebox/build/type/script/token/internal/optional.mjs +9 -0
- package/node_modules/typebox/build/type/script/token/internal/take.d.mts +6 -0
- package/node_modules/typebox/build/type/script/token/internal/take.mjs +30 -0
- package/node_modules/typebox/build/type/script/token/internal/trim.d.mts +19 -0
- package/node_modules/typebox/build/type/script/token/internal/trim.mjs +34 -0
- package/node_modules/typebox/build/type/script/token/number.d.mts +11 -0
- package/node_modules/typebox/build/type/script/token/number.mjs +19 -0
- package/node_modules/typebox/build/type/script/token/rest.d.mts +4 -0
- package/node_modules/typebox/build/type/script/token/rest.mjs +9 -0
- package/node_modules/typebox/build/type/script/token/span.d.mts +11 -0
- package/node_modules/typebox/build/type/script/token/span.mjs +24 -0
- package/node_modules/typebox/build/type/script/token/string.d.mts +11 -0
- package/node_modules/typebox/build/type/script/token/string.mjs +20 -0
- package/node_modules/typebox/build/type/script/token/unsigned_integer.d.mts +16 -0
- package/node_modules/typebox/build/type/script/token/unsigned_integer.mjs +26 -0
- package/node_modules/typebox/build/type/script/token/unsigned_number.d.mts +17 -0
- package/node_modules/typebox/build/type/script/token/unsigned_number.mjs +38 -0
- package/node_modules/typebox/build/type/script/token/until.d.mts +7 -0
- package/node_modules/typebox/build/type/script/token/until.mjs +21 -0
- package/node_modules/typebox/build/type/script/token/until_1.d.mts +5 -0
- package/node_modules/typebox/build/type/script/token/until_1.mjs +12 -0
- package/node_modules/typebox/build/type/types/_codec.d.mts +30 -0
- package/node_modules/typebox/build/type/types/_codec.mjs +61 -0
- package/node_modules/typebox/build/type/types/_immutable.d.mts +16 -0
- package/node_modules/typebox/build/type/types/_immutable.mjs +26 -0
- package/node_modules/typebox/build/type/types/_optional.d.mts +16 -0
- package/node_modules/typebox/build/type/types/_optional.mjs +27 -0
- package/node_modules/typebox/build/type/types/_readonly.d.mts +16 -0
- package/node_modules/typebox/build/type/types/_readonly.mjs +26 -0
- package/node_modules/typebox/build/type/types/_refine.d.mts +26 -0
- package/node_modules/typebox/build/type/types/_refine.mjs +37 -0
- package/node_modules/typebox/build/type/types/any.d.mts +10 -0
- package/node_modules/typebox/build/type/types/any.mjs +18 -0
- package/node_modules/typebox/build/type/types/array.d.mts +18 -0
- package/node_modules/typebox/build/type/types/array.mjs +25 -0
- package/node_modules/typebox/build/type/types/async_iterator.d.mts +20 -0
- package/node_modules/typebox/build/type/types/async_iterator.mjs +28 -0
- package/node_modules/typebox/build/type/types/base.d.mts +50 -0
- package/node_modules/typebox/build/type/types/base.mjs +84 -0
- package/node_modules/typebox/build/type/types/bigint.d.mts +12 -0
- package/node_modules/typebox/build/type/types/bigint.mjs +21 -0
- package/node_modules/typebox/build/type/types/boolean.d.mts +11 -0
- package/node_modules/typebox/build/type/types/boolean.mjs +17 -0
- package/node_modules/typebox/build/type/types/call.d.mts +16 -0
- package/node_modules/typebox/build/type/types/call.mjs +22 -0
- package/node_modules/typebox/build/type/types/constructor.d.mts +18 -0
- package/node_modules/typebox/build/type/types/constructor.mjs +24 -0
- package/node_modules/typebox/build/type/types/cyclic.d.mts +16 -0
- package/node_modules/typebox/build/type/types/cyclic.mjs +29 -0
- package/node_modules/typebox/build/type/types/deferred.d.mts +12 -0
- package/node_modules/typebox/build/type/types/deferred.mjs +16 -0
- package/node_modules/typebox/build/type/types/enum.d.mts +16 -0
- package/node_modules/typebox/build/type/types/enum.mjs +17 -0
- package/node_modules/typebox/build/type/types/function.d.mts +21 -0
- package/node_modules/typebox/build/type/types/function.mjs +25 -0
- package/node_modules/typebox/build/type/types/generic.d.mts +13 -0
- package/node_modules/typebox/build/type/types/generic.mjs +17 -0
- package/node_modules/typebox/build/type/types/identifier.d.mts +11 -0
- package/node_modules/typebox/build/type/types/identifier.mjs +17 -0
- package/node_modules/typebox/build/type/types/index.d.mts +48 -0
- package/node_modules/typebox/build/type/types/index.mjs +54 -0
- package/node_modules/typebox/build/type/types/infer.d.mts +15 -0
- package/node_modules/typebox/build/type/types/infer.mjs +20 -0
- package/node_modules/typebox/build/type/types/integer.d.mts +12 -0
- package/node_modules/typebox/build/type/types/integer.mjs +21 -0
- package/node_modules/typebox/build/type/types/intersect.d.mts +15 -0
- package/node_modules/typebox/build/type/types/intersect.mjs +24 -0
- package/node_modules/typebox/build/type/types/iterator.d.mts +20 -0
- package/node_modules/typebox/build/type/types/iterator.mjs +28 -0
- package/node_modules/typebox/build/type/types/literal.d.mts +31 -0
- package/node_modules/typebox/build/type/types/literal.mjs +62 -0
- package/node_modules/typebox/build/type/types/never.d.mts +12 -0
- package/node_modules/typebox/build/type/types/never.mjs +22 -0
- package/node_modules/typebox/build/type/types/null.d.mts +11 -0
- package/node_modules/typebox/build/type/types/null.mjs +17 -0
- package/node_modules/typebox/build/type/types/number.d.mts +12 -0
- package/node_modules/typebox/build/type/types/number.mjs +21 -0
- package/node_modules/typebox/build/type/types/object.d.mts +18 -0
- package/node_modules/typebox/build/type/types/object.mjs +28 -0
- package/node_modules/typebox/build/type/types/parameter.d.mts +17 -0
- package/node_modules/typebox/build/type/types/parameter.mjs +21 -0
- package/node_modules/typebox/build/type/types/promise.d.mts +21 -0
- package/node_modules/typebox/build/type/types/promise.mjs +29 -0
- package/node_modules/typebox/build/type/types/properties.d.mts +43 -0
- package/node_modules/typebox/build/type/types/properties.mjs +15 -0
- package/node_modules/typebox/build/type/types/record.d.mts +46 -0
- package/node_modules/typebox/build/type/types/record.mjs +60 -0
- package/node_modules/typebox/build/type/types/ref.d.mts +19 -0
- package/node_modules/typebox/build/type/types/ref.mjs +18 -0
- package/node_modules/typebox/build/type/types/rest.d.mts +11 -0
- package/node_modules/typebox/build/type/types/rest.mjs +17 -0
- package/node_modules/typebox/build/type/types/schema.d.mts +176 -0
- package/node_modules/typebox/build/type/types/schema.mjs +15 -0
- package/node_modules/typebox/build/type/types/static.d.mts +48 -0
- package/node_modules/typebox/build/type/types/static.mjs +3 -0
- package/node_modules/typebox/build/type/types/string.d.mts +12 -0
- package/node_modules/typebox/build/type/types/string.mjs +22 -0
- package/node_modules/typebox/build/type/types/symbol.d.mts +11 -0
- package/node_modules/typebox/build/type/types/symbol.mjs +17 -0
- package/node_modules/typebox/build/type/types/template_literal.d.mts +28 -0
- package/node_modules/typebox/build/type/types/template_literal.mjs +37 -0
- package/node_modules/typebox/build/type/types/this.d.mts +14 -0
- package/node_modules/typebox/build/type/types/this.mjs +17 -0
- package/node_modules/typebox/build/type/types/tuple.d.mts +38 -0
- package/node_modules/typebox/build/type/types/tuple.mjs +25 -0
- package/node_modules/typebox/build/type/types/undefined.d.mts +11 -0
- package/node_modules/typebox/build/type/types/undefined.mjs +17 -0
- package/node_modules/typebox/build/type/types/union.d.mts +15 -0
- package/node_modules/typebox/build/type/types/union.mjs +24 -0
- package/node_modules/typebox/build/type/types/unknown.d.mts +10 -0
- package/node_modules/typebox/build/type/types/unknown.mjs +17 -0
- package/node_modules/typebox/build/type/types/unsafe.d.mts +10 -0
- package/node_modules/typebox/build/type/types/unsafe.mjs +20 -0
- package/node_modules/typebox/build/type/types/void.d.mts +11 -0
- package/node_modules/typebox/build/type/types/void.mjs +17 -0
- package/node_modules/typebox/build/typebox.d.mts +73 -0
- package/node_modules/typebox/build/typebox.mjs +89 -0
- package/node_modules/typebox/build/value/assert/assert.d.mts +14 -0
- package/node_modules/typebox/build/value/assert/assert.mjs +28 -0
- package/node_modules/typebox/build/value/assert/index.d.mts +1 -0
- package/node_modules/typebox/build/value/assert/index.mjs +1 -0
- package/node_modules/typebox/build/value/check/check.d.mts +5 -0
- package/node_modules/typebox/build/value/check/check.mjs +11 -0
- package/node_modules/typebox/build/value/check/index.d.mts +1 -0
- package/node_modules/typebox/build/value/check/index.mjs +1 -0
- package/node_modules/typebox/build/value/clean/additional.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/additional.mjs +6 -0
- package/node_modules/typebox/build/value/clean/clean.d.mts +15 -0
- package/node_modules/typebox/build/value/clean/clean.mjs +15 -0
- package/node_modules/typebox/build/value/clean/from_array.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_array.mjs +8 -0
- package/node_modules/typebox/build/value/clean/from_base.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_base.mjs +4 -0
- package/node_modules/typebox/build/value/clean/from_cyclic.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_cyclic.mjs +6 -0
- package/node_modules/typebox/build/value/clean/from_intersect.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_intersect.mjs +26 -0
- package/node_modules/typebox/build/value/clean/from_object.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_object.mjs +31 -0
- package/node_modules/typebox/build/value/clean/from_record.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_record.mjs +32 -0
- package/node_modules/typebox/build/value/clean/from_ref.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_ref.mjs +8 -0
- package/node_modules/typebox/build/value/clean/from_tuple.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_tuple.mjs +14 -0
- package/node_modules/typebox/build/value/clean/from_type.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_type.mjs +23 -0
- package/node_modules/typebox/build/value/clean/from_union.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_union.mjs +13 -0
- package/node_modules/typebox/build/value/clean/index.d.mts +1 -0
- package/node_modules/typebox/build/value/clean/index.mjs +1 -0
- package/node_modules/typebox/build/value/clone/clone.d.mts +5 -0
- package/node_modules/typebox/build/value/clone/clone.mjs +83 -0
- package/node_modules/typebox/build/value/clone/index.d.mts +1 -0
- package/node_modules/typebox/build/value/clone/index.mjs +1 -0
- package/node_modules/typebox/build/value/codec/callback.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/callback.mjs +25 -0
- package/node_modules/typebox/build/value/codec/decode.d.mts +12 -0
- package/node_modules/typebox/build/value/codec/decode.mjs +50 -0
- package/node_modules/typebox/build/value/codec/encode.d.mts +12 -0
- package/node_modules/typebox/build/value/codec/encode.mjs +50 -0
- package/node_modules/typebox/build/value/codec/from_array.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/from_array.mjs +38 -0
- package/node_modules/typebox/build/value/codec/from_cyclic.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/from_cyclic.mjs +8 -0
- package/node_modules/typebox/build/value/codec/from_intersect.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/from_intersect.mjs +58 -0
- package/node_modules/typebox/build/value/codec/from_object.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/from_object.mjs +45 -0
- package/node_modules/typebox/build/value/codec/from_record.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/from_record.mjs +44 -0
- package/node_modules/typebox/build/value/codec/from_ref.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/from_ref.mjs +31 -0
- package/node_modules/typebox/build/value/codec/from_tuple.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/from_tuple.mjs +35 -0
- package/node_modules/typebox/build/value/codec/from_type.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/from_type.mjs +22 -0
- package/node_modules/typebox/build/value/codec/from_union.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/from_union.mjs +40 -0
- package/node_modules/typebox/build/value/codec/has.d.mts +5 -0
- package/node_modules/typebox/build/value/codec/has.mjs +93 -0
- package/node_modules/typebox/build/value/codec/index.d.mts +3 -0
- package/node_modules/typebox/build/value/codec/index.mjs +3 -0
- package/node_modules/typebox/build/value/convert/convert.d.mts +13 -0
- package/node_modules/typebox/build/value/convert/convert.mjs +15 -0
- package/node_modules/typebox/build/value/convert/from_additional.d.mts +6 -0
- package/node_modules/typebox/build/value/convert/from_additional.mjs +18 -0
- package/node_modules/typebox/build/value/convert/from_array.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_array.mjs +7 -0
- package/node_modules/typebox/build/value/convert/from_base.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_base.mjs +4 -0
- package/node_modules/typebox/build/value/convert/from_bigint.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_bigint.mjs +6 -0
- package/node_modules/typebox/build/value/convert/from_boolean.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_boolean.mjs +6 -0
- package/node_modules/typebox/build/value/convert/from_cyclic.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_cyclic.mjs +6 -0
- package/node_modules/typebox/build/value/convert/from_enum.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_enum.mjs +7 -0
- package/node_modules/typebox/build/value/convert/from_integer.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_integer.mjs +6 -0
- package/node_modules/typebox/build/value/convert/from_intersect.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_intersect.mjs +8 -0
- package/node_modules/typebox/build/value/convert/from_literal.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_literal.mjs +44 -0
- package/node_modules/typebox/build/value/convert/from_null.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_null.mjs +6 -0
- package/node_modules/typebox/build/value/convert/from_number.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_number.mjs +6 -0
- package/node_modules/typebox/build/value/convert/from_object.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_object.mjs +28 -0
- package/node_modules/typebox/build/value/convert/from_record.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_record.mjs +23 -0
- package/node_modules/typebox/build/value/convert/from_ref.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_ref.mjs +8 -0
- package/node_modules/typebox/build/value/convert/from_string.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_string.mjs +6 -0
- package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_template_literal.mjs +7 -0
- package/node_modules/typebox/build/value/convert/from_tuple.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_tuple.mjs +11 -0
- package/node_modules/typebox/build/value/convert/from_type.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_type.mjs +45 -0
- package/node_modules/typebox/build/value/convert/from_undefined.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_undefined.mjs +6 -0
- package/node_modules/typebox/build/value/convert/from_union.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_union.mjs +13 -0
- package/node_modules/typebox/build/value/convert/from_void.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_void.mjs +6 -0
- package/node_modules/typebox/build/value/convert/index.d.mts +1 -0
- package/node_modules/typebox/build/value/convert/index.mjs +1 -0
- package/node_modules/typebox/build/value/convert/try/index.d.mts +1 -0
- package/node_modules/typebox/build/value/convert/try/index.mjs +1 -0
- package/node_modules/typebox/build/value/convert/try/try.d.mts +8 -0
- package/node_modules/typebox/build/value/convert/try/try.mjs +8 -0
- package/node_modules/typebox/build/value/convert/try/try_array.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/try/try_array.mjs +6 -0
- package/node_modules/typebox/build/value/convert/try/try_bigint.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/try/try_bigint.mjs +45 -0
- package/node_modules/typebox/build/value/convert/try/try_boolean.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/try/try_boolean.mjs +41 -0
- package/node_modules/typebox/build/value/convert/try/try_null.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/try/try_null.mjs +44 -0
- package/node_modules/typebox/build/value/convert/try/try_number.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/try/try_number.mjs +44 -0
- package/node_modules/typebox/build/value/convert/try/try_result.d.mts +8 -0
- package/node_modules/typebox/build/value/convert/try/try_result.mjs +17 -0
- package/node_modules/typebox/build/value/convert/try/try_string.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/try/try_string.mjs +12 -0
- package/node_modules/typebox/build/value/convert/try/try_undefined.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/try/try_undefined.mjs +44 -0
- package/node_modules/typebox/build/value/create/create.d.mts +5 -0
- package/node_modules/typebox/build/value/create/create.mjs +11 -0
- package/node_modules/typebox/build/value/create/error.d.mts +5 -0
- package/node_modules/typebox/build/value/create/error.mjs +7 -0
- package/node_modules/typebox/build/value/create/from_array.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_array.mjs +10 -0
- package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_async_iterator.mjs +5 -0
- package/node_modules/typebox/build/value/create/from_base.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_base.mjs +4 -0
- package/node_modules/typebox/build/value/create/from_bigint.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_bigint.mjs +7 -0
- package/node_modules/typebox/build/value/create/from_boolean.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_boolean.mjs +4 -0
- package/node_modules/typebox/build/value/create/from_constructor.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_constructor.mjs +10 -0
- package/node_modules/typebox/build/value/create/from_cyclic.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_cyclic.mjs +6 -0
- package/node_modules/typebox/build/value/create/from_default.d.mts +3 -0
- package/node_modules/typebox/build/value/create/from_default.mjs +10 -0
- package/node_modules/typebox/build/value/create/from_enum.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_enum.mjs +6 -0
- package/node_modules/typebox/build/value/create/from_function.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_function.mjs +6 -0
- package/node_modules/typebox/build/value/create/from_integer.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_integer.mjs +8 -0
- package/node_modules/typebox/build/value/create/from_intersect.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_intersect.mjs +8 -0
- package/node_modules/typebox/build/value/create/from_iterator.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_iterator.mjs +5 -0
- package/node_modules/typebox/build/value/create/from_literal.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_literal.mjs +4 -0
- package/node_modules/typebox/build/value/create/from_never.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_never.mjs +5 -0
- package/node_modules/typebox/build/value/create/from_null.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_null.mjs +4 -0
- package/node_modules/typebox/build/value/create/from_number.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_number.mjs +8 -0
- package/node_modules/typebox/build/value/create/from_object.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_object.mjs +9 -0
- package/node_modules/typebox/build/value/create/from_promise.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_promise.mjs +5 -0
- package/node_modules/typebox/build/value/create/from_record.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_record.mjs +8 -0
- package/node_modules/typebox/build/value/create/from_ref.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_ref.mjs +9 -0
- package/node_modules/typebox/build/value/create/from_string.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_string.mjs +9 -0
- package/node_modules/typebox/build/value/create/from_symbol.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_symbol.mjs +4 -0
- package/node_modules/typebox/build/value/create/from_template_literal.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_template_literal.mjs +11 -0
- package/node_modules/typebox/build/value/create/from_tuple.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_tuple.mjs +5 -0
- package/node_modules/typebox/build/value/create/from_type.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_type.mjs +69 -0
- package/node_modules/typebox/build/value/create/from_undefined.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_undefined.mjs +4 -0
- package/node_modules/typebox/build/value/create/from_union.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_union.mjs +9 -0
- package/node_modules/typebox/build/value/create/from_void.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_void.mjs +4 -0
- package/node_modules/typebox/build/value/create/index.d.mts +2 -0
- package/node_modules/typebox/build/value/create/index.mjs +2 -0
- package/node_modules/typebox/build/value/default/default.d.mts +13 -0
- package/node_modules/typebox/build/value/default/default.mjs +15 -0
- package/node_modules/typebox/build/value/default/from_array.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_array.mjs +12 -0
- package/node_modules/typebox/build/value/default/from_base.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_base.mjs +5 -0
- package/node_modules/typebox/build/value/default/from_cyclic.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_cyclic.mjs +7 -0
- package/node_modules/typebox/build/value/default/from_default.d.mts +3 -0
- package/node_modules/typebox/build/value/default/from_default.mjs +13 -0
- package/node_modules/typebox/build/value/default/from_intersect.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_intersect.mjs +9 -0
- package/node_modules/typebox/build/value/default/from_object.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_object.mjs +32 -0
- package/node_modules/typebox/build/value/default/from_record.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_record.mjs +26 -0
- package/node_modules/typebox/build/value/default/from_ref.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_ref.mjs +9 -0
- package/node_modules/typebox/build/value/default/from_tuple.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_tuple.mjs +14 -0
- package/node_modules/typebox/build/value/default/from_type.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_type.mjs +27 -0
- package/node_modules/typebox/build/value/default/from_union.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_union.mjs +14 -0
- package/node_modules/typebox/build/value/default/index.d.mts +1 -0
- package/node_modules/typebox/build/value/default/index.mjs +1 -0
- package/node_modules/typebox/build/value/delta/diff.d.mts +10 -0
- package/node_modules/typebox/build/value/delta/diff.mjs +135 -0
- package/node_modules/typebox/build/value/delta/edit.d.mts +24 -0
- package/node_modules/typebox/build/value/delta/edit.mjs +17 -0
- package/node_modules/typebox/build/value/delta/index.d.mts +3 -0
- package/node_modules/typebox/build/value/delta/index.mjs +3 -0
- package/node_modules/typebox/build/value/delta/patch.d.mts +8 -0
- package/node_modules/typebox/build/value/delta/patch.mjs +42 -0
- package/node_modules/typebox/build/value/equal/equal.d.mts +2 -0
- package/node_modules/typebox/build/value/equal/equal.mjs +6 -0
- package/node_modules/typebox/build/value/equal/index.d.mts +1 -0
- package/node_modules/typebox/build/value/equal/index.mjs +1 -0
- package/node_modules/typebox/build/value/errors/errors.d.mts +16 -0
- package/node_modules/typebox/build/value/errors/errors.mjs +17 -0
- package/node_modules/typebox/build/value/errors/index.d.mts +1 -0
- package/node_modules/typebox/build/value/errors/index.mjs +1 -0
- package/node_modules/typebox/build/value/hash/hash.d.mts +6 -0
- package/node_modules/typebox/build/value/hash/hash.mjs +10 -0
- package/node_modules/typebox/build/value/hash/index.d.mts +1 -0
- package/node_modules/typebox/build/value/hash/index.mjs +1 -0
- package/node_modules/typebox/build/value/index.d.mts +21 -0
- package/node_modules/typebox/build/value/index.mjs +30 -0
- package/node_modules/typebox/build/value/mutate/error.d.mts +3 -0
- package/node_modules/typebox/build/value/mutate/error.mjs +6 -0
- package/node_modules/typebox/build/value/mutate/from_array.d.mts +2 -0
- package/node_modules/typebox/build/value/mutate/from_array.mjs +16 -0
- package/node_modules/typebox/build/value/mutate/from_object.d.mts +2 -0
- package/node_modules/typebox/build/value/mutate/from_object.mjs +40 -0
- package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +2 -0
- package/node_modules/typebox/build/value/mutate/from_unknown.mjs +7 -0
- package/node_modules/typebox/build/value/mutate/from_value.d.mts +2 -0
- package/node_modules/typebox/build/value/mutate/from_value.mjs +12 -0
- package/node_modules/typebox/build/value/mutate/index.d.mts +1 -0
- package/node_modules/typebox/build/value/mutate/index.mjs +1 -0
- package/node_modules/typebox/build/value/mutate/mutate.d.mts +11 -0
- package/node_modules/typebox/build/value/mutate/mutate.mjs +41 -0
- package/node_modules/typebox/build/value/parse/index.d.mts +1 -0
- package/node_modules/typebox/build/value/parse/index.mjs +1 -0
- package/node_modules/typebox/build/value/parse/parse.d.mts +11 -0
- package/node_modules/typebox/build/value/parse/parse.mjs +47 -0
- package/node_modules/typebox/build/value/pipeline/index.d.mts +1 -0
- package/node_modules/typebox/build/value/pipeline/index.mjs +1 -0
- package/node_modules/typebox/build/value/pipeline/pipeline.d.mts +10 -0
- package/node_modules/typebox/build/value/pipeline/pipeline.mjs +15 -0
- package/node_modules/typebox/build/value/pointer/index.d.mts +1 -0
- package/node_modules/typebox/build/value/pointer/index.mjs +1 -0
- package/node_modules/typebox/build/value/repair/error.d.mts +7 -0
- package/node_modules/typebox/build/value/repair/error.mjs +8 -0
- package/node_modules/typebox/build/value/repair/from_array.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_array.mjs +39 -0
- package/node_modules/typebox/build/value/repair/from_base.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_base.mjs +8 -0
- package/node_modules/typebox/build/value/repair/from_enum.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_enum.mjs +7 -0
- package/node_modules/typebox/build/value/repair/from_intersect.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_intersect.mjs +8 -0
- package/node_modules/typebox/build/value/repair/from_object.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_object.mjs +33 -0
- package/node_modules/typebox/build/value/repair/from_record.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_record.mjs +33 -0
- package/node_modules/typebox/build/value/repair/from_ref.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_ref.mjs +9 -0
- package/node_modules/typebox/build/value/repair/from_template_literal.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_template_literal.mjs +7 -0
- package/node_modules/typebox/build/value/repair/from_tuple.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_tuple.mjs +12 -0
- package/node_modules/typebox/build/value/repair/from_type.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_type.mjs +86 -0
- package/node_modules/typebox/build/value/repair/from_union.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_union.mjs +24 -0
- package/node_modules/typebox/build/value/repair/from_unknown.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_unknown.mjs +12 -0
- package/node_modules/typebox/build/value/repair/index.d.mts +1 -0
- package/node_modules/typebox/build/value/repair/index.mjs +1 -0
- package/node_modules/typebox/build/value/repair/repair.d.mts +17 -0
- package/node_modules/typebox/build/value/repair/repair.mjs +20 -0
- package/node_modules/typebox/build/value/shared/index.d.mts +3 -0
- package/node_modules/typebox/build/value/shared/index.mjs +4 -0
- package/node_modules/typebox/build/value/shared/optional_undefined.d.mts +2 -0
- package/node_modules/typebox/build/value/shared/optional_undefined.mjs +15 -0
- package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +3 -0
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +36 -0
- package/node_modules/typebox/build/value/shared/union_score_select.d.mts +3 -0
- package/node_modules/typebox/build/value/shared/union_score_select.mjs +51 -0
- package/node_modules/typebox/build/value/value.d.mts +16 -0
- package/node_modules/typebox/build/value/value.mjs +16 -0
- package/node_modules/typebox/license +23 -0
- package/node_modules/typebox/package.json +87 -0
- package/node_modules/typebox/readme.md +356 -0
- package/node_modules/yaml/LICENSE +13 -0
- package/node_modules/yaml/README.md +172 -0
- package/node_modules/yaml/bin.mjs +11 -0
- package/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
- package/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
- package/node_modules/yaml/browser/dist/compose/compose-node.js +109 -0
- package/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
- package/node_modules/yaml/browser/dist/compose/composer.js +217 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
- package/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +223 -0
- package/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
- package/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
- package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
- package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
- package/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
- package/node_modules/yaml/browser/dist/doc/Document.js +335 -0
- package/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
- package/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
- package/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
- package/node_modules/yaml/browser/dist/doc/directives.js +176 -0
- package/node_modules/yaml/browser/dist/errors.js +57 -0
- package/node_modules/yaml/browser/dist/index.js +17 -0
- package/node_modules/yaml/browser/dist/log.js +11 -0
- package/node_modules/yaml/browser/dist/nodes/Alias.js +114 -0
- package/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
- package/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
- package/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
- package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
- package/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
- package/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
- package/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
- package/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
- package/node_modules/yaml/browser/dist/parse/cst.js +98 -0
- package/node_modules/yaml/browser/dist/parse/lexer.js +717 -0
- package/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
- package/node_modules/yaml/browser/dist/parse/parser.js +967 -0
- package/node_modules/yaml/browser/dist/public-api.js +102 -0
- package/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
- package/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
- package/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
- package/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
- package/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
- package/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
- package/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
- package/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
- package/node_modules/yaml/browser/dist/schema/tags.js +96 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +64 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
- package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
- package/node_modules/yaml/browser/dist/stringify/stringify.js +129 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +153 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +24 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
- package/node_modules/yaml/browser/dist/util.js +11 -0
- package/node_modules/yaml/browser/dist/visit.js +233 -0
- package/node_modules/yaml/browser/index.js +5 -0
- package/node_modules/yaml/browser/package.json +3 -0
- package/node_modules/yaml/dist/cli.d.ts +8 -0
- package/node_modules/yaml/dist/cli.mjs +201 -0
- package/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
- package/node_modules/yaml/dist/compose/compose-collection.js +90 -0
- package/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
- package/node_modules/yaml/dist/compose/compose-doc.js +45 -0
- package/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
- package/node_modules/yaml/dist/compose/compose-node.js +112 -0
- package/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
- package/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
- package/node_modules/yaml/dist/compose/composer.d.ts +63 -0
- package/node_modules/yaml/dist/compose/composer.js +222 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
- package/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-end.js +39 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +225 -0
- package/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
- package/node_modules/yaml/dist/compose/resolve-props.js +148 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
- package/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
- package/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
- package/node_modules/yaml/dist/doc/Document.d.ts +141 -0
- package/node_modules/yaml/dist/doc/Document.js +337 -0
- package/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
- package/node_modules/yaml/dist/doc/anchors.js +76 -0
- package/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
- package/node_modules/yaml/dist/doc/applyReviver.js +57 -0
- package/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
- package/node_modules/yaml/dist/doc/createNode.js +90 -0
- package/node_modules/yaml/dist/doc/directives.d.ts +49 -0
- package/node_modules/yaml/dist/doc/directives.js +178 -0
- package/node_modules/yaml/dist/errors.d.ts +21 -0
- package/node_modules/yaml/dist/errors.js +62 -0
- package/node_modules/yaml/dist/index.d.ts +25 -0
- package/node_modules/yaml/dist/index.js +50 -0
- package/node_modules/yaml/dist/log.d.ts +3 -0
- package/node_modules/yaml/dist/log.js +19 -0
- package/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/Alias.js +116 -0
- package/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
- package/node_modules/yaml/dist/nodes/Collection.js +151 -0
- package/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/Node.js +40 -0
- package/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
- package/node_modules/yaml/dist/nodes/Pair.js +39 -0
- package/node_modules/yaml/dist/nodes/Scalar.d.ts +43 -0
- package/node_modules/yaml/dist/nodes/Scalar.js +27 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
- package/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
- package/node_modules/yaml/dist/nodes/identity.js +53 -0
- package/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/toJS.js +39 -0
- package/node_modules/yaml/dist/options.d.ts +350 -0
- package/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
- package/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
- package/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
- package/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
- package/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
- package/node_modules/yaml/dist/parse/cst-visit.js +99 -0
- package/node_modules/yaml/dist/parse/cst.d.ts +109 -0
- package/node_modules/yaml/dist/parse/cst.js +112 -0
- package/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
- package/node_modules/yaml/dist/parse/lexer.js +719 -0
- package/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
- package/node_modules/yaml/dist/parse/line-counter.js +41 -0
- package/node_modules/yaml/dist/parse/parser.d.ts +84 -0
- package/node_modules/yaml/dist/parse/parser.js +972 -0
- package/node_modules/yaml/dist/public-api.d.ts +44 -0
- package/node_modules/yaml/dist/public-api.js +107 -0
- package/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
- package/node_modules/yaml/dist/schema/Schema.js +39 -0
- package/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/map.js +19 -0
- package/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
- package/node_modules/yaml/dist/schema/common/null.js +17 -0
- package/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/seq.js +19 -0
- package/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/string.js +16 -0
- package/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/bool.js +21 -0
- package/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/float.js +47 -0
- package/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/int.js +42 -0
- package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/core/schema.js +25 -0
- package/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
- package/node_modules/yaml/dist/schema/json/schema.js +64 -0
- package/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
- package/node_modules/yaml/dist/schema/tags.d.ts +48 -0
- package/node_modules/yaml/dist/schema/tags.js +99 -0
- package/node_modules/yaml/dist/schema/types.d.ts +92 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +68 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
- package/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
- package/node_modules/yaml/dist/stringify/stringify.js +132 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.js +26 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
- package/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
- package/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
- package/node_modules/yaml/dist/test-events.d.ts +4 -0
- package/node_modules/yaml/dist/test-events.js +134 -0
- package/node_modules/yaml/dist/util.d.ts +16 -0
- package/node_modules/yaml/dist/util.js +28 -0
- package/node_modules/yaml/dist/visit.d.ts +102 -0
- package/node_modules/yaml/dist/visit.js +236 -0
- package/node_modules/yaml/package.json +97 -0
- package/node_modules/yaml/util.js +2 -0
- package/package.json +60 -0
- package/src/adapters/index.ts +13 -0
- package/src/adapters/pi-subagents/agents.ts +136 -0
- package/src/adapters/pi-subagents/autocomplete.ts +46 -0
- package/src/adapters/pi-subagents/index.ts +48 -0
- package/src/adapters/types.ts +25 -0
- package/src/commands/delegation.ts +32 -0
- package/src/commands/doctor.ts +36 -0
- package/test/agent-palette.test.ts +215 -0
- package/test/wiring.test.ts +15 -0
|
@@ -0,0 +1,1355 @@
|
|
|
1
|
+
import * as fs from "node:fs";
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
import type { AgentToolResult } from "@earendil-works/pi-agent-core";
|
|
4
|
+
import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
5
|
+
import {
|
|
6
|
+
type AgentConfig,
|
|
7
|
+
type AgentDiscoveryDiagnostic,
|
|
8
|
+
type AgentScope,
|
|
9
|
+
type AgentSource,
|
|
10
|
+
defaultInheritProjectContext,
|
|
11
|
+
defaultInheritSkills,
|
|
12
|
+
defaultSystemPromptMode,
|
|
13
|
+
discoverAgentsAll,
|
|
14
|
+
buildRuntimeName,
|
|
15
|
+
findBlockingAgentDiagnostic,
|
|
16
|
+
frontmatterNameForConfig,
|
|
17
|
+
parsePackageName,
|
|
18
|
+
mergeBuiltinAgentOverride,
|
|
19
|
+
removeBuiltinAgentOverride,
|
|
20
|
+
removeBuiltinAgentOverrideFields,
|
|
21
|
+
resolveAgentName,
|
|
22
|
+
} from "./agents.ts";
|
|
23
|
+
import { serializeAgent } from "./agent-serializer.ts";
|
|
24
|
+
import { mergeAgentsForScope } from "./agent-selection.ts";
|
|
25
|
+
import { discoverAvailableSkills, resolveSkills } from "./skills.ts";
|
|
26
|
+
import {
|
|
27
|
+
buildProactiveSkillSubagentRecommendationLines,
|
|
28
|
+
} from "./proactive-skills.ts";
|
|
29
|
+
import { parseFrontmatter, parseFrontmatterList } from "./frontmatter.ts";
|
|
30
|
+
import { resolveEffectiveThinking, toModelInfo } from "../shared/model-info.ts";
|
|
31
|
+
import { resolveSubagentModelOverride, type ParentModel } from "../runs/shared/model-fallback.ts";
|
|
32
|
+
import { validateToolBudgetConfig } from "../runs/shared/tool-budget.ts";
|
|
33
|
+
import { validateAcceptanceInput } from "../runs/shared/acceptance.ts";
|
|
34
|
+
import { CODE_OWNED_EXTERNAL_CLI_ADAPTER_LABEL, isCodeOwnedExternalCliAdapterId, resolveExternalCliRunnerStatus, validateCodeOwnedProfileRunner } from "../runs/shared/external-cli-contract.ts";
|
|
35
|
+
import type { AcceptanceInput, AgentCapabilitiesSnapshot, AgentCapabilityRow, Details, ExtensionConfig, ToolBudgetConfig } from "../shared/types.ts";
|
|
36
|
+
import { getProjectConfigDir } from "../shared/utils.ts";
|
|
37
|
+
import { previewDisplayText } from "../shared/display-text.ts";
|
|
38
|
+
import { capabilityCeilingAgentRestrictionSources, isAgentAllowedByCapabilityCeiling, resolveCurrentSubagentCapabilityCeiling } from "../runs/shared/capability-ceiling.ts";
|
|
39
|
+
import { mergeRuntimeAgents, type RuntimeAgentOwner } from "./runtime-agent-registry.ts";
|
|
40
|
+
import { listExternalJobProviders } from "../api/external-job-provider.ts";
|
|
41
|
+
|
|
42
|
+
type ManagementAction = "list" | "get" | "models" | "create" | "update" | "delete" | "eject" | "disable" | "enable" | "reset";
|
|
43
|
+
type ManagementScope = "user" | "project";
|
|
44
|
+
type ManagementContext = Pick<ExtensionContext, "cwd" | "modelRegistry"> & { model?: ExtensionContext["model"]; config?: ExtensionConfig; currentSessionId?: string; runtimeAgentOwner?: RuntimeAgentOwner };
|
|
45
|
+
|
|
46
|
+
interface ManagementParams {
|
|
47
|
+
action?: string;
|
|
48
|
+
agent?: string;
|
|
49
|
+
agentScope?: unknown;
|
|
50
|
+
capabilities?: unknown;
|
|
51
|
+
config?: unknown;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function result(text: string, isError = false, details?: Partial<Details>): AgentToolResult<Details> {
|
|
55
|
+
return { content: [{ type: "text", text }], isError, details: { mode: "management", results: [], ...details } };
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function jsonDetails<T>(value: T): T {
|
|
59
|
+
return JSON.parse(JSON.stringify(value)) as T;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function presentDetails<T extends Record<string, unknown>>(value: T): T | undefined {
|
|
63
|
+
const cleaned = jsonDetails(value);
|
|
64
|
+
return Object.keys(cleaned).length > 0 ? cleaned : undefined;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function parseCsv(value: string): string[] {
|
|
68
|
+
return [...new Set(value.split(",").map((v) => v.trim()).filter(Boolean))];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
type ConfigObjectResult =
|
|
72
|
+
| { status: "ok"; value: Record<string, unknown> }
|
|
73
|
+
| { status: "missing" }
|
|
74
|
+
| { status: "error"; message: string };
|
|
75
|
+
|
|
76
|
+
function configObject(config: unknown): ConfigObjectResult {
|
|
77
|
+
let val = config;
|
|
78
|
+
if (typeof val === "string") {
|
|
79
|
+
try {
|
|
80
|
+
val = JSON.parse(val);
|
|
81
|
+
} catch (error) {
|
|
82
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
83
|
+
return { status: "error", message: `config must be valid JSON: ${message}` };
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (!val || typeof val !== "object" || Array.isArray(val)) return { status: "missing" };
|
|
87
|
+
return { status: "ok", value: val as Record<string, unknown> };
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function hasKey(obj: Record<string, unknown>, key: string): boolean {
|
|
91
|
+
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function isJsonSerializable(value: unknown): boolean {
|
|
95
|
+
if (value === null || typeof value === "string" || typeof value === "boolean") return true;
|
|
96
|
+
if (typeof value === "number") return Number.isFinite(value);
|
|
97
|
+
if (Array.isArray(value)) return value.every(isJsonSerializable);
|
|
98
|
+
if (value && typeof value === "object") return Object.values(value).every(isJsonSerializable);
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function asDisambiguationScope(scope: unknown): ManagementScope | undefined {
|
|
103
|
+
if (scope === "user" || scope === "project") return scope;
|
|
104
|
+
return undefined;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function actionScope(scope: unknown, action: ManagementAction): { scope?: ManagementScope; error?: AgentToolResult<Details> } {
|
|
108
|
+
if (scope === undefined) return { scope: "user" };
|
|
109
|
+
const parsed = asDisambiguationScope(scope);
|
|
110
|
+
return parsed ? { scope: parsed } : { error: result(`agentScope must be 'user' or 'project' for ${action}.`, true) };
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function normalizeListScope(scope: unknown): AgentScope | undefined {
|
|
114
|
+
if (scope === undefined) return "both";
|
|
115
|
+
if (scope === "user" || scope === "project" || scope === "both") return scope;
|
|
116
|
+
return undefined;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function sanitizeName(name: string): string {
|
|
120
|
+
return name.toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function parsePackageConfig(value: unknown): { packageName?: string; error?: string } {
|
|
124
|
+
return parsePackageName(value, "config.package");
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function allAgents(d: { builtin: AgentConfig[]; package: AgentConfig[]; user: AgentConfig[]; project: AgentConfig[] }): AgentConfig[] {
|
|
128
|
+
return [...d.builtin, ...d.package, ...d.user, ...d.project];
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function effectiveAgentsForScope(
|
|
132
|
+
scope: AgentScope,
|
|
133
|
+
d: { builtin: AgentConfig[]; package: AgentConfig[]; user: AgentConfig[]; project: AgentConfig[] },
|
|
134
|
+
runtimeAgentOwner?: RuntimeAgentOwner,
|
|
135
|
+
): AgentConfig[] {
|
|
136
|
+
let agents = mergeAgentsForScope(scope, d.user, d.project, d.builtin, d.package);
|
|
137
|
+
if (runtimeAgentOwner) {
|
|
138
|
+
agents = mergeRuntimeAgents(runtimeAgentOwner, { agents }, allAgents(d)).agents;
|
|
139
|
+
}
|
|
140
|
+
return agents;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function availableAgentNamesFromDiscovery(
|
|
144
|
+
d: { builtin: AgentConfig[]; package: AgentConfig[]; user: AgentConfig[]; project: AgentConfig[] },
|
|
145
|
+
runtimeAgentOwner?: RuntimeAgentOwner,
|
|
146
|
+
): string[] {
|
|
147
|
+
const agents = runtimeAgentOwner ? effectiveAgentsForScope("both", d, runtimeAgentOwner) : allAgents(d);
|
|
148
|
+
return [...new Set(agents.map((agent) => agent.name))].sort((a, b) => a.localeCompare(b));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function availableAgentNames(cwd: string): string[] {
|
|
152
|
+
return availableAgentNamesFromDiscovery(discoverAgentsAll(cwd));
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function findAgentsInDiscovery(
|
|
156
|
+
name: string,
|
|
157
|
+
d: { builtin: AgentConfig[]; package: AgentConfig[]; user: AgentConfig[]; project: AgentConfig[] },
|
|
158
|
+
scope: AgentScope = "both",
|
|
159
|
+
runtimeAgentOwner?: RuntimeAgentOwner,
|
|
160
|
+
): AgentConfig[] {
|
|
161
|
+
const raw = name.trim();
|
|
162
|
+
const sanitized = sanitizeName(raw);
|
|
163
|
+
const scoped = effectiveAgentsForScope(scope, d, runtimeAgentOwner);
|
|
164
|
+
let resolved = resolveAgentName(raw, scoped);
|
|
165
|
+
if (!resolved.agent && !resolved.error && sanitized !== raw) resolved = resolveAgentName(sanitized, scoped);
|
|
166
|
+
if (resolved.agent) return scoped.filter((agent) => agent.name === resolved.agent!.name).sort((a, b) => a.source.localeCompare(b.source));
|
|
167
|
+
return scoped
|
|
168
|
+
.filter((agent) => Boolean(resolveAgentName(raw, [agent]).agent)
|
|
169
|
+
|| (sanitized !== raw && Boolean(resolveAgentName(sanitized, [agent]).agent)))
|
|
170
|
+
.sort((a, b) => a.source.localeCompare(b.source));
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function findAgents(name: string, cwd: string, scope: AgentScope = "both"): AgentConfig[] {
|
|
174
|
+
return findAgentsInDiscovery(name, discoverAgentsAll(cwd), scope);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function diagnosticsForScope(diagnostics: AgentDiscoveryDiagnostic[] | undefined, scope: AgentScope): AgentDiscoveryDiagnostic[] | undefined {
|
|
178
|
+
if (scope === "both") return diagnostics;
|
|
179
|
+
const excludedSource = scope === "user" ? "project" : "user";
|
|
180
|
+
return diagnostics?.filter((diagnostic) => diagnostic.source !== excludedSource);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const AGENT_SOURCE_PRECEDENCE: Record<AgentSource, number> = { builtin: 0, package: 1, user: 2, project: 3, runtime: 4 };
|
|
184
|
+
|
|
185
|
+
// Returns the highest-precedence definition for a resolved canonical name (project > user > package > builtin),
|
|
186
|
+
// matching mergeAgentsForScope for "both", including disabled agents so disable/enable can locate hidden targets.
|
|
187
|
+
function resolveEffectiveAgent(d: ReturnType<typeof discoverAgentsAll>, name: string): { agent?: AgentConfig; error?: string } {
|
|
188
|
+
const raw = name.trim();
|
|
189
|
+
const candidates = allAgents(d);
|
|
190
|
+
let resolved = resolveAgentName(raw, candidates);
|
|
191
|
+
if (!resolved.agent && !resolved.error) {
|
|
192
|
+
const sanitized = sanitizeName(raw);
|
|
193
|
+
if (sanitized !== raw) resolved = resolveAgentName(sanitized, candidates);
|
|
194
|
+
}
|
|
195
|
+
if (resolved.error) return { error: resolved.error };
|
|
196
|
+
if (!resolved.agent) return {};
|
|
197
|
+
const matches = candidates.filter((agent) => agent.name === resolved.agent!.name);
|
|
198
|
+
return { agent: matches.reduce((best, agent) => (AGENT_SOURCE_PRECEDENCE[agent.source] > AGENT_SOURCE_PRECEDENCE[best.source] ? agent : best)) };
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
function nameExistsInScope(cwd: string, scope: ManagementScope, name: string, excludePath?: string): boolean {
|
|
202
|
+
const d = discoverAgentsAll(cwd);
|
|
203
|
+
for (const a of scope === "user" ? d.user : d.project) {
|
|
204
|
+
if (a.name === name && a.filePath !== excludePath) return true;
|
|
205
|
+
}
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function isMutableSource(source: AgentSource): source is ManagementScope {
|
|
210
|
+
return source === "user" || source === "project";
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
function modelWarning(ctx: ManagementContext, model: string | undefined): string | undefined {
|
|
214
|
+
if (!model) return undefined;
|
|
215
|
+
const found = ctx.modelRegistry.getAvailable().some((m) => `${m.provider}/${m.id}` === model || m.id === model);
|
|
216
|
+
if (found) return undefined;
|
|
217
|
+
return `Warning: model '${model}' is not in the current model registry. Run subagent({ action: "models" }) to list valid provider/id selectors, then use the exact provider/id form (bare ids resolve only when unique).`;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
function fallbackModelsWarning(ctx: ManagementContext, fallbackModels: string[] | undefined): string | undefined {
|
|
221
|
+
if (!fallbackModels || fallbackModels.length === 0) return undefined;
|
|
222
|
+
const available = new Set(ctx.modelRegistry.getAvailable().flatMap((m) => [`${m.provider}/${m.id}`, m.id]));
|
|
223
|
+
const missing = fallbackModels.filter((model) => !available.has(model));
|
|
224
|
+
return missing.length ? `Warning: fallback models not in the current model registry: ${missing.join(", ")}.` : undefined;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function skillsWarning(cwd: string, agent: Pick<AgentConfig, "skills" | "skillPath" | "filePath">): string | undefined {
|
|
228
|
+
if (!agent.skills?.length) return undefined;
|
|
229
|
+
const { missing } = resolveSkills(
|
|
230
|
+
agent.skills,
|
|
231
|
+
cwd,
|
|
232
|
+
agent.skillPath,
|
|
233
|
+
agent.filePath ? path.dirname(agent.filePath) : cwd,
|
|
234
|
+
);
|
|
235
|
+
return missing.length ? `Warning: skills not found: ${missing.join(", ")}.` : undefined;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
function withDeclaredExtensionPaths(config: AgentConfig, filePath: string): AgentConfig {
|
|
239
|
+
const { frontmatter } = parseFrontmatter(fs.readFileSync(filePath, "utf-8"));
|
|
240
|
+
const { extensions: _extensions, subagentOnlyExtensions: _subagentOnlyExtensions, ...withoutResolvedExtensions } = config;
|
|
241
|
+
return {
|
|
242
|
+
...withoutResolvedExtensions,
|
|
243
|
+
...(frontmatter.extensions !== undefined ? { extensions: parseFrontmatterList(frontmatter.extensions) } : {}),
|
|
244
|
+
...(frontmatter.subagentOnlyExtensions !== undefined
|
|
245
|
+
? { subagentOnlyExtensions: parseFrontmatterList(frontmatter.subagentOnlyExtensions) }
|
|
246
|
+
: {}),
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export function editableAgentConfig(agent: AgentConfig): AgentConfig {
|
|
251
|
+
const { extensions: _extensions, ...withoutExtensions } = agent;
|
|
252
|
+
const base = agent.override?.base;
|
|
253
|
+
const {
|
|
254
|
+
override: _override,
|
|
255
|
+
output: _output,
|
|
256
|
+
outputMode: _outputMode,
|
|
257
|
+
defaultReads: _defaultReads,
|
|
258
|
+
model: _model,
|
|
259
|
+
fallbackModels: _fallbackModels,
|
|
260
|
+
thinking: _thinking,
|
|
261
|
+
systemPromptMode: _systemPromptMode,
|
|
262
|
+
inheritProjectContext: _inheritProjectContext,
|
|
263
|
+
inheritGlobalContext: _inheritGlobalContext,
|
|
264
|
+
inheritSkills: _inheritSkills,
|
|
265
|
+
defaultContext: _defaultContext,
|
|
266
|
+
acceptanceRole: _acceptanceRole,
|
|
267
|
+
disabled: _disabled,
|
|
268
|
+
systemPrompt: _systemPrompt,
|
|
269
|
+
skills: _skills,
|
|
270
|
+
skillPath: _skillPath,
|
|
271
|
+
tools: _tools,
|
|
272
|
+
excludeTools: _excludeTools,
|
|
273
|
+
mcpDirectTools: _mcpDirectTools,
|
|
274
|
+
subagentOnlyExtensions: _subagentOnlyExtensions,
|
|
275
|
+
mutationTools: _mutationTools,
|
|
276
|
+
completionGuard: _completionGuard,
|
|
277
|
+
...editable
|
|
278
|
+
} = withoutExtensions;
|
|
279
|
+
if (!base) {
|
|
280
|
+
return withDeclaredExtensionPaths({
|
|
281
|
+
...withoutExtensions,
|
|
282
|
+
...(agent.extensionsFromDefault ? {} : agent.extensions !== undefined ? { extensions: [...agent.extensions] } : {}),
|
|
283
|
+
}, agent.filePath);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
return withDeclaredExtensionPaths({
|
|
287
|
+
...editable,
|
|
288
|
+
...(base.output !== undefined ? { output: base.output } : {}),
|
|
289
|
+
...(base.outputMode !== undefined ? { outputMode: base.outputMode } : {}),
|
|
290
|
+
...(base.defaultReads !== undefined ? { defaultReads: [...base.defaultReads] } : {}),
|
|
291
|
+
...(base.model !== undefined ? { model: base.model } : {}),
|
|
292
|
+
...(base.fallbackModels !== undefined ? { fallbackModels: [...base.fallbackModels] } : {}),
|
|
293
|
+
...(base.thinking !== undefined ? { thinking: base.thinking } : {}),
|
|
294
|
+
systemPromptMode: base.systemPromptMode,
|
|
295
|
+
inheritProjectContext: base.inheritProjectContext,
|
|
296
|
+
inheritGlobalContext: base.inheritGlobalContext,
|
|
297
|
+
inheritSkills: base.inheritSkills,
|
|
298
|
+
...(base.defaultContext !== undefined ? { defaultContext: base.defaultContext } : {}),
|
|
299
|
+
...(base.acceptanceRole !== undefined ? { acceptanceRole: base.acceptanceRole } : {}),
|
|
300
|
+
...(base.disabled !== undefined ? { disabled: base.disabled } : {}),
|
|
301
|
+
systemPrompt: base.systemPrompt,
|
|
302
|
+
...(base.skills !== undefined ? { skills: [...base.skills] } : {}),
|
|
303
|
+
...(base.skillPath !== undefined ? { skillPath: [...base.skillPath] } : {}),
|
|
304
|
+
...(base.tools !== undefined ? { tools: [...base.tools] } : {}),
|
|
305
|
+
...(base.excludeTools !== undefined ? { excludeTools: [...base.excludeTools] } : {}),
|
|
306
|
+
...(base.mcpDirectTools !== undefined ? { mcpDirectTools: [...base.mcpDirectTools] } : {}),
|
|
307
|
+
...(base.extensions !== undefined ? { extensions: [...base.extensions] } : {}),
|
|
308
|
+
...(base.subagentOnlyExtensions !== undefined ? { subagentOnlyExtensions: [...base.subagentOnlyExtensions] } : {}),
|
|
309
|
+
...(base.mutationTools !== undefined ? { mutationTools: [...base.mutationTools] } : {}),
|
|
310
|
+
...(base.completionGuard !== undefined ? { completionGuard: base.completionGuard } : {}),
|
|
311
|
+
}, agent.filePath);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
function readAgentFrontmatterFields(filePath: string): Set<string> {
|
|
315
|
+
try {
|
|
316
|
+
const { frontmatter } = parseFrontmatter(fs.readFileSync(filePath, "utf-8"));
|
|
317
|
+
return new Set(Object.keys(frontmatter));
|
|
318
|
+
} catch {
|
|
319
|
+
return new Set();
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export function preservedAgentFrontmatterFields(agent: AgentConfig, cfg: Record<string, unknown>): Set<string> {
|
|
324
|
+
const fields = readAgentFrontmatterFields(agent.filePath);
|
|
325
|
+
const changed = (...names: string[]) => {
|
|
326
|
+
for (const name of names) fields.delete(name);
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
if (hasKey(cfg, "name")) changed("name");
|
|
330
|
+
if (hasKey(cfg, "package")) changed("package");
|
|
331
|
+
if (hasKey(cfg, "description")) changed("description");
|
|
332
|
+
if (hasKey(cfg, "aliases")) changed("alias", "aliases");
|
|
333
|
+
if (hasKey(cfg, "systemPrompt")) changed("systemPrompt");
|
|
334
|
+
if (hasKey(cfg, "runner")) changed("runner");
|
|
335
|
+
if (hasKey(cfg, "model")) changed("model");
|
|
336
|
+
if (hasKey(cfg, "fallbackModels")) changed("fallbackModels");
|
|
337
|
+
if (hasKey(cfg, "tools")) changed("tools");
|
|
338
|
+
if (hasKey(cfg, "excludeTools")) changed("excludeTools");
|
|
339
|
+
if (hasKey(cfg, "skills")) changed("skill", "skills");
|
|
340
|
+
if (hasKey(cfg, "skillPath")) changed("skillPath");
|
|
341
|
+
if (hasKey(cfg, "extensions")) changed("extensions");
|
|
342
|
+
if (hasKey(cfg, "subagentOnlyExtensions")) changed("subagentOnlyExtensions");
|
|
343
|
+
if (hasKey(cfg, "mutationTools")) changed("mutationTools");
|
|
344
|
+
if (hasKey(cfg, "thinking")) {
|
|
345
|
+
changed("thinking");
|
|
346
|
+
if (cfg.thinking === "off") fields.add("thinking");
|
|
347
|
+
}
|
|
348
|
+
if (hasKey(cfg, "systemPromptMode")) {
|
|
349
|
+
changed("systemPromptMode");
|
|
350
|
+
fields.add("systemPromptMode");
|
|
351
|
+
}
|
|
352
|
+
if (hasKey(cfg, "inheritProjectContext")) {
|
|
353
|
+
changed("inheritProjectContext");
|
|
354
|
+
fields.add("inheritProjectContext");
|
|
355
|
+
}
|
|
356
|
+
if (hasKey(cfg, "inheritGlobalContext")) {
|
|
357
|
+
changed("inheritGlobalContext");
|
|
358
|
+
fields.add("inheritGlobalContext");
|
|
359
|
+
}
|
|
360
|
+
if (hasKey(cfg, "inheritSkills")) {
|
|
361
|
+
changed("inheritSkills");
|
|
362
|
+
fields.add("inheritSkills");
|
|
363
|
+
}
|
|
364
|
+
if (hasKey(cfg, "defaultContext")) changed("defaultContext");
|
|
365
|
+
if (hasKey(cfg, "async")) changed("async");
|
|
366
|
+
if (hasKey(cfg, "timeoutMs")) changed("timeoutMs");
|
|
367
|
+
if (hasKey(cfg, "acceptance")) changed("acceptance");
|
|
368
|
+
if (hasKey(cfg, "acceptanceRole")) changed("acceptanceRole");
|
|
369
|
+
if (hasKey(cfg, "output")) changed("output");
|
|
370
|
+
if (hasKey(cfg, "outputMode")) changed("outputMode");
|
|
371
|
+
if (hasKey(cfg, "reads")) changed("defaultReads");
|
|
372
|
+
if (hasKey(cfg, "progress")) changed("defaultProgress");
|
|
373
|
+
if (hasKey(cfg, "maxSubagentDepth")) changed("maxSubagentDepth");
|
|
374
|
+
if (hasKey(cfg, "completionGuard")) {
|
|
375
|
+
changed("completionGuard");
|
|
376
|
+
if (cfg.completionGuard === true) fields.add("completionGuard");
|
|
377
|
+
}
|
|
378
|
+
if (hasKey(cfg, "toolBudget")) changed("toolBudget");
|
|
379
|
+
|
|
380
|
+
return fields;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
function parseTools(raw: string): { tools?: string[]; mcpDirectTools?: string[] } {
|
|
384
|
+
const tools: string[] = [];
|
|
385
|
+
const mcpDirectTools: string[] = [];
|
|
386
|
+
for (const item of parseCsv(raw)) {
|
|
387
|
+
if (item.startsWith("mcp:")) {
|
|
388
|
+
const direct = item.slice(4).trim();
|
|
389
|
+
if (direct) mcpDirectTools.push(direct);
|
|
390
|
+
} else tools.push(item);
|
|
391
|
+
}
|
|
392
|
+
return {
|
|
393
|
+
...(tools.length ? { tools } : {}),
|
|
394
|
+
...(mcpDirectTools.length ? { mcpDirectTools } : {}),
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
function applyAgentConfig(target: AgentConfig, cfg: Record<string, unknown>): string | undefined {
|
|
399
|
+
if (hasKey(cfg, "aliases")) {
|
|
400
|
+
if (cfg.aliases === false || cfg.aliases === "") delete target.aliases;
|
|
401
|
+
else if (typeof cfg.aliases === "string") {
|
|
402
|
+
const aliases = parseCsv(cfg.aliases).filter((alias) => alias !== target.name);
|
|
403
|
+
if (aliases.length) target.aliases = aliases;
|
|
404
|
+
else delete target.aliases;
|
|
405
|
+
} else if (Array.isArray(cfg.aliases) && cfg.aliases.every((entry) => typeof entry === "string")) {
|
|
406
|
+
const aliases = [...new Set(cfg.aliases.map((entry) => entry.trim()).filter(Boolean).filter((alias) => alias !== target.name))];
|
|
407
|
+
if (aliases.length) target.aliases = aliases;
|
|
408
|
+
else delete target.aliases;
|
|
409
|
+
} else return "config.aliases must be a comma-separated string, string array, or false when provided.";
|
|
410
|
+
}
|
|
411
|
+
if (hasKey(cfg, "systemPrompt")) {
|
|
412
|
+
if (cfg.systemPrompt === false || cfg.systemPrompt === "") target.systemPrompt = "";
|
|
413
|
+
else if (typeof cfg.systemPrompt === "string") target.systemPrompt = cfg.systemPrompt;
|
|
414
|
+
else return "config.systemPrompt must be a string or false when provided.";
|
|
415
|
+
}
|
|
416
|
+
if (hasKey(cfg, "runner")) {
|
|
417
|
+
if (cfg.runner === false || cfg.runner === "") delete target.runner;
|
|
418
|
+
else if (cfg.runner && typeof cfg.runner === "object" && !Array.isArray(cfg.runner)) {
|
|
419
|
+
const runner = cfg.runner as Record<string, unknown>;
|
|
420
|
+
if (runner.type === "pi" && Object.keys(runner).every((key) => key === "type")) target.runner = { type: "pi" };
|
|
421
|
+
else if (runner.type === "external-cli" && typeof runner.command === "string" && runner.command.trim()
|
|
422
|
+
&& (runner.args === undefined || (Array.isArray(runner.args) && runner.args.every((arg) => typeof arg === "string")))
|
|
423
|
+
&& (runner.adapter === undefined || isCodeOwnedExternalCliAdapterId(runner.adapter))
|
|
424
|
+
&& (runner.adapter === undefined || runner.args === undefined || runner.args.length === 0)
|
|
425
|
+
&& (runner.promptDelivery === undefined || runner.promptDelivery === "stdin")
|
|
426
|
+
&& Object.keys(runner).every((key) => ["type", "adapter", "command", "args", "promptDelivery"].includes(key))) {
|
|
427
|
+
const runnerArgs = Array.isArray(runner.args) ? runner.args.filter((arg): arg is string => typeof arg === "string") : undefined;
|
|
428
|
+
target.runner = { type: "external-cli", ...(isCodeOwnedExternalCliAdapterId(runner.adapter) ? { adapter: runner.adapter } : {}), command: runner.command.trim(), ...(runnerArgs?.length ? { args: runnerArgs } : {}), ...(runner.promptDelivery ? { promptDelivery: "stdin" } : {}) };
|
|
429
|
+
} else if (runner.type === "external-job" && typeof runner.provider === "string" && runner.provider.trim() === runner.provider && runner.provider
|
|
430
|
+
&& (runner.options === undefined || (runner.options && typeof runner.options === "object" && !Array.isArray(runner.options) && isJsonSerializable(runner.options)))
|
|
431
|
+
&& Object.keys(runner).every((key) => ["type", "provider", "options"].includes(key))) {
|
|
432
|
+
target.runner = { type: "external-job", provider: runner.provider, ...(runner.options ? { options: runner.options as Record<string, unknown> } : {}) };
|
|
433
|
+
} else return `config.runner must be { type: 'pi' }, { type: 'external-cli', adapter?: ${CODE_OWNED_EXTERNAL_CLI_ADAPTER_LABEL}, command: string, args?: string[], promptDelivery?: 'stdin' }, or { type: 'external-job', provider: string, options?: object }.`;
|
|
434
|
+
} else return "config.runner must be an object, false, or empty string when provided.";
|
|
435
|
+
}
|
|
436
|
+
if (hasKey(cfg, "model")) {
|
|
437
|
+
if (cfg.model === false || cfg.model === "") delete target.model;
|
|
438
|
+
else if (typeof cfg.model === "string") {
|
|
439
|
+
const model = cfg.model.trim();
|
|
440
|
+
if (model) target.model = model;
|
|
441
|
+
else delete target.model;
|
|
442
|
+
} else return "config.model must be a string or false when provided.";
|
|
443
|
+
}
|
|
444
|
+
if (hasKey(cfg, "fallbackModels")) {
|
|
445
|
+
if (cfg.fallbackModels === false || cfg.fallbackModels === "") delete target.fallbackModels;
|
|
446
|
+
else if (typeof cfg.fallbackModels === "string") {
|
|
447
|
+
const models = parseCsv(cfg.fallbackModels);
|
|
448
|
+
if (models.length) target.fallbackModels = models;
|
|
449
|
+
else delete target.fallbackModels;
|
|
450
|
+
} else if (Array.isArray(cfg.fallbackModels)) {
|
|
451
|
+
const models = cfg.fallbackModels
|
|
452
|
+
.filter((value): value is string => typeof value === "string")
|
|
453
|
+
.map((value) => value.trim())
|
|
454
|
+
.filter(Boolean);
|
|
455
|
+
if (models.length) target.fallbackModels = [...new Set(models)];
|
|
456
|
+
else delete target.fallbackModels;
|
|
457
|
+
} else return "config.fallbackModels must be a comma-separated string, string array, or false when provided.";
|
|
458
|
+
}
|
|
459
|
+
if (hasKey(cfg, "tools")) {
|
|
460
|
+
if (cfg.tools === false || cfg.tools === "") { delete target.tools; delete target.mcpDirectTools; }
|
|
461
|
+
else if (typeof cfg.tools === "string") {
|
|
462
|
+
const parsed = parseTools(cfg.tools);
|
|
463
|
+
if (parsed.tools) target.tools = parsed.tools;
|
|
464
|
+
else delete target.tools;
|
|
465
|
+
if (parsed.mcpDirectTools) target.mcpDirectTools = parsed.mcpDirectTools;
|
|
466
|
+
else delete target.mcpDirectTools;
|
|
467
|
+
} else return "config.tools must be a comma-separated string or false when provided.";
|
|
468
|
+
}
|
|
469
|
+
if (hasKey(cfg, "excludeTools")) {
|
|
470
|
+
if (cfg.excludeTools === false || cfg.excludeTools === "") delete target.excludeTools;
|
|
471
|
+
else if (typeof cfg.excludeTools === "string") {
|
|
472
|
+
const excludeTools = parseCsv(cfg.excludeTools);
|
|
473
|
+
if (excludeTools.length) target.excludeTools = [...new Set(excludeTools)];
|
|
474
|
+
else delete target.excludeTools;
|
|
475
|
+
} else if (Array.isArray(cfg.excludeTools) && cfg.excludeTools.every((entry) => typeof entry === "string")) {
|
|
476
|
+
const excludeTools = [...new Set(cfg.excludeTools.map((entry) => entry.trim()).filter(Boolean))];
|
|
477
|
+
if (excludeTools.length) target.excludeTools = excludeTools;
|
|
478
|
+
else delete target.excludeTools;
|
|
479
|
+
} else return "config.excludeTools must be a comma-separated string, string array, or false when provided.";
|
|
480
|
+
}
|
|
481
|
+
if (hasKey(cfg, "skills")) {
|
|
482
|
+
if (cfg.skills === false || cfg.skills === "") delete target.skills;
|
|
483
|
+
else if (typeof cfg.skills === "string") {
|
|
484
|
+
const skills = parseCsv(cfg.skills);
|
|
485
|
+
if (skills.length) target.skills = skills;
|
|
486
|
+
else delete target.skills;
|
|
487
|
+
} else return "config.skills must be a comma-separated string or false when provided.";
|
|
488
|
+
}
|
|
489
|
+
if (hasKey(cfg, "skillPath")) {
|
|
490
|
+
if (cfg.skillPath === false || cfg.skillPath === "") delete target.skillPath;
|
|
491
|
+
else if (typeof cfg.skillPath === "string") {
|
|
492
|
+
const skillPath = parseCsv(cfg.skillPath);
|
|
493
|
+
if (skillPath.length) target.skillPath = skillPath;
|
|
494
|
+
else delete target.skillPath;
|
|
495
|
+
} else if (Array.isArray(cfg.skillPath) && cfg.skillPath.every((entry) => typeof entry === "string")) {
|
|
496
|
+
const skillPath = [...new Set(cfg.skillPath.map((entry) => entry.trim()).filter(Boolean))];
|
|
497
|
+
if (skillPath.length) target.skillPath = skillPath;
|
|
498
|
+
else delete target.skillPath;
|
|
499
|
+
} else return "config.skillPath must be a comma-separated string, string array, or false when provided.";
|
|
500
|
+
}
|
|
501
|
+
if (hasKey(cfg, "extensions")) {
|
|
502
|
+
if (cfg.extensions === false) delete target.extensions;
|
|
503
|
+
else if (cfg.extensions === "") target.extensions = [];
|
|
504
|
+
else if (typeof cfg.extensions === "string") target.extensions = parseCsv(cfg.extensions);
|
|
505
|
+
else return "config.extensions must be a comma-separated string, empty string, or false when provided.";
|
|
506
|
+
}
|
|
507
|
+
if (hasKey(cfg, "subagentOnlyExtensions")) {
|
|
508
|
+
if (cfg.subagentOnlyExtensions === false) delete target.subagentOnlyExtensions;
|
|
509
|
+
else if (cfg.subagentOnlyExtensions === "") target.subagentOnlyExtensions = [];
|
|
510
|
+
else if (typeof cfg.subagentOnlyExtensions === "string") target.subagentOnlyExtensions = parseCsv(cfg.subagentOnlyExtensions);
|
|
511
|
+
else return "config.subagentOnlyExtensions must be a comma-separated string, empty string, or false when provided.";
|
|
512
|
+
}
|
|
513
|
+
if (hasKey(cfg, "mutationTools")) {
|
|
514
|
+
if (cfg.mutationTools === false) delete target.mutationTools;
|
|
515
|
+
else if (cfg.mutationTools === "") target.mutationTools = [];
|
|
516
|
+
else if (typeof cfg.mutationTools === "string") target.mutationTools = parseCsv(cfg.mutationTools);
|
|
517
|
+
else return "config.mutationTools must be a comma-separated string, empty string, or false when provided.";
|
|
518
|
+
}
|
|
519
|
+
if (hasKey(cfg, "thinking")) {
|
|
520
|
+
if (cfg.thinking === false || cfg.thinking === "") delete target.thinking;
|
|
521
|
+
else if (typeof cfg.thinking === "string") {
|
|
522
|
+
const thinking = cfg.thinking.trim();
|
|
523
|
+
if (thinking) target.thinking = thinking;
|
|
524
|
+
else delete target.thinking;
|
|
525
|
+
} else return "config.thinking must be a string or false when provided.";
|
|
526
|
+
}
|
|
527
|
+
if (hasKey(cfg, "systemPromptMode")) {
|
|
528
|
+
if (cfg.systemPromptMode === "append" || cfg.systemPromptMode === "replace") target.systemPromptMode = cfg.systemPromptMode;
|
|
529
|
+
else return "config.systemPromptMode must be 'append' or 'replace' when provided.";
|
|
530
|
+
}
|
|
531
|
+
if (hasKey(cfg, "inheritProjectContext")) {
|
|
532
|
+
if (typeof cfg.inheritProjectContext !== "boolean") return "config.inheritProjectContext must be a boolean when provided.";
|
|
533
|
+
target.inheritProjectContext = cfg.inheritProjectContext;
|
|
534
|
+
}
|
|
535
|
+
if (hasKey(cfg, "inheritGlobalContext")) {
|
|
536
|
+
if (typeof cfg.inheritGlobalContext !== "boolean") return "config.inheritGlobalContext must be a boolean when provided.";
|
|
537
|
+
target.inheritGlobalContext = cfg.inheritGlobalContext;
|
|
538
|
+
}
|
|
539
|
+
if (hasKey(cfg, "inheritSkills")) {
|
|
540
|
+
if (typeof cfg.inheritSkills !== "boolean") return "config.inheritSkills must be a boolean when provided.";
|
|
541
|
+
target.inheritSkills = cfg.inheritSkills;
|
|
542
|
+
}
|
|
543
|
+
if (hasKey(cfg, "defaultContext")) {
|
|
544
|
+
if (cfg.defaultContext === false || cfg.defaultContext === "") delete target.defaultContext;
|
|
545
|
+
else if (cfg.defaultContext === "fresh" || cfg.defaultContext === "fork") target.defaultContext = cfg.defaultContext;
|
|
546
|
+
else return "config.defaultContext must be 'fresh', 'fork', or false when provided.";
|
|
547
|
+
}
|
|
548
|
+
if (hasKey(cfg, "async")) {
|
|
549
|
+
if (cfg.async === "") delete target.defaultAsync;
|
|
550
|
+
else if (typeof cfg.async === "boolean") target.defaultAsync = cfg.async;
|
|
551
|
+
else return "config.async must be a boolean or empty string when provided.";
|
|
552
|
+
}
|
|
553
|
+
if (hasKey(cfg, "timeoutMs")) {
|
|
554
|
+
if (cfg.timeoutMs === false || cfg.timeoutMs === "") delete target.defaultTimeoutMs;
|
|
555
|
+
else if (typeof cfg.timeoutMs === "number" && Number.isInteger(cfg.timeoutMs) && cfg.timeoutMs > 0) target.defaultTimeoutMs = cfg.timeoutMs;
|
|
556
|
+
else return "config.timeoutMs must be a positive integer or false when provided.";
|
|
557
|
+
}
|
|
558
|
+
if (hasKey(cfg, "acceptance")) {
|
|
559
|
+
if (cfg.acceptance === "") delete target.defaultAcceptance;
|
|
560
|
+
else {
|
|
561
|
+
const errors = validateAcceptanceInput(cfg.acceptance, "config.acceptance");
|
|
562
|
+
if (errors.length > 0) return errors.join(" ");
|
|
563
|
+
target.defaultAcceptance = cfg.acceptance as AcceptanceInput;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
if (hasKey(cfg, "acceptanceRole")) {
|
|
567
|
+
if (cfg.acceptanceRole === false || cfg.acceptanceRole === "") delete target.acceptanceRole;
|
|
568
|
+
else if (cfg.acceptanceRole === "read-only" || cfg.acceptanceRole === "writer") target.acceptanceRole = cfg.acceptanceRole;
|
|
569
|
+
else return "config.acceptanceRole must be 'read-only', 'writer', or false when provided.";
|
|
570
|
+
}
|
|
571
|
+
if (hasKey(cfg, "output")) {
|
|
572
|
+
if (cfg.output === false || cfg.output === "") delete target.output;
|
|
573
|
+
else if (typeof cfg.output === "string") target.output = cfg.output;
|
|
574
|
+
else return "config.output must be a string or false when provided.";
|
|
575
|
+
}
|
|
576
|
+
if (hasKey(cfg, "outputMode")) {
|
|
577
|
+
if (cfg.outputMode === "inline" || cfg.outputMode === "file-only") target.outputMode = cfg.outputMode;
|
|
578
|
+
else return "config.outputMode must be 'inline' or 'file-only' when provided.";
|
|
579
|
+
}
|
|
580
|
+
if (hasKey(cfg, "reads")) {
|
|
581
|
+
if (cfg.reads === false || cfg.reads === "") delete target.defaultReads;
|
|
582
|
+
else if (typeof cfg.reads === "string") {
|
|
583
|
+
const reads = parseCsv(cfg.reads);
|
|
584
|
+
if (reads.length) target.defaultReads = reads;
|
|
585
|
+
else delete target.defaultReads;
|
|
586
|
+
} else return "config.reads must be a comma-separated string or false when provided.";
|
|
587
|
+
}
|
|
588
|
+
if (hasKey(cfg, "progress")) {
|
|
589
|
+
if (typeof cfg.progress !== "boolean") return "config.progress must be a boolean when provided.";
|
|
590
|
+
target.defaultProgress = cfg.progress;
|
|
591
|
+
}
|
|
592
|
+
if (hasKey(cfg, "maxSubagentDepth")) {
|
|
593
|
+
if (cfg.maxSubagentDepth === false || cfg.maxSubagentDepth === "") delete target.maxSubagentDepth;
|
|
594
|
+
else if (typeof cfg.maxSubagentDepth === "number" && Number.isInteger(cfg.maxSubagentDepth) && cfg.maxSubagentDepth >= 0) {
|
|
595
|
+
target.maxSubagentDepth = cfg.maxSubagentDepth;
|
|
596
|
+
} else return "config.maxSubagentDepth must be an integer >= 0 or false when provided.";
|
|
597
|
+
}
|
|
598
|
+
if (hasKey(cfg, "completionGuard")) {
|
|
599
|
+
if (typeof cfg.completionGuard !== "boolean") return "config.completionGuard must be a boolean when provided.";
|
|
600
|
+
target.completionGuard = cfg.completionGuard;
|
|
601
|
+
}
|
|
602
|
+
if (hasKey(cfg, "toolBudget")) {
|
|
603
|
+
if (cfg.toolBudget === false || cfg.toolBudget === "") delete target.toolBudget;
|
|
604
|
+
else {
|
|
605
|
+
const validation = validateToolBudgetConfig(cfg.toolBudget, "config.toolBudget");
|
|
606
|
+
if (validation.error) return validation.error;
|
|
607
|
+
target.toolBudget = cfg.toolBudget as ToolBudgetConfig;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
if (target.runner?.type === "external-cli" || target.runner?.type === "external-job") {
|
|
611
|
+
const unsupported = [
|
|
612
|
+
target.tools?.length || target.mcpDirectTools?.length ? "tools" : undefined,
|
|
613
|
+
target.excludeTools?.length ? "excludeTools" : undefined,
|
|
614
|
+
target.model ? "model" : undefined,
|
|
615
|
+
target.fallbackModels?.length ? "fallbackModels" : undefined,
|
|
616
|
+
target.thinking ? "thinking" : undefined,
|
|
617
|
+
target.extensions?.length ? "extensions" : undefined,
|
|
618
|
+
target.subagentOnlyExtensions?.length ? "subagentOnlyExtensions" : undefined,
|
|
619
|
+
target.mutationTools?.length ? "mutationTools" : undefined,
|
|
620
|
+
target.skills?.length || target.skillPath?.length ? "skills" : undefined,
|
|
621
|
+
target.maxSubagentDepth !== undefined ? "maxSubagentDepth" : undefined,
|
|
622
|
+
target.completionGuard !== undefined ? "completionGuard" : undefined,
|
|
623
|
+
target.toolBudget ? "toolBudget" : undefined,
|
|
624
|
+
].filter((field): field is string => Boolean(field));
|
|
625
|
+
if (unsupported.length > 0) return `config.runner type '${target.runner.type}' does not support Pi-only fields: ${unsupported.join(", ")}.`;
|
|
626
|
+
}
|
|
627
|
+
return undefined;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
function resolveTarget<T extends { name: string; source: AgentSource; filePath: string }>(
|
|
631
|
+
name: string,
|
|
632
|
+
matches: T[],
|
|
633
|
+
cwd: string,
|
|
634
|
+
scopeHint?: string,
|
|
635
|
+
): T | AgentToolResult<Details> {
|
|
636
|
+
const distinctNames = [...new Set(matches.map((match) => match.name))];
|
|
637
|
+
if (distinctNames.length > 1) return result(`Ambiguous agent alias or name '${name}': ${distinctNames.sort((a, b) => a.localeCompare(b)).join(", ")}`, true);
|
|
638
|
+
const mutable = matches.filter((match): match is T & { source: ManagementScope } => isMutableSource(match.source));
|
|
639
|
+
if (mutable.length === 0) {
|
|
640
|
+
if (matches.length > 0) return result(`Agent '${name}' is read-only and cannot be modified. Create a same-named agent in user or project scope to override it.`, true);
|
|
641
|
+
return result(`Agent '${name}' not found. Available: ${availableAgentNames(cwd).join(", ") || "none"}.`, true);
|
|
642
|
+
}
|
|
643
|
+
if (mutable.length === 1) return mutable[0]!;
|
|
644
|
+
const scope = asDisambiguationScope(scopeHint);
|
|
645
|
+
if (!scope) {
|
|
646
|
+
const paths = mutable.map((match) => `${match.source}: ${match.filePath}`).join("\n");
|
|
647
|
+
return result(`Agent '${name}' exists in both scopes. Specify agentScope: 'user' or 'project'.\n${paths}`, true);
|
|
648
|
+
}
|
|
649
|
+
const scoped = mutable.filter((match) => match.source === scope);
|
|
650
|
+
if (scoped.length === 0) return result(`Agent '${name}' not found in scope '${scope}'.`, true);
|
|
651
|
+
if (scoped.length > 1) return result(`Multiple agents named '${name}' found in scope '${scope}': ${scoped.map((match) => match.filePath).join(", ")}`, true);
|
|
652
|
+
return scoped[0]!;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
function renamePath(currentPath: string, newName: string, scope: ManagementScope, cwd: string): { filePath?: string; error?: string } {
|
|
656
|
+
if (nameExistsInScope(cwd, scope, newName, currentPath)) return { error: `Name '${newName}' already exists in ${scope} scope.` };
|
|
657
|
+
const filePath = path.join(path.dirname(currentPath), `${newName}.md`);
|
|
658
|
+
if (fs.existsSync(filePath) && filePath !== currentPath) return { error: `File already exists at ${filePath} but is not a valid agent definition. Remove or rename it first.` };
|
|
659
|
+
fs.renameSync(currentPath, filePath);
|
|
660
|
+
return { filePath };
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
function packageSourceLabel(agent: AgentConfig): string {
|
|
664
|
+
if (!agent.packageSourceName) return agent.source;
|
|
665
|
+
return agent.packageSourceVersion ? `${agent.packageSourceName}@${agent.packageSourceVersion}` : agent.packageSourceName;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
type ExternalJobProviderStatus =
|
|
669
|
+
| { ok: true; names: Set<string> }
|
|
670
|
+
| { ok: false; error: string };
|
|
671
|
+
|
|
672
|
+
function errorMessage(error: unknown): string {
|
|
673
|
+
return error instanceof Error ? error.message : String(error);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
function registeredExternalJobProviderStatus(): ExternalJobProviderStatus {
|
|
677
|
+
try {
|
|
678
|
+
return { ok: true, names: new Set(listExternalJobProviders().map((provider) => provider.name)) };
|
|
679
|
+
} catch (error) {
|
|
680
|
+
return { ok: false, error: errorMessage(error) };
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
function externalJobProviderSuffix(provider: string, names: Set<string> | undefined): string {
|
|
685
|
+
if (!names) return "?";
|
|
686
|
+
return names.has(provider) ? "✓" : "missing";
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
function runnerListBadge(agent: AgentConfig, providerNames: Set<string> | undefined): string | undefined {
|
|
690
|
+
if (agent.runner?.type === "external-job") return `external-job:${agent.runner.provider} ${externalJobProviderSuffix(agent.runner.provider, providerNames)}`;
|
|
691
|
+
if (agent.runner?.type === "external-cli") return "external-cli";
|
|
692
|
+
return undefined;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
function agentListMetadata(agent: AgentConfig, providerNames: Set<string> | undefined): string {
|
|
696
|
+
const source = agent.source === "package" ? packageSourceLabel(agent) : agent.source;
|
|
697
|
+
return [
|
|
698
|
+
source,
|
|
699
|
+
runnerListBadge(agent, providerNames),
|
|
700
|
+
agent.defaultContext ? `context: ${agent.defaultContext}` : undefined,
|
|
701
|
+
agent.aliases?.length ? `aliases: ${agent.aliases.join(", ")}` : undefined,
|
|
702
|
+
].filter((part): part is string => Boolean(part)).join(", ");
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
function formatAgentListLine(agent: AgentConfig, providerNames: Set<string> | undefined): string {
|
|
706
|
+
return `- ${agent.name} (${agentListMetadata(agent, providerNames)}): ${agent.description}`;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
function formatAgentCapabilitiesLine(agent: AgentConfig, providerNames: Set<string> | undefined): string {
|
|
710
|
+
const declaredTools = [
|
|
711
|
+
...(agent.tools ?? []),
|
|
712
|
+
...(agent.mcpDirectTools ?? []).map((tool) => `mcp:${tool}`),
|
|
713
|
+
];
|
|
714
|
+
let tools = "none";
|
|
715
|
+
if (agent.tools === undefined && agent.mcpDirectTools === undefined) {
|
|
716
|
+
tools = "default/ambient";
|
|
717
|
+
} else if (declaredTools.length > 0) {
|
|
718
|
+
tools = declaredTools.join(", ");
|
|
719
|
+
}
|
|
720
|
+
if (agent.excludeTools?.length) tools = `${tools}; excludes: ${agent.excludeTools.join(", ")}`;
|
|
721
|
+
let model = "inherits current session";
|
|
722
|
+
if (agent.model !== undefined) {
|
|
723
|
+
model = agent.model;
|
|
724
|
+
if (agent.modelProvider && !agent.model.includes("/")) model = `${agent.modelProvider}/${agent.model}`;
|
|
725
|
+
}
|
|
726
|
+
const thinking = agent.thinking === false ? "off" : agent.thinking ?? "default";
|
|
727
|
+
return `- ${agent.name} (${agentListMetadata(agent, providerNames)}): Description: ${previewDisplayText(agent.description, 240)}; Tools: ${tools}; Model: ${model}; Thinking: ${thinking}`;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
const EXTERNAL_JOB_CAPABILITIES = { stop: false, steer: false, resume: false, structuredOutput: false, toolEvents: false } as const;
|
|
731
|
+
const PI_AGENT_RUNNER = { type: "pi" } as const;
|
|
732
|
+
|
|
733
|
+
function listOrEmpty<T>(values: T[] | undefined): T[] {
|
|
734
|
+
return values ?? [];
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
function agentCapabilityRunner(agent: AgentConfig, providerNames: Set<string> | undefined): AgentCapabilityRow["runner"] {
|
|
738
|
+
const runner = agent.runner;
|
|
739
|
+
if (!runner || runner.type === "pi") return PI_AGENT_RUNNER;
|
|
740
|
+
if (runner.type === "external-cli") return { type: "external-cli", adapter: runner.adapter, capabilities: resolveExternalCliRunnerStatus(runner).capabilities };
|
|
741
|
+
return { type: "external-job", provider: runner.provider, available: providerNames?.has(runner.provider), capabilities: EXTERNAL_JOB_CAPABILITIES };
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
function agentCapabilityTools(agent: AgentConfig): AgentCapabilityRow["tools"] {
|
|
745
|
+
return {
|
|
746
|
+
ambient: agent.tools === undefined && agent.mcpDirectTools === undefined,
|
|
747
|
+
names: listOrEmpty(agent.tools),
|
|
748
|
+
...(agent.excludeTools !== undefined ? { excludeTools: [...agent.excludeTools] } : {}),
|
|
749
|
+
mcpDirectTools: listOrEmpty(agent.mcpDirectTools),
|
|
750
|
+
mutationTools: agent.mutationTools,
|
|
751
|
+
};
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
function agentCapabilityRow(agent: AgentConfig, options: { executable: boolean; providerNames?: Set<string>; restrictionSources?: string[] }): AgentCapabilityRow {
|
|
755
|
+
return {
|
|
756
|
+
name: agent.name,
|
|
757
|
+
description: previewDisplayText(agent.description, 1000),
|
|
758
|
+
source: agent.source,
|
|
759
|
+
executable: options.executable,
|
|
760
|
+
restrictionSources: options.executable ? undefined : options.restrictionSources ?? [],
|
|
761
|
+
aliases: agent.aliases ? [...agent.aliases] : undefined,
|
|
762
|
+
runner: agentCapabilityRunner(agent, options.providerNames),
|
|
763
|
+
tools: agentCapabilityTools(agent),
|
|
764
|
+
model: presentDetails({ value: agent.model, fallbackModels: agent.fallbackModels, thinking: agent.thinking }),
|
|
765
|
+
execution: presentDetails({ defaultAsync: agent.defaultAsync, timeoutMs: agent.defaultTimeoutMs }),
|
|
766
|
+
output: presentDetails({ path: agent.output, mode: agent.outputMode }),
|
|
767
|
+
extensions: presentDetails({ names: agent.extensions, subagentOnly: agent.subagentOnlyExtensions, skills: agent.skills }),
|
|
768
|
+
};
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
function agentCapabilitiesSnapshot(input: { agents: AgentConfig[]; restrictedAgents: AgentConfig[]; providerNames?: Set<string>; restrictedSources?: string[] }): AgentCapabilitiesSnapshot {
|
|
772
|
+
return {
|
|
773
|
+
agents: [
|
|
774
|
+
...input.agents.map((agent) => agentCapabilityRow(agent, { executable: true, providerNames: input.providerNames })),
|
|
775
|
+
...input.restrictedAgents.map((agent) => agentCapabilityRow(agent, { executable: false, providerNames: input.providerNames, restrictionSources: input.restrictedSources })),
|
|
776
|
+
],
|
|
777
|
+
restrictedCount: input.restrictedAgents.length,
|
|
778
|
+
...(input.restrictedSources?.length ? { capabilityCeilingSources: [...input.restrictedSources] } : {}),
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
function providerNames(status: ExternalJobProviderStatus): Set<string> | undefined {
|
|
783
|
+
return status.ok ? status.names : undefined;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
function appendRestrictedAgentLines(input: { lines: string[]; agents: AgentConfig[]; sources?: string[]; providerNames?: Set<string>; formatLine: (agent: AgentConfig, providerNames: Set<string> | undefined) => string }): void {
|
|
787
|
+
if (input.agents.length === 0) return;
|
|
788
|
+
input.lines.push(
|
|
789
|
+
"",
|
|
790
|
+
`Restricted agents (not executable in this session${input.sources?.length ? `; capability ceiling: ${input.sources.join(", ")}` : ""}):`,
|
|
791
|
+
...input.agents.map((agent) => input.formatLine(agent, input.providerNames)),
|
|
792
|
+
);
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
function appendExternalJobRegistryLine(lines: string[], agents: AgentConfig[], status: ExternalJobProviderStatus): void {
|
|
796
|
+
if (status.ok || !agents.some((agent) => agent.runner?.type === "external-job")) return;
|
|
797
|
+
lines.push("", `External-job provider registry unavailable: ${status.error}`);
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
function appendAgentDiagnosticLines(lines: string[], diagnostics: AgentDiscoveryDiagnostic[] | undefined): void {
|
|
801
|
+
if (!diagnostics?.length) return;
|
|
802
|
+
lines.push(
|
|
803
|
+
"",
|
|
804
|
+
"Invalid agent definitions:",
|
|
805
|
+
...diagnostics.map((diagnostic) => `- ${diagnostic.name ?? diagnostic.filePath} (${diagnostic.source}): ${diagnostic.error}`),
|
|
806
|
+
);
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
function agentCapabilityDetails(input: { capabilityMode: boolean; agents: AgentConfig[]; restrictedAgents: AgentConfig[]; providerNames?: Set<string>; restrictedSources?: string[] }): Partial<Details> | undefined {
|
|
810
|
+
if (!input.capabilityMode) return undefined;
|
|
811
|
+
return {
|
|
812
|
+
agentCapabilities: jsonDetails(agentCapabilitiesSnapshot({
|
|
813
|
+
agents: input.agents,
|
|
814
|
+
restrictedAgents: input.restrictedAgents,
|
|
815
|
+
providerNames: input.providerNames,
|
|
816
|
+
restrictedSources: input.restrictedSources,
|
|
817
|
+
})),
|
|
818
|
+
};
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
function formatAgentListSections(
|
|
822
|
+
agents: AgentConfig[],
|
|
823
|
+
providerNames: Set<string> | undefined,
|
|
824
|
+
formatLine: (agent: AgentConfig, providerNames: Set<string> | undefined) => string = formatAgentListLine,
|
|
825
|
+
): string[] {
|
|
826
|
+
if (agents.length === 0) return ["- (none)"];
|
|
827
|
+
const sections: Array<[AgentSource, string]> = [
|
|
828
|
+
["package", "Package agents"],
|
|
829
|
+
["user", "User agents"],
|
|
830
|
+
["project", "Project agents"],
|
|
831
|
+
["runtime", "Runtime agents"],
|
|
832
|
+
["builtin", "Builtin agents"],
|
|
833
|
+
];
|
|
834
|
+
const lines: string[] = [];
|
|
835
|
+
for (const [source, label] of sections) {
|
|
836
|
+
const matches = agents.filter((agent) => agent.source === source);
|
|
837
|
+
if (matches.length === 0) continue;
|
|
838
|
+
if (lines.length > 0) lines.push("");
|
|
839
|
+
lines.push(label, ...matches.map((agent) => formatLine(agent, providerNames)));
|
|
840
|
+
}
|
|
841
|
+
return lines;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
function formatRunnerDetail(agent: AgentConfig, providerNames: Set<string> | undefined): string | undefined {
|
|
845
|
+
if (!agent.runner) return undefined;
|
|
846
|
+
if (agent.runner.type === "external-job") return `Runner: external-job via ${agent.runner.provider} ${externalJobProviderSuffix(agent.runner.provider, providerNames)}`;
|
|
847
|
+
if (agent.runner.type === "external-cli") return `Runner: external-cli ${agent.runner.command}`;
|
|
848
|
+
return `Runner: ${JSON.stringify(agent.runner)}`;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
function formatAgentDetail(agent: AgentConfig): string {
|
|
852
|
+
const tools = [...(agent.tools ?? []), ...(agent.mcpDirectTools ?? []).map((t) => `mcp:${t}`)];
|
|
853
|
+
const providerStatus = registeredExternalJobProviderStatus();
|
|
854
|
+
const lines: string[] = [`Agent: ${agent.name} (${agent.source})`, `Path: ${agent.filePath}`, `Description: ${agent.description}`];
|
|
855
|
+
if (agent.source === "package" && agent.packageSourceName) {
|
|
856
|
+
lines.push(`Source package: ${packageSourceLabel(agent)}`);
|
|
857
|
+
if (agent.packageSourceRoot) lines.push(`Package root: ${agent.packageSourceRoot}`);
|
|
858
|
+
}
|
|
859
|
+
if (agent.packageName) {
|
|
860
|
+
lines.push(`Local name: ${frontmatterNameForConfig(agent)}`);
|
|
861
|
+
lines.push(`Package: ${agent.packageName}`);
|
|
862
|
+
}
|
|
863
|
+
if (agent.aliases?.length) lines.push(`Aliases: ${agent.aliases.join(", ")}`);
|
|
864
|
+
if (agent.model) lines.push(`Model: ${agent.model}`);
|
|
865
|
+
if (agent.fallbackModels?.length) lines.push(`Fallback models: ${agent.fallbackModels.join(", ")}`);
|
|
866
|
+
if (tools.length) lines.push(`Tools: ${tools.join(", ")}`);
|
|
867
|
+
if (agent.excludeTools?.length) lines.push(`Excluded tools: ${agent.excludeTools.join(", ")}`);
|
|
868
|
+
if (agent.skills?.length) lines.push(`Skills: ${agent.skills.join(", ")}`);
|
|
869
|
+
if (agent.skillPath?.length) lines.push(`Skill paths: ${agent.skillPath.join(", ")}`);
|
|
870
|
+
lines.push(`System prompt mode: ${agent.systemPromptMode}`);
|
|
871
|
+
const runnerDetail = formatRunnerDetail(agent, providerStatus.ok ? providerStatus.names : undefined);
|
|
872
|
+
if (runnerDetail) {
|
|
873
|
+
lines.push(runnerDetail);
|
|
874
|
+
if (agent.runner?.type === "external-job" && !providerStatus.ok) lines.push(`External-job provider registry unavailable: ${providerStatus.error}`);
|
|
875
|
+
if (agent.runner?.type === "external-job" && agent.runner.options) lines.push(`Runner options: ${JSON.stringify(agent.runner.options)}`);
|
|
876
|
+
}
|
|
877
|
+
lines.push(`Inherit project context: ${agent.inheritProjectContext ? "true" : "false"}`);
|
|
878
|
+
lines.push(`Inherit global context: ${agent.inheritGlobalContext ? "true" : "false"}`);
|
|
879
|
+
lines.push(`Inherit skills: ${agent.inheritSkills ? "true" : "false"}`);
|
|
880
|
+
if (agent.defaultContext) lines.push(`Default context: ${agent.defaultContext}`);
|
|
881
|
+
if (agent.defaultAsync !== undefined) lines.push(`Async: ${agent.defaultAsync ? "true" : "false"}`);
|
|
882
|
+
if (agent.defaultTimeoutMs !== undefined) lines.push(`Timeout: ${agent.defaultTimeoutMs}ms`);
|
|
883
|
+
if (agent.defaultAcceptance !== undefined) lines.push(`Acceptance: ${typeof agent.defaultAcceptance === "object" ? JSON.stringify(agent.defaultAcceptance) : String(agent.defaultAcceptance)}`);
|
|
884
|
+
if (agent.acceptanceRole) lines.push(`Acceptance role: ${agent.acceptanceRole}`);
|
|
885
|
+
if (agent.source === "builtin") lines.push(`Disabled: ${agent.disabled ? "true" : "false"}`);
|
|
886
|
+
if (agent.extensions !== undefined) lines.push(`Extensions: ${agent.extensions.length ? agent.extensions.join(", ") : "(none)"}`);
|
|
887
|
+
if (agent.subagentOnlyExtensions !== undefined) lines.push(`Subagent-only extensions: ${agent.subagentOnlyExtensions.length ? agent.subagentOnlyExtensions.join(", ") : "(none)"}`);
|
|
888
|
+
if (agent.mutationTools !== undefined) lines.push(`Mutation tools: ${agent.mutationTools.length ? agent.mutationTools.join(", ") : "(none)"}`);
|
|
889
|
+
if (agent.thinking) lines.push(`Thinking: ${agent.thinking}`);
|
|
890
|
+
if (agent.output) lines.push(`Output: ${agent.output}`);
|
|
891
|
+
if (agent.outputMode) lines.push(`Output mode: ${agent.outputMode}`);
|
|
892
|
+
if (agent.defaultReads?.length) lines.push(`Reads: ${agent.defaultReads.join(", ")}`);
|
|
893
|
+
if (agent.defaultProgress) lines.push("Progress: true");
|
|
894
|
+
if (agent.maxSubagentDepth !== undefined) lines.push(`Max subagent depth: ${agent.maxSubagentDepth}`);
|
|
895
|
+
if (agent.completionGuard === false) lines.push("Completion guard: false");
|
|
896
|
+
if (agent.toolBudget) lines.push(`Tool budget: ${JSON.stringify(agent.toolBudget)}`);
|
|
897
|
+
if (agent.memory) lines.push(`Memory: ${agent.memory.scope} scope, path: ${agent.memory.path}`);
|
|
898
|
+
if (agent.systemPrompt.trim()) lines.push("", "System Prompt:", agent.systemPrompt);
|
|
899
|
+
return lines.join("\n");
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
export function handleList(params: ManagementParams, ctx: ManagementContext): AgentToolResult<Details> {
|
|
903
|
+
const scope = normalizeListScope(params.agentScope) ?? "both";
|
|
904
|
+
const d = discoverAgentsAll(ctx.cwd, ctx.model?.provider);
|
|
905
|
+
let scopedAgents = effectiveAgentsForScope(scope, d, ctx.runtimeAgentOwner);
|
|
906
|
+
scopedAgents = scopedAgents
|
|
907
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
908
|
+
const capabilityCeiling = resolveCurrentSubagentCapabilityCeiling(ctx.currentSessionId);
|
|
909
|
+
const visibleAgents = scopedAgents.filter((a) => !a.disabled);
|
|
910
|
+
const agents = visibleAgents.filter((a) => isAgentAllowedByCapabilityCeiling(a.name, capabilityCeiling));
|
|
911
|
+
const restrictedAgents = visibleAgents.filter((a) => !isAgentAllowedByCapabilityCeiling(a.name, capabilityCeiling));
|
|
912
|
+
const restrictedSources = capabilityCeilingAgentRestrictionSources(capabilityCeiling);
|
|
913
|
+
const proactiveSuggestions = buildProactiveSkillSubagentRecommendationLines({
|
|
914
|
+
agents,
|
|
915
|
+
...(ctx.config?.proactiveSkillSubagents !== undefined ? { config: ctx.config.proactiveSkillSubagents } : {}),
|
|
916
|
+
discoverAvailableSkills: () => discoverAvailableSkills(ctx.cwd),
|
|
917
|
+
});
|
|
918
|
+
const providerStatus = registeredExternalJobProviderStatus();
|
|
919
|
+
const providerNameSet = providerNames(providerStatus);
|
|
920
|
+
const capabilityMode = params.capabilities === true;
|
|
921
|
+
const formatLine = capabilityMode ? formatAgentCapabilitiesLine : formatAgentListLine;
|
|
922
|
+
const lines = [
|
|
923
|
+
capabilityMode ? "Executable agents (capabilities):" : "Executable agents:",
|
|
924
|
+
...formatAgentListSections(agents, providerNameSet, formatLine),
|
|
925
|
+
];
|
|
926
|
+
appendRestrictedAgentLines({ lines, agents: restrictedAgents, sources: restrictedSources, providerNames: providerNameSet, formatLine });
|
|
927
|
+
appendExternalJobRegistryLine(lines, [...agents, ...restrictedAgents], providerStatus);
|
|
928
|
+
appendAgentDiagnosticLines(lines, d.agentDiagnostics);
|
|
929
|
+
if (proactiveSuggestions.length) lines.push("", ...proactiveSuggestions);
|
|
930
|
+
return result(lines.join("\n"), false, agentCapabilityDetails({
|
|
931
|
+
capabilityMode,
|
|
932
|
+
agents,
|
|
933
|
+
restrictedAgents,
|
|
934
|
+
providerNames: providerNameSet,
|
|
935
|
+
restrictedSources,
|
|
936
|
+
}));
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
function formatModelSource(agent: AgentConfig, currentModel: ParentModel | undefined): string {
|
|
940
|
+
if (agent.override && agent.model !== agent.override.base.model) {
|
|
941
|
+
return `${agent.override.scope} override`;
|
|
942
|
+
}
|
|
943
|
+
if (agent.modelSource?.type === "subagents.defaultModel" && agent.model === agent.modelSource.model) {
|
|
944
|
+
return `${agent.modelSource.scope} defaultModel`;
|
|
945
|
+
}
|
|
946
|
+
if (agent.model) return `${agent.source} agent config`;
|
|
947
|
+
if (currentModel) return "inherits current session model";
|
|
948
|
+
return "inherit requested, but no current session model is available";
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
function handleModels(params: ManagementParams, ctx: ManagementContext): AgentToolResult<Details> {
|
|
952
|
+
const requestedAgent = params.agent?.trim();
|
|
953
|
+
const scope = normalizeListScope(params.agentScope);
|
|
954
|
+
if (!scope) return result("agentScope must be 'user', 'project', or 'both' for models.", true);
|
|
955
|
+
|
|
956
|
+
const discovered = discoverAgentsAll(ctx.cwd, ctx.model?.provider);
|
|
957
|
+
const effectiveAgents = effectiveAgentsForScope(scope, discovered, ctx.runtimeAgentOwner)
|
|
958
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
959
|
+
const availableModels = ctx.modelRegistry.getAvailable().map(toModelInfo);
|
|
960
|
+
const currentModel = ctx.model ? { provider: ctx.model.provider, id: ctx.model.id } : undefined;
|
|
961
|
+
const preferredProvider = ctx.model?.provider;
|
|
962
|
+
const capabilityCeiling = resolveCurrentSubagentCapabilityCeiling(ctx.currentSessionId);
|
|
963
|
+
|
|
964
|
+
let selectedAgents = effectiveAgents;
|
|
965
|
+
if (requestedAgent) {
|
|
966
|
+
const matches = findAgentsInDiscovery(requestedAgent, discovered, scope, ctx.runtimeAgentOwner);
|
|
967
|
+
const diagnostics = diagnosticsForScope(discovered.agentDiagnostics, scope);
|
|
968
|
+
const normalizedName = sanitizeName(requestedAgent);
|
|
969
|
+
const diagnostic = findBlockingAgentDiagnostic(requestedAgent, matches, diagnostics)
|
|
970
|
+
?? (normalizedName !== requestedAgent ? findBlockingAgentDiagnostic(normalizedName, matches, diagnostics) : undefined);
|
|
971
|
+
if (diagnostic) return result(`Agent '${params.agent}' has invalid configuration: ${diagnostic.error}`, true);
|
|
972
|
+
const distinctNames = [...new Set(matches.map((agent) => agent.name))];
|
|
973
|
+
if (distinctNames.length > 1) return result(`Ambiguous agent alias or name '${params.agent}': ${distinctNames.sort((a, b) => a.localeCompare(b)).join(", ")}`, true);
|
|
974
|
+
if (!matches.length) {
|
|
975
|
+
return result(`Agent '${params.agent}' not found. Available: ${availableAgentNamesFromDiscovery(discovered, ctx.runtimeAgentOwner).join(", ") || "none"}.`, true);
|
|
976
|
+
}
|
|
977
|
+
selectedAgents = [matches[0]!];
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
const lines = [
|
|
981
|
+
requestedAgent ? "Subagent model" : "Subagent models",
|
|
982
|
+
"",
|
|
983
|
+
...(requestedAgent ? [] : [
|
|
984
|
+
"Current session model:",
|
|
985
|
+
` ${currentModel ? `${currentModel.provider}/${currentModel.id}` : "(unavailable)"}`,
|
|
986
|
+
"",
|
|
987
|
+
]),
|
|
988
|
+
];
|
|
989
|
+
|
|
990
|
+
const modelEntries = selectedAgents.flatMap((agent) => requestedAgent
|
|
991
|
+
? [{ agent, name: requestedAgent }]
|
|
992
|
+
: [{ agent, name: agent.name }, ...(agent.aliases ?? []).map((name) => ({ agent, name }))]);
|
|
993
|
+
for (const { agent, name } of modelEntries) {
|
|
994
|
+
const resolvedModel = resolveSubagentModelOverride(agent.model, currentModel, availableModels, agent.modelProvider ?? preferredProvider);
|
|
995
|
+
const effectiveThinking = resolveEffectiveThinking(resolvedModel, agent.thinking)
|
|
996
|
+
?? (agent.thinking === false ? "off" : undefined);
|
|
997
|
+
const source = `${formatModelSource(agent, currentModel)}${agent.disabled ? "; disabled" : ""}${isAgentAllowedByCapabilityCeiling(agent.name, capabilityCeiling) ? "" : "; restricted"}`;
|
|
998
|
+
if (requestedAgent) {
|
|
999
|
+
lines.push(`Agent: ${requestedAgent}`);
|
|
1000
|
+
lines.push("Effective model:");
|
|
1001
|
+
lines.push(` ${resolvedModel ?? "(unresolved)"}`);
|
|
1002
|
+
lines.push(`Source: ${source}`);
|
|
1003
|
+
lines.push(`Thinking: ${effectiveThinking ?? "default"}`);
|
|
1004
|
+
if (agent.fallbackModels?.length) {
|
|
1005
|
+
lines.push("Fallback models:");
|
|
1006
|
+
for (const fallback of agent.fallbackModels) {
|
|
1007
|
+
lines.push(` ${resolveSubagentModelOverride(fallback, currentModel, availableModels, agent.modelProvider ?? preferredProvider) ?? fallback}`);
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
if (agent.override) {
|
|
1011
|
+
lines.push("Override file:");
|
|
1012
|
+
lines.push(` ${agent.override.path}`);
|
|
1013
|
+
}
|
|
1014
|
+
if (agent.model && resolvedModel && agent.model !== resolvedModel) {
|
|
1015
|
+
lines.push("Requested model setting:");
|
|
1016
|
+
lines.push(` ${agent.model}`);
|
|
1017
|
+
}
|
|
1018
|
+
if (agent.disabled) lines.push("Disabled: true");
|
|
1019
|
+
if (!isAgentAllowedByCapabilityCeiling(agent.name, capabilityCeiling)) lines.push("Restricted: true");
|
|
1020
|
+
lines.push("Current session model:");
|
|
1021
|
+
lines.push(` ${currentModel ? `${currentModel.provider}/${currentModel.id}` : "(unavailable)"}`);
|
|
1022
|
+
break;
|
|
1023
|
+
}
|
|
1024
|
+
lines.push(name);
|
|
1025
|
+
lines.push(" model:");
|
|
1026
|
+
lines.push(` ${resolvedModel ?? "(unresolved)"}`);
|
|
1027
|
+
lines.push(` source: ${source}`);
|
|
1028
|
+
lines.push(` thinking: ${effectiveThinking ?? "default"}`);
|
|
1029
|
+
if (agent.fallbackModels?.length) {
|
|
1030
|
+
lines.push(" fallback models:");
|
|
1031
|
+
for (const fallback of agent.fallbackModels) {
|
|
1032
|
+
lines.push(` ${resolveSubagentModelOverride(fallback, currentModel, availableModels, agent.modelProvider ?? preferredProvider) ?? fallback}`);
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
if (agent.override) {
|
|
1036
|
+
lines.push(" override file:");
|
|
1037
|
+
lines.push(` ${agent.override.path}`);
|
|
1038
|
+
}
|
|
1039
|
+
if (agent.model && resolvedModel && agent.model !== resolvedModel) {
|
|
1040
|
+
lines.push(" requested model setting:");
|
|
1041
|
+
lines.push(` ${agent.model}`);
|
|
1042
|
+
}
|
|
1043
|
+
lines.push("");
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
const availableFullIds = availableModels.map((m) => m.fullId).sort();
|
|
1047
|
+
if (!requestedAgent && availableFullIds.length > 0) {
|
|
1048
|
+
lines.push("Available models in this session's registry (copy an exact provider/id when passing model):");
|
|
1049
|
+
lines.push("");
|
|
1050
|
+
const shown = availableFullIds.slice(0, 80);
|
|
1051
|
+
for (const fullId of shown) lines.push(` ${fullId}`);
|
|
1052
|
+
if (availableFullIds.length > shown.length) lines.push(` ... and ${availableFullIds.length - shown.length} more`);
|
|
1053
|
+
lines.push("");
|
|
1054
|
+
lines.push("Use an exact provider/id from this list when you pass model; bare ids resolve only when unique in the registry.");
|
|
1055
|
+
}
|
|
1056
|
+
if (!requestedAgent) appendAgentDiagnosticLines(lines, diagnosticsForScope(discovered.agentDiagnostics, scope));
|
|
1057
|
+
return result(lines.join("\n"));
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
function handleGet(params: ManagementParams, ctx: ManagementContext): AgentToolResult<Details> {
|
|
1061
|
+
if (!params.agent) return result("Specify 'agent' for get.", true);
|
|
1062
|
+
const scope = normalizeListScope(params.agentScope);
|
|
1063
|
+
if (!scope) return result("agentScope must be 'user', 'project', or 'both' for get.", true);
|
|
1064
|
+
const discovered = discoverAgentsAll(ctx.cwd, ctx.model?.provider);
|
|
1065
|
+
const matches = findAgentsInDiscovery(params.agent, discovered, scope);
|
|
1066
|
+
const diagnostics = diagnosticsForScope(discovered.agentDiagnostics, scope);
|
|
1067
|
+
const rawName = params.agent.trim();
|
|
1068
|
+
const normalizedName = sanitizeName(rawName);
|
|
1069
|
+
const diagnostic = findBlockingAgentDiagnostic(rawName, matches, diagnostics)
|
|
1070
|
+
?? (normalizedName !== rawName ? findBlockingAgentDiagnostic(normalizedName, matches, diagnostics) : undefined);
|
|
1071
|
+
if (diagnostic) return result(`Agent '${params.agent}' has invalid configuration: ${diagnostic.error}`, true);
|
|
1072
|
+
const distinctNames = [...new Set(matches.map((agent) => agent.name))];
|
|
1073
|
+
if (distinctNames.length > 1) return result(`Ambiguous agent alias or name '${params.agent}': ${distinctNames.sort((a, b) => a.localeCompare(b)).join(", ")}`, true);
|
|
1074
|
+
if (!matches.length) {
|
|
1075
|
+
return result(`Agent '${params.agent}' not found. Available: ${availableAgentNamesFromDiscovery(discovered).join(", ") || "none"}.`, true);
|
|
1076
|
+
}
|
|
1077
|
+
return result(matches.map(formatAgentDetail).join("\n\n"));
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
export function handleCreate(params: ManagementParams, ctx: ManagementContext): AgentToolResult<Details> {
|
|
1081
|
+
const parsedConfig = configObject(params.config);
|
|
1082
|
+
if (parsedConfig.status === "error") return result(parsedConfig.message, true);
|
|
1083
|
+
if (parsedConfig.status === "missing") return result("config required for create.", true);
|
|
1084
|
+
const cfg = parsedConfig.value;
|
|
1085
|
+
if (typeof cfg.name !== "string" || !cfg.name.trim()) return result("config.name is required and must be a non-empty string.", true);
|
|
1086
|
+
if (typeof cfg.description !== "string" || !cfg.description.trim()) return result("config.description is required and must be a non-empty string.", true);
|
|
1087
|
+
const name = sanitizeName(cfg.name);
|
|
1088
|
+
if (!name) return result("config.name is invalid after sanitization. Use letters, numbers, spaces, or hyphens.", true);
|
|
1089
|
+
const parsedPackage = parsePackageConfig(cfg.package);
|
|
1090
|
+
if (parsedPackage.error) return result(parsedPackage.error, true);
|
|
1091
|
+
const runtimeName = buildRuntimeName(name, parsedPackage.packageName);
|
|
1092
|
+
const scopeRaw = cfg.scope ?? "user";
|
|
1093
|
+
if (scopeRaw !== "user" && scopeRaw !== "project") return result("config.scope must be 'user' or 'project'.", true);
|
|
1094
|
+
const scope = scopeRaw;
|
|
1095
|
+
if (hasKey(cfg, "steps")) return result("Durable chain definitions were removed; use workflowScript or /prompt-workflow for repeatable workflows.", true);
|
|
1096
|
+
const d = discoverAgentsAll(ctx.cwd);
|
|
1097
|
+
const projectConfigDir = getProjectConfigDir(ctx.cwd);
|
|
1098
|
+
const targetDir = scope === "user" ? d.userDir : d.projectDir ?? path.join(projectConfigDir, "agents");
|
|
1099
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
1100
|
+
if (nameExistsInScope(ctx.cwd, scope, runtimeName)) return result(`Name '${runtimeName}' already exists in ${scope} scope. Use update instead.`, true);
|
|
1101
|
+
const targetPath = path.join(targetDir, `${runtimeName}.md`);
|
|
1102
|
+
if (fs.existsSync(targetPath)) return result(`File already exists at ${targetPath} but is not a valid agent definition. Remove or rename it first.`, true);
|
|
1103
|
+
const warnings: string[] = [];
|
|
1104
|
+
if (d.builtin.some((a) => a.name === runtimeName)) warnings.push(`Note: this shadows the builtin agent '${runtimeName}'.`);
|
|
1105
|
+
const agent: AgentConfig = {
|
|
1106
|
+
name: runtimeName,
|
|
1107
|
+
localName: name,
|
|
1108
|
+
...(parsedPackage.packageName !== undefined ? { packageName: parsedPackage.packageName } : {}),
|
|
1109
|
+
description: cfg.description.trim(),
|
|
1110
|
+
source: scope,
|
|
1111
|
+
filePath: targetPath,
|
|
1112
|
+
systemPrompt: "",
|
|
1113
|
+
systemPromptMode: defaultSystemPromptMode(name),
|
|
1114
|
+
inheritProjectContext: defaultInheritProjectContext(name),
|
|
1115
|
+
inheritGlobalContext: false,
|
|
1116
|
+
inheritSkills: defaultInheritSkills(),
|
|
1117
|
+
};
|
|
1118
|
+
const applyError = applyAgentConfig(agent, cfg);
|
|
1119
|
+
if (applyError) return result(applyError, true);
|
|
1120
|
+
const profileError = validateCodeOwnedProfileRunner(agent);
|
|
1121
|
+
if (profileError) return result(profileError, true);
|
|
1122
|
+
const mw = modelWarning(ctx, agent.model);
|
|
1123
|
+
if (mw) warnings.push(mw);
|
|
1124
|
+
const fmw = fallbackModelsWarning(ctx, agent.fallbackModels);
|
|
1125
|
+
if (fmw) warnings.push(fmw);
|
|
1126
|
+
const sw = skillsWarning(ctx.cwd, agent);
|
|
1127
|
+
if (sw) warnings.push(sw);
|
|
1128
|
+
fs.writeFileSync(targetPath, serializeAgent(agent), "utf-8");
|
|
1129
|
+
return result([`Created agent '${runtimeName}' at ${targetPath}.`, ...warnings].join("\n"));
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
export function handleUpdate(params: ManagementParams, ctx: ManagementContext): AgentToolResult<Details> {
|
|
1133
|
+
if (!params.agent) return result("Specify 'agent' for update.", true);
|
|
1134
|
+
const parsedConfig = configObject(params.config);
|
|
1135
|
+
if (parsedConfig.status === "error") return result(parsedConfig.message, true);
|
|
1136
|
+
if (parsedConfig.status === "missing") return result("config required for update.", true);
|
|
1137
|
+
const cfg = parsedConfig.value;
|
|
1138
|
+
if (hasKey(cfg, "steps")) return result("Durable chain definitions were removed; use workflowScript or /prompt-workflow for repeatable workflows.", true);
|
|
1139
|
+
const warnings: string[] = [];
|
|
1140
|
+
const scopeHint = asDisambiguationScope(params.agentScope);
|
|
1141
|
+
const targetOrError = resolveTarget(params.agent, findAgents(params.agent, ctx.cwd, scopeHint ?? "both"), ctx.cwd, scopeHint);
|
|
1142
|
+
if ("content" in targetOrError) return targetOrError;
|
|
1143
|
+
const target = targetOrError;
|
|
1144
|
+
if (target.source !== "user" && target.source !== "project") return result(`Cannot update ${target.source} agent '${target.name}'. Eject it to user or project scope first.`, true);
|
|
1145
|
+
let updated: AgentConfig;
|
|
1146
|
+
try {
|
|
1147
|
+
updated = editableAgentConfig(target);
|
|
1148
|
+
} catch (error) {
|
|
1149
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
1150
|
+
return result(`Could not reread agent definition ${target.filePath} before updating '${target.name}': ${message}`, true);
|
|
1151
|
+
}
|
|
1152
|
+
const oldName = target.name;
|
|
1153
|
+
if (hasKey(cfg, "name") && (typeof cfg.name !== "string" || !cfg.name.trim())) return result("config.name must be a non-empty string when provided.", true);
|
|
1154
|
+
if (hasKey(cfg, "description") && (typeof cfg.description !== "string" || !cfg.description.trim())) return result("config.description must be a non-empty string when provided.", true);
|
|
1155
|
+
let newLocalName = target.localName ?? frontmatterNameForConfig(target);
|
|
1156
|
+
if (hasKey(cfg, "name")) {
|
|
1157
|
+
newLocalName = sanitizeName(cfg.name as string);
|
|
1158
|
+
if (!newLocalName) return result("config.name is invalid after sanitization.", true);
|
|
1159
|
+
}
|
|
1160
|
+
let newPackageName = target.packageName;
|
|
1161
|
+
if (hasKey(cfg, "package")) {
|
|
1162
|
+
const parsedPackage = parsePackageConfig(cfg.package);
|
|
1163
|
+
if (parsedPackage.error) return result(parsedPackage.error, true);
|
|
1164
|
+
newPackageName = parsedPackage.packageName;
|
|
1165
|
+
}
|
|
1166
|
+
const applyError = applyAgentConfig(updated, cfg);
|
|
1167
|
+
if (applyError) return result(applyError, true);
|
|
1168
|
+
const preserveFrontmatterFields = preservedAgentFrontmatterFields(target, cfg);
|
|
1169
|
+
updated.localName = newLocalName;
|
|
1170
|
+
if (newPackageName !== undefined) updated.packageName = newPackageName;
|
|
1171
|
+
else delete updated.packageName;
|
|
1172
|
+
updated.name = buildRuntimeName(newLocalName, newPackageName);
|
|
1173
|
+
const profileError = validateCodeOwnedProfileRunner(updated);
|
|
1174
|
+
if (profileError) return result(profileError, true);
|
|
1175
|
+
if (hasKey(cfg, "description")) updated.description = (cfg.description as string).trim();
|
|
1176
|
+
if (hasKey(cfg, "model")) {
|
|
1177
|
+
const mw = modelWarning(ctx, updated.model);
|
|
1178
|
+
if (mw) warnings.push(mw);
|
|
1179
|
+
}
|
|
1180
|
+
if (hasKey(cfg, "fallbackModels")) {
|
|
1181
|
+
const fmw = fallbackModelsWarning(ctx, updated.fallbackModels);
|
|
1182
|
+
if (fmw) warnings.push(fmw);
|
|
1183
|
+
}
|
|
1184
|
+
if (hasKey(cfg, "skills") || hasKey(cfg, "skillPath")) {
|
|
1185
|
+
const sw = skillsWarning(ctx.cwd, updated);
|
|
1186
|
+
if (sw) warnings.push(sw);
|
|
1187
|
+
}
|
|
1188
|
+
if (updated.name !== oldName) {
|
|
1189
|
+
const renamed = renamePath(target.filePath, updated.name, target.source, ctx.cwd);
|
|
1190
|
+
if (renamed.error) return result(renamed.error, true);
|
|
1191
|
+
updated.filePath = renamed.filePath!;
|
|
1192
|
+
}
|
|
1193
|
+
fs.writeFileSync(updated.filePath, serializeAgent(updated, { preserveFrontmatterFields }), "utf-8");
|
|
1194
|
+
const headline = updated.name === oldName
|
|
1195
|
+
? `Updated agent '${updated.name}' at ${updated.filePath}.`
|
|
1196
|
+
: `Updated agent '${oldName}' to '${updated.name}' at ${updated.filePath}.`;
|
|
1197
|
+
return result([headline, ...warnings].join("\n"));
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
function handleDelete(params: ManagementParams, ctx: ManagementContext): AgentToolResult<Details> {
|
|
1201
|
+
if (!params.agent) return result("Specify 'agent' for delete.", true);
|
|
1202
|
+
const scopeHint = asDisambiguationScope(params.agentScope);
|
|
1203
|
+
const targetOrError = resolveTarget(params.agent, findAgents(params.agent, ctx.cwd, scopeHint ?? "both"), ctx.cwd, scopeHint);
|
|
1204
|
+
if ("content" in targetOrError) return targetOrError;
|
|
1205
|
+
const target = targetOrError;
|
|
1206
|
+
fs.unlinkSync(target.filePath);
|
|
1207
|
+
return result(`Deleted agent '${target.name}' at ${target.filePath}.`);
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
function handleEject(params: ManagementParams, ctx: ManagementContext): AgentToolResult<Details> {
|
|
1211
|
+
if (!params.agent) return result("Specify 'agent' for eject.", true);
|
|
1212
|
+
const raw = params.agent.trim();
|
|
1213
|
+
const sanitized = sanitizeName(raw);
|
|
1214
|
+
const parsedScope = actionScope(params.agentScope, "eject");
|
|
1215
|
+
if (parsedScope.error) return parsedScope.error;
|
|
1216
|
+
const scope = parsedScope.scope!;
|
|
1217
|
+
const d = discoverAgentsAll(ctx.cwd);
|
|
1218
|
+
const source = [...d.package, ...d.builtin].find((a) => a.name === raw || a.name === sanitized);
|
|
1219
|
+
if (!source) {
|
|
1220
|
+
return result(`Agent '${raw}' not found or is not a bundled/package agent. eject copies a builtin or package agent to ${scope} scope so it can be customized. Available: ${availableAgentNames(ctx.cwd).join(", ") || "none"}.`, true);
|
|
1221
|
+
}
|
|
1222
|
+
const runtimeName = source.name;
|
|
1223
|
+
const existingCustom = (scope === "user" ? d.user : d.project).find((a) => a.name === runtimeName);
|
|
1224
|
+
if (existingCustom) {
|
|
1225
|
+
return result(`Agent '${runtimeName}' is already a custom ${scope} agent at ${existingCustom.filePath}. Edit it with { action: "update", agent: "${runtimeName}" } or delete it first.`, true);
|
|
1226
|
+
}
|
|
1227
|
+
if (nameExistsInScope(ctx.cwd, scope, runtimeName)) {
|
|
1228
|
+
return result(`An agent named '${runtimeName}' already exists in ${scope} scope. Remove or rename it first.`, true);
|
|
1229
|
+
}
|
|
1230
|
+
const projectConfigDir = getProjectConfigDir(ctx.cwd);
|
|
1231
|
+
const targetDir = scope === "user" ? d.userDir : d.projectDir ?? path.join(projectConfigDir, "agents");
|
|
1232
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
1233
|
+
const targetPath = path.join(targetDir, `${runtimeName}.md`);
|
|
1234
|
+
if (fs.existsSync(targetPath)) {
|
|
1235
|
+
return result(`File already exists at ${targetPath} but is not a valid agent definition. Remove or rename it first.`, true);
|
|
1236
|
+
}
|
|
1237
|
+
let content: string;
|
|
1238
|
+
try {
|
|
1239
|
+
content = fs.readFileSync(source.filePath, "utf-8");
|
|
1240
|
+
} catch (error) {
|
|
1241
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
1242
|
+
return result(`Failed to read source agent at ${source.filePath}: ${message}`, true);
|
|
1243
|
+
}
|
|
1244
|
+
fs.writeFileSync(targetPath, content, "utf-8");
|
|
1245
|
+
return result(`Ejected agent '${runtimeName}' from ${source.source} to ${scope} scope at ${targetPath}. Edit it there to customize; it shadows the bundled ${source.source} agent of the same name.`);
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
function handleDisable(params: ManagementParams, ctx: ManagementContext): AgentToolResult<Details> {
|
|
1249
|
+
if (!params.agent) return result("Specify 'agent' for disable.", true);
|
|
1250
|
+
const raw = params.agent.trim();
|
|
1251
|
+
const parsedScope = actionScope(params.agentScope, "disable");
|
|
1252
|
+
if (parsedScope.error) return parsedScope.error;
|
|
1253
|
+
const scope = parsedScope.scope!;
|
|
1254
|
+
const d = discoverAgentsAll(ctx.cwd);
|
|
1255
|
+
if (scope === "project" && d.projectSettingsPath === null) {
|
|
1256
|
+
return result("Project override is not available here: no project config root (.pi or .agents) was found above the cwd. Use agentScope: 'user' or run from inside a project.", true);
|
|
1257
|
+
}
|
|
1258
|
+
const effective = resolveEffectiveAgent(d, raw);
|
|
1259
|
+
if (effective.error) return result(effective.error, true);
|
|
1260
|
+
if (!effective.agent) {
|
|
1261
|
+
return result(`Agent '${raw}' not found. Available: ${availableAgentNames(ctx.cwd).join(", ") || "none"}.`, true);
|
|
1262
|
+
}
|
|
1263
|
+
const runtimeName = effective.agent.name;
|
|
1264
|
+
const settingsPath = mergeBuiltinAgentOverride(ctx.cwd, runtimeName, scope, { disabled: true });
|
|
1265
|
+
const after = resolveEffectiveAgent(discoverAgentsAll(ctx.cwd), raw).agent;
|
|
1266
|
+
if (after?.disabled === true) {
|
|
1267
|
+
return result(`Disabled agent '${runtimeName}' via ${scope} settings override at ${settingsPath}. It is now hidden from runtime discovery and { action: "list" }.`);
|
|
1268
|
+
}
|
|
1269
|
+
return result(`Wrote a disabled override for '${runtimeName}' at ${settingsPath}, but the agent is still enabled. A higher-precedence ${after?.override?.scope ?? "project"} override is likely winning. Try agentScope: '${after?.override?.scope ?? "project"}'.`, true);
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
function handleEnable(params: ManagementParams, ctx: ManagementContext): AgentToolResult<Details> {
|
|
1273
|
+
if (!params.agent) return result("Specify 'agent' for enable.", true);
|
|
1274
|
+
const raw = params.agent.trim();
|
|
1275
|
+
const parsedScope = actionScope(params.agentScope, "enable");
|
|
1276
|
+
if (parsedScope.error) return parsedScope.error;
|
|
1277
|
+
const scope = parsedScope.scope!;
|
|
1278
|
+
const d = discoverAgentsAll(ctx.cwd);
|
|
1279
|
+
if (scope === "project" && d.projectSettingsPath === null) {
|
|
1280
|
+
return result("Project override is not available here: no project config root (.pi or .agents) was found above the cwd. Use agentScope: 'user' or run from inside a project.", true);
|
|
1281
|
+
}
|
|
1282
|
+
const effective = resolveEffectiveAgent(d, raw);
|
|
1283
|
+
if (effective.error) return result(effective.error, true);
|
|
1284
|
+
if (!effective.agent) {
|
|
1285
|
+
return result(`Agent '${raw}' not found. Available: ${availableAgentNames(ctx.cwd).join(", ") || "none"}.`, true);
|
|
1286
|
+
}
|
|
1287
|
+
const runtimeName = effective.agent.name;
|
|
1288
|
+
const { path: settingsPath, removed } = removeBuiltinAgentOverrideFields(ctx.cwd, runtimeName, scope, ["disabled"]);
|
|
1289
|
+
const after = resolveEffectiveAgent(discoverAgentsAll(ctx.cwd), raw).agent;
|
|
1290
|
+
if (after && after.disabled !== true) {
|
|
1291
|
+
if (removed) return result(`Enabled agent '${runtimeName}' (removed disabled override at ${settingsPath}).`);
|
|
1292
|
+
return result(`Agent '${runtimeName}' is already enabled.`);
|
|
1293
|
+
}
|
|
1294
|
+
if (after?.override?.scope && after.override.scope !== scope) {
|
|
1295
|
+
return result(`Agent '${runtimeName}' is still disabled via a ${after.override.scope} scope override at ${after.override.path}. Specify agentScope: '${after.override.scope}' to enable it.`, true);
|
|
1296
|
+
}
|
|
1297
|
+
return result(`Agent '${runtimeName}' is still disabled after removing the ${scope} disabled override. It may be hidden via subagents.disableBuiltins in ${after?.override?.scope ?? scope} settings at ${after?.override?.path ?? settingsPath}.`, true);
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
function handleReset(params: ManagementParams, ctx: ManagementContext): AgentToolResult<Details> {
|
|
1301
|
+
if (!params.agent) return result("Specify 'agent' for reset.", true);
|
|
1302
|
+
const raw = params.agent.trim();
|
|
1303
|
+
const sanitized = sanitizeName(raw);
|
|
1304
|
+
const parsedScope = actionScope(params.agentScope, "reset");
|
|
1305
|
+
if (parsedScope.error) return parsedScope.error;
|
|
1306
|
+
const scope = parsedScope.scope!;
|
|
1307
|
+
const d = discoverAgentsAll(ctx.cwd);
|
|
1308
|
+
if (scope === "project" && d.projectSettingsPath === null) {
|
|
1309
|
+
return result("Project override is not available here: no project config root (.pi or .agents) was found above the cwd. Use agentScope: 'user' or run from inside a project.", true);
|
|
1310
|
+
}
|
|
1311
|
+
const bundled = [...d.package, ...d.builtin].find((a) => a.name === raw || a.name === sanitized);
|
|
1312
|
+
if (!bundled) {
|
|
1313
|
+
const custom = [...d.user, ...d.project].find((a) => a.name === raw || a.name === sanitized);
|
|
1314
|
+
if (custom) {
|
|
1315
|
+
return result(`Agent '${raw}' has no bundled default to reset to. Use { action: "delete", agent: "${custom.name}" } to remove the custom ${custom.source} agent.`, true);
|
|
1316
|
+
}
|
|
1317
|
+
return result(`Agent '${raw}' not found. Available: ${availableAgentNames(ctx.cwd).join(", ") || "none"}.`, true);
|
|
1318
|
+
}
|
|
1319
|
+
const runtimeName = bundled.name;
|
|
1320
|
+
const custom = (scope === "user" ? d.user : d.project).find((a) => a.name === raw || a.name === sanitized);
|
|
1321
|
+
const lines: string[] = [];
|
|
1322
|
+
if (custom) {
|
|
1323
|
+
fs.unlinkSync(custom.filePath);
|
|
1324
|
+
lines.push(`Deleted custom ${scope} agent file at ${custom.filePath}.`);
|
|
1325
|
+
}
|
|
1326
|
+
const overrideRemoval = removeBuiltinAgentOverride(ctx.cwd, runtimeName, scope);
|
|
1327
|
+
if (overrideRemoval.removed) lines.push(`Removed ${scope} settings override at ${overrideRemoval.path}.`);
|
|
1328
|
+
if (lines.length === 0) {
|
|
1329
|
+
const otherScope = scope === "user" ? "project" : "user";
|
|
1330
|
+
const otherCustom = (otherScope === "user" ? d.user : d.project).find((a) => a.name === raw || a.name === sanitized);
|
|
1331
|
+
const hasOtherOverride = bundled.override?.scope === otherScope;
|
|
1332
|
+
const note = (otherCustom || hasOtherOverride)
|
|
1333
|
+
? ` Customization exists in ${otherScope} scope; specify agentScope: '${otherScope}' to reset it.`
|
|
1334
|
+
: "";
|
|
1335
|
+
return result(`Agent '${runtimeName}' has no ${scope} customization to reset.${note} It is at its bundled ${bundled.source} default.`);
|
|
1336
|
+
}
|
|
1337
|
+
lines.push(`Reset agent '${runtimeName}' to its bundled ${bundled.source} default.`);
|
|
1338
|
+
return result(lines.join("\n"));
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
export function handleManagementAction(action: string, params: ManagementParams, ctx: ManagementContext): AgentToolResult<Details> {
|
|
1342
|
+
switch (action) {
|
|
1343
|
+
case "list": return handleList(params, ctx);
|
|
1344
|
+
case "get": return handleGet(params, ctx);
|
|
1345
|
+
case "models": return handleModels(params, ctx);
|
|
1346
|
+
case "create": return handleCreate(params, ctx);
|
|
1347
|
+
case "update": return handleUpdate(params, ctx);
|
|
1348
|
+
case "delete": return handleDelete(params, ctx);
|
|
1349
|
+
case "eject": return handleEject(params, ctx);
|
|
1350
|
+
case "disable": return handleDisable(params, ctx);
|
|
1351
|
+
case "enable": return handleEnable(params, ctx);
|
|
1352
|
+
case "reset": return handleReset(params, ctx);
|
|
1353
|
+
default: return result(`Unknown action: ${action}`, true);
|
|
1354
|
+
}
|
|
1355
|
+
}
|