@cerebriline/core 4.100.240
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/LICENSE +201 -0
- package/README.md +16 -0
- package/assets/office-oxide/LICENSE-APACHE +176 -0
- package/assets/office-oxide/LICENSE-MIT +25 -0
- package/assets/office-oxide/office_oxide_bg.wasm +0 -0
- package/assets/prompt-templates/claude.md +516 -0
- package/assets/prompt-templates/deepseek.md +331 -0
- package/assets/prompt-templates/default.md +386 -0
- package/assets/prompt-templates/gemma.md +352 -0
- package/assets/prompt-templates/glm.md +334 -0
- package/assets/prompt-templates/kimi-k3.md +408 -0
- package/assets/prompt-templates/kimi.md +402 -0
- package/assets/prompt-templates/minimax.md +473 -0
- package/assets/prompt-templates/nemotron.md +358 -0
- package/assets/prompt-templates/qwen.md +612 -0
- package/dist/ClineCore.d.ts +365 -0
- package/dist/account/cline-account-service.d.ts +41 -0
- package/dist/account/index.d.ts +3 -0
- package/dist/account/rpc.d.ts +40 -0
- package/dist/account/types.d.ts +122 -0
- package/dist/auth/bounded-ttl-cache.d.ts +13 -0
- package/dist/auth/client.d.ts +30 -0
- package/dist/auth/cline.d.ts +71 -0
- package/dist/auth/codex.d.ts +40 -0
- package/dist/auth/oca.d.ts +21 -0
- package/dist/auth/provider-auth-registry.d.ts +52 -0
- package/dist/auth/server.d.ts +54 -0
- package/dist/auth/types.d.ts +103 -0
- package/dist/auth/utils.d.ts +31 -0
- package/dist/cline-core/automation.d.ts +34 -0
- package/dist/cline-core/runtime-services.d.ts +5 -0
- package/dist/cline-core/start-input.d.ts +10 -0
- package/dist/cline-core/telemetry.d.ts +10 -0
- package/dist/cline-core/types.d.ts +236 -0
- package/dist/cron/events/cron-event-ingress.d.ts +37 -0
- package/dist/cron/reports/cron-report-writer.d.ts +42 -0
- package/dist/cron/runner/cron-materializer.d.ts +35 -0
- package/dist/cron/runner/cron-runner.d.ts +60 -0
- package/dist/cron/runner/resource-limiter.d.ts +8 -0
- package/dist/cron/schedule/scheduler.d.ts +12 -0
- package/dist/cron/service/cron-service.d.ts +56 -0
- package/dist/cron/service/schedule-command-service.d.ts +14 -0
- package/dist/cron/service/schedule-service.d.ts +116 -0
- package/dist/cron/service/schedule-tool.d.ts +81 -0
- package/dist/cron/specs/cron-reconciler.d.ts +61 -0
- package/dist/cron/specs/cron-spec-parser.d.ts +26 -0
- package/dist/cron/specs/cron-watcher.d.ts +22 -0
- package/dist/cron/store/cron-schema.d.ts +2 -0
- package/dist/cron/store/sqlite-cron-store.d.ts +261 -0
- package/dist/extensions/agent-plugin/agent-skill.d.ts +21 -0
- package/dist/extensions/agent-plugin/index.d.ts +4 -0
- package/dist/extensions/agent-plugin/loader.d.ts +10 -0
- package/dist/extensions/agent-plugin/types.d.ts +67 -0
- package/dist/extensions/complexity/grammars.d.ts +92 -0
- package/dist/extensions/complexity/walker.d.ts +115 -0
- package/dist/extensions/config/builtin-templates.d.ts +10 -0
- package/dist/extensions/config/builtin-templates.generated.d.ts +5 -0
- package/dist/extensions/config/index.d.ts +15 -0
- package/dist/extensions/config/prompt-template-compaction.d.ts +92 -0
- package/dist/extensions/config/prompt-template-delta.d.ts +107 -0
- package/dist/extensions/config/prompt-template-hooks.d.ts +47 -0
- package/dist/extensions/config/prompt-template-loader.d.ts +79 -0
- package/dist/extensions/config/prompt-template-parser.d.ts +56 -0
- package/dist/extensions/config/prompt-template-review.d.ts +327 -0
- package/dist/extensions/config/prompt-template-session.d.ts +46 -0
- package/dist/extensions/config/runtime-commands.d.ts +23 -0
- package/dist/extensions/config/shipped-tool-signatures.d.ts +36 -0
- package/dist/extensions/config/skill-frontmatter-toggle.d.ts +11 -0
- package/dist/extensions/config/unified-config-file-watcher.d.ts +77 -0
- package/dist/extensions/config/user-instruction-config-loader.d.ts +77 -0
- package/dist/extensions/config/user-instruction-plugin.d.ts +26 -0
- package/dist/extensions/config/user-instruction-service.d.ts +31 -0
- package/dist/extensions/context/agentic-compaction.d.ts +129 -0
- package/dist/extensions/context/basic-compaction.d.ts +19 -0
- package/dist/extensions/context/budget-projection/index.d.ts +2 -0
- package/dist/extensions/context/budget-projection/project.d.ts +4 -0
- package/dist/extensions/context/budget-projection/types.d.ts +58 -0
- package/dist/extensions/context/capped-thinking.d.ts +195 -0
- package/dist/extensions/context/compaction-cause.d.ts +27 -0
- package/dist/extensions/context/compaction-journal.d.ts +65 -0
- package/dist/extensions/context/compaction-revisions.d.ts +72 -0
- package/dist/extensions/context/compaction-shared.d.ts +608 -0
- package/dist/extensions/context/compaction.d.ts +161 -0
- package/dist/extensions/context/context-minimum-warning.d.ts +27 -0
- package/dist/extensions/context/continuation-compaction.d.ts +260 -0
- package/dist/extensions/context/council-compaction.d.ts +262 -0
- package/dist/extensions/context/full-compaction.d.ts +44 -0
- package/dist/extensions/context/kv-pressure.d.ts +258 -0
- package/dist/extensions/context/polykv-session.d.ts +372 -0
- package/dist/extensions/context/replay-compaction.d.ts +90 -0
- package/dist/extensions/context/tool-ledger.d.ts +198 -0
- package/dist/extensions/context/work-digest.d.ts +92 -0
- package/dist/extensions/index.d.ts +7 -0
- package/dist/extensions/mcp/client.d.ts +28 -0
- package/dist/extensions/mcp/config-loader.d.ts +102 -0
- package/dist/extensions/mcp/index.d.ts +15 -0
- package/dist/extensions/mcp/manager.d.ts +23 -0
- package/dist/extensions/mcp/name-transform.d.ts +2 -0
- package/dist/extensions/mcp/oauth.d.ts +68 -0
- package/dist/extensions/mcp/plugin-server-registration.d.ts +18 -0
- package/dist/extensions/mcp/policies.d.ts +14 -0
- package/dist/extensions/mcp/remote-proxy.d.ts +9 -0
- package/dist/extensions/mcp/timeout.d.ts +2 -0
- package/dist/extensions/mcp/tools.d.ts +3 -0
- package/dist/extensions/mcp/types.d.ts +133 -0
- package/dist/extensions/plugin/plugin-config-loader.d.ts +44 -0
- package/dist/extensions/plugin/plugin-load-report.d.ts +18 -0
- package/dist/extensions/plugin/plugin-loader.d.ts +23 -0
- package/dist/extensions/plugin/plugin-module-import.d.ts +4 -0
- package/dist/extensions/plugin/plugin-sandbox.d.ts +82 -0
- package/dist/extensions/plugin/plugin-targeting.d.ts +6 -0
- package/dist/extensions/plugin-sandbox-bootstrap.js +1 -0
- package/dist/extensions/tools/ask-lsp.d.ts +150 -0
- package/dist/extensions/tools/audio-tools.d.ts +156 -0
- package/dist/extensions/tools/browser.d.ts +137 -0
- package/dist/extensions/tools/check-file.d.ts +218 -0
- package/dist/extensions/tools/check-on-failure.d.ts +49 -0
- package/dist/extensions/tools/code-intel.d.ts +131 -0
- package/dist/extensions/tools/command-guard-extension.d.ts +22 -0
- package/dist/extensions/tools/command-guard.d.ts +29 -0
- package/dist/extensions/tools/constants.d.ts +28 -0
- package/dist/extensions/tools/definitions.d.ts +178 -0
- package/dist/extensions/tools/delimiter-balance.d.ts +121 -0
- package/dist/extensions/tools/edit-verification.d.ts +86 -0
- package/dist/extensions/tools/error-locations.d.ts +53 -0
- package/dist/extensions/tools/executors/apply-patch-parser.d.ts +68 -0
- package/dist/extensions/tools/executors/apply-patch.d.ts +48 -0
- package/dist/extensions/tools/executors/awk-parser.d.ts +163 -0
- package/dist/extensions/tools/executors/awk.d.ts +41 -0
- package/dist/extensions/tools/executors/bash.d.ts +119 -0
- package/dist/extensions/tools/executors/document/assets.d.ts +22 -0
- package/dist/extensions/tools/executors/document/ebook.d.ts +11 -0
- package/dist/extensions/tools/executors/document/formats.d.ts +83 -0
- package/dist/extensions/tools/executors/document/images.d.ts +73 -0
- package/dist/extensions/tools/executors/document/legacy.d.ts +20 -0
- package/dist/extensions/tools/executors/document/ocr.d.ts +67 -0
- package/dist/extensions/tools/executors/document/office-oxide.d.ts +19 -0
- package/dist/extensions/tools/executors/document/office-oxide.generated.d.ts +82 -0
- package/dist/extensions/tools/executors/document/office.d.ts +10 -0
- package/dist/extensions/tools/executors/document/pdf.d.ts +6 -0
- package/dist/extensions/tools/executors/document/pdfjs.d.ts +30 -0
- package/dist/extensions/tools/executors/document/range.d.ts +18 -0
- package/dist/extensions/tools/executors/document/recognition.d.ts +67 -0
- package/dist/extensions/tools/executors/document-extract.d.ts +55 -0
- package/dist/extensions/tools/executors/editor.d.ts +68 -0
- package/dist/extensions/tools/executors/file-locks.d.ts +41 -0
- package/dist/extensions/tools/executors/file-read.d.ts +136 -0
- package/dist/extensions/tools/executors/grep.d.ts +35 -0
- package/dist/extensions/tools/executors/index.d.ts +97 -0
- package/dist/extensions/tools/executors/line-endings.d.ts +23 -0
- package/dist/extensions/tools/executors/output-limits.d.ts +58 -0
- package/dist/extensions/tools/executors/overlay-receipts.d.ts +25 -0
- package/dist/extensions/tools/executors/posix-regex.d.ts +52 -0
- package/dist/extensions/tools/executors/read-receipts.d.ts +93 -0
- package/dist/extensions/tools/executors/run-command-execution-controller.d.ts +16 -0
- package/dist/extensions/tools/executors/search.d.ts +50 -0
- package/dist/extensions/tools/executors/sed.d.ts +92 -0
- package/dist/extensions/tools/executors/unchanged-reads.d.ts +55 -0
- package/dist/extensions/tools/executors/web-fetch.d.ts +58 -0
- package/dist/extensions/tools/helpers.d.ts +59 -0
- package/dist/extensions/tools/image-edit.d.ts +76 -0
- package/dist/extensions/tools/image-generation.d.ts +183 -0
- package/dist/extensions/tools/index.d.ts +68 -0
- package/dist/extensions/tools/jev.d.ts +336 -0
- package/dist/extensions/tools/list-files.d.ts +128 -0
- package/dist/extensions/tools/media-endpoint.d.ts +160 -0
- package/dist/extensions/tools/media-tools.d.ts +140 -0
- package/dist/extensions/tools/model-tool-routing.d.ts +33 -0
- package/dist/extensions/tools/presets.d.ts +154 -0
- package/dist/extensions/tools/qa-credentials.d.ts +133 -0
- package/dist/extensions/tools/runtime.d.ts +39 -0
- package/dist/extensions/tools/schemas.d.ts +845 -0
- package/dist/extensions/tools/task-progress.d.ts +217 -0
- package/dist/extensions/tools/team/agent-admission.d.ts +127 -0
- package/dist/extensions/tools/team/agent-check.d.ts +152 -0
- package/dist/extensions/tools/team/agent-controls.d.ts +55 -0
- package/dist/extensions/tools/team/agent-file.d.ts +28 -0
- package/dist/extensions/tools/team/agent-iteration-cap.d.ts +328 -0
- package/dist/extensions/tools/team/agent-names.d.ts +29 -0
- package/dist/extensions/tools/team/agent-node-placement.d.ts +160 -0
- package/dist/extensions/tools/team/agent-placement-queue.d.ts +199 -0
- package/dist/extensions/tools/team/agent-placement.d.ts +118 -0
- package/dist/extensions/tools/team/agent-reports.d.ts +53 -0
- package/dist/extensions/tools/team/agent-rounds.d.ts +666 -0
- package/dist/extensions/tools/team/agent-sandbox-executors.d.ts +79 -0
- package/dist/extensions/tools/team/agent-slot-gate.d.ts +186 -0
- package/dist/extensions/tools/team/agent-status.d.ts +84 -0
- package/dist/extensions/tools/team/agent-trouble.d.ts +91 -0
- package/dist/extensions/tools/team/background-delegations.d.ts +106 -0
- package/dist/extensions/tools/team/batch-report.d.ts +151 -0
- package/dist/extensions/tools/team/configured-agent-config.d.ts +37 -0
- package/dist/extensions/tools/team/configured-agent-tool.d.ts +135 -0
- package/dist/extensions/tools/team/create-agent-tool.d.ts +45 -0
- package/dist/extensions/tools/team/delegate-to-agent.d.ts +105 -0
- package/dist/extensions/tools/team/delegated-agent.d.ts +272 -0
- package/dist/extensions/tools/team/delegated-sandboxes.d.ts +125 -0
- package/dist/extensions/tools/team/delegated-tools.d.ts +40 -0
- package/dist/extensions/tools/team/delegation-call-hooks.d.ts +30 -0
- package/dist/extensions/tools/team/engine-evictions.d.ts +38 -0
- package/dist/extensions/tools/team/index.d.ts +20 -0
- package/dist/extensions/tools/team/lead-agent-tools.d.ts +92 -0
- package/dist/extensions/tools/team/multi-agent.d.ts +364 -0
- package/dist/extensions/tools/team/node-reachability.d.ts +53 -0
- package/dist/extensions/tools/team/node-throughput.d.ts +40 -0
- package/dist/extensions/tools/team/placed-run.d.ts +114 -0
- package/dist/extensions/tools/team/projections.d.ts +8 -0
- package/dist/extensions/tools/team/runtime.d.ts +6 -0
- package/dist/extensions/tools/team/session-window-retry.d.ts +28 -0
- package/dist/extensions/tools/team/spawn-agent-tool.d.ts +450 -0
- package/dist/extensions/tools/team/spawn-sampling.d.ts +188 -0
- package/dist/extensions/tools/team/spawn-swarm-tool.d.ts +330 -0
- package/dist/extensions/tools/team/subagent-cancellation.d.ts +188 -0
- package/dist/extensions/tools/team/subagent-layout.d.ts +90 -0
- package/dist/extensions/tools/team/subagent-output.d.ts +73 -0
- package/dist/extensions/tools/team/subagent-progress.d.ts +211 -0
- package/dist/extensions/tools/team/subagent-prompts.d.ts +3 -0
- package/dist/extensions/tools/team/team-state-dates.d.ts +10 -0
- package/dist/extensions/tools/team/team-tools.d.ts +56 -0
- package/dist/extensions/tools/team/teammates-off.d.ts +14 -0
- package/dist/extensions/tools/team/token-split.d.ts +28 -0
- package/dist/extensions/tools/team/turn-fault-recovery.d.ts +71 -0
- package/dist/extensions/tools/types.d.ts +410 -0
- package/dist/extensions/tools/video-generation.d.ts +94 -0
- package/dist/hooks/checkpoint-hooks.d.ts +39 -0
- package/dist/hooks/hook-extension.d.ts +2 -0
- package/dist/hooks/hook-file-config.d.ts +24 -0
- package/dist/hooks/hook-file-hooks.d.ts +22 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/subprocess-runner.d.ts +21 -0
- package/dist/hooks/subprocess.d.ts +74 -0
- package/dist/hub/client/connect.d.ts +14 -0
- package/dist/hub/client/index.d.ts +146 -0
- package/dist/hub/client/managed-hub-build-watcher.d.ts +62 -0
- package/dist/hub/client/session-client.d.ts +138 -0
- package/dist/hub/client/ui-client.d.ts +52 -0
- package/dist/hub/daemon/entry.d.ts +15 -0
- package/dist/hub/daemon/entry.js +2033 -0
- package/dist/hub/daemon/index.d.ts +125 -0
- package/dist/hub/daemon/runtime-handlers.d.ts +12 -0
- package/dist/hub/daemon/shutdown-coordinator.d.ts +31 -0
- package/dist/hub/daemon/start-shared-server.d.ts +18 -0
- package/dist/hub/daemon/telemetry.d.ts +19 -0
- package/dist/hub/discovery/defaults.d.ts +16 -0
- package/dist/hub/discovery/index.d.ts +139 -0
- package/dist/hub/discovery/instance-lock.d.ts +51 -0
- package/dist/hub/discovery/workspace.d.ts +13 -0
- package/dist/hub/index.d.ts +38 -0
- package/dist/hub/index.js +2023 -0
- package/dist/hub/runtime-host/hub-runtime-host.d.ts +83 -0
- package/dist/hub/runtime-host/remote-runtime-host.d.ts +9 -0
- package/dist/hub/server/browser-websocket.d.ts +22 -0
- package/dist/hub/server/command-transport.d.ts +29 -0
- package/dist/hub/server/handlers/approval-handlers.d.ts +24 -0
- package/dist/hub/server/handlers/capability-handlers.d.ts +12 -0
- package/dist/hub/server/handlers/client-handlers.d.ts +6 -0
- package/dist/hub/server/handlers/connector-handlers.d.ts +20 -0
- package/dist/hub/server/handlers/context.d.ts +98 -0
- package/dist/hub/server/handlers/run-handlers.d.ts +6 -0
- package/dist/hub/server/handlers/run-queue-handlers.d.ts +33 -0
- package/dist/hub/server/handlers/session-event-projector.d.ts +7 -0
- package/dist/hub/server/handlers/session-handlers.d.ts +30 -0
- package/dist/hub/server/hub-client-contributions.d.ts +19 -0
- package/dist/hub/server/hub-event-log.d.ts +57 -0
- package/dist/hub/server/hub-notifications.d.ts +7 -0
- package/dist/hub/server/hub-run-queue.d.ts +82 -0
- package/dist/hub/server/hub-schedule-events.d.ts +2 -0
- package/dist/hub/server/hub-server-logging.d.ts +2 -0
- package/dist/hub/server/hub-server-options.d.ts +94 -0
- package/dist/hub/server/hub-server-transport.d.ts +71 -0
- package/dist/hub/server/hub-session-records.d.ts +9 -0
- package/dist/hub/server/hub-websocket-server.d.ts +12 -0
- package/dist/hub/server/index.d.ts +4 -0
- package/dist/hub/server/native-transport.d.ts +25 -0
- package/dist/hub/server/task-command-service.d.ts +11 -0
- package/dist/index.d.ts +172 -0
- package/dist/index.js +5435 -0
- package/dist/logging/early-logger.d.ts +37 -0
- package/dist/remote-config/integration.d.ts +17 -0
- package/dist/runtime/atomic/base-revision-reads.d.ts +106 -0
- package/dist/runtime/atomic/base-revision.d.ts +77 -0
- package/dist/runtime/atomic/check-first-edits.d.ts +79 -0
- package/dist/runtime/atomic/file-revisions.d.ts +268 -0
- package/dist/runtime/atomic/oracle.d.ts +178 -0
- package/dist/runtime/atomic/page-check.d.ts +39 -0
- package/dist/runtime/atomic/plan-capture.d.ts +40 -0
- package/dist/runtime/atomic/plan-text.d.ts +33 -0
- package/dist/runtime/atomic/plan-tool.d.ts +159 -0
- package/dist/runtime/atomic/proposal.d.ts +112 -0
- package/dist/runtime/atomic/propose-check-tool.d.ts +76 -0
- package/dist/runtime/atomic/protocol.d.ts +233 -0
- package/dist/runtime/atomic/restore-file-tool.d.ts +196 -0
- package/dist/runtime/atomic/revision-capture.d.ts +75 -0
- package/dist/runtime/atomic/run-check-tool.d.ts +64 -0
- package/dist/runtime/atomic/session-protocol.d.ts +304 -0
- package/dist/runtime/atomic/session-revisions.d.ts +77 -0
- package/dist/runtime/atomic/snapshot.d.ts +77 -0
- package/dist/runtime/atomic/stalled-checks.d.ts +106 -0
- package/dist/runtime/atomic/submit-transaction-tool.d.ts +50 -0
- package/dist/runtime/atomic/tool-activity.d.ts +15 -0
- package/dist/runtime/atomic/transaction-controller.d.ts +364 -0
- package/dist/runtime/atomic/unparseable-change.d.ts +35 -0
- package/dist/runtime/capabilities/index.d.ts +2 -0
- package/dist/runtime/capabilities/normalize-runtime-capabilities.d.ts +2 -0
- package/dist/runtime/capabilities/runtime-capabilities.d.ts +18 -0
- package/dist/runtime/config/agent-message-codec.d.ts +6 -0
- package/dist/runtime/config/agent-runtime-config-builder.d.ts +93 -0
- package/dist/runtime/config/connection-update.d.ts +40 -0
- package/dist/runtime/escalation/a2a.d.ts +109 -0
- package/dist/runtime/escalation/assessment.d.ts +54 -0
- package/dist/runtime/escalation/brief.d.ts +70 -0
- package/dist/runtime/escalation/escalate-tool.d.ts +93 -0
- package/dist/runtime/escalation/escalation-controller.d.ts +62 -0
- package/dist/runtime/escalation/escalation-session.d.ts +241 -0
- package/dist/runtime/escalation/expert-failure.d.ts +20 -0
- package/dist/runtime/escalation/expert-guards.d.ts +46 -0
- package/dist/runtime/escalation/expert-mailbox.d.ts +34 -0
- package/dist/runtime/escalation/expert-notes.d.ts +115 -0
- package/dist/runtime/escalation/expert-prompt.d.ts +29 -0
- package/dist/runtime/escalation/expert-revisions.d.ts +62 -0
- package/dist/runtime/escalation/expert-session.d.ts +164 -0
- package/dist/runtime/escalation/expert-transcript.d.ts +32 -0
- package/dist/runtime/escalation/forced-escalation.d.ts +58 -0
- package/dist/runtime/escalation/stand-down.d.ts +66 -0
- package/dist/runtime/escalation/struggle-offer.d.ts +100 -0
- package/dist/runtime/escalation/watch-tool.d.ts +34 -0
- package/dist/runtime/host/history.d.ts +19 -0
- package/dist/runtime/host/host.d.ts +7 -0
- package/dist/runtime/host/local/agent-event-bridge.d.ts +50 -0
- package/dist/runtime/host/local/session-record.d.ts +6 -0
- package/dist/runtime/host/local/session-service-invoker.d.ts +4 -0
- package/dist/runtime/host/local/spawn-tool.d.ts +57 -0
- package/dist/runtime/host/local/user-files.d.ts +1 -0
- package/dist/runtime/host/local-runtime-host.d.ts +298 -0
- package/dist/runtime/host/runtime-host-support.d.ts +39 -0
- package/dist/runtime/host/runtime-host.d.ts +280 -0
- package/dist/runtime/host/steer-side-turn.d.ts +119 -0
- package/dist/runtime/orchestration/runtime-builder.d.ts +14 -0
- package/dist/runtime/orchestration/runtime-event-adapter.d.ts +104 -0
- package/dist/runtime/orchestration/runtime-oauth-token-manager.d.ts +28 -0
- package/dist/runtime/orchestration/session-runtime-orchestrator.d.ts +339 -0
- package/dist/runtime/orchestration/session-runtime.d.ts +118 -0
- package/dist/runtime/orchestration/user-input-builder.d.ts +15 -0
- package/dist/runtime/process-start-token.d.ts +23 -0
- package/dist/runtime/safety/loop-detection.d.ts +160 -0
- package/dist/runtime/safety/mistake-tracker.d.ts +84 -0
- package/dist/runtime/safety/rules.d.ts +6 -0
- package/dist/runtime/safety/struggle-detector.d.ts +414 -0
- package/dist/runtime/safety/worker-struggle-stop.d.ts +20 -0
- package/dist/runtime/safety/worker-struggle.d.ts +166 -0
- package/dist/runtime/sandbox/agent-sandbox.d.ts +111 -0
- package/dist/runtime/sandbox/overlay-fs.d.ts +71 -0
- package/dist/runtime/sandbox/sandbox-binaries.d.ts +10 -0
- package/dist/runtime/tools/subprocess-sandbox-lifecycle.d.ts +9 -0
- package/dist/runtime/tools/subprocess-sandbox.d.ts +62 -0
- package/dist/runtime/tools/tool-approval.d.ts +9 -0
- package/dist/runtime/turn-queue/harness-notes.d.ts +18 -0
- package/dist/runtime/turn-queue/pending-prompt-service.d.ts +117 -0
- package/dist/services/agent-events.d.ts +59 -0
- package/dist/services/config.d.ts +2 -0
- package/dist/services/connectors/active-connectors.d.ts +2 -0
- package/dist/services/connectors/connector-autostart.d.ts +33 -0
- package/dist/services/connectors/connector-child-env.d.ts +14 -0
- package/dist/services/connectors/connector-cleanup.d.ts +20 -0
- package/dist/services/connectors/connector-supervisor.d.ts +134 -0
- package/dist/services/connectors/daemon-connector-reconnect.d.ts +15 -0
- package/dist/services/feature-flags/FeatureFlagsService.d.ts +49 -0
- package/dist/services/feature-flags/index.d.ts +2 -0
- package/dist/services/feature-flags/posthog.d.ts +24 -0
- package/dist/services/feature-flags/posthog.js +1 -0
- package/dist/services/feature-flags/providers.d.ts +7 -0
- package/dist/services/global-settings.d.ts +113 -0
- package/dist/services/llms/apihandler-agent-model-adapter.d.ts +26 -0
- package/dist/services/llms/cline-recommended-models.d.ts +62 -0
- package/dist/services/llms/configured-provider-registry.d.ts +27 -0
- package/dist/services/llms/handler-factory.d.ts +23 -0
- package/dist/services/llms/provider-defaults.d.ts +36 -0
- package/dist/services/llms/provider-settings.d.ts +420 -0
- package/dist/services/llms/runtime-config.d.ts +3 -0
- package/dist/services/llms/runtime-registry.d.ts +19 -0
- package/dist/services/llms/runtime-types.d.ts +84 -0
- package/dist/services/llms/session-budget.d.ts +88 -0
- package/dist/services/local-runtime-bootstrap.d.ts +62 -0
- package/dist/services/marketplace.d.ts +41 -0
- package/dist/services/mcp-install.d.ts +35 -0
- package/dist/services/plugin-install.d.ts +52 -0
- package/dist/services/plugin-mcp-settings.d.ts +31 -0
- package/dist/services/plugin-tools.d.ts +40 -0
- package/dist/services/plugin-uninstall.d.ts +13 -0
- package/dist/services/providers/local-provider-registry.d.ts +354 -0
- package/dist/services/providers/local-provider-service.d.ts +101 -0
- package/dist/services/providers/model-source.d.ts +3 -0
- package/dist/services/providers/provider-config-fields.d.ts +37 -0
- package/dist/services/providers/provider-readiness.d.ts +10 -0
- package/dist/services/session-artifacts.d.ts +18 -0
- package/dist/services/session-data.d.ts +61 -0
- package/dist/services/session-import/claude-code.d.ts +16 -0
- package/dist/services/session-import/codex.d.ts +34 -0
- package/dist/services/session-import/index.d.ts +6 -0
- package/dist/services/session-import/opencode.d.ts +25 -0
- package/dist/services/session-import/sanitize.d.ts +16 -0
- package/dist/services/session-import/service.d.ts +31 -0
- package/dist/services/session-import/types.d.ts +87 -0
- package/dist/services/session-telemetry.d.ts +15 -0
- package/dist/services/storage/file-team-store.d.ts +32 -0
- package/dist/services/storage/provider-settings-legacy-migration.d.ts +38 -0
- package/dist/services/storage/provider-settings-manager.d.ts +31 -0
- package/dist/services/storage/sqlite-session-store.d.ts +35 -0
- package/dist/services/storage/sqlite-team-store.d.ts +42 -0
- package/dist/services/storage/team-events-retention.d.ts +25 -0
- package/dist/services/storage/team-store.d.ts +16 -0
- package/dist/services/telemetry/ITelemetryAdapter.d.ts +54 -0
- package/dist/services/telemetry/OpenTelemetryAdapter.d.ts +43 -0
- package/dist/services/telemetry/OpenTelemetryProvider.d.ts +99 -0
- package/dist/services/telemetry/TelemetryLoggerSink.d.ts +27 -0
- package/dist/services/telemetry/TelemetryService.d.ts +40 -0
- package/dist/services/telemetry/core-events.d.ts +396 -0
- package/dist/services/telemetry/distinct-id.d.ts +2 -0
- package/dist/services/telemetry/index.d.ts +4 -0
- package/dist/services/telemetry/index.js +1 -0
- package/dist/services/usage.d.ts +19 -0
- package/dist/services/workspace/agent-schedules-workspace.d.ts +8 -0
- package/dist/services/workspace/chat-workspace.d.ts +9 -0
- package/dist/services/workspace/file-indexer.d.ts +5 -0
- package/dist/services/workspace/index.d.ts +6 -0
- package/dist/services/workspace/mention-enricher.d.ts +13 -0
- package/dist/services/workspace/workspace-manager.d.ts +27 -0
- package/dist/services/workspace/workspace-manifest.d.ts +42 -0
- package/dist/services/workspace/workspace-telemetry.d.ts +18 -0
- package/dist/session/checkpoint-diff.d.ts +25 -0
- package/dist/session/checkpoint-restore.d.ts +34 -0
- package/dist/session/display-messages.d.ts +28 -0
- package/dist/session/history-origin.d.ts +19 -0
- package/dist/session/models/session-compaction.d.ts +22 -0
- package/dist/session/models/session-graph.d.ts +15 -0
- package/dist/session/models/session-manifest.d.ts +32 -0
- package/dist/session/models/session-row.d.ts +107 -0
- package/dist/session/persisted-tool-result-content.d.ts +8 -0
- package/dist/session/search/index.d.ts +1 -0
- package/dist/session/search/session-history-search.d.ts +51 -0
- package/dist/session/services/file-session-service.d.ts +10 -0
- package/dist/session/services/message-builder.d.ts +208 -0
- package/dist/session/services/persistence-service.d.ts +92 -0
- package/dist/session/services/read-overlap.d.ts +40 -0
- package/dist/session/services/session-service.d.ts +15 -0
- package/dist/session/session-snapshot.d.ts +59 -0
- package/dist/session/session-versioning-service.d.ts +50 -0
- package/dist/session/stores/atomic-file.d.ts +1 -0
- package/dist/session/stores/conversation-store.d.ts +29 -0
- package/dist/session/stores/session-manifest-store.d.ts +49 -0
- package/dist/session/stores/team-persistence-store.d.ts +23 -0
- package/dist/session/team/index.d.ts +2 -0
- package/dist/session/team/team-child-session-manager.d.ts +35 -0
- package/dist/session/team/team-session-coordinator.d.ts +13 -0
- package/dist/session/user-run-messages.d.ts +20 -0
- package/dist/settings/index.d.ts +2 -0
- package/dist/settings/settings-service.d.ts +8 -0
- package/dist/settings/types.d.ts +83 -0
- package/dist/tasks/agenda-task-api.d.ts +20 -0
- package/dist/tasks/agenda-task-manager.d.ts +109 -0
- package/dist/tasks/agenda-task-tool.d.ts +94 -0
- package/dist/tasks/index.d.ts +9 -0
- package/dist/tasks/specs/task-spec-file-store.d.ts +38 -0
- package/dist/tasks/specs/task-spec-parser.d.ts +65 -0
- package/dist/tasks/store/sqlite-task-store.d.ts +73 -0
- package/dist/tasks/store/task-schema.d.ts +2 -0
- package/dist/tasks/task-location.d.ts +14 -0
- package/dist/tasks/task-tool.d.ts +143 -0
- package/dist/types/chat-schema.d.ts +194 -0
- package/dist/types/common.d.ts +35 -0
- package/dist/types/config.d.ts +994 -0
- package/dist/types/events.d.ts +102 -0
- package/dist/types/provider-settings.d.ts +29 -0
- package/dist/types/session.d.ts +187 -0
- package/dist/types/sessions.d.ts +42 -0
- package/dist/types/storage.d.ts +36 -0
- package/dist/types.d.ts +34 -0
- package/dist/version.d.ts +1 -0
- package/package.json +98 -0
- package/scripts/document-reader-assets.mjs +161 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { AgentTool, GatewayModelSelection, HubScheduleCreateInput, HubScheduleUpdateInput, ITelemetryService, ScheduleExecutionRecord, ScheduleRecord } from "@cerebriline/shared";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import type { ListSchedulesOptions } from "./schedule-service";
|
|
4
|
+
export declare const ScheduledTaskInputSchema: z.ZodObject<{
|
|
5
|
+
operation: z.ZodEnum<{
|
|
6
|
+
list: "list";
|
|
7
|
+
delete: "delete";
|
|
8
|
+
resume: "resume";
|
|
9
|
+
pause: "pause";
|
|
10
|
+
update: "update";
|
|
11
|
+
create: "create";
|
|
12
|
+
get: "get";
|
|
13
|
+
run_now: "run_now";
|
|
14
|
+
}>;
|
|
15
|
+
schedule_id: z.ZodOptional<z.ZodString>;
|
|
16
|
+
schedule_type: z.ZodOptional<z.ZodEnum<{
|
|
17
|
+
once: "once";
|
|
18
|
+
recurring: "recurring";
|
|
19
|
+
}>>;
|
|
20
|
+
name: z.ZodOptional<z.ZodString>;
|
|
21
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
22
|
+
run_at: z.ZodOptional<z.ZodString>;
|
|
23
|
+
cron_pattern: z.ZodOptional<z.ZodString>;
|
|
24
|
+
timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
25
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
27
|
+
plan: "plan";
|
|
28
|
+
act: "act";
|
|
29
|
+
yolo: "yolo";
|
|
30
|
+
}>>;
|
|
31
|
+
system_prompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
32
|
+
max_iterations: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
33
|
+
timeout_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
34
|
+
max_parallel: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36
|
+
model_selection: z.ZodOptional<z.ZodObject<{
|
|
37
|
+
provider_id: z.ZodString;
|
|
38
|
+
model_id: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
export type ScheduledTaskInput = z.infer<typeof ScheduledTaskInputSchema>;
|
|
43
|
+
export interface ScheduleSessionDefaults {
|
|
44
|
+
workspaceRoot: string;
|
|
45
|
+
cwd?: string;
|
|
46
|
+
modelSelection?: GatewayModelSelection;
|
|
47
|
+
interactive: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface AgentScheduleServiceApi {
|
|
50
|
+
createSchedule(input: HubScheduleCreateInput): ScheduleRecord;
|
|
51
|
+
getSchedule(scheduleId: string): ScheduleRecord | undefined;
|
|
52
|
+
listSchedules(options?: ListSchedulesOptions): ScheduleRecord[];
|
|
53
|
+
updateSchedule(scheduleId: string, updates: HubScheduleUpdateInput): ScheduleRecord | undefined;
|
|
54
|
+
deleteSchedule(scheduleId: string): boolean;
|
|
55
|
+
pauseSchedule(scheduleId: string): ScheduleRecord | undefined;
|
|
56
|
+
resumeSchedule(scheduleId: string): ScheduleRecord | undefined;
|
|
57
|
+
triggerScheduleNowDetached(scheduleId: string): ScheduleExecutionRecord | undefined;
|
|
58
|
+
}
|
|
59
|
+
export interface ScheduleTaskOperationOptions {
|
|
60
|
+
schedules: AgentScheduleServiceApi;
|
|
61
|
+
telemetry?: ITelemetryService;
|
|
62
|
+
resolveSessionDefaults: (sessionId: string) => Promise<ScheduleSessionDefaults | undefined>;
|
|
63
|
+
publish?: (event: "schedule.created" | "schedule.updated" | "schedule.deleted" | "schedule.triggered", payload: Record<string, unknown>, sessionId: string) => void;
|
|
64
|
+
}
|
|
65
|
+
export type ScheduledTaskResult = {
|
|
66
|
+
ok: true;
|
|
67
|
+
operation: ScheduledTaskInput["operation"];
|
|
68
|
+
schedule?: ScheduleRecord;
|
|
69
|
+
schedules?: ScheduleRecord[];
|
|
70
|
+
execution?: ScheduleExecutionRecord;
|
|
71
|
+
deleted?: boolean;
|
|
72
|
+
} | {
|
|
73
|
+
ok: false;
|
|
74
|
+
operation?: ScheduledTaskInput["operation"];
|
|
75
|
+
error: {
|
|
76
|
+
code: string;
|
|
77
|
+
message: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
/** Execute a scheduled-work operation through the Hub schedule service. */
|
|
81
|
+
export declare function executeScheduleOperation(options: ScheduleTaskOperationOptions, rawInput: unknown, context: Parameters<AgentTool<ScheduledTaskInput, ScheduledTaskResult>["execute"]>[1]): Promise<ScheduledTaskResult>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { CronSpecParseResult } from "@cerebriline/shared";
|
|
2
|
+
import { type ResolveCronSpecsDirOptions } from "@cerebriline/shared/storage";
|
|
3
|
+
import { type CronSpecRecord, type SqliteCronStore, type UpsertSpecResult } from "../store/sqlite-cron-store";
|
|
4
|
+
/**
|
|
5
|
+
* Scan the configured cron specs directory on disk, parse every file, and
|
|
6
|
+
* upsert spec state into the cron DB. This is the startup source of truth:
|
|
7
|
+
* watcher events are triggers to re-run reconciliation for one file, not a
|
|
8
|
+
* replacement.
|
|
9
|
+
*/
|
|
10
|
+
export interface CronReconcilerOptions {
|
|
11
|
+
store: SqliteCronStore;
|
|
12
|
+
/**
|
|
13
|
+
* Cron spec source location. Defaults to global `~/.cline/cron`.
|
|
14
|
+
* Pass `{ scope: "workspace", workspaceRoot }` later to enable
|
|
15
|
+
* workspace-level cron sources without changing reconciler internals.
|
|
16
|
+
*/
|
|
17
|
+
specs?: ResolveCronSpecsDirOptions;
|
|
18
|
+
/** @deprecated Use `specs: { scope: "workspace", workspaceRoot }`. */
|
|
19
|
+
workspaceRoot?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ReconcileChange {
|
|
22
|
+
relativePath: string;
|
|
23
|
+
result: UpsertSpecResult;
|
|
24
|
+
parse: CronSpecParseResult;
|
|
25
|
+
}
|
|
26
|
+
export interface ReconcileSummary {
|
|
27
|
+
scanned: number;
|
|
28
|
+
upserted: number;
|
|
29
|
+
invalidParses: number;
|
|
30
|
+
removed: number;
|
|
31
|
+
changes: ReconcileChange[];
|
|
32
|
+
}
|
|
33
|
+
export declare class CronReconciler {
|
|
34
|
+
private readonly store;
|
|
35
|
+
private readonly cronDir;
|
|
36
|
+
constructor(options: CronReconcilerOptions);
|
|
37
|
+
getCronDir(): string;
|
|
38
|
+
/**
|
|
39
|
+
* Reconcile every file under the cron specs directory into the DB and mark specs
|
|
40
|
+
* whose source files no longer exist as `removed=1`.
|
|
41
|
+
*/
|
|
42
|
+
reconcileAll(): Promise<ReconcileSummary>;
|
|
43
|
+
/**
|
|
44
|
+
* Reconcile a single file (absolute path). `relativePath` is expected to
|
|
45
|
+
* be POSIX-relative to the cron specs directory. Returns the reconciliation change
|
|
46
|
+
* or undefined if the file could not be read.
|
|
47
|
+
*/
|
|
48
|
+
reconcileFile(relativePath: string, absolutePath: string): Promise<ReconcileChange | undefined>;
|
|
49
|
+
/**
|
|
50
|
+
* Handle a file that disappeared from disk between reconciliations.
|
|
51
|
+
* Marks the spec as removed and cancels any queued runs for it.
|
|
52
|
+
*/
|
|
53
|
+
handleFileDeleted(spec: CronSpecRecord): void;
|
|
54
|
+
/**
|
|
55
|
+
* Refresh next_run_at for every enabled schedule spec.
|
|
56
|
+
* Used at startup to handle the "one overdue catch-up on startup then
|
|
57
|
+
* advance to next slot" policy.
|
|
58
|
+
*/
|
|
59
|
+
refreshScheduleNextRunAt(): void;
|
|
60
|
+
private applyScheduleNextRunAt;
|
|
61
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { CronSpecParseResult, CronTriggerKind } from "@cerebriline/shared";
|
|
2
|
+
/**
|
|
3
|
+
* Markdown frontmatter parser for `.cline/cron/*.md` automation specs.
|
|
4
|
+
*
|
|
5
|
+
* Lives in @cline/core because it depends on `yaml`. The spec types
|
|
6
|
+
* themselves live in @cline/shared so other packages can consume them
|
|
7
|
+
* without pulling in a YAML parser.
|
|
8
|
+
*
|
|
9
|
+
* The parser never throws for a single bad file — it produces a
|
|
10
|
+
* `CronSpecParseResult` with an `error` message so the reconciler can record
|
|
11
|
+
* `parse_status='invalid'` durably instead of dropping state.
|
|
12
|
+
*/
|
|
13
|
+
export declare function inferTriggerKindFromPath(relativePath: string): CronTriggerKind;
|
|
14
|
+
export declare function splitFrontmatter(raw: string): {
|
|
15
|
+
frontmatter: string | undefined;
|
|
16
|
+
body: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function computeContentHash(frontmatterJson: unknown, body: string): string;
|
|
19
|
+
export interface ParseCronSpecInput {
|
|
20
|
+
relativePath: string;
|
|
21
|
+
raw: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Parse a single cron spec file. Never throws; always returns a result.
|
|
25
|
+
*/
|
|
26
|
+
export declare function parseCronSpecFile(input: ParseCronSpecInput): CronSpecParseResult;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { CronReconciler } from "./cron-reconciler";
|
|
2
|
+
export interface CronWatcherOptions {
|
|
3
|
+
reconciler: CronReconciler;
|
|
4
|
+
debounceMs?: number;
|
|
5
|
+
onError?: (error: unknown) => void;
|
|
6
|
+
onReconciled?: () => void | Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export declare class CronWatcher {
|
|
9
|
+
private readonly reconciler;
|
|
10
|
+
private readonly debounceMs;
|
|
11
|
+
private readonly onError;
|
|
12
|
+
private readonly onReconciled;
|
|
13
|
+
private watcher?;
|
|
14
|
+
private readonly pending;
|
|
15
|
+
private disposed;
|
|
16
|
+
constructor(options: CronWatcherOptions);
|
|
17
|
+
start(): void;
|
|
18
|
+
stop(): void;
|
|
19
|
+
dispose(): void;
|
|
20
|
+
private scheduleReconcile;
|
|
21
|
+
private reconcileNow;
|
|
22
|
+
}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { type AutomationEventEnvelope, type CronSpec, type CronSpecExtensionKind, type CronTriggerKind, type HubScheduleCreateInput, type HubScheduleUpdateInput } from "@cerebriline/shared";
|
|
2
|
+
/**
|
|
3
|
+
* Generalized cron/automation store backed by `cron.db`. Sessions stay in
|
|
4
|
+
* their own database (see @cline/shared `ensureSessionSchema`). cron_runs
|
|
5
|
+
* here absorb one-off, recurring, and event-driven work under one queue.
|
|
6
|
+
*/
|
|
7
|
+
export type CronRunStatus = "queued" | "running" | "done" | "failed" | "cancelled";
|
|
8
|
+
export type CronRunTriggerKind = "one_off" | "schedule" | "event" | "manual" | "retry";
|
|
9
|
+
export type CronParseStatus = "valid" | "invalid";
|
|
10
|
+
export type CronEventProcessingStatus = "received" | "unmatched" | "queued" | "suppressed" | "failed";
|
|
11
|
+
export interface CronSpecRecord {
|
|
12
|
+
specId: string;
|
|
13
|
+
externalId: string;
|
|
14
|
+
sourcePath: string;
|
|
15
|
+
triggerKind: CronTriggerKind;
|
|
16
|
+
sourceMtimeMs?: number;
|
|
17
|
+
sourceHash?: string;
|
|
18
|
+
parseStatus: CronParseStatus;
|
|
19
|
+
parseError?: string;
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
removed: boolean;
|
|
22
|
+
title: string;
|
|
23
|
+
prompt?: string;
|
|
24
|
+
workspaceRoot?: string;
|
|
25
|
+
scheduleExpr?: string;
|
|
26
|
+
timezone?: string;
|
|
27
|
+
eventType?: string;
|
|
28
|
+
filters?: Record<string, unknown>;
|
|
29
|
+
debounceSeconds?: number;
|
|
30
|
+
dedupeWindowSeconds?: number;
|
|
31
|
+
cooldownSeconds?: number;
|
|
32
|
+
mode?: string;
|
|
33
|
+
systemPrompt?: string;
|
|
34
|
+
providerId?: string;
|
|
35
|
+
modelId?: string;
|
|
36
|
+
maxIterations?: number;
|
|
37
|
+
timeoutSeconds?: number;
|
|
38
|
+
maxParallel?: number;
|
|
39
|
+
tools?: string[];
|
|
40
|
+
notesDirectory?: string;
|
|
41
|
+
extensions?: CronSpecExtensionKind[];
|
|
42
|
+
source?: string;
|
|
43
|
+
tags?: string[];
|
|
44
|
+
metadata?: Record<string, unknown>;
|
|
45
|
+
revision: number;
|
|
46
|
+
lastMaterializedRunId?: string;
|
|
47
|
+
lastRunAt?: string;
|
|
48
|
+
nextRunAt?: string;
|
|
49
|
+
createdAt: string;
|
|
50
|
+
updatedAt: string;
|
|
51
|
+
}
|
|
52
|
+
export interface CronRunRecord {
|
|
53
|
+
runId: string;
|
|
54
|
+
specId: string;
|
|
55
|
+
specRevision: number;
|
|
56
|
+
triggerKind: CronRunTriggerKind;
|
|
57
|
+
status: CronRunStatus;
|
|
58
|
+
claimToken?: string;
|
|
59
|
+
claimStartedAt?: string;
|
|
60
|
+
claimUntilAt?: string;
|
|
61
|
+
scheduledFor?: string;
|
|
62
|
+
triggerEventId?: string;
|
|
63
|
+
startedAt?: string;
|
|
64
|
+
completedAt?: string;
|
|
65
|
+
sessionId?: string;
|
|
66
|
+
reportPath?: string;
|
|
67
|
+
error?: string;
|
|
68
|
+
attemptCount: number;
|
|
69
|
+
createdAt: string;
|
|
70
|
+
updatedAt: string;
|
|
71
|
+
}
|
|
72
|
+
export interface CronEventLogRecord {
|
|
73
|
+
eventId: string;
|
|
74
|
+
eventType: string;
|
|
75
|
+
source: string;
|
|
76
|
+
subject?: string;
|
|
77
|
+
occurredAt: string;
|
|
78
|
+
receivedAt: string;
|
|
79
|
+
workspaceRoot?: string;
|
|
80
|
+
dedupeKey?: string;
|
|
81
|
+
payload?: Record<string, unknown>;
|
|
82
|
+
attributes?: Record<string, unknown>;
|
|
83
|
+
processingStatus: CronEventProcessingStatus;
|
|
84
|
+
matchedSpecCount: number;
|
|
85
|
+
queuedRunCount: number;
|
|
86
|
+
suppressedCount: number;
|
|
87
|
+
error?: string;
|
|
88
|
+
createdAt: string;
|
|
89
|
+
updatedAt: string;
|
|
90
|
+
}
|
|
91
|
+
export interface UpsertSpecInput {
|
|
92
|
+
externalId: string;
|
|
93
|
+
sourcePath: string;
|
|
94
|
+
triggerKind: CronTriggerKind;
|
|
95
|
+
sourceMtimeMs?: number;
|
|
96
|
+
sourceHash: string;
|
|
97
|
+
parseStatus: CronParseStatus;
|
|
98
|
+
parseError?: string;
|
|
99
|
+
spec?: CronSpec;
|
|
100
|
+
}
|
|
101
|
+
export interface UpsertSpecResult {
|
|
102
|
+
record: CronSpecRecord;
|
|
103
|
+
created: boolean;
|
|
104
|
+
revisionChanged: boolean;
|
|
105
|
+
}
|
|
106
|
+
export interface SqliteCronStoreOptions {
|
|
107
|
+
dbPath?: string;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* DB-native hub schedules (created via the schedule tools/UI) live only in
|
|
111
|
+
* cron.db under a virtual sourcePath that never exists on disk. File-backed
|
|
112
|
+
* specs can spoof `source: hub-schedule` in frontmatter — even inside a
|
|
113
|
+
* physical `hub/schedules/` directory — but reconciliation always records
|
|
114
|
+
* their source file's mtime, which DB-native rows never have. All three
|
|
115
|
+
* markers are required to identify a DB-native hub schedule.
|
|
116
|
+
*/
|
|
117
|
+
export declare function isHubManagedSpec(spec: Pick<CronSpecRecord, "source" | "sourcePath" | "sourceMtimeMs">): boolean;
|
|
118
|
+
export interface ListSpecsOptions {
|
|
119
|
+
triggerKind?: CronTriggerKind;
|
|
120
|
+
enabled?: boolean;
|
|
121
|
+
parseStatus?: CronParseStatus;
|
|
122
|
+
includeRemoved?: boolean;
|
|
123
|
+
limit?: number;
|
|
124
|
+
}
|
|
125
|
+
export interface ListRunsOptions {
|
|
126
|
+
specId?: string;
|
|
127
|
+
status?: CronRunStatus | CronRunStatus[];
|
|
128
|
+
limit?: number;
|
|
129
|
+
}
|
|
130
|
+
export interface ClaimRunOptions {
|
|
131
|
+
nowIso: string;
|
|
132
|
+
leaseMs: number;
|
|
133
|
+
limit?: number;
|
|
134
|
+
}
|
|
135
|
+
export interface ClaimedCronRun {
|
|
136
|
+
run: CronRunRecord;
|
|
137
|
+
claimToken: string;
|
|
138
|
+
claimUntilAt: string;
|
|
139
|
+
}
|
|
140
|
+
interface ClaimBoundUpdate {
|
|
141
|
+
runId: string;
|
|
142
|
+
claimToken: string;
|
|
143
|
+
}
|
|
144
|
+
export interface MaterializeScheduleRunResult {
|
|
145
|
+
queued: boolean;
|
|
146
|
+
run?: CronRunRecord;
|
|
147
|
+
nextRunAt?: string;
|
|
148
|
+
}
|
|
149
|
+
export interface EnqueueRunInput {
|
|
150
|
+
specId: string;
|
|
151
|
+
specRevision: number;
|
|
152
|
+
triggerKind: CronRunTriggerKind;
|
|
153
|
+
scheduledFor?: string;
|
|
154
|
+
triggerEventId?: string;
|
|
155
|
+
}
|
|
156
|
+
export interface InsertEventLogResult {
|
|
157
|
+
record: CronEventLogRecord;
|
|
158
|
+
created: boolean;
|
|
159
|
+
}
|
|
160
|
+
export interface ListEventLogsOptions {
|
|
161
|
+
eventType?: string;
|
|
162
|
+
source?: string;
|
|
163
|
+
processingStatus?: CronEventProcessingStatus;
|
|
164
|
+
limit?: number;
|
|
165
|
+
}
|
|
166
|
+
export declare class SqliteCronStore {
|
|
167
|
+
private readonly db;
|
|
168
|
+
constructor(options?: SqliteCronStoreOptions);
|
|
169
|
+
close(): void;
|
|
170
|
+
getSpecBySourcePath(sourcePath: string): CronSpecRecord | undefined;
|
|
171
|
+
getSpec(specId: string): CronSpecRecord | undefined;
|
|
172
|
+
getSpecByExternalId(externalId: string): CronSpecRecord | undefined;
|
|
173
|
+
listSpecs(options?: ListSpecsOptions): CronSpecRecord[];
|
|
174
|
+
createHubSchedule(input: HubScheduleCreateInput): CronSpecRecord;
|
|
175
|
+
getHubSchedule(scheduleId: string): CronSpecRecord | undefined;
|
|
176
|
+
listHubSchedules(options?: {
|
|
177
|
+
enabled?: boolean;
|
|
178
|
+
limit?: number;
|
|
179
|
+
tags?: string[];
|
|
180
|
+
workspaceRoot?: string;
|
|
181
|
+
}): CronSpecRecord[];
|
|
182
|
+
updateHubSchedule(scheduleId: string, updates: HubScheduleUpdateInput): CronSpecRecord | undefined;
|
|
183
|
+
private initializeHubScheduleNextRun;
|
|
184
|
+
deleteHubSchedule(scheduleId: string): boolean;
|
|
185
|
+
enqueueHubScheduleRun(scheduleId: string, triggerKind?: "manual" | "retry"): CronRunRecord | undefined;
|
|
186
|
+
private consumeOneOffWithManualRun;
|
|
187
|
+
listEventSpecsForType(eventType: string): CronSpecRecord[];
|
|
188
|
+
upsertSpec(input: UpsertSpecInput): UpsertSpecResult;
|
|
189
|
+
private insertSpecRow;
|
|
190
|
+
private updateSpecRow;
|
|
191
|
+
markSpecRemoved(specId: string): void;
|
|
192
|
+
updateSpecNextRunAt(specId: string, nextRunAt: string | undefined): void;
|
|
193
|
+
updateSpecLastRunAt(specId: string, lastRunAt: string): void;
|
|
194
|
+
updateLastMaterializedRunId(specId: string, runId: string): void;
|
|
195
|
+
private initializeScheduleNextRun;
|
|
196
|
+
materializeDueScheduleRun(options: {
|
|
197
|
+
specId: string;
|
|
198
|
+
nowMs: number;
|
|
199
|
+
}): MaterializeScheduleRunResult;
|
|
200
|
+
getRun(runId: string): CronRunRecord | undefined;
|
|
201
|
+
/**
|
|
202
|
+
* 1-based position of a run among every run ever created for its spec,
|
|
203
|
+
* in creation order. Counts runs of every status (including cancelled and
|
|
204
|
+
* failed ones) so the number is stable: a later cancellation never shifts
|
|
205
|
+
* the numbers already stamped onto earlier sessions. Returns undefined
|
|
206
|
+
* for an unknown run.
|
|
207
|
+
*/
|
|
208
|
+
getRunOrdinal(runId: string): number | undefined;
|
|
209
|
+
insertEventLog(event: AutomationEventEnvelope, options?: {
|
|
210
|
+
receivedAtIso?: string;
|
|
211
|
+
}): InsertEventLogResult;
|
|
212
|
+
getEventLog(eventId: string): CronEventLogRecord | undefined;
|
|
213
|
+
listEventLogs(options?: ListEventLogsOptions): CronEventLogRecord[];
|
|
214
|
+
updateEventLogProcessing(eventId: string, update: {
|
|
215
|
+
status: CronEventProcessingStatus;
|
|
216
|
+
matchedSpecCount?: number;
|
|
217
|
+
queuedRunCount?: number;
|
|
218
|
+
suppressedCount?: number;
|
|
219
|
+
error?: string;
|
|
220
|
+
}): boolean;
|
|
221
|
+
listRuns(options?: ListRunsOptions): CronRunRecord[];
|
|
222
|
+
hasRecentEventRunForDedupe(options: {
|
|
223
|
+
specId: string;
|
|
224
|
+
dedupeKey: string;
|
|
225
|
+
sinceIso: string;
|
|
226
|
+
}): boolean;
|
|
227
|
+
hasRecentEventRunForSpec(options: {
|
|
228
|
+
specId: string;
|
|
229
|
+
sinceIso: string;
|
|
230
|
+
}): boolean;
|
|
231
|
+
findQueuedEventRunForDedupe(options: {
|
|
232
|
+
specId: string;
|
|
233
|
+
dedupeKey: string;
|
|
234
|
+
}): CronRunRecord | undefined;
|
|
235
|
+
updateQueuedEventRunForDebounce(options: {
|
|
236
|
+
runId: string;
|
|
237
|
+
triggerEventId: string;
|
|
238
|
+
scheduledFor: string;
|
|
239
|
+
}): CronRunRecord | undefined;
|
|
240
|
+
hasConsumedOneOffRevision(specId: string, revision: number): boolean;
|
|
241
|
+
enqueueRun(input: EnqueueRunInput): CronRunRecord;
|
|
242
|
+
cancelQueuedRunsForSpec(specId: string): number;
|
|
243
|
+
private cancelQueuedOneOffRunsForSpec;
|
|
244
|
+
claimDueRuns(options: ClaimRunOptions): ClaimedCronRun[];
|
|
245
|
+
renewClaim(runId: string, claimToken: string, leaseUntilAt: string): boolean;
|
|
246
|
+
completeRun(runId: string, update: {
|
|
247
|
+
status: "done" | "failed" | "cancelled";
|
|
248
|
+
sessionId?: string;
|
|
249
|
+
reportPath?: string;
|
|
250
|
+
error?: string;
|
|
251
|
+
completedAtIso?: string;
|
|
252
|
+
claimToken?: string;
|
|
253
|
+
}): boolean;
|
|
254
|
+
requeueRun(update: ClaimBoundUpdate & {
|
|
255
|
+
error?: string;
|
|
256
|
+
scheduledFor?: string;
|
|
257
|
+
}): boolean;
|
|
258
|
+
attachSessionIdToRun(runId: string, sessionId: string): void;
|
|
259
|
+
attachReportPathToRun(runId: string, reportPath: string): void;
|
|
260
|
+
}
|
|
261
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface AgentSkillMetadata {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
license?: string;
|
|
5
|
+
compatibility?: string;
|
|
6
|
+
metadata?: Record<string, string>;
|
|
7
|
+
"allowed-tools"?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ParsedAgentSkill {
|
|
10
|
+
metadata: AgentSkillMetadata;
|
|
11
|
+
instructions: string;
|
|
12
|
+
frontmatter: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Parse and validate one Agent Skills specification `SKILL.md` document.
|
|
16
|
+
*
|
|
17
|
+
* Cline's own skill files intentionally remain backwards-compatible and more
|
|
18
|
+
* permissive. Agent Plugin skills go through this strict path because the
|
|
19
|
+
* Agent Plugins contract requires an invalid skill to be skipped in isolation.
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseAgentSkillMarkdown(content: string, directoryName: string): ParsedAgentSkill;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { AgentSkillMetadata, ParsedAgentSkill } from "./agent-skill";
|
|
2
|
+
export { parseAgentSkillMarkdown } from "./agent-skill";
|
|
3
|
+
export { AGENT_PLUGINS_V1_MANIFEST_SCHEMA, AGENT_PLUGINS_V1_MCP_SCHEMA, getAgentPluginPackageDisplayName, loadAgentPluginPackages, } from "./loader";
|
|
4
|
+
export type { AgentPluginPackageDiagnostic, AgentPluginPackageDiagnosticScope, AgentPluginPackageLoadReport, AgentPluginPackageManifest, AgentPluginPackageMcpServer, AgentPluginPackageSkill, LoadAgentPluginPackagesOptions, LoadedAgentPluginPackage, } from "./types";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AgentPluginPackageLoadReport, LoadAgentPluginPackagesOptions } from "./types";
|
|
2
|
+
export declare const AGENT_PLUGINS_V1_MANIFEST_SCHEMA = "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json";
|
|
3
|
+
export declare const AGENT_PLUGINS_V1_MCP_SCHEMA = "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json";
|
|
4
|
+
/**
|
|
5
|
+
* Discover and load Agent Plugins v1 from runtime-host-local filesystem paths.
|
|
6
|
+
* No schema is fetched over the network: canonical identifiers select the
|
|
7
|
+
* validation code bundled with this SDK build.
|
|
8
|
+
*/
|
|
9
|
+
export declare function loadAgentPluginPackages(options?: LoadAgentPluginPackagesOptions): Promise<AgentPluginPackageLoadReport>;
|
|
10
|
+
export declare function getAgentPluginPackageDisplayName(path: string): string;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { McpServerRegistration } from "../mcp";
|
|
2
|
+
import type { AgentSkillMetadata } from "./agent-skill";
|
|
3
|
+
export interface AgentPluginPackageManifest {
|
|
4
|
+
$schema: string;
|
|
5
|
+
name: string;
|
|
6
|
+
version?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
author?: {
|
|
9
|
+
name?: string;
|
|
10
|
+
email?: string;
|
|
11
|
+
url?: string;
|
|
12
|
+
};
|
|
13
|
+
homepage?: string;
|
|
14
|
+
repository?: string;
|
|
15
|
+
license?: string;
|
|
16
|
+
keywords?: string[];
|
|
17
|
+
extensions?: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
export interface AgentPluginPackageSkill {
|
|
20
|
+
pluginName: string;
|
|
21
|
+
pluginRoot: string;
|
|
22
|
+
directoryPath: string;
|
|
23
|
+
filePath: string;
|
|
24
|
+
metadata: AgentSkillMetadata;
|
|
25
|
+
}
|
|
26
|
+
export interface AgentPluginPackageMcpServer {
|
|
27
|
+
pluginName: string;
|
|
28
|
+
pluginRoot: string;
|
|
29
|
+
pluginDataPath?: string;
|
|
30
|
+
serverName: string;
|
|
31
|
+
registration: McpServerRegistration;
|
|
32
|
+
}
|
|
33
|
+
export type AgentPluginPackageDiagnosticScope = "plugin" | "manifest" | "skills" | "skill" | "mcp" | "mcp-server";
|
|
34
|
+
export interface AgentPluginPackageDiagnostic {
|
|
35
|
+
level: "warning" | "error";
|
|
36
|
+
scope: AgentPluginPackageDiagnosticScope;
|
|
37
|
+
pluginPath: string;
|
|
38
|
+
pluginName?: string;
|
|
39
|
+
componentPath?: string;
|
|
40
|
+
componentName?: string;
|
|
41
|
+
message: string;
|
|
42
|
+
}
|
|
43
|
+
export interface LoadedAgentPluginPackage {
|
|
44
|
+
rootPath: string;
|
|
45
|
+
manifestPath: string;
|
|
46
|
+
manifest: AgentPluginPackageManifest;
|
|
47
|
+
skills: AgentPluginPackageSkill[];
|
|
48
|
+
mcpServers: AgentPluginPackageMcpServer[];
|
|
49
|
+
}
|
|
50
|
+
export interface AgentPluginPackageLoadReport {
|
|
51
|
+
plugins: LoadedAgentPluginPackage[];
|
|
52
|
+
skills: AgentPluginPackageSkill[];
|
|
53
|
+
mcpServers: AgentPluginPackageMcpServer[];
|
|
54
|
+
diagnostics: AgentPluginPackageDiagnostic[];
|
|
55
|
+
}
|
|
56
|
+
export interface LoadAgentPluginPackagesOptions {
|
|
57
|
+
/** Explicit plugin roots, resolved on the runtime host relative to `cwd`. */
|
|
58
|
+
pluginPaths?: ReadonlyArray<string>;
|
|
59
|
+
/** Base directory for resolving relative explicit plugin paths. */
|
|
60
|
+
cwd?: string;
|
|
61
|
+
/** Override automatic search roots. Primarily useful to embedded hosts/tests. */
|
|
62
|
+
searchPaths?: ReadonlyArray<string>;
|
|
63
|
+
/** Override the client-managed persistent Agent Plugin data root. */
|
|
64
|
+
pluginDataRoot?: string;
|
|
65
|
+
/** Manifest names disabled by the runtime host. Disabled names still reserve precedence. */
|
|
66
|
+
disabledPluginNames?: ReadonlyArray<string>;
|
|
67
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loading a tree-sitter grammar, lazily and never fatally.
|
|
3
|
+
*
|
|
4
|
+
* The whole grammar set ships -- 50 MB of `tree-sitter-wasms`, which is a
|
|
5
|
+
* deliberate choice over a curated subset: a subset means picking the languages
|
|
6
|
+
* that matter now, and the first file in an unpicked language reads as "no
|
|
7
|
+
* complexity" rather than "not measured". Nothing is loaded until a file in
|
|
8
|
+
* that language is actually asked about, so the cost is disk rather than
|
|
9
|
+
* memory or start-up.
|
|
10
|
+
*
|
|
11
|
+
* Every failure path here answers `undefined`, which callers must treat as *no
|
|
12
|
+
* input* rather than as a complexity of zero. A missing wasm, a runtime that
|
|
13
|
+
* cannot instantiate it, a language nothing ships a grammar for: all of them
|
|
14
|
+
* mean the same thing, and none of them is evidence about the code.
|
|
15
|
+
*/
|
|
16
|
+
/** Whether a grammar exists for this file at all. */
|
|
17
|
+
export declare function grammarFor(filePath: string): string | undefined;
|
|
18
|
+
/** The minimum of web-tree-sitter this module uses, so tests can stand in. */
|
|
19
|
+
export interface ParsedTree {
|
|
20
|
+
rootNode: SyntaxNode;
|
|
21
|
+
/** Trees live in wasm memory too, and are freed the same way. */
|
|
22
|
+
delete?(): void;
|
|
23
|
+
}
|
|
24
|
+
export interface SyntaxNode {
|
|
25
|
+
readonly type: string;
|
|
26
|
+
/**
|
|
27
|
+
* Whether anything under this node failed to parse.
|
|
28
|
+
*
|
|
29
|
+
* Read on the root, where it is the difference between a tree that can be
|
|
30
|
+
* scored and one that cannot. See `scoreComplexity`, which answers nothing
|
|
31
|
+
* for a tree that has it.
|
|
32
|
+
*/
|
|
33
|
+
readonly hasError?: boolean;
|
|
34
|
+
readonly startPosition: {
|
|
35
|
+
row: number;
|
|
36
|
+
column: number;
|
|
37
|
+
};
|
|
38
|
+
readonly endPosition: {
|
|
39
|
+
row: number;
|
|
40
|
+
column: number;
|
|
41
|
+
};
|
|
42
|
+
readonly childCount: number;
|
|
43
|
+
child(index: number): SyntaxNode | null;
|
|
44
|
+
childForFieldName(name: string): SyntaxNode | null;
|
|
45
|
+
readonly text: string;
|
|
46
|
+
}
|
|
47
|
+
export interface ParserLike {
|
|
48
|
+
setLanguage(language: unknown): void;
|
|
49
|
+
parse(source: string): ParsedTree | null;
|
|
50
|
+
/** web-tree-sitter holds parsers in wasm memory and frees none of them. */
|
|
51
|
+
delete?(): void;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Where the wasm files are. Three places, in the order a host would want.
|
|
55
|
+
*
|
|
56
|
+
* `createRequire` rather than a bundler import: the grammars are data the
|
|
57
|
+
* runtime reads, not modules, and a bundler asked to inline 50 MB of wasm
|
|
58
|
+
* produces a bundle nobody can ship.
|
|
59
|
+
*
|
|
60
|
+
* The middle case is the shipped one. A bundled host has no `node_modules` to
|
|
61
|
+
* resolve against, so the build copies the grammars to a `grammars/` directory
|
|
62
|
+
* beside the bundle and this finds them there -- by looking, not by being told.
|
|
63
|
+
* Being told was the alternative and it is the weaker design: a `grammarDir`
|
|
64
|
+
* threaded through the runtime config is a field every layer has to remember to
|
|
65
|
+
* copy, and the failure when one does not is this feature going quiet rather
|
|
66
|
+
* than anything breaking. The explicit option stays for a host that puts them
|
|
67
|
+
* somewhere else entirely.
|
|
68
|
+
*/
|
|
69
|
+
export declare function resolveGrammarPath(grammar: string, grammarDir?: string,
|
|
70
|
+
/** The bundle's directory. A parameter so a test can be somewhere else. */
|
|
71
|
+
besideDir?: string): string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* A parser for this file's language, or nothing.
|
|
74
|
+
*
|
|
75
|
+
* Nothing is a normal answer and is never an error the caller has to handle as
|
|
76
|
+
* one: the complexity input is optional everywhere it is read.
|
|
77
|
+
*/
|
|
78
|
+
export declare function parserFor(filePath: string, options?: {
|
|
79
|
+
grammarDir?: string;
|
|
80
|
+
}): Promise<ParserLike | undefined>;
|
|
81
|
+
/**
|
|
82
|
+
* A parser for a grammar named directly, rather than inferred from a path.
|
|
83
|
+
*
|
|
84
|
+
* The embedded-language pass needs this: the `<script>` bodies inside an HTML
|
|
85
|
+
* file are JavaScript, and there is no filename to infer that from. Same
|
|
86
|
+
* caching, same silence on every failure.
|
|
87
|
+
*/
|
|
88
|
+
export declare function parserForGrammar(grammar: string, options?: {
|
|
89
|
+
grammarDir?: string;
|
|
90
|
+
}): Promise<ParserLike | undefined>;
|
|
91
|
+
/** Drop the cached grammars. For tests, and for a host that swaps the directory. */
|
|
92
|
+
export declare function forgetGrammars(): void;
|