typeclaw 0.49.0 → 0.51.0
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/dist/types/agent/attention-escalation.d.ts +18 -0
- package/dist/types/agent/auth.d.ts +7 -0
- package/dist/types/agent/bash-sandbox-env.d.ts +15 -0
- package/dist/types/agent/bash-sandbox-proc.d.ts +8 -0
- package/dist/types/agent/bash-sandbox.d.ts +94 -0
- package/dist/types/agent/compaction.d.ts +8 -0
- package/dist/types/agent/git-nudge.d.ts +6 -0
- package/dist/types/agent/guard-types.d.ts +25 -0
- package/dist/types/agent/guards.d.ts +7 -0
- package/dist/types/agent/idle-compaction.d.ts +8 -0
- package/dist/types/agent/index.d.ts +151 -0
- package/dist/types/agent/live-subagents.d.ts +113 -0
- package/dist/types/agent/llm-replay-sanitizer.d.ts +11 -0
- package/dist/types/agent/loop-guard.d.ts +67 -0
- package/dist/types/agent/model-fallback.d.ts +29 -0
- package/dist/types/agent/model-overrides.d.ts +8 -0
- package/dist/types/agent/multimodal/index.d.ts +2 -0
- package/dist/types/agent/multimodal/look-at.d.ts +60 -0
- package/dist/types/agent/multimodal/looker.d.ts +61 -0
- package/dist/types/agent/multimodal/read-redirect.d.ts +6 -0
- package/dist/types/agent/network/response-body.d.ts +1 -0
- package/dist/types/agent/network/safe-http.d.ts +46 -0
- package/dist/types/agent/output-allowance.d.ts +4 -0
- package/dist/types/agent/plugin-tools.d.ts +58 -0
- package/dist/types/agent/proactive-next-step-nudge.d.ts +2 -0
- package/dist/types/agent/prompt-cache-key.d.ts +3 -0
- package/dist/types/agent/provider-error.d.ts +23 -0
- package/dist/types/agent/reload-tool.d.ts +10 -0
- package/dist/types/agent/restart/index.d.ts +31 -0
- package/dist/types/agent/restart-handoff/index.d.ts +32 -0
- package/dist/types/agent/restart-handoff/paths.d.ts +1 -0
- package/dist/types/agent/retry-same-ref.d.ts +41 -0
- package/dist/types/agent/reviewer-activity.d.ts +3 -0
- package/dist/types/agent/reviewer-bash-policy.d.ts +8 -0
- package/dist/types/agent/self.d.ts +1 -0
- package/dist/types/agent/session-meta.d.ts +28 -0
- package/dist/types/agent/session-origin.d.ts +65 -0
- package/dist/types/agent/subagent-cache-keepalive.d.ts +38 -0
- package/dist/types/agent/subagent-completion-reminder.d.ts +29 -0
- package/dist/types/agent/subagent-drain.d.ts +25 -0
- package/dist/types/agent/subagent-session.d.ts +3 -0
- package/dist/types/agent/subagents.d.ts +153 -0
- package/dist/types/agent/system-prompt-composition.d.ts +17 -0
- package/dist/types/agent/system-prompt.d.ts +7 -0
- package/dist/types/agent/throttle-circuit.d.ts +25 -0
- package/dist/types/agent/todo/continuation-policy.d.ts +54 -0
- package/dist/types/agent/todo/continuation-state.d.ts +11 -0
- package/dist/types/agent/todo/continuation-wiring.d.ts +32 -0
- package/dist/types/agent/todo/continuation.d.ts +21 -0
- package/dist/types/agent/todo/scope.d.ts +6 -0
- package/dist/types/agent/todo/store.d.ts +16 -0
- package/dist/types/agent/tool-error-remediation.d.ts +1 -0
- package/dist/types/agent/tool-file-safety.d.ts +78 -0
- package/dist/types/agent/tool-not-found-nudge.d.ts +9 -0
- package/dist/types/agent/tool-result-budget.d.ts +15 -0
- package/dist/types/agent/tools/channel-disengage.d.ts +18 -0
- package/dist/types/agent/tools/channel-edit.d.ts +19 -0
- package/dist/types/agent/tools/channel-fetch-attachment.d.ts +36 -0
- package/dist/types/agent/tools/channel-handoff.d.ts +13 -0
- package/dist/types/agent/tools/channel-history-render.d.ts +3 -0
- package/dist/types/agent/tools/channel-history.d.ts +25 -0
- package/dist/types/agent/tools/channel-log.d.ts +5 -0
- package/dist/types/agent/tools/channel-react.d.ts +23 -0
- package/dist/types/agent/tools/channel-read.d.ts +27 -0
- package/dist/types/agent/tools/channel-reply.d.ts +47 -0
- package/dist/types/agent/tools/channel-send.d.ts +42 -0
- package/dist/types/agent/tools/channel-session-search.d.ts +10 -0
- package/dist/types/agent/tools/curl-impersonate.d.ts +37 -0
- package/dist/types/agent/tools/ddg.d.ts +27 -0
- package/dist/types/agent/tools/grant-role.d.ts +25 -0
- package/dist/types/agent/tools/keyed-semaphore.d.ts +10 -0
- package/dist/types/agent/tools/post-github-review.d.ts +38 -0
- package/dist/types/agent/tools/restart.d.ts +25 -0
- package/dist/types/agent/tools/runtime-notice.d.ts +3 -0
- package/dist/types/agent/tools/search-retry.d.ts +16 -0
- package/dist/types/agent/tools/skip-response.d.ts +17 -0
- package/dist/types/agent/tools/spawn-subagent.d.ts +77 -0
- package/dist/types/agent/tools/stream-snapshot.d.ts +23 -0
- package/dist/types/agent/tools/subagent-access.d.ts +20 -0
- package/dist/types/agent/tools/subagent-cancel.d.ts +23 -0
- package/dist/types/agent/tools/subagent-output.d.ts +50 -0
- package/dist/types/agent/tools/todo/index.d.ts +14 -0
- package/dist/types/agent/tools/webfetch/adaptive-html.d.ts +29 -0
- package/dist/types/agent/tools/webfetch/fetch.d.ts +26 -0
- package/dist/types/agent/tools/webfetch/html-lexical.d.ts +27 -0
- package/dist/types/agent/tools/webfetch/index.d.ts +1 -0
- package/dist/types/agent/tools/webfetch/inline-style-visibility.d.ts +3 -0
- package/dist/types/agent/tools/webfetch/strategies/grep.d.ts +11 -0
- package/dist/types/agent/tools/webfetch/strategies/jq.d.ts +4 -0
- package/dist/types/agent/tools/webfetch/strategies/raw.d.ts +1 -0
- package/dist/types/agent/tools/webfetch/strategies/readability.d.ts +16 -0
- package/dist/types/agent/tools/webfetch/strategies/selector.d.ts +4 -0
- package/dist/types/agent/tools/webfetch/strategies/snapshot.d.ts +1 -0
- package/dist/types/agent/tools/webfetch/tool.d.ts +15 -0
- package/dist/types/agent/tools/webfetch/types.d.ts +32 -0
- package/dist/types/agent/tools/websearch.d.ts +17 -0
- package/dist/types/agent/tools/wikipedia.d.ts +7 -0
- package/dist/types/agent/tools-without-local-file-operands.d.ts +1 -0
- package/dist/types/agent/turn-runner.d.ts +36 -0
- package/dist/types/agent-messenger/config-dir.d.ts +19 -0
- package/dist/types/browser/dockerfile.d.ts +2 -0
- package/dist/types/browser/registry.d.ts +49 -0
- package/dist/types/bundled-plugins/bun-hygiene/policy.d.ts +18 -0
- package/dist/types/bundled-plugins/github-cli-auth/git-askpass.d.ts +5 -0
- package/dist/types/bundled-plugins/guard/keys.d.ts +6 -0
- package/dist/types/bundled-plugins/guard/policies/managed-config.d.ts +7 -0
- package/dist/types/bundled-plugins/guard/policies/memory-topics-delete.d.ts +11 -0
- package/dist/types/bundled-plugins/guard/policies/memory-topics-write.d.ts +7 -0
- package/dist/types/bundled-plugins/guard/policies/non-workspace-write.d.ts +9 -0
- package/dist/types/bundled-plugins/guard/policies/skill-authoring.d.ts +20 -0
- package/dist/types/bundled-plugins/guard/policies/uncommitted-changes.d.ts +12 -0
- package/dist/types/bundled-plugins/guard/policy.d.ts +11 -0
- package/dist/types/bundled-plugins/memory/secret-detector.d.ts +11 -0
- package/dist/types/bundled-plugins/memory/slug.d.ts +4 -0
- package/dist/types/bundled-plugins/security/permissions.d.ts +20 -0
- package/dist/types/bundled-plugins/security/policies/private-surface-read.d.ts +34 -0
- package/dist/types/bundled-plugins/security/policies/ssrf.d.ts +18 -0
- package/dist/types/bundled-plugins/security/policy.d.ts +4 -0
- package/dist/types/channels/adapter-namespace.d.ts +2 -0
- package/dist/types/channels/adapters/mention-hints.d.ts +12 -0
- package/dist/types/channels/adapters/webex-id-ref.d.ts +5 -0
- package/dist/types/channels/background-handoff.d.ts +56 -0
- package/dist/types/channels/background-obligations.d.ts +135 -0
- package/dist/types/channels/catch-up.d.ts +26 -0
- package/dist/types/channels/commands.d.ts +2 -0
- package/dist/types/channels/completion-claim.d.ts +20 -0
- package/dist/types/channels/continuation-willingness.d.ts +1 -0
- package/dist/types/channels/continuity-types.d.ts +75 -0
- package/dist/types/channels/describe-error.d.ts +1 -0
- package/dist/types/channels/engagement.d.ts +34 -0
- package/dist/types/channels/github-false-receipt.d.ts +20 -0
- package/dist/types/channels/github-repo.d.ts +2 -0
- package/dist/types/channels/github-rereview-guard.d.ts +24 -0
- package/dist/types/channels/github-review-check.d.ts +135 -0
- package/dist/types/channels/github-review-claim.d.ts +3 -0
- package/dist/types/channels/github-review-turn-ledger.d.ts +71 -0
- package/dist/types/channels/github-review-verdict-coordinator.d.ts +117 -0
- package/dist/types/channels/github-token-bridge.d.ts +20 -0
- package/dist/types/channels/github-verdict-activity.d.ts +12 -0
- package/dist/types/channels/inbound-journal.d.ts +272 -0
- package/dist/types/channels/last-alive.d.ts +3 -0
- package/dist/types/channels/membership-cache.d.ts +27 -0
- package/dist/types/channels/membership.d.ts +21 -0
- package/dist/types/channels/outbound-flood-filter.d.ts +7 -0
- package/dist/types/channels/participants.d.ts +4 -0
- package/dist/types/channels/persistence.d.ts +32 -0
- package/dist/types/channels/recovery-notice.d.ts +26 -0
- package/dist/types/channels/recovery-outbox.d.ts +58 -0
- package/dist/types/channels/router.d.ts +760 -0
- package/dist/types/channels/schema.d.ts +501 -0
- package/dist/types/channels/session-handoff.d.ts +58 -0
- package/dist/types/channels/session-search.d.ts +29 -0
- package/dist/types/channels/types.d.ts +414 -0
- package/dist/types/channels/waiting-reactions.d.ts +25 -0
- package/dist/types/cli/builtins.d.ts +2 -0
- package/dist/types/cli/command-meta.d.ts +9 -0
- package/dist/types/coding-agent/broker-body.d.ts +7 -0
- package/dist/types/coding-agent/broker.d.ts +22 -0
- package/dist/types/coding-agent/claude.d.ts +22 -0
- package/dist/types/coding-agent/codex.d.ts +19 -0
- package/dist/types/coding-agent/index.d.ts +71 -0
- package/dist/types/coding-agent/omo-state.d.ts +2 -0
- package/dist/types/coding-agent/omo-stream.d.ts +22 -0
- package/dist/types/coding-agent/omo.d.ts +133 -0
- package/dist/types/coding-agent/runner.d.ts +35 -0
- package/dist/types/coding-agent/tool.d.ts +27 -0
- package/dist/types/coding-agent/worktree.d.ts +22 -0
- package/dist/types/commands/index.d.ts +45 -0
- package/dist/types/config/config.d.ts +827 -0
- package/dist/types/config/index.d.ts +3 -0
- package/dist/types/config/model-overrides.d.ts +3 -0
- package/dist/types/config/providers.d.ts +1458 -0
- package/dist/types/config/reloadable.d.ts +9 -0
- package/dist/types/container/agent-operation-lock.d.ts +31 -0
- package/dist/types/container/build-cache.d.ts +39 -0
- package/dist/types/container/compose-project.d.ts +1 -0
- package/dist/types/container/controller.d.ts +25 -0
- package/dist/types/container/docker-app.d.ts +23 -0
- package/dist/types/container/exit-reason.d.ts +10 -0
- package/dist/types/container/index.d.ts +14 -0
- package/dist/types/container/log-archive.d.ts +68 -0
- package/dist/types/container/log-colors.d.ts +3 -0
- package/dist/types/container/log-timestamps.d.ts +9 -0
- package/dist/types/container/logs.d.ts +37 -0
- package/dist/types/container/memory-limit.d.ts +13 -0
- package/dist/types/container/memory-oversubscription.d.ts +20 -0
- package/dist/types/container/oom-events.d.ts +18 -0
- package/dist/types/container/port.d.ts +18 -0
- package/dist/types/container/require-running.d.ts +16 -0
- package/dist/types/container/restart.d.ts +32 -0
- package/dist/types/container/shared.d.ts +93 -0
- package/dist/types/container/shell.d.ts +35 -0
- package/dist/types/container/start.d.ts +145 -0
- package/dist/types/container/stats.d.ts +31 -0
- package/dist/types/container/status.d.ts +25 -0
- package/dist/types/container/stop.d.ts +24 -0
- package/dist/types/container/tool-oom-priority.d.ts +4 -0
- package/dist/types/container/verify-running.d.ts +49 -0
- package/dist/types/cron/consumer.d.ts +42 -0
- package/dist/types/cron/count-state.d.ts +24 -0
- package/dist/types/cron/index.d.ts +21 -0
- package/dist/types/cron/list.d.ts +33 -0
- package/dist/types/cron/reloadable.d.ts +11 -0
- package/dist/types/cron/scheduler.d.ts +51 -0
- package/dist/types/cron/schema.d.ts +108 -0
- package/dist/types/dependencies/bin-resolver.d.ts +28 -0
- package/dist/types/dependencies/bins.d.ts +22 -0
- package/dist/types/dependencies/index.d.ts +2 -0
- package/dist/types/eval/cell.d.ts +26 -0
- package/dist/types/eval/config.d.ts +19 -0
- package/dist/types/eval/dispatch.d.ts +7 -0
- package/dist/types/eval/kernel.d.ts +28 -0
- package/dist/types/eval/process.d.ts +23 -0
- package/dist/types/eval/protocol.d.ts +34 -0
- package/dist/types/eval/sandbox.d.ts +10 -0
- package/dist/types/eval/tool.d.ts +17 -0
- package/dist/types/eval/wire.d.ts +33 -0
- package/dist/types/git/bound-gc-config.d.ts +4 -0
- package/dist/types/git/hookless.d.ts +1 -0
- package/dist/types/git/reconcile-ignored.d.ts +13 -0
- package/dist/types/git/resolve-agent-git.d.ts +8 -0
- package/dist/types/git/resolve-identity.d.ts +10 -0
- package/dist/types/git/run.d.ts +24 -0
- package/dist/types/git/system-commit.d.ts +2 -0
- package/dist/types/hostd/client.d.ts +13 -0
- package/dist/types/hostd/models.d.ts +1 -0
- package/dist/types/hostd/paths.d.ts +17 -0
- package/dist/types/hostd/protocol.d.ts +93 -0
- package/dist/types/hostd/spawn.d.ts +17 -0
- package/dist/types/hostd/version.d.ts +18 -0
- package/dist/types/init/auto-upgrade.d.ts +41 -0
- package/dist/types/init/cli-version.d.ts +7 -0
- package/dist/types/init/dockerfile.d.ts +34 -0
- package/dist/types/init/ensure-deps.d.ts +17 -0
- package/dist/types/init/env-file.d.ts +3 -0
- package/dist/types/init/gitignore.d.ts +5 -0
- package/dist/types/init/local-source-stamp.d.ts +3 -0
- package/dist/types/init/packagejson.d.ts +7 -0
- package/dist/types/init/paths.d.ts +3 -0
- package/dist/types/init/reconcile-plugin-deps.d.ts +13 -0
- package/dist/types/init/run-bun-install.d.ts +16 -0
- package/dist/types/init/windows-dev-link.d.ts +8 -0
- package/dist/types/mcp/catalog.d.ts +7 -0
- package/dist/types/mcp/client.d.ts +58 -0
- package/dist/types/mcp/manager.d.ts +56 -0
- package/dist/types/mcp/tools.d.ts +23 -0
- package/dist/types/models/embedding-model.d.ts +20 -0
- package/dist/types/models/transformers-version.d.ts +1 -0
- package/dist/types/network/internal-destinations.d.ts +29 -0
- package/dist/types/operations/classify-tool-outcome.d.ts +35 -0
- package/dist/types/operations/incidents.d.ts +47 -0
- package/dist/types/operations/index.d.ts +3 -0
- package/dist/types/operations/remediations.d.ts +25 -0
- package/dist/types/path-safety/real-intended-path.d.ts +9 -0
- package/dist/types/permissions/builtins.d.ts +25 -0
- package/dist/types/permissions/grant.d.ts +19 -0
- package/dist/types/permissions/index.d.ts +6 -0
- package/dist/types/permissions/match-rule.d.ts +28 -0
- package/dist/types/permissions/permissions.d.ts +42 -0
- package/dist/types/permissions/resolve.d.ts +25 -0
- package/dist/types/permissions/schema.d.ts +14 -0
- package/dist/types/plugin/context.d.ts +20 -0
- package/dist/types/plugin/core-tool-names.d.ts +4 -0
- package/dist/types/plugin/define.d.ts +46 -0
- package/dist/types/plugin/hooks.d.ts +52 -0
- package/dist/types/plugin/index.d.ts +11 -0
- package/dist/types/plugin/load-skill.d.ts +14 -0
- package/dist/types/plugin/loader.d.ts +25 -0
- package/dist/types/plugin/manager.d.ts +42 -0
- package/dist/types/plugin/registry.d.ts +73 -0
- package/dist/types/plugin/skills.d.ts +11 -0
- package/dist/types/plugin/types.d.ts +336 -0
- package/dist/types/plugin/zod-introspect.d.ts +11 -0
- package/dist/types/reload/client.d.ts +11 -0
- package/dist/types/reload/docker-exec-client.d.ts +11 -0
- package/dist/types/reload/format.d.ts +2 -0
- package/dist/types/reload/index.d.ts +6 -0
- package/dist/types/reload/recover.d.ts +22 -0
- package/dist/types/reload/registry.d.ts +10 -0
- package/dist/types/reload/types.d.ts +25 -0
- package/dist/types/role-claim/client.d.ts +20 -0
- package/dist/types/role-claim/code.d.ts +4 -0
- package/dist/types/role-claim/controller.d.ts +59 -0
- package/dist/types/role-claim/index.d.ts +6 -0
- package/dist/types/role-claim/match-rule.d.ts +9 -0
- package/dist/types/role-claim/pending.d.ts +35 -0
- package/dist/types/role-claim/reload-after-claim.d.ts +16 -0
- package/dist/types/run/llm-fetch-observer.d.ts +50 -0
- package/dist/types/sandbox/availability.d.ts +21 -0
- package/dist/types/sandbox/build.d.ts +7 -0
- package/dist/types/sandbox/canonical-secrets.d.ts +8 -0
- package/dist/types/sandbox/coding-agent.d.ts +20 -0
- package/dist/types/sandbox/dependency-bins.d.ts +19 -0
- package/dist/types/sandbox/dev-source.d.ts +4 -0
- package/dist/types/sandbox/env-exposure.d.ts +3 -0
- package/dist/types/sandbox/errors.d.ts +20 -0
- package/dist/types/sandbox/hidden-paths.d.ts +11 -0
- package/dist/types/sandbox/index.d.ts +14 -0
- package/dist/types/sandbox/package-install.d.ts +1 -0
- package/dist/types/sandbox/policy.d.ts +71 -0
- package/dist/types/sandbox/privileged-runtime.d.ts +13 -0
- package/dist/types/sandbox/quote.d.ts +2 -0
- package/dist/types/sandbox/runtime-private.d.ts +1 -0
- package/dist/types/sandbox/session-tmp.d.ts +6 -0
- package/dist/types/sandbox/symlinks.d.ts +6 -0
- package/dist/types/sandbox/writable-zones.d.ts +15 -0
- package/dist/types/secrets/coding-agent-auth.d.ts +25 -0
- package/dist/types/secrets/defaults.d.ts +21 -0
- package/dist/types/secrets/export-github-cli-store.d.ts +22 -0
- package/dist/types/secrets/hydrate.d.ts +7 -0
- package/dist/types/secrets/index.d.ts +7 -0
- package/dist/types/secrets/provision-github-cli-store.d.ts +45 -0
- package/dist/types/secrets/refresh-provider-oauth.d.ts +22 -0
- package/dist/types/secrets/resolve.d.ts +14 -0
- package/dist/types/secrets/schema.d.ts +840 -0
- package/dist/types/secrets/storage.d.ts +56 -0
- package/dist/types/shared/host-locale.d.ts +1 -0
- package/dist/types/shared/index.d.ts +5 -0
- package/dist/types/shared/local-time.d.ts +4 -0
- package/dist/types/shared/platform.d.ts +2 -0
- package/dist/types/shared/protocol.d.ts +424 -0
- package/dist/types/shared/style-text.d.ts +3 -0
- package/dist/types/shared/wsl.d.ts +17 -0
- package/dist/types/stream/broker.d.ts +2 -0
- package/dist/types/stream/index.d.ts +2 -0
- package/dist/types/stream/types.d.ts +71 -0
- package/package.json +13 -6
- package/scripts/build-plugin-types.ts +105 -0
- package/scripts/check-plugin-sdk.ts +111 -0
- package/scripts/require-parallel.ts +5 -32
- package/src/agent/bash-sandbox-env.ts +104 -0
- package/src/agent/bash-sandbox-proc.ts +70 -0
- package/src/agent/bash-sandbox.ts +225 -0
- package/src/agent/compaction.ts +22 -10
- package/src/agent/guard-types.ts +3 -0
- package/src/agent/guards.ts +4 -0
- package/src/agent/idle-compaction.ts +178 -0
- package/src/agent/index.ts +139 -172
- package/src/agent/live-subagents.ts +19 -0
- package/src/agent/multimodal/look-at.ts +22 -9
- package/src/agent/output-allowance.ts +7 -0
- package/src/agent/plugin-tools.ts +39 -377
- package/src/agent/reviewer-bash-policy.ts +41 -1
- package/src/agent/session-origin.ts +28 -11
- package/src/agent/subagent-cache-keepalive.ts +198 -0
- package/src/agent/subagent-completion-reminder.ts +2 -2
- package/src/agent/subagent-session.ts +6 -0
- package/src/agent/subagents.ts +46 -8
- package/src/agent/system-prompt-composition.ts +141 -0
- package/src/agent/system-prompt.ts +5 -5
- package/src/agent/todo/scope.ts +1 -1
- package/src/agent/tool-file-safety.ts +6 -1
- package/src/agent/tools/channel-edit.ts +20 -10
- package/src/agent/tools/channel-fetch-attachment.ts +12 -5
- package/src/agent/tools/channel-handoff.ts +72 -0
- package/src/agent/tools/channel-read.ts +57 -10
- package/src/agent/tools/channel-reply.ts +33 -26
- package/src/agent/tools/channel-send.ts +21 -13
- package/src/agent/tools/channel-session-search.ts +35 -0
- package/src/agent/tools/curl-impersonate.ts +11 -4
- package/src/agent/tools/ddg.ts +84 -16
- package/src/agent/tools/spawn-subagent.ts +27 -11
- package/src/agent/tools/stream-snapshot.ts +15 -2
- package/src/agent/tools/subagent-access.ts +11 -4
- package/src/agent/tools-without-local-file-operands.ts +4 -0
- package/src/browser/bsk-shim.mjs +74 -0
- package/src/browser/dockerfile.ts +84 -0
- package/src/browser/egress.ts +104 -0
- package/src/browser/fill-secret.ts +307 -0
- package/src/browser/managed-browser.ts +205 -0
- package/src/browser/registry.ts +110 -0
- package/src/browser/relay.ts +231 -0
- package/src/browser/sandbox-entry.ts +167 -0
- package/src/bundled-plugins/agent-browser/index.ts +2 -0
- package/src/bundled-plugins/browser-agent/browser-agent.ts +89 -0
- package/src/bundled-plugins/browser-agent/index.ts +12 -0
- package/src/bundled-plugins/doc-render/index.ts +0 -10
- package/src/bundled-plugins/doc-render/render.ts +83 -111
- package/src/bundled-plugins/doc-render/skills/typeclaw-render-pdf/SKILL.md +152 -257
- package/src/bundled-plugins/explorer/explorer.ts +1 -1
- package/src/bundled-plugins/github-cli-auth/gh-command.ts +4 -0
- package/src/bundled-plugins/github-cli-auth/gh-review-detect.ts +40 -16
- package/src/bundled-plugins/github-cli-auth/git-auth-diagnostic.ts +95 -0
- package/src/bundled-plugins/github-cli-auth/graphql-auth-nudge.ts +12 -7
- package/src/bundled-plugins/github-cli-auth/index.ts +85 -60
- package/src/bundled-plugins/managed-browser/index.ts +179 -0
- package/src/bundled-plugins/managed-browser/skills/browser-use/browser-use/SKILL.md +27 -0
- package/src/bundled-plugins/managed-browser/skills/browserskill/browserskill/SKILL.md +28 -0
- package/src/bundled-plugins/managed-browser/skills/omowright/omowright/SKILL.md +40 -0
- package/src/bundled-plugins/memory/dreaming.ts +4 -1
- package/src/bundled-plugins/memory/load-memory.ts +2 -4
- package/src/bundled-plugins/memory/memory-logger.ts +74 -2
- package/src/bundled-plugins/memory/transcript-preload.ts +103 -0
- package/src/bundled-plugins/memory/vector/hybrid.ts +25 -14
- package/src/bundled-plugins/operator/operator.ts +1 -1
- package/src/bundled-plugins/qa/index.ts +11 -0
- package/src/bundled-plugins/qa/qa.ts +160 -0
- package/src/bundled-plugins/qa/skills/qa-cli.ts +50 -0
- package/src/bundled-plugins/qa/skills/qa-general.ts +30 -0
- package/src/bundled-plugins/qa/skills/qa-http.ts +39 -0
- package/src/bundled-plugins/qa/skills/qa-pr.ts +51 -0
- package/src/bundled-plugins/qa/skills/qa-web.ts +49 -0
- package/src/bundled-plugins/security/index.ts +53 -34
- package/src/bundled-plugins/security/policies/outbound-secret-scan.ts +1 -0
- package/src/bundled-plugins/security/policies/private-surface-read.ts +166 -201
- package/src/channels/adapter-namespace.ts +13 -0
- package/src/channels/adapters/discord-bot-reference.ts +5 -4
- package/src/channels/adapters/discord-bot.ts +98 -5
- package/src/channels/adapters/discord-classify.ts +8 -3
- package/src/channels/adapters/discord.ts +29 -0
- package/src/channels/adapters/github/index.ts +16 -0
- package/src/channels/adapters/github/last-alive.ts +4 -16
- package/src/channels/adapters/slack-attachment-download.ts +14 -3
- package/src/channels/adapters/slack-bot-author-resolver.ts +4 -3
- package/src/channels/adapters/slack-bot-channel-resolver.ts +9 -6
- package/src/channels/adapters/slack-bot-classify.ts +1 -0
- package/src/channels/adapters/slack-bot-slash-commands.ts +3 -1
- package/src/channels/adapters/slack-bot.ts +299 -67
- package/src/channels/adapters/slack-classify.ts +1 -0
- package/src/channels/catch-up.ts +137 -0
- package/src/channels/continuation-willingness.ts +2 -2
- package/src/channels/continuity-types.ts +1 -0
- package/src/channels/engagement.ts +17 -1
- package/src/channels/github-false-receipt.ts +3 -3
- package/src/channels/github-rereview-guard.ts +9 -5
- package/src/channels/github-review-check.ts +5 -1
- package/src/channels/github-review-verdict-coordinator.ts +68 -2
- package/src/channels/github-token-bridge.ts +24 -0
- package/src/channels/last-alive.ts +34 -0
- package/src/channels/manager.ts +8 -1
- package/src/channels/router.ts +515 -243
- package/src/channels/session-handoff.fixture.ts +144 -0
- package/src/channels/session-handoff.ts +175 -0
- package/src/channels/session-search.ts +71 -0
- package/src/channels/subagent-completion-bridge.ts +3 -2
- package/src/channels/types.ts +12 -2
- package/src/cli/channel.ts +2 -3
- package/src/cli/hostd.ts +3 -0
- package/src/cli/init.ts +2 -3
- package/src/cli/model.ts +132 -3
- package/src/coding-agent/index.ts +7 -1
- package/src/coding-agent/omo-stream.ts +40 -0
- package/src/coding-agent/runner.ts +30 -8
- package/src/config/config.ts +126 -22
- package/src/config/model-overrides.ts +59 -0
- package/src/config/models-mutation.ts +185 -2
- package/src/config/providers-mutation.ts +12 -4
- package/src/config/providers.ts +69 -4
- package/src/container/start.ts +132 -5
- package/src/doctor/checks.ts +33 -22
- package/src/doctor/index.ts +48 -12
- package/src/doctor/operational-incidents.ts +16 -1
- package/src/doctor/plugin-bridge.ts +14 -1
- package/src/doctor/stage.ts +14 -0
- package/src/doctor/types.ts +6 -0
- package/src/eval/cell.ts +93 -0
- package/src/eval/config.ts +32 -0
- package/src/eval/dispatch.ts +67 -0
- package/src/eval/entry.ts +261 -0
- package/src/eval/kernel.ts +154 -0
- package/src/eval/process.ts +113 -0
- package/src/eval/protocol.ts +26 -0
- package/src/eval/redeclare.ts +174 -0
- package/src/eval/sandbox.ts +114 -0
- package/src/eval/tool.ts +98 -0
- package/src/eval/wire.ts +93 -0
- package/src/hostd/daemon.ts +13 -1
- package/src/init/auto-upgrade.ts +7 -1
- package/src/init/dockerfile.ts +57 -12
- package/src/init/index.ts +4 -3
- package/src/init/local-source-stamp.ts +68 -0
- package/src/init/models-dev.ts +4 -0
- package/src/init/validate-api-key.ts +3 -0
- package/src/operations/classify-tool-outcome.ts +1 -1
- package/src/permissions/builtins.ts +7 -0
- package/src/permissions/permissions.ts +18 -9
- package/src/permissions/resolve.ts +7 -1
- package/src/plugin/context.ts +2 -0
- package/src/plugin/core-tool-names.ts +6 -1
- package/src/plugin/hooks.ts +137 -0
- package/src/plugin/index.ts +6 -0
- package/src/plugin/manager.ts +4 -0
- package/src/plugin/types.ts +60 -0
- package/src/run/bundled-plugins.ts +6 -0
- package/src/run/index.ts +24 -14
- package/src/run/llm-fetch-observer.ts +12 -15
- package/src/sandbox/canonical-secrets.ts +4 -0
- package/src/sandbox/dev-source.ts +26 -0
- package/src/sandbox/env-exposure.ts +20 -0
- package/src/sandbox/hidden-paths.ts +16 -2
- package/src/secrets/storage.ts +13 -0
- package/src/server/index.ts +46 -11
- package/src/skills/typeclaw-channel-github/SKILL.md +8 -8
- package/src/skills/typeclaw-config/SKILL.md +57 -5
- package/src/skills/typeclaw-config/references/dockerfile.md +2 -2
- package/src/skills/typeclaw-github-contributing/SKILL.md +1 -1
- package/src/skills/typeclaw-monorepo/SKILL.md +1 -1
- package/src/skills/typeclaw-permissions/SKILL.md +7 -7
- package/src/skills/typeclaw-troubleshooting/SKILL.md +12 -1
- package/typeclaw.schema.json +488 -5
- package/src/bundled-plugins/doc-render/templates/lib.typ +0 -339
- package/src/bundled-plugins/github-cli-auth/gh-store.ts +0 -733
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { AuthOperationOptions, Credential, CredentialInfo, CredentialStore } from '@earendil-works/pi-ai';
|
|
2
|
+
import { type Channels, type GithubCliSecrets, type McpCredential, type McpSlice, type ProviderCredential, type Providers } from "./schema.js";
|
|
3
|
+
export declare const ASYNC_LOCK_OPTIONS: {
|
|
4
|
+
readonly retries: {
|
|
5
|
+
readonly retries: 10;
|
|
6
|
+
readonly factor: 2;
|
|
7
|
+
readonly minTimeout: 100;
|
|
8
|
+
readonly maxTimeout: 10000;
|
|
9
|
+
readonly randomize: true;
|
|
10
|
+
};
|
|
11
|
+
readonly stale: 30000;
|
|
12
|
+
readonly realpath: false;
|
|
13
|
+
};
|
|
14
|
+
type AsyncLockOptions = Omit<typeof ASYNC_LOCK_OPTIONS, 'stale'> & {
|
|
15
|
+
stale: number;
|
|
16
|
+
};
|
|
17
|
+
export declare class SecretsBackend implements CredentialStore {
|
|
18
|
+
private readonly secretsPath;
|
|
19
|
+
private readonly lockOptions;
|
|
20
|
+
constructor(secretsPath: string, lockOptions?: AsyncLockOptions);
|
|
21
|
+
read(providerId: string, options?: AuthOperationOptions): Promise<Credential | undefined>;
|
|
22
|
+
list(options?: AuthOperationOptions): Promise<readonly CredentialInfo[]>;
|
|
23
|
+
modify(providerId: string, fn: (current: Credential | undefined) => Promise<Credential | undefined>, options?: AuthOperationOptions): Promise<Credential | undefined>;
|
|
24
|
+
delete(providerId: string, options?: AuthOperationOptions): Promise<void>;
|
|
25
|
+
private withProviderLock;
|
|
26
|
+
readChannelsSync(): Channels;
|
|
27
|
+
tryReadChannelsSync(): Channels | null;
|
|
28
|
+
tryReadProviderApiKeySync(providerId: string, env?: NodeJS.ProcessEnv): string | null;
|
|
29
|
+
tryReadProvidersSync(): Providers;
|
|
30
|
+
tryReadMcpSync(): McpSlice;
|
|
31
|
+
tryReadGithubCliSync(): GithubCliSecrets | undefined;
|
|
32
|
+
writeGithubCliSync(githubCli: GithubCliSecrets): void;
|
|
33
|
+
removeGithubCliSync(): void;
|
|
34
|
+
readMcpCredentialSync(serverName: string): McpCredential | undefined;
|
|
35
|
+
writeMcpCredentialSync(serverName: string, credential: McpCredential): void;
|
|
36
|
+
updateMcpAsync<T>(fn: (current: McpSlice) => Promise<{
|
|
37
|
+
result: T;
|
|
38
|
+
next?: McpSlice;
|
|
39
|
+
}>): Promise<T>;
|
|
40
|
+
removeMcpCredentialSync(serverName: string): boolean;
|
|
41
|
+
writeProviderCredentialSync(providerId: string, credential: ProviderCredential): void;
|
|
42
|
+
removeProviderCredentialSync(providerId: string): boolean;
|
|
43
|
+
removeChannelSync(kind: string): boolean;
|
|
44
|
+
writeChannelsSync(next: Channels): void;
|
|
45
|
+
updateChannelsAsync<T>(fn: (current: Record<string, unknown>) => Promise<{
|
|
46
|
+
result: T;
|
|
47
|
+
next?: Record<string, unknown>;
|
|
48
|
+
}>): Promise<T>;
|
|
49
|
+
private ensureParentDir;
|
|
50
|
+
private ensureFileExists;
|
|
51
|
+
private acquireSyncLockWithRetry;
|
|
52
|
+
private readEnvelope;
|
|
53
|
+
private writeEnvelopeAtomic;
|
|
54
|
+
}
|
|
55
|
+
export declare function createSecretsStoreForAgent(secretsPath: string): SecretsBackend;
|
|
56
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function hostLocaleIsCjk(): boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { type ClaimCompletedPayload, type ClaimErrorPayload, type ClaimRoleChoice, type ClaimStartedPayload, type ClientMessage, type CronListEntryPayload, type CronListRequestId, type CronListResultPayload, type CronListSourcePayload, type DoctorCheckPayload, type DoctorFixPayload, type DoctorRequestId, type InspectClientMessage, type InspectFramePayload, type InspectServerMessage, type LiveSessionOriginPayload, type LiveSessionPayload, type PromptDelivery, type QueueStateItem, type ReloadResultPayload, type ServerMessage, type TunnelLogsClientMessage, type TunnelLogsServerMessage, type TunnelRequestId, type TunnelSnapshot, } from "./protocol.js";
|
|
2
|
+
export { formatLocalDate, formatLocalDateTime, formatLocalWeekday, resolveLocalTimezoneName } from "./local-time.js";
|
|
3
|
+
export { detectWsl, isWindowsDriveMount, type WslInfo, type WslVersion } from "./wsl.js";
|
|
4
|
+
export { isMacOS, isWindows } from "./platform.js";
|
|
5
|
+
export { styled, type StyleFormat } from "./style-text.js";
|
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
export type ReloadResultPayload = {
|
|
2
|
+
scope: string;
|
|
3
|
+
ok: true;
|
|
4
|
+
summary: string;
|
|
5
|
+
details?: unknown;
|
|
6
|
+
} | {
|
|
7
|
+
scope: string;
|
|
8
|
+
ok: false;
|
|
9
|
+
reason: string;
|
|
10
|
+
};
|
|
11
|
+
export type ReloadCausePayload = {
|
|
12
|
+
kind: 'credential-rotation';
|
|
13
|
+
adapter: string;
|
|
14
|
+
};
|
|
15
|
+
export type PromptDelivery = 'queue' | 'steer' | 'interrupt';
|
|
16
|
+
export type DoctorRequestId = string;
|
|
17
|
+
export type DoctorCheckPayload = {
|
|
18
|
+
id: string;
|
|
19
|
+
pluginName: string;
|
|
20
|
+
checkName: string;
|
|
21
|
+
description: string;
|
|
22
|
+
category: string;
|
|
23
|
+
status: 'ok' | 'warning' | 'error';
|
|
24
|
+
message: string;
|
|
25
|
+
details?: string[];
|
|
26
|
+
fix?: {
|
|
27
|
+
description: string;
|
|
28
|
+
hasApply: boolean;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export type DoctorFixPayload = {
|
|
32
|
+
ok: true;
|
|
33
|
+
checkId: string;
|
|
34
|
+
summary: string;
|
|
35
|
+
changedPaths: string[];
|
|
36
|
+
} | {
|
|
37
|
+
ok: false;
|
|
38
|
+
checkId: string;
|
|
39
|
+
error: string;
|
|
40
|
+
};
|
|
41
|
+
export type ClaimRoleChoice = 'owner' | 'member' | 'trusted' | (string & {});
|
|
42
|
+
export type TunnelRequestId = string;
|
|
43
|
+
export type TunnelSnapshot = {
|
|
44
|
+
name: string;
|
|
45
|
+
provider: 'external' | 'cloudflare-quick' | 'cloudflare-named';
|
|
46
|
+
for: {
|
|
47
|
+
kind: 'channel';
|
|
48
|
+
name: string;
|
|
49
|
+
} | {
|
|
50
|
+
kind: 'manual';
|
|
51
|
+
};
|
|
52
|
+
url: string | null;
|
|
53
|
+
status: 'stopped' | 'starting' | 'healthy' | 'unhealthy' | 'permanently-failed';
|
|
54
|
+
lastUrlAt: number | null;
|
|
55
|
+
detail: string;
|
|
56
|
+
};
|
|
57
|
+
export type TunnelLogsClientMessage = {
|
|
58
|
+
type: 'subscribe';
|
|
59
|
+
name: string;
|
|
60
|
+
follow: boolean;
|
|
61
|
+
};
|
|
62
|
+
export type TunnelLogsServerMessage = {
|
|
63
|
+
type: 'snapshot';
|
|
64
|
+
lines: string[];
|
|
65
|
+
} | {
|
|
66
|
+
type: 'line';
|
|
67
|
+
line: string;
|
|
68
|
+
} | {
|
|
69
|
+
type: 'error';
|
|
70
|
+
message: string;
|
|
71
|
+
} | {
|
|
72
|
+
type: 'end';
|
|
73
|
+
};
|
|
74
|
+
export type InspectClientMessage = {
|
|
75
|
+
type: 'subscribe';
|
|
76
|
+
sessionId: string;
|
|
77
|
+
sinceMs?: number;
|
|
78
|
+
} | {
|
|
79
|
+
type: 'ping';
|
|
80
|
+
id: number;
|
|
81
|
+
} | {
|
|
82
|
+
type: 'list_live';
|
|
83
|
+
};
|
|
84
|
+
export type LiveSessionOriginPayload = {
|
|
85
|
+
kind: 'tui';
|
|
86
|
+
} | {
|
|
87
|
+
kind: 'cron';
|
|
88
|
+
jobId: string;
|
|
89
|
+
jobKind: 'prompt' | 'exec' | 'subagent' | 'handler';
|
|
90
|
+
} | {
|
|
91
|
+
kind: 'channel';
|
|
92
|
+
adapter: string;
|
|
93
|
+
workspace: string;
|
|
94
|
+
workspaceName?: string;
|
|
95
|
+
chat: string;
|
|
96
|
+
chatName?: string;
|
|
97
|
+
thread: string | null;
|
|
98
|
+
} | {
|
|
99
|
+
kind: 'subagent';
|
|
100
|
+
subagent: string;
|
|
101
|
+
parentSessionId: string;
|
|
102
|
+
} | {
|
|
103
|
+
kind: 'system';
|
|
104
|
+
component: string;
|
|
105
|
+
};
|
|
106
|
+
export type LiveSessionPayload = {
|
|
107
|
+
sessionId: string;
|
|
108
|
+
origin: LiveSessionOriginPayload;
|
|
109
|
+
registeredAtMs: number;
|
|
110
|
+
};
|
|
111
|
+
export type InspectFramePayload = {
|
|
112
|
+
kind: 'text_delta';
|
|
113
|
+
sessionId: string;
|
|
114
|
+
delta: string;
|
|
115
|
+
} | {
|
|
116
|
+
kind: 'thinking_delta';
|
|
117
|
+
sessionId: string;
|
|
118
|
+
delta: string;
|
|
119
|
+
} | {
|
|
120
|
+
kind: 'thinking_end';
|
|
121
|
+
sessionId: string;
|
|
122
|
+
text: string;
|
|
123
|
+
redacted?: boolean;
|
|
124
|
+
} | {
|
|
125
|
+
kind: 'tool_start';
|
|
126
|
+
sessionId: string;
|
|
127
|
+
toolCallId: string;
|
|
128
|
+
name: string;
|
|
129
|
+
args: unknown;
|
|
130
|
+
} | {
|
|
131
|
+
kind: 'tool_end';
|
|
132
|
+
sessionId: string;
|
|
133
|
+
toolCallId: string;
|
|
134
|
+
name: string;
|
|
135
|
+
result: unknown;
|
|
136
|
+
isError: boolean;
|
|
137
|
+
durationMs: number;
|
|
138
|
+
} | {
|
|
139
|
+
kind: 'message_end';
|
|
140
|
+
sessionId: string;
|
|
141
|
+
role: string;
|
|
142
|
+
content: unknown;
|
|
143
|
+
provider?: string;
|
|
144
|
+
model?: string;
|
|
145
|
+
stopReason?: string;
|
|
146
|
+
errorMessage?: string;
|
|
147
|
+
usage?: {
|
|
148
|
+
input: number;
|
|
149
|
+
output: number;
|
|
150
|
+
cacheRead: number;
|
|
151
|
+
cacheWrite: number;
|
|
152
|
+
totalTokens: number;
|
|
153
|
+
cost: number;
|
|
154
|
+
};
|
|
155
|
+
} | {
|
|
156
|
+
kind: 'broadcast';
|
|
157
|
+
payload: unknown;
|
|
158
|
+
meta?: Record<string, string>;
|
|
159
|
+
} | {
|
|
160
|
+
kind: 'cron-fire';
|
|
161
|
+
jobId: string;
|
|
162
|
+
payload: unknown;
|
|
163
|
+
} | {
|
|
164
|
+
kind: 'channel_inbound';
|
|
165
|
+
sessionId?: string;
|
|
166
|
+
adapter: string;
|
|
167
|
+
workspace: string;
|
|
168
|
+
chat: string;
|
|
169
|
+
thread: string | null;
|
|
170
|
+
authorId: string;
|
|
171
|
+
authorName: string;
|
|
172
|
+
authorIsBot: boolean;
|
|
173
|
+
isDm: boolean;
|
|
174
|
+
isBotMention: boolean;
|
|
175
|
+
text: string;
|
|
176
|
+
externalMessageId: string;
|
|
177
|
+
ts: number;
|
|
178
|
+
decision: 'engage' | 'observe' | 'denied' | 'claim';
|
|
179
|
+
};
|
|
180
|
+
export type InspectServerMessage = {
|
|
181
|
+
type: 'subscribed';
|
|
182
|
+
sessionId: string;
|
|
183
|
+
sessionLive: boolean;
|
|
184
|
+
supportsPing?: true;
|
|
185
|
+
} | {
|
|
186
|
+
type: 'frame';
|
|
187
|
+
ts: number;
|
|
188
|
+
payload: InspectFramePayload;
|
|
189
|
+
} | {
|
|
190
|
+
type: 'error';
|
|
191
|
+
message: string;
|
|
192
|
+
} | {
|
|
193
|
+
type: 'pong';
|
|
194
|
+
id: number;
|
|
195
|
+
} | {
|
|
196
|
+
type: 'live_sessions';
|
|
197
|
+
sessions: LiveSessionPayload[];
|
|
198
|
+
};
|
|
199
|
+
export type ClientMessage = {
|
|
200
|
+
type: 'prompt';
|
|
201
|
+
text: string;
|
|
202
|
+
delivery?: PromptDelivery;
|
|
203
|
+
} | {
|
|
204
|
+
type: 'reload';
|
|
205
|
+
scope?: string;
|
|
206
|
+
cause?: ReloadCausePayload;
|
|
207
|
+
} | {
|
|
208
|
+
type: 'restart';
|
|
209
|
+
} | {
|
|
210
|
+
type: 'abort';
|
|
211
|
+
} | {
|
|
212
|
+
type: 'queue_cancel';
|
|
213
|
+
messageId: string;
|
|
214
|
+
} | {
|
|
215
|
+
type: 'doctor';
|
|
216
|
+
requestId: DoctorRequestId;
|
|
217
|
+
} | {
|
|
218
|
+
type: 'doctor_fix';
|
|
219
|
+
requestId: DoctorRequestId;
|
|
220
|
+
checkId: string;
|
|
221
|
+
} | {
|
|
222
|
+
type: 'cron_list';
|
|
223
|
+
requestId: CronListRequestId;
|
|
224
|
+
} | {
|
|
225
|
+
type: 'tunnel_list_request';
|
|
226
|
+
requestId: TunnelRequestId;
|
|
227
|
+
} | {
|
|
228
|
+
type: 'tunnel_status_request';
|
|
229
|
+
requestId: TunnelRequestId;
|
|
230
|
+
name: string;
|
|
231
|
+
} | {
|
|
232
|
+
type: 'claim_start';
|
|
233
|
+
code: string;
|
|
234
|
+
role: ClaimRoleChoice;
|
|
235
|
+
channel?: string;
|
|
236
|
+
ttlMs: number;
|
|
237
|
+
} | {
|
|
238
|
+
type: 'claim_cancel';
|
|
239
|
+
} | {
|
|
240
|
+
type: 'exec_command';
|
|
241
|
+
callId: string;
|
|
242
|
+
name: string;
|
|
243
|
+
args: unknown;
|
|
244
|
+
isolated?: boolean;
|
|
245
|
+
parentOriginJson?: string;
|
|
246
|
+
} | {
|
|
247
|
+
type: 'command_stdin';
|
|
248
|
+
callId: string;
|
|
249
|
+
chunk: string;
|
|
250
|
+
} | {
|
|
251
|
+
type: 'command_stdin_end';
|
|
252
|
+
callId: string;
|
|
253
|
+
} | {
|
|
254
|
+
type: 'command_abort';
|
|
255
|
+
callId: string;
|
|
256
|
+
reason: string;
|
|
257
|
+
};
|
|
258
|
+
export type CronListRequestId = string;
|
|
259
|
+
export type CronListSourcePayload = {
|
|
260
|
+
kind: 'user';
|
|
261
|
+
} | {
|
|
262
|
+
kind: 'plugin';
|
|
263
|
+
pluginName: string;
|
|
264
|
+
localId: string;
|
|
265
|
+
};
|
|
266
|
+
export type CronListEntryPayload = {
|
|
267
|
+
id: string;
|
|
268
|
+
source: CronListSourcePayload;
|
|
269
|
+
kind: 'prompt' | 'exec' | 'handler';
|
|
270
|
+
schedule?: string;
|
|
271
|
+
at?: string;
|
|
272
|
+
until?: string;
|
|
273
|
+
count?: number;
|
|
274
|
+
timezone?: string;
|
|
275
|
+
enabled: boolean;
|
|
276
|
+
scheduledByRole?: string;
|
|
277
|
+
nextFireMs: number | null;
|
|
278
|
+
scheduleError?: string;
|
|
279
|
+
prompt?: string;
|
|
280
|
+
subagent?: string;
|
|
281
|
+
command?: readonly string[];
|
|
282
|
+
};
|
|
283
|
+
export type CronListResultPayload = {
|
|
284
|
+
ok: true;
|
|
285
|
+
jobs: CronListEntryPayload[];
|
|
286
|
+
nowMs: number;
|
|
287
|
+
} | {
|
|
288
|
+
ok: false;
|
|
289
|
+
reason: string;
|
|
290
|
+
};
|
|
291
|
+
export type QueueStateItem = {
|
|
292
|
+
id: string;
|
|
293
|
+
text: string;
|
|
294
|
+
ts: number;
|
|
295
|
+
};
|
|
296
|
+
export type ClaimStartedPayload = {
|
|
297
|
+
code: string;
|
|
298
|
+
role: string;
|
|
299
|
+
channel?: string;
|
|
300
|
+
expiresAt: number;
|
|
301
|
+
};
|
|
302
|
+
export type ClaimCompletedPayload = {
|
|
303
|
+
code: string;
|
|
304
|
+
role: string;
|
|
305
|
+
matchRule: string;
|
|
306
|
+
adapter: string;
|
|
307
|
+
authorId: string;
|
|
308
|
+
};
|
|
309
|
+
export type ClaimErrorPayload = {
|
|
310
|
+
code: string;
|
|
311
|
+
reason: string;
|
|
312
|
+
};
|
|
313
|
+
export type ServerMessage = {
|
|
314
|
+
type: 'connected';
|
|
315
|
+
sessionId: string;
|
|
316
|
+
serverVersion?: string;
|
|
317
|
+
} | {
|
|
318
|
+
type: 'text_delta';
|
|
319
|
+
delta: string;
|
|
320
|
+
ts?: number;
|
|
321
|
+
} | {
|
|
322
|
+
type: 'tool_start';
|
|
323
|
+
toolCallId: string;
|
|
324
|
+
name: string;
|
|
325
|
+
args: unknown;
|
|
326
|
+
ts?: number;
|
|
327
|
+
} | {
|
|
328
|
+
type: 'tool_end';
|
|
329
|
+
toolCallId: string;
|
|
330
|
+
name: string;
|
|
331
|
+
error: boolean;
|
|
332
|
+
result: unknown;
|
|
333
|
+
durationMs: number;
|
|
334
|
+
ts?: number;
|
|
335
|
+
} | {
|
|
336
|
+
type: 'done';
|
|
337
|
+
ts?: number;
|
|
338
|
+
usage?: {
|
|
339
|
+
input: number;
|
|
340
|
+
output: number;
|
|
341
|
+
totalTokens: number;
|
|
342
|
+
cost: number;
|
|
343
|
+
};
|
|
344
|
+
} | {
|
|
345
|
+
type: 'error';
|
|
346
|
+
message: string;
|
|
347
|
+
ts?: number;
|
|
348
|
+
} | {
|
|
349
|
+
type: 'reload_result';
|
|
350
|
+
results: ReloadResultPayload[];
|
|
351
|
+
} | {
|
|
352
|
+
type: 'restart_result';
|
|
353
|
+
status: 'accepted' | 'failed';
|
|
354
|
+
message?: string;
|
|
355
|
+
error?: string;
|
|
356
|
+
} | {
|
|
357
|
+
type: 'notification';
|
|
358
|
+
payload: unknown;
|
|
359
|
+
replyTo?: string;
|
|
360
|
+
meta?: Record<string, string>;
|
|
361
|
+
} | {
|
|
362
|
+
type: 'queue_state';
|
|
363
|
+
pending: QueueStateItem[];
|
|
364
|
+
} | {
|
|
365
|
+
type: 'prompt_started';
|
|
366
|
+
messageId: string;
|
|
367
|
+
text: string;
|
|
368
|
+
ts?: number;
|
|
369
|
+
} | {
|
|
370
|
+
type: 'doctor_result';
|
|
371
|
+
requestId: DoctorRequestId;
|
|
372
|
+
checks: DoctorCheckPayload[];
|
|
373
|
+
} | {
|
|
374
|
+
type: 'doctor_fix_result';
|
|
375
|
+
requestId: DoctorRequestId;
|
|
376
|
+
result: DoctorFixPayload;
|
|
377
|
+
} | {
|
|
378
|
+
type: 'cron_list_result';
|
|
379
|
+
requestId: CronListRequestId;
|
|
380
|
+
result: CronListResultPayload;
|
|
381
|
+
} | ({
|
|
382
|
+
type: 'tunnel_list_response';
|
|
383
|
+
requestId: TunnelRequestId;
|
|
384
|
+
} & ({
|
|
385
|
+
ok: true;
|
|
386
|
+
tunnels: TunnelSnapshot[];
|
|
387
|
+
} | {
|
|
388
|
+
ok: false;
|
|
389
|
+
error: string;
|
|
390
|
+
})) | ({
|
|
391
|
+
type: 'tunnel_status_response';
|
|
392
|
+
requestId: TunnelRequestId;
|
|
393
|
+
} & ({
|
|
394
|
+
ok: true;
|
|
395
|
+
tunnel: TunnelSnapshot;
|
|
396
|
+
} | {
|
|
397
|
+
ok: false;
|
|
398
|
+
error: string;
|
|
399
|
+
})) | {
|
|
400
|
+
type: 'claim_started';
|
|
401
|
+
payload: ClaimStartedPayload;
|
|
402
|
+
} | {
|
|
403
|
+
type: 'claim_completed';
|
|
404
|
+
payload: ClaimCompletedPayload;
|
|
405
|
+
} | {
|
|
406
|
+
type: 'claim_error';
|
|
407
|
+
payload: ClaimErrorPayload;
|
|
408
|
+
} | {
|
|
409
|
+
type: 'command_stdout';
|
|
410
|
+
callId: string;
|
|
411
|
+
chunk: string;
|
|
412
|
+
} | {
|
|
413
|
+
type: 'command_stderr';
|
|
414
|
+
callId: string;
|
|
415
|
+
chunk: string;
|
|
416
|
+
} | {
|
|
417
|
+
type: 'command_exit';
|
|
418
|
+
callId: string;
|
|
419
|
+
code: number;
|
|
420
|
+
} | {
|
|
421
|
+
type: 'command_error';
|
|
422
|
+
callId: string;
|
|
423
|
+
message: string;
|
|
424
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type WslVersion = 1 | 2;
|
|
2
|
+
export type WslInfo = {
|
|
3
|
+
isWsl: boolean;
|
|
4
|
+
version: WslVersion | null;
|
|
5
|
+
};
|
|
6
|
+
export type WslProbes = {
|
|
7
|
+
platform: NodeJS.Platform;
|
|
8
|
+
kernelRelease: () => string;
|
|
9
|
+
readFile: (path: string) => string | null;
|
|
10
|
+
fileExists: (path: string) => boolean;
|
|
11
|
+
env: NodeJS.ProcessEnv;
|
|
12
|
+
};
|
|
13
|
+
export declare function detectWslWith(probes: WslProbes): WslInfo;
|
|
14
|
+
export declare function detectWsl(): WslInfo;
|
|
15
|
+
export declare function readAutomountRootWith(probes: Pick<WslProbes, 'readFile'>): string;
|
|
16
|
+
export declare function isWindowsDriveMountWith(path: string, probes: Pick<WslProbes, 'readFile'>): boolean;
|
|
17
|
+
export declare function isWindowsDriveMount(path: string): boolean;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { createStream } from "./broker.js";
|
|
2
|
+
export { type CreateStreamOptions, type PublishAndAwaitOptions, type ScanFilter, type Stream, type StreamMessage, type StreamMessageId, type StreamMessageInput, type StreamTarget, type SubscribeFilter, type SubscribeListener, type TargetFilter, StreamTimeoutError, type Unsubscribe, } from "./types.js";
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export type StreamMessageId = string;
|
|
2
|
+
export type StreamTarget = {
|
|
3
|
+
kind: 'broadcast';
|
|
4
|
+
} | {
|
|
5
|
+
kind: 'session';
|
|
6
|
+
sessionId: string;
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'new-session';
|
|
9
|
+
subagent: string;
|
|
10
|
+
parentSessionId?: string;
|
|
11
|
+
spawnedByRole?: string;
|
|
12
|
+
spawnedByOriginJson?: string;
|
|
13
|
+
} | {
|
|
14
|
+
kind: 'cron';
|
|
15
|
+
jobId: string;
|
|
16
|
+
};
|
|
17
|
+
export type StreamMessage = {
|
|
18
|
+
id: StreamMessageId;
|
|
19
|
+
ts: number;
|
|
20
|
+
target: StreamTarget;
|
|
21
|
+
payload: unknown;
|
|
22
|
+
replyTo?: StreamMessageId;
|
|
23
|
+
meta?: Record<string, string>;
|
|
24
|
+
};
|
|
25
|
+
export type StreamMessageInput = {
|
|
26
|
+
target: StreamTarget;
|
|
27
|
+
payload: unknown;
|
|
28
|
+
replyTo?: StreamMessageId;
|
|
29
|
+
meta?: Record<string, string>;
|
|
30
|
+
};
|
|
31
|
+
export type SubscribeFilter = {
|
|
32
|
+
target?: TargetFilter;
|
|
33
|
+
replyTo?: StreamMessageId;
|
|
34
|
+
};
|
|
35
|
+
export type ScanFilter = SubscribeFilter & {
|
|
36
|
+
sinceTs?: number;
|
|
37
|
+
limit?: number;
|
|
38
|
+
};
|
|
39
|
+
export type TargetFilter = {
|
|
40
|
+
kind: 'broadcast';
|
|
41
|
+
} | {
|
|
42
|
+
kind: 'session';
|
|
43
|
+
sessionId?: string;
|
|
44
|
+
} | {
|
|
45
|
+
kind: 'new-session';
|
|
46
|
+
subagent?: string;
|
|
47
|
+
} | {
|
|
48
|
+
kind: 'cron';
|
|
49
|
+
jobId?: string;
|
|
50
|
+
};
|
|
51
|
+
export type Unsubscribe = () => void;
|
|
52
|
+
export type SubscribeListener = (msg: StreamMessage) => unknown;
|
|
53
|
+
export type PublishAndAwaitOptions = {
|
|
54
|
+
timeoutMs?: number;
|
|
55
|
+
};
|
|
56
|
+
export type Stream = {
|
|
57
|
+
publish(message: StreamMessageInput): StreamMessageId;
|
|
58
|
+
publishAndAwait(message: StreamMessageInput, opts?: PublishAndAwaitOptions): Promise<StreamMessage>;
|
|
59
|
+
reply(toStreamMessageId: StreamMessageId, payload: unknown): StreamMessageId;
|
|
60
|
+
subscribe(filter: SubscribeFilter, onMessage: SubscribeListener): Unsubscribe;
|
|
61
|
+
scan(filter?: ScanFilter): StreamMessage[];
|
|
62
|
+
};
|
|
63
|
+
export type CreateStreamOptions = {
|
|
64
|
+
historySize?: number;
|
|
65
|
+
now?: () => number;
|
|
66
|
+
};
|
|
67
|
+
export declare class StreamTimeoutError extends Error {
|
|
68
|
+
readonly requestId: StreamMessageId;
|
|
69
|
+
readonly timeoutMs: number;
|
|
70
|
+
constructor(requestId: StreamMessageId, timeoutMs: number);
|
|
71
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typeclaw",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"homepage": "https://github.com/typeclaw/typeclaw#readme",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/typeclaw/typeclaw/issues"
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"src",
|
|
18
|
+
"dist/types",
|
|
18
19
|
"scripts",
|
|
19
20
|
"tsconfig.json",
|
|
20
21
|
"typeclaw.schema.json",
|
|
@@ -25,13 +26,19 @@
|
|
|
25
26
|
],
|
|
26
27
|
"type": "module",
|
|
27
28
|
"exports": {
|
|
28
|
-
"./plugin":
|
|
29
|
+
"./plugin": {
|
|
30
|
+
"types": "./dist/types/plugin/index.d.ts",
|
|
31
|
+
"default": "./src/plugin/index.ts"
|
|
32
|
+
}
|
|
29
33
|
},
|
|
30
34
|
"publishConfig": {
|
|
31
35
|
"access": "public"
|
|
32
36
|
},
|
|
33
37
|
"scripts": {
|
|
34
38
|
"typecheck": "tsc --noEmit",
|
|
39
|
+
"build:types": "bun run scripts/build-plugin-types.ts",
|
|
40
|
+
"check:plugin-sdk": "bun run scripts/check-plugin-sdk.ts",
|
|
41
|
+
"prepack": "bun run build:types",
|
|
35
42
|
"lint": "oxlint",
|
|
36
43
|
"format": "oxfmt --write .",
|
|
37
44
|
"format:check": "oxfmt --check .",
|
|
@@ -45,10 +52,10 @@
|
|
|
45
52
|
"dependencies": {
|
|
46
53
|
"@clack/core": "^1.2.0",
|
|
47
54
|
"@clack/prompts": "^1.2.0",
|
|
48
|
-
"@earendil-works/pi-agent-core": "^
|
|
49
|
-
"@earendil-works/pi-ai": "^
|
|
50
|
-
"@earendil-works/pi-coding-agent": "^
|
|
51
|
-
"@earendil-works/pi-tui": "^
|
|
55
|
+
"@earendil-works/pi-agent-core": "^1.4.0",
|
|
56
|
+
"@earendil-works/pi-ai": "^1.4.0",
|
|
57
|
+
"@earendil-works/pi-coding-agent": "^1.4.0",
|
|
58
|
+
"@earendil-works/pi-tui": "^1.4.0",
|
|
52
59
|
"@huggingface/transformers": "4.2.0",
|
|
53
60
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
54
61
|
"@mozilla/readability": "^0.6.0",
|