@almadar/shell-runtime 0.1.0 → 1.0.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/dist/chunk-57SBCUSM.js +62 -0
- package/dist/chunk-625EP7W2.js +108 -0
- package/dist/{chunk-NATGCIVM.js → chunk-7WB6VWRK.js} +344 -129
- package/dist/{chunk-Q2H75UYT.js → chunk-A2JJT4GA.js} +1 -37
- package/dist/chunk-BAS26HBN.js +10 -0
- package/dist/{chunk-REPX5QPI.js → chunk-BOVU4TCQ.js} +11 -3
- package/dist/chunk-BY5G4225.js +6 -0
- package/dist/chunk-DFDNHVDW.js +284 -0
- package/dist/chunk-I3TKINSO.js +398 -0
- package/dist/{chunk-DYOJGLIX.js → chunk-LKWYCYX5.js} +2 -5
- package/dist/chunk-LYFIQPXX.js +1 -0
- package/dist/{chunk-VNMG7NKY.js → chunk-MU335ZA4.js} +20 -26
- package/dist/{chunk-ODJCZ27I.js → chunk-N7HYNKK6.js} +35 -2
- package/dist/{chunk-4J2QEIUV.js → chunk-NTFQ36UN.js} +4 -30
- package/dist/chunk-NU6LVKGS.js +15 -0
- package/dist/chunk-P2N6K2IV.js +20 -0
- package/dist/{chunk-QQRDUMB2.js → chunk-QCJWPXLH.js} +11 -11
- package/dist/{chunk-QELZ6TEJ.js → chunk-UD2CXYSJ.js} +39 -3
- package/dist/{chunk-UJHOUZAL.js → chunk-V4EMDPCO.js} +2 -5
- package/dist/chunk-VNGXRYFF.js +9 -0
- package/dist/{chunk-HNOAZWFH.js → chunk-WGCWJOT2.js} +2 -0
- package/dist/chunk-X6W44WHO.js +26 -0
- package/dist/chunk-ZUSM4VW4.js +197 -0
- package/dist/client/EventTransport.d.ts +23 -7
- package/dist/client/EventTransport.js +1 -2
- package/dist/client/awaiting.js +0 -1
- package/dist/client/channel-transport.d.ts +6 -6
- package/dist/client/channel-transport.js +0 -1
- package/dist/client/circuit-store.d.ts +16 -5
- package/dist/client/circuit-store.js +2 -3
- package/dist/client/client-kernel.d.ts +36 -15
- package/dist/client/declared-input-dispatch.d.ts +19 -2
- package/dist/client/declared-input-dispatch.js +1 -2
- package/dist/client/inbound-dispatch.d.ts +21 -2
- package/dist/client/inbound-dispatch.js +1 -2
- package/dist/client/local-fold.d.ts +15 -8
- package/dist/client/local-fold.js +1 -2
- package/dist/client/render-sigils.js +0 -1
- package/dist/client/state-book.d.ts +9 -16
- package/dist/client/state-book.js +1 -2
- package/dist/client/trait-mount-error.js +0 -1
- package/dist/credentials/env-vars.d.ts +5 -1
- package/dist/credentials/env-vars.js +1 -3
- package/dist/credentials/scope.d.ts +8 -7
- package/dist/credentials/scope.js +0 -1
- package/dist/credentials/vault.d.ts +142 -0
- package/dist/credentials/vault.js +1 -0
- package/dist/effects/in-flight-calls.js +0 -1
- package/dist/effects/on-device-model.js +0 -1
- package/dist/events/EventBus.d.ts +1 -4
- package/dist/events/EventBus.js +0 -1
- package/dist/events/emit-stamp.js +0 -1
- package/dist/index.d.ts +25 -42
- package/dist/index.js +27 -45
- package/dist/kernel/decode.d.ts +8 -10
- package/dist/kernel/decode.js +1 -2
- package/dist/kernel/engine.d.ts +132 -31
- package/dist/kernel/engine.js +7 -9
- package/dist/kernel/frame-applier.d.ts +8 -7
- package/dist/kernel/frame-applier.js +1 -2
- package/dist/kernel/host.d.ts +127 -16
- package/dist/kernel/host.js +4 -7
- package/dist/kernel/lane.d.ts +1 -22
- package/dist/kernel/lane.js +1 -2
- package/dist/kernel/os-fetch-port.d.ts +7 -0
- package/dist/kernel/os-fetch-port.js +3 -0
- package/dist/kernel/os-port.d.ts +30 -8
- package/dist/kernel/os-port.js +1 -2
- package/dist/kernel/program-effects.d.ts +11 -28
- package/dist/kernel/program-effects.js +1 -2
- package/dist/kernel/secret-ports.d.ts +139 -0
- package/dist/kernel/secret-ports.js +2 -0
- package/dist/kernel/wire.d.ts +50 -12
- package/dist/loader/fetch-loader.d.ts +26 -0
- package/dist/loader/fetch-loader.js +1 -0
- package/dist/loader/lazy-page.js +0 -1
- package/dist/loader/schema-loader.d.ts +1 -17
- package/dist/persistence/native-memory.js +0 -1
- package/dist/runtime/entities/declaredCollections.d.ts +6 -0
- package/dist/runtime/entities/declaredCollections.js +1 -0
- package/dist/runtime/evaluation/local-store-transport.d.ts +14 -23
- package/dist/runtime/evaluation/local-store-transport.js +9 -13
- package/dist/runtime/evaluation/residence-transport.d.ts +3 -3
- package/dist/runtime/evaluation/residence-transport.js +1 -2
- package/dist/runtime/evaluation/routed-persistence.js +0 -1
- package/dist/runtime/events/identity/routing.d.ts +2 -53
- package/dist/runtime/events/identity/routing.js +1 -2
- package/dist/runtime/types.d.ts +5 -205
- package/dist/runtime/types.js +1 -2
- package/dist/service/default-call-service.js +0 -1
- package/dist/service/service-provider.js +0 -1
- package/package.json +8 -5
- package/dist/chunk-2JU7Y4KU.js +0 -21
- package/dist/chunk-46RWK2B5.js +0 -28
- package/dist/chunk-4ZICQ5PM.js +0 -192
- package/dist/chunk-53IPZXDP.js +0 -76
- package/dist/chunk-5D63EMO5.js +0 -16
- package/dist/chunk-CPSQXEJ6.js +0 -55
- package/dist/chunk-CQP5XAX6.js +0 -173
- package/dist/chunk-CROS2GEX.js +0 -49
- package/dist/chunk-D4XJTBLB.js +0 -217
- package/dist/chunk-D5USD2EX.js +0 -232
- package/dist/chunk-EV56K4GB.js +0 -63
- package/dist/chunk-FQ6IZMIU.js +0 -10
- package/dist/chunk-HMK6YMQS.js +0 -135
- package/dist/chunk-IHQLE5M7.js +0 -62
- package/dist/chunk-JFWFDUTR.js +0 -35
- package/dist/chunk-MHYSHSRG.js +0 -54
- package/dist/chunk-MLKGABMK.js +0 -7
- package/dist/chunk-NAECVIAR.js +0 -322
- package/dist/chunk-Q7JK4KY7.js +0 -9
- package/dist/chunk-RBUMDYFS.js +0 -681
- package/dist/chunk-SAS5KKCR.js +0 -43
- package/dist/chunk-SWPDU752.js +0 -28
- package/dist/chunk-T775TUCD.js +0 -18
- package/dist/chunk-VMOBW7RK.js +0 -21
- package/dist/chunk-WNPNNYXY.js +0 -22
- package/dist/chunk-XB5GYODW.js +0 -28
- package/dist/chunk-YL2SO5TP.js +0 -334
- package/dist/chunk-YO4LWS3I.js +0 -606
- package/dist/chunk-ZAQSS47X.js +0 -157
- package/dist/chunk-ZCQUUJIF.js +0 -129
- package/dist/client/ServerBridge.d.ts +0 -126
- package/dist/client/ServerBridge.js +0 -3
- package/dist/credentials/seed.d.ts +0 -21
- package/dist/credentials/seed.js +0 -2
- package/dist/credentials/store.d.ts +0 -110
- package/dist/credentials/store.js +0 -2
- package/dist/index-hT1xCdTq.d.ts +0 -46
- package/dist/kernel/beacon.d.ts +0 -32
- package/dist/kernel/beacon.js +0 -2
- package/dist/kernel/http.d.ts +0 -302
- package/dist/kernel/http.js +0 -6
- package/dist/kernel/oauth-effects.d.ts +0 -25
- package/dist/kernel/oauth-effects.js +0 -7
- package/dist/kernel/oauth-port.d.ts +0 -31
- package/dist/kernel/oauth-port.js +0 -2
- package/dist/loader/http-loader.d.ts +0 -111
- package/dist/loader/http-loader.js +0 -2
- package/dist/runtime/effects/composition/compose-behaviors.d.ts +0 -58
- package/dist/runtime/effects/composition/compose-behaviors.js +0 -4
- package/dist/runtime/effects/composition/event-wiring.d.ts +0 -38
- package/dist/runtime/effects/composition/event-wiring.js +0 -2
- package/dist/runtime/effects/composition/index.d.ts +0 -5
- package/dist/runtime/effects/composition/index.js +0 -6
- package/dist/runtime/effects/composition/layout-strategy.d.ts +0 -35
- package/dist/runtime/effects/composition/layout-strategy.js +0 -2
- package/dist/runtime/effects/composition/pipe.d.ts +0 -25
- package/dist/runtime/effects/composition/pipe.js +0 -2
- package/dist/runtime/entities/mockStoreSeed.d.ts +0 -56
- package/dist/runtime/entities/mockStoreSeed.js +0 -3
- package/dist/runtime/entities/seedBrowserStore.d.ts +0 -28
- package/dist/runtime/entities/seedBrowserStore.js +0 -2
- package/dist/runtime/entities/std-mock-seed.d.ts +0 -87
- package/dist/runtime/entities/std-mock-seed.js +0 -2
- package/dist/runtime/time/TickScheduler.d.ts +0 -77
- package/dist/runtime/time/TickScheduler.js +0 -3
- package/dist/runtime/time/cron.d.ts +0 -25
- package/dist/runtime/time/cron.js +0 -2
- package/dist/runtime/time/duration.d.ts +0 -20
- package/dist/runtime/time/duration.js +0 -2
- package/dist/runtime/traits/OrbitalTraitParsing.d.ts +0 -34
- package/dist/runtime/traits/OrbitalTraitParsing.js +0 -2
- package/dist/runtime/traits/listen-targets.d.ts +0 -16
- package/dist/runtime/traits/listen-targets.js +0 -3
- package/dist/runtime/traits/trait-index.d.ts +0 -35
- package/dist/runtime/traits/trait-index.js +0 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,60 +1,43 @@
|
|
|
1
|
-
export { AccessTokenProvider, COMPRESSED_BODY_MIN_BYTES, EventTransport, EventTransportRegisterResult, HostDispatchListener, HttpTransportOptions, InProcessTransportOptions, OrbitalEvaluator, PushTarget, createHttpTransport, createInProcessTransport, deriveCarriesCircuitState, encodeJsonBody } from './client/EventTransport.js';
|
|
2
|
-
export { ServerBridge, ServerBridgeConfig, ServerBridgeState, createServerBridge } from './client/ServerBridge.js';
|
|
1
|
+
export { AccessTokenProvider, COMPRESSED_BODY_MIN_BYTES, EventTransport, EventTransportRegisterResult, HostDispatchListener, HttpTransportOptions, InProcessTransportOptions, OrbitalEvaluator, PushTarget, SessionEndedError, TransportStatusError, createHttpTransport, createInProcessTransport, deriveCarriesCircuitState, encodeJsonBody } from './client/EventTransport.js';
|
|
3
2
|
export { AwaitingRegistry } from './client/awaiting.js';
|
|
4
3
|
export { ChannelMessage, ChannelTransportOptions, ServedChannel, TransportChannel, createChannelTransport, holdUntilServed, serveChannel } from './client/channel-transport.js';
|
|
5
|
-
export { CircuitStore, TraitSnapshot, createMemoryCircuitStore } from './client/circuit-store.js';
|
|
6
|
-
export { ClientDispatchHooks, ClientKernel, ClientKernelOutcome, ClientMountHooks, ClientMountOutcome, LocalFoldKernel } from './client/client-kernel.js';
|
|
4
|
+
export { CircuitStore, FrameOutcome, TraitSnapshot, createMemoryCircuitStore } from './client/circuit-store.js';
|
|
5
|
+
export { ClientDispatchHooks, ClientEmitOutcome, ClientKernel, ClientKernelOutcome, ClientMountHooks, ClientMountOutcome, LocalFoldKernel } from './client/client-kernel.js';
|
|
7
6
|
export { dispatchDeclaredInput } from './client/declared-input-dispatch.js';
|
|
8
|
-
export { dispatchInbound } from './client/inbound-dispatch.js';
|
|
9
|
-
export { LocalFoldOptions, createLocalFold,
|
|
7
|
+
export { InboundContract, dispatchInbound } from './client/inbound-dispatch.js';
|
|
8
|
+
export { FramesSince, LocalFoldOptions, createLocalFold, paintFrames, paintResponse, paintStates, traceResponse } from './client/local-fold.js';
|
|
10
9
|
export { DEFAULT_THEME_KEY, appNavItems, inlineNavItems, sigilThemeKey } from './client/render-sigils.js';
|
|
11
|
-
export { StateBook, createInitialTraitState, findInitialState
|
|
10
|
+
export { StateBook, createInitialTraitState, findInitialState } from './client/state-book.js';
|
|
12
11
|
export { TraitMountError } from './client/trait-mount-error.js';
|
|
13
12
|
export { RollbackCause, TraitState, TransitionObserver } from './client/trait-types.js';
|
|
14
|
-
export { STORE_BOOTSTRAP_ENV_VARS, allCredentialEnvVars } from './credentials/env-vars.js';
|
|
13
|
+
export { CREDENTIAL_MASTER_KEY_ENV, CREDENTIAL_PREVIOUS_MASTER_KEY_ENV, STORE_BOOTSTRAP_ENV_VARS, allCredentialEnvVars } from './credentials/env-vars.js';
|
|
15
14
|
export { CREDENTIALS_SOURCE_ENV, CredentialMode, CredentialModeControl, CredentialScopeStorage, credentialModeFromEnv, credentialsFromStoreOnly, getEffectiveCredentialStore, getInstalledCredentialStore, getModeControl, installCredentialScopeStorage, installCredentialStore, installModeControl, resolveCredentialRef, runWithCredentialScope, uninstallCredentialStore } from './credentials/scope.js';
|
|
16
|
-
export {
|
|
17
|
-
export { CREDENTIAL_ENTITY_TYPE, CREDENTIAL_MASTER_KEY_ENV, CREDENTIAL_PREVIOUS_MASTER_KEY_ENV, CredentialEntry, CredentialPersistence, CredentialStore, DERIVED_ENTITY_TYPE, DerivedPersistence } from './credentials/store.js';
|
|
15
|
+
export { CredentialEntry, CredentialExchangeError, CredentialListing, CredentialRotation, CredentialRowsPort, CredentialVault, CredentialVaultKernel, CredentialVaultModule, TokenEndpointPost, TokenReply, TokenRequest } from './credentials/vault.js';
|
|
18
16
|
export { InFlightCalls, KeyedCallLease, KeyedCallOutcome, untilAborted } from './effects/in-flight-calls.js';
|
|
19
17
|
export { NO_ON_DEVICE_EMBEDDER, NO_ON_DEVICE_MODEL, OnDeviceModelFailure, embedOnDevice, promptOnDevice } from './effects/on-device-model.js';
|
|
20
18
|
export { EventBus, createEventBus } from './events/EventBus.js';
|
|
21
19
|
export { StampEmitIdentity, stampEmitSource } from './events/emit-stamp.js';
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
32
|
-
export { CascadeOutcome, PROGRAM_EFFECTS, PlayedStep, ProgramEffectName, ProgramEffectOutcome, ProgramValidationReport, StepRequest, isProgramEffect } from './kernel/program-effects.js';
|
|
33
|
-
export { KernelModule, KernelServerClass, KernelServerHandle } from './kernel/wire.js';
|
|
34
|
-
export { HttpImportChain, HttpLoader, createHttpLoader } from './loader/http-loader.js';
|
|
20
|
+
export { decodeDueTicks, decodeNext, decodeProgress, decodeResolveProgress } from './kernel/decode.js';
|
|
21
|
+
export { KernelEngine, KernelEvaluation, ProgramlessContract, evaluateOnKernel, kernelRequest } from './kernel/engine.js';
|
|
22
|
+
export { FrameApplied, FrameDispatch, FramePostPort, TickEffects, applyFrame, decodeFrame } from './kernel/frame-applier.js';
|
|
23
|
+
export { DeferredCallOutcome, EventRequestParser, HostAskError, HostAskFailureKind, HostAskOutcome, HostAskReturn, HostAudioAsk, HostConsentAnswer, HostConsentRequest, HostSignInAnswer, HostSignInRequest, KernelAnswerScope, KernelCallService, KernelHostActions, KernelHostPorts, SubstrateStreamSource, answerRequest, completeTls, consentFromRedirect, declareCapabilities, finishTls, hostAskReturn, kernelEventRequestParser, parseConsentRequest, parseSignInRequest, performHostAnswer, performHostAsk, writeRows } from './kernel/host.js';
|
|
24
|
+
export { CredentialAdminPort, CredentialConnectPort, EnvTailsPort, RANDOM_BYTES_MAX, RandomSource, SecretPorts, SecretPortsOptions, SecretStore, SecretStoreHost, base64Standard, base64Url, createBrowserSecretPorts, createCredentialAdminPort, createCredentialConnectPort, createSecretPorts, createSecretStore, credentialForgetPayload, credentialStatusPayload, envTailsOf, randomBytesPayload, systemRandom, userCredentialKey } from './kernel/secret-ports.js';
|
|
25
|
+
export { LaneHeldByParkedDispatch } from './kernel/lane.js';
|
|
26
|
+
export { AnchoredPath, OsAnchorProblem, OsAnchors, OsCompletionEvent, OsCompletionMatchers, OsCompletionPort, OsDesktopKind, OsFsMode, OsGrantKernel, OsGrantMatchers, OsGrantPort, OsHostPort, OsNetKind, OsRequirement, OsStdioKind, OsSysKind, OsTlsKernel, OsTlsPort, OsTlsStep, anchoredGrants, expandAnchor, kernelOsCompletions, kernelOsGrants, kernelOsTls } from './kernel/os-port.js';
|
|
27
|
+
export { createFetchOsHost } from './kernel/os-fetch-port.js';
|
|
28
|
+
export { PROGRAM_EFFECTS, ProgramEffectName, ProgramEffectOutcome, ProgramValidationReport, StepRequest, isProgramEffect } from './kernel/program-effects.js';
|
|
29
|
+
export { FiredByOrbital, KernelModule, KernelServerClass, KernelServerHandle } from './kernel/wire.js';
|
|
35
30
|
export { loadLazyPage } from './loader/lazy-page.js';
|
|
36
|
-
export {
|
|
37
|
-
export {
|
|
38
|
-
export {
|
|
39
|
-
export { i as composition } from './index-hT1xCdTq.js';
|
|
40
|
-
export { LayoutStrategy, detectLayoutStrategy } from './runtime/effects/composition/layout-strategy.js';
|
|
41
|
-
export { PipeStep, pipeBehaviors } from './runtime/effects/composition/pipe.js';
|
|
42
|
-
export { MockSeedHost, MockSeedViewer, MockSeeded, bindDeclaredCollections, restampMockOwner, seedMockStore } from './runtime/entities/mockStoreSeed.js';
|
|
43
|
-
export { MockSeedEngine, MockSeedRun, SeedConfig, SeedOwnerCell, SeedOwnerChange, SeedOwnerJournal, SeedRestamp, SeededDataset, StdMockSeed, declaredSeedConfig, readSeededStores } from './runtime/entities/std-mock-seed.js';
|
|
44
|
-
export { BrowserSeedHost, seedBrowserStore } from './runtime/entities/seedBrowserStore.js';
|
|
31
|
+
export { FetchSchemaLoader } from './loader/fetch-loader.js';
|
|
32
|
+
export { BaseLoaderOptions, ImportChainLike, LoadResult, LoadedOrbital, LoadedSchema, SchemaLoader } from './loader/schema-loader.js';
|
|
33
|
+
export { bindDeclaredCollections } from './runtime/entities/declaredCollections.js';
|
|
45
34
|
export { LocalKernelOptions, LocalStoreTransportOptions, createLocalStoreTransport, localStorePersistence, openLocalKernel, resolveLocalRows } from './runtime/evaluation/local-store-transport.js';
|
|
46
35
|
export { ResidenceTransportOptions, createResidenceTransport } from './runtime/evaluation/residence-transport.js';
|
|
47
36
|
export { routeByEntity } from './runtime/evaluation/routed-persistence.js';
|
|
48
|
-
export {
|
|
49
|
-
export {
|
|
50
|
-
export { CronFields, cronMatches, cronMinuteKey, isValidCronExpression, parseCron, parseCronField } from './runtime/time/cron.js';
|
|
51
|
-
export { isValidDurationString, parseDurationString } from './runtime/time/duration.js';
|
|
52
|
-
export { ParsedOrbitalTraits, parseOrbitalTraits } from './runtime/traits/OrbitalTraitParsing.js';
|
|
53
|
-
export { CollectedListenerTarget, collectListenerTargets } from './runtime/traits/listen-targets.js';
|
|
54
|
-
export { buildTraitIndex } from './runtime/traits/trait-index.js';
|
|
55
|
-
export { BindingContext, BrowserFileMeta, BrowserFilePickerOptions, BrowserGeolocationOptions, BrowserGeolocationPosition, ConfigContext, Effect, EffectContext, EffectHandlers, EffectResult, EvaluationContextExtensions, EventListener, ExecutionEnvironment, HANDLER_MANIFEST, HttpEffectReport, IEventBus, PatternProps, PersistBatchSummary, RuntimeConfig, RuntimeEvent, RuntimePatternValue, RuntimeRenderPattern, TransitionResult, Unsubscribe, isEffectTuple } from './runtime/types.js';
|
|
37
|
+
export { eventRouteKey } from './runtime/events/identity/routing.js';
|
|
38
|
+
export { BindingContext, Effect, EffectHandlers, EffectResult, EvaluationContextExtensions, EventListener, IEventBus, PatternProps, RuntimeEvent, Unsubscribe } from './runtime/types.js';
|
|
56
39
|
export { CallServiceHandler, ServiceMessageRoute, defaultCallService } from './service/default-call-service.js';
|
|
57
40
|
export { ServiceCallContext, ServiceCallError, ServiceCallErrorCode, ServiceProvider, callRegisteredService, registerServiceProvider, registeredServices, unregisterServiceProvider } from './service/service-provider.js';
|
|
58
41
|
export { NativeMemoryPersistenceAdapter, NativeMemoryWriteError } from './persistence/native-memory.js';
|
|
59
|
-
export { CallRoutesWire, CallSiteWire, CallerWire,
|
|
60
|
-
export { EntityRow, EventPayload, FetchResult,
|
|
42
|
+
export { CallRoutesWire, CallSiteWire, CallerWire, IoAnswerWire, IoReplyWire, IoRequestWire, NextWire, PendingRequestWire, PlayedStep, ResolveProgressWire, ServerProgressWire, Settled, SubstrateFailureWire, decodeIoRequestWire as decodeRequest } from '@almadar/core/kernel-wire';
|
|
43
|
+
export { EntityRow, EventPayload, FetchResult, ServiceParams } from '@almadar/core';
|
package/dist/index.js
CHANGED
|
@@ -1,59 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export { collectListenerTargets } from './chunk-XB5GYODW.js';
|
|
6
|
-
export { buildSourceMatcher, eventRouteKey, parseListenSource } from './chunk-IHQLE5M7.js';
|
|
7
|
-
export { composition_exports as composition } from './chunk-5D63EMO5.js';
|
|
8
|
-
export { pipeBehaviors } from './chunk-FQ6IZMIU.js';
|
|
9
|
-
export { bindDeclaredCollections, restampMockOwner, seedMockStore } from './chunk-JFWFDUTR.js';
|
|
10
|
-
export { seedBrowserStore } from './chunk-T775TUCD.js';
|
|
11
|
-
export { StdMockSeed, declaredSeedConfig, readSeededStores } from './chunk-HMK6YMQS.js';
|
|
12
|
-
export { createLocalStoreTransport, localStorePersistence, openLocalKernel, resolveLocalRows } from './chunk-VNMG7NKY.js';
|
|
1
|
+
import './chunk-ELBLT2HZ.js';
|
|
2
|
+
export { NativeMemoryPersistenceAdapter, NativeMemoryWriteError } from './chunk-7SDV3QWR.js';
|
|
3
|
+
export { bindDeclaredCollections } from './chunk-BAS26HBN.js';
|
|
4
|
+
export { createLocalStoreTransport, localStorePersistence, openLocalKernel, resolveLocalRows } from './chunk-MU335ZA4.js';
|
|
13
5
|
export { defaultCallService } from './chunk-4SEK5ER2.js';
|
|
14
6
|
export { ServiceCallError, callRegisteredService, registerServiceProvider, registeredServices, unregisterServiceProvider } from './chunk-UBN5JJKZ.js';
|
|
7
|
+
export { createResidenceTransport } from './chunk-V4EMDPCO.js';
|
|
15
8
|
export { routeByEntity } from './chunk-O57GKTYU.js';
|
|
16
|
-
export {
|
|
17
|
-
|
|
18
|
-
export {
|
|
9
|
+
export { eventRouteKey } from './chunk-BY5G4225.js';
|
|
10
|
+
import './chunk-LYFIQPXX.js';
|
|
11
|
+
export { createFetchOsHost } from './chunk-625EP7W2.js';
|
|
12
|
+
export { anchoredGrants, expandAnchor, kernelOsCompletions, kernelOsGrants, kernelOsTls } from './chunk-BOVU4TCQ.js';
|
|
19
13
|
import './chunk-EZZYLTWY.js';
|
|
20
|
-
export {
|
|
14
|
+
export { FetchSchemaLoader } from './chunk-57SBCUSM.js';
|
|
21
15
|
export { loadLazyPage } from './chunk-XXWNMJI6.js';
|
|
22
|
-
import './chunk-ELBLT2HZ.js';
|
|
23
|
-
export { NativeMemoryPersistenceAdapter, NativeMemoryWriteError } from './chunk-7SDV3QWR.js';
|
|
24
|
-
export { composeBehaviors } from './chunk-ZCQUUJIF.js';
|
|
25
|
-
export { detectLayoutStrategy } from './chunk-EV56K4GB.js';
|
|
26
|
-
export { applyEventWiring } from './chunk-MHYSHSRG.js';
|
|
27
|
-
export { KernelEngine, evaluateOnKernel, kernelRequest } from './chunk-D4XJTBLB.js';
|
|
28
|
-
export { applyFrame, decodeFrame, isFrameWire } from './chunk-4J2QEIUV.js';
|
|
29
|
-
export { answerRequest, declareCapabilities, writeRows } from './chunk-NATGCIVM.js';
|
|
30
|
-
export { PROGRAM_EFFECTS, isProgramEffect } from './chunk-HNOAZWFH.js';
|
|
31
|
-
export { DispatchLane, LaneHeldByParkedDispatch } from './chunk-53IPZXDP.js';
|
|
32
|
-
export { OAuthEffectFailure, oauthAuthorizePayload, oauthConnectionPayload } from './chunk-ZAQSS47X.js';
|
|
33
|
-
export { HttpEffectFailure, HttpUnavailableError, RANDOM_BYTES_MAX, base64Standard, base64Url, checkOAuthReply, createBrowserHttpPorts, createCredentialAdminPort, createHttpPorts, createHttpSecrets, credentialForgetPayload, credentialStatusPayload, installNetPort, isOAuthCode, isOAuthReason, randomBytesPayload, runHttpCall, sendBeaconRequest, sendHttp, streamHttp, systemRandom, unavailableFailure, userCredentialKey } from './chunk-YO4LWS3I.js';
|
|
34
|
-
export { PENDING_GRACE_MS, createOAuthPort } from './chunk-4ZICQ5PM.js';
|
|
35
|
-
export { anchoredGrants, expandAnchor, kernelOsCompletions, kernelOsGrants } from './chunk-REPX5QPI.js';
|
|
36
|
-
export { InFlightCalls, untilAborted } from './chunk-MZKIL5IN.js';
|
|
37
|
-
export { NO_ON_DEVICE_EMBEDDER, NO_ON_DEVICE_MODEL, OnDeviceModelFailure, embedOnDevice, promptOnDevice } from './chunk-FWA5K7Q2.js';
|
|
38
16
|
export { EventBus, createEventBus } from './chunk-SOQDEPME.js';
|
|
39
17
|
export { stampEmitSource } from './chunk-64IH2SMY.js';
|
|
40
|
-
export {
|
|
41
|
-
export {
|
|
42
|
-
export {
|
|
18
|
+
export { KernelEngine, evaluateOnKernel, kernelRequest } from './chunk-I3TKINSO.js';
|
|
19
|
+
export { LaneHeldByParkedDispatch } from './chunk-NU6LVKGS.js';
|
|
20
|
+
export { decodeDueTicks, decodeNext, decodeProgress, decodeIoRequestWire as decodeRequest, decodeResolveProgress } from './chunk-X6W44WHO.js';
|
|
21
|
+
export { applyFrame, decodeFrame } from './chunk-NTFQ36UN.js';
|
|
22
|
+
export { HostAskError, answerRequest, completeTls, consentFromRedirect, declareCapabilities, finishTls, hostAskReturn, kernelEventRequestParser, parseConsentRequest, parseSignInRequest, performHostAnswer, performHostAsk, writeRows } from './chunk-7WB6VWRK.js';
|
|
23
|
+
export { PROGRAM_EFFECTS, isProgramEffect } from './chunk-WGCWJOT2.js';
|
|
24
|
+
export { RANDOM_BYTES_MAX, base64Standard, base64Url, createBrowserSecretPorts, createCredentialAdminPort, createCredentialConnectPort, createSecretPorts, createSecretStore, credentialForgetPayload, credentialStatusPayload, envTailsOf, randomBytesPayload, systemRandom, userCredentialKey } from './chunk-ZUSM4VW4.js';
|
|
25
|
+
export { NO_ON_DEVICE_EMBEDDER, NO_ON_DEVICE_MODEL, OnDeviceModelFailure, embedOnDevice, promptOnDevice } from './chunk-FWA5K7Q2.js';
|
|
43
26
|
export { DEFAULT_THEME_KEY, appNavItems, inlineNavItems, sigilThemeKey } from './chunk-UP6GGGAN.js';
|
|
44
27
|
export { TraitMountError } from './chunk-IOPUS6Q5.js';
|
|
45
28
|
import './chunk-P53CKOME.js';
|
|
46
|
-
export { STORE_BOOTSTRAP_ENV_VARS, allCredentialEnvVars } from './chunk-
|
|
47
|
-
export { CREDENTIAL_ENTITY_TYPE, CREDENTIAL_MASTER_KEY_ENV, CREDENTIAL_PREVIOUS_MASTER_KEY_ENV, CredentialStore, DERIVED_ENTITY_TYPE } from './chunk-NAECVIAR.js';
|
|
29
|
+
export { CREDENTIAL_MASTER_KEY_ENV, CREDENTIAL_PREVIOUS_MASTER_KEY_ENV, STORE_BOOTSTRAP_ENV_VARS, allCredentialEnvVars } from './chunk-VNGXRYFF.js';
|
|
48
30
|
export { CREDENTIALS_SOURCE_ENV, credentialModeFromEnv, credentialsFromStoreOnly, getEffectiveCredentialStore, getInstalledCredentialStore, getModeControl, installCredentialScopeStorage, installCredentialStore, installModeControl, resolveCredentialRef, runWithCredentialScope, uninstallCredentialStore } from './chunk-HLOUDLPI.js';
|
|
49
|
-
export {
|
|
50
|
-
export {
|
|
51
|
-
export { COMPRESSED_BODY_MIN_BYTES, createHttpTransport, createInProcessTransport, deriveCarriesCircuitState, encodeJsonBody } from './chunk-
|
|
31
|
+
export { CredentialExchangeError, CredentialVault } from './chunk-DFDNHVDW.js';
|
|
32
|
+
export { InFlightCalls, untilAborted } from './chunk-MZKIL5IN.js';
|
|
33
|
+
export { COMPRESSED_BODY_MIN_BYTES, SessionEndedError, TransportStatusError, createHttpTransport, createInProcessTransport, deriveCarriesCircuitState, encodeJsonBody } from './chunk-UD2CXYSJ.js';
|
|
52
34
|
export { createChannelTransport, holdUntilServed, serveChannel } from './chunk-SKLMWHQD.js';
|
|
53
|
-
export { createMemoryCircuitStore } from './chunk-
|
|
54
|
-
export { StateBook, createInitialTraitState, findInitialState
|
|
35
|
+
export { createMemoryCircuitStore } from './chunk-N7HYNKK6.js';
|
|
36
|
+
export { StateBook, createInitialTraitState, findInitialState } from './chunk-A2JJT4GA.js';
|
|
55
37
|
export { AwaitingRegistry } from './chunk-HC6ERSAH.js';
|
|
56
38
|
import './chunk-LZIOTBFX.js';
|
|
57
|
-
export { dispatchDeclaredInput } from './chunk-
|
|
58
|
-
export { dispatchInbound } from './chunk-
|
|
59
|
-
|
|
39
|
+
export { dispatchDeclaredInput } from './chunk-LKWYCYX5.js';
|
|
40
|
+
export { dispatchInbound } from './chunk-P2N6K2IV.js';
|
|
41
|
+
export { createLocalFold, paintFrames, paintResponse, paintStates, traceResponse } from './chunk-QCJWPXLH.js';
|
package/dist/kernel/decode.d.ts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { NextWire, ServerProgressWire, ResolveProgressWire } from '@almadar/core/kernel-wire';
|
|
2
|
+
export { decodeIoRequestWire as decodeRequest } from '@almadar/core/kernel-wire';
|
|
3
|
+
import { FiredByOrbital } from './wire.js';
|
|
4
|
+
import '@almadar/core';
|
|
3
5
|
|
|
4
|
-
/** Decoders for what the kernel hands back as JSON:
|
|
6
|
+
/** Decoders for what the kernel hands back as JSON: the generated decoders of `@almadar/core/kernel-wire`, which throw naming the failing path. */
|
|
5
7
|
|
|
6
|
-
declare function decodeHttpBody(value: JsonValue): HttpBody;
|
|
7
|
-
declare function decodeHttpRequest(value: JsonValue): HttpRequestWire;
|
|
8
|
-
declare function decodeHttpResponse(value: JsonValue): HttpResponseWire;
|
|
9
|
-
declare function decodeRequest(value: JsonValue): IoRequestWire;
|
|
10
8
|
declare function decodeProgress(json: string): ServerProgressWire;
|
|
9
|
+
declare function decodeNext(json: string): NextWire | null;
|
|
11
10
|
declare function decodeResolveProgress(json: string): ResolveProgressWire;
|
|
12
|
-
|
|
13
|
-
declare function decodeOAuthAsk(value: JsonValue | undefined): OAuthAsk;
|
|
11
|
+
declare function decodeDueTicks(json: string): FiredByOrbital;
|
|
14
12
|
|
|
15
|
-
export {
|
|
13
|
+
export { decodeDueTicks, decodeNext, decodeProgress, decodeResolveProgress };
|
package/dist/kernel/decode.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import '../chunk-MLKGABMK.js';
|
|
1
|
+
export { decodeDueTicks, decodeNext, decodeProgress, decodeIoRequestWire as decodeRequest, decodeResolveProgress } from '../chunk-X6W44WHO.js';
|
package/dist/kernel/engine.d.ts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { OrbitalSchema,
|
|
1
|
+
import { OrbitalSchema, ExternalInput, InboundRoute, InboundAnswer, InboundDelivery, EventPayload, EventRequest, LiveBroadcastItem, MountSeed, PayloadField, JsonSchema, PayloadIssue, EntityRow, UserContext, RowSetRef, RowQueryPage, EventResponse, EventStreamItem, JsonValue } from '@almadar/core';
|
|
2
|
+
import { ProgramSurface } from '@almadar/core/kernel-wire';
|
|
2
3
|
import { KernelHostPorts, KernelAnswerScope } from './host.js';
|
|
3
|
-
import { KernelModule, KernelServerHandle } from './wire.js';
|
|
4
|
+
import { KernelModule, KernelServerHandle, FiredByOrbital } from './wire.js';
|
|
4
5
|
import '../effects/in-flight-calls.js';
|
|
5
6
|
import '../service/service-provider.js';
|
|
6
7
|
import './program-effects.js';
|
|
7
|
-
import './
|
|
8
|
-
import '
|
|
9
|
-
import '../credentials/store.js';
|
|
10
|
-
import './decode.js';
|
|
11
|
-
import '@almadar/core/kernel-wire';
|
|
8
|
+
import './secret-ports.js';
|
|
9
|
+
import '../credentials/vault.js';
|
|
12
10
|
import './os-port.js';
|
|
13
11
|
|
|
14
12
|
/**
|
|
@@ -17,20 +15,41 @@ import './os-port.js';
|
|
|
17
15
|
* and nothing else. The continuation of a stopped dispatch never leaves the wasm instance.
|
|
18
16
|
*/
|
|
19
17
|
|
|
18
|
+
type ContractAsk = <T>(schema: {
|
|
19
|
+
parse(input: ReturnType<typeof JSON.parse>): T;
|
|
20
|
+
}, query: object) => T;
|
|
21
|
+
declare function contractAnswers(ask: ContractAsk): {
|
|
22
|
+
findExternalInput(orbital: string, trait: string, event: string): ExternalInput | undefined;
|
|
23
|
+
findInbound(name: string): {
|
|
24
|
+
route: InboundRoute;
|
|
25
|
+
} | {
|
|
26
|
+
answer: InboundAnswer;
|
|
27
|
+
};
|
|
28
|
+
inboundPayload(route: InboundRoute, delivery: InboundDelivery, credential: string | null | undefined): EventPayload;
|
|
29
|
+
inboundAnswer(route: InboundRoute, emitted: readonly {
|
|
30
|
+
event: string;
|
|
31
|
+
payload?: EventPayload;
|
|
32
|
+
}[], error: string | undefined): InboundAnswer;
|
|
33
|
+
credentialUnset(credential: string): InboundAnswer;
|
|
34
|
+
dispatchFailed(message: string): InboundAnswer;
|
|
35
|
+
};
|
|
36
|
+
/** The declared-contract answers of a host holding no program: the kernel's own answers on an empty kernel. */
|
|
37
|
+
type ProgramlessContract = ReturnType<typeof contractAnswers>;
|
|
20
38
|
declare class KernelEngine {
|
|
21
39
|
private readonly kernel;
|
|
22
40
|
private readonly schemaJson;
|
|
23
41
|
private readonly ports;
|
|
24
42
|
private readonly entityTypes;
|
|
25
43
|
private readonly preserveProgramContext;
|
|
44
|
+
private readonly lazyDir?;
|
|
26
45
|
private handle;
|
|
27
|
-
private readonly
|
|
28
|
-
private
|
|
29
|
-
private
|
|
30
|
-
constructor(kernel: KernelModule, schemaJson: string, ports: KernelHostPorts, entityTypes?: readonly string[], forkedFrom?: KernelServerHandle, providedHandle?: KernelServerHandle, preserveProgramContext?: boolean);
|
|
46
|
+
private readonly turns;
|
|
47
|
+
private tickRelayIntervalMs;
|
|
48
|
+
private stateful;
|
|
49
|
+
constructor(kernel: KernelModule, schemaJson: string, ports: KernelHostPorts, entityTypes?: readonly string[], forkedFrom?: KernelServerHandle, providedHandle?: KernelServerHandle, preserveProgramContext?: boolean, lazyDir?: string | undefined);
|
|
31
50
|
/**
|
|
32
51
|
* A kernel on the same program, registered once, holding none of this one's session: every trait at its initial
|
|
33
|
-
* state, no rows the kernel held, its
|
|
52
|
+
* state, no rows the kernel held, its mounted ticks kept. A stateless host serves each request a
|
|
34
53
|
* fork (EXEC-DIST-5), `ports` answering it.
|
|
35
54
|
*/
|
|
36
55
|
fork(ports?: KernelHostPorts): KernelEngine;
|
|
@@ -38,57 +57,139 @@ declare class KernelEngine {
|
|
|
38
57
|
/** A server over the host's ports. */
|
|
39
58
|
private openServer;
|
|
40
59
|
private declare;
|
|
41
|
-
|
|
60
|
+
/** The contract answers for a host with no program registered yet: the kernel's, asked with no program. */
|
|
61
|
+
static withoutProgram(kernel: KernelModule): ProgramlessContract;
|
|
62
|
+
static open(kernel: KernelModule, schema: OrbitalSchema, ports: KernelHostPorts, lazyDir?: string): KernelEngine;
|
|
42
63
|
/** A fresh kernel on the same program: every trait back at its initial state. */
|
|
43
64
|
reset(): void;
|
|
44
65
|
private managedProgram;
|
|
45
66
|
/** The program whose declared credentials this kernel's credential effects manage beside its own (a console's app). */
|
|
46
67
|
setManagedProgram(program: OrbitalSchema): void;
|
|
47
|
-
/**
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
68
|
+
/** `client` mounted `traits` of `orbital`: their mount-scoped ticks fire while any client holds them. A request derives this itself; this is for a mount made outside a request. */
|
|
69
|
+
mountClient(client: string, orbital: string, traits: readonly string[]): void;
|
|
70
|
+
unmountClient(client: string, orbital: string, traits: readonly string[]): void;
|
|
71
|
+
/** `client` is gone: everything it mounted is released. */
|
|
72
|
+
releaseClient(client: string): void;
|
|
73
|
+
/** This host holds the circuit state: the kernel takes a client's copy of it only on a delegated leg and refuses any other request carrying one. */
|
|
74
|
+
setStateful(): void;
|
|
75
|
+
/** Whether the program declares any tick: the host runs its timer only then. */
|
|
76
|
+
declaresTicks(): boolean;
|
|
77
|
+
/** Queue a tick-stamped dispatch for the coalesced peer relay; the ms after which to flush when it opened a window. */
|
|
78
|
+
relayTick(orbital: string, request: EventRequest): number | undefined;
|
|
79
|
+
/** The relay window's length in ms; the kernel's default is 50. */
|
|
80
|
+
setTickRelayInterval(intervalMs: number): void;
|
|
81
|
+
/** Every item queued since the window opened, in first-arrival order; the window closes. */
|
|
82
|
+
flushTickRelay(): LiveBroadcastItem[];
|
|
83
|
+
/** One pass of the kernel's tick clock: the ticks due at monotonic `nowMs` that this server runs (`[background]` ticks, and those of a mounted trait), keyed by the orbital each `runTick` request is addressed to. */
|
|
84
|
+
tickPass(nowMs: number): FiredByOrbital;
|
|
85
|
+
/** Stop the kernel's tick clock; its phase is kept. */
|
|
86
|
+
tickPause(): void;
|
|
87
|
+
/** Restart the kernel's tick clock; the paused span is never counted. */
|
|
88
|
+
tickResume(): void;
|
|
89
|
+
tickPaused(): boolean;
|
|
51
90
|
/** What this host mounts when it starts: the kernel's boot mounts for the side it serves (EXEC-ENDPOINT-3). */
|
|
52
91
|
bootMounts(side: 'server' | 'process'): MountSeed[];
|
|
53
92
|
/** What mounts when a client opens `routePath` (EXEC-ENDPOINT-3). */
|
|
54
93
|
routeMounts(routePath: string): MountSeed[];
|
|
55
|
-
/** Mock-seed the `[runtime]` entities the kernel holds itself, owner columns stamped with `viewerId`. */
|
|
56
|
-
seedRuntimeMock(viewerId: string | undefined): void;
|
|
57
94
|
dispose(): void;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
95
|
+
private readonly answers;
|
|
96
|
+
private contract;
|
|
97
|
+
/** Every external input the program declares: what an outside client may send which trait. */
|
|
98
|
+
externalInputs(): ExternalInput[];
|
|
99
|
+
/** What the kernel holds of every trait of the program, in name order, and the browser-stored entities. */
|
|
100
|
+
programSurface(): ProgramSurface;
|
|
101
|
+
/** The entities a provider acting as the caller may read. */
|
|
102
|
+
readableEntities(): string[];
|
|
103
|
+
/** The declared input of `trait.event` in `orbital`, when there is one. */
|
|
104
|
+
findExternalInput(orbital: string, trait: string, event: string): ExternalInput | undefined;
|
|
105
|
+
/** The declared input a `listens`-addressed event names from `caller`'s position (`EVENT`, `Trait.EVENT`, `Orbital.Trait.EVENT`), when there is one. */
|
|
106
|
+
findInputByAddress(address: string, caller: {
|
|
107
|
+
orbital: string;
|
|
108
|
+
trait: string;
|
|
109
|
+
}): ExternalInput | undefined;
|
|
110
|
+
/** A declared payload as the JSON Schema of one object: what a tool-calling model fills. */
|
|
111
|
+
payloadJsonSchema(fields: readonly PayloadField[]): JsonSchema;
|
|
112
|
+
/** The ways `value` misses the declared payload `fields`. */
|
|
113
|
+
payloadIssues(fields: readonly PayloadField[], value: EventPayload): PayloadIssue[];
|
|
114
|
+
/** The route a hook name is delivered to, or the answer to write for a hook the program does not serve. */
|
|
115
|
+
findInbound(name: string): {
|
|
116
|
+
route: InboundRoute;
|
|
117
|
+
} | {
|
|
118
|
+
answer: InboundAnswer;
|
|
119
|
+
};
|
|
120
|
+
/** The trait that handles `event` as an inbound hook in `orbital`, with the refusal message, when a client-facing request names it. */
|
|
121
|
+
inboundOnly(orbital: string, trait: string | undefined, event: string): {
|
|
122
|
+
trait: string;
|
|
123
|
+
message: string;
|
|
124
|
+
} | undefined;
|
|
125
|
+
/** The payload an inbound event is delivered with. */
|
|
126
|
+
inboundPayload(route: InboundRoute, delivery: InboundDelivery, credential: string | null | undefined): EventPayload;
|
|
127
|
+
/** The HTTP answer a finished dispatch produced for `route`. */
|
|
128
|
+
inboundAnswer(route: InboundRoute, emitted: readonly {
|
|
129
|
+
event: string;
|
|
130
|
+
payload?: EventPayload;
|
|
131
|
+
}[], error: string | undefined): InboundAnswer;
|
|
132
|
+
/** The answer for a route whose credential the host holds no value for. */
|
|
133
|
+
credentialUnset(credential: string): InboundAnswer;
|
|
134
|
+
/** The answer for a delivery whose dispatch failed. */
|
|
135
|
+
dispatchFailed(message: string): InboundAnswer;
|
|
136
|
+
/** The name of the program's `[identity]` entity, when it declares one. */
|
|
137
|
+
identityEntity(): string | undefined;
|
|
138
|
+
/** The orbital that declares `entity` inline. */
|
|
139
|
+
entityOwnerOrbital(entity: string): string | undefined;
|
|
140
|
+
/** `rows` of `entity` as `user` reads them: narrowed by the entity's declared `@read`, which the kernel evaluates with `@user` bound to the viewer. */
|
|
141
|
+
readRows(entity: string, rows: readonly EntityRow[], user: UserContext | undefined): EntityRow[];
|
|
142
|
+
liveItemDelivered(item: object, clientId?: string): boolean;
|
|
143
|
+
/** `OsGrants::allows` over the grants of `orbital` in the program this kernel runs (the app level alone with no orbital). */
|
|
144
|
+
osAllows(requirementJson: string, orbital?: string): boolean;
|
|
145
|
+
/** Whether `url`'s origin is declared in the program's `egress` (the kernel's rule). */
|
|
146
|
+
egressAllows(url: string): boolean;
|
|
61
147
|
/** Place the program's anchored grants and arguments under the host's anchors. */
|
|
62
148
|
setOsAnchors(anchorsJson: string): string;
|
|
63
149
|
/** An `os/` call's arguments with its anchored parts resolved under the host's anchors. */
|
|
64
150
|
osResolveArgs(op: string, argsJson: string): string;
|
|
151
|
+
tlsComplete(key: string, outcomeJson: string): string;
|
|
152
|
+
/** A live stream of `client`'s session opened (EXEC-DIST-9); the id closes it. */
|
|
153
|
+
openSessionStream(client: string): number;
|
|
154
|
+
/** The live stream `id` dropped: the kernel frees the session once its streams have all dropped and it is quiet. */
|
|
155
|
+
closeSessionStream(id: number): boolean;
|
|
65
156
|
/** The current state of a trait instance, `''` when it has none. */
|
|
66
157
|
stateOf(traitName: string, entityId?: string): string;
|
|
67
158
|
/**
|
|
68
|
-
* `reference` resolved for `scope.
|
|
69
|
-
* match its query and
|
|
159
|
+
* `reference` resolved for the identity `scope.originClientId`'s session bound (the anonymous viewer with none) against the host-answered store (EXEC-RENDER-3): the rows that still
|
|
160
|
+
* match its query and that identity's `@read` in the reference's order, a missing or hidden row omitted, and `total`
|
|
70
161
|
* re-counted (a `total: none` reference is not re-counted: the total is the resolved window). Each read the
|
|
71
162
|
* kernel makes is answered here, as in `evaluate`.
|
|
72
163
|
*/
|
|
73
164
|
resolveRows(reference: RowSetRef, scope: KernelAnswerScope): Promise<RowQueryPage>;
|
|
74
|
-
/**
|
|
75
|
-
|
|
165
|
+
/**
|
|
166
|
+
* Run `request` against `orbital`. The kernel orders every start and every resumption (EXEC-CONC-2): while another
|
|
167
|
+
* dispatch holds the lane it answers `queued` and runs the work itself once the lane frees; this host only answers
|
|
168
|
+
* what each dispatch asks.
|
|
169
|
+
*/
|
|
170
|
+
evaluate(orbital: string, request: EventRequest, scope: KernelAnswerScope): Promise<EventResponse>;
|
|
171
|
+
/** The kernel's answer to a start or resume, once it has run: at once, or when the kernel takes it from its queue. */
|
|
172
|
+
private ran;
|
|
173
|
+
private running;
|
|
174
|
+
/** Run each piece of queued work that can run now, in the kernel's order, handing each to the dispatch it continues. */
|
|
175
|
+
private runQueued;
|
|
76
176
|
}
|
|
77
177
|
/** What `evaluateOrbitalEvent` needs to run a request on the kernel instead of the JS composition. */
|
|
78
178
|
interface KernelEvaluation {
|
|
79
179
|
engine: KernelEngine;
|
|
80
180
|
/** The orbital the request is addressed to. */
|
|
81
181
|
orbital: string;
|
|
82
|
-
outsideEventQueue?: <T>(work: () => Promise<T>) => Promise<T>;
|
|
83
182
|
onStream?: (item: EventStreamItem) => void;
|
|
84
183
|
}
|
|
85
184
|
/**
|
|
86
|
-
* The request as the kernel takes it: the
|
|
185
|
+
* The request as the kernel takes it: the locale the host resolved, the `_targetTrait` sidecar
|
|
87
186
|
* promoted to `targetTrait`, and the `_activeTraits` sidecar dropped (the kernel's mounted set is explicit,
|
|
88
187
|
* not carried per request).
|
|
89
188
|
*/
|
|
90
|
-
declare function kernelRequest(request:
|
|
91
|
-
|
|
189
|
+
declare function kernelRequest(request: EventRequest & {
|
|
190
|
+
user?: JsonValue;
|
|
191
|
+
}, locale: string | undefined): EventRequest;
|
|
192
|
+
declare function evaluateOnKernel(kernel: KernelEvaluation, request: EventRequest, locale: string | undefined): Promise<EventResponse>;
|
|
92
193
|
|
|
93
194
|
export { KernelEngine, evaluateOnKernel, kernelRequest };
|
|
94
|
-
export type { KernelEvaluation };
|
|
195
|
+
export type { KernelEvaluation, ProgramlessContract };
|
package/dist/kernel/engine.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
export { KernelEngine, evaluateOnKernel, kernelRequest } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
1
|
+
export { KernelEngine, evaluateOnKernel, kernelRequest } from '../chunk-I3TKINSO.js';
|
|
2
|
+
import '../chunk-NU6LVKGS.js';
|
|
3
|
+
import '../chunk-X6W44WHO.js';
|
|
4
|
+
import '../chunk-7WB6VWRK.js';
|
|
5
|
+
import '../chunk-WGCWJOT2.js';
|
|
6
|
+
import '../chunk-ZUSM4VW4.js';
|
|
7
7
|
import '../chunk-FWA5K7Q2.js';
|
|
8
|
-
import '../chunk-VMOBW7RK.js';
|
|
9
|
-
import '../chunk-RBUMDYFS.js';
|
|
10
8
|
import '../chunk-HLOUDLPI.js';
|
|
11
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-MZKIL5IN.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { FrameWire, RoutedLeg } from '@almadar/core/kernel-wire';
|
|
2
|
+
import { EventResponse } from '@almadar/core';
|
|
3
3
|
import { ClientKernelOutcome, LocalFoldKernel } from '../client/client-kernel.js';
|
|
4
4
|
import '../client/circuit-store.js';
|
|
5
5
|
import '../client/awaiting.js';
|
|
@@ -16,20 +16,21 @@ import '../client/trait-types.js';
|
|
|
16
16
|
* never delays the next frame.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
declare function isFrameWire(value: JsonValue): value is JsonValue & FrameWire;
|
|
20
19
|
/** `frame()`'s JSON; `undefined` (no tick due) decodes to `undefined`. */
|
|
21
20
|
declare function decodeFrame(json: string | undefined): FrameWire | undefined;
|
|
22
|
-
type TickEffects = Pick<
|
|
21
|
+
type TickEffects = Pick<EventResponse, 'clientEffectsByTrait'>;
|
|
23
22
|
type FrameDispatch = FrameWire['dispatches'][number];
|
|
24
23
|
/** The host transport's side of a frame: posts what a fired tick owes and folds the answer back through the kernel. */
|
|
25
24
|
interface FramePostPort {
|
|
26
25
|
/** Posts one dispatch's server legs (or stateful leg); resolves to what the server's fold added. */
|
|
27
26
|
postDispatch(dispatch: FrameDispatch): Promise<TickEffects>;
|
|
28
27
|
/** Sends a leg the kernel routed to the browser store; `frameResponse` is the frame's aggregate response. */
|
|
29
|
-
sendBrowserLeg(leg: RoutedLeg, frameResponse:
|
|
28
|
+
sendBrowserLeg(leg: RoutedLeg, frameResponse: EventResponse): Promise<TickEffects>;
|
|
30
29
|
}
|
|
31
30
|
interface FrameApplied {
|
|
32
|
-
fired:
|
|
31
|
+
fired: FrameWire['fired'];
|
|
32
|
+
/** How many ticks fired, across every orbital. */
|
|
33
|
+
firedCount: number;
|
|
33
34
|
folded: number;
|
|
34
35
|
browserLegs: number;
|
|
35
36
|
droppedServerEffects: number;
|
|
@@ -39,5 +40,5 @@ interface FrameApplied {
|
|
|
39
40
|
}
|
|
40
41
|
declare function applyFrame(json: string | undefined, kernel: LocalFoldKernel, post: FramePostPort | undefined): Promise<FrameApplied>;
|
|
41
42
|
|
|
42
|
-
export { applyFrame, decodeFrame
|
|
43
|
+
export { applyFrame, decodeFrame };
|
|
43
44
|
export type { FrameApplied, FrameDispatch, FramePostPort, TickEffects };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { applyFrame, decodeFrame
|
|
2
|
-
import '../chunk-MLKGABMK.js';
|
|
1
|
+
export { applyFrame, decodeFrame } from '../chunk-NTFQ36UN.js';
|