foxclaw 0.1.0__tar.gz
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.
- foxclaw-0.1.0/PKG-INFO +46 -0
- foxclaw-0.1.0/README.md +130 -0
- foxclaw-0.1.0/foxclaw/__init__.py +526 -0
- foxclaw-0.1.0/foxclaw/agents/__init__.py +12 -0
- foxclaw-0.1.0/foxclaw/agents/agents.py +35 -0
- foxclaw-0.1.0/foxclaw/agents/base.py +856 -0
- foxclaw-0.1.0/foxclaw/agents/impl/__init__.py +1 -0
- foxclaw-0.1.0/foxclaw/agents/impl/_helpers.py +78 -0
- foxclaw-0.1.0/foxclaw/agents/impl/finance.py +248 -0
- foxclaw-0.1.0/foxclaw/agents/impl/office.py +367 -0
- foxclaw-0.1.0/foxclaw/agents/impl/supervisor.py +659 -0
- foxclaw-0.1.0/foxclaw/agents/mixins/_context.py +130 -0
- foxclaw-0.1.0/foxclaw/agents/mixins/augment.py +149 -0
- foxclaw-0.1.0/foxclaw/agents/mixins/llm.py +66 -0
- foxclaw-0.1.0/foxclaw/agents/mixins/memory.py +35 -0
- foxclaw-0.1.0/foxclaw/agents/mixins/preference.py +81 -0
- foxclaw-0.1.0/foxclaw/agents/mixins/prompt.py +77 -0
- foxclaw-0.1.0/foxclaw/agents/mixins/skillbox.py +48 -0
- foxclaw-0.1.0/foxclaw/agents/mixins/tool_exec.py +431 -0
- foxclaw-0.1.0/foxclaw/api/__init__.py +280 -0
- foxclaw-0.1.0/foxclaw/api/app.py +123 -0
- foxclaw-0.1.0/foxclaw/api/middleware.py +281 -0
- foxclaw-0.1.0/foxclaw/api/routes/ahs.py +417 -0
- foxclaw-0.1.0/foxclaw/api/routes/attachments.py +117 -0
- foxclaw-0.1.0/foxclaw/api/routes/browser.py +39 -0
- foxclaw-0.1.0/foxclaw/api/routes/domain.py +297 -0
- foxclaw-0.1.0/foxclaw/api/routes/knowledge.py +163 -0
- foxclaw-0.1.0/foxclaw/api/routes/llm_admin.py +449 -0
- foxclaw-0.1.0/foxclaw/api/routes/memory.py +89 -0
- foxclaw-0.1.0/foxclaw/api/routes/orchestration.py +41 -0
- foxclaw-0.1.0/foxclaw/api/routes/recovery.py +43 -0
- foxclaw-0.1.0/foxclaw/api/routes/review.py +275 -0
- foxclaw-0.1.0/foxclaw/api/routes/search.py +37 -0
- foxclaw-0.1.0/foxclaw/api/routes/system.py +327 -0
- foxclaw-0.1.0/foxclaw/api/routes/task.py +281 -0
- foxclaw-0.1.0/foxclaw/api/routes/ws.py +68 -0
- foxclaw-0.1.0/foxclaw/api/spine.py +55 -0
- foxclaw-0.1.0/foxclaw/browser/__init__.py +13 -0
- foxclaw-0.1.0/foxclaw/browser/action/__init__.py +1 -0
- foxclaw-0.1.0/foxclaw/browser/action/action_executor.py +54 -0
- foxclaw-0.1.0/foxclaw/browser/action/action_types.py +45 -0
- foxclaw-0.1.0/foxclaw/browser/action/action_verifier.py +68 -0
- foxclaw-0.1.0/foxclaw/browser/action/url_policy.py +77 -0
- foxclaw-0.1.0/foxclaw/browser/adapter/__init__.py +1 -0
- foxclaw-0.1.0/foxclaw/browser/adapter/base_adapter.py +23 -0
- foxclaw-0.1.0/foxclaw/browser/adapter/web_adapter.py +46 -0
- foxclaw-0.1.0/foxclaw/browser/driver/__init__.py +1 -0
- foxclaw-0.1.0/foxclaw/browser/driver/base_driver.py +61 -0
- foxclaw-0.1.0/foxclaw/browser/driver/playwright_driver.py +123 -0
- foxclaw-0.1.0/foxclaw/browser/perception/__init__.py +1 -0
- foxclaw-0.1.0/foxclaw/browser/perception/dom_extractor.py +43 -0
- foxclaw-0.1.0/foxclaw/browser/perception/element_indexer.py +57 -0
- foxclaw-0.1.0/foxclaw/browser/perception/semantic_reducer.py +33 -0
- foxclaw-0.1.0/foxclaw/browser/perception/snapshot.py +29 -0
- foxclaw-0.1.0/foxclaw/browser/service.py +148 -0
- foxclaw-0.1.0/foxclaw/browser/session/__init__.py +1 -0
- foxclaw-0.1.0/foxclaw/browser/session/session_manager.py +57 -0
- foxclaw-0.1.0/foxclaw/capability/__init__.py +12 -0
- foxclaw-0.1.0/foxclaw/capability/embedding_service.py +67 -0
- foxclaw-0.1.0/foxclaw/channels/__init__.py +140 -0
- foxclaw-0.1.0/foxclaw/channels/discord.py +184 -0
- foxclaw-0.1.0/foxclaw/channels/dispatcher.py +190 -0
- foxclaw-0.1.0/foxclaw/channels/feishu.py +225 -0
- foxclaw-0.1.0/foxclaw/channels/openclaw_bridge.py +156 -0
- foxclaw-0.1.0/foxclaw/channels/signing.py +187 -0
- foxclaw-0.1.0/foxclaw/channels/telegram.py +121 -0
- foxclaw-0.1.0/foxclaw/channels/weixin.py +225 -0
- foxclaw-0.1.0/foxclaw/cli.py +154 -0
- foxclaw-0.1.0/foxclaw/cognitive/__init__.py +4 -0
- foxclaw-0.1.0/foxclaw/cognitive/reasoner.py +82 -0
- foxclaw-0.1.0/foxclaw/cognitive/state.py +147 -0
- foxclaw-0.1.0/foxclaw/core/__init__.py +9 -0
- foxclaw-0.1.0/foxclaw/core/audit_sink.py +90 -0
- foxclaw-0.1.0/foxclaw/core/compaction.py +283 -0
- foxclaw-0.1.0/foxclaw/core/config.py +65 -0
- foxclaw-0.1.0/foxclaw/core/confirm_nonce.py +157 -0
- foxclaw-0.1.0/foxclaw/core/dispatch.py +27 -0
- foxclaw-0.1.0/foxclaw/core/failure_policy.py +151 -0
- foxclaw-0.1.0/foxclaw/core/gateway.py +85 -0
- foxclaw-0.1.0/foxclaw/core/governance_audit.py +153 -0
- foxclaw-0.1.0/foxclaw/core/idempotency.py +289 -0
- foxclaw-0.1.0/foxclaw/core/injection_guard.py +207 -0
- foxclaw-0.1.0/foxclaw/core/memory_adapter.py +462 -0
- foxclaw-0.1.0/foxclaw/core/metrics.py +89 -0
- foxclaw-0.1.0/foxclaw/core/model_router.py +1103 -0
- foxclaw-0.1.0/foxclaw/core/recovery.py +362 -0
- foxclaw-0.1.0/foxclaw/core/scheduler.py +144 -0
- foxclaw-0.1.0/foxclaw/core/sessions.py +157 -0
- foxclaw-0.1.0/foxclaw/core/settings.py +426 -0
- foxclaw-0.1.0/foxclaw/core/shared_write.py +198 -0
- foxclaw-0.1.0/foxclaw/core/steering_queue.py +153 -0
- foxclaw-0.1.0/foxclaw/core/system_bus.py +84 -0
- foxclaw-0.1.0/foxclaw/core/thought_chain.py +318 -0
- foxclaw-0.1.0/foxclaw/core/token_meter.py +235 -0
- foxclaw-0.1.0/foxclaw/core/tools.py +172 -0
- foxclaw-0.1.0/foxclaw/core/tracing.py +390 -0
- foxclaw-0.1.0/foxclaw/core/truth_pipeline.py +114 -0
- foxclaw-0.1.0/foxclaw/core/verify.py +181 -0
- foxclaw-0.1.0/foxclaw/core/web_search.py +242 -0
- foxclaw-0.1.0/foxclaw/finance/__init__.py +15 -0
- foxclaw-0.1.0/foxclaw/finance/evidence.py +153 -0
- foxclaw-0.1.0/foxclaw/finance/fx.py +100 -0
- foxclaw-0.1.0/foxclaw/finance/graph.py +188 -0
- foxclaw-0.1.0/foxclaw/finance/models.py +150 -0
- foxclaw-0.1.0/foxclaw/finance/nlparse.py +575 -0
- foxclaw-0.1.0/foxclaw/finance/policy.py +329 -0
- foxclaw-0.1.0/foxclaw/finance/reasoner.py +129 -0
- foxclaw-0.1.0/foxclaw/finance/reasoning.py +340 -0
- foxclaw-0.1.0/foxclaw/finance/reconcile.py +180 -0
- foxclaw-0.1.0/foxclaw/finance/runtime.py +527 -0
- foxclaw-0.1.0/foxclaw/governance/__init__.py +24 -0
- foxclaw-0.1.0/foxclaw/governance/middleware.py +184 -0
- foxclaw-0.1.0/foxclaw/harness/__init__.py +17 -0
- foxclaw-0.1.0/foxclaw/harness/_base.py +72 -0
- foxclaw-0.1.0/foxclaw/harness/_policy.py +359 -0
- foxclaw-0.1.0/foxclaw/harness/drift.py +89 -0
- foxclaw-0.1.0/foxclaw/harness/event_bus.py +31 -0
- foxclaw-0.1.0/foxclaw/harness/harness.py +446 -0
- foxclaw-0.1.0/foxclaw/harness/loop_detection.py +152 -0
- foxclaw-0.1.0/foxclaw/itinerary/__init__.py +10 -0
- foxclaw-0.1.0/foxclaw/itinerary/amap_client.py +117 -0
- foxclaw-0.1.0/foxclaw/itinerary/models.py +80 -0
- foxclaw-0.1.0/foxclaw/itinerary/reasoner.py +101 -0
- foxclaw-0.1.0/foxclaw/itinerary/reasoning.py +174 -0
- foxclaw-0.1.0/foxclaw/itinerary/runtime.py +148 -0
- foxclaw-0.1.0/foxclaw/kernel/__init__.py +13 -0
- foxclaw-0.1.0/foxclaw/kernel/capabilities.py +73 -0
- foxclaw-0.1.0/foxclaw/kernel/policy_gate.py +107 -0
- foxclaw-0.1.0/foxclaw/kernel/process_manager.py +205 -0
- foxclaw-0.1.0/foxclaw/kernel/scheduler.py +131 -0
- foxclaw-0.1.0/foxclaw/kernel/sentinel.py +453 -0
- foxclaw-0.1.0/foxclaw/kernel/sentinel_client.py +246 -0
- foxclaw-0.1.0/foxclaw/kernel/spine.py +97 -0
- foxclaw-0.1.0/foxclaw/knowledge/__init__.py +371 -0
- foxclaw-0.1.0/foxclaw/knowledge/truth_crystallizer.py +92 -0
- foxclaw-0.1.0/foxclaw/learning/__init__.py +12 -0
- foxclaw-0.1.0/foxclaw/learning/knowledge_graph.py +149 -0
- foxclaw-0.1.0/foxclaw/learning/models.py +93 -0
- foxclaw-0.1.0/foxclaw/learning/reasoner.py +70 -0
- foxclaw-0.1.0/foxclaw/learning/runtime.py +363 -0
- foxclaw-0.1.0/foxclaw/learning/spaced_repetition.py +96 -0
- foxclaw-0.1.0/foxclaw/mcp_server.py +147 -0
- foxclaw-0.1.0/foxclaw/orchestration/__init__.py +184 -0
- foxclaw-0.1.0/foxclaw/pipeline/__init__.py +23 -0
- foxclaw-0.1.0/foxclaw/pipeline/cognitive_pipeline.py +481 -0
- foxclaw-0.1.0/foxclaw/pipeline/supervisor_stages.py +230 -0
- foxclaw-0.1.0/foxclaw/planning/__init__.py +17 -0
- foxclaw-0.1.0/foxclaw/planning/llm_planner.py +232 -0
- foxclaw-0.1.0/foxclaw/planning/planner.py +99 -0
- foxclaw-0.1.0/foxclaw/search/__init__.py +24 -0
- foxclaw-0.1.0/foxclaw/search/agent_port.py +194 -0
- foxclaw-0.1.0/foxclaw/search/evidence.py +113 -0
- foxclaw-0.1.0/foxclaw/search/external_search.py +50 -0
- foxclaw-0.1.0/foxclaw/search/hkc_read_port.py +60 -0
- foxclaw-0.1.0/foxclaw/search/internal_search.py +73 -0
- foxclaw-0.1.0/foxclaw/search/models.py +129 -0
- foxclaw-0.1.0/foxclaw/search/planner.py +44 -0
- foxclaw-0.1.0/foxclaw/search/retriever.py +39 -0
- foxclaw-0.1.0/foxclaw/search/runtime.py +134 -0
- foxclaw-0.1.0/foxclaw/search/strategy.py +44 -0
- foxclaw-0.1.0/foxclaw/skills/__init__.py +601 -0
- foxclaw-0.1.0/foxclaw/skills/hooks_spec.py +73 -0
- foxclaw-0.1.0/foxclaw/skills/lifecycle.py +278 -0
- foxclaw-0.1.0/foxclaw/skills/markdown_skill.py +174 -0
- foxclaw-0.1.0/foxclaw/skills/markdown_store.py +39 -0
- foxclaw-0.1.0/foxclaw/skills/mcp_client.py +190 -0
- foxclaw-0.1.0/foxclaw/skills/mcp_store.py +43 -0
- foxclaw-0.1.0/foxclaw/skills/permission.py +178 -0
- foxclaw-0.1.0/foxclaw/skills/pipeline.py +386 -0
- foxclaw-0.1.0/foxclaw/skills/policy.py +80 -0
- foxclaw-0.1.0/foxclaw/skills/review.py +72 -0
- foxclaw-0.1.0/foxclaw/skills/store.py +57 -0
- foxclaw-0.1.0/foxclaw.egg-info/PKG-INFO +46 -0
- foxclaw-0.1.0/foxclaw.egg-info/SOURCES.txt +278 -0
- foxclaw-0.1.0/foxclaw.egg-info/dependency_links.txt +1 -0
- foxclaw-0.1.0/foxclaw.egg-info/entry_points.txt +2 -0
- foxclaw-0.1.0/foxclaw.egg-info/requires.txt +46 -0
- foxclaw-0.1.0/foxclaw.egg-info/top_level.txt +2 -0
- foxclaw-0.1.0/pyproject.toml +231 -0
- foxclaw-0.1.0/setup.cfg +4 -0
- foxclaw-0.1.0/tests/test_agent_lifecycle.py +360 -0
- foxclaw-0.1.0/tests/test_ahs_p2.py +414 -0
- foxclaw-0.1.0/tests/test_anthropic_tools.py +206 -0
- foxclaw-0.1.0/tests/test_api.py +87 -0
- foxclaw-0.1.0/tests/test_api_auth.py +83 -0
- foxclaw-0.1.0/tests/test_api_host_guard.py +69 -0
- foxclaw-0.1.0/tests/test_attachments.py +167 -0
- foxclaw-0.1.0/tests/test_audit_sink.py +136 -0
- foxclaw-0.1.0/tests/test_browser.py +153 -0
- foxclaw-0.1.0/tests/test_capabilities.py +158 -0
- foxclaw-0.1.0/tests/test_channel_signing.py +192 -0
- foxclaw-0.1.0/tests/test_channel_trust.py +91 -0
- foxclaw-0.1.0/tests/test_channels.py +184 -0
- foxclaw-0.1.0/tests/test_cli.py +46 -0
- foxclaw-0.1.0/tests/test_compaction_toolpair.py +119 -0
- foxclaw-0.1.0/tests/test_config_layering.py +65 -0
- foxclaw-0.1.0/tests/test_confirm_nonce.py +197 -0
- foxclaw-0.1.0/tests/test_context_compaction_wiring.py +130 -0
- foxclaw-0.1.0/tests/test_dispatch.py +95 -0
- foxclaw-0.1.0/tests/test_domain_evals.py +403 -0
- foxclaw-0.1.0/tests/test_domain_import.py +78 -0
- foxclaw-0.1.0/tests/test_domain_reasoners.py +148 -0
- foxclaw-0.1.0/tests/test_e2e.py +178 -0
- foxclaw-0.1.0/tests/test_emb_cache.py +107 -0
- foxclaw-0.1.0/tests/test_embedding_singleton.py +89 -0
- foxclaw-0.1.0/tests/test_evals_smoke.py +114 -0
- foxclaw-0.1.0/tests/test_event_spine.py +182 -0
- foxclaw-0.1.0/tests/test_evidence_semantic.py +101 -0
- foxclaw-0.1.0/tests/test_evidence_sse.py +97 -0
- foxclaw-0.1.0/tests/test_file_ingest.py +146 -0
- foxclaw-0.1.0/tests/test_finance.py +153 -0
- foxclaw-0.1.0/tests/test_finance_ledger.py +252 -0
- foxclaw-0.1.0/tests/test_finance_persist.py +178 -0
- foxclaw-0.1.0/tests/test_gateway.py +103 -0
- foxclaw-0.1.0/tests/test_governance.py +468 -0
- foxclaw-0.1.0/tests/test_governance_audit.py +359 -0
- foxclaw-0.1.0/tests/test_governance_middleware.py +143 -0
- foxclaw-0.1.0/tests/test_hkc.py +286 -0
- foxclaw-0.1.0/tests/test_hkc_index_build_manager.py +341 -0
- foxclaw-0.1.0/tests/test_hkc_manifest_reuse.py +319 -0
- foxclaw-0.1.0/tests/test_hkc_search_event_sync.py +535 -0
- foxclaw-0.1.0/tests/test_injection_guard.py +211 -0
- foxclaw-0.1.0/tests/test_integration.py +141 -0
- foxclaw-0.1.0/tests/test_itinerary.py +103 -0
- foxclaw-0.1.0/tests/test_kee_semantic.py +89 -0
- foxclaw-0.1.0/tests/test_kernel.py +222 -0
- foxclaw-0.1.0/tests/test_learning.py +110 -0
- foxclaw-0.1.0/tests/test_llm_admin.py +160 -0
- foxclaw-0.1.0/tests/test_llm_planner.py +366 -0
- foxclaw-0.1.0/tests/test_markdown_skills.py +73 -0
- foxclaw-0.1.0/tests/test_markdown_skills_openclaw.py +71 -0
- foxclaw-0.1.0/tests/test_mcp_connectors.py +109 -0
- foxclaw-0.1.0/tests/test_mcp_guardian_discovery.py +91 -0
- foxclaw-0.1.0/tests/test_mcp_no_memory.py +43 -0
- foxclaw-0.1.0/tests/test_mcp_server.py +95 -0
- foxclaw-0.1.0/tests/test_memory_recall.py +95 -0
- foxclaw-0.1.0/tests/test_metrics.py +66 -0
- foxclaw-0.1.0/tests/test_multi_chain.py +102 -0
- foxclaw-0.1.0/tests/test_multimodal.py +135 -0
- foxclaw-0.1.0/tests/test_negotiation.py +146 -0
- foxclaw-0.1.0/tests/test_orchestration.py +119 -0
- foxclaw-0.1.0/tests/test_orchestration_decoupled.py +109 -0
- foxclaw-0.1.0/tests/test_p3_p5_hardening.py +338 -0
- foxclaw-0.1.0/tests/test_parallel_dispatch.py +216 -0
- foxclaw-0.1.0/tests/test_pipeline.py +533 -0
- foxclaw-0.1.0/tests/test_plan_visible.py +86 -0
- foxclaw-0.1.0/tests/test_planner.py +95 -0
- foxclaw-0.1.0/tests/test_policy_gate.py +109 -0
- foxclaw-0.1.0/tests/test_reasoner.py +185 -0
- foxclaw-0.1.0/tests/test_release_check.py +220 -0
- foxclaw-0.1.0/tests/test_resume_checkpoint.py +156 -0
- foxclaw-0.1.0/tests/test_routing.py +95 -0
- foxclaw-0.1.0/tests/test_scheduler.py +141 -0
- foxclaw-0.1.0/tests/test_search.py +204 -0
- foxclaw-0.1.0/tests/test_semantic.py +78 -0
- foxclaw-0.1.0/tests/test_sessions.py +91 -0
- foxclaw-0.1.0/tests/test_settings.py +281 -0
- foxclaw-0.1.0/tests/test_shadow_learning.py +330 -0
- foxclaw-0.1.0/tests/test_shared_write.py +207 -0
- foxclaw-0.1.0/tests/test_skills.py +133 -0
- foxclaw-0.1.0/tests/test_stats_and_events.py +165 -0
- foxclaw-0.1.0/tests/test_streaming.py +60 -0
- foxclaw-0.1.0/tests/test_supervisor_pipeline.py +177 -0
- foxclaw-0.1.0/tests/test_supervisor_triage.py +108 -0
- foxclaw-0.1.0/tests/test_taint.py +117 -0
- foxclaw-0.1.0/tests/test_task_stream.py +85 -0
- foxclaw-0.1.0/tests/test_thinking_sse.py +67 -0
- foxclaw-0.1.0/tests/test_thinking_stream.py +76 -0
- foxclaw-0.1.0/tests/test_tool_center.py +129 -0
- foxclaw-0.1.0/tests/test_tool_parallel.py +113 -0
- foxclaw-0.1.0/tests/test_tool_params.py +103 -0
- foxclaw-0.1.0/tests/test_tool_use.py +242 -0
- foxclaw-0.1.0/tests/test_toplevel_concurrency.py +117 -0
- foxclaw-0.1.0/tests/test_tracing.py +290 -0
- foxclaw-0.1.0/tests/test_truth_crystallizer.py +127 -0
- foxclaw-0.1.0/tests/test_truth_flow.py +93 -0
- foxclaw-0.1.0/tests/test_url_policy.py +53 -0
- foxclaw-0.1.0/tests/test_verify_evidence.py +225 -0
- foxclaw-0.1.0/tests/test_version_sync.py +71 -0
- foxclaw-0.1.0/tests/test_web_trigger.py +99 -0
foxclaw-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: foxclaw
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Foxclaw - Cognitive Agent Operating System built on HMR
|
|
5
|
+
Requires-Python: >=3.11
|
|
6
|
+
Requires-Dist: anthropic>=0.25.0
|
|
7
|
+
Requires-Dist: openai>=1.0.0
|
|
8
|
+
Requires-Dist: sentence-transformers>=2.7.0
|
|
9
|
+
Requires-Dist: numpy>=1.26.0
|
|
10
|
+
Requires-Dist: scikit-learn>=1.4.0
|
|
11
|
+
Requires-Dist: faiss-cpu>=1.8.0
|
|
12
|
+
Requires-Dist: fastapi>=0.111.0
|
|
13
|
+
Requires-Dist: uvicorn>=0.29.0
|
|
14
|
+
Requires-Dist: websockets>=12.0
|
|
15
|
+
Requires-Dist: pydantic>=2.0.0
|
|
16
|
+
Requires-Dist: mcp<2.0,>=1.27.0
|
|
17
|
+
Requires-Dist: httpx<0.28,>=0.24
|
|
18
|
+
Requires-Dist: cryptography>=41.0.0
|
|
19
|
+
Requires-Dist: pyyaml>=6.0.0
|
|
20
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
21
|
+
Requires-Dist: rich>=13.7.0
|
|
22
|
+
Provides-Extra: dev
|
|
23
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
24
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
|
|
25
|
+
Requires-Dist: ruff>=0.16; extra == "dev"
|
|
26
|
+
Requires-Dist: mypy>=1.10; extra == "dev"
|
|
27
|
+
Requires-Dist: coverage>=7.5; extra == "dev"
|
|
28
|
+
Requires-Dist: python-docx>=1.1; extra == "dev"
|
|
29
|
+
Requires-Dist: openpyxl>=3.1; extra == "dev"
|
|
30
|
+
Provides-Extra: browser
|
|
31
|
+
Requires-Dist: playwright>=1.44.0; extra == "browser"
|
|
32
|
+
Provides-Extra: gemini
|
|
33
|
+
Requires-Dist: google-generativeai>=0.8; extra == "gemini"
|
|
34
|
+
Provides-Extra: knowledge
|
|
35
|
+
Requires-Dist: networkx>=3.0; extra == "knowledge"
|
|
36
|
+
Requires-Dist: rank-bm25>=0.2; extra == "knowledge"
|
|
37
|
+
Requires-Dist: aiofiles>=23.0; extra == "knowledge"
|
|
38
|
+
Requires-Dist: requests>=2.31; extra == "knowledge"
|
|
39
|
+
Provides-Extra: knowledge-files
|
|
40
|
+
Requires-Dist: pymupdf>=1.24; extra == "knowledge-files"
|
|
41
|
+
Requires-Dist: ebooklib>=0.18; extra == "knowledge-files"
|
|
42
|
+
Requires-Dist: beautifulsoup4>=4.12; extra == "knowledge-files"
|
|
43
|
+
Requires-Dist: mobi>=0.3.3; extra == "knowledge-files"
|
|
44
|
+
Requires-Dist: python-multipart>=0.0.9; extra == "knowledge-files"
|
|
45
|
+
Requires-Dist: python-docx>=1.1; extra == "knowledge-files"
|
|
46
|
+
Requires-Dist: openpyxl>=3.1; extra == "knowledge-files"
|
foxclaw-0.1.0/README.md
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Foxclaw · Cognitive Agent Operating System
|
|
2
|
+
|
|
3
|
+
A **cognitive agent OS** built on the HMR memory runtime: three collaborating agents, cross-layer Harness governance, with the memory/cognition layer fully decoupled from any LLM.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
Traditional frameworks: memory = storage, agents = stateless execution
|
|
7
|
+
Foxclaw: memory = living cognitive runtime, agents = reason · learn · evolve
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## What it is
|
|
11
|
+
|
|
12
|
+
Foxclaw is not "yet another agent framework" but an operating system for agents. Its moats are independent of any LLM:
|
|
13
|
+
|
|
14
|
+
- **ThoughtChain** — each agent's reasoning is an auditable, comparable directed graph, not a log
|
|
15
|
+
- **Harness** — three-dimensional drift detection (semantic / tool / scope) + shadow-mode self-calibration + policy self-learning
|
|
16
|
+
- **Evolution** — every harness truncation teaches the policy; the system gets sharper with use
|
|
17
|
+
- **Runtime governance** — idempotency, crash recovery, loop detection, etc., keeping the system reliable under real-world operation
|
|
18
|
+
|
|
19
|
+
Three agents: Supervisor (coordination), Finance, Office (learning + itinerary). Each has isolated memory and policy evolution, mounts external ecosystems via the Skill layer, and connects to mainstream messaging platforms via the channel layer. The former Assistant and Admin responsibilities are now **instruction skills** (`skills/general-assistant`, `skills/schedule-itinerary`) mounted on demand, not separate agents.
|
|
20
|
+
|
|
21
|
+
## Domain kernels
|
|
22
|
+
|
|
23
|
+
Finance / Office each mount an isomorphic kernel (pure-algorithm layer + external tool interface + gatekeeper):
|
|
24
|
+
|
|
25
|
+
- **Finance** — budget reasoning, MAD anomaly detection, cash-flow forecast; gatekeeper with four permissions, emits approval requests rather than moving money. **Advanced trio**: structured evidence chains (explainable risk), financial data graph (trace who caused an overspend), reconciliation (3-tier matching + suspicious-charge detection).
|
|
26
|
+
- **Office** — SM-2 spaced repetition (mastery + forgetting risk) + knowledge graph (cluster discovery).
|
|
27
|
+
- **Office · itinerary** — TSP routing, reachability ("won't make it") detection, time conflicts, geo-clustering; integrates Amap.
|
|
28
|
+
|
|
29
|
+
## Messaging platforms
|
|
30
|
+
|
|
31
|
+
Four mainstream platforms via a unified channel abstraction, **each adapter implemented to its own official spec** (not one mold):
|
|
32
|
+
|
|
33
|
+
| Channel | Model | Credential |
|
|
34
|
+
|---------|-------|-----------|
|
|
35
|
+
| WeChat | iLink Bot API, long-poll + context_token | scan-login token |
|
|
36
|
+
| Feishu | event-subscription webhook + signature + token refresh | App ID/Secret |
|
|
37
|
+
| Telegram | Bot API getUpdates polling | bot token |
|
|
38
|
+
| Discord | Gateway WebSocket + REST | bot token |
|
|
39
|
+
|
|
40
|
+
Closed loop (`ChannelDispatcher`): receive → Supervisor → reply to origin, with per-channel session isolation and idempotent dedup. See [docs/CHANNELS.md](docs/CHANNELS.md).
|
|
41
|
+
|
|
42
|
+
## Runtime governance
|
|
43
|
+
|
|
44
|
+
Keeps the system reliable under message redelivery, crashes, long tasks, and loops. See [docs/GOVERNANCE.md](docs/GOVERNANCE.md): idempotency guard, crash/restart recovery (boot_id avoids pid reuse), tool-loop detection, context compaction, hook standardization, steering queue.
|
|
45
|
+
|
|
46
|
+
## Quick start
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install fastapi uvicorn "httpx<0.28" openai cryptography websockets pyyaml numpy scikit-learn rich pydantic
|
|
50
|
+
python tests/run_all.py # full regression (all green)
|
|
51
|
+
export DEEPSEEK_API_KEY=sk-... # or ANTHROPIC_API_KEY; unset → stub
|
|
52
|
+
python -m uvicorn foxclaw.api:app --port 8000
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
See [docs/RUN.md](docs/RUN.md). Chinese docs: [README_CN.md](README_CN.md).
|
|
56
|
+
|
|
57
|
+
> **Windows**: don't place the project under OneDrive-managed folders (Documents/Desktop/Pictures); Python can't create dirs inside redirect placeholders. Use a path like `C:\foxclaw`.
|
|
58
|
+
|
|
59
|
+
## Knowledge base (HKC) model config
|
|
60
|
+
|
|
61
|
+
HKC's knowledge base uses **two different types of models**, each for one job, both configured in `.env` — no code changes:
|
|
62
|
+
|
|
63
|
+
| Stage | Model type | What it does | Config keys |
|
|
64
|
+
|-------|-----------|-------------|-------------|
|
|
65
|
+
| Write (ingesting books/files) | **Generative LLM** (reads & emits JSON) | Extracts entities / concepts / facts / claims from each chunk | `HKC_LLM_*` |
|
|
66
|
+
| Retrieve (querying) | **embedding** (text → vector) | Vectorizes knowledge & queries, ranks by semantic similarity | `HKC_EMBEDDING_*` |
|
|
67
|
+
|
|
68
|
+
They are not interchangeable: an embedding model cannot generate text (can't produce JSON), and an LLM is not suited to vector search.
|
|
69
|
+
|
|
70
|
+
### First, pick your case
|
|
71
|
+
|
|
72
|
+
| Your environment | Extraction model setup | `HKC_LLM_API_KEY` value |
|
|
73
|
+
|---|---|---|
|
|
74
|
+
| Have local Ollama | `openai-compatible` + `base_url` pointing at Ollama | **any non-empty value** (Ollama ignores it; `ollama` is just a placeholder) |
|
|
75
|
+
| No local model | Use a **public cloud model** (DeepSeek / OpenAI / Qwen …), see table | the platform's **real API key** |
|
|
76
|
+
|
|
77
|
+
### Case A · local Ollama
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
HKC_LLM_PROVIDER=openai-compatible
|
|
81
|
+
HKC_LLM_API_KEY=ollama # placeholder only for local Ollama; never use this for cloud
|
|
82
|
+
HKC_LLM_MODEL=my-qwen-32k:latest # a model name from your `ollama list`
|
|
83
|
+
HKC_LLM_BASE_URL=http://localhost:11434/v1 # Ollama's OpenAI-compatible endpoint
|
|
84
|
+
HKC_LLM_TIMEOUT=180 # local models are slow; relax the default 60s
|
|
85
|
+
HKC_EXTRACT_CONCURRENCY=2 # 1–2 for local, up to 5 for cloud APIs
|
|
86
|
+
HKC_EXTRACT_BATCH=8 # optional: extract N chunks per call, saves tokens & time; default 1 = per-chunk
|
|
87
|
+
HKC_MAX_CHUNKS_PER_DOC=0 # optional: per-doc chunk cap; 0 = no cap (ingest whole book), default 500
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Case B · public cloud model (no local model)
|
|
91
|
+
|
|
92
|
+
`HKC_LLM_MODEL` is the platform's **public model id** (passed through verbatim); `HKC_LLM_API_KEY` is the platform's **real key**:
|
|
93
|
+
|
|
94
|
+
| Platform | `HKC_LLM_PROVIDER` | `HKC_LLM_API_KEY` | `HKC_LLM_MODEL` example | `HKC_LLM_BASE_URL` |
|
|
95
|
+
|---|---|---|---|---|
|
|
96
|
+
| DeepSeek | `deepseek` | `sk-...` (DeepSeek key) | `deepseek-chat` / `deepseek-reasoner` | leave blank (official default) |
|
|
97
|
+
| OpenAI | `openai` | `sk-...` (OpenAI key) | `gpt-4o-mini` / `gpt-4o` | leave blank |
|
|
98
|
+
| Qwen (Alibaba) | `openai-compatible` | DashScope key | `qwen-max` / `qwen-plus` | `https://dashscope.aliyuncs.com/compatible-mode/v1` |
|
|
99
|
+
| Zhipu / Moonshot / MiniMax … | `openai-compatible` | that platform's key | that platform's model id | that platform's OpenAI-compatible URL |
|
|
100
|
+
|
|
101
|
+
DeepSeek example:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
HKC_LLM_PROVIDER=deepseek
|
|
105
|
+
HKC_LLM_API_KEY=sk-your-deepseek-key
|
|
106
|
+
HKC_LLM_MODEL=deepseek-chat
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Retrieval model (embedding)
|
|
110
|
+
|
|
111
|
+
The retrieval model does **not** use Ollama; it uses sentence-transformers, and auto-downloads weights from HuggingFace when missing locally:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
HKC_EMBEDDING=local
|
|
115
|
+
HKC_EMBEDDING_MODEL=BAAI/bge-m3 # auto-downloads on first use (~2.2 GB); or a local path like C:\...\bge-m3
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Leave it unset if you don't need semantic precision (defaults to `stub` pseudo-semantics, works out of the box).
|
|
119
|
+
|
|
120
|
+
### Where to put the key, and precedence
|
|
121
|
+
|
|
122
|
+
- **`.env` is the source of truth** — read at startup; restart after editing.
|
|
123
|
+
- The "extraction model" section in the planet page's connection settings is an **optional runtime override** (stored in browser localStorage, may override `.env` on refresh); leave it blank to always follow `.env`.
|
|
124
|
+
- The page's first "API Key" field is the backend auth token (`.env`'s `FOXCLAW_API_KEY`), unrelated to the model keys.
|
|
125
|
+
|
|
126
|
+
> Note: switching the embedding model changes the vector dimension (e.g. 384 → 1024), so you must rebuild the knowledge index (clear and re-ingest).
|
|
127
|
+
|
|
128
|
+
## Philosophy
|
|
129
|
+
|
|
130
|
+
Memory and cognition are fully decoupled from the LLM. The model is a replaceable text generator; the real moat (ThoughtChain audit + Harness drift + policy self-learning + domain kernels) exists independently of any model.
|