@unifyplane/logsdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/README.md +18 -0
  2. package/contracts/repo.capabilities.json +12 -0
  3. package/contracts/repo.runtime.json +49 -0
  4. package/contracts/schemas/repo/repo.runtime.v1.schema.json +134 -0
  5. package/dist/core/clock.d.ts +3 -0
  6. package/dist/core/clock.d.ts.map +1 -0
  7. package/dist/core/clock.js +21 -0
  8. package/dist/core/clock.js.map +1 -0
  9. package/dist/core/context.d.ts +10 -0
  10. package/dist/core/context.d.ts.map +1 -0
  11. package/dist/core/context.js +100 -0
  12. package/dist/core/context.js.map +1 -0
  13. package/dist/core/fanout.d.ts +4 -0
  14. package/dist/core/fanout.d.ts.map +1 -0
  15. package/dist/core/fanout.js +32 -0
  16. package/dist/core/fanout.js.map +1 -0
  17. package/dist/core/ids.d.ts +6 -0
  18. package/dist/core/ids.d.ts.map +1 -0
  19. package/dist/core/ids.js +27 -0
  20. package/dist/core/ids.js.map +1 -0
  21. package/dist/core/message_constraints.d.ts +4 -0
  22. package/dist/core/message_constraints.d.ts.map +1 -0
  23. package/dist/core/message_constraints.js +53 -0
  24. package/dist/core/message_constraints.js.map +1 -0
  25. package/dist/core/outcomes.d.ts +5 -0
  26. package/dist/core/outcomes.d.ts.map +1 -0
  27. package/dist/core/outcomes.js +4 -0
  28. package/dist/core/outcomes.js.map +1 -0
  29. package/dist/core/record_builder.d.ts +34 -0
  30. package/dist/core/record_builder.d.ts.map +1 -0
  31. package/dist/core/record_builder.js +188 -0
  32. package/dist/core/record_builder.js.map +1 -0
  33. package/dist/core/spool.d.ts +4 -0
  34. package/dist/core/spool.d.ts.map +1 -0
  35. package/dist/core/spool.js +31 -0
  36. package/dist/core/spool.js.map +1 -0
  37. package/dist/core/types.d.ts +33 -0
  38. package/dist/core/types.d.ts.map +1 -0
  39. package/dist/core/types.js +4 -0
  40. package/dist/core/types.js.map +1 -0
  41. package/dist/esm/core/clock.js +21 -0
  42. package/dist/esm/core/clock.js.map +1 -0
  43. package/dist/esm/core/context.js +100 -0
  44. package/dist/esm/core/context.js.map +1 -0
  45. package/dist/esm/core/fanout.js +32 -0
  46. package/dist/esm/core/fanout.js.map +1 -0
  47. package/dist/esm/core/ids.js +27 -0
  48. package/dist/esm/core/ids.js.map +1 -0
  49. package/dist/esm/core/message_constraints.js +53 -0
  50. package/dist/esm/core/message_constraints.js.map +1 -0
  51. package/dist/esm/core/outcomes.js +4 -0
  52. package/dist/esm/core/outcomes.js.map +1 -0
  53. package/dist/esm/core/record_builder.js +188 -0
  54. package/dist/esm/core/record_builder.js.map +1 -0
  55. package/dist/esm/core/spool.js +31 -0
  56. package/dist/esm/core/spool.js.map +1 -0
  57. package/dist/esm/core/types.js +4 -0
  58. package/dist/esm/core/types.js.map +1 -0
  59. package/dist/esm/index.js +52 -0
  60. package/dist/esm/index.js.map +1 -0
  61. package/dist/esm/sinks/file_ndjson.js +29 -0
  62. package/dist/esm/sinks/file_ndjson.js.map +1 -0
  63. package/dist/esm/sinks/file_ndjson_sink.js +36 -0
  64. package/dist/esm/sinks/file_ndjson_sink.js.map +1 -0
  65. package/dist/esm/sinks/sink_types.js +2 -0
  66. package/dist/esm/sinks/sink_types.js.map +1 -0
  67. package/dist/esm/sinks/stdout_sink.js +15 -0
  68. package/dist/esm/sinks/stdout_sink.js.map +1 -0
  69. package/dist/esm/validate/api_surface_guard.js +63 -0
  70. package/dist/esm/validate/api_surface_guard.js.map +1 -0
  71. package/dist/esm/validate/noncompliance.js +17 -0
  72. package/dist/esm/validate/noncompliance.js.map +1 -0
  73. package/dist/esm/validate/schema_guard.js +151 -0
  74. package/dist/esm/validate/schema_guard.js.map +1 -0
  75. package/dist/index.d.ts +26 -0
  76. package/dist/index.d.ts.map +1 -0
  77. package/dist/index.js +52 -0
  78. package/dist/index.js.map +1 -0
  79. package/dist/sinks/file_ndjson.d.ts +18 -0
  80. package/dist/sinks/file_ndjson.d.ts.map +1 -0
  81. package/dist/sinks/file_ndjson.js +29 -0
  82. package/dist/sinks/file_ndjson.js.map +1 -0
  83. package/dist/sinks/file_ndjson_sink.d.ts +7 -0
  84. package/dist/sinks/file_ndjson_sink.d.ts.map +1 -0
  85. package/dist/sinks/file_ndjson_sink.js +36 -0
  86. package/dist/sinks/file_ndjson_sink.js.map +1 -0
  87. package/dist/sinks/sink_types.d.ts +12 -0
  88. package/dist/sinks/sink_types.d.ts.map +1 -0
  89. package/dist/sinks/sink_types.js +2 -0
  90. package/dist/sinks/sink_types.js.map +1 -0
  91. package/dist/sinks/stdout_sink.d.ts +6 -0
  92. package/dist/sinks/stdout_sink.d.ts.map +1 -0
  93. package/dist/sinks/stdout_sink.js +15 -0
  94. package/dist/sinks/stdout_sink.js.map +1 -0
  95. package/dist/types/core/clock.d.ts +3 -0
  96. package/dist/types/core/clock.d.ts.map +1 -0
  97. package/dist/types/core/context.d.ts +10 -0
  98. package/dist/types/core/context.d.ts.map +1 -0
  99. package/dist/types/core/fanout.d.ts +4 -0
  100. package/dist/types/core/fanout.d.ts.map +1 -0
  101. package/dist/types/core/ids.d.ts +6 -0
  102. package/dist/types/core/ids.d.ts.map +1 -0
  103. package/dist/types/core/message_constraints.d.ts +4 -0
  104. package/dist/types/core/message_constraints.d.ts.map +1 -0
  105. package/dist/types/core/outcomes.d.ts +5 -0
  106. package/dist/types/core/outcomes.d.ts.map +1 -0
  107. package/dist/types/core/record_builder.d.ts +34 -0
  108. package/dist/types/core/record_builder.d.ts.map +1 -0
  109. package/dist/types/core/spool.d.ts +4 -0
  110. package/dist/types/core/spool.d.ts.map +1 -0
  111. package/dist/types/core/types.d.ts +33 -0
  112. package/dist/types/core/types.d.ts.map +1 -0
  113. package/dist/types/index.d.ts +26 -0
  114. package/dist/types/index.d.ts.map +1 -0
  115. package/dist/types/sinks/file_ndjson.d.ts +18 -0
  116. package/dist/types/sinks/file_ndjson.d.ts.map +1 -0
  117. package/dist/types/sinks/file_ndjson_sink.d.ts +7 -0
  118. package/dist/types/sinks/file_ndjson_sink.d.ts.map +1 -0
  119. package/dist/types/sinks/sink_types.d.ts +12 -0
  120. package/dist/types/sinks/sink_types.d.ts.map +1 -0
  121. package/dist/types/sinks/stdout_sink.d.ts +6 -0
  122. package/dist/types/sinks/stdout_sink.d.ts.map +1 -0
  123. package/dist/types/validate/api_surface_guard.d.ts +2 -0
  124. package/dist/types/validate/api_surface_guard.d.ts.map +1 -0
  125. package/dist/types/validate/noncompliance.d.ts +15 -0
  126. package/dist/types/validate/noncompliance.d.ts.map +1 -0
  127. package/dist/types/validate/schema_guard.d.ts +5 -0
  128. package/dist/types/validate/schema_guard.d.ts.map +1 -0
  129. package/dist/validate/api_surface_guard.d.ts +2 -0
  130. package/dist/validate/api_surface_guard.d.ts.map +1 -0
  131. package/dist/validate/api_surface_guard.js +63 -0
  132. package/dist/validate/api_surface_guard.js.map +1 -0
  133. package/dist/validate/noncompliance.d.ts +15 -0
  134. package/dist/validate/noncompliance.d.ts.map +1 -0
  135. package/dist/validate/noncompliance.js +17 -0
  136. package/dist/validate/noncompliance.js.map +1 -0
  137. package/dist/validate/schema_guard.d.ts +5 -0
  138. package/dist/validate/schema_guard.d.ts.map +1 -0
  139. package/dist/validate/schema_guard.js +151 -0
  140. package/dist/validate/schema_guard.js.map +1 -0
  141. package/evidence/audit/llm/llm_audit_report_2026-01-25T15-11-32Z.json +30 -0
  142. package/evidence/audit/llm/llm_audit_report_2026-01-25T15-53-20Z.json +154 -0
  143. package/evidence/audit/llm/llm_audit_report_2026-01-25T16-14-52Z.json +130 -0
  144. package/evidence/audit/llm/llm_audit_report_2026-01-25T16-15-42Z.json +152 -0
  145. package/evidence/audit/llm/llm_audit_report_2026-01-25T16-17-39Z.json +152 -0
  146. package/evidence/audit/llm/llm_audit_report_2026-01-25T16-18-51Z.json +152 -0
  147. package/evidence/audit/llm/llm_audit_report_2026-01-25T16-19-50Z.json +152 -0
  148. package/evidence/audit/llm/llm_audit_report_2026-01-25T16-20-36Z.json +152 -0
  149. package/evidence/audit/llm/llm_audit_report_2026-01-25T23-22-43Z.json +170 -0
  150. package/evidence/audit/llm/llm_audit_report_2026-01-25T23-39-03Z.json +157 -0
  151. package/filestructure.output.txt +73 -0
  152. package/package.json +16 -0
  153. package/src/core/clock.ts +25 -0
  154. package/src/core/context.ts +142 -0
  155. package/src/core/fanout.ts +38 -0
  156. package/src/core/ids.ts +35 -0
  157. package/src/core/message_constraints.ts +66 -0
  158. package/src/core/outcomes.ts +5 -0
  159. package/src/core/record_builder.ts +269 -0
  160. package/src/core/spool.ts +41 -0
  161. package/src/core/types.ts +56 -0
  162. package/src/index.ts +105 -0
  163. package/src/sinks/file_ndjson.ts +42 -0
  164. package/src/sinks/file_ndjson_sink.ts +45 -0
  165. package/src/sinks/sink_types.ts +15 -0
  166. package/src/sinks/stdout_sink.ts +20 -0
  167. package/src/validate/api_surface_guard.ts +106 -0
  168. package/src/validate/noncompliance.ts +33 -0
  169. package/src/validate/schema_guard.ts +242 -0
  170. package/unifyplane-logsdk-0.1.0.tgz +0 -0
@@ -0,0 +1,152 @@
1
+ {
2
+ "repo": {
3
+ "path": "C:\\Ananda\\projects\\unifyplane\\LogSDK",
4
+ "name": "@unifyplane/logsdk",
5
+ "runtime_manifest": "contracts/repo.runtime.json"
6
+ },
7
+ "audit_input_path": "C:\\Ananda\\projects\\unifyplane\\LogSDK",
8
+ "audit_root": "C:\\Ananda\\projects\\unifyplane\\LogSDK",
9
+ "generated_at_utc": "2026-01-25T16:20:36Z",
10
+ "overall_status": "PASS",
11
+ "blocking_failure": null,
12
+ "runtime_contract": {
13
+ "exists": true,
14
+ "path": "contracts/repo.runtime.json",
15
+ "schema_path": "contracts\\schemas\\repo\\repo.runtime.v1.schema.json",
16
+ "valid": true,
17
+ "record_version": "repo.runtime.v1",
18
+ "authoritative_repo_role": "enterprise-substrate-logging",
19
+ "repo_role": "enterprise-substrate-logging",
20
+ "repo_id": "unifyplane-logsdk",
21
+ "module_system": "esm",
22
+ "node_target": "node22",
23
+ "tsconfig_path": "tsconfig.json",
24
+ "dist_entry": "dist/index.js",
25
+ "json_strategy": "esm-import"
26
+ },
27
+ "derived_runtime_diagnostics": {
28
+ "signals": {
29
+ "audit_root_resolution": "Starting at C:\\Ananda\\projects\\unifyplane\\LogSDK (package.json located here)",
30
+ "package_json_type": "module",
31
+ "tsconfig_module": "NodeNext",
32
+ "tsconfig_moduleResolution": "NodeNext",
33
+ "dist_require_matches": true,
34
+ "dist_import_matches": true,
35
+ "dist_export_matches": true,
36
+ "dist_has_contracts_dir": false,
37
+ "dist_has_schemas_dir": false
38
+ },
39
+ "surfaces": {
40
+ "agents_md": true,
41
+ "package_json": true,
42
+ "tsconfig_json": true,
43
+ "src_dir": true,
44
+ "app_dir": false,
45
+ "plans_dir": false,
46
+ "tools_dir": true,
47
+ "tests_dir": true,
48
+ "contracts_dir": true,
49
+ "evidence_dir": true,
50
+ "dist_dir": true
51
+ }
52
+ },
53
+ "rule_findings": [
54
+ {
55
+ "rule_id": "BUILD-DIST-001",
56
+ "status": "PASS",
57
+ "scope": "REPO_STATIC",
58
+ "evidence": "dist/ directory exists with compiled artifacts such as dist/index.js"
59
+ },
60
+ {
61
+ "rule_id": "DEP-SDK-001",
62
+ "status": "PASS",
63
+ "scope": "REPO_STATIC",
64
+ "evidence": "package.json declares no dependencies and dependency_policy.mode=workspace-allowed"
65
+ },
66
+ {
67
+ "rule_id": "DIST-ENTRY-001",
68
+ "status": "PASS",
69
+ "scope": "RUNTIME_CONTRACT",
70
+ "evidence": "runtime manifest dist_entry=dist/index.js and the file exists"
71
+ },
72
+ {
73
+ "rule_id": "LOG-FORB-001",
74
+ "status": "PASS",
75
+ "scope": "REPO_STATIC",
76
+ "evidence": "rg -n console\\\\.log src dist produced no matches, so no adhoc console logging"
77
+ },
78
+ {
79
+ "rule_id": "META-RUNTIME-001",
80
+ "status": "PASS",
81
+ "scope": "RUNTIME_CONTRACT",
82
+ "evidence": "contracts/repo.runtime.json is present"
83
+ },
84
+ {
85
+ "rule_id": "META-RUNTIME-002",
86
+ "status": "PASS",
87
+ "scope": "RUNTIME_CONTRACT",
88
+ "evidence": "Derived schema contracts\\schemas\\repo\\repo.runtime.v1.schema.json exists"
89
+ },
90
+ {
91
+ "rule_id": "META-RUNTIME-003",
92
+ "status": "PASS",
93
+ "scope": "RUNTIME_CONTRACT",
94
+ "evidence": "Runtime contract satisfies the schema constraints (required keys, enums, ajv structure, etc.)"
95
+ },
96
+ {
97
+ "rule_id": "META-RUNTIME-004",
98
+ "status": "PASS",
99
+ "scope": "RUNTIME_CONTRACT",
100
+ "evidence": "record_version equals repo.runtime.v1"
101
+ },
102
+ {
103
+ "rule_id": "MOD-CJS-001",
104
+ "status": "NOT_APPLICABLE",
105
+ "scope": "RUNTIME_CONTRACT",
106
+ "evidence": "Module system is declared as esm so CJS-specific requirement is not evaluated"
107
+ },
108
+ {
109
+ "rule_id": "MOD-CJS-002",
110
+ "status": "NOT_APPLICABLE",
111
+ "scope": "RUNTIME_CONTRACT",
112
+ "evidence": "Module system is declared as esm so CJS-specific requirement is not evaluated"
113
+ },
114
+ {
115
+ "rule_id": "MOD-CJS-003",
116
+ "status": "NOT_APPLICABLE",
117
+ "scope": "RUNTIME_CONTRACT",
118
+ "evidence": "Module system is declared as esm so CJS-specific requirement is not evaluated"
119
+ },
120
+ {
121
+ "rule_id": "MOD-ESM-001",
122
+ "status": "PASS",
123
+ "scope": "RUNTIME_CONTRACT",
124
+ "evidence": "dist/index.js uses static ESM imports/exports with .js extensions"
125
+ },
126
+ {
127
+ "rule_id": "MOD-ESM-002",
128
+ "status": "PASS",
129
+ "scope": "RUNTIME_CONTRACT",
130
+ "evidence": "tsconfig.json module and moduleResolution are both NodeNext"
131
+ },
132
+ {
133
+ "rule_id": "TEST-SEM-001",
134
+ "status": "GAP",
135
+ "scope": "REPO_STATIC",
136
+ "evidence": "Cannot confirm dist-aligned tests because npm/node commands are disallowed by instructions"
137
+ },
138
+ {
139
+ "rule_id": "TOOL-PURITY-001",
140
+ "status": "PASS",
141
+ "scope": "REPO_STATIC",
142
+ "evidence": "tools/ contains only the test_results helper folder, so tooling does not pollute runtime dist artifacts"
143
+ }
144
+ ],
145
+ "summary": {
146
+ "blocking_failure": null,
147
+ "violation_count": 0,
148
+ "gap_count": 1,
149
+ "overall_status": "PASS",
150
+ "explicit_violations": []
151
+ }
152
+ }
@@ -0,0 +1,170 @@
1
+ {
2
+ "repo": {
3
+ "name": "@unifyplane/logsdk",
4
+ "id": "unifyplane-logsdk",
5
+ "root": "C:\\Ananda\\projects\\unifyplane\\LogSDK"
6
+ },
7
+ "audit_input_path": "C:\\Ananda\\projects\\unifyplane\\LogSDK",
8
+ "audit_root": "C:\\Ananda\\projects\\unifyplane\\LogSDK",
9
+ "generated_at_utc": "2026-01-25T23-22-43Z",
10
+ "overall_status": "FAIL",
11
+ "blocking_failure": null,
12
+ "runtime_contract": {
13
+ "Exists": true,
14
+ "Path": "contracts/repo.runtime.json",
15
+ "RecordVersion": "repo.runtime.v1",
16
+ "RepoRole": "enterprise-substrate-logging",
17
+ "SchemaPath": "contracts/schemas/repo/repo.runtime.v1.schema.json",
18
+ "SchemaExists": false,
19
+ "Valid": false,
20
+ "ValidationErrors": [
21
+ "Schema file contracts/schemas/repo/repo.runtime.v1.schema.json (derived from namespace repo and record_version repo.runtime.v1) does not exist; only contracts/schemas/repo.runtime.v1.shema.json is present"
22
+ ],
23
+ "AuthoritativeRepoRole": null
24
+ },
25
+ "derived_runtime_diagnostics": {
26
+ "signals": {
27
+ "package_json_type": "module",
28
+ "tsconfig_module": "NodeNext",
29
+ "tsconfig_moduleResolution": "NodeNext",
30
+ "dist_require_matches": false,
31
+ "dist_import_matches": true,
32
+ "dist_export_matches": false,
33
+ "dist_has_contracts_dir": false,
34
+ "dist_has_schemas_dir": false,
35
+ "audit_root_resolution": "start=C:\\Ananda\\projects\\unifyplane\\LogSDK -> package.json found at root; audit_root=C:\\Ananda\\projects\\unifyplane\\LogSDK"
36
+ },
37
+ "surfaces": {
38
+ "agents_md": true,
39
+ "package_json": true,
40
+ "tsconfig_json": true,
41
+ "src_dir": true,
42
+ "app_dir": false,
43
+ "plans_dir": false,
44
+ "tools_dir": true,
45
+ "tests_dir": true,
46
+ "contracts_dir": true,
47
+ "evidence_dir": true,
48
+ "dist_dir": true
49
+ }
50
+ },
51
+ "rule_findings": [
52
+ {
53
+ "rule_id": "BUILD-DIST-001",
54
+ "scope": "RUNTIME_CONTRACT",
55
+ "status": "NOT_APPLICABLE",
56
+ "details": "Runtime contract validation could not complete because the schema path failed to resolve, so distribution build expectations cannot be enforced.",
57
+ "evidence": "runtime_contract.valid=false due to missing schema at contracts/schemas/repo/repo.runtime.v1.schema.json"
58
+ },
59
+ {
60
+ "rule_id": "DEP-SDK-001",
61
+ "scope": "REPO_STATIC",
62
+ "status": "PASS",
63
+ "details": "Dependency list is limited to the builtin Node module `crypto`; no additional runtime packages are configured outside of tooling devDependencies.",
64
+ "evidence": "package.json dependencies block contains only \"crypto\" and devDependencies are limited to TypeScript tooling"
65
+ },
66
+ {
67
+ "rule_id": "DIST-ENTRY-001",
68
+ "scope": "RUNTIME_CONTRACT",
69
+ "status": "NOT_APPLICABLE",
70
+ "details": "Dist entry validation depends on a validated runtime contract, which could not be produced because the schema path is missing.",
71
+ "evidence": "runtime_contract.valid=false (schema lookup failures prevented Ajv validation)"
72
+ },
73
+ {
74
+ "rule_id": "LOG-FORB-001",
75
+ "scope": "REPO_STATIC",
76
+ "status": "PASS",
77
+ "details": "No console logging exists within src/ runtime code; the only `console.log` calls live in tooling or validator helpers outside the runtime surface.",
78
+ "evidence": "rg -n console.log src returned no hits"
79
+ },
80
+ {
81
+ "rule_id": "META-RUNTIME-001",
82
+ "scope": "RUNTIME_CONTRACT",
83
+ "status": "PASS",
84
+ "details": "contracts/repo.runtime.json exists and defines the authoritative runtime contract for this repo.",
85
+ "evidence": "contracts/repo.runtime.json (confirmed via filesystem listing)"
86
+ },
87
+ {
88
+ "rule_id": "META-RUNTIME-002",
89
+ "scope": "RUNTIME_CONTRACT",
90
+ "status": "VIOLATION",
91
+ "details": "Namespace-driven schema resolution derives contracts/schemas/repo/repo.runtime.v1.schema.json, but no file exists at that path.",
92
+ "evidence": "Dir lookup for contracts/schemas/repo failed; only contracts/schemas/repo.runtime.v1.shema.json (typo) is present"
93
+ },
94
+ {
95
+ "rule_id": "META-RUNTIME-003",
96
+ "scope": "RUNTIME_CONTRACT",
97
+ "status": "NOT_APPLICABLE",
98
+ "details": "Ajv validation cannot run because the derived schema path is missing.",
99
+ "evidence": "runtime_contract.schema_exists=false; cannot load schema to validate"
100
+ },
101
+ {
102
+ "rule_id": "META-RUNTIME-004",
103
+ "scope": "RUNTIME_CONTRACT",
104
+ "status": "PASS",
105
+ "details": "record_version equals repo.runtime.v1 as required.",
106
+ "evidence": "contracts/repo.runtime.json line with \"record_version\": \"repo.runtime.v1\""
107
+ },
108
+ {
109
+ "rule_id": "MOD-CJS-001",
110
+ "scope": "RUNTIME_CONTRACT",
111
+ "status": "NOT_APPLICABLE",
112
+ "details": "Runtime contract could not be validated (schema missing), so CommonJS reglas cannot be enforced.",
113
+ "evidence": "runtime_contract.valid=false (validation skipped)"
114
+ },
115
+ {
116
+ "rule_id": "MOD-CJS-002",
117
+ "scope": "RUNTIME_CONTRACT",
118
+ "status": "NOT_APPLICABLE",
119
+ "details": "Runtime contract validation is incomplete due to missing schema, so emitted CommonJS requirements are not checked.",
120
+ "evidence": "schema lookup failed before Ajv could run"
121
+ },
122
+ {
123
+ "rule_id": "MOD-CJS-003",
124
+ "scope": "RUNTIME_CONTRACT",
125
+ "status": "NOT_APPLICABLE",
126
+ "details": "Module resolution rules depend on a validated runtime contract; evaluation is deferred until the schema issue is resolved.",
127
+ "evidence": "runtime_contract.valid=false"
128
+ },
129
+ {
130
+ "rule_id": "MOD-ESM-001",
131
+ "scope": "RUNTIME_CONTRACT",
132
+ "status": "NOT_APPLICABLE",
133
+ "details": "Unable to enforce ESM output expectations because the runtime contract validation was not successful.",
134
+ "evidence": "Runtime contract schema path missing prevented Ajv validation"
135
+ },
136
+ {
137
+ "rule_id": "MOD-ESM-002",
138
+ "scope": "RUNTIME_CONTRACT",
139
+ "status": "NOT_APPLICABLE",
140
+ "details": "ESM moduleResolution requirements cannot be confirmed until a valid runtime contract exists.",
141
+ "evidence": "runtime_contract.schema_exists=false"
142
+ },
143
+ {
144
+ "rule_id": "TEST-SEM-001",
145
+ "scope": "RUNTIME_CONTRACT",
146
+ "status": "NOT_APPLICABLE",
147
+ "details": "Semantic test requirements rely on a validated runtime contract; evaluation is deferred.",
148
+ "evidence": "runtime_contract.valid=false (schema unavailable)"
149
+ },
150
+ {
151
+ "rule_id": "TOOL-PURITY-001",
152
+ "scope": "REPO_STATIC",
153
+ "status": "PASS",
154
+ "details": "Tools directory is limited to deterministic test_result helper scripts and does not introduce ad-hoc runtime tooling.",
155
+ "evidence": "tools/test_results is the only subdirectory under tools"
156
+ }
157
+ ],
158
+ "summary": {
159
+ "overall_status": "FAIL",
160
+ "violations_count": 1,
161
+ "explicit_violations": [
162
+ {
163
+ "rule_id": "META-RUNTIME-002",
164
+ "description": "Namespace-derived schema path contracts/schemas/repo/repo.runtime.v1.schema.json is missing, preventing runtime contract validation.",
165
+ "evidence": "Dir lookup for contracts/schemas/repo failed while only contracts/schemas/repo.runtime.v1.shema.json is present"
166
+ }
167
+ ],
168
+ "notes": "Runtime contract schema must be placed under the namespace directory so that Ajv validation can run; until then the audit cannot verify runtime-specific rules."
169
+ }
170
+ }
@@ -0,0 +1,157 @@
1
+ {
2
+ "repo": {
3
+ "path": "C:\\Ananda\\projects\\unifyplane\\LogSDK",
4
+ "name": "@unifyplane/logsdk",
5
+ "runtime_manifest": "contracts/repo.runtime.json"
6
+ },
7
+ "audit_input_path": "C:\\Ananda\\projects\\unifyplane\\LogSDK",
8
+ "audit_root": "C:\\Ananda\\projects\\unifyplane\\LogSDK",
9
+ "generated_at_utc": "2026-01-25T23:39:03Z",
10
+ "overall_status": "FAIL",
11
+ "blocking_failure": null,
12
+ "runtime_contract": {
13
+ "exists": true,
14
+ "path": "contracts/repo.runtime.json",
15
+ "schema_path": "contracts/schemas/repo/repo.runtime.v1.schema.json",
16
+ "valid": true,
17
+ "record_version": "repo.runtime.v1",
18
+ "authoritative_repo_role": "enterprise-substrate-logging",
19
+ "repo_role": "enterprise-substrate-logging",
20
+ "repo_id": "unifyplane-logsdk",
21
+ "module_system": "cjs",
22
+ "node_target": "node22",
23
+ "tsconfig_path": "tsconfig.json",
24
+ "dist_entry": "dist/index.cjs",
25
+ "json_strategy": "cjs-require"
26
+ },
27
+ "derived_runtime_diagnostics": {
28
+ "signals": {
29
+ "audit_root_resolution": "Starting at C:\\Ananda\\projects\\unifyplane\\LogSDK (package.json located here)",
30
+ "package_json_type": "module",
31
+ "tsconfig_module": "ES2022",
32
+ "tsconfig_moduleResolution": "Bundler",
33
+ "dist_require_matches": false,
34
+ "dist_import_matches": true,
35
+ "dist_export_matches": true,
36
+ "dist_has_contracts_dir": false,
37
+ "dist_has_schemas_dir": false
38
+ },
39
+ "surfaces": {
40
+ "agents_md": true,
41
+ "package_json": true,
42
+ "tsconfig_json": true,
43
+ "src_dir": true,
44
+ "app_dir": false,
45
+ "plans_dir": false,
46
+ "tools_dir": true,
47
+ "tests_dir": true,
48
+ "contracts_dir": true,
49
+ "evidence_dir": true,
50
+ "dist_dir": true
51
+ }
52
+ },
53
+ "rule_findings": [
54
+ {
55
+ "rule_id": "BUILD-DIST-001",
56
+ "status": "PASS",
57
+ "scope": "REPO_STATIC",
58
+ "evidence": "dist/ directory exists with compiled artifacts such as dist/index.js"
59
+ },
60
+ {
61
+ "rule_id": "DEP-SDK-001",
62
+ "status": "PASS",
63
+ "scope": "REPO_STATIC",
64
+ "evidence": "package.json lists no dependencies and dependency_policy allows workspace mode"
65
+ },
66
+ {
67
+ "rule_id": "DIST-ENTRY-001",
68
+ "status": "VIOLATION",
69
+ "scope": "RUNTIME_CONTRACT",
70
+ "evidence": "runtime manifest dist_entry=dist/index.cjs but the file is absent (dist contains index.js only)"
71
+ },
72
+ {
73
+ "rule_id": "LOG-FORB-001",
74
+ "status": "PASS",
75
+ "scope": "REPO_STATIC",
76
+ "evidence": "No console.log occurrences exist in dist/ (rg search returns nothing)"
77
+ },
78
+ {
79
+ "rule_id": "META-RUNTIME-001",
80
+ "status": "PASS",
81
+ "scope": "RUNTIME_CONTRACT",
82
+ "evidence": "contracts/repo.runtime.json exists and is readable"
83
+ },
84
+ {
85
+ "rule_id": "META-RUNTIME-002",
86
+ "status": "PASS",
87
+ "scope": "RUNTIME_CONTRACT",
88
+ "evidence": "Derived schema contracts/schemas/repo/repo.runtime.v1.schema.json exists"
89
+ },
90
+ {
91
+ "rule_id": "META-RUNTIME-003",
92
+ "status": "PASS",
93
+ "scope": "RUNTIME_CONTRACT",
94
+ "evidence": "Runtime contract contains all required fields with matching types/values (record_version const, ajv object, etc.)"
95
+ },
96
+ {
97
+ "rule_id": "META-RUNTIME-004",
98
+ "status": "PASS",
99
+ "scope": "RUNTIME_CONTRACT",
100
+ "evidence": "record_version is exactly repo.runtime.v1 as mandated"
101
+ },
102
+ {
103
+ "rule_id": "MOD-CJS-001",
104
+ "status": "VIOLATION",
105
+ "scope": "RUNTIME_CONTRACT",
106
+ "evidence": "dist/index.js:1-2 uses ESM import statements while module_system is declared as cjs"
107
+ },
108
+ {
109
+ "rule_id": "MOD-CJS-002",
110
+ "status": "VIOLATION",
111
+ "scope": "RUNTIME_CONTRACT",
112
+ "evidence": "Dist output exports via ESM keywords (e.g., export function) instead of module.exports required for CJS"
113
+ },
114
+ {
115
+ "rule_id": "MOD-CJS-003",
116
+ "status": "VIOLATION",
117
+ "scope": "RUNTIME_CONTRACT",
118
+ "evidence": "tsconfig.json sets compilerOptions.module=ES2022 and moduleResolution=Bundler rather than commonjs/node"
119
+ },
120
+ {
121
+ "rule_id": "MOD-ESM-001",
122
+ "status": "NOT_APPLICABLE",
123
+ "scope": "RUNTIME_CONTRACT",
124
+ "evidence": "Module system declared cjs so ESM-only rule is not evaluated"
125
+ },
126
+ {
127
+ "rule_id": "MOD-ESM-002",
128
+ "status": "NOT_APPLICABLE",
129
+ "scope": "RUNTIME_CONTRACT",
130
+ "evidence": "Module system declared cjs so ESM-specific compilerOptions requirement does not apply"
131
+ },
132
+ {
133
+ "rule_id": "TEST-SEM-001",
134
+ "status": "GAP",
135
+ "scope": "REPO_STATIC",
136
+ "evidence": "Unable to confirm dist-aligned tests because npm/node commands are disallowed by instructions"
137
+ },
138
+ {
139
+ "rule_id": "TOOL-PURITY-001",
140
+ "status": "PASS",
141
+ "scope": "REPO_STATIC",
142
+ "evidence": "tools/ scripts reference local helpers and do not inject runtime artifacts into dist/"
143
+ }
144
+ ],
145
+ "summary": {
146
+ "blocking_failure": null,
147
+ "violation_count": 4,
148
+ "gap_count": 1,
149
+ "overall_status": "FAIL",
150
+ "explicit_violations": [
151
+ "DIST-ENTRY-001",
152
+ "MOD-CJS-001",
153
+ "MOD-CJS-002",
154
+ "MOD-CJS-003"
155
+ ]
156
+ }
157
+ }
@@ -0,0 +1,73 @@
1
+ .git
2
+ contracts
3
+ dist
4
+ docs
5
+ evidence
6
+ node_modules
7
+ semantics
8
+ src
9
+ tests
10
+ tools
11
+ validators
12
+ .gitignore
13
+ filestructure.output.txt
14
+ package-lock.json
15
+ package.json
16
+ README.md
17
+ tsconfig.json
18
+ contracts\abi
19
+ contracts\authority
20
+ contracts\constraints
21
+ contracts\registries
22
+ contracts\schemas
23
+ contracts\specs
24
+ contracts\specs\fanout-semantics.v1.md
25
+ contracts\specs\sink-contract.v1.md
26
+ contracts\specs\step-record.v1.md
27
+ contracts\specs\validation-rules.v1.md
28
+ docs\prompts
29
+ docs\LogSDKFuntionalSpec.md
30
+ docs\prompts\AuditonSDK.txt
31
+ evidence\validators
32
+ evidence\validators\validate-repo-structure
33
+ evidence\validators\validate-repo-structure\repo-structure-audit.json
34
+ src\core
35
+ src\sinks
36
+ src\validate
37
+ src\crypto-shim.d.ts
38
+ src\fs-shim.d.ts
39
+ src\index.ts
40
+ src\node-test-shim.d.ts
41
+ src\perf_hooks-shim.d.ts
42
+ src\process-shim.d.ts
43
+ src\core\clock.ts
44
+ src\core\context.ts
45
+ src\core\fanout.ts
46
+ src\core\ids.ts
47
+ src\core\message_constraints.ts
48
+ src\core\outcomes.ts
49
+ src\core\record_builder.ts
50
+ src\core\spool.ts
51
+ src\core\types.ts
52
+ src\sinks\file_ndjson_sink.ts
53
+ src\sinks\sink_types.ts
54
+ src\sinks\stdout_sink.ts
55
+ src\validate\api_surface_guard.ts
56
+ src\validate\noncompliance.ts
57
+ src\validate\schema_guard.ts
58
+ tests\fanout.test.ts
59
+ tests\fanout_spool.test.ts
60
+ tests\message_constraints.test.ts
61
+ tests\node-shim.d.ts
62
+ tests\record_builder.test.ts
63
+ tests\sequence_monotonic.test.ts
64
+ tests\sinks_file_ndjson.test.ts
65
+ tests\step1_compliance.test.ts
66
+ tools\audit
67
+ tools\audit\backup-note.md
68
+ tools\audit\logsdk_reaudit_report.json
69
+ tools\audit\repo-cleanup-report.md
70
+ tools\audit\repo-structure-audit.json
71
+ tools\audit\repo-structure-fix.md
72
+ validators\bootstrap
73
+ validators\bootstrap\validate-repo-structure.ts
package/package.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "type": "module",
3
+ "name": "@unifyplane/logsdk",
4
+ "version": "0.1.0",
5
+ "exports": {
6
+ ".": {
7
+ "import": "./dist/index.js"
8
+ }
9
+ },
10
+ "main": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "scripts": {
13
+ "build": "tsc -p tsconfig.json",
14
+ "test:internal": "node tools/test_results/run-tests-then-prebuild.js"
15
+ }
16
+ }
@@ -0,0 +1,25 @@
1
+ let lastMonotonic = 0;
2
+ const hasPerformance =
3
+ typeof performance !== "undefined" && typeof performance.now === "function";
4
+ const epochStart = Date.now();
5
+
6
+ export function nowUtcIso(): string {
7
+ return new Date().toISOString();
8
+ }
9
+
10
+ export function monotonicNow(): number {
11
+ let current: number;
12
+
13
+ if (hasPerformance) {
14
+ current = epochStart + performance.now();
15
+ } else {
16
+ current = Date.now();
17
+ }
18
+
19
+ if (current <= lastMonotonic) {
20
+ current = lastMonotonic + 1;
21
+ }
22
+
23
+ lastMonotonic = current;
24
+ return current;
25
+ }