@cerbur/clutch-dsh-worktree 0.1.9 → 0.1.10
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 +99 -23
- package/README.zh.md +75 -19
- package/lib/client/WorktreeSurface.d.ts +4 -7
- package/lib/client/WorktreeSurface.d.ts.map +1 -1
- package/lib/client/WorktreeSurface.js +44 -1419
- 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/entry.d.ts +1 -1
- package/lib/client/entry.d.ts.map +1 -1
- package/lib/client/entry.js +25 -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 +66 -0
- package/lib/client/locales.d.ts.map +1 -1
- package/lib/client/locales.js +76 -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-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 +154 -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 +145 -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 +145 -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} +79 -17
- 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} +50 -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} +1 -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-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 +5 -0
- package/lib/client/worktree-connection.d.ts.map +1 -1
- package/lib/client/worktree-connection.js +16 -0
- package/lib/client/worktree-connection.js.map +1 -1
- package/lib/client.js +4295 -2634
- package/lib/client.js.map +1 -1
- package/lib/contract/index.contract.js +10 -0
- package/lib/contract/index.contract.js.map +1 -1
- package/lib/contract/index.d.ts +46 -3
- package/lib/contract/index.d.ts.map +1 -1
- package/lib/contract/index.js +7 -0
- package/lib/contract/index.js.map +1 -1
- package/lib/host/dsh-read-adapter.d.ts +10 -1
- package/lib/host/dsh-read-adapter.d.ts.map +1 -1
- package/lib/host/dsh-read-adapter.js +18 -1
- package/lib/host/dsh-read-adapter.js.map +1 -1
- package/lib/host/remote.d.ts.map +1 -1
- package/lib/host/remote.js +14 -0
- package/lib/host/remote.js.map +1 -1
- package/lib/host/service.d.ts +24 -0
- package/lib/host/service.d.ts.map +1 -1
- package/lib/host/service.js +39 -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-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 +78 -112
- package/lib/manage/manager-worktrees.js.map +1 -1
- package/lib/manage/manager.d.ts +17 -1
- package/lib/manage/manager.d.ts.map +1 -1
- package/lib/manage/manager.js +23 -6
- package/lib/manage/manager.js.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} +12 -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} +52 -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 +92 -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 +162 -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 +72 -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 +269 -30
- package/lib/typert.remote-client.d.ts +10 -0
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +269 -30
- package/package.json +1 -1
- 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
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ the adjacent Import tab, and a standard dropdown containing safe example branch/
|
|
|
23
23
|
- Search Workspaces and create a Git Worktree and branch from an existing local branch.
|
|
24
24
|
- Choose Import in the same dialog to discover unmanaged, branch-attached Git Worktrees linked to the Workspace repository. The first version omits the repository root and detached HEAD entries.
|
|
25
25
|
- Register an existing Worktree in place without moving, copying, or editing its directory; the imported record uses `source: external` and then follows the same Session, binding, health, ordering, cwd, projection, refresh, and recovery flow as a plugin-created record.
|
|
26
|
-
-
|
|
26
|
+
- Archive Worktrees non-destructively (`status: removed`), preserving disk files, active bindings, and runtime cwd. Disk cleanup (`git worktree remove`) requires secondary confirmation: users must confirm all Sessions, subagents, and other tasks using the directory have stopped. Worktrees can also be forgotten from plugin management while retaining disk files and Sessions.
|
|
27
27
|
- Create a normal Session from Main or a Session whose runtime cwd is an active Worktree, then
|
|
28
28
|
open it directly.
|
|
29
29
|
- For active Worktree Sessions, request the named `worktree-full-access` preset after an
|
|
@@ -53,7 +53,7 @@ the adjacent Import tab, and a standard dropdown containing safe example branch/
|
|
|
53
53
|
Main/Local. A sidecar failure keeps the child available and exposes retryable binding recovery.
|
|
54
54
|
- See ready, repair, active, and detached Worktree states, including retryable operation errors.
|
|
55
55
|
- Use the shared Main and Worktree row options menu to copy the selected row's absolute path.
|
|
56
|
-
Main and detached rows show only `Copy path`; active Worktree rows also show `
|
|
56
|
+
Main and detached rows show only `Copy path`; active Worktree rows also show `Archive Worktree`
|
|
57
57
|
with confirmation.
|
|
58
58
|
- Create a new Worktree from the Local or an active Worktree's options menu. The Create dialog
|
|
59
59
|
uses the selected row's current branch as its base and suggests the next available numbered
|
|
@@ -62,6 +62,7 @@ the adjacent Import tab, and a standard dropdown containing safe example branch/
|
|
|
62
62
|
be reordered within their owning Workspace; order is stored in the plugin sidecar and Main is
|
|
63
63
|
fixed first.
|
|
64
64
|
- Persist Workspace, Main, and Worktree expansion choices in browser-local storage; the five-row Session overflow state remains transient and resets after refresh or parent collapse.
|
|
65
|
+
- Provide a Collapse All button in the Worktree Header to collapse all Workspaces and Worktrees at once.
|
|
65
66
|
- Highlight the DSH current Session in Worktree view; entering Worktree mode or switching the current Session temporarily reveals its Workspace/Main/Worktree path, expands Session overflow only when the row is outside the first five, clears a hiding search, and scrolls the row into view; this browser-local behavior does not change persisted expansion choices.
|
|
66
67
|
- Keep the current local branch or Worktree branch visible as read-only context in the existing
|
|
67
68
|
Conversation title row and in the blank-session Hero.
|
|
@@ -225,6 +226,13 @@ blank-session Hero. The displayed language follows DSH's current language settin
|
|
|
225
226
|
|
|
226
227
|
### Create a Worktree
|
|
227
228
|
|
|
229
|
+
New directories use `$dshHome/clutch-dsh-worktree/worktree/wt_<12-hex-characters>`
|
|
230
|
+
(15 characters in the folder name, with 48 bits of cryptographic randomness).
|
|
231
|
+
Occupied directory names, Git registrations, and sidecar identities are automatically retried.
|
|
232
|
+
After eight random candidates collide, numeric suffixes such as `_1` and `_2` are tried until
|
|
233
|
+
available or cancelled. Existing Worktree paths and IDs stay unchanged; branch conflicts and
|
|
234
|
+
other Git failures retain their normal error handling.
|
|
235
|
+
|
|
228
236
|
1. Select a Workspace, press its `+`, choose a baseline local branch, and enter a Worktree name.
|
|
229
237
|
The default branch name is `dsh/<8-character-random-string>`.
|
|
230
238
|
2. To create a sibling from an existing Worktree, open that active Worktree's options menu and
|
|
@@ -242,7 +250,10 @@ blank-session Hero. The displayed language follows DSH's current language settin
|
|
|
242
250
|
1. Select a Workspace, press its `+`, and choose the `Import` tab. The dialog loads Git-linked
|
|
243
251
|
Worktrees for that repository through the existing DSH `/api` Connection.
|
|
244
252
|
2. The first version lists only branch-attached, non-root Worktrees that are not already present
|
|
245
|
-
in the plugin sidecar. Detached HEAD
|
|
253
|
+
in the plugin sidecar. Detached HEAD, bare, prunable, missing-directory and missing-`.git`
|
|
254
|
+
entries are omitted. Managed health and import eligibility share one runtime status mapping;
|
|
255
|
+
importing rechecks that status. Locked Worktrees remain eligible when otherwise ready.
|
|
256
|
+
Candidates are presented
|
|
246
257
|
in a standard dropdown; each option shows its branch first and absolute path as secondary
|
|
247
258
|
diagnostic text.
|
|
248
259
|
3. Choose an option and select `Import Worktree`. Registration writes only the plugin sidecar;
|
|
@@ -320,19 +331,42 @@ blank-session Hero. The displayed language follows DSH's current language settin
|
|
|
320
331
|
- Drag Worktrees within their owning Workspace. The ordered `worktrees` array is persisted in
|
|
321
332
|
the plugin sidecar; Main is a fixed first row and Worktrees cannot move across Workspaces.
|
|
322
333
|
- Newly created or imported Worktrees are inserted at the head of their Workspace's Worktree list; existing Worktree order is preserved and Main remains fixed first.
|
|
323
|
-
- Open the shared Main and Worktree options menu to copy the selected row's absolute path.
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
-
|
|
333
|
-
`
|
|
334
|
-
|
|
335
|
-
|
|
334
|
+
- Open the shared Main and Worktree options menu to copy the selected row's absolute path. Active
|
|
335
|
+
Worktrees show `Copy path` and `Archive Worktree`. Archiving an active Worktree is an internal
|
|
336
|
+
archive operation: it sets `status: removed`, preserves disk files, active bindings, and runtime cwd,
|
|
337
|
+
and moves the Worktree into the default-collapsed `Archived` group at the bottom of the Workspace.
|
|
338
|
+
- The `Archived` group is rendered at the bottom of the Workspace when archived Worktrees exist and is
|
|
339
|
+
collapsed by default. Its label includes the total archived Worktree count, even when collapsed.
|
|
340
|
+
Each Workspace tracks its own collapsed state independently.
|
|
341
|
+
- Active Worktrees with `health: repair` also offer `Archive Worktree` to archive the record without
|
|
342
|
+
touching disk files or bindings. `recovery-needed` still blocks removal pending recovery.
|
|
343
|
+
- For archived Worktrees whose disk has not been cleaned, the options menu provides:
|
|
344
|
+
1. `Unarchive Worktree`: Restores a metadata-archived Worktree whose disk directory is intact back to active status, without secondary confirmation.
|
|
345
|
+
2. `Clean Up Disk`: Prompts for secondary confirmation detailing the path and irreversible deletion,
|
|
346
|
+
tells you that the plugin does not check Session or subagent activity and requires you to confirm
|
|
347
|
+
that all tasks using the directory have stopped (otherwise deletion may cause task failures or data loss),
|
|
348
|
+
runs real non-forced `git worktree remove`, and upon success records
|
|
349
|
+
`diskCleanup: completed`, projects health as `cleaned`, transitions bindings to detached, and
|
|
350
|
+
normalizes Full Access permissions to `workspace-write + ask`. Disk removal commitment is decoupled
|
|
351
|
+
from permission normalization: once disk removal commits, the dialog closes and the record updates to
|
|
352
|
+
`cleaned`; any follow-up permission or refresh failure provides independent retry without re-executing disk removal.
|
|
353
|
+
Use `Retry` in the permission notice to retry only permission normalization for the cleaned Worktree.
|
|
354
|
+
If the Worktree directory or its `.git` entry was already deleted externally, confirming cleanup only marks
|
|
355
|
+
the plugin record as completed and detaches its bindings. It does not run Git removal or prune
|
|
356
|
+
stale Git registration. Any remaining directory and files are preserved. The completed status
|
|
357
|
+
reads `Worktree removed`, which does not imply residual files were deleted. Ordinary refreshes still show
|
|
358
|
+
missing directories as `repair` until cleanup is explicitly confirmed.
|
|
359
|
+
3. `Remove from Management`: Prompts for confirmation and removes the Worktree sidecar record and all
|
|
360
|
+
its bindings, while preserving disk files and native DSH Sessions. It retires in-flight fork operations,
|
|
361
|
+
recovery state, and permission notices for that Worktree. No Session activity check is required.
|
|
362
|
+
- For archived Worktrees whose disk has already been cleaned (`health: cleaned`), the menu provides
|
|
363
|
+
`Remove from Management` to prune the sidecar record completely.
|
|
364
|
+
- Session activity is informational and does not block cleanup or removal from management.
|
|
365
|
+
The default Host may report `unknown`. Before confirming disk cleanup, stop all tasks using
|
|
366
|
+
the directory yourself; the plugin does not verify that they have stopped. Native activity
|
|
367
|
+
changes and reopening the archived menu refresh its owning Workspace while retaining ready content.
|
|
368
|
+
- Deleting a Workspace removes only DSH's Workspace registration; its directory, Sessions, Git Worktrees,
|
|
369
|
+
and plugin sidecar remain.
|
|
336
370
|
- DSH-native Workspace rename/delete/reorder and Session menus remain available. Session drag
|
|
337
371
|
ordering is limited to the current visual Main or Worktree group.
|
|
338
372
|
- The Main group shows the current local branch as `Local (branch)` and falls back to `Local` if
|
|
@@ -347,13 +381,54 @@ blank-session Hero. The displayed language follows DSH's current language settin
|
|
|
347
381
|
- When the Sidebar is collapsed, the footer keeps its icon-only native action geometry; the plugin
|
|
348
382
|
does not render a separate `WT` rail control.
|
|
349
383
|
|
|
384
|
+
### Reconcile a branch changed in Git
|
|
385
|
+
|
|
386
|
+
After an external `git checkout`, the next Worktree read shows `old branch → current branch`
|
|
387
|
+
and a branch-change warning. Reads occur on refresh and when opening a Worktree menu; the
|
|
388
|
+
plugin does not watch Git continuously. Detached HEAD is shown explicitly. Session bindings
|
|
389
|
+
and runtime cwd remain unchanged, and normal branch changes do not lock the Workspace.
|
|
390
|
+
|
|
391
|
+
Choose `Adopt current branch` from the active or archived Worktree menu and confirm the
|
|
392
|
+
displayed transition. This updates only the plugin's recorded branch. A changed branch or
|
|
393
|
+
stale snapshot during confirmation is rejected; refresh and confirm again. Detached HEAD
|
|
394
|
+
must first be switched to a branch in Git. Disk cleanup requires adopting the current branch
|
|
395
|
+
first. Creating a Worktree on the old branch is allowed when Git proves the existing record
|
|
396
|
+
has switched away; genuinely checked-out branches remain unavailable.
|
|
397
|
+
|
|
398
|
+
Confirmation failures appear inside the dialog. Choose `Retry` to reload the observed branch
|
|
399
|
+
and snapshot token, then confirm the updated transition; the old confirmation stays disabled
|
|
400
|
+
until refresh succeeds. If the Worktree is no longer branch-drifted or has entered detached HEAD,
|
|
401
|
+
the dialog closes. Creating a sibling Worktree uses the observed current branch, even before
|
|
402
|
+
adoption; detached HEAD does not offer this action.
|
|
403
|
+
|
|
404
|
+
For `recovery-needed`, the Worktree menu offers `Retry recovery` for its Workspace.
|
|
405
|
+
This retries safe journal recovery; it does not adopt branches, delete unknown paths, or
|
|
406
|
+
clear unresolved identity issues. Successful adoption and recovery refresh only the owning
|
|
407
|
+
Workspace while preserving existing ready content. Legacy non-transactional branch observations
|
|
408
|
+
are retired automatically; there is no need to edit sidecar JSON for ordinary checkout drift.
|
|
409
|
+
|
|
350
410
|
### Understand status and recovery messages
|
|
351
411
|
|
|
352
|
-
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
412
|
+
- Operation, permission, binding, and refresh failures use DSH's native toast, one at a time.
|
|
413
|
+
Unchanged errors are not repeated on every render. Full messages and existing Retry/Open
|
|
414
|
+
actions remain in the expandable Notification details and recovery entry after the toast fades.
|
|
415
|
+
Form validation and Workspace Git setup guidance remain next to their inputs.
|
|
416
|
+
- Hover or focus an active Worktree row to see its status, path, and repair guidance for missing
|
|
417
|
+
directories/Git registration, branch drift/detached HEAD, or incomplete recovery. Opening its
|
|
418
|
+
menu or dragging suppresses the hover card. Archive confirmation explicitly preserves the
|
|
419
|
+
directory, Session bindings, and cwd for both plugin-created and external Worktrees;
|
|
420
|
+
Clean Disk remains a separate action.
|
|
421
|
+
|
|
422
|
+
- `ready` means the Worktree is available. `cleaned` indicates disk cleanup completed while the
|
|
423
|
+
sidecar archive entry is retained. `repair` identifies a missing or invalid Worktree, Session, binding,
|
|
424
|
+
or cwd. `recovery-needed` means a Git/sidecar operation or identity check is unresolved and
|
|
425
|
+
destructive actions are blocked. `detached` means the Git Worktree was removed while the relationship
|
|
426
|
+
was retained. An active binding pointing to a missing Worktree produces
|
|
356
427
|
an explicit repair warning or error; it never silently falls back to another Worktree.
|
|
428
|
+
- Without a pending Git transaction, missing active or archived Worktrees remain `repair` and
|
|
429
|
+
can be archived without blocking healthy Worktree Session bindings. Legacy non-transactional
|
|
430
|
+
`WORKTREE_RECOVERY_REQUIRED` observations for existing, uncleaned records are retired under
|
|
431
|
+
the sidecar lock; pending transactions, unknown records, and identity-change issues still block.
|
|
357
432
|
- Worktree health is a runtime Git projection and is not written to the sidecar. Git readiness
|
|
358
433
|
failures are shown per Workspace: a missing Git executable shows installation guidance without
|
|
359
434
|
commands, while repository, initial commit, or local branch failures show copyable setup
|
|
@@ -395,9 +470,10 @@ store a copy of `projectRoot` or any Session content. If the sidecar is unavaila
|
|
|
395
470
|
the native Project/Session view remains readable and the plugin becomes degraded/read-only; an
|
|
396
471
|
empty index must never overwrite the native DSH lists.
|
|
397
472
|
|
|
398
|
-
The sidecar accepts v1 and
|
|
399
|
-
normalized in memory, and the first successful mutation atomically upgrades the shard to
|
|
400
|
-
|
|
473
|
+
The sidecar accepts v1, v2, and v3 snapshots for backwards-compatible reads. Legacy records are
|
|
474
|
+
normalized in memory, and the first successful mutation atomically upgrades the shard to v4.
|
|
475
|
+
Legacy removed records become `diskCleanup: completed`; v3 revisions are preserved.
|
|
476
|
+
New v4 snapshots use a revision, an opaque repository fingerprint, and durable pending-operation
|
|
401
477
|
metadata for Git create/remove. A transitional v3 snapshot containing an older raw repository
|
|
402
478
|
field is read and cleaned on its next stable write. Invalid JSON, unknown schema versions, and
|
|
403
479
|
invariant violations are reported as corruption rather than reset to an empty index.
|
package/README.zh.md
CHANGED
|
@@ -23,7 +23,7 @@ Session 元数据、原生列表和会话历史的唯一事实来源。插件只
|
|
|
23
23
|
- 搜索 Workspace,并从已有 local branch 创建 Git Worktree 和 branch。
|
|
24
24
|
- 在同一个弹窗中选择导入,发现与当前 Workspace repository 关联、尚未由 sidecar 管理且绑定 branch 的 Git Worktree。第一版不展示 repository root 和 detached HEAD 条目。
|
|
25
25
|
- 导入只登记已有 Worktree,不移动、复制或编辑其目录;记录使用 `source: external`,之后与 plugin 创建的记录共享 Session、binding、health、排序、cwd、projection、刷新和恢复流程。
|
|
26
|
-
-
|
|
26
|
+
- 非破坏性归档 Worktree(`status: removed`),保留磁盘文件、活动 binding 与运行时 cwd。磁盘清理(`git worktree remove`)需经二次确认,由用户自行确认使用该目录的 Session/子代理与其他任务已停止;亦支持移出插件管理并保留磁盘文件与 Session。
|
|
27
27
|
- 在 Main 或 active Worktree 下创建普通 Session 或 Worktree Session,并直接打开新会话。
|
|
28
28
|
- 对 active Worktree Session,先经明确确认,再请求命名的 `worktree-full-access` 预设。它将
|
|
29
29
|
DSH 的 `danger-full-access` 与 `ask` 组合:关闭关联 Git 元数据的文件系统限制,但保留
|
|
@@ -48,13 +48,14 @@ Session 元数据、原生列表和会话历史的唯一事实来源。插件只
|
|
|
48
48
|
binding 恢复操作。
|
|
49
49
|
- 查看 ready、repair、active 和 detached Worktree 状态,包括可重试的操作错误。
|
|
50
50
|
- 通过 Main 和 Worktree 共用的选项菜单复制所选行的绝对路径;Main 和 detached 行只显示“复制路径”,
|
|
51
|
-
active Worktree
|
|
51
|
+
active Worktree 额外显示“归档 Worktree”并要求确认。
|
|
52
52
|
- 通过 Local 或 active Worktree 的选项菜单创建新的 Worktree。创建弹窗会以所选行的当前 branch
|
|
53
53
|
为基线,并预填下一个可用的递增名称,例如 `feature-2` 或 `feature-3`;detached Worktree
|
|
54
54
|
不显示该动作。
|
|
55
55
|
- 继续使用 DSH 原生的 Workspace rename/delete/reorder 和 Session 菜单。Worktree 可以在所属
|
|
56
56
|
Workspace 内排序;顺序保存在插件 sidecar 中,Main 固定在第一位。
|
|
57
57
|
- 将 Workspace、Main 和 Worktree 的展开选择保存到浏览器本地存储;Session 五行溢出展开保持临时状态,并在刷新或父级折叠后重置。
|
|
58
|
+
- 在 Worktree Header 提供「全部折叠」按钮,支持一键折叠所有 Workspace 与 Worktree。
|
|
58
59
|
- 在 Worktree view 高亮 DSH 当前 Session;进入 Worktree 模式或切换当前会话时,临时展开其 Workspace/Main/Worktree 路径;只有当前行不在前五行时才展开 Session 五行溢出,随后清空隐藏它的搜索并滚动定位;这一浏览器本地行为不改变已保存的展开选择。
|
|
59
60
|
- 在已有 Conversation 的标题行以及新会话空白 Hero 中,以只读方式显示当前 local branch 或
|
|
60
61
|
Worktree branch 上下文。
|
|
@@ -212,6 +213,12 @@ pnpm dsh plugin --profile web remove @cerbur/clutch-dsh-worktree
|
|
|
212
213
|
|
|
213
214
|
### 创建 Worktree
|
|
214
215
|
|
|
216
|
+
新目录使用 `$dshHome/clutch-dsh-worktree/worktree/wt_<12-hex-characters>`
|
|
217
|
+
(文件夹名为 15 个字符,包含 48 位加密随机数)。
|
|
218
|
+
目录名、Git 登记或 sidecar 身份已被占用时自动换名重试;八个随机候选均冲突后,
|
|
219
|
+
依次尝试 `_1`、`_2` 等数字后缀,直到找到可用名称或取消。
|
|
220
|
+
已有 Worktree 的路径和 ID 保持不变;分支冲突与其他 Git 失败沿用原有错误处理。
|
|
221
|
+
|
|
215
222
|
1. 选择 Workspace,点击它旁边的 `+`,选择基线 local branch,并填写 Worktree name。默认
|
|
216
223
|
branch 名称为 `dsh/<8-character-random-string>`。
|
|
217
224
|
2. 如果要从已有 Worktree 创建同级 Worktree,打开该 active Worktree 的选项菜单并选择
|
|
@@ -229,7 +236,10 @@ pnpm dsh plugin --profile web remove @cerbur/clutch-dsh-worktree
|
|
|
229
236
|
1. 选择 Workspace,点击旁边的 `+`,再选择 `导入` Tab。弹窗通过现有 DSH `/api` Connection
|
|
230
237
|
加载该 repository 的 Git Worktree 候选项。
|
|
231
238
|
2. 第一版只列出绑定 branch、不是 repository root、且未出现在 plugin sidecar 中的 Worktree。
|
|
232
|
-
detached HEAD
|
|
239
|
+
detached HEAD、bare、prunable、目录缺失和 `.git` 缺失的条目会被省略。
|
|
240
|
+
已管理 Worktree 的 health 与导入资格共用运行时状态映射,提交导入时重新校验;
|
|
241
|
+
locked Worktree 在其他条件满足时仍可导入。
|
|
242
|
+
候选项通过普通下拉框选择,每个选项先显示 branch,再显示绝对路径
|
|
233
243
|
作为诊断信息。
|
|
234
244
|
3. 在下拉框中选择一个选项并点击 `导入 Worktree`。登记只写入 plugin sidecar,已有 Worktree 目录和 Git
|
|
235
245
|
工作状态保持不变。随后会在该 Worktree cwd 创建或复用 Session,并执行与创建相同的
|
|
@@ -294,17 +304,26 @@ pnpm dsh plugin --profile web remove @cerbur/clutch-dsh-worktree
|
|
|
294
304
|
- 在所属 Workspace 内拖动 Worktree。排序持久化在 plugin sidecar 的有序 `worktrees` 数组中;
|
|
295
305
|
Main 是固定的第一行,Worktree 不能跨 Workspace 移动。
|
|
296
306
|
- 新创建或新导入的 Worktree 会插入所属 Workspace 的 Worktree 列表队头;已有 Worktree 顺序保持不变,Main 固定在第一位。
|
|
297
|
-
- 打开 Main 和 Worktree 共用的选项菜单复制所选行的绝对路径。
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
307
|
+
- 打开 Main 和 Worktree 共用的选项菜单复制所选行的绝对路径。active Worktree 提供“复制路径”与
|
|
308
|
+
“归档 Worktree”。归档 active Worktree 属于内部归档操作:将其标记为 `status: removed`,完整保留
|
|
309
|
+
磁盘目录、关联 binding 与运行时 cwd,并将该 Worktree 沉底移动到工作区底部的“已归档”(Archived)分组中。
|
|
310
|
+
- 工作区底部在存在已归档 Worktree 时渲染“已归档”分组,默认处于折叠状态;标题显示已归档 Worktree 总数,收起时仍然显示。每个 Workspace 维护独立的折叠状态。
|
|
311
|
+
- `health: repair` 的 active Worktree 也提供“归档 Worktree”,仅归档记录,保留磁盘文件和 binding。`recovery-needed` 状态仍须先处理恢复问题,不能归档。
|
|
312
|
+
- 对于未清理磁盘的已归档 Worktree,选项菜单提供:
|
|
313
|
+
1. “取消归档”(Unarchive Worktree):对于仅元数据标记归档且磁盘未清理的 Worktree,可直接在菜单中点击取消归档,无需二次确认弹窗,立即恢复为活跃状态。
|
|
314
|
+
2. “清理磁盘”(Clean Up Disk):弹出二次确认弹窗(明确提示工作树路径与破坏性删除不可逆),告知插件不核验 Session/子代理活动,
|
|
315
|
+
请用户自行确认使用该目录的任务均已停止,否则删除可能导致任务失败或数据丢失;执行真正的非强制 `git worktree remove`,
|
|
316
|
+
成功后记录 `diskCleanup: completed`,运行时健康状态投影为 `cleaned`,关联 binding 转为 detached,并将完全访问权限
|
|
317
|
+
归一化为 `workspace-write + ask`。磁盘清理提交与权限后续解耦:清理成功即确认提交、关闭对话框并将状态转为 `cleaned`;
|
|
318
|
+
权限归一化失败或刷新异常提供独立恢复,不重复执行磁盘删除。
|
|
319
|
+
点击权限提示中的“重试”(Retry),仅重试该已清理 Worktree 的权限归一化。
|
|
320
|
+
如果 Worktree 目录或其 `.git` 入口已在外部删除,确认清理只将插件记录标记为完成并将 binding 转为 detached,
|
|
321
|
+
不再执行 Git 删除,也不清理残留 Git registration。剩余目录和文件完整保留,完成状态显示
|
|
322
|
+
“Worktree 已移除”,不代表剩余文件已被删除。普通刷新仍显示 `repair`,直到用户显式确认清理。
|
|
323
|
+
3. “移出管理”(Remove from Management):弹出确认弹窗,删除该 Worktree 的 sidecar 记录与全部关联 binding,完整保留
|
|
324
|
+
磁盘文件与 DSH 原生 Session;同时定向淘汰该 Worktree 的未决 fork 恢复、投影与权限提示。不需要校验 Session 活动。
|
|
325
|
+
- 对于已清理磁盘的 Worktree(`health: cleaned`),选项菜单提供“移出管理”以从 sidecar 中彻底移除该记录。
|
|
326
|
+
- 删除 Workspace 只会删除 DSH 的 Workspace registration;其目录、Session、Git Worktree 和 plugin sidecar 会保留。
|
|
308
327
|
- DSH 原生的 Workspace rename/delete/reorder 和 Session 菜单继续可用。Session 拖动排序
|
|
309
328
|
限定在当前视觉 Main 或 Worktree 分组中。
|
|
310
329
|
- Main 分组显示当前 local branch:有分支时为 `本地(branch)`,DSH 没有返回当前分支时
|
|
@@ -318,11 +337,43 @@ pnpm dsh plugin --profile web remove @cerbur/clutch-dsh-worktree
|
|
|
318
337
|
- Sidebar 折叠后,footer 保留原生的 icon-only action 尺寸和排版;插件不会再绘制独立的
|
|
319
338
|
`WT` rail control。
|
|
320
339
|
|
|
340
|
+
### 同步在 Git 中切换的分支
|
|
341
|
+
|
|
342
|
+
外部执行 `git checkout` 后,下次 Worktree 读取显示“旧分支 → 当前分支”与分支变化提示。
|
|
343
|
+
刷新或打开 Worktree 菜单时会读取,插件不持续监听 Git。分离 HEAD 会明确标注。
|
|
344
|
+
Session binding 和运行时 cwd 保持不变,普通分支切换不会锁住整个 Workspace。
|
|
345
|
+
|
|
346
|
+
在活动或归档 Worktree 菜单中选择“采用当前分支”(`Adopt current branch`)并确认,
|
|
347
|
+
只更新插件记录的分支。确认期间 Git 分支或快照已变化时会拒绝操作,请刷新后重新确认。
|
|
348
|
+
分离 HEAD 必须先在 Git 中切换到分支;清理磁盘前必须先采用当前分支。
|
|
349
|
+
Git 明确证明原记录已切走时,允许用空闲的旧分支创建 Worktree;真正被 checkout 的分支仍不可用。
|
|
350
|
+
|
|
351
|
+
确认失败会在弹窗内显示错误。点击“重试”(`Retry`)重新读取当前分支和快照 token,
|
|
352
|
+
再确认更新后的分支变化;刷新成功前不能再次提交旧确认。如果 Worktree 已不再处于
|
|
353
|
+
分支漂移状态或进入分离 HEAD,弹窗会关闭。从该行创建新 Worktree 使用读到的当前分支,
|
|
354
|
+
无需先采用分支;分离 HEAD 不提供此操作。
|
|
355
|
+
|
|
356
|
+
`recovery-needed` 行的菜单提供“重试恢复”(`Retry recovery`),作用于所属 Workspace。
|
|
357
|
+
该操作只重试安全 journal 恢复,不自动采用分支、不删除未知路径、不清除未解决的身份问题。
|
|
358
|
+
采用分支和恢复成功后只刷新所属 Workspace,并保留现有 ready 内容。
|
|
359
|
+
旧版非事务分支观察标记会自动淘汰,普通 checkout 漂移不需要手工编辑 sidecar JSON。
|
|
360
|
+
|
|
321
361
|
### 理解状态与恢复提示
|
|
322
362
|
|
|
323
|
-
-
|
|
324
|
-
|
|
325
|
-
|
|
363
|
+
- 操作、权限、绑定和刷新失败统一使用 DSH 原生 toast,逐条显示;相同错误不会随每次渲染重复提示。
|
|
364
|
+
toast 消失后,完整信息及原有重试/打开操作仍保留在可展开的“提示详情与恢复操作”入口。
|
|
365
|
+
表单校验和 Workspace Git 初始化指引保留在对应输入附近。
|
|
366
|
+
- 悬停或聚焦 active Worktree 行可查看状态、路径以及目录/Git 登记缺失、分支漂移/分离 HEAD、
|
|
367
|
+
恢复未完成的处理指引。打开菜单或拖动时不显示 hover 卡片。归档确认明确说明插件创建及外部
|
|
368
|
+
Worktree 都保留目录、Session 绑定和 cwd;“清理磁盘”仍是独立操作。
|
|
369
|
+
|
|
370
|
+
- 没有未完成 Git 事务时,目录缺失的 active 或 archived Worktree 保持 `repair`,可归档,
|
|
371
|
+
不会阻断健康 Worktree 的 Session 绑定。指向现有且未清理记录的旧版无事务
|
|
372
|
+
`WORKTREE_RECOVERY_REQUIRED` 观察标记在 sidecar 锁内淘汰;未完成事务、未知记录和身份变化问题仍然阻断操作。
|
|
373
|
+
|
|
374
|
+
- `ready` 表示 Worktree 可用。`cleaned` 表示磁盘清理已完成且保留 sidecar 归档条目。
|
|
375
|
+
`repair` 表示 Worktree、Session、binding 或 cwd 缺失/无效。`recovery-needed` 表示 Git/sidecar
|
|
376
|
+
操作或身份校验尚未解决,破坏性操作会被阻止。`detached` 表示 Git Worktree 已被移除,但关系仍然保留。active binding 指向缺失
|
|
326
377
|
Worktree 时会显示明确的 repair 警告或错误,不会静默切换到其他 Worktree。
|
|
327
378
|
- Worktree health 是 Git 的运行时 projection,不写入 sidecar。Git 前置条件失败按
|
|
328
379
|
Workspace 显示提示:Git 可执行文件缺失时显示安装提示且不显示命令块,缺少 repository、
|
|
@@ -359,8 +410,13 @@ DSH 管理原始 Project/Workspace 身份和根目录、Session 身份和元数
|
|
|
359
410
|
Session 内容。如果 sidecar 不可用或损坏,原生 Project/Session 视角仍然可读,插件进入
|
|
360
411
|
degraded/read-only 状态;不能用空索引覆盖 DSH 原生列表。
|
|
361
412
|
|
|
362
|
-
|
|
363
|
-
|
|
413
|
+
Session 活动仅用于信息展示,不阻断磁盘清理或移出管理;默认 Host 仍可能显示 `unknown`。
|
|
414
|
+
确认磁盘清理前,请自行停止所有使用该目录的任务,插件不会核验任务是否已停止。
|
|
415
|
+
原生活动变化或重新打开归档菜单会刷新所属 Workspace 并保留 ready 内容。
|
|
416
|
+
|
|
417
|
+
sidecar 兼容读取 v1、v2 和 v3 snapshot。旧记录会先在内存中归一化,第一次成功 mutation 会
|
|
418
|
+
以原子方式将 shard 升级为 v4。旧 removed 记录归一化为 `diskCleanup: completed`,保留 v3 revision。
|
|
419
|
+
新的 v4 snapshot 使用 revision、不可逆向还原的 repository
|
|
364
420
|
fingerprint,以及为 Git create/remove 保存的 durable pending-operation metadata。早期 v3
|
|
365
421
|
实现可能写入的 raw repository 字段也可以读取,并会在下一次稳定写入时清理。无效 JSON、
|
|
366
422
|
未知 schema version 和关系不变量错误都会报告为 corruption,不会静默重置为空索引。
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type { WorktreeSurfaceProps } from './
|
|
2
|
-
export type { WorktreeSurfaceInjected, WorktreeSurfaceProps } from './
|
|
3
|
-
/**
|
|
4
|
-
|
|
5
|
-
* intact and renders a browser-local Workspace → Worktree → Session projection.
|
|
6
|
-
*/
|
|
7
|
-
export declare function WorktreeSurface({ useStore, actions, useSessions, useWorkspaces, t, available, expandState, sessionOrder, manager, viewReader, permission, confirmFullAccess, fullAccessConfirmation, onPermissionResult, onPermissionNotice, permissionNotice, invalidateWorktreeContext, createWorkspace, createSessionForWorktree: createSessionCallback, createMainSession, renameWorkspace, deleteWorkspace, insertWorkspaceBefore, insertSessionBefore, insertWorktreeBefore, renameSession, forkSession, archiveSession, forkRecovery, retryForkSession, ensureSessionWorkspace, syncSessionWorkspaces, openSession, }: WorktreeSurfaceProps): import("react").JSX.Element | null;
|
|
1
|
+
import type { WorktreeSurfaceProps } from './surface/types.js';
|
|
2
|
+
export type { WorktreeSurfaceInjected, WorktreeSurfaceProps } from './surface/types.js';
|
|
3
|
+
/** Composes independent surface state/action domains into the sidebar overlay. */
|
|
4
|
+
export declare function WorktreeSurface(props: WorktreeSurfaceProps): import("react").JSX.Element | null;
|
|
8
5
|
//# sourceMappingURL=WorktreeSurface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorktreeSurface.d.ts","sourceRoot":"","sources":["../../src/client/WorktreeSurface.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WorktreeSurface.d.ts","sourceRoot":"","sources":["../../src/client/WorktreeSurface.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,YAAY,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACxF,kFAAkF;AAClF,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,sCAuF1D"}
|