Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,10 @@ jobs:
needs: changes
if: needs.changes.outputs.core_tests == 'true'
runs-on: ubuntu-latest
timeout-minutes: 10
# The full public-minimum conformance suite normally takes about 9-10
# minutes on hosted runners. Keep enough headroom for setup and cleanup
# without dropping compatibility cases or weakening their deadlines.
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
Expand Down
111 changes: 111 additions & 0 deletions docs/architecture/rfcs/external-evidence-research-capability-v0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# RFC: External Evidence Research Capability v0

- Status: Draft implementation slice
- Scope: provider-neutral research planning, provenance admission, projection,
and retirement
- Roadmap: S8 capabilities and domain integration
- Language note: the Chinese version is a semantic mirror; drift is a defect.

## Problem

LoopX currently has useful but separate pieces: host research methods,
connector inventory, provider lifecycle, managed Turn contracts, and downstream
evidence consumers. A registry row can say `supported` without proving that the
provider is installed, enabled, ready, called, or accepted. Conversely, a host
research method can produce good evidence without a typed receipt that other
LoopX callers can inspect.

The product needs one outcome capability, not a generic connector executor:
turn a decision-bound research question into compact evidence whose provenance,
admission, use, and retirement are observable.

## Decision

Add capability `external-evidence-research` with protocol
`external_evidence_research_v0` and lifecycle:

`discover → select → provider execute → provenance receipt → parent admit/reject → downstream projection → retire`.

The request must name object, user activity, decision, evidence kinds, and
constraints. A provider is selectable only when current readback says all four
of `declared`, `installed`, `enabled`, and `ready`. Provider kinds are `method`
and `connector`; their execution remains with their existing owner.

Discovery is a read-only typed projection. It reports method/connector counts,
ready and unavailable counts, and ready provider ids. It also carries an
explicit truth contract: registry presence and `supported` status are not
readiness, and discovery itself observes neither provider execution nor
evidence coverage.

Provider execution stays with the existing method or connector owner. Core's
`receipt` boundary validates the returned identity and provenance against the
exact ready plan and records that a caller-presented receipt was observed. It
does not attest that provider execution occurred, or claim evidence
completeness, admission, or automatic promotion. Failure and empty evidence
remain fail-open to the caller's original-source path.

The plan carries a content-addressed `plan_id` over its normalized request,
provider candidates, selected ready provider, and execution envelope. The
provider receipt must echo that `plan_id`; Core reconstructs the canonical plan
and verifies the digest before it can report the receipt observation or
admission. The digest detects semantic plan mutation but grants no provider
authority and is not a provider attestation.

The receipt binds that exact plan, completion time, and a digest over the
complete receipt. Each admitted source has a direct non-file
reference, source family, evidence basis (`stated`,
`observed`, `tested`, or `inferred`), finding, limitation, relevant dates, and a
content digest. Raw provider content is never part of the Core projection.

The parent agent explicitly admits or rejects evidence. Rejection can retire;
admission remains retained until downstream readback covers every admitted
source reference. The admission id content-addresses the complete normalized
admission and downstream projection; retirement reconstructs and verifies that
identity before evaluating coverage.

## Ownership and TypeScript migration

This slice follows the TypeScript migration RFC without claiming a whole
control-plane promotion. TypeScript owns the pure typed decisions and is exposed
through the existing effect runtime. Python owns only CLI parsing, local JSON
input, and transport. The PR deletes no active connector path and creates no
second persisted authority.

Connector registry remains inventory and telemetry. `supported` never maps to
`ready=true`; explicit provider lifecycle observation may override the
inventory-only row for the same provider id.

## Product surfaces

- CLI: `external-evidence discover|plan|receipt|admit|retire`.
- Managed Turn: the same five effect-runtime methods.
- Frontend/Lark: not changed in this Core slice. A companion slice should render
the same typed plan/admission projection and readback; it must not invent a
second registry or lifecycle.

## Acceptance

- inventory-only connectors cannot be selected;
- discovery distinguishes empty, inventory-only, and ready inventories without
claiming execution or evidence coverage;
- method and connector providers use one protocol and receipt contract;
- an observed provider receipt is bound to the exact plan without implying
authenticated execution, evidence coverage, admission, or promotion;
- mutation of the request objective, decision, constraints, provider readiness,
or execution envelope fails canonical `plan_id` verification;
- stale request/provider identity, file provenance, and unsupported evidence
basis fail closed;
- admitted source refs are a subset of receipt sources;
- retirement rejects mutated disposition, source, or downstream projection
fields whose complete admission identity no longer matches;
- retirement waits for downstream coverage of every admitted source;
- CLI and effect-runtime TypeScript tests pass from the source checkout.

## Non-goals

- a universal browser/search engine;
- provider credential storage;
- raw page or transcript persistence;
- automatic evidence admission;
- trading, publishing, or other downstream effect authority;
- treating registration or usage counters as proof of evidence quality.
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# RFC:外部证据研究能力 v0

- 状态:Draft implementation slice
- 范围:provider-neutral 的研究规划、provenance 准入、投影与退休
- 路线图:S8 能力与领域集成
- 语言说明:本文件与英文版语义镜像;语义漂移属于缺陷。

## 问题

LoopX 已有 host 研究方法、connector 库存、provider 生命周期、managed Turn 合同和
下游证据消费者,但它们仍是分散的。一条 registry 记录可以显示 `supported`,却不能
证明 provider 已安装、已启用、ready、被真实调用或被父 Agent 采纳。反过来,host
研究方法也可能产出高质量证据,但没有可供其他 LoopX caller 检查的类型化回执。

产品需要的是一个结果能力,而不是通用 connector executor:把面向决策的研究问题
转换成 provenance、准入、消费与退休均可观察的紧凑证据。

## 决策

新增 `external-evidence-research` capability,协议为
`external_evidence_research_v0`,生命周期为:

`discover → select → provider execute → provenance receipt → parent admit/reject → downstream projection → retire`。

请求必须声明对象、用户活动、决策、证据类型与约束。只有当前读回同时证明
`declared`、`installed`、`enabled`、`ready` 的 provider 才能被选择。provider
分为 `method` 与 `connector`;执行仍归各自既有 owner。

Discovery 是只读类型化投影。它报告 method/connector 数量、ready/unavailable 数量和
ready provider id,并携带显式真值合同:registry presence 与 `supported` 都不等于
readiness,discovery 本身既不证明 provider 已执行,也不证明已有证据覆盖。

Provider 执行仍归既有 method 或 connector owner。Core 的 `receipt` 边界把返回身份和
provenance 与精确 ready plan 绑定,只记录“已观察到 caller 提交的 receipt”,并不证明
provider 真实执行,也不宣称证据完整、已被采纳或可自动晋升。执行失败或空证据时,
对 caller 的原始来源路径保持 fail-open。

plan 通过内容寻址的 `plan_id` 绑定规范化请求、provider candidates、已选 ready
provider 与 execution envelope。provider 回执必须回传该 `plan_id`;Core 只有重建
canonical plan 并验证 digest 后,才能报告 receipt observation 或进入准入。该 digest
能检测 plan 语义被改写,但不授予任何 provider 权限,也不构成 provider attestation。

回执绑定该精确 plan、完成时间与完整回执 digest。每条被采纳来源都包含直接且非文件型引用、来源
家族、证据基础(`stated`、`observed`、`tested` 或 `inferred`)、发现、局限、相关
日期和内容摘要。Core 投影永不携带 provider 原始内容。

父 Agent 必须显式采纳或拒绝。拒绝后可以退休;采纳后必须等下游读回覆盖全部被采纳
source ref,才能退休。admission id 对完整规范化 admission 与下游投影做内容寻址;
retirement 必须重建并验证该身份后,才可判断覆盖。

## 所有权与 TypeScript 迁移

本切片遵循 TypeScript 迁移 RFC,但不宣称整个控制面已 promote。纯类型化决策由
TypeScript 拥有,并通过既有 effect runtime 暴露;Python 仅拥有 CLI 参数、本地 JSON
输入与 transport。本 PR 不删除现有 connector 路径,也不建立第二份持久权威。

Connector registry 继续只拥有库存与遥测。`supported` 绝不映射为 `ready=true`;只有
显式 provider 生命周期观察,才可覆盖同 provider id 的 inventory-only 行。

## 产品入口

- CLI:`external-evidence discover|plan|receipt|admit|retire`;
- Managed Turn:复用同五个 effect-runtime 方法;
- Frontend/Lark:本 Core 切片不修改。后续 companion slice 只渲染同源 plan/admission
投影与读回,不建立第二个 registry 或生命周期。

## 验收

- inventory-only connector 不可被选择;
- discovery 能区分 empty、inventory-only 与 ready 库存,且不冒充执行或证据覆盖;
- method 与 connector provider 使用同一协议与回执;
- 已观察 provider 回执必须绑定精确 plan,且不得冒充经认证的执行、证据覆盖、采纳或晋升;
- 请求目标、决策、约束、provider readiness 或 execution envelope 被改写时,
canonical `plan_id` 验证必须 fail closed;
- 过期请求/provider 身份、文件 provenance、未知证据基础均 fail closed;
- 被采纳 source ref 必须是回执来源的子集;
- disposition、来源或下游投影被改写而与完整 admission identity 不一致时,retirement
必须 fail closed;
- 全部被采纳来源完成下游覆盖前不得退休;
- CLI 与 effect-runtime TypeScript 测试在源码 checkout 中通过。

## 非目标

- 通用浏览器或搜索引擎;
- provider 凭据存储;
- 原始页面/逐字稿持久化;
- 自动采纳证据;
- 交易、发布或其他下游 effect 权限;
- 把注册或使用计数当作证据质量证明。
1 change: 1 addition & 0 deletions docs/architecture/rfcs/loopx-overall-roadmap-v0.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ This maps **all 30 primary RFCs** at the scope baseline, counting language mirro
| [Provider-Neutral Turn-Start Inbox Hook v0](provider-neutral-turn-start-inbox-hook-v0.md) | S3/S8 | Implemented with explicit configuration | P0 hardening: bounded read→semantic triage→ACK/replay; preserve default-off and private provider cursors |
| [Provider-Neutral Post-Writeback Capability Hooks v0](provider-neutral-post-writeback-capability-hooks-v0.md) | S3/S8 | Draft; first periodic-report vertical implemented | P1: R3 return/successors reuse durable intent; isolate hook failure, no primary-transaction coupling/direct effects |
| [Agent IM, LoopX, And OpenViking Collaboration v0](agent-im-openviking-collaboration-v0.md) | S3/S6/S8 | Draft; three-owner integration unqualified | P1/P2: separate IM delivery, LoopX work authority and OV context; reconnect/revoke/source-loss cases |
| [External Evidence Research Capability v0](external-evidence-research-capability-v0.md) | S8/S11 | Draft; typed Core plan/admission/retirement and CLI slice implemented | P1: qualify one host-method and one connector execution with the same provenance receipt; then add frontend/Lark projection companions |
| [Per-Goal Usage, Token, and Cost Surfacing v0](goal-usage-token-cost-v0.md) | S7/S5 | Draft; Codex aggregate/cost display slice exists | P0 observation→P1 provider coverage: unknown is not zero, deduplicate accounting, price source/freshness; usage grants no budget |
| [Intelligent Review and Dynamic Presentation Surfaces v0](intelligent-review-presentation-surfaces-v0.md) | S5 | Draft; action/attention verticals and local delivery-chain/acceptance review implemented | P1: cross-channel disclosure and governed amendment/settlement review; local visibility does not qualify G2 |
| [Human Attention Wishlist v0](human-attention-wishlist-v0.md) | S5/S11 | Draft; Held | P3: reopen only on repeated second real need; sidecar cannot alter gates/quota/scheduling |
Expand Down
1 change: 1 addition & 0 deletions docs/architecture/rfcs/loopx-overall-roadmap-v0.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ canonical Todos 和相关 PR。
| [Provider-Neutral Turn-Start Inbox Hook v0](provider-neutral-turn-start-inbox-hook-v0.md) | S3/S8 | 显式配置下已实现 | P0 硬化:有界读→语义 triage→ACK/replay;默认关闭与 provider 私有 cursor 保持 |
| [Provider-Neutral Post-Writeback Capability Hooks v0](provider-neutral-post-writeback-capability-hooks-v0.zh-CN.md) | S3/S8 | Draft;periodic-report 首个 vertical 已实现 | P1:R3 返回/后继复用 durable intent;hook 失败隔离,不能加入主事务或直接执行 effect |
| [Agent IM, LoopX, And OpenViking Collaboration v0](agent-im-openviking-collaboration-v0.md) | S3/S6/S8 | Draft;三 owner 集成仍待资格 | P1/P2:IM 投递、LoopX work authority、OV context 分离;断线重放/权限撤销/来源失效 |
| [外部证据研究能力 v0](external-evidence-research-capability-v0.zh-CN.md) | S8/S11 | Draft;已实现类型化 Core plan/admission/retirement 与 CLI 切片 | P1:用同一 provenance 回执分别验收一个 host-method 与一个 connector 的真实执行,再补 frontend/Lark 同源投影 |
| [Per-Goal Usage, Token, and Cost Surfacing v0](goal-usage-token-cost-v0.md) | S7/S5 | Draft;Codex aggregate/cost 展示已有切片 | P0 观测→P1 多 provider:未知不作零、重复扣费去重、价格来源/时效;usage 不自动授权预算 |
| [Intelligent Review and Dynamic Presentation Surfaces v0](intelligent-review-presentation-surfaces-v0.zh-CN.md) | S5 | Draft;action/attention 纵切及本地交付链/验收复盘已实现 | P1:跨渠道披露和受治理的修订/结算复盘;本地可见性不代表 G2 通过 |
| [Human Attention Wishlist v0](human-attention-wishlist-v0.zh-CN.md) | S5/S11 | Draft;Held | P3:第二个重复真实需求出现才重开;sidecar 不改变 gate/quota/调度 |
Expand Down
2 changes: 2 additions & 0 deletions loopx/capabilities/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from .deep_research.catalog_entry import DEEP_RESEARCH_CATALOG_ENTRY
from .public_safe_outbound.catalog_entry import PUBLIC_SAFE_OUTBOUND_CATALOG_ENTRY
from .connector_registry.catalog_entry import CONNECTOR_REGISTRY_CATALOG_ENTRY
from .external_research.catalog_entry import EXTERNAL_RESEARCH_CATALOG_ENTRY
from .reliability_diagnostics.catalog_entry import RELIABILITY_DIAGNOSTICS_CATALOG_ENTRY
from .registry import CapabilityRegistry

Expand Down Expand Up @@ -53,6 +54,7 @@
DEEP_RESEARCH_CATALOG_ENTRY,
PUBLIC_SAFE_OUTBOUND_CATALOG_ENTRY,
CONNECTOR_REGISTRY_CATALOG_ENTRY,
EXTERNAL_RESEARCH_CATALOG_ENTRY,
RELIABILITY_DIAGNOSTICS_CATALOG_ENTRY,
)
# Preserve the original import surface while routing all reads through the registry.
Expand Down
Loading
Loading