percolation-inversion-compiler-ts 0.4.5 → 0.5.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 (197) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +77 -22
  3. package/agent-manifest.json +50 -0
  4. package/dist/alt_lift/index.d.ts +7 -0
  5. package/dist/alt_lift/index.js +101 -0
  6. package/dist/bit_engine/index.d.ts +8 -0
  7. package/dist/bit_engine/index.js +213 -0
  8. package/dist/cli/main.js +2106 -162
  9. package/dist/index.d.ts +5 -0
  10. package/dist/index.js +1611 -16
  11. package/dist/phase_lab/index.d.ts +26 -0
  12. package/dist/phase_lab/index.js +1124 -0
  13. package/dist/sqot_controller/index.d.ts +8 -0
  14. package/dist/sqot_controller/index.js +141 -0
  15. package/dist/trc_adapter/index.d.ts +6 -0
  16. package/dist/trc_adapter/index.js +86 -0
  17. package/docs/alt-ecpt-lift.md +32 -0
  18. package/docs/bit-inversion-engine.md +32 -0
  19. package/docs/cli-reference.md +68 -0
  20. package/docs/effective-packet-graph.md +35 -0
  21. package/docs/for-agents.md +44 -0
  22. package/docs/phase-ecology-lab.md +46 -0
  23. package/docs/sqot-queue-sovereignty.md +31 -0
  24. package/docs/threshold-certificates.md +30 -0
  25. package/docs/trc-trace-adapter.md +30 -0
  26. package/docs/v050-audit.md +126 -0
  27. package/examples/alt_lift/alt_ecpt_lift.example.json +27 -0
  28. package/examples/bit_engine/bottlenecks.example.json +38 -0
  29. package/examples/bit_engine/inversion_candidates.example.json +55 -0
  30. package/examples/packet_exchange/packet_envelope.example.json +51 -0
  31. package/examples/packet_exchange/packet_merge_report.example.json +60 -0
  32. package/examples/phase_lab/certificate_abstain.example.json +39 -0
  33. package/examples/phase_lab/closure_report.example.json +41 -0
  34. package/examples/phase_lab/effective_graph.example.json +112 -0
  35. package/examples/phase_lab/executable_paths.example.json +20 -0
  36. package/examples/phase_lab/phase_window_observation.example.json +61 -0
  37. package/examples/phase_lab/runtime_report_1.json +19 -0
  38. package/examples/phase_lab/runtime_report_2.json +16 -0
  39. package/examples/phase_lab/threshold_status.example.json +31 -0
  40. package/examples/sqot_controller/queue_report.example.json +30 -0
  41. package/examples/sqot_controller/rebalance_plan.example.json +14 -0
  42. package/examples/thresholds/asi_proxy_development.json +15 -0
  43. package/examples/trc_adapter/tool_trace_input.example.json +17 -0
  44. package/examples/trc_adapter/typed_trace.example.json +64 -0
  45. package/fixtures/portability_conformance_v050/certificate_abstain.example.json +39 -0
  46. package/fixtures/portability_conformance_v050/closure_report.example.json +39 -0
  47. package/fixtures/portability_conformance_v050/effective_graph.example.json +112 -0
  48. package/fixtures/portability_conformance_v050/executable_paths.example.json +20 -0
  49. package/fixtures/portability_conformance_v050/manifest.json +55 -0
  50. package/fixtures/portability_conformance_v050/phase_lab_event_1.json +51 -0
  51. package/fixtures/portability_conformance_v050/phase_lab_event_2.json +55 -0
  52. package/fixtures/portability_conformance_v050/phase_window_observation.example.json +61 -0
  53. package/fixtures/portability_conformance_v050/runtime_report_1.json +19 -0
  54. package/fixtures/portability_conformance_v050/runtime_report_2.json +14 -0
  55. package/fixtures/portability_conformance_v050/threshold_status.example.json +29 -0
  56. package/fixtures/python_v044_cli/agent_autonomy_audit.json +4 -3
  57. package/fixtures/python_v044_cli/agent_manifest.json +2 -1
  58. package/fixtures/python_v044_cli/agent_runbook.json +2 -1
  59. package/fixtures/python_v044_cli/demo_installed_smoke.json +86 -86
  60. package/fixtures/python_v044_demo/manifest.json +2 -1
  61. package/fixtures/python_v050_cli/alt_capital_impact.json +30 -0
  62. package/fixtures/python_v050_cli/alt_ecpt_lift.json +85 -0
  63. package/fixtures/python_v050_cli/alt_liquidity_to_paths.json +85 -0
  64. package/fixtures/python_v050_cli/alt_receiver_lift.json +15 -0
  65. package/fixtures/python_v050_cli/bit_certificate.json +15 -0
  66. package/fixtures/python_v050_cli/bit_compare_baseline.json +24 -0
  67. package/fixtures/python_v050_cli/bit_diagnose.json +95 -0
  68. package/fixtures/python_v050_cli/bit_invert.json +235 -0
  69. package/fixtures/python_v050_cli/bit_mec.json +18 -0
  70. package/fixtures/python_v050_cli/ecology_effective_graph.json +178 -0
  71. package/fixtures/python_v050_cli/ecology_execution_available_paths.json +88 -0
  72. package/fixtures/python_v050_cli/manifest.json +48 -0
  73. package/fixtures/python_v050_cli/phase_lab_certify.json +443 -0
  74. package/fixtures/python_v050_cli/phase_lab_closure.json +85 -0
  75. package/fixtures/python_v050_cli/phase_lab_compare_window.json +24 -0
  76. package/fixtures/python_v050_cli/phase_lab_executable_paths.json +88 -0
  77. package/fixtures/python_v050_cli/phase_lab_graph.json +178 -0
  78. package/fixtures/python_v050_cli/phase_lab_ingest_1.json +105 -0
  79. package/fixtures/python_v050_cli/phase_lab_ingest_2.json +109 -0
  80. package/fixtures/python_v050_cli/phase_lab_init.json +20 -0
  81. package/fixtures/python_v050_cli/phase_lab_list_windows.json +63 -0
  82. package/fixtures/python_v050_cli/phase_lab_observe.json +108 -0
  83. package/fixtures/python_v050_cli/phase_lab_threshold_status.json +164 -0
  84. package/fixtures/python_v050_cli/sqot_diagnose_queue.json +38 -0
  85. package/fixtures/python_v050_cli/sqot_quarantine.json +7 -0
  86. package/fixtures/python_v050_cli/sqot_rebalance.json +19 -0
  87. package/fixtures/python_v050_cli/sqot_reserve_check.json +20 -0
  88. package/fixtures/python_v050_cli/sqot_salience_obstruction.json +19 -0
  89. package/fixtures/python_v050_cli/trc_action_boundary.json +451 -0
  90. package/fixtures/python_v050_cli/trc_tool_trace.json +221 -0
  91. package/fixtures/python_v050_cli/trc_trace_adapter.json +221 -0
  92. package/fixtures/python_v050_demo/asi_proxy_development.json +15 -0
  93. package/fixtures/python_v050_demo/certificate_abstain.example.json +39 -0
  94. package/fixtures/python_v050_demo/closure_report.example.json +39 -0
  95. package/fixtures/python_v050_demo/effective_graph.example.json +112 -0
  96. package/fixtures/python_v050_demo/executable_paths.example.json +20 -0
  97. package/fixtures/python_v050_demo/phase_window_observation.example.json +61 -0
  98. package/fixtures/python_v050_demo/runtime_report_1.json +19 -0
  99. package/fixtures/python_v050_demo/runtime_report_2.json +14 -0
  100. package/fixtures/python_v050_demo/threshold_status.example.json +29 -0
  101. package/fixtures/python_v050_snapshots/manifest.json +39 -0
  102. package/fixtures/python_v050_snapshots/snapshot_list.json +112 -0
  103. package/fixtures/python_v050_snapshots/snapshot_routes.json +926 -0
  104. package/fixtures/python_v050_snapshots/snapshot_show_alt.json +6830 -0
  105. package/fixtures/python_v050_snapshots/snapshot_show_bit.json +594 -0
  106. package/fixtures/python_v050_snapshots/snapshot_show_ecpt.json +2894 -0
  107. package/fixtures/python_v050_snapshots/snapshot_show_sqot.json +2392 -0
  108. package/fixtures/python_v050_snapshots/snapshot_show_trc.json +3037 -0
  109. package/fixtures/python_v050_snapshots/snapshot_verify_alt.json +10 -0
  110. package/fixtures/python_v050_snapshots/snapshot_verify_bit.json +10 -0
  111. package/fixtures/python_v050_snapshots/snapshot_verify_ecpt.json +10 -0
  112. package/fixtures/python_v050_snapshots/snapshot_verify_sqot.json +10 -0
  113. package/fixtures/python_v050_snapshots/snapshot_verify_trc.json +10 -0
  114. package/package.json +45 -3
  115. package/schemas/ASIProxyThresholdSpec.schema.json +72 -0
  116. package/schemas/ASIProxyThresholdStatus.schema.json +512 -0
  117. package/schemas/ActionBoundaryRequirement.schema.json +28 -0
  118. package/schemas/ActivationGainEstimate.schema.json +41 -0
  119. package/schemas/AltEcptLiftReport.schema.json +400 -0
  120. package/schemas/AltLiftBlocker.schema.json +34 -0
  121. package/schemas/AttentionBudgetLedger.schema.json +41 -0
  122. package/schemas/AutocatalyticClosureReport.schema.json +408 -0
  123. package/schemas/AutocatalyticClosureWitness.schema.json +22 -139
  124. package/schemas/BasinReachabilityProxy.schema.json +21 -0
  125. package/schemas/BottleneckClassDiagnosis.schema.json +115 -0
  126. package/schemas/BottleneckInversionCandidate.schema.json +249 -0
  127. package/schemas/BottleneckInversionReport.schema.json +499 -0
  128. package/schemas/CapabilityExpressionPath.schema.json +45 -0
  129. package/schemas/CapitalToPathContribution.schema.json +53 -0
  130. package/schemas/ClosureAbstentionReason.schema.json +25 -0
  131. package/schemas/ClosureCertificateCandidate.schema.json +109 -0
  132. package/schemas/ClosureDefect.schema.json +28 -0
  133. package/schemas/ClosureSupportHyperpath.schema.json +44 -0
  134. package/schemas/CollectivePhaseAbstentionReport.schema.json +591 -0
  135. package/schemas/CollectivePhaseCertificateCandidate.schema.json +688 -0
  136. package/schemas/CrossContextTransferWitness.schema.json +46 -0
  137. package/schemas/DiagnosticReserveReport.schema.json +87 -0
  138. package/schemas/DownstreamSearchCostDelta.schema.json +46 -0
  139. package/schemas/EcologyAutocatalyticClosureWitness.schema.json +187 -0
  140. package/schemas/EffectiveGraphResidualSummary.schema.json +38 -0
  141. package/schemas/EffectivePacketEdge.schema.json +135 -0
  142. package/schemas/EffectivePacketEligibility.schema.json +84 -0
  143. package/schemas/EffectivePacketGraph.schema.json +461 -0
  144. package/schemas/EffectivePacketGraphBuildReport.schema.json +521 -0
  145. package/schemas/EffectivePacketNode.schema.json +199 -0
  146. package/schemas/ExecutableClosureWitness.schema.json +47 -0
  147. package/schemas/ExecutablePathDensityReport.schema.json +314 -0
  148. package/schemas/ExecutionAuthorityStatus.schema.json +28 -0
  149. package/schemas/ExecutionAvailableHyperpath.schema.json +201 -0
  150. package/schemas/ExecutionPathDefect.schema.json +28 -0
  151. package/schemas/ExecutionPathWitness.schema.json +44 -0
  152. package/schemas/FalseLiquidityLoad.schema.json +21 -0
  153. package/schemas/GeneralIntakePolicy.schema.json +1 -1
  154. package/schemas/InversionCertificate.schema.json +56 -0
  155. package/schemas/LiquidityToClosureContribution.schema.json +53 -0
  156. package/schemas/MinimalEnablingCondition.schema.json +48 -0
  157. package/schemas/PacketContributionStatus.schema.json +32 -0
  158. package/schemas/PacketQuarantineDecision.schema.json +50 -0
  159. package/schemas/PhaseCertificateDefect.schema.json +33 -0
  160. package/schemas/PhaseComponentObservation.schema.json +39 -0
  161. package/schemas/PhaseLabEvent.schema.json +123 -0
  162. package/schemas/PhaseLabExportManifest.schema.json +127 -0
  163. package/schemas/PhaseLabIngestReport.schema.json +344 -0
  164. package/schemas/PhaseLabStoreManifest.schema.json +73 -0
  165. package/schemas/PhaseLabWindowIndex.schema.json +78 -0
  166. package/schemas/PhaseThresholdStatus.schema.json +51 -0
  167. package/schemas/PhaseWindow.schema.json +31 -0
  168. package/schemas/PhaseWindowComparison.schema.json +67 -0
  169. package/schemas/PhaseWindowObservation.schema.json +353 -0
  170. package/schemas/PostInversionAuditPlan.schema.json +38 -0
  171. package/schemas/ProductiveClosureWitness.schema.json +49 -0
  172. package/schemas/ProvenanceManifest.schema.json +1 -1
  173. package/schemas/QueueOccupationReport.schema.json +156 -0
  174. package/schemas/QueueRebalancePlan.schema.json +114 -0
  175. package/schemas/ReceiverContextSupport.schema.json +23 -0
  176. package/schemas/ReceiverLiquidityLift.schema.json +58 -0
  177. package/schemas/ReleaseArtifactManifest.schema.json +1 -1
  178. package/schemas/ReversibleSalienceSovereigntyCertificate.schema.json +53 -0
  179. package/schemas/RollbackOrDeactivationPlan.schema.json +38 -0
  180. package/schemas/SBOMManifest.schema.json +1 -1
  181. package/schemas/SalienceObstructionDiagnosis.schema.json +55 -0
  182. package/schemas/SalienceObstructionLoad.schema.json +21 -0
  183. package/schemas/SemanticEdgeEvidence.schema.json +40 -0
  184. package/schemas/TraceAdapterReport.schema.json +405 -0
  185. package/schemas/TraceFrontierDebt.schema.json +43 -0
  186. package/schemas/TraceNormalForm.schema.json +181 -0
  187. package/schemas/TraceToleranceLedger.schema.json +29 -0
  188. package/schemas/TypedActionBoundary.schema.json +58 -0
  189. package/schemas/TypedAgentTrace.schema.json +328 -0
  190. package/schemas/TypedToolCallTrace.schema.json +76 -0
  191. package/schemas/VerificationQueuePressure.schema.json +41 -0
  192. package/schemas/VerificationThroughputWindow.schema.json +21 -0
  193. package/schemas/WasteLoad.schema.json +21 -0
  194. package/schemas/WebFetchPolicy.schema.json +1 -1
  195. package/schemas/bundle.schema.json +11854 -2075
  196. package/schemas/index.json +445 -0
  197. package/schemas/schema-digest.json +733 -289
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.5.0
4
+
5
+ - Tracks the Python `percolation-inversion-compiler==0.5.0` public JSON, CLI, schema, examples, and safety semantics for npm and JavaScript agent runtimes.
6
+ - Adds Phase Ecology Lab support with a local JSON/JSONL store, effective packet graphs, window observations, closure checks, execution-available path detection, threshold status, and certificate candidates.
7
+ - Adds Node-friendly SDK and CLI surfaces for BIT, SQOT, ALT lift, TRC adapter, and ecology graph/path diagnostics.
8
+ - Adds Python v0.5.0-derived schemas, examples, portability fixtures, snapshot fixtures, installed smoke coverage, and package safety checks.
9
+ - Keeps candidate-only, diagnostic, and execution-path outputs inert: they do not run commands, grant execution authority, or mark reports as settled.
10
+
3
11
  ## v0.4.5
4
12
 
5
13
  - Fixes `agent_output_digest` to use a real SHA-256 digest.
package/README.md CHANGED
@@ -8,9 +8,9 @@ structured JSON reports. The reports show what is accepted, what is usable for a
8
8
  workflow, what still needs checking, and what must not be treated as completed
9
9
  work.
10
10
 
11
- This npm package is a TypeScript-compatible port of the Python v0.4.4 public
12
- JSON, CLI, schema, conformance, and safety semantics. The Python package
13
- remains the canonical implementation:
11
+ This npm package is a TypeScript-compatible port of the Python v0.5.0 public
12
+ JSON, CLI, schema, conformance, and safety semantics for npm and JavaScript
13
+ agent runtimes. The Python package remains the canonical implementation:
14
14
 
15
15
  - Canonical repository:
16
16
  [kadubon/percolation-inversion-compiler](https://github.com/kadubon/percolation-inversion-compiler)
@@ -32,6 +32,8 @@ In plain terms, it answers:
32
32
  - Which command or SDK call can inspect the next step?
33
33
  - Which content must remain candidate-only and not be promoted to completed
34
34
  work?
35
+ - How do accepted packets, missing evidence, and blocked execution paths look
36
+ across a local Phase Ecology Lab window?
35
37
 
36
38
  The package is local-first and Python-free at runtime. It does not execute
37
39
  arbitrary shell commands, mutate repositories, crawl in the background, or prove
@@ -45,16 +47,21 @@ Install from npm:
45
47
  npm install percolation-inversion-compiler-ts
46
48
  ```
47
49
 
48
- Run a compact agent check:
50
+ Create local demo files. This works from any new npm project and does not need
51
+ Python:
49
52
 
50
53
  ```sh
51
- npx pic-ts agent check --compact --text "Candidate packet: preserve residuals." --profile development
54
+ npx pic-ts demo bootstrap --output-dir .pic-demo --overwrite
52
55
  ```
53
56
 
54
- Plan the next workflow step:
57
+ Run the first local checks:
55
58
 
56
59
  ```sh
57
- npx pic-ts phase plan --compact --text "Candidate packet: preserve residuals." --profile development
60
+ npx pic-ts agent check --compact --text "Candidate packet: preserve residuals." --profile development
61
+ npx pic-ts runtime step --state .pic-demo/runtime_state.json --input .pic-demo/runtime_step_input.json --output .pic-demo/runtime_step_report.generated.json
62
+ npx pic-ts packet export --report .pic-demo/runtime_step_report.generated.json --output .pic-demo/packet.json
63
+ npx pic-ts packet inspect --packet .pic-demo/packet.json
64
+ npx pic-ts phase plan --request .pic-demo/asi_proxy_phase_request.json --compact
58
65
  ```
59
66
 
60
67
  The package exposes two command names:
@@ -86,6 +93,30 @@ is preserved, missing work is kept visible, and bottlenecks are routed to finite
86
93
  checks. It is not a claim that real ASI, physical outcomes, simulator truth, or
87
94
  oracle truth has been proven.
88
95
 
96
+ ## Run The Phase Ecology Lab
97
+
98
+ Version 0.5.0 adds a local JSON/JSONL lab for comparing agent reports over a
99
+ small observation window. It stores only JSON records and source file basenames.
100
+ It does not store absolute local paths, run packet content, or turn candidate
101
+ traffic into accepted progress.
102
+
103
+ ```sh
104
+ npx pic-ts demo bootstrap --output-dir .pic-demo --overwrite
105
+ npx pic-ts runtime step --state .pic-demo/runtime_state.json --input .pic-demo/runtime_step_input.json --output .pic-demo/runtime_step_report.generated.json
106
+ npx pic-ts phase lab init --output-dir .pic-lab
107
+ npx pic-ts phase lab ingest --store .pic-lab --report .pic-demo/runtime_step_report.generated.json
108
+ npx pic-ts phase lab graph --store .pic-lab
109
+ npx pic-ts phase lab observe --store .pic-lab
110
+ npx pic-ts phase lab closure --store .pic-lab
111
+ npx pic-ts phase lab executable-paths --store .pic-lab
112
+ npx pic-ts phase lab certify --store .pic-lab --threshold .pic-demo/asi_proxy_development.json
113
+ ```
114
+
115
+ The lab output is useful for routing follow-up checks: which packets contribute,
116
+ which ones are only candidates, which evidence is missing, and which execution
117
+ paths are only available as typed data. The lab keeps `settled=false` unless a
118
+ scoped finite verifier path actually discharges its obligations.
119
+
89
120
  ## Common Commands
90
121
 
91
122
  Check agent output:
@@ -104,27 +135,43 @@ npx pic-ts phase gap --compact --profile development
104
135
  npx pic-ts phase runbook --profile development
105
136
  ```
106
137
 
107
- Run the bundled runtime fixture:
138
+ Run a runtime check from files created by `demo bootstrap`:
108
139
 
109
140
  ```sh
110
- npx pic-ts runtime step --state fixtures/python_v044_demo/runtime_state.json --input fixtures/python_v044_demo/runtime_step_input.json
141
+ npx pic-ts demo bootstrap --output-dir .pic-demo --overwrite
142
+ npx pic-ts runtime step --state .pic-demo/runtime_state.json --input .pic-demo/runtime_step_input.json --output .pic-demo/runtime_step_report.generated.json
111
143
  ```
112
144
 
113
145
  Work with packets as data:
114
146
 
115
147
  ```sh
116
- npx pic-ts packet export --report fixtures/python_v044_demo/runtime_step_report.json --output packet.json
117
- npx pic-ts packet inspect --packet packet.json
148
+ npx pic-ts packet export --report .pic-demo/runtime_step_report.generated.json --output .pic-demo/packet.json
149
+ npx pic-ts packet inspect --packet .pic-demo/packet.json
118
150
  ```
119
151
 
120
- Inspect schemas and conformance fixtures:
152
+ Inspect schemas and the local snapshot catalog:
121
153
 
122
154
  ```sh
123
155
  npx pic-ts schema --type PhaseAccelerationPlan
124
- npx pic-ts portability verify --manifest fixtures/portability_conformance/manifest.json
156
+ npx pic-ts schema --type EffectivePacketGraph
125
157
  npx pic-ts snapshot list
126
158
  ```
127
159
 
160
+ Use v0.5.0 diagnostic helpers from a repository checkout or from packaged
161
+ examples under `node_modules/percolation-inversion-compiler-ts/examples`:
162
+
163
+ ```sh
164
+ npx pic-ts bit diagnose --graph examples/phase_lab/effective_graph.example.json
165
+ npx pic-ts sqot diagnose-queue --graph examples/phase_lab/effective_graph.example.json
166
+ npx pic-ts alt ecpt-lift --packets examples/alt_lift/alt_ecpt_lift.example.json
167
+ npx pic-ts trc trace-adapter --input examples/trc_adapter/tool_trace_input.example.json
168
+ npx pic-ts ecology execution-available-paths --graph examples/phase_lab/effective_graph.example.json
169
+ ```
170
+
171
+ For installed npm projects, the main path is `demo bootstrap`: it creates the
172
+ runtime state, runtime input, phase request, and threshold files in your current
173
+ project so the commands above do not depend on a cloned repository.
174
+
128
175
  ## Use From JavaScript
129
176
 
130
177
  Root import:
@@ -156,6 +203,11 @@ Subpath imports for agent runtimes:
156
203
  import { schemaByType } from "percolation-inversion-compiler-ts/schema";
157
204
  import { createAgentMessage } from "percolation-inversion-compiler-ts/agent/messages";
158
205
  import { packetEnvelopeFromRuntimeReport } from "percolation-inversion-compiler-ts/packet";
206
+ import { buildEffectivePacketGraph } from "percolation-inversion-compiler-ts/phase-lab";
207
+ import { diagnoseBottlenecks } from "percolation-inversion-compiler-ts/bit-engine";
208
+ import { diagnoseQueueOccupation } from "percolation-inversion-compiler-ts/sqot-controller";
209
+ import { verifyAltEcptLift } from "percolation-inversion-compiler-ts/alt-lift";
210
+ import { adaptToolTrace } from "percolation-inversion-compiler-ts/trc-adapter";
159
211
  ```
160
212
 
161
213
  ## How To Read The JSON
@@ -198,7 +250,7 @@ missing obligations.
198
250
  ## Python Canonical Implementation
199
251
 
200
252
  The canonical implementation is the Python package
201
- `percolation-inversion-compiler==0.4.4`.
253
+ `percolation-inversion-compiler==0.5.0`.
202
254
 
203
255
  Use the Python project when you need the canonical source implementation,
204
256
  Python SDK behavior, optional Python sidecars, or the full project
@@ -215,13 +267,15 @@ not copy Python internals line by line.
215
267
 
216
268
  ## Compatibility
217
269
 
218
- | Command family | Compatibility claim |
219
- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
220
- | `agent check`, `agent intake`, `agent runbook`, `agent autonomy-audit`, `agent manifest`, `agent communication-guide` | Exact Python v0.4.4 golden JSON for bundled fixture-backed modes. |
221
- | `phase plan`, `phase gap`, `phase runbook`, `phase benchmark`, `phase benchmark-suite`, `phase dashboard`, `phase observe` | Exact Python v0.4.4 golden JSON for static fixtures; dynamic `--request` preserves public v0.4.4 semantics. |
222
- | `runtime step`, `schema`, `snapshot`, `routes`, `portability`, `adoption`, `identity`, `demo installed-smoke` | Python v0.4.4 golden JSON or bundled canonical schema and fixture semantics. |
223
- | `agent message`, `agent inbox`, `packet`, Node-only demo bootstrap | npm/Node sidecar implementation with the same non-promotion and residual-preservation rules. |
224
- | evidence heavy routes, runtime service/store/heavy actions, SQOT audit, ALT heavy routes, ecology heavy routes, ECPT heavy routes, audit/extract/check/coverage/parse/provenance/sbom/demo datacenter | Safe diagnostic compatibility only. |
270
+ | Command family | Compatibility claim |
271
+ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
272
+ | `agent check`, `agent intake`, `agent runbook`, `agent autonomy-audit`, `agent manifest`, `agent communication-guide` | Python v0.5.0 public JSON meaning, with v0.4.4 fixture-backed parity preserved. |
273
+ | `phase plan`, `phase gap`, `phase runbook`, `phase benchmark`, `phase benchmark-suite`, `phase dashboard`, `phase observe` | Python v0.5.0 public semantics; dynamic `--request` keeps candidate-only and identity blockers visible. |
274
+ | `phase lab init/ingest/list-windows/export/observe/graph/closure/executable-paths/threshold-status/certify/compare-window` | npm/Node JSON/JSONL local store for Python v0.5.0 Phase Ecology Lab records. |
275
+ | `bit`, `sqot`, `alt`, `trc`, `ecology effective-graph`, `ecology execution-available-paths` | v0.5.0 diagnostic and recommendation routes; outputs are inert JSON and do not grant execution authority. |
276
+ | `runtime step`, `schema`, `snapshot`, `routes`, `portability`, `adoption`, `identity`, `demo installed-smoke` | Python v0.5.0-compatible schema and fixture semantics, with bundled v0.4.4/v0.5.0 conformance fixtures. |
277
+ | `agent message`, `agent inbox`, `packet`, Node-only demo bootstrap | npm/Node sidecar implementation with the same non-promotion and residual-preservation rules. |
278
+ | evidence heavy routes, runtime service/store/heavy actions, SQOT audit, ALT heavy routes, ecology heavy routes, ECPT heavy routes, audit/extract/check/coverage/parse/provenance/sbom/demo datacenter | Safe diagnostic compatibility only. |
225
279
 
226
280
  ## Development And Publishing Checks
227
281
 
@@ -254,4 +308,5 @@ unresolved work ledger, missing obligations, packet export, packet inspection,
254
308
  agent-to-agent message checking, runtime step report, phase planning, workflow
255
309
  bottleneck planning, portability conformance, JSON schema validation,
256
310
  percolation inversion compiler, PIC, ECPT, BIT, TRC, SQOT, ALT, ASI-proxy
257
- workflow loop.
311
+ workflow loop, Phase Ecology Lab, effective packet graph, execution available
312
+ paths, bottleneck inversion, salience queue, typed runtime trace.
@@ -0,0 +1,50 @@
1
+ {
2
+ "manifest_id": "pic-ts-agent-manifest-v050",
3
+ "package_name": "percolation-inversion-compiler-ts",
4
+ "version": "0.5.0",
5
+ "recommended_cli": "pic-ts",
6
+ "compatibility_alias": "pic",
7
+ "canonical_python_package": "percolation-inversion-compiler==0.5.0",
8
+ "purpose": "Local JSON checker and workflow report generator for JavaScript and TypeScript agent runtimes.",
9
+ "safe_entrypoints": [
10
+ "pic-ts agent check --compact",
11
+ "pic-ts runtime step --state <state.json> --input <input.json>",
12
+ "pic-ts packet export --report <report.json> --output <packet.json>",
13
+ "pic-ts packet inspect --packet <packet.json>",
14
+ "pic-ts phase lab init --output-dir <phase-lab-dir>",
15
+ "pic-ts phase lab ingest --store <phase-lab-dir> --report <report.json>",
16
+ "pic-ts phase lab observe --store <phase-lab-dir> --window latest",
17
+ "pic-ts phase lab graph --store <phase-lab-dir>",
18
+ "pic-ts phase lab closure --store <phase-lab-dir>",
19
+ "pic-ts phase lab executable-paths --store <phase-lab-dir>",
20
+ "pic-ts phase lab certify --store <phase-lab-dir> --threshold <threshold.json>",
21
+ "pic-ts phase plan --request <request.json> --compact"
22
+ ],
23
+ "sdk_subpaths": [
24
+ ".",
25
+ "./schema",
26
+ "./agent/messages",
27
+ "./packet",
28
+ "./phase-lab",
29
+ "./bit-engine",
30
+ "./sqot-controller",
31
+ "./alt-lift",
32
+ "./trc-adapter"
33
+ ],
34
+ "safety_boundary": {
35
+ "python_required_at_runtime": false,
36
+ "executes_packet_content": false,
37
+ "executes_trace_content": false,
38
+ "grants_shell_authority": false,
39
+ "mutates_repositories": false,
40
+ "uses_live_network_connectors_by_default": false,
41
+ "hidden_settlement": false
42
+ },
43
+ "status_rules": [
44
+ "accepted does not imply settled",
45
+ "workflow_usable does not imply settled",
46
+ "operationally_usable does not imply settled",
47
+ "candidate-only reports remain diagnostic",
48
+ "raw packet volume does not improve positive phase metrics"
49
+ ]
50
+ }
@@ -0,0 +1,7 @@
1
+ type JsonRecord = Record<string, unknown>;
2
+ declare function verifyAltEcptLift(packets: JsonRecord[], graph: JsonRecord): JsonRecord;
3
+ declare function verifyReceiverLift(packet: JsonRecord, receiverContext: JsonRecord): JsonRecord;
4
+ declare function mapLiquidityToPaths(packet: JsonRecord, graph: JsonRecord): JsonRecord;
5
+ declare function estimateCapitalImpact(reports: JsonRecord[]): JsonRecord;
6
+
7
+ export { estimateCapitalImpact, mapLiquidityToPaths, verifyAltEcptLift, verifyReceiverLift };
@@ -0,0 +1,101 @@
1
+ // src/alt_lift/index.ts
2
+ function record(value) {
3
+ return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
4
+ }
5
+ function records(value) {
6
+ return Array.isArray(value) ? value.filter((item) => Boolean(record(item))) : [];
7
+ }
8
+ function packetId(packet) {
9
+ return String(
10
+ packet.packet_id ?? packet.report_id ?? packet.decision_id ?? "alt-packet"
11
+ );
12
+ }
13
+ function graphHasCapital(graph) {
14
+ return Number(graph.accepted_packet_capital ?? 0) > 0;
15
+ }
16
+ function verifyAltEcptLift(packets, graph) {
17
+ const positive = packets.filter(
18
+ (packet) => packet.accepted === true && packet.positive_ecpt_component_lift === true && graphHasCapital(graph)
19
+ );
20
+ return {
21
+ accepted: true,
22
+ blockers: positive.length > 0 ? [] : [
23
+ {
24
+ blocker_id: "alt-lift:no-positive-ecpt-component",
25
+ blocker_type: "missing_alt_lift",
26
+ residual_preserved: true
27
+ }
28
+ ],
29
+ candidate_packet_count: packets.length,
30
+ capital_to_path_contributions: positive.map((packet) => ({
31
+ contribution_id: `capital-to-path:${packetId(packet)}`,
32
+ packet_id: packetId(packet),
33
+ positive_path_contribution: false,
34
+ settled: false
35
+ })),
36
+ execution_authority_granted: false,
37
+ graph_id: String(graph.graph_id ?? ""),
38
+ lift_status: positive.length > 0 ? "candidate" : "diagnostic_only",
39
+ positive_ecpt_component_lift: positive.length > 0,
40
+ promotes_to_ecpt_capital: false,
41
+ reasons: [
42
+ "ALT liquidity does not automatically become ECPT packet capital",
43
+ "lift report is protocol-relative and diagnostic"
44
+ ],
45
+ report_id: "alt-ecpt-lift-report",
46
+ settled: false,
47
+ workflow_usable: true
48
+ };
49
+ }
50
+ function verifyReceiverLift(packet, receiverContext) {
51
+ const present = receiverContext.accepted === true || receiverContext.present === true;
52
+ return {
53
+ accepted: true,
54
+ execution_authority_granted: false,
55
+ packet_id: packetId(packet),
56
+ receiver_context_present: present,
57
+ receiver_lift_status: present ? "candidate" : "diagnostic_only",
58
+ reasons: present ? ["receiver context is present but does not settle lift"] : ["receiver context is missing or not accepted"],
59
+ settled: false,
60
+ workflow_usable: true
61
+ };
62
+ }
63
+ function mapLiquidityToPaths(packet, graph) {
64
+ const pathCount = records(graph.edges).filter(
65
+ (edge) => edge.accepted === true
66
+ ).length;
67
+ return {
68
+ accepted: true,
69
+ execution_authority_granted: false,
70
+ mapped_path_count: 0,
71
+ packet_id: packetId(packet),
72
+ positive_path_contribution: false,
73
+ reasons: [
74
+ `observed ${pathCount} graph edges`,
75
+ "liquidity-to-path mapping is diagnostic-only until execution path rules pass"
76
+ ],
77
+ settled: false,
78
+ workflow_usable: true
79
+ };
80
+ }
81
+ function estimateCapitalImpact(reports) {
82
+ const positive = reports.filter(
83
+ (report) => report.positive_ecpt_component_lift === true
84
+ ).length;
85
+ return {
86
+ accepted: true,
87
+ estimated_positive_lift_count: positive,
88
+ execution_authority_granted: false,
89
+ false_liquidity_risk: reports.length - positive,
90
+ report_count: reports.length,
91
+ report_id: "alt-capital-impact",
92
+ settled: false,
93
+ workflow_usable: true
94
+ };
95
+ }
96
+ export {
97
+ estimateCapitalImpact,
98
+ mapLiquidityToPaths,
99
+ verifyAltEcptLift,
100
+ verifyReceiverLift
101
+ };
@@ -0,0 +1,8 @@
1
+ type JsonRecord = Record<string, unknown>;
2
+ declare function diagnoseBottlenecks(graph: JsonRecord): JsonRecord;
3
+ declare function buildMinimalEnablingConditions(bottleneckId: string, report?: JsonRecord): JsonRecord[];
4
+ declare function invertBottlenecks(report: JsonRecord): JsonRecord;
5
+ declare function buildInversionCertificate(candidate: JsonRecord): JsonRecord;
6
+ declare function compareBottleneckBaseline(baseline: JsonRecord, candidate: JsonRecord): JsonRecord;
7
+
8
+ export { buildInversionCertificate, buildMinimalEnablingConditions, compareBottleneckBaseline, diagnoseBottlenecks, invertBottlenecks };
@@ -0,0 +1,213 @@
1
+ // src/bit_engine/index.ts
2
+ var BOTTLENECK_CLASSES = [
3
+ "missing_evidence",
4
+ "missing_verifier_route",
5
+ "missing_semantic_edge",
6
+ "missing_rollback_support",
7
+ "missing_authority",
8
+ "missing_receiver_context",
9
+ "identity_sybil_blocker",
10
+ "stale_packet",
11
+ "false_liquidity_blocker",
12
+ "salience_obstruction",
13
+ "queue_occupation",
14
+ "missing_alt_lift",
15
+ "trace_boundary_mismatch",
16
+ "external_domain_obligation"
17
+ ];
18
+ function record(value) {
19
+ return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
20
+ }
21
+ function records(value) {
22
+ return Array.isArray(value) ? value.filter((item) => Boolean(record(item))) : [];
23
+ }
24
+ function strings(value) {
25
+ if (Array.isArray(value)) return value.map(String).sort();
26
+ if (value === void 0 || value === null) return [];
27
+ return [String(value)];
28
+ }
29
+ function classForBlocker(blocker) {
30
+ const normalized = blocker.replaceAll("-", "_");
31
+ if (BOTTLENECK_CLASSES.includes(normalized)) return normalized;
32
+ if (normalized.includes("evidence")) return "missing_evidence";
33
+ if (normalized.includes("verification")) return "missing_verifier_route";
34
+ if (normalized.includes("edge")) return "missing_semantic_edge";
35
+ if (normalized.includes("rollback")) return "missing_rollback_support";
36
+ if (normalized.includes("authority")) return "missing_authority";
37
+ if (normalized.includes("receiver")) return "missing_receiver_context";
38
+ if (normalized.includes("stale")) return "stale_packet";
39
+ if (normalized.includes("salience")) return "salience_obstruction";
40
+ if (normalized.includes("external")) return "external_domain_obligation";
41
+ return "external_domain_obligation";
42
+ }
43
+ function minimalConditions(bottleneckId, bottleneckClass) {
44
+ return [
45
+ {
46
+ condition_id: `mec:${bottleneckId}:evidence`,
47
+ condition_kind: "finite-evidence",
48
+ description: `provide finite evidence for ${bottleneckClass}`,
49
+ execution_authority_granted: false,
50
+ settled: false
51
+ },
52
+ {
53
+ condition_id: `mec:${bottleneckId}:audit`,
54
+ condition_kind: "post-check-audit",
55
+ description: "preserve residuals and rerun the relevant checker",
56
+ execution_authority_granted: false,
57
+ settled: false
58
+ }
59
+ ];
60
+ }
61
+ function diagnoseBottlenecks(graph) {
62
+ const diagnoses = [];
63
+ for (const node of records(graph.nodes)) {
64
+ for (const blocker of strings(record(node.eligibility)?.blockers)) {
65
+ const bottleneckClass = classForBlocker(blocker);
66
+ const bottleneckId = `bottleneck:${String(node.node_id)}:${bottleneckClass}`;
67
+ diagnoses.push({
68
+ accepted: true,
69
+ bottleneck_class: bottleneckClass,
70
+ bottleneck_id: bottleneckId,
71
+ capability_expression_paths: [
72
+ {
73
+ accepted: false,
74
+ path_id: `capability-path:${String(node.node_id)}`,
75
+ reasons: [`blocked by ${blocker}`],
76
+ settled: false
77
+ }
78
+ ],
79
+ minimal_enabling_conditions: minimalConditions(
80
+ bottleneckId,
81
+ bottleneckClass
82
+ ),
83
+ node_id: String(node.node_id ?? ""),
84
+ reasons: [`effective graph node is blocked by ${blocker}`],
85
+ settled: false
86
+ });
87
+ }
88
+ }
89
+ for (const edgeId of strings(graph.missing_edge_evidence)) {
90
+ const bottleneckId = `bottleneck:${edgeId}:missing_semantic_edge`;
91
+ diagnoses.push({
92
+ accepted: true,
93
+ bottleneck_class: "missing_semantic_edge",
94
+ bottleneck_id: bottleneckId,
95
+ edge_id: edgeId,
96
+ minimal_enabling_conditions: minimalConditions(
97
+ bottleneckId,
98
+ "missing_semantic_edge"
99
+ ),
100
+ reasons: ["edge lacks semantic evidence"],
101
+ settled: false
102
+ });
103
+ }
104
+ return {
105
+ accepted: true,
106
+ bottleneck_count: diagnoses.length,
107
+ bottlenecks: diagnoses.sort(
108
+ (a, b) => String(a.bottleneck_id).localeCompare(String(b.bottleneck_id))
109
+ ),
110
+ execution_authority_granted: false,
111
+ graph_id: String(graph.graph_id ?? ""),
112
+ report_id: "bottleneck-inversion-report",
113
+ settled: false,
114
+ workflow_usable: true
115
+ };
116
+ }
117
+ function buildMinimalEnablingConditions(bottleneckId, report) {
118
+ const found = records(report?.bottlenecks).find(
119
+ (item) => item.bottleneck_id === bottleneckId
120
+ );
121
+ if (found) return records(found.minimal_enabling_conditions);
122
+ return minimalConditions(bottleneckId, "external_domain_obligation");
123
+ }
124
+ function invertBottlenecks(report) {
125
+ const candidates = records(report.bottlenecks).map((bottleneck, index) => {
126
+ const bottleneckId = String(
127
+ bottleneck.bottleneck_id ?? `bottleneck:${index}`
128
+ );
129
+ const bottleneckClass = String(
130
+ bottleneck.bottleneck_class ?? "external_domain_obligation"
131
+ );
132
+ return {
133
+ accepted: true,
134
+ bottleneck_class: bottleneckClass,
135
+ bottleneck_id: bottleneckId,
136
+ candidate_id: `inversion-candidate:${bottleneckId}`,
137
+ expected_activation_gain: {
138
+ gain_lower_bound: bottleneckClass === "missing_semantic_edge" ? 0.2 : 0.1,
139
+ protocol_relative_only: true
140
+ },
141
+ execution_authority_granted: false,
142
+ minimal_enabling_conditions: buildMinimalEnablingConditions(
143
+ bottleneckId,
144
+ report
145
+ ),
146
+ post_inversion_audit_plan: {
147
+ audit_steps: ["rerun graph", "rerun observation", "preserve residuals"],
148
+ settled: false
149
+ },
150
+ reasons: ["inversion candidate is recommendation-only"],
151
+ risk_hazard_authority_notes: [
152
+ "host runtime authority required before external effects"
153
+ ],
154
+ rollback_or_deactivation_plan: {
155
+ plan_id: `rollback:${bottleneckId}`,
156
+ required: true,
157
+ settled: false
158
+ },
159
+ settled: false,
160
+ verification_cost: 1,
161
+ why_not_settled: "minimal enabling conditions are not discharged"
162
+ };
163
+ });
164
+ return {
165
+ accepted: true,
166
+ candidate_count: candidates.length,
167
+ candidates,
168
+ execution_authority_granted: false,
169
+ report_id: "bottleneck-inversion-candidates",
170
+ settled: false,
171
+ workflow_usable: true
172
+ };
173
+ }
174
+ function buildInversionCertificate(candidate) {
175
+ const selected = records(candidate.inversion_candidates)[0] ?? records(candidate.candidates)[0] ?? candidate;
176
+ return {
177
+ accepted: selected.accepted === true,
178
+ candidate: selected,
179
+ certificate_id: `inversion-certificate:${String(selected.candidate_id ?? "candidate")}`,
180
+ certificate_status: "candidate",
181
+ execution_authority_granted: false,
182
+ finite_requirements_passed: false,
183
+ reasons: [
184
+ "inversion certificate is a candidate only",
185
+ "post-inversion audit remains required"
186
+ ],
187
+ settled: false,
188
+ workflow_usable: true
189
+ };
190
+ }
191
+ function compareBottleneckBaseline(baseline, candidate) {
192
+ const delta = {
193
+ closure_witness_count: Number(candidate.closure_witness_count ?? 0) - Number(baseline.closure_witness_count ?? 0),
194
+ effective_edge_count: Number(candidate.effective_edge_count ?? 0) - Number(baseline.effective_edge_count ?? 0),
195
+ effective_node_count: Number(candidate.effective_node_count ?? 0) - Number(baseline.effective_node_count ?? 0),
196
+ residual_debt: Number(candidate.residual_debt ?? 0) - Number(baseline.residual_debt ?? 0)
197
+ };
198
+ return {
199
+ accepted: true,
200
+ activation_gain_estimate: delta,
201
+ execution_authority_granted: false,
202
+ report_id: "bottleneck-baseline-comparison",
203
+ settled: false,
204
+ workflow_usable: true
205
+ };
206
+ }
207
+ export {
208
+ buildInversionCertificate,
209
+ buildMinimalEnablingConditions,
210
+ compareBottleneckBaseline,
211
+ diagnoseBottlenecks,
212
+ invertBottlenecks
213
+ };