@primusclaw/personal-agent 0.0.0-stage → 0.1.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/LICENSE +37 -0
- package/dist/index.js +31873 -0
- package/dist/types/approvals/approval-view.d.ts +70 -0
- package/dist/types/approvals/click.d.ts +8 -0
- package/dist/types/approvals/decide.d.ts +64 -0
- package/dist/types/approvals/handler.d.ts +22 -0
- package/dist/types/approvals/index.d.ts +9 -0
- package/dist/types/approvals/questions.d.ts +36 -0
- package/dist/types/approvals/records.d.ts +43 -0
- package/dist/types/approvals/sensitive.d.ts +13 -0
- package/dist/types/approvals/turn-cards.d.ts +7 -0
- package/dist/types/approvals/views.d.ts +67 -0
- package/dist/types/assistant/action-handler.d.ts +13 -0
- package/dist/types/assistant/actions.d.ts +63 -0
- package/dist/types/assistant/auto-reply.d.ts +14 -0
- package/dist/types/assistant/board.d.ts +68 -0
- package/dist/types/assistant/chat.d.ts +166 -0
- package/dist/types/assistant/citation-sources.d.ts +20 -0
- package/dist/types/assistant/citations.d.ts +38 -0
- package/dist/types/assistant/confirm-outcome.d.ts +11 -0
- package/dist/types/assistant/devenv-hide-outcome.d.ts +4 -0
- package/dist/types/assistant/events.d.ts +53 -0
- package/dist/types/assistant/failures.d.ts +16 -0
- package/dist/types/assistant/files.d.ts +37 -0
- package/dist/types/assistant/finish.d.ts +8 -0
- package/dist/types/assistant/follow.d.ts +75 -0
- package/dist/types/assistant/index.d.ts +12 -0
- package/dist/types/assistant/informative.d.ts +9 -0
- package/dist/types/assistant/item-of.d.ts +2 -0
- package/dist/types/assistant/receipt.d.ts +113 -0
- package/dist/types/assistant/receipts.d.ts +71 -0
- package/dist/types/assistant/say.d.ts +63 -0
- package/dist/types/assistant/tracked-stream.d.ts +30 -0
- package/dist/types/assistant/turn-in-front.d.ts +25 -0
- package/dist/types/assistant/views.d.ts +80 -0
- package/dist/types/assistant/watch-clicks.d.ts +34 -0
- package/dist/types/assistant/work-clicks.d.ts +53 -0
- package/dist/types/assistant/work-handler.d.ts +23 -0
- package/dist/types/assistant/work-items.d.ts +66 -0
- package/dist/types/branding.d.ts +5 -0
- package/dist/types/brief/brief.d.ts +40 -0
- package/dist/types/brief/index.d.ts +3 -0
- package/dist/types/brief/template.d.ts +8 -0
- package/dist/types/capabilities/capability.d.ts +49 -0
- package/dist/types/capabilities/command-text.d.ts +11 -0
- package/dist/types/capabilities/entries-chat.d.ts +3 -0
- package/dist/types/capabilities/entries-notify.d.ts +3 -0
- package/dist/types/capabilities/entries-settings.d.ts +3 -0
- package/dist/types/capabilities/help.d.ts +24 -0
- package/dist/types/capabilities/natural.d.ts +19 -0
- package/dist/types/capabilities/phrases.d.ts +42 -0
- package/dist/types/capabilities/registry.d.ts +12 -0
- package/dist/types/capabilities/sessions-words.d.ts +9 -0
- package/dist/types/capabilities/spoken.d.ts +19 -0
- package/dist/types/capabilities/visibility.d.ts +32 -0
- package/dist/types/claw/credential.d.ts +8 -0
- package/dist/types/claw/errors.d.ts +61 -0
- package/dist/types/claw/lenient.d.ts +23 -0
- package/dist/types/claw/message-text.d.ts +28 -0
- package/dist/types/claw/model.d.ts +118 -0
- package/dist/types/claw/py-value.d.ts +7 -0
- package/dist/types/claw/remote.d.ts +138 -0
- package/dist/types/claw/requester-view.d.ts +15 -0
- package/dist/types/claw/service-refusal.d.ts +4 -0
- package/dist/types/claw/sse.d.ts +12 -0
- package/dist/types/claw/started-review.d.ts +7 -0
- package/dist/types/claw/work-item.d.ts +25 -0
- package/dist/types/commands/agent-args.d.ts +9 -0
- package/dist/types/commands/names.d.ts +19 -0
- package/dist/types/commands/parse.d.ts +33 -0
- package/dist/types/commands/repo.d.ts +17 -0
- package/dist/types/config/settings.d.ts +124 -0
- package/dist/types/direct-chat/direct-chat.d.ts +73 -0
- package/dist/types/direct-chat/index.d.ts +2 -0
- package/dist/types/errors.d.ts +15 -0
- package/dist/types/feedback/deadline.d.ts +10 -0
- package/dist/types/feedback/delivery.d.ts +34 -0
- package/dist/types/feedback/exchange.d.ts +19 -0
- package/dist/types/feedback/flow.d.ts +36 -0
- package/dist/types/feedback/handlers.d.ts +16 -0
- package/dist/types/feedback/history.d.ts +20 -0
- package/dist/types/feedback/identifiers.d.ts +16 -0
- package/dist/types/feedback/index.d.ts +16 -0
- package/dist/types/feedback/iso-time.d.ts +2 -0
- package/dist/types/feedback/issue-text.d.ts +50 -0
- package/dist/types/feedback/log-text.d.ts +13 -0
- package/dist/types/feedback/markdown.d.ts +4 -0
- package/dist/types/feedback/reporting.d.ts +25 -0
- package/dist/types/feedback/scene.d.ts +65 -0
- package/dist/types/feedback/service.d.ts +74 -0
- package/dist/types/feedback/thumbs.d.ts +59 -0
- package/dist/types/feedback/views.d.ts +35 -0
- package/dist/types/guardrails/correlation.d.ts +8 -0
- package/dist/types/guardrails/guardrails.d.ts +49 -0
- package/dist/types/guardrails/index.d.ts +4 -0
- package/dist/types/guardrails/operations.d.ts +22 -0
- package/dist/types/guardrails/sha256.d.ts +1 -0
- package/dist/types/inbound-text/index.d.ts +9 -0
- package/dist/types/inbound-text/marked-text.d.ts +20 -0
- package/dist/types/inbound-text/quote-block.d.ts +26 -0
- package/dist/types/inbound-text/redact.d.ts +8 -0
- package/dist/types/inbound-text/when.d.ts +2 -0
- package/dist/types/inbound-text/with-links.d.ts +20 -0
- package/dist/types/index.d.ts +73 -0
- package/dist/types/json.d.ts +5 -0
- package/dist/types/language/detect.d.ts +21 -0
- package/dist/types/limits/inbound-stats.d.ts +42 -0
- package/dist/types/limits/index.d.ts +5 -0
- package/dist/types/limits/rate-limiter.d.ts +32 -0
- package/dist/types/limits/user-limits.d.ts +18 -0
- package/dist/types/limits/wait-words.d.ts +3 -0
- package/dist/types/locales/account.d.ts +49 -0
- package/dist/types/locales/approval-decisions.d.ts +28 -0
- package/dist/types/locales/approval.d.ts +31 -0
- package/dist/types/locales/assistant-actions.d.ts +65 -0
- package/dist/types/locales/assistant-board.d.ts +14 -0
- package/dist/types/locales/assistant-cards.d.ts +81 -0
- package/dist/types/locales/assistant-chat.d.ts +13 -0
- package/dist/types/locales/assistant-devenv-hide.d.ts +23 -0
- package/dist/types/locales/assistant-work-clicks.d.ts +98 -0
- package/dist/types/locales/assistant.d.ts +5 -0
- package/dist/types/locales/brief.d.ts +29 -0
- package/dist/types/locales/catalog.d.ts +24 -0
- package/dist/types/locales/claw.d.ts +5 -0
- package/dist/types/locales/commands.d.ts +12 -0
- package/dist/types/locales/connector-reasons.d.ts +95 -0
- package/dist/types/locales/connector-setup.d.ts +20 -0
- package/dist/types/locales/feedback.d.ts +75 -0
- package/dist/types/locales/group.d.ts +33 -0
- package/dist/types/locales/guardrails.d.ts +22 -0
- package/dist/types/locales/help-lead.d.ts +15 -0
- package/dist/types/locales/index.d.ts +16 -0
- package/dist/types/locales/lang.d.ts +9 -0
- package/dist/types/locales/limits.d.ts +19 -0
- package/dist/types/locales/link.d.ts +40 -0
- package/dist/types/locales/observe.d.ts +113 -0
- package/dist/types/locales/proactive-lines.d.ts +12 -0
- package/dist/types/locales/proactive.d.ts +62 -0
- package/dist/types/locales/remote-agents.d.ts +216 -0
- package/dist/types/locales/remote-leads.d.ts +13 -0
- package/dist/types/locales/remote-window-card.d.ts +46 -0
- package/dist/types/locales/remote-window.d.ts +21 -0
- package/dist/types/locales/remote.d.ts +365 -0
- package/dist/types/locales/review-account.d.ts +43 -0
- package/dist/types/locales/review-github.d.ts +19 -0
- package/dist/types/locales/review-receipt.d.ts +45 -0
- package/dist/types/locales/review-request.d.ts +21 -0
- package/dist/types/locales/review-start.d.ts +46 -0
- package/dist/types/locales/routing.d.ts +21 -0
- package/dist/types/locales/sessions.d.ts +38 -0
- package/dist/types/locales/settings.d.ts +46 -0
- package/dist/types/locales/steps.d.ts +42 -0
- package/dist/types/locales/transparency.d.ts +18 -0
- package/dist/types/locales/turn.d.ts +70 -0
- package/dist/types/locales/typed-answer.d.ts +32 -0
- package/dist/types/note/note.d.ts +22 -0
- package/dist/types/observability/ip-address.d.ts +13 -0
- package/dist/types/observability/metrics-catalog.d.ts +17 -0
- package/dist/types/observability/security-events.d.ts +26 -0
- package/dist/types/observability/security-fields.d.ts +8 -0
- package/dist/types/observability/security-log.d.ts +21 -0
- package/dist/types/observe/board.d.ts +18 -0
- package/dist/types/observe/command.d.ts +6 -0
- package/dist/types/observe/index.d.ts +6 -0
- package/dist/types/observe/observer.d.ts +45 -0
- package/dist/types/observe/suggestions.d.ts +16 -0
- package/dist/types/observe/views.d.ts +19 -0
- package/dist/types/own.d.ts +9 -0
- package/dist/types/plugins/feedback-sink.d.ts +31 -0
- package/dist/types/plugins/identity-lookup.d.ts +21 -0
- package/dist/types/plugins/index.d.ts +31 -0
- package/dist/types/plugins/integrations.d.ts +34 -0
- package/dist/types/plugins/key-revoker.d.ts +10 -0
- package/dist/types/plugins/model-refusal-policy.d.ts +25 -0
- package/dist/types/plugins/route-extension.d.ts +27 -0
- package/dist/types/plugins/token-exchange.d.ts +36 -0
- package/dist/types/ports/claw/assistant.d.ts +55 -0
- package/dist/types/ports/claw/index.d.ts +28 -0
- package/dist/types/ports/claw/remote-agents.d.ts +53 -0
- package/dist/types/ports/claw/sessions.d.ts +105 -0
- package/dist/types/ports/claw/settings.d.ts +62 -0
- package/dist/types/ports/claw/work-items.d.ts +32 -0
- package/dist/types/ports/clock.d.ts +17 -0
- package/dist/types/ports/crypto.d.ts +15 -0
- package/dist/types/ports/github.d.ts +97 -0
- package/dist/types/ports/index.d.ts +18 -0
- package/dist/types/ports/logger.d.ts +19 -0
- package/dist/types/ports/metrics.d.ts +21 -0
- package/dist/types/ports/random.d.ts +15 -0
- package/dist/types/ports/request-scope.d.ts +31 -0
- package/dist/types/ports/routing.d.ts +107 -0
- package/dist/types/ports/secret-source.d.ts +21 -0
- package/dist/types/ports/store/approvals.d.ts +47 -0
- package/dist/types/ports/store/assistant.d.ts +104 -0
- package/dist/types/ports/store/feedback.d.ts +80 -0
- package/dist/types/ports/store/github.d.ts +81 -0
- package/dist/types/ports/store/idempotency.d.ts +21 -0
- package/dist/types/ports/store/index.d.ts +65 -0
- package/dist/types/ports/store/json.d.ts +4 -0
- package/dist/types/ports/store/link.d.ts +39 -0
- package/dist/types/ports/store/notify.d.ts +28 -0
- package/dist/types/ports/store/observe.d.ts +53 -0
- package/dist/types/ports/store/onboarding.d.ts +49 -0
- package/dist/types/ports/store/people.d.ts +77 -0
- package/dist/types/ports/store/policy.d.ts +60 -0
- package/dist/types/ports/store/remote.d.ts +114 -0
- package/dist/types/ports/store/sessions.d.ts +59 -0
- package/dist/types/ports/store/turns.d.ts +30 -0
- package/dist/types/ports/surface.d.ts +394 -0
- package/dist/types/ports/turn-cards.d.ts +52 -0
- package/dist/types/proactive/deliver.d.ts +52 -0
- package/dist/types/proactive/deps.d.ts +77 -0
- package/dist/types/proactive/events.d.ts +10 -0
- package/dist/types/proactive/index.d.ts +6 -0
- package/dist/types/proactive/proactive.d.ts +62 -0
- package/dist/types/proactive/quiet.d.ts +27 -0
- package/dist/types/proactive/release.d.ts +24 -0
- package/dist/types/proactive/said-memory.d.ts +21 -0
- package/dist/types/proactive/views.d.ts +67 -0
- package/dist/types/protocol/claw-api/assistant-events.d.ts +223 -0
- package/dist/types/protocol/claw-api/index.d.ts +5 -0
- package/dist/types/protocol/claw-api/notifications.d.ts +85 -0
- package/dist/types/protocol/claw-api/reviews.d.ts +63 -0
- package/dist/types/protocol/claw-api/session-events.d.ts +34 -0
- package/dist/types/protocol/claw-api/work-items.d.ts +75 -0
- package/dist/types/protocol/remote-agents.d.ts +230 -0
- package/dist/types/protocol.d.ts +10 -0
- package/dist/types/public-error/classify.d.ts +21 -0
- package/dist/types/public-error/index.d.ts +4 -0
- package/dist/types/public-error/patterns.d.ts +20 -0
- package/dist/types/public-error/public-error-log.d.ts +15 -0
- package/dist/types/public-error/public-errors.d.ts +20 -0
- package/dist/types/remote/actions.d.ts +36 -0
- package/dist/types/remote/agents.d.ts +37 -0
- package/dist/types/remote/answer.d.ts +9 -0
- package/dist/types/remote/board.d.ts +108 -0
- package/dist/types/remote/cards.d.ts +4 -0
- package/dist/types/remote/chat-key.d.ts +13 -0
- package/dist/types/remote/chats.d.ts +76 -0
- package/dist/types/remote/clicks-machine.d.ts +24 -0
- package/dist/types/remote/clicks-start.d.ts +36 -0
- package/dist/types/remote/clicks.d.ts +61 -0
- package/dist/types/remote/commands.d.ts +60 -0
- package/dist/types/remote/connector/reasons.d.ts +31 -0
- package/dist/types/remote/connector/setup.d.ts +62 -0
- package/dist/types/remote/context.d.ts +101 -0
- package/dist/types/remote/conversations.d.ts +37 -0
- package/dist/types/remote/ended.d.ts +25 -0
- package/dist/types/remote/events.d.ts +65 -0
- package/dist/types/remote/fields.d.ts +7 -0
- package/dist/types/remote/follow/control.d.ts +39 -0
- package/dist/types/remote/follow/follower.d.ts +85 -0
- package/dist/types/remote/follow/inbox.d.ts +16 -0
- package/dist/types/remote/follow/speaker.d.ts +122 -0
- package/dist/types/remote/follow/steps.d.ts +9 -0
- package/dist/types/remote/follow/timings.d.ts +29 -0
- package/dist/types/remote/health.d.ts +20 -0
- package/dist/types/remote/index.d.ts +21 -0
- package/dist/types/remote/inert.d.ts +18 -0
- package/dist/types/remote/limits.d.ts +48 -0
- package/dist/types/remote/lines.d.ts +66 -0
- package/dist/types/remote/links/answer.d.ts +7 -0
- package/dist/types/remote/links/domains.d.ts +19 -0
- package/dist/types/remote/links/hosts.d.ts +2 -0
- package/dist/types/remote/links/scans.d.ts +27 -0
- package/dist/types/remote/listing.d.ts +38 -0
- package/dist/types/remote/lists.d.ts +56 -0
- package/dist/types/remote/machines.d.ts +54 -0
- package/dist/types/remote/marks.d.ts +5 -0
- package/dist/types/remote/model.d.ts +51 -0
- package/dist/types/remote/options.d.ts +20 -0
- package/dist/types/remote/permissions.d.ts +41 -0
- package/dist/types/remote/ports.d.ts +143 -0
- package/dist/types/remote/prompt.d.ts +60 -0
- package/dist/types/remote/refusals.d.ts +40 -0
- package/dist/types/remote/remote-agents.d.ts +84 -0
- package/dist/types/remote/reported.d.ts +8 -0
- package/dist/types/remote/session-ops.d.ts +57 -0
- package/dist/types/remote/sessions.d.ts +80 -0
- package/dist/types/remote/setup.d.ts +26 -0
- package/dist/types/remote/state.d.ts +55 -0
- package/dist/types/remote/tail.d.ts +63 -0
- package/dist/types/remote/targets.d.ts +66 -0
- package/dist/types/remote/tasks.d.ts +20 -0
- package/dist/types/remote/time.d.ts +15 -0
- package/dist/types/remote/turn-state.d.ts +29 -0
- package/dist/types/remote/turns/chat-turn.d.ts +50 -0
- package/dist/types/remote/turns/display.d.ts +18 -0
- package/dist/types/remote/turns/outcome.d.ts +41 -0
- package/dist/types/remote/turns/runner.d.ts +55 -0
- package/dist/types/remote/turns/signer.d.ts +14 -0
- package/dist/types/remote/turns/window-turn.d.ts +29 -0
- package/dist/types/remote/views.d.ts +13 -0
- package/dist/types/remote/watches.d.ts +64 -0
- package/dist/types/remote/window/closer.d.ts +14 -0
- package/dist/types/remote/window/index.d.ts +2 -0
- package/dist/types/remote/window/output.d.ts +28 -0
- package/dist/types/remote/window/view.d.ts +73 -0
- package/dist/types/remote-view/agents-view.d.ts +88 -0
- package/dist/types/remote-view/conversations-view.d.ts +51 -0
- package/dist/types/remote-view/hidden-view.d.ts +20 -0
- package/dist/types/remote-view/index.d.ts +40 -0
- package/dist/types/remote-view/live-view.d.ts +44 -0
- package/dist/types/remote-view/machine-views.d.ts +73 -0
- package/dist/types/remote-view/messages.d.ts +3 -0
- package/dist/types/remote-view/permission-view.d.ts +55 -0
- package/dist/types/remote-view/sessions-view.d.ts +70 -0
- package/dist/types/remote-view/status-view.d.ts +52 -0
- package/dist/types/remote-view/window-view.d.ts +68 -0
- package/dist/types/result.d.ts +31 -0
- package/dist/types/review/connect/connections.d.ts +24 -0
- package/dist/types/review/connect/github-connect.d.ts +50 -0
- package/dist/types/review/connect/questions.d.ts +6 -0
- package/dist/types/review/connect/review-ask.d.ts +1 -0
- package/dist/types/review/consent.d.ts +13 -0
- package/dist/types/review/handoff.d.ts +22 -0
- package/dist/types/review/held.d.ts +15 -0
- package/dist/types/review/index.d.ts +14 -0
- package/dist/types/review/intent-check.d.ts +36 -0
- package/dist/types/review/outcome.d.ts +36 -0
- package/dist/types/review/progress.d.ts +50 -0
- package/dist/types/review/prompts.d.ts +2 -0
- package/dist/types/review/receipt.d.ts +45 -0
- package/dist/types/review/refusals.d.ts +44 -0
- package/dist/types/review/request-parse.d.ts +40 -0
- package/dist/types/review/review-turn.d.ts +83 -0
- package/dist/types/review/service/account.d.ts +52 -0
- package/dist/types/review/service/chat.d.ts +18 -0
- package/dist/types/review/service/confirm.d.ts +49 -0
- package/dist/types/review/service/deps.d.ts +100 -0
- package/dist/types/review/service/follow.d.ts +53 -0
- package/dist/types/review/service/github-review.d.ts +72 -0
- package/dist/types/review/service/handoff-action.d.ts +32 -0
- package/dist/types/review/service/identity.d.ts +27 -0
- package/dist/types/review/service/item-cards.d.ts +39 -0
- package/dist/types/review/service/items.d.ts +57 -0
- package/dist/types/review/service/launch.d.ts +37 -0
- package/dist/types/review/service/notices.d.ts +42 -0
- package/dist/types/review/service/request.d.ts +58 -0
- package/dist/types/review/service/reviewer.d.ts +48 -0
- package/dist/types/review/service/routed-turn.d.ts +20 -0
- package/dist/types/review/service/start.d.ts +65 -0
- package/dist/types/review/service/turns.d.ts +38 -0
- package/dist/types/review/summary.d.ts +11 -0
- package/dist/types/review/views.d.ts +91 -0
- package/dist/types/review-text/asks.d.ts +13 -0
- package/dist/types/review-text/bare-numbers.d.ts +29 -0
- package/dist/types/review-text/index.d.ts +10 -0
- package/dist/types/review-text/markers.d.ts +6 -0
- package/dist/types/review-text/names.d.ts +60 -0
- package/dist/types/review-text/pull-ref.d.ts +25 -0
- package/dist/types/review-text/text/scan.d.ts +19 -0
- package/dist/types/review-text/text/unicode.d.ts +22 -0
- package/dist/types/routing/admission.d.ts +83 -0
- package/dist/types/routing/chat.d.ts +52 -0
- package/dist/types/routing/command-table.d.ts +32 -0
- package/dist/types/routing/commands-account.d.ts +26 -0
- package/dist/types/routing/commands-session.d.ts +40 -0
- package/dist/types/routing/commands-settings.d.ts +17 -0
- package/dist/types/routing/context.d.ts +38 -0
- package/dist/types/routing/credentials.d.ts +53 -0
- package/dist/types/routing/deps.d.ts +116 -0
- package/dist/types/routing/features.d.ts +256 -0
- package/dist/types/routing/group-remote.d.ts +26 -0
- package/dist/types/routing/group-router.d.ts +42 -0
- package/dist/types/routing/identity.d.ts +18 -0
- package/dist/types/routing/index.d.ts +26 -0
- package/dist/types/routing/link-commands.d.ts +26 -0
- package/dist/types/routing/lock.d.ts +5 -0
- package/dist/types/routing/onboarding.d.ts +51 -0
- package/dist/types/routing/personal-router.d.ts +34 -0
- package/dist/types/routing/personal-text.d.ts +62 -0
- package/dist/types/routing/router.d.ts +57 -0
- package/dist/types/routing/show-here.d.ts +18 -0
- package/dist/types/routing/stop-press.d.ts +19 -0
- package/dist/types/routing/time.d.ts +31 -0
- package/dist/types/routing/turn-registry.d.ts +71 -0
- package/dist/types/routing/turn-runner.d.ts +82 -0
- package/dist/types/routing/turn-start.d.ts +81 -0
- package/dist/types/routing/views.d.ts +104 -0
- package/dist/types/security/redact-scan.d.ts +19 -0
- package/dist/types/security/redact-text.d.ts +14 -0
- package/dist/types/security/redact.d.ts +2 -0
- package/dist/types/subscriptions/event-types.d.ts +29 -0
- package/dist/types/subscriptions/index.d.ts +3 -0
- package/dist/types/subscriptions/ports.d.ts +9 -0
- package/dist/types/subscriptions/subscriptions.d.ts +69 -0
- package/dist/types/text/neutral.d.ts +1 -0
- package/dist/types/text/plain.d.ts +6 -0
- package/dist/types/text/py-chars.d.ts +12 -0
- package/dist/types/text/py-json.d.ts +23 -0
- package/dist/types/text/py-number.d.ts +18 -0
- package/dist/types/text/py-regex-escapes.d.ts +32 -0
- package/dist/types/text/py-regex.d.ts +36 -0
- package/dist/types/text/py-text.d.ts +64 -0
- package/dist/types/turn/answer-parts.d.ts +23 -0
- package/dist/types/turn/changes.d.ts +42 -0
- package/dist/types/turn/clip.d.ts +6 -0
- package/dist/types/turn/deliveries.d.ts +31 -0
- package/dist/types/turn/engine/claw-errors.d.ts +7 -0
- package/dist/types/turn/engine/consume.d.ts +35 -0
- package/dist/types/turn/engine/context.d.ts +157 -0
- package/dist/types/turn/engine/extras.d.ts +16 -0
- package/dist/types/turn/engine/fallback.d.ts +17 -0
- package/dist/types/turn/engine/outcome.d.ts +33 -0
- package/dist/types/turn/engine/run-turn.d.ts +22 -0
- package/dist/types/turn/engine/submit.d.ts +23 -0
- package/dist/types/turn/files.d.ts +10 -0
- package/dist/types/turn/github-outcome.d.ts +16 -0
- package/dist/types/turn/index.d.ts +26 -0
- package/dist/types/turn/json.d.ts +10 -0
- package/dist/types/turn/last-answer.d.ts +44 -0
- package/dist/types/turn/live-view.d.ts +67 -0
- package/dist/types/turn/plan.d.ts +31 -0
- package/dist/types/turn/ports.d.ts +15 -0
- package/dist/types/turn/progress/answer-messages.d.ts +20 -0
- package/dist/types/turn/progress/status-message.d.ts +144 -0
- package/dist/types/turn/progress/status-policy.d.ts +66 -0
- package/dist/types/turn/progress/status-text.d.ts +10 -0
- package/dist/types/turn/progress/stream-handle.d.ts +39 -0
- package/dist/types/turn/records.d.ts +10 -0
- package/dist/types/turn/runner.d.ts +106 -0
- package/dist/types/turn/step-labels.d.ts +28 -0
- package/dist/types/turn/step.d.ts +26 -0
- package/dist/types/turn/stop-buttons.d.ts +62 -0
- package/dist/types/turn/task.d.ts +33 -0
- package/dist/types/turn/turn-state.d.ts +70 -0
- package/dist/types/turn/views.d.ts +23 -0
- package/dist/types/typed-answer/index.d.ts +8 -0
- package/dist/types/typed-answer/mode.d.ts +38 -0
- package/dist/types/typed-answer/patterns.d.ts +25 -0
- package/dist/types/typed-answer/prompt.d.ts +5 -0
- package/dist/types/typed-answer/read.d.ts +16 -0
- package/dist/types/understanding/commands.d.ts +14 -0
- package/dist/types/understanding/context.d.ts +49 -0
- package/dist/types/understanding/index.d.ts +11 -0
- package/dist/types/understanding/limits.d.ts +6 -0
- package/dist/types/understanding/people.d.ts +31 -0
- package/dist/types/understanding/record.d.ts +10 -0
- package/dist/types/understanding/review-stop.d.ts +7 -0
- package/dist/types/understanding/sequence-matcher.d.ts +7 -0
- package/dist/types/validate.d.ts +15 -0
- package/package.json +35 -4
- package/README.md +0 -3
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { sessionControl, switchCommand } from "./sessions-words.js";
|
|
2
|
+
import { clockOf } from "./spoken.js";
|
|
3
|
+
export { clockOf, sessionControl, switchCommand };
|
|
4
|
+
/** `key` (a whole message as `phraseKey` makes it) without the words people put around a detach, from either end, repeatedly. */
|
|
5
|
+
export declare function detachKey(key: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Every pattern a command said in plain words is read with, by family. No two `\s*` meet across an optional part in any
|
|
8
|
+
* of them (a run of spaces could then be split between them in every way before a match fails: polynomial time), which
|
|
9
|
+
* the ReDoS tests check by running each over adversarial input.
|
|
10
|
+
*/
|
|
11
|
+
export declare const NATURAL_PATTERNS: readonly (readonly [string, readonly RegExp[]])[];
|
|
12
|
+
/**
|
|
13
|
+
* `text` as the command it means when it is one of the plain sentences help teaches (or a close way of saying it), else `text`
|
|
14
|
+
* itself. Only the whole message counts. `group`: a group chat reads only what a group may do (help, stop, a new session, which
|
|
15
|
+
* account, feedback). `off`: what this chat cannot do right now, as a command word (`board` without the assistant, `github` without
|
|
16
|
+
* the review service, `agents` and `agent` with remote agents off) or a command and its verb (`agent detach` with no agent
|
|
17
|
+
* attached): a sentence that would mean one of them stays the words it is, for Claw.
|
|
18
|
+
*/
|
|
19
|
+
export declare function naturalCommand(text: string, group?: boolean, off?: ReadonlySet<string>): string;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The plain sentences help teaches, and close ways of saying the same, each read as the command it means (`natural.ts`). A whole
|
|
3
|
+
* message is looked up as a phrase: lower case, no spaces between the words, no punctuation at either end (`phraseKey`).
|
|
4
|
+
*/
|
|
5
|
+
export declare const HELP: string[];
|
|
6
|
+
export declare const STOP: string[];
|
|
7
|
+
/**
|
|
8
|
+
* "Stop it" said to a chat attached to an agent's session: that agent's turn is stopped (`/stop`). With the assistant the same words
|
|
9
|
+
* are the assistant's to read, so they are a command only while attached (`naturalCommand`'s `off` carries "stop it" otherwise).
|
|
10
|
+
*/
|
|
11
|
+
export declare const STOP_IT: string[];
|
|
12
|
+
export declare const NEW: string[];
|
|
13
|
+
export declare const SESSIONS: string[];
|
|
14
|
+
export declare const BOARD: string[];
|
|
15
|
+
export declare const WHOAMI: string[];
|
|
16
|
+
export declare const MEMORY: string[];
|
|
17
|
+
export declare const MEMORY_ON: string[];
|
|
18
|
+
export declare const MEMORY_OFF: string[];
|
|
19
|
+
export declare const UNLINK: string[];
|
|
20
|
+
export declare const AGENTS: string[];
|
|
21
|
+
export declare const AGENT_SESSIONS: string[];
|
|
22
|
+
export declare const DETACH: string[];
|
|
23
|
+
/**
|
|
24
|
+
* What people put around "回到助理" without changing what it asks (好了,回到助理吧 / ok, back to the assistant please): dropped from
|
|
25
|
+
* either end before the phrase is looked up. Only these words: "回到助理然后跑测试" is not a detach.
|
|
26
|
+
*/
|
|
27
|
+
export declare const DETACH_LEAD: string[];
|
|
28
|
+
export declare const DETACH_TAIL: string[];
|
|
29
|
+
export declare const RESUME: string[];
|
|
30
|
+
export declare const QUIET_SHOW: string[];
|
|
31
|
+
export declare const QUIET_OFF: string[];
|
|
32
|
+
export declare const BRIEF_OFF: string[];
|
|
33
|
+
export declare const BRIEF_NOW: string[];
|
|
34
|
+
export declare const PAUSE_ALL: string[];
|
|
35
|
+
export declare const GITHUB_BIND: string[];
|
|
36
|
+
export declare const GITHUB_UNBIND: string[];
|
|
37
|
+
export declare const GITHUB_STATUS: string[];
|
|
38
|
+
export declare const DELEGATION_ON: string[];
|
|
39
|
+
export declare const DELEGATION_OFF: string[];
|
|
40
|
+
export declare const TIMEZONE_SHOW: string[];
|
|
41
|
+
export declare const LANG_AUTO: string[];
|
|
42
|
+
export declare const FEEDBACK_ALONE: string[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the bot can do for a person, as one registry; help is rendered from it (`help.ts`).
|
|
3
|
+
*
|
|
4
|
+
* Help teaches what can be got done, grouped by what it is for, each with one sentence a person would really type on a phone; it
|
|
5
|
+
* does not list commands. The slash commands keep working, and the commands menu has the common ones, which help says once at the
|
|
6
|
+
* end. `test/capabilities.test.ts` walks the code's closed sets and fails when one is not covered by an entry here, and sends every
|
|
7
|
+
* example sentence through the real routing to check it reaches the capability it is the example of.
|
|
8
|
+
*/
|
|
9
|
+
import type { Capability } from "./capability.js";
|
|
10
|
+
export { CATEGORIES, type Capability, type CapabilityMode, type Category, type CategoryKey, type Part, type Where, } from "./capability.js";
|
|
11
|
+
export declare const CAPABILITIES: readonly Capability[];
|
|
12
|
+
export declare function byKey(key: string): Capability;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Whether the whole message asks to switch the chat to another agent session or to open a new one. */
|
|
2
|
+
export declare function sessionControl(text: string): boolean;
|
|
3
|
+
/** The session-control and switch patterns, for the ReDoS tests (see natural.ts NATURAL_PATTERNS). */
|
|
4
|
+
export declare const SESSION_PATTERNS: readonly (readonly [string, readonly RegExp[]])[];
|
|
5
|
+
/**
|
|
6
|
+
* `/agent attach MACHINE/AGENT` (or `/agent attach AGENT`) when the whole message asks to switch the chat to an agent's session, as
|
|
7
|
+
* people say it ("切到 robin-dev-pod 的 claude", "switch to claude on robin-dev-pod"); else null.
|
|
8
|
+
*/
|
|
9
|
+
export declare function switchCommand(text: string): string | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** The punctuation and spacing a whole message may carry at either end without changing what it says. */
|
|
2
|
+
export declare const PUNCT = " \t\r\n\u3002\uFF0E.\uFF01!\uFF1F?\uFF5E~\uFF0C,\u3001\uFF1B;\uFF1A:\"'\u201C\u201D\u2018\u2019\uFF08\uFF09()";
|
|
3
|
+
/** What a sentence may end with ("切到 X 的 claude。"): dropped before it is matched whole. */
|
|
4
|
+
export declare const TRAILING = "\u3002.\uFF01!\uFF1F?\uFF5E~ ";
|
|
5
|
+
/** One or two digits, or a Chinese number up to 99. */
|
|
6
|
+
export declare const NUM: string;
|
|
7
|
+
export declare const PERIOD: string;
|
|
8
|
+
/** A time of day: "22:00", "晚上 10 点", "8 点半", "九点十五分". No capturing groups: it is used inside other patterns. */
|
|
9
|
+
export declare const TIME: string;
|
|
10
|
+
/** A whole message as a phrase to look up: lower case, no spaces between the words, no punctuation at either end. */
|
|
11
|
+
export declare function phraseKey(text: string): string;
|
|
12
|
+
/** A whole message as it is matched against a sentence pattern: no spacing at either end, no closing punctuation. */
|
|
13
|
+
export declare function flatten(text: string): string;
|
|
14
|
+
/** A number as written ("12", "十二", "两"); null when it is none. */
|
|
15
|
+
export declare function spokenNumber(text: string): number | null;
|
|
16
|
+
/** '晚上 10 点' / '早上 8 点半' / '22:00' / '九点' as '22:00' / '08:30' / '22:00' / '09:00'; null when it is no time of day. */
|
|
17
|
+
export declare function clockOf(text: string): string | null;
|
|
18
|
+
/** A duration as `/pause` takes it ("30m", "2h", "1d") from a number and a unit as said; null when it is none. */
|
|
19
|
+
export declare function spokenDuration(count: string, unit: string): string | null;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type Capability, type Part } from "./registry.js";
|
|
2
|
+
export interface ChatShape {
|
|
3
|
+
readonly group: boolean;
|
|
4
|
+
readonly assistant: boolean;
|
|
5
|
+
readonly parts: ReadonlySet<Part>;
|
|
6
|
+
readonly understanding?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** Whether help shows `c` in this chat: a group shows what works in a group, a 1:1 chat what works there. */
|
|
9
|
+
export declare function shown(c: Capability, chat: ChatShape): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* What the assistant may never ask a chat to do, whatever a message says: what cannot be undone (/unlink, /github unbind), what binds
|
|
12
|
+
* an account (/link, /github bind), and what loosens a safety setting (/github auto-merge, the confirmation setting).
|
|
13
|
+
*/
|
|
14
|
+
export declare const NOT_ACTIONS: ReadonlySet<string>;
|
|
15
|
+
/**
|
|
16
|
+
* `agent` is declared only with these verbs: switching the chat to a session, back, and the list. Starting, closing, a mode that does
|
|
17
|
+
* not ask and disconnecting a machine are the person's own taps.
|
|
18
|
+
*/
|
|
19
|
+
export declare const AGENT_ACTION_VERBS: readonly ["attach", "detach", "sessions"];
|
|
20
|
+
export declare const AGENT_ACTION_USAGE: string;
|
|
21
|
+
/** The arguments of an `agent` action the assistant asked for are one of AGENT_ACTION_VERBS, with at most one reference. */
|
|
22
|
+
export declare function agentActionAllowed(args: string): boolean;
|
|
23
|
+
export interface ChannelAction {
|
|
24
|
+
readonly name: string;
|
|
25
|
+
readonly usage: string;
|
|
26
|
+
readonly summary: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The actions a 1:1 chat with the assistant declares: the capabilities marked `action` that this chat shows, as the command the
|
|
30
|
+
* assistant may ask for, how it is written, and what it is for. `agent` is declared once, with one usage line for its verbs.
|
|
31
|
+
*/
|
|
32
|
+
export declare function channelActions(parts: ReadonlySet<Part>): ChannelAction[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a Claw call is made with: a person's own linked API key (`ak-...`) or an identity token the identity service
|
|
3
|
+
* exchanged for them. The credential is a per-call argument and never kept on the client, so no code path can reach Claw
|
|
4
|
+
* with a credential other than the one its caller names.
|
|
5
|
+
*/
|
|
6
|
+
export type ClawCredential = string;
|
|
7
|
+
/** Whether `credential` is a person's linked API key rather than an exchanged identity token. */
|
|
8
|
+
export declare function isApiKey(credential: ClawCredential): boolean;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/** Whether `code` is a plain snake_case error word ("connector_outdated"), safe to put in front of a person or in a log. */
|
|
2
|
+
export declare function isErrorWord(code: string): boolean;
|
|
3
|
+
/** The `error` word of Claw's `{"ok": false, "error": "..."}` answer in `detail` ("" when the body is not that). */
|
|
4
|
+
export declare function errorCodeOf(detail: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* Claw refused or failed a call. `detail` keeps the start of the answer's body so that `code` can read Claw's error word,
|
|
7
|
+
* but the error's message is only the status and that word: a body can echo what the request carried.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ClawError extends Error {
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly status: number;
|
|
12
|
+
readonly detail: string;
|
|
13
|
+
constructor(status: number, detail?: string);
|
|
14
|
+
/** The `error` word of Claw's answer ("" when the body is not that). */
|
|
15
|
+
get code(): string;
|
|
16
|
+
}
|
|
17
|
+
/** The answer Claw gives for an id that is not the caller's; also what an id that is not a Claw id is refused as. */
|
|
18
|
+
export declare function notAClawId(): ClawError;
|
|
19
|
+
/**
|
|
20
|
+
* Claw refused a request for reviews as a whole (it starts all of them or none): its `error` word, its sentence for a
|
|
21
|
+
* person (`said`) and its `data` (which pull request, the limit, what remains).
|
|
22
|
+
*/
|
|
23
|
+
export declare class ReviewsRefused extends ClawError {
|
|
24
|
+
readonly name: string;
|
|
25
|
+
readonly error: string;
|
|
26
|
+
readonly said: string;
|
|
27
|
+
readonly data: Readonly<Record<string, unknown>>;
|
|
28
|
+
constructor(status: number, error: string, said: string, data: Readonly<Record<string, unknown>>);
|
|
29
|
+
}
|
|
30
|
+
/** A reply this process will not hold: larger than the caller allows, or content-encoded. */
|
|
31
|
+
export declare class ReplayRefused extends Error {
|
|
32
|
+
readonly name: string;
|
|
33
|
+
}
|
|
34
|
+
/** Claw answered with something this client does not understand (not a list, an item without an id, ...). */
|
|
35
|
+
export declare class ClawAnswerInvalid extends Error {
|
|
36
|
+
readonly name: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A call that would send the wrong kind of credential, refused before anything goes out: an `ak-` API key where only an
|
|
40
|
+
* exchanged identity token may go, or a model key next to an API key.
|
|
41
|
+
*/
|
|
42
|
+
export declare class CredentialMisuse extends Error {
|
|
43
|
+
readonly name: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* How a call failed to reach Claw: `connect`, the request never went out (no connection could be made: refused, no such
|
|
47
|
+
* host, unreachable; Python's `httpx.ConnectError`); `timeout`, Claw did not answer in time; `network`, the connection
|
|
48
|
+
* broke after the request was sent.
|
|
49
|
+
*/
|
|
50
|
+
export type UnreachableKind = "connect" | "timeout" | "network";
|
|
51
|
+
/** Claw was not reached, or did not answer in time. `kind` says which; the cause's text is never kept. */
|
|
52
|
+
export declare class ClawUnreachable extends Error {
|
|
53
|
+
readonly name: string;
|
|
54
|
+
readonly kind: UnreachableKind;
|
|
55
|
+
constructor(kind: UnreachableKind, what: string);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* What a log line says about a failed call: Claw's status (and error word), or only the kind of error. Never the text of
|
|
59
|
+
* another library's error, which can carry a URL, a header or the body of an answer.
|
|
60
|
+
*/
|
|
61
|
+
export declare function errorKind(err: unknown): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Field readers for Claw's answers, which this agent reads the way the Python worker did: a field that is absent, or of
|
|
3
|
+
* another type than expected, is read as absent (`undefined`) and the reading fills in its own default. The answer as a
|
|
4
|
+
* whole is still checked (an object where an object is expected), by the caller's schema.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
/** A value `schema` accepts, else `undefined`: a field Claw sent wrong is read as one it did not send. */
|
|
8
|
+
export declare function lenient<T extends z.ZodType>(schema: T): z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<Awaited<z.output<T>> | undefined, unknown>>>;
|
|
9
|
+
/** Any string. */
|
|
10
|
+
export declare const anyText: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
11
|
+
/** A string that is not empty (Python's `isinstance(v, str) and v`). */
|
|
12
|
+
export declare const someText: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
13
|
+
/** A whole number (Python's `isinstance(v, int) and not isinstance(v, bool)`). */
|
|
14
|
+
export declare const wholeNumber: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | undefined, unknown>>>;
|
|
15
|
+
export declare const flag: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<boolean | undefined, unknown>>>;
|
|
16
|
+
/** A JSON object (not an array). */
|
|
17
|
+
export declare const objectOf: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<Record<string, unknown> | undefined, unknown>>>;
|
|
18
|
+
/** Whatever was there, unread. */
|
|
19
|
+
export declare const anything: z.ZodOptional<z.ZodUnknown>;
|
|
20
|
+
/** Rows of a list: the ones `schema` accepts (rows that are not objects are left out). */
|
|
21
|
+
export declare function rowsOf<T extends z.ZodType>(schema: T): z.ZodType<Array<z.output<T>>>;
|
|
22
|
+
/** Whether `value` is a JSON object (a dict to Python): not null, not an array. */
|
|
23
|
+
export declare function isObject(value: unknown): value is Record<string, unknown>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the worker appends to a person's message before it goes to Claw, and how it is taken off again: the request
|
|
3
|
+
* for a change summary (the phone has no diff view), then the reply-style rule a Claw rule tool holds.
|
|
4
|
+
*/
|
|
5
|
+
/** What the reply-style rule is introduced with. */
|
|
6
|
+
export declare const RULE_HEADING = "## Teams reply style (formatting only, facts unchanged)";
|
|
7
|
+
/** What the change-summary request is introduced with. */
|
|
8
|
+
export declare const CHANGE_HEADING = "## Teams change summary (only when files in a git repository changed)";
|
|
9
|
+
/** The change-summary request: about the answer's last lines, not a style, so it is kept apart from the rule. */
|
|
10
|
+
export declare const CHANGE_SUMMARY_RULE: string;
|
|
11
|
+
/** Exactly what the worker appends first, whether or not a rule follows. */
|
|
12
|
+
export declare const CHANGE_SECTION = "\n\n## Teams change summary (only when files in a git repository changed)\n\nIf during this task you changed files in a git working tree, end your answer with a short section titled **Changes**: in one code block, the output of `git diff --stat HEAD` (and, for a new file git does not track yet, its line from `git status --short`), at most 15 lines, then \"+N more files\" for the rest. Read-only commands only; do not stage, commit or push to produce it. If nothing in a git working tree changed, leave the section out.";
|
|
13
|
+
/** A rule is edited in Claw; a changed rule reaches the chat within this. */
|
|
14
|
+
export declare const RULE_TTL_MS = 600000;
|
|
15
|
+
/** A reply-style rule is about 1 KB; anything this large is not one. */
|
|
16
|
+
export declare const RULE_MAX_BYTES = 32768;
|
|
17
|
+
/**
|
|
18
|
+
* `text` as the person wrote it, with what the worker appended taken off again. The change summary is a fixed text and
|
|
19
|
+
* always the first thing appended, so it marks where the person's own words end: it is looked for from the end, and
|
|
20
|
+
* everything from it on goes. A message from before the request existed has only the rule: it is cut where the rule's
|
|
21
|
+
* heading first starts.
|
|
22
|
+
*/
|
|
23
|
+
export declare function withoutRule(text: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* The content of a message to a plain session: the person's text, then the change-summary request (only where a rule
|
|
26
|
+
* tool is configured), then the rule when there is one.
|
|
27
|
+
*/
|
|
28
|
+
export declare function messageContent(text: string, rule: string, withRuleTool: boolean): string;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What this agent reads out of Claw's answers, after they were checked (`ClawPort` implementations and the parsers in
|
|
3
|
+
* this directory build these). The wire shapes themselves are `@claw/protocol`'s (`../protocol.ts`); these are the
|
|
4
|
+
* readings: tolerant of a missing field the way the worker always was, and in this codebase's naming.
|
|
5
|
+
*/
|
|
6
|
+
import type { JsonObject } from "../json.js";
|
|
7
|
+
import type { PrRef } from "../protocol.js";
|
|
8
|
+
/** One pull request: `{owner, repo, number}` as Claw writes it. */
|
|
9
|
+
export type PullRef = Readonly<PrRef>;
|
|
10
|
+
/**
|
|
11
|
+
* One work item as Claw's board shows it (`GET /v1/work-items`) and as an assistant event carries it. `canAccept` is
|
|
12
|
+
* Claw's own word for "a result waits for this person" (false as well when Claw says it needs no acceptance).
|
|
13
|
+
*/
|
|
14
|
+
export interface WorkItem {
|
|
15
|
+
readonly itemId: string;
|
|
16
|
+
readonly seq: number;
|
|
17
|
+
readonly title: string;
|
|
18
|
+
/** in_progress | needs_you | done (another word from a newer Claw is kept as it came). */
|
|
19
|
+
readonly boardState: string;
|
|
20
|
+
readonly resultVersion: number;
|
|
21
|
+
readonly canAccept: boolean;
|
|
22
|
+
readonly lastReportKind: string | null;
|
|
23
|
+
readonly pendingQuestion: string | null;
|
|
24
|
+
readonly summary: string;
|
|
25
|
+
/** accepted | answered | dropped | stopped, once the item is done. */
|
|
26
|
+
readonly outcome: string | null;
|
|
27
|
+
/** task | review | remote. */
|
|
28
|
+
readonly kind: string;
|
|
29
|
+
/** What a review was asked with (`{}` for a task). */
|
|
30
|
+
readonly params: Readonly<JsonObject>;
|
|
31
|
+
/** The pull request of a review item, or null. */
|
|
32
|
+
readonly pull: PullRef | null;
|
|
33
|
+
/** When Claw last changed it (ISO 8601; "" not said). */
|
|
34
|
+
readonly updatedAt: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* What Claw answered to a person's accept, stop or retry: `ok`, or a 409 that says why not (`error`) and carries the item
|
|
38
|
+
* as it is now, so that a card for an old version can be replaced by one for the current one.
|
|
39
|
+
*/
|
|
40
|
+
export interface Decision {
|
|
41
|
+
readonly ok: boolean;
|
|
42
|
+
readonly item: WorkItem;
|
|
43
|
+
/** version_mismatch | not_acceptable | item_closed | ... ("" when ok). */
|
|
44
|
+
readonly error: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* What the asker of a review someone else runs may know of it: its state, the pull request's link, the conclusion and
|
|
48
|
+
* whether it was merged, what a waiting one waits for, what it found, and what the pull request does.
|
|
49
|
+
*/
|
|
50
|
+
export interface AskerView {
|
|
51
|
+
readonly itemId: string;
|
|
52
|
+
readonly status: string;
|
|
53
|
+
readonly prUrl: string;
|
|
54
|
+
/** approve | request_changes | comment ("" none yet). */
|
|
55
|
+
readonly verdict: string;
|
|
56
|
+
readonly merged: boolean;
|
|
57
|
+
/** confirm_merge | confirm_review | failed | reviewer ("" Claw did not say). */
|
|
58
|
+
readonly waitingFor: string;
|
|
59
|
+
/** Open findings posted on the pull request (null: Claw did not say). */
|
|
60
|
+
readonly findings: number | null;
|
|
61
|
+
/** The first open finding in one line ("" none). */
|
|
62
|
+
readonly note: string;
|
|
63
|
+
/** What the pull request does, clipped for showing ("" Claw did not say). */
|
|
64
|
+
readonly prSummary: string;
|
|
65
|
+
}
|
|
66
|
+
/** A review the caller asked of someone else: its item, whom they asked, and their view of it. */
|
|
67
|
+
export interface ReviewAskedOfOther {
|
|
68
|
+
readonly itemId: string;
|
|
69
|
+
readonly reviewer: string;
|
|
70
|
+
readonly view: AskerView;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* One pull request Claw started a review item for (`POST /v1/assistant/reviews`): the item, and the session Claw made
|
|
74
|
+
* for it with its first message queued.
|
|
75
|
+
*/
|
|
76
|
+
export interface ReviewStart {
|
|
77
|
+
readonly target: PullRef;
|
|
78
|
+
readonly itemId: string;
|
|
79
|
+
readonly seq: number;
|
|
80
|
+
readonly title: string;
|
|
81
|
+
/** "" for a review asked of someone else (that person's session, never followed). */
|
|
82
|
+
readonly sessionId: string;
|
|
83
|
+
/** The first turn's id when Claw says it ("" otherwise). */
|
|
84
|
+
readonly messageId: string;
|
|
85
|
+
/** The model Claw says it runs on ("" its default); null: Claw did not say. */
|
|
86
|
+
readonly model: string | null;
|
|
87
|
+
/** The model it was to run on, which the payer's key cannot use ("" none). */
|
|
88
|
+
readonly fellBackFrom: string;
|
|
89
|
+
/** What Claw set aside of the request ("model", "effort"). */
|
|
90
|
+
readonly ignored: readonly string[];
|
|
91
|
+
/** true: every merge waits for the reviewer's confirmation; false: their review mode decides; null: Claw did not say. */
|
|
92
|
+
readonly mergeNeedsConfirmation: boolean | null;
|
|
93
|
+
/** The item limit that was full when Claw queued it ("" it started). */
|
|
94
|
+
readonly queued: string;
|
|
95
|
+
/** Claw merges it with the asker's own account once approved and green. */
|
|
96
|
+
readonly mergeByRequester: boolean;
|
|
97
|
+
}
|
|
98
|
+
/** Which GitHub token Claw's GitHub tools use for the token's own user now (never the token). */
|
|
99
|
+
export interface GithubConnection {
|
|
100
|
+
/** "env" | "binding" | "" (none: `missing` says why). */
|
|
101
|
+
readonly readsWith: string;
|
|
102
|
+
readonly login: string;
|
|
103
|
+
/** "none" | "expired" | "". */
|
|
104
|
+
readonly missing: string;
|
|
105
|
+
readonly bindingReads: boolean;
|
|
106
|
+
}
|
|
107
|
+
/** One frame of a Claw SSE stream. `name` is the `event:` line, or the data's `type` for a plain `message` frame. */
|
|
108
|
+
export interface SseEvent {
|
|
109
|
+
readonly id: string;
|
|
110
|
+
readonly name: string;
|
|
111
|
+
readonly data: Readonly<JsonObject>;
|
|
112
|
+
}
|
|
113
|
+
/** A person's long-term memory in Claw: whether it is on, whether Claw has it at all, and what it remembers. */
|
|
114
|
+
export interface MemoryState {
|
|
115
|
+
readonly enabled: boolean;
|
|
116
|
+
readonly available: boolean;
|
|
117
|
+
readonly items: readonly string[];
|
|
118
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Python's `str(value)` of a JSON value, where the worker wrote `str(x)` without `or ""`: None is "None", a boolean
|
|
3
|
+
* "True" / "False"; a list or an object is written as Python's JSON of it (its repr differs only in quotes).
|
|
4
|
+
*/
|
|
5
|
+
export declare function pyStrOf(value: unknown): string;
|
|
6
|
+
/** `bool(value)` of a JSON value, as the Python worker tested an answer's field: "", 0, false, null, [] and {} are false. */
|
|
7
|
+
export declare function pyTruthy(value: unknown): boolean;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The answers of Claw's remote-agents routes (the user side) as this agent reads them. Claw does not name these list
|
|
3
|
+
* and response shapes in `@claw/protocol` yet (only `RemoteAgentDescriptor`); each field below is what the worker reads.
|
|
4
|
+
* A field that is absent, or of another type than written here, is read as absent (`undefined`): the domain fills in
|
|
5
|
+
* its own default, as the Python worker did with `dict.get`. A row that is not an object is left out.
|
|
6
|
+
*/
|
|
7
|
+
import type { JsonObject } from "../json.js";
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
import type { RemoteHidden } from "../protocol.js";
|
|
10
|
+
/** One agent a connector reports (`RemoteAgentDescriptor`, read leniently). */
|
|
11
|
+
export declare const remoteAgentSchema: z.ZodObject<{
|
|
12
|
+
agent_id: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
13
|
+
kind: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
14
|
+
name: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
15
|
+
capabilities: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<Record<string, unknown> | undefined, unknown>>>;
|
|
16
|
+
}, z.core.$loose>;
|
|
17
|
+
export type RemoteAgent = z.output<typeof remoteAgentSchema>;
|
|
18
|
+
/** One of the caller's connectors (`GET /v1/remote-agents/connectors`). */
|
|
19
|
+
export declare const remoteConnectorSchema: z.ZodObject<{
|
|
20
|
+
connector_id: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
21
|
+
name: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
22
|
+
online: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<boolean | undefined, unknown>>>;
|
|
23
|
+
version: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
24
|
+
last_seen_at: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
25
|
+
heartbeat_at: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
26
|
+
agents: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<{
|
|
27
|
+
[x: string]: unknown;
|
|
28
|
+
agent_id?: string | undefined;
|
|
29
|
+
kind?: string | undefined;
|
|
30
|
+
name?: string | undefined;
|
|
31
|
+
capabilities?: Record<string, unknown> | undefined;
|
|
32
|
+
}[] | undefined, unknown>>>;
|
|
33
|
+
}, z.core.$loose>;
|
|
34
|
+
export type RemoteConnector = z.output<typeof remoteConnectorSchema>;
|
|
35
|
+
/** One remote session (`GET /v1/remote-agents/sessions[/:id]`, and the answer of `POST /sessions`). */
|
|
36
|
+
export declare const remoteSessionSchema: z.ZodObject<{
|
|
37
|
+
session_id: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
38
|
+
status: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
39
|
+
connector_id: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
40
|
+
agent_id: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
41
|
+
cwd: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
42
|
+
read_only: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<boolean | undefined, unknown>>>;
|
|
43
|
+
updated_at: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
44
|
+
}, z.core.$loose>;
|
|
45
|
+
export type RemoteSession = z.output<typeof remoteSessionSchema>;
|
|
46
|
+
/** One stored event of a remote session (`GET .../events?mode=replay`): `{id, seq, type, ts, data}`. */
|
|
47
|
+
export declare const remoteEventRowSchema: z.ZodObject<{
|
|
48
|
+
id: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
49
|
+
seq: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | undefined, unknown>>>;
|
|
50
|
+
type: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
51
|
+
ts: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | undefined, unknown>>>;
|
|
52
|
+
data: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<Record<string, unknown> | undefined, unknown>>>;
|
|
53
|
+
}, z.core.$loose>;
|
|
54
|
+
export type RemoteEventRow = z.output<typeof remoteEventRowSchema>;
|
|
55
|
+
/** A list of rows read with `schema` (rows that are not objects are left out). */
|
|
56
|
+
export declare const remoteConnectorsSchema: z.ZodType<{
|
|
57
|
+
[x: string]: unknown;
|
|
58
|
+
connector_id?: string | undefined;
|
|
59
|
+
name?: string | undefined;
|
|
60
|
+
online?: boolean | undefined;
|
|
61
|
+
version?: string | undefined;
|
|
62
|
+
last_seen_at?: string | undefined;
|
|
63
|
+
heartbeat_at?: string | undefined;
|
|
64
|
+
agents?: {
|
|
65
|
+
[x: string]: unknown;
|
|
66
|
+
agent_id?: string | undefined;
|
|
67
|
+
kind?: string | undefined;
|
|
68
|
+
name?: string | undefined;
|
|
69
|
+
capabilities?: Record<string, unknown> | undefined;
|
|
70
|
+
}[] | undefined;
|
|
71
|
+
}[], unknown, z.core.$ZodTypeInternals<{
|
|
72
|
+
[x: string]: unknown;
|
|
73
|
+
connector_id?: string | undefined;
|
|
74
|
+
name?: string | undefined;
|
|
75
|
+
online?: boolean | undefined;
|
|
76
|
+
version?: string | undefined;
|
|
77
|
+
last_seen_at?: string | undefined;
|
|
78
|
+
heartbeat_at?: string | undefined;
|
|
79
|
+
agents?: {
|
|
80
|
+
[x: string]: unknown;
|
|
81
|
+
agent_id?: string | undefined;
|
|
82
|
+
kind?: string | undefined;
|
|
83
|
+
name?: string | undefined;
|
|
84
|
+
capabilities?: Record<string, unknown> | undefined;
|
|
85
|
+
}[] | undefined;
|
|
86
|
+
}[], unknown>>;
|
|
87
|
+
export declare const remoteSessionsSchema: z.ZodType<{
|
|
88
|
+
[x: string]: unknown;
|
|
89
|
+
session_id?: string | undefined;
|
|
90
|
+
status?: string | undefined;
|
|
91
|
+
connector_id?: string | undefined;
|
|
92
|
+
agent_id?: string | undefined;
|
|
93
|
+
cwd?: string | undefined;
|
|
94
|
+
read_only?: boolean | undefined;
|
|
95
|
+
updated_at?: string | undefined;
|
|
96
|
+
}[], unknown, z.core.$ZodTypeInternals<{
|
|
97
|
+
[x: string]: unknown;
|
|
98
|
+
session_id?: string | undefined;
|
|
99
|
+
status?: string | undefined;
|
|
100
|
+
connector_id?: string | undefined;
|
|
101
|
+
agent_id?: string | undefined;
|
|
102
|
+
cwd?: string | undefined;
|
|
103
|
+
read_only?: boolean | undefined;
|
|
104
|
+
updated_at?: string | undefined;
|
|
105
|
+
}[], unknown>>;
|
|
106
|
+
export declare const remoteEventRowsSchema: z.ZodType<{
|
|
107
|
+
[x: string]: unknown;
|
|
108
|
+
id?: string | undefined;
|
|
109
|
+
seq?: number | undefined;
|
|
110
|
+
type?: string | undefined;
|
|
111
|
+
ts?: number | undefined;
|
|
112
|
+
data?: Record<string, unknown> | undefined;
|
|
113
|
+
}[], unknown, z.core.$ZodTypeInternals<{
|
|
114
|
+
[x: string]: unknown;
|
|
115
|
+
id?: string | undefined;
|
|
116
|
+
seq?: number | undefined;
|
|
117
|
+
type?: string | undefined;
|
|
118
|
+
ts?: number | undefined;
|
|
119
|
+
data?: Record<string, unknown> | undefined;
|
|
120
|
+
}[], unknown>>;
|
|
121
|
+
/**
|
|
122
|
+
* The answer of hiding conversations of a machine from the owner's lists, or showing them again
|
|
123
|
+
* (`POST /v1/remote-agents/connectors/:cid/hidden`): `@claw/protocol`'s `RemoteHidden`, the refs that changed and the
|
|
124
|
+
* ones refused (`live`: a process has it open; `unknown_conversation`: the machine does not report it now). Read
|
|
125
|
+
* strictly: an answer of another shape is one this client does not understand.
|
|
126
|
+
*/
|
|
127
|
+
export declare const remoteHiddenSchema: z.ZodType<RemoteHidden>;
|
|
128
|
+
/** How to connect a machine (`GET /setup`): the connector's package and the exact commands, passed on as Claw wrote them. */
|
|
129
|
+
export type RemoteSetup = JsonObject;
|
|
130
|
+
/** A one-time pairing (`POST /pairings`). */
|
|
131
|
+
export declare const remotePairingSchema: z.ZodObject<{
|
|
132
|
+
code: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
133
|
+
expires_at: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
134
|
+
expires_in: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | undefined, unknown>>>;
|
|
135
|
+
server: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
136
|
+
command: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodTransform<string | undefined, unknown>>>;
|
|
137
|
+
}, z.core.$loose>;
|
|
138
|
+
export type RemotePairing = z.output<typeof remotePairingSchema>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AskerView } from "./model.js";
|
|
2
|
+
/** A pull request's one-sentence summary is shown at most this long (code points): Chinese, Japanese, Korean / other. */
|
|
3
|
+
export declare const PR_SUMMARY_MAX_CJK = 80;
|
|
4
|
+
export declare const PR_SUMMARY_MAX_OTHER = 160;
|
|
5
|
+
/**
|
|
6
|
+
* A review's sentence of what the pull request does, as it is shown: one line, credentials masked, no link or tag
|
|
7
|
+
* markup, at most PR_SUMMARY_MAX_CJK code points when it is Chinese and PR_SUMMARY_MAX_OTHER otherwise (a longer one
|
|
8
|
+
* is cut and ends in an ellipsis). "" for anything that is not a non-empty string.
|
|
9
|
+
*/
|
|
10
|
+
export declare function clipPrSummary(value: unknown): string;
|
|
11
|
+
/**
|
|
12
|
+
* The asker's view of a review item from Claw's answer; null when the answer carries none. Only the view's own fields
|
|
13
|
+
* are read.
|
|
14
|
+
*/
|
|
15
|
+
export declare function parseRequesterView(raw: unknown, itemId: string): AskerView | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Lang } from "../locales/lang.js";
|
|
2
|
+
import type { ClawError } from "./errors.js";
|
|
3
|
+
/** The sentence for a refusal of Claw's: its reason (a word it does not name reads as the last one) and what was not done. */
|
|
4
|
+
export declare function serviceRefusal(err: ClawError, undone: string, lang?: Lang): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SseEvent } from "./model.js";
|
|
2
|
+
/** One SSE frame ("id:/event:/data:" lines) to an event; null for comments and anything whose data is not a JSON object. */
|
|
3
|
+
export declare function parseSseBlock(block: string): SseEvent | null;
|
|
4
|
+
/**
|
|
5
|
+
* Splits a stream of text chunks into SSE frames, as they complete (a frame ends at a blank line; CRLF is read as LF).
|
|
6
|
+
* What is left at the end of the stream without a blank line is not a frame.
|
|
7
|
+
*/
|
|
8
|
+
export declare class SseFrames {
|
|
9
|
+
private buffer;
|
|
10
|
+
/** The events completed by `chunk`. */
|
|
11
|
+
push(chunk: string): SseEvent[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReviewStart } from "./model.js";
|
|
2
|
+
/**
|
|
3
|
+
* Claw's `data` for reviews it started. One without its pull request or its session cannot be told from the others or
|
|
4
|
+
* followed: an answer this client does not understand (ClawAnswerInvalid), never a review that is quietly not shown.
|
|
5
|
+
* `followed` false: reviews asked of someone else, whose sessions are that person's; none is needed.
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseStartedReviews(data: unknown, followed?: boolean): ReviewStart[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AskerView, PullRef, WorkItem } from "./model.js";
|
|
2
|
+
/** The pull request of a review item (`params.pr`); null for anything else, or for one that is not a pull request. */
|
|
3
|
+
export declare function pullOf(params: Readonly<Record<string, unknown>> | undefined): PullRef | null;
|
|
4
|
+
/**
|
|
5
|
+
* A work item from Claw's JSON; null when it is not one (no id, or not an object), so a malformed row is skipped. Only
|
|
6
|
+
* a `can_accept` that is true counts, and not when Claw says the result needs no acceptance (`needs_accept` false).
|
|
7
|
+
*/
|
|
8
|
+
export declare function parseWorkItem(raw: unknown): WorkItem | null;
|
|
9
|
+
/**
|
|
10
|
+
* A work item made of the asker's view alone (Claw answers the asker of someone else's review with nothing more): its
|
|
11
|
+
* id, its pull request as its title, and the view in `params` so that what is shown is what the asker may see.
|
|
12
|
+
*/
|
|
13
|
+
export declare function requesterViewItem(view: AskerView, raw: unknown): WorkItem;
|
|
14
|
+
/**
|
|
15
|
+
* The item an accept, stop or retry answered with. To the asker of a review someone else runs Claw answers with the
|
|
16
|
+
* asker's view alone: an answer without the board's own fields (`board_state`) is read as that view.
|
|
17
|
+
*/
|
|
18
|
+
export declare function decidedItem(itemId: string, data: unknown): WorkItem | null;
|
|
19
|
+
/** The statuses of a review that is still open to its asker; a waiting one waits for its reviewer. */
|
|
20
|
+
export declare const REQUESTER_VIEW_WAITING: ReadonlySet<string>;
|
|
21
|
+
export declare const REQUESTER_VIEW_OPEN: ReadonlySet<string>;
|
|
22
|
+
/** Whether the review is over, to its asker. */
|
|
23
|
+
export declare function isFinished(view: AskerView): boolean;
|
|
24
|
+
/** Whether the review waits for its reviewer. */
|
|
25
|
+
export declare function waitsForReviewer(view: AskerView): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const AGENT_SUBCOMMANDS: readonly ["new", "attach", "detach", "mode", "sessions", "close", "off", "pair"];
|
|
2
|
+
export type AgentSubcommand = (typeof AGENT_SUBCOMMANDS)[number];
|
|
3
|
+
export interface AgentCommand {
|
|
4
|
+
readonly verb: AgentSubcommand;
|
|
5
|
+
/** What follows the verb; `new` keeps it whole (a folder name may hold spaces). */
|
|
6
|
+
readonly rest: string;
|
|
7
|
+
}
|
|
8
|
+
/** The arguments of `/agent ARGS`; null when ARGS is empty or names no subcommand (the caller shows the usage). */
|
|
9
|
+
export declare function parseAgentCommand(arg: string): AgentCommand | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The chat's command words. Anything else, unknown `/words` included, goes on as the person's text.
|
|
3
|
+
*
|
|
4
|
+
* What help says is rendered from the capability registry (`capabilities/registry.ts`), not from this list.
|
|
5
|
+
*/
|
|
6
|
+
export declare const COMMANDS: readonly ["help", "new", "stop", "unlink", "whoami", "resume", "memory", "sessions"];
|
|
7
|
+
/** The only commands a group chat accepts. */
|
|
8
|
+
export declare const GROUP_COMMANDS: readonly ["help", "new", "stop", "whoami", "feedback"];
|
|
9
|
+
export declare const PERSONAL_ONLY_COMMANDS: readonly ["link", "unlink", "resume", "timezone", "quiet", "pause", "brief", "repo", "sessions", "agents", "agent", "lang"];
|
|
10
|
+
/**
|
|
11
|
+
* `/feedback [TEXT]` takes an argument, so it is read with `commandArgs`, never `parseCommand`; it is listed here (not in
|
|
12
|
+
* COMMANDS) only so that a group chat accepts it and an unknown `/word` is still plain text.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ARGUMENT_COMMANDS: readonly ["feedback"];
|
|
15
|
+
export type Command = (typeof COMMANDS)[number];
|
|
16
|
+
/** A command the worker handles itself (anything else is text for Claw). */
|
|
17
|
+
export declare function isKnownCommand(name: string): boolean;
|
|
18
|
+
export declare function isGroupCommand(name: string): boolean;
|
|
19
|
+
export declare function isCommand(name: string): name is Command;
|