@chainingintention/pi-web-cn 1.202610.0 → 1.202610.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -106
- package/dist/.plugins-ready +1 -0
- package/dist/cli.js +161 -45
- package/dist/cli.js.map +1 -1
- package/dist/client/assets/index-CFhaGb5m.js +4357 -0
- package/dist/client/assets/vendor-editor-core-YWog6mAR.js +10 -0
- package/dist/client/assets/vendor-editor-languages-DOCw3vc9.js +28 -0
- package/dist/client/index.html +5 -5
- package/dist/config.js +30 -6
- package/dist/config.js.map +1 -1
- package/dist/docker/piWebDockerCommandPlan.js +13 -4
- package/dist/docker/piWebDockerCommandPlan.js.map +1 -1
- package/dist/nativeServices/installedServiceDefinitions.js +23 -10
- package/dist/nativeServices/installedServiceDefinitions.js.map +1 -1
- package/dist/nativeServices/serviceAction.js +78 -20
- package/dist/nativeServices/serviceAction.js.map +1 -1
- package/dist/nativeServices/serviceDoctor.js +339 -67
- 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 +146 -0
- package/dist/pi-packages/captains-log/dist/browser/markdown.js +67 -0
- package/dist/pi-packages/captains-log/dist/browser/panel.js +151 -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/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/pi-web-plugin.js +9 -9
- package/dist/pi-packages/relays/prompts/relay.md +1 -1
- package/dist/pi-packages/relays/relaysPanelElement.js +8 -8
- package/dist/pi-packages/relays/skills/relay-runner/SKILL.md +21 -13
- 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 +456 -0
- package/dist/pi-web-plugins/files/package.json +15 -0
- package/dist/pi-web-plugins/git/browser/git-panel.js +55 -32
- package/dist/pi-web-plugins/git/browser/pi-web-plugin.js +2 -2
- package/dist/pi-web-plugins/git/git-backend.js +19 -26
- package/dist/pi-web-plugins/git/gitStatusCache.js +48 -0
- package/dist/pi-web-plugins/git/package.json +1 -0
- package/dist/pi-web-plugins/git/server-plugin.js +11 -10
- package/dist/pi-web-plugins/info/infoInternals.js +4 -1
- package/dist/pi-web-plugins/info/package.json +1 -1
- package/dist/pi-web-plugins/info/pi-web-plugin.js +8 -8
- package/dist/pi-web-plugins/mermaid/browser/mermaid-engine.js +3590 -0
- package/dist/pi-web-plugins/mermaid/browser/pi-web-plugin.js +6 -0
- package/dist/pi-web-plugins/mermaid/package.json +13 -0
- package/dist/pi-web-plugins/terminal/browser/pi-web-plugin.js +210 -0
- package/dist/pi-web-plugins/terminal/package.json +16 -0
- package/dist/pi-web-plugins/terminal/server-plugin.js +365 -0
- package/dist/pi-web-plugins/terminal/terminalService.js +435 -0
- package/dist/pi-web-plugins/updates/package.json +1 -1
- package/dist/pi-web-plugins/updates/pi-web-plugin.js +69 -68
- package/dist/pi-web-plugins/workspace-tasks/package.json +1 -1
- package/dist/pi-web-plugins/workspace-tasks/pi-web-plugin.js +3 -3
- package/dist/piWebVersionReport.js +47 -24
- package/dist/piWebVersionReport.js.map +1 -1
- package/dist/plugin-api.d.ts +260 -25
- package/dist/plugin-api.js +1 -0
- package/dist/pluginRecoveryCli.js +3 -2
- package/dist/pluginRecoveryCli.js.map +1 -1
- package/dist/server/activity/workspaceActivityService.js +5 -5
- package/dist/server/activity/workspaceActivityService.js.map +1 -1
- package/dist/server/app.js +71 -44
- package/dist/server/app.js.map +1 -1
- package/dist/server/audit/managementAuditStore.js +1 -1
- package/dist/server/browserMessageProjection.js +0 -2
- package/dist/server/browserMessageProjection.js.map +1 -1
- package/dist/server/configRoutes.js +1 -2
- package/dist/server/configRoutes.js.map +1 -1
- package/dist/server/knownPiPackages.js +12 -0
- package/dist/server/knownPiPackages.js.map +1 -0
- package/dist/server/machines/machineClient.js +2 -2
- package/dist/server/machines/machineClient.js.map +1 -1
- package/dist/server/machines/machinePluginProxyRoutes.js +120 -21
- package/dist/server/machines/machinePluginProxyRoutes.js.map +1 -1
- package/dist/server/machines/machineProxyRoutes.js +80 -22
- package/dist/server/machines/machineProxyRoutes.js.map +1 -1
- package/dist/server/machines/machineService.js +22 -0
- package/dist/server/machines/machineService.js.map +1 -1
- package/dist/server/managementEmbed.js +2 -2
- package/dist/server/managementEmbed.js.map +1 -1
- package/dist/server/managementPrivileges.js +7 -1
- package/dist/server/managementPrivileges.js.map +1 -1
- package/dist/server/managementTerminalProxyRoutes.js +124 -0
- package/dist/server/managementTerminalProxyRoutes.js.map +1 -0
- package/dist/server/normalAuth.js +5 -1
- package/dist/server/normalAuth.js.map +1 -1
- package/dist/server/notices/serverNoticeStore.js +50 -6
- package/dist/server/notices/serverNoticeStore.js.map +1 -1
- package/dist/server/piPackageService.js +5 -5
- package/dist/server/piPackageService.js.map +1 -1
- package/dist/server/piWebPluginCatalog.js +211 -34
- 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 +176 -291
- package/dist/server/piWebPluginService.js.map +1 -1
- package/dist/server/piWebStatus.js +45 -55
- 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 +63 -0
- package/dist/server/plugins/pluginBackendChannelProxyRoutes.js.map +1 -0
- package/dist/server/plugins/pluginBackendProxyRoutes.js +7 -4
- package/dist/server/plugins/pluginBackendProxyRoutes.js.map +1 -1
- package/dist/server/plugins/pluginBackendRegistry.js +773 -0
- package/dist/server/plugins/pluginBackendRegistry.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 +1049 -107
- 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 +84 -0
- package/dist/server/projects/projectLifecycleService.js.map +1 -0
- package/dist/server/projects/projectService.js +2 -0
- package/dist/server/projects/projectService.js.map +1 -1
- package/dist/server/realtime/sessionEventHub.js +35 -41
- package/dist/server/realtime/sessionEventHub.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/pluginBackendChannelRoutes.js +397 -0
- package/dist/server/sessiond/pluginBackendChannelRoutes.js.map +1 -0
- package/dist/server/sessiond/pluginBackendRoutes.js +19 -9
- package/dist/server/sessiond/pluginBackendRoutes.js.map +1 -1
- package/dist/server/sessiond/projectMutationRoutes.js +38 -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 +47 -15
- package/dist/server/sessiond/sessionProxyRoutes.js.map +1 -1
- package/dist/server/sessiond/sessionServiceDependencies.js +4 -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/workspaceRemovalRoutes.js +1 -1
- package/dist/server/sessiond/workspaceRemovalRoutes.js.map +1 -1
- package/dist/server/sessiond.js +226 -56
- package/dist/server/sessiond.js.map +1 -1
- package/dist/server/sessions/askUserTool.js +0 -3
- package/dist/server/sessions/askUserTool.js.map +1 -1
- package/dist/server/sessions/attachmentService.js +0 -1
- package/dist/server/sessions/attachmentService.js.map +1 -1
- package/dist/server/sessions/authService.js +8 -1
- package/dist/server/sessions/authService.js.map +1 -1
- package/dist/server/sessions/builtinCommands.js +2 -2
- package/dist/server/sessions/builtinCommands.js.map +1 -1
- package/dist/server/sessions/clientSessionPreview.js +14 -0
- package/dist/server/sessions/clientSessionPreview.js.map +1 -0
- package/dist/server/sessions/dockerEnvironmentFacts.js +82 -9
- package/dist/server/sessions/dockerEnvironmentFacts.js.map +1 -1
- package/dist/server/sessions/managementAgentTools.js +11 -6
- package/dist/server/sessions/managementAgentTools.js.map +1 -1
- package/dist/server/sessions/managementPermissionSystem.js +16 -4
- package/dist/server/sessions/managementPermissionSystem.js.map +1 -1
- 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 +2 -5
- package/dist/server/sessions/oauthLoginFlowService.js.map +1 -1
- package/dist/server/sessions/pendingAskStore.js +0 -3
- package/dist/server/sessions/pendingAskStore.js.map +1 -1
- package/dist/server/sessions/piSessionEventConnections.js +65 -0
- package/dist/server/sessions/piSessionEventConnections.js.map +1 -0
- package/dist/server/sessions/piSessionManagerGateway.js +56 -3
- package/dist/server/sessions/piSessionManagerGateway.js.map +1 -1
- package/dist/server/sessions/piSessionService.js +785 -450
- package/dist/server/sessions/piSessionService.js.map +1 -1
- package/dist/server/sessions/projectAuthService.js +29 -2
- package/dist/server/sessions/projectAuthService.js.map +1 -1
- package/dist/server/sessions/projectSettingsScope.js +12 -4
- 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/sessionActivityMarker.js +105 -0
- package/dist/server/sessions/sessionActivityMarker.js.map +1 -0
- package/dist/server/sessions/sessionArchiveMapping.js +2 -8
- package/dist/server/sessions/sessionArchiveMapping.js.map +1 -1
- package/dist/server/sessions/sessionCommandService.js +12 -10
- 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/sessionModelScope.js +42 -5
- package/dist/server/sessions/sessionModelScope.js.map +1 -1
- package/dist/server/sessions/sessionNameGenerator.js +6 -6
- package/dist/server/sessions/sessionNameGenerator.js.map +1 -1
- package/dist/server/sessions/sessionRoutes.js +63 -15
- package/dist/server/sessions/sessionRoutes.js.map +1 -1
- package/dist/server/sessions/sessionTreeProjection.js +29 -29
- package/dist/server/sessions/sessionTreeProjection.js.map +1 -1
- package/dist/server/sessions/sessionUiEvents.js +6 -7
- package/dist/server/sessions/sessionUiEvents.js.map +1 -1
- package/dist/server/sessions/sessionUnreadStore.js +26 -1
- package/dist/server/sessions/sessionUnreadStore.js.map +1 -1
- package/dist/server/sessions/spawnSessionTool.js +3 -3
- package/dist/server/sessions/spawnSessionTool.js.map +1 -1
- package/dist/server/sessions/spawnSubsessionTool.js +5 -5
- package/dist/server/sessions/spawnSubsessionTool.js.map +1 -1
- package/dist/server/sessions/spawnTargetResolver.js +1 -1
- package/dist/server/sessions/transcriptMessages.js +54 -0
- package/dist/server/sessions/transcriptMessages.js.map +1 -0
- package/dist/server/status/machineStatusService.js +3 -1
- package/dist/server/status/machineStatusService.js.map +1 -1
- package/dist/server/terminals/{terminalService.js → managementCommandRunService.js} +79 -107
- 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 +339 -0
- package/dist/server/webSocketBridge.js.map +1 -1
- package/dist/server/workbench/gatewayIntegration.js +4 -1
- package/dist/server/workbench/gatewayIntegration.js.map +1 -1
- package/dist/server/workspaceExplorerRoutes.js +13 -12
- package/dist/server/workspaceExplorerRoutes.js.map +1 -1
- package/dist/server/workspaces/fileContentService.js +9 -7
- package/dist/server/workspaces/fileContentService.js.map +1 -1
- package/dist/server/workspaces/fileOperationService.js +4 -3
- package/dist/server/workspaces/fileOperationService.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 +36 -12
- 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/workspaceDeletionRoutes.js +5 -57
- package/dist/server/workspaces/workspaceDeletionRoutes.js.map +1 -1
- package/dist/server/workspaces/workspaceProviderRegistry.js +75 -24
- package/dist/server/workspaces/workspaceProviderRegistry.js.map +1 -1
- package/dist/server/workspaces/workspaceRemovalService.js +25 -3
- package/dist/server/workspaces/workspaceRemovalService.js.map +1 -1
- package/dist/server-plugin-api.d.ts +274 -44
- package/dist/server-plugin-api.js +319 -2
- package/dist/server-plugin-api.js.map +1 -1
- package/dist/serverPluginRecovery.js +4 -0
- 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 +29 -8
- package/dist/sessiond/sessionDaemonClient.js.map +1 -1
- 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 +7 -2
- package/dist/shared/apiTypes.js.map +1 -1
- package/dist/shared/capabilities.js +5 -0
- package/dist/shared/capabilities.js.map +1 -1
- package/dist/shared/federatedRoutes.js +49 -9
- package/dist/shared/federatedRoutes.js.map +1 -1
- package/dist/shared/machinePluginIds.js +30 -7
- package/dist/shared/machinePluginIds.js.map +1 -1
- package/dist/shared/machineStatus.js +35 -1
- package/dist/shared/machineStatus.js.map +1 -1
- package/dist/shared/piWebStatusParsing.js +29 -0
- package/dist/shared/piWebStatusParsing.js.map +1 -1
- package/dist/shared/pluginApiTypes.d.ts +24 -9
- package/dist/shared/pluginApiTypes.js +2 -0
- package/dist/shared/pluginApiTypes.js.map +1 -0
- package/dist/shared/pluginBackendProtocol.js +163 -2
- package/dist/shared/pluginBackendProtocol.js.map +1 -1
- 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 +41 -0
- package/dist/shared/sessionDefaults.js.map +1 -0
- package/dist/shared/workspaceFiles.js.map +1 -1
- package/docs/config.md +270 -323
- package/docs/plugins.md +171 -956
- 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/package.json +22 -13
- package/skills/README.md +27 -2
- package/skills/relay-runner/SKILL.md +21 -13
- package/dist/client/assets/CodeViewer-CZHnKRwQ.js +0 -4
- package/dist/client/assets/TerminalPanel-B_EaRPHY.js +0 -187
- package/dist/client/assets/index-Bv1v-Jz7.js +0 -4717
- 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/server/git/gitService.js +0 -316
- 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/terminalProxyRoutes.js +0 -181
- 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
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { JsonObject, PiWebPlugin, WorkspacePanelContext } from "@chainingintention/pi-web-cn/plugin-api";
|
|
2
|
+
|
|
3
|
+
const summaries = new Map<string, string>();
|
|
4
|
+
|
|
5
|
+
const plugin = {
|
|
6
|
+
apiVersion: 4,
|
|
7
|
+
name: "工作区提供器示例",
|
|
8
|
+
activate: ({ pluginId, runtimePluginId, html }) => ({
|
|
9
|
+
contributions: {
|
|
10
|
+
actions: [
|
|
11
|
+
{
|
|
12
|
+
id: "workspace.open",
|
|
13
|
+
title: "打开工作区提供器示例",
|
|
14
|
+
enabled: ({ state }) => state.selectedWorkspace?.provider?.pluginId === pluginId,
|
|
15
|
+
run: ({ selectWorkspaceTool }) => {
|
|
16
|
+
selectWorkspaceTool(`${runtimePluginId}:workspace.example-provider`);
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
workspacePanels: [
|
|
21
|
+
{
|
|
22
|
+
id: "workspace.example-provider",
|
|
23
|
+
title: "提供器示例",
|
|
24
|
+
visible: ({ workspace }) => workspace.provider?.pluginId === pluginId,
|
|
25
|
+
render: (context) => {
|
|
26
|
+
const marker = stringMetadata(context.workspace.provider?.metadata, "marker") ?? "未知";
|
|
27
|
+
const summary = summaries.get(workspaceKey(context)) ?? "请从此包的服务端插件获取摘要。";
|
|
28
|
+
return html`
|
|
29
|
+
<section class="toolbar"><strong>工作区提供器示例</strong></section>
|
|
30
|
+
<section class="viewer">
|
|
31
|
+
<p>此工作区由 <code>${pluginId}</code> 提供。</p>
|
|
32
|
+
<p class="muted">接管标记:<code>${marker}</code></p>
|
|
33
|
+
<button
|
|
34
|
+
?disabled=${context.peer?.request === undefined}
|
|
35
|
+
@click=${() => { void refreshSummary(context); }}
|
|
36
|
+
>获取包摘要</button>
|
|
37
|
+
<p aria-live="polite">${summary}</p>
|
|
38
|
+
</section>
|
|
39
|
+
`;
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
}),
|
|
45
|
+
} satisfies PiWebPlugin;
|
|
46
|
+
|
|
47
|
+
export default plugin;
|
|
48
|
+
|
|
49
|
+
async function refreshSummary(context: WorkspacePanelContext): Promise<void> {
|
|
50
|
+
const key = workspaceKey(context);
|
|
51
|
+
try {
|
|
52
|
+
if (context.peer?.request === undefined) throw new Error("插件后端不可用");
|
|
53
|
+
const result = await context.peer.request("summary", null);
|
|
54
|
+
if (typeof result !== "string") throw new Error("插件后端返回的摘要无效");
|
|
55
|
+
summaries.set(key, result);
|
|
56
|
+
} catch (error) {
|
|
57
|
+
summaries.set(key, error instanceof Error ? error.message : String(error));
|
|
58
|
+
}
|
|
59
|
+
context.host.requestRender();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function workspaceKey(context: WorkspacePanelContext): string {
|
|
63
|
+
return `${context.machine.id}:${context.workspace.id}`;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function stringMetadata(metadata: JsonObject | undefined, key: string): string | undefined {
|
|
67
|
+
const value = metadata?.[key];
|
|
68
|
+
return typeof value === "string" ? value : undefined;
|
|
69
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { access } from "node:fs/promises";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import type {
|
|
4
|
+
PiWebServerPlugin,
|
|
5
|
+
ProjectInput,
|
|
6
|
+
ProviderClaim,
|
|
7
|
+
ProviderWorkspace,
|
|
8
|
+
ServerPluginPeerRequestContext,
|
|
9
|
+
WorkspaceProvider,
|
|
10
|
+
} from "@chainingintention/pi-web-cn/server-plugin-api";
|
|
11
|
+
|
|
12
|
+
const markerPath = ".pi-web/example-workspace-provider";
|
|
13
|
+
|
|
14
|
+
const plugin: PiWebServerPlugin = {
|
|
15
|
+
apiVersion: 3,
|
|
16
|
+
name: "工作区提供器示例",
|
|
17
|
+
activate({ pluginId, logger }) {
|
|
18
|
+
logger.info("激活工作区提供器示例", { pluginId });
|
|
19
|
+
return {
|
|
20
|
+
workspaceProvider: createWorkspaceProvider(),
|
|
21
|
+
peer: { request: (context) => requestSummary(pluginId, context) },
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default plugin;
|
|
27
|
+
|
|
28
|
+
function createWorkspaceProvider(): WorkspaceProvider {
|
|
29
|
+
return {
|
|
30
|
+
async probe(project: ProjectInput, signal: AbortSignal): Promise<ProviderClaim> {
|
|
31
|
+
signal.throwIfAborted();
|
|
32
|
+
try {
|
|
33
|
+
await access(join(project.path, markerPath));
|
|
34
|
+
signal.throwIfAborted();
|
|
35
|
+
return "claim";
|
|
36
|
+
} catch (error) {
|
|
37
|
+
if (isMissingFile(error)) return "pass";
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
async list(project: ProjectInput, signal: AbortSignal): Promise<ProviderWorkspace[]> {
|
|
42
|
+
signal.throwIfAborted();
|
|
43
|
+
return [{
|
|
44
|
+
key: "main",
|
|
45
|
+
path: project.path,
|
|
46
|
+
label: project.name,
|
|
47
|
+
isMain: true,
|
|
48
|
+
// This object is visible to every browser script and API consumer.
|
|
49
|
+
publicMetadata: { kind: "example", marker: markerPath },
|
|
50
|
+
}];
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function requestSummary(pluginId: string, context: ServerPluginPeerRequestContext): string {
|
|
56
|
+
context.signal.throwIfAborted();
|
|
57
|
+
if (context.operation !== "summary") {
|
|
58
|
+
throw new Error(`不支持的示例工作区操作:${context.operation}`);
|
|
59
|
+
}
|
|
60
|
+
return `${pluginId} 提供工作区 ${context.workspace.label},路径:${context.workspace.path}`;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function isMissingFile(error: unknown): boolean {
|
|
64
|
+
return typeof error === "object"
|
|
65
|
+
&& error !== null
|
|
66
|
+
&& "code" in error
|
|
67
|
+
&& Reflect.get(error, "code") === "ENOENT";
|
|
68
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"lib": ["ES2022", "DOM"],
|
|
7
|
+
"types": ["node"],
|
|
8
|
+
"rootDir": "src",
|
|
9
|
+
"outDir": "dist",
|
|
10
|
+
"strict": true,
|
|
11
|
+
"exactOptionalPropertyTypes": true,
|
|
12
|
+
"noUncheckedIndexedAccess": true,
|
|
13
|
+
"noImplicitReturns": true,
|
|
14
|
+
"noFallthroughCasesInSwitch": true,
|
|
15
|
+
"forceConsistentCasingInFileNames": true,
|
|
16
|
+
"verbatimModuleSyntax": true,
|
|
17
|
+
"skipLibCheck": false,
|
|
18
|
+
"noEmitOnError": true
|
|
19
|
+
},
|
|
20
|
+
"include": ["src/**/*.ts"]
|
|
21
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainingintention/pi-web-cn",
|
|
3
|
-
"version": "1.202610.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.202610.2",
|
|
4
|
+
"description": "Web UI for persistent Pi Coding Agent sessions in real workspaces.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Federico Jaramillo Martinez",
|
|
7
7
|
"type": "module",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"types": "./dist/plugin-api.d.ts"
|
|
11
11
|
},
|
|
12
12
|
"./server-plugin-api": {
|
|
13
|
-
"types": "./dist/server-plugin-api.d.ts"
|
|
13
|
+
"types": "./dist/server-plugin-api.d.ts",
|
|
14
|
+
"import": "./dist/server-plugin-api.js"
|
|
14
15
|
}
|
|
15
16
|
},
|
|
16
17
|
"typesVersions": {
|
|
@@ -37,6 +38,10 @@
|
|
|
37
38
|
"skills/relay/SKILL.md",
|
|
38
39
|
"skills/relay-runner/SKILL.md",
|
|
39
40
|
"extensions",
|
|
41
|
+
"examples/workspace-provider-plugin",
|
|
42
|
+
"examples/session-bridge-plugin",
|
|
43
|
+
"!examples/**/node_modules",
|
|
44
|
+
"!examples/**/dist",
|
|
40
45
|
"docs/plugins.md",
|
|
41
46
|
"docs/config.md",
|
|
42
47
|
"docs/assets",
|
|
@@ -45,8 +50,8 @@
|
|
|
45
50
|
],
|
|
46
51
|
"scripts": {
|
|
47
52
|
"dev": "bash -c 'trap \"kill 0\" EXIT; npm run dev:sessiond & npm run dev:web & npm run dev:client & wait'",
|
|
48
|
-
"dev:sessiond": "
|
|
49
|
-
"dev:web": "
|
|
53
|
+
"dev:sessiond": "node scripts/dev-sessiond.mjs --watch",
|
|
54
|
+
"dev:web": "tsc -p tsconfig.plugins.json && node scripts/dev-web.mjs",
|
|
50
55
|
"dev:server": "npm run dev:web",
|
|
51
56
|
"dev:client": "vite --host 0.0.0.0",
|
|
52
57
|
"dev:plugins": "node scripts/build-plugins.mjs --watch",
|
|
@@ -58,12 +63,13 @@
|
|
|
58
63
|
"typecheck": "tsc --noEmit",
|
|
59
64
|
"typecheck:cached": "tsc --noEmit --incremental --tsBuildInfoFile node_modules/.cache/pi-web/typecheck.tsbuildinfo",
|
|
60
65
|
"knip": "knip",
|
|
61
|
-
"lint": "eslint \"src/**/*.ts\" \"extensions/**/*.ts\" \"pi-web-plugins/**/*.ts\" \"pi-packages/**/*.ts\" vite.config.ts vitest.config.ts",
|
|
66
|
+
"lint": "eslint \"src/**/*.ts\" \"extensions/**/*.ts\" \"pi-web-plugins/**/*.ts\" \"pi-packages/**/*.ts\" vite.config.ts vitest.config.ts vitest.artifacts.config.ts",
|
|
62
67
|
"test": "vitest run --config vitest.config.ts",
|
|
68
|
+
"check:artifacts": "vitest run --config vitest.artifacts.config.ts",
|
|
63
69
|
"verify": "npm run typecheck && npm run lint && npm run knip && npm test",
|
|
64
70
|
"verify:staged": "node scripts/verify-staged.mjs",
|
|
65
71
|
"start": "tsx src/server/index.ts",
|
|
66
|
-
"start:sessiond": "
|
|
72
|
+
"start:sessiond": "node scripts/dev-sessiond.mjs",
|
|
67
73
|
"clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
|
|
68
74
|
"prepack": "npm run build",
|
|
69
75
|
"pack:dry": "npm pack --dry-run",
|
|
@@ -100,23 +106,26 @@
|
|
|
100
106
|
"marked": "^18.0.6",
|
|
101
107
|
"node-pty": "^1.1.0",
|
|
102
108
|
"typebox": "1.3.7",
|
|
109
|
+
"undici": "^8.5.0",
|
|
103
110
|
"ws": "^8.21.0",
|
|
104
111
|
"yauzl": "^3.4.0"
|
|
105
112
|
},
|
|
106
113
|
"devDependencies": {
|
|
107
114
|
"@changesets/cli": "^2.31.0",
|
|
108
|
-
"@earendil-works/pi-agent-core": "0.
|
|
109
|
-
"@earendil-works/pi-ai": "0.
|
|
110
|
-
"@earendil-works/pi-coding-agent": "0.
|
|
115
|
+
"@earendil-works/pi-agent-core": "0.87.0",
|
|
116
|
+
"@earendil-works/pi-ai": "0.87.0",
|
|
117
|
+
"@earendil-works/pi-coding-agent": "0.87.0",
|
|
111
118
|
"@eslint/js": "^10.0.1",
|
|
112
119
|
"@types/node": "^24.13.3",
|
|
113
120
|
"@types/ws": "^8.18.1",
|
|
114
121
|
"@types/yauzl": "^2.10.3",
|
|
115
122
|
"@types/yazl": "^2.4.6",
|
|
123
|
+
"dompurify": "^3.4.15",
|
|
116
124
|
"eslint": "^10.6.0",
|
|
117
125
|
"globals": "^17.7.0",
|
|
118
126
|
"happy-dom": "^20.11.1",
|
|
119
127
|
"knip": "^6.25.0",
|
|
128
|
+
"mermaid": "^11.17.2",
|
|
120
129
|
"tsx": "^4.23.0",
|
|
121
130
|
"typescript": "^6.0.3",
|
|
122
131
|
"typescript-eslint": "^8.63.0",
|
|
@@ -140,9 +149,9 @@
|
|
|
140
149
|
"homepage": "https://github.com/nayuto-wakusei/pi-web-ChineseTranslation#readme",
|
|
141
150
|
"packageManager": "npm@11.11.0",
|
|
142
151
|
"peerDependencies": {
|
|
143
|
-
"@earendil-works/pi-agent-core": "0.86.1",
|
|
144
|
-
"@earendil-works/pi-ai": "0.86.1",
|
|
145
|
-
"@earendil-works/pi-coding-agent": "0.86.1"
|
|
152
|
+
"@earendil-works/pi-agent-core": "0.86.1 || 0.87.0",
|
|
153
|
+
"@earendil-works/pi-ai": "0.86.1 || 0.87.0",
|
|
154
|
+
"@earendil-works/pi-coding-agent": "0.86.1 || 0.87.0"
|
|
146
155
|
},
|
|
147
156
|
"keywords": [
|
|
148
157
|
"pi-package",
|
package/skills/README.md
CHANGED
|
@@ -4,9 +4,34 @@ Distributable agent skills developed alongside pi-web.
|
|
|
4
4
|
|
|
5
5
|
## relay
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
A tool-agnostic foundation for the [Relay Principle](https://relayprinciple.ai/):
|
|
8
|
+
carry long work through a chain of fresh agent contexts, one bounded leg and one
|
|
9
|
+
durable handoff at a time, without a standing coordinator or role hierarchy.
|
|
10
|
+
It defines the method's concepts and invariants but leaves tools and ways of
|
|
11
|
+
working to an operational profile.
|
|
9
12
|
|
|
10
13
|
```bash
|
|
11
14
|
npx skills add jmfederico/pi-web --skill relay -a pi -g
|
|
12
15
|
```
|
|
16
|
+
|
|
17
|
+
## relay-runner
|
|
18
|
+
|
|
19
|
+
The opinionated operational profile used by PI WEB's `/relay` preparation
|
|
20
|
+
prompt. The prompt first establishes a shared understanding and obtains explicit
|
|
21
|
+
human approval without pre-planning the chain; this profile then binds the base
|
|
22
|
+
method to Pi session tools and a Git/software-delivery workflow,
|
|
23
|
+
including adaptive leg sizing, verification and commit policy, whole-work
|
|
24
|
+
review and remediation, delivery, and intervention. Dispatch and handoff
|
|
25
|
+
prompts select both skills before each fresh runner begins.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx skills add jmfederico/pi-web --skill relay-runner -a pi -g
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`relay-runner` is not standalone; install the base `relay` skill as well when
|
|
32
|
+
using these commands directly. The `relays` Pi package ships and installs both
|
|
33
|
+
skills atomically. Its files under
|
|
34
|
+
`pi-packages/relays/skills/` are symlinks to the canonical `SKILL.md` files in
|
|
35
|
+
this directory; the package build (`npm run build:plugins`, or the dev watch)
|
|
36
|
+
materializes them as real packaged files. Edit the canonical copies here, not
|
|
37
|
+
the package links.
|
|
@@ -15,6 +15,7 @@ For a Relay using this profile:
|
|
|
15
15
|
|
|
16
16
|
- Have the preparation prompt select `relay-runner` before drafting the packet. Record it immediately in draft `operations.md` and retain it as required for every active leg, including implementation, review, remediation, and delivery.
|
|
17
17
|
- Name both `relay` and `relay-runner` in every handoff prompt. Fresh sessions cannot inherit a prior runner's loaded skills.
|
|
18
|
+
- Keep every Relay handoff on the current runner's model by omitting the `model` argument, unless instructed to use a specific model or to choose an appropriate one. Record any Relay-wide model instruction in `operations.md` so it remains available to later runners.
|
|
18
19
|
- Treat the charter as destination and scope edges, `operations.md` as this profile's repository and execution bindings, `status.md` as current position and next work, and repository instructions as the quality and implementation authority.
|
|
19
20
|
- Follow canonical repository policy when it conflicts with a profile default. Record a material operational adaptation in `operations.md`, not the charter. Stop for human intervention when reconciling the conflict would change the finish line or an edge, weaken a protected invariant, or require a product or business decision.
|
|
20
21
|
|
|
@@ -53,19 +54,26 @@ Relay intentionally does not predict the chain. Before dispatch, establish the d
|
|
|
53
54
|
|
|
54
55
|
Expected files, subsystems, dependencies, architecture, and sequencing are route assumptions. Keep only what the current or next leg needs in status or a targeted temporary artifact; do not turn route assumptions into stable agreement.
|
|
55
56
|
|
|
56
|
-
A leg is one context-contained, reviewable slice that
|
|
57
|
+
A leg is one context-contained, reviewable slice that advances the finish line. Development legs implement and verify by default: optimize for the smallest useful behaviour, not the smallest independently testable artifact. A functional checkpoint makes an observable charter outcome available and verifies it through the relevant application boundary. A tested but unused module is a prerequisite, not a functional outcome. Setup, required verification, review and delivery remain legitimate lifecycle legs.
|
|
58
|
+
|
|
59
|
+
Slice by supported cases across the necessary layers. When a journey is too large, choose a narrower case or a safe partial capability with explicit limitations, keeping the full charter outstanding. Keep directly coupled implementation, checks, contracts, generated outputs, documentation and integration together.
|
|
57
60
|
|
|
58
61
|
Before substantial work, state the leg's:
|
|
59
62
|
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
|
|
63
|
+
- observable outcome and application boundary;
|
|
64
|
+
- bounded change surface and coupled verification;
|
|
65
|
+
- remaining connection to usable behaviour, if any; and
|
|
66
|
+
- checkpoint type: functional, necessary prerequisite or profile-authorized transitional.
|
|
67
|
+
|
|
68
|
+
An unconnected prerequisite must name the behaviour it enables and why a connected slice cannot reasonably fit. Its successor prioritizes that connection. Before adding another prerequisite-only leg, reassess the slice and simplify the route; continue only when a concrete dependency still prevents connection.
|
|
69
|
+
|
|
70
|
+
Routine reading, design, sizing and test investigation belong inside implementation. A research-only leg requires a specific unanswered question blocking responsible implementation: record the blocked behaviour, why available evidence is insufficient and the result needed to proceed. Answer that question and hand off to implementation; intervene if it remains unresolved. Size or complexity alone calls for a smaller implementation slice.
|
|
71
|
+
|
|
72
|
+
Choose the simplest design satisfying the charter, canonical project rules and concrete risks introduced by the change. Justify additional safeguards against those obligations; keep speculative recovery systems and future-use abstractions outside the slice. Preserve safety when narrowing behaviour.
|
|
65
73
|
|
|
66
|
-
Persist only conclusions useful to the next runner.
|
|
74
|
+
Persist only conclusions useful to the next runner. Keep leg history in the packet log and project documentation focused on current behaviour and contracts.
|
|
67
75
|
|
|
68
|
-
If a leg grows beyond its context-contained slice, stop broadening before context exhaustion. Finish or revert to a functional checkpoint, or use an already authorized transition. Record the next bounded slice. Do not promise a fixed total leg count.
|
|
76
|
+
If a leg grows beyond its context-contained slice, stop broadening before context exhaustion. Finish or revert to a coherent functional or justified prerequisite checkpoint, or use an already authorized transition. Record the next bounded slice. Do not promise a fixed total leg count.
|
|
69
77
|
|
|
70
78
|
When status does not name the next task, choose the smallest coherent slice that advances the critical path or unblocks an agreed outcome. Do not invent cleanup or speculative follow-up merely to fill a leg.
|
|
71
79
|
|
|
@@ -130,7 +138,7 @@ Do **not** put a quality bar, technical design, expected files or subsystems, ve
|
|
|
130
138
|
Write the profile's mechanics to `operations.md` instead:
|
|
131
139
|
|
|
132
140
|
- packet identity and `relay-runner` as the profile required in every leg and handoff;
|
|
133
|
-
-
|
|
141
|
+
- implementation-first leg sizing and outcome-led task selection under this profile, with route assumptions provisional and no fixed leg count;
|
|
134
142
|
- pointers to canonical repository instructions and applicable project skills;
|
|
135
143
|
- checkpoint and transition policy;
|
|
136
144
|
- packet root, working location, branch, immutable base commit, initial HEAD, pre-existing state, packet isolation, and exact review range;
|
|
@@ -158,11 +166,11 @@ Use this loop:
|
|
|
158
166
|
|
|
159
167
|
1. Read `charter.md`, `operations.md`, `status.md`, and only targeted context they reference. Then load canonical project skills applicable to this leg.
|
|
160
168
|
2. Confirm that the prompt's leg identifier, status baton, working location, branch, and blockers are consistent. Resolve small baton defects with targeted inspection; intervene instead of broad archaeology or guessing about intent.
|
|
161
|
-
3.
|
|
169
|
+
3. Use status's next outcome as the starting point. Revise inherited sequencing or design when a simpler connected slice better advances it. Safe implementation splits within the charter are runner decisions, not approval requests. If the intended outcome remains ambiguous or falls outside the finish line, intervene.
|
|
162
170
|
4. Re-anchor to the finish line and perform the containment check. Do exactly one bounded slice. Do not audit unrelated code, execute the next nominal leg too, or expand scope under the guise of quality.
|
|
163
171
|
5. Run every focused check meaningful for the slice and report exact results. Before whole review, run the full verification named by `operations.md`. Never describe failed, skipped, or incomplete verification as passing.
|
|
164
172
|
6. Make delivery changes durable under the operations record's commit policy without absorbing unrelated state. Keep packet-only writes out of delivery commits.
|
|
165
|
-
7. Update status with the
|
|
173
|
+
7. Update status with the observable progress, completed and next leg identifiers, next outcome, existing seam to connect, concrete constraints, remaining unconnected work, targeted context, verification state, blockers and active transition/review pointers. Keep route choices provisional. Append the concise leg entry to the log before stopping or handing off.
|
|
166
174
|
8. Stop without spawning when Relay completion is recorded, the leg is blocked, or an intervention trigger fires. When the chartered outcome is implemented but required review, approval, or delivery remains, name that lifecycle work as the next leg instead of stopping. Surface the intervention signal clearly. Otherwise hand off exactly once at the end with `spawn_session`.
|
|
167
175
|
|
|
168
176
|
Use this handoff shape, substituting the actual paths and next identifier:
|
|
@@ -177,7 +185,7 @@ Load the `relay` and `relay-runner` skills, then read:
|
|
|
177
185
|
- .pi-web/relays/<name>/status.md
|
|
178
186
|
|
|
179
187
|
Do not read log.md end-to-end. Use only targeted entries referenced by charter.md, operations.md, or status.md.
|
|
180
|
-
Run exactly one leg
|
|
188
|
+
Run exactly one outcome-led leg under the profile's implementation-first rules. Use status's next outcome and connection priority; adapt the route within the charter. Make work and packet updates durable, then either hand off once or stop with the recorded intervention signal.
|
|
181
189
|
```
|
|
182
190
|
|
|
183
191
|
## Whole-work review and remediation
|
|
@@ -200,7 +208,7 @@ For each attempt:
|
|
|
200
208
|
- When attempt 2 has a blocking finding, do not automatically consume attempt 3. Invoke the remediation contingency only when concrete evidence shows that an attempted remediation reasonably expected to resolve a blocker did not, remediation introduced an in-scope regression, or materially new evidence reveals a blocker that could not reasonably have been assessed earlier—and one bounded remediation is likely to resolve it. Record that justification, mark the contingency invoked, and dispatch one coherent remediation leg followed by attempt 3. Expanded scrutiny, a changed standard, deferred already-available evidence, or speculative possibility does not qualify. If a genuine blocker remains but the contingency is not justified or bounded, intervene.
|
|
201
209
|
- When exceptional attempt 3 still has any blocking finding, stop the automatic loop. Record the unresolved findings and exact decision needed, raise the human intervention signal, and do **not** dispatch remediation or a fourth review. A human may accept an authorized risk, change the agreement, stop the Relay, or explicitly grant a bounded additional remediation/review attempt.
|
|
202
210
|
|
|
203
|
-
The reviewer chooses proportionate independent review and records that decision. Independent subreviews are optional; use them only when a specific changed surface benefits from focused expertise, not to create review theater or increase the chance of finding something. The reviewer may use `spawn_subsession` for report-only focused reviews, then `yield_to_subsessions` and consolidate. Subreview prompts must identify repository, base and exact diff, the charter's goal and edges, canonical quality instructions, and the prohibition on all writes including packet changes. The consolidating reviewer is the sole packet writer.
|
|
211
|
+
The reviewer chooses proportionate independent review and records that decision. Independent subreviews are optional; use them only when a specific changed surface benefits from focused expertise, not to create review theater or increase the chance of finding something. The reviewer may use `spawn_subsession` for report-only focused reviews, then `yield_to_subsessions` and consolidate. Subreview prompts must identify repository, base and exact diff, the charter's goal and edges, canonical quality instructions, and the prohibition on all writes including packet changes. The consolidating reviewer is the sole packet writer. The Relay handoff still uses one `spawn_session` only at the end of the leg.
|
|
204
212
|
|
|
205
213
|
A blocking finding needs concrete evidence of an in-scope defect: for example a reproduced failure, a failing relevant check, a specific execution path that violates the approved outcome, or a clear breach of a material contract, invariant, security, authorization, or data-integrity boundary. Mere possibility, stylistic preference, optional hardening, hypothetical future requirements, or “there could be an edge case” is not blocking. If proportionate targeted inspection cannot establish applicability and impact, classify the concern as non-blocking or omit it rather than forcing remediation.
|
|
206
214
|
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{$ as e,J as t,P as n,S as r,Y as i,l as a,q as o,y as s}from"./vendor-editor-core-vUi74DnD.js";import{c,i as l,l as u,n as d,r as f,s as p,t as m,u as h}from"./vendor-editor-languages-DoaXUodB.js";import{_ as g,f as _,g as v,m as y,n as b,p as x,u as S}from"./index-Bv1v-Jz7.js";import{t as C}from"./vendor-editor-legacy-CYBnW6ZU.js";var w=class extends y{constructor(...e){super(...e),this.content=``}firstUpdated(){this.recreateEditor()}updated(e){(e.has(`content`)||e.has(`language`))&&this.recreateEditor()}disconnectedCallback(){this.view?.destroy(),this.view=void 0,super.disconnectedCallback()}render(){return v`<div class="host"></div>`}recreateEditor(){this.editorHost&&(this.view?.destroy(),this.view=new o({parent:this.editorHost,state:e.create({doc:this.content,extensions:[i(),t.of(a),n(r,{fallback:!0}),e.readOnly.of(!0),o.editable.of(!1),o.lineWrapping,T,...D(this.language),...O(this.language)]})}))}static{this.styles=g`
|
|
2
|
-
:host { display: block; min-height: 0; height: 100%; }
|
|
3
|
-
.host { height: 100%; min-height: 0; overflow: auto; }
|
|
4
|
-
`}};b([_()],w.prototype,`content`,void 0),b([_()],w.prototype,`language`,void 0),b([S(`.host`)],w.prototype,`editorHost`,void 0),w=b([x(`code-viewer`)],w);var T=o.theme({"&":{height:`100%`,color:`var(--pi-text)`,backgroundColor:`var(--pi-bg)`,fontSize:`12px`},".cm-scroller":{fontFamily:`ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`,lineHeight:`1.45`},".cm-gutters":{backgroundColor:`var(--pi-bg)`,color:`var(--pi-dim)`,borderRight:`1px solid var(--pi-border-muted)`},".cm-activeLineGutter":{backgroundColor:`transparent`},".cm-activeLine":{backgroundColor:`transparent`},".cm-content":{caretColor:`transparent`},"&.cm-focused":{outline:`none`}}),E=o.theme({".cm-content":{textAlign:`start`},".cm-line":{unicodeBidi:`plaintext`}});function D(e){return e===`markdown`?[o.contentAttributes.of({dir:`auto`}),E]:[]}function O(e){if(e===void 0)return[];switch(e){case`typescript`:return[u({typescript:!0})];case`javascript`:return[u()];case`json`:return[l()];case`markdown`:return[p()];case`css`:return[h()];case`html`:return[c()];case`python`:return[f()];case`rust`:return[d()];case`go`:return[m()];case`diff`:return[s.define(C)];default:return[]}}export{w as CodeViewer};
|