@weaveintel/core 0.0.1 → 0.2.0

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 (111) hide show
  1. package/README.md +62 -89
  2. package/dist/admin-capabilities.d.ts +1 -1
  3. package/dist/admin-capabilities.js +1 -1
  4. package/dist/capability-packs/index.d.ts +18 -0
  5. package/dist/capability-packs/index.d.ts.map +1 -0
  6. package/dist/capability-packs/index.js +19 -0
  7. package/dist/capability-packs/index.js.map +1 -0
  8. package/dist/capability-packs/installer.d.ts +69 -0
  9. package/dist/capability-packs/installer.d.ts.map +1 -0
  10. package/dist/capability-packs/installer.js +66 -0
  11. package/dist/capability-packs/installer.js.map +1 -0
  12. package/dist/capability-packs/manifest.d.ts +56 -0
  13. package/dist/capability-packs/manifest.d.ts.map +1 -0
  14. package/dist/capability-packs/manifest.js +9 -0
  15. package/dist/capability-packs/manifest.js.map +1 -0
  16. package/dist/capability-packs/validator.d.ts +29 -0
  17. package/dist/capability-packs/validator.d.ts.map +1 -0
  18. package/dist/capability-packs/validator.js +80 -0
  19. package/dist/capability-packs/validator.js.map +1 -0
  20. package/dist/capability-packs/version-resolver.d.ts +29 -0
  21. package/dist/capability-packs/version-resolver.d.ts.map +1 -0
  22. package/dist/capability-packs/version-resolver.js +39 -0
  23. package/dist/capability-packs/version-resolver.js.map +1 -0
  24. package/dist/contracts/contract.d.ts +40 -0
  25. package/dist/contracts/contract.d.ts.map +1 -0
  26. package/dist/contracts/contract.js +67 -0
  27. package/dist/contracts/contract.js.map +1 -0
  28. package/dist/contracts/index.d.ts +8 -0
  29. package/dist/contracts/index.d.ts.map +1 -0
  30. package/dist/contracts/index.js +9 -0
  31. package/dist/contracts/index.js.map +1 -0
  32. package/dist/contracts/outcome.d.ts +23 -0
  33. package/dist/contracts/outcome.d.ts.map +1 -0
  34. package/dist/contracts/outcome.js +52 -0
  35. package/dist/contracts/outcome.js.map +1 -0
  36. package/dist/contracts/report.d.ts +23 -0
  37. package/dist/contracts/report.d.ts.map +1 -0
  38. package/dist/contracts/report.js +50 -0
  39. package/dist/contracts/report.js.map +1 -0
  40. package/dist/contracts/validator.d.ts +25 -0
  41. package/dist/contracts/validator.d.ts.map +1 -0
  42. package/dist/contracts/validator.js +149 -0
  43. package/dist/contracts/validator.js.map +1 -0
  44. package/dist/hardened-fetch.d.ts +1 -1
  45. package/dist/hardened-fetch.d.ts.map +1 -1
  46. package/dist/hardened-fetch.js +28 -5
  47. package/dist/hardened-fetch.js.map +1 -1
  48. package/dist/i18n/i18n.d.ts +41 -0
  49. package/dist/i18n/i18n.d.ts.map +1 -0
  50. package/dist/i18n/i18n.js +148 -0
  51. package/dist/i18n/i18n.js.map +1 -0
  52. package/dist/i18n/index.d.ts +2 -0
  53. package/dist/i18n/index.d.ts.map +1 -0
  54. package/dist/i18n/index.js +3 -0
  55. package/dist/i18n/index.js.map +1 -0
  56. package/dist/index.js +6 -6
  57. package/dist/index.js.map +1 -1
  58. package/dist/models/index.d.ts +2 -0
  59. package/dist/models/index.d.ts.map +1 -0
  60. package/dist/models/index.js +3 -0
  61. package/dist/models/index.js.map +1 -0
  62. package/dist/models/router.d.ts +46 -0
  63. package/dist/models/router.d.ts.map +1 -0
  64. package/dist/models/router.js +326 -0
  65. package/dist/models/router.js.map +1 -0
  66. package/dist/net-guard.d.ts +13 -2
  67. package/dist/net-guard.d.ts.map +1 -1
  68. package/dist/net-guard.js +59 -42
  69. package/dist/net-guard.js.map +1 -1
  70. package/dist/notifications.d.ts +1 -1
  71. package/dist/plugins/compatibility.d.ts +11 -0
  72. package/dist/plugins/compatibility.d.ts.map +1 -0
  73. package/dist/plugins/compatibility.js +39 -0
  74. package/dist/plugins/compatibility.js.map +1 -0
  75. package/dist/plugins/index.d.ts +6 -0
  76. package/dist/plugins/index.d.ts.map +1 -0
  77. package/dist/plugins/index.js +8 -0
  78. package/dist/plugins/index.js.map +1 -0
  79. package/dist/plugins/installer.d.ts +17 -0
  80. package/dist/plugins/installer.d.ts.map +1 -0
  81. package/dist/plugins/installer.js +22 -0
  82. package/dist/plugins/installer.js.map +1 -0
  83. package/dist/plugins/lifecycle.d.ts +15 -0
  84. package/dist/plugins/lifecycle.d.ts.map +1 -0
  85. package/dist/plugins/lifecycle.js +26 -0
  86. package/dist/plugins/lifecycle.js.map +1 -0
  87. package/dist/plugins/manifest.d.ts +28 -0
  88. package/dist/plugins/manifest.d.ts.map +1 -0
  89. package/dist/plugins/manifest.js +24 -0
  90. package/dist/plugins/manifest.js.map +1 -0
  91. package/dist/plugins/registry.d.ts +26 -0
  92. package/dist/plugins/registry.d.ts.map +1 -0
  93. package/dist/plugins/registry.js +43 -0
  94. package/dist/plugins/registry.js.map +1 -0
  95. package/dist/run-events.d.ts +4 -4
  96. package/dist/run-events.js +3 -3
  97. package/dist/run-journal.d.ts +1 -1
  98. package/dist/run-journal.js +6 -6
  99. package/dist/run-journal.js.map +1 -1
  100. package/dist/run-registry.js +5 -5
  101. package/dist/run-substrate-contract.d.ts +1 -1
  102. package/dist/runs.d.ts +1 -1
  103. package/dist/runtime.d.ts +4 -4
  104. package/dist/runtime.js +1 -1
  105. package/dist/secrets.d.ts +1 -1
  106. package/dist/secrets.js +1 -1
  107. package/dist/sse-parser.d.ts +1 -1
  108. package/dist/sse-parser.js +1 -1
  109. package/dist/sse-writer.d.ts +1 -1
  110. package/dist/sse-writer.js +1 -1
  111. package/package.json +34 -1
@@ -0,0 +1,39 @@
1
+ // @weaveintel/plugins — Version compatibility checks
2
+ export function checkCompatibility(manifest, coreVersion, installedPlugins) {
3
+ const warnings = [];
4
+ // Simple semver-like comparison (major.minor.patch)
5
+ const coreOk = compareSemver(coreVersion, manifest.minCoreVersion) >= 0
6
+ && (!manifest.maxCoreVersion || compareSemver(coreVersion, manifest.maxCoreVersion) <= 0);
7
+ if (!coreOk)
8
+ warnings.push(`Core version ${coreVersion} outside range ${manifest.minCoreVersion}–${manifest.maxCoreVersion ?? '*'}`);
9
+ const met = [];
10
+ const missing = [];
11
+ for (const dep of manifest.dependencies) {
12
+ if (installedPlugins.includes(dep))
13
+ met.push(dep);
14
+ else
15
+ missing.push(dep);
16
+ }
17
+ if (missing.length > 0)
18
+ warnings.push(`Missing dependencies: ${missing.join(', ')}`);
19
+ return {
20
+ pluginId: manifest.id,
21
+ compatible: coreOk && missing.length === 0,
22
+ coreVersionOk: coreOk,
23
+ dependenciesMet: met,
24
+ dependenciesMissing: missing,
25
+ warnings,
26
+ };
27
+ }
28
+ function compareSemver(a, b) {
29
+ const pa = a.split('.').map(Number);
30
+ const pb = b.split('.').map(Number);
31
+ for (let i = 0; i < 3; i++) {
32
+ const va = pa[i] ?? 0;
33
+ const vb = pb[i] ?? 0;
34
+ if (va !== vb)
35
+ return va - vb;
36
+ }
37
+ return 0;
38
+ }
39
+ //# sourceMappingURL=compatibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compatibility.js","sourceRoot":"","sources":["../../src/plugins/compatibility.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAarD,MAAM,UAAU,kBAAkB,CAChC,QAAwB,EACxB,WAAmB,EACnB,gBAAmC;IAEnC,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,oDAAoD;IACpD,MAAM,MAAM,GAAG,aAAa,CAAC,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC;WAClE,CAAC,CAAC,QAAQ,CAAC,cAAc,IAAI,aAAa,CAAC,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;IAE5F,IAAI,CAAC,MAAM;QAAE,QAAQ,CAAC,IAAI,CAAC,gBAAgB,WAAW,kBAAkB,QAAQ,CAAC,cAAc,IAAI,QAAQ,CAAC,cAAc,IAAI,GAAG,EAAE,CAAC,CAAC;IAErI,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,KAAK,MAAM,GAAG,IAAI,QAAQ,CAAC,YAAY,EAAE,CAAC;QACxC,IAAI,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;;YAC7C,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;QAAE,QAAQ,CAAC,IAAI,CAAC,yBAAyB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAErF,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,EAAE;QACrB,UAAU,EAAE,MAAM,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAC1C,aAAa,EAAE,MAAM;QACrB,eAAe,EAAE,GAAG;QACpB,mBAAmB,EAAE,OAAO;QAC5B,QAAQ;KACT,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,CAAS,EAAE,CAAS;IACzC,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACtB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACtB,IAAI,EAAE,KAAK,EAAE;YAAE,OAAO,EAAE,GAAG,EAAE,CAAC;IAChC,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { type PluginTrustLevel, type PluginCapability, type PluginManifest, createPluginManifest, validateManifest, } from './manifest.js';
2
+ export { type PluginState, type InstalledPlugin, type PluginSearchOptions, type PluginRegistry, createPluginRegistry, } from './registry.js';
3
+ export { type LifecyclePhase, type LifecycleHook, type PluginLifecycle, createPluginLifecycle, } from './lifecycle.js';
4
+ export { type PluginCompatibilityResult, checkCompatibility, } from './compatibility.js';
5
+ export { type InstallSource, type InstallResult, type PluginInstaller, createPluginInstaller, } from './installer.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,oBAAoB,GACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,KAAK,yBAAyB,EAC9B,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,8 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // @weaveintel/plugins — Public API
3
+ export { createPluginManifest, validateManifest, } from './manifest.js';
4
+ export { createPluginRegistry, } from './registry.js';
5
+ export { createPluginLifecycle, } from './lifecycle.js';
6
+ export { checkCompatibility, } from './compatibility.js';
7
+ export { createPluginInstaller, } from './installer.js';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,mCAAmC;AACnC,OAAO,EAIL,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAKL,oBAAoB,GACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAIL,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAEL,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAIL,qBAAqB,GACtB,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { PluginManifest } from './manifest.js';
2
+ import type { PluginRegistry, InstalledPlugin } from './registry.js';
3
+ export type InstallSource = 'local' | 'private' | 'public';
4
+ export interface InstallResult {
5
+ readonly pluginId: string;
6
+ readonly source: InstallSource;
7
+ readonly success: boolean;
8
+ readonly error: string | null;
9
+ readonly plugin: InstalledPlugin | null;
10
+ }
11
+ export interface PluginInstaller {
12
+ install(manifest: PluginManifest, source: InstallSource): InstallResult;
13
+ installBatch(manifests: readonly PluginManifest[], source: InstallSource): readonly InstallResult[];
14
+ uninstall(pluginId: string): boolean;
15
+ }
16
+ export declare function createPluginInstaller(registry: PluginRegistry): PluginInstaller;
17
+ //# sourceMappingURL=installer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../src/plugins/installer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErE,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE3D,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;CACzC;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,aAAa,GAAG,aAAa,CAAC;IACxE,YAAY,CAAC,SAAS,EAAE,SAAS,cAAc,EAAE,EAAE,MAAM,EAAE,aAAa,GAAG,SAAS,aAAa,EAAE,CAAC;IACpG,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CACtC;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,cAAc,GAAG,eAAe,CAoB/E"}
@@ -0,0 +1,22 @@
1
+ // @weaveintel/plugins — Plugin installer for local/private/public sources
2
+ export function createPluginInstaller(registry) {
3
+ return {
4
+ install(manifest, source) {
5
+ try {
6
+ const plugin = registry.install(manifest);
7
+ return { pluginId: manifest.id, source, success: true, error: null, plugin };
8
+ }
9
+ catch (err) {
10
+ const msg = err instanceof Error ? err.message : 'Unknown error';
11
+ return { pluginId: manifest.id, source, success: false, error: msg, plugin: null };
12
+ }
13
+ },
14
+ installBatch(manifests, source) {
15
+ return manifests.map((m) => this.install(m, source));
16
+ },
17
+ uninstall(pluginId) {
18
+ return registry.uninstall(pluginId);
19
+ },
20
+ };
21
+ }
22
+ //# sourceMappingURL=installer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installer.js","sourceRoot":"","sources":["../../src/plugins/installer.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAqB1E,MAAM,UAAU,qBAAqB,CAAC,QAAwB;IAC5D,OAAO;QACL,OAAO,CAAC,QAAQ,EAAE,MAAM;YACtB,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;gBAC1C,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;YAC/E,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;gBACjE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;YACrF,CAAC;QACH,CAAC;QAED,YAAY,CAAC,SAAS,EAAE,MAAM;YAC5B,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;QACvD,CAAC;QAED,SAAS,CAAC,QAAQ;YAChB,OAAO,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QACtC,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,15 @@
1
+ export type LifecyclePhase = 'init' | 'start' | 'stop' | 'destroy';
2
+ export interface LifecycleHook {
3
+ readonly phase: LifecyclePhase;
4
+ readonly handler: () => Promise<void> | void;
5
+ readonly priority: number;
6
+ }
7
+ export interface PluginLifecycle {
8
+ register(pluginId: string, phase: LifecyclePhase, handler: () => Promise<void> | void, priority?: number): void;
9
+ execute(pluginId: string, phase: LifecyclePhase): Promise<void>;
10
+ executeAll(phase: LifecyclePhase): Promise<void>;
11
+ getHooks(pluginId: string): readonly LifecycleHook[];
12
+ clear(pluginId: string): void;
13
+ }
14
+ export declare function createPluginLifecycle(): PluginLifecycle;
15
+ //# sourceMappingURL=lifecycle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../src/plugins/lifecycle.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAEnE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC7C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChH,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,UAAU,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,aAAa,EAAE,CAAC;IACrD,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,wBAAgB,qBAAqB,IAAI,eAAe,CA2BvD"}
@@ -0,0 +1,26 @@
1
+ // @weaveintel/plugins — Plugin lifecycle: init, start, stop hooks
2
+ export function createPluginLifecycle() {
3
+ const hooks = new Map();
4
+ return {
5
+ register(pluginId, phase, handler, priority = 0) {
6
+ const list = hooks.get(pluginId) ?? [];
7
+ list.push({ phase, handler, priority });
8
+ list.sort((a, b) => a.priority - b.priority);
9
+ hooks.set(pluginId, list);
10
+ },
11
+ async execute(pluginId, phase) {
12
+ const list = hooks.get(pluginId) ?? [];
13
+ for (const hook of list.filter((h) => h.phase === phase)) {
14
+ await hook.handler();
15
+ }
16
+ },
17
+ async executeAll(phase) {
18
+ for (const [pluginId] of hooks) {
19
+ await this.execute(pluginId, phase);
20
+ }
21
+ },
22
+ getHooks(pluginId) { return hooks.get(pluginId) ?? []; },
23
+ clear(pluginId) { hooks.delete(pluginId); },
24
+ };
25
+ }
26
+ //# sourceMappingURL=lifecycle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../src/plugins/lifecycle.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAkBlE,MAAM,UAAU,qBAAqB;IACnC,MAAM,KAAK,GAAG,IAAI,GAAG,EAA2B,CAAC;IAEjD,OAAO;QACL,QAAQ,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,GAAG,CAAC;YAC7C,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACvC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;YACxC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;YAC7C,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC5B,CAAC;QAED,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK;YAC3B,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACvC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,EAAE,CAAC;gBACzD,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;YACvB,CAAC;QACH,CAAC;QAED,KAAK,CAAC,UAAU,CAAC,KAAK;YACpB,KAAK,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC;gBAC/B,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;YACtC,CAAC;QACH,CAAC;QAED,QAAQ,CAAC,QAAQ,IAAI,OAAO,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACxD,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;KAC5C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,28 @@
1
+ export type PluginTrustLevel = 'official' | 'verified' | 'community' | 'private';
2
+ export interface PluginCapability {
3
+ readonly type: 'tool' | 'model' | 'memory' | 'middleware' | 'guardrail' | 'retriever';
4
+ readonly name: string;
5
+ readonly description: string;
6
+ }
7
+ export interface PluginManifest {
8
+ readonly id: string;
9
+ readonly name: string;
10
+ readonly version: string;
11
+ readonly description: string;
12
+ readonly author: string;
13
+ readonly license: string;
14
+ readonly homepage: string;
15
+ readonly trust: PluginTrustLevel;
16
+ readonly capabilities: readonly PluginCapability[];
17
+ readonly minCoreVersion: string;
18
+ readonly maxCoreVersion: string | null;
19
+ readonly dependencies: readonly string[];
20
+ readonly tags: readonly string[];
21
+ }
22
+ export declare function createPluginManifest(fields: Omit<PluginManifest, 'capabilities' | 'dependencies' | 'tags'> & {
23
+ capabilities?: PluginCapability[];
24
+ dependencies?: string[];
25
+ tags?: string[];
26
+ }): PluginManifest;
27
+ export declare function validateManifest(manifest: PluginManifest): string[];
28
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/plugins/manifest.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AAEjF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,YAAY,GAAG,WAAW,GAAG,WAAW,CAAC;IACtF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,YAAY,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACnD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,cAAc,GAAG,cAAc,GAAG,MAAM,CAAC,GAAG;IACvE,YAAY,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB,GACA,cAAc,CAOhB;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,EAAE,CAQnE"}
@@ -0,0 +1,24 @@
1
+ // @weaveintel/plugins — Plugin manifest metadata
2
+ export function createPluginManifest(fields) {
3
+ return {
4
+ ...fields,
5
+ capabilities: fields.capabilities ?? [],
6
+ dependencies: fields.dependencies ?? [],
7
+ tags: fields.tags ?? [],
8
+ };
9
+ }
10
+ export function validateManifest(manifest) {
11
+ const errors = [];
12
+ if (!manifest.id)
13
+ errors.push('Plugin id is required');
14
+ if (!manifest.name)
15
+ errors.push('Plugin name is required');
16
+ if (!manifest.version)
17
+ errors.push('Plugin version is required');
18
+ if (!manifest.author)
19
+ errors.push('Plugin author is required');
20
+ if (!manifest.minCoreVersion)
21
+ errors.push('minCoreVersion is required');
22
+ return errors;
23
+ }
24
+ //# sourceMappingURL=manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/plugins/manifest.ts"],"names":[],"mappings":"AAAA,iDAAiD;AA0BjD,MAAM,UAAU,oBAAoB,CAClC,MAIC;IAED,OAAO;QACL,GAAG,MAAM;QACT,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,EAAE;QACvC,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,EAAE;QACvC,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,EAAE;KACxB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,QAAwB;IACvD,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,CAAC,QAAQ,CAAC,EAAE;QAAE,MAAM,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;IACvD,IAAI,CAAC,QAAQ,CAAC,IAAI;QAAE,MAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;IAC3D,IAAI,CAAC,QAAQ,CAAC,OAAO;QAAE,MAAM,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;IACjE,IAAI,CAAC,QAAQ,CAAC,MAAM;QAAE,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;IAC/D,IAAI,CAAC,QAAQ,CAAC,cAAc;QAAE,MAAM,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;IACxE,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { PluginManifest, PluginTrustLevel } from './manifest.js';
2
+ export type PluginState = 'installed' | 'active' | 'disabled' | 'error';
3
+ export interface InstalledPlugin {
4
+ readonly manifest: PluginManifest;
5
+ readonly state: PluginState;
6
+ readonly installedAt: number;
7
+ readonly activatedAt: number | null;
8
+ readonly error: string | null;
9
+ }
10
+ export interface PluginSearchOptions {
11
+ readonly query?: string;
12
+ readonly trust?: PluginTrustLevel;
13
+ readonly capability?: string;
14
+ readonly tag?: string;
15
+ }
16
+ export interface PluginRegistry {
17
+ install(manifest: PluginManifest): InstalledPlugin;
18
+ uninstall(pluginId: string): boolean;
19
+ get(pluginId: string): InstalledPlugin | undefined;
20
+ list(options?: PluginSearchOptions): readonly InstalledPlugin[];
21
+ activate(pluginId: string): InstalledPlugin | undefined;
22
+ deactivate(pluginId: string): InstalledPlugin | undefined;
23
+ isActive(pluginId: string): boolean;
24
+ }
25
+ export declare function createPluginRegistry(): PluginRegistry;
26
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/plugins/registry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtE,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;AAExE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,QAAQ,EAAE,cAAc,GAAG,eAAe,CAAC;IACnD,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IACrC,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;IACnD,IAAI,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,SAAS,eAAe,EAAE,CAAC;IAChE,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;IACxD,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;IAC1D,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CACrC;AAED,wBAAgB,oBAAoB,IAAI,cAAc,CA8CrD"}
@@ -0,0 +1,43 @@
1
+ // @weaveintel/plugins — Plugin registry: install, discover, validate
2
+ export function createPluginRegistry() {
3
+ const plugins = new Map();
4
+ function update(id, patch) {
5
+ const existing = plugins.get(id);
6
+ if (!existing)
7
+ return undefined;
8
+ const updated = { ...existing, ...patch };
9
+ plugins.set(id, updated);
10
+ return updated;
11
+ }
12
+ return {
13
+ install(manifest) {
14
+ const plugin = { manifest, state: 'installed', installedAt: Date.now(), activatedAt: null, error: null };
15
+ plugins.set(manifest.id, plugin);
16
+ return plugin;
17
+ },
18
+ uninstall(pluginId) { return plugins.delete(pluginId); },
19
+ get(pluginId) { return plugins.get(pluginId); },
20
+ list(options = {}) {
21
+ let results = Array.from(plugins.values());
22
+ if (options.query) {
23
+ const q = options.query.toLowerCase();
24
+ results = results.filter((p) => p.manifest.name.toLowerCase().includes(q) || p.manifest.description.toLowerCase().includes(q));
25
+ }
26
+ if (options.trust)
27
+ results = results.filter((p) => p.manifest.trust === options.trust);
28
+ if (options.capability) {
29
+ const cap = options.capability;
30
+ results = results.filter((p) => p.manifest.capabilities.some((c) => c.type === cap));
31
+ }
32
+ if (options.tag) {
33
+ const tag = options.tag;
34
+ results = results.filter((p) => p.manifest.tags.includes(tag));
35
+ }
36
+ return results;
37
+ },
38
+ activate(pluginId) { return update(pluginId, { state: 'active', activatedAt: Date.now() }); },
39
+ deactivate(pluginId) { return update(pluginId, { state: 'disabled' }); },
40
+ isActive(pluginId) { return plugins.get(pluginId)?.state === 'active'; },
41
+ };
42
+ }
43
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/plugins/registry.ts"],"names":[],"mappings":"AAAA,qEAAqE;AA+BrE,MAAM,UAAU,oBAAoB;IAClC,MAAM,OAAO,GAAG,IAAI,GAAG,EAA2B,CAAC;IAEnD,SAAS,MAAM,CAAC,EAAU,EAAE,KAA+B;QACzD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACjC,IAAI,CAAC,QAAQ;YAAE,OAAO,SAAS,CAAC;QAChC,MAAM,OAAO,GAAG,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK,EAAqB,CAAC;QAC7D,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QACzB,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,OAAO;QACL,OAAO,CAAC,QAAQ;YACd,MAAM,MAAM,GAAoB,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;YAC1H,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;YACjC,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,SAAS,CAAC,QAAQ,IAAI,OAAO,OAAO,CAAC,MAAM,CAAC,QAAQ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AAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;YACjE,CAAC;YACD,OAAO,OAAO,CAAC;QACjB,CAAC;QAED,QAAQ,CAAC,QAAQ,IAAI,OAAO,MAAM,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QAC7F,UAAU,CAAC,QAAQ,IAAI,OAAO,MAAM,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;QACxE,QAAQ,CAAC,QAAQ,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC;KACzE,CAAC;AACJ,CAAC"}
@@ -1,14 +1,14 @@
1
1
  /**
2
- * @weaveintel/core — Run-event stream contract (Phase 0)
2
+ * @weaveintel/core — Run-event stream contract
3
3
  *
4
4
  * The single source of truth for:
5
5
  * - the run-event wire envelope (`RunEventEnvelope`),
6
6
  * - the canonical event-kind taxonomy (`RUN_EVENT_KINDS`), and
7
7
  * - the default stream-tuning constants (`RUN_STREAM_CONFIG_DEFAULTS`).
8
8
  *
9
- * The geneweave server executor and the `@weaveintel/client` browser reducer
9
+ * The host application's server executor and the `@weaveintel/client` browser reducer
10
10
  * each used to declare their own duplicate `RunEventEnvelope`; both now import
11
- * this so the producer and consumer can never drift. The geneweave DB
11
+ * this so the producer and consumer can never drift. The host app's DB
12
12
  * `run_stream_config` single-row table seeds from `RUN_STREAM_CONFIG_DEFAULTS`,
13
13
  * and clients fall back to it when no server-served config is present.
14
14
  */
@@ -167,7 +167,7 @@ export declare function isTerminalRunEventKind(kind: string): boolean;
167
167
  export declare function isKnownRunEventKind(kind: string): kind is RunEventKind;
168
168
  /**
169
169
  * Run/stream tuning shared by server (SSE keepalive, journal retention) and
170
- * client (reconnect backoff, stall timeout, UI throttle). The geneweave DB
170
+ * client (reconnect backoff, stall timeout, UI throttle). The host app's DB
171
171
  * `run_stream_config` row is the runtime source of truth; these are the seeded
172
172
  * defaults and the client-side fallback.
173
173
  */
@@ -1,15 +1,15 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
  /**
3
- * @weaveintel/core — Run-event stream contract (Phase 0)
3
+ * @weaveintel/core — Run-event stream contract
4
4
  *
5
5
  * The single source of truth for:
6
6
  * - the run-event wire envelope (`RunEventEnvelope`),
7
7
  * - the canonical event-kind taxonomy (`RUN_EVENT_KINDS`), and
8
8
  * - the default stream-tuning constants (`RUN_STREAM_CONFIG_DEFAULTS`).
9
9
  *
10
- * The geneweave server executor and the `@weaveintel/client` browser reducer
10
+ * The host application's server executor and the `@weaveintel/client` browser reducer
11
11
  * each used to declare their own duplicate `RunEventEnvelope`; both now import
12
- * this so the producer and consumer can never drift. The geneweave DB
12
+ * this so the producer and consumer can never drift. The host app's DB
13
13
  * `run_stream_config` single-row table seeds from `RUN_STREAM_CONFIG_DEFAULTS`,
14
14
  * and clients fall back to it when no server-served config is present.
15
15
  */
@@ -3,7 +3,7 @@ import type { RunEventEnvelope } from './run-events.js';
3
3
  import type { RunEventCursor } from './runs.js';
4
4
  /**
5
5
  * Journal defaults, derived from {@link RUN_STREAM_CONFIG_DEFAULTS} so retention
6
- * and the per-run cap are defined exactly once. geneWeave's `run_stream_config`
6
+ * and the per-run cap are defined exactly once. The host app's `run_stream_config`
7
7
  * table (`journal_retention_hours` / `journal_max_events`) seeds from the same
8
8
  * source — there is no second hardcoded copy.
9
9
  */
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Run event journal — the canonical append-only run-event log contract.
3
3
  *
4
- * Collaboration Phase 0: this used to live in `@weaveintel/collaboration` as a
5
- * second, parallel implementation of the run journal that geneWeave already had
4
+ * Collaboration Phase 0: this used to live in `@weaveintel/collab` as a
5
+ * second, parallel implementation of the run journal that a host application already had
6
6
  * in SQL. The journal is *run-lifecycle substrate*, not a collaboration concern,
7
7
  * and its vocabulary (`RunEventEnvelope`, `RunEventCursor`) already lives here —
8
8
  * so the PORT (interface) + a reference KV adapter now live in `@weaveintel/core`,
9
- * and geneWeave's SQL tables are just another adapter behind the same interface.
9
+ * and the host app's SQL tables are just another adapter behind the same interface.
10
10
  *
11
11
  * --- For someone new to this ---
12
12
  * A "journal" here is an append-only list of everything that happened during a
@@ -19,7 +19,7 @@
19
19
  * Two implementations conform to the {@link RunJournal} port:
20
20
  * - {@link createKvRunJournal} (here) — a key-value reference adapter, used by
21
21
  * non-SQL hosts and as the fast in-memory test double.
22
- * - geneWeave's `SqlRunJournal` — backed by the `user_run_events` table.
22
+ * - a host application's `SqlRunJournal` — backed by the `user_run_events` table.
23
23
  * Both are validated by the same {@link runJournalContract} conformance suite.
24
24
  *
25
25
  * Standards followed (see the mid-2026 research): per-run contiguous sequence,
@@ -30,10 +30,10 @@
30
30
  */
31
31
  import { weaveInMemoryPersistence } from './runtime.js';
32
32
  import { RUN_STREAM_CONFIG_DEFAULTS } from './run-events.js';
33
- // ─── Defaults (ONE place — also seeds the geneWeave `run_stream_config` row) ────
33
+ // ─── Defaults (ONE place — also seeds the host app's `run_stream_config` row) ────
34
34
  /**
35
35
  * Journal defaults, derived from {@link RUN_STREAM_CONFIG_DEFAULTS} so retention
36
- * and the per-run cap are defined exactly once. geneWeave's `run_stream_config`
36
+ * and the per-run cap are defined exactly once. The host app's `run_stream_config`
37
37
  * table (`journal_retention_hours` / `journal_max_events`) seeds from the same
38
38
  * source — there is no second hardcoded copy.
39
39
  */
@@ -1 +1 @@
1
- {"version":3,"file":"run-journal.js","sourceRoot":"","sources":["../src/run-journal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAGxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CA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aboration` into
4
+ * Collaboration Phase 0: relocated from `@weaveintel/collab` into
5
5
  * `@weaveintel/core` (the §5b verdict). A "run registry" tracks the *current
6
6
  * state* of every run — its status, owner, progress, last-seen event sequence —
7
7
  * so that state survives a process restart and is queryable from any client.
8
- * Its vocabulary (`RunHandle`, `RunStatus`) already lives in core, and geneWeave
9
- * already owns a SQL implementation, so the PORT + a reference KV adapter belong
10
- * here; geneWeave's `user_runs` table is just another adapter behind it.
8
+ * Its vocabulary (`RunHandle`, `RunStatus`) already lives in core, and a host
9
+ * application already owns a SQL implementation, so the PORT + a reference KV adapter belong
10
+ * here; the host app's `user_runs` table is just another adapter behind it.
11
11
  *
12
12
  * --- For someone new to this ---
13
13
  * If the {@link RunJournal} is the *list of everything that happened*, the
@@ -20,7 +20,7 @@
20
20
  * matches the calling context (previously it trusted the handle blindly).
21
21
  *
22
22
  * Two adapters conform to {@link RunRegistry}: {@link createKvRunRegistry} (here)
23
- * and geneWeave's `SqlRunRegistry`, both validated by {@link runRegistryContract}.
23
+ * and a host application's `SqlRunRegistry`, both validated by {@link runRegistryContract}.
24
24
  */
25
25
  import { weaveInMemoryPersistence } from './runtime.js';
26
26
  // ─── Helpers ──────────────────────────────────────────────────────────────────
@@ -4,7 +4,7 @@
4
4
  * The mid-2026 ports-&-adapters research recommends writing the invariants ONCE
5
5
  * as an exported factory that every adapter runs against itself. That is exactly
6
6
  * what licenses the in-memory KV adapter as a fast test double AND guarantees the
7
- * geneWeave SQL adapter behaves identically — both must pass this same suite.
7
+ * host application's SQL adapter behaves identically — both must pass this same suite.
8
8
  *
9
9
  * To keep `@weaveintel/core` free of a `vitest` import in non-test source, the
10
10
  * factory takes the test primitives ({@link ContractTestApi}) as an argument;
package/dist/runs.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  */
11
11
  /**
12
12
  * Lifecycle status of a run. Terminal states: `completed`, `failed`,
13
- * `cancelled`. Promoted from `@weaveintel/collaboration` so all packages can
13
+ * `cancelled`. Promoted from `@weaveintel/collab` so all packages can
14
14
  * reference it without a collaboration dependency.
15
15
  */
16
16
  export type RunStatus = 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
package/dist/runtime.d.ts CHANGED
@@ -59,7 +59,7 @@ export declare const RuntimeCapabilities: {
59
59
  * so every call site can reach them through `ctx.runtime?.compliance` without
60
60
  * constructing per-route or per-chat manager instances.
61
61
  *
62
- * Concrete adapters live in `@weaveintel/compliance`;
62
+ * Concrete adapters live in `@weaveintel/guardrails/compliance`;
63
63
  * `createRuntimeComplianceAdapter(opts)` builds one from the durable managers.
64
64
  *
65
65
  * `consent` — grant / revoke / query per-user consent flags.
@@ -510,7 +510,7 @@ export interface WeaveRuntimeOptions {
510
510
  readonly memory?: RuntimeMemorySlot;
511
511
  /**
512
512
  * Phase 6 — compliance slot (consent, residency, deletion, GDPR helpers).
513
- * Pass a `createRuntimeComplianceAdapter(opts)` instance from `@weaveintel/compliance`.
513
+ * Pass a `createRuntimeComplianceAdapter(opts)` instance from `@weaveintel/guardrails/compliance`.
514
514
  * When present, `RuntimeCapabilities.Compliance` is advertised automatically.
515
515
  */
516
516
  readonly compliance?: RuntimeComplianceSlot;
@@ -533,7 +533,7 @@ export interface WeaveRuntimeOptions {
533
533
  * `details` object is serialised → redacted → re-parsed before the entry
534
534
  * reaches the underlying logger. LLMs and audit stores never see raw PII.
535
535
  * The `Redactor` interface is structural; pass any `weaveRedactor(policy)`
536
- * from `@weaveintel/redaction` or a custom implementation.
536
+ * from `@weaveintel/guardrails/redaction` or a custom implementation.
537
537
  */
538
538
  readonly redactor?: Redactor;
539
539
  readonly metadata?: Readonly<Record<string, unknown>>;
@@ -584,7 +584,7 @@ export declare function createDurableAuditLogger(opts?: {
584
584
  * passes every entry's `details` through a `Redactor` before forwarding to
585
585
  * the inner logger, so PII is stripped from audit trails without any call-site
586
586
  * changes. Uses the structural `Redactor` interface — pass any implementation
587
- * from `@weaveintel/redaction` or a custom one.
587
+ * from `@weaveintel/guardrails/redaction` or a custom one.
588
588
  *
589
589
  * Auto-wired by `weaveRuntime` when a `redactor` is configured.
590
590
  */
package/dist/runtime.js CHANGED
@@ -103,7 +103,7 @@ export function createDurableAuditLogger(opts = {}) {
103
103
  * passes every entry's `details` through a `Redactor` before forwarding to
104
104
  * the inner logger, so PII is stripped from audit trails without any call-site
105
105
  * changes. Uses the structural `Redactor` interface — pass any implementation
106
- * from `@weaveintel/redaction` or a custom one.
106
+ * from `@weaveintel/guardrails/redaction` or a custom one.
107
107
  *
108
108
  * Auto-wired by `weaveRuntime` when a `redactor` is configured.
109
109
  */
package/dist/secrets.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * - `inMemorySecretResolver(map)` seeds an in-memory map (tests, demos)
7
7
  * - `chainSecretResolvers(...resolvers)` first match wins
8
8
  *
9
- * Every adopter — including `apps/geneweave` and downstream apps — gets its
9
+ * Every adopter — the reference app and downstream apps alike — gets its
10
10
  * secrets through `runtime.secrets` rather than reading `process.env` ad-hoc.
11
11
  * That lets vault / cloud KMS / per-tenant overrides plug in later without
12
12
  * code changes at call sites.
package/dist/secrets.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * - `inMemorySecretResolver(map)` seeds an in-memory map (tests, demos)
7
7
  * - `chainSecretResolvers(...resolvers)` first match wins
8
8
  *
9
- * Every adopter — including `apps/geneweave` and downstream apps — gets its
9
+ * Every adopter — the reference app and downstream apps alike — gets its
10
10
  * secrets through `runtime.secrets` rather than reading `process.env` ad-hoc.
11
11
  * That lets vault / cloud KMS / per-tenant overrides plug in later without
12
12
  * code changes at call sites.
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Collaboration Phase 0 (de-duplication): this used to be re-implemented in
5
5
  * three places — `@weaveintel/client` (the run-stream transport), `@weaveintel/a2a`
6
- * (the agent-to-agent SSE reader), and `apps/geneweave-ui`. It now lives once in
6
+ * (the agent-to-agent SSE reader), and a consuming app's UI. It now lives once in
7
7
  * `@weaveintel/core` (the dependency-light, browser-safe contracts package) and
8
8
  * everyone else consumes it. `@weaveintel/client` re-exports it; `@weaveintel/a2a`
9
9
  * layers a JSON `.map` on top.
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Collaboration Phase 0 (de-duplication): this used to be re-implemented in
5
5
  * three places — `@weaveintel/client` (the run-stream transport), `@weaveintel/a2a`
6
- * (the agent-to-agent SSE reader), and `apps/geneweave-ui`. It now lives once in
6
+ * (the agent-to-agent SSE reader), and a consuming app's UI. It now lives once in
7
7
  * `@weaveintel/core` (the dependency-light, browser-safe contracts package) and
8
8
  * everyone else consumes it. `@weaveintel/client` re-exports it; `@weaveintel/a2a`
9
9
  * layers a JSON `.map` on top.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Server-Sent Events WRITER (Collaboration Phase 6) — the emit half of the SSE
3
3
  * transport. `@weaveintel/core` already owns the canonical READER
4
- * (`parseSseStream`); this is its counterpart so the geneWeave run-stream route,
4
+ * (`parseSseStream`); this is its counterpart so the host application's run-stream route,
5
5
  * the a2a server, and any other producer format frames ONE way instead of three.
6
6
  *
7
7
  * --- For someone new to this ---
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Server-Sent Events WRITER (Collaboration Phase 6) — the emit half of the SSE
4
4
  * transport. `@weaveintel/core` already owns the canonical READER
5
- * (`parseSseStream`); this is its counterpart so the geneWeave run-stream route,
5
+ * (`parseSseStream`); this is its counterpart so the host application's run-stream route,
6
6
  * the a2a server, and any other producer format frames ONE way instead of three.
7
7
  *
8
8
  * --- For someone new to this ---