@chainingintention/pi-web-cn 2.0.0 → 2.202610.1
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/README.md +61 -106
- package/dist/.plugins-ready +1 -0
- package/dist/cli.js +331 -174
- package/dist/cli.js.map +1 -1
- package/dist/client/apple-touch-icon-dev.png +0 -0
- package/dist/client/assets/PiWebApp-vueV4eKR.js +4938 -0
- package/dist/client/assets/classic-CyM97Akm.css +54 -0
- package/dist/client/assets/external-B9K8duyP.js +2 -0
- package/dist/client/assets/graphite-DquaqFXU.css +54 -0
- package/dist/client/assets/index-C8f0d0CR.js +2 -0
- package/dist/client/assets/paper-CB1oLuRr.css +54 -0
- package/dist/client/assets/pi-web-dark-D_KtbM95.css +54 -0
- package/dist/client/assets/pi-web-light-DSNLMIBI.css +54 -0
- package/dist/client/assets/vendor-editor-core-BfnHL1Dg.js +10 -0
- package/dist/client/assets/vendor-editor-languages-bNquDJP0.js +28 -0
- package/dist/client/favicon-dev.svg +8 -0
- package/dist/client/index.html +7 -51
- package/dist/client/manifest.webmanifest +2 -1
- package/dist/client/pwa-icon-dev-192.png +0 -0
- package/dist/client/pwa-icon-dev-512.png +0 -0
- package/dist/config.js +55 -8
- package/dist/config.js.map +1 -1
- package/dist/docker/piWebDockerCommandPlan.js +13 -4
- package/dist/docker/piWebDockerCommandPlan.js.map +1 -1
- package/dist/environment.js +4 -0
- package/dist/environment.js.map +1 -0
- package/dist/localization.js +24 -0
- package/dist/localization.js.map +1 -0
- package/dist/nativeServices/installedServiceDefinitions.js +617 -0
- package/dist/nativeServices/installedServiceDefinitions.js.map +1 -0
- package/dist/nativeServices/serviceAction.js +78 -20
- package/dist/nativeServices/serviceAction.js.map +1 -1
- package/dist/nativeServices/serviceDoctor.js +418 -114
- package/dist/nativeServices/serviceDoctor.js.map +1 -1
- package/dist/nativeServices/servicePlan.js +2 -2
- package/dist/nativeServices/servicePlan.js.map +1 -1
- package/dist/pi-packages/captains-log/README.md +11 -0
- package/dist/pi-packages/captains-log/dist/browser/channelProtocol.js +29 -0
- package/dist/pi-packages/captains-log/dist/browser/index.js +143 -0
- package/dist/pi-packages/captains-log/dist/browser/markdown.js +68 -0
- package/dist/pi-packages/captains-log/dist/browser/panel.js +148 -0
- package/dist/pi-packages/captains-log/dist/browser/protocol.js +26 -0
- package/dist/pi-packages/captains-log/dist/companion.js +126 -0
- package/dist/pi-packages/captains-log/dist/roundtrip.js +62 -0
- package/dist/pi-packages/captains-log/dist/server.js +210 -0
- package/dist/pi-packages/captains-log/dist/store.js +75 -0
- package/dist/pi-packages/captains-log/docs/usage.md +29 -0
- package/dist/pi-packages/captains-log/i18n.js +7 -0
- package/dist/pi-packages/captains-log/package.json +35 -0
- package/dist/pi-packages/captains-log/tsconfig.json +21 -0
- package/dist/pi-packages/captains-log/vite.config.mjs +28 -0
- package/dist/pi-packages/relays/extensions/index.js +61 -0
- package/dist/pi-packages/relays/i18n.js +7 -0
- package/dist/{pi-web-plugins → pi-packages}/relays/markdownDocument.js +3 -2
- package/dist/pi-packages/relays/package.json +20 -0
- package/dist/pi-packages/relays/pi-web-plugin.js +96 -0
- package/dist/pi-packages/relays/prompts/relay-worktree.md +18 -0
- package/dist/pi-packages/relays/prompts/relay.md +18 -0
- package/dist/{pi-web-plugins → pi-packages}/relays/relayDiscovery.js +2 -2
- package/dist/pi-packages/relays/relayDispatch.js +67 -0
- package/dist/pi-packages/relays/relayIdentity.js +37 -0
- package/dist/{pi-web-plugins → pi-packages}/relays/relaysPanelElement.js +98 -59
- package/dist/pi-packages/relays/skills/relay/SKILL.md +50 -0
- package/dist/pi-packages/relays/skills/relay-runner/SKILL.md +74 -0
- package/dist/pi-packages/workflows/browser/pi-web-plugin.js +42 -0
- package/dist/pi-packages/workflows/browser/worktreeDialog.js +170 -0
- package/dist/pi-packages/workflows/package.json +23 -0
- package/dist/pi-packages/workflows/prompts/worktree.md +21 -0
- package/dist/pi-packages/workflows/server-plugin.js +586 -0
- package/dist/pi-packages/workflows/vite.config.mjs +17 -0
- package/dist/pi-web-plugins/code-highlight/browser/pi-web-plugin.js +22 -0
- package/dist/pi-web-plugins/code-highlight/package.json +13 -0
- package/dist/pi-web-plugins/files/browser/assets/files-icon-DZObYhxb.svg +3 -0
- package/dist/pi-web-plugins/files/browser/pi-web-plugin.js +466 -0
- package/dist/pi-web-plugins/files/package.json +15 -0
- package/dist/pi-web-plugins/git/browser/git-contract.js +22 -11
- package/dist/pi-web-plugins/git/browser/git-panel.js +228 -100
- package/dist/pi-web-plugins/git/browser/i18n.js +7 -0
- package/dist/pi-web-plugins/git/browser/pi-web-plugin.js +28 -4
- package/dist/pi-web-plugins/git/git-backend.js +61 -21
- package/dist/pi-web-plugins/git/gitStatusCache.js +48 -0
- package/dist/pi-web-plugins/git/i18n.js +7 -0
- package/dist/pi-web-plugins/git/package.json +1 -0
- package/dist/pi-web-plugins/git/server-plugin.js +45 -24
- package/dist/pi-web-plugins/git/workspace-discovery-notify.cjs +14 -0
- package/dist/pi-web-plugins/git/workspaceDiscoveryHooks.js +186 -0
- package/dist/pi-web-plugins/info/i18n.js +7 -0
- package/dist/pi-web-plugins/info/infoInternals.js +76 -65
- package/dist/pi-web-plugins/info/package.json +1 -1
- package/dist/pi-web-plugins/info/pi-web-plugin.js +40 -42
- package/dist/pi-web-plugins/mermaid/browser/mermaid-engine.js +4255 -0
- package/dist/pi-web-plugins/mermaid/browser/pi-web-plugin.js +11 -0
- package/dist/pi-web-plugins/mermaid/package.json +13 -0
- package/dist/pi-web-plugins/terminal/browser/pi-web-plugin.js +219 -0
- package/dist/pi-web-plugins/terminal/i18n.js +7 -0
- package/dist/pi-web-plugins/terminal/package.json +16 -0
- package/dist/pi-web-plugins/terminal/server-plugin.js +367 -0
- package/dist/pi-web-plugins/terminal/terminalService.js +436 -0
- package/dist/pi-web-plugins/updates/i18n.js +7 -0
- package/dist/pi-web-plugins/updates/package.json +1 -1
- package/dist/pi-web-plugins/updates/pi-web-plugin.js +143 -140
- package/dist/pi-web-plugins/updates/updatesLogic.js +24 -24
- package/dist/pi-web-plugins/workspace-tasks/config.js +12 -11
- package/dist/pi-web-plugins/workspace-tasks/i18n.js +7 -0
- package/dist/pi-web-plugins/workspace-tasks/package.json +1 -1
- package/dist/pi-web-plugins/workspace-tasks/pi-web-plugin.js +31 -9
- package/dist/pi-web-plugins/workspace-tasks/tasksPanelElement.js +54 -36
- package/dist/pi-web-plugins/workspace-tasks/workspaceTasksClient.js +12 -11
- package/dist/pi-web-plugins/zh-cn/auth.json +9 -0
- package/dist/pi-web-plugins/zh-cn/bundled.json +219 -0
- package/dist/pi-web-plugins/zh-cn/cli.json +230 -0
- package/dist/pi-web-plugins/zh-cn/client.json +225 -0
- package/dist/pi-web-plugins/zh-cn/components.json +1252 -0
- package/dist/pi-web-plugins/zh-cn/config-errors.json +188 -0
- package/dist/pi-web-plugins/zh-cn/files.json +50 -0
- package/dist/pi-web-plugins/zh-cn/machines.json +28 -0
- package/dist/pi-web-plugins/zh-cn/main.json +459 -0
- package/dist/pi-web-plugins/zh-cn/management-errors.json +23 -0
- package/dist/pi-web-plugins/zh-cn/manifest.webmanifest +25 -0
- package/dist/pi-web-plugins/zh-cn/metadata.json +3 -0
- package/dist/pi-web-plugins/zh-cn/package.json +10 -0
- package/dist/pi-web-plugins/zh-cn/pi-web-plugin.js +16 -0
- package/dist/pi-web-plugins/zh-cn/projects.json +6 -0
- package/dist/pi-web-plugins/zh-cn/provider-auth.json +18 -0
- package/dist/pi-web-plugins/zh-cn/routing.json +68 -0
- package/dist/pi-web-plugins/zh-cn/server-main.json +99 -0
- package/dist/pi-web-plugins/zh-cn/server.json +256 -0
- package/dist/piAi.js +4 -0
- package/dist/piAi.js.map +1 -0
- package/dist/piRuntime.js +150 -0
- package/dist/piRuntime.js.map +1 -0
- package/dist/piSdk.js +5 -0
- package/dist/piSdk.js.map +1 -0
- package/dist/piWebUpdate.js +508 -0
- package/dist/piWebUpdate.js.map +1 -0
- package/dist/piWebVersionReport.js +109 -41
- package/dist/piWebVersionReport.js.map +1 -1
- package/dist/plugin-api.d.ts +609 -29
- package/dist/plugin-api.js +1 -0
- package/dist/pluginRecoveryCli.js +27 -25
- package/dist/pluginRecoveryCli.js.map +1 -1
- package/dist/server/activity/workspaceActivityService.js +13 -6
- package/dist/server/activity/workspaceActivityService.js.map +1 -1
- package/dist/server/app.js +158 -89
- package/dist/server/app.js.map +1 -1
- package/dist/server/audit/managementAuditStore.js +6 -1
- package/dist/server/audit/managementAuditStore.js.map +1 -1
- package/dist/server/audit/normalToolAuditCli.js +45 -43
- package/dist/server/audit/normalToolAuditCli.js.map +1 -1
- package/dist/server/browserMessageProjection.js +39 -22
- package/dist/server/browserMessageProjection.js.map +1 -1
- package/dist/server/configRoutes.js +54 -33
- package/dist/server/configRoutes.js.map +1 -1
- package/dist/server/deploymentIdentity.js +67 -0
- package/dist/server/deploymentIdentity.js.map +1 -0
- package/dist/server/deploymentIdentityRoutes.js +22 -0
- package/dist/server/deploymentIdentityRoutes.js.map +1 -0
- package/dist/server/diagnostics/nodePtyNativeModule.js +7 -6
- package/dist/server/diagnostics/nodePtyNativeModule.js.map +1 -1
- package/dist/server/diagnostics/nodePtySpawnHelper.js +21 -20
- package/dist/server/diagnostics/nodePtySpawnHelper.js.map +1 -1
- package/dist/server/index.js +10 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/knownAutoInstallPiPackages.js +36 -0
- package/dist/server/knownAutoInstallPiPackages.js.map +1 -0
- package/dist/server/knownPiPackages.js +12 -0
- package/dist/server/knownPiPackages.js.map +1 -0
- package/dist/server/machines/machineClient.js +23 -19
- package/dist/server/machines/machineClient.js.map +1 -1
- package/dist/server/machines/machinePluginProxyRoutes.js +131 -31
- package/dist/server/machines/machinePluginProxyRoutes.js.map +1 -1
- package/dist/server/machines/machineProxyRoutes.js +138 -47
- package/dist/server/machines/machineProxyRoutes.js.map +1 -1
- package/dist/server/machines/machineRoutes.js +18 -13
- package/dist/server/machines/machineRoutes.js.map +1 -1
- package/dist/server/machines/machineService.js +40 -18
- package/dist/server/machines/machineService.js.map +1 -1
- package/dist/server/managementEmbed.js +149 -30
- package/dist/server/managementEmbed.js.map +1 -1
- package/dist/server/managementPrivileges.js +21 -0
- package/dist/server/managementPrivileges.js.map +1 -0
- package/dist/server/managementTerminalProxyRoutes.js +124 -0
- package/dist/server/managementTerminalProxyRoutes.js.map +1 -0
- package/dist/server/navigationPreferenceRoutes.js +59 -0
- package/dist/server/navigationPreferenceRoutes.js.map +1 -0
- package/dist/server/normalAuth.js +77 -53
- package/dist/server/normalAuth.js.map +1 -1
- package/dist/server/notices/serverNoticeRoutes.js +43 -0
- package/dist/server/notices/serverNoticeRoutes.js.map +1 -0
- package/dist/server/notices/serverNoticeService.js +26 -0
- package/dist/server/notices/serverNoticeService.js.map +1 -0
- package/dist/server/notices/serverNoticeStore.js +122 -0
- package/dist/server/notices/serverNoticeStore.js.map +1 -0
- package/dist/server/passwordVerifier.js +91 -0
- package/dist/server/passwordVerifier.js.map +1 -0
- package/dist/server/piPackageIdentity.js +25 -0
- package/dist/server/piPackageIdentity.js.map +1 -0
- package/dist/server/piPackageService.js +72 -9
- package/dist/server/piPackageService.js.map +1 -1
- package/dist/server/piWebPluginCatalog.js +212 -35
- package/dist/server/piWebPluginCatalog.js.map +1 -1
- package/dist/server/piWebPluginLifecycle.js +29 -3
- package/dist/server/piWebPluginLifecycle.js.map +1 -1
- package/dist/server/piWebPluginService.js +199 -292
- package/dist/server/piWebPluginService.js.map +1 -1
- package/dist/server/piWebStatus.js +57 -100
- package/dist/server/piWebStatus.js.map +1 -1
- package/dist/server/pluginCallbackDrain.js +35 -0
- package/dist/server/pluginCallbackDrain.js.map +1 -0
- package/dist/server/plugins/pluginBackendChannelProxyAdmission.js +84 -0
- package/dist/server/plugins/pluginBackendChannelProxyAdmission.js.map +1 -0
- package/dist/server/plugins/pluginBackendChannelProxyCoordinator.js +234 -0
- package/dist/server/plugins/pluginBackendChannelProxyCoordinator.js.map +1 -0
- package/dist/server/plugins/pluginBackendChannelProxyRoutes.js +61 -0
- package/dist/server/plugins/pluginBackendChannelProxyRoutes.js.map +1 -0
- package/dist/server/plugins/pluginBackendProxyRoutes.js +47 -57
- package/dist/server/plugins/pluginBackendProxyRoutes.js.map +1 -1
- package/dist/server/plugins/pluginBackendRegistry.js +804 -0
- package/dist/server/plugins/pluginBackendRegistry.js.map +1 -0
- package/dist/server/plugins/projectPluginSettings.js +95 -0
- package/dist/server/plugins/projectPluginSettings.js.map +1 -0
- package/dist/server/plugins/serverPluginCatalogCapability.js +106 -0
- package/dist/server/plugins/serverPluginCatalogCapability.js.map +1 -0
- package/dist/server/plugins/serverPluginPiSessionEventsCapability.js +34 -0
- package/dist/server/plugins/serverPluginPiSessionEventsCapability.js.map +1 -0
- package/dist/server/plugins/serverPluginPiSessionsCapability.js +185 -0
- package/dist/server/plugins/serverPluginPiSessionsCapability.js.map +1 -0
- package/dist/server/plugins/serverPluginRuntime.js +1088 -108
- package/dist/server/plugins/serverPluginRuntime.js.map +1 -1
- package/dist/server/plugins/serverPluginWorkspacesCapability.js +114 -0
- package/dist/server/plugins/serverPluginWorkspacesCapability.js.map +1 -0
- package/dist/server/projectTrustRoutes.js +86 -0
- package/dist/server/projectTrustRoutes.js.map +1 -0
- package/dist/server/projects/projectLifecycleService.js +94 -0
- package/dist/server/projects/projectLifecycleService.js.map +1 -0
- package/dist/server/projects/projectService.js +7 -4
- package/dist/server/projects/projectService.js.map +1 -1
- package/dist/server/realtime/sessionEventHub.js +58 -39
- package/dist/server/realtime/sessionEventHub.js.map +1 -1
- package/dist/server/realtime/sessionEventScope.js +4 -0
- package/dist/server/realtime/sessionEventScope.js.map +1 -1
- package/dist/server/requestCancellation.js +15 -1
- package/dist/server/requestCancellation.js.map +1 -1
- package/dist/server/sessiond/agentHttpDispatcher.js +108 -0
- package/dist/server/sessiond/agentHttpDispatcher.js.map +1 -0
- package/dist/server/sessiond/autoInstallPiPackages.js +63 -0
- package/dist/server/sessiond/autoInstallPiPackages.js.map +1 -0
- package/dist/server/sessiond/pluginBackendChannelRoutes.js +410 -0
- package/dist/server/sessiond/pluginBackendChannelRoutes.js.map +1 -0
- package/dist/server/sessiond/pluginBackendRoutes.js +64 -47
- package/dist/server/sessiond/pluginBackendRoutes.js.map +1 -1
- package/dist/server/sessiond/pluginCatalogRoutes.js +41 -0
- package/dist/server/sessiond/pluginCatalogRoutes.js.map +1 -0
- package/dist/server/sessiond/projectMutationRoutes.js +39 -0
- package/dist/server/sessiond/projectMutationRoutes.js.map +1 -0
- package/dist/server/sessiond/sessionDaemonShutdown.js +36 -0
- package/dist/server/sessiond/sessionDaemonShutdown.js.map +1 -0
- package/dist/server/sessiond/sessionDaemonStartup.js +30 -4
- package/dist/server/sessiond/sessionDaemonStartup.js.map +1 -1
- package/dist/server/sessiond/sessionProxyRoutes.js +263 -91
- package/dist/server/sessiond/sessionProxyRoutes.js.map +1 -1
- package/dist/server/sessiond/sessionServiceDependencies.js +5 -0
- package/dist/server/sessiond/sessionServiceDependencies.js.map +1 -1
- package/dist/server/sessiond/sessiondStateOwnership.js +174 -39
- package/dist/server/sessiond/sessiondStateOwnership.js.map +1 -1
- package/dist/server/sessiond/workspaceCatalogRoutes.js +11 -5
- package/dist/server/sessiond/workspaceCatalogRoutes.js.map +1 -1
- package/dist/server/sessiond/workspaceNotificationRoutes.js +55 -0
- package/dist/server/sessiond/workspaceNotificationRoutes.js.map +1 -0
- package/dist/server/sessiond/workspaceRemovalRoutes.js +1 -1
- package/dist/server/sessiond/workspaceRemovalRoutes.js.map +1 -1
- package/dist/server/sessiond.js +313 -69
- package/dist/server/sessiond.js.map +1 -1
- package/dist/server/sessions/askUserDomain.js +232 -0
- package/dist/server/sessions/askUserDomain.js.map +1 -0
- package/dist/server/sessions/askUserTool.js +18 -21
- package/dist/server/sessions/askUserTool.js.map +1 -1
- package/dist/server/sessions/attachmentService.js +2 -6
- package/dist/server/sessions/attachmentService.js.map +1 -1
- package/dist/server/sessions/authRoutes.js +32 -19
- package/dist/server/sessions/authRoutes.js.map +1 -1
- package/dist/server/sessions/authService.js +31 -11
- package/dist/server/sessions/authService.js.map +1 -1
- package/dist/server/sessions/builtinCommands.js +28 -21
- package/dist/server/sessions/builtinCommands.js.map +1 -1
- package/dist/server/sessions/builtinExtensionFactories.js +36 -0
- package/dist/server/sessions/builtinExtensionFactories.js.map +1 -0
- package/dist/server/sessions/clientSessionPreview.js +14 -0
- package/dist/server/sessions/clientSessionPreview.js.map +1 -0
- package/dist/server/sessions/companionBackend.js +286 -0
- package/dist/server/sessions/companionBackend.js.map +1 -0
- package/dist/server/sessions/dockerEnvironmentFacts.js +98 -10
- package/dist/server/sessions/dockerEnvironmentFacts.js.map +1 -1
- package/dist/server/sessions/extensionSessionDispatch.js +76 -0
- package/dist/server/sessions/extensionSessionDispatch.js.map +1 -0
- package/dist/server/sessions/globalProviderPolicy.js +88 -19
- package/dist/server/sessions/globalProviderPolicy.js.map +1 -1
- package/dist/server/sessions/managementAgentTools.js +116 -6
- package/dist/server/sessions/managementAgentTools.js.map +1 -1
- package/dist/server/sessions/managementPermissionSystem.js +36 -14
- package/dist/server/sessions/managementPermissionSystem.js.map +1 -1
- package/dist/server/sessions/managementSandbox.js +7 -18
- package/dist/server/sessions/managementSandbox.js.map +1 -1
- package/dist/server/sessions/mcpAuthFlowService.js +289 -0
- package/dist/server/sessions/mcpAuthFlowService.js.map +1 -0
- package/dist/server/sessions/mcpAuthRoutes.js +104 -0
- package/dist/server/sessions/mcpAuthRoutes.js.map +1 -0
- package/dist/server/sessions/mcpOAuthCredentialAdapter.js +92 -0
- package/dist/server/sessions/mcpOAuthCredentialAdapter.js.map +1 -0
- package/dist/server/sessions/messageHistoryTarget.js +79 -0
- package/dist/server/sessions/messageHistoryTarget.js.map +1 -0
- package/dist/server/sessions/messagePaging.js +2 -2
- package/dist/server/sessions/messagePaging.js.map +1 -1
- package/dist/server/sessions/modelCatalogRefresher.js +4 -3
- package/dist/server/sessions/modelCatalogRefresher.js.map +1 -1
- package/dist/server/sessions/oauthLoginFlowService.js +19 -20
- package/dist/server/sessions/oauthLoginFlowService.js.map +1 -1
- package/dist/server/sessions/piSessionEventConnections.js +68 -0
- package/dist/server/sessions/piSessionEventConnections.js.map +1 -0
- package/dist/server/sessions/piSessionManagerGateway.js +206 -27
- package/dist/server/sessions/piSessionManagerGateway.js.map +1 -1
- package/dist/server/sessions/piSessionService.js +2508 -991
- package/dist/server/sessions/piSessionService.js.map +1 -1
- package/dist/server/sessions/plainTextTheme.js +1 -1
- package/dist/server/sessions/plainTextTheme.js.map +1 -1
- package/dist/server/sessions/projectAuthService.js +35 -6
- package/dist/server/sessions/projectAuthService.js.map +1 -1
- package/dist/server/sessions/projectSettingsScope.js +88 -33
- package/dist/server/sessions/projectSettingsScope.js.map +1 -1
- package/dist/server/sessions/projectTrust.js +119 -0
- package/dist/server/sessions/projectTrust.js.map +1 -0
- package/dist/server/sessions/queuedMessageMutation.js +170 -0
- package/dist/server/sessions/queuedMessageMutation.js.map +1 -0
- package/dist/server/sessions/relaySkill.js +169 -0
- package/dist/server/sessions/relaySkill.js.map +1 -0
- package/dist/server/sessions/sessionActivityMarker.js +105 -0
- package/dist/server/sessions/sessionActivityMarker.js.map +1 -0
- package/dist/server/sessions/sessionArchiveMapping.js +16 -15
- package/dist/server/sessions/sessionArchiveMapping.js.map +1 -1
- package/dist/server/sessions/sessionArchiveStore.js +5 -1
- package/dist/server/sessions/sessionArchiveStore.js.map +1 -1
- package/dist/server/sessions/sessionArchiveTree.js +2 -2
- package/dist/server/sessions/sessionArchiveTree.js.map +1 -1
- package/dist/server/sessions/sessionCleanup.js +4 -3
- package/dist/server/sessions/sessionCleanup.js.map +1 -1
- package/dist/server/sessions/sessionCommandService.js +79 -87
- package/dist/server/sessions/sessionCommandService.js.map +1 -1
- package/dist/server/sessions/sessionEnvironmentFacts.js +5 -4
- package/dist/server/sessions/sessionEnvironmentFacts.js.map +1 -1
- package/dist/server/sessions/sessionFileHeader.js +41 -0
- package/dist/server/sessions/sessionFileHeader.js.map +1 -1
- package/dist/server/sessions/sessionImageDimensions.js +31 -0
- package/dist/server/sessions/sessionImageDimensions.js.map +1 -0
- package/dist/server/sessions/sessionMediaIndex.js +191 -0
- package/dist/server/sessions/sessionMediaIndex.js.map +1 -0
- package/dist/server/sessions/sessionMetadata.js +51 -0
- package/dist/server/sessions/sessionMetadata.js.map +1 -0
- package/dist/server/sessions/sessionModelScope.js +160 -0
- package/dist/server/sessions/sessionModelScope.js.map +1 -0
- package/dist/server/sessions/sessionNameGenerator.js +16 -35
- package/dist/server/sessions/sessionNameGenerator.js.map +1 -1
- package/dist/server/sessions/sessionNotificationStore.js +14 -11
- package/dist/server/sessions/sessionNotificationStore.js.map +1 -1
- package/dist/server/sessions/sessionReadAccess.js +41 -0
- package/dist/server/sessions/sessionReadAccess.js.map +1 -0
- package/dist/server/sessions/sessionRoutes.js +221 -78
- package/dist/server/sessions/sessionRoutes.js.map +1 -1
- package/dist/server/sessions/sessionSummaryScanner.js +62 -5
- package/dist/server/sessions/sessionSummaryScanner.js.map +1 -1
- package/dist/server/sessions/sessionTreeProjection.js +50 -49
- package/dist/server/sessions/sessionTreeProjection.js.map +1 -1
- package/dist/server/sessions/sessionUiEvents.js +22 -10
- package/dist/server/sessions/sessionUiEvents.js.map +1 -1
- package/dist/server/sessions/sessionUnreadStore.js +53 -3
- package/dist/server/sessions/sessionUnreadStore.js.map +1 -1
- package/dist/server/sessions/spawnSessionTool.js +14 -6
- package/dist/server/sessions/spawnSessionTool.js.map +1 -1
- package/dist/server/sessions/spawnSubsessionTool.js +40 -24
- package/dist/server/sessions/spawnSubsessionTool.js.map +1 -1
- package/dist/server/sessions/spawnTargetResolver.js +1 -1
- package/dist/server/sessions/subsessionCompletionDelivery.js +15 -0
- package/dist/server/sessions/subsessionCompletionDelivery.js.map +1 -0
- package/dist/server/sessions/subsessionCompletionInbox.js +134 -0
- package/dist/server/sessions/subsessionCompletionInbox.js.map +1 -0
- package/dist/server/sessions/subsessionProvenance.js +27 -0
- package/dist/server/sessions/subsessionProvenance.js.map +1 -0
- package/dist/server/sessions/transcriptBranchCache.js +81 -0
- package/dist/server/sessions/transcriptBranchCache.js.map +1 -0
- package/dist/server/sessions/transcriptMarkdown.js +48 -0
- package/dist/server/sessions/transcriptMarkdown.js.map +1 -0
- package/dist/server/sessions/transcriptMessages.js +57 -0
- package/dist/server/sessions/transcriptMessages.js.map +1 -0
- package/dist/server/startupLogger.js +13 -0
- package/dist/server/startupLogger.js.map +1 -0
- package/dist/server/startupUrls.js +27 -0
- package/dist/server/startupUrls.js.map +1 -0
- package/dist/server/status/machineStatusService.js +15 -7
- package/dist/server/status/machineStatusService.js.map +1 -1
- package/dist/server/storage/navigationPreferenceStore.js +138 -0
- package/dist/server/storage/navigationPreferenceStore.js.map +1 -0
- package/dist/server/storage/piPackageDismissalStore.js +78 -0
- package/dist/server/storage/piPackageDismissalStore.js.map +1 -0
- package/dist/server/terminals/{terminalService.js → managementCommandRunService.js} +98 -102
- package/dist/server/terminals/managementCommandRunService.js.map +1 -0
- package/dist/server/terminals/managementTerminalRoutes.js +91 -0
- package/dist/server/terminals/managementTerminalRoutes.js.map +1 -0
- package/dist/server/terminals/requiredTerminalService.js +103 -0
- package/dist/server/terminals/requiredTerminalService.js.map +1 -0
- package/dist/server/webSocketBridge.js +348 -0
- package/dist/server/webSocketBridge.js.map +1 -1
- package/dist/server/workbench/accessStateStore.js +33 -5
- package/dist/server/workbench/accessStateStore.js.map +1 -1
- package/dist/server/workbench/capabilitySearch.js +3 -2
- package/dist/server/workbench/capabilitySearch.js.map +1 -1
- package/dist/server/workbench/gatewayIntegration.js +40 -13
- package/dist/server/workbench/gatewayIntegration.js.map +1 -1
- package/dist/server/workbench/knowledgeSearch.js +100 -0
- package/dist/server/workbench/knowledgeSearch.js.map +1 -0
- package/dist/server/workbench/mcpClient.js +41 -8
- package/dist/server/workbench/mcpClient.js.map +1 -1
- package/dist/server/workbench/skillSync.js +11 -3
- package/dist/server/workbench/skillSync.js.map +1 -1
- package/dist/server/workbench/workbenchClient.js +130 -7
- package/dist/server/workbench/workbenchClient.js.map +1 -1
- package/dist/server/workbench/workbenchTools.js +196 -14
- package/dist/server/workbench/workbenchTools.js.map +1 -1
- package/dist/server/workingDirectory.js +3 -2
- package/dist/server/workingDirectory.js.map +1 -1
- package/dist/server/workspaceExplorerRoutes.js +53 -21
- package/dist/server/workspaceExplorerRoutes.js.map +1 -1
- package/dist/server/workspaces/fileContentService.js +31 -16
- package/dist/server/workspaces/fileContentService.js.map +1 -1
- package/dist/server/workspaces/fileOperationService.js +11 -9
- package/dist/server/workspaces/fileOperationService.js.map +1 -1
- package/dist/server/workspaces/filePreviewService.js +10 -6
- package/dist/server/workspaces/filePreviewService.js.map +1 -1
- package/dist/server/workspaces/fileSuggestions.js +77 -10
- package/dist/server/workspaces/fileSuggestions.js.map +1 -1
- package/dist/server/workspaces/fileTreeService.js +103 -15
- package/dist/server/workspaces/fileTreeService.js.map +1 -1
- package/dist/server/workspaces/normalProjectCwdResolver.js +35 -0
- package/dist/server/workspaces/normalProjectCwdResolver.js.map +1 -0
- package/dist/server/workspaces/pathAccessPolicy.js +24 -18
- package/dist/server/workspaces/pathAccessPolicy.js.map +1 -1
- package/dist/server/workspaces/pathSafety.js +6 -5
- package/dist/server/workspaces/pathSafety.js.map +1 -1
- package/dist/server/workspaces/projectPiWebConfig.js +95 -8
- package/dist/server/workspaces/projectPiWebConfig.js.map +1 -1
- package/dist/server/workspaces/projectWorkspaceCwds.js +0 -5
- package/dist/server/workspaces/projectWorkspaceCwds.js.map +1 -1
- package/dist/server/workspaces/sessionDaemonWorkspaceCatalog.js +37 -22
- package/dist/server/workspaces/sessionDaemonWorkspaceCatalog.js.map +1 -1
- package/dist/server/workspaces/workspaceCatalog.js +6 -4
- package/dist/server/workspaces/workspaceCatalog.js.map +1 -1
- package/dist/server/workspaces/workspaceChangeNotifier.js +12 -0
- package/dist/server/workspaces/workspaceChangeNotifier.js.map +1 -0
- package/dist/server/workspaces/workspaceDeletionRoutes.js +9 -70
- package/dist/server/workspaces/workspaceDeletionRoutes.js.map +1 -1
- package/dist/server/workspaces/workspaceNotificationCommand.js +64 -0
- package/dist/server/workspaces/workspaceNotificationCommand.js.map +1 -0
- package/dist/server/workspaces/workspaceProviderRegistry.js +128 -24
- package/dist/server/workspaces/workspaceProviderRegistry.js.map +1 -1
- package/dist/server/workspaces/workspaceRemovalService.js +41 -7
- package/dist/server/workspaces/workspaceRemovalService.js.map +1 -1
- package/dist/server/workspaces/workspaceRouteContext.js +1 -1
- package/dist/server/workspaces/workspaceRouteContext.js.map +1 -1
- package/dist/server/workspaces/workspaceRouteErrors.js +4 -2
- package/dist/server/workspaces/workspaceRouteErrors.js.map +1 -1
- package/dist/server/workspaces/workspaceUserError.js +18 -0
- package/dist/server/workspaces/workspaceUserError.js.map +1 -0
- package/dist/server-plugin-api.d.ts +349 -49
- package/dist/server-plugin-api.js +344 -2
- package/dist/server-plugin-api.js.map +1 -1
- package/dist/serverPluginRecovery.js +6 -1
- package/dist/serverPluginRecovery.js.map +1 -1
- package/dist/sessiond/activeAgentProfile.js +27 -2
- package/dist/sessiond/activeAgentProfile.js.map +1 -1
- package/dist/sessiond/config.js +4 -3
- package/dist/sessiond/config.js.map +1 -1
- package/dist/sessiond/sessionDaemonClient.js +75 -19
- package/dist/sessiond/sessionDaemonClient.js.map +1 -1
- package/dist/sessiond/sessionDaemonErrors.js +49 -0
- package/dist/sessiond/sessionDaemonErrors.js.map +1 -0
- package/dist/shared/activeAgentProfile.js +2 -34
- package/dist/shared/activeAgentProfile.js.map +1 -1
- package/dist/shared/activity.js +0 -3
- package/dist/shared/activity.js.map +1 -1
- package/dist/shared/apiTypes.js +10 -3
- package/dist/shared/apiTypes.js.map +1 -1
- package/dist/shared/capabilities.js +8 -0
- package/dist/shared/capabilities.js.map +1 -1
- package/dist/shared/federatedRoutes.js +77 -11
- package/dist/shared/federatedRoutes.js.map +1 -1
- package/dist/shared/i18n.js +41 -0
- package/dist/shared/i18n.js.map +1 -0
- package/dist/shared/machinePluginIds.js +30 -7
- package/dist/shared/machinePluginIds.js.map +1 -1
- package/dist/shared/machineStatus.js +46 -3
- package/dist/shared/machineStatus.js.map +1 -1
- package/dist/shared/navigationPreferences.js +6 -0
- package/dist/shared/navigationPreferences.js.map +1 -0
- package/dist/shared/piWebConfigParsing.js +118 -49
- package/dist/shared/piWebConfigParsing.js.map +1 -1
- package/dist/shared/piWebStatusParsing.js +33 -0
- package/dist/shared/piWebStatusParsing.js.map +1 -1
- package/dist/shared/pluginApiTypes.d.ts +87 -8
- package/dist/shared/pluginApiTypes.js +2 -0
- package/dist/shared/pluginApiTypes.js.map +1 -0
- package/dist/shared/pluginBackendProtocol.js +218 -2
- package/dist/shared/pluginBackendProtocol.js.map +1 -1
- package/dist/shared/pluginCatalogTypes.d.ts +49 -0
- package/dist/shared/pluginCatalogTypes.js +156 -0
- package/dist/shared/pluginCatalogTypes.js.map +1 -0
- package/dist/shared/pluginIds.js +10 -1
- package/dist/shared/pluginIds.js.map +1 -1
- package/dist/shared/requiredTerminalPlugin.js +6 -0
- package/dist/shared/requiredTerminalPlugin.js.map +1 -0
- package/dist/shared/serverNoticeContract.js +88 -0
- package/dist/shared/serverNoticeContract.js.map +1 -0
- package/dist/shared/sessionDefaults.js +42 -0
- package/dist/shared/sessionDefaults.js.map +1 -0
- package/dist/shared/sessionMedia.js +12 -0
- package/dist/shared/sessionMedia.js.map +1 -0
- package/dist/shared/streamingBehavior.js +8 -0
- package/dist/shared/streamingBehavior.js.map +1 -0
- package/dist/shared/themePreference.js +24 -0
- package/dist/shared/themePreference.js.map +1 -0
- package/dist/shared/thinkingLevels.js +17 -16
- package/dist/shared/thinkingLevels.js.map +1 -1
- package/dist/shared/workspaceFiles.js.map +1 -1
- package/dist/workspaceNotificationCli.js +95 -0
- package/dist/workspaceNotificationCli.js.map +1 -0
- package/docs/README.md +31 -0
- package/docs/config.md +344 -277
- package/docs/plugins.md +204 -930
- package/examples/session-bridge-plugin/README.md +20 -0
- package/examples/session-bridge-plugin/docs/usage.md +54 -0
- package/examples/session-bridge-plugin/package.json +26 -0
- package/examples/session-bridge-plugin/src/browser/index.ts +87 -0
- package/examples/session-bridge-plugin/src/browser/protocol.ts +24 -0
- package/examples/session-bridge-plugin/src/companion.ts +65 -0
- package/examples/session-bridge-plugin/src/reviewRun.ts +39 -0
- package/examples/session-bridge-plugin/src/server.ts +85 -0
- package/examples/session-bridge-plugin/src/store.ts +80 -0
- package/examples/session-bridge-plugin/tsconfig.json +21 -0
- package/examples/workspace-provider-plugin/README.md +39 -0
- package/examples/workspace-provider-plugin/package.json +25 -0
- package/examples/workspace-provider-plugin/src/browser/index.ts +69 -0
- package/examples/workspace-provider-plugin/src/server.ts +68 -0
- package/examples/workspace-provider-plugin/tsconfig.json +21 -0
- package/extensions/pi-web.ts +3 -1
- package/package.json +59 -36
- package/skills/README.md +28 -2
- package/skills/relay/SKILL.md +24 -89
- package/skills/relay-runner/SKILL.md +74 -0
- package/dist/client/assets/CodeViewer-DCl56K0Z.js +0 -4
- package/dist/client/assets/TerminalPanel-DCvoEjUF.js +0 -187
- package/dist/client/assets/index-CMvms5cF.js +0 -4325
- package/dist/client/assets/vendor-editor-core-vUi74DnD.js +0 -12
- package/dist/client/assets/vendor-editor-languages-DoaXUodB.js +0 -46
- package/dist/client/assets/vendor-editor-legacy-CYBnW6ZU.js +0 -1
- package/dist/client/assets/vendor-terminal-BrP-ENHg.css +0 -1
- package/dist/client/assets/vendor-terminal-D8k4UKM2.js +0 -35
- package/dist/pi-web-plugins/relays/package.json +0 -9
- package/dist/pi-web-plugins/relays/pi-web-plugin.js +0 -44
- package/dist/server/git/gitService.js +0 -290
- package/dist/server/git/gitService.js.map +0 -1
- package/dist/server/gitRoutes.js +0 -23
- package/dist/server/gitRoutes.js.map +0 -1
- package/dist/server/sessions/pendingAskStore.js +0 -278
- package/dist/server/sessions/pendingAskStore.js.map +0 -1
- package/dist/server/terminalProxyRoutes.js +0 -178
- package/dist/server/terminalProxyRoutes.js.map +0 -1
- package/dist/server/terminals/terminalRoutes.js +0 -164
- package/dist/server/terminals/terminalRoutes.js.map +0 -1
- package/dist/server/terminals/terminalService.js.map +0 -1
- package/dist/server/terminals/terminalSize.js +0 -17
- package/dist/server/terminals/terminalSize.js.map +0 -1
- package/dist/server/workspaces/gitWorktreeDiscovery.js +0 -43
- package/dist/server/workspaces/gitWorktreeDiscovery.js.map +0 -1
- package/dist/server/workspaces/workspaceService.js +0 -52
- package/dist/server/workspaces/workspaceService.js.map +0 -1
- /package/dist/{pi-web-plugins → pi-packages}/relays/vendor/README.md +0 -0
- /package/dist/{pi-web-plugins → pi-packages}/relays/vendor/marked.esm.js +0 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
// Generated from pi-web-plugins/git/workspaceDiscoveryHooks.ts. Do not edit directly.
|
|
2
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
3
|
+
import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
|
|
4
|
+
import { dirname, isAbsolute, join, resolve } from "node:path";
|
|
5
|
+
const EVENT = "post-checkout";
|
|
6
|
+
/** Git owns the hook policy; the host owns settings snapshots and notification attribution/transport. */
|
|
7
|
+
export function createWorkspaceDiscoveryHooks(context, runGit, nodeExecutable = process.execPath, instanceNamespace = "") {
|
|
8
|
+
if (instanceNamespace !== "" && !/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,31}$/u.test(instanceNamespace)) {
|
|
9
|
+
throw new Error("PI_WEB_INSTANCE_NAMESPACE must be 1–32 letters, digits, underscores or hyphens, starting with a letter or digit");
|
|
10
|
+
}
|
|
11
|
+
if (!isAbsolute(nodeExecutable))
|
|
12
|
+
throw new Error("Git hook runtime must be an absolute executable path");
|
|
13
|
+
// Serialize this activation's config edits, including registrations sharing a
|
|
14
|
+
// common Git config. Git itself locks writes from other processes.
|
|
15
|
+
let pending = Promise.resolve();
|
|
16
|
+
return Object.freeze({
|
|
17
|
+
reconcile(project, signal) {
|
|
18
|
+
const operation = pending.then(() => reconcile(project, signal));
|
|
19
|
+
pending = operation.catch(() => { });
|
|
20
|
+
return operation;
|
|
21
|
+
},
|
|
22
|
+
async acceptNotification(project, signal) {
|
|
23
|
+
return await enabled(project, signal) && (context.workspaceNotifications?.command(project.id).length ?? 0) > 0;
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
async function enabled(project, signal) {
|
|
27
|
+
signal.throwIfAborted();
|
|
28
|
+
const settings = context.resolveProjectSettings === undefined
|
|
29
|
+
? context.settings
|
|
30
|
+
: await context.resolveProjectSettings(project, signal);
|
|
31
|
+
const value = settings["workspaceDiscoveryHooks"];
|
|
32
|
+
if (value === undefined)
|
|
33
|
+
return true;
|
|
34
|
+
if (typeof value !== "boolean")
|
|
35
|
+
throw new Error("Git setting workspaceDiscoveryHooks must be a boolean");
|
|
36
|
+
return value;
|
|
37
|
+
}
|
|
38
|
+
async function reconcile(project, signal) {
|
|
39
|
+
const isEnabled = await enabled(project, signal);
|
|
40
|
+
// Separate projects/instances may share Git config. This identity belongs
|
|
41
|
+
// to the packaged-helper implementation; older generated helpers are untouched.
|
|
42
|
+
const identity = createHash("sha256")
|
|
43
|
+
.update(JSON.stringify(["packaged-helper", context.pluginId, resolve(context.dataDirectory), project.id]))
|
|
44
|
+
.digest("hex");
|
|
45
|
+
// Keep the unnamespaced production identity byte-for-byte compatible.
|
|
46
|
+
// The name also scopes ownership records; never adopt another instance's hook.
|
|
47
|
+
const prefix = instanceNamespace === "" ? "" : `${instanceNamespace}-`;
|
|
48
|
+
const name = `pi-web-workspace-discovery-${prefix}${identity}`;
|
|
49
|
+
const helper = join(context.packageRoot, "workspace-discovery-notify.cjs");
|
|
50
|
+
const registration = join(context.dataDirectory, "workspace-discovery", `${name}.registration.json`);
|
|
51
|
+
const notifier = context.workspaceNotifications?.command(project.id);
|
|
52
|
+
const command = registrationCommand(helper, nodeExecutable, notifier ?? []);
|
|
53
|
+
const ownedCommands = new Set([command, ...await readRegistrationCommands(registration, signal)]);
|
|
54
|
+
const install = isEnabled && notifier !== undefined && notifier.length > 0;
|
|
55
|
+
if (install && !await supportsNamedHooks(project, signal))
|
|
56
|
+
return;
|
|
57
|
+
const commandKey = `hook.${name}.command`;
|
|
58
|
+
const eventKey = `hook.${name}.event`;
|
|
59
|
+
const commands = await readConfig(project, commandKey, signal);
|
|
60
|
+
const events = await readConfig(project, eventKey, signal);
|
|
61
|
+
if (commands.some((entry) => entry.scope !== "local" || !ownedCommands.has(entry.value))
|
|
62
|
+
|| events.some((entry) => entry.scope !== "local" || (entry.value !== EVENT && commands.length === 0))) {
|
|
63
|
+
// We only install local keys. A same-name global/worktree registration is
|
|
64
|
+
// external even if its values happen to match ours; never override it or
|
|
65
|
+
// remove the local command on which its inherited event might depend.
|
|
66
|
+
throw new Error(`Git workspace discovery hook conflict: ${name} has unexpected configuration`);
|
|
67
|
+
}
|
|
68
|
+
if (!install) {
|
|
69
|
+
// Disconnect the event first: an event without a command makes Git fail.
|
|
70
|
+
// Installation uses the reverse order for the same reason.
|
|
71
|
+
await unsetLocal(project, eventKey, events, signal);
|
|
72
|
+
await unsetLocal(project, commandKey, commands, signal);
|
|
73
|
+
signal.throwIfAborted();
|
|
74
|
+
await rm(registration, { force: true });
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
// Routing/runtime arguments live in Git config, not generated executable
|
|
78
|
+
// files. Preserve exact ownership before changing config, including either
|
|
79
|
+
// side of a failed update, then compact after installation succeeds.
|
|
80
|
+
await writeRegistration([...new Set([...commands.map((entry) => entry.value), command])]);
|
|
81
|
+
await setLocal(project, commandKey, command, commands, signal);
|
|
82
|
+
await setLocal(project, eventKey, EVENT, events, signal);
|
|
83
|
+
await writeRegistration([command]);
|
|
84
|
+
async function writeRegistration(owned) {
|
|
85
|
+
await writeOwnedFileIfChanged(registration, `${JSON.stringify({ version: 1, commands: owned })}\n`, signal);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
async function supportsNamedHooks(project, signal) {
|
|
89
|
+
// Detect Git's advertised named-config facility, not its version. `hook
|
|
90
|
+
// list` is unsuitable here: a missing command in an existing registration
|
|
91
|
+
// makes it fail, preventing precisely the repair we need to perform.
|
|
92
|
+
const result = await runGit(project.path, ["help", "--config"], signal);
|
|
93
|
+
if (result.signal !== null)
|
|
94
|
+
throw new Error(`Git named-hook detection ended from signal ${result.signal}`);
|
|
95
|
+
const keys = result.stdout.split(/\r?\n/u);
|
|
96
|
+
const supported = result.exitCode === 0
|
|
97
|
+
&& keys.includes("hook.<friendly-name>.command") && keys.includes("hook.<friendly-name>.event");
|
|
98
|
+
if (!supported)
|
|
99
|
+
context.logger.debug("Git named configuration hooks unavailable; workspace discovery remains on catalog access", { projectId: project.id });
|
|
100
|
+
return supported;
|
|
101
|
+
}
|
|
102
|
+
async function readConfig(project, key, signal) {
|
|
103
|
+
const result = await runGit(project.path, ["config", "--null", "--show-scope", "--get-all", key], signal);
|
|
104
|
+
if (result.signal === null && result.exitCode === 1)
|
|
105
|
+
return [];
|
|
106
|
+
requireSuccess(result, `read ${key}`);
|
|
107
|
+
const fields = result.stdout.split("\0");
|
|
108
|
+
if (fields.pop() !== "" || fields.length % 2 !== 0)
|
|
109
|
+
throw new Error(`Malformed Git config output for ${key}`);
|
|
110
|
+
const entries = [];
|
|
111
|
+
for (let index = 0; index < fields.length; index += 2) {
|
|
112
|
+
entries.push({ scope: fields[index] ?? "", value: fields[index + 1] ?? "" });
|
|
113
|
+
}
|
|
114
|
+
return entries;
|
|
115
|
+
}
|
|
116
|
+
async function setLocal(project, key, value, entries, signal) {
|
|
117
|
+
const local = entries.filter((entry) => entry.scope === "local");
|
|
118
|
+
if (local.length === 1 && local[0]?.value === value)
|
|
119
|
+
return;
|
|
120
|
+
requireSuccess(await runGit(project.path, ["config", "--local", "--replace-all", key, value], signal), `set ${key}`);
|
|
121
|
+
}
|
|
122
|
+
async function unsetLocal(project, key, entries, signal) {
|
|
123
|
+
if (!entries.some((entry) => entry.scope === "local"))
|
|
124
|
+
return;
|
|
125
|
+
requireSuccess(await runGit(project.path, ["config", "--local", "--unset-all", key], signal), `remove ${key}`);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function requireSuccess(result, action) {
|
|
129
|
+
if (result.signal === null && result.exitCode === 0)
|
|
130
|
+
return;
|
|
131
|
+
const outcome = result.signal === null ? `exit ${String(result.exitCode)}` : `signal ${result.signal}`;
|
|
132
|
+
throw new Error(`Unable to ${action} (${outcome}): ${result.stderr.trim()}`);
|
|
133
|
+
}
|
|
134
|
+
function shellQuote(value) {
|
|
135
|
+
return `'${value.replaceAll("'", "'\\''")}'`;
|
|
136
|
+
}
|
|
137
|
+
function registrationCommand(helper, nodeExecutable, notificationCommand) {
|
|
138
|
+
// Git itself supplies the shell and appends quoted hook argv to the function
|
|
139
|
+
// call. No extra `sh` executable is required on the user's PATH. The final
|
|
140
|
+
// return preserves best-effort behavior even when our helper/runtime is gone.
|
|
141
|
+
const shellHelper = process.platform === "win32" ? helper.replaceAll("\\", "/") : helper;
|
|
142
|
+
const shellNode = process.platform === "win32" ? nodeExecutable.replaceAll("\\", "/") : nodeExecutable;
|
|
143
|
+
return `pi_web_workspace_notify () { if test -r ${shellQuote(shellHelper)}; then ${shellQuote(shellNode)} ${shellQuote(shellHelper)} ${shellQuote(JSON.stringify(notificationCommand))} "$@" >/dev/null 2>&1; fi; return 0; }; pi_web_workspace_notify`;
|
|
144
|
+
}
|
|
145
|
+
async function readRegistrationCommands(path, signal) {
|
|
146
|
+
let source;
|
|
147
|
+
try {
|
|
148
|
+
source = await readFile(path, { encoding: "utf8", signal });
|
|
149
|
+
}
|
|
150
|
+
catch (error) {
|
|
151
|
+
if (error instanceof Error && "code" in error && error.code === "ENOENT")
|
|
152
|
+
return [];
|
|
153
|
+
throw error;
|
|
154
|
+
}
|
|
155
|
+
const value = JSON.parse(source);
|
|
156
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)
|
|
157
|
+
|| Reflect.get(value, "version") !== 1)
|
|
158
|
+
throw new Error(`Invalid PI WEB Git hook registration record: ${path}`);
|
|
159
|
+
const commands = Reflect.get(value, "commands");
|
|
160
|
+
if (!Array.isArray(commands) || !commands.every((command) => typeof command === "string" && command.length > 0)) {
|
|
161
|
+
throw new Error(`Invalid PI WEB Git hook command record: ${path}`);
|
|
162
|
+
}
|
|
163
|
+
return commands;
|
|
164
|
+
}
|
|
165
|
+
async function writeOwnedFileIfChanged(path, source, signal) {
|
|
166
|
+
signal.throwIfAborted();
|
|
167
|
+
try {
|
|
168
|
+
if (await readFile(path, { encoding: "utf8", signal }) === source)
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
catch (error) {
|
|
172
|
+
if (!(error instanceof Error) || !("code" in error) || error.code !== "ENOENT")
|
|
173
|
+
throw error;
|
|
174
|
+
}
|
|
175
|
+
await mkdir(dirname(path), { recursive: true });
|
|
176
|
+
// Atomic per-project ownership records never contain executable code.
|
|
177
|
+
const temporary = `${path}.${randomUUID()}.tmp`;
|
|
178
|
+
try {
|
|
179
|
+
await writeFile(temporary, source, { flag: "wx", mode: 0o600, signal });
|
|
180
|
+
signal.throwIfAborted();
|
|
181
|
+
await rename(temporary, path);
|
|
182
|
+
}
|
|
183
|
+
finally {
|
|
184
|
+
await rm(temporary, { force: true });
|
|
185
|
+
}
|
|
186
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Generated from pi-web-plugins/info/i18n.ts. Do not edit directly.
|
|
2
|
+
let translate;
|
|
3
|
+
export function setTranslator(value) {
|
|
4
|
+
translate = value;
|
|
5
|
+
}
|
|
6
|
+
export const t = (key, fallback, params) => translate?.(key, fallback, params)
|
|
7
|
+
?? fallback.replace(/\{([A-Za-z0-9_]+)\}/g, (match, name) => String(params?.[name] ?? match));
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
// Generated from pi-web-plugins/info/infoInternals.ts. Do not edit directly.
|
|
2
|
-
|
|
3
|
-
//
|
|
4
|
-
// This file is NOT part of the plugin skeleton. If you copied the Info plugin
|
|
5
|
-
// as a starting point for your own plugin, replace everything here with your
|
|
6
|
-
// own content — the plugin contract (metadata and contribution definitions)
|
|
7
|
-
// lives in pi-web-plugin.ts.
|
|
2
|
+
import { t } from "./i18n.js";
|
|
8
3
|
export function componentHealth(component) {
|
|
9
4
|
if (!component.available)
|
|
10
5
|
return "unavailable";
|
|
@@ -14,95 +9,105 @@ export function componentHealth(component) {
|
|
|
14
9
|
}
|
|
15
10
|
function componentHealthLabel(health) {
|
|
16
11
|
if (health === "current")
|
|
17
|
-
return "
|
|
12
|
+
return t("bundled.info.current.837bc9", "Current");
|
|
18
13
|
if (health === "restart needed")
|
|
19
|
-
return "
|
|
20
|
-
return "
|
|
14
|
+
return t("bundled.info.restart.needed.1ffd00", "Restart needed");
|
|
15
|
+
return t("bundled.info.unavailable.460b35", "Unavailable");
|
|
21
16
|
}
|
|
22
17
|
function componentDisplayLabel(component) {
|
|
23
18
|
if (component.component === "web")
|
|
24
|
-
return "Web
|
|
25
|
-
return "
|
|
19
|
+
return t("bundled.info.web.ui.86d6a2", "Web/UI");
|
|
20
|
+
return t("bundled.info.session.daemon.757666", "Session daemon");
|
|
26
21
|
}
|
|
27
22
|
export function formatVersion(version) {
|
|
28
|
-
return version === undefined || version === "" ? "
|
|
23
|
+
return version === undefined || version === "" ? t("bundled.info.unknown.4d8c1c", "Unknown") : version;
|
|
29
24
|
}
|
|
30
25
|
export function installationLabel(installation) {
|
|
31
26
|
if (installation === undefined)
|
|
32
|
-
return "
|
|
27
|
+
return t("bundled.info.unknown.installation.b61c94", "Unknown installation");
|
|
33
28
|
if (installation.kind === "pi-package") {
|
|
34
29
|
const scope = installation.scope === undefined ? "" : ` · ${installationScopeLabel(installation.scope)}`;
|
|
35
|
-
const source = installation.source ?? "Pi
|
|
30
|
+
const source = installation.source ?? t("bundled.info.pi.package.feed18", "Pi package");
|
|
36
31
|
return `${source}${scope}`;
|
|
37
32
|
}
|
|
38
33
|
if (installation.kind === "npm-global")
|
|
39
|
-
return "
|
|
34
|
+
return t("bundled.info.global.npm.package.5e8079", "Global npm package");
|
|
40
35
|
if (installation.kind === "local")
|
|
41
|
-
return "
|
|
36
|
+
return t("bundled.info.local.checkout.19c28f", "Local checkout");
|
|
42
37
|
if (installation.kind === "docker")
|
|
43
|
-
return installation.dockerMode === "dev" ? "Docker
|
|
44
|
-
return "
|
|
38
|
+
return installation.dockerMode === "dev" ? t("bundled.info.docker.development.runtime.9ba6d5", "Docker development runtime") : t("bundled.info.docker.runtime.8ce6fc", "Docker runtime");
|
|
39
|
+
return t("bundled.info.unknown.installation.b61c94", "Unknown installation");
|
|
45
40
|
}
|
|
46
41
|
function installationScopeLabel(scope) {
|
|
47
|
-
return scope === "user" ? "
|
|
42
|
+
return scope === "user" ? t("bundled.info.user.scope.7baed5", "User scope") : t("bundled.info.project.scope.0d9798", "Project scope");
|
|
48
43
|
}
|
|
49
44
|
export function machineKindLabel(kind) {
|
|
50
|
-
return kind === "local" ? "
|
|
45
|
+
return kind === "local" ? t("bundled.info.local.machine.ae3fff", "Local machine") : t("bundled.info.remote.machine.674281", "Remote machine");
|
|
51
46
|
}
|
|
52
47
|
export function releaseSummary(release) {
|
|
53
48
|
if (release.updateAvailable) {
|
|
54
49
|
return release.latestVersion === undefined || release.latestVersion === ""
|
|
55
|
-
? "
|
|
56
|
-
:
|
|
50
|
+
? t("bundled.info.update.available.5f3ed8", "Update available")
|
|
51
|
+
: t("bundled.info.update.available.6dee04", "Update available: {value1}", { value1: release.latestVersion });
|
|
57
52
|
}
|
|
58
53
|
if (release.error !== undefined && release.error !== "")
|
|
59
|
-
return
|
|
54
|
+
return t("bundled.info.update.check.failed.b2e600", "Update check failed: {value1}", { value1: release.error });
|
|
60
55
|
if (release.skipped === true)
|
|
61
|
-
return "
|
|
62
|
-
return "
|
|
56
|
+
return t("bundled.info.update.check.skipped.966bfb", "Update check skipped");
|
|
57
|
+
return t("bundled.info.up.to.date.bc3104", "Up to date");
|
|
63
58
|
}
|
|
64
59
|
/** One-line component summary used by the panel rows and the clipboard diagnostics. */
|
|
65
60
|
export function componentDetails(component) {
|
|
66
61
|
const parts = [
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
t("bundled.info.runtime.09b6b8", "Runtime {value1}", { value1: formatVersion(component.runtimeVersion) }),
|
|
63
|
+
t("bundled.info.installed.a6f713", "Installed {value1}", { value1: formatVersion(component.installedVersion) }),
|
|
64
|
+
`Pi ${formatVersion(component.piVersion)}`,
|
|
69
65
|
componentHealthLabel(componentHealth(component)),
|
|
70
66
|
installationLabel(component.installation),
|
|
71
67
|
];
|
|
72
68
|
if (component.installation?.path !== undefined && component.installation.path !== "")
|
|
73
69
|
parts.push(component.installation.path);
|
|
74
70
|
if (component.error !== undefined && component.error !== "")
|
|
75
|
-
parts.push(
|
|
71
|
+
parts.push(t("bundled.info.error.66432a", "Error: {value1}", { value1: component.error }));
|
|
76
72
|
return parts.join(" · ");
|
|
77
73
|
}
|
|
74
|
+
/** Notes when the daemon has not yet reloaded the Pi version used by the web process. */
|
|
75
|
+
export function piVersionDriftNote(web, sessiond) {
|
|
76
|
+
if (!sessiond.available || web.piVersion === undefined || sessiond.piVersion === undefined)
|
|
77
|
+
return undefined;
|
|
78
|
+
return web.piVersion === sessiond.piVersion ? undefined : t("ui.main.5f903de305f2", "The session daemon is running {arg0}", { arg0: formatVersion(sessiond.piVersion) });
|
|
79
|
+
}
|
|
78
80
|
export function workspaceFlags(workspace) {
|
|
79
81
|
return [
|
|
80
|
-
workspace.
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
workspace.provider === undefined
|
|
83
|
+
? workspace.isGitRepo === undefined && workspace.isGitWorktree !== true ? t("ui.main.5a99dc72f4a4", "folder workspace") : undefined
|
|
84
|
+
: t("ui.main.830784126ed0", "Provider {arg0}", { arg0: workspace.provider.pluginId }),
|
|
85
|
+
workspace.branch === undefined || workspace.branch === "" ? undefined : t("bundled.info.branch.198c3e", "Branch {value1}", { value1: workspace.branch }),
|
|
86
|
+
workspace.isGitWorktree === true ? t("bundled.info.git.worktree.c0db6b", "Git worktree") : workspace.isGitRepo === true ? t("bundled.info.git.repository.6a0dac", "Git repository") : workspace.isGitRepo === false ? t("bundled.info.non.git.directory.0936b0", "Non-Git directory") : undefined,
|
|
87
|
+
workspace.isMain ? t("bundled.info.main.workspace.2ac45d", "Main workspace") : undefined,
|
|
83
88
|
].filter((flag) => flag !== undefined);
|
|
84
89
|
}
|
|
85
90
|
/** Plain-text status block suitable for pasting into a bug report. */
|
|
86
91
|
export function diagnosticsSummary({ status, machine, workspace }) {
|
|
87
|
-
const lines = ["PI WEB
|
|
92
|
+
const lines = [t("bundled.info.pi.web.diagnostics.1e6afe", "PI WEB diagnostics")];
|
|
88
93
|
if (status === undefined) {
|
|
89
|
-
lines.push("
|
|
94
|
+
lines.push(t("bundled.info.status.unavailable.e0e66a", "Status: unavailable"));
|
|
90
95
|
}
|
|
91
96
|
else {
|
|
92
|
-
lines.push(
|
|
93
|
-
lines.push(
|
|
94
|
-
lines.push(
|
|
95
|
-
const checked = status.release.checkedAt === undefined || status.release.skipped === true ? "" :
|
|
96
|
-
lines.push(
|
|
97
|
-
lines.push(
|
|
97
|
+
lines.push(t("bundled.info.package.6efebc", "Package: {value1}", { value1: status.packageName }));
|
|
98
|
+
lines.push(t("bundled.info.component.details", "{component}: {details}", { component: componentDisplayLabel(status.components.web), details: componentDetails(status.components.web) }));
|
|
99
|
+
lines.push(t("bundled.info.component.details", "{component}: {details}", { component: componentDisplayLabel(status.components.sessiond), details: componentDetails(status.components.sessiond) }));
|
|
100
|
+
const checked = status.release.checkedAt === undefined || status.release.skipped === true ? "" : t("bundled.info.checked.at.1ecc98", " (checked at {value1})", { value1: status.release.checkedAt });
|
|
101
|
+
lines.push(t("bundled.info.release.386d3e", "Release: {value1}{value2}", { value1: releaseSummary(status.release), value2: checked }));
|
|
102
|
+
lines.push(t("bundled.info.status.generated.ff5eec", "Status generated: {value1}", { value1: status.generatedAt }));
|
|
98
103
|
}
|
|
99
104
|
if (machine !== undefined)
|
|
100
|
-
lines.push(
|
|
105
|
+
lines.push(t("bundled.info.machine.58d58d", "Machine: {value1} ({value2})", { value1: machine.name, value2: machineKindLabel(machine.kind) }));
|
|
101
106
|
if (workspace === undefined) {
|
|
102
|
-
lines.push("
|
|
107
|
+
lines.push(t("bundled.info.workspace.not.selected.a88368", "Workspace: not selected"));
|
|
103
108
|
}
|
|
104
109
|
else {
|
|
105
|
-
lines.push(
|
|
110
|
+
lines.push(t("bundled.info.workspace.fd59a8", "Workspace: {value1} - {value2} ({value3})", { value1: workspace.label, value2: workspace.path, value3: workspaceFlags(workspace).join(t("bundled.info.list.separator", ", ")) }));
|
|
106
111
|
}
|
|
107
112
|
return lines.join("\n");
|
|
108
113
|
}
|
|
@@ -130,39 +135,45 @@ function renderStatusSection(html, status) {
|
|
|
130
135
|
return html `
|
|
131
136
|
<section>
|
|
132
137
|
<strong>PI WEB</strong>
|
|
133
|
-
<p class="muted"
|
|
138
|
+
<p class="muted">${t("bundled.info.pi.web.status.is.unavailable.it.will.refresh.automatically.381f51", "PI WEB status is unavailable. It will refresh automatically.")}</p>
|
|
134
139
|
</section>
|
|
135
140
|
`;
|
|
136
141
|
}
|
|
137
142
|
const web = status.components.web;
|
|
143
|
+
const driftNote = piVersionDriftNote(web, status.components.sessiond);
|
|
138
144
|
const messageCount = status.messages.length;
|
|
139
145
|
return html `
|
|
140
146
|
<section>
|
|
141
147
|
<strong>PI WEB</strong>
|
|
142
148
|
<div class="info-row">
|
|
143
|
-
<span
|
|
144
|
-
<span>${formatVersion(web.runtimeVersion)}</span>
|
|
145
|
-
${web.installedVersion === undefined || web.installedVersion === web.runtimeVersion ? null : html `<small
|
|
146
|
-
</div>
|
|
147
|
-
<div class="info-row">
|
|
148
|
-
<span
|
|
149
|
+
<span>${t("bundled.info.version.5f76b2", "Version")}</span>
|
|
150
|
+
<span>${formatVersion(web.runtimeVersion)}</span>
|
|
151
|
+
${web.installedVersion === undefined || web.installedVersion === web.runtimeVersion ? null : html `<small>${t("ui.piPackageSettings.installed", "installed")} ${formatVersion(web.installedVersion)}</small>`}
|
|
152
|
+
</div>
|
|
153
|
+
<div class="info-row">
|
|
154
|
+
<span>Pi</span>
|
|
155
|
+
<span>${formatVersion(web.piVersion)}</span>
|
|
156
|
+
${driftNote === undefined ? null : html `<small>${driftNote}</small>`}
|
|
157
|
+
</div>
|
|
158
|
+
<div class="info-row">
|
|
159
|
+
<span>${t("bundled.info.package.26b9c4", "Package")}</span>
|
|
149
160
|
<span>${status.packageName}</span>
|
|
150
161
|
</div>
|
|
151
162
|
<div class="info-row">
|
|
152
|
-
<span
|
|
163
|
+
<span>${t("bundled.info.installation.9c320c", "Installation")}</span>
|
|
153
164
|
<span>${installationLabel(web.installation)}</span>
|
|
154
165
|
${web.installation?.path === undefined || web.installation.path === "" ? null : html `<small>${web.installation.path}</small>`}
|
|
155
166
|
</div>
|
|
156
167
|
<div class="info-row">
|
|
157
|
-
<span
|
|
168
|
+
<span>${t("bundled.info.release.5100f0", "Release")}</span>
|
|
158
169
|
<span>${releaseSummary(status.release)}</span>
|
|
159
|
-
${status.release.checkedAt === undefined || status.release.skipped === true ? null : html `<small
|
|
170
|
+
${status.release.checkedAt === undefined || status.release.skipped === true ? null : html `<small>${t("bundled.info.checked.at.cc4691", "Checked at {value1}", { value1: status.release.checkedAt })}</small>`}
|
|
160
171
|
</div>
|
|
161
|
-
${messageCount === 0 ? null : html `<p class="muted">${String(messageCount)}
|
|
162
|
-
<p class="muted"
|
|
172
|
+
${messageCount === 0 ? null : html `<p class="muted">${t("bundled.info.status.messages.open.updates.for.details.6ca1fc", "{value1} status messages. Open Updates for details.", { value1: String(messageCount) })}</p>`}
|
|
173
|
+
<p class="muted">${t("bundled.info.status.generated.at.92be3c", "Status generated at {value1}", { value1: status.generatedAt })}</p>
|
|
163
174
|
</section>
|
|
164
175
|
<section>
|
|
165
|
-
<strong
|
|
176
|
+
<strong>${t("bundled.info.services.ec309a", "Services")}</strong>
|
|
166
177
|
${renderComponent(html, status.components.web)}
|
|
167
178
|
${renderComponent(html, status.components.sessiond)}
|
|
168
179
|
</section>
|
|
@@ -171,13 +182,13 @@ function renderStatusSection(html, status) {
|
|
|
171
182
|
function renderMachineSection(html, machine) {
|
|
172
183
|
return html `
|
|
173
184
|
<section>
|
|
174
|
-
<strong
|
|
185
|
+
<strong>${t("bundled.info.machine.ece969", "Machine")}</strong>
|
|
175
186
|
<div class="info-row">
|
|
176
|
-
<span
|
|
187
|
+
<span>${t("bundled.info.name.d44e9b", "Name")}</span>
|
|
177
188
|
<span>${machine.name}</span>
|
|
178
189
|
</div>
|
|
179
190
|
<div class="info-row">
|
|
180
|
-
<span
|
|
191
|
+
<span>${t("bundled.info.type.ba4001", "Type")}</span>
|
|
181
192
|
<span>${machineKindLabel(machine.kind)}</span>
|
|
182
193
|
</div>
|
|
183
194
|
</section>
|
|
@@ -186,20 +197,20 @@ function renderMachineSection(html, machine) {
|
|
|
186
197
|
function renderWorkspaceSection(html, workspace) {
|
|
187
198
|
return html `
|
|
188
199
|
<section>
|
|
189
|
-
<strong
|
|
200
|
+
<strong>${t("bundled.info.workspace.379798", "Workspace")}</strong>
|
|
190
201
|
<div class="info-row">
|
|
191
|
-
<span
|
|
202
|
+
<span>${t("bundled.info.name.d44e9b", "Name")}</span>
|
|
192
203
|
<span>${workspace.label}</span>
|
|
193
204
|
</div>
|
|
194
205
|
<div class="info-row">
|
|
195
|
-
<span
|
|
206
|
+
<span>${t("bundled.info.path.77e1ea", "Path")}</span>
|
|
196
207
|
<span class="info-path">${workspace.path}</span>
|
|
197
208
|
${workspaceFlags(workspace).length === 0 ? null : html `<small>${workspaceFlags(workspace).join(" · ")}</small>`}
|
|
198
209
|
</div>
|
|
199
210
|
</section>
|
|
200
211
|
`;
|
|
201
212
|
}
|
|
202
|
-
/** Panel body:
|
|
213
|
+
/** Panel body: machine status is useful even without a selected workspace. */
|
|
203
214
|
export function renderInfoPanel(html, context) {
|
|
204
215
|
return html `
|
|
205
216
|
<style>
|
|
@@ -213,11 +224,11 @@ export function renderInfoPanel(html, context) {
|
|
|
213
224
|
.info-health-ok { color: var(--pi-success); }
|
|
214
225
|
.info-health-attention { color: var(--pi-warning); }
|
|
215
226
|
</style>
|
|
216
|
-
<section class="toolbar"><strong
|
|
227
|
+
<section class="toolbar"><strong>${t("bundled.info.info.e70286", "Info")}</strong></section>
|
|
217
228
|
<section class="viewer info-status">
|
|
218
|
-
${renderStatusSection(html, context.state
|
|
229
|
+
${renderStatusSection(html, context.state.piWebStatus)}
|
|
219
230
|
${renderMachineSection(html, context.machine)}
|
|
220
|
-
${renderWorkspaceSection(html, context.workspace)}
|
|
231
|
+
${context.workspace === undefined ? null : renderWorkspaceSection(html, context.workspace)}
|
|
221
232
|
</section>
|
|
222
233
|
`;
|
|
223
234
|
}
|
|
@@ -1,48 +1,46 @@
|
|
|
1
1
|
// Generated from pi-web-plugins/info/pi-web-plugin.ts. Do not edit directly.
|
|
2
|
-
|
|
3
|
-
//
|
|
4
|
-
// Everything the bundled Info panel and action actually render lives in
|
|
5
|
-
// infoInternals.ts. That file is replaceable implementation detail — when
|
|
6
|
-
// copying this plugin as a starting point, keep this file's shape and swap
|
|
7
|
-
// the internals for your own.
|
|
2
|
+
import { t, setTranslator } from "./i18n.js";
|
|
8
3
|
import { copyDiagnostics, renderInfoPanel } from "./infoInternals.js";
|
|
9
4
|
const plugin = {
|
|
10
|
-
apiVersion:
|
|
11
|
-
name: "
|
|
12
|
-
activate: ({ html, svg }) =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<
|
|
39
|
-
|
|
5
|
+
apiVersion: 4,
|
|
6
|
+
name: t("bundled.info.info.plugin.b6e61e", "Info plugin"),
|
|
7
|
+
activate: ({ html, svg, translate }) => {
|
|
8
|
+
setTranslator(translate);
|
|
9
|
+
return ({
|
|
10
|
+
contributions: {
|
|
11
|
+
actions: [
|
|
12
|
+
{
|
|
13
|
+
id: "copy-diagnostics",
|
|
14
|
+
title: t("bundled.info.copy.pi.web.diagnostics.250f13", "Copy PI WEB diagnostics"),
|
|
15
|
+
description: t("bundled.info.copy.this.machine.s.version.installation.and.status.details.for.a.c01908", "Copy this machine's version, installation, and status details for a bug report"),
|
|
16
|
+
group: t("bundled.info.info.e70286", "Info"),
|
|
17
|
+
run: (context) => copyDiagnostics(context),
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
workspaceLabels: [
|
|
21
|
+
{
|
|
22
|
+
id: "workspace.kind-label",
|
|
23
|
+
order: 100,
|
|
24
|
+
items: (context) => [{ type: "text", text: context.workspace.provider?.pluginId ?? (context.workspace.isGitRepo === true ? "Git" : t("bundled.info.folder.7c7802", "Folder")), title: context.workspace.path }],
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
applicationPanels: [
|
|
28
|
+
{
|
|
29
|
+
id: "workspace.info",
|
|
30
|
+
title: t("bundled.info.info.e70286", "Info"),
|
|
31
|
+
icon: svg `
|
|
32
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
33
|
+
<circle cx="12" cy="12" r="9"></circle>
|
|
34
|
+
<path d="M12 11v5"></path>
|
|
35
|
+
<path d="M12 8h.01"></path>
|
|
36
|
+
</svg>
|
|
40
37
|
`,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
order: 1000,
|
|
39
|
+
render: (context) => renderInfoPanel(html, context),
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
},
|
|
47
45
|
};
|
|
48
46
|
export default plugin;
|