@namzu/cli 29.0.0 → 29.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +146 -0
- package/README.md +20 -0
- package/dist/browser/commands.d.ts +29 -0
- package/dist/browser/commands.d.ts.map +1 -0
- package/dist/browser/commands.js +361 -0
- package/dist/browser/commands.js.map +1 -0
- package/dist/browser/control.d.ts +79 -0
- package/dist/browser/control.d.ts.map +1 -0
- package/dist/browser/control.js +140 -0
- package/dist/browser/control.js.map +1 -0
- package/dist/browser/describe.d.ts +12 -0
- package/dist/browser/describe.d.ts.map +1 -0
- package/dist/browser/describe.js +27 -0
- package/dist/browser/describe.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +29 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/acp.d.ts.map +1 -1
- package/dist/commands/acp.js +1 -0
- package/dist/commands/acp.js.map +1 -1
- package/dist/commands/browser.d.ts +7 -0
- package/dist/commands/browser.d.ts.map +1 -0
- package/dist/commands/browser.js +16 -0
- package/dist/commands/browser.js.map +1 -0
- package/dist/commands/drain.d.ts +2 -1
- package/dist/commands/drain.d.ts.map +1 -1
- package/dist/commands/drain.js +6 -3
- package/dist/commands/drain.js.map +1 -1
- package/dist/commands/exec-flags.d.ts +2 -1
- package/dist/commands/exec-flags.d.ts.map +1 -1
- package/dist/commands/exec-flags.js +6 -3
- package/dist/commands/exec-flags.js.map +1 -1
- package/dist/commands/exec-json.d.ts.map +1 -1
- package/dist/commands/exec-json.js +2 -1
- package/dist/commands/exec-json.js.map +1 -1
- package/dist/commands/exec.d.ts.map +1 -1
- package/dist/commands/exec.js +2 -1
- package/dist/commands/exec.js.map +1 -1
- package/dist/commands/host-queries.d.ts.map +1 -1
- package/dist/commands/host-queries.js +10 -3
- package/dist/commands/host-queries.js.map +1 -1
- package/dist/commands/schedule.d.ts +9 -0
- package/dist/commands/schedule.d.ts.map +1 -0
- package/dist/commands/schedule.js +126 -0
- package/dist/commands/schedule.js.map +1 -0
- package/dist/commands/serve.d.ts +3 -1
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/serve.js +5 -3
- package/dist/commands/serve.js.map +1 -1
- package/dist/commands/skills.d.ts +10 -0
- package/dist/commands/skills.d.ts.map +1 -1
- package/dist/commands/skills.js +23 -7
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/upgrade.d.ts +5 -0
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +11 -0
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/config/load.d.ts +39 -0
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/load.js +232 -1
- package/dist/config/load.js.map +1 -1
- package/dist/config/schema.d.ts +78 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js.map +1 -1
- package/dist/config/user-config.d.ts +23 -0
- package/dist/config/user-config.d.ts.map +1 -0
- package/dist/config/user-config.js +48 -0
- package/dist/config/user-config.js.map +1 -0
- package/dist/context/capabilities.d.ts +1 -1
- package/dist/context/capabilities.d.ts.map +1 -1
- package/dist/context/capabilities.js +1 -0
- package/dist/context/capabilities.js.map +1 -1
- package/dist/doctor/checks/browser.d.ts +15 -0
- package/dist/doctor/checks/browser.d.ts.map +1 -0
- package/dist/doctor/checks/browser.js +63 -0
- package/dist/doctor/checks/browser.js.map +1 -0
- package/dist/doctor/checks/index.d.ts +4 -1
- package/dist/doctor/checks/index.d.ts.map +1 -1
- package/dist/doctor/checks/index.js +8 -1
- package/dist/doctor/checks/index.js.map +1 -1
- package/dist/doctor/checks/scheduler.d.ts +10 -0
- package/dist/doctor/checks/scheduler.d.ts.map +1 -0
- package/dist/doctor/checks/scheduler.js +74 -0
- package/dist/doctor/checks/scheduler.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/notifications/desktop/freedesktop.d.ts +10 -0
- package/dist/integrations/notifications/desktop/freedesktop.d.ts.map +1 -0
- package/dist/integrations/notifications/desktop/freedesktop.js +33 -0
- package/dist/integrations/notifications/desktop/freedesktop.js.map +1 -0
- package/dist/integrations/notifications/desktop/macos.d.ts +6 -0
- package/dist/integrations/notifications/desktop/macos.d.ts.map +1 -0
- package/dist/integrations/notifications/desktop/macos.js +17 -0
- package/dist/integrations/notifications/desktop/macos.js.map +1 -0
- package/dist/integrations/notifications/desktop/sanitize.d.ts +16 -0
- package/dist/integrations/notifications/desktop/sanitize.d.ts.map +1 -0
- package/dist/integrations/notifications/desktop/sanitize.js +49 -0
- package/dist/integrations/notifications/desktop/sanitize.js.map +1 -0
- package/dist/integrations/notifications/desktop/throttle.d.ts +10 -0
- package/dist/integrations/notifications/desktop/throttle.d.ts.map +1 -0
- package/dist/integrations/notifications/desktop/throttle.js +39 -0
- package/dist/integrations/notifications/desktop/throttle.js.map +1 -0
- package/dist/integrations/notifications/desktop/windows-toast.d.ts +23 -0
- package/dist/integrations/notifications/desktop/windows-toast.d.ts.map +1 -0
- package/dist/integrations/notifications/desktop/windows-toast.js +56 -0
- package/dist/integrations/notifications/desktop/windows-toast.js.map +1 -0
- package/dist/integrations/notifications/desktop.d.ts +82 -0
- package/dist/integrations/notifications/desktop.d.ts.map +1 -0
- package/dist/integrations/notifications/desktop.js +198 -0
- package/dist/integrations/notifications/desktop.js.map +1 -0
- package/dist/integrations/resident/session-step.d.ts.map +1 -1
- package/dist/integrations/resident/session-step.js +1 -0
- package/dist/integrations/resident/session-step.js.map +1 -1
- package/dist/integrations/subagents/runtime.d.ts +6 -0
- package/dist/integrations/subagents/runtime.d.ts.map +1 -1
- package/dist/integrations/subagents/runtime.js +14 -5
- package/dist/integrations/subagents/runtime.js.map +1 -1
- package/dist/permissions/browser-sites.d.ts +95 -0
- package/dist/permissions/browser-sites.d.ts.map +1 -0
- package/dist/permissions/browser-sites.js +270 -0
- package/dist/permissions/browser-sites.js.map +1 -0
- package/dist/permissions/checks.d.ts.map +1 -1
- package/dist/permissions/checks.js +7 -1
- package/dist/permissions/checks.js.map +1 -1
- package/dist/permissions/rules.d.ts.map +1 -1
- package/dist/permissions/rules.js +4 -8
- package/dist/permissions/rules.js.map +1 -1
- package/dist/schedule/build.d.ts +79 -0
- package/dist/schedule/build.d.ts.map +1 -0
- package/dist/schedule/build.js +246 -0
- package/dist/schedule/build.js.map +1 -0
- package/dist/schedule/changes.d.ts +22 -0
- package/dist/schedule/changes.d.ts.map +1 -0
- package/dist/schedule/changes.js +55 -0
- package/dist/schedule/changes.js.map +1 -0
- package/dist/schedule/commands/add.d.ts +24 -0
- package/dist/schedule/commands/add.d.ts.map +1 -0
- package/dist/schedule/commands/add.js +459 -0
- package/dist/schedule/commands/add.js.map +1 -0
- package/dist/schedule/commands/args.d.ts +22 -0
- package/dist/schedule/commands/args.d.ts.map +1 -0
- package/dist/schedule/commands/args.js +80 -0
- package/dist/schedule/commands/args.js.map +1 -0
- package/dist/schedule/commands/confirm-prompt.d.ts +6 -0
- package/dist/schedule/commands/confirm-prompt.d.ts.map +1 -0
- package/dist/schedule/commands/confirm-prompt.js +21 -0
- package/dist/schedule/commands/confirm-prompt.js.map +1 -0
- package/dist/schedule/commands/lifecycle.d.ts +39 -0
- package/dist/schedule/commands/lifecycle.d.ts.map +1 -0
- package/dist/schedule/commands/lifecycle.js +585 -0
- package/dist/schedule/commands/lifecycle.js.map +1 -0
- package/dist/schedule/commands/list.d.ts +33 -0
- package/dist/schedule/commands/list.d.ts.map +1 -0
- package/dist/schedule/commands/list.js +202 -0
- package/dist/schedule/commands/list.js.map +1 -0
- package/dist/schedule/commands/logs.d.ts +7 -0
- package/dist/schedule/commands/logs.d.ts.map +1 -0
- package/dist/schedule/commands/logs.js +106 -0
- package/dist/schedule/commands/logs.js.map +1 -0
- package/dist/schedule/commands/service.d.ts +16 -0
- package/dist/schedule/commands/service.d.ts.map +1 -0
- package/dist/schedule/commands/service.js +458 -0
- package/dist/schedule/commands/service.js.map +1 -0
- package/dist/schedule/daemon/daemon.d.ts +156 -0
- package/dist/schedule/daemon/daemon.d.ts.map +1 -0
- package/dist/schedule/daemon/daemon.js +1248 -0
- package/dist/schedule/daemon/daemon.js.map +1 -0
- package/dist/schedule/daemon/endpoint.d.ts +38 -0
- package/dist/schedule/daemon/endpoint.d.ts.map +1 -0
- package/dist/schedule/daemon/endpoint.js +158 -0
- package/dist/schedule/daemon/endpoint.js.map +1 -0
- package/dist/schedule/daemon/exit.d.ts +8 -0
- package/dist/schedule/daemon/exit.d.ts.map +1 -0
- package/dist/schedule/daemon/exit.js +8 -0
- package/dist/schedule/daemon/exit.js.map +1 -0
- package/dist/schedule/daemon/log.d.ts +12 -0
- package/dist/schedule/daemon/log.d.ts.map +1 -0
- package/dist/schedule/daemon/log.js +53 -0
- package/dist/schedule/daemon/log.js.map +1 -0
- package/dist/schedule/daemon/notify.d.ts +31 -0
- package/dist/schedule/daemon/notify.d.ts.map +1 -0
- package/dist/schedule/daemon/notify.js +89 -0
- package/dist/schedule/daemon/notify.js.map +1 -0
- package/dist/schedule/daemon/retention.d.ts +16 -0
- package/dist/schedule/daemon/retention.d.ts.map +1 -0
- package/dist/schedule/daemon/retention.js +46 -0
- package/dist/schedule/daemon/retention.js.map +1 -0
- package/dist/schedule/daemon/sessions.d.ts +23 -0
- package/dist/schedule/daemon/sessions.d.ts.map +1 -0
- package/dist/schedule/daemon/sessions.js +52 -0
- package/dist/schedule/daemon/sessions.js.map +1 -0
- package/dist/schedule/env.d.ts +28 -0
- package/dist/schedule/env.d.ts.map +1 -0
- package/dist/schedule/env.js +99 -0
- package/dist/schedule/env.js.map +1 -0
- package/dist/schedule/fire/browser-preflight.d.ts +41 -0
- package/dist/schedule/fire/browser-preflight.d.ts.map +1 -0
- package/dist/schedule/fire/browser-preflight.js +73 -0
- package/dist/schedule/fire/browser-preflight.js.map +1 -0
- package/dist/schedule/fire/fire.d.ts +78 -0
- package/dist/schedule/fire/fire.d.ts.map +1 -0
- package/dist/schedule/fire/fire.js +482 -0
- package/dist/schedule/fire/fire.js.map +1 -0
- package/dist/schedule/fire/result.d.ts +13 -0
- package/dist/schedule/fire/result.d.ts.map +1 -0
- package/dist/schedule/fire/result.js +18 -0
- package/dist/schedule/fire/result.js.map +1 -0
- package/dist/schedule/fire/unattended-note.d.ts +22 -0
- package/dist/schedule/fire/unattended-note.d.ts.map +1 -0
- package/dist/schedule/fire/unattended-note.js +46 -0
- package/dist/schedule/fire/unattended-note.js.map +1 -0
- package/dist/schedule/floor.d.ts +116 -0
- package/dist/schedule/floor.d.ts.map +1 -0
- package/dist/schedule/floor.js +1051 -0
- package/dist/schedule/floor.js.map +1 -0
- package/dist/schedule/folder.d.ts +34 -0
- package/dist/schedule/folder.d.ts.map +1 -0
- package/dist/schedule/folder.js +84 -0
- package/dist/schedule/folder.js.map +1 -0
- package/dist/schedule/paths.d.ts +49 -0
- package/dist/schedule/paths.d.ts.map +1 -0
- package/dist/schedule/paths.js +53 -0
- package/dist/schedule/paths.js.map +1 -0
- package/dist/schedule/policy.d.ts +141 -0
- package/dist/schedule/policy.d.ts.map +1 -0
- package/dist/schedule/policy.js +378 -0
- package/dist/schedule/policy.js.map +1 -0
- package/dist/schedule/resume-command.d.ts +36 -0
- package/dist/schedule/resume-command.d.ts.map +1 -0
- package/dist/schedule/resume-command.js +72 -0
- package/dist/schedule/resume-command.js.map +1 -0
- package/dist/schedule/service/detect.d.ts +22 -0
- package/dist/schedule/service/detect.d.ts.map +1 -0
- package/dist/schedule/service/detect.js +29 -0
- package/dist/schedule/service/detect.js.map +1 -0
- package/dist/schedule/service/index.d.ts +48 -0
- package/dist/schedule/service/index.d.ts.map +1 -0
- package/dist/schedule/service/index.js +352 -0
- package/dist/schedule/service/index.js.map +1 -0
- package/dist/schedule/service/launchd.d.ts +24 -0
- package/dist/schedule/service/launchd.d.ts.map +1 -0
- package/dist/schedule/service/launchd.js +84 -0
- package/dist/schedule/service/launchd.js.map +1 -0
- package/dist/schedule/service/manifest.d.ts +44 -0
- package/dist/schedule/service/manifest.d.ts.map +1 -0
- package/dist/schedule/service/manifest.js +16 -0
- package/dist/schedule/service/manifest.js.map +1 -0
- package/dist/schedule/service/names.d.ts +9 -0
- package/dist/schedule/service/names.d.ts.map +1 -0
- package/dist/schedule/service/names.js +22 -0
- package/dist/schedule/service/names.js.map +1 -0
- package/dist/schedule/service/quote.d.ts +24 -0
- package/dist/schedule/service/quote.d.ts.map +1 -0
- package/dist/schedule/service/quote.js +64 -0
- package/dist/schedule/service/quote.js.map +1 -0
- package/dist/schedule/service/runner.d.ts +17 -0
- package/dist/schedule/service/runner.d.ts.map +1 -0
- package/dist/schedule/service/runner.js +31 -0
- package/dist/schedule/service/runner.js.map +1 -0
- package/dist/schedule/service/systemd.d.ts +37 -0
- package/dist/schedule/service/systemd.d.ts.map +1 -0
- package/dist/schedule/service/systemd.js +96 -0
- package/dist/schedule/service/systemd.js.map +1 -0
- package/dist/schedule/service/windows-task.d.ts +51 -0
- package/dist/schedule/service/windows-task.d.ts.map +1 -0
- package/dist/schedule/service/windows-task.js +134 -0
- package/dist/schedule/service/windows-task.js.map +1 -0
- package/dist/schedule/service/wsl.d.ts +57 -0
- package/dist/schedule/service/wsl.d.ts.map +1 -0
- package/dist/schedule/service/wsl.js +111 -0
- package/dist/schedule/service/wsl.js.map +1 -0
- package/dist/schedule/store/atomic.d.ts +43 -0
- package/dist/schedule/store/atomic.d.ts.map +1 -0
- package/dist/schedule/store/atomic.js +135 -0
- package/dist/schedule/store/atomic.js.map +1 -0
- package/dist/schedule/store/claims.d.ts +26 -0
- package/dist/schedule/store/claims.d.ts.map +1 -0
- package/dist/schedule/store/claims.js +57 -0
- package/dist/schedule/store/claims.js.map +1 -0
- package/dist/schedule/store/digest.d.ts +18 -0
- package/dist/schedule/store/digest.d.ts.map +1 -0
- package/dist/schedule/store/digest.js +139 -0
- package/dist/schedule/store/digest.js.map +1 -0
- package/dist/schedule/store/history.d.ts +21 -0
- package/dist/schedule/store/history.d.ts.map +1 -0
- package/dist/schedule/store/history.js +114 -0
- package/dist/schedule/store/history.js.map +1 -0
- package/dist/schedule/store/jobs.d.ts +61 -0
- package/dist/schedule/store/jobs.d.ts.map +1 -0
- package/dist/schedule/store/jobs.js +210 -0
- package/dist/schedule/store/jobs.js.map +1 -0
- package/dist/schedule/store/state.d.ts +19 -0
- package/dist/schedule/store/state.d.ts.map +1 -0
- package/dist/schedule/store/state.js +38 -0
- package/dist/schedule/store/state.js.map +1 -0
- package/dist/schedule/types.d.ts +256 -0
- package/dist/schedule/types.d.ts.map +1 -0
- package/dist/schedule/types.js +9 -0
- package/dist/schedule/types.js.map +1 -0
- package/dist/skills/catalog.d.ts +96 -0
- package/dist/skills/catalog.d.ts.map +1 -0
- package/dist/skills/catalog.js +226 -0
- package/dist/skills/catalog.js.map +1 -0
- package/dist/skills/save.d.ts +148 -0
- package/dist/skills/save.d.ts.map +1 -0
- package/dist/skills/save.js +344 -0
- package/dist/skills/save.js.map +1 -0
- package/dist/skills/store.d.ts +103 -16
- package/dist/skills/store.d.ts.map +1 -1
- package/dist/skills/store.js +230 -29
- package/dist/skills/store.js.map +1 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/App.js +591 -72
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/LiveActivity.d.ts +8 -1
- package/dist/tui/LiveActivity.d.ts.map +1 -1
- package/dist/tui/LiveActivity.js +20 -4
- package/dist/tui/LiveActivity.js.map +1 -1
- package/dist/tui/PermissionOverlay.d.ts +24 -4
- package/dist/tui/PermissionOverlay.d.ts.map +1 -1
- package/dist/tui/PermissionOverlay.js +113 -15
- package/dist/tui/PermissionOverlay.js.map +1 -1
- package/dist/tui/SaveSkillOverlay.d.ts +33 -0
- package/dist/tui/SaveSkillOverlay.d.ts.map +1 -0
- package/dist/tui/SaveSkillOverlay.js +118 -0
- package/dist/tui/SaveSkillOverlay.js.map +1 -0
- package/dist/tui/agent.d.ts +185 -5
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/agent.js +325 -54
- package/dist/tui/agent.js.map +1 -1
- package/dist/tui/browser-notices.d.ts +33 -0
- package/dist/tui/browser-notices.d.ts.map +1 -0
- package/dist/tui/browser-notices.js +102 -0
- package/dist/tui/browser-notices.js.map +1 -0
- package/dist/tui/permission-review.d.ts.map +1 -1
- package/dist/tui/permission-review.js +53 -4
- package/dist/tui/permission-review.js.map +1 -1
- package/dist/tui/schedule/host-commands.d.ts +34 -0
- package/dist/tui/schedule/host-commands.d.ts.map +1 -0
- package/dist/tui/schedule/host-commands.js +309 -0
- package/dist/tui/schedule/host-commands.js.map +1 -0
- package/dist/tui/schedule/integration.d.ts +62 -0
- package/dist/tui/schedule/integration.d.ts.map +1 -0
- package/dist/tui/schedule/integration.js +145 -0
- package/dist/tui/schedule/integration.js.map +1 -0
- package/dist/tui/schedule/loop-host.d.ts +42 -0
- package/dist/tui/schedule/loop-host.d.ts.map +1 -0
- package/dist/tui/schedule/loop-host.js +153 -0
- package/dist/tui/schedule/loop-host.js.map +1 -0
- package/dist/tui/schedule/resume.d.ts +122 -0
- package/dist/tui/schedule/resume.d.ts.map +1 -0
- package/dist/tui/schedule/resume.js +324 -0
- package/dist/tui/schedule/resume.js.map +1 -0
- package/dist/tui/schedule/startup.d.ts +11 -0
- package/dist/tui/schedule/startup.d.ts.map +1 -0
- package/dist/tui/schedule/startup.js +121 -0
- package/dist/tui/schedule/startup.js.map +1 -0
- package/dist/tui/schedule/tool-host.d.ts +44 -0
- package/dist/tui/schedule/tool-host.d.ts.map +1 -0
- package/dist/tui/schedule/tool-host.js +294 -0
- package/dist/tui/schedule/tool-host.js.map +1 -0
- package/dist/tui/skills/learning.d.ts +74 -0
- package/dist/tui/skills/learning.d.ts.map +1 -0
- package/dist/tui/skills/learning.js +131 -0
- package/dist/tui/skills/learning.js.map +1 -0
- package/dist/tui/skills/suggest-setting.d.ts +22 -0
- package/dist/tui/skills/suggest-setting.d.ts.map +1 -0
- package/dist/tui/skills/suggest-setting.js +55 -0
- package/dist/tui/skills/suggest-setting.js.map +1 -0
- package/dist/tui/skills/suggestion-ledger.d.ts +35 -0
- package/dist/tui/skills/suggestion-ledger.d.ts.map +1 -0
- package/dist/tui/skills/suggestion-ledger.js +52 -0
- package/dist/tui/skills/suggestion-ledger.js.map +1 -0
- package/dist/tui/slashCommands.d.ts +20 -0
- package/dist/tui/slashCommands.d.ts.map +1 -1
- package/dist/tui/slashCommands.js +76 -2
- package/dist/tui/slashCommands.js.map +1 -1
- package/dist/tui/turn-interruption.d.ts +20 -1
- package/dist/tui/turn-interruption.d.ts.map +1 -1
- package/dist/tui/turn-interruption.js +43 -0
- package/dist/tui/turn-interruption.js.map +1 -1
- package/dist/tui/types.d.ts +9 -1
- package/dist/tui/types.d.ts.map +1 -1
- package/package.json +5 -3
- package/skills/README.md +15 -0
- package/skills/browser-automation/SKILL.md +84 -0
- package/skills/schedule-task/SKILL.md +140 -0
- package/skills/skill-creator/SKILL.md +101 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,151 @@
|
|
|
1
1
|
# @namzu/cli
|
|
2
2
|
|
|
3
|
+
## 29.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2b96136: The interactive terminal can drive a web browser. `@namzu/browser` is now a dependency, and the TUI mounts the `browser` and `browser_act` tools on a namzu-owned profile; in WSL they drive the Windows Chrome. Nothing launches until the model's first browser call. `namzu exec`, `exec --json`, `drain`, `acp` and the resident step do not get the tools.
|
|
8
|
+
|
|
9
|
+
What changes for you:
|
|
10
|
+
|
|
11
|
+
- **Browser calls are reviewed by default.** With no config, opening any site and every action on a page is reviewed (`"*": ask`); looking at the page the browser holds is not. Set `browser.sites` to allow sites (`read`, `act`) or refuse them (`deny`), or `browser.enabled: false` to turn the tools off.
|
|
12
|
+
- **New config key `browser`** (`enabled`, `defaultProfile`, `engine`, `headless`, `sites`, `keepOpen`). An unreadable site key or level stops namzu from starting and names the key. The key is merged across files per site; a deny in any file holds. A project file that sets `browser.defaultProfile` is refused, and namzu will not start in that folder until the key is removed.
|
|
13
|
+
- **Site rules come before your `[permissions]` table for the browser tools.** A table `deny` for `browser` or `browser_act` still wins; a table `allow` or `ask` for them applies only to `back`, `forward` and `reload`.
|
|
14
|
+
- **New commands:** `namzu browser login <profile> [url]`, `list`, `status`, `install`, `remove`; the `/browser` slash command (status, `profile <name>`).
|
|
15
|
+
- **`namzu doctor`** reports `browser.installed` and `browser.engine`. The boot capability line gains `browser yes|no`.
|
|
16
|
+
- **The review screen** names the site rule, profile and engine for a browser call. A turn paused because a page needs you (sign-in, CAPTCHA) says where to do it and how to continue.
|
|
17
|
+
- New exports: `browserInstalledCheck`, `browserEngineCheck`; `NAMZU_OPTIONAL_CAPABILITIES` includes `@namzu/browser`.
|
|
18
|
+
|
|
19
|
+
See docs/cli/browser.md.
|
|
20
|
+
|
|
21
|
+
- 2b96136: The CLI ships three built-in skills and a way to make your own from the TUI.
|
|
22
|
+
|
|
23
|
+
- `skill-creator` (model and operator), `browser-automation` (model only, offered only when the `browser` tool is present) and `schedule-task` (offered where the `schedule` tool is: the TUI). Every session now carries the `skill` tool and lists `skill-creator` in its skills manifest. To go back to no built-ins, set `skills.builtin: false`; to drop one, name it in `skills.disabled`; a skill of the same name in `~/.namzu/skills`, `~/.agents/skills` or the project replaces it.
|
|
24
|
+
- `/skills new [what it should do]` starts an interview with the model, which drafts a `SKILL.md` and proposes it through the new `save_skill` tool. Nothing is written until you choose Save to user (`~/.namzu/skills`), Save to project (`./.namzu/skills`) or Cancel on a screen that shows the whole file with invisible characters revealed and names any skill it replaces. The screen asks in every permission mode, `auto` included; `plan` and `strict` refuse the tool. `save_skill` exists only in the interactive TUI, never in `exec`, `drain`, a scheduled run or a sub-agent. `/skills new` is now a subcommand, so a skill named `new` is activated from the `/skills` picker rather than by `/skills new`.
|
|
25
|
+
- The skill tiers are read again at the start of every turn, so a skill added while a session runs is offered from the next turn.
|
|
26
|
+
|
|
27
|
+
- 2b96136: Scheduled jobs can drive the browser, on the sites you list and no others.
|
|
28
|
+
|
|
29
|
+
- **New flags** on `namzu schedule add` and `edit`: `--browser <profile>`, `--browser-site <site>=read|ask|act` (repeatable) and `--browser-headed`; on `edit`, `<site>=none` takes a site off and `--no-browser` removes the grant. Sign in first with `namzu browser login <profile> <url>`. `*` is refused: every site not listed is denied. `ask` needs `--unmatched park`. A browser grant alone (no `--permissions`) needs `--unmatched`.
|
|
30
|
+
- **New job field** `permissions.browser` (`profile`, `sites`, `headed`), covered by the confirmation. The model's `schedule` tool in the TUI can now propose it; you confirm it on screen.
|
|
31
|
+
- **A job's `[permissions]` rules may no longer name `browser` or `browser_act`**; creating or editing such a job is refused with a pointer to the grant. Without a grant both tools are denied in a scheduled run, as before.
|
|
32
|
+
- **A run with a grant checks its browser before the model**: the profile exists and has its data, the browser it was signed in with can start (WSL interop for the Windows browser), a display for `--browser-headed`. Otherwise it is `blocked-config` with the `namzu browser login` command.
|
|
33
|
+
- **A run a page parked for you** (a sign-in, a CAPTCHA) reads `needs you: <reason>` in `schedule list`, `show`, `status`, `/schedule` and the TUI's startup line instead of "waiting for approval". `--json` gains `activeRun.handoff` (`list`) and `awaitingApproval[].handoff` and `waitingFor` (`status`).
|
|
34
|
+
- The scheduled-run floor also refuses tool arguments naming the Windows browser's profile folder (`…/AppData/Local/namzu`, `%LOCALAPPDATA%\namzu`). A site a config file's `browser.sites` denies stays denied for every job.
|
|
35
|
+
- `DISPLAY`, `WAYLAND_DISPLAY` and `XAUTHORITY` now reach a scheduled run's environment.
|
|
36
|
+
|
|
37
|
+
See docs/cli/scheduled-tasks.md#browser-access.
|
|
38
|
+
|
|
39
|
+
- d233f26: Add scheduled jobs: prompts that run later in a folder while namzu is closed, under a permission set you write down, run by a scheduler service.
|
|
40
|
+
|
|
41
|
+
New commands, all under `namzu schedule`: `add`, `edit`, `confirm`, `list`, `show`, `history`, `pause`, `resume`, `remove`, `run-now`, `prune`, `install`, `uninstall`, `status`, `start`, `stop`, `logs` and `daemon`. `install` registers a systemd user unit, a launchd agent or a Windows scheduled task (under WSL, a task that runs the daemon through `wsl.exe`). New config key `schedule` (`maxConcurrentRuns`, `notifications`), read from the user and managed files only. New files under `NAMZU_HOME/schedule/`. `namzu doctor` gains a `scheduler.service` check. `namzu upgrade` asks a running scheduler to restart on the new code.
|
|
42
|
+
|
|
43
|
+
In the TUI: `/schedule` lists jobs and what needs you and acts on them, `/loop` re-sends a prompt to the open conversation on an interval between turns, the model gets a `schedule` tool (every job it proposes is confirmed by you on a screen namzu computes) and a `session_loop` tool, and one startup line reports scheduled work since you last looked.
|
|
44
|
+
|
|
45
|
+
A job is confirmed on a terminal or in the TUI; `schedule add --yes` without a terminal (a script, or a model's own shell call) creates it inert. This is a tripwire, not a lock against a program running as you: see "Only a terminal or the TUI confirms a job" in the docs. A scheduled run never approves a call on its own: a call its rules do not allow is refused or parks for you, and you answer it later from `/resume` in the job's folder, under the job's rules. Allows come only from the job; every `deny` in your config files still holds.
|
|
46
|
+
|
|
47
|
+
Wording only, no behaviour change: `namzu serve` now says namzu has no _server_ (it used to say no daemon, which the scheduler made untrue), and `namzu drain --help` no longer says namzu has no daemon. A script matching the old `serve` sentence must match the new one.
|
|
48
|
+
|
|
49
|
+
See `docs/cli/scheduled-tasks.md` and `docs/cli/scheduler-service.md`.
|
|
50
|
+
|
|
51
|
+
- 2b96136: The interactive terminal now proposes saving a multi-step task as a skill. After a turn that answered with at least six successful tool calls across two or more tools (one of them changing something), it prints one dim line under the reply: `✻ That took 9 steps across 4 tools. Save it as a reusable skill? /skills save [name] · /skills save off to stop suggesting`. It appears at most once per conversation, takes no keys and costs no model call; nothing is saved unless you type `/skills save`, which drafts the skill in the same conversation and saves it only from the confirmation screen.
|
|
52
|
+
|
|
53
|
+
To turn it off, type `/skills save off` (it writes `skills.suggest: false` to `~/.namzu/config.yaml`) or set that key yourself; `/skills save on` restores it. It also stops by itself after three proposals in a row go unused. `skills.suggestMinToolCalls` changes the threshold. `namzu exec`, `drain`, ACP, scheduled runs and sub-agents never show it.
|
|
54
|
+
|
|
55
|
+
- 2b96136: `SKILL.md` skills now reach the model on their own. Every session lists the usable skills in the prompt's skills manifest and mounts the `skill` tool, which the model calls to load one when a task matches its description; until now only plugin skills did, and a file skill needed `/skills <name>` or `exec --skills`. Skills are read from six tiers, the later shadowing the earlier: built-in (`skills/` in this package), `~/.agents/skills`, `~/.namzu/skills`, `./skills`, `.agents/skills` from the checkout root down to the working directory, and `./.namzu/skills`. The manifest is capped at 2% of the context window or 4 KB, whichever is smaller; skills that do not fit are named in one line and stay loadable.
|
|
56
|
+
|
|
57
|
+
What may change for you:
|
|
58
|
+
|
|
59
|
+
- A model working in a folder with skills now sees them and may load one. To keep a skill away from the model, add `disable-model-invocation: true` (or `invocation: operator`) to its frontmatter, or name it in the new `skills.disabled` config list; `skills.builtin: false` leaves the built-in tier out.
|
|
60
|
+
- A skill whose `metadata.namzu-requires-tools` names a tool the session lacks is not offered.
|
|
61
|
+
- `namzu skills-json` can now report `"source": "system"` for a built-in skill, and leaves disabled skills out. A host that switches on `source` should accept the new value.
|
|
62
|
+
- `namzu skills` and `/skills list` show each skill's directory tier and the files it shadows; `namzu --format json skills` items gain `tier`, and `shadows`, `disabled`, `invocation` and `requiresTools` when they apply.
|
|
63
|
+
|
|
64
|
+
- 2b96136: Handles a tool's request for a person (`ToolResult.handoff`, see `@namzu/sdk`). The `paused` `AgentEvent` gains `handoff`. The terminal shows the reason with `press Enter to continue · Esc to stop`: Enter resumes the turn and Esc abandons it. `namzu exec` prints `Turn paused — needs you: <reason>`. A scheduled run paused this way records `awaiting-approval` with the reason (`reason` and the new `handoff.reason` in its run result), and its notification says `needs you: <reason>`. `namzu resume <session-id>` and `/resume` offer Continue or Abandon for such a run instead of a permission screen. Nothing to change on your side.
|
|
65
|
+
|
|
66
|
+
### Patch Changes
|
|
67
|
+
|
|
68
|
+
- 2b96136: The review screen reads a browser call in words. It was titled `browser` and asked "Do you want to run browser?" over `action: "navigate"`; it now says `Open a web page` / `Do you want to open this page?`, `Go back in the browser`, or `Click on https://shop.example` / `Do you want to do this on https://shop.example?`. An address opens with its path as a person writes it (`/wiki/İstanbul`) and, when that differs, the address actually sent (`/wiki/%C4%B0stanbul`) below it; the host stays in its punycode form.
|
|
69
|
+
- 2b96136: A generic tool result view may now set `outcome: 'cancelled'` for a call the person declined on the tool's own screen. `save_skill` and the `schedule` tool's `create`, `resume` and `delete` use it (the `schedule` tool also sets `data.cancelled` on those results), and the TUI shows the row as `○ … Cancelled — nothing was saved` instead of `✗ … failed: Error: The operator cancelled`. The model still receives the same refusal text.
|
|
70
|
+
- 2b96136: A tool call a person declines without giving a reason now tells the model not to get the same content or result another way — another tool, another site or address, or a web search — unless it asks first and the person agrees. The text was "User declined to run the proposed tool(s)." (and "The user rejected this tool call." on a resumed decision); in a live session a model whose browser navigation was declined fetched the same page through web search instead.
|
|
71
|
+
|
|
72
|
+
New export: `DECLINED_TOOL_CALL_FEEDBACK`, the text. A host that passes its own `feedback` with a refusal is unchanged. A test or host that matched the old default text must match the new one.
|
|
73
|
+
|
|
74
|
+
- 2b96136: Continuing a turn a tool paused for a person — Enter at "The browser needs you", or Continue on a parked scheduled run — now tells the model that you dealt with it and to try the step again. It used to see only the tool's "needs a person" result and end the turn, so a scheduled post you had signed in again for was reported as not possible. The Continue/Abandon card for a scheduled run names the site, the profile and the sign-in command in words.
|
|
75
|
+
- 2b96136: A scheduled run the browser parked on a sign-in page says how to sign in again: its reason, and so the notification, `schedule list`, `show`, `status` and `/schedule`, read `… is showing a sign-in page; sign in again with namzu browser login <profile> <url>`.
|
|
76
|
+
- 2b96136: `/abandon`, `/resume` and Abandon on a parked scheduled run no longer print the turn's id. They say `Stopped the paused turn. Your next message starts a new one in this conversation.`, `Continuing where it paused…` and `Stopped this run. The job stays scheduled.` Nothing else changes.
|
|
77
|
+
- d233f26: The permission screen shows a shell command as it would be typed. It used to escape the command the way JSON does, so `printf '%s\n' "$out"` read as `printf '%s\\n' \"$out\"`. A multi-line command now shows one row per line, later lines indented under the first; a carriage return and other invisible characters are spelled out as `\u{....}`, and `d` still shows the exact input. Nothing to change on your side.
|
|
78
|
+
- 2b96136: A tool result whose first line is up to 300 characters long shows that line whole on its `⎿` row and not again underneath. It used to be cut at 120 characters on the row and repeated in full as the first line of the output below, so a blocked browser navigation's note appeared twice. A longer first line is still shortened on the row and kept whole in the output.
|
|
79
|
+
- 2b96136: A parked scheduled run whose job cannot run shell commands (`bash` denied, as in the `read-only` preset) can be continued from a TUI session whatever its sandbox setting. It used to be refused unless the session's sandbox matched the job's `execution`, which for a browser job created with `execution: sandbox` meant editing your config to continue it. A job that can run commands is still continued only from a matching session. The refusal now says a run a page parked "is waiting for you" rather than "waiting for approval".
|
|
80
|
+
- 2b96136: Esc or Ctrl+C on the screen that saves a skill now only cancels the save. It also interrupted the turn, so the model never heard that nothing was written.
|
|
81
|
+
- 2b96136: The `schedule` tool's input schema now says that `budget` limits one run and that `maxIterations` counts model steps, not repetitions of the job. A model proposed `maxIterations: 1` for a job meant to post once per run, and every run stopped after its first model call. The CLI's confirmation of a job, on a terminal or in the TUI, warns when it allows fewer than 10 iterations.
|
|
82
|
+
- 2b96136: `ScheduleToolHost.create()` may return an optional `note`, which the `schedule` tool appends to what the model is told about the new job. Existing hosts that return only `{ name }` are unaffected. The CLI uses it to tell the model that no scheduler is installed, so its reply no longer promises a run that cannot happen until you run `namzu schedule install`.
|
|
83
|
+
- 2b96136: A job the model proposes in the TUI and you create now says, when no scheduler is installed, that it will not run until `namzu schedule install`. `namzu browser login` ends by saying a scheduled job uses the profile with `namzu schedule add … --browser <profile>`.
|
|
84
|
+
- 2b96136: Confirming an edited scheduled job now lists what changed since it was last confirmed, as `+` and `-` lines above the question, in `namzu schedule edit`, `namzu schedule confirm` and `/schedule confirm`. An edit saved with `--yes` records the lines in the job's history (`changes` on the `edited` record in `schedule history --json`) so the later confirmation can show them.
|
|
85
|
+
- 2b96136: The `schedule` tool asks the model to leave optional fields (folder, time zone, execution, budget, a visible browser window) unset unless the user asked for them, and the TUI's confirmation of a proposed job marks every such value the model set that differs from what you would get by default, e.g. `Chosen by the model, not the default: time zone America/New_York, not this machine's Europe/Istanbul`.
|
|
86
|
+
- 2b96136: A job the model proposes, resumes or deletes in the TUI is confirmed once, on the job's own screen. The permission review no longer asks "Do you want to run schedule?" first in `prompt`, `accept-edits` or `auto`. `plan` and `strict` still refuse the call, a `schedule` rule of `ask` or `deny` still applies, and `pause` is still reviewed. The SDK's `schedule` tool no longer declares `delete` destructive, since the host confirms it before anything is removed; a host that relied on that flag to review deletes should add an `ask` rule for `schedule`.
|
|
87
|
+
- 2b96136: The `schedule` tool's input schema describes `budget.tokenBudget` as what the whole run may spend, with every model call resending the prompt, and the CLI's confirmation of a job warns when it allows fewer than 50 000 tokens. A model proposed 4 000 tokens for a browser job whose runs each took about 110 000.
|
|
88
|
+
- 2b96136: A parked scheduled run you approve or continue from the TUI is told the current local time again, since an answer can come long after the run started, and every time line now says it is the current time already looked up, so the model does not try to run `date` for it.
|
|
89
|
+
- 2b96136: A scheduled run is told the time it started, in the job's time zone with its UTC offset (`It is now Wednesday, 23 September 2026 at 21:04 GMT+03:00 (Europe/Istanbul)`). It had only the date; a job that wrote the time into a post, with no shell to ask, wrote the time in UTC.
|
|
90
|
+
- 2b96136: A scheduled run is no longer sent the tools its job can never use, which every model call used to resend. For a browser job that posts once to a site with the `read-only` preset and `--unmatched deny`, a run went from about 106 000 tokens to about 78 000. A tool withheld this way is refused as an unknown tool if the model names it anyway; nothing a job's rules allow is withheld. New `AgentSessionOptions.withheldTools`.
|
|
91
|
+
- 2b96136: The `skill` tool now presents its calls as `Read skill <name>` (or `List skills`) and hides a successful result, so a host shows one row instead of the raw input and the skill's body. In the TUI, the Working row says `Waiting for you` while the screen that saves a skill is open, instead of counting on as if the turn were working.
|
|
92
|
+
- 2b96136: `/skills save off` and `/skills save on` now warn when a project file, profile or managed config sets its own `skills` block that would override the value you just wrote to `~/.namzu/config.yaml`. The warning names that file and says what `skills.suggest` will be the next time namzu starts. Add `suggest` under `skills` in that file to make the change stick. `/skills save` and `/skills new` typed while a turn is running now wait and run when that turn ends, instead of being injected into it.
|
|
93
|
+
- 2b96136: The confirmation of a job the model proposes is shown whole again. When the model wrote a sentence along with the `schedule` call, the confirmation was drawn below that still-open reply and, taller than the screen, lost its top lines — the job, the model, the budget and its warnings — while you were asked to create it. A tool's own screen now closes the reply first.
|
|
94
|
+
- 2b96136: Skills drafted by `/skills save` and `/skills new`, job prompts the model proposes through the `schedule` tool, and a scheduled run's final summary now follow the language you write in (the job prompt's language for a run), instead of defaulting to English.
|
|
95
|
+
- 2b96136: While a question is waiting for you during a turn — a permission review, a scheduled job's confirmation, the Continue/Abandon card — the activity row reads "Waiting for you · the question below" instead of a running `Working` timer, and the time spent answering is not counted in the turn's elapsed time.
|
|
96
|
+
- Updated dependencies [2b96136]
|
|
97
|
+
- Updated dependencies [2b96136]
|
|
98
|
+
- Updated dependencies [2b96136]
|
|
99
|
+
- Updated dependencies [2b96136]
|
|
100
|
+
- Updated dependencies [2b96136]
|
|
101
|
+
- Updated dependencies [2b96136]
|
|
102
|
+
- Updated dependencies [2b96136]
|
|
103
|
+
- Updated dependencies [2b96136]
|
|
104
|
+
- Updated dependencies [d233f26]
|
|
105
|
+
- Updated dependencies [2b96136]
|
|
106
|
+
- Updated dependencies [2b96136]
|
|
107
|
+
- Updated dependencies [2b96136]
|
|
108
|
+
- Updated dependencies [2b96136]
|
|
109
|
+
- Updated dependencies [2b96136]
|
|
110
|
+
- Updated dependencies [2b96136]
|
|
111
|
+
- Updated dependencies [d233f26]
|
|
112
|
+
- Updated dependencies [2b96136]
|
|
113
|
+
- Updated dependencies [2b96136]
|
|
114
|
+
- Updated dependencies [2b96136]
|
|
115
|
+
- @namzu/sdk@45.1.0
|
|
116
|
+
- @namzu/browser@0.1.0
|
|
117
|
+
|
|
118
|
+
## 29.0.1
|
|
119
|
+
|
|
120
|
+
### Patch Changes
|
|
121
|
+
|
|
122
|
+
- 2e2ea14: A skill's `allowed-tools` now pre-approves its tools. It no longer restricts the tool set.
|
|
123
|
+
|
|
124
|
+
The field comes from the Agent Skills format, and that format defines it this way: the listed tools skip the approval prompt for the rest of the turn that loaded the skill, and every other tool stays callable. Namzu read it the other way. After the `skill` tool loaded a skill, the next batch was narrowed to the listed tools and the model was told to "restrict yourself to" them. A skill with `allowed-tools: Read Grep` therefore took `bash` away, and the model stopped doing the work.
|
|
125
|
+
|
|
126
|
+
**What breaks in `@namzu/sdk`**
|
|
127
|
+
|
|
128
|
+
- A loaded skill no longer narrows `ToolContext.allowedTools`. If a host relied on `allowed-tools` to confine the model, it should narrow the turn itself with `QueryParams.allowedTools`, a step's `allowedTools`, or `deny` rules.
|
|
129
|
+
- `ToolContext.adoptSkillScope` is deprecated. The kernel never supplies it, so a tool that calls it through `?.` now does nothing. It will be removed in the next major. Use `ToolContext.grantSkillTools`.
|
|
130
|
+
- `createReviewHandler` / `createReviewPolicy` in `prompt` and `accept-edits` modes now approve a batch without asking when every call it would ask about is covered by a skill loaded earlier in the turn. To keep asking about every call, pass `skillGrants: 'ignore'`. `plan` and `strict` still refuse such calls, and an operator `deny` or `ask` rule, a destructive call, or a path outside the roots or the sandbox is never covered. Each approval made this way is written to the audit trail under the skill's name.
|
|
131
|
+
- The `bash` tool runs `bash -c` instead of `/bin/sh -c` wherever bash exists (the first `bash` on `PATH`, then `/bin/bash`, then `/usr/bin/bash`), including for background jobs. On a host whose `/bin/sh` is `dash` or `busybox sh` (Debian, Ubuntu, Alpine), commands now run in bash; a command that relied on `dash` behaviour, such as `echo` expanding `\n`, behaves as bash does. `BASH_ENV`, `ENV`, `SHELLOPTS`, `BASHOPTS` and `BASH_FUNC_*` are removed from its environment. To keep `/bin/sh`, set `NAMZU_BASH_SHELL=/bin/sh` in the environment of the process that runs the SDK. In a sandbox the tool now passes the guest `/bin/sh -c '<launcher>' sh '<command>'`, which runs bash when the guest has it; a custom `Sandbox.exec` or `spawnDetached` that inspected its arguments for `['-c', command]` sees the launcher instead. With no bash, the host still runs `/bin/sh -c`.
|
|
132
|
+
- A command line is read for the shell that runs it. `AuthorizationGate.evaluate`, `evaluateRule` and `SkillGrantSet.coveringSkill` called without a dialect read it for any POSIX shell (`sh`), so an allow rule or `Bash(<pattern>)` entry no longer approves a line using a bash-only construct (`$'…'`, `&>`, `|&`, `<<<`, `[[`, arrays, brace expansion, `time` and others) unless the caller says the shell is bash. The kernel says so for the `bash` tool on a host that has bash; inside a sandbox it reads in `sh`, because the guest may not have bash. A host calling the gate itself passes `commandDialect: 'bash'` in the `ToolCallContext` (or `{ commandDialect: 'bash' }` as the last argument of `evaluateRule` and `coveringSkill`) when the command will run in bash. Deny rules are unaffected: they still see every command.
|
|
133
|
+
- `parseAllowedTools` splits on whitespace as well as commas, and keeps `Tool(pattern)` entries whole. `"read write edit"` used to be one name and is now three.
|
|
134
|
+
- The skill manifest in the system prompt renders the field as `<pre_approved_tools>` instead of `<allowed_tools>`. The `skill` tool's notice lists what was pre-approved and what was ignored, and says every other tool remains available.
|
|
135
|
+
|
|
136
|
+
**Added:** `ToolDefinition.commandDialect` (and the `defineTool` option), `ToolCallContext.commandDialect`, `EvaluateRuleOptions`, the `ShellDialect` type, and `NAMZU_BASH_SHELL`; `ToolContext.grantSkillTools`, `ToolCallSummary.skillGrant`, `approve_tools.skillGranted`, `ReviewPolicyOptions.skillGrants`, `SkillGrantSet`, `compileSkillGrant`, `SKILL_TOOL_NAME_ALIASES`, `permissionPatternToRegExpSource`, and a `FrontmatterOptions` third argument to `parseFrontmatter` (`lists`), which the skill loader uses so that `allowed-tools` can be a YAML list. Names are matched case-insensitively and through the format's aliases (`Read` → `read`, `WebFetch` → `web_fetch`). `Bash(git status *)` uses the CLI permission-table glob, applied to each command in the line. `${CLAUDE_SKILL_DIR}` and `${NAMZU_SKILL_DIR}` expand to the skill's directory. An unknown name is ignored and reported, and never widens the grant. A tool that is destructive for every input (the shipped `write` and `run_code`) is ignored and reported too, because each of its calls is reviewed anyway. `BashOutput`, `KillShell`, `TaskOutput` and `TaskStop` map to `job`, and `TaskCreate`, `TaskUpdate` and `TaskList` to `task_*`. `ToolContext.grantSkillTools` returns a `commit()`, and the `skill` tool records the grant only once it has delivered the skill's instructions. The grant also ends when the operator sends a message while the turn is still running (`inboundMessages` or steering), through the new `SkillGrantSet.clear()`. A `Bash(<pattern>)` entry never covers a line that redirects output into a file (`git status > ~/.bashrc`); `/dev/null` and `2>&1` stay covered. A whole-tool `Bash` entry grants the tool as it is, writes outside the working directory included, because bash has no path argument for the escalation check. An entry naming a tool that `allowedTools` withholds from the turn or step is ignored as not available, and `SkillGrantToolResolver` gains an optional `unavailable` field for that.
|
|
137
|
+
|
|
138
|
+
**`@namzu/cli`:** a plugin skill's `allowed-tools` pre-approves for the turn and no longer takes tools away. `SKILL.md` files whose `allowed-tools` is a YAML list are now listed instead of refused. The `[permissions]` glob now comes from the SDK, and it matches the same commands as before. `permissionChecks` read a builtin tool's command line in the dialect that tool reports, as the runtime does.
|
|
139
|
+
|
|
140
|
+
- Updated dependencies [2e2ea14]
|
|
141
|
+
- Updated dependencies [2e2ea14]
|
|
142
|
+
- @namzu/sdk@45.0.0
|
|
143
|
+
- @namzu/computer-use@1.4.3
|
|
144
|
+
- @namzu/anthropic@6.1.0
|
|
145
|
+
- @namzu/ollama@2.2.4
|
|
146
|
+
- @namzu/openai@4.1.0
|
|
147
|
+
- @namzu/openrouter@3.0.1
|
|
148
|
+
|
|
3
149
|
## 29.0.0
|
|
4
150
|
|
|
5
151
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -376,6 +376,26 @@ same plugin hooks and skills reach interactive turns, headless turns, durable
|
|
|
376
376
|
resumes, and ACP sessions; session shutdown settles live work before unloading
|
|
377
377
|
them.
|
|
378
378
|
|
|
379
|
+
## Scheduled jobs: `namzu schedule`
|
|
380
|
+
|
|
381
|
+
```bash
|
|
382
|
+
namzu schedule install
|
|
383
|
+
namzu schedule add nightly-deps --prompt "Check for outdated dependencies." \
|
|
384
|
+
--when "0 3 * * *" --permissions read-only
|
|
385
|
+
namzu schedule status
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
A scheduled job is a prompt that runs later in a folder while namzu is closed,
|
|
389
|
+
under a permission set you write down when you create it; a call it does not
|
|
390
|
+
allow waits for you or is refused, never approved on its own. Each run is its
|
|
391
|
+
own conversation (`/resume` it), a desktop notification and a line in the job's
|
|
392
|
+
history. One small scheduler per `NAMZU_HOME` runs them, installed as a systemd
|
|
393
|
+
user unit, a launchd agent or a Windows scheduled task (WSL included). A job is
|
|
394
|
+
confirmed by a person on a terminal or in the TUI (`/schedule`); `--yes` from a
|
|
395
|
+
script creates it inert until someone does. See
|
|
396
|
+
[Scheduled tasks](../../docs/cli/scheduled-tasks.md) and
|
|
397
|
+
[The scheduler service](../../docs/cli/scheduler-service.md).
|
|
398
|
+
|
|
379
399
|
## Headless use: `namzu exec`
|
|
380
400
|
|
|
381
401
|
```bash
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `namzu browser <verb>`: the operator's side of the browser. Profiles are
|
|
3
|
+
* made and signed in to here, in a visible window, never by the model.
|
|
4
|
+
*
|
|
5
|
+
* - `login <profile> [url]` open a visible window on the profile; return when
|
|
6
|
+
* the person presses Enter or closes the window
|
|
7
|
+
* - `list [--json]` the profiles and when each was last signed in to
|
|
8
|
+
* - `status [profile] [--json]` which browser the tools would drive here
|
|
9
|
+
* - `install [--dry-run]` Playwright's Chromium, for a machine with no Chrome
|
|
10
|
+
* - `remove <profile> [--yes]` delete a profile and its cookies
|
|
11
|
+
*/
|
|
12
|
+
import type { CommandContext } from '../commands/types.js';
|
|
13
|
+
type BrowserModule = typeof import('@namzu/browser');
|
|
14
|
+
export declare const BROWSER_HELP: string;
|
|
15
|
+
/** What the commands need from outside, so tests can stand in for each. */
|
|
16
|
+
export interface BrowserCommandDeps {
|
|
17
|
+
readonly load: () => Promise<BrowserModule>;
|
|
18
|
+
readonly env: NodeJS.ProcessEnv;
|
|
19
|
+
readonly platform: NodeJS.Platform;
|
|
20
|
+
/** Resolves when the person presses Enter; never, without a terminal. */
|
|
21
|
+
readonly waitForEnter: (signal: AbortSignal) => Promise<void>;
|
|
22
|
+
/** How often `login` looks for a closed window, in ms. */
|
|
23
|
+
readonly pollMs: number;
|
|
24
|
+
readonly spawnInstall: (args: readonly string[]) => Promise<number>;
|
|
25
|
+
}
|
|
26
|
+
export declare const defaultBrowserCommandDeps: BrowserCommandDeps;
|
|
27
|
+
export declare function browserCommand(ctx: CommandContext, argv: readonly string[], deps?: BrowserCommandDeps): Promise<number>;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/browser/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAUH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAO1D,KAAK,aAAa,GAAG,cAAc,gBAAgB,CAAC,CAAA;AAEpD,eAAO,MAAM,YAAY,QAsBb,CAAA;AAEZ,2EAA2E;AAC3E,MAAM,WAAW,kBAAkB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,aAAa,CAAC,CAAA;IAC3C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAA;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAA;IAClC,yEAAyE;IACzE,QAAQ,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7D,0DAA0D;IAC1D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CACnE;AA8BD,eAAO,MAAM,yBAAyB,EAAE,kBAOvC,CAAA;AA6BD,wBAAsB,cAAc,CACnC,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,IAAI,GAAE,kBAA8C,GAClD,OAAO,CAAC,MAAM,CAAC,CAsBjB"}
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `namzu browser <verb>`: the operator's side of the browser. Profiles are
|
|
3
|
+
* made and signed in to here, in a visible window, never by the model.
|
|
4
|
+
*
|
|
5
|
+
* - `login <profile> [url]` open a visible window on the profile; return when
|
|
6
|
+
* the person presses Enter or closes the window
|
|
7
|
+
* - `list [--json]` the profiles and when each was last signed in to
|
|
8
|
+
* - `status [profile] [--json]` which browser the tools would drive here
|
|
9
|
+
* - `install [--dry-run]` Playwright's Chromium, for a machine with no Chrome
|
|
10
|
+
* - `remove <profile> [--yes]` delete a profile and its cookies
|
|
11
|
+
*/
|
|
12
|
+
import { spawn } from 'node:child_process';
|
|
13
|
+
import { createRequire } from 'node:module';
|
|
14
|
+
import { dirname, join, resolve as resolvePath } from 'node:path';
|
|
15
|
+
import { createInterface } from 'node:readline';
|
|
16
|
+
import { fileURLToPath } from 'node:url';
|
|
17
|
+
import { canonicalizeBrowserUrl } from '@namzu/sdk';
|
|
18
|
+
import { EXIT_FAIL, EXIT_OK, EXIT_UNAVAILABLE, EXIT_USAGE } from '../exit-codes.js';
|
|
19
|
+
import { resolveNamzuHome } from '../integrations/state/home.js';
|
|
20
|
+
import { flag, has, interactive, parseArgs } from '../schedule/commands/args.js';
|
|
21
|
+
import { isBrowserProfileName } from './control.js';
|
|
22
|
+
import { browserName, describeBrowserPlan, engineLabel } from './describe.js';
|
|
23
|
+
export const BROWSER_HELP = [
|
|
24
|
+
'Usage: namzu browser <command> [options]',
|
|
25
|
+
'',
|
|
26
|
+
'The browser the interactive terminal drives (the browser and browser_act',
|
|
27
|
+
'tools). A profile is a browser user-data directory namzu owns: sign in to',
|
|
28
|
+
'a site once here, in a visible window, and the agent reuses the sign-in.',
|
|
29
|
+
'The model never signs in, and never chooses the profile.',
|
|
30
|
+
'',
|
|
31
|
+
'Commands',
|
|
32
|
+
' login <profile> [url] Open a visible window on the profile at url.',
|
|
33
|
+
' Sign in, then press Enter or close the window.',
|
|
34
|
+
' list [--json] Profiles, their browser, last sign-in',
|
|
35
|
+
' status [profile] [--json] Which browser runs here, and a profile in detail',
|
|
36
|
+
' install [--dry-run] Download Playwright’s Chromium (not needed when',
|
|
37
|
+
' Chrome is installed, or in WSL with Windows Chrome)',
|
|
38
|
+
' remove <profile> [--yes] Delete a profile and everything signed in to it',
|
|
39
|
+
'',
|
|
40
|
+
'Options: --home <dir> (default NAMZU_HOME).',
|
|
41
|
+
'Config: browser.defaultProfile, browser.engine (auto|windows|local),',
|
|
42
|
+
'browser.headless (auto|always|never), browser.sites, browser.keepOpen.',
|
|
43
|
+
'',
|
|
44
|
+
'Exit codes: 0 done, 1 failed, 64 wrong arguments, 69 no browser can run here.',
|
|
45
|
+
].join('\n');
|
|
46
|
+
function waitForEnterOnStdin(signal) {
|
|
47
|
+
if (!process.stdin.isTTY)
|
|
48
|
+
return new Promise(() => { });
|
|
49
|
+
return new Promise((resolve) => {
|
|
50
|
+
const rl = createInterface({ input: process.stdin });
|
|
51
|
+
const done = () => {
|
|
52
|
+
rl.close();
|
|
53
|
+
resolve();
|
|
54
|
+
};
|
|
55
|
+
rl.once('line', done);
|
|
56
|
+
signal.addEventListener('abort', () => rl.close(), { once: true });
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/** `node playwright-core/cli.js install chromium`, the version `@namzu/browser` pins. */
|
|
60
|
+
async function spawnPlaywrightInstall(args) {
|
|
61
|
+
const browserEntry = fileURLToPath(import.meta.resolve('@namzu/browser'));
|
|
62
|
+
// `cli.js` is not in playwright-core's export map; its manifest is.
|
|
63
|
+
const manifest = createRequire(browserEntry).resolve('playwright-core/package.json');
|
|
64
|
+
const cli = join(dirname(manifest), 'cli.js');
|
|
65
|
+
return new Promise((resolve) => {
|
|
66
|
+
const child = spawn(process.execPath, [cli, 'install', ...args, 'chromium'], {
|
|
67
|
+
stdio: 'inherit',
|
|
68
|
+
});
|
|
69
|
+
child.on('exit', (code) => resolve(code ?? 1));
|
|
70
|
+
child.on('error', () => resolve(1));
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
export const defaultBrowserCommandDeps = {
|
|
74
|
+
load: () => import('@namzu/browser'),
|
|
75
|
+
env: process.env,
|
|
76
|
+
platform: process.platform,
|
|
77
|
+
waitForEnter: waitForEnterOnStdin,
|
|
78
|
+
pollMs: 500,
|
|
79
|
+
spawnInstall: spawnPlaywrightInstall,
|
|
80
|
+
};
|
|
81
|
+
function homeOf(args, deps) {
|
|
82
|
+
const home = flag(args, 'home');
|
|
83
|
+
return home ? resolvePath(home) : resolveNamzuHome({ env: deps.env });
|
|
84
|
+
}
|
|
85
|
+
function detectPlan(mod, ctx, deps, headed = false) {
|
|
86
|
+
const browser = ctx.config.browser;
|
|
87
|
+
return mod.runnableBrowserPlan(mod.detectBrowserEnvironment(deps.env, deps.platform, undefined, {
|
|
88
|
+
...(browser?.engine ? { engine: browser.engine } : {}),
|
|
89
|
+
headless: headed ? 'never' : (browser?.headless ?? 'auto'),
|
|
90
|
+
mode: 'interactive',
|
|
91
|
+
}));
|
|
92
|
+
}
|
|
93
|
+
function errorText(error) {
|
|
94
|
+
if (error instanceof Error)
|
|
95
|
+
return error.message;
|
|
96
|
+
const message = error?.message;
|
|
97
|
+
return typeof message === 'string' ? message : String(error);
|
|
98
|
+
}
|
|
99
|
+
export async function browserCommand(ctx, argv, deps = defaultBrowserCommandDeps) {
|
|
100
|
+
const [verb, ...rest] = argv;
|
|
101
|
+
switch (verb) {
|
|
102
|
+
case 'login':
|
|
103
|
+
return loginCommand(ctx, rest, deps);
|
|
104
|
+
case 'list':
|
|
105
|
+
case 'ls':
|
|
106
|
+
return listCommand(ctx, rest, deps);
|
|
107
|
+
case 'status':
|
|
108
|
+
return statusCommand(ctx, rest, deps);
|
|
109
|
+
case 'install':
|
|
110
|
+
return installCommand(ctx, rest, deps);
|
|
111
|
+
case 'remove':
|
|
112
|
+
case 'rm':
|
|
113
|
+
return removeCommand(ctx, rest, deps);
|
|
114
|
+
default:
|
|
115
|
+
ctx.formatter.error({
|
|
116
|
+
message: verb ? `unknown browser command: ${verb}` : 'a browser command is required',
|
|
117
|
+
});
|
|
118
|
+
ctx.formatter.print({ text: BROWSER_HELP });
|
|
119
|
+
return EXIT_USAGE;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
async function loginCommand(ctx, argv, deps) {
|
|
123
|
+
const args = parseArgs(argv, ['home']);
|
|
124
|
+
const [profile, rawUrl, ...extra] = args.positionals;
|
|
125
|
+
if (args.unknown.length > 0 || !profile || extra.length > 0) {
|
|
126
|
+
ctx.formatter.error({ message: 'usage: namzu browser login <profile> [url]' });
|
|
127
|
+
return EXIT_USAGE;
|
|
128
|
+
}
|
|
129
|
+
if (!isBrowserProfileName(profile)) {
|
|
130
|
+
ctx.formatter.error({
|
|
131
|
+
message: `"${profile}" is not a profile name: use lowercase letters, digits and single hyphens, at most 64 characters.`,
|
|
132
|
+
});
|
|
133
|
+
return EXIT_USAGE;
|
|
134
|
+
}
|
|
135
|
+
let url = 'about:blank';
|
|
136
|
+
if (rawUrl !== undefined) {
|
|
137
|
+
// A bare host is what people type; the browser needs a scheme.
|
|
138
|
+
const withScheme = /^[a-z][a-z0-9+.-]*:/i.test(rawUrl) ? rawUrl : `https://${rawUrl}`;
|
|
139
|
+
const verdict = canonicalizeBrowserUrl(withScheme);
|
|
140
|
+
if (!verdict.ok) {
|
|
141
|
+
ctx.formatter.error({ message: `${rawUrl}: ${verdict.reason}` });
|
|
142
|
+
return EXIT_USAGE;
|
|
143
|
+
}
|
|
144
|
+
url = verdict.url;
|
|
145
|
+
}
|
|
146
|
+
const mod = await deps.load();
|
|
147
|
+
const home = homeOf(args, deps);
|
|
148
|
+
const plan = detectPlan(mod, ctx, deps, true);
|
|
149
|
+
if (plan.unavailableReason !== undefined) {
|
|
150
|
+
ctx.formatter.error({
|
|
151
|
+
message: `Cannot open a browser window here: ${plan.unavailableReason}`,
|
|
152
|
+
details: {
|
|
153
|
+
hint: plan.display
|
|
154
|
+
? 'Install Google Chrome, or run `namzu browser install`.'
|
|
155
|
+
: 'Signing in needs a display: run this where you have a desktop (or `ssh -X`, or `xvfb-run` with a VNC viewer), then reuse the profile here.',
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
return EXIT_UNAVAILABLE;
|
|
159
|
+
}
|
|
160
|
+
const host = new mod.PlaywrightBrowserHost({
|
|
161
|
+
profile,
|
|
162
|
+
home,
|
|
163
|
+
plan,
|
|
164
|
+
mode: 'interactive',
|
|
165
|
+
// The person is driving: every site may load, and the host's checks
|
|
166
|
+
// after the fact have nothing to clear.
|
|
167
|
+
sites: { '*': 'act' },
|
|
168
|
+
...(ctx.config.browser?.keepOpen ? { keepOpen: true } : {}),
|
|
169
|
+
});
|
|
170
|
+
ctx.formatter.info(`Opening ${browserName(plan.browser)} (${engineLabel(plan)}) on profile ${profile}…`);
|
|
171
|
+
try {
|
|
172
|
+
await host.observe(url === 'about:blank' ? { action: 'snapshot' } : { action: 'tabs', op: 'new', url });
|
|
173
|
+
}
|
|
174
|
+
catch (error) {
|
|
175
|
+
const code = error.code;
|
|
176
|
+
// A sign-in page is why the window is open.
|
|
177
|
+
if (code !== 'browser_human_required') {
|
|
178
|
+
await host.dispose().catch(() => undefined);
|
|
179
|
+
ctx.formatter.error({ message: `The browser did not open: ${errorText(error)}` });
|
|
180
|
+
return code === 'browser_unavailable' || code === 'browser_profile_busy'
|
|
181
|
+
? EXIT_UNAVAILABLE
|
|
182
|
+
: EXIT_FAIL;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
const where = url === 'about:blank' ? 'the sites you want the agent to use' : new URL(url).origin;
|
|
186
|
+
ctx.formatter.print({
|
|
187
|
+
text: `Sign in to ${where} in the window that opened (profile ${profile}).\n${interactive() ? 'Press Enter here when you are done, or close the window.' : 'Close the window when you are done.'}`,
|
|
188
|
+
});
|
|
189
|
+
const stop = new AbortController();
|
|
190
|
+
const closed = new Promise((resolve) => {
|
|
191
|
+
const timer = setInterval(() => {
|
|
192
|
+
if (!host.running) {
|
|
193
|
+
clearInterval(timer);
|
|
194
|
+
resolve('closed');
|
|
195
|
+
}
|
|
196
|
+
}, deps.pollMs);
|
|
197
|
+
stop.signal.addEventListener('abort', () => clearInterval(timer), { once: true });
|
|
198
|
+
});
|
|
199
|
+
const how = await Promise.race([
|
|
200
|
+
deps.waitForEnter(stop.signal).then(() => 'enter'),
|
|
201
|
+
closed,
|
|
202
|
+
]);
|
|
203
|
+
stop.abort();
|
|
204
|
+
await host.dispose().catch(() => undefined);
|
|
205
|
+
try {
|
|
206
|
+
new mod.BrowserProfileStore(home).markLogin(profile);
|
|
207
|
+
}
|
|
208
|
+
catch {
|
|
209
|
+
// A window closed before the profile was written has nothing to mark.
|
|
210
|
+
}
|
|
211
|
+
ctx.formatter.print({
|
|
212
|
+
text: `${how === 'closed' ? 'Window closed' : 'Done'}. Profile ${profile} keeps what you signed in to; the agent uses it when the profile is selected (browser.defaultProfile, or /browser profile ${profile}), and a scheduled job when it is given the profile (namzu schedule add … --browser ${profile}).`,
|
|
213
|
+
});
|
|
214
|
+
return EXIT_OK;
|
|
215
|
+
}
|
|
216
|
+
async function listCommand(ctx, argv, deps) {
|
|
217
|
+
const args = parseArgs(argv, ['home', 'json!']);
|
|
218
|
+
if (args.unknown.length > 0 || args.positionals.length > 0) {
|
|
219
|
+
ctx.formatter.error({ message: 'usage: namzu browser list [--json]' });
|
|
220
|
+
return EXIT_USAGE;
|
|
221
|
+
}
|
|
222
|
+
const mod = await deps.load();
|
|
223
|
+
const home = homeOf(args, deps);
|
|
224
|
+
const leases = new mod.BrowserLeaseStore(home);
|
|
225
|
+
const profiles = new mod.BrowserProfileStore(home).list().map((profile) => ({
|
|
226
|
+
...profile,
|
|
227
|
+
inUse: leases.holders(profile.name).length > 0,
|
|
228
|
+
}));
|
|
229
|
+
if (has(args, 'json') || ctx.formatter.name !== 'text') {
|
|
230
|
+
const payload = { v: 1, profiles };
|
|
231
|
+
ctx.formatter.print(ctx.formatter.name === 'text' ? JSON.stringify(payload, null, 2) : payload);
|
|
232
|
+
return EXIT_OK;
|
|
233
|
+
}
|
|
234
|
+
if (profiles.length === 0) {
|
|
235
|
+
ctx.formatter.print('No browser profiles yet. Make one with `namzu browser login <profile> <url>`.');
|
|
236
|
+
return EXIT_OK;
|
|
237
|
+
}
|
|
238
|
+
ctx.formatter.print(profiles
|
|
239
|
+
.map((p) => `${p.name} ${browserName(p.browser)} (${p.engine})${p.inUse ? ' in use' : ''}\n ${p.lastLoginAt ? `last sign-in ${p.lastLoginAt}` : 'never signed in'} · created ${p.createdAt}`)
|
|
240
|
+
.join('\n'));
|
|
241
|
+
return EXIT_OK;
|
|
242
|
+
}
|
|
243
|
+
async function statusCommand(ctx, argv, deps) {
|
|
244
|
+
const args = parseArgs(argv, ['home', 'json!']);
|
|
245
|
+
const [profile, ...extra] = args.positionals;
|
|
246
|
+
if (args.unknown.length > 0 || extra.length > 0) {
|
|
247
|
+
ctx.formatter.error({ message: 'usage: namzu browser status [profile] [--json]' });
|
|
248
|
+
return EXIT_USAGE;
|
|
249
|
+
}
|
|
250
|
+
if (profile !== undefined && !isBrowserProfileName(profile)) {
|
|
251
|
+
ctx.formatter.error({ message: `"${profile}" is not a profile name.` });
|
|
252
|
+
return EXIT_USAGE;
|
|
253
|
+
}
|
|
254
|
+
const mod = await deps.load();
|
|
255
|
+
const home = homeOf(args, deps);
|
|
256
|
+
const plan = detectPlan(mod, ctx, deps);
|
|
257
|
+
const browser = ctx.config.browser;
|
|
258
|
+
const descriptor = profile ? new mod.BrowserProfileStore(home).get(profile) : undefined;
|
|
259
|
+
const holders = profile ? new mod.BrowserLeaseStore(home).holders(profile) : [];
|
|
260
|
+
const payload = {
|
|
261
|
+
v: 1,
|
|
262
|
+
engine: engineLabel(plan),
|
|
263
|
+
browser: plan.browser,
|
|
264
|
+
headless: plan.headless,
|
|
265
|
+
...(plan.unavailableReason !== undefined ? { unavailableReason: plan.unavailableReason } : {}),
|
|
266
|
+
warnings: plan.warnings,
|
|
267
|
+
enabled: browser?.enabled !== false,
|
|
268
|
+
defaultProfile: browser?.defaultProfile ?? 'default',
|
|
269
|
+
sites: browser?.sites ?? { '*': 'ask' },
|
|
270
|
+
...(profile ? { profile: descriptor ?? null, inUse: holders.length > 0 } : {}),
|
|
271
|
+
};
|
|
272
|
+
if (has(args, 'json') || ctx.formatter.name !== 'text') {
|
|
273
|
+
ctx.formatter.print(ctx.formatter.name === 'text' ? JSON.stringify(payload, null, 2) : payload);
|
|
274
|
+
return plan.unavailableReason !== undefined ? EXIT_UNAVAILABLE : EXIT_OK;
|
|
275
|
+
}
|
|
276
|
+
const lines = [
|
|
277
|
+
`Engine: ${describeBrowserPlan(plan)}`,
|
|
278
|
+
...(plan.unavailableReason !== undefined ? [`Unavailable: ${plan.unavailableReason}`] : []),
|
|
279
|
+
...plan.warnings.map((w) => `Note: ${w}`),
|
|
280
|
+
`Browser tools: ${payload.enabled ? 'on in the interactive terminal' : 'off (browser.enabled: false)'}`,
|
|
281
|
+
`Default profile: ${payload.defaultProfile}`,
|
|
282
|
+
`Sites: ${Object.entries(payload.sites)
|
|
283
|
+
.map(([site, level]) => `${site} ${level}`)
|
|
284
|
+
.join(' · ')}`,
|
|
285
|
+
];
|
|
286
|
+
if (profile) {
|
|
287
|
+
lines.push(descriptor
|
|
288
|
+
? `Profile ${profile}: ${browserName(descriptor.browser)} (${descriptor.engine}) · ${descriptor.lastLoginAt ? `last sign-in ${descriptor.lastLoginAt}` : 'never signed in'}${holders.length > 0 ? ' · in use' : ''}\n ${descriptor.userDataDir}`
|
|
289
|
+
: `Profile ${profile}: does not exist yet. \`namzu browser login ${profile} <url>\` makes it.`);
|
|
290
|
+
}
|
|
291
|
+
ctx.formatter.print(lines.join('\n'));
|
|
292
|
+
return plan.unavailableReason !== undefined ? EXIT_UNAVAILABLE : EXIT_OK;
|
|
293
|
+
}
|
|
294
|
+
async function installCommand(ctx, argv, deps) {
|
|
295
|
+
const args = parseArgs(argv, ['dry-run!', 'force!']);
|
|
296
|
+
if (args.unknown.length > 0 || args.positionals.length > 0) {
|
|
297
|
+
ctx.formatter.error({ message: 'usage: namzu browser install [--dry-run] [--force]' });
|
|
298
|
+
return EXIT_USAGE;
|
|
299
|
+
}
|
|
300
|
+
const mod = await deps.load();
|
|
301
|
+
const plan = detectPlan(mod, ctx, deps);
|
|
302
|
+
if (plan.browser !== 'chromium' && plan.unavailableReason === undefined && !has(args, 'force')) {
|
|
303
|
+
ctx.formatter.print(`Nothing to install: the browser tools drive ${describeBrowserPlan(plan)}. Pass --force to download Playwright’s Chromium anyway.`);
|
|
304
|
+
return EXIT_OK;
|
|
305
|
+
}
|
|
306
|
+
ctx.formatter.info(`Downloading Chromium for playwright-core ${mod.PLAYWRIGHT_CORE_VERSION}…`);
|
|
307
|
+
const code = await deps.spawnInstall(has(args, 'dry-run') ? ['--dry-run'] : []);
|
|
308
|
+
return code === 0 ? EXIT_OK : EXIT_FAIL;
|
|
309
|
+
}
|
|
310
|
+
async function removeCommand(ctx, argv, deps) {
|
|
311
|
+
const args = parseArgs(argv, ['home', 'yes!']);
|
|
312
|
+
const [profile, ...extra] = args.positionals;
|
|
313
|
+
if (args.unknown.length > 0 || !profile || extra.length > 0) {
|
|
314
|
+
ctx.formatter.error({ message: 'usage: namzu browser remove <profile> [--yes]' });
|
|
315
|
+
return EXIT_USAGE;
|
|
316
|
+
}
|
|
317
|
+
if (!isBrowserProfileName(profile)) {
|
|
318
|
+
ctx.formatter.error({ message: `"${profile}" is not a profile name.` });
|
|
319
|
+
return EXIT_USAGE;
|
|
320
|
+
}
|
|
321
|
+
const mod = await deps.load();
|
|
322
|
+
const home = homeOf(args, deps);
|
|
323
|
+
const store = new mod.BrowserProfileStore(home);
|
|
324
|
+
const descriptor = store.get(profile);
|
|
325
|
+
if (!descriptor) {
|
|
326
|
+
ctx.formatter.error({ message: `There is no browser profile "${profile}".` });
|
|
327
|
+
return EXIT_FAIL;
|
|
328
|
+
}
|
|
329
|
+
if (!has(args, 'yes')) {
|
|
330
|
+
if (!interactive()) {
|
|
331
|
+
ctx.formatter.error({
|
|
332
|
+
message: `Removing profile ${profile} deletes everything signed in to it. Pass --yes to confirm.`,
|
|
333
|
+
});
|
|
334
|
+
return EXIT_USAGE;
|
|
335
|
+
}
|
|
336
|
+
const answer = await new Promise((resolve) => {
|
|
337
|
+
const rl = createInterface({ input: process.stdin, output: process.stderr });
|
|
338
|
+
rl.question(`Delete browser profile ${profile} (${descriptor.userDataDir}) and every sign-in in it? [y/N] `, (text) => {
|
|
339
|
+
rl.close();
|
|
340
|
+
resolve(text);
|
|
341
|
+
});
|
|
342
|
+
});
|
|
343
|
+
if (!/^y(es)?$/i.test(answer.trim())) {
|
|
344
|
+
ctx.formatter.print('Kept.');
|
|
345
|
+
return EXIT_OK;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
const plan = detectPlan(mod, ctx, deps);
|
|
349
|
+
try {
|
|
350
|
+
store.remove(profile, new mod.BrowserLeaseStore(home), {
|
|
351
|
+
...(plan.engine === 'windows-cdp' ? { mountRoot: plan.mountRoot } : {}),
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
catch (error) {
|
|
355
|
+
ctx.formatter.error({ message: errorText(error) });
|
|
356
|
+
return EXIT_FAIL;
|
|
357
|
+
}
|
|
358
|
+
ctx.formatter.print(`Removed browser profile ${profile}.`);
|
|
359
|
+
return EXIT_OK;
|
|
360
|
+
}
|
|
361
|
+
//# sourceMappingURL=commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/browser/commands.ts"],"names":[],"m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