@cjhyy/code-shell 0.3.0 → 0.5.0-rc.2
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 +75 -0
- package/dist/cli.js +2 -0
- package/dist/index.d.ts +1 -68
- package/dist/index.js +1 -1
- package/package.json +25 -73
- package/dist/agent/coordinator.d.ts +0 -49
- package/dist/anthropic-DJXVKFMJ.js +0 -1
- package/dist/arena/arena.d.ts +0 -43
- package/dist/arena/context/context-tools.d.ts +0 -16
- package/dist/arena/detect-mode.d.ts +0 -20
- package/dist/arena/digest-builder.d.ts +0 -25
- package/dist/arena/index.d.ts +0 -29
- package/dist/arena/index.js +0 -1
- package/dist/arena/iterate/convergence.d.ts +0 -25
- package/dist/arena/iterate/formats/index.d.ts +0 -22
- package/dist/arena/iterate/index.d.ts +0 -11
- package/dist/arena/iterate/iterative-arena.d.ts +0 -23
- package/dist/arena/iterate/parse.d.ts +0 -42
- package/dist/arena/iterate/phases/argue.d.ts +0 -22
- package/dist/arena/iterate/phases/revise.d.ts +0 -16
- package/dist/arena/iterate/phases/tournament.d.ts +0 -34
- package/dist/arena/iterate/tools/web-tools.d.ts +0 -13
- package/dist/arena/iterate/types.d.ts +0 -152
- package/dist/arena/ledger.d.ts +0 -47
- package/dist/arena/lenses/architecture.d.ts +0 -5
- package/dist/arena/lenses/engineering.d.ts +0 -5
- package/dist/arena/lenses/general.d.ts +0 -5
- package/dist/arena/lenses/index.d.ts +0 -16
- package/dist/arena/lenses/product.d.ts +0 -5
- package/dist/arena/model-presets.d.ts +0 -23
- package/dist/arena/phases/adjudication.d.ts +0 -24
- package/dist/arena/phases/build-consensus.d.ts +0 -29
- package/dist/arena/phases/claim-registry.d.ts +0 -26
- package/dist/arena/phases/cross-review.d.ts +0 -45
- package/dist/arena/phases/debate-rounds.d.ts +0 -27
- package/dist/arena/phases/participant-research.d.ts +0 -38
- package/dist/arena/phases/planning-detail-expansion.d.ts +0 -38
- package/dist/arena/planner.d.ts +0 -27
- package/dist/arena/providers/docs.d.ts +0 -6
- package/dist/arena/providers/git.d.ts +0 -8
- package/dist/arena/providers/index.d.ts +0 -32
- package/dist/arena/providers/none.d.ts +0 -7
- package/dist/arena/providers/repo.d.ts +0 -6
- package/dist/arena/render/session.d.ts +0 -17
- package/dist/arena/render/terminal.d.ts +0 -33
- package/dist/arena/strategies/discussion.d.ts +0 -25
- package/dist/arena/strategies/index.d.ts +0 -15
- package/dist/arena/strategies/language-wrapper.d.ts +0 -17
- package/dist/arena/strategies/lens-wrapper.d.ts +0 -16
- package/dist/arena/strategies/planning.d.ts +0 -30
- package/dist/arena/strategies/review.d.ts +0 -26
- package/dist/arena/strategies/utils.d.ts +0 -39
- package/dist/arena/tools/selector.d.ts +0 -17
- package/dist/arena/transitions.d.ts +0 -48
- package/dist/arena/types.d.ts +0 -508
- package/dist/arena-MRBATZFD.js +0 -3
- package/dist/bootstrap/setup.d.ts +0 -14
- package/dist/bootstrap/state.d.ts +0 -160
- package/dist/bwrap-PVZMLHZR.js +0 -2
- package/dist/chunk-2OD6VR4N.js +0 -2
- package/dist/chunk-3QP5BQ3L.js +0 -1
- package/dist/chunk-5QIVXFCT.js +0 -1
- package/dist/chunk-AFMP73YP.js +0 -2
- package/dist/chunk-D3TVASD2.js +0 -4
- package/dist/chunk-DI26OUIU.js +0 -2
- package/dist/chunk-FU7AHZNN.js +0 -1
- package/dist/chunk-FZXY554D.js +0 -2
- package/dist/chunk-GGVAOPI7.js +0 -1
- package/dist/chunk-GKAQH2DG.js +0 -2
- package/dist/chunk-GYNO4R7R.js +0 -2
- package/dist/chunk-K4HILJ6G.js +0 -251
- package/dist/chunk-M7VU4YVY.js +0 -49
- package/dist/chunk-MLCTC53I.js +0 -1
- package/dist/chunk-O5HFCH2U.js +0 -1
- package/dist/chunk-OWBYLMDD.js +0 -1
- package/dist/chunk-P6JSTIFM.js +0 -1
- package/dist/chunk-QTWU7UNA.js +0 -5
- package/dist/chunk-SKIX2M5Z.js +0 -4
- package/dist/chunk-SNFAPSLA.js +0 -1
- package/dist/chunk-SV7H4FKT.js +0 -3
- package/dist/chunk-T222K6IV.js +0 -18
- package/dist/chunk-TKJA6W36.js +0 -3
- package/dist/chunk-WI6FSWGU.js +0 -1
- package/dist/chunk-WONQHE4P.js +0 -641
- package/dist/chunk-X2S7ASQ2.js +0 -1
- package/dist/chunk-Z5HKHAO7.js +0 -336
- package/dist/cli/commands/arena.d.ts +0 -29
- package/dist/cli/commands/builtin/advanced-commands.d.ts +0 -5
- package/dist/cli/commands/builtin/core-commands.d.ts +0 -5
- package/dist/cli/commands/builtin/export-md.d.ts +0 -19
- package/dist/cli/commands/builtin/extra-commands.d.ts +0 -6
- package/dist/cli/commands/builtin/git-commands.d.ts +0 -5
- package/dist/cli/commands/builtin/init/detect.d.ts +0 -25
- package/dist/cli/commands/builtin/init/index.d.ts +0 -19
- package/dist/cli/commands/builtin/more-commands.d.ts +0 -5
- package/dist/cli/commands/builtin/permissions-command.d.ts +0 -5
- package/dist/cli/commands/builtin/plugin-commands-registration.d.ts +0 -12
- package/dist/cli/commands/builtin/plugin-handler.d.ts +0 -6
- package/dist/cli/commands/builtin/utility-commands.d.ts +0 -5
- package/dist/cli/commands/registry.d.ts +0 -79
- package/dist/cli/commands/repl.d.ts +0 -21
- package/dist/cli/commands/run.d.ts +0 -21
- package/dist/cli/commands/runs.d.ts +0 -14
- package/dist/cli/cost-tracker.d.ts +0 -63
- package/dist/cli/exit.d.ts +0 -12
- package/dist/cli/input/ndjson-reader.d.ts +0 -31
- package/dist/cli/input-compiler.d.ts +0 -5
- package/dist/cli/main.d.ts +0 -5
- package/dist/cli/main.js +0 -415
- package/dist/cli/migrate-models.d.ts +0 -45
- package/dist/cli/onboarding.d.ts +0 -189
- package/dist/cli/output/renderer.d.ts +0 -28
- package/dist/cli/output/terminal-ui.d.ts +0 -50
- package/dist/cli/updater.d.ts +0 -65
- package/dist/client-base-GSFXPP2Y.js +0 -1
- package/dist/compaction-L3Y6NG4N.js +0 -1
- package/dist/context/compaction.d.ts +0 -116
- package/dist/context/manager.d.ts +0 -145
- package/dist/context/token-counter.d.ts +0 -27
- package/dist/context/tool-result-storage.d.ts +0 -96
- package/dist/cron/scheduler.d.ts +0 -34
- package/dist/data/openrouter-models.d.ts +0 -35
- package/dist/data/openrouter-sync.d.ts +0 -16
- package/dist/data/static-catalogs.d.ts +0 -25
- package/dist/devtools-FBX4HVVY.js +0 -1
- package/dist/engine/cost-store.d.ts +0 -22
- package/dist/engine/engine.d.ts +0 -236
- package/dist/engine/model-facade.d.ts +0 -24
- package/dist/engine/query.d.ts +0 -50
- package/dist/engine/streaming-tool-queue.d.ts +0 -34
- package/dist/engine/token-budget.d.ts +0 -22
- package/dist/engine/tool-summary.d.ts +0 -13
- package/dist/engine/turn-loop.d.ts +0 -122
- package/dist/engine/turn-state.d.ts +0 -20
- package/dist/exceptions.d.ts +0 -44
- package/dist/export-md-U72T7NW7.js +0 -22
- package/dist/file-history-7FQFEQOL.js +0 -1
- package/dist/git/utils.d.ts +0 -35
- package/dist/git/worktree.d.ts +0 -36
- package/dist/hooks/events.d.ts +0 -114
- package/dist/hooks/inject.d.ts +0 -19
- package/dist/hooks/registry.d.ts +0 -15
- package/dist/hooks/shell-runner.d.ts +0 -45
- package/dist/llm/api-key-sanitize.d.ts +0 -22
- package/dist/llm/capabilities/index.d.ts +0 -20
- package/dist/llm/capabilities/rules.d.ts +0 -26
- package/dist/llm/capabilities/types.d.ts +0 -108
- package/dist/llm/client-base.d.ts +0 -29
- package/dist/llm/client-factory.d.ts +0 -10
- package/dist/llm/model-cache.d.ts +0 -21
- package/dist/llm/model-fetcher.d.ts +0 -29
- package/dist/llm/model-pool.d.ts +0 -84
- package/dist/llm/provider-catalog.d.ts +0 -32
- package/dist/llm/provider-kinds.d.ts +0 -21
- package/dist/llm/providers/anthropic.d.ts +0 -19
- package/dist/llm/providers/openai.d.ts +0 -64
- package/dist/llm/retry.d.ts +0 -12
- package/dist/llm/stream-watchdog.d.ts +0 -42
- package/dist/llm/token-counter.d.ts +0 -17
- package/dist/llm/types.d.ts +0 -37
- package/dist/logging/logger.d.ts +0 -102
- package/dist/logging/session-recorder.d.ts +0 -90
- package/dist/lsp/client.d.ts +0 -41
- package/dist/lsp/manager.d.ts +0 -40
- package/dist/lsp/servers.d.ts +0 -16
- package/dist/manager-4XKLZHKE.js +0 -1
- package/dist/mcp-manager-3JGHEJO3.js +0 -1
- package/dist/memory-BNI4WEWL.js +0 -1
- package/dist/model-cache-HEDXI7UJ.js +0 -1
- package/dist/model-fetcher-X5W5EASG.js +0 -1
- package/dist/native-ts/yoga-layout/enums.d.ts +0 -117
- package/dist/native-ts/yoga-layout/index.d.ts +0 -270
- package/dist/off-7SDVMMXW.js +0 -1
- package/dist/openai-OQ6LLN5J.js +0 -1
- package/dist/openrouter-models-ZT4R2AE3.js +0 -1
- package/dist/openrouter-sync-ARMVWY7S.js +0 -1
- package/dist/plugin-handler-GJISMH5Q.js +0 -11
- package/dist/plugins/gitOps.d.ts +0 -23
- package/dist/plugins/installedPlugins.d.ts +0 -15
- package/dist/plugins/knownMarketplaces.d.ts +0 -10
- package/dist/plugins/loadPluginHooks.d.ts +0 -52
- package/dist/plugins/marketplaceManager.d.ts +0 -49
- package/dist/plugins/parseMarketplaceInput.d.ts +0 -16
- package/dist/plugins/pluginCommandHook.d.ts +0 -54
- package/dist/plugins/pluginCommandsLoader.d.ts +0 -25
- package/dist/plugins/pluginInstaller.d.ts +0 -36
- package/dist/plugins/schemas.d.ts +0 -9
- package/dist/plugins/types.d.ts +0 -75
- package/dist/plugins/varRewrite.d.ts +0 -42
- package/dist/preset/index.d.ts +0 -60
- package/dist/product/define.d.ts +0 -60
- package/dist/product/index.d.ts +0 -5
- package/dist/product/index.js +0 -1
- package/dist/product/types.d.ts +0 -111
- package/dist/prompt/composer.d.ts +0 -42
- package/dist/prompt/instruction-scanner.d.ts +0 -54
- package/dist/prompt/section-cache.d.ts +0 -15
- package/dist/prompt/section-loader.d.ts +0 -26
- package/dist/protocol/client.d.ts +0 -64
- package/dist/protocol/helpers.d.ts +0 -42
- package/dist/protocol/index.d.ts +0 -4
- package/dist/protocol/server.d.ts +0 -51
- package/dist/protocol/transport.d.ts +0 -36
- package/dist/protocol/types.d.ts +0 -192
- package/dist/react-compiler-runtime-shim.d.ts +0 -1
- package/dist/remote/bridge.d.ts +0 -37
- package/dist/render/Ansi.d.ts +0 -10
- package/dist/render/bidi.d.ts +0 -15
- package/dist/render/clearTerminal.d.ts +0 -19
- package/dist/render/colorize.d.ts +0 -16
- package/dist/render/components/AlternateScreen.d.ts +0 -21
- package/dist/render/components/App.d.ts +0 -71
- package/dist/render/components/AppContext.d.ts +0 -11
- package/dist/render/components/Box.d.ts +0 -49
- package/dist/render/components/Button.d.ts +0 -36
- package/dist/render/components/ClockContext.d.ts +0 -9
- package/dist/render/components/CursorDeclarationContext.d.ts +0 -22
- package/dist/render/components/ErrorOverview.d.ts +0 -5
- package/dist/render/components/Link.d.ts +0 -7
- package/dist/render/components/Newline.d.ts +0 -12
- package/dist/render/components/NoSelect.d.ts +0 -19
- package/dist/render/components/RawAnsi.d.ts +0 -16
- package/dist/render/components/ScrollBox.d.ts +0 -78
- package/dist/render/components/Spacer.d.ts +0 -5
- package/dist/render/components/Static.d.ts +0 -23
- package/dist/render/components/StdinContext.d.ts +0 -27
- package/dist/render/components/TerminalFocusContext.d.ts +0 -10
- package/dist/render/components/TerminalSizeContext.d.ts +0 -5
- package/dist/render/components/Text.d.ts +0 -55
- package/dist/render/constants.d.ts +0 -1
- package/dist/render/cursor.d.ts +0 -8
- package/dist/render/devtools.d.ts +0 -9
- package/dist/render/dom.d.ts +0 -77
- package/dist/render/events/click-event.d.ts +0 -31
- package/dist/render/events/dispatcher.d.ts +0 -40
- package/dist/render/events/emitter.d.ts +0 -5
- package/dist/render/events/event-handlers.d.ts +0 -46
- package/dist/render/events/event.d.ts +0 -5
- package/dist/render/events/focus-event.d.ts +0 -13
- package/dist/render/events/input-event.d.ts +0 -30
- package/dist/render/events/keyboard-event.d.ts +0 -19
- package/dist/render/events/paste-event.d.ts +0 -8
- package/dist/render/events/resize-event.d.ts +0 -9
- package/dist/render/events/terminal-event.d.ts +0 -54
- package/dist/render/events/terminal-focus-event.d.ts +0 -13
- package/dist/render/focus.d.ts +0 -43
- package/dist/render/frame.d.ts +0 -95
- package/dist/render/get-max-width.d.ts +0 -17
- package/dist/render/hit-test.d.ts +0 -33
- package/dist/render/hooks/use-animation-frame.d.ts +0 -26
- package/dist/render/hooks/use-app.d.ts +0 -5
- package/dist/render/hooks/use-declared-cursor.d.ts +0 -26
- package/dist/render/hooks/use-input.d.ts +0 -37
- package/dist/render/hooks/use-interval.d.ts +0 -18
- package/dist/render/hooks/use-search-highlight.d.ts +0 -30
- package/dist/render/hooks/use-selection.d.ts +0 -39
- package/dist/render/hooks/use-stdin.d.ts +0 -5
- package/dist/render/hooks/use-tab-status.d.ts +0 -13
- package/dist/render/hooks/use-terminal-focus.d.ts +0 -10
- package/dist/render/hooks/use-terminal-title.d.ts +0 -12
- package/dist/render/hooks/use-terminal-viewport.d.ts +0 -29
- package/dist/render/index.d.ts +0 -30
- package/dist/render/ink.d.ts +0 -391
- package/dist/render/instances.d.ts +0 -3
- package/dist/render/layout/engine.d.ts +0 -2
- package/dist/render/layout/geometry.d.ts +0 -30
- package/dist/render/layout/node.d.ts +0 -125
- package/dist/render/layout/yoga.d.ts +0 -56
- package/dist/render/line-width-cache.d.ts +0 -1
- package/dist/render/log-update.d.ts +0 -28
- package/dist/render/measure-element.d.ts +0 -16
- package/dist/render/measure-text.d.ts +0 -6
- package/dist/render/node-cache.d.ts +0 -20
- package/dist/render/optimizer.d.ts +0 -15
- package/dist/render/output.d.ts +0 -119
- package/dist/render/parse-keypress.d.ts +0 -111
- package/dist/render/reconciler.d.ts +0 -11
- package/dist/render/render-border.d.ts +0 -24
- package/dist/render/render-node-to-output.d.ts +0 -45
- package/dist/render/render-to-screen.d.ts +0 -46
- package/dist/render/renderer.d.ts +0 -14
- package/dist/render/root.d.ts +0 -74
- package/dist/render/screen.d.ts +0 -269
- package/dist/render/searchHighlight.d.ts +0 -20
- package/dist/render/selection.d.ts +0 -229
- package/dist/render/squash-text-nodes.d.ts +0 -22
- package/dist/render/stringWidth.d.ts +0 -1
- package/dist/render/styles.d.ts +0 -306
- package/dist/render/supports-hyperlinks.d.ts +0 -13
- package/dist/render/tabstops.d.ts +0 -1
- package/dist/render/terminal-focus-state.d.ts +0 -6
- package/dist/render/terminal-querier.d.ts +0 -129
- package/dist/render/terminal.d.ts +0 -46
- package/dist/render/termio/ansi.d.ts +0 -65
- package/dist/render/termio/csi.d.ts +0 -165
- package/dist/render/termio/dec.d.ts +0 -37
- package/dist/render/termio/esc.d.ts +0 -12
- package/dist/render/termio/osc.d.ts +0 -173
- package/dist/render/termio/parser.d.ts +0 -35
- package/dist/render/termio/sgr.d.ts +0 -8
- package/dist/render/termio/tokenize.d.ts +0 -45
- package/dist/render/termio/types.d.ts +0 -190
- package/dist/render/termio.d.ts +0 -24
- package/dist/render/useTerminalNotification.d.ts +0 -28
- package/dist/render/warn.d.ts +0 -1
- package/dist/render/widest-line.d.ts +0 -1
- package/dist/render/wrap-text.d.ts +0 -2
- package/dist/render/wrapAnsi.d.ts +0 -7
- package/dist/run/ArtifactTracker.d.ts +0 -38
- package/dist/run/CheckpointWriter.d.ts +0 -53
- package/dist/run/EngineRunner.d.ts +0 -72
- package/dist/run/Evaluator.d.ts +0 -56
- package/dist/run/FileRunStore.d.ts +0 -39
- package/dist/run/Heartbeat.d.ts +0 -54
- package/dist/run/RunApprovalBackend.d.ts +0 -53
- package/dist/run/RunLock.d.ts +0 -40
- package/dist/run/RunManager.d.ts +0 -82
- package/dist/run/RunQueue.d.ts +0 -27
- package/dist/run/RunStore.d.ts +0 -25
- package/dist/run/factory.d.ts +0 -63
- package/dist/run/index.d.ts +0 -17
- package/dist/run/index.js +0 -1
- package/dist/run/types.d.ts +0 -136
- package/dist/seatbelt-L54CNI2Y.js +0 -37
- package/dist/services/analytics.d.ts +0 -29
- package/dist/services/auto-dream.d.ts +0 -35
- package/dist/services/diagnostics.d.ts +0 -41
- package/dist/services/extract-memories.d.ts +0 -27
- package/dist/services/index.d.ts +0 -11
- package/dist/services/memory-orchestrator.d.ts +0 -39
- package/dist/services/notifier.d.ts +0 -25
- package/dist/services/oauth.d.ts +0 -27
- package/dist/services/session-memory.d.ts +0 -37
- package/dist/session/file-history.d.ts +0 -41
- package/dist/session/memory.d.ts +0 -65
- package/dist/session/session-manager.d.ts +0 -28
- package/dist/session/transcript.d.ts +0 -39
- package/dist/session-manager-AGWS5SMJ.js +0 -1
- package/dist/settings/manager.d.ts +0 -36
- package/dist/settings/schema.d.ts +0 -1123
- package/dist/skills/frontmatter.d.ts +0 -13
- package/dist/skills/index.d.ts +0 -7
- package/dist/skills/scanner.d.ts +0 -20
- package/dist/tool-summary-HJX6RHG4.js +0 -2
- package/dist/tool-system/builtin/agent-notifications.d.ts +0 -55
- package/dist/tool-system/builtin/agent-registry.d.ts +0 -67
- package/dist/tool-system/builtin/agent-transcript-translator.d.ts +0 -22
- package/dist/tool-system/builtin/agent.d.ts +0 -16
- package/dist/tool-system/builtin/apply-patch/applier.d.ts +0 -26
- package/dist/tool-system/builtin/apply-patch/index.d.ts +0 -19
- package/dist/tool-system/builtin/apply-patch/parser.d.ts +0 -17
- package/dist/tool-system/builtin/apply-patch/seek-sequence.d.ts +0 -18
- package/dist/tool-system/builtin/apply-patch/types.d.ts +0 -49
- package/dist/tool-system/builtin/arena.d.ts +0 -31
- package/dist/tool-system/builtin/ask-user.d.ts +0 -20
- package/dist/tool-system/builtin/bash.d.ts +0 -12
- package/dist/tool-system/builtin/brief.d.ts +0 -6
- package/dist/tool-system/builtin/config.d.ts +0 -6
- package/dist/tool-system/builtin/cron.d.ts +0 -10
- package/dist/tool-system/builtin/edit.d.ts +0 -6
- package/dist/tool-system/builtin/file-cache.d.ts +0 -11
- package/dist/tool-system/builtin/glob.d.ts +0 -6
- package/dist/tool-system/builtin/grep.d.ts +0 -6
- package/dist/tool-system/builtin/index.d.ts +0 -20
- package/dist/tool-system/builtin/lsp.d.ts +0 -6
- package/dist/tool-system/builtin/mcp-tools.d.ts +0 -10
- package/dist/tool-system/builtin/notebook-edit.d.ts +0 -6
- package/dist/tool-system/builtin/plan.d.ts +0 -18
- package/dist/tool-system/builtin/powershell.d.ts +0 -6
- package/dist/tool-system/builtin/read.d.ts +0 -6
- package/dist/tool-system/builtin/remote-trigger.d.ts +0 -6
- package/dist/tool-system/builtin/repl.d.ts +0 -6
- package/dist/tool-system/builtin/send-message.d.ts +0 -6
- package/dist/tool-system/builtin/skill-prompt.d.ts +0 -7
- package/dist/tool-system/builtin/skill.d.ts +0 -8
- package/dist/tool-system/builtin/sleep.d.ts +0 -6
- package/dist/tool-system/builtin/task.d.ts +0 -51
- package/dist/tool-system/builtin/tool-search.d.ts +0 -11
- package/dist/tool-system/builtin/web-fetch.d.ts +0 -6
- package/dist/tool-system/builtin/web-search.d.ts +0 -6
- package/dist/tool-system/builtin/worktree.d.ts +0 -10
- package/dist/tool-system/builtin/write.d.ts +0 -6
- package/dist/tool-system/context.d.ts +0 -133
- package/dist/tool-system/executor.d.ts +0 -49
- package/dist/tool-system/investigation-guard.d.ts +0 -46
- package/dist/tool-system/mcp-manager.d.ts +0 -50
- package/dist/tool-system/permission.d.ts +0 -104
- package/dist/tool-system/registry.d.ts +0 -32
- package/dist/tool-system/sandbox/bwrap.d.ts +0 -13
- package/dist/tool-system/sandbox/index.d.ts +0 -78
- package/dist/tool-system/sandbox/off.d.ts +0 -2
- package/dist/tool-system/sandbox/seatbelt.d.ts +0 -18
- package/dist/tool-system/task-guard.d.ts +0 -30
- package/dist/tool-system/validation.d.ts +0 -5
- package/dist/types.d.ts +0 -356
- package/dist/ui/App.d.ts +0 -14
- package/dist/ui/components/AgentBlock.d.ts +0 -35
- package/dist/ui/components/AgentDock.d.ts +0 -36
- package/dist/ui/components/AskUserPrompt.d.ts +0 -14
- package/dist/ui/components/BabyHand.d.ts +0 -1
- package/dist/ui/components/Banner.d.ts +0 -8
- package/dist/ui/components/CodeBlock.d.ts +0 -7
- package/dist/ui/components/CommandInput.d.ts +0 -24
- package/dist/ui/components/ContextUsageBar.d.ts +0 -7
- package/dist/ui/components/DiffLine.d.ts +0 -33
- package/dist/ui/components/DiffView.d.ts +0 -6
- package/dist/ui/components/DogLogo.d.ts +0 -1
- package/dist/ui/components/FullscreenLayout.d.ts +0 -51
- package/dist/ui/components/KunHead.d.ts +0 -1
- package/dist/ui/components/KunLogo.d.ts +0 -1
- package/dist/ui/components/MessageContent.d.ts +0 -26
- package/dist/ui/components/MessageRow.d.ts +0 -54
- package/dist/ui/components/ModelManager.d.ts +0 -68
- package/dist/ui/components/ModelSelector.d.ts +0 -10
- package/dist/ui/components/OnboardingPrompt.d.ts +0 -16
- package/dist/ui/components/PermissionDialog.d.ts +0 -8
- package/dist/ui/components/PermissionPrompt.d.ts +0 -11
- package/dist/ui/components/ProviderModelFlow.d.ts +0 -58
- package/dist/ui/components/ScrollView.d.ts +0 -34
- package/dist/ui/components/SessionPicker.d.ts +0 -16
- package/dist/ui/components/Spinner.d.ts +0 -8
- package/dist/ui/components/SpinnerWithVerb.d.ts +0 -19
- package/dist/ui/components/StatusLine.d.ts +0 -28
- package/dist/ui/components/StructuredDiff.d.ts +0 -8
- package/dist/ui/components/TaskList.d.ts +0 -6
- package/dist/ui/components/TextInput.d.ts +0 -17
- package/dist/ui/components/ThemedBox.d.ts +0 -19
- package/dist/ui/components/ThemedText.d.ts +0 -26
- package/dist/ui/components/ToolCall.d.ts +0 -28
- package/dist/ui/components/UpdateBanner.d.ts +0 -1
- package/dist/ui/components/VirtualMessageList.d.ts +0 -43
- package/dist/ui/components/WelcomeTips.d.ts +0 -5
- package/dist/ui/dev-seed.d.ts +0 -1
- package/dist/ui/fullscreen-mode.d.ts +0 -9
- package/dist/ui/hooks/useCostSummary.d.ts +0 -1
- package/dist/ui/hooks/useVirtualScroll.d.ts +0 -101
- package/dist/ui/index.d.ts +0 -12
- package/dist/ui/input-history.d.ts +0 -61
- package/dist/ui/onboarding-runner.d.ts +0 -2
- package/dist/ui/perf-probes.d.ts +0 -22
- package/dist/ui/query-guard.d.ts +0 -35
- package/dist/ui/slice-anchor.d.ts +0 -44
- package/dist/ui/store.d.ts +0 -108
- package/dist/ui/terminal-renderer.d.ts +0 -45
- package/dist/ui/theme.d.ts +0 -36
- package/dist/ui/vim-mode.d.ts +0 -25
- package/dist/updater-OCNU2K2Z.js +0 -1
- package/dist/utils/debug.d.ts +0 -41
- package/dist/utils/earlyInput.d.ts +0 -43
- package/dist/utils/env.d.ts +0 -24
- package/dist/utils/envUtils.d.ts +0 -51
- package/dist/utils/execFileNoThrow.d.ts +0 -39
- package/dist/utils/format.d.ts +0 -44
- package/dist/utils/fullscreen.d.ts +0 -47
- package/dist/utils/intl.d.ts +0 -22
- package/dist/utils/lockfile.d.ts +0 -15
- package/dist/utils/semver.d.ts +0 -6
- package/dist/utils/sliceAnsi.d.ts +0 -12
- package/dist/utils/systemTheme.d.ts +0 -40
- package/dist/utils/task-sanitizer.d.ts +0 -6
- package/dist/utils/theme.d.ts +0 -91
- package/dist/utils/toolDisplay.d.ts +0 -31
- package/dist/utils/truncate.d.ts +0 -40
- package/dist/voice/index.d.ts +0 -35
package/dist/run/index.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Run module — managed agent run lifecycle.
|
|
3
|
-
*/
|
|
4
|
-
export type { RunStatus, RunSnapshot, RunEventType, RunEvent, RunCheckpoint, ApprovalStatus, ApprovalCategory, RunApproval, ArtifactKind, ArtifactRole, RunArtifactRef, SubmitRunInput, ResumeRunInput, ListRunsQuery, RunExecutionContext, RunExecutionResult, RunStreamEvent, RunStreamCallback, DetachFn, } from "./types.js";
|
|
5
|
-
export { VALID_TRANSITIONS } from "./types.js";
|
|
6
|
-
export type { RunStore } from "./RunStore.js";
|
|
7
|
-
export { FileRunStore } from "./FileRunStore.js";
|
|
8
|
-
export { RunQueue } from "./RunQueue.js";
|
|
9
|
-
export { RunApprovalBackend, createRunAskUserFn, type RunLifecycleHooks, type PendingApproval, type PendingInput, } from "./RunApprovalBackend.js";
|
|
10
|
-
export { CheckpointWriter, type CheckpointWriterConfig } from "./CheckpointWriter.js";
|
|
11
|
-
export { ArtifactTracker, type ArtifactTrackerConfig } from "./ArtifactTracker.js";
|
|
12
|
-
export { RunLock, type RunLockConfig } from "./RunLock.js";
|
|
13
|
-
export { Heartbeat, type HeartbeatConfig, type HeartbeatData } from "./Heartbeat.js";
|
|
14
|
-
export { NoopEvaluator, CompositeEvaluator, type Evaluator, type EvaluatorResult, type EvaluatorVerdict, type EvaluatorContext, } from "./Evaluator.js";
|
|
15
|
-
export { EngineRunner, type EngineRunnerConfig, type RunExecutionHandle, type RunExecutor, type CustomToolEntry, } from "./EngineRunner.js";
|
|
16
|
-
export { RunManager, type RunManagerConfig } from "./RunManager.js";
|
|
17
|
-
export { createRunManager, type CreateRunManagerOptions } from "./factory.js";
|
package/dist/run/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{a as createRunManager}from'../chunk-5QIVXFCT.js';export{Y as ArtifactTracker,X as CheckpointWriter,aa as CompositeEvaluator,fa as EngineRunner,T as FileRunStore,_ as Heartbeat,$ as NoopEvaluator,V as RunApprovalBackend,Z as RunLock,ga as RunManager,U as RunQueue,S as VALID_TRANSITIONS,W as createRunAskUserFn}from'../chunk-Z5HKHAO7.js';import'../chunk-SKIX2M5Z.js';import'../chunk-MLCTC53I.js';import'../chunk-WI6FSWGU.js';import'../chunk-P6JSTIFM.js';import'../chunk-SNFAPSLA.js';import'../chunk-D3TVASD2.js';import'../chunk-FZXY554D.js';import'../chunk-M7VU4YVY.js';import'../chunk-T222K6IV.js';import'../chunk-QTWU7UNA.js';import'../chunk-K4HILJ6G.js';import'../chunk-WONQHE4P.js';import'../chunk-GKAQH2DG.js';import'../chunk-FU7AHZNN.js';import'../chunk-DI26OUIU.js';import'../chunk-3QP5BQ3L.js';
|
package/dist/run/types.d.ts
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Run — managed lifecycle types for long-running agent tasks.
|
|
3
|
-
*
|
|
4
|
-
* A Run wraps one or more Engine executions with queue, state machine,
|
|
5
|
-
* checkpoint, approval, and artifact tracking.
|
|
6
|
-
*/
|
|
7
|
-
import type { AgentPresetName } from "../preset/index.js";
|
|
8
|
-
export type RunStatus = "queued" | "running" | "waiting_input" | "waiting_approval" | "blocked" | "completed" | "failed" | "cancelled";
|
|
9
|
-
export interface RunSnapshot {
|
|
10
|
-
runId: string;
|
|
11
|
-
objective: string;
|
|
12
|
-
preset: AgentPresetName;
|
|
13
|
-
cwd: string;
|
|
14
|
-
status: RunStatus;
|
|
15
|
-
createdAt: number;
|
|
16
|
-
updatedAt: number;
|
|
17
|
-
startedAt: number | null;
|
|
18
|
-
finishedAt: number | null;
|
|
19
|
-
parentRunId: string | null;
|
|
20
|
-
sessionId: string | null;
|
|
21
|
-
childSessionIds: string[];
|
|
22
|
-
attemptCount: number;
|
|
23
|
-
latestCheckpointId: string | null;
|
|
24
|
-
latestApprovalId: string | null;
|
|
25
|
-
summary: string | null;
|
|
26
|
-
error: string | null;
|
|
27
|
-
tags: string[];
|
|
28
|
-
metadata: Record<string, unknown>;
|
|
29
|
-
}
|
|
30
|
-
export type RunEventType = "run_created" | "run_queued" | "run_started" | "session_linked" | "checkpoint_written" | "artifact_recorded" | "approval_requested" | "approval_resolved" | "run_blocked" | "run_resumed" | "run_completed" | "run_failed" | "run_cancelled";
|
|
31
|
-
export interface RunEvent {
|
|
32
|
-
eventId: string;
|
|
33
|
-
runId: string;
|
|
34
|
-
type: RunEventType;
|
|
35
|
-
timestamp: number;
|
|
36
|
-
data: Record<string, unknown>;
|
|
37
|
-
}
|
|
38
|
-
export interface RunCheckpoint {
|
|
39
|
-
checkpointId: string;
|
|
40
|
-
runId: string;
|
|
41
|
-
createdAt: number;
|
|
42
|
-
phase: string;
|
|
43
|
-
objective: string;
|
|
44
|
-
summary: string;
|
|
45
|
-
nextAction: string | null;
|
|
46
|
-
linkedSessionId: string | null;
|
|
47
|
-
touchedTools: string[];
|
|
48
|
-
touchedArtifacts: string[];
|
|
49
|
-
waitingFor: null | {
|
|
50
|
-
kind: "input";
|
|
51
|
-
prompt: string;
|
|
52
|
-
} | {
|
|
53
|
-
kind: "approval";
|
|
54
|
-
approvalId: string;
|
|
55
|
-
};
|
|
56
|
-
evaluator: null | {
|
|
57
|
-
status: "pending" | "passed" | "failed";
|
|
58
|
-
findings: string[];
|
|
59
|
-
};
|
|
60
|
-
metadata: Record<string, unknown>;
|
|
61
|
-
}
|
|
62
|
-
export type ApprovalStatus = "pending" | "approved" | "rejected";
|
|
63
|
-
export type ApprovalCategory = "tool" | "artifact_publish" | "workflow_transition" | "custom";
|
|
64
|
-
export interface RunApproval {
|
|
65
|
-
approvalId: string;
|
|
66
|
-
runId: string;
|
|
67
|
-
createdAt: number;
|
|
68
|
-
resolvedAt: number | null;
|
|
69
|
-
status: ApprovalStatus;
|
|
70
|
-
category: ApprovalCategory;
|
|
71
|
-
title: string;
|
|
72
|
-
description: string;
|
|
73
|
-
payload: Record<string, unknown>;
|
|
74
|
-
}
|
|
75
|
-
export type ArtifactKind = "file" | "document" | "diagram" | "prototype" | "resource" | "custom";
|
|
76
|
-
export type ArtifactRole = "input" | "output" | "checkpoint" | "supporting";
|
|
77
|
-
export interface RunArtifactRef {
|
|
78
|
-
artifactRefId: string;
|
|
79
|
-
runId: string;
|
|
80
|
-
kind: ArtifactKind;
|
|
81
|
-
title: string;
|
|
82
|
-
locator: string;
|
|
83
|
-
role: ArtifactRole;
|
|
84
|
-
version: string | null;
|
|
85
|
-
metadata: Record<string, unknown>;
|
|
86
|
-
}
|
|
87
|
-
export interface SubmitRunInput {
|
|
88
|
-
objective: string;
|
|
89
|
-
preset?: AgentPresetName;
|
|
90
|
-
cwd?: string;
|
|
91
|
-
parentRunId?: string;
|
|
92
|
-
tags?: string[];
|
|
93
|
-
metadata?: Record<string, unknown>;
|
|
94
|
-
}
|
|
95
|
-
export interface ResumeRunInput {
|
|
96
|
-
userInput?: string;
|
|
97
|
-
approvalDecision?: {
|
|
98
|
-
approvalId: string;
|
|
99
|
-
approved: boolean;
|
|
100
|
-
reason?: string;
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
export interface ListRunsQuery {
|
|
104
|
-
status?: RunStatus | RunStatus[];
|
|
105
|
-
tag?: string;
|
|
106
|
-
limit?: number;
|
|
107
|
-
offset?: number;
|
|
108
|
-
}
|
|
109
|
-
export interface RunExecutionContext {
|
|
110
|
-
onStream?: import("../types.js").StreamCallback;
|
|
111
|
-
signal?: AbortSignal;
|
|
112
|
-
engineConfigOverrides?: Record<string, unknown>;
|
|
113
|
-
}
|
|
114
|
-
export interface RunExecutionResult {
|
|
115
|
-
text: string;
|
|
116
|
-
reason: import("../types.js").TerminalReason;
|
|
117
|
-
sessionId: string;
|
|
118
|
-
turnCount: number;
|
|
119
|
-
}
|
|
120
|
-
export type RunStreamEvent = {
|
|
121
|
-
type: "run_status_changed";
|
|
122
|
-
run: RunSnapshot;
|
|
123
|
-
} | {
|
|
124
|
-
type: "run_event";
|
|
125
|
-
event: RunEvent;
|
|
126
|
-
} | {
|
|
127
|
-
type: "engine_stream";
|
|
128
|
-
event: import("../types.js").StreamEvent;
|
|
129
|
-
};
|
|
130
|
-
export type RunStreamCallback = (event: RunStreamEvent) => void | Promise<void>;
|
|
131
|
-
export type DetachFn = () => void;
|
|
132
|
-
/**
|
|
133
|
-
* Valid state transitions for a Run.
|
|
134
|
-
* Key = current status, Value = allowed next statuses.
|
|
135
|
-
*/
|
|
136
|
-
export declare const VALID_TRANSITIONS: Record<RunStatus, RunStatus[]>;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import {h,a}from'./chunk-3QP5BQ3L.js';import {mkdtempSync,writeFileSync,rmSync}from'fs';import {tmpdir}from'os';import {join}from'path';h();function y(e){return {name:"seatbelt",wrap(o,l){let n=b(e),t=mkdtempSync(join(tmpdir(),"codeshell-sandbox-")),a$1=join(t,"profile.sb");return writeFileSync(a$1,n,"utf-8"),{file:"/usr/bin/sandbox-exec",args:["-f",a$1,l.shell,"-c",o],cleanup:a(()=>{try{rmSync(t,{recursive:!0,force:!0});}catch{}},"cleanup")}},hintForBlockedOutput(o){if(/Operation not permitted|sandbox/.test(o))return `
|
|
2
|
-
[sandbox:seatbelt] A syscall was blocked by the sandbox. If this path should be writable or this network call legitimate, ask the user to update sandbox.writableRoots / sandbox.network in settings.json.`}}}a(y,"createSeatbeltBackend");function b(e){let o=e.writableRoots.map(t=>` (subpath ${d(t)})`).join(`
|
|
3
|
-
`),l=e.deniedReads.map(t=>` (subpath ${d(t)})`).join(`
|
|
4
|
-
`),n=e.network==="deny"?"(deny network-outbound)":"(allow network*)";return `(version 1)
|
|
5
|
-
(deny default)
|
|
6
|
-
|
|
7
|
-
;; Process control
|
|
8
|
-
(allow process-fork)
|
|
9
|
-
(allow process-exec)
|
|
10
|
-
(allow signal (target self))
|
|
11
|
-
(allow signal (target children))
|
|
12
|
-
|
|
13
|
-
;; Reads: broadly allowed, then explicit deny of sensitive paths
|
|
14
|
-
(allow file-read*)
|
|
15
|
-
${l?`(deny file-read*
|
|
16
|
-
${l})`:""}
|
|
17
|
-
|
|
18
|
-
;; Writes: workspace + listed roots only
|
|
19
|
-
(allow file-write*
|
|
20
|
-
${o})
|
|
21
|
-
(allow file-write-data
|
|
22
|
-
(literal "/dev/null")
|
|
23
|
-
(literal "/dev/zero")
|
|
24
|
-
(literal "/dev/random")
|
|
25
|
-
(literal "/dev/urandom")
|
|
26
|
-
(literal "/dev/dtracehelper"))
|
|
27
|
-
|
|
28
|
-
;; IPC & system services common tools need
|
|
29
|
-
(allow mach-lookup)
|
|
30
|
-
(allow ipc-posix-shm)
|
|
31
|
-
(allow sysctl-read)
|
|
32
|
-
(allow system-socket)
|
|
33
|
-
(allow iokit-open)
|
|
34
|
-
|
|
35
|
-
;; Network
|
|
36
|
-
${n}
|
|
37
|
-
`}a(b,"buildProfile");function d(e){return `"${e.replace(/"/g,'\\"')}"`}a(d,"quote");export{y as createSeatbeltBackend};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Analytics service — event tracking and telemetry.
|
|
3
|
-
*
|
|
4
|
-
* Provides a lightweight analytics pipeline that queues events
|
|
5
|
-
* and flushes them to configured sinks (file, console, or remote).
|
|
6
|
-
*/
|
|
7
|
-
export interface AnalyticsEvent {
|
|
8
|
-
name: string;
|
|
9
|
-
properties?: Record<string, unknown>;
|
|
10
|
-
timestamp?: string;
|
|
11
|
-
}
|
|
12
|
-
type AnalyticsSink = (events: AnalyticsEvent[]) => void;
|
|
13
|
-
declare class AnalyticsService {
|
|
14
|
-
private queue;
|
|
15
|
-
private sinks;
|
|
16
|
-
private flushTimer;
|
|
17
|
-
private initialized;
|
|
18
|
-
/**
|
|
19
|
-
* Initialize the analytics service with default file sink.
|
|
20
|
-
*/
|
|
21
|
-
init(): void;
|
|
22
|
-
addSink(sink: AnalyticsSink): void;
|
|
23
|
-
track(name: string, properties?: Record<string, unknown>): void;
|
|
24
|
-
flush(): void;
|
|
25
|
-
shutdown(): void;
|
|
26
|
-
}
|
|
27
|
-
export declare const analytics: AnalyticsService;
|
|
28
|
-
export declare function trackEvent(name: string, properties?: Record<string, unknown>): void;
|
|
29
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AutoDream service — background memory consolidation.
|
|
3
|
-
*
|
|
4
|
-
* Periodically consolidates and organizes memories using the LLM,
|
|
5
|
-
* similar to the /dream command but running automatically.
|
|
6
|
-
*/
|
|
7
|
-
export interface AutoDreamConfig {
|
|
8
|
-
/** Minimum sessions between dream runs */
|
|
9
|
-
minSessionsBetween: number;
|
|
10
|
-
/** Minimum time between dream runs (ms) */
|
|
11
|
-
minTimeBetween: number;
|
|
12
|
-
/** Whether auto-dream is enabled */
|
|
13
|
-
enabled: boolean;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Check if auto-dream should run.
|
|
17
|
-
*/
|
|
18
|
-
export declare function shouldAutoDream(config?: AutoDreamConfig): boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Record that a session was completed (increment counter).
|
|
21
|
-
*/
|
|
22
|
-
export declare function recordSession(): void;
|
|
23
|
-
/**
|
|
24
|
-
* Record that a dream run completed.
|
|
25
|
-
*/
|
|
26
|
-
export declare function recordDreamComplete(): void;
|
|
27
|
-
/**
|
|
28
|
-
* Build the consolidation prompt for auto-dream.
|
|
29
|
-
*/
|
|
30
|
-
export declare function buildDreamPrompt(memories: Array<{
|
|
31
|
-
name: string;
|
|
32
|
-
type: string;
|
|
33
|
-
description: string;
|
|
34
|
-
content: string;
|
|
35
|
-
}>): string;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Diagnostics service — error tracking and system health monitoring.
|
|
3
|
-
*
|
|
4
|
-
* Collects and reports diagnostic information for debugging.
|
|
5
|
-
*/
|
|
6
|
-
export interface DiagnosticEntry {
|
|
7
|
-
timestamp: string;
|
|
8
|
-
level: "error" | "warn" | "info";
|
|
9
|
-
category: string;
|
|
10
|
-
message: string;
|
|
11
|
-
metadata?: Record<string, unknown>;
|
|
12
|
-
stack?: string;
|
|
13
|
-
}
|
|
14
|
-
declare class DiagnosticsTracker {
|
|
15
|
-
private logDir;
|
|
16
|
-
private entries;
|
|
17
|
-
constructor();
|
|
18
|
-
/**
|
|
19
|
-
* Record a diagnostic event.
|
|
20
|
-
*/
|
|
21
|
-
record(level: DiagnosticEntry["level"], category: string, message: string, metadata?: Record<string, unknown>): void;
|
|
22
|
-
/**
|
|
23
|
-
* Record an error with stack trace.
|
|
24
|
-
*/
|
|
25
|
-
recordError(category: string, error: Error, metadata?: Record<string, unknown>): void;
|
|
26
|
-
/**
|
|
27
|
-
* Get recent diagnostic entries.
|
|
28
|
-
*/
|
|
29
|
-
getRecent(count?: number): DiagnosticEntry[];
|
|
30
|
-
/**
|
|
31
|
-
* Get entries by category.
|
|
32
|
-
*/
|
|
33
|
-
getByCategory(category: string): DiagnosticEntry[];
|
|
34
|
-
/**
|
|
35
|
-
* Generate a diagnostic report for troubleshooting.
|
|
36
|
-
*/
|
|
37
|
-
generateReport(): string;
|
|
38
|
-
private persist;
|
|
39
|
-
}
|
|
40
|
-
export declare const diagnostics: DiagnosticsTracker;
|
|
41
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extract Memories service — extract durable memories from session transcripts.
|
|
3
|
-
*
|
|
4
|
-
* Runs at the end of a query loop to identify important information
|
|
5
|
-
* worth persisting across sessions.
|
|
6
|
-
*/
|
|
7
|
-
export interface ExtractedMemory {
|
|
8
|
-
type: "user" | "feedback" | "project" | "reference";
|
|
9
|
-
name: string;
|
|
10
|
-
description: string;
|
|
11
|
-
content: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Build the prompt for extracting memories from a conversation.
|
|
15
|
-
*/
|
|
16
|
-
export declare function buildExtractionPrompt(transcript: Array<{
|
|
17
|
-
role: string;
|
|
18
|
-
content: string;
|
|
19
|
-
}>, existingMemories: Array<{
|
|
20
|
-
name: string;
|
|
21
|
-
type: string;
|
|
22
|
-
description: string;
|
|
23
|
-
}>): string;
|
|
24
|
-
/**
|
|
25
|
-
* Parse extracted memories from LLM response.
|
|
26
|
-
*/
|
|
27
|
-
export declare function parseExtractionResponse(response: string): ExtractedMemory[];
|
package/dist/services/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Services index — re-exports all service modules.
|
|
3
|
-
*/
|
|
4
|
-
export { analytics, trackEvent } from "./analytics.js";
|
|
5
|
-
export { authorize, refreshToken, type OAuthConfig, type OAuthTokens } from "./oauth.js";
|
|
6
|
-
export { notify, notifyComplete, notifyError } from "./notifier.js";
|
|
7
|
-
export { diagnostics } from "./diagnostics.js";
|
|
8
|
-
export { buildExtractionPrompt, parseExtractionResponse, type ExtractedMemory, } from "./extract-memories.js";
|
|
9
|
-
export { shouldAutoDream, recordSession, recordDreamComplete, buildDreamPrompt, } from "./auto-dream.js";
|
|
10
|
-
export { saveSessionMemory, loadSessionMemory, listSessionMemories, searchSessionMemories, buildSessionMemoryPrompt, } from "./session-memory.js";
|
|
11
|
-
export { MemoryOrchestrator, type MemoryOrchestratorOptions, type MemoryOrchestratorResult, } from "./memory-orchestrator.js";
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MemoryOrchestrator — ties extract-memories, session-memory, and auto-dream
|
|
3
|
-
* into a single end-of-session pipeline.
|
|
4
|
-
*
|
|
5
|
-
* Called by Engine.run() after the turn loop completes. Runs memory extraction
|
|
6
|
-
* and session summarisation via lightweight LLM calls, then conditionally
|
|
7
|
-
* triggers auto-dream consolidation. None of this blocks the Engine result.
|
|
8
|
-
*/
|
|
9
|
-
import { MemoryManager } from "../session/memory.js";
|
|
10
|
-
export interface MemoryOrchestratorOptions {
|
|
11
|
-
/** Lightweight LLM call — must be a non-streaming summarisation call. */
|
|
12
|
-
callLLM: (systemPrompt: string, userMsg: string) => Promise<string>;
|
|
13
|
-
/** Project root; when set, memories are scoped per-project. */
|
|
14
|
-
projectDir?: string;
|
|
15
|
-
/** Optional pre-constructed MemoryManager (avoids re-creating for every call). */
|
|
16
|
-
memoryManager?: MemoryManager;
|
|
17
|
-
}
|
|
18
|
-
export interface MemoryOrchestratorResult {
|
|
19
|
-
/** Number of new memory entries extracted and saved. */
|
|
20
|
-
extracted: number;
|
|
21
|
-
/** Whether the auto-dream consolidation was triggered. */
|
|
22
|
-
dreamTriggered: boolean;
|
|
23
|
-
}
|
|
24
|
-
export declare class MemoryOrchestrator {
|
|
25
|
-
private readonly options;
|
|
26
|
-
constructor(options: MemoryOrchestratorOptions);
|
|
27
|
-
/**
|
|
28
|
-
* Run the full end-of-session memory pipeline.
|
|
29
|
-
*
|
|
30
|
-
* 1. Extract durable memories from the transcript (extract-memories)
|
|
31
|
-
* 2. Summarise the session (session-memory)
|
|
32
|
-
* 3. Record a completed session for auto-dream tracking
|
|
33
|
-
* 4. Conditionally trigger auto-dream consolidation
|
|
34
|
-
*/
|
|
35
|
-
run(transcript: Array<{
|
|
36
|
-
role: string;
|
|
37
|
-
content: string;
|
|
38
|
-
}>, sessionId: string): Promise<MemoryOrchestratorResult>;
|
|
39
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Notifier service — desktop/system notifications.
|
|
3
|
-
*
|
|
4
|
-
* Sends notifications when tasks complete, agents finish, or errors occur.
|
|
5
|
-
* Falls back gracefully when no notification system is available.
|
|
6
|
-
*/
|
|
7
|
-
export interface NotificationOptions {
|
|
8
|
-
title: string;
|
|
9
|
-
message: string;
|
|
10
|
-
sound?: boolean;
|
|
11
|
-
/** Urgency level: low, normal, critical */
|
|
12
|
-
urgency?: "low" | "normal" | "critical";
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Send a desktop notification.
|
|
16
|
-
*/
|
|
17
|
-
export declare function notify(options: NotificationOptions): void;
|
|
18
|
-
/**
|
|
19
|
-
* Send a notification that a task/agent has completed.
|
|
20
|
-
*/
|
|
21
|
-
export declare function notifyComplete(taskName: string, duration?: number): void;
|
|
22
|
-
/**
|
|
23
|
-
* Send an error notification.
|
|
24
|
-
*/
|
|
25
|
-
export declare function notifyError(context: string, error: string): void;
|
package/dist/services/oauth.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OAuth service — OAuth 2.0 authorization code flow with PKCE.
|
|
3
|
-
*
|
|
4
|
-
* Supports browser-based login flow for API authentication.
|
|
5
|
-
*/
|
|
6
|
-
export interface OAuthConfig {
|
|
7
|
-
clientId: string;
|
|
8
|
-
authorizationEndpoint: string;
|
|
9
|
-
tokenEndpoint: string;
|
|
10
|
-
redirectUri?: string;
|
|
11
|
-
scopes?: string[];
|
|
12
|
-
}
|
|
13
|
-
export interface OAuthTokens {
|
|
14
|
-
accessToken: string;
|
|
15
|
-
refreshToken?: string;
|
|
16
|
-
expiresAt?: number;
|
|
17
|
-
tokenType: string;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Run the OAuth authorization code flow.
|
|
21
|
-
* Opens a browser for user login and waits for the callback.
|
|
22
|
-
*/
|
|
23
|
-
export declare function authorize(config: OAuthConfig): Promise<OAuthTokens>;
|
|
24
|
-
/**
|
|
25
|
-
* Refresh an access token using a refresh token.
|
|
26
|
-
*/
|
|
27
|
-
export declare function refreshToken(config: OAuthConfig, refreshTokenValue: string): Promise<OAuthTokens>;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Session Memory service — automatic session memory maintenance.
|
|
3
|
-
*
|
|
4
|
-
* Extracts and maintains conversation context as persistent memory
|
|
5
|
-
* entries that survive across sessions.
|
|
6
|
-
*/
|
|
7
|
-
export interface SessionMemoryEntry {
|
|
8
|
-
sessionId: string;
|
|
9
|
-
summary: string;
|
|
10
|
-
keyTopics: string[];
|
|
11
|
-
decisions: string[];
|
|
12
|
-
createdAt: string;
|
|
13
|
-
tokenCount?: number;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Save a session memory entry.
|
|
17
|
-
*/
|
|
18
|
-
export declare function saveSessionMemory(entry: SessionMemoryEntry): void;
|
|
19
|
-
/**
|
|
20
|
-
* Load a session memory by session ID.
|
|
21
|
-
*/
|
|
22
|
-
export declare function loadSessionMemory(sessionId: string): SessionMemoryEntry | null;
|
|
23
|
-
/**
|
|
24
|
-
* List all session memories, most recent first.
|
|
25
|
-
*/
|
|
26
|
-
export declare function listSessionMemories(limit?: number): SessionMemoryEntry[];
|
|
27
|
-
/**
|
|
28
|
-
* Search session memories by keyword.
|
|
29
|
-
*/
|
|
30
|
-
export declare function searchSessionMemories(query: string): SessionMemoryEntry[];
|
|
31
|
-
/**
|
|
32
|
-
* Build a prompt for extracting session memory from a conversation.
|
|
33
|
-
*/
|
|
34
|
-
export declare function buildSessionMemoryPrompt(messages: Array<{
|
|
35
|
-
role: string;
|
|
36
|
-
content: string;
|
|
37
|
-
}>): string;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* File history — automatic backup of files before modifications.
|
|
3
|
-
*
|
|
4
|
-
* Stores snapshots in the session directory under file-history/.
|
|
5
|
-
* Supports restoring files to a previous state.
|
|
6
|
-
*/
|
|
7
|
-
export interface FileSnapshot {
|
|
8
|
-
filePath: string;
|
|
9
|
-
timestamp: number;
|
|
10
|
-
backupPath: string;
|
|
11
|
-
hash: string;
|
|
12
|
-
size: number;
|
|
13
|
-
}
|
|
14
|
-
export declare class FileHistory {
|
|
15
|
-
private readonly historyDir;
|
|
16
|
-
private snapshots;
|
|
17
|
-
constructor(sessionDir: string);
|
|
18
|
-
/**
|
|
19
|
-
* Save a snapshot of a file before it is modified.
|
|
20
|
-
* Returns the snapshot record, or null if the file doesn't exist.
|
|
21
|
-
*/
|
|
22
|
-
saveSnapshot(filePath: string): FileSnapshot | null;
|
|
23
|
-
/**
|
|
24
|
-
* Get all snapshots for a specific file.
|
|
25
|
-
*/
|
|
26
|
-
getSnapshots(filePath: string): FileSnapshot[];
|
|
27
|
-
/**
|
|
28
|
-
* Restore a file to a specific snapshot.
|
|
29
|
-
*/
|
|
30
|
-
restore(snapshot: FileSnapshot): boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Restore a file to its most recent snapshot.
|
|
33
|
-
*/
|
|
34
|
-
restoreLatest(filePath: string): boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Get all tracked files.
|
|
37
|
-
*/
|
|
38
|
-
getTrackedFiles(): string[];
|
|
39
|
-
private saveIndex;
|
|
40
|
-
static loadFromDir(sessionDir: string): FileHistory;
|
|
41
|
-
}
|
package/dist/session/memory.d.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Memory system — persistent cross-session memory.
|
|
3
|
-
*
|
|
4
|
-
* Stores structured memory entries as individual markdown files under a base
|
|
5
|
-
* directory. Resolution order for the base directory:
|
|
6
|
-
* 1. explicit `baseDir` constructor arg
|
|
7
|
-
* 2. CODE_SHELL_HOME env var
|
|
8
|
-
* 3. ~/.code-shell
|
|
9
|
-
*
|
|
10
|
-
* MEMORY.md is the index file.
|
|
11
|
-
*/
|
|
12
|
-
export interface MemoryEntry {
|
|
13
|
-
name: string;
|
|
14
|
-
description: string;
|
|
15
|
-
type: "user" | "feedback" | "project" | "reference";
|
|
16
|
-
content: string;
|
|
17
|
-
fileName: string;
|
|
18
|
-
}
|
|
19
|
-
export interface MemoryManagerOptions {
|
|
20
|
-
/** Project root path; when set, memories are scoped under projects/<hash>/memory. */
|
|
21
|
-
projectDir?: string;
|
|
22
|
-
/** Override the base directory (~/.code-shell by default). Takes precedence over env. */
|
|
23
|
-
baseDir?: string;
|
|
24
|
-
}
|
|
25
|
-
export declare function resolveMemoryBaseDir(override?: string): string;
|
|
26
|
-
export declare class MemoryManager {
|
|
27
|
-
private readonly baseDir;
|
|
28
|
-
private readonly memoryDir;
|
|
29
|
-
private readonly indexPath;
|
|
30
|
-
private indexCache;
|
|
31
|
-
constructor(options?: MemoryManagerOptions | string);
|
|
32
|
-
getMemoryDir(): string;
|
|
33
|
-
/**
|
|
34
|
-
* Save a memory entry. Creates the file and updates the index.
|
|
35
|
-
*/
|
|
36
|
-
save(entry: Omit<MemoryEntry, "fileName">): string;
|
|
37
|
-
/**
|
|
38
|
-
* Load all memory entries.
|
|
39
|
-
*/
|
|
40
|
-
loadAll(): MemoryEntry[];
|
|
41
|
-
/**
|
|
42
|
-
* Load a single memory file.
|
|
43
|
-
*/
|
|
44
|
-
private loadFile;
|
|
45
|
-
/**
|
|
46
|
-
* Delete a memory by name or filename.
|
|
47
|
-
*/
|
|
48
|
-
delete(nameOrFile: string): boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Get the MEMORY.md index content for injection into prompts.
|
|
51
|
-
*/
|
|
52
|
-
getIndex(): string;
|
|
53
|
-
/**
|
|
54
|
-
* Build a prompt-friendly summary of all memories.
|
|
55
|
-
*/
|
|
56
|
-
buildMemoryContext(): string;
|
|
57
|
-
/**
|
|
58
|
-
* Lazy-build the in-memory index from disk on first use, then
|
|
59
|
-
* keep it in sync incrementally via save/delete. Avoids the
|
|
60
|
-
* O(N²) re-read of every memory file on every save.
|
|
61
|
-
*/
|
|
62
|
-
private ensureIndexCache;
|
|
63
|
-
private writeIndex;
|
|
64
|
-
private slugify;
|
|
65
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Session lifecycle manager.
|
|
3
|
-
*/
|
|
4
|
-
import type { SessionState } from "../types.js";
|
|
5
|
-
import { Transcript } from "./transcript.js";
|
|
6
|
-
export interface SessionBundle {
|
|
7
|
-
state: SessionState;
|
|
8
|
-
transcript: Transcript;
|
|
9
|
-
}
|
|
10
|
-
export declare class SessionManager {
|
|
11
|
-
private readonly sessionsDir;
|
|
12
|
-
constructor(storageDir?: string);
|
|
13
|
-
create(cwd: string, model: string, provider: string): SessionBundle;
|
|
14
|
-
resume(sessionId: string): SessionBundle;
|
|
15
|
-
saveState(state: SessionState): void;
|
|
16
|
-
/**
|
|
17
|
-
* Fork a session from a specific point.
|
|
18
|
-
* Creates a new session that shares events up to the given turn,
|
|
19
|
-
* then diverges independently.
|
|
20
|
-
*/
|
|
21
|
-
fork(sourceSessionId: string, forkAtTurn?: number): SessionBundle;
|
|
22
|
-
list(limit?: number): SessionListEntry[];
|
|
23
|
-
}
|
|
24
|
-
export type SessionListEntry = SessionState & {
|
|
25
|
-
preview?: string;
|
|
26
|
-
/** Last activity time — transcript mtime, falling back to startedAt. */
|
|
27
|
-
lastActiveAt: number;
|
|
28
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transcript — JSONL event log (NOT chat history).
|
|
3
|
-
* toMessages() derives Message[] from events for sending to LLM.
|
|
4
|
-
*/
|
|
5
|
-
import type { TranscriptEvent, TranscriptEventType, Message, ContentBlock } from "../types.js";
|
|
6
|
-
export declare class Transcript {
|
|
7
|
-
private events;
|
|
8
|
-
private filePath;
|
|
9
|
-
private currentTurn;
|
|
10
|
-
getFilePath(): string;
|
|
11
|
-
constructor(filePath: string);
|
|
12
|
-
append(type: TranscriptEventType, data: Record<string, unknown>): TranscriptEvent;
|
|
13
|
-
appendMessage(role: string, content: string | ContentBlock[]): TranscriptEvent;
|
|
14
|
-
appendToolUse(toolName: string, toolCallId: string, args: Record<string, unknown>): TranscriptEvent;
|
|
15
|
-
appendToolResult(toolCallId: string, toolName: string, result?: string, error?: string): TranscriptEvent;
|
|
16
|
-
appendTurnBoundary(): TranscriptEvent;
|
|
17
|
-
appendSummary(summary: string, compactedRange: {
|
|
18
|
-
fromTurn: number;
|
|
19
|
-
toTurn: number;
|
|
20
|
-
eventCount: number;
|
|
21
|
-
}): TranscriptEvent;
|
|
22
|
-
appendError(error: string, details?: Record<string, unknown>): TranscriptEvent;
|
|
23
|
-
/**
|
|
24
|
-
* Derive Message[] from transcript events for sending to the LLM.
|
|
25
|
-
* This is the critical boundary: the LLM never sees the event log directly.
|
|
26
|
-
*/
|
|
27
|
-
toMessages(): Message[];
|
|
28
|
-
getEvents(type?: TranscriptEventType): TranscriptEvent[];
|
|
29
|
-
get turnNumber(): number;
|
|
30
|
-
get eventCount(): number;
|
|
31
|
-
private flush;
|
|
32
|
-
/**
|
|
33
|
-
* Repair tool_result pairing issues:
|
|
34
|
-
* - Orphaned tool_results (no matching tool_use) get removed
|
|
35
|
-
* - Missing tool_results (tool_use with no result) get synthetic error results
|
|
36
|
-
*/
|
|
37
|
-
repairToolResultPairs(): void;
|
|
38
|
-
static loadFromFile(filePath: string): Transcript;
|
|
39
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{b as SessionManager}from'./chunk-QTWU7UNA.js';import'./chunk-FU7AHZNN.js';import'./chunk-3QP5BQ3L.js';
|