@xemahq/composed-process-host 0.0.0-stage → 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 (54) hide show
  1. package/LICENSE +175 -0
  2. package/bin/xema-composed-process.cjs +3 -0
  3. package/dist/bin/xema-composed-process.d.ts +3 -0
  4. package/dist/bin/xema-composed-process.d.ts.map +1 -0
  5. package/dist/bin/xema-composed-process.js +40 -0
  6. package/dist/bin/xema-composed-process.js.map +1 -0
  7. package/dist/biome-host-registry.d.ts +4 -0
  8. package/dist/biome-host-registry.d.ts.map +1 -0
  9. package/dist/biome-host-registry.js +48 -0
  10. package/dist/biome-host-registry.js.map +1 -0
  11. package/dist/composed-process-host.d.ts +24 -0
  12. package/dist/composed-process-host.d.ts.map +1 -0
  13. package/dist/composed-process-host.js +138 -0
  14. package/dist/composed-process-host.js.map +1 -0
  15. package/dist/event-hub-command-stream.d.ts +23 -0
  16. package/dist/event-hub-command-stream.d.ts.map +1 -0
  17. package/dist/event-hub-command-stream.js +28 -0
  18. package/dist/event-hub-command-stream.js.map +1 -0
  19. package/dist/generation-entry.d.ts +3 -0
  20. package/dist/generation-entry.d.ts.map +1 -0
  21. package/dist/generation-entry.js +26 -0
  22. package/dist/generation-entry.js.map +1 -0
  23. package/dist/host-platform.d.ts +7 -0
  24. package/dist/host-platform.d.ts.map +1 -0
  25. package/dist/host-platform.js +29 -0
  26. package/dist/host-platform.js.map +1 -0
  27. package/dist/index.d.ts +11 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +36 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/oci-bundle-store.d.ts +14 -0
  32. package/dist/oci-bundle-store.d.ts.map +1 -0
  33. package/dist/oci-bundle-store.js +46 -0
  34. package/dist/oci-bundle-store.js.map +1 -0
  35. package/dist/pack-bundle-reader.d.ts +3 -0
  36. package/dist/pack-bundle-reader.d.ts.map +1 -0
  37. package/dist/pack-bundle-reader.js +21 -0
  38. package/dist/pack-bundle-reader.js.map +1 -0
  39. package/dist/seed-closure.d.ts +33 -0
  40. package/dist/seed-closure.d.ts.map +1 -0
  41. package/dist/seed-closure.js +81 -0
  42. package/dist/seed-closure.js.map +1 -0
  43. package/dist/seed-closure.json +239 -0
  44. package/dist/seed-platform-registration.d.ts +17 -0
  45. package/dist/seed-platform-registration.d.ts.map +1 -0
  46. package/dist/seed-platform-registration.js +44 -0
  47. package/dist/seed-platform-registration.js.map +1 -0
  48. package/dist/seed-processes.d.ts +22 -0
  49. package/dist/seed-processes.d.ts.map +1 -0
  50. package/dist/seed-processes.js +123 -0
  51. package/dist/seed-processes.js.map +1 -0
  52. package/package.json +71 -4
  53. package/scripts/write-seed-closure.mjs +25 -0
  54. package/README.md +0 -3
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SeedProcessNameClaimedError = void 0;
4
+ exports.seedProcessesOf = seedProcessesOf;
5
+ exports.seedProcessNamed = seedProcessNamed;
6
+ exports.seedPlatformServicesOf = seedPlatformServicesOf;
7
+ const process_topology_1 = require("@xemahq/contracts/process-topology");
8
+ const xema_service_nest_1 = require("@xemahq/xema-service-nest");
9
+ const SEED_PROCESS_PREFIX = xema_service_nest_1.SEED_SUPERVISOR_DEFAULTS.processName;
10
+ class SeedProcessNameClaimedError extends Error {
11
+ serviceName;
12
+ constructor(serviceName) {
13
+ super(`The seed closure member service "${serviceName}" is in the seed's process-name namespace ("${SEED_PROCESS_PREFIX}" or "${SEED_PROCESS_PREFIX}-..."), which only the seed's own processes may use.`);
14
+ this.serviceName = serviceName;
15
+ this.name = 'SeedProcessNameClaimedError';
16
+ }
17
+ }
18
+ exports.SeedProcessNameClaimedError = SeedProcessNameClaimedError;
19
+ function partitionKeyOf(facts) {
20
+ return {
21
+ trustDomain: (0, process_topology_1.resolveTrustDomain)(facts.biomeId, facts.origin, undefined, facts.trustCeiling),
22
+ credentialCustody: facts.processFacts?.credentialCustody === true,
23
+ ...(facts.processFacts?.exclusive === undefined ? {} : { exclusiveMember: facts.componentKey }),
24
+ };
25
+ }
26
+ function partition(closure) {
27
+ const byName = new Map();
28
+ for (const facts of closure.memberFacts) {
29
+ const key = partitionKeyOf(facts);
30
+ const name = (0, xema_service_nest_1.seedProcessName)(key);
31
+ const held = byName.get(name) ?? { name, key, memberKeys: [] };
32
+ held.memberKeys.push((0, process_topology_1.processMemberKey)(facts));
33
+ byName.set(name, held);
34
+ }
35
+ return [...byName.values()];
36
+ }
37
+ function bootOrder(names, after) {
38
+ const order = [];
39
+ const remaining = new Set(names);
40
+ while (remaining.size > 0) {
41
+ const ready = [...remaining].filter((name) => [...(after.get(name) ?? [])].every((dependency) => !remaining.has(dependency))).sort();
42
+ const next = ready[0];
43
+ if (next === undefined) {
44
+ throw new Error(`The seed's processes require each other at startup, so none can start first: ${[...remaining].sort().join(', ')}. ` +
45
+ 'A startupRequires edge between two seed processes must point one way.');
46
+ }
47
+ order.push(next);
48
+ remaining.delete(next);
49
+ }
50
+ return order;
51
+ }
52
+ function seedProcessesOf(closure) {
53
+ const claimed = closure.members.find((entry) => (0, xema_service_nest_1.isSeedProcessName)(entry.serviceName));
54
+ if (claimed !== undefined) {
55
+ throw new SeedProcessNameClaimedError(claimed.serviceName);
56
+ }
57
+ const entries = new Map(closure.members.map((entry) => [(0, process_topology_1.processMemberKey)(entry.member), entry]));
58
+ const factKeys = new Set(closure.memberFacts.map((facts) => (0, process_topology_1.processMemberKey)(facts)));
59
+ const unpaired = [
60
+ ...[...entries.keys()].filter((key) => !factKeys.has(key)),
61
+ ...[...factKeys].filter((key) => !entries.has(key)),
62
+ ];
63
+ if (unpaired.length > 0) {
64
+ throw new Error(`The seed closure pairs no entry with facts (or no facts with an entry) for ${unpaired.sort().join(', ')}.`);
65
+ }
66
+ const partitions = partition(closure);
67
+ const processOfService = new Map();
68
+ for (const held of partitions) {
69
+ for (const key of held.memberKeys) {
70
+ processOfService.set(entries.get(key).serviceName, held.name);
71
+ }
72
+ }
73
+ const after = new Map(partitions.map((held) => [
74
+ held.name,
75
+ new Set(held.memberKeys
76
+ .flatMap((key) => entries.get(key).startupRequires)
77
+ .map((service) => processOfService.get(service))
78
+ .filter((process) => process !== undefined && process !== held.name)),
79
+ ]));
80
+ const order = bootOrder(partitions.map((held) => held.name), after);
81
+ const definitions = partitions.map((held) => ({
82
+ name: held.name,
83
+ members: held.memberKeys.map((key) => entries.get(key).member),
84
+ replicas: { min: 1, max: 1 },
85
+ listen: { port: xema_service_nest_1.SEED_SUPERVISOR_DEFAULTS.probePort },
86
+ }));
87
+ (0, process_topology_1.assertProcessTopology)({
88
+ topology: { schemaVersion: 1, distributionId: SEED_PROCESS_PREFIX, processes: definitions },
89
+ memberFacts: closure.memberFacts,
90
+ });
91
+ const byName = new Map(partitions.map((held) => [held.name, held]));
92
+ return order.map((name) => {
93
+ const held = byName.get(name);
94
+ const members = held.memberKeys.map((key) => entries.get(key));
95
+ return {
96
+ name,
97
+ trustDomain: held.key.trustDomain,
98
+ credentialCustody: held.key.credentialCustody,
99
+ seedPartition: held.key,
100
+ members: members.map((entry) => entry.member),
101
+ serviceNames: members.map((entry) => entry.serviceName),
102
+ requiredEnvVars: Object.fromEntries(members.map((entry) => [(0, process_topology_1.processMemberKey)(entry.member), entry.requiredEnvVars])),
103
+ startsAfter: [...(after.get(name) ?? [])].sort(),
104
+ hostsRoot: members.some((entry) => entry.member.biomeId === closure.root),
105
+ };
106
+ });
107
+ }
108
+ function seedProcessNamed(processes, name) {
109
+ const found = processes.find((process) => process.name === name);
110
+ if (found === undefined) {
111
+ throw new Error(`The seed closure derives no process "${name}"; its processes are ${processes.map((process) => process.name).join(', ')}.`);
112
+ }
113
+ return found;
114
+ }
115
+ function seedPlatformServicesOf(closure) {
116
+ const served = new Set(closure.members.map((entry) => entry.serviceName));
117
+ return [
118
+ ...new Set(closure.members
119
+ .flatMap((entry) => entry.startupRequires)
120
+ .filter((service) => !served.has(service))),
121
+ ].sort();
122
+ }
123
+ //# sourceMappingURL=seed-processes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seed-processes.js","sourceRoot":"","sources":["../src/seed-processes.ts"],"names":[],"mappings":";;;AA8GA,0CA4DC;AAGD,4CAQC;AAOD,wDASC;AArMD,yEAO4C;AAC5C,iEAA6H;AAwC7H,MAAM,mBAAmB,GAAG,4CAAwB,CAAC,WAAW,CAAC;AAGjE,MAAa,2BAA4B,SAAQ,KAAK;IAC/B;IAArB,YAAqB,WAAmB;QACtC,KAAK,CACH,oCAAoC,WAAW,+CAA+C,mBAAmB,SAAS,mBAAmB,sDAAsD,CACpM,CAAC;QAHiB,gBAAW,GAAX,WAAW,CAAQ;QAItC,IAAI,CAAC,IAAI,GAAG,6BAA6B,CAAC;IAC5C,CAAC;CACF;AAPD,kEAOC;AAED,SAAS,cAAc,CAAC,KAAyB;IAC/C,OAAO;QACL,WAAW,EAAE,IAAA,qCAAkB,EAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,YAAY,CAAC;QAC3F,iBAAiB,EAAE,KAAK,CAAC,YAAY,EAAE,iBAAiB,KAAK,IAAI;QACjE,GAAG,CAAC,KAAK,CAAC,YAAY,EAAE,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC;KAChG,CAAC;AACJ,CAAC;AAQD,SAAS,SAAS,CAAC,OAAoB;IACrC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAqB,CAAC;IAC5C,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;QACxC,MAAM,GAAG,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;QAClC,MAAM,IAAI,GAAG,IAAA,mCAAe,EAAC,GAAG,CAAC,CAAC;QAClC,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,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- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "The one host of a composed process: runs the supervisor and the executor with their real adapters (Biome Host registry, OCI bundle store, event hub, host ABI) and carries the seed's build-derived bootstrap closure.",
5
+ "license": "LicenseRef-Xema-BSL-1.1",
6
+ "author": "Neuralchowder Inc. <developer@xema.dev> (https://xema.dev)",
7
+ "homepage": "https://xema.dev",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/xema-dev/xema-base.git",
11
+ "directory": "packages/sdks/composed-process-host"
12
+ },
13
+ "publishConfig": {
14
+ "registry": "https://registry.npmjs.org/",
15
+ "access": "public"
16
+ },
17
+ "main": "dist/index.js",
18
+ "types": "dist/index.d.ts",
19
+ "bin": {
20
+ "xema-composed-process": "bin/xema-composed-process.cjs"
21
+ },
22
+ "files": [
23
+ "dist",
24
+ "bin",
25
+ "scripts"
26
+ ],
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "xema-source": "./src/index.ts",
31
+ "default": "./dist/index.js"
32
+ }
33
+ },
34
+ "dependencies": {
35
+ "@xemahq/event-hub-client": "^11.0.0",
36
+ "zod": "^4.6.1",
37
+ "@xemahq/biome-bundle-pack": "^0.2.0",
38
+ "@xemahq/biome-host-internal-api-client": "^0.8.0",
39
+ "@xemahq/contracts": "^0.120.0",
40
+ "@xemahq/installation-tenancy": "^0.2.0",
41
+ "@xemahq/kernel-state-runtime": "^0.8.3",
42
+ "@xemahq/oci-closure": "^0.1.0",
43
+ "@xemahq/service-registry-nest": "^1.4.0",
44
+ "@xemahq/xema-service-nest": "^20.0.0"
45
+ },
46
+ "devDependencies": {
47
+ "@types/jest": "^30.0.0",
48
+ "@types/node": "25.2.3",
49
+ "eslint": "^9.39.4",
50
+ "jest": "^30.3.0",
51
+ "ts-jest": "^29.4.9",
52
+ "typescript": "5.9.3",
53
+ "@xemahq/eslint-config": "^0.14.3",
54
+ "authorization-api": "^0.1.1",
55
+ "biome-fetcher-api": "^0.1.0",
56
+ "biome-host-api": "^0.1.1",
57
+ "space-registry-api": "^0.1.0",
58
+ "xema-capability-router": "^0.1.0",
59
+ "org-database-pool-api": "^0.1.0",
60
+ "capability-registry-api": "^0.1.1"
61
+ },
62
+ "scripts": {
63
+ "clean": "rm -rf dist",
64
+ "build": "tsc -p tsconfig.build.json && node scripts/write-seed-closure.mjs",
65
+ "typecheck": "tsc -p tsconfig.json --noEmit",
66
+ "lint": "eslint .",
67
+ "test": "jest --config jest.config.ts"
68
+ },
69
+ "xemaRelease": {
70
+ "sourceDigest": "sha256:10969f233abbebd5d5bdc8f43d5cffb542bdc1777f2da256135b29070a0f9017",
71
+ "sha": "a32f8f5509b7ea239deb38216e4996e6286b10e8"
72
+ }
73
+ }
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+ // The package's build step: writes dist/seed-closure.json, the seed's bootstrap closure (members, their
3
+ // composition facts and built entries), by the aggregator's one derivation. The build commit is the
4
+ // repository's HEAD; the repository is the one this package's manifest names.
5
+ import { execFileSync } from 'node:child_process';
6
+ import { readFileSync } from 'node:fs';
7
+ import { dirname, join } from 'node:path';
8
+ import { fileURLToPath } from 'node:url';
9
+
10
+ const packageRoot = dirname(dirname(fileURLToPath(import.meta.url)));
11
+ const repositoryUrl = JSON.parse(readFileSync(join(packageRoot, 'package.json'), 'utf8')).repository.url;
12
+ const repository = /github\.com[/:]([^/]+\/[^/.]+)(?:\.git)?$/.exec(repositoryUrl)?.[1];
13
+ if (repository === undefined) {throw new Error(`cannot read the build-source repository from "${repositoryUrl}"`);}
14
+ const commit = execFileSync('git', ['rev-parse', 'HEAD'], { cwd: packageRoot, encoding: 'utf8' }).trim();
15
+
16
+ execFileSync(
17
+ process.execPath,
18
+ [
19
+ join(packageRoot, '..', '..', '..', 'tooling', 'codegen', 'derive-bootstrap-closure.mjs'),
20
+ '--seed-closure', join(packageRoot, 'dist', 'seed-closure.json'),
21
+ '--build-source', repository,
22
+ '--commit', commit,
23
+ ],
24
+ { stdio: 'inherit' },
25
+ );
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.