@ibgib/web-gib 0.0.62 → 0.0.64

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 (98) 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/helpers.web.d.mts +17 -2
  5. package/dist/helpers.web.d.mts.map +1 -1
  6. package/dist/helpers.web.mjs +67 -2
  7. package/dist/helpers.web.mjs.map +1 -1
  8. package/dist/helpers.web.respec.mjs +37 -10
  9. package/dist/helpers.web.respec.mjs.map +1 -1
  10. package/dist/identity/passkey-helper.d.mts +7 -2
  11. package/dist/identity/passkey-helper.d.mts.map +1 -1
  12. package/dist/identity/passkey-helper.mjs +33 -12
  13. package/dist/identity/passkey-helper.mjs.map +1 -1
  14. package/dist/index.d.mts +3 -0
  15. package/dist/index.d.mts.map +1 -1
  16. package/dist/index.mjs +4 -0
  17. package/dist/index.mjs.map +1 -1
  18. package/dist/ui/component/identity/keystone-creator/keystone-creator.css +26 -0
  19. package/dist/ui/component/identity/keystone-creator/keystone-creator.d.mts.map +1 -1
  20. package/dist/ui/component/identity/keystone-creator/keystone-creator.html +18 -1
  21. package/dist/ui/component/identity/keystone-creator/keystone-creator.mjs +10 -2
  22. package/dist/ui/component/identity/keystone-creator/keystone-creator.mjs.map +1 -1
  23. package/dist/ui/component/identity/keystone-details/keystone-details.d.mts +12 -0
  24. package/dist/ui/component/identity/keystone-details/keystone-details.d.mts.map +1 -1
  25. package/dist/ui/component/identity/keystone-details/keystone-details.html +8 -0
  26. package/dist/ui/component/identity/keystone-details/keystone-details.mjs +419 -305
  27. package/dist/ui/component/identity/keystone-details/keystone-details.mjs.map +1 -1
  28. package/dist/ui/ui-helpers.d.mts.map +1 -1
  29. package/dist/ui/ui-helpers.mjs +7 -2
  30. package/dist/ui/ui-helpers.mjs.map +1 -1
  31. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-constants.d.mts +7 -0
  32. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-constants.d.mts.map +1 -0
  33. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-constants.mjs +7 -0
  34. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-constants.mjs.map +1 -0
  35. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-types.d.mts +24 -0
  36. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-types.d.mts.map +1 -0
  37. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-types.mjs +23 -0
  38. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-types.mjs.map +1 -0
  39. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.d.mts +85 -0
  40. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.d.mts.map +1 -0
  41. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.mjs +343 -0
  42. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.mjs.map +1 -0
  43. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.respec.d.mts +8 -0
  44. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.respec.d.mts.map +1 -0
  45. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.respec.mjs +249 -0
  46. package/dist/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.respec.mjs.map +1 -0
  47. package/package.json +2 -2
  48. package/src/AUTO-GENERATED-version.mts +1 -1
  49. package/src/helpers.mts +1 -1
  50. package/src/helpers.web.mts +95 -5
  51. package/src/helpers.web.respec.mts +41 -10
  52. package/src/identity/passkey-helper.mts +43 -10
  53. package/src/index.mts +5 -0
  54. package/src/ui/component/identity/keystone-creator/keystone-creator.css +26 -0
  55. package/src/ui/component/identity/keystone-creator/keystone-creator.html +18 -1
  56. package/src/ui/component/identity/keystone-creator/keystone-creator.mts +12 -2
  57. package/src/ui/component/identity/keystone-details/keystone-details.html +8 -0
  58. package/src/ui/component/identity/keystone-details/keystone-details.mts +474 -339
  59. package/src/ui/ui-helpers.mts +6 -2
  60. package/src/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-constants.mts +8 -0
  61. package/src/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-types.mts +53 -0
  62. package/src/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.mts +424 -0
  63. package/src/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.respec.mts +304 -0
  64. package/tools/auto-generated-agent-skills/skills/ibgib-create-app/SKILL.md +65 -39
  65. package/tools/auto-generated-agent-skills/skills/ibgib-create-client-app/SKILL.md +51 -0
  66. package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/SKILL.md +26 -22
  67. package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-witness → ibgib-create-client-app-witness}/SKILL.md +11 -7
  68. package/tools/auto-generated-agent-skills/skills/ibgib-create-client-identity/SKILL.md +78 -0
  69. package/tools/auto-generated-agent-skills/skills/ibgib-create-client-shell/SKILL.md +42 -0
  70. package/tools/auto-generated-agent-skills/skills/ibgib-create-server-app/SKILL.md +50 -0
  71. package/tools/auto-generated-agent-skills/skills/ibgib-create-server-app/templates/Dockerfile.template +14 -0
  72. package/tools/auto-generated-agent-skills/skills/ibgib-create-server-app/templates/docker-compose.yml.template +33 -0
  73. package/tools/auto-generated-agent-skills/skills/ibgib-create-server-app/templates/server.mts.template +97 -0
  74. package/tools/auto-generated-agent-skills/skills/ibgib-create-server-app/templates/tsconfig.server.json.template +29 -0
  75. package/tools/auto-generated-agent-skills/skills/ibgib-implementation-plan/SKILL.md +4 -1
  76. package/src/identity/custodian-delegate-helper.mts.bak +0 -7
  77. package/src/identity/sso/sso-config-helper.mts.bak +0 -52
  78. package/src/identity/sso/sso-custodian-service.mts.bak +0 -566
  79. package/src/identity/sso/sso-custodian-service.respec.mts.bak +0 -298
  80. package/tools/auto-generated-agent-skills/skills/ibgib-create-shell/SKILL.md +0 -40
  81. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/generate-id.js +0 -0
  82. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/generate-version-file.js +0 -0
  83. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/bootstrap.mts.template +0 -0
  84. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/constants.mts.template +0 -0
  85. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/declarations.d.ts.template +0 -0
  86. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/helpers.web.mts.template +0 -0
  87. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/index.html.template +0 -0
  88. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/index.mts.template +0 -0
  89. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/script.mts.template +0 -0
  90. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-core → ibgib-create-client-app-core}/templates/types.mts.template +0 -0
  91. /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
  92. /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
  93. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-witness → ibgib-create-client-app-witness}/templates/witness/app/constants.mts.template +0 -0
  94. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-witness → ibgib-create-client-app-witness}/templates/witness/app/helper.mts.template +0 -0
  95. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-app-witness → ibgib-create-client-app-witness}/templates/witness/app/types.mts.template +0 -0
  96. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-shell → ibgib-create-client-shell}/templates/ui/shell/shell-constants.mts.template +0 -0
  97. /package/tools/auto-generated-agent-skills/skills/{ibgib-create-shell → ibgib-create-client-shell}/templates/ui/shell/shell-service.mts.template +0 -0
  98. /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,249 @@
1
+ /**
2
+ * @module web-in-memory-workspace-projection-space-v1.respec
3
+ *
4
+ * Unit tests for WebInMemoryWorkspaceProjectionSpace_V1 verifying in-memory
5
+ * virtual tree reification, scanning, glob filtering, status observation, and deletion.
6
+ */
7
+ import { respecfully, ifWe, iReckon, firstOfEach } from '@ibgib/helper-gib/dist/respec-gib/respec-gib.mjs';
8
+ import { getIbGibAddr } from '@ibgib/ts-gib/dist/helper.mjs';
9
+ import { getGib } from '@ibgib/ts-gib/dist/V1/transforms/transform-helper.mjs';
10
+ import { hash } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
11
+ import { InnerSpace_V1 } from '@ibgib/core-gib/dist/witness/space/inner-space/inner-space-v1.mjs';
12
+ import { DEFAULT_INNER_SPACE_DATA_V1 } from '@ibgib/core-gib/dist/witness/space/inner-space/inner-space-types.mjs';
13
+ import { putInSpace, persistTransformResult, registerNewIbGib } from '@ibgib/core-gib/dist/witness/space/space-helper.mjs';
14
+ import { CMD_MODIFIER_WORKSPACE_SCAN } from '@ibgib/core-gib/dist/witness/space/workspace-projection-space/workspace-projection-space-constants.mjs';
15
+ import { getBinIb } from '@ibgib/core-gib/dist/common/other/ibgib-helper.mjs';
16
+ import { createB2tFSItemIbGib } from '@ibgib/core-gib/dist/vcs/item/item-helper.mjs';
17
+ import { BINARY_REL8N_NAME } from '@ibgib/core-gib/dist/vcs/item/item-types.mjs';
18
+ import { getRepoStatus } from '@ibgib/core-gib/dist/vcs/status/status-helper.mjs';
19
+ import { createB2tFSIndexIbGib } from '@ibgib/core-gib/dist/vcs/index/index-helper.mjs';
20
+ import { WebInMemoryWorkspaceProjectionSpace_V1 } from './web-in-memory-workspace-projection-space-v1.mjs';
21
+ const lc = `[web-in-memory-workspace-projection-space-v1.respec.mts]`;
22
+ async function createFileWithContent({ name, content, space, }) {
23
+ const textStr = typeof content === 'string' ? content : new TextDecoder('utf8').decode(content);
24
+ const dataBuffer = typeof content === 'string' ? new TextEncoder().encode(content) : content;
25
+ const fileHash = await hash({ s: textStr });
26
+ const fileExt = name.includes('.') ? name.split('.').pop() || 'txt' : 'txt';
27
+ const binIb = getBinIb({
28
+ binHash: fileHash,
29
+ binExt: fileExt,
30
+ binEncoding: 'utf8',
31
+ });
32
+ const binIbGib = {
33
+ ib: binIb,
34
+ data: dataBuffer,
35
+ };
36
+ binIbGib.gib = await getGib({ ibGib: binIbGib, hasTjp: false });
37
+ const binAddr = getIbGibAddr({ ibGib: binIbGib });
38
+ await putInSpace({ ibGib: binIbGib, space });
39
+ await registerNewIbGib({ ibGib: binIbGib, space });
40
+ const itemRes = await createB2tFSItemIbGib({
41
+ fsType: 'file',
42
+ name,
43
+ data: {
44
+ fileHash,
45
+ },
46
+ rel8ns: {
47
+ [BINARY_REL8N_NAME]: [binAddr],
48
+ },
49
+ });
50
+ await persistTransformResult({ resTransform: itemRes, space });
51
+ await registerNewIbGib({ ibGib: itemRes.newIbGib, space });
52
+ return itemRes.newIbGib;
53
+ }
54
+ await respecfully(lc, `WebInMemoryWorkspaceProjectionSpace_V1 Specs`, async () => {
55
+ let backingSpace;
56
+ let wsSpace;
57
+ firstOfEach(lc, async () => {
58
+ backingSpace = new InnerSpace_V1({
59
+ ...DEFAULT_INNER_SPACE_DATA_V1,
60
+ name: 'b2s_main',
61
+ uuid: 'test_backing_uuid_1',
62
+ });
63
+ await backingSpace.initialized;
64
+ wsSpace = new WebInMemoryWorkspaceProjectionSpace_V1({
65
+ initialData: {
66
+ name: 'test_in_memory_ws',
67
+ uuid: 'ws_uuid_1',
68
+ workspaceRoot: '/',
69
+ vcsFolderName: '.vcsgib',
70
+ },
71
+ backingSpace,
72
+ });
73
+ await wsSpace.initialized;
74
+ });
75
+ await respecfully(lc, `Reification into In-Memory Virtual Tree`, async () => {
76
+ await ifWe(lc, `reifies file and folder hierarchies into virtual file map`, async () => {
77
+ const file1 = await createFileWithContent({ name: 'main.ts', content: 'console.log("hello");', space: backingSpace });
78
+ const file1Addr = getIbGibAddr({ ibGib: file1 });
79
+ const file2 = await createFileWithContent({ name: 'helper.ts', content: 'export const x = 42;', space: backingSpace });
80
+ const file2Addr = getIbGibAddr({ ibGib: file2 });
81
+ const srcFolderRes = await createB2tFSItemIbGib({
82
+ fsType: 'folder',
83
+ name: 'src',
84
+ rel8ns: {
85
+ b2tfs_child: [file1Addr, file2Addr],
86
+ },
87
+ });
88
+ await persistTransformResult({ resTransform: srcFolderRes, space: backingSpace });
89
+ const srcFolder = srcFolderRes.newIbGib;
90
+ const srcFolderAddr = getIbGibAddr({ ibGib: srcFolder });
91
+ const readmeFile = await createFileWithContent({ name: 'README.md', content: '# Project Docs', space: backingSpace });
92
+ const readmeAddr = getIbGibAddr({ ibGib: readmeFile });
93
+ const rootFolderRes = await createB2tFSItemIbGib({
94
+ fsType: 'folder',
95
+ name: 'my-repo',
96
+ rel8ns: {
97
+ b2tfs_child: [srcFolderAddr, readmeAddr],
98
+ },
99
+ });
100
+ await persistTransformResult({ resTransform: rootFolderRes, space: backingSpace });
101
+ const rootFolder = rootFolderRes.newIbGib;
102
+ // Reify into projection space
103
+ await putInSpace({ ibGib: rootFolder, space: wsSpace });
104
+ // Verify virtual tree
105
+ const paths = wsSpace.listVirtualPaths();
106
+ iReckon(lc, paths).includes('src');
107
+ iReckon(lc, paths).includes('src/main.ts');
108
+ iReckon(lc, paths).includes('src/helper.ts');
109
+ iReckon(lc, paths).includes('README.md');
110
+ const mainText = wsSpace.getVirtualText('src/main.ts');
111
+ iReckon(lc, mainText).willEqual('console.log("hello");');
112
+ const readmeText = wsSpace.getVirtualText('README.md');
113
+ iReckon(lc, readmeText).willEqual('# Project Docs');
114
+ });
115
+ });
116
+ await respecfully(lc, `Virtual Workspace Scan & Observation`, async () => {
117
+ await ifWe(lc, `scans virtual files, computes sha256 hashes, and extracts companion comments`, async () => {
118
+ // Set up virtual files directly
119
+ wsSpace.setVirtualFile('src/index.ts', 'const a = 1;');
120
+ wsSpace.setVirtualFile('src/.ib.index.ts.md', '# Note on index.ts\nThis is a companion note.');
121
+ wsSpace.setVirtualFile('docs/guide.md', '# Guide');
122
+ wsSpace.setVirtualFile('node_modules/pkg/index.js', 'module.exports = {};');
123
+ wsSpace.setVirtualFile('debug.log', 'test log');
124
+ wsSpace.setVirtualFile('.ibgibignore', 'node_modules/\n*.log\n!important.log');
125
+ wsSpace.setVirtualFile('important.log', 'keep this log');
126
+ const resWitness = await wsSpace.witness({
127
+ ib: wsSpace.ib,
128
+ data: {
129
+ cmd: 'get',
130
+ cmdModifiers: [CMD_MODIFIER_WORKSPACE_SCAN],
131
+ },
132
+ });
133
+ iReckon(lc, resWitness?.data?.success).isGonnaBeTrue();
134
+ const scanData = resWitness?.data?.scanResult;
135
+ iReckon(lc, scanData).isGonnaBeTruthy();
136
+ const files = scanData.files;
137
+ iReckon(lc, files.has('src/index.ts')).isGonnaBeTrue();
138
+ iReckon(lc, files.has('docs/guide.md')).isGonnaBeTrue();
139
+ iReckon(lc, files.has('important.log')).isGonnaBeTrue();
140
+ // Filtered files
141
+ iReckon(lc, files.has('node_modules/pkg/index.js')).isGonnaBeFalse();
142
+ iReckon(lc, files.has('debug.log')).isGonnaBeFalse();
143
+ // File hash verification
144
+ const msgBytes = new TextEncoder().encode('const a = 1;');
145
+ const digestBuf = await crypto.subtle.digest('SHA-256', msgBytes.buffer);
146
+ const expectedHash = Array.from(new Uint8Array(digestBuf)).map(b => b.toString(16).padStart(2, '0')).join('');
147
+ iReckon(lc, files.get('src/index.ts')?.fileHash).willEqual(expectedHash);
148
+ // Pending comments
149
+ const comments = scanData.pendingComments;
150
+ iReckon(lc, comments.length).willEqual(1);
151
+ iReckon(lc, comments[0].topicName).willEqual('index.ts');
152
+ iReckon(lc, comments[0].targetRelPath).willEqual('src/index.ts');
153
+ iReckon(lc, comments[0].content).includes('Note on index.ts');
154
+ });
155
+ });
156
+ await respecfully(lc, `Isomorphic getRepoStatus with WebInMemoryWorkspaceProjectionSpace`, async () => {
157
+ await ifWe(lc, `detects untracked, modified, and deleted files in virtual workspace`, async () => {
158
+ const trackedFile = await createFileWithContent({ name: 'app.ts', content: 'version 1', space: backingSpace });
159
+ const trackedAddr = getIbGibAddr({ ibGib: trackedFile });
160
+ const rootFolderRes = await createB2tFSItemIbGib({
161
+ fsType: 'folder',
162
+ name: 'repo',
163
+ rel8ns: {
164
+ b2tfs_child: [trackedAddr],
165
+ },
166
+ });
167
+ await persistTransformResult({ resTransform: rootFolderRes, space: backingSpace });
168
+ const rootFolder = rootFolderRes.newIbGib;
169
+ const rootFolderAddr = getIbGibAddr({ ibGib: rootFolder });
170
+ // Create branch ibgib in backingSpace
171
+ const branchIbGib = {
172
+ ib: 'b2tfs_branch main',
173
+ data: {
174
+ name: 'main',
175
+ uuid: 'main_branch_uuid',
176
+ },
177
+ rel8ns: {
178
+ b2tfs_item: [rootFolderAddr],
179
+ },
180
+ };
181
+ branchIbGib.gib = await getGib({ ibGib: branchIbGib, hasTjp: false });
182
+ const branchAddr = getIbGibAddr({ ibGib: branchIbGib });
183
+ await putInSpace({ ibGib: branchIbGib, space: backingSpace });
184
+ await registerNewIbGib({ ibGib: branchIbGib, space: backingSpace });
185
+ // Reify into virtual space
186
+ await putInSpace({ ibGib: rootFolder, space: wsSpace });
187
+ const mockMetaspace = {
188
+ getLocalUserSpaces: async () => [backingSpace],
189
+ registerNewIbGib: async ({ ibGib }) => {
190
+ await putInSpace({ ibGib, space: backingSpace });
191
+ },
192
+ };
193
+ // Create index in backingSpace with unstaged working tree
194
+ let indexIbGib = await createB2tFSIndexIbGib({
195
+ spaceId: backingSpace.data?.uuid || 'test_backing_uuid_1',
196
+ activeSpaceId: backingSpace.data?.uuid || 'test_backing_uuid_1',
197
+ activeBranch: 'main',
198
+ branchAddr,
199
+ space: backingSpace,
200
+ metaspace: mockMetaspace,
201
+ });
202
+ // 1. Initial status: clean
203
+ let status = await getRepoStatus({
204
+ metaspace: mockMetaspace,
205
+ localSpace: backingSpace,
206
+ workspaceSpace: wsSpace,
207
+ indexIbGib,
208
+ });
209
+ iReckon(lc, status.untracked.length).willEqual(0);
210
+ iReckon(lc, status.modified.length).willEqual(0);
211
+ iReckon(lc, status.deleted.length).willEqual(0);
212
+ // 2. Modify app.ts in virtual space
213
+ wsSpace.setVirtualFile('app.ts', 'version 2 modified');
214
+ // 3. Add untracked new-file.ts in virtual space
215
+ wsSpace.setVirtualFile('new-file.ts', 'new content');
216
+ status = await getRepoStatus({
217
+ metaspace: mockMetaspace,
218
+ localSpace: backingSpace,
219
+ workspaceSpace: wsSpace,
220
+ indexIbGib,
221
+ });
222
+ const modPaths = status.modified.map(m => m.path);
223
+ const untrackedPaths = status.untracked.map(u => u.path);
224
+ iReckon(lc, modPaths).includes('app.ts');
225
+ iReckon(lc, untrackedPaths).includes('new-file.ts');
226
+ // 4. Delete app.ts from virtual space
227
+ await wsSpace.witness({
228
+ ib: wsSpace.ib,
229
+ data: {
230
+ cmd: 'delete',
231
+ },
232
+ ibGibs: [{
233
+ ib: 'item',
234
+ data: { name: 'app.ts' },
235
+ }],
236
+ });
237
+ status = await getRepoStatus({
238
+ metaspace: mockMetaspace,
239
+ localSpace: backingSpace,
240
+ workspaceSpace: wsSpace,
241
+ indexIbGib,
242
+ });
243
+ const delPaths = status.deleted.map(d => d.path);
244
+ iReckon(lc, delPaths).includes('app.ts');
245
+ iReckon(lc, status.untracked.map(u => u.path)).includes('new-file.ts');
246
+ });
247
+ });
248
+ });
249
+ //# sourceMappingURL=web-in-memory-workspace-projection-space-v1.respec.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-in-memory-workspace-projection-space-v1.respec.mjs","sourceRoot":"","sources":["../../../../src/witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.respec.mts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACH,WAAW,EAAE,IAAI,EAAa,OAAO,EAAE,WAAW,EACrD,MAAM,kDAAkD,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,uDAAuD,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAE,MAAM,iDAAiD,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,mEAAmE,CAAC;AAClG,OAAO,EAAE,2BAA2B,EAAE,MAAM,sEAAsE,CAAC;AACnH,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AAC3H,OAAO,EAAE,2BAA2B,EAAE,MAAM,wGAAwG,CAAC;AACrJ,OAAO,EAAE,QAAQ,EAAE,MAAM,oDAAoD,CAAC;AAE9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAqB,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AACpG,OAAO,EAAE,aAAa,EAAE,MAAM,mDAAmD,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAyB,MAAM,iDAAiD,CAAC;AAG/G,OAAO,EAAE,sCAAsC,EAAE,MAAM,mDAAmD,CAAC;AAE3G,MAAM,EAAE,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AO,CAAC,EAAE,EAAE,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;QAC3E,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibgib/web-gib",
3
- "version": "0.0.62",
3
+ "version": "0.0.64",
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,7 +29,7 @@
29
29
  "license": "ISC",
30
30
  "dependencies": {
31
31
  "@google/genai": "^1.33.0",
32
- "@ibgib/core-gib": "^0.1.76",
32
+ "@ibgib/core-gib": "^0.1.78",
33
33
  "@ibgib/encrypt-gib": "^0.3.1",
34
34
  "@ibgib/helper-gib": "^0.0.37",
35
35
  "@ibgib/ts-gib": "^0.5.34"
@@ -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.62';
14
+ export const AUTO_GENERATED_VERSION = '0.0.64';
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
 
@@ -427,9 +427,13 @@ export async function promptForText({
427
427
  import { evaluatePasskeyPrf, isPasskeyPrfSupported } from "./identity/passkey-helper.mjs";
428
428
  import { KeystonePasskeyEntry } from "@ibgib/core-gib/dist/keystone/keystone-types.mjs";
429
429
 
430
+ export interface AuthoritySecretResult {
431
+ secret: string;
432
+ poolId: string;
433
+ }
434
+
430
435
  /**
431
- * not implemented atow (12/2024). I think we'll have perhaps a modal dialog
432
- * with a known name and get at it that way.
436
+ * Prompts the user for a secret, supporting both master password and passkey/hardware authenticators.
433
437
  */
434
438
  export async function promptForSecret({
435
439
  msg,
@@ -444,7 +448,7 @@ export async function promptForSecret({
444
448
  try {
445
449
  if (logalot) { console.log(`${lc} starting... (I: 795a4ce348ddb9a5119770f4c572ac24)`); }
446
450
 
447
- let result: string | undefined = undefined;
451
+ let result: any = undefined;
448
452
 
449
453
  let firstTry = true;
450
454
  let attempts = 0;
@@ -458,6 +462,7 @@ export async function promptForSecret({
458
462
  credentialId: passkeyEntry.credentialId,
459
463
  salt: passkeyEntry.salt,
460
464
  transports: passkeyEntry.transports,
465
+ userVerification: 'preferred'
461
466
  });
462
467
  return passkeySecret;
463
468
  }
@@ -481,9 +486,13 @@ export async function promptForSecret({
481
486
  });
482
487
  if (result === undefined) { throw new Error(`user cancelled (E: 91519d04378e84106f3df8eb36d99725)`); }
483
488
 
489
+ if (typeof result === 'object' && result?.secret !== undefined) {
490
+ result = result.secret;
491
+ }
492
+
484
493
  if (confirm) {
485
494
  await delay(250);
486
- let result2 = await showFullscreenDialog({
495
+ let result2: any = await showFullscreenDialog({
487
496
  title: 'Shh...',
488
497
  msg: 'Confirm...',
489
498
  prompt: true,
@@ -492,6 +501,9 @@ export async function promptForSecret({
492
501
  defaultValue: undefined,
493
502
  });
494
503
  if (result2 === undefined) { result = undefined; }
504
+ if (typeof result2 === 'object' && result2?.secret !== undefined) {
505
+ result2 = result2.secret;
506
+ }
495
507
  if (result !== result2) {
496
508
  result = undefined;
497
509
  firstTry = false;
@@ -499,7 +511,6 @@ export async function promptForSecret({
499
511
  }
500
512
  }
501
513
 
502
-
503
514
  } while (result === undefined);
504
515
 
505
516
  return result;
@@ -511,6 +522,85 @@ export async function promptForSecret({
511
522
  }
512
523
  }
513
524
 
525
+ /**
526
+ * Unified authority prompt that inspects the candidate pools on a keystone and prompts the user
527
+ * to authorize via either Master Password or a specific Passkey.
528
+ * Returns both the verified secret and the exact signingPoolId to use for keystone operations.
529
+ */
530
+ export async function promptForAuthoritySecret({
531
+ keystone,
532
+ aggregatedDetails,
533
+ title,
534
+ msg,
535
+ verb = 'manage',
536
+ }: {
537
+ keystone: any;
538
+ aggregatedDetails?: any;
539
+ title?: string;
540
+ msg?: string;
541
+ verb?: string;
542
+ }): Promise<AuthoritySecretResult> {
543
+ const lc = `[${promptForAuthoritySecret.name}]`;
544
+ try {
545
+ const passkeysMap = aggregatedDetails?.passkeys
546
+ || (keystone.data as any)?.frameDetails?.passkeys
547
+ || (keystone.data as any)?.passkeys
548
+ || {};
549
+
550
+ const prfSupported = await isPasskeyPrfSupported().catch(() => false);
551
+ const onPasskeyAuth = (prfSupported && passkeysMap && Object.keys(passkeysMap).length > 0)
552
+ ? async (passkeyEntry?: any) => {
553
+ if (!passkeyEntry) return undefined;
554
+ const { passkeySecret } = await evaluatePasskeyPrf({
555
+ credentialId: passkeyEntry.credentialId,
556
+ salt: passkeyEntry.salt,
557
+ transports: passkeyEntry.transports,
558
+ userVerification: 'preferred'
559
+ });
560
+ return passkeySecret;
561
+ }
562
+ : undefined;
563
+
564
+ const candidatePools = (keystone.data?.challengePools || []).filter((p: any) =>
565
+ p.id === 'manage' ||
566
+ p.id.startsWith('passkey-manage-') ||
567
+ (p.config?.allowedVerbs && verb && p.config.allowedVerbs.includes(verb))
568
+ );
569
+
570
+ const hasPasswordPool = candidatePools.some((p: any) => p.id === 'manage');
571
+
572
+ const dialogResult: any = await showFullscreenDialog({
573
+ title: title || 'Authorize Action',
574
+ msg: msg || 'Authorize this action with your master password or passkey:',
575
+ prompt: true,
576
+ showInput: hasPasswordPool,
577
+ isPassword: true,
578
+ defaultValue: undefined,
579
+ passkeys: passkeysMap,
580
+ onPasskeyAuth,
581
+ });
582
+
583
+ if (!dialogResult) {
584
+ throw new Error("Action cancelled by user.");
585
+ }
586
+
587
+ if (typeof dialogResult === 'object' && dialogResult.secret !== undefined) {
588
+ return {
589
+ secret: dialogResult.secret,
590
+ poolId: dialogResult.poolId || 'manage'
591
+ };
592
+ }
593
+
594
+ return {
595
+ secret: String(dialogResult),
596
+ poolId: 'manage'
597
+ };
598
+ } catch (error) {
599
+ console.error(`${lc} ${extractErrorMsg(error)}`);
600
+ throw error;
601
+ }
602
+ }
603
+
514
604
  /**
515
605
  * prompt specifically looking to confirm something. if "cancelled", returns
516
606
  * false.
@@ -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
+ });
@@ -91,12 +91,18 @@ export async function registerPasskeyCredential({
91
91
  rpName = 'ibgib',
92
92
  rpId,
93
93
  salt,
94
+ userVerification = 'preferred',
95
+ authenticatorAttachment,
96
+ hints = ['security-key', 'client-device', 'hybrid'],
94
97
  }: {
95
98
  username: string;
96
99
  displayName?: string;
97
100
  rpName?: string;
98
101
  rpId?: string;
99
102
  salt?: string | Uint8Array;
103
+ userVerification?: UserVerificationRequirement;
104
+ authenticatorAttachment?: AuthenticatorAttachment;
105
+ hints?: ('security-key' | 'client-device' | 'hybrid')[];
100
106
  }): Promise<{
101
107
  credentialId: string;
102
108
  rawId: ArrayBuffer;
@@ -137,8 +143,10 @@ export async function registerPasskeyCredential({
137
143
  ],
138
144
  authenticatorSelection: {
139
145
  residentKey: 'required',
140
- userVerification: 'required'
146
+ userVerification,
147
+ ...(authenticatorAttachment ? { authenticatorAttachment } : {})
141
148
  },
149
+ ...(hints && hints.length > 0 ? { hints } : {}),
142
150
  extensions: {
143
151
  prf: prfExtension
144
152
  } as any
@@ -184,11 +192,15 @@ export async function evaluatePasskeyPrf({
184
192
  credentialId,
185
193
  transports,
186
194
  rpId,
195
+ userVerification = 'preferred',
196
+ hints = ['security-key', 'client-device', 'hybrid'],
187
197
  }: {
188
198
  salt: string | Uint8Array;
189
199
  credentialId?: string;
190
200
  transports?: AuthenticatorTransport[];
191
201
  rpId?: string;
202
+ userVerification?: UserVerificationRequirement;
203
+ hints?: ('security-key' | 'client-device' | 'hybrid')[];
192
204
  }): Promise<{
193
205
  passkeySecret: string;
194
206
  credentialId: string;
@@ -203,6 +215,7 @@ export async function evaluatePasskeyPrf({
203
215
  const challenge = crypto.getRandomValues(new Uint8Array(32));
204
216
  const saltBuffer = normalizeSaltTo32Bytes(salt);
205
217
 
218
+ let credentialIdBase64Url: string | undefined = undefined;
206
219
  let allowCredentials: PublicKeyCredentialDescriptor[] | undefined = undefined;
207
220
  if (credentialId) {
208
221
  const rawBytes = hexToUint8Array(credentialId);
@@ -211,6 +224,24 @@ export async function evaluatePasskeyPrf({
211
224
  type: 'public-key' as const,
212
225
  ...(transports && transports.length > 0 ? { transports } : {})
213
226
  }];
227
+ let binary = '';
228
+ for (let i = 0; i < rawBytes.byteLength; i++) {
229
+ binary += String.fromCharCode(rawBytes[i]);
230
+ }
231
+ credentialIdBase64Url = btoa(binary).replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '');
232
+ }
233
+
234
+ const prfExtension: any = {
235
+ eval: {
236
+ first: saltBuffer
237
+ }
238
+ };
239
+ if (credentialIdBase64Url) {
240
+ prfExtension.evalByCredential = {
241
+ [credentialIdBase64Url]: {
242
+ first: saltBuffer
243
+ }
244
+ };
214
245
  }
215
246
 
216
247
  const assertion = await navigator.credentials.get({
@@ -218,13 +249,10 @@ export async function evaluatePasskeyPrf({
218
249
  challenge,
219
250
  ...(effectiveRpId ? { rpId: effectiveRpId } : {}),
220
251
  allowCredentials,
221
- userVerification: 'required',
252
+ userVerification,
253
+ ...(hints && hints.length > 0 ? { hints } : {}),
222
254
  extensions: {
223
- prf: {
224
- eval: {
225
- first: saltBuffer
226
- }
227
- }
255
+ prf: prfExtension
228
256
  } as any
229
257
  }
230
258
  }) as PublicKeyCredential;
@@ -235,11 +263,16 @@ export async function evaluatePasskeyPrf({
235
263
 
236
264
  const resolvedCredentialId = bufferToHex(assertion.rawId);
237
265
  const extResults: any = assertion.getClientExtensionResults?.() || {};
238
- console.log(`${lc} WebAuthn assertion clientExtensionResults:`, extResults);
239
- const prfResult = extResults.prf?.results?.first;
266
+ console.log(`${lc} WebAuthn assertion clientExtensionResults:`, JSON.stringify(extResults), extResults);
267
+
268
+ let prfResult: ArrayBuffer | undefined = extResults.prf?.results?.first;
269
+ if (!prfResult && credentialIdBase64Url && extResults.prf?.resultsByCredential?.[credentialIdBase64Url]?.first) {
270
+ prfResult = extResults.prf.resultsByCredential[credentialIdBase64Url].first;
271
+ console.log(`${lc} Extracted PRF result from resultsByCredential!`);
272
+ }
240
273
 
241
274
  if (!prfResult) {
242
- console.error(`${lc} Extension results did not contain PRF evaluation:`, extResults);
275
+ console.error(`${lc} Extension results did not contain PRF evaluation:`, JSON.stringify(extResults), extResults);
243
276
  throw new Error('Authenticator did not return a PRF evaluation. PRF extension may not be supported on this authenticator.');
244
277
  }
245
278
 
package/src/index.mts CHANGED
@@ -29,3 +29,8 @@ export * from "./ui/component/identity/index.mjs";
29
29
  export * from "./ui/ui-constants.mjs";
30
30
  export * from "./ui/ui-types.mjs";
31
31
 
32
+ // Workspace Projection Spaces
33
+ export * from "./witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-v1.mjs";
34
+ export * from "./witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-types.mjs";
35
+ export * from "./witness/space/web-in-memory-workspace-projection-space/web-in-memory-workspace-projection-space-constants.mjs";
36
+