@bolloon/bolloon-agent 0.1.35 → 0.1.37
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.
- package/README.md +1 -1
- package/dist/agents/p2p-chat-tools.js +6 -6
- package/dist/agents/permission-mode.js +115 -0
- package/dist/agents/pi-sdk.js +435 -25
- package/dist/agents/pre-tool-validator.js +194 -0
- package/dist/agents/workflow-pivot-loop.js +113 -12
- package/dist/bollharness-integration/context-router.js +2 -2
- package/dist/bollharness-integration/guard-checker.js +1 -1
- package/dist/bootstrap/bootstrap.js +3 -0
- package/dist/bootstrap/context-collector.js +17 -1
- package/dist/bootstrap/context-hierarchy.js +218 -0
- package/dist/bootstrap/lifecycle-hooks.js +86 -24
- package/dist/bootstrap/project-context.js +10 -3
- package/dist/context-compaction/auto-compact.js +144 -0
- package/dist/context-compaction/budget-gate.js +28 -0
- package/dist/context-compaction/budget-reduce.js +35 -0
- package/dist/context-compaction/context-collapse.js +66 -0
- package/dist/context-compaction/index.js +21 -0
- package/dist/context-compaction/microcompact.js +51 -0
- package/dist/context-compaction/pipeline.js +123 -0
- package/dist/context-compaction/snip.js +45 -0
- package/dist/context-compaction/token-estimator.js +35 -0
- package/dist/context-compaction/types.js +19 -0
- package/dist/heartbeat/HealthMonitor.js +3 -2
- package/dist/index.js +38 -2
- package/dist/llm/llm-judgment-client.js +32 -30
- package/dist/llm/pi-ai.js +103 -16
- package/dist/llm/system-prompt/health.js +129 -0
- package/dist/llm/system-prompt/registry.js +246 -0
- package/dist/llm/system-prompt/strip-hibsml.js +51 -0
- package/dist/llm/tool-manifest/ask_user_input.js +35 -0
- package/dist/llm/tool-manifest/bash.js +23 -0
- package/dist/llm/tool-manifest/create_file.js +24 -0
- package/dist/llm/tool-manifest/fetch_sports_data.js +26 -0
- package/dist/llm/tool-manifest/image_search.js +24 -0
- package/dist/llm/tool-manifest/index.js +69 -0
- package/dist/llm/tool-manifest/mcp.js +43 -0
- package/dist/llm/tool-manifest/message_compose.js +31 -0
- package/dist/llm/tool-manifest/places.js +83 -0
- package/dist/llm/tool-manifest/present_files.js +21 -0
- package/dist/llm/tool-manifest/recipe.js +40 -0
- package/dist/llm/tool-manifest/recommend_apps.js +23 -0
- package/dist/llm/tool-manifest/str_replace.js +27 -0
- package/dist/llm/tool-manifest/types.js +7 -0
- package/dist/llm/tool-manifest/view.js +24 -0
- package/dist/llm/tool-manifest/weather.js +27 -0
- package/dist/llm/tool-manifest/web.js +51 -0
- package/dist/network/p2p-direct.js +23 -0
- package/dist/network/source-intent-broadcaster.js +203 -0
- package/dist/network/source-intent.js +100 -0
- package/dist/pi-ecosystem-judgment/adaptive-scan.js +48 -0
- package/dist/pi-ecosystem-judgment/injection-gate.js +54 -12
- package/dist/pi-ecosystem-judgment/value-injection.js +8 -2
- package/dist/security/context-router-tool.js +1 -1
- package/dist/security/input-scanner.js +223 -0
- package/dist/web/client.js +3089 -4458
- package/dist/web/index.html +58 -67
- package/dist/web/server.js +299 -117
- package/dist/web/style.css +531 -249
- package/dist/web/ui/message-renderer.js +352 -0
- package/dist/web/ui/step-timeline.js +279 -0
- package/package.json +2 -2
- package/.auto-evolve-calls +0 -1
- package/.last-auto-evolve-baseline +0 -1
- package/Bolloon.md +0 -103
- package/dist/agents/constraint-layer.js.map +0 -1
- package/dist/agents/pi-sdk.js.map +0 -1
- package/dist/agents/workflow-engine.js.map +0 -1
- package/dist/bollharness/src/index.js +0 -5
- package/dist/bollharness/src/scripts/checks/check_adr_plan_numbering.js +0 -6
- package/dist/bollharness/src/scripts/checks/check_api_types.js +0 -45
- package/dist/bollharness/src/scripts/checks/check_artifact_link.js +0 -146
- package/dist/bollharness/src/scripts/checks/check_bridge_deps.js +0 -6
- package/dist/bollharness/src/scripts/checks/check_bugfix_binding.js +0 -6
- package/dist/bollharness/src/scripts/checks/check_bugfix_binding_ci.js +0 -6
- package/dist/bollharness/src/scripts/checks/check_doc_file_references.js +0 -6
- package/dist/bollharness/src/scripts/checks/check_doc_freshness.js +0 -135
- package/dist/bollharness/src/scripts/checks/check_doc_links.js +0 -31
- package/dist/bollharness/src/scripts/checks/check_file_existence_claims.js +0 -6
- package/dist/bollharness/src/scripts/checks/check_fragment_integrity.js +0 -34
- package/dist/bollharness/src/scripts/checks/check_hook_installed.js +0 -63
- package/dist/bollharness/src/scripts/checks/check_issue_closure.js +0 -41
- package/dist/bollharness/src/scripts/checks/check_mcp_parity.js +0 -6
- package/dist/bollharness/src/scripts/checks/check_security.js +0 -48
- package/dist/bollharness/src/scripts/checks/check_skill_parity.js +0 -6
- package/dist/bollharness/src/scripts/checks/check_versions.js +0 -6
- package/dist/bollharness/src/scripts/checks/finding.js +0 -13
- package/dist/bollharness/src/scripts/checks/next_decision_number.js +0 -20
- package/dist/bollharness/src/scripts/checks/regenerate_magic_docs.js +0 -6
- package/dist/bollharness/src/scripts/ci/detect_rebaseline_triggers.js +0 -8
- package/dist/bollharness/src/scripts/ci/scan_subprocess_cfg.js +0 -8
- package/dist/bollharness/src/scripts/ci/scan_verify_artifacts.js +0 -8
- package/dist/bollharness/src/scripts/ci/scan_yaml_schema.js +0 -8
- package/dist/bollharness/src/scripts/context_router.js +0 -67
- package/dist/bollharness/src/scripts/deploy-guard.js +0 -157
- package/dist/bollharness/src/scripts/guard-feedback.js +0 -192
- package/dist/bollharness/src/scripts/guard_router.js +0 -158
- package/dist/bollharness/src/scripts/hooks/_hook_output.js +0 -6
- package/dist/bollharness/src/scripts/hooks/auto-python3.js +0 -6
- package/dist/bollharness/src/scripts/hooks/deploy-progress-on-session-end.js +0 -6
- package/dist/bollharness/src/scripts/hooks/failure-analyzer.js +0 -6
- package/dist/bollharness/src/scripts/hooks/gate-judgment-inject.js +0 -92
- package/dist/bollharness/src/scripts/hooks/gate-transition-judgment.js +0 -63
- package/dist/bollharness/src/scripts/hooks/inbox-ack.js +0 -6
- package/dist/bollharness/src/scripts/hooks/inbox-inject-on-start.js +0 -6
- package/dist/bollharness/src/scripts/hooks/inbox-validate.js +0 -6
- package/dist/bollharness/src/scripts/hooks/inbox-write-ledger.js +0 -6
- package/dist/bollharness/src/scripts/hooks/initializer-agent.js +0 -6
- package/dist/bollharness/src/scripts/hooks/loop-detection.js +0 -73
- package/dist/bollharness/src/scripts/hooks/owner-guard.js +0 -6
- package/dist/bollharness/src/scripts/hooks/precompact.js +0 -6
- package/dist/bollharness/src/scripts/hooks/review-agent-gatekeeper.js +0 -6
- package/dist/bollharness/src/scripts/hooks/risk-tracker.js +0 -108
- package/dist/bollharness/src/scripts/hooks/sanitize-on-read.js +0 -6
- package/dist/bollharness/src/scripts/hooks/session-reflection.js +0 -7
- package/dist/bollharness/src/scripts/hooks/session-start-magic-docs.js +0 -7
- package/dist/bollharness/src/scripts/hooks/session-start-reset-risk.js +0 -7
- package/dist/bollharness/src/scripts/hooks/session-start-toolkit-reminder.js +0 -7
- package/dist/bollharness/src/scripts/hooks/stop-evaluator.js +0 -157
- package/dist/bollharness/src/scripts/hooks/tool-call-counter.js +0 -6
- package/dist/bollharness/src/scripts/hooks/trace-analyzer.js +0 -10
- package/dist/bollharness/src/scripts/install/install-trust-token.js +0 -7
- package/dist/bollharness/src/scripts/install/multi_project_registry.js +0 -9
- package/dist/bollharness/src/scripts/install/phase2_auto.js +0 -21
- package/dist/bollharness/src/scripts/install/pre_commit_installer.js +0 -6
- package/dist/bollharness/src/scripts/install/tier_selector.js +0 -7
- package/dist/bollharness/src/scripts/install/transcript_miner.js +0 -7
- package/dist/bollharness/src/scripts/lib/claim_patterns.js +0 -10
- package/dist/bollharness/src/scripts/lib/sanitize_patterns.js +0 -12
- package/dist/bollharness/src/scripts/sanitize.js +0 -6
- package/dist/bollharness-integration/context-router-judgment.js.map +0 -1
- package/dist/bollharness-integration/context-router.js.map +0 -1
- package/dist/bollharness-integration/gate-state-machine.js.map +0 -1
- package/dist/bollharness-integration/gate-transition-hooks.js.map +0 -1
- package/dist/bollharness-integration/guard-checker.js.map +0 -1
- package/dist/bollharness-integration/index.js.map +0 -1
- package/dist/bollharness-integration/integration.js.map +0 -1
- package/dist/bollharness-integration/llm/pi-ai.d.ts +0 -60
- package/dist/bollharness-integration/pi-ecosystem-colony/index.d.ts +0 -153
- package/dist/bollharness-integration/pi-ecosystem-goals/index.d.ts +0 -136
- package/dist/bollharness-integration/pi-ecosystem-judgment/decision.d.ts +0 -117
- package/dist/bollharness-integration/pi-ecosystem-judgment/distillation.d.ts +0 -78
- package/dist/bollharness-integration/pi-ecosystem-judgment/index.d.ts +0 -139
- package/dist/bollharness-integration/pi-ecosystem-mcp/index.d.ts +0 -127
- package/dist/bollharness-integration/pi-ecosystem-subagents/index.d.ts +0 -95
- package/dist/bollharness-integration/skill-adapter.js.map +0 -1
- package/dist/constraint-runtime/src/_archive_helper.js +0 -9
- package/dist/constraint-runtime/src/agent/coordinator.js +0 -48
- package/dist/constraint-runtime/src/agent/index.js +0 -1
- package/dist/constraint-runtime/src/assistant/index.js +0 -12
- package/dist/constraint-runtime/src/bootstrap/index.js +0 -12
- package/dist/constraint-runtime/src/bootstrap_graph.js +0 -13
- package/dist/constraint-runtime/src/bridge/index.js +0 -12
- package/dist/constraint-runtime/src/buddy/index.js +0 -12
- package/dist/constraint-runtime/src/cli/index.js +0 -12
- package/dist/constraint-runtime/src/command_graph.js +0 -10
- package/dist/constraint-runtime/src/commands.js +0 -60
- package/dist/constraint-runtime/src/components/index.js +0 -12
- package/dist/constraint-runtime/src/constants/index.js +0 -12
- package/dist/constraint-runtime/src/constraint/budget.js +0 -22
- package/dist/constraint-runtime/src/constraint/budget.js.map +0 -1
- package/dist/constraint-runtime/src/constraint/index.js +0 -2
- package/dist/constraint-runtime/src/constraint/permission.js +0 -20
- package/dist/constraint-runtime/src/constraint/permission.js.map +0 -1
- package/dist/constraint-runtime/src/context.js +0 -30
- package/dist/constraint-runtime/src/coordinator/index.js +0 -12
- package/dist/constraint-runtime/src/cost_hook.js +0 -4
- package/dist/constraint-runtime/src/cost_tracker.js +0 -8
- package/dist/constraint-runtime/src/deferred_init.js +0 -10
- package/dist/constraint-runtime/src/direct_modes.js +0 -6
- package/dist/constraint-runtime/src/dynamic-tool-loader.js +0 -85
- package/dist/constraint-runtime/src/entrypoints/index.js +0 -12
- package/dist/constraint-runtime/src/execution_registry.js +0 -44
- package/dist/constraint-runtime/src/history.js +0 -9
- package/dist/constraint-runtime/src/hooks/index.js +0 -12
- package/dist/constraint-runtime/src/index.js +0 -26
- package/dist/constraint-runtime/src/ink.js +0 -4
- package/dist/constraint-runtime/src/keybindings/index.js +0 -12
- package/dist/constraint-runtime/src/memdir/index.js +0 -12
- package/dist/constraint-runtime/src/migrations/index.js +0 -12
- package/dist/constraint-runtime/src/models.js +0 -1
- package/dist/constraint-runtime/src/models.js.map +0 -1
- package/dist/constraint-runtime/src/moreright/index.js +0 -12
- package/dist/constraint-runtime/src/native_ts/index.js +0 -12
- package/dist/constraint-runtime/src/output_styles/index.js +0 -12
- package/dist/constraint-runtime/src/parity_audit.js +0 -12
- package/dist/constraint-runtime/src/plugins/index.js +0 -12
- package/dist/constraint-runtime/src/port_manifest.js +0 -11
- package/dist/constraint-runtime/src/prefetch.js +0 -9
- package/dist/constraint-runtime/src/query.js +0 -1
- package/dist/constraint-runtime/src/remote/index.js +0 -12
- package/dist/constraint-runtime/src/remote_runtime.js +0 -9
- package/dist/constraint-runtime/src/runtime/index.js +0 -1
- package/dist/constraint-runtime/src/runtime/session.js +0 -35
- package/dist/constraint-runtime/src/schemas/index.js +0 -12
- package/dist/constraint-runtime/src/screens/index.js +0 -12
- package/dist/constraint-runtime/src/server/index.js +0 -12
- package/dist/constraint-runtime/src/services/index.js +0 -12
- package/dist/constraint-runtime/src/session_store.js +0 -22
- package/dist/constraint-runtime/src/setup.js +0 -30
- package/dist/constraint-runtime/src/skills/index.js +0 -1
- package/dist/constraint-runtime/src/skills/skill-registry.js +0 -28
- package/dist/constraint-runtime/src/state/index.js +0 -12
- package/dist/constraint-runtime/src/system_init.js +0 -20
- package/dist/constraint-runtime/src/thinking/engine.js +0 -42
- package/dist/constraint-runtime/src/thinking/index.js +0 -1
- package/dist/constraint-runtime/src/tool_pool.js +0 -8
- package/dist/constraint-runtime/src/tools/OpenCLI/execAdapter.js +0 -7
- package/dist/constraint-runtime/src/tools/OpenCLI/listAdapters.js +0 -7
- package/dist/constraint-runtime/src/tools/OpenCLI/runCommand.js +0 -7
- package/dist/constraint-runtime/src/tools/PolymarketSDK/cancelOrder.js +0 -6
- package/dist/constraint-runtime/src/tools/PolymarketSDK/createOrder.js +0 -6
- package/dist/constraint-runtime/src/tools/PolymarketSDK/getMarket.js +0 -5
- package/dist/constraint-runtime/src/tools/PolymarketSDK/getOrders.js +0 -6
- package/dist/constraint-runtime/src/tools/PolymarketSDK/listMarkets.js +0 -4
- package/dist/constraint-runtime/src/tools/SafeSDK/confirmTransaction.js +0 -6
- package/dist/constraint-runtime/src/tools/SafeSDK/createTransaction.js +0 -8
- package/dist/constraint-runtime/src/tools/SafeSDK/deploySafe.js +0 -6
- package/dist/constraint-runtime/src/tools/SafeSDK/executeTransaction.js +0 -6
- package/dist/constraint-runtime/src/tools/SafeSDK/getBalance.js +0 -6
- package/dist/constraint-runtime/src/tools/SafeSDK/getPendingTransactions.js +0 -6
- package/dist/constraint-runtime/src/tools/SafeSDK/proposeTransaction.js +0 -6
- package/dist/constraint-runtime/src/tools/WalletTools/autoPay.js +0 -29
- package/dist/constraint-runtime/src/tools/WalletTools/createWallet.js +0 -10
- package/dist/constraint-runtime/src/tools/WalletTools/getBalance.js +0 -13
- package/dist/constraint-runtime/src/tools/WalletTools/importWallet.js +0 -22
- package/dist/constraint-runtime/src/tools/WalletTools/sendTransaction.js +0 -25
- package/dist/constraint-runtime/src/tools/WalletTools/signMessage.js +0 -10
- package/dist/constraint-runtime/src/tools/WalletTools/transferToken.js +0 -25
- package/dist/constraint-runtime/src/tools.js +0 -80
- package/dist/constraint-runtime/src/transcript.js +0 -19
- package/dist/constraint-runtime/src/types/index.js +0 -12
- package/dist/constraint-runtime/src/upstream_proxy/index.js +0 -12
- package/dist/constraint-runtime/src/utils/index.js +0 -12
- package/dist/constraint-runtime/src/vim/index.js +0 -12
- package/dist/constraint-runtime/src/voice/index.js +0 -12
- package/dist/constraints/index.js.map +0 -1
- package/dist/documents/reader.js.map +0 -1
- package/dist/llm/config-store.js.map +0 -1
- package/dist/llm/pi-ai.js.map +0 -1
- package/dist/network/agent-network.js.map +0 -1
- package/dist/network/iroh-integration.js.map +0 -1
- package/dist/network/iroh-transport.js.map +0 -1
- package/dist/network/p2p.js.map +0 -1
- package/dist/network/storage/adapters/json-adapter.js.map +0 -1
- package/dist/pi-ecosystem-colony/index.js.map +0 -1
- package/dist/pi-ecosystem-goals/index.js.map +0 -1
- package/dist/pi-ecosystem-judgment/decision.js.map +0 -1
- package/dist/pi-ecosystem-judgment/distillation.js.map +0 -1
- package/dist/pi-ecosystem-judgment/human-value-store.js.map +0 -1
- package/dist/pi-ecosystem-judgment/index.js.map +0 -1
- package/dist/pi-ecosystem-judgment/value-injection.js.map +0 -1
- package/dist/pi-ecosystem-mcp/index.js.map +0 -1
- package/dist/pi-ecosystem-subagents/index.js.map +0 -1
- package/dist/social/ant-colony/AdaptiveHeartbeat.js.map +0 -1
- package/dist/social/ant-colony/PheromoneEngine.js.map +0 -1
- package/dist/social/ant-colony/types.js.map +0 -1
- package/dist/social/channels/ChannelManager.js.map +0 -1
- package/dist/social/channels/DiapChannelBridge.js.map +0 -1
- package/dist/social/channels/InterestMatcher.js.map +0 -1
- package/dist/social/channels/types.js.map +0 -1
- package/dist/social/global-shared-context.js.map +0 -1
- package/dist/social/heartbeat.js.map +0 -1
- package/lefthook.yml +0 -29
- package/scripts/auto-evolve-loop.ts +0 -376
- package/scripts/auto-evolve-oneshot.sh +0 -155
- package/scripts/auto-evolve-snapshot.sh +0 -136
- package/scripts/build-cli.js +0 -216
- package/scripts/build-web.ts +0 -82
- package/scripts/detect-schema-changes.sh +0 -48
- package/scripts/diff-reviewer.ts +0 -159
- package/scripts/postinstall.js +0 -153
- package/scripts/weekly-report.ts +0 -364
- package/src/agents/agent-manifest-protocol.ts +0 -117
- package/src/agents/constraint-layer.ts +0 -309
- package/src/agents/iroh-secret.ts +0 -32
- package/src/agents/p2p-chat-tools.ts +0 -383
- package/src/agents/p2p-document-tools.ts +0 -347
- package/src/agents/pi-sdk.ts +0 -2462
- package/src/agents/protocol.ts +0 -398
- package/src/agents/shell-guard.ts +0 -417
- package/src/agents/shell-tool.ts +0 -103
- package/src/agents/skill-loader.ts +0 -202
- package/src/agents/subagent-manager.ts +0 -553
- package/src/agents/workflow-engine.ts +0 -332
- package/src/agents/workflow-pivot-loop.ts +0 -675
- package/src/bollharness/.sanitize-report.json +0 -13
- package/src/bollharness/CLAUDE.md +0 -73
- package/src/bollharness/LICENSE +0 -21
- package/src/bollharness/README.md +0 -143
- package/src/bollharness/README.zh-CN.md +0 -131
- package/src/bollharness/package.json +0 -20
- package/src/bollharness/reference/SOURCE-COMMIT.txt +0 -3
- package/src/bollharness/reference/boll-reference/scripts/hooks/.sanitize-report.json +0 -12
- package/src/bollharness/reference/boll-reference/scripts/hooks/find-boll-root.sh +0 -27
- package/src/bollharness/reference/boll-reference/scripts/hooks/precompact.sh +0 -57
- package/src/bollharness/reference/boll-reference/scripts/hooks/stop-evaluator.md +0 -57
- package/src/bollharness/schemas/metrics-jsonl-allowlist.json +0 -67
- package/src/bollharness/scripts/checks/next_decision_number.sh +0 -48
- package/src/bollharness/scripts/ci/count-components.sh +0 -65
- package/src/bollharness/scripts/context-fragments/artifact-linkage.md +0 -14
- package/src/bollharness/scripts/context-fragments/auth-consumers.md +0 -17
- package/src/bollharness/scripts/context-fragments/bridge-constitution.md +0 -13
- package/src/bollharness/scripts/context-fragments/catalyst-distributed.md +0 -18
- package/src/bollharness/scripts/context-fragments/closure-checklist.md +0 -13
- package/src/bollharness/scripts/context-fragments/contract-consumers.md +0 -15
- package/src/bollharness/scripts/context-fragments/db-shared-structures.md +0 -15
- package/src/bollharness/scripts/context-fragments/fixed-three-layers.md +0 -19
- package/src/bollharness/scripts/context-fragments/general-dev-principles.md +0 -11
- package/src/bollharness/scripts/context-fragments/issue-first.md +0 -8
- package/src/bollharness/scripts/context-fragments/mcp-parity.md +0 -16
- package/src/bollharness/scripts/context-fragments/pi-agent-operations.md +0 -108
- package/src/bollharness/scripts/context-fragments/protocol-consumers.md +0 -15
- package/src/bollharness/scripts/context-fragments/run-events-consumers.md +0 -15
- package/src/bollharness/scripts/context-fragments/scene-fidelity.md +0 -13
- package/src/bollharness/scripts/context-fragments/truth-source-hierarchy.md +0 -15
- package/src/bollharness/scripts/context-fragments/two-language.md +0 -15
- package/src/bollharness/scripts/context-fragments/version-sources.md +0 -14
- package/src/bollharness/scripts/hooks/find-project-root.sh +0 -47
- package/src/bollharness/scripts/hooks/inbox-poll.sh +0 -78
- package/src/bollharness/scripts/hooks/precompact.sh +0 -56
- package/src/bollharness/scripts/hooks/stop-evaluator.md +0 -83
- package/src/bollharness/scripts/sync-from-upstream.sh +0 -281
- package/src/bollharness/src/index.ts +0 -5
- package/src/bollharness/src/scripts/checks/check_adr_plan_numbering.ts +0 -11
- package/src/bollharness/src/scripts/checks/check_api_types.ts +0 -52
- package/src/bollharness/src/scripts/checks/check_artifact_link.ts +0 -156
- package/src/bollharness/src/scripts/checks/check_bridge_deps.ts +0 -11
- package/src/bollharness/src/scripts/checks/check_bugfix_binding.ts +0 -11
- package/src/bollharness/src/scripts/checks/check_bugfix_binding_ci.ts +0 -11
- package/src/bollharness/src/scripts/checks/check_doc_file_references.ts +0 -11
- package/src/bollharness/src/scripts/checks/check_doc_freshness.ts +0 -141
- package/src/bollharness/src/scripts/checks/check_doc_links.ts +0 -36
- package/src/bollharness/src/scripts/checks/check_file_existence_claims.ts +0 -11
- package/src/bollharness/src/scripts/checks/check_fragment_integrity.ts +0 -40
- package/src/bollharness/src/scripts/checks/check_hook_installed.ts +0 -70
- package/src/bollharness/src/scripts/checks/check_issue_closure.ts +0 -51
- package/src/bollharness/src/scripts/checks/check_mcp_parity.ts +0 -11
- package/src/bollharness/src/scripts/checks/check_security.ts +0 -54
- package/src/bollharness/src/scripts/checks/check_skill_parity.ts +0 -11
- package/src/bollharness/src/scripts/checks/check_versions.ts +0 -11
- package/src/bollharness/src/scripts/checks/finding.ts +0 -35
- package/src/bollharness/src/scripts/checks/next_decision_number.ts +0 -24
- package/src/bollharness/src/scripts/checks/regenerate_magic_docs.ts +0 -11
- package/src/bollharness/src/scripts/ci/detect_rebaseline_triggers.ts +0 -14
- package/src/bollharness/src/scripts/ci/scan_subprocess_cfg.ts +0 -14
- package/src/bollharness/src/scripts/ci/scan_verify_artifacts.ts +0 -14
- package/src/bollharness/src/scripts/ci/scan_yaml_schema.ts +0 -14
- package/src/bollharness/src/scripts/context_router.ts +0 -76
- package/src/bollharness/src/scripts/deploy-guard.ts +0 -182
- package/src/bollharness/src/scripts/guard-feedback.ts +0 -215
- package/src/bollharness/src/scripts/guard_router.ts +0 -194
- package/src/bollharness/src/scripts/hooks/_hook_output.js +0 -3
- package/src/bollharness/src/scripts/hooks/_hook_output.ts +0 -11
- package/src/bollharness/src/scripts/hooks/auto-python3.ts +0 -10
- package/src/bollharness/src/scripts/hooks/deploy-progress-on-session-end.ts +0 -10
- package/src/bollharness/src/scripts/hooks/failure-analyzer.ts +0 -10
- package/src/bollharness/src/scripts/hooks/gate-judgment-inject.ts +0 -111
- package/src/bollharness/src/scripts/hooks/gate-transition-judgment.ts +0 -74
- package/src/bollharness/src/scripts/hooks/inbox-ack.ts +0 -10
- package/src/bollharness/src/scripts/hooks/inbox-inject-on-start.ts +0 -10
- package/src/bollharness/src/scripts/hooks/inbox-validate.ts +0 -10
- package/src/bollharness/src/scripts/hooks/inbox-write-ledger.ts +0 -10
- package/src/bollharness/src/scripts/hooks/initializer-agent.ts +0 -10
- package/src/bollharness/src/scripts/hooks/loop-detection.ts +0 -83
- package/src/bollharness/src/scripts/hooks/owner-guard.ts +0 -10
- package/src/bollharness/src/scripts/hooks/precompact.ts +0 -10
- package/src/bollharness/src/scripts/hooks/review-agent-gatekeeper.ts +0 -10
- package/src/bollharness/src/scripts/hooks/risk-tracker.ts +0 -121
- package/src/bollharness/src/scripts/hooks/sanitize-on-read.ts +0 -10
- package/src/bollharness/src/scripts/hooks/session-reflection.ts +0 -12
- package/src/bollharness/src/scripts/hooks/session-start-magic-docs.ts +0 -12
- package/src/bollharness/src/scripts/hooks/session-start-reset-risk.ts +0 -12
- package/src/bollharness/src/scripts/hooks/session-start-toolkit-reminder.ts +0 -12
- package/src/bollharness/src/scripts/hooks/stop-evaluator.ts +0 -164
- package/src/bollharness/src/scripts/hooks/tool-call-counter.ts +0 -10
- package/src/bollharness/src/scripts/hooks/trace-analyzer.ts +0 -14
- package/src/bollharness/src/scripts/install/install-trust-token.ts +0 -13
- package/src/bollharness/src/scripts/install/multi_project_registry.ts +0 -13
- package/src/bollharness/src/scripts/install/phase2_auto.ts +0 -28
- package/src/bollharness/src/scripts/install/pre_commit_installer.ts +0 -10
- package/src/bollharness/src/scripts/install/tier_selector.ts +0 -10
- package/src/bollharness/src/scripts/install/transcript_miner.ts +0 -13
- package/src/bollharness/src/scripts/lib/claim_patterns.ts +0 -11
- package/src/bollharness/src/scripts/lib/sanitize_patterns.ts +0 -13
- package/src/bollharness/src/scripts/sanitize.ts +0 -9
- package/src/bollharness/templates/persona/default.json +0 -19
- package/src/bollharness/templates/scaffold/.gitignore.append +0 -16
- package/src/bollharness/templates/scaffold/CLAUDE.md +0 -89
- package/src/bollharness-integration/channel-judgment-engine.ts +0 -634
- package/src/bollharness-integration/context-chain-router.ts +0 -474
- package/src/bollharness-integration/context-router-judgment.ts +0 -339
- package/src/bollharness-integration/context-router.ts +0 -583
- package/src/bollharness-integration/gate-state-machine.ts +0 -444
- package/src/bollharness-integration/gate-transition-hooks.ts +0 -137
- package/src/bollharness-integration/guard-checker.ts +0 -451
- package/src/bollharness-integration/index.ts +0 -195
- package/src/bollharness-integration/integration.ts +0 -538
- package/src/bollharness-integration/judgment-prompts.yaml +0 -535
- package/src/bollharness-integration/llm-judgment-engine.ts +0 -712
- package/src/bollharness-integration/skill-adapter.ts +0 -646
- package/src/bootstrap/bootstrap.ts +0 -132
- package/src/bootstrap/context-collector.ts +0 -342
- package/src/bootstrap/lifecycle-hooks.ts +0 -176
- package/src/bootstrap/project-context.ts +0 -163
- package/src/cli/interface.ts +0 -211
- package/src/cli-entry.ts +0 -304
- package/src/constraints/index.ts +0 -6
- package/src/documents/reader.ts +0 -85
- package/src/documents/store.ts +0 -252
- package/src/electron-preload.ts +0 -25
- package/src/electron.ts +0 -200
- package/src/heartbeat/DaemonManager.ts +0 -283
- package/src/heartbeat/HealthMonitor.ts +0 -316
- package/src/heartbeat/StartupVerifier.ts +0 -223
- package/src/heartbeat/Watchdog.ts +0 -208
- package/src/heartbeat/index.ts +0 -109
- package/src/heartbeat/self-improve-bus.ts +0 -110
- package/src/heartbeat/types.ts +0 -82
- package/src/index.ts +0 -1690
- package/src/llm/audio-config-store.ts +0 -246
- package/src/llm/config-store.ts +0 -400
- package/src/llm/llm-judgment-client.ts +0 -470
- package/src/llm/pi-ai.ts +0 -558
- package/src/llm/video-config-store.ts +0 -257
- package/src/network/agent-network.ts +0 -800
- package/src/network/hybrid-messenger.ts +0 -199
- package/src/network/iroh-bootstrap.ts +0 -57
- package/src/network/iroh-discovery.ts +0 -208
- package/src/network/iroh-integration.ts +0 -158
- package/src/network/iroh-transport.ts +0 -637
- package/src/network/known-peers.ts +0 -102
- package/src/network/p2p-direct.ts +0 -240
- package/src/network/p2p-secret.ts +0 -153
- package/src/network/p2p.ts +0 -964
- package/src/network/storage/adapters/json-adapter.ts +0 -454
- package/src/network/storage/index.ts +0 -203
- package/src/network/storage/types.ts +0 -166
- package/src/security/builtin-guards.ts +0 -162
- package/src/security/context-router-tool.ts +0 -122
- package/src/security/react-harness.ts +0 -177
- package/src/security/tool-gate.ts +0 -294
- package/src/social/ant-colony/index.js +0 -19
- package/src/social/channels/ChannelManager.ts +0 -485
- package/src/social/channels/DiapChannelBridge.ts +0 -501
- package/src/social/channels/InterestMatcher.ts +0 -189
- package/src/social/channels/agent-workflow-config.json +0 -214
- package/src/social/channels/agent-workflow-config.yaml +0 -334
- package/src/social/channels/channel-agent-session.ts +0 -407
- package/src/social/channels/channel-heartbeat-agent.ts +0 -622
- package/src/social/channels/diap-doc-parser.ts +0 -282
- package/src/social/channels/harness-workflow-integrator.ts +0 -594
- package/src/social/channels/index.ts +0 -22
- package/src/social/channels/types.ts +0 -115
- package/src/social/global-shared-context.ts +0 -506
- package/src/social/heartbeat.ts +0 -1057
- package/src/social/persona/enhanced-persona.ts +0 -359
- package/src/types.d.ts +0 -12
- package/src/utils/auto-evolve-policy.ts +0 -138
- package/src/utils/auto-update.ts +0 -482
- package/src/utils/clamp.ts +0 -5
- package/src/web/agent-delegate-server.ts +0 -148
- package/src/web/api-config.html +0 -520
- package/src/web/client.js +0 -4898
- package/src/web/components/p2p/P2PModal.tsx +0 -416
- package/src/web/components/p2p/index.ts +0 -566
- package/src/web/components/p2p/index.tsx +0 -297
- package/src/web/components/p2p/p2p-connection.ts +0 -338
- package/src/web/components/p2p/p2p-identity.ts +0 -92
- package/src/web/components/p2p/p2p-manager.ts +0 -147
- package/src/web/components/p2p/p2p-messages.ts +0 -219
- package/src/web/components/p2p/p2p-modal.ts +0 -685
- package/src/web/components/p2p/p2p-store-memory.ts +0 -162
- package/src/web/components/p2p/p2p-tools.ts +0 -315
- package/src/web/components/p2p/types.ts +0 -170
- package/src/web/components/wallet-viem.mjs +0 -118
- package/src/web/design.md +0 -99
- package/src/web/icons/apple-touch-icon.png +0 -0
- package/src/web/icons/favicon-16x16.png +0 -0
- package/src/web/icons/favicon-192x192.png +0 -0
- package/src/web/icons/favicon-32x32.png +0 -0
- package/src/web/icons/favicon-48x48.png +0 -0
- package/src/web/icons/favicon-512x512.png +0 -0
- package/src/web/icons/favicon.icns +0 -0
- package/src/web/icons/favicon.ico +0 -0
- package/src/web/icons/icon.png +0 -0
- package/src/web/icons/image.png +0 -0
- package/src/web/index.html +0 -382
- package/src/web/iroh-delegate-transport.ts +0 -139
- package/src/web/manifest.json +0 -21
- package/src/web/server.ts +0 -5571
- package/src/web/style.css +0 -4455
- package/staging/auto-evolve/clean-001/.review-verdict +0 -9
- package/staging/auto-evolve/clean-001/clean-001.patch +0 -14
- package/staging/auto-evolve/e2e-001/.patch-id +0 -1
- package/staging/auto-evolve/e2e-001/.review-verdict +0 -12
- package/staging/auto-evolve/e2e-001/e2e-001.patch +0 -11
- package/staging/auto-evolve/test-bad/.review-verdict +0 -12
- package/staging/auto-evolve/test-bad/test-bad.patch +0 -11
- package/tsconfig.cli.json +0 -16
- package/tsconfig.electron.json +0 -20
- package/tsconfig.json +0 -18
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pi Ant Colony Integration for Bolloon
|
|
3
|
-
*
|
|
4
|
-
* Multi-agent collaboration system with white-box signal protocol.
|
|
5
|
-
* Based on oh-pi's ant colony system: COLONY_SIGNAL protocol for agent coordination.
|
|
6
|
-
*
|
|
7
|
-
* Signal Protocol:
|
|
8
|
-
* COLONY_SIGNAL:LAUNCHED → SCOUTING → WORKING → REVIEWING → COMPLETE
|
|
9
|
-
*
|
|
10
|
-
* Key features:
|
|
11
|
-
* - Fully visible signal protocol (no black boxes)
|
|
12
|
-
* - Per-ant turn limits, cost tracking, concurrent scheduling
|
|
13
|
-
* - White-box design: no "what is it doing in the background" anxiety
|
|
14
|
-
*/
|
|
15
|
-
export type ColonySignal = 'LAUNCHED' | 'SCOUTING' | 'WORKING' | 'REVIEWING' | 'COMPLETE' | 'FAILED' | 'ABORTED';
|
|
16
|
-
export type AntRole = 'scout' | 'worker' | 'reviewer' | 'coordinator';
|
|
17
|
-
export interface Ant {
|
|
18
|
-
id: string;
|
|
19
|
-
name: string;
|
|
20
|
-
role: AntRole;
|
|
21
|
-
signal: ColonySignal;
|
|
22
|
-
turnCount: number;
|
|
23
|
-
maxTurns: number;
|
|
24
|
-
tokenBudget: number;
|
|
25
|
-
tokensUsed: number;
|
|
26
|
-
task?: string;
|
|
27
|
-
result?: string;
|
|
28
|
-
createdAt: string;
|
|
29
|
-
updatedAt: string;
|
|
30
|
-
}
|
|
31
|
-
export interface ColonyTask {
|
|
32
|
-
id: string;
|
|
33
|
-
description: string;
|
|
34
|
-
status: 'pending' | 'dispatched' | 'in_progress' | 'completed' | 'failed';
|
|
35
|
-
assignedAnts: string[];
|
|
36
|
-
results: Map<string, string>;
|
|
37
|
-
createdAt: string;
|
|
38
|
-
completedAt?: string;
|
|
39
|
-
}
|
|
40
|
-
export interface ColonySignalEvent {
|
|
41
|
-
antId: string;
|
|
42
|
-
antName: string;
|
|
43
|
-
fromSignal: ColonySignal;
|
|
44
|
-
toSignal: ColonySignal;
|
|
45
|
-
timestamp: string;
|
|
46
|
-
details?: string;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Register a new ant in the colony
|
|
50
|
-
*/
|
|
51
|
-
export declare function registerAnt(name: string, role: AntRole, maxTurns?: number, tokenBudget?: number): Ant;
|
|
52
|
-
/**
|
|
53
|
-
* Transition ant to SCOUTING
|
|
54
|
-
*/
|
|
55
|
-
export declare function antScouting(antId: string, task: string): void;
|
|
56
|
-
/**
|
|
57
|
-
* Transition ant to WORKING
|
|
58
|
-
*/
|
|
59
|
-
export declare function antWorking(antId: string): void;
|
|
60
|
-
/**
|
|
61
|
-
* Transition ant to REVIEWING
|
|
62
|
-
*/
|
|
63
|
-
export declare function antReviewing(antId: string): void;
|
|
64
|
-
/**
|
|
65
|
-
* Complete ant work
|
|
66
|
-
*/
|
|
67
|
-
export declare function antComplete(antId: string, result: string): void;
|
|
68
|
-
/**
|
|
69
|
-
* Fail ant work
|
|
70
|
-
*/
|
|
71
|
-
export declare function antFail(antId: string, error: string): void;
|
|
72
|
-
/**
|
|
73
|
-
* Abort ant work
|
|
74
|
-
*/
|
|
75
|
-
export declare function antAbort(antId: string, reason: string): void;
|
|
76
|
-
/**
|
|
77
|
-
* Increment turn count
|
|
78
|
-
*/
|
|
79
|
-
export declare function antTick(antId: string, tokensUsed?: number): void;
|
|
80
|
-
/**
|
|
81
|
-
* Create a colony task
|
|
82
|
-
*/
|
|
83
|
-
export declare function createTask(description: string): ColonyTask;
|
|
84
|
-
/**
|
|
85
|
-
* Dispatch task to ants
|
|
86
|
-
*/
|
|
87
|
-
export declare function dispatchTask(taskId: string, antIds: string[]): void;
|
|
88
|
-
/**
|
|
89
|
-
* Record ant result for a task
|
|
90
|
-
*/
|
|
91
|
-
export declare function recordResult(taskId: string, antId: string, result: string): void;
|
|
92
|
-
/**
|
|
93
|
-
* Get ant by ID
|
|
94
|
-
*/
|
|
95
|
-
export declare function getAnt(antId: string): Ant | undefined;
|
|
96
|
-
/**
|
|
97
|
-
* List all ants
|
|
98
|
-
*/
|
|
99
|
-
export declare function listAnts(): Ant[];
|
|
100
|
-
/**
|
|
101
|
-
* List ants by role
|
|
102
|
-
*/
|
|
103
|
-
export declare function listAntsByRole(role: AntRole): Ant[];
|
|
104
|
-
/**
|
|
105
|
-
* Get ants by signal state
|
|
106
|
-
*/
|
|
107
|
-
export declare function listAntsBySignal(signal: ColonySignal): Ant[];
|
|
108
|
-
/**
|
|
109
|
-
* Get active ants (not complete/failed/aborted)
|
|
110
|
-
*/
|
|
111
|
-
export declare function getActiveAnts(): Ant[];
|
|
112
|
-
/**
|
|
113
|
-
* Get task by ID
|
|
114
|
-
*/
|
|
115
|
-
export declare function getTask(taskId: string): ColonyTask | undefined;
|
|
116
|
-
/**
|
|
117
|
-
* List all tasks
|
|
118
|
-
*/
|
|
119
|
-
export declare function listTasks(): ColonyTask[];
|
|
120
|
-
/**
|
|
121
|
-
* Get signal history
|
|
122
|
-
*/
|
|
123
|
-
export declare function getSignalHistory(): ColonySignalEvent[];
|
|
124
|
-
/**
|
|
125
|
-
* Get colony status
|
|
126
|
-
*/
|
|
127
|
-
export declare function getColonyStatus(): {
|
|
128
|
-
antCount: number;
|
|
129
|
-
activeAnts: number;
|
|
130
|
-
taskCount: number;
|
|
131
|
-
activeTasks: number;
|
|
132
|
-
signalDistribution: Record<ColonySignal, number>;
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
135
|
-
* Subscribe to colony events
|
|
136
|
-
*/
|
|
137
|
-
export declare function onColonyEvent(event: 'signal' | 'antRegistered' | 'taskCreated', callback: (...args: unknown[]) => void): void;
|
|
138
|
-
/**
|
|
139
|
-
* Unsubscribe from colony events
|
|
140
|
-
*/
|
|
141
|
-
export declare function offColonyEvent(event: 'signal' | 'antRegistered' | 'taskCreated', callback: (...args: unknown[]) => void): void;
|
|
142
|
-
/**
|
|
143
|
-
* Get formatted colony dump for debugging
|
|
144
|
-
*/
|
|
145
|
-
export declare function getColonyDump(): string;
|
|
146
|
-
/**
|
|
147
|
-
* Persist colony state
|
|
148
|
-
*/
|
|
149
|
-
export declare function persistColony(): Promise<void>;
|
|
150
|
-
/**
|
|
151
|
-
* Load colony state
|
|
152
|
-
*/
|
|
153
|
-
export declare function loadColony(): Promise<void>;
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pi Goals Integration for Bolloon
|
|
3
|
-
*
|
|
4
|
-
* Provides persistent goal tracking and workflow orchestration.
|
|
5
|
-
* Based on pi-goals philosophy: goal-oriented agent workflows with budget enforcement.
|
|
6
|
-
*
|
|
7
|
-
* Key features:
|
|
8
|
-
* - Persistent goal state across sessions
|
|
9
|
-
* - Goal queue with FIFO execution
|
|
10
|
-
* - Budget enforcement (max time/tokens, min work thresholds)
|
|
11
|
-
* - Workflow templates with {{args}} placeholders
|
|
12
|
-
* - Churn monitoring to detect drift/stalling
|
|
13
|
-
*/
|
|
14
|
-
export interface Goal {
|
|
15
|
-
id: string;
|
|
16
|
-
objective: string;
|
|
17
|
-
status: GoalStatus;
|
|
18
|
-
createdAt: string;
|
|
19
|
-
startedAt?: string;
|
|
20
|
-
completedAt?: string;
|
|
21
|
-
budget?: GoalBudget;
|
|
22
|
-
result?: string;
|
|
23
|
-
error?: string;
|
|
24
|
-
summary?: string;
|
|
25
|
-
metadata?: Record<string, unknown>;
|
|
26
|
-
}
|
|
27
|
-
export type GoalStatus = 'pending' | 'in_progress' | 'completed' | 'failed' | 'paused' | 'cutoff';
|
|
28
|
-
export interface GoalBudget {
|
|
29
|
-
maxTimeMs: number;
|
|
30
|
-
maxTokens: number;
|
|
31
|
-
minWorkMs?: number;
|
|
32
|
-
minTokens?: number;
|
|
33
|
-
}
|
|
34
|
-
export interface GoalQueue {
|
|
35
|
-
goals: Goal[];
|
|
36
|
-
currentIndex: number;
|
|
37
|
-
}
|
|
38
|
-
export interface WorkflowTemplate {
|
|
39
|
-
name: string;
|
|
40
|
-
description?: string;
|
|
41
|
-
goals: string[];
|
|
42
|
-
args?: Record<string, {
|
|
43
|
-
description?: string;
|
|
44
|
-
default?: string;
|
|
45
|
-
}>;
|
|
46
|
-
gate?: string;
|
|
47
|
-
}
|
|
48
|
-
export interface ChurnEvent {
|
|
49
|
-
goalId: string;
|
|
50
|
-
type: 'drift' | 'stall' | 'repeat';
|
|
51
|
-
message: string;
|
|
52
|
-
timestamp: string;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Create a new goal
|
|
56
|
-
*/
|
|
57
|
-
export declare function createGoal(objective: string, budget?: GoalBudget, metadata?: Record<string, unknown>): Promise<Goal>;
|
|
58
|
-
/**
|
|
59
|
-
* Create a queue of goals
|
|
60
|
-
*/
|
|
61
|
-
export declare function createGoalQueue(objectives: string[], budgets?: GoalBudget[]): Promise<Goal[]>;
|
|
62
|
-
/**
|
|
63
|
-
* Get current goal
|
|
64
|
-
*/
|
|
65
|
-
export declare function getCurrentGoal(): Goal | undefined;
|
|
66
|
-
/**
|
|
67
|
-
* Start current goal
|
|
68
|
-
*/
|
|
69
|
-
export declare function startCurrentGoal(): Promise<Goal | undefined>;
|
|
70
|
-
/**
|
|
71
|
-
* Complete current goal with result
|
|
72
|
-
*/
|
|
73
|
-
export declare function completeCurrentGoal(result?: string): Promise<Goal | undefined>;
|
|
74
|
-
/**
|
|
75
|
-
* Fail current goal
|
|
76
|
-
*/
|
|
77
|
-
export declare function failCurrentGoal(error: string): Promise<Goal | undefined>;
|
|
78
|
-
/**
|
|
79
|
-
* Cutoff current goal (exceeded budget)
|
|
80
|
-
*/
|
|
81
|
-
export declare function cutoffCurrentGoal(reason: string): Promise<Goal | undefined>;
|
|
82
|
-
/**
|
|
83
|
-
* Pause current goal
|
|
84
|
-
*/
|
|
85
|
-
export declare function pauseCurrentGoal(): Promise<Goal | undefined>;
|
|
86
|
-
/**
|
|
87
|
-
* Check budget for a goal
|
|
88
|
-
*/
|
|
89
|
-
export declare function checkBudget(goal: Goal, elapsedMs?: number, tokensUsed?: number): {
|
|
90
|
-
exceeded: boolean;
|
|
91
|
-
reason?: string;
|
|
92
|
-
};
|
|
93
|
-
/**
|
|
94
|
-
* Get churn events for current goal
|
|
95
|
-
*/
|
|
96
|
-
export declare function getChurnForGoal(goalId: string): ChurnEvent[];
|
|
97
|
-
/**
|
|
98
|
-
* Get goal statistics
|
|
99
|
-
*/
|
|
100
|
-
export declare function getGoalStats(): {
|
|
101
|
-
total: number;
|
|
102
|
-
pending: number;
|
|
103
|
-
inProgress: number;
|
|
104
|
-
completed: number;
|
|
105
|
-
failed: number;
|
|
106
|
-
paused: number;
|
|
107
|
-
cutoff: number;
|
|
108
|
-
};
|
|
109
|
-
/**
|
|
110
|
-
* Get queue summary
|
|
111
|
-
*/
|
|
112
|
-
export declare function getQueueSummary(): string;
|
|
113
|
-
/**
|
|
114
|
-
* Load goals from disk
|
|
115
|
-
*/
|
|
116
|
-
export declare function loadGoals(): Promise<void>;
|
|
117
|
-
/**
|
|
118
|
-
* Clear all goals
|
|
119
|
-
*/
|
|
120
|
-
export declare function clearGoals(): Promise<void>;
|
|
121
|
-
/**
|
|
122
|
-
* Remove completed goals and compact queue
|
|
123
|
-
*/
|
|
124
|
-
export declare function compactQueue(): Promise<void>;
|
|
125
|
-
/**
|
|
126
|
-
* Load workflow templates
|
|
127
|
-
*/
|
|
128
|
-
export declare function loadTemplates(): Promise<WorkflowTemplate[]>;
|
|
129
|
-
/**
|
|
130
|
-
* Create goals from a template
|
|
131
|
-
*/
|
|
132
|
-
export declare function createFromTemplate(templateName: string, args: Record<string, string>): Promise<Goal[]>;
|
|
133
|
-
/**
|
|
134
|
-
* Continue working on current goal (anti-stall)
|
|
135
|
-
*/
|
|
136
|
-
export declare function nudgeCurrentGoal(): Promise<Goal | undefined>;
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Decision Request & Authorization Flow
|
|
3
|
-
*
|
|
4
|
-
* Handles decision requests when agent confidence is below threshold.
|
|
5
|
-
* Supports consulting internal agents (colony/subagents) and external agents (P2P).
|
|
6
|
-
*
|
|
7
|
-
* Flow:
|
|
8
|
-
* Agent Decision Need
|
|
9
|
-
* ↓
|
|
10
|
-
* Query ValueFunction → Calculate Confidence
|
|
11
|
-
* ↓
|
|
12
|
-
* Confidence > Threshold → Execute
|
|
13
|
-
* ↓ (No)
|
|
14
|
-
* DecisionRequest → [Human | Internal Agents | External Agents]
|
|
15
|
-
* ↓
|
|
16
|
-
* Authorization / Collaboration
|
|
17
|
-
* ↓
|
|
18
|
-
* Execute & Archive Judgment
|
|
19
|
-
*/
|
|
20
|
-
import { Judgment } from './index.js';
|
|
21
|
-
export type DecisionLevel = 'autonomous' | 'consult_internal' | 'consult_external' | 'require_human';
|
|
22
|
-
export type ConsultationTarget = 'human' | 'colony_ant' | 'subagent' | 'p2p_agent';
|
|
23
|
-
export type DecisionStatus = 'pending' | 'authorized' | 'rejected' | 'executed' | 'failed';
|
|
24
|
-
export interface DecisionRequest {
|
|
25
|
-
id: string;
|
|
26
|
-
description: string;
|
|
27
|
-
context: string;
|
|
28
|
-
confidence: number;
|
|
29
|
-
threshold: number;
|
|
30
|
-
level: DecisionLevel;
|
|
31
|
-
targets: ConsultationTarget[];
|
|
32
|
-
status: DecisionStatus;
|
|
33
|
-
agentId: string;
|
|
34
|
-
createdAt: string;
|
|
35
|
-
respondedAt?: string;
|
|
36
|
-
response?: DecisionResponse;
|
|
37
|
-
judgment?: Judgment;
|
|
38
|
-
}
|
|
39
|
-
export interface DecisionResponse {
|
|
40
|
-
authorized: boolean;
|
|
41
|
-
content: string;
|
|
42
|
-
modifier?: string;
|
|
43
|
-
delegate?: ConsultationTarget;
|
|
44
|
-
by: ConsultationTarget;
|
|
45
|
-
timestamp: string;
|
|
46
|
-
}
|
|
47
|
-
export interface AgentConsultationResult {
|
|
48
|
-
target: ConsultationTarget;
|
|
49
|
-
agentId: string;
|
|
50
|
-
response: string;
|
|
51
|
-
confidence: number;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Set default confidence threshold
|
|
55
|
-
*/
|
|
56
|
-
export declare function setConfidenceThreshold(threshold: number): void;
|
|
57
|
-
/**
|
|
58
|
-
* Get default confidence threshold
|
|
59
|
-
*/
|
|
60
|
-
export declare function getConfidenceThreshold(): number;
|
|
61
|
-
/**
|
|
62
|
-
* Set default decision level
|
|
63
|
-
*/
|
|
64
|
-
export declare function setDefaultDecisionLevel(level: DecisionLevel): void;
|
|
65
|
-
/**
|
|
66
|
-
* Get default decision level
|
|
67
|
-
*/
|
|
68
|
-
export declare function getDefaultDecisionLevel(): DecisionLevel;
|
|
69
|
-
/**
|
|
70
|
-
* Evaluate a decision need and determine appropriate level
|
|
71
|
-
*/
|
|
72
|
-
export declare function evaluateDecision(description: string, context: string, agentId: string, threshold?: number): Promise<DecisionRequest>;
|
|
73
|
-
/**
|
|
74
|
-
* Submit a decision response
|
|
75
|
-
*/
|
|
76
|
-
export declare function submitDecisionResponse(requestId: string, response: DecisionResponse): Promise<DecisionRequest | null>;
|
|
77
|
-
/**
|
|
78
|
-
* Check if input is a decision response
|
|
79
|
-
*/
|
|
80
|
-
export declare function isDecisionResponse(input: string): boolean;
|
|
81
|
-
/**
|
|
82
|
-
* Parse decision response from natural language
|
|
83
|
-
*/
|
|
84
|
-
export declare function parseDecisionResponse(input: string): Partial<DecisionResponse>;
|
|
85
|
-
/**
|
|
86
|
-
* Query internal agents (colony ants and subagents)
|
|
87
|
-
*/
|
|
88
|
-
export declare function queryInternalAgents(request: DecisionRequest): Promise<AgentConsultationResult[]>;
|
|
89
|
-
/**
|
|
90
|
-
* Process human feedback and distill to judgment
|
|
91
|
-
*/
|
|
92
|
-
export declare function processHumanFeedback(requestId: string, input: string): Promise<DecisionRequest | null>;
|
|
93
|
-
/**
|
|
94
|
-
* Get pending decision requests
|
|
95
|
-
*/
|
|
96
|
-
export declare function getPendingDecisions(): DecisionRequest[];
|
|
97
|
-
/**
|
|
98
|
-
* Get decision request by ID
|
|
99
|
-
*/
|
|
100
|
-
export declare function getDecisionRequest(id: string): DecisionRequest | undefined;
|
|
101
|
-
/**
|
|
102
|
-
* Get decision statistics
|
|
103
|
-
*/
|
|
104
|
-
export declare function getDecisionStats(): {
|
|
105
|
-
pending: number;
|
|
106
|
-
authorized: number;
|
|
107
|
-
rejected: number;
|
|
108
|
-
total: number;
|
|
109
|
-
};
|
|
110
|
-
/**
|
|
111
|
-
* Subscribe to decision events
|
|
112
|
-
*/
|
|
113
|
-
export declare function onDecisionEvent(event: 'decisionCreated' | 'decisionResponded' | 'decisionExecuted', callback: (request: DecisionRequest) => void): void;
|
|
114
|
-
/**
|
|
115
|
-
* Unsubscribe from decision events
|
|
116
|
-
*/
|
|
117
|
-
export declare function offDecisionEvent(event: 'decisionCreated' | 'decisionResponded' | 'decisionExecuted', callback: (request: DecisionRequest) => void): void;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Judgment Distillation Module
|
|
3
|
-
*
|
|
4
|
-
* Real-time LLM-based distillation of human input into Judgment principles.
|
|
5
|
-
*
|
|
6
|
-
* Flow:
|
|
7
|
-
* Human Input → Trigger Detection → LLM Extraction → Judgment
|
|
8
|
-
* ↓
|
|
9
|
-
* Confidence + Evidence
|
|
10
|
-
*/
|
|
11
|
-
import { Judgment, DistillationTrigger, DistillationRequest } from './index.js';
|
|
12
|
-
export interface DistillationResult {
|
|
13
|
-
success: boolean;
|
|
14
|
-
judgment?: Judgment;
|
|
15
|
-
error?: string;
|
|
16
|
-
trigger: DistillationTrigger;
|
|
17
|
-
}
|
|
18
|
-
export interface FeedbackSignal {
|
|
19
|
-
judgmentId: string;
|
|
20
|
-
type: 'approve' | 'reject' | 'correct';
|
|
21
|
-
correction?: {
|
|
22
|
-
original: string;
|
|
23
|
-
corrected: string;
|
|
24
|
-
reason?: string;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
export interface TrajectoryEntry {
|
|
28
|
-
timestamp: string;
|
|
29
|
-
action: string;
|
|
30
|
-
outcome: string;
|
|
31
|
-
approved: boolean;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Initialize the distillation system
|
|
35
|
-
*/
|
|
36
|
-
export declare function initializeDistillation(): Promise<void>;
|
|
37
|
-
/**
|
|
38
|
-
* Detect trigger type from human input
|
|
39
|
-
*/
|
|
40
|
-
export declare function detectTrigger(input: string): DistillationTrigger | null;
|
|
41
|
-
/**
|
|
42
|
-
* Check if input indicates a judgment correction
|
|
43
|
-
*/
|
|
44
|
-
export declare function detectCorrection(input: string): {
|
|
45
|
-
original: string;
|
|
46
|
-
corrected: string;
|
|
47
|
-
} | null;
|
|
48
|
-
/**
|
|
49
|
-
* Add to trajectory buffer
|
|
50
|
-
*/
|
|
51
|
-
export declare function addToTrajectory(agentId: string, action: string, outcome: string, approved: boolean): void;
|
|
52
|
-
/**
|
|
53
|
-
* Detect trajectory pattern (repeated similar actions)
|
|
54
|
-
*/
|
|
55
|
-
export declare function detectTrajectoryPattern(agentId: string): TrajectoryEntry[] | null;
|
|
56
|
-
/**
|
|
57
|
-
* Distill human input to judgment using LLM
|
|
58
|
-
*/
|
|
59
|
-
export declare function distillInput(request: DistillationRequest): Promise<DistillationResult>;
|
|
60
|
-
/**
|
|
61
|
-
* Process feedback signal
|
|
62
|
-
*/
|
|
63
|
-
export declare function processFeedback(signal: FeedbackSignal): Promise<void>;
|
|
64
|
-
/**
|
|
65
|
-
* Check if human input contains judgment signal
|
|
66
|
-
*/
|
|
67
|
-
export declare function isJudgmentSignal(input: string): boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Get trajectory buffer statistics
|
|
70
|
-
*/
|
|
71
|
-
export declare function getTrajectoryStats(): Record<string, {
|
|
72
|
-
count: number;
|
|
73
|
-
approvalRate: number;
|
|
74
|
-
}>;
|
|
75
|
-
/**
|
|
76
|
-
* Clear trajectory buffer for agent
|
|
77
|
-
*/
|
|
78
|
-
export declare function clearTrajectory(agentId?: string): void;
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pi Judgment Integration for Bolloon
|
|
3
|
-
*
|
|
4
|
-
* Core module for capturing, distilling, and applying human judgment.
|
|
5
|
-
*
|
|
6
|
-
* Architecture:
|
|
7
|
-
* Human Input → Distillation Trigger → LLM Extraction → Judgment YAML
|
|
8
|
-
* ↓
|
|
9
|
-
* ValueFunction
|
|
10
|
-
* ↓
|
|
11
|
-
* Runtime Decision
|
|
12
|
-
*
|
|
13
|
-
* Storage: Hybrid mode
|
|
14
|
-
* - High-frequency rules: Embedded in context-fragments/*.md YAML frontmatter
|
|
15
|
-
* - Long-term preferences: .bolloon/judgments/*.yaml
|
|
16
|
-
*/
|
|
17
|
-
export type JudgmentType = 'rule' | 'preference' | 'trajectory' | 'reward';
|
|
18
|
-
export type JudgmentSource = 'human' | 'agent' | 'collaboration';
|
|
19
|
-
export type DistillationTrigger = 'explicit' | 'implicit' | 'trajectory';
|
|
20
|
-
export interface Judgment {
|
|
21
|
-
id: string;
|
|
22
|
-
type: JudgmentType;
|
|
23
|
-
content: string;
|
|
24
|
-
source: JudgmentSource;
|
|
25
|
-
confidence: number;
|
|
26
|
-
context?: string;
|
|
27
|
-
createdAt: string;
|
|
28
|
-
updatedAt: string;
|
|
29
|
-
evidence?: JudgmentEvidence;
|
|
30
|
-
metadata?: Record<string, unknown>;
|
|
31
|
-
}
|
|
32
|
-
export interface JudgmentEvidence {
|
|
33
|
-
trajectory?: TrajectoryPoint[];
|
|
34
|
-
preference_pair?: PreferencePair[];
|
|
35
|
-
correction?: Correction;
|
|
36
|
-
}
|
|
37
|
-
export interface TrajectoryPoint {
|
|
38
|
-
timestamp: string;
|
|
39
|
-
action: string;
|
|
40
|
-
outcome: string;
|
|
41
|
-
approved: boolean;
|
|
42
|
-
}
|
|
43
|
-
export interface PreferencePair {
|
|
44
|
-
query: string;
|
|
45
|
-
chosen: string;
|
|
46
|
-
rejected: string;
|
|
47
|
-
context?: string;
|
|
48
|
-
}
|
|
49
|
-
export interface Correction {
|
|
50
|
-
original: string;
|
|
51
|
-
corrected: string;
|
|
52
|
-
reason?: string;
|
|
53
|
-
timestamp: string;
|
|
54
|
-
}
|
|
55
|
-
export interface JudgmentFile {
|
|
56
|
-
judgments: Judgment[];
|
|
57
|
-
filePath: string;
|
|
58
|
-
lastModified: string;
|
|
59
|
-
}
|
|
60
|
-
export interface DistillationRequest {
|
|
61
|
-
rawInput: string;
|
|
62
|
-
trigger: DistillationTrigger;
|
|
63
|
-
context: string;
|
|
64
|
-
conversationHistory?: string[];
|
|
65
|
-
agentPrediction?: string;
|
|
66
|
-
}
|
|
67
|
-
export interface ValueFunction {
|
|
68
|
-
judgments: Judgment[];
|
|
69
|
-
contextWeights: Record<string, number>;
|
|
70
|
-
lastUpdated: string;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Load all judgments from YAML files
|
|
74
|
-
*/
|
|
75
|
-
export declare function loadJudgments(): Promise<Map<string, Judgment[]>>;
|
|
76
|
-
/**
|
|
77
|
-
* Create a new judgment
|
|
78
|
-
*/
|
|
79
|
-
export declare function createJudgment(params: {
|
|
80
|
-
type: JudgmentType;
|
|
81
|
-
content: string;
|
|
82
|
-
source: JudgmentSource;
|
|
83
|
-
confidence: number;
|
|
84
|
-
context?: string;
|
|
85
|
-
evidence?: JudgmentEvidence;
|
|
86
|
-
}): Promise<Judgment>;
|
|
87
|
-
/**
|
|
88
|
-
* Update judgment confidence based on feedback
|
|
89
|
-
*/
|
|
90
|
-
export declare function updateJudgmentConfidence(id: string, delta: number, feedbackType: 'approve' | 'reject' | 'correct'): Promise<Judgment | null>;
|
|
91
|
-
/**
|
|
92
|
-
* Get all judgments
|
|
93
|
-
*/
|
|
94
|
-
export declare function getAllJudgments(): Promise<Judgment[]>;
|
|
95
|
-
/**
|
|
96
|
-
* Get judgments by type
|
|
97
|
-
*/
|
|
98
|
-
export declare function getJudgmentsByType(type: JudgmentType): Promise<Judgment[]>;
|
|
99
|
-
/**
|
|
100
|
-
* Get judgments relevant to a context
|
|
101
|
-
*/
|
|
102
|
-
export declare function getJudgmentsForContext(context: string): Promise<Judgment[]>;
|
|
103
|
-
/**
|
|
104
|
-
* Calculate confidence score for a decision
|
|
105
|
-
*/
|
|
106
|
-
export declare function calculateConfidence(judgments: Judgment[]): number;
|
|
107
|
-
/**
|
|
108
|
-
* Build ValueFunction from judgments
|
|
109
|
-
*/
|
|
110
|
-
export declare function buildValueFunction(context?: string): Promise<ValueFunction>;
|
|
111
|
-
/**
|
|
112
|
-
* Get cached ValueFunction
|
|
113
|
-
*/
|
|
114
|
-
export declare function getValueFunction(context?: string): Promise<ValueFunction>;
|
|
115
|
-
/**
|
|
116
|
-
* Extract judgments from context fragment YAML frontmatter
|
|
117
|
-
*/
|
|
118
|
-
export declare function extractFromFragment(fragmentPath: string): Promise<Judgment[]>;
|
|
119
|
-
/**
|
|
120
|
-
* Load judgments from all context fragments
|
|
121
|
-
*/
|
|
122
|
-
export declare function loadFragmentJudgments(): Promise<Judgment[]>;
|
|
123
|
-
/**
|
|
124
|
-
* Get combined judgments (file + fragments)
|
|
125
|
-
*/
|
|
126
|
-
export declare function getCombinedJudgments(): Promise<Judgment[]>;
|
|
127
|
-
/**
|
|
128
|
-
* Get judgment statistics
|
|
129
|
-
*/
|
|
130
|
-
export declare function getJudgmentStats(): Promise<{
|
|
131
|
-
total: number;
|
|
132
|
-
byType: Record<JudgmentType, number>;
|
|
133
|
-
bySource: Record<JudgmentSource, number>;
|
|
134
|
-
averageConfidence: number;
|
|
135
|
-
}>;
|
|
136
|
-
/**
|
|
137
|
-
* Clear judgment cache
|
|
138
|
-
*/
|
|
139
|
-
export declare function clearCache(): void;
|