@neuralis/brain-core 0.3.2 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -1410
- package/app/README.md +1 -1
- package/app/cards/FilesystemCardShell.tsx +42 -4
- package/app/cards/FilesystemChangeCard.tsx +34 -11
- package/app/cards/README.md +6 -5
- package/app/cards/diffUtils.ts +99 -1
- package/app/filesystem/FilesystemHost.tsx +17 -2
- package/app/filesystem/api/README.md +3 -3
- package/app/filesystem/api/index.ts +35 -11
- package/app/filesystem/api/projectPackages.ts +13 -102
- package/app/filesystem/domain/types.ts +30 -10
- package/app/filesystem/hooks/README.md +3 -3
- package/app/filesystem/hooks/useDiscoverableSources.ts +19 -30
- package/app/filesystem/hooks/useFilesystemSSE.ts +1 -1
- package/app/filesystem/host/README.md +5 -3
- package/app/filesystem/host/buildFilesystemHostValue.ts +19 -0
- package/app/filesystem/host/installFilesystemHostComponents.tsx +1 -1
- package/app/filesystem/lib/sourceKindForm.ts +118 -39
- package/app/filesystem/lib/treeVisualState.tsx +98 -4
- package/app/filesystem/store/README.md +1 -0
- package/app/filesystem/store/filesystemStore.ts +86 -5
- package/app/filesystem/store/gitSlice.ts +5 -0
- package/app/filesystem/store/helpers.ts +17 -0
- package/app/filesystem/store/listSlice.ts +8 -0
- package/app/filesystem/ui/CodeEditor.tsx +18 -3
- package/app/filesystem/ui/FileEditor.tsx +15 -10
- package/app/filesystem/ui/FileTree.tsx +41 -16
- package/app/filesystem/ui/FolderPicker.tsx +251 -0
- package/app/filesystem/ui/GitControlPanel.tsx +5 -0
- package/app/filesystem/ui/PackagesPanel.tsx +52 -374
- package/app/filesystem/ui/PolicyEditor.tsx +109 -24
- package/app/filesystem/ui/README.md +17 -11
- package/app/filesystem/ui/RawMediaPreview.tsx +58 -0
- package/app/filesystem/ui/SourceBranchHeader.tsx +4 -4
- package/app/filesystem/ui/SourcesPanel.tsx +420 -360
- package/app/filesystem/ui/Toolbar.tsx +1 -2
- package/app/shared/filesystem.png +0 -0
- package/dist/app/host.js +53 -48
- package/dist/scripts/sourceRootPairV1.d.ts +47 -0
- package/dist/scripts/sourceRootPairV1.d.ts.map +1 -0
- package/dist/scripts/sourceRootPairV1.js +147 -0
- package/dist/scripts/sourceRootPairV1.js.map +1 -0
- package/dist/scripts/sourceToFolderV1.d.ts +56 -0
- package/dist/scripts/sourceToFolderV1.d.ts.map +1 -0
- package/dist/scripts/sourceToFolderV1.js +152 -0
- package/dist/scripts/sourceToFolderV1.js.map +1 -0
- package/dist/scripts/sourceToHostV1.d.ts +56 -0
- package/dist/scripts/sourceToHostV1.d.ts.map +1 -0
- package/dist/scripts/sourceToHostV1.js +132 -0
- package/dist/scripts/sourceToHostV1.js.map +1 -0
- package/dist/src/config/env.d.ts +8 -0
- package/dist/src/config/env.d.ts.map +1 -1
- package/dist/src/config/env.js +17 -6
- package/dist/src/config/env.js.map +1 -1
- package/dist/src/connectors/AppSourceConfigStore.d.ts +17 -3
- package/dist/src/connectors/AppSourceConfigStore.d.ts.map +1 -1
- package/dist/src/connectors/AppSourceConfigStore.js +46 -6
- package/dist/src/connectors/AppSourceConfigStore.js.map +1 -1
- package/dist/src/connectors/HostConnector.d.ts +201 -0
- package/dist/src/connectors/HostConnector.d.ts.map +1 -0
- package/dist/src/connectors/HostConnector.js +903 -0
- package/dist/src/connectors/HostConnector.js.map +1 -0
- package/dist/src/connectors/inProcessTransport.d.ts +131 -0
- package/dist/src/connectors/inProcessTransport.d.ts.map +1 -0
- package/dist/src/connectors/inProcessTransport.js +447 -0
- package/dist/src/connectors/inProcessTransport.js.map +1 -0
- package/dist/src/domain/BrainError.d.ts +14 -0
- package/dist/src/domain/BrainError.d.ts.map +1 -1
- package/dist/src/domain/BrainError.js +21 -0
- package/dist/src/domain/BrainError.js.map +1 -1
- package/dist/src/domain/access/callerPermissions.d.ts +29 -0
- package/dist/src/domain/access/callerPermissions.d.ts.map +1 -1
- package/dist/src/domain/access/callerPermissions.js +85 -5
- package/dist/src/domain/access/callerPermissions.js.map +1 -1
- package/dist/src/domain/access/nativeLocalFence.d.ts +65 -0
- package/dist/src/domain/access/nativeLocalFence.d.ts.map +1 -0
- package/dist/src/domain/access/nativeLocalFence.js +171 -0
- package/dist/src/domain/access/nativeLocalFence.js.map +1 -0
- package/dist/src/domain/access/uriPermission.js +3 -3
- package/dist/src/domain/access/uriPermission.js.map +1 -1
- package/dist/src/domain/byteRange.d.ts +15 -0
- package/dist/src/domain/byteRange.d.ts.map +1 -0
- package/dist/src/domain/byteRange.js +30 -0
- package/dist/src/domain/byteRange.js.map +1 -0
- package/dist/src/domain/defaultPermissions.d.ts.map +1 -1
- package/dist/src/domain/defaultPermissions.js +29 -0
- package/dist/src/domain/defaultPermissions.js.map +1 -1
- package/dist/src/domain/mime.d.ts +8 -16
- package/dist/src/domain/mime.d.ts.map +1 -1
- package/dist/src/domain/mime.js +10 -99
- package/dist/src/domain/mime.js.map +1 -1
- package/dist/src/domain/paths.d.ts.map +1 -1
- package/dist/src/domain/paths.js +5 -3
- package/dist/src/domain/paths.js.map +1 -1
- package/dist/src/domain/sourceConfig.d.ts +52 -19
- package/dist/src/domain/sourceConfig.d.ts.map +1 -1
- package/dist/src/domain/sourceConfig.js +103 -19
- package/dist/src/domain/sourceConfig.js.map +1 -1
- package/dist/src/domain/sourcePackages.d.ts +8 -8
- package/dist/src/domain/sourcePackages.d.ts.map +1 -1
- package/dist/src/domain/sourceRootPair.d.ts +88 -0
- package/dist/src/domain/sourceRootPair.d.ts.map +1 -0
- package/dist/src/domain/sourceRootPair.js +108 -0
- package/dist/src/domain/sourceRootPair.js.map +1 -0
- package/dist/src/domain/syncTypes.d.ts +8 -1
- package/dist/src/domain/syncTypes.d.ts.map +1 -1
- package/dist/src/domain/syncTypes.js +1 -0
- package/dist/src/domain/syncTypes.js.map +1 -1
- package/dist/src/domain/types.d.ts +29 -1
- package/dist/src/domain/types.d.ts.map +1 -1
- package/dist/src/domain/uri.d.ts.map +1 -1
- package/dist/src/domain/uri.js +3 -2
- package/dist/src/domain/uri.js.map +1 -1
- package/dist/src/embeddings/clients/GeminiEmbedder.d.ts.map +1 -1
- package/dist/src/embeddings/clients/GeminiEmbedder.js +2 -5
- package/dist/src/embeddings/clients/GeminiEmbedder.js.map +1 -1
- package/dist/src/embeddings/clients/OpenAIEmbedder.d.ts.map +1 -1
- package/dist/src/embeddings/clients/OpenAIEmbedder.js +2 -3
- package/dist/src/embeddings/clients/OpenAIEmbedder.js.map +1 -1
- package/dist/src/embeddings/clients/QwenEmbedder.d.ts +2 -0
- package/dist/src/embeddings/clients/QwenEmbedder.d.ts.map +1 -1
- package/dist/src/embeddings/clients/QwenEmbedder.js +10 -2
- package/dist/src/embeddings/clients/QwenEmbedder.js.map +1 -1
- package/dist/src/embeddings/clients/VoyageEmbedder.d.ts +2 -0
- package/dist/src/embeddings/clients/VoyageEmbedder.d.ts.map +1 -1
- package/dist/src/embeddings/clients/VoyageEmbedder.js +8 -1
- package/dist/src/embeddings/clients/VoyageEmbedder.js.map +1 -1
- package/dist/src/embeddings/factory.d.ts +5 -3
- package/dist/src/embeddings/factory.d.ts.map +1 -1
- package/dist/src/embeddings/factory.js +7 -3
- package/dist/src/embeddings/factory.js.map +1 -1
- package/dist/src/embeddings/models.d.ts +2 -3
- package/dist/src/embeddings/models.d.ts.map +1 -1
- package/dist/src/embeddings/models.js +1 -2
- package/dist/src/embeddings/models.js.map +1 -1
- package/dist/src/embeddings/retry.js +1 -1
- package/dist/src/embeddings/retry.js.map +1 -1
- package/dist/src/embeddings/types.d.ts +6 -0
- package/dist/src/embeddings/types.d.ts.map +1 -1
- package/dist/src/embeddings/types.js +11 -0
- package/dist/src/embeddings/types.js.map +1 -1
- package/dist/src/git/GitRunner.d.ts +110 -30
- package/dist/src/git/GitRunner.d.ts.map +1 -1
- package/dist/src/git/GitRunner.js +511 -199
- package/dist/src/git/GitRunner.js.map +1 -1
- package/dist/src/git/GitWatchRegistry.d.ts +41 -35
- package/dist/src/git/GitWatchRegistry.d.ts.map +1 -1
- package/dist/src/git/GitWatchRegistry.js +61 -79
- package/dist/src/git/GitWatchRegistry.js.map +1 -1
- package/dist/src/git/gitPlace.d.ts +61 -0
- package/dist/src/git/gitPlace.d.ts.map +1 -0
- package/dist/src/git/gitPlace.js +74 -0
- package/dist/src/git/gitPlace.js.map +1 -0
- package/dist/src/git/sourceGitControl.d.ts +31 -19
- package/dist/src/git/sourceGitControl.d.ts.map +1 -1
- package/dist/src/git/sourceGitControl.js +208 -92
- package/dist/src/git/sourceGitControl.js.map +1 -1
- package/dist/src/git/sourceGitStatus.js +1 -1
- package/dist/src/git/sourceGitStatus.js.map +1 -1
- package/dist/src/git/untrackedStats.js +1 -1
- package/dist/src/git/untrackedStats.js.map +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/lifecycle.d.ts +12 -16
- package/dist/src/lifecycle.d.ts.map +1 -1
- package/dist/src/lifecycle.js +2 -1
- package/dist/src/lifecycle.js.map +1 -1
- package/dist/src/routes/approve.d.ts.map +1 -1
- package/dist/src/routes/approve.js +3 -3
- package/dist/src/routes/approve.js.map +1 -1
- package/dist/src/routes/git.d.ts.map +1 -1
- package/dist/src/routes/git.js +183 -54
- package/dist/src/routes/git.js.map +1 -1
- package/dist/src/routes/health.d.ts.map +1 -1
- package/dist/src/routes/health.js +8 -5
- package/dist/src/routes/health.js.map +1 -1
- package/dist/src/routes/helpers/uriGuard.d.ts +1 -1
- package/dist/src/routes/helpers/uriGuard.d.ts.map +1 -1
- package/dist/src/routes/helpers/uriGuard.js +3 -2
- package/dist/src/routes/helpers/uriGuard.js.map +1 -1
- package/dist/src/routes/helpers.d.ts +20 -4
- package/dist/src/routes/helpers.d.ts.map +1 -1
- package/dist/src/routes/helpers.js +38 -5
- package/dist/src/routes/helpers.js.map +1 -1
- package/dist/src/routes/list.d.ts.map +1 -1
- package/dist/src/routes/list.js +5 -6
- package/dist/src/routes/list.js.map +1 -1
- package/dist/src/routes/pending.d.ts.map +1 -1
- package/dist/src/routes/pending.js +5 -5
- package/dist/src/routes/pending.js.map +1 -1
- package/dist/src/routes/policies.d.ts +6 -4
- package/dist/src/routes/policies.d.ts.map +1 -1
- package/dist/src/routes/policies.js +22 -16
- package/dist/src/routes/policies.js.map +1 -1
- package/dist/src/routes/raw.d.ts.map +1 -1
- package/dist/src/routes/raw.js +68 -14
- package/dist/src/routes/raw.js.map +1 -1
- package/dist/src/routes/read.d.ts.map +1 -1
- package/dist/src/routes/read.js +3 -3
- package/dist/src/routes/read.js.map +1 -1
- package/dist/src/routes/search.d.ts.map +1 -1
- package/dist/src/routes/search.js +3 -3
- package/dist/src/routes/search.js.map +1 -1
- package/dist/src/routes/sources.d.ts +60 -18
- package/dist/src/routes/sources.d.ts.map +1 -1
- package/dist/src/routes/sources.js +420 -308
- package/dist/src/routes/sources.js.map +1 -1
- package/dist/src/routes/upload.d.ts.map +1 -1
- package/dist/src/routes/upload.js +3 -3
- package/dist/src/routes/upload.js.map +1 -1
- package/dist/src/services/BridgeService.d.ts +15 -35
- package/dist/src/services/BridgeService.d.ts.map +1 -1
- package/dist/src/services/BridgeService.js +30 -88
- package/dist/src/services/BridgeService.js.map +1 -1
- package/dist/src/services/FilesystemService.d.ts +3 -2
- package/dist/src/services/FilesystemService.d.ts.map +1 -1
- package/dist/src/services/FilesystemService.js +116 -32
- package/dist/src/services/FilesystemService.js.map +1 -1
- package/dist/src/services/FilesystemUiService.d.ts +4 -1
- package/dist/src/services/FilesystemUiService.d.ts.map +1 -1
- package/dist/src/services/FilesystemUiService.js +71 -27
- package/dist/src/services/FilesystemUiService.js.map +1 -1
- package/dist/src/services/SyncScheduler.d.ts +12 -4
- package/dist/src/services/SyncScheduler.d.ts.map +1 -1
- package/dist/src/services/SyncScheduler.js +45 -10
- package/dist/src/services/SyncScheduler.js.map +1 -1
- package/dist/src/services/baselineRepair.d.ts +13 -3
- package/dist/src/services/baselineRepair.d.ts.map +1 -1
- package/dist/src/services/baselineRepair.js +13 -3
- package/dist/src/services/baselineRepair.js.map +1 -1
- package/dist/src/services/declaredSources.d.ts +125 -42
- package/dist/src/services/declaredSources.d.ts.map +1 -1
- package/dist/src/services/declaredSources.js +117 -45
- package/dist/src/services/declaredSources.js.map +1 -1
- package/dist/src/store/dataFormats.d.ts +17 -2
- package/dist/src/store/dataFormats.d.ts.map +1 -1
- package/dist/src/store/dataFormats.js +18 -3
- package/dist/src/store/dataFormats.js.map +1 -1
- package/dist/src/sync/DeltaSyncRunner.d.ts.map +1 -1
- package/dist/src/sync/DeltaSyncRunner.js +144 -4
- package/dist/src/sync/DeltaSyncRunner.js.map +1 -1
- package/dist/src/sync/SyncJobQueue.d.ts +14 -2
- package/dist/src/sync/SyncJobQueue.d.ts.map +1 -1
- package/dist/src/sync/SyncJobQueue.js +56 -10
- package/dist/src/sync/SyncJobQueue.js.map +1 -1
- package/dist/src/sync/SyncWatchService.d.ts +21 -4
- package/dist/src/sync/SyncWatchService.d.ts.map +1 -1
- package/dist/src/sync/SyncWatchService.js +115 -10
- package/dist/src/sync/SyncWatchService.js.map +1 -1
- package/dist/src/sync/categoryInference.d.ts +1 -1
- package/dist/src/sync/categoryInference.js +1 -1
- package/dist/src/tools/execCtx.d.ts +6 -0
- package/dist/src/tools/execCtx.d.ts.map +1 -1
- package/dist/src/tools/execCtx.js +11 -0
- package/dist/src/tools/execCtx.js.map +1 -1
- package/dist/src/tools/fs_list.js +2 -2
- package/dist/src/tools/fs_list.js.map +1 -1
- package/dist/src/tools/fs_read.js +2 -2
- package/dist/src/tools/fs_read.js.map +1 -1
- package/dist/src/tools/fs_search.js +2 -2
- package/dist/src/tools/fs_search.js.map +1 -1
- package/dist/src/tools/fs_write.js +2 -2
- package/dist/src/tools/fs_write.js.map +1 -1
- package/dist/src/usecases/admitSourceRoot.d.ts +65 -0
- package/dist/src/usecases/admitSourceRoot.d.ts.map +1 -0
- package/dist/src/usecases/admitSourceRoot.js +85 -0
- package/dist/src/usecases/admitSourceRoot.js.map +1 -0
- package/dist/src/usecases/browseSourceFolders.d.ts +85 -0
- package/dist/src/usecases/browseSourceFolders.d.ts.map +1 -0
- package/dist/src/usecases/browseSourceFolders.js +210 -0
- package/dist/src/usecases/browseSourceFolders.js.map +1 -0
- package/dist/src/usecases/createDeclaredSources.d.ts +13 -2
- package/dist/src/usecases/createDeclaredSources.d.ts.map +1 -1
- package/dist/src/usecases/createDeclaredSources.js +39 -0
- package/dist/src/usecases/createDeclaredSources.js.map +1 -1
- package/dist/src/usecases/deprovisionProject.d.ts +4 -5
- package/dist/src/usecases/deprovisionProject.d.ts.map +1 -1
- package/dist/src/usecases/deprovisionProject.js +3 -8
- package/dist/src/usecases/deprovisionProject.js.map +1 -1
- package/dist/src/usecases/list.d.ts.map +1 -1
- package/dist/src/usecases/list.js +83 -26
- package/dist/src/usecases/list.js.map +1 -1
- package/dist/src/usecases/listAttachableDevices.d.ts +13 -0
- package/dist/src/usecases/listAttachableDevices.d.ts.map +1 -0
- package/dist/src/usecases/listAttachableDevices.js +10 -0
- package/dist/src/usecases/listAttachableDevices.js.map +1 -0
- package/dist/src/usecases/listSourcePackages.d.ts.map +1 -1
- package/dist/src/usecases/listSourcePackages.js +95 -79
- package/dist/src/usecases/listSourcePackages.js.map +1 -1
- package/dist/src/usecases/purgeExcludedPoints.d.ts.map +1 -1
- package/dist/src/usecases/purgeExcludedPoints.js +3 -2
- package/dist/src/usecases/purgeExcludedPoints.js.map +1 -1
- package/dist/src/usecases/readFiles.d.ts.map +1 -1
- package/dist/src/usecases/readFiles.js +17 -1
- package/dist/src/usecases/readFiles.js.map +1 -1
- package/dist/src/usecases/reconcileSourcePackageRoots.d.ts +1 -1
- package/dist/src/usecases/reconcileSourcePackageRoots.d.ts.map +1 -1
- package/dist/src/usecases/reconcileSourcePackageRoots.js +2 -1
- package/dist/src/usecases/reconcileSourcePackageRoots.js.map +1 -1
- package/dist/src/usecases/revokePrincipal.d.ts +7 -5
- package/dist/src/usecases/revokePrincipal.d.ts.map +1 -1
- package/dist/src/usecases/revokePrincipal.js +29 -7
- package/dist/src/usecases/revokePrincipal.js.map +1 -1
- package/dist/src/usecases/scheduleSourceSync.d.ts +7 -0
- package/dist/src/usecases/scheduleSourceSync.d.ts.map +1 -1
- package/dist/src/usecases/scheduleSourceSync.js +6 -5
- package/dist/src/usecases/scheduleSourceSync.js.map +1 -1
- package/dist/src/usecases/searchFiles.d.ts.map +1 -1
- package/dist/src/usecases/searchFiles.js +13 -3
- package/dist/src/usecases/searchFiles.js.map +1 -1
- package/dist/src/usecases/sourcePackageInventory.d.ts +10 -2
- package/dist/src/usecases/sourcePackageInventory.d.ts.map +1 -1
- package/dist/src/usecases/sourcePackageInventory.js +24 -7
- package/dist/src/usecases/sourcePackageInventory.js.map +1 -1
- package/dist/src/usecases/triggerSourceSync.d.ts +46 -0
- package/dist/src/usecases/triggerSourceSync.d.ts.map +1 -0
- package/dist/src/usecases/triggerSourceSync.js +75 -0
- package/dist/src/usecases/triggerSourceSync.js.map +1 -0
- package/dist/src/usecases/uploadBinary.d.ts +2 -1
- package/dist/src/usecases/uploadBinary.d.ts.map +1 -1
- package/dist/src/usecases/uploadBinary.js +2 -2
- package/dist/src/usecases/uploadBinary.js.map +1 -1
- package/dist/src/usecases/vector/endpointGuard.d.ts +1 -1
- package/dist/src/usecases/vector/endpointGuard.js +1 -1
- package/dist/src/usecases/vectorActivityWatch.d.ts +20 -13
- package/dist/src/usecases/vectorActivityWatch.d.ts.map +1 -1
- package/dist/src/usecases/vectorActivityWatch.js +61 -36
- package/dist/src/usecases/vectorActivityWatch.js.map +1 -1
- package/dist/src/usecases/vectorMaintenance.d.ts.map +1 -1
- package/dist/src/usecases/vectorMaintenance.js +16 -1
- package/dist/src/usecases/vectorMaintenance.js.map +1 -1
- package/dist/src/usecases/write/index.d.ts.map +1 -1
- package/dist/src/usecases/write/index.js +17 -2
- package/dist/src/usecases/write/index.js.map +1 -1
- package/dist/src/usecases/write/occupancy.d.ts +5 -1
- package/dist/src/usecases/write/occupancy.d.ts.map +1 -1
- package/dist/src/usecases/write/occupancy.js +13 -4
- package/dist/src/usecases/write/occupancy.js.map +1 -1
- package/dist/src/usecases/write/structure.d.ts.map +1 -1
- package/dist/src/usecases/write/structure.js +20 -5
- package/dist/src/usecases/write/structure.js.map +1 -1
- package/dist/src/vector/FilesystemVectorIndex.d.ts +72 -2
- package/dist/src/vector/FilesystemVectorIndex.d.ts.map +1 -1
- package/dist/src/vector/FilesystemVectorIndex.js +211 -27
- package/dist/src/vector/FilesystemVectorIndex.js.map +1 -1
- package/dist/src/vector/InMemoryVectorIndex.d.ts.map +1 -1
- package/dist/src/vector/InMemoryVectorIndex.js +55 -7
- package/dist/src/vector/InMemoryVectorIndex.js.map +1 -1
- package/dist/src/vector/qdrantClient.d.ts +18 -1
- package/dist/src/vector/qdrantClient.d.ts.map +1 -1
- package/dist/src/vector/qdrantClient.js +48 -6
- package/dist/src/vector/qdrantClient.js.map +1 -1
- package/dist/src/wiring.d.ts +10 -12
- package/dist/src/wiring.d.ts.map +1 -1
- package/dist/src/wiring.js +101 -61
- package/dist/src/wiring.js.map +1 -1
- package/package.json +166 -54
- package/skills/connect-business-data/SKILL.md +2 -2
- package/skills/create-package/SKILL.md +18 -18
- package/skills/create-package/references/config-and-credentials.md +16 -13
- package/skills/create-package/references/connectors-and-uri-policies.md +36 -27
- package/skills/create-package/references/manifest-and-discovery.md +12 -12
- package/skills/create-package/references/runtime-and-build.md +18 -18
- package/skills/create-package/references/skills-and-context.md +35 -19
- package/skills/create-package/references/surfaces-and-design.md +16 -16
- package/skills/create-package/references/team-and-workflows.md +2 -2
- package/skills/create-package/references/test-and-ship.md +17 -17
- package/skills/create-package/references/tools-and-schemas.md +5 -5
- package/skills/create-package/scripts/{check-package.sh → check-package.mjs} +78 -64
- package/skills/create-package/scripts/{verify-loaded.sh → verify-loaded.mjs} +156 -162
- package/skills/git/SKILL.md +31 -29
- package/skills/manage-files/SKILL.md +11 -14
- package/skills/manage-sources/SKILL.md +85 -45
- package/skills/manage-uri-policy/SKILL.md +9 -6
- package/skills/sync/SKILL.md +2 -2
- package/dist/src/connectors/LocalDiskConnector.d.ts +0 -171
- package/dist/src/connectors/LocalDiskConnector.d.ts.map +0 -1
- package/dist/src/connectors/LocalDiskConnector.js +0 -1233
- package/dist/src/connectors/LocalDiskConnector.js.map +0 -1
- package/skills/manage-files/scripts/copy.sh +0 -7
- package/skills/manage-files/scripts/create.sh +0 -7
- package/skills/manage-files/scripts/mkdir.sh +0 -7
- package/skills/manage-files/scripts/modify.sh +0 -7
- package/skills/manage-files/scripts/upload.sh +0 -16
- package/skills/manage-files/scripts/write.sh +0 -29
- package/skills/manage-sources/scripts/reembed.sh +0 -23
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a checkout lives — this process's disk or a folder on a paired device —
|
|
3
|
+
* and the few reads the git engine needs there WITHOUT a git spawn (the `.git`
|
|
4
|
+
* probe, the origin name, the branch from `.git/HEAD`, the depth-1 scan).
|
|
5
|
+
*
|
|
6
|
+
* A `string` place is a checkout on THIS machine (the in-process transport's
|
|
7
|
+
* root). A `{ root, device }` place is a folder on a paired device: `root` is
|
|
8
|
+
* the path ON THAT DEVICE in its own flavour (`C:\…` or `/…`), reached only
|
|
9
|
+
* through the `host` connector's device transport — never this server's disk.
|
|
10
|
+
*
|
|
11
|
+
* `device.owner` is the device gate's verdict (`devicesApi().mayRun`). It is
|
|
12
|
+
* ABSENT on a place built for a read-only probe (the source-row summary, the
|
|
13
|
+
* discovery, the badge watcher); `GitRunner.create` refuses such a place, so a
|
|
14
|
+
* git spawn on a device can only follow the gate.
|
|
15
|
+
*/
|
|
16
|
+
import { posix as posixPath } from 'node:path';
|
|
17
|
+
import type { HostFsTransport } from '@neuralis/package-system/contracts';
|
|
18
|
+
export type GitDeviceSeat = {
|
|
19
|
+
transport: HostFsTransport;
|
|
20
|
+
/** The device gate's verdict for THIS caller — required before anything spawns there. */
|
|
21
|
+
owner?: boolean;
|
|
22
|
+
};
|
|
23
|
+
export type GitPlace = {
|
|
24
|
+
root: string;
|
|
25
|
+
device?: GitDeviceSeat;
|
|
26
|
+
};
|
|
27
|
+
/** A checkout location: a local root path, or a place that may sit on a device. */
|
|
28
|
+
export type GitTarget = string | GitPlace;
|
|
29
|
+
export declare function toGitPlace(target: GitTarget): GitPlace;
|
|
30
|
+
/** The path arithmetic of the machine the checkout lives on (this host's own for a local checkout). */
|
|
31
|
+
export declare function placePath(place: GitPlace): typeof posixPath;
|
|
32
|
+
/**
|
|
33
|
+
* The cache key of a place. A device root is keyed by its transport id too: the
|
|
34
|
+
* same path string on two machines (or on this server) is two checkouts.
|
|
35
|
+
*/
|
|
36
|
+
export declare function placeKey(target: GitTarget): string;
|
|
37
|
+
/**
|
|
38
|
+
* The place a `host` connector's folder lives at, for the READ-ONLY probes (the
|
|
39
|
+
* source-row summary, the discovery, the badge watcher): no device verdict, so
|
|
40
|
+
* nothing can spawn through it.
|
|
41
|
+
*/
|
|
42
|
+
export declare function probePlaceOf(folder: {
|
|
43
|
+
root: string;
|
|
44
|
+
device?: string;
|
|
45
|
+
transport: HostFsTransport;
|
|
46
|
+
}): GitPlace;
|
|
47
|
+
/** A child place under `place` (a nested checkout), on the same machine and transport. */
|
|
48
|
+
export declare function childPlace(place: GitPlace, rel: string): GitPlace;
|
|
49
|
+
/**
|
|
50
|
+
* Up to `maxBytes` of a small file on a device, or `null` (absent, too large,
|
|
51
|
+
* unreadable). The size is checked BEFORE any byte moves; one range read serves it.
|
|
52
|
+
*/
|
|
53
|
+
export declare function readDeviceSmallFile(seat: GitDeviceSeat, abs: string, maxBytes: number): Promise<string | null>;
|
|
54
|
+
/**
|
|
55
|
+
* The branch `.git/HEAD` names (`ref: refs/heads/<name>`), read as a FILE — the
|
|
56
|
+
* device half of the list-path branch read, which must not spawn on a machine
|
|
57
|
+
* the caller may not run programs on. `null` for a detached HEAD, a gitfile
|
|
58
|
+
* checkout (`.git` is a file) or anything unreadable.
|
|
59
|
+
*/
|
|
60
|
+
export declare function readDeviceHeadBranch(seat: GitDeviceSeat, root: string, flavour: typeof posixPath): Promise<string | null>;
|
|
61
|
+
//# sourceMappingURL=gitPlace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitPlace.d.ts","sourceRoot":"","sources":["../../../src/git/gitPlace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAa,EAAE,KAAK,IAAI,SAAS,EAAsB,MAAM,WAAW,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAE1E,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,eAAe,CAAC;IAC3B,yFAAyF;IACzF,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,aAAa,CAAA;CAAE,CAAC;AAEhE,mFAAmF;AACnF,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE1C,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,GAAG,QAAQ,CAEtD;AAED,uGAAuG;AACvG,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,SAAS,CAG3D;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAGlD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,eAAe,CAAA;CAAE,GAAG,QAAQ,CAE5G;AAED,0FAA0F;AAC1F,wBAAgB,UAAU,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,CAGjE;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CASpH;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAI/H"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a checkout lives — this process's disk or a folder on a paired device —
|
|
3
|
+
* and the few reads the git engine needs there WITHOUT a git spawn (the `.git`
|
|
4
|
+
* probe, the origin name, the branch from `.git/HEAD`, the depth-1 scan).
|
|
5
|
+
*
|
|
6
|
+
* A `string` place is a checkout on THIS machine (the in-process transport's
|
|
7
|
+
* root). A `{ root, device }` place is a folder on a paired device: `root` is
|
|
8
|
+
* the path ON THAT DEVICE in its own flavour (`C:\…` or `/…`), reached only
|
|
9
|
+
* through the `host` connector's device transport — never this server's disk.
|
|
10
|
+
*
|
|
11
|
+
* `device.owner` is the device gate's verdict (`devicesApi().mayRun`). It is
|
|
12
|
+
* ABSENT on a place built for a read-only probe (the source-row summary, the
|
|
13
|
+
* discovery, the badge watcher); `GitRunner.create` refuses such a place, so a
|
|
14
|
+
* git spawn on a device can only follow the gate.
|
|
15
|
+
*/
|
|
16
|
+
import path, { posix as posixPath, win32 as win32Path } from 'node:path';
|
|
17
|
+
export function toGitPlace(target) {
|
|
18
|
+
return typeof target === 'string' ? { root: target } : target;
|
|
19
|
+
}
|
|
20
|
+
/** The path arithmetic of the machine the checkout lives on (this host's own for a local checkout). */
|
|
21
|
+
export function placePath(place) {
|
|
22
|
+
if (!place.device)
|
|
23
|
+
return path;
|
|
24
|
+
return place.device.transport.flavour === 'win32' ? win32Path : posixPath;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The cache key of a place. A device root is keyed by its transport id too: the
|
|
28
|
+
* same path string on two machines (or on this server) is two checkouts.
|
|
29
|
+
*/
|
|
30
|
+
export function placeKey(target) {
|
|
31
|
+
const place = toGitPlace(target);
|
|
32
|
+
return place.device ? `${place.device.transport.id}\0${place.root}` : place.root;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The place a `host` connector's folder lives at, for the READ-ONLY probes (the
|
|
36
|
+
* source-row summary, the discovery, the badge watcher): no device verdict, so
|
|
37
|
+
* nothing can spawn through it.
|
|
38
|
+
*/
|
|
39
|
+
export function probePlaceOf(folder) {
|
|
40
|
+
return folder.device !== undefined ? { root: folder.root, device: { transport: folder.transport } } : { root: folder.root };
|
|
41
|
+
}
|
|
42
|
+
/** A child place under `place` (a nested checkout), on the same machine and transport. */
|
|
43
|
+
export function childPlace(place, rel) {
|
|
44
|
+
const root = placePath(place).join(place.root, rel);
|
|
45
|
+
return place.device ? { root, device: { transport: place.device.transport } } : { root };
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Up to `maxBytes` of a small file on a device, or `null` (absent, too large,
|
|
49
|
+
* unreadable). The size is checked BEFORE any byte moves; one range read serves it.
|
|
50
|
+
*/
|
|
51
|
+
export async function readDeviceSmallFile(seat, abs, maxBytes) {
|
|
52
|
+
try {
|
|
53
|
+
const info = await seat.transport.stat(abs);
|
|
54
|
+
if (!info || info.isDirectory || (info.size ?? 0) > maxBytes)
|
|
55
|
+
return null;
|
|
56
|
+
const range = await seat.transport.readRange(abs, 0, Math.min(maxBytes, seat.transport.maxRangeBytes));
|
|
57
|
+
return Buffer.from(range.bytes).toString('utf8');
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The branch `.git/HEAD` names (`ref: refs/heads/<name>`), read as a FILE — the
|
|
65
|
+
* device half of the list-path branch read, which must not spawn on a machine
|
|
66
|
+
* the caller may not run programs on. `null` for a detached HEAD, a gitfile
|
|
67
|
+
* checkout (`.git` is a file) or anything unreadable.
|
|
68
|
+
*/
|
|
69
|
+
export async function readDeviceHeadBranch(seat, root, flavour) {
|
|
70
|
+
const text = await readDeviceSmallFile(seat, flavour.join(root, '.git', 'HEAD'), 4096);
|
|
71
|
+
const m = text ? /^ref:\s*refs\/heads\/(.+?)\s*$/m.exec(text) : null;
|
|
72
|
+
return m && m[1] ? m[1] : null;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=gitPlace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitPlace.js","sourceRoot":"","sources":["../../../src/git/gitPlace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,IAAI,EAAE,EAAE,KAAK,IAAI,SAAS,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,WAAW,CAAC;AAczE,MAAM,UAAU,UAAU,CAAC,MAAiB;IAC1C,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;AAChE,CAAC;AAED,uGAAuG;AACvG,MAAM,UAAU,SAAS,CAAC,KAAe;IACvC,IAAI,CAAC,KAAK,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAC/B,OAAO,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;AAC5E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAiB;IACxC,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IACjC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,KAAK,K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AAC;QACvG,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACnD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,IAAmB,EAAE,IAAY,EAAE,OAAyB;IACrG,MAAM,IAAI,GAAG,MAAM,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC;IACvF,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,iCAAiC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACrE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACjC,CAAC"}
|
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
* a `.git` stat pre-gate, a FRESH `GitRunner` per cache miss (never reuse — the
|
|
7
7
|
* `#assertRepoInsideSource` memoised-rejection trap), a short TTL cache, and
|
|
8
8
|
* fail-soft `null` on any git problem so a slow/broken repo never blocks the list
|
|
9
|
-
* or panel path
|
|
9
|
+
* or panel path — save ONE: a paired device that refuses the spawn
|
|
10
|
+
* (`GitDeviceUnavailableError`) is thrown by every panel reader for the route
|
|
11
|
+
* to name, never folded into a clean repo's empty answer (the list-path
|
|
12
|
+
* summary never spawns on a device, so it never meets one).
|
|
10
13
|
*
|
|
11
14
|
* THREE readers, each with its own cost/scope:
|
|
12
15
|
* - `getSourceGitStatus` — the WHOLE-repo change-set (staged / unstaged /
|
|
@@ -31,7 +34,7 @@
|
|
|
31
34
|
* listing and the watcher expansion — consume the discovered set WITHOUT ever
|
|
32
35
|
* passing the route validation ladder. A symlinked child pointing at a foreign
|
|
33
36
|
* repo would therefore (1) leak the foreign repo's existence + branch in the
|
|
34
|
-
* listing and (2) plant a host-side
|
|
37
|
+
* listing and (2) plant a host-side file watcher on a foreign `.git`. So
|
|
35
38
|
* every candidate child must pass `realpath(child)` containment under
|
|
36
39
|
* `realpath(sourceRoot)` BEFORE inclusion — at DISCOVERY itself, not only in
|
|
37
40
|
* the route ladder — and the `containsRepos` probe applies the SAME predicate
|
|
@@ -41,6 +44,7 @@
|
|
|
41
44
|
* `gitdir:`-redirect residual is a logged G2.5 row). Symlinks that resolve
|
|
42
45
|
* INSIDE the source root remain allowed.
|
|
43
46
|
*/
|
|
47
|
+
import { type GitPlace, type GitTarget } from './gitPlace.js';
|
|
44
48
|
import { type GitBranchInfo, type GitGraphCommit, type GitCommitFileChange, type GitNumstatEntry } from './GitRunner.js';
|
|
45
49
|
import type { HierarchicalPermissions } from '../domain/sourceConfig.js';
|
|
46
50
|
/**
|
|
@@ -142,13 +146,15 @@ export type SourceRepoRoot = {
|
|
|
142
146
|
name: string;
|
|
143
147
|
/** Absolute nested root in the source's own spelling (NOT realpathed) — server-side only. */
|
|
144
148
|
root: string;
|
|
149
|
+
/** The same checkout as a place (a device folder's nested repo stays on that device) — server-side only. */
|
|
150
|
+
place: GitPlace;
|
|
145
151
|
};
|
|
146
152
|
/**
|
|
147
153
|
* The signature `FilesystemService` / the config route depend on for the hot
|
|
148
154
|
* source-row summary, so the enrichment is testable with a fake and the git
|
|
149
155
|
* engine stays out of the caller's own construction.
|
|
150
156
|
*/
|
|
151
|
-
export type SourceGitSummaryPort = (
|
|
157
|
+
export type SourceGitSummaryPort = (target: GitTarget, gitBin?: string) => Promise<SourceGitSummary | null>;
|
|
152
158
|
/**
|
|
153
159
|
* The signature `FilesystemService` depends on to enumerate a source's nested
|
|
154
160
|
* depth-1 repo checkouts for the G2.5 per-file badge rebase (3a) — the same
|
|
@@ -156,7 +162,7 @@ export type SourceGitSummaryPort = (resolvedRoot: string, gitBin?: string) => Pr
|
|
|
156
162
|
* so the git module stays out of the service (testable with a fake). `root` is a
|
|
157
163
|
* host path — server-side ONLY, NEVER serialized.
|
|
158
164
|
*/
|
|
159
|
-
export type SourceGitReposPort = (
|
|
165
|
+
export type SourceGitReposPort = (target: GitTarget) => Promise<SourceRepoRoot[]>;
|
|
160
166
|
/**
|
|
161
167
|
* E1 nested-checkout discovery for ONE source root — names + roots ONLY,
|
|
162
168
|
* ZERO git spawn (the watcher `gitDesired` reconcile runs on bootstrap +
|
|
@@ -172,7 +178,7 @@ export type SourceGitReposPort = (resolvedRoot: string) => Promise<SourceRepoRoo
|
|
|
172
178
|
* `invalidateSourceGitCache(sourceRoot)` / `invalidateSourceGitDiscovery`
|
|
173
179
|
* drop the entry.
|
|
174
180
|
*/
|
|
175
|
-
export declare function discoverSourceRepoRoots(
|
|
181
|
+
export declare function discoverSourceRepoRoots(target: GitTarget): Promise<SourceRepoRoot[]>;
|
|
176
182
|
/**
|
|
177
183
|
* Per-CALLER read gate for a `containsRepos` source's nested checkout NAMES
|
|
178
184
|
* (F2). The summary's `repoNames` is the RAW set (caller-agnostic, cached by
|
|
@@ -195,7 +201,7 @@ export declare function filterVisibleRepoNames(repoNames: readonly string[], per
|
|
|
195
201
|
* origin (fall back to the dir basename), the config is unreadable (a linked
|
|
196
202
|
* worktree's `.git` is a FILE, no sibling config), or parsing yields nothing.
|
|
197
203
|
*/
|
|
198
|
-
export declare function repoNameFromOrigin(
|
|
204
|
+
export declare function repoNameFromOrigin(target: GitTarget): Promise<string | undefined>;
|
|
199
205
|
/**
|
|
200
206
|
* The WHOLE-repo change-set + current branch for the Git Control panel. On
|
|
201
207
|
* demand, TTL-cached per root. `null` (fail-soft) for a non-git source, a
|
|
@@ -205,7 +211,7 @@ export declare function repoNameFromOrigin(resolvedRoot: string): Promise<string
|
|
|
205
211
|
* user action (panel open / repo select), NEVER on the `fs_list` hot path (use
|
|
206
212
|
* `getSourceGitSummary` there).
|
|
207
213
|
*/
|
|
208
|
-
export declare function getSourceGitStatus(
|
|
214
|
+
export declare function getSourceGitStatus(target: GitTarget, gitBin?: string): Promise<SourceGitControlStatus | null>;
|
|
209
215
|
/**
|
|
210
216
|
* Diff read outcome: the unified-diff text, or a typed `too_large` refusal for
|
|
211
217
|
* a diff the engine KILLED past its ~4 MB accumulation bound (MINOR-6) — a
|
|
@@ -263,8 +269,8 @@ export type SourceGitDiffTarget = {
|
|
|
263
269
|
* yields an empty primary diff but is NOT untracked, so it correctly stays blank
|
|
264
270
|
* (never fabricated as fully-added).
|
|
265
271
|
*/
|
|
266
|
-
export declare function getSourceGitDiff(
|
|
267
|
-
export declare function getSourceGitCommitFiles(
|
|
272
|
+
export declare function getSourceGitDiff(at: GitTarget, repoRelPath: string, target: SourceGitDiffTarget, gitBin?: string): Promise<SourceGitDiffResult | null>;
|
|
273
|
+
export declare function getSourceGitCommitFiles(target: GitTarget, sha: string, gitBin?: string): Promise<GitCommitFileChange[] | null>;
|
|
268
274
|
/**
|
|
269
275
|
* The aggregated outgoing state (G2.4/C3 — the expandable "Outgoing changes"
|
|
270
276
|
* row): everything committed but not pushed, as the SAME two-tree names-only
|
|
@@ -281,7 +287,7 @@ export declare function getSourceGitCommitFiles(resolvedRoot: string, sha: strin
|
|
|
281
287
|
* - non-repo / unborn HEAD / timeout / any git error → `null`.
|
|
282
288
|
* ON DEMAND, UNcached, fresh runner, heavy timeout.
|
|
283
289
|
*/
|
|
284
|
-
export declare function getSourceGitOutgoing(
|
|
290
|
+
export declare function getSourceGitOutgoing(target: GitTarget, gitBin?: string): Promise<{
|
|
285
291
|
baseSha: string | null;
|
|
286
292
|
headSha: string;
|
|
287
293
|
files: GitCommitFileChange[];
|
|
@@ -314,7 +320,7 @@ export type SourceGitLogStats = {
|
|
|
314
320
|
/** `rev-list @{u}..HEAD`; ABSENT without an upstream, `[]` when fully pushed. */
|
|
315
321
|
outgoing?: string[];
|
|
316
322
|
};
|
|
317
|
-
export declare function getSourceGitLogStats(
|
|
323
|
+
export declare function getSourceGitLogStats(target: GitTarget, opts: {
|
|
318
324
|
maxCount?: number;
|
|
319
325
|
skip?: number;
|
|
320
326
|
ref?: string;
|
|
@@ -345,7 +351,7 @@ export type SourceGitLogResult = {
|
|
|
345
351
|
* log rather than a separate route so the graph's page fetch and its
|
|
346
352
|
* decorations can never disagree about the ref state they were read under.
|
|
347
353
|
*/
|
|
348
|
-
export declare function getSourceGitLog(
|
|
354
|
+
export declare function getSourceGitLog(target: GitTarget, opts: {
|
|
349
355
|
maxCount?: number;
|
|
350
356
|
skip?: number;
|
|
351
357
|
ref?: string;
|
|
@@ -379,14 +385,20 @@ export type SourceGitShowResult = {
|
|
|
379
385
|
* `null` (fail-soft) for a non-git source, a path missing at the rev, a
|
|
380
386
|
* timeout, or any git error.
|
|
381
387
|
*/
|
|
382
|
-
export declare function getSourceGitShow(
|
|
388
|
+
export declare function getSourceGitShow(target: GitTarget, repoRelPath: string, rev: string, gitBin?: string): Promise<SourceGitShowResult | null>;
|
|
383
389
|
/**
|
|
384
390
|
* Drop the TTL-cached git-control state for ONE resolved root across ALL the
|
|
385
391
|
* per-root caches (status / branches / summary + the E1 discovery/probe pair).
|
|
386
392
|
* The `.git/HEAD` badge watcher (G2.2) calls this the instant an EXTERNAL git
|
|
387
393
|
* op fires so the next panel/list read recomputes from the live repo instead
|
|
388
394
|
* of serving up to `GIT_CONTROL_CACHE_TTL_MS` of stale state. The caches key
|
|
389
|
-
* on the resolved root (see `withCache
|
|
395
|
+
* on the resolved root (see `withCache`; the two that spawn on a device —
|
|
396
|
+
* status and branches — also on the caller's class, `spawnKey`, and both are
|
|
397
|
+
* dropped; the summary stays on the root because on a device it is FILE reads
|
|
398
|
+
* of `.git/HEAD` + `.git/config`, the same answer for every caller, and the
|
|
399
|
+
* discovery is the raw repo-root SET every consumer filters per caller through
|
|
400
|
+
* `filterVisibleRepoNames` — a spawn added to either moves it to `spawnKey`),
|
|
401
|
+
* so a keyed delete is exact — and
|
|
390
402
|
* that keying is what keeps the watcher's existing call correct for NESTED
|
|
391
403
|
* roots (E1): a nested-root invalidation drops that repo's own summary/status
|
|
392
404
|
* entries, while the discovery/probe entries (keyed by the SOURCE root) are
|
|
@@ -394,28 +406,28 @@ export declare function getSourceGitShow(resolvedRoot: string, repoRelPath: stri
|
|
|
394
406
|
* that DO change the set (source config mutation) invalidate at the source
|
|
395
407
|
* root, which sweeps discovery too via `invalidateSourceGitDiscovery`.
|
|
396
408
|
*/
|
|
397
|
-
export declare function invalidateSourceGitCache(
|
|
409
|
+
export declare function invalidateSourceGitCache(target: GitTarget): void;
|
|
398
410
|
/**
|
|
399
411
|
* Source-root-keyed drop of ONLY the E1 nested-checkout discovery entry (the
|
|
400
412
|
* 30 s cache). Exists so set-changing paths (a nested checkout
|
|
401
413
|
* appeared/disappeared under a NON-repo source root) can refresh the picker
|
|
402
414
|
* without also flushing the source's summary/status caches.
|
|
403
415
|
*/
|
|
404
|
-
export declare function invalidateSourceGitDiscovery(sourceRoot:
|
|
416
|
+
export declare function invalidateSourceGitDiscovery(sourceRoot: GitTarget): void;
|
|
405
417
|
/**
|
|
406
418
|
* The local branch list for the branch-switcher. On demand, TTL-cached per root.
|
|
407
419
|
* `null` (fail-soft) for a non-git source or any git error. Heavy relative to
|
|
408
420
|
* `getSourceGitSummary` (enumerates every local branch) — the switcher fetches it
|
|
409
421
|
* on demand, never the list path.
|
|
410
422
|
*/
|
|
411
|
-
export declare function getSourceBranches(
|
|
423
|
+
export declare function getSourceBranches(target: GitTarget, gitBin?: string): Promise<GitBranchInfo[] | null>;
|
|
412
424
|
/**
|
|
413
425
|
* The repo display name for a resolved root (D4) — `path.basename` and NOTHING
|
|
414
426
|
* more: a NAME only, never the host path (`scrubHostPath` discipline).
|
|
415
427
|
* `undefined` when the basename is empty (a source rooted at `/`), so the
|
|
416
428
|
* `repoName` field is omitted rather than stamped as `''`.
|
|
417
429
|
*/
|
|
418
|
-
export declare function repoNameFromRoot(
|
|
430
|
+
export declare function repoNameFromRoot(target: GitTarget): string | undefined;
|
|
419
431
|
/**
|
|
420
432
|
* CHEAP source-row summary — `.git` stat (isRepo) + a `.git/config` origin read
|
|
421
433
|
* + `currentBranch()` (O(1), reads `.git/HEAD`). TTL-cached per root. Returns
|
|
@@ -434,7 +446,7 @@ export declare function repoNameFromRoot(resolvedRoot: string): string | undefin
|
|
|
434
446
|
* `repoNames` is the RAW set — consumers MUST `filterVisibleRepoNames` before
|
|
435
447
|
* stamping (per-file name-visibility). Root-repos never pay the scan.
|
|
436
448
|
*/
|
|
437
|
-
export declare function getSourceGitSummary(
|
|
449
|
+
export declare function getSourceGitSummary(target: GitTarget, gitBin?: string): Promise<SourceGitSummary | null>;
|
|
438
450
|
/**
|
|
439
451
|
* Per-CALLER write capability for a git source's source-row indicator + the
|
|
440
452
|
* "Git Control" write UI (G2.3). `git.canWrite` drives whether the panel renders
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourceGitControl.d.ts","sourceRoot":"","sources":["../../../src/git/sourceGitControl.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sourceGitControl.d.ts","sourceRoot":"","sources":["../../../src/git/sourceGitControl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAKH,OAAO,EAOL,KAAK,QAAQ,EACb,KAAK,SAAS,EACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAKL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAIzE;;;;;;;;GAQG;AACH,KAAK,eAAe,GAAG;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,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