@noopolis/daimon 0.1.1 → 0.2.0
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 +307 -45
- package/dist/contracts/attentionContract.d.ts +117 -0
- package/dist/contracts/attentionContract.d.ts.map +1 -0
- package/dist/contracts/attentionContract.js +14 -0
- package/dist/contracts/canonicalJson.d.ts +3 -0
- package/dist/contracts/canonicalJson.d.ts.map +1 -0
- package/dist/contracts/canonicalJson.js +54 -0
- package/dist/contracts/grokWorkerContract.d.ts +74 -0
- package/dist/contracts/grokWorkerContract.d.ts.map +1 -0
- package/dist/contracts/grokWorkerContract.js +88 -0
- package/dist/contracts/organizationRuntimeContract.d.ts +765 -0
- package/dist/contracts/organizationRuntimeContract.d.ts.map +1 -0
- package/dist/contracts/organizationRuntimeContract.js +121 -0
- package/dist/contracts/runtimeContractManifest.d.ts +1615 -0
- package/dist/contracts/runtimeContractManifest.d.ts.map +1 -0
- package/dist/contracts/runtimeContractManifest.js +181 -0
- package/dist/core/credentialRedaction.d.ts +4 -0
- package/dist/core/credentialRedaction.d.ts.map +1 -0
- package/dist/core/credentialRedaction.js +28 -0
- package/dist/core/siblingBuildFreshness.d.ts +21 -0
- package/dist/core/siblingBuildFreshness.d.ts.map +1 -0
- package/dist/core/siblingBuildFreshness.js +25 -0
- package/dist/core/types.d.ts +10 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/examples/exampleCausalId.d.ts +3 -0
- package/dist/examples/exampleCausalId.d.ts.map +1 -0
- package/dist/examples/exampleCausalId.js +8 -0
- package/dist/examples/jungian-play-org.js +3 -2
- package/dist/examples/jungian-triad-org.js +3 -2
- package/dist/examples/jungianPlayAgent.d.ts +1 -1
- package/dist/examples/jungianPlayAgent.d.ts.map +1 -1
- package/dist/examples/jungianPlayAgent.js +1 -1
- package/dist/examples/jungianProfiles.d.ts +1 -1
- package/dist/examples/jungianProfiles.d.ts.map +1 -1
- package/dist/examples/jungianTriadProfiles.d.ts +1 -1
- package/dist/examples/jungianTriadProfiles.d.ts.map +1 -1
- package/dist/examples/pi-agent.js +3 -2
- package/dist/examples/pi-memory-org.js +6 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/mcp/toolServer.d.ts +31 -0
- package/dist/mcp/toolServer.d.ts.map +1 -0
- package/dist/mcp/toolServer.js +145 -0
- package/dist/observability/causalEvents.d.ts +118 -0
- package/dist/observability/causalEvents.d.ts.map +1 -0
- package/dist/observability/causalEvents.js +223 -0
- package/dist/observability/controlCausal.d.ts +117 -0
- package/dist/observability/controlCausal.d.ts.map +1 -0
- package/dist/observability/controlCausal.js +107 -0
- package/dist/observability/emitCausalFixture.d.ts +25 -0
- package/dist/observability/emitCausalFixture.d.ts.map +1 -0
- package/dist/observability/emitCausalFixture.js +98 -0
- package/dist/observability/index.d.ts +2 -0
- package/dist/observability/index.d.ts.map +1 -1
- package/dist/observability/index.js +2 -0
- package/dist/observability/orgObserver.d.ts.map +1 -1
- package/dist/observability/orgObserver.js +3 -3
- package/dist/pi/agyHeadlessResult.d.ts +60 -0
- package/dist/pi/agyHeadlessResult.d.ts.map +1 -0
- package/dist/pi/agyHeadlessResult.js +95 -0
- package/dist/pi/cliChildOutput.d.ts +67 -0
- package/dist/pi/cliChildOutput.d.ts.map +1 -0
- package/dist/pi/cliChildOutput.js +269 -0
- package/dist/pi/cliEngineRun.d.ts +16 -0
- package/dist/pi/cliEngineRun.d.ts.map +1 -0
- package/dist/pi/cliEngineRun.js +27 -0
- package/dist/pi/cliEngineSpawn.d.ts +55 -0
- package/dist/pi/cliEngineSpawn.d.ts.map +1 -0
- package/dist/pi/cliEngineSpawn.js +164 -0
- package/dist/pi/cliEnvironment.d.ts +12 -0
- package/dist/pi/cliEnvironment.d.ts.map +1 -0
- package/dist/pi/cliEnvironment.js +32 -0
- package/dist/pi/cliMcpRegistration.d.ts +61 -0
- package/dist/pi/cliMcpRegistration.d.ts.map +1 -0
- package/dist/pi/cliMcpRegistration.js +75 -0
- package/dist/pi/cliProcess.d.ts +7 -0
- package/dist/pi/cliProcess.d.ts.map +1 -0
- package/dist/pi/cliProcess.js +132 -0
- package/dist/pi/cliSession.d.ts +106 -0
- package/dist/pi/cliSession.d.ts.map +1 -0
- package/dist/pi/cliSession.js +379 -0
- package/dist/pi/cliTurnMetering.d.ts +60 -0
- package/dist/pi/cliTurnMetering.d.ts.map +1 -0
- package/dist/pi/cliTurnMetering.js +60 -0
- package/dist/pi/codexFilesystemRules.d.ts +3 -0
- package/dist/pi/codexFilesystemRules.d.ts.map +1 -0
- package/dist/pi/codexFilesystemRules.js +28 -0
- package/dist/pi/codexHeadlessResult.d.ts +68 -0
- package/dist/pi/codexHeadlessResult.d.ts.map +1 -0
- package/dist/pi/codexHeadlessResult.js +122 -0
- package/dist/pi/codexRolloutUsage.d.ts +95 -0
- package/dist/pi/codexRolloutUsage.d.ts.map +1 -0
- package/dist/pi/codexRolloutUsage.js +221 -0
- package/dist/pi/engineWakeLimits.d.ts +39 -0
- package/dist/pi/engineWakeLimits.d.ts.map +1 -0
- package/dist/pi/engineWakeLimits.js +55 -0
- package/dist/pi/grokHeadlessResult.d.ts +36 -0
- package/dist/pi/grokHeadlessResult.d.ts.map +1 -0
- package/dist/pi/grokHeadlessResult.js +118 -0
- package/dist/pi/grokHomeMcpRegistration.d.ts +21 -0
- package/dist/pi/grokHomeMcpRegistration.d.ts.map +1 -0
- package/dist/pi/grokHomeMcpRegistration.js +57 -0
- package/dist/pi/grokSandbox.d.ts +11 -0
- package/dist/pi/grokSandbox.d.ts.map +1 -0
- package/dist/pi/grokSandbox.js +216 -0
- package/dist/pi/grokStreamUsage.d.ts +31 -0
- package/dist/pi/grokStreamUsage.d.ts.map +1 -0
- package/dist/pi/grokStreamUsage.js +51 -0
- package/dist/pi/index.d.ts +5 -0
- package/dist/pi/index.d.ts.map +1 -1
- package/dist/pi/index.js +5 -0
- package/dist/pi/memoryTools.d.ts +55 -1
- package/dist/pi/memoryTools.d.ts.map +1 -1
- package/dist/pi/memoryTools.js +144 -24
- package/dist/pi/modelRegistry.d.ts +13 -0
- package/dist/pi/modelRegistry.d.ts.map +1 -0
- package/dist/pi/modelRegistry.js +19 -0
- package/dist/pi/piAgentHandle.d.ts +46 -0
- package/dist/pi/piAgentHandle.d.ts.map +1 -0
- package/dist/pi/piAgentHandle.js +351 -0
- package/dist/pi/piAgentWakeSupport.d.ts +103 -0
- package/dist/pi/piAgentWakeSupport.d.ts.map +1 -0
- package/dist/pi/piAgentWakeSupport.js +151 -0
- package/dist/pi/piHarness.d.ts +40 -5
- package/dist/pi/piHarness.d.ts.map +1 -1
- package/dist/pi/piHarness.js +151 -256
- package/dist/pi/prompts.d.ts +10 -0
- package/dist/pi/prompts.d.ts.map +1 -0
- package/dist/pi/prompts.js +63 -0
- package/dist/pi/rawTrainingCapture.d.ts +59 -0
- package/dist/pi/rawTrainingCapture.d.ts.map +1 -0
- package/dist/pi/rawTrainingCapture.js +175 -0
- package/dist/pi/turnCausal.d.ts +73 -0
- package/dist/pi/turnCausal.d.ts.map +1 -0
- package/dist/pi/turnCausal.js +75 -0
- package/dist/pi/turnTrace.d.ts +128 -0
- package/dist/pi/turnTrace.d.ts.map +1 -0
- package/dist/pi/turnTrace.js +138 -0
- package/dist/pi/wakeAcceptance.d.ts +49 -0
- package/dist/pi/wakeAcceptance.d.ts.map +1 -0
- package/dist/pi/wakeAcceptance.js +281 -0
- package/dist/pi/wakeAcceptanceFs.d.ts +44 -0
- package/dist/pi/wakeAcceptanceFs.d.ts.map +1 -0
- package/dist/pi/wakeAcceptanceFs.js +318 -0
- package/dist/pi/wakeAcceptanceSchema.d.ts +75 -0
- package/dist/pi/wakeAcceptanceSchema.d.ts.map +1 -0
- package/dist/pi/wakeAcceptanceSchema.js +265 -0
- package/dist/pi/wakeModes.d.ts +9 -0
- package/dist/pi/wakeModes.d.ts.map +1 -0
- package/dist/pi/wakeModes.js +19 -0
- package/dist/pi/worldNudge.d.ts +22 -0
- package/dist/pi/worldNudge.d.ts.map +1 -0
- package/dist/pi/worldNudge.js +62 -0
- package/dist/pi/worldToolProtocol.d.ts +13 -0
- package/dist/pi/worldToolProtocol.d.ts.map +1 -0
- package/dist/pi/worldToolProtocol.js +49 -0
- package/dist/pi/worldTools.d.ts +32 -0
- package/dist/pi/worldTools.d.ts.map +1 -0
- package/dist/pi/worldTools.js +373 -0
- package/dist/pi/worldTrajectory.d.ts +52 -0
- package/dist/pi/worldTrajectory.d.ts.map +1 -0
- package/dist/pi/worldTrajectory.js +131 -0
- package/dist/runtime/agySubscriptionBootstrap.d.ts +16 -0
- package/dist/runtime/agySubscriptionBootstrap.d.ts.map +1 -0
- package/dist/runtime/agySubscriptionBootstrap.js +80 -0
- package/dist/runtime/agySubscriptionRealm.d.ts +38 -0
- package/dist/runtime/agySubscriptionRealm.d.ts.map +1 -0
- package/dist/runtime/agySubscriptionRealm.js +242 -0
- package/dist/runtime/attention.d.ts +21 -0
- package/dist/runtime/attention.d.ts.map +1 -0
- package/dist/runtime/attention.js +36 -0
- package/dist/runtime/attentionDispatcher.d.ts +66 -0
- package/dist/runtime/attentionDispatcher.d.ts.map +1 -0
- package/dist/runtime/attentionDispatcher.js +271 -0
- package/dist/runtime/cli.d.ts +7 -0
- package/dist/runtime/cli.d.ts.map +1 -0
- package/dist/runtime/cli.js +251 -0
- package/dist/runtime/codexSandboxProjection.d.ts +17 -0
- package/dist/runtime/codexSandboxProjection.d.ts.map +1 -0
- package/dist/runtime/codexSandboxProjection.js +40 -0
- package/dist/runtime/contract-manifest.json +1 -0
- package/dist/runtime/contract-manifest.sha256 +1 -0
- package/dist/runtime/contractManifest.d.ts +8 -0
- package/dist/runtime/contractManifest.d.ts.map +1 -0
- package/dist/runtime/contractManifest.js +4 -0
- package/dist/runtime/engineBrokerCapabilities.d.ts +30 -0
- package/dist/runtime/engineBrokerCapabilities.d.ts.map +1 -0
- package/dist/runtime/engineBrokerCapabilities.js +59 -0
- package/dist/runtime/engineBrokerControlClient.d.ts +44 -0
- package/dist/runtime/engineBrokerControlClient.d.ts.map +1 -0
- package/dist/runtime/engineBrokerControlClient.js +132 -0
- package/dist/runtime/engineBrokerCredentialJournal.d.ts +10 -0
- package/dist/runtime/engineBrokerCredentialJournal.d.ts.map +1 -0
- package/dist/runtime/engineBrokerCredentialJournal.js +17 -0
- package/dist/runtime/engineBrokerInferenceProtocol.d.ts +52 -0
- package/dist/runtime/engineBrokerInferenceProtocol.d.ts.map +1 -0
- package/dist/runtime/engineBrokerInferenceProtocol.js +65 -0
- package/dist/runtime/engineBrokerMcpCallLog.d.ts +160 -0
- package/dist/runtime/engineBrokerMcpCallLog.d.ts.map +1 -0
- package/dist/runtime/engineBrokerMcpCallLog.js +219 -0
- package/dist/runtime/engineBrokerMcpFacade.d.ts +56 -0
- package/dist/runtime/engineBrokerMcpFacade.d.ts.map +1 -0
- package/dist/runtime/engineBrokerMcpFacade.js +343 -0
- package/dist/runtime/engineBrokerNativeClient.d.ts +52 -0
- package/dist/runtime/engineBrokerNativeClient.d.ts.map +1 -0
- package/dist/runtime/engineBrokerNativeClient.js +151 -0
- package/dist/runtime/engineBrokerProtocol.d.ts +135 -0
- package/dist/runtime/engineBrokerProtocol.d.ts.map +1 -0
- package/dist/runtime/engineBrokerProtocol.js +274 -0
- package/dist/runtime/engineBrokerSealLedger.d.ts +70 -0
- package/dist/runtime/engineBrokerSealLedger.d.ts.map +1 -0
- package/dist/runtime/engineBrokerSealLedger.js +123 -0
- package/dist/runtime/engineBrokerService.d.ts +37 -0
- package/dist/runtime/engineBrokerService.d.ts.map +1 -0
- package/dist/runtime/engineBrokerService.js +138 -0
- package/dist/runtime/engineBrokerServiceCli.d.ts +5 -0
- package/dist/runtime/engineBrokerServiceCli.d.ts.map +1 -0
- package/dist/runtime/engineBrokerServiceCli.js +32 -0
- package/dist/runtime/engineBrokerServiceConfig.d.ts +50 -0
- package/dist/runtime/engineBrokerServiceConfig.d.ts.map +1 -0
- package/dist/runtime/engineBrokerServiceConfig.js +92 -0
- package/dist/runtime/engineBrokerSingleflight.d.ts +13 -0
- package/dist/runtime/engineBrokerSingleflight.d.ts.map +1 -0
- package/dist/runtime/engineBrokerSingleflight.js +24 -0
- package/dist/runtime/engineBrokerTurnAccounting.d.ts +76 -0
- package/dist/runtime/engineBrokerTurnAccounting.d.ts.map +1 -0
- package/dist/runtime/engineBrokerTurnAccounting.js +108 -0
- package/dist/runtime/engineBrokerTurnRegistry.d.ts +57 -0
- package/dist/runtime/engineBrokerTurnRegistry.d.ts.map +1 -0
- package/dist/runtime/engineBrokerTurnRegistry.js +158 -0
- package/dist/runtime/engineDispatcher.d.ts +36 -0
- package/dist/runtime/engineDispatcher.d.ts.map +1 -0
- package/dist/runtime/engineDispatcher.js +216 -0
- package/dist/runtime/engineReadiness.d.ts +23 -0
- package/dist/runtime/engineReadiness.d.ts.map +1 -0
- package/dist/runtime/engineReadiness.js +222 -0
- package/dist/runtime/grokAuthenticationError.d.ts +8 -0
- package/dist/runtime/grokAuthenticationError.d.ts.map +1 -0
- package/dist/runtime/grokAuthenticationError.js +20 -0
- package/dist/runtime/grokBrokerCredentialAuthority.d.ts +22 -0
- package/dist/runtime/grokBrokerCredentialAuthority.d.ts.map +1 -0
- package/dist/runtime/grokBrokerCredentialAuthority.js +124 -0
- package/dist/runtime/grokBrokerCredentialReader.d.ts +5 -0
- package/dist/runtime/grokBrokerCredentialReader.d.ts.map +1 -0
- package/dist/runtime/grokBrokerCredentialReader.js +37 -0
- package/dist/runtime/grokBrokerModelPolicy.d.ts +23 -0
- package/dist/runtime/grokBrokerModelPolicy.d.ts.map +1 -0
- package/dist/runtime/grokBrokerModelPolicy.js +28 -0
- package/dist/runtime/grokBrokerProjection.d.ts +106 -0
- package/dist/runtime/grokBrokerProjection.d.ts.map +1 -0
- package/dist/runtime/grokBrokerProjection.js +94 -0
- package/dist/runtime/grokBrokerProxy.d.ts +55 -0
- package/dist/runtime/grokBrokerProxy.d.ts.map +1 -0
- package/dist/runtime/grokBrokerProxy.js +262 -0
- package/dist/runtime/grokBrokerProxyRequest.d.ts +30 -0
- package/dist/runtime/grokBrokerProxyRequest.d.ts.map +1 -0
- package/dist/runtime/grokBrokerProxyRequest.js +74 -0
- package/dist/runtime/grokBrokerRealmLease.d.ts +4 -0
- package/dist/runtime/grokBrokerRealmLease.d.ts.map +1 -0
- package/dist/runtime/grokBrokerRealmLease.js +33 -0
- package/dist/runtime/grokBrokerRefresh.d.ts +2 -0
- package/dist/runtime/grokBrokerRefresh.d.ts.map +1 -0
- package/dist/runtime/grokBrokerRefresh.js +15 -0
- package/dist/runtime/grokBrokerTurnMeter.d.ts +128 -0
- package/dist/runtime/grokBrokerTurnMeter.d.ts.map +1 -0
- package/dist/runtime/grokBrokerTurnMeter.js +251 -0
- package/dist/runtime/grokBrokerWorkerConfig.d.ts +86 -0
- package/dist/runtime/grokBrokerWorkerConfig.d.ts.map +1 -0
- package/dist/runtime/grokBrokerWorkerConfig.js +135 -0
- package/dist/runtime/grokEngineBroker.d.ts +48 -0
- package/dist/runtime/grokEngineBroker.d.ts.map +1 -0
- package/dist/runtime/grokEngineBroker.js +114 -0
- package/dist/runtime/grokEngineBrokerLedger.d.ts +52 -0
- package/dist/runtime/grokEngineBrokerLedger.d.ts.map +1 -0
- package/dist/runtime/grokEngineBrokerLedger.js +114 -0
- package/dist/runtime/grokEngineBrokerMetering.d.ts +51 -0
- package/dist/runtime/grokEngineBrokerMetering.d.ts.map +1 -0
- package/dist/runtime/grokEngineBrokerMetering.js +34 -0
- package/dist/runtime/grokEngineBrokerTurn.d.ts +58 -0
- package/dist/runtime/grokEngineBrokerTurn.d.ts.map +1 -0
- package/dist/runtime/grokEngineBrokerTurn.js +165 -0
- package/dist/runtime/grokInferenceClientConfig.d.ts +41 -0
- package/dist/runtime/grokInferenceClientConfig.d.ts.map +1 -0
- package/dist/runtime/grokInferenceClientConfig.js +62 -0
- package/dist/runtime/grokInferenceGrants.d.ts +77 -0
- package/dist/runtime/grokInferenceGrants.d.ts.map +1 -0
- package/dist/runtime/grokInferenceGrants.js +116 -0
- package/dist/runtime/grokInferenceProxy.d.ts +29 -0
- package/dist/runtime/grokInferenceProxy.d.ts.map +1 -0
- package/dist/runtime/grokInferenceProxy.js +82 -0
- package/dist/runtime/grokInferenceProxyRequest.d.ts +23 -0
- package/dist/runtime/grokInferenceProxyRequest.d.ts.map +1 -0
- package/dist/runtime/grokInferenceProxyRequest.js +63 -0
- package/dist/runtime/grokSlotPreflightReceipt.d.ts +70 -0
- package/dist/runtime/grokSlotPreflightReceipt.d.ts.map +1 -0
- package/dist/runtime/grokSlotPreflightReceipt.js +101 -0
- package/dist/runtime/grokSubscriptionRealm.d.ts +4 -0
- package/dist/runtime/grokSubscriptionRealm.d.ts.map +1 -0
- package/dist/runtime/grokSubscriptionRealm.js +435 -0
- package/dist/runtime/grokSubscriptionRealmTypes.d.ts +26 -0
- package/dist/runtime/grokSubscriptionRealmTypes.d.ts.map +1 -0
- package/dist/runtime/grokSubscriptionRealmTypes.js +1 -0
- package/dist/runtime/grokWorkerAttestation.d.ts +170 -0
- package/dist/runtime/grokWorkerAttestation.d.ts.map +1 -0
- package/dist/runtime/grokWorkerAttestation.js +266 -0
- package/dist/runtime/grokWorkerDenyPlacement.d.ts +80 -0
- package/dist/runtime/grokWorkerDenyPlacement.d.ts.map +1 -0
- package/dist/runtime/grokWorkerDenyPlacement.js +128 -0
- package/dist/runtime/grokWorkerHomeAttestation.d.ts +30 -0
- package/dist/runtime/grokWorkerHomeAttestation.d.ts.map +1 -0
- package/dist/runtime/grokWorkerHomeAttestation.js +69 -0
- package/dist/runtime/grokWorkerSandboxProfile.d.ts +27 -0
- package/dist/runtime/grokWorkerSandboxProfile.d.ts.map +1 -0
- package/dist/runtime/grokWorkerSandboxProfile.js +44 -0
- package/dist/runtime/grokWorkerTmpAttestation.d.ts +55 -0
- package/dist/runtime/grokWorkerTmpAttestation.d.ts.map +1 -0
- package/dist/runtime/grokWorkerTmpAttestation.js +63 -0
- package/dist/runtime/index.d.ts +26 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +23 -0
- package/dist/runtime/inferenceUsageLedger.d.ts +38 -0
- package/dist/runtime/inferenceUsageLedger.d.ts.map +1 -0
- package/dist/runtime/inferenceUsageLedger.js +53 -0
- package/dist/runtime/mcpToolResult.d.ts +127 -0
- package/dist/runtime/mcpToolResult.d.ts.map +1 -0
- package/dist/runtime/mcpToolResult.js +214 -0
- package/dist/runtime/moltnetMachineRead.d.ts +97 -0
- package/dist/runtime/moltnetMachineRead.d.ts.map +1 -0
- package/dist/runtime/moltnetMachineRead.js +183 -0
- package/dist/runtime/native/daimon-engine-broker +0 -0
- package/dist/runtime/organizationRuntime.d.ts +165 -0
- package/dist/runtime/organizationRuntime.d.ts.map +1 -0
- package/dist/runtime/organizationRuntime.js +3 -0
- package/dist/runtime/organizationRuntimeControl.d.ts +42 -0
- package/dist/runtime/organizationRuntimeControl.d.ts.map +1 -0
- package/dist/runtime/organizationRuntimeControl.js +235 -0
- package/dist/runtime/organizationRuntimeHost.d.ts +19 -0
- package/dist/runtime/organizationRuntimeHost.d.ts.map +1 -0
- package/dist/runtime/organizationRuntimeHost.js +359 -0
- package/dist/runtime/organizationRuntimeParsing.d.ts +6 -0
- package/dist/runtime/organizationRuntimeParsing.d.ts.map +1 -0
- package/dist/runtime/organizationRuntimeParsing.js +370 -0
- package/dist/runtime/organizationRuntimeReadiness.d.ts +12 -0
- package/dist/runtime/organizationRuntimeReadiness.d.ts.map +1 -0
- package/dist/runtime/organizationRuntimeReadiness.js +59 -0
- package/dist/runtime/physicalReadiness.d.ts +47 -0
- package/dist/runtime/physicalReadiness.d.ts.map +1 -0
- package/dist/runtime/physicalReadiness.js +142 -0
- package/dist/runtime/portableCredentialAuth.d.ts +6 -0
- package/dist/runtime/portableCredentialAuth.d.ts.map +1 -0
- package/dist/runtime/portableCredentialAuth.js +70 -0
- package/dist/runtime/portableCredentialMaterial.d.ts +8 -0
- package/dist/runtime/portableCredentialMaterial.d.ts.map +1 -0
- package/dist/runtime/portableCredentialMaterial.js +169 -0
- package/dist/runtime/productionAgentTools.d.ts +5 -0
- package/dist/runtime/productionAgentTools.d.ts.map +1 -0
- package/dist/runtime/productionAgentTools.js +328 -0
- package/dist/runtime/runtimeHomeLayout.d.ts +48 -0
- package/dist/runtime/runtimeHomeLayout.d.ts.map +1 -0
- package/dist/runtime/runtimeHomeLayout.js +84 -0
- package/dist/runtime/schedule.d.ts +40 -0
- package/dist/runtime/schedule.d.ts.map +1 -0
- package/dist/runtime/schedule.js +371 -0
- package/dist/runtime/storeCoordination.d.ts +23 -0
- package/dist/runtime/storeCoordination.d.ts.map +1 -0
- package/dist/runtime/storeCoordination.js +94 -0
- package/dist/runtime/toolResultSpill.d.ts +152 -0
- package/dist/runtime/toolResultSpill.d.ts.map +1 -0
- package/dist/runtime/toolResultSpill.js +351 -0
- package/dist/runtime/turnRequestLedger.d.ts +160 -0
- package/dist/runtime/turnRequestLedger.d.ts.map +1 -0
- package/dist/runtime/turnRequestLedger.js +249 -0
- package/dist/runtime/turnUsageLedger.d.ts +143 -0
- package/dist/runtime/turnUsageLedger.d.ts.map +1 -0
- package/dist/runtime/turnUsageLedger.js +203 -0
- package/dist/runtime/wakeAcceptanceProcessIdentity.d.ts +17 -0
- package/dist/runtime/wakeAcceptanceProcessIdentity.d.ts.map +1 -0
- package/dist/runtime/wakeAcceptanceProcessIdentity.js +50 -0
- package/dist/runtime/wakeAcceptanceReconciliation.d.ts +211 -0
- package/dist/runtime/wakeAcceptanceReconciliation.d.ts.map +1 -0
- package/dist/runtime/wakeAcceptanceReconciliation.js +289 -0
- package/dist/runtime/wakeAcceptanceRecord.d.ts +23 -0
- package/dist/runtime/wakeAcceptanceRecord.d.ts.map +1 -0
- package/dist/runtime/wakeAcceptanceRecord.js +56 -0
- package/dist/runtime/wakeAcceptanceRetention.d.ts +12 -0
- package/dist/runtime/wakeAcceptanceRetention.d.ts.map +1 -0
- package/dist/runtime/wakeAcceptanceRetention.js +12 -0
- package/dist/runtime/wakeAcceptanceStore.d.ts +113 -0
- package/dist/runtime/wakeAcceptanceStore.d.ts.map +1 -0
- package/dist/runtime/wakeAcceptanceStore.js +558 -0
- package/dist/runtime/wakeAcceptanceTypes.d.ts +179 -0
- package/dist/runtime/wakeAcceptanceTypes.d.ts.map +1 -0
- package/dist/runtime/wakeAcceptanceTypes.js +95 -0
- package/dist/runtime/wakeFuse.d.ts +69 -0
- package/dist/runtime/wakeFuse.d.ts.map +1 -0
- package/dist/runtime/wakeFuse.js +367 -0
- package/package.json +25 -17
- package/dist/examples/mixed-engine-org.d.ts +0 -2
- package/dist/examples/mixed-engine-org.d.ts.map +0 -1
- package/dist/examples/mixed-engine-org.js +0 -351
- package/dist/examples/mixedEngineCli.d.ts +0 -15
- package/dist/examples/mixedEngineCli.d.ts.map +0 -1
- package/dist/examples/mixedEngineCli.js +0 -174
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
2
|
+
import { constants } from "node:fs";
|
|
3
|
+
import { spawn } from "node:child_process";
|
|
4
|
+
import { lstat, open, rename, unlink } from "node:fs/promises";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import { terminateChild, trackCliChild } from "../pi/cliProcess.js";
|
|
7
|
+
import { GROK_SUBSCRIPTION_REALM } from "./contractManifest.js";
|
|
8
|
+
import { hasRefreshablePortableCredential } from "./portableCredentialAuth.js";
|
|
9
|
+
import { asGrokAuthenticationRejected } from "./grokAuthenticationError.js";
|
|
10
|
+
const AUTH_FILE = "auth.json";
|
|
11
|
+
const JOURNAL_FILE = "lease.json";
|
|
12
|
+
const STALE_FILE = "stale.json";
|
|
13
|
+
const BOOTSTRAP_FILE = "bootstrap.json";
|
|
14
|
+
const LEASE_FILE = ".daimon-lease";
|
|
15
|
+
const MAX_CONTROL_BYTES = 4_096;
|
|
16
|
+
export async function startGrokSubscriptionRealm(configuredAgents, options = {}) {
|
|
17
|
+
const durablePath = options.durablePath ?? GROK_SUBSCRIPTION_REALM.durableMountPath;
|
|
18
|
+
const bootstrapPath = options.bootstrapPath ?? GROK_SUBSCRIPTION_REALM.bootstrapMountPath;
|
|
19
|
+
await verifyPrivateDirectory(durablePath);
|
|
20
|
+
const lease = await acquireRealmLease(durablePath, options);
|
|
21
|
+
const agents = new Map(configuredAgents.map((agent) => [agent.id, agent]));
|
|
22
|
+
let tail = Promise.resolve();
|
|
23
|
+
let closed = false;
|
|
24
|
+
let closePromise;
|
|
25
|
+
let bootstrapDigest;
|
|
26
|
+
try {
|
|
27
|
+
bootstrapDigest = await initializeRealm(durablePath, bootstrapPath, agents);
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
await terminateChild(lease).catch(() => undefined);
|
|
31
|
+
throw redact(error);
|
|
32
|
+
}
|
|
33
|
+
const withCredential = async (agent, operation) => {
|
|
34
|
+
if (closed || agents.get(agent.id)?.runtimeHomePath !== agent.runtimeHomePath)
|
|
35
|
+
throw redact();
|
|
36
|
+
let release;
|
|
37
|
+
const prior = tail;
|
|
38
|
+
tail = new Promise((resolve) => { release = resolve; });
|
|
39
|
+
await prior;
|
|
40
|
+
try {
|
|
41
|
+
if (closed)
|
|
42
|
+
throw redact();
|
|
43
|
+
return await runLeasedTurn(durablePath, bootstrapDigest, agent, operation, options.onTransitionForTest);
|
|
44
|
+
}
|
|
45
|
+
finally {
|
|
46
|
+
release();
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
withCredential,
|
|
51
|
+
close: () => closePromise ??= (async () => {
|
|
52
|
+
closed = true;
|
|
53
|
+
await tail;
|
|
54
|
+
await terminateChild(lease);
|
|
55
|
+
})()
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
async function initializeRealm(durablePath, bootstrapPath, agents) {
|
|
59
|
+
const bootstrap = await readCredential(bootstrapPath);
|
|
60
|
+
try {
|
|
61
|
+
const observedBootstrap = await readBootstrap(path.join(durablePath, BOOTSTRAP_FILE));
|
|
62
|
+
const journal = await readJournal(path.join(durablePath, JOURNAL_FILE));
|
|
63
|
+
if (journal !== undefined) {
|
|
64
|
+
await recoverJournal(durablePath, journal, agents, observedBootstrap?.bootstrap_digest ?? bootstrap.digest);
|
|
65
|
+
}
|
|
66
|
+
const stale = await readStale(path.join(durablePath, STALE_FILE));
|
|
67
|
+
const authority = await readOptionalAuthority(path.join(durablePath, AUTH_FILE));
|
|
68
|
+
const shouldImport = stale !== undefined
|
|
69
|
+
? stale.bootstrap_digest !== bootstrap.digest
|
|
70
|
+
: authority === undefined || (observedBootstrap !== undefined
|
|
71
|
+
&& observedBootstrap.bootstrap_digest !== bootstrap.digest);
|
|
72
|
+
authority?.bytes.fill(0);
|
|
73
|
+
if (shouldImport) {
|
|
74
|
+
await atomicCredentialWrite(path.join(durablePath, AUTH_FILE), bootstrap.bytes);
|
|
75
|
+
await unlink(path.join(durablePath, STALE_FILE)).catch(ignoreMissing);
|
|
76
|
+
await syncDirectory(durablePath);
|
|
77
|
+
}
|
|
78
|
+
if (shouldImport || observedBootstrap === undefined) {
|
|
79
|
+
await writeBootstrap(path.join(durablePath, BOOTSTRAP_FILE), bootstrap.digest);
|
|
80
|
+
}
|
|
81
|
+
if (await readStale(path.join(durablePath, STALE_FILE)) !== undefined)
|
|
82
|
+
throw redact();
|
|
83
|
+
return bootstrap.digest;
|
|
84
|
+
}
|
|
85
|
+
finally {
|
|
86
|
+
bootstrap.bytes.fill(0);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
async function runLeasedTurn(durablePath, bootstrapDigest, agent, operation, onTransition) {
|
|
90
|
+
if (await readStale(path.join(durablePath, STALE_FILE)) !== undefined)
|
|
91
|
+
throw redact();
|
|
92
|
+
await verifyPrivateDirectory(path.dirname(path.join(agent.runtimeHomePath, GROK_SUBSCRIPTION_REALM.agentCredentialRelativePath)));
|
|
93
|
+
const target = path.join(agent.runtimeHomePath, GROK_SUBSCRIPTION_REALM.agentCredentialRelativePath);
|
|
94
|
+
await assertAbsent(target);
|
|
95
|
+
const authority = await readCredential(path.join(durablePath, AUTH_FILE));
|
|
96
|
+
const journalPath = path.join(durablePath, JOURNAL_FILE);
|
|
97
|
+
try {
|
|
98
|
+
await writeJournal(journalPath, { agent_id: agent.id, source_digest: authority.digest, state: "preparing", version: "noopolis.daimon.grok-credential-lease.v1" });
|
|
99
|
+
await atomicCredentialWrite(target, authority.bytes);
|
|
100
|
+
await writeJournal(journalPath, { agent_id: agent.id, source_digest: authority.digest, state: "active", version: "noopolis.daimon.grok-credential-lease.v1" });
|
|
101
|
+
}
|
|
102
|
+
finally {
|
|
103
|
+
authority.bytes.fill(0);
|
|
104
|
+
}
|
|
105
|
+
let result;
|
|
106
|
+
let operationError;
|
|
107
|
+
try {
|
|
108
|
+
result = await operation();
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
operationError = error;
|
|
112
|
+
}
|
|
113
|
+
if (asGrokAuthenticationRejected(operationError) !== undefined) {
|
|
114
|
+
await unlink(target).catch(ignoreMissing);
|
|
115
|
+
await syncDirectory(path.dirname(target));
|
|
116
|
+
await markStale(durablePath, bootstrapDigest);
|
|
117
|
+
throw redact();
|
|
118
|
+
}
|
|
119
|
+
const candidate = await tryReadCredential(target);
|
|
120
|
+
if (candidate === undefined) {
|
|
121
|
+
await unlink(target).catch(ignoreMissing);
|
|
122
|
+
await syncDirectory(path.dirname(target));
|
|
123
|
+
await markStale(durablePath, bootstrapDigest);
|
|
124
|
+
throw redact(operationError);
|
|
125
|
+
}
|
|
126
|
+
try {
|
|
127
|
+
await writeJournal(journalPath, {
|
|
128
|
+
agent_id: agent.id,
|
|
129
|
+
promoted_digest: candidate.digest,
|
|
130
|
+
source_digest: authority.digest,
|
|
131
|
+
state: "promoting",
|
|
132
|
+
version: "noopolis.daimon.grok-credential-lease.v1"
|
|
133
|
+
});
|
|
134
|
+
await onTransition?.("promotion_prepared");
|
|
135
|
+
await atomicCredentialWrite(path.join(durablePath, AUTH_FILE), candidate.bytes);
|
|
136
|
+
await onTransition?.("authority_replaced");
|
|
137
|
+
await writeJournal(journalPath, {
|
|
138
|
+
agent_id: agent.id,
|
|
139
|
+
promoted_digest: candidate.digest,
|
|
140
|
+
source_digest: authority.digest,
|
|
141
|
+
state: "promoted",
|
|
142
|
+
version: "noopolis.daimon.grok-credential-lease.v1"
|
|
143
|
+
});
|
|
144
|
+
await unlink(target).catch(ignoreMissing);
|
|
145
|
+
await syncDirectory(path.dirname(target));
|
|
146
|
+
await unlink(journalPath).catch(ignoreMissing);
|
|
147
|
+
await syncDirectory(durablePath);
|
|
148
|
+
}
|
|
149
|
+
finally {
|
|
150
|
+
candidate.bytes.fill(0);
|
|
151
|
+
}
|
|
152
|
+
if (operationError !== undefined)
|
|
153
|
+
throw operationError;
|
|
154
|
+
return result;
|
|
155
|
+
}
|
|
156
|
+
async function recoverJournal(durablePath, journal, agents, bootstrapDigest) {
|
|
157
|
+
const agent = agents.get(journal.agent_id);
|
|
158
|
+
const target = agent === undefined ? undefined
|
|
159
|
+
: path.join(agent.runtimeHomePath, GROK_SUBSCRIPTION_REALM.agentCredentialRelativePath);
|
|
160
|
+
if (target !== undefined)
|
|
161
|
+
await verifyPrivateDirectory(path.dirname(target));
|
|
162
|
+
const authority = await readCredential(path.join(durablePath, AUTH_FILE));
|
|
163
|
+
const authorityDigest = authority.digest;
|
|
164
|
+
try {
|
|
165
|
+
const expected = journal.state === "promoted" ? [journal.promoted_digest]
|
|
166
|
+
: journal.state === "promoting" ? [journal.source_digest, journal.promoted_digest]
|
|
167
|
+
: [journal.source_digest];
|
|
168
|
+
if (!expected.includes(authorityDigest)) {
|
|
169
|
+
if (target !== undefined) {
|
|
170
|
+
await unlink(target).catch(ignoreMissing);
|
|
171
|
+
await syncDirectory(path.dirname(target));
|
|
172
|
+
}
|
|
173
|
+
await markStale(durablePath, bootstrapDigest);
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
finally {
|
|
178
|
+
authority.bytes.fill(0);
|
|
179
|
+
}
|
|
180
|
+
if (journal.state === "promoted") {
|
|
181
|
+
if (target !== undefined) {
|
|
182
|
+
await unlink(target).catch(ignoreMissing);
|
|
183
|
+
await syncDirectory(path.dirname(target));
|
|
184
|
+
}
|
|
185
|
+
await unlink(path.join(durablePath, JOURNAL_FILE)).catch(ignoreMissing);
|
|
186
|
+
await syncDirectory(durablePath);
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
if (journal.state === "preparing") {
|
|
190
|
+
if (target !== undefined)
|
|
191
|
+
await unlink(target).catch(ignoreMissing);
|
|
192
|
+
await unlink(path.join(durablePath, JOURNAL_FILE)).catch(ignoreMissing);
|
|
193
|
+
await syncDirectory(durablePath);
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
const candidate = target === undefined ? undefined : await tryReadCredential(target);
|
|
197
|
+
if (candidate === undefined) {
|
|
198
|
+
if (target !== undefined) {
|
|
199
|
+
await unlink(target).catch(ignoreMissing);
|
|
200
|
+
await syncDirectory(path.dirname(target));
|
|
201
|
+
}
|
|
202
|
+
await markStale(durablePath, bootstrapDigest);
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
try {
|
|
206
|
+
if (journal.state === "promoting" && candidate.digest !== journal.promoted_digest) {
|
|
207
|
+
await markStale(durablePath, bootstrapDigest);
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
if (journal.state === "active")
|
|
211
|
+
await writeJournal(path.join(durablePath, JOURNAL_FILE), { ...journal, promoted_digest: candidate.digest, state: "promoting" });
|
|
212
|
+
if (authorityDigest === journal.source_digest) {
|
|
213
|
+
await atomicCredentialWrite(path.join(durablePath, AUTH_FILE), candidate.bytes);
|
|
214
|
+
}
|
|
215
|
+
await writeJournal(path.join(durablePath, JOURNAL_FILE), {
|
|
216
|
+
...journal, promoted_digest: candidate.digest, state: "promoted"
|
|
217
|
+
});
|
|
218
|
+
await unlink(target).catch(ignoreMissing);
|
|
219
|
+
await syncDirectory(path.dirname(target));
|
|
220
|
+
await unlink(path.join(durablePath, JOURNAL_FILE)).catch(ignoreMissing);
|
|
221
|
+
await syncDirectory(durablePath);
|
|
222
|
+
}
|
|
223
|
+
finally {
|
|
224
|
+
candidate.bytes.fill(0);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
async function markStale(durablePath, bootstrapDigest) {
|
|
228
|
+
await atomicJsonWrite(path.join(durablePath, STALE_FILE), {
|
|
229
|
+
bootstrap_digest: bootstrapDigest,
|
|
230
|
+
version: "noopolis.daimon.grok-credential-stale.v1"
|
|
231
|
+
});
|
|
232
|
+
await unlink(path.join(durablePath, JOURNAL_FILE)).catch(ignoreMissing);
|
|
233
|
+
await syncDirectory(durablePath);
|
|
234
|
+
}
|
|
235
|
+
async function readCredential(file) {
|
|
236
|
+
let handle;
|
|
237
|
+
try {
|
|
238
|
+
const before = await lstat(file);
|
|
239
|
+
assertCredentialIdentity(before);
|
|
240
|
+
handle = await open(file, constants.O_RDONLY | noFollow());
|
|
241
|
+
const opened = await handle.stat();
|
|
242
|
+
assertCredentialIdentity(opened);
|
|
243
|
+
if (!sameIdentity(before, opened))
|
|
244
|
+
throw new Error("changed");
|
|
245
|
+
const bytes = await handle.readFile();
|
|
246
|
+
const after = await handle.stat();
|
|
247
|
+
if (!sameIdentity(opened, after) || !hasRefreshablePortableCredential("grok", bytes)) {
|
|
248
|
+
bytes.fill(0);
|
|
249
|
+
throw new Error("invalid");
|
|
250
|
+
}
|
|
251
|
+
return { bytes, digest: createHash("sha256").update(bytes).digest("hex") };
|
|
252
|
+
}
|
|
253
|
+
catch {
|
|
254
|
+
throw redact();
|
|
255
|
+
}
|
|
256
|
+
finally {
|
|
257
|
+
await handle?.close().catch(() => undefined);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
async function tryReadCredential(file) {
|
|
261
|
+
try {
|
|
262
|
+
return await readCredential(file);
|
|
263
|
+
}
|
|
264
|
+
catch {
|
|
265
|
+
return undefined;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
async function readOptionalAuthority(file) {
|
|
269
|
+
try {
|
|
270
|
+
return await readCredential(file);
|
|
271
|
+
}
|
|
272
|
+
catch {
|
|
273
|
+
try {
|
|
274
|
+
await lstat(file);
|
|
275
|
+
}
|
|
276
|
+
catch (error) {
|
|
277
|
+
if (error.code === "ENOENT")
|
|
278
|
+
return undefined;
|
|
279
|
+
}
|
|
280
|
+
throw redact();
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
async function atomicCredentialWrite(file, bytes) {
|
|
284
|
+
await atomicWrite(file, bytes, GROK_SUBSCRIPTION_REALM.fileMode);
|
|
285
|
+
const checked = await readCredential(file);
|
|
286
|
+
checked.bytes.fill(0);
|
|
287
|
+
}
|
|
288
|
+
async function atomicJsonWrite(file, value) {
|
|
289
|
+
await atomicWrite(file, Buffer.from(`${JSON.stringify(value)}\n`), 0o600);
|
|
290
|
+
}
|
|
291
|
+
async function atomicWrite(file, bytes, mode) {
|
|
292
|
+
const temporary = path.join(path.dirname(file), `.${path.basename(file)}.${randomUUID()}.tmp`);
|
|
293
|
+
let handle;
|
|
294
|
+
try {
|
|
295
|
+
handle = await open(temporary, constants.O_CREAT | constants.O_EXCL | constants.O_WRONLY | noFollow(), mode);
|
|
296
|
+
await handle.writeFile(bytes);
|
|
297
|
+
await handle.chmod(mode);
|
|
298
|
+
await handle.sync();
|
|
299
|
+
await handle.close();
|
|
300
|
+
handle = undefined;
|
|
301
|
+
await rename(temporary, file);
|
|
302
|
+
await syncDirectory(path.dirname(file));
|
|
303
|
+
}
|
|
304
|
+
catch {
|
|
305
|
+
throw redact();
|
|
306
|
+
}
|
|
307
|
+
finally {
|
|
308
|
+
await handle?.close().catch(() => undefined);
|
|
309
|
+
await unlink(temporary).catch(() => undefined);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
async function writeJournal(file, value) { await atomicJsonWrite(file, value); }
|
|
313
|
+
async function readJournal(file) {
|
|
314
|
+
return readPrivateJson(file, (value) => {
|
|
315
|
+
const candidate = value;
|
|
316
|
+
if (candidate.version !== "noopolis.daimon.grok-credential-lease.v1" || !["active", "preparing", "promoted", "promoting"].includes(candidate.state ?? "")
|
|
317
|
+
|| typeof candidate.agent_id !== "string" || !candidate.agent_id || !/^[a-f0-9]{64}$/u.test(candidate.source_digest ?? "")
|
|
318
|
+
|| (["promoted", "promoting"].includes(candidate.state ?? "") && !/^[a-f0-9]{64}$/u.test(candidate.promoted_digest ?? "")))
|
|
319
|
+
throw new Error("invalid");
|
|
320
|
+
return candidate;
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
async function readStale(file) {
|
|
324
|
+
return readPrivateJson(file, (value) => {
|
|
325
|
+
const candidate = value;
|
|
326
|
+
if (candidate.version !== "noopolis.daimon.grok-credential-stale.v1" || typeof candidate.bootstrap_digest !== "string" || !/^[a-f0-9]{64}$/u.test(candidate.bootstrap_digest))
|
|
327
|
+
throw new Error("invalid");
|
|
328
|
+
return { bootstrap_digest: candidate.bootstrap_digest };
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
async function readBootstrap(file) {
|
|
332
|
+
return readPrivateJson(file, (value) => {
|
|
333
|
+
const candidate = value;
|
|
334
|
+
if (candidate.version !== "noopolis.daimon.grok-bootstrap-observation.v1" || typeof candidate.bootstrap_digest !== "string" || !/^[a-f0-9]{64}$/u.test(candidate.bootstrap_digest))
|
|
335
|
+
throw new Error("invalid");
|
|
336
|
+
return { bootstrap_digest: candidate.bootstrap_digest };
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
async function writeBootstrap(file, bootstrapDigest) {
|
|
340
|
+
await atomicJsonWrite(file, {
|
|
341
|
+
bootstrap_digest: bootstrapDigest,
|
|
342
|
+
version: "noopolis.daimon.grok-bootstrap-observation.v1"
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
async function readPrivateJson(file, parse) {
|
|
346
|
+
let handle;
|
|
347
|
+
let bytes;
|
|
348
|
+
try {
|
|
349
|
+
const before = await lstat(file);
|
|
350
|
+
assertPrivateFileIdentity(before, MAX_CONTROL_BYTES);
|
|
351
|
+
handle = await open(file, constants.O_RDONLY | noFollow());
|
|
352
|
+
const opened = await handle.stat();
|
|
353
|
+
assertPrivateFileIdentity(opened, MAX_CONTROL_BYTES);
|
|
354
|
+
if (!sameIdentity(before, opened))
|
|
355
|
+
throw new Error("changed");
|
|
356
|
+
bytes = await handle.readFile();
|
|
357
|
+
const after = await handle.stat();
|
|
358
|
+
if (!sameIdentity(opened, after))
|
|
359
|
+
throw new Error("changed");
|
|
360
|
+
return parse(JSON.parse(bytes.toString("utf8")));
|
|
361
|
+
}
|
|
362
|
+
catch (error) {
|
|
363
|
+
if (error.code === "ENOENT")
|
|
364
|
+
return undefined;
|
|
365
|
+
throw redact();
|
|
366
|
+
}
|
|
367
|
+
finally {
|
|
368
|
+
bytes?.fill(0);
|
|
369
|
+
await handle?.close().catch(() => undefined);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
async function verifyPrivateDirectory(directory) {
|
|
373
|
+
try {
|
|
374
|
+
const entry = await lstat(directory);
|
|
375
|
+
if (!entry.isDirectory() || entry.isSymbolicLink() || entry.uid !== process.getuid?.() || (entry.mode & 0o777) !== GROK_SUBSCRIPTION_REALM.directoryMode)
|
|
376
|
+
throw new Error("unsafe");
|
|
377
|
+
}
|
|
378
|
+
catch {
|
|
379
|
+
throw redact();
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
async function assertAbsent(file) {
|
|
383
|
+
try {
|
|
384
|
+
await lstat(file);
|
|
385
|
+
}
|
|
386
|
+
catch (error) {
|
|
387
|
+
if (error.code === "ENOENT")
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
throw redact();
|
|
391
|
+
}
|
|
392
|
+
async function acquireRealmLease(durablePath, options) {
|
|
393
|
+
let lock;
|
|
394
|
+
let child;
|
|
395
|
+
try {
|
|
396
|
+
lock = await open(path.join(durablePath, LEASE_FILE), constants.O_CREAT | constants.O_RDWR | noFollow(), 0o600);
|
|
397
|
+
const entry = await lock.stat();
|
|
398
|
+
if (!entry.isFile() || entry.uid !== process.getuid?.() || entry.nlink !== 1 || (entry.mode & 0o777) !== 0o600)
|
|
399
|
+
throw new Error("unsafe");
|
|
400
|
+
child = trackCliChild(spawn(options.shell ?? "/bin/sh", ["-c", "\"$1\" --exclusive --nonblock --conflict-exit-code 73 3 || exit 73; printf 'ready\\n'; IFS= read -r _hold || :", "daimon-grok-lease", options.flock ?? "flock"], { detached: process.platform !== "win32", env: { LANG: "C", LC_ALL: "C", PATH: process.env.PATH }, stdio: ["pipe", "pipe", "ignore", lock.fd] }));
|
|
401
|
+
await waitForReady(child);
|
|
402
|
+
return child;
|
|
403
|
+
}
|
|
404
|
+
catch {
|
|
405
|
+
if (child !== undefined)
|
|
406
|
+
await terminateChild(child).catch(() => undefined);
|
|
407
|
+
throw redact();
|
|
408
|
+
}
|
|
409
|
+
finally {
|
|
410
|
+
await lock?.close().catch(() => undefined);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
async function waitForReady(child) {
|
|
414
|
+
await new Promise((resolve, reject) => {
|
|
415
|
+
const timer = setTimeout(() => reject(new Error("timeout")), 5_000);
|
|
416
|
+
child.stdout?.once("data", (value) => { clearTimeout(timer); value.toString("utf8") === "ready\n" ? resolve() : reject(new Error("invalid")); });
|
|
417
|
+
child.once("close", () => { clearTimeout(timer); reject(new Error("closed")); });
|
|
418
|
+
child.once("error", () => { clearTimeout(timer); reject(new Error("failed")); });
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
async function syncDirectory(directory) { const handle = await open(directory, constants.O_RDONLY); try {
|
|
422
|
+
await handle.sync();
|
|
423
|
+
}
|
|
424
|
+
finally {
|
|
425
|
+
await handle.close();
|
|
426
|
+
} }
|
|
427
|
+
const ignoreMissing = (error) => { if (error.code !== "ENOENT")
|
|
428
|
+
throw error; };
|
|
429
|
+
const noFollow = () => constants.O_NOFOLLOW ?? 0;
|
|
430
|
+
const sameIdentity = (left, right) => left.dev === right.dev && left.ino === right.ino && left.mode === right.mode && left.nlink === right.nlink && left.size === right.size && left.uid === right.uid && left.mtimeMs === right.mtimeMs;
|
|
431
|
+
const assertCredentialIdentity = (entry) => { if (!entry.isFile() || entry.isSymbolicLink() || Number(entry.uid) !== process.getuid?.() || Number(entry.nlink) !== 1 || (Number(entry.mode) & 0o777) !== GROK_SUBSCRIPTION_REALM.fileMode || Number(entry.size) < 1 || Number(entry.size) > GROK_SUBSCRIPTION_REALM.maxCredentialBytes)
|
|
432
|
+
throw new Error("unsafe"); };
|
|
433
|
+
const assertPrivateFileIdentity = (entry, maxBytes) => { if (!entry.isFile() || entry.isSymbolicLink() || Number(entry.uid) !== process.getuid?.() || Number(entry.nlink) !== 1 || (Number(entry.mode) & 0o777) !== 0o600 || Number(entry.size) < 1 || Number(entry.size) > maxBytes)
|
|
434
|
+
throw new Error("unsafe"); };
|
|
435
|
+
const redact = (_cause) => new Error("Grok subscription credential realm is unavailable or stale");
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { OrganizationRuntimeAgentConfig } from "./organizationRuntime.js";
|
|
2
|
+
export type GrokAgent = OrganizationRuntimeAgentConfig & {
|
|
3
|
+
engine: {
|
|
4
|
+
kind: "grok";
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export type GrokCredentialJournal = Readonly<{
|
|
8
|
+
agent_id: string;
|
|
9
|
+
promoted_digest?: string;
|
|
10
|
+
source_digest: string;
|
|
11
|
+
state: "active" | "preparing" | "promoted" | "promoting";
|
|
12
|
+
version: "noopolis.daimon.grok-credential-lease.v1";
|
|
13
|
+
}>;
|
|
14
|
+
export type GrokSubscriptionRealm = Readonly<{
|
|
15
|
+
withCredential<T>(agent: GrokAgent, operation: () => Promise<T>): Promise<T>;
|
|
16
|
+
close(): Promise<void>;
|
|
17
|
+
}>;
|
|
18
|
+
export type GrokSubscriptionRealmOptions = Readonly<{
|
|
19
|
+
bootstrapPath?: string;
|
|
20
|
+
durablePath?: string;
|
|
21
|
+
flock?: string;
|
|
22
|
+
/** @internal deterministic crash-transition test seam. */
|
|
23
|
+
onTransitionForTest?: (stage: "authority_replaced" | "promotion_prepared") => Promise<void> | void;
|
|
24
|
+
shell?: string;
|
|
25
|
+
}>;
|
|
26
|
+
//# sourceMappingURL=grokSubscriptionRealmTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grokSubscriptionRealmTypes.d.ts","sourceRoot":"","sources":["../../src/runtime/grokSubscriptionRealmTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAE/E,MAAM,MAAM,SAAS,GAAG,8BAA8B,GAAG;IAAE,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAEtF,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,QAAQ,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,CAAC;IACzD,OAAO,EAAE,0CAA0C,CAAC;CACrD,CAAC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAC3C,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAC7E,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB,CAAC,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,QAAQ,CAAC;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,GAAG,oBAAoB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACnG,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { type GrokWorkerTmpOptions } from "./grokWorkerTmpAttestation.js";
|
|
2
|
+
/**
|
|
3
|
+
* The per-turn freshness watermark taken before the worker is launched: the
|
|
4
|
+
* exact inode and its byte length at that moment. Everything at or below
|
|
5
|
+
* `size` is pre-turn history and is never read back — a `ProfileApplied` down
|
|
6
|
+
* there is a replay, not evidence about this turn.
|
|
7
|
+
*/
|
|
8
|
+
export type GrokWorkerAttestationSnapshot = Readonly<{
|
|
9
|
+
dev: number;
|
|
10
|
+
ino: number;
|
|
11
|
+
size: number;
|
|
12
|
+
denyPaths: readonly string[];
|
|
13
|
+
}>;
|
|
14
|
+
type Snapshot = GrokWorkerAttestationSnapshot;
|
|
15
|
+
export declare class GrokWorkerAttestationFailure extends Error {
|
|
16
|
+
readonly failureClass: "profile_missing" | "profile_invalid";
|
|
17
|
+
constructor(failureClass: "profile_missing" | "profile_invalid");
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Reads the `deny` list out of a worker sandbox profile, but only after the
|
|
21
|
+
* bytes match `profileSha256` exactly.
|
|
22
|
+
*
|
|
23
|
+
* There is no minimum length, and a populated list is supported. Grok 1.0.13
|
|
24
|
+
* refused to start on any non-empty `deny` (its mode-000 placeholders failed
|
|
25
|
+
* an EACCES "__GROK_INSIDE_BWRAP spoof" check), so deployments rendered
|
|
26
|
+
* `deny = []`. Grok 1.0.34 runs every profile inside bubblewrap and enforces a
|
|
27
|
+
* non-empty list, and since its strict base reads all of `/run`, `/var` and
|
|
28
|
+
* `/tmp`, the deny list is what keeps evaluator and host-bind paths away from
|
|
29
|
+
* the worker. `grokWorkerSandboxProfile.ts` renders these bytes.
|
|
30
|
+
*
|
|
31
|
+
* The integrity guarantee is the hash pin, not the length. `profileSha256`
|
|
32
|
+
* comes from `/etc/daimon-engine-broker/service.json`, which the root
|
|
33
|
+
* provisioning phase writes `0440 root:2100` with `flag: 'wx'` and computes
|
|
34
|
+
* from the same `profileFor()` bytes it writes to the profile; the broker
|
|
35
|
+
* reads that config as uid 2100 and cannot rewrite it. A weaker profile
|
|
36
|
+
* therefore cannot be attested: changing any byte — dropping
|
|
37
|
+
* `restrict_network`, swapping `extends = "strict"` for a permissive base,
|
|
38
|
+
* renaming the profile — changes the digest and fails here. And the deny list
|
|
39
|
+
* this returns is not merely parsed and discarded: it is carried into the
|
|
40
|
+
* snapshot and re-asserted against the kernel's own `ProfileApplied`
|
|
41
|
+
* `deny_paths` by `parseGrokWorkerProfileApplied`, which independently
|
|
42
|
+
* requires `enforced`, `restrict_network`, `platform === "linux/landlock"`
|
|
43
|
+
* and the exact workspace. A length floor would only have caught a Spawnfile
|
|
44
|
+
* rendering bug that produced a trivial profile *and* pinned it consistently
|
|
45
|
+
* — and Spawnfile's own tests pin the rendered bytes.
|
|
46
|
+
*/
|
|
47
|
+
export declare function parseGrokWorkerSandboxProfile(bytes: Uint8Array, profileSha256: string): readonly string[];
|
|
48
|
+
/**
|
|
49
|
+
* Pre-launch half of the per-turn attestation. Besides the pinned profile and
|
|
50
|
+
* the events watermark it requires the 1.0.34 layout: events under
|
|
51
|
+
* `$GROK_HOME/sessions/` (the root `sandbox-events.jsonl` stays empty on
|
|
52
|
+
* 1.0.34), and a root-owned read-only worker home whose `config.toml` hashes to
|
|
53
|
+
* the declared renderer output (`grokWorkerHomeAttestation.ts`).
|
|
54
|
+
*
|
|
55
|
+
* It also refuses a deny list bubblewrap could not materialize
|
|
56
|
+
* (`grokWorkerDenyPlacement.ts`), naming the entry and the ancestor that stops
|
|
57
|
+
* it. Without this the worker dies with a bare `bwrap: Can't create file at
|
|
58
|
+
* …: Permission denied` on *every* turn, because one unplaceable entry makes
|
|
59
|
+
* Grok refuse the whole profile. The broker cannot descend into a directory
|
|
60
|
+
* opened to the worker's group alone (`<runtime home>/tool-state` under a
|
|
61
|
+
* `2000:<worker> 0710` home), so an `EACCES` there is left undecided; root
|
|
62
|
+
* provisioning, which holds `CAP_DAC_READ_SEARCH`, is the authority that
|
|
63
|
+
* decides every entry.
|
|
64
|
+
*/
|
|
65
|
+
export declare function prepareGrokWorkerAttestation(input: Readonly<{
|
|
66
|
+
profilePath: string;
|
|
67
|
+
eventsPath: string;
|
|
68
|
+
profileSha256: string;
|
|
69
|
+
workerUid: number;
|
|
70
|
+
workerGid?: number;
|
|
71
|
+
brokerGid: number;
|
|
72
|
+
configSha256: string;
|
|
73
|
+
registeredWorkers?: readonly Readonly<{
|
|
74
|
+
profilePath: string;
|
|
75
|
+
workerUid: number;
|
|
76
|
+
}>[];
|
|
77
|
+
}>, profileOwner?: Readonly<{
|
|
78
|
+
uid: number;
|
|
79
|
+
gid: number;
|
|
80
|
+
tmp?: GrokWorkerTmpOptions;
|
|
81
|
+
}>): Promise<Snapshot>;
|
|
82
|
+
/** The per-turn attestation input for one registration, carrying every registered worker so sibling temp is attested too. */
|
|
83
|
+
export declare const grokBrokerAttestationInput: <T extends Readonly<{
|
|
84
|
+
profilePath: string;
|
|
85
|
+
eventsPath: string;
|
|
86
|
+
profileSha256: string;
|
|
87
|
+
workerUid: number;
|
|
88
|
+
}>>(registration: T, registrations: readonly Readonly<{
|
|
89
|
+
profilePath: string;
|
|
90
|
+
workerUid: number;
|
|
91
|
+
}>[], configSha256: string) => T & {
|
|
92
|
+
brokerGid: number;
|
|
93
|
+
configSha256: string;
|
|
94
|
+
registeredWorkers: {
|
|
95
|
+
profilePath: string;
|
|
96
|
+
workerUid: number;
|
|
97
|
+
}[];
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* The accepted `ProfileApplied` line of one turn, as an absolute byte range of
|
|
101
|
+
* the events file plus its digest.
|
|
102
|
+
*/
|
|
103
|
+
export type GrokWorkerAttestationLock = {
|
|
104
|
+
accepted?: Readonly<{
|
|
105
|
+
offset: number;
|
|
106
|
+
length: number;
|
|
107
|
+
digest: string;
|
|
108
|
+
}>;
|
|
109
|
+
refused?: GrokWorkerAttestationFailure["failureClass"];
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* The per-turn isolation guard: every model request of a turn, and the
|
|
113
|
+
* post-turn check, go through the same lock.
|
|
114
|
+
*
|
|
115
|
+
* Why the first verification is trustworthy: the proxy awaits this guard before
|
|
116
|
+
* *every* upstream request, including the first, and the only worker-uid
|
|
117
|
+
* process that exists before request 1 is the Grok the launcher started under
|
|
118
|
+
* the pinned profile — tool children are created only after a model response.
|
|
119
|
+
* So the event accepted at request 1 was written before any tool child could
|
|
120
|
+
* write to the (worker-owned) events file. Later requests must find that exact
|
|
121
|
+
* line, byte for byte, at the same offset: a `ProfileApplied` appended later —
|
|
122
|
+
* which a tool child could forge — is never a substitute, and once a turn has
|
|
123
|
+
* been refused it stays refused.
|
|
124
|
+
*/
|
|
125
|
+
export declare function createGrokWorkerIsolationGuard(input: Parameters<typeof verifyGrokWorkerAttestation>[0], before: Snapshot): () => Promise<void>;
|
|
126
|
+
export declare function verifyGrokWorkerAttestation(input: Readonly<{
|
|
127
|
+
eventsPath: string;
|
|
128
|
+
workerUid: number;
|
|
129
|
+
brokerGid: number;
|
|
130
|
+
workspace: string;
|
|
131
|
+
}>, before: Snapshot, lock?: GrokWorkerAttestationLock): Promise<void>;
|
|
132
|
+
/**
|
|
133
|
+
* Requires one fully-conforming `ProfileApplied` event *somewhere* in the
|
|
134
|
+
* fresh region — not as its last line.
|
|
135
|
+
*
|
|
136
|
+
* `sandbox-events.jsonl` is not a profile log. Grok (1.0.13 and 1.0.34) writes its whole
|
|
137
|
+
* sandbox event vocabulary there — verified by reading the shipped binary:
|
|
138
|
+
* `ProfileApplied, ApplyFailed, FsViolation, NetViolation, BypassGranted,
|
|
139
|
+
* BypassDenied` (one contiguous enum blob beside the record fields
|
|
140
|
+
* `timestamp, event_type, read_only_paths, deny_paths, operation, target,
|
|
141
|
+
* command, tool_call_id`, emitted from `xai_grok_sandbox::logging`), and its
|
|
142
|
+
* own embedded documentation says so outright: "Sandbox events (profile
|
|
143
|
+
* applied, violations) are logged to `~/.grok/sandbox-events.jsonl`" (1.0.34
|
|
144
|
+
* moved the file to `~/.grok/sessions/`; a 1.0.34 turn logs `ProfileApplied`
|
|
145
|
+
* followed by an `FsViolation` for every denied read).
|
|
146
|
+
*
|
|
147
|
+
* Requiring `ProfileApplied` to be the *last* line therefore failed on the
|
|
148
|
+
* first denied access of any turn: the violation Grok logged next became the
|
|
149
|
+
* last line, this threw, the proxy's per-request isolation guard refused, and
|
|
150
|
+
* the turn died `profile_invalid`. Denials are the normal operating state of
|
|
151
|
+
* a working sandbox, so that check turned the sandbox doing its job into a
|
|
152
|
+
* turn failure.
|
|
153
|
+
*
|
|
154
|
+
* Scanning the region is not weaker. The region is fresh by construction —
|
|
155
|
+
* the caller reads only bytes above the pre-launch dev/ino/size watermark, so
|
|
156
|
+
* nothing here predates this turn and a stale or replayed event below it is
|
|
157
|
+
* unreachable. Both forms are equally forgeable by the same single actor (a
|
|
158
|
+
* worker-uid process, which can only exist by being a Grok that the launcher
|
|
159
|
+
* already started under the pinned profile), and both detect the failure this
|
|
160
|
+
* guard exists for: a Grok that came up without kernel enforcement, which
|
|
161
|
+
* emits no conforming `ProfileApplied` at all.
|
|
162
|
+
*/
|
|
163
|
+
export declare function parseGrokWorkerProfileApplied(bytes: Uint8Array, workspace: string, denyPaths?: readonly string[]): void;
|
|
164
|
+
/** Byte range (within `bytes`) of the first fully-conforming `ProfileApplied` line. */
|
|
165
|
+
export declare function locateGrokWorkerProfileApplied(bytes: Uint8Array, workspace: string, denyPaths?: readonly string[]): Readonly<{
|
|
166
|
+
offset: number;
|
|
167
|
+
length: number;
|
|
168
|
+
}>;
|
|
169
|
+
export {};
|
|
170
|
+
//# sourceMappingURL=grokWorkerAttestation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grokWorkerAttestation.d.ts","sourceRoot":"","sources":["../../src/runtime/grokWorkerAttestation.ts"],"names":[],"mappings":"AAOA,OAAO,EAAiD,KAAK,oBAAoB,EAA4B,MAAM,+BAA+B,CAAC;AAGnJ;;;;;GAKG;AACH,MAAM,MAAM,6BAA6B,GAAC,QAAQ,CAAC;IAAC,GAAG,EAAC,MAAM,CAAC;IAAA,GAAG,EAAC,MAAM,CAAC;IAAA,IAAI,EAAC,MAAM,CAAC;IAAA,SAAS,EAAC,SAAS,MAAM,EAAE,CAAA;CAAC,CAAC,CAAC;AACpH,KAAK,QAAQ,GAAC,6BAA6B,CAAC;AAC5C,qBAAa,4BAA6B,SAAQ,KAAK;IAAe,QAAQ,CAAC,YAAY,EAAC,iBAAiB,GAAC,iBAAiB;gBAAhD,YAAY,EAAC,iBAAiB,GAAC,iBAAiB;CAA4D;AAC3L;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAC,UAAU,EAAC,aAAa,EAAC,MAAM,GAAE,SAAS,MAAM,EAAE,CAUrG;AACD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,4BAA4B,CAAC,KAAK,EAAC,QAAQ,CAAC;IAAC,WAAW,EAAC,MAAM,CAAC;IAAA,UAAU,EAAC,MAAM,CAAC;IAAA,aAAa,EAAC,MAAM,CAAC;IAAA,SAAS,EAAC,MAAM,CAAC;IAAA,SAAS,CAAC,EAAC,MAAM,CAAC;IAAA,SAAS,EAAC,MAAM,CAAC;IAAA,YAAY,EAAC,MAAM,CAAC;IAAA,iBAAiB,CAAC,EAAC,SAAS,QAAQ,CAAC;QAAC,WAAW,EAAC,MAAM,CAAC;QAAA,SAAS,EAAC,MAAM,CAAA;KAAC,CAAC,EAAE,CAAA;CAAC,CAAC,EAAC,YAAY,GAAC,QAAQ,CAAC;IAAC,GAAG,EAAC,MAAM,CAAC;IAAA,GAAG,EAAC,MAAM,CAAC;IAAA,GAAG,CAAC,EAAC,oBAAoB,CAAA;CAAC,CAAe,GAAE,OAAO,CAAC,QAAQ,CAAC,CAW7X;AACD,6HAA6H;AAC7H,eAAO,MAAM,0BAA0B,GAAE,CAAC,SAAS,QAAQ,CAAC;IAAC,WAAW,EAAC,MAAM,CAAC;IAAA,UAAU,EAAC,MAAM,CAAC;IAAA,aAAa,EAAC,MAAM,CAAC;IAAA,SAAS,EAAC,MAAM,CAAA;CAAC,CAAC,EAAE,cAAa,CAAC,EAAC,eAAc,SAAS,QAAQ,CAAC;IAAC,WAAW,EAAC,MAAM,CAAC;IAAA,SAAS,EAAC,MAAM,CAAA;CAAC,CAAC,EAAE,EAAC,cAAa,MAAM;;;;;;;CAA4J,CAAC;AACnZ;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAC;IAAC,QAAQ,CAAC,EAAC,QAAQ,CAAC;QAAC,MAAM,EAAC,MAAM,CAAC;QAAA,MAAM,EAAC,MAAM,CAAC;QAAA,MAAM,EAAC,MAAM,CAAA;KAAC,CAAC,CAAC;IAAA,OAAO,CAAC,EAAC,4BAA4B,CAAC,cAAc,CAAC,CAAA;CAAC,CAAC;AAE9J;;;;;;;;;;;;;GAaG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAC,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC,CAAC,CAAC,EAAC,MAAM,EAAC,QAAQ,GAAE,MAAI,OAAO,CAAC,IAAI,CAAC,CAOxI;AACD,wBAAsB,2BAA2B,CAAC,KAAK,EAAC,QAAQ,CAAC;IAAC,UAAU,EAAC,MAAM,CAAC;IAAA,SAAS,EAAC,MAAM,CAAC;IAAA,SAAS,EAAC,MAAM,CAAC;IAAA,SAAS,EAAC,MAAM,CAAA;CAAC,CAAC,EAAC,MAAM,EAAC,QAAQ,EAAC,IAAI,CAAC,EAAC,yBAAyB,GAAE,OAAO,CAAC,IAAI,CAAC,CAyBtM;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAC,UAAU,EAAC,SAAS,EAAC,MAAM,EAAC,SAAS,GAAC,SAAS,MAAM,EAAK,GAAE,IAAI,CAA4D;AAChL,uFAAuF;AACvF,wBAAgB,8BAA8B,CAAC,KAAK,EAAC,UAAU,EAAC,SAAS,EAAC,MAAM,EAAC,SAAS,GAAC,SAAS,MAAM,EAAK,GAAE,QAAQ,CAAC;IAAC,MAAM,EAAC,MAAM,CAAC;IAAA,MAAM,EAAC,MAAM,CAAA;CAAC,CAAC,CAavJ"}
|