@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
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import fs from 'node:fs/promises';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { CliError } from '../../domain/errors/cli-error.js';
|
|
4
|
-
import { CLI_ERROR_CODES } from '../../domain/errors/error-codes.js';
|
|
5
|
-
import { createProjectFingerprint } from '../../domain/project/project-identity.js';
|
|
6
|
-
import { TRUST_GRANT_HINT } from '../commands/command-hints.js';
|
|
7
|
-
export class ProjectTrustService {
|
|
8
|
-
store;
|
|
9
|
-
constructor(store) {
|
|
10
|
-
this.store = store;
|
|
11
|
-
}
|
|
12
|
-
async inspect(inputPath) {
|
|
13
|
-
const canonicalPath = await this.canonicalize(inputPath);
|
|
14
|
-
const gitRoot = await findGitRoot(canonicalPath);
|
|
15
|
-
return {
|
|
16
|
-
canonicalPath,
|
|
17
|
-
...(gitRoot !== undefined ? { gitRoot } : {}),
|
|
18
|
-
fingerprint: createProjectFingerprint(canonicalPath, gitRoot),
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
async isTrusted(identity) {
|
|
22
|
-
return (await this.store.get(identity.fingerprint)) !== undefined;
|
|
23
|
-
}
|
|
24
|
-
async grant(identity) {
|
|
25
|
-
const trusted = {
|
|
26
|
-
fingerprint: identity.fingerprint,
|
|
27
|
-
canonicalPath: identity.canonicalPath,
|
|
28
|
-
grantedAt: new Date().toISOString(),
|
|
29
|
-
grantedBy: 'user',
|
|
30
|
-
};
|
|
31
|
-
await this.store.grant(trusted);
|
|
32
|
-
return trusted;
|
|
33
|
-
}
|
|
34
|
-
async revoke(identity) {
|
|
35
|
-
return this.store.revoke(identity.fingerprint);
|
|
36
|
-
}
|
|
37
|
-
async requireTrusted(identity) {
|
|
38
|
-
if (!(await this.isTrusted(identity))) {
|
|
39
|
-
throw new CliError(CLI_ERROR_CODES.PROJECT_TRUST_REQUIRED, 'Project trust is required.', {
|
|
40
|
-
category: 'project',
|
|
41
|
-
userMessage: `Project is not trusted: ${identity.canonicalPath}.`, hint: TRUST_GRANT_HINT,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
async list() {
|
|
46
|
-
return this.store.list();
|
|
47
|
-
}
|
|
48
|
-
async canonicalize(inputPath) {
|
|
49
|
-
const resolved = path.resolve(inputPath);
|
|
50
|
-
try {
|
|
51
|
-
return await fs.realpath(resolved);
|
|
52
|
-
}
|
|
53
|
-
catch (error) {
|
|
54
|
-
throw new CliError(CLI_ERROR_CODES.PROJECT_PATH_INVALID, `Project path does not exist: ${resolved}`, {
|
|
55
|
-
category: 'project', userMessage: `Project path was not found: ${resolved}.`, cause: error,
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
async function findGitRoot(start) {
|
|
61
|
-
let current = start;
|
|
62
|
-
while (true) {
|
|
63
|
-
try {
|
|
64
|
-
const stat = await fs.stat(path.join(current, '.git'));
|
|
65
|
-
if (stat.isDirectory() || stat.isFile())
|
|
66
|
-
return current;
|
|
67
|
-
}
|
|
68
|
-
catch { /* Continue walking towards the filesystem root. */ }
|
|
69
|
-
const parent = path.dirname(current);
|
|
70
|
-
if (parent === current)
|
|
71
|
-
return undefined;
|
|
72
|
-
current = parent;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { ToolDefinition } from '@lotagate/sdk';
|
|
2
|
-
import type { ToolExecutionContext, ToolExecutor, ToolInfo, ToolResult } from '@lotagate/agent-sdk';
|
|
3
|
-
import type { ToolActivityObserver } from '../../ports/tool-activity.js';
|
|
4
|
-
export interface BrowserHostRequest {
|
|
5
|
-
version: 2;
|
|
6
|
-
type: 'host.request';
|
|
7
|
-
requestId: string;
|
|
8
|
-
tool: 'browser';
|
|
9
|
-
sessionId: string;
|
|
10
|
-
runId: string;
|
|
11
|
-
action: string;
|
|
12
|
-
params: Record<string, unknown>;
|
|
13
|
-
executionBoundary: 'host';
|
|
14
|
-
hostFallback: 'deny';
|
|
15
|
-
}
|
|
16
|
-
export interface BrowserHostResponse {
|
|
17
|
-
version: 2;
|
|
18
|
-
type: 'host.response';
|
|
19
|
-
requestId: string;
|
|
20
|
-
tool: 'browser';
|
|
21
|
-
ok: boolean;
|
|
22
|
-
result?: unknown;
|
|
23
|
-
error?: {
|
|
24
|
-
code: string;
|
|
25
|
-
category: string;
|
|
26
|
-
message: string;
|
|
27
|
-
retryable: boolean;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
export type BrowserHostInvoker = (request: BrowserHostRequest, signal?: AbortSignal) => Promise<BrowserHostResponse>;
|
|
31
|
-
export declare function browserToolDefinitions(): readonly ToolDefinition[];
|
|
32
|
-
export declare class BrowserHostToolExecutor implements ToolExecutor {
|
|
33
|
-
private readonly options;
|
|
34
|
-
constructor(options: {
|
|
35
|
-
request: BrowserHostInvoker;
|
|
36
|
-
onActivity?: ToolActivityObserver;
|
|
37
|
-
});
|
|
38
|
-
listTools(): readonly ToolDefinition[];
|
|
39
|
-
getToolInfo(toolName: string): ToolInfo | undefined;
|
|
40
|
-
execute(toolName: string, input: Record<string, unknown>, context: ToolExecutionContext): Promise<ToolResult>;
|
|
41
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { randomUUID } from 'node:crypto';
|
|
2
|
-
const BROWSER_TOOLS = [
|
|
3
|
-
functionTool('browser.navigate', 'Open an HTTP(S) URL in the agent browser.', { url: stringProperty('Destination URL.'), tabId: stringProperty('Optional browser tab id.') }, ['url']),
|
|
4
|
-
functionTool('browser.newTab', 'Open a new blank tab in the agent browser.', {}, []),
|
|
5
|
-
functionTool('browser.closeTab', 'Close the active browser tab.', { tabId: stringProperty('Optional browser tab id.') }, []),
|
|
6
|
-
functionTool('browser.selectTab', 'Make a browser tab active.', { tabId: stringProperty('Browser tab id.') }, ['tabId']),
|
|
7
|
-
functionTool('browser.inspect', 'Inspect the current page DOM summary, text, headings, links, and visible interactive elements.', { tabId: stringProperty('Optional browser tab id.') }, []),
|
|
8
|
-
functionTool('browser.inspectElement', 'Inspect a page element including its DOM, attributes, bounds, and computed CSS.', { target: targetSchema(), tabId: stringProperty('Optional browser tab id.') }, ['target']),
|
|
9
|
-
functionTool('browser.console', 'Read recent browser console messages and page errors.', { tabId: stringProperty('Optional browser tab id.'), limit: numberProperty('Maximum number of entries to return.') }, []),
|
|
10
|
-
functionTool('browser.network', 'Read recent browser network requests, HTTP failures, and request errors.', { tabId: stringProperty('Optional browser tab id.'), limit: numberProperty('Maximum number of entries to return.') }, []),
|
|
11
|
-
functionTool('browser.accessibility', 'Inspect the page accessibility tree without exposing control values.', { tabId: stringProperty('Optional browser tab id.') }, []),
|
|
12
|
-
functionTool('browser.setViewport', 'Emulate a responsive browser viewport for the current tab.', { width: numberProperty('Viewport width in CSS pixels.'), height: numberProperty('Viewport height in CSS pixels.'), mobile: booleanProperty('Whether to emulate a mobile layout.'), deviceScaleFactor: numberProperty('Optional device scale factor.') }, ['width', 'height']),
|
|
13
|
-
functionTool('browser.resetViewport', 'Reset the browser tab to its normal viewport.', { tabId: stringProperty('Optional browser tab id.') }, []),
|
|
14
|
-
functionTool('browser.screenshot', 'Capture the current browser tab as evidence.', { tabId: stringProperty('Optional browser tab id.') }, []),
|
|
15
|
-
functionTool('browser.click', 'Click a visible page element using an accessibility target, text, CSS selector, or coordinates.', { target: targetSchema() }, ['target']),
|
|
16
|
-
functionTool('browser.focus', 'Focus a visible page field or control.', { target: targetSchema() }, ['target']),
|
|
17
|
-
functionTool('browser.clear', 'Clear a visible editable page field.', { target: targetSchema() }, ['target']),
|
|
18
|
-
functionTool('browser.hover', 'Move the browser pointer over a visible page element.', { target: targetSchema() }, ['target']),
|
|
19
|
-
functionTool('browser.check', 'Check or uncheck a checkbox or radio input.', { target: targetSchema(), checked: booleanProperty('Whether the control should be checked.') }, ['target', 'checked']),
|
|
20
|
-
functionTool('browser.select', 'Select an option in a native HTML select control.', { target: targetSchema(), value: stringProperty('Option value or visible label.') }, ['target', 'value']),
|
|
21
|
-
functionTool('browser.readField', 'Read a visible non-password form field value.', { target: targetSchema() }, ['target']),
|
|
22
|
-
functionTool('browser.type', 'Enter text into a visible page field.', { target: targetSchema(), value: stringProperty('Text to enter.') }, ['target', 'value']),
|
|
23
|
-
functionTool('browser.upload', 'Upload a workspace file through a visible file input.', { target: targetSchema(), path: stringProperty('Workspace-relative or absolute file path.') }, ['target', 'path']),
|
|
24
|
-
functionTool('browser.download', 'Download an HTTP(S) resource to the Desktop downloads folder.', { url: stringProperty('HTTP(S) resource URL.'), tabId: stringProperty('Optional browser tab id.') }, ['url']),
|
|
25
|
-
functionTool('browser.dialog', 'Read or respond to the active alert, confirm, or prompt dialog.', { action: enumProperty(['read', 'accept', 'dismiss'], 'Dialog operation.'), promptText: stringProperty('Optional text for a prompt dialog.'), tabId: stringProperty('Optional browser tab id.') }, ['action']),
|
|
26
|
-
functionTool('browser.press', 'Press a keyboard key in the current browser tab.', { key: stringProperty('Key name, for example Enter or Tab.'), modifiers: stringArrayProperty('Optional modifiers: Alt, Control, Shift, or Meta.'), tabId: stringProperty('Optional browser tab id.') }, ['key']),
|
|
27
|
-
functionTool('browser.scroll', 'Scroll the current browser tab.', { deltaX: numberProperty('Horizontal scroll amount.'), deltaY: numberProperty('Vertical scroll amount.'), tabId: stringProperty('Optional browser tab id.') }, []),
|
|
28
|
-
functionTool('browser.back', 'Navigate the current browser tab back.', { tabId: stringProperty('Optional browser tab id.') }, []),
|
|
29
|
-
functionTool('browser.forward', 'Navigate the current browser tab forward.', { tabId: stringProperty('Optional browser tab id.') }, []),
|
|
30
|
-
functionTool('browser.reload', 'Reload the current browser tab.', { tabId: stringProperty('Optional browser tab id.') }, []),
|
|
31
|
-
functionTool('browser.waitFor', 'Wait until a URL, text fragment, or CSS selector appears.', { condition: waitConditionSchema(), timeoutMs: numberProperty('Maximum wait time in milliseconds.') }, ['condition']),
|
|
32
|
-
functionTool('browser.tabs', 'List tabs in the agent browser session.', {}, []),
|
|
33
|
-
];
|
|
34
|
-
export function browserToolDefinitions() { return BROWSER_TOOLS; }
|
|
35
|
-
export class BrowserHostToolExecutor {
|
|
36
|
-
options;
|
|
37
|
-
constructor(options) {
|
|
38
|
-
this.options = options;
|
|
39
|
-
}
|
|
40
|
-
listTools() { return browserToolDefinitions(); }
|
|
41
|
-
getToolInfo(toolName) {
|
|
42
|
-
if (!BROWSER_TOOLS.some(definition => getToolName(definition) === toolName))
|
|
43
|
-
return undefined;
|
|
44
|
-
const readOnly = ['browser.inspect', 'browser.inspectElement', 'browser.console', 'browser.network', 'browser.accessibility', 'browser.setViewport', 'browser.resetViewport', 'browser.screenshot', 'browser.tabs', 'browser.scroll', 'browser.focus', 'browser.hover', 'browser.waitFor'].includes(toolName);
|
|
45
|
-
return { toolName, source: 'custom', executorId: 'desktop-browser-host', metadata: { risk: readOnly ? 'read' : 'unknown' } };
|
|
46
|
-
}
|
|
47
|
-
async execute(toolName, input, context) {
|
|
48
|
-
if (!BROWSER_TOOLS.some(definition => getToolName(definition) === toolName))
|
|
49
|
-
return { content: `Unknown browser tool: ${toolName}`, isError: true };
|
|
50
|
-
const activity = this.options.onActivity?.start({ key: `${context.runId}:${toolName}`, toolName, source: 'browser', label: formatBrowserActivity(toolName, input) });
|
|
51
|
-
try {
|
|
52
|
-
const response = await this.options.request({ version: 2, type: 'host.request', requestId: randomUUID(), tool: 'browser', sessionId: context.sessionId, runId: context.runId, action: toolName, params: input, executionBoundary: 'host', hostFallback: 'deny' }, context.signal);
|
|
53
|
-
if (!response.ok) {
|
|
54
|
-
const message = response.error?.message ?? 'Desktop rejected the browser action.';
|
|
55
|
-
activity?.complete(true);
|
|
56
|
-
return { content: message, isError: true, metadata: { code: response.error?.code ?? 'BROWSER_HOST_ERROR', retryable: response.error?.retryable ?? false } };
|
|
57
|
-
}
|
|
58
|
-
const content = boundJson(response.result, context.maxResultBytes);
|
|
59
|
-
activity?.complete(false);
|
|
60
|
-
return { content, isError: false, metadata: { browser: true } };
|
|
61
|
-
}
|
|
62
|
-
catch (error) {
|
|
63
|
-
activity?.complete(true);
|
|
64
|
-
return { content: error instanceof Error ? error.message : 'Browser host request failed.', isError: true };
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
function functionTool(name, description, properties, required) {
|
|
69
|
-
return { type: 'function', function: { name, description, parameters: { type: 'object', properties, required, additionalProperties: false } } };
|
|
70
|
-
}
|
|
71
|
-
function stringProperty(description) { return { type: 'string', description }; }
|
|
72
|
-
function numberProperty(description) { return { type: 'number', description }; }
|
|
73
|
-
function booleanProperty(description) { return { type: 'boolean', description }; }
|
|
74
|
-
function enumProperty(values, description) { return { type: 'string', enum: [...values], description }; }
|
|
75
|
-
function stringArrayProperty(description) { return { type: 'array', items: { type: 'string' }, description }; }
|
|
76
|
-
function targetSchema() { return { type: 'object', properties: { type: { type: 'string', enum: ['accessibility', 'text', 'css', 'coordinates'] }, role: { type: 'string' }, name: { type: 'string' }, value: { type: 'string' }, selector: { type: 'string' }, x: { type: 'number' }, y: { type: 'number' } }, required: ['type'], additionalProperties: false }; }
|
|
77
|
-
function waitConditionSchema() { return { type: 'object', properties: { type: { type: 'string', enum: ['selector', 'text', 'url'] }, value: { type: 'string' } }, required: ['type', 'value'], additionalProperties: false }; }
|
|
78
|
-
function getToolName(definition) { return 'function' in definition ? definition.function.name : undefined; }
|
|
79
|
-
function boundJson(value, maxBytes) { const content = JSON.stringify(value ?? null); return Buffer.byteLength(content, 'utf8') <= maxBytes ? content : `${content.slice(0, Math.max(0, maxBytes - 12))}\n[truncated]`; }
|
|
80
|
-
function formatBrowserActivity(toolName, input) {
|
|
81
|
-
if (toolName === 'browser.navigate')
|
|
82
|
-
return `Open ${typeof input['url'] === 'string' ? input['url'] : 'URL'}`;
|
|
83
|
-
if (toolName === 'browser.type')
|
|
84
|
-
return 'Enter text in browser';
|
|
85
|
-
if (toolName === 'browser.click')
|
|
86
|
-
return 'Click page element';
|
|
87
|
-
return toolName.replace(/^browser\./u, 'Browser ');
|
|
88
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Readable, Writable } from 'node:stream';
|
|
2
|
-
import type { CliRuntime } from '../../bootstrap/runtime-factory.js';
|
|
3
|
-
export declare const DESKTOP_PROTOCOL_VERSION: 2;
|
|
4
|
-
/**
|
|
5
|
-
* Local JSONL bridge for the Desktop application. It is deliberately kept in
|
|
6
|
-
* the CLI application layer: Desktop reuses CLI policy and runtime, while the
|
|
7
|
-
* public SDK packages remain independent libraries.
|
|
8
|
-
*/
|
|
9
|
-
export declare function runDesktopAgentCommand(runtime: CliRuntime, cwd: string, input: Readable, output: Writable): Promise<number>;
|