@fulmenhq/tsfulmen 0.1.13 → 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.
- package/CHANGELOG.md +73 -512
- package/README.md +111 -28
- package/config/crucible-ts/agentic/roles/README.md +76 -0
- package/config/crucible-ts/agentic/roles/cicd.yaml +82 -0
- package/config/crucible-ts/agentic/roles/dataeng.yaml +104 -0
- package/config/crucible-ts/agentic/roles/devlead.yaml +84 -0
- package/config/crucible-ts/agentic/roles/devrev.yaml +105 -0
- package/config/crucible-ts/agentic/roles/entarch.yaml +101 -0
- package/config/crucible-ts/agentic/roles/infoarch.yaml +95 -0
- package/config/crucible-ts/agentic/roles/prodmktg.yaml +92 -0
- package/config/crucible-ts/agentic/roles/qa.yaml +148 -0
- package/config/crucible-ts/agentic/roles/secrev.yaml +101 -0
- package/config/crucible-ts/agentic/roles/uxdev.yaml +168 -0
- package/config/crucible-ts/branding/ecosystem.yaml +26 -0
- package/config/crucible-ts/library/foundry/exit-codes.snapshot.json +26 -0
- package/config/crucible-ts/library/foundry/exit-codes.yaml +28 -3
- package/config/crucible-ts/library/foundry/patterns.yaml +2 -2
- package/config/crucible-ts/library/foundry/signal-resolution-fixtures.yaml +207 -0
- package/config/crucible-ts/library/foundry/signals.yaml +21 -0
- package/config/crucible-ts/library/foundry/simplified-modes.snapshot.json +9 -1
- package/config/crucible-ts/library/{foundry/similarity-fixtures.yaml → similarity/fixtures.yaml} +1 -1
- package/config/crucible-ts/library/v1.0.0/module-manifest.yaml +1 -2
- package/config/crucible-ts/taxonomy/fixture-catalog.yaml +145 -0
- package/config/crucible-ts/taxonomy/languages.yaml +2 -2
- package/config/crucible-ts/taxonomy/library/foundry-catalogs/v1.1.0/catalogs.yaml +77 -0
- package/config/crucible-ts/taxonomy/library/platform-modules/v1.1.0/modules.yaml +722 -0
- package/config/crucible-ts/taxonomy/metrics.yaml +1 -1
- package/config/crucible-ts/taxonomy/repository-categories.yaml +134 -1
- package/dist/appidentity/index.d.ts +117 -35
- package/dist/appidentity/index.js +752 -592
- package/dist/appidentity/index.js.map +1 -1
- package/dist/config/index.js +118 -6
- package/dist/config/index.js.map +1 -1
- package/dist/crucible/index.js +118 -6
- package/dist/crucible/index.js.map +1 -1
- package/dist/errors/index.js +118 -6
- package/dist/errors/index.js.map +1 -1
- package/dist/foundry/index.d.ts +13 -676
- package/dist/foundry/index.js +118 -6
- package/dist/foundry/index.js.map +1 -1
- package/dist/foundry/similarity/index.d.ts +2 -2
- package/dist/fulhash/index.d.ts +64 -12
- package/dist/fulhash/index.js +292 -53
- package/dist/fulhash/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +753 -593
- package/dist/index.js.map +1 -1
- package/dist/{manager-D27vrdaS.d.ts → manager-CH3fX7zO.d.ts} +1 -1
- package/dist/pathfinder/index.js +368 -59
- package/dist/pathfinder/index.js.map +1 -1
- package/dist/reports/license-inventory.csv +302 -0
- package/dist/schema/index.js +118 -6
- package/dist/schema/index.js.map +1 -1
- package/dist/signals/index.d.ts +675 -0
- package/dist/signals/index.js +5790 -0
- package/dist/signals/index.js.map +1 -0
- package/dist/similarity/index.d.ts +2 -0
- package/dist/similarity/index.js +136 -0
- package/dist/similarity/index.js.map +1 -0
- package/dist/{suggest-Cv7SVQRu.d.ts → suggest-D8LbwtPV.d.ts} +1 -1
- package/dist/telemetry/http/index.js +704 -591
- package/dist/telemetry/http/index.js.map +1 -1
- package/dist/telemetry/index.js +118 -6
- package/dist/telemetry/index.js.map +1 -1
- package/dist/telemetry/prometheus/index.d.ts +1 -1
- package/dist/telemetry/prometheus/index.js +175 -11
- package/dist/telemetry/prometheus/index.js.map +1 -1
- package/package.json +15 -6
- package/schemas/crucible-ts/assessment/v1.0.0/severity-definitions.schema.json +1 -1
- package/schemas/crucible-ts/config/fulmen-ecosystem/v1.0.0/fulmen-config-paths.schema.json +1 -1
- package/schemas/crucible-ts/config/repository/app-identity/v1.0.0/app-identity.schema.json +3 -3
- package/schemas/crucible-ts/config/repository/v1.0.0/lifecycle-phase.json +1 -1
- package/schemas/crucible-ts/config/repository-category/codex/v1.0.0/codex-config.schema.json +1 -1
- package/schemas/crucible-ts/config/standards/v1.0.0/adr-adoption-status.json +1 -1
- package/schemas/crucible-ts/config/standards/v1.0.0/adr-frontmatter.schema.json +3 -3
- package/schemas/crucible-ts/config/standards/v1.0.0/adr-lifecycle-status.json +1 -1
- package/schemas/crucible-ts/config/sync-keys.schema.yaml +14 -0
- package/schemas/crucible-ts/content/ssot-provenance/v1.0.0/ssot-provenance.schema.json +1 -1
- package/schemas/crucible-ts/design/README.md +159 -0
- package/schemas/crucible-ts/design/core/v1.0.0/component-states.schema.json +204 -0
- package/schemas/crucible-ts/design/core/v1.0.0/semantic-colors.schema.json +179 -0
- package/schemas/crucible-ts/design/core/v1.0.0/spacing-scale.schema.json +165 -0
- package/schemas/crucible-ts/design/core/v1.0.0/typography-roles.schema.json +195 -0
- package/schemas/crucible-ts/design/tui/v1.0.0/color-palette.schema.json +303 -0
- package/schemas/crucible-ts/design/tui/v1.0.0/component.schema.json +374 -0
- package/schemas/crucible-ts/design/tui/v1.0.0/layout.schema.json +272 -0
- package/schemas/crucible-ts/design/tui/v1.0.0/theme.schema.json +205 -0
- package/schemas/crucible-ts/design/tui/v1.0.0/typography.schema.json +316 -0
- package/schemas/crucible-ts/devsecops/lorage-central/activity/v1.0.0/activity.schema.json +1 -1
- package/schemas/crucible-ts/devsecops/lorage-central/credentials/v1.0.0/credentials.schema.json +1 -1
- package/schemas/crucible-ts/devsecops/lorage-central/policy/v1.0.0/policy.schema.json +1 -1
- package/schemas/crucible-ts/devsecops/lorage-central/recipe/v1.0.0/recipe.schema.json +1 -1
- package/schemas/crucible-ts/devsecops/lorage-central/runbooks/v1.0.0/runbook.schema.json +1 -1
- package/schemas/crucible-ts/devsecops/lorage-central/tenant/v1.0.0/tenant.schema.json +1 -1
- package/schemas/crucible-ts/devsecops/secrets/v1.0.0/secrets.schema.json +1 -1
- package/schemas/crucible-ts/error-handling/v1.0.0/error-response.schema.json +1 -1
- package/schemas/crucible-ts/library/foundry/v1.0.0/country-codes.schema.json +1 -1
- package/schemas/crucible-ts/library/foundry/v1.0.0/exit-codes.schema.json +1 -1
- package/schemas/crucible-ts/library/foundry/v1.0.0/http-status-groups.schema.json +1 -1
- package/schemas/crucible-ts/library/foundry/v1.0.0/mime-types.schema.json +1 -1
- package/schemas/crucible-ts/library/foundry/v1.0.0/patterns.schema.json +1 -1
- package/schemas/crucible-ts/library/foundry/v1.0.0/signal-resolution-fixtures.schema.json +140 -0
- package/schemas/crucible-ts/library/foundry/v1.0.0/signals.schema.json +6 -1
- package/schemas/crucible-ts/library/fulencode/v1.0.0/fulencode-config.schema.json +1 -1
- package/schemas/crucible-ts/library/fulhash/v1.0.0/checksum-string.schema.json +2 -2
- package/schemas/crucible-ts/library/fulhash/v1.0.0/digest.schema.json +61 -1
- package/schemas/crucible-ts/library/fulhash/v1.0.0/fixtures.schema.json +1 -1
- package/schemas/crucible-ts/library/fulpack/v1.0.0/archive-entry.schema.json +1 -1
- package/schemas/crucible-ts/library/fulpack/v1.0.0/archive-info.schema.json +1 -1
- package/schemas/crucible-ts/library/fulpack/v1.0.0/archive-manifest.schema.json +2 -2
- package/schemas/crucible-ts/library/fulpack/v1.0.0/create-options.schema.json +1 -1
- package/schemas/crucible-ts/library/fulpack/v1.0.0/extract-options.schema.json +1 -1
- package/schemas/crucible-ts/library/fulpack/v1.0.0/extract-result.schema.json +1 -1
- package/schemas/crucible-ts/library/fulpack/v1.0.0/scan-options.schema.json +1 -1
- package/schemas/crucible-ts/library/fulpack/v1.0.0/validation-result.schema.json +1 -1
- package/schemas/crucible-ts/library/module-manifest/v1.0.0/module-manifest.schema.json +1 -1
- package/schemas/crucible-ts/library/{foundry → similarity}/v1.0.0/similarity.schema.json +2 -2
- package/schemas/crucible-ts/library/{foundry → similarity}/v2.0.0/similarity.schema.json +2 -2
- package/schemas/crucible-ts/observability/metrics/v1.0.0/metrics-event.schema.json +1 -1
- package/schemas/crucible-ts/pathfinder/v1.0.0/find-query.schema.json +1 -1
- package/schemas/crucible-ts/pathfinder/v1.0.0/finder-config.schema.json +1 -1
- package/schemas/crucible-ts/pathfinder/v1.0.0/path-result.schema.json +1 -1
- package/schemas/crucible-ts/protocol/http/v1.0.0/error-response.schema.json +1 -1
- package/schemas/crucible-ts/protocol/http/v1.0.0/health-response.schema.json +1 -1
- package/schemas/crucible-ts/protocol/http/v1.0.0/success-response.schema.json +1 -1
- package/schemas/crucible-ts/protocol/http/v1.0.0/version-response.schema.json +1 -1
- package/schemas/crucible-ts/server/management/v1.0.0/server-management.schema.json +1 -1
- package/schemas/crucible-ts/standards/publishing/v1.0.0/spec-catalog.schema.json +134 -0
- package/schemas/crucible-ts/taxonomy/devsecops/auth-methods/v1.0.0/auth-methods-key.schema.json +1 -1
- package/schemas/crucible-ts/taxonomy/devsecops/auth-methods/v1.0.0/auth-methods-metadata.schema.json +1 -1
- package/schemas/crucible-ts/taxonomy/devsecops/geo/v1.0.0/geo-key.schema.json +1 -1
- package/schemas/crucible-ts/taxonomy/devsecops/geo/v1.0.0/geo-metadata.schema.json +1 -1
- package/schemas/crucible-ts/taxonomy/devsecops/infra-phases/v1.0.0/infra-phases-key.schema.json +1 -1
- package/schemas/crucible-ts/taxonomy/devsecops/infra-phases/v1.0.0/infra-phases-metadata.schema.json +1 -1
- package/schemas/crucible-ts/taxonomy/devsecops/infra-providers/v1.0.0/infra-providers-key.schema.json +1 -1
- package/schemas/crucible-ts/taxonomy/devsecops/infra-providers/v1.0.0/infra-providers-metadata.schema.json +1 -1
- package/schemas/crucible-ts/taxonomy/devsecops/modules/v1.0.0/devsecops-module-entry.schema.json +1 -1
- package/schemas/crucible-ts/taxonomy/fixture/v1.0.0/fixture-catalog.schema.json +166 -0
- package/schemas/crucible-ts/taxonomy/language/v1.0.0/language-key.schema.json +1 -1
- package/schemas/crucible-ts/taxonomy/language/v1.0.0/language-metadata.schema.json +1 -1
- package/schemas/crucible-ts/taxonomy/library/foundry-catalogs/v1.1.0/catalog-entry.schema.json +98 -0
- package/schemas/crucible-ts/taxonomy/library/fulencode/detection-confidence/v1.0.0/levels.schema.json +1 -1
- package/schemas/crucible-ts/taxonomy/library/fulencode/encoding-families/v1.0.0/families.schema.json +1 -1
- package/schemas/crucible-ts/taxonomy/library/fulencode/normalization-profiles/v1.0.0/profiles.schema.json +1 -1
- package/schemas/crucible-ts/taxonomy/library/fulhash/algorithms/v1.0.0/algorithms.yaml +16 -0
- package/schemas/crucible-ts/taxonomy/library/modules/v1.0.0/module-entry.schema.json +1 -1
- package/schemas/crucible-ts/taxonomy/library/modules/v1.1.0/module-entry.schema.json +436 -0
- package/schemas/crucible-ts/taxonomy/repository-category/v1.0.0/category-key.schema.json +16 -8
- package/schemas/crucible-ts/taxonomy/repository-category/v1.0.0/category-metadata.schema.json +1 -1
- package/schemas/crucible-ts/upstream/3leaps/PROVENANCE.md +43 -0
- package/schemas/crucible-ts/upstream/3leaps/agentic/v0/role-prompt.schema.json +183 -0
- package/schemas/crucible-ts/upstream/3leaps/ailink/v0/prompt.schema.json +204 -0
- package/schemas/crucible-ts/upstream/3leaps/ailink/v0/search-response.schema.json +152 -0
- package/schemas/crucible-ts/upstream/README.md +50 -0
- package/schemas/crucible-ts/web/branding/v1.0.0/site-branding.schema.json +1 -1
- package/schemas/crucible-ts/web/styling/v1.0.0/site-styling.schema.json +1 -1
- package/schemas/crucible-ts/config/goneat/README.md +0 -60
- package/schemas/crucible-ts/config/goneat/v1.0.0/dates.yaml +0 -234
- package/schemas/crucible-ts/config/goneat/v1.0.0/goneat-config.yaml +0 -344
- package/schemas/crucible-ts/config/goneat/v1.0.0/lifecycle-phase.json +0 -20
- package/schemas/crucible-ts/config/goneat/v1.0.0/release-phase.json +0 -17
- package/schemas/crucible-ts/config/goneat/v1.0.0/security-policy.yaml +0 -178
- package/schemas/crucible-ts/config/goneat/v1.0.0/version-policy.schema.yaml +0 -205
- package/schemas/crucible-ts/tooling/goneat-tools/v1.0.0/README.md +0 -177
- package/schemas/crucible-ts/tooling/goneat-tools/v1.0.0/goneat-tools-config.schema.yaml +0 -146
|
@@ -363,4 +363,4 @@ declare class SignalManager {
|
|
|
363
363
|
*/
|
|
364
364
|
declare function createSignalManager(options?: SignalManagerOptions): SignalManager;
|
|
365
365
|
|
|
366
|
-
export { type
|
|
366
|
+
export { type Behavior as B, type ExitCodes as E, type FallbackLogger as F, type HandlerOptions as H, type LogLevel as L, type OsMappings as O, type PlatformOverrides as P, SignalManager as S, type TelemetryEmitter as T, type WindowsFallback as W, type BehaviorInfo as a, type BehaviorPhase as b, createSignalManager as c, getHttpFallbackGuidance as d, type PlatformSupport as e, type PlatformSupportLevel as f, getFallbackMetadata as g, handleWindowsFallback as h, type Signal as i, type SignalBehavior as j, type SignalCatalog as k, type SignalHandler as l, type SignalInfo as m, type SignalManagerOptions as n, type TimeoutBehavior as o, type WindowsFallbackBehavior as p, type WindowsFallbackOptions as q, requiresFallback as r, type WindowsFallbackResult as s };
|
package/dist/pathfinder/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { crc32, xxhash128, createXXHash128, createCRC32 } from 'hash-wasm';
|
|
1
2
|
import { createHash, randomUUID } from 'crypto';
|
|
2
|
-
import { xxhash128, createXXHash128 } from 'hash-wasm';
|
|
3
3
|
import { spawn } from 'child_process';
|
|
4
4
|
import fs2, { readFile, writeFile, access, mkdir, lstat, realpath } from 'fs/promises';
|
|
5
5
|
import { parse, stringify } from 'yaml';
|
|
@@ -25,6 +25,20 @@ var __export = (target, all) => {
|
|
|
25
25
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
+
// src/crucible/fulhash/types.ts
|
|
29
|
+
var Algorithm;
|
|
30
|
+
var init_types = __esm({
|
|
31
|
+
"src/crucible/fulhash/types.ts"() {
|
|
32
|
+
Algorithm = /* @__PURE__ */ ((Algorithm2) => {
|
|
33
|
+
Algorithm2["XXH3_128"] = "xxh3-128";
|
|
34
|
+
Algorithm2["SHA256"] = "sha256";
|
|
35
|
+
Algorithm2["CRC32"] = "crc32";
|
|
36
|
+
Algorithm2["CRC32C"] = "crc32c";
|
|
37
|
+
return Algorithm2;
|
|
38
|
+
})(Algorithm || {});
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
28
42
|
// src/fulhash/errors.ts
|
|
29
43
|
var FulHashError, UnsupportedAlgorithmError, InvalidChecksumError, InvalidChecksumFormatError, DigestStateError;
|
|
30
44
|
var init_errors = __esm({
|
|
@@ -68,24 +82,70 @@ var init_errors = __esm({
|
|
|
68
82
|
};
|
|
69
83
|
}
|
|
70
84
|
});
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
85
|
+
function hexToBytes(hex) {
|
|
86
|
+
const bytes = new Uint8Array(4);
|
|
87
|
+
for (let i = 0; i < 4; i++) {
|
|
88
|
+
bytes[i] = Number.parseInt(hex.substr(i * 2, 2), 16);
|
|
89
|
+
}
|
|
90
|
+
return bytes;
|
|
91
|
+
}
|
|
92
|
+
async function hashBytes(data) {
|
|
93
|
+
const hex = await crc32(data);
|
|
94
|
+
return hexToBytes(hex);
|
|
95
|
+
}
|
|
96
|
+
async function hashString(str, encoding = "utf8") {
|
|
97
|
+
if (encoding !== "utf8") {
|
|
98
|
+
const buf = Buffer.from(str, encoding);
|
|
99
|
+
const hex2 = await crc32(buf);
|
|
100
|
+
return hexToBytes(hex2);
|
|
101
|
+
}
|
|
102
|
+
const hex = await crc32(str);
|
|
103
|
+
return hexToBytes(hex);
|
|
104
|
+
}
|
|
105
|
+
async function createHasher() {
|
|
106
|
+
const hasher = await createCRC32();
|
|
107
|
+
return hasher;
|
|
108
|
+
}
|
|
109
|
+
var init_crc32 = __esm({
|
|
110
|
+
"src/fulhash/algorithms/crc32.ts"() {
|
|
81
111
|
}
|
|
82
112
|
});
|
|
83
|
-
function
|
|
113
|
+
function hexToBytes2(hex) {
|
|
114
|
+
const bytes = new Uint8Array(4);
|
|
115
|
+
for (let i = 0; i < 4; i++) {
|
|
116
|
+
bytes[i] = Number.parseInt(hex.substr(i * 2, 2), 16);
|
|
117
|
+
}
|
|
118
|
+
return bytes;
|
|
119
|
+
}
|
|
120
|
+
async function hashBytes2(data) {
|
|
121
|
+
const hex = await crc32(data, CRC32C_POLYNOMIAL);
|
|
122
|
+
return hexToBytes2(hex);
|
|
123
|
+
}
|
|
124
|
+
async function hashString2(str, encoding = "utf8") {
|
|
125
|
+
if (encoding !== "utf8") {
|
|
126
|
+
const buf = Buffer.from(str, encoding);
|
|
127
|
+
const hex2 = await crc32(buf, CRC32C_POLYNOMIAL);
|
|
128
|
+
return hexToBytes2(hex2);
|
|
129
|
+
}
|
|
130
|
+
const hex = await crc32(str, CRC32C_POLYNOMIAL);
|
|
131
|
+
return hexToBytes2(hex);
|
|
132
|
+
}
|
|
133
|
+
async function createHasher2() {
|
|
134
|
+
const hasher = await createCRC32(CRC32C_POLYNOMIAL);
|
|
135
|
+
return hasher;
|
|
136
|
+
}
|
|
137
|
+
var CRC32C_POLYNOMIAL;
|
|
138
|
+
var init_crc32c = __esm({
|
|
139
|
+
"src/fulhash/algorithms/crc32c.ts"() {
|
|
140
|
+
CRC32C_POLYNOMIAL = 2197175160;
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
function hashBytes3(data) {
|
|
84
144
|
const hash2 = createHash("sha256");
|
|
85
145
|
hash2.update(data);
|
|
86
146
|
return new Uint8Array(hash2.digest());
|
|
87
147
|
}
|
|
88
|
-
function
|
|
148
|
+
function hashString3(str, encoding = "utf8") {
|
|
89
149
|
const hash2 = createHash("sha256");
|
|
90
150
|
hash2.update(str, encoding);
|
|
91
151
|
return new Uint8Array(hash2.digest());
|
|
@@ -94,25 +154,25 @@ var init_sha256 = __esm({
|
|
|
94
154
|
"src/fulhash/algorithms/sha256.ts"() {
|
|
95
155
|
}
|
|
96
156
|
});
|
|
97
|
-
function
|
|
157
|
+
function hexToBytes3(hex) {
|
|
98
158
|
const bytes = new Uint8Array(16);
|
|
99
159
|
for (let i = 0; i < 16; i++) {
|
|
100
160
|
bytes[i] = Number.parseInt(hex.substr(i * 2, 2), 16);
|
|
101
161
|
}
|
|
102
162
|
return bytes;
|
|
103
163
|
}
|
|
104
|
-
async function
|
|
164
|
+
async function hashBytes4(data) {
|
|
105
165
|
const hex = await xxhash128(data);
|
|
106
|
-
return
|
|
166
|
+
return hexToBytes3(hex);
|
|
107
167
|
}
|
|
108
|
-
async function
|
|
168
|
+
async function hashString4(str, encoding = "utf8") {
|
|
109
169
|
if (encoding !== "utf8") {
|
|
110
170
|
throw new FulHashError(
|
|
111
171
|
"XXH3-128 only supports UTF-8 encoding. Use utf8 encoding or convert data to Uint8Array."
|
|
112
172
|
);
|
|
113
173
|
}
|
|
114
174
|
const hex = await xxhash128(str);
|
|
115
|
-
return
|
|
175
|
+
return hexToBytes3(hex);
|
|
116
176
|
}
|
|
117
177
|
var init_xxh3 = __esm({
|
|
118
178
|
"src/fulhash/algorithms/xxh3.ts"() {
|
|
@@ -124,43 +184,66 @@ var init_xxh3 = __esm({
|
|
|
124
184
|
var hash_exports = {};
|
|
125
185
|
__export(hash_exports, {
|
|
126
186
|
hash: () => hash,
|
|
127
|
-
hashBytes: () =>
|
|
128
|
-
hashString: () =>
|
|
187
|
+
hashBytes: () => hashBytes5,
|
|
188
|
+
hashString: () => hashString5
|
|
129
189
|
});
|
|
130
190
|
async function hash(input, options) {
|
|
131
191
|
const algorithm = options?.algorithm ?? "xxh3-128" /* XXH3_128 */;
|
|
132
192
|
const encoding = options?.encoding ?? "utf8";
|
|
133
193
|
let bytes;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
194
|
+
switch (algorithm) {
|
|
195
|
+
case "sha256" /* SHA256 */:
|
|
196
|
+
if (typeof input === "string") {
|
|
197
|
+
bytes = hashString3(input, encoding);
|
|
198
|
+
} else {
|
|
199
|
+
bytes = hashBytes3(input);
|
|
200
|
+
}
|
|
201
|
+
break;
|
|
202
|
+
case "xxh3-128" /* XXH3_128 */:
|
|
203
|
+
if (typeof input === "string") {
|
|
204
|
+
if (encoding !== "utf8") {
|
|
205
|
+
bytes = await hashBytes4(Buffer.from(input, encoding));
|
|
206
|
+
} else {
|
|
207
|
+
bytes = await hashString4(input, "utf8");
|
|
208
|
+
}
|
|
209
|
+
} else {
|
|
210
|
+
bytes = await hashBytes4(input);
|
|
211
|
+
}
|
|
212
|
+
break;
|
|
213
|
+
case "crc32" /* CRC32 */:
|
|
214
|
+
if (typeof input === "string") {
|
|
215
|
+
bytes = await hashString(input, encoding);
|
|
216
|
+
} else {
|
|
217
|
+
bytes = await hashBytes(input);
|
|
218
|
+
}
|
|
219
|
+
break;
|
|
220
|
+
case "crc32c" /* CRC32C */:
|
|
221
|
+
if (typeof input === "string") {
|
|
222
|
+
bytes = await hashString2(input, encoding);
|
|
223
|
+
} else {
|
|
224
|
+
bytes = await hashBytes2(input);
|
|
225
|
+
}
|
|
226
|
+
break;
|
|
227
|
+
default:
|
|
228
|
+
throw new UnsupportedAlgorithmError(algorithm, Object.values(Algorithm));
|
|
148
229
|
}
|
|
149
230
|
return new Digest(algorithm, bytes);
|
|
150
231
|
}
|
|
151
|
-
async function
|
|
232
|
+
async function hashString5(str, options) {
|
|
152
233
|
return hash(str, options);
|
|
153
234
|
}
|
|
154
|
-
async function
|
|
235
|
+
async function hashBytes5(data, options) {
|
|
155
236
|
return hash(data, options);
|
|
156
237
|
}
|
|
157
238
|
var init_hash = __esm({
|
|
158
239
|
"src/fulhash/hash.ts"() {
|
|
240
|
+
init_types();
|
|
241
|
+
init_crc32();
|
|
242
|
+
init_crc32c();
|
|
159
243
|
init_sha256();
|
|
160
244
|
init_xxh3();
|
|
161
245
|
init_digest();
|
|
162
246
|
init_errors();
|
|
163
|
-
init_types();
|
|
164
247
|
}
|
|
165
248
|
});
|
|
166
249
|
|
|
@@ -168,8 +251,8 @@ var init_hash = __esm({
|
|
|
168
251
|
var Digest;
|
|
169
252
|
var init_digest = __esm({
|
|
170
253
|
"src/fulhash/digest.ts"() {
|
|
171
|
-
init_errors();
|
|
172
254
|
init_types();
|
|
255
|
+
init_errors();
|
|
173
256
|
Digest = class _Digest {
|
|
174
257
|
algorithm;
|
|
175
258
|
_bytes;
|
|
@@ -183,7 +266,7 @@ var init_digest = __esm({
|
|
|
183
266
|
Object.freeze(this);
|
|
184
267
|
}
|
|
185
268
|
get bytes() {
|
|
186
|
-
return
|
|
269
|
+
return Array.from(this._bytes);
|
|
187
270
|
}
|
|
188
271
|
toJSON() {
|
|
189
272
|
return {
|
|
@@ -213,7 +296,21 @@ var init_digest = __esm({
|
|
|
213
296
|
"hex must contain only lowercase hexadecimal characters"
|
|
214
297
|
);
|
|
215
298
|
}
|
|
216
|
-
|
|
299
|
+
let expectedLength;
|
|
300
|
+
switch (algorithm) {
|
|
301
|
+
case "xxh3-128" /* XXH3_128 */:
|
|
302
|
+
expectedLength = 32;
|
|
303
|
+
break;
|
|
304
|
+
case "sha256" /* SHA256 */:
|
|
305
|
+
expectedLength = 64;
|
|
306
|
+
break;
|
|
307
|
+
case "crc32" /* CRC32 */:
|
|
308
|
+
case "crc32c" /* CRC32C */:
|
|
309
|
+
expectedLength = 8;
|
|
310
|
+
break;
|
|
311
|
+
default:
|
|
312
|
+
throw new UnsupportedAlgorithmError(algorithm, Object.values(Algorithm));
|
|
313
|
+
}
|
|
217
314
|
if (hex.length !== expectedLength) {
|
|
218
315
|
throw new InvalidChecksumError(
|
|
219
316
|
formatted,
|
|
@@ -1799,7 +1896,10 @@ async function loadReferencedSchema(uri) {
|
|
|
1799
1896
|
const repoRoot = join(__dirname4, "..", "..");
|
|
1800
1897
|
let resolvedPath;
|
|
1801
1898
|
if (uri.startsWith("https://schemas.fulmenhq.dev/")) {
|
|
1802
|
-
|
|
1899
|
+
let relativePath = uri.replace("https://schemas.fulmenhq.dev/", "");
|
|
1900
|
+
if (relativePath.startsWith("crucible/")) {
|
|
1901
|
+
relativePath = relativePath.slice("crucible/".length);
|
|
1902
|
+
}
|
|
1803
1903
|
if (relativePath.startsWith("config/taxonomy/")) {
|
|
1804
1904
|
resolvedPath = join(
|
|
1805
1905
|
repoRoot,
|
|
@@ -2016,7 +2116,9 @@ async function compileSchemaById(schemaId, registryOptions) {
|
|
|
2016
2116
|
const aliases = [];
|
|
2017
2117
|
const normalizedRelativePath = metadata.relativePath.replace(/\\/g, "/");
|
|
2018
2118
|
if (normalizedRelativePath) {
|
|
2019
|
-
aliases.push(
|
|
2119
|
+
aliases.push(
|
|
2120
|
+
new URL(`crucible/${normalizedRelativePath}`, "https://schemas.fulmenhq.dev/").toString()
|
|
2121
|
+
);
|
|
2020
2122
|
}
|
|
2021
2123
|
return compileSchema(content, { aliases });
|
|
2022
2124
|
} catch (error) {
|
|
@@ -2534,6 +2636,12 @@ var init_exitCodes = __esm({
|
|
|
2534
2636
|
EXIT_TEST_USAGE_ERROR: 94,
|
|
2535
2637
|
EXIT_TEST_NO_TESTS_COLLECTED: 95,
|
|
2536
2638
|
EXIT_COVERAGE_THRESHOLD_NOT_MET: 96,
|
|
2639
|
+
// Shell & Process Control (124-127)
|
|
2640
|
+
// Exit codes from shell conventions and process control utilities (timeout, exec)
|
|
2641
|
+
EXIT_TIMEOUT: 124,
|
|
2642
|
+
EXIT_TIMEOUT_INTERNAL: 125,
|
|
2643
|
+
EXIT_CANNOT_EXECUTE: 126,
|
|
2644
|
+
EXIT_NOT_FOUND: 127,
|
|
2537
2645
|
// Signal-Induced Exits (128-165)
|
|
2538
2646
|
// Process terminated by Unix signals (128+N pattern per POSIX). Signal codes follow Linux numbering; macOS/FreeBSD differ for SIGUSR1/SIGUSR2. For full signal semantics, see config/library/foundry/signals.yaml. For signal handling patterns, see docs/standards/library/modules/signal-handling.md.
|
|
2539
2647
|
EXIT_SIGNAL_HUP: 129,
|
|
@@ -2871,6 +2979,36 @@ var init_exitCodes = __esm({
|
|
|
2871
2979
|
context: "Code coverage validation, quality gate failure",
|
|
2872
2980
|
category: "testing"
|
|
2873
2981
|
},
|
|
2982
|
+
124: {
|
|
2983
|
+
code: 124,
|
|
2984
|
+
name: "EXIT_TIMEOUT",
|
|
2985
|
+
description: "Command timed out before completion",
|
|
2986
|
+
context: "GNU timeout or similar utility terminated command after deadline",
|
|
2987
|
+
category: "shell"
|
|
2988
|
+
},
|
|
2989
|
+
125: {
|
|
2990
|
+
code: 125,
|
|
2991
|
+
name: "EXIT_TIMEOUT_INTERNAL",
|
|
2992
|
+
description: "Timeout utility itself failed",
|
|
2993
|
+
context: "Error in timeout tool before or during command execution (not command failure)",
|
|
2994
|
+
category: "shell"
|
|
2995
|
+
},
|
|
2996
|
+
126: {
|
|
2997
|
+
code: 126,
|
|
2998
|
+
name: "EXIT_CANNOT_EXECUTE",
|
|
2999
|
+
description: "Command found but could not be executed",
|
|
3000
|
+
context: "Permission denied, not executable, exec format error",
|
|
3001
|
+
category: "shell",
|
|
3002
|
+
bsdEquivalent: "EX_NOPERM (partial)"
|
|
3003
|
+
},
|
|
3004
|
+
127: {
|
|
3005
|
+
code: 127,
|
|
3006
|
+
name: "EXIT_NOT_FOUND",
|
|
3007
|
+
description: "Command not found",
|
|
3008
|
+
context: "Executable not found in PATH or specified path does not exist",
|
|
3009
|
+
category: "shell",
|
|
3010
|
+
bsdEquivalent: "EX_UNAVAILABLE (partial)"
|
|
3011
|
+
},
|
|
2874
3012
|
129: {
|
|
2875
3013
|
code: 129,
|
|
2876
3014
|
name: "EXIT_SIGNAL_HUP",
|
|
@@ -5184,6 +5322,45 @@ ${cause.message}`;
|
|
|
5184
5322
|
${cause.message}`;
|
|
5185
5323
|
return new _AppIdentityError(message, path5, cause);
|
|
5186
5324
|
}
|
|
5325
|
+
/**
|
|
5326
|
+
* Create error for embedded identity already registered
|
|
5327
|
+
*
|
|
5328
|
+
* Uses first-wins semantics - once registered, cannot be replaced
|
|
5329
|
+
*/
|
|
5330
|
+
static alreadyRegistered() {
|
|
5331
|
+
const message = "Embedded identity already registered. Registration uses first-wins semantics and cannot be replaced.";
|
|
5332
|
+
return new _AppIdentityError(message);
|
|
5333
|
+
}
|
|
5334
|
+
/**
|
|
5335
|
+
* Create error for embedded identity YAML parsing failure
|
|
5336
|
+
*/
|
|
5337
|
+
static embeddedParseFailed(cause) {
|
|
5338
|
+
const message = `Failed to parse embedded identity YAML: ${cause.message}`;
|
|
5339
|
+
return new _AppIdentityError(message, void 0, cause);
|
|
5340
|
+
}
|
|
5341
|
+
/**
|
|
5342
|
+
* Create error for embedded identity schema validation failure
|
|
5343
|
+
*/
|
|
5344
|
+
static embeddedValidationFailed(diagnostics) {
|
|
5345
|
+
const errorCount = diagnostics.filter((d) => d.severity === "ERROR").length;
|
|
5346
|
+
const warningCount = diagnostics.filter((d) => d.severity === "WARN").length;
|
|
5347
|
+
let message = "Invalid embedded identity\n";
|
|
5348
|
+
message += `Validation errors: ${errorCount} error(s), ${warningCount} warning(s)
|
|
5349
|
+
`;
|
|
5350
|
+
const displayDiagnostics = diagnostics.slice(0, 3);
|
|
5351
|
+
for (const diag of displayDiagnostics) {
|
|
5352
|
+
message += ` - ${diag.message}`;
|
|
5353
|
+
if (diag.pointer) {
|
|
5354
|
+
message += ` at ${diag.pointer}`;
|
|
5355
|
+
}
|
|
5356
|
+
message += "\n";
|
|
5357
|
+
}
|
|
5358
|
+
if (diagnostics.length > 3) {
|
|
5359
|
+
message += ` ... and ${diagnostics.length - 3} more
|
|
5360
|
+
`;
|
|
5361
|
+
}
|
|
5362
|
+
return new _AppIdentityError(message);
|
|
5363
|
+
}
|
|
5187
5364
|
};
|
|
5188
5365
|
}
|
|
5189
5366
|
});
|
|
@@ -5241,6 +5418,18 @@ var init_discovery = __esm({
|
|
|
5241
5418
|
init_errors5();
|
|
5242
5419
|
}
|
|
5243
5420
|
});
|
|
5421
|
+
function getEmbeddedIdentity() {
|
|
5422
|
+
return embeddedIdentity;
|
|
5423
|
+
}
|
|
5424
|
+
var embeddedIdentity;
|
|
5425
|
+
var init_embedded = __esm({
|
|
5426
|
+
"src/appidentity/embedded.ts"() {
|
|
5427
|
+
init_schema();
|
|
5428
|
+
init_constants();
|
|
5429
|
+
init_errors5();
|
|
5430
|
+
embeddedIdentity = null;
|
|
5431
|
+
}
|
|
5432
|
+
});
|
|
5244
5433
|
|
|
5245
5434
|
// src/appidentity/loader.ts
|
|
5246
5435
|
var loader_exports = {};
|
|
@@ -5269,11 +5458,30 @@ async function loadIdentity(options) {
|
|
|
5269
5458
|
return cached;
|
|
5270
5459
|
}
|
|
5271
5460
|
}
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5461
|
+
let discovery;
|
|
5462
|
+
try {
|
|
5463
|
+
discovery = await discoverIdentityPath({
|
|
5464
|
+
path: options?.path,
|
|
5465
|
+
startDir: options?.startDir
|
|
5466
|
+
});
|
|
5467
|
+
} catch (error) {
|
|
5468
|
+
const hasExplicitPath = Boolean(options?.path);
|
|
5469
|
+
const hasEnvOverride = Boolean(process.env[APP_IDENTITY_ENV_VAR]);
|
|
5470
|
+
if (!hasExplicitPath && !hasEnvOverride && error instanceof AppIdentityError) {
|
|
5471
|
+
const embedded = getEmbeddedIdentity();
|
|
5472
|
+
if (embedded) {
|
|
5473
|
+
setCachedIdentity(embedded);
|
|
5474
|
+
return embedded;
|
|
5475
|
+
}
|
|
5476
|
+
}
|
|
5477
|
+
throw error;
|
|
5478
|
+
}
|
|
5276
5479
|
if (!discovery) {
|
|
5480
|
+
const embedded = getEmbeddedIdentity();
|
|
5481
|
+
if (embedded) {
|
|
5482
|
+
setCachedIdentity(embedded);
|
|
5483
|
+
return embedded;
|
|
5484
|
+
}
|
|
5277
5485
|
throw AppIdentityError.notFound([]);
|
|
5278
5486
|
}
|
|
5279
5487
|
let content;
|
|
@@ -5310,6 +5518,7 @@ var init_loader2 = __esm({
|
|
|
5310
5518
|
init_cache();
|
|
5311
5519
|
init_constants();
|
|
5312
5520
|
init_discovery();
|
|
5521
|
+
init_embedded();
|
|
5313
5522
|
init_errors5();
|
|
5314
5523
|
}
|
|
5315
5524
|
});
|
|
@@ -5897,14 +6106,17 @@ var init_errors6 = __esm({
|
|
|
5897
6106
|
});
|
|
5898
6107
|
|
|
5899
6108
|
// src/fulhash/index.ts
|
|
6109
|
+
init_types();
|
|
6110
|
+
|
|
6111
|
+
// src/fulhash/convenience.ts
|
|
5900
6112
|
init_digest();
|
|
5901
|
-
init_errors();
|
|
5902
|
-
init_hash();
|
|
5903
6113
|
|
|
5904
6114
|
// src/fulhash/stream.ts
|
|
6115
|
+
init_types();
|
|
6116
|
+
init_crc32();
|
|
6117
|
+
init_crc32c();
|
|
5905
6118
|
init_digest();
|
|
5906
6119
|
init_errors();
|
|
5907
|
-
init_types();
|
|
5908
6120
|
|
|
5909
6121
|
// src/fulhash/wasm-loader.ts
|
|
5910
6122
|
init_errors();
|
|
@@ -5925,7 +6137,7 @@ async function initializeWasm() {
|
|
|
5925
6137
|
});
|
|
5926
6138
|
return initPromise;
|
|
5927
6139
|
}
|
|
5928
|
-
async function
|
|
6140
|
+
async function createHasher3() {
|
|
5929
6141
|
if (!isWasmReady) {
|
|
5930
6142
|
throw new FulHashError("WASM not initialized. Call initializeWasm() first.");
|
|
5931
6143
|
}
|
|
@@ -5933,6 +6145,15 @@ async function createHasher() {
|
|
|
5933
6145
|
}
|
|
5934
6146
|
|
|
5935
6147
|
// src/fulhash/stream.ts
|
|
6148
|
+
function intToBytes(crc) {
|
|
6149
|
+
const bytes = new Uint8Array(4);
|
|
6150
|
+
const unsigned = crc >>> 0;
|
|
6151
|
+
bytes[0] = unsigned >>> 24 & 255;
|
|
6152
|
+
bytes[1] = unsigned >>> 16 & 255;
|
|
6153
|
+
bytes[2] = unsigned >>> 8 & 255;
|
|
6154
|
+
bytes[3] = unsigned & 255;
|
|
6155
|
+
return bytes;
|
|
6156
|
+
}
|
|
5936
6157
|
var BaseStreamHasher = class {
|
|
5937
6158
|
state = "initial" /* INITIAL */;
|
|
5938
6159
|
algorithm;
|
|
@@ -6017,21 +6238,109 @@ var XXH3StreamHasher = class extends BaseStreamHasher {
|
|
|
6017
6238
|
return this;
|
|
6018
6239
|
}
|
|
6019
6240
|
};
|
|
6241
|
+
var CRC32StreamHasher = class extends BaseStreamHasher {
|
|
6242
|
+
hasher = null;
|
|
6243
|
+
constructor() {
|
|
6244
|
+
super("crc32" /* CRC32 */);
|
|
6245
|
+
}
|
|
6246
|
+
async init() {
|
|
6247
|
+
this.hasher = await createHasher();
|
|
6248
|
+
this.hasher.init();
|
|
6249
|
+
}
|
|
6250
|
+
update(data) {
|
|
6251
|
+
this.ensureNotFinalized();
|
|
6252
|
+
this.markUpdating();
|
|
6253
|
+
if (!this.hasher) {
|
|
6254
|
+
throw new Error("Hasher not initialized");
|
|
6255
|
+
}
|
|
6256
|
+
if (typeof data === "string") {
|
|
6257
|
+
const encoder = new TextEncoder();
|
|
6258
|
+
this.hasher.update(encoder.encode(data));
|
|
6259
|
+
} else {
|
|
6260
|
+
this.hasher.update(data);
|
|
6261
|
+
}
|
|
6262
|
+
return this;
|
|
6263
|
+
}
|
|
6264
|
+
digest() {
|
|
6265
|
+
this.ensureUpdating();
|
|
6266
|
+
this.markFinalized();
|
|
6267
|
+
if (!this.hasher) throw new Error("Hasher not initialized");
|
|
6268
|
+
const hex = this.hasher.digest();
|
|
6269
|
+
const bytes = intToBytes(parseInt(hex, 16));
|
|
6270
|
+
return new Digest(this.algorithm, bytes);
|
|
6271
|
+
}
|
|
6272
|
+
reset() {
|
|
6273
|
+
if (!this.hasher) throw new Error("Hasher not initialized");
|
|
6274
|
+
this.hasher.init();
|
|
6275
|
+
this.markInitial();
|
|
6276
|
+
return this;
|
|
6277
|
+
}
|
|
6278
|
+
};
|
|
6279
|
+
var CRC32CStreamHasher = class extends BaseStreamHasher {
|
|
6280
|
+
hasher = null;
|
|
6281
|
+
constructor() {
|
|
6282
|
+
super("crc32c" /* CRC32C */);
|
|
6283
|
+
}
|
|
6284
|
+
async init() {
|
|
6285
|
+
this.hasher = await createHasher2();
|
|
6286
|
+
this.hasher.init();
|
|
6287
|
+
}
|
|
6288
|
+
update(data) {
|
|
6289
|
+
this.ensureNotFinalized();
|
|
6290
|
+
this.markUpdating();
|
|
6291
|
+
if (!this.hasher) throw new Error("Hasher not initialized");
|
|
6292
|
+
if (typeof data === "string") {
|
|
6293
|
+
const encoder = new TextEncoder();
|
|
6294
|
+
this.hasher.update(encoder.encode(data));
|
|
6295
|
+
} else {
|
|
6296
|
+
this.hasher.update(data);
|
|
6297
|
+
}
|
|
6298
|
+
return this;
|
|
6299
|
+
}
|
|
6300
|
+
digest() {
|
|
6301
|
+
this.ensureUpdating();
|
|
6302
|
+
this.markFinalized();
|
|
6303
|
+
if (!this.hasher) throw new Error("Hasher not initialized");
|
|
6304
|
+
const hex = this.hasher.digest();
|
|
6305
|
+
const bytes = intToBytes(parseInt(hex, 16));
|
|
6306
|
+
return new Digest(this.algorithm, bytes);
|
|
6307
|
+
}
|
|
6308
|
+
reset() {
|
|
6309
|
+
if (!this.hasher) throw new Error("Hasher not initialized");
|
|
6310
|
+
this.hasher.init();
|
|
6311
|
+
this.markInitial();
|
|
6312
|
+
return this;
|
|
6313
|
+
}
|
|
6314
|
+
};
|
|
6020
6315
|
async function createStreamHasher(options = {}) {
|
|
6021
6316
|
const algorithm = options.algorithm ?? "xxh3-128" /* XXH3_128 */;
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6317
|
+
switch (algorithm) {
|
|
6318
|
+
case "sha256" /* SHA256 */:
|
|
6319
|
+
return new SHA256StreamHasher();
|
|
6320
|
+
case "xxh3-128" /* XXH3_128 */: {
|
|
6321
|
+
await initializeWasm();
|
|
6322
|
+
const wasmHasher = await createHasher3();
|
|
6323
|
+
return new XXH3StreamHasher(wasmHasher);
|
|
6324
|
+
}
|
|
6325
|
+
case "crc32" /* CRC32 */: {
|
|
6326
|
+
const hasher = new CRC32StreamHasher();
|
|
6327
|
+
await hasher.init();
|
|
6328
|
+
return hasher;
|
|
6329
|
+
}
|
|
6330
|
+
case "crc32c" /* CRC32C */: {
|
|
6331
|
+
const hasher = new CRC32CStreamHasher();
|
|
6332
|
+
await hasher.init();
|
|
6333
|
+
return hasher;
|
|
6334
|
+
}
|
|
6335
|
+
default:
|
|
6336
|
+
throw new UnsupportedAlgorithmError(algorithm, Object.values(Algorithm));
|
|
6029
6337
|
}
|
|
6030
|
-
throw new UnsupportedAlgorithmError(algorithm, ["sha256" /* SHA256 */, "xxh3-128" /* XXH3_128 */]);
|
|
6031
6338
|
}
|
|
6032
6339
|
|
|
6033
6340
|
// src/fulhash/index.ts
|
|
6034
|
-
|
|
6341
|
+
init_digest();
|
|
6342
|
+
init_errors();
|
|
6343
|
+
init_hash();
|
|
6035
6344
|
|
|
6036
6345
|
// src/pathfinder/types.ts
|
|
6037
6346
|
var EnforcementLevel = /* @__PURE__ */ ((EnforcementLevel2) => {
|