@undefineds.co/xpod 0.3.48 → 0.3.49

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 (105) hide show
  1. package/bin/xpod.js +0 -0
  2. package/dist/api/chatkit/pod-store.d.ts +16 -17
  3. package/dist/api/chatkit/pod-store.js +299 -231
  4. package/dist/api/chatkit/pod-store.js.map +1 -1
  5. package/dist/api/chatkit/schema.d.ts +1 -1
  6. package/dist/api/chatkit/service.js +13 -11
  7. package/dist/api/chatkit/service.js.map +1 -1
  8. package/dist/api/chatkit/store.d.ts +1 -0
  9. package/dist/api/chatkit/store.js +23 -11
  10. package/dist/api/chatkit/store.js.map +1 -1
  11. package/dist/api/chatkit/types.d.ts +17 -10
  12. package/dist/api/chatkit/types.js +97 -14
  13. package/dist/api/chatkit/types.js.map +1 -1
  14. package/dist/api/container/common.js +16 -2
  15. package/dist/api/container/common.js.map +1 -1
  16. package/dist/api/container/routes.js +3 -0
  17. package/dist/api/container/routes.js.map +1 -1
  18. package/dist/api/container/types.d.ts +3 -0
  19. package/dist/api/container/types.js.map +1 -1
  20. package/dist/api/handlers/ChatKitV1Handler.js +1 -2
  21. package/dist/api/handlers/ChatKitV1Handler.js.map +1 -1
  22. package/dist/api/handlers/CoordinationHandler.d.ts +6 -0
  23. package/dist/api/handlers/CoordinationHandler.js +115 -0
  24. package/dist/api/handlers/CoordinationHandler.js.map +1 -0
  25. package/dist/api/handlers/MatrixHandler.d.ts +11 -0
  26. package/dist/api/handlers/MatrixHandler.js +120 -2
  27. package/dist/api/handlers/MatrixHandler.js.map +1 -1
  28. package/dist/api/handlers/RunHandler.js +33 -15
  29. package/dist/api/handlers/RunHandler.js.map +1 -1
  30. package/dist/api/handlers/index.d.ts +1 -0
  31. package/dist/api/handlers/index.js +1 -0
  32. package/dist/api/handlers/index.js.map +1 -1
  33. package/dist/api/index.d.ts +1 -0
  34. package/dist/api/index.js +1 -0
  35. package/dist/api/index.js.map +1 -1
  36. package/dist/api/matrix/PodMatrixStore.d.ts +25 -1
  37. package/dist/api/matrix/PodMatrixStore.js +243 -38
  38. package/dist/api/matrix/PodMatrixStore.js.map +1 -1
  39. package/dist/api/matrix/index.d.ts +1 -1
  40. package/dist/api/matrix/index.js.map +1 -1
  41. package/dist/api/matrix/types.d.ts +23 -2
  42. package/dist/api/matrix/types.js.map +1 -1
  43. package/dist/api/protocol-metadata.d.ts +4 -0
  44. package/dist/api/protocol-metadata.js +54 -0
  45. package/dist/api/protocol-metadata.js.map +1 -0
  46. package/dist/api/reconciler/ClientReconcilerCoordinator.d.ts +42 -0
  47. package/dist/api/reconciler/ClientReconcilerCoordinator.js +250 -0
  48. package/dist/api/reconciler/ClientReconcilerCoordinator.js.map +1 -0
  49. package/dist/api/reconciler/ClientReconcilerCoordinator.jsonld +186 -0
  50. package/dist/api/reconciler/ServerGroupReconcilerService.d.ts +39 -0
  51. package/dist/api/reconciler/ServerGroupReconcilerService.js +91 -0
  52. package/dist/api/reconciler/ServerGroupReconcilerService.js.map +1 -0
  53. package/dist/api/reconciler/ServerGroupReconcilerService.jsonld +146 -0
  54. package/dist/api/reconciler/WakeAgentQueue.d.ts +23 -0
  55. package/dist/api/reconciler/WakeAgentQueue.js +123 -0
  56. package/dist/api/reconciler/WakeAgentQueue.js.map +1 -0
  57. package/dist/api/reconciler/WakeAgentQueue.jsonld +91 -0
  58. package/dist/api/reconciler/coordination.d.ts +61 -0
  59. package/dist/api/reconciler/coordination.js +109 -0
  60. package/dist/api/reconciler/coordination.js.map +1 -0
  61. package/dist/api/reconciler/coordination.jsonld +186 -0
  62. package/dist/api/reconciler/index.d.ts +4 -0
  63. package/dist/api/reconciler/index.js +21 -0
  64. package/dist/api/reconciler/index.js.map +1 -0
  65. package/dist/api/runs/ManagedRunWorker.js +0 -5
  66. package/dist/api/runs/ManagedRunWorker.js.map +1 -1
  67. package/dist/api/runs/RunStateCenter.d.ts +1 -1
  68. package/dist/api/runs/RunStateCenter.js +12 -28
  69. package/dist/api/runs/RunStateCenter.js.map +1 -1
  70. package/dist/api/runs/store.d.ts +12 -15
  71. package/dist/api/runs/store.js +24 -15
  72. package/dist/api/runs/store.js.map +1 -1
  73. package/dist/api/tasks/TaskMaterializer.d.ts +1 -0
  74. package/dist/api/tasks/TaskMaterializer.js +10 -13
  75. package/dist/api/tasks/TaskMaterializer.js.map +1 -1
  76. package/dist/api/tasks/TaskService.d.ts +0 -2
  77. package/dist/api/tasks/TaskService.js +6 -16
  78. package/dist/api/tasks/TaskService.js.map +1 -1
  79. package/dist/api/tasks/store.d.ts +0 -2
  80. package/dist/api/tasks/store.js.map +1 -1
  81. package/dist/cli/commands/auth.d.ts +1 -1
  82. package/dist/cli/commands/auth.js +4 -5
  83. package/dist/cli/commands/auth.js.map +1 -1
  84. package/dist/cli/commands/backup.js +1 -1
  85. package/dist/cli/commands/backup.js.map +1 -1
  86. package/dist/cli/commands/login.js +1 -1
  87. package/dist/cli/commands/login.js.map +1 -1
  88. package/dist/cli/commands/pod.js +1 -1
  89. package/dist/cli/commands/pod.js.map +1 -1
  90. package/dist/cli/lib/auth-helper.d.ts +5 -3
  91. package/dist/cli/lib/auth-helper.js +5 -3
  92. package/dist/cli/lib/auth-helper.js.map +1 -1
  93. package/dist/cli/lib/credentials-store.d.ts +22 -4
  94. package/dist/cli/lib/credentials-store.js +68 -51
  95. package/dist/cli/lib/credentials-store.js.map +1 -1
  96. package/dist/components/components.jsonld +5 -1
  97. package/dist/components/context.jsonld +103 -0
  98. package/dist/index.d.ts +1 -0
  99. package/dist/index.js +15 -0
  100. package/dist/index.js.map +1 -1
  101. package/dist/provision/LocalPodProvisioningService.d.ts +1 -0
  102. package/dist/provision/LocalPodProvisioningService.js +9 -0
  103. package/dist/provision/LocalPodProvisioningService.js.map +1 -1
  104. package/dist/provision/LocalPodProvisioningService.jsonld +4 -0
  105. package/package.json +2 -2
@@ -2451,6 +2451,109 @@
2451
2451
  "@id": "undefineds:dist/provision/LocalPodProvisioningService.jsonld#LocalPodProvisioningService_options_authMode"
2452
2452
  }
2453
2453
  }
2454
+ },
2455
+ "ReconcilerCoordinationMetadata": {
2456
+ "@id": "undefineds:dist/api/reconciler/coordination.jsonld#ReconcilerCoordinationMetadata",
2457
+ "@prefix": true,
2458
+ "@context": {}
2459
+ },
2460
+ "SharedWakeAgentJob": {
2461
+ "@id": "undefineds:dist/api/reconciler/coordination.jsonld#SharedWakeAgentJob",
2462
+ "@prefix": true,
2463
+ "@context": {}
2464
+ },
2465
+ "WakeAgentLeaseFields": {
2466
+ "@id": "undefineds:dist/api/reconciler/coordination.jsonld#WakeAgentLeaseFields",
2467
+ "@prefix": true,
2468
+ "@context": {}
2469
+ },
2470
+ "ClientCapability": {
2471
+ "@id": "undefineds:dist/api/reconciler/coordination.jsonld#ClientCapability",
2472
+ "@prefix": true,
2473
+ "@context": {}
2474
+ },
2475
+ "ClientReconcilerLease": {
2476
+ "@id": "undefineds:dist/api/reconciler/coordination.jsonld#ClientReconcilerLease",
2477
+ "@prefix": true,
2478
+ "@context": {}
2479
+ },
2480
+ "ClientReconcilerActivationOptions": {
2481
+ "@id": "undefineds:dist/api/reconciler/coordination.jsonld#ClientReconcilerActivationOptions",
2482
+ "@prefix": true,
2483
+ "@context": {}
2484
+ },
2485
+ "ClientReconcilerCoordinator": {
2486
+ "@id": "undefineds:dist/api/reconciler/ClientReconcilerCoordinator.jsonld#ClientReconcilerCoordinator",
2487
+ "@prefix": true,
2488
+ "@context": {
2489
+ "options": {
2490
+ "@id": "undefineds:dist/api/reconciler/ClientReconcilerCoordinator.jsonld#ClientReconcilerCoordinator_options"
2491
+ }
2492
+ }
2493
+ },
2494
+ "ClientReconcilerCoordinatorOptions": {
2495
+ "@id": "undefineds:dist/api/reconciler/ClientReconcilerCoordinator.jsonld#ClientReconcilerCoordinatorOptions",
2496
+ "@prefix": true,
2497
+ "@context": {}
2498
+ },
2499
+ "UpsertClientCapabilityInput": {
2500
+ "@id": "undefineds:dist/api/reconciler/ClientReconcilerCoordinator.jsonld#UpsertClientCapabilityInput",
2501
+ "@prefix": true,
2502
+ "@context": {}
2503
+ },
2504
+ "ActivateClientReconcilerLeaseInput": {
2505
+ "@id": "undefineds:dist/api/reconciler/ClientReconcilerCoordinator.jsonld#ActivateClientReconcilerLeaseInput",
2506
+ "@prefix": true,
2507
+ "@context": {}
2508
+ },
2509
+ "ReleaseClientReconcilerLeaseInput": {
2510
+ "@id": "undefineds:dist/api/reconciler/ClientReconcilerCoordinator.jsonld#ReleaseClientReconcilerLeaseInput",
2511
+ "@prefix": true,
2512
+ "@context": {}
2513
+ },
2514
+ "InMemoryWakeAgentQueue": {
2515
+ "@id": "undefineds:dist/api/reconciler/WakeAgentQueue.jsonld#InMemoryWakeAgentQueue",
2516
+ "@prefix": true,
2517
+ "@context": {}
2518
+ },
2519
+ "WakeAgentEnqueueResult": {
2520
+ "@id": "undefineds:dist/api/reconciler/WakeAgentQueue.jsonld#WakeAgentEnqueueResult",
2521
+ "@prefix": true,
2522
+ "@context": {}
2523
+ },
2524
+ "WakeAgentQueue": {
2525
+ "@id": "undefineds:dist/api/reconciler/WakeAgentQueue.jsonld#WakeAgentQueue",
2526
+ "@prefix": true,
2527
+ "@context": {}
2528
+ },
2529
+ "WakeAgentQueueOptions": {
2530
+ "@id": "undefineds:dist/api/reconciler/WakeAgentQueue.jsonld#WakeAgentQueueOptions",
2531
+ "@prefix": true,
2532
+ "@context": {}
2533
+ },
2534
+ "ServerGroupReconcilerService": {
2535
+ "@id": "undefineds:dist/api/reconciler/ServerGroupReconcilerService.jsonld#ServerGroupReconcilerService",
2536
+ "@prefix": true,
2537
+ "@context": {
2538
+ "options": {
2539
+ "@id": "undefineds:dist/api/reconciler/ServerGroupReconcilerService.jsonld#ServerGroupReconcilerService_options"
2540
+ }
2541
+ }
2542
+ },
2543
+ "ReconcileGroupThreadMessageInput": {
2544
+ "@id": "undefineds:dist/api/reconciler/ServerGroupReconcilerService.jsonld#ReconcileGroupThreadMessageInput",
2545
+ "@prefix": true,
2546
+ "@context": {}
2547
+ },
2548
+ "ReconcileGroupThreadMessageResult": {
2549
+ "@id": "undefineds:dist/api/reconciler/ServerGroupReconcilerService.jsonld#ReconcileGroupThreadMessageResult",
2550
+ "@prefix": true,
2551
+ "@context": {}
2552
+ },
2553
+ "ServerGroupReconcilerServiceOptions": {
2554
+ "@id": "undefineds:dist/api/reconciler/ServerGroupReconcilerService.jsonld#ServerGroupReconcilerServiceOptions",
2555
+ "@prefix": true,
2556
+ "@context": {}
2454
2557
  }
2455
2558
  }
2456
2559
  ]
package/dist/index.d.ts CHANGED
@@ -87,6 +87,7 @@ import { ScopedPickWebIdHandler } from './identity/oidc/ScopedPickWebIdHandler';
87
87
  import { ProvisionPodCreator } from './provision/ProvisionPodCreator';
88
88
  import { ProvisionCodeCodec } from './provision/ProvisionCodeCodec';
89
89
  import { LocalPodProvisioningService } from './provision/LocalPodProvisioningService';
90
+ export * from './api/reconciler';
90
91
  export type { DnsProvider, ListDnsRecordsInput, ListableDnsProvider, DeleteDnsRecordInput, DnsRecordSummary, UpsertDnsRecordInput, } from './dns/DnsProvider';
91
92
  export type { EdgeNodeCertificateProvisioner } from './edge/EdgeNodeCertificateProvisioner';
92
93
  export type { EdgeNodeTunnelManager } from './edge/interfaces/EdgeNodeTunnelManager';
package/dist/index.js CHANGED
@@ -1,4 +1,18 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
17
  exports.PodRoutingHttpHandler = exports.CenterNodeRegistrationService = exports.UsageTrackingStore = exports.ClusterIdentifierStrategy = exports.EdgeNodeModeDetector = exports.AcmeCertificateManager = exports.EdgeNodeCertificateService = exports.EdgeNodeAgent = exports.EdgeNodeHealthProbeService = exports.FrpTunnelManager = exports.NoopEdgeNodeTunnelManager = exports.SimpleEdgeNodeTunnelManager = exports.Dns01CertificateProvisioner = exports.EdgeNodeDnsCoordinator = exports.TencentDnsProvider = exports.PerAccountQuotaStrategy = exports.NoopEntitlementProvider = exports.HttpEntitlementProvider = exports.NoopQuotaService = exports.DrizzleQuotaService = exports.BaseKeyValueStorage = exports.SqliteKeyValueStorage = exports.RedisKeyValueStorage = exports.PostgresKeyValueStorage = exports.ValidatingIdentityProviderHttpHandler = exports.DrizzleIndexedStorage = exports.ReservedSuffixIdentifierGenerator = exports.TerminalHttpHandler = exports.EdgeNodeCertificateHttpHandler = exports.TracingHandler = exports.RouterHttpRoute = exports.RouterHttpHandler = exports.EdgeNodeProxyHttpHandler = exports.EdgeNodeDirectDebugHttpHandler = exports.ClusterWebSocketConfigurator = exports.ClusterIngressRouter = exports.QuotaAdminHttpHandler = exports.SubgraphSparqlHttpHandler = exports.QuintstoreSparqlEngine = exports.QuadstoreSparqlEngine = exports.SubgraphQueryEngine = exports.SparqlUpdateResourceStore = exports.ConfigurableLoggerFactory = exports.MixDataAccessor = exports.SolidRdfDataAccessor = exports.QuintStoreSparqlDataAccessor = exports.QuadstoreSparqlDataAccessor = exports.MinioDataAccessor = exports.RepresentationPartialConvertingStore = exports.AppStaticAssetHandler = void 0;
4
18
  exports.LocalPodProvisioningService = exports.ProvisionCodeCodec = exports.ProvisionPodCreator = exports.UrlAwareRedisLocker = exports.ScopedPickWebIdHandler = exports.LoopbackClientIdAdapterFactory = exports.AutoDetectIdentityProviderHandler = exports.AutoDetectOidcHandler = exports.DisabledIdentityProviderHandler = exports.DisabledOidcHandler = exports.SubdomainPodIdentifierStrategy = exports.MultiDomainIdentifierStrategy = exports.SubdomainService = exports.LocalTunnelProvider = exports.CloudflareTunnelProvider = exports.CredentialReaderImpl = exports.CredentialReader = exports.EmbeddingServiceImpl = exports.EmbeddingService = exports.ProviderRegistryImpl = exports.ProviderRegistry = exports.VectorHttpHandler = exports.PostgresVectorStore = exports.SqliteVectorStore = exports.VectorStore = exports.SolidRdfSparqlEngine = exports.PostgresRdfEngine = exports.SolidRdfEngine = exports.ShadowRdfQuintStore = exports.RdfSparqlAdapter = exports.Rdf3xIndex = exports.RdfQuadIndex = exports.RdfTermDictionary = exports.PgQuintStore = exports.SqliteQuintStore = exports.QuintStore = exports.ReactAppViewHandler = void 0;
@@ -175,6 +189,7 @@ const ProvisionCodeCodec_1 = require("./provision/ProvisionCodeCodec");
175
189
  Object.defineProperty(exports, "ProvisionCodeCodec", { enumerable: true, get: function () { return ProvisionCodeCodec_1.ProvisionCodeCodec; } });
176
190
  const LocalPodProvisioningService_1 = require("./provision/LocalPodProvisioningService");
177
191
  Object.defineProperty(exports, "LocalPodProvisioningService", { enumerable: true, get: function () { return LocalPodProvisioningService_1.LocalPodProvisioningService; } });
192
+ __exportStar(require("./api/reconciler"), exports);
178
193
  // Export the new AppStaticAssetHandler
179
194
  var AppStaticAssetHandler_1 = require("./http/AppStaticAssetHandler");
180
195
  Object.defineProperty(exports, "AppStaticAssetHandler", { enumerable: true, get: function () { return AppStaticAssetHandler_1.AppStaticAssetHandler; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,6CAA2C;AAC3C,yGAAsG;AA8IpG,qHA9IO,2EAAoC,OA8IP;AA7ItC,6EAA0E;AA8IxE,kGA9IO,qCAAiB,OA8IP;AA7InB,iGAA8F;AA8I5F,4GA9IO,yDAA2B,OA8IP;A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AA8E;AAyH5E,sGAzHO,6CAAqB,OAyHP;AAxHvB,yGAAsG;AAyHpG,kHAzHO,qEAAiC,OAyHP;AAxHnC,mGAAgG;AAyH9F,+GAzHO,+DAA8B,OAyHP;AAxHhC,mFAAgF;AAyH9E,uGAzHO,+CAAsB,OAyHP;AAxHxB,uBAAuB;AACvB,yEAAsE;AA0HpE,oGA1HO,yCAAmB,OA0HP;AAzHrB,uEAAoE;AA0HlE,mGA1HO,uCAAkB,OA0HP;AAzHpB,yFAAsF;AA0HpF,4GA1HO,yDAA2B,OA0HP;AAhG7B,uCAAuC;AACvC,sEAAqE;AAA5D,8HAAA,qBAAqB,OAAA","sourcesContent":["import './runtime/configure-drizzle-solid';\nimport { RepresentationPartialConvertingStore } from './storage/RepresentationPartialConvertingStore';\nimport { MinioDataAccessor } from './storage/accessors/MinioDataAccessor';\nimport { QuadstoreSparqlDataAccessor } from './storage/accessors/QuadstoreSparqlDataAccessor';\nimport { QuintStoreSparqlDataAccessor } from './storage/accessors/QuintStoreSparqlDataAccessor';\nimport { SolidRdfDataAccessor } from './storage/accessors/SolidRdfDataAccessor';\nimport { MixDataAccessor } from './storage/accessors/MixDataAccessor';\nimport { ConfigurableLoggerFactory } from './logging/ConfigurableLoggerFactory';\nimport { SubgraphQueryEngine } from './storage/sparql/SubgraphQueryEngine';\nimport { QuadstoreSparqlEngine, QuintstoreSparqlEngine } from './storage/sparql/CompatibilitySparqlEngine';\nexport type { SparqlEngine } from './storage/sparql/SubgraphQueryEngine';\nexport type {\n RdfEngineLike,\n RdfEngineStorageStats,\n RdfDerivedIndexRefreshResult,\n RdfIndexStats,\n RdfIndexSpaceObject,\n RdfIndexMetrics,\n RdfIndexPutOptions,\n RdfPatternQuery,\n RdfQuadIndexOptions,\n RdfQuadIndexScanResult,\n RdfShadowBackfillOptions,\n RdfShadowBackfillResult,\n RdfShadowDiff,\n RdfShadowScanResult,\n RdfSourceInput,\n} from './storage/rdf/types';\nexport type { RdfSparqlCompileResult } from './storage/rdf/RdfSparqlAdapter';\nexport type { ShadowRdfQuintStoreOptions } from './storage/rdf/ShadowRdfQuintStore';\nexport type {\n SolidRdfSparqlEngineOptions,\n SolidRdfSparqlFallback,\n} from './storage/rdf/SolidRdfSparqlEngine';\nexport type { PostgresRdfEngineOptions } from './storage/rdf/PostgresRdfEngine';\nimport { SubgraphSparqlHttpHandler } from './http/SubgraphSparqlHttpHandler';\nimport { QuotaAdminHttpHandler } from './http/quota/QuotaAdminHttpHandler';\nimport { SparqlUpdateResourceStore } from './storage/SparqlUpdateResourceStore';\nimport { ClusterIngressRouter } from './http/ClusterIngressRouter';\nimport { ClusterWebSocketConfigurator } from './http/ClusterWebSocketConfigurator';\nimport { EdgeNodeDirectDebugHttpHandler } from './http/EdgeNodeDirectDebugHttpHandler';\nimport { EdgeNodeProxyHttpHandler } from './http/EdgeNodeProxyHttpHandler';\nimport { RouterHttpHandler } from './http/RouterHttpHandler';\nimport { RouterHttpRoute } from './http/RouterHttpRoute';\nimport { TracingHandler } from './http/TracingHandler';\nimport { TerminalHttpHandler } from './http/terminal/TerminalHttpHandler';\nimport { EdgeNodeCertificateHttpHandler } from './http/admin/EdgeNodeCertificateHttpHandler';\nimport { ReservedSuffixIdentifierGenerator } from './pods/ReservedSuffixIdentifierGenerator';\nimport { DrizzleIndexedStorage } from './identity/drizzle/DrizzleIndexedStorage';\nimport { ValidatingIdentityProviderHttpHandler } from './identity/ValidatingIdentityProviderHttpHandler';\nimport { PostgresKeyValueStorage } from './storage/keyvalue/PostgresKeyValueStorage';\nimport { RedisKeyValueStorage } from './storage/keyvalue/RedisKeyValueStorage';\nimport { SqliteKeyValueStorage } from './storage/keyvalue/SqliteKeyValueStorage';\nimport { BaseKeyValueStorage } from './storage/keyvalue/BaseKeyValueStorage';\nimport { DrizzleQuotaService } from './quota/DrizzleQuotaService';\nimport { NoopQuotaService } from './quota/NoopQuotaService';\nimport { HttpEntitlementProvider, NoopEntitlementProvider } from './quota/EntitlementProvider';\nimport { PerAccountQuotaStrategy } from './storage/quota/PerAccountQuotaStrategy';\nimport { TencentDnsProvider } from './dns/tencent/TencentDnsProvider';\nimport { EdgeNodeDnsCoordinator } from './edge/EdgeNodeDnsCoordinator';\nimport { Dns01CertificateProvisioner } from './edge/Dns01CertificateProvisioner';\nimport { SimpleEdgeNodeTunnelManager, NoopEdgeNodeTunnelManager } from './edge/EdgeNodeTunnelManager';\nimport { FrpTunnelManager } from './edge/FrpTunnelManager';\nimport { AcmeCertificateManager } from './edge/acme/AcmeCertificateManager';\nimport { EdgeNodeHealthProbeService } from './edge/EdgeNodeHealthProbeService';\nimport { EdgeNodeAgent } from './edge/EdgeNodeAgent';\nimport { EdgeNodeCertificateService } from './service/EdgeNodeCertificateService';\nimport { createBandwidthThrottleTransform } from './util/stream/BandwidthThrottleTransform';\nimport { UsageTrackingStore } from './storage/quota/UsageTrackingStore';\nimport { EdgeNodeModeDetector } from './edge/EdgeNodeModeDetector';\nimport { ClusterIdentifierStrategy } from './util/identifiers/ClusterIdentifierStrategy';\nimport { CenterNodeRegistrationService } from './identity/CenterNodeRegistrationService';\nimport { PodRoutingHttpHandler } from './http/PodRoutingHttpHandler';\nimport { ReactAppViewHandler } from './identity/ReactAppViewHandler';\nimport { SqliteQuintStore } from './storage/quint/SqliteQuintStore';\nimport { PgQuintStore } from './storage/quint/PgQuintStore';\nimport { QuintStore } from './storage/quint/types';\nimport { RdfQuadIndex } from './storage/rdf/RdfQuadIndex';\nimport { Rdf3xIndex } from './storage/rdf/Rdf3xIndex';\nimport { RdfSparqlAdapter } from './storage/rdf/RdfSparqlAdapter';\nimport { RdfTermDictionary } from './storage/rdf/RdfTermDictionary';\nimport { ShadowRdfQuintStore } from './storage/rdf/ShadowRdfQuintStore';\nimport { SolidRdfEngine } from './storage/rdf/SolidRdfEngine';\nimport { PostgresRdfEngine } from './storage/rdf/PostgresRdfEngine';\nimport { SolidRdfSparqlEngine } from './storage/rdf/SolidRdfSparqlEngine';\nimport type { EdgeNodeCertificateProvisioner } from './edge/EdgeNodeCertificateProvisioner';\n// Vector components\nimport { SqliteVectorStore, PostgresVectorStore } from './storage/vector/index';\nimport { VectorHttpHandler } from './http/vector/VectorHttpHandler';\nimport { ProviderRegistry } from './ai/service/ProviderRegistry';\nimport { ProviderRegistryImpl } from './ai/service/ProviderRegistryImpl';\nimport { EmbeddingService } from './ai/service/EmbeddingService';\nimport { EmbeddingServiceImpl } from './ai/service/EmbeddingServiceImpl';\nimport { CredentialReader } from './ai/service/CredentialReader';\nimport { CredentialReaderImpl } from './ai/service/CredentialReaderImpl';\nimport { VectorStore } from './storage/vector/VectorStore';\n// Tunnel and Subdomain components\nimport { CloudflareTunnelProvider } from './tunnel/CloudflareTunnelProvider';\nimport { LocalTunnelProvider } from './tunnel/LocalTunnelProvider';\nimport { SubdomainService } from './subdomain/SubdomainService';\nimport { UrlAwareRedisLocker } from './storage/locking/UrlAwareRedisLocker';\n// IdP/SP separation components\nimport { MultiDomainIdentifierStrategy } from './util/identifiers/MultiDomainIdentifierStrategy';\nimport { SubdomainPodIdentifierStrategy } from './util/identifiers/SubdomainPodIdentifierStrategy';\nimport { DisabledOidcHandler } from './identity/oidc/DisabledOidcHandler';\nimport { DisabledIdentityProviderHandler } from './identity/oidc/DisabledIdentityProviderHandler';\nimport { AutoDetectOidcHandler } from './identity/oidc/AutoDetectOidcHandler';\nimport { AutoDetectIdentityProviderHandler } from './identity/oidc/AutoDetectIdentityProviderHandler';\nimport { LoopbackClientIdAdapterFactory } from './identity/oidc/LoopbackClientIdAdapterFactory';\nimport { ScopedPickWebIdHandler } from './identity/oidc/ScopedPickWebIdHandler';\n// Provision components\nimport { ProvisionPodCreator } from './provision/ProvisionPodCreator';\nimport { ProvisionCodeCodec } from './provision/ProvisionCodeCodec';\nimport { LocalPodProvisioningService } from './provision/LocalPodProvisioningService';\n\nexport type {\n DnsProvider,\n ListDnsRecordsInput,\n ListableDnsProvider,\n DeleteDnsRecordInput,\n DnsRecordSummary,\n UpsertDnsRecordInput,\n} from './dns/DnsProvider';\nexport type { EdgeNodeCertificateProvisioner } from './edge/EdgeNodeCertificateProvisioner';\nexport type { EdgeNodeTunnelManager } from './edge/interfaces/EdgeNodeTunnelManager';\nexport type { QuotaService, AccountQuota } from './quota/QuotaService';\nexport type { EntitlementProvider, AccountEntitlement } from './quota/EntitlementProvider';\n// Tunnel and Subdomain types\nexport type {\n TunnelProvider,\n TunnelConfig,\n TunnelSetupOptions,\n TunnelStatus,\n} from './tunnel/TunnelProvider';\nexport type {\n SubdomainRegistration,\n ConnectivityResult,\n SubdomainServiceOptions,\n} from './subdomain/SubdomainService';\n// Export the new AppStaticAssetHandler\nexport { AppStaticAssetHandler } from './http/AppStaticAssetHandler';\n\nexport {\n RepresentationPartialConvertingStore,\n MinioDataAccessor,\n QuadstoreSparqlDataAccessor,\n QuintStoreSparqlDataAccessor,\n SolidRdfDataAccessor,\n MixDataAccessor,\n ConfigurableLoggerFactory,\n SparqlUpdateResourceStore,\n SubgraphQueryEngine,\n QuadstoreSparqlEngine,\n QuintstoreSparqlEngine,\n SubgraphSparqlHttpHandler,\n QuotaAdminHttpHandler,\n ClusterIngressRouter,\n ClusterWebSocketConfigurator,\n EdgeNodeDirectDebugHttpHandler,\n EdgeNodeProxyHttpHandler,\n RouterHttpHandler,\n RouterHttpRoute,\n TracingHandler,\n EdgeNodeCertificateHttpHandler,\n TerminalHttpHandler,\n ReservedSuffixIdentifierGenerator,\n DrizzleIndexedStorage,\n ValidatingIdentityProviderHttpHandler,\n PostgresKeyValueStorage,\n RedisKeyValueStorage,\n SqliteKeyValueStorage,\n BaseKeyValueStorage,\n DrizzleQuotaService,\n NoopQuotaService,\n HttpEntitlementProvider,\n NoopEntitlementProvider,\n PerAccountQuotaStrategy,\n TencentDnsProvider,\n EdgeNodeDnsCoordinator,\n Dns01CertificateProvisioner,\n SimpleEdgeNodeTunnelManager,\n NoopEdgeNodeTunnelManager,\n FrpTunnelManager,\n EdgeNodeHealthProbeService,\n EdgeNodeAgent,\n EdgeNodeCertificateService,\n AcmeCertificateManager,\n EdgeNodeModeDetector,\n ClusterIdentifierStrategy,\n UsageTrackingStore,\n CenterNodeRegistrationService,\n PodRoutingHttpHandler,\n ReactAppViewHandler,\n // Quint exports\n QuintStore,\n SqliteQuintStore,\n PgQuintStore,\n // RDF engine exports\n RdfTermDictionary,\n RdfQuadIndex,\n Rdf3xIndex,\n RdfSparqlAdapter,\n ShadowRdfQuintStore,\n SolidRdfEngine,\n PostgresRdfEngine,\n SolidRdfSparqlEngine,\n // Vector exports\n VectorStore,\n SqliteVectorStore,\n PostgresVectorStore,\n VectorHttpHandler,\n // Embedding exports\n ProviderRegistry,\n ProviderRegistryImpl,\n EmbeddingService,\n EmbeddingServiceImpl,\n CredentialReader,\n CredentialReaderImpl,\n // Tunnel and Subdomain exports\n CloudflareTunnelProvider,\n LocalTunnelProvider,\n SubdomainService,\n // IdP/SP separation exports\n MultiDomainIdentifierStrategy,\n SubdomainPodIdentifierStrategy,\n DisabledOidcHandler,\n DisabledIdentityProviderHandler,\n AutoDetectOidcHandler,\n AutoDetectIdentityProviderHandler,\n LoopbackClientIdAdapterFactory,\n ScopedPickWebIdHandler,\n UrlAwareRedisLocker,\n // Provision exports\n ProvisionPodCreator,\n ProvisionCodeCodec,\n LocalPodProvisioningService,\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6CAA2C;AAC3C,yGAAsG;AAgJpG,qHAhJO,2EAAoC,OAgJP;AA/ItC,6EAA0E;AAgJxE,kGAhJO,qCAAiB,OAgJP;AA/InB,iGAA8F;AAgJ5F,4GAhJO,yDAA2B,OAgJP;AA/I7B,mGAAgG;AAgJ9F,6GAhJO,2DAA4B,OAgJP;AA/I9B,mFAAgF;AAgJ9E,qGAhJO,2CAAoB,OAgJP;AA/ItB,yEAAsE;AAgJpE,gGAhJO,iCAAe,OAgJP;AA/IjB,mFAAgF;AAgJ9E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C,mFAAgF;AA2H9E,uGA3HO,+CAAsB,OA2HP;AA1HxB,uBAAuB;AACvB,yEAAsE;AA4HpE,oGA5HO,yCAAmB,OA4HP;AA3HrB,uEAAoE;AA4HlE,mGA5HO,uCAAkB,OA4HP;AA3HpB,yFAAsF;AA4HpF,4GA5HO,yDAA2B,OA4HP;AA1H7B,mDAAiC;AA0BjC,uCAAuC;AACvC,sEAAqE;AAA5D,8HAAA,qBAAqB,OAAA","sourcesContent":["import './runtime/configure-drizzle-solid';\nimport { RepresentationPartialConvertingStore } from './storage/RepresentationPartialConvertingStore';\nimport { MinioDataAccessor } from './storage/accessors/MinioDataAccessor';\nimport { QuadstoreSparqlDataAccessor } from './storage/accessors/QuadstoreSparqlDataAccessor';\nimport { QuintStoreSparqlDataAccessor } from './storage/accessors/QuintStoreSparqlDataAccessor';\nimport { SolidRdfDataAccessor } from './storage/accessors/SolidRdfDataAccessor';\nimport { MixDataAccessor } from './storage/accessors/MixDataAccessor';\nimport { ConfigurableLoggerFactory } from './logging/ConfigurableLoggerFactory';\nimport { SubgraphQueryEngine } from './storage/sparql/SubgraphQueryEngine';\nimport { QuadstoreSparqlEngine, QuintstoreSparqlEngine } from './storage/sparql/CompatibilitySparqlEngine';\nexport type { SparqlEngine } from './storage/sparql/SubgraphQueryEngine';\nexport type {\n RdfEngineLike,\n RdfEngineStorageStats,\n RdfDerivedIndexRefreshResult,\n RdfIndexStats,\n RdfIndexSpaceObject,\n RdfIndexMetrics,\n RdfIndexPutOptions,\n RdfPatternQuery,\n RdfQuadIndexOptions,\n RdfQuadIndexScanResult,\n RdfShadowBackfillOptions,\n RdfShadowBackfillResult,\n RdfShadowDiff,\n RdfShadowScanResult,\n RdfSourceInput,\n} from './storage/rdf/types';\nexport type { RdfSparqlCompileResult } from './storage/rdf/RdfSparqlAdapter';\nexport type { ShadowRdfQuintStoreOptions } from './storage/rdf/ShadowRdfQuintStore';\nexport type {\n SolidRdfSparqlEngineOptions,\n SolidRdfSparqlFallback,\n} from './storage/rdf/SolidRdfSparqlEngine';\nexport type { PostgresRdfEngineOptions } from './storage/rdf/PostgresRdfEngine';\nimport { SubgraphSparqlHttpHandler } from './http/SubgraphSparqlHttpHandler';\nimport { QuotaAdminHttpHandler } from './http/quota/QuotaAdminHttpHandler';\nimport { SparqlUpdateResourceStore } from './storage/SparqlUpdateResourceStore';\nimport { ClusterIngressRouter } from './http/ClusterIngressRouter';\nimport { ClusterWebSocketConfigurator } from './http/ClusterWebSocketConfigurator';\nimport { EdgeNodeDirectDebugHttpHandler } from './http/EdgeNodeDirectDebugHttpHandler';\nimport { EdgeNodeProxyHttpHandler } from './http/EdgeNodeProxyHttpHandler';\nimport { RouterHttpHandler } from './http/RouterHttpHandler';\nimport { RouterHttpRoute } from './http/RouterHttpRoute';\nimport { TracingHandler } from './http/TracingHandler';\nimport { TerminalHttpHandler } from './http/terminal/TerminalHttpHandler';\nimport { EdgeNodeCertificateHttpHandler } from './http/admin/EdgeNodeCertificateHttpHandler';\nimport { ReservedSuffixIdentifierGenerator } from './pods/ReservedSuffixIdentifierGenerator';\nimport { DrizzleIndexedStorage } from './identity/drizzle/DrizzleIndexedStorage';\nimport { ValidatingIdentityProviderHttpHandler } from './identity/ValidatingIdentityProviderHttpHandler';\nimport { PostgresKeyValueStorage } from './storage/keyvalue/PostgresKeyValueStorage';\nimport { RedisKeyValueStorage } from './storage/keyvalue/RedisKeyValueStorage';\nimport { SqliteKeyValueStorage } from './storage/keyvalue/SqliteKeyValueStorage';\nimport { BaseKeyValueStorage } from './storage/keyvalue/BaseKeyValueStorage';\nimport { DrizzleQuotaService } from './quota/DrizzleQuotaService';\nimport { NoopQuotaService } from './quota/NoopQuotaService';\nimport { HttpEntitlementProvider, NoopEntitlementProvider } from './quota/EntitlementProvider';\nimport { PerAccountQuotaStrategy } from './storage/quota/PerAccountQuotaStrategy';\nimport { TencentDnsProvider } from './dns/tencent/TencentDnsProvider';\nimport { EdgeNodeDnsCoordinator } from './edge/EdgeNodeDnsCoordinator';\nimport { Dns01CertificateProvisioner } from './edge/Dns01CertificateProvisioner';\nimport { SimpleEdgeNodeTunnelManager, NoopEdgeNodeTunnelManager } from './edge/EdgeNodeTunnelManager';\nimport { FrpTunnelManager } from './edge/FrpTunnelManager';\nimport { AcmeCertificateManager } from './edge/acme/AcmeCertificateManager';\nimport { EdgeNodeHealthProbeService } from './edge/EdgeNodeHealthProbeService';\nimport { EdgeNodeAgent } from './edge/EdgeNodeAgent';\nimport { EdgeNodeCertificateService } from './service/EdgeNodeCertificateService';\nimport { createBandwidthThrottleTransform } from './util/stream/BandwidthThrottleTransform';\nimport { UsageTrackingStore } from './storage/quota/UsageTrackingStore';\nimport { EdgeNodeModeDetector } from './edge/EdgeNodeModeDetector';\nimport { ClusterIdentifierStrategy } from './util/identifiers/ClusterIdentifierStrategy';\nimport { CenterNodeRegistrationService } from './identity/CenterNodeRegistrationService';\nimport { PodRoutingHttpHandler } from './http/PodRoutingHttpHandler';\nimport { ReactAppViewHandler } from './identity/ReactAppViewHandler';\nimport { SqliteQuintStore } from './storage/quint/SqliteQuintStore';\nimport { PgQuintStore } from './storage/quint/PgQuintStore';\nimport { QuintStore } from './storage/quint/types';\nimport { RdfQuadIndex } from './storage/rdf/RdfQuadIndex';\nimport { Rdf3xIndex } from './storage/rdf/Rdf3xIndex';\nimport { RdfSparqlAdapter } from './storage/rdf/RdfSparqlAdapter';\nimport { RdfTermDictionary } from './storage/rdf/RdfTermDictionary';\nimport { ShadowRdfQuintStore } from './storage/rdf/ShadowRdfQuintStore';\nimport { SolidRdfEngine } from './storage/rdf/SolidRdfEngine';\nimport { PostgresRdfEngine } from './storage/rdf/PostgresRdfEngine';\nimport { SolidRdfSparqlEngine } from './storage/rdf/SolidRdfSparqlEngine';\nimport type { EdgeNodeCertificateProvisioner } from './edge/EdgeNodeCertificateProvisioner';\n// Vector components\nimport { SqliteVectorStore, PostgresVectorStore } from './storage/vector/index';\nimport { VectorHttpHandler } from './http/vector/VectorHttpHandler';\nimport { ProviderRegistry } from './ai/service/ProviderRegistry';\nimport { ProviderRegistryImpl } from './ai/service/ProviderRegistryImpl';\nimport { EmbeddingService } from './ai/service/EmbeddingService';\nimport { EmbeddingServiceImpl } from './ai/service/EmbeddingServiceImpl';\nimport { CredentialReader } from './ai/service/CredentialReader';\nimport { CredentialReaderImpl } from './ai/service/CredentialReaderImpl';\nimport { VectorStore } from './storage/vector/VectorStore';\n// Tunnel and Subdomain components\nimport { CloudflareTunnelProvider } from './tunnel/CloudflareTunnelProvider';\nimport { LocalTunnelProvider } from './tunnel/LocalTunnelProvider';\nimport { SubdomainService } from './subdomain/SubdomainService';\nimport { UrlAwareRedisLocker } from './storage/locking/UrlAwareRedisLocker';\n// IdP/SP separation components\nimport { MultiDomainIdentifierStrategy } from './util/identifiers/MultiDomainIdentifierStrategy';\nimport { SubdomainPodIdentifierStrategy } from './util/identifiers/SubdomainPodIdentifierStrategy';\nimport { DisabledOidcHandler } from './identity/oidc/DisabledOidcHandler';\nimport { DisabledIdentityProviderHandler } from './identity/oidc/DisabledIdentityProviderHandler';\nimport { AutoDetectOidcHandler } from './identity/oidc/AutoDetectOidcHandler';\nimport { AutoDetectIdentityProviderHandler } from './identity/oidc/AutoDetectIdentityProviderHandler';\nimport { LoopbackClientIdAdapterFactory } from './identity/oidc/LoopbackClientIdAdapterFactory';\nimport { ScopedPickWebIdHandler } from './identity/oidc/ScopedPickWebIdHandler';\n// Provision components\nimport { ProvisionPodCreator } from './provision/ProvisionPodCreator';\nimport { ProvisionCodeCodec } from './provision/ProvisionCodeCodec';\nimport { LocalPodProvisioningService } from './provision/LocalPodProvisioningService';\n\nexport * from './api/reconciler';\n\nexport type {\n DnsProvider,\n ListDnsRecordsInput,\n ListableDnsProvider,\n DeleteDnsRecordInput,\n DnsRecordSummary,\n UpsertDnsRecordInput,\n} from './dns/DnsProvider';\nexport type { EdgeNodeCertificateProvisioner } from './edge/EdgeNodeCertificateProvisioner';\nexport type { EdgeNodeTunnelManager } from './edge/interfaces/EdgeNodeTunnelManager';\nexport type { QuotaService, AccountQuota } from './quota/QuotaService';\nexport type { EntitlementProvider, AccountEntitlement } from './quota/EntitlementProvider';\n// Tunnel and Subdomain types\nexport type {\n TunnelProvider,\n TunnelConfig,\n TunnelSetupOptions,\n TunnelStatus,\n} from './tunnel/TunnelProvider';\nexport type {\n SubdomainRegistration,\n ConnectivityResult,\n SubdomainServiceOptions,\n} from './subdomain/SubdomainService';\n// Export the new AppStaticAssetHandler\nexport { AppStaticAssetHandler } from './http/AppStaticAssetHandler';\n\nexport {\n RepresentationPartialConvertingStore,\n MinioDataAccessor,\n QuadstoreSparqlDataAccessor,\n QuintStoreSparqlDataAccessor,\n SolidRdfDataAccessor,\n MixDataAccessor,\n ConfigurableLoggerFactory,\n SparqlUpdateResourceStore,\n SubgraphQueryEngine,\n QuadstoreSparqlEngine,\n QuintstoreSparqlEngine,\n SubgraphSparqlHttpHandler,\n QuotaAdminHttpHandler,\n ClusterIngressRouter,\n ClusterWebSocketConfigurator,\n EdgeNodeDirectDebugHttpHandler,\n EdgeNodeProxyHttpHandler,\n RouterHttpHandler,\n RouterHttpRoute,\n TracingHandler,\n EdgeNodeCertificateHttpHandler,\n TerminalHttpHandler,\n ReservedSuffixIdentifierGenerator,\n DrizzleIndexedStorage,\n ValidatingIdentityProviderHttpHandler,\n PostgresKeyValueStorage,\n RedisKeyValueStorage,\n SqliteKeyValueStorage,\n BaseKeyValueStorage,\n DrizzleQuotaService,\n NoopQuotaService,\n HttpEntitlementProvider,\n NoopEntitlementProvider,\n PerAccountQuotaStrategy,\n TencentDnsProvider,\n EdgeNodeDnsCoordinator,\n Dns01CertificateProvisioner,\n SimpleEdgeNodeTunnelManager,\n NoopEdgeNodeTunnelManager,\n FrpTunnelManager,\n EdgeNodeHealthProbeService,\n EdgeNodeAgent,\n EdgeNodeCertificateService,\n AcmeCertificateManager,\n EdgeNodeModeDetector,\n ClusterIdentifierStrategy,\n UsageTrackingStore,\n CenterNodeRegistrationService,\n PodRoutingHttpHandler,\n ReactAppViewHandler,\n // Quint exports\n QuintStore,\n SqliteQuintStore,\n PgQuintStore,\n // RDF engine exports\n RdfTermDictionary,\n RdfQuadIndex,\n Rdf3xIndex,\n RdfSparqlAdapter,\n ShadowRdfQuintStore,\n SolidRdfEngine,\n PostgresRdfEngine,\n SolidRdfSparqlEngine,\n // Vector exports\n VectorStore,\n SqliteVectorStore,\n PostgresVectorStore,\n VectorHttpHandler,\n // Embedding exports\n ProviderRegistry,\n ProviderRegistryImpl,\n EmbeddingService,\n EmbeddingServiceImpl,\n CredentialReader,\n CredentialReaderImpl,\n // Tunnel and Subdomain exports\n CloudflareTunnelProvider,\n LocalTunnelProvider,\n SubdomainService,\n // IdP/SP separation exports\n MultiDomainIdentifierStrategy,\n SubdomainPodIdentifierStrategy,\n DisabledOidcHandler,\n DisabledIdentityProviderHandler,\n AutoDetectOidcHandler,\n AutoDetectIdentityProviderHandler,\n LoopbackClientIdAdapterFactory,\n ScopedPickWebIdHandler,\n UrlAwareRedisLocker,\n // Provision exports\n ProvisionPodCreator,\n ProvisionCodeCodec,\n LocalPodProvisioningService,\n};\n"]}
@@ -35,4 +35,5 @@ export declare class LocalPodProvisioningService {
35
35
  private writeRdfIndex;
36
36
  private buildPodQuads;
37
37
  private writeIdentityIndexes;
38
+ private addPrivateTypeIndexQuads;
38
39
  }
@@ -171,6 +171,9 @@ class LocalPodProvisioningService {
171
171
  const root = this.baseUrl;
172
172
  const profileUrl = iri(podUrl, 'profile/');
173
173
  const cardUrl = iri(podUrl, 'profile/card');
174
+ const settingsUrl = iri(podUrl, 'settings/');
175
+ const privateTypeIndexUrl = iri(podUrl, '.settings/privateTypeIndex.ttl');
176
+ const privateTypeIndexGraph = namedNode(privateTypeIndexUrl);
174
177
  const authorizationResources = (0, PodAuthorizationResources_1.buildPodAuthorizationResources)({
175
178
  authMode: this.authMode,
176
179
  podUrl,
@@ -212,6 +215,7 @@ class LocalPodProvisioningService {
212
215
  out.push(quad(namedNode(root), namedNode(`${LDP}contains`), namedNode(podUrl), rootGraph));
213
216
  out.push(quad(namedNode(podUrl), namedNode(`${LDP}contains`), namedNode(authorizationResources.rootResourceUrl), podGraph));
214
217
  out.push(quad(namedNode(podUrl), namedNode(`${LDP}contains`), namedNode(profileUrl), podGraph));
218
+ out.push(quad(namedNode(podUrl), namedNode(`${LDP}contains`), namedNode(settingsUrl), podGraph));
215
219
  out.push(quad(namedNode(profileUrl), namedNode(`${LDP}contains`), namedNode(authorizationResources.profileResourceUrl), profileGraph));
216
220
  out.push(quad(namedNode(profileUrl), namedNode(`${LDP}contains`), namedNode(cardUrl), profileGraph));
217
221
  out.push(quad(namedNode(profileUrl), namedNode(`${LDP}contains`), namedNode(authorizationResources.cardResourceUrl), profileGraph));
@@ -228,6 +232,8 @@ class LocalPodProvisioningService {
228
232
  out.push(quad(namedNode(webId), namedNode(`${RDF}type`), namedNode(`${FOAF}Person`), cardGraph));
229
233
  out.push(quad(namedNode(webId), namedNode(`${SOLID}oidcIssuer`), namedNode(oidcIssuer), cardGraph));
230
234
  out.push(quad(namedNode(webId), namedNode(`${SOLID}storage`), namedNode(podUrl), cardGraph));
235
+ out.push(quad(namedNode(webId), namedNode(`${SOLID}privateTypeIndex`), namedNode(privateTypeIndexUrl), cardGraph));
236
+ this.addPrivateTypeIndexQuads(out, privateTypeIndexGraph, privateTypeIndexUrl);
231
237
  out.push(...authorizationResources.quads);
232
238
  return out;
233
239
  }
@@ -284,6 +290,9 @@ class LocalPodProvisioningService {
284
290
  db.close();
285
291
  }
286
292
  }
293
+ addPrivateTypeIndexQuads(out, graph, typeIndexUrl) {
294
+ out.push(quad(namedNode(typeIndexUrl), namedNode(`${RDF}type`), namedNode(`${SOLID}TypeIndex`), graph));
295
+ }
287
296
  }
288
297
  exports.LocalPodProvisioningService = LocalPodProvisioningService;
289
298
  //# sourceMappingURL=LocalPodProvisioningService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LocalPodProvisioningService.js","sourceRoot":"","s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CAAC,CAAC,CAAC;aACzG,CAAC;YACF,MAAM,MAAM,GAAG,EAAE,CAAC,OAAO,CAAC;;;;OAIzB,CAAC,CAAC;YAEH,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE;gBAClB,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;oBACvB,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;gBACrB,CAAC;YACH,CAAC,CAAC,EAAE,CAAC;QACP,CAAC;gBAAS,CAAC;YACT,EAAE,CAAC,KAAK,EAAE,CAAC;QACb,CAAC;IACH,CAAC;CACF;AAtOD,kEAsOC","sourcesContent":["import { createHash } from 'node:crypto';\nimport { promises as fs } from 'node:fs';\nimport path from 'node:path';\nimport { DataFactory } from 'n3';\nimport type { Quad } from '@rdfjs/types';\nimport { getLoggerFor } from 'global-logger-factory';\nimport { quadToRow } from '../storage/quint/serialization';\nimport { getSqliteRuntime, type SqliteDatabase } from '../storage/SqliteRuntime';\nimport type { AuthMode } from '../authorization/AuthMode';\nimport { buildPodAuthorizationResources } from '../authorization/PodAuthorizationResources';\nimport { RdfQuadIndex } from '../storage/rdf/RdfQuadIndex';\n\nconst RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';\nconst LDP = 'http://www.w3.org/ns/ldp#';\nconst DCT = 'http://purl.org/dc/terms/';\nconst MA = 'http://www.w3.org/ns/ma-ont#';\nconst PIM = 'http://www.w3.org/ns/pim/space#';\nconst FOAF = 'http://xmlns.com/foaf/0.1/';\nconst SOLID = 'http://www.w3.org/ns/solid/terms#';\n\nconst { literal, namedNode, quad } = DataFactory;\n\nexport interface LocalPodProvisioningInput {\n podName: string;\n webId?: string;\n initialResources?: Record<string, string>;\n}\n\nexport interface LocalPodProvisioningResult {\n podUrl: string;\n accountId: string;\n podId: string;\n}\n\nexport interface LocalPodProvisioningServiceOptions {\n baseUrl: string;\n rootDir: string;\n sparqlEndpoint: string;\n identityDbUrl: string;\n rdfIndexPath?: string;\n oidcIssuer?: string;\n authMode?: AuthMode | string;\n}\n\nfunction ensureTrailingSlash(url: string): string {\n return url.endsWith('/') ? url : `${url}/`;\n}\n\nfunction stripSqlitePrefix(value: string, label: string): string {\n if (value.startsWith('sqlite:')) {\n return value.slice('sqlite:'.length);\n }\n if (value === ':memory:') {\n return value;\n }\n if (/^[a-z][a-z0-9+.-]*:/iu.test(value)) {\n throw new Error(`${label} must be a sqlite URL for local Pod provisioning: ${value}`);\n }\n return value;\n}\n\nfunction stableUuid(input: string): string {\n const hex = createHash('sha256').update(input).digest('hex').slice(0, 32);\n return [\n hex.slice(0, 8),\n hex.slice(8, 12),\n `4${hex.slice(13, 16)}`,\n `${((Number.parseInt(hex.slice(16, 18), 16) & 0x3f) | 0x80).toString(16).padStart(2, '0')}${hex.slice(18, 20)}`,\n hex.slice(20, 32),\n ].join('-');\n}\n\nfunction buildWebIdFromIssuer(oidcIssuer: string | undefined, podName: string): string | undefined {\n if (!oidcIssuer) {\n return undefined;\n }\n return new URL(`${encodeURIComponent(podName)}/profile/card#me`, ensureTrailingSlash(oidcIssuer)).toString();\n}\n\nfunction createQuintsTable(db: SqliteDatabase): void {\n db.exec(`\n CREATE TABLE IF NOT EXISTS quints (\n graph TEXT NOT NULL,\n subject TEXT NOT NULL,\n predicate TEXT NOT NULL,\n object TEXT NOT NULL,\n vector TEXT,\n PRIMARY KEY (graph, subject, predicate, object)\n );\n\n CREATE INDEX IF NOT EXISTS idx_spog ON quints (subject, predicate, object, graph);\n CREATE INDEX IF NOT EXISTS idx_ogsp ON quints (object, graph, subject, predicate);\n CREATE INDEX IF NOT EXISTS idx_gspo ON quints (graph, subject, predicate, object);\n CREATE INDEX IF NOT EXISTS idx_sopg ON quints (subject, object, predicate, graph);\n CREATE INDEX IF NOT EXISTS idx_pogs ON quints (predicate, object, graph, subject);\n CREATE INDEX IF NOT EXISTS idx_gpos ON quints (graph, predicate, object, subject);\n `);\n}\n\nfunction createInternalKvTable(db: SqliteDatabase): void {\n db.exec(`\n CREATE TABLE IF NOT EXISTS internal_kv (\n key TEXT PRIMARY KEY,\n value TEXT NOT NULL,\n updated_at TEXT NOT NULL DEFAULT (datetime('now'))\n );\n `);\n}\n\nfunction meta(resource: string): string {\n return `meta:${resource}`;\n}\n\nfunction iri(base: string, relative: string): string {\n return new URL(relative, base).toString();\n}\n\nexport class LocalPodProvisioningService {\n private readonly logger = getLoggerFor(this);\n private readonly baseUrl: string;\n private readonly rootDir: string;\n private readonly sparqlDbPath: string;\n private readonly identityDbPath: string;\n private readonly rdfIndexPath?: string;\n private readonly oidcIssuer?: string;\n private readonly authMode?: AuthMode | string;\n private readonly sqliteRuntime = getSqliteRuntime();\n\n public constructor(options: LocalPodProvisioningServiceOptions) {\n this.baseUrl = ensureTrailingSlash(options.baseUrl);\n this.rootDir = options.rootDir;\n this.sparqlDbPath = stripSqlitePrefix(options.sparqlEndpoint, 'sparqlEndpoint');\n this.identityDbPath = stripSqlitePrefix(options.identityDbUrl, 'identityDbUrl');\n this.rdfIndexPath = options.rdfIndexPath;\n this.oidcIssuer = options.oidcIssuer ? ensureTrailingSlash(options.oidcIssuer) : undefined;\n this.authMode = options.authMode;\n }\n\n public async createPod(input: LocalPodProvisioningInput): Promise<LocalPodProvisioningResult> {\n const podUrl = ensureTrailingSlash(new URL(`${encodeURIComponent(input.podName)}/`, this.baseUrl).toString());\n const webId = input.webId ?? buildWebIdFromIssuer(this.oidcIssuer, input.podName) ?? `${podUrl}profile/card#me`;\n // Local stores the Pod, but the owner WebID trusts the actual token issuer.\n const oidcIssuer = this.oidcIssuer ?? this.baseUrl;\n const accountId = stableUuid(`account:${podUrl}:${webId}`);\n const podId = stableUuid(`pod:${podUrl}:${webId}`);\n const ownerId = stableUuid(`owner:${podId}:${webId}`);\n const webIdLinkId = stableUuid(`webIdLink:${accountId}:${webId}`);\n\n await this.createPodFiles(input.podName, input.initialResources);\n const quads = this.buildPodQuads({ podUrl, webId, oidcIssuer });\n this.writeQuints(quads);\n this.writeRdfIndex(quads);\n this.writeIdentityIndexes({ accountId, podId, ownerId, webIdLinkId, podUrl, webId });\n\n this.logger.info(`Provisioned local pod ${podUrl} for ${webId}`);\n return { podUrl, accountId, podId };\n }\n\n private async createPodFiles(podName: string, initialResources?: Record<string, string>): Promise<void> {\n const podPath = path.join(this.rootDir, podName);\n await fs.mkdir(path.join(podPath, 'profile'), { recursive: true });\n\n if (!initialResources) {\n return;\n }\n\n for (const [filename, content] of Object.entries(initialResources)) {\n const normalized = path.normalize(filename);\n if (normalized.startsWith('..') || path.isAbsolute(normalized)) {\n throw new Error(`Invalid initial resource path: ${filename}`);\n }\n const filePath = path.join(podPath, normalized);\n await fs.mkdir(path.dirname(filePath), { recursive: true });\n await fs.writeFile(filePath, content, 'utf8');\n }\n }\n\n private writeQuints(quads: Quad[]): void {\n const db = this.sqliteRuntime.openDatabase(this.sparqlDbPath);\n try {\n createQuintsTable(db);\n const rows = quads.map((entry) => {\n const row = quadToRow(entry);\n return [row.graph, row.subject, row.predicate, row.object, row.vector] as const;\n });\n const insert = db.prepare(`\n INSERT OR IGNORE INTO quints (graph, subject, predicate, object, vector)\n VALUES (?, ?, ?, ?, ?)\n `);\n\n db.transaction(() => {\n for (const row of rows) {\n insert.run(...row);\n }\n })();\n } finally {\n db.close();\n }\n }\n\n private writeRdfIndex(quads: Quad[]): void {\n if (!this.rdfIndexPath) {\n return;\n }\n\n const index = new RdfQuadIndex({ path: this.rdfIndexPath });\n try {\n index.open();\n index.multiPut(quads);\n } finally {\n index.close();\n }\n }\n\n private buildPodQuads({ podUrl, webId, oidcIssuer }: { podUrl: string; webId: string; oidcIssuer: string }): Quad[] {\n const now = new Date().toISOString();\n const root = this.baseUrl;\n const profileUrl = iri(podUrl, 'profile/');\n const cardUrl = iri(podUrl, 'profile/card');\n const authorizationResources = buildPodAuthorizationResources({\n authMode: this.authMode,\n podUrl,\n cardUrl,\n webId,\n stableId: stableUuid,\n iri,\n });\n const rootGraph = namedNode(root);\n const podGraph = namedNode(podUrl);\n const profileGraph = namedNode(profileUrl);\n const cardGraph = namedNode(cardUrl);\n const out: Quad[] = [];\n\n const add = (graph: string, subject: string, predicate: string, object: string): void => {\n out.push(quad(namedNode(subject), namedNode(predicate), namedNode(object), namedNode(graph)));\n };\n const addLiteral = (graph: string, subject: string, predicate: string, value: string): void => {\n out.push(quad(namedNode(subject), namedNode(predicate), literal(value), namedNode(graph)));\n };\n const addDate = (graph: string, subject: string): void => {\n out.push(quad(namedNode(subject), namedNode(`${DCT}modified`), literal(now, namedNode('http://www.w3.org/2001/XMLSchema#dateTime')), namedNode(graph)));\n };\n const addContainerMeta = (resource: string, storage = false): void => {\n const graph = meta(resource);\n addDate(graph, resource);\n add(graph, resource, `${RDF}type`, `${LDP}Resource`);\n add(graph, resource, `${RDF}type`, `${LDP}Container`);\n add(graph, resource, `${RDF}type`, `${LDP}BasicContainer`);\n if (storage) {\n add(graph, resource, `${RDF}type`, `${PIM}Storage`);\n }\n addLiteral(graph, resource, `${MA}format`, 'internal/quads');\n };\n const addDocumentMeta = (resource: string): void => {\n const graph = meta(resource);\n addDate(graph, resource);\n add(graph, resource, `${RDF}type`, `${LDP}Resource`);\n };\n\n out.push(quad(namedNode(root), namedNode(`${LDP}contains`), namedNode(podUrl), rootGraph));\n out.push(quad(namedNode(podUrl), namedNode(`${LDP}contains`), namedNode(authorizationResources.rootResourceUrl), podGraph));\n out.push(quad(namedNode(podUrl), namedNode(`${LDP}contains`), namedNode(profileUrl), podGraph));\n out.push(quad(namedNode(profileUrl), namedNode(`${LDP}contains`), namedNode(authorizationResources.profileResourceUrl), profileGraph));\n out.push(quad(namedNode(profileUrl), namedNode(`${LDP}contains`), namedNode(cardUrl), profileGraph));\n out.push(quad(namedNode(profileUrl), namedNode(`${LDP}contains`), namedNode(authorizationResources.cardResourceUrl), profileGraph));\n\n addContainerMeta(root);\n addContainerMeta(podUrl, true);\n addContainerMeta(profileUrl);\n addDocumentMeta(authorizationResources.rootResourceUrl);\n addDocumentMeta(authorizationResources.profileResourceUrl);\n addDocumentMeta(cardUrl);\n addDocumentMeta(authorizationResources.cardResourceUrl);\n\n out.push(quad(namedNode(cardUrl), namedNode(`${RDF}type`), namedNode(`${FOAF}PersonalProfileDocument`), cardGraph));\n out.push(quad(namedNode(cardUrl), namedNode(`${FOAF}maker`), namedNode(webId), cardGraph));\n out.push(quad(namedNode(cardUrl), namedNode(`${FOAF}primaryTopic`), namedNode(webId), cardGraph));\n out.push(quad(namedNode(webId), namedNode(`${RDF}type`), namedNode(`${FOAF}Person`), cardGraph));\n out.push(quad(namedNode(webId), namedNode(`${SOLID}oidcIssuer`), namedNode(oidcIssuer), cardGraph));\n out.push(quad(namedNode(webId), namedNode(`${SOLID}storage`), namedNode(podUrl), cardGraph));\n\n out.push(...authorizationResources.quads);\n\n return out;\n }\n\n private writeIdentityIndexes(input: {\n accountId: string;\n podId: string;\n ownerId: string;\n webIdLinkId: string;\n podUrl: string;\n webId: string;\n }): void {\n const db = this.sqliteRuntime.openDatabase(this.identityDbPath);\n try {\n createInternalKvTable(db);\n const account = {\n linkedLoginsCount: 1,\n id: input.accountId,\n '**pod**': {\n [input.podId]: {\n baseUrl: input.podUrl,\n accountId: input.accountId,\n id: input.podId,\n '**owner**': {\n [input.ownerId]: {\n podId: input.podId,\n webId: input.webId,\n visible: false,\n id: input.ownerId,\n },\n },\n },\n },\n '**webIdLink**': {\n [input.webIdLinkId]: {\n webId: input.webId,\n accountId: input.accountId,\n id: input.webIdLinkId,\n },\n },\n };\n\n const rows: Array<[string, string]> = [\n [`accounts/data/${input.accountId}`, JSON.stringify(account)],\n [`accounts/index/pod/${input.podId}`, JSON.stringify([input.accountId])],\n [`accounts/index/pod/baseUrl/${encodeURIComponent(input.podUrl)}`, JSON.stringify([input.accountId])],\n [`accounts/index/owner/${input.ownerId}`, JSON.stringify([input.accountId])],\n [`accounts/index/webIdLink/${input.webIdLinkId}`, JSON.stringify([input.accountId])],\n [`accounts/index/webIdLink/webId/${encodeURIComponent(input.webId)}`, JSON.stringify([input.accountId])],\n ];\n const insert = db.prepare(`\n INSERT INTO internal_kv (key, value, updated_at)\n VALUES (?, ?, datetime('now'))\n ON CONFLICT (key) DO UPDATE SET value = excluded.value, updated_at = datetime('now')\n `);\n\n db.transaction(() => {\n for (const row of rows) {\n insert.run(...row);\n }\n })();\n } finally {\n db.close();\n }\n }\n}\n"]}
1
+ {"version":3,"file":"LocalPodProvisioningService.js","sourceRoot":"","sources":["../../src/provision/LocalPodProvisioningService.ts"],"names":[],"mappings":";;;;;;AAAA,6CAAyC;AACzC,qCAAyC;AACzC,0DAA6B;AAC7B,2BAAiC;AAEjC,iEAAqD;AACrD,kEAA2D;AAC3D,4DAAiF;AAEjF,0FAA4F;AAC5F,8DAA2D;AAE3D,MAAM,GAAG,GAAG,6CAA6C,CAAC;AAC1D,MAAM,GAAG,GAAG,2BAA2B,CAAC;AACxC,MAAM,GAAG,GAAG,2BAA2B,CAAC;AACxC,MAAM,EAAE,GAAG,8BAA8B,CAAC;AAC1C,MAAM,GAAG,GAAG,iCAAiC,CAAC;AAC9C,MAAM,IAAI,GAAG,4BAA4B,CAAC;AAC1C,MAAM,KAAK,GAAG,mCAAmC,CAAC;AAElD,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,gBAAW,CAAC;AAwBjD,SAAS,mBAAmB,CAAC,GAAW;IACtC,OAAO,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC;AAC7C,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAa,EAAE,KAAa;IACrD,IAAI,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAChC,OAAO,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;IACD,IAAI,KAAK,KAAK,UAAU,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,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AAE,CAAC;QACb,CAAC;IACH,CAAC;IAEO,wBAAwB,CAAC,GAAW,EAAE,KAAgB,EAAE,YAAoB;QAClF,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,SAAS,CAAC,GAAG,GAAG,MAAM,CAAC,EAAE,SAAS,CAAC,GAAG,KAAK,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAC1G,CAAC;CACF;AAjPD,kEAiPC","sourcesContent":["import { createHash } from 'node:crypto';\nimport { promises as fs } from 'node:fs';\nimport path from 'node:path';\nimport { DataFactory } from 'n3';\nimport type { NamedNode, Quad } from '@rdfjs/types';\nimport { getLoggerFor } from 'global-logger-factory';\nimport { quadToRow } from '../storage/quint/serialization';\nimport { getSqliteRuntime, type SqliteDatabase } from '../storage/SqliteRuntime';\nimport type { AuthMode } from '../authorization/AuthMode';\nimport { buildPodAuthorizationResources } from '../authorization/PodAuthorizationResources';\nimport { RdfQuadIndex } from '../storage/rdf/RdfQuadIndex';\n\nconst RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';\nconst LDP = 'http://www.w3.org/ns/ldp#';\nconst DCT = 'http://purl.org/dc/terms/';\nconst MA = 'http://www.w3.org/ns/ma-ont#';\nconst PIM = 'http://www.w3.org/ns/pim/space#';\nconst FOAF = 'http://xmlns.com/foaf/0.1/';\nconst SOLID = 'http://www.w3.org/ns/solid/terms#';\n\nconst { literal, namedNode, quad } = DataFactory;\n\nexport interface LocalPodProvisioningInput {\n podName: string;\n webId?: string;\n initialResources?: Record<string, string>;\n}\n\nexport interface LocalPodProvisioningResult {\n podUrl: string;\n accountId: string;\n podId: string;\n}\n\nexport interface LocalPodProvisioningServiceOptions {\n baseUrl: string;\n rootDir: string;\n sparqlEndpoint: string;\n identityDbUrl: string;\n rdfIndexPath?: string;\n oidcIssuer?: string;\n authMode?: AuthMode | string;\n}\n\nfunction ensureTrailingSlash(url: string): string {\n return url.endsWith('/') ? url : `${url}/`;\n}\n\nfunction stripSqlitePrefix(value: string, label: string): string {\n if (value.startsWith('sqlite:')) {\n return value.slice('sqlite:'.length);\n }\n if (value === ':memory:') {\n return value;\n }\n if (/^[a-z][a-z0-9+.-]*:/iu.test(value)) {\n throw new Error(`${label} must be a sqlite URL for local Pod provisioning: ${value}`);\n }\n return value;\n}\n\nfunction stableUuid(input: string): string {\n const hex = createHash('sha256').update(input).digest('hex').slice(0, 32);\n return [\n hex.slice(0, 8),\n hex.slice(8, 12),\n `4${hex.slice(13, 16)}`,\n `${((Number.parseInt(hex.slice(16, 18), 16) & 0x3f) | 0x80).toString(16).padStart(2, '0')}${hex.slice(18, 20)}`,\n hex.slice(20, 32),\n ].join('-');\n}\n\nfunction buildWebIdFromIssuer(oidcIssuer: string | undefined, podName: string): string | undefined {\n if (!oidcIssuer) {\n return undefined;\n }\n return new URL(`${encodeURIComponent(podName)}/profile/card#me`, ensureTrailingSlash(oidcIssuer)).toString();\n}\n\nfunction createQuintsTable(db: SqliteDatabase): void {\n db.exec(`\n CREATE TABLE IF NOT EXISTS quints (\n graph TEXT NOT NULL,\n subject TEXT NOT NULL,\n predicate TEXT NOT NULL,\n object TEXT NOT NULL,\n vector TEXT,\n PRIMARY KEY (graph, subject, predicate, object)\n );\n\n CREATE INDEX IF NOT EXISTS idx_spog ON quints (subject, predicate, object, graph);\n CREATE INDEX IF NOT EXISTS idx_ogsp ON quints (object, graph, subject, predicate);\n CREATE INDEX IF NOT EXISTS idx_gspo ON quints (graph, subject, predicate, object);\n CREATE INDEX IF NOT EXISTS idx_sopg ON quints (subject, object, predicate, graph);\n CREATE INDEX IF NOT EXISTS idx_pogs ON quints (predicate, object, graph, subject);\n CREATE INDEX IF NOT EXISTS idx_gpos ON quints (graph, predicate, object, subject);\n `);\n}\n\nfunction createInternalKvTable(db: SqliteDatabase): void {\n db.exec(`\n CREATE TABLE IF NOT EXISTS internal_kv (\n key TEXT PRIMARY KEY,\n value TEXT NOT NULL,\n updated_at TEXT NOT NULL DEFAULT (datetime('now'))\n );\n `);\n}\n\nfunction meta(resource: string): string {\n return `meta:${resource}`;\n}\n\nfunction iri(base: string, relative: string): string {\n return new URL(relative, base).toString();\n}\n\nexport class LocalPodProvisioningService {\n private readonly logger = getLoggerFor(this);\n private readonly baseUrl: string;\n private readonly rootDir: string;\n private readonly sparqlDbPath: string;\n private readonly identityDbPath: string;\n private readonly rdfIndexPath?: string;\n private readonly oidcIssuer?: string;\n private readonly authMode?: AuthMode | string;\n private readonly sqliteRuntime = getSqliteRuntime();\n\n public constructor(options: LocalPodProvisioningServiceOptions) {\n this.baseUrl = ensureTrailingSlash(options.baseUrl);\n this.rootDir = options.rootDir;\n this.sparqlDbPath = stripSqlitePrefix(options.sparqlEndpoint, 'sparqlEndpoint');\n this.identityDbPath = stripSqlitePrefix(options.identityDbUrl, 'identityDbUrl');\n this.rdfIndexPath = options.rdfIndexPath;\n this.oidcIssuer = options.oidcIssuer ? ensureTrailingSlash(options.oidcIssuer) : undefined;\n this.authMode = options.authMode;\n }\n\n public async createPod(input: LocalPodProvisioningInput): Promise<LocalPodProvisioningResult> {\n const podUrl = ensureTrailingSlash(new URL(`${encodeURIComponent(input.podName)}/`, this.baseUrl).toString());\n const webId = input.webId ?? buildWebIdFromIssuer(this.oidcIssuer, input.podName) ?? `${podUrl}profile/card#me`;\n // Local stores the Pod, but the owner WebID trusts the actual token issuer.\n const oidcIssuer = this.oidcIssuer ?? this.baseUrl;\n const accountId = stableUuid(`account:${podUrl}:${webId}`);\n const podId = stableUuid(`pod:${podUrl}:${webId}`);\n const ownerId = stableUuid(`owner:${podId}:${webId}`);\n const webIdLinkId = stableUuid(`webIdLink:${accountId}:${webId}`);\n\n await this.createPodFiles(input.podName, input.initialResources);\n const quads = this.buildPodQuads({ podUrl, webId, oidcIssuer });\n this.writeQuints(quads);\n this.writeRdfIndex(quads);\n this.writeIdentityIndexes({ accountId, podId, ownerId, webIdLinkId, podUrl, webId });\n\n this.logger.info(`Provisioned local pod ${podUrl} for ${webId}`);\n return { podUrl, accountId, podId };\n }\n\n private async createPodFiles(podName: string, initialResources?: Record<string, string>): Promise<void> {\n const podPath = path.join(this.rootDir, podName);\n await fs.mkdir(path.join(podPath, 'profile'), { recursive: true });\n\n if (!initialResources) {\n return;\n }\n\n for (const [filename, content] of Object.entries(initialResources)) {\n const normalized = path.normalize(filename);\n if (normalized.startsWith('..') || path.isAbsolute(normalized)) {\n throw new Error(`Invalid initial resource path: ${filename}`);\n }\n const filePath = path.join(podPath, normalized);\n await fs.mkdir(path.dirname(filePath), { recursive: true });\n await fs.writeFile(filePath, content, 'utf8');\n }\n }\n\n private writeQuints(quads: Quad[]): void {\n const db = this.sqliteRuntime.openDatabase(this.sparqlDbPath);\n try {\n createQuintsTable(db);\n const rows = quads.map((entry) => {\n const row = quadToRow(entry);\n return [row.graph, row.subject, row.predicate, row.object, row.vector] as const;\n });\n const insert = db.prepare(`\n INSERT OR IGNORE INTO quints (graph, subject, predicate, object, vector)\n VALUES (?, ?, ?, ?, ?)\n `);\n\n db.transaction(() => {\n for (const row of rows) {\n insert.run(...row);\n }\n })();\n } finally {\n db.close();\n }\n }\n\n private writeRdfIndex(quads: Quad[]): void {\n if (!this.rdfIndexPath) {\n return;\n }\n\n const index = new RdfQuadIndex({ path: this.rdfIndexPath });\n try {\n index.open();\n index.multiPut(quads);\n } finally {\n index.close();\n }\n }\n\n private buildPodQuads({ podUrl, webId, oidcIssuer }: { podUrl: string; webId: string; oidcIssuer: string }): Quad[] {\n const now = new Date().toISOString();\n const root = this.baseUrl;\n const profileUrl = iri(podUrl, 'profile/');\n const cardUrl = iri(podUrl, 'profile/card');\n const settingsUrl = iri(podUrl, 'settings/');\n const privateTypeIndexUrl = iri(podUrl, '.settings/privateTypeIndex.ttl');\n const privateTypeIndexGraph = namedNode(privateTypeIndexUrl);\n const authorizationResources = buildPodAuthorizationResources({\n authMode: this.authMode,\n podUrl,\n cardUrl,\n webId,\n stableId: stableUuid,\n iri,\n });\n const rootGraph = namedNode(root);\n const podGraph = namedNode(podUrl);\n const profileGraph = namedNode(profileUrl);\n const cardGraph = namedNode(cardUrl);\n const out: Quad[] = [];\n\n const add = (graph: string, subject: string, predicate: string, object: string): void => {\n out.push(quad(namedNode(subject), namedNode(predicate), namedNode(object), namedNode(graph)));\n };\n const addLiteral = (graph: string, subject: string, predicate: string, value: string): void => {\n out.push(quad(namedNode(subject), namedNode(predicate), literal(value), namedNode(graph)));\n };\n const addDate = (graph: string, subject: string): void => {\n out.push(quad(namedNode(subject), namedNode(`${DCT}modified`), literal(now, namedNode('http://www.w3.org/2001/XMLSchema#dateTime')), namedNode(graph)));\n };\n const addContainerMeta = (resource: string, storage = false): void => {\n const graph = meta(resource);\n addDate(graph, resource);\n add(graph, resource, `${RDF}type`, `${LDP}Resource`);\n add(graph, resource, `${RDF}type`, `${LDP}Container`);\n add(graph, resource, `${RDF}type`, `${LDP}BasicContainer`);\n if (storage) {\n add(graph, resource, `${RDF}type`, `${PIM}Storage`);\n }\n addLiteral(graph, resource, `${MA}format`, 'internal/quads');\n };\n const addDocumentMeta = (resource: string): void => {\n const graph = meta(resource);\n addDate(graph, resource);\n add(graph, resource, `${RDF}type`, `${LDP}Resource`);\n };\n\n out.push(quad(namedNode(root), namedNode(`${LDP}contains`), namedNode(podUrl), rootGraph));\n out.push(quad(namedNode(podUrl), namedNode(`${LDP}contains`), namedNode(authorizationResources.rootResourceUrl), podGraph));\n out.push(quad(namedNode(podUrl), namedNode(`${LDP}contains`), namedNode(profileUrl), podGraph));\n out.push(quad(namedNode(podUrl), namedNode(`${LDP}contains`), namedNode(settingsUrl), podGraph));\n out.push(quad(namedNode(profileUrl), namedNode(`${LDP}contains`), namedNode(authorizationResources.profileResourceUrl), profileGraph));\n out.push(quad(namedNode(profileUrl), namedNode(`${LDP}contains`), namedNode(cardUrl), profileGraph));\n out.push(quad(namedNode(profileUrl), namedNode(`${LDP}contains`), namedNode(authorizationResources.cardResourceUrl), profileGraph));\n\n addContainerMeta(root);\n addContainerMeta(podUrl, true);\n addContainerMeta(profileUrl);\n addDocumentMeta(authorizationResources.rootResourceUrl);\n addDocumentMeta(authorizationResources.profileResourceUrl);\n addDocumentMeta(cardUrl);\n addDocumentMeta(authorizationResources.cardResourceUrl);\n\n out.push(quad(namedNode(cardUrl), namedNode(`${RDF}type`), namedNode(`${FOAF}PersonalProfileDocument`), cardGraph));\n out.push(quad(namedNode(cardUrl), namedNode(`${FOAF}maker`), namedNode(webId), cardGraph));\n out.push(quad(namedNode(cardUrl), namedNode(`${FOAF}primaryTopic`), namedNode(webId), cardGraph));\n out.push(quad(namedNode(webId), namedNode(`${RDF}type`), namedNode(`${FOAF}Person`), cardGraph));\n out.push(quad(namedNode(webId), namedNode(`${SOLID}oidcIssuer`), namedNode(oidcIssuer), cardGraph));\n out.push(quad(namedNode(webId), namedNode(`${SOLID}storage`), namedNode(podUrl), cardGraph));\n out.push(quad(namedNode(webId), namedNode(`${SOLID}privateTypeIndex`), namedNode(privateTypeIndexUrl), cardGraph));\n\n this.addPrivateTypeIndexQuads(out, privateTypeIndexGraph, privateTypeIndexUrl);\n\n out.push(...authorizationResources.quads);\n\n return out;\n }\n\n private writeIdentityIndexes(input: {\n accountId: string;\n podId: string;\n ownerId: string;\n webIdLinkId: string;\n podUrl: string;\n webId: string;\n }): void {\n const db = this.sqliteRuntime.openDatabase(this.identityDbPath);\n try {\n createInternalKvTable(db);\n const account = {\n linkedLoginsCount: 1,\n id: input.accountId,\n '**pod**': {\n [input.podId]: {\n baseUrl: input.podUrl,\n accountId: input.accountId,\n id: input.podId,\n '**owner**': {\n [input.ownerId]: {\n podId: input.podId,\n webId: input.webId,\n visible: false,\n id: input.ownerId,\n },\n },\n },\n },\n '**webIdLink**': {\n [input.webIdLinkId]: {\n webId: input.webId,\n accountId: input.accountId,\n id: input.webIdLinkId,\n },\n },\n };\n\n const rows: Array<[string, string]> = [\n [`accounts/data/${input.accountId}`, JSON.stringify(account)],\n [`accounts/index/pod/${input.podId}`, JSON.stringify([input.accountId])],\n [`accounts/index/pod/baseUrl/${encodeURIComponent(input.podUrl)}`, JSON.stringify([input.accountId])],\n [`accounts/index/owner/${input.ownerId}`, JSON.stringify([input.accountId])],\n [`accounts/index/webIdLink/${input.webIdLinkId}`, JSON.stringify([input.accountId])],\n [`accounts/index/webIdLink/webId/${encodeURIComponent(input.webId)}`, JSON.stringify([input.accountId])],\n ];\n const insert = db.prepare(`\n INSERT INTO internal_kv (key, value, updated_at)\n VALUES (?, ?, datetime('now'))\n ON CONFLICT (key) DO UPDATE SET value = excluded.value, updated_at = datetime('now')\n `);\n\n db.transaction(() => {\n for (const row of rows) {\n insert.run(...row);\n }\n })();\n } finally {\n db.close();\n }\n }\n\n private addPrivateTypeIndexQuads(out: Quad[], graph: NamedNode, typeIndexUrl: string): void {\n out.push(quad(namedNode(typeIndexUrl), namedNode(`${RDF}type`), namedNode(`${SOLID}TypeIndex`), graph));\n }\n}\n"]}
@@ -143,6 +143,10 @@
143
143
  {
144
144
  "@id": "undefineds:dist/provision/LocalPodProvisioningService.jsonld#LocalPodProvisioningService__member_writeIdentityIndexes",
145
145
  "memberFieldName": "writeIdentityIndexes"
146
+ },
147
+ {
148
+ "@id": "undefineds:dist/provision/LocalPodProvisioningService.jsonld#LocalPodProvisioningService__member_addPrivateTypeIndexQuads",
149
+ "memberFieldName": "addPrivateTypeIndexQuads"
146
150
  }
147
151
  ],
148
152
  "constructorArguments": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@undefineds.co/xpod",
3
- "version": "0.3.48",
3
+ "version": "0.3.49",
4
4
  "description": "Xpod is an extended Community Solid Server, offering rich-feature, production-level Solid Pod and identity management.",
5
5
  "repository": "https://github.com/undefinedsco/xpod",
6
6
  "author": "developer@undefineds.co",
@@ -162,7 +162,7 @@
162
162
  "@mariozechner/pi-coding-agent": "^0.55.1",
163
163
  "@solid/community-server": "8.0.0-alpha.1",
164
164
  "@undefineds.co/drizzle-solid": "0.3.16",
165
- "@undefineds.co/models": "0.2.42",
165
+ "@undefineds.co/models": "0.2.45",
166
166
  "abstract-level": "^1.0.4",
167
167
  "acme-client": "^5.1.3",
168
168
  "ai": "^6.0.6",