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,179 @@
|
|
|
1
|
+
import { createPrivateKey, createPublicKey, generateKeyPairSync, randomBytes, sign, verify, } from 'node:crypto';
|
|
2
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
3
|
+
import { writeDocuments } from 'hostlet/sdk';
|
|
4
|
+
const DAY_MS = 86_400_000;
|
|
5
|
+
/** Lifetime of each generated Ed25519 signing key version (180 days). */
|
|
6
|
+
export const MCP_KEY_TTL_MS = 180 * DAY_MS;
|
|
7
|
+
/** Rotate to a fresh signing key this long before the current key expires (30 days). */
|
|
8
|
+
export const MCP_KEY_ROTATE_BEFORE_MS = 30 * DAY_MS;
|
|
9
|
+
/** Lifetime of each signed MCP bearer token (30 days, capped at its signing key's expiry). */
|
|
10
|
+
export const MCP_TOKEN_TTL_MS = 30 * DAY_MS;
|
|
11
|
+
/** Refresh cached in-process tokens when less than 15 days remain so sessions never hit expiry mid-flight. */
|
|
12
|
+
export const MCP_TOKEN_REFRESH_MARGIN_MS = 15 * DAY_MS;
|
|
13
|
+
const TOKEN_PREFIX = 'hlm1';
|
|
14
|
+
const KEYRING_PATH = ['secrets', 'mcp-signing.json'];
|
|
15
|
+
function generateKey(now) {
|
|
16
|
+
const { privateKey, publicKey } = generateKeyPairSync('ed25519');
|
|
17
|
+
const record = {
|
|
18
|
+
kid: `k_${randomBytes(8).toString('hex')}`,
|
|
19
|
+
alg: 'Ed25519',
|
|
20
|
+
createdAt: now,
|
|
21
|
+
expiresAt: now + MCP_KEY_TTL_MS,
|
|
22
|
+
jwk: privateKey.export({ format: 'jwk' }),
|
|
23
|
+
};
|
|
24
|
+
return { record, privateKey, publicKey };
|
|
25
|
+
}
|
|
26
|
+
function parseKeyRecord(raw, label) {
|
|
27
|
+
if (!raw || typeof raw !== 'object')
|
|
28
|
+
throw new Error(`MCP 签名密钥无效(${label})`);
|
|
29
|
+
const record = raw;
|
|
30
|
+
if (typeof record.kid !== 'string' || !record.kid
|
|
31
|
+
|| record.alg !== 'Ed25519'
|
|
32
|
+
|| typeof record.createdAt !== 'number' || !Number.isFinite(record.createdAt)
|
|
33
|
+
|| typeof record.expiresAt !== 'number' || !Number.isFinite(record.expiresAt)
|
|
34
|
+
|| !record.jwk || typeof record.jwk !== 'object') {
|
|
35
|
+
throw new Error(`MCP 签名密钥格式无效(${label})`);
|
|
36
|
+
}
|
|
37
|
+
const privateKey = createPrivateKey({ key: record.jwk, format: 'jwk' });
|
|
38
|
+
if (privateKey.asymmetricKeyType !== 'ed25519')
|
|
39
|
+
throw new Error(`MCP 签名密钥算法不匹配(${label})`);
|
|
40
|
+
const publicKey = createPublicKey(privateKey);
|
|
41
|
+
return {
|
|
42
|
+
record: {
|
|
43
|
+
kid: record.kid,
|
|
44
|
+
alg: 'Ed25519',
|
|
45
|
+
createdAt: record.createdAt,
|
|
46
|
+
expiresAt: record.expiresAt,
|
|
47
|
+
jwk: record.jwk,
|
|
48
|
+
},
|
|
49
|
+
privateKey,
|
|
50
|
+
publicKey,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function decodePayload(encoded) {
|
|
54
|
+
if (!encoded || !/^[A-Za-z0-9_-]+$/.test(encoded))
|
|
55
|
+
return undefined;
|
|
56
|
+
let parsed;
|
|
57
|
+
try {
|
|
58
|
+
parsed = JSON.parse(Buffer.from(encoded, 'base64url').toString('utf8'));
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
if (!parsed || typeof parsed !== 'object')
|
|
64
|
+
return undefined;
|
|
65
|
+
const p = parsed;
|
|
66
|
+
if (typeof p.topicId !== 'string' || !p.topicId
|
|
67
|
+
|| typeof p.memberId !== 'string' || !p.memberId
|
|
68
|
+
|| typeof p.kid !== 'string' || !p.kid
|
|
69
|
+
|| typeof p.iat !== 'number' || !Number.isFinite(p.iat)
|
|
70
|
+
|| typeof p.exp !== 'number' || !Number.isFinite(p.exp)
|
|
71
|
+
|| typeof p.jti !== 'string' || !p.jti) {
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
return { topicId: p.topicId, memberId: p.memberId, kid: p.kid, iat: p.iat, exp: p.exp, jti: p.jti };
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Native Ed25519 signing authority for platform MCP bearer tokens.
|
|
78
|
+
* Keeps at most two key versions (`current` + `previous`) in `secrets/mcp-signing.json` with 0600 / Windows private ACL.
|
|
79
|
+
*/
|
|
80
|
+
export function createMcpTokenAuthority(home, opts) {
|
|
81
|
+
const now = opts?.now ?? (() => Date.now());
|
|
82
|
+
const file = home.path(...KEYRING_PATH);
|
|
83
|
+
let current;
|
|
84
|
+
let previous;
|
|
85
|
+
const save = (nextCurrent, nextPrevious) => {
|
|
86
|
+
const doc = {
|
|
87
|
+
current: nextCurrent.record,
|
|
88
|
+
...(nextPrevious ? { previous: nextPrevious.record } : {}),
|
|
89
|
+
};
|
|
90
|
+
writeDocuments(home, [{ path: file, value: doc, mode: 0o600 }]);
|
|
91
|
+
};
|
|
92
|
+
const rotateIfNeeded = () => {
|
|
93
|
+
const at = now();
|
|
94
|
+
if (at >= current.record.expiresAt - MCP_KEY_ROTATE_BEFORE_MS) {
|
|
95
|
+
const nextPrevious = current.record.expiresAt > at ? current : undefined;
|
|
96
|
+
const nextCurrent = generateKey(at);
|
|
97
|
+
save(nextCurrent, nextPrevious);
|
|
98
|
+
current = nextCurrent;
|
|
99
|
+
previous = nextPrevious;
|
|
100
|
+
}
|
|
101
|
+
else if (previous && previous.record.expiresAt <= at) {
|
|
102
|
+
save(current, undefined);
|
|
103
|
+
previous = undefined;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
if (existsSync(file)) {
|
|
107
|
+
const parsed = JSON.parse(readFileSync(file, 'utf8'));
|
|
108
|
+
current = parseKeyRecord(parsed?.current, 'current');
|
|
109
|
+
previous = parsed?.previous ? parseKeyRecord(parsed.previous, 'previous') : undefined;
|
|
110
|
+
rotateIfNeeded();
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
const initial = generateKey(now());
|
|
114
|
+
save(initial, undefined);
|
|
115
|
+
current = initial;
|
|
116
|
+
previous = undefined;
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
ensureFresh() {
|
|
120
|
+
rotateIfNeeded();
|
|
121
|
+
return current.record;
|
|
122
|
+
},
|
|
123
|
+
issue(topicId, memberId) {
|
|
124
|
+
rotateIfNeeded();
|
|
125
|
+
const iat = now();
|
|
126
|
+
const exp = Math.min(iat + MCP_TOKEN_TTL_MS, current.record.expiresAt);
|
|
127
|
+
const payload = {
|
|
128
|
+
topicId,
|
|
129
|
+
memberId,
|
|
130
|
+
kid: current.record.kid,
|
|
131
|
+
iat,
|
|
132
|
+
exp,
|
|
133
|
+
jti: randomBytes(6).toString('base64url'),
|
|
134
|
+
};
|
|
135
|
+
const body = `${TOKEN_PREFIX}.${Buffer.from(JSON.stringify(payload), 'utf8').toString('base64url')}`;
|
|
136
|
+
const signature = sign(null, Buffer.from(body, 'utf8'), current.privateKey).toString('base64url');
|
|
137
|
+
return { ...payload, token: `${body}.${signature}` };
|
|
138
|
+
},
|
|
139
|
+
isCurrent(issued) {
|
|
140
|
+
rotateIfNeeded();
|
|
141
|
+
return issued.kid === current.record.kid && issued.exp - now() > MCP_TOKEN_REFRESH_MARGIN_MS;
|
|
142
|
+
},
|
|
143
|
+
verify(token) {
|
|
144
|
+
if (!token.startsWith(`${TOKEN_PREFIX}.`))
|
|
145
|
+
return { ok: false, reason: 'invalid' };
|
|
146
|
+
const parts = token.split('.');
|
|
147
|
+
if (parts.length !== 3 || parts[0] !== TOKEN_PREFIX || !parts[1] || !parts[2])
|
|
148
|
+
return { ok: false, reason: 'invalid' };
|
|
149
|
+
const payload = decodePayload(parts[1]);
|
|
150
|
+
if (!payload)
|
|
151
|
+
return { ok: false, reason: 'invalid' };
|
|
152
|
+
if (!/^[A-Za-z0-9_-]+$/.test(parts[2]))
|
|
153
|
+
return { ok: false, reason: 'invalid' };
|
|
154
|
+
const signature = Buffer.from(parts[2], 'base64url');
|
|
155
|
+
if (signature.length !== 64 || signature.toString('base64url') !== parts[2])
|
|
156
|
+
return { ok: false, reason: 'invalid' };
|
|
157
|
+
const signingInput = Buffer.from(`${parts[0]}.${parts[1]}`, 'utf8');
|
|
158
|
+
const at = now();
|
|
159
|
+
// Always verify with the current version first, then fall back to the previous version.
|
|
160
|
+
for (const candidate of previous ? [current, previous] : [current]) {
|
|
161
|
+
if (candidate.record.kid !== payload.kid)
|
|
162
|
+
continue;
|
|
163
|
+
if (!verify(null, signingInput, candidate.publicKey, signature))
|
|
164
|
+
continue;
|
|
165
|
+
if (candidate.record.expiresAt <= at || payload.exp <= at)
|
|
166
|
+
return { ok: false, reason: 'expired' };
|
|
167
|
+
return { ok: true, payload };
|
|
168
|
+
}
|
|
169
|
+
return { ok: false, reason: 'invalid' };
|
|
170
|
+
},
|
|
171
|
+
versions() {
|
|
172
|
+
const meta = ({ kid, alg, createdAt, expiresAt }) => ({ kid, alg, createdAt, expiresAt });
|
|
173
|
+
return {
|
|
174
|
+
current: meta(current.record),
|
|
175
|
+
...(previous ? { previous: meta(previous.record) } : {}),
|
|
176
|
+
};
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Plugin } from 'hostlet/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* What makes a topic something members work in rather than a chat: a member is told how topics are used when its
|
|
4
|
+
* session starts, and is given a skill for organising something with them. The tools it reads and changes the
|
|
5
|
+
* tree with (the group `topics`) are the host's own operations on topics, declared once for the console and for
|
|
6
|
+
* members (src/core/topic-ops.ts).
|
|
7
|
+
*/
|
|
8
|
+
export declare const topicToolsPlugin: Plugin;
|
|
9
|
+
export default topicToolsPlugin;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { fileURLToPath } from 'node:url';
|
|
2
|
+
/**
|
|
3
|
+
* What makes a topic something members work in rather than a chat: a member is told how topics are used when its
|
|
4
|
+
* session starts, and is given a skill for organising something with them. The tools it reads and changes the
|
|
5
|
+
* tree with (the group `topics`) are the host's own operations on topics, declared once for the console and for
|
|
6
|
+
* members (src/core/topic-ops.ts).
|
|
7
|
+
*/
|
|
8
|
+
export const topicToolsPlugin = {
|
|
9
|
+
name: 'topic-tools',
|
|
10
|
+
title: '主题工具',
|
|
11
|
+
about: '告诉成员主题怎么用:看和改主题树、写摘要、把事情交给别的主题;自带 skill topic-tidy。(主题工具在核心工具组 hostlet 里。)',
|
|
12
|
+
group: '给成员的工具',
|
|
13
|
+
start(ctx) {
|
|
14
|
+
// How to organise something with topics, as a skill that comes with these tools.
|
|
15
|
+
ctx.hook('skills.dirs', () => fileURLToPath(new URL('./skills', import.meta.url)));
|
|
16
|
+
// What the topic is reaches a member with the first turn of a session (whoever composes that turn reads the
|
|
17
|
+
// topics service). Here: how topics are used, which is the same in every topic.
|
|
18
|
+
ctx.note('session.init', { title: '主题契约与 topic-tidy 入口', when: '每段会话开头' });
|
|
19
|
+
ctx.hook('session.init', () => {
|
|
20
|
+
if (ctx.runtime.has('i18n') && ctx.get('i18n').lang() === 'en') {
|
|
21
|
+
return "Use `topic_summary` to replace `summary.md` in full with a snapshot of the topic's current state.\n"
|
|
22
|
+
+ 'Keep deliverables in `artifacts/`, chat attachments in `attachments/`, and temporary files in `tmp/` (see `topic-tidy`).';
|
|
23
|
+
}
|
|
24
|
+
return '`summary.md` 是主题当前状态的快照,用 `topic_summary` 整段替换。\n'
|
|
25
|
+
+ '`artifacts/` 放正式产物,`attachments/` 放聊天附件,`tmp/` 放临时文件(整理见 `topic-tidy`)。';
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
export default topicToolsPlugin;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: topic-tidy
|
|
3
|
+
description: 在 hostlet 开主题并声明用途、界定主题归属与原楼闭环协作、整理主题目录和主题树、维护摘要和标准文档。新开主题、接手一件事、跨主题交接、拆分工作、移动主题或回看决定时用它。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# topic-tidy
|
|
7
|
+
|
|
8
|
+
一个主题是一件要做的事。以后打开它的人和成员,应该一眼看到:它是什么、现在的标准是什么、做到哪了、是怎么变成现在这样的。这四样各在一个地方,不重复写:
|
|
9
|
+
|
|
10
|
+
| 要知道的 | 在哪 |
|
|
11
|
+
|---|---|
|
|
12
|
+
| 有哪些事、谁在谁下面 | 主题树(`topic_tree`) |
|
|
13
|
+
| 用途、入口、稳定规则与当前卡点 | 概览的摘要(`summary.md`),用 `topic_summary` 整份替换 |
|
|
14
|
+
| 完整目标与现行标准 | 主题目录 `artifacts/` 下的标准文档 |
|
|
15
|
+
| 正在推进什么、接下来做什么 | 规划(`#plans` 与概览挂载的进行中列表) |
|
|
16
|
+
| 是怎么变成这样的 | `channel.jsonl` 里的原话,标准文档的“改过什么”一节指过去 |
|
|
17
|
+
|
|
18
|
+
## 初始化主题
|
|
19
|
+
|
|
20
|
+
- 已知用途时,用 `topic_create` 写清标题和 `summary`。摘要用一两句说明要解决什么、完成时交付什么。需要时填父主题和引用目录,宿主创建主题目录时会写好摘要。
|
|
21
|
+
- 从控制台一句话开题时,宿主会建好 `summary.md`。接手先读摘要及其中指向的标准文档、产物或规划。摘要空着时,在首轮结合讨论补齐标题、合适的父题和首版摘要。上级主题的目录在 `topic_about` 的 `above[].dir` 和首轮主题说明里。
|
|
22
|
+
- 目录分工与清理(软 / 硬约束):
|
|
23
|
+
- **软约束**:`artifacts/` 只放长期维护的标准文档、正式交付物与摘要/变更归档;一次性验收截图、调试日志、临时补丁、`.bundle`、临时脚本和隔离 worktree 一律放 `tmp/`;聊天截图与附件由宿主放 `attachments/`。不要在 `tmp/` 中单独安装 `node_modules`(隔离 worktree 复用主仓符号链接),任务合入或关闭后及时用 `git worktree remove` 回收隔离 worktree 与分支;仅对确需长期保留的附件或临时文件标 `files.retain`。
|
|
24
|
+
- **硬约束**:主题目录三分——`artifacts/` 只放当前主题的正式产物,存储清理(无论手动还是自动)从不扫描或删除它(需要时可手动删);`attachments/` 是聊天附件,`tmp/` 是临时区,二者及主题根目录下没人认领的文件/目录(`other`)可由机主在「存储空间」按「图片 / 富媒体 / 文件」查看、单独标「保留」或整目录/逐项清理。主题根目录里宿主和插件声明的记录(`channel.jsonl`、`summary.md`、`works.json`、`plans.json`、客户端的 `.claude/` 等)始终保留。`files.retain` 白名单和置顶保护单个文件或目录。
|
|
25
|
+
|
|
26
|
+
## 标准文档:一个主题一份
|
|
27
|
+
|
|
28
|
+
- 要做出东西的主题(开发、方案、调研)有一份标准文档,放主题目录 `artifacts/` 下(开发类的叫 `rfc-<名字>.md`)。它和摘要一起表达**完整目标与现在成立的设计**:要解决什么、定了什么、怎么做的、没做什么。
|
|
29
|
+
- **新增未实现目标当轮登记规划**:在摘要或标准文档「现行设计」里新增了尚未实现的内容时,当轮就用 `plan_note` 登记规划项——出处指向标准文档里对应的那一节,规划之间的先后关系写在 `dependencies`。规划插件会在依赖就绪或到期时按预设安排自动开工。
|
|
30
|
+
- 只有一份。方向变了就改这一份,不另写第二份,也不在旧内容后面追加“更新:……”。
|
|
31
|
+
- **临时验收声明**:标准文档只写要做什么、流程是什么,不带验收章节。标准文档刷新到一个终态、要交机主验收时,在主题的 `tmp/` 下另写一份临时验收声明(如 `tmp/验收声明-<特性>.md`),写四件事:预期是什么样;主流程按什么步骤走(从哪个入口进去,每步做什么);每一步应该看到什么;在哪个环境验(机主实际使用的宿主、提交或插件版本,隔离宿主上通过不算已上线)。机主照着它验,不用回忆上下文。用 `plan_set` 的 `statement` 把声明挂到对应规划上,看板的「待机主验」可以直接打开。规划自己的验收项(`plan_set` 的 `acceptance`:入口、动作、可观察的结果,由谁验 `self` / `member` / `owner`)全部通过才能标完成;验收完把声明删掉或归档,不留在 `artifacts/`。复杂特性由成员另外在 `tmp/` 准备预期清单和自验清单,自己逐项验完再交。
|
|
32
|
+
- **开工前对账**:接手前先读最新的交接、规划和分支,确认现在谁负责、已经有哪些分支和候选版本,避免和别人重复做。
|
|
33
|
+
- **拆解复核**:把原话拆成标准文档和规划后,由拆解人以外的成员拿原话逐句对照标准文档,确认没有整节漏掉。先靠约定,不做成工具。
|
|
34
|
+
- 「改过什么」只记**方向、契约或方案级变更**(日期、作者、原决定 → 新决定、原话链接),链接跨题原话用 `#chat-<主题编号>/<消息编号>`:
|
|
35
|
+
- **软约束**:单条控制在一两句话,**不记日常缺陷修复、单测/验收明细或逐条提交流水**(这些留在规划回执与频道历史);近期保留约 15–20 条以内。
|
|
36
|
+
- **硬约束**:超过保留规模或「改过什么」明显膨胀时,先将较早条目按日期归档到 `artifacts/变更归档-<日期>.md` 并在标准文档末尾留一条入口链接,标准文档本身只留现行设计与近期关键决定;禁止为同一主题另开第二份 RFC 或在正文末尾追加流水段落。
|
|
37
|
+
- 摘要里写明标准文档是哪一份。
|
|
38
|
+
|
|
39
|
+
## 摘要
|
|
40
|
+
|
|
41
|
+
摘要是一份**当前状态的简短快照**,不是流水账。刷新摘要就是用 `topic_summary` **整段替换**,**不是往后追加**。
|
|
42
|
+
|
|
43
|
+
- **写什么**:只写**用途(完整目标定位)、入口链接(标准文档、产物、关联主题与目录)、稳定规则,以及真正需要人知道的当前卡点**。
|
|
44
|
+
- **不写什么**:
|
|
45
|
+
- **不写「现在在推进哪些事」**:进行中的事项由规划插件挂载到概览显示(无进行中事项时自动隐藏),不手抄进摘要。
|
|
46
|
+
- **不写「接下来要做什么」**:完整目标由摘要与标准文档的「现行设计」表达,未实现部分当轮登记到规划并用 `dependencies` 标明先后,由规划插件调度推进。
|
|
47
|
+
- **不写逐条进展与验收明细**:历史进展、交付流水和验收明细写进标准文档的「改过什么」或规划回执。
|
|
48
|
+
- **软约束与硬约束**:
|
|
49
|
+
- **软约束**:控制在大约 **10 行或 1500 字**以内。`topic_summary`(`topics.summary_set`)写入超过 1500 字时仍会保存,但会在返回结果里提示过长,由作者把过程挪到 RFC 或规划回执后精简重写。
|
|
50
|
+
- **硬约束**:超过系统配置 `topics.summaryMaxChars`(默认 **3000 字**)时,`topics.summary_set` 在入口直接返回 400 拒绝写入,不截断、不代改写。清理超长存量摘要时,先把原文存进主题的 `artifacts/摘要归档-<日期>.md`,再整段改写为短状态(保留入口链接与当前卡点)。
|
|
51
|
+
- 只要这个主题的目标、稳定规则、关键入口或当前卡点变了,做事的人在同一轮整段替换摘要;接手时发现摘要与现状对不上或已经写成了流水账,先归档并收短再做事。
|
|
52
|
+
- 各主题共用的整理策略统一在本 skill 维护。
|
|
53
|
+
|
|
54
|
+
## 什么时候开子主题与什么时候归档
|
|
55
|
+
|
|
56
|
+
- 先用 `topic_tree` 和 `topic_about` 找已有主题。同一件事的修正、补充和后续工作归原主题。
|
|
57
|
+
- **只有在真有并行的工作要推进时,才开子主题。**子主题下面还可以再开,层数上限在主题说明里。
|
|
58
|
+
- **做完的主题留在原处,摘要写最终状态;不为一条规划、一个占位单独开主题。**规划用 `plan_note` 记在当前主题即可。
|
|
59
|
+
- **新开主题默认挂在已有的主题下面;顶层只放互相无关的大事。**
|
|
60
|
+
- **内容落后就刷新,不要归档**:只有当主题讲的事已被删掉或被新做法取代、但仍有参考价值时,才原地归档(只读,成员不再投递或修改),由接替它的主题通过引用指向它。
|
|
61
|
+
- 父主题承担分派和汇总时,摘要写它协调的范围。各子题的职责和进度可从主题树或已有索引查看。
|
|
62
|
+
|
|
63
|
+
## 主题协作、归属流转与汇报
|
|
64
|
+
|
|
65
|
+
- **优先在当前或归属主题原楼闭环**:接到请求或任务时,先结合当前对话、摘要和 `topic_tree` 确认归属(需要时用 `memory_search` 查历史)。属于当前主题的讨论、补充、执行、请人复核或协作、确认与收尾,一律直接在当前归属主题原楼推进并完成,不把中途协作、复核请求或收尾交单跨发回父主题或其他主题。
|
|
66
|
+
- **归属另一主题时转往对应主题继续**:事项明显属于另一已有主题时,按是否已有规划选择转交方式——
|
|
67
|
+
- 无规划:用 `post_to_topic` 把目标、原话或原楼地址及必要背景发到目标主题,并在当前楼留下指向目标的回执。由同一成员继续时,另起一行点名自己并直接写成交办(目标、下一步、已有结论、文件或消息地址);指定他人时在行首点名;未点名时依次找目标主题默认成员、全局默认成员、能在目标主题接手的发送成员。附原消息转发时也用同一顺序,无人可接会退回。
|
|
68
|
+
- 已有未挂起的 `later` 规划:用 `plan_start({ id, topic })` 交办到目标主题(沿用原 `plan_…` 编号)。
|
|
69
|
+
- 已在 `doing` 的规划换承接主题:用 `plan_set({ id, at })`(同时换跟进成员时可传 `member`),不要对 `doing` 规划再次调用 `plan_start`。规划交办与转派本身会向目标主题投递,并在来源主题由宿主生成回执,无需再用 `post_to_topic` 重复投递。
|
|
70
|
+
- **来源主题只收结果或跨主题协调**:工作从父主题或其他来源主题触发时,仅在两类情况下回流来源主题——需要交回最终结果/结论,或涉及多个主题共享边界、先后依赖而需跨主题协调。日常进展留在各自归属主题,父主题通过 `topic_tree` 与子主题摘要汇总,不在父主题重复同步过程或堆积各子题交单。
|
|
71
|
+
- **跨主题等待用规划 `waiting` 声明**:需要其他成员或机主复核、处理、确认时,直接在工作所属主题的原楼另起一行点名写清事项(机主可从收件箱进入该主题回复),不要为人工排队把请求集中发到父主题。若该工作对应在做的规划,同时用 `plan_set` 声明 `waiting: { on, why }`:声明后原规划立即在「在做」显示等谁和等什么(普通等待);持续等待达到停滞条件时才进入「需关注」(`#plans/attention`)并触发提醒。对方在原楼回复,或主动传 `waiting: null` 恢复推进时结束等待。
|
|
72
|
+
- **重合主题合并与位置调整**:新开的主题与已有工作高度重合时,发一张审批卡让机主在「归档并转过去」「保留,挂到目标下面」「保留原样」三者中选,等他作答后由宿主执行。相关工作有独立交付且归属明确时,用 `topic_update` 把主题移到合适父级(宿主会发提醒并留下可撤销流水);父级尚不明确时保留当前位置。
|
|
73
|
+
|
|
74
|
+
## 归档和引用
|
|
75
|
+
|
|
76
|
+
- 合并归档用 `host_invoke` 提交 `title`、`why` 和 `options`。写明源题、目标题、未尽事项和随源归档的活跃后代。确认目标活跃且在源子树之外。三个选项各有 `label`、可选的 `detail` 和按顺序执行的 `steps`。
|
|
77
|
+
- 「归档并转过去」先用 `channel.relay`(`topicId` 为目标,`outsideSource: true`,`content` 写交接和原楼地址),再用 `topics.ref_add`(`id` 为目标,`topicId` 为源),最后用 `topics.archive`(`id` 为源)。给这个选项填 `open: "#chat-目标编号"`。
|
|
78
|
+
- 「保留,挂到目标下面」只有一步 `topics.update`(`id` 为源,`parentId` 为目标)。「保留原样」填 `steps: []`。
|
|
79
|
+
- 每步写 `{ name, args }`。批准后的实际结果会按步写回原卡,失败就停止。检查已完成项后再处理剩余步骤。
|
|
80
|
+
|
|
81
|
+
- 调研引出独立的实施工作时,实施主题引用调研主题作为来源,原主题可以继续研究。
|
|
82
|
+
- 主题讲的事已被取代或取消、但历史仍有参考价值时,用 `host_invoke` 调 `topics.archive`,带上主题 `id`。归档保留原树位置,主题和同批归档的后代停止执行。`topic_tree` 的「已归档」区块列出它们的原路径,`topic_about` 仍可读取。恢复用 `topics.unarchive`,从仍归档的上级开始。归档及取消归档都可用流水编号撤销。
|
|
83
|
+
- 要把另一个主题作为当前工作的依据,用 `host_invoke` 调 `topics.ref_add`,填目标的 `topicId`,可以附备注。在 `topic_create` 或 `topic_update` 中用 `topicRefs` 设置引用名单。`topics.ref_remove` 按 `topicId` 去掉单条引用。引用可以指向归档主题,新一轮会带上它的摘要。
|
|
84
|
+
- 目录引用通过 `refs` 或 `topics.ref_add` 的 `path` 声明,并沿主题树继承。主题引用只供声明它的主题使用,正向和反向关系都能在概览和 `topic_about` 查到。
|
|
85
|
+
- 归档保留消息、文件、原路径及引用。满三个月可由机主人工复查。整理主题 `tmp/` 前,查摘要和产物登记,保留被引用的日志、仍在用的资料和待合工作区。宿主的自动清理只回收它登记的临时数据。
|
|
86
|
+
|
|
87
|
+
## 整理主题树
|
|
88
|
+
|
|
89
|
+
1. 用 `topic_about` 看这个主题,`topic_tree` 看整棵树。
|
|
90
|
+
2. 从一句话新开的主题在顶层。弄清要做什么后,用 `topic_update` 起一个说得清这件事的标题,放到合适的主题下面。没有合适的就留在顶层。拿不准放哪,先不动,在回复里问一句。
|
|
91
|
+
3. 放错了地方就挪。用标签说明主题类别(比如 `rfc`)。要移入垃圾桶,用 `host_invoke` 调 `topics.remove`。撤销用 `topics.log` 查流水编号,再调 `topics.undo`。改、挪、删或撤销本主题及其后代可直接执行,范围外带 `why` 提请审批。
|
|
92
|
+
4. 主题自己的东西(摘要、RFC、文档、笔记)一律放主题 `artifacts/`,文本可用 `host_invoke` 调 `works.write` 写入,其中的文件自动列为产物。改项目直接在引用目录里改,git 提交会自动认领到主题名下。其他工具生成的原件、链接和结论用 `works.add` 登记位置。更新过时的产物说明。
|
|
93
|
+
5. 延后的事,以及机主在对话中提出、当轮接下的代码、界面、配置或文档改动,用 `plan_note` 带原消息编号登记(当轮开工可传 `state: 'doing'`,承接主题默认当前主题)。跨主题交办、转派与等待声明按「主题协作、归属流转与汇报」执行。收尾时,合入或上线验收的用 `plan_set` 将原条目标 `done`,`where` 指向回执;暂缓或等前置时暂挂并记条件,退出本轮工作就改回 `later`;决定放弃用 `dropped` 写明原因。
|
|
94
|
+
6. 最后在回复里用两三句话说你改了什么。需要其他成员接手或复核、或需要人决定方向时,才在行首 @ 对方。
|
|
95
|
+
|
|
96
|
+
## 垃圾桶
|
|
97
|
+
|
|
98
|
+
- 人可以从左栏固定底部打开 [垃圾桶](#trash),预览最近消息、恢复或清理。成员可以用 `topics.trash` 列出主题,用 `topics.restore` 带 `why` 提请恢复。原位置不可用时,主题和同批恢复的后代回到顶层。
|
|
99
|
+
- 默认保留 30 天,由 `topics.trashKeepDays` 设置。彻底删除和清空由机主在垃圾桶页确认。
|
|
100
|
+
|
|
101
|
+
## 主题呈现与阅读视图
|
|
102
|
+
|
|
103
|
+
- 可以在主题目录写声明式 PDL `view.json`,由 `data` 引用 `data/*.json`。用 `topic_update` 设置 `view: { main: "topic:local", panel: "chat" }` 可固定为主视图。控制台会热刷新,校验失败的详情可在宿主日志中查看。
|
|
104
|
+
- 主题的 `artifacts/` 里有可读资料(文章、PDF、表格等)而人在读或要讨论时,用 `ask_choice` 提议一次把文件切到主窗口。人确认或明确要求打开时,用 `topic_update` 设置 `view: { main: "files", panel: "chat", args: { dir: "0:artifacts" } }`(也可指定其他子目录):主栏直接用标准文件目录树并打开首份文件,对话在右栏,之后切回主题或刷新都从这里进入。普通切页签不写这个默认。
|
|
105
|
+
|
|
106
|
+
## 回看一件事是怎么演变的
|
|
107
|
+
|
|
108
|
+
按这个顺序,够了就停:`topic_tree` → `topic_about`(摘要)→ 标准文档的“改过什么”→ 顺着里面的地址用 `message_get` 读原话。要找没被记下的讨论,用 `memory_search`,或在主题目录的 `channel.jsonl` 里 grep(文件很大,不要整份读)。
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"views": {
|
|
3
|
+
"hl.works.overview": {
|
|
4
|
+
"vm": "plugin:works/hlWorksOverview",
|
|
5
|
+
"bare": true,
|
|
6
|
+
"blocks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "component",
|
|
9
|
+
"use": "labelSearch",
|
|
10
|
+
"props": "$.search",
|
|
11
|
+
"when": "$.hasItems"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"type": "empty",
|
|
15
|
+
"text": "t:wsWorks.noMatches",
|
|
16
|
+
"when": "$.noMatches"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"type": "each",
|
|
20
|
+
"from": "$.sections",
|
|
21
|
+
"itemKey": "@id",
|
|
22
|
+
"blocks": [
|
|
23
|
+
{
|
|
24
|
+
"type": "disclosure",
|
|
25
|
+
"key": "@foldKey",
|
|
26
|
+
"title": "@title",
|
|
27
|
+
"count": "@count",
|
|
28
|
+
"open": "@open",
|
|
29
|
+
"blocks": [
|
|
30
|
+
{
|
|
31
|
+
"type": "list",
|
|
32
|
+
"id": "@id",
|
|
33
|
+
"from": "@rows",
|
|
34
|
+
"pagination": {
|
|
35
|
+
"resetOn": "$.query"
|
|
36
|
+
},
|
|
37
|
+
"row": {
|
|
38
|
+
"layout": "two",
|
|
39
|
+
"key": "@id",
|
|
40
|
+
"title": "@title",
|
|
41
|
+
"sub": "@sub",
|
|
42
|
+
"act": "plugin:works/hlWorkOpen",
|
|
43
|
+
"args": {
|
|
44
|
+
"id": "@id"
|
|
45
|
+
},
|
|
46
|
+
"cols": [
|
|
47
|
+
{
|
|
48
|
+
"control": {
|
|
49
|
+
"type": "button",
|
|
50
|
+
"iconOnly": true,
|
|
51
|
+
"icon": "bookmark",
|
|
52
|
+
"label": "@retainLabel",
|
|
53
|
+
"act": "plugin:works/hlWorkRetain",
|
|
54
|
+
"args": {
|
|
55
|
+
"id": "@id"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"w": "ctl",
|
|
59
|
+
"when": "@canRetain"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"control": {
|
|
63
|
+
"type": "button",
|
|
64
|
+
"iconOnly": true,
|
|
65
|
+
"icon": "close",
|
|
66
|
+
"label": "t:wsWorks.remove",
|
|
67
|
+
"act": "plugin:works/hlWorkRemove",
|
|
68
|
+
"args": {
|
|
69
|
+
"id": "@id"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"w": "ctl",
|
|
73
|
+
"when": "@canRemove"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"inserts": [
|
|
86
|
+
{
|
|
87
|
+
"id": "overview",
|
|
88
|
+
"anchor": "overview.sections",
|
|
89
|
+
"at": "inside",
|
|
90
|
+
"node": {
|
|
91
|
+
"type": "box",
|
|
92
|
+
"blocks": [
|
|
93
|
+
{
|
|
94
|
+
"type": "view",
|
|
95
|
+
"id": "hl.works.overview"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"ns": "wsWorks",
|
|
102
|
+
"i18n": {
|
|
103
|
+
"zh": {
|
|
104
|
+
"works": "产物",
|
|
105
|
+
"materials": "素材",
|
|
106
|
+
"shared": "共享素材",
|
|
107
|
+
"remove": "从这里移除",
|
|
108
|
+
"search": "按名称或路径搜索产物和素材",
|
|
109
|
+
"noMatches": "没有匹配的产物或素材。"
|
|
110
|
+
},
|
|
111
|
+
"en": {
|
|
112
|
+
"works": "Works",
|
|
113
|
+
"materials": "Materials",
|
|
114
|
+
"shared": "Shared materials",
|
|
115
|
+
"remove": "Remove from here",
|
|
116
|
+
"search": "Search works and materials by name or path",
|
|
117
|
+
"noMatches": "No matching works or materials."
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export default function (ui) {
|
|
2
|
+
const models = {}, actions = {};
|
|
3
|
+
const t = ui.t;
|
|
4
|
+
const state = { topicId: '', items: null, dirty: true, seq: 0 };
|
|
5
|
+
|
|
6
|
+
function load(topicId) {
|
|
7
|
+
if (!topicId) return;
|
|
8
|
+
if (state.topicId !== topicId) state.items = null;
|
|
9
|
+
state.topicId = topicId;
|
|
10
|
+
state.dirty = false;
|
|
11
|
+
const seq = ++state.seq;
|
|
12
|
+
ui.request('GET', '/api/topics/' + encodeURIComponent(topicId) + '/works').then(function (items) {
|
|
13
|
+
if (seq !== state.seq || HL.topic?.id !== topicId) return;
|
|
14
|
+
state.items = items;
|
|
15
|
+
render(true);
|
|
16
|
+
}, ui.fail);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function markDirty() {
|
|
20
|
+
state.dirty = true;
|
|
21
|
+
if (HL.topic && ui.shown('overview')) load(HL.topic.id);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
models.hlWorksOverview = function () {
|
|
25
|
+
const topic = HL.topic && hlTopic(HL.topic.id);
|
|
26
|
+
if (!topic) return {};
|
|
27
|
+
if (state.topicId !== topic.id || (state.dirty && ui.shown('overview'))) {
|
|
28
|
+
load(topic.id);
|
|
29
|
+
}
|
|
30
|
+
if (!state.items) return {};
|
|
31
|
+
const searchKey = 'works-overview-' + topic.id;
|
|
32
|
+
const query = labelSearchValue(searchKey, { defaultScope: false }).q.trim().toLowerCase();
|
|
33
|
+
const items = query ? state.items.filter(w => [w.title, w.path, w.url].some(value => value?.toLowerCase().includes(query))) : state.items;
|
|
34
|
+
const archived = topic.archivedAt != null;
|
|
35
|
+
const mapRow = function (w) {
|
|
36
|
+
const sub = [w.sub, w.retention?.protected && tc('hl.files.retained')].filter(Boolean).join(' · ');
|
|
37
|
+
return { id: w.id, title: w.title, sub, canRemove: !w.from && !archived,
|
|
38
|
+
canRetain: !!w.retention && !archived, retainLabel: tc(w.retention?.retained ? 'hl.files.unretain' : 'hl.files.retain') };
|
|
39
|
+
};
|
|
40
|
+
function section(name, works) {
|
|
41
|
+
const id = searchKey + '-' + name;
|
|
42
|
+
return { id, title: t(name), count: works.length, rows: works.map(mapRow),
|
|
43
|
+
foldKey: query ? id + '-results' : id, open: !!query && works.length > 0 };
|
|
44
|
+
}
|
|
45
|
+
const own = items.filter(w => !w.from);
|
|
46
|
+
const current = own.filter(w => w.current).sort((a, b) => Number(b.pinned) - Number(a.pinned));
|
|
47
|
+
return {
|
|
48
|
+
query, hasItems: state.items.length > 0, noMatches: !!query && !items.length,
|
|
49
|
+
search: { key: searchKey, scope: false, placeholder: t('search') },
|
|
50
|
+
sections: [section('works', current), section('materials', own.filter(w => !w.current)),
|
|
51
|
+
section('shared', items.filter(w => w.from))],
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
actions.hlWorkOpen = function (d) {
|
|
56
|
+
const item = Array.isArray(state.items) && state.items.find(function (w) { return w.id === d.id; });
|
|
57
|
+
const o = item && item.open;
|
|
58
|
+
if (!o || !o.url) return;
|
|
59
|
+
if (o.frame) return hlWorkbenchShow(o.url, item.title, o.frame);
|
|
60
|
+
if (/^(https?:\/\/|\/p\/)/i.test(o.url)) return hlOpenWebLink(o.url);
|
|
61
|
+
return hlOpen(o.url);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
actions.hlWorkRemove = function (d) {
|
|
65
|
+
const topicId = HL.topic?.id;
|
|
66
|
+
if (!topicId || !d.id) return;
|
|
67
|
+
return ui.request('DELETE', '/api/topics/' + encodeURIComponent(topicId) + '/works/' + encodeURIComponent(d.id))
|
|
68
|
+
.then(function () { load(topicId); }, ui.fail);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
actions.hlWorkRetain = function (d) {
|
|
72
|
+
const topicId = HL.topic?.id;
|
|
73
|
+
const item = state.topicId === topicId && state.items?.find((work) => work.id === d.id);
|
|
74
|
+
if (!item?.retention) return;
|
|
75
|
+
return ui.request('PUT', '/api/topics/' + encodeURIComponent(topicId) + '/files/retention',
|
|
76
|
+
{ resource: item.resource, on: !item.retention.retained }).catch(ui.fail);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
models, actions,
|
|
81
|
+
events: {
|
|
82
|
+
'resource.changed': markDirty,
|
|
83
|
+
'works.viewers': markDirty,
|
|
84
|
+
'topic.updated': markDirty,
|
|
85
|
+
},
|
|
86
|
+
update() {
|
|
87
|
+
const id = HL.topic?.id || '';
|
|
88
|
+
if (id && ui.shown('overview') && (state.topicId !== id || state.dirty)) load(id);
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare const documentWords: {
|
|
2
|
+
zh: {
|
|
3
|
+
mode: string;
|
|
4
|
+
read: string;
|
|
5
|
+
edit: string;
|
|
6
|
+
more: string;
|
|
7
|
+
reload: string;
|
|
8
|
+
revealMac: string;
|
|
9
|
+
revealOther: string;
|
|
10
|
+
save: string;
|
|
11
|
+
discard: string;
|
|
12
|
+
confirmDiscard: string;
|
|
13
|
+
sourceText: string;
|
|
14
|
+
wordHint: string;
|
|
15
|
+
bodyParagraph: string;
|
|
16
|
+
tableParagraph: string;
|
|
17
|
+
unsaved: string;
|
|
18
|
+
inMemory: string;
|
|
19
|
+
updated: string;
|
|
20
|
+
conflict: string;
|
|
21
|
+
editError: string;
|
|
22
|
+
saveError: string;
|
|
23
|
+
revealError: string;
|
|
24
|
+
reloadError: string;
|
|
25
|
+
};
|
|
26
|
+
en: {
|
|
27
|
+
mode: string;
|
|
28
|
+
read: string;
|
|
29
|
+
edit: string;
|
|
30
|
+
more: string;
|
|
31
|
+
reload: string;
|
|
32
|
+
revealMac: string;
|
|
33
|
+
revealOther: string;
|
|
34
|
+
save: string;
|
|
35
|
+
discard: string;
|
|
36
|
+
confirmDiscard: string;
|
|
37
|
+
sourceText: string;
|
|
38
|
+
wordHint: string;
|
|
39
|
+
bodyParagraph: string;
|
|
40
|
+
tableParagraph: string;
|
|
41
|
+
unsaved: string;
|
|
42
|
+
inMemory: string;
|
|
43
|
+
updated: string;
|
|
44
|
+
conflict: string;
|
|
45
|
+
editError: string;
|
|
46
|
+
saveError: string;
|
|
47
|
+
revealError: string;
|
|
48
|
+
reloadError: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export const documentWords = {
|
|
2
|
+
zh: {
|
|
3
|
+
mode: '文件模式', read: '阅读', edit: '编辑', more: '更多', reload: '重新读取',
|
|
4
|
+
revealMac: '在 Finder 中显示', revealOther: '在文件管理器中显示', save: '保存',
|
|
5
|
+
discard: '放弃草稿', confirmDiscard: '放弃这份未保存的草稿?',
|
|
6
|
+
sourceText: '源文本', wordHint: '逐段编辑正文和表格中的文字',
|
|
7
|
+
bodyParagraph: '正文第 {0} 段', tableParagraph: '表格第 {0} 段',
|
|
8
|
+
unsaved: '有未保存的修改',
|
|
9
|
+
inMemory: '草稿已保留在此控制台。请保存后再关闭页面。',
|
|
10
|
+
updated: '原件有更新。保存前会核对版本,草稿仍保留。',
|
|
11
|
+
conflict: '原件已更新,草稿仍保留。可先复制草稿,再放弃旧草稿并重新编辑。',
|
|
12
|
+
editError: '无法打开编辑器。{0}', saveError: '保存失败。{0}', revealError: '无法定位原件。{0}', reloadError: '重新读取失败。{0}',
|
|
13
|
+
},
|
|
14
|
+
en: {
|
|
15
|
+
mode: 'File mode', read: 'Read', edit: 'Edit', more: 'More', reload: 'Reload',
|
|
16
|
+
revealMac: 'Reveal in Finder', revealOther: 'Open in file manager', save: 'Save',
|
|
17
|
+
discard: 'Discard draft', confirmDiscard: 'Discard this unsaved draft?',
|
|
18
|
+
sourceText: 'Source text', wordHint: 'Edit text in body paragraphs and table cells.',
|
|
19
|
+
bodyParagraph: 'Body paragraph {0}', tableParagraph: 'Table paragraph {0}',
|
|
20
|
+
unsaved: 'Unsaved changes',
|
|
21
|
+
inMemory: 'This console is holding your draft. Save it before closing the page.',
|
|
22
|
+
updated: 'The original changed. Your draft is intact. Saving will check the version.',
|
|
23
|
+
conflict: 'The original changed. Your draft is intact. Copy your changes before discarding the draft and starting again.',
|
|
24
|
+
editError: 'Could not open the editor. {0}', saveError: 'Could not save the file. {0}',
|
|
25
|
+
revealError: 'Could not reveal the file. {0}', reloadError: 'Could not reload the file. {0}',
|
|
26
|
+
},
|
|
27
|
+
};
|