@endge/core 1.0.0-dev.5 → 1.2.0-dev.15
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 +46 -0
- package/dist/core.js +60726 -47416
- package/dist/features/core/kernel/config/kernel.config.d.ts +1 -1
- package/dist/features/core/kernel/config/modules.config.d.ts +7 -7
- package/dist/features/core/kernel/endge.d.ts +9 -9
- package/dist/features/core/modules/actions/domain/action.types.d.ts +2 -0
- package/dist/features/core/modules/auth/EndgeAuth_Module.d.ts +9 -1
- package/dist/features/core/modules/auth/domain/types/auth-profile.types.d.ts +17 -0
- package/dist/features/core/modules/auth/services/auth-facet-claims.d.ts +5 -0
- package/dist/features/core/modules/compiler/EndgeCompiler_Module.d.ts +10 -0
- package/dist/features/core/modules/compiler/tools/select-type-context.d.ts +1 -0
- package/dist/features/core/modules/computations/model/ComputationResource.d.ts +1 -0
- package/dist/features/core/modules/context/domain/context-persistence.types.d.ts +1 -0
- package/dist/features/core/modules/document-import/services/parsers/GraphQLDocumentImportParser.d.ts +3 -2
- package/dist/features/core/modules/domain/types/component/component-core.types.d.ts +4 -0
- package/dist/features/core/modules/domain/types/component/sfc/table-events.types.d.ts +18 -0
- package/dist/features/core/modules/program/EndgeProgram_Module.d.ts +4 -0
- package/dist/features/core/modules/program/domain/types/execution-bundle.types.d.ts +7 -0
- package/dist/features/core/modules/program/domain/types/program.types.d.ts +5 -2
- package/dist/features/core/modules/program/tools/execution-bundle.d.ts +2 -1
- package/dist/features/core/modules/program/tools/startup-bundle.d.ts +2 -0
- package/dist/features/core/modules/runtime/EndgeControllers_Module.d.ts +26 -0
- package/dist/features/core/modules/runtime/EndgeRuntime_Module.d.ts +2 -0
- package/dist/features/core/modules/runtime/adapters/QueryExecutor_Adapter.d.ts +42 -3
- package/dist/features/core/modules/runtime/domain/controllers/controller.types.d.ts +121 -0
- package/dist/features/core/modules/runtime/domain/controllers/page-cache.types.d.ts +41 -0
- package/dist/features/core/modules/runtime/domain/graphql-query-error.d.ts +73 -0
- package/dist/features/core/modules/runtime/domain/query-execution.types.d.ts +25 -1
- package/dist/features/core/modules/runtime/domain/runtime-entity-map.types.d.ts +2 -0
- package/dist/features/core/modules/runtime/domain/runtime-host.types.d.ts +1 -0
- package/dist/features/core/modules/runtime/domain/runtime.types.d.ts +3 -2
- package/dist/features/core/modules/runtime/domain/stream-runtime.types.d.ts +8 -1
- package/dist/features/core/modules/runtime/execution/endge-data-view.d.ts +1 -1
- package/dist/features/core/modules/runtime/execution/endge-query.d.ts +21 -2
- package/dist/features/core/modules/runtime/hosts/CompositionRuntimeHost.d.ts +9 -0
- package/dist/features/core/modules/runtime/hosts/ControllerRuntimeHost.d.ts +64 -0
- package/dist/features/core/modules/runtime/hosts/QueryRuntimeHost.d.ts +9 -1
- package/dist/features/core/modules/runtime/hosts/SimulationRuntimeHost.d.ts +1 -0
- package/dist/features/core/modules/runtime/hosts/StoreRuntimeHost.d.ts +1 -0
- package/dist/features/core/modules/runtime/hosts/StreamRuntimeHost.d.ts +30 -0
- package/dist/features/core/modules/runtime/services/controllers/ControllerRegistry.d.ts +16 -0
- package/dist/features/core/modules/runtime/services/controllers/builtins/CollectionWindowController.d.ts +56 -0
- package/dist/features/core/modules/runtime/services/controllers/builtins/collection-window.definition.d.ts +2 -0
- package/dist/features/core/modules/runtime/services/controllers/cache/PageCacheService.d.ts +25 -0
- package/dist/features/core/modules/runtime/services/controllers/controller-values.d.ts +3 -0
- package/dist/features/core/modules/runtime/services/simulation/prepare-simulation-overrides.d.ts +7 -5
- package/dist/features/core/modules/runtime/services/strategies/ControllerRuntimeStrategy.d.ts +11 -0
- package/dist/features/core/modules/runtime/services/transports/BrowserGraphQLSseStreamTransportFactory.d.ts +24 -0
- package/dist/features/core/modules/runtime/services/transports/BrowserSseStreamTransportFactory.d.ts +13 -1
- package/dist/features/core/modules/source/EndgeSource_Module.d.ts +6 -0
- package/dist/features/core/modules/source/domain/types/composition-source.types.d.ts +13 -2
- package/dist/features/core/modules/source/domain/types/data-view-source.types.d.ts +5 -2
- package/dist/features/core/modules/source/domain/types/graphql-fragments.types.d.ts +17 -0
- package/dist/features/core/modules/source/domain/types/query-source.types.d.ts +4 -1
- package/dist/features/core/modules/source/domain/types/simulation-source.types.d.ts +8 -0
- package/dist/features/core/modules/source/domain/types/source-context.types.d.ts +6 -0
- package/dist/features/core/modules/source/domain/types/source-engine.types.d.ts +3 -0
- package/dist/features/core/modules/source/domain/types/source-expression.types.d.ts +3 -1
- package/dist/features/core/modules/source/domain/types/stream-source.types.d.ts +29 -1
- package/dist/features/core/modules/source/domain/types/type-source.types.d.ts +11 -6
- package/dist/features/core/modules/source/services/SimulationSourceResolver.d.ts +6 -0
- package/dist/features/core/modules/source/services/compilers/graphql-operation-compile.d.ts +52 -0
- package/dist/features/core/modules/source/services/compilers/source-expression-compile.d.ts +21 -0
- package/dist/features/core/modules/source/services/compilers/source-model-reference-compile.d.ts +11 -1
- package/dist/features/core/modules/source/services/composition-activation.d.ts +6 -1
- package/dist/features/core/modules/source/services/graphql-fragments.d.ts +23 -0
- package/dist/features/core/modules/source/services/graphql-schema.d.ts +37 -0
- package/dist/features/core/modules/source/services/simulation-response-contract.d.ts +23 -0
- package/dist/features/core/modules/source/services/source-context.d.ts +13 -0
- package/dist/features/core/modules/source/services/type-extends.d.ts +15 -0
- package/dist/features/core/modules/source/services/value-expression-language.d.ts +2 -0
- package/dist/features/core/modules/source/services/value-path.d.ts +14 -0
- package/dist/features/core/modules/ui/EndgeUIRegistry_Module.d.ts +5 -0
- package/dist/features/core/modules/ui/adapters/json/EndgeUIJsonRenderer.d.ts +57 -0
- package/dist/features/core/modules/ui/adapters/json/endge-ui-json-adapter.d.ts +16 -0
- package/dist/features/core/modules/ui/adapters/json/endge-ui-json-patch.d.ts +3 -0
- package/dist/features/core/modules/ui/adapters/json/endge-ui-json.schema.d.ts +371 -0
- package/dist/features/core/modules/ui/domain/types/endge-ui-json.types.d.ts +121 -0
- package/dist/features/core/modules/ui/registry/UIAdapterRegistry.d.ts +2 -0
- package/dist/features/federation/EndgeFederation.d.ts +1 -133
- package/dist/features/federation/EndgeModule.d.ts +1 -58
- package/dist/features/federation/constants/federation.constants.d.ts +1 -1
- package/dist/features/federation/tools/sort-endge-modules.d.ts +1 -9
- package/dist/features/federation/types/endge-modules.types.d.ts +1 -28
- package/dist/features/federation/types/federation.types.d.ts +1 -112
- package/dist/main.d.ts +15 -0
- package/package.json +9 -5
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# @endge/core
|
|
2
|
+
|
|
3
|
+
Endge Core owns Domain documents, Source compilation, the validated Program registry and runtime lifecycle. Renderers consume compiled contracts; runtime does not parse authored Source. Public TypeScript API is exported from the package entrypoint.
|
|
4
|
+
|
|
5
|
+
## Controllers
|
|
6
|
+
|
|
7
|
+
Controllers require Core `1.2.0-dev.15` (compiler `program-v5`). Controllers are code-owned definitions and local providers executed as registered, parent-owned runtime hosts. They are not persisted documents and have no `/controllers` collection. A definition is serializable; a provider factory stays executable host code and never enters a Bundle.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
// Source fragment inside a Composition; dependencies must exist in that workspace.
|
|
11
|
+
runtimes: {
|
|
12
|
+
window: controller('endge.collection-window')
|
|
13
|
+
.withProps({ paging: 'cursor', batchSize: 100, maxLoadedRows: 1000 })
|
|
14
|
+
.withDependencies({
|
|
15
|
+
state: { store: data('state'), path: 'window', update: 'window-commit' },
|
|
16
|
+
load: { query: 'window-page', output: 'page' },
|
|
17
|
+
}),
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Host SDK: `Endge.runtime.controllers.define(definition)`, `provide({identity,key,create})` and `await mount(identity,{owner,props,dependencies,instanceId?})`. Owner is an actual registered host or its id. Instances support props, commands, output snapshots/subscriptions and async disposal through the same runtime registry as Composition. Unregister is rejected while instances are active.
|
|
22
|
+
|
|
23
|
+
Provider callbacks receive operation contexts: `start(context)`, `setProps(props,context)`, `command(name,input,context)`, `pause()`, `resume(context)`, `destroy()`. Capture the callback's context for async work; do not retain the factory context across lifecycle or props generations. Context props are frozen snapshots. Pause, changed props and teardown invalidate old publications, Store commits, Query starts and command completions. Provider-owned external effects must honor cancellation too.
|
|
24
|
+
|
|
25
|
+
The built-in `endge.collection-window` supports cursor and offset/limit, bidirectional demand, one active Query, generation cancellation, key deduplication and a retained contiguous memory window. Store holds `{revision,rowsRevision,blocks}`. A guarded Update atomically sets the whole state from `input('next')` only when its revision equals `input('expectedRevision')`; the adapter verifies the commit. Query owns transport; Controller owns loading/error, demand, retention and retry. Table owns viewport geometry and scroll anchor, with `@endge/ui-vue@2.0.0-dev.14`.
|
|
26
|
+
|
|
27
|
+
The row cap is soft: visible rows, prefetch corridor and explicitly retained keys protect blocks. Applications call retain/release for dirty editors; detection is not automatic. With no `load.cache`, evicted pages are fetched again. Optional memory/IndexedDB page caching has separate budgets and freshness policies, described below. There is no global server scrollbar, remote seek or timer-driven TTL deletion. Server ordering/filtering and continuation metadata must be correct.
|
|
28
|
+
|
|
29
|
+
Full Source and SDK examples accompany Docs `0.11.0`: `docs/reference/controllers.md`, `docs/guides/collection-window.md`, `docs/agents/controllers.md`, and `docs/public/examples/controllers/`. Install the exact Core and UI Vue versions above. The historical Core `1.2.13` does not include Controllers.
|
|
30
|
+
|
|
31
|
+
## Bundles
|
|
32
|
+
|
|
33
|
+
Compiler builds controller definition artifacts and `requirements.hostControllers` (identity/providerKey). Program/Execution Bundle carries definitions and capability requirements, not factories. The target host must register the matching provider; missing provider fails explicitly. Runtime executes the compiled contract, including SDK mounts. Older bundles without this optional requirement remain readable; source changes require the current compiler snapshot.
|
|
34
|
+
|
|
35
|
+
## Local verification
|
|
36
|
+
|
|
37
|
+
Use the package scripts for build, lint and typecheck. Run tests only when authorized by the task. A successful Source compile does not prove network, renderer or deployment readiness. The documentation examples execute a built Core and use its own dependency graph.
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Retention and page cache
|
|
41
|
+
|
|
42
|
+
`endge.collection-window` accepts `retention: { beforeRows, afterRows }` independently of the soft `maxLoadedRows` cap. Its Query binding may declare `cache: { key, storage: 'memory' | 'indexeddb', strategy, maxAgeMs, maxStaleMs, onError, maxEntries, maxBytes }`. Omit cache to preserve the existing Query-only path. Cache data is separate from Store and execution bundles.
|
|
43
|
+
|
|
44
|
+
`cache-first`, `network-first`, and `stale-while-revalidate` share the normal Query pipeline. Value-only revalidation preserves row order and anchor; structural changes expose `refreshPending` and stop extension until explicit `refresh`. `clearCache` preserves active rows; `reset` preserves cached pages. Retain protects eviction, not unsaved edits. IndexedDB is a bounded best-effort cache with observable write completion, not a complete offline database.
|
|
45
|
+
|
|
46
|
+
See `guides/collection-window-cache` in the documentation source and `docs/public/examples/controllers/page-cache.mjs` for executable Source and SDK examples. Install the exact versions listed above when running these examples.
|