@fulmenhq/tsfulmen 0.1.6

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 (188) hide show
  1. package/CHANGELOG.md +616 -0
  2. package/LICENSE +57 -0
  3. package/README.md +674 -0
  4. package/config/crucible-ts/README.md +38 -0
  5. package/config/crucible-ts/library/foundry/country-codes.yaml +29 -0
  6. package/config/crucible-ts/library/foundry/exit-codes.snapshot.json +351 -0
  7. package/config/crucible-ts/library/foundry/exit-codes.yaml +483 -0
  8. package/config/crucible-ts/library/foundry/fixtures/signals/invalid/invalid-behavior.yaml +45 -0
  9. package/config/crucible-ts/library/foundry/fixtures/signals/invalid/invalid-exit-code.yaml +51 -0
  10. package/config/crucible-ts/library/foundry/fixtures/signals/invalid/malformed.yaml +44 -0
  11. package/config/crucible-ts/library/foundry/fixtures/signals/invalid/missing-required.yaml +36 -0
  12. package/config/crucible-ts/library/foundry/fixtures/signals/parity-snapshot.json +162 -0
  13. package/config/crucible-ts/library/foundry/fixtures/signals/valid/complete.yaml +314 -0
  14. package/config/crucible-ts/library/foundry/fixtures/signals/valid/custom-behavior.yaml +96 -0
  15. package/config/crucible-ts/library/foundry/fixtures/signals/valid/minimal.yaml +55 -0
  16. package/config/crucible-ts/library/foundry/http-statuses.yaml +148 -0
  17. package/config/crucible-ts/library/foundry/mime-types.yaml +39 -0
  18. package/config/crucible-ts/library/foundry/patterns.yaml +185 -0
  19. package/config/crucible-ts/library/foundry/signals.yaml +331 -0
  20. package/config/crucible-ts/library/foundry/similarity-fixtures.yaml +432 -0
  21. package/config/crucible-ts/library/foundry/simplified-modes.snapshot.json +117 -0
  22. package/config/crucible-ts/library/fulhash/fixtures.yaml +160 -0
  23. package/config/crucible-ts/library/v1.0.0/module-manifest.yaml +179 -0
  24. package/config/crucible-ts/repository/app-identity/app-identity.example.yaml +42 -0
  25. package/config/crucible-ts/repository/app-identity/fixtures/invalid/invalid-binary-name.yaml +7 -0
  26. package/config/crucible-ts/repository/app-identity/fixtures/invalid/invalid-env-prefix.yaml +7 -0
  27. package/config/crucible-ts/repository/app-identity/fixtures/invalid/invalid-vendor.yaml +7 -0
  28. package/config/crucible-ts/repository/app-identity/fixtures/invalid/malformed-yaml.yaml +8 -0
  29. package/config/crucible-ts/repository/app-identity/fixtures/invalid/missing-required.yaml +6 -0
  30. package/config/crucible-ts/repository/app-identity/fixtures/valid/complete.yaml +20 -0
  31. package/config/crucible-ts/repository/app-identity/fixtures/valid/minimal.yaml +7 -0
  32. package/config/crucible-ts/repository/app-identity/fixtures/valid/monorepo-api.yaml +10 -0
  33. package/config/crucible-ts/repository/app-identity/fixtures/valid/monorepo-worker.yaml +10 -0
  34. package/config/crucible-ts/repository/app-identity/parity-snapshot.json +125 -0
  35. package/config/crucible-ts/server/management/server-management.yaml +141 -0
  36. package/config/crucible-ts/sync/README.md +13 -0
  37. package/config/crucible-ts/sync/sync-keys.yaml +74 -0
  38. package/config/crucible-ts/taxonomy/languages.yaml +33 -0
  39. package/config/crucible-ts/taxonomy/metrics.yaml +115 -0
  40. package/config/crucible-ts/taxonomy/repository-categories.yaml +66 -0
  41. package/config/crucible-ts/terminal/v1.0.0/terminal-overrides-defaults.yaml +38 -0
  42. package/config/crucible-ts/web/branding/site-branding.yaml +21 -0
  43. package/config/crucible-ts/web/styling/site-styling.yaml +104 -0
  44. package/dist/appidentity/index.d.ts +304 -0
  45. package/dist/appidentity/index.js +5519 -0
  46. package/dist/appidentity/index.js.map +1 -0
  47. package/dist/config/index.d.ts +144 -0
  48. package/dist/config/index.js +5752 -0
  49. package/dist/config/index.js.map +1 -0
  50. package/dist/crucible/index.d.ts +78 -0
  51. package/dist/crucible/index.js +6038 -0
  52. package/dist/crucible/index.js.map +1 -0
  53. package/dist/docscribe/index.d.ts +110 -0
  54. package/dist/docscribe/index.js +682 -0
  55. package/dist/docscribe/index.js.map +1 -0
  56. package/dist/errors/index.d.ts +150 -0
  57. package/dist/errors/index.js +5583 -0
  58. package/dist/errors/index.js.map +1 -0
  59. package/dist/foundry/index.d.ts +1557 -0
  60. package/dist/foundry/index.js +5474 -0
  61. package/dist/foundry/index.js.map +1 -0
  62. package/dist/foundry/similarity/index.d.ts +17 -0
  63. package/dist/foundry/similarity/index.js +136 -0
  64. package/dist/foundry/similarity/index.js.map +1 -0
  65. package/dist/fulhash/index.d.ts +82 -0
  66. package/dist/fulhash/index.js +374 -0
  67. package/dist/fulhash/index.js.map +1 -0
  68. package/dist/fulmen-error-B_kX8jSC.d.ts +309 -0
  69. package/dist/index.d.ts +14 -0
  70. package/dist/index.js +6197 -0
  71. package/dist/index.js.map +1 -0
  72. package/dist/logger-JU2jYitA.d.ts +171 -0
  73. package/dist/logging/index.d.ts +198 -0
  74. package/dist/logging/index.js +578 -0
  75. package/dist/logging/index.js.map +1 -0
  76. package/dist/pathfinder/index.d.ts +532 -0
  77. package/dist/pathfinder/index.js +6750 -0
  78. package/dist/pathfinder/index.js.map +1 -0
  79. package/dist/registry-x1-Qi_Tz.d.ts +349 -0
  80. package/dist/schema/index.d.ts +388 -0
  81. package/dist/schema/index.js +5522 -0
  82. package/dist/schema/index.js.map +1 -0
  83. package/dist/suggest-CLqjLZ5L.d.ts +168 -0
  84. package/dist/telemetry/index.d.ts +161 -0
  85. package/dist/telemetry/index.js +5610 -0
  86. package/dist/telemetry/index.js.map +1 -0
  87. package/dist/types-B_WtvQbS.d.ts +214 -0
  88. package/package.json +130 -0
  89. package/schemas/crucible-ts/api/http/v1.0.0/README.md +22 -0
  90. package/schemas/crucible-ts/api/http/v1.0.0/error-response.schema.json +54 -0
  91. package/schemas/crucible-ts/api/http/v1.0.0/health-response.schema.json +70 -0
  92. package/schemas/crucible-ts/api/http/v1.0.0/success-response.schema.json +51 -0
  93. package/schemas/crucible-ts/api/http/v1.0.0/version-response.schema.json +61 -0
  94. package/schemas/crucible-ts/ascii/v1.0.0/README.md +69 -0
  95. package/schemas/crucible-ts/ascii/v1.0.0/box-chars.schema.json +60 -0
  96. package/schemas/crucible-ts/ascii/v1.0.0/string-analysis.schema.json +45 -0
  97. package/schemas/crucible-ts/assessment/README.md +25 -0
  98. package/schemas/crucible-ts/assessment/v1.0.0/severity-definitions.schema.json +60 -0
  99. package/schemas/crucible-ts/config/fulmen-ecosystem/v1.0.0/README.md +11 -0
  100. package/schemas/crucible-ts/config/fulmen-ecosystem/v1.0.0/fulmen-config-paths.schema.json +61 -0
  101. package/schemas/crucible-ts/config/goneat/README.md +60 -0
  102. package/schemas/crucible-ts/config/goneat/v1.0.0/dates.yaml +234 -0
  103. package/schemas/crucible-ts/config/goneat/v1.0.0/goneat-config.yaml +344 -0
  104. package/schemas/crucible-ts/config/goneat/v1.0.0/lifecycle-phase.json +20 -0
  105. package/schemas/crucible-ts/config/goneat/v1.0.0/release-phase.json +17 -0
  106. package/schemas/crucible-ts/config/goneat/v1.0.0/security-policy.yaml +178 -0
  107. package/schemas/crucible-ts/config/goneat/v1.0.0/version-policy.schema.yaml +205 -0
  108. package/schemas/crucible-ts/config/repository/app-identity/v1.0.0/app-identity.schema.json +143 -0
  109. package/schemas/crucible-ts/config/repository/v1.0.0/lifecycle-phase.json +20 -0
  110. package/schemas/crucible-ts/config/repository-category/codex/v1.0.0/codex-config.schema.json +288 -0
  111. package/schemas/crucible-ts/config/standards/v1.0.0/adr-adoption-status.json +60 -0
  112. package/schemas/crucible-ts/config/standards/v1.0.0/adr-frontmatter.schema.json +225 -0
  113. package/schemas/crucible-ts/config/standards/v1.0.0/adr-lifecycle-status.json +62 -0
  114. package/schemas/crucible-ts/config/sync-consumer-config.yaml +51 -0
  115. package/schemas/crucible-ts/config/sync-keys.schema.yaml +37 -0
  116. package/schemas/crucible-ts/content/README.md +19 -0
  117. package/schemas/crucible-ts/content/binary-embed-manifest/v1.0.0/README.md +13 -0
  118. package/schemas/crucible-ts/content/binary-embed-manifest/v1.0.0/binary-embed-manifest.schema.yaml +36 -0
  119. package/schemas/crucible-ts/content/embed-manifest/v1.1.0/README.md +13 -0
  120. package/schemas/crucible-ts/content/embed-manifest/v1.1.0/embed-manifest.schema.yaml +78 -0
  121. package/schemas/crucible-ts/content/ssot-provenance/v1.0.0/README.md +200 -0
  122. package/schemas/crucible-ts/content/ssot-provenance/v1.0.0/ssot-provenance.schema.json +128 -0
  123. package/schemas/crucible-ts/error-handling/v1.0.0/error-response.schema.json +75 -0
  124. package/schemas/crucible-ts/library/foundry/v1.0.0/country-codes.schema.json +58 -0
  125. package/schemas/crucible-ts/library/foundry/v1.0.0/exit-codes.schema.json +300 -0
  126. package/schemas/crucible-ts/library/foundry/v1.0.0/http-status-groups.schema.json +74 -0
  127. package/schemas/crucible-ts/library/foundry/v1.0.0/mime-types.schema.json +60 -0
  128. package/schemas/crucible-ts/library/foundry/v1.0.0/patterns.schema.json +97 -0
  129. package/schemas/crucible-ts/library/foundry/v1.0.0/signals.schema.json +457 -0
  130. package/schemas/crucible-ts/library/foundry/v1.0.0/similarity.schema.json +260 -0
  131. package/schemas/crucible-ts/library/foundry/v2.0.0/similarity.schema.json +558 -0
  132. package/schemas/crucible-ts/library/fulhash/v1.0.0/README.md +6 -0
  133. package/schemas/crucible-ts/library/fulhash/v1.0.0/checksum-string.schema.json +8 -0
  134. package/schemas/crucible-ts/library/fulhash/v1.0.0/digest.schema.json +100 -0
  135. package/schemas/crucible-ts/library/fulhash/v1.0.0/fixtures.schema.json +227 -0
  136. package/schemas/crucible-ts/library/module-manifest/v1.0.0/README.md +31 -0
  137. package/schemas/crucible-ts/library/module-manifest/v1.0.0/module-manifest.schema.json +132 -0
  138. package/schemas/crucible-ts/meta/README.md +23 -0
  139. package/schemas/crucible-ts/meta/draft-07/schema.json +245 -0
  140. package/schemas/crucible-ts/meta/draft-2020-12/meta/applicator.json +81 -0
  141. package/schemas/crucible-ts/meta/draft-2020-12/meta/content.json +21 -0
  142. package/schemas/crucible-ts/meta/draft-2020-12/meta/core.json +64 -0
  143. package/schemas/crucible-ts/meta/draft-2020-12/meta/format-annotation.json +15 -0
  144. package/schemas/crucible-ts/meta/draft-2020-12/meta/meta-data.json +35 -0
  145. package/schemas/crucible-ts/meta/draft-2020-12/meta/unevaluated.json +18 -0
  146. package/schemas/crucible-ts/meta/draft-2020-12/meta/validation.json +119 -0
  147. package/schemas/crucible-ts/meta/draft-2020-12/schema.json +80 -0
  148. package/schemas/crucible-ts/observability/logging/v1.0.0/README.md +82 -0
  149. package/schemas/crucible-ts/observability/logging/v1.0.0/definitions.schema.json +140 -0
  150. package/schemas/crucible-ts/observability/logging/v1.0.0/log-event.schema.json +179 -0
  151. package/schemas/crucible-ts/observability/logging/v1.0.0/logger-config.schema.json +518 -0
  152. package/schemas/crucible-ts/observability/logging/v1.0.0/logging-policy.schema.json +225 -0
  153. package/schemas/crucible-ts/observability/logging/v1.0.0/middleware-config.schema.json +181 -0
  154. package/schemas/crucible-ts/observability/logging/v1.0.0/severity-filter.schema.json +38 -0
  155. package/schemas/crucible-ts/observability/metrics/v1.0.0/metrics-event.schema.json +86 -0
  156. package/schemas/crucible-ts/pathfinder/v1.0.0/README.md +104 -0
  157. package/schemas/crucible-ts/pathfinder/v1.0.0/error-response.schema.json +35 -0
  158. package/schemas/crucible-ts/pathfinder/v1.0.0/find-query.schema.json +49 -0
  159. package/schemas/crucible-ts/pathfinder/v1.0.0/finder-config.schema.json +91 -0
  160. package/schemas/crucible-ts/pathfinder/v1.0.0/metadata.schema.json +61 -0
  161. package/schemas/crucible-ts/pathfinder/v1.0.0/path-constraint.schema.json +50 -0
  162. package/schemas/crucible-ts/pathfinder/v1.0.0/path-result.schema.json +40 -0
  163. package/schemas/crucible-ts/protocol/http/v1.0.0/README.md +22 -0
  164. package/schemas/crucible-ts/protocol/http/v1.0.0/error-response.schema.json +54 -0
  165. package/schemas/crucible-ts/protocol/http/v1.0.0/health-response.schema.json +70 -0
  166. package/schemas/crucible-ts/protocol/http/v1.0.0/success-response.schema.json +51 -0
  167. package/schemas/crucible-ts/protocol/http/v1.0.0/version-response.schema.json +61 -0
  168. package/schemas/crucible-ts/schema-validation/v1.0.0/README.md +65 -0
  169. package/schemas/crucible-ts/schema-validation/v1.0.0/schema-registry.schema.json +31 -0
  170. package/schemas/crucible-ts/schema-validation/v1.0.0/validator-config.schema.json +36 -0
  171. package/schemas/crucible-ts/server/management/v1.0.0/server-management.schema.json +199 -0
  172. package/schemas/crucible-ts/taxonomy/language/v1.0.0/README.md +30 -0
  173. package/schemas/crucible-ts/taxonomy/language/v1.0.0/language-key.schema.json +17 -0
  174. package/schemas/crucible-ts/taxonomy/language/v1.0.0/language-metadata.schema.json +44 -0
  175. package/schemas/crucible-ts/taxonomy/repository-category/v1.0.0/README.md +31 -0
  176. package/schemas/crucible-ts/taxonomy/repository-category/v1.0.0/category-key.schema.json +19 -0
  177. package/schemas/crucible-ts/taxonomy/repository-category/v1.0.0/category-metadata.schema.json +39 -0
  178. package/schemas/crucible-ts/terminal/v1.0.0/README.md +45 -0
  179. package/schemas/crucible-ts/terminal/v1.0.0/catalog/apple-terminal.yaml +2 -0
  180. package/schemas/crucible-ts/terminal/v1.0.0/catalog/ghostty.yaml +13 -0
  181. package/schemas/crucible-ts/terminal/v1.0.0/catalog/iterm2.yaml +13 -0
  182. package/schemas/crucible-ts/terminal/v1.0.0/schema.json +40 -0
  183. package/schemas/crucible-ts/tooling/external-tools/v1.0.0/README.md +164 -0
  184. package/schemas/crucible-ts/tooling/external-tools/v1.0.0/external-tools-manifest.schema.yaml +83 -0
  185. package/schemas/crucible-ts/tooling/goneat-tools/v1.0.0/README.md +177 -0
  186. package/schemas/crucible-ts/tooling/goneat-tools/v1.0.0/goneat-tools-config.schema.yaml +146 -0
  187. package/schemas/crucible-ts/web/branding/v1.0.0/site-branding.schema.json +79 -0
  188. package/schemas/crucible-ts/web/styling/v1.0.0/site-styling.schema.json +321 -0
@@ -0,0 +1,483 @@
1
+ $schema: https://schemas.fulmenhq.dev/library/foundry/v1.0.0/exit-codes.schema.json
2
+ description: Standard exit codes for Fulmen ecosystem tools and libraries
3
+ version: v1.0.0
4
+ categories:
5
+ - id: standard
6
+ name: Standard Exit Codes
7
+ description: POSIX standard success and generic failure codes
8
+ range:
9
+ min: 0
10
+ max: 1
11
+ codes:
12
+ - code: 0
13
+ name: EXIT_SUCCESS
14
+ description: Successful execution
15
+ context: Command completed without errors
16
+ - code: 1
17
+ name: EXIT_FAILURE
18
+ description: Generic failure (unspecified error)
19
+ context: Use when no more specific exit code applies
20
+ - id: networking
21
+ name: Networking & Port Management
22
+ description: Network-related failures (ports, connectivity, etc.)
23
+ range:
24
+ min: 10
25
+ max: 19
26
+ codes:
27
+ - code: 10
28
+ name: EXIT_PORT_IN_USE
29
+ description: Specified port is already in use
30
+ context: Server startup when port unavailable and fail_if_unavailable strategy
31
+ - code: 11
32
+ name: EXIT_PORT_RANGE_EXHAUSTED
33
+ description: No available ports in configured range
34
+ context: Server startup when all ports in environment range occupied
35
+ - code: 12
36
+ name: EXIT_INSTANCE_ALREADY_RUNNING
37
+ description: Another instance already running on target port
38
+ context: Server startup when PID registry shows active process on port
39
+ - code: 13
40
+ name: EXIT_NETWORK_UNREACHABLE
41
+ description: Network destination unreachable
42
+ context: Client connections, health checks, external service validation
43
+ - code: 14
44
+ name: EXIT_CONNECTION_REFUSED
45
+ description: Connection refused by remote host
46
+ context: Database connections, API endpoints, upstream services
47
+ - code: 15
48
+ name: EXIT_CONNECTION_TIMEOUT
49
+ description: Connection attempt timed out
50
+ context: Slow networks, unresponsive services, firewall blocks
51
+ - id: configuration
52
+ name: Configuration & Validation
53
+ description: Configuration errors, validation failures, version mismatches
54
+ range:
55
+ min: 20
56
+ max: 29
57
+ codes:
58
+ - code: 20
59
+ name: EXIT_CONFIG_INVALID
60
+ description: Configuration file failed validation
61
+ context: Startup validation, schema mismatches, invalid YAML/JSON
62
+ retry_hint: no_retry
63
+ - code: 21
64
+ name: EXIT_MISSING_DEPENDENCY
65
+ description: Required dependency not found
66
+ context: Missing binaries, libraries, or runtime requirements
67
+ retry_hint: investigate
68
+ - code: 22
69
+ name: EXIT_SSOT_VERSION_MISMATCH
70
+ description: SSOT (Crucible) version incompatible
71
+ context: Helper library detects unsupported Crucible version
72
+ retry_hint: no_retry
73
+ - code: 23
74
+ name: EXIT_CONFIG_FILE_NOT_FOUND
75
+ description: Required configuration file not found
76
+ context: Explicitly specified config path doesn't exist
77
+ - code: 24
78
+ name: EXIT_ENVIRONMENT_INVALID
79
+ description: Invalid or unsupported environment specification
80
+ context: Unknown environment name, missing environment config
81
+ - id: runtime
82
+ name: Runtime Errors
83
+ description: Errors during normal operation (health checks, database, etc.)
84
+ range:
85
+ min: 30
86
+ max: 39
87
+ codes:
88
+ - code: 30
89
+ name: EXIT_HEALTH_CHECK_FAILED
90
+ description: Health check endpoint returned non-healthy status
91
+ context: Startup health validation, readiness probes
92
+ retry_hint: retry
93
+ - code: 31
94
+ name: EXIT_DATABASE_UNAVAILABLE
95
+ description: Database connection failed or unavailable
96
+ context: Startup connection checks, critical query failures
97
+ retry_hint: retry
98
+ - code: 32
99
+ name: EXIT_EXTERNAL_SERVICE_UNAVAILABLE
100
+ description: Required external service unavailable
101
+ context: API dependencies, message queues, cache servers
102
+ - code: 33
103
+ name: EXIT_RESOURCE_EXHAUSTED
104
+ description: System resources exhausted (memory, disk, file descriptors)
105
+ context: Out-of-memory, disk full, too many open files
106
+ retry_hint: investigate
107
+ - code: 34
108
+ name: EXIT_OPERATION_TIMEOUT
109
+ description: Operation exceeded timeout threshold
110
+ context: Long-running tasks, async operations, batch processing
111
+ retry_hint: retry
112
+ - id: usage
113
+ name: Command-Line Usage Errors
114
+ description: Invalid arguments, missing required flags, usage errors
115
+ range:
116
+ min: 40
117
+ max: 49
118
+ codes:
119
+ - code: 40
120
+ name: EXIT_INVALID_ARGUMENT
121
+ description: Invalid command-line argument or flag value
122
+ context: Type errors, out-of-range values, malformed input
123
+ - code: 41
124
+ name: EXIT_MISSING_REQUIRED_ARGUMENT
125
+ description: Required command-line argument not provided
126
+ context: Missing --config, --port, or other required flags
127
+ - code: 64
128
+ name: EXIT_USAGE
129
+ description: Command-line usage error
130
+ context: BSD sysexits.h EX_USAGE - wrong number of arguments, bad syntax
131
+ bsd_equivalent: EX_USAGE
132
+ - id: permissions
133
+ name: Permissions & File Access
134
+ description: Permission denied, file not found, access errors
135
+ range:
136
+ min: 50
137
+ max: 59
138
+ codes:
139
+ - code: 50
140
+ name: EXIT_PERMISSION_DENIED
141
+ description: Insufficient permissions for operation
142
+ context: File access, port binding (<1024), privileged operations
143
+ - code: 51
144
+ name: EXIT_FILE_NOT_FOUND
145
+ description: Required file not found
146
+ context: Assets, templates, data files (not config - use 23)
147
+ - code: 52
148
+ name: EXIT_DIRECTORY_NOT_FOUND
149
+ description: Required directory not found
150
+ context: State directories, log paths, data directories
151
+ - code: 53
152
+ name: EXIT_FILE_READ_ERROR
153
+ description: Error reading file
154
+ context: Corrupt files, I/O errors, encoding issues
155
+ - code: 54
156
+ name: EXIT_FILE_WRITE_ERROR
157
+ description: Error writing file
158
+ context: Disk full, read-only filesystem, permission errors
159
+ - id: data
160
+ name: Data & Processing Errors
161
+ description: Data validation, parsing, transformation failures
162
+ range:
163
+ min: 60
164
+ max: 69
165
+ codes:
166
+ - code: 60
167
+ name: EXIT_DATA_INVALID
168
+ description: Input data failed validation
169
+ context: Schema validation, business rule violations
170
+ - code: 61
171
+ name: EXIT_PARSE_ERROR
172
+ description: Error parsing input data
173
+ context: Malformed JSON/YAML/XML, syntax errors
174
+ - code: 62
175
+ name: EXIT_TRANSFORMATION_FAILED
176
+ description: Data transformation or conversion failed
177
+ context: Type conversions, format transformations, encoding changes
178
+ - code: 63
179
+ name: EXIT_DATA_CORRUPT
180
+ description: Data corruption detected
181
+ context: Checksum failures, integrity violations
182
+ - id: security
183
+ name: Security & Authentication
184
+ description: Authentication failures, authorization errors, security violations
185
+ range:
186
+ min: 70
187
+ max: 79
188
+ codes:
189
+ - code: 70
190
+ name: EXIT_AUTHENTICATION_FAILED
191
+ description: Authentication failed
192
+ context: Invalid credentials, expired tokens, auth service unavailable
193
+ - code: 71
194
+ name: EXIT_AUTHORIZATION_FAILED
195
+ description: Authorization failed (authenticated but insufficient permissions)
196
+ context: RBAC failures, scope violations, resource access denied
197
+ - code: 72
198
+ name: EXIT_SECURITY_VIOLATION
199
+ description: Security policy violation detected
200
+ context: Suspicious activity, rate limit exceeded, IP blocklist
201
+ - code: 73
202
+ name: EXIT_CERTIFICATE_INVALID
203
+ description: TLS/SSL certificate validation failed
204
+ context: Expired certs, untrusted CAs, hostname mismatches
205
+ bsd_equivalent: EX_PROTOCOL
206
+ - id: observability
207
+ name: Observability & Monitoring
208
+ description: |
209
+ Observability infrastructure failures. Use when observability is CRITICAL
210
+ to operation (e.g., monitoring agents, telemetry exporters).
211
+
212
+ For workhorses where observability is auxiliary:
213
+ - Log warning and continue (don't exit)
214
+ - Emit degraded health status
215
+ - Only exit if explicitly configured (fail_on_observability_error: true)
216
+ range:
217
+ min: 80
218
+ max: 89
219
+ codes:
220
+ - code: 80
221
+ name: EXIT_METRICS_UNAVAILABLE
222
+ description: Metrics endpoint or collection system unavailable
223
+ context: |
224
+ Use for observability-focused tools (Prometheus exporters, StatsD agents).
225
+ Workhorses SHOULD log warning and continue unless configured to fail-fast.
226
+ - code: 81
227
+ name: EXIT_TRACING_FAILED
228
+ description: Distributed tracing system unavailable
229
+ context: OTLP exporter failed, Jaeger collector unreachable
230
+ - code: 82
231
+ name: EXIT_LOGGING_FAILED
232
+ description: Logging system unavailable or misconfigured
233
+ context: Log aggregator unreachable, log file unwritable
234
+ - code: 83
235
+ name: EXIT_ALERT_SYSTEM_FAILED
236
+ description: Alerting system unavailable
237
+ context: PagerDuty API failed, Slack webhook unreachable
238
+ - code: 84
239
+ name: EXIT_STRUCTURED_LOGGING_FAILED
240
+ description: Structured logging system unavailable
241
+ context: JSON log aggregator unreachable, log schema validation failed
242
+ - id: testing
243
+ name: Testing & Validation
244
+ description: |
245
+ Test execution outcomes and validation failures.
246
+
247
+ NOTE: Test harnesses MUST use EXIT_SUCCESS (0) for successful test runs
248
+ per ecosystem conventions (pytest, Go testing, Jest all use 0 for success).
249
+ Codes in this category are for FAILURES and exceptional conditions only.
250
+ range:
251
+ min: 91
252
+ max: 99
253
+ codes:
254
+ - code: 91
255
+ name: EXIT_TEST_FAILURE
256
+ description: One or more tests failed
257
+ context: |
258
+ Test assertions failed, expected behavior not met.
259
+ Maps to pytest exit code 1, Go test failure, Jest failure.
260
+ - code: 92
261
+ name: EXIT_TEST_ERROR
262
+ description: Test execution error (not test failure)
263
+ context: |
264
+ Test setup failed, fixture unavailable, test harness error.
265
+ Maps to pytest exit code 3 (internal error).
266
+ - code: 93
267
+ name: EXIT_TEST_INTERRUPTED
268
+ description: Test run interrupted by user or system
269
+ context: |
270
+ Ctrl+C during tests, system signal, user cancellation.
271
+ Maps to pytest exit code 2.
272
+ - code: 94
273
+ name: EXIT_TEST_USAGE_ERROR
274
+ description: Test command usage error
275
+ context: |
276
+ Invalid test arguments, bad configuration.
277
+ Maps to pytest exit code 4.
278
+ - code: 95
279
+ name: EXIT_TEST_NO_TESTS_COLLECTED
280
+ description: No tests found or all tests skipped
281
+ context: |
282
+ Empty test suite, all tests deselected or skipped.
283
+ Maps to pytest exit code 5.
284
+ - code: 96
285
+ name: EXIT_COVERAGE_THRESHOLD_NOT_MET
286
+ description: Test coverage below required threshold
287
+ context: Code coverage validation, quality gate failure
288
+ - id: signals
289
+ name: Signal-Induced Exits
290
+ description: |-
291
+ Process terminated by Unix signals (128+N pattern per POSIX).
292
+ Signal codes follow Linux numbering; macOS/FreeBSD differ for SIGUSR1/SIGUSR2.
293
+ For full signal semantics, see config/library/foundry/signals.yaml.
294
+ For signal handling patterns, see docs/standards/library/modules/signal-handling.md.
295
+ range:
296
+ min: 128
297
+ max: 165
298
+ codes:
299
+ - code: 129
300
+ name: EXIT_SIGNAL_HUP
301
+ description: Hangup signal (SIGHUP) - config reload via restart
302
+ context: |-
303
+ Config reload via restart-based pattern (mandatory schema validation).
304
+ Process exits with 129, supervisor restarts with new config.
305
+ See signals.yaml for reload behavior definition.
306
+ bsd_equivalent: "128 + 1"
307
+ signal_catalog: config/library/foundry/signals.yaml#hup
308
+ - code: 130
309
+ name: EXIT_SIGNAL_INT
310
+ description: Interrupt signal (SIGINT) - user interrupt with Ctrl+C double-tap
311
+ context: |-
312
+ Ctrl+C pressed. First tap initiates graceful shutdown, second within 2s forces immediate exit.
313
+ Same exit code (130) for both graceful and force modes.
314
+ See signals.yaml for double-tap behavior definition.
315
+ bsd_equivalent: "128 + 2"
316
+ signal_catalog: config/library/foundry/signals.yaml#int
317
+ - code: 131
318
+ name: EXIT_SIGNAL_QUIT
319
+ description: Quit signal (SIGQUIT) - immediate exit
320
+ context: |-
321
+ Ctrl+\ on Unix, Ctrl+Break on Windows. Immediate termination without cleanup.
322
+ Use for emergency shutdown or debugging (core dumps).
323
+ bsd_equivalent: "128 + 3"
324
+ signal_catalog: config/library/foundry/signals.yaml#quit
325
+ - code: 137
326
+ name: EXIT_SIGNAL_KILL
327
+ description: Kill signal (SIGKILL)
328
+ context: Forceful termination, non-graceful shutdown (not catchable)
329
+ bsd_equivalent: "128 + 9"
330
+ python_note: "Cannot be caught in Python (OS-level)"
331
+ - code: 141
332
+ name: EXIT_SIGNAL_PIPE
333
+ description: Broken pipe (SIGPIPE) - observe only
334
+ context: |-
335
+ Writing to closed pipe/socket. Fulmen default is observe_only (log + graceful exit).
336
+ Applications may override to ignore for network services.
337
+ See signals.yaml for SIGPIPE handling guidance.
338
+ bsd_equivalent: "128 + 13"
339
+ python_note: "Raised as BrokenPipeError exception"
340
+ signal_catalog: config/library/foundry/signals.yaml#pipe
341
+ - code: 142
342
+ name: EXIT_SIGNAL_ALRM
343
+ description: Alarm signal (SIGALRM) - watchdog timeout
344
+ context: |-
345
+ Watchdog timer expired. Treat as timeout-induced exit.
346
+ Watchdog pattern out of scope for v1.0.0 module implementations.
347
+ bsd_equivalent: "128 + 14"
348
+ python_note: "Supported by signal module, rarely used in practice"
349
+ signal_catalog: config/library/foundry/signals.yaml#alrm
350
+ - code: 143
351
+ name: EXIT_SIGNAL_TERM
352
+ description: Termination signal (SIGTERM) - graceful shutdown
353
+ context: |-
354
+ Graceful shutdown requested by container orchestrator or process supervisor.
355
+ Standard 30-second timeout for cleanup. Applications run cleanup handlers before exit.
356
+ See signals.yaml for graceful shutdown behavior definition.
357
+ bsd_equivalent: "128 + 15"
358
+ python_note: "Default signal for graceful shutdown"
359
+ signal_catalog: config/library/foundry/signals.yaml#term
360
+ - code: 138
361
+ name: EXIT_SIGNAL_USR1
362
+ description: User-defined signal 1 (SIGUSR1) - custom handler
363
+ context: |-
364
+ Application-specific signal (e.g., reopen logs, dump stats, trigger profiling).
365
+ Applications register custom handlers. Exit code 138 on Linux (128+10).
366
+ Platform differences: macOS/FreeBSD use signal 30 (exit 158), not 10.
367
+ linux_calculation: "128 + 10"
368
+ macos_calculation: "128 + 30 = 158"
369
+ signal_catalog: config/library/foundry/signals.yaml#usr1
370
+ - code: 140
371
+ name: EXIT_SIGNAL_USR2
372
+ description: User-defined signal 2 (SIGUSR2) - custom handler
373
+ context: |-
374
+ Application-specific signal (e.g., toggle debug mode, rotate credentials).
375
+ Applications register custom handlers. Exit code 140 on Linux (128+12).
376
+ Platform differences: macOS/FreeBSD use signal 31 (exit 159), not 12.
377
+ linux_calculation: "128 + 12"
378
+ macos_calculation: "128 + 31 = 159"
379
+ signal_catalog: config/library/foundry/signals.yaml#usr2
380
+ bsd_compatibility:
381
+ description: |
382
+ BSD sysexits.h compatibility mapping. Some BSD codes conflict with Fulmen
383
+ ranges or are functionally redundant. We provide pragmatic mappings to
384
+ maintain BSD compatibility while preserving Fulmen's semantic categories.
385
+ mappings:
386
+ - bsd_code: 64
387
+ bsd_name: EX_USAGE
388
+ fulmen_code: 64
389
+ fulmen_name: EXIT_USAGE
390
+ category: usage
391
+ notes: |
392
+ Code 64 breaks the usage category range (40-49) but preserved for BSD
393
+ compatibility. Applications expecting BSD exit codes can use 64 directly.
394
+ - bsd_code: 71
395
+ bsd_name: EX_OSERR
396
+ fulmen_code: 33
397
+ fulmen_name: EXIT_RESOURCE_EXHAUSTED
398
+ category: runtime
399
+ notes: |
400
+ BSD EX_OSERR (71) conflicts with EXIT_AUTHORIZATION_FAILED (71) in security
401
+ category. Pragmatically mapped to RESOURCE_EXHAUSTED (33) as OS errors
402
+ often manifest as resource exhaustion (memory, file descriptors, etc.).
403
+ - bsd_code: 74
404
+ bsd_name: EX_IOERR
405
+ fulmen_code: 54
406
+ fulmen_name: EXIT_FILE_WRITE_ERROR
407
+ category: permissions
408
+ notes: |
409
+ BSD EX_IOERR (74) mapped to FILE_WRITE_ERROR (54). I/O errors in BSD
410
+ context typically involve file operations. For read errors, use
411
+ EXIT_FILE_READ_ERROR (53).
412
+ - bsd_code: 75
413
+ bsd_name: EX_TEMPFAIL
414
+ fulmen_code: 34
415
+ fulmen_name: EXIT_OPERATION_TIMEOUT
416
+ category: runtime
417
+ notes: |
418
+ BSD EX_TEMPFAIL (75) indicates temporary failure (retry later). Mapped to
419
+ OPERATION_TIMEOUT (34) as temporary failures often involve timeouts.
420
+ Alternative: EXIT_EXTERNAL_SERVICE_UNAVAILABLE (32) for service issues.
421
+ extensions:
422
+ ranges:
423
+ - range:
424
+ min: 100
425
+ max: 127
426
+ purpose: Reserved for application-specific codes (workhorse breeds, tools)
427
+ sizing_guidance: |
428
+ 28 codes sufficient for most workhorses:
429
+ - Simple workhorse (CLI + basic server): 5-10 codes
430
+ - Moderate workhorse (multiple integrations): 15-20 codes
431
+ - Complex workhorse (platform/orchestrator): 20-25 codes
432
+ If you need more than 25 codes, consider using user-defined range (192-254)
433
+ or re-evaluate if generic codes can replace app-specific ones.
434
+ - range:
435
+ min: 166
436
+ max: 191
437
+ purpose: Reserved for future signal extensions (128-165 used for standard signals)
438
+ - range:
439
+ min: 192
440
+ max: 254
441
+ purpose: Reserved for user-defined codes in application configs
442
+ simplified_modes:
443
+ - id: basic
444
+ name: Basic Exit Codes
445
+ description: Minimal exit code set for simple scripts and novice-friendly tools
446
+ mappings:
447
+ - simplified_code: 0
448
+ simplified_name: SUCCESS
449
+ maps_from: [0]
450
+ - simplified_code: 1
451
+ simplified_name: ERROR
452
+ maps_from: [1, 10, 11, 12, 13, 14, 15, 20, 21, 22, 23, 24, 30, 31, 32, 33, 34, 40, 41, 50, 51, 52, 53, 54, 60, 61, 62, 63, 70, 71, 72, 73, 80, 81, 82, 83, 84, 91, 92, 93, 94, 95, 96, 129, 130, 131, 137, 138, 140, 141, 142, 143]
453
+ - simplified_code: 2
454
+ simplified_name: USAGE_ERROR
455
+ maps_from: [64]
456
+ - id: severity
457
+ name: Severity-Based Exit Codes
458
+ description: Exit codes grouped by severity level for intermediate users
459
+ mappings:
460
+ - simplified_code: 0
461
+ simplified_name: SUCCESS
462
+ maps_from: [0]
463
+ - simplified_code: 1
464
+ simplified_name: USER_ERROR
465
+ maps_from: [40, 41, 64]
466
+ - simplified_code: 2
467
+ simplified_name: CONFIG_ERROR
468
+ maps_from: [20, 21, 22, 23, 24]
469
+ - simplified_code: 3
470
+ simplified_name: RUNTIME_ERROR
471
+ maps_from: [30, 31, 32, 33, 34, 60, 61, 62, 63]
472
+ - simplified_code: 4
473
+ simplified_name: SYSTEM_ERROR
474
+ maps_from: [10, 11, 12, 13, 14, 15, 50, 51, 52, 53, 54, 129, 130, 131, 137, 138, 140, 141, 142, 143]
475
+ - simplified_code: 5
476
+ simplified_name: SECURITY_ERROR
477
+ maps_from: [70, 71, 72, 73]
478
+ - simplified_code: 6
479
+ simplified_name: TEST_FAILURE
480
+ maps_from: [91, 92, 93, 94, 95, 96]
481
+ - simplified_code: 7
482
+ simplified_name: OBSERVABILITY_ERROR
483
+ maps_from: [80, 81, 82, 83, 84]
@@ -0,0 +1,45 @@
1
+ $schema: https://schemas.fulmenhq.dev/library/foundry/v1.0.0/signals.schema.json
2
+ description: Invalid signal configuration - unknown behavior
3
+ version: v1.0.0
4
+ signals:
5
+ - id: term
6
+ name: SIGTERM
7
+ unix_number: 15
8
+ description: Graceful termination
9
+ default_behavior: unknown_behavior # INVALID: not a valid behavior
10
+ exit_code: 143
11
+ - id: int
12
+ name: SIGINT
13
+ unix_number: 2
14
+ description: User interrupt
15
+ default_behavior: force_kill # INVALID: not a valid behavior
16
+ exit_code: 130
17
+ - id: hup
18
+ name: SIGHUP
19
+ unix_number: 1
20
+ description: Hangup signal
21
+ default_behavior: reload_via_restart
22
+ exit_code: 129
23
+ behaviors:
24
+ - id: reload_via_restart
25
+ name: Reload via Restart
26
+ description: Restart process
27
+ phases:
28
+ - name: exit
29
+ description: Exit for restart
30
+ os_mappings:
31
+ unix:
32
+ SIGTERM: 15
33
+ SIGINT: 2
34
+ SIGHUP: 1
35
+ windows:
36
+ CTRL_C_EVENT: 0
37
+ signal_to_event:
38
+ SIGTERM: null
39
+ SIGINT: CTRL_C_EVENT
40
+ SIGHUP: null
41
+ exit_codes:
42
+ SIGTERM: 143
43
+ SIGINT: 130
44
+ SIGHUP: 129
45
+ note: Exit codes follow POSIX 128+N pattern
@@ -0,0 +1,51 @@
1
+ $schema: https://schemas.fulmenhq.dev/library/foundry/v1.0.0/signals.schema.json
2
+ description: Invalid signal configuration - exit code out of range
3
+ version: v1.0.0
4
+ signals:
5
+ - id: term
6
+ name: SIGTERM
7
+ unix_number: 15
8
+ description: Graceful termination
9
+ default_behavior: graceful_shutdown
10
+ exit_code: 300 # INVALID: exit codes must be 0-255
11
+ - id: int
12
+ name: SIGINT
13
+ unix_number: 2
14
+ description: User interrupt
15
+ default_behavior: graceful_shutdown
16
+ exit_code: -1 # INVALID: negative exit code
17
+ - id: hup
18
+ name: SIGHUP
19
+ unix_number: 1
20
+ description: Hangup signal
21
+ default_behavior: reload_via_restart
22
+ exit_code: 129
23
+ behaviors:
24
+ - id: graceful_shutdown
25
+ name: Graceful Shutdown
26
+ description: Clean shutdown
27
+ phases:
28
+ - name: exit
29
+ description: Exit with code
30
+ - id: reload_via_restart
31
+ name: Reload via Restart
32
+ description: Restart process
33
+ phases:
34
+ - name: exit
35
+ description: Exit for restart
36
+ os_mappings:
37
+ unix:
38
+ SIGTERM: 15
39
+ SIGINT: 2
40
+ SIGHUP: 1
41
+ windows:
42
+ CTRL_C_EVENT: 0
43
+ signal_to_event:
44
+ SIGTERM: null
45
+ SIGINT: CTRL_C_EVENT
46
+ SIGHUP: null
47
+ exit_codes:
48
+ SIGTERM: 300
49
+ SIGINT: -1
50
+ SIGHUP: 129
51
+ note: Exit codes should follow POSIX 128+N pattern
@@ -0,0 +1,44 @@
1
+ $schema: https://schemas.fulmenhq.dev/library/foundry/v1.0.0/signals.schema.json
2
+ description: Invalid signal configuration - malformed YAML
3
+ version: v1.0.0
4
+
5
+ signals:
6
+ - id: term
7
+ name: SIGTERM
8
+ unix_number: 15
9
+ description: Graceful termination
10
+ default_behavior: graceful_shutdown
11
+ exit_code: 143
12
+
13
+ - id: int
14
+ name: SIGINT
15
+ unix_number: 2
16
+ description: User interrupt
17
+ default_behavior: graceful_shutdown
18
+ exit_code: 130
19
+ # INVALID YAML: incorrect indentation below
20
+ extra_field
21
+ nested_wrong: value
22
+
23
+ behaviors:
24
+ - id: graceful_shutdown
25
+ name: Graceful Shutdown
26
+ description: Clean shutdown
27
+ phases:
28
+ - name: exit
29
+ description: Exit with code
30
+
31
+ os_mappings:
32
+ unix:
33
+ SIGTERM: 15
34
+ SIGINT: 2
35
+ windows:
36
+ CTRL_C_EVENT: 0
37
+ signal_to_event:
38
+ SIGTERM: null
39
+ SIGINT: CTRL_C_EVENT
40
+
41
+ exit_codes:
42
+ SIGTERM: 143
43
+ SIGINT: 130
44
+ note: Exit codes follow POSIX 128+N pattern
@@ -0,0 +1,36 @@
1
+ $schema: https://schemas.fulmenhq.dev/library/foundry/v1.0.0/signals.schema.json
2
+ description: Invalid signal configuration - missing required fields
3
+ version: v1.0.0
4
+ signals:
5
+ - id: term
6
+ name: SIGTERM
7
+ unix_number: 15
8
+ # MISSING: description
9
+ default_behavior: graceful_shutdown
10
+ exit_code: 143
11
+ - id: int
12
+ # MISSING: name
13
+ unix_number: 2
14
+ description: User interrupt
15
+ default_behavior: graceful_shutdown
16
+ exit_code: 130
17
+ behaviors:
18
+ - id: graceful_shutdown
19
+ name: Graceful Shutdown
20
+ description: Clean shutdown
21
+ phases:
22
+ - name: exit
23
+ description: Exit with code
24
+ os_mappings:
25
+ unix:
26
+ SIGTERM: 15
27
+ SIGINT: 2
28
+ windows:
29
+ CTRL_C_EVENT: 0
30
+ signal_to_event:
31
+ SIGTERM: null
32
+ SIGINT: CTRL_C_EVENT
33
+ exit_codes:
34
+ SIGTERM: 143
35
+ SIGINT: 130
36
+ note: Exit codes follow POSIX 128+N pattern