@xemahq/repo-build-tooling 0.33.1 → 0.34.1

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 (104) hide show
  1. package/LICENSE +175 -176
  2. package/README.md +6 -4
  3. package/package.json +28 -12
  4. package/src/arm64-supplement-needed.mjs +6 -6
  5. package/src/boot-graph-edges.mjs +253 -0
  6. package/src/boot-graph-edges.test.mjs +75 -0
  7. package/src/bootstrap-closure.mjs +236 -0
  8. package/src/bootstrap-closure.test.mjs +115 -0
  9. package/src/bundle-affected-cli.mjs +45 -0
  10. package/src/bundle-affected.mjs +33 -0
  11. package/src/bundle-affected.test.mjs +56 -0
  12. package/src/bundle-host-abi.mjs +59 -0
  13. package/src/bundle-notify-cli.mjs +41 -0
  14. package/src/bundle-notify.mjs +47 -0
  15. package/src/bundle-notify.test.mjs +53 -0
  16. package/src/bundle-publish-cli.mjs +35 -0
  17. package/src/bundle-publish.mjs +151 -0
  18. package/src/bundle-publish.test.mjs +130 -0
  19. package/src/canonical-hidden-hoist.mjs +14 -14
  20. package/src/canonical-hidden-hoist.test.mjs +5 -5
  21. package/src/check-no-vendored-deps.mjs +87 -13
  22. package/src/check-no-vendored-deps.test.mjs +27 -1
  23. package/src/check-workspace-range-matches-local.mjs +29 -12
  24. package/src/check-workspace-range-matches-local.test.mjs +23 -1
  25. package/src/command-exec.mjs +16 -0
  26. package/src/component-facts.mjs +13 -3
  27. package/src/component-operations.mjs +188 -0
  28. package/src/component-operations.test.mjs +226 -0
  29. package/src/composed-image-class.mjs +3 -3
  30. package/src/composed-image-class.test.mjs +4 -4
  31. package/src/composed-image-coordinate.mjs +10 -10
  32. package/src/composed-image-dockerfile.mjs +28 -18
  33. package/src/composed-image-dockerfile.test.mjs +25 -6
  34. package/src/composed-image-fixture.test.mjs +6 -2
  35. package/src/composed-image-in-image-closure.test.mjs +6 -6
  36. package/src/composed-image-in-image.mjs +45 -32
  37. package/src/composed-image-install.mjs +11 -3
  38. package/src/composed-image-install.test.mjs +33 -3
  39. package/src/composed-image-members.mjs +50 -20
  40. package/src/composed-image-package-files.mjs +10 -7
  41. package/src/composed-image-pnpm-context.mjs +4 -4
  42. package/src/composed-image-pnpm-context.test.mjs +4 -4
  43. package/src/composed-image-prebuilt-dockerfile.mjs +15 -14
  44. package/src/composed-image-prebuilt-dockerfile.test.mjs +6 -5
  45. package/src/composed-image-prisma-check.mjs +8 -8
  46. package/src/composed-image-prisma-check.test.mjs +1 -1
  47. package/src/composed-image-prisma-engine.mjs +2 -2
  48. package/src/composed-image-prisma-engine.test.mjs +2 -2
  49. package/src/composed-image-proof.mjs +10 -10
  50. package/src/composed-image-proof.test.mjs +1 -1
  51. package/src/composed-image-rebuild.mjs +4 -4
  52. package/src/composed-image-stage-deploy.test.mjs +62 -0
  53. package/src/composed-image-stage-tree.mjs +27 -54
  54. package/src/composed-image-stage-tree.test.mjs +11 -11
  55. package/src/composed-image-stage.mjs +57 -24
  56. package/src/composed-image-stage.test.mjs +28 -6
  57. package/src/composed-image-sync-injected.mjs +8 -8
  58. package/src/composed-image-sync-injected.test.mjs +1 -1
  59. package/src/composed-image.mjs +50 -49
  60. package/src/composed-image.test.mjs +31 -12
  61. package/src/composed-migrate.mjs +15 -15
  62. package/src/composed-migrate.test.mjs +2 -2
  63. package/src/declaration-refusal.mjs +18 -16
  64. package/src/declaration-refusal.test.mjs +6 -8
  65. package/src/derive-member-facts.mjs +6 -6
  66. package/src/effective-input-deployed-files.mjs +56 -341
  67. package/src/effective-input-deployed-files.test.mjs +91 -110
  68. package/src/effective-input-release-normalise.mjs +43 -0
  69. package/src/effective-input.mjs +53 -87
  70. package/src/effective-input.test.mjs +64 -5
  71. package/src/image-cpu-arch.test.mjs +3 -2
  72. package/src/invoked-directly.mjs +1 -1
  73. package/src/load-image.mjs +4 -4
  74. package/src/load-members-in-image.mjs +2 -2
  75. package/src/pack-bundle-cli.mjs +52 -0
  76. package/src/pack-bundle.mjs +227 -0
  77. package/src/pack-bundle.test.mjs +278 -0
  78. package/src/pnpm-lock-sections.mjs +47 -0
  79. package/src/promote-image-registry.mjs +5 -31
  80. package/src/promote-image.mjs +41 -191
  81. package/src/promote-image.test.mjs +51 -644
  82. package/src/prune-foreign-libc.mjs +15 -15
  83. package/src/readiness.mjs +26 -26
  84. package/src/refuse-in-image.mjs +38 -0
  85. package/src/service-bootstrap-component-facts.test.mjs +34 -0
  86. package/src/service-bootstrap-protocols.mjs +4 -4
  87. package/src/service-bootstrap.mjs +43 -16
  88. package/src/service-image-in-image.mjs +11 -11
  89. package/src/service-image-platform-twin.test.mjs +27 -0
  90. package/src/service-image-platform.mjs +11 -11
  91. package/src/service-image-stage.mjs +49 -42
  92. package/src/service-image.mjs +15 -15
  93. package/src/service-image.test.mjs +38 -31
  94. package/src/smoke-refusal.mjs +16 -16
  95. package/src/smoke-refusal.test.mjs +8 -6
  96. package/src/stage-tool-digest.mjs +31 -0
  97. package/src/staged-image-proof.mjs +7 -7
  98. package/src/staged-image-proof.test.mjs +1 -1
  99. package/src/turbo-config-projection.mjs +6 -6
  100. package/src/turbo-config-projection.test.mjs +1 -1
  101. package/src/canonical-json.mjs +0 -9
  102. package/src/promote-image-predicate.mjs +0 -27
  103. package/src/promote-image-provenance.mjs +0 -304
  104. package/src/scrub-swagger-plugin-paths.mjs +0 -1020
package/LICENSE CHANGED
@@ -1,176 +1,175 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
1
+ Xema Business Source License 1.1
2
+
3
+ License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved.
4
+ "Business Source License" is a trademark of MariaDB Corporation Ab.
5
+
6
+ -----------------------------------------------------------------------------
7
+
8
+ Parameters
9
+
10
+ Licensor: Neuralchowder Inc.
11
+
12
+ Licensed Work: Xema. The Licensed Work is (c) 2026 Neuralchowder Inc.
13
+
14
+ The Licensed Work includes, without limitation, Xema Core, Xema Runtime,
15
+ Xema Kernel, Xema control plane, Xema application runtime, Xema biome
16
+ runtime, Xema biome registry, Xema store services, Xema orchestration
17
+ services, Xema agents, Xema skills, Xema memory services, Xema APIs, Xema
18
+ user interfaces, Xema command-line tools, Xema deployment artifacts, Xema
19
+ templates, Xema specifications, Xema schemas, Xema manifests, Xema
20
+ documentation, Xema examples, and all source code, object code, binaries,
21
+ packages, modules, configuration files, manifests, schemas, examples,
22
+ templates, documentation, and derivative works included in or distributed
23
+ as part of the Xema software project.
24
+
25
+ The Licensed Work does not include any third-party software, libraries,
26
+ dependencies, packages, assets, or components that are distributed with the
27
+ Licensed Work but are governed by their own separate license terms. Such
28
+ third-party materials remain subject to their respective licenses.
29
+
30
+ A specific file, package, component, or directory may state that it is
31
+ governed by a different license. In that case, that specific file, package,
32
+ component, or directory is governed by the license expressly stated therein.
33
+
34
+ Additional Use Grant:
35
+
36
+ You may make production use of the Licensed Work, provided that your use
37
+ does not include offering, providing, making available, distributing,
38
+ hosting, managing, embedding, reselling, white-labeling, sublicensing,
39
+ commercializing, or otherwise making the Licensed Work, or any modified
40
+ version or derivative work of the Licensed Work, available to Third Parties
41
+ as part of a Competitive Offering.
42
+
43
+ The following definitions and clarifications form part of, and govern
44
+ the interpretation of, the Additional Use Grant set out above.
45
+
46
+ 1. "Production Use" means any use of the Licensed Work other than for
47
+ development, testing, evaluation, demonstration, experimentation,
48
+ benchmarking, or other non-production purposes.
49
+
50
+ 2. "Affiliate" means any entity that, directly or indirectly,
51
+ controls, is controlled by, or is under common control with you,
52
+ where "control" means ownership of more than fifty percent (50%) of
53
+ the voting interests of the entity, or the power to direct its
54
+ management.
55
+
56
+ 3. "Third Party" means any natural person or legal entity other than
57
+ you and your Affiliates.
58
+
59
+ 4. "Competitive Offering" means any product or service, made available
60
+ to one or more Third Parties for a fee or other consideration
61
+ (including without limitation on a paid, subscription,
62
+ advertising-supported, hosted, or managed-service basis), that is
63
+ offered or marketed as, or that competes with, a software platform,
64
+ runtime, orchestration system, agent or automation system,
65
+ extension or distribution marketplace, or other software system
66
+ that provides, in substantial part, the same or substantially
67
+ similar capabilities as those provided by the Licensed Work. A
68
+ product or service is a Competitive Offering whether the Licensed
69
+ Work is provided in whole or in part, alone or bundled with other
70
+ software, and whether modified or unmodified.
71
+
72
+ 5. Providing, hosting, or managing the Licensed Work for a Third Party,
73
+ or otherwise making the Licensed Work available to a Third Party as
74
+ a hosted or managed service such that the Third Party obtains the
75
+ principal value or functionality of the Licensed Work, is a
76
+ Competitive Offering and is not permitted by the Additional Use
77
+ Grant.
78
+
79
+ 6. Subject to the foregoing, the Additional Use Grant permits you to
80
+ make Production Use of the Licensed Work for your own internal
81
+ business purposes and to build, operate, and provide your own
82
+ products and services to Third Parties, provided that the Licensed
83
+ Work itself (whether modified or unmodified) is not the product or
84
+ service, and is not a Competitive Offering, made available to those
85
+ Third Parties.
86
+
87
+ 7. You may modify the Licensed Work and create derivative works for
88
+ any purpose permitted by this License. Any Production Use of such
89
+ modified or derivative works remains subject to the same
90
+ restrictions as the Licensed Work, including the prohibition on
91
+ Competitive Offerings.
92
+
93
+ 8. Use of the Licensed Work by your own employees, contractors, and
94
+ agents, acting on your behalf and for your benefit, is not by
95
+ itself making the Licensed Work available to a Third Party.
96
+
97
+ 9. Embedding or distributing the Licensed Work as a component of your
98
+ own product or service is permitted only where the Licensed Work
99
+ does not constitute the principal value of that product or service
100
+ and the product or service is not a Competitive Offering.
101
+
102
+ 10. Nothing in this Additional Use Grant grants any right to use any
103
+ name, trademark, service mark, or logo of the Licensor or its
104
+ Affiliates, except as reasonably required for customary
105
+ attribution.
106
+
107
+ 11. The rights stated in this Additional Use Grant are the maximum
108
+ rights granted for Production Use prior to the Change Date. Any
109
+ Production Use not expressly permitted requires a separate
110
+ commercial license from the Licensor.
111
+
112
+ 12. If any provision of this Additional Use Grant is held invalid or
113
+ unenforceable, that provision shall be limited or eliminated to
114
+ the minimum extent necessary so that the remainder of this
115
+ Additional Use Grant, and of this License, remains in full force
116
+ and effect. The Licensor reserves all rights not expressly granted
117
+ by this License.
118
+
119
+
120
+ Change Date: Four years from the date the specific version of the Licensed
121
+ Work is first publicly released by Licensor.
122
+
123
+ Change License: Mozilla Public License, Version 2.0
124
+
125
+ For information about alternative licensing arrangements, commercial
126
+ licensing, enterprise licensing, OEM licensing, appliance licensing, managed
127
+ service licensing, cloud provider licensing, or other commercial use of the
128
+ Licensed Work, please contact: licensing@neuralchowder.com
129
+
130
+ -----------------------------------------------------------------------------
131
+
132
+ Notice
133
+
134
+ Business Source License 1.1
135
+
136
+ Terms
137
+
138
+ The Licensor hereby grants you the right to copy, modify, create derivative
139
+ works, redistribute, and make non-production use of the Licensed Work. The
140
+ Licensor may make an Additional Use Grant, above, permitting limited
141
+ production use.
142
+
143
+ Effective on the Change Date, or the fourth anniversary of the first publicly
144
+ available distribution of a specific version of the Licensed Work under this
145
+ License, whichever comes first, the Licensor hereby grants you rights under
146
+ the terms of the Change License, and the rights granted in the paragraph above
147
+ terminate.
148
+
149
+ If your use of the Licensed Work does not comply with the requirements
150
+ currently in effect as described in this License, you must purchase a
151
+ commercial license from the Licensor, its affiliated entities, or authorized
152
+ resellers, or you must refrain from using the Licensed Work.
153
+
154
+ All copies of the original and modified Licensed Work, and derivative works of
155
+ the Licensed Work, are subject to this License. This License applies separately
156
+ for each version of the Licensed Work and the Change Date may vary for each
157
+ version of the Licensed Work released by Licensor.
158
+
159
+ You must conspicuously display this License on each original or modified copy
160
+ of the Licensed Work. If you receive the Licensed Work in original or modified
161
+ form from a third party, the terms and conditions set forth in this License
162
+ apply to your use of that work.
163
+
164
+ Any use of the Licensed Work in violation of this License will automatically
165
+ terminate your rights under this License for the current and all other
166
+ versions of the Licensed Work.
167
+
168
+ This License does not grant you any right in any trademark or logo of Licensor
169
+ or its affiliates, provided that you may use a trademark or logo of Licensor
170
+ as expressly required by this License.
171
+
172
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN
173
+ "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS
174
+ OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS
175
+ FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.
package/README.md CHANGED
@@ -21,18 +21,20 @@ pnpm add -D @xemahq/repo-build-tooling
21
21
  ```bash
22
22
  pnpm exec xema-readiness
23
23
  pnpm exec xema-service-bootstrap --check
24
- pnpm exec xema-scrub-swagger-paths dist
25
24
  ```
26
25
 
27
26
  | Bin | What it does |
28
27
  | --- | --- |
29
28
  | `xema-readiness` | Runs the ordered checks between a source change and a push |
30
29
  | `xema-service-bootstrap [--check] [--filter <key>] [--root <dir>]` | Generates `src/generated/*.generated.ts` service and worker descriptors from the repository's `xema-biome.json` manifests; `--check` fails on drift. Also derives each component's boot-required environment and edition delivery from its entry source (`oci-default` gives `src/main.ts`, `node-module` `dist/<x>` gives `src/<x>.ts`) with `@xemahq/peer-analysis`, writes `src/generated/<component>.component-facts.generated.json`, and inlines the same `bootEnv` (and `editionDelivery`, when reached) in the descriptor |
31
- | `xema-scrub-swagger-paths <dist-dir>...` | Rewrites `@nestjs/swagger` plugin output that names a private install path, then fails the build if any leak remains (`--self-test` available) |
32
30
  | `xema-composed-image <command>` | Build-time half of a composed-process image: `members`, `filters`, `dirs`, `pins`, `index`, `load`, `stage`, `stage-tree`, `pnpm-context`, `sync-injected`, `prisma-check`, `migrate`, `coordinate`, `load-image`, `smoke-refusal`, `dockerfile` |
33
- | `xema-service-image stage --service <pkg> --path <dir> --platform linux/<amd64\|arm64> [--stage-dir <dir>]` | Runner half of a per-service image: `pnpm deploy --prod --offline --ignore-scripts` of a service already built on the runner, selected for the TARGET platform (`--os=linux --cpu=<arch> --libc=glibc`), into `<stage>/service/app`, with its Prisma client and the target's schema engine. Refuses a package whose native code holds no ELF for the target (a multi-platform package that also ships the target's binary is accepted) and production dependencies whose build script would have to run, uncommitted changes to tracked files, an untracked root build input, and running as any tool but the one the root installs. Fetches the schema engine from Prisma for every stage, checks it against both published checksums, and caches nothing. Writes `<stage>/service/xema-service-image.json` (commit, sha256 of each root build input: lockfile, root `package.json`, `pnpm-workspace.yaml`, `.npmrc`, `.pnpmfile.cjs`, `turbo.json`, `tsconfig*.json`; tool version; natives per package; engine sha256) and `<stage>/tool`. The Dockerfile COPYs those root inputs into `/proof/context/`, which puts them in the content tag, and its proof stage runs `src/service-image-in-image.mjs prove <app> <proof dir> --service <svc> --commit <BUILD_SHA>` on the target, offline: it checks the commit, the root inputs, the tool version, the platform and Node ABI, that each package's addons `dlopen`, and the engine's sha256 and version. The stage reaches the build as the named context `xema-service` (`--build-context xema-service=.xema-stage`); the authoritative name is `STAGED_SERVICE_CONTEXT` in `@xemahq/distribution-source-hash`, whose image hash frames such a service from its tracked tree, closure, turbo globalDependencies and tsconfig chain, so the stage must be built from no other repository input. The final stage only COPYs |
31
+ | `xema-service-image stage --service <pkg> --path <dir> --platform linux/<amd64\|arm64> [--stage-dir <dir>]` | Runner half of a per-service image: `pnpm deploy --prod --offline --ignore-scripts` of a service already built on the runner, selected for the TARGET platform (`--os=linux --cpu=<arch> --libc=glibc`), into `<stage>/service/app`, with its Prisma client and the target's schema engine. Refuses a package whose native code holds no ELF for the target (a multi-platform package that also ships the target's binary is accepted) and production dependencies whose build script would have to run, uncommitted changes to tracked files, an untracked root build input, and running as any tool but one the lockfile pins for an importer of the repository. Fetches the schema engine from Prisma for every stage, checks it against both published checksums, and caches nothing. Writes `<stage>/service/xema-service-image.json` (commit, sha256 of each root build input: lockfile, root `package.json`, `pnpm-workspace.yaml`, `.npmrc`, `.pnpmfile.cjs`, `turbo.json`, `tsconfig*.json`; tool version; natives per package; engine sha256) and `<stage>/tool`. The Dockerfile COPYs those root inputs into `/proof/context/`, which puts them in the content tag, and its proof stage runs `src/service-image-in-image.mjs prove <app> <proof dir> --service <svc> --commit <BUILD_SHA>` on the target, offline: it checks the commit, the root inputs, the tool version, the platform and Node ABI, that each package's addons `dlopen`, and the engine's sha256 and version. The stage reaches the build as the named context `xema-service` (`--build-context xema-service=.xema-stage`); the authoritative name is `STAGED_SERVICE_CONTEXT` in `@xemahq/distribution-source-hash`, whose image hash frames such a service from its tracked tree, closure, turbo globalDependencies and tsconfig chain, so the stage must be built from no other repository input. The final stage only COPYs |
34
32
  | `xema-arm64-supplement-needed` | Decides whether an arm64 supplement is still owed at `REGISTRY/IMAGE:CONTENT_TAG` (env: `REGISTRY`, `IMAGE`, `CONTENT_TAG`, `REGISTRY_USER`, `REGISTRY_TOKEN`). `needed=false` only when the coordinate serves an index whose linux/arm64 child is proven by its own image config; any other resolvable state is `needed=true`; a 401/403/5xx or an unresolvable child is an error. Writes `needed=true\|false` to `$GITHUB_OUTPUT`. Replaces the generated `arm64-supplement-needed.mjs` copy. |
35
- | `xema-promote-image --service <name> --dev-ref <repo> --release-ref <repo> --tag <tag> --commit <sha> --main-ref <ref> --signer-repository <owner/repo> --develop-workflow <file> --release-workflow <file>... [--release-index-workflow <file>] --promotion-predicate-out <path> -- <tag command>` | Publishes the develop image's digest under the release tag instead of rebuilding: `reused` (the release digest carries an `image-promotion/v1` attestation signed by a `--release-workflow` identity on main, with exactly one verified statement about the digest and a `ghcr.io/<owner>/dev/<name>` source; no dev-ref probe), `copied` (the proven develop digest, digest-preserving; fails closed if the release digest differs) or `miss` (build it; a reuse whose release digest has no `image-promotion/v1` attestation, a legacy image, is a miss with `reason=reuse-no-promotion` on the stdout line; with `--release-index-workflow`, a release tag that names an image index signed by that workflow on main, with exactly one `linux/amd64` child whose own digest passes that same reuse check, is instead `reused` with `evidence=release-index`, `digest` = the amd64 child A, `index_digest` = the index D and no predicate, but only when A's selected promotion statement promotes `--commit` itself (a rerun; a later commit with the same content takes the existing miss and attests its own promotion). On `evidence=release-index` the caller skips sign/attest, tags `:<sha>` and `main-<sha>` to the amd64 subject `digest` (release-arm64 resolves `:<sha>` to it and verifies its promotion), and points only the content tag (and `latest`, if it moves it) at the index `index_digest`. Any failed step keeps the miss, and two amd64 children are an error; a signature or identity failure, or a source outside `dev/`, is an error; a copy whose dev digest carries no SLSA v1 provenance at all, an image reused on develop from before provenance, is a miss with `reason=copy-no-develop-provenance`, while provenance that is present but fails a leg is an error). A develop digest is proven only if its SLSA v1 provenance is signed by the develop workflow at `refs/heads/develop`, its revision is an ancestor of the main ref, and the tag command prints the same tag at that revision and at `--commit`; any failed leg is an error, never a miss. On every non-miss result it writes the `https://xema.dev/attestations/image-promotion/v1` predicate for the caller to attest: a copy states the facts just proved; a reuse states this run's `release` and `promotedCommit` and carries `source` and `developProvenance` from the earlier promotion. Writes `result`, `digest`, `source`, `revision`, `evidence`, `provenance_digest`, `promotion_predicate`, `promotion_predicate_type` to `$GITHUB_OUTPUT`. Needs `docker`, `cosign` (major v2, the same as the develop attest step and xema-deploy's verify; it runs `cosign version` first and refuses any other major or an unparsable version), `git` and full history. It does not sign |
33
+ | `xema-promote-image --service <name> --dev-ref <repo> --release-ref <repo> --tag <tag>` | Publishes the develop image's digest under the release tag instead of rebuilding, and proves no provenance: `reused` (`<release-ref>:<tag>` exists; `digest` is the release digest, `source` empty), `copied` (`<dev-ref>:<tag>` exists; it is copied by digest, re-probed, and the tool fails if the release digest differs; `source` is `<dev-ref>@<digest>`) or `miss` (neither exists; the caller builds). Writes `result`, `digest`, `source` to `$GITHUB_OUTPUT` and needs only `docker`. |
34
+ | `xema-affected-biomes --class <class> --affected-base <sha or ''> [--root <dir>] [--image-dir <dir>]` | Prints the biome ids a change affects, one per line and sorted, to stdout (logs go to stderr; empty output means none). A biome is affected when turbo (`turbo ls --affected` between the base and `HEAD`) reports one of its composed-process members' packages. An empty `--affected-base` selects every biome with members in the class. |
35
+ | `xema-pack-bundle <out> --class <class> --platform linux/<amd64\|arm64> [--biome <id>]… [--root <dir>] [--image-dir <dir>] [--build-source <repository>@<commit>]` | Packs each named biome (default: every biome with members in the class) as ONE content-addressed bundle of all its members, after the build: their `dist`, Prisma clients, schema and migrations, the biome manifest, its index and `contributions/*.contribution.json`, and their production dependencies WITHOUT the packages the host provides. The bundle is proven outside the repository (Prisma clients run, every member loads) before it is archived. Writes `<out>/<hex>/`, `<out>/<hex>.tgz` (`<hex>` is the archive's sha256, its address) and `<out>/bundles.json`. The bundle's `xema-bundle.json` is graded by the contracts' bundle manifest schema and records the build source: in GitHub Actions the workflow's repository and sha, locally the checkout's `origin` (a GitHub remote as `owner/repo`) and `HEAD`. Outside a git checkout, with a dirty tree or without an origin the pack is refused unless `--build-source <repository>@<commit>` is given. |
36
+ | `xema-publish-bundles <out> --registry <host/project> --channel <tag> --commit <40-hex> --source <owner/repo>` | Pushes the bundles in `<out>/bundles.json` with `oras` to `<registry>/bundles/<biome>:sha256-<hex>`, reads the pushed manifest back, and only then moves the `--channel` tag. A channel that already holds the digest is left alone (`unchanged`); a digest already pushed is only re-tagged (`retagged`). Writes `<out>/published.json`. Credentials come from the job's docker login. |
37
+ | `xema-notify-biome-host <out> --biome-host <https url> --channel <tag> --token-file <path>` | Tells Biome Host where each biome's channel now points, for every entry of `<out>/published.json` (unchanged ones too, so a run that failed after an earlier biome moved still converges): one POST with the bearer token read from `--token-file`. The URL must be https. |
36
38
  | `xema-check-no-vendored-deps` | Fails on a `workspace:` range for a package the repository does not own |
37
39
  | `xema-check-workspace-ranges` | Fails on a `workspace:` range the local package does not satisfy |
38
40
 
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@xemahq/repo-build-tooling",
3
- "version": "0.33.1",
3
+ "version": "0.34.1",
4
4
  "description": "Dev-time build tooling shared by every Xema repository. Ships as plain ESM, depending only on @xemahq/release-policy for registry access, so the published artifact is the reviewed source.",
5
- "license": "Apache-2.0",
5
+ "license": "LicenseRef-Xema-BSL-1.1",
6
6
  "author": "Neuralchowder Inc. <developer@xema.dev> (https://xema.dev)",
7
7
  "homepage": "https://xema.dev",
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "git+https://github.com/xema-dev/xema-runtime-core.git",
11
- "directory": "packages/sdks/repo-build-tooling"
10
+ "url": "git+https://github.com/xema-dev/xema-base.git",
11
+ "directory": "kernel/runtime/sdks/repo-build-tooling"
12
12
  },
13
- "bugs": "https://github.com/xema-dev/xema-runtime-core/issues",
13
+ "bugs": "https://github.com/xema-dev/xema-base/issues",
14
14
  "publishConfig": {
15
15
  "registry": "https://registry.npmjs.org/",
16
16
  "access": "public"
@@ -21,39 +21,55 @@
21
21
  "src"
22
22
  ],
23
23
  "bin": {
24
+ "xema-affected-biomes": "src/bundle-affected-cli.mjs",
24
25
  "xema-arm64-supplement-needed": "src/arm64-supplement-needed.mjs",
25
26
  "xema-check-no-vendored-deps": "src/check-no-vendored-deps.mjs",
26
27
  "xema-check-workspace-ranges": "src/check-workspace-range-matches-local.mjs",
27
28
  "xema-composed-image": "src/composed-image.mjs",
28
29
  "xema-effective-input": "src/effective-input.mjs",
30
+ "xema-notify-biome-host": "src/bundle-notify-cli.mjs",
31
+ "xema-pack-bundle": "src/pack-bundle-cli.mjs",
29
32
  "xema-promote-image": "src/promote-image.mjs",
33
+ "xema-publish-bundles": "src/bundle-publish-cli.mjs",
30
34
  "xema-readiness": "src/readiness.mjs",
31
- "xema-scrub-swagger-paths": "src/scrub-swagger-plugin-paths.mjs",
32
35
  "xema-service-bootstrap": "src/service-bootstrap.mjs",
33
36
  "xema-service-image": "src/service-image.mjs"
34
37
  },
35
38
  "exports": {
36
39
  "./arm64-supplement-needed": "./src/arm64-supplement-needed.mjs",
40
+ "./boot-graph-edges": "./src/boot-graph-edges.mjs",
41
+ "./bootstrap-closure": "./src/bootstrap-closure.mjs",
42
+ "./bundle-notify": "./src/bundle-notify.mjs",
43
+ "./bundle-publish": "./src/bundle-publish.mjs",
37
44
  "./check-no-vendored-deps": "./src/check-no-vendored-deps.mjs",
38
45
  "./check-workspace-range-matches-local": "./src/check-workspace-range-matches-local.mjs",
46
+ "./component-operations": "./src/component-operations.mjs",
39
47
  "./composed-image": "./src/composed-image.mjs",
40
48
  "./effective-input": "./src/effective-input.mjs",
49
+ "./pack-bundle": "./src/pack-bundle.mjs",
41
50
  "./package.json": "./package.json",
42
51
  "./promote-image": "./src/promote-image.mjs",
43
52
  "./readiness": "./src/readiness.mjs",
44
- "./scrub-swagger-plugin-paths": "./src/scrub-swagger-plugin-paths.mjs",
45
53
  "./service-bootstrap": "./src/service-bootstrap.mjs",
46
54
  "./service-image": "./src/service-image.mjs"
47
55
  },
48
56
  "dependencies": {
49
- "@xemahq/contracts": "^0.119.0",
50
- "@xemahq/release-policy": "^16.0.0",
51
- "@xemahq/peer-analysis": "^0.3.1"
57
+ "@xemahq/biome-bundle-pack": "^0.2.1",
58
+ "@xemahq/peer-analysis": "^0.4.0",
59
+ "@xemahq/contracts": "^0.120.1",
60
+ "@xemahq/release-policy": "^20.0.0",
61
+ "@xemahq/host-abi-node": "^0.2.0"
62
+ },
63
+ "devDependencies": {
64
+ "eslint": "^9.39.4",
65
+ "@xemahq/eslint-config": "^0.14.3"
52
66
  },
53
67
  "scripts": {
54
- "test": "node src/scrub-swagger-plugin-paths.mjs --self-test && node --test src/check-workspace-range-matches-local.test.mjs && node --test src/check-no-vendored-deps.test.mjs && node --test src/readiness.test.mjs && node --test src/composed-image.test.mjs && node --test src/composed-image-class.test.mjs && node --test src/composed-image-coordinate-cli.test.mjs && node --test src/declaration-refusal.test.mjs && node --test src/smoke-refusal.test.mjs && node --test src/load-image.test.mjs && node --test src/composed-image-coordinate.test.mjs && node --test src/composed-image-dockerfile.test.mjs && node --test src/service-bootstrap.test.mjs && node --test src/service-bootstrap-component-facts.test.mjs && node --test src/service-bootstrap-protocols.test.mjs && node --test src/composed-image-prebuilt-dockerfile.test.mjs && node --test src/composed-image-in-image-closure.test.mjs && node --test src/composed-image-stage.test.mjs && node --test src/composed-image-stage-tree.test.mjs && node --test src/composed-image-install.test.mjs && node --test src/canonical-hidden-hoist.test.mjs && node --test src/composed-image-proof.test.mjs && node --test src/composed-image-pnpm-context.test.mjs && node --test src/composed-image-sync-injected.test.mjs && node --test src/composed-image-prisma-check.test.mjs && node --test src/composed-image-prisma-engine.test.mjs && node --test src/composed-migrate.test.mjs && node --test src/promote-image.test.mjs && node --test src/arm64-supplement-needed.test.mjs && node --test src/service-image.test.mjs && node --test src/image-cpu-arch.test.mjs && node --test src/staged-image-proof.test.mjs && node --test src/turbo-config-projection.test.mjs && node --test src/effective-input.test.mjs && node --test src/effective-input-deployed-files.test.mjs"
68
+ "lint": "eslint .",
69
+ "test": "node --test src/check-workspace-range-matches-local.test.mjs && node --test src/check-no-vendored-deps.test.mjs && node --test src/readiness.test.mjs && node --test src/composed-image.test.mjs && node --test src/composed-image-class.test.mjs && node --test src/composed-image-coordinate-cli.test.mjs && node --test src/declaration-refusal.test.mjs && node --test src/smoke-refusal.test.mjs && node --test src/load-image.test.mjs && node --test src/composed-image-coordinate.test.mjs && node --test src/composed-image-dockerfile.test.mjs && node --test src/service-bootstrap.test.mjs && node --test src/service-bootstrap-component-facts.test.mjs && node --test src/service-bootstrap-protocols.test.mjs && node --test src/composed-image-prebuilt-dockerfile.test.mjs && node --test src/composed-image-in-image-closure.test.mjs && node --test src/composed-image-stage.test.mjs && node --test src/composed-image-stage-deploy.test.mjs && node --test src/composed-image-stage-tree.test.mjs && node --test src/composed-image-install.test.mjs && node --test src/canonical-hidden-hoist.test.mjs && node --test src/composed-image-proof.test.mjs && node --test src/composed-image-pnpm-context.test.mjs && node --test src/composed-image-sync-injected.test.mjs && node --test src/composed-image-prisma-check.test.mjs && node --test src/composed-image-prisma-engine.test.mjs && node --test src/composed-migrate.test.mjs && node --test src/promote-image.test.mjs && node --test src/arm64-supplement-needed.test.mjs && node --test src/service-image.test.mjs && node --test src/image-cpu-arch.test.mjs && node --test src/staged-image-proof.test.mjs && node --test src/turbo-config-projection.test.mjs && node --test src/effective-input.test.mjs && node --test src/effective-input-deployed-files.test.mjs && node --test src/service-image-platform-twin.test.mjs && node --test src/pack-bundle.test.mjs && node --test src/bundle-publish.test.mjs && node --test src/bundle-notify.test.mjs && node --test src/bundle-affected.test.mjs && node --test src/boot-graph-edges.test.mjs && node --test src/bootstrap-closure.test.mjs && node --test src/component-operations.test.mjs"
55
70
  },
56
71
  "xemaRelease": {
57
- "sourceDigest": "sha256:561f8561b0ff23023de261c59ca6f4067fc05f585edda41117a75f6d3d3f60e1"
72
+ "sourceDigest": "sha256:61ab673dbc2295bc71318bc83e3e150672f1b3a3ee1599763c60d8ceae14c45d",
73
+ "sha": "9a88d6fde912be61affb481b069f009abfdfde21"
58
74
  }
59
75
  }
@@ -92,7 +92,7 @@ async function getJson({
92
92
  },
93
93
  { sleep },
94
94
  );
95
- if (response.status === 404) return { status: 404, document: undefined };
95
+ if (response.status === 404) {return { status: 404, document: undefined };}
96
96
  if (response.status !== 200) {
97
97
  throw new Error(
98
98
  `${registry}: manifest lookup for ${repository}:${reference} returned HTTP ${response.status}`,
@@ -122,7 +122,7 @@ async function getJson({
122
122
  */
123
123
  export function declaredArm64Children(document) {
124
124
  const manifests = document?.manifests;
125
- if (!Array.isArray(manifests)) return [];
125
+ if (!Array.isArray(manifests)) {return [];}
126
126
  return manifests
127
127
  .filter(
128
128
  (child) =>
@@ -279,8 +279,8 @@ async function main(env) {
279
279
  const registry = env.REGISTRY;
280
280
  const image = env.IMAGE;
281
281
  const contentHash = env.CONTENT_TAG;
282
- if (!registry) throw new Error('REGISTRY is required.');
283
- if (!image) throw new Error('IMAGE is required.');
282
+ if (!registry) {throw new Error('REGISTRY is required.');}
283
+ if (!image) {throw new Error('IMAGE is required.');}
284
284
  const prefix = `${registry}/`;
285
285
  if (!image.startsWith(prefix)) {
286
286
  throw new Error(`IMAGE '${image}' is not hosted on '${registry}'`);
@@ -311,7 +311,7 @@ async function main(env) {
311
311
  }
312
312
 
313
313
  const out = env.GITHUB_OUTPUT;
314
- if (out) appendFileSync(out, `needed=${needed ? 'true' : 'false'}\n`);
314
+ if (out) {appendFileSync(out, `needed=${needed ? 'true' : 'false'}\n`);}
315
315
  }
316
316
 
317
317
  if (invokedDirectly(process.argv[1], import.meta.url)) {
@@ -319,7 +319,7 @@ if (invokedDirectly(process.argv[1], import.meta.url)) {
319
319
  console.error(
320
320
  `::error title=arm64 supplement probe failed::${error.message}`,
321
321
  );
322
- for (const line of describeErrorChain(error)) console.error(` ${line}`);
322
+ for (const line of describeErrorChain(error)) {console.error(` ${line}`);}
323
323
  process.exit(1);
324
324
  });
325
325
  }