@undefineds.co/xpod 0.3.6 → 0.3.14

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 (249) hide show
  1. package/config/cli.json +1 -1
  2. package/config/cloud.json +54 -22
  3. package/config/local.json +56 -12
  4. package/config/resolver.json +10 -2
  5. package/config/xpod.base.json +50 -0
  6. package/config/xpod.json +8 -8
  7. package/dist/agents/config/resolve.js +10 -10
  8. package/dist/agents/config/resolve.js.map +1 -1
  9. package/dist/api/chatkit/index.d.ts +1 -1
  10. package/dist/api/chatkit/index.js.map +1 -1
  11. package/dist/api/chatkit/pod-store.d.ts +14 -11
  12. package/dist/api/chatkit/pod-store.js +114 -78
  13. package/dist/api/chatkit/pod-store.js.map +1 -1
  14. package/dist/api/chatkit/runtime/AcpAgentRuntime.js +1 -1
  15. package/dist/api/chatkit/runtime/AcpAgentRuntime.js.map +1 -1
  16. package/dist/api/chatkit/service.js +1 -1
  17. package/dist/api/chatkit/service.js.map +1 -1
  18. package/dist/api/chatkit/types.d.ts +11 -11
  19. package/dist/api/chatkit/types.js +3 -3
  20. package/dist/api/chatkit/types.js.map +1 -1
  21. package/dist/api/container/cloud.js +0 -8
  22. package/dist/api/container/cloud.js.map +1 -1
  23. package/dist/api/container/index.js +2 -1
  24. package/dist/api/container/index.js.map +1 -1
  25. package/dist/api/container/local.js +0 -7
  26. package/dist/api/container/local.js.map +1 -1
  27. package/dist/api/container/routes.js +3 -17
  28. package/dist/api/container/routes.js.map +1 -1
  29. package/dist/api/container/types.d.ts +0 -2
  30. package/dist/api/container/types.js.map +1 -1
  31. package/dist/api/handlers/PodManagementHandler.d.ts +3 -0
  32. package/dist/api/handlers/PodManagementHandler.js +71 -1
  33. package/dist/api/handlers/PodManagementHandler.js.map +1 -1
  34. package/dist/api/handlers/RunHandler.js +5 -5
  35. package/dist/api/handlers/RunHandler.js.map +1 -1
  36. package/dist/api/runs/AgentRuntimeTypes.d.ts +7 -8
  37. package/dist/api/runs/AgentRuntimeTypes.js.map +1 -1
  38. package/dist/api/runs/InngestRunExecutionBackend.d.ts +2 -2
  39. package/dist/api/runs/ManagedRunWorker.d.ts +1 -1
  40. package/dist/api/runs/ManagedRunWorker.js +6 -6
  41. package/dist/api/runs/ManagedRunWorker.js.map +1 -1
  42. package/dist/api/runs/PiAgentRuntimeDriver.d.ts +16 -1
  43. package/dist/api/runs/PiAgentRuntimeDriver.js +182 -23
  44. package/dist/api/runs/PiAgentRuntimeDriver.js.map +1 -1
  45. package/dist/api/runs/RunStateCenter.d.ts +3 -3
  46. package/dist/api/runs/RunStateCenter.js +13 -13
  47. package/dist/api/runs/RunStateCenter.js.map +1 -1
  48. package/dist/api/runs/store.d.ts +4 -4
  49. package/dist/api/runs/store.js +2 -2
  50. package/dist/api/runs/store.js.map +1 -1
  51. package/dist/api/service/VectorStoreService.d.ts +1 -1
  52. package/dist/api/service/VectorStoreService.js +16 -16
  53. package/dist/api/service/VectorStoreService.js.map +1 -1
  54. package/dist/api/tasks/InngestTaskScheduler.d.ts +4 -4
  55. package/dist/api/tasks/TaskMaterializer.d.ts +3 -3
  56. package/dist/api/tasks/TaskMaterializer.js +11 -11
  57. package/dist/api/tasks/TaskMaterializer.js.map +1 -1
  58. package/dist/api/tasks/TaskService.d.ts +3 -3
  59. package/dist/api/tasks/TaskService.js +11 -7
  60. package/dist/api/tasks/TaskService.js.map +1 -1
  61. package/dist/api/tasks/store.d.ts +10 -4
  62. package/dist/api/tasks/store.js +14 -4
  63. package/dist/api/tasks/store.js.map +1 -1
  64. package/dist/api/workspace/types.d.ts +3 -3
  65. package/dist/api/workspace/types.js +6 -6
  66. package/dist/api/workspace/types.js.map +1 -1
  67. package/dist/cli/commands/config.js +2 -2
  68. package/dist/cli/commands/config.js.map +1 -1
  69. package/dist/cli/commands/start.js +9 -3
  70. package/dist/cli/commands/start.js.map +1 -1
  71. package/dist/components/components.jsonld +8 -2
  72. package/dist/components/context.jsonld +302 -51
  73. package/dist/http/search/SearchHttpHandler.js +8 -8
  74. package/dist/http/search/SearchHttpHandler.js.map +1 -1
  75. package/dist/identity/drizzle/PodLookupRepository.d.ts +11 -1
  76. package/dist/identity/drizzle/PodLookupRepository.js +95 -4
  77. package/dist/identity/drizzle/PodLookupRepository.js.map +1 -1
  78. package/dist/identity/drizzle/db.js +4 -43
  79. package/dist/identity/drizzle/db.js.map +1 -1
  80. package/dist/identity/drizzle/schema.pg.d.ts +0 -5
  81. package/dist/identity/drizzle/schema.pg.js +2 -16
  82. package/dist/identity/drizzle/schema.pg.js.map +1 -1
  83. package/dist/identity/drizzle/schema.sqlite.d.ts +19 -176
  84. package/dist/identity/drizzle/schema.sqlite.js +2 -16
  85. package/dist/identity/drizzle/schema.sqlite.js.map +1 -1
  86. package/dist/identity/oidc/AutoDetectIdentityProviderHandler.d.ts +4 -4
  87. package/dist/identity/oidc/AutoDetectIdentityProviderHandler.js +7 -7
  88. package/dist/identity/oidc/AutoDetectIdentityProviderHandler.js.map +1 -1
  89. package/dist/identity/oidc/AutoDetectIdentityProviderHandler.jsonld +6 -6
  90. package/dist/identity/oidc/AutoDetectOidcHandler.d.ts +4 -4
  91. package/dist/identity/oidc/AutoDetectOidcHandler.js +6 -6
  92. package/dist/identity/oidc/AutoDetectOidcHandler.js.map +1 -1
  93. package/dist/identity/oidc/AutoDetectOidcHandler.jsonld +6 -6
  94. package/dist/identity/oidc/ScopedPickWebIdHandler.d.ts +37 -0
  95. package/dist/identity/oidc/ScopedPickWebIdHandler.js +211 -0
  96. package/dist/identity/oidc/ScopedPickWebIdHandler.js.map +1 -0
  97. package/dist/identity/oidc/ScopedPickWebIdHandler.jsonld +158 -0
  98. package/dist/index.d.ts +12 -2
  99. package/dist/index.js +16 -4
  100. package/dist/index.js.map +1 -1
  101. package/dist/main.js +8 -2
  102. package/dist/main.js.map +1 -1
  103. package/dist/provision/ProvisionPodCreator.d.ts +3 -4
  104. package/dist/provision/ProvisionPodCreator.js +8 -13
  105. package/dist/provision/ProvisionPodCreator.js.map +1 -1
  106. package/dist/provision/ProvisionPodCreator.jsonld +7 -7
  107. package/dist/runtime/Proxy.d.ts +0 -1
  108. package/dist/runtime/Proxy.js +0 -9
  109. package/dist/runtime/Proxy.js.map +1 -1
  110. package/dist/runtime/bootstrap.d.ts +1 -0
  111. package/dist/runtime/bootstrap.js +5 -2
  112. package/dist/runtime/bootstrap.js.map +1 -1
  113. package/dist/runtime/css-process.d.ts +12 -4
  114. package/dist/runtime/css-process.js +61 -14
  115. package/dist/runtime/css-process.js.map +1 -1
  116. package/dist/runtime/oidc-issuer.d.ts +3 -2
  117. package/dist/runtime/oidc-issuer.js +3 -2
  118. package/dist/runtime/oidc-issuer.js.map +1 -1
  119. package/dist/runtime/runtime-types.d.ts +1 -0
  120. package/dist/runtime/runtime-types.js.map +1 -1
  121. package/dist/solidfs/LocalFirstRdfRepresentationResolver.d.ts +21 -0
  122. package/dist/solidfs/LocalFirstRdfRepresentationResolver.js +38 -0
  123. package/dist/solidfs/LocalFirstRdfRepresentationResolver.js.map +1 -0
  124. package/dist/solidfs/LocalSolidFS.d.ts +18 -0
  125. package/dist/solidfs/LocalSolidFS.js +539 -0
  126. package/dist/solidfs/LocalSolidFS.js.map +1 -0
  127. package/dist/solidfs/PodSolidFsHttpClient.d.ts +16 -0
  128. package/dist/solidfs/PodSolidFsHttpClient.js +93 -0
  129. package/dist/solidfs/PodSolidFsHttpClient.js.map +1 -0
  130. package/dist/solidfs/PodSolidFsHydrator.d.ts +27 -0
  131. package/dist/solidfs/PodSolidFsHydrator.js +127 -0
  132. package/dist/solidfs/PodSolidFsHydrator.js.map +1 -0
  133. package/dist/solidfs/PodSolidFsSyncer.d.ts +21 -0
  134. package/dist/solidfs/PodSolidFsSyncer.js +78 -0
  135. package/dist/solidfs/PodSolidFsSyncer.js.map +1 -0
  136. package/dist/solidfs/RdfIndexSolidFsSyncer.d.ts +22 -0
  137. package/dist/solidfs/RdfIndexSolidFsSyncer.js +131 -0
  138. package/dist/solidfs/RdfIndexSolidFsSyncer.js.map +1 -0
  139. package/dist/solidfs/index.d.ts +7 -0
  140. package/dist/solidfs/index.js +24 -0
  141. package/dist/solidfs/index.js.map +1 -0
  142. package/dist/solidfs/types.d.ts +131 -0
  143. package/dist/solidfs/types.js +19 -0
  144. package/dist/solidfs/types.js.map +1 -0
  145. package/dist/storage/RepresentationPartialConvertingStore.js +6 -13
  146. package/dist/storage/RepresentationPartialConvertingStore.js.map +1 -1
  147. package/dist/storage/SparqlUpdateResourceStore.d.ts +4 -0
  148. package/dist/storage/SparqlUpdateResourceStore.js +13 -0
  149. package/dist/storage/SparqlUpdateResourceStore.js.map +1 -1
  150. package/dist/storage/SparqlUpdateResourceStore.jsonld +26 -0
  151. package/dist/storage/accessors/MixDataAccessor.d.ts +85 -4
  152. package/dist/storage/accessors/MixDataAccessor.js +511 -16
  153. package/dist/storage/accessors/MixDataAccessor.js.map +1 -1
  154. package/dist/storage/accessors/MixDataAccessor.jsonld +176 -1
  155. package/dist/storage/accessors/QuintStoreSparqlDataAccessor.d.ts +7 -0
  156. package/dist/storage/accessors/QuintStoreSparqlDataAccessor.js +72 -4
  157. package/dist/storage/accessors/QuintStoreSparqlDataAccessor.js.map +1 -1
  158. package/dist/storage/accessors/QuintStoreSparqlDataAccessor.jsonld +24 -0
  159. package/dist/storage/quint/BaseQuintStore.d.ts +3 -0
  160. package/dist/storage/quint/BaseQuintStore.js +51 -27
  161. package/dist/storage/quint/BaseQuintStore.js.map +1 -1
  162. package/dist/storage/quint/PgQuintStore.d.ts +1 -0
  163. package/dist/storage/quint/PgQuintStore.js +50 -32
  164. package/dist/storage/quint/PgQuintStore.js.map +1 -1
  165. package/dist/storage/quint/PgQuintStore.jsonld +4 -3
  166. package/dist/storage/quint/SqliteQuintStore.d.ts +5 -0
  167. package/dist/storage/quint/SqliteQuintStore.js +100 -0
  168. package/dist/storage/quint/SqliteQuintStore.js.map +1 -1
  169. package/dist/storage/quint/SqliteQuintStore.jsonld +20 -0
  170. package/dist/storage/quint/types.d.ts +16 -0
  171. package/dist/storage/quint/types.js.map +1 -1
  172. package/dist/storage/rdf/Rdf3xTripleIndex.d.ts +55 -0
  173. package/dist/storage/rdf/Rdf3xTripleIndex.js +1235 -0
  174. package/dist/storage/rdf/Rdf3xTripleIndex.js.map +1 -0
  175. package/dist/storage/rdf/RdfContentTypes.d.ts +9 -0
  176. package/dist/storage/rdf/RdfContentTypes.js +79 -0
  177. package/dist/storage/rdf/RdfContentTypes.js.map +1 -0
  178. package/dist/storage/rdf/RdfLocalQueryEngine.d.ts +76 -0
  179. package/dist/storage/rdf/RdfLocalQueryEngine.js +2636 -0
  180. package/dist/storage/rdf/RdfLocalQueryEngine.js.map +1 -0
  181. package/dist/storage/rdf/RdfQuadIndex.d.ts +98 -0
  182. package/dist/storage/rdf/RdfQuadIndex.js +1840 -0
  183. package/dist/storage/rdf/RdfQuadIndex.js.map +1 -0
  184. package/dist/storage/rdf/RdfQuadIndex.jsonld +416 -0
  185. package/dist/storage/rdf/RdfShadowComparator.d.ts +12 -0
  186. package/dist/storage/rdf/RdfShadowComparator.js +47 -0
  187. package/dist/storage/rdf/RdfShadowComparator.js.map +1 -0
  188. package/dist/storage/rdf/RdfSparqlAdapter.d.ts +147 -0
  189. package/dist/storage/rdf/RdfSparqlAdapter.js +2420 -0
  190. package/dist/storage/rdf/RdfSparqlAdapter.js.map +1 -0
  191. package/dist/storage/rdf/RdfSparqlAdapter.jsonld +414 -0
  192. package/dist/storage/rdf/RdfTermDictionary.d.ts +27 -0
  193. package/dist/storage/rdf/RdfTermDictionary.js +352 -0
  194. package/dist/storage/rdf/RdfTermDictionary.js.map +1 -0
  195. package/dist/storage/rdf/RdfTermDictionary.jsonld +114 -0
  196. package/dist/storage/rdf/RdfTermSemantics.d.ts +6 -0
  197. package/dist/storage/rdf/RdfTermSemantics.js +40 -0
  198. package/dist/storage/rdf/RdfTermSemantics.js.map +1 -0
  199. package/dist/storage/rdf/RdfTextIndex.d.ts +23 -0
  200. package/dist/storage/rdf/RdfTextIndex.js +569 -0
  201. package/dist/storage/rdf/RdfTextIndex.js.map +1 -0
  202. package/dist/storage/rdf/RdfVectorIndex.d.ts +22 -0
  203. package/dist/storage/rdf/RdfVectorIndex.js +631 -0
  204. package/dist/storage/rdf/RdfVectorIndex.js.map +1 -0
  205. package/dist/storage/rdf/RdfXmlSerializer.d.ts +2 -0
  206. package/dist/storage/rdf/RdfXmlSerializer.js +123 -0
  207. package/dist/storage/rdf/RdfXmlSerializer.js.map +1 -0
  208. package/dist/storage/rdf/ShadowRdfQuintStore.d.ts +58 -0
  209. package/dist/storage/rdf/ShadowRdfQuintStore.js +202 -0
  210. package/dist/storage/rdf/ShadowRdfQuintStore.js.map +1 -0
  211. package/dist/storage/rdf/ShadowRdfQuintStore.jsonld +308 -0
  212. package/dist/storage/rdf/SolidRdfEngine.d.ts +51 -0
  213. package/dist/storage/rdf/SolidRdfEngine.js +264 -0
  214. package/dist/storage/rdf/SolidRdfEngine.js.map +1 -0
  215. package/dist/storage/rdf/SolidRdfEngine.jsonld +338 -0
  216. package/dist/storage/rdf/SolidRdfSparqlEngine.d.ts +92 -0
  217. package/dist/storage/rdf/SolidRdfSparqlEngine.js +477 -0
  218. package/dist/storage/rdf/SolidRdfSparqlEngine.js.map +1 -0
  219. package/dist/storage/rdf/SolidRdfSparqlEngine.jsonld +257 -0
  220. package/dist/storage/rdf/index.d.ts +15 -0
  221. package/dist/storage/rdf/index.js +61 -0
  222. package/dist/storage/rdf/index.js.map +1 -0
  223. package/dist/storage/rdf/models-benchmark.d.ts +260 -0
  224. package/dist/storage/rdf/models-benchmark.js +1405 -0
  225. package/dist/storage/rdf/models-benchmark.js.map +1 -0
  226. package/dist/storage/rdf/types.d.ts +726 -0
  227. package/dist/storage/rdf/types.js +3 -0
  228. package/dist/storage/rdf/types.js.map +1 -0
  229. package/dist/storage/rdf/types.jsonld +316 -0
  230. package/dist/storage/vector/VectorIndexingListener.d.ts +5 -5
  231. package/dist/storage/vector/VectorIndexingListener.js +19 -19
  232. package/dist/storage/vector/VectorIndexingListener.js.map +1 -1
  233. package/package.json +3 -2
  234. package/templates/pod/acp/.acr.hbs +39 -0
  235. package/templates/pod/acp/README.acr +18 -0
  236. package/templates/pod/acp/profile/card.acr +22 -0
  237. package/templates/pod/base/README$.md.hbs +27 -0
  238. package/templates/pod/base/profile/card$.ttl.hbs +13 -0
  239. package/templates/pod/wac/.acl.hbs +26 -0
  240. package/templates/pod/wac/README.acl.hbs +14 -0
  241. package/templates/pod/wac/profile/card.acl.hbs +19 -0
  242. package/dist/api/handlers/WebIdProfileHandler.d.ts +0 -16
  243. package/dist/api/handlers/WebIdProfileHandler.js +0 -423
  244. package/dist/api/handlers/WebIdProfileHandler.js.map +0 -1
  245. package/dist/identity/drizzle/WebIdProfileRepository.d.ts +0 -63
  246. package/dist/identity/drizzle/WebIdProfileRepository.js +0 -168
  247. package/dist/identity/drizzle/WebIdProfileRepository.js.map +0 -1
  248. package/dist/identity/drizzle/WebIdProfileRepository.jsonld +0 -112
  249. package/dist/storage/quint/BaseQuintStore.jsonld +0 -257
@@ -1,45 +1,92 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.buildCssChildEnv = buildCssChildEnv;
7
+ exports.createCssChildRuntimeConfig = createCssChildRuntimeConfig;
4
8
  exports.buildCssArgs = buildCssArgs;
5
9
  exports.buildApiChildEnv = buildApiChildEnv;
10
+ const node_fs_1 = __importDefault(require("node:fs"));
11
+ const node_path_1 = __importDefault(require("node:path"));
6
12
  const oidc_issuer_1 = require("./oidc-issuer");
7
13
  /**
8
14
  * Build the environment for the CSS child process.
9
15
  *
10
- * The public process-level contract is CSS_OIDC_ISSUER. CSS itself only
11
- * receives the internal Components shorthand via --idpUrl; passing the env
12
- * through can make yargs derive an unsupported oidcIssuer argument.
16
+ * `oidcIssuer` is an xpod shorthand value, not a CSS CLI argument.
17
+ * The legacy CSS child process path injects it through a generated
18
+ * Components.js config instead of CSS_* env aliases.
13
19
  */
14
- function buildCssChildEnv(baseUrl, cssPort, baseEnv = process.env) {
20
+ function buildCssChildEnv(baseUrl, cssPort, oidcIssuer, baseEnv = process.env) {
15
21
  const env = {
16
22
  ...baseEnv,
17
23
  CSS_PORT: cssPort.toString(),
18
24
  CSS_BASE_URL: baseUrl,
19
25
  };
20
- delete env.CSS_OIDC_ISSUER;
21
- delete env.CSS_IDP_URL;
22
- delete env.XPOD_OIDC_ISSUER;
23
- delete env.oidcIssuer;
24
- delete env.idpUrl;
26
+ for (const key of Object.keys(env)) {
27
+ if (key === 'oidcIssuer' || isExternalOidcPollutionKey(key)) {
28
+ delete env[key];
29
+ }
30
+ }
25
31
  return env;
26
32
  }
33
+ function isExternalOidcPollutionKey(key) {
34
+ const normalized = key.toUpperCase().replace(/[^A-Z0-9]/g, '');
35
+ return normalized.includes('OIDCISSUER') ||
36
+ normalized.includes('IDPURL') ||
37
+ normalized.includes('IDPJWKSURL') ||
38
+ normalized.includes('IDENTITYPROVIDERURL') ||
39
+ normalized.includes('IDENTITYPROVIDERJWKSURL');
40
+ }
41
+ function toImportSpecifier(fromFilePath, toFilePath) {
42
+ const fromDirectory = node_path_1.default.dirname(fromFilePath);
43
+ const relativePath = node_path_1.default.relative(fromDirectory, toFilePath).replace(/\\/g, '/');
44
+ if (relativePath.startsWith('./') || relativePath.startsWith('../')) {
45
+ return relativePath;
46
+ }
47
+ return `./${relativePath}`;
48
+ }
49
+ function createCssChildRuntimeConfig(options) {
50
+ node_fs_1.default.mkdirSync(options.runtimeRoot, { recursive: true });
51
+ const runtimeConfigPath = node_path_1.default.join(options.runtimeRoot, 'css-child-runtime.config.json');
52
+ node_fs_1.default.writeFileSync(runtimeConfigPath, JSON.stringify({
53
+ '@context': [
54
+ 'https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^8.0.0/components/context.jsonld',
55
+ 'https://linkedsoftwaredependencies.org/bundles/npm/@undefineds.co/xpod/^0.0.0/components/context.jsonld',
56
+ 'https://linkedsoftwaredependencies.org/bundles/npm/asynchronous-handlers/^1.0.0/components/context.jsonld',
57
+ ],
58
+ import: [
59
+ toImportSpecifier(runtimeConfigPath, options.configPath),
60
+ ],
61
+ '@graph': [],
62
+ }, null, 2), 'utf-8');
63
+ if (options.externalOidcIssuer) {
64
+ node_fs_1.default.writeFileSync(node_path_1.default.join(options.runtimeRoot, 'package.json'), JSON.stringify({
65
+ private: true,
66
+ name: 'xpod-css-runtime',
67
+ }, null, 2), 'utf-8');
68
+ node_fs_1.default.writeFileSync(node_path_1.default.join(options.runtimeRoot, '.community-solid-server.config.json'), JSON.stringify({
69
+ oidcIssuer: options.externalOidcIssuer,
70
+ }, null, 2), 'utf-8');
71
+ }
72
+ return {
73
+ configPath: runtimeConfigPath,
74
+ cwd: options.externalOidcIssuer ? options.runtimeRoot : undefined,
75
+ };
76
+ }
27
77
  function buildCssArgs(options) {
28
- const args = [
78
+ return [
29
79
  options.cssBinary,
30
80
  '-c', options.configPath,
31
81
  '-m', options.cssModuleRoot,
32
82
  '-p', options.cssPort.toString(),
33
83
  '-b', options.baseUrl,
34
84
  ];
35
- if (options.externalOidcIssuer) {
36
- args.push('--idpUrl', options.externalOidcIssuer);
37
- }
38
- return args;
39
85
  }
40
86
  function buildApiChildEnv(options) {
41
87
  return {
42
88
  ...(options.baseEnv ?? process.env),
89
+ ...(options.externalOidcIssuer ? { oidcIssuer: options.externalOidcIssuer } : {}),
43
90
  API_PORT: options.apiPort.toString(),
44
91
  XPOD_MAIN_PORT: options.mainPort.toString(),
45
92
  CSS_INTERNAL_URL: `http://localhost:${options.cssPort}`,
@@ -1 +1 @@
1
- {"version":3,"file":"css-process.js","sourceRoot":"","sources":["../../src/runtime/css-process.ts"],"names":[],"mappings":";;AASA,4CAkBC;AAED,oCAmBC;AAED,4CAkBC;AApED,+CAAkD;AAElD;;;;;;GAM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C,OAAO,CAAC,kBAAkB,CAAC;YAC/C,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,aAAa;KACV,CAAC;AAC9B,CAAC","sourcesContent":["import { oidcTokenEndpoint } from './oidc-issuer';\n\n/**\n * Build the environment for the CSS child process.\n *\n * The public process-level contract is CSS_OIDC_ISSUER. CSS itself only\n * receives the internal Components shorthand via --idpUrl; passing the env\n * through can make yargs derive an unsupported oidcIssuer argument.\n */\nexport function buildCssChildEnv(\n baseUrl: string,\n cssPort: number,\n baseEnv: NodeJS.ProcessEnv = process.env,\n): Record<string, string> {\n const env: Record<string, string> = {\n ...baseEnv,\n CSS_PORT: cssPort.toString(),\n CSS_BASE_URL: baseUrl,\n } as Record<string, string>;\n\n delete env.CSS_OIDC_ISSUER;\n delete env.CSS_IDP_URL;\n delete env.XPOD_OIDC_ISSUER;\n delete env.oidcIssuer;\n delete env.idpUrl;\n\n return env;\n}\n\nexport function buildCssArgs(options: {\n cssBinary: string\n configPath: string\n cssModuleRoot: string\n cssPort: number\n baseUrl: string\n externalOidcIssuer?: string\n}): string[] {\n const args = [\n options.cssBinary,\n '-c', options.configPath,\n '-m', options.cssModuleRoot,\n '-p', options.cssPort.toString(),\n '-b', options.baseUrl,\n ];\n if (options.externalOidcIssuer) {\n args.push('--idpUrl', options.externalOidcIssuer);\n }\n return args;\n}\n\nexport function buildApiChildEnv(options: {\n apiPort: number\n mainPort: number\n cssPort: number\n baseUrl: string\n externalOidcIssuer?: string\n baseEnv?: NodeJS.ProcessEnv\n}): Record<string, string> {\n return {\n ...(options.baseEnv ?? process.env),\n API_PORT: options.apiPort.toString(),\n XPOD_MAIN_PORT: options.mainPort.toString(),\n CSS_INTERNAL_URL: `http://localhost:${options.cssPort}`,\n CSS_BASE_URL: options.baseUrl,\n CSS_TOKEN_ENDPOINT: options.externalOidcIssuer\n ? oidcTokenEndpoint(options.externalOidcIssuer)\n : `${options.baseUrl}.oidc/token`,\n } as Record<string, string>;\n}\n"]}
1
+ {"version":3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E,OAAO,CAAC,CAAC;IACxB,CAAC;IAED,OAAO;QACL,UAAU,EAAE,iBAAiB;QAC7B,GAAG,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS;KAClE,CAAC;AACJ,CAAC;AAED,SAAgB,YAAY,CAAC,OAO5B;IACC,OAAO;QACL,OAAO,CAAC,SAAS;QACjB,IAAI,EAAE,OAAO,CAAC,UAAU;QACxB,IAAI,EAAE,OAAO,CAAC,aAAa;QAC3B,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE;QAChC,IAAI,EAAE,OAAO,CAAC,OAAO;KACtB,CAAC;AACJ,CAAC;AAED,SAAgB,gBAAgB,CAAC,OAOhC;IACC,OAAO;QACL,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC;QACnC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjF,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE;QACpC,cAAc,EAAE,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE;QAC3C,gBAAgB,EAAE,oBAAoB,OAAO,CAAC,OAAO,EAAE;QACvD,YAAY,EAAE,OAAO,CAAC,OAAO;QAC7B,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;YAC5C,CAAC,CAAC,IAAA,+BAAiB,EAAC,OAAO,CAAC,kBAAkB,CAAC;YAC/C,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,aAAa;KACV,CAAC;AAC9B,CAAC","sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport { oidcTokenEndpoint } from './oidc-issuer';\n\n/**\n * Build the environment for the CSS child process.\n *\n * `oidcIssuer` is an xpod shorthand value, not a CSS CLI argument.\n * The legacy CSS child process path injects it through a generated\n * Components.js config instead of CSS_* env aliases.\n */\nexport function buildCssChildEnv(\n baseUrl: string,\n cssPort: number,\n oidcIssuer?: string,\n baseEnv: NodeJS.ProcessEnv = process.env,\n): Record<string, string> {\n const env: Record<string, string> = {\n ...baseEnv,\n CSS_PORT: cssPort.toString(),\n CSS_BASE_URL: baseUrl,\n } as Record<string, string>;\n\n for (const key of Object.keys(env)) {\n if (key === 'oidcIssuer' || isExternalOidcPollutionKey(key)) {\n delete env[key];\n }\n }\n\n return env;\n}\n\nfunction isExternalOidcPollutionKey(key: string): boolean {\n const normalized = key.toUpperCase().replace(/[^A-Z0-9]/g, '');\n return normalized.includes('OIDCISSUER') ||\n normalized.includes('IDPURL') ||\n normalized.includes('IDPJWKSURL') ||\n normalized.includes('IDENTITYPROVIDERURL') ||\n normalized.includes('IDENTITYPROVIDERJWKSURL');\n}\n\nfunction toImportSpecifier(fromFilePath: string, toFilePath: string): string {\n const fromDirectory = path.dirname(fromFilePath);\n const relativePath = path.relative(fromDirectory, toFilePath).replace(/\\\\/g, '/');\n if (relativePath.startsWith('./') || relativePath.startsWith('../')) {\n return relativePath;\n }\n return `./${relativePath}`;\n}\n\nexport function createCssChildRuntimeConfig(options: {\n configPath: string\n runtimeRoot: string\n externalOidcIssuer?: string\n}): { configPath: string; cwd?: string } {\n fs.mkdirSync(options.runtimeRoot, { recursive: true });\n const runtimeConfigPath = path.join(options.runtimeRoot, 'css-child-runtime.config.json');\n fs.writeFileSync(runtimeConfigPath, JSON.stringify({\n '@context': [\n 'https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^8.0.0/components/context.jsonld',\n 'https://linkedsoftwaredependencies.org/bundles/npm/@undefineds.co/xpod/^0.0.0/components/context.jsonld',\n 'https://linkedsoftwaredependencies.org/bundles/npm/asynchronous-handlers/^1.0.0/components/context.jsonld',\n ],\n import: [\n toImportSpecifier(runtimeConfigPath, options.configPath),\n ],\n '@graph': [],\n }, null, 2), 'utf-8');\n\n if (options.externalOidcIssuer) {\n fs.writeFileSync(path.join(options.runtimeRoot, 'package.json'), JSON.stringify({\n private: true,\n name: 'xpod-css-runtime',\n }, null, 2), 'utf-8');\n fs.writeFileSync(path.join(options.runtimeRoot, '.community-solid-server.config.json'), JSON.stringify({\n oidcIssuer: options.externalOidcIssuer,\n }, null, 2), 'utf-8');\n }\n\n return {\n configPath: runtimeConfigPath,\n cwd: options.externalOidcIssuer ? options.runtimeRoot : undefined,\n };\n}\n\nexport function buildCssArgs(options: {\n cssBinary: string\n configPath: string\n cssModuleRoot: string\n cssPort: number\n baseUrl: string\n externalOidcIssuer?: string\n}): string[] {\n return [\n options.cssBinary,\n '-c', options.configPath,\n '-m', options.cssModuleRoot,\n '-p', options.cssPort.toString(),\n '-b', options.baseUrl,\n ];\n}\n\nexport function buildApiChildEnv(options: {\n apiPort: number\n mainPort: number\n cssPort: number\n baseUrl: string\n externalOidcIssuer?: string\n baseEnv?: NodeJS.ProcessEnv\n}): Record<string, string> {\n return {\n ...(options.baseEnv ?? process.env),\n ...(options.externalOidcIssuer ? { oidcIssuer: options.externalOidcIssuer } : {}),\n API_PORT: options.apiPort.toString(),\n XPOD_MAIN_PORT: options.mainPort.toString(),\n CSS_INTERNAL_URL: `http://localhost:${options.cssPort}`,\n CSS_BASE_URL: options.baseUrl,\n CSS_TOKEN_ENDPOINT: options.externalOidcIssuer\n ? oidcTokenEndpoint(options.externalOidcIssuer)\n : `${options.baseUrl}.oidc/token`,\n } as Record<string, string>;\n}\n"]}
@@ -1,9 +1,10 @@
1
1
  export type RuntimeEnv = Record<string, string | undefined>;
2
- export declare const OIDC_ISSUER_ENV_KEYS: readonly ["CSS_OIDC_ISSUER"];
2
+ export declare const OIDC_ISSUER_ENV_KEYS: readonly ["oidcIssuer"];
3
3
  /**
4
4
  * Resolve the external IdP issuer used by local/SP mode.
5
5
  *
6
- * CSS_OIDC_ISSUER is the single supported process-level contract.
6
+ * `oidcIssuer` is the canonical xpod config/shorthand key and the single
7
+ * supported process-level contract.
7
8
  * Cloud API endpoints are not identity issuers and must not implicitly
8
9
  * switch a local node into SP mode.
9
10
  */
@@ -4,7 +4,7 @@ exports.OIDC_ISSUER_ENV_KEYS = void 0;
4
4
  exports.resolveExternalOidcIssuer = resolveExternalOidcIssuer;
5
5
  exports.oidcTokenEndpoint = oidcTokenEndpoint;
6
6
  exports.OIDC_ISSUER_ENV_KEYS = [
7
- 'CSS_OIDC_ISSUER',
7
+ 'oidcIssuer',
8
8
  ];
9
9
  function cleanEnvValue(value) {
10
10
  const trimmed = value?.trim();
@@ -13,7 +13,8 @@ function cleanEnvValue(value) {
13
13
  /**
14
14
  * Resolve the external IdP issuer used by local/SP mode.
15
15
  *
16
- * CSS_OIDC_ISSUER is the single supported process-level contract.
16
+ * `oidcIssuer` is the canonical xpod config/shorthand key and the single
17
+ * supported process-level contract.
17
18
  * Cloud API endpoints are not identity issuers and must not implicitly
18
19
  * switch a local node into SP mode.
19
20
  */
@@ -1 +1 @@
1
- {"version":3,"file":"oidc-issuer.js","sourceRoot":"","sources":["../../src/runtime/oidc-issuer.ts"],"names":[],"mappings":";;;AAkBA,8DAQC;AAED,8CAEC;AA5BY,QAAA,oBAAoB,GAAG;IAClC,iBAAiB;CACT,CAAC;AAEX,SAAS,aAAa,CAAC,KAAyB;IAC9C,MAAM,OAAO,GAAG,KAAK,EAAE,IAAI,EAAE,CAAC;IAC9B,OAAO,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;AACvC,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,yBAAyB,CAAC,GAAe;IACvD,KAAK,MAAM,GAAG,IAAI,4BAAoB,EAAE,CAAC;QACvC,MAAM,KAAK,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QACtC,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAgB,iBAAiB,CAAC,MAAc;IAC9C,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC;AACpD,CAAC","sourcesContent":["export type RuntimeEnv = Record<string, string | undefined>;\n\nexport const OIDC_ISSUER_ENV_KEYS = [\n 'CSS_OIDC_ISSUER',\n] as const;\n\nfunction cleanEnvValue(value: string | undefined): string | undefined {\n const trimmed = value?.trim();\n return trimmed ? trimmed : undefined;\n}\n\n/**\n * Resolve the external IdP issuer used by local/SP mode.\n *\n * CSS_OIDC_ISSUER is the single supported process-level contract.\n * Cloud API endpoints are not identity issuers and must not implicitly\n * switch a local node into SP mode.\n */\nexport function resolveExternalOidcIssuer(env: RuntimeEnv): string | undefined {\n for (const key of OIDC_ISSUER_ENV_KEYS) {\n const value = cleanEnvValue(env[key]);\n if (value) {\n return value;\n }\n }\n return undefined;\n}\n\nexport function oidcTokenEndpoint(issuer: string): string {\n return `${issuer.replace(/\\/$/, '')}/.oidc/token`;\n}\n"]}
1
+ {"version":3,"file":"oidc-issuer.js","sourceRoot":"","sources":["../../src/runtime/oidc-issuer.ts"],"names":[],"mappings":";;;AAmBA,8DAQC;AAED,8CAEC;AA7BY,QAAA,oBAAoB,GAAG;IAClC,YAAY;CACJ,CAAC;AAEX,SAAS,aAAa,CAAC,KAAyB;IAC9C,MAAM,OAAO,GAAG,KAAK,EAAE,IAAI,EAAE,CAAC;IAC9B,OAAO,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;AACvC,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,yBAAyB,CAAC,GAAe;IACvD,KAAK,MAAM,GAAG,IAAI,4BAAoB,EAAE,CAAC;QACvC,MAAM,KAAK,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QACtC,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAgB,iBAAiB,CAAC,MAAc;IAC9C,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC;AACpD,CAAC","sourcesContent":["export type RuntimeEnv = Record<string, string | undefined>;\n\nexport const OIDC_ISSUER_ENV_KEYS = [\n 'oidcIssuer',\n] as const;\n\nfunction cleanEnvValue(value: string | undefined): string | undefined {\n const trimmed = value?.trim();\n return trimmed ? trimmed : undefined;\n}\n\n/**\n * Resolve the external IdP issuer used by local/SP mode.\n *\n * `oidcIssuer` is the canonical xpod config/shorthand key and the single\n * supported process-level contract.\n * Cloud API endpoints are not identity issuers and must not implicitly\n * switch a local node into SP mode.\n */\nexport function resolveExternalOidcIssuer(env: RuntimeEnv): string | undefined {\n for (const key of OIDC_ISSUER_ENV_KEYS) {\n const value = cleanEnvValue(env[key]);\n if (value) {\n return value;\n }\n }\n return undefined;\n}\n\nexport function oidcTokenEndpoint(issuer: string): string {\n return `${issuer.replace(/\\/$/, '')}/.oidc/token`;\n}\n"]}
@@ -29,6 +29,7 @@ export interface XpodRuntimeOptions {
29
29
  runtimeRoot?: string;
30
30
  rootFilePath?: string;
31
31
  sparqlEndpoint?: string;
32
+ rdfIndexPath?: string;
32
33
  identityDbUrl?: string;
33
34
  usageDbUrl?: string;
34
35
  logLevel?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-types.js","sourceRoot":"","sources":["../../src/runtime/runtime-types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AuthContext } from '../api/auth/AuthContext';\nimport type { Supervisor } from '../supervisor/Supervisor';\nimport type { RuntimeDriver } from './driver/types';\nimport type { RuntimeHost } from './host/types';\nimport type { RuntimePlatform } from './platform/types';\nimport type { ApiRuntimeRunner, CssRuntimeRunner, GatewayRuntimeRunner } from './runner/types';\n\nexport interface XpodRuntimePorts {\n gateway?: number;\n css?: number;\n api?: number;\n}\n\nexport interface XpodRuntimeSockets {\n gateway?: string;\n css?: string;\n api?: string;\n}\n\nexport interface XpodRuntimeOptions {\n mode?: 'local' | 'cloud';\n open?: boolean;\n authMode?: 'acp' | 'acl' | 'allow-all';\n apiOpen?: boolean;\n authContext?: AuthContext;\n envFile?: string;\n env?: Record<string, string | undefined>;\n shorthand?: Record<string, string | number | boolean>;\n baseUrl?: string;\n bindHost?: string;\n transport?: 'auto' | 'socket' | 'port';\n runtimeRoot?: string;\n rootFilePath?: string;\n sparqlEndpoint?: string;\n identityDbUrl?: string;\n usageDbUrl?: string;\n logLevel?: string;\n gatewayPort?: number;\n cssPort?: number;\n apiPort?: number;\n gatewaySocketPath?: string;\n cssSocketPath?: string;\n apiSocketPath?: string;\n edgeNodesEnabled?: boolean;\n centerRegistrationEnabled?: boolean;\n driver?: RuntimeDriver;\n host?: RuntimeHost;\n platform?: RuntimePlatform;\n cssRunner?: CssRuntimeRunner;\n apiRunner?: ApiRuntimeRunner;\n gatewayRunner?: GatewayRuntimeRunner;\n}\n\nexport interface XpodRuntimeHandle {\n id: string;\n mode: 'local' | 'cloud';\n transport: 'socket' | 'port';\n baseUrl: string;\n supervisor: Supervisor;\n ports: XpodRuntimePorts;\n sockets: XpodRuntimeSockets;\n fetch: (input: string | URL | Request, init?: RequestInit) => Promise<Response>;\n stop: () => Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"runtime-types.js","sourceRoot":"","sources":["../../src/runtime/runtime-types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AuthContext } from '../api/auth/AuthContext';\nimport type { Supervisor } from '../supervisor/Supervisor';\nimport type { RuntimeDriver } from './driver/types';\nimport type { RuntimeHost } from './host/types';\nimport type { RuntimePlatform } from './platform/types';\nimport type { ApiRuntimeRunner, CssRuntimeRunner, GatewayRuntimeRunner } from './runner/types';\n\nexport interface XpodRuntimePorts {\n gateway?: number;\n css?: number;\n api?: number;\n}\n\nexport interface XpodRuntimeSockets {\n gateway?: string;\n css?: string;\n api?: string;\n}\n\nexport interface XpodRuntimeOptions {\n mode?: 'local' | 'cloud';\n open?: boolean;\n authMode?: 'acp' | 'acl' | 'allow-all';\n apiOpen?: boolean;\n authContext?: AuthContext;\n envFile?: string;\n env?: Record<string, string | undefined>;\n shorthand?: Record<string, string | number | boolean>;\n baseUrl?: string;\n bindHost?: string;\n transport?: 'auto' | 'socket' | 'port';\n runtimeRoot?: string;\n rootFilePath?: string;\n sparqlEndpoint?: string;\n rdfIndexPath?: string;\n identityDbUrl?: string;\n usageDbUrl?: string;\n logLevel?: string;\n gatewayPort?: number;\n cssPort?: number;\n apiPort?: number;\n gatewaySocketPath?: string;\n cssSocketPath?: string;\n apiSocketPath?: string;\n edgeNodesEnabled?: boolean;\n centerRegistrationEnabled?: boolean;\n driver?: RuntimeDriver;\n host?: RuntimeHost;\n platform?: RuntimePlatform;\n cssRunner?: CssRuntimeRunner;\n apiRunner?: ApiRuntimeRunner;\n gatewayRunner?: GatewayRuntimeRunner;\n}\n\nexport interface XpodRuntimeHandle {\n id: string;\n mode: 'local' | 'cloud';\n transport: 'socket' | 'port';\n baseUrl: string;\n supervisor: Supervisor;\n ports: XpodRuntimePorts;\n sockets: XpodRuntimeSockets;\n fetch: (input: string | URL | Request, init?: RequestInit) => Promise<Response>;\n stop: () => Promise<void>;\n}\n"]}
@@ -0,0 +1,21 @@
1
+ import { type AuxiliaryStrategy, type Representation, type ResourceIdentifier } from '@solid/community-server';
2
+ export interface LocalFirstRdfRepresentationResolverOptions {
3
+ accessor: unknown;
4
+ metadataStrategy: Pick<AuxiliaryStrategy, 'isAuxiliaryIdentifier'>;
5
+ }
6
+ export interface LocalFirstRdfRepresentationResolverLike {
7
+ resolve(identifier: ResourceIdentifier): Promise<Representation | undefined>;
8
+ }
9
+ /**
10
+ * Resolves user-facing RDF GETs from the local `.ttl` / `.jsonld` file mirror.
11
+ *
12
+ * DataAccessor.getData() keeps CSS' internal `internal/quads` contract; this
13
+ * resolver is the explicit SolidFS content path for local-first HTTP reads.
14
+ */
15
+ export declare class LocalFirstRdfRepresentationResolver implements LocalFirstRdfRepresentationResolverLike {
16
+ private readonly accessor;
17
+ private readonly metadataStrategy;
18
+ constructor(options: LocalFirstRdfRepresentationResolverOptions);
19
+ resolve(identifier: ResourceIdentifier): Promise<Representation | undefined>;
20
+ private isLocalRdfReadable;
21
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LocalFirstRdfRepresentationResolver = void 0;
4
+ const community_server_1 = require("@solid/community-server");
5
+ /**
6
+ * Resolves user-facing RDF GETs from the local `.ttl` / `.jsonld` file mirror.
7
+ *
8
+ * DataAccessor.getData() keeps CSS' internal `internal/quads` contract; this
9
+ * resolver is the explicit SolidFS content path for local-first HTTP reads.
10
+ */
11
+ class LocalFirstRdfRepresentationResolver {
12
+ constructor(options) {
13
+ this.accessor = options.accessor;
14
+ this.metadataStrategy = options.metadataStrategy;
15
+ }
16
+ async resolve(identifier) {
17
+ if (this.metadataStrategy.isAuxiliaryIdentifier(identifier) || !this.isLocalRdfReadable(this.accessor)) {
18
+ return undefined;
19
+ }
20
+ try {
21
+ const document = await this.accessor.getLocalRdfDocument(identifier);
22
+ return new community_server_1.BasicRepresentation(document.data, document.metadata);
23
+ }
24
+ catch (error) {
25
+ if (community_server_1.NotFoundHttpError.isInstance(error)) {
26
+ return undefined;
27
+ }
28
+ throw error;
29
+ }
30
+ }
31
+ isLocalRdfReadable(accessor) {
32
+ return typeof accessor === 'object' &&
33
+ accessor !== null &&
34
+ typeof accessor.getLocalRdfDocument === 'function';
35
+ }
36
+ }
37
+ exports.LocalFirstRdfRepresentationResolver = LocalFirstRdfRepresentationResolver;
38
+ //# sourceMappingURL=LocalFirstRdfRepresentationResolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocalFirstRdfRepresentationResolver.js","sourceRoot":"","sources":["../../src/solidfs/LocalFirstRdfRepresentationResolver.ts"],"names":[],"mappings":";;;AAAA,8DAMiC;AAajC;;;;;GAKG;AACH,MAAa,mCAAmC;IAI9C,YAAmB,OAAmD;QACpE,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IACnD,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,UAA8B;QACjD,IAAI,IAAI,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YACvG,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;YACrE,OAAO,IAAI,sCAAmB,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACnE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,oCAAiB,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;gBACxC,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAEO,kBAAkB,CAAC,QAAiB;QAC1C,OAAO,OAAO,QAAQ,KAAK,QAAQ;YACjC,QAAQ,KAAK,IAAI;YACjB,OAAQ,QAA8C,CAAC,mBAAmB,KAAK,UAAU,CAAC;IAC9F,CAAC;CACF;AA9BD,kFA8BC","sourcesContent":["import {\n BasicRepresentation,\n NotFoundHttpError,\n type AuxiliaryStrategy,\n type Representation,\n type ResourceIdentifier,\n} from '@solid/community-server';\n\nimport type { LocalRdfReadableAccessor } from '../storage/accessors/MixDataAccessor';\n\nexport interface LocalFirstRdfRepresentationResolverOptions {\n accessor: unknown;\n metadataStrategy: Pick<AuxiliaryStrategy, 'isAuxiliaryIdentifier'>;\n}\n\nexport interface LocalFirstRdfRepresentationResolverLike {\n resolve(identifier: ResourceIdentifier): Promise<Representation | undefined>;\n}\n\n/**\n * Resolves user-facing RDF GETs from the local `.ttl` / `.jsonld` file mirror.\n *\n * DataAccessor.getData() keeps CSS' internal `internal/quads` contract; this\n * resolver is the explicit SolidFS content path for local-first HTTP reads.\n */\nexport class LocalFirstRdfRepresentationResolver implements LocalFirstRdfRepresentationResolverLike {\n private readonly accessor: unknown;\n private readonly metadataStrategy: Pick<AuxiliaryStrategy, 'isAuxiliaryIdentifier'>;\n\n public constructor(options: LocalFirstRdfRepresentationResolverOptions) {\n this.accessor = options.accessor;\n this.metadataStrategy = options.metadataStrategy;\n }\n\n public async resolve(identifier: ResourceIdentifier): Promise<Representation | undefined> {\n if (this.metadataStrategy.isAuxiliaryIdentifier(identifier) || !this.isLocalRdfReadable(this.accessor)) {\n return undefined;\n }\n\n try {\n const document = await this.accessor.getLocalRdfDocument(identifier);\n return new BasicRepresentation(document.data, document.metadata);\n } catch (error) {\n if (NotFoundHttpError.isInstance(error)) {\n return undefined;\n }\n throw error;\n }\n }\n\n private isLocalRdfReadable(accessor: unknown): accessor is LocalRdfReadableAccessor {\n return typeof accessor === 'object' &&\n accessor !== null &&\n typeof (accessor as { getLocalRdfDocument?: unknown }).getLocalRdfDocument === 'function';\n }\n}\n"]}
@@ -0,0 +1,18 @@
1
+ import { MaterializedWorkspace, SolidFS, SolidFsHydrator, SolidFsPrepareInput, SolidFsSyncer } from './types';
2
+ export interface LocalSolidFSOptions {
3
+ workRoot?: string;
4
+ syncer?: SolidFsSyncer;
5
+ hydrator?: SolidFsHydrator;
6
+ }
7
+ export declare class LocalSolidFS implements SolidFS {
8
+ private readonly workRoot;
9
+ private readonly syncer?;
10
+ private readonly hydrator?;
11
+ constructor(options?: LocalSolidFSOptions);
12
+ prepare(input: SolidFsPrepareInput): Promise<MaterializedWorkspace>;
13
+ private resolveWorkspacePath;
14
+ private createCopyWorkdir;
15
+ private createHydratedWorkdir;
16
+ private createManifest;
17
+ private assertSourceDirectory;
18
+ }