process-graph 1.4.0 → 2.0.1

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 (43) hide show
  1. package/dist/bin.js +2 -2
  2. package/dist/cli.d.ts +9 -9
  3. package/dist/cli.js +3 -3
  4. package/dist/{data-file-BVMxkTug.js → data-file-B8__c10l.js} +1 -1
  5. package/dist/dist-B0mKgR5B.js +4 -0
  6. package/dist/{dist-C8zDuW-y.js → dist-BnymJpfk.js} +7 -7
  7. package/dist/{graphql-3DSUSUvL.d.ts → graphql-CGWZ6USe.d.ts} +1 -1
  8. package/dist/{index-DoMIav3D.d.ts → index-7nV7hCmv.d.ts} +2 -2
  9. package/dist/{index-RwwlDYZ7.d.ts → index-B2p3mEJ3.d.ts} +2 -2
  10. package/dist/{index-LWdwpjZG.d.ts → index-C-ZNF81j.d.ts} +4 -4
  11. package/dist/{index-Cp5selgs.d.ts → index-CiaCmQDP.d.ts} +2 -2
  12. package/dist/{index-Cs1CWlEg.d.ts → index-CotF9Lhh.d.ts} +4 -31
  13. package/dist/{index-Bb90VKMc.d.ts → index-DAevZqW-.d.ts} +2 -2
  14. package/dist/{index-Dvz_I_uQ.d.ts → index-DYl6lZLe.d.ts} +29 -1
  15. package/dist/{index-4f4PVH7K.d.ts → index-DluJZTbT.d.ts} +1 -1
  16. package/dist/{index-CR8xUK3S.d.ts → index-KhygugOP.d.ts} +6 -44
  17. package/dist/{index-D4CnOhNf.d.ts → index-wQnLXJmD.d.ts} +1 -1
  18. package/dist/index.d.ts +5 -5
  19. package/dist/index.js +3 -3
  20. package/dist/layout.d.ts +1 -1
  21. package/dist/react-flow.d.ts +5 -5
  22. package/dist/react.d.ts +2 -2
  23. package/dist/{router-Dk91O_9p.js → router-DzVcQ28U.js} +2 -2
  24. package/dist/{schema-BPT8fmfa.js → schema-CL95Lyni.js} +24 -13
  25. package/dist/{schema-DVAttrJg.js → schema-DMXa8gAZ.js} +3 -12
  26. package/dist/source/github/node.d.ts +1 -1
  27. package/dist/source/github.d.ts +4 -4
  28. package/dist/source/github.js +3 -3
  29. package/dist/{source-lTKshktI.js → source-DM4fLS5P.js} +1 -1
  30. package/dist/store/node.d.ts +1 -1
  31. package/dist/store/node.js +1 -1
  32. package/dist/store/wasm/worker.js +4 -3
  33. package/dist/store/wasm.d.ts +1 -1
  34. package/dist/{store-DKzvLGgl.js → store-CgweIG8J.js} +3 -12
  35. package/dist/store.d.ts +16 -2
  36. package/dist/store.js +3 -3
  37. package/dist/sync.d.ts +1 -1
  38. package/dist/sync.js +1 -1
  39. package/dist/ui.d.ts +4 -4
  40. package/dist/{version-DMNBcTZ-.js → version-CIjYEDDB.js} +1 -1
  41. package/dist/{view-DTeNUhGG.js → view-DcktInd7.js} +1 -1
  42. package/package.json +25 -25
  43. package/dist/dist-DipyhCvb.js +0 -4
package/dist/bin.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as exitCodes } from "./exit-codes-0ultCqdS.js";
3
- import { t as version } from "./version-DMNBcTZ-.js";
3
+ import { t as version } from "./version-CIjYEDDB.js";
4
4
  import { readFileSync } from "node:fs";
5
5
  //#region src/missing-peers.ts
6
6
  /**
@@ -84,7 +84,7 @@ if (missing.length > 0) {
84
84
  process.stderr.write(missingPeersMessage(missing, declaredPeers(), process.env.npm_config_user_agent));
85
85
  process.exitCode = exitCodes.missingPeers;
86
86
  } else {
87
- const { runProcess } = await import("./dist-DipyhCvb.js");
87
+ const { runProcess } = await import("./dist-B0mKgR5B.js");
88
88
  process.exitCode = await runProcess({
89
89
  name: "process-graph",
90
90
  version
package/dist/cli.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- import { A as Facts, B as Status, _ as StatusRule, k as FactRecord, m as IncomingBasis, p as ArtefactBasis } from "./index-D4CnOhNf.js";
2
- import { A as Transition, C as EventDef, D as Participant, I as OverlayStatus, S as Element, _ as Model, o as Overlay, q as OpenIds, x as ArtefactDef } from "./index-Dvz_I_uQ.js";
3
- import { P as SyncFilter, b as Gap, h as GraphSourceClient } from "./index-Cs1CWlEg.js";
4
- import { ut as GraphStoreClient } from "./index-CR8xUK3S.js";
5
- import { n as GraphqlFetch, t as GitHubTokenPort } from "./graphql-3DSUSUvL.js";
6
- import "./index-Cp5selgs.js";
7
- import { F as Handoff, N as Flowchart, k as Swimlane, w as StateMachine, y as SequenceDiagram } from "./index-4f4PVH7K.js";
8
- import { n as SourceLookup } from "./index-DoMIav3D.js";
9
- import { a as flowchartToMermaid, c as swimlaneToMermaid, i as swimlaneToDot, n as sequenceToDot, o as sequenceToMermaid, r as stateMachineToDot, s as stateMachineToMermaid, t as flowchartToDot } from "./index-Bb90VKMc.js";
1
+ import { A as Facts, B as Status, _ as StatusRule, k as FactRecord, m as IncomingBasis, p as ArtefactBasis } from "./index-wQnLXJmD.js";
2
+ import { A as Participant, E as EventDef, N as Transition, T as Element, X as OpenIds, b as Model, l as Overlay, w as ArtefactDef, z as OverlayStatus } from "./index-DYl6lZLe.js";
3
+ import { N as SyncFilter, h as GraphSourceClient, y as Gap } from "./index-CotF9Lhh.js";
4
+ import { ct as GraphStoreClient } from "./index-KhygugOP.js";
5
+ import { n as GraphqlFetch, t as GitHubTokenPort } from "./graphql-CGWZ6USe.js";
6
+ import "./index-CiaCmQDP.js";
7
+ import { F as Handoff, N as Flowchart, k as Swimlane, w as StateMachine, y as SequenceDiagram } from "./index-DluJZTbT.js";
8
+ import { n as SourceLookup } from "./index-7nV7hCmv.js";
9
+ import { a as flowchartToMermaid, c as swimlaneToMermaid, i as swimlaneToDot, n as sequenceToDot, o as sequenceToMermaid, r as stateMachineToDot, s as stateMachineToMermaid, t as flowchartToDot } from "./index-DAevZqW-.js";
10
10
  import { ComputedValue } from "trilean";
11
11
  //#region ../graph-cli/dist/exit-codes.d.ts
12
12
  /**
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
- import { a as stateMachineToDot, c as sequenceToMermaid, i as sequenceToDot, l as stateMachineToMermaid, o as swimlaneToDot, r as flowchartToDot, s as flowchartToMermaid, u as swimlaneToMermaid } from "./view-DTeNUhGG.js";
1
+ import { a as stateMachineToDot, c as sequenceToMermaid, i as sequenceToDot, l as stateMachineToMermaid, o as swimlaneToDot, r as flowchartToDot, s as flowchartToMermaid, u as swimlaneToMermaid } from "./view-DcktInd7.js";
2
2
  import { t as exitCodes } from "./exit-codes-0ultCqdS.js";
3
- import { A as setState, C as ready, D as factsOf, E as artefactStates, F as failureOf, M as loadRun, N as runFacts, O as setArtefact, P as CliError, S as path, T as add, _ as blocked, a as defaultModelId, b as handoffsOf, c as validateStored, d as project, f as show, g as ancestors, h as sync, i as runProcess, j as findRun, k as setFact, l as emit, m as SyncInterruptedError, n as nodePorts, o as runCli, p as viewNames, r as packageVersion, s as validateDocument, t as defaultDataPath, u as formatNames, v as children, w as why, x as impactOf, y as cycles } from "./dist-C8zDuW-y.js";
4
- import { t as version } from "./version-DMNBcTZ-.js";
3
+ import { A as setState, C as ready, D as factsOf, E as artefactStates, F as failureOf, M as loadRun, N as runFacts, O as setArtefact, P as CliError, S as path, T as add, _ as blocked, a as defaultModelId, b as handoffsOf, c as validateStored, d as project, f as show, g as ancestors, h as sync, i as runProcess, j as findRun, k as setFact, l as emit, m as SyncInterruptedError, n as nodePorts, o as runCli, p as viewNames, r as packageVersion, s as validateDocument, t as defaultDataPath, u as formatNames, v as children, w as why, x as impactOf, y as cycles } from "./dist-BnymJpfk.js";
4
+ import { t as version } from "./version-CIjYEDDB.js";
5
5
  export { CliError, SyncInterruptedError, add, ancestors, artefactStates, blocked, children, cycles, defaultDataPath, defaultModelId, emit, exitCodes, factsOf, failureOf, findRun, flowchartToDot, flowchartToMermaid, formatNames, handoffsOf, impactOf, loadRun, nodePorts, packageVersion, path, project, ready, runCli, runFacts, runProcess, sequenceToDot, sequenceToMermaid, setArtefact, setFact, setState, show, stateMachineToDot, stateMachineToMermaid, swimlaneToDot, swimlaneToMermaid, sync, validateDocument, validateStored, version, viewNames, why };
@@ -1,4 +1,4 @@
1
- import { t as createSqliteGraphStore } from "./store-DKzvLGgl.js";
1
+ import { t as createSqliteGraphStore } from "./store-CgweIG8J.js";
2
2
  import { sql } from "drizzle-orm";
3
3
  import { DatabaseSync } from "node:sqlite";
4
4
  import { drizzle } from "drizzle-orm/node-sqlite";
@@ -0,0 +1,4 @@
1
+ import "./view-DcktInd7.js";
2
+ import "./exit-codes-0ultCqdS.js";
3
+ import { i as runProcess } from "./dist-BnymJpfk.js";
4
+ export { runProcess };
@@ -1,15 +1,15 @@
1
- import { a as validateOverlay, d as overlayStatuses, f as participantKinds } from "./schema-BPT8fmfa.js";
1
+ import { f as overlayStatuses, o as validateOverlay, p as participantKinds } from "./schema-CL95Lyni.js";
2
2
  import { t as validate } from "./validate-DF3mQZww.js";
3
- import { f as terminalJson, h as parseModel, m as ModelParseError, n as viewText, p as terminalText } from "./view-DTeNUhGG.js";
3
+ import { f as terminalJson, h as parseModel, m as ModelParseError, n as viewText, p as terminalText } from "./view-DcktInd7.js";
4
4
  import { c as deriveStatuses, f as toStateMachine, g as handoffs, h as toFlowchart, i as readySet, n as criticalPath, p as toSwimlane, r as impact, s as explainStatus, t as blockedBy, u as toSequence } from "./queries-C8kIDRiY.js";
5
5
  import { S as UnknownNodeError, f as layeredFacts, n as illegalCycles, u as factsFrom, x as CycleError } from "./control-DiygoEhm.js";
6
- import { r as filterStates, s as orderFields } from "./schema-DVAttrJg.js";
7
- import { l as createGraphSourceRouter, t as createGitHubIssuesSource } from "./source-lTKshktI.js";
6
+ import { n as filterStates, o as orderFields } from "./schema-DMXa8gAZ.js";
7
+ import { l as createGraphSourceRouter, t as createGitHubIssuesSource } from "./source-DM4fLS5P.js";
8
8
  import { t as GraphSourceError } from "./errors-BZe5WzCn.js";
9
9
  import { t as githubTokenFromEnvironment } from "./node-AchI1T-K.js";
10
- import { g as emptyModel } from "./store-DKzvLGgl.js";
11
- import { t as createGraphStoreRouter } from "./router-Dk91O_9p.js";
12
- import { i as openNodeGraphStore, t as prepareDataFile } from "./data-file-BVMxkTug.js";
10
+ import { g as emptyModel } from "./store-CgweIG8J.js";
11
+ import { t as createGraphStoreRouter } from "./router-DzVcQ28U.js";
12
+ import { i as openNodeGraphStore, t as prepareDataFile } from "./data-file-B8__c10l.js";
13
13
  import { a as scopesBySource, i as InvalidScopeError, n as UnknownSourceError, r as syncScopes, t as InterruptedSyncError } from "./sync-CkaJO3OQ.js";
14
14
  import { t as exitCodes } from "./exit-codes-0ultCqdS.js";
15
15
  import { ORPCError, createRouterClient } from "@orpc/server";
@@ -1,4 +1,4 @@
1
- import "./index-Cs1CWlEg.js";
1
+ import "./index-CotF9Lhh.js";
2
2
  import { z } from "zod";
3
3
  //#region ../../adapters/graph/source-github-issues/dist/graphql.d.ts
4
4
  /** GitHub's GraphQL endpoint. */
@@ -1,5 +1,5 @@
1
- import { P as SyncFilter, b as Gap, h as GraphSourceClient } from "./index-Cs1CWlEg.js";
2
- import { ut as GraphStoreClient } from "./index-CR8xUK3S.js";
1
+ import { N as SyncFilter, h as GraphSourceClient, y as Gap } from "./index-CotF9Lhh.js";
2
+ import { ct as GraphStoreClient } from "./index-KhygugOP.js";
3
3
  import { z } from "zod";
4
4
  //#region ../../core/graph/sync/dist/checkpoint.d.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { K as IdSpace, j as Views } from "./index-Dvz_I_uQ.js";
2
- import { N as Flowchart, k as Swimlane, w as StateMachine } from "./index-4f4PVH7K.js";
1
+ import { P as Views, Y as IdSpace } from "./index-DYl6lZLe.js";
2
+ import { N as Flowchart, k as Swimlane, w as StateMachine } from "./index-DluJZTbT.js";
3
3
  //#region ../../core/graph/layout/dist/engine.d.ts
4
4
  /** A box with a fixed size, which the engine places. */
5
5
  interface EngineLeaf {
@@ -1,7 +1,7 @@
1
- import { A as Facts, B as Status, C as CriticalPath, _ as StatusRule, d as StatusExplanation, u as ChainLink } from "./index-D4CnOhNf.js";
2
- import { K as IdSpace, S as Element, _ as Model, k as Projection, o as Overlay } from "./index-Dvz_I_uQ.js";
3
- import { K as StoredModel, ut as GraphStoreClient } from "./index-CR8xUK3S.js";
4
- import { a as ProjectedView } from "./index-4f4PVH7K.js";
1
+ import { A as Facts, B as Status, C as CriticalPath, _ as StatusRule, d as StatusExplanation, u as ChainLink } from "./index-wQnLXJmD.js";
2
+ import { M as Projection, T as Element, Y as IdSpace, b as Model, l as Overlay } from "./index-DYl6lZLe.js";
3
+ import { G as StoredModel, ct as GraphStoreClient } from "./index-KhygugOP.js";
4
+ import { a as ProjectedView } from "./index-DluJZTbT.js";
5
5
  import { KeyboardEvent, ReactElement, ReactNode, RefCallback } from "react";
6
6
  //#region ../../ui/graph/react/dist/run.d.ts
7
7
  /**
@@ -1,5 +1,5 @@
1
- import { s as GraphSourcePager } from "./index-Cs1CWlEg.js";
2
- import { n as GraphqlFetch, t as GitHubTokenPort } from "./graphql-3DSUSUvL.js";
1
+ import { s as GraphSourcePager } from "./index-CotF9Lhh.js";
2
+ import { n as GraphqlFetch, t as GitHubTokenPort } from "./graphql-CGWZ6USe.js";
3
3
  //#region ../../adapters/graph/source-github-issues/dist/source.d.ts
4
4
  /** What the GitHub issues source needs. */
5
5
  interface GitHubIssuesSourceOptions {
@@ -1,4 +1,4 @@
1
- import { _ as Model, o as Overlay, q as OpenIds } from "./index-Dvz_I_uQ.js";
1
+ import { X as OpenIds, a as BoundActivitySchema, b as Model, l as Overlay } from "./index-DYl6lZLe.js";
2
2
  import { z } from "zod";
3
3
  import { ContractRouterClient, InitialInputSchema, ProcedureContract, RouterContract, eventIterator } from "@orpc/contract";
4
4
  import { ContractedRouter, DefaultInitialContext } from "@orpc/server";
@@ -88,21 +88,6 @@ declare const transitionSchema: z.ZodReadonly<z.ZodObject<{
88
88
  }, z.core.$strip>], "kind">>;
89
89
  effect: z.ZodExactOptional<z.ZodString>;
90
90
  }, z.core.$strict>>;
91
- /**
92
- * An activity bound to the external record it stands for. `source` is required here, where the model leaves it optional, and it equals `id`: the source-qualified identifier (`github:org/repo#12`) is the element's identity, so the same record synced twice, or reached from two places, is the same element.
93
- */
94
- declare const boundActivitySchema: z.ZodReadonly<z.ZodObject<{
95
- kind: z.ZodLiteral<"activity">;
96
- id: z.ZodString;
97
- extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
98
- label: z.ZodString;
99
- actor: z.ZodExactOptional<z.ZodString>;
100
- action: z.ZodExactOptional<z.ZodString>;
101
- affects: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
102
- consumes: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
103
- produces: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
104
- source: z.ZodString;
105
- }, z.core.$strict>>;
106
91
  /** The relation kinds a source reports beside the model's transitions. */
107
92
  declare const relationKinds: readonly ["child-of", "assigned-to", "part-of"];
108
93
  /**
@@ -131,7 +116,7 @@ declare const gapSchema: z.ZodReadonly<z.ZodObject<{
131
116
  message: z.ZodString;
132
117
  }, z.core.$strict>>;
133
118
  /**
134
- * One page of a sync: bound activities, the participants they name, the transitions between them, their relations, their run state, and any gaps. A page is a partial view; `assembleSync` merges a whole sync into one model.
119
+ * One page of a sync: bound activities (graph-schema's `boundActivitySchema`), the participants they name, the transitions between them, their relations, their run state, and any gaps. A page is a partial view; `assembleSync` merges a whole sync into one model.
135
120
  *
136
121
  * `next` is the cursor to resume after this page. It is absent on the last page.
137
122
  */
@@ -145,18 +130,7 @@ declare const syncPageSchema: z.ZodReadonly<z.ZodObject<{
145
130
  entity: "entity";
146
131
  }>;
147
132
  }, z.core.$strict>>>>;
148
- activities: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
149
- kind: z.ZodLiteral<"activity">;
150
- id: z.ZodString;
151
- extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
152
- label: z.ZodString;
153
- actor: z.ZodExactOptional<z.ZodString>;
154
- action: z.ZodExactOptional<z.ZodString>;
155
- affects: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
156
- consumes: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
157
- produces: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
158
- source: z.ZodString;
159
- }, z.core.$strict>>>>;
133
+ activities: z.ZodReadonly<z.ZodArray<BoundActivitySchema>>;
160
134
  transitions: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
161
135
  id: z.ZodString;
162
136
  source: z.ZodString;
@@ -361,7 +335,6 @@ declare const sourceDescriptionSchema: z.ZodReadonly<z.ZodObject<{
361
335
  }, z.core.$strict>>;
362
336
  /** Why a request was rejected as malformed. */
363
337
  declare const badRequestReasons: readonly ["invalid-cursor", "invalid-scope"];
364
- type BoundActivity = z.infer<typeof boundActivitySchema>;
365
338
  type SourceParticipant = z.infer<typeof participantSchema>;
366
339
  type SourceTransition = z.infer<typeof transitionSchema>;
367
340
  type Relation = z.infer<typeof relationSchema>;
@@ -615,4 +588,4 @@ interface FakeGraphSourceOptions {
615
588
  */
616
589
  declare const createFakeGraphSource: (options: FakeGraphSourceOptions) => GraphSourcePager;
617
590
  //#endregion
618
- export { syncInputSchema as $, ScopeRootsInput as A, gapReasons as B, OrderField as C, ScopeEntry as D, ScopeChildrenInput as E, SyncInput as F, relationKinds as G, orderDirections as H, SyncPage as I, scopeEntrySchema as J, relationSchema as K, badRequestReasons as L, SourceParticipant as M, SourceTransition as N, ScopeListing as O, SyncFilter as P, syncFilterSchema as Q, boundActivitySchema as R, OrderDirection as S, RelationKind as T, orderFields as U, gapSchema as V, participantSchema as W, scopeRootsInputSchema as X, scopeListingSchema as Y, sourceDescriptionSchema as Z, BadRequestReason as _, assembleSync as a, Gap as b, GraphSourceRouter as c, PageRequest as d, syncPageSchema as et, createGraphSourceRouter as f, graphSourceContract as g, GraphSourceClient as h, AssembledSync as i, SourceDescription as j, ScopeListingInput as k, GraphSourceScopes as l, GraphSourceFailure as m, FakePage as n, ChildrenRequest as o, GraphSourceError as p, scopeChildrenInputSchema as q, createFakeGraphSource as r, GraphSourcePager as s, FakeGraphSourceOptions as t, transitionSchema as tt, ListingRequest as u, BoundActivity as v, Relation as w, GapReason as x, FilterState as y, filterStates as z };
591
+ export { transitionSchema as $, SourceDescription as A, orderDirections as B, Relation as C, ScopeListing as D, ScopeEntry as E, SyncPage as F, scopeChildrenInputSchema as G, participantSchema as H, badRequestReasons as I, scopeRootsInputSchema as J, scopeEntrySchema as K, filterStates as L, SourceTransition as M, SyncFilter as N, ScopeListingInput as O, SyncInput as P, syncPageSchema as Q, gapReasons as R, OrderField as S, ScopeChildrenInput as T, relationKinds as U, orderFields as V, relationSchema as W, syncFilterSchema as X, sourceDescriptionSchema as Y, syncInputSchema as Z, BadRequestReason as _, assembleSync as a, GapReason as b, GraphSourceRouter as c, PageRequest as d, createGraphSourceRouter as f, graphSourceContract as g, GraphSourceClient as h, AssembledSync as i, SourceParticipant as j, ScopeRootsInput as k, GraphSourceScopes as l, GraphSourceFailure as m, FakePage as n, ChildrenRequest as o, GraphSourceError as p, scopeListingSchema as q, createFakeGraphSource as r, GraphSourcePager as s, FakeGraphSourceOptions as t, ListingRequest as u, FilterState as v, RelationKind as w, OrderDirection as x, Gap as y, gapSchema as z };
@@ -1,5 +1,5 @@
1
- import { K as IdSpace, _ as Model, q as OpenIds } from "./index-Dvz_I_uQ.js";
2
- import { N as Flowchart, a as ProjectedView, k as Swimlane, w as StateMachine, y as SequenceDiagram } from "./index-4f4PVH7K.js";
1
+ import { X as OpenIds, Y as IdSpace, b as Model } from "./index-DYl6lZLe.js";
2
+ import { N as Flowchart, a as ProjectedView, k as Swimlane, w as StateMachine, y as SequenceDiagram } from "./index-DluJZTbT.js";
3
3
  //#region ../../core/graph/export/dist/view.d.ts
4
4
  /** The text formats a view is written in: Mermaid, Graphviz DOT, and the projection itself as JSON. */
5
5
  declare const exportFormats: readonly ["mermaid", "dot", "json"];
@@ -486,6 +486,34 @@ interface ModelSchema extends z.ZodReadonly<typeof modelObjectSchema> {
486
486
  * Every object is strict. The inferred type is exactly `Model<OpenIds>`, which a type-level test pins in both directions.
487
487
  */
488
488
  declare const modelSchema: ModelSchema;
489
+ /** The strict object schema inside `boundActivitySchema`, before it is made read-only. */
490
+ declare const boundActivityObjectSchema: z.ZodObject<{
491
+ kind: z.ZodLiteral<"activity">;
492
+ id: z.ZodString;
493
+ extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
494
+ label: z.ZodString;
495
+ actor: z.ZodExactOptional<z.ZodString>;
496
+ action: z.ZodExactOptional<z.ZodString>;
497
+ affects: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
498
+ consumes: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
499
+ produces: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
500
+ source: z.ZodString;
501
+ }, z.core.$strict>;
502
+ /**
503
+ * The type of `boundActivitySchema`, declared by name for the same reason as `ModelSchema`: a consumer's declaration file that embeds the schema, such as a source page's or a store's item list, refers to `BoundActivitySchema` rather than writing out the activity with trilean's JSON value inline.
504
+ */
505
+ interface BoundActivitySchema extends z.ZodReadonly<typeof boundActivityObjectSchema> {
506
+ /** The strict object schema inside, whose `shape` holds each field's own schema. */
507
+ readonly unwrap: () => typeof boundActivityObjectSchema;
508
+ }
509
+ /**
510
+ * An activity bound to the external record it stands for: the model's `activity` element with `source` required, where the model leaves it optional, and equal to `id`. The source-qualified identifier (`github:org/repo#12`) is the element's identity, so the same record synced twice, or reached from two places, is the same element.
511
+ *
512
+ * This is the one definition of a bound activity: a source's sync page and a store's upserted items both use it, so what a source emits is exactly what a store accepts.
513
+ */
514
+ declare const boundActivitySchema: BoundActivitySchema;
515
+ /** An activity bound to the external record it stands for, as `boundActivitySchema` parses it. */
516
+ type BoundActivity = z.output<BoundActivitySchema>;
489
517
  //#endregion
490
518
  //#region ../../core/graph/schema/dist/parse.d.ts
491
519
  /** A problem found while loading a model: a shape violation located by JSON pointer, or a rule `validate` reports. */
@@ -518,4 +546,4 @@ declare class ModelParseError extends Error {
518
546
  */
519
547
  declare const parseModel: (input: unknown) => Model<OpenIds>;
520
548
  //#endregion
521
- export { Transition as A, fragmentOperators as B, EventDef as C, Participant as D, FragmentOperand as E, Notation as F, pseudoRoles as G, notations as H, OverlayStatus as I, IdSpace as K, ParticipantKind as L, ElementKind as M, FragmentOperator as N, Point as O, MessageMode as P, PseudoRole as R, Element as S, Fragment as T, overlayStatuses as U, messageModes as V, participantKinds as W, Model as _, modelSchema as a, ActionDef as b, OverlayParseError as c, validateOverlay as d, Issue as f, outputsOf as g, inputsOf as h, ModelSchema as i, Views as j, Projection as k, overlaySchema as l, validate as m, ModelParseError as n, Overlay as o, IssueCode as p, OpenIds as q, parseModel as r, OverlayIssue as s, ModelIssue as t, parseOverlay as u, ModelParts as v, Extensions as w, ArtefactDef as x, defineModel as y, elementKinds as z };
549
+ export { Participant as A, ParticipantKind as B, ActionDef as C, Extensions as D, EventDef as E, ElementKind as F, notations as G, elementKinds as H, FragmentOperator as I, pseudoRoles as J, overlayStatuses as K, MessageMode as L, Projection as M, Transition as N, Fragment as O, Views as P, Notation as R, defineModel as S, Element as T, fragmentOperators as U, PseudoRole as V, messageModes as W, OpenIds as X, IdSpace as Y, validate as _, BoundActivitySchema as a, Model as b, modelSchema as c, OverlayParseError as d, overlaySchema as f, IssueCode as g, Issue as h, BoundActivity as i, Point as j, FragmentOperand as k, Overlay as l, validateOverlay as m, ModelParseError as n, ModelSchema as o, parseOverlay as p, participantKinds as q, parseModel as r, boundActivitySchema as s, ModelIssue as t, OverlayIssue as u, inputsOf as v, ArtefactDef as w, ModelParts as x, outputsOf as y, OverlayStatus as z };
@@ -1,4 +1,4 @@
1
- import { A as Transition, F as Notation, K as IdSpace, N as FragmentOperator, P as MessageMode, R as PseudoRole, S as Element, _ as Model, k as Projection } from "./index-Dvz_I_uQ.js";
1
+ import { I as FragmentOperator, L as MessageMode, M as Projection, N as Transition, R as Notation, T as Element, V as PseudoRole, Y as IdSpace, b as Model } from "./index-DYl6lZLe.js";
2
2
  //#region ../../core/graph/projection/dist/loss.d.ts
3
3
  /** What an element that a notation cannot draw is: an element kind, or the role of a pseudo-state. A `message` element is one only when the notation would fold it but folding it would multiply edges. */
4
4
  type UnrepresentedKind = "activity" | "decision" | "state" | "message" | PseudoRole;
@@ -1,5 +1,5 @@
1
- import { k as FactRecord } from "./index-D4CnOhNf.js";
2
- import { _ as Model, f as Issue, i as ModelSchema, o as Overlay, q as OpenIds } from "./index-Dvz_I_uQ.js";
1
+ import { k as FactRecord } from "./index-wQnLXJmD.js";
2
+ import { X as OpenIds, a as BoundActivitySchema, b as Model, h as Issue, l as Overlay, o as ModelSchema } from "./index-DYl6lZLe.js";
3
3
  import { z } from "zod";
4
4
  import { ContractRouterClient } from "@orpc/contract";
5
5
  import { ContractedRouter } from "@orpc/server";
@@ -320,18 +320,7 @@ declare const graphStoreContract: {
320
320
  entity: "entity";
321
321
  }>;
322
322
  }, z.core.$strict>>>>;
323
- activities: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
324
- kind: z.ZodLiteral<"activity">;
325
- id: z.ZodString;
326
- extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
327
- label: z.ZodString;
328
- actor: z.ZodExactOptional<z.ZodString>;
329
- action: z.ZodExactOptional<z.ZodString>;
330
- affects: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
331
- consumes: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
332
- produces: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
333
- source: z.ZodString;
334
- }, z.core.$strict>>>>;
323
+ activities: z.ZodReadonly<z.ZodArray<BoundActivitySchema>>;
335
324
  transitions: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
336
325
  id: z.ZodString;
337
326
  source: z.ZodString;
@@ -672,21 +661,6 @@ declare const modelIdSchema: z.ZodString;
672
661
  * A position in the store's history. Every change to any model takes the next revision from one store-wide sequence, so revisions only grow, a model's revision is the revision of its last change, and a model deleted and saved again never reuses an earlier one.
673
662
  */
674
663
  declare const revisionSchema: z.ZodInt;
675
- /**
676
- * An activity bound to the external record it stands for. `source` is required here, where the model leaves it optional: a bound item's identity is its source record, and the source-qualified identifier is its element id.
677
- */
678
- declare const boundActivitySchema: z.ZodReadonly<z.ZodObject<{
679
- kind: z.ZodLiteral<"activity">;
680
- id: z.ZodString;
681
- extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
682
- label: z.ZodString;
683
- actor: z.ZodExactOptional<z.ZodString>;
684
- action: z.ZodExactOptional<z.ZodString>;
685
- affects: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
686
- consumes: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
687
- produces: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
688
- source: z.ZodString;
689
- }, z.core.$strict>>;
690
664
  /** The relation kinds a store keeps beside a model, the same kinds a source reports. */
691
665
  declare const relationKinds: readonly ["child-of", "assigned-to", "part-of"];
692
666
  /**
@@ -702,7 +676,7 @@ declare const relationSchema: z.ZodReadonly<z.ZodObject<{
702
676
  to: z.ZodString;
703
677
  }, z.core.$strict>>;
704
678
  /**
705
- * Items read from a source, to be merged into a stored model by identifier. Each participant, activity and transition replaces the one with the same id or is appended after the existing ones; the overlay's entries replace the run state of the elements they name; each relation not already stored is appended. Everything else in the model is left as it is.
679
+ * Items read from a source, to be merged into a stored model by identifier. Activities are graph-schema's `boundActivitySchema`, the same schema a source's sync page uses, so a page's items pass unchanged. Each participant, activity and transition replaces the one with the same id or is appended after the existing ones; the overlay's entries replace the run state of the elements they name; each relation not already stored is appended. Everything else in the model is left as it is.
706
680
  */
707
681
  declare const boundItemsSchema: z.ZodReadonly<z.ZodObject<{
708
682
  participants: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
@@ -714,18 +688,7 @@ declare const boundItemsSchema: z.ZodReadonly<z.ZodObject<{
714
688
  entity: "entity";
715
689
  }>;
716
690
  }, z.core.$strict>>>>;
717
- activities: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
718
- kind: z.ZodLiteral<"activity">;
719
- id: z.ZodString;
720
- extensions: z.ZodExactOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodType<import("trilean").JsonValue, unknown, z.core.$ZodTypeInternals<import("trilean").JsonValue, unknown>>>>>;
721
- label: z.ZodString;
722
- actor: z.ZodExactOptional<z.ZodString>;
723
- action: z.ZodExactOptional<z.ZodString>;
724
- affects: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
725
- consumes: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
726
- produces: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
727
- source: z.ZodString;
728
- }, z.core.$strict>>>>;
691
+ activities: z.ZodReadonly<z.ZodArray<BoundActivitySchema>>;
729
692
  transitions: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
730
693
  id: z.ZodString;
731
694
  source: z.ZodString;
@@ -1012,7 +975,6 @@ declare const issueSchema: z.ZodReadonly<z.ZodObject<{
1012
975
  }, z.core.$strict>>;
1013
976
  type ModelId = z.infer<typeof modelIdSchema>;
1014
977
  type Revision = z.infer<typeof revisionSchema>;
1015
- type BoundActivity = z.infer<typeof boundActivitySchema>;
1016
978
  type BoundItems = z.infer<typeof boundItemsSchema>;
1017
979
  type Relation = z.infer<typeof relationSchema>;
1018
980
  type RelationKind = (typeof relationKinds)[number];
@@ -1387,4 +1349,4 @@ type GraphStoreRouter = ContractedRouter<typeof graphStoreContract, object>;
1387
1349
  */
1388
1350
  declare const createFakeGraphStore: () => GraphStore;
1389
1351
  //#endregion
1390
- export { factRecordSchema as $, defaultSubscriptionCapacity as A, Reach as B, ElementRequest as C, ChangeFeedOptions as D, ChangeFeed as E, ChangeKind as F, StoredFacts as G, RelationKind as H, FactChange as I, boundItemsSchema as J, StoredModel as K, FactClearing as L, GraphStoreFailure as M, BoundActivity as N, ChangeSubscription as O, BoundItems as P, factNameSchema as Q, ModelId as R, overlayWithin as S, ModelRequest as T, Revision as U, Relation as V, StoreChange as W, factChangeSchema as X, changeKinds as Y, factClearingSchema as Z, mergeFacts as _, blockedChainOf as a, relationSchema as at, emptyModel as b, structureOf as c, storedFactsSchema as ct, descendantsOf as d, graphStoreContract as dt, issueSchema as et, mergeRelations as f, factsWithin as g, factIssues as h, Structure as i, relationKinds as it, GraphStoreError as j, SubscribeOptions as k, ancestorsOf as l, storedModelSchema as lt, relationsWithin as m, GraphStoreRouter as n, modelSummarySchema as nt, impactOf as o, revisionSchema as ot, relationIssues as p, boundActivitySchema as q, createGraphStoreRouter as r, reachSchema as rt, readyOf as s, storeChangeSchema as st, createFakeGraphStore as t, modelIdSchema as tt, childrenOf as u, GraphStoreClient as ut, withoutFacts as v, GraphStore as w, mergeBoundItems as x, checkStored as y, ModelSummary as z };
1352
+ export { modelIdSchema as $, defaultSubscriptionCapacity as A, Relation as B, ElementRequest as C, ChangeFeedOptions as D, ChangeFeed as E, FactChange as F, StoredModel as G, Revision as H, FactClearing as I, factChangeSchema as J, boundItemsSchema as K, ModelId as L, GraphStoreFailure as M, BoundItems as N, ChangeSubscription as O, ChangeKind as P, issueSchema as Q, ModelSummary as R, overlayWithin as S, ModelRequest as T, StoreChange as U, RelationKind as V, StoredFacts as W, factNameSchema as X, factClearingSchema as Y, factRecordSchema as Z, mergeFacts as _, blockedChainOf as a, storeChangeSchema as at, emptyModel as b, structureOf as c, GraphStoreClient as ct, descendantsOf as d, modelSummarySchema as et, mergeRelations as f, factsWithin as g, factIssues as h, Structure as i, revisionSchema as it, GraphStoreError as j, SubscribeOptions as k, ancestorsOf as l, graphStoreContract as lt, relationsWithin as m, GraphStoreRouter as n, relationKinds as nt, impactOf as o, storedFactsSchema as ot, relationIssues as p, changeKinds as q, createGraphStoreRouter as r, relationSchema as rt, readyOf as s, storedModelSchema as st, createFakeGraphStore as t, reachSchema as tt, childrenOf as u, withoutFacts as v, GraphStore as w, mergeBoundItems as x, checkStored as y, Reach as z };
@@ -1,4 +1,4 @@
1
- import { K as IdSpace, _ as Model, o as Overlay } from "./index-Dvz_I_uQ.js";
1
+ import { Y as IdSpace, b as Model, l as Overlay } from "./index-DYl6lZLe.js";
2
2
  import { ComputedValue, ExpressionNode, JsonValue, PredicateNode, Resolution } from "trilean";
3
3
  //#region ../../core/graph/domain/dist/status.d.ts
4
4
  /** The derived states of an element, in the order the derivation considers them. */
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { A as Facts, B as Status, C as CriticalPath, D as UnknownReference, E as NodeId, F as evaluateBranches, I as factNamesIn, L as factsFrom, M as artefactKey, N as elementStatusKey, O as buildDag, P as emptyFactRecord, R as layeredFacts, S as loopTransitions, T as Dag, V as statuses, _ as StatusRule, a as criticalPath, b as controlDag, c as unmetOutputs, d as StatusExplanation, f as explainStatus, g as StatusBasis, h as ProducerBasis, i as blockedBy, j as UnsupportedConditionError, k as FactRecord, l as whatIfDone, m as IncomingBasis, n as UnmetOutput, o as impact, p as ArtefactBasis, r as WhatIf, s as readySet, t as StatusChange, u as ChainLink, v as deriveStatuses, w as criticalPath$1, x as illegalCycles, y as statusRules, z as Branch } from "./index-D4CnOhNf.js";
2
- import { A as Transition, B as fragmentOperators, C as EventDef, D as Participant, E as FragmentOperand, F as Notation, G as pseudoRoles, H as notations, I as OverlayStatus, K as IdSpace, L as ParticipantKind, M as ElementKind, N as FragmentOperator, O as Point, P as MessageMode, R as PseudoRole, S as Element, T as Fragment, U as overlayStatuses, V as messageModes, W as participantKinds, _ as Model, a as modelSchema, b as ActionDef, c as OverlayParseError, d as validateOverlay, f as Issue, g as outputsOf, h as inputsOf, i as ModelSchema, j as Views, k as Projection, l as overlaySchema, m as validate, n as ModelParseError, o as Overlay, p as IssueCode, q as OpenIds, r as parseModel, s as OverlayIssue, t as ModelIssue, u as parseOverlay, v as ModelParts, w as Extensions, x as ArtefactDef, y as defineModel, z as elementKinds } from "./index-Dvz_I_uQ.js";
3
- import { A as toSwimlane, C as toSequence, D as toStateMachine, E as StateMachineTransition, F as Handoff, I as handoffs, L as Loss, M as FlowNode, N as Flowchart, O as Lane, P as toFlowchart, R as UnrepresentedElement, S as SequenceOperand, T as StateMachineState, _ as applyModelDiff, a as ProjectedView, b as SequenceItem, c as Addressing, d as Ends, f as EventChange, g as UnconfirmedChangeError, h as TransitionFieldChange, i as diffSwimlane, j as FlowEdge, k as Swimlane, l as Change, m as TransitionChange, n as diffStateMachine, o as ViewsByNotation, p as ModelDiff, r as diffFlowchart, s as project, t as diffSequence, u as ElementChange, v as confirmChanges, w as StateMachine, x as SequenceMessage, y as SequenceDiagram, z as UnrepresentedKind } from "./index-4f4PVH7K.js";
4
- import { a as flowchartToMermaid, c as swimlaneToMermaid, d as viewText, i as swimlaneToDot, l as ExportFormat, n as sequenceToDot, o as sequenceToMermaid, r as stateMachineToDot, s as stateMachineToMermaid, t as flowchartToDot, u as exportFormats } from "./index-Bb90VKMc.js";
1
+ import { A as Facts, B as Status, C as CriticalPath, D as UnknownReference, E as NodeId, F as evaluateBranches, I as factNamesIn, L as factsFrom, M as artefactKey, N as elementStatusKey, O as buildDag, P as emptyFactRecord, R as layeredFacts, S as loopTransitions, T as Dag, V as statuses, _ as StatusRule, a as criticalPath, b as controlDag, c as unmetOutputs, d as StatusExplanation, f as explainStatus, g as StatusBasis, h as ProducerBasis, i as blockedBy, j as UnsupportedConditionError, k as FactRecord, l as whatIfDone, m as IncomingBasis, n as UnmetOutput, o as impact, p as ArtefactBasis, r as WhatIf, s as readySet, t as StatusChange, u as ChainLink, v as deriveStatuses, w as criticalPath$1, x as illegalCycles, y as statusRules, z as Branch } from "./index-wQnLXJmD.js";
2
+ import { A as Participant, B as ParticipantKind, C as ActionDef, D as Extensions, E as EventDef, F as ElementKind, G as notations, H as elementKinds, I as FragmentOperator, J as pseudoRoles, K as overlayStatuses, L as MessageMode, M as Projection, N as Transition, O as Fragment, P as Views, R as Notation, S as defineModel, T as Element, U as fragmentOperators, V as PseudoRole, W as messageModes, X as OpenIds, Y as IdSpace, _ as validate, a as BoundActivitySchema, b as Model, c as modelSchema, d as OverlayParseError, f as overlaySchema, g as IssueCode, h as Issue, i as BoundActivity, j as Point, k as FragmentOperand, l as Overlay, m as validateOverlay, n as ModelParseError, o as ModelSchema, p as parseOverlay, q as participantKinds, r as parseModel, s as boundActivitySchema, t as ModelIssue, u as OverlayIssue, v as inputsOf, w as ArtefactDef, x as ModelParts, y as outputsOf, z as OverlayStatus } from "./index-DYl6lZLe.js";
3
+ import { A as toSwimlane, C as toSequence, D as toStateMachine, E as StateMachineTransition, F as Handoff, I as handoffs, L as Loss, M as FlowNode, N as Flowchart, O as Lane, P as toFlowchart, R as UnrepresentedElement, S as SequenceOperand, T as StateMachineState, _ as applyModelDiff, a as ProjectedView, b as SequenceItem, c as Addressing, d as Ends, f as EventChange, g as UnconfirmedChangeError, h as TransitionFieldChange, i as diffSwimlane, j as FlowEdge, k as Swimlane, l as Change, m as TransitionChange, n as diffStateMachine, o as ViewsByNotation, p as ModelDiff, r as diffFlowchart, s as project, t as diffSequence, u as ElementChange, v as confirmChanges, w as StateMachine, x as SequenceMessage, y as SequenceDiagram, z as UnrepresentedKind } from "./index-DluJZTbT.js";
4
+ import { a as flowchartToMermaid, c as swimlaneToMermaid, d as viewText, i as swimlaneToDot, l as ExportFormat, n as sequenceToDot, o as sequenceToMermaid, r as stateMachineToDot, s as stateMachineToMermaid, t as flowchartToDot, u as exportFormats } from "./index-DAevZqW-.js";
5
5
  //#region ../../core/graph/dag/dist/errors.d.ts
6
6
  /**
7
7
  * Thrown when an operation that is only defined on an acyclic graph is given one that contains a cycle.
@@ -129,4 +129,4 @@ export declare const terminalText: (text: string) => string;
129
129
  */
130
130
  export declare const terminalJson: (value: unknown) => string;
131
131
  //#endregion
132
- export { type ActionDef, type Addressing, type ArtefactBasis, type ArtefactDef, type Branch, type ChainLink, type Change, type Element, type ElementChange, type ElementKind, type Ends, type EventChange, type EventDef, type ExportFormat, type Extensions, type FactRecord, type Facts, type FlowEdge, type FlowNode, type Flowchart, type Fragment, type FragmentOperand, type FragmentOperator, type Handoff, type IdSpace, type IncomingBasis, type Issue, type IssueCode, type Lane, type Loss, type MessageMode, type Model, type ModelDiff, type ModelIssue, ModelParseError, type ModelParts, type ModelSchema, type Notation, type OpenIds, type Overlay, type OverlayIssue, OverlayParseError, type OverlayStatus, type Participant, type ParticipantKind, type Point, type ProducerBasis, type ProjectedView, type Projection, type PseudoRole, type SequenceDiagram, type SequenceItem, type SequenceMessage, type SequenceOperand, type StateMachine, type StateMachineState, type StateMachineTransition, type Status, type StatusBasis, type StatusChange, type StatusExplanation, type StatusRule, type Swimlane, type Transition, type TransitionChange, type TransitionFieldChange, UnconfirmedChangeError, type UnmetOutput, type UnrepresentedElement, type UnrepresentedKind, UnsupportedConditionError, type Views, type ViewsByNotation, type WhatIf, applyModelDiff, artefactKey, blockedBy, confirmChanges, controlDag, criticalPath, index_d_exports as dag, defineModel, deriveStatuses, diffFlowchart, diffSequence, diffStateMachine, diffSwimlane, elementKinds, elementStatusKey, emptyFactRecord, evaluateBranches, explainStatus, exportFormats, factNamesIn, factsFrom, flowchartToDot, flowchartToMermaid, fragmentOperators, handoffs, illegalCycles, impact, inputsOf, layeredFacts, loopTransitions, messageModes, modelSchema, notations, outputsOf, overlaySchema, overlayStatuses, parseModel, parseOverlay, participantKinds, project, pseudoRoles, readySet, sequenceToDot, sequenceToMermaid, stateMachineToDot, stateMachineToMermaid, statusRules, statuses, swimlaneToDot, swimlaneToMermaid, toFlowchart, toSequence, toStateMachine, toSwimlane, unmetOutputs, validate, validateOverlay, viewText, whatIfDone };
132
+ export { type ActionDef, type Addressing, type ArtefactBasis, type ArtefactDef, type BoundActivity, type BoundActivitySchema, type Branch, type ChainLink, type Change, type Element, type ElementChange, type ElementKind, type Ends, type EventChange, type EventDef, type ExportFormat, type Extensions, type FactRecord, type Facts, type FlowEdge, type FlowNode, type Flowchart, type Fragment, type FragmentOperand, type FragmentOperator, type Handoff, type IdSpace, type IncomingBasis, type Issue, type IssueCode, type Lane, type Loss, type MessageMode, type Model, type ModelDiff, type ModelIssue, ModelParseError, type ModelParts, type ModelSchema, type Notation, type OpenIds, type Overlay, type OverlayIssue, OverlayParseError, type OverlayStatus, type Participant, type ParticipantKind, type Point, type ProducerBasis, type ProjectedView, type Projection, type PseudoRole, type SequenceDiagram, type SequenceItem, type SequenceMessage, type SequenceOperand, type StateMachine, type StateMachineState, type StateMachineTransition, type Status, type StatusBasis, type StatusChange, type StatusExplanation, type StatusRule, type Swimlane, type Transition, type TransitionChange, type TransitionFieldChange, UnconfirmedChangeError, type UnmetOutput, type UnrepresentedElement, type UnrepresentedKind, UnsupportedConditionError, type Views, type ViewsByNotation, type WhatIf, applyModelDiff, artefactKey, blockedBy, boundActivitySchema, confirmChanges, controlDag, criticalPath, index_d_exports as dag, defineModel, deriveStatuses, diffFlowchart, diffSequence, diffStateMachine, diffSwimlane, elementKinds, elementStatusKey, emptyFactRecord, evaluateBranches, explainStatus, exportFormats, factNamesIn, factsFrom, flowchartToDot, flowchartToMermaid, fragmentOperators, handoffs, illegalCycles, impact, inputsOf, layeredFacts, loopTransitions, messageModes, modelSchema, notations, outputsOf, overlaySchema, overlayStatuses, parseModel, parseOverlay, participantKinds, project, pseudoRoles, readySet, sequenceToDot, sequenceToMermaid, stateMachineToDot, stateMachineToMermaid, statusRules, statuses, swimlaneToDot, swimlaneToMermaid, toFlowchart, toSequence, toStateMachine, toSwimlane, unmetOutputs, validate, validateOverlay, viewText, whatIfDone };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { a as validateOverlay, c as fragmentOperators, d as overlayStatuses, f as participantKinds, i as parseOverlay, l as messageModes, n as OverlayParseError, p as pseudoRoles, r as overlaySchema, s as elementKinds, t as modelSchema, u as notations } from "./schema-BPT8fmfa.js";
2
+ import { a as parseOverlay, c as elementKinds, d as notations, f as overlayStatuses, i as overlaySchema, l as fragmentOperators, m as pseudoRoles, n as modelSchema, o as validateOverlay, p as participantKinds, r as OverlayParseError, t as boundActivitySchema, u as messageModes } from "./schema-CL95Lyni.js";
3
3
  import { t as validate } from "./validate-DF3mQZww.js";
4
- import { a as stateMachineToDot, c as sequenceToMermaid, d as isUnsafeCharacter, f as terminalJson, h as parseModel, i as sequenceToDot, l as stateMachineToMermaid, m as ModelParseError, n as viewText, o as swimlaneToDot, p as terminalText, r as flowchartToDot, s as flowchartToMermaid, t as exportFormats, u as swimlaneToMermaid } from "./view-DTeNUhGG.js";
4
+ import { a as stateMachineToDot, c as sequenceToMermaid, d as isUnsafeCharacter, f as terminalJson, h as parseModel, i as sequenceToDot, l as stateMachineToMermaid, m as ModelParseError, n as viewText, o as swimlaneToDot, p as terminalText, r as flowchartToDot, s as flowchartToMermaid, t as exportFormats, u as swimlaneToMermaid } from "./view-DcktInd7.js";
5
5
  import { _ as criticalPath$1, a as unmetOutputs, b as actorMap, c as deriveStatuses, d as stateMachineParts, f as toStateMachine, g as handoffs, h as toFlowchart, i as readySet, l as statusRules, m as flowchartParts, n as criticalPath, o as whatIfDone, p as toSwimlane, r as impact, s as explainStatus, t as blockedBy, u as toSequence, v as immediateDominators, y as topologicalLayers } from "./queries-C8kIDRiY.js";
6
6
  import { S as UnknownNodeError, _ as descendantsOf, a as artefactKey, b as lookup, c as evaluateBranches, f as layeredFacts, g as ancestorsOf, h as stronglyConnectedComponents, i as UnsupportedConditionError, l as factNamesIn, m as findCycles, n as illegalCycles, o as elementStatusKey, p as assertAcyclic, r as loopTransitions, s as emptyFactRecord, t as controlDag, u as factsFrom, v as assembleDag, x as CycleError, y as buildDag } from "./control-DiygoEhm.js";
7
7
  import { t as project } from "./project-CP_ye6KI.js";
@@ -927,4 +927,4 @@ const diffSequence = (model, scenario, edited) => {
927
927
  };
928
928
  };
929
929
  //#endregion
930
- export { ModelParseError, OverlayParseError, UnconfirmedChangeError, UnsupportedConditionError, applyModelDiff, artefactKey, blockedBy, confirmChanges, controlDag, criticalPath, dist_exports as dag, defineModel, deriveStatuses, diffFlowchart, diffSequence, diffStateMachine, diffSwimlane, elementKinds, elementStatusKey, emptyFactRecord, evaluateBranches, explainStatus, exportFormats, factNamesIn, factsFrom, flowchartToDot, flowchartToMermaid, fragmentOperators, handoffs, illegalCycles, impact, inputsOf, isUnsafeCharacter, layeredFacts, loopTransitions, messageModes, modelSchema, notations, outputsOf, overlaySchema, overlayStatuses, parseModel, parseOverlay, participantKinds, project, pseudoRoles, readySet, sequenceToDot, sequenceToMermaid, stateMachineToDot, stateMachineToMermaid, statusRules, statuses, swimlaneToDot, swimlaneToMermaid, terminalJson, terminalText, toFlowchart, toSequence, toStateMachine, toSwimlane, unmetOutputs, validate, validateOverlay, viewText, whatIfDone };
930
+ export { ModelParseError, OverlayParseError, UnconfirmedChangeError, UnsupportedConditionError, applyModelDiff, artefactKey, blockedBy, boundActivitySchema, confirmChanges, controlDag, criticalPath, dist_exports as dag, defineModel, deriveStatuses, diffFlowchart, diffSequence, diffStateMachine, diffSwimlane, elementKinds, elementStatusKey, emptyFactRecord, evaluateBranches, explainStatus, exportFormats, factNamesIn, factsFrom, flowchartToDot, flowchartToMermaid, fragmentOperators, handoffs, illegalCycles, impact, inputsOf, isUnsafeCharacter, layeredFacts, loopTransitions, messageModes, modelSchema, notations, outputsOf, overlaySchema, overlayStatuses, parseModel, parseOverlay, participantKinds, project, pseudoRoles, readySet, sequenceToDot, sequenceToMermaid, stateMachineToDot, stateMachineToMermaid, statusRules, statuses, swimlaneToDot, swimlaneToMermaid, terminalJson, terminalText, toFlowchart, toSequence, toStateMachine, toSwimlane, unmetOutputs, validate, validateOverlay, viewText, whatIfDone };
package/dist/layout.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as layout, c as EngineBox, d as EngineGroup, f as EngineLeaf, i as LayoutView, l as EngineEdge, m as LayoutEngine, n as LayoutOptions, o as Size, p as EngineNode, r as LayoutResult, s as Direction, t as LaneBounds, u as EngineGraph } from "./index-RwwlDYZ7.js";
1
+ import { a as layout, c as EngineBox, d as EngineGroup, f as EngineLeaf, i as LayoutView, l as EngineEdge, m as LayoutEngine, n as LayoutOptions, o as Size, p as EngineNode, r as LayoutResult, s as Direction, t as LaneBounds, u as EngineGraph } from "./index-B2p3mEJ3.js";
2
2
  //#region ../../core/graph/layout/dist/elk-engine.d.ts
3
3
  /**
4
4
  * The default engine: elkjs's layered algorithm, run in the calling context from the bundled build so it needs neither a Worker nor Node-only modules. Groups are laid out together with their children (`INCLUDE_CHILDREN`), so an edge between lanes takes part in layer assignment.
@@ -1,8 +1,8 @@
1
- import { B as Status } from "./index-D4CnOhNf.js";
2
- import { K as IdSpace, S as Element, _ as Model, k as Projection } from "./index-Dvz_I_uQ.js";
3
- import { N as Flowchart, k as Swimlane, w as StateMachine } from "./index-4f4PVH7K.js";
4
- import { i as LayoutView, n as LayoutOptions, r as LayoutResult, s as Direction } from "./index-RwwlDYZ7.js";
5
- import { A as ElementFilter, et as Run, y as NamedElement } from "./index-LWdwpjZG.js";
1
+ import { B as Status } from "./index-wQnLXJmD.js";
2
+ import { M as Projection, T as Element, Y as IdSpace, b as Model } from "./index-DYl6lZLe.js";
3
+ import { N as Flowchart, k as Swimlane, w as StateMachine } from "./index-DluJZTbT.js";
4
+ import { i as LayoutView, n as LayoutOptions, r as LayoutResult, s as Direction } from "./index-B2p3mEJ3.js";
5
+ import { A as ElementFilter, et as Run, y as NamedElement } from "./index-C-ZNF81j.js";
6
6
  import { ReactElement } from "react";
7
7
  import { ColorMode, Edge, EdgeProps, Node, NodeProps } from "@xyflow/react";
8
8
  //#region ../../ui/graph/react-flow/dist/use-layout.d.ts
package/dist/react.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { a as ProjectedView, o as ViewsByNotation, s as project } from "./index-4f4PVH7K.js";
2
- import { $ as useModel, A as ElementFilter, B as useElementFilter, C as ruleDescriptions, D as SelectionContainerProps, E as GraphSelectionOptions, F as emptyFilter, G as useBlockers, H as BlockedChain, I as filterElements, J as useReadySet, K as useCriticalPath, L as filterOptions, M as FilterOption, N as FilterOptions, O as SelectionItemProps, P as actorsOf, Q as ModelState, R as matchesFilter, S as elementLabel, T as GraphSelection, U as stepWeight, V as useProjection, W as useBlockedChain, X as useWhyStatus, Y as useStatuses, Z as ModelClient, _ as ElementCardPart, a as FilterPanelPart, b as StatusBadge, c as LegendPart, d as LanePart, et as Run, f as LaneProps, g as ElementCard, h as TransitionItemProps, i as FilterPanel, j as ElementFilterState, k as useGraphSelection, l as LegendProps, m as TransitionItemPart, n as DetailPanelPart, o as FilterPanelProps, p as TransitionItem, q as useImpact, r as DetailPanelProps, s as Legend, t as DetailPanel, tt as noFacts, u as Lane, v as ElementCardProps, w as statusLabels, x as StatusBadgeProps, y as NamedElement, z as sourceScope } from "./index-LWdwpjZG.js";
1
+ import { a as ProjectedView, o as ViewsByNotation, s as project } from "./index-DluJZTbT.js";
2
+ import { $ as useModel, A as ElementFilter, B as useElementFilter, C as ruleDescriptions, D as SelectionContainerProps, E as GraphSelectionOptions, F as emptyFilter, G as useBlockers, H as BlockedChain, I as filterElements, J as useReadySet, K as useCriticalPath, L as filterOptions, M as FilterOption, N as FilterOptions, O as SelectionItemProps, P as actorsOf, Q as ModelState, R as matchesFilter, S as elementLabel, T as GraphSelection, U as stepWeight, V as useProjection, W as useBlockedChain, X as useWhyStatus, Y as useStatuses, Z as ModelClient, _ as ElementCardPart, a as FilterPanelPart, b as StatusBadge, c as LegendPart, d as LanePart, et as Run, f as LaneProps, g as ElementCard, h as TransitionItemProps, i as FilterPanel, j as ElementFilterState, k as useGraphSelection, l as LegendProps, m as TransitionItemPart, n as DetailPanelPart, o as FilterPanelProps, p as TransitionItem, q as useImpact, r as DetailPanelProps, s as Legend, t as DetailPanel, tt as noFacts, u as Lane, v as ElementCardProps, w as statusLabels, x as StatusBadgeProps, y as NamedElement, z as sourceScope } from "./index-C-ZNF81j.js";
3
3
  export { type BlockedChain, DetailPanel, type DetailPanelPart, type DetailPanelProps, ElementCard, type ElementCardPart, type ElementCardProps, type ElementFilter, type ElementFilterState, type FilterOption, type FilterOptions, FilterPanel, type FilterPanelPart, type FilterPanelProps, type GraphSelection, type GraphSelectionOptions, Lane, type LanePart, type LaneProps, Legend, type LegendPart, type LegendProps, type ModelClient, type ModelState, type NamedElement, type ProjectedView, type Run, type SelectionContainerProps, type SelectionItemProps, StatusBadge, type StatusBadgeProps, TransitionItem, type TransitionItemPart, type TransitionItemProps, type ViewsByNotation, actorsOf, elementLabel, emptyFilter, filterElements, filterOptions, matchesFilter, noFacts, project, ruleDescriptions, sourceScope, statusLabels, stepWeight, useBlockedChain, useBlockers, useCriticalPath, useElementFilter, useGraphSelection, useImpact, useModel, useProjection, useReadySet, useStatuses, useWhyStatus };
@@ -1,5 +1,5 @@
1
- import { r as overlaySchema, t as modelSchema } from "./schema-BPT8fmfa.js";
2
- import { A as modelIdSchema, C as boundItemsSchema, E as factClearingSchema, F as revisionSchema, I as storeChangeSchema, L as storedFactsSchema, M as reachSchema, P as relationSchema, R as storedModelSchema, T as factChangeSchema, j as modelSummarySchema, k as issueSchema, x as GraphStoreError } from "./store-DKzvLGgl.js";
1
+ import { i as overlaySchema, n as modelSchema } from "./schema-CL95Lyni.js";
2
+ import { A as modelSummarySchema, F as storeChangeSchema, I as storedFactsSchema, L as storedModelSchema, N as relationSchema, O as issueSchema, P as revisionSchema, S as boundItemsSchema, T as factClearingSchema, j as reachSchema, k as modelIdSchema, w as factChangeSchema, x as GraphStoreError } from "./store-CgweIG8J.js";
3
3
  import { z } from "zod";
4
4
  import { eventIterator, oc } from "@orpc/contract";
5
5
  import { implement } from "@orpc/server";
@@ -128,19 +128,21 @@ const artefactSchema = record({
128
128
  name: z.string(),
129
129
  deliverable: z.boolean().exactOptional()
130
130
  });
131
+ /** The strict object schema of an `activity` element, before it is made read-only: the one definition both the model's activity and a bound activity are built from. */
132
+ const activityObjectSchema = z.strictObject({
133
+ kind: z.literal("activity"),
134
+ id,
135
+ extensions: extensionsSchema.exactOptional(),
136
+ label: z.string(),
137
+ actor: actorRef.exactOptional(),
138
+ action: actionRef.exactOptional(),
139
+ source: z.string().exactOptional(),
140
+ affects: z.array(entityRef).readonly().exactOptional(),
141
+ consumes: z.array(artefactRef).readonly().exactOptional(),
142
+ produces: z.array(artefactRef).readonly().exactOptional()
143
+ });
131
144
  const elementSchema = z.discriminatedUnion("kind", [
132
- record({
133
- kind: z.literal("activity"),
134
- id,
135
- extensions: extensionsSchema.exactOptional(),
136
- label: z.string(),
137
- actor: actorRef.exactOptional(),
138
- action: actionRef.exactOptional(),
139
- source: z.string().exactOptional(),
140
- affects: z.array(entityRef).readonly().exactOptional(),
141
- consumes: z.array(artefactRef).readonly().exactOptional(),
142
- produces: z.array(artefactRef).readonly().exactOptional()
143
- }),
145
+ activityObjectSchema.readonly(),
144
146
  record({
145
147
  kind: z.literal("decision"),
146
148
  id,
@@ -230,5 +232,14 @@ const modelSchema = z.strictObject({
230
232
  projections: z.array(projectionSchema).readonly(),
231
233
  views: viewsSchema.exactOptional()
232
234
  }).readonly();
235
+ /**
236
+ * An activity bound to the external record it stands for: the model's `activity` element with `source` required, where the model leaves it optional, and equal to `id`. The source-qualified identifier (`github:org/repo#12`) is the element's identity, so the same record synced twice, or reached from two places, is the same element.
237
+ *
238
+ * This is the one definition of a bound activity: a source's sync page and a store's upserted items both use it, so what a source emits is exactly what a store accepts.
239
+ */
240
+ const boundActivitySchema = activityObjectSchema.extend({ source: z.string().min(1) }).refine((activity) => activity.id === activity.source, {
241
+ message: "a bound activity's id must equal its source",
242
+ path: ["id"]
243
+ }).readonly();
233
244
  //#endregion
234
- export { validateOverlay as a, fragmentOperators as c, overlayStatuses as d, participantKinds as f, parseOverlay as i, messageModes as l, OverlayParseError as n, toPointer as o, pseudoRoles as p, overlaySchema as r, elementKinds as s, modelSchema as t, notations as u };
245
+ export { parseOverlay as a, elementKinds as c, notations as d, overlayStatuses as f, overlaySchema as i, fragmentOperators as l, pseudoRoles as m, modelSchema as n, validateOverlay as o, participantKinds as p, OverlayParseError as r, toPointer as s, boundActivitySchema as t, messageModes as u };
@@ -1,4 +1,4 @@
1
- import { r as overlaySchema, t as modelSchema } from "./schema-BPT8fmfa.js";
1
+ import { i as overlaySchema, n as modelSchema, t as boundActivitySchema } from "./schema-CL95Lyni.js";
2
2
  import { z } from "zod";
3
3
  //#region ../../core/graph/source-contract/dist/schema.js
4
4
  /**
@@ -9,15 +9,6 @@ const modelShape = modelSchema.unwrap().shape;
9
9
  const participantSchema = modelShape.participants.unwrap().element;
10
10
  /** A transition as the model declares it. A source emits one per dependency, from the prerequisite to the work that waits on it. */
11
11
  const transitionSchema = modelShape.transitions.unwrap().element;
12
- /** The model's `activity` element: the first variant of its element union, pinned by a type test so a reordering of the union is a compile error. */
13
- const [activityElementSchema] = modelShape.elements.unwrap().element.options;
14
- /**
15
- * An activity bound to the external record it stands for. `source` is required here, where the model leaves it optional, and it equals `id`: the source-qualified identifier (`github:org/repo#12`) is the element's identity, so the same record synced twice, or reached from two places, is the same element.
16
- */
17
- const boundActivitySchema = activityElementSchema.unwrap().extend({ source: z.string().min(1) }).refine((activity) => activity.id === activity.source, {
18
- message: "a bound activity's id must equal its source",
19
- path: ["id"]
20
- }).readonly();
21
12
  /** The relation kinds a source reports beside the model's transitions. */
22
13
  const relationKinds = [
23
14
  "child-of",
@@ -43,7 +34,7 @@ const gapSchema = z.strictObject({
43
34
  message: z.string()
44
35
  }).readonly();
45
36
  /**
46
- * One page of a sync: bound activities, the participants they name, the transitions between them, their relations, their run state, and any gaps. A page is a partial view; `assembleSync` merges a whole sync into one model.
37
+ * One page of a sync: bound activities (graph-schema's `boundActivitySchema`), the participants they name, the transitions between them, their relations, their run state, and any gaps. A page is a partial view; `assembleSync` merges a whole sync into one model.
47
38
  *
48
39
  * `next` is the cursor to resume after this page. It is absent on the last page.
49
40
  */
@@ -123,4 +114,4 @@ const sourceDescriptionSchema = z.strictObject({ source: z.string().regex(/^[a-z
123
114
  /** Why a request was rejected as malformed. */
124
115
  const badRequestReasons = ["invalid-cursor", "invalid-scope"];
125
116
  //#endregion
126
- export { syncInputSchema as _, gapSchema as a, participantSchema as c, scopeChildrenInputSchema as d, scopeEntrySchema as f, syncFilterSchema as g, sourceDescriptionSchema as h, gapReasons as i, relationKinds as l, scopeRootsInputSchema as m, boundActivitySchema as n, orderDirections as o, scopeListingSchema as p, filterStates as r, orderFields as s, badRequestReasons as t, relationSchema as u, syncPageSchema as v, transitionSchema as y };
117
+ export { syncPageSchema as _, orderDirections as a, relationKinds as c, scopeEntrySchema as d, scopeListingSchema as f, syncInputSchema as g, syncFilterSchema as h, gapSchema as i, relationSchema as l, sourceDescriptionSchema as m, filterStates as n, orderFields as o, scopeRootsInputSchema as p, gapReasons as r, participantSchema as s, badRequestReasons as t, scopeChildrenInputSchema as u, transitionSchema as v };
@@ -1,4 +1,4 @@
1
- import { t as GitHubTokenPort } from "../../graphql-3DSUSUvL.js";
1
+ import { t as GitHubTokenPort } from "../../graphql-CGWZ6USe.js";
2
2
  //#region ../../adapters/graph/source-github-issues/dist/node.d.ts
3
3
  /** Where `githubTokenFromEnvironment` looks. Both are ports, so a test supplies its own. */
4
4
  export interface EnvironmentTokenOptions {
@@ -1,6 +1,6 @@
1
- import { $ as syncInputSchema, A as ScopeRootsInput, B as gapReasons, C as OrderField, D as ScopeEntry, E as ScopeChildrenInput, F as SyncInput, G as relationKinds, H as orderDirections, I as SyncPage, J as scopeEntrySchema, K as relationSchema, L as badRequestReasons, M as SourceParticipant, N as SourceTransition, O as ScopeListing, P as SyncFilter, Q as syncFilterSchema, R as boundActivitySchema, S as OrderDirection, T as RelationKind, U as orderFields, V as gapSchema, W as participantSchema, X as scopeRootsInputSchema, Y as scopeListingSchema, Z as sourceDescriptionSchema, _ as BadRequestReason, a as assembleSync, b as Gap, c as GraphSourceRouter, d as PageRequest, et as syncPageSchema, f as createGraphSourceRouter, g as graphSourceContract, h as GraphSourceClient, i as AssembledSync, j as SourceDescription, k as ScopeListingInput, l as GraphSourceScopes, m as GraphSourceFailure, n as FakePage, o as ChildrenRequest, p as GraphSourceError, q as scopeChildrenInputSchema, r as createFakeGraphSource, s as GraphSourcePager, t as FakeGraphSourceOptions, tt as transitionSchema, u as ListingRequest, v as BoundActivity, w as Relation, x as GapReason, y as FilterState, z as filterStates } from "../index-Cs1CWlEg.js";
2
- import { n as GraphqlFetch, r as githubGraphqlEndpoint, t as GitHubTokenPort } from "../graphql-3DSUSUvL.js";
3
- import { a as GitHubIssuesSourceOptions, i as storedTokenPort, n as StoredTokenPortOptions, o as createGitHubIssuesSource, r as selectStoredToken, t as StoredGitHubToken } from "../index-Cp5selgs.js";
1
+ import { $ as transitionSchema, A as SourceDescription, B as orderDirections, C as Relation, D as ScopeListing, E as ScopeEntry, F as SyncPage, G as scopeChildrenInputSchema, H as participantSchema, I as badRequestReasons, J as scopeRootsInputSchema, K as scopeEntrySchema, L as filterStates, M as SourceTransition, N as SyncFilter, O as ScopeListingInput, P as SyncInput, Q as syncPageSchema, R as gapReasons, S as OrderField, T as ScopeChildrenInput, U as relationKinds, V as orderFields, W as relationSchema, X as syncFilterSchema, Y as sourceDescriptionSchema, Z as syncInputSchema, _ as BadRequestReason, a as assembleSync, b as GapReason, c as GraphSourceRouter, d as PageRequest, f as createGraphSourceRouter, g as graphSourceContract, h as GraphSourceClient, i as AssembledSync, j as SourceParticipant, k as ScopeRootsInput, l as GraphSourceScopes, m as GraphSourceFailure, n as FakePage, o as ChildrenRequest, p as GraphSourceError, q as scopeListingSchema, r as createFakeGraphSource, s as GraphSourcePager, t as FakeGraphSourceOptions, u as ListingRequest, v as FilterState, w as RelationKind, x as OrderDirection, y as Gap, z as gapSchema } from "../index-CotF9Lhh.js";
2
+ import { n as GraphqlFetch, r as githubGraphqlEndpoint, t as GitHubTokenPort } from "../graphql-CGWZ6USe.js";
3
+ import { a as GitHubIssuesSourceOptions, i as storedTokenPort, n as StoredTokenPortOptions, o as createGitHubIssuesSource, r as selectStoredToken, t as StoredGitHubToken } from "../index-CiaCmQDP.js";
4
4
  //#region ../../core/graph/source-contract/dist/paginate.d.ts
5
5
  /**
6
6
  * Pages through a cursor-linked sequence on demand: each `next()` reads one page, starting after `first`, and the sequence ends after the page whose `next` is absent. Nothing is read ahead of the consumer, so a consumer that stops early stops the reads.
@@ -47,4 +47,4 @@ export declare const repositoryId: (owner: string, name: string) => string;
47
47
  /** The identifier of an account participant, organisation or user: `github:@login`. The `@` keeps it apart from the `github:owner` scope syntax. */
48
48
  export declare const accountId: (login: string) => string;
49
49
  //#endregion
50
- export { type AssembledSync, type BadRequestReason, type BoundActivity, type ChildrenRequest, type FakeGraphSourceOptions, type FakePage, type FilterState, type Gap, type GapReason, type GitHubIssuesSourceOptions, type GitHubTokenPort, type GraphSourceClient, GraphSourceError, type GraphSourceFailure, type GraphSourcePager, type GraphSourceRouter, type GraphSourceScopes, type GraphqlFetch, type ListingRequest, type OrderDirection, type OrderField, type PageRequest, type Relation, type RelationKind, type Scope, type ScopeChildrenInput, type ScopeEntry, type ScopeListing, type ScopeListingInput, type ScopeRootsInput, type SourceDescription, type SourceParticipant, type SourceTransition, type StoredGitHubToken, type StoredTokenPortOptions, type SyncFilter, type SyncInput, type SyncPage, assembleSync, badRequestReasons, boundActivitySchema, createFakeGraphSource, createGitHubIssuesSource, createGraphSourceRouter, filterStates, gapReasons, gapSchema, githubGraphqlEndpoint, graphSourceContract, orderDirections, orderFields, participantSchema, relationKinds, relationSchema, scopeChildrenInputSchema, scopeEntrySchema, scopeListingSchema, scopeRootsInputSchema, selectStoredToken, sourceDescriptionSchema, storedTokenPort, syncFilterSchema, syncInputSchema, syncPageSchema, transitionSchema };
50
+ export { type AssembledSync, type BadRequestReason, type ChildrenRequest, type FakeGraphSourceOptions, type FakePage, type FilterState, type Gap, type GapReason, type GitHubIssuesSourceOptions, type GitHubTokenPort, type GraphSourceClient, GraphSourceError, type GraphSourceFailure, type GraphSourcePager, type GraphSourceRouter, type GraphSourceScopes, type GraphqlFetch, type ListingRequest, type OrderDirection, type OrderField, type PageRequest, type Relation, type RelationKind, type Scope, type ScopeChildrenInput, type ScopeEntry, type ScopeListing, type ScopeListingInput, type ScopeRootsInput, type SourceDescription, type SourceParticipant, type SourceTransition, type StoredGitHubToken, type StoredTokenPortOptions, type SyncFilter, type SyncInput, type SyncPage, assembleSync, badRequestReasons, createFakeGraphSource, createGitHubIssuesSource, createGraphSourceRouter, filterStates, gapReasons, gapSchema, githubGraphqlEndpoint, graphSourceContract, orderDirections, orderFields, participantSchema, relationKinds, relationSchema, scopeChildrenInputSchema, scopeEntrySchema, scopeListingSchema, scopeRootsInputSchema, selectStoredToken, sourceDescriptionSchema, storedTokenPort, syncFilterSchema, syncInputSchema, syncPageSchema, transitionSchema };
@@ -1,5 +1,5 @@
1
- import { _ as syncInputSchema, a as gapSchema, c as participantSchema, d as scopeChildrenInputSchema, f as scopeEntrySchema, g as syncFilterSchema, h as sourceDescriptionSchema, i as gapReasons, l as relationKinds, m as scopeRootsInputSchema, n as boundActivitySchema, o as orderDirections, p as scopeListingSchema, r as filterStates, s as orderFields, t as badRequestReasons, u as relationSchema, v as syncPageSchema, y as transitionSchema } from "../schema-DVAttrJg.js";
2
- import { a as ownerScopeId, c as githubGraphqlEndpoint, d as graphSourceContract, i as issueId, l as createGraphSourceRouter, n as accountId, o as parseScope, r as githubSource, s as repositoryId, t as createGitHubIssuesSource, u as paginate } from "../source-lTKshktI.js";
1
+ import { _ as syncPageSchema, a as orderDirections, c as relationKinds, d as scopeEntrySchema, f as scopeListingSchema, g as syncInputSchema, h as syncFilterSchema, i as gapSchema, l as relationSchema, m as sourceDescriptionSchema, n as filterStates, o as orderFields, p as scopeRootsInputSchema, r as gapReasons, s as participantSchema, t as badRequestReasons, u as scopeChildrenInputSchema, v as transitionSchema } from "../schema-DMXa8gAZ.js";
2
+ import { a as ownerScopeId, c as githubGraphqlEndpoint, d as graphSourceContract, i as issueId, l as createGraphSourceRouter, n as accountId, o as parseScope, r as githubSource, s as repositoryId, t as createGitHubIssuesSource, u as paginate } from "../source-DM4fLS5P.js";
3
3
  import { t as GraphSourceError } from "../errors-BZe5WzCn.js";
4
4
  //#region ../../core/graph/source-contract/dist/assemble.js
5
5
  const relationKey = (relation) => JSON.stringify([
@@ -235,4 +235,4 @@ const storedTokenPort = (options) => async (owner, signal) => {
235
235
  return chosen.token;
236
236
  };
237
237
  //#endregion
238
- export { GraphSourceError, accountId, assembleSync, badRequestReasons, boundActivitySchema, createFakeGraphSource, createGitHubIssuesSource, createGraphSourceRouter, filterStates, gapReasons, gapSchema, githubGraphqlEndpoint, githubSource, graphSourceContract, issueId, orderDirections, orderFields, ownerScopeId, paginate, parseScope, participantSchema, relationKinds, relationSchema, repositoryId, scopeChildrenInputSchema, scopeEntrySchema, scopeListingSchema, scopeRootsInputSchema, selectStoredToken, sourceDescriptionSchema, storedTokenPort, syncFilterSchema, syncInputSchema, syncPageSchema, transitionSchema };
238
+ export { GraphSourceError, accountId, assembleSync, badRequestReasons, createFakeGraphSource, createGitHubIssuesSource, createGraphSourceRouter, filterStates, gapReasons, gapSchema, githubGraphqlEndpoint, githubSource, graphSourceContract, issueId, orderDirections, orderFields, ownerScopeId, paginate, parseScope, participantSchema, relationKinds, relationSchema, repositoryId, scopeChildrenInputSchema, scopeEntrySchema, scopeListingSchema, scopeRootsInputSchema, selectStoredToken, sourceDescriptionSchema, storedTokenPort, syncFilterSchema, syncInputSchema, syncPageSchema, transitionSchema };
@@ -1,4 +1,4 @@
1
- import { _ as syncInputSchema, d as scopeChildrenInputSchema, g as syncFilterSchema, h as sourceDescriptionSchema, m as scopeRootsInputSchema, p as scopeListingSchema, t as badRequestReasons, v as syncPageSchema } from "./schema-DVAttrJg.js";
1
+ import { _ as syncPageSchema, f as scopeListingSchema, g as syncInputSchema, h as syncFilterSchema, m as sourceDescriptionSchema, p as scopeRootsInputSchema, t as badRequestReasons, u as scopeChildrenInputSchema } from "./schema-DMXa8gAZ.js";
2
2
  import { t as GraphSourceError } from "./errors-BZe5WzCn.js";
3
3
  import { z } from "zod";
4
4
  import { eventIterator, oc } from "@orpc/contract";
@@ -1,4 +1,4 @@
1
- import { w as GraphStore } from "../index-CR8xUK3S.js";
1
+ import { w as GraphStore } from "../index-KhygugOP.js";
2
2
  import { DatabaseSyncOptions } from "node:sqlite";
3
3
  import { NodeSQLiteDatabase } from "drizzle-orm/node-sqlite";
4
4
  //#region ../../adapters/graph/sqlite-node/dist/open.d.ts
@@ -1,2 +1,2 @@
1
- import { i as openNodeGraphStore, n as privateDirectoryMode, r as privateFileMode, t as prepareDataFile } from "../data-file-BVMxkTug.js";
1
+ import { i as openNodeGraphStore, n as privateDirectoryMode, r as privateFileMode, t as prepareDataFile } from "../data-file-B8__c10l.js";
2
2
  export { openNodeGraphStore, prepareDataFile, privateDirectoryMode, privateFileMode };
@@ -1,7 +1,8 @@
1
- import { I as storeChangeSchema, t as createSqliteGraphStore, y as ChangeFeed } from "../../store-DKzvLGgl.js";
2
- import { t as createGraphStoreRouter } from "../../router-Dk91O_9p.js";
1
+ import { F as storeChangeSchema, t as createSqliteGraphStore, y as ChangeFeed } from "../../store-CgweIG8J.js";
2
+ import { t as createGraphStoreRouter } from "../../router-DzVcQ28U.js";
3
3
  import sqlite3InitModule from "@sqlite.org/sqlite-wasm";
4
4
  import { RPCHandler } from "@orpc/server/message-port";
5
+ import { sqlJsCodecs } from "drizzle-orm/sql-js/codecs";
5
6
  import { drizzle } from "drizzle-orm/sqlite-proxy";
6
7
  //#region ../../adapters/graph/sqlite-wasm/dist/database.js
7
8
  /**
@@ -24,7 +25,7 @@ const openWorkerDatabase = (sqlite3, location) => {
24
25
  returnValue: "resultRows"
25
26
  });
26
27
  return Promise.resolve({ rows });
27
- });
28
+ }, { codecs: sqlJsCodecs });
28
29
  const exclusive = async (operation) => navigator.locks.request(location.pool, { mode: "exclusive" }, async () => {
29
30
  const installing = pool === void 0;
30
31
  pool ??= sqlite3.then(async (module) => module.installOpfsSAHPoolVfs({ name: location.pool }));
@@ -1,4 +1,4 @@
1
- import { ut as GraphStoreClient } from "../index-CR8xUK3S.js";
1
+ import { ct as GraphStoreClient } from "../index-KhygugOP.js";
2
2
  //#region ../../adapters/graph/sqlite-wasm/dist/client.d.ts
3
3
  /**
4
4
  * A client for the graph store a worker serves with `serveGraphStoreInWorker`. Every procedure of the contract is available, with its abort signal and typed errors, as if the store were in the page.
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { a as validateOverlay, c as fragmentOperators, d as overlayStatuses, f as participantKinds, l as messageModes, p as pseudoRoles, r as overlaySchema, s as elementKinds, t as modelSchema, u as notations } from "./schema-BPT8fmfa.js";
2
+ import { c as elementKinds, d as notations, f as overlayStatuses, i as overlaySchema, l as fragmentOperators, m as pseudoRoles, n as modelSchema, o as validateOverlay, p as participantKinds, t as boundActivitySchema, u as messageModes } from "./schema-CL95Lyni.js";
3
3
  import { t as validate } from "./validate-DF3mQZww.js";
4
4
  import { r as loopTransitions, s as emptyFactRecord } from "./control-DiygoEhm.js";
5
5
  import { z } from "zod";
@@ -11,21 +11,12 @@ import { index, integer, primaryKey, sqliteTable, text } from "drizzle-orm/sqlit
11
11
  * The model's own record schemas, taken from `modelSchema` rather than restated, so what the store accepts is exactly a model or a slice of one and can never drift from it.
12
12
  */
13
13
  const modelShape = modelSchema.unwrap().shape;
14
- /** The model's `activity` element: the first variant of its element union. A type test pins the order, so reordering the union is a compile error. */
15
- const [activityElementSchema] = modelShape.elements.unwrap().element.options;
16
14
  /** The name a store files a model under. Any non-empty string; the store gives it no structure. */
17
15
  const modelIdSchema = z.string().min(1);
18
16
  /**
19
17
  * A position in the store's history. Every change to any model takes the next revision from one store-wide sequence, so revisions only grow, a model's revision is the revision of its last change, and a model deleted and saved again never reuses an earlier one.
20
18
  */
21
19
  const revisionSchema = z.int().positive();
22
- /**
23
- * An activity bound to the external record it stands for. `source` is required here, where the model leaves it optional: a bound item's identity is its source record, and the source-qualified identifier is its element id.
24
- */
25
- const boundActivitySchema = activityElementSchema.unwrap().extend({ source: z.string().min(1) }).refine((activity) => activity.id === activity.source, {
26
- message: "a bound activity's id must equal its source",
27
- path: ["id"]
28
- }).readonly();
29
20
  /** The relation kinds a store keeps beside a model, the same kinds a source reports. */
30
21
  const relationKinds = [
31
22
  "child-of",
@@ -41,7 +32,7 @@ const relationSchema = z.strictObject({
41
32
  to: z.string().min(1)
42
33
  }).readonly();
43
34
  /**
44
- * Items read from a source, to be merged into a stored model by identifier. Each participant, activity and transition replaces the one with the same id or is appended after the existing ones; the overlay's entries replace the run state of the elements they name; each relation not already stored is appended. Everything else in the model is left as it is.
35
+ * Items read from a source, to be merged into a stored model by identifier. Activities are graph-schema's `boundActivitySchema`, the same schema a source's sync page uses, so a page's items pass unchanged. Each participant, activity and transition replaces the one with the same id or is appended after the existing ones; the overlay's entries replace the run state of the elements they name; each relation not already stored is appended. Everything else in the model is left as it is.
45
36
  */
46
37
  const boundItemsSchema = z.strictObject({
47
38
  participants: z.array(modelShape.participants.unwrap().element).readonly(),
@@ -1499,4 +1490,4 @@ const createSqliteGraphStore = (options) => {
1499
1490
  };
1500
1491
  };
1501
1492
  //#endregion
1502
- export { modelIdSchema as A, boundItemsSchema as C, factNameSchema as D, factClearingSchema as E, revisionSchema as F, storeChangeSchema as I, storedFactsSchema as L, reachSchema as M, relationKinds as N, factRecordSchema as O, relationSchema as P, storedModelSchema as R, boundActivitySchema as S, factChangeSchema as T, mergeBoundItems as _, ancestorsOf as a, defaultSubscriptionCapacity as b, mergeRelations as c, factIssues as d, factsWithin as f, emptyModel as g, checkStored as h, serialised as i, modelSummarySchema as j, issueSchema as k, relationIssues as l, withoutFacts as m, tables_exports as n, childrenOf as o, mergeFacts as p, migrate as r, descendantsOf as s, createSqliteGraphStore as t, relationsWithin as u, overlayWithin as v, changeKinds as w, GraphStoreError as x, ChangeFeed as y };
1493
+ export { modelSummarySchema as A, changeKinds as C, factRecordSchema as D, factNameSchema as E, storeChangeSchema as F, storedFactsSchema as I, storedModelSchema as L, relationKinds as M, relationSchema as N, issueSchema as O, revisionSchema as P, boundItemsSchema as S, factClearingSchema as T, mergeBoundItems as _, ancestorsOf as a, defaultSubscriptionCapacity as b, mergeRelations as c, factIssues as d, factsWithin as f, emptyModel as g, checkStored as h, serialised as i, reachSchema as j, modelIdSchema as k, relationIssues as l, withoutFacts as m, tables_exports as n, childrenOf as o, mergeFacts as p, migrate as r, descendantsOf as s, createSqliteGraphStore as t, relationsWithin as u, overlayWithin as v, factChangeSchema as w, GraphStoreError as x, ChangeFeed as y };
package/dist/store.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as factRecordSchema, A as defaultSubscriptionCapacity, B as Reach, C as ElementRequest, D as ChangeFeedOptions, E as ChangeFeed, F as ChangeKind, G as StoredFacts, H as RelationKind, I as FactChange, J as boundItemsSchema, K as StoredModel, L as FactClearing, M as GraphStoreFailure, N as BoundActivity, O as ChangeSubscription, P as BoundItems, Q as factNameSchema, R as ModelId, S as overlayWithin, T as ModelRequest, U as Revision, V as Relation, W as StoreChange, X as factChangeSchema, Y as changeKinds, Z as factClearingSchema, _ as mergeFacts, a as blockedChainOf, at as relationSchema, b as emptyModel, c as structureOf, ct as storedFactsSchema, d as descendantsOf, dt as graphStoreContract, et as issueSchema, f as mergeRelations, g as factsWithin, h as factIssues, i as Structure, it as relationKinds, j as GraphStoreError, k as SubscribeOptions, l as ancestorsOf, lt as storedModelSchema, m as relationsWithin, n as GraphStoreRouter, nt as modelSummarySchema, o as impactOf, ot as revisionSchema, p as relationIssues, q as boundActivitySchema, r as createGraphStoreRouter, rt as reachSchema, s as readyOf, st as storeChangeSchema, t as createFakeGraphStore, tt as modelIdSchema, u as childrenOf, ut as GraphStoreClient, v as withoutFacts, w as GraphStore, x as mergeBoundItems, y as checkStored, z as ModelSummary } from "./index-CR8xUK3S.js";
1
+ import { $ as modelIdSchema, A as defaultSubscriptionCapacity, B as Relation, C as ElementRequest, D as ChangeFeedOptions, E as ChangeFeed, F as FactChange, G as StoredModel, H as Revision, I as FactClearing, J as factChangeSchema, K as boundItemsSchema, L as ModelId, M as GraphStoreFailure, N as BoundItems, O as ChangeSubscription, P as ChangeKind, Q as issueSchema, R as ModelSummary, S as overlayWithin, T as ModelRequest, U as StoreChange, V as RelationKind, W as StoredFacts, X as factNameSchema, Y as factClearingSchema, Z as factRecordSchema, _ as mergeFacts, a as blockedChainOf, at as storeChangeSchema, b as emptyModel, c as structureOf, ct as GraphStoreClient, d as descendantsOf, et as modelSummarySchema, f as mergeRelations, g as factsWithin, h as factIssues, i as Structure, it as revisionSchema, j as GraphStoreError, k as SubscribeOptions, l as ancestorsOf, lt as graphStoreContract, m as relationsWithin, n as GraphStoreRouter, nt as relationKinds, o as impactOf, ot as storedFactsSchema, p as relationIssues, q as changeKinds, r as createGraphStoreRouter, rt as relationSchema, s as readyOf, st as storedModelSchema, t as createFakeGraphStore, tt as reachSchema, u as childrenOf, v as withoutFacts, w as GraphStore, x as mergeBoundItems, y as checkStored, z as Reach } from "./index-KhygugOP.js";
2
2
  import { SQLiteAsyncDatabase } from "drizzle-orm/sqlite-core";
3
3
  import { MigrationMeta } from "drizzle-orm/migrator";
4
4
  //#region ../../adapters/graph/store-sqlite/dist/database.d.ts
@@ -100,6 +100,7 @@ declare const sequences: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
100
100
  }, {}>;
101
101
  };
102
102
  dialect: "sqlite";
103
+ isAlias: false;
103
104
  }>;
104
105
  /** One row per stored model: its revision and its layout. */
105
106
  declare const models: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
@@ -156,6 +157,7 @@ declare const models: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
156
157
  }, {}>;
157
158
  };
158
159
  dialect: "sqlite";
160
+ isAlias: false;
159
161
  }>;
160
162
  declare const participants: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
161
163
  name: "participants";
@@ -243,6 +245,7 @@ declare const participants: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
243
245
  }, {}>;
244
246
  };
245
247
  dialect: "sqlite";
248
+ isAlias: false;
246
249
  }>;
247
250
  declare const events: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
248
251
  name: "events";
@@ -330,6 +333,7 @@ declare const events: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
330
333
  }, {}>;
331
334
  };
332
335
  dialect: "sqlite";
336
+ isAlias: false;
333
337
  }>;
334
338
  declare const actions: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
335
339
  name: "actions";
@@ -401,6 +405,7 @@ declare const actions: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<
401
405
  }, {}>;
402
406
  };
403
407
  dialect: "sqlite";
408
+ isAlias: false;
404
409
  }>;
405
410
  declare const artefacts: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
406
411
  name: "artefacts";
@@ -488,6 +493,7 @@ declare const artefacts: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
488
493
  }, {}>;
489
494
  };
490
495
  dialect: "sqlite";
496
+ isAlias: false;
491
497
  }>;
492
498
  /**
493
499
  * Every element kind in one table, so the structural queries traverse a single relation. A column a kind does not have is null on its rows; `rows.ts` reads only the columns of the row's kind.
@@ -818,6 +824,7 @@ declare const elements: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns
818
824
  }, {}>;
819
825
  };
820
826
  dialect: "sqlite";
827
+ isAlias: false;
821
828
  }>;
822
829
  /** Transitions, with `loop` recording whether graph-domain counts the transition as a decision's loop edge, so the recursive queries can leave it out without loading the model. */
823
830
  declare const transitions: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
@@ -986,6 +993,7 @@ declare const transitions: import("drizzle-orm/sqlite-core").SQLiteTableWithColu
986
993
  }, {}>;
987
994
  };
988
995
  dialect: "sqlite";
996
+ isAlias: false;
989
997
  }>;
990
998
  declare const fragments: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
991
999
  name: "fragments";
@@ -1073,6 +1081,7 @@ declare const fragments: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
1073
1081
  }, {}>;
1074
1082
  };
1075
1083
  dialect: "sqlite";
1084
+ isAlias: false;
1076
1085
  }>;
1077
1086
  /** Projections, keyed by position because the model does not require their ids to be unique. */
1078
1087
  declare const projections: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
@@ -1177,6 +1186,7 @@ declare const projections: import("drizzle-orm/sqlite-core").SQLiteTableWithColu
1177
1186
  }, {}>;
1178
1187
  };
1179
1188
  dialect: "sqlite";
1189
+ isAlias: false;
1180
1190
  }>;
1181
1191
  /** Run state, one row per element that has any. */
1182
1192
  declare const overlay: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
@@ -1233,6 +1243,7 @@ declare const overlay: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<
1233
1243
  }, {}>;
1234
1244
  };
1235
1245
  dialect: "sqlite";
1246
+ isAlias: false;
1236
1247
  }>;
1237
1248
  /**
1238
1249
  * Relations kept beside a model, one row per kind and pair of ends, so a relation sent twice is stored once, with `position` keeping the order relations were first stored. The ends are identifiers of the model's elements or participants, by kind.
@@ -1323,6 +1334,7 @@ declare const relations: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
1323
1334
  }, {}>;
1324
1335
  };
1325
1336
  dialect: "sqlite";
1337
+ isAlias: false;
1326
1338
  }>;
1327
1339
  /** What is known about whether an artefact is provided, one row per artefact the model's fact record names: `provided` is true when it is provided and false when it is known not to be. An artefact with no row is unknown. */
1328
1340
  declare const artefactFacts: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
@@ -1379,6 +1391,7 @@ declare const artefactFacts: import("drizzle-orm/sqlite-core").SQLiteTableWithCo
1379
1391
  }, {}>;
1380
1392
  };
1381
1393
  dialect: "sqlite";
1394
+ isAlias: false;
1382
1395
  }>;
1383
1396
  /** The value of each named fact a model's fact record holds, as JSON text, typed `unknown` because `rows.ts` checks it with trilean's value schema on every read. A name with no row is unknown. */
1384
1397
  declare const namedFacts: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
@@ -1435,6 +1448,7 @@ declare const namedFacts: import("drizzle-orm/sqlite-core").SQLiteTableWithColum
1435
1448
  }, {}>;
1436
1449
  };
1437
1450
  dialect: "sqlite";
1451
+ isAlias: false;
1438
1452
  }>;
1439
1453
  //#endregion
1440
- export { type BoundActivity, type BoundItems, ChangeFeed, type ChangeFeedOptions, type ChangeKind, type ChangeSubscription, type ElementRequest, type Exclusive, type FactChange, type FactClearing, type GraphStore, type GraphStoreClient, GraphStoreError, type GraphStoreFailure, type GraphStoreRouter, type ModelId, type ModelRequest, type ModelSummary, type Reach, type Relation, type RelationKind, type Revision, type SqliteDatabase, type SqliteGraphStoreOptions, type StoreChange, type StoredFacts, type StoredModel, type Structure, type SubscribeOptions, ancestorsOf, blockedChainOf, boundActivitySchema, boundItemsSchema, changeKinds, checkStored, childrenOf, createFakeGraphStore, createGraphStoreRouter, defaultSubscriptionCapacity, descendantsOf, emptyModel, factChangeSchema, factClearingSchema, factIssues, factNameSchema, factRecordSchema, factsWithin, graphStoreContract, impactOf, issueSchema, mergeBoundItems, mergeFacts, mergeRelations, modelIdSchema, modelSummarySchema, overlayWithin, reachSchema, readyOf, relationIssues, relationKinds, relationSchema, relationsWithin, revisionSchema, storeChangeSchema, storedFactsSchema, storedModelSchema, structureOf, tables_d_exports as tables, withoutFacts };
1454
+ export { type BoundItems, ChangeFeed, type ChangeFeedOptions, type ChangeKind, type ChangeSubscription, type ElementRequest, type Exclusive, type FactChange, type FactClearing, type GraphStore, type GraphStoreClient, GraphStoreError, type GraphStoreFailure, type GraphStoreRouter, type ModelId, type ModelRequest, type ModelSummary, type Reach, type Relation, type RelationKind, type Revision, type SqliteDatabase, type SqliteGraphStoreOptions, type StoreChange, type StoredFacts, type StoredModel, type Structure, type SubscribeOptions, ancestorsOf, blockedChainOf, boundItemsSchema, changeKinds, checkStored, childrenOf, createFakeGraphStore, createGraphStoreRouter, defaultSubscriptionCapacity, descendantsOf, emptyModel, factChangeSchema, factClearingSchema, factIssues, factNameSchema, factRecordSchema, factsWithin, graphStoreContract, impactOf, issueSchema, mergeBoundItems, mergeFacts, mergeRelations, modelIdSchema, modelSummarySchema, overlayWithin, reachSchema, readyOf, relationIssues, relationKinds, relationSchema, relationsWithin, revisionSchema, storeChangeSchema, storedFactsSchema, storedModelSchema, structureOf, tables_d_exports as tables, withoutFacts };
package/dist/store.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { r as loopTransitions, s as emptyFactRecord } from "./control-DiygoEhm.js";
2
- import { A as modelIdSchema, C as boundItemsSchema, D as factNameSchema, E as factClearingSchema, F as revisionSchema, I as storeChangeSchema, L as storedFactsSchema, M as reachSchema, N as relationKinds, O as factRecordSchema, P as relationSchema, R as storedModelSchema, S as boundActivitySchema, T as factChangeSchema, _ as mergeBoundItems, a as ancestorsOf, b as defaultSubscriptionCapacity, c as mergeRelations, d as factIssues, f as factsWithin, g as emptyModel, h as checkStored, i as serialised, j as modelSummarySchema, k as issueSchema, l as relationIssues, m as withoutFacts, n as tables_exports, o as childrenOf, p as mergeFacts, r as migrate, s as descendantsOf, t as createSqliteGraphStore, u as relationsWithin, v as overlayWithin, w as changeKinds, x as GraphStoreError, y as ChangeFeed } from "./store-DKzvLGgl.js";
3
- import { n as graphStoreContract, t as createGraphStoreRouter } from "./router-Dk91O_9p.js";
2
+ import { A as modelSummarySchema, C as changeKinds, D as factRecordSchema, E as factNameSchema, F as storeChangeSchema, I as storedFactsSchema, L as storedModelSchema, M as relationKinds, N as relationSchema, O as issueSchema, P as revisionSchema, S as boundItemsSchema, T as factClearingSchema, _ as mergeBoundItems, a as ancestorsOf, b as defaultSubscriptionCapacity, c as mergeRelations, d as factIssues, f as factsWithin, g as emptyModel, h as checkStored, i as serialised, j as reachSchema, k as modelIdSchema, l as relationIssues, m as withoutFacts, n as tables_exports, o as childrenOf, p as mergeFacts, r as migrate, s as descendantsOf, t as createSqliteGraphStore, u as relationsWithin, v as overlayWithin, w as factChangeSchema, x as GraphStoreError, y as ChangeFeed } from "./store-CgweIG8J.js";
3
+ import { n as graphStoreContract, t as createGraphStoreRouter } from "./router-DzVcQ28U.js";
4
4
  //#region ../../core/graph/store-contract/dist/structure.js
5
5
  /**
6
6
  * Whether an element is a pure control element: a `decision` or a pseudo-state. Control elements have no work of their own, so the structural queries pass through them and never report them.
@@ -269,4 +269,4 @@ const createFakeGraphStore = () => {
269
269
  };
270
270
  };
271
271
  //#endregion
272
- export { ChangeFeed, GraphStoreError, ancestorsOf, blockedChainOf, boundActivitySchema, boundItemsSchema, changeKinds, checkStored, childrenOf, createFakeGraphStore, createGraphStoreRouter, createSqliteGraphStore, defaultSubscriptionCapacity, descendantsOf, emptyModel, factChangeSchema, factClearingSchema, factIssues, factNameSchema, factRecordSchema, factsWithin, graphStoreContract, impactOf, issueSchema, mergeBoundItems, mergeFacts, mergeRelations, migrate, modelIdSchema, modelSummarySchema, overlayWithin, reachSchema, readyOf, relationIssues, relationKinds, relationSchema, relationsWithin, revisionSchema, serialised, storeChangeSchema, storedFactsSchema, storedModelSchema, structureOf, tables_exports as tables, withoutFacts };
272
+ export { ChangeFeed, GraphStoreError, ancestorsOf, blockedChainOf, boundItemsSchema, changeKinds, checkStored, childrenOf, createFakeGraphStore, createGraphStoreRouter, createSqliteGraphStore, defaultSubscriptionCapacity, descendantsOf, emptyModel, factChangeSchema, factClearingSchema, factIssues, factNameSchema, factRecordSchema, factsWithin, graphStoreContract, impactOf, issueSchema, mergeBoundItems, mergeFacts, mergeRelations, migrate, modelIdSchema, modelSummarySchema, overlayWithin, reachSchema, readyOf, relationIssues, relationKinds, relationSchema, relationsWithin, revisionSchema, serialised, storeChangeSchema, storedFactsSchema, storedModelSchema, structureOf, tables_exports as tables, withoutFacts };
package/dist/sync.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as SyncRequest, c as syncScopes, i as SyncProgress, l as SyncCheckpoint, n as SourceLookup, o as SyncStore, r as SyncInterruption, s as UnknownSourceError, t as InterruptedSyncError, u as syncCheckpointSchema } from "./index-DoMIav3D.js";
1
+ import { a as SyncRequest, c as syncScopes, i as SyncProgress, l as SyncCheckpoint, n as SourceLookup, o as SyncStore, r as SyncInterruption, s as UnknownSourceError, t as InterruptedSyncError, u as syncCheckpointSchema } from "./index-7nV7hCmv.js";
2
2
  //#region ../../core/graph/sync/dist/scopes.d.ts
3
3
  /** The scopes of one source, in the order they were given. */
4
4
  interface SourceScopes {
package/dist/sync.js CHANGED
@@ -1,4 +1,4 @@
1
- import { g as syncFilterSchema } from "./schema-DVAttrJg.js";
1
+ import { h as syncFilterSchema } from "./schema-DMXa8gAZ.js";
2
2
  import { a as scopesBySource, i as InvalidScopeError, n as UnknownSourceError, r as syncScopes, t as InterruptedSyncError } from "./sync-CkaJO3OQ.js";
3
3
  import { z } from "zod";
4
4
  //#region ../../core/graph/sync/dist/checkpoint.js
package/dist/ui.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { B as Status } from "./index-D4CnOhNf.js";
2
- import { K as IdSpace } from "./index-Dvz_I_uQ.js";
3
- import { y as SequenceDiagram$1 } from "./index-4f4PVH7K.js";
4
- import { f as LaneProps, h as TransitionItemProps, l as LegendProps, o as FilterPanelProps, r as DetailPanelProps, v as ElementCardProps } from "./index-LWdwpjZG.js";
1
+ import { B as Status } from "./index-wQnLXJmD.js";
2
+ import { Y as IdSpace } from "./index-DYl6lZLe.js";
3
+ import { y as SequenceDiagram$1 } from "./index-DluJZTbT.js";
4
+ import { f as LaneProps, h as TransitionItemProps, l as LegendProps, o as FilterPanelProps, r as DetailPanelProps, v as ElementCardProps } from "./index-C-ZNF81j.js";
5
5
  import { a as lightTheme, i as darkTheme, n as darkValues, o as vars, r as lightValues, t as ThemeValues } from "./theme-values-BybZ-cle.js";
6
6
  import { ReactElement, ReactNode } from "react";
7
7
  //#region ../../ui/graph/ui/dist/base.css.d.ts
@@ -1,5 +1,5 @@
1
1
  //#region src/version.ts
2
2
  /** The version of the installed `process-graph` package, as its manifest names it. The bundler writes it in when the package is built, so reading it touches no file. */
3
- const version = "1.4.0";
3
+ const version = "2.0.1";
4
4
  //#endregion
5
5
  export { version as t };
@@ -1,4 +1,4 @@
1
- import { o as toPointer, t as modelSchema } from "./schema-BPT8fmfa.js";
1
+ import { n as modelSchema, s as toPointer } from "./schema-CL95Lyni.js";
2
2
  import { t as validate } from "./validate-DF3mQZww.js";
3
3
  //#region ../../core/graph/schema/dist/parse.js
4
4
  /** Thrown by `parseModel` when the input is not a valid model. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "process-graph",
3
- "version": "1.4.0",
3
+ "version": "2.0.1",
4
4
  "description": "A process and dependency graph model with projections into flowcharts, swimlanes, state machines and sequence diagrams, reasoning over a run, layout, the GitHub issues source, the SQLite store for Node and the browser, and the process-graph command line, each behind its own subpath.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -121,26 +121,26 @@
121
121
  ],
122
122
  "devDependencies": {
123
123
  "@arethetypeswrong/cli": "0.18.5",
124
- "@exadev/process-graph-cli": "1.3.0",
124
+ "@exadev/process-graph-cli": "1.3.2",
125
125
  "@exadev/process-graph-dag": "1.1.1",
126
- "@exadev/process-graph-domain": "1.2.1",
127
- "@exadev/process-graph-export": "1.0.0",
128
- "@exadev/process-graph-layout": "1.0.6",
129
- "@exadev/process-graph-projection": "1.1.3",
130
- "@exadev/process-graph-react": "1.1.3",
131
- "@exadev/process-graph-react-flow": "1.1.3",
132
- "@exadev/process-graph-schema": "1.1.2",
133
- "@exadev/process-graph-source-contract": "1.1.2",
134
- "@exadev/process-graph-source-github-issues": "1.1.2",
135
- "@exadev/process-graph-sqlite-node": "1.1.0",
136
- "@exadev/process-graph-sqlite-wasm": "1.0.6",
137
- "@exadev/process-graph-store-contract": "1.2.1",
138
- "@exadev/process-graph-store-sqlite": "1.2.1",
139
- "@exadev/process-graph-sync": "1.0.0",
140
- "@exadev/process-graph-ui": "1.1.1",
141
- "@orpc/client": "2.0.0-beta.41",
142
- "@orpc/contract": "2.0.0-beta.41",
143
- "@orpc/server": "2.0.0-beta.41",
126
+ "@exadev/process-graph-domain": "1.2.2",
127
+ "@exadev/process-graph-export": "1.0.1",
128
+ "@exadev/process-graph-layout": "1.0.7",
129
+ "@exadev/process-graph-projection": "1.1.4",
130
+ "@exadev/process-graph-react": "1.1.4",
131
+ "@exadev/process-graph-react-flow": "1.1.4",
132
+ "@exadev/process-graph-schema": "2.0.0",
133
+ "@exadev/process-graph-source-contract": "2.0.0",
134
+ "@exadev/process-graph-source-github-issues": "2.0.0",
135
+ "@exadev/process-graph-sqlite-node": "1.1.2",
136
+ "@exadev/process-graph-sqlite-wasm": "1.0.8",
137
+ "@exadev/process-graph-store-contract": "2.0.0",
138
+ "@exadev/process-graph-store-sqlite": "1.2.3",
139
+ "@exadev/process-graph-sync": "1.0.1",
140
+ "@exadev/process-graph-ui": "1.1.2",
141
+ "@orpc/client": "2.0.0-beta.42",
142
+ "@orpc/contract": "2.0.0-beta.42",
143
+ "@orpc/server": "2.0.0-beta.42",
144
144
  "@sqlite.org/sqlite-wasm": "3.53.4-build2",
145
145
  "@stryker-mutator/core": "10.0.0",
146
146
  "@stryker-mutator/typescript-checker": "10.0.0",
@@ -153,7 +153,7 @@
153
153
  "@vitest/coverage-v8": "4.1.11",
154
154
  "@xyflow/react": "12.12.0",
155
155
  "commander": "15.0.0",
156
- "drizzle-orm": "1.0.0-rc.4",
156
+ "drizzle-orm": "1.0.0-rc.5-5935859",
157
157
  "elkjs": "0.12.0",
158
158
  "eslint": "10.12.0",
159
159
  "playwright": "1.63.0",
@@ -169,15 +169,15 @@
169
169
  "zod": "4.6.5"
170
170
  },
171
171
  "peerDependencies": {
172
- "@orpc/client": "2.0.0-beta.41",
173
- "@orpc/contract": "2.0.0-beta.41",
174
- "@orpc/server": "2.0.0-beta.41",
172
+ "@orpc/client": "2.0.0-beta.42",
173
+ "@orpc/contract": "2.0.0-beta.42",
174
+ "@orpc/server": "2.0.0-beta.42",
175
175
  "@sqlite.org/sqlite-wasm": "3.53.4-build2",
176
176
  "@vanilla-extract/css": "^1.21.2",
177
177
  "@vanilla-extract/recipes": "^0.5.7",
178
178
  "@xyflow/react": "^12.12.0",
179
179
  "commander": "^15.0.0",
180
- "drizzle-orm": "1.0.0-rc.4",
180
+ "drizzle-orm": "1.0.0-rc.5-5935859",
181
181
  "elkjs": "^0.12.0",
182
182
  "react": "^19.3.0",
183
183
  "react-dom": "^19.3.0"
@@ -1,4 +0,0 @@
1
- import "./view-DTeNUhGG.js";
2
- import "./exit-codes-0ultCqdS.js";
3
- import { i as runProcess } from "./dist-C8zDuW-y.js";
4
- export { runProcess };