Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 8 additions & 6 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ jobs:
timeout-minutes: 5
run: bun scripts/test-web-proof-thinking.ts --simple-reading
- name: Verify the browser's login and research flows with local fixtures
run: bun run test:web-login && bun run test:web-natural-first && bun run test:web-chat-session && bun run test:web-chat-cancel-recovery && bun run test:web-key-memory && bun run test:web-saved-key && bun run test:web-solve-process && bun run test:web-review-regressions && bun run test:web-plan-recovery && bun run test:web-plan-ownership && bun run test:web-explain && bun run test:web-explain-recovery
run: bun run test:web-login && bun run test:web-natural-first && bun run test:web-chat-session && bun run test:web-chat-cancel-recovery && bun run test:web-key-memory && bun run test:web-saved-key && bun run test:web-solve-process && bun run test:web-review-regressions && bun run test:web-explain && bun run test:web-explain-recovery
- name: Verify native team creation, approval and library continuation with local fixtures
run: bun scripts/test-web-native-team.ts && bun run test:web-plan-approval && bunx vitest run tests/webLibraryResearch.test.ts
- name: Verify paper drafting and download with local fixtures
run: bun scripts/test-web-paper.ts
- name: Verify research account switching and interrupted frontend operations
Expand Down Expand Up @@ -136,12 +138,12 @@ jobs:
run: bun run test:solver-reliability
- name: Verify dependency snapshots and receipt cache bindings
run: bunx vitest run --maxWorkers=4 tests/verifierSealedEnvironmentCache.test.ts tests/mathProofEnvironment.test.ts tests/leanProbeSnapshot.test.ts
- name: Verify sealed roles, independent audits and native delegation without models
- name: Verify sealed roles, native team sessions and historical inspection without models
if: matrix.lean == '4.33.0'
run: bunx vitest run --maxWorkers=1 tests/formalizationSandbox.test.ts tests/formalizationAudit.test.ts tests/agentSessionPlan.test.ts tests/nativeInvestigations.test.ts tests/nativeDelegation.test.ts tests/workflowHarness.test.ts
run: bunx vitest run --maxWorkers=1 tests/formalizationSandbox.test.ts tests/formalizationAudit.test.ts tests/agentSessionPlan.test.ts tests/codexSession.test.ts tests/skillRunInspection.test.ts tests/workflowHarness.test.ts tests/agentTeamTransportFallback.test.ts tests/codexSessionAgentControl.test.ts
- name: Verify projected proof contracts and retained source contexts
run: bunx vitest run --maxWorkers=4 tests/taskTypeContract.test.ts tests/projectionNotation.test.ts tests/taskSourceImplicitInstances.test.ts tests/taskSourceMacroProjection.test.ts tests/taskSourceNotationHints.test.ts tests/taskSourceNotationContext.test.ts tests/solverRetainedSourceGoals.test.ts tests/solverConditionalLibraryImports.test.ts tests/solverCanonicalGoalProof.test.ts
run: bunx vitest run --maxWorkers=4 tests/taskTypeContract.test.ts tests/projectionNotation.test.ts tests/taskSourceImplicitInstances.test.ts tests/taskSourceMacroProjection.test.ts tests/taskSourceNotationHints.test.ts tests/taskSourceNotationContext.test.ts
- name: Verify search tools, failure reuse and completed research delivery
run: bunx vitest run --maxWorkers=4 tests/declarationSearch.test.ts tests/continuationSearch.test.ts tests/tacticBatteryFailureCache.test.ts tests/solverAssemblyLeadYield.test.ts tests/solverCompletedGuidance.test.ts tests/codexCompletedResponse.test.ts
run: bunx vitest run --maxWorkers=4 tests/declarationSearch.test.ts tests/continuationSearch.test.ts tests/tacticBatteryFailureCache.test.ts tests/codexCompletedResponse.test.ts
- name: Verify definition contracts, conditional publication and research continuation
run: bunx vitest run --maxWorkers=4 tests/conditionalProjectionElaborator.test.ts tests/customSolverModules.test.ts tests/definitionContractChecks.test.ts tests/nextCheckNegativeDecisions.test.ts tests/planResearchConnections.test.ts tests/planningEvidence.test.ts tests/researchDurableCheckpoint.test.ts tests/solver.test.ts tests/solverDefinitionContractChecks.test.ts tests/solverKnowledgeConcurrency.test.ts tests/solverNextCheckPlanLifecycle.test.ts tests/solverResearchPublication.test.ts tests/solverResearchTransfer.test.ts tests/taskConditionalUniverses.test.ts tests/taskSourceConditionalContext.test.ts tests/verifiedProofPublication.test.ts tests/webModuleIdentity.test.ts
run: bunx vitest run --maxWorkers=4 tests/conditionalProjectionElaborator.test.ts tests/customSolverModules.test.ts tests/definitionContractChecks.test.ts tests/nextCheckNegativeDecisions.test.ts tests/planResearchConnections.test.ts tests/planningEvidence.test.ts tests/solver.test.ts tests/taskConditionalUniverses.test.ts tests/taskSourceConditionalContext.test.ts tests/webModuleIdentity.test.ts
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Keep the CLI and mathematics proof behavior independent of the original DeepScientist checkout. The optional `apps/web` workbench is a separate BYOK HTTP service and Docker supervisor; it must not become a dependency of the CLI or mathematics services. There is no Electron or desktop build.

`src/math` owns mathematics services. `src/solver/modules` separates M1–M5 research decisions; `src/solver/run.ts` prepares and evaluates runs, and `src/solver/research.ts` executes cooperative role sessions with shared budgets and run-local checkpoints. `src/solver/archive.ts` owns S1 records; `src/solver/evaluation.ts` owns fixed S3 final acceptance. `src/runtime/codexSession.ts` connects to Codex through stdio. Do not reintroduce the original Core, Team services, HTTP services, role queues, or MCP orchestration into the runtime. M3 selects ready tasks, M5 assigns Lead, Researcher, Engineer and fixed-version Reviewer responsibilities; `cooperation.ts` runs the asynchronous task and integration loop, and `cooperativeProof.ts` checks and merges partial declarations; S2 learning remains a future extension.
`src/math` owns mathematics services. `src/solver/run.ts` prepares and evaluates proof runs, `src/solver/research.ts` runs researcher sessions with shared budgets and checkpoints, and `src/solver/agentTeam.ts` connects Codex collaboration to isolated proof writers and checked handoffs. Codex Lead assigns responsibilities using the pinned Skill. `src/solver/archive.ts` owns S1 records and `src/solver/evaluation.ts` owns fixed S3 final acceptance. `src/runtime/codexSession.ts` connects to Codex through stdio. Keep historical collaboration records readable. Resume and reproduce retired host scheduling workflows with their pinned historical runtime. Do not reintroduce the original Core, Team services, HTTP services, role queues, or MCP orchestration into the runtime. S2 learning remains a future extension.

Preserve frozen problem/source identities, isolated solver worktrees, Lean receipts, independent evaluation, and resumable runs. A model's completed message is never proof acceptance.

Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ https://github.com/user-attachments/assets/57562769-aa15-474c-87ff-73265f097ec8

| 网页工作台与人机协同 | 零信任独立 Lean 验收 (`S1` / `S3`) | M1–M5 可替换策略与实验对比 |
| :--- | :--- | :--- |
| 内置 [`apps/web`](./apps/web/) 科研工作台,支持自然语言、TeX 与单文件 Lean 输入、后台语义审查、共同推进/自动推进模式与实时 Lean 反馈视图。 | 模型输出“已完成”或局部引理通过**从不替代最终验收**;[`evaluation.ts`](./src/solver/evaluation.ts) 固定完整原题与环境独立重验,[`archive.ts`](./src/solver/archive.ts) 完整保留每轮尝试、报错与用量以便断点续跑。 | 将证明构造、检查反馈、搜索调度、上下文筛选与协作分工拆分为 5 个带版本的 TypeScript 组件,可在不改宿主运行时和验收规则的前提下开展对照消融实验。 |
| 内置 [`apps/web`](./apps/web/) 科研工作台,支持自然语言、TeX 与单文件 Lean 输入、后台语义审查、Codex 原生团队、可选的首轮路线审批与实时 Lean 反馈视图。 | 模型输出“已完成”或局部引理通过**从不替代最终验收**;[`evaluation.ts`](./src/solver/evaluation.ts) 固定完整原题与环境独立重验,[`archive.ts`](./src/solver/archive.ts) 完整保留每轮尝试、报错与用量以便断点续跑。 | 将证明构造、检查反馈、搜索调度、上下文筛选与协作分工拆分为 5 个带版本的 TypeScript 组件,历史对照消融实验可用各自固定的版本复现。 |

| 仓库 | 定位与内容 | 许可证 |
| --- | --- | --- |
Expand Down Expand Up @@ -115,13 +115,10 @@ docker compose -f apps/web/compose.yml -f apps/web/compose.ghcr.yml up -d --no-b
```bash
bun run math component init --name my-search
bun run math component check --name my-search

export THEOREMOS_COMPONENT_CASE="$PWD/../theorem-os-runs/my-search"
bun run math example prepare --dir "$THEOREMOS_COMPONENT_CASE" --component my-search --workers 3
bun run math example check --dir "$THEOREMOS_COMPONENT_CASE"
bun run math example resume --dir "$THEOREMOS_COMPONENT_CASE"
```

新版协作由 Codex Lead 派工。旧宿主协作的档案继续可查,续跑和 M3 调度对照使用各自固定的历史版本。[续跑说明](./docs/usage.md#4-恢复运行)

</details>

---
Expand Down Expand Up @@ -174,7 +171,7 @@ bun run math example resume --dir "$THEOREMOS_COMPONENT_CASE"

## 五个可替换研究组件与核心文档

系统将“策略决策”与“结果验收”严格隔离(完整契约见 [`docs/solver-modules.md`](./docs/solver-modules.md) 与 [`src/solver/modules/index.ts`](./src/solver/modules/index.ts)):
系统将策略决策与结果验收分开。下表也列出了解读历史调度实验所需的 M3 任务排序与 M5 固定角色契约。新版团队的分工由 Codex Lead 决定。[模块说明](./docs/solver-modules.md)

| 组件 / 层级 | 核心职责 | 实现入口 | 文档与示例 |
| --- | --- | --- | --- |
Expand Down
11 changes: 4 additions & 7 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ https://github.com/user-attachments/assets/57562769-aa15-474c-87ff-73265f097ec8

| Web Workbench &amp; Human Control | Zero-Trust Acceptance (`S1` / `S3`) | Replaceable M1–M5 Modules |
| :--- | :--- | :--- |
| Built-in [`apps/web`](./apps/web/) UI supporting natural language, TeX, or single-file Lean input, background semantic review, cooperative/autonomous modes, and live Lean diagnostics. | A model claiming completion or local helper passes **never counts as theorem acceptance**; [`evaluation.ts`](./src/solver/evaluation.ts) re-verifies the frozen original problem cleanly, while [`archive.ts`](./src/solver/archive.ts) checkpoints every attempt for pause and resume. | Decouples proof construction, evidence checks, search scheduling, context assembly, and role assignment into versioned TypeScript interfaces for controlled ablation studies under identical problems and acceptance checks. |
| Built-in [`apps/web`](./apps/web/) UI supporting natural language, TeX, or single-file Lean input, background semantic review, native Codex teams, optional initial route approval, and live Lean diagnostics. | A model claiming completion or local helper passes **never counts as theorem acceptance**; [`evaluation.ts`](./src/solver/evaluation.ts) re-verifies the frozen original problem cleanly, while [`archive.ts`](./src/solver/archive.ts) checkpoints every attempt for pause and resume. | Decouples proof construction, evidence checks, search scheduling, context assembly, and role assignment into versioned TypeScript interfaces used by past ablation studies. Use the pinned revision to reproduce a study. |

| Repository | Scope &amp; Contents | License |
| --- | --- | --- |
Expand Down Expand Up @@ -116,13 +116,10 @@ Swap individual research policies without altering the host verification loop or
```bash
bun run math component init --name my-search
bun run math component check --name my-search

export THEOREMOS_COMPONENT_CASE="$PWD/../theorem-os-runs/my-search"
bun run math example prepare --dir "$THEOREMOS_COMPONENT_CASE" --component my-search --workers 3
bun run math example check --dir "$THEOREMOS_COMPONENT_CASE"
bun run math example resume --dir "$THEOREMOS_COMPONENT_CASE"
```

The Codex Lead assigns work in current collaborative runs. You can still inspect older host-scheduled runs. Resume them and reproduce M3 scheduling experiments with their respective pinned historical revisions. [Resume guide](./docs/harness-portability.md#resume-and-isolation)

</details>

---
Expand Down Expand Up @@ -175,7 +172,7 @@ bun run math example resume --dir "$THEOREMOS_COMPONENT_CASE"

## Five Replaceable Research Components

TheoremOS separates high-level search strategy from proof verification (full contracts in [`docs/solver-modules.md`](./docs/solver-modules.md) and [`src/solver/modules/index.ts`](./src/solver/modules/index.ts)):
TheoremOS separates research decisions from proof verification. The table includes the historical M3 task ordering and M5 fixed-role contracts used to interpret scheduling experiments. The Codex Lead assigns work in current teams. [Module guide](./docs/solver-modules.md)

| Component / Layer | Responsibility | Implementation | Guide &amp; Examples |
| --- | --- | --- | --- |
Expand Down
1 change: 1 addition & 0 deletions apps/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ ENV THEOREMOS_CODEX_BACKEND_EXECUTABLE=/opt/theoremos-codex-backend/codex
USER 10001:10001
RUN timeout 30s python3 scripts/codex-backend/check-capabilities.py "$THEOREMOS_CODEX_BACKEND_EXECUTABLE"
LABEL org.theoremos.native-agent-control=v1
LABEL org.theoremos.native-team-workflow=v1
LABEL org.theoremos.team-profile-preferences=v1
LABEL org.theoremos.team-expert-cards=v1
LABEL org.theoremos.worker-control=v1
Expand Down
Loading
Loading