@lotagate/cli 0.1.22 → 0.1.24
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/package.json +7 -7
- package/scripts/install-native.mjs +11 -11
- package/dist/application/agent/agent-history.d.ts +0 -3
- package/dist/application/agent/agent-history.js +0 -81
- package/dist/application/agent/agent-input-context.d.ts +0 -9
- package/dist/application/agent/agent-input-context.js +0 -12
- package/dist/application/agent/agent-limit.d.ts +0 -3
- package/dist/application/agent/agent-limit.js +0 -12
- package/dist/application/agent/agent-run-tracker.d.ts +0 -30
- package/dist/application/agent/agent-run-tracker.js +0 -68
- package/dist/application/agent/agent-session-store.d.ts +0 -19
- package/dist/application/agent/agent-session-store.js +0 -74
- package/dist/application/agent/capability-profile.d.ts +0 -37
- package/dist/application/agent/capability-profile.js +0 -13
- package/dist/application/agent/cli-agent-execution-service.d.ts +0 -81
- package/dist/application/agent/cli-agent-execution-service.js +0 -279
- package/dist/application/agent/context-compaction-persistence.d.ts +0 -8
- package/dist/application/agent/context-compaction-persistence.js +0 -27
- package/dist/application/agent/context-compaction.d.ts +0 -20
- package/dist/application/agent/context-compaction.js +0 -114
- package/dist/application/agent/prompt-data-safety.d.ts +0 -14
- package/dist/application/agent/prompt-data-safety.js +0 -38
- package/dist/application/agent/safe-system-prompt.d.ts +0 -3
- package/dist/application/agent/safe-system-prompt.js +0 -19
- package/dist/application/agent/scoped-tool-executor.d.ts +0 -13
- package/dist/application/agent/scoped-tool-executor.js +0 -32
- package/dist/application/agent/system-prompt-builder.d.ts +0 -14
- package/dist/application/agent/system-prompt-builder.js +0 -199
- package/dist/application/agent/tool-catalog.d.ts +0 -14
- package/dist/application/agent/tool-catalog.js +0 -30
- package/dist/application/agent/tool-display.d.ts +0 -6
- package/dist/application/agent/tool-display.js +0 -59
- package/dist/application/agent/tool-hook-lifecycle.d.ts +0 -19
- package/dist/application/agent/tool-hook-lifecycle.js +0 -85
- package/dist/application/auth/authentication-service.d.ts +0 -20
- package/dist/application/auth/authentication-service.js +0 -44
- package/dist/application/chat/chat-service.d.ts +0 -12
- package/dist/application/chat/chat-service.js +0 -19
- package/dist/application/chat/pending-attachment-store.d.ts +0 -12
- package/dist/application/chat/pending-attachment-store.js +0 -28
- package/dist/application/commands/application-command-executor.d.ts +0 -20
- package/dist/application/commands/application-command-executor.js +0 -66
- package/dist/application/commands/cli-args.d.ts +0 -6
- package/dist/application/commands/cli-args.js +0 -43
- package/dist/application/commands/cli-command-services.d.ts +0 -16
- package/dist/application/commands/cli-command-services.js +0 -405
- package/dist/application/commands/command-catalog.d.ts +0 -6
- package/dist/application/commands/command-catalog.js +0 -159
- package/dist/application/commands/command-contract.d.ts +0 -58
- package/dist/application/commands/command-contract.js +0 -1
- package/dist/application/commands/command-hints.d.ts +0 -9
- package/dist/application/commands/command-hints.js +0 -17
- package/dist/application/commands/command-output.d.ts +0 -4
- package/dist/application/commands/command-output.js +0 -1
- package/dist/application/commands/command-parser.d.ts +0 -10
- package/dist/application/commands/command-parser.js +0 -155
- package/dist/application/commands/command-presentation.d.ts +0 -7
- package/dist/application/commands/command-presentation.js +0 -131
- package/dist/application/commands/command-registry.d.ts +0 -11
- package/dist/application/commands/command-registry.js +0 -64
- package/dist/application/commands/command-runtime.d.ts +0 -2
- package/dist/application/commands/command-runtime.js +0 -3
- package/dist/application/commands/goal-command-handlers.d.ts +0 -3
- package/dist/application/commands/goal-command-handlers.js +0 -120
- package/dist/application/commands/media-command-handlers.d.ts +0 -9
- package/dist/application/commands/media-command-handlers.js +0 -307
- package/dist/application/commands/media-command-output.d.ts +0 -11
- package/dist/application/commands/media-command-output.js +0 -8
- package/dist/application/commands/runtime-command-handlers.d.ts +0 -7
- package/dist/application/commands/runtime-command-handlers.js +0 -177
- package/dist/application/commands/stream-output.d.ts +0 -4
- package/dist/application/commands/stream-output.js +0 -10
- package/dist/application/commands/utility-commands.d.ts +0 -6
- package/dist/application/commands/utility-commands.js +0 -81
- package/dist/application/config/execution-config.d.ts +0 -4
- package/dist/application/config/execution-config.js +0 -6
- package/dist/application/extensions/extension-list-contract.d.ts +0 -13
- package/dist/application/extensions/extension-list-contract.js +0 -1
- package/dist/application/extensions/extension-list-formatters.d.ts +0 -31
- package/dist/application/extensions/extension-list-formatters.js +0 -98
- package/dist/application/extensions/extension-list-output.d.ts +0 -3
- package/dist/application/extensions/extension-list-output.js +0 -7
- package/dist/application/extensions/plugin-contribution-registry.d.ts +0 -15
- package/dist/application/extensions/plugin-contribution-registry.js +0 -80
- package/dist/application/extensions/skill-scope-store.d.ts +0 -23
- package/dist/application/extensions/skill-scope-store.js +0 -33
- package/dist/application/formatting/compact-number.d.ts +0 -2
- package/dist/application/formatting/compact-number.js +0 -18
- package/dist/application/formatting/compact-table.d.ts +0 -22
- package/dist/application/formatting/compact-table.js +0 -49
- package/dist/application/media/video-operation-poller.d.ts +0 -5
- package/dist/application/media/video-operation-poller.js +0 -42
- package/dist/application/model/cached-model-catalog.d.ts +0 -13
- package/dist/application/model/cached-model-catalog.js +0 -31
- package/dist/application/model/initial-model-selection.d.ts +0 -10
- package/dist/application/model/initial-model-selection.js +0 -11
- package/dist/application/model/model-catalog-service.d.ts +0 -6
- package/dist/application/model/model-catalog-service.js +0 -13
- package/dist/application/model/model-context-window.d.ts +0 -3
- package/dist/application/model/model-context-window.js +0 -23
- package/dist/application/orchestration/cli-subagent-service.d.ts +0 -70
- package/dist/application/orchestration/cli-subagent-service.js +0 -328
- package/dist/application/orchestration/cli-turn-event-projector.d.ts +0 -12
- package/dist/application/orchestration/cli-turn-event-projector.js +0 -81
- package/dist/application/orchestration/cli-turn-events.d.ts +0 -76
- package/dist/application/orchestration/cli-turn-events.js +0 -39
- package/dist/application/orchestration/cli-turn-persistence.d.ts +0 -6
- package/dist/application/orchestration/cli-turn-persistence.js +0 -14
- package/dist/application/orchestration/goal-evaluator.d.ts +0 -18
- package/dist/application/orchestration/goal-evaluator.js +0 -88
- package/dist/application/orchestration/goal-input.d.ts +0 -3
- package/dist/application/orchestration/goal-input.js +0 -19
- package/dist/application/orchestration/goal-output.d.ts +0 -2
- package/dist/application/orchestration/goal-output.js +0 -11
- package/dist/application/orchestration/goal-runner.d.ts +0 -22
- package/dist/application/orchestration/goal-runner.js +0 -153
- package/dist/application/orchestration/goal-usage.d.ts +0 -9
- package/dist/application/orchestration/goal-usage.js +0 -19
- package/dist/application/orchestration/headless-agent-turn.d.ts +0 -32
- package/dist/application/orchestration/headless-agent-turn.js +0 -82
- package/dist/application/orchestration/plan-generator.d.ts +0 -7
- package/dist/application/orchestration/plan-generator.js +0 -34
- package/dist/application/orchestration/subagent-coordinator.d.ts +0 -33
- package/dist/application/orchestration/subagent-coordinator.js +0 -28
- package/dist/application/orchestration/subagent-handoff.d.ts +0 -2
- package/dist/application/orchestration/subagent-handoff.js +0 -68
- package/dist/application/orchestration/subagent-tool-executor.d.ts +0 -12
- package/dist/application/orchestration/subagent-tool-executor.js +0 -93
- package/dist/application/orchestration/task-assessment.d.ts +0 -4
- package/dist/application/orchestration/task-assessment.js +0 -35
- package/dist/application/orchestration/task-graph.d.ts +0 -13
- package/dist/application/orchestration/task-graph.js +0 -56
- package/dist/application/orchestration/task-scheduler.d.ts +0 -18
- package/dist/application/orchestration/task-scheduler.js +0 -88
- package/dist/application/project/project-trust-service.d.ts +0 -13
- package/dist/application/project/project-trust-service.js +0 -74
- package/dist/application/protocol/browser-host-tool-executor.d.ts +0 -41
- package/dist/application/protocol/browser-host-tool-executor.js +0 -88
- package/dist/application/protocol/desktop-agent-command.d.ts +0 -9
- package/dist/application/protocol/desktop-agent-command.js +0 -663
- package/dist/application/protocol/desktop-attachment-store.d.ts +0 -16
- package/dist/application/protocol/desktop-attachment-store.js +0 -82
- package/dist/application/protocol/desktop-command-catalog.d.ts +0 -2
- package/dist/application/protocol/desktop-command-catalog.js +0 -19
- package/dist/application/protocol/desktop-command-contract.d.ts +0 -22
- package/dist/application/protocol/desktop-command-contract.js +0 -3
- package/dist/application/protocol/desktop-command-executor.d.ts +0 -16
- package/dist/application/protocol/desktop-command-executor.js +0 -47
- package/dist/application/protocol/desktop-command-output.d.ts +0 -15
- package/dist/application/protocol/desktop-command-output.js +0 -24
- package/dist/application/protocol/desktop-execution-policy.d.ts +0 -17
- package/dist/application/protocol/desktop-execution-policy.js +0 -49
- package/dist/application/protocol/desktop-host-tool-executor.d.ts +0 -57
- package/dist/application/protocol/desktop-host-tool-executor.js +0 -53
- package/dist/application/protocol/desktop-orchestration-events.d.ts +0 -5
- package/dist/application/protocol/desktop-orchestration-events.js +0 -37
- package/dist/application/protocol/json-line-writer.d.ts +0 -9
- package/dist/application/protocol/json-line-writer.js +0 -19
- package/dist/application/protocol/jsonl-agent-command.d.ts +0 -3
- package/dist/application/protocol/jsonl-agent-command.js +0 -97
- package/dist/application/protocol/jsonl-protocol.d.ts +0 -52
- package/dist/application/protocol/jsonl-protocol.js +0 -170
- package/dist/application/security/desktop-tool-scope-policy.d.ts +0 -3
- package/dist/application/security/desktop-tool-scope-policy.js +0 -52
- package/dist/application/security/tool-action-risk-analyzer.d.ts +0 -13
- package/dist/application/security/tool-action-risk-analyzer.js +0 -64
- package/dist/application/security/tool-approval-service.d.ts +0 -35
- package/dist/application/security/tool-approval-service.js +0 -97
- package/dist/application/security/tool-risk-classifier.d.ts +0 -11
- package/dist/application/security/tool-risk-classifier.js +0 -65
- package/dist/application/security/workspace-permission-policy.d.ts +0 -10
- package/dist/application/security/workspace-permission-policy.js +0 -50
- package/dist/application/session/project-session-access.d.ts +0 -8
- package/dist/application/session/project-session-access.js +0 -19
- package/dist/application/session/session-compaction-service.d.ts +0 -10
- package/dist/application/session/session-compaction-service.js +0 -43
- package/dist/application/session/session-turn-lifecycle.d.ts +0 -5
- package/dist/application/session/session-turn-lifecycle.js +0 -31
- package/dist/application/workspace/workspace-file-index.d.ts +0 -15
- package/dist/application/workspace/workspace-file-index.js +0 -60
- package/dist/application/workspace/workspace-file-reference-resolver.d.ts +0 -14
- package/dist/application/workspace/workspace-file-reference-resolver.js +0 -123
- package/dist/application/workspace/workspace-instruction-loader.d.ts +0 -8
- package/dist/application/workspace/workspace-instruction-loader.js +0 -55
- package/dist/bootstrap/composition-root.d.ts +0 -6
- package/dist/bootstrap/composition-root.js +0 -4
- package/dist/bootstrap/global-cli-options.d.ts +0 -6
- package/dist/bootstrap/global-cli-options.js +0 -29
- package/dist/bootstrap/native-devtools-stub.d.ts +0 -10
- package/dist/bootstrap/native-devtools-stub.js +0 -10
- package/dist/bootstrap/native-entry.d.ts +0 -1
- package/dist/bootstrap/native-entry.js +0 -6
- package/dist/bootstrap/native-tiktoken.d.ts +0 -4
- package/dist/bootstrap/native-tiktoken.js +0 -5
- package/dist/bootstrap/runtime-factory.d.ts +0 -35
- package/dist/bootstrap/runtime-factory.js +0 -44
- package/dist/bootstrap/shutdown-manager.d.ts +0 -10
- package/dist/bootstrap/shutdown-manager.js +0 -14
- package/dist/bootstrap/startup-sequence.d.ts +0 -5
- package/dist/bootstrap/startup-sequence.js +0 -10
- package/dist/domain/auth/auth-profile.d.ts +0 -14
- package/dist/domain/auth/auth-profile.js +0 -39
- package/dist/domain/config/config-schema.d.ts +0 -17
- package/dist/domain/config/config-schema.js +0 -105
- package/dist/domain/errors/cli-command-hint.d.ts +0 -5
- package/dist/domain/errors/cli-command-hint.js +0 -1
- package/dist/domain/errors/cli-error.d.ts +0 -35
- package/dist/domain/errors/cli-error.js +0 -129
- package/dist/domain/errors/error-codes.d.ts +0 -46
- package/dist/domain/errors/error-codes.js +0 -45
- package/dist/domain/extensions/extension-scope.d.ts +0 -3
- package/dist/domain/extensions/extension-scope.js +0 -23
- package/dist/domain/extensions/extension-state.d.ts +0 -5
- package/dist/domain/extensions/extension-state.js +0 -11
- package/dist/domain/extensions/hook-manifest.d.ts +0 -10
- package/dist/domain/extensions/hook-manifest.js +0 -23
- package/dist/domain/extensions/mcp-config.d.ts +0 -18
- package/dist/domain/extensions/mcp-config.js +0 -111
- package/dist/domain/extensions/plugin-manifest.d.ts +0 -11
- package/dist/domain/extensions/plugin-manifest.js +0 -43
- package/dist/domain/extensions/skill-manifest.d.ts +0 -10
- package/dist/domain/extensions/skill-manifest.js +0 -51
- package/dist/domain/filesystem/file-change-diff.d.ts +0 -21
- package/dist/domain/filesystem/file-change-diff.js +0 -60
- package/dist/domain/media/gateway-media-contract.d.ts +0 -23
- package/dist/domain/media/gateway-media-contract.js +0 -163
- package/dist/domain/media/media-contract.d.ts +0 -28
- package/dist/domain/media/media-contract.js +0 -1
- package/dist/domain/media/media-execution-policy.d.ts +0 -9
- package/dist/domain/media/media-execution-policy.js +0 -31
- package/dist/domain/orchestration/goal.d.ts +0 -58
- package/dist/domain/orchestration/goal.js +0 -113
- package/dist/domain/orchestration/subagent-identity.d.ts +0 -2
- package/dist/domain/orchestration/subagent-identity.js +0 -8
- package/dist/domain/orchestration/subagent.d.ts +0 -33
- package/dist/domain/orchestration/subagent.js +0 -1
- package/dist/domain/orchestration/task.d.ts +0 -31
- package/dist/domain/orchestration/task.js +0 -1
- package/dist/domain/project/project-identity.d.ts +0 -6
- package/dist/domain/project/project-identity.js +0 -4
- package/dist/domain/runtime/assistant-delta-normalizer.d.ts +0 -11
- package/dist/domain/runtime/assistant-delta-normalizer.js +0 -19
- package/dist/domain/runtime/resource-limits.d.ts +0 -60
- package/dist/domain/runtime/resource-limits.js +0 -60
- package/dist/domain/session/attachment.d.ts +0 -13
- package/dist/domain/session/attachment.js +0 -1
- package/dist/domain/session/session-schema.d.ts +0 -6
- package/dist/domain/session/session-schema.js +0 -28
- package/dist/domain/session/session.d.ts +0 -27
- package/dist/domain/session/session.js +0 -1
- package/dist/domain/settings/settings-document.d.ts +0 -8
- package/dist/domain/settings/settings-document.js +0 -36
- package/dist/domain/validation/record-schema.d.ts +0 -4
- package/dist/domain/validation/record-schema.js +0 -9
- package/dist/domain/workspace/workspace-settings.d.ts +0 -12
- package/dist/domain/workspace/workspace-settings.js +0 -44
- package/dist/infrastructure/agent-sdk/agent-instance-factory.d.ts +0 -22
- package/dist/infrastructure/agent-sdk/agent-instance-factory.js +0 -31
- package/dist/infrastructure/agent-sdk/tool-calling-model-client.d.ts +0 -11
- package/dist/infrastructure/agent-sdk/tool-calling-model-client.js +0 -447
- package/dist/infrastructure/cache/cache-policy.d.ts +0 -7
- package/dist/infrastructure/cache/cache-policy.js +0 -18
- package/dist/infrastructure/cache/file-cache-store.d.ts +0 -17
- package/dist/infrastructure/cache/file-cache-store.js +0 -121
- package/dist/infrastructure/clipboard/clipboard-adapter-factory.d.ts +0 -11
- package/dist/infrastructure/clipboard/clipboard-adapter-factory.js +0 -98
- package/dist/infrastructure/clipboard/clipboard-policy.d.ts +0 -8
- package/dist/infrastructure/clipboard/clipboard-policy.js +0 -19
- package/dist/infrastructure/clipboard/clipboard-text-adapter-factory.d.ts +0 -10
- package/dist/infrastructure/clipboard/clipboard-text-adapter-factory.js +0 -94
- package/dist/infrastructure/clipboard/image-normalizer.d.ts +0 -12
- package/dist/infrastructure/clipboard/image-normalizer.js +0 -78
- package/dist/infrastructure/clipboard/windows-clipboard-adapter.d.ts +0 -7
- package/dist/infrastructure/clipboard/windows-clipboard-adapter.js +0 -66
- package/dist/infrastructure/clipboard/windows-clipboard-text-adapter.d.ts +0 -7
- package/dist/infrastructure/clipboard/windows-clipboard-text-adapter.js +0 -70
- package/dist/infrastructure/config/config-loader.d.ts +0 -19
- package/dist/infrastructure/config/config-loader.js +0 -76
- package/dist/infrastructure/config/environment-values.d.ts +0 -2
- package/dist/infrastructure/config/environment-values.js +0 -7
- package/dist/infrastructure/credentials/composite-credential-store.d.ts +0 -11
- package/dist/infrastructure/credentials/composite-credential-store.js +0 -32
- package/dist/infrastructure/credentials/encrypted-file-credential-store.d.ts +0 -17
- package/dist/infrastructure/credentials/encrypted-file-credential-store.js +0 -181
- package/dist/infrastructure/credentials/environment-credential-store.d.ts +0 -11
- package/dist/infrastructure/credentials/environment-credential-store.js +0 -37
- package/dist/infrastructure/credentials/secret-input.d.ts +0 -7
- package/dist/infrastructure/credentials/secret-input.js +0 -44
- package/dist/infrastructure/extensions/composite-mcp-config-store.d.ts +0 -9
- package/dist/infrastructure/extensions/composite-mcp-config-store.js +0 -10
- package/dist/infrastructure/extensions/extension-directory-reader.d.ts +0 -2
- package/dist/infrastructure/extensions/extension-directory-reader.js +0 -15
- package/dist/infrastructure/extensions/extension-source-resolver.d.ts +0 -6
- package/dist/infrastructure/extensions/extension-source-resolver.js +0 -126
- package/dist/infrastructure/extensions/file-mcp-config-store.d.ts +0 -15
- package/dist/infrastructure/extensions/file-mcp-config-store.js +0 -66
- package/dist/infrastructure/extensions/hook-runtime.d.ts +0 -18
- package/dist/infrastructure/extensions/hook-runtime.js +0 -66
- package/dist/infrastructure/extensions/mcp-runtime.d.ts +0 -12
- package/dist/infrastructure/extensions/mcp-runtime.js +0 -52
- package/dist/infrastructure/extensions/plugin-discovery.d.ts +0 -5
- package/dist/infrastructure/extensions/plugin-discovery.js +0 -52
- package/dist/infrastructure/extensions/plugin-manager.d.ts +0 -26
- package/dist/infrastructure/extensions/plugin-manager.js +0 -139
- package/dist/infrastructure/extensions/skill-discovery.d.ts +0 -4
- package/dist/infrastructure/extensions/skill-discovery.js +0 -29
- package/dist/infrastructure/extensions/skill-installer.d.ts +0 -8
- package/dist/infrastructure/extensions/skill-installer.js +0 -88
- package/dist/infrastructure/extensions/skill-manager.d.ts +0 -22
- package/dist/infrastructure/extensions/skill-manager.js +0 -67
- package/dist/infrastructure/extensions/skill-roots.d.ts +0 -19
- package/dist/infrastructure/extensions/skill-roots.js +0 -25
- package/dist/infrastructure/extensions/skill-tool-executor.d.ts +0 -18
- package/dist/infrastructure/extensions/skill-tool-executor.js +0 -53
- package/dist/infrastructure/filesystem/atomic-file-store.d.ts +0 -12
- package/dist/infrastructure/filesystem/atomic-file-store.js +0 -106
- package/dist/infrastructure/filesystem/bounded-file-reader.d.ts +0 -6
- package/dist/infrastructure/filesystem/bounded-file-reader.js +0 -24
- package/dist/infrastructure/filesystem/bounded-json-reader.d.ts +0 -1
- package/dist/infrastructure/filesystem/bounded-json-reader.js +0 -7
- package/dist/infrastructure/filesystem/fs-errors.d.ts +0 -2
- package/dist/infrastructure/filesystem/fs-errors.js +0 -6
- package/dist/infrastructure/filesystem/gateway-media-input-reader.d.ts +0 -12
- package/dist/infrastructure/filesystem/gateway-media-input-reader.js +0 -49
- package/dist/infrastructure/filesystem/local-filesystem-tool-executor.d.ts +0 -21
- package/dist/infrastructure/filesystem/local-filesystem-tool-executor.js +0 -176
- package/dist/infrastructure/filesystem/path-resolver.d.ts +0 -20
- package/dist/infrastructure/filesystem/path-resolver.js +0 -119
- package/dist/infrastructure/filesystem/workspace-media-artifact-store.d.ts +0 -13
- package/dist/infrastructure/filesystem/workspace-media-artifact-store.js +0 -152
- package/dist/infrastructure/logging/daily-rotating-file-writer.d.ts +0 -20
- package/dist/infrastructure/logging/daily-rotating-file-writer.js +0 -75
- package/dist/infrastructure/logging/log-redactor.d.ts +0 -2
- package/dist/infrastructure/logging/log-redactor.js +0 -26
- package/dist/infrastructure/logging/logging-policy.d.ts +0 -6
- package/dist/infrastructure/logging/logging-policy.js +0 -6
- package/dist/infrastructure/logging/structured-logger.d.ts +0 -24
- package/dist/infrastructure/logging/structured-logger.js +0 -40
- package/dist/infrastructure/network/safe-media-downloader.d.ts +0 -23
- package/dist/infrastructure/network/safe-media-downloader.js +0 -239
- package/dist/infrastructure/platform/host-platform.d.ts +0 -14
- package/dist/infrastructure/platform/host-platform.js +0 -23
- package/dist/infrastructure/platform/host-process.d.ts +0 -17
- package/dist/infrastructure/platform/host-process.js +0 -116
- package/dist/infrastructure/platform/platform-paths.d.ts +0 -25
- package/dist/infrastructure/platform/platform-paths.js +0 -33
- package/dist/infrastructure/project/file-project-trust-store.d.ts +0 -12
- package/dist/infrastructure/project/file-project-trust-store.js +0 -59
- package/dist/infrastructure/sdk/chat-completion-adapter.d.ts +0 -8
- package/dist/infrastructure/sdk/chat-completion-adapter.js +0 -115
- package/dist/infrastructure/sdk/lotagate-client-factory.d.ts +0 -3
- package/dist/infrastructure/sdk/lotagate-client-factory.js +0 -8
- package/dist/infrastructure/sdk/model-catalog-adapter.d.ts +0 -19
- package/dist/infrastructure/sdk/model-catalog-adapter.js +0 -28
- package/dist/infrastructure/sdk/sdk-media-gateway-client.d.ts +0 -20
- package/dist/infrastructure/sdk/sdk-media-gateway-client.js +0 -97
- package/dist/infrastructure/sessions/file-goal-store.d.ts +0 -21
- package/dist/infrastructure/sessions/file-goal-store.js +0 -160
- package/dist/infrastructure/sessions/file-session-store.d.ts +0 -48
- package/dist/infrastructure/sessions/file-session-store.js +0 -525
- package/dist/infrastructure/sessions/project-session-paths.d.ts +0 -17
- package/dist/infrastructure/sessions/project-session-paths.js +0 -41
- package/dist/infrastructure/sessions/session-index.d.ts +0 -16
- package/dist/infrastructure/sessions/session-index.js +0 -84
- package/dist/infrastructure/sessions/session-journal.d.ts +0 -22
- package/dist/infrastructure/sessions/session-journal.js +0 -137
- package/dist/infrastructure/sessions/subagent-journal-store.d.ts +0 -28
- package/dist/infrastructure/sessions/subagent-journal-store.js +0 -30
- package/dist/infrastructure/shell/shell-tool-executor.d.ts +0 -17
- package/dist/infrastructure/shell/shell-tool-executor.js +0 -115
- package/dist/infrastructure/tokens/tiktoken-token-estimator.d.ts +0 -18
- package/dist/infrastructure/tokens/tiktoken-token-estimator.js +0 -48
- package/dist/infrastructure/workspace/workspace-settings-store.d.ts +0 -9
- package/dist/infrastructure/workspace/workspace-settings-store.js +0 -75
- package/dist/main.d.ts +0 -7
- package/dist/main.js +0 -66
- package/dist/ports/cache-store.d.ts +0 -10
- package/dist/ports/cache-store.js +0 -1
- package/dist/ports/chat-model.d.ts +0 -30
- package/dist/ports/chat-model.js +0 -1
- package/dist/ports/clipboard-adapter.d.ts +0 -7
- package/dist/ports/clipboard-adapter.js +0 -1
- package/dist/ports/clipboard-text-adapter.d.ts +0 -3
- package/dist/ports/clipboard-text-adapter.js +0 -1
- package/dist/ports/credential-store.d.ts +0 -7
- package/dist/ports/credential-store.js +0 -1
- package/dist/ports/goal-store.d.ts +0 -12
- package/dist/ports/goal-store.js +0 -1
- package/dist/ports/logger.d.ts +0 -8
- package/dist/ports/logger.js +0 -1
- package/dist/ports/media-gateway-client.d.ts +0 -54
- package/dist/ports/media-gateway-client.js +0 -1
- package/dist/ports/model-diagnostics.d.ts +0 -17
- package/dist/ports/model-diagnostics.js +0 -1
- package/dist/ports/project-trust-store.d.ts +0 -12
- package/dist/ports/project-trust-store.js +0 -1
- package/dist/ports/session-store.d.ts +0 -58
- package/dist/ports/session-store.js +0 -1
- package/dist/ports/subagent-lifecycle.d.ts +0 -31
- package/dist/ports/subagent-lifecycle.js +0 -1
- package/dist/ports/tool-activity.d.ts +0 -13
- package/dist/ports/tool-activity.js +0 -1
- package/dist/presentation/themes/theme.d.ts +0 -19
- package/dist/presentation/themes/theme.js +0 -8
- package/dist/presentation/tui/agent-initialization-renderer.d.ts +0 -4
- package/dist/presentation/tui/agent-initialization-renderer.js +0 -37
- package/dist/presentation/tui/context-display.d.ts +0 -21
- package/dist/presentation/tui/context-display.js +0 -33
- package/dist/presentation/tui/formatters.d.ts +0 -6
- package/dist/presentation/tui/formatters.js +0 -60
- package/dist/presentation/tui/ink/choice-window.d.ts +0 -5
- package/dist/presentation/tui/ink/choice-window.js +0 -5
- package/dist/presentation/tui/ink/components/activity-entry.d.ts +0 -6
- package/dist/presentation/tui/ink/components/activity-entry.js +0 -16
- package/dist/presentation/tui/ink/components/activity-status.d.ts +0 -10
- package/dist/presentation/tui/ink/components/activity-status.js +0 -21
- package/dist/presentation/tui/ink/components/choice-modal.d.ts +0 -11
- package/dist/presentation/tui/ink/components/choice-modal.js +0 -29
- package/dist/presentation/tui/ink/components/composer.d.ts +0 -40
- package/dist/presentation/tui/ink/components/composer.js +0 -271
- package/dist/presentation/tui/ink/components/file-diff.d.ts +0 -6
- package/dist/presentation/tui/ink/components/file-diff.js +0 -34
- package/dist/presentation/tui/ink/components/modal.d.ts +0 -8
- package/dist/presentation/tui/ink/components/modal.js +0 -110
- package/dist/presentation/tui/ink/components/shimmer-text.d.ts +0 -6
- package/dist/presentation/tui/ink/components/shimmer-text.js +0 -9
- package/dist/presentation/tui/ink/components/subagent-activity.d.ts +0 -11
- package/dist/presentation/tui/ink/components/subagent-activity.js +0 -61
- package/dist/presentation/tui/ink/components/transcript.d.ts +0 -39
- package/dist/presentation/tui/ink/components/transcript.js +0 -121
- package/dist/presentation/tui/ink/components/welcome-panel.d.ts +0 -6
- package/dist/presentation/tui/ink/components/welcome-panel.js +0 -20
- package/dist/presentation/tui/ink/lotagate-tui.d.ts +0 -6
- package/dist/presentation/tui/ink/lotagate-tui.js +0 -136
- package/dist/presentation/tui/ink/markdown-inline-renderer.d.ts +0 -4
- package/dist/presentation/tui/ink/markdown-inline-renderer.js +0 -20
- package/dist/presentation/tui/ink/markdown-inline.d.ts +0 -13
- package/dist/presentation/tui/ink/markdown-inline.js +0 -91
- package/dist/presentation/tui/ink/markdown-message.d.ts +0 -6
- package/dist/presentation/tui/ink/markdown-message.js +0 -66
- package/dist/presentation/tui/ink/markdown-table.d.ts +0 -16
- package/dist/presentation/tui/ink/markdown-table.js +0 -77
- package/dist/presentation/tui/ink/tui-bridge.d.ts +0 -195
- package/dist/presentation/tui/ink/tui-bridge.js +0 -289
- package/dist/presentation/tui/terminal-capabilities.d.ts +0 -15
- package/dist/presentation/tui/terminal-capabilities.js +0 -7
- package/dist/presentation/tui/terminal-mouse.d.ts +0 -5
- package/dist/presentation/tui/terminal-mouse.js +0 -19
- package/dist/presentation/tui/terminal-screen.d.ts +0 -10
- package/dist/presentation/tui/terminal-screen.js +0 -23
- package/dist/presentation/tui/tui-agent-event-runner.d.ts +0 -24
- package/dist/presentation/tui/tui-agent-event-runner.js +0 -69
- package/dist/presentation/tui/tui-application-contract.d.ts +0 -10
- package/dist/presentation/tui/tui-application-contract.js +0 -8
- package/dist/presentation/tui/tui-application.d.ts +0 -62
- package/dist/presentation/tui/tui-application.js +0 -675
- package/dist/presentation/tui/tui-attachment-input.d.ts +0 -2
- package/dist/presentation/tui/tui-attachment-input.js +0 -5
- package/dist/presentation/tui/tui-clipboard-paste-handlers.d.ts +0 -11
- package/dist/presentation/tui/tui-clipboard-paste-handlers.js +0 -25
- package/dist/presentation/tui/tui-command-context.d.ts +0 -3
- package/dist/presentation/tui/tui-command-context.js +0 -1
- package/dist/presentation/tui/tui-command-executor.d.ts +0 -38
- package/dist/presentation/tui/tui-command-executor.js +0 -214
- package/dist/presentation/tui/tui-command-host-factory.d.ts +0 -40
- package/dist/presentation/tui/tui-command-host-factory.js +0 -23
- package/dist/presentation/tui/tui-context-compaction.d.ts +0 -5
- package/dist/presentation/tui/tui-context-compaction.js +0 -22
- package/dist/presentation/tui/tui-context-service.d.ts +0 -34
- package/dist/presentation/tui/tui-context-service.js +0 -126
- package/dist/presentation/tui/tui-file-suggestions.d.ts +0 -3
- package/dist/presentation/tui/tui-file-suggestions.js +0 -8
- package/dist/presentation/tui/tui-goal-controller.d.ts +0 -14
- package/dist/presentation/tui/tui-goal-controller.js +0 -52
- package/dist/presentation/tui/tui-initial-model.d.ts +0 -3
- package/dist/presentation/tui/tui-initial-model.js +0 -28
- package/dist/presentation/tui/tui-lifecycle-actions.d.ts +0 -13
- package/dist/presentation/tui/tui-lifecycle-actions.js +0 -45
- package/dist/presentation/tui/tui-manual-compaction.d.ts +0 -18
- package/dist/presentation/tui/tui-manual-compaction.js +0 -31
- package/dist/presentation/tui/tui-media-model-selection.d.ts +0 -12
- package/dist/presentation/tui/tui-media-model-selection.js +0 -38
- package/dist/presentation/tui/tui-prompt-dispatcher.d.ts +0 -16
- package/dist/presentation/tui/tui-prompt-dispatcher.js +0 -38
- package/dist/presentation/tui/tui-skill-controller.d.ts +0 -11
- package/dist/presentation/tui/tui-skill-controller.js +0 -13
- package/dist/presentation/tui/tui-tool-approval.d.ts +0 -22
- package/dist/presentation/tui/tui-tool-approval.js +0 -73
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -1
package/dist/main.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { asCliError } from './domain/errors/cli-error.js';
|
|
2
|
-
import { createCompositionRoot } from './bootstrap/composition-root.js';
|
|
3
|
-
import { resolveStartupContext } from './bootstrap/startup-sequence.js';
|
|
4
|
-
import { parseGlobalCliOptions } from './bootstrap/global-cli-options.js';
|
|
5
|
-
import { TuiApplication } from './presentation/tui/tui-application.js';
|
|
6
|
-
import { formatCliErrorMessage } from './application/commands/command-hints.js';
|
|
7
|
-
import { COMMAND_REGISTRY } from './application/commands/command-runtime.js';
|
|
8
|
-
import { parseCommandInvocation } from './application/commands/command-parser.js';
|
|
9
|
-
import { executeApplicationCommand, executeInformationalCommand } from './application/commands/application-command-executor.js';
|
|
10
|
-
export { CLI_VERSION } from './version.js';
|
|
11
|
-
export async function main(argv, io = {}) {
|
|
12
|
-
const stdin = io.stdin ?? process.stdin;
|
|
13
|
-
const stdout = io.stdout ?? process.stdout;
|
|
14
|
-
const stderr = io.stderr ?? process.stderr;
|
|
15
|
-
let runtime;
|
|
16
|
-
try {
|
|
17
|
-
const globalOptions = parseGlobalCliOptions(argv);
|
|
18
|
-
const commandTokens = normalizeDirectTokens(globalOptions.commandTokens);
|
|
19
|
-
if (commandTokens.length === 0) {
|
|
20
|
-
runtime = createCompositionRoot({ stderr });
|
|
21
|
-
const logger = runtime.logger;
|
|
22
|
-
logger.info('Interactive session started.');
|
|
23
|
-
const tui = new TuiApplication(runtime, resolveStartupContext(argv).cwd, { output: stdout });
|
|
24
|
-
const exitCode = await tui.run();
|
|
25
|
-
logger.info('Interactive session completed.', { exitCode });
|
|
26
|
-
return exitCode;
|
|
27
|
-
}
|
|
28
|
-
const cwd = resolveStartupContext(argv).cwd;
|
|
29
|
-
const invocation = parseCommandInvocation(commandTokens, 'direct', COMMAND_REGISTRY);
|
|
30
|
-
const informationalExitCode = executeInformationalCommand(invocation, stdout);
|
|
31
|
-
if (informationalExitCode !== undefined)
|
|
32
|
-
return informationalExitCode;
|
|
33
|
-
const initializedRuntime = createCompositionRoot({ stderr });
|
|
34
|
-
runtime = initializedRuntime;
|
|
35
|
-
const logger = initializedRuntime.logger;
|
|
36
|
-
logger.info('CLI command started.', { command: invocation.action.id, cwd });
|
|
37
|
-
const exitCode = await executeApplicationCommand(invocation, { runtime: initializedRuntime, cwd, output: stdout, stdin, writableOutput: stdout, resumeInteractive: async (sessionId) => new TuiApplication(initializedRuntime, cwd, { output: stdout, sessionId }).run() });
|
|
38
|
-
logger.info('CLI command completed.', { command: invocation.action.id, exitCode });
|
|
39
|
-
return exitCode;
|
|
40
|
-
}
|
|
41
|
-
catch (error) {
|
|
42
|
-
const cliError = asCliError(error);
|
|
43
|
-
runtime?.logger.error('CLI command failed.', { code: cliError.code, category: cliError.category });
|
|
44
|
-
const json = usesJsonErrorOutput(argv);
|
|
45
|
-
if (json)
|
|
46
|
-
stdout.write(`${JSON.stringify({ error: cliError.toJSON() })}\n`);
|
|
47
|
-
else if (runtime !== undefined)
|
|
48
|
-
runtime.logger.error(formatCliErrorMessage(cliError, 'direct'), { code: cliError.code, category: cliError.category });
|
|
49
|
-
else
|
|
50
|
-
stderr.write(`[error] ${formatCliErrorMessage(cliError, 'direct')}\n`);
|
|
51
|
-
return cliError.exitCode;
|
|
52
|
-
}
|
|
53
|
-
finally {
|
|
54
|
-
await runtime?.shutdown.shutdown();
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
function usesJsonErrorOutput(argv) {
|
|
58
|
-
return argv.some((token) => token === '--json' || token.startsWith('--json='));
|
|
59
|
-
}
|
|
60
|
-
function normalizeDirectTokens(tokens) {
|
|
61
|
-
if (tokens.length === 1 && (tokens[0] === '--help' || tokens[0] === '-h'))
|
|
62
|
-
return ['help'];
|
|
63
|
-
if (tokens.length === 1 && tokens[0] === '--version')
|
|
64
|
-
return ['version'];
|
|
65
|
-
return tokens;
|
|
66
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface CacheWriteOptions {
|
|
2
|
-
ttlMs: number;
|
|
3
|
-
}
|
|
4
|
-
export interface CacheStore {
|
|
5
|
-
get<T>(namespace: string, key: string): Promise<T | undefined>;
|
|
6
|
-
set<T>(namespace: string, key: string, value: T, options: CacheWriteOptions): Promise<void>;
|
|
7
|
-
delete(namespace: string, key: string): Promise<void>;
|
|
8
|
-
clear(namespace?: string): Promise<void>;
|
|
9
|
-
prune(): Promise<void>;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { AttachmentPayload } from '../domain/session/attachment.js';
|
|
2
|
-
export interface ChatModelRequest {
|
|
3
|
-
model: string;
|
|
4
|
-
prompt: string;
|
|
5
|
-
system?: string;
|
|
6
|
-
attachments?: readonly AttachmentPayload[];
|
|
7
|
-
signal?: AbortSignal;
|
|
8
|
-
}
|
|
9
|
-
export interface ChatUsage {
|
|
10
|
-
promptTokens?: number;
|
|
11
|
-
completionTokens?: number;
|
|
12
|
-
totalTokens?: number;
|
|
13
|
-
/** True when the CLI derived usage locally rather than receiving it from the provider. */
|
|
14
|
-
estimated?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export type ChatModelEvent = {
|
|
17
|
-
type: 'activity';
|
|
18
|
-
state: 'connecting' | 'thinking' | 'writing' | 'completed';
|
|
19
|
-
} | {
|
|
20
|
-
type: 'delta';
|
|
21
|
-
content: string;
|
|
22
|
-
} | {
|
|
23
|
-
type: 'usage';
|
|
24
|
-
usage: ChatUsage;
|
|
25
|
-
} | {
|
|
26
|
-
type: 'completed';
|
|
27
|
-
};
|
|
28
|
-
export interface ChatModelPort {
|
|
29
|
-
stream(request: ChatModelRequest): AsyncIterable<ChatModelEvent>;
|
|
30
|
-
}
|
package/dist/ports/chat-model.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { AuthProfile, StoredCredential } from '../domain/auth/auth-profile.js';
|
|
2
|
-
export interface CredentialStore {
|
|
3
|
-
list(): Promise<readonly AuthProfile[]>;
|
|
4
|
-
get(profileName: string): Promise<StoredCredential | undefined>;
|
|
5
|
-
set(credential: StoredCredential): Promise<void>;
|
|
6
|
-
delete(profileName: string): Promise<boolean>;
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { CreateGoalInput, GoalEvaluation, GoalState, GoalUsageDelta } from '../domain/orchestration/goal.js';
|
|
2
|
-
export interface GoalStore {
|
|
3
|
-
get(sessionId: string): Promise<GoalState | undefined>;
|
|
4
|
-
create(sessionId: string, input: CreateGoalInput): Promise<GoalState>;
|
|
5
|
-
replace(sessionId: string, input: CreateGoalInput): Promise<GoalState>;
|
|
6
|
-
pause(sessionId: string, reason?: string): Promise<GoalState>;
|
|
7
|
-
resume(sessionId: string): Promise<GoalState>;
|
|
8
|
-
recordTurn(sessionId: string): Promise<GoalState>;
|
|
9
|
-
recordUsage(sessionId: string, delta: GoalUsageDelta): Promise<GoalState>;
|
|
10
|
-
recordEvaluation(sessionId: string, evaluation: GoalEvaluation): Promise<GoalState>;
|
|
11
|
-
clear(sessionId: string, reason?: string): Promise<void>;
|
|
12
|
-
}
|
package/dist/ports/goal-store.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/ports/logger.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type LogLevel = 'error' | 'warn' | 'info' | 'debug' | 'trace';
|
|
2
|
-
export interface Logger {
|
|
3
|
-
error(message: string, details?: Record<string, unknown>): void;
|
|
4
|
-
warn(message: string, details?: Record<string, unknown>): void;
|
|
5
|
-
info(message: string, details?: Record<string, unknown>): void;
|
|
6
|
-
debug(message: string, details?: Record<string, unknown>): void;
|
|
7
|
-
trace(message: string, details?: Record<string, unknown>): void;
|
|
8
|
-
}
|
package/dist/ports/logger.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import type { GeneratedImage, MediaBinary, VideoOperation } from '../domain/media/media-contract.js';
|
|
2
|
-
export interface MediaRequestOptions {
|
|
3
|
-
readonly signal?: AbortSignal | undefined;
|
|
4
|
-
}
|
|
5
|
-
export interface ImageGenerationInput {
|
|
6
|
-
readonly model: string;
|
|
7
|
-
readonly prompt: string;
|
|
8
|
-
readonly n?: number | undefined;
|
|
9
|
-
readonly size?: string | undefined;
|
|
10
|
-
readonly quality?: 'low' | 'medium' | 'high' | 'auto' | undefined;
|
|
11
|
-
readonly background?: 'transparent' | 'opaque' | 'auto' | undefined;
|
|
12
|
-
readonly outputFormat?: 'png' | 'jpeg' | 'webp' | undefined;
|
|
13
|
-
readonly outputCompression?: number | undefined;
|
|
14
|
-
readonly moderation?: string | undefined;
|
|
15
|
-
readonly user?: string | undefined;
|
|
16
|
-
}
|
|
17
|
-
export interface ImageEditInput extends ImageGenerationInput {
|
|
18
|
-
readonly images: Uint8Array[];
|
|
19
|
-
readonly mask?: Uint8Array | undefined;
|
|
20
|
-
readonly inputFidelity?: 'low' | 'high' | undefined;
|
|
21
|
-
}
|
|
22
|
-
export interface SpeechInput {
|
|
23
|
-
readonly model: string;
|
|
24
|
-
readonly input: string;
|
|
25
|
-
readonly voice: string;
|
|
26
|
-
readonly instructions?: string | undefined;
|
|
27
|
-
readonly responseFormat?: 'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm' | undefined;
|
|
28
|
-
readonly speed?: number | undefined;
|
|
29
|
-
}
|
|
30
|
-
export interface AudioUploadInput {
|
|
31
|
-
readonly model: string;
|
|
32
|
-
readonly file: Uint8Array;
|
|
33
|
-
readonly filename: string;
|
|
34
|
-
readonly prompt?: string | undefined;
|
|
35
|
-
readonly responseFormat?: string | undefined;
|
|
36
|
-
readonly temperature?: number | undefined;
|
|
37
|
-
readonly language?: string | undefined;
|
|
38
|
-
readonly timestampGranularities?: readonly ('word' | 'segment')[] | undefined;
|
|
39
|
-
readonly include?: readonly string[] | undefined;
|
|
40
|
-
}
|
|
41
|
-
export interface MediaGatewayClient {
|
|
42
|
-
generateImage(input: ImageGenerationInput, options?: MediaRequestOptions): Promise<readonly GeneratedImage[]>;
|
|
43
|
-
editImage(input: ImageEditInput, options?: MediaRequestOptions): Promise<readonly GeneratedImage[]>;
|
|
44
|
-
createSpeech(input: SpeechInput, options?: MediaRequestOptions): Promise<MediaBinary>;
|
|
45
|
-
transcribe(input: AudioUploadInput, options?: MediaRequestOptions): Promise<string>;
|
|
46
|
-
translate(input: AudioUploadInput, options?: MediaRequestOptions): Promise<string>;
|
|
47
|
-
createVideo(input: {
|
|
48
|
-
model: string;
|
|
49
|
-
prompt: string;
|
|
50
|
-
parameters?: Record<string, unknown>;
|
|
51
|
-
}, options?: MediaRequestOptions): Promise<VideoOperation>;
|
|
52
|
-
getVideoOperation(id: string, options?: MediaRequestOptions): Promise<VideoOperation>;
|
|
53
|
-
downloadVideo(id: string, options?: MediaRequestOptions): Promise<MediaBinary>;
|
|
54
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { ChatUsage } from './chat-model.js';
|
|
2
|
-
export interface ModelCallSummary {
|
|
3
|
-
model: string;
|
|
4
|
-
stream: boolean;
|
|
5
|
-
contentLength: number;
|
|
6
|
-
toolCallCount: number;
|
|
7
|
-
toolNames: readonly string[];
|
|
8
|
-
finishReason?: string | null;
|
|
9
|
-
usage?: ChatUsage;
|
|
10
|
-
}
|
|
11
|
-
export interface ModelUsageReport {
|
|
12
|
-
usage: ChatUsage;
|
|
13
|
-
modelCalls?: number;
|
|
14
|
-
}
|
|
15
|
-
export interface ModelCallObserver {
|
|
16
|
-
onComplete?: (summary: ModelCallSummary) => void;
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface TrustedProject {
|
|
2
|
-
fingerprint: string;
|
|
3
|
-
canonicalPath: string;
|
|
4
|
-
grantedAt: string;
|
|
5
|
-
grantedBy: 'user';
|
|
6
|
-
}
|
|
7
|
-
export interface ProjectTrustStore {
|
|
8
|
-
list(): Promise<readonly TrustedProject[]>;
|
|
9
|
-
get(fingerprint: string): Promise<TrustedProject | undefined>;
|
|
10
|
-
grant(project: TrustedProject): Promise<void>;
|
|
11
|
-
revoke(fingerprint: string): Promise<boolean>;
|
|
12
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { Attachment } from '../domain/session/attachment.js';
|
|
2
|
-
import type { SessionEvent, SessionMetadata, TranscriptEntry } from '../domain/session/session.js';
|
|
3
|
-
export interface SessionBundle {
|
|
4
|
-
metadata: SessionMetadata;
|
|
5
|
-
events: readonly SessionEvent[];
|
|
6
|
-
transcript: readonly TranscriptEntry[];
|
|
7
|
-
attachments: readonly {
|
|
8
|
-
attachment: Attachment;
|
|
9
|
-
dataBase64: string;
|
|
10
|
-
}[];
|
|
11
|
-
}
|
|
12
|
-
export interface SessionRepairResult {
|
|
13
|
-
eventsRemoved: number;
|
|
14
|
-
transcriptRemoved: number;
|
|
15
|
-
}
|
|
16
|
-
export interface AppendEventOptions {
|
|
17
|
-
/** The caller already owns the session lock for an atomic read/modify/write operation. */
|
|
18
|
-
locked?: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface CompactSessionOptions {
|
|
21
|
-
turnId?: string;
|
|
22
|
-
}
|
|
23
|
-
/** A consistent transcript/event view derived from one journal snapshot. */
|
|
24
|
-
export interface SessionHistory {
|
|
25
|
-
events: readonly SessionEvent[];
|
|
26
|
-
transcript: readonly TranscriptEntry[];
|
|
27
|
-
}
|
|
28
|
-
/** Ordered durable records to append under one session lock. */
|
|
29
|
-
export type SessionJournalAppend = {
|
|
30
|
-
kind: 'event';
|
|
31
|
-
event: SessionEvent;
|
|
32
|
-
} | {
|
|
33
|
-
kind: 'transcript';
|
|
34
|
-
entry: TranscriptEntry;
|
|
35
|
-
};
|
|
36
|
-
export interface SessionStore {
|
|
37
|
-
create(input: Omit<SessionMetadata, 'id' | 'createdAt' | 'updatedAt'>): Promise<SessionMetadata>;
|
|
38
|
-
get(sessionId: string): Promise<SessionMetadata | undefined>;
|
|
39
|
-
list(projectFingerprint?: string): Promise<readonly SessionMetadata[]>;
|
|
40
|
-
updateStatus(sessionId: string, status: SessionMetadata['status']): Promise<SessionMetadata>;
|
|
41
|
-
rename(sessionId: string, name: string): Promise<SessionMetadata>;
|
|
42
|
-
appendEvent(event: SessionEvent, options?: AppendEventOptions): Promise<void>;
|
|
43
|
-
appendTranscript(sessionId: string, entry: TranscriptEntry): Promise<void>;
|
|
44
|
-
appendJournal(sessionId: string, records: readonly SessionJournalAppend[]): Promise<void>;
|
|
45
|
-
readEvents(sessionId: string): Promise<readonly SessionEvent[]>;
|
|
46
|
-
readTranscript(sessionId: string): Promise<readonly TranscriptEntry[]>;
|
|
47
|
-
readHistory(sessionId: string): Promise<SessionHistory>;
|
|
48
|
-
delete(sessionId: string): Promise<boolean>;
|
|
49
|
-
fork(sessionId: string, overrides?: Partial<Pick<SessionMetadata, 'model' | 'profile'>>): Promise<SessionMetadata>;
|
|
50
|
-
compact(sessionId: string, summary: string, options?: CompactSessionOptions): Promise<void>;
|
|
51
|
-
export(sessionId: string): Promise<SessionBundle>;
|
|
52
|
-
import(bundle: SessionBundle, projectFingerprint: string, cwd: string): Promise<SessionMetadata>;
|
|
53
|
-
saveAttachment(sessionId: string, attachment: Attachment, bytes: Uint8Array): Promise<Attachment>;
|
|
54
|
-
readAttachment(sessionId: string, attachmentId: string): Promise<Uint8Array | undefined>;
|
|
55
|
-
recoverStaleLock(sessionId: string): Promise<boolean>;
|
|
56
|
-
repair(sessionId: string): Promise<SessionRepairResult>;
|
|
57
|
-
withLock<T>(sessionId: string, action: () => Promise<T>): Promise<T>;
|
|
58
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { SubagentHandoff, SubagentMode, SubagentStatus } from '../domain/orchestration/subagent.js';
|
|
2
|
-
export type SubagentLifecycleEventType = 'created' | 'started' | 'activity' | 'completed' | 'completed_with_warning' | 'failed' | 'cancelled';
|
|
3
|
-
export type SubagentActionKind = 'filesystem' | 'shell' | 'mcp' | 'approval';
|
|
4
|
-
/** A redacted, presentation-safe description of the child's current operation. */
|
|
5
|
-
export interface SubagentLastAction {
|
|
6
|
-
readonly kind: SubagentActionKind;
|
|
7
|
-
readonly label: string;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* CLI-owned lifecycle signal for presenting delegated work without coupling
|
|
11
|
-
* orchestration to a specific user interface.
|
|
12
|
-
*/
|
|
13
|
-
export interface SubagentLifecycleEvent {
|
|
14
|
-
readonly type: SubagentLifecycleEventType;
|
|
15
|
-
readonly sessionId: string;
|
|
16
|
-
readonly id: string;
|
|
17
|
-
readonly displayName: string;
|
|
18
|
-
readonly task: string;
|
|
19
|
-
readonly mode: SubagentMode;
|
|
20
|
-
readonly model: string;
|
|
21
|
-
readonly status: SubagentStatus;
|
|
22
|
-
readonly background: boolean;
|
|
23
|
-
readonly timestamp: number;
|
|
24
|
-
readonly durationMs?: number;
|
|
25
|
-
readonly summary?: string;
|
|
26
|
-
readonly lastAction?: SubagentLastAction;
|
|
27
|
-
readonly handoff?: SubagentHandoff;
|
|
28
|
-
}
|
|
29
|
-
export interface SubagentLifecycleObserver {
|
|
30
|
-
onSubagentLifecycle(event: SubagentLifecycleEvent): void | Promise<void>;
|
|
31
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface ToolActivityStart {
|
|
2
|
-
key: string;
|
|
3
|
-
toolName: string;
|
|
4
|
-
source?: string;
|
|
5
|
-
label: string;
|
|
6
|
-
}
|
|
7
|
-
export interface ToolActivityHandle {
|
|
8
|
-
complete(isError: boolean): void;
|
|
9
|
-
}
|
|
10
|
-
/** Observes tool execution without making UI concerns part of tool executors. */
|
|
11
|
-
export interface ToolActivityObserver {
|
|
12
|
-
start(activity: ToolActivityStart): ToolActivityHandle | undefined;
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface CliTheme {
|
|
2
|
-
background: string;
|
|
3
|
-
surface: string;
|
|
4
|
-
surfaceRaised: string;
|
|
5
|
-
text: string;
|
|
6
|
-
muted: string;
|
|
7
|
-
accent: string;
|
|
8
|
-
border: string;
|
|
9
|
-
selection: string;
|
|
10
|
-
warning: string;
|
|
11
|
-
user: string;
|
|
12
|
-
error: string;
|
|
13
|
-
success: string;
|
|
14
|
-
diffAdded: string;
|
|
15
|
-
diffRemoved: string;
|
|
16
|
-
code: string;
|
|
17
|
-
link: string;
|
|
18
|
-
}
|
|
19
|
-
export declare const DARK_THEME: CliTheme;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export const DARK_THEME = {
|
|
2
|
-
background: '#10151c',
|
|
3
|
-
surface: '#171e27',
|
|
4
|
-
surfaceRaised: '#202a36',
|
|
5
|
-
text: '#e6edf3',
|
|
6
|
-
accent: '#5ba7d8', border: '#3b424b', selection: '#2a3a4d', warning: '#d6b574', user: '#1b2b3d',
|
|
7
|
-
error: '#e06c75', success: '#86c991', diffAdded: '#173323', diffRemoved: '#3a2028', code: '#d6b574', link: '#75b7e7', muted: '#8b949e',
|
|
8
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { AgentEvent } from '@lotagate/agent-sdk';
|
|
2
|
-
import type { InkTuiBridge } from './ink/tui-bridge.js';
|
|
3
|
-
/** Reports only actionable MCP initialization failures; routine connects stay out of the transcript. */
|
|
4
|
-
export declare function renderAgentInitialization(renderer: InkTuiBridge, events: readonly AgentEvent[]): void;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/** Reports only actionable MCP initialization failures; routine connects stay out of the transcript. */
|
|
2
|
-
export function renderAgentInitialization(renderer, events) {
|
|
3
|
-
const summaries = new Map();
|
|
4
|
-
for (const event of events) {
|
|
5
|
-
if (event.type === 'mcp.server.status') {
|
|
6
|
-
const summary = getSummary(summaries, event.summary.serverId);
|
|
7
|
-
summary.status = event.summary.status;
|
|
8
|
-
if (event.summary.protocolVersion !== undefined)
|
|
9
|
-
summary.protocolVersion = event.summary.protocolVersion;
|
|
10
|
-
}
|
|
11
|
-
else if (event.type === 'mcp.tool.discovered') {
|
|
12
|
-
getSummary(summaries, event.tool.serverId).discovered += 1;
|
|
13
|
-
}
|
|
14
|
-
else if (event.type === 'mcp.tool.catalog.updated' && event.error !== undefined) {
|
|
15
|
-
getSummary(summaries, event.serverId).discoveryError = event.error.message;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
for (const [serverId, summary] of summaries) {
|
|
19
|
-
if (summary.discoveryError === undefined && (summary.status === undefined || summary.status === 'connected'))
|
|
20
|
-
continue;
|
|
21
|
-
const details = [
|
|
22
|
-
summary.status === 'connected' ? undefined : summary.status,
|
|
23
|
-
...(summary.protocolVersion === undefined ? [] : [`protocol ${summary.protocolVersion}`]),
|
|
24
|
-
...(summary.discovered === 0 ? [] : [`${summary.discovered} tool${summary.discovered === 1 ? '' : 's'} discovered`]),
|
|
25
|
-
...(summary.discoveryError === undefined ? [] : [`tool discovery failed · ${summary.discoveryError}`]),
|
|
26
|
-
].filter((value) => value !== undefined);
|
|
27
|
-
renderer.initializationNotice(`mcp:${serverId}`, `MCP ${serverId}: ${details.join(' · ') || 'initialized'}`);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
function getSummary(summaries, serverId) {
|
|
31
|
-
const existing = summaries.get(serverId);
|
|
32
|
-
if (existing !== undefined)
|
|
33
|
-
return existing;
|
|
34
|
-
const created = { discovered: 0 };
|
|
35
|
-
summaries.set(serverId, created);
|
|
36
|
-
return created;
|
|
37
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export interface TuiContextSnapshot {
|
|
2
|
-
model: string | null;
|
|
3
|
-
contextWindow?: number;
|
|
4
|
-
usedTokens: number;
|
|
5
|
-
systemPromptTokens: number;
|
|
6
|
-
conversationTokens: number;
|
|
7
|
-
inputTokens?: number;
|
|
8
|
-
outputTokens?: number;
|
|
9
|
-
otherTokens?: number;
|
|
10
|
-
transcriptEntries: number;
|
|
11
|
-
userMessages: number;
|
|
12
|
-
assistantMessages: number;
|
|
13
|
-
toolCalls: number;
|
|
14
|
-
compactions: number;
|
|
15
|
-
pendingAttachments: number;
|
|
16
|
-
toolNames: readonly string[];
|
|
17
|
-
mcpServers: number;
|
|
18
|
-
memoryFiles: number;
|
|
19
|
-
}
|
|
20
|
-
/** Renders durable and estimated context information as a human-readable TUI report. */
|
|
21
|
-
export declare function formatContextSnapshot(snapshot: TuiContextSnapshot): string;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { formatCompactNumber } from './formatters.js';
|
|
2
|
-
/** Renders durable and estimated context information as a human-readable TUI report. */
|
|
3
|
-
export function formatContextSnapshot(snapshot) {
|
|
4
|
-
const contextLimit = snapshot.contextWindow === undefined ? '?' : formatCompactNumber(snapshot.contextWindow);
|
|
5
|
-
const freeTokens = snapshot.contextWindow === undefined
|
|
6
|
-
? undefined
|
|
7
|
-
: Math.max(0, snapshot.contextWindow - snapshot.usedTokens);
|
|
8
|
-
const utilization = snapshot.contextWindow === undefined || snapshot.contextWindow <= 0
|
|
9
|
-
? '?'
|
|
10
|
-
: `${Math.round((snapshot.usedTokens / snapshot.contextWindow) * 100)}%`;
|
|
11
|
-
return [
|
|
12
|
-
'Context Usage',
|
|
13
|
-
`Model ${snapshot.model ?? 'not selected'}`,
|
|
14
|
-
`Context ${formatCompactNumber(snapshot.usedTokens)}/${contextLimit} tokens (${utilization})`,
|
|
15
|
-
`System prompt ${formatCompactNumber(snapshot.systemPromptTokens)} tokens`,
|
|
16
|
-
`Conversation ${formatCompactNumber(snapshot.conversationTokens)} tokens`,
|
|
17
|
-
...(snapshot.inputTokens === undefined ? [] : [` Input ${formatCompactNumber(snapshot.inputTokens)} tokens`]),
|
|
18
|
-
...(snapshot.outputTokens === undefined ? [] : [` Output ${formatCompactNumber(snapshot.outputTokens)} tokens`]),
|
|
19
|
-
...(snapshot.otherTokens === undefined ? [] : [` Other ${formatCompactNumber(snapshot.otherTokens)} tokens`]),
|
|
20
|
-
`Free space ${freeTokens === undefined ? '?' : formatCompactNumber(freeTokens)} tokens`,
|
|
21
|
-
'',
|
|
22
|
-
`Local tools ${snapshot.toolNames.length}`,
|
|
23
|
-
`MCP servers ${snapshot.mcpServers}`,
|
|
24
|
-
'MCP tools discovered when an agent run initializes the servers',
|
|
25
|
-
`Memory files ${snapshot.memoryFiles} (not configured)`,
|
|
26
|
-
`Messages ${snapshot.transcriptEntries} (${snapshot.userMessages} user · ${snapshot.assistantMessages} assistant)`,
|
|
27
|
-
`Tool calls ${snapshot.toolCalls}`,
|
|
28
|
-
`Compactions ${snapshot.compactions}`,
|
|
29
|
-
`Attachments ${snapshot.pendingAttachments}`,
|
|
30
|
-
'',
|
|
31
|
-
'Token counts are estimated from the persisted session and the current CLI capability prompt.',
|
|
32
|
-
].join('\n');
|
|
33
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { formatCompactNumber } from '../../application/formatting/compact-number.js';
|
|
2
|
-
/** Estimates terminal column width without relying on a transitive dependency. */
|
|
3
|
-
export declare function terminalTextWidth(value: string): number;
|
|
4
|
-
export declare function wrapTerminalText(value: string, width: number): string[];
|
|
5
|
-
export declare function truncateTerminalText(value: string, width: number): string;
|
|
6
|
-
export declare function formatContextUsage(usedTokens: number, contextWindow?: number): string;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { formatCompactNumber } from '../../application/formatting/compact-number.js';
|
|
2
|
-
export { formatCompactNumber } from '../../application/formatting/compact-number.js';
|
|
3
|
-
/** Estimates terminal column width without relying on a transitive dependency. */
|
|
4
|
-
export function terminalTextWidth(value) {
|
|
5
|
-
let width = 0;
|
|
6
|
-
for (const character of value) {
|
|
7
|
-
const codePoint = character.codePointAt(0) ?? 0;
|
|
8
|
-
if (isZeroWidth(codePoint))
|
|
9
|
-
continue;
|
|
10
|
-
width += isWide(codePoint) ? 2 : 1;
|
|
11
|
-
}
|
|
12
|
-
return width;
|
|
13
|
-
}
|
|
14
|
-
export function wrapTerminalText(value, width) {
|
|
15
|
-
if (value.length === 0)
|
|
16
|
-
return [''];
|
|
17
|
-
const rows = [];
|
|
18
|
-
let current = '';
|
|
19
|
-
for (const character of Array.from(value)) {
|
|
20
|
-
const candidate = `${current}${character}`;
|
|
21
|
-
if (current.length > 0 && terminalTextWidth(candidate) > Math.max(1, width)) {
|
|
22
|
-
rows.push(current);
|
|
23
|
-
current = character;
|
|
24
|
-
}
|
|
25
|
-
else
|
|
26
|
-
current = candidate;
|
|
27
|
-
}
|
|
28
|
-
if (current.length > 0)
|
|
29
|
-
rows.push(current);
|
|
30
|
-
return rows;
|
|
31
|
-
}
|
|
32
|
-
export function truncateTerminalText(value, width) {
|
|
33
|
-
if (terminalTextWidth(value) <= width)
|
|
34
|
-
return value;
|
|
35
|
-
if (width <= 1)
|
|
36
|
-
return '…'.slice(0, width);
|
|
37
|
-
const prefix = wrapTerminalText(value, Math.max(1, width - 1))[0] ?? '';
|
|
38
|
-
return `${prefix}…`;
|
|
39
|
-
}
|
|
40
|
-
export function formatContextUsage(usedTokens, contextWindow) {
|
|
41
|
-
return contextWindow === undefined
|
|
42
|
-
? `${formatCompactNumber(usedTokens)}/?`
|
|
43
|
-
: `${formatCompactNumber(usedTokens)}/${formatCompactNumber(contextWindow)}`;
|
|
44
|
-
}
|
|
45
|
-
function isZeroWidth(codePoint) {
|
|
46
|
-
return (codePoint >= 0x0300 && codePoint <= 0x036f) || codePoint === 0x200d || (codePoint >= 0xfe00 && codePoint <= 0xfe0f);
|
|
47
|
-
}
|
|
48
|
-
function isWide(codePoint) {
|
|
49
|
-
return codePoint >= 0x1100 && (codePoint <= 0x115f ||
|
|
50
|
-
codePoint === 0x2329 ||
|
|
51
|
-
codePoint === 0x232a ||
|
|
52
|
-
(codePoint >= 0x2e80 && codePoint <= 0xa4cf) ||
|
|
53
|
-
(codePoint >= 0xac00 && codePoint <= 0xd7a3) ||
|
|
54
|
-
(codePoint >= 0xf900 && codePoint <= 0xfaff) ||
|
|
55
|
-
(codePoint >= 0xfe10 && codePoint <= 0xfe19) ||
|
|
56
|
-
(codePoint >= 0xfe30 && codePoint <= 0xfe6f) ||
|
|
57
|
-
(codePoint >= 0xff00 && codePoint <= 0xff60) ||
|
|
58
|
-
(codePoint >= 0xffe0 && codePoint <= 0xffe6) ||
|
|
59
|
-
(codePoint >= 0x1f300 && codePoint <= 0x1faff));
|
|
60
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export function choiceWindow(choices, selected, maximumVisible) {
|
|
2
|
-
const size = Math.max(1, maximumVisible);
|
|
3
|
-
const start = Math.max(0, Math.min(selected - Math.floor(size / 2), Math.max(0, choices.length - size)));
|
|
4
|
-
return { start, entries: choices.slice(start, start + size) };
|
|
5
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text, useAnimation } from 'ink';
|
|
3
|
-
import { DARK_THEME as palette } from '../../../themes/theme.js';
|
|
4
|
-
import { ShimmerText } from './shimmer-text.js';
|
|
5
|
-
export function ActivityEntry({ activity, showDetails = false }) {
|
|
6
|
-
const pending = activity.state === 'pending';
|
|
7
|
-
const active = activity.state === 'running';
|
|
8
|
-
const animation = useAnimation({ interval: 100, isActive: active });
|
|
9
|
-
const elapsed = active ? Math.max(activity.elapsedMs ?? 0, Date.now() - activity.startedAt) : activity.elapsedMs ?? 0;
|
|
10
|
-
const label = pending ? `Run ${activity.label}` : active ? `Running ${activity.label}` : activity.state === 'failed' ? `Command failed ${activity.label}` : `Ran ${activity.label}`;
|
|
11
|
-
const indicator = pending ? '◌' : active ? '›' : activity.state === 'failed' ? '!' : '✓';
|
|
12
|
-
return _jsxs(Box, { marginBottom: 1, children: [_jsxs(Text, { color: activity.state === 'failed' ? palette.error : palette.muted, children: [indicator, " "] }), _jsx(ShimmerText, { value: label, active: active, frame: animation.frame }), _jsxs(Text, { color: palette.muted, children: [" \u00B7 ", formatDuration(elapsed), showDetails && activity.toolName !== undefined ? ` · ${activity.toolName}${activity.kind === undefined ? '' : ` · ${activity.kind}`}` : ''] })] });
|
|
13
|
-
}
|
|
14
|
-
function formatDuration(milliseconds) {
|
|
15
|
-
return milliseconds < 1000 ? `${milliseconds}ms` : `${(milliseconds / 1000).toFixed(1)}s`;
|
|
16
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { JSX } from 'react';
|
|
2
|
-
import type { ChatUsage } from '../../../../ports/chat-model.js';
|
|
3
|
-
export interface ActivityStatusProps {
|
|
4
|
-
status: string;
|
|
5
|
-
activityStartedAt?: number;
|
|
6
|
-
elapsedMs?: number;
|
|
7
|
-
usage?: ChatUsage;
|
|
8
|
-
paused?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare function ActivityStatus({ status, activityStartedAt, elapsedMs, usage, paused }: ActivityStatusProps): JSX.Element;
|