@code-yeongyu/senpi 2026.6.4 → 2026.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -1
- package/README.md +127 -110
- package/dist/bun/cli.d.ts.map +1 -1
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/register-bedrock.d.ts.map +1 -1
- package/dist/bun/restore-sandbox-env.d.ts.map +1 -1
- package/dist/bun/restore-sandbox-env.js.map +1 -1
- package/dist/cli/args.d.ts +1 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +13 -4
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/file-processor.d.ts.map +1 -1
- package/dist/cli/file-processor.js.map +1 -1
- package/dist/cli/initial-message.d.ts +1 -1
- package/dist/cli/initial-message.d.ts.map +1 -1
- package/dist/cli/initial-message.js.map +1 -1
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/project-trust.d.ts +10 -0
- package/dist/cli/project-trust.d.ts.map +1 -0
- package/dist/cli/project-trust.js +48 -0
- package/dist/cli/project-trust.js.map +1 -0
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/startup-ui.d.ts +7 -0
- package/dist/cli/startup-ui.d.ts.map +1 -0
- package/dist/cli/startup-ui.js +59 -0
- package/dist/cli/startup-ui.js.map +1 -0
- package/dist/cli-main.d.ts.map +1 -1
- package/dist/cli-main.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +10 -1
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +3 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +4 -9
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +2 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +2 -2
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +33 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +57 -79
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-guidance.d.ts.map +1 -1
- package/dist/core/auth-guidance.js.map +1 -1
- package/dist/core/auth-storage.d.ts +4 -0
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +4 -8
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/utils.d.ts +1 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +1 -1
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/defaults.d.ts.map +1 -1
- package/dist/core/diagnostics.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/build.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/build.js.map +1 -1
- package/dist/core/dynamic-prompt/exploration.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/exploration.js.map +1 -1
- package/dist/core/dynamic-prompt/identity.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/identity.js.map +1 -1
- package/dist/core/dynamic-prompt/index.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/intent-gate.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/intent-gate.js.map +1 -1
- package/dist/core/dynamic-prompt/parallel-tools.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/parallel-tools.js.map +1 -1
- package/dist/core/dynamic-prompt/policies.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/policies.js.map +1 -1
- package/dist/core/dynamic-prompt/style.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/style.js.map +1 -1
- package/dist/core/dynamic-prompt/tool-categorization.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/tool-categorization.js.map +1 -1
- package/dist/core/dynamic-prompt/tool-section.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/tool-section.js.map +1 -1
- package/dist/core/dynamic-prompt/types.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/verification.d.ts.map +1 -1
- package/dist/core/dynamic-prompt/verification.js.map +1 -1
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js.map +1 -1
- package/dist/core/experimental.d.ts +2 -0
- package/dist/core/experimental.d.ts.map +1 -0
- package/dist/core/experimental.js +4 -0
- package/dist/core/experimental.js.map +1 -0
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
- package/dist/core/export-html/ansi-to-html.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/builtin/anthropic-bash/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/anthropic-bash/index.js.map +1 -1
- package/dist/core/extensions/builtin/anthropic-web-search/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/anthropic-web-search/index.js.map +1 -1
- package/dist/core/extensions/builtin/bash-timeout/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/bash-timeout/index.js.map +1 -1
- package/dist/core/extensions/builtin/bash-timeout/timeout.d.ts.map +1 -1
- package/dist/core/extensions/builtin/bash-timeout/timeout.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/checkpoint-state.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/checkpoint-state.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/circuit-breaker.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/circuit-breaker.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/context-reduction.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/context-reduction.js +1 -1
- package/dist/core/extensions/builtin/compaction/context-reduction.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/degradation-monitor.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/degradation-monitor.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/openai-remote.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/openai-remote.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/overflow-detection.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/overflow-detection.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/per-turn-cap.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/per-turn-cap.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/policy.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/policy.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/prompts.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/prompts.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/repair-tool-pairs.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/repair-tool-pairs.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/restoration-tracker.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/restoration-tracker.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/state.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/state.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/todo-bridge.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/todo-bridge.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/tool-truncation.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/tool-truncation.js.map +1 -1
- package/dist/core/extensions/builtin/diff.d.ts.map +1 -1
- package/dist/core/extensions/builtin/diff.js.map +1 -1
- package/dist/core/extensions/builtin/files.d.ts.map +1 -1
- package/dist/core/extensions/builtin/files.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/constants.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/constants.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/errors.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/errors.js +0 -2
- package/dist/core/extensions/builtin/gpt-apply-patch/errors.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/params.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/params.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/parser.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/parser.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-diff.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-diff.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-replace.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-replace.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/preview-format.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/preview-format.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/preview.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/preview.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/seek-sequence.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/seek-sequence.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-parser.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-parser.js +7 -5
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-parser.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-render.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-render.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/text.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/text.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.js.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/workspace.d.ts.map +1 -1
- package/dist/core/extensions/builtin/gpt-apply-patch/workspace.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/filter.d.ts.map +1 -1
- package/dist/core/extensions/builtin/history-search/filter.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/history-search/index.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/indexer.d.ts.map +1 -1
- package/dist/core/extensions/builtin/history-search/indexer.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/overlay.d.ts.map +1 -1
- package/dist/core/extensions/builtin/history-search/overlay.js +3 -6
- package/dist/core/extensions/builtin/history-search/overlay.js.map +1 -1
- package/dist/core/extensions/builtin/history-search/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/kimi-web-search/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/kimi-web-search/index.js.map +1 -1
- package/dist/core/extensions/builtin/openai-web-search/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/openai-web-search/index.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/arity.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/arity.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/cli.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/cli.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/config.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/config.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/evaluate.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/evaluate.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/events.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/events.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/external-dir.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/external-dir.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/index.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/non-interactive.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/non-interactive.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/parsers.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/parsers.js +3 -1
- package/dist/core/extensions/builtin/permission-system/parsers.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/prompt.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/prompt.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/service.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/service.js +2 -5
- package/dist/core/extensions/builtin/permission-system/service.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/settings.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/settings.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/storage.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/storage.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/types.js +3 -5
- package/dist/core/extensions/builtin/permission-system/types.js.map +1 -1
- package/dist/core/extensions/builtin/permission-system/wildcard.d.ts.map +1 -1
- package/dist/core/extensions/builtin/permission-system/wildcard.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-5.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-6.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-6.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-7.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-7.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/file-operations.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/file-operations.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.2.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.2.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.3-codex.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.3-codex.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.4.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.4.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/index.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k2-6.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k2-6.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-url-widget.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-url-widget.js.map +1 -1
- package/dist/core/extensions/builtin/redraws.d.ts.map +1 -1
- package/dist/core/extensions/builtin/redraws.js.map +1 -1
- package/dist/core/extensions/builtin/service-tier.d.ts.map +1 -1
- package/dist/core/extensions/builtin/service-tier.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/index.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/loader.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/loader.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/overlay-format.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/overlay-format.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/overlay.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/overlay.js +13 -18
- package/dist/core/extensions/builtin/session-observer/overlay.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/scanner.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/scanner.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/text.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/text.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript-entries.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript-entries.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript-format.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript-format.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript.d.ts.map +1 -1
- package/dist/core/extensions/builtin/session-observer/transcript.js.map +1 -1
- package/dist/core/extensions/builtin/session-observer/types.d.ts.map +1 -1
- package/dist/core/extensions/builtin/system-messages.d.ts.map +1 -1
- package/dist/core/extensions/builtin/system-messages.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/index.js +0 -2
- package/dist/core/extensions/builtin/todotools/index.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/prompt.d.ts +1 -1
- package/dist/core/extensions/builtin/todotools/prompt.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/prompt.js +0 -2
- package/dist/core/extensions/builtin/todotools/prompt.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/state.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/state.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todoread.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todoread.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todowrite.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/tools/todowrite.js.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/index.js.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.js.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-openai-chat-completions-payload.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-openai-chat-completions-payload.js.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-openai-responses-payload.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-openai-responses-payload.js.map +1 -1
- package/dist/core/extensions/builtin/tps.d.ts.map +1 -1
- package/dist/core/extensions/builtin/tps.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +4 -4
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +7 -2
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +69 -43
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +22 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/wrapper.d.ts.map +1 -1
- package/dist/core/extensions/wrapper.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +17 -18
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/keybindings.d.ts +1 -1
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +0 -1
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-registry.d.ts +3 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +30 -13
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/output-guard.d.ts.map +1 -1
- package/dist/core/output-guard.js.map +1 -1
- package/dist/core/package-manager.d.ts +1 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +25 -13
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/project-trust.d.ts +15 -0
- package/dist/core/project-trust.d.ts.map +1 -0
- package/dist/core/project-trust.js +58 -0
- package/dist/core/project-trust.js.map +1 -0
- package/dist/core/prompt-templates.d.ts +2 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +24 -26
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-attribution.d.ts.map +1 -1
- package/dist/core/provider-attribution.js.map +1 -1
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/resource-loader.d.ts +14 -2
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +117 -74
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-cwd.d.ts.map +1 -1
- package/dist/core/session-cwd.js +0 -1
- package/dist/core/session-cwd.js.map +1 -1
- package/dist/core/session-manager.d.ts +3 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +41 -28
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-resident-store.d.ts +16 -0
- package/dist/core/session-resident-store.d.ts.map +1 -0
- package/dist/core/session-resident-store.js +48 -0
- package/dist/core/session-resident-store.js.map +1 -0
- package/dist/core/session-work-barrier.d.ts.map +1 -1
- package/dist/core/session-work-barrier.js +5 -3
- package/dist/core/session-work-barrier.js.map +1 -1
- package/dist/core/settings-manager.d.ts +14 -2
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +86 -46
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/source-info.d.ts.map +1 -1
- package/dist/core/source-info.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/telemetry.d.ts.map +1 -1
- package/dist/core/telemetry.js.map +1 -1
- package/dist/core/thinking-levels.d.ts.map +1 -1
- package/dist/core/thinking-levels.js.map +1 -1
- package/dist/core/timings.d.ts.map +1 -1
- package/dist/core/timings.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +9 -6
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/diff-render.d.ts.map +1 -1
- package/dist/core/tools/diff-render.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/file-mutation-queue.d.ts.map +1 -1
- package/dist/core/tools/file-mutation-queue.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +1 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +1 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +1 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +12 -18
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/path-utils.d.ts.map +1 -1
- package/dist/core/tools/path-utils.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +1 -1
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +1 -2
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts +31 -0
- package/dist/core/trust-manager.d.ts.map +1 -0
- package/dist/core/trust-manager.js +186 -0
- package/dist/core/trust-manager.js.map +1 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +101 -86
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +39 -34
- package/dist/migrations.js.map +1 -1
- package/dist/modes/index.d.ts +1 -1
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/components/armin.d.ts.map +1 -1
- package/dist/modes/interactive/components/armin.js +6 -10
- package/dist/modes/interactive/components/armin.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +2 -11
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +6 -11
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.js +0 -3
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +1 -3
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +1 -3
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +5 -15
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.js +0 -5
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +1 -8
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +1 -6
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -1
- package/dist/modes/interactive/components/daxnuts.js +6 -8
- package/dist/modes/interactive/components/daxnuts.js.map +1 -1
- package/dist/modes/interactive/components/diff.d.ts.map +1 -1
- package/dist/modes/interactive/components/diff.js +2 -2
- package/dist/modes/interactive/components/diff.js.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.js +0 -1
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +1 -6
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-input.js +2 -8
- package/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +1 -9
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/favorite-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/favorite-models-selector.js +9 -15
- package/dist/modes/interactive/components/favorite-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +10 -3
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +1 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +1 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +10 -10
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/model-favorites.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-favorites.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +9 -22
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +3 -12
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +33 -58
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +3 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +20 -4
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.js +0 -1
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +1 -3
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/theme-selector.js +0 -2
- package/dist/modes/interactive/components/theme-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +0 -1
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +35 -32
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +18 -32
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts +23 -0
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/trust-selector.js +85 -0
- package/dist/modes/interactive/components/trust-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +3 -6
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +0 -1
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +39 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +264 -114
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/session-info-format.d.ts.map +1 -1
- package/dist/modes/interactive/session-info-format.js.map +1 -1
- package/dist/modes/interactive/startup-tools.d.ts.map +1 -1
- package/dist/modes/interactive/startup-tools.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +0 -6
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/interactive/working-status.d.ts +2 -0
- package/dist/modes/interactive/working-status.d.ts.map +1 -1
- package/dist/modes/interactive/working-status.js +34 -0
- package/dist/modes/interactive/working-status.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/provider-native-rendering.d.ts.map +1 -1
- package/dist/modes/provider-native-rendering.js.map +1 -1
- package/dist/modes/rpc/jsonl.d.ts.map +1 -1
- package/dist/modes/rpc/jsonl.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +7 -8
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/package-manager-cli.d.ts +6 -2
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +105 -11
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/self-update-bootstrap.d.ts.map +1 -1
- package/dist/self-update-bootstrap.js.map +1 -1
- package/dist/senpi +10 -1
- package/dist/utils/ansi.d.ts.map +1 -1
- package/dist/utils/ansi.js.map +1 -1
- package/dist/utils/changelog.d.ts +1 -0
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js +78 -0
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard-native.d.ts.map +1 -1
- package/dist/utils/clipboard-native.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/deprecation.d.ts.map +1 -1
- package/dist/utils/deprecation.js.map +1 -1
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/fs-watch.d.ts.map +1 -1
- package/dist/utils/fs-watch.js.map +1 -1
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/html.d.ts.map +1 -1
- package/dist/utils/html.js.map +1 -1
- package/dist/utils/image-convert.d.ts.map +1 -1
- package/dist/utils/image-convert.js.map +1 -1
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/image-resize-worker.d.ts.map +1 -1
- package/dist/utils/image-resize-worker.js.map +1 -1
- package/dist/utils/image-resize.d.ts.map +1 -1
- package/dist/utils/image-resize.js.map +1 -1
- package/dist/utils/json.d.ts.map +1 -1
- package/dist/utils/json.js.map +1 -1
- package/dist/utils/mime.d.ts.map +1 -1
- package/dist/utils/mime.js.map +1 -1
- package/dist/utils/open-browser.d.ts.map +1 -1
- package/dist/utils/open-browser.js.map +1 -1
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/photon.d.ts.map +1 -1
- package/dist/utils/photon.js.map +1 -1
- package/dist/utils/pi-user-agent.d.ts.map +1 -1
- package/dist/utils/pi-user-agent.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/sleep.d.ts.map +1 -1
- package/dist/utils/sleep.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js.map +1 -1
- package/dist/utils/windows-self-update.d.ts.map +1 -1
- package/dist/utils/windows-self-update.js.map +1 -1
- package/docs/docs.json +4 -0
- package/docs/extensions.md +31 -2
- package/docs/index.md +1 -0
- package/docs/models.md +6 -39
- package/docs/packages.md +1 -1
- package/docs/prompt-templates.md +9 -2
- package/docs/sdk.md +5 -0
- package/docs/security.md +55 -0
- package/docs/settings.md +13 -0
- package/docs/skills.md +3 -3
- package/docs/terminal-setup.md +36 -2
- package/docs/themes.md +1 -1
- package/docs/tmux.md +4 -2
- package/docs/usage.md +18 -1
- package/examples/extensions/README.md +1 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/minimal-mode.ts +6 -6
- package/examples/extensions/project-trust.ts +64 -0
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +125 -77
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +7 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js +2 -27
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +7 -20
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +0 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js +0 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js +0 -7
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js +3 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js +0 -5
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +0 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/uuid.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/uuid.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js +0 -16
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/node.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +6 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +6 -6
- package/node_modules/@earendil-works/pi-ai/README.md +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/bedrock-provider.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cli.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cli.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +30 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +30 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/image-models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/images-api-registry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/images-api-registry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/images.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/images.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +533 -131
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +530 -255
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/oauth.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +15 -7
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +17 -7
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot-headers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot-headers.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.js +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +0 -7
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +5 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-prompt-cache.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-prompt-cache.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +3 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/register-builtins.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/register-builtins.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/transform-messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/transform-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/session-resources.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/session-resources.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/context-transformer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/context-transformer.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/gemma4.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/gemma4.js +10 -8
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/gemma4.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/hermes.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/hermes.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/json-mix.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/json-mix.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/morph-xml.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/morph-xml.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/xml-tool-tag-scanner.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/xml-tool-tag-scanner.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/yaml-xml.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/yaml-xml.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/stream-wrapper.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/stream-wrapper.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +6 -2
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/diagnostics.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/diagnostics.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +3 -7
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/hash.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/hash.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/headers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/headers.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/json-parse.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/json-parse.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/anthropic.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/anthropic.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/oauth-page.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/oauth-page.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/pkce.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/pkce.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/sanitize-unicode.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/sanitize-unicode.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/tool-pair-repair.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/tool-pair-repair.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +5 -5
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +3 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +0 -3
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js +1 -6
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js +4 -3
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +6 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +132 -93
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js +0 -8
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js +14 -14
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +5 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +29 -17
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +0 -11
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +4 -9
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +4 -12
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js +0 -8
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js +0 -3
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +131 -61
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +2 -4
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js +3 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/slash-command-autocomplete.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/slash-command-autocomplete.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +4 -6
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +4 -7
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +60 -103
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +39 -31
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js +3 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +57 -27
- package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/node_modules/@types/node/README.md +3 -3
- package/node_modules/@types/node/assert/strict.d.ts +3 -55
- package/node_modules/@types/node/assert.d.ts +49 -177
- package/node_modules/@types/node/async_hooks.d.ts +151 -43
- package/node_modules/@types/node/buffer.buffer.d.ts +2 -8
- package/node_modules/@types/node/buffer.d.ts +43 -212
- package/node_modules/@types/node/child_process.d.ts +23 -133
- package/node_modules/@types/node/cluster.d.ts +238 -384
- package/node_modules/@types/node/compatibility/iterators.d.ts +1 -0
- package/node_modules/@types/node/console.d.ts +45 -404
- package/node_modules/@types/node/constants.d.ts +3 -10
- package/node_modules/@types/node/crypto.d.ts +640 -1127
- package/node_modules/@types/node/dgram.d.ts +14 -77
- package/node_modules/@types/node/diagnostics_channel.d.ts +3 -29
- package/node_modules/@types/node/dns/promises.d.ts +4 -10
- package/node_modules/@types/node/dns.d.ts +130 -177
- package/node_modules/@types/node/domain.d.ts +12 -32
- package/node_modules/@types/node/events.d.ts +872 -840
- package/node_modules/@types/node/fs/promises.d.ts +193 -20
- package/node_modules/@types/node/fs.d.ts +754 -435
- package/node_modules/@types/node/globals.d.ts +8 -30
- package/node_modules/@types/node/globals.typedarray.d.ts +63 -0
- package/node_modules/@types/node/http.d.ts +363 -305
- package/node_modules/@types/node/http2.d.ts +545 -781
- package/node_modules/@types/node/https.d.ts +64 -243
- package/node_modules/@types/node/index.d.ts +26 -6
- package/node_modules/@types/node/inspector/promises.d.ts +35 -0
- package/node_modules/@types/node/inspector.d.ts +68 -57
- package/node_modules/@types/node/inspector.generated.d.ts +764 -410
- package/node_modules/@types/node/module.d.ts +53 -189
- package/node_modules/@types/node/net.d.ts +101 -207
- package/node_modules/@types/node/os.d.ts +11 -19
- package/node_modules/@types/node/package.json +13 -3
- package/node_modules/@types/node/path/posix.d.ts +8 -0
- package/node_modules/@types/node/path/win32.d.ts +8 -0
- package/node_modules/@types/node/path.d.ts +119 -141
- package/node_modules/@types/node/perf_hooks.d.ts +317 -673
- package/node_modules/@types/node/process.d.ts +277 -157
- package/node_modules/@types/node/punycode.d.ts +3 -31
- package/node_modules/@types/node/querystring.d.ts +3 -16
- package/node_modules/@types/node/quic.d.ts +897 -0
- package/node_modules/@types/node/readline/promises.d.ts +3 -6
- package/node_modules/@types/node/readline.d.ts +65 -152
- package/node_modules/@types/node/repl.d.ts +101 -109
- package/node_modules/@types/node/sea.d.ts +9 -115
- package/node_modules/@types/node/sqlite.d.ts +415 -68
- package/node_modules/@types/node/stream/consumers.d.ts +91 -15
- package/node_modules/@types/node/stream/iter.d.ts +301 -0
- package/node_modules/@types/node/stream/promises.d.ts +136 -15
- package/node_modules/@types/node/stream/web.d.ts +179 -501
- package/node_modules/@types/node/stream.d.ts +577 -490
- package/node_modules/@types/node/string_decoder.d.ts +3 -43
- package/node_modules/@types/node/test/reporters.d.ts +59 -0
- package/node_modules/@types/node/test.d.ts +402 -286
- package/node_modules/@types/node/timers/promises.d.ts +3 -18
- package/node_modules/@types/node/timers.d.ts +3 -141
- package/node_modules/@types/node/tls.d.ts +115 -241
- package/node_modules/@types/node/trace_events.d.ts +3 -97
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +2 -8
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +2 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +28 -6
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +119 -0
- package/node_modules/@types/node/tty.d.ts +57 -40
- package/node_modules/@types/node/url.d.ts +156 -584
- package/node_modules/@types/node/util/types.d.ts +558 -0
- package/node_modules/@types/node/util.d.ts +167 -1096
- package/node_modules/@types/node/v8.d.ts +75 -15
- package/node_modules/@types/node/vm.d.ts +334 -198
- package/node_modules/@types/node/wasi.d.ts +24 -74
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
- package/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
- package/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/node_modules/@types/node/web-globals/events.d.ts +9 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +14 -0
- package/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +3 -0
- package/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +115 -0
- package/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/node_modules/@types/node/worker_threads.d.ts +280 -393
- package/node_modules/@types/node/zlib/iter.d.ts +131 -0
- package/node_modules/@types/node/zlib.d.ts +7 -165
- package/node_modules/undici-types/agent.d.ts +13 -12
- package/node_modules/undici-types/api.d.ts +26 -26
- package/node_modules/undici-types/balanced-pool.d.ts +13 -12
- package/node_modules/undici-types/cache-interceptor.d.ts +179 -0
- package/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/undici-types/client.d.ts +34 -19
- package/node_modules/undici-types/connector.d.ts +4 -2
- package/node_modules/undici-types/cookies.d.ts +2 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +18 -10
- package/node_modules/undici-types/dispatcher.d.ts +127 -104
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
- package/node_modules/undici-types/errors.d.ts +82 -54
- package/node_modules/undici-types/eventsource.d.ts +9 -4
- package/node_modules/undici-types/fetch.d.ts +22 -20
- package/node_modules/undici-types/formdata.d.ts +7 -7
- package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/node_modules/undici-types/global-origin.d.ts +5 -5
- package/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/node_modules/undici-types/handlers.d.ts +8 -8
- package/node_modules/undici-types/header.d.ts +157 -1
- package/node_modules/undici-types/index.d.ts +67 -47
- package/node_modules/undici-types/interceptors.d.ts +71 -8
- package/node_modules/undici-types/mock-agent.d.ts +36 -18
- package/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/undici-types/mock-client.d.ts +6 -4
- package/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/node_modules/undici-types/mock-interceptor.d.ts +21 -20
- package/node_modules/undici-types/mock-pool.d.ts +6 -4
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +0 -4
- package/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/node_modules/undici-types/pool.d.ts +15 -13
- package/node_modules/undici-types/proxy-agent.d.ts +5 -4
- package/node_modules/undici-types/readable.d.ts +19 -16
- package/node_modules/undici-types/retry-agent.d.ts +1 -1
- package/node_modules/undici-types/retry-handler.d.ts +19 -10
- package/node_modules/undici-types/round-robin-pool.d.ts +41 -0
- package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
- package/node_modules/undici-types/util.d.ts +3 -3
- package/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/undici-types/webidl.d.ts +148 -29
- package/node_modules/undici-types/websocket.d.ts +48 -10
- package/npm-shrinkwrap.json +21 -21
- package/package.json +13 -12
- package/dist/core/extensions/builtin/todotools/continuation/config.d.ts +0 -10
- package/dist/core/extensions/builtin/todotools/continuation/config.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/config.js +0 -33
- package/dist/core/extensions/builtin/todotools/continuation/config.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/index.d.ts +0 -2
- package/dist/core/extensions/builtin/todotools/continuation/index.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/index.js +0 -2
- package/dist/core/extensions/builtin/todotools/continuation/index.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/prompt.d.ts +0 -5
- package/dist/core/extensions/builtin/todotools/continuation/prompt.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/prompt.js +0 -34
- package/dist/core/extensions/builtin/todotools/continuation/prompt.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/runtime.d.ts +0 -11
- package/dist/core/extensions/builtin/todotools/continuation/runtime.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/continuation/runtime.js +0 -201
- package/dist/core/extensions/builtin/todotools/continuation/runtime.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/settings.d.ts +0 -6
- package/dist/core/extensions/builtin/todotools/settings.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/settings.js +0 -58
- package/dist/core/extensions/builtin/todotools/settings.js.map +0 -1
- package/dist/core/extensions/builtin/todotools/system-messages.d.ts +0 -34
- package/dist/core/extensions/builtin/todotools/system-messages.d.ts.map +0 -1
- package/dist/core/extensions/builtin/todotools/system-messages.js +0 -82
- package/dist/core/extensions/builtin/todotools/system-messages.js.map +0 -1
- package/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
- package/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
- package/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/undici-types/filereader.d.ts +0 -54
|
@@ -1,44 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
* The `node:vm` module enables compiling and running code within V8 Virtual
|
|
3
|
-
* Machine contexts.
|
|
4
|
-
*
|
|
5
|
-
* **The `node:vm` module is not a security**
|
|
6
|
-
* **mechanism. Do not use it to run untrusted code.**
|
|
7
|
-
*
|
|
8
|
-
* JavaScript code can be compiled and run immediately or
|
|
9
|
-
* compiled, saved, and run later.
|
|
10
|
-
*
|
|
11
|
-
* A common use case is to run the code in a different V8 Context. This means
|
|
12
|
-
* invoked code has a different global object than the invoking code.
|
|
13
|
-
*
|
|
14
|
-
* One can provide the context by `contextifying` an
|
|
15
|
-
* object. The invoked code treats any property in the context like a
|
|
16
|
-
* global variable. Any changes to global variables caused by the invoked
|
|
17
|
-
* code are reflected in the context object.
|
|
18
|
-
*
|
|
19
|
-
* ```js
|
|
20
|
-
* import vm from 'node:vm';
|
|
21
|
-
*
|
|
22
|
-
* const x = 1;
|
|
23
|
-
*
|
|
24
|
-
* const context = { x: 2 };
|
|
25
|
-
* vm.createContext(context); // Contextify the object.
|
|
26
|
-
*
|
|
27
|
-
* const code = 'x += 40; var y = 17;';
|
|
28
|
-
* // `x` and `y` are global variables in the context.
|
|
29
|
-
* // Initially, x has the value 2 because that is the value of context.x.
|
|
30
|
-
* vm.runInContext(code, context);
|
|
31
|
-
*
|
|
32
|
-
* console.log(context.x); // 42
|
|
33
|
-
* console.log(context.y); // 17
|
|
34
|
-
*
|
|
35
|
-
* console.log(x); // 1; y is not defined.
|
|
36
|
-
* ```
|
|
37
|
-
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/vm.js)
|
|
38
|
-
*/
|
|
39
|
-
declare module "vm" {
|
|
1
|
+
declare module "node:vm" {
|
|
40
2
|
import { NonSharedBuffer } from "node:buffer";
|
|
41
|
-
import { ImportAttributes } from "node:module";
|
|
3
|
+
import { ImportAttributes, ImportPhase } from "node:module";
|
|
42
4
|
interface Context extends NodeJS.Dict<any> {}
|
|
43
5
|
interface BaseOptions {
|
|
44
6
|
/**
|
|
@@ -61,6 +23,7 @@ declare module "vm" {
|
|
|
61
23
|
specifier: string,
|
|
62
24
|
referrer: T,
|
|
63
25
|
importAttributes: ImportAttributes,
|
|
26
|
+
phase: ImportPhase,
|
|
64
27
|
) => Module | Promise<Module>;
|
|
65
28
|
interface ScriptOptions extends BaseOptions {
|
|
66
29
|
/**
|
|
@@ -72,7 +35,8 @@ declare module "vm" {
|
|
|
72
35
|
/**
|
|
73
36
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
74
37
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
75
|
-
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
38
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
39
|
+
* @experimental
|
|
76
40
|
*/
|
|
77
41
|
importModuleDynamically?:
|
|
78
42
|
| DynamicModuleLoader<Script>
|
|
@@ -117,7 +81,8 @@ declare module "vm" {
|
|
|
117
81
|
/**
|
|
118
82
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
119
83
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
120
|
-
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
84
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
85
|
+
* @experimental
|
|
121
86
|
*/
|
|
122
87
|
importModuleDynamically?:
|
|
123
88
|
| DynamicModuleLoader<Script>
|
|
@@ -130,7 +95,8 @@ declare module "vm" {
|
|
|
130
95
|
/**
|
|
131
96
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
132
97
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
133
|
-
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
98
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
99
|
+
* @experimental
|
|
134
100
|
*/
|
|
135
101
|
importModuleDynamically?:
|
|
136
102
|
| DynamicModuleLoader<Script>
|
|
@@ -149,7 +115,8 @@ declare module "vm" {
|
|
|
149
115
|
/**
|
|
150
116
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
151
117
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
152
|
-
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
118
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
119
|
+
* @experimental
|
|
153
120
|
*/
|
|
154
121
|
importModuleDynamically?:
|
|
155
122
|
| DynamicModuleLoader<ReturnType<typeof compileFunction>>
|
|
@@ -192,7 +159,8 @@ declare module "vm" {
|
|
|
192
159
|
/**
|
|
193
160
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
194
161
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
195
|
-
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
162
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
163
|
+
* @experimental
|
|
196
164
|
*/
|
|
197
165
|
importModuleDynamically?:
|
|
198
166
|
| DynamicModuleLoader<Context>
|
|
@@ -232,16 +200,16 @@ declare module "vm" {
|
|
|
232
200
|
* The globals are contained in the `context` object.
|
|
233
201
|
*
|
|
234
202
|
* ```js
|
|
235
|
-
* import
|
|
203
|
+
* import { createContext, Script } from 'node:vm';
|
|
236
204
|
*
|
|
237
205
|
* const context = {
|
|
238
206
|
* animal: 'cat',
|
|
239
207
|
* count: 2,
|
|
240
208
|
* };
|
|
241
209
|
*
|
|
242
|
-
* const script = new
|
|
210
|
+
* const script = new Script('count += 1; name = "kitty";');
|
|
243
211
|
*
|
|
244
|
-
*
|
|
212
|
+
* createContext(context);
|
|
245
213
|
* for (let i = 0; i < 10; ++i) {
|
|
246
214
|
* script.runInContext(context);
|
|
247
215
|
* }
|
|
@@ -264,20 +232,21 @@ declare module "vm" {
|
|
|
264
232
|
*
|
|
265
233
|
* 1. Creates a new context.
|
|
266
234
|
* 2. If `contextObject` is an object, contextifies it with the new context.
|
|
267
|
-
* If
|
|
235
|
+
* If `contextObject` is undefined, creates a new object and contextifies it.
|
|
268
236
|
* If `contextObject` is `vm.constants.DONT_CONTEXTIFY`, don't contextify anything.
|
|
269
|
-
* 3.
|
|
270
|
-
*
|
|
271
|
-
*
|
|
237
|
+
* 3. Compiles the code as a `vm.Script`
|
|
238
|
+
* 4. Runs the compiled code within the created context. The code does not have access to the scope in
|
|
239
|
+
* which this method is called.
|
|
240
|
+
* 5. Returns the result.
|
|
272
241
|
*
|
|
273
242
|
* The following example compiles code that sets a global variable, then executes
|
|
274
243
|
* the code multiple times in different contexts. The globals are set on and
|
|
275
244
|
* contained within each individual `context`.
|
|
276
245
|
*
|
|
277
246
|
* ```js
|
|
278
|
-
*
|
|
247
|
+
* import { constants, Script } from 'node:vm';
|
|
279
248
|
*
|
|
280
|
-
* const script = new
|
|
249
|
+
* const script = new Script('globalVar = "set"');
|
|
281
250
|
*
|
|
282
251
|
* const contexts = [{}, {}, {}];
|
|
283
252
|
* contexts.forEach((context) => {
|
|
@@ -288,10 +257,10 @@ declare module "vm" {
|
|
|
288
257
|
* // Prints: [{ globalVar: 'set' }, { globalVar: 'set' }, { globalVar: 'set' }]
|
|
289
258
|
*
|
|
290
259
|
* // This would throw if the context is created from a contextified object.
|
|
291
|
-
* //
|
|
260
|
+
* // constants.DONT_CONTEXTIFY allows creating contexts with ordinary
|
|
292
261
|
* // global objects that can be frozen.
|
|
293
|
-
* const freezeScript = new
|
|
294
|
-
* const frozenContext = freezeScript.runInNewContext(
|
|
262
|
+
* const freezeScript = new Script('Object.freeze(globalThis); globalThis;');
|
|
263
|
+
* const frozenContext = freezeScript.runInNewContext(constants.DONT_CONTEXTIFY);
|
|
295
264
|
* ```
|
|
296
265
|
* @since v0.3.1
|
|
297
266
|
* @param contextObject Either `vm.constants.DONT_CONTEXTIFY` or an object that will be contextified.
|
|
@@ -310,11 +279,11 @@ declare module "vm" {
|
|
|
310
279
|
* executes that code multiple times:
|
|
311
280
|
*
|
|
312
281
|
* ```js
|
|
313
|
-
* import
|
|
282
|
+
* import { Script } from 'node:vm';
|
|
314
283
|
*
|
|
315
284
|
* global.globalVar = 0;
|
|
316
285
|
*
|
|
317
|
-
* const script = new
|
|
286
|
+
* const script = new Script('globalVar += 1', { filename: 'myfile.vm' });
|
|
318
287
|
*
|
|
319
288
|
* for (let i = 0; i < 1000; ++i) {
|
|
320
289
|
* script.runInThisContext();
|
|
@@ -394,23 +363,23 @@ declare module "vm" {
|
|
|
394
363
|
}
|
|
395
364
|
/**
|
|
396
365
|
* If the given `contextObject` is an object, the `vm.createContext()` method will
|
|
397
|
-
* [prepare that object](https://nodejs.org/docs/latest-
|
|
366
|
+
* [prepare that object](https://nodejs.org/docs/latest-v25.x/api/vm.html#what-does-it-mean-to-contextify-an-object)
|
|
398
367
|
* and return a reference to it so that it can be used in calls to {@link runInContext} or
|
|
399
|
-
* [`script.runInContext()`](https://nodejs.org/docs/latest-
|
|
368
|
+
* [`script.runInContext()`](https://nodejs.org/docs/latest-v25.x/api/vm.html#scriptrunincontextcontextifiedobject-options).
|
|
400
369
|
* Inside such scripts, the global object will be wrapped by the `contextObject`, retaining all of its
|
|
401
370
|
* existing properties but also having the built-in objects and functions any standard
|
|
402
371
|
* [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global
|
|
403
372
|
* variables will remain unchanged.
|
|
404
373
|
*
|
|
405
374
|
* ```js
|
|
406
|
-
*
|
|
375
|
+
* import { createContext, runInContext } from 'node:vm';
|
|
407
376
|
*
|
|
408
377
|
* global.globalVar = 3;
|
|
409
378
|
*
|
|
410
379
|
* const context = { globalVar: 1 };
|
|
411
|
-
*
|
|
380
|
+
* createContext(context);
|
|
412
381
|
*
|
|
413
|
-
*
|
|
382
|
+
* runInContext('globalVar *= 2;', context);
|
|
414
383
|
*
|
|
415
384
|
* console.log(context);
|
|
416
385
|
* // Prints: { globalVar: 2 }
|
|
@@ -461,13 +430,13 @@ declare module "vm" {
|
|
|
461
430
|
* The following example compiles and executes different scripts using a single `contextified` object:
|
|
462
431
|
*
|
|
463
432
|
* ```js
|
|
464
|
-
* import
|
|
433
|
+
* import { createContext, runInContext } from 'node:vm';
|
|
465
434
|
*
|
|
466
435
|
* const contextObject = { globalVar: 1 };
|
|
467
|
-
*
|
|
436
|
+
* createContext(contextObject);
|
|
468
437
|
*
|
|
469
438
|
* for (let i = 0; i < 10; ++i) {
|
|
470
|
-
*
|
|
439
|
+
* runInContext('globalVar *= 2;', contextObject);
|
|
471
440
|
* }
|
|
472
441
|
* console.log(contextObject);
|
|
473
442
|
* // Prints: { globalVar: 1024 }
|
|
@@ -498,21 +467,24 @@ declare module "vm" {
|
|
|
498
467
|
* variable and sets a new one. These globals are contained in the `contextObject`.
|
|
499
468
|
*
|
|
500
469
|
* ```js
|
|
501
|
-
*
|
|
470
|
+
* import { runInNewContext, constants } from 'node:vm';
|
|
502
471
|
*
|
|
503
472
|
* const contextObject = {
|
|
504
473
|
* animal: 'cat',
|
|
505
474
|
* count: 2,
|
|
506
475
|
* };
|
|
507
476
|
*
|
|
508
|
-
*
|
|
477
|
+
* runInNewContext('count += 1; name = "kitty"', contextObject);
|
|
509
478
|
* console.log(contextObject);
|
|
510
479
|
* // Prints: { animal: 'cat', count: 3, name: 'kitty' }
|
|
511
480
|
*
|
|
512
481
|
* // This would throw if the context is created from a contextified object.
|
|
513
482
|
* // vm.constants.DONT_CONTEXTIFY allows creating contexts with ordinary global objects that
|
|
514
483
|
* // can be frozen.
|
|
515
|
-
* const frozenContext =
|
|
484
|
+
* const frozenContext = runInNewContext(
|
|
485
|
+
* 'Object.freeze(globalThis); globalThis;',
|
|
486
|
+
* constants.DONT_CONTEXTIFY,
|
|
487
|
+
* );
|
|
516
488
|
* ```
|
|
517
489
|
* @since v0.3.1
|
|
518
490
|
* @param code The JavaScript code to compile and run.
|
|
@@ -536,10 +508,10 @@ declare module "vm" {
|
|
|
536
508
|
* the JavaScript [`eval()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) function to run the same code:
|
|
537
509
|
*
|
|
538
510
|
* ```js
|
|
539
|
-
* import
|
|
511
|
+
* import { runInThisContext } from 'node:vm';
|
|
540
512
|
* let localVar = 'initial value';
|
|
541
513
|
*
|
|
542
|
-
* const vmResult =
|
|
514
|
+
* const vmResult = runInThisContext('localVar = "vm";');
|
|
543
515
|
* console.log(`vmResult: '${vmResult}', localVar: '${localVar}'`);
|
|
544
516
|
* // Prints: vmResult: 'vm', localVar: 'initial value'
|
|
545
517
|
*
|
|
@@ -551,38 +523,6 @@ declare module "vm" {
|
|
|
551
523
|
* Because `vm.runInThisContext()` does not have access to the local scope, `localVar` is unchanged. In contrast,
|
|
552
524
|
* [`eval()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) _does_ have access to the
|
|
553
525
|
* local scope, so the value `localVar` is changed. In this way `vm.runInThisContext()` is much like an [indirect `eval()` call](https://es5.github.io/#x10.4.2), e.g.`(0,eval)('code')`.
|
|
554
|
-
*
|
|
555
|
-
* ## Example: Running an HTTP server within a VM
|
|
556
|
-
*
|
|
557
|
-
* When using either `script.runInThisContext()` or {@link runInThisContext}, the code is executed within the current V8 global
|
|
558
|
-
* context. The code passed to this VM context will have its own isolated scope.
|
|
559
|
-
*
|
|
560
|
-
* In order to run a simple web server using the `node:http` module the code passed
|
|
561
|
-
* to the context must either import `node:http` on its own, or have a
|
|
562
|
-
* reference to the `node:http` module passed to it. For instance:
|
|
563
|
-
*
|
|
564
|
-
* ```js
|
|
565
|
-
* 'use strict';
|
|
566
|
-
* import vm from 'node:vm';
|
|
567
|
-
*
|
|
568
|
-
* const code = `
|
|
569
|
-
* ((require) => {
|
|
570
|
-
* const http = require('node:http');
|
|
571
|
-
*
|
|
572
|
-
* http.createServer((request, response) => {
|
|
573
|
-
* response.writeHead(200, { 'Content-Type': 'text/plain' });
|
|
574
|
-
* response.end('Hello World\\n');
|
|
575
|
-
* }).listen(8124);
|
|
576
|
-
*
|
|
577
|
-
* console.log('Server running at http://127.0.0.1:8124/');
|
|
578
|
-
* })`;
|
|
579
|
-
*
|
|
580
|
-
* vm.runInThisContext(code)(require);
|
|
581
|
-
* ```
|
|
582
|
-
*
|
|
583
|
-
* The `require()` in the above case shares the state with the context it is
|
|
584
|
-
* passed from. This may introduce risks when untrusted code is executed, e.g.
|
|
585
|
-
* altering objects in the context in unwanted ways.
|
|
586
526
|
* @since v0.3.1
|
|
587
527
|
* @param code The JavaScript code to compile and run.
|
|
588
528
|
* @return the result of the very last statement executed in the script.
|
|
@@ -614,44 +554,32 @@ declare module "vm" {
|
|
|
614
554
|
* the memory occupied by each heap space in the current V8 instance.
|
|
615
555
|
*
|
|
616
556
|
* ```js
|
|
617
|
-
* import
|
|
557
|
+
* import { createContext, measureMemory } from 'node:vm';
|
|
618
558
|
* // Measure the memory used by the main context.
|
|
619
|
-
*
|
|
559
|
+
* measureMemory({ mode: 'summary' })
|
|
620
560
|
* // This is the same as vm.measureMemory()
|
|
621
561
|
* .then((result) => {
|
|
622
562
|
* // The current format is:
|
|
623
563
|
* // {
|
|
624
|
-
* // total: {
|
|
625
|
-
* //
|
|
626
|
-
* // }
|
|
564
|
+
* // total: { jsMemoryEstimate: 1601828, jsMemoryRange: [1601828, 5275288] },
|
|
565
|
+
* // WebAssembly: { code: 0, metadata: 33962 },
|
|
627
566
|
* // }
|
|
628
567
|
* console.log(result);
|
|
629
568
|
* });
|
|
630
569
|
*
|
|
631
|
-
* const context =
|
|
632
|
-
*
|
|
633
|
-
*
|
|
634
|
-
*
|
|
635
|
-
*
|
|
636
|
-
*
|
|
637
|
-
*
|
|
638
|
-
*
|
|
639
|
-
*
|
|
640
|
-
*
|
|
641
|
-
*
|
|
642
|
-
*
|
|
643
|
-
*
|
|
644
|
-
* // jsMemoryRange: [ 2438996, 2768636 ]
|
|
645
|
-
* // },
|
|
646
|
-
* // other: [
|
|
647
|
-
* // {
|
|
648
|
-
* // jsMemoryEstimate: 135736,
|
|
649
|
-
* // jsMemoryRange: [ 135736, 465376 ]
|
|
650
|
-
* // }
|
|
651
|
-
* // ]
|
|
652
|
-
* // }
|
|
653
|
-
* console.log(result);
|
|
654
|
-
* });
|
|
570
|
+
* const context = createContext({ a: 1 });
|
|
571
|
+
* measureMemory({ mode: 'detailed', execution: 'eager' }).then((result) => {
|
|
572
|
+
* // Reference the context here so that it won't be GC'ed
|
|
573
|
+
* // until the measurement is complete.
|
|
574
|
+
* console.log('Context:', context.a);
|
|
575
|
+
* // {
|
|
576
|
+
* // total: { jsMemoryEstimate: 1767100, jsMemoryRange: [1767100, 5440560] },
|
|
577
|
+
* // WebAssembly: { code: 0, metadata: 33962 },
|
|
578
|
+
* // current: { jsMemoryEstimate: 1601828, jsMemoryRange: [1601828, 5275288] },
|
|
579
|
+
* // other: [{ jsMemoryEstimate: 165272, jsMemoryRange: [Array] }],
|
|
580
|
+
* // }
|
|
581
|
+
* console.log(result);
|
|
582
|
+
* });
|
|
655
583
|
* ```
|
|
656
584
|
* @since v13.10.0
|
|
657
585
|
* @experimental
|
|
@@ -671,14 +599,12 @@ declare module "vm" {
|
|
|
671
599
|
* flag enabled.
|
|
672
600
|
*
|
|
673
601
|
* The `vm.Module` class provides a low-level interface for using
|
|
674
|
-
* ECMAScript modules in VM contexts. It is the counterpart of the `vm.Script`
|
|
675
|
-
* defined in the ECMAScript
|
|
602
|
+
* ECMAScript modules in VM contexts. It is the counterpart of the `vm.Script`
|
|
603
|
+
* class that closely mirrors [Module Record](https://tc39.es/ecma262/#sec-abstract-module-records)s as defined in the ECMAScript
|
|
676
604
|
* specification.
|
|
677
605
|
*
|
|
678
606
|
* Unlike `vm.Script` however, every `vm.Module` object is bound to a context from
|
|
679
|
-
* its creation.
|
|
680
|
-
* in contrast with the synchronous nature of `vm.Script` objects. The use of
|
|
681
|
-
* 'async' functions can help with manipulating `vm.Module` objects.
|
|
607
|
+
* its creation.
|
|
682
608
|
*
|
|
683
609
|
* Using a `vm.Module` object requires three distinct steps: creation/parsing,
|
|
684
610
|
* linking, and evaluation. These three steps are illustrated in the following
|
|
@@ -706,7 +632,7 @@ declare module "vm" {
|
|
|
706
632
|
* // Here, we attempt to obtain the default export from the module "foo", and
|
|
707
633
|
* // put it into local binding "secret".
|
|
708
634
|
*
|
|
709
|
-
* const
|
|
635
|
+
* const rootModule = new vm.SourceTextModule(`
|
|
710
636
|
* import s from 'foo';
|
|
711
637
|
* s;
|
|
712
638
|
* print(s);
|
|
@@ -716,39 +642,48 @@ declare module "vm" {
|
|
|
716
642
|
* //
|
|
717
643
|
* // "Link" the imported dependencies of this Module to it.
|
|
718
644
|
* //
|
|
719
|
-
* //
|
|
720
|
-
* //
|
|
721
|
-
* // the imported module. The callback is expected to return a Module that
|
|
722
|
-
* // corresponds to the provided specifier, with certain requirements documented
|
|
723
|
-
* // in `module.link()`.
|
|
724
|
-
* //
|
|
725
|
-
* // If linking has not started for the returned Module, the same linker
|
|
726
|
-
* // callback will be called on the returned Module.
|
|
645
|
+
* // Obtain the requested dependencies of a SourceTextModule by
|
|
646
|
+
* // `sourceTextModule.moduleRequests` and resolve them.
|
|
727
647
|
* //
|
|
728
648
|
* // Even top-level Modules without dependencies must be explicitly linked. The
|
|
729
|
-
* //
|
|
730
|
-
* //
|
|
731
|
-
* // The link() method returns a Promise that will be resolved when all the
|
|
732
|
-
* // Promises returned by the linker resolve.
|
|
649
|
+
* // array passed to `sourceTextModule.linkRequests(modules)` can be
|
|
650
|
+
* // empty, however.
|
|
733
651
|
* //
|
|
734
|
-
* // Note: This is a contrived example in that the
|
|
735
|
-
* // "foo" module every time it is called. In a full-fledged
|
|
736
|
-
* // cache would probably be used to avoid duplicated modules.
|
|
737
|
-
*
|
|
738
|
-
*
|
|
739
|
-
*
|
|
740
|
-
*
|
|
741
|
-
*
|
|
742
|
-
*
|
|
743
|
-
*
|
|
744
|
-
*
|
|
745
|
-
*
|
|
746
|
-
* //
|
|
747
|
-
*
|
|
748
|
-
*
|
|
749
|
-
*
|
|
652
|
+
* // Note: This is a contrived example in that the resolveAndLinkDependencies
|
|
653
|
+
* // creates a new "foo" module every time it is called. In a full-fledged
|
|
654
|
+
* // module system, a cache would probably be used to avoid duplicated modules.
|
|
655
|
+
*
|
|
656
|
+
* const moduleMap = new Map([
|
|
657
|
+
* ['root', rootModule],
|
|
658
|
+
* ]);
|
|
659
|
+
*
|
|
660
|
+
* function resolveAndLinkDependencies(module) {
|
|
661
|
+
* const requestedModules = module.moduleRequests.map((request) => {
|
|
662
|
+
* // In a full-fledged module system, the resolveAndLinkDependencies would
|
|
663
|
+
* // resolve the module with the module cache key `[specifier, attributes]`.
|
|
664
|
+
* // In this example, we just use the specifier as the key.
|
|
665
|
+
* const specifier = request.specifier;
|
|
666
|
+
*
|
|
667
|
+
* let requestedModule = moduleMap.get(specifier);
|
|
668
|
+
* if (requestedModule === undefined) {
|
|
669
|
+
* requestedModule = new vm.SourceTextModule(`
|
|
670
|
+
* // The "secret" variable refers to the global variable we added to
|
|
671
|
+
* // "contextifiedObject" when creating the context.
|
|
672
|
+
* export default secret;
|
|
673
|
+
* `, { context: referencingModule.context });
|
|
674
|
+
* moduleMap.set(specifier, requestedModule);
|
|
675
|
+
* // Resolve the dependencies of the new module as well.
|
|
676
|
+
* resolveAndLinkDependencies(requestedModule);
|
|
677
|
+
* }
|
|
678
|
+
*
|
|
679
|
+
* return requestedModule;
|
|
680
|
+
* });
|
|
681
|
+
*
|
|
682
|
+
* module.linkRequests(requestedModules);
|
|
750
683
|
* }
|
|
751
|
-
*
|
|
684
|
+
*
|
|
685
|
+
* resolveAndLinkDependencies(rootModule);
|
|
686
|
+
* rootModule.instantiate();
|
|
752
687
|
*
|
|
753
688
|
* // Step 3
|
|
754
689
|
* //
|
|
@@ -756,20 +691,12 @@ declare module "vm" {
|
|
|
756
691
|
* // resolve after the module has finished evaluating.
|
|
757
692
|
*
|
|
758
693
|
* // Prints 42.
|
|
759
|
-
* await
|
|
694
|
+
* await rootModule.evaluate();
|
|
760
695
|
* ```
|
|
761
696
|
* @since v13.0.0, v12.16.0
|
|
762
697
|
* @experimental
|
|
763
698
|
*/
|
|
764
699
|
class Module {
|
|
765
|
-
/**
|
|
766
|
-
* The specifiers of all dependencies of this module. The returned array is frozen
|
|
767
|
-
* to disallow any changes to it.
|
|
768
|
-
*
|
|
769
|
-
* Corresponds to the `[[RequestedModules]]` field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s in
|
|
770
|
-
* the ECMAScript specification.
|
|
771
|
-
*/
|
|
772
|
-
dependencySpecifiers: readonly string[];
|
|
773
700
|
/**
|
|
774
701
|
* If the `module.status` is `'errored'`, this property contains the exception
|
|
775
702
|
* thrown by the module during evaluation. If the status is anything else,
|
|
@@ -814,19 +741,47 @@ declare module "vm" {
|
|
|
814
741
|
*/
|
|
815
742
|
status: ModuleStatus;
|
|
816
743
|
/**
|
|
817
|
-
* Evaluate the module.
|
|
744
|
+
* Evaluate the module and its depenendencies. Corresponds to the [Evaluate() concrete method](https://tc39.es/ecma262/#sec-moduleevaluation) field of
|
|
745
|
+
* [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records)s in the ECMAScript specification.
|
|
818
746
|
*
|
|
819
|
-
*
|
|
820
|
-
*
|
|
821
|
-
* case it will either do nothing if the initial evaluation ended in success
|
|
822
|
-
* (`module.status` is `'evaluated'`) or it will re-throw the exception that the
|
|
823
|
-
* initial evaluation resulted in (`module.status` is `'errored'`).
|
|
747
|
+
* If the module is a `vm.SourceTextModule`, `evaluate()` must be called after the module has been instantiated;
|
|
748
|
+
* otherwise `evaluate()` will return a rejected promise.
|
|
824
749
|
*
|
|
825
|
-
*
|
|
826
|
-
*
|
|
750
|
+
* For a `vm.SourceTextModule`, the promise returned by `evaluate()` may be fulfilled either
|
|
751
|
+
* synchronously or asynchronously:
|
|
827
752
|
*
|
|
828
|
-
*
|
|
829
|
-
*
|
|
753
|
+
* 1. If the `vm.SourceTextModule` has no top-level `await` in itself or any of its dependencies, the promise will be
|
|
754
|
+
* fulfilled _synchronously_ after the module and all its dependencies have been evaluated.
|
|
755
|
+
* 1. If the evaluation succeeds, the promise will be _synchronously_ resolved to `undefined`.
|
|
756
|
+
* 2. If the evaluation results in an exception, the promise will be _synchronously_ rejected with the exception
|
|
757
|
+
* that causes the evaluation to fail, which is the same as `module.error`.
|
|
758
|
+
* 2. If the `vm.SourceTextModule` has top-level `await` in itself or any of its dependencies, the promise will be
|
|
759
|
+
* fulfilled _asynchronously_ after the module and all its dependencies have been evaluated.
|
|
760
|
+
* 1. If the evaluation succeeds, the promise will be _asynchronously_ resolved to `undefined`.
|
|
761
|
+
* 2. If the evaluation results in an exception, the promise will be _asynchronously_ rejected with the exception
|
|
762
|
+
* that causes the evaluation to fail.
|
|
763
|
+
*
|
|
764
|
+
* If the module is a `vm.SyntheticModule`, `evaluate()` always returns a promise that fulfills synchronously, see
|
|
765
|
+
* the specification of [Evaluate() of a Synthetic Module Record](https://tc39.es/ecma262/#sec-smr-Evaluate):
|
|
766
|
+
*
|
|
767
|
+
* 1. If the `evaluateCallback` passed to its constructor throws an exception synchronously, `evaluate()` returns
|
|
768
|
+
* a promise that will be synchronously rejected with that exception.
|
|
769
|
+
* 2. If the `evaluateCallback` does not throw an exception, `evaluate()` returns a promise that will be
|
|
770
|
+
* synchronously resolved to `undefined`.
|
|
771
|
+
*
|
|
772
|
+
* The `evaluateCallback` of a `vm.SyntheticModule` is executed synchronously within the `evaluate()` call, and its
|
|
773
|
+
* return value is discarded. This means if `evaluateCallback` is an asynchronous function, the promise returned by
|
|
774
|
+
* `evaluate()` will not reflect its asynchronous behavior, and any rejections from an asynchronous
|
|
775
|
+
* `evaluateCallback` will be lost.
|
|
776
|
+
*
|
|
777
|
+
* `evaluate()` could also be called again after the module has already been evaluated, in which case:
|
|
778
|
+
*
|
|
779
|
+
* 1. If the initial evaluation ended in success (`module.status` is `'evaluated'`), it will do nothing
|
|
780
|
+
* and return a promise that resolves to `undefined`.
|
|
781
|
+
* 2. If the initial evaluation resulted in an exception (`module.status` is `'errored'`), it will re-reject
|
|
782
|
+
* the exception that the initial evaluation resulted in.
|
|
783
|
+
*
|
|
784
|
+
* This method cannot be called while the module is being evaluated (`module.status` is `'evaluating'`).
|
|
830
785
|
* @return Fulfills with `undefined` upon success.
|
|
831
786
|
*/
|
|
832
787
|
evaluate(options?: ModuleEvaluateOptions): Promise<void>;
|
|
@@ -834,6 +789,10 @@ declare module "vm" {
|
|
|
834
789
|
* Link module dependencies. This method must be called before evaluation, and
|
|
835
790
|
* can only be called once per module.
|
|
836
791
|
*
|
|
792
|
+
* Use `sourceTextModule.linkRequests(modules)` and
|
|
793
|
+
* `sourceTextModule.instantiate()` to link modules either synchronously or
|
|
794
|
+
* asynchronously.
|
|
795
|
+
*
|
|
837
796
|
* The function is expected to return a `Module` object or a `Promise` that
|
|
838
797
|
* eventually resolves to a `Module` object. The returned `Module` must satisfy the
|
|
839
798
|
* following two invariants:
|
|
@@ -878,10 +837,30 @@ declare module "vm" {
|
|
|
878
837
|
/**
|
|
879
838
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
880
839
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
881
|
-
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
840
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
841
|
+
* @experimental
|
|
882
842
|
*/
|
|
883
843
|
importModuleDynamically?: DynamicModuleLoader<SourceTextModule> | undefined;
|
|
884
844
|
}
|
|
845
|
+
/**
|
|
846
|
+
* A `ModuleRequest` represents the request to import a module with given import attributes and phase.
|
|
847
|
+
* @since 24.4.0
|
|
848
|
+
*/
|
|
849
|
+
interface ModuleRequest {
|
|
850
|
+
/**
|
|
851
|
+
* The specifier of the requested module.
|
|
852
|
+
*/
|
|
853
|
+
specifier: string;
|
|
854
|
+
/**
|
|
855
|
+
* The `"with"` value passed to the `WithClause` in a `ImportDeclaration`, or an empty object if no value was
|
|
856
|
+
* provided.
|
|
857
|
+
*/
|
|
858
|
+
attributes: ImportAttributes;
|
|
859
|
+
/**
|
|
860
|
+
* The phase of the requested module (`"source"` or `"evaluation"`).
|
|
861
|
+
*/
|
|
862
|
+
phase: ImportPhase;
|
|
863
|
+
}
|
|
885
864
|
/**
|
|
886
865
|
* This feature is only available with the `--experimental-vm-modules` command
|
|
887
866
|
* flag enabled.
|
|
@@ -894,9 +873,163 @@ declare module "vm" {
|
|
|
894
873
|
class SourceTextModule extends Module {
|
|
895
874
|
/**
|
|
896
875
|
* Creates a new `SourceTextModule` instance.
|
|
876
|
+
*
|
|
877
|
+
* Properties assigned to the `import.meta` object that are objects may
|
|
878
|
+
* allow the module to access information outside the specified `context`. Use
|
|
879
|
+
* `vm.runInContext()` to create objects in a specific context.
|
|
880
|
+
*
|
|
881
|
+
* ```js
|
|
882
|
+
* import vm from 'node:vm';
|
|
883
|
+
*
|
|
884
|
+
* const contextifiedObject = vm.createContext({ secret: 42 });
|
|
885
|
+
*
|
|
886
|
+
* const module = new vm.SourceTextModule(
|
|
887
|
+
* 'Object.getPrototypeOf(import.meta.prop).secret = secret;',
|
|
888
|
+
* {
|
|
889
|
+
* initializeImportMeta(meta) {
|
|
890
|
+
* // Note: this object is created in the top context. As such,
|
|
891
|
+
* // Object.getPrototypeOf(import.meta.prop) points to the
|
|
892
|
+
* // Object.prototype in the top context rather than that in
|
|
893
|
+
* // the contextified object.
|
|
894
|
+
* meta.prop = {};
|
|
895
|
+
* },
|
|
896
|
+
* });
|
|
897
|
+
* // The module has an empty `moduleRequests` array.
|
|
898
|
+
* module.linkRequests([]);
|
|
899
|
+
* module.instantiate();
|
|
900
|
+
* await module.evaluate();
|
|
901
|
+
*
|
|
902
|
+
* // Now, Object.prototype.secret will be equal to 42.
|
|
903
|
+
* //
|
|
904
|
+
* // To fix this problem, replace
|
|
905
|
+
* // meta.prop = {};
|
|
906
|
+
* // above with
|
|
907
|
+
* // meta.prop = vm.runInContext('{}', contextifiedObject);
|
|
908
|
+
* ```
|
|
897
909
|
* @param code JavaScript Module code to parse
|
|
898
910
|
*/
|
|
899
911
|
constructor(code: string, options?: SourceTextModuleOptions);
|
|
912
|
+
/**
|
|
913
|
+
* @deprecated Use `sourceTextModule.moduleRequests` instead.
|
|
914
|
+
*/
|
|
915
|
+
readonly dependencySpecifiers: readonly string[];
|
|
916
|
+
/**
|
|
917
|
+
* Iterates over the dependency graph and returns `true` if any module in its
|
|
918
|
+
* dependencies or this module itself contains top-level `await` expressions,
|
|
919
|
+
* otherwise returns `false`.
|
|
920
|
+
*
|
|
921
|
+
* The search may be slow if the graph is big enough.
|
|
922
|
+
*
|
|
923
|
+
* This requires the module to be instantiated first. If the module is not
|
|
924
|
+
* instantiated yet, an error will be thrown.
|
|
925
|
+
* @since v24.9.0
|
|
926
|
+
*/
|
|
927
|
+
hasAsyncGraph(): boolean;
|
|
928
|
+
/**
|
|
929
|
+
* Returns whether the module itself contains any top-level `await` expressions.
|
|
930
|
+
*
|
|
931
|
+
* This corresponds to the field `[[HasTLA]]` in [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) in the
|
|
932
|
+
* ECMAScript specification.
|
|
933
|
+
* @since v24.9.0
|
|
934
|
+
*/
|
|
935
|
+
hasTopLevelAwait(): boolean;
|
|
936
|
+
/**
|
|
937
|
+
* Instantiate the module with the linked requested modules.
|
|
938
|
+
*
|
|
939
|
+
* This resolves the imported bindings of the module, including re-exported
|
|
940
|
+
* binding names. When there are any bindings that cannot be resolved,
|
|
941
|
+
* an error would be thrown synchronously.
|
|
942
|
+
*
|
|
943
|
+
* If the requested modules include cyclic dependencies, the
|
|
944
|
+
* `sourceTextModule.linkRequests(modules)` method must be called on all
|
|
945
|
+
* modules in the cycle before calling this method.
|
|
946
|
+
* @since v24.8.0
|
|
947
|
+
*/
|
|
948
|
+
instantiate(): void;
|
|
949
|
+
/**
|
|
950
|
+
* Link module dependencies. This method must be called before evaluation, and
|
|
951
|
+
* can only be called once per module.
|
|
952
|
+
*
|
|
953
|
+
* The order of the module instances in the `modules` array should correspond to the order of
|
|
954
|
+
* `sourceTextModule.moduleRequests` being resolved. If two module requests have the same
|
|
955
|
+
* specifier and import attributes, they must be resolved with the same module instance or an
|
|
956
|
+
* `ERR_MODULE_LINK_MISMATCH` would be thrown. For example, when linking requests for this
|
|
957
|
+
* module:
|
|
958
|
+
*
|
|
959
|
+
* ```js
|
|
960
|
+
* import foo from 'foo';
|
|
961
|
+
* import source Foo from 'foo';
|
|
962
|
+
* ```
|
|
963
|
+
*
|
|
964
|
+
* The `modules` array must contain two references to the same instance, because the two
|
|
965
|
+
* module requests are identical but in two phases.
|
|
966
|
+
*
|
|
967
|
+
* If the module has no dependencies, the `modules` array can be empty.
|
|
968
|
+
*
|
|
969
|
+
* Users can use `sourceTextModule.moduleRequests` to implement the host-defined
|
|
970
|
+
* [HostLoadImportedModule](https://tc39.es/ecma262/#sec-HostLoadImportedModule) abstract operation in the ECMAScript specification,
|
|
971
|
+
* and using `sourceTextModule.linkRequests()` to invoke specification defined
|
|
972
|
+
* [FinishLoadingImportedModule](https://tc39.es/ecma262/#sec-FinishLoadingImportedModule), on the module with all dependencies in a batch.
|
|
973
|
+
*
|
|
974
|
+
* It's up to the creator of the `SourceTextModule` to determine if the resolution
|
|
975
|
+
* of the dependencies is synchronous or asynchronous.
|
|
976
|
+
*
|
|
977
|
+
* After each module in the `modules` array is linked, call
|
|
978
|
+
* `sourceTextModule.instantiate()`.
|
|
979
|
+
* @since v24.8.0
|
|
980
|
+
* @param modules Array of `vm.Module` objects that this module depends on.
|
|
981
|
+
* The order of the modules in the array is the order of
|
|
982
|
+
* `sourceTextModule.moduleRequests`.
|
|
983
|
+
*/
|
|
984
|
+
linkRequests(modules: readonly Module[]): void;
|
|
985
|
+
/**
|
|
986
|
+
* The requested import dependencies of this module. The returned array is frozen
|
|
987
|
+
* to disallow any changes to it.
|
|
988
|
+
*
|
|
989
|
+
* For example, given a source text:
|
|
990
|
+
*
|
|
991
|
+
* ```js
|
|
992
|
+
* import foo from 'foo';
|
|
993
|
+
* import fooAlias from 'foo';
|
|
994
|
+
* import bar from './bar.js';
|
|
995
|
+
* import withAttrs from '../with-attrs.ts' with { arbitraryAttr: 'attr-val' };
|
|
996
|
+
* import source Module from 'wasm-mod.wasm';
|
|
997
|
+
* ```
|
|
998
|
+
*
|
|
999
|
+
* The value of the `sourceTextModule.moduleRequests` will be:
|
|
1000
|
+
*
|
|
1001
|
+
* ```js
|
|
1002
|
+
* [
|
|
1003
|
+
* {
|
|
1004
|
+
* specifier: 'foo',
|
|
1005
|
+
* attributes: {},
|
|
1006
|
+
* phase: 'evaluation',
|
|
1007
|
+
* },
|
|
1008
|
+
* {
|
|
1009
|
+
* specifier: 'foo',
|
|
1010
|
+
* attributes: {},
|
|
1011
|
+
* phase: 'evaluation',
|
|
1012
|
+
* },
|
|
1013
|
+
* {
|
|
1014
|
+
* specifier: './bar.js',
|
|
1015
|
+
* attributes: {},
|
|
1016
|
+
* phase: 'evaluation',
|
|
1017
|
+
* },
|
|
1018
|
+
* {
|
|
1019
|
+
* specifier: '../with-attrs.ts',
|
|
1020
|
+
* attributes: { arbitraryAttr: 'attr-val' },
|
|
1021
|
+
* phase: 'evaluation',
|
|
1022
|
+
* },
|
|
1023
|
+
* {
|
|
1024
|
+
* specifier: 'wasm-mod.wasm',
|
|
1025
|
+
* attributes: {},
|
|
1026
|
+
* phase: 'source',
|
|
1027
|
+
* },
|
|
1028
|
+
* ];
|
|
1029
|
+
* ```
|
|
1030
|
+
* @since v24.4.0
|
|
1031
|
+
*/
|
|
1032
|
+
readonly moduleRequests: readonly ModuleRequest[];
|
|
900
1033
|
}
|
|
901
1034
|
interface SyntheticModuleOptions {
|
|
902
1035
|
/**
|
|
@@ -919,15 +1052,21 @@ declare module "vm" {
|
|
|
919
1052
|
* module graphs.
|
|
920
1053
|
*
|
|
921
1054
|
* ```js
|
|
922
|
-
* import
|
|
1055
|
+
* import { SyntheticModule } from 'node:vm';
|
|
923
1056
|
*
|
|
924
1057
|
* const source = '{ "a": 1 }';
|
|
925
|
-
* const
|
|
1058
|
+
* const syntheticModule = new SyntheticModule(['default'], function() {
|
|
926
1059
|
* const obj = JSON.parse(source);
|
|
927
1060
|
* this.setExport('default', obj);
|
|
928
1061
|
* });
|
|
929
1062
|
*
|
|
930
|
-
* // Use `
|
|
1063
|
+
* // Use `syntheticModule` in linking
|
|
1064
|
+
* (async () => {
|
|
1065
|
+
* await syntheticModule.link(() => {});
|
|
1066
|
+
* await syntheticModule.evaluate();
|
|
1067
|
+
*
|
|
1068
|
+
* console.log('Default export:', syntheticModule.namespace.default);
|
|
1069
|
+
* })();
|
|
931
1070
|
* ```
|
|
932
1071
|
* @since v13.0.0, v12.16.0
|
|
933
1072
|
* @experimental
|
|
@@ -944,9 +1083,7 @@ declare module "vm" {
|
|
|
944
1083
|
options?: SyntheticModuleOptions,
|
|
945
1084
|
);
|
|
946
1085
|
/**
|
|
947
|
-
* This method
|
|
948
|
-
* it is called before the module is linked, an `ERR_VM_MODULE_STATUS` error
|
|
949
|
-
* will be thrown.
|
|
1086
|
+
* This method sets the module export binding slots with the given value.
|
|
950
1087
|
*
|
|
951
1088
|
* ```js
|
|
952
1089
|
* import vm from 'node:vm';
|
|
@@ -955,7 +1092,6 @@ declare module "vm" {
|
|
|
955
1092
|
* m.setExport('x', 1);
|
|
956
1093
|
* });
|
|
957
1094
|
*
|
|
958
|
-
* await m.link(() => {});
|
|
959
1095
|
* await m.evaluate();
|
|
960
1096
|
*
|
|
961
1097
|
* assert.strictEqual(m.namespace.x, 1);
|
|
@@ -976,7 +1112,7 @@ declare module "vm" {
|
|
|
976
1112
|
* and `vm.compileFunction()` so that Node.js uses the default ESM loader from the main
|
|
977
1113
|
* context to load the requested module.
|
|
978
1114
|
*
|
|
979
|
-
* For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
1115
|
+
* For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
980
1116
|
* @since v21.7.0, v20.12.0
|
|
981
1117
|
*/
|
|
982
1118
|
const USE_MAIN_CONTEXT_DEFAULT_LOADER: number;
|
|
@@ -995,6 +1131,6 @@ declare module "vm" {
|
|
|
995
1131
|
const DONT_CONTEXTIFY: number;
|
|
996
1132
|
}
|
|
997
1133
|
}
|
|
998
|
-
declare module "
|
|
999
|
-
export * from "vm";
|
|
1134
|
+
declare module "vm" {
|
|
1135
|
+
export * from "node:vm";
|
|
1000
1136
|
}
|