@camstack/server 1.2.823 → 1.2.824
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/CHANGELOG.md +6 -0
- package/dist/api/trpc/generated-cap-routers.js +0 -45
- package/package.json +11 -10
- package/system/dist/addon-runner.js +24 -2
- package/system/dist/addon-runner.mjs +25 -3
- package/system/dist/addon-utils.d.ts +1 -0
- package/system/dist/addon-utils.js +2 -0
- package/system/dist/addon-utils.mjs +3 -2
- package/system/dist/{agent-https-Df53Fvk1.js → agent-https-B2nqARmj.js} +1 -1
- package/system/dist/{agent-https-CDl7mB_F.mjs → agent-https-BBO2OtNH.mjs} +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +3 -3
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer.addon.js +4 -4
- package/system/dist/builtins/composer/composer.addon.mjs +4 -4
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/actions-service.d.ts +8 -0
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +78 -22
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +79 -23
- package/system/dist/builtins/core-blocks/record-kinds.d.ts +1 -0
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +8 -3
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +8 -3
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +4 -4
- package/system/dist/builtins/keychain/index.mjs +4 -4
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
- package/system/dist/builtins/local-network/local-network.addon.js +2 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +10 -10
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +115 -115
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/cap-call-scope-8eiugfLl.js +46 -0
- package/system/dist/cap-call-scope-Bic6Ekfw.mjs +30 -0
- package/system/dist/{capture-engine-D_GQBgrZ.mjs → capture-engine-C-rHYVFq.mjs} +1 -1
- package/system/dist/{capture-engine-C0Z5rwCO.js → capture-engine-DP4HbT3W.js} +1 -1
- package/system/dist/{composition-sources-mx-2yCDv.mjs → composition-sources-CL9JFN4y.mjs} +1 -1
- package/system/dist/{composition-sources-DIZx3mW3.js → composition-sources-CM9c_jAj.js} +1 -1
- package/system/dist/{constants-BQlx9HDp.mjs → constants-DzGFnCKZ.mjs} +1 -1
- package/system/dist/{constants-CAOcKiWT.js → constants-jk7JccZ0.js} +1 -1
- package/system/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
- package/system/dist/{custom-action-registry-N7flBDwT.mjs → custom-action-registry-B9zFBNVa.mjs} +37 -37
- package/system/dist/{device-ca-93LsCF_Q.js → device-ca-B7_R5WJh.js} +1 -1
- package/system/dist/{device-ca-CK6GTnNh.mjs → device-ca-DZ_OQiCc.mjs} +1 -1
- package/system/dist/{dist-BQiyo22b.mjs → dist-BgRMQHuL.mjs} +97 -160
- package/system/dist/{dist-izXDzt4g.js → dist-BpTL3uNe.js} +108 -159
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-srpOrqIP.mjs → hub-mdns-ciao-DIcBingB.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-Dt_tgvol.js → hub-mdns-ciao-DPUaYAD3.js} +2 -2
- package/system/dist/index.d.ts +1 -0
- package/system/dist/index.js +47 -29
- package/system/dist/index.mjs +257 -242
- package/system/dist/kernel/cap-call-scope.d.ts +10 -0
- package/system/dist/kernel/transport/cap-route-resolver.d.ts +27 -1
- package/system/dist/kernel/transport/child-cap-protocol.d.ts +1 -1
- package/system/dist/kernel/transport/parent-unowned-call.d.ts +0 -11
- package/system/dist/{legacy-integration-rows-door-wu2GWY6U.mjs → legacy-integration-rows-door-1GnkpMgH.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-BH43eDu6.js → legacy-integration-rows-door-DYNePgj4.js} +1 -1
- package/system/dist/{rename-composition-block-CH6ZoSJA.mjs → rename-composition-block-Cp0_nwAI.mjs} +1 -1
- package/system/dist/{rename-composition-block-6oLQVzft.js → rename-composition-block-Dn2z4fnA.js} +1 -1
- package/system/dist/{restore-archive-C4rR2SYV.mjs → restore-archive-B3FEpUfz.mjs} +94 -94
- package/system/dist/{restore-archive-DpZ2PbLN.js → restore-archive-BGa5pdp9.js} +1 -1
- package/system/dist/{wal-maintenance-CNfp0HHX.mjs → wal-maintenance-BLWLlVfF.mjs} +0 -0
- package/system/dist/{wal-maintenance-DAA2qJja.js → wal-maintenance-GWFxnSnE.js} +0 -0
- package/system/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type CommandOriginClaim } from "@camstack/types/addon";
|
|
2
|
+
/** The tRPC-shaped context of the cap call on this stack, or `undefined` outside one. */
|
|
3
|
+
export declare function currentCapCallContext(): unknown;
|
|
4
|
+
/** The command origin of the cap call on this stack, if the call carried a well-formed one. */
|
|
5
|
+
export declare function readCurrentCommandOrigin(): CommandOriginClaim | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Run `fn` as a cap call whose context is `context` (`commandOrigin(claim).context`,
|
|
8
|
+
* or the raw `op.context`). `undefined` is a call that carried no claim.
|
|
9
|
+
*/
|
|
10
|
+
export declare function runWithCapCallContext<T>(context: unknown, fn: () => T): T;
|
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CapRouteResolver — builds a live CapRouteSnapshot from injected deps and
|
|
3
|
+
* dispatches a resolved CapRoute to the appropriate transport.
|
|
4
|
+
*
|
|
5
|
+
* Layer boundary: this file lives in `@camstack/kernel` and MUST NOT import
|
|
6
|
+
* from `server/backend`. All server-side state is injected via narrow named
|
|
7
|
+
* interfaces (NodeCapAuthority, InProcessProviderLookup, BrokerHandle).
|
|
8
|
+
*
|
|
9
|
+
* Wire conventions (kept here as the single source of truth):
|
|
10
|
+
*
|
|
11
|
+
* remote-moleculer dispatch
|
|
12
|
+
* action : `${addonId}.${capName}.${method}`
|
|
13
|
+
* params : methodArgs (passed through)
|
|
14
|
+
* options : { nodeID: route.nodeId, timeout: 60_000 }
|
|
15
|
+
* note : addonId is resolved by NodeCapAuthority.getAddonId(nodeId, cap)
|
|
16
|
+
*
|
|
17
|
+
* agent-child-forward dispatch
|
|
18
|
+
* service : `$agent-cap-fwd`
|
|
19
|
+
* action : `$agent-cap-fwd.forward`
|
|
20
|
+
* params : { capName, method, args, childId, deviceId? }
|
|
21
|
+
* options : { nodeID: route.agentNodeId, timeout: 60_000 }
|
|
22
|
+
* note : Task 6's agent-side service MUST register the Moleculer service
|
|
23
|
+
* `$agent-cap-fwd` with action `forward` that accepts this shape
|
|
24
|
+
* and fans the call over UDS to route.childId.
|
|
25
|
+
*/
|
|
26
|
+
import { type CommandOriginClaim } from "@camstack/types/addon";
|
|
1
27
|
import type { ServiceDiscoveryBroker } from "../moleculer/resilient-cap-call.js";
|
|
2
28
|
import type { CapRoute, CapRouteOpts, HubLocalUdsRoute, InProcessProviderRef } from "./cap-route.js";
|
|
3
29
|
import type { CapCallInput } from "./child-cap-protocol.js";
|
|
@@ -219,7 +245,7 @@ export declare class CapRouteResolver {
|
|
|
219
245
|
* {@link CapCallInput.callerAddonId} so the child can stamp before invoke
|
|
220
246
|
* (without it, `stampCallerAddonId` strips an args-only claim).
|
|
221
247
|
*/
|
|
222
|
-
dispatch(route: CapRoute, method: string, args: unknown, addonId?: string, callerAddonId?: string): Promise<unknown>;
|
|
248
|
+
dispatch(route: CapRoute, method: string, args: unknown, addonId?: string, callerAddonId?: string, origin?: CommandOriginClaim): Promise<unknown>;
|
|
223
249
|
/**
|
|
224
250
|
* Inner dispatch: may throw CapRouteError (validation failures) or arbitrary
|
|
225
251
|
* transport errors. The outer `dispatch` wraps non-CapRouteErrors.
|
|
@@ -179,7 +179,7 @@ export interface CapCallMessage {
|
|
|
179
179
|
readonly deviceId?: number;
|
|
180
180
|
/** Optional per-call node pin (out-of-band routing hint; see {@link CapCallOutMessage.nodeId}). */
|
|
181
181
|
readonly nodeId?: string;
|
|
182
|
-
/** Optional command origin claim (see {@link CapCallOutMessage.origin})
|
|
182
|
+
/** Optional command origin claim (see {@link CapCallOutMessage.origin}). Both legs carry it. */
|
|
183
183
|
readonly origin?: CommandOriginClaim;
|
|
184
184
|
/**
|
|
185
185
|
* Out-of-band PROVIDER-selection hint: the addonId of the provider the hub
|
|
@@ -279,15 +279,4 @@ export interface ParentUnownedCallDeps {
|
|
|
279
279
|
/** Optional logger for the broker-fallback diagnostic line. */
|
|
280
280
|
readonly logger?: ParentUnownedCallLogger;
|
|
281
281
|
}
|
|
282
|
-
/**
|
|
283
|
-
* Build the `onUnownedCall` handler the hub / agent passes into
|
|
284
|
-
* `new LocalChildRegistry({ ..., onUnownedCall })`.
|
|
285
|
-
*
|
|
286
|
-
* The returned handler:
|
|
287
|
-
* - tries the resolver first (when present),
|
|
288
|
-
* - falls back to the broker for `no-provider` resolver misses (the
|
|
289
|
-
* `$`-infra / core services), and
|
|
290
|
-
* - surfaces a clear error when the call is genuinely unroutable (so the
|
|
291
|
-
* child's call rejects rather than hanging).
|
|
292
|
-
*/
|
|
293
282
|
export declare function createParentUnownedCallHandler(deps: ParentUnownedCallDeps): (input: CapCallInput) => Promise<unknown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $s as collectSecretMarkerRefs } from "./dist-BgRMQHuL.mjs";
|
|
2
2
|
//#region src/builtins/sqlite-storage/migrations/legacy-integration-rows-door.ts
|
|
3
3
|
/**
|
|
4
4
|
* Migration-only door for the leftover integration rows (planning#416).
|
package/system/dist/{rename-composition-block-CH6ZoSJA.mjs → rename-composition-block-Cp0_nwAI.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { al as errMsg, tl as COMPOSED_DEVICE_STABLE_ID_PREFIX } from "./dist-BgRMQHuL.mjs";
|
|
2
2
|
//#region src/builtins/core-blocks/rename-composition-block.ts
|
|
3
3
|
/**
|
|
4
4
|
* An operator rename of a composed device writes the composition block's
|