@ibgib/web-gib 0.0.63 → 0.0.65

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 (133) hide show
  1. package/README.md +4 -0
  2. package/dist/AUTO-GENERATED-version.d.mts +1 -1
  3. package/dist/AUTO-GENERATED-version.mjs +1 -1
  4. package/dist/api/commands/ibgib/get-ibgibs.mjs +4 -4
  5. package/dist/api/commands/ibgib/get-ibgibs.mjs.map +1 -1
  6. package/dist/identity/device-delegate-helper.mjs +5 -5
  7. package/dist/identity/device-delegate-helper.mjs.map +1 -1
  8. package/dist/identity/keystone-sync-service.mjs +3 -3
  9. package/dist/identity/keystone-sync-service.mjs.map +1 -1
  10. package/dist/index.d.mts +4 -0
  11. package/dist/index.d.mts.map +1 -1
  12. package/dist/index.mjs +6 -0
  13. package/dist/index.mjs.map +1 -1
  14. package/dist/storage/storage-helpers.web.mjs +1 -1
  15. package/dist/storage/storage-helpers.web.mjs.map +1 -1
  16. package/dist/ui/component/identity/add-device/add-device.d.mts.map +1 -1
  17. package/dist/ui/component/identity/add-device/add-device.mjs +1 -1
  18. package/dist/ui/component/identity/add-device/add-device.mjs.map +1 -1
  19. package/dist/ui/component/identity/identity-header/identity-header.d.mts.map +1 -1
  20. package/dist/ui/component/identity/identity-header/identity-header.mjs +4 -4
  21. package/dist/ui/component/identity/identity-header/identity-header.mjs.map +1 -1
  22. package/dist/ui/component/identity/keystone-details/keystone-details.mjs +2 -2
  23. package/dist/ui/component/identity/keystone-details/keystone-details.mjs.map +1 -1
  24. package/dist/ui/component/privacy-policy/index.d.mts +11 -0
  25. package/dist/ui/component/privacy-policy/index.d.mts.map +1 -0
  26. package/dist/ui/component/privacy-policy/index.mjs +16 -0
  27. package/dist/ui/component/privacy-policy/index.mjs.map +1 -0
  28. package/dist/ui/component/privacy-policy/privacy-policy.css +263 -0
  29. package/dist/ui/component/privacy-policy/privacy-policy.d.mts +46 -0
  30. package/dist/ui/component/privacy-policy/privacy-policy.d.mts.map +1 -0
  31. package/dist/ui/component/privacy-policy/privacy-policy.html +27 -0
  32. package/dist/ui/component/privacy-policy/privacy-policy.mjs +128 -0
  33. package/dist/ui/component/privacy-policy/privacy-policy.mjs.map +1 -0
  34. package/dist/ui/ui-constants.d.mts +4 -0
  35. package/dist/ui/ui-constants.d.mts.map +1 -1
  36. package/dist/ui/ui-constants.mjs +6 -0
  37. package/dist/ui/ui-constants.mjs.map +1 -1
  38. package/dist/witness/agent/gemini/gemini-helpers.mjs +4 -4
  39. package/dist/witness/agent/gemini/gemini-helpers.mjs.map +1 -1
  40. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-constants.d.mts +7 -0
  41. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-constants.d.mts.map +1 -0
  42. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-constants.mjs +7 -0
  43. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-constants.mjs.map +1 -0
  44. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-types.d.mts +24 -0
  45. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-types.d.mts.map +1 -0
  46. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-types.mjs +23 -0
  47. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-types.mjs.map +1 -0
  48. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.d.mts +85 -0
  49. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.d.mts.map +1 -0
  50. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.mjs +343 -0
  51. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.mjs.map +1 -0
  52. package/package.json +5 -5
  53. package/src/AUTO-GENERATED-version.mts +1 -1
  54. package/src/api/commands/ibgib/get-ibgibs.mts +4 -4
  55. package/src/helpers.mts +1 -1
  56. package/src/helpers.web.respec.mts +41 -10
  57. package/src/identity/device-delegate-helper.mts +5 -5
  58. package/src/identity/keystone-sync-service.mts +3 -3
  59. package/src/index.mts +8 -0
  60. package/src/storage/storage-helpers.web.mts +1 -1
  61. package/src/ui/component/identity/add-device/add-device.mts +5 -4
  62. package/src/ui/component/identity/identity-header/identity-header.mts +4 -3
  63. package/src/ui/component/identity/keystone-details/keystone-details.mts +2 -2
  64. package/src/ui/component/privacy-policy/index.mts +18 -0
  65. package/src/ui/component/privacy-policy/privacy-policy.css +263 -0
  66. package/src/ui/component/privacy-policy/privacy-policy.html +27 -0
  67. package/src/ui/component/privacy-policy/privacy-policy.mts +168 -0
  68. package/src/ui/ui-constants.mts +7 -0
  69. package/src/witness/agent/gemini/gemini-helpers.mts +4 -4
  70. package/src/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-constants.mts +8 -0
  71. package/src/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-types.mts +53 -0
  72. package/src/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.mts +424 -0
  73. package/src/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.respec.mts +305 -0
  74. package/tools/auto-generated-agent-skills/skills/ibgib-create-app/SKILL.md +65 -39
  75. package/tools/auto-generated-agent-skills/skills/ibgib-create-client-app/SKILL.md +51 -0
  76. package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/SKILL.md +26 -22
  77. package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/generate-id.js +1 -1
  78. package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-witness → ibgib-create-client-app-witness}/SKILL.md +11 -7
  79. package/tools/auto-generated-agent-skills/skills/ibgib-create-client-identity/SKILL.md +78 -0
  80. package/tools/auto-generated-agent-skills/skills/ibgib-create-client-shell/SKILL.md +42 -0
  81. package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-server → ibgib-create-server-app}/SKILL.md +6 -6
  82. package/tools/auto-generated-agent-skills/skills/ibgib-create-server-app/templates/Dockerfile.template +14 -0
  83. package/tools/auto-generated-agent-skills/skills/ibgib-create-server-app/templates/docker-compose.yml.template +33 -0
  84. package/tools/auto-generated-agent-skills/skills/ibgib-create-server-app/templates/server.mts.template +97 -0
  85. package/tools/auto-generated-agent-skills/skills/ibgib-create-server-app/templates/tsconfig.server.json.template +29 -0
  86. package/tools/auto-generated-agent-skills/skills/ibgib-implementation-plan/SKILL.md +11 -5
  87. package/tsconfig.json +2 -2
  88. package/dist/api/commands/command-service.respec.d.mts +0 -7
  89. package/dist/api/commands/command-service.respec.d.mts.map +0 -1
  90. package/dist/api/commands/command-service.respec.mjs +0 -66
  91. package/dist/api/commands/command-service.respec.mjs.map +0 -1
  92. package/dist/assumptions.respec.d.mts +0 -2
  93. package/dist/assumptions.respec.d.mts.map +0 -1
  94. package/dist/assumptions.respec.mjs +0 -41
  95. package/dist/assumptions.respec.mjs.map +0 -1
  96. package/dist/helpers.web.respec.d.mts +0 -2
  97. package/dist/helpers.web.respec.d.mts.map +0 -1
  98. package/dist/helpers.web.respec.mjs +0 -12
  99. package/dist/helpers.web.respec.mjs.map +0 -1
  100. package/dist/identity/device-delegate.respec.d.mts +0 -2
  101. package/dist/identity/device-delegate.respec.d.mts.map +0 -1
  102. package/dist/identity/device-delegate.respec.mjs +0 -106
  103. package/dist/identity/device-delegate.respec.mjs.map +0 -1
  104. package/dist/identity/passkey.respec.d.mts +0 -2
  105. package/dist/identity/passkey.respec.d.mts.map +0 -1
  106. package/dist/identity/passkey.respec.mjs +0 -169
  107. package/dist/identity/passkey.respec.mjs.map +0 -1
  108. package/dist/spec-helper.node.respec.d.mts +0 -13
  109. package/dist/spec-helper.node.respec.d.mts.map +0 -1
  110. package/dist/spec-helper.node.respec.mjs +0 -50
  111. package/dist/spec-helper.node.respec.mjs.map +0 -1
  112. package/dist/util/device-helper.respec.d.mts +0 -2
  113. package/dist/util/device-helper.respec.d.mts.map +0 -1
  114. package/dist/util/device-helper.respec.mjs +0 -83
  115. package/dist/util/device-helper.respec.mjs.map +0 -1
  116. package/tools/auto-generated-agent-skills/skills/ibgib-create-shell/SKILL.md +0 -40
  117. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/generate-version-file.js +0 -0
  118. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/bootstrap.mts.template +0 -0
  119. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/constants.mts.template +0 -0
  120. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/declarations.d.ts.template +0 -0
  121. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/helpers.web.mts.template +0 -0
  122. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/index.html.template +0 -0
  123. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/index.mts.template +0 -0
  124. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/script.mts.template +0 -0
  125. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/types.mts.template +0 -0
  126. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-witness → ibgib-create-client-app-witness}/templates/api/function-infos.web.mts.template +0 -0
  127. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-witness → ibgib-create-client-app-witness}/templates/witness/app/app-v1.mts.template +0 -0
  128. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-witness → ibgib-create-client-app-witness}/templates/witness/app/constants.mts.template +0 -0
  129. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-witness → ibgib-create-client-app-witness}/templates/witness/app/helper.mts.template +0 -0
  130. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-witness → ibgib-create-client-app-witness}/templates/witness/app/types.mts.template +0 -0
  131. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-shell → ibgib-create-client-shell}/templates/ui/shell/shell-constants.mts.template +0 -0
  132. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-shell → ibgib-create-client-shell}/templates/ui/shell/shell-service.mts.template +0 -0
  133. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-shell → ibgib-create-client-shell}/templates/ui/shell/shell-types.mts.template +0 -0
@@ -0,0 +1,85 @@
1
+ /**
2
+ * @module web-in-memory-workspace-projection-space-v1
3
+ *
4
+ * Concrete in-memory Web workspace projection space implementation.
5
+ * Projects B2tFS item DAGs into an in-memory virtual file tree and scans/observes
6
+ * virtual files for status and diff operations in browser environments.
7
+ */
8
+ import { IbGib_V1 } from '@ibgib/ts-gib/dist/V1/types.mjs';
9
+ import { IbGibSpaceAny } from '@ibgib/core-gib/dist/witness/space/space-base-v1.mjs';
10
+ import { WorkspaceProjectionSpaceBase_V1 } from '@ibgib/core-gib/dist/witness/space/workspace-projection-space/workspace-projection-space-base-v1.mjs';
11
+ import { WorkspaceScanResultData } from '@ibgib/core-gib/dist/witness/space/workspace-projection-space/workspace-projection-space-types.mjs';
12
+ import { B2tFSItemIbGib_V1 } from '@ibgib/core-gib/dist/vcs/item/item-types.mjs';
13
+ import { WebInMemoryWorkspaceProjectionSpaceData_V1, WebInMemoryWorkspaceProjectionSpaceRel8ns_V1 } from './web-in-memory-workspace-projection-space-types.mjs';
14
+ export interface WebInMemoryWorkspaceProjectionSpaceOpts {
15
+ initialData?: WebInMemoryWorkspaceProjectionSpaceData_V1;
16
+ initialRel8ns?: WebInMemoryWorkspaceProjectionSpaceRel8ns_V1;
17
+ backingSpace?: IbGibSpaceAny;
18
+ }
19
+ /**
20
+ * In-Memory Web Workspace Projection Space that projects B2tFS item DAGs into
21
+ * an in-memory virtual file tree for browser code browsing, editing, and staging.
22
+ */
23
+ export declare class WebInMemoryWorkspaceProjectionSpace_V1 extends WorkspaceProjectionSpaceBase_V1<WebInMemoryWorkspaceProjectionSpaceData_V1, WebInMemoryWorkspaceProjectionSpaceRel8ns_V1> {
24
+ protected lc: string;
25
+ /** Backing CAS space where source BinIbGibs and child items reside */
26
+ backingSpace?: IbGibSpaceAny;
27
+ /** Map of normalized relative paths -> virtual file entries */
28
+ private _virtualFiles;
29
+ constructor(initialDataOrOpts?: WebInMemoryWorkspaceProjectionSpaceData_V1 | WebInMemoryWorkspaceProjectionSpaceOpts, initialRel8ns?: WebInMemoryWorkspaceProjectionSpaceRel8ns_V1);
30
+ /**
31
+ * Projects an item (and its recursive child hierarchy or binary payload) onto the in-memory virtual tree.
32
+ */
33
+ protected putItemToWorkspaceImpl({ item, subPath, }: {
34
+ item: B2tFSItemIbGib_V1;
35
+ subPath?: string;
36
+ }): Promise<void>;
37
+ /**
38
+ * Scans the in-memory virtual workspace and returns file observations and pending companion notes.
39
+ */
40
+ protected scanWorkspaceImpl({ subPath, filterPatterns, }: {
41
+ subPath?: string;
42
+ filterPatterns?: string[];
43
+ }): Promise<WorkspaceScanResultData>;
44
+ /**
45
+ * Deletes a virtual file, folder, or comment entry from the in-memory tree.
46
+ */
47
+ protected deleteFromWorkspaceImpl({ relPath, ibGib, }: {
48
+ relPath?: string;
49
+ ibGib?: IbGib_V1;
50
+ }): Promise<void>;
51
+ /**
52
+ * Reads raw bytes of a virtual file from in-memory map.
53
+ */
54
+ protected getFileBytesImpl({ relPath, }: {
55
+ relPath: string;
56
+ }): Promise<Uint8Array | undefined>;
57
+ /**
58
+ * Gets raw byte content for a virtual file.
59
+ */
60
+ getVirtualFile(relPath: string): Uint8Array | undefined;
61
+ /**
62
+ * Gets UTF-8 text content for a virtual file.
63
+ */
64
+ getVirtualText(relPath: string): string | undefined;
65
+ /**
66
+ * Sets or updates a virtual file's content directly in memory.
67
+ */
68
+ setVirtualFile(relPath: string, content: Uint8Array | string): void;
69
+ /**
70
+ * Lists all virtual file and folder paths currently stored in memory.
71
+ */
72
+ listVirtualPaths(): string[];
73
+ /**
74
+ * Clears all virtual files from memory.
75
+ */
76
+ clearVirtualFiles(): void;
77
+ private normalizePath;
78
+ private isCommentMetadataFilename;
79
+ private extractCommentTopicName;
80
+ /**
81
+ * Helper to fetch an IbGib strictly from backingSpace with fail-fast validation.
82
+ */
83
+ private fetchIbGib;
84
+ }
85
+ //# sourceMappingURL=web-in-memory-workspace-projection-space-v1.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-in-memory-workspace-projection-space-v1.d.mts","sourceRoot":"","sources":["../../../../src/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.mts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAG3D,OAAO,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AAErF,OAAO,EAAE,+BAA+B,EAAE,MAAM,sGAAsG,CAAC;AACvJ,OAAO,EACH,uBAAuB,EAG1B,MAAM,oGAAoG,CAAC;AAC5G,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AAGjF,OAAO,EACH,0CAA0C,EAC1C,4CAA4C,EAG/C,MAAM,sDAAsD,CAAC;AAI9D,MAAM,WAAW,uCAAuC;IACpD,WAAW,CAAC,EAAE,0CAA0C,CAAC;IACzD,aAAa,CAAC,EAAE,4CAA4C,CAAC;IAC7D,YAAY,CAAC,EAAE,aAAa,CAAC;CAChC;AAED;;;GAGG;AACH,qBAAa,sCAAuC,SAAQ,+BAA+B,CACvF,0CAA0C,EAC1C,4CAA4C,CAC/C;IACG,UAAmB,EAAE,EAAE,MAAM,CAAsD;IAEnF,sEAAsE;IACtE,YAAY,CAAC,EAAE,aAAa,CAA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,CAAC,aAAa;IAIrB,OAAO,CAAC,yBAAyB;IAIjC,OAAO,CAAC,uBAAuB;IAK/B;;OAEG;YACW,UAAU;CAsB3B"}
@@ -0,0 +1,343 @@
1
+ /**
2
+ * @module web-in-memory-workspace-projection-space-v1
3
+ *
4
+ * Concrete in-memory Web workspace projection space implementation.
5
+ * Projects B2tFS item DAGs into an in-memory virtual file tree and scans/observes
6
+ * virtual files for status and diff operations in browser environments.
7
+ */
8
+ import { clone, extractErrorMsg } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
9
+ import { GLOBAL_LOG_A_LOT } from '@ibgib/core-gib/dist/core-constants.mjs';
10
+ import { getFromSpace } from '@ibgib/core-gib/dist/witness/space/space-helper.mjs';
11
+ import { WorkspaceProjectionSpaceBase_V1 } from '@ibgib/core-gib/dist/witness/space/workspace-projection-space/workspace-projection-space-base-v1.mjs';
12
+ import { isPathFiltered, parseFilterFileContent } from '@ibgib/core-gib/dist/vcs/filter/glob-helper.mjs';
13
+ import { DEFAULT_WEB_IN_MEMORY_WORKSPACE_PROJECTION_SPACE_DATA_V1, } from './web-in-memory-workspace-projection-space-types.mjs';
14
+ const logalot = GLOBAL_LOG_A_LOT;
15
+ /**
16
+ * In-Memory Web Workspace Projection Space that projects B2tFS item DAGs into
17
+ * an in-memory virtual file tree for browser code browsing, editing, and staging.
18
+ */
19
+ export class WebInMemoryWorkspaceProjectionSpace_V1 extends WorkspaceProjectionSpaceBase_V1 {
20
+ lc = `[${WebInMemoryWorkspaceProjectionSpace_V1.name}]`;
21
+ /** Backing CAS space where source BinIbGibs and child items reside */
22
+ backingSpace;
23
+ /** Map of normalized relative paths -> virtual file entries */
24
+ _virtualFiles = new Map();
25
+ constructor(initialDataOrOpts, initialRel8ns) {
26
+ let data;
27
+ let rel8ns = initialRel8ns;
28
+ let backingSpace;
29
+ if (initialDataOrOpts && ('workspaceRoot' in initialDataOrOpts || 'name' in initialDataOrOpts)) {
30
+ data = initialDataOrOpts;
31
+ }
32
+ else if (initialDataOrOpts && typeof initialDataOrOpts === 'object') {
33
+ const opts = initialDataOrOpts;
34
+ data = opts.initialData;
35
+ rel8ns = opts.initialRel8ns ?? initialRel8ns;
36
+ backingSpace = opts.backingSpace;
37
+ }
38
+ super(data ?? clone(DEFAULT_WEB_IN_MEMORY_WORKSPACE_PROJECTION_SPACE_DATA_V1), rel8ns);
39
+ this.backingSpace = backingSpace;
40
+ }
41
+ // #region Implementation of Abstract Extension Hooks
42
+ /**
43
+ * Projects an item (and its recursive child hierarchy or binary payload) onto the in-memory virtual tree.
44
+ */
45
+ async putItemToWorkspaceImpl({ item, subPath, }) {
46
+ const lc = `${this.lc}[${this.putItemToWorkspaceImpl.name}]`;
47
+ try {
48
+ if (logalot) {
49
+ console.log(`${lc} projecting item to virtual workspace...`);
50
+ }
51
+ if (!item || !item.data) {
52
+ throw new Error(`${lc} item and item.data are required (E: genuuid)`);
53
+ }
54
+ const { fsType, name } = item.data;
55
+ let itemRelPath;
56
+ if (subPath === undefined) {
57
+ itemRelPath = fsType === 'folder' ? '' : (name || '');
58
+ }
59
+ else {
60
+ itemRelPath = name ? (subPath ? `${subPath}/${name}` : name) : subPath;
61
+ }
62
+ itemRelPath = this.normalizePath(itemRelPath);
63
+ if (fsType === 'folder') {
64
+ if (itemRelPath) {
65
+ this._virtualFiles.set(itemRelPath, {
66
+ relPath: itemRelPath,
67
+ content: new Uint8Array(0),
68
+ isDirectory: true,
69
+ modifiedAt: Date.now(),
70
+ });
71
+ }
72
+ const childAddrs = item.rel8ns?.b2tFS_child || item.rel8ns?.b2tfs_child || [];
73
+ for (const childAddr of childAddrs) {
74
+ const childItem = (await this.fetchIbGib(childAddr));
75
+ await this.putItemToWorkspaceImpl({
76
+ item: childItem,
77
+ subPath: itemRelPath,
78
+ });
79
+ }
80
+ }
81
+ else if (fsType === 'file') {
82
+ if (!item.rel8ns) {
83
+ throw new Error(`${lc} item.rel8ns required for file item (E: genuuid)`);
84
+ }
85
+ const binAddrs = item.rel8ns.bin;
86
+ if (!binAddrs || binAddrs.length === 0) {
87
+ throw new Error(`${lc} item.rel8ns.bin required for file item ${name} (E: genuuid)`);
88
+ }
89
+ const latestBinAddr = binAddrs.at(-1);
90
+ const binIbGib = await this.fetchIbGib(latestBinAddr);
91
+ if (binIbGib.data === undefined) {
92
+ throw new Error(`${lc} BinIbGib at addr ${latestBinAddr} has undefined data (E: genuuid)`);
93
+ }
94
+ let fileData;
95
+ if (binIbGib.data instanceof Uint8Array) {
96
+ fileData = binIbGib.data;
97
+ }
98
+ else if (typeof binIbGib.data === 'string') {
99
+ fileData = new TextEncoder().encode(binIbGib.data);
100
+ }
101
+ else if (typeof binIbGib.data === 'object') {
102
+ const vals = Object.values(binIbGib.data);
103
+ fileData = new Uint8Array(vals);
104
+ }
105
+ else {
106
+ fileData = new Uint8Array(0);
107
+ }
108
+ this._virtualFiles.set(itemRelPath, {
109
+ relPath: itemRelPath,
110
+ content: fileData,
111
+ isDirectory: false,
112
+ modifiedAt: Date.now(),
113
+ });
114
+ }
115
+ }
116
+ catch (error) {
117
+ console.error(`${lc} ${extractErrorMsg(error)} (E: genuuid)`);
118
+ throw error;
119
+ }
120
+ }
121
+ /**
122
+ * Scans the in-memory virtual workspace and returns file observations and pending companion notes.
123
+ */
124
+ async scanWorkspaceImpl({ subPath, filterPatterns, }) {
125
+ const lc = `${this.lc}[${this.scanWorkspaceImpl.name}]`;
126
+ try {
127
+ if (logalot) {
128
+ console.log(`${lc} starting in-memory virtual scan...`);
129
+ }
130
+ const vcsFolderName = this.data?.vcsFolderName || '.vcsgib';
131
+ let patterns = filterPatterns ?? this.data?.filterPatterns;
132
+ if (!patterns || patterns.length === 0) {
133
+ const ignoreEntry = this._virtualFiles.get('.ibgibignore');
134
+ if (ignoreEntry && !ignoreEntry.isDirectory) {
135
+ const ignoreContent = new TextDecoder('utf8').decode(ignoreEntry.content);
136
+ patterns = parseFilterFileContent(ignoreContent);
137
+ }
138
+ else {
139
+ patterns = [];
140
+ }
141
+ }
142
+ const normalizedSubPath = subPath ? this.normalizePath(subPath) : '';
143
+ const files = new Map();
144
+ const pendingComments = [];
145
+ for (const [relPath, entry] of this._virtualFiles.entries()) {
146
+ if (normalizedSubPath && !relPath.startsWith(normalizedSubPath)) {
147
+ continue;
148
+ }
149
+ // Exclude VCS metadata folders, .git, and worktrees folder 'b'
150
+ if (relPath === vcsFolderName || relPath.startsWith(vcsFolderName + '/') ||
151
+ relPath === '.git' || relPath.startsWith('.git/') ||
152
+ relPath === 'b' || relPath.startsWith('b/')) {
153
+ continue;
154
+ }
155
+ if (isPathFiltered({ relativePath: relPath, isDirectory: entry.isDirectory, filterPatterns: patterns })) {
156
+ continue;
157
+ }
158
+ const filename = relPath.split('/').pop() || relPath;
159
+ if (entry.isDirectory) {
160
+ files.set(relPath, {
161
+ relPath,
162
+ fullPath: relPath,
163
+ isDirectory: true,
164
+ });
165
+ }
166
+ else {
167
+ if (this.isCommentMetadataFilename(filename)) {
168
+ const pathParts = relPath.split('/');
169
+ pathParts.pop();
170
+ const parentRelPath = pathParts.join('/');
171
+ const content = new TextDecoder('utf8').decode(entry.content);
172
+ const topicName = this.extractCommentTopicName(filename);
173
+ const targetRelPath = parentRelPath ? `${parentRelPath}/${topicName}` : topicName;
174
+ pendingComments.push({
175
+ commentRelPath: relPath,
176
+ commentFullPath: relPath,
177
+ targetRelPath,
178
+ targetType: filename.startsWith('.ib.') ? 'file' : 'folder',
179
+ topicName,
180
+ content,
181
+ });
182
+ }
183
+ else {
184
+ const digestBuf = await crypto.subtle.digest('SHA-256', entry.content);
185
+ const digestBytes = new Uint8Array(digestBuf);
186
+ let fileHash = '';
187
+ for (let i = 0; i < digestBytes.length; i++) {
188
+ fileHash += digestBytes[i].toString(16).padStart(2, '0');
189
+ }
190
+ files.set(relPath, {
191
+ relPath,
192
+ fullPath: relPath,
193
+ isDirectory: false,
194
+ fileHash,
195
+ size: entry.content.length,
196
+ });
197
+ }
198
+ }
199
+ }
200
+ return {
201
+ files,
202
+ pendingComments,
203
+ };
204
+ }
205
+ catch (error) {
206
+ console.error(`${lc} ${extractErrorMsg(error)} (E: genuuid)`);
207
+ throw error;
208
+ }
209
+ }
210
+ /**
211
+ * Deletes a virtual file, folder, or comment entry from the in-memory tree.
212
+ */
213
+ async deleteFromWorkspaceImpl({ relPath, ibGib, }) {
214
+ const lc = `${this.lc}[${this.deleteFromWorkspaceImpl.name}]`;
215
+ try {
216
+ if (logalot) {
217
+ console.log(`${lc} deleting from virtual workspace...`);
218
+ }
219
+ const targetRelPath = this.normalizePath(relPath || ibGib?.data?.name);
220
+ if (!targetRelPath) {
221
+ throw new Error(`${lc} relPath or item name required for deletion (E: genuuid)`);
222
+ }
223
+ // Remove target path and any nested children
224
+ const keysToDelete = [];
225
+ for (const key of this._virtualFiles.keys()) {
226
+ if (key === targetRelPath || key.startsWith(`${targetRelPath}/`)) {
227
+ keysToDelete.push(key);
228
+ }
229
+ }
230
+ for (const key of keysToDelete) {
231
+ this._virtualFiles.delete(key);
232
+ }
233
+ }
234
+ catch (error) {
235
+ console.error(`${lc} ${extractErrorMsg(error)} (E: genuuid)`);
236
+ throw error;
237
+ }
238
+ }
239
+ /**
240
+ * Reads raw bytes of a virtual file from in-memory map.
241
+ */
242
+ async getFileBytesImpl({ relPath, }) {
243
+ return this.getVirtualFile(relPath);
244
+ }
245
+ // #endregion
246
+ // #region In-Memory Virtual File Accessors
247
+ /**
248
+ * Gets raw byte content for a virtual file.
249
+ */
250
+ getVirtualFile(relPath) {
251
+ const normalized = this.normalizePath(relPath);
252
+ const entry = this._virtualFiles.get(normalized);
253
+ if (!entry || entry.isDirectory) {
254
+ return undefined;
255
+ }
256
+ return entry.content;
257
+ }
258
+ /**
259
+ * Gets UTF-8 text content for a virtual file.
260
+ */
261
+ getVirtualText(relPath) {
262
+ const bytes = this.getVirtualFile(relPath);
263
+ if (bytes === undefined) {
264
+ return undefined;
265
+ }
266
+ return new TextDecoder('utf8').decode(bytes);
267
+ }
268
+ /**
269
+ * Sets or updates a virtual file's content directly in memory.
270
+ */
271
+ setVirtualFile(relPath, content) {
272
+ const normalized = this.normalizePath(relPath);
273
+ const data = typeof content === 'string' ? new TextEncoder().encode(content) : content;
274
+ // Ensure parent directories exist
275
+ const parts = normalized.split('/');
276
+ for (let i = 1; i < parts.length; i++) {
277
+ const parentPath = parts.slice(0, i).join('/');
278
+ if (!this._virtualFiles.has(parentPath)) {
279
+ this._virtualFiles.set(parentPath, {
280
+ relPath: parentPath,
281
+ content: new Uint8Array(0),
282
+ isDirectory: true,
283
+ modifiedAt: Date.now(),
284
+ });
285
+ }
286
+ }
287
+ this._virtualFiles.set(normalized, {
288
+ relPath: normalized,
289
+ content: data,
290
+ isDirectory: false,
291
+ modifiedAt: Date.now(),
292
+ });
293
+ }
294
+ /**
295
+ * Lists all virtual file and folder paths currently stored in memory.
296
+ */
297
+ listVirtualPaths() {
298
+ return Array.from(this._virtualFiles.keys()).sort();
299
+ }
300
+ /**
301
+ * Clears all virtual files from memory.
302
+ */
303
+ clearVirtualFiles() {
304
+ this._virtualFiles.clear();
305
+ }
306
+ // #endregion
307
+ // #region Private Helpers
308
+ normalizePath(p) {
309
+ return p.replace(/\\/g, '/').replace(/^\/+/, '').replace(/\/+$/, '');
310
+ }
311
+ isCommentMetadataFilename(filename) {
312
+ return filename.startsWith('.ib.') && filename.endsWith('.md') && filename.length > '.ib..md'.length;
313
+ }
314
+ extractCommentTopicName(filename) {
315
+ if (!this.isCommentMetadataFilename(filename)) {
316
+ return '';
317
+ }
318
+ return filename.slice(4, -3);
319
+ }
320
+ /**
321
+ * Helper to fetch an IbGib strictly from backingSpace with fail-fast validation.
322
+ */
323
+ async fetchIbGib(addr) {
324
+ const lc = `${this.lc}[${this.fetchIbGib.name}]`;
325
+ try {
326
+ if (!this.backingSpace) {
327
+ throw new Error(`${lc} backingSpace required to fetch IbGib at ${addr} (E: genuuid)`);
328
+ }
329
+ const resGet = await getFromSpace({ space: this.backingSpace, addrs: [addr] });
330
+ if (!resGet.success || !resGet.ibGibs || resGet.ibGibs.length === 0) {
331
+ const resIbGib = resGet.rawResultIbGib;
332
+ const addrsNotFound = resIbGib?.data?.addrsNotFound ?? 'unknown';
333
+ throw new Error(`${lc} couldn't find addr ${addr} in backingSpace. addrsNotFound: ${addrsNotFound} (E: genuuid)`);
334
+ }
335
+ return resGet.ibGibs[0];
336
+ }
337
+ catch (error) {
338
+ console.error(`${lc} ${extractErrorMsg(error)} (E: genuuid)`);
339
+ throw error;
340
+ }
341
+ }
342
+ }
343
+ //# sourceMappingURL=web-in-memory-workspace-projection-space-v1.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-in-memory-workspace-projection-space-v1.mjs","sourceRoot":"","sources":["../../../../src/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.mts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAGzF,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAE3E,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,+BAA+B,EAAE,MAAM,sGAAsG,CAAC;AAOvJ,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AAEzG,OAAO,EAGH,wDAAwD,GAE3D,MAAM,sDAAsD,CAAC;AAE9D,MAAM,OAAO,GAAG,gBAAgB,CAAC;AAQjC;;;GAGG;AACH,MAAM,OAAO,sCAAuC,SAAQ,+BAG3D;IACsB,EAAE,GAAW,IAAI,sCAAsC,CAAC,IAAI,GAAG,CAAC;IAEnF,sEAAsE;IACtE,YAAY,CAAiB;IAE7B,+DAA+D;IACvD,aAAa,GAAkC,IAAI,GAAG,EAAE,CAAC;IAEjE,YACI,iBAAwG,EACxG,aAA4D;QAE5D,IAAI,IAA4D,CAAC;QACjE,IAAI,MAAM,GAA6D,aAAa,CAAC;QACrF,I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,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,eAAe,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YAC9D,MAAM,KAAK,CAAC;QAChB,CAAC;IACL,CAAC;CAGJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibgib/web-gib",
3
- "version": "0.0.63",
3
+ "version": "0.0.65",
4
4
  "description": "Framework for creating agentic ibGib web apps. Contains plumbing for ibgib components, agentic framework (currently only Gemini implemented), web-based IndexedDB storage substrate, and more.",
5
5
  "funding": {
6
6
  "type": "individual",
@@ -29,10 +29,10 @@
29
29
  "license": "ISC",
30
30
  "dependencies": {
31
31
  "@google/genai": "^1.33.0",
32
- "@ibgib/core-gib": "^0.1.77",
33
- "@ibgib/encrypt-gib": "^0.3.1",
34
- "@ibgib/helper-gib": "^0.0.37",
35
- "@ibgib/ts-gib": "^0.5.34"
32
+ "@ibgib/core-gib": "^0.1.79",
33
+ "@ibgib/encrypt-gib": "^0.3.2",
34
+ "@ibgib/helper-gib": "^0.0.38",
35
+ "@ibgib/ts-gib": "^0.5.35"
36
36
  },
37
37
  "engines": {
38
38
  "node": ">=19.0.0"
@@ -11,4 +11,4 @@
11
11
  /**
12
12
  * this is the version of this package, auto-updated in the build process
13
13
  */
14
- export const AUTO_GENERATED_VERSION = '0.0.63';
14
+ export const AUTO_GENERATED_VERSION = '0.0.65';
@@ -177,7 +177,7 @@ function getIbGibsViaCmd(opts: GetIbGibsOpts): Promise<GetIbGibsResult> {
177
177
  async function getIbGibsImpl(opts: GetIbGibsOpts): Promise<GetIbGibsResult> {
178
178
  const lc = `[${getIbGibsImpl.name}]`;
179
179
  try {
180
- if (logalot) { console.log(`${lc} starting... (I: genuuid)`); }
180
+ if (logalot) { console.log(`${lc} starting... (I: 28f62dfc5b284995a8651d38489ba826)`); }
181
181
 
182
182
  console.log(`${lc} ${CMD_CATEGORY} ${CMD_MODIFIERS} opts: ${pretty(opts)}`);
183
183
 
@@ -187,13 +187,13 @@ async function getIbGibsImpl(opts: GetIbGibsOpts): Promise<GetIbGibsResult> {
187
187
  if (ibGibAddrs.length === 0) { throw new Error(`ibGibAddrs is empty (E: f0b1462f482872acba0612c8eb461925)`); }
188
188
 
189
189
  const metaspace = await getGlobalMetaspace_waitIfNeeded();
190
- if (!metaspace) { throw new Error(`${lc} metaspace falsy ($1: 85aa77c76e583edda3549ff59fadf825)`); }
190
+ if (!metaspace) { throw new Error(`${lc} metaspace falsy (E: 85aa77c76e583edda3549ff59fadf825)`); }
191
191
  const space = await metaspace.getLocalUserSpace({ localSpaceId: spaceId });
192
192
  if (!space) {
193
193
  if (!spaceId) {
194
- throw new Error(`(UNEXPECTED) couldn't get default local user space? ($1: 9b1528024148052dd871b4f323881825)`);
194
+ throw new Error(`(UNEXPECTED) couldn't get default local user space? (E: 9b1528024148052dd871b4f323881825)`);
195
195
  } else {
196
- throw new Error(`could not get local user space for spaceId (${spaceId}) ($1: genuuid)`);
196
+ throw new Error(`could not get local user space for spaceId (${spaceId}) (E: a30578d52dd877853f6ad2e88fb59826)`);
197
197
  }
198
198
  }
199
199
 
package/src/helpers.mts CHANGED
@@ -905,7 +905,7 @@ export function getColorStrings(translucentAlpha: number, drivingHash: string):
905
905
  const g = parseInt(color.substring(3, 5), 16);
906
906
  const b = parseInt(color.substring(5, 7), 16);
907
907
  const yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;
908
-
908
+
909
909
  // Premium soft dark text vs off-white text
910
910
  const colorContrast = (yiq >= 128) ? '#11111b' : '#ffffff';
911
911
 
@@ -1,16 +1,47 @@
1
- import { pickRandom_Letters } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
2
1
  import { firstOfAll, ifWe, ifWeMight, iReckon, lastOfAll, respecfully, respecfullyDear } from '@ibgib/helper-gib/dist/respec-gib/respec-gib.mjs';
2
+ import { PathUtilsHelper } from './helpers.web.mjs';
3
+
3
4
  const maam = `[${import.meta.url}]`, sir = maam;
4
5
 
5
- // import { storageDBExists } from './helpers.web.mjs';
6
+ await respecfully(sir, `PathUtilsHelper`, async () => {
7
+ let pathUtils: PathUtilsHelper;
8
+
9
+ firstOfAll(sir, async () => {
10
+ pathUtils = new PathUtilsHelper();
11
+ });
12
+
13
+ await ifWe(sir, `check isAbsolute and isRelative`, async () => {
14
+ iReckon(sir, pathUtils.isAbsolute('/a/b/c')).isGonnaBeTrue();
15
+ iReckon(sir, pathUtils.isAbsolute('/file.txt')).isGonnaBeTrue();
16
+ iReckon(sir, pathUtils.isAbsolute('a/b/c')).isGonnaBeFalse();
17
+ iReckon(sir, pathUtils.isAbsolute('file.txt')).isGonnaBeFalse();
18
+
19
+ iReckon(sir, pathUtils.isRelative('a/b/c')).isGonnaBeTrue();
20
+ iReckon(sir, pathUtils.isRelative('file.txt')).isGonnaBeTrue();
21
+ iReckon(sir, pathUtils.isRelative('/a/b/c')).isGonnaBeFalse();
22
+ });
23
+
24
+ await ifWe(sir, `join empty paths or single ..`, async () => {
25
+ iReckon(sir, pathUtils.join()).isGonnaBe('.');
26
+ iReckon(sir, pathUtils.join('..')).isGonnaBe('..');
27
+ });
6
28
 
7
- //todo: do these tests once we get web testing going (this won't work in node)
29
+ await ifWe(sir, `join path segments`, async () => {
30
+ iReckon(sir, pathUtils.join('a', 'b', 'c')).isGonnaBe('a/b/c');
31
+ iReckon(sir, pathUtils.join('/a/', '/b/', 'c.txt')).isGonnaBe('a/b/c.txt');
32
+ iReckon(sir, pathUtils.join('foo', 'bar', '..')).isGonnaBe('foo');
33
+ iReckon(sir, pathUtils.join('foo', 'bar', '..', 'baz')).isGonnaBe('foo/baz');
34
+ });
8
35
 
9
- // await respecfully(sir, `indexeddb storage`, async () => {
36
+ await ifWe(sir, `extract dirname`, async () => {
37
+ iReckon(sir, pathUtils.dirname('a/b/c.txt')).isGonnaBe('a/b');
38
+ iReckon(sir, pathUtils.dirname('/root/sub/file.json')).isGonnaBe('/root/sub');
39
+ iReckon(sir, pathUtils.dirname('singlefile.txt')).isGonnaBe('');
40
+ });
10
41
 
11
- // await ifWe(sir, `storageDBExists`, async () => {
12
- // const randomName = pickRandom_Letters({ count: 7 });
13
- // const dbExists = await storageDBExists({ name: randomName });
14
- // iReckon(sir, dbExists).isGonnaBeFalse();
15
- // });
16
- // });
42
+ await ifWe(sir, `extract basename`, async () => {
43
+ iReckon(sir, pathUtils.basename('a/b/c.txt')).isGonnaBe('c.txt');
44
+ iReckon(sir, pathUtils.basename('/root/sub/file.json')).isGonnaBe('file.json');
45
+ iReckon(sir, pathUtils.basename('standalone')).isGonnaBe('standalone');
46
+ });
47
+ });
@@ -22,7 +22,7 @@ export const DEVICE_DELEGATE_SECRET_PREFIX = 'ibgib_device_delegate_secret_';
22
22
  */
23
23
  export function getDeviceDelegateSecretKey({ primaryTjpAddr }: { primaryTjpAddr: string }): string {
24
24
  if (!primaryTjpAddr) {
25
- throw new Error('primaryTjpAddr is required to get device delegate secret key (E: 1a2b3c4d5e6f7890123456789a000101)');
25
+ throw new Error('primaryTjpAddr is required to get device delegate secret key (E: genuuid)');
26
26
  }
27
27
  return `${DEVICE_DELEGATE_SECRET_PREFIX}${primaryTjpAddr}`;
28
28
  }
@@ -38,7 +38,7 @@ export async function getDeviceDelegateSecret({
38
38
  const lc = `[${getDeviceDelegateSecret.name}]`;
39
39
  try {
40
40
  if (!primaryTjpAddr) {
41
- throw new Error('primaryTjpAddr is required to get device delegate secret (E: 2a2b3c4d5e6f7890123456789a000102)');
41
+ throw new Error('primaryTjpAddr is required to get device delegate secret (E: genuuid)');
42
42
  }
43
43
 
44
44
  const dbName = getGlobalDbName();
@@ -65,10 +65,10 @@ export async function setDeviceDelegateSecret({
65
65
  const lc = `[${setDeviceDelegateSecret.name}]`;
66
66
  try {
67
67
  if (!primaryTjpAddr) {
68
- throw new Error('primaryTjpAddr is required to set device delegate secret (E: 3a2b3c4d5e6f7890123456789a000103)');
68
+ throw new Error('primaryTjpAddr is required to set device delegate secret (E: genuuid)');
69
69
  }
70
70
  if (!delegateSecret) {
71
- throw new Error('delegateSecret is required to set device delegate secret (E: 4a2b3c4d5e6f7890123456789a000104)');
71
+ throw new Error('delegateSecret is required to set device delegate secret (E: genuuid)');
72
72
  }
73
73
 
74
74
  const dbName = getGlobalDbName();
@@ -96,7 +96,7 @@ export async function getOrCreateDeviceDelegateSecret({
96
96
  const lc = `[${getOrCreateDeviceDelegateSecret.name}]`;
97
97
  try {
98
98
  if (!primaryTjpAddr) {
99
- throw new Error('primaryTjpAddr is required to get or create device delegate secret (E: 5a2b3c4d5e6f7890123456789a000105)');
99
+ throw new Error('primaryTjpAddr is required to get or create device delegate secret (E: genuuid)');
100
100
  }
101
101
 
102
102
  const existingSecret = await getDeviceDelegateSecret({ primaryTjpAddr });
@@ -77,11 +77,11 @@ export class KeystoneSyncService {
77
77
  try {
78
78
  if (!metaspace) metaspace = await getGlobalMetaspace_waitIfNeeded();
79
79
  if (!metaspace) {
80
- throw new Error(`${lc} (UNEXPECTED) metaspace falsy? (E: a1b2c3d4e5f60718293a4b5c6d7e8f90)`);
80
+ throw new Error(`${lc} (UNEXPECTED) metaspace falsy? (E: genuuid)`);
81
81
  }
82
82
  if (!space) space = await metaspace.getLocalUserSpace({ lock: false });
83
83
  if (!space) {
84
- throw new Error(`${lc} (UNEXPECTED) space falsy? (E: b2c3d4e5f60718293a4b5c6d7e8f90a1)`);
84
+ throw new Error(`${lc} (UNEXPECTED) space falsy? (E: genuuid)`);
85
85
  }
86
86
 
87
87
  const info = getGibInfo({ ibGibAddr: activePrimaryAddr });
@@ -107,7 +107,7 @@ export class KeystoneSyncService {
107
107
  space
108
108
  });
109
109
  if (!keystone) {
110
- throw new Error(`${lc} (UNEXPECTED) latest primary keystone not found for addr: ${activePrimaryAddr} (E: c3d4e5f60718293a4b5c6d7e8f90a1b2)`);
110
+ throw new Error(`${lc} (UNEXPECTED) latest primary keystone not found for addr: ${activePrimaryAddr} (E: genuuid)`);
111
111
  }
112
112
 
113
113
  if (keystone?.data?.delegates) {