@tryglen/cli 0.37.1 → 0.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -4
- package/dist/_generated/contract/index.js +3 -0
- package/dist/_generated/contract/index.js.map +1 -0
- package/dist/_generated/contract/procedures.gen.js +34 -0
- package/dist/_generated/contract/procedures.gen.js.map +1 -0
- package/dist/_generated/contract/types.gen.js +3 -0
- package/dist/_generated/contract/types.gen.js.map +1 -0
- package/dist/_generated/contract/zod.gen.js +799 -0
- package/dist/_generated/contract/zod.gen.js.map +1 -0
- package/dist/bin.js +137 -560
- package/dist/bin.js.map +1 -1
- package/dist/clients/agents/agent-bin.js +67 -0
- package/dist/clients/agents/agent-bin.js.map +1 -0
- package/dist/clients/agents/agent-path-overrides.js +23 -0
- package/dist/clients/agents/agent-path-overrides.js.map +1 -0
- package/dist/clients/agents/agents-table.js +91 -0
- package/dist/clients/agents/agents-table.js.map +1 -0
- package/dist/{_utils → clients/agents}/managed-block.js +8 -4
- package/dist/clients/agents/managed-block.js.map +1 -0
- package/dist/clients/agents/normalize-transcript-timestamp.js.map +1 -0
- package/dist/clients/agents/plugin-status.js +74 -0
- package/dist/clients/agents/plugin-status.js.map +1 -0
- package/dist/clients/agents/run-agent-steps.js +21 -0
- package/dist/clients/agents/run-agent-steps.js.map +1 -0
- package/dist/{_utils → clients/claude}/extract-claude-segments.js +9 -5
- package/dist/clients/claude/extract-claude-segments.js.map +1 -0
- package/dist/clients/claude/parse-claude-transcript.js +114 -0
- package/dist/clients/claude/parse-claude-transcript.js.map +1 -0
- package/dist/clients/codex/codex-app-server.js +102 -0
- package/dist/clients/codex/codex-app-server.js.map +1 -0
- package/dist/clients/codex/codex-hooks-file.js +65 -0
- package/dist/clients/codex/codex-hooks-file.js.map +1 -0
- package/dist/clients/codex/codex-hooks-merge.js +9 -0
- package/dist/clients/codex/codex-hooks-merge.js.map +1 -0
- package/dist/clients/codex/codex-hooks-setup.js +167 -0
- package/dist/clients/codex/codex-hooks-setup.js.map +1 -0
- package/dist/clients/codex/codex-paths.js +13 -0
- package/dist/clients/codex/codex-paths.js.map +1 -0
- package/dist/clients/codex/codex-repair-trace.js +36 -0
- package/dist/clients/codex/codex-repair-trace.js.map +1 -0
- package/dist/clients/codex/codex-rules-setup.js +27 -0
- package/dist/clients/codex/codex-rules-setup.js.map +1 -0
- package/dist/{_utils → clients/codex}/codex-trust-toml.js +6 -5
- package/dist/clients/codex/codex-trust-toml.js.map +1 -0
- package/dist/clients/codex/extract-codex-segments.js +64 -0
- package/dist/clients/codex/extract-codex-segments.js.map +1 -0
- package/dist/clients/codex/parse-codex-transcript.js +123 -0
- package/dist/clients/codex/parse-codex-transcript.js.map +1 -0
- package/dist/clients/cursor/parse-cursor-db.js +185 -0
- package/dist/clients/cursor/parse-cursor-db.js.map +1 -0
- package/dist/clients/git/canonical-remote-url.js +13 -0
- package/dist/clients/git/canonical-remote-url.js.map +1 -0
- package/dist/clients/git/git-context.js +60 -0
- package/dist/clients/git/git-context.js.map +1 -0
- package/dist/clients/git/git-hook-setup.js +128 -0
- package/dist/clients/git/git-hook-setup.js.map +1 -0
- package/dist/{_utils → clients/git}/pr-review-link.js +5 -4
- package/dist/clients/git/pr-review-link.js.map +1 -0
- package/dist/clients/glen-api/config.js +11 -0
- package/dist/clients/glen-api/config.js.map +1 -0
- package/dist/clients/glen-api/glen-api.js +199 -0
- package/dist/clients/glen-api/glen-api.js.map +1 -0
- package/dist/{_utils → clients/glen-api}/glen-headers.js +1 -1
- package/dist/clients/glen-api/glen-headers.js.map +1 -0
- package/dist/clients/glen-api/refresh-control-state.js +18 -0
- package/dist/clients/glen-api/refresh-control-state.js.map +1 -0
- package/dist/clients/glen-api/report-cli-install.js +20 -0
- package/dist/clients/glen-api/report-cli-install.js.map +1 -0
- package/dist/clients/glen-api/sync-mode-from-server.js +45 -0
- package/dist/clients/glen-api/sync-mode-from-server.js.map +1 -0
- package/dist/clients/indicator/indicator-app.js +127 -0
- package/dist/clients/indicator/indicator-app.js.map +1 -0
- package/dist/clients/indicator/indicator-health.js +40 -0
- package/dist/clients/indicator/indicator-health.js.map +1 -0
- package/dist/clients/jcode/jcode-bundle.js +19 -0
- package/dist/clients/jcode/jcode-bundle.js.map +1 -0
- package/dist/clients/jcode/jcode-event.js +74 -0
- package/dist/clients/jcode/jcode-event.js.map +1 -0
- package/dist/{_utils → clients/jcode}/jcode-hook-lines.js +1 -1
- package/dist/clients/jcode/jcode-hook-lines.js.map +1 -0
- package/dist/{_utils → clients/jcode}/jcode-hooks-toml.js +21 -29
- package/dist/clients/jcode/jcode-hooks-toml.js.map +1 -0
- package/dist/clients/jcode/jcode-paths.js +14 -0
- package/dist/clients/jcode/jcode-paths.js.map +1 -0
- package/dist/clients/jcode/jcode-setup.js +148 -0
- package/dist/clients/jcode/jcode-setup.js.map +1 -0
- package/dist/clients/jcode/jcode-skills-sync.js +84 -0
- package/dist/clients/jcode/jcode-skills-sync.js.map +1 -0
- package/dist/{_utils → clients/jcode}/parse-jcode-session.js +38 -35
- package/dist/clients/jcode/parse-jcode-session.js.map +1 -0
- package/dist/clients/npm/semver-newer.js +8 -0
- package/dist/clients/npm/semver-newer.js.map +1 -0
- package/dist/clients/npm/update.js +147 -0
- package/dist/clients/npm/update.js.map +1 -0
- package/dist/{_utils → clients/pi}/extract-pi-segments.js +7 -3
- package/dist/clients/pi/extract-pi-segments.js.map +1 -0
- package/dist/clients/pi/parse-pi-transcript.js +149 -0
- package/dist/clients/pi/parse-pi-transcript.js.map +1 -0
- package/dist/clients/telemetry/send-events.js +32 -0
- package/dist/clients/telemetry/send-events.js.map +1 -0
- package/dist/commands/_utils/forget-or-restore-observation-or-message.js +41 -0
- package/dist/commands/_utils/forget-or-restore-observation-or-message.js.map +1 -0
- package/dist/commands/artifact/_utils/explain-artifact-error.js +31 -0
- package/dist/commands/artifact/_utils/explain-artifact-error.js.map +1 -0
- package/dist/commands/artifact/_utils/require-slug.js +14 -0
- package/dist/commands/artifact/_utils/require-slug.js.map +1 -0
- package/dist/commands/artifact/artifact.options.js +43 -0
- package/dist/commands/artifact/artifact.options.js.map +1 -0
- package/dist/commands/artifact/create.js +87 -0
- package/dist/commands/artifact/create.js.map +1 -0
- package/dist/commands/artifact/delete.js +18 -0
- package/dist/commands/artifact/delete.js.map +1 -0
- package/dist/commands/artifact/get.js +21 -0
- package/dist/commands/artifact/get.js.map +1 -0
- package/dist/commands/artifact/list.js +4 -0
- package/dist/commands/artifact/list.js.map +1 -0
- package/dist/commands/artifact/search.js +25 -0
- package/dist/commands/artifact/search.js.map +1 -0
- package/dist/commands/artifact/share.js +42 -0
- package/dist/commands/artifact/share.js.map +1 -0
- package/dist/commands/code-search/code-search.options.js +10 -0
- package/dist/commands/code-search/code-search.options.js.map +1 -0
- package/dist/commands/code-search/index.js +106 -0
- package/dist/commands/code-search/index.js.map +1 -0
- package/dist/commands/dependency/dependency.options.js +10 -0
- package/dist/commands/dependency/dependency.options.js.map +1 -0
- package/dist/commands/dependency/index.js +25 -0
- package/dist/commands/dependency/index.js.map +1 -0
- package/dist/{_utils → commands/doctor/_utils}/ingest-diagnosis.js +16 -17
- package/dist/commands/doctor/_utils/ingest-diagnosis.js.map +1 -0
- package/dist/commands/doctor/_utils/login-check.js +48 -0
- package/dist/commands/doctor/_utils/login-check.js.map +1 -0
- package/dist/commands/doctor/doctor.options.js +17 -0
- package/dist/commands/doctor/doctor.options.js.map +1 -0
- package/dist/commands/doctor/index.js +366 -0
- package/dist/commands/doctor/index.js.map +1 -0
- package/dist/commands/feedback/feedback.options.js +82 -0
- package/dist/commands/feedback/feedback.options.js.map +1 -0
- package/dist/commands/feedback/index.js +64 -0
- package/dist/commands/feedback/index.js.map +1 -0
- package/dist/commands/forget/forget.options.js +12 -0
- package/dist/commands/forget/forget.options.js.map +1 -0
- package/dist/commands/forget/index.js +30 -0
- package/dist/commands/forget/index.js.map +1 -0
- package/dist/commands/git-hooks/git-hooks.options.js +17 -0
- package/dist/commands/git-hooks/git-hooks.options.js.map +1 -0
- package/dist/commands/git-hooks/index.js +21 -0
- package/dist/commands/git-hooks/index.js.map +1 -0
- package/dist/commands/git-hooks/write-commit-trailer.js +38 -0
- package/dist/commands/git-hooks/write-commit-trailer.js.map +1 -0
- package/dist/commands/import/_utils/collect-import-files.js +54 -0
- package/dist/commands/import/_utils/collect-import-files.js.map +1 -0
- package/dist/commands/import/_utils/detect-transcript-format.js +46 -0
- package/dist/commands/import/_utils/detect-transcript-format.js.map +1 -0
- package/dist/{_utils → commands/import/_utils}/parse-harbor-atif.js +28 -51
- package/dist/commands/import/_utils/parse-harbor-atif.js.map +1 -0
- package/dist/{_utils → commands/import/_utils}/resolve-import-workspace.js +12 -17
- package/dist/commands/import/_utils/resolve-import-workspace.js.map +1 -0
- package/dist/{_utils → commands/import/_utils}/transcript-turns.js +47 -52
- package/dist/commands/import/_utils/transcript-turns.js.map +1 -0
- package/dist/commands/import/import.options.js +18 -0
- package/dist/commands/import/import.options.js.map +1 -0
- package/dist/commands/import/import.schema.js +28 -0
- package/dist/commands/import/import.schema.js.map +1 -0
- package/dist/commands/import/index.js +284 -0
- package/dist/commands/import/index.js.map +1 -0
- package/dist/commands/incognito/incognito.options.js +7 -0
- package/dist/commands/incognito/incognito.options.js.map +1 -0
- package/dist/commands/incognito/index.js +5 -0
- package/dist/commands/incognito/index.js.map +1 -0
- package/dist/commands/indicator/index.js +59 -0
- package/dist/commands/indicator/index.js.map +1 -0
- package/dist/commands/indicator/indicator.options.js +7 -0
- package/dist/commands/indicator/indicator.options.js.map +1 -0
- package/dist/commands/ingest/_utils/agent-adapter.js +37 -0
- package/dist/commands/ingest/_utils/agent-adapter.js.map +1 -0
- package/dist/{_utils → commands/ingest/_utils}/build-turn-body.js +8 -6
- package/dist/commands/ingest/_utils/build-turn-body.js.map +1 -0
- package/dist/{_utils → commands/ingest/_utils}/format-turn-nudges.js +14 -31
- package/dist/commands/ingest/_utils/format-turn-nudges.js.map +1 -0
- package/dist/commands/ingest/_utils/idempotency-key.js +4 -0
- package/dist/commands/ingest/_utils/idempotency-key.js.map +1 -0
- package/dist/commands/ingest/_utils/ingest-failure-memo.js +58 -0
- package/dist/commands/ingest/_utils/ingest-failure-memo.js.map +1 -0
- package/dist/commands/ingest/_utils/parse-transcript.js +76 -0
- package/dist/commands/ingest/_utils/parse-transcript.js.map +1 -0
- package/dist/commands/ingest/_utils/turn-cache.js +73 -0
- package/dist/commands/ingest/_utils/turn-cache.js.map +1 -0
- package/dist/commands/ingest/index.js +379 -0
- package/dist/commands/ingest/index.js.map +1 -0
- package/dist/commands/ingest/ingest.options.js +13 -0
- package/dist/commands/ingest/ingest.options.js.map +1 -0
- package/dist/commands/install/_utils/claude-statusline.js +58 -0
- package/dist/commands/install/_utils/claude-statusline.js.map +1 -0
- package/dist/commands/install/_utils/codex-post-install.js +56 -0
- package/dist/commands/install/_utils/codex-post-install.js.map +1 -0
- package/dist/{_utils → commands/install/_utils}/ensure-global-cli.js +49 -52
- package/dist/commands/install/_utils/ensure-global-cli.js.map +1 -0
- package/dist/commands/install/_utils/finish-install.js +67 -0
- package/dist/commands/install/_utils/finish-install.js.map +1 -0
- package/dist/commands/install/_utils/jcode-install.js +29 -0
- package/dist/commands/install/_utils/jcode-install.js.map +1 -0
- package/dist/{_utils → commands/install/_utils}/npm-error-cause.js +1 -2
- package/dist/commands/install/_utils/npm-error-cause.js.map +1 -0
- package/dist/commands/install/_utils/prepare-machine.js +85 -0
- package/dist/commands/install/_utils/prepare-machine.js.map +1 -0
- package/dist/commands/install/codex-hooks-repair.js +17 -0
- package/dist/commands/install/codex-hooks-repair.js.map +1 -0
- package/dist/commands/install/index.js +186 -0
- package/dist/commands/install/index.js.map +1 -0
- package/dist/commands/install/install.options.js +41 -0
- package/dist/commands/install/install.options.js.map +1 -0
- package/dist/commands/invite/index.js +47 -0
- package/dist/commands/invite/index.js.map +1 -0
- package/dist/commands/invite/invite.options.js +24 -0
- package/dist/commands/invite/invite.options.js.map +1 -0
- package/dist/commands/login/_utils/open-browser.js +9 -0
- package/dist/commands/login/_utils/open-browser.js.map +1 -0
- package/dist/commands/login/_utils/parse-start.js +25 -0
- package/dist/commands/login/_utils/parse-start.js.map +1 -0
- package/dist/commands/login/_utils/poll-for-approval.js +55 -0
- package/dist/commands/login/_utils/poll-for-approval.js.map +1 -0
- package/dist/commands/login/index.js +101 -0
- package/dist/commands/login/index.js.map +1 -0
- package/dist/commands/login/login.options.js +12 -0
- package/dist/commands/login/login.options.js.map +1 -0
- package/dist/commands/logout/index.js +16 -0
- package/dist/commands/logout/index.js.map +1 -0
- package/dist/commands/logout/logout.options.js +4 -0
- package/dist/commands/logout/logout.options.js.map +1 -0
- package/dist/commands/onboard/index.js +20 -0
- package/dist/commands/onboard/index.js.map +1 -0
- package/dist/commands/org/_utils/apply-switch.js +37 -0
- package/dist/commands/org/_utils/apply-switch.js.map +1 -0
- package/dist/commands/org/_utils/fetch-orgs.js +19 -0
- package/dist/commands/org/_utils/fetch-orgs.js.map +1 -0
- package/dist/commands/org/list.js +14 -0
- package/dist/commands/org/list.js.map +1 -0
- package/dist/commands/org/org.options.js +10 -0
- package/dist/commands/org/org.options.js.map +1 -0
- package/dist/commands/org/switch.js +37 -0
- package/dist/commands/org/switch.js.map +1 -0
- package/dist/commands/pr-link/_utils/is-commit-command.js +14 -0
- package/dist/commands/pr-link/_utils/is-commit-command.js.map +1 -0
- package/dist/commands/pr-link/_utils/record-commit-anchor.js +46 -0
- package/dist/commands/pr-link/_utils/record-commit-anchor.js.map +1 -0
- package/dist/commands/pr-link/index.js +74 -0
- package/dist/commands/pr-link/index.js.map +1 -0
- package/dist/commands/pr-link/pr-link.options.js +13 -0
- package/dist/commands/pr-link/pr-link.options.js.map +1 -0
- package/dist/commands/restore/index.js +27 -0
- package/dist/commands/restore/index.js.map +1 -0
- package/dist/commands/restore/restore.options.js +12 -0
- package/dist/commands/restore/restore.options.js.map +1 -0
- package/dist/{_utils → commands/search/_utils}/format-search-result.js +5 -4
- package/dist/commands/search/_utils/format-search-result.js.map +1 -0
- package/dist/commands/search/_utils/runtime-timezone.js +12 -0
- package/dist/commands/search/_utils/runtime-timezone.js.map +1 -0
- package/dist/commands/search/index.js +36 -0
- package/dist/commands/search/index.js.map +1 -0
- package/dist/commands/search/search.options.js +7 -0
- package/dist/commands/search/search.options.js.map +1 -0
- package/dist/commands/session-start/index.js +119 -0
- package/dist/commands/session-start/index.js.map +1 -0
- package/dist/commands/session-start/session-start.options.js +13 -0
- package/dist/commands/session-start/session-start.options.js.map +1 -0
- package/dist/commands/set-mode/index.js +38 -0
- package/dist/commands/set-mode/index.js.map +1 -0
- package/dist/commands/set-mode/set-mode.options.js +8 -0
- package/dist/commands/set-mode/set-mode.options.js.map +1 -0
- package/dist/commands/skill/_utils/download-file.js +28 -0
- package/dist/commands/skill/_utils/download-file.js.map +1 -0
- package/dist/commands/skill/_utils/explain-skill-error.js +31 -0
- package/dist/commands/skill/_utils/explain-skill-error.js.map +1 -0
- package/dist/commands/skill/_utils/skill-cache.js +136 -0
- package/dist/commands/skill/_utils/skill-cache.js.map +1 -0
- package/dist/commands/skill/create/_utils/pack-skill-dir.js +160 -0
- package/dist/commands/skill/create/_utils/pack-skill-dir.js.map +1 -0
- package/dist/commands/skill/create/index.js +108 -0
- package/dist/commands/skill/create/index.js.map +1 -0
- package/dist/commands/skill/search.js +38 -0
- package/dist/commands/skill/search.js.map +1 -0
- package/dist/commands/skill/share.js +52 -0
- package/dist/commands/skill/share.js.map +1 -0
- package/dist/commands/skill/skill.options.js +58 -0
- package/dist/commands/skill/skill.options.js.map +1 -0
- package/dist/commands/skill/use.js +72 -0
- package/dist/commands/skill/use.js.map +1 -0
- package/dist/commands/status/index.js +33 -0
- package/dist/commands/status/index.js.map +1 -0
- package/dist/commands/status/status.options.js +4 -0
- package/dist/commands/status/status.options.js.map +1 -0
- package/dist/commands/statusline/index.js +33 -0
- package/dist/commands/statusline/index.js.map +1 -0
- package/dist/commands/statusline/statusline.options.js +4 -0
- package/dist/commands/statusline/statusline.options.js.map +1 -0
- package/dist/commands/suggestions/index.js +36 -0
- package/dist/commands/suggestions/index.js.map +1 -0
- package/dist/commands/suggestions/suggestions.options.js +12 -0
- package/dist/commands/suggestions/suggestions.options.js.map +1 -0
- package/dist/commands/takeover/_utils/agent-paths.js +13 -7
- package/dist/commands/takeover/_utils/agent-paths.js.map +1 -1
- package/dist/commands/takeover/_utils/agent-process.js +111 -0
- package/dist/commands/takeover/_utils/agent-process.js.map +1 -0
- package/dist/commands/takeover/_utils/archive-codex-desktop-thread.js +17 -58
- package/dist/commands/takeover/_utils/archive-codex-desktop-thread.js.map +1 -1
- package/dist/commands/takeover/_utils/canonical-digest.js +2 -2
- package/dist/commands/takeover/_utils/canonical-digest.js.map +1 -1
- package/dist/commands/takeover/_utils/codex-desktop-recovery.js +77 -95
- package/dist/commands/takeover/_utils/codex-desktop-recovery.js.map +1 -1
- package/dist/commands/takeover/_utils/context-fit.js +7 -4
- package/dist/commands/takeover/_utils/context-fit.js.map +1 -1
- package/dist/commands/takeover/_utils/cursor-store.js +333 -281
- package/dist/commands/takeover/_utils/cursor-store.js.map +1 -1
- package/dist/commands/takeover/_utils/import-codex-desktop-thread.js +138 -282
- package/dist/commands/takeover/_utils/import-codex-desktop-thread.js.map +1 -1
- package/dist/commands/takeover/_utils/launch-desktop-url.js +19 -24
- package/dist/commands/takeover/_utils/launch-desktop-url.js.map +1 -1
- package/dist/commands/takeover/_utils/native-file.js +86 -73
- package/dist/commands/takeover/_utils/native-file.js.map +1 -1
- package/dist/commands/takeover/_utils/probe-agent.js +12 -9
- package/dist/commands/takeover/_utils/probe-agent.js.map +1 -1
- package/dist/commands/takeover/_utils/staged-session.js +18 -17
- package/dist/commands/takeover/_utils/staged-session.js.map +1 -1
- package/dist/commands/takeover/_utils/write-claude-session.js +10 -13
- package/dist/commands/takeover/_utils/write-claude-session.js.map +1 -1
- package/dist/commands/takeover/_utils/write-codex-desktop-session.js +39 -37
- package/dist/commands/takeover/_utils/write-codex-desktop-session.js.map +1 -1
- package/dist/commands/takeover/_utils/write-codex-session.js +34 -25
- package/dist/commands/takeover/_utils/write-codex-session.js.map +1 -1
- package/dist/commands/takeover/_utils/write-cursor-session.js +8 -19
- package/dist/commands/takeover/_utils/write-cursor-session.js.map +1 -1
- package/dist/commands/takeover/_utils/write-pi-session.js +34 -22
- package/dist/commands/takeover/_utils/write-pi-session.js.map +1 -1
- package/dist/commands/takeover/index.js +129 -164
- package/dist/commands/takeover/index.js.map +1 -1
- package/dist/commands/takeover/takeover.options.js +6 -0
- package/dist/commands/takeover/takeover.options.js.map +1 -0
- package/dist/commands/takeover/takeover.schema.js +17 -55
- package/dist/commands/takeover/takeover.schema.js.map +1 -1
- package/dist/commands/telemetry/index.js +33 -0
- package/dist/commands/telemetry/index.js.map +1 -0
- package/dist/commands/telemetry/send.js +7 -0
- package/dist/commands/telemetry/send.js.map +1 -0
- package/dist/commands/telemetry/telemetry.options.js +12 -0
- package/dist/commands/telemetry/telemetry.options.js.map +1 -0
- package/dist/commands/uninstall/_utils/purge-agent-plugins.js +58 -0
- package/dist/commands/uninstall/_utils/purge-agent-plugins.js.map +1 -0
- package/dist/commands/uninstall/_utils/purge-claude-statusline.js +51 -0
- package/dist/commands/uninstall/_utils/purge-claude-statusline.js.map +1 -0
- package/dist/commands/uninstall/_utils/purge-local-state.js +52 -0
- package/dist/commands/uninstall/_utils/purge-local-state.js.map +1 -0
- package/dist/commands/uninstall/index.js +138 -0
- package/dist/commands/uninstall/index.js.map +1 -0
- package/dist/commands/uninstall/uninstall.options.js +4 -0
- package/dist/commands/uninstall/uninstall.options.js.map +1 -0
- package/dist/commands/update/index.js +117 -0
- package/dist/commands/update/index.js.map +1 -0
- package/dist/commands/update/self-update.js +7 -0
- package/dist/commands/update/self-update.js.map +1 -0
- package/dist/commands/update/update.options.js +7 -0
- package/dist/commands/update/update.options.js.map +1 -0
- package/dist/core/errors/cli-error.js +28 -0
- package/dist/core/errors/cli-error.js.map +1 -0
- package/dist/core/errors/result.js +21 -0
- package/dist/core/errors/result.js.map +1 -0
- package/dist/core/errors/settle.js +18 -0
- package/dist/core/errors/settle.js.map +1 -0
- package/dist/core/json/is-record.js +3 -0
- package/dist/core/json/is-record.js.map +1 -0
- package/dist/core/json/json-field.js +5 -0
- package/dist/core/json/json-field.js.map +1 -0
- package/dist/core/json/jsonl-records.js +15 -0
- package/dist/core/json/jsonl-records.js.map +1 -0
- package/dist/core/json/parse-json.js +4 -0
- package/dist/core/json/parse-json.js.map +1 -0
- package/dist/core/run/cli-input.js +116 -0
- package/dist/core/run/cli-input.js.map +1 -0
- package/dist/core/run/hook-agents.js +4 -0
- package/dist/core/run/hook-agents.js.map +1 -0
- package/dist/{_utils → core/run}/normalize-boolean-flags.js +0 -1
- package/dist/core/run/normalize-boolean-flags.js.map +1 -0
- package/dist/core/run/run-hook.js +18 -0
- package/dist/core/run/run-hook.js.map +1 -0
- package/dist/core/run/run.js +16 -0
- package/dist/core/run/run.js.map +1 -0
- package/dist/core/state/credentials.js +34 -0
- package/dist/core/state/credentials.js.map +1 -0
- package/dist/core/state/ephemeral-session.js +11 -0
- package/dist/core/state/ephemeral-session.js.map +1 -0
- package/dist/core/state/glen-home.js +9 -0
- package/dist/core/state/glen-home.js.map +1 -0
- package/dist/core/state/ingest-heartbeat.js +56 -0
- package/dist/core/state/ingest-heartbeat.js.map +1 -0
- package/dist/core/state/install-receipt.js +174 -0
- package/dist/core/state/install-receipt.js.map +1 -0
- package/dist/core/state/session-map.js +22 -0
- package/dist/core/state/session-map.js.map +1 -0
- package/dist/core/state/state-line-memo.js +52 -0
- package/dist/core/state/state-line-memo.js.map +1 -0
- package/dist/{_utils → core/state}/state-line.js +1 -1
- package/dist/core/state/state-line.js.map +1 -0
- package/dist/core/state/state.js +51 -0
- package/dist/core/state/state.js.map +1 -0
- package/dist/core/system/env.js +74 -0
- package/dist/core/system/env.js.map +1 -0
- package/dist/core/system/files.js +102 -0
- package/dist/core/system/files.js.map +1 -0
- package/dist/core/system/glen-base-url.js +4 -0
- package/dist/core/system/glen-base-url.js.map +1 -0
- package/dist/core/system/http.js +146 -0
- package/dist/core/system/http.js.map +1 -0
- package/dist/core/system/run-program.js +55 -0
- package/dist/core/system/run-program.js.map +1 -0
- package/dist/core/system/sha256-hex.js +4 -0
- package/dist/core/system/sha256-hex.js.map +1 -0
- package/dist/{_utils → core/system}/shell-profile.js +43 -56
- package/dist/core/system/shell-profile.js.map +1 -0
- package/dist/core/system/spawn-detached.js +10 -0
- package/dist/core/system/spawn-detached.js.map +1 -0
- package/dist/core/system/spawn-self.js +5 -0
- package/dist/core/system/spawn-self.js.map +1 -0
- package/dist/core/system/sqlite.js +55 -0
- package/dist/core/system/sqlite.js.map +1 -0
- package/dist/core/system/version.js +16 -0
- package/dist/core/system/version.js.map +1 -0
- package/dist/core/telemetry/build-event.js +27 -0
- package/dist/core/telemetry/build-event.js.map +1 -0
- package/dist/core/telemetry/events-store.js +62 -0
- package/dist/core/telemetry/events-store.js.map +1 -0
- package/dist/core/telemetry/finish-telemetry.js +32 -0
- package/dist/core/telemetry/finish-telemetry.js.map +1 -0
- package/dist/core/telemetry/install-id.js +18 -0
- package/dist/core/telemetry/install-id.js.map +1 -0
- package/dist/core/telemetry/note-if-err.js +8 -0
- package/dist/core/telemetry/note-if-err.js.map +1 -0
- package/dist/core/telemetry/record-event.js +7 -0
- package/dist/core/telemetry/record-event.js.map +1 -0
- package/dist/core/telemetry/telemetry-context.js +10 -0
- package/dist/core/telemetry/telemetry-context.js.map +1 -0
- package/dist/core/telemetry/telemetry-settings.js +32 -0
- package/dist/core/telemetry/telemetry-settings.js.map +1 -0
- package/dist/core/terminal/attention-summary.js +14 -0
- package/dist/core/terminal/attention-summary.js.map +1 -0
- package/dist/core/terminal/out.js +86 -0
- package/dist/core/terminal/out.js.map +1 -0
- package/dist/core/terminal/prompt.js +34 -0
- package/dist/core/terminal/prompt.js.map +1 -0
- package/dist/core/terminal/read-hook-event.js +17 -0
- package/dist/core/terminal/read-hook-event.js.map +1 -0
- package/dist/core/terminal/read-stdin.js +23 -0
- package/dist/core/terminal/read-stdin.js.map +1 -0
- package/dist/jcode/plugin.json +1 -1
- package/dist/jcode/skills/feedback/SKILL.md +8 -8
- package/dist/jcode/skills/invite/SKILL.md +4 -4
- package/dist/jcode/skills/setup/SKILL.md +6 -4
- package/dist/macos/glen.app/Contents/MacOS/glen +0 -0
- package/package.json +16 -7
- package/dist/_utils/agent-adapter.d.ts +0 -9
- package/dist/_utils/agent-adapter.js +0 -49
- package/dist/_utils/agent-adapter.js.map +0 -1
- package/dist/_utils/agents-table.d.ts +0 -11
- package/dist/_utils/agents-table.js +0 -35
- package/dist/_utils/agents-table.js.map +0 -1
- package/dist/_utils/build-turn-body.d.ts +0 -17
- package/dist/_utils/build-turn-body.js.map +0 -1
- package/dist/_utils/cli-error.d.ts +0 -12
- package/dist/_utils/cli-error.js +0 -21
- package/dist/_utils/cli-error.js.map +0 -1
- package/dist/_utils/codex-app-server.d.ts +0 -11
- package/dist/_utils/codex-app-server.js +0 -94
- package/dist/_utils/codex-app-server.js.map +0 -1
- package/dist/_utils/codex-hooks-merge.d.ts +0 -22
- package/dist/_utils/codex-hooks-merge.js +0 -60
- package/dist/_utils/codex-hooks-merge.js.map +0 -1
- package/dist/_utils/codex-hooks-setup.d.ts +0 -14
- package/dist/_utils/codex-hooks-setup.js +0 -162
- package/dist/_utils/codex-hooks-setup.js.map +0 -1
- package/dist/_utils/codex-paths.d.ts +0 -5
- package/dist/_utils/codex-paths.js +0 -10
- package/dist/_utils/codex-paths.js.map +0 -1
- package/dist/_utils/codex-repair-trace.d.ts +0 -11
- package/dist/_utils/codex-repair-trace.js +0 -39
- package/dist/_utils/codex-repair-trace.js.map +0 -1
- package/dist/_utils/codex-rules-setup.d.ts +0 -4
- package/dist/_utils/codex-rules-setup.js +0 -34
- package/dist/_utils/codex-rules-setup.js.map +0 -1
- package/dist/_utils/codex-trust-toml.d.ts +0 -7
- package/dist/_utils/codex-trust-toml.js.map +0 -1
- package/dist/_utils/collect-import-files.d.ts +0 -4
- package/dist/_utils/collect-import-files.js +0 -50
- package/dist/_utils/collect-import-files.js.map +0 -1
- package/dist/_utils/config.d.ts +0 -45
- package/dist/_utils/config.js +0 -47
- package/dist/_utils/config.js.map +0 -1
- package/dist/_utils/confirm.d.ts +0 -7
- package/dist/_utils/confirm.js +0 -35
- package/dist/_utils/confirm.js.map +0 -1
- package/dist/_utils/credentials.d.ts +0 -15
- package/dist/_utils/credentials.js +0 -62
- package/dist/_utils/credentials.js.map +0 -1
- package/dist/_utils/detect-transcript-format.d.ts +0 -2
- package/dist/_utils/detect-transcript-format.js +0 -57
- package/dist/_utils/detect-transcript-format.js.map +0 -1
- package/dist/_utils/ensure-global-cli.d.ts +0 -4
- package/dist/_utils/ensure-global-cli.js.map +0 -1
- package/dist/_utils/ephemeral-session.d.ts +0 -2
- package/dist/_utils/ephemeral-session.js +0 -12
- package/dist/_utils/ephemeral-session.js.map +0 -1
- package/dist/_utils/extract-claude-segments.d.ts +0 -2
- package/dist/_utils/extract-claude-segments.js.map +0 -1
- package/dist/_utils/extract-codex-segments.d.ts +0 -2
- package/dist/_utils/extract-codex-segments.js +0 -65
- package/dist/_utils/extract-codex-segments.js.map +0 -1
- package/dist/_utils/extract-pi-segments.d.ts +0 -2
- package/dist/_utils/extract-pi-segments.js.map +0 -1
- package/dist/_utils/find-bin.d.ts +0 -7
- package/dist/_utils/find-bin.js +0 -89
- package/dist/_utils/find-bin.js.map +0 -1
- package/dist/_utils/format-search-result.d.ts +0 -2
- package/dist/_utils/format-search-result.js.map +0 -1
- package/dist/_utils/format-turn-nudges.d.ts +0 -2
- package/dist/_utils/format-turn-nudges.js.map +0 -1
- package/dist/_utils/git-context.d.ts +0 -13
- package/dist/_utils/git-context.js +0 -82
- package/dist/_utils/git-context.js.map +0 -1
- package/dist/_utils/git-hook-setup.d.ts +0 -18
- package/dist/_utils/git-hook-setup.js +0 -115
- package/dist/_utils/git-hook-setup.js.map +0 -1
- package/dist/_utils/glen-headers.d.ts +0 -8
- package/dist/_utils/glen-headers.js.map +0 -1
- package/dist/_utils/http.d.ts +0 -23
- package/dist/_utils/http.js +0 -97
- package/dist/_utils/http.js.map +0 -1
- package/dist/_utils/idempotency-key.d.ts +0 -2
- package/dist/_utils/idempotency-key.js +0 -7
- package/dist/_utils/idempotency-key.js.map +0 -1
- package/dist/_utils/indicator-app.d.ts +0 -9
- package/dist/_utils/indicator-app.js +0 -91
- package/dist/_utils/indicator-app.js.map +0 -1
- package/dist/_utils/indicator-health.d.ts +0 -8
- package/dist/_utils/indicator-health.js +0 -37
- package/dist/_utils/indicator-health.js.map +0 -1
- package/dist/_utils/ingest-diagnosis.d.ts +0 -24
- package/dist/_utils/ingest-diagnosis.js.map +0 -1
- package/dist/_utils/ingest-failure-memo.d.ts +0 -2
- package/dist/_utils/ingest-failure-memo.js +0 -58
- package/dist/_utils/ingest-failure-memo.js.map +0 -1
- package/dist/_utils/ingest-heartbeat.d.ts +0 -9
- package/dist/_utils/ingest-heartbeat.js +0 -48
- package/dist/_utils/ingest-heartbeat.js.map +0 -1
- package/dist/_utils/install-receipt.d.ts +0 -51
- package/dist/_utils/install-receipt.js +0 -202
- package/dist/_utils/install-receipt.js.map +0 -1
- package/dist/_utils/jcode-bundle.d.ts +0 -3
- package/dist/_utils/jcode-bundle.js +0 -16
- package/dist/_utils/jcode-bundle.js.map +0 -1
- package/dist/_utils/jcode-event.d.ts +0 -3
- package/dist/_utils/jcode-event.js +0 -66
- package/dist/_utils/jcode-event.js.map +0 -1
- package/dist/_utils/jcode-hook-lines.d.ts +0 -5
- package/dist/_utils/jcode-hook-lines.js.map +0 -1
- package/dist/_utils/jcode-hooks-toml.d.ts +0 -8
- package/dist/_utils/jcode-hooks-toml.js.map +0 -1
- package/dist/_utils/jcode-paths.d.ts +0 -7
- package/dist/_utils/jcode-paths.js +0 -10
- package/dist/_utils/jcode-paths.js.map +0 -1
- package/dist/_utils/jcode-setup.d.ts +0 -27
- package/dist/_utils/jcode-setup.js +0 -151
- package/dist/_utils/jcode-setup.js.map +0 -1
- package/dist/_utils/jcode-skills-sync.d.ts +0 -8
- package/dist/_utils/jcode-skills-sync.js +0 -74
- package/dist/_utils/jcode-skills-sync.js.map +0 -1
- package/dist/_utils/login-check.d.ts +0 -2
- package/dist/_utils/login-check.js +0 -57
- package/dist/_utils/login-check.js.map +0 -1
- package/dist/_utils/managed-block.d.ts +0 -4
- package/dist/_utils/managed-block.js.map +0 -1
- package/dist/_utils/normalize-boolean-flags.d.ts +0 -2
- package/dist/_utils/normalize-boolean-flags.js.map +0 -1
- package/dist/_utils/normalize-transcript-timestamp.d.ts +0 -2
- package/dist/_utils/normalize-transcript-timestamp.js.map +0 -1
- package/dist/_utils/npm-error-cause.d.ts +0 -5
- package/dist/_utils/npm-error-cause.js.map +0 -1
- package/dist/_utils/open-browser.d.ts +0 -2
- package/dist/_utils/open-browser.js +0 -18
- package/dist/_utils/open-browser.js.map +0 -1
- package/dist/_utils/parse-claude-transcript.d.ts +0 -3
- package/dist/_utils/parse-claude-transcript.js +0 -145
- package/dist/_utils/parse-claude-transcript.js.map +0 -1
- package/dist/_utils/parse-codex-transcript.d.ts +0 -3
- package/dist/_utils/parse-codex-transcript.js +0 -132
- package/dist/_utils/parse-codex-transcript.js.map +0 -1
- package/dist/_utils/parse-cursor-db.d.ts +0 -5
- package/dist/_utils/parse-cursor-db.js +0 -212
- package/dist/_utils/parse-cursor-db.js.map +0 -1
- package/dist/_utils/parse-harbor-atif.d.ts +0 -3
- package/dist/_utils/parse-harbor-atif.js.map +0 -1
- package/dist/_utils/parse-jcode-session.d.ts +0 -14
- package/dist/_utils/parse-jcode-session.js.map +0 -1
- package/dist/_utils/parse-pi-transcript.d.ts +0 -3
- package/dist/_utils/parse-pi-transcript.js +0 -164
- package/dist/_utils/parse-pi-transcript.js.map +0 -1
- package/dist/_utils/parse-transcript.d.ts +0 -14
- package/dist/_utils/parse-transcript.js +0 -94
- package/dist/_utils/parse-transcript.js.map +0 -1
- package/dist/_utils/plugin-status.d.ts +0 -4
- package/dist/_utils/plugin-status.js +0 -76
- package/dist/_utils/plugin-status.js.map +0 -1
- package/dist/_utils/post-route.d.ts +0 -6
- package/dist/_utils/post-route.js +0 -66
- package/dist/_utils/post-route.js.map +0 -1
- package/dist/_utils/pr-review-link.d.ts +0 -11
- package/dist/_utils/pr-review-link.js.map +0 -1
- package/dist/_utils/proactive-ticket-log.d.ts +0 -3
- package/dist/_utils/proactive-ticket-log.js +0 -21
- package/dist/_utils/proactive-ticket-log.js.map +0 -1
- package/dist/_utils/purge-agent-plugins.d.ts +0 -8
- package/dist/_utils/purge-agent-plugins.js +0 -62
- package/dist/_utils/purge-agent-plugins.js.map +0 -1
- package/dist/_utils/purge-claude-statusline.d.ts +0 -12
- package/dist/_utils/purge-claude-statusline.js +0 -57
- package/dist/_utils/purge-claude-statusline.js.map +0 -1
- package/dist/_utils/purge-local-state.d.ts +0 -7
- package/dist/_utils/purge-local-state.js +0 -40
- package/dist/_utils/purge-local-state.js.map +0 -1
- package/dist/_utils/record-commit-anchor.d.ts +0 -8
- package/dist/_utils/record-commit-anchor.js +0 -73
- package/dist/_utils/record-commit-anchor.js.map +0 -1
- package/dist/_utils/refresh-control-state.d.ts +0 -6
- package/dist/_utils/refresh-control-state.js +0 -30
- package/dist/_utils/refresh-control-state.js.map +0 -1
- package/dist/_utils/render-callback-page.d.ts +0 -2
- package/dist/_utils/render-callback-page.js +0 -90
- package/dist/_utils/render-callback-page.js.map +0 -1
- package/dist/_utils/report-cli-install.d.ts +0 -2
- package/dist/_utils/report-cli-install.js +0 -17
- package/dist/_utils/report-cli-install.js.map +0 -1
- package/dist/_utils/resolve-import-workspace.d.ts +0 -4
- package/dist/_utils/resolve-import-workspace.js.map +0 -1
- package/dist/_utils/result.d.ts +0 -14
- package/dist/_utils/result.js +0 -12
- package/dist/_utils/result.js.map +0 -1
- package/dist/_utils/run-bin.d.ts +0 -14
- package/dist/_utils/run-bin.js +0 -60
- package/dist/_utils/run-bin.js.map +0 -1
- package/dist/_utils/runtime-timezone.d.ts +0 -1
- package/dist/_utils/runtime-timezone.js +0 -13
- package/dist/_utils/runtime-timezone.js.map +0 -1
- package/dist/_utils/session-map.d.ts +0 -4
- package/dist/_utils/session-map.js +0 -38
- package/dist/_utils/session-map.js.map +0 -1
- package/dist/_utils/shell-profile.d.ts +0 -13
- package/dist/_utils/shell-profile.js.map +0 -1
- package/dist/_utils/state-line-memo.d.ts +0 -2
- package/dist/_utils/state-line-memo.js +0 -47
- package/dist/_utils/state-line-memo.js.map +0 -1
- package/dist/_utils/state-line.d.ts +0 -3
- package/dist/_utils/state-line.js.map +0 -1
- package/dist/_utils/state.d.ts +0 -15
- package/dist/_utils/state.js +0 -53
- package/dist/_utils/state.js.map +0 -1
- package/dist/_utils/sync-mode-from-server.d.ts +0 -3
- package/dist/_utils/sync-mode-from-server.js +0 -44
- package/dist/_utils/sync-mode-from-server.js.map +0 -1
- package/dist/_utils/transcript-turns.d.ts +0 -51
- package/dist/_utils/transcript-turns.js.map +0 -1
- package/dist/_utils/turn-cache.d.ts +0 -7
- package/dist/_utils/turn-cache.js +0 -56
- package/dist/_utils/turn-cache.js.map +0 -1
- package/dist/_utils/update.d.ts +0 -19
- package/dist/_utils/update.js +0 -196
- package/dist/_utils/update.js.map +0 -1
- package/dist/_utils/version.d.ts +0 -2
- package/dist/_utils/version.js +0 -18
- package/dist/_utils/version.js.map +0 -1
- package/dist/_utils/which.d.ts +0 -2
- package/dist/_utils/which.js +0 -4
- package/dist/_utils/which.js.map +0 -1
- package/dist/_utils/write-commit-trailer.d.ts +0 -2
- package/dist/_utils/write-commit-trailer.js +0 -25
- package/dist/_utils/write-commit-trailer.js.map +0 -1
- package/dist/bin.d.ts +0 -2
- package/dist/commands/_utils/materialize-skill.d.ts +0 -30
- package/dist/commands/_utils/materialize-skill.js +0 -207
- package/dist/commands/_utils/materialize-skill.js.map +0 -1
- package/dist/commands/_utils/mutate-evidence.d.ts +0 -17
- package/dist/commands/_utils/mutate-evidence.js +0 -80
- package/dist/commands/_utils/mutate-evidence.js.map +0 -1
- package/dist/commands/_utils/pack-skill-dir.d.ts +0 -15
- package/dist/commands/_utils/pack-skill-dir.js +0 -169
- package/dist/commands/_utils/pack-skill-dir.js.map +0 -1
- package/dist/commands/artifact.d.ts +0 -18
- package/dist/commands/artifact.js +0 -139
- package/dist/commands/artifact.js.map +0 -1
- package/dist/commands/code-search.d.ts +0 -4
- package/dist/commands/code-search.js +0 -164
- package/dist/commands/code-search.js.map +0 -1
- package/dist/commands/dependency.d.ts +0 -4
- package/dist/commands/dependency.js +0 -23
- package/dist/commands/dependency.js.map +0 -1
- package/dist/commands/doctor.d.ts +0 -7
- package/dist/commands/doctor.js +0 -243
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/feedback.d.ts +0 -15
- package/dist/commands/feedback.js +0 -112
- package/dist/commands/feedback.js.map +0 -1
- package/dist/commands/forget.d.ts +0 -4
- package/dist/commands/forget.js +0 -29
- package/dist/commands/forget.js.map +0 -1
- package/dist/commands/git-hooks.d.ts +0 -9
- package/dist/commands/git-hooks.js +0 -18
- package/dist/commands/git-hooks.js.map +0 -1
- package/dist/commands/import.d.ts +0 -8
- package/dist/commands/import.js +0 -414
- package/dist/commands/import.js.map +0 -1
- package/dist/commands/incognito.d.ts +0 -4
- package/dist/commands/incognito.js +0 -13
- package/dist/commands/incognito.js.map +0 -1
- package/dist/commands/indicator.d.ts +0 -4
- package/dist/commands/indicator.js +0 -65
- package/dist/commands/indicator.js.map +0 -1
- package/dist/commands/ingest.d.ts +0 -3
- package/dist/commands/ingest.js +0 -367
- package/dist/commands/ingest.js.map +0 -1
- package/dist/commands/install.d.ts +0 -9
- package/dist/commands/install.js +0 -431
- package/dist/commands/install.js.map +0 -1
- package/dist/commands/invite.d.ts +0 -4
- package/dist/commands/invite.js +0 -61
- package/dist/commands/invite.js.map +0 -1
- package/dist/commands/login.d.ts +0 -4
- package/dist/commands/login.js +0 -145
- package/dist/commands/login.js.map +0 -1
- package/dist/commands/logout.d.ts +0 -4
- package/dist/commands/logout.js +0 -26
- package/dist/commands/logout.js.map +0 -1
- package/dist/commands/onboard.d.ts +0 -4
- package/dist/commands/onboard.js +0 -18
- package/dist/commands/onboard.js.map +0 -1
- package/dist/commands/org.d.ts +0 -5
- package/dist/commands/org.js +0 -157
- package/dist/commands/org.js.map +0 -1
- package/dist/commands/pr-link.d.ts +0 -2
- package/dist/commands/pr-link.js +0 -69
- package/dist/commands/pr-link.js.map +0 -1
- package/dist/commands/restore.d.ts +0 -4
- package/dist/commands/restore.js +0 -23
- package/dist/commands/restore.js.map +0 -1
- package/dist/commands/search.d.ts +0 -4
- package/dist/commands/search.js +0 -85
- package/dist/commands/search.js.map +0 -1
- package/dist/commands/session-start.d.ts +0 -2
- package/dist/commands/session-start.js +0 -114
- package/dist/commands/session-start.js.map +0 -1
- package/dist/commands/set-mode.d.ts +0 -5
- package/dist/commands/set-mode.js +0 -96
- package/dist/commands/set-mode.js.map +0 -1
- package/dist/commands/skill.d.ts +0 -18
- package/dist/commands/skill.js +0 -309
- package/dist/commands/skill.js.map +0 -1
- package/dist/commands/status.d.ts +0 -4
- package/dist/commands/status.js +0 -33
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/statusline.d.ts +0 -2
- package/dist/commands/statusline.js +0 -37
- package/dist/commands/statusline.js.map +0 -1
- package/dist/commands/suggestions.d.ts +0 -4
- package/dist/commands/suggestions.js +0 -84
- package/dist/commands/suggestions.js.map +0 -1
- package/dist/commands/takeover/_utils/agent-paths.d.ts +0 -6
- package/dist/commands/takeover/_utils/archive-codex-desktop-thread.d.ts +0 -5
- package/dist/commands/takeover/_utils/canonical-digest.d.ts +0 -5
- package/dist/commands/takeover/_utils/codex-desktop-recovery.d.ts +0 -16
- package/dist/commands/takeover/_utils/context-fit.d.ts +0 -18
- package/dist/commands/takeover/_utils/cursor-store.d.ts +0 -49
- package/dist/commands/takeover/_utils/import-codex-desktop-thread.d.ts +0 -14
- package/dist/commands/takeover/_utils/launch-desktop-url.d.ts +0 -4
- package/dist/commands/takeover/_utils/native-file.d.ts +0 -14
- package/dist/commands/takeover/_utils/probe-agent.d.ts +0 -20
- package/dist/commands/takeover/_utils/provenance-context.d.ts +0 -7
- package/dist/commands/takeover/_utils/staged-session.d.ts +0 -64
- package/dist/commands/takeover/_utils/write-claude-desktop-session.d.ts +0 -47
- package/dist/commands/takeover/_utils/write-claude-session.d.ts +0 -53
- package/dist/commands/takeover/_utils/write-codex-desktop-session.d.ts +0 -96
- package/dist/commands/takeover/_utils/write-codex-session.d.ts +0 -52
- package/dist/commands/takeover/_utils/write-cursor-session.d.ts +0 -57
- package/dist/commands/takeover/_utils/write-pi-session.d.ts +0 -52
- package/dist/commands/takeover/index.d.ts +0 -21
- package/dist/commands/takeover/takeover.schema.d.ts +0 -24
- package/dist/commands/uninstall.d.ts +0 -8
- package/dist/commands/uninstall.js +0 -130
- package/dist/commands/uninstall.js.map +0 -1
- package/dist/commands/update.d.ts +0 -4
- package/dist/commands/update.js +0 -127
- package/dist/commands/update.js.map +0 -1
- package/dist/jcode/skills/session-takeover/SKILL.md +0 -67
- /package/dist/{_utils → clients/agents}/normalize-transcript-timestamp.js +0 -0
package/dist/bin.js
CHANGED
|
@@ -1,575 +1,152 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { cac } from "cac";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { cliErr } from "./core/errors/cli-error.js";
|
|
4
|
+
import { out } from "./core/terminal/out.js";
|
|
5
|
+
import { err, ok } from "./core/errors/result.js";
|
|
6
|
+
import { run } from "./core/run/run.js";
|
|
7
|
+
import { runHook } from "./core/run/run-hook.js";
|
|
8
|
+
import { cliVersion } from "./core/system/version.js";
|
|
9
|
+
import { cliInput } from "./core/run/cli-input.js";
|
|
10
|
+
import { artifactOptions } from "./commands/artifact/artifact.options.js";
|
|
11
|
+
import { codeSearchOptions } from "./commands/code-search/code-search.options.js";
|
|
12
|
+
import { dependencyOptions } from "./commands/dependency/dependency.options.js";
|
|
13
|
+
import { doctorOptions } from "./commands/doctor/doctor.options.js";
|
|
14
|
+
import { feedbackOptions } from "./commands/feedback/feedback.options.js";
|
|
15
|
+
import { forgetOptions } from "./commands/forget/forget.options.js";
|
|
16
|
+
import { gitHooksOptions } from "./commands/git-hooks/git-hooks.options.js";
|
|
17
|
+
import { importOptions } from "./commands/import/import.options.js";
|
|
18
|
+
import { incognitoOptions } from "./commands/incognito/incognito.options.js";
|
|
19
|
+
import { indicatorOptions } from "./commands/indicator/indicator.options.js";
|
|
20
|
+
import { ingestOptions } from "./commands/ingest/ingest.options.js";
|
|
21
|
+
import { installOptions } from "./commands/install/install.options.js";
|
|
22
|
+
import { inviteOptions } from "./commands/invite/invite.options.js";
|
|
23
|
+
import { loginOptions } from "./commands/login/login.options.js";
|
|
24
|
+
import { logoutOptions } from "./commands/logout/logout.options.js";
|
|
25
|
+
import { orgOptions } from "./commands/org/org.options.js";
|
|
26
|
+
import { prLinkOptions } from "./commands/pr-link/pr-link.options.js";
|
|
27
|
+
import { restoreOptions } from "./commands/restore/restore.options.js";
|
|
28
|
+
import { searchOptions } from "./commands/search/search.options.js";
|
|
29
|
+
import { sessionStartOptions } from "./commands/session-start/session-start.options.js";
|
|
30
|
+
import { setModeOptions } from "./commands/set-mode/set-mode.options.js";
|
|
31
|
+
import { skillOptions } from "./commands/skill/skill.options.js";
|
|
32
|
+
import { statusOptions } from "./commands/status/status.options.js";
|
|
33
|
+
import { statuslineOptions } from "./commands/statusline/statusline.options.js";
|
|
34
|
+
import { suggestionsOptions } from "./commands/suggestions/suggestions.options.js";
|
|
35
|
+
import { takeoverOptions } from "./commands/takeover/takeover.options.js";
|
|
36
|
+
import { telemetryOptions } from "./commands/telemetry/telemetry.options.js";
|
|
37
|
+
import { uninstallOptions } from "./commands/uninstall/uninstall.options.js";
|
|
38
|
+
import { updateOptions } from "./commands/update/update.options.js";
|
|
5
39
|
const cli = cac("glen");
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
cli
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
cli
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
cli
|
|
98
|
-
.command(
|
|
99
|
-
// cac's variadic form is `[...name]`; `[name...]` passes one bare string, which the spread splits into characters.
|
|
100
|
-
"invite [email] [...otherEmails]", "Invite teammates by email, or print a shareable join link when no email is given")
|
|
101
|
-
.option("--role <role>", "Role for the invitees: member (default) | admin")
|
|
102
|
-
.action(async (email, otherEmails, options) => {
|
|
103
|
-
const role = options.role === "admin" ? "admin" : "member";
|
|
104
|
-
const emails = [...(email ? [email] : []), ...(otherEmails ?? [])];
|
|
105
|
-
const { invite } = await import("./commands/invite.js");
|
|
106
|
-
const result = await invite(emails, role);
|
|
107
|
-
if (!result.ok) {
|
|
108
|
-
process.stderr.write(formatCliError(result.error));
|
|
109
|
-
process.exit(1);
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
cli
|
|
113
|
-
.command("on", "Turn glen on — inject context and record")
|
|
114
|
-
.action(async () => {
|
|
115
|
-
const { setMode } = await import("./commands/set-mode.js");
|
|
116
|
-
const r = await setMode("on");
|
|
117
|
-
if (!r.ok) {
|
|
118
|
-
process.stderr.write(formatCliError(r.error));
|
|
119
|
-
process.exit(1);
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
cli
|
|
123
|
-
.command("off", "Turn glen off — inject nothing and record nothing until `glen on`")
|
|
124
|
-
.action(async () => {
|
|
125
|
-
const { setMode } = await import("./commands/set-mode.js");
|
|
126
|
-
const r = await setMode("off");
|
|
127
|
-
if (!r.ok) {
|
|
128
|
-
process.stderr.write(formatCliError(r.error));
|
|
129
|
-
process.exit(1);
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
cli
|
|
133
|
-
.command("silent", "Silent mode — record everything, surface nothing until `glen on`")
|
|
134
|
-
.action(async () => {
|
|
135
|
-
const { setMode } = await import("./commands/set-mode.js");
|
|
136
|
-
const r = await setMode("silent");
|
|
137
|
-
if (!r.ok) {
|
|
138
|
-
process.stderr.write(formatCliError(r.error));
|
|
139
|
-
process.exit(1);
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
cli
|
|
143
|
-
.command("incognito [state]", "Go off the record — keep recalling, record nothing (back-compat: on|off)")
|
|
144
|
-
.action(async (state) => {
|
|
145
|
-
const { incognito } = await import("./commands/incognito.js");
|
|
146
|
-
const r = await incognito(state);
|
|
147
|
-
if (!r.ok) {
|
|
148
|
-
process.stderr.write(formatCliError(r.error));
|
|
149
|
-
process.exit(1);
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
cli
|
|
153
|
-
.command("suggestions <kind> <state>", "Toggle glen's skill nudges account-wide: skill-create|skill-use on|off")
|
|
154
|
-
.action(async (kind, state) => {
|
|
155
|
-
const { suggestions } = await import("./commands/suggestions.js");
|
|
156
|
-
const r = await suggestions(kind, state);
|
|
157
|
-
if (!r.ok) {
|
|
158
|
-
process.stderr.write(formatCliError(r.error));
|
|
159
|
-
process.exit(1);
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
cli
|
|
163
|
-
.command("ingest", "Ingest a turn from stdin (used by agent hooks)")
|
|
164
|
-
.option("--agent <agent>", "Agent type: claude-code | codex | cursor | pi | jcode")
|
|
165
|
-
.action(async (options) => {
|
|
166
|
-
try {
|
|
167
|
-
const { ingest } = await import("./commands/ingest.js");
|
|
168
|
-
await ingest(options.agent);
|
|
169
|
-
}
|
|
170
|
-
catch {
|
|
171
|
-
// Hook must never block a prompt — swallow and exit clean.
|
|
172
|
-
}
|
|
173
|
-
process.exit(0);
|
|
174
|
-
});
|
|
175
|
-
cli
|
|
176
|
-
.command("pr-link", "Surface a Glen review link from a tool event (used by agent hooks)")
|
|
177
|
-
.option("--agent <agent>", "Agent type: claude-code | codex | cursor | pi")
|
|
178
|
-
.action(async (options) => {
|
|
179
|
-
try {
|
|
180
|
-
const { prLink } = await import("./commands/pr-link.js");
|
|
181
|
-
await prLink(options.agent);
|
|
182
|
-
}
|
|
183
|
-
catch { }
|
|
184
|
-
process.exit(0);
|
|
185
|
-
});
|
|
186
|
-
cli
|
|
187
|
-
.command("bug <title>", "Report a glen bug to the Glen team")
|
|
188
|
-
.option("--description <description>", "What is wrong")
|
|
189
|
-
.option("--steps <steps>", "Steps to reproduce")
|
|
190
|
-
.option("--severity <severity>", "low | medium | high | critical")
|
|
191
|
-
.option("--from <from>", "Who it is from: user (default) | agent")
|
|
192
|
-
.option("--agent <agent>", "Agent type: claude-code | codex | cursor | pi")
|
|
193
|
-
.option("--proactive", "Self-initiated filing; at most one per session")
|
|
194
|
-
.action(async (title, options) => {
|
|
195
|
-
const { feedback } = await import("./commands/feedback.js");
|
|
196
|
-
const result = await feedback("bug", title, options);
|
|
197
|
-
if (!result.ok) {
|
|
198
|
-
process.stderr.write(formatCliError(result.error));
|
|
199
|
-
process.exit(1);
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
cli
|
|
203
|
-
.command("feedback <title>", "Send product feedback to the Glen team")
|
|
204
|
-
.option("--wants <wants>", "The concrete change being asked for")
|
|
205
|
-
.option("--why <why>", "Why it matters — the underlying need")
|
|
206
|
-
.option("--context <context>", "Any extra context")
|
|
207
|
-
.option("--from <from>", "Who it is from: user (default) | agent")
|
|
208
|
-
.option("--agent <agent>", "Agent type: claude-code | codex | cursor | pi")
|
|
209
|
-
.option("--proactive", "Self-initiated filing; at most one per session")
|
|
210
|
-
.action(async (title, options) => {
|
|
211
|
-
const { feedback } = await import("./commands/feedback.js");
|
|
212
|
-
const result = await feedback("feedback", title, options);
|
|
213
|
-
if (!result.ok) {
|
|
214
|
-
process.stderr.write(formatCliError(result.error));
|
|
215
|
-
process.exit(1);
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
cli
|
|
219
|
-
.command("org <action> [slug]", "Manage organizations: list | switch [slug]")
|
|
220
|
-
.action(async (action, slug) => {
|
|
221
|
-
if (action === "list") {
|
|
222
|
-
const { orgList } = await import("./commands/org.js");
|
|
223
|
-
const r = await orgList();
|
|
224
|
-
if (!r.ok) {
|
|
225
|
-
process.stderr.write(formatCliError(r.error));
|
|
226
|
-
process.exit(1);
|
|
227
|
-
}
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
if (action === "switch") {
|
|
231
|
-
const { orgSwitch } = await import("./commands/org.js");
|
|
232
|
-
const r = await orgSwitch(slug);
|
|
233
|
-
if (!r.ok) {
|
|
234
|
-
process.stderr.write(formatCliError(r.error));
|
|
235
|
-
process.exit(1);
|
|
236
|
-
}
|
|
237
|
-
return;
|
|
238
|
-
}
|
|
239
|
-
process.stderr.write(`Unknown subcommand "${action}". Use: glen org list | glen org switch [slug]\n`);
|
|
240
|
-
process.exit(1);
|
|
241
|
-
});
|
|
242
|
-
cli
|
|
243
|
-
.command("skill <action> [arg]", "Glen skill library: search [query] | use <slug> | create | share <slug>")
|
|
244
|
-
.option("--by <author>", "skill search: filter by author name (or 'me')")
|
|
245
|
-
.option("--name <name>", "skill create: the skill's name")
|
|
246
|
-
.option("--description <description>", "skill create: one-line description")
|
|
247
|
-
.option("--file <path>", "skill create: path to the SKILL.md body")
|
|
248
|
-
.option("--dir <path>", "skill create: path to a skill directory (SKILL.md + scripts/ references/ assets/)")
|
|
249
|
-
.option("--deps <path>", "skill create: path to a JSON array of dependencies")
|
|
250
|
-
.option("--update", "skill create: overwrite your own same-named skill")
|
|
251
|
-
.option("--org", "skill create/share: share with your whole org (create default: private to you)")
|
|
252
|
-
.option("--with <emails>", "skill share: comma-separated teammate emails to add")
|
|
253
|
-
.action(async (action, arg, options) => {
|
|
254
|
-
// cac yields `true` for a valued flag passed bare — coerce to undefined.
|
|
255
|
-
const str = (v) => typeof v === "string" ? v : undefined;
|
|
256
|
-
if (action === "search") {
|
|
257
|
-
const { skillSearch } = await import("./commands/skill.js");
|
|
258
|
-
const r = await skillSearch(arg, str(options.by));
|
|
259
|
-
if (!r.ok) {
|
|
260
|
-
process.stderr.write(formatCliError(r.error));
|
|
261
|
-
process.exit(1);
|
|
262
|
-
}
|
|
263
|
-
return;
|
|
264
|
-
}
|
|
265
|
-
if (action === "use") {
|
|
266
|
-
const { skillUse } = await import("./commands/skill.js");
|
|
267
|
-
const r = await skillUse(arg);
|
|
268
|
-
if (!r.ok) {
|
|
269
|
-
process.stderr.write(formatCliError(r.error));
|
|
270
|
-
process.exit(1);
|
|
271
|
-
}
|
|
272
|
-
return;
|
|
273
|
-
}
|
|
274
|
-
if (action === "create") {
|
|
275
|
-
const { skillCreate } = await import("./commands/skill.js");
|
|
276
|
-
const depStr = str(options.deps);
|
|
277
|
-
const dirStr = str(options.dir);
|
|
278
|
-
const r = await skillCreate({
|
|
279
|
-
name: str(options.name),
|
|
280
|
-
description: str(options.description),
|
|
281
|
-
file: str(options.file),
|
|
282
|
-
...(dirStr ? { dir: dirStr } : {}),
|
|
283
|
-
...(depStr ? { deps: depStr } : {}),
|
|
284
|
-
update: options.update === true,
|
|
285
|
-
org: options.org === true,
|
|
286
|
-
});
|
|
287
|
-
if (!r.ok) {
|
|
288
|
-
process.stderr.write(formatCliError(r.error));
|
|
289
|
-
process.exit(1);
|
|
290
|
-
}
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
|
-
if (action === "share") {
|
|
294
|
-
const { skillShare } = await import("./commands/skill.js");
|
|
295
|
-
const r = await skillShare(arg, {
|
|
296
|
-
with: str(options.with),
|
|
297
|
-
org: options.org === true,
|
|
298
|
-
});
|
|
299
|
-
if (!r.ok) {
|
|
300
|
-
process.stderr.write(formatCliError(r.error));
|
|
301
|
-
process.exit(1);
|
|
302
|
-
}
|
|
303
|
-
return;
|
|
304
|
-
}
|
|
305
|
-
process.stderr.write(`Unknown subcommand "${action}". Use: glen skill search [query] | glen skill use <slug> | glen skill create | glen skill share <slug>\n`);
|
|
306
|
-
process.exit(1);
|
|
307
|
-
});
|
|
308
|
-
cli
|
|
309
|
-
.command("artifact <action> [arg]", "Org artifact library: search [query] | get <slug> | create | list | share <slug> | delete <slug>")
|
|
310
|
-
.option("--title <title>", "artifact create: the artifact's title")
|
|
311
|
-
.option("--file <path>", "artifact create: path to the .md/.html document, or - for stdin")
|
|
312
|
-
.option("--format <format>", "artifact create: markdown | html | auto (default: infer from extension)")
|
|
313
|
-
.option("--update", "artifact create: overwrite your own same-named artifact")
|
|
314
|
-
.option("--org", "artifact create/share: share with your whole org (create default: private to you)")
|
|
315
|
-
.option("--with <emails>", "artifact share: comma-separated teammate emails to add")
|
|
316
|
-
.action(async (action, arg, options) => {
|
|
317
|
-
const str = (v) => typeof v === "string" ? v : undefined;
|
|
318
|
-
if (action === "search") {
|
|
319
|
-
const { artifactSearch } = await import("./commands/artifact.js");
|
|
320
|
-
const r = await artifactSearch(arg);
|
|
321
|
-
if (!r.ok) {
|
|
322
|
-
process.stderr.write(formatCliError(r.error));
|
|
323
|
-
process.exit(1);
|
|
324
|
-
}
|
|
325
|
-
return;
|
|
326
|
-
}
|
|
327
|
-
if (action === "get") {
|
|
328
|
-
const { artifactGet } = await import("./commands/artifact.js");
|
|
329
|
-
const r = await artifactGet(arg);
|
|
330
|
-
if (!r.ok) {
|
|
331
|
-
process.stderr.write(formatCliError(r.error));
|
|
332
|
-
process.exit(1);
|
|
333
|
-
}
|
|
334
|
-
return;
|
|
335
|
-
}
|
|
336
|
-
if (action === "list") {
|
|
337
|
-
const { artifactList } = await import("./commands/artifact.js");
|
|
338
|
-
const r = await artifactList();
|
|
339
|
-
if (!r.ok) {
|
|
340
|
-
process.stderr.write(formatCliError(r.error));
|
|
341
|
-
process.exit(1);
|
|
342
|
-
}
|
|
343
|
-
return;
|
|
344
|
-
}
|
|
345
|
-
if (action === "create") {
|
|
346
|
-
const { artifactCreate } = await import("./commands/artifact.js");
|
|
347
|
-
const r = await artifactCreate({
|
|
348
|
-
title: str(options.title),
|
|
349
|
-
file: str(options.file),
|
|
350
|
-
format: str(options.format),
|
|
351
|
-
update: options.update === true,
|
|
352
|
-
org: options.org === true,
|
|
353
|
-
});
|
|
354
|
-
if (!r.ok) {
|
|
355
|
-
process.stderr.write(formatCliError(r.error));
|
|
356
|
-
process.exit(1);
|
|
357
|
-
}
|
|
358
|
-
return;
|
|
359
|
-
}
|
|
360
|
-
if (action === "delete") {
|
|
361
|
-
const { artifactDelete } = await import("./commands/artifact.js");
|
|
362
|
-
const r = await artifactDelete(arg);
|
|
363
|
-
if (!r.ok) {
|
|
364
|
-
process.stderr.write(formatCliError(r.error));
|
|
365
|
-
process.exit(1);
|
|
366
|
-
}
|
|
367
|
-
return;
|
|
368
|
-
}
|
|
369
|
-
if (action === "share") {
|
|
370
|
-
const { artifactShare } = await import("./commands/artifact.js");
|
|
371
|
-
const r = await artifactShare(arg, {
|
|
372
|
-
with: str(options.with),
|
|
373
|
-
org: options.org === true,
|
|
374
|
-
});
|
|
375
|
-
if (!r.ok) {
|
|
376
|
-
process.stderr.write(formatCliError(r.error));
|
|
377
|
-
process.exit(1);
|
|
378
|
-
}
|
|
379
|
-
return;
|
|
380
|
-
}
|
|
381
|
-
process.stderr.write(`Unknown subcommand "${action}". Use: glen artifact search|get|create|list|share|delete\n`);
|
|
382
|
-
process.exit(1);
|
|
383
|
-
});
|
|
384
|
-
cli
|
|
385
|
-
.command("dependency <action> [arg]", "Org dependency registry: search [query]")
|
|
386
|
-
.action(async (action, arg) => {
|
|
387
|
-
if (action === "search") {
|
|
388
|
-
const { dependencySearch } = await import("./commands/dependency.js");
|
|
389
|
-
const r = await dependencySearch(arg);
|
|
390
|
-
if (!r.ok) {
|
|
391
|
-
process.stderr.write(formatCliError(r.error));
|
|
392
|
-
process.exit(1);
|
|
393
|
-
}
|
|
394
|
-
return;
|
|
395
|
-
}
|
|
396
|
-
process.stderr.write(`Unknown subcommand "${action}". Use: glen dependency search [query]\n`);
|
|
397
|
-
process.exit(1);
|
|
398
|
-
});
|
|
399
|
-
cli
|
|
400
|
-
.command("git-hooks <action> [arg]", "Manage glen git hooks: install | prepare-commit-msg <msgFile>")
|
|
401
|
-
.option("--absolute-git-hook-path", "Embed the absolute glen path in the hook (for GUI git clients)")
|
|
402
|
-
.action(async (action, arg, options) => {
|
|
403
|
-
if (action === "prepare-commit-msg") {
|
|
404
|
-
const { writeCommitTrailer } = await import("./_utils/write-commit-trailer.js");
|
|
405
|
-
await writeCommitTrailer(arg ?? "");
|
|
406
|
-
return; // always exit 0 — never block a commit
|
|
407
|
-
}
|
|
408
|
-
if (action === "install") {
|
|
409
|
-
const { installGitHooks } = await import("./commands/git-hooks.js");
|
|
410
|
-
const result = await installGitHooks({
|
|
411
|
-
absolute: options.absoluteGitHookPath ?? false,
|
|
412
|
-
});
|
|
413
|
-
if (!result.ok) {
|
|
414
|
-
const { formatCliError } = await import("./_utils/cli-error.js");
|
|
415
|
-
process.stderr.write(formatCliError(result.error));
|
|
416
|
-
process.exit(1);
|
|
417
|
-
}
|
|
418
|
-
return;
|
|
419
|
-
}
|
|
420
|
-
process.stderr.write(`Unknown subcommand "${action}". Use: glen git-hooks install\n`);
|
|
421
|
-
});
|
|
422
|
-
cli
|
|
423
|
-
.command("install", "Detect coding agents and install glen plugins")
|
|
424
|
-
.option("--agent <agent>", "Install for one agent non-interactively: claude (alias: claude-code) | codex | cursor | pi | jcode")
|
|
425
|
-
.option("--codex-path <path>", "Absolute path to the codex binary (when auto-detection fails)")
|
|
426
|
-
.option("--claude-path <path>", "Absolute path to the claude binary (when auto-detection fails)")
|
|
427
|
-
.option("--pi-path <path>", "Absolute path to the pi binary (when auto-detection fails)")
|
|
428
|
-
.option("--jcode-path <path>", "Absolute path to the jcode binary (when auto-detection fails)")
|
|
429
|
-
.action(async (options) => {
|
|
430
|
-
if (options.agent === true) {
|
|
431
|
-
process.stderr.write("glen install: --agent requires a value (claude | codex | cursor | pi | jcode)\n");
|
|
432
|
-
process.exit(1);
|
|
433
|
-
}
|
|
434
|
-
if (options.codexPath === true ||
|
|
435
|
-
options.claudePath === true ||
|
|
436
|
-
options.piPath === true ||
|
|
437
|
-
options.jcodePath === true) {
|
|
438
|
-
process.stderr.write("glen install: --codex-path/--claude-path/--pi-path/--jcode-path require a value (an absolute path to the binary)\n");
|
|
439
|
-
process.exit(1);
|
|
440
|
-
}
|
|
441
|
-
const agent = typeof options.agent === "string" ? options.agent : undefined;
|
|
442
|
-
const { install } = await import("./commands/install.js");
|
|
443
|
-
const result = await install(agent, {
|
|
444
|
-
codex: typeof options.codexPath === "string" ? options.codexPath : undefined,
|
|
445
|
-
claude: typeof options.claudePath === "string"
|
|
446
|
-
? options.claudePath
|
|
447
|
-
: undefined,
|
|
448
|
-
pi: typeof options.piPath === "string" ? options.piPath : undefined,
|
|
449
|
-
jcode: typeof options.jcodePath === "string" ? options.jcodePath : undefined,
|
|
450
|
-
});
|
|
451
|
-
if (!result.ok) {
|
|
452
|
-
process.stderr.write(formatCliError(result.error));
|
|
453
|
-
process.exit(1);
|
|
454
|
-
}
|
|
455
|
-
});
|
|
456
|
-
cli
|
|
457
|
-
.command("uninstall", "Completely remove Glen's local plugins, hooks, state, caches, and CLI")
|
|
458
|
-
.action(async () => {
|
|
459
|
-
const { uninstall } = await import("./commands/uninstall.js");
|
|
460
|
-
const result = await uninstall();
|
|
461
|
-
if (!result.ok) {
|
|
462
|
-
process.stderr.write(formatCliError(result.error));
|
|
463
|
-
process.exit(1);
|
|
464
|
-
}
|
|
465
|
-
});
|
|
466
|
-
cli.command("version", "Print the CLI version").action(() => {
|
|
467
|
-
process.stdout.write(`${cliVersion}\n`);
|
|
468
|
-
});
|
|
469
|
-
cli
|
|
470
|
-
.command("update", "Update the glen CLI and any installed glen plugins")
|
|
471
|
-
.action(async () => {
|
|
472
|
-
const { update } = await import("./commands/update.js");
|
|
473
|
-
const result = await update();
|
|
474
|
-
if (!result.ok) {
|
|
475
|
-
process.stderr.write(formatCliError(result.error));
|
|
476
|
-
process.exit(1);
|
|
477
|
-
}
|
|
478
|
-
});
|
|
479
|
-
cli
|
|
480
|
-
.command("doctor", "Show version, update status, session state, and plugin hints")
|
|
481
|
-
.option("--auto", "Quiet mode: run background update + plugin upgrades (used by hooks)")
|
|
482
|
-
.option("--login-check", "Print a one-line warning when glen is installed but has never recorded from this machine (used by the shell-profile hook)")
|
|
483
|
-
.action(async (options) => {
|
|
484
|
-
const { doctor } = await import("./commands/doctor.js");
|
|
485
|
-
const result = await doctor({
|
|
486
|
-
auto: options.auto === true,
|
|
487
|
-
loginCheck: options.loginCheck === true,
|
|
488
|
-
});
|
|
489
|
-
if (!result.ok) {
|
|
490
|
-
process.stderr.write(formatCliError(result.error));
|
|
491
|
-
process.exit(1);
|
|
492
|
-
}
|
|
493
|
-
});
|
|
494
|
-
cli
|
|
495
|
-
.command("indicator <action>", "Menu bar recording indicator (macOS): start | stop | status")
|
|
496
|
-
.action(async (action) => {
|
|
497
|
-
const { indicator } = await import("./commands/indicator.js");
|
|
498
|
-
const result = await indicator(action);
|
|
499
|
-
if (!result.ok) {
|
|
500
|
-
process.stderr.write(formatCliError(result.error));
|
|
501
|
-
process.exit(1);
|
|
502
|
-
}
|
|
503
|
-
});
|
|
504
|
-
cli
|
|
505
|
-
.command("statusline", "Output a single status line for the agent's UI (used by hooks)")
|
|
506
|
-
.action(async () => {
|
|
507
|
-
try {
|
|
508
|
-
const { statusline } = await import("./commands/statusline.js");
|
|
509
|
-
await statusline();
|
|
510
|
-
}
|
|
511
|
-
catch {
|
|
512
|
-
// Statusline must never break the host UI — output the safe fallback.
|
|
513
|
-
process.stdout.write('🏔️ glen — ask me to "set up glen"');
|
|
514
|
-
}
|
|
515
|
-
process.exit(0);
|
|
516
|
-
});
|
|
517
|
-
cli
|
|
518
|
-
.command("session-start", "Output hook JSON for the agent's SessionStart event (used by hooks)")
|
|
519
|
-
.option("--agent <agent>", "Agent type (claude-code | codex | cursor | pi | jcode) — selects the hook output shape")
|
|
520
|
-
.action(async (options) => {
|
|
521
|
-
try {
|
|
522
|
-
const { sessionStart } = await import("./commands/session-start.js");
|
|
523
|
-
await sessionStart(options.agent);
|
|
524
|
-
}
|
|
525
|
-
catch {
|
|
526
|
-
// Hook must never block a session — output a safe no-op JSON response.
|
|
527
|
-
if (options.agent === "cursor") {
|
|
528
|
-
process.stdout.write(JSON.stringify({
|
|
529
|
-
additional_context: "[glen] not set up — use the setup skill",
|
|
530
|
-
}));
|
|
531
|
-
}
|
|
532
|
-
else {
|
|
533
|
-
process.stdout.write(JSON.stringify({
|
|
534
|
-
hookSpecificOutput: {
|
|
535
|
-
hookEventName: "SessionStart",
|
|
536
|
-
additionalContext: "[glen] not set up — use the setup skill",
|
|
537
|
-
},
|
|
538
|
-
}));
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
process.exit(0);
|
|
542
|
-
});
|
|
543
|
-
cli.command("__self-update", "(internal)").action(async () => {
|
|
544
|
-
const { runSelfUpdate } = await import("./_utils/update.js");
|
|
545
|
-
runSelfUpdate();
|
|
546
|
-
process.exit(0);
|
|
547
|
-
});
|
|
548
|
-
cli.command("__codex-hooks-repair", "(internal)").action(async () => {
|
|
549
|
-
const { installCodexHooks } = await import("./_utils/codex-hooks-setup.js");
|
|
550
|
-
const { writeRepairTrace } = await import("./_utils/codex-repair-trace.js");
|
|
551
|
-
const r = await installCodexHooks();
|
|
552
|
-
await writeRepairTrace(r.ok ? { ok: true } : { ok: false, error: r.error });
|
|
553
|
-
process.exit(0);
|
|
554
|
-
});
|
|
40
|
+
cliInput.command(cli, "login", "Connect glen via browser sign-in", loginOptions, (input) => run("login", async () => (await import("./commands/login/index.js")).login(input)));
|
|
41
|
+
cliInput.command(cli, "logout", "Sign out of glen and remove credentials", logoutOptions, () => run("logout", async () => (await import("./commands/logout/index.js")).logout()));
|
|
42
|
+
cliInput.command(cli, "status", "Check connection status", statusOptions, () => run("status", async () => (await import("./commands/status/index.js")).status()));
|
|
43
|
+
cliInput.command(cli, "search <query>", "Search glen memory", searchOptions, (input) => run("search", async () => (await import("./commands/search/index.js")).search(input)));
|
|
44
|
+
cliInput.command(cli, "takeover <code>", "Continue a shared transcript in a fresh native agent session", takeoverOptions, (input) => run("takeover", async () => (await import("./commands/takeover/index.js")).takeover(input)));
|
|
45
|
+
cliInput.command(cli, "code-search <location> [question]", 'Trace selected code to the conversations that produced it: code-search <path:start-end> "<question>"', codeSearchOptions, (input) => run("code-search", async () => (await import("./commands/code-search/index.js")).codeSearch(input)));
|
|
46
|
+
cliInput.command(cli,
|
|
47
|
+
// cac's variadic form is `<...name>`; `<name...>` silently drops extra paths.
|
|
48
|
+
"import <...path>", "Import old local agent transcripts (Claude Code, Codex, Cursor, Pi) into glen memory", importOptions, (input) => run("import", async () => (await import("./commands/import/index.js")).importTranscripts(input)));
|
|
49
|
+
cliInput.command(cli, "forget <...reference>", "Forget one or more observation:<id> or message:<id> search sources", forgetOptions, (input) => run("forget", async () => (await import("./commands/forget/index.js")).forget(input)));
|
|
50
|
+
cliInput.command(cli, "restore <...reference>", "Restore one or more forgotten observation:<id> or message:<id> sources", restoreOptions, (input) => run("restore", async () => (await import("./commands/restore/index.js")).restore(input)));
|
|
51
|
+
cliInput.command(cli,
|
|
52
|
+
// cac's variadic form is `[...name]`; `[name...]` passes one string, which the spread splits into chars.
|
|
53
|
+
"invite [email] [...otherEmails]", "Invite teammates by email, or print a shareable join link when no email is given", inviteOptions, (input) => run("invite", async () => (await import("./commands/invite/index.js")).invite(input)));
|
|
54
|
+
for (const [mode, description] of [
|
|
55
|
+
["on", "Turn glen on: inject context and record"],
|
|
56
|
+
["off", "Turn glen off: inject nothing and record nothing until `glen on`"],
|
|
57
|
+
["silent", "Silent mode: record everything, surface nothing until `glen on`"],
|
|
58
|
+
])
|
|
59
|
+
cliInput.command(cli, mode, description, setModeOptions[mode], () => run(mode, async () => (await import("./commands/set-mode/index.js")).setMode(mode)));
|
|
60
|
+
cliInput.command(cli, "incognito [state]", "Go off the record: keep recalling, record nothing (back-compat: on|off)", incognitoOptions, (input) => run("incognito", async () => (await import("./commands/incognito/index.js")).incognito(input)));
|
|
61
|
+
cliInput.command(cli, "suggestions <kind> <state>", "Toggle glen's skill nudges account-wide: skill-create|skill-use on|off", suggestionsOptions, (input) => run("suggestions", async () => (await import("./commands/suggestions/index.js")).suggestions(input)));
|
|
62
|
+
cliInput.command(cli, "telemetry [action]", "Error reporting for glen itself: status (default) | enable | disable", telemetryOptions.telemetry, (input) => run("telemetry", async () => (await import("./commands/telemetry/index.js")).telemetry(input)));
|
|
63
|
+
cliInput.hook(cli, "ingest", "Ingest a turn from stdin (used by agent hooks)", ingestOptions, (input) => runHook("ingest", input.agent, async () => (await import("./commands/ingest/index.js")).ingest(input)));
|
|
64
|
+
cliInput.hook(cli, "pr-link", "Surface a Glen review link from a tool event (used by agent hooks)", prLinkOptions, (input) => runHook("pr-link", input.agent, async () => (await import("./commands/pr-link/index.js")).prLink(input)));
|
|
65
|
+
cliInput.command(cli, "bug <title>", "Report a glen bug to the Glen team", feedbackOptions.bug, (input) => run("bug", async () => (await import("./commands/feedback/index.js")).feedback.bug(input)));
|
|
66
|
+
cliInput.command(cli, "feedback <title>", "Send product feedback to the Glen team", feedbackOptions.feedback, (input) => run("feedback", async () => (await import("./commands/feedback/index.js")).feedback.feedback(input)));
|
|
67
|
+
cliInput.command(cli, "org <action> [slug]", "Manage organizations: list | switch [slug]", orgOptions, (input) => run("org", async () => input.action === "list"
|
|
68
|
+
? (await import("./commands/org/list.js")).orgList()
|
|
69
|
+
: (await import("./commands/org/switch.js")).orgSwitch(input.slug)));
|
|
70
|
+
cliInput.command(cli, "skill <action> [arg]", "Glen skill library: search [query] | use <slug> | create | share <slug>", skillOptions, (input) => run("skill", async () => {
|
|
71
|
+
switch (input.action) {
|
|
72
|
+
case "search":
|
|
73
|
+
return (await import("./commands/skill/search.js")).skillSearch(input);
|
|
74
|
+
case "use":
|
|
75
|
+
return (await import("./commands/skill/use.js")).skillUse(input.arg);
|
|
76
|
+
case "create":
|
|
77
|
+
return (await import("./commands/skill/create/index.js")).skillCreate(input);
|
|
78
|
+
case "share":
|
|
79
|
+
return (await import("./commands/skill/share.js")).skillShare(input);
|
|
80
|
+
}
|
|
81
|
+
}));
|
|
82
|
+
cliInput.command(cli, "artifact <action> [arg]", "Org artifact library: search [query] | get <slug> | create | list | share <slug> | delete <slug>", artifactOptions, (input) => run("artifact", async () => {
|
|
83
|
+
switch (input.action) {
|
|
84
|
+
case "search":
|
|
85
|
+
return (await import("./commands/artifact/search.js")).artifactSearch(input.arg);
|
|
86
|
+
case "get":
|
|
87
|
+
return (await import("./commands/artifact/get.js")).artifactGet(input.arg);
|
|
88
|
+
case "list":
|
|
89
|
+
return (await import("./commands/artifact/list.js")).artifactList();
|
|
90
|
+
case "create":
|
|
91
|
+
return (await import("./commands/artifact/create.js")).artifactCreate(input);
|
|
92
|
+
case "delete":
|
|
93
|
+
return (await import("./commands/artifact/delete.js")).artifactDelete(input.arg);
|
|
94
|
+
case "share":
|
|
95
|
+
return (await import("./commands/artifact/share.js")).artifactShare(input);
|
|
96
|
+
}
|
|
97
|
+
}));
|
|
98
|
+
cliInput.command(cli, "dependency <action> [arg]", "Org dependency registry: search [query]", dependencyOptions, (input) => run("dependency", async () => (await import("./commands/dependency/index.js")).dependencySearch(input.arg)));
|
|
99
|
+
cliInput.command(cli, "git-hooks <action> [arg]", "Manage glen git hooks: install | prepare-commit-msg <msgFile>", gitHooksOptions, (input) =>
|
|
100
|
+
// Called by git on every commit: must never block it.
|
|
101
|
+
input.action === "prepare-commit-msg"
|
|
102
|
+
? runHook("git-hooks.prepare-commit-msg", undefined, async () => (await import("./commands/git-hooks/write-commit-trailer.js")).writeCommitTrailer(input.arg ?? ""))
|
|
103
|
+
: run("git-hooks", async () => (await import("./commands/git-hooks/index.js")).installGitHooks(input)));
|
|
104
|
+
cliInput.command(cli, "install", "Detect coding agents and install glen plugins", installOptions.install, (input) => run("install", async () => (await import("./commands/install/index.js")).install(input)));
|
|
105
|
+
cliInput.command(cli, "uninstall", "Completely remove Glen's local plugins, hooks, state, caches, and CLI", uninstallOptions, () => run("uninstall", async () => (await import("./commands/uninstall/index.js")).uninstall()));
|
|
106
|
+
cliInput.command(cli, "version", "Print the CLI version", cliInput.define({}), () => run("version", async () => {
|
|
107
|
+
out.data(cliVersion);
|
|
108
|
+
return ok(undefined);
|
|
109
|
+
}));
|
|
110
|
+
cliInput.command(cli, "update", "Update the glen CLI and any installed glen plugins", updateOptions.update, () => run("update", async () => (await import("./commands/update/index.js")).update()));
|
|
111
|
+
cliInput.command(cli, "doctor", "Show version, update status, session state, and plugin hints", doctorOptions, (input) => {
|
|
112
|
+
const doctor = async () => (await import("./commands/doctor/index.js")).doctor(input);
|
|
113
|
+
// --auto runs inside SessionStart and --login-check in the shell profile.
|
|
114
|
+
return input.auto || input.loginCheck
|
|
115
|
+
? runHook("doctor", undefined, doctor)
|
|
116
|
+
: run("doctor", doctor);
|
|
117
|
+
});
|
|
118
|
+
cliInput.command(cli, "indicator <action>", "Menu bar recording indicator (macOS): start | stop | status", indicatorOptions, (input) => run("indicator", async () => (await import("./commands/indicator/index.js")).indicator(input)));
|
|
119
|
+
cliInput.hook(cli, "statusline", "Output a single status line for the agent's UI (used by hooks)", statuslineOptions, () => runHook("statusline", undefined, async () => (await import("./commands/statusline/index.js")).statusline(), () => out.hookText('🏔️ glen · ask me to "set up glen"')));
|
|
120
|
+
cliInput.hook(cli, "session-start", "Output hook JSON for the agent's SessionStart event (used by hooks)", sessionStartOptions, (input) => runHook("session-start", input.agent, async () => (await import("./commands/session-start/index.js")).sessionStart(input), () => out.hookJson(input.agent === "cursor"
|
|
121
|
+
? { additional_context: "[glen] not set up: use the setup skill" }
|
|
122
|
+
: {
|
|
123
|
+
hookSpecificOutput: {
|
|
124
|
+
hookEventName: "SessionStart",
|
|
125
|
+
additionalContext: "[glen] not set up: use the setup skill",
|
|
126
|
+
},
|
|
127
|
+
})));
|
|
128
|
+
cliInput.hook(cli, "__self-update", "(internal)", updateOptions.selfUpdate, () => runHook("__self-update", undefined, async () => (await import("./commands/update/self-update.js")).selfUpdate()));
|
|
129
|
+
cliInput.hook(cli, "__codex-hooks-repair", "(internal)", installOptions.codexHooksRepair, () => runHook("__codex-hooks-repair", undefined, async () => (await import("./commands/install/codex-hooks-repair.js")).codexHooksRepair()));
|
|
130
|
+
cliInput.hook(cli, "__telemetry-send", "(internal)", telemetryOptions.send, () => runHook("__telemetry-send", undefined, async () => (await import("./commands/telemetry/send.js")).telemetrySend()));
|
|
555
131
|
// Unknown commands must fail loudly: cac's default is a silent exit 0, which reads as success.
|
|
556
132
|
cli.on("command:*", () => {
|
|
557
|
-
|
|
558
|
-
|
|
133
|
+
void run("unknown", async () => err(cliErr("Usage", {
|
|
134
|
+
code: "cli.unknown_command",
|
|
135
|
+
what: `unknown command "${cli.args[0] ?? ""}"`,
|
|
136
|
+
remedy: "run `glen --help` for usage",
|
|
137
|
+
})));
|
|
559
138
|
});
|
|
560
139
|
cli.help();
|
|
561
140
|
cli.version(cliVersion);
|
|
562
141
|
// No process.exit here: exiting right after help output can truncate piped stdout.
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
const
|
|
566
|
-
|
|
567
|
-
if (!(result.ok && result.value === "ran")) {
|
|
142
|
+
if (process.argv.length <= 2) {
|
|
143
|
+
const { maybeOnboard } = await import("./commands/onboard/index.js");
|
|
144
|
+
const result = await maybeOnboard(() => cliInput.defaults(installOptions.install));
|
|
145
|
+
if (!(result.ok && result.value === "ran"))
|
|
568
146
|
cli.outputHelp();
|
|
569
|
-
}
|
|
570
147
|
}
|
|
571
148
|
else {
|
|
572
|
-
const { normalizeBooleanFlags } = await import("./
|
|
149
|
+
const { normalizeBooleanFlags } = await import("./core/run/normalize-boolean-flags.js");
|
|
573
150
|
cli.parse(normalizeBooleanFlags(process.argv, ["--dry-run"]));
|
|
574
151
|
}
|
|
575
152
|
//# sourceMappingURL=bin.js.map
|