@cmmd-center/forge 0.13.16 → 0.13.18

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 (22) hide show
  1. package/dist/bin.cjs +40 -724
  2. package/dist/bin.mjs +10 -694
  3. package/dist/client/assets/{CanvasPanel-RpD9Eh_S.js → CanvasPanel-uofZ5KUR.js} +2 -2
  4. package/dist/client/assets/{CompositeItem-DEIBUHJR.js → CompositeItem-C5YSRi5B.js} +2 -2
  5. package/dist/client/assets/{DiffPanel-DI782ZMI.js → DiffPanel-DKupDrOL.js} +2 -2
  6. package/dist/client/assets/{DiffPanel.logic-DtVm1IjE.js → DiffPanel.logic-C7gTWSq9.js} +2 -2
  7. package/dist/client/assets/{DiffPanelShell-IB1GWoYr.js → DiffPanelShell-DCsvZHj8.js} +6 -6
  8. package/dist/client/assets/{DiffWorkerPoolProvider-DDMgJC0H.js → DiffWorkerPoolProvider-DJ_pp0NU.js} +2 -2
  9. package/dist/client/assets/{PullRequestCodePanel-DPwb2trb.js → PullRequestCodePanel-D3hf_E_a.js} +2 -2
  10. package/dist/client/assets/{Virtualizer-CU-TBcmx.js → Virtualizer-CWyTqi1E.js} +2 -2
  11. package/dist/client/assets/{canvasStateStore-NrAxDqvM.js → canvasStateStore-IBP3QM_C.js} +2 -2
  12. package/dist/client/assets/{cmmdAuthRedirect-BahlX0gF.js → cmmdAuthRedirect-Ck1QfYaS.js} +2 -2
  13. package/dist/client/assets/index-EZbGVDT4.css +1 -0
  14. package/dist/client/assets/index-rebrBYd5.js +153 -0
  15. package/dist/client/assets/{popover-Z8Tvl-OD.js → popover-BQaoSlk7.js} +2 -2
  16. package/dist/client/assets/{src-BU7yHzO9.js → src-Bj8vTcnP.js} +2 -2
  17. package/dist/client/assets/{toggle-CWYdWYBn.js → toggle-CE2NHkQL.js} +2 -2
  18. package/dist/client/index.html +11 -11
  19. package/dist/forge-build.json +1 -1
  20. package/package.json +1 -1
  21. package/dist/client/assets/index-B9000khV.css +0 -1
  22. package/dist/client/assets/index-CB-vPC0y.js +0 -153
package/dist/bin.cjs CHANGED
@@ -25802,160 +25802,6 @@ const WorkspaceEnsureScratchResult = require_Schema$1.Struct({
25802
25802
  workspaceRoot: require_Schema$1.String,
25803
25803
  title: require_Schema$1.String
25804
25804
  });
25805
- const CodeGraphRelation = require_Schema$1.Literals([
25806
- "contains",
25807
- "imports",
25808
- "calls",
25809
- "imports_from",
25810
- "method",
25811
- "references",
25812
- "re_exports",
25813
- "indirect_call",
25814
- "dynamic_import",
25815
- "inherits",
25816
- "rationale_for",
25817
- "implements",
25818
- "cites",
25819
- "triggers"
25820
- ]);
25821
- const CodeGraphConfidence = require_Schema$1.Literals(["EXTRACTED", "INFERRED"]);
25822
- const CodeGraphEdgeClass = require_Schema$1.Literals([
25823
- "containment",
25824
- "dependency",
25825
- "behavior"
25826
- ]);
25827
- /**
25828
- * Relation to drawn class. Exhaustive over CODE_GRAPH_RELATIONS by construction
25829
- * — `codeGraph.test.ts` fails if a relation is added without a class.
25830
- */
25831
- const CODE_GRAPH_RELATION_CLASS = {
25832
- contains: "containment",
25833
- method: "containment",
25834
- imports: "dependency",
25835
- imports_from: "dependency",
25836
- re_exports: "dependency",
25837
- dynamic_import: "dependency",
25838
- inherits: "dependency",
25839
- implements: "dependency",
25840
- calls: "behavior",
25841
- indirect_call: "behavior",
25842
- references: "behavior",
25843
- triggers: "behavior",
25844
- cites: "behavior",
25845
- rationale_for: "behavior"
25846
- };
25847
- const CodeGraphNodeKind = require_Schema$1.Literals(["file", "symbol"]);
25848
- /**
25849
- * One community, positioned.
25850
- *
25851
- * Positions are computed server-side and are stable for a given graph build, so
25852
- * the map does not rearrange itself between openings. A map you have to re-learn
25853
- * every time is not a map.
25854
- */
25855
- const CodeGraphRegion = require_Schema$1.Struct({
25856
- id: NonNegativeInt,
25857
- label: TrimmedNonEmptyString,
25858
- nodeCount: PositiveInt,
25859
- x: require_Schema$1.Number,
25860
- y: require_Schema$1.Number
25861
- });
25862
- /** An aggregated edge between two regions, weighted by how many edges cross. */
25863
- const CodeGraphRegionLink = require_Schema$1.Struct({
25864
- source: NonNegativeInt,
25865
- target: NonNegativeInt,
25866
- weight: PositiveInt
25867
- });
25868
- /**
25869
- * The default view: the whole repository as ~120 named regions.
25870
- *
25871
- * `truncatedRegions` is not decoration. When a graph has more regions than the
25872
- * map shows, the surface says so — a view that silently drops a third of the
25873
- * codebase while looking complete is the failure mode this field exists to
25874
- * prevent.
25875
- */
25876
- const CodeGraphSummary = require_Schema$1.Struct({
25877
- repoLabel: TrimmedNonEmptyString,
25878
- builtAtCommit: require_Schema$1.NullOr(require_Schema$1.String),
25879
- nodeCount: NonNegativeInt,
25880
- edgeCount: NonNegativeInt,
25881
- extractedEdgeCount: NonNegativeInt,
25882
- inferredEdgeCount: NonNegativeInt,
25883
- regionCount: NonNegativeInt,
25884
- regions: require_Schema$1.ArraySchema(CodeGraphRegion),
25885
- links: require_Schema$1.ArraySchema(CodeGraphRegionLink),
25886
- truncatedRegions: NonNegativeInt
25887
- });
25888
- /** A node as it appears in a list, a search result, or a neighborhood. */
25889
- const CodeGraphNodeSummary = require_Schema$1.Struct({
25890
- id: TrimmedNonEmptyString,
25891
- label: TrimmedNonEmptyString,
25892
- kind: CodeGraphNodeKind,
25893
- sourceFile: require_Schema$1.NullOr(require_Schema$1.String),
25894
- sourceLocation: require_Schema$1.NullOr(require_Schema$1.String),
25895
- regionId: require_Schema$1.NullOr(NonNegativeInt),
25896
- regionLabel: require_Schema$1.NullOr(require_Schema$1.String),
25897
- degree: NonNegativeInt
25898
- });
25899
- /** One edge, carrying both the exact relation and the class it is drawn as. */
25900
- const CodeGraphEdgeView = require_Schema$1.Struct({
25901
- source: TrimmedNonEmptyString,
25902
- target: TrimmedNonEmptyString,
25903
- relation: CodeGraphRelation,
25904
- edgeClass: CodeGraphEdgeClass,
25905
- confidence: CodeGraphConfidence,
25906
- confidenceScore: require_Schema$1.Number
25907
- });
25908
- /**
25909
- * One node and what surrounds it — the view a person actually works in.
25910
- *
25911
- * `truncated` fires when a hub's fan-out exceeds the cap. A god node with
25912
- * thousands of edges must degrade to "showing 150 of 2,310", never to a frozen
25913
- * tab or a quietly partial picture.
25914
- */
25915
- const CodeGraphNeighborhood = require_Schema$1.Struct({
25916
- root: CodeGraphNodeSummary,
25917
- nodes: require_Schema$1.ArraySchema(CodeGraphNodeSummary),
25918
- edges: require_Schema$1.ArraySchema(CodeGraphEdgeView),
25919
- depth: PositiveInt,
25920
- truncated: require_Schema$1.Boolean,
25921
- omittedCount: NonNegativeInt
25922
- });
25923
- const CodeGraphSearchResult = require_Schema$1.Struct({
25924
- nodes: require_Schema$1.ArraySchema(CodeGraphNodeSummary),
25925
- truncated: require_Schema$1.Boolean
25926
- });
25927
- const CodeGraphSummaryInput = require_Schema$1.Struct({ cwd: TrimmedNonEmptyString });
25928
- const CodeGraphNeighborhoodInput = require_Schema$1.Struct({
25929
- cwd: TrimmedNonEmptyString,
25930
- nodeId: TrimmedNonEmptyString,
25931
- depth: require_Schema$1.optional(PositiveInt)
25932
- });
25933
- const CodeGraphSearchInput = require_Schema$1.Struct({
25934
- cwd: TrimmedNonEmptyString,
25935
- query: TrimmedNonEmptyString,
25936
- limit: require_Schema$1.optional(PositiveInt)
25937
- });
25938
- /** Where the extractor writes, relative to the project root. */
25939
- const CODE_GRAPH_ARTIFACT_PATH = "graphify-out/graph.json";
25940
- /**
25941
- * No graph in this checkout, or one that cannot be read.
25942
- *
25943
- * Distinct from a read failure on purpose: "not indexed yet" is the normal
25944
- * first-run state and gets an action, while a malformed or unreadable artifact
25945
- * is a fault and gets an explanation. Collapsing them would tell a user with a
25946
- * corrupt file to run a build they have already run.
25947
- */
25948
- var CodeGraphUnavailableError = class extends require_Schema$1.TaggedErrorClass()("CodeGraphUnavailableError", {
25949
- reason: require_Schema$1.Literals([
25950
- "missing",
25951
- "unreadable",
25952
- "malformed",
25953
- "lfs-pointer"
25954
- ]),
25955
- message: require_Schema$1.String
25956
- }) {};
25957
- /** A node id that is not in this graph — usually a stale link into a rebuilt graph. */
25958
- var CodeGraphNodeNotFoundError = class extends require_Schema$1.TaggedErrorClass()("CodeGraphNodeNotFoundError", { nodeId: require_Schema$1.String }) {};
25959
25805
  //#endregion
25960
25806
  //#region ../../packages/contracts/src/relay.ts
25961
25807
  const RELAY_PROTOCOL_FAMILY = "forge-relay";
@@ -26342,9 +26188,6 @@ const WS_METHODS = {
26342
26188
  projectsWriteFile: "projects.writeFile",
26343
26189
  projectCheckoutDeletionPreview: "projectCheckoutDeletion.preview",
26344
26190
  projectCheckoutDeletionExecute: "projectCheckoutDeletion.execute",
26345
- codeGraphSummary: "codeGraph.summary",
26346
- codeGraphNeighborhood: "codeGraph.neighborhood",
26347
- codeGraphSearch: "codeGraph.search",
26348
26191
  workspaceReadFile: "workspace.readFile",
26349
26192
  workspaceBeginWriteFile: "workspace.beginWriteFile",
26350
26193
  workspaceWriteFileChunk: "workspace.writeFileChunk",
@@ -26630,21 +26473,6 @@ const WsProjectCheckoutDeletionExecuteRpc = make$30(WS_METHODS.projectCheckoutDe
26630
26473
  payload: ProjectCheckoutDeletionExecuteInput,
26631
26474
  success: ProjectCheckoutDeletionResult
26632
26475
  });
26633
- const WsCodeGraphSummaryRpc = make$30(WS_METHODS.codeGraphSummary, {
26634
- payload: CodeGraphSummaryInput,
26635
- success: CodeGraphSummary,
26636
- error: CodeGraphUnavailableError
26637
- });
26638
- const WsCodeGraphNeighborhoodRpc = make$30(WS_METHODS.codeGraphNeighborhood, {
26639
- payload: CodeGraphNeighborhoodInput,
26640
- success: CodeGraphNeighborhood,
26641
- error: require_Schema$1.Union([CodeGraphUnavailableError, CodeGraphNodeNotFoundError])
26642
- });
26643
- const WsCodeGraphSearchRpc = make$30(WS_METHODS.codeGraphSearch, {
26644
- payload: CodeGraphSearchInput,
26645
- success: CodeGraphSearchResult,
26646
- error: CodeGraphUnavailableError
26647
- });
26648
26476
  const WsWorkspaceReadFileRpc = make$30(WS_METHODS.workspaceReadFile, {
26649
26477
  payload: BulkTransferReadFileInput,
26650
26478
  success: BulkTransferStreamEvent,
@@ -27094,7 +26922,7 @@ const WsRpcGroup = make$29(WsServerGetConfigRpc, WsServerRefreshProvidersRpc, Ws
27094
26922
  payload: UsageSummaryInput,
27095
26923
  success: UsageSummary,
27096
26924
  error: UsageReadError
27097
- }), WsPullRequestsListRpc, WsPullRequestsListStatsRpc, WsPullRequestsDetailRpc, WsPullRequestsActivityRpc, WsPullRequestsThreadCommentsRpc, WsPullRequestsDiffFileContentsRpc, WsPullRequestsRunActionRpc, WsPullRequestsUpdateRpc, WsPullRequestsCommentRpc, WsPullRequestsUpdateCommentRpc, WsPullRequestsSubmitReviewRpc, WsPullRequestsReplyToThreadRpc, WsPullRequestsSetThreadResolutionRpc, WsPullRequestsSetReactionRpc, WsPullRequestsInvalidateRpc, WsPullRequestsReviewerCandidatesRpc, WsPullRequestsRequestReviewersRpc, WsProjectsSearchContentsRpc, WsProjectsSearchEntriesRpc, WsProjectsWriteFileRpc, WsProjectCheckoutDeletionPreviewRpc, WsProjectCheckoutDeletionExecuteRpc, WsCodeGraphSummaryRpc, WsCodeGraphNeighborhoodRpc, WsCodeGraphSearchRpc, WsWorkspaceReadFileRpc, WsWorkspaceBeginWriteFileRpc, WsWorkspaceWriteFileChunkRpc, WsWorkspaceCommitWriteFileRpc, WsWorkspaceCancelWriteFileRpc, WsShellOpenInEditorRpc, WsSubscribeGitStatusRpc, WsGitPullRpc, WsGitRefreshStatusRpc, WsGitRunStackedActionRpc, WsGitResolvePullRequestRpc, WsGitPreparePullRequestThreadRpc, WsGitListBranchesRpc, WsVcsListRefsRpc, WsVcsRefreshStatusRpc, WsSubscribeVcsStatusRpc, WsVcsPullRpc, WsVcsCreateWorktreeRpc, WsVcsRemoveWorktreeRpc, WsVcsCreateRefRpc, WsVcsSwitchRefRpc, WsVcsInitRpc, WsGitCreateWorktreeRpc, WsGitRemoveWorktreeRpc, WsGitCreateBranchRpc, WsGitCheckoutRpc, WsGitInitRpc, WsFilesystemBrowseRpc, WsProjectsReadFileRpc, WsReviewGetDiffPreviewRpc, WsCloudListRuntimesRpc, WsTerminalOpenRpc, WsTerminalAttachRpc, WsTerminalWriteRpc, WsTerminalResizeRpc, WsTerminalSignalRpc, WsTerminalClearRpc, WsTerminalRestartRpc, WsTerminalCloseRpc, WsBrowserOpenSessionRpc, WsBrowserListSessionsRpc, WsBrowserCloseSessionRpc, WsBrowserGetSessionRpc, WsBrowserCommandRpc, WsBrowserClearBrowsingDataRpc, WsBrowserAttachDisplayRpc, WsBrowserAddDisplayIceCandidateRpc, WsComputerInputRpc, WsDevTunnelRegisterRpc, WsDevTunnelUnregisterRpc, WsDevTunnelListRpc, WsThreadDevRuntimeGetRpc, WsThreadDevRuntimeAllocatePortRpc, WsThreadDevRuntimeReleaseRpc, WsWorkspaceEnvironmentPreflightRpc, WsWorkspaceEnsureScratchRpc, WsSubscribeTerminalEventsRpc, WsSubscribeTerminalMetadataRpc, WsProjectsListEntriesRpc, WsServerDiscoverSourceControlRpc, WsServerReportClientActivityRpc, WsSubscribeBrowserEventsRpc, WsSubscribeServerConfigRpc, WsSubscribeServerLifecycleRpc, WsSubscribeAuthAccessRpc, WsSubscribeWorkspaceReadinessRpc, WsOrchestrationDispatchCommandRpc, WsOrchestrationGetTurnDiffRpc, WsOrchestrationGetFullThreadDiffRpc, WsOrchestrationStreamTurnDiffRpc, WsOrchestrationStreamFullThreadDiffRpc, WsOrchestrationReplayEventsRpc, WsOrchestrationGetArchivedShellSnapshotRpc, WsOrchestrationSubscribeShellRpc, WsOrchestrationSubscribeThreadRpc, make$30(WS_METHODS.assetsCreateUrl, {
26925
+ }), WsPullRequestsListRpc, WsPullRequestsListStatsRpc, WsPullRequestsDetailRpc, WsPullRequestsActivityRpc, WsPullRequestsThreadCommentsRpc, WsPullRequestsDiffFileContentsRpc, WsPullRequestsRunActionRpc, WsPullRequestsUpdateRpc, WsPullRequestsCommentRpc, WsPullRequestsUpdateCommentRpc, WsPullRequestsSubmitReviewRpc, WsPullRequestsReplyToThreadRpc, WsPullRequestsSetThreadResolutionRpc, WsPullRequestsSetReactionRpc, WsPullRequestsInvalidateRpc, WsPullRequestsReviewerCandidatesRpc, WsPullRequestsRequestReviewersRpc, WsProjectsSearchContentsRpc, WsProjectsSearchEntriesRpc, WsProjectsWriteFileRpc, WsProjectCheckoutDeletionPreviewRpc, WsProjectCheckoutDeletionExecuteRpc, WsWorkspaceReadFileRpc, WsWorkspaceBeginWriteFileRpc, WsWorkspaceWriteFileChunkRpc, WsWorkspaceCommitWriteFileRpc, WsWorkspaceCancelWriteFileRpc, WsShellOpenInEditorRpc, WsSubscribeGitStatusRpc, WsGitPullRpc, WsGitRefreshStatusRpc, WsGitRunStackedActionRpc, WsGitResolvePullRequestRpc, WsGitPreparePullRequestThreadRpc, WsGitListBranchesRpc, WsVcsListRefsRpc, WsVcsRefreshStatusRpc, WsSubscribeVcsStatusRpc, WsVcsPullRpc, WsVcsCreateWorktreeRpc, WsVcsRemoveWorktreeRpc, WsVcsCreateRefRpc, WsVcsSwitchRefRpc, WsVcsInitRpc, WsGitCreateWorktreeRpc, WsGitRemoveWorktreeRpc, WsGitCreateBranchRpc, WsGitCheckoutRpc, WsGitInitRpc, WsFilesystemBrowseRpc, WsProjectsReadFileRpc, WsReviewGetDiffPreviewRpc, WsCloudListRuntimesRpc, WsTerminalOpenRpc, WsTerminalAttachRpc, WsTerminalWriteRpc, WsTerminalResizeRpc, WsTerminalSignalRpc, WsTerminalClearRpc, WsTerminalRestartRpc, WsTerminalCloseRpc, WsBrowserOpenSessionRpc, WsBrowserListSessionsRpc, WsBrowserCloseSessionRpc, WsBrowserGetSessionRpc, WsBrowserCommandRpc, WsBrowserClearBrowsingDataRpc, WsBrowserAttachDisplayRpc, WsBrowserAddDisplayIceCandidateRpc, WsComputerInputRpc, WsDevTunnelRegisterRpc, WsDevTunnelUnregisterRpc, WsDevTunnelListRpc, WsThreadDevRuntimeGetRpc, WsThreadDevRuntimeAllocatePortRpc, WsThreadDevRuntimeReleaseRpc, WsWorkspaceEnvironmentPreflightRpc, WsWorkspaceEnsureScratchRpc, WsSubscribeTerminalEventsRpc, WsSubscribeTerminalMetadataRpc, WsProjectsListEntriesRpc, WsServerDiscoverSourceControlRpc, WsServerReportClientActivityRpc, WsSubscribeBrowserEventsRpc, WsSubscribeServerConfigRpc, WsSubscribeServerLifecycleRpc, WsSubscribeAuthAccessRpc, WsSubscribeWorkspaceReadinessRpc, WsOrchestrationDispatchCommandRpc, WsOrchestrationGetTurnDiffRpc, WsOrchestrationGetFullThreadDiffRpc, WsOrchestrationStreamTurnDiffRpc, WsOrchestrationStreamFullThreadDiffRpc, WsOrchestrationReplayEventsRpc, WsOrchestrationGetArchivedShellSnapshotRpc, WsOrchestrationSubscribeShellRpc, WsOrchestrationSubscribeThreadRpc, make$30(WS_METHODS.assetsCreateUrl, {
27098
26926
  payload: AssetsRpcSchemas.createUrl.input,
27099
26927
  success: AssetsRpcSchemas.createUrl.output,
27100
26928
  error: AssetAccessError
@@ -31791,21 +31619,6 @@ const RELAY_METHOD_POLICY_BASES = [
31791
31619
  requiredScope: "runtime.read",
31792
31620
  deliveryClass: "read"
31793
31621
  },
31794
- {
31795
- method: WS_METHODS.codeGraphSummary,
31796
- requiredScope: "workspace.read",
31797
- deliveryClass: "read"
31798
- },
31799
- {
31800
- method: WS_METHODS.codeGraphNeighborhood,
31801
- requiredScope: "workspace.read",
31802
- deliveryClass: "read"
31803
- },
31804
- {
31805
- method: WS_METHODS.codeGraphSearch,
31806
- requiredScope: "workspace.read",
31807
- deliveryClass: "read"
31808
- },
31809
31622
  {
31810
31623
  method: WS_METHODS.projectsWriteFile,
31811
31624
  requiredScope: "workspace.write",
@@ -51315,21 +51128,21 @@ var require_module_details_from_path = /* @__PURE__ */ require_chunk.__commonJSM
51315
51128
  var lastBaseDirSegmentIndex = index + offset - 1;
51316
51129
  for (var i = 0; i <= lastBaseDirSegmentIndex; i++) if (i === lastBaseDirSegmentIndex) basedir += segments[i];
51317
51130
  else basedir += segments[i] + sep$2;
51318
- var path$18 = "";
51131
+ var path$17 = "";
51319
51132
  var lastSegmentIndex = segments.length - 1;
51320
- for (var i2 = index + offset; i2 <= lastSegmentIndex; i2++) if (i2 === lastSegmentIndex) path$18 += segments[i2];
51321
- else path$18 += segments[i2] + sep$2;
51133
+ for (var i2 = index + offset; i2 <= lastSegmentIndex; i2++) if (i2 === lastSegmentIndex) path$17 += segments[i2];
51134
+ else path$17 += segments[i2] + sep$2;
51322
51135
  return {
51323
51136
  name,
51324
51137
  basedir,
51325
- path: path$18
51138
+ path: path$17
51326
51139
  };
51327
51140
  };
51328
51141
  }));
51329
51142
  //#endregion
51330
51143
  //#region ../../node_modules/.bun/require-in-the-middle@8.0.1/node_modules/require-in-the-middle/index.js
51331
51144
  var require_require_in_the_middle = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
51332
- const path$17 = require("path");
51145
+ const path$16 = require("path");
51333
51146
  const Module = require("module");
51334
51147
  const debug = require_src$5()("require-in-the-middle");
51335
51148
  const moduleDetailsFromPath = require_module_details_from_path();
@@ -51460,7 +51273,7 @@ var require_require_in_the_middle = /* @__PURE__ */ require_chunk.__commonJSMin(
51460
51273
  }
51461
51274
  moduleName = filename;
51462
51275
  } else if (hasWhitelist === true && modules.includes(filename)) {
51463
- const parsedPath = path$17.parse(filename);
51276
+ const parsedPath = path$16.parse(filename);
51464
51277
  moduleName = parsedPath.name;
51465
51278
  basedir = parsedPath.dir;
51466
51279
  } else {
@@ -51495,7 +51308,7 @@ var require_require_in_the_middle = /* @__PURE__ */ require_chunk.__commonJSMin(
51495
51308
  return exports$12;
51496
51309
  }
51497
51310
  if (res !== filename) if (internals === true) {
51498
- moduleName = moduleName + path$17.sep + path$17.relative(basedir, filename);
51311
+ moduleName = moduleName + path$16.sep + path$16.relative(basedir, filename);
51499
51312
  debug("preparing to process require of internal file: %s", moduleName);
51500
51313
  } else {
51501
51314
  debug("ignoring require of non-main module file: %s", res);
@@ -51524,8 +51337,8 @@ var require_require_in_the_middle = /* @__PURE__ */ require_chunk.__commonJSMin(
51524
51337
  } else debug("process.getBuiltinModule unhook unsuccessful");
51525
51338
  };
51526
51339
  function resolveModuleName(stat) {
51527
- const normalizedPath = path$17.sep !== "/" ? stat.path.split(path$17.sep).join("/") : stat.path;
51528
- return path$17.posix.join(stat.name, normalizedPath).replace(normalize, "");
51340
+ const normalizedPath = path$16.sep !== "/" ? stat.path.split(path$16.sep).join("/") : stat.path;
51341
+ return path$16.posix.join(stat.name, normalizedPath).replace(normalize, "");
51529
51342
  }
51530
51343
  }));
51531
51344
  //#endregion
@@ -51603,7 +51416,7 @@ var require_RequireInTheMiddleSingleton = /* @__PURE__ */ require_chunk.__common
51603
51416
  Object.defineProperty(exports, "__esModule", { value: true });
51604
51417
  exports.RequireInTheMiddleSingleton = void 0;
51605
51418
  const require_in_the_middle_1 = require_require_in_the_middle();
51606
- const path$16 = require("path");
51419
+ const path$15 = require("path");
51607
51420
  const ModuleNameTrie_1 = require_ModuleNameTrie();
51608
51421
  /**
51609
51422
  * Whether Mocha is running in this process
@@ -51670,7 +51483,7 @@ var require_RequireInTheMiddleSingleton = /* @__PURE__ */ require_chunk.__common
51670
51483
  * @returns {string} Normalized module name or path
51671
51484
  */
51672
51485
  function normalizePathSeparators(moduleNameOrPath) {
51673
- return path$16.sep !== ModuleNameTrie_1.ModuleNameSeparator ? moduleNameOrPath.split(path$16.sep).join(ModuleNameTrie_1.ModuleNameSeparator) : moduleNameOrPath;
51486
+ return path$15.sep !== ModuleNameTrie_1.ModuleNameSeparator ? moduleNameOrPath.split(path$15.sep).join(ModuleNameTrie_1.ModuleNameSeparator) : moduleNameOrPath;
51674
51487
  }
51675
51488
  }));
51676
51489
  //#endregion
@@ -51721,7 +51534,7 @@ var require_register = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) =>
51721
51534
  //#endregion
51722
51535
  //#region ../../node_modules/.bun/import-in-the-middle@3.0.1/node_modules/import-in-the-middle/index.js
51723
51536
  var require_import_in_the_middle = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
51724
- const path$15 = require("path");
51537
+ const path$14 = require("path");
51725
51538
  const moduleDetailsFromPath = require_module_details_from_path();
51726
51539
  const { fileURLToPath } = require("url");
51727
51540
  const { MessageChannel } = require("worker_threads");
@@ -51864,7 +51677,7 @@ var require_import_in_the_middle = /* @__PURE__ */ require_chunk.__commonJSMin((
51864
51677
  if (!baseDir) callHookFn(hookFn, namespace, name, baseDir);
51865
51678
  else if (baseDir.endsWith(specifiers.get(loadUrl)) || isTurbopackSpecifier(specifiers.get(loadUrl), baseDir)) callHookFn(hookFn, namespace, name, baseDir);
51866
51679
  else if (internals) {
51867
- const internalPath = name + path$15.sep + path$15.relative(baseDir, filePath);
51680
+ const internalPath = name + path$14.sep + path$14.relative(baseDir, filePath);
51868
51681
  callHookFn(hookFn, namespace, internalPath, baseDir);
51869
51682
  }
51870
51683
  } else if (matchArg === specifier) callHookFn(hookFn, namespace, specifier, baseDir);
@@ -51938,7 +51751,7 @@ var require_utils$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) =>
51938
51751
  var require_instrumentation = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) => {
51939
51752
  Object.defineProperty(exports, "__esModule", { value: true });
51940
51753
  exports.InstrumentationBase = void 0;
51941
- const path$14 = require("path");
51754
+ const path$13 = require("path");
51942
51755
  const util_1$4 = require("util");
51943
51756
  const semver_1 = require_semver();
51944
51757
  const shimmer_1 = require_shimmer();
@@ -52020,7 +51833,7 @@ var require_instrumentation = /* @__PURE__ */ require_chunk.__commonJSMin(((expo
52020
51833
  }
52021
51834
  _extractPackageVersion(baseDir) {
52022
51835
  try {
52023
- const json = (0, fs_1.readFileSync)(path$14.join(baseDir, "package.json"), { encoding: "utf8" });
51836
+ const json = (0, fs_1.readFileSync)(path$13.join(baseDir, "package.json"), { encoding: "utf8" });
52024
51837
  const version = JSON.parse(json).version;
52025
51838
  return typeof version === "string" ? version : void 0;
52026
51839
  } catch {
@@ -52057,7 +51870,7 @@ var require_instrumentation = /* @__PURE__ */ require_chunk.__commonJSMin(((expo
52057
51870
  return exports$7;
52058
51871
  }
52059
51872
  const files = module$4.files ?? [];
52060
- const normalizedName = path$14.normalize(name);
51873
+ const normalizedName = path$13.normalize(name);
52061
51874
  return files.filter((f) => f.name === normalizedName && isSupported(f.supportedVersions, version, module$4.includePrerelease)).reduce((patchedExports, file) => {
52062
51875
  file.moduleExports = patchedExports;
52063
51876
  if (this._enabled) {
@@ -52098,8 +51911,8 @@ var require_instrumentation = /* @__PURE__ */ require_chunk.__commonJSMin(((expo
52098
51911
  this._warnOnPreloadedModules();
52099
51912
  for (const module$6 of this._modules) {
52100
51913
  const hookFn = (exports$8, name, baseDir) => {
52101
- if (!baseDir && path$14.isAbsolute(name)) {
52102
- const parsedPath = path$14.parse(name);
51914
+ if (!baseDir && path$13.isAbsolute(name)) {
51915
+ const parsedPath = path$13.parse(name);
52103
51916
  name = parsedPath.name;
52104
51917
  baseDir = parsedPath.dir;
52105
51918
  }
@@ -52108,7 +51921,7 @@ var require_instrumentation = /* @__PURE__ */ require_chunk.__commonJSMin(((expo
52108
51921
  const onRequire = (exports$9, name, baseDir) => {
52109
51922
  return this._onRequire(module$6, exports$9, name, baseDir);
52110
51923
  };
52111
- const hook = path$14.isAbsolute(module$6.name) ? new require_in_the_middle_1.Hook([module$6.name], { internals: true }, onRequire) : this._requireInTheMiddleSingleton.register(module$6.name, onRequire);
51924
+ const hook = path$13.isAbsolute(module$6.name) ? new require_in_the_middle_1.Hook([module$6.name], { internals: true }, onRequire) : this._requireInTheMiddleSingleton.register(module$6.name, onRequire);
52112
51925
  this._hooks.push(hook);
52113
51926
  const esmHook = new import_in_the_middle_1.Hook([module$6.name], { internals: true }, hookFn);
52114
51927
  this._hooks.push(esmHook);
@@ -66418,7 +66231,7 @@ function normalizeNumberish(value) {
66418
66231
  }
66419
66232
  //#endregion
66420
66233
  //#region package.json
66421
- var version$1 = "0.13.16";
66234
+ var version$1 = "0.13.18";
66422
66235
  //#endregion
66423
66236
  //#region src/sentry.ts
66424
66237
  const SERVER_APP_NAME = "forge-server";
@@ -67456,7 +67269,7 @@ function toPersistenceDecodeDefect(operation) {
67456
67269
  const isPersistenceError = (u) => require_Schema$1.is(PersistenceSqlError)(u) || require_Schema$1.is(PersistenceDecodeError)(u);
67457
67270
  //#endregion
67458
67271
  //#region src/cmmdConnection/CmmdConnectionStore.ts
67459
- const cache$1 = /* @__PURE__ */ new Map();
67272
+ const cache = /* @__PURE__ */ new Map();
67460
67273
  const jwtCache = /* @__PURE__ */ new Map();
67461
67274
  const jwtExpiryCache = /* @__PURE__ */ new Map();
67462
67275
  const refreshTokenCache = /* @__PURE__ */ new Map();
@@ -67597,7 +67410,7 @@ const hydrateCommandAccessTokenStore = require_Schema$1.gen(function* () {
67597
67410
  session_grant AS "sessionGrant"
67598
67411
  FROM command_access_tokens
67599
67412
  `.pipe(require_Schema$1.mapError(toPersistenceSqlError("CommandAccessTokenStore.hydrate:query")))).pipe(require_Schema$1.mapError(toPersistenceDecodeError("CommandAccessTokenStore.hydrate:decodeRows")));
67600
- cache$1.clear();
67413
+ cache.clear();
67601
67414
  jwtCache.clear();
67602
67415
  jwtExpiryCache.clear();
67603
67416
  refreshTokenCache.clear();
@@ -67607,7 +67420,7 @@ const hydrateCommandAccessTokenStore = require_Schema$1.gen(function* () {
67607
67420
  try: () => {
67608
67421
  for (const row of decoded) {
67609
67422
  const sessionId = row.sessionId;
67610
- cache$1.set(sessionId, decodeSensitiveValue(ACCESS_TOKEN_SCOPE, row.accessToken));
67423
+ cache.set(sessionId, decodeSensitiveValue(ACCESS_TOKEN_SCOPE, row.accessToken));
67611
67424
  const jwtToken = decryptNullable(JWT_TOKEN_SCOPE, row.jwtToken);
67612
67425
  if (jwtToken) jwtCache.set(sessionId, jwtToken);
67613
67426
  if (row.jwtExpiresAt) jwtExpiryCache.set(sessionId, row.jwtExpiresAt);
@@ -67627,7 +67440,7 @@ const hydrateCommandAccessTokenStore = require_Schema$1.gen(function* () {
67627
67440
  * Returns `null` when the session has no paired CMMD token.
67628
67441
  */
67629
67442
  function readCommandAccessTokenForSession(sessionId) {
67630
- return cache$1.get(sessionId) ?? null;
67443
+ return cache.get(sessionId) ?? null;
67631
67444
  }
67632
67445
  const threadSessions = /* @__PURE__ */ new Map();
67633
67446
  /**
@@ -68004,7 +67817,7 @@ const promoteMostRecentOwnerCommandAuthToSession = (sessionId) => require_Schema
68004
67817
  cmmd_user_identity = excluded.cmmd_user_identity,
68005
67818
  updated_at = excluded.updated_at
68006
67819
  `.pipe(require_Schema$1.mapError(toPersistenceSqlError("CommandAccessTokenStore.promoteLatestOwnerAuth:upsert")));
68007
- cache$1.set(sessionId, accessToken);
67820
+ cache.set(sessionId, accessToken);
68008
67821
  if (jwtToken) jwtCache.set(sessionId, jwtToken);
68009
67822
  else jwtCache.delete(sessionId);
68010
67823
  if (row.jwtExpiresAt) jwtExpiryCache.set(sessionId, row.jwtExpiresAt);
@@ -68049,7 +67862,7 @@ const setCommandAccessTokenForSession = (sessionId, accessToken) => require_Sche
68049
67862
  access_token = excluded.access_token,
68050
67863
  updated_at = excluded.updated_at
68051
67864
  `.pipe(require_Schema$1.mapError(toPersistenceSqlError("CommandAccessTokenStore.set:query")));
68052
- cache$1.set(sessionId, token);
67865
+ cache.set(sessionId, token);
68053
67866
  });
68054
67867
  /**
68055
67868
  * Remove the PAT for a session from both durable persistence and the in-memory cache.
@@ -68062,7 +67875,7 @@ const clearCommandAccessTokenForSession = (sessionId) => require_Schema$1.gen(fu
68062
67875
  forgetCommandAccessTokenCachesForSession(sessionId);
68063
67876
  });
68064
67877
  function forgetCommandAccessTokenCachesForSession(sessionId) {
68065
- cache$1.delete(sessionId);
67878
+ cache.delete(sessionId);
68066
67879
  jwtCache.delete(sessionId);
68067
67880
  jwtExpiryCache.delete(sessionId);
68068
67881
  refreshTokenCache.delete(sessionId);
@@ -76295,7 +76108,7 @@ var require_detect_libc = /* @__PURE__ */ require_chunk.__commonJSMin(((exports,
76295
76108
  //#region ../../node_modules/.bun/node-gyp-build-optional-packages@5.2.2/node_modules/node-gyp-build-optional-packages/node-gyp-build.js
76296
76109
  var require_node_gyp_build = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
76297
76110
  var fs$8 = require("fs");
76298
- var path$12 = require("path");
76111
+ var path$11 = require("path");
76299
76112
  var url$2 = require("url");
76300
76113
  var os$3 = require("os");
76301
76114
  var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : require;
@@ -76315,30 +76128,30 @@ var require_node_gyp_build = /* @__PURE__ */ require_chunk.__commonJSMin(((expor
76315
76128
  return runtimeRequire(load.resolve(dir));
76316
76129
  }
76317
76130
  load.resolve = load.path = function(dir) {
76318
- dir = path$12.resolve(dir || ".");
76131
+ dir = path$11.resolve(dir || ".");
76319
76132
  var packageName = "";
76320
76133
  var packageNameError;
76321
76134
  try {
76322
- packageName = runtimeRequire(path$12.join(dir, "package.json")).name;
76135
+ packageName = runtimeRequire(path$11.join(dir, "package.json")).name;
76323
76136
  var varName = packageName.toUpperCase().replace(/-/g, "_");
76324
76137
  if (process.env[varName + "_PREBUILD"]) dir = process.env[varName + "_PREBUILD"];
76325
76138
  } catch (err) {
76326
76139
  packageNameError = err;
76327
76140
  }
76328
76141
  if (!prebuildsOnly) {
76329
- var release = getFirst(path$12.join(dir, "build/Release"), matchBuild);
76142
+ var release = getFirst(path$11.join(dir, "build/Release"), matchBuild);
76330
76143
  if (release) return release;
76331
- var debug = getFirst(path$12.join(dir, "build/Debug"), matchBuild);
76144
+ var debug = getFirst(path$11.join(dir, "build/Debug"), matchBuild);
76332
76145
  if (debug) return debug;
76333
76146
  }
76334
76147
  var prebuild = resolve(dir);
76335
76148
  if (prebuild) return prebuild;
76336
- var nearby = resolve(path$12.dirname(process.execPath));
76149
+ var nearby = resolve(path$11.dirname(process.execPath));
76337
76150
  if (nearby) return nearby;
76338
76151
  var platformPackage = (packageName[0] == "@" ? "" : "@" + packageName + "/") + packageName + "-" + platform + "-" + arch;
76339
76152
  var packageResolutionError;
76340
76153
  try {
76341
- return resolveFile(path$12.dirname(require("module").createRequire(url$2.pathToFileURL(path$12.join(dir, "package.json"))).resolve(platformPackage)));
76154
+ return resolveFile(path$11.dirname(require("module").createRequire(url$2.pathToFileURL(path$11.join(dir, "package.json"))).resolve(platformPackage)));
76342
76155
  } catch (error) {
76343
76156
  packageResolutionError = error;
76344
76157
  }
@@ -76358,13 +76171,13 @@ var require_node_gyp_build = /* @__PURE__ */ require_chunk.__commonJSMin(((expor
76358
76171
  if (packageResolutionError) errMessage += "Error resolving package: " + packageResolutionError.message + "\n";
76359
76172
  throw new Error(errMessage);
76360
76173
  function resolve(dir) {
76361
- var tuple = readdirSync(path$12.join(dir, "prebuilds")).map(parseTuple).filter(matchTuple(platform, arch)).sort(compareTuples)[0];
76174
+ var tuple = readdirSync(path$11.join(dir, "prebuilds")).map(parseTuple).filter(matchTuple(platform, arch)).sort(compareTuples)[0];
76362
76175
  if (!tuple) return;
76363
- return resolveFile(path$12.join(dir, "prebuilds", tuple.name));
76176
+ return resolveFile(path$11.join(dir, "prebuilds", tuple.name));
76364
76177
  }
76365
76178
  function resolveFile(prebuilds) {
76366
76179
  var winner = readdirSync(prebuilds).map(parseTags).filter(matchTags(runtime, abi)).sort(compareTags(runtime))[0];
76367
- if (winner) return path$12.join(prebuilds, winner.file);
76180
+ if (winner) return path$11.join(prebuilds, winner.file);
76368
76181
  }
76369
76182
  };
76370
76183
  function readdirSync(dir) {
@@ -76376,7 +76189,7 @@ var require_node_gyp_build = /* @__PURE__ */ require_chunk.__commonJSMin(((expor
76376
76189
  }
76377
76190
  function getFirst(dir, filter) {
76378
76191
  var files = readdirSync(dir).filter(filter);
76379
- return files[0] && path$12.join(dir, files[0]);
76192
+ return files[0] && path$11.join(dir, files[0]);
76380
76193
  }
76381
76194
  function matchBuild(name) {
76382
76195
  return /\.node$/.test(name);
@@ -77646,500 +77459,6 @@ const makeSocketProtocol = /* @__PURE__ */ require_Schema$1.gen(function* () {
77646
77459
  };
77647
77460
  });
77648
77461
  //#endregion
77649
- //#region src/codeGraph/aggregate.ts
77650
- /**
77651
- * Turning a 26 MB graph into slices small enough to draw.
77652
- *
77653
- * Pure functions over an already-parsed graph, deliberately free of Effect, the
77654
- * filesystem and the RPC layer, so the interesting parts — capping, ranking,
77655
- * hub suppression — are testable without a runtime or a fixture file on disk.
77656
- *
77657
- * The whole module exists because of one number: this repo's graph is 34,102
77658
- * nodes and 86,347 edges. Nothing here ever returns more than a few hundred of
77659
- * either. A view that tries to show everything shows nothing.
77660
- */
77661
- function pushInto(map, key, link) {
77662
- const existing = map.get(key);
77663
- if (existing === void 0) {
77664
- map.set(key, [link]);
77665
- return;
77666
- }
77667
- existing.push(link);
77668
- }
77669
- function isKnownRelation(relation) {
77670
- return Object.hasOwn(CODE_GRAPH_RELATION_CLASS, relation);
77671
- }
77672
- /**
77673
- * Index a parsed graph once so every later query is a map lookup.
77674
- *
77675
- * Edges naming a node the artifact does not define are dropped rather than
77676
- * synthesised. Graphify does emit these — a call into a module outside the scan
77677
- * root — and inventing a placeholder node for one would put a file in the map
77678
- * that is not in the repository.
77679
- */
77680
- function indexGraph(raw, repoLabel) {
77681
- const nodes = /* @__PURE__ */ new Map();
77682
- for (const node of raw.nodes) nodes.set(node.id, node);
77683
- const outbound = /* @__PURE__ */ new Map();
77684
- const inbound = /* @__PURE__ */ new Map();
77685
- const degree = /* @__PURE__ */ new Map();
77686
- const unknownRelations = /* @__PURE__ */ new Set();
77687
- let extractedEdgeCount = 0;
77688
- let inferredEdgeCount = 0;
77689
- let edgeCount = 0;
77690
- for (const link of raw.links) {
77691
- if (!nodes.has(link.source) || !nodes.has(link.target)) continue;
77692
- const relation = link.relation ?? "";
77693
- if (relation !== "" && !isKnownRelation(relation)) {
77694
- unknownRelations.add(relation);
77695
- continue;
77696
- }
77697
- edgeCount += 1;
77698
- if (link.confidence === "INFERRED") inferredEdgeCount += 1;
77699
- else extractedEdgeCount += 1;
77700
- pushInto(outbound, link.source, link);
77701
- pushInto(inbound, link.target, link);
77702
- degree.set(link.source, (degree.get(link.source) ?? 0) + 1);
77703
- degree.set(link.target, (degree.get(link.target) ?? 0) + 1);
77704
- }
77705
- return {
77706
- repoLabel,
77707
- builtAtCommit: raw.built_at_commit ?? null,
77708
- nodes,
77709
- outbound,
77710
- inbound,
77711
- degree,
77712
- edgeCount,
77713
- extractedEdgeCount,
77714
- inferredEdgeCount,
77715
- unknownRelations: [...unknownRelations].toSorted()
77716
- };
77717
- }
77718
- /**
77719
- * Deterministic sunflower placement.
77720
- *
77721
- * A phyllotaxis spiral rather than a force simulation, for three reasons: it
77722
- * needs no dependency, it is O(n), and — the one that actually matters — it is
77723
- * *stable*. The same graph opens to the same picture every time, so the spatial
77724
- * memory a person builds up survives closing the panel. A force layout reshuffles
77725
- * on every mount and quietly costs them that.
77726
- *
77727
- * Index 0 lands nearest the centre, so ordering regions by size puts the
77728
- * architectural core where the eye starts.
77729
- */
77730
- function spiralPosition(index, total) {
77731
- const goldenAngle = Math.PI * (3 - Math.sqrt(5));
77732
- const radius = total <= 1 ? 0 : Math.sqrt(index / (total - 1));
77733
- const angle = index * goldenAngle;
77734
- return {
77735
- x: .5 + radius * Math.cos(angle) * .44,
77736
- y: .5 + radius * Math.sin(angle) * .44
77737
- };
77738
- }
77739
- /** Group nodes into their communities, and remember which community each is in. */
77740
- function accumulateRegions(graph) {
77741
- const accumulators = /* @__PURE__ */ new Map();
77742
- const regionOfNode = /* @__PURE__ */ new Map();
77743
- for (const node of graph.nodes.values()) {
77744
- const community = node.community;
77745
- if (community === void 0) continue;
77746
- regionOfNode.set(node.id, community);
77747
- const existing = accumulators.get(community);
77748
- if (existing === void 0) {
77749
- accumulators.set(community, {
77750
- id: community,
77751
- label: node.community_name ?? `Region ${String(community)}`,
77752
- nodeCount: 1
77753
- });
77754
- continue;
77755
- }
77756
- existing.nodeCount += 1;
77757
- }
77758
- return {
77759
- ordered: [...accumulators.values()].toSorted((a, b) => b.nodeCount - a.nodeCount || a.id - b.id),
77760
- regionOfNode
77761
- };
77762
- }
77763
- /**
77764
- * Collapse node-level edges into weighted links between drawn regions.
77765
- *
77766
- * Undirected: "these two areas talk" is the question at this altitude, and
77767
- * drawing both arcs doubles the ink for no added meaning.
77768
- */
77769
- function aggregateRegionLinks(graph, regionOfNode, shownIds) {
77770
- const linkWeights = /* @__PURE__ */ new Map();
77771
- for (const links of graph.outbound.values()) for (const link of links) {
77772
- const from = regionOfNode.get(link.source);
77773
- const to = regionOfNode.get(link.target);
77774
- if (from === void 0 || to === void 0 || from === to) continue;
77775
- if (!shownIds.has(from) || !shownIds.has(to)) continue;
77776
- const key = `${String(Math.min(from, to))}:${String(Math.max(from, to))}`;
77777
- linkWeights.set(key, (linkWeights.get(key) ?? 0) + 1);
77778
- }
77779
- return [...linkWeights.entries()].map(([key, weight]) => {
77780
- const [source, target] = key.split(":");
77781
- return {
77782
- source: Number(source),
77783
- target: Number(target),
77784
- weight
77785
- };
77786
- });
77787
- }
77788
- /**
77789
- * The default view: the repository as named regions.
77790
- *
77791
- * Regions come from graphify's own community detection, and their names come
77792
- * from the community's hub node — so a region is labelled `AIGateway.ts` or
77793
- * `IStorage`, something a person recognises, rather than "Community 469".
77794
- */
77795
- function buildSummary(graph) {
77796
- const { ordered, regionOfNode } = accumulateRegions(graph);
77797
- const shown = ordered.slice(0, 120);
77798
- const shownIds = new Set(shown.map((region) => region.id));
77799
- const regions = shown.map((region, index) => {
77800
- const position = spiralPosition(index, shown.length);
77801
- return {
77802
- id: region.id,
77803
- label: region.label,
77804
- nodeCount: region.nodeCount,
77805
- x: position.x,
77806
- y: position.y
77807
- };
77808
- });
77809
- return {
77810
- repoLabel: graph.repoLabel,
77811
- builtAtCommit: graph.builtAtCommit,
77812
- nodeCount: graph.nodes.size,
77813
- edgeCount: graph.edgeCount,
77814
- extractedEdgeCount: graph.extractedEdgeCount,
77815
- inferredEdgeCount: graph.inferredEdgeCount,
77816
- regionCount: ordered.length,
77817
- regions,
77818
- links: aggregateRegionLinks(graph, regionOfNode, shownIds),
77819
- truncatedRegions: Math.max(0, ordered.length - shown.length)
77820
- };
77821
- }
77822
- function summariseNode(graph, node) {
77823
- return {
77824
- id: node.id,
77825
- label: node.label ?? node.id,
77826
- kind: node._callable === true ? "symbol" : "file",
77827
- sourceFile: node.source_file ?? null,
77828
- sourceLocation: node.source_location ?? null,
77829
- regionId: node.community ?? null,
77830
- regionLabel: node.community_name ?? null,
77831
- degree: graph.degree.get(node.id) ?? 0
77832
- };
77833
- }
77834
- function toEdgeView(link) {
77835
- const relation = link.relation ?? "";
77836
- if (!isKnownRelation(relation)) return null;
77837
- const confidence = link.confidence === "INFERRED" ? "INFERRED" : "EXTRACTED";
77838
- return {
77839
- source: link.source,
77840
- target: link.target,
77841
- relation,
77842
- edgeClass: CODE_GRAPH_RELATION_CLASS[relation],
77843
- confidence,
77844
- confidenceScore: link.confidence_score ?? 1
77845
- };
77846
- }
77847
- /**
77848
- * Pull one node's neighbours into the result; return how many it had to drop.
77849
- *
77850
- * Split out of `buildNeighborhood` because the two read differently: the caller
77851
- * owns *how far to walk*, this owns *what one step collects*. Together they sat
77852
- * well past the repo's cognitive-complexity gate.
77853
- */
77854
- /** Links touching a node, most-connected neighbour first. */
77855
- function rankNeighbourLinks(graph, current) {
77856
- return [...graph.outbound.get(current) ?? [], ...graph.inbound.get(current) ?? []].toSorted((a, b) => {
77857
- const aOther = a.source === current ? a.target : a.source;
77858
- const bOther = b.source === current ? b.target : b.source;
77859
- return (graph.degree.get(bOther) ?? 0) - (graph.degree.get(aOther) ?? 0);
77860
- });
77861
- }
77862
- /** Take a neighbour into the result. False means the budget is spent. */
77863
- function admitNeighbour(state, id, node) {
77864
- if (state.included.has(id)) return true;
77865
- if (state.included.size >= 150) return false;
77866
- state.included.set(id, node);
77867
- state.next.push(id);
77868
- return true;
77869
- }
77870
- /** Record an edge once, dropping any relation this build cannot classify. */
77871
- function recordEdge(state, link) {
77872
- const edgeKey = `${link.source}>${link.target}:${link.relation ?? ""}`;
77873
- if (state.seenEdges.has(edgeKey)) return;
77874
- const view = toEdgeView(link);
77875
- if (view === null) return;
77876
- state.seenEdges.add(edgeKey);
77877
- state.edges.push(view);
77878
- }
77879
- /**
77880
- * Pull one node's neighbours into the result; return how many it had to drop.
77881
- *
77882
- * Split out of `buildNeighborhood` because the two read differently: the caller
77883
- * owns *how far to walk*, this owns *what one step collects*.
77884
- */
77885
- function expandNode(graph, current, state) {
77886
- let omitted = 0;
77887
- for (const link of rankNeighbourLinks(graph, current)) {
77888
- const other = link.source === current ? link.target : link.source;
77889
- const otherNode = graph.nodes.get(other);
77890
- if (otherNode === void 0) continue;
77891
- if (!admitNeighbour(state, other, otherNode)) {
77892
- omitted += 1;
77893
- continue;
77894
- }
77895
- recordEdge(state, link);
77896
- }
77897
- return omitted;
77898
- }
77899
- /**
77900
- * One node and what surrounds it.
77901
- *
77902
- * Two caps, and they do different jobs. `CODE_GRAPH_MAX_NEIGHBORS` bounds the
77903
- * answer so the canvas stays drawable. `CODE_GRAPH_MAX_FANOUT` bounds the
77904
- * *traversal*: a hub is included as a neighbor but never expanded through, so
77905
- * one `logger.ts` in the second ring cannot drag the entire repository in
77906
- * behind it. Without the second cap the first one is reached instantly and the
77907
- * result is 150 arbitrary nodes rather than the 150 nearest ones.
77908
- */
77909
- function buildNeighborhood(graph, nodeId, requestedDepth) {
77910
- const root = graph.nodes.get(nodeId);
77911
- if (root === void 0) return null;
77912
- const depth = Math.min(Math.max(1, requestedDepth), 2);
77913
- const included = new Map([[root.id, root]]);
77914
- const seenEdges = /* @__PURE__ */ new Set();
77915
- const edges = [];
77916
- let omittedCount = 0;
77917
- let frontier = [root.id];
77918
- for (let level = 0; level < depth; level += 1) {
77919
- const next = [];
77920
- for (const current of frontier) {
77921
- const fanout = graph.degree.get(current) ?? 0;
77922
- if (current !== root.id && fanout > 200) continue;
77923
- omittedCount += expandNode(graph, current, {
77924
- included,
77925
- seenEdges,
77926
- edges,
77927
- next
77928
- });
77929
- }
77930
- frontier = next;
77931
- if (frontier.length === 0) break;
77932
- }
77933
- const nodes = [...included.values()].filter((node) => node.id !== root.id).map((node) => summariseNode(graph, node)).toSorted((a, b) => b.degree - a.degree || a.label.localeCompare(b.label));
77934
- return {
77935
- root: summariseNode(graph, root),
77936
- nodes,
77937
- edges: edges.filter((edge) => included.has(edge.source) && included.has(edge.target)),
77938
- depth,
77939
- truncated: omittedCount > 0,
77940
- omittedCount
77941
- };
77942
- }
77943
- /**
77944
- * Rank one node against a query: lower is better, negative means no match.
77945
- *
77946
- * A file-path hit ranks last because "the query appears somewhere in this path"
77947
- * is much weaker evidence than "this thing is called that".
77948
- */
77949
- function matchScore(node, query) {
77950
- const label = (node.label ?? node.id).toLowerCase();
77951
- if (label === query) return 0;
77952
- if (label.startsWith(query)) return 1;
77953
- if (label.includes(query)) return 2;
77954
- return (node.source_file ?? "").toLowerCase().includes(query) ? 3 : -1;
77955
- }
77956
- /**
77957
- * Find a node by name or path.
77958
- *
77959
- * Entry to this surface is search, not the canvas — you usually arrive already
77960
- * knowing what you are looking for, and clicking around 34,000 nodes to find it
77961
- * is not a workflow. Ranking is exact, then prefix, then substring, with degree
77962
- * breaking ties so the `logger.ts` everything imports outranks a test fixture
77963
- * that merely shares the word.
77964
- */
77965
- function searchNodes(graph, rawQuery, limit = 40) {
77966
- const query = rawQuery.trim().toLowerCase();
77967
- if (query === "") return {
77968
- nodes: [],
77969
- truncated: false
77970
- };
77971
- const scored = [];
77972
- for (const node of graph.nodes.values()) {
77973
- const score = matchScore(node, query);
77974
- if (score < 0) continue;
77975
- scored.push({
77976
- node,
77977
- score
77978
- });
77979
- }
77980
- const ranked = scored.toSorted((a, b) => a.score - b.score || (graph.degree.get(b.node.id) ?? 0) - (graph.degree.get(a.node.id) ?? 0) || (a.node.label ?? a.node.id).localeCompare(b.node.label ?? b.node.id));
77981
- const capped = ranked.slice(0, limit);
77982
- return {
77983
- nodes: capped.map((entry) => summariseNode(graph, entry.node)),
77984
- truncated: ranked.length > capped.length
77985
- };
77986
- }
77987
- //#endregion
77988
- //#region src/codeGraph/graphArtifact.ts
77989
- /**
77990
- * Reading `graphify-out/graph.json` off disk, once.
77991
- *
77992
- * The artifact is 26 MB here and 40 MB for CMMD's server tree, and parsing it
77993
- * costs roughly a second. Every panel open would pay that again without a cache,
77994
- * so one indexed graph is held per project and reused until the file changes.
77995
- *
77996
- * Kept free of Effect on purpose: the failure modes worth distinguishing are all
77997
- * filesystem-shaped, and a plain promise keeps this unit-testable against real
77998
- * fixtures without constructing a runtime. `ws.ts` wraps it at the boundary.
77999
- */
78000
- const cache = /* @__PURE__ */ new Map();
78001
- /** Git LFS writes a pointer file that is valid text and useless as a graph. */
78002
- const LFS_POINTER_PREFIX = "version https://git-lfs.github.com/spec/v1";
78003
- function codeGraphArtifactPath(cwd) {
78004
- return node_path.default.join(cwd, CODE_GRAPH_ARTIFACT_PATH);
78005
- }
78006
- function isRawGraph(value) {
78007
- if (typeof value !== "object" || value === null) return false;
78008
- const candidate = value;
78009
- return Array.isArray(candidate.nodes) && Array.isArray(candidate.links);
78010
- }
78011
- /**
78012
- * Load and index the graph for one project checkout.
78013
- *
78014
- * The LFS-pointer case is called out separately rather than folded into
78015
- * "malformed" because it is the single most likely failure on a fresh clone —
78016
- * the file is present, tracked, and 133 bytes of metadata. Telling someone their
78017
- * graph is corrupt when they simply have not run `git lfs pull` sends them to
78018
- * rebuild something that is fine.
78019
- */
78020
- async function loadIndexedGraph(cwd) {
78021
- const artifactPath = codeGraphArtifactPath(cwd);
78022
- let stats;
78023
- try {
78024
- stats = await (0, node_fs_promises.stat)(artifactPath);
78025
- } catch {
78026
- return {
78027
- ok: false,
78028
- failure: {
78029
- kind: "missing",
78030
- artifactPath
78031
- }
78032
- };
78033
- }
78034
- if (!stats.isFile()) return {
78035
- ok: false,
78036
- failure: {
78037
- kind: "missing",
78038
- artifactPath
78039
- }
78040
- };
78041
- const cached = cache.get(artifactPath);
78042
- if (cached !== void 0 && cached.mtimeMs === stats.mtimeMs && cached.size === stats.size) return {
78043
- ok: true,
78044
- graph: cached.graph
78045
- };
78046
- let contents;
78047
- try {
78048
- contents = await (0, node_fs_promises.readFile)(artifactPath, "utf8");
78049
- } catch (error) {
78050
- return {
78051
- ok: false,
78052
- failure: {
78053
- kind: "unreadable",
78054
- artifactPath,
78055
- detail: error instanceof Error ? error.message : String(error)
78056
- }
78057
- };
78058
- }
78059
- if (contents.startsWith(LFS_POINTER_PREFIX)) return {
78060
- ok: false,
78061
- failure: {
78062
- kind: "lfs-pointer",
78063
- artifactPath
78064
- }
78065
- };
78066
- let parsed;
78067
- try {
78068
- parsed = JSON.parse(contents);
78069
- } catch (error) {
78070
- return {
78071
- ok: false,
78072
- failure: {
78073
- kind: "malformed",
78074
- artifactPath,
78075
- detail: error instanceof Error ? error.message : String(error)
78076
- }
78077
- };
78078
- }
78079
- if (!isRawGraph(parsed)) return {
78080
- ok: false,
78081
- failure: {
78082
- kind: "malformed",
78083
- artifactPath,
78084
- detail: "Expected an object with `nodes` and `links` arrays."
78085
- }
78086
- };
78087
- const graph = indexGraph(parsed, node_path.default.basename(cwd));
78088
- cache.set(artifactPath, {
78089
- mtimeMs: stats.mtimeMs,
78090
- size: stats.size,
78091
- graph
78092
- });
78093
- return {
78094
- ok: true,
78095
- graph
78096
- };
78097
- }
78098
- //#endregion
78099
- //#region src/codeGraph/service.ts
78100
- /**
78101
- * The code-graph RPC surface, as Effects.
78102
- *
78103
- * A thin seam between `ws.ts` and the pure aggregator: load the artifact, turn
78104
- * a filesystem failure into the tagged error the client can act on, and slice.
78105
- *
78106
- * The failure mapping is the substance here. Each reason produces different
78107
- * advice — pull LFS, run the extractor, report a corrupt file — so collapsing
78108
- * them into one "graph unavailable" would send people to fix the wrong thing.
78109
- */
78110
- function toUnavailable(failure) {
78111
- switch (failure.kind) {
78112
- case "missing": return new CodeGraphUnavailableError({
78113
- reason: "missing",
78114
- message: `No code graph in this checkout. Run \`graphify update .\` to build ${failure.artifactPath}.`
78115
- });
78116
- case "lfs-pointer": return new CodeGraphUnavailableError({
78117
- reason: "lfs-pointer",
78118
- message: `The graph is a Git LFS pointer, not the graph itself. Run \`git lfs pull\` to fetch it.`
78119
- });
78120
- case "malformed": return new CodeGraphUnavailableError({
78121
- reason: "malformed",
78122
- message: `The graph file could not be parsed: ${failure.detail}`
78123
- });
78124
- case "unreadable": return new CodeGraphUnavailableError({
78125
- reason: "unreadable",
78126
- message: `The graph file could not be read: ${failure.detail}`
78127
- });
78128
- }
78129
- }
78130
- function withGraph(cwd, use) {
78131
- return require_Schema$1.flatMap(require_Schema$1.promise(() => loadIndexedGraph(cwd)), (result) => result.ok ? require_Schema$1.succeed(use(result.graph)) : require_Schema$1.fail(toUnavailable(result.failure)));
78132
- }
78133
- function readCodeGraphSummary(input) {
78134
- return withGraph(input.cwd, buildSummary);
78135
- }
78136
- function readCodeGraphNeighborhood(input) {
78137
- return require_Schema$1.flatMap(withGraph(input.cwd, (graph) => buildNeighborhood(graph, input.nodeId, input.depth ?? 1)), (neighborhood) => neighborhood === null ? require_Schema$1.fail(new CodeGraphNodeNotFoundError({ nodeId: input.nodeId })) : require_Schema$1.succeed(neighborhood));
78138
- }
78139
- function readCodeGraphSearch(input) {
78140
- return withGraph(input.cwd, (graph) => searchNodes(graph, input.query, input.limit ?? 40));
78141
- }
78142
- //#endregion
78143
77462
  //#region src/checkpointing/Services/CheckpointDiffQuery.ts
78144
77463
  /**
78145
77464
  * CheckpointDiffQuery - Service tag for checkpoint diff queries.
@@ -107719,9 +107038,6 @@ const makeWsRpcLayer = (currentSessionId, currentUserId) => WsRpcGroup.toLayer(r
107719
107038
  }))), { "rpc.aggregate": "workspace" }),
107720
107039
  [WS_METHODS.serverDiscoverSourceControl]: () => observeRpcEffect(WS_METHODS.serverDiscoverSourceControl, discoverSourceControl, { "rpc.aggregate": "server" }),
107721
107040
  [WS_METHODS.serverReportClientActivity]: () => observeRpcEffect(WS_METHODS.serverReportClientActivity, require_Schema$1.void_, { "rpc.aggregate": "server" }),
107722
- [WS_METHODS.codeGraphSummary]: (input) => observeRpcEffect(WS_METHODS.codeGraphSummary, readCodeGraphSummary(input), { "rpc.aggregate": "codeGraph" }),
107723
- [WS_METHODS.codeGraphNeighborhood]: (input) => observeRpcEffect(WS_METHODS.codeGraphNeighborhood, readCodeGraphNeighborhood(input), { "rpc.aggregate": "codeGraph" }),
107724
- [WS_METHODS.codeGraphSearch]: (input) => observeRpcEffect(WS_METHODS.codeGraphSearch, readCodeGraphSearch(input), { "rpc.aggregate": "codeGraph" }),
107725
107041
  [WS_METHODS.projectsWriteFile]: (input) => observeRpcEffect(WS_METHODS.projectsWriteFile, workspaceFileSystem.writeFile(input).pipe(require_Schema$1.mapError((cause) => {
107726
107042
  return new ProjectWriteFileError({
107727
107043
  message: require_Schema$1.is(WorkspacePathOutsideRootError)(cause) ? "Workspace file path must stay within the project root." : "Failed to write workspace file",
@@ -298896,7 +298212,7 @@ function resolveBuildCommitFromEnv(env) {
298896
298212
  * environment descriptor down instead of reporting an honest "unknown".
298897
298213
  */
298898
298214
  function readBakedBuildCommit() {
298899
- return "b06001f4e16f7a336e9108920f9250b366862f3d";
298215
+ return "ccfffcbf86c28599b61bac158032499398ed9713";
298900
298216
  }
298901
298217
  async function resolveServerBuildCommit(input) {
298902
298218
  if (isFullCommitSha(input.baked)) return input.baked;