opencode-swarm 7.164.6 → 7.164.8

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 (96) hide show
  1. package/README.md +1 -1
  2. package/dist/background/pending-delegations.d.ts +3 -0
  3. package/dist/background/pr-subscriptions.d.ts +1 -8
  4. package/dist/cli/{coder-settlement-6qgvzx40.js → coder-settlement-qrtjv4jk.js} +14 -14
  5. package/dist/cli/{config-doctor-d1cbh67h.js → config-doctor-hp9dj0fg.js} +5 -3
  6. package/dist/cli/{core-g0cvvj3b.js → core-bmmrm36k.js} +2 -2
  7. package/dist/cli/{curation-policy-7f8x9yg6.js → curation-policy-de7emfqc.js} +7 -6
  8. package/dist/cli/{curator-drift-0r0scc8r.js → curator-drift-5sykmtf5.js} +8 -6
  9. package/dist/cli/{curator-q3qn89wn.js → curator-k8xdr1mn.js} +40 -38
  10. package/dist/cli/curator-llm-factory-pe61p0r6.js +68 -0
  11. package/dist/cli/{dispatch-q4v8x2pk.js → dispatch-dqybvj8v.js} +10 -6
  12. package/dist/cli/{evidence-summary-service-3meyb8rc.js → evidence-summary-service-qzpkdv7a.js} +20 -17
  13. package/dist/cli/{gate-evidence-mhc0w7vp.js → gate-evidence-jmns4e76.js} +14 -8
  14. package/dist/cli/guardrail-explain-vzwbmvyf.js +69 -0
  15. package/dist/cli/{guardrail-log-0nd1eqvz.js → guardrail-log-kckc7cg4.js} +9 -8
  16. package/dist/cli/{guardrail-reset-mzeyd6jh.js → guardrail-reset-acndbsv9.js} +40 -38
  17. package/dist/cli/hive-promoter-wvt5kk99.js +83 -0
  18. package/dist/cli/{index-x6zyc38w.js → index-0zjwnbze.js} +1 -1
  19. package/dist/cli/{index-x76mprg2.js → index-29w778rw.js} +185 -376
  20. package/dist/cli/{index-fxxja498.js → index-2czt53wz.js} +1 -1
  21. package/dist/cli/{index-pvp5tnn2.js → index-3sv8t7ca.js} +2 -2
  22. package/dist/cli/{index-kvb4dwgf.js → index-4pm3v7yc.js} +12 -6
  23. package/dist/cli/{index-jzvrvdmr.js → index-4v28t7jh.js} +4 -4
  24. package/dist/cli/{index-935ww10s.js → index-52m9kter.js} +1236 -1193
  25. package/dist/cli/index-7qefgq4j.js +71 -0
  26. package/dist/cli/{index-zfwd65c2.js → index-8ntf8jnj.js} +19 -18
  27. package/dist/cli/{index-m1nrd3yd.js → index-8psybzzf.js} +1 -1
  28. package/dist/cli/{index-2c3np82d.js → index-8tqqmsav.js} +1 -1
  29. package/dist/cli/{index-tegp2mny.js → index-93znbdam.js} +9 -5
  30. package/dist/cli/{index-hdapetg1.js → index-9ek9d96g.js} +3 -3
  31. package/dist/cli/{index-p56xc59p.js → index-9ydhzegh.js} +28 -17
  32. package/dist/cli/{index-ew99d4y6.js → index-apdp9bc1.js} +1 -1
  33. package/dist/cli/{index-12xzj0hm.js → index-b10yvv6h.js} +4 -4
  34. package/dist/cli/{index-zjg5ajf5.js → index-bv90qkyw.js} +72 -48
  35. package/dist/cli/{index-zypacgjc.js → index-bz8vsc8r.js} +5 -5
  36. package/dist/cli/{index-4k16cz8r.js → index-bzesypf5.js} +36 -27
  37. package/dist/cli/{index-ay9cr8tr.js → index-chcv8c7n.js} +1 -1
  38. package/dist/cli/index-cw912re7.js +200 -0
  39. package/dist/cli/{index-ty3vtqe2.js → index-espcjyrx.js} +4 -4
  40. package/dist/cli/{index-gwg7a00b.js → index-g2e8b3wm.js} +20 -15
  41. package/dist/cli/{index-rysxqae0.js → index-ghnbpez3.js} +7 -7
  42. package/dist/cli/{index-t1nkr7cz.js → index-gkqrk8dd.js} +2 -2
  43. package/dist/cli/{index-1dz8hv7p.js → index-kvq1e82k.js} +3 -3
  44. package/dist/cli/{index-ze5zyv28.js → index-mr3h3sm5.js} +2 -2
  45. package/dist/cli/{index-zaab1wz9.js → index-n4fzmqz8.js} +3 -1
  46. package/dist/cli/{index-g5714mpv.js → index-px4a2ve0.js} +17 -8
  47. package/dist/cli/index-ry16d01s.js +107 -0
  48. package/dist/cli/{index-j3hsjynw.js → index-s3z936wh.js} +100 -97
  49. package/dist/cli/{index-yh8wxegw.js → index-s6ejwhew.js} +21 -11
  50. package/dist/cli/{index-b0m3efpf.js → index-sxxh4ams.js} +2 -2
  51. package/dist/cli/{index-cyhw0der.js → index-t1qzjhnj.js} +13 -13
  52. package/dist/cli/{index-3f7hqtgg.js → index-w3gtqey0.js} +4 -1
  53. package/dist/cli/{index-9qvmsyab.js → index-wgqeqy68.js} +2 -2
  54. package/dist/cli/{index-y4z0rhsa.js → index-whz6am0v.js} +42 -40
  55. package/dist/cli/{index-g94qqwnz.js → index-wtnx33hz.js} +2 -2
  56. package/dist/cli/{index-j645xpsm.js → index-y6s0gpn3.js} +12 -5
  57. package/dist/cli/{index-6f9yvd67.js → index-ya4ta1pd.js} +2 -2
  58. package/dist/cli/{index-5p1tzpwh.js → index-ypjffdrg.js} +3 -2
  59. package/dist/cli/{index-59hvr3f4.js → index-yscwyq3t.js} +9 -6
  60. package/dist/cli/{index-7v3bb0h3.js → index-yzn1fm9a.js} +1 -1
  61. package/dist/cli/{index-qdbgc16x.js → index-z39vxvdx.js} +20 -12
  62. package/dist/cli/index.js +40 -38
  63. package/dist/cli/{knowledge-escalator-aca0nhqg.js → knowledge-escalator-h9834mrp.js} +15 -14
  64. package/dist/cli/{knowledge-events-n5t313ht.js → knowledge-events-e8hrmjf0.js} +13 -12
  65. package/dist/cli/{knowledge-link-8ea4ksda.js → knowledge-link-hhnmc4g1.js} +6 -5
  66. package/dist/cli/{knowledge-store-j97ejf6a.js → knowledge-store-w3w9gchr.js} +7 -6
  67. package/dist/cli/{knowledge-validator-01evhydg.js → knowledge-validator-exd900vc.js} +9 -8
  68. package/dist/cli/{model-preflight-pmnbfzjv.js → model-preflight-bq035tfh.js} +1 -1
  69. package/dist/cli/{pending-delegations-w73abdk3.js → pending-delegations-p4ak2e86.js} +7 -7
  70. package/dist/cli/{pr-subscriptions-05dzvavk.js → pr-subscriptions-73fs8y3n.js} +7 -6
  71. package/dist/cli/{pr-workflow-gate-t0tnkx5f.js → pr-workflow-gate-pvt2ra6e.js} +40 -38
  72. package/dist/cli/{runner-fh7t0mn9.js → runner-5qqh83e2.js} +6 -6
  73. package/dist/cli/{scan-cursor-63zx2qd8.js → scan-cursor-ysd8b563.js} +8 -7
  74. package/dist/cli/{schema-t1scx08g.js → schema-mbb9g4w4.js} +2 -2
  75. package/dist/cli/{scope-persistence-1a5qmchf.js → scope-persistence-jrbnhxvx.js} +12 -10
  76. package/dist/cli/{skill-generator-7werbwgv.js → skill-generator-b4ng5xky.js} +17 -16
  77. package/dist/cli/{sqlite-loader-8zefc142.js → sqlite-loader-xrnf6bq8.js} +1 -1
  78. package/dist/cli/{telemetry-j14cj552.js → telemetry-85gxedng.js} +1 -1
  79. package/dist/cli/{workspace-snapshot-yq0tc49d.js → workspace-snapshot-eh18vgkn.js} +2 -1
  80. package/dist/cli/{worktree-collision-ownership-wzdzky33.js → worktree-collision-ownership-ns8p2fks.js} +12 -15
  81. package/dist/cli/{worktree-isolation-m02ay3kg.js → worktree-isolation-j6zxhjab.js} +40 -38
  82. package/dist/db/canonical-project.d.ts +10 -3
  83. package/dist/db/driver-parity.d.ts +12 -0
  84. package/dist/db/project-db.d.ts +4 -0
  85. package/dist/evidence/task-gate-repair.d.ts +1 -1
  86. package/dist/gate-evidence.d.ts +19 -1
  87. package/dist/index.js +581 -581
  88. package/dist/plan/ledger.d.ts +2 -0
  89. package/dist/tools/pre-check-batch.d.ts +1 -1
  90. package/dist/utils/canonical-root.d.ts +21 -1
  91. package/dist/utils/filesystem-identity.d.ts +59 -0
  92. package/package.json +2 -1
  93. package/dist/cli/curator-llm-factory-dw7md4nr.js +0 -66
  94. package/dist/cli/guardrail-explain-6cbszhw1.js +0 -67
  95. package/dist/cli/hive-promoter-w7g879cm.js +0 -81
  96. package/dist/cli/index-ddszzne4.js +0 -42
@@ -88,6 +88,7 @@ declare function getLedgerPath(directory: string): string;
88
88
  * Get the path to plan.json
89
89
  */
90
90
  declare function getPlanJsonPath(directory: string): string;
91
+ declare function readLedgerDirectory(directory: string): string[];
91
92
  /**
92
93
  * Durable atomic write: write `data` to `tempPath`, fsync the file descriptor so
93
94
  * the bytes are flushed to stable storage, then atomically rename it over
@@ -572,6 +573,7 @@ export declare const _internals: {
572
573
  getPlanJsonPath: typeof getPlanJsonPath;
573
574
  writeFileFsyncedThenRename: typeof writeFileFsyncedThenRename;
574
575
  fsyncRecoveryDirectory: typeof fsyncRecoveryDirectory;
576
+ readLedgerDirectory: typeof readLedgerDirectory;
575
577
  randomUUID: () => `${string}-${string}-${string}-${string}-${string}`;
576
578
  };
577
579
  export {};
@@ -104,7 +104,7 @@ export interface PreCheckBatchResult {
104
104
  * field and replace optional payloads with bounded, UTF-8-safe summaries.
105
105
  */
106
106
  declare function serializePreCheckResult(result: PreCheckBatchResult): string;
107
- declare function isAcceptedProjectRootForPlatform(dir: string, workspaceDir: string, platform: NodeJS.Platform, hasExplicitBoundary: boolean): boolean;
107
+ declare function isAcceptedProjectRootForPlatform(dir: string, workspaceDir: string, platform: NodeJS.Platform, hasExplicitBoundary: boolean, exactPhysicalRoot?: boolean): boolean;
108
108
  export declare const _test_exports: {
109
109
  isAcceptedProjectRootForPlatform: typeof isAcceptedProjectRootForPlatform;
110
110
  };
@@ -13,6 +13,7 @@
13
13
  * `validateSwarmPath`, so the aliasing this resolves lives strictly ABOVE
14
14
  * `.swarm`. One shared implementation so the three maps cannot drift.
15
15
  */
16
+ import * as fsSync from 'node:fs';
16
17
  /**
17
18
  * Separator between canonical root and session id in composite keys.
18
19
  * `String.fromCharCode(0)` rather than an escape literal so the source stays
@@ -20,10 +21,29 @@
20
21
  * binary); NUL cannot appear in a path on any supported platform.
21
22
  */
22
23
  export declare const SESSION_KEY_SEPARATOR: string;
24
+ /** Keep filesystem and platform access behind a narrow test seam. */
25
+ export declare const _internals: {
26
+ realpathSyncNative: (path: fsSync.PathLike) => string;
27
+ realpathSync: typeof fsSync.realpathSync;
28
+ lstatSync: typeof fsSync.lstatSync;
29
+ platform: () => NodeJS.Platform;
30
+ };
31
+ /**
32
+ * Normalize only the caller's lexical spelling of a root.
33
+ *
34
+ * This is deliberately not physical project identity. It exists solely for
35
+ * bounded resource-lifecycle alias tables that must remember how a caller
36
+ * spelled a root after that path is deleted or becomes inaccessible. New
37
+ * equality, cache, authority, or persistence decisions must use
38
+ * {@link canonicalRootKeyFresh} instead.
39
+ */
40
+ export declare function lexicalRootAliasKey(directory: string): string;
23
41
  export declare function canonicalRootKey(directory: string): string;
24
42
  /** Resolve a root without consulting the bounded memoized cache. */
25
43
  export declare function canonicalRootKeyFresh(directory: string): string;
26
- /** Composite map key: canonical root + NUL + session id. */
44
+ /** Compare current physical project-root identity, bypassing the memo. */
45
+ export declare function sameProjectRoot(a: string, b: string): boolean;
46
+ /** Composite map key: current physical root + NUL + session id. */
27
47
  export declare function compositeSessionKey(directory: string, sessionId: string): string;
28
48
  /**
29
49
  * Suffix every root's key for a session ends with. Suffix-scan clear paths
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Fail-closed physical filesystem identity for existing entries.
3
+ *
4
+ * Unlike canonicalRootKey, this helper never falls back to a lexical path:
5
+ * callers use it only when equality must be proven for entries that exist.
6
+ * It does not establish containment, authorization, hard-link equivalence, or
7
+ * race-free safety; it proves pathname identity at the instant of resolution.
8
+ */
9
+ import * as fsSync from 'node:fs';
10
+ export declare const _internals: {
11
+ realpathSyncNative: (path: fsSync.PathLike) => string;
12
+ realpathSync: typeof fsSync.realpathSync;
13
+ lstatSync: typeof fsSync.lstatSync;
14
+ platform: () => NodeJS.Platform;
15
+ };
16
+ /**
17
+ * Return a canonical pathname only when the entry physically resolves.
18
+ * Native realpath expands Windows 8.3 names; ordinary realpath is a portable
19
+ * fallback for runtimes/filesystems where the native binding is unavailable.
20
+ */
21
+ export declare function canonicalExistingFilesystemPath(entryPath: string): string | null;
22
+ /**
23
+ * Return the pre-#2474 canonical spelling used in persisted scope bindings.
24
+ *
25
+ * It deliberately skips the native Windows resolver: old releases used the
26
+ * ordinary `realpathSync` result (then slash-normalized and case-folded). The
27
+ * scope persistence reader uses this as a narrow dual-read compatibility
28
+ * witness and always rewrites a recovered binding with the current native-first
29
+ * identity on its next durable write.
30
+ */
31
+ export declare function legacyCanonicalExistingFilesystemPath(entryPath: string): string | null;
32
+ export interface CanonicalPathFromExistingAncestor {
33
+ canonicalPath: string;
34
+ existingAncestor: string;
35
+ existingAncestorIsLink: boolean;
36
+ identityWitnesses: FilesystemIdentityWitness[];
37
+ }
38
+ export interface FilesystemIdentityWitness {
39
+ lexicalPath: string;
40
+ canonicalPath: string;
41
+ }
42
+ /** Capture the entry plus linked ancestors whose identity can prove retarget. */
43
+ export declare function filesystemIdentityWitnesses(entryPath: string): FilesystemIdentityWitness[];
44
+ /**
45
+ * Resolve a not-yet-existing path through its nearest existing physical
46
+ * ancestor, then append the normalized missing suffix. This does not prove the
47
+ * leaf exists and must not be used for equality or authorization decisions; it
48
+ * binds future lazy I/O to the mount/alias target observed at acquisition time.
49
+ */
50
+ export declare function canonicalPathFromExistingAncestor(entryPath: string): CanonicalPathFromExistingAncestor | null;
51
+ /**
52
+ * Capture the path a future lazy filesystem operation must use. Existing paths
53
+ * resolve exactly; missing paths inherit the physical identity of their nearest
54
+ * existing ancestor. A wholly unresolvable path returns null so authority or
55
+ * storage callers can fail closed rather than bind to a mutable lexical alias.
56
+ */
57
+ export declare function canonicalPathForFutureIo(entryPath: string): string | null;
58
+ /** Compare two existing entries, failing closed if either cannot resolve. */
59
+ export declare function sameExistingFilesystemPath(a: string, b: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.164.6",
3
+ "version": "7.164.8",
4
4
  "description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -127,6 +127,7 @@
127
127
  "check:gate-portability": "bun run scripts/check-gate-portability.ts",
128
128
  "check:bare-spawn": "bun run scripts/check-bare-executable-spawn.ts",
129
129
  "check:error-channel-discard": "bun run scripts/check-error-channel-discard.ts",
130
+ "check:path-identity": "bun run scripts/check-path-identity.ts",
130
131
  "check:registry-citations": "bun run scripts/check-registry-citations.ts",
131
132
  "check:memory-recall": "bun run scripts/memory-recall-regression.ts"
132
133
  },
@@ -1,66 +0,0 @@
1
- // @bun
2
- import {
3
- createCuratorLLMDelegate
4
- } from "./index-935ww10s.js";
5
- import"./index-7v3bb0h3.js";
6
- import"./index-12xzj0hm.js";
7
- import"./index-kvb4dwgf.js";
8
- import"./index-x76mprg2.js";
9
- import"./index-9qvmsyab.js";
10
- import"./index-txdagbh7.js";
11
- import"./index-3146wmgv.js";
12
- import"./index-59hvr3f4.js";
13
- import"./index-zypacgjc.js";
14
- import"./index-6f9yvd67.js";
15
- import"./index-70ha9e09.js";
16
- import"./index-yh8wxegw.js";
17
- import"./index-zjg5ajf5.js";
18
- import"./index-zaab1wz9.js";
19
- import"./index-zfwd65c2.js";
20
- import"./index-zsrtt42s.js";
21
- import"./index-4k16cz8r.js";
22
- import"./index-3f7hqtgg.js";
23
- import"./index-b0m3efpf.js";
24
- import"./index-jzvrvdmr.js";
25
- import"./index-x6zyc38w.js";
26
- import"./index-rtry5xyf.js";
27
- import"./index-g5714mpv.js";
28
- import"./index-t1nkr7cz.js";
29
- import"./index-qdbgc16x.js";
30
- import"./index-ddszzne4.js";
31
- import"./index-j3hsjynw.js";
32
- import"./index-j645xpsm.js";
33
- import"./index-pvp5tnn2.js";
34
- import"./index-556ja8an.js";
35
- import"./index-4fwbbad3.js";
36
- import"./index-b43rt5ph.js";
37
- import"./index-q7sjgr1y.js";
38
- import"./index-rysxqae0.js";
39
- import"./index-gwg7a00b.js";
40
- import"./index-hdapetg1.js";
41
- import"./index-zg9d392c.js";
42
- import"./index-n832052r.js";
43
- import"./index-2c3np82d.js";
44
- import"./index-z6xqpmqg.js";
45
- import"./index-r3mvsbtq.js";
46
- import"./index-ew99d4y6.js";
47
- import"./index-5p1tzpwh.js";
48
- import"./index-9e6fdz2h.js";
49
- import"./index-4rhhvd1a.js";
50
- import"./index-p56xc59p.js";
51
- import"./index-m1nrd3yd.js";
52
- import"./index-zjygnfay.js";
53
- import"./index-ae75rja9.js";
54
- import"./index-tegp2mny.js";
55
- import"./index-ze5zyv28.js";
56
- import"./index-bk5tah7q.js";
57
- import"./index-fxxja498.js";
58
- import"./index-cyhw0der.js";
59
- import"./index-1dz8hv7p.js";
60
- import"./index-7g4c7s5r.js";
61
- import"./index-bpmtbmy9.js";
62
- import"./index-zgwm4ryv.js";
63
- import"./index-a76rekgs.js";
64
- export {
65
- createCuratorLLMDelegate
66
- };
@@ -1,67 +0,0 @@
1
- // @bun
2
- import {
3
- handleGuardrailExplain
4
- } from "./index-g94qqwnz.js";
5
- import"./index-935ww10s.js";
6
- import"./index-7v3bb0h3.js";
7
- import"./index-12xzj0hm.js";
8
- import"./index-kvb4dwgf.js";
9
- import"./index-x76mprg2.js";
10
- import"./index-9qvmsyab.js";
11
- import"./index-txdagbh7.js";
12
- import"./index-3146wmgv.js";
13
- import"./index-59hvr3f4.js";
14
- import"./index-zypacgjc.js";
15
- import"./index-6f9yvd67.js";
16
- import"./index-70ha9e09.js";
17
- import"./index-yh8wxegw.js";
18
- import"./index-zjg5ajf5.js";
19
- import"./index-zaab1wz9.js";
20
- import"./index-zfwd65c2.js";
21
- import"./index-zsrtt42s.js";
22
- import"./index-4k16cz8r.js";
23
- import"./index-3f7hqtgg.js";
24
- import"./index-b0m3efpf.js";
25
- import"./index-jzvrvdmr.js";
26
- import"./index-x6zyc38w.js";
27
- import"./index-rtry5xyf.js";
28
- import"./index-g5714mpv.js";
29
- import"./index-t1nkr7cz.js";
30
- import"./index-qdbgc16x.js";
31
- import"./index-ddszzne4.js";
32
- import"./index-j3hsjynw.js";
33
- import"./index-j645xpsm.js";
34
- import"./index-pvp5tnn2.js";
35
- import"./index-556ja8an.js";
36
- import"./index-4fwbbad3.js";
37
- import"./index-b43rt5ph.js";
38
- import"./index-q7sjgr1y.js";
39
- import"./index-rysxqae0.js";
40
- import"./index-gwg7a00b.js";
41
- import"./index-hdapetg1.js";
42
- import"./index-zg9d392c.js";
43
- import"./index-n832052r.js";
44
- import"./index-2c3np82d.js";
45
- import"./index-z6xqpmqg.js";
46
- import"./index-r3mvsbtq.js";
47
- import"./index-ew99d4y6.js";
48
- import"./index-5p1tzpwh.js";
49
- import"./index-9e6fdz2h.js";
50
- import"./index-4rhhvd1a.js";
51
- import"./index-p56xc59p.js";
52
- import"./index-m1nrd3yd.js";
53
- import"./index-zjygnfay.js";
54
- import"./index-ae75rja9.js";
55
- import"./index-tegp2mny.js";
56
- import"./index-ze5zyv28.js";
57
- import"./index-bk5tah7q.js";
58
- import"./index-fxxja498.js";
59
- import"./index-cyhw0der.js";
60
- import"./index-1dz8hv7p.js";
61
- import"./index-7g4c7s5r.js";
62
- import"./index-bpmtbmy9.js";
63
- import"./index-zgwm4ryv.js";
64
- import"./index-a76rekgs.js";
65
- export {
66
- handleGuardrailExplain
67
- };
@@ -1,81 +0,0 @@
1
- // @bun
2
- import {
3
- _internals2 as _internals,
4
- checkHivePromotions,
5
- countDistinctProjects,
6
- createHivePromoterHook,
7
- isHiveEligible,
8
- promoteFromSwarm,
9
- promoteToHive
10
- } from "./index-935ww10s.js";
11
- import"./index-7v3bb0h3.js";
12
- import"./index-12xzj0hm.js";
13
- import"./index-kvb4dwgf.js";
14
- import"./index-x76mprg2.js";
15
- import"./index-9qvmsyab.js";
16
- import"./index-txdagbh7.js";
17
- import"./index-3146wmgv.js";
18
- import"./index-59hvr3f4.js";
19
- import"./index-zypacgjc.js";
20
- import"./index-6f9yvd67.js";
21
- import"./index-70ha9e09.js";
22
- import"./index-yh8wxegw.js";
23
- import"./index-zjg5ajf5.js";
24
- import"./index-zaab1wz9.js";
25
- import"./index-zfwd65c2.js";
26
- import"./index-zsrtt42s.js";
27
- import"./index-4k16cz8r.js";
28
- import"./index-3f7hqtgg.js";
29
- import"./index-b0m3efpf.js";
30
- import"./index-jzvrvdmr.js";
31
- import"./index-x6zyc38w.js";
32
- import"./index-rtry5xyf.js";
33
- import"./index-g5714mpv.js";
34
- import"./index-t1nkr7cz.js";
35
- import"./index-qdbgc16x.js";
36
- import"./index-ddszzne4.js";
37
- import"./index-j3hsjynw.js";
38
- import"./index-j645xpsm.js";
39
- import"./index-pvp5tnn2.js";
40
- import"./index-556ja8an.js";
41
- import"./index-4fwbbad3.js";
42
- import"./index-b43rt5ph.js";
43
- import"./index-q7sjgr1y.js";
44
- import {
45
- resolveHiveKnowledgePath
46
- } from "./index-rysxqae0.js";
47
- import"./index-gwg7a00b.js";
48
- import"./index-hdapetg1.js";
49
- import"./index-zg9d392c.js";
50
- import"./index-n832052r.js";
51
- import"./index-2c3np82d.js";
52
- import"./index-z6xqpmqg.js";
53
- import"./index-r3mvsbtq.js";
54
- import"./index-ew99d4y6.js";
55
- import"./index-5p1tzpwh.js";
56
- import"./index-9e6fdz2h.js";
57
- import"./index-4rhhvd1a.js";
58
- import"./index-p56xc59p.js";
59
- import"./index-m1nrd3yd.js";
60
- import"./index-zjygnfay.js";
61
- import"./index-ae75rja9.js";
62
- import"./index-tegp2mny.js";
63
- import"./index-ze5zyv28.js";
64
- import"./index-bk5tah7q.js";
65
- import"./index-fxxja498.js";
66
- import"./index-cyhw0der.js";
67
- import"./index-1dz8hv7p.js";
68
- import"./index-7g4c7s5r.js";
69
- import"./index-bpmtbmy9.js";
70
- import"./index-zgwm4ryv.js";
71
- import"./index-a76rekgs.js";
72
- export {
73
- resolveHiveKnowledgePath,
74
- promoteToHive,
75
- promoteFromSwarm,
76
- isHiveEligible,
77
- createHivePromoterHook,
78
- countDistinctProjects,
79
- checkHivePromotions,
80
- _internals
81
- };
@@ -1,42 +0,0 @@
1
- // @bun
2
- // src/utils/canonical-root.ts
3
- import * as fsSync from "fs";
4
- import * as path from "path";
5
- var SESSION_KEY_SEPARATOR = String.fromCharCode(0);
6
- var canonicalRootMemo = new Map;
7
- var MAX_CANONICAL_ROOT_CACHE = 128;
8
- function resolveCanonicalRootKey(directory) {
9
- let resolved = path.resolve(directory);
10
- try {
11
- resolved = fsSync.realpathSync(resolved);
12
- } catch {}
13
- const key = process.platform === "win32" ? resolved.toLowerCase() : resolved;
14
- return key;
15
- }
16
- function canonicalRootKey(directory) {
17
- const memoized = canonicalRootMemo.get(directory);
18
- if (memoized !== undefined)
19
- return memoized;
20
- const key = resolveCanonicalRootKey(directory);
21
- if (!canonicalRootMemo.has(directory)) {
22
- while (canonicalRootMemo.size >= MAX_CANONICAL_ROOT_CACHE) {
23
- const oldest = canonicalRootMemo.keys().next().value;
24
- if (oldest === undefined)
25
- break;
26
- canonicalRootMemo.delete(oldest);
27
- }
28
- }
29
- canonicalRootMemo.set(directory, key);
30
- return key;
31
- }
32
- function canonicalRootKeyFresh(directory) {
33
- return resolveCanonicalRootKey(directory);
34
- }
35
- function compositeSessionKey(directory, sessionId) {
36
- return `${canonicalRootKey(directory)}${SESSION_KEY_SEPARATOR}${sessionId}`;
37
- }
38
- function sessionKeySuffix(sessionId) {
39
- return `${SESSION_KEY_SEPARATOR}${sessionId}`;
40
- }
41
-
42
- export { canonicalRootKeyFresh, compositeSessionKey, sessionKeySuffix };