openstategraph 0.3.0__py3-none-any.whl
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.
- openstategraph/__init__.py +116 -0
- openstategraph/_extras.py +176 -0
- openstategraph/abc/__init__.py +146 -0
- openstategraph/abc/agent.py +571 -0
- openstategraph/abc/async_doors.py +186 -0
- openstategraph/abc/async_task_middleware.py +574 -0
- openstategraph/abc/criteria_check.py +59 -0
- openstategraph/abc/deep_tier_offload.py +809 -0
- openstategraph/abc/grader.py +425 -0
- openstategraph/abc/guardrail.py +416 -0
- openstategraph/abc/kanban_store.py +635 -0
- openstategraph/abc/middleware.py +111 -0
- openstategraph/abc/narration.py +640 -0
- openstategraph/abc/node_family.py +251 -0
- openstategraph/abc/orchestrator.py +852 -0
- openstategraph/abc/prompt.py +316 -0
- openstategraph/abc/router.py +501 -0
- openstategraph/abc/run_context_prompt.py +133 -0
- openstategraph/abc/tool.py +656 -0
- openstategraph/abc/tool_findings.py +766 -0
- openstategraph/abc/tool_notes.py +891 -0
- openstategraph/abc/tool_sentences.py +325 -0
- openstategraph/agent_brief.md +158 -0
- openstategraph/agent_brief.py +123 -0
- openstategraph/agent_config.py +436 -0
- openstategraph/agent_skills/kanban-patrol/SKILL.md +100 -0
- openstategraph/agent_skills/openstategraph/SKILL.md +250 -0
- openstategraph/agent_skills/openstategraph/references/build-loop.md +189 -0
- openstategraph/agent_skills/openstategraph/references/environments.md +117 -0
- openstategraph/agent_skills/openstategraph/references/interview.md +138 -0
- openstategraph/agent_skills/openstategraph/references/shapes.md +278 -0
- openstategraph/agent_skills/openstategraph/references/subagents.md +80 -0
- openstategraph/agent_skills/ticket-forge/SKILL.md +62 -0
- openstategraph/api/__init__.py +26 -0
- openstategraph/api/ambient_tools.py +65 -0
- openstategraph/api/audience.py +608 -0
- openstategraph/api/auth.py +397 -0
- openstategraph/api/broadcast.py +257 -0
- openstategraph/api/burst_recorder.py +175 -0
- openstategraph/api/capability_discovery.py +751 -0
- openstategraph/api/catalogue_events.py +148 -0
- openstategraph/api/chat_page.py +20 -0
- openstategraph/api/customer_graph.py +220 -0
- openstategraph/api/deps.py +103 -0
- openstategraph/api/diagram.py +102 -0
- openstategraph/api/editor_assets.py +352 -0
- openstategraph/api/embed.py +125 -0
- openstategraph/api/frame_clock.py +137 -0
- openstategraph/api/kanban_events.py +244 -0
- openstategraph/api/knowledge_build.py +162 -0
- openstategraph/api/knowledge_curation.py +176 -0
- openstategraph/api/listening.py +104 -0
- openstategraph/api/live_stream.py +150 -0
- openstategraph/api/main.py +366 -0
- openstategraph/api/model_resolution.py +319 -0
- openstategraph/api/mount_resolution.py +232 -0
- openstategraph/api/openapi_document.py +91 -0
- openstategraph/api/patrol_events.py +170 -0
- openstategraph/api/patrol_registry.py +136 -0
- openstategraph/api/plugin_capabilities.py +341 -0
- openstategraph/api/registries.py +454 -0
- openstategraph/api/routes/__init__.py +15 -0
- openstategraph/api/routes/chat_ui.py +57 -0
- openstategraph/api/routes/demo.py +68 -0
- openstategraph/api/routes/examples.py +92 -0
- openstategraph/api/routes/kanban.py +469 -0
- openstategraph/api/routes/mcp.py +324 -0
- openstategraph/api/routes/providers.py +130 -0
- openstategraph/api/routes/recordings.py +288 -0
- openstategraph/api/routes/runs.py +725 -0
- openstategraph/api/routes/site.py +80 -0
- openstategraph/api/routes/system.py +316 -0
- openstategraph/api/routes/threads.py +103 -0
- openstategraph/api/routes/workflows.py +1092 -0
- openstategraph/api/schemas.py +1765 -0
- openstategraph/api/services.py +447 -0
- openstategraph/api/site_pages.py +120 -0
- openstategraph/api/sse_contract.py +139 -0
- openstategraph/api/static/chat.html +2292 -0
- openstategraph/api/static/editor/assets/__vite-browser-external-DvHC826_.js +2 -0
- openstategraph/api/static/editor/assets/abnfDiagram-N423BO3Z-BSwYC7ml.js +2 -0
- openstategraph/api/static/editor/assets/arc-DDMrFQ_b.js +2 -0
- openstategraph/api/static/editor/assets/architecture-TIHT7OUA-JHDAwbjN.js +1 -0
- openstategraph/api/static/editor/assets/architectureDiagram-T3A2C74G-BP7p2NAG.js +37 -0
- openstategraph/api/static/editor/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
- openstategraph/api/static/editor/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
- openstategraph/api/static/editor/assets/array-BifhSqXX.js +2 -0
- openstategraph/api/static/editor/assets/blockDiagram-VBNYF7ZC-0h_dkxD-.js +133 -0
- openstategraph/api/static/editor/assets/c4Diagram-5PPSVZJV-DwLWEqq_.js +11 -0
- openstategraph/api/static/editor/assets/channel-Db-O9VqS.js +2 -0
- openstategraph/api/static/editor/assets/chunk-2GRJ4B5K-DXBJ0RsQ.js +2 -0
- openstategraph/api/static/editor/assets/chunk-2Q5K7J3B-C1jixKkw.js +2 -0
- openstategraph/api/static/editor/assets/chunk-4I5QYGJK-CsFwS4Lg.js +2 -0
- openstategraph/api/static/editor/assets/chunk-5RXB4S5H-BSEGk_ut.js +232 -0
- openstategraph/api/static/editor/assets/chunk-5VM5RSS4-ZNzvKenW.js +16 -0
- openstategraph/api/static/editor/assets/chunk-6Q2QTUOP-BHAoBLWf.js +89 -0
- openstategraph/api/static/editor/assets/chunk-7BUUIJ7U-Bb538aSH.js +2 -0
- openstategraph/api/static/editor/assets/chunk-7Z6QIM7H-B5bFtaqu.js +11 -0
- openstategraph/api/static/editor/assets/chunk-GF5L2VYU-DG5c0NFA.js +207 -0
- openstategraph/api/static/editor/assets/chunk-I66GZJ75-DmCheD4s.js +128 -0
- openstategraph/api/static/editor/assets/chunk-JQJVKLGR-8idHhP4j.js +157 -0
- openstategraph/api/static/editor/assets/chunk-JWPE2WC7-DVXcaiue.js +2 -0
- openstategraph/api/static/editor/assets/chunk-KBJHAD2P-BT9F3jrA.js +2 -0
- openstategraph/api/static/editor/assets/chunk-KEIR6QF5-DEvma7oi.js +162 -0
- openstategraph/api/static/editor/assets/chunk-NSK5VX7P-Dgz6OU53.js +3 -0
- openstategraph/api/static/editor/assets/chunk-QR6OTTB3-fys2tz_Z.js +63 -0
- openstategraph/api/static/editor/assets/chunk-RYQCIY6F-CRj7pW-i.js +2 -0
- openstategraph/api/static/editor/assets/chunk-UBXNYLIW-BK_OvCxP.js +2 -0
- openstategraph/api/static/editor/assets/chunk-W5SLKNZC-DCbgXbJu.js +2 -0
- openstategraph/api/static/editor/assets/chunk-WRU74C26-Dnm_SPAR.js +71 -0
- openstategraph/api/static/editor/assets/chunk-XXDRQBXY-CRqRy7wC.js +2 -0
- openstategraph/api/static/editor/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +2 -0
- openstategraph/api/static/editor/assets/classDiagram-JCYQIIEL-Depm8ksq.js +2 -0
- openstategraph/api/static/editor/assets/classDiagram-v2-OCEON4UE-Depm8ksq.js +2 -0
- openstategraph/api/static/editor/assets/cose-bilkent-JH36ORCC-D5TK9rNS.js +2 -0
- openstategraph/api/static/editor/assets/cynefin-VYW2F7L2-D4Q9WVaa.js +1 -0
- openstategraph/api/static/editor/assets/cynefinDiagram-MW4NZA55-CoHRISXQ.js +63 -0
- openstategraph/api/static/editor/assets/cytoscape.esm-C3UvhD5t.js +322 -0
- openstategraph/api/static/editor/assets/dagre-Buvkdvvj.js +2 -0
- openstategraph/api/static/editor/assets/dagre-VZM6K2ZE-D21mJWEs.js +5 -0
- openstategraph/api/static/editor/assets/defaultLocale-BFoDCU3G.js +2 -0
- openstategraph/api/static/editor/assets/diagram-7IWD3JNH-DH8djcKe.js +31 -0
- openstategraph/api/static/editor/assets/diagram-B4RE2ZJO-TCo5p7fm.js +4 -0
- openstategraph/api/static/editor/assets/diagram-LBJQPF4R-CgbTOT1t.js +25 -0
- openstategraph/api/static/editor/assets/diagram-Q27KOJAE-C66hKgaF.js +25 -0
- openstategraph/api/static/editor/assets/diagram-UB23O5K3-DfQdI_zj.js +42 -0
- openstategraph/api/static/editor/assets/dist-Cf7dFMHT.js +2 -0
- openstategraph/api/static/editor/assets/ebnfDiagram-BXEA7PRR-zmsTHIxX.js +2 -0
- openstategraph/api/static/editor/assets/erDiagram-JOGREHBK-CghTrytX.js +86 -0
- openstategraph/api/static/editor/assets/eventmodeling-45OFAUF4-CMwSn-Ho.js +1 -0
- openstategraph/api/static/editor/assets/flowDiagram-UKHOOZJN-C-_w-s1Q.js +1 -0
- openstategraph/api/static/editor/assets/ganttDiagram-PKOTCBZU-97e9PAPc.js +293 -0
- openstategraph/api/static/editor/assets/gitGraph-TEB2WS4Q-DRKzZwY3.js +1 -0
- openstategraph/api/static/editor/assets/gitGraphDiagram-DS77QQ5N-CW0XXeRI.js +107 -0
- openstategraph/api/static/editor/assets/graphlib-DS17s2tU.js +2 -0
- openstategraph/api/static/editor/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- openstategraph/api/static/editor/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
- openstategraph/api/static/editor/assets/ibm-plex-sans-latin-ext-wght-normal-CIII54If.woff2 +0 -0
- openstategraph/api/static/editor/assets/ibm-plex-sans-latin-wght-normal-IvpUvPa2.woff2 +0 -0
- openstategraph/api/static/editor/assets/index-C82F-VOn.js +97 -0
- openstategraph/api/static/editor/assets/index-aFbfZIkT.css +1 -0
- openstategraph/api/static/editor/assets/info-DKCQHKI2-SysKRxO_.js +1 -0
- openstategraph/api/static/editor/assets/infoDiagram-6WML65LV-DZbcdVbQ.js +3 -0
- openstategraph/api/static/editor/assets/init-C-OQMol4.js +2 -0
- openstategraph/api/static/editor/assets/ishikawaDiagram-WSZJBQD7-db9uBmh5.js +71 -0
- openstategraph/api/static/editor/assets/journeyDiagram-NVQOT4AX-BRA0mH1X.js +140 -0
- openstategraph/api/static/editor/assets/kanban-definition-27J2QSJJ-BC9rn5e4.js +90 -0
- openstategraph/api/static/editor/assets/katex-DolUETbr.js +258 -0
- openstategraph/api/static/editor/assets/line-B7qqN3Ir.js +2 -0
- openstategraph/api/static/editor/assets/linear-5J5m_kC5.js +2 -0
- openstategraph/api/static/editor/assets/map-BaFkSB1l.js +2 -0
- openstategraph/api/static/editor/assets/mermaid-parser.core-BGnhWAUE.js +8 -0
- openstategraph/api/static/editor/assets/mermaid.core-16iQohrd.js +43 -0
- openstategraph/api/static/editor/assets/mindmap-definition-FAOFIHXS-D5CjGmqV.js +97 -0
- openstategraph/api/static/editor/assets/node.browser-NgqoTrLm.js +2 -0
- openstategraph/api/static/editor/assets/openai-CkyQtVOo.js +19 -0
- openstategraph/api/static/editor/assets/ordinal-BDEzSJ7C.js +2 -0
- openstategraph/api/static/editor/assets/packet-7NZHBO7P-sQm5Oec1.js +1 -0
- openstategraph/api/static/editor/assets/path-COt_16Va.js +2 -0
- openstategraph/api/static/editor/assets/pegDiagram-VL7TDLO6-uYvU6KEE.js +2 -0
- openstategraph/api/static/editor/assets/pie-RZYD4A2V-BTbfwsIW.js +1 -0
- openstategraph/api/static/editor/assets/pieDiagram-7S7Q4E2Y-D_PiFPb_.js +40 -0
- openstategraph/api/static/editor/assets/quadrantDiagram-CIZ2JOQS-C8DSaWmz.js +8 -0
- openstategraph/api/static/editor/assets/radar-I7S5WNFK-CkFE88Ku.js +1 -0
- openstategraph/api/static/editor/assets/railroad-3IZDKUUU-Dts1ojtZ.js +1 -0
- openstategraph/api/static/editor/assets/railroad-abnf-AHOZXSZD-D-c7lnP-.js +1 -0
- openstategraph/api/static/editor/assets/railroad-ebnf-EBAXGLYW-C6_n505H.js +1 -0
- openstategraph/api/static/editor/assets/railroad-peg-LSFZ7HO6-CG9QfFVy.js +1 -0
- openstategraph/api/static/editor/assets/railroadDiagram-AXF67PYL-nuUZ0qwl.js +2 -0
- openstategraph/api/static/editor/assets/requirementDiagram-LRYGKXZP-DxBF5NhC.js +85 -0
- openstategraph/api/static/editor/assets/rough.esm-By172zw-.js +2 -0
- openstategraph/api/static/editor/assets/sankeyDiagram-W5VNT64P-CntNPYqA.js +41 -0
- openstategraph/api/static/editor/assets/sdk-Cp3Re1Le.js +38 -0
- openstategraph/api/static/editor/assets/sequenceDiagram-SI44F4Z6-HZo4SLa8.js +163 -0
- openstategraph/api/static/editor/assets/sizeCapture-X5ZJPWSS-B0uUizjq.js +2 -0
- openstategraph/api/static/editor/assets/src-DqrQFfgz.js +2 -0
- openstategraph/api/static/editor/assets/stateDiagram-OKZ733FA-CLS4pIgN.js +2 -0
- openstategraph/api/static/editor/assets/stateDiagram-v2-UEYNNEHI-COwAZwMg.js +2 -0
- openstategraph/api/static/editor/assets/swimlanes-SLNWSIFB-D29zxlMr.js +3 -0
- openstategraph/api/static/editor/assets/swimlanesDiagram-ULZ7WXOC-BDcjn2xv.js +9 -0
- openstategraph/api/static/editor/assets/timeline-definition-Z64GVDOM-CelnRNqa.js +121 -0
- openstategraph/api/static/editor/assets/treeView-QDETBFTQ-DFJeT3QC.js +1 -0
- openstategraph/api/static/editor/assets/treemap-6X3UGDF4-BEjfDtSh.js +1 -0
- openstategraph/api/static/editor/assets/vennDiagram-T6HMQDX7-CDZD7jBy.js +35 -0
- openstategraph/api/static/editor/assets/wardley-OPB4EBWU-CnK4FjgH.js +1 -0
- openstategraph/api/static/editor/assets/wardleyDiagram-T6FBY63Y-CAtiCqwR.js +79 -0
- openstategraph/api/static/editor/assets/xychartDiagram-ELKLHX3M-sU7T-aSM.js +8 -0
- openstategraph/api/static/editor/favicon.svg +41 -0
- openstategraph/api/static/editor/index.html +71 -0
- openstategraph/api/static/editor_missing.html +104 -0
- openstategraph/api/static/site/behind-the-scenes.html +1155 -0
- openstategraph/api/static/site/gallery.html +1969 -0
- openstategraph/api/static/site/index.html +1497 -0
- openstategraph/api/static/vendor/mermaid.min.js +3587 -0
- openstategraph/api/streaming.py +2909 -0
- openstategraph/api/team_board.py +133 -0
- openstategraph/api/threads.py +892 -0
- openstategraph/api/workflow_events.py +305 -0
- openstategraph/api/workflow_store.py +779 -0
- openstategraph/async_tasks.py +624 -0
- openstategraph/bundled_skills.py +152 -0
- openstategraph/catalogue.py +273 -0
- openstategraph/chat_model.py +414 -0
- openstategraph/cli.py +3461 -0
- openstategraph/compile/__init__.py +0 -0
- openstategraph/compile/checked_nodes.py +117 -0
- openstategraph/compile/composition.py +196 -0
- openstategraph/compile/context.py +476 -0
- openstategraph/compile/deep_tier.py +81 -0
- openstategraph/compile/diagnostics.py +772 -0
- openstategraph/compile/fields.py +121 -0
- openstategraph/compile/graph_names.py +80 -0
- openstategraph/compile/grounding.py +116 -0
- openstategraph/compile/mount_overrides.py +207 -0
- openstategraph/compile/mount_persistence.py +119 -0
- openstategraph/compile/node_catalogue.py +368 -0
- openstategraph/compile/node_doors.py +231 -0
- openstategraph/compile/node_families.py +125 -0
- openstategraph/compile/node_runtime.py +1516 -0
- openstategraph/compile/node_types.py +132 -0
- openstategraph/compile/nodes/__init__.py +94 -0
- openstategraph/compile/nodes/agent.py +785 -0
- openstategraph/compile/nodes/approval.py +91 -0
- openstategraph/compile/nodes/functions.py +166 -0
- openstategraph/compile/nodes/grader.py +467 -0
- openstategraph/compile/nodes/guard.py +440 -0
- openstategraph/compile/nodes/io.py +438 -0
- openstategraph/compile/nodes/memory.py +108 -0
- openstategraph/compile/nodes/mount.py +795 -0
- openstategraph/compile/nodes/named_check.py +66 -0
- openstategraph/compile/nodes/orchestration.py +493 -0
- openstategraph/compile/nodes/resolvers.py +200 -0
- openstategraph/compile/nodes/route_check.py +162 -0
- openstategraph/compile/nodes/router.py +225 -0
- openstategraph/compile/paused_mount.py +100 -0
- openstategraph/compile/port_specs.json +3871 -0
- openstategraph/compile/reducers.py +165 -0
- openstategraph/compile/reporting.py +458 -0
- openstategraph/compile/run_context.py +899 -0
- openstategraph/compile/runtime_services.py +187 -0
- openstategraph/compile/side_effects.py +143 -0
- openstategraph/compile/silent_turn.py +97 -0
- openstategraph/compile/state.py +839 -0
- openstategraph/compile/static_source.py +180 -0
- openstategraph/compile/subagents.py +272 -0
- openstategraph/compile/token_stream.py +138 -0
- openstategraph/compile/upstream.py +38 -0
- openstategraph/compile/workflow_compiler.py +2907 -0
- openstategraph/concurrent_producers.py +265 -0
- openstategraph/config_edit.py +340 -0
- openstategraph/config_file.py +939 -0
- openstategraph/counted_rows.py +475 -0
- openstategraph/delegations.py +158 -0
- openstategraph/deployment.py +248 -0
- openstategraph/developer_channel.py +351 -0
- openstategraph/document_checks.py +926 -0
- openstategraph/dotenv.py +270 -0
- openstategraph/editor_freshness.py +89 -0
- openstategraph/engineering_rules.md +165 -0
- openstategraph/engineering_rules.py +30 -0
- openstategraph/errors.py +457 -0
- openstategraph/evaluation/__init__.py +83 -0
- openstategraph/evaluation/dataset.py +225 -0
- openstategraph/evaluation/denotation.py +345 -0
- openstategraph/evaluation/recovery.py +78 -0
- openstategraph/evaluation/runner.py +578 -0
- openstategraph/evaluation/scoring.py +337 -0
- openstategraph/examples/__init__.py +302 -0
- openstategraph/examples/agentic-rag-rewrite/AGENTS.md +88 -0
- openstategraph/examples/agentic-rag-rewrite/knowledge/escalation-paths.md +30 -0
- openstategraph/examples/agentic-rag-rewrite/knowledge/incident-response.md +32 -0
- openstategraph/examples/agentic-rag-rewrite/knowledge/oncall-rotation.md +30 -0
- openstategraph/examples/agentic-rag-rewrite/knowledge/release-train.md +30 -0
- openstategraph/examples/agentic-rag-rewrite/knowledge/support-tiers.md +25 -0
- openstategraph/examples/agentic-rag-rewrite/tests/test_agentic_rag_rewrite_document.py +135 -0
- openstategraph/examples/agentic-rag-rewrite/workflow.json +91 -0
- openstategraph/examples/approval-in-the-loop/AGENTS.md +122 -0
- openstategraph/examples/approval-in-the-loop/tests/test_approval_in_the_loop_document.py +84 -0
- openstategraph/examples/approval-in-the-loop/workflow.json +65 -0
- openstategraph/examples/archetype-orchestrator-report/AGENTS.md +128 -0
- openstategraph/examples/archetype-orchestrator-report/tests/test_archetype_orchestrator_report_document.py +133 -0
- openstategraph/examples/archetype-orchestrator-report/workflow.json +147 -0
- openstategraph/examples/budget-exhaustion/AGENTS.md +97 -0
- openstategraph/examples/budget-exhaustion/tests/test_budget_exhaustion_document.py +73 -0
- openstategraph/examples/budget-exhaustion/workflow.json +67 -0
- openstategraph/examples/chained-summarizer/AGENTS.md +80 -0
- openstategraph/examples/chained-summarizer/tests/test_chained_summarizer_document.py +68 -0
- openstategraph/examples/chained-summarizer/workflow.json +61 -0
- openstategraph/examples/classifier-router-qa/AGENTS.md +60 -0
- openstategraph/examples/classifier-router-qa/tests/test_classifier_router_qa_document.py +75 -0
- openstategraph/examples/classifier-router-qa/workflow.json +115 -0
- openstategraph/examples/delegate-by-mount/AGENTS.md +87 -0
- openstategraph/examples/delegate-by-mount/tests/test_delegate_by_mount_document.py +122 -0
- openstategraph/examples/delegate-by-mount/workflow.json +145 -0
- openstategraph/examples/evaluator-optimizer/AGENTS.md +70 -0
- openstategraph/examples/evaluator-optimizer/tests/test_evaluator_optimizer_document.py +65 -0
- openstategraph/examples/evaluator-optimizer/workflow.json +67 -0
- openstategraph/examples/fanout-in-a-loop/AGENTS.md +113 -0
- openstategraph/examples/fanout-in-a-loop/tests/test_fanout_in_a_loop_document.py +93 -0
- openstategraph/examples/fanout-in-a-loop/workflow.json +93 -0
- openstategraph/examples/guarded-lookup/AGENTS.md +122 -0
- openstategraph/examples/guarded-lookup/tests/test_guarded_lookup_document.py +96 -0
- openstategraph/examples/guarded-lookup/tools/directory.py +102 -0
- openstategraph/examples/guarded-lookup/workflow.json +114 -0
- openstategraph/examples/index.json +194 -0
- openstategraph/examples/knowledge-lookup-qa/AGENTS.md +96 -0
- openstategraph/examples/knowledge-lookup-qa/knowledge/accessions.md +29 -0
- openstategraph/examples/knowledge-lookup-qa/knowledge/duplication.md +30 -0
- openstategraph/examples/knowledge-lookup-qa/knowledge/storage-tiers.md +30 -0
- openstategraph/examples/knowledge-lookup-qa/knowledge/viability-testing.md +36 -0
- openstategraph/examples/knowledge-lookup-qa/knowledge/withdrawals.md +29 -0
- openstategraph/examples/knowledge-lookup-qa/tests/test_knowledge_lookup_qa_document.py +119 -0
- openstategraph/examples/knowledge-lookup-qa/workflow.json +59 -0
- openstategraph/examples/morning-brief/AGENTS.md +138 -0
- openstategraph/examples/morning-brief/knowledge/gallery.md +29 -0
- openstategraph/examples/morning-brief/knowledge/on-call.md +35 -0
- openstategraph/examples/morning-brief/knowledge/release-checklist.md +31 -0
- openstategraph/examples/morning-brief/knowledge/support-desks.md +30 -0
- openstategraph/examples/morning-brief/tests/test_morning_brief_document.py +197 -0
- openstategraph/examples/morning-brief/workflow.json +164 -0
- openstategraph/examples/nested-mounts/AGENTS.md +120 -0
- openstategraph/examples/nested-mounts/tests/test_nested_mounts_document.py +129 -0
- openstategraph/examples/nested-mounts/workflow.json +48 -0
- openstategraph/examples/nested-mounts-mid/AGENTS.md +35 -0
- openstategraph/examples/nested-mounts-mid/workflow.json +48 -0
- openstategraph/examples/parallel-workers-join/AGENTS.md +95 -0
- openstategraph/examples/parallel-workers-join/tests/test_parallel_workers_join_document.py +81 -0
- openstategraph/examples/parallel-workers-join/workflow.json +74 -0
- openstategraph/examples/remembers-across-runs/AGENTS.md +111 -0
- openstategraph/examples/remembers-across-runs/tests/test_remembers_across_runs_document.py +101 -0
- openstategraph/examples/remembers-across-runs/workflow.json +92 -0
- openstategraph/examples/same-package-twice/AGENTS.md +87 -0
- openstategraph/examples/same-package-twice/tests/test_same_package_twice_document.py +148 -0
- openstategraph/examples/same-package-twice/workflow.json +71 -0
- openstategraph/examples/skill-driven-rubric/AGENTS.md +98 -0
- openstategraph/examples/skill-driven-rubric/tests/test_skill_driven_rubric_document.py +117 -0
- openstategraph/examples/skill-driven-rubric/workflow.json +87 -0
- openstategraph/examples/sql-qa/AGENTS.md +130 -0
- openstategraph/examples/sql-qa/data/Chinook_Sqlite.sqlite +0 -0
- openstategraph/examples/sql-qa/evals/sql-qa.eval.json +119 -0
- openstategraph/examples/sql-qa/tests/test_sql_qa_document.py +237 -0
- openstategraph/examples/sql-qa/workflow.json +88 -0
- openstategraph/examples/support-triage/AGENTS.md +204 -0
- openstategraph/examples/support-triage/tests/test_support_triage_document.py +171 -0
- openstategraph/examples/support-triage/workflow.json +157 -0
- openstategraph/examples/two-stage-double-loop/AGENTS.md +88 -0
- openstategraph/examples/two-stage-double-loop/tests/test_two_stage_double_loop_document.py +88 -0
- openstategraph/examples/two-stage-double-loop/workflow.json +99 -0
- openstategraph/examples/web-research-digest/AGENTS.md +139 -0
- openstategraph/examples/web-research-digest/tests/test_web_research_digest_document.py +131 -0
- openstategraph/examples/web-research-digest/workflow.json +89 -0
- openstategraph/examples/youtube-trend-digest/AGENTS.md +257 -0
- openstategraph/examples/youtube-trend-digest/tests/test_youtube_trend_digest_document.py +150 -0
- openstategraph/examples/youtube-trend-digest/workflow.json +118 -0
- openstategraph/executed_statements.py +157 -0
- openstategraph/extensions.py +554 -0
- openstategraph/function_contracts.py +149 -0
- openstategraph/gap_report.py +741 -0
- openstategraph/gap_report_client.py +201 -0
- openstategraph/gap_report_door.py +408 -0
- openstategraph/generated_module_contract.py +453 -0
- openstategraph/github_issue_bridge.py +375 -0
- openstategraph/grounded_numbers.py +226 -0
- openstategraph/injection.py +177 -0
- openstategraph/install_hint.py +225 -0
- openstategraph/kanban_migrations/0001_kanban_cards.sql +140 -0
- openstategraph/kanban_migrations/0002_kanban_cards_rls.sql +95 -0
- openstategraph/kanban_migrations/0003_gap_report_door.sql +195 -0
- openstategraph/kanban_migrations/0004_ledger_rls.sql +69 -0
- openstategraph/kanban_migrations/0005_card_gap_evidence.sql +33 -0
- openstategraph/kanban_migrations/0006_gap_cards_land_on_the_team_board.sql +128 -0
- openstategraph/kanban_postgres.py +446 -0
- openstategraph/kanban_sqlite.py +396 -0
- openstategraph/kanban_store.py +893 -0
- openstategraph/knowledge.py +199 -0
- openstategraph/knowledge_builders.py +736 -0
- openstategraph/knowledge_engines.py +354 -0
- openstategraph/knowledge_explorer.py +777 -0
- openstategraph/live.py +504 -0
- openstategraph/loader.py +1042 -0
- openstategraph/mcp_server.py +1879 -0
- openstategraph/mcp_sessions.py +416 -0
- openstategraph/memory.py +1240 -0
- openstategraph/memory_segment.py +348 -0
- openstategraph/messages.py +237 -0
- openstategraph/model_readiness.py +120 -0
- openstategraph/mssql_connection.py +276 -0
- openstategraph/node_report.py +209 -0
- openstategraph/opening.py +221 -0
- openstategraph/package_testing.py +180 -0
- openstategraph/patrol.py +557 -0
- openstategraph/plugin_interop.py +714 -0
- openstategraph/postgres.py +212 -0
- openstategraph/prebuilt_architect.py +179 -0
- openstategraph/prebuilt_databricks.py +184 -0
- openstategraph/prebuilt_email.py +143 -0
- openstategraph/prebuilt_knowledge.py +165 -0
- openstategraph/prebuilt_mcp.py +1720 -0
- openstategraph/prebuilt_mssql.py +206 -0
- openstategraph/prebuilt_platform.py +340 -0
- openstategraph/prebuilt_session.py +81 -0
- openstategraph/prebuilt_sql.py +246 -0
- openstategraph/prebuilt_warehouse.py +504 -0
- openstategraph/prebuilt_web.py +289 -0
- openstategraph/prebuilt_youtube.py +403 -0
- openstategraph/principal.py +193 -0
- openstategraph/progress.py +203 -0
- openstategraph/project_id_carriers.py +238 -0
- openstategraph/project_identity.py +188 -0
- openstategraph/providers.py +1323 -0
- openstategraph/py.typed +0 -0
- openstategraph/readable_tree.py +58 -0
- openstategraph/readonly_sqlite.py +148 -0
- openstategraph/reasoning.py +379 -0
- openstategraph/results.py +350 -0
- openstategraph/run_doors.py +305 -0
- openstategraph/run_findings.py +695 -0
- openstategraph/run_identity.py +81 -0
- openstategraph/run_journal.py +450 -0
- openstategraph/run_sinks.py +2046 -0
- openstategraph/run_stream.py +579 -0
- openstategraph/run_summary.py +291 -0
- openstategraph/scaffold.py +969 -0
- openstategraph/schema.py +269 -0
- openstategraph/search_backends.py +332 -0
- openstategraph/skills.py +218 -0
- openstategraph/sources.py +442 -0
- openstategraph/sql_reach.py +119 -0
- openstategraph/state_dir.py +173 -0
- openstategraph/step_budget.py +335 -0
- openstategraph/stream_parts.py +71 -0
- openstategraph/table_coverage.py +632 -0
- openstategraph/templates/__init__.py +162 -0
- openstategraph/templates/index.json +44 -0
- openstategraph/templates/loop/AGENTS.md +77 -0
- openstategraph/templates/loop/tests/test_shape.py +31 -0
- openstategraph/templates/loop/workflow.json +47 -0
- openstategraph/templates/minimal/AGENTS.md +51 -0
- openstategraph/templates/minimal/tests/test_shape.py +30 -0
- openstategraph/templates/minimal/workflow.json +20 -0
- openstategraph/templates/routed-qa/AGENTS.md +71 -0
- openstategraph/templates/routed-qa/tests/test_shape.py +37 -0
- openstategraph/templates/routed-qa/workflow.json +85 -0
- openstategraph/templates/team/AGENTS.md +50 -0
- openstategraph/templates/team/tests/test_shape.py +33 -0
- openstategraph/templates/team/workflow.json +64 -0
- openstategraph/units.py +201 -0
- openstategraph/validation.py +418 -0
- openstategraph/vocabulary.py +573 -0
- openstategraph/web_transport.py +131 -0
- openstategraph/workflows_root.py +200 -0
- openstategraph-0.3.0.dist-info/METADATA +162 -0
- openstategraph-0.3.0.dist-info/RECORD +456 -0
- openstategraph-0.3.0.dist-info/WHEEL +4 -0
- openstategraph-0.3.0.dist-info/entry_points.txt +2 -0
- openstategraph-0.3.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"""OpenStateGraph — a compiler from a vendor-neutral `workflow.json` to a
|
|
2
|
+
LangGraph `StateGraph`.
|
|
3
|
+
|
|
4
|
+
The public surface for *consuming* a workflow package you authored elsewhere
|
|
5
|
+
is deliberately one function:
|
|
6
|
+
|
|
7
|
+
from openstategraph import load_workflow
|
|
8
|
+
|
|
9
|
+
workflow = load_workflow("path/to/my-workflow")
|
|
10
|
+
print(workflow.ask("How many invoices are there?"))
|
|
11
|
+
|
|
12
|
+
A directory of them is a catalogue instead — the root and the defaults are set
|
|
13
|
+
once, listing is cheap and never compiles, and `load()` returns exactly the
|
|
14
|
+
object above:
|
|
15
|
+
|
|
16
|
+
from openstategraph import Workflows
|
|
17
|
+
|
|
18
|
+
catalog = Workflows("./workflows", model="anthropic:claude-sonnet-4-5")
|
|
19
|
+
catalog.published() # slug, name, node/edge counts
|
|
20
|
+
catalog.load("billing").ask("…")
|
|
21
|
+
|
|
22
|
+
Everything else — the editor's HTTP API, the MCP transport, the compiler and
|
|
23
|
+
runtime internals — stays in its own module and is imported only when used.
|
|
24
|
+
This package's own import touches neither LangGraph, LangChain nor FastAPI.
|
|
25
|
+
|
|
26
|
+
**Three tiers, and `__all__` here is the top one.**
|
|
27
|
+
|
|
28
|
+
- **Tier 1, semver-public**: the names below, everything in
|
|
29
|
+
`openstategraph.abc`, `openstategraph.errors`, `openstategraph.schema`,
|
|
30
|
+
`openstategraph.extensions` (whose entry-point *group names* live in third
|
|
31
|
+
parties' own `pyproject.toml` files), and
|
|
32
|
+
the `workflow.json` document format itself — which is more public than any
|
|
33
|
+
Python symbol we ship, because a document written against schema version *N*
|
|
34
|
+
must load on every release that claims to support *N*.
|
|
35
|
+
`run_context()` is here rather than under `.compile` for the reason ticket
|
|
36
|
+
73 found: it is read by code *we do not write* — a package's own `tools/`
|
|
37
|
+
and `functions/` — and a seam an outside author must build on cannot live
|
|
38
|
+
in a tier we may change in a minor release. The implementation stays in
|
|
39
|
+
`compile.run_context` beside the mint and the validator; this is a
|
|
40
|
+
re-export, never a second reader.
|
|
41
|
+
- **Tier 2, provisional**: `openstategraph.compile`, `.knowledge`,
|
|
42
|
+
`.plugin_interop`, `.prebuilt_*`. Importable and documented; may change in a
|
|
43
|
+
minor release with a changelog note.
|
|
44
|
+
- **Tier 3, internal**: `openstategraph.api.*` and `openstategraph.mcp_server`.
|
|
45
|
+
Surfaces we operate, not libraries others build on. No stability guarantee.
|
|
46
|
+
|
|
47
|
+
`docs/stability.md` is the contract, and `backend/tests/test_public_api.py`
|
|
48
|
+
enforces it against a checked-in signature snapshot — a test that merely
|
|
49
|
+
asserted `"load_workflow" in dir(...)` would never have caught the private
|
|
50
|
+
`_document_of` import that the public loader shipped with for months.
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
from openstategraph.catalogue import WorkflowInfo, Workflows
|
|
54
|
+
from openstategraph.live import LiveWorkflows, package_stamp
|
|
55
|
+
from openstategraph.errors import (
|
|
56
|
+
DocumentError,
|
|
57
|
+
InvalidPackageName,
|
|
58
|
+
OpenStateGraphError,
|
|
59
|
+
PackageNotFound,
|
|
60
|
+
RunProducedNothing,
|
|
61
|
+
SchemaVersionError,
|
|
62
|
+
StepBudgetExhausted,
|
|
63
|
+
ThreadNotResumable,
|
|
64
|
+
WorkflowPackageError,
|
|
65
|
+
)
|
|
66
|
+
from openstategraph.loader import (
|
|
67
|
+
DEFAULT_RECURSION_LIMIT,
|
|
68
|
+
CompiledWorkflow,
|
|
69
|
+
load_workflow,
|
|
70
|
+
)
|
|
71
|
+
from openstategraph.compile.run_context import run_context
|
|
72
|
+
from openstategraph.results import RunResult
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def _installed_version() -> str:
|
|
76
|
+
"""The version, from the installed distribution's own metadata.
|
|
77
|
+
|
|
78
|
+
Single-sourced deliberately from **metadata rather than a literal here**:
|
|
79
|
+
metadata is what an adopter can query about the thing they actually
|
|
80
|
+
installed, and a literal in this file can disagree with the wheel that
|
|
81
|
+
contains it. The fallback covers the case this repo's own test suite runs
|
|
82
|
+
in — imported from a source tree via `PYTHONPATH`, never installed — and is
|
|
83
|
+
the only place the number is written twice, so keep the two in step when
|
|
84
|
+
releasing (`backend/pyproject.toml` is the source).
|
|
85
|
+
"""
|
|
86
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
87
|
+
|
|
88
|
+
try:
|
|
89
|
+
return version("openstategraph")
|
|
90
|
+
except PackageNotFoundError: # source tree, not installed
|
|
91
|
+
return "0.3.0+source"
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
__version__ = _installed_version()
|
|
95
|
+
|
|
96
|
+
__all__ = [
|
|
97
|
+
"CompiledWorkflow",
|
|
98
|
+
"DEFAULT_RECURSION_LIMIT",
|
|
99
|
+
"DocumentError",
|
|
100
|
+
"InvalidPackageName",
|
|
101
|
+
"LiveWorkflows",
|
|
102
|
+
"OpenStateGraphError",
|
|
103
|
+
"PackageNotFound",
|
|
104
|
+
"RunProducedNothing",
|
|
105
|
+
"RunResult",
|
|
106
|
+
"SchemaVersionError",
|
|
107
|
+
"StepBudgetExhausted",
|
|
108
|
+
"ThreadNotResumable",
|
|
109
|
+
"WorkflowInfo",
|
|
110
|
+
"WorkflowPackageError",
|
|
111
|
+
"Workflows",
|
|
112
|
+
"__version__",
|
|
113
|
+
"load_workflow",
|
|
114
|
+
"package_stamp",
|
|
115
|
+
"run_context",
|
|
116
|
+
]
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"""Optional dependencies, and the message an adopter gets when one is missing.
|
|
2
|
+
|
|
3
|
+
**Internal — not part of the public API. Stability is not guaranteed.**
|
|
4
|
+
|
|
5
|
+
The lean core is four dependencies (`docs/decisions/framework-packaging.md` §3.1).
|
|
6
|
+
Everything else — the deepagents harness, the MCP SDK, the web server, the
|
|
7
|
+
three provider SDKs, sqlite persistence — lives behind an extra and is
|
|
8
|
+
imported at its one call site rather than at module scope.
|
|
9
|
+
|
|
10
|
+
That only works if a missing extra *says so*. An adopter who installs
|
|
11
|
+
`openstategraph`, draws an `agent.deep` node and gets
|
|
12
|
+
`ModuleNotFoundError: No module named 'deepagents'` has to guess which of our
|
|
13
|
+
extras owns that name. So every optional import goes through `require_extra`,
|
|
14
|
+
whose error names the exact `pip install` line — the same "degrade loud, never
|
|
15
|
+
silent" rule the loader already follows for unresolved capabilities.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from __future__ import annotations
|
|
19
|
+
|
|
20
|
+
import importlib
|
|
21
|
+
from dataclasses import dataclass
|
|
22
|
+
from types import ModuleType
|
|
23
|
+
from typing import Any
|
|
24
|
+
|
|
25
|
+
from openstategraph.install_hint import install_hint
|
|
26
|
+
|
|
27
|
+
def provider_extras() -> dict[str, str]:
|
|
28
|
+
"""Model-string prefix -> the extra supplying its LangChain integration.
|
|
29
|
+
|
|
30
|
+
`init_chat_model` imports the provider package by name, so a missing one
|
|
31
|
+
surfaces as its own ImportError; `provider_extra_hint` turns that into our
|
|
32
|
+
install line, because the adopter installed *us*, not `langchain-anthropic`.
|
|
33
|
+
|
|
34
|
+
Derived from the provider catalogue (ticket 02) rather than the five-entry
|
|
35
|
+
literal this used to be — a third-party provider's missing package now
|
|
36
|
+
produces an install hint too, instead of falling through to "we don't know
|
|
37
|
+
that prefix".
|
|
38
|
+
"""
|
|
39
|
+
from openstategraph.providers import provider_catalogue
|
|
40
|
+
|
|
41
|
+
return provider_catalogue().extras_by_prefix()
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@dataclass(frozen=True)
|
|
47
|
+
class DocumentRequirements:
|
|
48
|
+
"""Which extras one document asks for, and which prefixes we could not place.
|
|
49
|
+
|
|
50
|
+
Derived from the document alone — no import, no installation, no model call
|
|
51
|
+
— so it answers for a package on a machine that has never run it. The two
|
|
52
|
+
halves are the tolerant/strict pair CLAUDE.md asks for: every model string
|
|
53
|
+
is read in both spellings the product accepts, and a prefix the provider
|
|
54
|
+
catalogue does not know is *reported* rather than turned into a guessed
|
|
55
|
+
install line.
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
#: Sorted extra names, e.g. `("anthropic", "deep")`.
|
|
59
|
+
extras: tuple[str, ...] = ()
|
|
60
|
+
#: Sorted prefixes that looked like a provider and are not one here.
|
|
61
|
+
unknown_providers: tuple[str, ...] = ()
|
|
62
|
+
#: Human-readable "why", one per extra: extra -> what in the document asks.
|
|
63
|
+
reasons: tuple[tuple[str, str], ...] = ()
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def _nodes(document: dict[str, Any]) -> list[dict[str, Any]]:
|
|
67
|
+
nodes = document.get("nodes")
|
|
68
|
+
return [n for n in nodes if isinstance(n, dict)] if isinstance(nodes, list) else []
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def document_extras(document: dict[str, Any]) -> DocumentRequirements:
|
|
72
|
+
"""The extras a document needs to run, from the document's own text.
|
|
73
|
+
|
|
74
|
+
Three sources, and each is the one the runtime itself reads:
|
|
75
|
+
|
|
76
|
+
- **`settings.model`** is the colon spelling `init_chat_model` takes.
|
|
77
|
+
- **`data.model` on a node** is the *slash* spelling, and the two are not
|
|
78
|
+
interchangeable (`examples/youtube-trend-digest/AGENTS.md`). A value with
|
|
79
|
+
no `/`, or the provider `mock`, falls back to the document default at run
|
|
80
|
+
time — `NodeRuntime._base_model` — so it names no provider here either.
|
|
81
|
+
- **`data.tier == "deep"`** is the only thing that needs `[deep]`, and
|
|
82
|
+
`settings.checkpointer == "sqlite"` the only thing that needs `[sqlite]`.
|
|
83
|
+
"""
|
|
84
|
+
catalogue = provider_extras()
|
|
85
|
+
found: dict[str, str] = {}
|
|
86
|
+
unknown: dict[str, str] = {}
|
|
87
|
+
|
|
88
|
+
def _provider(prefix: str, source: str) -> None:
|
|
89
|
+
prefix = prefix.strip().lower()
|
|
90
|
+
if not prefix or prefix == "mock":
|
|
91
|
+
return
|
|
92
|
+
extra = catalogue.get(prefix)
|
|
93
|
+
if extra:
|
|
94
|
+
found.setdefault(extra, source)
|
|
95
|
+
else:
|
|
96
|
+
unknown.setdefault(prefix, source)
|
|
97
|
+
|
|
98
|
+
settings = document.get("settings")
|
|
99
|
+
settings = settings if isinstance(settings, dict) else {}
|
|
100
|
+
default_model = str(settings.get("model") or "")
|
|
101
|
+
if default_model:
|
|
102
|
+
_provider(default_model.split(":", 1)[0], f"settings.model: {default_model}")
|
|
103
|
+
|
|
104
|
+
deep_nodes: list[str] = []
|
|
105
|
+
for node in _nodes(document):
|
|
106
|
+
data = node.get("data")
|
|
107
|
+
data = data if isinstance(data, dict) else {}
|
|
108
|
+
node_id = str(node.get("id") or "?")
|
|
109
|
+
selection = str(data.get("model") or "")
|
|
110
|
+
provider, sep, model_id = selection.partition("/")
|
|
111
|
+
if sep and model_id:
|
|
112
|
+
_provider(provider, f"node {node_id}: {selection}")
|
|
113
|
+
if str(data.get("tier") or "") == "deep":
|
|
114
|
+
deep_nodes.append(node_id)
|
|
115
|
+
|
|
116
|
+
if deep_nodes:
|
|
117
|
+
found["deep"] = f"deep-tier node(s): {', '.join(sorted(deep_nodes))}"
|
|
118
|
+
if str(settings.get("checkpointer") or "") == "sqlite":
|
|
119
|
+
found["sqlite"] = 'settings.checkpointer: "sqlite"'
|
|
120
|
+
|
|
121
|
+
return DocumentRequirements(
|
|
122
|
+
extras=tuple(sorted(found)),
|
|
123
|
+
unknown_providers=tuple(sorted(unknown)),
|
|
124
|
+
reasons=tuple((extra, found[extra]) for extra in sorted(found)),
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
#: Re-exported, not reimplemented. This module used to hold a one-line
|
|
129
|
+
#: `pip install` of a single bracketed extra, which is the sentence
|
|
130
|
+
#: `osg-agent-experience/79` measured as unrunnable on a `uv tool` install of a
|
|
131
|
+
#: TestPyPI pre-release. `openstategraph.install_hint` owns it now, reading the
|
|
132
|
+
#: three facts that decide it; every caller here — `require_extra`,
|
|
133
|
+
#: `provider_extra_hint`, and the CLI's `_missing` — is unchanged and simply
|
|
134
|
+
#: gets a command that works.
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def require_extra(module: str, extra: str, why: str) -> ModuleType:
|
|
138
|
+
"""Import `module`, or raise an ImportError naming the extra that has it.
|
|
139
|
+
|
|
140
|
+
`why` completes the sentence "… is required for {why}" and should name the
|
|
141
|
+
*document-level* thing the adopter did — `tier='deep' agent nodes`, not an
|
|
142
|
+
internal function — because the document is what they can change.
|
|
143
|
+
"""
|
|
144
|
+
try:
|
|
145
|
+
return importlib.import_module(module)
|
|
146
|
+
except ImportError as exc: # pragma: no cover - exercised via monkeypatch
|
|
147
|
+
raise ImportError(
|
|
148
|
+
f"{module} is required for {why} — {install_hint(extra)}"
|
|
149
|
+
) from exc
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def provider_extra_hint(model_name: str) -> str | None:
|
|
153
|
+
"""The install line for the provider a model string names, if we know it.
|
|
154
|
+
|
|
155
|
+
Returns None for an unrecognised prefix rather than guessing: a wrong
|
|
156
|
+
install line is worse than none, and `init_chat_model`'s own error already
|
|
157
|
+
names the package it could not import.
|
|
158
|
+
"""
|
|
159
|
+
prefix = str(model_name or "").split(":", 1)[0].strip().lower()
|
|
160
|
+
extra = provider_extras().get(prefix)
|
|
161
|
+
return install_hint(extra) if extra else None
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
#: `PROVIDER_EXTRAS`, the module-level dict this used to export, is gone rather
|
|
165
|
+
#: than shimmed: a dict frozen at import time would lose every provider
|
|
166
|
+
#: registered afterwards, which is the exact closedness ticket 02 removed. This
|
|
167
|
+
#: module is internal (see the docstring), nothing imported the name, and
|
|
168
|
+
#: `provider_extras()` answers the same question against the live catalogue.
|
|
169
|
+
__all__ = [
|
|
170
|
+
"DocumentRequirements",
|
|
171
|
+
"document_extras",
|
|
172
|
+
"install_hint",
|
|
173
|
+
"provider_extra_hint",
|
|
174
|
+
"provider_extras",
|
|
175
|
+
"require_extra",
|
|
176
|
+
]
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"""The ladders a third party subclasses. **Tier 1 — semver-public.**
|
|
2
|
+
|
|
3
|
+
CLAUDE.md's non-negotiable is `I*` → `Abstract*` → `Base*` → concrete, and
|
|
4
|
+
every workflow package's `tools/*.py` already sits at the bottom of the tool
|
|
5
|
+
ladder. That made this the *most* public thing the framework ships — and it was
|
|
6
|
+
reachable only through deep module paths like `openstategraph.abc.tool`, from
|
|
7
|
+
an `__init__.py` that was empty. Adopters would have pinned those paths, and
|
|
8
|
+
then no file here could ever move.
|
|
9
|
+
|
|
10
|
+
So this is the blessed seam:
|
|
11
|
+
|
|
12
|
+
from openstategraph.abc import BaseTool, NoArgs, ToolResult
|
|
13
|
+
|
|
14
|
+
class ListTables(BaseTool):
|
|
15
|
+
name = "list_tables"
|
|
16
|
+
description = "Every table in the database."
|
|
17
|
+
node_type = "tool.list-tables"
|
|
18
|
+
Args = NoArgs
|
|
19
|
+
|
|
20
|
+
def _execute(self, args) -> ToolResult:
|
|
21
|
+
return ToolResult(content="…")
|
|
22
|
+
|
|
23
|
+
The deep paths keep working — this module re-exports rather than relocates, so
|
|
24
|
+
nothing that imports `openstategraph.abc.tool` breaks. New code should import
|
|
25
|
+
from here, because *this* name is the one covered by the stability contract in
|
|
26
|
+
`docs/stability.md`.
|
|
27
|
+
|
|
28
|
+
**What is here and what is not.** Every name below is a ladder an adopter
|
|
29
|
+
legitimately subclasses or constructs — a tool, a router, a grader, a
|
|
30
|
+
guardrail, an agent node, an orchestrator, a **node family** — plus the
|
|
31
|
+
collaborators those ladders compose
|
|
32
|
+
(`SystemPrompt`, `MiddlewareSlotTable`, `NodeBuildContext`). The registries
|
|
33
|
+
are **not** here and
|
|
34
|
+
are not public: entry points are the supported extension seam precisely so the
|
|
35
|
+
registry objects stay free to change shape.
|
|
36
|
+
|
|
37
|
+
`Field` is re-exported because a tool's `Args` model needs it and it would be
|
|
38
|
+
perverse to make an adopter import pydantic to write two lines against our
|
|
39
|
+
ladder. It is pydantic's own `Field`, unmodified.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
from __future__ import annotations
|
|
43
|
+
|
|
44
|
+
from openstategraph.abc.agent import (
|
|
45
|
+
AbstractAgentNode,
|
|
46
|
+
BaseAgentNode,
|
|
47
|
+
CustomGraphNode,
|
|
48
|
+
DeepAgentNode,
|
|
49
|
+
IAgent,
|
|
50
|
+
ReactAgentNode,
|
|
51
|
+
agent_node_for_tier,
|
|
52
|
+
)
|
|
53
|
+
from openstategraph.abc.grader import BaseGrader, Grader, IGrader, Verdict
|
|
54
|
+
from openstategraph.abc.guardrail import (
|
|
55
|
+
BaseGuardrail,
|
|
56
|
+
Guardrail,
|
|
57
|
+
GuardrailRule,
|
|
58
|
+
IGuardrail,
|
|
59
|
+
Redaction,
|
|
60
|
+
Screening,
|
|
61
|
+
)
|
|
62
|
+
from openstategraph.abc.middleware import MiddlewareSlotTable
|
|
63
|
+
from openstategraph.abc.node_family import (
|
|
64
|
+
BaseNodeFamily,
|
|
65
|
+
INodeFamily,
|
|
66
|
+
NodeBuildContext,
|
|
67
|
+
NodeCapabilities,
|
|
68
|
+
)
|
|
69
|
+
from openstategraph.abc.orchestrator import (
|
|
70
|
+
Archetype,
|
|
71
|
+
BaseOrchestrator,
|
|
72
|
+
IOrchestrator,
|
|
73
|
+
Orchestrator,
|
|
74
|
+
Subtask,
|
|
75
|
+
)
|
|
76
|
+
from openstategraph.abc.prompt import SystemPrompt
|
|
77
|
+
from openstategraph.abc.router import BaseRouter, Classification, IRouter, Router
|
|
78
|
+
from openstategraph.abc.tool import BaseTool, Field, ITool, NoArgs, ToolField, ToolResult
|
|
79
|
+
# What a tool says *about* the call it just made, beside the result itself:
|
|
80
|
+
# a corrective (`launch-readiness/117`) or a substitution it made on the
|
|
81
|
+
# user's behalf (`launch-readiness/127`). Same reasoning as `report_progress`
|
|
82
|
+
# below — this is the import line a tool author is given, and a second path
|
|
83
|
+
# for it would be a surface nobody finds.
|
|
84
|
+
from openstategraph.abc.tool_notes import (
|
|
85
|
+
Correction,
|
|
86
|
+
DeclaredUnit,
|
|
87
|
+
SourceChoice,
|
|
88
|
+
Substitution,
|
|
89
|
+
ToolFailure,
|
|
90
|
+
UncoveredWindow,
|
|
91
|
+
UnverifiedAnswer,
|
|
92
|
+
)
|
|
93
|
+
# Not a ladder — the one thing a tool does *while* it runs. It lives here
|
|
94
|
+
# because this is the import line a tool author is given, and a second
|
|
95
|
+
# path for it would be a surface nobody finds.
|
|
96
|
+
from openstategraph.progress import Progress, report_progress
|
|
97
|
+
|
|
98
|
+
__all__ = [
|
|
99
|
+
"AbstractAgentNode",
|
|
100
|
+
"Archetype",
|
|
101
|
+
"BaseAgentNode",
|
|
102
|
+
"BaseGrader",
|
|
103
|
+
"BaseGuardrail",
|
|
104
|
+
"BaseNodeFamily",
|
|
105
|
+
"BaseOrchestrator",
|
|
106
|
+
"BaseRouter",
|
|
107
|
+
"BaseTool",
|
|
108
|
+
"Classification",
|
|
109
|
+
"Correction",
|
|
110
|
+
"CustomGraphNode",
|
|
111
|
+
"DeepAgentNode",
|
|
112
|
+
"Field",
|
|
113
|
+
"Grader",
|
|
114
|
+
"Guardrail",
|
|
115
|
+
"GuardrailRule",
|
|
116
|
+
"IAgent",
|
|
117
|
+
"IGrader",
|
|
118
|
+
"IGuardrail",
|
|
119
|
+
"INodeFamily",
|
|
120
|
+
"IOrchestrator",
|
|
121
|
+
"IRouter",
|
|
122
|
+
"ITool",
|
|
123
|
+
"MiddlewareSlotTable",
|
|
124
|
+
"NoArgs",
|
|
125
|
+
"NodeBuildContext",
|
|
126
|
+
"NodeCapabilities",
|
|
127
|
+
"Orchestrator",
|
|
128
|
+
"Progress",
|
|
129
|
+
"ReactAgentNode",
|
|
130
|
+
"Redaction",
|
|
131
|
+
"Router",
|
|
132
|
+
"Screening",
|
|
133
|
+
"DeclaredUnit",
|
|
134
|
+
"SourceChoice",
|
|
135
|
+
"Substitution",
|
|
136
|
+
"ToolFailure",
|
|
137
|
+
"Subtask",
|
|
138
|
+
"SystemPrompt",
|
|
139
|
+
"ToolField",
|
|
140
|
+
"UncoveredWindow",
|
|
141
|
+
"UnverifiedAnswer",
|
|
142
|
+
"ToolResult",
|
|
143
|
+
"Verdict",
|
|
144
|
+
"agent_node_for_tier",
|
|
145
|
+
"report_progress",
|
|
146
|
+
]
|