@eminent337/aery 0.1.63 → 0.1.65
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/docs/custom-provider.md +1 -1
- package/docs/extensions.md +18 -18
- package/docs/index.md +5 -5
- package/docs/json.md +1 -1
- package/docs/keybindings.md +2 -2
- package/docs/models.md +2 -2
- package/docs/packages.md +13 -13
- package/docs/providers.md +5 -5
- package/docs/quickstart.md +19 -19
- package/docs/rpc.md +3 -3
- package/docs/sdk.md +1 -1
- package/docs/session-format.md +3 -3
- package/docs/sessions.md +10 -10
- package/docs/settings.md +4 -4
- package/docs/skills.md +2 -2
- package/docs/terminal-setup.md +6 -6
- package/docs/termux.md +3 -3
- package/docs/themes.md +3 -3
- package/docs/tmux.md +1 -1
- package/docs/tui.md +2 -2
- package/docs/usage.md +33 -33
- package/examples/extensions/README.md +3 -3
- package/examples/extensions/antigravity-image-gen.ts +6 -6
- package/examples/extensions/auto-commit-on-exit.ts +1 -1
- package/examples/extensions/bash-spawn-hook.ts +1 -1
- package/examples/extensions/built-in-tool-renderer.ts +1 -1
- package/examples/extensions/claude-rules.ts +1 -1
- package/examples/extensions/commands.ts +1 -1
- package/examples/extensions/custom-compaction.ts +1 -1
- package/examples/extensions/custom-header.ts +2 -2
- package/examples/extensions/custom-provider-anthropic/index.ts +2 -2
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +2 -2
- package/examples/extensions/custom-provider-qwen-cli/index.ts +1 -1
- package/examples/extensions/doom-overlay/README.md +2 -2
- package/examples/extensions/doom-overlay/doom/build.sh +2 -2
- package/examples/extensions/doom-overlay/index.ts +1 -1
- package/examples/extensions/hidden-thinking-label.ts +1 -1
- package/examples/extensions/inline-bash.ts +2 -2
- package/examples/extensions/input-transform.ts +3 -3
- package/examples/extensions/interactive-shell.ts +1 -1
- package/examples/extensions/mac-system-theme.ts +2 -2
- package/examples/extensions/minimal-mode.ts +1 -1
- package/examples/extensions/modal-editor.ts +1 -1
- package/examples/extensions/model-status.ts +1 -1
- package/examples/extensions/overlay-qa-tests.ts +1 -1
- package/examples/extensions/overlay-test.ts +1 -1
- package/examples/extensions/pirate.ts +1 -1
- package/examples/extensions/preset.ts +12 -6
- package/examples/extensions/prompt-customizer.ts +1 -1
- package/examples/extensions/provider-payload.ts +1 -1
- package/examples/extensions/rainbow-editor.ts +1 -1
- package/examples/extensions/rpc-demo.ts +1 -1
- package/examples/extensions/sandbox/index.ts +8 -8
- package/examples/extensions/shutdown-command.ts +5 -5
- package/examples/extensions/ssh.ts +2 -2
- package/examples/extensions/subagent/README.md +13 -13
- package/examples/extensions/subagent/agents.ts +1 -1
- package/examples/extensions/subagent/index.ts +5 -5
- package/examples/extensions/titlebar-spinner.ts +1 -1
- package/examples/extensions/tool-override.ts +2 -2
- package/examples/extensions/tools.ts +1 -1
- package/examples/extensions/truncated-tool.ts +1 -1
- package/examples/extensions/working-indicator.ts +4 -4
- package/examples/extensions/working-message-test.ts +1 -1
- package/examples/sdk/01-minimal.ts +1 -1
- package/examples/sdk/03-custom-prompt.ts +1 -1
- package/examples/sdk/04-skills.ts +1 -1
- package/examples/sdk/06-extensions.ts +2 -2
- package/examples/sdk/08-prompt-templates.ts +1 -1
- package/examples/sdk/09-api-keys-and-oauth.ts +2 -2
- package/examples/sdk/README.md +1 -1
- package/package.json +3 -3
- package/dist/bun/cli.d.ts +0 -3
- package/dist/bun/cli.d.ts.map +0 -1
- package/dist/bun/cli.js +0 -8
- package/dist/bun/cli.js.map +0 -1
- package/dist/bun/register-bedrock.d.ts +0 -2
- package/dist/bun/register-bedrock.d.ts.map +0 -1
- package/dist/bun/register-bedrock.js +0 -4
- package/dist/bun/register-bedrock.js.map +0 -1
- package/dist/bun/restore-sandbox-env.d.ts +0 -13
- package/dist/bun/restore-sandbox-env.d.ts.map +0 -1
- package/dist/bun/restore-sandbox-env.js +0 -32
- package/dist/bun/restore-sandbox-env.js.map +0 -1
- package/dist/cli/args.d.ts +0 -53
- package/dist/cli/args.d.ts.map +0 -1
- package/dist/cli/args.js +0 -329
- package/dist/cli/args.js.map +0 -1
- package/dist/cli/config-selector.d.ts +0 -14
- package/dist/cli/config-selector.d.ts.map +0 -1
- package/dist/cli/config-selector.js +0 -31
- package/dist/cli/config-selector.js.map +0 -1
- package/dist/cli/file-processor.d.ts +0 -15
- package/dist/cli/file-processor.d.ts.map +0 -1
- package/dist/cli/file-processor.js +0 -83
- package/dist/cli/file-processor.js.map +0 -1
- package/dist/cli/initial-message.d.ts +0 -18
- package/dist/cli/initial-message.d.ts.map +0 -1
- package/dist/cli/initial-message.js +0 -22
- package/dist/cli/initial-message.js.map +0 -1
- package/dist/cli/list-models.d.ts +0 -9
- package/dist/cli/list-models.d.ts.map +0 -1
- package/dist/cli/list-models.js +0 -98
- package/dist/cli/list-models.js.map +0 -1
- package/dist/cli/session-picker.d.ts +0 -9
- package/dist/cli/session-picker.d.ts.map +0 -1
- package/dist/cli/session-picker.js +0 -35
- package/dist/cli/session-picker.js.map +0 -1
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -19
- package/dist/cli.js.map +0 -1
- package/dist/config.d.ts +0 -86
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -332
- package/dist/config.js.map +0 -1
- package/dist/core/agent-session-runtime.d.ts +0 -117
- package/dist/core/agent-session-runtime.d.ts.map +0 -1
- package/dist/core/agent-session-runtime.js +0 -300
- package/dist/core/agent-session-runtime.js.map +0 -1
- package/dist/core/agent-session-services.d.ts +0 -86
- package/dist/core/agent-session-services.d.ts.map +0 -1
- package/dist/core/agent-session-services.js +0 -117
- package/dist/core/agent-session-services.js.map +0 -1
- package/dist/core/agent-session.d.ts +0 -595
- package/dist/core/agent-session.d.ts.map +0 -1
- package/dist/core/agent-session.js +0 -2520
- package/dist/core/agent-session.js.map +0 -1
- package/dist/core/auth-guidance.d.ts +0 -5
- package/dist/core/auth-guidance.d.ts.map +0 -1
- package/dist/core/auth-guidance.js +0 -21
- package/dist/core/auth-guidance.js.map +0 -1
- package/dist/core/auth-storage.d.ts +0 -141
- package/dist/core/auth-storage.d.ts.map +0 -1
- package/dist/core/auth-storage.js +0 -441
- package/dist/core/auth-storage.js.map +0 -1
- package/dist/core/bash-executor.d.ts +0 -32
- package/dist/core/bash-executor.d.ts.map +0 -1
- package/dist/core/bash-executor.js +0 -111
- package/dist/core/bash-executor.js.map +0 -1
- package/dist/core/compaction/branch-summarization.d.ts +0 -88
- package/dist/core/compaction/branch-summarization.d.ts.map +0 -1
- package/dist/core/compaction/branch-summarization.js +0 -243
- package/dist/core/compaction/branch-summarization.js.map +0 -1
- package/dist/core/compaction/compaction.d.ts +0 -121
- package/dist/core/compaction/compaction.d.ts.map +0 -1
- package/dist/core/compaction/compaction.js +0 -615
- package/dist/core/compaction/compaction.js.map +0 -1
- package/dist/core/compaction/index.d.ts +0 -7
- package/dist/core/compaction/index.d.ts.map +0 -1
- package/dist/core/compaction/index.js +0 -7
- package/dist/core/compaction/index.js.map +0 -1
- package/dist/core/compaction/utils.d.ts +0 -38
- package/dist/core/compaction/utils.d.ts.map +0 -1
- package/dist/core/compaction/utils.js +0 -153
- package/dist/core/compaction/utils.js.map +0 -1
- package/dist/core/defaults.d.ts +0 -3
- package/dist/core/defaults.d.ts.map +0 -1
- package/dist/core/defaults.js +0 -2
- package/dist/core/defaults.js.map +0 -1
- package/dist/core/diagnostics.d.ts +0 -15
- package/dist/core/diagnostics.d.ts.map +0 -1
- package/dist/core/diagnostics.js +0 -2
- package/dist/core/diagnostics.js.map +0 -1
- package/dist/core/event-bus.d.ts +0 -9
- package/dist/core/event-bus.d.ts.map +0 -1
- package/dist/core/event-bus.js +0 -25
- package/dist/core/event-bus.js.map +0 -1
- package/dist/core/exec.d.ts +0 -29
- package/dist/core/exec.d.ts.map +0 -1
- package/dist/core/exec.js +0 -75
- package/dist/core/exec.js.map +0 -1
- package/dist/core/export-html/ansi-to-html.d.ts +0 -22
- package/dist/core/export-html/ansi-to-html.d.ts.map +0 -1
- package/dist/core/export-html/ansi-to-html.js +0 -249
- package/dist/core/export-html/ansi-to-html.js.map +0 -1
- package/dist/core/export-html/index.d.ts +0 -37
- package/dist/core/export-html/index.d.ts.map +0 -1
- package/dist/core/export-html/index.js +0 -224
- package/dist/core/export-html/index.js.map +0 -1
- package/dist/core/export-html/template.css +0 -1022
- package/dist/core/export-html/template.html +0 -55
- package/dist/core/export-html/template.js +0 -1770
- package/dist/core/export-html/tool-renderer.d.ts +0 -34
- package/dist/core/export-html/tool-renderer.d.ts.map +0 -1
- package/dist/core/export-html/tool-renderer.js +0 -108
- package/dist/core/export-html/tool-renderer.js.map +0 -1
- package/dist/core/export-html/vendor/highlight.min.js +0 -1213
- package/dist/core/export-html/vendor/marked.min.js +0 -6
- package/dist/core/extensions/index.d.ts +0 -12
- package/dist/core/extensions/index.d.ts.map +0 -1
- package/dist/core/extensions/index.js +0 -9
- package/dist/core/extensions/index.js.map +0 -1
- package/dist/core/extensions/loader.d.ts +0 -25
- package/dist/core/extensions/loader.d.ts.map +0 -1
- package/dist/core/extensions/loader.js +0 -476
- package/dist/core/extensions/loader.js.map +0 -1
- package/dist/core/extensions/runner.d.ts +0 -158
- package/dist/core/extensions/runner.d.ts.map +0 -1
- package/dist/core/extensions/runner.js +0 -784
- package/dist/core/extensions/runner.js.map +0 -1
- package/dist/core/extensions/types.d.ts +0 -1153
- package/dist/core/extensions/types.d.ts.map +0 -1
- package/dist/core/extensions/types.js +0 -45
- package/dist/core/extensions/types.js.map +0 -1
- package/dist/core/extensions/wrapper.d.ts +0 -20
- package/dist/core/extensions/wrapper.d.ts.map +0 -1
- package/dist/core/extensions/wrapper.js +0 -22
- package/dist/core/extensions/wrapper.js.map +0 -1
- package/dist/core/footer-data-provider.d.ts +0 -52
- package/dist/core/footer-data-provider.d.ts.map +0 -1
- package/dist/core/footer-data-provider.js +0 -310
- package/dist/core/footer-data-provider.js.map +0 -1
- package/dist/core/index.d.ts +0 -12
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -12
- package/dist/core/index.js.map +0 -1
- package/dist/core/keybindings.d.ts +0 -353
- package/dist/core/keybindings.d.ts.map +0 -1
- package/dist/core/keybindings.js +0 -295
- package/dist/core/keybindings.js.map +0 -1
- package/dist/core/messages.d.ts +0 -77
- package/dist/core/messages.d.ts.map +0 -1
- package/dist/core/messages.js +0 -123
- package/dist/core/messages.js.map +0 -1
- package/dist/core/model-registry.d.ts +0 -144
- package/dist/core/model-registry.d.ts.map +0 -1
- package/dist/core/model-registry.js +0 -699
- package/dist/core/model-registry.js.map +0 -1
- package/dist/core/model-resolver.d.ts +0 -110
- package/dist/core/model-resolver.d.ts.map +0 -1
- package/dist/core/model-resolver.js +0 -489
- package/dist/core/model-resolver.js.map +0 -1
- package/dist/core/output-guard.d.ts +0 -6
- package/dist/core/output-guard.d.ts.map +0 -1
- package/dist/core/output-guard.js +0 -59
- package/dist/core/output-guard.js.map +0 -1
- package/dist/core/package-manager.d.ts +0 -199
- package/dist/core/package-manager.d.ts.map +0 -1
- package/dist/core/package-manager.js +0 -1974
- package/dist/core/package-manager.js.map +0 -1
- package/dist/core/prompt-templates.d.ts +0 -52
- package/dist/core/prompt-templates.d.ts.map +0 -1
- package/dist/core/prompt-templates.js +0 -250
- package/dist/core/prompt-templates.js.map +0 -1
- package/dist/core/resolve-config-value.d.ts +0 -23
- package/dist/core/resolve-config-value.d.ts.map +0 -1
- package/dist/core/resolve-config-value.js +0 -126
- package/dist/core/resolve-config-value.js.map +0 -1
- package/dist/core/resource-loader.d.ts +0 -194
- package/dist/core/resource-loader.d.ts.map +0 -1
- package/dist/core/resource-loader.js +0 -727
- package/dist/core/resource-loader.js.map +0 -1
- package/dist/core/sdk.d.ts +0 -107
- package/dist/core/sdk.d.ts.map +0 -1
- package/dist/core/sdk.js +0 -274
- package/dist/core/sdk.js.map +0 -1
- package/dist/core/session-cwd.d.ts +0 -19
- package/dist/core/session-cwd.d.ts.map +0 -1
- package/dist/core/session-cwd.js +0 -38
- package/dist/core/session-cwd.js.map +0 -1
- package/dist/core/session-manager.d.ts +0 -333
- package/dist/core/session-manager.d.ts.map +0 -1
- package/dist/core/session-manager.js +0 -1109
- package/dist/core/session-manager.js.map +0 -1
- package/dist/core/settings-manager.d.ts +0 -261
- package/dist/core/settings-manager.d.ts.map +0 -1
- package/dist/core/settings-manager.js +0 -782
- package/dist/core/settings-manager.js.map +0 -1
- package/dist/core/skills.d.ts +0 -60
- package/dist/core/skills.d.ts.map +0 -1
- package/dist/core/skills.js +0 -404
- package/dist/core/skills.js.map +0 -1
- package/dist/core/slash-commands.d.ts +0 -14
- package/dist/core/slash-commands.d.ts.map +0 -1
- package/dist/core/slash-commands.js +0 -25
- package/dist/core/slash-commands.js.map +0 -1
- package/dist/core/source-info.d.ts +0 -18
- package/dist/core/source-info.d.ts.map +0 -1
- package/dist/core/source-info.js +0 -19
- package/dist/core/source-info.js.map +0 -1
- package/dist/core/system-prompt.d.ts +0 -28
- package/dist/core/system-prompt.d.ts.map +0 -1
- package/dist/core/system-prompt.js +0 -120
- package/dist/core/system-prompt.js.map +0 -1
- package/dist/core/telemetry.d.ts +0 -3
- package/dist/core/telemetry.d.ts.map +0 -1
- package/dist/core/telemetry.js +0 -9
- package/dist/core/telemetry.js.map +0 -1
- package/dist/core/timings.d.ts +0 -8
- package/dist/core/timings.d.ts.map +0 -1
- package/dist/core/timings.js +0 -31
- package/dist/core/timings.js.map +0 -1
- package/dist/core/tools/bash.d.ts +0 -68
- package/dist/core/tools/bash.d.ts.map +0 -1
- package/dist/core/tools/bash.js +0 -355
- package/dist/core/tools/bash.js.map +0 -1
- package/dist/core/tools/edit-diff.d.ts +0 -85
- package/dist/core/tools/edit-diff.d.ts.map +0 -1
- package/dist/core/tools/edit-diff.js +0 -338
- package/dist/core/tools/edit-diff.js.map +0 -1
- package/dist/core/tools/edit.d.ts +0 -49
- package/dist/core/tools/edit.d.ts.map +0 -1
- package/dist/core/tools/edit.js +0 -324
- package/dist/core/tools/edit.js.map +0 -1
- package/dist/core/tools/file-mutation-queue.d.ts +0 -6
- package/dist/core/tools/file-mutation-queue.d.ts.map +0 -1
- package/dist/core/tools/file-mutation-queue.js +0 -37
- package/dist/core/tools/file-mutation-queue.js.map +0 -1
- package/dist/core/tools/find.d.ts +0 -35
- package/dist/core/tools/find.d.ts.map +0 -1
- package/dist/core/tools/find.js +0 -298
- package/dist/core/tools/find.js.map +0 -1
- package/dist/core/tools/grep.d.ts +0 -37
- package/dist/core/tools/grep.d.ts.map +0 -1
- package/dist/core/tools/grep.js +0 -304
- package/dist/core/tools/grep.js.map +0 -1
- package/dist/core/tools/index.d.ts +0 -40
- package/dist/core/tools/index.d.ts.map +0 -1
- package/dist/core/tools/index.js +0 -112
- package/dist/core/tools/index.js.map +0 -1
- package/dist/core/tools/ls.d.ts +0 -37
- package/dist/core/tools/ls.d.ts.map +0 -1
- package/dist/core/tools/ls.js +0 -169
- package/dist/core/tools/ls.js.map +0 -1
- package/dist/core/tools/path-utils.d.ts +0 -8
- package/dist/core/tools/path-utils.d.ts.map +0 -1
- package/dist/core/tools/path-utils.js +0 -81
- package/dist/core/tools/path-utils.js.map +0 -1
- package/dist/core/tools/read.d.ts +0 -35
- package/dist/core/tools/read.d.ts.map +0 -1
- package/dist/core/tools/read.js +0 -232
- package/dist/core/tools/read.js.map +0 -1
- package/dist/core/tools/render-utils.d.ts +0 -21
- package/dist/core/tools/render-utils.d.ts.map +0 -1
- package/dist/core/tools/render-utils.js +0 -49
- package/dist/core/tools/render-utils.js.map +0 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts +0 -14
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +0 -1
- package/dist/core/tools/tool-definition-wrapper.js +0 -34
- package/dist/core/tools/tool-definition-wrapper.js.map +0 -1
- package/dist/core/tools/truncate.d.ts +0 -70
- package/dist/core/tools/truncate.d.ts.map +0 -1
- package/dist/core/tools/truncate.js +0 -205
- package/dist/core/tools/truncate.js.map +0 -1
- package/dist/core/tools/write.d.ts +0 -26
- package/dist/core/tools/write.d.ts.map +0 -1
- package/dist/core/tools/write.js +0 -213
- package/dist/core/tools/write.js.map +0 -1
- package/dist/index.d.ts +0 -28
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -41
- package/dist/index.js.map +0 -1
- package/dist/main.d.ts +0 -12
- package/dist/main.d.ts.map +0 -1
- package/dist/main.js +0 -589
- package/dist/main.js.map +0 -1
- package/dist/migrations.d.ts +0 -33
- package/dist/migrations.d.ts.map +0 -1
- package/dist/migrations.js +0 -281
- package/dist/migrations.js.map +0 -1
- package/dist/modes/index.d.ts +0 -9
- package/dist/modes/index.d.ts.map +0 -1
- package/dist/modes/index.js +0 -8
- package/dist/modes/index.js.map +0 -1
- package/dist/modes/interactive/assets/clankolas.png +0 -0
- package/dist/modes/interactive/components/armin.d.ts +0 -34
- package/dist/modes/interactive/components/armin.d.ts.map +0 -1
- package/dist/modes/interactive/components/armin.js +0 -333
- package/dist/modes/interactive/components/armin.js.map +0 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +0 -20
- package/dist/modes/interactive/components/assistant-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/assistant-message.js +0 -121
- package/dist/modes/interactive/components/assistant-message.js.map +0 -1
- package/dist/modes/interactive/components/bash-execution.d.ts +0 -34
- package/dist/modes/interactive/components/bash-execution.d.ts.map +0 -1
- package/dist/modes/interactive/components/bash-execution.js +0 -175
- package/dist/modes/interactive/components/bash-execution.js.map +0 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts +0 -16
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +0 -1
- package/dist/modes/interactive/components/bordered-loader.js +0 -54
- package/dist/modes/interactive/components/bordered-loader.js.map +0 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +0 -16
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/branch-summary-message.js +0 -44
- package/dist/modes/interactive/components/branch-summary-message.js.map +0 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +0 -16
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +0 -45
- package/dist/modes/interactive/components/compaction-summary-message.js.map +0 -1
- package/dist/modes/interactive/components/config-selector.d.ts +0 -71
- package/dist/modes/interactive/components/config-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/config-selector.js +0 -481
- package/dist/modes/interactive/components/config-selector.js.map +0 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts +0 -14
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +0 -1
- package/dist/modes/interactive/components/countdown-timer.js +0 -33
- package/dist/modes/interactive/components/countdown-timer.js.map +0 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +0 -21
- package/dist/modes/interactive/components/custom-editor.d.ts.map +0 -1
- package/dist/modes/interactive/components/custom-editor.js +0 -70
- package/dist/modes/interactive/components/custom-editor.js.map +0 -1
- package/dist/modes/interactive/components/custom-message.d.ts +0 -20
- package/dist/modes/interactive/components/custom-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/custom-message.js +0 -79
- package/dist/modes/interactive/components/custom-message.js.map +0 -1
- package/dist/modes/interactive/components/daxnuts.d.ts +0 -23
- package/dist/modes/interactive/components/daxnuts.d.ts.map +0 -1
- package/dist/modes/interactive/components/daxnuts.js +0 -140
- package/dist/modes/interactive/components/daxnuts.js.map +0 -1
- package/dist/modes/interactive/components/diff.d.ts +0 -12
- package/dist/modes/interactive/components/diff.d.ts.map +0 -1
- package/dist/modes/interactive/components/diff.js +0 -133
- package/dist/modes/interactive/components/diff.js.map +0 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts +0 -15
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +0 -1
- package/dist/modes/interactive/components/dynamic-border.js +0 -21
- package/dist/modes/interactive/components/dynamic-border.js.map +0 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts +0 -5
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +0 -1
- package/dist/modes/interactive/components/earendil-announcement.js +0 -40
- package/dist/modes/interactive/components/earendil-announcement.js.map +0 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +0 -20
- package/dist/modes/interactive/components/extension-editor.d.ts.map +0 -1
- package/dist/modes/interactive/components/extension-editor.js +0 -111
- package/dist/modes/interactive/components/extension-editor.js.map +0 -1
- package/dist/modes/interactive/components/extension-input.d.ts +0 -23
- package/dist/modes/interactive/components/extension-input.d.ts.map +0 -1
- package/dist/modes/interactive/components/extension-input.js +0 -61
- package/dist/modes/interactive/components/extension-input.js.map +0 -1
- package/dist/modes/interactive/components/extension-selector.d.ts +0 -24
- package/dist/modes/interactive/components/extension-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/extension-selector.js +0 -78
- package/dist/modes/interactive/components/extension-selector.js.map +0 -1
- package/dist/modes/interactive/components/footer.d.ts +0 -27
- package/dist/modes/interactive/components/footer.d.ts.map +0 -1
- package/dist/modes/interactive/components/footer.js +0 -201
- package/dist/modes/interactive/components/footer.js.map +0 -1
- package/dist/modes/interactive/components/index.d.ts +0 -32
- package/dist/modes/interactive/components/index.d.ts.map +0 -1
- package/dist/modes/interactive/components/index.js +0 -33
- package/dist/modes/interactive/components/index.js.map +0 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts +0 -8
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +0 -1
- package/dist/modes/interactive/components/keybinding-hints.js +0 -22
- package/dist/modes/interactive/components/keybinding-hints.js.map +0 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +0 -46
- package/dist/modes/interactive/components/login-dialog.d.ts.map +0 -1
- package/dist/modes/interactive/components/login-dialog.js +0 -158
- package/dist/modes/interactive/components/login-dialog.js.map +0 -1
- package/dist/modes/interactive/components/model-selector.d.ts +0 -47
- package/dist/modes/interactive/components/model-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/model-selector.js +0 -278
- package/dist/modes/interactive/components/model-selector.js.map +0 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +0 -29
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/oauth-selector.js +0 -141
- package/dist/modes/interactive/components/oauth-selector.js.map +0 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +0 -42
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +0 -290
- package/dist/modes/interactive/components/scoped-models-selector.js.map +0 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts +0 -23
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +0 -1
- package/dist/modes/interactive/components/session-selector-search.js +0 -155
- package/dist/modes/interactive/components/session-selector-search.js.map +0 -1
- package/dist/modes/interactive/components/session-selector.d.ts +0 -96
- package/dist/modes/interactive/components/session-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/session-selector.js +0 -861
- package/dist/modes/interactive/components/session-selector.js.map +0 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +0 -67
- package/dist/modes/interactive/components/settings-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/settings-selector.js +0 -373
- package/dist/modes/interactive/components/settings-selector.js.map +0 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts +0 -10
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/show-images-selector.js +0 -39
- package/dist/modes/interactive/components/show-images-selector.js.map +0 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +0 -17
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +0 -47
- package/dist/modes/interactive/components/skill-invocation-message.js.map +0 -1
- package/dist/modes/interactive/components/theme-selector.d.ts +0 -11
- package/dist/modes/interactive/components/theme-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/theme-selector.js +0 -50
- package/dist/modes/interactive/components/theme-selector.js.map +0 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts +0 -11
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/thinking-selector.js +0 -51
- package/dist/modes/interactive/components/thinking-selector.js.map +0 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +0 -63
- package/dist/modes/interactive/components/tool-execution.d.ts.map +0 -1
- package/dist/modes/interactive/components/tool-execution.js +0 -295
- package/dist/modes/interactive/components/tool-execution.js.map +0 -1
- package/dist/modes/interactive/components/tree-selector.d.ts +0 -89
- package/dist/modes/interactive/components/tree-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/tree-selector.js +0 -1092
- package/dist/modes/interactive/components/tree-selector.js.map +0 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts +0 -30
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/user-message-selector.js +0 -114
- package/dist/modes/interactive/components/user-message-selector.js.map +0 -1
- package/dist/modes/interactive/components/user-message.d.ts +0 -10
- package/dist/modes/interactive/components/user-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/user-message.js +0 -29
- package/dist/modes/interactive/components/user-message.js.map +0 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts +0 -24
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +0 -1
- package/dist/modes/interactive/components/visual-truncate.js +0 -33
- package/dist/modes/interactive/components/visual-truncate.js.map +0 -1
- package/dist/modes/interactive/interactive-mode.d.ts +0 -359
- package/dist/modes/interactive/interactive-mode.d.ts.map +0 -1
- package/dist/modes/interactive/interactive-mode.js +0 -4573
- package/dist/modes/interactive/interactive-mode.js.map +0 -1
- package/dist/modes/interactive/theme/aery.json +0 -84
- package/dist/modes/interactive/theme/catppuccin-mocha.json +0 -81
- package/dist/modes/interactive/theme/dark.json +0 -85
- package/dist/modes/interactive/theme/dracula.json +0 -81
- package/dist/modes/interactive/theme/light.json +0 -84
- package/dist/modes/interactive/theme/nord.json +0 -81
- package/dist/modes/interactive/theme/theme-schema.json +0 -335
- package/dist/modes/interactive/theme/theme.d.ts +0 -81
- package/dist/modes/interactive/theme/theme.d.ts.map +0 -1
- package/dist/modes/interactive/theme/theme.js +0 -975
- package/dist/modes/interactive/theme/theme.js.map +0 -1
- package/dist/modes/interactive/theme/tokyo-night.json +0 -81
- package/dist/modes/print-mode.d.ts +0 -28
- package/dist/modes/print-mode.d.ts.map +0 -1
- package/dist/modes/print-mode.js +0 -131
- package/dist/modes/print-mode.js.map +0 -1
- package/dist/modes/rpc/jsonl.d.ts +0 -17
- package/dist/modes/rpc/jsonl.d.ts.map +0 -1
- package/dist/modes/rpc/jsonl.js +0 -49
- package/dist/modes/rpc/jsonl.js.map +0 -1
- package/dist/modes/rpc/rpc-client.d.ts +0 -224
- package/dist/modes/rpc/rpc-client.d.ts.map +0 -1
- package/dist/modes/rpc/rpc-client.js +0 -410
- package/dist/modes/rpc/rpc-client.js.map +0 -1
- package/dist/modes/rpc/rpc-mode.d.ts +0 -20
- package/dist/modes/rpc/rpc-mode.d.ts.map +0 -1
- package/dist/modes/rpc/rpc-mode.js +0 -597
- package/dist/modes/rpc/rpc-mode.js.map +0 -1
- package/dist/modes/rpc/rpc-types.d.ts +0 -419
- package/dist/modes/rpc/rpc-types.d.ts.map +0 -1
- package/dist/modes/rpc/rpc-types.js +0 -8
- package/dist/modes/rpc/rpc-types.js.map +0 -1
- package/dist/package-manager-cli.d.ts +0 -4
- package/dist/package-manager-cli.d.ts.map +0 -1
- package/dist/package-manager-cli.js +0 -468
- package/dist/package-manager-cli.js.map +0 -1
- package/dist/utils/aery-user-agent.d.ts +0 -2
- package/dist/utils/aery-user-agent.d.ts.map +0 -1
- package/dist/utils/aery-user-agent.js +0 -5
- package/dist/utils/aery-user-agent.js.map +0 -1
- package/dist/utils/changelog.d.ts +0 -21
- package/dist/utils/changelog.d.ts.map +0 -1
- package/dist/utils/changelog.js +0 -87
- package/dist/utils/changelog.js.map +0 -1
- package/dist/utils/child-process.d.ts +0 -11
- package/dist/utils/child-process.d.ts.map +0 -1
- package/dist/utils/child-process.js +0 -78
- package/dist/utils/child-process.js.map +0 -1
- package/dist/utils/clipboard-image.d.ts +0 -11
- package/dist/utils/clipboard-image.d.ts.map +0 -1
- package/dist/utils/clipboard-image.js +0 -245
- package/dist/utils/clipboard-image.js.map +0 -1
- package/dist/utils/clipboard-native.d.ts +0 -8
- package/dist/utils/clipboard-native.d.ts.map +0 -1
- package/dist/utils/clipboard-native.js +0 -14
- package/dist/utils/clipboard-native.js.map +0 -1
- package/dist/utils/clipboard.d.ts +0 -2
- package/dist/utils/clipboard.d.ts.map +0 -1
- package/dist/utils/clipboard.js +0 -110
- package/dist/utils/clipboard.js.map +0 -1
- package/dist/utils/exif-orientation.d.ts +0 -5
- package/dist/utils/exif-orientation.d.ts.map +0 -1
- package/dist/utils/exif-orientation.js +0 -158
- package/dist/utils/exif-orientation.js.map +0 -1
- package/dist/utils/frontmatter.d.ts +0 -8
- package/dist/utils/frontmatter.d.ts.map +0 -1
- package/dist/utils/frontmatter.js +0 -26
- package/dist/utils/frontmatter.js.map +0 -1
- package/dist/utils/fs-watch.d.ts +0 -5
- package/dist/utils/fs-watch.d.ts.map +0 -1
- package/dist/utils/fs-watch.js +0 -25
- package/dist/utils/fs-watch.js.map +0 -1
- package/dist/utils/git.d.ts +0 -26
- package/dist/utils/git.d.ts.map +0 -1
- package/dist/utils/git.js +0 -163
- package/dist/utils/git.js.map +0 -1
- package/dist/utils/image-convert.d.ts +0 -9
- package/dist/utils/image-convert.d.ts.map +0 -1
- package/dist/utils/image-convert.js +0 -39
- package/dist/utils/image-convert.js.map +0 -1
- package/dist/utils/image-resize.d.ts +0 -36
- package/dist/utils/image-resize.d.ts.map +0 -1
- package/dist/utils/image-resize.js +0 -137
- package/dist/utils/image-resize.js.map +0 -1
- package/dist/utils/mime.d.ts +0 -2
- package/dist/utils/mime.d.ts.map +0 -1
- package/dist/utils/mime.js +0 -26
- package/dist/utils/mime.js.map +0 -1
- package/dist/utils/paths.d.ts +0 -14
- package/dist/utils/paths.d.ts.map +0 -1
- package/dist/utils/paths.js +0 -34
- package/dist/utils/paths.js.map +0 -1
- package/dist/utils/photon.d.ts +0 -21
- package/dist/utils/photon.d.ts.map +0 -1
- package/dist/utils/photon.js +0 -121
- package/dist/utils/photon.js.map +0 -1
- package/dist/utils/shell.d.ts +0 -30
- package/dist/utils/shell.d.ts.map +0 -1
- package/dist/utils/shell.js +0 -190
- package/dist/utils/shell.js.map +0 -1
- package/dist/utils/sleep.d.ts +0 -5
- package/dist/utils/sleep.d.ts.map +0 -1
- package/dist/utils/sleep.js +0 -17
- package/dist/utils/sleep.js.map +0 -1
- package/dist/utils/tools-manager.d.ts +0 -3
- package/dist/utils/tools-manager.d.ts.map +0 -1
- package/dist/utils/tools-manager.js +0 -256
- package/dist/utils/tools-manager.js.map +0 -1
- package/dist/utils/version-check.d.ts +0 -7
- package/dist/utils/version-check.d.ts.map +0 -1
- package/dist/utils/version-check.js +0 -70
- package/dist/utils/version-check.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Overlay Test - validates overlay compositing with inline text inputs
|
|
3
3
|
*
|
|
4
|
-
* Usage:
|
|
4
|
+
* Usage: aery --extension ./examples/extensions/overlay-test.ts
|
|
5
5
|
*
|
|
6
6
|
* Run /overlay-test to show a floating overlay with:
|
|
7
7
|
* - Inline text inputs within menu items
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* change agent behavior based on extension state.
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
|
-
* 1. Copy this file to ~/.
|
|
8
|
+
* 1. Copy this file to ~/.aery/agent/extensions/ or your project's .aery/extensions/
|
|
9
9
|
* 2. Use /pirate to toggle pirate mode
|
|
10
10
|
* 3. When enabled, the agent will respond like a pirate
|
|
11
11
|
*/
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* and can be activated via CLI flag, /preset command, or Ctrl+Shift+U to cycle.
|
|
7
7
|
*
|
|
8
8
|
* Config files (merged, project takes precedence):
|
|
9
|
-
* - ~/.
|
|
10
|
-
* - <cwd>/.
|
|
9
|
+
* - ~/.aery/agent/presets.json (global)
|
|
10
|
+
* - <cwd>/.aery/presets.json (project-local)
|
|
11
11
|
*
|
|
12
12
|
* Example presets.json:
|
|
13
13
|
* ```json
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* ```
|
|
31
31
|
*
|
|
32
32
|
* Usage:
|
|
33
|
-
* - `
|
|
33
|
+
* - `aery --preset plan` - start with plan preset
|
|
34
34
|
* - `/preset` - show selector to switch presets mid-session
|
|
35
35
|
* - `/preset implement` - switch to implement preset directly
|
|
36
36
|
* - `Ctrl+Shift+U` - cycle through presets
|
|
@@ -69,7 +69,7 @@ interface PresetsConfig {
|
|
|
69
69
|
*/
|
|
70
70
|
function loadPresets(cwd: string): PresetsConfig {
|
|
71
71
|
const globalPath = join(getAgentDir(), "presets.json");
|
|
72
|
-
const projectPath = join(cwd, ".
|
|
72
|
+
const projectPath = join(cwd, ".aery", "presets.json");
|
|
73
73
|
|
|
74
74
|
let globalPresets: PresetsConfig = {};
|
|
75
75
|
let projectPresets: PresetsConfig = {};
|
|
@@ -200,7 +200,10 @@ export default function presetExtension(pi: ExtensionAPI) {
|
|
|
200
200
|
const presetNames = Object.keys(presets);
|
|
201
201
|
|
|
202
202
|
if (presetNames.length === 0) {
|
|
203
|
-
ctx.ui.notify(
|
|
203
|
+
ctx.ui.notify(
|
|
204
|
+
"No presets defined. Add presets to ~/.aery/agent/presets.json or .aery/presets.json",
|
|
205
|
+
"warning",
|
|
206
|
+
);
|
|
204
207
|
return;
|
|
205
208
|
}
|
|
206
209
|
|
|
@@ -308,7 +311,10 @@ export default function presetExtension(pi: ExtensionAPI) {
|
|
|
308
311
|
async function cyclePreset(ctx: ExtensionContext): Promise<void> {
|
|
309
312
|
const presetNames = getPresetOrder();
|
|
310
313
|
if (presetNames.length === 0) {
|
|
311
|
-
ctx.ui.notify(
|
|
314
|
+
ctx.ui.notify(
|
|
315
|
+
"No presets defined. Add presets to ~/.aery/agent/presets.json or .aery/presets.json",
|
|
316
|
+
"warning",
|
|
317
|
+
);
|
|
312
318
|
return;
|
|
313
319
|
}
|
|
314
320
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* are currently active, respecting whatever the user has configured.
|
|
9
9
|
*
|
|
10
10
|
* Usage:
|
|
11
|
-
* 1. Copy this file to ~/.aery/agent/extensions/ or your project's .
|
|
11
|
+
* 1. Copy this file to ~/.aery/agent/extensions/ or your project's .aery/extensions/
|
|
12
12
|
* 2. Use the extension — it automatically adapts to your active tools and skills
|
|
13
13
|
*/
|
|
14
14
|
|
|
@@ -3,7 +3,7 @@ import { join } from "node:path";
|
|
|
3
3
|
import type { ExtensionAPI } from "@eminent337/aery";
|
|
4
4
|
|
|
5
5
|
export default function (pi: ExtensionAPI) {
|
|
6
|
-
const logFile = join(process.cwd(), ".
|
|
6
|
+
const logFile = join(process.cwd(), ".aery", "provider-payload.log");
|
|
7
7
|
|
|
8
8
|
pi.on("before_provider_request", (event) => {
|
|
9
9
|
appendFileSync(logFile, `${JSON.stringify(event.payload, null, 2)}\n\n`, "utf8");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Rainbow Editor - highlights "ultrathink" with animated shine effect
|
|
3
3
|
*
|
|
4
|
-
* Usage:
|
|
4
|
+
* Usage: aery --extension ./examples/extensions/rainbow-editor.ts
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { CustomEditor, type ExtensionAPI } from "@eminent337/aery";
|
|
@@ -25,7 +25,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
25
25
|
// -- setTitle, setWidget, setStatus on session lifecycle --
|
|
26
26
|
|
|
27
27
|
pi.on("session_start", async (event, ctx) => {
|
|
28
|
-
ctx.ui.setTitle(event.reason === "new" ? "
|
|
28
|
+
ctx.ui.setTitle(event.reason === "new" ? "aery RPC Demo (new session)" : "aery RPC Demo");
|
|
29
29
|
ctx.ui.setWidget("rpc-demo", ["--- RPC Extension UI Demo ---", "Loaded and ready."]);
|
|
30
30
|
ctx.ui.setStatus("rpc-demo", `Turns: ${turnCount}`);
|
|
31
31
|
});
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
* via `tool_call` input mutation without replacing the tool.
|
|
11
11
|
*
|
|
12
12
|
* Config files (merged, project takes precedence):
|
|
13
|
-
* - ~/.
|
|
14
|
-
* - <cwd>/.
|
|
13
|
+
* - ~/.aery/agent/extensions/sandbox.json (global)
|
|
14
|
+
* - <cwd>/.aery/sandbox.json (project-local)
|
|
15
15
|
*
|
|
16
|
-
* Example .
|
|
16
|
+
* Example .aery/sandbox.json:
|
|
17
17
|
* ```json
|
|
18
18
|
* {
|
|
19
19
|
* "enabled": true,
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
* ```
|
|
31
31
|
*
|
|
32
32
|
* Usage:
|
|
33
|
-
* - `
|
|
34
|
-
* - `
|
|
33
|
+
* - `aery -e ./sandbox` - sandbox enabled with default/config settings
|
|
34
|
+
* - `aery -e ./sandbox --no-sandbox` - disable sandboxing
|
|
35
35
|
* - `/sandbox` - show current sandbox configuration
|
|
36
36
|
*
|
|
37
37
|
* Setup:
|
|
38
|
-
* 1. Copy sandbox/ directory to ~/.
|
|
39
|
-
* 2. Run `npm install` in ~/.
|
|
38
|
+
* 1. Copy sandbox/ directory to ~/.aery/agent/extensions/
|
|
39
|
+
* 2. Run `npm install` in ~/.aery/agent/extensions/sandbox/
|
|
40
40
|
*
|
|
41
41
|
* Linux also requires: bubblewrap, socat, ripgrep
|
|
42
42
|
*/
|
|
@@ -77,7 +77,7 @@ const DEFAULT_CONFIG: SandboxConfig = {
|
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
function loadConfig(cwd: string): SandboxConfig {
|
|
80
|
-
const projectConfigPath = join(cwd, ".
|
|
80
|
+
const projectConfigPath = join(cwd, ".aery", "sandbox.json");
|
|
81
81
|
const globalConfigPath = join(getAgentDir(), "extensions", "sandbox.json");
|
|
82
82
|
|
|
83
83
|
let globalConfig: Partial<SandboxConfig> = {};
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
* Shutdown Command Extension
|
|
3
3
|
*
|
|
4
4
|
* Adds a /quit command that allows extensions to trigger clean shutdown.
|
|
5
|
-
* Demonstrates how extensions can use ctx.shutdown() to exit
|
|
5
|
+
* Demonstrates how extensions can use ctx.shutdown() to exit aery cleanly.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type { ExtensionAPI } from "@eminent337/aery";
|
|
9
9
|
import { Type } from "typebox";
|
|
10
10
|
|
|
11
11
|
export default function (pi: ExtensionAPI) {
|
|
12
|
-
// Register a /quit command that cleanly exits
|
|
12
|
+
// Register a /quit command that cleanly exits aery
|
|
13
13
|
pi.registerCommand("quit", {
|
|
14
|
-
description: "Exit
|
|
14
|
+
description: "Exit aery cleanly",
|
|
15
15
|
handler: async (_args, ctx) => {
|
|
16
16
|
ctx.shutdown();
|
|
17
17
|
},
|
|
@@ -21,7 +21,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
21
21
|
pi.registerTool({
|
|
22
22
|
name: "finish_and_exit",
|
|
23
23
|
label: "Finish and Exit",
|
|
24
|
-
description: "Complete a task and exit
|
|
24
|
+
description: "Complete a task and exit aery",
|
|
25
25
|
parameters: Type.Object({}),
|
|
26
26
|
async execute(_toolCallId, _params, _signal, _onUpdate, ctx) {
|
|
27
27
|
// Do any final work here...
|
|
@@ -40,7 +40,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
40
40
|
pi.registerTool({
|
|
41
41
|
name: "deploy_and_exit",
|
|
42
42
|
label: "Deploy and Exit",
|
|
43
|
-
description: "Deploy the application and exit
|
|
43
|
+
description: "Deploy the application and exit aery",
|
|
44
44
|
parameters: Type.Object({
|
|
45
45
|
environment: Type.String({ description: "Target environment (e.g., production, staging)" }),
|
|
46
46
|
}),
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* When --ssh is provided, read/write/edit/bash run on the remote.
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* aery -e ./ssh.ts --ssh user@host
|
|
9
|
+
* aery -e ./ssh.ts --ssh user@host:/remote/path
|
|
10
10
|
*
|
|
11
11
|
* Requirements:
|
|
12
12
|
* - SSH key-based auth (no password prompts)
|
|
@@ -4,7 +4,7 @@ Delegate tasks to specialized subagents with isolated context windows.
|
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- **Isolated context**: Each subagent runs in a separate `
|
|
7
|
+
- **Isolated context**: Each subagent runs in a separate `aery` process
|
|
8
8
|
- **Streaming output**: See tool calls and progress as they happen
|
|
9
9
|
- **Parallel streaming**: All parallel tasks stream updates simultaneously
|
|
10
10
|
- **Markdown rendering**: Final output rendered with proper formatting (expanded view)
|
|
@@ -35,30 +35,30 @@ From the repository root, symlink the files:
|
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
37
|
# Symlink the extension (must be in a subdirectory with index.ts)
|
|
38
|
-
mkdir -p ~/.
|
|
39
|
-
ln -sf "$(pwd)/packages/coding-agent/examples/extensions/subagent/index.ts" ~/.
|
|
40
|
-
ln -sf "$(pwd)/packages/coding-agent/examples/extensions/subagent/agents.ts" ~/.
|
|
38
|
+
mkdir -p ~/.aery/agent/extensions/subagent
|
|
39
|
+
ln -sf "$(pwd)/packages/coding-agent/examples/extensions/subagent/index.ts" ~/.aery/agent/extensions/subagent/index.ts
|
|
40
|
+
ln -sf "$(pwd)/packages/coding-agent/examples/extensions/subagent/agents.ts" ~/.aery/agent/extensions/subagent/agents.ts
|
|
41
41
|
|
|
42
42
|
# Symlink agents
|
|
43
|
-
mkdir -p ~/.
|
|
43
|
+
mkdir -p ~/.aery/agent/agents
|
|
44
44
|
for f in packages/coding-agent/examples/extensions/subagent/agents/*.md; do
|
|
45
|
-
ln -sf "$(pwd)/$f" ~/.
|
|
45
|
+
ln -sf "$(pwd)/$f" ~/.aery/agent/agents/$(basename "$f")
|
|
46
46
|
done
|
|
47
47
|
|
|
48
48
|
# Symlink workflow prompts
|
|
49
|
-
mkdir -p ~/.
|
|
49
|
+
mkdir -p ~/.aery/agent/prompts
|
|
50
50
|
for f in packages/coding-agent/examples/extensions/subagent/prompts/*.md; do
|
|
51
|
-
ln -sf "$(pwd)/$f" ~/.
|
|
51
|
+
ln -sf "$(pwd)/$f" ~/.aery/agent/prompts/$(basename "$f")
|
|
52
52
|
done
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
## Security Model
|
|
56
56
|
|
|
57
|
-
This tool executes a separate `
|
|
57
|
+
This tool executes a separate `aery` subprocess with a delegated system prompt and tool/model configuration.
|
|
58
58
|
|
|
59
|
-
**Project-local agents** (`.
|
|
59
|
+
**Project-local agents** (`.aery/agents/*.md`) are repo-controlled prompts that can instruct the model to read files, run bash commands, etc.
|
|
60
60
|
|
|
61
|
-
**Default behavior:** Only loads **user-level agents** from `~/.
|
|
61
|
+
**Default behavior:** Only loads **user-level agents** from `~/.aery/agent/agents`.
|
|
62
62
|
|
|
63
63
|
To enable project-local agents, pass `agentScope: "both"` (or `"project"`). Only do this for repositories you trust.
|
|
64
64
|
|
|
@@ -136,8 +136,8 @@ System prompt for the agent goes here.
|
|
|
136
136
|
```
|
|
137
137
|
|
|
138
138
|
**Locations:**
|
|
139
|
-
- `~/.
|
|
140
|
-
- `.
|
|
139
|
+
- `~/.aery/agent/agents/*.md` - User-level (always loaded)
|
|
140
|
+
- `.aery/agents/*.md` - Project-level (only with `agentScope: "project"` or `"both"`)
|
|
141
141
|
|
|
142
142
|
Project agents override user agents with the same name when `agentScope: "both"`.
|
|
143
143
|
|
|
@@ -85,7 +85,7 @@ function isDirectory(p: string): boolean {
|
|
|
85
85
|
function findNearestProjectAgentsDir(cwd: string): string | null {
|
|
86
86
|
let currentDir = cwd;
|
|
87
87
|
while (true) {
|
|
88
|
-
const candidate = path.join(currentDir, ".
|
|
88
|
+
const candidate = path.join(currentDir, ".aery", "agents");
|
|
89
89
|
if (isDirectory(candidate)) return candidate;
|
|
90
90
|
|
|
91
91
|
const parentDir = path.dirname(currentDir);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Subagent Tool - Delegate tasks to specialized agents
|
|
3
3
|
*
|
|
4
|
-
* Spawns a separate `
|
|
4
|
+
* Spawns a separate `aery` process for each subagent invocation,
|
|
5
5
|
* giving it an isolated context window.
|
|
6
6
|
*
|
|
7
7
|
* Supports three modes:
|
|
@@ -208,7 +208,7 @@ async function mapWithConcurrencyLimit<TIn, TOut>(
|
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
async function writePromptToTempFile(agentName: string, prompt: string): Promise<{ dir: string; filePath: string }> {
|
|
211
|
-
const tmpDir = await fs.promises.mkdtemp(path.join(os.tmpdir(), "
|
|
211
|
+
const tmpDir = await fs.promises.mkdtemp(path.join(os.tmpdir(), "aery-subagent-"));
|
|
212
212
|
const safeName = agentName.replace(/[^\w.-]+/g, "_");
|
|
213
213
|
const filePath = path.join(tmpDir, `prompt-${safeName}.md`);
|
|
214
214
|
await withFileMutationQueue(filePath, async () => {
|
|
@@ -230,7 +230,7 @@ function getPiInvocation(args: string[]): { command: string; args: string[] } {
|
|
|
230
230
|
return { command: process.execPath, args };
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
return { command: "
|
|
233
|
+
return { command: "aery", args };
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
type OnUpdateCallback = (partial: AgentToolResult<SubagentDetails>) => void;
|
|
@@ -435,8 +435,8 @@ export default function (pi: ExtensionAPI) {
|
|
|
435
435
|
description: [
|
|
436
436
|
"Delegate tasks to specialized subagents with isolated context.",
|
|
437
437
|
"Modes: single (agent + task), parallel (tasks array), chain (sequential with {previous} placeholder).",
|
|
438
|
-
'Default agent scope is "user" (from ~/.
|
|
439
|
-
'To enable project-local agents in .
|
|
438
|
+
'Default agent scope is "user" (from ~/.aery/agent/agents).',
|
|
439
|
+
'To enable project-local agents in .aery/agents, set agentScope: "both" (or "project").',
|
|
440
440
|
].join(" "),
|
|
441
441
|
parameters: SubagentParams,
|
|
442
442
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* This is useful for:
|
|
6
6
|
* - Adding logging or auditing to tool calls
|
|
7
7
|
* - Implementing access control or sandboxing
|
|
8
|
-
* - Routing tool calls to remote systems (e.g.,
|
|
8
|
+
* - Routing tool calls to remote systems (e.g., aery-ssh-remote)
|
|
9
9
|
* - Modifying tool behavior for specific workflows
|
|
10
10
|
*
|
|
11
11
|
* This example overrides the `read` tool to:
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* is used automatically (syntax highlighting, line numbers, truncation warnings).
|
|
18
18
|
*
|
|
19
19
|
* Usage:
|
|
20
|
-
*
|
|
20
|
+
* aery -e ./tool-override.ts
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
import { type ExtensionAPI, getAgentDir, withFileMutationQueue } from "@eminent337/aery";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Tool selection persists across session reloads and respects branch navigation.
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
|
-
* 1. Copy this file to ~/.
|
|
8
|
+
* 1. Copy this file to ~/.aery/agent/extensions/ or your project's .aery/extensions/
|
|
9
9
|
* 2. Use /tools to open the tool selector
|
|
10
10
|
*/
|
|
11
11
|
|
|
@@ -109,7 +109,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
109
109
|
|
|
110
110
|
if (truncation.truncated) {
|
|
111
111
|
// Save full output to a temp file so LLM can access it if needed
|
|
112
|
-
const tempDir = await mkdtemp(join(tmpdir(), "
|
|
112
|
+
const tempDir = await mkdtemp(join(tmpdir(), "aery-rg-"));
|
|
113
113
|
const tempFile = join(tempDir, "output.txt");
|
|
114
114
|
await withFileMutationQueue(tempFile, async () => {
|
|
115
115
|
await writeFile(tempFile, output, "utf8");
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Working Indicator Extension
|
|
3
3
|
*
|
|
4
4
|
* Demonstrates `ctx.ui.setWorkingIndicator()` for customizing the inline
|
|
5
|
-
* working indicator shown while
|
|
5
|
+
* working indicator shown while aery is streaming a response.
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
|
-
*
|
|
8
|
+
* aery --extension examples/extensions/working-indicator.ts
|
|
9
9
|
*
|
|
10
10
|
* Commands:
|
|
11
11
|
* /working-indicator Show current mode
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* /working-indicator pulse Use a custom animated indicator
|
|
14
14
|
* /working-indicator none Hide the indicator entirely
|
|
15
15
|
* /working-indicator spinner Restore an animated spinner
|
|
16
|
-
* /working-indicator reset Restore
|
|
16
|
+
* /working-indicator reset Restore aery's default spinner
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import type { ExtensionAPI, ExtensionContext, WorkingIndicatorOptions } from "@eminent337/aery";
|
|
@@ -79,7 +79,7 @@ function describeMode(mode: WorkingIndicatorMode): string {
|
|
|
79
79
|
case "spinner":
|
|
80
80
|
return "custom spinner";
|
|
81
81
|
case "default":
|
|
82
|
-
return "
|
|
82
|
+
return "aery default spinner";
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* verify they survive across loader recreations (e.g. between agent turns).
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
|
-
*
|
|
8
|
+
* aery --extension examples/extensions/working-message-test.ts
|
|
9
9
|
*
|
|
10
10
|
* Then send a few messages in interactive mode. The working message should
|
|
11
11
|
* stay "Working... (custom)" with a brown dot indicator every time the
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Minimal SDK Usage
|
|
3
3
|
*
|
|
4
4
|
* Uses all defaults: discovers skills, extensions, tools, context files
|
|
5
|
-
* from cwd and ~/.
|
|
5
|
+
* from cwd and ~/.aery/agent. Model chosen from settings or first available.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { createAgentSession } from "@eminent337/aery";
|
|
@@ -15,7 +15,7 @@ const loader1 = new DefaultResourceLoader({
|
|
|
15
15
|
agentDir,
|
|
16
16
|
systemPromptOverride: () => `You are a helpful assistant that speaks like a pirate.
|
|
17
17
|
Always end responses with "Arrr!"`,
|
|
18
|
-
// Needed to avoid DefaultResourceLoader appending APPEND_SYSTEM.md from ~/.
|
|
18
|
+
// Needed to avoid DefaultResourceLoader appending APPEND_SYSTEM.md from ~/.aery/agent or <cwd>/.pi.
|
|
19
19
|
appendSystemPromptOverride: () => [],
|
|
20
20
|
});
|
|
21
21
|
await loader1.reload();
|
|
@@ -37,7 +37,7 @@ const loader = new DefaultResourceLoader({
|
|
|
37
37
|
});
|
|
38
38
|
await loader.reload();
|
|
39
39
|
|
|
40
|
-
// Discover all skills from cwd/.
|
|
40
|
+
// Discover all skills from cwd/.aery/skills, ~/.aery/agent/skills, etc.
|
|
41
41
|
const { skills: allSkills, diagnostics } = loader.getSkills();
|
|
42
42
|
console.log(
|
|
43
43
|
"Discovered skills:",
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* They provide a unified system for extensions, custom tools, commands, and more.
|
|
6
6
|
*
|
|
7
7
|
* By default, extension files are discovered from:
|
|
8
|
-
* - ~/.
|
|
9
|
-
* - <cwd>/.
|
|
8
|
+
* - ~/.aery/agent/extensions/
|
|
9
|
+
* - <cwd>/.aery/extensions/
|
|
10
10
|
* - Paths specified in settings.json "extensions" array
|
|
11
11
|
*
|
|
12
12
|
* An extension is a TypeScript file that exports a default function:
|
|
@@ -36,7 +36,7 @@ const loader = new DefaultResourceLoader({
|
|
|
36
36
|
});
|
|
37
37
|
await loader.reload();
|
|
38
38
|
|
|
39
|
-
// Discover templates from cwd/.
|
|
39
|
+
// Discover templates from cwd/.aery/prompts/ and ~/.aery/agent/prompts/
|
|
40
40
|
const discovered = loader.getPrompts().prompts;
|
|
41
41
|
console.log("Discovered prompt templates:");
|
|
42
42
|
for (const template of discovered) {
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
import { AuthStorage, createAgentSession, ModelRegistry, SessionManager } from "@eminent337/aery";
|
|
8
8
|
|
|
9
|
-
// Default: AuthStorage uses ~/.
|
|
10
|
-
// ModelRegistry loads built-in + custom models from ~/.
|
|
9
|
+
// Default: AuthStorage uses ~/.aery/agent/auth.json
|
|
10
|
+
// ModelRegistry loads built-in + custom models from ~/.aery/agent/models.json
|
|
11
11
|
const authStorage = AuthStorage.create();
|
|
12
12
|
const modelRegistry = ModelRegistry.create(authStorage);
|
|
13
13
|
|
package/examples/sdk/README.md
CHANGED
|
@@ -114,7 +114,7 @@ await session.prompt("Hello");
|
|
|
114
114
|
| `authStorage` | `AuthStorage.create()` | Credential storage |
|
|
115
115
|
| `modelRegistry` | `ModelRegistry.create(authStorage)` | Model registry |
|
|
116
116
|
| `cwd` | `process.cwd()` | Working directory |
|
|
117
|
-
| `agentDir` | `~/.
|
|
117
|
+
| `agentDir` | `~/.aery/agent` | Config directory |
|
|
118
118
|
| `model` | From settings/first available | Model to use |
|
|
119
119
|
| `thinkingLevel` | From settings/"off" | off, low, medium, high |
|
|
120
120
|
| `tools` | `codingTools` | Built-in tools |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eminent337/aery",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.65",
|
|
4
4
|
"description": "Aery — AI coding agent by Aryee",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"aeryConfig": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"prepublishOnly": "npm run clean && ../../node_modules/.bin/tsgo -p tsconfig.build.json && ../../node_modules/.bin/shx chmod +x dist/cli.js && npm run copy-assets"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@eminent337/aery-ai": "0.67.
|
|
43
|
-
"@eminent337/aery-core": "0.67.
|
|
42
|
+
"@eminent337/aery-ai": "0.67.79",
|
|
43
|
+
"@eminent337/aery-core": "0.67.72",
|
|
44
44
|
"@eminent337/aery-tui": "0.67.68",
|
|
45
45
|
"@mariozechner/jiti": "2.6.2",
|
|
46
46
|
"@silvia-odwyer/photon-node": "^0.3.4",
|
package/dist/bun/cli.d.ts
DELETED
package/dist/bun/cli.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/bun/cli.ts"],"names":[],"mappings":"","sourcesContent":["#!/usr/bin/env node\nprocess.title = \"aery\";\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\nimport { restoreSandboxEnv } from \"./restore-sandbox-env.js\";\n\nrestoreSandboxEnv();\n\nawait import(\"./register-bedrock.js\");\nawait import(\"../cli.js\");\n"]}
|
package/dist/bun/cli.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
process.title = "aery";
|
|
3
|
-
process.emitWarning = (() => { });
|
|
4
|
-
import { restoreSandboxEnv } from "./restore-sandbox-env.js";
|
|
5
|
-
restoreSandboxEnv();
|
|
6
|
-
await import("./register-bedrock.js");
|
|
7
|
-
await import("../cli.js");
|
|
8
|
-
//# sourceMappingURL=cli.js.map
|
package/dist/bun/cli.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/bun/cli.ts"],"names":[],"mappings":";AACA,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC;AACvB,OAAO,CAAC,WAAW,GAAG,CAAC,GAAG,EAAE,CAAC,EAAC,CAAC,CAA+B,CAAC;AAE/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,iBAAiB,EAAE,CAAC;AAEpB,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC;AACtC,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nprocess.title = \"aery\";\nprocess.emitWarning = (() => {}) as typeof process.emitWarning;\n\nimport { restoreSandboxEnv } from \"./restore-sandbox-env.js\";\n\nrestoreSandboxEnv();\n\nawait import(\"./register-bedrock.js\");\nawait import(\"../cli.js\");\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"register-bedrock.d.ts","sourceRoot":"","sources":["../../src/bun/register-bedrock.ts"],"names":[],"mappings":"","sourcesContent":["import { setBedrockProviderModule } from \"@eminent337/aery-ai\";\nimport { bedrockProviderModule } from \"@eminent337/aery-ai/bedrock-provider\";\n\nsetBedrockProviderModule(bedrockProviderModule);\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"register-bedrock.js","sourceRoot":"","sources":["../../src/bun/register-bedrock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAE7E,wBAAwB,CAAC,qBAAqB,CAAC,CAAC","sourcesContent":["import { setBedrockProviderModule } from \"@eminent337/aery-ai\";\nimport { bedrockProviderModule } from \"@eminent337/aery-ai/bedrock-provider\";\n\nsetBedrockProviderModule(bedrockProviderModule);\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Workaround for https://github.com/oven-sh/bun/issues/27802
|
|
3
|
-
*
|
|
4
|
-
* Bun compiled binaries have an empty `process.env` when running inside
|
|
5
|
-
* sandbox environments (e.g. nono on Linux/macOS). On Linux we can recover
|
|
6
|
-
* the environment from `/proc/self/environ`.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Restore environment variables from `/proc/self/environ` when running
|
|
10
|
-
* inside a sandbox where Bun's `process.env` is empty.
|
|
11
|
-
*/
|
|
12
|
-
export declare function restoreSandboxEnv(): void;
|
|
13
|
-
//# sourceMappingURL=restore-sandbox-env.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"restore-sandbox-env.d.ts","sourceRoot":"","sources":["../../src/bun/restore-sandbox-env.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAiBxC","sourcesContent":["/**\n * Workaround for https://github.com/oven-sh/bun/issues/27802\n *\n * Bun compiled binaries have an empty `process.env` when running inside\n * sandbox environments (e.g. nono on Linux/macOS). On Linux we can recover\n * the environment from `/proc/self/environ`.\n */\n\nimport { readFileSync } from \"node:fs\";\n\n/**\n * Restore environment variables from `/proc/self/environ` when running\n * inside a sandbox where Bun's `process.env` is empty.\n */\nexport function restoreSandboxEnv(): void {\n\tif (!process.versions?.bun) return;\n\n\t// If process.env already has entries, nothing to fix.\n\tif (Object.keys(process.env).length > 0) return;\n\n\ttry {\n\t\tconst data = readFileSync(\"/proc/self/environ\", \"utf-8\");\n\t\tfor (const entry of data.split(\"\\0\")) {\n\t\t\tconst idx = entry.indexOf(\"=\");\n\t\t\tif (idx > 0) {\n\t\t\t\tprocess.env[entry.slice(0, idx)] = entry.slice(idx + 1);\n\t\t\t}\n\t\t}\n\t} catch {\n\t\t// /proc/self/environ may not be readable; ignore.\n\t}\n}\n"]}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Workaround for https://github.com/oven-sh/bun/issues/27802
|
|
3
|
-
*
|
|
4
|
-
* Bun compiled binaries have an empty `process.env` when running inside
|
|
5
|
-
* sandbox environments (e.g. nono on Linux/macOS). On Linux we can recover
|
|
6
|
-
* the environment from `/proc/self/environ`.
|
|
7
|
-
*/
|
|
8
|
-
import { readFileSync } from "node:fs";
|
|
9
|
-
/**
|
|
10
|
-
* Restore environment variables from `/proc/self/environ` when running
|
|
11
|
-
* inside a sandbox where Bun's `process.env` is empty.
|
|
12
|
-
*/
|
|
13
|
-
export function restoreSandboxEnv() {
|
|
14
|
-
if (!process.versions?.bun)
|
|
15
|
-
return;
|
|
16
|
-
// If process.env already has entries, nothing to fix.
|
|
17
|
-
if (Object.keys(process.env).length > 0)
|
|
18
|
-
return;
|
|
19
|
-
try {
|
|
20
|
-
const data = readFileSync("/proc/self/environ", "utf-8");
|
|
21
|
-
for (const entry of data.split("\0")) {
|
|
22
|
-
const idx = entry.indexOf("=");
|
|
23
|
-
if (idx > 0) {
|
|
24
|
-
process.env[entry.slice(0, idx)] = entry.slice(idx + 1);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
catch {
|
|
29
|
-
// /proc/self/environ may not be readable; ignore.
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=restore-sandbox-env.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"restore-sandbox-env.js","sourceRoot":"","sources":["../../src/bun/restore-sandbox-env.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC;;;GAGG;AACH,MAAM,UAAU,iBAAiB,GAAS;IACzC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG;QAAE,OAAO;IAEnC,sDAAsD;IACtD,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO;IAEhD,IAAI,CAAC;QACJ,MAAM,IAAI,GAAG,YAAY,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;QACzD,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YACtC,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAC/B,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;YACzD,CAAC;QACF,CAAC;IACF,CAAC;IAAC,MAAM,CAAC;QACR,kDAAkD;IACnD,CAAC;AAAA,CACD","sourcesContent":["/**\n * Workaround for https://github.com/oven-sh/bun/issues/27802\n *\n * Bun compiled binaries have an empty `process.env` when running inside\n * sandbox environments (e.g. nono on Linux/macOS). On Linux we can recover\n * the environment from `/proc/self/environ`.\n */\n\nimport { readFileSync } from \"node:fs\";\n\n/**\n * Restore environment variables from `/proc/self/environ` when running\n * inside a sandbox where Bun's `process.env` is empty.\n */\nexport function restoreSandboxEnv(): void {\n\tif (!process.versions?.bun) return;\n\n\t// If process.env already has entries, nothing to fix.\n\tif (Object.keys(process.env).length > 0) return;\n\n\ttry {\n\t\tconst data = readFileSync(\"/proc/self/environ\", \"utf-8\");\n\t\tfor (const entry of data.split(\"\\0\")) {\n\t\t\tconst idx = entry.indexOf(\"=\");\n\t\t\tif (idx > 0) {\n\t\t\t\tprocess.env[entry.slice(0, idx)] = entry.slice(idx + 1);\n\t\t\t}\n\t\t}\n\t} catch {\n\t\t// /proc/self/environ may not be readable; ignore.\n\t}\n}\n"]}
|