@lace-cloud/canvas 0.20.0 → 0.21.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 +3 -3
- package/dist/{AccordionSection-QHNIBNJT.css → AccordionSection-J3ALHB5M.css} +22 -12
- package/dist/{App-D7WF3TWZ.css → App-IFIOMNV7.css} +47 -33
- package/dist/Banner-4TSIKYLF.css +48 -0
- package/dist/{Canvas-J6F7YHEK.css → Canvas-JRY2HAY6.css} +0 -56
- package/dist/CanvasControls-L6Q2LX2P.css +47 -0
- package/dist/ContextMenu-C7SLX23S.css +74 -0
- package/dist/DiagnosticsPanel-T6VDHH4A.css +64 -0
- package/dist/Drawer-34ZYTEWE.css +62 -0
- package/dist/EdgeInspectorPanel-JD6CVUAT.css +45 -0
- package/dist/EmptyCanvas-QA2OV3T3.css +21 -0
- package/dist/GroupNode-QWSLBFCH.css +197 -0
- package/dist/Identifier-V6MZ37EG.css +4 -0
- package/dist/{ModuleConfigPanel-LZRL4F3Q.css → ModuleConfigPanel-LTPLEG2L.css} +29 -10
- package/dist/{ModuleNode-OJXMNOL3.css → ModuleNode-RRZ37SFM.css} +97 -27
- package/dist/PaperGrid-WFRL3N4P.css +25 -0
- package/dist/ToolbarAction-PQNWHJSU.css +36 -0
- package/dist/UpdateButton-TJKSFVBA.css +16 -0
- package/dist/{chunk-R4RA2QI7.mjs → chunk-W6U3TVQK.mjs} +106 -110
- package/dist/chunk-W6U3TVQK.mjs.map +1 -0
- package/dist/engine/index.cjs +83 -104
- package/dist/engine/index.cjs.map +1 -1
- package/dist/engine/index.d.mts +3 -5
- package/dist/engine/index.d.ts +3 -5
- package/dist/engine/index.mjs +1 -3
- package/dist/icons-SBZCWI5T.css +14 -0
- package/dist/index.cjs +10710 -10373
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +35 -25
- package/dist/index.d.ts +35 -25
- package/dist/index.mjs +3026 -2641
- package/dist/index.mjs.map +1 -1
- package/dist/{mapping-ChSnv11V.d.mts → mapping-CopjG8Ae.d.mts} +59 -51
- package/dist/{mapping-ChSnv11V.d.ts → mapping-CopjG8Ae.d.ts} +59 -51
- package/dist/{panels-shared-OFOUQSUT.css → panels-shared-5JFNYXQ7.css} +47 -66
- package/package.json +3 -3
- package/dist/ConflictBanner-4V5K2QNU.css +0 -44
- package/dist/ContextMenu-EAQFLI5L.css +0 -46
- package/dist/DiagnosticsPanel-HB3JQYSY.css +0 -39
- package/dist/EdgeInspectorPanel-D536U5MZ.css +0 -54
- package/dist/GroupNode-XSB4OKGK.css +0 -150
- package/dist/Markers-XLREDZNM.css +0 -16
- package/dist/SourceRefusedBanner-5PXHEDHT.css +0 -23
- package/dist/chunk-R4RA2QI7.mjs.map +0 -1
|
@@ -1455,6 +1455,8 @@ declare enum Reason {
|
|
|
1455
1455
|
* REASON_CROSS_SCOPE - ApplyAction: a wire whose source and target are owned by different
|
|
1456
1456
|
* modules crosses a group's boundary, which no single-scope edit makes.
|
|
1457
1457
|
* It is a refusal of the batch's content, carried on its GraphError.
|
|
1458
|
+
* ReadWiringCandidates: a read whose two scopes differ, refused
|
|
1459
|
+
* (FailedPrecondition) as such a wire is.
|
|
1458
1460
|
*/
|
|
1459
1461
|
REASON_CROSS_SCOPE = 15,
|
|
1460
1462
|
/**
|
|
@@ -1509,17 +1511,6 @@ interface ShutdownResponse {
|
|
|
1509
1511
|
status: string;
|
|
1510
1512
|
}
|
|
1511
1513
|
declare const ShutdownResponse: MessageFns<ShutdownResponse>;
|
|
1512
|
-
interface ReadCredentialResponse {
|
|
1513
|
-
/**
|
|
1514
|
-
* Present exactly when the developer is signed in. A present key is never
|
|
1515
|
-
* empty, so the bytes are those of a plain string field: field 1 is
|
|
1516
|
-
* omitted while signed out and carries the key otherwise.
|
|
1517
|
-
*/
|
|
1518
|
-
api_key?: string | undefined;
|
|
1519
|
-
/** the API the engine's own commands call */
|
|
1520
|
-
api_base_url: string;
|
|
1521
|
-
}
|
|
1522
|
-
declare const ReadCredentialResponse: MessageFns<ReadCredentialResponse>;
|
|
1523
1514
|
interface SessionOpenRequest {
|
|
1524
1515
|
ephemeral?: EphemeralSession | undefined;
|
|
1525
1516
|
root?: RootSession | undefined;
|
|
@@ -1700,10 +1691,11 @@ interface CopyInstancesAction {
|
|
|
1700
1691
|
}
|
|
1701
1692
|
declare const CopyInstancesAction: MessageFns<CopyInstancesAction>;
|
|
1702
1693
|
/**
|
|
1703
|
-
* CreateGroupAction creates a new
|
|
1704
|
-
*
|
|
1705
|
-
*
|
|
1706
|
-
*
|
|
1694
|
+
* CreateGroupAction creates a new group from selected nodes. The wire
|
|
1695
|
+
* payload carries only membership: the engine names the group (the
|
|
1696
|
+
* scope's next free group_<n>, its one name) and reports it in
|
|
1697
|
+
* `BundleApplyResult.created`, and where the group is drawn and whether
|
|
1698
|
+
* it is collapsed are consumer-owned arrangement state.
|
|
1707
1699
|
*/
|
|
1708
1700
|
interface CreateGroupAction {
|
|
1709
1701
|
node_ids: string[];
|
|
@@ -1847,6 +1839,12 @@ interface WiringCandidate$1 {
|
|
|
1847
1839
|
score: number;
|
|
1848
1840
|
}
|
|
1849
1841
|
declare const WiringCandidate$1: MessageFns<WiringCandidate$1>;
|
|
1842
|
+
/**
|
|
1843
|
+
* A read names its two ends as a connect does: `scope` owns the targets and
|
|
1844
|
+
* `source_scope` the sources, both required. A read whose two scopes
|
|
1845
|
+
* differ is refused (FailedPrecondition, `REASON_CROSS_SCOPE`) as a wire
|
|
1846
|
+
* across them is: the matcher pairs the instances of one module only.
|
|
1847
|
+
*/
|
|
1850
1848
|
interface ReadWiringCandidatesRequest {
|
|
1851
1849
|
session_id: string;
|
|
1852
1850
|
/** The key of the module whose instances are matched (an action's `scope`). */
|
|
@@ -1861,6 +1859,8 @@ interface ReadWiringCandidatesRequest {
|
|
|
1861
1859
|
* every instance of the scope is a target.
|
|
1862
1860
|
*/
|
|
1863
1861
|
target_instance?: string | undefined;
|
|
1862
|
+
/** The key of the module that owns the sources (a wire's `source_scope`). */
|
|
1863
|
+
source_scope: string;
|
|
1864
1864
|
}
|
|
1865
1865
|
declare const ReadWiringCandidatesRequest: MessageFns<ReadWiringCandidatesRequest>;
|
|
1866
1866
|
interface ReadWiringCandidatesResponse {
|
|
@@ -2003,7 +2003,7 @@ declare const BundleStateEvent: MessageFns<BundleStateEvent>;
|
|
|
2003
2003
|
* tree. Consumers (VS Code extension, portal, tests) project this
|
|
2004
2004
|
* locally via the proto package's `projectCanvasView(bundle,
|
|
2005
2005
|
* arrangement?, meta)` to produce a renderable CanvasView —
|
|
2006
|
-
* `arrangement` (node positions, group collapse
|
|
2006
|
+
* `arrangement` (node positions, group collapse) is
|
|
2007
2007
|
* consumer-owned view state and never travels here.
|
|
2008
2008
|
*
|
|
2009
2009
|
* Not to be confused with the `bundle_snapshot` API entity, which is
|
|
@@ -2057,6 +2057,15 @@ interface BundleState {
|
|
|
2057
2057
|
* holds already shows a batch it applied.
|
|
2058
2058
|
*/
|
|
2059
2059
|
revision: number;
|
|
2060
|
+
/**
|
|
2061
|
+
* True while a Generate holds the session's one Generate: from the moment
|
|
2062
|
+
* SessionGenerate takes it until the call answers — the tree's write and
|
|
2063
|
+
* the module validate that certifies it. The session publishes a frame
|
|
2064
|
+
* when it is taken and when it is released, so a subscriber that joins
|
|
2065
|
+
* mid-Generate starts with it set, and a second SessionGenerate in that
|
|
2066
|
+
* window is refused (FailedPrecondition).
|
|
2067
|
+
*/
|
|
2068
|
+
generating: boolean;
|
|
2060
2069
|
}
|
|
2061
2070
|
declare const BundleState: MessageFns<BundleState>;
|
|
2062
2071
|
/**
|
|
@@ -2095,7 +2104,7 @@ declare const BundleApplyResult: MessageFns<BundleApplyResult>;
|
|
|
2095
2104
|
/**
|
|
2096
2105
|
* CreatedRef names one child created by an action (PlaceModule,
|
|
2097
2106
|
* CreateGroup, CopyInstances, ...). Clients key pending arrangement
|
|
2098
|
-
* writes (position, group
|
|
2107
|
+
* writes (position, group collapse) off these IDs instead of
|
|
2099
2108
|
* diffing BundleState frames.
|
|
2100
2109
|
*/
|
|
2101
2110
|
interface CreatedRef$1 {
|
|
@@ -2219,27 +2228,6 @@ declare const LaceEngineDefinition: {
|
|
|
2219
2228
|
readonly responseStream: false;
|
|
2220
2229
|
readonly options: {};
|
|
2221
2230
|
};
|
|
2222
|
-
/**
|
|
2223
|
-
* Answers the credential this engine holds: the API key `lace login`
|
|
2224
|
-
* saved or `LACE_TOKEN` supplies, read fresh on every call so a `lace
|
|
2225
|
-
* login` or `lace logout` takes effect at once (absent when signed out),
|
|
2226
|
-
* beside the base URL of the API that key is for, the one the engine's
|
|
2227
|
-
* own commands call (the CLI's `config.ResolveBaseURL`). The host
|
|
2228
|
-
* that spawned the engine builds its own authenticated transport to
|
|
2229
|
-
* Lace's API from the two, for the chat package, and never restates
|
|
2230
|
-
* which API; the engine knows nothing of what the host does with them. Served, like every RPC,
|
|
2231
|
-
* only to the bearer of the handshake's session token, and never
|
|
2232
|
-
* forwarded across the webview bridge (`BRIDGE_METHODS`,
|
|
2233
|
-
* @lace-cloud/proto's engine-bridge.ts).
|
|
2234
|
-
*/
|
|
2235
|
-
readonly readCredential: {
|
|
2236
|
-
readonly name: "ReadCredential";
|
|
2237
|
-
readonly requestType: typeof Empty;
|
|
2238
|
-
readonly requestStream: false;
|
|
2239
|
-
readonly responseType: typeof ReadCredentialResponse;
|
|
2240
|
-
readonly responseStream: false;
|
|
2241
|
-
readonly options: {};
|
|
2242
|
-
};
|
|
2243
2231
|
/**
|
|
2244
2232
|
* Session lifecycle. Never fails on a refused source tf — a refused tf
|
|
2245
2233
|
* opens the session source-refused (`BundleState.source_refused`) with
|
|
@@ -2336,8 +2324,9 @@ declare const LaceEngineDefinition: {
|
|
|
2336
2324
|
* Reads the output → input pairs the engine's matcher scores between the
|
|
2337
2325
|
* instances of one module of a session's working IR: the pairs an
|
|
2338
2326
|
* `auto_connect` chooses among, with the scores it chooses by. The
|
|
2339
|
-
* matching rules have this one home; a client
|
|
2340
|
-
*
|
|
2327
|
+
* matching rules have this one home; a client lists these pairs, best
|
|
2328
|
+
* first, for a connect whose pins it does not settle, and sends the pair
|
|
2329
|
+
* it is given as a `connect`.
|
|
2341
2330
|
*/
|
|
2342
2331
|
readonly readWiringCandidates: {
|
|
2343
2332
|
readonly name: "ReadWiringCandidates";
|
|
@@ -2378,7 +2367,7 @@ declare const LaceEngineDefinition: {
|
|
|
2378
2367
|
*
|
|
2379
2368
|
* Consumers (portal + extension canvas engines) project locally via
|
|
2380
2369
|
* `@lace-cloud/proto`'s `projectCanvasView(bundle, arrangement?, meta)`.
|
|
2381
|
-
* `arrangement` (node positions, group collapse
|
|
2370
|
+
* `arrangement` (node positions, group collapse) is consumer-owned
|
|
2382
2371
|
* view state — it never travels over this RPC.
|
|
2383
2372
|
*/
|
|
2384
2373
|
readonly subscribe: {
|
|
@@ -3466,9 +3455,9 @@ type CanvasSource = {
|
|
|
3466
3455
|
ungenerated: boolean;
|
|
3467
3456
|
conflict: SourceConflict | null;
|
|
3468
3457
|
sourceRefused: boolean;
|
|
3458
|
+
generating: boolean;
|
|
3469
3459
|
diagnostics: readonly Diagnostic$1[];
|
|
3470
3460
|
treeHash: string;
|
|
3471
|
-
revision: number;
|
|
3472
3461
|
};
|
|
3473
3462
|
type CommandResult = {
|
|
3474
3463
|
path: string;
|
|
@@ -3515,7 +3504,7 @@ type GraphError = {
|
|
|
3515
3504
|
/**
|
|
3516
3505
|
* Names one child created by a mutation (placement, group creation, copy).
|
|
3517
3506
|
* Mirrors the wire `CreatedRef` — clients key pending arrangement writes
|
|
3518
|
-
* (position, group
|
|
3507
|
+
* (position, group collapse) off these ids instead of diffing
|
|
3519
3508
|
* successive CanvasView frames to guess what changed.
|
|
3520
3509
|
*/
|
|
3521
3510
|
type CreatedRef = {
|
|
@@ -3539,6 +3528,7 @@ type WiringCandidate = {
|
|
|
3539
3528
|
};
|
|
3540
3529
|
type WiringQuery = {
|
|
3541
3530
|
scope: string;
|
|
3531
|
+
sourceScope: string;
|
|
3542
3532
|
source?: string;
|
|
3543
3533
|
target?: string;
|
|
3544
3534
|
};
|
|
@@ -3547,7 +3537,6 @@ type ApplyResult = {
|
|
|
3547
3537
|
errors: GraphError[];
|
|
3548
3538
|
created: CreatedRef[];
|
|
3549
3539
|
ties: WiringCandidate[];
|
|
3550
|
-
revision?: number;
|
|
3551
3540
|
};
|
|
3552
3541
|
type EditorPort = {
|
|
3553
3542
|
apply: (actions: readonly Action[]) => Promise<ApplyResult>;
|
|
@@ -3620,6 +3609,11 @@ type CanvasPorts = RunnerPorts & {
|
|
|
3620
3609
|
};
|
|
3621
3610
|
type PortName = keyof CanvasPorts;
|
|
3622
3611
|
|
|
3612
|
+
/** The type an action's `keys` hold: a key that starts with `Mod+`. It is the
|
|
3613
|
+
* grammar's prefix check alone — the type cannot spell an optional `Shift`
|
|
3614
|
+
* then one key — and `parseChord` refuses the rest at runtime. */
|
|
3615
|
+
type KeySpec = `Mod+${string}`;
|
|
3616
|
+
|
|
3623
3617
|
type EdgeRef = {
|
|
3624
3618
|
id: string;
|
|
3625
3619
|
source: string;
|
|
@@ -3627,7 +3621,7 @@ type EdgeRef = {
|
|
|
3627
3621
|
sourceOutput: string;
|
|
3628
3622
|
targetInput: string;
|
|
3629
3623
|
};
|
|
3630
|
-
type ContextKey = 'root' | 'sessionId' | 'stack' | 'editable' | 'saved' | 'resolved' | 'selection.node' | 'selection.edge' | 'diagnostics';
|
|
3624
|
+
type ContextKey = 'root' | 'sessionId' | 'stack' | 'editable' | 'saved' | 'unsaved' | 'resolved' | 'conflict' | 'sourceRefused' | 'selection.node' | 'selection.edge' | 'diagnostics' | 'settingsOpen' | 'generateIdle' | 'generating' | 'ungenerated' | 'undoable' | 'redoable';
|
|
3631
3625
|
type RunCtx = {
|
|
3632
3626
|
root?: string;
|
|
3633
3627
|
sessionId?: string;
|
|
@@ -3636,11 +3630,14 @@ type RunCtx = {
|
|
|
3636
3630
|
type CanvasCtx = RunCtx & {
|
|
3637
3631
|
ports: CanvasPorts;
|
|
3638
3632
|
editable: boolean;
|
|
3633
|
+
generating: boolean;
|
|
3634
|
+
sourceRefused: boolean;
|
|
3639
3635
|
view: CanvasView;
|
|
3640
3636
|
selection: {
|
|
3641
3637
|
nodes: readonly string[];
|
|
3642
3638
|
edge: EdgeRef | null;
|
|
3643
3639
|
};
|
|
3640
|
+
settingsOpen: boolean;
|
|
3644
3641
|
diagnostics: readonly Diagnostic$1[];
|
|
3645
3642
|
contributions: ContributionSet;
|
|
3646
3643
|
};
|
|
@@ -3668,19 +3665,21 @@ type CommandRead<P extends BoundPath> = {
|
|
|
3668
3665
|
type PanelSpec = {
|
|
3669
3666
|
id: string;
|
|
3670
3667
|
title: string;
|
|
3671
|
-
slot: 'banner' | 'toolbar' | '
|
|
3668
|
+
slot: 'banner' | 'toolbar' | 'drawer' | 'bottom';
|
|
3672
3669
|
requiredPorts: readonly PortName[];
|
|
3673
3670
|
reads?: readonly {
|
|
3674
3671
|
path: BoundPath;
|
|
3675
3672
|
}[];
|
|
3676
3673
|
requiredContext?: readonly ContextKey[];
|
|
3674
|
+
section?: string;
|
|
3677
3675
|
};
|
|
3678
3676
|
type ActionTarget = {
|
|
3679
3677
|
nodeId?: string;
|
|
3678
|
+
groupId?: string;
|
|
3680
3679
|
diagnostic?: Diagnostic$1;
|
|
3681
3680
|
runId?: string;
|
|
3682
3681
|
};
|
|
3683
|
-
type Placement = 'toolbar' | 'node-menu' | {
|
|
3682
|
+
type Placement = 'toolbar' | 'node-menu' | 'pane-menu' | {
|
|
3684
3683
|
row: string;
|
|
3685
3684
|
};
|
|
3686
3685
|
type ResultKind = 'run' | 'preview' | 'report' | 'notify' | 'follow';
|
|
@@ -3729,7 +3728,6 @@ type ClipboardStore = {
|
|
|
3729
3728
|
clear: () => void;
|
|
3730
3729
|
};
|
|
3731
3730
|
type LayoutHandle = {
|
|
3732
|
-
forcePositions: () => void;
|
|
3733
3731
|
panIntoView: (rect: {
|
|
3734
3732
|
x: number;
|
|
3735
3733
|
y: number;
|
|
@@ -3783,11 +3781,21 @@ type ErasedCommand = {
|
|
|
3783
3781
|
};
|
|
3784
3782
|
declare const KEY_SCOPES: readonly ["surface", "app"];
|
|
3785
3783
|
type KeyScope = (typeof KEY_SCOPES)[number];
|
|
3784
|
+
type ActionIcon = 'validate' | 'convert' | 'save' | 'generate' | 'undo' | 'redo' | 'clear';
|
|
3786
3785
|
type ActionContribution = {
|
|
3787
3786
|
id: string;
|
|
3788
3787
|
label: string;
|
|
3789
|
-
icon?:
|
|
3790
|
-
|
|
3788
|
+
icon?: ActionIcon;
|
|
3789
|
+
primary?: {
|
|
3790
|
+
when?: ContextKey;
|
|
3791
|
+
};
|
|
3792
|
+
busy?: {
|
|
3793
|
+
when: ContextKey;
|
|
3794
|
+
label: string;
|
|
3795
|
+
};
|
|
3796
|
+
section?: string;
|
|
3797
|
+
tone?: 'danger';
|
|
3798
|
+
keys?: readonly KeySpec[];
|
|
3791
3799
|
/** Defaults to `surface`. */
|
|
3792
3800
|
keyScope?: KeyScope;
|
|
3793
3801
|
placement: Placement;
|
|
@@ -4046,4 +4054,4 @@ declare function openEngineCommands(caller: EngineCaller, { cwd }: {
|
|
|
4046
4054
|
declare function openEngineSession(caller: DirectEngineCaller, target: EngineTarget, options?: EngineSessionOptions): Promise<EngineSession>;
|
|
4047
4055
|
declare function openEngineSession(caller: BridgeEngineCaller, target: NonFixtureTarget, options?: EngineSessionOptions): Promise<EngineSession>;
|
|
4048
4056
|
|
|
4049
|
-
export { type
|
|
4057
|
+
export { type EngineMethodResponse as $, type ActionContribution as A, type Badge as B, type ContributionSet as C, type Decorations as D, type EdgeRef as E, type CommandRun as F, type CommandsPort as G, type ConfirmSpec as H, type ConnectCallerOptions as I, type JsonOf as J, ConnectError as K, type LayoutHandle as L, type ContextKey as M, type NodeDecoration as N, type OverlayContribution as O, type PanelSpec as P, type ContextPort as Q, type ResultStore as R, type SourcePort as S, type CreatedRef as T, type DirectEngineCaller as U, EMPTY_REPORT_FOLD as V, type EditorBinding as W, type EditorEnv as X, type EditorEnvExtras as Y, type EditorPort as Z, type EngineCaller as _, type CanvasCtx as a, reduceReport as a$, type EngineSession as a0, type EngineSessionOptions as a1, type EngineTarget as a2, type ErasedCommand as a3, type FollowSlot as a4, type GenerateEvent as a5, type GraphError as a6, type HostBinding as a7, type Invocation as a8, type KeySpec as a9, connectCaller as aA, createActionRunner as aB, createResultStore as aC, currentReport as aD, defineCommand as aE, diagnosticsOf as aF, foldReport as aG, isBoundPath as aH, openEngineCommands as aI, openEngineSession as aJ, parseBound as aK, parseCommandFailure as aL, reportDiagnostics as aM, toArgv as aN, uniqueDiagnostics as aO, Action as aP, InputMode as aQ, type LaceReason as aR, type LiveSlots as aS, type OnScreen as aT, type RunPhase as aU, type RunPhaseStatus as aV, diagnosticsOfDocument as aW, liveSlots as aX, reasonWire as aY, reduceFollow as aZ, reducePreview as a_, type Placement as aa, type PortName as ab, type PresenterPort as ac, type PreviewSlot as ad, Reason as ae, type ReportEntry as af, type ReportFold as ag, type ReportPath as ah, type ReportSlot as ai, type ResultKind as aj, type ResultSlots as ak, type RunOutcome as al, type RunSlot as am, type RunnerPorts as an, SCHEMAS as ao, type Sink as ap, type SinkInput as aq, type SlotContext as ar, type SlotKind as as, type SourceConflict as at, type StackRef as au, type ViewStatePort as av, type WiringCandidate as aw, type WiringQuery as ax, bridgeCaller as ay, carriesFailure as az, type CanvasPorts as b, reduceRun as b0, settleRun as b1, type PendingForm as c, type BoundPath as d, type CommandRead as e, type ActionTarget as f, type CommandResult as g, type CanvasSource as h, type SourceEnd as i, type RunCtx as j, Bundle as k, type ActionRunner as l, type ActionIcon as m, type ActionRunnerOptions as n, type ApplyResult as o, ApplyUnobservedError as p, type ArgsOf as q, type BindingRuntime as r, type BridgeEngineCaller as s, COMMANDS as t, type ClipboardStore as u, type CommandBinding as v, CommandDetachedError as w, CommandExitError as x, type CommandFailure as y, type CommandPath as z };
|
|
@@ -1455,6 +1455,8 @@ declare enum Reason {
|
|
|
1455
1455
|
* REASON_CROSS_SCOPE - ApplyAction: a wire whose source and target are owned by different
|
|
1456
1456
|
* modules crosses a group's boundary, which no single-scope edit makes.
|
|
1457
1457
|
* It is a refusal of the batch's content, carried on its GraphError.
|
|
1458
|
+
* ReadWiringCandidates: a read whose two scopes differ, refused
|
|
1459
|
+
* (FailedPrecondition) as such a wire is.
|
|
1458
1460
|
*/
|
|
1459
1461
|
REASON_CROSS_SCOPE = 15,
|
|
1460
1462
|
/**
|
|
@@ -1509,17 +1511,6 @@ interface ShutdownResponse {
|
|
|
1509
1511
|
status: string;
|
|
1510
1512
|
}
|
|
1511
1513
|
declare const ShutdownResponse: MessageFns<ShutdownResponse>;
|
|
1512
|
-
interface ReadCredentialResponse {
|
|
1513
|
-
/**
|
|
1514
|
-
* Present exactly when the developer is signed in. A present key is never
|
|
1515
|
-
* empty, so the bytes are those of a plain string field: field 1 is
|
|
1516
|
-
* omitted while signed out and carries the key otherwise.
|
|
1517
|
-
*/
|
|
1518
|
-
api_key?: string | undefined;
|
|
1519
|
-
/** the API the engine's own commands call */
|
|
1520
|
-
api_base_url: string;
|
|
1521
|
-
}
|
|
1522
|
-
declare const ReadCredentialResponse: MessageFns<ReadCredentialResponse>;
|
|
1523
1514
|
interface SessionOpenRequest {
|
|
1524
1515
|
ephemeral?: EphemeralSession | undefined;
|
|
1525
1516
|
root?: RootSession | undefined;
|
|
@@ -1700,10 +1691,11 @@ interface CopyInstancesAction {
|
|
|
1700
1691
|
}
|
|
1701
1692
|
declare const CopyInstancesAction: MessageFns<CopyInstancesAction>;
|
|
1702
1693
|
/**
|
|
1703
|
-
* CreateGroupAction creates a new
|
|
1704
|
-
*
|
|
1705
|
-
*
|
|
1706
|
-
*
|
|
1694
|
+
* CreateGroupAction creates a new group from selected nodes. The wire
|
|
1695
|
+
* payload carries only membership: the engine names the group (the
|
|
1696
|
+
* scope's next free group_<n>, its one name) and reports it in
|
|
1697
|
+
* `BundleApplyResult.created`, and where the group is drawn and whether
|
|
1698
|
+
* it is collapsed are consumer-owned arrangement state.
|
|
1707
1699
|
*/
|
|
1708
1700
|
interface CreateGroupAction {
|
|
1709
1701
|
node_ids: string[];
|
|
@@ -1847,6 +1839,12 @@ interface WiringCandidate$1 {
|
|
|
1847
1839
|
score: number;
|
|
1848
1840
|
}
|
|
1849
1841
|
declare const WiringCandidate$1: MessageFns<WiringCandidate$1>;
|
|
1842
|
+
/**
|
|
1843
|
+
* A read names its two ends as a connect does: `scope` owns the targets and
|
|
1844
|
+
* `source_scope` the sources, both required. A read whose two scopes
|
|
1845
|
+
* differ is refused (FailedPrecondition, `REASON_CROSS_SCOPE`) as a wire
|
|
1846
|
+
* across them is: the matcher pairs the instances of one module only.
|
|
1847
|
+
*/
|
|
1850
1848
|
interface ReadWiringCandidatesRequest {
|
|
1851
1849
|
session_id: string;
|
|
1852
1850
|
/** The key of the module whose instances are matched (an action's `scope`). */
|
|
@@ -1861,6 +1859,8 @@ interface ReadWiringCandidatesRequest {
|
|
|
1861
1859
|
* every instance of the scope is a target.
|
|
1862
1860
|
*/
|
|
1863
1861
|
target_instance?: string | undefined;
|
|
1862
|
+
/** The key of the module that owns the sources (a wire's `source_scope`). */
|
|
1863
|
+
source_scope: string;
|
|
1864
1864
|
}
|
|
1865
1865
|
declare const ReadWiringCandidatesRequest: MessageFns<ReadWiringCandidatesRequest>;
|
|
1866
1866
|
interface ReadWiringCandidatesResponse {
|
|
@@ -2003,7 +2003,7 @@ declare const BundleStateEvent: MessageFns<BundleStateEvent>;
|
|
|
2003
2003
|
* tree. Consumers (VS Code extension, portal, tests) project this
|
|
2004
2004
|
* locally via the proto package's `projectCanvasView(bundle,
|
|
2005
2005
|
* arrangement?, meta)` to produce a renderable CanvasView —
|
|
2006
|
-
* `arrangement` (node positions, group collapse
|
|
2006
|
+
* `arrangement` (node positions, group collapse) is
|
|
2007
2007
|
* consumer-owned view state and never travels here.
|
|
2008
2008
|
*
|
|
2009
2009
|
* Not to be confused with the `bundle_snapshot` API entity, which is
|
|
@@ -2057,6 +2057,15 @@ interface BundleState {
|
|
|
2057
2057
|
* holds already shows a batch it applied.
|
|
2058
2058
|
*/
|
|
2059
2059
|
revision: number;
|
|
2060
|
+
/**
|
|
2061
|
+
* True while a Generate holds the session's one Generate: from the moment
|
|
2062
|
+
* SessionGenerate takes it until the call answers — the tree's write and
|
|
2063
|
+
* the module validate that certifies it. The session publishes a frame
|
|
2064
|
+
* when it is taken and when it is released, so a subscriber that joins
|
|
2065
|
+
* mid-Generate starts with it set, and a second SessionGenerate in that
|
|
2066
|
+
* window is refused (FailedPrecondition).
|
|
2067
|
+
*/
|
|
2068
|
+
generating: boolean;
|
|
2060
2069
|
}
|
|
2061
2070
|
declare const BundleState: MessageFns<BundleState>;
|
|
2062
2071
|
/**
|
|
@@ -2095,7 +2104,7 @@ declare const BundleApplyResult: MessageFns<BundleApplyResult>;
|
|
|
2095
2104
|
/**
|
|
2096
2105
|
* CreatedRef names one child created by an action (PlaceModule,
|
|
2097
2106
|
* CreateGroup, CopyInstances, ...). Clients key pending arrangement
|
|
2098
|
-
* writes (position, group
|
|
2107
|
+
* writes (position, group collapse) off these IDs instead of
|
|
2099
2108
|
* diffing BundleState frames.
|
|
2100
2109
|
*/
|
|
2101
2110
|
interface CreatedRef$1 {
|
|
@@ -2219,27 +2228,6 @@ declare const LaceEngineDefinition: {
|
|
|
2219
2228
|
readonly responseStream: false;
|
|
2220
2229
|
readonly options: {};
|
|
2221
2230
|
};
|
|
2222
|
-
/**
|
|
2223
|
-
* Answers the credential this engine holds: the API key `lace login`
|
|
2224
|
-
* saved or `LACE_TOKEN` supplies, read fresh on every call so a `lace
|
|
2225
|
-
* login` or `lace logout` takes effect at once (absent when signed out),
|
|
2226
|
-
* beside the base URL of the API that key is for, the one the engine's
|
|
2227
|
-
* own commands call (the CLI's `config.ResolveBaseURL`). The host
|
|
2228
|
-
* that spawned the engine builds its own authenticated transport to
|
|
2229
|
-
* Lace's API from the two, for the chat package, and never restates
|
|
2230
|
-
* which API; the engine knows nothing of what the host does with them. Served, like every RPC,
|
|
2231
|
-
* only to the bearer of the handshake's session token, and never
|
|
2232
|
-
* forwarded across the webview bridge (`BRIDGE_METHODS`,
|
|
2233
|
-
* @lace-cloud/proto's engine-bridge.ts).
|
|
2234
|
-
*/
|
|
2235
|
-
readonly readCredential: {
|
|
2236
|
-
readonly name: "ReadCredential";
|
|
2237
|
-
readonly requestType: typeof Empty;
|
|
2238
|
-
readonly requestStream: false;
|
|
2239
|
-
readonly responseType: typeof ReadCredentialResponse;
|
|
2240
|
-
readonly responseStream: false;
|
|
2241
|
-
readonly options: {};
|
|
2242
|
-
};
|
|
2243
2231
|
/**
|
|
2244
2232
|
* Session lifecycle. Never fails on a refused source tf — a refused tf
|
|
2245
2233
|
* opens the session source-refused (`BundleState.source_refused`) with
|
|
@@ -2336,8 +2324,9 @@ declare const LaceEngineDefinition: {
|
|
|
2336
2324
|
* Reads the output → input pairs the engine's matcher scores between the
|
|
2337
2325
|
* instances of one module of a session's working IR: the pairs an
|
|
2338
2326
|
* `auto_connect` chooses among, with the scores it chooses by. The
|
|
2339
|
-
* matching rules have this one home; a client
|
|
2340
|
-
*
|
|
2327
|
+
* matching rules have this one home; a client lists these pairs, best
|
|
2328
|
+
* first, for a connect whose pins it does not settle, and sends the pair
|
|
2329
|
+
* it is given as a `connect`.
|
|
2341
2330
|
*/
|
|
2342
2331
|
readonly readWiringCandidates: {
|
|
2343
2332
|
readonly name: "ReadWiringCandidates";
|
|
@@ -2378,7 +2367,7 @@ declare const LaceEngineDefinition: {
|
|
|
2378
2367
|
*
|
|
2379
2368
|
* Consumers (portal + extension canvas engines) project locally via
|
|
2380
2369
|
* `@lace-cloud/proto`'s `projectCanvasView(bundle, arrangement?, meta)`.
|
|
2381
|
-
* `arrangement` (node positions, group collapse
|
|
2370
|
+
* `arrangement` (node positions, group collapse) is consumer-owned
|
|
2382
2371
|
* view state — it never travels over this RPC.
|
|
2383
2372
|
*/
|
|
2384
2373
|
readonly subscribe: {
|
|
@@ -3466,9 +3455,9 @@ type CanvasSource = {
|
|
|
3466
3455
|
ungenerated: boolean;
|
|
3467
3456
|
conflict: SourceConflict | null;
|
|
3468
3457
|
sourceRefused: boolean;
|
|
3458
|
+
generating: boolean;
|
|
3469
3459
|
diagnostics: readonly Diagnostic$1[];
|
|
3470
3460
|
treeHash: string;
|
|
3471
|
-
revision: number;
|
|
3472
3461
|
};
|
|
3473
3462
|
type CommandResult = {
|
|
3474
3463
|
path: string;
|
|
@@ -3515,7 +3504,7 @@ type GraphError = {
|
|
|
3515
3504
|
/**
|
|
3516
3505
|
* Names one child created by a mutation (placement, group creation, copy).
|
|
3517
3506
|
* Mirrors the wire `CreatedRef` — clients key pending arrangement writes
|
|
3518
|
-
* (position, group
|
|
3507
|
+
* (position, group collapse) off these ids instead of diffing
|
|
3519
3508
|
* successive CanvasView frames to guess what changed.
|
|
3520
3509
|
*/
|
|
3521
3510
|
type CreatedRef = {
|
|
@@ -3539,6 +3528,7 @@ type WiringCandidate = {
|
|
|
3539
3528
|
};
|
|
3540
3529
|
type WiringQuery = {
|
|
3541
3530
|
scope: string;
|
|
3531
|
+
sourceScope: string;
|
|
3542
3532
|
source?: string;
|
|
3543
3533
|
target?: string;
|
|
3544
3534
|
};
|
|
@@ -3547,7 +3537,6 @@ type ApplyResult = {
|
|
|
3547
3537
|
errors: GraphError[];
|
|
3548
3538
|
created: CreatedRef[];
|
|
3549
3539
|
ties: WiringCandidate[];
|
|
3550
|
-
revision?: number;
|
|
3551
3540
|
};
|
|
3552
3541
|
type EditorPort = {
|
|
3553
3542
|
apply: (actions: readonly Action[]) => Promise<ApplyResult>;
|
|
@@ -3620,6 +3609,11 @@ type CanvasPorts = RunnerPorts & {
|
|
|
3620
3609
|
};
|
|
3621
3610
|
type PortName = keyof CanvasPorts;
|
|
3622
3611
|
|
|
3612
|
+
/** The type an action's `keys` hold: a key that starts with `Mod+`. It is the
|
|
3613
|
+
* grammar's prefix check alone — the type cannot spell an optional `Shift`
|
|
3614
|
+
* then one key — and `parseChord` refuses the rest at runtime. */
|
|
3615
|
+
type KeySpec = `Mod+${string}`;
|
|
3616
|
+
|
|
3623
3617
|
type EdgeRef = {
|
|
3624
3618
|
id: string;
|
|
3625
3619
|
source: string;
|
|
@@ -3627,7 +3621,7 @@ type EdgeRef = {
|
|
|
3627
3621
|
sourceOutput: string;
|
|
3628
3622
|
targetInput: string;
|
|
3629
3623
|
};
|
|
3630
|
-
type ContextKey = 'root' | 'sessionId' | 'stack' | 'editable' | 'saved' | 'resolved' | 'selection.node' | 'selection.edge' | 'diagnostics';
|
|
3624
|
+
type ContextKey = 'root' | 'sessionId' | 'stack' | 'editable' | 'saved' | 'unsaved' | 'resolved' | 'conflict' | 'sourceRefused' | 'selection.node' | 'selection.edge' | 'diagnostics' | 'settingsOpen' | 'generateIdle' | 'generating' | 'ungenerated' | 'undoable' | 'redoable';
|
|
3631
3625
|
type RunCtx = {
|
|
3632
3626
|
root?: string;
|
|
3633
3627
|
sessionId?: string;
|
|
@@ -3636,11 +3630,14 @@ type RunCtx = {
|
|
|
3636
3630
|
type CanvasCtx = RunCtx & {
|
|
3637
3631
|
ports: CanvasPorts;
|
|
3638
3632
|
editable: boolean;
|
|
3633
|
+
generating: boolean;
|
|
3634
|
+
sourceRefused: boolean;
|
|
3639
3635
|
view: CanvasView;
|
|
3640
3636
|
selection: {
|
|
3641
3637
|
nodes: readonly string[];
|
|
3642
3638
|
edge: EdgeRef | null;
|
|
3643
3639
|
};
|
|
3640
|
+
settingsOpen: boolean;
|
|
3644
3641
|
diagnostics: readonly Diagnostic$1[];
|
|
3645
3642
|
contributions: ContributionSet;
|
|
3646
3643
|
};
|
|
@@ -3668,19 +3665,21 @@ type CommandRead<P extends BoundPath> = {
|
|
|
3668
3665
|
type PanelSpec = {
|
|
3669
3666
|
id: string;
|
|
3670
3667
|
title: string;
|
|
3671
|
-
slot: 'banner' | 'toolbar' | '
|
|
3668
|
+
slot: 'banner' | 'toolbar' | 'drawer' | 'bottom';
|
|
3672
3669
|
requiredPorts: readonly PortName[];
|
|
3673
3670
|
reads?: readonly {
|
|
3674
3671
|
path: BoundPath;
|
|
3675
3672
|
}[];
|
|
3676
3673
|
requiredContext?: readonly ContextKey[];
|
|
3674
|
+
section?: string;
|
|
3677
3675
|
};
|
|
3678
3676
|
type ActionTarget = {
|
|
3679
3677
|
nodeId?: string;
|
|
3678
|
+
groupId?: string;
|
|
3680
3679
|
diagnostic?: Diagnostic$1;
|
|
3681
3680
|
runId?: string;
|
|
3682
3681
|
};
|
|
3683
|
-
type Placement = 'toolbar' | 'node-menu' | {
|
|
3682
|
+
type Placement = 'toolbar' | 'node-menu' | 'pane-menu' | {
|
|
3684
3683
|
row: string;
|
|
3685
3684
|
};
|
|
3686
3685
|
type ResultKind = 'run' | 'preview' | 'report' | 'notify' | 'follow';
|
|
@@ -3729,7 +3728,6 @@ type ClipboardStore = {
|
|
|
3729
3728
|
clear: () => void;
|
|
3730
3729
|
};
|
|
3731
3730
|
type LayoutHandle = {
|
|
3732
|
-
forcePositions: () => void;
|
|
3733
3731
|
panIntoView: (rect: {
|
|
3734
3732
|
x: number;
|
|
3735
3733
|
y: number;
|
|
@@ -3783,11 +3781,21 @@ type ErasedCommand = {
|
|
|
3783
3781
|
};
|
|
3784
3782
|
declare const KEY_SCOPES: readonly ["surface", "app"];
|
|
3785
3783
|
type KeyScope = (typeof KEY_SCOPES)[number];
|
|
3784
|
+
type ActionIcon = 'validate' | 'convert' | 'save' | 'generate' | 'undo' | 'redo' | 'clear';
|
|
3786
3785
|
type ActionContribution = {
|
|
3787
3786
|
id: string;
|
|
3788
3787
|
label: string;
|
|
3789
|
-
icon?:
|
|
3790
|
-
|
|
3788
|
+
icon?: ActionIcon;
|
|
3789
|
+
primary?: {
|
|
3790
|
+
when?: ContextKey;
|
|
3791
|
+
};
|
|
3792
|
+
busy?: {
|
|
3793
|
+
when: ContextKey;
|
|
3794
|
+
label: string;
|
|
3795
|
+
};
|
|
3796
|
+
section?: string;
|
|
3797
|
+
tone?: 'danger';
|
|
3798
|
+
keys?: readonly KeySpec[];
|
|
3791
3799
|
/** Defaults to `surface`. */
|
|
3792
3800
|
keyScope?: KeyScope;
|
|
3793
3801
|
placement: Placement;
|
|
@@ -4046,4 +4054,4 @@ declare function openEngineCommands(caller: EngineCaller, { cwd }: {
|
|
|
4046
4054
|
declare function openEngineSession(caller: DirectEngineCaller, target: EngineTarget, options?: EngineSessionOptions): Promise<EngineSession>;
|
|
4047
4055
|
declare function openEngineSession(caller: BridgeEngineCaller, target: NonFixtureTarget, options?: EngineSessionOptions): Promise<EngineSession>;
|
|
4048
4056
|
|
|
4049
|
-
export { type
|
|
4057
|
+
export { type EngineMethodResponse as $, type ActionContribution as A, type Badge as B, type ContributionSet as C, type Decorations as D, type EdgeRef as E, type CommandRun as F, type CommandsPort as G, type ConfirmSpec as H, type ConnectCallerOptions as I, type JsonOf as J, ConnectError as K, type LayoutHandle as L, type ContextKey as M, type NodeDecoration as N, type OverlayContribution as O, type PanelSpec as P, type ContextPort as Q, type ResultStore as R, type SourcePort as S, type CreatedRef as T, type DirectEngineCaller as U, EMPTY_REPORT_FOLD as V, type EditorBinding as W, type EditorEnv as X, type EditorEnvExtras as Y, type EditorPort as Z, type EngineCaller as _, type CanvasCtx as a, reduceReport as a$, type EngineSession as a0, type EngineSessionOptions as a1, type EngineTarget as a2, type ErasedCommand as a3, type FollowSlot as a4, type GenerateEvent as a5, type GraphError as a6, type HostBinding as a7, type Invocation as a8, type KeySpec as a9, connectCaller as aA, createActionRunner as aB, createResultStore as aC, currentReport as aD, defineCommand as aE, diagnosticsOf as aF, foldReport as aG, isBoundPath as aH, openEngineCommands as aI, openEngineSession as aJ, parseBound as aK, parseCommandFailure as aL, reportDiagnostics as aM, toArgv as aN, uniqueDiagnostics as aO, Action as aP, InputMode as aQ, type LaceReason as aR, type LiveSlots as aS, type OnScreen as aT, type RunPhase as aU, type RunPhaseStatus as aV, diagnosticsOfDocument as aW, liveSlots as aX, reasonWire as aY, reduceFollow as aZ, reducePreview as a_, type Placement as aa, type PortName as ab, type PresenterPort as ac, type PreviewSlot as ad, Reason as ae, type ReportEntry as af, type ReportFold as ag, type ReportPath as ah, type ReportSlot as ai, type ResultKind as aj, type ResultSlots as ak, type RunOutcome as al, type RunSlot as am, type RunnerPorts as an, SCHEMAS as ao, type Sink as ap, type SinkInput as aq, type SlotContext as ar, type SlotKind as as, type SourceConflict as at, type StackRef as au, type ViewStatePort as av, type WiringCandidate as aw, type WiringQuery as ax, bridgeCaller as ay, carriesFailure as az, type CanvasPorts as b, reduceRun as b0, settleRun as b1, type PendingForm as c, type BoundPath as d, type CommandRead as e, type ActionTarget as f, type CommandResult as g, type CanvasSource as h, type SourceEnd as i, type RunCtx as j, Bundle as k, type ActionRunner as l, type ActionIcon as m, type ActionRunnerOptions as n, type ApplyResult as o, ApplyUnobservedError as p, type ArgsOf as q, type BindingRuntime as r, type BridgeEngineCaller as s, COMMANDS as t, type ClipboardStore as u, type CommandBinding as v, CommandDetachedError as w, CommandExitError as x, type CommandFailure as y, type CommandPath as z };
|