@semiont/core 0.5.3 → 0.5.4

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 (89) hide show
  1. package/dist/annotation-assembly.d.ts +54 -0
  2. package/dist/annotation-assembly.d.ts.map +1 -0
  3. package/dist/annotation-types.d.ts +30 -0
  4. package/dist/annotation-types.d.ts.map +1 -0
  5. package/dist/annotation-utils.d.ts +43 -0
  6. package/dist/annotation-utils.d.ts.map +1 -0
  7. package/dist/auth-types.d.ts +8 -0
  8. package/dist/auth-types.d.ts.map +1 -0
  9. package/dist/branded-types.d.ts +70 -0
  10. package/dist/branded-types.d.ts.map +1 -0
  11. package/dist/bridged-channels.d.ts +18 -0
  12. package/dist/bridged-channels.d.ts.map +1 -0
  13. package/dist/bus-log.d.ts +25 -0
  14. package/dist/bus-log.d.ts.map +1 -0
  15. package/dist/bus-protocol.d.ts +510 -0
  16. package/dist/bus-protocol.d.ts.map +1 -0
  17. package/dist/{config.types-oPv3Ajk-.d.ts → config/config.types.d.ts} +25 -23
  18. package/dist/config/config.types.d.ts.map +1 -0
  19. package/dist/config/configuration-error.d.ts +17 -0
  20. package/dist/config/configuration-error.d.ts.map +1 -0
  21. package/dist/config/environment-validator.d.ts +28 -0
  22. package/dist/config/environment-validator.d.ts.map +1 -0
  23. package/dist/config/node-config-loader.d.ts +4 -74
  24. package/dist/config/node-config-loader.d.ts.map +1 -0
  25. package/dist/config/platform-types.d.ts +26 -0
  26. package/dist/config/platform-types.d.ts.map +1 -0
  27. package/dist/config/toml-loader.d.ts +59 -0
  28. package/dist/config/toml-loader.d.ts.map +1 -0
  29. package/dist/did-utils.d.ts +76 -0
  30. package/dist/did-utils.d.ts.map +1 -0
  31. package/dist/errors.d.ts +48 -0
  32. package/dist/errors.d.ts.map +1 -0
  33. package/dist/event-base.d.ts +70 -0
  34. package/dist/event-base.d.ts.map +1 -0
  35. package/dist/event-bus.d.ts +141 -0
  36. package/dist/event-bus.d.ts.map +1 -0
  37. package/dist/event-utils.d.ts +43 -0
  38. package/dist/event-utils.d.ts.map +1 -0
  39. package/dist/fuzzy-anchor.d.ts +81 -0
  40. package/dist/fuzzy-anchor.d.ts.map +1 -0
  41. package/dist/graph.d.ts +44 -0
  42. package/dist/graph.d.ts.map +1 -0
  43. package/dist/id-generation.d.ts +8 -0
  44. package/dist/id-generation.d.ts.map +1 -0
  45. package/dist/identifiers.d.ts +24 -0
  46. package/dist/identifiers.d.ts.map +1 -0
  47. package/dist/index.d.ts +59 -6022
  48. package/dist/index.d.ts.map +1 -0
  49. package/dist/index.js +41 -19
  50. package/dist/index.js.map +1 -1
  51. package/dist/locales.d.ts +31 -0
  52. package/dist/locales.d.ts.map +1 -0
  53. package/dist/logger.d.ts +56 -0
  54. package/dist/logger.d.ts.map +1 -0
  55. package/dist/mime-utils.d.ts +38 -0
  56. package/dist/mime-utils.d.ts.map +1 -0
  57. package/dist/operators/burst-buffer.d.ts +61 -0
  58. package/dist/operators/burst-buffer.d.ts.map +1 -0
  59. package/dist/payload-types.d.ts +16 -0
  60. package/dist/payload-types.d.ts.map +1 -0
  61. package/dist/persisted-events.d.ts +76 -0
  62. package/dist/persisted-events.d.ts.map +1 -0
  63. package/dist/project.d.ts +69 -0
  64. package/dist/project.d.ts.map +1 -0
  65. package/dist/resource-types.d.ts +15 -0
  66. package/dist/resource-types.d.ts.map +1 -0
  67. package/dist/resource-utils.d.ts +97 -0
  68. package/dist/resource-utils.d.ts.map +1 -0
  69. package/dist/serialize-per-key.d.ts +51 -0
  70. package/dist/serialize-per-key.d.ts.map +1 -0
  71. package/dist/svg-utils.d.ts +44 -0
  72. package/dist/svg-utils.d.ts.map +1 -0
  73. package/dist/tag-schemas.d.ts +27 -0
  74. package/dist/tag-schemas.d.ts.map +1 -0
  75. package/dist/text-context.d.ts +85 -0
  76. package/dist/text-context.d.ts.map +1 -0
  77. package/dist/text-encoding.d.ts +34 -0
  78. package/dist/text-encoding.d.ts.map +1 -0
  79. package/dist/transport.d.ts +274 -0
  80. package/dist/transport.d.ts.map +1 -0
  81. package/dist/type-guards.d.ts +44 -0
  82. package/dist/type-guards.d.ts.map +1 -0
  83. package/dist/types.d.ts +3517 -0
  84. package/dist/types.d.ts.map +1 -0
  85. package/dist/validation.d.ts +57 -0
  86. package/dist/validation.d.ts.map +1 -0
  87. package/dist/web-annotation-utils.d.ts +154 -0
  88. package/dist/web-annotation-utils.d.ts.map +1 -0
  89. package/package.json +3 -3
@@ -2,17 +2,17 @@
2
2
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
3
3
  * via the `definition` "PlatformType".
4
4
  */
5
- type PlatformType = 'posix' | 'container' | 'aws' | 'external';
5
+ export type PlatformType = 'posix' | 'container' | 'aws' | 'external';
6
6
  /**
7
7
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
8
8
  * via the `definition` "GraphDatabaseType".
9
9
  */
10
- type GraphDatabaseType = 'neo4j' | 'janusgraph' | 'neptune' | 'memory';
10
+ export type GraphDatabaseType = 'neo4j' | 'janusgraph' | 'neptune' | 'memory';
11
11
  /**
12
12
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
13
13
  * via the `definition` "GraphServiceConfig".
14
14
  */
15
- type GraphServiceConfig = {
15
+ export type GraphServiceConfig = {
16
16
  [k: string]: unknown;
17
17
  } & {
18
18
  platform: ServicePlatformConfig;
@@ -74,11 +74,14 @@ type GraphServiceConfig = {
74
74
  [k: string]: string;
75
75
  };
76
76
  };
77
+ export interface HttpsSemiontOrgSchemasConfigJson {
78
+ [k: string]: unknown;
79
+ }
77
80
  /**
78
81
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
79
82
  * via the `definition` "ServicePlatformConfig".
80
83
  */
81
- interface ServicePlatformConfig {
84
+ export interface ServicePlatformConfig {
82
85
  type: PlatformType;
83
86
  [k: string]: unknown;
84
87
  }
@@ -86,7 +89,7 @@ interface ServicePlatformConfig {
86
89
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
87
90
  * via the `definition` "ResourceRequirements".
88
91
  */
89
- interface ResourceRequirements {
92
+ export interface ResourceRequirements {
90
93
  cpu?: string;
91
94
  memory?: string;
92
95
  gpu?: number;
@@ -99,7 +102,7 @@ interface ResourceRequirements {
99
102
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
100
103
  * via the `definition` "SecurityRequirements".
101
104
  */
102
- interface SecurityRequirements {
105
+ export interface SecurityRequirements {
103
106
  readOnlyRootFilesystem?: boolean;
104
107
  runAsNonRoot?: boolean;
105
108
  runAsUser?: number;
@@ -116,7 +119,7 @@ interface SecurityRequirements {
116
119
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
117
120
  * via the `definition` "BuildRequirements".
118
121
  */
119
- interface BuildRequirements {
122
+ export interface BuildRequirements {
120
123
  dockerfile?: string;
121
124
  buildContext?: string;
122
125
  buildArgs?: {
@@ -130,7 +133,7 @@ interface BuildRequirements {
130
133
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
131
134
  * via the `definition` "BackendServiceConfig".
132
135
  */
133
- interface BackendServiceConfig {
136
+ export interface BackendServiceConfig {
134
137
  platform: ServicePlatformConfig;
135
138
  devMode?: boolean;
136
139
  command?: string;
@@ -184,7 +187,7 @@ interface BackendServiceConfig {
184
187
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
185
188
  * via the `definition` "FrontendServiceConfig".
186
189
  */
187
- interface FrontendServiceConfig {
190
+ export interface FrontendServiceConfig {
188
191
  platform: ServicePlatformConfig;
189
192
  devMode?: boolean;
190
193
  command?: string;
@@ -236,7 +239,7 @@ interface FrontendServiceConfig {
236
239
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
237
240
  * via the `definition` "VectorsServiceConfig".
238
241
  */
239
- interface VectorsServiceConfig {
242
+ export interface VectorsServiceConfig {
240
243
  platform?: ServicePlatformConfig;
241
244
  type: 'qdrant' | 'memory';
242
245
  host?: string;
@@ -246,7 +249,7 @@ interface VectorsServiceConfig {
246
249
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
247
250
  * via the `definition` "EmbeddingServiceConfig".
248
251
  */
249
- interface EmbeddingServiceConfig {
252
+ export interface EmbeddingServiceConfig {
250
253
  platform?: ServicePlatformConfig;
251
254
  type: 'voyage' | 'ollama';
252
255
  model: string;
@@ -263,7 +266,7 @@ interface EmbeddingServiceConfig {
263
266
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
264
267
  * via the `definition` "DatabaseServiceConfig".
265
268
  */
266
- interface DatabaseServiceConfig {
269
+ export interface DatabaseServiceConfig {
267
270
  platform: ServicePlatformConfig;
268
271
  type: string;
269
272
  name?: string;
@@ -322,7 +325,7 @@ interface DatabaseServiceConfig {
322
325
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
323
326
  * via the `definition` "OllamaProviderConfig".
324
327
  */
325
- interface OllamaProviderConfig {
328
+ export interface OllamaProviderConfig {
326
329
  platform: ServicePlatformConfig;
327
330
  baseURL?: string;
328
331
  port?: number;
@@ -336,7 +339,7 @@ interface OllamaProviderConfig {
336
339
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
337
340
  * via the `definition` "AnthropicProviderConfig".
338
341
  */
339
- interface AnthropicProviderConfig {
342
+ export interface AnthropicProviderConfig {
340
343
  platform: 'external';
341
344
  endpoint: string;
342
345
  apiKey: string;
@@ -345,7 +348,7 @@ interface AnthropicProviderConfig {
345
348
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
346
349
  * via the `definition` "InferenceProvidersConfig".
347
350
  */
348
- interface InferenceProvidersConfig {
351
+ export interface InferenceProvidersConfig {
349
352
  ollama?: OllamaProviderConfig;
350
353
  anthropic?: AnthropicProviderConfig;
351
354
  [k: string]: unknown;
@@ -354,7 +357,7 @@ interface InferenceProvidersConfig {
354
357
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
355
358
  * via the `definition` "McpServiceConfig".
356
359
  */
357
- interface McpServiceConfig {
360
+ export interface McpServiceConfig {
358
361
  platform: ServicePlatformConfig;
359
362
  command?: string;
360
363
  image?: string;
@@ -401,7 +404,7 @@ interface McpServiceConfig {
401
404
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
402
405
  * via the `definition` "ServicesConfig".
403
406
  */
404
- interface ServicesConfig {
407
+ export interface ServicesConfig {
405
408
  backend?: BackendServiceConfig;
406
409
  frontend?: FrontendServiceConfig;
407
410
  database?: DatabaseServiceConfig;
@@ -415,7 +418,7 @@ interface ServicesConfig {
415
418
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
416
419
  * via the `definition` "SiteConfig".
417
420
  */
418
- interface SiteConfig {
421
+ export interface SiteConfig {
419
422
  /**
420
423
  * Display name for the site
421
424
  */
@@ -443,7 +446,7 @@ interface SiteConfig {
443
446
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
444
447
  * via the `definition` "AppConfig".
445
448
  */
446
- interface AppConfig {
449
+ export interface AppConfig {
447
450
  features?: {
448
451
  enableAnalytics?: boolean;
449
452
  enableMaintenanceMode?: boolean;
@@ -484,7 +487,7 @@ interface AppConfig {
484
487
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
485
488
  * via the `definition` "EnvironmentConfig".
486
489
  */
487
- interface EnvironmentConfig {
490
+ export interface EnvironmentConfig {
488
491
  /**
489
492
  * Optional comment for documentation
490
493
  */
@@ -544,7 +547,7 @@ interface EnvironmentConfig {
544
547
  * This interface was referenced by `HttpsSemiontOrgSchemasConfigJson`'s JSON-Schema
545
548
  * via the `definition` "SemiontConfig".
546
549
  */
547
- interface SemiontConfig {
550
+ export interface SemiontConfig {
548
551
  /**
549
552
  * Config file version (semver)
550
553
  */
@@ -557,5 +560,4 @@ interface SemiontConfig {
557
560
  app?: AppConfig;
558
561
  services?: ServicesConfig;
559
562
  }
560
-
561
- export type { AnthropicProviderConfig as A, BackendServiceConfig as B, DatabaseServiceConfig as D, EnvironmentConfig as E, FrontendServiceConfig as F, GraphDatabaseType as G, InferenceProvidersConfig as I, McpServiceConfig as M, OllamaProviderConfig as O, PlatformType as P, SemiontConfig as S, VectorsServiceConfig as V, AppConfig as a, EmbeddingServiceConfig as b, GraphServiceConfig as c, ServicePlatformConfig as d, ServicesConfig as e, SiteConfig as f };
563
+ //# sourceMappingURL=config.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.types.d.ts","sourceRoot":"","sources":["../../src/config/config.types.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,WAAW,GAAG,KAAK,GAAG,UAAU,CAAC;AACtE;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,YAAY,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC9E;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB,GAAG;IACF,QAAQ,EAAE,qBAAqB,CAAC;IAChC,IAAI,EAAE,iBAAiB,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MA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CAAC;IAChB,IAAI,EAAE,UAAU,CAAC;IACjB,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Configuration Error Class
3
+ *
4
+ * Custom error class for configuration validation and loading errors.
5
+ * Provides structured error information with helpful suggestions.
6
+ */
7
+ export declare class ConfigurationError extends Error {
8
+ environment?: string | undefined;
9
+ suggestion?: string | undefined;
10
+ readonly cause?: Error;
11
+ constructor(message: string, environment?: string | undefined, suggestion?: string | undefined, cause?: Error);
12
+ /**
13
+ * Format the error nicely for CLI output
14
+ */
15
+ toString(): string;
16
+ }
17
+ //# sourceMappingURL=configuration-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration-error.d.ts","sourceRoot":"","sources":["../../src/config/configuration-error.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,qBAAa,kBAAmB,SAAQ,KAAK;IAKlC,WAAW,CAAC,EAAE,MAAM;IACpB,UAAU,CAAC,EAAE,MAAM;IAL5B,SAAyB,KAAK,CAAC,EAAE,KAAK,CAAC;gBAGrC,OAAO,EAAE,MAAM,EACR,WAAW,CAAC,EAAE,MAAM,YAAA,EACpB,UAAU,CAAC,EAAE,MAAM,YAAA,EAC1B,KAAK,CAAC,EAAE,KAAK;IAOf;;OAEG;IACM,QAAQ,IAAI,MAAM;CAU5B"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Environment validation utilities
3
+ *
4
+ * Pure functions - accept available environments as parameter instead of reading from filesystem
5
+ */
6
+ export type Environment = string;
7
+ /**
8
+ * Type guard to check if a string is a valid Environment
9
+ * @param value - The environment string to check
10
+ * @param availableEnvironments - List of valid environment names
11
+ */
12
+ export declare function isValidEnvironment(value: string | undefined, availableEnvironments: string[]): value is Environment;
13
+ /**
14
+ * Parse environment string to Environment type
15
+ * @param value - The environment string to parse
16
+ * @param availableEnvironments - List of valid environment names
17
+ * @returns Valid Environment type
18
+ * @throws Error if environment is invalid or not provided
19
+ */
20
+ export declare function parseEnvironment(value: string | undefined, availableEnvironments: string[]): Environment;
21
+ /**
22
+ * Validate and return environment or throw error
23
+ * @param value - The environment string to validate
24
+ * @param availableEnvironments - List of valid environment names
25
+ * @throws Error if environment is invalid
26
+ */
27
+ export declare function validateEnvironment(value: string | undefined, availableEnvironments: string[]): Environment;
28
+ //# sourceMappingURL=environment-validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment-validator.d.ts","sourceRoot":"","sources":["../../src/config/environment-validator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,qBAAqB,EAAE,MAAM,EAAE,GAAG,KAAK,IAAI,WAAW,CAGnH;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,qBAAqB,EAAE,MAAM,EAAE,GAAG,WAAW,CAQxG;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,qBAAqB,EAAE,MAAM,EAAE,GAAG,WAAW,CAQ3G"}
@@ -1,74 +1,5 @@
1
- import { E as EnvironmentConfig } from '../config.types-oPv3Ajk-.js';
2
-
3
- /**
4
- * Represents a Semiont project rooted at a given directory.
5
- *
6
- * Computes all paths — durable and ephemeral — once at construction time.
7
- * XDG environment variables are read here and nowhere else.
8
- *
9
- * Durable paths (inside the project root, committed or repo-local):
10
- * eventsDir — .semiont/events/ (system of record, committed)
11
- * representationsDir — representations/ (content store, committed)
12
- *
13
- * Ephemeral paths (outside the project root, never committed):
14
- * configDir — $XDG_CONFIG_HOME/semiont/{name}/ (generated config for managed processes)
15
- * dataHome — $XDG_DATA_HOME/semiont/{name}/ (persistent user data, e.g. database files)
16
- * stateDir — $XDG_STATE_HOME/semiont/{name}/
17
- * embeddingsDir — stateDir/embeddings/
18
- * projectionsDir — stateDir/projections/
19
- * jobsDir — stateDir/jobs/
20
- * backendLogsDir — stateDir/backend/
21
- * backendAppLogFile — backendLogsDir/app.log
22
- * backendErrorLogFile — backendLogsDir/error.log
23
- * runtimeDir — $XDG_RUNTIME_DIR/semiont/{name}/ (or $TMPDIR fallback)
24
- * backendPidFile — runtimeDir/backend.pid
25
- *
26
- * Note: frontend paths are NOT project-scoped. The frontend service is bundled
27
- * with the CLI and uses fixed XDG paths keyed by "frontend", not project name.
28
- * See apps/cli/src/platforms/posix/handlers/frontend-paths.ts.
29
- */
30
- declare class SemiontProject {
31
- readonly root: string;
32
- readonly name: string;
33
- /** True if [git] sync = true in .semiont/config. When true, semiont stages
34
- * working-tree and event-log changes in the git index automatically. */
35
- readonly gitSync: boolean;
36
- readonly eventsDir: string;
37
- readonly representationsDir: string;
38
- readonly configDir: string;
39
- readonly dataHome: string;
40
- readonly stateDir: string;
41
- readonly embeddingsDir: string;
42
- readonly projectionsDir: string;
43
- readonly jobsDir: string;
44
- readonly backendLogsDir: string;
45
- readonly backendAppLogFile: string;
46
- readonly backendErrorLogFile: string;
47
- readonly runtimeDir: string;
48
- readonly backendPidFile: string;
49
- constructor(projectRoot: string, name?: string);
50
- /**
51
- * Read the current git branch for the project root.
52
- * Returns null if the project is not a git repo or git is not available.
53
- */
54
- gitBranch(): string | null;
55
- /**
56
- * Delete all ephemeral state for this project (stateDir + runtimeDir).
57
- * Does not touch eventsDir or dataDir.
58
- */
59
- destroy(): Promise<void>;
60
- /**
61
- * Read [git] sync from .semiont/config.
62
- * Defaults to false if the section or key is absent.
63
- */
64
- private static readGitSync;
65
- /**
66
- * Read the project name from .semiont/config [project] name = "..."
67
- * Falls back to the directory basename if the config is absent or has no name.
68
- */
69
- private static readName;
70
- }
71
-
1
+ import type { EnvironmentConfig } from './config.types.js';
2
+ export { SemiontProject } from '../project.js';
72
3
  /**
73
4
  * Load semiont environment config for a Node.js process.
74
5
  *
@@ -78,6 +9,5 @@ declare class SemiontProject {
78
9
  * This is the canonical config loader for any Node.js process. SEMIONT_ENV
79
10
  * should be read once at the process entry point and passed as `environment`.
80
11
  */
81
- declare function loadEnvironmentConfig(projectRoot: string, environment: string): EnvironmentConfig;
82
-
83
- export { SemiontProject, loadEnvironmentConfig };
12
+ export declare function loadEnvironmentConfig(projectRoot: string, environment: string): EnvironmentConfig;
13
+ //# sourceMappingURL=node-config-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-config-loader.d.ts","sourceRoot":"","sources":["../../src/config/node-config-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAO/C;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,GAClB,iBAAiB,CAOnB"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Platform Types Module
3
+ *
4
+ * Re-exports PlatformType from schema-generated types.
5
+ * Platforms represent WHERE services run (infrastructure targets).
6
+ */
7
+ import { PlatformType as SchemaPlatformType } from './config.types';
8
+ /**
9
+ * Platform type literals from JSON Schema
10
+ * These represent the infrastructure targets where services can be deployed
11
+ */
12
+ export type PlatformType = SchemaPlatformType;
13
+ /**
14
+ * Type guard to check if a string is a valid platform type
15
+ *
16
+ * @param value - Value to check
17
+ * @returns True if value is a valid PlatformType
18
+ */
19
+ export declare function isValidPlatformType(value: string): value is PlatformType;
20
+ /**
21
+ * Get all valid platform types
22
+ *
23
+ * @returns Array of all platform types
24
+ */
25
+ export declare function getAllPlatformTypes(): PlatformType[];
26
+ //# sourceMappingURL=platform-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-types.d.ts","sourceRoot":"","sources":["../../src/config/platform-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,IAAI,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpE;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAE9C;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,YAAY,CAExE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,YAAY,EAAE,CAEpD"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * TOML Config Loader
3
+ *
4
+ * Reads ~/.semiontconfig (TOML) and .semiont/config (TOML) and produces
5
+ * an EnvironmentConfig for the requested environment.
6
+ *
7
+ * File format: see TOML-XDG-CONFIG.md
8
+ *
9
+ * Loading sequence:
10
+ * 1. Read .semiont/config → projectName, site, environments.<env>.* (project base)
11
+ * 2. Read ~/.semiontconfig → defaults, environments.<env>.* (user overrides)
12
+ * 3. Deep-merge: project base ← user overrides (user wins on conflicts)
13
+ * Any environment name is valid (local, staging, production, custom, ...)
14
+ * 4. Resolve ${VAR} references from process.env
15
+ * 5. Apply inheritance: workers.<name> → workers.default → error
16
+ * 6. Map to EnvironmentConfig shape
17
+ */
18
+ import type { EnvironmentConfig } from './config.types';
19
+ export interface InferenceConfig {
20
+ type: 'anthropic' | 'ollama';
21
+ model: string;
22
+ maxTokens?: number;
23
+ apiKey?: string;
24
+ endpoint?: string;
25
+ baseURL?: string;
26
+ }
27
+ export interface ActorInferenceConfig {
28
+ gatherer?: InferenceConfig;
29
+ matcher?: InferenceConfig;
30
+ }
31
+ export interface WorkerInferenceConfig {
32
+ default?: InferenceConfig;
33
+ 'reference-annotation'?: InferenceConfig;
34
+ 'highlight-annotation'?: InferenceConfig;
35
+ 'assessment-annotation'?: InferenceConfig;
36
+ 'comment-annotation'?: InferenceConfig;
37
+ 'tag-annotation'?: InferenceConfig;
38
+ 'generation'?: InferenceConfig;
39
+ }
40
+ export type TomlFileReader = {
41
+ readIfExists: (path: string) => string | null;
42
+ };
43
+ /**
44
+ * Parse ~/.semiontconfig and .semiont/config and return EnvironmentConfig.
45
+ *
46
+ * @param projectRoot - Path to the project root (contains .semiont/config)
47
+ * @param environment - Environment name (e.g. 'local', 'production')
48
+ * @param globalConfigPath - Path to ~/.semiontconfig (caller resolves ~ expansion)
49
+ * @param reader - File reader abstraction
50
+ * @param env - Environment variables for ${VAR} resolution
51
+ */
52
+ export declare function loadTomlConfig(projectRoot: string | null, environment: string, globalConfigPath: string, reader: TomlFileReader, env: Record<string, string | undefined>): EnvironmentConfig;
53
+ /**
54
+ * Create a TOML config loader backed by a file reader.
55
+ * Drop-in replacement for createConfigLoader that reads TOML instead of JSON.
56
+ * The caller must resolve globalConfigPath (e.g. expand '~' using process.env.HOME).
57
+ */
58
+ export declare function createTomlConfigLoader(reader: TomlFileReader, globalConfigPath: string, env: Record<string, string | undefined>): (projectRoot: string | null, environment: string) => EnvironmentConfig;
59
+ //# sourceMappingURL=toml-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toml-loader.d.ts","sourceRoot":"","sources":["../../src/config/toml-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAiD,MAAM,gBAAgB,CAAC;AAkDvG,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,WAAW,GAAG,QAAQ,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,sBAAsB,CAAC,EAAE,eAAe,CAAC;IACzC,sBAAsB,CAAC,EAAE,eAAe,CAAC;IACzC,uBAAuB,CAAC,EAAE,eAAe,CAAC;IAC1C,oBAAoB,CAAC,EAAE,eAAe,CAAC;IACvC,gBAAgB,CAAC,EAAE,eAAe,CAAC;IACnC,YAAY,CAAC,EAAE,eAAe,CAAC;CAChC;AAmHD,MAAM,MAAM,cAAc,GAAG;IAC3B,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;CAC/C,CAAC;AAWF;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,WAAW,EAAE,MAAM,GAAG,IAAI,EAC1B,WAAW,EAAE,MAAM,EACnB,gBAAgB,EAAE,MAAM,EACxB,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GACtC,iBAAiB,CAkRnB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,cAAc,EACtB,gBAAgB,EAAE,MAAM,EACxB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,IAE/B,aAAa,MAAM,GAAG,IAAI,EAAE,aAAa,MAAM,KAAG,iBAAiB,CAG5E"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * DID (Decentralized Identifier) and W3C Agent utilities
3
+ *
4
+ * DID:WEB shapes used in Semiont:
5
+ *
6
+ * Person: did:web:<host>:users:<email%40host>
7
+ * Software: did:web:<host>:agents:<provider>:<model>
8
+ *
9
+ * `didToAgent` is the inverse: parse the DID, recognize whether the
10
+ * subject is a person or a software peer, and return a typed Agent.
11
+ *
12
+ * Humans and software peers share the same identity *shape* (a DID
13
+ * with a typed Agent on read). What differs is the path segment
14
+ * (`:users:` vs `:agents:`) and the schema-typed fields each kind
15
+ * carries on its Agent record.
16
+ */
17
+ import type { components } from './types';
18
+ type Agent = components['schemas']['Agent'];
19
+ /**
20
+ * Convert a user object to a DID:WEB identifier.
21
+ *
22
+ * Format: did:web:<domain>:users:<email%40domain>
23
+ */
24
+ export declare function userToDid(user: {
25
+ email: string;
26
+ domain: string;
27
+ }): string;
28
+ /**
29
+ * Convert a software peer's (provider, model) configuration to a DID:WEB
30
+ * identifier. Pool-vs-individual deployment is not part of identity —
31
+ * one DID per (provider, model) on this host.
32
+ *
33
+ * Format: did:web:<domain>:agents:<provider>:<model%2F-encoded>
34
+ *
35
+ * Model strings often contain `:` and `/` (e.g. `gemma2:27b`,
36
+ * `library/llama3`); both must be URI-encoded so DID parsing isn't
37
+ * ambiguous.
38
+ */
39
+ export declare function agentToDid(agent: {
40
+ domain: string;
41
+ provider: string;
42
+ model: string;
43
+ }): string;
44
+ /**
45
+ * Convert a user object to a typed Person Agent with a DID:WEB identifier.
46
+ */
47
+ export declare function userToAgent(user: {
48
+ id: string;
49
+ domain: string;
50
+ name: string | null;
51
+ email: string;
52
+ }): Agent;
53
+ /**
54
+ * Convert a software peer's configuration to a typed Software Agent.
55
+ * The `name` is a stable human-friendly label, not a parseable join —
56
+ * UI composes display from `provider`/`model` at render time.
57
+ */
58
+ export declare function softwareToAgent(software: {
59
+ domain: string;
60
+ provider: string;
61
+ model: string;
62
+ parameters?: Record<string, unknown>;
63
+ }): Agent;
64
+ /**
65
+ * Parse a DID:WEB string into a typed Agent.
66
+ *
67
+ * Recognizes:
68
+ * did:web:<host>:users:<email> → Person (name = decoded email)
69
+ * did:web:<host>:agents:<provider>:<model> → Software (provider + model)
70
+ *
71
+ * Anything else falls back to a Person with the trailing segment as
72
+ * `name`. This is the read-side inverse of `userToDid`/`agentToDid`.
73
+ */
74
+ export declare function didToAgent(did: string | undefined | null): Agent;
75
+ export {};
76
+ //# sourceMappingURL=did-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"did-utils.d.ts","sourceRoot":"","sources":["../src/did-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,KAAK,KAAK,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC;AAE5C;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAEzE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAE7F;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,KAAK,CAMR;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC,GAAG,KAAK,CASR;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,KAAK,CAyChE"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Common error classes — the unified Semiont error hierarchy.
3
+ *
4
+ * `SemiontError` is the base every other Semiont error class extends:
5
+ * `APIError` (api-client), `BusRequestError` and `SemiontSessionError` (sdk),
6
+ * `ValidationError`, `ScriptError`, `NotFoundError`, `UnauthorizedError`,
7
+ * `ConflictError` (here), and `AWSError` (cli). Subclasses tighten the
8
+ * `code` field to a literal-union for discriminated handling.
9
+ */
10
+ /**
11
+ * Transport-neutral error vocabulary. Every transport that surfaces
12
+ * errors over `ITransport.errors$` maps its native failure modes to one
13
+ * of these codes — HTTP `APIError` maps from status code, in-process
14
+ * transports map from local failure shape, gRPC would map from status
15
+ * code, etc. Routing layers (e.g. `SemiontBrowser`'s session-expired /
16
+ * permission-denied modal routing) match on this vocabulary so they
17
+ * stay transport-agnostic.
18
+ *
19
+ * - `unauthorized` — auth required / token missing or expired (HTTP 401)
20
+ * - `forbidden` — auth ok but lacks permission (HTTP 403)
21
+ * - `not-found` — resource missing (HTTP 404)
22
+ * - `conflict` — concurrent modification, duplicate, etc. (HTTP 409)
23
+ * - `bad-request` — request malformed (HTTP 400)
24
+ * - `unavailable` — backend unreachable, network error, 5xx
25
+ * - `error` — unclassified fallback
26
+ */
27
+ export type TransportErrorCode = 'unauthorized' | 'forbidden' | 'not-found' | 'conflict' | 'bad-request' | 'unavailable' | 'error';
28
+ export declare class SemiontError extends Error {
29
+ code: string;
30
+ details?: Record<string, unknown> | undefined;
31
+ constructor(message: string, code: string, details?: Record<string, unknown> | undefined);
32
+ }
33
+ export declare class ValidationError extends SemiontError {
34
+ constructor(message: string, details?: Record<string, unknown>);
35
+ }
36
+ export declare class ScriptError extends SemiontError {
37
+ constructor(message: string, code?: string, details?: Record<string, unknown>);
38
+ }
39
+ export declare class NotFoundError extends SemiontError {
40
+ constructor(resource: string, id?: string);
41
+ }
42
+ export declare class UnauthorizedError extends SemiontError {
43
+ constructor(message?: string, details?: Record<string, unknown>);
44
+ }
45
+ export declare class ConflictError extends SemiontError {
46
+ constructor(message: string, details?: Record<string, unknown>);
47
+ }
48
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,kBAAkB,GAC1B,cAAc,GACd,WAAW,GACX,WAAW,GACX,UAAU,GACV,aAAa,GACb,aAAa,GACb,OAAO,CAAC;AAEZ,qBAAa,YAAa,SAAQ,KAAK;IAG5B,IAAI,EAAE,MAAM;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;gBAFxC,OAAO,EAAE,MAAM,EACR,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAA;CAM3C;AAED,qBAAa,eAAgB,SAAQ,YAAY;gBACnC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAI/D;AAED,qBAAa,WAAY,SAAQ,YAAY;gBAC/B,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,MAAuB,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAI9F;AAED,qBAAa,aAAc,SAAQ,YAAY;gBACjC,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM;CAK1C;AAED,qBAAa,iBAAkB,SAAQ,YAAY;gBACrC,OAAO,GAAE,MAAuB,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAIhF;AAED,qBAAa,aAAc,SAAQ,YAAY;gBACjC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAI/D"}