@lotagate/cli 0.1.23 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -3
- package/SECURITY.md +2 -0
- package/dist/application/agent/agent-history.d.ts +3 -0
- package/dist/application/agent/agent-history.js +5 -0
- package/dist/application/agent/agent-input-context.d.ts +12 -0
- package/dist/application/agent/agent-input-context.js +5 -0
- package/dist/application/agent/agent-limit.d.ts +3 -0
- package/dist/application/agent/agent-limit.js +1 -0
- package/dist/application/agent/agent-run-tracker.d.ts +30 -0
- package/dist/application/agent/agent-run-tracker.js +1 -0
- package/dist/application/agent/agent-runtime-context.d.ts +22 -0
- package/dist/application/agent/agent-runtime-context.js +1 -0
- package/dist/application/agent/agent-session-store.d.ts +19 -0
- package/dist/application/agent/agent-session-store.js +6 -0
- package/dist/application/agent/capability-profile.d.ts +55 -0
- package/dist/application/agent/capability-profile.js +1 -0
- package/dist/application/agent/cli-agent-execution-service.d.ts +110 -0
- package/dist/application/agent/cli-agent-execution-service.js +1 -0
- package/dist/application/agent/cli-agent-run-request.d.ts +12 -0
- package/dist/application/agent/cli-agent-run-request.js +0 -0
- package/dist/application/agent/context-compaction-persistence.d.ts +8 -0
- package/dist/application/agent/context-compaction-persistence.js +1 -0
- package/dist/application/agent/context-compaction.d.ts +21 -0
- package/dist/application/agent/context-compaction.js +7 -0
- package/dist/application/agent/interactive-agent-guidance.d.ts +5 -0
- package/dist/application/agent/interactive-agent-guidance.js +2 -0
- package/dist/application/agent/prompt-data-safety.d.ts +14 -0
- package/dist/application/agent/prompt-data-safety.js +4 -0
- package/dist/application/agent/scoped-tool-executor.d.ts +13 -0
- package/dist/application/agent/scoped-tool-executor.js +1 -0
- package/dist/application/agent/tool-catalog.d.ts +14 -0
- package/dist/application/agent/tool-catalog.js +1 -0
- package/dist/application/agent/tool-display.d.ts +7 -0
- package/dist/application/agent/tool-display.js +1 -0
- package/dist/application/agent/tool-hook-lifecycle.d.ts +19 -0
- package/dist/application/agent/tool-hook-lifecycle.js +1 -0
- package/dist/application/auth/authentication-service.d.ts +20 -0
- package/dist/application/auth/authentication-service.js +1 -0
- package/dist/application/chat/chat-service.d.ts +12 -0
- package/dist/application/chat/chat-service.js +1 -0
- package/dist/application/chat/pending-attachment-store.d.ts +12 -0
- package/dist/application/chat/pending-attachment-store.js +1 -0
- package/dist/application/commands/application-command-executor.d.ts +23 -0
- package/dist/application/commands/application-command-executor.js +3 -0
- package/dist/application/commands/cli-args.d.ts +6 -0
- package/dist/application/commands/cli-args.js +1 -0
- package/dist/application/commands/cli-command-services.d.ts +17 -0
- package/dist/application/commands/cli-command-services.js +33 -0
- package/dist/application/commands/command-cancellation.d.ts +6 -0
- package/dist/application/commands/command-cancellation.js +1 -0
- package/dist/application/commands/command-catalog.d.ts +6 -0
- package/dist/application/commands/command-catalog.js +1 -0
- package/dist/application/commands/command-contract.d.ts +60 -0
- package/dist/application/commands/command-contract.js +0 -0
- package/dist/application/commands/command-hints.d.ts +9 -0
- package/dist/application/commands/command-hints.js +1 -0
- package/dist/application/commands/command-output.d.ts +4 -0
- package/dist/application/commands/command-output.js +0 -0
- package/dist/application/commands/command-parser.d.ts +10 -0
- package/dist/application/commands/command-parser.js +1 -0
- package/dist/application/commands/command-presentation.d.ts +7 -0
- package/dist/application/commands/command-presentation.js +3 -0
- package/dist/application/commands/command-registry.d.ts +11 -0
- package/dist/application/commands/command-registry.js +1 -0
- package/dist/application/commands/command-runtime.d.ts +2 -0
- package/dist/application/commands/command-runtime.js +1 -0
- package/dist/application/commands/goal-command-handlers.d.ts +3 -0
- package/dist/application/commands/goal-command-handlers.js +7 -0
- package/dist/application/commands/media-command-handlers.d.ts +9 -0
- package/dist/application/commands/media-command-handlers.js +8 -0
- package/dist/application/commands/media-command-output.d.ts +11 -0
- package/dist/application/commands/media-command-output.js +1 -0
- package/dist/application/commands/memory-command-handler.d.ts +29 -0
- package/dist/application/commands/memory-command-handler.js +12 -0
- package/dist/application/commands/runtime-command-handlers.d.ts +7 -0
- package/dist/application/commands/runtime-command-handlers.js +14 -0
- package/dist/application/commands/stream-output.d.ts +4 -0
- package/dist/application/commands/stream-output.js +1 -0
- package/dist/application/commands/utility-commands.d.ts +6 -0
- package/dist/application/commands/utility-commands.js +10 -0
- package/dist/application/config/execution-config.d.ts +4 -0
- package/dist/application/config/execution-config.js +1 -0
- package/dist/application/extensions/extension-list-contract.d.ts +18 -0
- package/dist/application/extensions/extension-list-contract.js +0 -0
- package/dist/application/extensions/extension-list-formatters.d.ts +38 -0
- package/dist/application/extensions/extension-list-formatters.js +1 -0
- package/dist/application/extensions/extension-list-output.d.ts +3 -0
- package/dist/application/extensions/extension-list-output.js +3 -0
- package/dist/application/extensions/plugin-contribution-registry.d.ts +31 -0
- package/dist/application/extensions/plugin-contribution-registry.js +1 -0
- package/dist/application/extensions/plugin-detail-contract.d.ts +25 -0
- package/dist/application/extensions/plugin-detail-contract.js +0 -0
- package/dist/application/extensions/plugin-detail-service.d.ts +3 -0
- package/dist/application/extensions/plugin-detail-service.js +1 -0
- package/dist/application/extensions/skill-scope-store.d.ts +23 -0
- package/dist/application/extensions/skill-scope-store.js +1 -0
- package/dist/application/formatting/compact-number.d.ts +2 -0
- package/dist/application/formatting/compact-number.js +1 -0
- package/dist/application/formatting/compact-table.d.ts +22 -0
- package/dist/application/formatting/compact-table.js +2 -0
- package/dist/application/intent/completion-gate.d.ts +6 -0
- package/dist/application/intent/completion-gate.js +1 -0
- package/dist/application/intent/evidence-ledger.d.ts +21 -0
- package/dist/application/intent/evidence-ledger.js +1 -0
- package/dist/application/intent/evidence-recording-tool-executor.d.ts +16 -0
- package/dist/application/intent/evidence-recording-tool-executor.js +1 -0
- package/dist/application/intent/intent-compiler.d.ts +11 -0
- package/dist/application/intent/intent-compiler.js +2 -0
- package/dist/application/intent/intent-execution-gate.d.ts +11 -0
- package/dist/application/intent/intent-execution-gate.js +1 -0
- package/dist/application/intent/intent-host-context.d.ts +6 -0
- package/dist/application/intent/intent-host-context.js +1 -0
- package/dist/application/intent/intent-run-controller.d.ts +56 -0
- package/dist/application/intent/intent-run-controller.js +3 -0
- package/dist/application/intent/project-policy.d.ts +16 -0
- package/dist/application/intent/project-policy.js +1 -0
- package/dist/application/media/video-operation-poller.d.ts +5 -0
- package/dist/application/media/video-operation-poller.js +1 -0
- package/dist/application/memory/memory-capture-policy.d.ts +10 -0
- package/dist/application/memory/memory-capture-policy.js +1 -0
- package/dist/application/memory/memory-consolidation-service.d.ts +12 -0
- package/dist/application/memory/memory-consolidation-service.js +1 -0
- package/dist/application/memory/memory-context-assembler.d.ts +24 -0
- package/dist/application/memory/memory-context-assembler.js +1 -0
- package/dist/application/memory/memory-extractor.d.ts +21 -0
- package/dist/application/memory/memory-extractor.js +2 -0
- package/dist/application/memory/memory-service.d.ts +34 -0
- package/dist/application/memory/memory-service.js +1 -0
- package/dist/application/model/cached-model-catalog.d.ts +13 -0
- package/dist/application/model/cached-model-catalog.js +1 -0
- package/dist/application/model/initial-model-selection.d.ts +10 -0
- package/dist/application/model/initial-model-selection.js +1 -0
- package/dist/application/model/model-catalog-service.d.ts +6 -0
- package/dist/application/model/model-catalog-service.js +1 -0
- package/dist/application/model/model-context-window.d.ts +3 -0
- package/dist/application/model/model-context-window.js +1 -0
- package/dist/application/model/model-response-retry.d.ts +9 -0
- package/dist/application/model/model-response-retry.js +1 -0
- package/dist/application/orchestration/abortable-wait.d.ts +2 -0
- package/dist/application/orchestration/abortable-wait.js +1 -0
- package/dist/application/orchestration/cli-subagent-service.d.ts +73 -0
- package/dist/application/orchestration/cli-subagent-service.js +13 -0
- package/dist/application/orchestration/cli-turn-event-projector.d.ts +15 -0
- package/dist/application/orchestration/cli-turn-event-projector.js +1 -0
- package/dist/application/orchestration/cli-turn-events.d.ts +83 -0
- package/dist/application/orchestration/cli-turn-events.js +1 -0
- package/dist/application/orchestration/cli-turn-persistence.d.ts +6 -0
- package/dist/application/orchestration/cli-turn-persistence.js +1 -0
- package/dist/application/orchestration/goal-evaluator.d.ts +18 -0
- package/dist/application/orchestration/goal-evaluator.js +3 -0
- package/dist/application/orchestration/goal-input.d.ts +3 -0
- package/dist/application/orchestration/goal-input.js +1 -0
- package/dist/application/orchestration/goal-output.d.ts +2 -0
- package/dist/application/orchestration/goal-output.js +2 -0
- package/dist/application/orchestration/goal-runner.d.ts +22 -0
- package/dist/application/orchestration/goal-runner.js +10 -0
- package/dist/application/orchestration/goal-usage.d.ts +9 -0
- package/dist/application/orchestration/goal-usage.js +1 -0
- package/dist/application/orchestration/headless-agent-turn.d.ts +35 -0
- package/dist/application/orchestration/headless-agent-turn.js +4 -0
- package/dist/application/orchestration/subagent-coordinator.d.ts +41 -0
- package/dist/application/orchestration/subagent-coordinator.js +1 -0
- package/dist/application/orchestration/subagent-handoff.d.ts +3 -0
- package/dist/application/orchestration/subagent-handoff.js +3 -0
- package/dist/application/orchestration/subagent-tool-executor.d.ts +12 -0
- package/dist/application/orchestration/subagent-tool-executor.js +1 -0
- package/dist/application/orchestration/task-graph.d.ts +13 -0
- package/dist/application/orchestration/task-graph.js +1 -0
- package/dist/application/orchestration/task-scheduler.d.ts +18 -0
- package/dist/application/orchestration/task-scheduler.js +1 -0
- package/dist/application/project/project-trust-service.d.ts +13 -0
- package/dist/application/project/project-trust-service.js +1 -0
- package/dist/application/project-intelligence/project-intelligence-service.d.ts +14 -0
- package/dist/application/project-intelligence/project-intelligence-service.js +1 -0
- package/dist/application/protocol/browser-host-tool-executor.d.ts +41 -0
- package/dist/application/protocol/browser-host-tool-executor.js +2 -0
- package/dist/application/protocol/computer-host-tool-executor.d.ts +42 -0
- package/dist/application/protocol/computer-host-tool-executor.js +2 -0
- package/dist/application/protocol/desktop-agent-command.d.ts +9 -0
- package/dist/application/protocol/desktop-agent-command.js +3 -0
- package/dist/application/protocol/desktop-agent-request-parser.d.ts +186 -0
- package/dist/application/protocol/desktop-agent-request-parser.js +1 -0
- package/dist/application/protocol/desktop-approval-broker.d.ts +16 -0
- package/dist/application/protocol/desktop-approval-broker.js +1 -0
- package/dist/application/protocol/desktop-attachment-store.d.ts +16 -0
- package/dist/application/protocol/desktop-attachment-store.js +1 -0
- package/dist/application/protocol/desktop-command-catalog.d.ts +2 -0
- package/dist/application/protocol/desktop-command-catalog.js +1 -0
- package/dist/application/protocol/desktop-command-contract.d.ts +26 -0
- package/dist/application/protocol/desktop-command-contract.js +1 -0
- package/dist/application/protocol/desktop-command-executor.d.ts +17 -0
- package/dist/application/protocol/desktop-command-executor.js +1 -0
- package/dist/application/protocol/desktop-command-output.d.ts +15 -0
- package/dist/application/protocol/desktop-command-output.js +1 -0
- package/dist/application/protocol/desktop-execution-policy.d.ts +17 -0
- package/dist/application/protocol/desktop-execution-policy.js +1 -0
- package/dist/application/protocol/desktop-extension-request-handler.d.ts +14 -0
- package/dist/application/protocol/desktop-extension-request-handler.js +1 -0
- package/dist/application/protocol/desktop-extension-service.d.ts +44 -0
- package/dist/application/protocol/desktop-extension-service.js +3 -0
- package/dist/application/protocol/desktop-host-tool-executor.d.ts +63 -0
- package/dist/application/protocol/desktop-host-tool-executor.js +2 -0
- package/dist/application/protocol/desktop-intent-event-writer.d.ts +20 -0
- package/dist/application/protocol/desktop-intent-event-writer.js +1 -0
- package/dist/application/protocol/desktop-mcp-events.d.ts +10 -0
- package/dist/application/protocol/desktop-mcp-events.js +1 -0
- package/dist/application/protocol/desktop-orchestration-events.d.ts +2 -0
- package/dist/application/protocol/desktop-orchestration-events.js +2 -0
- package/dist/application/protocol/desktop-protocol-helpers.d.ts +13 -0
- package/dist/application/protocol/desktop-protocol-helpers.js +1 -0
- package/dist/application/protocol/document-host-tool-definitions.d.ts +4 -0
- package/dist/application/protocol/document-host-tool-definitions.js +1 -0
- package/dist/application/protocol/document-host-tool-executor.d.ts +49 -0
- package/dist/application/protocol/document-host-tool-executor.js +2 -0
- package/dist/application/protocol/json-line-writer.d.ts +9 -0
- package/dist/application/protocol/json-line-writer.js +2 -0
- package/dist/application/protocol/jsonl-agent-command.d.ts +3 -0
- package/dist/application/protocol/jsonl-agent-command.js +3 -0
- package/dist/application/protocol/jsonl-protocol.d.ts +82 -0
- package/dist/application/protocol/jsonl-protocol.js +2 -0
- package/dist/application/protocol/tool-image-content.d.ts +4 -0
- package/dist/application/protocol/tool-image-content.js +1 -0
- package/dist/application/security/delegated-worker-policy.d.ts +3 -0
- package/dist/application/security/delegated-worker-policy.js +1 -0
- package/dist/application/security/desktop-tool-scope-policy.d.ts +4 -0
- package/dist/application/security/desktop-tool-scope-policy.js +1 -0
- package/dist/application/security/tool-action-risk-analyzer.d.ts +13 -0
- package/dist/application/security/tool-action-risk-analyzer.js +1 -0
- package/dist/application/security/tool-approval-service.d.ts +37 -0
- package/dist/application/security/tool-approval-service.js +1 -0
- package/dist/application/security/tool-risk-classifier.d.ts +18 -0
- package/dist/application/security/tool-risk-classifier.js +1 -0
- package/dist/application/security/workspace-permission-policy.d.ts +10 -0
- package/dist/application/security/workspace-permission-policy.js +1 -0
- package/dist/application/session/project-session-access.d.ts +8 -0
- package/dist/application/session/project-session-access.js +1 -0
- package/dist/application/session/session-compaction-service.d.ts +10 -0
- package/dist/application/session/session-compaction-service.js +1 -0
- package/dist/application/session/session-turn-lifecycle.d.ts +5 -0
- package/dist/application/session/session-turn-lifecycle.js +1 -0
- package/dist/application/workspace/session-execution-workspace.d.ts +59 -0
- package/dist/application/workspace/session-execution-workspace.js +3 -0
- package/dist/application/workspace/workspace-file-index.d.ts +15 -0
- package/dist/application/workspace/workspace-file-index.js +1 -0
- package/dist/application/workspace/workspace-file-reference-resolver.d.ts +20 -0
- package/dist/application/workspace/workspace-file-reference-resolver.js +17 -0
- package/dist/application/workspace/workspace-instruction-loader.d.ts +8 -0
- package/dist/application/workspace/workspace-instruction-loader.js +1 -0
- package/dist/bootstrap/composition-root.d.ts +6 -0
- package/dist/bootstrap/composition-root.js +1 -0
- package/dist/bootstrap/global-cli-options.d.ts +6 -0
- package/dist/bootstrap/global-cli-options.js +1 -0
- package/dist/bootstrap/native-devtools-stub.d.ts +10 -0
- package/dist/bootstrap/native-devtools-stub.js +1 -0
- package/dist/bootstrap/native-entry.d.ts +1 -0
- package/dist/bootstrap/native-entry.js +2 -0
- package/dist/bootstrap/native-tiktoken.d.ts +4 -0
- package/dist/bootstrap/native-tiktoken.js +1 -0
- package/dist/bootstrap/runtime-factory.d.ts +41 -0
- package/dist/bootstrap/runtime-factory.js +1 -0
- package/dist/bootstrap/shutdown-manager.d.ts +11 -0
- package/dist/bootstrap/shutdown-manager.js +1 -0
- package/dist/bootstrap/startup-sequence.d.ts +5 -0
- package/dist/bootstrap/startup-sequence.js +1 -0
- package/dist/domain/auth/auth-profile.d.ts +14 -0
- package/dist/domain/auth/auth-profile.js +1 -0
- package/dist/domain/config/config-schema.d.ts +24 -0
- package/dist/domain/config/config-schema.js +1 -0
- package/dist/domain/errors/cli-command-hint.d.ts +5 -0
- package/dist/domain/errors/cli-command-hint.js +0 -0
- package/dist/domain/errors/cli-error.d.ts +35 -0
- package/dist/domain/errors/cli-error.js +1 -0
- package/dist/domain/errors/error-codes.d.ts +51 -0
- package/dist/domain/errors/error-codes.js +1 -0
- package/dist/domain/extensions/extension-scope.d.ts +3 -0
- package/dist/domain/extensions/extension-scope.js +1 -0
- package/dist/domain/extensions/extension-state.d.ts +5 -0
- package/dist/domain/extensions/extension-state.js +1 -0
- package/dist/domain/extensions/hook-manifest.d.ts +13 -0
- package/dist/domain/extensions/hook-manifest.js +1 -0
- package/dist/domain/extensions/host-tool-plugin-ids.d.ts +9 -0
- package/dist/domain/extensions/host-tool-plugin-ids.js +1 -0
- package/dist/domain/extensions/mcp-config.d.ts +35 -0
- package/dist/domain/extensions/mcp-config.js +1 -0
- package/dist/domain/extensions/plugin-agent-manifest.d.ts +8 -0
- package/dist/domain/extensions/plugin-agent-manifest.js +1 -0
- package/dist/domain/extensions/plugin-manifest.d.ts +23 -0
- package/dist/domain/extensions/plugin-manifest.js +1 -0
- package/dist/domain/extensions/skill-manifest.d.ts +10 -0
- package/dist/domain/extensions/skill-manifest.js +3 -0
- package/dist/domain/extensions/yaml-subset.d.ts +9 -0
- package/dist/domain/extensions/yaml-subset.js +2 -0
- package/dist/domain/filesystem/file-change-diff.d.ts +21 -0
- package/dist/domain/filesystem/file-change-diff.js +3 -0
- package/dist/domain/intent/intent-contract.d.ts +41 -0
- package/dist/domain/intent/intent-contract.js +1 -0
- package/dist/domain/media/gateway-media-contract.d.ts +23 -0
- package/dist/domain/media/gateway-media-contract.js +1 -0
- package/dist/domain/media/media-contract.d.ts +28 -0
- package/dist/domain/media/media-contract.js +0 -0
- package/dist/domain/media/media-execution-policy.d.ts +9 -0
- package/dist/domain/media/media-execution-policy.js +1 -0
- package/dist/domain/memory/memory-kinds.d.ts +15 -0
- package/dist/domain/memory/memory-kinds.js +1 -0
- package/dist/domain/memory/memory-retrieval-policy.d.ts +3 -0
- package/dist/domain/memory/memory-retrieval-policy.js +1 -0
- package/dist/domain/memory/memory-search.d.ts +33 -0
- package/dist/domain/memory/memory-search.js +2 -0
- package/dist/domain/memory/memory.d.ts +48 -0
- package/dist/domain/memory/memory.js +1 -0
- package/dist/domain/orchestration/goal.d.ts +58 -0
- package/dist/domain/orchestration/goal.js +1 -0
- package/dist/domain/orchestration/subagent-identity.d.ts +2 -0
- package/dist/domain/orchestration/subagent-identity.js +1 -0
- package/dist/domain/orchestration/subagent.d.ts +33 -0
- package/dist/domain/orchestration/subagent.js +0 -0
- package/dist/domain/orchestration/work-plan.d.ts +77 -0
- package/dist/domain/orchestration/work-plan.js +1 -0
- package/dist/domain/project/project-identity.d.ts +6 -0
- package/dist/domain/project/project-identity.js +1 -0
- package/dist/domain/runtime/assistant-delta-normalizer.d.ts +11 -0
- package/dist/domain/runtime/assistant-delta-normalizer.js +1 -0
- package/dist/domain/runtime/resource-limits.d.ts +75 -0
- package/dist/domain/runtime/resource-limits.js +1 -0
- package/dist/domain/session/attachment.d.ts +13 -0
- package/dist/domain/session/attachment.js +0 -0
- package/dist/domain/session/session-schema.d.ts +6 -0
- package/dist/domain/session/session-schema.js +1 -0
- package/dist/domain/session/session.d.ts +27 -0
- package/dist/domain/session/session.js +0 -0
- package/dist/domain/settings/settings-document.d.ts +8 -0
- package/dist/domain/settings/settings-document.js +1 -0
- package/dist/domain/validation/record-schema.d.ts +4 -0
- package/dist/domain/validation/record-schema.js +1 -0
- package/dist/domain/workspace/workspace-settings.d.ts +12 -0
- package/dist/domain/workspace/workspace-settings.js +1 -0
- package/dist/infrastructure/agent-sdk/agent-instance-factory.d.ts +22 -0
- package/dist/infrastructure/agent-sdk/agent-instance-factory.js +1 -0
- package/dist/infrastructure/agent-sdk/model-tool-name-mapper.d.ts +13 -0
- package/dist/infrastructure/agent-sdk/model-tool-name-mapper.js +1 -0
- package/dist/infrastructure/agent-sdk/tool-calling-completion-client.d.ts +4 -0
- package/dist/infrastructure/agent-sdk/tool-calling-completion-client.js +1 -0
- package/dist/infrastructure/agent-sdk/tool-calling-model-client.d.ts +11 -0
- package/dist/infrastructure/agent-sdk/tool-calling-model-client.js +1 -0
- package/dist/infrastructure/cache/cache-policy.d.ts +7 -0
- package/dist/infrastructure/cache/cache-policy.js +1 -0
- package/dist/infrastructure/cache/file-cache-store.d.ts +17 -0
- package/dist/infrastructure/cache/file-cache-store.js +2 -0
- package/dist/infrastructure/clipboard/clipboard-adapter-factory.d.ts +11 -0
- package/dist/infrastructure/clipboard/clipboard-adapter-factory.js +1 -0
- package/dist/infrastructure/clipboard/clipboard-policy.d.ts +8 -0
- package/dist/infrastructure/clipboard/clipboard-policy.js +1 -0
- package/dist/infrastructure/clipboard/clipboard-text-adapter-factory.d.ts +10 -0
- package/dist/infrastructure/clipboard/clipboard-text-adapter-factory.js +1 -0
- package/dist/infrastructure/clipboard/image-normalizer.d.ts +12 -0
- package/dist/infrastructure/clipboard/image-normalizer.js +1 -0
- package/dist/infrastructure/clipboard/windows-clipboard-adapter.d.ts +7 -0
- package/dist/infrastructure/clipboard/windows-clipboard-adapter.js +1 -0
- package/dist/infrastructure/clipboard/windows-clipboard-text-adapter.d.ts +7 -0
- package/dist/infrastructure/clipboard/windows-clipboard-text-adapter.js +1 -0
- package/dist/infrastructure/config/config-loader.d.ts +19 -0
- package/dist/infrastructure/config/config-loader.js +2 -0
- package/dist/infrastructure/config/environment-values.d.ts +2 -0
- package/dist/infrastructure/config/environment-values.js +1 -0
- package/dist/infrastructure/credentials/composite-credential-store.d.ts +11 -0
- package/dist/infrastructure/credentials/composite-credential-store.js +1 -0
- package/dist/infrastructure/credentials/encrypted-file-credential-store.d.ts +17 -0
- package/dist/infrastructure/credentials/encrypted-file-credential-store.js +3 -0
- package/dist/infrastructure/credentials/environment-credential-store.d.ts +11 -0
- package/dist/infrastructure/credentials/environment-credential-store.js +1 -0
- package/dist/infrastructure/credentials/secret-input.d.ts +7 -0
- package/dist/infrastructure/credentials/secret-input.js +3 -0
- package/dist/infrastructure/extensions/composite-mcp-config-store.d.ts +9 -0
- package/dist/infrastructure/extensions/composite-mcp-config-store.js +1 -0
- package/dist/infrastructure/extensions/extension-directory-reader.d.ts +2 -0
- package/dist/infrastructure/extensions/extension-directory-reader.js +1 -0
- package/dist/infrastructure/extensions/extension-integrity.d.ts +7 -0
- package/dist/infrastructure/extensions/extension-integrity.js +1 -0
- package/dist/infrastructure/extensions/extension-source-resolver.d.ts +6 -0
- package/dist/infrastructure/extensions/extension-source-resolver.js +1 -0
- package/dist/infrastructure/extensions/file-mcp-config-store.d.ts +15 -0
- package/dist/infrastructure/extensions/file-mcp-config-store.js +2 -0
- package/dist/infrastructure/extensions/hook-runtime.d.ts +18 -0
- package/dist/infrastructure/extensions/hook-runtime.js +1 -0
- package/dist/infrastructure/extensions/mcp-runtime.d.ts +51 -0
- package/dist/infrastructure/extensions/mcp-runtime.js +1 -0
- package/dist/infrastructure/extensions/plugin-agent-discovery.d.ts +4 -0
- package/dist/infrastructure/extensions/plugin-agent-discovery.js +1 -0
- package/dist/infrastructure/extensions/plugin-discovery.d.ts +5 -0
- package/dist/infrastructure/extensions/plugin-discovery.js +1 -0
- package/dist/infrastructure/extensions/plugin-manager.d.ts +23 -0
- package/dist/infrastructure/extensions/plugin-manager.js +2 -0
- package/dist/infrastructure/extensions/skill-discovery.d.ts +4 -0
- package/dist/infrastructure/extensions/skill-discovery.js +1 -0
- package/dist/infrastructure/extensions/skill-installer.d.ts +9 -0
- package/dist/infrastructure/extensions/skill-installer.js +1 -0
- package/dist/infrastructure/extensions/skill-manager.d.ts +22 -0
- package/dist/infrastructure/extensions/skill-manager.js +2 -0
- package/dist/infrastructure/extensions/skill-roots.d.ts +19 -0
- package/dist/infrastructure/extensions/skill-roots.js +1 -0
- package/dist/infrastructure/extensions/skill-tool-executor.d.ts +18 -0
- package/dist/infrastructure/extensions/skill-tool-executor.js +2 -0
- package/dist/infrastructure/filesystem/atomic-file-store.d.ts +17 -0
- package/dist/infrastructure/filesystem/atomic-file-store.js +1 -0
- package/dist/infrastructure/filesystem/bounded-file-reader.d.ts +6 -0
- package/dist/infrastructure/filesystem/bounded-file-reader.js +1 -0
- package/dist/infrastructure/filesystem/bounded-json-reader.d.ts +1 -0
- package/dist/infrastructure/filesystem/bounded-json-reader.js +1 -0
- package/dist/infrastructure/filesystem/fs-errors.d.ts +2 -0
- package/dist/infrastructure/filesystem/fs-errors.js +1 -0
- package/dist/infrastructure/filesystem/gateway-media-input-reader.d.ts +12 -0
- package/dist/infrastructure/filesystem/gateway-media-input-reader.js +1 -0
- package/dist/infrastructure/filesystem/local-filesystem-tool-executor.d.ts +22 -0
- package/dist/infrastructure/filesystem/local-filesystem-tool-executor.js +3 -0
- package/dist/infrastructure/filesystem/path-resolver.d.ts +20 -0
- package/dist/infrastructure/filesystem/path-resolver.js +1 -0
- package/dist/infrastructure/filesystem/workspace-media-artifact-store.d.ts +13 -0
- package/dist/infrastructure/filesystem/workspace-media-artifact-store.js +1 -0
- package/dist/infrastructure/logging/daily-rotating-file-writer.d.ts +26 -0
- package/dist/infrastructure/logging/daily-rotating-file-writer.js +2 -0
- package/dist/infrastructure/logging/log-redactor.d.ts +2 -0
- package/dist/infrastructure/logging/log-redactor.js +1 -0
- package/dist/infrastructure/logging/logging-policy.d.ts +6 -0
- package/dist/infrastructure/logging/logging-policy.js +1 -0
- package/dist/infrastructure/logging/structured-logger.d.ts +24 -0
- package/dist/infrastructure/logging/structured-logger.js +4 -0
- package/dist/infrastructure/memory/file-memory-store.d.ts +37 -0
- package/dist/infrastructure/memory/file-memory-store.js +11 -0
- package/dist/infrastructure/network/safe-media-downloader.d.ts +23 -0
- package/dist/infrastructure/network/safe-media-downloader.js +1 -0
- package/dist/infrastructure/platform/host-platform.d.ts +14 -0
- package/dist/infrastructure/platform/host-platform.js +1 -0
- package/dist/infrastructure/platform/host-process.d.ts +29 -0
- package/dist/infrastructure/platform/host-process.js +1 -0
- package/dist/infrastructure/platform/platform-paths.d.ts +25 -0
- package/dist/infrastructure/platform/platform-paths.js +1 -0
- package/dist/infrastructure/platform/process-termination.d.ts +4 -0
- package/dist/infrastructure/platform/process-termination.js +1 -0
- package/dist/infrastructure/platform/read-only-executable.d.ts +3 -0
- package/dist/infrastructure/platform/read-only-executable.js +1 -0
- package/dist/infrastructure/project/file-project-trust-store.d.ts +12 -0
- package/dist/infrastructure/project/file-project-trust-store.js +2 -0
- package/dist/infrastructure/sdk/chat-completion-adapter.d.ts +8 -0
- package/dist/infrastructure/sdk/chat-completion-adapter.js +1 -0
- package/dist/infrastructure/sdk/lotagate-client-factory.d.ts +3 -0
- package/dist/infrastructure/sdk/lotagate-client-factory.js +1 -0
- package/dist/infrastructure/sdk/model-catalog-adapter.d.ts +19 -0
- package/dist/infrastructure/sdk/model-catalog-adapter.js +1 -0
- package/dist/infrastructure/sdk/sdk-media-gateway-client.d.ts +20 -0
- package/dist/infrastructure/sdk/sdk-media-gateway-client.js +1 -0
- package/dist/infrastructure/sessions/file-goal-store.d.ts +21 -0
- package/dist/infrastructure/sessions/file-goal-store.js +1 -0
- package/dist/infrastructure/sessions/file-session-store.d.ts +47 -0
- package/dist/infrastructure/sessions/file-session-store.js +4 -0
- package/dist/infrastructure/sessions/project-session-paths.d.ts +17 -0
- package/dist/infrastructure/sessions/project-session-paths.js +1 -0
- package/dist/infrastructure/sessions/session-index.d.ts +16 -0
- package/dist/infrastructure/sessions/session-index.js +3 -0
- package/dist/infrastructure/sessions/session-journal.d.ts +22 -0
- package/dist/infrastructure/sessions/session-journal.js +6 -0
- package/dist/infrastructure/sessions/subagent-journal-store.d.ts +28 -0
- package/dist/infrastructure/sessions/subagent-journal-store.js +2 -0
- package/dist/infrastructure/shell/shell-tool-executor.d.ts +17 -0
- package/dist/infrastructure/shell/shell-tool-executor.js +2 -0
- package/dist/infrastructure/tokens/tiktoken-token-estimator.d.ts +18 -0
- package/dist/infrastructure/tokens/tiktoken-token-estimator.js +1 -0
- package/dist/infrastructure/workspace/workspace-settings-store.d.ts +9 -0
- package/dist/infrastructure/workspace/workspace-settings-store.js +4 -0
- package/dist/main.d.ts +7 -0
- package/dist/main.js +3 -0
- package/dist/ports/cache-store.d.ts +10 -0
- package/dist/ports/cache-store.js +0 -0
- package/dist/ports/chat-model.d.ts +30 -0
- package/dist/ports/chat-model.js +0 -0
- package/dist/ports/clipboard-adapter.d.ts +7 -0
- package/dist/ports/clipboard-adapter.js +0 -0
- package/dist/ports/clipboard-text-adapter.d.ts +3 -0
- package/dist/ports/clipboard-text-adapter.js +0 -0
- package/dist/ports/credential-store.d.ts +7 -0
- package/dist/ports/credential-store.js +0 -0
- package/dist/ports/goal-store.d.ts +12 -0
- package/dist/ports/goal-store.js +0 -0
- package/dist/ports/logger.d.ts +8 -0
- package/dist/ports/logger.js +0 -0
- package/dist/ports/media-gateway-client.d.ts +54 -0
- package/dist/ports/media-gateway-client.js +0 -0
- package/dist/ports/memory-store.d.ts +26 -0
- package/dist/ports/memory-store.js +0 -0
- package/dist/ports/model-completion-client.d.ts +8 -0
- package/dist/ports/model-completion-client.js +0 -0
- package/dist/ports/model-diagnostics.d.ts +17 -0
- package/dist/ports/model-diagnostics.js +0 -0
- package/dist/ports/project-trust-store.d.ts +12 -0
- package/dist/ports/project-trust-store.js +0 -0
- package/dist/ports/session-store.d.ts +58 -0
- package/dist/ports/session-store.js +0 -0
- package/dist/ports/subagent-lifecycle.d.ts +31 -0
- package/dist/ports/subagent-lifecycle.js +0 -0
- package/dist/ports/tool-activity.d.ts +13 -0
- package/dist/ports/tool-activity.js +0 -0
- package/dist/presentation/themes/theme.d.ts +19 -0
- package/dist/presentation/themes/theme.js +1 -0
- package/dist/presentation/tui/agent-initialization-renderer.d.ts +4 -0
- package/dist/presentation/tui/agent-initialization-renderer.js +1 -0
- package/dist/presentation/tui/context-display.d.ts +21 -0
- package/dist/presentation/tui/context-display.js +2 -0
- package/dist/presentation/tui/formatters.d.ts +6 -0
- package/dist/presentation/tui/formatters.js +1 -0
- package/dist/presentation/tui/ink/choice-window.d.ts +5 -0
- package/dist/presentation/tui/ink/choice-window.js +1 -0
- package/dist/presentation/tui/ink/components/activity-animation.d.ts +3 -0
- package/dist/presentation/tui/ink/components/activity-animation.js +1 -0
- package/dist/presentation/tui/ink/components/activity-entry.d.ts +6 -0
- package/dist/presentation/tui/ink/components/activity-entry.js +1 -0
- package/dist/presentation/tui/ink/components/activity-status.d.ts +10 -0
- package/dist/presentation/tui/ink/components/activity-status.js +1 -0
- package/dist/presentation/tui/ink/components/choice-modal.d.ts +11 -0
- package/dist/presentation/tui/ink/components/choice-modal.js +1 -0
- package/dist/presentation/tui/ink/components/composer.d.ts +40 -0
- package/dist/presentation/tui/ink/components/composer.js +8 -0
- package/dist/presentation/tui/ink/components/file-diff.d.ts +6 -0
- package/dist/presentation/tui/ink/components/file-diff.js +1 -0
- package/dist/presentation/tui/ink/components/modal.d.ts +8 -0
- package/dist/presentation/tui/ink/components/modal.js +2 -0
- package/dist/presentation/tui/ink/components/shimmer-text.d.ts +8 -0
- package/dist/presentation/tui/ink/components/shimmer-text.js +1 -0
- package/dist/presentation/tui/ink/components/subagent-activity.d.ts +11 -0
- package/dist/presentation/tui/ink/components/subagent-activity.js +1 -0
- package/dist/presentation/tui/ink/components/transcript.d.ts +39 -0
- package/dist/presentation/tui/ink/components/transcript.js +5 -0
- package/dist/presentation/tui/ink/components/welcome-panel.d.ts +6 -0
- package/dist/presentation/tui/ink/components/welcome-panel.js +1 -0
- package/dist/presentation/tui/ink/lotagate-tui.d.ts +6 -0
- package/dist/presentation/tui/ink/lotagate-tui.js +2 -0
- package/dist/presentation/tui/ink/markdown-inline-renderer.d.ts +4 -0
- package/dist/presentation/tui/ink/markdown-inline-renderer.js +1 -0
- package/dist/presentation/tui/ink/markdown-inline.d.ts +13 -0
- package/dist/presentation/tui/ink/markdown-inline.js +1 -0
- package/dist/presentation/tui/ink/markdown-message.d.ts +6 -0
- package/dist/presentation/tui/ink/markdown-message.js +2 -0
- package/dist/presentation/tui/ink/markdown-table.d.ts +16 -0
- package/dist/presentation/tui/ink/markdown-table.js +1 -0
- package/dist/presentation/tui/ink/tui-bridge.d.ts +193 -0
- package/dist/presentation/tui/ink/tui-bridge.js +1 -0
- package/dist/presentation/tui/terminal-capabilities.d.ts +15 -0
- package/dist/presentation/tui/terminal-capabilities.js +1 -0
- package/dist/presentation/tui/terminal-mouse.d.ts +5 -0
- package/dist/presentation/tui/terminal-mouse.js +1 -0
- package/dist/presentation/tui/terminal-screen.d.ts +10 -0
- package/dist/presentation/tui/terminal-screen.js +1 -0
- package/dist/presentation/tui/tui-agent-event-runner.d.ts +29 -0
- package/dist/presentation/tui/tui-agent-event-runner.js +1 -0
- package/dist/presentation/tui/tui-application-contract.d.ts +10 -0
- package/dist/presentation/tui/tui-application-contract.js +1 -0
- package/dist/presentation/tui/tui-application.d.ts +64 -0
- package/dist/presentation/tui/tui-application.js +3 -0
- package/dist/presentation/tui/tui-clipboard-paste-handlers.d.ts +11 -0
- package/dist/presentation/tui/tui-clipboard-paste-handlers.js +1 -0
- package/dist/presentation/tui/tui-command-context.d.ts +3 -0
- package/dist/presentation/tui/tui-command-context.js +0 -0
- package/dist/presentation/tui/tui-command-executor.d.ts +38 -0
- package/dist/presentation/tui/tui-command-executor.js +4 -0
- package/dist/presentation/tui/tui-command-host-factory.d.ts +40 -0
- package/dist/presentation/tui/tui-command-host-factory.js +1 -0
- package/dist/presentation/tui/tui-context-compaction.d.ts +5 -0
- package/dist/presentation/tui/tui-context-compaction.js +1 -0
- package/dist/presentation/tui/tui-context-service.d.ts +34 -0
- package/dist/presentation/tui/tui-context-service.js +2 -0
- package/dist/presentation/tui/tui-extension-loader.d.ts +21 -0
- package/dist/presentation/tui/tui-extension-loader.js +1 -0
- package/dist/presentation/tui/tui-file-suggestions.d.ts +3 -0
- package/dist/presentation/tui/tui-file-suggestions.js +1 -0
- package/dist/presentation/tui/tui-goal-controller.d.ts +14 -0
- package/dist/presentation/tui/tui-goal-controller.js +1 -0
- package/dist/presentation/tui/tui-initial-model.d.ts +3 -0
- package/dist/presentation/tui/tui-initial-model.js +1 -0
- package/dist/presentation/tui/tui-lifecycle-actions.d.ts +13 -0
- package/dist/presentation/tui/tui-lifecycle-actions.js +1 -0
- package/dist/presentation/tui/tui-manual-compaction.d.ts +18 -0
- package/dist/presentation/tui/tui-manual-compaction.js +1 -0
- package/dist/presentation/tui/tui-media-model-selection.d.ts +12 -0
- package/dist/presentation/tui/tui-media-model-selection.js +1 -0
- package/dist/presentation/tui/tui-prompt-dispatcher.d.ts +16 -0
- package/dist/presentation/tui/tui-prompt-dispatcher.js +1 -0
- package/dist/presentation/tui/tui-skill-controller.d.ts +11 -0
- package/dist/presentation/tui/tui-skill-controller.js +3 -0
- package/dist/presentation/tui/tui-tool-approval.d.ts +22 -0
- package/dist/presentation/tui/tui-tool-approval.js +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +1 -0
- package/package.json +12 -10
- package/skills/architecture-review/SKILL.md +41 -14
- package/skills/code-review/SKILL.md +41 -12
- package/skills/debugging/SKILL.md +49 -12
- package/skills/documentation/SKILL.md +43 -9
- package/skills/feature-implementation/SKILL.md +58 -19
- package/skills/api-contract-review/SKILL.md +0 -17
- package/skills/database-review/SKILL.md +0 -17
- package/skills/dependency-review/SKILL.md +0 -16
- package/skills/frontend-review/SKILL.md +0 -18
- package/skills/incident-response/SKILL.md +0 -18
- package/skills/performance-review/SKILL.md +0 -17
- package/skills/refactor/SKILL.md +0 -23
- package/skills/release-readiness/SKILL.md +0 -16
- package/skills/security-review/SKILL.md +0 -16
- package/skills/test-plan/SKILL.md +0 -22
- package/skills/verify/SKILL.md +0 -13
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import C from"node:path";import{resolveModelContextWindow as M}from"../../application/model/model-context-window.js";import{buildToolCatalogFromDefinitions as W}from"../../application/agent/tool-catalog.js";import{filesystemToolDefinitions as k}from"../../infrastructure/filesystem/local-filesystem-tool-executor.js";import{shellToolDefinitions as b}from"../../infrastructure/shell/shell-tool-executor.js";import{skillToolDefinitions as S}from"../../infrastructure/extensions/skill-tool-executor.js";import{subagentToolDefinitions as j}from"../../application/orchestration/subagent-tool-executor.js";import{FileMcpConfigStore as w}from"../../infrastructure/extensions/file-mcp-config-store.js";import{mergeMcpConfigsWithOverride as D}from"../../domain/extensions/mcp-config.js";import{SkillManager as A}from"../../infrastructure/extensions/skill-manager.js";import{estimateTextTokens as x}from"../../infrastructure/tokens/tiktoken-token-estimator.js";import{retainLatestCompaction as P}from"../../application/agent/agent-session-store.js";import{buildAgentHistory as F}from"../../application/agent/agent-history.js";import{createAgentGuidance as I}from"../../application/agent/interactive-agent-guidance.js";class X{runtime;cwd;contextWindow;contextWindowModel;constructor(t,o){this.runtime=t,this.cwd=o}async buildForProject(t){const o=await this.runtime.projectTrust.inspect(this.cwd),n=await this.runtime.projectTrust.isTrusted(o),l=n&&t.skillRootScopes!==void 0?await new A(C.join(this.runtime.paths.globalConfigDir,"skills-state.json")).listScoped(t.skillRootScopes):[];return this.build({...t,trusted:n,skills:l})}async build(t){const o=await this.resolveContextWindow(t.model,t.profileName),[n,l]=await Promise.all([t.sessionId===void 0?Promise.resolve({transcript:[],events:[]}):this.runtime.sessionStore.readHistory(t.sessionId),Promise.all([w.forScope(this.cwd,this.runtime.paths.globalConfigDir,"user").list(),w.forScope(this.cwd,this.runtime.paths.globalConfigDir,"project").list()]).then(([e,v])=>D(e,v,t.pluginMcpConfig??{}))]),i=P(F(n.transcript,n.events)),y=(t.trusted?W([...k(),...b(),...S(),...j()]):void 0)?.names??[],r=t.model??"o200k_base",c=t.sessionId===void 0?void 0:await t.agentSessionStore?.get(t.sessionId),a=c?.messages?.[0]?.role==="system"?c.messages.slice(1):c?.messages,d=a===void 0||a.length===0?i:a.map($),f=m(d.filter(e=>e.type==="user"),r),u=m(d.filter(e=>e.type==="assistant"),r),p=m(d.filter(e=>e.type!=="user"&&e.type!=="assistant"),r),h=f+u+p,T=I(t.trusted?"interactive-trusted":"interactive-untrusted"),g=x({model:r,text:T});return{model:t.model,...o===void 0?{}:{contextWindow:o},usedTokens:h+g,systemPromptTokens:g,conversationTokens:h,inputTokens:f,outputTokens:u,otherTokens:p,transcriptEntries:i.length,userMessages:i.filter(e=>e.type==="user").length,assistantMessages:i.filter(e=>e.type==="assistant").length,toolCalls:n.events.filter(e=>e.type==="tool.called").length,compactions:n.events.filter(e=>e.type==="context.compacted").length,pendingAttachments:t.pendingAttachments,toolNames:y,mcpServers:Object.values(l).filter(e=>e.enabled).length,memoryFiles:0}}async getModelContextWindow(t,o){return this.resolveContextWindow(t,o)}async resolveContextWindow(t,o){if(t===null||t.trim().length===0){this.contextWindow=void 0,this.contextWindowModel=void 0;return}const n=`${o??""}\0${t}`;return this.contextWindowModel===n?this.contextWindow:(this.contextWindowModel=n,this.contextWindow=void 0,this.contextWindow=await M(this.runtime,t,o),this.contextWindow)}}function $(s){return{type:s.role,content:E(s.content)}}function E(s){return typeof s=="string"?s:Array.isArray(s)?s.map(t=>typeof t=="object"&&t!==null&&"text"in t&&typeof t.text=="string"?t.text:"").join(""):""}function m(s,t){return x({model:t,text:s.map(o=>`${o.type}: ${o.content}`).join(`
|
|
2
|
+
`)})}export{X as TuiContextService};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CliRuntime } from '../../bootstrap/runtime-factory.js';
|
|
2
|
+
import type { CliMcpConfig } from '../../domain/extensions/mcp-config.js';
|
|
3
|
+
import type { HookDefinition } from '../../domain/extensions/hook-manifest.js';
|
|
4
|
+
import { HookRuntime } from '../../infrastructure/extensions/hook-runtime.js';
|
|
5
|
+
import { type SkillRootScope } from '../../infrastructure/extensions/skill-roots.js';
|
|
6
|
+
import type { TuiToolApprovalCoordinator } from './tui-tool-approval.js';
|
|
7
|
+
export interface TuiExtensionState {
|
|
8
|
+
readonly hookRuntime: HookRuntime;
|
|
9
|
+
readonly hooks: readonly HookDefinition[];
|
|
10
|
+
readonly skillRootScopes: readonly SkillRootScope[];
|
|
11
|
+
readonly enabledPluginNames: readonly string[];
|
|
12
|
+
readonly pluginMcpConfig: CliMcpConfig;
|
|
13
|
+
}
|
|
14
|
+
export declare function loadTuiExtensions(options: {
|
|
15
|
+
readonly runtime: CliRuntime;
|
|
16
|
+
readonly cwd: string;
|
|
17
|
+
readonly trusted: boolean;
|
|
18
|
+
readonly approvalMode: 'ask' | 'auto' | 'deny';
|
|
19
|
+
readonly workspaceRoot: string;
|
|
20
|
+
readonly approvals: TuiToolApprovalCoordinator;
|
|
21
|
+
}): Promise<TuiExtensionState>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{PluginContributionRegistry as g}from"../../application/extensions/plugin-contribution-registry.js";import{HookRuntime as f}from"../../infrastructure/extensions/hook-runtime.js";import{resolveSkillRootScopes as p}from"../../infrastructure/extensions/skill-roots.js";import{ShellToolExecutor as d}from"../../infrastructure/shell/shell-tool-executor.js";import{ToolPolicy as k}from"@lotagate/agent-sdk";async function R(c){const{runtime:o,cwd:e,trusted:l,approvalMode:u,workspaceRoot:s,approvals:m}=c,t=new f(new d({platform:o.platform}),{trustedProject:l,enabled:!0,toolPolicy:new k(m.create(u,l,s).policy())});let n=p(e,o.paths.globalConfigDir);if(!l)return{hookRuntime:t,hooks:[],skillRootScopes:n,enabledPluginNames:[],pluginMcpConfig:{}};const i=await new g(o.paths.globalConfigDir).resolve(e,!0);n=p(e,o.paths.globalConfigDir,i.skillRoots);const a=[...await t.loadProject(s)];for(const r of i.plugins)a.push(...await t.load(r));return{hookRuntime:t,hooks:a,skillRootScopes:n,enabledPluginNames:i.plugins.map(r=>r.name),pluginMcpConfig:i.mcpConfig}}export{R as loadTuiExtensions};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function o(i){return i.map(e=>({value:`@${e.path}`,label:`@${e.path}`,description:e.kind==="directory"?"Workspace folder":"Workspace file",kind:e.kind}))}export{o as workspaceFileSuggestions};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CliRuntime } from '../../bootstrap/runtime-factory.js';
|
|
2
|
+
import type { CreateGoalInput } from '../../domain/orchestration/goal.js';
|
|
3
|
+
import { type GoalTurnCallbacks } from '../../application/orchestration/goal-runner.js';
|
|
4
|
+
export interface TuiGoalControllerOptions {
|
|
5
|
+
runtime: CliRuntime;
|
|
6
|
+
cwd: string;
|
|
7
|
+
sessionId: string | undefined;
|
|
8
|
+
model: string | null;
|
|
9
|
+
profile: string | null;
|
|
10
|
+
runPrompt: (prompt: string, callbacks?: GoalTurnCallbacks) => Promise<string>;
|
|
11
|
+
write: (message: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function runTuiGoal(options: TuiGoalControllerOptions, objective: string, limits?: Omit<CreateGoalInput, 'objective'>): Promise<void>;
|
|
14
|
+
export declare function resumeTuiGoal(options: TuiGoalControllerOptions): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AuthenticationService as g}from"../../application/auth/authentication-service.js";import{loadExecutionConfig as I}from"../../application/config/execution-config.js";import{createLotaGateClient as N}from"../../infrastructure/sdk/lotagate-client-factory.js";import{RESOURCE_LIMITS as u}from"../../domain/runtime/resource-limits.js";import{runGoalLoop as S}from"../../application/orchestration/goal-runner.js";import{formatCommandHint as o,MODEL_SELECT_HINT as v,TRUST_GRANT_HINT as x}from"../../application/commands/command-hints.js";async function D(e,r,t={}){await c(e,r,!0,t)}async function _(e){if(e.sessionId===void 0){e.write("No active session.");return}const r=await e.runtime.goalStore.get(e.sessionId);if(r===void 0){e.write("No active goal.");return}await c(e,r.objective,!1)}async function c(e,r,t,l={}){if(e.sessionId===void 0){e.write("No active session.");return}const m=await e.runtime.projectTrust.inspect(e.cwd);if(!await e.runtime.projectTrust.isTrusted(m)){e.write(`Project is not trusted. ${o(x,"tui")}`);return}const i=await I(e.runtime,e.cwd),a=e.model??i.config.model;if(a===null){e.write(`No model is selected. ${o(v,"tui")}`);return}const s=e.profile??i.config.profile??g.defaultProfileName(),n=await e.runtime.auth.requireCredential(s),f=t?await e.runtime.goalStore.replace(e.sessionId,{objective:r,maxTurns:u.goalDefaultMaxTurns,maxDurationMs:u.goalDefaultMaxDurationMs,...l}):await G(e.sessionId,e.runtime),d=N(n.profile,n.apiKey);await S({runtime:e.runtime,sessionId:e.sessionId,objective:f.objective,model:a,client:d,runTurn:(w,T)=>e.runPrompt(w,T),onMessage:e.write})}async function G(e,r){return r.goalStore.resume(e)}export{_ as resumeTuiGoal,D as runTuiGoal};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AuthenticationService as i}from"../../application/auth/authentication-service.js";import{CachedModelCatalog as n,modelCatalogCacheKey as c}from"../../application/model/cached-model-catalog.js";import{ModelCatalogAdapter as d}from"../../infrastructure/sdk/model-catalog-adapter.js";import{createLotaGateClient as s}from"../../infrastructure/sdk/lotagate-client-factory.js";import{selectInitialModel as m}from"../../application/model/initial-model-selection.js";async function w(l,t){if(t.model!==null&&t.model.trim().length>0)return t.model;const r=t.profile??i.defaultProfileName();let o;try{o=await l.credentialStore.get(r)}catch(e){return l.logger.warn("Unable to load credentials while selecting the initial model.",{reason:e instanceof Error?e.message:String(e)}),null}if(o===void 0)return null;try{const e=new n(new d(s(o.profile,o.apiKey)),l.cache,c(o.profile.name,o.profile.baseUrl),l.cachePolicy.modelCatalogTtlMs);return await m(t.model,{list:()=>e.listModels()},a=>l.configLoader.setGlobal("model",a))}catch(e){return l.logger.warn("Unable to select the first model from the catalog.",{reason:e instanceof Error?e.message:String(e)}),null}}export{w as resolveInitialModel};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HookDefinition, HookEvent } from '../../domain/extensions/hook-manifest.js';
|
|
2
|
+
import type { HookRuntime } from '../../infrastructure/extensions/hook-runtime.js';
|
|
3
|
+
import type { InkTuiBridge } from './ink/tui-bridge.js';
|
|
4
|
+
export interface TuiInterruptState {
|
|
5
|
+
lastInterruptAt: number;
|
|
6
|
+
exitArmedUntil: number;
|
|
7
|
+
printResumeCommandOnExit: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function handleTuiInterrupt(state: TuiInterruptState, activeAbortController: AbortController | undefined, renderer: InkTuiBridge): TuiInterruptState;
|
|
10
|
+
export declare function cancelTuiResponse(activeAbortController: AbortController | undefined, renderer: InkTuiBridge): void;
|
|
11
|
+
export declare function runTuiHookEvent(hookRuntime: HookRuntime | undefined, hooks: readonly HookDefinition[], event: HookEvent, cwd: string, sessionId: string): Promise<void>;
|
|
12
|
+
export declare function isAbortError(error: unknown): boolean;
|
|
13
|
+
export declare function throwIfAborted(signal: AbortSignal): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function u(t,e,r){const n=Date.now();return n-t.lastInterruptAt<75?t:e!==void 0&&!e.signal.aborted?(e.abort(),r.cancelled(),r.notice("Interrupted. Press Ctrl+C again within 2 seconds to exit."),{...t,lastInterruptAt:n,exitArmedUntil:n+2e3}):n<=t.exitArmedUntil?(r.requestExit(),{...t,lastInterruptAt:n,printResumeCommandOnExit:!0}):(r.notice("Press Ctrl+C again within 2 seconds to exit."),{...t,lastInterruptAt:n,exitArmedUntil:n+2e3})}function a(t,e){t!==void 0&&(t.abort(),e.cancelled(),e.notice("Stopping response\u2026"))}async function s(t,e,r,n,o){t===void 0||e.length===0||await t.runEvent(e,r,{sessionId:o,runId:`hook-${Date.now()}`,iteration:0,cwd:n,workspaceRoot:n,maxResultBytes:256*1024})}function i(t){return t instanceof Error?t.name==="AbortError"||t.message.toLowerCase().includes("aborted")?!0:t.cause!==void 0&&i(t.cause):!1}function f(t){if(!t.aborted)return;if(t.reason instanceof Error&&t.reason.name==="AbortError")throw t.reason;const e=new Error(t.reason instanceof Error&&t.reason.message.length>0?t.reason.message:"The operation was aborted.");throw e.name="AbortError",e}export{a as cancelTuiResponse,u as handleTuiInterrupt,i as isAbortError,s as runTuiHookEvent,f as throwIfAborted};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CliRuntime } from '../../bootstrap/runtime-factory.js';
|
|
2
|
+
import type { SessionMetadata } from '../../domain/session/session.js';
|
|
3
|
+
import type { CliAgentSessionStore } from '../../application/agent/agent-session-store.js';
|
|
4
|
+
import type { TuiContextService } from './tui-context-service.js';
|
|
5
|
+
import type { InkTuiBridge } from './ink/tui-bridge.js';
|
|
6
|
+
export interface TuiManualCompactionOptions {
|
|
7
|
+
runtime: CliRuntime;
|
|
8
|
+
cwd: string;
|
|
9
|
+
session: SessionMetadata | undefined;
|
|
10
|
+
activeModel: string | null;
|
|
11
|
+
activeProfile: string | null;
|
|
12
|
+
activeResponse: boolean;
|
|
13
|
+
renderer: InkTuiBridge;
|
|
14
|
+
contextService: TuiContextService;
|
|
15
|
+
agentSessionStore: CliAgentSessionStore;
|
|
16
|
+
refreshContextUsage: () => Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export declare function compactManualTuiSession(options: TuiManualCompactionOptions): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AuthenticationService as m}from"../../application/auth/authentication-service.js";import{loadExecutionConfig as l}from"../../application/config/execution-config.js";import{createLotaGateClient as s}from"../../infrastructure/sdk/lotagate-client-factory.js";import{CliError as d}from"../../domain/errors/cli-error.js";import{CLI_ERROR_CODES as f}from"../../domain/errors/error-codes.js";import{MODEL_SELECT_HINT as u}from"../../application/commands/command-hints.js";import{compactTuiSession as g}from"./tui-context-compaction.js";async function N(e){if(e.activeResponse)throw new Error("Stop the active response before compacting the session.");if(e.session===void 0){e.renderer.notice("No active session.");return}const i=await l(e.runtime,e.cwd),t=e.session.model??e.activeModel??i.config.model;if(t===null)throw new d(f.MODEL_NOT_FOUND,"No model is selected.",{category:"model",userMessage:"No model is selected.",hint:u});const a=e.session.profile??e.activeProfile??i.config.profile??m.defaultProfileName(),o=await e.runtime.auth.requireCredential(a),n=await e.contextService.getModelContextWindow(t,a);e.renderer.activity("Compacting context manually\u2026",0);try{const c=await g(e.runtime,e.agentSessionStore,e.session.id,s(o.profile,o.apiKey),t,n,r=>e.runtime.logger.warn("Context summarization failed; using fallback summary.",{reason:r instanceof Error?r.message:String(r)}));e.renderer.transcriptNotice(c?"Context compacted manually.":"No conversation to compact."),await e.refreshContextUsage()}finally{e.renderer.clearActivity()}}export{N as compactManualTuiSession};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CommandInvocation } from '../../application/commands/command-contract.js';
|
|
2
|
+
import type { TuiChoice } from './ink/tui-bridge.js';
|
|
3
|
+
import type { loadModelCatalog } from '../../application/model/model-catalog-service.js';
|
|
4
|
+
export type MediaModelCategory = 'image' | 'speech' | 'transcription' | 'translation' | 'video';
|
|
5
|
+
type ModelCatalog = Awaited<ReturnType<typeof loadModelCatalog>>;
|
|
6
|
+
export interface TuiMediaModelSelectionDependencies {
|
|
7
|
+
readonly loadModels: () => Promise<ModelCatalog>;
|
|
8
|
+
readonly selectModel: (title: string, choices: readonly TuiChoice[]) => Promise<string | undefined>;
|
|
9
|
+
}
|
|
10
|
+
/** Adds a request-only media model selection without changing persisted configuration. */
|
|
11
|
+
export declare function prepareTuiMediaInvocation(invocation: CommandInvocation, dependencies: TuiMediaModelSelectionDependencies): Promise<CommandInvocation | undefined>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{CliError as s}from"../../domain/errors/cli-error.js";import{CLI_ERROR_CODES as n}from"../../domain/errors/error-codes.js";const c={"image.generate":"image","image.edit":"image","audio.speech":"speech","audio.transcribe":"transcription","audio.translate":"translation","video.generate":"video"};async function u(o,i){const e=c[o.action.id];if(e===void 0||o.options.has("model"))return o;const t=(await i.loadModels()).data.filter(a=>a.model_category===e);if(t.length===0)throw new s(n.MODEL_NOT_FOUND,`No ${e} models are available.`,{category:"model",userMessage:`No ${e} models are available for this command.`,details:{category:e}});const d=await i.selectModel(`Select ${e} model`,t.map(a=>({value:a.id,label:a.id})));if(d===void 0)return;const l=t.find(a=>a.id===d);if(l===void 0)throw new s(n.MODEL_NOT_FOUND,"The selected media model is no longer available.",{category:"model",userMessage:"The selected media model is no longer available. Refresh the model list and try again."});const r=new Map(o.options);return r.set("model",l.id),{...o,options:r}}export{u as prepareTuiMediaInvocation};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Logger } from '../../ports/logger.js';
|
|
2
|
+
import type { AttachmentPayload } from '../../domain/session/attachment.js';
|
|
3
|
+
import type { PendingAttachmentStore } from '../../application/chat/pending-attachment-store.js';
|
|
4
|
+
import type { InkTuiBridge } from './ink/tui-bridge.js';
|
|
5
|
+
import type { TuiCommandContext } from './tui-command-context.js';
|
|
6
|
+
import type { TuiCommandHost } from './tui-command-executor.js';
|
|
7
|
+
export interface TuiPromptDispatcherOptions {
|
|
8
|
+
renderer: InkTuiBridge;
|
|
9
|
+
logger: Logger;
|
|
10
|
+
commandHost: TuiCommandHost;
|
|
11
|
+
pendingAttachments: PendingAttachmentStore;
|
|
12
|
+
commandContext: () => TuiCommandContext;
|
|
13
|
+
sendPrompt: (input: string, attachments: readonly AttachmentPayload[]) => Promise<unknown>;
|
|
14
|
+
resetActiveAbortController: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function dispatchTuiPrompt(input: string, options: TuiPromptDispatcherOptions): Promise<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{asCliError as o}from"../../domain/errors/cli-error.js";import{parseCommandInvocation as c,tokenizeCommandInput as n}from"../../application/commands/command-parser.js";import{COMMAND_REGISTRY as d}from"../../application/commands/command-runtime.js";import{formatCliErrorMessage as m}from"../../application/commands/command-hints.js";import{executeTuiCommand as i}from"./tui-command-executor.js";async function C(t,r){if(t.trimStart().startsWith("/"))return l(t,r);r.logger.info("Interactive prompt started.",{promptLength:t.length,attachmentCount:r.pendingAttachments.size});try{await r.sendPrompt(t,r.pendingAttachments.list()),r.logger.info("Interactive prompt completed.",{promptLength:t.length})}catch(a){r.resetActiveAbortController(),r.renderer.failed();const e=o(a);r.logger.error("Prompt execution failed.",{code:e.code,category:e.category,...e.details??{}}),r.renderer.error(m(e,"tui"))}return!1}async function l(t,r){r.renderer.command(t);try{const a=c(n(t.trimStart().slice(1)),"tui",d);r.logger.info("Slash command started.",{command:a.action.id});const e=await i(a,r.commandHost,r.commandContext());return r.logger.info("Slash command completed.",{command:a.action.id,exit:e}),e}catch(a){const e=o(a);return r.logger.error("Slash command failed.",{code:e.code,category:e.category}),r.renderer.error(m(e,"tui")),!1}}export{C as dispatchTuiPrompt};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SkillManifest } from '../../domain/extensions/skill-manifest.js';
|
|
2
|
+
import type { ExtensionScope } from '../../domain/extensions/extension-scope.js';
|
|
3
|
+
import type { TuiCommandContext } from './tui-command-context.js';
|
|
4
|
+
import { type ScopedSkill } from '../../infrastructure/extensions/skill-manager.js';
|
|
5
|
+
import type { SkillRootScope } from '../../infrastructure/extensions/skill-roots.js';
|
|
6
|
+
export interface TuiSkillControllerOptions {
|
|
7
|
+
globalConfigDir: string;
|
|
8
|
+
skillRootScopes: readonly SkillRootScope[];
|
|
9
|
+
runPrompt: (prompt: string, skill?: SkillManifest) => Promise<string>;
|
|
10
|
+
}
|
|
11
|
+
export declare function runTuiSkill(options: TuiSkillControllerOptions, name: string, args: readonly string[], context: TuiCommandContext, scope?: ExtensionScope, availableSkills?: readonly ScopedSkill[]): Promise<void>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import u from"node:path";import{SkillManager as c}from"../../infrastructure/extensions/skill-manager.js";async function S(l,n,t,r,o,a){const e=(a??await new c(u.join(l.globalConfigDir,"skills-state.json")).listScoped(l.skillRootScopes,{includeShadowed:!0})).find(i=>(i.skillKey===n||i.name===n)&&(o===void 0||i.scope===o));if(e===void 0||!e.enabled||!e.userInvocable){r.write(`Skill unavailable: ${n}`);return}const s=t.join(" ").trim(),d=s.length===0?e.body:`${e.body}
|
|
2
|
+
|
|
3
|
+
Requested scope: ${s}`;await l.runPrompt(d,e)}export{S as runTuiSkill};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { CliRuntime } from '../../bootstrap/runtime-factory.js';
|
|
2
|
+
import type { ToolApprovalRequest } from '@lotagate/agent-sdk';
|
|
3
|
+
import { ToolApprovalService, type CliApprovalMode, type ToolApprovalDecision } from '../../application/security/tool-approval-service.js';
|
|
4
|
+
import type { SkillScopeStore } from '../../application/extensions/skill-scope-store.js';
|
|
5
|
+
import type { WorkspacePermissionPolicy } from '../../domain/workspace/workspace-settings.js';
|
|
6
|
+
import type { InkTuiBridge } from './ink/tui-bridge.js';
|
|
7
|
+
export interface TuiToolApprovalHost {
|
|
8
|
+
readonly renderer: InkTuiBridge;
|
|
9
|
+
readonly runtime: CliRuntime;
|
|
10
|
+
getSessionId(): string | undefined;
|
|
11
|
+
getActiveSignal(): AbortSignal | undefined;
|
|
12
|
+
}
|
|
13
|
+
/** Owns the TUI adapter around the application-layer approval service. */
|
|
14
|
+
export declare class TuiToolApprovalCoordinator {
|
|
15
|
+
private readonly host;
|
|
16
|
+
constructor(host: TuiToolApprovalHost);
|
|
17
|
+
ask(request: ToolApprovalRequest): Promise<boolean>;
|
|
18
|
+
create(mode: CliApprovalMode, trustedProject: boolean, workspaceRoot: string, skillScopes?: SkillScopeStore, workspacePermissions?: WorkspacePermissionPolicy): ToolApprovalService;
|
|
19
|
+
remember(workspaceRoot: string, request: ToolApprovalRequest): Promise<void>;
|
|
20
|
+
audit(decision: ToolApprovalDecision): Promise<void>;
|
|
21
|
+
rememberFailure(error: unknown): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ToolApprovalService as m}from"../../application/security/tool-approval-service.js";import{permissionRuleForRequest as p}from"../../application/security/workspace-permission-policy.js";import{formatShellCommandForDisplay as u,formatToolActivityName as h}from"../../application/agent/tool-display.js";class N{host;constructor(e){this.host=e}async ask(e){this.host.renderer.status("Waiting for approval");try{return await this.host.renderer.confirmTool(e.toolName,c(e))}finally{const o=this.host.getActiveSignal();o!==void 0&&!o.aborted&&this.host.renderer.status("Thinking")}}create(e,o,a,n,i){return new m({mode:e,trustedProject:o,...n===void 0?{}:{skillScopes:n},...i===void 0?{}:{workspacePermissions:i},prompt:r=>this.ask(r),...o?{rememberApproval:r=>this.remember(a,r)}:{},...o?{onRememberApprovalFailure:(r,l)=>this.rememberFailure(l)}:{},audit:r=>this.audit(r)})}async remember(e,o){await this.host.runtime.workspaceSettings.rememberAllow(e,p(o.toolName,o.input))}async audit(e){this.host.runtime.logger.info("Tool authorization decision.",{toolName:e.toolName,decision:e.decision,reason:e.reason,...e.source===void 0?{}:{source:e.source},...e.skillName===void 0?{}:{skillName:e.skillName}});const o=this.host.getSessionId();o!==void 0&&await this.host.runtime.sessionStore.appendEvent({type:"tool.approval",timestamp:new Date().toISOString(),sessionId:o,data:{toolName:e.toolName,...e.source===void 0?{}:{source:e.source},...e.skillName===void 0?{}:{skillName:e.skillName},decision:e.decision,reason:e.reason}})}rememberFailure(e){this.host.runtime.logger.warn("Unable to persist tool approval.",{reason:e instanceof Error?e.message:String(e)}),this.host.renderer.notice("Approval accepted for this action, but could not be remembered.")}}function c(t){if(t.toolName==="filesystem.write")return`Write workspace file: ${f(t.input.path)}`;if(t.toolName==="shell.exec"){const e=typeof t.input.command=="string"?t.input.command:"",o=Array.isArray(t.input.args)?t.input.args.filter(a=>typeof a=="string"):[];return s(`Run command: ${u(e,o,240)}`)}return`This ${h(t.toolName)} operation may change workspace or external state.`}function f(t){const e=typeof t=="string"?t:String(t??"");return s(e.replace(/Bearer\s+[^\s]+/giu,"Bearer [REDACTED]").replace(/sk-[A-Za-z0-9_-]{8,}/gu,"[REDACTED]"))}function s(t){return t.length<=240?t:`${t.slice(0,237)}...`}export{N as TuiToolApprovalCoordinator};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CLI_VERSION = "0.1.25";
|
package/dist/version.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o="0.1.25";export{o as CLI_VERSION};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lotagate/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.25",
|
|
4
4
|
"description": "Enterprise-grade terminal client for LotaGate AI agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,6 +40,9 @@
|
|
|
40
40
|
"LICENSE.md",
|
|
41
41
|
"SECURITY.md"
|
|
42
42
|
],
|
|
43
|
+
"exports": {
|
|
44
|
+
"./package.json": "./package.json"
|
|
45
|
+
},
|
|
43
46
|
"publishConfig": {
|
|
44
47
|
"access": "public"
|
|
45
48
|
},
|
|
@@ -62,20 +65,19 @@
|
|
|
62
65
|
"prepack": "npm run build"
|
|
63
66
|
},
|
|
64
67
|
"dependencies": {
|
|
65
|
-
"@lotagate/agent-sdk": "^0.1.
|
|
66
|
-
"@lotagate/
|
|
67
|
-
"@lotagate/sdk": "^0.1.2",
|
|
68
|
+
"@lotagate/agent-sdk": "^0.1.7",
|
|
69
|
+
"@lotagate/sdk": "^0.1.3",
|
|
68
70
|
"ink": "^7.1.1",
|
|
69
71
|
"react": "^19.2.4",
|
|
70
72
|
"tiktoken": "^1.0.22"
|
|
71
73
|
},
|
|
72
74
|
"optionalDependencies": {
|
|
73
|
-
"@lotagate/cli-native-linux-arm64-gnu": "0.1.
|
|
74
|
-
"@lotagate/cli-native-linux-x64-gnu": "0.1.
|
|
75
|
-
"@lotagate/cli-native-macos-arm64": "0.1.
|
|
76
|
-
"@lotagate/cli-native-macos-x64": "0.1.
|
|
77
|
-
"@lotagate/cli-native-windows-arm64": "0.1.
|
|
78
|
-
"@lotagate/cli-native-windows-x64": "0.1.
|
|
75
|
+
"@lotagate/cli-native-linux-arm64-gnu": "0.1.25",
|
|
76
|
+
"@lotagate/cli-native-linux-x64-gnu": "0.1.25",
|
|
77
|
+
"@lotagate/cli-native-macos-arm64": "0.1.25",
|
|
78
|
+
"@lotagate/cli-native-macos-x64": "0.1.25",
|
|
79
|
+
"@lotagate/cli-native-windows-arm64": "0.1.25",
|
|
80
|
+
"@lotagate/cli-native-windows-x64": "0.1.25"
|
|
79
81
|
},
|
|
80
82
|
"devDependencies": {
|
|
81
83
|
"@eslint/js": "9.39.5",
|
|
@@ -1,22 +1,49 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: architecture-review
|
|
3
|
-
description: Trace a feature end to end and assess ownership, boundaries and extensibility.
|
|
4
|
-
user-invocable: true
|
|
5
|
-
model-invocable: true
|
|
3
|
+
description: Trace a feature or subsystem end to end and assess ownership, dependency boundaries, contracts, risks and extensibility before implementation.
|
|
6
4
|
allowed-tools: [filesystem.read, filesystem.list]
|
|
7
5
|
---
|
|
8
6
|
# Architecture review
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
Assess the requested feature or subsystem using repository evidence before
|
|
9
|
+
implementation. This skill produces an architecture decision, not a rewrite.
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
2. Trace the flow through validation, application logic, ports, infrastructure
|
|
14
|
-
adapters and presentation boundaries.
|
|
15
|
-
3. Reuse existing abstractions before proposing new files or dependencies.
|
|
16
|
-
4. Check for duplicated business rules, leaky infrastructure details and
|
|
17
|
-
unclear ownership.
|
|
18
|
-
5. Propose the smallest complete design that preserves contracts and supports
|
|
19
|
-
testing, operations and future extension; do not defer required behavior.
|
|
11
|
+
## Trace the current system
|
|
20
12
|
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
1. Read applicable guidance, package boundaries, entry points, manifests,
|
|
14
|
+
configuration and tests.
|
|
15
|
+
2. Map the real flow:
|
|
16
|
+
`entry point -> validation -> authorization/trust -> application/domain ->
|
|
17
|
+
port -> infrastructure adapter -> persistence/external service -> mapper ->
|
|
18
|
+
response/rendering`.
|
|
19
|
+
3. Identify the owner of each rule, allowed dependency direction, public
|
|
20
|
+
contract, runtime schema, lifecycle and failure boundary.
|
|
21
|
+
4. Search for existing components, services, repositories, clients, policies,
|
|
22
|
+
constants, error types and test helpers before proposing new abstractions.
|
|
23
|
+
5. Note duplicated rules, circular dependencies, leaky infrastructure types,
|
|
24
|
+
UI-owned authorization, hidden side effects and unclear transaction or
|
|
25
|
+
resource boundaries.
|
|
26
|
+
|
|
27
|
+
## Evaluate the requested design
|
|
28
|
+
|
|
29
|
+
Assess:
|
|
30
|
+
|
|
31
|
+
- business behavior and contract preservation;
|
|
32
|
+
- authentication, authorization, project trust and tenant/resource ownership;
|
|
33
|
+
- validation, error semantics, observability and operational support;
|
|
34
|
+
- cancellation, timeout, retries, bounded concurrency and cleanup;
|
|
35
|
+
- persistence, cache consistency and migration/rollback needs;
|
|
36
|
+
- test boundaries and realistic failure/empty states;
|
|
37
|
+
- future extension cost without premature generic abstraction.
|
|
38
|
+
|
|
39
|
+
Compare the smallest complete option with viable alternatives. Recommend a new
|
|
40
|
+
file, dependency or layer only when the existing owner cannot support the
|
|
41
|
+
behavior cleanly. Do not defer required correctness or hide a migration risk.
|
|
42
|
+
|
|
43
|
+
## Report
|
|
44
|
+
|
|
45
|
+
Separate confirmed repository facts, inferred risks, recommendations and items
|
|
46
|
+
requiring runtime verification. Include the affected flow, ownership map,
|
|
47
|
+
contract impact, proposed module boundaries, reuse decisions, alternatives,
|
|
48
|
+
trade-offs, change risk and a staged verification plan. Do not modify files
|
|
49
|
+
unless the user explicitly requests implementation.
|
|
@@ -1,20 +1,49 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: code-review
|
|
3
|
-
description: Review
|
|
4
|
-
user-invocable: true
|
|
5
|
-
model-invocable: true
|
|
3
|
+
description: Review an implementation or diff for correctness, security, architecture, maintainability and regression risk with evidence-backed findings.
|
|
6
4
|
allowed-tools: [filesystem.read, filesystem.list]
|
|
7
5
|
---
|
|
8
6
|
# Code review
|
|
9
7
|
|
|
10
|
-
Review the requested
|
|
8
|
+
Review the requested scope as a production change. This is an audit skill:
|
|
9
|
+
do not edit files unless the user explicitly asks to implement a finding.
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
2. Inspect the relevant callers, callees, contracts, validation and tests.
|
|
14
|
-
3. Report confirmed defects before style preferences.
|
|
15
|
-
4. For every finding, include severity, confidence, file/location, evidence,
|
|
16
|
-
impact and a focused remediation.
|
|
17
|
-
5. Check security boundaries, error paths, cancellation, resource cleanup and
|
|
18
|
-
regression coverage.
|
|
11
|
+
## Review procedure
|
|
19
12
|
|
|
20
|
-
|
|
13
|
+
1. Read applicable guidance and inspect the complete diff, not only the changed
|
|
14
|
+
lines. Identify generated or unrelated changes.
|
|
15
|
+
2. Trace each changed path from entry point through validation, authorization,
|
|
16
|
+
business logic, persistence/external adapters and user-visible output.
|
|
17
|
+
3. Inspect callers, callees, DTOs/types, runtime schemas, configuration,
|
|
18
|
+
migrations, error handling, logging, tests and deployment assumptions.
|
|
19
|
+
4. Check correctness and data integrity first, then security, reliability,
|
|
20
|
+
concurrency, resource cleanup, maintainability and performance.
|
|
21
|
+
5. Exercise the reasoning against empty, malformed, duplicate, concurrent,
|
|
22
|
+
cancelled, timed-out, unauthorized and partially failed cases.
|
|
23
|
+
6. Prefer confirmed defects over style preferences. Do not infer a bug from a
|
|
24
|
+
name or estimate performance without measurements.
|
|
25
|
+
|
|
26
|
+
## Required finding format
|
|
27
|
+
|
|
28
|
+
For every actionable finding, report:
|
|
29
|
+
|
|
30
|
+
- stable ID and category;
|
|
31
|
+
- severity: Critical, High, Medium or Low;
|
|
32
|
+
- confidence: Confirmed, High Confidence, Medium Confidence or Needs Verification;
|
|
33
|
+
- file and exact symbol/location;
|
|
34
|
+
- affected flow and trigger condition;
|
|
35
|
+
- problem, repository evidence, root cause and concrete impact;
|
|
36
|
+
- smallest safe recommendation and existing pattern to follow;
|
|
37
|
+
- alternatives/trade-offs, change risk and verification method.
|
|
38
|
+
|
|
39
|
+
Group symptoms with the same root cause. State explicitly when a behavior is
|
|
40
|
+
correct, when an issue is only a design trade-off, and when runtime/load
|
|
41
|
+
verification is still required. Never expose secrets or reproduce sensitive
|
|
42
|
+
payloads in findings.
|
|
43
|
+
|
|
44
|
+
## Review conclusion
|
|
45
|
+
|
|
46
|
+
Summarize coverage and limitations, finding count and severity distribution,
|
|
47
|
+
highest-risk issues, systemic causes, quick wins and unverified items. If the
|
|
48
|
+
user requests implementation afterward, convert only confirmed findings into a
|
|
49
|
+
focused patch and preserve the review evidence.
|
|
@@ -1,20 +1,57 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: debugging
|
|
3
|
-
description: Diagnose a reproducible failure from
|
|
4
|
-
user-invocable: true
|
|
5
|
-
model-invocable: true
|
|
3
|
+
description: Diagnose a reproducible software failure from repository and runtime evidence, then implement a minimal verified fix when requested.
|
|
6
4
|
allowed-tools: [filesystem.read, filesystem.list, shell.exec]
|
|
7
5
|
---
|
|
8
6
|
# Debugging
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
Find the root cause of the reported failure without guessing or masking the
|
|
9
|
+
symptom. If the user asks for diagnosis only, do not modify source files.
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
2. Trace the input from its boundary to the failing operation.
|
|
14
|
-
3. Compare the runtime behavior with the declared types, validation and
|
|
15
|
-
configuration.
|
|
16
|
-
4. Identify the root cause, affected cases and regression risk.
|
|
17
|
-
5. Add or update a focused regression test before implementing a fix.
|
|
18
|
-
6. Run the narrow test first, then the relevant project checks.
|
|
11
|
+
## Establish evidence
|
|
19
12
|
|
|
20
|
-
|
|
13
|
+
1. Read applicable repository guidance and inspect the current diff before
|
|
14
|
+
changing anything.
|
|
15
|
+
2. Capture the exact trigger, input shape, environment, command, expected
|
|
16
|
+
result and observed result. Keep credentials and sensitive payloads out of
|
|
17
|
+
notes and logs.
|
|
18
|
+
3. Reproduce with the narrowest safe test or command. If reproduction is not
|
|
19
|
+
possible, state `Needs runtime verification` and isolate the closest
|
|
20
|
+
deterministic boundary instead of inventing behavior.
|
|
21
|
+
4. Search callers and callees, then trace the value through parsing,
|
|
22
|
+
validation, state transitions, persistence, external adapters and rendering.
|
|
23
|
+
5. Compare implementation behavior with types, schemas, configuration,
|
|
24
|
+
authorization/trust rules and documented contracts.
|
|
25
|
+
|
|
26
|
+
## Classify the cause
|
|
27
|
+
|
|
28
|
+
Separate:
|
|
29
|
+
|
|
30
|
+
- confirmed root cause;
|
|
31
|
+
- contributing condition;
|
|
32
|
+
- affected and unaffected cases;
|
|
33
|
+
- data-integrity, security, concurrency or resource-lifecycle risk;
|
|
34
|
+
- pre-existing failure or environment limitation.
|
|
35
|
+
|
|
36
|
+
Check malformed input, empty state, retries, timeout/cancellation, concurrent
|
|
37
|
+
requests, stale UI responses, permission denial, partial writes and cleanup.
|
|
38
|
+
Do not call a style preference a bug and do not claim a security issue without
|
|
39
|
+
tracing user-controlled data to the sensitive sink.
|
|
40
|
+
|
|
41
|
+
## Fix only when authorized
|
|
42
|
+
|
|
43
|
+
When implementation is requested:
|
|
44
|
+
|
|
45
|
+
1. Add a focused regression test that fails for the reported behavior and
|
|
46
|
+
protects the business invariant.
|
|
47
|
+
2. Apply the smallest fix in the module that owns the behavior. Reuse existing
|
|
48
|
+
validators, error contracts, state machines and utilities.
|
|
49
|
+
3. Preserve unrelated behavior, public contracts, authorization and
|
|
50
|
+
observability. Do not weaken validation, broaden permissions or swallow
|
|
51
|
+
exceptions to make the test pass.
|
|
52
|
+
4. Run the focused test first, then typecheck/lint/build and the relevant
|
|
53
|
+
integration or regression suite.
|
|
54
|
+
|
|
55
|
+
Report the trigger, evidence, root cause, fix, tests and any remaining runtime
|
|
56
|
+
verification. Never report a reproduction or test as successful unless it was
|
|
57
|
+
actually run.
|
|
@@ -1,16 +1,50 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: documentation
|
|
3
|
-
description: Produce accurate
|
|
4
|
-
user-invocable: true
|
|
5
|
-
model-invocable: true
|
|
3
|
+
description: Produce and maintain accurate engineering documentation from verified repository behavior, contracts and operational workflows.
|
|
6
4
|
allowed-tools: [filesystem.read, filesystem.list, filesystem.write]
|
|
7
5
|
---
|
|
8
6
|
# Documentation
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
Create documentation that helps its intended reader make the correct decision
|
|
9
|
+
or complete the supported workflow. Documentation is part of the product
|
|
10
|
+
contract: never document an assumption as a feature.
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
## Discover the source of truth
|
|
13
|
+
|
|
14
|
+
1. Read applicable guidance, the nearest README/design document, package
|
|
15
|
+
metadata and the complete implementation path.
|
|
16
|
+
2. Verify public commands, routes, IPC/API payloads, configuration keys,
|
|
17
|
+
defaults, scopes, permissions, error behavior, lifecycle and supported
|
|
18
|
+
platforms from code, schemas and tests.
|
|
19
|
+
3. Search for existing documentation and update the nearest authoritative
|
|
20
|
+
source. Do not create duplicate instructions or conflicting quick starts.
|
|
21
|
+
4. Identify the audience and task: user guide, API reference, architecture
|
|
22
|
+
decision, operations runbook, troubleshooting guide or changelog.
|
|
23
|
+
|
|
24
|
+
## Write the useful contract
|
|
25
|
+
|
|
26
|
+
Include only verified and task-relevant information:
|
|
27
|
+
|
|
28
|
+
- purpose, scope and explicit non-goals;
|
|
29
|
+
- prerequisites, installation and configuration;
|
|
30
|
+
- normal workflow with copyable, safe examples;
|
|
31
|
+
- inputs, outputs, defaults, limits, scopes and permissions;
|
|
32
|
+
- loading, empty, error, timeout, cancellation and recovery behavior;
|
|
33
|
+
- security boundaries, trust requirements and sensitive-data rules;
|
|
34
|
+
- compatibility, platform limitations, migrations and rollback;
|
|
35
|
+
- documented verification commands and expected outcomes.
|
|
36
|
+
|
|
37
|
+
Use the project voice and stable terminology. Keep titles specific, put the
|
|
38
|
+
most important behavior first, avoid unsupported promises and never include
|
|
39
|
+
credentials, private paths, raw tokens or unbounded sensitive payloads.
|
|
40
|
+
|
|
41
|
+
## Validate before handoff
|
|
42
|
+
|
|
43
|
+
Cross-check examples against command catalogs, types and schemas. Run the
|
|
44
|
+
narrowest relevant documentation/example test or validation command when one
|
|
45
|
+
exists. Re-read links, code snippets, paths, version values and negative cases.
|
|
46
|
+
If implementation evidence is incomplete, label the statement `Needs
|
|
47
|
+
Verification` instead of guessing.
|
|
48
|
+
|
|
49
|
+
Report the authoritative files updated, verified sources, commands run, known
|
|
50
|
+
limitations and any remaining documentation drift risk.
|
|
@@ -1,25 +1,64 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: feature-implementation
|
|
3
|
-
description: Implement
|
|
4
|
-
user-invocable: true
|
|
5
|
-
model-invocable: true
|
|
3
|
+
description: Implement an explicitly requested product or engineering feature end to end while preserving architecture, contracts, security and operational safety.
|
|
6
4
|
allowed-tools: [filesystem.read, filesystem.list, filesystem.exists, filesystem.write, shell.exec]
|
|
7
5
|
---
|
|
8
6
|
# Feature implementation
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
8
|
+
Deliver the explicitly requested behavior as a complete, reviewable change.
|
|
9
|
+
Do not silently broaden the product scope, redesign an unrelated subsystem, or
|
|
10
|
+
turn a one-off example into a new platform abstraction.
|
|
11
|
+
|
|
12
|
+
## Before editing
|
|
13
|
+
|
|
14
|
+
1. Read the applicable `AGENTS.md`, package manifest, README, architecture
|
|
15
|
+
notes, build configuration, test configuration and environment examples.
|
|
16
|
+
2. Inspect the current working tree and preserve unrelated user changes.
|
|
17
|
+
3. Trace the affected flow end to end:
|
|
18
|
+
- UI: route -> page -> components -> state/hooks -> API/IPC -> response -> render.
|
|
19
|
+
- Backend/CLI: command or route -> validation -> application service -> port -> adapter -> persistence/external system -> response.
|
|
20
|
+
4. Identify the owning module, dependency direction, public contracts, runtime
|
|
21
|
+
schemas, authorization/trust boundary and existing reusable abstractions.
|
|
22
|
+
5. Search for equivalent components, services, validators, mappers, constants,
|
|
23
|
+
error types and test utilities before creating anything new.
|
|
24
|
+
|
|
25
|
+
## Design the smallest complete change
|
|
26
|
+
|
|
27
|
+
Define the behavior before implementation:
|
|
28
|
+
|
|
29
|
+
- normal, loading, empty, malformed-input and failure states;
|
|
30
|
+
- validation at every trust boundary and stable error semantics;
|
|
31
|
+
- authorization, project trust, scope and approval behavior;
|
|
32
|
+
- cancellation, timeout, retry and resource cleanup where I/O is involved;
|
|
33
|
+
- persistence, cache invalidation, ordering and concurrency behavior;
|
|
34
|
+
- accessibility and user-visible feedback for UI changes;
|
|
35
|
+
- migration, compatibility and rollback implications when a contract changes.
|
|
36
|
+
|
|
37
|
+
Keep business rules in their owning domain/application layer. Keep controllers,
|
|
38
|
+
IPC handlers and UI components as orchestration boundaries rather than sources
|
|
39
|
+
of truth. Prefer extending a cohesive existing abstraction over duplicating a
|
|
40
|
+
rule or introducing a generic shared helper with unclear ownership.
|
|
41
|
+
|
|
42
|
+
## Implement incrementally
|
|
43
|
+
|
|
44
|
+
1. Make the smallest cohesive edit and keep the diff focused.
|
|
45
|
+
2. Preserve existing inputs, outputs, error codes, side effects and ordering
|
|
46
|
+
unless the request explicitly changes them.
|
|
47
|
+
3. Use runtime validation for external data even when TypeScript types exist.
|
|
48
|
+
4. Bound concurrency, payload size, recursion, retries and memory where the
|
|
49
|
+
feature can process user-controlled or remote data.
|
|
50
|
+
5. Never log credentials, tokens, raw secrets, unbounded tool input or sensitive
|
|
51
|
+
file contents. Do not edit generated files or lockfiles without a reason.
|
|
52
|
+
6. Add focused tests for business invariants, failure paths and authorization
|
|
53
|
+
boundaries before combining broader changes.
|
|
54
|
+
|
|
55
|
+
## Verify and hand off
|
|
56
|
+
|
|
57
|
+
Run the narrowest documented typecheck, lint, unit or integration test after
|
|
58
|
+
each safe unit, then run the relevant package build and regression checks. If a
|
|
59
|
+
check fails, report the exact command and distinguish an introduced failure
|
|
60
|
+
from a pre-existing or environment failure; never hide it.
|
|
61
|
+
|
|
62
|
+
The final report must state what changed, why, files touched, contracts and
|
|
63
|
+
business behavior preserved or intentionally changed, commands and results,
|
|
64
|
+
known limitations, remaining risks and any manual runtime verification needed.
|