@cerbur/clutch-dsh-worktree 0.1.9 → 0.1.12
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 +230 -231
- package/README.zh.md +184 -225
- package/assets/screenshots/screenshots-dashboard.webp +0 -0
- package/assets/screenshots/screenshots-en.png +0 -0
- package/assets/screenshots/screenshots-import.png +0 -0
- package/assets/screenshots/screenshots-zh.png +0 -0
- package/lib/client/WorktreeSurface.d.ts +4 -7
- package/lib/client/WorktreeSurface.d.ts.map +1 -1
- package/lib/client/WorktreeSurface.js +179 -1418
- package/lib/client/WorktreeSurface.js.map +1 -1
- package/lib/client/{WorktreeContext.d.ts → context/WorktreeContext.d.ts} +1 -1
- package/lib/client/context/WorktreeContext.d.ts.map +1 -0
- package/lib/client/context/WorktreeContext.js.map +1 -0
- package/lib/client/{WorktreeHeroContext.d.ts → context/WorktreeHeroContext.d.ts} +1 -1
- package/lib/client/context/WorktreeHeroContext.d.ts.map +1 -0
- package/lib/client/context/WorktreeHeroContext.js.map +1 -0
- package/lib/client/{worktree-context-store.d.ts → context/worktree-context-store.d.ts} +1 -1
- package/lib/client/context/worktree-context-store.d.ts.map +1 -0
- package/lib/client/{worktree-context-store.js → context/worktree-context-store.js} +2 -2
- package/lib/client/context/worktree-context-store.js.map +1 -0
- package/lib/client/{worktree-context.d.ts → context/worktree-context.d.ts} +1 -1
- package/lib/client/context/worktree-context.d.ts.map +1 -0
- package/lib/client/{worktree-context.js → context/worktree-context.js} +5 -3
- package/lib/client/context/worktree-context.js.map +1 -0
- package/lib/client/dashboard/DashboardHeaderAction.d.ts +20 -0
- package/lib/client/dashboard/DashboardHeaderAction.d.ts.map +1 -0
- package/lib/client/dashboard/DashboardHeaderAction.js +19 -0
- package/lib/client/dashboard/DashboardHeaderAction.js.map +1 -0
- package/lib/client/dashboard/OpenInAppButton.d.ts +9 -0
- package/lib/client/dashboard/OpenInAppButton.d.ts.map +1 -0
- package/lib/client/dashboard/OpenInAppButton.js +123 -0
- package/lib/client/dashboard/OpenInAppButton.js.map +1 -0
- package/lib/client/dashboard/WorktreeDashboard.d.ts +21 -0
- package/lib/client/dashboard/WorktreeDashboard.d.ts.map +1 -0
- package/lib/client/dashboard/WorktreeDashboard.js +211 -0
- package/lib/client/dashboard/WorktreeDashboard.js.map +1 -0
- package/lib/client/dashboard/WorktreeInstructions.d.ts +8 -0
- package/lib/client/dashboard/WorktreeInstructions.d.ts.map +1 -0
- package/lib/client/dashboard/WorktreeInstructions.js +53 -0
- package/lib/client/dashboard/WorktreeInstructions.js.map +1 -0
- package/lib/client/dashboard/dashboard-icon.d.ts +7 -0
- package/lib/client/dashboard/dashboard-icon.d.ts.map +1 -0
- package/lib/client/dashboard/dashboard-icon.js +6 -0
- package/lib/client/dashboard/dashboard-icon.js.map +1 -0
- package/lib/client/dashboard/dashboard-overlay.d.ts +11 -0
- package/lib/client/dashboard/dashboard-overlay.d.ts.map +1 -0
- package/lib/client/dashboard/dashboard-overlay.js +120 -0
- package/lib/client/dashboard/dashboard-overlay.js.map +1 -0
- package/lib/client/dashboard/dashboard-selection.d.ts +32 -0
- package/lib/client/dashboard/dashboard-selection.d.ts.map +1 -0
- package/lib/client/dashboard/dashboard-selection.js +31 -0
- package/lib/client/dashboard/dashboard-selection.js.map +1 -0
- package/lib/client/dashboard/dashboard-sessions.d.ts +6 -0
- package/lib/client/dashboard/dashboard-sessions.d.ts.map +1 -0
- package/lib/client/dashboard/dashboard-sessions.js +21 -0
- package/lib/client/dashboard/dashboard-sessions.js.map +1 -0
- package/lib/client/dashboard/open-in-app-controller.d.ts +30 -0
- package/lib/client/dashboard/open-in-app-controller.d.ts.map +1 -0
- package/lib/client/dashboard/open-in-app-controller.js +94 -0
- package/lib/client/dashboard/open-in-app-controller.js.map +1 -0
- package/lib/client/dashboard/vscode-url.d.ts +3 -0
- package/lib/client/dashboard/vscode-url.d.ts.map +1 -0
- package/lib/client/dashboard/vscode-url.js +9 -0
- package/lib/client/dashboard/vscode-url.js.map +1 -0
- package/lib/client/dashboard/worktree-acquisition-facts.d.ts +16 -0
- package/lib/client/dashboard/worktree-acquisition-facts.d.ts.map +1 -0
- package/lib/client/dashboard/worktree-acquisition-facts.js +14 -0
- package/lib/client/dashboard/worktree-acquisition-facts.js.map +1 -0
- package/lib/client/dsh-slot-contract.d.ts +5 -0
- package/lib/client/dsh-slot-contract.d.ts.map +1 -1
- package/lib/client/entry.d.ts +1 -1
- package/lib/client/entry.d.ts.map +1 -1
- package/lib/client/entry.js +90 -13
- package/lib/client/entry.js.map +1 -1
- package/lib/client/index.d.ts +3 -3
- package/lib/client/index.d.ts.map +1 -1
- package/lib/client/index.js +2 -2
- package/lib/client/index.js.map +1 -1
- package/lib/client/locales.d.ts +204 -0
- package/lib/client/locales.d.ts.map +1 -1
- package/lib/client/locales.js +214 -10
- package/lib/client/locales.js.map +1 -1
- package/lib/client/{WorktreeOverlay.d.ts → overlay/WorktreeOverlay.d.ts} +2 -2
- package/lib/client/overlay/WorktreeOverlay.d.ts.map +1 -0
- package/lib/client/{WorktreeOverlay.js → overlay/WorktreeOverlay.js} +2 -2
- package/lib/client/overlay/WorktreeOverlay.js.map +1 -0
- package/lib/client/overlay/overlay-bounds.d.ts.map +1 -0
- package/lib/client/overlay/overlay-bounds.js.map +1 -0
- package/lib/client/overlay/sidebar-overlay-geometry.d.ts.map +1 -0
- package/lib/client/overlay/sidebar-overlay-geometry.js.map +1 -0
- package/lib/client/permission/worktree-permission-icon.d.ts.map +1 -0
- package/lib/client/permission/worktree-permission-icon.js.map +1 -0
- package/lib/client/permission/worktree-permission.d.ts.map +1 -0
- package/lib/client/permission/worktree-permission.js.map +1 -0
- package/lib/client/session/session-labels.d.ts +9 -0
- package/lib/client/session/session-labels.d.ts.map +1 -0
- package/lib/client/session/session-labels.js +44 -0
- package/lib/client/session/session-labels.js.map +1 -0
- package/lib/client/session/session-view.d.ts.map +1 -0
- package/lib/client/session/session-view.js.map +1 -0
- package/lib/client/{virtual-workspace-membership.d.ts → session/virtual-workspace-membership.d.ts} +1 -1
- package/lib/client/session/virtual-workspace-membership.d.ts.map +1 -0
- package/lib/client/{virtual-workspace-membership.js → session/virtual-workspace-membership.js} +1 -1
- package/lib/client/session/virtual-workspace-membership.js.map +1 -0
- package/lib/client/{worktree-session-fork.d.ts → session/worktree-session-fork.d.ts} +7 -1
- package/lib/client/session/worktree-session-fork.d.ts.map +1 -0
- package/lib/client/{worktree-session-fork.js → session/worktree-session-fork.js} +50 -4
- package/lib/client/session/worktree-session-fork.js.map +1 -0
- package/lib/client/session/worktree-session-order.d.ts.map +1 -0
- package/lib/client/session/worktree-session-order.js.map +1 -0
- package/lib/client/session/worktree-session-position.d.ts.map +1 -0
- package/lib/client/session/worktree-session-position.js.map +1 -0
- package/lib/client/{worktree-session.d.ts → session/worktree-session.d.ts} +3 -3
- package/lib/client/session/worktree-session.d.ts.map +1 -0
- package/lib/client/{worktree-session.js → session/worktree-session.js} +3 -3
- package/lib/client/session/worktree-session.js.map +1 -0
- package/lib/client/surface/actions/lifecycle-commands.d.ts +9 -0
- package/lib/client/surface/actions/lifecycle-commands.d.ts.map +1 -0
- package/lib/client/surface/actions/lifecycle-commands.js +243 -0
- package/lib/client/surface/actions/lifecycle-commands.js.map +1 -0
- package/lib/client/surface/actions/useDragActions.d.ts +26 -0
- package/lib/client/surface/actions/useDragActions.d.ts.map +1 -0
- package/lib/client/surface/actions/useDragActions.js +125 -0
- package/lib/client/surface/actions/useDragActions.js.map +1 -0
- package/lib/client/surface/actions/useLifecycleActions.d.ts +30 -0
- package/lib/client/surface/actions/useLifecycleActions.d.ts.map +1 -0
- package/lib/client/surface/actions/useLifecycleActions.js +140 -0
- package/lib/client/surface/actions/useLifecycleActions.js.map +1 -0
- package/lib/client/surface/actions/useNativeActions.d.ts +48 -0
- package/lib/client/surface/actions/useNativeActions.d.ts.map +1 -0
- package/lib/client/surface/actions/useNativeActions.js +182 -0
- package/lib/client/surface/actions/useNativeActions.js.map +1 -0
- package/lib/client/surface/actions/useSessionActions.d.ts +24 -0
- package/lib/client/surface/actions/useSessionActions.d.ts.map +1 -0
- package/lib/client/surface/actions/useSessionActions.js +116 -0
- package/lib/client/surface/actions/useSessionActions.js.map +1 -0
- package/lib/client/surface/actions/useSurfaceMutation.d.ts +15 -0
- package/lib/client/surface/actions/useSurfaceMutation.d.ts.map +1 -0
- package/lib/client/surface/actions/useSurfaceMutation.js +24 -0
- package/lib/client/surface/actions/useSurfaceMutation.js.map +1 -0
- package/lib/client/surface/actions/useWorktreeRegistration.d.ts +31 -0
- package/lib/client/surface/actions/useWorktreeRegistration.d.ts.map +1 -0
- package/lib/client/surface/actions/useWorktreeRegistration.js +203 -0
- package/lib/client/surface/actions/useWorktreeRegistration.js.map +1 -0
- package/lib/client/surface/actions/worktree-cleanup-flow.d.ts +10 -0
- package/lib/client/surface/actions/worktree-cleanup-flow.d.ts.map +1 -0
- package/lib/client/surface/actions/worktree-cleanup-flow.js +19 -0
- package/lib/client/surface/actions/worktree-cleanup-flow.js.map +1 -0
- package/lib/client/surface/components/AccessConfirmation.d.ts +9 -0
- package/lib/client/surface/components/AccessConfirmation.d.ts.map +1 -0
- package/lib/client/surface/components/AccessConfirmation.js +18 -0
- package/lib/client/surface/components/AccessConfirmation.js.map +1 -0
- package/lib/client/surface/components/ActiveWorktree.d.ts +28 -0
- package/lib/client/surface/components/ActiveWorktree.d.ts.map +1 -0
- package/lib/client/surface/components/ActiveWorktree.js +155 -0
- package/lib/client/surface/components/ActiveWorktree.js.map +1 -0
- package/lib/client/surface/components/ArchivedWorktree.d.ts +24 -0
- package/lib/client/surface/components/ArchivedWorktree.d.ts.map +1 -0
- package/lib/client/surface/components/ArchivedWorktree.js +146 -0
- package/lib/client/surface/components/ArchivedWorktree.js.map +1 -0
- package/lib/client/surface/components/ArchivedWorktrees.d.ts +25 -0
- package/lib/client/surface/components/ArchivedWorktrees.d.ts.map +1 -0
- package/lib/client/surface/components/ArchivedWorktrees.js +20 -0
- package/lib/client/surface/components/ArchivedWorktrees.js.map +1 -0
- package/lib/client/surface/components/LifecycleDialogs.d.ts +20 -0
- package/lib/client/surface/components/LifecycleDialogs.d.ts.map +1 -0
- package/lib/client/surface/components/LifecycleDialogs.js +31 -0
- package/lib/client/surface/components/LifecycleDialogs.js.map +1 -0
- package/lib/client/surface/components/NativeDialogs.d.ts +9 -0
- package/lib/client/surface/components/NativeDialogs.d.ts.map +1 -0
- package/lib/client/surface/components/NativeDialogs.js +14 -0
- package/lib/client/surface/components/NativeDialogs.js.map +1 -0
- package/lib/client/surface/components/NotificationToasts.d.ts +7 -0
- package/lib/client/surface/components/NotificationToasts.d.ts.map +1 -0
- package/lib/client/surface/components/NotificationToasts.js +24 -0
- package/lib/client/surface/components/NotificationToasts.js.map +1 -0
- package/lib/client/surface/components/RegistrationDialog.d.ts +15 -0
- package/lib/client/surface/components/RegistrationDialog.d.ts.map +1 -0
- package/lib/client/surface/components/RegistrationDialog.js +22 -0
- package/lib/client/surface/components/RegistrationDialog.js.map +1 -0
- package/lib/client/surface/components/SurfaceContent.d.ts +31 -0
- package/lib/client/surface/components/SurfaceContent.d.ts.map +1 -0
- package/lib/client/surface/components/SurfaceContent.js +65 -0
- package/lib/client/surface/components/SurfaceContent.js.map +1 -0
- package/lib/client/surface/components/SurfaceHeader.d.ts +15 -0
- package/lib/client/surface/components/SurfaceHeader.d.ts.map +1 -0
- package/lib/client/surface/components/SurfaceHeader.js +42 -0
- package/lib/client/surface/components/SurfaceHeader.js.map +1 -0
- package/lib/client/surface/components/WorkspaceTree.d.ts +32 -0
- package/lib/client/surface/components/WorkspaceTree.d.ts.map +1 -0
- package/lib/client/surface/components/WorkspaceTree.js +149 -0
- package/lib/client/surface/components/WorkspaceTree.js.map +1 -0
- package/lib/client/{worktree-surface-dialogs.d.ts → surface/components/dialogs.d.ts} +5 -2
- package/lib/client/surface/components/dialogs.d.ts.map +1 -0
- package/lib/client/{worktree-surface-dialogs.js → surface/components/dialogs.js} +67 -24
- package/lib/client/surface/components/dialogs.js.map +1 -0
- package/lib/client/{worktree-surface-rows.d.ts → surface/components/rows.d.ts} +3 -3
- package/lib/client/surface/components/rows.d.ts.map +1 -0
- package/lib/client/{worktree-surface-rows.js → surface/components/rows.js} +180 -20
- package/lib/client/surface/components/rows.js.map +1 -0
- package/lib/client/surface/notification-queue.d.ts +11 -0
- package/lib/client/surface/notification-queue.d.ts.map +1 -0
- package/lib/client/surface/notification-queue.js +19 -0
- package/lib/client/surface/notification-queue.js.map +1 -0
- package/lib/client/{worktree-surface-selectors.d.ts → surface/selectors.d.ts} +10 -5
- package/lib/client/surface/selectors.d.ts.map +1 -0
- package/lib/client/{worktree-surface-selectors.js → surface/selectors.js} +23 -6
- package/lib/client/surface/selectors.js.map +1 -0
- package/lib/client/surface/shared.d.ts +40 -0
- package/lib/client/surface/shared.d.ts.map +1 -0
- package/lib/client/surface/shared.js +53 -0
- package/lib/client/surface/shared.js.map +1 -0
- package/lib/client/surface/state/useLifecycleState.d.ts +34 -0
- package/lib/client/surface/state/useLifecycleState.d.ts.map +1 -0
- package/lib/client/surface/state/useLifecycleState.js +39 -0
- package/lib/client/surface/state/useLifecycleState.js.map +1 -0
- package/lib/client/surface/state/useRegistrationState.d.ts +34 -0
- package/lib/client/surface/state/useRegistrationState.d.ts.map +1 -0
- package/lib/client/surface/state/useRegistrationState.js +44 -0
- package/lib/client/surface/state/useRegistrationState.js.map +1 -0
- package/lib/client/surface/state/useSessionExpansion.d.ts +39 -0
- package/lib/client/surface/state/useSessionExpansion.d.ts.map +1 -0
- package/lib/client/surface/state/useSessionExpansion.js +230 -0
- package/lib/client/surface/state/useSessionExpansion.js.map +1 -0
- package/lib/client/surface/state/useSessionOrdering.d.ts +15 -0
- package/lib/client/surface/state/useSessionOrdering.d.ts.map +1 -0
- package/lib/client/surface/state/useSessionOrdering.js +68 -0
- package/lib/client/surface/state/useSessionOrdering.js.map +1 -0
- package/lib/client/surface/state/useSurfaceMenus.d.ts +9 -0
- package/lib/client/surface/state/useSurfaceMenus.d.ts.map +1 -0
- package/lib/client/surface/state/useSurfaceMenus.js +15 -0
- package/lib/client/surface/state/useSurfaceMenus.js.map +1 -0
- package/lib/client/surface/state/useSurfaceRefresh.d.ts +39 -0
- package/lib/client/surface/state/useSurfaceRefresh.d.ts.map +1 -0
- package/lib/client/surface/state/useSurfaceRefresh.js +274 -0
- package/lib/client/surface/state/useSurfaceRefresh.js.map +1 -0
- package/lib/client/surface/state/useSurfaceSources.d.ts +31 -0
- package/lib/client/surface/state/useSurfaceSources.d.ts.map +1 -0
- package/lib/client/surface/state/useSurfaceSources.js +63 -0
- package/lib/client/surface/state/useSurfaceSources.js.map +1 -0
- package/lib/client/{worktree-surface-types.d.ts → surface/types.d.ts} +58 -13
- package/lib/client/surface/types.d.ts.map +1 -0
- package/lib/client/surface/types.js +2 -0
- package/lib/client/surface/types.js.map +1 -0
- package/lib/client/{WorktreeModeAction.d.ts → view/WorktreeModeAction.d.ts} +1 -1
- package/lib/client/view/WorktreeModeAction.d.ts.map +1 -0
- package/lib/client/{WorktreeModeAction.js → view/WorktreeModeAction.js} +9 -1
- package/lib/client/view/WorktreeModeAction.js.map +1 -0
- package/lib/client/view/navigation.d.ts.map +1 -0
- package/lib/client/view/navigation.js.map +1 -0
- package/lib/client/view/view-mode-dispatch.d.ts +7 -0
- package/lib/client/view/view-mode-dispatch.d.ts.map +1 -0
- package/lib/client/view/view-mode-dispatch.js +11 -0
- package/lib/client/view/view-mode-dispatch.js.map +1 -0
- package/lib/client/view/view-mode-store.d.ts.map +1 -0
- package/lib/client/view/view-mode-store.js.map +1 -0
- package/lib/client/view/view-mode.d.ts.map +1 -0
- package/lib/client/view/view-mode.js.map +1 -0
- package/lib/client/{worktree-error-copy.d.ts → view/worktree-error-copy.d.ts} +2 -2
- package/lib/client/view/worktree-error-copy.d.ts.map +1 -0
- package/lib/client/view/worktree-error-copy.js.map +1 -0
- package/lib/client/{worktree-expand-state.d.ts → view/worktree-expand-state.d.ts} +1 -0
- package/lib/client/view/worktree-expand-state.d.ts.map +1 -0
- package/lib/client/{worktree-expand-state.js → view/worktree-expand-state.js} +11 -0
- package/lib/client/view/worktree-expand-state.js.map +1 -0
- package/lib/client/{worktree-view-actions.d.ts → view/worktree-view-actions.d.ts} +11 -5
- package/lib/client/view/worktree-view-actions.d.ts.map +1 -0
- package/lib/client/{worktree-view-actions.js → view/worktree-view-actions.js} +13 -11
- package/lib/client/view/worktree-view-actions.js.map +1 -0
- package/lib/client/view/worktree-view-errors.d.ts.map +1 -0
- package/lib/client/view/worktree-view-errors.js.map +1 -0
- package/lib/client/{worktree-view-read.d.ts → view/worktree-view-read.d.ts} +4 -2
- package/lib/client/view/worktree-view-read.d.ts.map +1 -0
- package/lib/client/{worktree-view-read.js → view/worktree-view-read.js} +4 -1
- package/lib/client/view/worktree-view-read.js.map +1 -0
- package/lib/client/view/worktree-view.d.ts.map +1 -0
- package/lib/client/view/worktree-view.js.map +1 -0
- package/lib/client/worktree-connection.d.ts +6 -0
- package/lib/client/worktree-connection.d.ts.map +1 -1
- package/lib/client/worktree-connection.js +20 -0
- package/lib/client/worktree-connection.js.map +1 -1
- package/lib/client.js +5869 -2648
- package/lib/client.js.map +1 -1
- package/lib/contract/index.contract.js +12 -0
- package/lib/contract/index.contract.js.map +1 -1
- package/lib/contract/index.d.ts +64 -3
- package/lib/contract/index.d.ts.map +1 -1
- package/lib/contract/index.js +8 -0
- package/lib/contract/index.js.map +1 -1
- package/lib/host/dsh-read-adapter.d.ts +13 -2
- package/lib/host/dsh-read-adapter.d.ts.map +1 -1
- package/lib/host/dsh-read-adapter.js +23 -3
- package/lib/host/dsh-read-adapter.js.map +1 -1
- package/lib/host/remote.d.ts.map +1 -1
- package/lib/host/remote.js +15 -0
- package/lib/host/remote.js.map +1 -1
- package/lib/host/service.d.ts +30 -0
- package/lib/host/service.d.ts.map +1 -1
- package/lib/host/service.js +47 -1
- package/lib/host/service.js.map +1 -1
- package/lib/host/worktree-activity.d.ts +13 -0
- package/lib/host/worktree-activity.d.ts.map +1 -0
- package/lib/host/worktree-activity.js +23 -0
- package/lib/host/worktree-activity.js.map +1 -0
- package/lib/host/worktree-instructions.d.ts +41 -0
- package/lib/host/worktree-instructions.d.ts.map +1 -0
- package/lib/host/worktree-instructions.js +65 -0
- package/lib/host/worktree-instructions.js.map +1 -0
- package/lib/host/worktree-permission-manager.js +2 -2
- package/lib/host/worktree-permission-manager.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/manage/manager-context.d.ts +2 -1
- package/lib/manage/manager-context.d.ts.map +1 -1
- package/lib/manage/manager-sessions.js +4 -4
- package/lib/manage/manager-sessions.js.map +1 -1
- package/lib/manage/manager-worktree-lifecycle.d.ts +23 -0
- package/lib/manage/manager-worktree-lifecycle.d.ts.map +1 -0
- package/lib/manage/manager-worktree-lifecycle.js +165 -0
- package/lib/manage/manager-worktree-lifecycle.js.map +1 -0
- package/lib/manage/manager-worktrees.d.ts +1 -6
- package/lib/manage/manager-worktrees.d.ts.map +1 -1
- package/lib/manage/manager-worktrees.js +81 -112
- package/lib/manage/manager-worktrees.js.map +1 -1
- package/lib/manage/manager.d.ts +24 -1
- package/lib/manage/manager.d.ts.map +1 -1
- package/lib/manage/manager.js +70 -6
- package/lib/manage/manager.js.map +1 -1
- package/lib/manage/types.d.ts +1 -0
- package/lib/manage/types.d.ts.map +1 -1
- package/lib/provider/generated-name.d.ts +8 -0
- package/lib/provider/generated-name.d.ts.map +1 -0
- package/lib/provider/generated-name.js +29 -0
- package/lib/provider/generated-name.js.map +1 -0
- package/lib/provider/{git.d.ts → git/adapter.d.ts} +2 -2
- package/lib/provider/git/adapter.d.ts.map +1 -0
- package/lib/provider/{git.js → git/adapter.js} +11 -2
- package/lib/provider/git/adapter.js.map +1 -0
- package/lib/provider/{repository-fingerprint.d.ts → git/repository-fingerprint.d.ts} +1 -1
- package/lib/provider/git/repository-fingerprint.d.ts.map +1 -0
- package/lib/provider/git/repository-fingerprint.js.map +1 -0
- package/lib/provider/{subprocess.d.ts → git/subprocess.d.ts} +1 -1
- package/lib/provider/git/subprocess.d.ts.map +1 -0
- package/lib/provider/git/subprocess.js.map +1 -0
- package/lib/provider/git/worktree-status.d.ts +5 -0
- package/lib/provider/git/worktree-status.d.ts.map +1 -0
- package/lib/provider/git/worktree-status.js +23 -0
- package/lib/provider/git/worktree-status.js.map +1 -0
- package/lib/provider/index.d.ts +5 -5
- package/lib/provider/index.d.ts.map +1 -1
- package/lib/provider/index.js +5 -5
- package/lib/provider/index.js.map +1 -1
- package/lib/provider/mutation-token.d.ts +1 -1
- package/lib/provider/mutation-token.d.ts.map +1 -1
- package/lib/provider/mutation-token.js +1 -0
- package/lib/provider/mutation-token.js.map +1 -1
- package/lib/provider/sidecar/mutation-lock.d.ts.map +1 -0
- package/lib/provider/{mutation-lock.js → sidecar/mutation-lock.js} +1 -1
- package/lib/provider/sidecar/mutation-lock.js.map +1 -0
- package/lib/provider/{sidecar.d.ts → sidecar/repository.d.ts} +3 -3
- package/lib/provider/sidecar/repository.d.ts.map +1 -0
- package/lib/provider/{sidecar.js → sidecar/repository.js} +16 -5
- package/lib/provider/sidecar/repository.js.map +1 -0
- package/lib/provider/{sidecar-persistence.d.ts → sidecar/sidecar-persistence.d.ts} +1 -1
- package/lib/provider/sidecar/sidecar-persistence.d.ts.map +1 -0
- package/lib/provider/{sidecar-persistence.js → sidecar/sidecar-persistence.js} +29 -2
- package/lib/provider/sidecar/sidecar-persistence.js.map +1 -0
- package/lib/provider/{sidecar-schema.d.ts → sidecar/sidecar-schema.d.ts} +1 -1
- package/lib/provider/sidecar/sidecar-schema.d.ts.map +1 -0
- package/lib/provider/{sidecar-schema.js → sidecar/sidecar-schema.js} +59 -16
- package/lib/provider/sidecar/sidecar-schema.js.map +1 -0
- package/lib/provider/transaction/dependencies.d.ts +10 -0
- package/lib/provider/transaction/dependencies.d.ts.map +1 -0
- package/lib/provider/transaction/dependencies.js +2 -0
- package/lib/provider/transaction/dependencies.js.map +1 -0
- package/lib/provider/transaction/index.d.ts +17 -0
- package/lib/provider/transaction/index.d.ts.map +1 -0
- package/lib/provider/transaction/index.js +44 -0
- package/lib/provider/transaction/index.js.map +1 -0
- package/lib/provider/transaction/operations/adopt-branch.d.ts +6 -0
- package/lib/provider/transaction/operations/adopt-branch.d.ts.map +1 -0
- package/lib/provider/transaction/operations/adopt-branch.js +59 -0
- package/lib/provider/transaction/operations/adopt-branch.js.map +1 -0
- package/lib/provider/transaction/operations/clean.d.ts +4 -0
- package/lib/provider/transaction/operations/clean.d.ts.map +1 -0
- package/lib/provider/transaction/operations/clean.js +168 -0
- package/lib/provider/transaction/operations/clean.js.map +1 -0
- package/lib/provider/transaction/operations/create.d.ts +5 -0
- package/lib/provider/transaction/operations/create.d.ts.map +1 -0
- package/lib/provider/transaction/operations/create.js +136 -0
- package/lib/provider/transaction/operations/create.js.map +1 -0
- package/lib/provider/transaction/operations/import.d.ts +5 -0
- package/lib/provider/transaction/operations/import.d.ts.map +1 -0
- package/lib/provider/transaction/operations/import.js +93 -0
- package/lib/provider/transaction/operations/import.js.map +1 -0
- package/lib/provider/transaction/operations/remove.d.ts +4 -0
- package/lib/provider/transaction/operations/remove.d.ts.map +1 -0
- package/lib/provider/transaction/operations/remove.js +164 -0
- package/lib/provider/transaction/operations/remove.js.map +1 -0
- package/lib/provider/transaction/recovery/failure-recovery.d.ts +32 -0
- package/lib/provider/transaction/recovery/failure-recovery.d.ts.map +1 -0
- package/lib/provider/transaction/recovery/failure-recovery.js +147 -0
- package/lib/provider/transaction/recovery/failure-recovery.js.map +1 -0
- package/lib/provider/transaction/recovery/recover.d.ts +4 -0
- package/lib/provider/transaction/recovery/recover.d.ts.map +1 -0
- package/lib/provider/transaction/recovery/recover.js +164 -0
- package/lib/provider/transaction/recovery/recover.js.map +1 -0
- package/lib/provider/transaction/support/admission.d.ts +7 -0
- package/lib/provider/transaction/support/admission.d.ts.map +1 -0
- package/lib/provider/transaction/support/admission.js +90 -0
- package/lib/provider/transaction/support/admission.js.map +1 -0
- package/lib/provider/transaction/support/inspection.d.ts +11 -0
- package/lib/provider/transaction/support/inspection.d.ts.map +1 -0
- package/lib/provider/transaction/support/inspection.js +51 -0
- package/lib/provider/transaction/support/inspection.js.map +1 -0
- package/lib/provider/transaction/support/journal.d.ts +12 -0
- package/lib/provider/transaction/support/journal.d.ts.map +1 -0
- package/lib/provider/transaction/support/journal.js +74 -0
- package/lib/provider/transaction/support/journal.js.map +1 -0
- package/lib/provider/transaction/support/locking.d.ts +4 -0
- package/lib/provider/transaction/support/locking.d.ts.map +1 -0
- package/lib/provider/transaction/support/locking.js +11 -0
- package/lib/provider/transaction/support/locking.js.map +1 -0
- package/lib/provider/transaction/support/path-safety.d.ts +11 -0
- package/lib/provider/transaction/support/path-safety.d.ts.map +1 -0
- package/lib/provider/transaction/support/path-safety.js +82 -0
- package/lib/provider/transaction/support/path-safety.js.map +1 -0
- package/lib/provider/transaction/support/paths.d.ts +10 -0
- package/lib/provider/transaction/support/paths.d.ts.map +1 -0
- package/lib/provider/transaction/support/paths.js +68 -0
- package/lib/provider/transaction/support/paths.js.map +1 -0
- package/lib/provider/transaction/support/publication.d.ts +9 -0
- package/lib/provider/transaction/support/publication.d.ts.map +1 -0
- package/lib/provider/transaction/support/publication.js +92 -0
- package/lib/provider/transaction/support/publication.js.map +1 -0
- package/lib/provider/transaction/types.d.ts +38 -0
- package/lib/provider/transaction/types.d.ts.map +1 -0
- package/lib/provider/transaction/types.js +2 -0
- package/lib/provider/transaction/types.js.map +1 -0
- package/lib/provider/types.d.ts +22 -3
- package/lib/provider/types.d.ts.map +1 -1
- package/lib/provider/types.js +1 -1
- package/lib/provider/types.js.map +1 -1
- package/lib/provider/worktree-lifecycle.d.ts +19 -0
- package/lib/provider/worktree-lifecycle.d.ts.map +1 -0
- package/lib/provider/worktree-lifecycle.js +44 -0
- package/lib/provider/worktree-lifecycle.js.map +1 -0
- package/lib/typert.host.js +330 -36
- package/lib/typert.remote-client.d.ts +12 -0
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +330 -36
- package/package.json +21 -20
- package/lib/client/WorktreeContext.d.ts.map +0 -1
- package/lib/client/WorktreeContext.js.map +0 -1
- package/lib/client/WorktreeHeroContext.d.ts.map +0 -1
- package/lib/client/WorktreeHeroContext.js.map +0 -1
- package/lib/client/WorktreeModeAction.d.ts.map +0 -1
- package/lib/client/WorktreeModeAction.js.map +0 -1
- package/lib/client/WorktreeOverlay.d.ts.map +0 -1
- package/lib/client/WorktreeOverlay.js.map +0 -1
- package/lib/client/dsh-rc1-slot-contract.d.ts +0 -43
- package/lib/client/dsh-rc1-slot-contract.d.ts.map +0 -1
- package/lib/client/dsh-rc1-slot-contract.js +0 -2
- package/lib/client/dsh-rc1-slot-contract.js.map +0 -1
- package/lib/client/navigation.d.ts.map +0 -1
- package/lib/client/navigation.js.map +0 -1
- package/lib/client/overlay-bounds.d.ts.map +0 -1
- package/lib/client/overlay-bounds.js.map +0 -1
- package/lib/client/session-view.d.ts.map +0 -1
- package/lib/client/session-view.js.map +0 -1
- package/lib/client/sidebar-overlay-geometry.d.ts.map +0 -1
- package/lib/client/sidebar-overlay-geometry.js.map +0 -1
- package/lib/client/view-mode-store.d.ts.map +0 -1
- package/lib/client/view-mode-store.js.map +0 -1
- package/lib/client/view-mode.d.ts.map +0 -1
- package/lib/client/view-mode.js.map +0 -1
- package/lib/client/virtual-workspace-membership.d.ts.map +0 -1
- package/lib/client/virtual-workspace-membership.js.map +0 -1
- package/lib/client/worktree-context-store.d.ts.map +0 -1
- package/lib/client/worktree-context-store.js.map +0 -1
- package/lib/client/worktree-context.d.ts.map +0 -1
- package/lib/client/worktree-context.js.map +0 -1
- package/lib/client/worktree-error-copy.d.ts.map +0 -1
- package/lib/client/worktree-error-copy.js.map +0 -1
- package/lib/client/worktree-expand-state.d.ts.map +0 -1
- package/lib/client/worktree-expand-state.js.map +0 -1
- package/lib/client/worktree-permission-icon.d.ts.map +0 -1
- package/lib/client/worktree-permission-icon.js.map +0 -1
- package/lib/client/worktree-permission.d.ts.map +0 -1
- package/lib/client/worktree-permission.js.map +0 -1
- package/lib/client/worktree-session-fork.d.ts.map +0 -1
- package/lib/client/worktree-session-fork.js.map +0 -1
- package/lib/client/worktree-session-order.d.ts.map +0 -1
- package/lib/client/worktree-session-order.js.map +0 -1
- package/lib/client/worktree-session-position.d.ts.map +0 -1
- package/lib/client/worktree-session-position.js.map +0 -1
- package/lib/client/worktree-session.d.ts.map +0 -1
- package/lib/client/worktree-session.js.map +0 -1
- package/lib/client/worktree-surface-dialogs.d.ts.map +0 -1
- package/lib/client/worktree-surface-dialogs.js.map +0 -1
- package/lib/client/worktree-surface-rows.d.ts.map +0 -1
- package/lib/client/worktree-surface-rows.js.map +0 -1
- package/lib/client/worktree-surface-selectors.d.ts.map +0 -1
- package/lib/client/worktree-surface-selectors.js.map +0 -1
- package/lib/client/worktree-surface-types.d.ts.map +0 -1
- package/lib/client/worktree-surface-types.js +0 -2
- package/lib/client/worktree-surface-types.js.map +0 -1
- package/lib/client/worktree-view-actions.d.ts.map +0 -1
- package/lib/client/worktree-view-actions.js.map +0 -1
- package/lib/client/worktree-view-errors.d.ts.map +0 -1
- package/lib/client/worktree-view-errors.js.map +0 -1
- package/lib/client/worktree-view-read.d.ts.map +0 -1
- package/lib/client/worktree-view-read.js.map +0 -1
- package/lib/client/worktree-view.d.ts.map +0 -1
- package/lib/client/worktree-view.js.map +0 -1
- package/lib/provider/git.d.ts.map +0 -1
- package/lib/provider/git.js.map +0 -1
- package/lib/provider/mutation-lock.d.ts.map +0 -1
- package/lib/provider/mutation-lock.js.map +0 -1
- package/lib/provider/repository-fingerprint.d.ts.map +0 -1
- package/lib/provider/repository-fingerprint.js.map +0 -1
- package/lib/provider/sidecar-persistence.d.ts.map +0 -1
- package/lib/provider/sidecar-persistence.js.map +0 -1
- package/lib/provider/sidecar-schema.d.ts.map +0 -1
- package/lib/provider/sidecar-schema.js.map +0 -1
- package/lib/provider/sidecar.d.ts.map +0 -1
- package/lib/provider/sidecar.js.map +0 -1
- package/lib/provider/subprocess.d.ts.map +0 -1
- package/lib/provider/subprocess.js.map +0 -1
- package/lib/provider/transaction.d.ts +0 -65
- package/lib/provider/transaction.d.ts.map +0 -1
- package/lib/provider/transaction.js +0 -1011
- package/lib/provider/transaction.js.map +0 -1
- /package/lib/client/{WorktreeContext.js → context/WorktreeContext.js} +0 -0
- /package/lib/client/{WorktreeHeroContext.js → context/WorktreeHeroContext.js} +0 -0
- /package/lib/client/{overlay-bounds.d.ts → overlay/overlay-bounds.d.ts} +0 -0
- /package/lib/client/{overlay-bounds.js → overlay/overlay-bounds.js} +0 -0
- /package/lib/client/{sidebar-overlay-geometry.d.ts → overlay/sidebar-overlay-geometry.d.ts} +0 -0
- /package/lib/client/{sidebar-overlay-geometry.js → overlay/sidebar-overlay-geometry.js} +0 -0
- /package/lib/client/{worktree-permission-icon.d.ts → permission/worktree-permission-icon.d.ts} +0 -0
- /package/lib/client/{worktree-permission-icon.js → permission/worktree-permission-icon.js} +0 -0
- /package/lib/client/{worktree-permission.d.ts → permission/worktree-permission.d.ts} +0 -0
- /package/lib/client/{worktree-permission.js → permission/worktree-permission.js} +0 -0
- /package/lib/client/{session-view.d.ts → session/session-view.d.ts} +0 -0
- /package/lib/client/{session-view.js → session/session-view.js} +0 -0
- /package/lib/client/{worktree-session-order.d.ts → session/worktree-session-order.d.ts} +0 -0
- /package/lib/client/{worktree-session-order.js → session/worktree-session-order.js} +0 -0
- /package/lib/client/{worktree-session-position.d.ts → session/worktree-session-position.d.ts} +0 -0
- /package/lib/client/{worktree-session-position.js → session/worktree-session-position.js} +0 -0
- /package/lib/client/{navigation.d.ts → view/navigation.d.ts} +0 -0
- /package/lib/client/{navigation.js → view/navigation.js} +0 -0
- /package/lib/client/{view-mode-store.d.ts → view/view-mode-store.d.ts} +0 -0
- /package/lib/client/{view-mode-store.js → view/view-mode-store.js} +0 -0
- /package/lib/client/{view-mode.d.ts → view/view-mode.d.ts} +0 -0
- /package/lib/client/{view-mode.js → view/view-mode.js} +0 -0
- /package/lib/client/{worktree-error-copy.js → view/worktree-error-copy.js} +0 -0
- /package/lib/client/{worktree-view-errors.d.ts → view/worktree-view-errors.d.ts} +0 -0
- /package/lib/client/{worktree-view-errors.js → view/worktree-view-errors.js} +0 -0
- /package/lib/client/{worktree-view.d.ts → view/worktree-view.d.ts} +0 -0
- /package/lib/client/{worktree-view.js → view/worktree-view.js} +0 -0
- /package/lib/provider/{repository-fingerprint.js → git/repository-fingerprint.js} +0 -0
- /package/lib/provider/{subprocess.js → git/subprocess.js} +0 -0
- /package/lib/provider/{mutation-lock.d.ts → sidecar/mutation-lock.d.ts} +0 -0
|
@@ -1,28 +1,40 @@
|
|
|
1
1
|
// 两份列表刻意独立于 interface 编写:任何方法遗漏或意外扩张都会在类型检查阶段失败。
|
|
2
2
|
// These lists are deliberately independent of the interfaces so omissions or accidental expansion fail at type-check time.
|
|
3
3
|
const expectedManagerKeys = [
|
|
4
|
+
'updateWorktreeInstructions',
|
|
4
5
|
'listWorktrees',
|
|
5
6
|
'listImportCandidates',
|
|
6
7
|
'listBranches',
|
|
7
8
|
'createWorktree',
|
|
8
9
|
'importWorktree',
|
|
9
10
|
'removeWorktree',
|
|
11
|
+
'unarchiveWorktree',
|
|
12
|
+
'cleanWorktree',
|
|
13
|
+
'adoptWorktreeBranch',
|
|
14
|
+
'recoverWorktrees',
|
|
15
|
+
'forgetWorktree',
|
|
10
16
|
'insertWorktreeBefore',
|
|
11
17
|
'listBindings',
|
|
12
18
|
'bindSession',
|
|
13
19
|
];
|
|
14
20
|
const expectedRemoteKeys = [
|
|
21
|
+
'adoptWorktreeBranch',
|
|
22
|
+
'recoverWorktrees',
|
|
15
23
|
'listWorktrees',
|
|
16
24
|
'listImportCandidates',
|
|
17
25
|
'listBranches',
|
|
18
26
|
'createWorktree',
|
|
19
27
|
'importWorktree',
|
|
20
28
|
'removeWorktree',
|
|
29
|
+
'unarchiveWorktree',
|
|
30
|
+
'cleanWorktree',
|
|
31
|
+
'forgetWorktree',
|
|
21
32
|
'insertWorktreeBefore',
|
|
22
33
|
'listBindings',
|
|
23
34
|
'bindSession',
|
|
24
35
|
'ensureWorktreePermission',
|
|
25
36
|
'normalizeDetachedWorktreePermissions',
|
|
37
|
+
'updateWorktreeInstructions',
|
|
26
38
|
];
|
|
27
39
|
const managerKeysMatchSpec = true;
|
|
28
40
|
const remoteKeysMatchSpec = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.contract.js","sourceRoot":"","sources":["../../src/contract/index.contract.ts"],"names":[],"mappings":"AASA,iDAAiD;AACjD,2HAA2H;AAC3H,MAAM,mBAAmB,GAAG;IAC1B,eAAe;IACf,sBAAsB;IACtB,cAAc;IACd,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,sBAAsB;IACtB,cAAc;IACd,aAAa;CACL,CAAC;AACX,MAAM,kBAAkB,GAAG;IACzB,eAAe;IACf,sBAAsB;IACtB,cAAc;IACd,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,sBAAsB;IACtB,cAAc;IACd,aAAa;IACb,0BAA0B;IAC1B,sCAAsC;
|
|
1
|
+
{"version":3,"file":"index.contract.js","sourceRoot":"","sources":["../../src/contract/index.contract.ts"],"names":[],"mappings":"AASA,iDAAiD;AACjD,2HAA2H;AAC3H,MAAM,mBAAmB,GAAG;IAC1B,4BAA4B;IAC5B,eAAe;IACf,sBAAsB;IACtB,cAAc;IACd,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,mBAAmB;IACnB,eAAe;IACf,qBAAqB;IACrB,kBAAkB;IAClB,gBAAgB;IAChB,sBAAsB;IACtB,cAAc;IACd,aAAa;CACL,CAAC;AACX,MAAM,kBAAkB,GAAG;IACzB,qBAAqB;IACrB,kBAAkB;IAClB,eAAe;IACf,sB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HANGED
|
@@ -9,7 +9,7 @@ import type { WorktreePermissionNormalizationRequest, WorktreePermissionRequest,
|
|
|
9
9
|
* 跨 Host/浏览器边界保持稳定的领域错误码;新增、删除或重命名成员都属于公开契约变更。
|
|
10
10
|
* Stable domain error codes shared across the Host/browser boundary; adding, removing, or renaming a member is a public contract change.
|
|
11
11
|
*/
|
|
12
|
-
export declare const WORKTREE_ERROR_CODES: readonly ["WORKSPACE_NOT_FOUND", "WORKSPACE_NOT_GIT_REPOSITORY", "GIT_NOT_INSTALLED", "WORKTREE_REQUIRES_INITIAL_COMMIT", "WORKTREE_BRANCH_CONFLICT", "WORKTREE_NOT_FOUND", "WORKTREE_ORDER_INVALID", "WORKTREE_REMOVED", "WORKTREE_IMPORT_INVALID", "WORKTREE_ALREADY_MANAGED", "SESSION_NOT_FOUND", "SESSION_CWD_MISMATCH", "SESSION_ALREADY_BOUND", "SIDECAR_UNAVAILABLE", "SIDECAR_CORRUPT", "SIDECAR_SYNC_REQUIRED", "GIT_OPERATION_FAILED", "WORKTREE_MUTATION_BUSY", "WORKTREE_STATE_CONFLICT", "WORKTREE_RECOVERY_REQUIRED", "WORKTREE_IDENTITY_CHANGED", "WORKTREE_PERMISSION_BINDING_REQUIRED"];
|
|
12
|
+
export declare const WORKTREE_ERROR_CODES: readonly ["WORKSPACE_NOT_FOUND", "WORKSPACE_NOT_GIT_REPOSITORY", "GIT_NOT_INSTALLED", "WORKTREE_REQUIRES_INITIAL_COMMIT", "WORKTREE_BRANCH_CONFLICT", "WORKTREE_NOT_FOUND", "WORKTREE_ORDER_INVALID", "WORKTREE_REMOVED", "WORKTREE_IMPORT_INVALID", "WORKTREE_ALREADY_MANAGED", "SESSION_NOT_FOUND", "SESSION_CWD_MISMATCH", "SESSION_ALREADY_BOUND", "SIDECAR_UNAVAILABLE", "SIDECAR_CORRUPT", "SIDECAR_SYNC_REQUIRED", "GIT_OPERATION_FAILED", "WORKTREE_MUTATION_BUSY", "WORKTREE_STATE_CONFLICT", "WORKTREE_RECOVERY_REQUIRED", "WORKTREE_IDENTITY_CHANGED", "WORKTREE_PERMISSION_BINDING_REQUIRED", "WORKTREE_SESSION_BUSY", "WORKTREE_ACTIVITY_UNAVAILABLE"];
|
|
13
13
|
export type WorktreeErrorCode = (typeof WORKTREE_ERROR_CODES)[number];
|
|
14
14
|
export type WorkspaceId = string;
|
|
15
15
|
export type WorktreeId = string;
|
|
@@ -22,7 +22,24 @@ export type WorktreeStatus = 'active' | 'removed';
|
|
|
22
22
|
export type WorktreeSource = 'plugin' | 'external';
|
|
23
23
|
export * from './worktree-permission.js';
|
|
24
24
|
/** Runtime-only Git health projection; this value is never persisted in the sidecar. */
|
|
25
|
-
export type WorktreeHealth = 'ready' | 'repair' | 'recovery-needed';
|
|
25
|
+
export type WorktreeHealth = 'ready' | 'repair' | 'recovery-needed' | 'cleaned' | 'branch-drift';
|
|
26
|
+
export type WorktreeActivity = {
|
|
27
|
+
readonly state: 'idle';
|
|
28
|
+
} | {
|
|
29
|
+
readonly state: 'busy';
|
|
30
|
+
readonly sessionIds: readonly string[];
|
|
31
|
+
} | {
|
|
32
|
+
readonly state: 'unknown';
|
|
33
|
+
};
|
|
34
|
+
export interface AdoptWorktreeBranchInput extends WorktreeLifecycleInput {
|
|
35
|
+
/** The live branch the user explicitly confirmed; checked again under lock. */
|
|
36
|
+
readonly expectedBranch: string;
|
|
37
|
+
}
|
|
38
|
+
export interface WorktreeLifecycleInput {
|
|
39
|
+
readonly workspaceId: string;
|
|
40
|
+
readonly worktreeId: string;
|
|
41
|
+
readonly mutationToken: string;
|
|
42
|
+
}
|
|
26
43
|
/**
|
|
27
44
|
* Session 与 Worktree 的关系状态;删除 Worktree 只会将关系转为 `detached`,不会删除 Session。
|
|
28
45
|
* Session-to-Worktree relation state; removing a Worktree only detaches the relation and never deletes the Session.
|
|
@@ -33,14 +50,26 @@ export type BindingStatus = 'active' | 'detached';
|
|
|
33
50
|
* Worktree metadata persisted by the plugin sidecar; it contains no DSH Workspace or Session content.
|
|
34
51
|
*/
|
|
35
52
|
export interface WorktreeRecord {
|
|
53
|
+
/** User-authored shared instructions; empty or absent disables injection. */
|
|
54
|
+
readonly instructions?: string;
|
|
55
|
+
/** Acquisition facts; legacy records remain unknown. */
|
|
56
|
+
readonly createdAt?: string;
|
|
57
|
+
readonly importedAt?: string;
|
|
58
|
+
readonly baseBranch?: string;
|
|
36
59
|
readonly worktreeId: WorktreeId;
|
|
37
60
|
readonly workspaceId: WorkspaceId;
|
|
38
61
|
readonly absolutePath: string;
|
|
39
62
|
readonly branch: string;
|
|
40
63
|
readonly source: WorktreeSource;
|
|
41
64
|
readonly status: WorktreeStatus;
|
|
65
|
+
/** Cleanup flow completed, including missing-.git reconciliation that preserves residual files. */
|
|
66
|
+
readonly diskCleanup?: 'completed';
|
|
42
67
|
/** Runtime-only; never written to the sidecar. */
|
|
43
68
|
readonly health?: WorktreeHealth;
|
|
69
|
+
/** Runtime-only Git branch; null means detached HEAD, undefined means unavailable. */
|
|
70
|
+
readonly currentBranch?: string | null;
|
|
71
|
+
/** Runtime-only; never written to the sidecar. */
|
|
72
|
+
readonly activity?: WorktreeActivity;
|
|
44
73
|
/** Opaque runtime-only snapshot token for destructive-action stale-state checks. */
|
|
45
74
|
readonly mutationToken?: string;
|
|
46
75
|
}
|
|
@@ -91,6 +120,12 @@ export declare function createWorktreeError(code: WorktreeErrorCode, message: st
|
|
|
91
120
|
* Stable Manage-layer domain contract; it coordinates read-only DSH data, Git worktrees, and the external sidecar without owning DSH data.
|
|
92
121
|
*/
|
|
93
122
|
export interface WorktreeManager {
|
|
123
|
+
updateWorktreeInstructions(input: {
|
|
124
|
+
workspaceId: WorkspaceId;
|
|
125
|
+
worktreeId: WorktreeId;
|
|
126
|
+
instructions: string;
|
|
127
|
+
expectedInstructions: string;
|
|
128
|
+
}): Promise<string>;
|
|
94
129
|
/**
|
|
95
130
|
* 返回 Workspace 的全部已记录 Worktree,包括为 detached 关系保留的 removed 记录。
|
|
96
131
|
* Returns every recorded Worktree for the Workspace, including removed records retained for detached relations.
|
|
@@ -133,6 +168,19 @@ export interface WorktreeManager {
|
|
|
133
168
|
worktreeId: WorktreeId;
|
|
134
169
|
mutationToken: string;
|
|
135
170
|
}): Promise<void>;
|
|
171
|
+
/**
|
|
172
|
+
* 将处于 removed(已归档)状态且未被清理的 Worktree 恢复为 active。
|
|
173
|
+
* Restores an archived Worktree that has not been cleaned from disk back to active.
|
|
174
|
+
*/
|
|
175
|
+
unarchiveWorktree(input: WorktreeLifecycleInput): Promise<void>;
|
|
176
|
+
/** Caller must obtain explicit disk-deletion confirmation; Session activity is not checked. */
|
|
177
|
+
cleanWorktree(input: WorktreeLifecycleInput): Promise<void>;
|
|
178
|
+
adoptWorktreeBranch(input: AdoptWorktreeBranchInput): Promise<void>;
|
|
179
|
+
recoverWorktrees(input: {
|
|
180
|
+
workspaceId: WorkspaceId;
|
|
181
|
+
}): Promise<void>;
|
|
182
|
+
/** Removes plugin index entries only; preserves disk and native Sessions without activity checks. */
|
|
183
|
+
forgetWorktree(input: WorktreeLifecycleInput): Promise<void>;
|
|
136
184
|
/**
|
|
137
185
|
* Move one Worktree within the Workspace's durable order. With an anchor it
|
|
138
186
|
* lands before that Worktree; without one it appends. Invalid and unchanged
|
|
@@ -164,7 +212,7 @@ export interface WorktreeManager {
|
|
|
164
212
|
* Browser Remote 可调用的方法白名单;runtime cwd 解析刻意不进入该边界。
|
|
165
213
|
* Allowlist of Browser Remote methods; runtime cwd resolution is intentionally excluded from this boundary.
|
|
166
214
|
*/
|
|
167
|
-
export declare const WORKTREE_REMOTE_METHODS: readonly ["listWorktrees", "listImportCandidates", "listBranches", "createWorktree", "importWorktree", "removeWorktree", "insertWorktreeBefore", "listBindings", "bindSession", "ensureWorktreePermission", "normalizeDetachedWorktreePermissions"];
|
|
215
|
+
export declare const WORKTREE_REMOTE_METHODS: readonly ["updateWorktreeInstructions", "listWorktrees", "listImportCandidates", "listBranches", "createWorktree", "importWorktree", "removeWorktree", "unarchiveWorktree", "cleanWorktree", "adoptWorktreeBranch", "recoverWorktrees", "forgetWorktree", "insertWorktreeBefore", "listBindings", "bindSession", "ensureWorktreePermission", "normalizeDetachedWorktreePermissions"];
|
|
168
216
|
export type WorktreeRemoteMethod = (typeof WORKTREE_REMOTE_METHODS)[number];
|
|
169
217
|
/**
|
|
170
218
|
* Remote 的可辨识结果:已知领域失败作为数据返回,未知或未分类异常仍由 Host 抛出。
|
|
@@ -182,6 +230,12 @@ export type WorktreeRemoteResult<Value> = {
|
|
|
182
230
|
* Browser-safe Host projection containing only domain values and serializable results, never Provider objects.
|
|
183
231
|
*/
|
|
184
232
|
export interface WorktreeRemoteManager {
|
|
233
|
+
updateWorktreeInstructions(input: {
|
|
234
|
+
workspaceId: WorkspaceId;
|
|
235
|
+
worktreeId: WorktreeId;
|
|
236
|
+
instructions: string;
|
|
237
|
+
expectedInstructions: string;
|
|
238
|
+
}): Promise<WorktreeRemoteResult<string>>;
|
|
185
239
|
listWorktrees(input: {
|
|
186
240
|
workspaceId: WorkspaceId;
|
|
187
241
|
}): Promise<WorktreeRemoteResult<readonly WorktreeRecord[]>>;
|
|
@@ -205,6 +259,13 @@ export interface WorktreeRemoteManager {
|
|
|
205
259
|
worktreeId: WorktreeId;
|
|
206
260
|
mutationToken: string;
|
|
207
261
|
}): Promise<WorktreeRemoteResult<null>>;
|
|
262
|
+
unarchiveWorktree(input: WorktreeLifecycleInput): Promise<WorktreeRemoteResult<null>>;
|
|
263
|
+
cleanWorktree(input: WorktreeLifecycleInput): Promise<WorktreeRemoteResult<null>>;
|
|
264
|
+
adoptWorktreeBranch(input: AdoptWorktreeBranchInput): Promise<WorktreeRemoteResult<null>>;
|
|
265
|
+
recoverWorktrees(input: {
|
|
266
|
+
workspaceId: WorkspaceId;
|
|
267
|
+
}): Promise<WorktreeRemoteResult<null>>;
|
|
268
|
+
forgetWorktree(input: WorktreeLifecycleInput): Promise<WorktreeRemoteResult<null>>;
|
|
208
269
|
insertWorktreeBefore(input: {
|
|
209
270
|
workspaceId: WorkspaceId;
|
|
210
271
|
worktreeId: WorktreeId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contract/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sCAAsC,EACtC,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,0BAA0B,CAAC;AAElC;;;;;GAKG;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contract/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sCAAsC,EACtC,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,0BAA0B,CAAC;AAElC;;;;;GAKG;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,qoBAyBtB,CAAC;AAEZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AACjC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAChC,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,SAAS,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEnD,cAAc,0BAA0B,CAAC;AAEzC,wFAAwF;AACxF,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,iBAAiB,GAAG,SAAS,GAAG,cAAc,CAAC;AAEjG,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC1B;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAClE;IAAE,QAAQ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31,6 +31,8 @@ export const WORKTREE_ERROR_CODES = Object.freeze([
|
|
|
31
31
|
'WORKTREE_RECOVERY_REQUIRED',
|
|
32
32
|
'WORKTREE_IDENTITY_CHANGED',
|
|
33
33
|
'WORKTREE_PERMISSION_BINDING_REQUIRED',
|
|
34
|
+
'WORKTREE_SESSION_BUSY',
|
|
35
|
+
'WORKTREE_ACTIVITY_UNAVAILABLE',
|
|
34
36
|
]);
|
|
35
37
|
export * from './worktree-permission.js';
|
|
36
38
|
/**
|
|
@@ -45,12 +47,18 @@ export function createWorktreeError(code, message, details = {}) {
|
|
|
45
47
|
* Allowlist of Browser Remote methods; runtime cwd resolution is intentionally excluded from this boundary.
|
|
46
48
|
*/
|
|
47
49
|
export const WORKTREE_REMOTE_METHODS = Object.freeze([
|
|
50
|
+
'updateWorktreeInstructions',
|
|
48
51
|
'listWorktrees',
|
|
49
52
|
'listImportCandidates',
|
|
50
53
|
'listBranches',
|
|
51
54
|
'createWorktree',
|
|
52
55
|
'importWorktree',
|
|
53
56
|
'removeWorktree',
|
|
57
|
+
'unarchiveWorktree',
|
|
58
|
+
'cleanWorktree',
|
|
59
|
+
'adoptWorktreeBranch',
|
|
60
|
+
'recoverWorktrees',
|
|
61
|
+
'forgetWorktree',
|
|
54
62
|
'insertWorktreeBefore',
|
|
55
63
|
'listBindings',
|
|
56
64
|
'bindSession',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contract/index.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC;IAChD,qBAAqB;IACrB,8BAA8B;IAC9B,mBAAmB;IACnB,kCAAkC;IAClC,0BAA0B;IAC1B,oBAAoB;IACpB,wBAAwB;IACxB,kBAAkB;IAClB,yBAAyB;IACzB,0BAA0B;IAC1B,mBAAmB;IACnB,sBAAsB;IACtB,uBAAuB;IACvB,qBAAqB;IACrB,iBAAiB;IACjB,uBAAuB;IACvB,sBAAsB;IACtB,wBAAwB;IACxB,yBAAyB;IACzB,4BAA4B;IAC5B,2BAA2B;IAC3B,sCAAsC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contract/index.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC;IAChD,qBAAqB;IACrB,8BAA8B;IAC9B,mBAAmB;IACnB,kCAAkC;IAClC,0BAA0B;IAC1B,oBAAoB;IACpB,wBAAwB;IACxB,kBAAkB;IAClB,yBAAyB;IACzB,0BAA0B;IAC1B,mBAAmB;IACnB,sBAAsB;IACtB,uBAAuB;IACvB,qBAAqB;IACrB,iBAAiB;IACjB,uBAAuB;IACvB,sBAAsB;IACtB,wBAAwB;IACxB,yBAAyB;IACzB,4BAA4B;IAC5B,2BAA2B;IAC3B,sCAAsC;IACtC,uBAAuB;IACvB,+BAA+B;CACvB,CAAC,CAAC;AAgBZ,cAAc,0BAA0B,CAAC;AAiGzC;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CACjC,IAAuB,EACvB,OAAe,EACf,UAAgC,EAAE;IAElC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AACpC,CAAC;AAoGD;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC;IACnD,4BAA4B;IAC5B,eAAe;IACf,sBAAsB;IACtB,cAAc;IACd,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,mBAAmB;IACnB,eAAe;IACf,qBAAqB;IACrB,kBAAkB;IAClB,gBAAgB;IAChB,sBAAsB;IACtB,cAAc;IACd,aAAa;IACb,0BAA0B;IAC1B,sCAAsC;CAC9B,CAAC,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { SessionHeader, SessionId } from '@deepseek-ai/dsh-session/types';
|
|
2
|
+
import type { WorktreeActivity } from '../contract/index.js';
|
|
2
3
|
import type { DshReadAdapter, DshSessionSummary, DshWorkspaceSummary } from '../provider/types.js';
|
|
4
|
+
import { type WorktreeActivitySource } from './worktree-activity.js';
|
|
3
5
|
interface DshWorkspaceView {
|
|
4
6
|
readonly id: string;
|
|
5
7
|
readonly path: string;
|
|
@@ -10,6 +12,7 @@ interface DshSessionView {
|
|
|
10
12
|
readonly id: SessionId;
|
|
11
13
|
readonly header: DshSessionHeaderView;
|
|
12
14
|
}
|
|
15
|
+
type DshSessionPersistenceEntryView = DshSessionHeaderView | Pick<DshSessionView, 'header'>;
|
|
13
16
|
/**
|
|
14
17
|
* plugin 从 DSH Host 消费的最小只读 service slice。
|
|
15
18
|
*
|
|
@@ -36,8 +39,13 @@ export interface DshHostReadContext {
|
|
|
36
39
|
* Lists persisted headers only; inspect, load, and mutation are deliberately absent.
|
|
37
40
|
*/
|
|
38
41
|
readonly sessionPersistence: {
|
|
39
|
-
list(): Promise<readonly
|
|
42
|
+
list(): Promise<readonly DshSessionPersistenceEntryView[]>;
|
|
40
43
|
};
|
|
44
|
+
readonly activitySource?: WorktreeActivitySource;
|
|
45
|
+
}
|
|
46
|
+
export interface DshHostReadAdapterOptions {
|
|
47
|
+
readonly activitySource?: WorktreeActivitySource;
|
|
48
|
+
readonly isDisposed?: () => boolean;
|
|
41
49
|
}
|
|
42
50
|
/**
|
|
43
51
|
* 把真实 DSH Host 读取服务适配到 Provider port,同时保持 DSH 是 Workspace 和
|
|
@@ -48,11 +56,14 @@ export interface DshHostReadContext {
|
|
|
48
56
|
*/
|
|
49
57
|
export declare class DshHostReadAdapter implements DshReadAdapter {
|
|
50
58
|
private readonly ctx;
|
|
51
|
-
|
|
59
|
+
private readonly activityReader;
|
|
60
|
+
constructor(ctx: DshHostReadContext, options?: DshHostReadAdapterOptions);
|
|
61
|
+
readWorktreeActivity(sessionIds: readonly string[]): Promise<WorktreeActivity>;
|
|
52
62
|
getWorkspace(workspaceId: string): Promise<DshWorkspaceSummary | undefined>;
|
|
53
63
|
listWorkspaces(): Promise<readonly DshWorkspaceSummary[]>;
|
|
54
64
|
getSession(sessionId: string): Promise<DshSessionSummary | undefined>;
|
|
55
65
|
listSessions(): Promise<readonly DshSessionSummary[]>;
|
|
66
|
+
private listPersistedHeaders;
|
|
56
67
|
private sessionSummary;
|
|
57
68
|
}
|
|
58
69
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dsh-read-adapter.d.ts","sourceRoot":"","sources":["../../src/host/dsh-read-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE/E,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"dsh-read-adapter.d.ts","sourceRoot":"","sources":["../../src/host/dsh-read-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,wBAAwB,CAAC;AAEhC,UAAU,gBAAgB;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;CAC3C;AACD,KAAK,oBAAoB,GAAG,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,KAAK,CAAC,CAAC;AAC9D,UAAU,cAAc;IACtB,QAAQ,CAAC,EAAE,EAAE,SAAS,CA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O,CAAC,SAAS,mBAAmB,EAAE,CAAC;IAOzD,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC;IAYrE,YAAY,IAAI,OAAO,CAAC,SAAS,iBAAiB,EAAE,CAAC;YAe7C,oBAAoB;IAMlC,OAAO,CAAC,cAAc;CAcvB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createDshWorktreeActivityReader, } from './worktree-activity.js';
|
|
1
2
|
/**
|
|
2
3
|
* 把真实 DSH Host 读取服务适配到 Provider port,同时保持 DSH 是 Workspace 和
|
|
3
4
|
* Session facts 的唯一来源。
|
|
@@ -7,8 +8,24 @@
|
|
|
7
8
|
*/
|
|
8
9
|
export class DshHostReadAdapter {
|
|
9
10
|
ctx;
|
|
10
|
-
|
|
11
|
+
activityReader;
|
|
12
|
+
constructor(ctx, options) {
|
|
11
13
|
this.ctx = ctx;
|
|
14
|
+
let source = options?.activitySource;
|
|
15
|
+
if (source === undefined) {
|
|
16
|
+
try {
|
|
17
|
+
source = ctx.activitySource;
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
source = undefined;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
this.activityReader = createDshWorktreeActivityReader(source, {
|
|
24
|
+
isDisposed: options?.isDisposed,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
async readWorktreeActivity(sessionIds) {
|
|
28
|
+
return this.activityReader(sessionIds);
|
|
12
29
|
}
|
|
13
30
|
async getWorkspace(workspaceId) {
|
|
14
31
|
const workspace = this.ctx.workspaceRegistry.get(workspaceId);
|
|
@@ -29,7 +46,7 @@ export class DshHostReadAdapter {
|
|
|
29
46
|
const live = this.ctx.sessions.get(sessionId);
|
|
30
47
|
if (live !== undefined)
|
|
31
48
|
return this.sessionSummary(live.header);
|
|
32
|
-
const header = (await this.
|
|
49
|
+
const header = (await this.listPersistedHeaders()).find((candidate) => candidate.id === sessionId);
|
|
33
50
|
return header === undefined ? undefined : this.sessionSummary(header);
|
|
34
51
|
}
|
|
35
52
|
async listSessions() {
|
|
@@ -41,12 +58,15 @@ export class DshHostReadAdapter {
|
|
|
41
58
|
for (const session of this.ctx.sessions.list()) {
|
|
42
59
|
summaries.set(session.id, this.sessionSummary(session.header));
|
|
43
60
|
}
|
|
44
|
-
for (const header of await this.
|
|
61
|
+
for (const header of await this.listPersistedHeaders()) {
|
|
45
62
|
if (!summaries.has(header.id))
|
|
46
63
|
summaries.set(header.id, this.sessionSummary(header));
|
|
47
64
|
}
|
|
48
65
|
return [...summaries.values()];
|
|
49
66
|
}
|
|
67
|
+
async listPersistedHeaders() {
|
|
68
|
+
return (await this.ctx.sessionPersistence.list()).map((entry) => 'header' in entry ? entry.header : entry);
|
|
69
|
+
}
|
|
50
70
|
sessionSummary(header) {
|
|
51
71
|
// Workspace 归属从 DSH registry 的成员关系派生,而不是从 cwd 猜测或写入 plugin
|
|
52
72
|
// sidecar;cwd 也只是读取现有 header fact。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dsh-read-adapter.js","sourceRoot":"","sources":["../../src/host/dsh-read-adapter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dsh-read-adapter.js","sourceRoot":"","sources":["../../src/host/dsh-read-adapter.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,+BAA+B,GAEhC,MAAM,wBAAwB,CAAC;AAsDhC;;;;;;GAMG;AACH,MAAM,OAAO,kBAAkB;IAIV;IAHF,cAAc,CAA+D;IAE9F,YACmB,GAAuB,EACxC,OAAmC;QADlB,QAAG,GAAH,GAAG,CAAoB;QAGxC,IAAI,MAAM,GAAG,OAAO,EAAE,cAAc,CAAC;QACrC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,IAAI,CAAC;gBACH,MAAM,GAAG,GAAG,CAAC,cAAc,CAAC;YAC9B,CAAC;YAAC,MAAM,CAAC;gBACP,MAAM,GAAG,SAAS,CAAC;Y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C,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;QACrE,OAAO;YACL,SAAS,EAAE,MAAM,CAAC,EAAE;YACpB,GAAG,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC;YACrD,GAAG,EAAE,MAAM,CAAC,GAAG,IAAI,EAAE;SACtB,CAAC;IACJ,CAAC;CACF"}
|
package/lib/host/remote.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../src/host/remote.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAkC9B;;;;;;;;;;;;GAYG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,eAAe,EACxB,WAAW,CAAC,EAAE,yBAAyB,GACtC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../src/host/remote.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAE3B,MAAM,sBAAsB,CAAC;AAkC9B;;;;;;;;;;;;GAYG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,eAAe,EACxB,WAAW,CAAC,EAAE,yBAAyB,GACtC,qBAAqB,CAiDvB"}
|
package/lib/host/remote.js
CHANGED
|
@@ -44,6 +44,7 @@ async function project(operation) {
|
|
|
44
44
|
*/
|
|
45
45
|
export function createWorktreeRemoteProjection(manager, permissions) {
|
|
46
46
|
return {
|
|
47
|
+
updateWorktreeInstructions: (input) => project(() => manager.updateWorktreeInstructions(input)),
|
|
47
48
|
listWorktrees: (input) => project(() => manager.listWorktrees(input)),
|
|
48
49
|
listImportCandidates: (input) => project(() => manager.listImportCandidates(input)),
|
|
49
50
|
listBranches: (input) => project(() => manager.listBranches(input)),
|
|
@@ -56,6 +57,20 @@ export function createWorktreeRemoteProjection(manager, permissions) {
|
|
|
56
57
|
// to null in the wire contract.
|
|
57
58
|
return null;
|
|
58
59
|
}),
|
|
60
|
+
unarchiveWorktree: (input) => project(async () => {
|
|
61
|
+
await manager.unarchiveWorktree(input);
|
|
62
|
+
return null;
|
|
63
|
+
}),
|
|
64
|
+
adoptWorktreeBranch: (input) => project(async () => { await manager.adoptWorktreeBranch(input); return null; }),
|
|
65
|
+
recoverWorktrees: (input) => project(async () => { await manager.recoverWorktrees(input); return null; }),
|
|
66
|
+
cleanWorktree: (input) => project(async () => {
|
|
67
|
+
await manager.cleanWorktree(input);
|
|
68
|
+
return null;
|
|
69
|
+
}),
|
|
70
|
+
forgetWorktree: (input) => project(async () => {
|
|
71
|
+
await manager.forgetWorktree(input);
|
|
72
|
+
return null;
|
|
73
|
+
}),
|
|
59
74
|
insertWorktreeBefore: (input) => project(() => manager.insertWorktreeBefore(input)),
|
|
60
75
|
listBindings: (input) => project(() => manager.listBindings(input)),
|
|
61
76
|
bindSession: (input) => project(() => manager.bindSession(input)),
|
package/lib/host/remote.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote.js","sourceRoot":"","sources":["../../src/host/remote.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,mBAAmB,GAMpB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAS,oBAAoB,CAAC,CAAC;AAEjE,SAAS,eAAe,CAAC,KAAc;IACrC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACtF,MAAM,SAAS,GAAG,KAA+B,CAAC;IACl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AAC,CAAC;QACjE,wBAAwB,EAAE,CAAC,KAAK,EAAE,EAAE,CAClC,OAAO,CAAC,GAAG,EAAE,CACX,WAAW,KAAK,SAAS;YACvB,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;YAC5D,CAAC,CAAC,WAAW,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAChD;QACH,oCAAoC,EAAE,CAAC,KAAK,EAAE,EAAE,CAC9C,OAAO,CAAC,GAAG,EAAE,CACX,WAAW,KAAK,SAAS;YACvB,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;YAC5E,CAAC,CAAC,WAAW,CAAC,oCAAoC,CAAC,KAAK,CAAC,CAC5D;KACJ,CAAC;AACJ,CAAC"}
|
package/lib/host/service.d.ts
CHANGED
|
@@ -31,6 +31,12 @@ export declare class WorktreeRemoteService extends TypertRemoteService {
|
|
|
31
31
|
* projection for all calls.
|
|
32
32
|
*/
|
|
33
33
|
constructor(ctx: Context, config: WorktreeHostConfig);
|
|
34
|
+
updateWorktreeInstructions(input: {
|
|
35
|
+
workspaceId: string;
|
|
36
|
+
worktreeId: string;
|
|
37
|
+
instructions: string;
|
|
38
|
+
expectedInstructions: string;
|
|
39
|
+
}): Promise<WorktreeRemoteResult<string>>;
|
|
34
40
|
listWorktrees(input: {
|
|
35
41
|
readonly workspaceId: string;
|
|
36
42
|
}): Promise<WorktreeRemoteResult<readonly WorktreeRecord[]>>;
|
|
@@ -54,6 +60,30 @@ export declare class WorktreeRemoteService extends TypertRemoteService {
|
|
|
54
60
|
readonly worktreeId: string;
|
|
55
61
|
readonly mutationToken: string;
|
|
56
62
|
}): Promise<WorktreeRemoteResult<null>>;
|
|
63
|
+
unarchiveWorktree(input: {
|
|
64
|
+
readonly workspaceId: string;
|
|
65
|
+
readonly worktreeId: string;
|
|
66
|
+
readonly mutationToken: string;
|
|
67
|
+
}): Promise<WorktreeRemoteResult<null>>;
|
|
68
|
+
adoptWorktreeBranch(input: {
|
|
69
|
+
workspaceId: string;
|
|
70
|
+
worktreeId: string;
|
|
71
|
+
mutationToken: string;
|
|
72
|
+
expectedBranch: string;
|
|
73
|
+
}): Promise<WorktreeRemoteResult<null>>;
|
|
74
|
+
recoverWorktrees(input: {
|
|
75
|
+
workspaceId: string;
|
|
76
|
+
}): Promise<WorktreeRemoteResult<null>>;
|
|
77
|
+
cleanWorktree(input: {
|
|
78
|
+
readonly workspaceId: string;
|
|
79
|
+
readonly worktreeId: string;
|
|
80
|
+
readonly mutationToken: string;
|
|
81
|
+
}): Promise<WorktreeRemoteResult<null>>;
|
|
82
|
+
forgetWorktree(input: {
|
|
83
|
+
readonly workspaceId: string;
|
|
84
|
+
readonly worktreeId: string;
|
|
85
|
+
readonly mutationToken: string;
|
|
86
|
+
}): Promise<WorktreeRemoteResult<null>>;
|
|
57
87
|
insertWorktreeBefore(input: {
|
|
58
88
|
readonly workspaceId: string;
|
|
59
89
|
readonly worktreeId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/host/service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/host/service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAU,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAE/E,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,UAAU,EACV,cAAc,EACd,uBAAuB,EACvB,yBAAyB,EACzB,sCAAsC,EACtC,wBAAwB,EACxB,WAAW,EAEX,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AA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MAAM,CAAC;QAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;KAChC,GAAG,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAKvC,oBAAoB,CAAC,KAAK,EAAE;QAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;KACpC,GAAG,OAAO,CAAC,oBAAoB,CAAC,SAAS,UAAU,EAAE,CAAC,CAAC;IAKxD,YAAY,CAAC,KAAK,EAAE;QAClB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;KAC9B,GAAG,OAAO,CAAC,oBAAoB,CAAC,SAAS,cAAc,EAAE,CAAC,CAAC;IAK5D,WAAW,CAAC,KAAK,EAAE;QACjB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;KAC5B,GAAG,OAAO,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC;IAKjD,wBAAwB,CACtB,KAAK,EAAE,yBAAyB,GAC/B,OAAO,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,CAAC;IAK1D,oCAAoC,CAClC,KAAK,EAAE,sCAAsC,GAC5C,OAAO,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,CAAC;CAG3D;AAED,eAAe,qBAAqB,CAAC"}
|
package/lib/host/service.js
CHANGED
|
@@ -32,6 +32,7 @@ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn,
|
|
|
32
32
|
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
33
33
|
done = true;
|
|
34
34
|
};
|
|
35
|
+
import { registerWorktreeInstructions } from './worktree-instructions.js';
|
|
35
36
|
import { Remote, TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
|
|
36
37
|
import { createWorktreeManager } from '../manage/index.js';
|
|
37
38
|
import { DshHostReadAdapter, } from './dsh-read-adapter.js';
|
|
@@ -53,12 +54,18 @@ import { createWorktreePermissionManager } from './worktree-permission-manager.j
|
|
|
53
54
|
let WorktreeRemoteService = (() => {
|
|
54
55
|
let _classSuper = TypertRemoteService;
|
|
55
56
|
let _instanceExtraInitializers = [];
|
|
57
|
+
let _updateWorktreeInstructions_decorators;
|
|
56
58
|
let _listWorktrees_decorators;
|
|
57
59
|
let _listImportCandidates_decorators;
|
|
58
60
|
let _listBranches_decorators;
|
|
59
61
|
let _createWorktree_decorators;
|
|
60
62
|
let _importWorktree_decorators;
|
|
61
63
|
let _removeWorktree_decorators;
|
|
64
|
+
let _unarchiveWorktree_decorators;
|
|
65
|
+
let _adoptWorktreeBranch_decorators;
|
|
66
|
+
let _recoverWorktrees_decorators;
|
|
67
|
+
let _cleanWorktree_decorators;
|
|
68
|
+
let _forgetWorktree_decorators;
|
|
62
69
|
let _insertWorktreeBefore_decorators;
|
|
63
70
|
let _listBindings_decorators;
|
|
64
71
|
let _bindSession_decorators;
|
|
@@ -67,23 +74,35 @@ let WorktreeRemoteService = (() => {
|
|
|
67
74
|
return class WorktreeRemoteService extends _classSuper {
|
|
68
75
|
static {
|
|
69
76
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
77
|
+
_updateWorktreeInstructions_decorators = [Remote];
|
|
70
78
|
_listWorktrees_decorators = [Remote];
|
|
71
79
|
_listImportCandidates_decorators = [Remote];
|
|
72
80
|
_listBranches_decorators = [Remote];
|
|
73
81
|
_createWorktree_decorators = [Remote];
|
|
74
82
|
_importWorktree_decorators = [Remote];
|
|
75
83
|
_removeWorktree_decorators = [Remote];
|
|
84
|
+
_unarchiveWorktree_decorators = [Remote];
|
|
85
|
+
_adoptWorktreeBranch_decorators = [Remote];
|
|
86
|
+
_recoverWorktrees_decorators = [Remote];
|
|
87
|
+
_cleanWorktree_decorators = [Remote];
|
|
88
|
+
_forgetWorktree_decorators = [Remote];
|
|
76
89
|
_insertWorktreeBefore_decorators = [Remote];
|
|
77
90
|
_listBindings_decorators = [Remote];
|
|
78
91
|
_bindSession_decorators = [Remote];
|
|
79
92
|
_ensureWorktreePermission_decorators = [Remote];
|
|
80
93
|
_normalizeDetachedWorktreePermissions_decorators = [Remote];
|
|
94
|
+
__esDecorate(this, null, _updateWorktreeInstructions_decorators, { kind: "method", name: "updateWorktreeInstructions", static: false, private: false, access: { has: obj => "updateWorktreeInstructions" in obj, get: obj => obj.updateWorktreeInstructions }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
81
95
|
__esDecorate(this, null, _listWorktrees_decorators, { kind: "method", name: "listWorktrees", static: false, private: false, access: { has: obj => "listWorktrees" in obj, get: obj => obj.listWorktrees }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
82
96
|
__esDecorate(this, null, _listImportCandidates_decorators, { kind: "method", name: "listImportCandidates", static: false, private: false, access: { has: obj => "listImportCandidates" in obj, get: obj => obj.listImportCandidates }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
83
97
|
__esDecorate(this, null, _listBranches_decorators, { kind: "method", name: "listBranches", static: false, private: false, access: { has: obj => "listBranches" in obj, get: obj => obj.listBranches }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
84
98
|
__esDecorate(this, null, _createWorktree_decorators, { kind: "method", name: "createWorktree", static: false, private: false, access: { has: obj => "createWorktree" in obj, get: obj => obj.createWorktree }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
85
99
|
__esDecorate(this, null, _importWorktree_decorators, { kind: "method", name: "importWorktree", static: false, private: false, access: { has: obj => "importWorktree" in obj, get: obj => obj.importWorktree }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
86
100
|
__esDecorate(this, null, _removeWorktree_decorators, { kind: "method", name: "removeWorktree", static: false, private: false, access: { has: obj => "removeWorktree" in obj, get: obj => obj.removeWorktree }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
101
|
+
__esDecorate(this, null, _unarchiveWorktree_decorators, { kind: "method", name: "unarchiveWorktree", static: false, private: false, access: { has: obj => "unarchiveWorktree" in obj, get: obj => obj.unarchiveWorktree }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
102
|
+
__esDecorate(this, null, _adoptWorktreeBranch_decorators, { kind: "method", name: "adoptWorktreeBranch", static: false, private: false, access: { has: obj => "adoptWorktreeBranch" in obj, get: obj => obj.adoptWorktreeBranch }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
103
|
+
__esDecorate(this, null, _recoverWorktrees_decorators, { kind: "method", name: "recoverWorktrees", static: false, private: false, access: { has: obj => "recoverWorktrees" in obj, get: obj => obj.recoverWorktrees }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
104
|
+
__esDecorate(this, null, _cleanWorktree_decorators, { kind: "method", name: "cleanWorktree", static: false, private: false, access: { has: obj => "cleanWorktree" in obj, get: obj => obj.cleanWorktree }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
105
|
+
__esDecorate(this, null, _forgetWorktree_decorators, { kind: "method", name: "forgetWorktree", static: false, private: false, access: { has: obj => "forgetWorktree" in obj, get: obj => obj.forgetWorktree }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
87
106
|
__esDecorate(this, null, _insertWorktreeBefore_decorators, { kind: "method", name: "insertWorktreeBefore", static: false, private: false, access: { has: obj => "insertWorktreeBefore" in obj, get: obj => obj.insertWorktreeBefore }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
88
107
|
__esDecorate(this, null, _listBindings_decorators, { kind: "method", name: "listBindings", static: false, private: false, access: { has: obj => "listBindings" in obj, get: obj => obj.listBindings }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
89
108
|
__esDecorate(this, null, _bindSession_decorators, { kind: "method", name: "bindSession", static: false, private: false, access: { has: obj => "bindSession" in obj, get: obj => obj.bindSession }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
@@ -104,7 +123,15 @@ let WorktreeRemoteService = (() => {
|
|
|
104
123
|
*/
|
|
105
124
|
constructor(ctx, config) {
|
|
106
125
|
super(ctx, 'worktreeManager');
|
|
107
|
-
|
|
126
|
+
let disposed = false;
|
|
127
|
+
ctx.effect(() => () => {
|
|
128
|
+
disposed = true;
|
|
129
|
+
}, 'clutch-dsh-worktree: activity reader disposal');
|
|
130
|
+
const activitySource = ctx.get('activitySource');
|
|
131
|
+
const dsh = new DshHostReadAdapter(ctx, {
|
|
132
|
+
activitySource,
|
|
133
|
+
isDisposed: () => disposed,
|
|
134
|
+
});
|
|
108
135
|
const subprocess = ctx.get('subprocess');
|
|
109
136
|
const manager = createWorktreeManager({
|
|
110
137
|
dsh,
|
|
@@ -112,6 +139,7 @@ let WorktreeRemoteService = (() => {
|
|
|
112
139
|
subprocess,
|
|
113
140
|
});
|
|
114
141
|
this.manager = manager;
|
|
142
|
+
registerWorktreeInstructions(ctx, (sessionId) => manager.resolveSessionInstructions(sessionId), () => disposed);
|
|
115
143
|
ctx.effect(() => () => this.manager.close(), 'clutch-dsh-worktree: Host manager cleanup');
|
|
116
144
|
// Permission presets are an optional DSH capability. Read them through a
|
|
117
145
|
// structural seam so an older profile can still mount this plugin and
|
|
@@ -138,6 +166,9 @@ let WorktreeRemoteService = (() => {
|
|
|
138
166
|
// These methods stay deliberately thin so generated Typert descriptors see only
|
|
139
167
|
// contract-safe signatures; error normalization and JSON projection remain centralized
|
|
140
168
|
// in `createWorktreeRemoteProjection`.
|
|
169
|
+
updateWorktreeInstructions(input) {
|
|
170
|
+
return this.remote.updateWorktreeInstructions(input);
|
|
171
|
+
}
|
|
141
172
|
listWorktrees(input) {
|
|
142
173
|
return this.remote.listWorktrees(input);
|
|
143
174
|
}
|
|
@@ -156,6 +187,21 @@ let WorktreeRemoteService = (() => {
|
|
|
156
187
|
removeWorktree(input) {
|
|
157
188
|
return this.remote.removeWorktree(input);
|
|
158
189
|
}
|
|
190
|
+
unarchiveWorktree(input) {
|
|
191
|
+
return this.remote.unarchiveWorktree(input);
|
|
192
|
+
}
|
|
193
|
+
adoptWorktreeBranch(input) {
|
|
194
|
+
return this.remote.adoptWorktreeBranch(input);
|
|
195
|
+
}
|
|
196
|
+
recoverWorktrees(input) {
|
|
197
|
+
return this.remote.recoverWorktrees(input);
|
|
198
|
+
}
|
|
199
|
+
cleanWorktree(input) {
|
|
200
|
+
return this.remote.cleanWorktree(input);
|
|
201
|
+
}
|
|
202
|
+
forgetWorktree(input) {
|
|
203
|
+
return this.remote.forgetWorktree(input);
|
|
204
|
+
}
|
|
159
205
|
insertWorktreeBefore(input) {
|
|
160
206
|
return this.remote.insertWorktreeBefore(input);
|
|
161
207
|
}
|