packages feed

praxo-core 0.9.0 → 0.10.0

raw patch · 11 files changed

+360/−130 lines, 11 filesdep +directorydep +filepathPVP ok

version bump matches the API change (PVP)

Dependencies added: directory, filepath

API changes (from Hackage documentation)

- Praxo.Runtime: pathAllowed :: PathChecker -> String -> String -> Bool
+ Praxo.Runtime: pathAllowed :: PathChecker -> String -> String -> IO Bool
- Praxo.Runtime: pathCheck :: PathChecker -> String -> String -> Either String Decision
+ Praxo.Runtime: pathCheck :: PathChecker -> String -> String -> IO (Either String Decision)
- Praxo.Runtime: pathChecker :: [PathGrant] -> Either String PathChecker
+ Praxo.Runtime: pathChecker :: [PathGrant] -> IO (Either String PathChecker)

Files

README.md view
@@ -7,20 +7,27 @@ middleware, JSON Schema validation, plugin manifest parsing, and runtime helpers.  - Implementation type: Core.-- Package version: `0.7.1`; supported `SPEC_VERSION`: `0.2.0`.+- Source version: `0.10.0` (unreleased, untagged); Hackage remains `0.9.0`.+- Supported `SPEC_VERSION`: `0.2.0`. Migrating from `0.9.0` requires binding+  `pathChecker`, `pathCheck`, and `pathAllowed` in `IO`; see [CHANGELOG.md](CHANGELOG.md). - Local gate: all eleven shared vector groups, native regression tests, and   source API/parity checks. - Linux and Windows CI run the full suite. Hackage publication uses-  `.github/workflows/haskell-release.yml`; production readiness is not implied+  `.github/workflows/release-haskell.yml`; production readiness is not implied   by the source tag. +PRAXO-CORE (also written praxocore) provides an embeddable, MIT-licensed agent framework for Haskell, with tool calling, policy hooks, human-in-the-loop approval, checkpoints, and execution events. Use the language-specific scope and verification evidence below; a package listing does not establish Go feature parity or production readiness.+ ## Registry and Coding-Agent Entry +- Get started, prerequisites, and installation: [language documentation](https://axisvela.github.io/praxo-core/languages/haskell/)+- [Examples](https://github.com/axisvela/praxo-core/tree/main/language/haskell/examples): runnable language-specific examples; see each README for prerequisites and verification.+- [Scenario tutorials](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial): read the scope and validation status; source is not portfolio acceptance.+- Reference applications: no language-specific accepted end-to-end application recorded; see the [tutorial catalog](https://axisvela.github.io/praxo-core/getting-started/tutorial-catalog/). - Registry introduction: [REGISTRY.md](https://github.com/axisvela/praxo-core/blob/main/language/haskell/REGISTRY.md) - Machine-readable entry: [llms.txt](https://github.com/axisvela/praxo-core/blob/main/language/haskell/llms.txt) and [llms.md](https://github.com/axisvela/praxo-core/blob/main/language/haskell/llms.md)-- [Examples](https://github.com/axisvela/praxo-core/tree/main/language/haskell/examples): runnable language-specific examples. - Coding-agent contract: [docs/getting-started/coding-agents.md](https://github.com/axisvela/praxo-core/blob/main/docs/getting-started/coding-agents.md)-- Registry: [Hackage](https://hackage.haskell.org/package/praxo-core-0.8.0)+- Registry: [Hackage](https://hackage.haskell.org/package/praxo-core-0.9.0) - Community: [X](https://x.com/axisvela) · [Weibo](https://weibo.com/u/1936025761) · [LinkedIn](https://www.linkedin.com/company/axisvela/) · [Facebook](https://www.facebook.com/profile.php?id=61596905732406) · [YouTube](https://www.youtube.com/@axisvela) · [Discord](https://discord.com/channels/1575163993767809064/1575164343148875977) · [GitHub Discussions](https://github.com/axisvela/praxo-core/discussions) · [GitHub Issues](https://github.com/axisvela/praxo-core/issues) · [Documentation](https://axisvela.github.io/praxo-core/) · [Architect](https://axisvela.architect.pub)  ## Get started@@ -28,7 +35,7 @@ Install the published package:  ```bash-cabal install praxo-core+cabal install --lib praxo-core-0.9.0 ```  Then run the smallest deterministic example:@@ -254,6 +261,42 @@ [language policy](../../docs/contributing/language-policy.md). The parity inventory records the implemented Core surfaces. See [SETUP.md](SETUP.md) for local setup and test commands.+++## Tutorials and Reference Applications++Language-specific scenario tutorials and reference applications for Haskell.++### Scenario Tutorials++| Tutorial | What it shows |+| --- | --- |+| [literature-review](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial/literature-review) | A bounded first slice of [SC-01](https://axisvela.github.io/praxo-core/getting-started/agent-scenarios/), not autonomous scientific discovery. It searches a fixed synthetic pape... |+| [policy-simulation](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial/policy-simulation) | A bounded first slice of OG-02, not a policy-prediction engine. It simulates a small fixed synthetic population and drafts a review-only sensitivity report using the source Hask... |+| [rule-dsl](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial/rule-dsl) | A bounded business-rule validation tutorial. It parses a small access-rule DSL into a typed Haskell structure, detects allow/deny conflicts and returns a counterexample. Core co... |+| [test-generation](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial/test-generation) | A bounded first slice of SE-04, not a test-execution or load-testing service. It generates three bounded tests for a fixed local fixture and records zero executions. No load tar... |++Index: [language/haskell/Tutorial](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial).++### Reference Applications++No accepted end-to-end reference application is recorded for this language yet. Candidate goals are tracked in the [Reference Application Portfolio](https://axisvela.github.io/praxo-core/project/planning/roadmap/#reference-application-portfolio).++Planning context: [Tutorial Plan](https://axisvela.github.io/praxo-core/getting-started/tutorial-plan/), [100 candidate agent scenarios](https://axisvela.github.io/praxo-core/getting-started/agent-scenarios/), and [Tutorial Catalog](https://axisvela.github.io/praxo-core/getting-started/tutorial-catalog/). Chinese: [教程计划](https://axisvela.github.io/praxo-core/zh-CN/getting-started/tutorial-plan/), [候选场景](https://axisvela.github.io/praxo-core/zh-CN/getting-started/agent-scenarios/), [教程目录](https://axisvela.github.io/praxo-core/zh-CN/getting-started/tutorial-catalog/).++## Community++- X: <https://x.com/axisvela>+- Weibo: <https://weibo.com/u/1936025761>+- LinkedIn: <https://www.linkedin.com/company/axisvela/>+- Facebook: <https://www.facebook.com/profile.php?id=61596905732406>+- YouTube: <https://www.youtube.com/@axisvela>+- Discord: <https://discord.com/channels/1575163993767809064/1575164343148875977>+- GitHub Discussions: <https://github.com/axisvela/praxo-core/discussions>+- GitHub Issues: <https://github.com/axisvela/praxo-core/issues>+- Documentation: <https://axisvela.github.io/praxo-core/>+- Architect: <https://axisvela.architect.pub>+  ## License 
REGISTRY.md view
@@ -1,29 +1,59 @@ # PRAXO-CORE Haskell Registry Introduction -**Status:** published. Source version `0.9.0`, source-tag `haskell/v0.9.0`. Published registry version: `0.8.0`. Registry-pages are release snapshots; verify the published version before relying on a-feature.- ## Positioning -PRAXO-CORE is an embeddable, MIT-licensed AI agent framework. This package is its native Haskell Core. It implements all eleven declared vector groups and does not call Go or another Core. It includes a native callback-based agent loop with tools, policy hooks, typed events, memory, checkpoints, context budgets, middleware, JSON Schema validation, plugin manifest parsing, and runtime helpers.+PRAXO-CORE (also written praxocore) provides an embeddable, MIT-licensed agent framework for Haskell, with tool calling, policy hooks, human-in-the-loop approval, checkpoints, and execution events. Use the language-specific scope and verification evidence below; a package listing does not establish Go feature parity or production readiness. +**Status:** published 0.9.0; source 0.10.0 is unreleased and untagged. Source version `0.10.0`, source+tag `not tagged`. Published registry version: `0.9.0`. Registry+pages are release snapshots; verify the published version before relying on a feature.+ ## Package  | Field | Value | | --- | --- | | Package | `praxo-core` |-| Registry | [Hackage](https://hackage.haskell.org/package/praxo-core-0.8.0) |-| Source version | `0.9.0` |-| Published registry version | `0.8.0` |-| Install (published) | `cabal install praxo-core` |-| Install (source/release prepared) | `cabal install praxo-core` |-| Source tag | `haskell/v0.9.0` |+| Registry | [Hackage](https://hackage.haskell.org/package/praxo-core-0.9.0) |+| Source version | `0.10.0` |+| Published registry version | `0.9.0` |+| Install (published) | `cabal install --lib praxo-core-0.9.0` |+| Install (source/release prepared) | `cabal build --project-dir=language/haskell` |+| Source tag | `not tagged` | | Tier | Core | | Contract | `SPEC_VERSION` `0.2.0` | | Documentation | https://axisvela.github.io/praxo-core/languages/haskell/ | +## Get Started++Follow the [language README](https://axisvela.github.io/praxo-core/languages/haskell/) for runtime prerequisites,+installation, a first run, and local verification. The package table distinguishes+published installation from source builds; a pending registry is not available.++## Examples, Tutorials, and Applications++- [Examples](https://github.com/axisvela/praxo-core/tree/main/language/haskell/examples): runnable language-specific examples; see each README for prerequisites and verification.++### Scenario tutorials++- [literature-review](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial/literature-review): A bounded first slice of [SC-01](https://axisvela.github.io/praxo-core/getting-started/agent-scenarios/), not autonomous scientific discovery. It searches a fixed synthetic paper corpus, cites the top result, and drafts an explicitly unverified hypothesis. This uses the source Haskell Core through `runghc`; no network, credentials or packages are required beyond GHC.+- [policy-simulation](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial/policy-simulation): A bounded first slice of OG-02, not a policy-prediction engine. It simulates a small fixed synthetic population and drafts a review-only sensitivity report using the source Haskell Core through `runghc`. No tens-of-thousands scale, external simulator or real policy prediction.+- [rule-dsl](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial/rule-dsl): A bounded business-rule validation tutorial. It parses a small access-rule DSL into a typed Haskell structure, detects allow/deny conflicts and returns a counterexample. Core consumes that result and drafts a review-only revision. No rule is published or applied.+- [test-generation](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial/test-generation): A bounded first slice of SE-04, not a test-execution or load-testing service. It generates three bounded tests for a fixed local fixture and records zero executions. No load target, network traffic or runtime verification.++### Reference applications++No accepted end-to-end reference application is recorded for this language yet.++Application source is not end-to-end portfolio acceptance; read each README for scope and evidence.++- [Tutorial plan](https://axisvela.github.io/praxo-core/getting-started/tutorial-plan/) ([中文](https://axisvela.github.io/praxo-core/zh-CN/getting-started/tutorial-plan/)): delivery standards and the [reference application portfolio](https://axisvela.github.io/praxo-core/project/planning/roadmap/#reference-application-portfolio).+- [100 candidate agent scenarios](https://axisvela.github.io/praxo-core/getting-started/agent-scenarios/) ([中文](https://axisvela.github.io/praxo-core/zh-CN/getting-started/agent-scenarios/)): candidate business goals and their existing related slices.+- [Unified Tutorial Catalog](https://axisvela.github.io/praxo-core/getting-started/tutorial-catalog/) ([中文](https://axisvela.github.io/praxo-core/zh-CN/getting-started/tutorial-catalog/)): cross-language tutorials, examples, and reference-application paths.+- [llms.txt](llms.txt): compact machine-readable entry for this language.+- [llms.md](llms.md): Markdown version of the same entry.+- [Coding-agent contract](../../docs/getting-started/coding-agents.md): explicit+  scope, final-argument authorization, denial tests, and verification commands.+ ## Capabilities and Status  | Adapter | Status | Detail |@@ -37,14 +67,17 @@ | Subagent delegation | native (synchronous seam) | `Praxo.Delegation.subagentRun`; no asynchronous manager | | Retriever | native | `Praxo.Retriever.Document` and `Retriever` | -## Coding-agent entry+## Boundaries -- [Examples](https://github.com/axisvela/praxo-core/tree/main/language/haskell/examples): runnable language-specific examples.-- [Scenario tutorials](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial): scenario-oriented tutorials.-- [llms.txt](llms.txt): compact machine-readable entry for this language.-- [llms.md](llms.md): Markdown version of the same entry.-- [Coding-agent contract](../../docs/getting-started/coding-agents.md): explicit-  scope, final-argument authorization, denial tests, and verification commands.+- PRAXO-CORE is an embeddable, MIT-licensed execution kernel, not a hosted+  model, workflow engine, identity provider, or safety controller.+- Do not infer exactly-once execution, complete sandbox isolation, production+  security certification, live-provider behavior, or physical safety from this+  package.+- Check the registry page and source tag for the exact version; source READMEs+  and canonical documentation may be newer than a published registry page.+- Reference application sources are not end-to-end portfolio acceptance. See each+  README and the [verification evidence](https://axisvela.github.io/praxo-core/project/evaluation/verification-evidence/).  ## Community @@ -58,13 +91,3 @@ - GitHub Issues: <https://github.com/axisvela/praxo-core/issues> - Documentation: <https://axisvela.github.io/praxo-core/> - Architect: <https://axisvela.architect.pub>--## Boundaries--- PRAXO-CORE is an embeddable, MIT-licensed execution kernel, not a hosted-  model, workflow engine, identity provider, or safety controller.-- Do not infer exactly-once execution, complete sandbox isolation, production-  security certification, live-provider behavior, or physical safety from this-  package.-- Check the registry page and source tag for the exact version; source READMEs-  and canonical documentation may be newer than a published registry page.
SETUP.md view
@@ -33,7 +33,7 @@ Broader repository metadata and parity checks can be run separately:  ```powershell-python scripts/test_layout.py+python -m scripts.validation.test_layout $env:GOWORK = 'off' go test ./internal/spec/... ```
conformance/Main.hs view
@@ -32,8 +32,10 @@             unless (not (null vectors)) (fail "empty vector group")             forM vectors $ \vector -> do                 let name = asString (field "id" vector)-                result <- if group == "agent-loop" then checkAgent (field "input" vector) (field "expect" vector)-                          else pure (checkVector group (field "input" vector) (field "expect" vector))+                result <- case group of+                    "agent-loop" -> checkAgent (field "input" vector) (field "expect" vector)+                    "policy" -> checkPolicy (field "input" vector) (field "expect" vector)+                    _ -> pure (checkVector group (field "input" vector) (field "expect" vector))                 case result of                     Right () -> putStrLn ("PASS " ++ name) >> pure []                     Left message -> pure [name ++ ": " ++ message]@@ -148,18 +150,6 @@             Left detail -> Left detail             Right envelope -> check (codeOf (checkpointUnmarshal allow envelope) == expectedCode) "unmarshal error mismatch"         _ -> Left "unknown checkpoint operation"-checkVector "policy" input expected =-    let grants = [PathGrant (stringField "root" item) (if field "access" item == JNull then "read" else stringField "access" item) | item <- asArray (field "grants" input)]-        target = stringField "target" input-        need = if field "need" input == JNull then "read" else stringField "need" input-        result = pathChecker grants >>= \checker -> pathCheck checker target need-    in if field "error" expected == JBool True-        then case result of-            Left _ -> Right ()-            Right _ -> Left "expected policy error"-        else case result of-            Left code -> Left ("policy error " ++ code)-            Right decision -> check (decisionAllowed decision == (field "allowed" expected == JBool True)) "allowed mismatch" checkVector "context" input expected =     let messages = [ContextMessage (stringField "role" item) (stringField "content" item) [] [] Nothing | item <- asArray (field "messages" input)]         operation = stringField "operation" input@@ -216,6 +206,23 @@             in check (fallbackEither (Left "MODEL_ERROR" :: Either String String) (Right content) == Right content) "fallback mismatch"         _ -> Left "unknown middleware operation" checkVector _ _ _ = Left "unsupported vector group"++checkPolicy :: Json -> Json -> IO (Either String ())+checkPolicy input expected = do+    let grants = [PathGrant (stringField "root" item) (if field "access" item == JNull then "read" else stringField "access" item) | item <- asArray (field "grants" input)]+        target = stringField "target" input+        need = if field "need" input == JNull then "read" else stringField "need" input+    built <- pathChecker grants+    result <- case built of+        Left code -> pure (Left code)+        Right checker -> pathCheck checker target need+    pure $ if field "error" expected == JBool True+        then case result of+            Left _ -> Right ()+            Right _ -> Left "expected policy error"+        else case result of+            Left code -> Left ("policy error " ++ code)+            Right decision -> check (decisionAllowed decision == (field "allowed" expected == JBool True)) "allowed mismatch"  check :: Bool -> String -> Either String () check True _ = Right ()
llms.md view
@@ -1,22 +1,48 @@ # PRAXO-CORE Haskell -> Embeddable, governed agent execution kernel. This file is the language-specific-> registry and coding-agent entry; it does not guarantee discovery, installation,-> or adoption.+PRAXO-CORE (also written praxocore) provides an embeddable, MIT-licensed agent framework for Haskell, with tool calling, policy hooks, human-in-the-loop approval, checkpoints, and execution events. Use the language-specific scope and verification evidence below; a package listing does not establish Go feature parity or production readiness. +This is a language-specific discovery entry, not a guarantee of indexing or adoption.+ ## Package  - package: `praxo-core`-- registry: [Hackage](https://hackage.haskell.org/package/praxo-core-0.8.0)-- source_version: `0.9.0`-- published_version: `0.8.0`-- install_published: `cabal install praxo-core`-- install_source: `cabal install praxo-core`-- source_tag: `haskell/v0.9.0`+- registry: [Hackage](https://hackage.haskell.org/package/praxo-core-0.9.0)+- source_version: `0.10.0`+- published_version: `0.9.0`+- install_published: `cabal install --lib praxo-core-0.9.0`+- install_source: `cabal build --project-dir=language/haskell`+- source_tag: `not tagged` - tier: Core - contract: `SPEC_VERSION` `0.2.0` - documentation: https://axisvela.github.io/praxo-core/languages/haskell/ +## Start++- README: `README.md`+- Registry introduction: `REGISTRY.md`+- Markdown entry: `llms.md`+- Compact entry: `llms.txt`+- [Examples](https://github.com/axisvela/praxo-core/tree/main/language/haskell/examples): runnable language-specific examples; see each README for prerequisites and verification.++### Scenario tutorials++- [literature-review](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial/literature-review): A bounded first slice of [SC-01](https://axisvela.github.io/praxo-core/getting-started/agent-scenarios/), not autonomous scientific discovery. It searches a fixed synthetic paper corpus, cites the top result, and drafts an explicitly unverified hypothesis. This uses the source Haskell Core through `runghc`; no network, credentials or packages are required beyond GHC.+- [policy-simulation](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial/policy-simulation): A bounded first slice of OG-02, not a policy-prediction engine. It simulates a small fixed synthetic population and drafts a review-only sensitivity report using the source Haskell Core through `runghc`. No tens-of-thousands scale, external simulator or real policy prediction.+- [rule-dsl](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial/rule-dsl): A bounded business-rule validation tutorial. It parses a small access-rule DSL into a typed Haskell structure, detects allow/deny conflicts and returns a counterexample. Core consumes that result and drafts a review-only revision. No rule is published or applied.+- [test-generation](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial/test-generation): A bounded first slice of SE-04, not a test-execution or load-testing service. It generates three bounded tests for a fixed local fixture and records zero executions. No load target, network traffic or runtime verification.++### Reference applications++No accepted end-to-end reference application is recorded for this language yet.++Application source is not end-to-end portfolio acceptance; read each README for scope and evidence.++- [Tutorial plan](https://axisvela.github.io/praxo-core/getting-started/tutorial-plan/) ([中文](https://axisvela.github.io/praxo-core/zh-CN/getting-started/tutorial-plan/)): delivery standards and the [reference application portfolio](https://axisvela.github.io/praxo-core/project/planning/roadmap/#reference-application-portfolio).+- [100 candidate agent scenarios](https://axisvela.github.io/praxo-core/getting-started/agent-scenarios/) ([中文](https://axisvela.github.io/praxo-core/zh-CN/getting-started/agent-scenarios/)): candidate business goals and their existing related slices.+- [Unified Tutorial Catalog](https://axisvela.github.io/praxo-core/getting-started/tutorial-catalog/) ([中文](https://axisvela.github.io/praxo-core/zh-CN/getting-started/tutorial-catalog/)): cross-language tutorials, examples, and reference-application paths.+- Coding-agent contract: ../../docs/getting-started/coding-agents.md+ ## Capabilities and Status  - OpenAI-compatible model: native (transport seam) (Caller supplies `Transport`; no bundled HTTP client; SSE streaming reassembly)@@ -28,15 +54,15 @@ - Subagent delegation: native (synchronous seam) (`Praxo.Delegation.subagentRun`; no asynchronous manager) - Retriever: native (`Praxo.Retriever.Document` and `Retriever`) -## Start+## Boundaries -- README: `README.md`-- Registry introduction: `REGISTRY.md`-- Markdown entry: `llms.md`-- Compact entry: `llms.txt`-- [Examples](https://github.com/axisvela/praxo-core/tree/main/language/haskell/examples): runnable language-specific examples.-- [Scenario tutorials](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial): scenario-oriented tutorials.-- Coding-agent contract: ../../docs/getting-started/coding-agents.md+- In-process framework; not a model provider, hosted service, workflow engine,+  identity provider, or safety controller.+- No exactly-once, sandbox-isolation, production-security, real-time, or+  physical-safety claim.+- Registry pages are release snapshots. Verify the published version and read the+  canonical documentation for behavior and limits.+- Reference application sources are not end-to-end portfolio acceptance.  ## Community @@ -50,12 +76,3 @@ - GitHub Issues: <https://github.com/axisvela/praxo-core/issues> - Documentation: <https://axisvela.github.io/praxo-core/> - Architect: <https://axisvela.architect.pub>--## Boundaries--- In-process framework; not a model provider, hosted service, workflow engine,-  identity provider, or safety controller.-- No exactly-once, sandbox-isolation, production-security, real-time, or-  physical-safety claim.-- Registry pages are release snapshots. Verify the published version and read the-  canonical documentation for behavior and limits.
llms.txt view
@@ -1,22 +1,48 @@ # PRAXO-CORE Haskell -> Embeddable, governed agent execution kernel. This file is the language-specific-> registry and coding-agent entry; it does not guarantee discovery, installation,-> or adoption.+PRAXO-CORE (also written praxocore) provides an embeddable, MIT-licensed agent framework for Haskell, with tool calling, policy hooks, human-in-the-loop approval, checkpoints, and execution events. Use the language-specific scope and verification evidence below; a package listing does not establish Go feature parity or production readiness. +This is a language-specific discovery entry, not a guarantee of indexing or adoption.+ # Package  - package: `praxo-core`-- registry: [Hackage](https://hackage.haskell.org/package/praxo-core-0.8.0)-- source_version: `0.9.0`-- published_version: `0.8.0`-- install_published: `cabal install praxo-core`-- install_source: `cabal install praxo-core`-- source_tag: `haskell/v0.9.0`+- registry: [Hackage](https://hackage.haskell.org/package/praxo-core-0.9.0)+- source_version: `0.10.0`+- published_version: `0.9.0`+- install_published: `cabal install --lib praxo-core-0.9.0`+- install_source: `cabal build --project-dir=language/haskell`+- source_tag: `not tagged` - tier: Core - contract: `SPEC_VERSION` `0.2.0` - documentation: https://axisvela.github.io/praxo-core/languages/haskell/ +# Start++- README: `README.md`+- Registry introduction: `REGISTRY.md`+- Markdown entry: `llms.md`+- Compact entry: `llms.txt`+- [Examples](https://github.com/axisvela/praxo-core/tree/main/language/haskell/examples): runnable language-specific examples; see each README for prerequisites and verification.++## Scenario tutorials++- [literature-review](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial/literature-review): A bounded first slice of [SC-01](https://axisvela.github.io/praxo-core/getting-started/agent-scenarios/), not autonomous scientific discovery. It searches a fixed synthetic paper corpus, cites the top result, and drafts an explicitly unverified hypothesis. This uses the source Haskell Core through `runghc`; no network, credentials or packages are required beyond GHC.+- [policy-simulation](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial/policy-simulation): A bounded first slice of OG-02, not a policy-prediction engine. It simulates a small fixed synthetic population and drafts a review-only sensitivity report using the source Haskell Core through `runghc`. No tens-of-thousands scale, external simulator or real policy prediction.+- [rule-dsl](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial/rule-dsl): A bounded business-rule validation tutorial. It parses a small access-rule DSL into a typed Haskell structure, detects allow/deny conflicts and returns a counterexample. Core consumes that result and drafts a review-only revision. No rule is published or applied.+- [test-generation](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial/test-generation): A bounded first slice of SE-04, not a test-execution or load-testing service. It generates three bounded tests for a fixed local fixture and records zero executions. No load target, network traffic or runtime verification.++## Reference applications++No accepted end-to-end reference application is recorded for this language yet.++Application source is not end-to-end portfolio acceptance; read each README for scope and evidence.++- [Tutorial plan](https://axisvela.github.io/praxo-core/getting-started/tutorial-plan/) ([中文](https://axisvela.github.io/praxo-core/zh-CN/getting-started/tutorial-plan/)): delivery standards and the [reference application portfolio](https://axisvela.github.io/praxo-core/project/planning/roadmap/#reference-application-portfolio).+- [100 candidate agent scenarios](https://axisvela.github.io/praxo-core/getting-started/agent-scenarios/) ([中文](https://axisvela.github.io/praxo-core/zh-CN/getting-started/agent-scenarios/)): candidate business goals and their existing related slices.+- [Unified Tutorial Catalog](https://axisvela.github.io/praxo-core/getting-started/tutorial-catalog/) ([中文](https://axisvela.github.io/praxo-core/zh-CN/getting-started/tutorial-catalog/)): cross-language tutorials, examples, and reference-application paths.+- Coding-agent contract: ../../docs/getting-started/coding-agents.md+ # Capabilities and Status  - OpenAI-compatible model: native (transport seam) (Caller supplies `Transport`; no bundled HTTP client; SSE streaming reassembly)@@ -28,15 +54,15 @@ - Subagent delegation: native (synchronous seam) (`Praxo.Delegation.subagentRun`; no asynchronous manager) - Retriever: native (`Praxo.Retriever.Document` and `Retriever`) -# Start+# Boundaries -- README: `README.md`-- Registry introduction: `REGISTRY.md`-- Markdown entry: `llms.md`-- Compact entry: `llms.txt`-- [Examples](https://github.com/axisvela/praxo-core/tree/main/language/haskell/examples): runnable language-specific examples.-- [Scenario tutorials](https://github.com/axisvela/praxo-core/tree/main/language/haskell/Tutorial): scenario-oriented tutorials.-- Coding-agent contract: ../../docs/getting-started/coding-agents.md+- In-process framework; not a model provider, hosted service, workflow engine,+  identity provider, or safety controller.+- No exactly-once, sandbox-isolation, production-security, real-time, or+  physical-safety claim.+- Registry pages are release snapshots. Verify the published version and read the+  canonical documentation for behavior and limits.+- Reference application sources are not end-to-end portfolio acceptance.  # Community @@ -50,12 +76,3 @@ - GitHub Issues: <https://github.com/axisvela/praxo-core/issues> - Documentation: <https://axisvela.github.io/praxo-core/> - Architect: <https://axisvela.architect.pub>--# Boundaries--- In-process framework; not a model provider, hosted service, workflow engine,-  identity provider, or safety controller.-- No exactly-once, sandbox-isolation, production-security, real-time, or-  physical-safety claim.-- Registry pages are release snapshots. Verify the published version and read the-  canonical documentation for behavior and limits.
praxo-core.cabal view
@@ -1,11 +1,11 @@ cabal-version: 2.4 name: praxo-core-version: 0.9.0+version: 0.10.0 synopsis: Embeddable MIT-licensed AI agent framework for Haskell-description: Native agent loop with tools, policy hooks, typed events, memory,+description: PRAXO-CORE (praxocore) is a native Haskell agent framework with tools, policy hooks, typed events, memory,              checkpoints, context budgets, middleware, JSON Schema validation,              and plugin manifest parsing for the PRAXO-CORE agent framework.-category: Development+category: AI, Development maintainer: AxisVela <releases@axisvela.com> homepage: https://axisvela.github.io/praxo-core/ bug-reports: https://github.com/axisvela/praxo-core/issues@@ -23,7 +23,7 @@ library   hs-source-dirs: src   exposed-modules: Praxo.Agent, Praxo.Json, Praxo.ToolCall, Praxo.JsonSchema, Praxo.Pattern, Praxo.Plugin, Praxo.PluginProcess, Praxo.Runtime, Praxo.Middleware, Praxo.Wire, Praxo.OpenAICompatible, Praxo.Anthropic, Praxo.Gemini, Praxo.Harmovela, Praxo.Mcp, Praxo.Otel, Praxo.Retriever, Praxo.Delegation-  build-depends: base >=4.14 && <5, containers >=0.6 && <0.9, process >=1.6, process >=1.6+  build-depends: base >=4.14 && <5, containers >=0.6 && <0.9, directory >=1.3 && <2, filepath >=1.4 && <2, process >=1.6, process >=1.6   default-language: Haskell2010   ghc-options: -Wall @@ -38,6 +38,6 @@   type: exitcode-stdio-1.0   hs-source-dirs: tests   main-is: Main.hs-  build-depends: base >=4.14 && <5, praxo-core+  build-depends: base >=4.14 && <5, directory >=1.3 && <2, filepath >=1.4 && <2, praxo-core   default-language: Haskell2010   ghc-options: -Wall
src/Praxo/PluginProcess.hs view
@@ -8,6 +8,7 @@     , stopPluginProcess     ) where +import Control.Concurrent (forkIO) import Control.Exception (SomeException, try) import Data.Char (chr, digitToInt, intToDigit, isSpace) import Data.IORef@@ -66,7 +67,8 @@             }         case result of             Left (_ :: SomeException) -> pure (Left (err "INTERNAL" "plugin: spawn failed"))-            Right (Just input, Just output, _stderr, process) -> do+            Right (Just input, Just output, Just stderrHandle, process) -> do+                _ <- forkIO (drainHandle stderrHandle)                 seqRef <- newIORef 0                 activeRef <- newIORef False                 let host = PluginProcessHost (pluginId config) token input output process seqRef activeRef@@ -133,6 +135,19 @@                 | otherwise -> pure $ case base64Decode (asString (field "payload" value)) of                     Nothing -> Left (err "INTERNAL" "plugin: invalid payload")                     Just decoded -> Right decoded++-- A plugin that logs heavily to stderr must not block on a full pipe, so a+-- dedicated thread drains and discards stderr for the process lifetime.+drainHandle :: Handle -> IO ()+drainHandle handle = do+    _ <- try (hSetBinaryMode handle True >> loop) :: IO (Either SomeException ())+    pure ()+  where+    loop = do+        eof <- hIsEOF handle+        if eof+            then pure ()+            else hGetChar handle >> loop  normalizeCode :: String -> String normalizeCode code
src/Praxo/Runtime.hs view
@@ -7,6 +7,7 @@     , ContextBudget(..), ContextMessage(..), estimateTokens, compactContext, messageWire     ) where +import Control.Exception (IOException, try) import Data.Char (toLower) import Data.List (intercalate, isInfixOf, sortBy) import Data.Map.Strict (Map)@@ -14,6 +15,8 @@ import Data.Maybe (fromMaybe) import Data.Ord (comparing) import Praxo.Json (Json(..), asString, encodeJson, field, parseJson)+import System.Directory (canonicalizePath, doesPathExist, getCurrentDirectory, getSymbolicLinkTarget, pathIsSymbolicLink)+import System.FilePath (isAbsolute, takeDirectory, takeFileName, (</>)) import System.Info (os)  data MemoryRecord = MemoryRecord@@ -142,25 +145,39 @@         | otherwise = init acc     step acc part = acc ++ [part] -pathChecker :: [PathGrant] -> Either String PathChecker-pathChecker grants = PathChecker <$> mapM checkGrant grants+pathChecker :: [PathGrant] -> IO (Either String PathChecker)+pathChecker grants = do+    checked <- mapM checkGrant grants+    pure $ case sequence checked of+        Left code -> Left code+        Right resolved -> Right (PathChecker resolved)   where     checkGrant grant-        | null (grantRoot grant) = Left "POLICY_ERROR"-        | grantAccess grant `notElem` ["read", "write", "readwrite"] = Left "POLICY_ERROR"-        | otherwise = Right grant { grantRoot = normalizePath (grantRoot grant) }+        | null (grantRoot grant) = pure (Left "POLICY_ERROR")+        | grantAccess grant `notElem` ["read", "write", "readwrite"] = pure (Left "POLICY_ERROR")+        | otherwise = do+            resolved <- canonicalize (grantRoot grant)+            pure $ case resolved of+                Left code -> Left code+                Right root -> Right grant { grantRoot = root } -pathCheck :: PathChecker -> String -> String -> Either String Decision+pathCheck :: PathChecker -> String -> String -> IO (Either String Decision) pathCheck (PathChecker grants) target need-    | need `notElem` ["read", "write", "readwrite"] = Left "POLICY_ERROR"-    | null grants = Right (Decision False "no allowed roots")-    | any matches grants = Right (Decision True "allowed")-    | any (\grant -> within (grantRoot grant) resolved) grants = Right (Decision False "insufficient grant")-    | otherwise = Right (Decision False "outside roots")+    | need `notElem` ["read", "write", "readwrite"] = pure (Left "POLICY_ERROR")+    | null grants = pure (Right (Decision False "no allowed roots"))+    | otherwise = do+        resolved <- canonicalize target+        pure $ case resolved of+            Left code -> Left code+            Right value -> decide value   where-    resolved = normalizePath target-    matches grant = within (grantRoot grant) resolved && allows (grantAccess grant) need-    within root value = root == value || (root ++ "/") `isPrefixOf` value+    decide resolved+        | any matches grants = Right (Decision True "allowed")+        | any (\grant -> within (grantRoot grant) resolved) grants = Right (Decision False "insufficient grant")+        | otherwise = Right (Decision False "outside roots")+      where+        matches grant = within (grantRoot grant) resolved && allows (grantAccess grant) need+        within root value = root == value || (root ++ "/") `isPrefixOf` value  allows :: String -> String -> Bool allows "readwrite" _ = True@@ -168,10 +185,55 @@ allows "write" "write" = True allows _ _ = False -pathAllowed :: PathChecker -> String -> String -> Bool-pathAllowed checker target need = case pathCheck checker target need of-    Right decision -> decisionAllowed decision-    Left _ -> False+pathAllowed :: PathChecker -> String -> String -> IO Bool+pathAllowed checker target need = do+    result <- pathCheck checker target need+    pure $ case result of+        Right decision -> decisionAllowed decision+        Left _ -> False++canonicalize :: String -> IO (Either String String)+canonicalize value = do+    current <- getCurrentDirectory+    let anchored = if isAbsolute value then value else current </> value+    resolved <- resolveSteps 0 anchored+    pure (fmap normalizePath resolved)+  where+    resolveSteps steps path+        | steps > 256 = pure (Left "POLICY_ERROR")+        | otherwise = do+            exists <- doesPathExist path+            if exists+                then do+                    result <- try (canonicalizePath path) :: IO (Either IOException FilePath)+                    pure $ case result of+                        Left _ -> Left "POLICY_ERROR"+                        Right resolved -> Right (normalizePath resolved)+                else do+                    linkResult <- try (pathIsSymbolicLink path) :: IO (Either IOException Bool)+                    let isLink = either (const False) id linkResult+                    if isLink+                        then do+                            targetResult <- try (getSymbolicLinkTarget path) :: IO (Either IOException FilePath)+                            case targetResult of+                                Left _ -> pure (Left "POLICY_ERROR")+                                Right target -> do+                                    let combined = if isAbsolute target then target else takeDirectory path </> target+                                    resolveSteps (steps + 1) combined+                        else do+                            let parent = takeDirectory path+                            if parent == path+                                then pure (Right path)+                                else do+                                    parentResult <- resolveSteps (steps + 1) parent+                                    pure $ case parentResult of+                                        Left code -> Left code+                                        Right resolvedParent ->+                                            case takeFileName path of+                                                ".." -> Right (takeDirectory resolvedParent)+                                                "." -> Right resolvedParent+                                                "" -> Right resolvedParent+                                                name -> Right (resolvedParent </> name)  isPrefixOf :: String -> String -> Bool isPrefixOf prefix value = take (length prefix) value == prefix
src/Praxo/Wire.hs view
@@ -4,4 +4,4 @@ specVersion = "0.2.0"  sdkVersion :: String-sdkVersion = "0.9.0"+sdkVersion = "0.10.0"
tests/Main.hs view
@@ -1,5 +1,6 @@ module Main (main) where +import Control.Exception (IOException, try) import Control.Monad (forM_, unless) import Data.Either (isLeft) import Data.List (isInfixOf)@@ -22,19 +23,24 @@ import Praxo.Runtime import Praxo.ToolCall import Praxo.Wire+import System.Directory (createDirectory, createDirectoryLink, createFileLink, getTemporaryDirectory, removeFile, removePathForcibly)+import System.FilePath ((</>))+import System.Info (os)+import System.IO (hClose, openTempFile)  main :: IO () main = do     agentTests     hitlTests     runtimeTests+    policySymlinkTest     middlewareTests     adapterTests     providerTests     harmovelaTests     mcpTests     seamTests-    assert "contract version" (specVersion == "0.2.0" && sdkVersion == "0.9.0")+    assert "contract version" (specVersion == "0.2.0" && sdkVersion == "0.10.0")     forM_ ["", "01", "1.", "+1", "NaN", "1e", "[1,]", "{\"a\":1,}", "{}{}", "\"\\q\"", "\"\\ud800\"", "\"\\udc00\"", "\"\\ud800\\u0041\"", "\"line\nbreak\"", "true garbage"] $ \raw ->         assert ("invalid JSON " ++ show raw) (isLeft (parseJson raw))     assert "unicode escape" (parseJson "\"\\u00e9\\ud83d\\ude00\"" == Right (JString "\x00e9\x1f600"))@@ -317,13 +323,53 @@             Left detail -> fail detail             Right decoded -> assert "checkpoint roundtrip" (equalJson decoded (json "{\"value\":\"x\"}"))     assert "checkpoint allowlist" (checkpointMarshal allow "missing" JNull == Left "CHECKPOINT_TYPE_NOT_ALLOWED")-    let checker = either error id (pathChecker [PathGrant "allowed" "read"])-    assert "policy traversal" (not (pathAllowed checker "../allowed/secret" "read"))-    assert "policy inside" (pathAllowed checker "allowed/sub/../secret" "read")+    checkerResult <- pathChecker [PathGrant "allowed" "read"]+    let checker = either error id checkerResult+    traversal <- pathAllowed checker "../allowed/secret" "read"+    inside <- pathAllowed checker "allowed/sub/../secret" "read"+    assert "policy traversal" (not traversal)+    assert "policy inside" inside     assert "policy parent segments" (normalizePath "../../a/../b" == "../../b")     let messages = [ContextMessage "system" "sys" [] [] Nothing, ContextMessage "user" "message 0" [] [] Nothing, ContextMessage "user" "message 1" [] [] Nothing]     assert "context estimate" (estimateTokens messages == 16)     assert "context disabled" (let (output, ok) = compactContext (ContextBudget 0 0) messages in ok && length output == 3)++policySymlinkTest :: IO ()+policySymlinkTest = do+    temporary <- getTemporaryDirectory+    (path, handle) <- openTempFile temporary "praxo-policy-symlink"+    hClose handle+    removeFile path+    createDirectory path+    let root = path </> "root"+        outside = path </> "outside"+        subdir = outside </> "subdir"+    createDirectory root+    createDirectory outside+    createDirectory subdir+    writeFile (outside </> "secret.txt") "secret"+    linked <- try (createDirectoryLink subdir (root </> "link")) :: IO (Either IOException ())+    case linked of+        Left _ -> putStrLn "policy symlink test skipped (link unavailable)"+        Right () -> do+            checkerResult <- pathChecker [PathGrant root "readwrite"]+            case checkerResult of+                Left code -> fail ("policy symlink checker: " ++ code)+                Right checker -> do+                    if os /= "mingw32"+                        then do+                            parentEscape <- pathAllowed checker (root </> "link" </> ".." </> "secret.txt") "read"+                            assert "policy symlink parent escape" (not parentEscape)+                        else putStrLn "policy symlink parent test skipped on Windows"+                    missingEscape <- pathAllowed checker (root </> "link" </> "new.txt") "write"+                    assert "policy symlink missing target" (not missingEscape)+                    dangling <- try (createFileLink (outside </> "missing.txt") (root </> "dangling")) :: IO (Either IOException ())+                    case dangling of+                        Left _ -> putStrLn "policy dangling link test skipped (link unavailable)"+                        Right () -> do+                            danglingEscape <- pathAllowed checker (root </> "dangling") "write"+                            assert "policy dangling link escape" (not danglingEscape)+    removePathForcibly path  middlewareTests :: IO () middlewareTests = do