@moorline/core 0.0.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/dist/app/bootstrap/apiAdapterPackageLoader.d.ts +21 -0
- package/dist/app/bootstrap/apiAdapterPackageLoader.js +143 -0
- package/dist/app/bootstrap/apiAdapterPackageLoader.js.map +1 -0
- package/dist/app/bootstrap/officialCatalog.d.ts +1 -0
- package/dist/app/bootstrap/officialCatalog.js +2 -0
- package/dist/app/bootstrap/officialCatalog.js.map +1 -0
- package/dist/app/bootstrap/operatorPackageService.d.ts +79 -0
- package/dist/app/bootstrap/operatorPackageService.js +1025 -0
- package/dist/app/bootstrap/operatorPackageService.js.map +1 -0
- package/dist/app/bootstrap/providerPackageLoader.d.ts +12 -0
- package/dist/app/bootstrap/providerPackageLoader.js +139 -0
- package/dist/app/bootstrap/providerPackageLoader.js.map +1 -0
- package/dist/app/bootstrap/runtimeBootstrap.d.ts +12 -0
- package/dist/app/bootstrap/runtimeBootstrap.js +46 -0
- package/dist/app/bootstrap/runtimeBootstrap.js.map +1 -0
- package/dist/app/bootstrap/transportPackageLoader.d.ts +23 -0
- package/dist/app/bootstrap/transportPackageLoader.js +149 -0
- package/dist/app/bootstrap/transportPackageLoader.js.map +1 -0
- package/dist/app/control-api/services/actions.d.ts +140 -0
- package/dist/app/control-api/services/actions.js +312 -0
- package/dist/app/control-api/services/actions.js.map +1 -0
- package/dist/app/control-api/services/controlPlane.d.ts +245 -0
- package/dist/app/control-api/services/controlPlane.js +301 -0
- package/dist/app/control-api/services/controlPlane.js.map +1 -0
- package/dist/app/control-api/services/runtimeHost.d.ts +61 -0
- package/dist/app/control-api/services/runtimeHost.js +117 -0
- package/dist/app/control-api/services/runtimeHost.js.map +1 -0
- package/dist/app/control-api/services/state.d.ts +19 -0
- package/dist/app/control-api/services/state.js +177 -0
- package/dist/app/control-api/services/state.js.map +1 -0
- package/dist/core/domain/memory/operatorMemoryService.d.ts +36 -0
- package/dist/core/domain/memory/operatorMemoryService.js +81 -0
- package/dist/core/domain/memory/operatorMemoryService.js.map +1 -0
- package/dist/core/domain/memory/pathSafety.d.ts +2 -0
- package/dist/core/domain/memory/pathSafety.js +36 -0
- package/dist/core/domain/memory/pathSafety.js.map +1 -0
- package/dist/core/domain/memory/retrieval/fileWalker.d.ts +1 -0
- package/dist/core/domain/memory/retrieval/fileWalker.js +31 -0
- package/dist/core/domain/memory/retrieval/fileWalker.js.map +1 -0
- package/dist/core/domain/memory/retrieval/indexTargets.d.ts +3 -0
- package/dist/core/domain/memory/retrieval/indexTargets.js +43 -0
- package/dist/core/domain/memory/retrieval/indexTargets.js.map +1 -0
- package/dist/core/domain/memory/retrieval/markdownChunker.d.ts +3 -0
- package/dist/core/domain/memory/retrieval/markdownChunker.js +77 -0
- package/dist/core/domain/memory/retrieval/markdownChunker.js.map +1 -0
- package/dist/core/domain/memory/retrieval/parse.d.ts +2 -0
- package/dist/core/domain/memory/retrieval/parse.js +28 -0
- package/dist/core/domain/memory/retrieval/parse.js.map +1 -0
- package/dist/core/domain/memory/retrieval/ranking.d.ts +11 -0
- package/dist/core/domain/memory/retrieval/ranking.js +63 -0
- package/dist/core/domain/memory/retrieval/ranking.js.map +1 -0
- package/dist/core/domain/memory/retrieval/schema.d.ts +2 -0
- package/dist/core/domain/memory/retrieval/schema.js +105 -0
- package/dist/core/domain/memory/retrieval/schema.js.map +1 -0
- package/dist/core/domain/memory/retrieval/scope.d.ts +20 -0
- package/dist/core/domain/memory/retrieval/scope.js +38 -0
- package/dist/core/domain/memory/retrieval/scope.js.map +1 -0
- package/dist/core/domain/memory/retrieval/tokenEmbedding.d.ts +4 -0
- package/dist/core/domain/memory/retrieval/tokenEmbedding.js +44 -0
- package/dist/core/domain/memory/retrieval/tokenEmbedding.js.map +1 -0
- package/dist/core/domain/memory/retrieval/types.d.ts +88 -0
- package/dist/core/domain/memory/retrieval/types.js +7 -0
- package/dist/core/domain/memory/retrieval/types.js.map +1 -0
- package/dist/core/domain/memory/retrieval.d.ts +4 -0
- package/dist/core/domain/memory/retrieval.js +398 -0
- package/dist/core/domain/memory/retrieval.js.map +1 -0
- package/dist/core/domain/memory/store.d.ts +28 -0
- package/dist/core/domain/memory/store.js +52 -0
- package/dist/core/domain/memory/store.js.map +1 -0
- package/dist/core/domain/missions/missionDraftSetup.d.ts +12 -0
- package/dist/core/domain/missions/missionDraftSetup.js +92 -0
- package/dist/core/domain/missions/missionDraftSetup.js.map +1 -0
- package/dist/core/domain/missions/missionHookService.d.ts +41 -0
- package/dist/core/domain/missions/missionHookService.js +161 -0
- package/dist/core/domain/missions/missionHookService.js.map +1 -0
- package/dist/core/domain/missions/missionHookValidation.d.ts +8 -0
- package/dist/core/domain/missions/missionHookValidation.js +59 -0
- package/dist/core/domain/missions/missionHookValidation.js.map +1 -0
- package/dist/core/domain/missions/missionRegistry.d.ts +55 -0
- package/dist/core/domain/missions/missionRegistry.js +204 -0
- package/dist/core/domain/missions/missionRegistry.js.map +1 -0
- package/dist/core/domain/missions/missionSchedule.d.ts +24 -0
- package/dist/core/domain/missions/missionSchedule.js +441 -0
- package/dist/core/domain/missions/missionSchedule.js.map +1 -0
- package/dist/core/domain/sessions/lifecycleOrchestration.d.ts +23 -0
- package/dist/core/domain/sessions/lifecycleOrchestration.js +18 -0
- package/dist/core/domain/sessions/lifecycleOrchestration.js.map +1 -0
- package/dist/core/domain/sessions/managedWorkerSessions.d.ts +3 -0
- package/dist/core/domain/sessions/managedWorkerSessions.js +4 -0
- package/dist/core/domain/sessions/managedWorkerSessions.js.map +1 -0
- package/dist/core/domain/sessions/runtimeWorkManagementService.d.ts +129 -0
- package/dist/core/domain/sessions/runtimeWorkManagementService.js +627 -0
- package/dist/core/domain/sessions/runtimeWorkManagementService.js.map +1 -0
- package/dist/core/domain/sessions/sessionLifecycleService.d.ts +21 -0
- package/dist/core/domain/sessions/sessionLifecycleService.js +76 -0
- package/dist/core/domain/sessions/sessionLifecycleService.js.map +1 -0
- package/dist/core/domain/sessions/sessionState.d.ts +34 -0
- package/dist/core/domain/sessions/sessionState.js +154 -0
- package/dist/core/domain/sessions/sessionState.js.map +1 -0
- package/dist/core/domain/sessions/workManagement/managedSessionLimit.d.ts +3 -0
- package/dist/core/domain/sessions/workManagement/managedSessionLimit.js +15 -0
- package/dist/core/domain/sessions/workManagement/managedSessionLimit.js.map +1 -0
- package/dist/core/domain/sessions/workManagement/spaceNames.d.ts +2 -0
- package/dist/core/domain/sessions/workManagement/spaceNames.js +15 -0
- package/dist/core/domain/sessions/workManagement/spaceNames.js.map +1 -0
- package/dist/core/extension/capabilities/capabilities.d.ts +8 -0
- package/dist/core/extension/capabilities/capabilities.js +40 -0
- package/dist/core/extension/capabilities/capabilities.js.map +1 -0
- package/dist/core/extension/packages/archiveExtraction.d.ts +1 -0
- package/dist/core/extension/packages/archiveExtraction.js +194 -0
- package/dist/core/extension/packages/archiveExtraction.js.map +1 -0
- package/dist/core/extension/packages/npmRegistryClient.d.ts +24 -0
- package/dist/core/extension/packages/npmRegistryClient.js +261 -0
- package/dist/core/extension/packages/npmRegistryClient.js.map +1 -0
- package/dist/core/extension/packages/officialArchiveResolver.d.ts +2 -0
- package/dist/core/extension/packages/officialArchiveResolver.js +51 -0
- package/dist/core/extension/packages/officialArchiveResolver.js.map +1 -0
- package/dist/core/extension/packages/officialCatalog.d.ts +9 -0
- package/dist/core/extension/packages/officialCatalog.js +198 -0
- package/dist/core/extension/packages/officialCatalog.js.map +1 -0
- package/dist/core/extension/packages/packageActivation.d.ts +21 -0
- package/dist/core/extension/packages/packageActivation.js +81 -0
- package/dist/core/extension/packages/packageActivation.js.map +1 -0
- package/dist/core/extension/packages/packageApplyPlanner.d.ts +4 -0
- package/dist/core/extension/packages/packageApplyPlanner.js +79 -0
- package/dist/core/extension/packages/packageApplyPlanner.js.map +1 -0
- package/dist/core/extension/packages/packageBundleRoot.d.ts +1 -0
- package/dist/core/extension/packages/packageBundleRoot.js +34 -0
- package/dist/core/extension/packages/packageBundleRoot.js.map +1 -0
- package/dist/core/extension/packages/packageConfigSchema.d.ts +7 -0
- package/dist/core/extension/packages/packageConfigSchema.js +86 -0
- package/dist/core/extension/packages/packageConfigSchema.js.map +1 -0
- package/dist/core/extension/packages/packageDependencyResolver.d.ts +13 -0
- package/dist/core/extension/packages/packageDependencyResolver.js +128 -0
- package/dist/core/extension/packages/packageDependencyResolver.js.map +1 -0
- package/dist/core/extension/packages/packageDistroMetadata.d.ts +14 -0
- package/dist/core/extension/packages/packageDistroMetadata.js +153 -0
- package/dist/core/extension/packages/packageDistroMetadata.js.map +1 -0
- package/dist/core/extension/packages/packageInstaller.d.ts +27 -0
- package/dist/core/extension/packages/packageInstaller.js +269 -0
- package/dist/core/extension/packages/packageInstaller.js.map +1 -0
- package/dist/core/extension/packages/packageInventoryStore.d.ts +25 -0
- package/dist/core/extension/packages/packageInventoryStore.js +398 -0
- package/dist/core/extension/packages/packageInventoryStore.js.map +1 -0
- package/dist/core/extension/packages/packageManifest.d.ts +15 -0
- package/dist/core/extension/packages/packageManifest.js +65 -0
- package/dist/core/extension/packages/packageManifest.js.map +1 -0
- package/dist/core/extension/packages/packageRegistryBlocklist.d.ts +10 -0
- package/dist/core/extension/packages/packageRegistryBlocklist.js +13 -0
- package/dist/core/extension/packages/packageRegistryBlocklist.js.map +1 -0
- package/dist/core/extension/packages/packageRegistryService.d.ts +22 -0
- package/dist/core/extension/packages/packageRegistryService.js +123 -0
- package/dist/core/extension/packages/packageRegistryService.js.map +1 -0
- package/dist/core/extension/packages/packageRegistryTypes.d.ts +33 -0
- package/dist/core/extension/packages/packageRegistryTypes.js +2 -0
- package/dist/core/extension/packages/packageRegistryTypes.js.map +1 -0
- package/dist/core/extension/packages/packageSource.d.ts +8 -0
- package/dist/core/extension/packages/packageSource.js +116 -0
- package/dist/core/extension/packages/packageSource.js.map +1 -0
- package/dist/core/extension/packages/packageSourceLimits.d.ts +5 -0
- package/dist/core/extension/packages/packageSourceLimits.js +6 -0
- package/dist/core/extension/packages/packageSourceLimits.js.map +1 -0
- package/dist/core/extension/packages/packageValidation.d.ts +2 -0
- package/dist/core/extension/packages/packageValidation.js +67 -0
- package/dist/core/extension/packages/packageValidation.js.map +1 -0
- package/dist/core/extension/packages/packageVersionResolver.d.ts +28 -0
- package/dist/core/extension/packages/packageVersionResolver.js +78 -0
- package/dist/core/extension/packages/packageVersionResolver.js.map +1 -0
- package/dist/core/extension/packages/remoteArchiveDownloader.d.ts +10 -0
- package/dist/core/extension/packages/remoteArchiveDownloader.js +156 -0
- package/dist/core/extension/packages/remoteArchiveDownloader.js.map +1 -0
- package/dist/core/extension/packages/runtimeStartability.d.ts +16 -0
- package/dist/core/extension/packages/runtimeStartability.js +237 -0
- package/dist/core/extension/packages/runtimeStartability.js.map +1 -0
- package/dist/core/extension/plugins/pluginHost.d.ts +50 -0
- package/dist/core/extension/plugins/pluginHost.js +303 -0
- package/dist/core/extension/plugins/pluginHost.js.map +1 -0
- package/dist/core/extension/plugins/pluginId.d.ts +2 -0
- package/dist/core/extension/plugins/pluginId.js +8 -0
- package/dist/core/extension/plugins/pluginId.js.map +1 -0
- package/dist/core/extension/plugins/pluginManifest.d.ts +3 -0
- package/dist/core/extension/plugins/pluginManifest.js +17 -0
- package/dist/core/extension/plugins/pluginManifest.js.map +1 -0
- package/dist/core/extension/plugins/runtimePluginLoader.d.ts +7 -0
- package/dist/core/extension/plugins/runtimePluginLoader.js +160 -0
- package/dist/core/extension/plugins/runtimePluginLoader.js.map +1 -0
- package/dist/core/extension/skills/skillRegistry.d.ts +21 -0
- package/dist/core/extension/skills/skillRegistry.js +233 -0
- package/dist/core/extension/skills/skillRegistry.js.map +1 -0
- package/dist/core/extension/skills/skillWriter.d.ts +20 -0
- package/dist/core/extension/skills/skillWriter.js +150 -0
- package/dist/core/extension/skills/skillWriter.js.map +1 -0
- package/dist/core/runtime/execution/commandReactor.d.ts +31 -0
- package/dist/core/runtime/execution/commandReactor.js +38 -0
- package/dist/core/runtime/execution/commandReactor.js.map +1 -0
- package/dist/core/runtime/execution/defaultModelSelection.d.ts +4 -0
- package/dist/core/runtime/execution/defaultModelSelection.js +17 -0
- package/dist/core/runtime/execution/defaultModelSelection.js.map +1 -0
- package/dist/core/runtime/execution/drainableWorker.d.ts +27 -0
- package/dist/core/runtime/execution/drainableWorker.js +79 -0
- package/dist/core/runtime/execution/drainableWorker.js.map +1 -0
- package/dist/core/runtime/execution/orchestrationEngine.d.ts +16 -0
- package/dist/core/runtime/execution/orchestrationEngine.js +181 -0
- package/dist/core/runtime/execution/orchestrationEngine.js.map +1 -0
- package/dist/core/runtime/execution/orchestrationHealth.d.ts +45 -0
- package/dist/core/runtime/execution/orchestrationHealth.js +95 -0
- package/dist/core/runtime/execution/orchestrationHealth.js.map +1 -0
- package/dist/core/runtime/execution/pluginContext/defaultSessionOwner.d.ts +2 -0
- package/dist/core/runtime/execution/pluginContext/defaultSessionOwner.js +10 -0
- package/dist/core/runtime/execution/pluginContext/defaultSessionOwner.js.map +1 -0
- package/dist/core/runtime/execution/pluginContext/pluginCapabilities.d.ts +40 -0
- package/dist/core/runtime/execution/pluginContext/pluginCapabilities.js +73 -0
- package/dist/core/runtime/execution/pluginContext/pluginCapabilities.js.map +1 -0
- package/dist/core/runtime/execution/pluginContext/pluginContextFactory.d.ts +20 -0
- package/dist/core/runtime/execution/pluginContext/pluginContextFactory.js +18 -0
- package/dist/core/runtime/execution/pluginContext/pluginContextFactory.js.map +1 -0
- package/dist/core/runtime/execution/pluginContext/transportAuthor.d.ts +7 -0
- package/dist/core/runtime/execution/pluginContext/transportAuthor.js +15 -0
- package/dist/core/runtime/execution/pluginContext/transportAuthor.js.map +1 -0
- package/dist/core/runtime/execution/providerCoordination/providerCompactionCoordinator.d.ts +7 -0
- package/dist/core/runtime/execution/providerCoordination/providerCompactionCoordinator.js +25 -0
- package/dist/core/runtime/execution/providerCoordination/providerCompactionCoordinator.js.map +1 -0
- package/dist/core/runtime/execution/providerCoordination/providerPolicyTarget.d.ts +2 -0
- package/dist/core/runtime/execution/providerCoordination/providerPolicyTarget.js +5 -0
- package/dist/core/runtime/execution/providerCoordination/providerPolicyTarget.js.map +1 -0
- package/dist/core/runtime/execution/providerCoordination/providerRecoveryService.d.ts +7 -0
- package/dist/core/runtime/execution/providerCoordination/providerRecoveryService.js +6 -0
- package/dist/core/runtime/execution/providerCoordination/providerRecoveryService.js.map +1 -0
- package/dist/core/runtime/execution/providerCoordination/providerRequestAttributionService.d.ts +10 -0
- package/dist/core/runtime/execution/providerCoordination/providerRequestAttributionService.js +33 -0
- package/dist/core/runtime/execution/providerCoordination/providerRequestAttributionService.js.map +1 -0
- package/dist/core/runtime/execution/providerCoordination/providerSessionCoordinator.d.ts +5 -0
- package/dist/core/runtime/execution/providerCoordination/providerSessionCoordinator.js +9 -0
- package/dist/core/runtime/execution/providerCoordination/providerSessionCoordinator.js.map +1 -0
- package/dist/core/runtime/execution/providerCoordination/providerTurnCoordinator.d.ts +3 -0
- package/dist/core/runtime/execution/providerCoordination/providerTurnCoordinator.js +6 -0
- package/dist/core/runtime/execution/providerCoordination/providerTurnCoordinator.js.map +1 -0
- package/dist/core/runtime/execution/providerOrchestration/ports.d.ts +47 -0
- package/dist/core/runtime/execution/providerOrchestration/ports.js +2 -0
- package/dist/core/runtime/execution/providerOrchestration/ports.js.map +1 -0
- package/dist/core/runtime/execution/providerOrchestration/providerAttachmentResolver.d.ts +13 -0
- package/dist/core/runtime/execution/providerOrchestration/providerAttachmentResolver.js +57 -0
- package/dist/core/runtime/execution/providerOrchestration/providerAttachmentResolver.js.map +1 -0
- package/dist/core/runtime/execution/providerOrchestration/providerCompactionPolicy.d.ts +19 -0
- package/dist/core/runtime/execution/providerOrchestration/providerCompactionPolicy.js +129 -0
- package/dist/core/runtime/execution/providerOrchestration/providerCompactionPolicy.js.map +1 -0
- package/dist/core/runtime/execution/providerOrchestration/providerEventPipeline.d.ts +32 -0
- package/dist/core/runtime/execution/providerOrchestration/providerEventPipeline.js +67 -0
- package/dist/core/runtime/execution/providerOrchestration/providerEventPipeline.js.map +1 -0
- package/dist/core/runtime/execution/providerOrchestration/providerMissionEventProjector.d.ts +12 -0
- package/dist/core/runtime/execution/providerOrchestration/providerMissionEventProjector.js +71 -0
- package/dist/core/runtime/execution/providerOrchestration/providerMissionEventProjector.js.map +1 -0
- package/dist/core/runtime/execution/providerOrchestration/providerOrchestrator.d.ts +37 -0
- package/dist/core/runtime/execution/providerOrchestration/providerOrchestrator.js +53 -0
- package/dist/core/runtime/execution/providerOrchestration/providerOrchestrator.js.map +1 -0
- package/dist/core/runtime/execution/providerOrchestration/providerRequestProjector.d.ts +15 -0
- package/dist/core/runtime/execution/providerOrchestration/providerRequestProjector.js +93 -0
- package/dist/core/runtime/execution/providerOrchestration/providerRequestProjector.js.map +1 -0
- package/dist/core/runtime/execution/providerOrchestration/providerSessionOrchestrator.d.ts +37 -0
- package/dist/core/runtime/execution/providerOrchestration/providerSessionOrchestrator.js +104 -0
- package/dist/core/runtime/execution/providerOrchestration/providerSessionOrchestrator.js.map +1 -0
- package/dist/core/runtime/execution/providerOrchestration/providerTurnBroker.d.ts +62 -0
- package/dist/core/runtime/execution/providerOrchestration/providerTurnBroker.js +349 -0
- package/dist/core/runtime/execution/providerOrchestration/providerTurnBroker.js.map +1 -0
- package/dist/core/runtime/execution/providerProjectionTypes.d.ts +25 -0
- package/dist/core/runtime/execution/providerProjectionTypes.js +18 -0
- package/dist/core/runtime/execution/providerProjectionTypes.js.map +1 -0
- package/dist/core/runtime/execution/providerSessionDirectory.d.ts +12 -0
- package/dist/core/runtime/execution/providerSessionDirectory.js +94 -0
- package/dist/core/runtime/execution/providerSessionDirectory.js.map +1 -0
- package/dist/core/runtime/execution/runtimeDomain.d.ts +116 -0
- package/dist/core/runtime/execution/runtimeDomain.js +262 -0
- package/dist/core/runtime/execution/runtimeDomain.js.map +1 -0
- package/dist/core/runtime/execution/runtimeIngestion.d.ts +17 -0
- package/dist/core/runtime/execution/runtimeIngestion.js +254 -0
- package/dist/core/runtime/execution/runtimeIngestion.js.map +1 -0
- package/dist/core/runtime/execution/runtimeInteractionService.d.ts +66 -0
- package/dist/core/runtime/execution/runtimeInteractionService.js +230 -0
- package/dist/core/runtime/execution/runtimeInteractionService.js.map +1 -0
- package/dist/core/runtime/execution/runtimeOrchestrationRequestService.d.ts +64 -0
- package/dist/core/runtime/execution/runtimeOrchestrationRequestService.js +366 -0
- package/dist/core/runtime/execution/runtimeOrchestrationRequestService.js.map +1 -0
- package/dist/core/runtime/execution/runtimeOrchestrationRequests.d.ts +111 -0
- package/dist/core/runtime/execution/runtimeOrchestrationRequests.js +464 -0
- package/dist/core/runtime/execution/runtimeOrchestrationRequests.js.map +1 -0
- package/dist/core/runtime/execution/runtimeOrchestrationResult.d.ts +4 -0
- package/dist/core/runtime/execution/runtimeOrchestrationResult.js +7 -0
- package/dist/core/runtime/execution/runtimeOrchestrationResult.js.map +1 -0
- package/dist/core/runtime/execution/runtimePendingRequestService.d.ts +69 -0
- package/dist/core/runtime/execution/runtimePendingRequestService.js +360 -0
- package/dist/core/runtime/execution/runtimePendingRequestService.js.map +1 -0
- package/dist/core/runtime/execution/runtimePluginContextService.d.ts +100 -0
- package/dist/core/runtime/execution/runtimePluginContextService.js +576 -0
- package/dist/core/runtime/execution/runtimePluginContextService.js.map +1 -0
- package/dist/core/runtime/execution/runtimeReceiptBus.d.ts +17 -0
- package/dist/core/runtime/execution/runtimeReceiptBus.js +50 -0
- package/dist/core/runtime/execution/runtimeReceiptBus.js.map +1 -0
- package/dist/core/runtime/execution/runtimeWorkerQueues.d.ts +33 -0
- package/dist/core/runtime/execution/runtimeWorkerQueues.js +55 -0
- package/dist/core/runtime/execution/runtimeWorkerQueues.js.map +1 -0
- package/dist/core/runtime/graph/runtimePaths.d.ts +2 -0
- package/dist/core/runtime/graph/runtimePaths.js +22 -0
- package/dist/core/runtime/graph/runtimePaths.js.map +1 -0
- package/dist/core/runtime/hosting/managedSpaceMetadata.d.ts +7 -0
- package/dist/core/runtime/hosting/managedSpaceMetadata.js +14 -0
- package/dist/core/runtime/hosting/managedSpaceMetadata.js.map +1 -0
- package/dist/core/runtime/hosting/runtimeHostingService.d.ts +32 -0
- package/dist/core/runtime/hosting/runtimeHostingService.js +123 -0
- package/dist/core/runtime/hosting/runtimeHostingService.js.map +1 -0
- package/dist/core/runtime/hosting/runtimeLayout.d.ts +5 -0
- package/dist/core/runtime/hosting/runtimeLayout.js +133 -0
- package/dist/core/runtime/hosting/runtimeLayout.js.map +1 -0
- package/dist/core/runtime/hosting/runtimeManagementPort.d.ts +60 -0
- package/dist/core/runtime/hosting/runtimeManagementPort.js +28 -0
- package/dist/core/runtime/hosting/runtimeManagementPort.js.map +1 -0
- package/dist/core/runtime/hosting/runtimeTransportSurfaceService.d.ts +20 -0
- package/dist/core/runtime/hosting/runtimeTransportSurfaceService.js +82 -0
- package/dist/core/runtime/hosting/runtimeTransportSurfaceService.js.map +1 -0
- package/dist/core/runtime/hosting/systemEmbeds.d.ts +22 -0
- package/dist/core/runtime/hosting/systemEmbeds.js +25 -0
- package/dist/core/runtime/hosting/systemEmbeds.js.map +1 -0
- package/dist/core/runtime/lifecycle/managedChannelLifecycleService.d.ts +37 -0
- package/dist/core/runtime/lifecycle/managedChannelLifecycleService.js +256 -0
- package/dist/core/runtime/lifecycle/managedChannelLifecycleService.js.map +1 -0
- package/dist/core/runtime/lifecycle/runtimeLifecycleService.d.ts +43 -0
- package/dist/core/runtime/lifecycle/runtimeLifecycleService.js +322 -0
- package/dist/core/runtime/lifecycle/runtimeLifecycleService.js.map +1 -0
- package/dist/core/runtime/moorlineRuntime.d.ts +100 -0
- package/dist/core/runtime/moorlineRuntime.js +573 -0
- package/dist/core/runtime/moorlineRuntime.js.map +1 -0
- package/dist/core/runtime/moorlineRuntimeBuilder.d.ts +180 -0
- package/dist/core/runtime/moorlineRuntimeBuilder.js +681 -0
- package/dist/core/runtime/moorlineRuntimeBuilder.js.map +1 -0
- package/dist/core/runtime/runtimeAudit.d.ts +7 -0
- package/dist/core/runtime/runtimeAudit.js +32 -0
- package/dist/core/runtime/runtimeAudit.js.map +1 -0
- package/dist/core/runtime/runtimeBootstrapRegistry.d.ts +5 -0
- package/dist/core/runtime/runtimeBootstrapRegistry.js +15 -0
- package/dist/core/runtime/runtimeBootstrapRegistry.js.map +1 -0
- package/dist/core/runtime/runtimeStatus.d.ts +14 -0
- package/dist/core/runtime/runtimeStatus.js +16 -0
- package/dist/core/runtime/runtimeStatus.js.map +1 -0
- package/dist/core/runtime/supervision/managedSidecar.d.ts +71 -0
- package/dist/core/runtime/supervision/managedSidecar.js +13 -0
- package/dist/core/runtime/supervision/managedSidecar.js.map +1 -0
- package/dist/core/runtime/supervision/runtimeControl.d.ts +45 -0
- package/dist/core/runtime/supervision/runtimeControl.js +2 -0
- package/dist/core/runtime/supervision/runtimeControl.js.map +1 -0
- package/dist/core/runtime/supervision/runtimeControlService.d.ts +56 -0
- package/dist/core/runtime/supervision/runtimeControlService.js +315 -0
- package/dist/core/runtime/supervision/runtimeControlService.js.map +1 -0
- package/dist/core/runtime/supervision/runtimeSupervisor.d.ts +106 -0
- package/dist/core/runtime/supervision/runtimeSupervisor.js +425 -0
- package/dist/core/runtime/supervision/runtimeSupervisor.js.map +1 -0
- package/dist/core/runtime/supervision/sidecarLaunchDefinition.d.ts +3 -0
- package/dist/core/runtime/supervision/sidecarLaunchDefinition.js +24 -0
- package/dist/core/runtime/supervision/sidecarLaunchDefinition.js.map +1 -0
- package/dist/core/runtime/supervision/sidecarManager.d.ts +40 -0
- package/dist/core/runtime/supervision/sidecarManager.js +409 -0
- package/dist/core/runtime/supervision/sidecarManager.js.map +1 -0
- package/dist/core/shared/fs/atomicWrite.d.ts +6 -0
- package/dist/core/shared/fs/atomicWrite.js +48 -0
- package/dist/core/shared/fs/atomicWrite.js.map +1 -0
- package/dist/core/shared/fs/canonicalPathContainment.d.ts +8 -0
- package/dist/core/shared/fs/canonicalPathContainment.js +31 -0
- package/dist/core/shared/fs/canonicalPathContainment.js.map +1 -0
- package/dist/core/shared/fs/runtimeOwnedPath.d.ts +6 -0
- package/dist/core/shared/fs/runtimeOwnedPath.js +23 -0
- package/dist/core/shared/fs/runtimeOwnedPath.js.map +1 -0
- package/dist/core/shared/utils/childProcessEnv.d.ts +4 -0
- package/dist/core/shared/utils/childProcessEnv.js +66 -0
- package/dist/core/shared/utils/childProcessEnv.js.map +1 -0
- package/dist/core/shared/utils/commandRunner.d.ts +18 -0
- package/dist/core/shared/utils/commandRunner.js +51 -0
- package/dist/core/shared/utils/commandRunner.js.map +1 -0
- package/dist/core/shared/utils/payloadRedaction.d.ts +13 -0
- package/dist/core/shared/utils/payloadRedaction.js +91 -0
- package/dist/core/shared/utils/payloadRedaction.js.map +1 -0
- package/dist/core/shared/utils/remoteNetworkPolicy.d.ts +11 -0
- package/dist/core/shared/utils/remoteNetworkPolicy.js +137 -0
- package/dist/core/shared/utils/remoteNetworkPolicy.js.map +1 -0
- package/dist/core/shared/utils/runtimeMessageUtils.d.ts +27 -0
- package/dist/core/shared/utils/runtimeMessageUtils.js +383 -0
- package/dist/core/shared/utils/runtimeMessageUtils.js.map +1 -0
- package/dist/core/system/audit/auditLogger.d.ts +15 -0
- package/dist/core/system/audit/auditLogger.js +22 -0
- package/dist/core/system/audit/auditLogger.js.map +1 -0
- package/dist/core/system/backup/runtimeBackupService.d.ts +28 -0
- package/dist/core/system/backup/runtimeBackupService.js +284 -0
- package/dist/core/system/backup/runtimeBackupService.js.map +1 -0
- package/dist/core/system/config/configStore.d.ts +38 -0
- package/dist/core/system/config/configStore.js +672 -0
- package/dist/core/system/config/configStore.js.map +1 -0
- package/dist/core/system/policy/actorRulePolicy.d.ts +13 -0
- package/dist/core/system/policy/actorRulePolicy.js +87 -0
- package/dist/core/system/policy/actorRulePolicy.js.map +1 -0
- package/dist/core/system/policy/networkPolicy.d.ts +6 -0
- package/dist/core/system/policy/networkPolicy.js +71 -0
- package/dist/core/system/policy/networkPolicy.js.map +1 -0
- package/dist/core/system/policy/policyEngine.d.ts +22 -0
- package/dist/core/system/policy/policyEngine.js +41 -0
- package/dist/core/system/policy/policyEngine.js.map +1 -0
- package/dist/core/system/policy/policyProfile.d.ts +16 -0
- package/dist/core/system/policy/policyProfile.js +78 -0
- package/dist/core/system/policy/policyProfile.js.map +1 -0
- package/dist/core/system/policy/runtimeActionGuard.d.ts +24 -0
- package/dist/core/system/policy/runtimeActionGuard.js +64 -0
- package/dist/core/system/policy/runtimeActionGuard.js.map +1 -0
- package/dist/core/system/projection/managementReadModel/auditEvents.d.ts +9 -0
- package/dist/core/system/projection/managementReadModel/auditEvents.js +61 -0
- package/dist/core/system/projection/managementReadModel/auditEvents.js.map +1 -0
- package/dist/core/system/projection/managementReadModel/deps.d.ts +35 -0
- package/dist/core/system/projection/managementReadModel/deps.js +2 -0
- package/dist/core/system/projection/managementReadModel/deps.js.map +1 -0
- package/dist/core/system/projection/managementReadModel/objects/serviceObjects.d.ts +3 -0
- package/dist/core/system/projection/managementReadModel/objects/serviceObjects.js +129 -0
- package/dist/core/system/projection/managementReadModel/objects/serviceObjects.js.map +1 -0
- package/dist/core/system/projection/managementReadModel/pluginDiskRecords.d.ts +10 -0
- package/dist/core/system/projection/managementReadModel/pluginDiskRecords.js +55 -0
- package/dist/core/system/projection/managementReadModel/pluginDiskRecords.js.map +1 -0
- package/dist/core/system/projection/managementReadModel/providerAlignment.d.ts +7 -0
- package/dist/core/system/projection/managementReadModel/providerAlignment.js +48 -0
- package/dist/core/system/projection/managementReadModel/providerAlignment.js.map +1 -0
- package/dist/core/system/projection/managementReadModel/text.d.ts +1 -0
- package/dist/core/system/projection/managementReadModel/text.js +8 -0
- package/dist/core/system/projection/managementReadModel/text.js.map +1 -0
- package/dist/core/system/projection/managementReadModelService.d.ts +18 -0
- package/dist/core/system/projection/managementReadModelService.js +768 -0
- package/dist/core/system/projection/managementReadModelService.js.map +1 -0
- package/dist/core/system/projection/pendingRequestProjectionStore.d.ts +12 -0
- package/dist/core/system/projection/pendingRequestProjectionStore.js +113 -0
- package/dist/core/system/projection/pendingRequestProjectionStore.js.map +1 -0
- package/dist/core/system/projection/pendingRequestQuestions.d.ts +2 -0
- package/dist/core/system/projection/pendingRequestQuestions.js +51 -0
- package/dist/core/system/projection/pendingRequestQuestions.js.map +1 -0
- package/dist/core/system/projection/projectionStateStore.d.ts +17 -0
- package/dist/core/system/projection/projectionStateStore.js +60 -0
- package/dist/core/system/projection/projectionStateStore.js.map +1 -0
- package/dist/core/system/projection/runtimeActivityStore.d.ts +24 -0
- package/dist/core/system/projection/runtimeActivityStore.js +150 -0
- package/dist/core/system/projection/runtimeActivityStore.js.map +1 -0
- package/dist/core/system/projection/runtimeProjectionService.d.ts +41 -0
- package/dist/core/system/projection/runtimeProjectionService.js +209 -0
- package/dist/core/system/projection/runtimeProjectionService.js.map +1 -0
- package/dist/core/system/projection/runtimeReceiptStore.d.ts +11 -0
- package/dist/core/system/projection/runtimeReceiptStore.js +77 -0
- package/dist/core/system/projection/runtimeReceiptStore.js.map +1 -0
- package/dist/core/system/projection/runtimeReconciler.d.ts +25 -0
- package/dist/core/system/projection/runtimeReconciler.js +83 -0
- package/dist/core/system/projection/runtimeReconciler.js.map +1 -0
- package/dist/core/system/projection/runtimeSnapshotQuery.d.ts +46 -0
- package/dist/core/system/projection/runtimeSnapshotQuery.js +135 -0
- package/dist/core/system/projection/runtimeSnapshotQuery.js.map +1 -0
- package/dist/core/system/release/releaseArtifacts.d.ts +7 -0
- package/dist/core/system/release/releaseArtifacts.js +88 -0
- package/dist/core/system/release/releaseArtifacts.js.map +1 -0
- package/dist/core/system/release/runtimePackageLoadReport.d.ts +10 -0
- package/dist/core/system/release/runtimePackageLoadReport.js +31 -0
- package/dist/core/system/release/runtimePackageLoadReport.js.map +1 -0
- package/dist/core/system/state/canonicalEventLogStore.d.ts +16 -0
- package/dist/core/system/state/canonicalEventLogStore.js +156 -0
- package/dist/core/system/state/canonicalEventLogStore.js.map +1 -0
- package/dist/core/system/state/migrationRunner.d.ts +5 -0
- package/dist/core/system/state/migrationRunner.js +58 -0
- package/dist/core/system/state/migrationRunner.js.map +1 -0
- package/dist/core/system/state/safeJson.d.ts +8 -0
- package/dist/core/system/state/safeJson.js +36 -0
- package/dist/core/system/state/safeJson.js.map +1 -0
- package/dist/core/system/state/sqlite/connection.d.ts +2 -0
- package/dist/core/system/state/sqlite/connection.js +8 -0
- package/dist/core/system/state/sqlite/connection.js.map +1 -0
- package/dist/core/system/state/sqlite/domainEventLogRepository.d.ts +10 -0
- package/dist/core/system/state/sqlite/domainEventLogRepository.js +69 -0
- package/dist/core/system/state/sqlite/domainEventLogRepository.js.map +1 -0
- package/dist/core/system/state/sqlite/eventIntegrity.d.ts +6 -0
- package/dist/core/system/state/sqlite/eventIntegrity.js +7 -0
- package/dist/core/system/state/sqlite/eventIntegrity.js.map +1 -0
- package/dist/core/system/state/sqlite/managedSidecarRepository.d.ts +10 -0
- package/dist/core/system/state/sqlite/managedSidecarRepository.js +62 -0
- package/dist/core/system/state/sqlite/managedSidecarRepository.js.map +1 -0
- package/dist/core/system/state/sqlite/missionRepository.d.ts +24 -0
- package/dist/core/system/state/sqlite/missionRepository.js +252 -0
- package/dist/core/system/state/sqlite/missionRepository.js.map +1 -0
- package/dist/core/system/state/sqlite/orchestrationRepository.d.ts +20 -0
- package/dist/core/system/state/sqlite/orchestrationRepository.js +158 -0
- package/dist/core/system/state/sqlite/orchestrationRepository.js.map +1 -0
- package/dist/core/system/state/sqlite/pendingRequestRepository.d.ts +13 -0
- package/dist/core/system/state/sqlite/pendingRequestRepository.js +76 -0
- package/dist/core/system/state/sqlite/pendingRequestRepository.js.map +1 -0
- package/dist/core/system/state/sqlite/providerBindingRepository.d.ts +10 -0
- package/dist/core/system/state/sqlite/providerBindingRepository.js +58 -0
- package/dist/core/system/state/sqlite/providerBindingRepository.js.map +1 -0
- package/dist/core/system/state/sqlite/providerEventLogRepository.d.ts +10 -0
- package/dist/core/system/state/sqlite/providerEventLogRepository.js +77 -0
- package/dist/core/system/state/sqlite/providerEventLogRepository.js.map +1 -0
- package/dist/core/system/state/sqlite/rowMappers.d.ts +2 -0
- package/dist/core/system/state/sqlite/rowMappers.js +7 -0
- package/dist/core/system/state/sqlite/rowMappers.js.map +1 -0
- package/dist/core/system/state/sqlite/runtimeHistoryPruningRepository.d.ts +23 -0
- package/dist/core/system/state/sqlite/runtimeHistoryPruningRepository.js +82 -0
- package/dist/core/system/state/sqlite/runtimeHistoryPruningRepository.js.map +1 -0
- package/dist/core/system/state/sqlite/runtimeReceiptRepository.d.ts +9 -0
- package/dist/core/system/state/sqlite/runtimeReceiptRepository.js +47 -0
- package/dist/core/system/state/sqlite/runtimeReceiptRepository.js.map +1 -0
- package/dist/core/system/state/sqlite/sessionMetadataRepository.d.ts +7 -0
- package/dist/core/system/state/sqlite/sessionMetadataRepository.js +25 -0
- package/dist/core/system/state/sqlite/sessionMetadataRepository.js.map +1 -0
- package/dist/core/system/state/sqlite/sessionRepository.d.ts +12 -0
- package/dist/core/system/state/sqlite/sessionRepository.js +72 -0
- package/dist/core/system/state/sqlite/sessionRepository.js.map +1 -0
- package/dist/core/system/state/sqlite/types.d.ts +140 -0
- package/dist/core/system/state/sqlite/types.js +113 -0
- package/dist/core/system/state/sqlite/types.js.map +1 -0
- package/dist/core/system/state/sqliteSessionStore.d.ts +86 -0
- package/dist/core/system/state/sqliteSessionStore.js +210 -0
- package/dist/core/system/state/sqliteSessionStore.js.map +1 -0
- package/dist/core/system/state/sqliteSupport.d.ts +4 -0
- package/dist/core/system/state/sqliteSupport.js +32 -0
- package/dist/core/system/state/sqliteSupport.js.map +1 -0
- package/dist/core/system/vcs/gitCheckpointService.d.ts +11 -0
- package/dist/core/system/vcs/gitCheckpointService.js +32 -0
- package/dist/core/system/vcs/gitCheckpointService.js.map +1 -0
- package/dist/core/system/vcs/gitCommitParser.d.ts +3 -0
- package/dist/core/system/vcs/gitCommitParser.js +55 -0
- package/dist/core/system/vcs/gitCommitParser.js.map +1 -0
- package/dist/core/system/vcs/gitDiffFormatter.d.ts +1 -0
- package/dist/core/system/vcs/gitDiffFormatter.js +4 -0
- package/dist/core/system/vcs/gitDiffFormatter.js.map +1 -0
- package/dist/core/system/vcs/gitHistoryService.d.ts +46 -0
- package/dist/core/system/vcs/gitHistoryService.js +277 -0
- package/dist/core/system/vcs/gitHistoryService.js.map +1 -0
- package/dist/core/system/vcs/gitIgnoreTemplate.d.ts +1 -0
- package/dist/core/system/vcs/gitIgnoreTemplate.js +12 -0
- package/dist/core/system/vcs/gitIgnoreTemplate.js.map +1 -0
- package/dist/core/system/vcs/gitRepoStore.d.ts +12 -0
- package/dist/core/system/vcs/gitRepoStore.js +46 -0
- package/dist/core/system/vcs/gitRepoStore.js.map +1 -0
- package/dist/core/system/vcs/gitTrackedPaths.d.ts +6 -0
- package/dist/core/system/vcs/gitTrackedPaths.js +80 -0
- package/dist/core/system/vcs/gitTrackedPaths.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/types/app.d.ts +444 -0
- package/dist/types/app.js +2 -0
- package/dist/types/app.js.map +1 -0
- package/dist/types/config.d.ts +188 -0
- package/dist/types/config.js +422 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/distro.d.ts +1 -0
- package/dist/types/distro.js +2 -0
- package/dist/types/distro.js.map +1 -0
- package/dist/types/history.d.ts +43 -0
- package/dist/types/history.js +2 -0
- package/dist/types/history.js.map +1 -0
- package/dist/types/package.d.ts +61 -0
- package/dist/types/package.js +2 -0
- package/dist/types/package.js.map +1 -0
- package/dist/types/plugin.d.ts +1 -0
- package/dist/types/plugin.js +2 -0
- package/dist/types/plugin.js.map +1 -0
- package/dist/types/provider.d.ts +2 -0
- package/dist/types/provider.js +2 -0
- package/dist/types/provider.js.map +1 -0
- package/dist/types/release.d.ts +24 -0
- package/dist/types/release.js +2 -0
- package/dist/types/release.js.map +1 -0
- package/dist/types/runtime.d.ts +2 -0
- package/dist/types/runtime.js +2 -0
- package/dist/types/runtime.js.map +1 -0
- package/dist/types/skill.d.ts +1 -0
- package/dist/types/skill.js +2 -0
- package/dist/types/skill.js.map +1 -0
- package/dist/types/transport.d.ts +2 -0
- package/dist/types/transport.js +2 -0
- package/dist/types/transport.js.map +1 -0
- package/package.json +62 -0
- package/resources/migrations/001_sessions.sql +59 -0
- package/resources/migrations/002_pending_request_metadata.sql +2 -0
- package/resources/migrations/003_provider_projections.sql +38 -0
- package/resources/migrations/004_runtime_projection_state.sql +22 -0
- package/resources/migrations/005_runtime_robustness.sql +3 -0
- package/resources/migrations/006_provider_autostart.sql +1 -0
- package/resources/migrations/007_missions.sql +41 -0
- package/resources/migrations/008_mission_schedule_anchor.sql +5 -0
- package/resources/migrations/009_session_orchestration.sql +26 -0
- package/resources/migrations/010_mission_archival.sql +1 -0
- package/resources/migrations/011_managed_sidecars.sql +29 -0
- package/resources/migrations/012_scope_space_terminology.sql +19 -0
- package/resources/migrations/013_orchestration_dedupe.sql +5 -0
- package/resources/migrations/014_orchestration_execution_claims.sql +13 -0
- package/resources/migrations/015_mission_schedule_meta.sql +9 -0
- package/resources/migrations/016_mission_hook_bindings.sql +16 -0
- package/resources/migrations/017_domain_event_provenance.sql +1 -0
- package/resources/migrations/018_provider_event_processing.sql +8 -0
- package/resources/official-catalog.json +444 -0
- package/resources/policies/default-secure.json +160 -0
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { join, resolve } from 'node:path';
|
|
3
|
+
import { gitHistoryLogFormat, parseGitHistoryLog } from './gitCommitParser.js';
|
|
4
|
+
import { formatGitDiffOutput } from './gitDiffFormatter.js';
|
|
5
|
+
import { moorlineGitIgnoreTemplate } from './gitIgnoreTemplate.js';
|
|
6
|
+
import { GitRepoStore } from './gitRepoStore.js';
|
|
7
|
+
import { ensureTrackedTargets, existingTrackedRoots, isTrackedRelativePath, normalizeRepoRelativePath } from './gitTrackedPaths.js';
|
|
8
|
+
function commitMessage(input) {
|
|
9
|
+
return [
|
|
10
|
+
input.title,
|
|
11
|
+
'',
|
|
12
|
+
`Moorline-Kind: ${input.kind}`,
|
|
13
|
+
`Moorline-Actor: ${input.actor}`,
|
|
14
|
+
`Moorline-Reason: ${input.reason}`,
|
|
15
|
+
`Moorline-Targets: ${input.targets.join(',')}`,
|
|
16
|
+
`Moorline-Operation: ${input.operation}`
|
|
17
|
+
].join('\n');
|
|
18
|
+
}
|
|
19
|
+
function trackedStatusEntries(repo, homeRoot, paths) {
|
|
20
|
+
if (paths.length === 0) {
|
|
21
|
+
return [];
|
|
22
|
+
}
|
|
23
|
+
const output = repo.run(homeRoot, ['status', '--porcelain=v1', '--untracked-files=all', '--', ...paths], {
|
|
24
|
+
allowFailure: true
|
|
25
|
+
});
|
|
26
|
+
return output
|
|
27
|
+
.split('\n')
|
|
28
|
+
.map((line) => line.trimEnd())
|
|
29
|
+
.filter(Boolean);
|
|
30
|
+
}
|
|
31
|
+
function trackedDirtyPaths(repo, homeRoot, paths) {
|
|
32
|
+
const entries = trackedStatusEntries(repo, homeRoot, paths ?? existingTrackedRoots(homeRoot));
|
|
33
|
+
return [...new Set(entries.map((line) => line.slice(3).trim()).filter((line) => isTrackedRelativePath(line)))].sort();
|
|
34
|
+
}
|
|
35
|
+
export class GitHistoryService {
|
|
36
|
+
repo;
|
|
37
|
+
constructor(repo = new GitRepoStore()) {
|
|
38
|
+
this.repo = repo;
|
|
39
|
+
}
|
|
40
|
+
ensureGitAvailable() {
|
|
41
|
+
if (!this.repo.isGitAvailable()) {
|
|
42
|
+
throw new Error('Git is not installed; local history features are unavailable.');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
ensureRepoRoot(homeRoot) {
|
|
46
|
+
this.repo.ensureDir(homeRoot);
|
|
47
|
+
const ignorePath = join(homeRoot, '.gitignore');
|
|
48
|
+
const nextIgnore = moorlineGitIgnoreTemplate();
|
|
49
|
+
const currentIgnore = this.repo.readFile(ignorePath);
|
|
50
|
+
if (currentIgnore !== nextIgnore) {
|
|
51
|
+
writeFileSync(ignorePath, nextIgnore, 'utf8');
|
|
52
|
+
}
|
|
53
|
+
if (!this.repo.hasRepo(homeRoot)) {
|
|
54
|
+
try {
|
|
55
|
+
this.repo.run(homeRoot, ['init', '-b', 'main']);
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
this.repo.run(homeRoot, ['init']);
|
|
59
|
+
this.repo.run(homeRoot, ['symbolic-ref', 'HEAD', 'refs/heads/main'], { allowFailure: true });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
this.repo.run(homeRoot, ['config', 'user.name', 'Moorline'], { allowFailure: true });
|
|
63
|
+
this.repo.run(homeRoot, ['config', 'user.email', 'moorline@local.invalid'], { allowFailure: true });
|
|
64
|
+
}
|
|
65
|
+
createCommit(homeRoot, input) {
|
|
66
|
+
const targets = ensureTrackedTargets(homeRoot, input.targets);
|
|
67
|
+
if (targets.length === 0) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
const dirtyPaths = trackedDirtyPaths(this.repo, homeRoot, targets);
|
|
71
|
+
if (dirtyPaths.length === 0) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
this.repo.run(homeRoot, ['add', '--all', '--', ...dirtyPaths]);
|
|
75
|
+
this.repo.run(homeRoot, ['commit', '--no-gpg-sign', '-m', commitMessage({ ...input, targets })]);
|
|
76
|
+
return this.listSync(homeRoot, 1)[0] ?? null;
|
|
77
|
+
}
|
|
78
|
+
initializeOrMigrateRepo(homeRoot) {
|
|
79
|
+
this.ensureRepoRoot(homeRoot);
|
|
80
|
+
const runtimeGitDir = join(homeRoot, 'runtime', '.git');
|
|
81
|
+
const hasHead = this.repo.run(homeRoot, ['rev-parse', '--verify', 'HEAD'], { allowFailure: true }).trim().length > 0;
|
|
82
|
+
if (!hasHead) {
|
|
83
|
+
const initialTargets = existingTrackedRoots(homeRoot);
|
|
84
|
+
const ignorePath = join(homeRoot, '.gitignore');
|
|
85
|
+
const dirty = trackedDirtyPaths(this.repo, homeRoot, ['config.json', 'runtime/packages', 'runtime/policies']);
|
|
86
|
+
if (dirty.length > 0 || existsSync(ignorePath)) {
|
|
87
|
+
this.repo.run(homeRoot, ['add', '--all', '--', '.gitignore', ...initialTargets]);
|
|
88
|
+
this.repo.run(homeRoot, [
|
|
89
|
+
'commit',
|
|
90
|
+
'--no-gpg-sign',
|
|
91
|
+
'-m',
|
|
92
|
+
commitMessage({
|
|
93
|
+
kind: 'snapshot',
|
|
94
|
+
title: existsSync(runtimeGitDir) ? 'snapshot: migrate runtime git repo to home root' : 'snapshot: initialize Moorline local history',
|
|
95
|
+
actor: 'system:moorline-history',
|
|
96
|
+
reason: existsSync(runtimeGitDir) ? 'Move Moorline history to the home root.' : 'Initialize Moorline local history.',
|
|
97
|
+
operation: existsSync(runtimeGitDir) ? 'history.migrate' : 'history.initialize',
|
|
98
|
+
targets: initialTargets.length > 0 ? initialTargets : ['config.json']
|
|
99
|
+
})
|
|
100
|
+
]);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (existsSync(runtimeGitDir)) {
|
|
104
|
+
this.repo.remove(runtimeGitDir);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
ensureInitializedSync(homeRoot) {
|
|
108
|
+
if (!this.repo.isGitAvailable()) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const normalized = resolve(homeRoot);
|
|
112
|
+
mkdirSync(normalized, { recursive: true });
|
|
113
|
+
this.initializeOrMigrateRepo(normalized);
|
|
114
|
+
}
|
|
115
|
+
async ensureInitialized(homeRoot) {
|
|
116
|
+
this.ensureInitializedSync(homeRoot);
|
|
117
|
+
}
|
|
118
|
+
statusSync(homeRoot) {
|
|
119
|
+
const normalized = resolve(homeRoot);
|
|
120
|
+
if (!this.repo.isGitAvailable()) {
|
|
121
|
+
return {
|
|
122
|
+
gitAvailable: false,
|
|
123
|
+
repoInitialized: false,
|
|
124
|
+
homeRoot: normalized,
|
|
125
|
+
branch: null,
|
|
126
|
+
dirtyPaths: [],
|
|
127
|
+
lastEntry: null
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
if (!this.repo.hasRepo(normalized)) {
|
|
131
|
+
return {
|
|
132
|
+
gitAvailable: true,
|
|
133
|
+
repoInitialized: false,
|
|
134
|
+
homeRoot: normalized,
|
|
135
|
+
branch: null,
|
|
136
|
+
dirtyPaths: [],
|
|
137
|
+
lastEntry: null
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
const branch = this.repo.run(normalized, ['branch', '--show-current'], { allowFailure: true }).trim() || null;
|
|
141
|
+
const dirtyPaths = trackedDirtyPaths(this.repo, normalized);
|
|
142
|
+
return {
|
|
143
|
+
gitAvailable: true,
|
|
144
|
+
repoInitialized: true,
|
|
145
|
+
homeRoot: normalized,
|
|
146
|
+
branch,
|
|
147
|
+
dirtyPaths,
|
|
148
|
+
lastEntry: this.listSync(normalized, 1)[0] ?? null
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
async status(homeRoot) {
|
|
152
|
+
return this.statusSync(homeRoot);
|
|
153
|
+
}
|
|
154
|
+
listSync(homeRoot, limit = 30) {
|
|
155
|
+
const normalized = resolve(homeRoot);
|
|
156
|
+
if (!this.repo.isGitAvailable() || !this.repo.hasRepo(normalized)) {
|
|
157
|
+
return [];
|
|
158
|
+
}
|
|
159
|
+
const raw = this.repo.run(normalized, ['log', `--max-count=${limit}`, `--format=${gitHistoryLogFormat()}`], { allowFailure: true });
|
|
160
|
+
return parseGitHistoryLog(raw);
|
|
161
|
+
}
|
|
162
|
+
async list(homeRoot, limit = 30) {
|
|
163
|
+
return this.listSync(homeRoot, limit);
|
|
164
|
+
}
|
|
165
|
+
showSync(homeRoot, commitish) {
|
|
166
|
+
const normalized = resolve(homeRoot);
|
|
167
|
+
this.ensureGitAvailable();
|
|
168
|
+
const stat = this.repo.run(normalized, ['show', '--stat', '--format=fuller', commitish]);
|
|
169
|
+
const entry = this.repo.run(normalized, ['log', '-1', `--format=${gitHistoryLogFormat()}`, commitish], { allowFailure: true });
|
|
170
|
+
return {
|
|
171
|
+
entry: parseGitHistoryLog(entry)[0] ?? null,
|
|
172
|
+
stat: stat.trimEnd()
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
createCheckpointSync(input) {
|
|
176
|
+
this.ensureInitializedSync(input.homeRoot);
|
|
177
|
+
if (!this.repo.isGitAvailable() || !this.repo.hasRepo(input.homeRoot)) {
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
180
|
+
return this.createCommit(resolve(input.homeRoot), {
|
|
181
|
+
kind: 'checkpoint',
|
|
182
|
+
title: `checkpoint: ${input.operation}`,
|
|
183
|
+
actor: input.actor,
|
|
184
|
+
reason: input.reason,
|
|
185
|
+
operation: input.operation,
|
|
186
|
+
targets: input.targets
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
async createCheckpoint(input) {
|
|
190
|
+
return this.createCheckpointSync(input);
|
|
191
|
+
}
|
|
192
|
+
createSnapshotSync(input) {
|
|
193
|
+
this.ensureInitializedSync(input.homeRoot);
|
|
194
|
+
if (!this.repo.isGitAvailable() || !this.repo.hasRepo(input.homeRoot)) {
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
return this.createCommit(resolve(input.homeRoot), {
|
|
198
|
+
kind: 'snapshot',
|
|
199
|
+
title: `snapshot: ${input.label}`,
|
|
200
|
+
actor: input.actor,
|
|
201
|
+
reason: input.reason ?? input.label,
|
|
202
|
+
operation: 'history.snapshot',
|
|
203
|
+
targets: existingTrackedRoots(input.homeRoot)
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
async createSnapshot(input) {
|
|
207
|
+
return this.createSnapshotSync(input);
|
|
208
|
+
}
|
|
209
|
+
diffSync(input) {
|
|
210
|
+
const normalized = resolve(input.homeRoot);
|
|
211
|
+
this.ensureGitAvailable();
|
|
212
|
+
if (!this.repo.hasRepo(normalized)) {
|
|
213
|
+
return '';
|
|
214
|
+
}
|
|
215
|
+
const args = ['diff', '--no-color'];
|
|
216
|
+
if (input.from && input.to) {
|
|
217
|
+
args.push(input.from, input.to);
|
|
218
|
+
}
|
|
219
|
+
else if (input.from) {
|
|
220
|
+
args.push(input.from);
|
|
221
|
+
}
|
|
222
|
+
if (input.path) {
|
|
223
|
+
args.push('--', normalizeRepoRelativePath(input.path));
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
const roots = existingTrackedRoots(normalized);
|
|
227
|
+
if (roots.length > 0) {
|
|
228
|
+
args.push('--', ...roots);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return formatGitDiffOutput(this.repo.run(normalized, args, { allowFailure: true }));
|
|
232
|
+
}
|
|
233
|
+
async diff(input) {
|
|
234
|
+
return this.diffSync(input);
|
|
235
|
+
}
|
|
236
|
+
restoreSync(input) {
|
|
237
|
+
const normalized = resolve(input.homeRoot);
|
|
238
|
+
this.ensureGitAvailable();
|
|
239
|
+
this.ensureInitializedSync(normalized);
|
|
240
|
+
const targets = ensureTrackedTargets(normalized, input.paths);
|
|
241
|
+
if (targets.length === 0) {
|
|
242
|
+
throw new Error('No tracked paths are available to restore.');
|
|
243
|
+
}
|
|
244
|
+
this.repo.run(normalized, ['restore', '--source', input.commitish, '--worktree', '--', ...targets]);
|
|
245
|
+
const restored = this.createCommit(normalized, {
|
|
246
|
+
kind: 'snapshot',
|
|
247
|
+
title: `snapshot: restore ${input.commitish.slice(0, 7)}`,
|
|
248
|
+
actor: input.actor,
|
|
249
|
+
reason: input.reason ?? `Restore tracked files from ${input.commitish}.`,
|
|
250
|
+
operation: 'history.restore',
|
|
251
|
+
targets
|
|
252
|
+
});
|
|
253
|
+
if (!restored) {
|
|
254
|
+
throw new Error('Restore did not change any tracked files.');
|
|
255
|
+
}
|
|
256
|
+
return restored;
|
|
257
|
+
}
|
|
258
|
+
async restore(input) {
|
|
259
|
+
return this.restoreSync(input);
|
|
260
|
+
}
|
|
261
|
+
discardSync(input) {
|
|
262
|
+
const normalized = resolve(input.homeRoot);
|
|
263
|
+
this.ensureGitAvailable();
|
|
264
|
+
if (!this.repo.hasRepo(normalized)) {
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
const targets = ensureTrackedTargets(normalized, input.paths);
|
|
268
|
+
if (targets.length === 0) {
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
this.repo.run(normalized, ['restore', '--worktree', '--', ...targets], { allowFailure: true });
|
|
272
|
+
}
|
|
273
|
+
async discard(input) {
|
|
274
|
+
this.discardSync(input);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
//# sourceMappingURL=gitHistoryService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitHistoryService.js","sourceRoot":"","sources":["../../../../../../../src/core/system/vcs/gitHistoryService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEpI,SAAS,aAAa,CAAC,KAOtB;IACC,OAAO;QACL,KAAK,CAAC,KAAK;QACX,EAAE;QACF,kBAAkB,KAAK,CAAC,IAAI,EAAE;QAC9B,mBAAmB,KAAK,CAAC,KAAK,EAAE;QAChC,oBAAoB,KAAK,CAAC,MAAM,EAAE;QAClC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,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function moorlineGitIgnoreTemplate(): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function moorlineGitIgnoreTemplate() {
|
|
2
|
+
return [
|
|
3
|
+
'config.secrets.json',
|
|
4
|
+
'runtime/chat/',
|
|
5
|
+
'runtime/logs/',
|
|
6
|
+
'runtime/memory/',
|
|
7
|
+
'runtime/state/',
|
|
8
|
+
'runtime/state.db',
|
|
9
|
+
'runtime/workspaces/'
|
|
10
|
+
].join('\n') + '\n';
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=gitIgnoreTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitIgnoreTemplate.js","sourceRoot":"","sources":["../../../../../../../src/core/system/vcs/gitIgnoreTemplate.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,yBAAyB;IACvC,OAAO;QACL,qBAAqB;QACrB,eAAe;QACf,eAAe;QACf,iBAAiB;QACjB,gBAAgB;QAChB,kBAAkB;QAClB,qBAAqB;KACtB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class GitRepoStore {
|
|
2
|
+
isGitAvailable(): boolean;
|
|
3
|
+
hasRepo(root: string): boolean;
|
|
4
|
+
run(root: string, args: string[], options?: {
|
|
5
|
+
allowFailure?: boolean;
|
|
6
|
+
stdio?: 'pipe' | 'ignore';
|
|
7
|
+
}): string;
|
|
8
|
+
ensureDir(path: string): void;
|
|
9
|
+
readFile(path: string): string | null;
|
|
10
|
+
writeFile(path: string, body: string): void;
|
|
11
|
+
remove(path: string): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
|
+
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import { dirname, join, resolve } from 'node:path';
|
|
4
|
+
export class GitRepoStore {
|
|
5
|
+
isGitAvailable() {
|
|
6
|
+
try {
|
|
7
|
+
execFileSync('git', ['--version'], { stdio: 'ignore' });
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
hasRepo(root) {
|
|
15
|
+
return existsSync(join(resolve(root), '.git'));
|
|
16
|
+
}
|
|
17
|
+
run(root, args, options = {}) {
|
|
18
|
+
try {
|
|
19
|
+
return execFileSync('git', args, {
|
|
20
|
+
cwd: resolve(root),
|
|
21
|
+
encoding: 'utf8',
|
|
22
|
+
stdio: ['ignore', options.stdio ?? 'pipe', 'pipe']
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
if (options.allowFailure) {
|
|
27
|
+
return '';
|
|
28
|
+
}
|
|
29
|
+
throw error;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
ensureDir(path) {
|
|
33
|
+
mkdirSync(resolve(path), { recursive: true });
|
|
34
|
+
}
|
|
35
|
+
readFile(path) {
|
|
36
|
+
return existsSync(path) ? readFileSync(path, 'utf8') : null;
|
|
37
|
+
}
|
|
38
|
+
writeFile(path, body) {
|
|
39
|
+
mkdirSync(dirname(resolve(path)), { recursive: true });
|
|
40
|
+
writeFileSync(path, body, 'utf8');
|
|
41
|
+
}
|
|
42
|
+
remove(path) {
|
|
43
|
+
rmSync(path, { recursive: true, force: true });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=gitRepoStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitRepoStore.js","sourceRoot":"","sources":["../../../../../../../src/core/system/vcs/gitRepoStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,SAAS,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C;IAC9D,CAAC;IAED,SAAS,CAAC,IAAY,EAAE,IAAY;QAClC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACvD,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,IAAY;QACjB,MAAM,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACjD,CAAC;CACF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function normalizeRepoRelativePath(value: string): string;
|
|
2
|
+
export declare function isTrackedRelativePath(value: string): boolean;
|
|
3
|
+
export declare function existingTrackedRoots(homeRoot: string): string[];
|
|
4
|
+
export declare function ensureTrackedTargets(homeRoot: string, targets?: string[]): string[];
|
|
5
|
+
export declare function toTrackedRelativeTargets(homeRoot: string, targets: string[]): string[];
|
|
6
|
+
export declare function configPathUnderHome(homeRoot: string, configPath: string): string | null;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { relative, resolve } from 'node:path';
|
|
3
|
+
const TRACKED_ROOTS = [
|
|
4
|
+
'config.json',
|
|
5
|
+
'runtime/packages',
|
|
6
|
+
'runtime/policies'
|
|
7
|
+
];
|
|
8
|
+
const IGNORED_ROOTS = [
|
|
9
|
+
'config.secrets.json',
|
|
10
|
+
'runtime/chat',
|
|
11
|
+
'runtime/logs',
|
|
12
|
+
'runtime/memory',
|
|
13
|
+
'runtime/state',
|
|
14
|
+
'runtime/state.db',
|
|
15
|
+
'runtime/workspaces'
|
|
16
|
+
];
|
|
17
|
+
function normalizeSeparators(value) {
|
|
18
|
+
return value.replaceAll('\\', '/').replace(/^\/+/, '').replace(/\/+/g, '/');
|
|
19
|
+
}
|
|
20
|
+
function trackedRoots() {
|
|
21
|
+
return [...TRACKED_ROOTS];
|
|
22
|
+
}
|
|
23
|
+
function ignoredRoots() {
|
|
24
|
+
return [...IGNORED_ROOTS];
|
|
25
|
+
}
|
|
26
|
+
export function normalizeRepoRelativePath(value) {
|
|
27
|
+
const normalized = normalizeSeparators(value.trim());
|
|
28
|
+
if (!normalized || normalized === '.' || normalized.startsWith('../') || normalized === '..') {
|
|
29
|
+
throw new Error(`Path is outside the Moorline home root: ${value}`);
|
|
30
|
+
}
|
|
31
|
+
return normalized;
|
|
32
|
+
}
|
|
33
|
+
function toRepoRelativePath(homeRoot, targetPath) {
|
|
34
|
+
const absoluteHome = resolve(homeRoot);
|
|
35
|
+
const absoluteTarget = resolve(targetPath);
|
|
36
|
+
const repoRelative = normalizeSeparators(relative(absoluteHome, absoluteTarget));
|
|
37
|
+
if (!repoRelative || repoRelative === '.' || repoRelative.startsWith('../') || repoRelative === '..') {
|
|
38
|
+
throw new Error(`Path is outside the Moorline home root: ${targetPath}`);
|
|
39
|
+
}
|
|
40
|
+
return repoRelative;
|
|
41
|
+
}
|
|
42
|
+
function isIgnoredRelativePath(value) {
|
|
43
|
+
const normalized = normalizeRepoRelativePath(value);
|
|
44
|
+
return ignoredRoots().some((entry) => normalized === entry || normalized.startsWith(`${entry}/`));
|
|
45
|
+
}
|
|
46
|
+
export function isTrackedRelativePath(value) {
|
|
47
|
+
const normalized = normalizeRepoRelativePath(value);
|
|
48
|
+
if (isIgnoredRelativePath(normalized)) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
return trackedRoots().some((entry) => normalized === entry || normalized.startsWith(`${entry}/`));
|
|
52
|
+
}
|
|
53
|
+
function validateTrackedRelativePath(value) {
|
|
54
|
+
const normalized = normalizeRepoRelativePath(value);
|
|
55
|
+
if (!isTrackedRelativePath(normalized)) {
|
|
56
|
+
throw new Error(`Path is not part of tracked Moorline history: ${value}`);
|
|
57
|
+
}
|
|
58
|
+
return normalized;
|
|
59
|
+
}
|
|
60
|
+
export function existingTrackedRoots(homeRoot) {
|
|
61
|
+
return trackedRoots().filter((entry) => existsSync(resolve(homeRoot, entry)));
|
|
62
|
+
}
|
|
63
|
+
export function ensureTrackedTargets(homeRoot, targets) {
|
|
64
|
+
if (!targets || targets.length === 0) {
|
|
65
|
+
return existingTrackedRoots(homeRoot);
|
|
66
|
+
}
|
|
67
|
+
const resolved = targets.map((entry) => validateTrackedRelativePath(entry));
|
|
68
|
+
return [...new Set(resolved)];
|
|
69
|
+
}
|
|
70
|
+
export function toTrackedRelativeTargets(homeRoot, targets) {
|
|
71
|
+
return [...new Set(targets.map((entry) => validateTrackedRelativePath(toRepoRelativePath(homeRoot, entry))))];
|
|
72
|
+
}
|
|
73
|
+
export function configPathUnderHome(homeRoot, configPath) {
|
|
74
|
+
const relativeConfigPath = normalizeSeparators(relative(resolve(homeRoot), resolve(configPath)));
|
|
75
|
+
if (relativeConfigPath === 'config.json') {
|
|
76
|
+
return 'config.json';
|
|
77
|
+
}
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=gitTrackedPaths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitTrackedPaths.js","sourceRoot":"","sources":["../../../../../../../src/core/system/vcs/gitTrackedPaths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,aAAa,GAAG;IACpB,aAAa;IACb,kBAAkB;IAClB,kBAAkB;CACV,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,qBAAqB;IACrB,cAAc;IACd,cAAc;IACd,gBAAgB;IAChB,eAAe;IACf,kBAAkB;IAClB,oBAAoB;CACZ,CAAC;AAEX,SAAS,mBAAmB,CAAC,KAAa;IACxC,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,E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AAChC,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,QAAgB,EAAE,OAAiB;IAC1E,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,2BAA2B,CAAC,kBAAkB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChH,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,QAAgB,EAAE,UAAkB;IACtE,MAAM,kBAAkB,GAAG,mBAAmB,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACjG,IAAI,kBAAkB,KAAK,aAAa,EAAE,CAAC;QACzC,OAAO,aAAa,CAAC;IACvB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ControlPlane as MoorlineControlPlane } from './app/control-api/services/controlPlane.js';
|
|
2
|
+
export { MoorlineRuntime } from './core/runtime/moorlineRuntime.js';
|
|
3
|
+
export * from './core/system/config/configStore.js';
|
|
4
|
+
export * from './types/config.js';
|
|
5
|
+
export * from './types/package.js';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ControlPlane as MoorlineControlPlane } from './app/control-api/services/controlPlane.js';
|
|
2
|
+
export { MoorlineRuntime } from './core/runtime/moorlineRuntime.js';
|
|
3
|
+
export * from './core/system/config/configStore.js';
|
|
4
|
+
export * from './types/config.js';
|
|
5
|
+
export * from './types/package.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,cAAc,qCAAqC,CAAC;AACpD,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
|