hostlet 0.0.0-stage → 0.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +233 -2
- package/bin/hostlet.js +61 -0
- package/console/app/api.js +1223 -0
- package/console/app/boot.js +165 -0
- package/console/app/cards.js +222 -0
- package/console/app/compose-quote.js +127 -0
- package/console/app/config-form.js +727 -0
- package/console/app/document-drafts.js +62 -0
- package/console/app/document-tools.mjs +67 -0
- package/console/app/documents.js +106 -0
- package/console/app/pages.js +6483 -0
- package/console/app/plugins.js +509 -0
- package/console/app/preview-tools.js +172 -0
- package/console/app/reference-labels.js +118 -0
- package/console/app/selection.js +372 -0
- package/console/app/store.js +57 -0
- package/console/app/text-anchor.js +26 -0
- package/console/app/topic-local.js +322 -0
- package/console/app/topic-nav.js +414 -0
- package/console/app/topic-status.js +109 -0
- package/console/app/views.js +43 -0
- package/console/apple-touch-icon.png +0 -0
- package/console/avatars/agy.svg +34 -0
- package/console/avatars/alhena.svg +36 -0
- package/console/avatars/castor.svg +38 -0
- package/console/avatars/claude.svg +34 -0
- package/console/avatars/codex.svg +34 -0
- package/console/avatars/devin.svg +34 -0
- package/console/avatars/echo.svg +34 -0
- package/console/avatars/kimi.svg +33 -0
- package/console/avatars/opencode.svg +33 -0
- package/console/avatars/pinion.svg +34 -0
- package/console/avatars/sprocket.svg +34 -0
- package/console/avatars/vela.svg +44 -0
- package/console/avatars/wasat.svg +38 -0
- package/console/clients/agy.svg +1 -0
- package/console/clients/claude.svg +1 -0
- package/console/clients/codex.svg +1 -0
- package/console/clients/devin.svg +1 -0
- package/console/clients/kimi.svg +1 -0
- package/console/clients/opencode.svg +1 -0
- package/console/favicon.ico +0 -0
- package/console/favicon.svg +16 -0
- package/console/index.html +99 -0
- package/console/pdl/engine/README.md +13 -0
- package/console/pdl/engine/anchor.js +195 -0
- package/console/pdl/engine/core.js +1340 -0
- package/console/pdl/engine/frame.js +1252 -0
- package/console/pdl/engine/i18n.js +67 -0
- package/console/pdl/engine/pdl-check.js +102 -0
- package/console/pdl/engine/pdl-doc.js +353 -0
- package/console/pdl/engine/pdl-view.js +280 -0
- package/console/pdl/engine/pdl.js +1064 -0
- package/console/pdl/engine/platform.js +18 -0
- package/console/pdl/engine/proj.js +279 -0
- package/console/pdl/engine/theme.js +176 -0
- package/console/pdl/engine/tree.js +171 -0
- package/console/pdl/engine/units.js +546 -0
- package/console/pdl/library/README.md +28 -0
- package/console/pdl/library/blocks.js +1512 -0
- package/console/pdl/library/buttons.js +86 -0
- package/console/pdl/library/capsules.js +130 -0
- package/console/pdl/library/charts.js +287 -0
- package/console/pdl/library/code.js +98 -0
- package/console/pdl/library/css/base.css +12 -0
- package/console/pdl/library/css/blocks.css +98 -0
- package/console/pdl/library/css/capsules.css +42 -0
- package/console/pdl/library/css/catalog-page.css +24 -0
- package/console/pdl/library/css/chat.css +100 -0
- package/console/pdl/library/css/composer-top.css +145 -0
- package/console/pdl/library/css/controls.css +195 -0
- package/console/pdl/library/css/drag.css +29 -0
- package/console/pdl/library/css/edit-layout.css +93 -0
- package/console/pdl/library/css/floating-window.css +30 -0
- package/console/pdl/library/css/hover.css +50 -0
- package/console/pdl/library/css/label-search.css +37 -0
- package/console/pdl/library/css/layers.css +43 -0
- package/console/pdl/library/css/library-parts.css +33 -0
- package/console/pdl/library/css/library.css +117 -0
- package/console/pdl/library/css/member-select.css +34 -0
- package/console/pdl/library/css/message.css +72 -0
- package/console/pdl/library/css/page.css +104 -0
- package/console/pdl/library/css/parts.css +338 -0
- package/console/pdl/library/css/responsive.css +40 -0
- package/console/pdl/library/css/roles.css +28 -0
- package/console/pdl/library/css/rows.css +231 -0
- package/console/pdl/library/css/settings-rows.css +37 -0
- package/console/pdl/library/css/shell.css +59 -0
- package/console/pdl/library/css/stream.css +296 -0
- package/console/pdl/library/css/theme-calculator.css +18 -0
- package/console/pdl/library/css/thumb-choice.css +69 -0
- package/console/pdl/library/css/tweaks.css +16 -0
- package/console/pdl/library/css/widgets.css +211 -0
- package/console/pdl/library/css/workbench.css +59 -0
- package/console/pdl/library/feedback.js +83 -0
- package/console/pdl/library/floating-window.mjs +100 -0
- package/console/pdl/library/fold.js +238 -0
- package/console/pdl/library/format.js +53 -0
- package/console/pdl/library/frames.js +123 -0
- package/console/pdl/library/icons.js +165 -0
- package/console/pdl/library/identity.js +149 -0
- package/console/pdl/library/inputs.js +801 -0
- package/console/pdl/library/label-search.js +214 -0
- package/console/pdl/library/markdown-text.js +115 -0
- package/console/pdl/library/markdown.js +150 -0
- package/console/pdl/library/media-viewer.js +293 -0
- package/console/pdl/library/member-select.mjs +32 -0
- package/console/pdl/library/message.js +105 -0
- package/console/pdl/library/motion.js +56 -0
- package/console/pdl/library/overlays.js +165 -0
- package/console/pdl/library/page.js +142 -0
- package/console/pdl/library/plugin-form.js +154 -0
- package/console/pdl/library/registry.js +198 -0
- package/console/pdl/library/rows.js +523 -0
- package/console/pdl/library/shell.js +151 -0
- package/console/pdl/library/stream.js +58 -0
- package/console/pdl/library/tabs.js +259 -0
- package/console/pdl/library/theme-calculator.js +300 -0
- package/console/pdl/library/widgets.js +114 -0
- package/console/pdl/load-order.json +74 -0
- package/console/pdl/platform/README.md +3 -0
- package/console/pdl/platform/rich-markdown.mjs +17 -0
- package/console/pdl/platform/web-links.js +26 -0
- package/console/pdl/platform/web.js +80 -0
- package/console/sdk-browser/mentions.d.mts +16 -0
- package/console/sdk-browser/mentions.mjs +84 -0
- package/console/theme/assets.js +21 -0
- package/console/theme/theme.json +9417 -0
- package/console/theme/tokens.json +444 -0
- package/dist/core/a2a.d.ts +288 -0
- package/dist/core/a2a.js +2197 -0
- package/dist/core/address.d.ts +34 -0
- package/dist/core/address.js +33 -0
- package/dist/core/approval-inputs.d.ts +17 -0
- package/dist/core/approval-inputs.js +70 -0
- package/dist/core/archive.d.ts +19 -0
- package/dist/core/archive.js +135 -0
- package/dist/core/attachments.d.ts +17 -0
- package/dist/core/attachments.js +143 -0
- package/dist/core/blocked-handoffs.d.ts +132 -0
- package/dist/core/blocked-handoffs.js +349 -0
- package/dist/core/config-schema.d.ts +124 -0
- package/dist/core/config-schema.js +192 -0
- package/dist/core/config.d.ts +117 -0
- package/dist/core/config.js +638 -0
- package/dist/core/disk-usage.d.ts +26 -0
- package/dist/core/disk-usage.js +83 -0
- package/dist/core/documents.d.ts +9 -0
- package/dist/core/documents.js +48 -0
- package/dist/core/entry.d.ts +316 -0
- package/dist/core/entry.js +711 -0
- package/dist/core/home.d.ts +76 -0
- package/dist/core/home.js +449 -0
- package/dist/core/i18n.d.ts +36 -0
- package/dist/core/i18n.js +458 -0
- package/dist/core/instances.d.ts +224 -0
- package/dist/core/instances.js +1272 -0
- package/dist/core/members.d.ts +190 -0
- package/dist/core/members.js +358 -0
- package/dist/core/mentions.d.ts +12 -0
- package/dist/core/mentions.js +49 -0
- package/dist/core/messages.d.ts +876 -0
- package/dist/core/messages.js +916 -0
- package/dist/core/notices.d.ts +88 -0
- package/dist/core/notices.js +54 -0
- package/dist/core/ops.d.ts +117 -0
- package/dist/core/ops.js +146 -0
- package/dist/core/package.d.ts +2 -0
- package/dist/core/package.js +14 -0
- package/dist/core/parts.d.ts +25 -0
- package/dist/core/parts.js +119 -0
- package/dist/core/plugins/catalog.d.ts +14 -0
- package/dist/core/plugins/catalog.js +54 -0
- package/dist/core/plugins/external.d.ts +7 -0
- package/dist/core/plugins/external.js +921 -0
- package/dist/core/plugins/index.d.ts +5 -0
- package/dist/core/plugins/index.js +51 -0
- package/dist/core/plugins/npm.d.ts +12 -0
- package/dist/core/plugins/npm.js +99 -0
- package/dist/core/plugins/plugin-manifest.d.ts +12 -0
- package/dist/core/plugins/plugin-manifest.js +231 -0
- package/dist/core/push.d.ts +22 -0
- package/dist/core/push.js +63 -0
- package/dist/core/resource.d.ts +77 -0
- package/dist/core/resource.js +48 -0
- package/dist/core/spawn.d.ts +12 -0
- package/dist/core/spawn.js +30 -0
- package/dist/core/storage-inventory.d.ts +118 -0
- package/dist/core/storage-inventory.js +279 -0
- package/dist/core/storage.d.ts +45 -0
- package/dist/core/storage.js +602 -0
- package/dist/core/store.d.ts +15 -0
- package/dist/core/store.js +33 -0
- package/dist/core/topic-index.d.ts +19 -0
- package/dist/core/topic-index.js +70 -0
- package/dist/core/topic-ops.d.ts +139 -0
- package/dist/core/topic-ops.js +507 -0
- package/dist/core/topic-status.d.ts +32 -0
- package/dist/core/topic-status.js +105 -0
- package/dist/core/topics.d.ts +327 -0
- package/dist/core/topics.js +786 -0
- package/dist/core/turn-clients.d.ts +1 -0
- package/dist/core/turn-clients.js +5 -0
- package/dist/core/types.d.ts +2866 -0
- package/dist/core/types.js +166 -0
- package/dist/core/util.d.ts +10 -0
- package/dist/core/util.js +47 -0
- package/dist/main.d.ts +12 -0
- package/dist/main.js +82 -0
- package/dist/plugins/adapter-acp/index.d.ts +3 -0
- package/dist/plugins/adapter-acp/index.js +57 -0
- package/dist/plugins/adapter-acp/plugin.yaml +100 -0
- package/dist/plugins/adapter-agy/command.d.ts +9 -0
- package/dist/plugins/adapter-agy/command.js +34 -0
- package/dist/plugins/adapter-agy/index.d.ts +5 -0
- package/dist/plugins/adapter-agy/index.js +65 -0
- package/dist/plugins/adapter-agy/quota.d.ts +2 -0
- package/dist/plugins/adapter-agy/quota.js +155 -0
- package/dist/plugins/adapter-agy/terminal.d.ts +6 -0
- package/dist/plugins/adapter-agy/terminal.js +132 -0
- package/dist/plugins/adapter-agy/version.d.ts +9 -0
- package/dist/plugins/adapter-agy/version.js +17 -0
- package/dist/plugins/adapter-claude/index.d.ts +43 -0
- package/dist/plugins/adapter-claude/index.js +412 -0
- package/dist/plugins/adapter-claude/quota.d.ts +14 -0
- package/dist/plugins/adapter-claude/quota.js +103 -0
- package/dist/plugins/adapter-codex/index.d.ts +4 -0
- package/dist/plugins/adapter-codex/index.js +688 -0
- package/dist/plugins/adapter-codex/responses-model.d.ts +9 -0
- package/dist/plugins/adapter-codex/responses-model.js +82 -0
- package/dist/plugins/adapter-kimi/index.d.ts +4 -0
- package/dist/plugins/adapter-kimi/index.js +51 -0
- package/dist/plugins/adapter-kimi/quota.d.ts +3 -0
- package/dist/plugins/adapter-kimi/quota.js +171 -0
- package/dist/plugins/adapter-opencode/index.d.ts +12 -0
- package/dist/plugins/adapter-opencode/index.js +64 -0
- package/dist/plugins/annotations/console/cards.css +189 -0
- package/dist/plugins/annotations/console/cards.mjs +439 -0
- package/dist/plugins/annotations/console/pdl.json +52 -0
- package/dist/plugins/annotations/console/view.mjs +241 -0
- package/dist/plugins/annotations/console/window.mjs +219 -0
- package/dist/plugins/annotations/followups.d.ts +51 -0
- package/dist/plugins/annotations/followups.js +112 -0
- package/dist/plugins/annotations/index.d.ts +3 -0
- package/dist/plugins/annotations/index.js +298 -0
- package/dist/plugins/annotations/plugin.yaml +3 -0
- package/dist/plugins/ask-choice/index.d.ts +9 -0
- package/dist/plugins/ask-choice/index.js +24 -0
- package/dist/plugins/ask-choice/plugin.yaml +2 -0
- package/dist/plugins/background/index.d.ts +2 -0
- package/dist/plugins/background/index.js +398 -0
- package/dist/plugins/background/plugin.yaml +7 -0
- package/dist/plugins/builtin.json +37 -0
- package/dist/plugins/cards/console/pdl.json +516 -0
- package/dist/plugins/cards/console/view.mjs +67 -0
- package/dist/plugins/cards/index.d.ts +8 -0
- package/dist/plugins/cards/index.js +627 -0
- package/dist/plugins/cards/plugin.yaml +3 -0
- package/dist/plugins/console/browser.d.ts +2 -0
- package/dist/plugins/console/browser.js +115 -0
- package/dist/plugins/console/console/pdl.json +38 -0
- package/dist/plugins/console/console/view.mjs +26 -0
- package/dist/plugins/console/index.d.ts +4 -0
- package/dist/plugins/console/index.js +94 -0
- package/dist/plugins/console/picker.d.ts +2 -0
- package/dist/plugins/console/picker.js +48 -0
- package/dist/plugins/console/plugin.yaml +3 -0
- package/dist/plugins/console/topic-view.d.ts +3 -0
- package/dist/plugins/console/topic-view.js +388 -0
- package/dist/plugins/handoff/index.d.ts +2 -0
- package/dist/plugins/handoff/index.js +147 -0
- package/dist/plugins/handoff/plugin.yaml +8 -0
- package/dist/plugins/host-api/index.d.ts +7 -0
- package/dist/plugins/host-api/index.js +310 -0
- package/dist/plugins/host-api/plugin.yaml +2 -0
- package/dist/plugins/host-api/signing.d.ts +63 -0
- package/dist/plugins/host-api/signing.js +427 -0
- package/dist/plugins/host-api/skills/host-ops/SKILL.md +28 -0
- package/dist/plugins/host-api/skills/hostlet-plugin-dev/SKILL.md +38 -0
- package/dist/plugins/inbox/index.d.ts +15 -0
- package/dist/plugins/inbox/index.js +161 -0
- package/dist/plugins/inbox/plugin.yaml +2 -0
- package/dist/plugins/keys/account-directories.d.ts +18 -0
- package/dist/plugins/keys/account-directories.js +86 -0
- package/dist/plugins/keys/account-storage.d.ts +18 -0
- package/dist/plugins/keys/account-storage.js +112 -0
- package/dist/plugins/keys/console/pdl.json +710 -0
- package/dist/plugins/keys/console/view.mjs +619 -0
- package/dist/plugins/keys/index.d.ts +7 -0
- package/dist/plugins/keys/index.js +842 -0
- package/dist/plugins/keys/login-link.d.ts +2 -0
- package/dist/plugins/keys/login-link.js +15 -0
- package/dist/plugins/keys/plugin.yaml +3 -0
- package/dist/plugins/keys/quota-history.d.ts +91 -0
- package/dist/plugins/keys/quota-history.js +420 -0
- package/dist/plugins/mcp/console/pdl.json +412 -0
- package/dist/plugins/mcp/console/view.mjs +207 -0
- package/dist/plugins/mcp/index.d.ts +7 -0
- package/dist/plugins/mcp/index.js +494 -0
- package/dist/plugins/mcp/plugin.yaml +3 -0
- package/dist/plugins/member-health/index.d.ts +2 -0
- package/dist/plugins/member-health/index.js +478 -0
- package/dist/plugins/member-health/plugin.yaml +2 -0
- package/dist/plugins/memory/capabilities.d.ts +10 -0
- package/dist/plugins/memory/capabilities.js +70 -0
- package/dist/plugins/memory/console/pdl.json +459 -0
- package/dist/plugins/memory/console/view.mjs +254 -0
- package/dist/plugins/memory/corpus.d.ts +60 -0
- package/dist/plugins/memory/corpus.js +521 -0
- package/dist/plugins/memory/engines/fts-tree-diversity.d.ts +8 -0
- package/dist/plugins/memory/engines/fts-tree-diversity.js +49 -0
- package/dist/plugins/memory/engines/fts-tree-text.d.ts +12 -0
- package/dist/plugins/memory/engines/fts-tree-text.js +93 -0
- package/dist/plugins/memory/engines/fts-tree.d.ts +4 -0
- package/dist/plugins/memory/engines/fts-tree.js +387 -0
- package/dist/plugins/memory/engines/search.d.ts +9 -0
- package/dist/plugins/memory/engines/search.js +35 -0
- package/dist/plugins/memory/index.d.ts +3 -0
- package/dist/plugins/memory/index.js +465 -0
- package/dist/plugins/memory/notes.d.ts +22 -0
- package/dist/plugins/memory/notes.js +140 -0
- package/dist/plugins/memory/plugin.yaml +23 -0
- package/dist/plugins/model-profiles/index.d.ts +2 -0
- package/dist/plugins/model-profiles/index.js +919 -0
- package/dist/plugins/model-profiles/plugin.yaml +13 -0
- package/dist/plugins/model-profiles/review-source.d.ts +11 -0
- package/dist/plugins/model-profiles/review-source.js +640 -0
- package/dist/plugins/model-profiles/rules.d.ts +132 -0
- package/dist/plugins/model-profiles/rules.js +767 -0
- package/dist/plugins/model-profiles/skills/model-profile/SKILL.md +60 -0
- package/dist/plugins/model-profiles/sources.d.ts +61 -0
- package/dist/plugins/model-profiles/sources.js +375 -0
- package/dist/plugins/model-profiles/storage.d.ts +104 -0
- package/dist/plugins/model-profiles/storage.js +352 -0
- package/dist/plugins/model-profiles/types.d.ts +187 -0
- package/dist/plugins/model-profiles/types.js +12 -0
- package/dist/plugins/model-profiles/wakeup.d.ts +29 -0
- package/dist/plugins/model-profiles/wakeup.js +390 -0
- package/dist/plugins/models/index.d.ts +2 -0
- package/dist/plugins/models/index.js +63 -0
- package/dist/plugins/models/plugin.yaml +8 -0
- package/dist/plugins/ops/collector.d.ts +22 -0
- package/dist/plugins/ops/collector.js +48 -0
- package/dist/plugins/ops/config.d.ts +11 -0
- package/dist/plugins/ops/config.js +13 -0
- package/dist/plugins/ops/console/pdl.json +676 -0
- package/dist/plugins/ops/console/view.mjs +700 -0
- package/dist/plugins/ops/index.d.ts +3 -0
- package/dist/plugins/ops/index.js +20 -0
- package/dist/plugins/ops/journal.d.ts +7 -0
- package/dist/plugins/ops/journal.js +109 -0
- package/dist/plugins/ops/metrics.d.ts +3 -0
- package/dist/plugins/ops/metrics.js +81 -0
- package/dist/plugins/ops/plugin.yaml +63 -0
- package/dist/plugins/ops/samples.d.ts +54 -0
- package/dist/plugins/ops/samples.js +100 -0
- package/dist/plugins/ops/trace.d.ts +3 -0
- package/dist/plugins/ops/trace.js +104 -0
- package/dist/plugins/ops/usage.d.ts +2 -0
- package/dist/plugins/ops/usage.js +152 -0
- package/dist/plugins/plans/acceptance.d.ts +284 -0
- package/dist/plugins/plans/acceptance.js +247 -0
- package/dist/plugins/plans/blocked.d.ts +25 -0
- package/dist/plugins/plans/blocked.js +66 -0
- package/dist/plugins/plans/console/pdl.json +639 -0
- package/dist/plugins/plans/console/view.d.mts +2 -0
- package/dist/plugins/plans/console/view.mjs +855 -0
- package/dist/plugins/plans/dependencies.d.ts +5 -0
- package/dist/plugins/plans/dependencies.js +21 -0
- package/dist/plugins/plans/index.d.ts +72 -0
- package/dist/plugins/plans/index.js +2057 -0
- package/dist/plugins/plans/plugin.yaml +44 -0
- package/dist/plugins/plans/progress.d.ts +82 -0
- package/dist/plugins/plans/progress.js +516 -0
- package/dist/plugins/prompt/index.d.ts +8 -0
- package/dist/plugins/prompt/index.js +361 -0
- package/dist/plugins/prompt/plugin.yaml +2 -0
- package/dist/plugins/recovery/console/pdl.json +50 -0
- package/dist/plugins/recovery/console/view.mjs +46 -0
- package/dist/plugins/recovery/index.d.ts +9 -0
- package/dist/plugins/recovery/index.js +454 -0
- package/dist/plugins/recovery/plugin.yaml +9 -0
- package/dist/plugins/recovery/probe.d.ts +11 -0
- package/dist/plugins/recovery/probe.js +128 -0
- package/dist/plugins/restart/console/pdl.json +112 -0
- package/dist/plugins/restart/console/view.mjs +85 -0
- package/dist/plugins/restart/index.d.ts +10 -0
- package/dist/plugins/restart/index.js +669 -0
- package/dist/plugins/restart/plugin.yaml +9 -0
- package/dist/plugins/restart/scope.d.ts +6 -0
- package/dist/plugins/restart/scope.js +44 -0
- package/dist/plugins/schedule/console/pdl.json +696 -0
- package/dist/plugins/schedule/console/view.mjs +398 -0
- package/dist/plugins/schedule/events.d.ts +76 -0
- package/dist/plugins/schedule/events.js +158 -0
- package/dist/plugins/schedule/index.d.ts +32 -0
- package/dist/plugins/schedule/index.js +1199 -0
- package/dist/plugins/schedule/plugin.yaml +26 -0
- package/dist/plugins/schedule/when.d.ts +14 -0
- package/dist/plugins/schedule/when.js +83 -0
- package/dist/plugins/sessions/console/pdl.json +259 -0
- package/dist/plugins/sessions/console/view.mjs +355 -0
- package/dist/plugins/sessions/index.d.ts +3 -0
- package/dist/plugins/sessions/index.js +126 -0
- package/dist/plugins/sessions/participants.d.ts +28 -0
- package/dist/plugins/sessions/participants.js +83 -0
- package/dist/plugins/sessions/plugin.yaml +3 -0
- package/dist/plugins/signals/console/pdl.json +802 -0
- package/dist/plugins/signals/console/view.mjs +284 -0
- package/dist/plugins/signals/content.d.ts +31 -0
- package/dist/plugins/signals/content.js +151 -0
- package/dist/plugins/signals/index.d.ts +2 -0
- package/dist/plugins/signals/index.js +601 -0
- package/dist/plugins/signals/plugin.yaml +32 -0
- package/dist/plugins/signals/skills/signal-sources/SKILL.md +27 -0
- package/dist/plugins/skills/console/pdl.json +254 -0
- package/dist/plugins/skills/console/view.mjs +204 -0
- package/dist/plugins/skills/index.d.ts +11 -0
- package/dist/plugins/skills/index.js +567 -0
- package/dist/plugins/skills/install.d.ts +69 -0
- package/dist/plugins/skills/install.js +265 -0
- package/dist/plugins/skills/plugin.yaml +24 -0
- package/dist/plugins/skills/safety-scan.d.ts +17 -0
- package/dist/plugins/skills/safety-scan.js +78 -0
- package/dist/plugins/skills/skills/skill-ops/SKILL.md +29 -0
- package/dist/plugins/terminal/console/pdl.json +115 -0
- package/dist/plugins/terminal/console/view.mjs +178 -0
- package/dist/plugins/terminal/index.d.ts +3 -0
- package/dist/plugins/terminal/index.js +204 -0
- package/dist/plugins/terminal/plugin.yaml +2 -0
- package/dist/plugins/tools/index.d.ts +3 -0
- package/dist/plugins/tools/index.js +458 -0
- package/dist/plugins/tools/plugin.yaml +2 -0
- package/dist/plugins/tools/token.d.ts +61 -0
- package/dist/plugins/tools/token.js +179 -0
- package/dist/plugins/topic-tools/index.d.ts +9 -0
- package/dist/plugins/topic-tools/index.js +29 -0
- package/dist/plugins/topic-tools/plugin.yaml +2 -0
- package/dist/plugins/topic-tools/skills/topic-tidy/SKILL.md +108 -0
- package/dist/plugins/works/console/pdl.json +120 -0
- package/dist/plugins/works/console/view.mjs +91 -0
- package/dist/plugins/works/document-words.d.ts +50 -0
- package/dist/plugins/works/document-words.js +27 -0
- package/dist/plugins/works/editors.d.ts +3 -0
- package/dist/plugins/works/editors.js +162 -0
- package/dist/plugins/works/events.d.ts +58 -0
- package/dist/plugins/works/events.js +82 -0
- package/dist/plugins/works/files.d.ts +23 -0
- package/dist/plugins/works/files.js +53 -0
- package/dist/plugins/works/index.d.ts +9 -0
- package/dist/plugins/works/index.js +1088 -0
- package/dist/plugins/works/plugin.yaml +9 -0
- package/dist/plugins/works/preview.d.ts +10 -0
- package/dist/plugins/works/preview.js +30 -0
- package/dist/plugins/works/project.d.ts +3 -0
- package/dist/plugins/works/project.js +245 -0
- package/dist/plugins/works/resource.d.ts +28 -0
- package/dist/plugins/works/resource.js +71 -0
- package/dist/plugins/works/retention.d.ts +36 -0
- package/dist/plugins/works/retention.js +295 -0
- package/dist/plugins/works/skills/works-ops/SKILL.md +14 -0
- package/dist/plugins/works/viewers.d.ts +13 -0
- package/dist/plugins/works/viewers.js +87 -0
- package/dist/plugins/works/web/anchors.js +94 -0
- package/dist/plugins/works/web/document-edit.js +245 -0
- package/dist/plugins/works/web/preview-bridge.js +142 -0
- package/dist/plugins/works/web/reading-position.js +74 -0
- package/dist/plugins/works/web/view.html +1118 -0
- package/dist/runtime/runtime.d.ts +210 -0
- package/dist/runtime/runtime.js +338 -0
- package/dist/sdk/adapter-kit.d.ts +1 -0
- package/dist/sdk/adapter-kit.js +1 -0
- package/dist/sdk/client.d.ts +163 -0
- package/dist/sdk/client.js +43 -0
- package/dist/sdk/contracts.d.ts +1263 -0
- package/dist/sdk/contracts.js +1 -0
- package/dist/sdk/index.d.ts +57 -0
- package/dist/sdk/index.js +27 -0
- package/dist/sdk/source-choice.d.ts +40 -0
- package/dist/sdk/source-choice.js +217 -0
- package/dist/sdk/topic-text.d.ts +5 -0
- package/dist/sdk/topic-text.js +26 -0
- package/dist/sdk/transport.d.ts +12 -0
- package/dist/sdk/transport.js +34 -0
- package/node_modules/@hostlet/adapter-kit/dist/acp.d.ts +88 -0
- package/node_modules/@hostlet/adapter-kit/dist/acp.js +674 -0
- package/node_modules/@hostlet/adapter-kit/dist/command.d.ts +18 -0
- package/node_modules/@hostlet/adapter-kit/dist/command.js +39 -0
- package/node_modules/@hostlet/adapter-kit/dist/index.d.ts +8 -0
- package/node_modules/@hostlet/adapter-kit/dist/index.js +6 -0
- package/node_modules/@hostlet/adapter-kit/dist/models.d.ts +29 -0
- package/node_modules/@hostlet/adapter-kit/dist/models.js +108 -0
- package/node_modules/@hostlet/adapter-kit/dist/quota.d.ts +3 -0
- package/node_modules/@hostlet/adapter-kit/dist/quota.js +4 -0
- package/node_modules/@hostlet/adapter-kit/dist/rpc.d.ts +29 -0
- package/node_modules/@hostlet/adapter-kit/dist/rpc.js +84 -0
- package/node_modules/@hostlet/adapter-kit/dist/upstream-failure.d.ts +5 -0
- package/node_modules/@hostlet/adapter-kit/dist/upstream-failure.js +37 -0
- package/node_modules/@hostlet/adapter-kit/package.json +16 -0
- package/node_modules/@hostlet/platform/dist/desktop.d.ts +16 -0
- package/node_modules/@hostlet/platform/dist/desktop.js +276 -0
- package/node_modules/@hostlet/platform/dist/files.d.ts +24 -0
- package/node_modules/@hostlet/platform/dist/files.js +113 -0
- package/node_modules/@hostlet/platform/dist/index.d.ts +6 -0
- package/node_modules/@hostlet/platform/dist/index.js +4 -0
- package/node_modules/@hostlet/platform/dist/paths.d.ts +4 -0
- package/node_modules/@hostlet/platform/dist/paths.js +9 -0
- package/node_modules/@hostlet/platform/dist/process.d.ts +45 -0
- package/node_modules/@hostlet/platform/dist/process.js +297 -0
- package/node_modules/@hostlet/platform/package.json +14 -0
- package/package.json +60 -4
|
@@ -0,0 +1,2866 @@
|
|
|
1
|
+
/** Shared data types of the core. Storage and behaviour live in the module that owns each of them. */
|
|
2
|
+
import type { LText } from './i18n.ts';
|
|
3
|
+
import type { ConfigField } from './config-schema.ts';
|
|
4
|
+
import { type FromSchema } from './ops.ts';
|
|
5
|
+
/** A channel identity. Only members backed by an adapter have an instance. */
|
|
6
|
+
export declare const memberSchema: {
|
|
7
|
+
type: "object";
|
|
8
|
+
properties: {
|
|
9
|
+
readonly id: {
|
|
10
|
+
readonly type: "string";
|
|
11
|
+
};
|
|
12
|
+
readonly kind: {
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
readonly enum: readonly ["agent", "person", "plugin"];
|
|
15
|
+
};
|
|
16
|
+
readonly name: {
|
|
17
|
+
readonly type: "string";
|
|
18
|
+
};
|
|
19
|
+
readonly handle: {
|
|
20
|
+
readonly type: "string";
|
|
21
|
+
};
|
|
22
|
+
readonly adapter: {
|
|
23
|
+
readonly type: "string";
|
|
24
|
+
};
|
|
25
|
+
readonly options: {
|
|
26
|
+
readonly type: "object";
|
|
27
|
+
};
|
|
28
|
+
readonly key: {
|
|
29
|
+
readonly type: "string";
|
|
30
|
+
};
|
|
31
|
+
readonly env: {
|
|
32
|
+
readonly type: "object";
|
|
33
|
+
readonly additionalProperties: {
|
|
34
|
+
readonly type: "string";
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
readonly color: {
|
|
38
|
+
readonly type: readonly ["string", "object"];
|
|
39
|
+
readonly properties: {
|
|
40
|
+
readonly primary: {
|
|
41
|
+
readonly type: "string";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
readonly required: readonly ["primary"];
|
|
45
|
+
readonly additionalProperties: false;
|
|
46
|
+
};
|
|
47
|
+
readonly avatarPath: {
|
|
48
|
+
readonly type: "string";
|
|
49
|
+
};
|
|
50
|
+
readonly enabled: {
|
|
51
|
+
readonly type: "boolean";
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
required: readonly ["id", "kind", "name", "handle", "adapter", "options", "enabled"];
|
|
55
|
+
additionalProperties: false;
|
|
56
|
+
};
|
|
57
|
+
export type Member = FromSchema<typeof memberSchema>;
|
|
58
|
+
/**
|
|
59
|
+
* An API key as the owner keeps it: the protocol it speaks, where (absent: that protocol's usual address), and the key.
|
|
60
|
+
* OpenAI's two APIs are two protocols: `openai` is chat completions (what most compatible gateways speak),
|
|
61
|
+
* `openai-responses` is the responses API. A client may take one and refuse the other.
|
|
62
|
+
*/
|
|
63
|
+
export interface ApiKey {
|
|
64
|
+
protocol: 'openai' | 'openai-responses' | 'anthropic' | 'gemini';
|
|
65
|
+
endpoint?: string;
|
|
66
|
+
apiKey: string;
|
|
67
|
+
}
|
|
68
|
+
/** An optional pasted subscription token mode alongside interactive login, sharing the account directory. */
|
|
69
|
+
export interface ClientAccountToken {
|
|
70
|
+
label: string;
|
|
71
|
+
placeholder?: string;
|
|
72
|
+
help?: string;
|
|
73
|
+
env(dir: string, token: string): NodeJS.ProcessEnv | Promise<NodeJS.ProcessEnv>;
|
|
74
|
+
}
|
|
75
|
+
/** A client-owned login. Only the adapter knows how to place its native credentials in this directory. */
|
|
76
|
+
export interface ClientAccount {
|
|
77
|
+
env(dir: string): NodeJS.ProcessEnv | Promise<NodeJS.ProcessEnv>;
|
|
78
|
+
credentialFile?(dir: string): string;
|
|
79
|
+
/** Optional sign-in check when credentials live outside a single file (e.g. OS keychain). */
|
|
80
|
+
checkLogin?(dir: string, env: NodeJS.ProcessEnv): boolean | Promise<boolean>;
|
|
81
|
+
/** Native account commands may be built from the account's resolved environment. */
|
|
82
|
+
login: [string, ...string[]] | ((env: NodeJS.ProcessEnv) => [string, ...string[]]);
|
|
83
|
+
logout?: ClientAccount['login'];
|
|
84
|
+
/** Optional pasted subscription token mode (e.g. Claude setup-token), sharing the same account directory. */
|
|
85
|
+
token?: ClientAccountToken;
|
|
86
|
+
/**
|
|
87
|
+
* What the client keeps in this directory that the owner may clean from Storage, as paths relative to it:
|
|
88
|
+
* rebuildable `cache`, its own `log`s, and `sessions` (conversation history; the next turn opens a new session).
|
|
89
|
+
* Never credentials, configuration or skills.
|
|
90
|
+
*/
|
|
91
|
+
storage?(dir: string): ClientAccountStorage[];
|
|
92
|
+
}
|
|
93
|
+
/** One path inside a client account directory that Storage may offer for cleanup. */
|
|
94
|
+
export interface ClientAccountStorage {
|
|
95
|
+
path: string;
|
|
96
|
+
kind: 'cache' | 'log' | 'sessions';
|
|
97
|
+
}
|
|
98
|
+
/** The two possible results of resolving a member's selected credential. */
|
|
99
|
+
export type ResolvedKey = ApiKey | {
|
|
100
|
+
adapter: string;
|
|
101
|
+
env: NodeJS.ProcessEnv;
|
|
102
|
+
};
|
|
103
|
+
/** A working directory, which its descendants can use too. */
|
|
104
|
+
export declare const dirRefSchema: {
|
|
105
|
+
type: "object";
|
|
106
|
+
properties: {
|
|
107
|
+
readonly refId: {
|
|
108
|
+
readonly type: "string";
|
|
109
|
+
};
|
|
110
|
+
readonly path: {
|
|
111
|
+
readonly type: "string";
|
|
112
|
+
};
|
|
113
|
+
readonly note: {
|
|
114
|
+
readonly type: "string";
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
required: readonly ["refId", "path"];
|
|
118
|
+
additionalProperties: false;
|
|
119
|
+
};
|
|
120
|
+
export type DirRef = FromSchema<typeof dirRefSchema>;
|
|
121
|
+
/** Another topic this topic uses. Only the link and a note are stored. */
|
|
122
|
+
declare const linkedTopicRefSchema: {
|
|
123
|
+
type: "object";
|
|
124
|
+
properties: {
|
|
125
|
+
readonly topicId: {
|
|
126
|
+
readonly type: "string";
|
|
127
|
+
};
|
|
128
|
+
readonly note: {
|
|
129
|
+
readonly type: "string";
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
required: readonly ["topicId"];
|
|
133
|
+
additionalProperties: false;
|
|
134
|
+
};
|
|
135
|
+
export type LinkedTopicRef = FromSchema<typeof linkedTopicRefSchema>;
|
|
136
|
+
export declare const topicRefSchema: {
|
|
137
|
+
readonly oneOf: readonly [{
|
|
138
|
+
readonly required: readonly ["refId", "path"];
|
|
139
|
+
}, {
|
|
140
|
+
readonly required: readonly ["topicId"];
|
|
141
|
+
}];
|
|
142
|
+
readonly type: "object";
|
|
143
|
+
readonly properties: {
|
|
144
|
+
readonly topicId: {
|
|
145
|
+
readonly type: "string";
|
|
146
|
+
};
|
|
147
|
+
readonly note: {
|
|
148
|
+
readonly type: "string";
|
|
149
|
+
};
|
|
150
|
+
readonly refId: {
|
|
151
|
+
readonly type: "string";
|
|
152
|
+
};
|
|
153
|
+
readonly path: {
|
|
154
|
+
readonly type: "string";
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
readonly required: [];
|
|
158
|
+
readonly additionalProperties: false;
|
|
159
|
+
};
|
|
160
|
+
export type TopicRef = FromSchema<typeof topicRefSchema>;
|
|
161
|
+
/** A new directory gets its id from topics; an existing one may carry its id to a new path. */
|
|
162
|
+
export type TopicRefInput = (Omit<DirRef, 'refId'> & {
|
|
163
|
+
refId?: string;
|
|
164
|
+
}) | LinkedTopicRef;
|
|
165
|
+
export declare function isDirRef<T extends TopicRefInput>(ref: T): ref is Extract<T, {
|
|
166
|
+
path: string;
|
|
167
|
+
}>;
|
|
168
|
+
export declare function isTopicRef<T extends TopicRefInput>(ref: T): ref is Extract<T, {
|
|
169
|
+
topicId: string;
|
|
170
|
+
}>;
|
|
171
|
+
/** The main view and optional workbench that open with a topic. */
|
|
172
|
+
declare const topicViewSchema: {
|
|
173
|
+
type: "object";
|
|
174
|
+
properties: {
|
|
175
|
+
readonly main: {
|
|
176
|
+
readonly type: "string";
|
|
177
|
+
};
|
|
178
|
+
readonly panel: {
|
|
179
|
+
readonly type: "string";
|
|
180
|
+
};
|
|
181
|
+
readonly tabs: {
|
|
182
|
+
type: "array";
|
|
183
|
+
items: {
|
|
184
|
+
readonly type: "string";
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
readonly preset: {
|
|
188
|
+
readonly type: "string";
|
|
189
|
+
};
|
|
190
|
+
readonly args: {
|
|
191
|
+
readonly type: "object";
|
|
192
|
+
readonly patternProperties: {
|
|
193
|
+
readonly '.*': {
|
|
194
|
+
readonly type: readonly ["string", "number", "boolean"];
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
required: readonly ["main"];
|
|
200
|
+
additionalProperties: false;
|
|
201
|
+
};
|
|
202
|
+
export type TopicView = FromSchema<typeof topicViewSchema>;
|
|
203
|
+
/** One thing somebody wants done. A node of the tree with one channel and a folder of its own. */
|
|
204
|
+
export declare const topicSchema: {
|
|
205
|
+
type: "object";
|
|
206
|
+
properties: {
|
|
207
|
+
readonly title: {
|
|
208
|
+
readonly type: "string";
|
|
209
|
+
};
|
|
210
|
+
readonly parentId: {
|
|
211
|
+
readonly type: readonly ["string", "null"];
|
|
212
|
+
};
|
|
213
|
+
readonly tags: {
|
|
214
|
+
type: "array";
|
|
215
|
+
items: {
|
|
216
|
+
readonly type: "string";
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
readonly refs: {
|
|
220
|
+
type: "array";
|
|
221
|
+
items: {
|
|
222
|
+
readonly oneOf: readonly [{
|
|
223
|
+
readonly required: readonly ["refId", "path"];
|
|
224
|
+
}, {
|
|
225
|
+
readonly required: readonly ["topicId"];
|
|
226
|
+
}];
|
|
227
|
+
readonly type: "object";
|
|
228
|
+
readonly properties: {
|
|
229
|
+
readonly topicId: {
|
|
230
|
+
readonly type: "string";
|
|
231
|
+
};
|
|
232
|
+
readonly note: {
|
|
233
|
+
readonly type: "string";
|
|
234
|
+
};
|
|
235
|
+
readonly refId: {
|
|
236
|
+
readonly type: "string";
|
|
237
|
+
};
|
|
238
|
+
readonly path: {
|
|
239
|
+
readonly type: "string";
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
readonly required: [];
|
|
243
|
+
readonly additionalProperties: false;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
readonly pinned: {
|
|
247
|
+
readonly type: "boolean";
|
|
248
|
+
};
|
|
249
|
+
readonly caps: {
|
|
250
|
+
readonly type: "object";
|
|
251
|
+
readonly patternProperties: {
|
|
252
|
+
readonly '.*': {
|
|
253
|
+
readonly type: "boolean";
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
readonly view: {
|
|
258
|
+
readonly type: readonly ["object", "null"];
|
|
259
|
+
readonly properties: {
|
|
260
|
+
readonly main: {
|
|
261
|
+
readonly type: "string";
|
|
262
|
+
};
|
|
263
|
+
readonly panel: {
|
|
264
|
+
readonly type: "string";
|
|
265
|
+
};
|
|
266
|
+
readonly tabs: {
|
|
267
|
+
type: "array";
|
|
268
|
+
items: {
|
|
269
|
+
readonly type: "string";
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
readonly preset: {
|
|
273
|
+
readonly type: "string";
|
|
274
|
+
};
|
|
275
|
+
readonly args: {
|
|
276
|
+
readonly type: "object";
|
|
277
|
+
readonly patternProperties: {
|
|
278
|
+
readonly '.*': {
|
|
279
|
+
readonly type: readonly ["string", "number", "boolean"];
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
readonly required: readonly ["main"];
|
|
285
|
+
readonly additionalProperties: false;
|
|
286
|
+
};
|
|
287
|
+
/** The plugin that maintains this topic. Written only by the host, not by topic edits. */
|
|
288
|
+
readonly plugin: {
|
|
289
|
+
readonly type: "string";
|
|
290
|
+
};
|
|
291
|
+
/** Marks the host-maintained system container topic. Written only by the host, not by topic edits. */
|
|
292
|
+
readonly system: {
|
|
293
|
+
readonly type: "boolean";
|
|
294
|
+
readonly const: true;
|
|
295
|
+
};
|
|
296
|
+
/** A topic may limit which members are woken. An empty or absent list allows anyone. */
|
|
297
|
+
readonly members: {
|
|
298
|
+
type: "array";
|
|
299
|
+
items: {
|
|
300
|
+
readonly type: "string";
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
/** Who a message that names nobody is for when nobody has been talked to here yet. */
|
|
304
|
+
readonly defaultMember: {
|
|
305
|
+
readonly type: "string";
|
|
306
|
+
};
|
|
307
|
+
readonly archivedAt: {
|
|
308
|
+
readonly type: readonly ["number", "null"];
|
|
309
|
+
};
|
|
310
|
+
readonly deletedAt: {
|
|
311
|
+
readonly type: readonly ["number", "null"];
|
|
312
|
+
};
|
|
313
|
+
/** Its folder stays the same when the topic moves in the tree. */
|
|
314
|
+
readonly id: {
|
|
315
|
+
readonly type: "string";
|
|
316
|
+
};
|
|
317
|
+
readonly dir: {
|
|
318
|
+
readonly type: "string";
|
|
319
|
+
};
|
|
320
|
+
readonly createdAt: {
|
|
321
|
+
readonly type: "number";
|
|
322
|
+
};
|
|
323
|
+
readonly lastActiveAt: {
|
|
324
|
+
readonly type: "number";
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
required: readonly ["id", "title", "parentId", "tags", "refs", "pinned", "caps", "dir", "createdAt", "lastActiveAt", "archivedAt", "deletedAt"];
|
|
328
|
+
additionalProperties: false;
|
|
329
|
+
};
|
|
330
|
+
export type Topic = FromSchema<typeof topicSchema>;
|
|
331
|
+
/** Who said something: a member, or the host itself. */
|
|
332
|
+
export declare const senderSchema: {
|
|
333
|
+
type: "object";
|
|
334
|
+
properties: {
|
|
335
|
+
readonly kind: {
|
|
336
|
+
readonly type: "string";
|
|
337
|
+
readonly enum: readonly ["member", "system"];
|
|
338
|
+
};
|
|
339
|
+
readonly id: {
|
|
340
|
+
readonly type: "string";
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
required: readonly ["kind", "id"];
|
|
344
|
+
additionalProperties: false;
|
|
345
|
+
};
|
|
346
|
+
export type Sender = FromSchema<typeof senderSchema>;
|
|
347
|
+
export interface AskOption {
|
|
348
|
+
id: string;
|
|
349
|
+
label: string;
|
|
350
|
+
kind?: string;
|
|
351
|
+
}
|
|
352
|
+
/** Whether something was done, and what is to be said about it. `unconfirmed`: it may or may not have been done. */
|
|
353
|
+
declare const cardResultSchema: {
|
|
354
|
+
type: "object";
|
|
355
|
+
properties: {
|
|
356
|
+
readonly ok: {
|
|
357
|
+
readonly type: "boolean";
|
|
358
|
+
};
|
|
359
|
+
readonly text: {
|
|
360
|
+
readonly type: "string";
|
|
361
|
+
};
|
|
362
|
+
readonly unconfirmed: {
|
|
363
|
+
readonly type: "boolean";
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
required: readonly ["ok"];
|
|
367
|
+
additionalProperties: false;
|
|
368
|
+
};
|
|
369
|
+
export type CardResult = FromSchema<typeof cardResultSchema>;
|
|
370
|
+
export declare const fillRequestSchema: {
|
|
371
|
+
type: "object";
|
|
372
|
+
properties: {
|
|
373
|
+
readonly path: {
|
|
374
|
+
readonly description: "操作参数的 JSON Pointer,例如 /env 或 /updates/api.key";
|
|
375
|
+
readonly type: "string";
|
|
376
|
+
};
|
|
377
|
+
readonly label: {
|
|
378
|
+
readonly type: "string";
|
|
379
|
+
};
|
|
380
|
+
readonly description: {
|
|
381
|
+
readonly type: "string";
|
|
382
|
+
};
|
|
383
|
+
readonly required: {
|
|
384
|
+
readonly type: "boolean";
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
required: readonly ["path"];
|
|
388
|
+
additionalProperties: false;
|
|
389
|
+
};
|
|
390
|
+
declare const approvalInputSchema: {
|
|
391
|
+
type: "object";
|
|
392
|
+
properties: {
|
|
393
|
+
readonly secret: {
|
|
394
|
+
readonly type: "boolean";
|
|
395
|
+
};
|
|
396
|
+
readonly format: {
|
|
397
|
+
readonly type: "string";
|
|
398
|
+
readonly enum: readonly ["key-value-lines"];
|
|
399
|
+
};
|
|
400
|
+
readonly path: {
|
|
401
|
+
readonly description: "操作参数的 JSON Pointer,例如 /env 或 /updates/api.key";
|
|
402
|
+
readonly type: "string";
|
|
403
|
+
};
|
|
404
|
+
readonly label: {
|
|
405
|
+
readonly type: "string";
|
|
406
|
+
};
|
|
407
|
+
readonly description: {
|
|
408
|
+
readonly type: "string";
|
|
409
|
+
};
|
|
410
|
+
readonly required: {
|
|
411
|
+
readonly type: "boolean";
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
required: readonly ["path", "label", "required", "secret"];
|
|
415
|
+
additionalProperties: false;
|
|
416
|
+
};
|
|
417
|
+
export type FillRequest = FromSchema<typeof fillRequestSchema>;
|
|
418
|
+
export type ApprovalInput = FromSchema<typeof approvalInputSchema>;
|
|
419
|
+
export type InputValues = Record<string, Record<string, string>>;
|
|
420
|
+
/** One thing to approve, with optional facts and an exact payload to inspect. */
|
|
421
|
+
declare const cardItemSchema: {
|
|
422
|
+
type: "object";
|
|
423
|
+
properties: {
|
|
424
|
+
readonly id: {
|
|
425
|
+
readonly type: "string";
|
|
426
|
+
};
|
|
427
|
+
readonly title: {
|
|
428
|
+
readonly type: "string";
|
|
429
|
+
};
|
|
430
|
+
readonly detail: {
|
|
431
|
+
readonly type: "string";
|
|
432
|
+
};
|
|
433
|
+
readonly result: {
|
|
434
|
+
type: "object";
|
|
435
|
+
properties: {
|
|
436
|
+
readonly ok: {
|
|
437
|
+
readonly type: "boolean";
|
|
438
|
+
};
|
|
439
|
+
readonly text: {
|
|
440
|
+
readonly type: "string";
|
|
441
|
+
};
|
|
442
|
+
readonly unconfirmed: {
|
|
443
|
+
readonly type: "boolean";
|
|
444
|
+
};
|
|
445
|
+
};
|
|
446
|
+
required: readonly ["ok"];
|
|
447
|
+
additionalProperties: false;
|
|
448
|
+
};
|
|
449
|
+
readonly option: {
|
|
450
|
+
readonly type: "string";
|
|
451
|
+
};
|
|
452
|
+
readonly inputs: {
|
|
453
|
+
type: "array";
|
|
454
|
+
items: {
|
|
455
|
+
type: "object";
|
|
456
|
+
properties: {
|
|
457
|
+
readonly secret: {
|
|
458
|
+
readonly type: "boolean";
|
|
459
|
+
};
|
|
460
|
+
readonly format: {
|
|
461
|
+
readonly type: "string";
|
|
462
|
+
readonly enum: readonly ["key-value-lines"];
|
|
463
|
+
};
|
|
464
|
+
readonly path: {
|
|
465
|
+
readonly description: "操作参数的 JSON Pointer,例如 /env 或 /updates/api.key";
|
|
466
|
+
readonly type: "string";
|
|
467
|
+
};
|
|
468
|
+
readonly label: {
|
|
469
|
+
readonly type: "string";
|
|
470
|
+
};
|
|
471
|
+
readonly description: {
|
|
472
|
+
readonly type: "string";
|
|
473
|
+
};
|
|
474
|
+
readonly required: {
|
|
475
|
+
readonly type: "boolean";
|
|
476
|
+
};
|
|
477
|
+
};
|
|
478
|
+
required: readonly ["path", "label", "required", "secret"];
|
|
479
|
+
additionalProperties: false;
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
readonly fields: {
|
|
483
|
+
type: "array";
|
|
484
|
+
items: {
|
|
485
|
+
type: "object";
|
|
486
|
+
properties: {
|
|
487
|
+
readonly label: {
|
|
488
|
+
readonly type: "string";
|
|
489
|
+
};
|
|
490
|
+
readonly value: {
|
|
491
|
+
readonly type: "string";
|
|
492
|
+
};
|
|
493
|
+
readonly tone: {
|
|
494
|
+
readonly type: "string";
|
|
495
|
+
readonly enum: readonly ["warn"];
|
|
496
|
+
};
|
|
497
|
+
};
|
|
498
|
+
required: readonly ["label", "value"];
|
|
499
|
+
additionalProperties: false;
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
readonly code: {
|
|
503
|
+
type: "object";
|
|
504
|
+
properties: {
|
|
505
|
+
readonly label: {
|
|
506
|
+
readonly type: "string";
|
|
507
|
+
};
|
|
508
|
+
readonly text: {
|
|
509
|
+
readonly type: "string";
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
required: readonly ["label", "text"];
|
|
513
|
+
additionalProperties: false;
|
|
514
|
+
};
|
|
515
|
+
};
|
|
516
|
+
required: readonly ["id"];
|
|
517
|
+
additionalProperties: false;
|
|
518
|
+
};
|
|
519
|
+
export type CardItem = FromSchema<typeof cardItemSchema>;
|
|
520
|
+
/** A structured value a member gives with its vote, as the sender of the card declares it. */
|
|
521
|
+
export declare const signFieldSchema: {
|
|
522
|
+
type: "object";
|
|
523
|
+
properties: {
|
|
524
|
+
readonly key: {
|
|
525
|
+
readonly type: "string";
|
|
526
|
+
};
|
|
527
|
+
readonly label: {
|
|
528
|
+
readonly type: "string";
|
|
529
|
+
};
|
|
530
|
+
readonly options: {
|
|
531
|
+
type: "array";
|
|
532
|
+
items: {
|
|
533
|
+
readonly type: "string";
|
|
534
|
+
};
|
|
535
|
+
};
|
|
536
|
+
readonly when: {
|
|
537
|
+
readonly type: "string";
|
|
538
|
+
readonly enum: readonly ["approve", "reject", "always"];
|
|
539
|
+
};
|
|
540
|
+
readonly required: {
|
|
541
|
+
readonly type: "boolean";
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
required: readonly ["key", "label", "when"];
|
|
545
|
+
additionalProperties: false;
|
|
546
|
+
};
|
|
547
|
+
export type SignField = FromSchema<typeof signFieldSchema>;
|
|
548
|
+
/** One member's vote on a card that members may sign, with the turn it was given in. */
|
|
549
|
+
declare const signatureSchema: {
|
|
550
|
+
type: "object";
|
|
551
|
+
properties: {
|
|
552
|
+
readonly by: {
|
|
553
|
+
readonly type: "string";
|
|
554
|
+
};
|
|
555
|
+
readonly at: {
|
|
556
|
+
readonly type: "number";
|
|
557
|
+
};
|
|
558
|
+
readonly turnId: {
|
|
559
|
+
readonly type: "string";
|
|
560
|
+
};
|
|
561
|
+
readonly approved: {
|
|
562
|
+
readonly type: "boolean";
|
|
563
|
+
};
|
|
564
|
+
readonly text: {
|
|
565
|
+
readonly type: "string";
|
|
566
|
+
};
|
|
567
|
+
readonly values: {
|
|
568
|
+
readonly type: "object";
|
|
569
|
+
readonly additionalProperties: {
|
|
570
|
+
readonly type: "string";
|
|
571
|
+
};
|
|
572
|
+
};
|
|
573
|
+
};
|
|
574
|
+
required: readonly ["by", "at", "approved", "text"];
|
|
575
|
+
additionalProperties: false;
|
|
576
|
+
};
|
|
577
|
+
export type Signature = FromSchema<typeof signatureSchema>;
|
|
578
|
+
/**
|
|
579
|
+
* Who besides the people a card asks may sign it, and how many votes settle it. Fixed once `openedAt` is set:
|
|
580
|
+
* `who` is invited, `need` approvals settle it, a dissent either blocks member settlement (`block`) or rejects it.
|
|
581
|
+
*/
|
|
582
|
+
declare const quorumSchema: {
|
|
583
|
+
type: "object";
|
|
584
|
+
properties: {
|
|
585
|
+
readonly need: {
|
|
586
|
+
readonly type: "integer";
|
|
587
|
+
};
|
|
588
|
+
readonly who: {
|
|
589
|
+
type: "array";
|
|
590
|
+
items: {
|
|
591
|
+
readonly type: "string";
|
|
592
|
+
};
|
|
593
|
+
};
|
|
594
|
+
readonly openedAt: {
|
|
595
|
+
readonly type: "number";
|
|
596
|
+
};
|
|
597
|
+
readonly onReject: {
|
|
598
|
+
readonly type: "string";
|
|
599
|
+
readonly enum: readonly ["block", "reject"];
|
|
600
|
+
};
|
|
601
|
+
readonly fields: {
|
|
602
|
+
type: "array";
|
|
603
|
+
items: {
|
|
604
|
+
type: "object";
|
|
605
|
+
properties: {
|
|
606
|
+
readonly key: {
|
|
607
|
+
readonly type: "string";
|
|
608
|
+
};
|
|
609
|
+
readonly label: {
|
|
610
|
+
readonly type: "string";
|
|
611
|
+
};
|
|
612
|
+
readonly options: {
|
|
613
|
+
type: "array";
|
|
614
|
+
items: {
|
|
615
|
+
readonly type: "string";
|
|
616
|
+
};
|
|
617
|
+
};
|
|
618
|
+
readonly when: {
|
|
619
|
+
readonly type: "string";
|
|
620
|
+
readonly enum: readonly ["approve", "reject", "always"];
|
|
621
|
+
};
|
|
622
|
+
readonly required: {
|
|
623
|
+
readonly type: "boolean";
|
|
624
|
+
};
|
|
625
|
+
};
|
|
626
|
+
required: readonly ["key", "label", "when"];
|
|
627
|
+
additionalProperties: false;
|
|
628
|
+
};
|
|
629
|
+
};
|
|
630
|
+
readonly blocked: {
|
|
631
|
+
readonly type: "string";
|
|
632
|
+
};
|
|
633
|
+
};
|
|
634
|
+
required: readonly ["need", "who"];
|
|
635
|
+
additionalProperties: false;
|
|
636
|
+
};
|
|
637
|
+
export type Quorum = FromSchema<typeof quorumSchema>;
|
|
638
|
+
/** What a person answered a card with; `via: 'quorum'` when members' signatures settled it. */
|
|
639
|
+
declare const cardAnswerSchema: {
|
|
640
|
+
type: "object";
|
|
641
|
+
properties: {
|
|
642
|
+
readonly by: {
|
|
643
|
+
readonly type: "string";
|
|
644
|
+
};
|
|
645
|
+
readonly at: {
|
|
646
|
+
readonly type: "number";
|
|
647
|
+
};
|
|
648
|
+
readonly picked: {
|
|
649
|
+
type: "array";
|
|
650
|
+
items: {
|
|
651
|
+
readonly type: "string";
|
|
652
|
+
};
|
|
653
|
+
};
|
|
654
|
+
readonly text: {
|
|
655
|
+
readonly type: "string";
|
|
656
|
+
};
|
|
657
|
+
readonly approved: {
|
|
658
|
+
readonly type: "boolean";
|
|
659
|
+
};
|
|
660
|
+
readonly remember: {
|
|
661
|
+
readonly type: "boolean";
|
|
662
|
+
};
|
|
663
|
+
readonly filled: {
|
|
664
|
+
readonly type: "object";
|
|
665
|
+
readonly additionalProperties: {
|
|
666
|
+
type: "array";
|
|
667
|
+
items: {
|
|
668
|
+
readonly type: "string";
|
|
669
|
+
};
|
|
670
|
+
};
|
|
671
|
+
};
|
|
672
|
+
readonly via: {
|
|
673
|
+
readonly type: "string";
|
|
674
|
+
readonly enum: readonly ["owner", "quorum"];
|
|
675
|
+
};
|
|
676
|
+
readonly signs: {
|
|
677
|
+
type: "array";
|
|
678
|
+
items: {
|
|
679
|
+
type: "object";
|
|
680
|
+
properties: {
|
|
681
|
+
readonly by: {
|
|
682
|
+
readonly type: "string";
|
|
683
|
+
};
|
|
684
|
+
readonly at: {
|
|
685
|
+
readonly type: "number";
|
|
686
|
+
};
|
|
687
|
+
readonly turnId: {
|
|
688
|
+
readonly type: "string";
|
|
689
|
+
};
|
|
690
|
+
readonly approved: {
|
|
691
|
+
readonly type: "boolean";
|
|
692
|
+
};
|
|
693
|
+
readonly text: {
|
|
694
|
+
readonly type: "string";
|
|
695
|
+
};
|
|
696
|
+
readonly values: {
|
|
697
|
+
readonly type: "object";
|
|
698
|
+
readonly additionalProperties: {
|
|
699
|
+
readonly type: "string";
|
|
700
|
+
};
|
|
701
|
+
};
|
|
702
|
+
};
|
|
703
|
+
required: readonly ["by", "at", "approved", "text"];
|
|
704
|
+
additionalProperties: false;
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
};
|
|
708
|
+
required: readonly ["by", "at"];
|
|
709
|
+
additionalProperties: false;
|
|
710
|
+
};
|
|
711
|
+
export type CardAnswer = FromSchema<typeof cardAnswerSchema>;
|
|
712
|
+
/** A question whose answer and outcome are kept on the same card. */
|
|
713
|
+
declare const cardSchema: {
|
|
714
|
+
type: "object";
|
|
715
|
+
properties: {
|
|
716
|
+
readonly kind: {
|
|
717
|
+
readonly type: "string";
|
|
718
|
+
};
|
|
719
|
+
readonly ask: {
|
|
720
|
+
readonly type: "string";
|
|
721
|
+
};
|
|
722
|
+
readonly to: {
|
|
723
|
+
type: "array";
|
|
724
|
+
items: {
|
|
725
|
+
readonly type: "string";
|
|
726
|
+
};
|
|
727
|
+
};
|
|
728
|
+
readonly title: {
|
|
729
|
+
readonly type: "string";
|
|
730
|
+
};
|
|
731
|
+
readonly body: {
|
|
732
|
+
readonly type: "string";
|
|
733
|
+
};
|
|
734
|
+
readonly by: {
|
|
735
|
+
readonly type: "string";
|
|
736
|
+
};
|
|
737
|
+
readonly data: {
|
|
738
|
+
readonly type: "object";
|
|
739
|
+
};
|
|
740
|
+
readonly options: {
|
|
741
|
+
type: "array";
|
|
742
|
+
items: {
|
|
743
|
+
type: "object";
|
|
744
|
+
properties: {
|
|
745
|
+
readonly id: {
|
|
746
|
+
readonly type: "string";
|
|
747
|
+
};
|
|
748
|
+
readonly label: {
|
|
749
|
+
readonly type: "string";
|
|
750
|
+
};
|
|
751
|
+
readonly detail: {
|
|
752
|
+
readonly type: "string";
|
|
753
|
+
};
|
|
754
|
+
readonly image: {
|
|
755
|
+
readonly type: "string";
|
|
756
|
+
};
|
|
757
|
+
readonly open: {
|
|
758
|
+
readonly type: "string";
|
|
759
|
+
};
|
|
760
|
+
};
|
|
761
|
+
required: readonly ["id", "label"];
|
|
762
|
+
additionalProperties: false;
|
|
763
|
+
};
|
|
764
|
+
};
|
|
765
|
+
readonly multi: {
|
|
766
|
+
readonly type: "boolean";
|
|
767
|
+
};
|
|
768
|
+
readonly other: {
|
|
769
|
+
readonly type: "boolean";
|
|
770
|
+
};
|
|
771
|
+
readonly items: {
|
|
772
|
+
type: "array";
|
|
773
|
+
items: {
|
|
774
|
+
type: "object";
|
|
775
|
+
properties: {
|
|
776
|
+
readonly id: {
|
|
777
|
+
readonly type: "string";
|
|
778
|
+
};
|
|
779
|
+
readonly title: {
|
|
780
|
+
readonly type: "string";
|
|
781
|
+
};
|
|
782
|
+
readonly detail: {
|
|
783
|
+
readonly type: "string";
|
|
784
|
+
};
|
|
785
|
+
readonly result: {
|
|
786
|
+
type: "object";
|
|
787
|
+
properties: {
|
|
788
|
+
readonly ok: {
|
|
789
|
+
readonly type: "boolean";
|
|
790
|
+
};
|
|
791
|
+
readonly text: {
|
|
792
|
+
readonly type: "string";
|
|
793
|
+
};
|
|
794
|
+
readonly unconfirmed: {
|
|
795
|
+
readonly type: "boolean";
|
|
796
|
+
};
|
|
797
|
+
};
|
|
798
|
+
required: readonly ["ok"];
|
|
799
|
+
additionalProperties: false;
|
|
800
|
+
};
|
|
801
|
+
readonly option: {
|
|
802
|
+
readonly type: "string";
|
|
803
|
+
};
|
|
804
|
+
readonly inputs: {
|
|
805
|
+
type: "array";
|
|
806
|
+
items: {
|
|
807
|
+
type: "object";
|
|
808
|
+
properties: {
|
|
809
|
+
readonly secret: {
|
|
810
|
+
readonly type: "boolean";
|
|
811
|
+
};
|
|
812
|
+
readonly format: {
|
|
813
|
+
readonly type: "string";
|
|
814
|
+
readonly enum: readonly ["key-value-lines"];
|
|
815
|
+
};
|
|
816
|
+
readonly path: {
|
|
817
|
+
readonly description: "操作参数的 JSON Pointer,例如 /env 或 /updates/api.key";
|
|
818
|
+
readonly type: "string";
|
|
819
|
+
};
|
|
820
|
+
readonly label: {
|
|
821
|
+
readonly type: "string";
|
|
822
|
+
};
|
|
823
|
+
readonly description: {
|
|
824
|
+
readonly type: "string";
|
|
825
|
+
};
|
|
826
|
+
readonly required: {
|
|
827
|
+
readonly type: "boolean";
|
|
828
|
+
};
|
|
829
|
+
};
|
|
830
|
+
required: readonly ["path", "label", "required", "secret"];
|
|
831
|
+
additionalProperties: false;
|
|
832
|
+
};
|
|
833
|
+
};
|
|
834
|
+
readonly fields: {
|
|
835
|
+
type: "array";
|
|
836
|
+
items: {
|
|
837
|
+
type: "object";
|
|
838
|
+
properties: {
|
|
839
|
+
readonly label: {
|
|
840
|
+
readonly type: "string";
|
|
841
|
+
};
|
|
842
|
+
readonly value: {
|
|
843
|
+
readonly type: "string";
|
|
844
|
+
};
|
|
845
|
+
readonly tone: {
|
|
846
|
+
readonly type: "string";
|
|
847
|
+
readonly enum: readonly ["warn"];
|
|
848
|
+
};
|
|
849
|
+
};
|
|
850
|
+
required: readonly ["label", "value"];
|
|
851
|
+
additionalProperties: false;
|
|
852
|
+
};
|
|
853
|
+
};
|
|
854
|
+
readonly code: {
|
|
855
|
+
type: "object";
|
|
856
|
+
properties: {
|
|
857
|
+
readonly label: {
|
|
858
|
+
readonly type: "string";
|
|
859
|
+
};
|
|
860
|
+
readonly text: {
|
|
861
|
+
readonly type: "string";
|
|
862
|
+
};
|
|
863
|
+
};
|
|
864
|
+
required: readonly ["label", "text"];
|
|
865
|
+
additionalProperties: false;
|
|
866
|
+
};
|
|
867
|
+
};
|
|
868
|
+
required: readonly ["id"];
|
|
869
|
+
additionalProperties: false;
|
|
870
|
+
};
|
|
871
|
+
};
|
|
872
|
+
readonly approve: {
|
|
873
|
+
readonly type: "string";
|
|
874
|
+
};
|
|
875
|
+
readonly reject: {
|
|
876
|
+
readonly type: "string";
|
|
877
|
+
};
|
|
878
|
+
readonly remember: {
|
|
879
|
+
readonly type: "string";
|
|
880
|
+
};
|
|
881
|
+
readonly rev: {
|
|
882
|
+
readonly type: "integer";
|
|
883
|
+
};
|
|
884
|
+
readonly state: {
|
|
885
|
+
readonly type: "string";
|
|
886
|
+
readonly enum: readonly ["pending", "answered", "closed"];
|
|
887
|
+
};
|
|
888
|
+
readonly answer: {
|
|
889
|
+
type: "object";
|
|
890
|
+
properties: {
|
|
891
|
+
readonly by: {
|
|
892
|
+
readonly type: "string";
|
|
893
|
+
};
|
|
894
|
+
readonly at: {
|
|
895
|
+
readonly type: "number";
|
|
896
|
+
};
|
|
897
|
+
readonly picked: {
|
|
898
|
+
type: "array";
|
|
899
|
+
items: {
|
|
900
|
+
readonly type: "string";
|
|
901
|
+
};
|
|
902
|
+
};
|
|
903
|
+
readonly text: {
|
|
904
|
+
readonly type: "string";
|
|
905
|
+
};
|
|
906
|
+
readonly approved: {
|
|
907
|
+
readonly type: "boolean";
|
|
908
|
+
};
|
|
909
|
+
readonly remember: {
|
|
910
|
+
readonly type: "boolean";
|
|
911
|
+
};
|
|
912
|
+
readonly filled: {
|
|
913
|
+
readonly type: "object";
|
|
914
|
+
readonly additionalProperties: {
|
|
915
|
+
type: "array";
|
|
916
|
+
items: {
|
|
917
|
+
readonly type: "string";
|
|
918
|
+
};
|
|
919
|
+
};
|
|
920
|
+
};
|
|
921
|
+
readonly via: {
|
|
922
|
+
readonly type: "string";
|
|
923
|
+
readonly enum: readonly ["owner", "quorum"];
|
|
924
|
+
};
|
|
925
|
+
readonly signs: {
|
|
926
|
+
type: "array";
|
|
927
|
+
items: {
|
|
928
|
+
type: "object";
|
|
929
|
+
properties: {
|
|
930
|
+
readonly by: {
|
|
931
|
+
readonly type: "string";
|
|
932
|
+
};
|
|
933
|
+
readonly at: {
|
|
934
|
+
readonly type: "number";
|
|
935
|
+
};
|
|
936
|
+
readonly turnId: {
|
|
937
|
+
readonly type: "string";
|
|
938
|
+
};
|
|
939
|
+
readonly approved: {
|
|
940
|
+
readonly type: "boolean";
|
|
941
|
+
};
|
|
942
|
+
readonly text: {
|
|
943
|
+
readonly type: "string";
|
|
944
|
+
};
|
|
945
|
+
readonly values: {
|
|
946
|
+
readonly type: "object";
|
|
947
|
+
readonly additionalProperties: {
|
|
948
|
+
readonly type: "string";
|
|
949
|
+
};
|
|
950
|
+
};
|
|
951
|
+
};
|
|
952
|
+
required: readonly ["by", "at", "approved", "text"];
|
|
953
|
+
additionalProperties: false;
|
|
954
|
+
};
|
|
955
|
+
};
|
|
956
|
+
};
|
|
957
|
+
required: readonly ["by", "at"];
|
|
958
|
+
additionalProperties: false;
|
|
959
|
+
};
|
|
960
|
+
readonly outcome: {
|
|
961
|
+
type: "object";
|
|
962
|
+
properties: {
|
|
963
|
+
readonly ok: {
|
|
964
|
+
readonly type: "boolean";
|
|
965
|
+
};
|
|
966
|
+
readonly text: {
|
|
967
|
+
readonly type: "string";
|
|
968
|
+
};
|
|
969
|
+
readonly unconfirmed: {
|
|
970
|
+
readonly type: "boolean";
|
|
971
|
+
};
|
|
972
|
+
};
|
|
973
|
+
required: readonly ["ok"];
|
|
974
|
+
additionalProperties: false;
|
|
975
|
+
};
|
|
976
|
+
readonly note: {
|
|
977
|
+
readonly type: "string";
|
|
978
|
+
};
|
|
979
|
+
readonly quorum: {
|
|
980
|
+
type: "object";
|
|
981
|
+
properties: {
|
|
982
|
+
readonly need: {
|
|
983
|
+
readonly type: "integer";
|
|
984
|
+
};
|
|
985
|
+
readonly who: {
|
|
986
|
+
type: "array";
|
|
987
|
+
items: {
|
|
988
|
+
readonly type: "string";
|
|
989
|
+
};
|
|
990
|
+
};
|
|
991
|
+
readonly openedAt: {
|
|
992
|
+
readonly type: "number";
|
|
993
|
+
};
|
|
994
|
+
readonly onReject: {
|
|
995
|
+
readonly type: "string";
|
|
996
|
+
readonly enum: readonly ["block", "reject"];
|
|
997
|
+
};
|
|
998
|
+
readonly fields: {
|
|
999
|
+
type: "array";
|
|
1000
|
+
items: {
|
|
1001
|
+
type: "object";
|
|
1002
|
+
properties: {
|
|
1003
|
+
readonly key: {
|
|
1004
|
+
readonly type: "string";
|
|
1005
|
+
};
|
|
1006
|
+
readonly label: {
|
|
1007
|
+
readonly type: "string";
|
|
1008
|
+
};
|
|
1009
|
+
readonly options: {
|
|
1010
|
+
type: "array";
|
|
1011
|
+
items: {
|
|
1012
|
+
readonly type: "string";
|
|
1013
|
+
};
|
|
1014
|
+
};
|
|
1015
|
+
readonly when: {
|
|
1016
|
+
readonly type: "string";
|
|
1017
|
+
readonly enum: readonly ["approve", "reject", "always"];
|
|
1018
|
+
};
|
|
1019
|
+
readonly required: {
|
|
1020
|
+
readonly type: "boolean";
|
|
1021
|
+
};
|
|
1022
|
+
};
|
|
1023
|
+
required: readonly ["key", "label", "when"];
|
|
1024
|
+
additionalProperties: false;
|
|
1025
|
+
};
|
|
1026
|
+
};
|
|
1027
|
+
readonly blocked: {
|
|
1028
|
+
readonly type: "string";
|
|
1029
|
+
};
|
|
1030
|
+
};
|
|
1031
|
+
required: readonly ["need", "who"];
|
|
1032
|
+
additionalProperties: false;
|
|
1033
|
+
};
|
|
1034
|
+
readonly signs: {
|
|
1035
|
+
type: "array";
|
|
1036
|
+
items: {
|
|
1037
|
+
type: "object";
|
|
1038
|
+
properties: {
|
|
1039
|
+
readonly by: {
|
|
1040
|
+
readonly type: "string";
|
|
1041
|
+
};
|
|
1042
|
+
readonly at: {
|
|
1043
|
+
readonly type: "number";
|
|
1044
|
+
};
|
|
1045
|
+
readonly turnId: {
|
|
1046
|
+
readonly type: "string";
|
|
1047
|
+
};
|
|
1048
|
+
readonly approved: {
|
|
1049
|
+
readonly type: "boolean";
|
|
1050
|
+
};
|
|
1051
|
+
readonly text: {
|
|
1052
|
+
readonly type: "string";
|
|
1053
|
+
};
|
|
1054
|
+
readonly values: {
|
|
1055
|
+
readonly type: "object";
|
|
1056
|
+
readonly additionalProperties: {
|
|
1057
|
+
readonly type: "string";
|
|
1058
|
+
};
|
|
1059
|
+
};
|
|
1060
|
+
};
|
|
1061
|
+
required: readonly ["by", "at", "approved", "text"];
|
|
1062
|
+
additionalProperties: false;
|
|
1063
|
+
};
|
|
1064
|
+
};
|
|
1065
|
+
readonly expiresAt: {
|
|
1066
|
+
readonly type: "number";
|
|
1067
|
+
};
|
|
1068
|
+
};
|
|
1069
|
+
required: readonly ["kind", "title", "rev", "state"];
|
|
1070
|
+
additionalProperties: false;
|
|
1071
|
+
};
|
|
1072
|
+
type LocalizedCard = {
|
|
1073
|
+
/** Plugin-provided display text. Options use their answer ids. */
|
|
1074
|
+
i18n?: {
|
|
1075
|
+
title: LText;
|
|
1076
|
+
body?: LText;
|
|
1077
|
+
options?: Record<string, LText>;
|
|
1078
|
+
};
|
|
1079
|
+
};
|
|
1080
|
+
export type Card = FromSchema<typeof cardSchema> & LocalizedCard;
|
|
1081
|
+
declare const partSchema: {
|
|
1082
|
+
readonly type: "object";
|
|
1083
|
+
readonly properties: {
|
|
1084
|
+
readonly type: {
|
|
1085
|
+
readonly type: "string";
|
|
1086
|
+
readonly enum: readonly ["text", "thinking", "tool", "card", "reference", "excerpt"];
|
|
1087
|
+
};
|
|
1088
|
+
};
|
|
1089
|
+
readonly required: readonly ["type"];
|
|
1090
|
+
readonly oneOf: readonly [{
|
|
1091
|
+
type: "object";
|
|
1092
|
+
properties: {
|
|
1093
|
+
readonly type: {
|
|
1094
|
+
readonly type: "string";
|
|
1095
|
+
readonly enum: readonly ["text", "thinking"];
|
|
1096
|
+
};
|
|
1097
|
+
readonly text: {
|
|
1098
|
+
readonly type: "string";
|
|
1099
|
+
};
|
|
1100
|
+
};
|
|
1101
|
+
required: readonly ["type", "text"];
|
|
1102
|
+
additionalProperties: false;
|
|
1103
|
+
}, {
|
|
1104
|
+
type: "object";
|
|
1105
|
+
properties: {
|
|
1106
|
+
readonly type: {
|
|
1107
|
+
readonly type: "string";
|
|
1108
|
+
readonly enum: readonly ["tool"];
|
|
1109
|
+
};
|
|
1110
|
+
readonly id: {
|
|
1111
|
+
readonly type: "string";
|
|
1112
|
+
};
|
|
1113
|
+
readonly name: {
|
|
1114
|
+
readonly type: "string";
|
|
1115
|
+
};
|
|
1116
|
+
readonly input: {
|
|
1117
|
+
readonly type: "string";
|
|
1118
|
+
};
|
|
1119
|
+
readonly output: {
|
|
1120
|
+
readonly type: "string";
|
|
1121
|
+
};
|
|
1122
|
+
readonly status: {
|
|
1123
|
+
readonly type: "string";
|
|
1124
|
+
readonly enum: readonly ["running", "done", "failed"];
|
|
1125
|
+
};
|
|
1126
|
+
readonly agent: {
|
|
1127
|
+
readonly type: "boolean";
|
|
1128
|
+
};
|
|
1129
|
+
};
|
|
1130
|
+
required: readonly ["type", "id", "name", "status"];
|
|
1131
|
+
additionalProperties: false;
|
|
1132
|
+
}, {
|
|
1133
|
+
type: "object";
|
|
1134
|
+
properties: {
|
|
1135
|
+
readonly kind: {
|
|
1136
|
+
readonly type: "string";
|
|
1137
|
+
};
|
|
1138
|
+
readonly ask: {
|
|
1139
|
+
readonly type: "string";
|
|
1140
|
+
};
|
|
1141
|
+
readonly to: {
|
|
1142
|
+
type: "array";
|
|
1143
|
+
items: {
|
|
1144
|
+
readonly type: "string";
|
|
1145
|
+
};
|
|
1146
|
+
};
|
|
1147
|
+
readonly title: {
|
|
1148
|
+
readonly type: "string";
|
|
1149
|
+
};
|
|
1150
|
+
readonly body: {
|
|
1151
|
+
readonly type: "string";
|
|
1152
|
+
};
|
|
1153
|
+
readonly by: {
|
|
1154
|
+
readonly type: "string";
|
|
1155
|
+
};
|
|
1156
|
+
readonly data: {
|
|
1157
|
+
readonly type: "object";
|
|
1158
|
+
};
|
|
1159
|
+
readonly options: {
|
|
1160
|
+
type: "array";
|
|
1161
|
+
items: {
|
|
1162
|
+
type: "object";
|
|
1163
|
+
properties: {
|
|
1164
|
+
readonly id: {
|
|
1165
|
+
readonly type: "string";
|
|
1166
|
+
};
|
|
1167
|
+
readonly label: {
|
|
1168
|
+
readonly type: "string";
|
|
1169
|
+
};
|
|
1170
|
+
readonly detail: {
|
|
1171
|
+
readonly type: "string";
|
|
1172
|
+
};
|
|
1173
|
+
readonly image: {
|
|
1174
|
+
readonly type: "string";
|
|
1175
|
+
};
|
|
1176
|
+
readonly open: {
|
|
1177
|
+
readonly type: "string";
|
|
1178
|
+
};
|
|
1179
|
+
};
|
|
1180
|
+
required: readonly ["id", "label"];
|
|
1181
|
+
additionalProperties: false;
|
|
1182
|
+
};
|
|
1183
|
+
};
|
|
1184
|
+
readonly multi: {
|
|
1185
|
+
readonly type: "boolean";
|
|
1186
|
+
};
|
|
1187
|
+
readonly other: {
|
|
1188
|
+
readonly type: "boolean";
|
|
1189
|
+
};
|
|
1190
|
+
readonly items: {
|
|
1191
|
+
type: "array";
|
|
1192
|
+
items: {
|
|
1193
|
+
type: "object";
|
|
1194
|
+
properties: {
|
|
1195
|
+
readonly id: {
|
|
1196
|
+
readonly type: "string";
|
|
1197
|
+
};
|
|
1198
|
+
readonly title: {
|
|
1199
|
+
readonly type: "string";
|
|
1200
|
+
};
|
|
1201
|
+
readonly detail: {
|
|
1202
|
+
readonly type: "string";
|
|
1203
|
+
};
|
|
1204
|
+
readonly result: {
|
|
1205
|
+
type: "object";
|
|
1206
|
+
properties: {
|
|
1207
|
+
readonly ok: {
|
|
1208
|
+
readonly type: "boolean";
|
|
1209
|
+
};
|
|
1210
|
+
readonly text: {
|
|
1211
|
+
readonly type: "string";
|
|
1212
|
+
};
|
|
1213
|
+
readonly unconfirmed: {
|
|
1214
|
+
readonly type: "boolean";
|
|
1215
|
+
};
|
|
1216
|
+
};
|
|
1217
|
+
required: readonly ["ok"];
|
|
1218
|
+
additionalProperties: false;
|
|
1219
|
+
};
|
|
1220
|
+
readonly option: {
|
|
1221
|
+
readonly type: "string";
|
|
1222
|
+
};
|
|
1223
|
+
readonly inputs: {
|
|
1224
|
+
type: "array";
|
|
1225
|
+
items: {
|
|
1226
|
+
type: "object";
|
|
1227
|
+
properties: {
|
|
1228
|
+
readonly secret: {
|
|
1229
|
+
readonly type: "boolean";
|
|
1230
|
+
};
|
|
1231
|
+
readonly format: {
|
|
1232
|
+
readonly type: "string";
|
|
1233
|
+
readonly enum: readonly ["key-value-lines"];
|
|
1234
|
+
};
|
|
1235
|
+
readonly path: {
|
|
1236
|
+
readonly description: "操作参数的 JSON Pointer,例如 /env 或 /updates/api.key";
|
|
1237
|
+
readonly type: "string";
|
|
1238
|
+
};
|
|
1239
|
+
readonly label: {
|
|
1240
|
+
readonly type: "string";
|
|
1241
|
+
};
|
|
1242
|
+
readonly description: {
|
|
1243
|
+
readonly type: "string";
|
|
1244
|
+
};
|
|
1245
|
+
readonly required: {
|
|
1246
|
+
readonly type: "boolean";
|
|
1247
|
+
};
|
|
1248
|
+
};
|
|
1249
|
+
required: readonly ["path", "label", "required", "secret"];
|
|
1250
|
+
additionalProperties: false;
|
|
1251
|
+
};
|
|
1252
|
+
};
|
|
1253
|
+
readonly fields: {
|
|
1254
|
+
type: "array";
|
|
1255
|
+
items: {
|
|
1256
|
+
type: "object";
|
|
1257
|
+
properties: {
|
|
1258
|
+
readonly label: {
|
|
1259
|
+
readonly type: "string";
|
|
1260
|
+
};
|
|
1261
|
+
readonly value: {
|
|
1262
|
+
readonly type: "string";
|
|
1263
|
+
};
|
|
1264
|
+
readonly tone: {
|
|
1265
|
+
readonly type: "string";
|
|
1266
|
+
readonly enum: readonly ["warn"];
|
|
1267
|
+
};
|
|
1268
|
+
};
|
|
1269
|
+
required: readonly ["label", "value"];
|
|
1270
|
+
additionalProperties: false;
|
|
1271
|
+
};
|
|
1272
|
+
};
|
|
1273
|
+
readonly code: {
|
|
1274
|
+
type: "object";
|
|
1275
|
+
properties: {
|
|
1276
|
+
readonly label: {
|
|
1277
|
+
readonly type: "string";
|
|
1278
|
+
};
|
|
1279
|
+
readonly text: {
|
|
1280
|
+
readonly type: "string";
|
|
1281
|
+
};
|
|
1282
|
+
};
|
|
1283
|
+
required: readonly ["label", "text"];
|
|
1284
|
+
additionalProperties: false;
|
|
1285
|
+
};
|
|
1286
|
+
};
|
|
1287
|
+
required: readonly ["id"];
|
|
1288
|
+
additionalProperties: false;
|
|
1289
|
+
};
|
|
1290
|
+
};
|
|
1291
|
+
readonly approve: {
|
|
1292
|
+
readonly type: "string";
|
|
1293
|
+
};
|
|
1294
|
+
readonly reject: {
|
|
1295
|
+
readonly type: "string";
|
|
1296
|
+
};
|
|
1297
|
+
readonly remember: {
|
|
1298
|
+
readonly type: "string";
|
|
1299
|
+
};
|
|
1300
|
+
readonly rev: {
|
|
1301
|
+
readonly type: "integer";
|
|
1302
|
+
};
|
|
1303
|
+
readonly state: {
|
|
1304
|
+
readonly type: "string";
|
|
1305
|
+
readonly enum: readonly ["pending", "answered", "closed"];
|
|
1306
|
+
};
|
|
1307
|
+
readonly answer: {
|
|
1308
|
+
type: "object";
|
|
1309
|
+
properties: {
|
|
1310
|
+
readonly by: {
|
|
1311
|
+
readonly type: "string";
|
|
1312
|
+
};
|
|
1313
|
+
readonly at: {
|
|
1314
|
+
readonly type: "number";
|
|
1315
|
+
};
|
|
1316
|
+
readonly picked: {
|
|
1317
|
+
type: "array";
|
|
1318
|
+
items: {
|
|
1319
|
+
readonly type: "string";
|
|
1320
|
+
};
|
|
1321
|
+
};
|
|
1322
|
+
readonly text: {
|
|
1323
|
+
readonly type: "string";
|
|
1324
|
+
};
|
|
1325
|
+
readonly approved: {
|
|
1326
|
+
readonly type: "boolean";
|
|
1327
|
+
};
|
|
1328
|
+
readonly remember: {
|
|
1329
|
+
readonly type: "boolean";
|
|
1330
|
+
};
|
|
1331
|
+
readonly filled: {
|
|
1332
|
+
readonly type: "object";
|
|
1333
|
+
readonly additionalProperties: {
|
|
1334
|
+
type: "array";
|
|
1335
|
+
items: {
|
|
1336
|
+
readonly type: "string";
|
|
1337
|
+
};
|
|
1338
|
+
};
|
|
1339
|
+
};
|
|
1340
|
+
readonly via: {
|
|
1341
|
+
readonly type: "string";
|
|
1342
|
+
readonly enum: readonly ["owner", "quorum"];
|
|
1343
|
+
};
|
|
1344
|
+
readonly signs: {
|
|
1345
|
+
type: "array";
|
|
1346
|
+
items: {
|
|
1347
|
+
type: "object";
|
|
1348
|
+
properties: {
|
|
1349
|
+
readonly by: {
|
|
1350
|
+
readonly type: "string";
|
|
1351
|
+
};
|
|
1352
|
+
readonly at: {
|
|
1353
|
+
readonly type: "number";
|
|
1354
|
+
};
|
|
1355
|
+
readonly turnId: {
|
|
1356
|
+
readonly type: "string";
|
|
1357
|
+
};
|
|
1358
|
+
readonly approved: {
|
|
1359
|
+
readonly type: "boolean";
|
|
1360
|
+
};
|
|
1361
|
+
readonly text: {
|
|
1362
|
+
readonly type: "string";
|
|
1363
|
+
};
|
|
1364
|
+
readonly values: {
|
|
1365
|
+
readonly type: "object";
|
|
1366
|
+
readonly additionalProperties: {
|
|
1367
|
+
readonly type: "string";
|
|
1368
|
+
};
|
|
1369
|
+
};
|
|
1370
|
+
};
|
|
1371
|
+
required: readonly ["by", "at", "approved", "text"];
|
|
1372
|
+
additionalProperties: false;
|
|
1373
|
+
};
|
|
1374
|
+
};
|
|
1375
|
+
};
|
|
1376
|
+
required: readonly ["by", "at"];
|
|
1377
|
+
additionalProperties: false;
|
|
1378
|
+
};
|
|
1379
|
+
readonly outcome: {
|
|
1380
|
+
type: "object";
|
|
1381
|
+
properties: {
|
|
1382
|
+
readonly ok: {
|
|
1383
|
+
readonly type: "boolean";
|
|
1384
|
+
};
|
|
1385
|
+
readonly text: {
|
|
1386
|
+
readonly type: "string";
|
|
1387
|
+
};
|
|
1388
|
+
readonly unconfirmed: {
|
|
1389
|
+
readonly type: "boolean";
|
|
1390
|
+
};
|
|
1391
|
+
};
|
|
1392
|
+
required: readonly ["ok"];
|
|
1393
|
+
additionalProperties: false;
|
|
1394
|
+
};
|
|
1395
|
+
readonly note: {
|
|
1396
|
+
readonly type: "string";
|
|
1397
|
+
};
|
|
1398
|
+
readonly quorum: {
|
|
1399
|
+
type: "object";
|
|
1400
|
+
properties: {
|
|
1401
|
+
readonly need: {
|
|
1402
|
+
readonly type: "integer";
|
|
1403
|
+
};
|
|
1404
|
+
readonly who: {
|
|
1405
|
+
type: "array";
|
|
1406
|
+
items: {
|
|
1407
|
+
readonly type: "string";
|
|
1408
|
+
};
|
|
1409
|
+
};
|
|
1410
|
+
readonly openedAt: {
|
|
1411
|
+
readonly type: "number";
|
|
1412
|
+
};
|
|
1413
|
+
readonly onReject: {
|
|
1414
|
+
readonly type: "string";
|
|
1415
|
+
readonly enum: readonly ["block", "reject"];
|
|
1416
|
+
};
|
|
1417
|
+
readonly fields: {
|
|
1418
|
+
type: "array";
|
|
1419
|
+
items: {
|
|
1420
|
+
type: "object";
|
|
1421
|
+
properties: {
|
|
1422
|
+
readonly key: {
|
|
1423
|
+
readonly type: "string";
|
|
1424
|
+
};
|
|
1425
|
+
readonly label: {
|
|
1426
|
+
readonly type: "string";
|
|
1427
|
+
};
|
|
1428
|
+
readonly options: {
|
|
1429
|
+
type: "array";
|
|
1430
|
+
items: {
|
|
1431
|
+
readonly type: "string";
|
|
1432
|
+
};
|
|
1433
|
+
};
|
|
1434
|
+
readonly when: {
|
|
1435
|
+
readonly type: "string";
|
|
1436
|
+
readonly enum: readonly ["approve", "reject", "always"];
|
|
1437
|
+
};
|
|
1438
|
+
readonly required: {
|
|
1439
|
+
readonly type: "boolean";
|
|
1440
|
+
};
|
|
1441
|
+
};
|
|
1442
|
+
required: readonly ["key", "label", "when"];
|
|
1443
|
+
additionalProperties: false;
|
|
1444
|
+
};
|
|
1445
|
+
};
|
|
1446
|
+
readonly blocked: {
|
|
1447
|
+
readonly type: "string";
|
|
1448
|
+
};
|
|
1449
|
+
};
|
|
1450
|
+
required: readonly ["need", "who"];
|
|
1451
|
+
additionalProperties: false;
|
|
1452
|
+
};
|
|
1453
|
+
readonly signs: {
|
|
1454
|
+
type: "array";
|
|
1455
|
+
items: {
|
|
1456
|
+
type: "object";
|
|
1457
|
+
properties: {
|
|
1458
|
+
readonly by: {
|
|
1459
|
+
readonly type: "string";
|
|
1460
|
+
};
|
|
1461
|
+
readonly at: {
|
|
1462
|
+
readonly type: "number";
|
|
1463
|
+
};
|
|
1464
|
+
readonly turnId: {
|
|
1465
|
+
readonly type: "string";
|
|
1466
|
+
};
|
|
1467
|
+
readonly approved: {
|
|
1468
|
+
readonly type: "boolean";
|
|
1469
|
+
};
|
|
1470
|
+
readonly text: {
|
|
1471
|
+
readonly type: "string";
|
|
1472
|
+
};
|
|
1473
|
+
readonly values: {
|
|
1474
|
+
readonly type: "object";
|
|
1475
|
+
readonly additionalProperties: {
|
|
1476
|
+
readonly type: "string";
|
|
1477
|
+
};
|
|
1478
|
+
};
|
|
1479
|
+
};
|
|
1480
|
+
required: readonly ["by", "at", "approved", "text"];
|
|
1481
|
+
additionalProperties: false;
|
|
1482
|
+
};
|
|
1483
|
+
};
|
|
1484
|
+
readonly expiresAt: {
|
|
1485
|
+
readonly type: "number";
|
|
1486
|
+
};
|
|
1487
|
+
readonly type: {
|
|
1488
|
+
readonly type: "string";
|
|
1489
|
+
readonly enum: readonly ["card"];
|
|
1490
|
+
};
|
|
1491
|
+
};
|
|
1492
|
+
required: readonly ["type", "kind", "title", "rev", "state"];
|
|
1493
|
+
additionalProperties: false;
|
|
1494
|
+
}, {
|
|
1495
|
+
type: "object";
|
|
1496
|
+
properties: {
|
|
1497
|
+
readonly type: {
|
|
1498
|
+
readonly type: "string";
|
|
1499
|
+
readonly enum: readonly ["reference"];
|
|
1500
|
+
};
|
|
1501
|
+
readonly dir: {
|
|
1502
|
+
readonly type: "string";
|
|
1503
|
+
readonly enum: readonly ["in", "out"];
|
|
1504
|
+
};
|
|
1505
|
+
readonly address: {
|
|
1506
|
+
readonly type: "string";
|
|
1507
|
+
};
|
|
1508
|
+
readonly title: {
|
|
1509
|
+
readonly type: "string";
|
|
1510
|
+
};
|
|
1511
|
+
readonly recipients: {
|
|
1512
|
+
type: "array";
|
|
1513
|
+
items: {
|
|
1514
|
+
readonly type: "string";
|
|
1515
|
+
};
|
|
1516
|
+
};
|
|
1517
|
+
readonly summary: {
|
|
1518
|
+
readonly type: "string";
|
|
1519
|
+
};
|
|
1520
|
+
};
|
|
1521
|
+
required: readonly ["type", "dir", "address", "title"];
|
|
1522
|
+
additionalProperties: false;
|
|
1523
|
+
}, {
|
|
1524
|
+
type: "object";
|
|
1525
|
+
properties: {
|
|
1526
|
+
readonly type: {
|
|
1527
|
+
readonly type: "string";
|
|
1528
|
+
readonly enum: readonly ["excerpt"];
|
|
1529
|
+
};
|
|
1530
|
+
readonly text: {
|
|
1531
|
+
readonly type: "string";
|
|
1532
|
+
};
|
|
1533
|
+
readonly title: {
|
|
1534
|
+
readonly type: "string";
|
|
1535
|
+
};
|
|
1536
|
+
readonly author: {
|
|
1537
|
+
readonly type: "string";
|
|
1538
|
+
};
|
|
1539
|
+
readonly url: {
|
|
1540
|
+
readonly type: "string";
|
|
1541
|
+
};
|
|
1542
|
+
};
|
|
1543
|
+
required: readonly ["type", "text"];
|
|
1544
|
+
additionalProperties: false;
|
|
1545
|
+
}];
|
|
1546
|
+
};
|
|
1547
|
+
export declare const partsSchema: {
|
|
1548
|
+
type: "array";
|
|
1549
|
+
items: {
|
|
1550
|
+
readonly type: "object";
|
|
1551
|
+
readonly properties: {
|
|
1552
|
+
readonly type: {
|
|
1553
|
+
readonly type: "string";
|
|
1554
|
+
readonly enum: readonly ["text", "thinking", "tool", "card", "reference", "excerpt"];
|
|
1555
|
+
};
|
|
1556
|
+
};
|
|
1557
|
+
readonly required: readonly ["type"];
|
|
1558
|
+
readonly oneOf: readonly [{
|
|
1559
|
+
type: "object";
|
|
1560
|
+
properties: {
|
|
1561
|
+
readonly type: {
|
|
1562
|
+
readonly type: "string";
|
|
1563
|
+
readonly enum: readonly ["text", "thinking"];
|
|
1564
|
+
};
|
|
1565
|
+
readonly text: {
|
|
1566
|
+
readonly type: "string";
|
|
1567
|
+
};
|
|
1568
|
+
};
|
|
1569
|
+
required: readonly ["type", "text"];
|
|
1570
|
+
additionalProperties: false;
|
|
1571
|
+
}, {
|
|
1572
|
+
type: "object";
|
|
1573
|
+
properties: {
|
|
1574
|
+
readonly type: {
|
|
1575
|
+
readonly type: "string";
|
|
1576
|
+
readonly enum: readonly ["tool"];
|
|
1577
|
+
};
|
|
1578
|
+
readonly id: {
|
|
1579
|
+
readonly type: "string";
|
|
1580
|
+
};
|
|
1581
|
+
readonly name: {
|
|
1582
|
+
readonly type: "string";
|
|
1583
|
+
};
|
|
1584
|
+
readonly input: {
|
|
1585
|
+
readonly type: "string";
|
|
1586
|
+
};
|
|
1587
|
+
readonly output: {
|
|
1588
|
+
readonly type: "string";
|
|
1589
|
+
};
|
|
1590
|
+
readonly status: {
|
|
1591
|
+
readonly type: "string";
|
|
1592
|
+
readonly enum: readonly ["running", "done", "failed"];
|
|
1593
|
+
};
|
|
1594
|
+
readonly agent: {
|
|
1595
|
+
readonly type: "boolean";
|
|
1596
|
+
};
|
|
1597
|
+
};
|
|
1598
|
+
required: readonly ["type", "id", "name", "status"];
|
|
1599
|
+
additionalProperties: false;
|
|
1600
|
+
}, {
|
|
1601
|
+
type: "object";
|
|
1602
|
+
properties: {
|
|
1603
|
+
readonly kind: {
|
|
1604
|
+
readonly type: "string";
|
|
1605
|
+
};
|
|
1606
|
+
readonly ask: {
|
|
1607
|
+
readonly type: "string";
|
|
1608
|
+
};
|
|
1609
|
+
readonly to: {
|
|
1610
|
+
type: "array";
|
|
1611
|
+
items: {
|
|
1612
|
+
readonly type: "string";
|
|
1613
|
+
};
|
|
1614
|
+
};
|
|
1615
|
+
readonly title: {
|
|
1616
|
+
readonly type: "string";
|
|
1617
|
+
};
|
|
1618
|
+
readonly body: {
|
|
1619
|
+
readonly type: "string";
|
|
1620
|
+
};
|
|
1621
|
+
readonly by: {
|
|
1622
|
+
readonly type: "string";
|
|
1623
|
+
};
|
|
1624
|
+
readonly data: {
|
|
1625
|
+
readonly type: "object";
|
|
1626
|
+
};
|
|
1627
|
+
readonly options: {
|
|
1628
|
+
type: "array";
|
|
1629
|
+
items: {
|
|
1630
|
+
type: "object";
|
|
1631
|
+
properties: {
|
|
1632
|
+
readonly id: {
|
|
1633
|
+
readonly type: "string";
|
|
1634
|
+
};
|
|
1635
|
+
readonly label: {
|
|
1636
|
+
readonly type: "string";
|
|
1637
|
+
};
|
|
1638
|
+
readonly detail: {
|
|
1639
|
+
readonly type: "string";
|
|
1640
|
+
};
|
|
1641
|
+
readonly image: {
|
|
1642
|
+
readonly type: "string";
|
|
1643
|
+
};
|
|
1644
|
+
readonly open: {
|
|
1645
|
+
readonly type: "string";
|
|
1646
|
+
};
|
|
1647
|
+
};
|
|
1648
|
+
required: readonly ["id", "label"];
|
|
1649
|
+
additionalProperties: false;
|
|
1650
|
+
};
|
|
1651
|
+
};
|
|
1652
|
+
readonly multi: {
|
|
1653
|
+
readonly type: "boolean";
|
|
1654
|
+
};
|
|
1655
|
+
readonly other: {
|
|
1656
|
+
readonly type: "boolean";
|
|
1657
|
+
};
|
|
1658
|
+
readonly items: {
|
|
1659
|
+
type: "array";
|
|
1660
|
+
items: {
|
|
1661
|
+
type: "object";
|
|
1662
|
+
properties: {
|
|
1663
|
+
readonly id: {
|
|
1664
|
+
readonly type: "string";
|
|
1665
|
+
};
|
|
1666
|
+
readonly title: {
|
|
1667
|
+
readonly type: "string";
|
|
1668
|
+
};
|
|
1669
|
+
readonly detail: {
|
|
1670
|
+
readonly type: "string";
|
|
1671
|
+
};
|
|
1672
|
+
readonly result: {
|
|
1673
|
+
type: "object";
|
|
1674
|
+
properties: {
|
|
1675
|
+
readonly ok: {
|
|
1676
|
+
readonly type: "boolean";
|
|
1677
|
+
};
|
|
1678
|
+
readonly text: {
|
|
1679
|
+
readonly type: "string";
|
|
1680
|
+
};
|
|
1681
|
+
readonly unconfirmed: {
|
|
1682
|
+
readonly type: "boolean";
|
|
1683
|
+
};
|
|
1684
|
+
};
|
|
1685
|
+
required: readonly ["ok"];
|
|
1686
|
+
additionalProperties: false;
|
|
1687
|
+
};
|
|
1688
|
+
readonly option: {
|
|
1689
|
+
readonly type: "string";
|
|
1690
|
+
};
|
|
1691
|
+
readonly inputs: {
|
|
1692
|
+
type: "array";
|
|
1693
|
+
items: {
|
|
1694
|
+
type: "object";
|
|
1695
|
+
properties: {
|
|
1696
|
+
readonly secret: {
|
|
1697
|
+
readonly type: "boolean";
|
|
1698
|
+
};
|
|
1699
|
+
readonly format: {
|
|
1700
|
+
readonly type: "string";
|
|
1701
|
+
readonly enum: readonly ["key-value-lines"];
|
|
1702
|
+
};
|
|
1703
|
+
readonly path: {
|
|
1704
|
+
readonly description: "操作参数的 JSON Pointer,例如 /env 或 /updates/api.key";
|
|
1705
|
+
readonly type: "string";
|
|
1706
|
+
};
|
|
1707
|
+
readonly label: {
|
|
1708
|
+
readonly type: "string";
|
|
1709
|
+
};
|
|
1710
|
+
readonly description: {
|
|
1711
|
+
readonly type: "string";
|
|
1712
|
+
};
|
|
1713
|
+
readonly required: {
|
|
1714
|
+
readonly type: "boolean";
|
|
1715
|
+
};
|
|
1716
|
+
};
|
|
1717
|
+
required: readonly ["path", "label", "required", "secret"];
|
|
1718
|
+
additionalProperties: false;
|
|
1719
|
+
};
|
|
1720
|
+
};
|
|
1721
|
+
readonly fields: {
|
|
1722
|
+
type: "array";
|
|
1723
|
+
items: {
|
|
1724
|
+
type: "object";
|
|
1725
|
+
properties: {
|
|
1726
|
+
readonly label: {
|
|
1727
|
+
readonly type: "string";
|
|
1728
|
+
};
|
|
1729
|
+
readonly value: {
|
|
1730
|
+
readonly type: "string";
|
|
1731
|
+
};
|
|
1732
|
+
readonly tone: {
|
|
1733
|
+
readonly type: "string";
|
|
1734
|
+
readonly enum: readonly ["warn"];
|
|
1735
|
+
};
|
|
1736
|
+
};
|
|
1737
|
+
required: readonly ["label", "value"];
|
|
1738
|
+
additionalProperties: false;
|
|
1739
|
+
};
|
|
1740
|
+
};
|
|
1741
|
+
readonly code: {
|
|
1742
|
+
type: "object";
|
|
1743
|
+
properties: {
|
|
1744
|
+
readonly label: {
|
|
1745
|
+
readonly type: "string";
|
|
1746
|
+
};
|
|
1747
|
+
readonly text: {
|
|
1748
|
+
readonly type: "string";
|
|
1749
|
+
};
|
|
1750
|
+
};
|
|
1751
|
+
required: readonly ["label", "text"];
|
|
1752
|
+
additionalProperties: false;
|
|
1753
|
+
};
|
|
1754
|
+
};
|
|
1755
|
+
required: readonly ["id"];
|
|
1756
|
+
additionalProperties: false;
|
|
1757
|
+
};
|
|
1758
|
+
};
|
|
1759
|
+
readonly approve: {
|
|
1760
|
+
readonly type: "string";
|
|
1761
|
+
};
|
|
1762
|
+
readonly reject: {
|
|
1763
|
+
readonly type: "string";
|
|
1764
|
+
};
|
|
1765
|
+
readonly remember: {
|
|
1766
|
+
readonly type: "string";
|
|
1767
|
+
};
|
|
1768
|
+
readonly rev: {
|
|
1769
|
+
readonly type: "integer";
|
|
1770
|
+
};
|
|
1771
|
+
readonly state: {
|
|
1772
|
+
readonly type: "string";
|
|
1773
|
+
readonly enum: readonly ["pending", "answered", "closed"];
|
|
1774
|
+
};
|
|
1775
|
+
readonly answer: {
|
|
1776
|
+
type: "object";
|
|
1777
|
+
properties: {
|
|
1778
|
+
readonly by: {
|
|
1779
|
+
readonly type: "string";
|
|
1780
|
+
};
|
|
1781
|
+
readonly at: {
|
|
1782
|
+
readonly type: "number";
|
|
1783
|
+
};
|
|
1784
|
+
readonly picked: {
|
|
1785
|
+
type: "array";
|
|
1786
|
+
items: {
|
|
1787
|
+
readonly type: "string";
|
|
1788
|
+
};
|
|
1789
|
+
};
|
|
1790
|
+
readonly text: {
|
|
1791
|
+
readonly type: "string";
|
|
1792
|
+
};
|
|
1793
|
+
readonly approved: {
|
|
1794
|
+
readonly type: "boolean";
|
|
1795
|
+
};
|
|
1796
|
+
readonly remember: {
|
|
1797
|
+
readonly type: "boolean";
|
|
1798
|
+
};
|
|
1799
|
+
readonly filled: {
|
|
1800
|
+
readonly type: "object";
|
|
1801
|
+
readonly additionalProperties: {
|
|
1802
|
+
type: "array";
|
|
1803
|
+
items: {
|
|
1804
|
+
readonly type: "string";
|
|
1805
|
+
};
|
|
1806
|
+
};
|
|
1807
|
+
};
|
|
1808
|
+
readonly via: {
|
|
1809
|
+
readonly type: "string";
|
|
1810
|
+
readonly enum: readonly ["owner", "quorum"];
|
|
1811
|
+
};
|
|
1812
|
+
readonly signs: {
|
|
1813
|
+
type: "array";
|
|
1814
|
+
items: {
|
|
1815
|
+
type: "object";
|
|
1816
|
+
properties: {
|
|
1817
|
+
readonly by: {
|
|
1818
|
+
readonly type: "string";
|
|
1819
|
+
};
|
|
1820
|
+
readonly at: {
|
|
1821
|
+
readonly type: "number";
|
|
1822
|
+
};
|
|
1823
|
+
readonly turnId: {
|
|
1824
|
+
readonly type: "string";
|
|
1825
|
+
};
|
|
1826
|
+
readonly approved: {
|
|
1827
|
+
readonly type: "boolean";
|
|
1828
|
+
};
|
|
1829
|
+
readonly text: {
|
|
1830
|
+
readonly type: "string";
|
|
1831
|
+
};
|
|
1832
|
+
readonly values: {
|
|
1833
|
+
readonly type: "object";
|
|
1834
|
+
readonly additionalProperties: {
|
|
1835
|
+
readonly type: "string";
|
|
1836
|
+
};
|
|
1837
|
+
};
|
|
1838
|
+
};
|
|
1839
|
+
required: readonly ["by", "at", "approved", "text"];
|
|
1840
|
+
additionalProperties: false;
|
|
1841
|
+
};
|
|
1842
|
+
};
|
|
1843
|
+
};
|
|
1844
|
+
required: readonly ["by", "at"];
|
|
1845
|
+
additionalProperties: false;
|
|
1846
|
+
};
|
|
1847
|
+
readonly outcome: {
|
|
1848
|
+
type: "object";
|
|
1849
|
+
properties: {
|
|
1850
|
+
readonly ok: {
|
|
1851
|
+
readonly type: "boolean";
|
|
1852
|
+
};
|
|
1853
|
+
readonly text: {
|
|
1854
|
+
readonly type: "string";
|
|
1855
|
+
};
|
|
1856
|
+
readonly unconfirmed: {
|
|
1857
|
+
readonly type: "boolean";
|
|
1858
|
+
};
|
|
1859
|
+
};
|
|
1860
|
+
required: readonly ["ok"];
|
|
1861
|
+
additionalProperties: false;
|
|
1862
|
+
};
|
|
1863
|
+
readonly note: {
|
|
1864
|
+
readonly type: "string";
|
|
1865
|
+
};
|
|
1866
|
+
readonly quorum: {
|
|
1867
|
+
type: "object";
|
|
1868
|
+
properties: {
|
|
1869
|
+
readonly need: {
|
|
1870
|
+
readonly type: "integer";
|
|
1871
|
+
};
|
|
1872
|
+
readonly who: {
|
|
1873
|
+
type: "array";
|
|
1874
|
+
items: {
|
|
1875
|
+
readonly type: "string";
|
|
1876
|
+
};
|
|
1877
|
+
};
|
|
1878
|
+
readonly openedAt: {
|
|
1879
|
+
readonly type: "number";
|
|
1880
|
+
};
|
|
1881
|
+
readonly onReject: {
|
|
1882
|
+
readonly type: "string";
|
|
1883
|
+
readonly enum: readonly ["block", "reject"];
|
|
1884
|
+
};
|
|
1885
|
+
readonly fields: {
|
|
1886
|
+
type: "array";
|
|
1887
|
+
items: {
|
|
1888
|
+
type: "object";
|
|
1889
|
+
properties: {
|
|
1890
|
+
readonly key: {
|
|
1891
|
+
readonly type: "string";
|
|
1892
|
+
};
|
|
1893
|
+
readonly label: {
|
|
1894
|
+
readonly type: "string";
|
|
1895
|
+
};
|
|
1896
|
+
readonly options: {
|
|
1897
|
+
type: "array";
|
|
1898
|
+
items: {
|
|
1899
|
+
readonly type: "string";
|
|
1900
|
+
};
|
|
1901
|
+
};
|
|
1902
|
+
readonly when: {
|
|
1903
|
+
readonly type: "string";
|
|
1904
|
+
readonly enum: readonly ["approve", "reject", "always"];
|
|
1905
|
+
};
|
|
1906
|
+
readonly required: {
|
|
1907
|
+
readonly type: "boolean";
|
|
1908
|
+
};
|
|
1909
|
+
};
|
|
1910
|
+
required: readonly ["key", "label", "when"];
|
|
1911
|
+
additionalProperties: false;
|
|
1912
|
+
};
|
|
1913
|
+
};
|
|
1914
|
+
readonly blocked: {
|
|
1915
|
+
readonly type: "string";
|
|
1916
|
+
};
|
|
1917
|
+
};
|
|
1918
|
+
required: readonly ["need", "who"];
|
|
1919
|
+
additionalProperties: false;
|
|
1920
|
+
};
|
|
1921
|
+
readonly signs: {
|
|
1922
|
+
type: "array";
|
|
1923
|
+
items: {
|
|
1924
|
+
type: "object";
|
|
1925
|
+
properties: {
|
|
1926
|
+
readonly by: {
|
|
1927
|
+
readonly type: "string";
|
|
1928
|
+
};
|
|
1929
|
+
readonly at: {
|
|
1930
|
+
readonly type: "number";
|
|
1931
|
+
};
|
|
1932
|
+
readonly turnId: {
|
|
1933
|
+
readonly type: "string";
|
|
1934
|
+
};
|
|
1935
|
+
readonly approved: {
|
|
1936
|
+
readonly type: "boolean";
|
|
1937
|
+
};
|
|
1938
|
+
readonly text: {
|
|
1939
|
+
readonly type: "string";
|
|
1940
|
+
};
|
|
1941
|
+
readonly values: {
|
|
1942
|
+
readonly type: "object";
|
|
1943
|
+
readonly additionalProperties: {
|
|
1944
|
+
readonly type: "string";
|
|
1945
|
+
};
|
|
1946
|
+
};
|
|
1947
|
+
};
|
|
1948
|
+
required: readonly ["by", "at", "approved", "text"];
|
|
1949
|
+
additionalProperties: false;
|
|
1950
|
+
};
|
|
1951
|
+
};
|
|
1952
|
+
readonly expiresAt: {
|
|
1953
|
+
readonly type: "number";
|
|
1954
|
+
};
|
|
1955
|
+
readonly type: {
|
|
1956
|
+
readonly type: "string";
|
|
1957
|
+
readonly enum: readonly ["card"];
|
|
1958
|
+
};
|
|
1959
|
+
};
|
|
1960
|
+
required: readonly ["type", "kind", "title", "rev", "state"];
|
|
1961
|
+
additionalProperties: false;
|
|
1962
|
+
}, {
|
|
1963
|
+
type: "object";
|
|
1964
|
+
properties: {
|
|
1965
|
+
readonly type: {
|
|
1966
|
+
readonly type: "string";
|
|
1967
|
+
readonly enum: readonly ["reference"];
|
|
1968
|
+
};
|
|
1969
|
+
readonly dir: {
|
|
1970
|
+
readonly type: "string";
|
|
1971
|
+
readonly enum: readonly ["in", "out"];
|
|
1972
|
+
};
|
|
1973
|
+
readonly address: {
|
|
1974
|
+
readonly type: "string";
|
|
1975
|
+
};
|
|
1976
|
+
readonly title: {
|
|
1977
|
+
readonly type: "string";
|
|
1978
|
+
};
|
|
1979
|
+
readonly recipients: {
|
|
1980
|
+
type: "array";
|
|
1981
|
+
items: {
|
|
1982
|
+
readonly type: "string";
|
|
1983
|
+
};
|
|
1984
|
+
};
|
|
1985
|
+
readonly summary: {
|
|
1986
|
+
readonly type: "string";
|
|
1987
|
+
};
|
|
1988
|
+
};
|
|
1989
|
+
required: readonly ["type", "dir", "address", "title"];
|
|
1990
|
+
additionalProperties: false;
|
|
1991
|
+
}, {
|
|
1992
|
+
type: "object";
|
|
1993
|
+
properties: {
|
|
1994
|
+
readonly type: {
|
|
1995
|
+
readonly type: "string";
|
|
1996
|
+
readonly enum: readonly ["excerpt"];
|
|
1997
|
+
};
|
|
1998
|
+
readonly text: {
|
|
1999
|
+
readonly type: "string";
|
|
2000
|
+
};
|
|
2001
|
+
readonly title: {
|
|
2002
|
+
readonly type: "string";
|
|
2003
|
+
};
|
|
2004
|
+
readonly author: {
|
|
2005
|
+
readonly type: "string";
|
|
2006
|
+
};
|
|
2007
|
+
readonly url: {
|
|
2008
|
+
readonly type: "string";
|
|
2009
|
+
};
|
|
2010
|
+
};
|
|
2011
|
+
required: readonly ["type", "text"];
|
|
2012
|
+
additionalProperties: false;
|
|
2013
|
+
}];
|
|
2014
|
+
};
|
|
2015
|
+
};
|
|
2016
|
+
type PartValue = FromSchema<typeof partSchema>;
|
|
2017
|
+
/** One piece of a message, including a bounded excerpt from an external source. */
|
|
2018
|
+
export type Part = Exclude<PartValue, {
|
|
2019
|
+
type: 'card';
|
|
2020
|
+
}> | ({
|
|
2021
|
+
type: 'card';
|
|
2022
|
+
} & Card);
|
|
2023
|
+
declare const messageStatusSchema: {
|
|
2024
|
+
readonly type: "string";
|
|
2025
|
+
readonly enum: readonly ["processing", "completed", "failed", "canceled"];
|
|
2026
|
+
};
|
|
2027
|
+
export type MessageStatus = FromSchema<typeof messageStatusSchema>;
|
|
2028
|
+
export declare const messageSchema: {
|
|
2029
|
+
type: "object";
|
|
2030
|
+
properties: {
|
|
2031
|
+
readonly id: {
|
|
2032
|
+
readonly type: "string";
|
|
2033
|
+
};
|
|
2034
|
+
readonly topicId: {
|
|
2035
|
+
readonly type: "string";
|
|
2036
|
+
};
|
|
2037
|
+
readonly seq: {
|
|
2038
|
+
readonly type: readonly ["integer", "null"];
|
|
2039
|
+
};
|
|
2040
|
+
readonly from: {
|
|
2041
|
+
type: "object";
|
|
2042
|
+
properties: {
|
|
2043
|
+
readonly kind: {
|
|
2044
|
+
readonly type: "string";
|
|
2045
|
+
readonly enum: readonly ["member", "system"];
|
|
2046
|
+
};
|
|
2047
|
+
readonly id: {
|
|
2048
|
+
readonly type: "string";
|
|
2049
|
+
};
|
|
2050
|
+
};
|
|
2051
|
+
required: readonly ["kind", "id"];
|
|
2052
|
+
additionalProperties: false;
|
|
2053
|
+
};
|
|
2054
|
+
readonly to: {
|
|
2055
|
+
type: "array";
|
|
2056
|
+
items: {
|
|
2057
|
+
readonly type: "string";
|
|
2058
|
+
};
|
|
2059
|
+
};
|
|
2060
|
+
readonly replyTo: {
|
|
2061
|
+
readonly type: readonly ["string", "null"];
|
|
2062
|
+
};
|
|
2063
|
+
readonly thread: {
|
|
2064
|
+
readonly type: readonly ["string", "null"];
|
|
2065
|
+
};
|
|
2066
|
+
readonly threadable: {
|
|
2067
|
+
readonly type: "boolean";
|
|
2068
|
+
};
|
|
2069
|
+
readonly attachments: {
|
|
2070
|
+
type: "array";
|
|
2071
|
+
items: {
|
|
2072
|
+
readonly type: "string";
|
|
2073
|
+
};
|
|
2074
|
+
};
|
|
2075
|
+
readonly content: {
|
|
2076
|
+
readonly type: "string";
|
|
2077
|
+
};
|
|
2078
|
+
readonly parts: {
|
|
2079
|
+
type: "array";
|
|
2080
|
+
items: {
|
|
2081
|
+
readonly type: "object";
|
|
2082
|
+
readonly properties: {
|
|
2083
|
+
readonly type: {
|
|
2084
|
+
readonly type: "string";
|
|
2085
|
+
readonly enum: readonly ["text", "thinking", "tool", "card", "reference", "excerpt"];
|
|
2086
|
+
};
|
|
2087
|
+
};
|
|
2088
|
+
readonly required: readonly ["type"];
|
|
2089
|
+
readonly oneOf: readonly [{
|
|
2090
|
+
type: "object";
|
|
2091
|
+
properties: {
|
|
2092
|
+
readonly type: {
|
|
2093
|
+
readonly type: "string";
|
|
2094
|
+
readonly enum: readonly ["text", "thinking"];
|
|
2095
|
+
};
|
|
2096
|
+
readonly text: {
|
|
2097
|
+
readonly type: "string";
|
|
2098
|
+
};
|
|
2099
|
+
};
|
|
2100
|
+
required: readonly ["type", "text"];
|
|
2101
|
+
additionalProperties: false;
|
|
2102
|
+
}, {
|
|
2103
|
+
type: "object";
|
|
2104
|
+
properties: {
|
|
2105
|
+
readonly type: {
|
|
2106
|
+
readonly type: "string";
|
|
2107
|
+
readonly enum: readonly ["tool"];
|
|
2108
|
+
};
|
|
2109
|
+
readonly id: {
|
|
2110
|
+
readonly type: "string";
|
|
2111
|
+
};
|
|
2112
|
+
readonly name: {
|
|
2113
|
+
readonly type: "string";
|
|
2114
|
+
};
|
|
2115
|
+
readonly input: {
|
|
2116
|
+
readonly type: "string";
|
|
2117
|
+
};
|
|
2118
|
+
readonly output: {
|
|
2119
|
+
readonly type: "string";
|
|
2120
|
+
};
|
|
2121
|
+
readonly status: {
|
|
2122
|
+
readonly type: "string";
|
|
2123
|
+
readonly enum: readonly ["running", "done", "failed"];
|
|
2124
|
+
};
|
|
2125
|
+
readonly agent: {
|
|
2126
|
+
readonly type: "boolean";
|
|
2127
|
+
};
|
|
2128
|
+
};
|
|
2129
|
+
required: readonly ["type", "id", "name", "status"];
|
|
2130
|
+
additionalProperties: false;
|
|
2131
|
+
}, {
|
|
2132
|
+
type: "object";
|
|
2133
|
+
properties: {
|
|
2134
|
+
readonly kind: {
|
|
2135
|
+
readonly type: "string";
|
|
2136
|
+
};
|
|
2137
|
+
readonly ask: {
|
|
2138
|
+
readonly type: "string";
|
|
2139
|
+
};
|
|
2140
|
+
readonly to: {
|
|
2141
|
+
type: "array";
|
|
2142
|
+
items: {
|
|
2143
|
+
readonly type: "string";
|
|
2144
|
+
};
|
|
2145
|
+
};
|
|
2146
|
+
readonly title: {
|
|
2147
|
+
readonly type: "string";
|
|
2148
|
+
};
|
|
2149
|
+
readonly body: {
|
|
2150
|
+
readonly type: "string";
|
|
2151
|
+
};
|
|
2152
|
+
readonly by: {
|
|
2153
|
+
readonly type: "string";
|
|
2154
|
+
};
|
|
2155
|
+
readonly data: {
|
|
2156
|
+
readonly type: "object";
|
|
2157
|
+
};
|
|
2158
|
+
readonly options: {
|
|
2159
|
+
type: "array";
|
|
2160
|
+
items: {
|
|
2161
|
+
type: "object";
|
|
2162
|
+
properties: {
|
|
2163
|
+
readonly id: {
|
|
2164
|
+
readonly type: "string";
|
|
2165
|
+
};
|
|
2166
|
+
readonly label: {
|
|
2167
|
+
readonly type: "string";
|
|
2168
|
+
};
|
|
2169
|
+
readonly detail: {
|
|
2170
|
+
readonly type: "string";
|
|
2171
|
+
};
|
|
2172
|
+
readonly image: {
|
|
2173
|
+
readonly type: "string";
|
|
2174
|
+
};
|
|
2175
|
+
readonly open: {
|
|
2176
|
+
readonly type: "string";
|
|
2177
|
+
};
|
|
2178
|
+
};
|
|
2179
|
+
required: readonly ["id", "label"];
|
|
2180
|
+
additionalProperties: false;
|
|
2181
|
+
};
|
|
2182
|
+
};
|
|
2183
|
+
readonly multi: {
|
|
2184
|
+
readonly type: "boolean";
|
|
2185
|
+
};
|
|
2186
|
+
readonly other: {
|
|
2187
|
+
readonly type: "boolean";
|
|
2188
|
+
};
|
|
2189
|
+
readonly items: {
|
|
2190
|
+
type: "array";
|
|
2191
|
+
items: {
|
|
2192
|
+
type: "object";
|
|
2193
|
+
properties: {
|
|
2194
|
+
readonly id: {
|
|
2195
|
+
readonly type: "string";
|
|
2196
|
+
};
|
|
2197
|
+
readonly title: {
|
|
2198
|
+
readonly type: "string";
|
|
2199
|
+
};
|
|
2200
|
+
readonly detail: {
|
|
2201
|
+
readonly type: "string";
|
|
2202
|
+
};
|
|
2203
|
+
readonly result: {
|
|
2204
|
+
type: "object";
|
|
2205
|
+
properties: {
|
|
2206
|
+
readonly ok: {
|
|
2207
|
+
readonly type: "boolean";
|
|
2208
|
+
};
|
|
2209
|
+
readonly text: {
|
|
2210
|
+
readonly type: "string";
|
|
2211
|
+
};
|
|
2212
|
+
readonly unconfirmed: {
|
|
2213
|
+
readonly type: "boolean";
|
|
2214
|
+
};
|
|
2215
|
+
};
|
|
2216
|
+
required: readonly ["ok"];
|
|
2217
|
+
additionalProperties: false;
|
|
2218
|
+
};
|
|
2219
|
+
readonly option: {
|
|
2220
|
+
readonly type: "string";
|
|
2221
|
+
};
|
|
2222
|
+
readonly inputs: {
|
|
2223
|
+
type: "array";
|
|
2224
|
+
items: {
|
|
2225
|
+
type: "object";
|
|
2226
|
+
properties: {
|
|
2227
|
+
readonly secret: {
|
|
2228
|
+
readonly type: "boolean";
|
|
2229
|
+
};
|
|
2230
|
+
readonly format: {
|
|
2231
|
+
readonly type: "string";
|
|
2232
|
+
readonly enum: readonly ["key-value-lines"];
|
|
2233
|
+
};
|
|
2234
|
+
readonly path: {
|
|
2235
|
+
readonly description: "操作参数的 JSON Pointer,例如 /env 或 /updates/api.key";
|
|
2236
|
+
readonly type: "string";
|
|
2237
|
+
};
|
|
2238
|
+
readonly label: {
|
|
2239
|
+
readonly type: "string";
|
|
2240
|
+
};
|
|
2241
|
+
readonly description: {
|
|
2242
|
+
readonly type: "string";
|
|
2243
|
+
};
|
|
2244
|
+
readonly required: {
|
|
2245
|
+
readonly type: "boolean";
|
|
2246
|
+
};
|
|
2247
|
+
};
|
|
2248
|
+
required: readonly ["path", "label", "required", "secret"];
|
|
2249
|
+
additionalProperties: false;
|
|
2250
|
+
};
|
|
2251
|
+
};
|
|
2252
|
+
readonly fields: {
|
|
2253
|
+
type: "array";
|
|
2254
|
+
items: {
|
|
2255
|
+
type: "object";
|
|
2256
|
+
properties: {
|
|
2257
|
+
readonly label: {
|
|
2258
|
+
readonly type: "string";
|
|
2259
|
+
};
|
|
2260
|
+
readonly value: {
|
|
2261
|
+
readonly type: "string";
|
|
2262
|
+
};
|
|
2263
|
+
readonly tone: {
|
|
2264
|
+
readonly type: "string";
|
|
2265
|
+
readonly enum: readonly ["warn"];
|
|
2266
|
+
};
|
|
2267
|
+
};
|
|
2268
|
+
required: readonly ["label", "value"];
|
|
2269
|
+
additionalProperties: false;
|
|
2270
|
+
};
|
|
2271
|
+
};
|
|
2272
|
+
readonly code: {
|
|
2273
|
+
type: "object";
|
|
2274
|
+
properties: {
|
|
2275
|
+
readonly label: {
|
|
2276
|
+
readonly type: "string";
|
|
2277
|
+
};
|
|
2278
|
+
readonly text: {
|
|
2279
|
+
readonly type: "string";
|
|
2280
|
+
};
|
|
2281
|
+
};
|
|
2282
|
+
required: readonly ["label", "text"];
|
|
2283
|
+
additionalProperties: false;
|
|
2284
|
+
};
|
|
2285
|
+
};
|
|
2286
|
+
required: readonly ["id"];
|
|
2287
|
+
additionalProperties: false;
|
|
2288
|
+
};
|
|
2289
|
+
};
|
|
2290
|
+
readonly approve: {
|
|
2291
|
+
readonly type: "string";
|
|
2292
|
+
};
|
|
2293
|
+
readonly reject: {
|
|
2294
|
+
readonly type: "string";
|
|
2295
|
+
};
|
|
2296
|
+
readonly remember: {
|
|
2297
|
+
readonly type: "string";
|
|
2298
|
+
};
|
|
2299
|
+
readonly rev: {
|
|
2300
|
+
readonly type: "integer";
|
|
2301
|
+
};
|
|
2302
|
+
readonly state: {
|
|
2303
|
+
readonly type: "string";
|
|
2304
|
+
readonly enum: readonly ["pending", "answered", "closed"];
|
|
2305
|
+
};
|
|
2306
|
+
readonly answer: {
|
|
2307
|
+
type: "object";
|
|
2308
|
+
properties: {
|
|
2309
|
+
readonly by: {
|
|
2310
|
+
readonly type: "string";
|
|
2311
|
+
};
|
|
2312
|
+
readonly at: {
|
|
2313
|
+
readonly type: "number";
|
|
2314
|
+
};
|
|
2315
|
+
readonly picked: {
|
|
2316
|
+
type: "array";
|
|
2317
|
+
items: {
|
|
2318
|
+
readonly type: "string";
|
|
2319
|
+
};
|
|
2320
|
+
};
|
|
2321
|
+
readonly text: {
|
|
2322
|
+
readonly type: "string";
|
|
2323
|
+
};
|
|
2324
|
+
readonly approved: {
|
|
2325
|
+
readonly type: "boolean";
|
|
2326
|
+
};
|
|
2327
|
+
readonly remember: {
|
|
2328
|
+
readonly type: "boolean";
|
|
2329
|
+
};
|
|
2330
|
+
readonly filled: {
|
|
2331
|
+
readonly type: "object";
|
|
2332
|
+
readonly additionalProperties: {
|
|
2333
|
+
type: "array";
|
|
2334
|
+
items: {
|
|
2335
|
+
readonly type: "string";
|
|
2336
|
+
};
|
|
2337
|
+
};
|
|
2338
|
+
};
|
|
2339
|
+
readonly via: {
|
|
2340
|
+
readonly type: "string";
|
|
2341
|
+
readonly enum: readonly ["owner", "quorum"];
|
|
2342
|
+
};
|
|
2343
|
+
readonly signs: {
|
|
2344
|
+
type: "array";
|
|
2345
|
+
items: {
|
|
2346
|
+
type: "object";
|
|
2347
|
+
properties: {
|
|
2348
|
+
readonly by: {
|
|
2349
|
+
readonly type: "string";
|
|
2350
|
+
};
|
|
2351
|
+
readonly at: {
|
|
2352
|
+
readonly type: "number";
|
|
2353
|
+
};
|
|
2354
|
+
readonly turnId: {
|
|
2355
|
+
readonly type: "string";
|
|
2356
|
+
};
|
|
2357
|
+
readonly approved: {
|
|
2358
|
+
readonly type: "boolean";
|
|
2359
|
+
};
|
|
2360
|
+
readonly text: {
|
|
2361
|
+
readonly type: "string";
|
|
2362
|
+
};
|
|
2363
|
+
readonly values: {
|
|
2364
|
+
readonly type: "object";
|
|
2365
|
+
readonly additionalProperties: {
|
|
2366
|
+
readonly type: "string";
|
|
2367
|
+
};
|
|
2368
|
+
};
|
|
2369
|
+
};
|
|
2370
|
+
required: readonly ["by", "at", "approved", "text"];
|
|
2371
|
+
additionalProperties: false;
|
|
2372
|
+
};
|
|
2373
|
+
};
|
|
2374
|
+
};
|
|
2375
|
+
required: readonly ["by", "at"];
|
|
2376
|
+
additionalProperties: false;
|
|
2377
|
+
};
|
|
2378
|
+
readonly outcome: {
|
|
2379
|
+
type: "object";
|
|
2380
|
+
properties: {
|
|
2381
|
+
readonly ok: {
|
|
2382
|
+
readonly type: "boolean";
|
|
2383
|
+
};
|
|
2384
|
+
readonly text: {
|
|
2385
|
+
readonly type: "string";
|
|
2386
|
+
};
|
|
2387
|
+
readonly unconfirmed: {
|
|
2388
|
+
readonly type: "boolean";
|
|
2389
|
+
};
|
|
2390
|
+
};
|
|
2391
|
+
required: readonly ["ok"];
|
|
2392
|
+
additionalProperties: false;
|
|
2393
|
+
};
|
|
2394
|
+
readonly note: {
|
|
2395
|
+
readonly type: "string";
|
|
2396
|
+
};
|
|
2397
|
+
readonly quorum: {
|
|
2398
|
+
type: "object";
|
|
2399
|
+
properties: {
|
|
2400
|
+
readonly need: {
|
|
2401
|
+
readonly type: "integer";
|
|
2402
|
+
};
|
|
2403
|
+
readonly who: {
|
|
2404
|
+
type: "array";
|
|
2405
|
+
items: {
|
|
2406
|
+
readonly type: "string";
|
|
2407
|
+
};
|
|
2408
|
+
};
|
|
2409
|
+
readonly openedAt: {
|
|
2410
|
+
readonly type: "number";
|
|
2411
|
+
};
|
|
2412
|
+
readonly onReject: {
|
|
2413
|
+
readonly type: "string";
|
|
2414
|
+
readonly enum: readonly ["block", "reject"];
|
|
2415
|
+
};
|
|
2416
|
+
readonly fields: {
|
|
2417
|
+
type: "array";
|
|
2418
|
+
items: {
|
|
2419
|
+
type: "object";
|
|
2420
|
+
properties: {
|
|
2421
|
+
readonly key: {
|
|
2422
|
+
readonly type: "string";
|
|
2423
|
+
};
|
|
2424
|
+
readonly label: {
|
|
2425
|
+
readonly type: "string";
|
|
2426
|
+
};
|
|
2427
|
+
readonly options: {
|
|
2428
|
+
type: "array";
|
|
2429
|
+
items: {
|
|
2430
|
+
readonly type: "string";
|
|
2431
|
+
};
|
|
2432
|
+
};
|
|
2433
|
+
readonly when: {
|
|
2434
|
+
readonly type: "string";
|
|
2435
|
+
readonly enum: readonly ["approve", "reject", "always"];
|
|
2436
|
+
};
|
|
2437
|
+
readonly required: {
|
|
2438
|
+
readonly type: "boolean";
|
|
2439
|
+
};
|
|
2440
|
+
};
|
|
2441
|
+
required: readonly ["key", "label", "when"];
|
|
2442
|
+
additionalProperties: false;
|
|
2443
|
+
};
|
|
2444
|
+
};
|
|
2445
|
+
readonly blocked: {
|
|
2446
|
+
readonly type: "string";
|
|
2447
|
+
};
|
|
2448
|
+
};
|
|
2449
|
+
required: readonly ["need", "who"];
|
|
2450
|
+
additionalProperties: false;
|
|
2451
|
+
};
|
|
2452
|
+
readonly signs: {
|
|
2453
|
+
type: "array";
|
|
2454
|
+
items: {
|
|
2455
|
+
type: "object";
|
|
2456
|
+
properties: {
|
|
2457
|
+
readonly by: {
|
|
2458
|
+
readonly type: "string";
|
|
2459
|
+
};
|
|
2460
|
+
readonly at: {
|
|
2461
|
+
readonly type: "number";
|
|
2462
|
+
};
|
|
2463
|
+
readonly turnId: {
|
|
2464
|
+
readonly type: "string";
|
|
2465
|
+
};
|
|
2466
|
+
readonly approved: {
|
|
2467
|
+
readonly type: "boolean";
|
|
2468
|
+
};
|
|
2469
|
+
readonly text: {
|
|
2470
|
+
readonly type: "string";
|
|
2471
|
+
};
|
|
2472
|
+
readonly values: {
|
|
2473
|
+
readonly type: "object";
|
|
2474
|
+
readonly additionalProperties: {
|
|
2475
|
+
readonly type: "string";
|
|
2476
|
+
};
|
|
2477
|
+
};
|
|
2478
|
+
};
|
|
2479
|
+
required: readonly ["by", "at", "approved", "text"];
|
|
2480
|
+
additionalProperties: false;
|
|
2481
|
+
};
|
|
2482
|
+
};
|
|
2483
|
+
readonly expiresAt: {
|
|
2484
|
+
readonly type: "number";
|
|
2485
|
+
};
|
|
2486
|
+
readonly type: {
|
|
2487
|
+
readonly type: "string";
|
|
2488
|
+
readonly enum: readonly ["card"];
|
|
2489
|
+
};
|
|
2490
|
+
};
|
|
2491
|
+
required: readonly ["type", "kind", "title", "rev", "state"];
|
|
2492
|
+
additionalProperties: false;
|
|
2493
|
+
}, {
|
|
2494
|
+
type: "object";
|
|
2495
|
+
properties: {
|
|
2496
|
+
readonly type: {
|
|
2497
|
+
readonly type: "string";
|
|
2498
|
+
readonly enum: readonly ["reference"];
|
|
2499
|
+
};
|
|
2500
|
+
readonly dir: {
|
|
2501
|
+
readonly type: "string";
|
|
2502
|
+
readonly enum: readonly ["in", "out"];
|
|
2503
|
+
};
|
|
2504
|
+
readonly address: {
|
|
2505
|
+
readonly type: "string";
|
|
2506
|
+
};
|
|
2507
|
+
readonly title: {
|
|
2508
|
+
readonly type: "string";
|
|
2509
|
+
};
|
|
2510
|
+
readonly recipients: {
|
|
2511
|
+
type: "array";
|
|
2512
|
+
items: {
|
|
2513
|
+
readonly type: "string";
|
|
2514
|
+
};
|
|
2515
|
+
};
|
|
2516
|
+
readonly summary: {
|
|
2517
|
+
readonly type: "string";
|
|
2518
|
+
};
|
|
2519
|
+
};
|
|
2520
|
+
required: readonly ["type", "dir", "address", "title"];
|
|
2521
|
+
additionalProperties: false;
|
|
2522
|
+
}, {
|
|
2523
|
+
type: "object";
|
|
2524
|
+
properties: {
|
|
2525
|
+
readonly type: {
|
|
2526
|
+
readonly type: "string";
|
|
2527
|
+
readonly enum: readonly ["excerpt"];
|
|
2528
|
+
};
|
|
2529
|
+
readonly text: {
|
|
2530
|
+
readonly type: "string";
|
|
2531
|
+
};
|
|
2532
|
+
readonly title: {
|
|
2533
|
+
readonly type: "string";
|
|
2534
|
+
};
|
|
2535
|
+
readonly author: {
|
|
2536
|
+
readonly type: "string";
|
|
2537
|
+
};
|
|
2538
|
+
readonly url: {
|
|
2539
|
+
readonly type: "string";
|
|
2540
|
+
};
|
|
2541
|
+
};
|
|
2542
|
+
required: readonly ["type", "text"];
|
|
2543
|
+
additionalProperties: false;
|
|
2544
|
+
}];
|
|
2545
|
+
};
|
|
2546
|
+
};
|
|
2547
|
+
readonly visibility: {
|
|
2548
|
+
readonly oneOf: readonly [{
|
|
2549
|
+
readonly type: "string";
|
|
2550
|
+
readonly enum: readonly ["all", "shadow"];
|
|
2551
|
+
}, {
|
|
2552
|
+
type: "array";
|
|
2553
|
+
items: {
|
|
2554
|
+
readonly type: "string";
|
|
2555
|
+
};
|
|
2556
|
+
}];
|
|
2557
|
+
};
|
|
2558
|
+
readonly status: {
|
|
2559
|
+
readonly type: readonly ["string", "null"];
|
|
2560
|
+
readonly enum: readonly ["processing", "completed", "failed", "canceled", null];
|
|
2561
|
+
};
|
|
2562
|
+
readonly turnId: {
|
|
2563
|
+
readonly type: readonly ["string", "null"];
|
|
2564
|
+
};
|
|
2565
|
+
readonly retryOf: {
|
|
2566
|
+
readonly type: readonly ["string", "null"];
|
|
2567
|
+
};
|
|
2568
|
+
readonly note: {
|
|
2569
|
+
readonly type: readonly ["string", "null"];
|
|
2570
|
+
};
|
|
2571
|
+
readonly terminal: {
|
|
2572
|
+
type: "object";
|
|
2573
|
+
properties: {
|
|
2574
|
+
readonly status: {
|
|
2575
|
+
readonly type: "string";
|
|
2576
|
+
readonly enum: readonly ["failed", "canceled"];
|
|
2577
|
+
};
|
|
2578
|
+
readonly reason: {
|
|
2579
|
+
readonly type: readonly ["string", "null"];
|
|
2580
|
+
};
|
|
2581
|
+
};
|
|
2582
|
+
required: readonly ["status", "reason"];
|
|
2583
|
+
additionalProperties: false;
|
|
2584
|
+
};
|
|
2585
|
+
readonly read: {
|
|
2586
|
+
type: "array";
|
|
2587
|
+
items: {
|
|
2588
|
+
readonly type: "string";
|
|
2589
|
+
};
|
|
2590
|
+
};
|
|
2591
|
+
readonly createdAt: {
|
|
2592
|
+
readonly type: "number";
|
|
2593
|
+
};
|
|
2594
|
+
readonly deletedAt: {
|
|
2595
|
+
readonly type: "number";
|
|
2596
|
+
};
|
|
2597
|
+
readonly deletedBy: {
|
|
2598
|
+
readonly type: "string";
|
|
2599
|
+
};
|
|
2600
|
+
};
|
|
2601
|
+
required: readonly ["id", "topicId", "seq", "from", "to", "replyTo", "thread", "attachments", "content", "parts", "status", "turnId", "retryOf", "note", "read", "createdAt"];
|
|
2602
|
+
additionalProperties: false;
|
|
2603
|
+
};
|
|
2604
|
+
/** One entry in the history, or a reply still being produced (seq is null). */
|
|
2605
|
+
export type Message = Omit<FromSchema<typeof messageSchema>, 'parts'> & {
|
|
2606
|
+
parts: Part[];
|
|
2607
|
+
};
|
|
2608
|
+
export declare const usageSchema: {
|
|
2609
|
+
type: "object";
|
|
2610
|
+
properties: {
|
|
2611
|
+
/** Total input in this report, including cache reads and writes. */
|
|
2612
|
+
readonly inputTokens: {
|
|
2613
|
+
readonly type: "number";
|
|
2614
|
+
};
|
|
2615
|
+
readonly outputTokens: {
|
|
2616
|
+
readonly type: "number";
|
|
2617
|
+
};
|
|
2618
|
+
readonly cachedReadTokens: {
|
|
2619
|
+
readonly type: "number";
|
|
2620
|
+
};
|
|
2621
|
+
readonly cachedWriteTokens: {
|
|
2622
|
+
readonly type: "number";
|
|
2623
|
+
};
|
|
2624
|
+
/** The client's reported total, which may include thinking or cover the whole session. */
|
|
2625
|
+
readonly totalTokens: {
|
|
2626
|
+
readonly type: "number";
|
|
2627
|
+
};
|
|
2628
|
+
readonly contextUsed: {
|
|
2629
|
+
readonly type: "number";
|
|
2630
|
+
};
|
|
2631
|
+
readonly contextSize: {
|
|
2632
|
+
readonly type: "number";
|
|
2633
|
+
};
|
|
2634
|
+
};
|
|
2635
|
+
required: [];
|
|
2636
|
+
additionalProperties: false;
|
|
2637
|
+
};
|
|
2638
|
+
export type Usage = FromSchema<typeof usageSchema>;
|
|
2639
|
+
export interface McpServer {
|
|
2640
|
+
name: string;
|
|
2641
|
+
/** One the owner added, not one the host serves: an adapter does not pre-approve its tools. */
|
|
2642
|
+
external?: boolean;
|
|
2643
|
+
url?: string;
|
|
2644
|
+
command?: string;
|
|
2645
|
+
args?: string[];
|
|
2646
|
+
env?: Record<string, string>;
|
|
2647
|
+
headers?: Record<string, string>;
|
|
2648
|
+
}
|
|
2649
|
+
declare const applyModeSchema: {
|
|
2650
|
+
readonly type: "string";
|
|
2651
|
+
readonly enum: readonly ["live", "restart", "new-session"];
|
|
2652
|
+
};
|
|
2653
|
+
export type ApplyMode = FromSchema<typeof applyModeSchema>;
|
|
2654
|
+
export declare const applyModesSchema: {
|
|
2655
|
+
type: "object";
|
|
2656
|
+
properties: {
|
|
2657
|
+
readonly tools: {
|
|
2658
|
+
readonly type: "string";
|
|
2659
|
+
readonly enum: readonly ["live", "restart", "new-session"];
|
|
2660
|
+
};
|
|
2661
|
+
readonly prompt: {
|
|
2662
|
+
readonly type: "string";
|
|
2663
|
+
readonly enum: readonly ["live", "restart", "new-session"];
|
|
2664
|
+
};
|
|
2665
|
+
readonly model: {
|
|
2666
|
+
readonly type: "string";
|
|
2667
|
+
readonly enum: readonly ["live", "restart", "new-session"];
|
|
2668
|
+
};
|
|
2669
|
+
readonly options: {
|
|
2670
|
+
readonly type: "string";
|
|
2671
|
+
readonly enum: readonly ["live", "restart", "new-session"];
|
|
2672
|
+
};
|
|
2673
|
+
};
|
|
2674
|
+
required: readonly ["tools", "prompt", "model", "options"];
|
|
2675
|
+
additionalProperties: false;
|
|
2676
|
+
};
|
|
2677
|
+
export type ApplyDimension = keyof Adapter['applies'];
|
|
2678
|
+
/** A session a client already has, as the client itself lists it. */
|
|
2679
|
+
export interface ClientSession {
|
|
2680
|
+
id: string;
|
|
2681
|
+
title?: string;
|
|
2682
|
+
/** The directory it was last used in. */
|
|
2683
|
+
cwd?: string;
|
|
2684
|
+
updatedAt?: number;
|
|
2685
|
+
/** Open in another process now (its pid, when the client says): it cannot be continued anywhere else until that one is closed. */
|
|
2686
|
+
held?: {
|
|
2687
|
+
pid?: number;
|
|
2688
|
+
};
|
|
2689
|
+
}
|
|
2690
|
+
export interface StartInput {
|
|
2691
|
+
/** The client's session to continue. Absent: open a new one. */
|
|
2692
|
+
sessionId?: string;
|
|
2693
|
+
/**
|
|
2694
|
+
* The session has not been given `systemPrompt` yet: it is new, or it was made outside the host and is continued
|
|
2695
|
+
* here for the first time. Continuing a session and being new to the host are two things.
|
|
2696
|
+
*/
|
|
2697
|
+
opening: boolean;
|
|
2698
|
+
cwd: string;
|
|
2699
|
+
/** Directories besides `cwd` the client may read and write: the topic's own and inherited references. */
|
|
2700
|
+
dirs?: string[];
|
|
2701
|
+
/** Member-level text. An adapter without a system channel puts it in front of the first turn of a session that is `opening`. */
|
|
2702
|
+
systemPrompt?: string;
|
|
2703
|
+
/** Start-input dimensions whose fingerprints differ from the session being continued. */
|
|
2704
|
+
changed?: ApplyDimension[];
|
|
2705
|
+
mcpServers: McpServer[];
|
|
2706
|
+
/** The key the member's client is to run with. How it is handed over (variables, config) is the adapter's to do. */
|
|
2707
|
+
key?: ApiKey;
|
|
2708
|
+
/** Environment of the selected client login, including for a resumed session. */
|
|
2709
|
+
env?: NodeJS.ProcessEnv;
|
|
2710
|
+
/** Resolved member-level environment templates, kept separate from account/key environment. */
|
|
2711
|
+
memberEnv?: NodeJS.ProcessEnv;
|
|
2712
|
+
options: Record<string, unknown>;
|
|
2713
|
+
}
|
|
2714
|
+
export interface TurnInput {
|
|
2715
|
+
turnId: string;
|
|
2716
|
+
text: string;
|
|
2717
|
+
}
|
|
2718
|
+
export type TurnFailure = 'network' | 'account' | 'provider';
|
|
2719
|
+
/** An adapter can report the same failure when opening a session as at turn end. */
|
|
2720
|
+
export declare class TurnFailureError extends Error {
|
|
2721
|
+
readonly failure: TurnFailure;
|
|
2722
|
+
constructor(failure: TurnFailure, cause: Error);
|
|
2723
|
+
}
|
|
2724
|
+
/** An adapter reports that a saved session no longer exists on the client and must be replaced. */
|
|
2725
|
+
export declare class SessionGoneError extends Error {
|
|
2726
|
+
constructor(message: string, options?: ErrorOptions);
|
|
2727
|
+
}
|
|
2728
|
+
export type InstanceEvent = {
|
|
2729
|
+
type: 'turn_start';
|
|
2730
|
+
turn: string;
|
|
2731
|
+
origin: 'self';
|
|
2732
|
+
}
|
|
2733
|
+
/** The reported model and, when the adapter resolves a configured alias, its canonical ID. */
|
|
2734
|
+
| {
|
|
2735
|
+
type: 'model';
|
|
2736
|
+
turn: string;
|
|
2737
|
+
model: string;
|
|
2738
|
+
configuredModel?: string;
|
|
2739
|
+
}
|
|
2740
|
+
/** A different ID starts a new public reply, even with an empty delta. Without IDs the turn has one reply. */
|
|
2741
|
+
| {
|
|
2742
|
+
type: 'text';
|
|
2743
|
+
turn: string;
|
|
2744
|
+
delta: string;
|
|
2745
|
+
message?: string;
|
|
2746
|
+
} | {
|
|
2747
|
+
type: 'thinking';
|
|
2748
|
+
turn: string;
|
|
2749
|
+
delta: string;
|
|
2750
|
+
} | {
|
|
2751
|
+
type: 'tool';
|
|
2752
|
+
turn: string;
|
|
2753
|
+
id: string;
|
|
2754
|
+
phase: 'start' | 'end';
|
|
2755
|
+
name?: string;
|
|
2756
|
+
input?: string;
|
|
2757
|
+
output?: string;
|
|
2758
|
+
failed?: boolean;
|
|
2759
|
+
agent?: boolean;
|
|
2760
|
+
} | {
|
|
2761
|
+
type: 'ask';
|
|
2762
|
+
turn: string;
|
|
2763
|
+
askId: string;
|
|
2764
|
+
title: string;
|
|
2765
|
+
options: AskOption[];
|
|
2766
|
+
details?: Pick<CardItem, 'fields' | 'code'>;
|
|
2767
|
+
} | {
|
|
2768
|
+
type: 'usage';
|
|
2769
|
+
turn?: string;
|
|
2770
|
+
usage: Usage;
|
|
2771
|
+
} | {
|
|
2772
|
+
type: 'turn_end';
|
|
2773
|
+
turn: string;
|
|
2774
|
+
outcome: 'completed' | 'failed' | 'canceled';
|
|
2775
|
+
error?: string;
|
|
2776
|
+
failure?: TurnFailure;
|
|
2777
|
+
} | {
|
|
2778
|
+
type: 'session';
|
|
2779
|
+
id: string;
|
|
2780
|
+
} | {
|
|
2781
|
+
type: 'exit';
|
|
2782
|
+
reason: string;
|
|
2783
|
+
};
|
|
2784
|
+
export interface InstanceContext {
|
|
2785
|
+
topicId: string;
|
|
2786
|
+
member: Member;
|
|
2787
|
+
/** The instance's only way out. Bound once, for as long as the instance lives. */
|
|
2788
|
+
emit(event: InstanceEvent): void;
|
|
2789
|
+
log(message: string): void;
|
|
2790
|
+
}
|
|
2791
|
+
/**
|
|
2792
|
+
* Holds the child process, the current session id and the current turn. Nothing else: no queue, no history.
|
|
2793
|
+
* Every turn it starts ends with exactly one `turn_end`, also when the process is lost.
|
|
2794
|
+
*/
|
|
2795
|
+
export interface Instance {
|
|
2796
|
+
readonly pid?: number;
|
|
2797
|
+
/** Start with a session id to continue it, without to open a new one. Resolves to the session id in use. */
|
|
2798
|
+
start(input: StartInput): Promise<string>;
|
|
2799
|
+
/** Begin a turn. The host only calls it while the instance is idle. */
|
|
2800
|
+
send(input: TurnInput): void;
|
|
2801
|
+
/** Add input to the running turn. Absent = not supported. */
|
|
2802
|
+
append?(input: TurnInput): Promise<void>;
|
|
2803
|
+
interrupt(): Promise<void>;
|
|
2804
|
+
answer(askId: string, optionId: string): void;
|
|
2805
|
+
stop(opts: {
|
|
2806
|
+
force: boolean;
|
|
2807
|
+
}): Promise<void>;
|
|
2808
|
+
}
|
|
2809
|
+
/**
|
|
2810
|
+
* The account windows the service reports. Reset times are Unix milliseconds.
|
|
2811
|
+
* Windows come longest first within a group (a week before five hours); the console shows them in this order.
|
|
2812
|
+
*/
|
|
2813
|
+
export interface QuotaWindow {
|
|
2814
|
+
label: string;
|
|
2815
|
+
usedPercent?: number;
|
|
2816
|
+
resetsAt?: number;
|
|
2817
|
+
}
|
|
2818
|
+
/** A member's resolved credentials and adapter options. Without a key, the client uses its own login. */
|
|
2819
|
+
export interface QuotaContext {
|
|
2820
|
+
key?: ApiKey;
|
|
2821
|
+
env?: NodeJS.ProcessEnv;
|
|
2822
|
+
/** Resolved member environment. Selected credentials in `env` take precedence over it. */
|
|
2823
|
+
memberEnv?: NodeJS.ProcessEnv;
|
|
2824
|
+
options?: Record<string, unknown>;
|
|
2825
|
+
}
|
|
2826
|
+
export interface Adapter {
|
|
2827
|
+
/** Shown when choosing an adapter for a member. */
|
|
2828
|
+
title: string;
|
|
2829
|
+
/** Defaults copied when a person adds a member of this client. */
|
|
2830
|
+
memberTemplate?: Pick<Member, 'name' | 'color' | 'avatarPath'> & {
|
|
2831
|
+
options?: Member['options'];
|
|
2832
|
+
};
|
|
2833
|
+
/** The client product's own mark, a console asset path (`/clients/claude.svg`). Absent: places that show the client use its initial. */
|
|
2834
|
+
icon?: string;
|
|
2835
|
+
detect?(): Promise<{
|
|
2836
|
+
installed: boolean;
|
|
2837
|
+
version?: string;
|
|
2838
|
+
note?: string;
|
|
2839
|
+
}>;
|
|
2840
|
+
/** What can be chosen for a member. Answers may be remembered for a while; `fresh` asks the client again, which also shows whether it can be used at all. */
|
|
2841
|
+
options?(fresh?: boolean, key?: ApiKey, env?: NodeJS.ProcessEnv): Promise<ConfigField[]>;
|
|
2842
|
+
/** The command line that starts this client (`kimi acp`). A member may state another (a path, a wrapper). Absent: the client is not a command. */
|
|
2843
|
+
command?: string;
|
|
2844
|
+
/** A member must provide its own launch command in `options.command` (generic clients without a fixed default command). */
|
|
2845
|
+
requiresCommand?: boolean;
|
|
2846
|
+
/** Where this client looks for skills inside a working directory (`.claude/skills`). Absent: it is told the list and reads a skill with a tool. */
|
|
2847
|
+
skillsDir?: string;
|
|
2848
|
+
/** A turn of this client takes more input while it runs. What the host does with a busy member follows from this and nothing else. */
|
|
2849
|
+
append?: boolean;
|
|
2850
|
+
/** The protocols of API key this client can run with. Absent: only its own login. With a key, `options` lists the models that key can use. */
|
|
2851
|
+
protocols?: ApiKey['protocol'][];
|
|
2852
|
+
account?: ClientAccount;
|
|
2853
|
+
/**
|
|
2854
|
+
* The sessions this client already has under a directory, newest first, and with that the word that one of them,
|
|
2855
|
+
* made outside the host, can be continued in a topic. `options` are a member's (how its client is started).
|
|
2856
|
+
* Absent: the client cannot say, and nothing made outside is taken in.
|
|
2857
|
+
*/
|
|
2858
|
+
sessions?(cwd: string, options: Record<string, unknown>, env?: NodeJS.ProcessEnv): Promise<ClientSession[]>;
|
|
2859
|
+
quota?(ctx?: QuotaContext): Promise<QuotaWindow[]>;
|
|
2860
|
+
/** Environment variables that can select a different native login for quota grouping. */
|
|
2861
|
+
quotaAccountEnv?: readonly string[];
|
|
2862
|
+
/** How a change of each kind reaches a running instance. */
|
|
2863
|
+
applies: FromSchema<typeof applyModesSchema>;
|
|
2864
|
+
open(ctx: InstanceContext): Instance;
|
|
2865
|
+
}
|
|
2866
|
+
export {};
|