typeclaw 0.49.0 → 0.50.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/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 +7 -0
- package/dist/types/agent/index.d.ts +163 -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/plugin-tools.d.ts +129 -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.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 +18 -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 +798 -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 +814 -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 +1456 -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 +144 -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/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 +1 -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 +9 -2
- 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/guard-types.ts +3 -0
- package/src/agent/guards.ts +4 -0
- package/src/agent/idle-compaction.ts +174 -0
- package/src/agent/index.ts +74 -16
- package/src/agent/live-subagents.ts +19 -0
- package/src/agent/multimodal/look-at.ts +22 -9
- package/src/agent/plugin-tools.ts +13 -1
- package/src/agent/reviewer-bash-policy.ts +41 -1
- package/src/agent/session-origin.ts +26 -10
- package/src/agent/subagent-cache-keepalive.ts +198 -0
- package/src/agent/subagent-session.ts +6 -0
- package/src/agent/subagents.ts +46 -8
- package/src/agent/system-prompt.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 +13 -5
- 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/browser/bsk-shim.mjs +74 -0
- package/src/browser/dockerfile.ts +84 -0
- package/src/browser/egress.ts +104 -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/github-cli-auth/gh-command.ts +4 -0
- package/src/bundled-plugins/github-cli-auth/git-auth-diagnostic.ts +95 -0
- package/src/bundled-plugins/github-cli-auth/index.ts +75 -59
- package/src/bundled-plugins/managed-browser/index.ts +74 -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/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/channels/adapter-namespace.ts +13 -0
- package/src/channels/adapters/discord-bot.ts +97 -5
- 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-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 +427 -136
- 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/types.ts +12 -2
- package/src/cli/channel.ts +2 -3
- 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 +111 -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 +59 -0
- package/src/container/start.ts +95 -4
- package/src/doctor/checks.ts +8 -6
- 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/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/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/hidden-paths.ts +16 -2
- package/src/secrets/storage.ts +13 -0
- package/src/skills/typeclaw-channel-github/SKILL.md +8 -8
- package/src/skills/typeclaw-config/SKILL.md +39 -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 +436 -5
- package/src/bundled-plugins/doc-render/templates/lib.typ +0 -339
- package/src/bundled-plugins/github-cli-auth/gh-store.ts +0 -733
|
@@ -45,14 +45,12 @@ export type LlmFetchObserverOptions = {
|
|
|
45
45
|
// Override the default pre-headers (TTFB) deadline applied to the outer
|
|
46
46
|
// fetch(). When a provider silently holds a request without sending response
|
|
47
47
|
// headers, this is the timer that releases the request so `pi-coding-agent`'s
|
|
48
|
-
// `_isRetryableError` can retry. Default:
|
|
48
|
+
// `_isRetryableError` can retry. Default: 30_000 ms.
|
|
49
49
|
//
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
//
|
|
54
|
-
// is almost certainly the silent-hang failure mode rather than a real request
|
|
55
|
-
// making progress. False-positive cost is one retry (~5s extra); false-negative
|
|
50
|
+
// Most providers return response headers within ~1s, but slow-but-healthy
|
|
51
|
+
// OpenAI-compatible providers (e.g. z.ai GLM) routinely take 12-16s to send
|
|
52
|
+
// headers on large prompts, so a 15s deadline aborted real requests. 30s keeps
|
|
53
|
+
// a margin over that tail while still bounding a silent hang. False-positive cost is one retry (~5s extra); false-negative
|
|
56
54
|
// cost is the full Bun socket deadline (~268s). Aggressive wins.
|
|
57
55
|
ttfbMs?: number
|
|
58
56
|
// Override the sliding inter-chunk idle deadline applied to the SSE body
|
|
@@ -101,11 +99,11 @@ const ENV_OVERALL_MS = 'TYPECLAW_LLM_OVERALL_MS'
|
|
|
101
99
|
const ENV_CODEX_TTFB_MS = 'TYPECLAW_CODEX_TTFB_MS'
|
|
102
100
|
const ENV_CODEX_IDLE_MS = 'TYPECLAW_CODEX_IDLE_MS'
|
|
103
101
|
const ENV_CODEX_OVERALL_MS = 'TYPECLAW_CODEX_OVERALL_MS'
|
|
104
|
-
const DEFAULT_TTFB_MS =
|
|
102
|
+
const DEFAULT_TTFB_MS = 30_000
|
|
105
103
|
const DEFAULT_IDLE_MS = 120_000
|
|
106
104
|
const DEFAULT_OVERALL_MS = 300_000
|
|
107
105
|
// Codex is healthy-FAST but silently hangs: observed header latency p50~1s /
|
|
108
|
-
// p99~8s / max~10.8s, yet hung requests wait out the generic
|
|
106
|
+
// p99~8s / max~10.8s, yet hung requests wait out the generic 30s floor. Pinning
|
|
109
107
|
// 13s detects hangs ~2s sooner with ~2.2s margin over the healthy max. Pinned,
|
|
110
108
|
// not adaptive: codex's p95 (~5.6s) never crosses the floor so widening is a
|
|
111
109
|
// no-op, and a longer deadline only makes each silent hang costlier to recover.
|
|
@@ -116,8 +114,7 @@ const LOG_PREFIX = '[llm-fetch]'
|
|
|
116
114
|
|
|
117
115
|
// Adaptive TTFB: give a provider that is OBSERVED to be slow-but-healthy more
|
|
118
116
|
// pre-headers room, without blunting silent-hang detection for fast providers.
|
|
119
|
-
// A fixed
|
|
120
|
-
// TTFB ~16.5s while its p50 is ~1s); a uniform higher default would let a truly
|
|
117
|
+
// A fixed floor kills legitimately-slow providers whose tail exceeds it; a uniform higher default would let a truly
|
|
121
118
|
// hung FAST provider stall for the same widened window. So widening is scoped to
|
|
122
119
|
// the specific origin whose recent successful header latency is actually high.
|
|
123
120
|
//
|
|
@@ -125,15 +122,15 @@ const LOG_PREFIX = '[llm-fetch]'
|
|
|
125
122
|
// are bimodal, mostly-1s with occasional 10–16s, so a mean-tracker sits low and
|
|
126
123
|
// never widens for the spike). Nearest-rank p95 over the last ADAPTIVE_WINDOW_MS
|
|
127
124
|
// of samples reacts to the current upper tail and forgets stale slowness.
|
|
128
|
-
const ADAPTIVE_TTFB_FLOOR_MS =
|
|
129
|
-
const ADAPTIVE_TTFB_CEIL_MS =
|
|
125
|
+
const ADAPTIVE_TTFB_FLOOR_MS = 30_000
|
|
126
|
+
const ADAPTIVE_TTFB_CEIL_MS = 60_000
|
|
130
127
|
const ADAPTIVE_TTFB_MULTIPLIER = 2
|
|
131
128
|
const ADAPTIVE_MIN_SAMPLES = 8
|
|
132
129
|
const ADAPTIVE_MAX_SAMPLES = 32
|
|
133
130
|
const ADAPTIVE_WINDOW_MS = 5 * 60_000
|
|
134
131
|
// After a timeout at the CEIL budget, the origin is treated as slow-then-hung:
|
|
135
132
|
// suppress all widening (learned + probe) and fail closed to the floor for this
|
|
136
|
-
// long, so five rapid retries can't each inherit the
|
|
133
|
+
// long, so five rapid retries can't each inherit the ceil budget. A sub-floor
|
|
137
134
|
// success clears the suppression early.
|
|
138
135
|
const ADAPTIVE_COOLDOWN_MS = 5 * 60_000
|
|
139
136
|
|
|
@@ -256,7 +253,7 @@ export function defaultLlmFetchEndpoints(env: NodeJS.ProcessEnv = process.env):
|
|
|
256
253
|
// GETs to the same host (auth probes, etc.) are deliberately ignored.
|
|
257
254
|
match: (url, method) =>
|
|
258
255
|
method === 'POST' && url.hostname === 'chatgpt.com' && url.pathname.includes('/codex/responses'),
|
|
259
|
-
// TTFB is pinned to the codex-specific default (not the generic
|
|
256
|
+
// TTFB is pinned to the codex-specific default (not the generic 30s) so a
|
|
260
257
|
// silent hang is caught fast and adaptation is bypassed for this endpoint;
|
|
261
258
|
// an operator-set TYPECLAW_CODEX_TTFB_MS still wins. Idle/overall keep the
|
|
262
259
|
// fall-through shape (unset → generic TYPECLAW_LLM_* / built-in default) so
|
|
@@ -3,6 +3,9 @@ import {
|
|
|
3
3
|
LEGACY_AGENT_MESSENGER_CONFIG_RELATIVE_DIR,
|
|
4
4
|
} from '@/agent-messenger/config-dir'
|
|
5
5
|
|
|
6
|
+
// The managed Chrome profile: cookies and logins persist across container restarts.
|
|
7
|
+
export const BROWSER_PROFILE_RELATIVE_DIR = '.typeclaw/browser-profile'
|
|
8
|
+
|
|
6
9
|
// Runtime-owned credential stores: TypeClaw writes and reads these itself, and
|
|
7
10
|
// no shipped skill ever invokes a CLI that reads them. Masked at EVERY role.
|
|
8
11
|
export const RUNTIME_OWNED_SECRET_DIRS = [
|
|
@@ -12,6 +15,7 @@ export const RUNTIME_OWNED_SECRET_DIRS = [
|
|
|
12
15
|
LEGACY_AGENT_MESSENGER_CONFIG_RELATIVE_DIR,
|
|
13
16
|
'.typeclaw/home',
|
|
14
17
|
'.typeclaw/logs',
|
|
18
|
+
BROWSER_PROFILE_RELATIVE_DIR,
|
|
15
19
|
] as const
|
|
16
20
|
|
|
17
21
|
// SECURITY / classification: operator-provisioned CLI credential stores. TypeClaw
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { realpath } from 'node:fs/promises'
|
|
2
|
+
import { dirname, isAbsolute, relative } from 'node:path'
|
|
3
|
+
import { fileURLToPath } from 'node:url'
|
|
4
|
+
|
|
5
|
+
import type { SandboxMount } from './policy'
|
|
6
|
+
|
|
7
|
+
const RUNTIME_MODULE_FILE = fileURLToPath(import.meta.url)
|
|
8
|
+
|
|
9
|
+
// Dev mode (`file:`/`link:` typeclaw dep): files under node_modules/typeclaw
|
|
10
|
+
// are symlinks into a checkout outside the agent folder. `typeclaw start`
|
|
11
|
+
// mirror-mounts that checkout read-only into the container, but bwrap only
|
|
12
|
+
// binds the agent folder, so bundled SKILL.md symlinks dangle inside model
|
|
13
|
+
// bash. Bind only the checkout's `src/` (where every bundled skill lives),
|
|
14
|
+
// never the checkout root, so a developer's `.env` or `.git` stays out of the
|
|
15
|
+
// sandbox. The path comes from the running module's own realpath, which the
|
|
16
|
+
// model cannot redirect by rewriting node_modules. Registry installs resolve
|
|
17
|
+
// inside the agent folder and get no mount.
|
|
18
|
+
export async function resolveDevSourceMount(
|
|
19
|
+
agentDir: string,
|
|
20
|
+
moduleFile: string = RUNTIME_MODULE_FILE,
|
|
21
|
+
): Promise<Extract<SandboxMount, { type: 'ro-bind' }> | undefined> {
|
|
22
|
+
const srcDir = dirname(dirname(await realpath(moduleFile)))
|
|
23
|
+
const rel = relative(await realpath(agentDir), srcDir)
|
|
24
|
+
if (rel === '' || (!rel.startsWith('..') && !isAbsolute(rel))) return undefined
|
|
25
|
+
return { type: 'ro-bind', source: srcDir, dest: srcDir }
|
|
26
|
+
}
|
|
@@ -6,6 +6,7 @@ import { CORE_PERMISSIONS } from '@/permissions/builtins'
|
|
|
6
6
|
import type { PermissionService } from '@/permissions/permissions'
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
|
+
BROWSER_PROFILE_RELATIVE_DIR,
|
|
9
10
|
CANONICAL_AGENT_SECRET_DIRS,
|
|
10
11
|
CANONICAL_AGENT_SECRET_FILES,
|
|
11
12
|
OPERATOR_CLI_CREDENTIAL_DIRS,
|
|
@@ -121,11 +122,24 @@ async function verifyRequiredMaskTarget(target: string, kind: 'dir' | 'file'): P
|
|
|
121
122
|
if (kind === 'dir' && isCanonicalSecretDir(target)) await rejectHardlinksUnderCanonicalDir(target)
|
|
122
123
|
}
|
|
123
124
|
|
|
125
|
+
// The browser profile grows past the bounded scan through ordinary browsing
|
|
126
|
+
// (Chromium caches use about one file per entry), so scanning it per bash call
|
|
127
|
+
// would eventually block every command. Its only writer is the managed Chrome,
|
|
128
|
+
// which sees nothing but the profile and files directories, and every model tool
|
|
129
|
+
// masks it, so no alias can be planted while the runtime is up. Pre-existing
|
|
130
|
+
// aliases are refused once at browser boot instead (startManagedBrowser), which
|
|
131
|
+
// disables only the browser.
|
|
124
132
|
function isCanonicalSecretDir(target: string): boolean {
|
|
125
|
-
return CANONICAL_AGENT_SECRET_DIRS.some(
|
|
133
|
+
return CANONICAL_AGENT_SECRET_DIRS.some(
|
|
134
|
+
(dir) => dir !== BROWSER_PROFILE_RELATIVE_DIR && target.endsWith(`${sep}${dir.split('/').join(sep)}`),
|
|
135
|
+
)
|
|
126
136
|
}
|
|
127
137
|
|
|
128
138
|
async function rejectHardlinksUnderCanonicalDir(root: string): Promise<void> {
|
|
139
|
+
await rejectHardlinkAliases(root, MAX_CANONICAL_SECRET_SCAN_ENTRIES)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export async function rejectHardlinkAliases(root: string, maxEntries = Number.POSITIVE_INFINITY): Promise<void> {
|
|
129
143
|
const pending = [root]
|
|
130
144
|
let visited = 0
|
|
131
145
|
while (pending.length > 0) {
|
|
@@ -136,7 +150,7 @@ async function rejectHardlinksUnderCanonicalDir(root: string): Promise<void> {
|
|
|
136
150
|
try {
|
|
137
151
|
for await (const entry of dir) {
|
|
138
152
|
visited += 1
|
|
139
|
-
if (visited >
|
|
153
|
+
if (visited > maxEntries) {
|
|
140
154
|
throw new SandboxMaskTargetError(root, 'canonical secret directory exceeds bounded hardlink scan')
|
|
141
155
|
}
|
|
142
156
|
const child = join(current, entry.name)
|
package/src/secrets/storage.ts
CHANGED
|
@@ -230,6 +230,19 @@ export class SecretsBackend implements CredentialStore {
|
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
+
removeGithubCliSync(): void {
|
|
234
|
+
if (!existsSync(this.secretsPath)) return
|
|
235
|
+
let release: (() => void) | undefined
|
|
236
|
+
try {
|
|
237
|
+
release = this.acquireSyncLockWithRetry()
|
|
238
|
+
const { githubCli, ...rest } = this.readEnvelope()
|
|
239
|
+
if (githubCli === undefined) return
|
|
240
|
+
this.writeEnvelopeAtomic(rest)
|
|
241
|
+
} finally {
|
|
242
|
+
release?.()
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
233
246
|
readMcpCredentialSync(serverName: string): McpCredential | undefined {
|
|
234
247
|
if (!existsSync(this.secretsPath)) return undefined
|
|
235
248
|
let release: (() => void) | undefined
|
|
@@ -10,9 +10,9 @@ GitHub renders normal Markdown in issues, PRs, discussions, and review comments.
|
|
|
10
10
|
- For PR review threads, keep `thread` set to reply in-place. Omit `thread` for a top-level PR/issue comment.
|
|
11
11
|
- When a review comment **you authored** has been addressed, resolve its thread by replying with `channel_reply({ …, resolve_review_thread: true })` — see "Resolving review threads you authored" below. The base principle is **whoever opened the thread closes it**: you resolve only the threads you started, never a human's (the runtime enforces this).
|
|
12
12
|
|
|
13
|
-
## Mid-turn status replies need `
|
|
13
|
+
## Mid-turn status replies need `continue_after_reply: true`
|
|
14
14
|
|
|
15
|
-
A successful `channel_reply` ends your turn by default — the runtime stops the model right after the reply lands. That is correct for a final answer, but it will **silently truncate** a turn that still has work to do. If you post a status line like "Reviewing now, I'll be back with findings" and then expect to keep working (fetch the diff, spawn the reviewer, post the review) in the **same** turn, you must call `channel_reply({ text: "…",
|
|
15
|
+
A successful `channel_reply` ends your turn by default — the runtime stops the model right after the reply lands. That is correct for a final answer, but it will **silently truncate** a turn that still has work to do. If you post a status line like "Reviewing now, I'll be back with findings" and then expect to keep working (fetch the diff, spawn the reviewer, post the review) in the **same** turn, you must call `channel_reply({ text: "…", continue_after_reply: true })`. Without `continue_after_reply: true`, the turn ends at that status reply and the review never runs. Reserve `continue_after_reply: true` for genuine multi-step turns; the final reply that wraps up the turn sets `continue_after_reply: false`. The field is required — every `channel_reply` must set it explicitly, so never omit it.
|
|
16
16
|
|
|
17
17
|
## Inbound triage — do this first, every time
|
|
18
18
|
|
|
@@ -80,7 +80,7 @@ The flow:
|
|
|
80
80
|
gh pr checkout <N> --repo owner/repo
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
After the operator confirms the checkout, make the minimal fixes and commit them locally with `typeclaw-git` hygiene. Pushing is **not** host-stage only when an eligible broker credential exists. Credential precedence is GitHub App, then an authorized PAT declared in `.env
|
|
83
|
+
After the operator confirms the checkout, make the minimal fixes and commit them locally with `typeclaw-git` hygiene. Pushing is **not** host-stage only when an eligible broker credential exists. Credential precedence is GitHub App, then an authorized PAT declared in `.env`. The trusted GitHub CLI store is never a push credential: it funds `gh` work only.
|
|
84
84
|
|
|
85
85
|
```sh
|
|
86
86
|
git -C <checkout> push origin <branch>
|
|
@@ -236,7 +236,7 @@ A finding is "actionable" if its severity is `blocker`, `concern`, or `nit`. The
|
|
|
236
236
|
- `comment` → post the summary as the substantive top-level PR reply with `channel_reply`. **Exception — re-reviews:** if an unresolved blocking obligation exists, a top-level comment discharges neither form of block. Use `post_github_review` to land a fresh formal verdict instead.
|
|
237
237
|
- `request-changes` → call `post_github_review({ event: "REQUEST_CHANGES", body: "<summary>" })`. This combination is rare; faithfully encode the reviewer's verdict.
|
|
238
238
|
|
|
239
|
-
The
|
|
239
|
+
The browser (`agent-browser` or any other enabled engine) is **not** for PR reviews — `gh api` is faster and more reliable. Only use the browser when the API genuinely can't reach what you need.
|
|
240
240
|
|
|
241
241
|
## Resolving review threads you authored
|
|
242
242
|
|
|
@@ -265,10 +265,10 @@ If the author merely **replied** without pushing (e.g. "this is intentional beca
|
|
|
265
265
|
Once you have verified the fix, **acknowledge and resolve in one call**: pass `resolve_review_thread: true` to your `channel_reply`. The runtime resolves the thread you're replying in **before** it posts your acknowledgement, then posts the reply:
|
|
266
266
|
|
|
267
267
|
```
|
|
268
|
-
channel_reply({ text: "Verified — the fix addresses the concern. Thanks!",
|
|
268
|
+
channel_reply({ text: "Verified — the fix addresses the concern. Thanks!", continue_after_reply: false, resolve_review_thread: true })
|
|
269
269
|
```
|
|
270
270
|
|
|
271
|
-
This is the correct path and it removes a footgun. A bare `channel_reply` ends your turn the moment it lands, so a resolve attempted _after_ the acknowledgement would never run — the thread would stay open even though you "handled" it. The flag resolves first, so a normal final reply still closes the thread. You do **not** need `
|
|
271
|
+
This is the correct path and it removes a footgun. A bare `channel_reply` ends your turn the moment it lands, so a resolve attempted _after_ the acknowledgement would never run — the thread would stay open even though you "handled" it. The flag resolves first, so a normal final reply still closes the thread. You do **not** need `continue_after_reply: true` for this: resolution happens inside the same call, before the turn ends.
|
|
272
272
|
|
|
273
273
|
Two guarantees make the flag safe to use as your default:
|
|
274
274
|
|
|
@@ -313,13 +313,13 @@ gh issue create --repo owner/repo --title 'Bug: ...' --body '...'
|
|
|
313
313
|
|
|
314
314
|
```
|
|
315
315
|
|
|
316
|
-
For a pull request from any accessible project checkout, push the head branch yourself when an eligible broker credential exists. Credential precedence is GitHub App, then an authorized PAT declared in `.env
|
|
316
|
+
For a pull request from any accessible project checkout, push the head branch yourself when an eligible broker credential exists. Credential precedence is GitHub App, then an authorized PAT declared in `.env`. The trusted GitHub CLI store is never a push credential: it funds `gh` work only. Name the checkout, remote, and branch explicitly:
|
|
317
317
|
|
|
318
318
|
```sh
|
|
319
319
|
git -C <checkout> push <remote> <branch>
|
|
320
320
|
```
|
|
321
321
|
|
|
322
|
-
If
|
|
322
|
+
If a push is refused for missing credentials, ask the operator for GitHub App auth under `channels.github` or a `GH_TOKEN` in the agent `.env` — never a host `gh` login, which does not fund pushes. If brokered `gh` itself is unauthenticated, the operator enables `githubCli.importHostAuth` and runs `gh auth login --hostname github.com` on the host; the next real `typeclaw start` or `typeclaw restart` refreshes the stored account automatically, and a start that finds the container already running does not.
|
|
323
323
|
|
|
324
324
|
Then open the PR yourself with every field explicit and inline: `gh pr create --repo owner/repo --title 'Fix: ...' --body '...' --head my-branch --base main` (add `--draft` if wanted). `--repo`, `--head`, `--base`, `--title` and `--body` are all required; `--fill`, `--body-file`, `--template`, `--editor`, `--web` and `--attach` are refused because they read local files or open an editor/browser while the credential is live. Without `--head`, gh would interrogate the checkout and offer to push, so always name the already-pushed branch.
|
|
325
325
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: typeclaw-config
|
|
3
|
-
description: "Read or edit typeclaw.json — the host-stage runtime config: model, port, mounts, plugins, alias, channels, portForward, docker.file (container package toggles + append), git.ignore.append, plus provider credentials (secrets.json/.env) and the allowed-models registry. Strict schema with a mix of live-reloadable and restart-required fields — load before touching the file or you risk corrupting it or promising a behavior the runtime won't deliver. Also the authority on what a field defaults to and whether a behavior is already on out of the box (port forwarding, container packages, model choice) — load before saying you don't know what X defaults to, or before proposing to add a field whose default the user is asking about; most fields already default to the expected behavior, so the answer is usually 'no edit needed'. Owns the GitHub channel config — which repos it watches (channels.github.repos), the code-review trigger (channels.github.review.on/approve), webhook auto-registration via a tunnel — load on 'github channel', 'github webhook', 'review these repos', 'watch repo X', 'set up code review', 'stop reviewing repo Y'; GitHub events are an inbound channel the agent engages directly, there is NO 'forward webhooks to a Slack channel' flow, do not invent destinations. Covers recommended host paths to mount for common use cases (references/recommended-mounts.md). For messenger-channel engagement BEHAVIOR (when the agent replies vs. observes, triggers, stickiness, alias matching, suppressors) load typeclaw-channels; for who is admitted to a channel load typeclaw-permissions."
|
|
3
|
+
description: "Read or edit typeclaw.json — the host-stage runtime config: model, modelOverrides (per-channel models), port, mounts, plugins, alias, channels, portForward, docker.file (container package toggles + append), git.ignore.append, plus provider credentials (secrets.json/.env) and the allowed-models registry. Strict schema with a mix of live-reloadable and restart-required fields — load before touching the file or you risk corrupting it or promising a behavior the runtime won't deliver. Also the authority on what a field defaults to and whether a behavior is already on out of the box (port forwarding, container packages, model choice) — load before saying you don't know what X defaults to, or before proposing to add a field whose default the user is asking about; most fields already default to the expected behavior, so the answer is usually 'no edit needed'. Owns the GitHub channel config — which repos it watches (channels.github.repos), the code-review trigger (channels.github.review.on/approve), webhook auto-registration via a tunnel — load on 'github channel', 'github webhook', 'review these repos', 'watch repo X', 'set up code review', 'stop reviewing repo Y'; GitHub events are an inbound channel the agent engages directly, there is NO 'forward webhooks to a Slack channel' flow, do not invent destinations. Covers recommended host paths to mount for common use cases (references/recommended-mounts.md). For messenger-channel engagement BEHAVIOR (when the agent replies vs. observes, triggers, stickiness, alias matching, suppressors) load typeclaw-channels; for who is admitted to a channel load typeclaw-permissions."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# typeclaw-config
|
|
@@ -17,6 +17,7 @@ The runtime reads `typeclaw.json` at container startup. Some fields are picked u
|
|
|
17
17
|
- `model` — a fully-qualified `<provider>/<model-id>` string. The runtime resolves this against the built-in provider registry to decide which API to call for every turn. **Live-reloadable.**
|
|
18
18
|
- `models.<profile>` fallback chain — a profile may be an array of refs. The chain advances on failure: cron/batch turns advance on **any** error; interactive turns (TUI, channels, subagents) advance only when the active ref is **throttled/overloaded** (`server_is_overloaded`/`429`/`503`/rate-limit), never mid-turn after output or a tool call, and a repeatedly-throttled ref is skipped for a short cooldown. A single-ref profile fails fast with a provider notice instead of stalling. To make an agent resilient to per-account provider throttling, declare a fallback ref (ideally a different provider/account). **Live-reloadable** (rides `models`).
|
|
19
19
|
- `thinkingLevel` (per-profile) — reasoning effort lives **inside `models`**, not as a top-level field. A profile value may be an object like `{ "model": "<ref>", "thinkingLevel": "high" }` (or `{ "models": ["<ref>", …], "thinkingLevel": … }` for a chain). A session resolves its effort as **the profile's own level → the `default` profile's level → the SDK default (`medium`)** — so the `default` profile's `thinkingLevel` is the de-facto global default, mirroring how `models.default` is the default model. Levels: `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`. Clamped to each model's capabilities (`max` exists only on models that offer it, such as GPT-6 and Claude Opus 5.5; elsewhere it clamps down). An attention-escalation cue in a turn bumps that single turn to `xhigh`, and a profile already at `max` stays at `max`. Bare string/array profile values keep working; a profile becomes an object only when a level is attached. **Live-reloadable** (rides `models`).
|
|
20
|
+
- `modelOverrides` — per-channel models. Named entries `{ "match": [<rules>], "models": { <profile>: … } }` (the `roles` shape) layer a partial `models` block over the global one for the chats their rules cover. See **Per-channel models** below. **Live-reloadable.**
|
|
20
21
|
- `mounts` — additional host directories the user has chosen to expose to you. Each entry produces a `docker run -v <hostPath>:/agent/mounts/<name>` flag at `typeclaw start` time, so the directory shows up at `mounts/<name>` inside your agent folder. **The launcher reads this; the running container does not.** Editing `mounts` only takes effect on the next `typeclaw start`. **Restart-required.**
|
|
21
22
|
- `plugins` — array of plugin module specifiers loaded at server boot: npm package names for published plugins, or relative paths for local plugins you are authoring. **Restart-required.**
|
|
22
23
|
- `alias` — additional names the agent answers to when a channel message contains its name in plain text (no `<@id>` mention). The agent folder's directory name (`basename(agentDir)`) is always implicit; `alias` adds further forms (Latin transliteration, nicknames, Korean particles, etc.). Used by the channel engagement layer alongside the structural mention/reply/dm triggers. **Live-reloadable.**
|
|
@@ -31,7 +32,7 @@ The runtime reads `typeclaw.json` at container startup. Some fields are picked u
|
|
|
31
32
|
|
|
32
33
|
There is no file watcher, but there is a `reload` mechanism. When `typeclaw.json` changes:
|
|
33
34
|
|
|
34
|
-
- **Live-reloadable fields** (`models` — including per-profile `thinkingLevel`, `alias`, `channels`, `branding`) take effect on the next `reload` — no container restart.
|
|
35
|
+
- **Live-reloadable fields** (`models` — including per-profile `thinkingLevel`, `modelOverrides`, `alias`, `channels`, `branding`) take effect on the next `reload` — no container restart.
|
|
35
36
|
- **Restart-required fields** (`port`, `mounts`, `plugins`, `portForward`, `network`, `docker.file`, `git.ignore`) are reported as "reload landed but change won't apply until restart". The diff returns success; the runtime still has the old value in memory. Tell the user explicitly which one they're hitting. `docker.file` additionally requires an image rebuild — that happens automatically on the next `typeclaw start`, no extra flag needed. `git.ignore` refreshes the managed `.gitignore` and auto-commits it on the next `typeclaw start` if content changed.
|
|
36
37
|
- **`$schema`** changes are ignored.
|
|
37
38
|
|
|
@@ -49,19 +50,21 @@ You yourself cannot run `typeclaw restart` — that is a host-stage command and
|
|
|
49
50
|
| `port` | no | integer | 1–65535. Defaults to `8973` (T9 spelling of "TYPE"). Change only if the default collides with something on the user's host. **Restart-required.** |
|
|
50
51
|
| `model` | no | string | Must be one of the values listed in the **Allowed models** section below. Defaults to `openai/gpt-5.4-nano`. **Live-reloadable.** |
|
|
51
52
|
| `models.<profile>.thinkingLevel` | no | string | Per-profile reasoning effort (NOT a top-level field): `off` \| `minimal` \| `low` \| `medium` \| `high` \| `xhigh` \| `max`. Lives in a profile object `{ "model": "<ref>", "thinkingLevel": … }`. Resolves as profile's own → `default` profile's → SDK default (`medium`). Set with `typeclaw model set <profile> <ref> --thinking <level>` or `typeclaw model thinking <level>` (for `default`). **Live-reloadable.** |
|
|
53
|
+
| `modelOverrides` | no | object | Per-channel models: `{ "<name>": { "match": ["<rule>", …], "models": { "<profile>": <ref \| chain \| { model(s), thinkingLevel }> } } }`. Channel match rules only; most specific rule wins per profile. Defaults to `{}`. See **Per-channel models**. **Live-reloadable.** |
|
|
52
54
|
| `mounts` | no | array of objects | Host directories bind-mounted into your container. Defaults to `[]` (no host paths exposed). Omitted from scaffolded `typeclaw.json` — add it only when the user wants host paths exposed. See **Mounts** section below. **Restart-required.** |
|
|
53
55
|
| `plugins` | no | array of strings | Plugin module specifiers loaded at server boot: use npm package names for published plugins (for example, `typeclaw-gws-multi-account`) and relative paths only for local plugins you are authoring (for example, `./packages/my-plugin`). Defaults to `[]`. **Restart-required.** Plugin-owned config blocks live alongside as additional top-level keys; see **Plugin config blocks**. |
|
|
54
56
|
| `alias` | no | array of strings | Additional names the agent answers to in channel engagement, on top of the implicit `basename(agentDir)`. Each entry is a non-empty trimmed string matched case-insensitively as a substring of the inbound text. Defaults to `[]`. Hatching populates this with the agent's chosen name. See **Channels and Alias** below for schema/edit mechanics; the matching behavior lives in the `typeclaw-channels` skill. **Live-reloadable.** |
|
|
55
57
|
| `channels` | no | object | Per-adapter engagement triggers and history-prefetch knobs for external messengers (plus the `github` webhook channel — see **GitHub channel** below). Defaults to `{}` (no adapters configured). `typeclaw init` scaffolds an empty block per requested adapter (e.g. `"discord-bot": {}`) and the schema fills in defaults. Channel access control lives in `roles` — see the `typeclaw-permissions` skill; engagement behavior lives in `typeclaw-channels`. **Live-reloadable.** See **Channels and Alias** below. |
|
|
56
58
|
| `portForward` | no | object | Allow/deny policy for the host-stage portbroker that auto-forwards container LISTEN ports to `127.0.0.1` on the host. Defaults to `{ "allow": "*" }` (forward everything). Omitted from scaffolded `typeclaw.json`. **Restart-required.** See **portForward** section below. |
|
|
57
59
|
| `network` | no | object | Container-stage egress firewall: `{ blockInternal, autoAllowResolvers, allow }`. Defaults to internal blocking on, resolver carve-outs on, and no IPv4 exceptions. `allow` is independent from safe-HTTP SSRF exceptions. **Restart-required.** See **Network and model HTTP internal destinations** below. |
|
|
60
|
+
| `browser` | no | object | `{ engines, extensions }`. `engines` from `agent-browser` (default), `omowright`, `browser-use`; `extensions` from `browserskill` (default `[]`). Anything beyond the default starts a TypeClaw-managed shared Chrome; bash gets its token-gated CDP URL only with `browser.shared`. **Restart-required** (rebuilds the image). |
|
|
58
61
|
| `docker` | no | object | Namespace for Docker-related blocks. Today the only child is `docker.file` — toggles (`tmux`, `gh`, `python`, `ffmpeg`, `cjkFonts`, `cloudflared`, `xvfb`, `claudeCode`, `codexCli`, `omoCli`) gate opinionated package installs; `append` adds custom Dockerfile lines just before `ENTRYPOINT`. `docker.file` defaults to `{ ffmpeg: false, gh: true, python: true, tmux: true, cjkFonts: 'auto', cloudflared: false, xvfb: true, claudeCode: false, codexCli: false, omoCli: false, append: [] }`. Omitted from scaffolded `typeclaw.json`. **Restart-required** (next `typeclaw start` rebuilds the image). See **Dockerfile** section below. |
|
|
59
62
|
| `git` | no | object | Namespace for git-related blocks. Today the only child is `git.ignore` — extra patterns spliced into the autogenerated `.gitignore` before TypeClaw's protected rules. `git.ignore` defaults to `{ "append": [] }`. Omitted from scaffolded `typeclaw.json`. **Restart-required** (next `typeclaw start` refreshes `.gitignore`). See **Gitignore** section below. |
|
|
60
63
|
| `branding` | no | boolean | Whether the system prompt discloses that you run on TypeClaw. Defaults to `true`. Set `false` to strip every TypeClaw clue from the prompt: the base prompt opens generically (no "inside TypeClaw") and the `## Runtime` version block is omitted, on both the main and subagent prompt paths. Read fresh per session. Functional identifiers (`typeclaw.json`, the `typeclaw-render-pdf` / `typeclaw-troubleshooting` skill names) are unaffected. **Live-reloadable.** |
|
|
61
64
|
|
|
62
65
|
> **Top-level keys not in this table are not "ignored unknowns" anymore** — they are reserved for **plugin config blocks**. The schema's `catchall(z.unknown())` preserves them, and the plugin loader hands each block to its owning plugin's `configSchema` for validation. The bundled memory plugin owns `memory` at the top level — see the `typeclaw-memory` skill for that block's semantics. Do not write a top-level key unless you know which plugin owns it.
|
|
63
66
|
|
|
64
|
-
Within the well-known core fields (`$schema`, `port`, `models`, `mounts`, `plugins`, `alias`, `channels`, `portForward`, `network`, `docker`, `git`), **fields the schema doesn't predeclare are silently dropped**. Legacy top-level `dockerfile` and `gitignore` keys are no longer migrated — use `docker.file` and `git.ignore` directly (the legacy keys are silently ignored). Do not invent runtime fields like `provider`, `apiKey`, `temperature`, `maxTokens`, `systemPrompt`, `tools`, `timeout`, etc. — those are not plugin blocks, they are imaginary. If the user asks for one, say it is not yet supported and (if it makes sense) suggest they file a request.
|
|
67
|
+
Within the well-known core fields (`$schema`, `port`, `models`, `modelOverrides`, `mounts`, `plugins`, `alias`, `channels`, `portForward`, `network`, `docker`, `git`), **fields the schema doesn't predeclare are silently dropped**. Legacy top-level `dockerfile` and `gitignore` keys are no longer migrated — use `docker.file` and `git.ignore` directly (the legacy keys are silently ignored). Do not invent runtime fields like `provider`, `apiKey`, `temperature`, `maxTokens`, `systemPrompt`, `tools`, `timeout`, etc. — those are not plugin blocks, they are imaginary. If the user asks for one, say it is not yet supported and (if it makes sense) suggest they file a request.
|
|
65
68
|
|
|
66
69
|
A scaffolded `typeclaw.json` looks like:
|
|
67
70
|
|
|
@@ -86,6 +89,8 @@ The empty block declares the adapter to the runtime — the schema fills in `ena
|
|
|
86
89
|
|
|
87
90
|
## Mounts
|
|
88
91
|
|
|
92
|
+
To let rendered pages and PDFs use the host's installed fonts, set top-level `"hostFonts": true` instead of adding a font mount by hand: it mounts the host font folders read-only where fontconfig finds them (restart-required).
|
|
93
|
+
|
|
89
94
|
Each entry in `mounts` is an object with:
|
|
90
95
|
|
|
91
96
|
| Field | Required | Type | Notes |
|
|
@@ -128,7 +133,7 @@ The `mounts/` directory itself is **gitignored** in your agent folder. The mount
|
|
|
128
133
|
7. **Commit** with a message explaining which mount was added and why (`typeclaw-git` skill).
|
|
129
134
|
8. **Tell the user to restart**: "Added mount `<name>` → `<path>`. Run `typeclaw restart` (host stage). The mount will appear at `mounts/<name>/` after the next start."
|
|
130
135
|
|
|
131
|
-
GitHub push credentials are independent of mounts.
|
|
136
|
+
GitHub push credentials are independent of mounts. Runtime credential precedence is GitHub App, then an authorized PAT declared in `.env`; with neither, a brokered push is blocked. Imported host auth (`githubCli.importHostAuth`) is **not** a push credential — it only authenticates brokered `gh` commands, because the host `gh` login is the operator's own GitHub account.
|
|
132
137
|
|
|
133
138
|
### When the user asks "what can you see / what's mounted"
|
|
134
139
|
|
|
@@ -141,6 +146,35 @@ When the user describes a use case rather than naming a path — "transcribe my
|
|
|
141
146
|
|
|
142
147
|
The reference is **a lookup table, not a wishlist** — recommending a path there is not a license to add the mount silently. The user still has to ask, you still follow the standard procedure (read file, check collisions, pick name, append, write, commit, restart-required), and you still surface the TCC/FDA requirement before promising the agent can read FDA-gated data.
|
|
143
148
|
|
|
149
|
+
## Per-channel models
|
|
150
|
+
|
|
151
|
+
`modelOverrides` picks different models for specific channels, workspaces, or chats. Global `models` stays the default; each named entry overrides some profiles for the chats its `match` rules cover.
|
|
152
|
+
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"models": { "default": "openai/gpt-5.4", "fast": "openai/gpt-5.4-nano" },
|
|
156
|
+
"modelOverrides": {
|
|
157
|
+
"slack": { "match": ["slack:*"], "models": { "default": "openai/gpt-5.4-mini" } },
|
|
158
|
+
"support": {
|
|
159
|
+
"match": ["slack:T0123/C0ABCDE", "discord:G1/C2"],
|
|
160
|
+
"models": { "default": "openai/gpt-5.5", "fast": { "model": "openai/gpt-5.4-mini", "thinkingLevel": "off" } }
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
- **`match`** uses the roles match-rule syntax (see the `typeclaw-permissions` skill), limited to channel rules: `*`, `<platform>:*`, `<platform>:<workspace>`, `<platform>:<workspace>/<chat>`, `<platform>:dm/*`. `author:`, `tui`, `cron`, and `subagent` rules are rejected, as is an empty list. Platform names are `slack`, `discord`, `telegram`, … — `slack:` covers both the `slack` and `slack-bot` adapters.
|
|
167
|
+
- **`models`** takes the same values as the top-level `models` (ref, fallback chain, or `{ model(s), thinkingLevel }`), needs at least one profile, and does not need `default`. Every ref must be in **Allowed models** and its provider must have credentials.
|
|
168
|
+
- **Resolution is per profile:** the most specific matching rule across all entries wins (chat > workspace or DM bucket > platform > `*`); a tie goes to the later-declared entry; a profile no matching entry defines uses the global `models`. Subagents you spawn from a chat inherit that chat's overrides. TUI and cron sessions use the global `models`.
|
|
169
|
+
- **After `reload`, the next turn uses it.** Channel sessions, including ones already running, re-resolve their model before each turn, so the new model applies from the next message; a request already in flight is not switched mid-request. A changed `thinkingLevel` applies to newly created sessions only. The `look_at` tool's `vision` profile always uses the global `models`.
|
|
170
|
+
|
|
171
|
+
### When the user asks "use model X in this channel" / "use a cheaper model on Slack"
|
|
172
|
+
|
|
173
|
+
1. Build the rule from your **session origin** (adapter, workspace id, chat id in your system prompt), not from display names: this chat → `<platform>:<workspace>/<chat>`; this workspace → `<platform>:<workspace>`; the whole platform → `<platform>:*`. Confirm the scope with the user when it is ambiguous ("this channel" vs. "all of Slack").
|
|
174
|
+
2. Check the model is in **Allowed models** and its provider is configured (`typeclaw provider list`).
|
|
175
|
+
3. Add or edit the entry. Reuse an existing entry whose `match` already covers the same chats instead of creating a duplicate; otherwise pick a short descriptive name (`slack`, `support`). Equivalent host CLI: `typeclaw model set <profile> <ref> --override <name> --match '<rule>'`, `typeclaw model override match|unmatch|remove …`, `typeclaw model remove <profile> --override <name>`.
|
|
176
|
+
4. Say: "Edited `modelOverrides` — live-reloadable; after `reload`, that chat uses the new model from its next message."
|
|
177
|
+
|
|
144
178
|
## Channels and Alias
|
|
145
179
|
|
|
146
180
|
`channels` configures which external adapters (`discord-bot`, `slack-bot`, `telegram-bot`, `line`, `kakaotalk`, and `github`) are enabled and how the engagement layer behaves on each; `alias` lists plain-text names the agent answers to. Both are **live-reloadable** — edits take effect on the next `reload`, no container restart.
|
|
@@ -393,7 +427,7 @@ What this means for you:
|
|
|
393
427
|
|
|
394
428
|
## Plugin config blocks
|
|
395
429
|
|
|
396
|
-
Top-level keys in `typeclaw.json` that are **not** in the well-known
|
|
430
|
+
Top-level keys in `typeclaw.json` that are **not** in the well-known core fields (`$schema`, `port`, `models`, `modelOverrides`, `mounts`, `plugins`, `alias`, `channels`, `portForward`, `docker`, `git`) are treated as plugin config blocks. The schema preserves them via `catchall(z.unknown())`, and `extractPluginConfigs` hands each block to the owning plugin's `configSchema` for validation at boot.
|
|
397
431
|
|
|
398
432
|
This skill does **not** document individual plugin blocks. For schema, defaults, and reload semantics of a specific plugin's config, defer to that plugin's own skill:
|
|
399
433
|
|
|
@@ -15,9 +15,9 @@ Companion to the **Dockerfile** section of the `typeclaw-config` SKILL.md. The S
|
|
|
15
15
|
| `gh` | no | boolean \| string | Default `true`. `false` omits **both** the `gh` package and the GitHub CLI keyring bootstrap layer (skipping the network roundtrip on cold builds). String pins the version. |
|
|
16
16
|
| `python` | no | boolean | Default `true`. Fans out to `python3 python3-pip python3-venv python-is-python3` (the bundle that makes `python` and `pip` resolve correctly inside the container). Boolean-only — no version pin, because Debian's `python3` is a meta-package that doesn't accept a useful pin. |
|
|
17
17
|
| `ffmpeg` | no | boolean \| string | Default `false`. `true` apt-installs ffmpeg (~80 MB of codecs). String pins the version. |
|
|
18
|
-
| `cjkFonts` | no | boolean or `"auto"` | Default `"auto"`. Installs `fonts-noto-cjk` (~89 MB) so Chromium (used by
|
|
18
|
+
| `cjkFonts` | no | boolean or `"auto"` | Default `"auto"`. Installs `fonts-noto-cjk` (~89 MB) so Chromium (used by every browser engine) renders Korean/Japanese/Chinese glyphs correctly in screenshots, `page.pdf()`, and other raster output. `"auto"` resolves at `typeclaw start` from the host locale (`LANG`/`LC_ALL`/`Intl`): a CJK host (ja/ko/zh) installs the fonts, any other host skips them. An explicit `true`/`false` forces the decision. `false` skips the layer entirely (DOM/innerText scraping is unaffected by font absence — only raster output shows tofu boxes). |
|
|
19
19
|
| `cloudflared` | no | boolean | Default `false`. Downloads the pinned `cloudflared` GitHub release (~38 MB) into the image so `cloudflare-quick` tunnels work. Default `false` skips the layer on agents that don't use tunnels; `typeclaw tunnel add` / `channel add github` with a Cloudflare provider flip it to `true` automatically and prompt for a restart, so the happy path needs no manual edit. If the binary is absent when a tunnel starts, the tunnel goes `permanently-failed` with a "set docker.file.cloudflared: true and run typeclaw restart" message. Boolean-only — pinning is owned by the typeclaw release. |
|
|
20
|
-
| `xvfb` | no | boolean | Default `true`. Installs `xvfb` (~5 MB) so the entrypoint shim can spawn a virtual X server and export `DISPLAY=:99`, giving headed Chrome (agent-browser `--headed`, headful Playwright) a real X11 display to defeat headless-mode WAF fingerprinting. `false` skips the layer; the shim self-heals (no `Xvfb` on PATH → execs the agent without `DISPLAY`). Boolean-only — xvfb tracks the upstream X server release with no useful apt pin.
|
|
20
|
+
| `xvfb` | no | boolean | Default `true`. Installs `xvfb` (~5 MB) so the entrypoint shim can spawn a virtual X server and export `DISPLAY=:99`, giving headed Chrome (agent-browser `--headed`, the managed shared browser, headful Playwright) a real X11 display to defeat headless-mode WAF fingerprinting. `false` skips the layer; the shim self-heals (no `Xvfb` on PATH → execs the agent without `DISPLAY`). Boolean-only — xvfb tracks the upstream X server release with no useful apt pin. |
|
|
21
21
|
| `claudeCode` | no | boolean | Default `false`. `true` runs Anthropic's official installer with version argument `2.1.299`, copies the resolved executable into root-owned `/usr/local/lib/typeclaw-coding-agents/claude/2.1.299/claude`, and links `/usr/local/bin/claude` there so model bash's bwrap sandbox can execute it without binding `/root`. The layer retains the existing hooks and `~/.claude.json` onboarding seed. Boolean-only; the version pin is owned by the TypeClaw release. Protected authentication profiles remain masked. |
|
|
22
22
|
| `codexCli` | no | boolean | Default `false`. `true` runs `bun install -g @openai/codex@0.162.1` with `BUN_INSTALL=/usr/local/lib/typeclaw-coding-agents/codex` and `BUN_INSTALL_BIN=/usr/local/lib/typeclaw-coding-agents/codex/bin`. The root-owned global package tree (including the vendored native binary) stays under `/usr/local`; `/usr/local/bin/codex` invokes its JS launcher with Bun because the image's `node` fallback is outside the sandbox PATH. The layer retains the existing hook scripts and `~/.codex/hooks.json`. Boolean-only; the version pin is owned by the TypeClaw release. Protected authentication profiles remain masked. |
|
|
23
23
|
| `omoCli` | no | boolean | Default `false`. Installs digest-verified OmO Native 5.1.19 (arm64 or amd64-baseline) under `/usr/local/lib/typeclaw-coding-agents/omo/5.1.19/`, linked from `/usr/local/bin/omo`. Both Dockerfile branches use the same pin. Task-local HOME/config and broker authority come from `coding_agent`; no provider profile is installed. See `typeclaw-omo-cli`. |
|
|
@@ -98,7 +98,7 @@ The same applies to PRs: a quick `gh pr list --search` avoids opening a PR for s
|
|
|
98
98
|
```sh
|
|
99
99
|
gh issue create --repo OWNER/REPO --title '<conventional title>' --body '<filled body>'
|
|
100
100
|
```
|
|
101
|
-
For a **pull request**, push the head branch yourself first when an eligible broker credential exists. Credential precedence is GitHub App, then an authorized PAT declared in `.env
|
|
101
|
+
For a **pull request**, push the head branch yourself first when an eligible broker credential exists. Credential precedence is GitHub App, then an authorized PAT declared in `.env`. The trusted GitHub CLI store is never a push credential: it funds `gh` work only. Name the remote and branch explicitly:
|
|
102
102
|
```sh
|
|
103
103
|
git -C <checkout> push <remote> <branch>
|
|
104
104
|
```
|
|
@@ -25,12 +25,12 @@ You always have these four, even if `typeclaw.json` declares zero `roles`. User-
|
|
|
25
25
|
|
|
26
26
|
Roles form a strict tower for **bypassable plugin guards**: each role bypasses guards at its tier and below. The canonical-secret invariant sits outside this tower.
|
|
27
27
|
|
|
28
|
-
| Role | Built-in `match[]` | Tier bypass cap | Default `permissions[]`
|
|
29
|
-
| --------- | ----------------------------------------------------------------- | --------------- |
|
|
30
|
-
| `owner` | `["tui"]` (always prepended) | `high` | `channel.respond`, `session.control`, `session.admin`, `cron.schedule`, `cron.modify`, `subagent.spawn`, `subagent.cancel`, `subagent.output`, `subagent.spawn.operator`, `fs.see.private`, `fs.see.secrets`, `security.bypass.low`, `security.bypass.medium`, `security.bypass.high`, plus every plugin-contributed `security.bypass.<guard>` (wildcard expansion) |
|
|
31
|
-
| `trusted` | none | `medium` | `channel.respond`, `session.control`, `session.admin`, `cron.schedule`, `subagent.spawn`, `subagent.cancel`, `subagent.output`, `subagent.spawn.operator`, `fs.see.private`, `fs.see.secrets`, `security.bypass.low`, `security.bypass.medium` |
|
|
32
|
-
| `member` | none | `low` | `channel.respond`, `session.control`, `subagent.spawn`, `subagent.cancel`, `subagent.output`, `fs.see.private`, `security.bypass.low` |
|
|
33
|
-
| `guest` | none (fallback when nothing else matches, or stamped role is bad) | (none) | none
|
|
28
|
+
| Role | Built-in `match[]` | Tier bypass cap | Default `permissions[]` |
|
|
29
|
+
| --------- | ----------------------------------------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
30
|
+
| `owner` | `["tui"]` (always prepended) | `high` | `channel.respond`, `session.control`, `session.admin`, `cron.schedule`, `cron.modify`, `subagent.spawn`, `subagent.cancel`, `subagent.output`, `subagent.spawn.operator`, `fs.see.private`, `browser.shared`, `fs.see.secrets`, `security.bypass.low`, `security.bypass.medium`, `security.bypass.high`, plus every plugin-contributed `security.bypass.<guard>` (wildcard expansion) |
|
|
31
|
+
| `trusted` | none | `medium` | `channel.respond`, `session.control`, `session.admin`, `cron.schedule`, `subagent.spawn`, `subagent.cancel`, `subagent.output`, `subagent.spawn.operator`, `fs.see.private`, `browser.shared`, `fs.see.secrets`, `security.bypass.low`, `security.bypass.medium` |
|
|
32
|
+
| `member` | none | `low` | `channel.respond`, `session.control`, `subagent.spawn`, `subagent.cancel`, `subagent.output`, `fs.see.private`, `browser.shared`, `security.bypass.low` |
|
|
33
|
+
| `guest` | none (fallback when nothing else matches, or stamped role is bad) | (none) | none |
|
|
34
34
|
|
|
35
35
|
A session that doesn't match anything resolves to `guest`. `guest` has no `channel.respond`, so the router silently drops inbound messages whose author resolves to `guest`. **This is the most common cause of "the agent stopped responding"**: the user added a channel but did not add a match rule, so every speaker in that channel is `guest` and every inbound is dropped before you ever see it. There is no message in your session log when this happens — only a host-side line `[channels] <key>: denied by permissions (channel.respond) author=<id>`.
|
|
36
36
|
|
|
@@ -92,7 +92,7 @@ Things the DSL rejects (the parser emits actionable errors at boot, but you shou
|
|
|
92
92
|
|
|
93
93
|
Three sources contribute permission strings:
|
|
94
94
|
|
|
95
|
-
1. **Core** (always present): `channel.respond`, `session.control`, `session.admin`, `cron.schedule`, `cron.modify`, `subagent.spawn`, `subagent.cancel`, `subagent.output`, `subagent.spawn.operator`, `fs.see.private`, `fs.see.secrets`.
|
|
95
|
+
1. **Core** (always present): `channel.respond`, `session.control`, `session.admin`, `cron.schedule`, `cron.modify`, `subagent.spawn`, `subagent.cancel`, `subagent.output`, `subagent.spawn.operator`, `fs.see.private`, `fs.see.secrets`, `browser.shared`.
|
|
96
96
|
2. **Bundled security plugin** (always loaded): the eight per-guard strings (`security.bypass.secretExfilBash`, `security.bypass.gitExfil`, `security.bypass.gitRemoteTainted`, `security.bypass.secretExfilRead`, `security.bypass.ssrf`, `security.bypass.sessionSearchSecrets`, `security.bypass.systemPromptLeak`, `security.bypass.outboundSecret`) AND three severity-tier strings (`security.bypass.low`, `security.bypass.medium`, `security.bypass.high`).
|
|
97
97
|
3. **User-declared plugins** (variable): each plugin can contribute its own strings via `definePlugin({ permissions: [...] })`.
|
|
98
98
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: typeclaw-troubleshooting
|
|
3
|
-
description: Use this skill when you are stuck in a fix-it loop — you've made roughly three attempts at the same failure and you're still cycling shell commands (kill the process, re-run, `sleep`, `capture-pane`, inspect, retry) without converging. Triggers include a hung or runaway process that won't die, a `C-c` that didn't stop the program, `<defunct>`/zombie processes piling up in `ps`, an interactive program that blocks `bash` waiting for input, a script that "ran" but produced no output and no file, repeated "not found"/timeout/same-error-again loops, and any moment you catch yourself thinking "let me wait a bit more and check again" for the third time. Also read it before you start a minutes-long or input-waiting program in your own session (dev server, REPL, watcher, `docker compose up`, interactive installer) — foreground `bash` blocks until exit, and this skill has the detached tmux start/observe/drive/stop pattern. Read it before you spawn `operator` to take over the debugging — it covers the operator hand-off prompt, the tmux session pattern, killing stuck/zombie processes properly, and the edge-triggered capture-pane polling loop that the inline retry-and-sleep approach gets wrong.
|
|
3
|
+
description: Use this skill when you are stuck in a fix-it loop — you've made roughly three attempts at the same failure and you're still cycling shell commands (kill the process, re-run, `sleep`, `capture-pane`, inspect, retry) without converging. Triggers include a hung or runaway process that won't die, a `C-c` that didn't stop the program, `<defunct>`/zombie processes piling up in `ps`, an interactive program that blocks `bash` waiting for input, a script that "ran" but produced no output and no file, repeated "not found"/timeout/same-error-again loops, and any moment you catch yourself thinking "let me wait a bit more and check again" for the third time. Also read it before you start a minutes-long or input-waiting program in your own session (dev server, REPL, watcher, `docker compose up`, interactive installer) — foreground `bash` blocks until exit, and this skill has the detached tmux start/observe/drive/stop pattern. Read it before you spawn `operator` to take over the debugging — it covers the operator hand-off prompt, the tmux session pattern, killing stuck/zombie processes properly, and the edge-triggered capture-pane polling loop that the inline retry-and-sleep approach gets wrong. Also read it when `gh` works but `git push`/`git fetch` to GitHub fails with 403, "Permission denied", or "Authentication failed", or when `gh` and git seem to act as different GitHub accounts.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# typeclaw-troubleshooting
|
|
@@ -115,3 +115,14 @@ Don't leave orphaned sessions running between attempts — a stale session is ho
|
|
|
115
115
|
Operator's final report should give you: **root cause**, **what it changed**, and **whether the success condition is met**. Surface that to the user in your own words — don't paste the raw debugging transcript; the whole point was to keep that noise out of the conversation. If operator couldn't resolve it, relay the outcome plus the partial progress (what's now known, what's still failing) so the user can decide the next move.
|
|
116
116
|
|
|
117
117
|
Bound the loop so it can't spin as badly as the inline version would have. Tell operator in the `[REQUEST]` that if a handful of diagnose-fix-verify rounds (≈5) haven't met the success condition, it should stop and report what it found rather than keep retrying — a non-converging operator loop wastes the same tokens you delegated to avoid, it just wastes them out of sight. When that bounded-failure report comes back, bring the user in: relay the partial progress and ask how to proceed instead of immediately re-spawning operator on the same dead end.
|
|
118
|
+
|
|
119
|
+
## GitHub: `gh` and `git` can be different accounts
|
|
120
|
+
|
|
121
|
+
TypeClaw has two GitHub credential sources, and you cannot see either one (`secrets.json` is masked from your tools):
|
|
122
|
+
|
|
123
|
+
- **Per-repo GitHub token** (`secrets.json#channels.github` / the GitHub channel's PAT or App). The `github-cli-auth` plugin injects it into bare `gh` commands for repos it covers.
|
|
124
|
+
- **GitHub CLI store** (`secrets.json#githubCli`, a copy of an operator's `gh` login, present only when `githubCli.importHostAuth` is on). It authenticates brokered `gh` commands only — `git push`, fetch, and clone never use it.
|
|
125
|
+
|
|
126
|
+
These can belong to different GitHub accounts. A green `gh auth status` or a working `gh api` call proves nothing about the account `git push` uses. When a brokered git command fails on auth, TypeClaw appends a note to the result naming the credential source it used and that account's login. Read it before retrying.
|
|
127
|
+
|
|
128
|
+
Do not try to fix this from inside the session. Don't rewrite the remote URL, embed a token, run `gh auth login`, or edit git credential config: the broker owns these credentials, and you can't read or change them. Report the mismatch to the operator, naming both accounts and the target repo, and tell them how to recover: correct or remove the mismatched push credential (`channels.github` in `secrets.json`, or the declared `GH_TOKEN` in `.env`), then run `typeclaw restart`.
|