pi-web-ui 0.116.0 → 0.118.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +83 -3
- package/README.md +69 -138
- package/README.zh-CN.md +70 -179
- package/README.zh-TW.md +3 -1
- package/bin/device-hub-cli.mjs +163 -36
- package/bin/frp-manager.mjs +4 -80
- package/bin/hub-upgrade.mjs +561 -0
- package/bin/pi-device-hub.mjs +0 -1
- package/bin/pi-web-ui.mjs +184 -504
- package/deploy/nginx-subpath.conf +0 -33
- package/deploy/pi-web-ui.service +0 -20
- package/dist/server/agent-formatters.js +4 -38
- package/dist/server/agent-service-daemon.js +203 -371
- package/dist/server/agent-service.js +1281 -3030
- package/dist/server/approval-audit.js +2 -23
- package/dist/server/approval-default-rules.js +0 -6
- package/dist/server/approval-rules.js +7 -105
- package/dist/server/ask-user-question-tool.js +1 -12
- package/dist/server/atomic-file.js +33 -5
- package/dist/server/attachment-store.js +0 -36
- package/dist/server/attachments.js +3 -112
- package/dist/server/auth-cookie.js +0 -21
- package/dist/server/bash-tool.js +1 -32
- package/dist/server/bg-servers.js +0 -96
- package/dist/server/browser-page-tool.js +11 -62
- package/dist/server/builtin-modules.js +7 -0
- package/dist/server/canvas/canvas-agent-tool.js +58 -47
- package/dist/server/canvas/canvas-cards.js +0 -14
- package/dist/server/canvas/canvas-dispatch.js +7 -4
- package/dist/server/canvas/canvas-orchestrator.js +167 -181
- package/dist/server/canvas/canvas-runtime-messages.js +30 -0
- package/dist/server/canvas/canvas-scheduled-task.js +0 -3
- package/dist/server/canvas/canvas-scheduler.js +5 -7
- package/dist/server/canvas/canvas-store.js +24 -35
- package/dist/server/canvas/canvas-validation.js +17 -14
- package/dist/server/canvas/canvas-workspace.js +42 -114
- package/dist/server/canvas/pstack-skills-data.js +0 -5
- package/dist/server/claim-files-tool.js +1 -15
- package/dist/server/claim-store.js +5 -49
- package/dist/server/client-id-utils.js +0 -16
- package/dist/server/client-state.js +36 -214
- package/dist/server/communicate-tool.js +0 -3
- package/dist/server/compact-context-tool.js +0 -30
- package/dist/server/compacted-history.js +0 -35
- package/dist/server/compaction-instructions.js +0 -13
- package/dist/server/compaction-markers.js +38 -92
- package/dist/server/compaction-state.js +0 -21
- package/dist/server/composer-drafts.js +0 -34
- package/dist/server/context-budget-runner.js +0 -11
- package/dist/server/context-budget.js +1 -70
- package/dist/server/context-evidence.js +0 -14
- package/dist/server/context-usage.js +0 -12
- package/dist/server/control-socket.js +4 -48
- package/dist/server/conversation-communication.js +0 -10
- package/dist/server/conversation-identity.js +0 -1
- package/dist/server/conversation-read-tool.js +0 -58
- package/dist/server/conversation-tool-names.js +0 -1
- package/dist/server/conversation-tool.js +0 -1
- package/dist/server/conversation-touches.js +4 -75
- package/dist/server/dangling-tools.js +142 -68
- package/dist/server/delegate-mode.js +0 -36
- package/dist/server/delegate-task.js +2 -28
- package/dist/server/device-center/approval-summary.js +0 -1
- package/dist/server/device-center/bot-catalog.js +0 -3
- package/dist/server/device-center/bot-execution.js +48 -9
- package/dist/server/device-center/bot-presets.js +0 -1
- package/dist/server/device-center/bots.js +0 -1
- package/dist/server/device-center/collab-service.js +27 -11
- package/dist/server/device-center/collab-tool.js +393 -27
- package/dist/server/device-center/connector.js +128 -48
- package/dist/server/device-center/delivery-authority.js +95 -0
- package/dist/server/device-center/delivery-subject.js +29 -0
- package/dist/server/device-center/desktop-linux.js +3 -15
- package/dist/server/device-center/desktop-native.js +1 -10
- package/dist/server/device-center/desktop-page.js +2 -3
- package/dist/server/device-center/desktop-setup.js +1 -3
- package/dist/server/device-center/desktop.js +1 -7
- package/dist/server/device-center/device-integration.js +452 -208
- package/dist/server/device-center/device-lan-access.js +403 -0
- package/dist/server/device-center/device-lan.js +484 -0
- package/dist/server/device-center/device-portals.js +0 -3
- package/dist/server/device-center/execution-failure.js +0 -2
- package/dist/server/device-center/execution-guides.js +15 -6
- package/dist/server/device-center/execution-instructions.js +0 -1
- package/dist/server/device-center/execution-settings.js +0 -1
- package/dist/server/device-center/execution-system-prompt.js +0 -3
- package/dist/server/device-center/execution-workspace.js +1 -4
- package/dist/server/device-center/executor.js +46 -31
- package/dist/server/device-center/file-sync-paths.js +0 -5
- package/dist/server/device-center/file-sync.js +0 -10
- package/dist/server/device-center/group-context-delta.js +0 -8
- package/dist/server/device-center/group-context-message.js +0 -14
- package/dist/server/device-center/group-context.js +0 -19
- package/dist/server/device-center/group-events.js +0 -2
- package/dist/server/device-center/group-plan-guard.js +1 -35
- package/dist/server/device-center/group-router-runtime.js +182 -0
- package/dist/server/device-center/group-router-worker.js +178 -0
- package/dist/server/device-center/group-router.js +359 -0
- package/dist/server/device-center/hub-auth.js +24 -2
- package/dist/server/device-center/hub-conversations.js +13 -15
- package/dist/server/device-center/hub-deliveries.js +119 -15
- package/dist/server/device-center/hub-integration.js +647 -334
- package/dist/server/device-center/hub-locks.js +1 -5
- package/dist/server/device-center/hub-mobile.js +147 -0
- package/dist/server/device-center/hub-orchestration.js +400 -0
- package/dist/server/device-center/hub-page.js +28 -9
- package/dist/server/device-center/hub-setup.js +23 -7
- package/dist/server/device-center/hub-transaction-log.js +175 -0
- package/dist/server/device-center/hub-upgrade.js +162 -0
- package/dist/server/device-center/hub-webhooks.js +1 -3
- package/dist/server/device-center/hub.js +946 -404
- package/dist/server/device-center/human-interaction.js +1 -4
- package/dist/server/device-center/integration-errors.js +0 -2
- package/dist/server/device-center/integration-verification.js +111 -0
- package/dist/server/device-center/local-hub.js +6 -4
- package/dist/server/device-center/local-publication.js +416 -0
- package/dist/server/device-center/local-verification-job.js +95 -0
- package/dist/server/device-center/local-verification.js +273 -0
- package/dist/server/device-center/local.js +341 -18
- package/dist/server/device-center/main.js +18 -2
- package/dist/server/device-center/mobile-notification-forwarder.js +292 -0
- package/dist/server/device-center/native-desktop/macos.js +0 -1
- package/dist/server/device-center/native-desktop/windows.js +0 -1
- package/dist/server/device-center/partition-log.js +52 -46
- package/dist/server/device-center/path-portal.js +42 -12
- package/dist/server/device-center/publication-journal.js +305 -0
- package/dist/server/device-center/publish-intent.js +374 -0
- package/dist/server/device-center/relay.js +217 -52
- package/dist/server/device-center/report-upload.js +0 -1
- package/dist/server/device-center/runtime.js +419 -52
- package/dist/server/device-center/store.js +223 -65
- package/dist/server/device-center/task-context-budget.js +0 -3
- package/dist/server/device-center/task-error.js +0 -1
- package/dist/server/device-center/task-journal.js +6 -23
- package/dist/server/device-center/task-outcome.js +68 -0
- package/dist/server/device-center/task-plan.js +0 -1
- package/dist/server/device-center/task-progress.js +0 -16
- package/dist/server/device-center/task-recovery.js +569 -227
- package/dist/server/device-center/task-report-outbox.js +0 -4
- package/dist/server/device-center/task-report.js +2 -10
- package/dist/server/device-center/task-scheduler.js +1 -35
- package/dist/server/device-center/task-settlement.js +335 -0
- package/dist/server/device-center/task-state.js +0 -12
- package/dist/server/device-center/task-workspace.js +393 -0
- package/dist/server/device-center/transfer-stream.js +5 -45
- package/dist/server/device-center/transfers.js +2 -10
- package/dist/server/device-center/verification-limits.js +9 -0
- package/dist/server/device-center/work-contract.js +923 -0
- package/dist/server/device-center/work-items.js +317 -0
- package/dist/server/device-center/workspaces.js +0 -1
- package/dist/server/dispatch-domain-handlers.js +202 -29
- package/dist/server/dispatch-plugin-handlers.js +2 -19
- package/dist/server/dsh/dsh-agent-service.js +78 -601
- package/dist/server/dsh/dsh-client.js +7 -111
- package/dist/server/dsh/dsh-market-service.js +4 -25
- package/dist/server/dsh/dsh-serialize.js +0 -49
- package/dist/server/dsh/dsh-sessions.js +0 -37
- package/dist/server/dsh/dsh-usage.js +0 -37
- package/dist/server/dsh/preset-clones.js +1 -65
- package/dist/server/dsh/runtime/custom-prompt.mjs +0 -14
- package/dist/server/dsh/runtime/goal-rpc.mjs +7 -176
- package/dist/server/dsh/runtime/launcher.mjs +2 -53
- package/dist/server/dsh/runtime/override.patch.yml +0 -29
- package/dist/server/dsh/runtime/runtime-root.mjs +0 -54
- package/dist/server/durable/durable-agent-service.js +5 -23
- package/dist/server/durable/durable-driver.js +12 -73
- package/dist/server/durable/durable-event-projector.js +1 -50
- package/dist/server/durable/durable-loader.js +0 -12
- package/dist/server/durable/durable-models.js +11 -80
- package/dist/server/durable/durable-storage.js +1 -17
- package/dist/server/durable/durable-tools.js +2 -20
- package/dist/server/durable/index.js +0 -3
- package/dist/server/edit-soft-tool.js +2 -81
- package/dist/server/engine-capabilities.js +0 -13
- package/dist/server/engine-catalog.js +74 -0
- package/dist/server/engine-cli.js +89 -0
- package/dist/server/engine-probe.js +35 -217
- package/dist/server/ensure-bash.js +2 -28
- package/dist/server/eval-tool.js +1 -50
- package/dist/server/evidence-tool-hooks.js +0 -2
- package/dist/server/file-archives.js +0 -10
- package/dist/server/file-save.js +1 -12
- package/dist/server/file-transfer-routes.js +0 -11
- package/dist/server/files-service.js +18 -271
- package/dist/server/global-loader.js +9 -89
- package/dist/server/goal-evidence.js +1 -35
- package/dist/server/goal-review-gate.js +0 -58
- package/dist/server/goal-service.js +19 -422
- package/dist/server/hashline-engine.js +8 -112
- package/dist/server/host-guard.js +0 -24
- package/dist/server/host-metrics.js +0 -6
- package/dist/server/http-proxy.js +1 -7
- package/dist/server/i18n.js +5 -72
- package/dist/server/icon-svg.js +0 -15
- package/dist/server/index.js +199 -677
- package/dist/server/json-utils.js +0 -12
- package/dist/server/launch-origin.js +0 -44
- package/dist/server/left-panel-running.js +0 -9
- package/dist/server/load-timing.js +1 -4
- package/dist/server/load-tools-tool.js +0 -20
- package/dist/server/locales.js +1 -46
- package/dist/server/lsp-tool.js +13 -126
- package/dist/server/managed.js +0 -48
- package/dist/server/marker-service.js +1 -22
- package/dist/server/markers/builtins/action.js +0 -19
- package/dist/server/markers/builtins/notify.js +1 -9
- package/dist/server/markers/builtins/rename.js +0 -13
- package/dist/server/markers/index.js +0 -3
- package/dist/server/markers/marker.js +0 -13
- package/dist/server/markers/registry.js +0 -3
- package/dist/server/markers/store.js +1 -12
- package/dist/server/market-service.js +7 -43
- package/dist/server/mcp-agent-tool.js +0 -10
- package/dist/server/mcp-bridge.js +6 -138
- package/dist/server/mcp-hot-reload.js +0 -25
- package/dist/server/mcp-manager.js +2 -44
- package/dist/server/mcp-oauth-login.js +0 -2
- package/dist/server/mcp-oauth-ui.js +1 -4
- package/dist/server/mcp-oauth.js +5 -79
- package/dist/server/mcp-project-runtime.js +0 -4
- package/dist/server/message-deletion.js +0 -2
- package/dist/server/message-entry-resolver.js +0 -8
- package/dist/server/message-window.js +0 -71
- package/dist/server/mobile-notification-events.js +16 -0
- package/dist/server/mobile-origin.js +79 -0
- package/dist/server/mobile-push.js +523 -0
- package/dist/server/model-admin.js +19 -358
- package/dist/server/model-enrich.js +0 -19
- package/dist/server/model-resolver.js +2 -61
- package/dist/server/native-cli-discovery.js +115 -0
- package/dist/server/native-cli-model.js +71 -0
- package/dist/server/native-cli-references.js +214 -0
- package/dist/server/native-cli-remote-cleanup.js +58 -0
- package/dist/server/native-cli-remote-files.js +282 -0
- package/dist/server/native-cli-routes.js +68 -0
- package/dist/server/native-cli-runtime.js +1 -0
- package/dist/server/native-cli-session-hooks.js +170 -0
- package/dist/server/native-cli-session.js +585 -0
- package/dist/server/native-cli-state.js +82 -0
- package/dist/server/native-cli.js +210 -0
- package/dist/server/net-guard.js +9 -71
- package/dist/server/office-parse.js +0 -50
- package/dist/server/orphan-manager.js +0 -18
- package/dist/server/patch-bash-process.js +0 -4
- package/dist/server/patch-executable-lookup.js +0 -77
- package/dist/server/patch-node-pty.js +6 -45
- package/dist/server/patch-remote-catalog.js +4 -34
- package/dist/server/patch-tool.js +0 -15
- package/dist/server/payload-limits.js +0 -5
- package/dist/server/pending-question.js +0 -5
- package/dist/server/permission-preset.js +4 -33
- package/dist/server/persona-chain.js +0 -26
- package/dist/server/pkg-info.js +1 -17
- package/dist/server/plan-manager.js +2 -49
- package/dist/server/plan-mode.js +0 -97
- package/dist/server/plan-update-tool.js +1 -15
- package/dist/server/plugin-api-catalog.js +6 -4
- package/dist/server/plugin-assets.js +1 -35
- package/dist/server/plugin-bundled.js +68 -0
- package/dist/server/plugin-catalog-sync.js +0 -37
- package/dist/server/plugin-catalog.js +13 -67
- package/dist/server/plugin-chat-attachments.js +0 -1
- package/dist/server/plugin-conversation-view.js +0 -20
- package/dist/server/plugin-dom.js +1 -23
- package/dist/server/plugin-facilities.js +4 -115
- package/dist/server/plugin-grants.js +2 -90
- package/dist/server/plugin-install-spec.js +0 -43
- package/dist/server/plugin-installer.js +34 -75
- package/dist/server/plugin-llm.js +4 -38
- package/dist/server/plugin-manifest-validate.js +0 -31
- package/dist/server/plugin-permissions.js +1 -24
- package/dist/server/plugin-project.js +7 -129
- package/dist/server/plugin-removal.js +1 -8
- package/dist/server/plugin-schedule.js +1 -38
- package/dist/server/plugin-secrets.js +3 -16
- package/dist/server/plugin-tool-guard.js +1 -28
- package/dist/server/plugin-ui-slots.js +0 -4
- package/dist/server/plugin-updater.js +15 -90
- package/dist/server/plugins.js +71 -619
- package/dist/server/present-files-tool.js +0 -57
- package/dist/server/preset-fields.js +24 -61
- package/dist/server/preset-plugin-dependencies.js +0 -2
- package/dist/server/preset-share.js +4 -172
- package/dist/server/process-utils.js +4 -80
- package/dist/server/prompt-assembler.js +2 -30
- package/dist/server/prompt-base-store.js +0 -47
- package/dist/server/prompt-composer.js +21 -98
- package/dist/server/prompt-templates.js +0 -2
- package/dist/server/protocol-version.js +1 -11
- package/dist/server/protocol.js +0 -5
- package/dist/server/queue-modes.js +0 -3
- package/dist/server/queue-utils.js +0 -40
- package/dist/server/quick-ask-context.js +384 -0
- package/dist/server/quick-ask-settings.js +61 -0
- package/dist/server/quick-ask.js +260 -0
- package/dist/server/read-tool.js +0 -65
- package/dist/server/reasoning-registry.js +1 -29
- package/dist/server/remote-cli-persistence.js +373 -0
- package/dist/server/remote-native-cli.js +78 -0
- package/dist/server/remote-ssh-service.js +481 -190
- package/dist/server/request-context.js +0 -9
- package/dist/server/resolve-global-sdk.js +55 -31
- package/dist/server/sandbox-data.js +0 -1
- package/dist/server/sandbox-engines.js +0 -1
- package/dist/server/sandbox-runtime-gate.js +0 -3
- package/dist/server/sandbox-service.js +0 -41
- package/dist/server/sandbox-tool.js +0 -20
- package/dist/server/schedule-agent-tool.js +2 -31
- package/dist/server/scheduler-tasks.js +32 -56
- package/dist/server/scm-commitmsg.js +0 -53
- package/dist/server/scm.js +3 -48
- package/dist/server/sdk-builtin-extensions.js +2 -29
- package/dist/server/sdk-origin.js +0 -45
- package/dist/server/serialize.js +2 -92
- package/dist/server/server-config.js +0 -11
- package/dist/server/session-branch.js +1 -87
- package/dist/server/session-list-scan.js +215 -0
- package/dist/server/session-open.js +69 -0
- package/dist/server/session-parser.js +4 -54
- package/dist/server/session-scan.js +81 -45
- package/dist/server/session-search.js +0 -56
- package/dist/server/settings-service.js +19 -126
- package/dist/server/setup-config.js +0 -2
- package/dist/server/setup-page.js +0 -9
- package/dist/server/skill-content-filler.js +0 -17
- package/dist/server/skill-discovery.js +5 -92
- package/dist/server/skill-maintenance.js +1 -28
- package/dist/server/skill-tool.js +0 -30
- package/dist/server/slash-commands.js +5 -50
- package/dist/server/soft-cap.js +3 -40
- package/dist/server/startup-banner.js +0 -8
- package/dist/server/subagent-handoff.js +0 -11
- package/dist/server/subagent-helpers.js +2 -17
- package/dist/server/subagent-notify.js +0 -19
- package/dist/server/subagent-security-gate.js +0 -50
- package/dist/server/subagent-task.js +0 -9
- package/dist/server/subagent-templates-hant.js +0 -10
- package/dist/server/subagent-templates.js +3 -103
- package/dist/server/subagents.js +1 -87
- package/dist/server/system-screenshot-windows.js +259 -0
- package/dist/server/system-screenshot.js +77 -0
- package/dist/server/tabs.js +3 -48
- package/dist/server/terminals.js +559 -586
- package/dist/server/text-quote.js +0 -12
- package/dist/server/text-sniff.js +2 -52
- package/dist/server/themes.js +2 -41
- package/dist/server/tool-approval.js +0 -47
- package/dist/server/tool-guards.js +0 -90
- package/dist/server/tool-host-factories.js +1 -16
- package/dist/server/tool-info.js +0 -13
- package/dist/server/tool-manager.js +1 -229
- package/dist/server/tool-overrides.js +1 -46
- package/dist/server/tool-prompt-overrides.js +1 -30
- package/dist/server/tool-prompts.js +0 -14
- package/dist/server/tool-signature.js +0 -25
- package/dist/server/transcript-prepare.js +55 -0
- package/dist/server/tts-routes.js +58 -0
- package/dist/server/tts-service.js +106 -0
- package/dist/server/tts-system.js +160 -0
- package/dist/server/turn-timing.js +0 -1
- package/dist/server/unauthorized-page.js +0 -8
- package/dist/server/universal/driver-base.js +2 -31
- package/dist/server/universal/drivers/claude-code.js +98 -194
- package/dist/server/universal/drivers/codex.js +12 -35
- package/dist/server/universal/drivers/mock-driver.js +1 -11
- package/dist/server/universal/index.js +0 -3
- package/dist/server/universal/session-store.js +4 -21
- package/dist/server/universal/universal-attachments.js +2 -36
- package/dist/server/universal/universal-service.js +5 -24
- package/dist/server/universal/universal-session.js +30 -148
- package/dist/server/universal/universal-types.js +0 -3
- package/dist/server/update-check.js +6 -182
- package/dist/server/uploads.js +4 -43
- package/dist/server/virtual-tui.js +2 -27
- package/dist/server/vision-bridge.js +0 -27
- package/dist/server/wait-subscription-scan.js +13 -115
- package/dist/server/webui-context.js +2 -87
- package/dist/server/workspace-handle.js +373 -0
- package/dist/server/workspace-snapshot.js +7 -113
- package/dist/server/worktree-service.js +2 -53
- package/dist/server/worktree-tool.js +0 -11
- package/dist/server/ws-client-id.js +0 -18
- package/dist/server/ws-pending-queue.js +0 -7
- package/dist/server/ws-unknown-types.js +0 -17
- package/docs/README.md +24 -17
- package/docs/architecture-plugins.md +55 -6
- package/docs/device-center.md +57 -23
- package/docs/device-desktop.md +3 -3
- package/docs/group-orchestration.md +142 -0
- package/docs/hub-upgrade-release-testing.md +46 -0
- package/extensions/webui.ts +3 -74
- package/package.json +9 -6
- package/plugin-sdk/README.md +22 -8
- package/plugin-sdk/client-utils.mjs +0 -7
- package/plugin-sdk/client.d.ts +26 -0
- package/plugin-sdk/client.mjs +52 -0
- package/plugin-sdk/import-check.mjs +4 -51
- package/plugin-sdk/index.d.ts +128 -117
- package/plugin-sdk/index.mjs +2 -687
- package/plugin-sdk/package.json +15 -4
- package/plugin-sdk/ssh-host-trust.mjs +0 -12
- package/plugin-sdk/testing.d.ts +9 -0
- package/plugin-sdk/testing.mjs +511 -0
- package/plugins/catalog.json +52 -4
- package/plugins/superagent/README.md +110 -0
- package/plugins/superagent/client/entry.mjs +21 -0
- package/plugins/superagent/index.mjs +8 -0
- package/plugins/superagent/main.mjs +218 -0
- package/plugins/superagent/manifest.json +15 -0
- package/plugins/superagent/server.mjs +572 -0
- package/plugins/superagent/style.css +167 -0
- package/themes/aetheris.css +1 -31
- package/themes/ayu-light.css +0 -1
- package/themes/bases/flow-base.css +2 -83
- package/themes/bases/obsidian-base.css +2 -37
- package/themes/bases/statusbar-flat-base.css +0 -1
- package/themes/bases/zhujian-base.css +0 -63
- package/themes/bases/zhupi-base.css +0 -64
- package/themes/catppuccin-latte.css +0 -1
- package/themes/catppuccin.css +0 -1
- package/themes/claude-code-dark.css +0 -1
- package/themes/codex.css +0 -1
- package/themes/dark-teal.css +22 -54
- package/themes/everforest-light.css +0 -1
- package/themes/flow-cristallo.css +160 -0
- package/themes/flow-ink.css +160 -0
- package/themes/flow-light.css +1 -10
- package/themes/flow-obsidian.css +160 -0
- package/themes/flow-zurich.css +160 -0
- package/themes/flow.css +1 -9
- package/themes/geist.css +0 -1
- package/themes/gruvbox-light.css +0 -1
- package/themes/kanagawa-lotus.css +0 -1
- package/themes/md-preview.css +1 -2
- package/themes/mist.css +0 -1
- package/themes/nord.css +0 -1
- package/themes/one-dark.css +0 -1
- package/themes/paper.css +0 -1
- package/themes/rose-pine-dawn.css +0 -1
- package/themes/sakura.css +0 -1
- package/themes/solarized-light.css +0 -1
- package/themes/tokyo-night.css +0 -1
- package/themes/translucent.css +4 -35
- package/themes/transparent.css +4 -41
- package/themes/vs-code-dark.css +0 -1
- package/themes/wallpaper-flow.css +3 -17
- package/themes/wallpaper-obsidian.css +1 -4
- package/themes/white.css +0 -1
- package/web/dist/.build-assets.json +1 -1
- package/web/dist/assets/{BgTasksModal-BDoOpj-F.js → BgTasksModal-D-x7kA63.js} +1 -1
- package/web/dist/assets/CanvasStudio-CAWcs9tm.js +1579 -0
- package/web/dist/assets/DeviceCenter-Dc0whRcu.js +3 -0
- package/web/dist/assets/DeviceExecutionSettings-BoX7-0h7.js +1 -0
- package/web/dist/assets/DeviceGroups-C_fZMNeK.js +1 -0
- package/web/dist/assets/{Dropdown-C4LIhshN.js → Dropdown-CTgVLUbp.js} +1 -1
- package/web/dist/assets/FilePreview-C6W0PvaK.js +2 -0
- package/web/dist/assets/GlobalSearchModal-HR9LSspC.js +1 -0
- package/web/dist/assets/GroupConversation-C81YjF2C.js +61 -0
- package/web/dist/assets/GroupWorkItems-BIvZtr10.js +1 -0
- package/web/dist/assets/{HintTip-c6d0TJoh.js → HintTip-Da6qc566.js} +1 -1
- package/web/dist/assets/ModelConfigModal-DhSyuIuV.js +2 -0
- package/web/dist/assets/NativeCliPanel-CU1rZmyu.js +5 -0
- package/web/dist/assets/{PiSetupModal-BmMrrgB9.js → PiSetupModal-DZKY5Wiw.js} +1 -1
- package/web/dist/assets/ProviderOAuthControls-CIL85nA7.js +1 -0
- package/web/dist/assets/SCMPanel-CuEgzAlO.js +2 -0
- package/web/dist/assets/SettingsModal-Cdu5h29p.js +33 -0
- package/web/dist/assets/TermXterm-Bt5WKAxP.js +3 -0
- package/web/dist/assets/TerminalPanel-BCIBV8se.js +1 -0
- package/web/dist/assets/TuiOverlayModal-3NDd9T97.js +1 -0
- package/web/dist/assets/app-globals-CZjFtI4F.js +129 -0
- package/web/dist/assets/canvas-client-WkhM55mR.js +1 -0
- package/web/dist/assets/composer-bridge-CImnjDHq.js +1 -0
- package/web/dist/assets/desktop-B8NZ3KW-.js +1 -0
- package/web/dist/assets/index-CQc3VrWa.css +1 -0
- package/web/dist/assets/index-D_AGu4Zv.js +404 -0
- package/web/dist/assets/plugin-host-uqZGpvCs.js +1 -0
- package/web/dist/assets/{remote-ssh-client-CfYSMEZg.js → remote-ssh-client-Cdf-cTUe.js} +1 -1
- package/web/dist/assets/theme-DGL7hLUs.js +1 -0
- package/web/dist/index.html +12 -11
- package/web/dist/sw.js +15 -61
- package/web/public/sw.js +14 -60
- package/dist/gh-comment-781.md +0 -5
- package/dist/server/device-center/local-page.js +0 -17
- package/dist/server/device-center/smoke-preview.js +0 -3
- package/dist/server/durable/durable-capabilities.js +0 -11
- package/dist/server/markers/builtins/services.js +0 -123
- package/dist/server/markers/builtins/todo.js +0 -189
- package/dist/server/markers-list-tool.js +0 -34
- package/dist/server/orchestrator.js +0 -109
- package/dist/server/patch-turn-end-boundary.js +0 -77
- package/dist/server/system-prompt-soul.js +0 -41
- package/dist/server/univer-service.js +0 -448
- package/dist/server/universal/drivers/dsh-driver.js +0 -379
- package/dist/test-artifact.md +0 -9
- package/dist/test-preview-modal.md +0 -11
- package/dist/test-report.html +0 -20
- package/web/dist/assets/BgTasksModal-C0i3O1FT.js +0 -1
- package/web/dist/assets/CanvasStudio-B8thymBN.js +0 -1579
- package/web/dist/assets/CanvasStudio-zSxyIx1R.js +0 -1579
- package/web/dist/assets/DeviceCenter-DfAHKcid.js +0 -3
- package/web/dist/assets/DeviceCenter-ydvOTlzE.js +0 -3
- package/web/dist/assets/DeviceExecutionSettings-q5Ik8oXg.js +0 -1
- package/web/dist/assets/DeviceGroups-CI14_SRb.js +0 -1
- package/web/dist/assets/DeviceGroups-DvsB5IEU.js +0 -1
- package/web/dist/assets/FilePreview-BgGongmv.js +0 -2
- package/web/dist/assets/FilePreview-D4NrhF-U.js +0 -2
- package/web/dist/assets/GlobalSearchModal-BWgU8yPd.js +0 -1
- package/web/dist/assets/GlobalSearchModal-F7fNimKk.js +0 -1
- package/web/dist/assets/GroupConversation-Dh71Pdb-.js +0 -17
- package/web/dist/assets/GroupConversation-ZK3nRmNm.js +0 -17
- package/web/dist/assets/ModelConfigModal-YVEgyy34.js +0 -2
- package/web/dist/assets/ModelConfigModal-vWtg3srp.js +0 -2
- package/web/dist/assets/ProviderOAuthControls-BGSBIKD7.js +0 -1
- package/web/dist/assets/SCMPanel-B8_EDxNr.js +0 -2
- package/web/dist/assets/SCMPanel-BU58qk3T.js +0 -2
- package/web/dist/assets/SettingsModal-CMUybq3J.js +0 -32
- package/web/dist/assets/SettingsModal-OBmGTh-5.js +0 -32
- package/web/dist/assets/TerminalPanel-0CYvD72B.js +0 -3
- package/web/dist/assets/TerminalPanel-DDavKvFr.js +0 -3
- package/web/dist/assets/TuiOverlayModal-BsA-QTvN.js +0 -1
- package/web/dist/assets/TuiOverlayModal-DzoVQBuG.js +0 -1
- package/web/dist/assets/app-globals-CZxzGvIo.js +0 -123
- package/web/dist/assets/canvas-client-CUnXlQYX.js +0 -1
- package/web/dist/assets/desktop-aAKpvKJV.js +0 -1
- package/web/dist/assets/index-C6DwztqE.css +0 -1
- package/web/dist/assets/index-CuN802Sj.js +0 -93
- package/web/dist/assets/index-EH5Fw9fa.js +0 -93
- package/web/dist/assets/plugin-host-BRWib9DF.js +0 -1
- package/web/dist/assets/theme-D2l_mLNo.js +0 -1
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* builtins/rename.ts — 重命名当前对话标记。
|
|
3
|
-
*
|
|
4
|
-
* 需求:加个重命名当前对话 marker。
|
|
5
|
-
*
|
|
6
|
-
* 语法(唯一写法):
|
|
7
|
-
* [[conv:rename:<新标题>]] 重命名当前对话
|
|
8
|
-
*
|
|
9
|
-
* 持久化:通过宿主回调直接改对话标题(内存 + 磁盘 transcript session_info),
|
|
10
|
-
* 不需要额外状态。
|
|
11
|
-
*/
|
|
12
1
|
import { getServerBlock, pick } from "../../i18n.js";
|
|
13
2
|
function extractTitle(token) {
|
|
14
|
-
// args[0] 是主标题;kwargs 兼容 text/name/title
|
|
15
3
|
const fromArgs = token.args.join(" ").trim();
|
|
16
4
|
const fromKw = (token.kwargs["text"] ?? token.kwargs["name"] ?? token.kwargs["title"] ?? "").trim();
|
|
17
5
|
if (fromArgs && fromKw)
|
|
@@ -22,7 +10,6 @@ const RENAME_GUIDANCE_ZH = ["- 重命名对话:[[conv:rename:<新标题>]](
|
|
|
22
10
|
const RENAME_GUIDANCE_EN = [
|
|
23
11
|
"- Rename conversation: [[conv:rename:<title>]] (call once early when user intent is clear).",
|
|
24
12
|
];
|
|
25
|
-
/** 语言感知的 conv guidance(issue #91):en 用英译、zh 用中文,默认英文。 */
|
|
26
13
|
export function getRenameGuidance(lang = "en") {
|
|
27
14
|
return getServerBlock(lang, "markers.rename.guidance", RENAME_GUIDANCE_ZH, RENAME_GUIDANCE_EN);
|
|
28
15
|
}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* marker.ts — 通用内联标记核心抽象(内置版)。
|
|
3
|
-
* 复刻自 pi-marker-tools,保持相同解析语义,便于 AI 无缝迁移。
|
|
4
|
-
*/
|
|
5
|
-
// ---------------------------------------------------------------------------
|
|
6
|
-
// 解析器
|
|
7
|
-
// ---------------------------------------------------------------------------
|
|
8
1
|
const TOKEN_RE = /\[\[\s*([A-Za-z][A-Za-z0-9_-]*)\s*:\s*([A-Za-z][A-Za-z0-9_-]*)\s*:(.*?)\s*\]\]/g;
|
|
9
2
|
function splitArgs(body) {
|
|
10
3
|
const args = [];
|
|
@@ -79,11 +72,6 @@ export function parseMarkers(text) {
|
|
|
79
72
|
}
|
|
80
73
|
return tokens;
|
|
81
74
|
}
|
|
82
|
-
/**
|
|
83
|
-
* 从助手展示文本中剥离内联状态标记([[todo:...]] / [[notify:...]] / [[conv:rename:...]] / [[action:suggest:...]] 等)。
|
|
84
|
-
* 仅剥离已知标记命名空间,避免误删正文或代码中的普通双括号内容;
|
|
85
|
-
* `stripTrailingIncomplete` 为 true 时同步剥离流式末尾尚未闭合的半截标记。
|
|
86
|
-
*/
|
|
87
75
|
export function stripMarkers(text, options) {
|
|
88
76
|
if (!text || !text.includes("[["))
|
|
89
77
|
return text;
|
|
@@ -99,7 +87,6 @@ export function stripMarkers(text, options) {
|
|
|
99
87
|
}
|
|
100
88
|
if (out === text)
|
|
101
89
|
return text;
|
|
102
|
-
// 清理因剥离首尾标记残留在行首/段首/段尾的空行与空白
|
|
103
90
|
return out
|
|
104
91
|
.replace(/^[ \t]+\n/gm, "\n")
|
|
105
92
|
.replace(/\n{3,}/g, "\n\n")
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* store.ts — 标记状态持久化(内置版)。
|
|
3
|
-
*
|
|
4
|
-
* 策略:优先用 SDK 会话的 custom entry(appendCustomEntry + getBranch 扫描),
|
|
5
|
-
* 失败时回退到内存 Map(保证 rename 等轻量标记仍可用)。custom entry 类型与
|
|
6
|
-
* pi-marker-tools 保持兼容(marker-tools/store),便于复用既有会话数据。
|
|
7
|
-
*/
|
|
8
1
|
export const STORE_CUSTOM_TYPE = "marker-tools/store";
|
|
9
2
|
const SNAPSHOT_VERSION = 1;
|
|
10
|
-
/** 从分支重建某命名空间最新快照;branch 为 SessionManager.getBranch() 返回的数组。 */
|
|
11
3
|
export function loadStateFromBranch(branch, namespace) {
|
|
12
4
|
let latest;
|
|
13
5
|
for (const entry of branch) {
|
|
@@ -23,7 +15,6 @@ export function loadStateFromBranch(branch, namespace) {
|
|
|
23
15
|
}
|
|
24
16
|
return latest?.state;
|
|
25
17
|
}
|
|
26
|
-
/** 追加快照:优先走 sessionManager.appendCustomEntry,否则回退到回调。 */
|
|
27
18
|
export function appendSnapshot(mgr, namespace, state, fallbackSave) {
|
|
28
19
|
const snapshot = {
|
|
29
20
|
namespace,
|
|
@@ -36,9 +27,7 @@ export function appendSnapshot(mgr, namespace, state, fallbackSave) {
|
|
|
36
27
|
mgr.appendCustomEntry(STORE_CUSTOM_TYPE, snapshot);
|
|
37
28
|
return;
|
|
38
29
|
}
|
|
39
|
-
catch {
|
|
40
|
-
// 回退到内存
|
|
41
|
-
}
|
|
30
|
+
catch { }
|
|
42
31
|
}
|
|
43
32
|
fallbackSave?.(snapshot);
|
|
44
33
|
}
|
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 远程市场服务 —— MCP 服务器市场 API 与 GitHub 技能仓库目录抓取
|
|
3
|
-
*
|
|
4
|
-
* 职责:
|
|
5
|
-
* 1. 从 Smithery 等开放 API、GitHub 官方仓库拉取公开 MCP 服务器目录;
|
|
6
|
-
* 2. 从 GitHub 仓库(如 anthropics/skills 等)拉取公开 Agent Skills 清单及 SKILL.md 正文;
|
|
7
|
-
* 3. 本地磁盘缓存与超时防抖,网络失败时不影响主程序运行。
|
|
8
|
-
*/
|
|
9
1
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
10
2
|
import { dirname, join } from "node:path";
|
|
11
3
|
import { safeFetch, validateFetchUrl } from "./net-guard.js";
|
|
12
4
|
const DEFAULT_TIMEOUT_MS = 10_000;
|
|
13
|
-
const CACHE_TTL_MS = 60 * 60 * 1000;
|
|
14
|
-
/** 获取 GitHub Token(优先使用配置的预设分享令牌或标准环境变量) */
|
|
5
|
+
const CACHE_TTL_MS = 60 * 60 * 1000;
|
|
15
6
|
function getGitHubToken() {
|
|
16
7
|
return (process.env.PI_WEB_PRESET_TOKEN?.trim() ||
|
|
17
8
|
process.env.GH_TOKEN?.trim() ||
|
|
@@ -39,9 +30,7 @@ function readCache(cacheFile) {
|
|
|
39
30
|
return raw.data;
|
|
40
31
|
}
|
|
41
32
|
}
|
|
42
|
-
catch {
|
|
43
|
-
/* invalid cache */
|
|
44
|
-
}
|
|
33
|
+
catch { }
|
|
45
34
|
return null;
|
|
46
35
|
}
|
|
47
36
|
function writeCache(cacheFile, data) {
|
|
@@ -53,15 +42,10 @@ function writeCache(cacheFile, data) {
|
|
|
53
42
|
};
|
|
54
43
|
writeFileSync(cacheFile, JSON.stringify(payload), "utf8");
|
|
55
44
|
}
|
|
56
|
-
catch {
|
|
57
|
-
/* ignore write cache failure */
|
|
58
|
-
}
|
|
45
|
+
catch { }
|
|
59
46
|
}
|
|
60
|
-
/** 从公开 API 或仓库拉取 MCP 服务器列表 */
|
|
61
47
|
export async function fetchRemoteMcpMarket(opts) {
|
|
62
48
|
const source = opts.source || "smithery";
|
|
63
|
-
// query 与 source 同样消毒进缓存 key:query 未消毒时 `q/../../x` 会经 join
|
|
64
|
-
// 归一化逃出 market-cache 目录(dataDir 内任意路径读写)
|
|
65
49
|
const sanitizeCacheKey = (s) => s.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
66
50
|
const cacheKey = `mcp-market-${sanitizeCacheKey(source)}-${sanitizeCacheKey(opts.query || "all")}.json`;
|
|
67
51
|
const cacheFile = join(opts.dataDir, "market-cache", cacheKey);
|
|
@@ -137,9 +121,6 @@ export async function fetchRemoteMcpMarket(opts) {
|
|
|
137
121
|
writeCache(cacheFile, servers);
|
|
138
122
|
return { ok: true, servers, source: "github", total: servers.length };
|
|
139
123
|
}
|
|
140
|
-
// 自定义 URL(支持返回 JSON 格式的 servers 列表)
|
|
141
|
-
// SSRF 收口:与 preset-share 同一口径——自定义源也只允许 http/https 公网地址,
|
|
142
|
-
// 否则内网/回环地址可被当作市场源探测(preset_import_url 有校验,此处原本没有)
|
|
143
124
|
const validated = validateFetchUrl(source);
|
|
144
125
|
if (!validated.ok) {
|
|
145
126
|
throw new Error(validated.reason === "scheme" ? "自定义目录仅支持 http/https 地址" : "自定义目录不允许内网/回环地址");
|
|
@@ -162,7 +143,6 @@ export async function fetchRemoteMcpMarket(opts) {
|
|
|
162
143
|
}
|
|
163
144
|
catch (err) {
|
|
164
145
|
const msg = err instanceof Error ? err.message : String(err);
|
|
165
|
-
// 网络出错时尝试回退至缓存
|
|
166
146
|
const cached = readCache(cacheFile);
|
|
167
147
|
if (cached) {
|
|
168
148
|
return { ok: true, servers: cached, source, total: cached.length, error: `网络请求失败,已展示本地缓存:${msg}` };
|
|
@@ -170,7 +150,6 @@ export async function fetchRemoteMcpMarket(opts) {
|
|
|
170
150
|
return { ok: false, servers: [], source, error: msg };
|
|
171
151
|
}
|
|
172
152
|
}
|
|
173
|
-
/** 从 GitHub 仓库拉取 Skills 清单 */
|
|
174
153
|
export async function fetchRemoteSkillMarket(opts) {
|
|
175
154
|
const repo = (opts.repo || "anthropics/skills").trim();
|
|
176
155
|
const cacheKey = `skill-market-${repo.replace(/[^a-zA-Z0-9_-]/g, "_")}.json`;
|
|
@@ -182,9 +161,6 @@ export async function fetchRemoteSkillMarket(opts) {
|
|
|
182
161
|
}
|
|
183
162
|
}
|
|
184
163
|
try {
|
|
185
|
-
// 1. 优先尝试读取 repo 下的 skills 目录;若不存在则尝试根目录
|
|
186
|
-
// skillPrefix 记录技能实际所在目录——SKILL.md 的 raw 地址必须按它拼,
|
|
187
|
-
// 否则根目录仓库的描述抓取全部 404(fetchRemoteSkillContent 同理双分支)
|
|
188
164
|
let apiUrl = `https://api.github.com/repos/${repo}/contents/skills`;
|
|
189
165
|
let skillPrefix = "skills";
|
|
190
166
|
let res = await fetch(apiUrl, {
|
|
@@ -204,8 +180,6 @@ export async function fetchRemoteSkillMarket(opts) {
|
|
|
204
180
|
}
|
|
205
181
|
const items = (await res.json());
|
|
206
182
|
const skillDirs = items.filter((item) => item.type === "dir" && !item.name.startsWith("."));
|
|
207
|
-
// 2. 并发读取每个 skill 的 SKILL.md 提取描述(按 raw github 内容读取,避开 GitHub API rate limit)
|
|
208
|
-
// 默认分支 main/master 双尝试(仓库默认分支为 master 时 main 404)
|
|
209
183
|
const fetchSkillDoc = async (id) => {
|
|
210
184
|
const base = skillPrefix ? `${skillPrefix}/${id}/SKILL.md` : `${id}/SKILL.md`;
|
|
211
185
|
for (const branch of ["main", "master"]) {
|
|
@@ -217,9 +191,7 @@ export async function fetchRemoteSkillMarket(opts) {
|
|
|
217
191
|
if (rawRes.ok)
|
|
218
192
|
return await rawRes.text();
|
|
219
193
|
}
|
|
220
|
-
catch {
|
|
221
|
-
/* try next branch / fallback to default description */
|
|
222
|
-
}
|
|
194
|
+
catch { }
|
|
223
195
|
}
|
|
224
196
|
return null;
|
|
225
197
|
};
|
|
@@ -235,9 +207,7 @@ export async function fetchRemoteSkillMarket(opts) {
|
|
|
235
207
|
}
|
|
236
208
|
}
|
|
237
209
|
}
|
|
238
|
-
catch {
|
|
239
|
-
/* fallback to default description */
|
|
240
|
-
}
|
|
210
|
+
catch { }
|
|
241
211
|
return {
|
|
242
212
|
id,
|
|
243
213
|
name: id,
|
|
@@ -258,7 +228,6 @@ export async function fetchRemoteSkillMarket(opts) {
|
|
|
258
228
|
return { ok: false, skills: [], repo, error: msg };
|
|
259
229
|
}
|
|
260
230
|
}
|
|
261
|
-
/** 从 GitHub 仓库读取单个技能的完整 SKILL.md 内容 */
|
|
262
231
|
export async function fetchRemoteSkillContent(opts) {
|
|
263
232
|
const { repo, skillId } = opts;
|
|
264
233
|
const branches = ["main", "master"];
|
|
@@ -274,11 +243,8 @@ export async function fetchRemoteSkillContent(opts) {
|
|
|
274
243
|
return { ok: true, skillId, content };
|
|
275
244
|
}
|
|
276
245
|
}
|
|
277
|
-
catch {
|
|
278
|
-
/* try next branch */
|
|
279
|
-
}
|
|
246
|
+
catch { }
|
|
280
247
|
}
|
|
281
|
-
// 根目录下直接查找
|
|
282
248
|
for (const branch of branches) {
|
|
283
249
|
const rawUrl = `https://raw.githubusercontent.com/${repo}/${branch}/${skillId}/SKILL.md`;
|
|
284
250
|
try {
|
|
@@ -291,9 +257,7 @@ export async function fetchRemoteSkillContent(opts) {
|
|
|
291
257
|
return { ok: true, skillId, content };
|
|
292
258
|
}
|
|
293
259
|
}
|
|
294
|
-
catch {
|
|
295
|
-
/* try next */
|
|
296
|
-
}
|
|
260
|
+
catch { }
|
|
297
261
|
}
|
|
298
262
|
return {
|
|
299
263
|
ok: false,
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* mcp-agent-tool.ts — Agent 工具 `mcp_manage`:让 AI 便捷地检查、安装、移除与重载 MCP 服务器。
|
|
3
|
-
*
|
|
4
|
-
* 约定:
|
|
5
|
-
* - 工具定义(description / promptSnippet / promptGuidelines)保持精简纯英文;
|
|
6
|
-
* - 单次调用返回文本走 pick(lang, zh, en, key);
|
|
7
|
-
* - 安装或移除后立即触发 McpBridge.reload() + 会话工具表热同步(syncPluginToolsIntoSession),
|
|
8
|
-
* 新挂载的远端工具在同一对话下一拍即可直接调用。
|
|
9
|
-
*/
|
|
10
1
|
import { defineTool } from "@earendil-works/pi-coding-agent";
|
|
11
2
|
import { Type } from "typebox";
|
|
12
3
|
import { pick } from "./i18n.js";
|
|
@@ -162,7 +153,6 @@ export function makeMcpManageTool(host, lang) {
|
|
|
162
153
|
}
|
|
163
154
|
return reply(pick(L, `已移除 MCP 服务器「${name}」并同步工具列表。`, `Removed MCP server "${name}" and synced tools.`, "mcp_manage.remove.ok", { name }), { ok: true, name });
|
|
164
155
|
}
|
|
165
|
-
// action === "reload"
|
|
166
156
|
const { servers } = await host.reloadServers();
|
|
167
157
|
const runningCount = servers.filter((s) => s.status === "running").length;
|
|
168
158
|
return reply(pick(L, `已重新加载全部 MCP 服务器(共 ${servers.length} 个,运行中 ${runningCount} 个)。`, `Reloaded all MCP servers (${servers.length} total, ${runningCount} running).`, "mcp_manage.reload.ok", { count: servers.length, running: runningCount }), { count: servers.length, running: runningCount });
|