@ultrst-armada/floks 2.0.8 → 2.0.9

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.
Files changed (40) hide show
  1. package/.krusbl-release-attestation.json +3 -3
  2. package/package.json +2 -2
  3. package/packages/canvas-ui/dist/chunk-DAAI7BIG.js +625 -0
  4. package/packages/canvas-ui/dist/fod/FodAuthorizedRemoteNodes.test.d.ts +1 -0
  5. package/packages/canvas-ui/dist/fod/FodModule.authorization.test.d.ts +1 -0
  6. package/packages/canvas-ui/dist/fod/FodModule.d.ts +27 -1
  7. package/packages/canvas-ui/dist/fod/FodPassiveNavigationAdversarial.test.d.ts +1 -0
  8. package/packages/canvas-ui/dist/fod/FodRemoteExecution.test.d.ts +1 -0
  9. package/packages/canvas-ui/dist/fod/index.d.ts +3 -0
  10. package/packages/canvas-ui/dist/fod/index.js +25 -3
  11. package/packages/canvas-ui/dist/fod/remoteAuthorizationFingerprint.d.ts +10 -0
  12. package/packages/canvas-ui/dist/fod/remoteAuthorizationFingerprint.test.d.ts +1 -0
  13. package/packages/canvas-ui/dist/fod/remoteGraphConnections.d.ts +40 -0
  14. package/packages/canvas-ui/dist/fod/remoteGraphConnections.test.d.ts +1 -0
  15. package/packages/canvas-ui/dist/fod/remoteGraphContract.d.ts +37 -0
  16. package/packages/canvas-ui/dist/fod/remoteGraphContract.test.d.ts +1 -0
  17. package/packages/canvas-ui/dist/fod/remoteKloksInvocation.d.ts +29 -0
  18. package/packages/canvas-ui/dist/fod/remoteKloksInvocation.test.d.ts +1 -0
  19. package/packages/canvas-ui/dist/index.js +30 -8
  20. package/packages/ui/dist/chunk-5Y2HGI37.js +443 -0
  21. package/packages/ui/dist/{chunk-XMRSW4TL.js → chunk-6J5J56YO.js} +31 -79
  22. package/packages/ui/dist/{chunk-KIFQA7L6.js → chunk-CIH4FVXM.js} +22 -34
  23. package/packages/ui/dist/chunk-F5XUUMSI.js +14 -0
  24. package/packages/ui/dist/{chunk-MYXPGPI3.js → chunk-KMVDLACR.js} +25 -2
  25. package/packages/ui/dist/{chunk-FA6GHJKU.js → chunk-SJPSY27C.js} +163 -5
  26. package/packages/ui/dist/components/ai/chat/AgentChatDock.d.ts +12 -0
  27. package/packages/ui/dist/components/ai/chat/AgentChatPanel.d.ts +11 -0
  28. package/packages/ui/dist/components/ai/chat/AgentChatPanel.test.d.ts +1 -0
  29. package/packages/ui/dist/components/ai/chat/AgentChatTypes.d.ts +39 -0
  30. package/packages/ui/dist/components/ai/chat/index.d.ts +3 -0
  31. package/packages/ui/dist/components/ai/index.js +17 -4
  32. package/packages/ui/dist/components/auth/LuthOidcGate.d.ts +29 -0
  33. package/packages/ui/dist/components/auth/index.d.ts +1 -0
  34. package/packages/ui/dist/components/auth/index.js +5 -1
  35. package/packages/ui/dist/components/base/index.js +4 -2
  36. package/packages/ui/dist/components/layout/AppShell.d.ts +2 -0
  37. package/packages/ui/dist/components/layout/index.js +3 -1
  38. package/packages/ui/dist/index.js +24 -6
  39. package/packages/ui/package.json +1 -1
  40. package/packages/canvas-ui/dist/chunk-24JGPSGO.js +0 -162
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- interface FodNodeDefinition {
2
+ export interface FodNodeDefinition {
3
3
  type: string;
4
4
  label: string;
5
5
  description: string;
@@ -31,6 +31,7 @@ interface FodFlow {
31
31
  viewport?: any;
32
32
  metadata?: Record<string, unknown>;
33
33
  }
34
+ import { type RemoteGraphHandle } from './remoteGraphContract.js';
34
35
  export interface FodRuntimeLike {
35
36
  listFlows(): Promise<FodFlow[]>;
36
37
  getFlow(id: string): Promise<FodFlow | null>;
@@ -43,12 +44,37 @@ export interface FodRuntimeLike {
43
44
  message: string;
44
45
  }>;
45
46
  }>;
47
+ /** Kloks BackendFacade must reauthorize all target-side and nested calls. */
48
+ executeAuthorizedRemoteFlow?(request: {
49
+ flowId: string;
50
+ sourceWorkspaceId: string;
51
+ handles: RemoteGraphHandle[];
52
+ }, options: {
53
+ signal: AbortSignal;
54
+ }): ReturnType<FodRuntimeLike['executeFlow']>;
55
+ /** Live frontend action requires separately scoped, active-window approval. */
56
+ authorizeActiveFrontendWindow?(request: {
57
+ sourceWorkspaceId: string;
58
+ handles: RemoteGraphHandle[];
59
+ }, options: {
60
+ signal: AbortSignal;
61
+ }): Promise<boolean>;
62
+ /**
63
+ * Return only operations authorized for the active principal AND workspace.
64
+ * The application backend must derive this list from Luth-scoped discovery;
65
+ * these descriptions do not themselves grant permission to invoke a node.
66
+ */
67
+ listAuthorizedNodeDefinitions?(workspaceId: string): Promise<FodNodeDefinition[]>;
68
+ /** Called on grant, publication, deployment-lease or session changes. */
69
+ subscribeAuthorizedNodeChanges?(workspaceId: string, onChange: () => void): () => void;
46
70
  }
47
71
  export interface FodModuleProps {
48
72
  runtime: FodRuntimeLike;
49
73
  nodeDefinitions: FodNodeDefinition[];
50
74
  workspaceId: string;
51
75
  className?: string;
76
+ /** Host-derived principal/session/grant epoch; must never contain bearer tokens. */
77
+ scopeKey?: string;
52
78
  }
53
79
  export declare function FodModule(props: FodModuleProps): React.JSX.Element;
54
80
  export declare namespace FodModule {
@@ -1 +1,4 @@
1
1
  export * from './FodModule.js';
2
+ export * from './remoteGraphContract.js';
3
+ export * from './remoteGraphConnections.js';
4
+ export * from './remoteKloksInvocation.js';
@@ -1,8 +1,30 @@
1
1
  import {
2
- FodModule
3
- } from "../chunk-24JGPSGO.js";
2
+ FodModule,
3
+ filterRemoteDefinitions,
4
+ invokeKloksPublishedWorkflow,
5
+ isLiveFrontendDefinition,
6
+ isRemoteGraphNode,
7
+ readRemoteHandle,
8
+ readRemotePortSnapshot,
9
+ remotePortFingerprint,
10
+ snapshotRemotePorts,
11
+ toKloksPublishedWorkflowCall,
12
+ validateRemoteConnections,
13
+ validateRemoteGraph
14
+ } from "../chunk-DAAI7BIG.js";
4
15
  import "../chunk-SRGVIYC5.js";
5
16
  import "../chunk-ZSVXR3HU.js";
6
17
  export {
7
- FodModule
18
+ FodModule,
19
+ filterRemoteDefinitions,
20
+ invokeKloksPublishedWorkflow,
21
+ isLiveFrontendDefinition,
22
+ isRemoteGraphNode,
23
+ readRemoteHandle,
24
+ readRemotePortSnapshot,
25
+ remotePortFingerprint,
26
+ snapshotRemotePorts,
27
+ toKloksPublishedWorkflowCall,
28
+ validateRemoteConnections,
29
+ validateRemoteGraph
8
30
  };
@@ -0,0 +1,10 @@
1
+ import { type RemoteGraphDefinition } from './remoteGraphContract.js';
2
+ /**
3
+ * Stable, non-authoritative comparison of a fresh Luth/Kloks-scoped operation
4
+ * catalogue. A lease renewal changes only the expiration timestamp; it does
5
+ * not revoke an in-flight invocation. Expiration itself removes the operation
6
+ * from filterRemoteDefinitions, changing this fingerprint.
7
+ *
8
+ * The target still checks the session, lease and grants on every call.
9
+ */
10
+ export declare function remoteAuthorizationFingerprint(definitions: readonly RemoteGraphDefinition[]): string;
@@ -0,0 +1,40 @@
1
+ import { type RemoteGraphDefinition, type RemoteGraphPort, type RemoteSavedNode } from './remoteGraphContract.js';
2
+ /**
3
+ * A snapshot is display-only after a grant is removed; it never authorizes a call.
4
+ * The fingerprint pins the original typed interface even if a provider illegally
5
+ * reuses an operation version with different ports.
6
+ */
7
+ export interface RemotePortSnapshot {
8
+ inputs: RemoteGraphPort[];
9
+ outputs: RemoteGraphPort[];
10
+ }
11
+ export interface FodConnectionEdge {
12
+ id: string;
13
+ source: string;
14
+ sourceHandle?: string;
15
+ target: string;
16
+ targetHandle?: string;
17
+ }
18
+ export interface ValidatedRemoteConnection {
19
+ edgeId: string;
20
+ sourceNodeId: string;
21
+ sourcePortId: string;
22
+ targetNodeId: string;
23
+ targetPortId: string;
24
+ dataType: string;
25
+ }
26
+ export interface RemoteConnectionValidation {
27
+ ok: boolean;
28
+ connections: ValidatedRemoteConnection[];
29
+ message?: string;
30
+ }
31
+ export declare function snapshotRemotePorts(definition: RemoteGraphDefinition): RemotePortSnapshot;
32
+ /** Parse saved port labels for an unavailable node without trusting them as live capabilities. */
33
+ export declare function readRemotePortSnapshot(value: unknown): RemotePortSnapshot | null;
34
+ export declare function remotePortFingerprint(definition: RemoteGraphDefinition): string;
35
+ /**
36
+ * Validate the graph wiring against *fresh scoped discovery*. The normal Kloks
37
+ * engine still owns ordering, fan-out, lifecycle, transport and authorization.
38
+ * This check only rejects corrupt or ambiguous client graph configuration.
39
+ */
40
+ export declare function validateRemoteConnections(nodes: readonly RemoteSavedNode[], edges: readonly FodConnectionEdge[], definitions: readonly RemoteGraphDefinition[]): RemoteConnectionValidation;
@@ -0,0 +1,37 @@
1
+ /** Fail-closed remote graph handles. Authorization remains with Kloks/Luth at the target. */
2
+ export interface RemoteGraphHandle {
3
+ appId: string;
4
+ targetWorkspaceId: string;
5
+ operationId: string;
6
+ operationVersion: string;
7
+ }
8
+ export interface RemoteGraphPort {
9
+ id: string;
10
+ name: string;
11
+ direction: string;
12
+ dataType: string;
13
+ }
14
+ export interface RemoteGraphDefinition {
15
+ type: string;
16
+ category: string;
17
+ inputs: RemoteGraphPort[];
18
+ outputs: RemoteGraphPort[];
19
+ metadata?: Record<string, unknown>;
20
+ }
21
+ export interface RemoteSavedNode {
22
+ id: string;
23
+ type: string;
24
+ data?: Record<string, unknown>;
25
+ }
26
+ export interface RemoteGraphValidation {
27
+ ok: boolean;
28
+ handles: RemoteGraphHandle[];
29
+ message?: string;
30
+ requiresWindowConsent: boolean;
31
+ }
32
+ export declare function readRemoteHandle(value: unknown): RemoteGraphHandle | null;
33
+ export declare function isRemoteGraphNode(node: RemoteSavedNode): boolean;
34
+ export declare function isLiveFrontendDefinition(definition: RemoteGraphDefinition): boolean;
35
+ export declare function filterRemoteDefinitions<T extends RemoteGraphDefinition>(definitions: readonly T[], localTypes?: readonly string[]): T[];
36
+ /** Reconcile saved handles against fresh principal/workspace-scoped discovery before dispatch. */
37
+ export declare function validateRemoteGraph(nodes: readonly RemoteSavedNode[], definitions: readonly RemoteGraphDefinition[]): RemoteGraphValidation;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Kloks FOD W5 uses a positive numeric immutable workflow revision. Generic
3
+ * Skipo operation versions remain opaque strings; NEVER coerce those unless
4
+ * the descriptor identifies an explicitly published FOD workflow.
5
+ *
6
+ * See Kloks packages/fod/WORKFLOW_BACKEND_CONTRACT.md (#113).
7
+ */
8
+ export interface KloksPublishedWorkflowCall {
9
+ targetAppId: string;
10
+ targetWorkspaceId: string;
11
+ workflowId: string;
12
+ version: number;
13
+ input?: unknown;
14
+ }
15
+ /** Narrow structural contract for the existing Kloks BackendClient's fod domain. */
16
+ export interface KloksBackendClientLike {
17
+ domain(domainName: string): {
18
+ execute(operation: string, payload: KloksPublishedWorkflowCall): Promise<unknown>;
19
+ };
20
+ }
21
+ export declare function toKloksPublishedWorkflowCall(candidate: unknown, input?: unknown): KloksPublishedWorkflowCall;
22
+ /**
23
+ * A typed adapter, not a new engine or authorization service. Host code must
24
+ * call it from the existing scoped graph executor, carrying authenticated
25
+ * source-workspace and ancestry via its trusted Kloks transport context.
26
+ * Target-side Kloks FOD W5 verifies the Luth principal, grant, version, cycle
27
+ * and owning workspace independently on EVERY invocation.
28
+ */
29
+ export declare function invokeKloksPublishedWorkflow<R = unknown>(client: KloksBackendClientLike, handle: unknown, input?: unknown): Promise<R>;
@@ -62,11 +62,6 @@ import {
62
62
  DockItem,
63
63
  useDock
64
64
  } from "./chunk-6VB74RCH.js";
65
- import {
66
- MonacoEditor,
67
- skipoDarkTheme,
68
- useMonaco
69
- } from "./chunk-KAKAFGVH.js";
70
65
  import {
71
66
  CanvasViewport,
72
67
  InfiniteCanvas,
@@ -74,8 +69,24 @@ import {
74
69
  useCanvas
75
70
  } from "./chunk-34YRDZPJ.js";
76
71
  import {
77
- FodModule
78
- } from "./chunk-24JGPSGO.js";
72
+ MonacoEditor,
73
+ skipoDarkTheme,
74
+ useMonaco
75
+ } from "./chunk-KAKAFGVH.js";
76
+ import {
77
+ FodModule,
78
+ filterRemoteDefinitions,
79
+ invokeKloksPublishedWorkflow,
80
+ isLiveFrontendDefinition,
81
+ isRemoteGraphNode,
82
+ readRemoteHandle,
83
+ readRemotePortSnapshot,
84
+ remotePortFingerprint,
85
+ snapshotRemotePorts,
86
+ toKloksPublishedWorkflowCall,
87
+ validateRemoteConnections,
88
+ validateRemoteGraph
89
+ } from "./chunk-DAAI7BIG.js";
79
90
  import {
80
91
  CanvasContextMenu,
81
92
  CompatibleNodePicker,
@@ -769,19 +780,28 @@ export {
769
780
  addAuthoringNode,
770
781
  bindAuthoringProperty,
771
782
  createAuthoringSession,
783
+ filterRemoteDefinitions,
772
784
  frnlEditableNodeGraphDefinition,
773
785
  getAuthoringChildren,
774
786
  getAuthoringDepth,
775
787
  getAuthoringSubtreeIds,
776
788
  getSocketLocalOffset,
777
789
  getSocketScreenPosition,
790
+ invokeKloksPublishedWorkflow,
791
+ isLiveFrontendDefinition,
792
+ isRemoteGraphNode,
778
793
  menuCategory,
779
794
  menuHidden,
795
+ readRemoteHandle,
796
+ readRemotePortSnapshot,
797
+ remotePortFingerprint,
780
798
  removeAuthoringBinding,
781
799
  removeAuthoringNode,
782
800
  renderSpriteIcon,
783
801
  setAuthoringOperations,
784
802
  skipoDarkTheme,
803
+ snapshotRemotePorts,
804
+ toKloksPublishedWorkflowCall,
785
805
  updateAuthoringNode,
786
806
  useCanvas,
787
807
  useCanvas2DCoordinates,
@@ -789,5 +809,7 @@ export {
789
809
  useDock,
790
810
  useMonaco,
791
811
  usePredictiveGraph2D,
792
- useTileMenu
812
+ useTileMenu,
813
+ validateRemoteConnections,
814
+ validateRemoteGraph
793
815
  };