From 5f6f2441c80f02be15e5d0e89f138762492cb412 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 12 Jul 2026 07:30:03 +0100 Subject: [PATCH] Remove Epiphany app-server compatibility surface --- epiphany-codex-bridge/Cargo.toml | 19 - epiphany-codex-bridge/src/checkpoint.rs | 61 - epiphany-codex-bridge/src/context.rs | 27 - epiphany-codex-bridge/src/context_protocol.rs | 155 - epiphany-codex-bridge/src/coordinator.rs | 335 -- .../src/coordinator_protocol.rs | 312 -- epiphany-codex-bridge/src/cultnet.rs | 42 - epiphany-codex-bridge/src/error.rs | 20 - epiphany-codex-bridge/src/invalidation.rs | 13 - epiphany-codex-bridge/src/jobs.rs | 95 - epiphany-codex-bridge/src/launch.rs | 37 - epiphany-codex-bridge/src/launch_context.rs | 5 - epiphany-codex-bridge/src/lib.rs | 41 +- epiphany-codex-bridge/src/mutation.rs | 176 - epiphany-codex-bridge/src/mutation_service.rs | 664 --- epiphany-codex-bridge/src/pressure.rs | 7 - epiphany-codex-bridge/src/protocol_edge.rs | 694 --- epiphany-codex-bridge/src/reorient.rs | 121 - epiphany-codex-bridge/src/results.rs | 137 - epiphany-codex-bridge/src/retrieve.rs | 63 - epiphany-codex-bridge/src/runtime_results.rs | 277 -- epiphany-codex-bridge/src/scene.rs | 16 - epiphany-codex-bridge/src/scene_protocol.rs | 189 - epiphany-codex-bridge/src/state.rs | 53 - epiphany-codex-bridge/src/view_protocol.rs | 550 --- .../src/bin/epiphany-mvp-status-smoke.rs | 472 -- epiphany-core/src/bin/epiphany-mvp-status.rs | 507 +-- .../src/bin/epiphany-phase6-context-smoke.rs | 529 --- .../bin/epiphany-phase6-freshness-smoke.rs | 389 -- .../bin/epiphany-phase6-graph-query-smoke.rs | 540 --- .../src/bin/epiphany-phase6-planning-smoke.rs | 529 --- .../src/bin/epiphany-phase6-pressure-smoke.rs | 241 -- .../src/bin/epiphany-phase6-reorient-smoke.rs | 498 --- .../src/bin/epiphany-phase6-scene-smoke.rs | 646 --- epiphany-core/src/distillation.rs | 4 +- .../src/prompts/epiphany_specialists.toml | 6 +- notes/epiphany-app-server-client-matrix.md | 17 +- notes/fresh-workspace-handoff.md | 8 + notes/native-coordinator-liberation-map.md | 10 + state/ledgers.msgpack | Bin 414777 -> 415240 bytes state/map.yaml | 2 +- vendor/codex/codex-rs/Cargo.lock | 769 +--- .../codex-rs/app-server-protocol/Cargo.toml | 1 - .../schema/json/ClientRequest.json | 1487 ------- .../schema/json/ServerNotification.json | 1768 -------- .../codex_app_server_protocol.schemas.json | 3816 ----------------- .../codex_app_server_protocol.v2.schemas.json | 3816 ----------------- ...ThreadEpiphanyJobsUpdatedNotification.json | 160 - ...hreadEpiphanyStateUpdatedNotification.json | 1565 ------- .../schema/json/v2/ThreadForkResponse.json | 1507 ------- .../schema/json/v2/ThreadListResponse.json | 1507 ------- .../json/v2/ThreadMetadataUpdateResponse.json | 1507 ------- .../schema/json/v2/ThreadReadResponse.json | 1507 ------- .../schema/json/v2/ThreadResumeResponse.json | 1507 ------- .../json/v2/ThreadRollbackResponse.json | 1507 ------- .../schema/json/v2/ThreadStartResponse.json | 1507 ------- .../json/v2/ThreadStartedNotification.json | 1507 ------- .../json/v2/ThreadUnarchiveResponse.json | 1507 ------- .../typescript/EpiphanyAcceptanceReceipt.ts | 5 - .../schema/typescript/EpiphanyChurnState.ts | 5 - .../schema/typescript/EpiphanyCodeRef.ts | 5 - .../typescript/EpiphanyEvidenceRecord.ts | 6 - .../schema/typescript/EpiphanyGraph.ts | 7 - .../typescript/EpiphanyGraphCheckpoint.ts | 5 - .../schema/typescript/EpiphanyGraphEdge.ts | 5 - .../typescript/EpiphanyGraphFrontier.ts | 5 - .../schema/typescript/EpiphanyGraphLink.ts | 5 - .../schema/typescript/EpiphanyGraphNode.ts | 5 - .../schema/typescript/EpiphanyGraphs.ts | 7 - .../schema/typescript/EpiphanyInvariant.ts | 5 - .../EpiphanyInvestigationCheckpoint.ts | 6 - .../EpiphanyInvestigationDisposition.ts | 5 - .../schema/typescript/EpiphanyJobBinding.ts | 6 - .../schema/typescript/EpiphanyJobKind.ts | 5 - .../schema/typescript/EpiphanyModeState.ts | 5 - .../schema/typescript/EpiphanyObservation.ts | 6 - .../typescript/EpiphanyPlanningState.ts | 5 - .../typescript/EpiphanyRetrievalStatus.ts | 5 - .../schema/typescript/EpiphanyRuntimeLink.ts | 5 - .../schema/typescript/EpiphanyScratchPad.ts | 5 - .../schema/typescript/EpiphanySubgoal.ts | 5 - .../schema/typescript/EpiphanyThreadState.ts | 5 - .../schema/typescript/ServerNotification.ts | 4 +- .../schema/typescript/index.ts | 24 - .../schema/typescript/v2/Thread.ts | 6 - .../typescript/v2/ThreadEpiphanyContext.ts | 11 - .../v2/ThreadEpiphanyContextMissing.ts | 5 - .../v2/ThreadEpiphanyContextSource.ts | 5 - .../v2/ThreadEpiphanyContextStateStatus.ts | 5 - .../v2/ThreadEpiphanyCoordinatorAction.ts | 5 - .../v2/ThreadEpiphanyCoordinatorSignals.ts | 10 - .../typescript/v2/ThreadEpiphanyCrrcAction.ts | 5 - .../v2/ThreadEpiphanyCrrcRecommendation.ts | 7 - .../v2/ThreadEpiphanyFreshnessSource.ts | 5 - .../v2/ThreadEpiphanyGraphContext.ts | 8 - .../v2/ThreadEpiphanyGraphFreshness.ts | 6 - .../v2/ThreadEpiphanyGraphFreshnessStatus.ts | 5 - .../typescript/v2/ThreadEpiphanyGraphQuery.ts | 19 - .../v2/ThreadEpiphanyGraphQueryDirection.ts | 5 - .../v2/ThreadEpiphanyGraphQueryKind.ts | 5 - .../v2/ThreadEpiphanyGraphQueryMatched.ts | 5 - .../v2/ThreadEpiphanyGraphQueryMissing.ts | 5 - .../v2/ThreadEpiphanyInvalidationInput.ts | 6 - .../v2/ThreadEpiphanyInvalidationStatus.ts | 5 - .../schema/typescript/v2/ThreadEpiphanyJob.ts | 7 - .../typescript/v2/ThreadEpiphanyJobKind.ts | 5 - .../typescript/v2/ThreadEpiphanyJobStatus.ts | 5 - .../ThreadEpiphanyJobsUpdatedNotification.ts | 7 - .../v2/ThreadEpiphanyJobsUpdatedSource.ts | 5 - .../v2/ThreadEpiphanyPlanningSummary.ts | 5 - .../typescript/v2/ThreadEpiphanyPressure.ts | 8 - .../v2/ThreadEpiphanyPressureBasis.ts | 5 - .../v2/ThreadEpiphanyPressureLevel.ts | 5 - .../v2/ThreadEpiphanyPressureStatus.ts | 5 - .../v2/ThreadEpiphanyReorientAction.ts | 5 - .../ThreadEpiphanyReorientCheckpointStatus.ts | 5 - .../v2/ThreadEpiphanyReorientDecision.ts | 12 - .../v2/ThreadEpiphanyReorientFinding.ts | 5 - .../v2/ThreadEpiphanyReorientReason.ts | 5 - .../v2/ThreadEpiphanyReorientResultStatus.ts | 5 - .../v2/ThreadEpiphanyReorientSource.ts | 5 - .../v2/ThreadEpiphanyReorientStateStatus.ts | 5 - .../v2/ThreadEpiphanyRetrievalFreshness.ts | 6 - .../ThreadEpiphanyRetrievalFreshnessStatus.ts | 5 - .../v2/ThreadEpiphanyRoleFinding.ts | 8 - .../typescript/v2/ThreadEpiphanyRoleId.ts | 5 - .../typescript/v2/ThreadEpiphanyRoleLane.ts | 9 - .../v2/ThreadEpiphanyRoleResultStatus.ts | 5 - ...ThreadEpiphanyRoleSelfPersistenceReview.ts | 6 - ...ThreadEpiphanyRoleSelfPersistenceStatus.ts | 5 - .../typescript/v2/ThreadEpiphanyRoleStatus.ts | 5 - .../v2/ThreadEpiphanyRolesSource.ts | 5 - .../typescript/v2/ThreadEpiphanyScene.ts | 15 - .../v2/ThreadEpiphanySceneAction.ts | 5 - .../typescript/v2/ThreadEpiphanySceneChurn.ts | 5 - .../typescript/v2/ThreadEpiphanySceneGraph.ts | 5 - ...eadEpiphanySceneInvestigationCheckpoint.ts | 6 - .../v2/ThreadEpiphanySceneRecord.ts | 5 - .../v2/ThreadEpiphanySceneRecords.ts | 6 - .../v2/ThreadEpiphanySceneRetrieval.ts | 6 - .../v2/ThreadEpiphanySceneSource.ts | 5 - .../v2/ThreadEpiphanySceneStateStatus.ts | 5 - .../v2/ThreadEpiphanySceneStatusCount.ts | 5 - .../v2/ThreadEpiphanySceneSubgoal.ts | 5 - .../v2/ThreadEpiphanyStateUpdatedField.ts | 5 - .../ThreadEpiphanyStateUpdatedNotification.ts | 8 - .../v2/ThreadEpiphanyStateUpdatedSource.ts | 5 - .../v2/ThreadEpiphanyUpdatePatch.ts | 20 - .../v2/ThreadEpiphanyViewCoordinator.ts | 12 - .../typescript/v2/ThreadEpiphanyViewCrrc.ts | 14 - .../typescript/v2/ThreadEpiphanyViewLens.ts | 5 - .../v2/ThreadEpiphanyViewPlanning.ts | 9 - .../v2/ThreadEpiphanyViewReorient.ts | 8 - .../typescript/v2/ThreadEpiphanyViewRoles.ts | 8 - .../schema/typescript/v2/index.ts | 69 - .../app-server-protocol/src/export.rs | 1 - .../src/protocol/common.rs | 1016 ----- .../app-server-protocol/src/protocol/v2.rs | 1404 ------ vendor/codex/codex-rs/app-server/README.md | 15 - .../app-server/src/codex_message_processor.rs | 42 - .../epiphany_compatibility_architecture.rs | 89 - .../epiphany_mutation_routes.rs | 190 - .../epiphany_read_routes.rs | 418 -- .../epiphany_thread_host.rs | 124 - .../legacy_epiphany_rollout.rs | 262 -- .../codex_message_processor/review_routes.rs | 2 - .../thread_archive_routes.rs | 11 - .../thread_fork_routes.rs | 2 - .../thread_projection.rs | 3 - .../thread_read_routes.rs | 24 - .../thread_resume_routes.rs | 1 - .../thread_start_routes.rs | 7 - .../token_usage_replay.rs | 17 - .../codex-rs/app-server/src/thread_status.rs | 1 - 174 files changed, 110 insertions(+), 39659 deletions(-) delete mode 100644 epiphany-codex-bridge/src/checkpoint.rs delete mode 100644 epiphany-codex-bridge/src/context.rs delete mode 100644 epiphany-codex-bridge/src/context_protocol.rs delete mode 100644 epiphany-codex-bridge/src/coordinator.rs delete mode 100644 epiphany-codex-bridge/src/coordinator_protocol.rs delete mode 100644 epiphany-codex-bridge/src/cultnet.rs delete mode 100644 epiphany-codex-bridge/src/error.rs delete mode 100644 epiphany-codex-bridge/src/jobs.rs delete mode 100644 epiphany-codex-bridge/src/launch.rs delete mode 100644 epiphany-codex-bridge/src/launch_context.rs delete mode 100644 epiphany-codex-bridge/src/mutation.rs delete mode 100644 epiphany-codex-bridge/src/mutation_service.rs delete mode 100644 epiphany-codex-bridge/src/pressure.rs delete mode 100644 epiphany-codex-bridge/src/protocol_edge.rs delete mode 100644 epiphany-codex-bridge/src/reorient.rs delete mode 100644 epiphany-codex-bridge/src/results.rs delete mode 100644 epiphany-codex-bridge/src/retrieve.rs delete mode 100644 epiphany-codex-bridge/src/runtime_results.rs delete mode 100644 epiphany-codex-bridge/src/scene.rs delete mode 100644 epiphany-codex-bridge/src/scene_protocol.rs delete mode 100644 epiphany-codex-bridge/src/state.rs delete mode 100644 epiphany-codex-bridge/src/view_protocol.rs delete mode 100644 epiphany-core/src/bin/epiphany-mvp-status-smoke.rs delete mode 100644 epiphany-core/src/bin/epiphany-phase6-context-smoke.rs delete mode 100644 epiphany-core/src/bin/epiphany-phase6-freshness-smoke.rs delete mode 100644 epiphany-core/src/bin/epiphany-phase6-graph-query-smoke.rs delete mode 100644 epiphany-core/src/bin/epiphany-phase6-planning-smoke.rs delete mode 100644 epiphany-core/src/bin/epiphany-phase6-pressure-smoke.rs delete mode 100644 epiphany-core/src/bin/epiphany-phase6-reorient-smoke.rs delete mode 100644 epiphany-core/src/bin/epiphany-phase6-scene-smoke.rs delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadEpiphanyJobsUpdatedNotification.json delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadEpiphanyStateUpdatedNotification.json delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyAcceptanceReceipt.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyChurnState.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyCodeRef.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyEvidenceRecord.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraph.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphCheckpoint.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphEdge.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphFrontier.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphLink.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphNode.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphs.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyInvariant.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyInvestigationCheckpoint.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyInvestigationDisposition.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyJobBinding.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyJobKind.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyModeState.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyObservation.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyPlanningState.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyRetrievalStatus.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyRuntimeLink.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyScratchPad.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanySubgoal.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyThreadState.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyContext.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyContextMissing.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyContextSource.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyContextStateStatus.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyCoordinatorAction.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyCoordinatorSignals.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyCrrcAction.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyCrrcRecommendation.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyFreshnessSource.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphContext.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphFreshness.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphFreshnessStatus.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQuery.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQueryDirection.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQueryKind.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQueryMatched.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQueryMissing.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyInvalidationInput.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyInvalidationStatus.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJob.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobKind.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobStatus.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobsUpdatedNotification.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobsUpdatedSource.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPlanningSummary.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPressure.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPressureBasis.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPressureLevel.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPressureStatus.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientAction.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientCheckpointStatus.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientDecision.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientFinding.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientReason.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientResultStatus.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientSource.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientStateStatus.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRetrievalFreshness.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRetrievalFreshnessStatus.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleFinding.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleId.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleLane.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleResultStatus.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleSelfPersistenceReview.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleSelfPersistenceStatus.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleStatus.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRolesSource.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyScene.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneAction.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneChurn.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneGraph.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneInvestigationCheckpoint.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneRecord.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneRecords.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneRetrieval.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneSource.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneStateStatus.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneStatusCount.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneSubgoal.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyStateUpdatedField.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyStateUpdatedNotification.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyStateUpdatedSource.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyUpdatePatch.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewCoordinator.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewCrrc.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewLens.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewPlanning.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewReorient.ts delete mode 100644 vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewRoles.ts delete mode 100644 vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_compatibility_architecture.rs delete mode 100644 vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_mutation_routes.rs delete mode 100644 vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_read_routes.rs delete mode 100644 vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_thread_host.rs delete mode 100644 vendor/codex/codex-rs/app-server/src/codex_message_processor/legacy_epiphany_rollout.rs diff --git a/epiphany-codex-bridge/Cargo.toml b/epiphany-codex-bridge/Cargo.toml index d546ce42..662eeea9 100644 --- a/epiphany-codex-bridge/Cargo.toml +++ b/epiphany-codex-bridge/Cargo.toml @@ -10,26 +10,7 @@ name = "epiphany_codex_bridge" path = "src/lib.rs" [dependencies] -anyhow = "1" -chrono = { version = "0.4", default-features = false, features = ["clock", "serde"] } -codex-app-server-protocol = { path = "../vendor/codex/codex-rs/app-server-protocol" } codex-utils-absolute-path = { path = "../vendor/codex/codex-rs/utils/absolute-path" } -# Keep standalone bridge checks aligned with the vendored Codex workspace lock. -# `starlark_map 0.13.0` does not compile against newer allocative/hashbrown -# resolver choices on this machine. -allocative = "=0.3.4" -epiphany-core = { path = "../epiphany-core" } -epiphany-state-model = { path = "../epiphany-state-model" } notify = "8.2.0" -serde_json = "1" -serde = { version = "1", features = ["derive"] } tokio = { version = "1", features = ["rt", "sync"] } tracing = "0.1" -uuid = { version = "1", features = ["v4"] } - -[patch.crates-io] -tokio-tungstenite = { git = "https://github.com/openai-oss-forks/tokio-tungstenite", rev = "132f5b39c862e3a970f731d709608b3e6276d5f6" } -tungstenite = { git = "https://github.com/openai-oss-forks/tungstenite-rs", rev = "9200079d3b54a1ff51072e24d81fd354f085156f" } - -[patch."ssh://git@github.com/openai-oss-forks/tungstenite-rs.git"] -tungstenite = { git = "https://github.com/openai-oss-forks/tungstenite-rs", rev = "9200079d3b54a1ff51072e24d81fd354f085156f" } diff --git a/epiphany-codex-bridge/src/checkpoint.rs b/epiphany-codex-bridge/src/checkpoint.rs deleted file mode 100644 index f50c6be2..00000000 --- a/epiphany-codex-bridge/src/checkpoint.rs +++ /dev/null @@ -1,61 +0,0 @@ -#[derive(Default)] -pub struct EpiphanyCheckpointInterventionState { - last_intervention_turn_id: Option, - pending_compaction_turn_id: Option, -} - -impl EpiphanyCheckpointInterventionState { - pub fn record_intervention(&mut self, turn_id: &str) -> bool { - if self.last_intervention_turn_id.as_deref() == Some(turn_id) { - return false; - } - self.last_intervention_turn_id = Some(turn_id.to_string()); - true - } - - pub fn mark_pending_compaction(&mut self, turn_id: &str) { - self.pending_compaction_turn_id = Some(turn_id.to_string()); - } - - pub fn take_pending_compaction(&mut self, turn_id: &str) -> bool { - if self.pending_compaction_turn_id.as_deref() != Some(turn_id) { - return false; - } - self.pending_compaction_turn_id = None; - true - } - - pub fn clear_pending_compaction(&mut self) { - self.pending_compaction_turn_id = None; - } -} - -#[cfg(test)] -mod tests { - use super::EpiphanyCheckpointInterventionState; - - #[test] - fn pending_compaction_is_turn_scoped() { - let mut state = EpiphanyCheckpointInterventionState::default(); - - assert!(state.record_intervention("turn-a")); - assert!(!state.record_intervention("turn-a")); - assert!(!state.take_pending_compaction("turn-a")); - - state.mark_pending_compaction("turn-a"); - - assert!(!state.take_pending_compaction("turn-b")); - assert!(state.take_pending_compaction("turn-a")); - assert!(!state.take_pending_compaction("turn-a")); - } - - #[test] - fn pending_compaction_can_be_cleared() { - let mut state = EpiphanyCheckpointInterventionState::default(); - - state.mark_pending_compaction("turn-a"); - state.clear_pending_compaction(); - - assert!(!state.take_pending_compaction("turn-a")); - } -} diff --git a/epiphany-codex-bridge/src/context.rs b/epiphany-codex-bridge/src/context.rs deleted file mode 100644 index b1d4e3ce..00000000 --- a/epiphany-codex-bridge/src/context.rs +++ /dev/null @@ -1,27 +0,0 @@ -use epiphany_core::EpiphanyContextParams; -use epiphany_core::EpiphanyContextView; -use epiphany_core::EpiphanyGraphQuery; -use epiphany_core::EpiphanyGraphQueryView; -use epiphany_core::EpiphanyPlanningView; -use epiphany_core::derive_context; -use epiphany_core::derive_graph_query; -use epiphany_core::derive_planning_view; -use epiphany_state_model::EpiphanyThreadState; - -pub fn derive_epiphany_context( - state: Option<&EpiphanyThreadState>, - params: &EpiphanyContextParams, -) -> EpiphanyContextView { - derive_context(state, params) -} - -pub fn derive_epiphany_planning(state: Option<&EpiphanyThreadState>) -> EpiphanyPlanningView { - derive_planning_view(state) -} - -pub fn derive_epiphany_graph_query( - state: Option<&EpiphanyThreadState>, - query: &EpiphanyGraphQuery, -) -> EpiphanyGraphQueryView { - derive_graph_query(state, query) -} diff --git a/epiphany-codex-bridge/src/context_protocol.rs b/epiphany-codex-bridge/src/context_protocol.rs deleted file mode 100644 index 949fab3a..00000000 --- a/epiphany-codex-bridge/src/context_protocol.rs +++ /dev/null @@ -1,155 +0,0 @@ -use codex_app_server_protocol::ThreadEpiphanyContext; -use codex_app_server_protocol::ThreadEpiphanyContextMissing; -use codex_app_server_protocol::ThreadEpiphanyContextStateStatus; -use codex_app_server_protocol::ThreadEpiphanyGraphContext; -use codex_app_server_protocol::ThreadEpiphanyGraphQueryMatched; -use codex_app_server_protocol::ThreadEpiphanyGraphQueryMissing; -use codex_app_server_protocol::ThreadEpiphanyPlanningSummary; -use epiphany_core::EpiphanyContext as CoreEpiphanyContext; -use epiphany_core::EpiphanyContextMissing as CoreEpiphanyContextMissing; -use epiphany_core::EpiphanyContextStateStatus as CoreEpiphanyContextStateStatus; -use epiphany_core::EpiphanyContextView; -use epiphany_core::EpiphanyGraphContext as CoreEpiphanyGraphContext; -use epiphany_core::EpiphanyGraphQueryMatched as CoreEpiphanyGraphQueryMatched; -use epiphany_core::EpiphanyGraphQueryMissing as CoreEpiphanyGraphQueryMissing; -use epiphany_core::EpiphanyGraphQueryView; -use epiphany_core::EpiphanyPlanningStateStatus as CoreEpiphanyPlanningStateStatus; -use epiphany_core::EpiphanyPlanningSummary as CoreEpiphanyPlanningSummary; -use epiphany_core::EpiphanyPlanningView; -use epiphany_state_model::EpiphanyGraphCheckpoint; -use epiphany_state_model::EpiphanyGraphFrontier; -use epiphany_state_model::EpiphanyPlanningState; - -pub fn protocol_context_view( - view: EpiphanyContextView, -) -> ( - ThreadEpiphanyContextStateStatus, - Option, - ThreadEpiphanyContext, - ThreadEpiphanyContextMissing, -) { - ( - protocol_context_state_status(view.state_status), - view.state_revision, - protocol_context(view.context), - protocol_context_missing(view.missing), - ) -} - -pub fn protocol_context_state_status( - status: CoreEpiphanyContextStateStatus, -) -> ThreadEpiphanyContextStateStatus { - match status { - CoreEpiphanyContextStateStatus::Missing => ThreadEpiphanyContextStateStatus::Missing, - CoreEpiphanyContextStateStatus::Ready => ThreadEpiphanyContextStateStatus::Ready, - } -} - -fn protocol_context(context: CoreEpiphanyContext) -> ThreadEpiphanyContext { - ThreadEpiphanyContext { - graph: protocol_graph_context(context.graph), - frontier: context.frontier, - checkpoint: context.checkpoint, - investigation_checkpoint: context.investigation_checkpoint, - observations: context.observations, - evidence: context.evidence, - } -} - -pub fn protocol_graph_context(graph: CoreEpiphanyGraphContext) -> ThreadEpiphanyGraphContext { - ThreadEpiphanyGraphContext { - architecture_nodes: graph.architecture_nodes, - architecture_edges: graph.architecture_edges, - dataflow_nodes: graph.dataflow_nodes, - dataflow_edges: graph.dataflow_edges, - links: graph.links, - } -} - -fn protocol_context_missing(missing: CoreEpiphanyContextMissing) -> ThreadEpiphanyContextMissing { - ThreadEpiphanyContextMissing { - graph_node_ids: missing.graph_node_ids, - graph_edge_ids: missing.graph_edge_ids, - observation_ids: missing.observation_ids, - evidence_ids: missing.evidence_ids, - } -} - -pub fn protocol_planning_view( - view: EpiphanyPlanningView, -) -> ( - ThreadEpiphanyContextStateStatus, - Option, - EpiphanyPlanningState, - ThreadEpiphanyPlanningSummary, -) { - ( - match view.state_status { - CoreEpiphanyPlanningStateStatus::Missing => ThreadEpiphanyContextStateStatus::Missing, - CoreEpiphanyPlanningStateStatus::Ready => ThreadEpiphanyContextStateStatus::Ready, - }, - view.state_revision, - view.planning, - protocol_planning_summary(view.summary), - ) -} - -fn protocol_planning_summary( - summary: CoreEpiphanyPlanningSummary, -) -> ThreadEpiphanyPlanningSummary { - ThreadEpiphanyPlanningSummary { - capture_count: summary.capture_count, - pending_capture_count: summary.pending_capture_count, - github_issue_capture_count: summary.github_issue_capture_count, - backlog_item_count: summary.backlog_item_count, - ready_backlog_item_count: summary.ready_backlog_item_count, - roadmap_stream_count: summary.roadmap_stream_count, - objective_draft_count: summary.objective_draft_count, - draft_objective_count: summary.draft_objective_count, - active_objective: summary.active_objective, - note: summary.note, - } -} - -pub fn protocol_graph_query_view( - view: EpiphanyGraphQueryView, -) -> ( - ThreadEpiphanyContextStateStatus, - Option, - ThreadEpiphanyGraphContext, - Option, - Option, - ThreadEpiphanyGraphQueryMatched, - ThreadEpiphanyGraphQueryMissing, -) { - ( - protocol_context_state_status(view.state_status), - view.state_revision, - protocol_graph_context(view.graph), - view.frontier, - view.checkpoint, - protocol_graph_query_matched(view.matched), - protocol_graph_query_missing(view.missing), - ) -} - -fn protocol_graph_query_matched( - matched: CoreEpiphanyGraphQueryMatched, -) -> ThreadEpiphanyGraphQueryMatched { - ThreadEpiphanyGraphQueryMatched { - node_ids: matched.node_ids, - edge_ids: matched.edge_ids, - paths: matched.paths, - symbols: matched.symbols, - edge_kinds: matched.edge_kinds, - } -} - -fn protocol_graph_query_missing( - missing: CoreEpiphanyGraphQueryMissing, -) -> ThreadEpiphanyGraphQueryMissing { - ThreadEpiphanyGraphQueryMissing { - node_ids: missing.node_ids, - edge_ids: missing.edge_ids, - } -} diff --git a/epiphany-codex-bridge/src/coordinator.rs b/epiphany-codex-bridge/src/coordinator.rs deleted file mode 100644 index 880665cb..00000000 --- a/epiphany-codex-bridge/src/coordinator.rs +++ /dev/null @@ -1,335 +0,0 @@ -use epiphany_core::EPIPHANY_IMAGINATION_OWNER_ROLE; -use epiphany_core::EPIPHANY_IMAGINATION_ROLE_BINDING_ID; -use epiphany_core::EPIPHANY_MODELING_ROLE_BINDING_ID; -use epiphany_core::EPIPHANY_REORIENT_OWNER_ROLE; -use epiphany_core::EPIPHANY_RESEARCH_ROLE_BINDING_ID; -use epiphany_core::EPIPHANY_VERIFICATION_ROLE_BINDING_ID; -use epiphany_core::EpiphanyCoordinatorDecision as CoreEpiphanyCoordinatorDecision; -use epiphany_core::EpiphanyCoordinatorRoleResultStatus as CoreEpiphanyCoordinatorRoleResultStatus; -use epiphany_core::EpiphanyCoordinatorStatus as CoreEpiphanyCoordinatorStatus; -use epiphany_core::EpiphanyCoordinatorStatusInput; -use epiphany_core::EpiphanyCrrcAction as CoreEpiphanyCrrcAction; -use epiphany_core::EpiphanyCrrcInput; -use epiphany_core::EpiphanyCrrcRecommendation as CoreEpiphanyCrrcRecommendation; -use epiphany_core::EpiphanyCrrcReorientAction as CoreEpiphanyCrrcReorientAction; -use epiphany_core::EpiphanyCrrcResultStatus as CoreEpiphanyCrrcResultStatus; -use epiphany_core::EpiphanyCrrcStateStatus as CoreEpiphanyCrrcStateStatus; -use epiphany_core::EpiphanyJobStatus as CoreEpiphanyJobStatus; -use epiphany_core::EpiphanyJobView; -use epiphany_core::EpiphanyReorientAction as CoreEpiphanyReorientAction; -use epiphany_core::EpiphanyReorientDecision as CoreEpiphanyReorientDecision; -use epiphany_core::EpiphanyReorientFindingInterpretation as CoreEpiphanyReorientFinding; -use epiphany_core::EpiphanyReorientStateStatus as CoreEpiphanyReorientStateStatus; -use epiphany_core::EpiphanyRoleBoardCheckpointSummary; -use epiphany_core::EpiphanyRoleBoardInput; -use epiphany_core::EpiphanyRoleBoardJob; -use epiphany_core::EpiphanyRoleBoardJobStatus; -use epiphany_core::EpiphanyRoleBoardLane; -use epiphany_core::EpiphanyRoleBoardPlanningSummary; -use epiphany_core::EpiphanyRoleResultRoleId; -use epiphany_core::derive_coordinator_finding_signals; -use epiphany_core::derive_coordinator_status; -use epiphany_core::derive_role_board; -use epiphany_core::recommend_crrc_action; -use epiphany_core::render_epiphany_coordinator_note; -use epiphany_core::render_role_board_note; -use epiphany_core::runtime_hands_receipt_chain_after; -use epiphany_state_model::EpiphanyThreadState; - -use crate::runtime_results::load_core_epiphany_role_result_snapshot; - -use std::path::Path; - -pub fn map_epiphany_crrc_recommendation( - loaded: bool, - state_status: CoreEpiphanyReorientStateStatus, - pressure: &epiphany_core::EpiphanyPressure, - decision: &CoreEpiphanyReorientDecision, - result_status: CoreEpiphanyCrrcResultStatus, - checkpoint_present: bool, - finding_present: bool, - finding_accepted: bool, -) -> CoreEpiphanyCrrcRecommendation { - recommend_crrc_action(EpiphanyCrrcInput { - loaded, - state_status: map_core_crrc_state_status_from_reorient(state_status), - should_prepare_compaction: pressure.should_prepare_compaction, - reorient_action: map_core_crrc_reorient_action(decision.action), - result_status, - checkpoint_present, - finding_present, - finding_accepted, - }) -} - -fn map_core_crrc_state_status_from_reorient( - status: CoreEpiphanyReorientStateStatus, -) -> CoreEpiphanyCrrcStateStatus { - match status { - CoreEpiphanyReorientStateStatus::Missing => CoreEpiphanyCrrcStateStatus::Missing, - CoreEpiphanyReorientStateStatus::Ready => CoreEpiphanyCrrcStateStatus::Ready, - } -} - -fn map_core_crrc_reorient_action( - action: CoreEpiphanyReorientAction, -) -> CoreEpiphanyCrrcReorientAction { - match action { - CoreEpiphanyReorientAction::Resume => CoreEpiphanyCrrcReorientAction::Resume, - CoreEpiphanyReorientAction::Regather => CoreEpiphanyCrrcReorientAction::Regather, - } -} - -pub type EpiphanyCoordinatorDecision = CoreEpiphanyCoordinatorDecision; - -pub struct EpiphanyCoordinatorStatus { - pub core: CoreEpiphanyCoordinatorStatus, - pub note: String, -} - -pub async fn derive_epiphany_coordinator_status( - state: Option<&EpiphanyThreadState>, - runtime_store_path: Option<&Path>, - state_status: CoreEpiphanyReorientStateStatus, - pressure: &epiphany_core::EpiphanyPressure, - recommendation: &CoreEpiphanyCrrcRecommendation, - roles: Vec, - reorient_decision: Option<&CoreEpiphanyReorientDecision>, - reorient_result_status: CoreEpiphanyCrrcResultStatus, - reorient_finding: Option<&CoreEpiphanyReorientFinding>, - checkpoint_present: bool, -) -> EpiphanyCoordinatorStatus { - let (modeling_result_status, modeling_finding) = if let Some(state) = state { - let snapshot = load_core_epiphany_role_result_snapshot( - state, - runtime_store_path, - EpiphanyRoleResultRoleId::Modeling, - EPIPHANY_MODELING_ROLE_BINDING_ID, - ) - .await; - (snapshot.status, snapshot.finding) - } else { - (CoreEpiphanyCoordinatorRoleResultStatus::MissingState, None) - }; - let (research_result_status, research_finding) = if let Some(state) = state { - let snapshot = load_core_epiphany_role_result_snapshot( - state, - runtime_store_path, - EpiphanyRoleResultRoleId::Research, - EPIPHANY_RESEARCH_ROLE_BINDING_ID, - ) - .await; - (snapshot.status, snapshot.finding) - } else { - (CoreEpiphanyCoordinatorRoleResultStatus::MissingState, None) - }; - let (verification_result_status, verification_finding) = if let Some(state) = state { - let snapshot = load_core_epiphany_role_result_snapshot( - state, - runtime_store_path, - EpiphanyRoleResultRoleId::Verification, - EPIPHANY_VERIFICATION_ROLE_BINDING_ID, - ) - .await; - (snapshot.status, snapshot.finding) - } else { - (CoreEpiphanyCoordinatorRoleResultStatus::MissingState, None) - }; - let mut finding_signals = derive_coordinator_finding_signals( - state, - research_finding.as_ref(), - modeling_finding.as_ref(), - verification_finding.as_ref(), - reorient_finding, - ); - if !finding_signals.implementation_evidence_after_verification - && runtime_hands_receipts_after_verification( - state, - runtime_store_path, - verification_finding.as_ref(), - ) - { - finding_signals.implementation_evidence_after_verification = true; - } - let core = derive_coordinator_status(EpiphanyCoordinatorStatusInput { - state_status: map_core_crrc_state_status_from_reorient(state_status), - checkpoint_present, - pressure: pressure.clone(), - recommendation: recommendation.clone(), - roles, - reorient_action: reorient_decision - .map(|decision| decision.action) - .unwrap_or(CoreEpiphanyReorientAction::Resume), - research_result_status, - modeling_result_status, - verification_result_status, - reorient_result_status, - research_result_accepted: finding_signals.research_result_accepted, - research_result_reviewable: finding_signals.research_result_reviewable, - modeling_result_requests_regather: finding_signals.modeling_result_requests_regather, - modeling_result_accepted: finding_signals.modeling_result_accepted, - modeling_result_reviewable: finding_signals.modeling_result_reviewable, - modeling_result_failure_reviewed: finding_signals.modeling_result_failure_reviewed, - modeling_result_accepted_after_verification: finding_signals - .modeling_result_accepted_after_verification, - implementation_evidence_after_verification: finding_signals - .implementation_evidence_after_verification, - verification_result_cites_implementation_evidence: finding_signals - .verification_result_cites_implementation_evidence, - verification_result_covers_current_modeling: finding_signals - .verification_result_covers_current_modeling, - verification_result_accepted: finding_signals.verification_result_accepted, - verification_result_failure_reviewed: finding_signals.verification_result_failure_reviewed, - verification_result_allows_implementation: finding_signals - .verification_result_allows_implementation, - verification_result_needs_evidence: finding_signals.verification_result_needs_evidence, - reorient_finding_accepted: finding_signals.reorient_finding_accepted, - }); - let note = render_epiphany_coordinator_note( - recommendation.action, - pressure.level, - modeling_result_status, - verification_result_status, - core.source_signals.reorient_result_status, - core.decision.action, - ); - - EpiphanyCoordinatorStatus { core, note } -} - -fn runtime_hands_receipts_after_verification( - state: Option<&EpiphanyThreadState>, - runtime_store_path: Option<&Path>, - verification_finding: Option<&epiphany_core::EpiphanyRoleFindingInterpretation>, -) -> bool { - let Some(state) = state else { - return false; - }; - let Some(runtime_store_path) = runtime_store_path else { - return false; - }; - let Some(verification_finding) = verification_finding else { - return false; - }; - let Some(result_id) = verification_finding.runtime_result_id.as_deref() else { - return false; - }; - let Some(accepted_at) = state - .acceptance_receipts - .iter() - .find(|receipt| { - receipt.result_id == result_id - && receipt.role_id == "verification" - && receipt.surface == "roleAccept" - && receipt.status == "accepted" - }) - .map(|receipt| receipt.accepted_at.as_str()) - else { - return false; - }; - runtime_hands_receipt_chain_after(runtime_store_path, accepted_at).unwrap_or(false) -} - -#[derive(Debug, Clone)] -pub struct EpiphanyRoleBoardStatus { - pub roles: Vec, - pub(crate) source_jobs: Vec, -} - -pub fn map_epiphany_roles( - state: Option<&EpiphanyThreadState>, - jobs: &[EpiphanyJobView], - decision: &CoreEpiphanyReorientDecision, - pressure: &epiphany_core::EpiphanyPressure, - recommendation: &CoreEpiphanyCrrcRecommendation, - result_status: CoreEpiphanyCrrcResultStatus, - reorient_job: Option<&EpiphanyJobView>, -) -> EpiphanyRoleBoardStatus { - let planning = state.map(|state| &state.planning); - let checkpoint = state.and_then(|state| state.investigation_checkpoint.as_ref()); - let mut source_jobs = jobs.to_vec(); - if let Some(job) = reorient_job - && !source_jobs - .iter() - .any(|source_job| source_job.id == job.id && source_job.owner_role == job.owner_role) - { - source_jobs.push(job.clone()); - } - let roles = derive_role_board(EpiphanyRoleBoardInput { - state_present: state.is_some(), - planning: EpiphanyRoleBoardPlanningSummary { - capture_count: planning - .map(|planning| planning.captures.len()) - .unwrap_or(0), - backlog_item_count: planning - .map(|planning| planning.backlog_items.len()) - .unwrap_or(0), - roadmap_stream_count: planning - .map(|planning| planning.roadmap_streams.len()) - .unwrap_or(0), - objective_draft_count: planning - .map(|planning| planning.objective_drafts.len()) - .unwrap_or(0), - }, - checkpoint: checkpoint.map(|checkpoint| EpiphanyRoleBoardCheckpointSummary { - disposition: Some(format!("{:?}", checkpoint.disposition)), - next_action: checkpoint.next_action.clone(), - }), - reorient_next_action: decision.next_action.clone(), - jobs: source_jobs.iter().map(map_core_role_board_job).collect(), - crrc_action: recommendation.action, - crrc_recommended_scene_action: recommendation - .recommended_scene_action - .map(epiphany_core::crrc_scene_action_to_coordinator_scene_action), - crrc_reason: recommendation.reason.clone(), - reorient_decision_action: format!("{:?}", decision.action), - pressure_level: format!("{:?}", pressure.level), - reorient_result_status: result_status, - reorient_job: reorient_job.map(map_core_role_board_job), - imagination_binding_id: EPIPHANY_IMAGINATION_ROLE_BINDING_ID.to_string(), - research_binding_id: EPIPHANY_RESEARCH_ROLE_BINDING_ID.to_string(), - modeling_binding_id: EPIPHANY_MODELING_ROLE_BINDING_ID.to_string(), - verification_binding_id: EPIPHANY_VERIFICATION_ROLE_BINDING_ID.to_string(), - reorient_owner_role: EPIPHANY_REORIENT_OWNER_ROLE.to_string(), - imagination_owner_role: EPIPHANY_IMAGINATION_OWNER_ROLE.to_string(), - research_owner_role: epiphany_core::EPIPHANY_RESEARCH_OWNER_ROLE.to_string(), - }); - - EpiphanyRoleBoardStatus { roles, source_jobs } -} - -fn map_core_role_board_job(job: &EpiphanyJobView) -> EpiphanyRoleBoardJob { - EpiphanyRoleBoardJob { - id: job.id.clone(), - owner_role: job.owner_role.clone(), - status: map_core_role_board_job_status(job.status), - progress_note: job.progress_note.clone(), - blocking_reason: job.blocking_reason.clone(), - } -} - -fn map_core_role_board_job_status(status: CoreEpiphanyJobStatus) -> EpiphanyRoleBoardJobStatus { - match status { - CoreEpiphanyJobStatus::Idle => EpiphanyRoleBoardJobStatus::Idle, - CoreEpiphanyJobStatus::Needed => EpiphanyRoleBoardJobStatus::Needed, - CoreEpiphanyJobStatus::Pending => EpiphanyRoleBoardJobStatus::Pending, - CoreEpiphanyJobStatus::Running => EpiphanyRoleBoardJobStatus::Running, - CoreEpiphanyJobStatus::Completed => EpiphanyRoleBoardJobStatus::Completed, - CoreEpiphanyJobStatus::Failed => EpiphanyRoleBoardJobStatus::Failed, - CoreEpiphanyJobStatus::Cancelled => EpiphanyRoleBoardJobStatus::Cancelled, - CoreEpiphanyJobStatus::Blocked => EpiphanyRoleBoardJobStatus::Blocked, - CoreEpiphanyJobStatus::Unavailable => EpiphanyRoleBoardJobStatus::Unavailable, - } -} - -pub fn render_epiphany_roles_note( - roles: &[EpiphanyRoleBoardLane], - state_status: CoreEpiphanyReorientStateStatus, - recommendation: CoreEpiphanyCrrcAction, -) -> String { - render_role_board_note( - roles, - format!("{:?}", state_status).as_str(), - recommendation, - ) -} diff --git a/epiphany-codex-bridge/src/coordinator_protocol.rs b/epiphany-codex-bridge/src/coordinator_protocol.rs deleted file mode 100644 index e0bab7cd..00000000 --- a/epiphany-codex-bridge/src/coordinator_protocol.rs +++ /dev/null @@ -1,312 +0,0 @@ -use codex_app_server_protocol::ThreadEpiphanyCoordinatorAction; -use codex_app_server_protocol::ThreadEpiphanyCoordinatorSignals; -use codex_app_server_protocol::ThreadEpiphanyCrrcAction; -use codex_app_server_protocol::ThreadEpiphanyCrrcRecommendation; -use codex_app_server_protocol::ThreadEpiphanyJob; -use codex_app_server_protocol::ThreadEpiphanyReorientAction; -use codex_app_server_protocol::ThreadEpiphanyRoleId; -use codex_app_server_protocol::ThreadEpiphanyRoleLane; -use codex_app_server_protocol::ThreadEpiphanyRoleStatus; -use codex_app_server_protocol::ThreadEpiphanyRolesSource; -use codex_app_server_protocol::ThreadEpiphanySceneAction; -use codex_app_server_protocol::ThreadEpiphanyViewCoordinator; -use epiphany_core::EpiphanyCoordinatorAction as CoreEpiphanyCoordinatorAction; -use epiphany_core::EpiphanyCoordinatorRoleId as CoreEpiphanyCoordinatorRoleId; -use epiphany_core::EpiphanyCoordinatorRoleStatus as CoreEpiphanyCoordinatorRoleStatus; -use epiphany_core::EpiphanyCoordinatorSceneAction as CoreEpiphanyCoordinatorSceneAction; -use epiphany_core::EpiphanyCoordinatorSourceSignals; -use epiphany_core::EpiphanyCrrcAction as CoreEpiphanyCrrcAction; -use epiphany_core::EpiphanyCrrcRecommendation as CoreEpiphanyCrrcRecommendation; -use epiphany_core::EpiphanyCrrcSceneAction as CoreEpiphanyCrrcSceneAction; -use epiphany_core::EpiphanyJobStatus as CoreEpiphanyJobStatus; -use epiphany_core::EpiphanyJobView; -use epiphany_core::EpiphanyReorientAction as CoreEpiphanyReorientAction; -use epiphany_core::EpiphanyReorientStateStatus as CoreEpiphanyReorientStateStatus; -use epiphany_core::EpiphanyRoleBoardJob; -use epiphany_core::EpiphanyRoleBoardJobStatus; -use epiphany_core::EpiphanyRoleBoardLane; -use epiphany_state_model::EpiphanyJobKind as CoreEpiphanyJobKind; - -use crate::coordinator::EpiphanyCoordinatorStatus; -use crate::coordinator::EpiphanyRoleBoardStatus; -use crate::protocol_edge::protocol_job_from_surface; -use crate::protocol_edge::protocol_pressure_level; -use crate::protocol_edge::protocol_reorient_result_status; -use crate::protocol_edge::protocol_reorient_state_status; -use crate::protocol_edge::protocol_role_result_status; - -fn protocol_coordinator_source_signals( - signals: EpiphanyCoordinatorSourceSignals, -) -> ThreadEpiphanyCoordinatorSignals { - ThreadEpiphanyCoordinatorSignals { - pressure_level: protocol_pressure_level(signals.pressure_level), - should_prepare_compaction: signals.should_prepare_compaction, - reorient_action: protocol_reorient_action(signals.reorient_action), - crrc_action: protocol_crrc_action(signals.crrc_action), - research_result_status: protocol_role_result_status(signals.research_result_status), - modeling_result_status: protocol_role_result_status(signals.modeling_result_status), - verification_result_status: protocol_role_result_status(signals.verification_result_status), - reorient_result_status: protocol_reorient_result_status(signals.reorient_result_status), - } -} - -fn protocol_reorient_action(action: CoreEpiphanyReorientAction) -> ThreadEpiphanyReorientAction { - match action { - CoreEpiphanyReorientAction::Resume => ThreadEpiphanyReorientAction::Resume, - CoreEpiphanyReorientAction::Regather => ThreadEpiphanyReorientAction::Regather, - } -} - -pub fn protocol_crrc_action(action: CoreEpiphanyCrrcAction) -> ThreadEpiphanyCrrcAction { - match action { - CoreEpiphanyCrrcAction::Continue => ThreadEpiphanyCrrcAction::Continue, - CoreEpiphanyCrrcAction::PrepareCheckpoint => ThreadEpiphanyCrrcAction::PrepareCheckpoint, - CoreEpiphanyCrrcAction::LaunchReorientWorker => { - ThreadEpiphanyCrrcAction::LaunchReorientWorker - } - CoreEpiphanyCrrcAction::WaitForReorientWorker => { - ThreadEpiphanyCrrcAction::WaitForReorientWorker - } - CoreEpiphanyCrrcAction::ReviewReorientResult => { - ThreadEpiphanyCrrcAction::ReviewReorientResult - } - CoreEpiphanyCrrcAction::AcceptReorientResult => { - ThreadEpiphanyCrrcAction::AcceptReorientResult - } - CoreEpiphanyCrrcAction::RegatherManually => ThreadEpiphanyCrrcAction::RegatherManually, - } -} - -fn protocol_crrc_scene_action(action: CoreEpiphanyCrrcSceneAction) -> ThreadEpiphanySceneAction { - match action { - CoreEpiphanyCrrcSceneAction::Update => ThreadEpiphanySceneAction::Update, - CoreEpiphanyCrrcSceneAction::Reorient => ThreadEpiphanySceneAction::Reorient, - CoreEpiphanyCrrcSceneAction::ReorientLaunch => ThreadEpiphanySceneAction::ReorientLaunch, - CoreEpiphanyCrrcSceneAction::ReorientResult => ThreadEpiphanySceneAction::ReorientResult, - CoreEpiphanyCrrcSceneAction::ReorientAccept => ThreadEpiphanySceneAction::ReorientAccept, - } -} - -pub fn protocol_crrc_recommendation( - recommendation: CoreEpiphanyCrrcRecommendation, -) -> ThreadEpiphanyCrrcRecommendation { - ThreadEpiphanyCrrcRecommendation { - action: protocol_crrc_action(recommendation.action), - recommended_scene_action: recommendation - .recommended_scene_action - .map(protocol_crrc_scene_action), - reason: recommendation.reason, - } -} - -pub fn protocol_coordinator_view( - thread_id: String, - loaded: bool, - state_status: CoreEpiphanyReorientStateStatus, - state_revision: Option, - status: EpiphanyCoordinatorStatus, - roles: EpiphanyRoleBoardStatus, -) -> ThreadEpiphanyViewCoordinator { - ThreadEpiphanyViewCoordinator { - thread_id, - source: if loaded { - ThreadEpiphanyRolesSource::Live - } else { - ThreadEpiphanyRolesSource::Stored - }, - state_status: protocol_reorient_state_status(state_status), - state_revision, - action: protocol_coordinator_action(status.core.decision.action), - target_role: status - .core - .decision - .target_role - .map(protocol_coordinator_role_id), - recommended_scene_action: status - .core - .decision - .recommended_scene_action - .map(protocol_coordinator_scene_action), - requires_review: status.core.decision.requires_review, - can_auto_run: status.core.decision.can_auto_run, - reason: status.core.decision.reason, - source_signals: protocol_coordinator_source_signals(status.core.source_signals), - roles: protocol_role_board_lanes(&roles), - note: status.note, - } -} - -fn protocol_coordinator_role_id(role_id: CoreEpiphanyCoordinatorRoleId) -> ThreadEpiphanyRoleId { - match role_id { - CoreEpiphanyCoordinatorRoleId::Implementation => ThreadEpiphanyRoleId::Implementation, - CoreEpiphanyCoordinatorRoleId::Imagination => ThreadEpiphanyRoleId::Imagination, - CoreEpiphanyCoordinatorRoleId::Research => ThreadEpiphanyRoleId::Research, - CoreEpiphanyCoordinatorRoleId::Modeling => ThreadEpiphanyRoleId::Modeling, - CoreEpiphanyCoordinatorRoleId::Verification => ThreadEpiphanyRoleId::Verification, - CoreEpiphanyCoordinatorRoleId::Reorientation => ThreadEpiphanyRoleId::Reorientation, - } -} - -fn protocol_coordinator_scene_action( - action: CoreEpiphanyCoordinatorSceneAction, -) -> ThreadEpiphanySceneAction { - match action { - CoreEpiphanyCoordinatorSceneAction::Update => ThreadEpiphanySceneAction::Update, - CoreEpiphanyCoordinatorSceneAction::Reorient => ThreadEpiphanySceneAction::Reorient, - CoreEpiphanyCoordinatorSceneAction::ReorientLaunch => { - ThreadEpiphanySceneAction::ReorientLaunch - } - CoreEpiphanyCoordinatorSceneAction::ReorientResult => { - ThreadEpiphanySceneAction::ReorientResult - } - CoreEpiphanyCoordinatorSceneAction::ReorientAccept => { - ThreadEpiphanySceneAction::ReorientAccept - } - CoreEpiphanyCoordinatorSceneAction::RoleLaunch => ThreadEpiphanySceneAction::RoleLaunch, - CoreEpiphanyCoordinatorSceneAction::RoleResult => ThreadEpiphanySceneAction::RoleResult, - } -} - -fn protocol_coordinator_action( - action: CoreEpiphanyCoordinatorAction, -) -> ThreadEpiphanyCoordinatorAction { - match action { - CoreEpiphanyCoordinatorAction::PrepareCheckpoint => { - ThreadEpiphanyCoordinatorAction::PrepareCheckpoint - } - CoreEpiphanyCoordinatorAction::CompactRehydrateReorient => { - ThreadEpiphanyCoordinatorAction::CompactRehydrateReorient - } - CoreEpiphanyCoordinatorAction::LaunchReorientWorker => { - ThreadEpiphanyCoordinatorAction::LaunchReorientWorker - } - CoreEpiphanyCoordinatorAction::WaitForReorientWorker => { - ThreadEpiphanyCoordinatorAction::WaitForReorientWorker - } - CoreEpiphanyCoordinatorAction::ReviewReorientResult => { - ThreadEpiphanyCoordinatorAction::ReviewReorientResult - } - CoreEpiphanyCoordinatorAction::RegatherManually => { - ThreadEpiphanyCoordinatorAction::RegatherManually - } - CoreEpiphanyCoordinatorAction::LaunchResearch => { - ThreadEpiphanyCoordinatorAction::LaunchResearch - } - CoreEpiphanyCoordinatorAction::ReviewResearchResult => { - ThreadEpiphanyCoordinatorAction::ReviewResearchResult - } - CoreEpiphanyCoordinatorAction::LaunchModeling => { - ThreadEpiphanyCoordinatorAction::LaunchModeling - } - CoreEpiphanyCoordinatorAction::ReviewModelingResult => { - ThreadEpiphanyCoordinatorAction::ReviewModelingResult - } - CoreEpiphanyCoordinatorAction::LaunchVerification => { - ThreadEpiphanyCoordinatorAction::LaunchVerification - } - CoreEpiphanyCoordinatorAction::ReviewVerificationResult => { - ThreadEpiphanyCoordinatorAction::ReviewVerificationResult - } - CoreEpiphanyCoordinatorAction::ContinueImplementation => { - ThreadEpiphanyCoordinatorAction::ContinueImplementation - } - } -} - -pub fn protocol_role_board_lanes( - role_board: &EpiphanyRoleBoardStatus, -) -> Vec { - role_board - .roles - .iter() - .cloned() - .map(|lane| protocol_role_board_lane(lane, &role_board.source_jobs)) - .collect() -} - -fn protocol_role_board_lane( - lane: EpiphanyRoleBoardLane, - source_jobs: &[EpiphanyJobView], -) -> ThreadEpiphanyRoleLane { - ThreadEpiphanyRoleLane { - id: protocol_coordinator_role_id(lane.id), - title: lane.title, - owner_role: lane.owner_role, - status: protocol_coordinator_role_status(lane.status), - note: lane.note, - jobs: lane - .jobs - .iter() - .map(|job| protocol_role_board_job(job, source_jobs)) - .collect(), - authority_scopes: lane.authority_scopes, - recommended_action: lane - .recommended_action - .map(protocol_coordinator_scene_action), - } -} - -fn protocol_role_board_job( - job: &EpiphanyRoleBoardJob, - source_jobs: &[EpiphanyJobView], -) -> ThreadEpiphanyJob { - source_jobs - .iter() - .find(|source_job| source_job.id == job.id && source_job.owner_role == job.owner_role) - .cloned() - .map(|job| protocol_job_from_surface(job, None, None)) - .unwrap_or_else(|| { - protocol_job_from_surface( - EpiphanyJobView { - id: job.id.clone(), - kind: CoreEpiphanyJobKind::Specialist, - scope: job.id.clone(), - owner_role: job.owner_role.clone(), - authority_scope: None, - runtime_job_id: None, - status: core_epiphany_job_status_from_role_board(job.status), - items_processed: None, - items_total: None, - progress_note: job.progress_note.clone(), - last_checkpoint_at_unix_seconds: None, - blocking_reason: job.blocking_reason.clone(), - active_thread_ids: Vec::new(), - linked_subgoal_ids: Vec::new(), - linked_graph_node_ids: Vec::new(), - }, - None, - None, - ) - }) -} - -fn core_epiphany_job_status_from_role_board( - status: EpiphanyRoleBoardJobStatus, -) -> CoreEpiphanyJobStatus { - match status { - EpiphanyRoleBoardJobStatus::Idle => CoreEpiphanyJobStatus::Idle, - EpiphanyRoleBoardJobStatus::Needed => CoreEpiphanyJobStatus::Needed, - EpiphanyRoleBoardJobStatus::Pending => CoreEpiphanyJobStatus::Pending, - EpiphanyRoleBoardJobStatus::Running => CoreEpiphanyJobStatus::Running, - EpiphanyRoleBoardJobStatus::Completed => CoreEpiphanyJobStatus::Completed, - EpiphanyRoleBoardJobStatus::Failed => CoreEpiphanyJobStatus::Failed, - EpiphanyRoleBoardJobStatus::Cancelled => CoreEpiphanyJobStatus::Cancelled, - EpiphanyRoleBoardJobStatus::Blocked => CoreEpiphanyJobStatus::Blocked, - EpiphanyRoleBoardJobStatus::Unavailable => CoreEpiphanyJobStatus::Unavailable, - } -} - -fn protocol_coordinator_role_status( - status: CoreEpiphanyCoordinatorRoleStatus, -) -> ThreadEpiphanyRoleStatus { - match status { - CoreEpiphanyCoordinatorRoleStatus::Ready => ThreadEpiphanyRoleStatus::Ready, - CoreEpiphanyCoordinatorRoleStatus::Needed => ThreadEpiphanyRoleStatus::Needed, - CoreEpiphanyCoordinatorRoleStatus::Running => ThreadEpiphanyRoleStatus::Running, - CoreEpiphanyCoordinatorRoleStatus::Waiting => ThreadEpiphanyRoleStatus::Waiting, - CoreEpiphanyCoordinatorRoleStatus::Review => ThreadEpiphanyRoleStatus::Review, - CoreEpiphanyCoordinatorRoleStatus::Blocked => ThreadEpiphanyRoleStatus::Blocked, - CoreEpiphanyCoordinatorRoleStatus::Unavailable => ThreadEpiphanyRoleStatus::Unavailable, - CoreEpiphanyCoordinatorRoleStatus::Completed => ThreadEpiphanyRoleStatus::Completed, - } -} diff --git a/epiphany-codex-bridge/src/cultnet.rs b/epiphany-codex-bridge/src/cultnet.rs deleted file mode 100644 index 3c9f6920..00000000 --- a/epiphany-codex-bridge/src/cultnet.rs +++ /dev/null @@ -1,42 +0,0 @@ -use epiphany_core::EpiphanyGraphFreshness; -pub use epiphany_core::EpiphanyGraphFreshnessStatus; -use epiphany_core::EpiphanyInvalidationInput; -pub use epiphany_core::EpiphanyInvalidationStatus; -pub use epiphany_core::EpiphanyJobStatus; -pub use epiphany_core::EpiphanyJobView; -pub use epiphany_core::EpiphanyPressure; -pub use epiphany_core::EpiphanyPressureBasis; -pub use epiphany_core::EpiphanyPressureLevel; -pub use epiphany_core::EpiphanyPressureStatus; -pub use epiphany_core::EpiphanyReorientAction; -pub use epiphany_core::EpiphanyReorientCheckpointStatus; -pub use epiphany_core::EpiphanyReorientDecision; -pub use epiphany_core::EpiphanyReorientFreshnessStatus; -pub use epiphany_core::EpiphanyReorientPressureLevel; -pub use epiphany_core::EpiphanyReorientReason; -pub use epiphany_core::EpiphanyReorientStateStatus; -use epiphany_core::EpiphanyRetrievalFreshness; -pub use epiphany_core::EpiphanyRetrievalFreshnessStatus; -pub use epiphany_core::EpiphanyStateUpdatedField; -pub use epiphany_state_model::EpiphanyJobKind; -use serde::Deserialize; -use serde::Serialize; - -#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub enum EpiphanySurfaceSource { - Stored, - Live, -} - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct EpiphanyFreshnessSurface { - pub thread_id: String, - pub source: EpiphanySurfaceSource, - #[serde(default, skip_serializing_if = "Option::is_none")] - pub state_revision: Option, - pub retrieval: EpiphanyRetrievalFreshness, - pub graph: EpiphanyGraphFreshness, - pub watcher: EpiphanyInvalidationInput, -} diff --git a/epiphany-codex-bridge/src/error.rs b/epiphany-codex-bridge/src/error.rs deleted file mode 100644 index 777cb03e..00000000 --- a/epiphany-codex-bridge/src/error.rs +++ /dev/null @@ -1,20 +0,0 @@ -use std::error::Error; -use std::fmt; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub enum EpiphanyBridgeError { - InvalidRequest(String), - Fatal(String), -} - -pub type Result = std::result::Result; - -impl fmt::Display for EpiphanyBridgeError { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - Self::InvalidRequest(message) | Self::Fatal(message) => f.write_str(message), - } - } -} - -impl Error for EpiphanyBridgeError {} diff --git a/epiphany-codex-bridge/src/invalidation.rs b/epiphany-codex-bridge/src/invalidation.rs index 79f16459..1e70c9fb 100644 --- a/epiphany-codex-bridge/src/invalidation.rs +++ b/epiphany-codex-bridge/src/invalidation.rs @@ -11,8 +11,6 @@ use tokio::sync::mpsc; use tokio::sync::oneshot; use tracing::warn; -use crate::reorient::EpiphanyFreshnessWatcherSnapshot; - #[derive(Clone, Debug, PartialEq, Eq)] pub struct EpiphanyInvalidationSnapshot { pub available: bool, @@ -21,17 +19,6 @@ pub struct EpiphanyInvalidationSnapshot { pub changed_paths: Vec, } -pub fn epiphany_freshness_watcher_snapshot( - snapshot: &EpiphanyInvalidationSnapshot, -) -> EpiphanyFreshnessWatcherSnapshot<'_> { - EpiphanyFreshnessWatcherSnapshot { - available: snapshot.available, - workspace_root: snapshot.workspace_root.as_ref().map(|path| path.as_path()), - observed_at_unix_seconds: snapshot.observed_at_unix_seconds, - changed_paths: snapshot.changed_paths.as_slice(), - } -} - #[derive(Clone)] pub struct EpiphanyInvalidationManager { state: Arc>>, diff --git a/epiphany-codex-bridge/src/jobs.rs b/epiphany-codex-bridge/src/jobs.rs deleted file mode 100644 index 666b0443..00000000 --- a/epiphany-codex-bridge/src/jobs.rs +++ /dev/null @@ -1,95 +0,0 @@ -use epiphany_core::EpiphanyJobStatus as CoreEpiphanyJobStatus; -use epiphany_core::EpiphanyJobView; -use epiphany_core::EpiphanyJobsInput; -use epiphany_core::derive_jobs; -use epiphany_state_model::EpiphanyJobKind as CoreEpiphanyJobKind; -use epiphany_state_model::EpiphanyRetrievalState; -use epiphany_state_model::EpiphanyThreadState; - -pub fn derive_epiphany_jobs( - state: Option<&EpiphanyThreadState>, - retrieval_override: Option<&EpiphanyRetrievalState>, -) -> Vec { - derive_jobs(EpiphanyJobsInput { - state, - retrieval_override, - }) -} - -pub fn map_epiphany_jobs( - state: Option<&EpiphanyThreadState>, - retrieval_override: Option<&EpiphanyRetrievalState>, -) -> Vec { - derive_epiphany_jobs(state, retrieval_override) -} - -pub fn map_launched_epiphany_job( - state: &EpiphanyThreadState, - binding_id: &str, - backend_job_id: &str, - fallback_kind: CoreEpiphanyJobKind, - fallback_scope: &str, -) -> EpiphanyJobView { - derive_epiphany_jobs(Some(state), None) - .into_iter() - .find(|job| job.id == binding_id) - .unwrap_or_else(|| EpiphanyJobView { - id: binding_id.to_string(), - kind: fallback_kind, - scope: fallback_scope.to_string(), - owner_role: "epiphany-harness".to_string(), - authority_scope: None, - runtime_job_id: Some(backend_job_id.to_string()), - status: CoreEpiphanyJobStatus::Pending, - items_processed: None, - items_total: None, - progress_note: None, - last_checkpoint_at_unix_seconds: None, - blocking_reason: None, - active_thread_ids: Vec::new(), - linked_subgoal_ids: Vec::new(), - linked_graph_node_ids: Vec::new(), - }) -} - -pub fn map_interrupted_epiphany_job( - state: &EpiphanyThreadState, - binding_id: &str, -) -> EpiphanyJobView { - derive_epiphany_jobs(Some(state), None) - .into_iter() - .find(|job| job.id == binding_id) - .unwrap_or_else(|| { - epiphany_blocked_state_job( - binding_id, - CoreEpiphanyJobKind::Specialist, - "role-scoped specialist work", - "Interrupted job binding was not reflected in Epiphany state.", - ) - }) -} - -pub fn epiphany_blocked_state_job( - id: &str, - kind: CoreEpiphanyJobKind, - scope: &str, - blocking_reason: &str, -) -> EpiphanyJobView { - EpiphanyJobView { - id: id.to_string(), - kind, - scope: scope.to_string(), - owner_role: "epiphany-harness".to_string(), - authority_scope: None, - runtime_job_id: None, - status: CoreEpiphanyJobStatus::Blocked, - items_processed: None, - items_total: None, - progress_note: None, - last_checkpoint_at_unix_seconds: None, - blocking_reason: Some(blocking_reason.to_string()), - active_thread_ids: Vec::new(), - linked_subgoal_ids: Vec::new(), - linked_graph_node_ids: Vec::new(), - } -} diff --git a/epiphany-codex-bridge/src/launch.rs b/epiphany-codex-bridge/src/launch.rs deleted file mode 100644 index 5e21115a..00000000 --- a/epiphany-codex-bridge/src/launch.rs +++ /dev/null @@ -1,37 +0,0 @@ -//! Compatibility facade for older bridge callers. -//! -//! Epiphany prompt doctrine, worker launch policy, role binding ids, and output -//! schemas live in `epiphany-core`. The bridge may translate those typed launch -//! requests to Codex JSON-RPC, but it does not own the agent instructions. - -pub use epiphany_core::EPIPHANY_IMAGINATION_OWNER_ROLE; -pub use epiphany_core::EPIPHANY_IMAGINATION_ROLE_BINDING_ID; -pub use epiphany_core::EPIPHANY_MODELING_OWNER_ROLE; -pub use epiphany_core::EPIPHANY_MODELING_ROLE_BINDING_ID; -pub use epiphany_core::EPIPHANY_REORIENT_LAUNCH_BINDING_ID; -pub use epiphany_core::EPIPHANY_REORIENT_OWNER_ROLE; -pub use epiphany_core::EPIPHANY_RESEARCH_OWNER_ROLE; -pub use epiphany_core::EPIPHANY_RESEARCH_ROLE_BINDING_ID; -pub use epiphany_core::EPIPHANY_VERIFICATION_OWNER_ROLE; -pub use epiphany_core::EPIPHANY_VERIFICATION_ROLE_BINDING_ID; -pub use epiphany_core::EpiphanyCoordinatorPromptConfig; -pub use epiphany_core::EpiphanyCrrcPromptConfig; -pub use epiphany_core::EpiphanyImplementationPromptConfig; -pub use epiphany_core::EpiphanyReorientationPromptConfig; -pub use epiphany_core::EpiphanyRolePromptConfig; -pub use epiphany_core::EpiphanySharedPromptConfig; -pub use epiphany_core::EpiphanySpecialistPromptConfig; -pub use epiphany_core::build_epiphany_job_launch_request; -pub use epiphany_core::build_epiphany_reorient_launch_instruction; -pub use epiphany_core::build_epiphany_reorient_launch_request; -pub use epiphany_core::build_epiphany_role_launch_request; -pub use epiphany_core::epiphany_agent_prompt_with_memory; -pub use epiphany_core::epiphany_reorient_launch_output_schema; -pub use epiphany_core::epiphany_role_binding_id; -pub use epiphany_core::epiphany_role_label; -pub use epiphany_core::epiphany_role_launch_output_schema; -pub use epiphany_core::epiphany_role_owner; -pub use epiphany_core::epiphany_specialist_prompt_config; -pub use epiphany_core::epiphany_worker_prompt; -pub use epiphany_core::render_epiphany_coordinator_note; -pub use epiphany_core::unique_strings; diff --git a/epiphany-codex-bridge/src/launch_context.rs b/epiphany-codex-bridge/src/launch_context.rs deleted file mode 100644 index 2b6933f4..00000000 --- a/epiphany-codex-bridge/src/launch_context.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub use epiphany_core::append_modeling_work_loop_telemetry_context; -pub use epiphany_core::append_verification_hands_receipt_context; -pub use epiphany_core::render_launch_dynamic_prompt_context; -pub use epiphany_core::reorient_launch_context_focus; -pub use epiphany_core::role_launch_context_focus; diff --git a/epiphany-codex-bridge/src/lib.rs b/epiphany-codex-bridge/src/lib.rs index ca1057a5..06770cdc 100644 --- a/epiphany-codex-bridge/src/lib.rs +++ b/epiphany-codex-bridge/src/lib.rs @@ -1,40 +1,7 @@ -//! Compatibility bridge between Epiphany's typed CultNet/CultCache-shaped -//! contracts and the vendored Codex JSON-RPC/app-server shell. +//! Codex-host watcher invalidation compatibility. //! -//! This crate is a bridge, not an authority organ. Its job is to translate -//! Codex `ThreadEpiphany*` DTOs into Epiphany core documents, project typed -//! Epiphany surfaces back into legacy Codex responses, and call the narrow -//! host trait needed while Codex still owns thread persistence. Verdicts, -//! launch policy, reorientation policy, acceptance rules, runtime-spine -//! lifecycle semantics, and durable state invariants belong in `epiphany-core` -//! or `epiphany-state-model`. -//! -//! Host facts and side effects that still pass through this crate are -//! quarantine scaffolding for the current Codex shell. Do not let them become -//! a second policy throne. The long cut is to replace these adapters with -//! native CultNet intents and receipts, leaving Codex only as the OpenAI -//! subscription auth/model transport reliquary. +//! Epiphany state, process, and interface authority is native. This crate may +//! adapt file-watcher facts while the OpenAI/Codex transport reliquary remains, +//! but it does not publish an Epiphany protocol or own durable state. -pub mod checkpoint; -pub mod context; -pub mod context_protocol; -pub mod coordinator; -pub mod coordinator_protocol; -pub mod cultnet; -pub mod error; pub mod invalidation; -pub mod jobs; -pub mod launch; -pub mod launch_context; -pub mod mutation; -pub mod mutation_service; -pub mod pressure; -pub mod protocol_edge; -pub mod reorient; -pub mod results; -pub mod retrieve; -pub mod runtime_results; -pub mod scene; -pub mod scene_protocol; -pub mod state; -pub mod view_protocol; diff --git a/epiphany-codex-bridge/src/mutation.rs b/epiphany-codex-bridge/src/mutation.rs deleted file mode 100644 index 962b7ae1..00000000 --- a/epiphany-codex-bridge/src/mutation.rs +++ /dev/null @@ -1,176 +0,0 @@ -use epiphany_core::EpiphanyReorientFindingInterpretation as CoreEpiphanyReorientFinding; -use epiphany_core::EpiphanyRoleFindingInterpretation as CoreEpiphanyRoleFinding; -use epiphany_core::EpiphanyRoleResultRoleId; -use epiphany_core::EpiphanyRoleStatePatchDocument; -use epiphany_core::EpiphanyStateUpdate; -use epiphany_core::EpiphanyStateUpdatedField; -use epiphany_state_model::EpiphanyInvestigationCheckpoint; - -pub type RoleAcceptanceUpdate = epiphany_core::EpiphanyRoleAcceptanceUpdate; -pub type ReorientAcceptanceUpdate = epiphany_core::EpiphanyReorientAcceptanceUpdate; - -pub fn build_role_acceptance_update( - expected_revision: Option, - role_id: EpiphanyRoleResultRoleId, - binding_id: &str, - finding: &CoreEpiphanyRoleFinding, - accepted_evidence_id: String, - accepted_observation_id: String, - accepted_at: String, -) -> Result { - epiphany_core::build_native_role_acceptance_update( - expected_revision, - role_id, - binding_id, - finding, - accepted_evidence_id, - accepted_observation_id, - accepted_at, - ) -} - -pub fn build_reorient_acceptance_update( - expected_revision: Option, - binding_id: &str, - finding: &CoreEpiphanyReorientFinding, - accepted_evidence_id: String, - accepted_observation_id: String, - accepted_at: String, - update_scratch: bool, - update_investigation_checkpoint: bool, - checkpoint: Option, -) -> Result { - epiphany_core::build_native_reorient_acceptance_update( - expected_revision, - binding_id, - finding, - accepted_evidence_id, - accepted_observation_id, - accepted_at, - update_scratch, - update_investigation_checkpoint, - checkpoint, - ) -} - -pub fn state_update_from_core_patch( - expected_revision: Option, - patch: EpiphanyRoleStatePatchDocument, -) -> EpiphanyStateUpdate { - EpiphanyStateUpdate { - expected_revision, - objective: patch.objective, - active_subgoal_id: patch.active_subgoal_id, - subgoals: patch.subgoals, - invariants: patch.invariants, - graphs: patch.graphs, - graph_frontier: patch.graph_frontier, - graph_checkpoint: patch.graph_checkpoint, - scratch: patch.scratch, - investigation_checkpoint: patch.investigation_checkpoint, - job_bindings: patch.job_bindings, - acceptance_receipts: patch.acceptance_receipts, - runtime_links: patch.runtime_links, - observations: patch.observations, - evidence: patch.evidence, - churn: patch.churn, - mode: patch.mode, - planning: patch.planning, - } -} - -pub fn epiphany_job_launch_changed_fields() -> Vec { - vec![ - EpiphanyStateUpdatedField::JobBindings, - EpiphanyStateUpdatedField::RuntimeLinks, - ] -} - -pub fn thread_epiphany_patch_has_state_replacements( - patch: &EpiphanyRoleStatePatchDocument, -) -> bool { - patch.objective.is_some() - || patch.active_subgoal_id.is_some() - || patch.subgoals.is_some() - || patch.invariants.is_some() - || patch.graphs.is_some() - || patch.graph_frontier.is_some() - || patch.graph_checkpoint.is_some() - || patch.scratch.is_some() - || patch.investigation_checkpoint.is_some() - || patch.job_bindings.is_some() - || !patch.acceptance_receipts.is_empty() - || !patch.runtime_links.is_empty() - || patch.churn.is_some() - || patch.mode.is_some() - || patch.planning.is_some() -} - -pub fn epiphany_update_patch_changed_fields( - patch: &EpiphanyRoleStatePatchDocument, -) -> Vec { - let update = state_update_from_core_patch(None, patch.clone()); - let mut fields = Vec::new(); - if update.objective.is_some() { - fields.push(EpiphanyStateUpdatedField::Objective); - } - if update.active_subgoal_id.is_some() { - fields.push(EpiphanyStateUpdatedField::ActiveSubgoalId); - } - if update.subgoals.is_some() { - fields.push(EpiphanyStateUpdatedField::Subgoals); - } - if update.invariants.is_some() { - fields.push(EpiphanyStateUpdatedField::Invariants); - } - if update.graphs.is_some() { - fields.push(EpiphanyStateUpdatedField::Graphs); - } - if update.graph_frontier.is_some() { - fields.push(EpiphanyStateUpdatedField::GraphFrontier); - } - if update.graph_checkpoint.is_some() { - fields.push(EpiphanyStateUpdatedField::GraphCheckpoint); - } - if update.scratch.is_some() { - fields.push(EpiphanyStateUpdatedField::Scratch); - } - if update.investigation_checkpoint.is_some() { - fields.push(EpiphanyStateUpdatedField::InvestigationCheckpoint); - } - if update.job_bindings.is_some() { - fields.push(EpiphanyStateUpdatedField::JobBindings); - } - if !update.acceptance_receipts.is_empty() { - fields.push(EpiphanyStateUpdatedField::AcceptanceReceipts); - } - if !update.runtime_links.is_empty() { - fields.push(EpiphanyStateUpdatedField::RuntimeLinks); - } - if !update.observations.is_empty() { - fields.push(EpiphanyStateUpdatedField::Observations); - } - if !update.evidence.is_empty() { - fields.push(EpiphanyStateUpdatedField::Evidence); - } - if update.churn.is_some() { - fields.push(EpiphanyStateUpdatedField::Churn); - } - if update.mode.is_some() { - fields.push(EpiphanyStateUpdatedField::Mode); - } - if update.planning.is_some() { - fields.push(EpiphanyStateUpdatedField::Planning); - } - fields -} - -pub fn epiphany_promote_changed_fields( - patch: &EpiphanyRoleStatePatchDocument, -) -> Vec { - let mut fields = epiphany_update_patch_changed_fields(patch); - if !fields.contains(&EpiphanyStateUpdatedField::Evidence) { - fields.push(EpiphanyStateUpdatedField::Evidence); - } - fields -} diff --git a/epiphany-codex-bridge/src/mutation_service.rs b/epiphany-codex-bridge/src/mutation_service.rs deleted file mode 100644 index 7fa35210..00000000 --- a/epiphany-codex-bridge/src/mutation_service.rs +++ /dev/null @@ -1,664 +0,0 @@ -use chrono::SecondsFormat; -use chrono::Utc; -use std::path::Path; -use std::path::PathBuf; - -use epiphany_core::EPIPHANY_REORIENT_LAUNCH_BINDING_ID; -use epiphany_core::EpiphanyJobInterruptRequest; -use epiphany_core::EpiphanyJobInterruptResult; -use epiphany_core::EpiphanyJobLaunchRequest; -use epiphany_core::EpiphanyJobLaunchResult; -use epiphany_core::EpiphanyJobView; -use epiphany_core::EpiphanyPromotionInput; -use epiphany_core::EpiphanyReorientDecision; -use epiphany_core::EpiphanyReorientFindingInterpretation; -use epiphany_core::EpiphanyReorientStateStatus; -use epiphany_core::EpiphanyRoleFindingInterpretation; -use epiphany_core::EpiphanyRoleResultRoleId; -use epiphany_core::EpiphanyRoleStatePatchDocument; -use epiphany_core::EpiphanyStateUpdate; -use epiphany_core::EpiphanyStateUpdatedField; -use epiphany_core::EpiphanyTokenUsageSnapshot; -use epiphany_core::apply_coordinator_state_update_to_state; -use epiphany_core::build_epiphany_reorient_launch_request_with_dynamic_context; -use epiphany_core::build_epiphany_role_launch_request_with_dynamic_context; -use epiphany_core::epiphany_role_label; -use epiphany_core::evaluate_promotion; -use epiphany_state_model::EpiphanyEvidenceRecord; -use epiphany_state_model::EpiphanyJobKind as CoreEpiphanyJobKind; -use epiphany_state_model::EpiphanyRetrievalState; -use epiphany_state_model::EpiphanyThreadState; - -use crate::cultnet::EpiphanySurfaceSource; -use crate::error::EpiphanyBridgeError; -use crate::error::Result as BridgeResult; -use crate::jobs::derive_epiphany_jobs; -use crate::jobs::epiphany_blocked_state_job; -use crate::jobs::map_interrupted_epiphany_job; -use crate::jobs::map_launched_epiphany_job; -use crate::launch_context::append_modeling_work_loop_telemetry_context; -use crate::launch_context::append_verification_hands_receipt_context; -use crate::launch_context::render_launch_dynamic_prompt_context; -use crate::launch_context::reorient_launch_context_focus; -use crate::launch_context::role_launch_context_focus; -use crate::mutation::epiphany_job_launch_changed_fields; -use crate::mutation::epiphany_promote_changed_fields; -use crate::mutation::epiphany_update_patch_changed_fields; -use crate::mutation::thread_epiphany_patch_has_state_replacements; -use crate::pressure::derive_epiphany_pressure; -use crate::reorient::EpiphanyFreshnessWatcherSnapshot; -use crate::reorient::derive_epiphany_freshness_view; -use crate::reorient::derive_epiphany_reorient; -use uuid::Uuid; - -#[allow(async_fn_in_trait)] -pub trait EpiphanyMutationHost { - async fn epiphany_thread_id(&self) -> String; - /// Read the Codex-hosted compatibility snapshot. - /// - /// The bridge may request host state so core can evaluate typed policy. The - /// host snapshot is an input fact, not a bridge-owned source of truth. - async fn epiphany_state(&self) -> Option; - async fn epiphany_reference_turn_id(&self) -> Option; - /// Locate the native runtime-spine store while Codex still hosts the turn. - async fn epiphany_runtime_spine_store_path(&self) -> PathBuf; - /// Project the already-typed state into Codex's current client-visible view. - async fn client_visible_epiphany_state( - &self, - fallback: EpiphanyThreadState, - ) -> EpiphanyThreadState; -} - -pub fn load_authoritative_accepted_state( - store_path: &Path, -) -> BridgeResult> { - epiphany_core::read_accepted_coordinator_state(store_path) - .map_err(|error| EpiphanyBridgeError::Fatal(error.to_string())) -} - -#[derive(Debug, Clone)] -pub struct EpiphanyThreadUpdateApplied { - pub revision: u64, - pub changed_fields: Vec, - pub epiphany_state: EpiphanyThreadState, -} - -#[derive(Debug, Clone)] -pub enum EpiphanyThreadPromoteApplied { - Rejected { reasons: Vec }, - Accepted(EpiphanyThreadUpdateApplied), -} - -#[derive(Debug, Clone)] -pub struct EpiphanyRoleAcceptApplied { - pub revision: u64, - pub changed_fields: Vec, - pub epiphany_state: EpiphanyThreadState, - pub accepted_receipt_id: String, - pub accepted_observation_id: String, - pub accepted_evidence_id: String, - pub applied_patch: EpiphanyRoleStatePatchDocument, - pub finding: EpiphanyRoleFindingInterpretation, -} - -#[derive(Debug, Clone)] -pub struct EpiphanyReorientAcceptApplied { - pub revision: u64, - pub changed_fields: Vec, - pub epiphany_state: EpiphanyThreadState, - pub accepted_receipt_id: String, - pub accepted_observation_id: String, - pub accepted_evidence_id: String, - pub finding: EpiphanyReorientFindingInterpretation, -} - -#[derive(Debug, Clone)] -pub struct EpiphanyJobLaunchApplied { - pub launcher_job_id: String, - pub backend_job_id: String, - pub revision: u64, - pub changed_fields: Vec, - pub epiphany_state: EpiphanyThreadState, - pub job: EpiphanyJobView, -} - -#[derive(Debug, Clone)] -pub struct EpiphanyJobInterruptApplied { - pub cancel_requested: bool, - pub interrupted_thread_ids: Vec, - pub revision: u64, - pub changed_fields: Vec, - pub epiphany_state: EpiphanyThreadState, - pub job: EpiphanyJobView, -} - -#[derive(Debug, Clone)] -pub struct EpiphanyReorientLaunchApplied { - pub launcher_job_id: String, - pub backend_job_id: String, - pub source: EpiphanySurfaceSource, - pub state_status: EpiphanyReorientStateStatus, - pub state_revision: Option, - pub decision: EpiphanyReorientDecision, - pub revision: u64, - pub changed_fields: Vec, - pub epiphany_state: EpiphanyThreadState, - pub job: EpiphanyJobView, -} - -pub async fn apply_epiphany_state_update_to_thread( - thread: &impl EpiphanyMutationHost, - update: EpiphanyStateUpdate, -) -> BridgeResult { - let current_state = thread.epiphany_state().await.unwrap_or_default(); - let reference_turn_id = thread.epiphany_reference_turn_id().await; - let store = thread.epiphany_runtime_spine_store_path().await; - let thread_id = thread.epiphany_thread_id().await; - let applied = epiphany_core::EpiphanyCoordinatorService::new(&store, &store) - .apply_state_update_from(&thread_id, ¤t_state, update, reference_turn_id) - .map_err(|error| EpiphanyBridgeError::InvalidRequest(error.to_string()))?; - Ok(applied.state) -} - -pub fn apply_epiphany_state_update_to_state( - current_state: &EpiphanyThreadState, - update: EpiphanyStateUpdate, - reference_turn_id: Option, -) -> BridgeResult { - apply_coordinator_state_update_to_state(current_state, update, reference_turn_id) - .map_err(|error| EpiphanyBridgeError::InvalidRequest(error.to_string())) -} - -pub async fn launch_epiphany_job_on_thread( - thread: &impl EpiphanyMutationHost, - request: EpiphanyJobLaunchRequest, -) -> BridgeResult { - // Compatibility choreography only: core validates the launch plan and - // runtime-spine opens the typed job. The bridge stitches those typed - // documents into Codex's JSON-RPC thread shell until CultNet owns the route. - let current_state = thread.epiphany_state().await.unwrap_or_default(); - let runtime_store = thread.epiphany_runtime_spine_store_path().await; - let launch_plan = epiphany_core::plan_coordinator_job_launch( - ¤t_state, - &request, - runtime_store.as_path(), - format!("epiphany-heartbeat-launch-{}", Uuid::new_v4()), - Uuid::new_v4().to_string(), - ) - .map_err(|err| EpiphanyBridgeError::InvalidRequest(err.to_string()))?; - let thread_id = thread.epiphany_thread_id().await; - epiphany_core::commit_coordinator_job_launch( - runtime_store.as_path(), - &thread_id, - ¤t_state, - &request, - &launch_plan, - Utc::now().to_rfc3339_opts(SecondsFormat::Secs, true), - ) - .map_err(|error| EpiphanyBridgeError::Fatal(error.to_string())) -} - -pub async fn interrupt_epiphany_job_on_thread( - thread: &impl EpiphanyMutationHost, - request: EpiphanyJobInterruptRequest, -) -> BridgeResult { - let current_state = thread.epiphany_state().await.unwrap_or_default(); - let store = thread.epiphany_runtime_spine_store_path().await; - let thread_id = thread.epiphany_thread_id().await; - epiphany_core::EpiphanyCoordinatorService::new(&store, &store) - .interrupt_job(&thread_id, ¤t_state, request) - .map_err(|error| EpiphanyBridgeError::InvalidRequest(error.to_string())) -} - -pub async fn apply_thread_epiphany_update( - thread: &impl EpiphanyMutationHost, - expected_revision: Option, - patch: EpiphanyRoleStatePatchDocument, -) -> BridgeResult { - let changed_fields = epiphany_update_patch_changed_fields(&patch); - let update = crate::mutation::state_update_from_core_patch(expected_revision, patch); - let epiphany_state = apply_epiphany_state_update_to_thread(thread, update).await?; - let epiphany_state = thread.client_visible_epiphany_state(epiphany_state).await; - Ok(EpiphanyThreadUpdateApplied { - revision: epiphany_state.revision, - changed_fields, - epiphany_state, - }) -} - -pub async fn apply_thread_epiphany_promote( - thread: &impl EpiphanyMutationHost, - expected_revision: Option, - patch: EpiphanyRoleStatePatchDocument, - verifier_evidence: EpiphanyEvidenceRecord, -) -> BridgeResult { - let decision = evaluate_promotion(EpiphanyPromotionInput { - has_state_replacements: thread_epiphany_patch_has_state_replacements(&patch), - active_subgoal_id: patch.active_subgoal_id.clone(), - subgoals: patch.subgoals.clone(), - invariants: patch.invariants.clone(), - graphs: patch.graphs.clone(), - graph_frontier: patch.graph_frontier.clone(), - graph_checkpoint: patch.graph_checkpoint.clone(), - investigation_checkpoint: patch.investigation_checkpoint.clone(), - churn: patch.churn.clone(), - observations: patch.observations.clone(), - evidence: patch.evidence.clone(), - verifier_evidence: verifier_evidence.clone(), - }); - if !decision.accepted { - return Ok(EpiphanyThreadPromoteApplied::Rejected { - reasons: decision.reasons, - }); - } - - let changed_fields = epiphany_promote_changed_fields(&patch); - let mut patch = patch; - patch.evidence.push(verifier_evidence); - let update = crate::mutation::state_update_from_core_patch(expected_revision, patch); - let epiphany_state = apply_epiphany_state_update_to_thread(thread, update).await?; - let epiphany_state = thread.client_visible_epiphany_state(epiphany_state).await; - Ok(EpiphanyThreadPromoteApplied::Accepted( - EpiphanyThreadUpdateApplied { - revision: epiphany_state.revision, - changed_fields, - epiphany_state, - }, - )) -} - -pub async fn apply_thread_epiphany_role_accept( - thread: &impl EpiphanyMutationHost, - role_id: EpiphanyRoleResultRoleId, - expected_revision: Option, - binding_id: &str, -) -> BridgeResult { - let state = thread.epiphany_state().await.ok_or_else(|| { - EpiphanyBridgeError::InvalidRequest( - "cannot accept an Epiphany role finding without authoritative Epiphany state" - .to_string(), - ) - })?; - let runtime_store_path = thread.epiphany_runtime_spine_store_path().await; - let thread_id = thread.epiphany_thread_id().await; - let service = epiphany_core::EpiphanyCoordinatorService::new( - runtime_store_path.clone(), - runtime_store_path, - ); - let accepted = service - .accept_role( - &thread_id, - &state, - role_id, - binding_id, - expected_revision, - thread.epiphany_reference_turn_id().await, - Utc::now().to_rfc3339_opts(SecondsFormat::Secs, true), - Uuid::new_v4().to_string().as_str(), - ) - .map_err(|error| EpiphanyBridgeError::InvalidRequest(error.to_string()))?; - Ok(EpiphanyRoleAcceptApplied { - revision: accepted.state.revision, - changed_fields: accepted.update.changed_fields, - epiphany_state: accepted.state, - accepted_receipt_id: accepted.update.accepted_receipt_id, - accepted_observation_id: accepted.update.accepted_observation_id, - accepted_evidence_id: accepted.update.accepted_evidence_id, - applied_patch: accepted.update.applied_patch, - finding: accepted.finding, - }) -} - -pub async fn apply_thread_epiphany_reorient_accept( - thread: &impl EpiphanyMutationHost, - expected_revision: Option, - binding_id: &str, - update_scratch: bool, - update_investigation_checkpoint: bool, -) -> BridgeResult { - let state = thread.epiphany_state().await.ok_or_else(|| { - EpiphanyBridgeError::InvalidRequest( - "cannot accept a reorientation finding without authoritative Epiphany state" - .to_string(), - ) - })?; - let runtime_store_path = thread.epiphany_runtime_spine_store_path().await; - let thread_id = thread.epiphany_thread_id().await; - let service = epiphany_core::EpiphanyCoordinatorService::new( - runtime_store_path.clone(), - runtime_store_path, - ); - let accepted = service - .accept_reorient( - &thread_id, - &state, - binding_id, - expected_revision, - thread.epiphany_reference_turn_id().await, - Utc::now().to_rfc3339_opts(SecondsFormat::Secs, true), - Uuid::new_v4().to_string().as_str(), - update_scratch, - update_investigation_checkpoint, - ) - .map_err(|error| EpiphanyBridgeError::InvalidRequest(error.to_string()))?; - Ok(EpiphanyReorientAcceptApplied { - revision: accepted.state.revision, - changed_fields: accepted.update.changed_fields, - epiphany_state: accepted.state, - accepted_receipt_id: accepted.update.accepted_receipt_id, - accepted_observation_id: accepted.update.accepted_observation_id, - accepted_evidence_id: accepted.update.accepted_evidence_id, - finding: accepted.finding, - }) -} - -pub async fn launch_thread_epiphany_role( - thread: &impl EpiphanyMutationHost, - thread_id: &str, - role_id: EpiphanyRoleResultRoleId, - expected_revision: Option, - max_runtime_seconds: Option, -) -> BridgeResult { - let state = thread.epiphany_state().await.ok_or_else(|| { - EpiphanyBridgeError::InvalidRequest( - "cannot launch an Epiphany role specialist without authoritative Epiphany state" - .to_string(), - ) - })?; - validate_expected_revision(expected_revision, state.revision)?; - let runtime_store_path = thread.epiphany_runtime_spine_store_path().await; - let role_label = epiphany_role_label(role_id); - let mut dynamic_prompt_context = render_launch_dynamic_prompt_context( - runtime_store_path.as_path(), - &state, - role_launch_context_focus(&state, role_label), - ) - .map_err(EpiphanyBridgeError::Fatal)?; - if role_id == EpiphanyRoleResultRoleId::Verification { - dynamic_prompt_context = append_verification_hands_receipt_context( - dynamic_prompt_context, - runtime_store_path.as_path(), - &state, - ) - .map_err(EpiphanyBridgeError::Fatal)?; - } else if role_id == EpiphanyRoleResultRoleId::Modeling { - dynamic_prompt_context = append_modeling_work_loop_telemetry_context( - dynamic_prompt_context, - runtime_store_path.as_path(), - &state, - ) - .map_err(EpiphanyBridgeError::Fatal)?; - } - let launch_request = build_epiphany_role_launch_request_with_dynamic_context( - thread_id, - role_id, - expected_revision, - max_runtime_seconds, - &state, - Some(dynamic_prompt_context), - ) - .map_err(EpiphanyBridgeError::InvalidRequest)?; - launch_thread_epiphany_job( - thread, - launch_request, - CoreEpiphanyJobKind::Specialist, - "missing launched role projection", - ) - .await -} - -pub async fn launch_thread_epiphany_job( - thread: &impl EpiphanyMutationHost, - launch_request: EpiphanyJobLaunchRequest, - kind: CoreEpiphanyJobKind, - missing_projection_reason: &str, -) -> BridgeResult { - let changed_fields = epiphany_job_launch_changed_fields(); - let launched = launch_epiphany_job_on_thread(thread, launch_request).await?; - let epiphany_state = thread - .client_visible_epiphany_state(launched.epiphany_state) - .await; - let job = map_launched_epiphany_job( - &epiphany_state, - launched.binding_id.as_str(), - launched.backend_job_id.as_str(), - kind, - missing_projection_reason, - ); - Ok(EpiphanyJobLaunchApplied { - launcher_job_id: launched.launcher_job_id, - backend_job_id: launched.backend_job_id, - revision: epiphany_state.revision, - changed_fields, - epiphany_state, - job, - }) -} - -pub async fn interrupt_thread_epiphany_job( - thread: &impl EpiphanyMutationHost, - expected_revision: Option, - binding_id: &str, - reason: Option, -) -> BridgeResult { - let changed_fields = vec![EpiphanyStateUpdatedField::JobBindings]; - let interrupted = interrupt_epiphany_job_on_thread( - thread, - EpiphanyJobInterruptRequest { - expected_revision, - binding_id: binding_id.to_string(), - reason, - }, - ) - .await?; - let epiphany_state = thread - .client_visible_epiphany_state(interrupted.epiphany_state) - .await; - let job = map_interrupted_epiphany_job(&epiphany_state, binding_id); - - Ok(EpiphanyJobInterruptApplied { - cancel_requested: interrupted.cancel_requested, - interrupted_thread_ids: interrupted.interrupted_thread_ids, - revision: epiphany_state.revision, - changed_fields, - epiphany_state, - job, - }) -} - -pub async fn launch_thread_epiphany_reorient( - thread: &impl EpiphanyMutationHost, - thread_id: &str, - expected_revision: Option, - max_runtime_seconds: Option, - state: Option<&EpiphanyThreadState>, - retrieval_override: Option<&EpiphanyRetrievalState>, - watcher_snapshot: Option>, - token_usage_info: Option<&EpiphanyTokenUsageSnapshot>, -) -> BridgeResult { - let freshness = derive_epiphany_freshness_view(state, retrieval_override, watcher_snapshot); - let state_revision = freshness.state_revision; - let pressure = derive_epiphany_pressure(token_usage_info); - let (state_status, decision) = derive_epiphany_reorient( - state, - &pressure, - &freshness.retrieval, - &freshness.graph, - &freshness.watcher, - ); - - let state = state.ok_or_else(|| { - EpiphanyBridgeError::InvalidRequest(format!( - "cannot launch a reorientation worker without authoritative Epiphany state: {}", - decision.note - )) - })?; - validate_expected_revision(expected_revision, state.revision)?; - let checkpoint = state.investigation_checkpoint.as_ref().ok_or_else(|| { - EpiphanyBridgeError::InvalidRequest(format!( - "cannot launch a reorientation worker without a durable investigation checkpoint: {}", - decision.note - )) - })?; - - let runtime_store_path = thread.epiphany_runtime_spine_store_path().await; - let dynamic_prompt_context = render_launch_dynamic_prompt_context( - runtime_store_path.as_path(), - state, - reorient_launch_context_focus(state, &decision.next_action), - ) - .map_err(EpiphanyBridgeError::Fatal)?; - let launch_request = build_epiphany_reorient_launch_request_with_dynamic_context( - thread_id, - expected_revision, - max_runtime_seconds, - state, - checkpoint, - &decision, - Some(dynamic_prompt_context), - ); - let changed_fields = epiphany_job_launch_changed_fields(); - let launched = launch_epiphany_job_on_thread(thread, launch_request).await?; - let epiphany_state = thread - .client_visible_epiphany_state(launched.epiphany_state) - .await; - let job = derive_epiphany_jobs(Some(&epiphany_state), None) - .into_iter() - .find(|job| job.id == EPIPHANY_REORIENT_LAUNCH_BINDING_ID) - .unwrap_or_else(|| { - epiphany_blocked_state_job( - EPIPHANY_REORIENT_LAUNCH_BINDING_ID, - CoreEpiphanyJobKind::Specialist, - "reorient-guided checkpoint regather", - "Launched reorientation worker was not reflected in Epiphany state.", - ) - }); - - Ok(EpiphanyReorientLaunchApplied { - launcher_job_id: launched.launcher_job_id, - backend_job_id: launched.backend_job_id, - source: EpiphanySurfaceSource::Live, - state_status, - state_revision, - decision, - revision: epiphany_state.revision, - changed_fields, - epiphany_state, - job, - }) -} - -fn validate_expected_revision( - expected_revision: Option, - actual_revision: u64, -) -> BridgeResult<()> { - if let Some(expected_revision) = expected_revision - && actual_revision != expected_revision - { - return Err(EpiphanyBridgeError::InvalidRequest(format!( - "epiphany state revision mismatch: expected {expected_revision}, found {actual_revision}" - ))); - } - Ok(()) -} - -#[cfg(test)] -mod acceptance_architecture_tests { - #[test] - fn generic_update_commits_native_state_without_rollout_mirror() { - let source = include_str!("mutation_service.rs"); - let start = source - .find("pub async fn apply_epiphany_state_update_to_thread") - .unwrap(); - let end = source - .find("pub fn apply_epiphany_state_update_to_state") - .unwrap(); - let update = &source[start..end]; - assert_eq!(update.matches(".apply_state_update_from(").count(), 1); - assert_eq!(update.matches("epiphany_persist_state(").count(), 0); - assert!(!update.contains("Ok(next_state)")); - assert!(update.contains("Ok(applied.state)")); - } - - #[test] - fn interrupt_route_delegates_binding_mutation_to_native_service() { - let source = include_str!("mutation_service.rs"); - let start = source - .find("pub async fn interrupt_epiphany_job_on_thread") - .unwrap(); - let end = source - .find("pub async fn apply_thread_epiphany_update") - .unwrap(); - let interrupt = &source[start..end]; - assert_eq!(interrupt.matches(".interrupt_job(").count(), 1); - for forbidden in [ - ["clear", "epiphany", "job", "binding", "backend"].join("_"), - ["job_bindings", "Some"].join(": "), - ["apply", "epiphany", "state", "update", "to", "thread"].join("_"), - ] { - assert!( - !interrupt.contains(&forbidden), - "interrupt route regrew binding policy {forbidden:?}" - ); - } - } - - #[test] - fn launch_route_delegates_planning_to_the_native_organ() { - let source = include_str!("mutation_service.rs"); - let launch_start = source - .find("pub async fn launch_epiphany_job_on_thread") - .unwrap(); - let interrupt_start = source - .find("pub async fn interrupt_epiphany_job_on_thread") - .unwrap(); - let launch = &source[launch_start..interrupt_start]; - assert_eq!(launch.matches("plan_coordinator_job_launch").count(), 1); - assert_eq!(launch.matches("commit_coordinator_job_launch").count(), 1); - for forbidden in [ - ["plan", "runtime", "spine", "heartbeat", "launch"].join("_"), - ["replace", "or", "append", "epiphany", "job", "binding"].join("_"), - ["runtime", "job", "snapshot"].join("_"), - ["epiphany", "state", "update", "validation", "errors"].join("_"), - ["open", "epiphany", "runtime", "spine", "job"].join("_"), - ["maybe", "put", "substrate", "gate", "launch", "grant"].join("_"), - ["apply", "epiphany", "state", "update", "to", "thread"].join("_"), - ] { - assert!( - !launch.contains(&forbidden), - "launch route regrew native planning policy {forbidden:?}" - ); - } - } - - #[test] - fn acceptance_routes_have_no_individual_or_post_state_receipt_writes() { - let source = include_str!("mutation_service.rs"); - let role_start = source - .find("pub async fn apply_thread_epiphany_role_accept") - .unwrap(); - let launch_start = source - .find("pub async fn launch_thread_epiphany_role") - .unwrap(); - let acceptance = &source[role_start..launch_start]; - for forbidden in [ - ["put", "mind", "gateway", "review"].join("_"), - ["put", "eyes", "evidence", "packet"].join("_"), - ["put", "soul", "verdict", "receipt"].join("_"), - ["put", "continuity", "recovery", "receipt"].join("_"), - ["admit", "epiphany", "state", "with", "mind", "commit"].join("_"), - ["epiphany", "persist", "state"].join("_"), - ] { - assert!( - !acceptance.contains(&forbidden), - "acceptance route regrew obsolete writer {forbidden:?}" - ); - } - assert_eq!( - acceptance.matches("commit_state_with_mind_witness").count(), - 0 - ); - assert_eq!(acceptance.matches(".accept_role(").count(), 1); - assert_eq!(acceptance.matches(".accept_reorient(").count(), 1); - } -} diff --git a/epiphany-codex-bridge/src/pressure.rs b/epiphany-codex-bridge/src/pressure.rs deleted file mode 100644 index b6d1b8f0..00000000 --- a/epiphany-codex-bridge/src/pressure.rs +++ /dev/null @@ -1,7 +0,0 @@ -use epiphany_core::EpiphanyPressure; -pub use epiphany_core::EpiphanyTokenUsageSnapshot; -use epiphany_core::derive_pressure_view; - -pub fn derive_epiphany_pressure(snapshot: Option<&EpiphanyTokenUsageSnapshot>) -> EpiphanyPressure { - derive_pressure_view(snapshot) -} diff --git a/epiphany-codex-bridge/src/protocol_edge.rs b/epiphany-codex-bridge/src/protocol_edge.rs deleted file mode 100644 index 90fa6fc2..00000000 --- a/epiphany-codex-bridge/src/protocol_edge.rs +++ /dev/null @@ -1,694 +0,0 @@ -use crate::cultnet::EpiphanyFreshnessSurface; -use crate::cultnet::EpiphanyGraphFreshnessStatus; -use crate::cultnet::EpiphanyInvalidationStatus; -use crate::cultnet::EpiphanyJobKind; -use crate::cultnet::EpiphanyJobStatus; -use crate::cultnet::EpiphanyJobView; -use crate::cultnet::EpiphanyReorientAction; -use crate::cultnet::EpiphanyReorientCheckpointStatus; -use crate::cultnet::EpiphanyReorientDecision; -use crate::cultnet::EpiphanyReorientFreshnessStatus; -use crate::cultnet::EpiphanyReorientPressureLevel; -use crate::cultnet::EpiphanyReorientReason; -use crate::cultnet::EpiphanyReorientStateStatus; -use crate::cultnet::EpiphanyRetrievalFreshnessStatus; -use crate::cultnet::EpiphanySurfaceSource; -use codex_app_server_protocol::ThreadEpiphanyContextParams; -use codex_app_server_protocol::ThreadEpiphanyFreshnessResponse; -use codex_app_server_protocol::ThreadEpiphanyFreshnessSource; -use codex_app_server_protocol::ThreadEpiphanyGraphFreshness; -use codex_app_server_protocol::ThreadEpiphanyGraphFreshnessStatus; -use codex_app_server_protocol::ThreadEpiphanyGraphQuery; -use codex_app_server_protocol::ThreadEpiphanyGraphQueryDirection; -use codex_app_server_protocol::ThreadEpiphanyGraphQueryKind; -use codex_app_server_protocol::ThreadEpiphanyInvalidationInput; -use codex_app_server_protocol::ThreadEpiphanyInvalidationStatus; -use codex_app_server_protocol::ThreadEpiphanyJob; -use codex_app_server_protocol::ThreadEpiphanyJobKind; -use codex_app_server_protocol::ThreadEpiphanyJobStatus; -use codex_app_server_protocol::ThreadEpiphanyPressure; -use codex_app_server_protocol::ThreadEpiphanyPressureBasis; -use codex_app_server_protocol::ThreadEpiphanyPressureLevel; -use codex_app_server_protocol::ThreadEpiphanyPressureStatus; -use codex_app_server_protocol::ThreadEpiphanyReorientAction; -use codex_app_server_protocol::ThreadEpiphanyReorientCheckpointStatus; -use codex_app_server_protocol::ThreadEpiphanyReorientDecision; -use codex_app_server_protocol::ThreadEpiphanyReorientFinding; -use codex_app_server_protocol::ThreadEpiphanyReorientReason; -use codex_app_server_protocol::ThreadEpiphanyReorientResultStatus; -use codex_app_server_protocol::ThreadEpiphanyReorientSource; -use codex_app_server_protocol::ThreadEpiphanyReorientStateStatus; -use codex_app_server_protocol::ThreadEpiphanyRetrievalFreshness; -use codex_app_server_protocol::ThreadEpiphanyRetrievalFreshnessStatus; -use codex_app_server_protocol::ThreadEpiphanyRoleFinding; -use codex_app_server_protocol::ThreadEpiphanyRoleId; -use codex_app_server_protocol::ThreadEpiphanyRoleResultStatus; -use codex_app_server_protocol::ThreadEpiphanyRoleSelfPersistenceReview; -use codex_app_server_protocol::ThreadEpiphanyRoleSelfPersistenceStatus; -use codex_app_server_protocol::ThreadEpiphanyRolesSource; -use codex_app_server_protocol::ThreadEpiphanyStateUpdatedField; -use codex_app_server_protocol::ThreadEpiphanyStateUpdatedNotification; -use codex_app_server_protocol::ThreadEpiphanyStateUpdatedSource; -use codex_app_server_protocol::ThreadEpiphanyUpdatePatch; -use codex_app_server_protocol::ThreadEpiphanyViewLens; -use epiphany_core::EpiphanyContextParams; -use epiphany_core::EpiphanyCoordinatorRoleResultStatus; -use epiphany_core::EpiphanyCrrcResultStatus; -use epiphany_core::EpiphanyGraphQuery; -use epiphany_core::EpiphanyGraphQueryDirection; -use epiphany_core::EpiphanyGraphQueryKind; -use epiphany_core::EpiphanyPressure; -use epiphany_core::EpiphanyPressureBasis; -use epiphany_core::EpiphanyPressureLevel; -use epiphany_core::EpiphanyPressureStatus; -use epiphany_core::EpiphanyReorientFindingInterpretation; -use epiphany_core::EpiphanyRoleFindingInterpretation; -use epiphany_core::EpiphanyRoleResultRoleId; -use epiphany_core::EpiphanyRoleSelfPersistenceReview; -use epiphany_core::EpiphanyRoleSelfPersistenceStatus; -use epiphany_core::EpiphanyRoleStatePatchDocument; -use epiphany_core::EpiphanyStateUpdatedField; -use epiphany_core::EpiphanyViewLens; -use epiphany_core::default_epiphany_view_lenses; -use epiphany_core::epiphany_view_needs_jobs; -use epiphany_core::epiphany_view_needs_pressure; -use epiphany_core::epiphany_view_needs_reorientation_inputs; -use epiphany_core::epiphany_view_needs_runtime_store; -use epiphany_state_model::EpiphanyThreadState; - -pub fn default_core_epiphany_view_lenses() -> Vec { - default_epiphany_view_lenses() -} - -pub fn protocol_view_lenses_to_core(lenses: Vec) -> Vec { - lenses.into_iter().map(protocol_view_lens_to_core).collect() -} - -pub fn protocol_view_lens_from_core(lens: EpiphanyViewLens) -> ThreadEpiphanyViewLens { - match lens { - EpiphanyViewLens::Scene => ThreadEpiphanyViewLens::Scene, - EpiphanyViewLens::Jobs => ThreadEpiphanyViewLens::Jobs, - EpiphanyViewLens::Roles => ThreadEpiphanyViewLens::Roles, - EpiphanyViewLens::Planning => ThreadEpiphanyViewLens::Planning, - EpiphanyViewLens::Pressure => ThreadEpiphanyViewLens::Pressure, - EpiphanyViewLens::Reorient => ThreadEpiphanyViewLens::Reorient, - EpiphanyViewLens::Crrc => ThreadEpiphanyViewLens::Crrc, - EpiphanyViewLens::Coordinator => ThreadEpiphanyViewLens::Coordinator, - } -} - -pub fn core_epiphany_view_needs_jobs(lenses: &[EpiphanyViewLens]) -> bool { - epiphany_view_needs_jobs(lenses) -} - -pub fn core_epiphany_view_needs_reorientation_inputs(lenses: &[EpiphanyViewLens]) -> bool { - epiphany_view_needs_reorientation_inputs(lenses) -} - -pub fn core_epiphany_view_needs_pressure(lenses: &[EpiphanyViewLens]) -> bool { - epiphany_view_needs_pressure(lenses) -} - -pub fn core_epiphany_view_needs_runtime_store(lenses: &[EpiphanyViewLens]) -> bool { - epiphany_view_needs_runtime_store(lenses) -} - -pub fn protocol_context_params_to_core( - params: &ThreadEpiphanyContextParams, -) -> EpiphanyContextParams { - EpiphanyContextParams { - graph_node_ids: params.graph_node_ids.clone(), - graph_edge_ids: params.graph_edge_ids.clone(), - observation_ids: params.observation_ids.clone(), - evidence_ids: params.evidence_ids.clone(), - include_active_frontier: params.include_active_frontier, - include_linked_evidence: params.include_linked_evidence, - } -} - -pub fn protocol_graph_query_to_core(query: &ThreadEpiphanyGraphQuery) -> EpiphanyGraphQuery { - EpiphanyGraphQuery { - kind: protocol_graph_query_kind_to_core(query.kind), - node_ids: query.node_ids.clone(), - edge_ids: query.edge_ids.clone(), - paths: query.paths.clone(), - symbols: query.symbols.clone(), - edge_kinds: query.edge_kinds.clone(), - direction: query.direction.map(protocol_graph_query_direction_to_core), - depth: query.depth, - include_links: query.include_links, - } -} - -pub fn protocol_update_patch_to_core( - patch: &ThreadEpiphanyUpdatePatch, -) -> EpiphanyRoleStatePatchDocument { - EpiphanyRoleStatePatchDocument { - objective: patch.objective.clone(), - active_subgoal_id: patch.active_subgoal_id.clone(), - subgoals: patch.subgoals.clone(), - invariants: patch.invariants.clone(), - graphs: patch.graphs.clone(), - graph_frontier: patch.graph_frontier.clone(), - graph_checkpoint: patch.graph_checkpoint.clone(), - scratch: patch.scratch.clone(), - investigation_checkpoint: patch.investigation_checkpoint.clone(), - job_bindings: patch.job_bindings.clone(), - acceptance_receipts: patch.acceptance_receipts.clone(), - runtime_links: patch.runtime_links.clone(), - observations: patch.observations.clone(), - evidence: patch.evidence.clone(), - churn: patch.churn.clone(), - mode: patch.mode.clone(), - planning: patch.planning.clone(), - } -} - -pub fn protocol_patch_from_core( - patch: EpiphanyRoleStatePatchDocument, -) -> ThreadEpiphanyUpdatePatch { - ThreadEpiphanyUpdatePatch { - objective: patch.objective, - active_subgoal_id: patch.active_subgoal_id, - subgoals: patch.subgoals, - invariants: patch.invariants, - graphs: patch.graphs, - graph_frontier: patch.graph_frontier, - graph_checkpoint: patch.graph_checkpoint, - scratch: patch.scratch, - investigation_checkpoint: patch.investigation_checkpoint, - job_bindings: patch.job_bindings, - acceptance_receipts: patch.acceptance_receipts, - runtime_links: patch.runtime_links, - observations: patch.observations, - evidence: patch.evidence, - churn: patch.churn, - mode: patch.mode, - planning: patch.planning, - } -} - -pub fn protocol_role_id_to_core(role_id: ThreadEpiphanyRoleId) -> EpiphanyRoleResultRoleId { - match role_id { - ThreadEpiphanyRoleId::Implementation => EpiphanyRoleResultRoleId::Implementation, - ThreadEpiphanyRoleId::Imagination => EpiphanyRoleResultRoleId::Imagination, - ThreadEpiphanyRoleId::Research => EpiphanyRoleResultRoleId::Research, - ThreadEpiphanyRoleId::Modeling => EpiphanyRoleResultRoleId::Modeling, - ThreadEpiphanyRoleId::Verification => EpiphanyRoleResultRoleId::Verification, - ThreadEpiphanyRoleId::Reorientation => EpiphanyRoleResultRoleId::Reorientation, - } -} - -pub fn protocol_role_id_from_core(role_id: EpiphanyRoleResultRoleId) -> ThreadEpiphanyRoleId { - match role_id { - EpiphanyRoleResultRoleId::Implementation => ThreadEpiphanyRoleId::Implementation, - EpiphanyRoleResultRoleId::Imagination => ThreadEpiphanyRoleId::Imagination, - EpiphanyRoleResultRoleId::Research => ThreadEpiphanyRoleId::Research, - EpiphanyRoleResultRoleId::Modeling => ThreadEpiphanyRoleId::Modeling, - EpiphanyRoleResultRoleId::Verification => ThreadEpiphanyRoleId::Verification, - EpiphanyRoleResultRoleId::Reorientation => ThreadEpiphanyRoleId::Reorientation, - } -} - -pub fn protocol_reorient_finding( - finding: EpiphanyReorientFindingInterpretation, -) -> ThreadEpiphanyReorientFinding { - ThreadEpiphanyReorientFinding { - mode: finding.mode, - summary: finding.summary, - next_safe_move: finding.next_safe_move, - checkpoint_still_valid: finding.checkpoint_still_valid, - files_inspected: finding.files_inspected, - frontier_node_ids: finding.frontier_node_ids, - evidence_ids: finding.evidence_ids, - artifact_refs: finding.artifact_refs, - runtime_result_id: finding.runtime_result_id, - runtime_job_id: finding.runtime_job_id, - job_error: finding.job_error, - item_error: finding.item_error, - } -} - -pub fn protocol_role_finding( - role_id: ThreadEpiphanyRoleId, - finding: EpiphanyRoleFindingInterpretation, -) -> ThreadEpiphanyRoleFinding { - let state_patch = finding.state_patch.map(protocol_patch_from_core); - ThreadEpiphanyRoleFinding { - role_id, - verdict: finding.verdict, - summary: finding.summary, - next_safe_move: finding.next_safe_move, - checkpoint_summary: finding.checkpoint_summary, - scratch_summary: finding.scratch_summary, - files_inspected: finding.files_inspected, - frontier_node_ids: finding.frontier_node_ids, - evidence_ids: finding.evidence_ids, - artifact_refs: finding.artifact_refs, - runtime_result_id: finding.runtime_result_id, - runtime_job_id: finding.runtime_job_id, - open_questions: finding.open_questions, - evidence_gaps: finding.evidence_gaps, - risks: finding.risks, - state_patch, - self_patch: finding.self_patch.map(|patch| { - serde_json::to_value(patch) - .expect("AgentSelfPatch is a serializable protocol projection") - }), - self_persistence: finding - .self_persistence - .map(protocol_self_persistence_review), - job_error: finding.job_error, - item_error: finding.item_error, - } -} - -pub fn protocol_state_updated_notification( - thread_id: String, - source: ThreadEpiphanyStateUpdatedSource, - revision: u64, - changed_fields: Vec, - epiphany_state: EpiphanyThreadState, -) -> ThreadEpiphanyStateUpdatedNotification { - ThreadEpiphanyStateUpdatedNotification { - thread_id, - source, - revision, - changed_fields: protocol_state_updated_fields(changed_fields), - epiphany_state, - } -} - -pub fn protocol_state_updated_fields( - fields: Vec, -) -> Vec { - fields - .into_iter() - .map(protocol_state_updated_field) - .collect() -} - -pub fn protocol_state_updated_field( - field: EpiphanyStateUpdatedField, -) -> ThreadEpiphanyStateUpdatedField { - match field { - EpiphanyStateUpdatedField::Objective => ThreadEpiphanyStateUpdatedField::Objective, - EpiphanyStateUpdatedField::ActiveSubgoalId => { - ThreadEpiphanyStateUpdatedField::ActiveSubgoalId - } - EpiphanyStateUpdatedField::Subgoals => ThreadEpiphanyStateUpdatedField::Subgoals, - EpiphanyStateUpdatedField::Invariants => ThreadEpiphanyStateUpdatedField::Invariants, - EpiphanyStateUpdatedField::Graphs => ThreadEpiphanyStateUpdatedField::Graphs, - EpiphanyStateUpdatedField::GraphFrontier => ThreadEpiphanyStateUpdatedField::GraphFrontier, - EpiphanyStateUpdatedField::GraphCheckpoint => { - ThreadEpiphanyStateUpdatedField::GraphCheckpoint - } - EpiphanyStateUpdatedField::Scratch => ThreadEpiphanyStateUpdatedField::Scratch, - EpiphanyStateUpdatedField::InvestigationCheckpoint => { - ThreadEpiphanyStateUpdatedField::InvestigationCheckpoint - } - EpiphanyStateUpdatedField::JobBindings => ThreadEpiphanyStateUpdatedField::JobBindings, - EpiphanyStateUpdatedField::AcceptanceReceipts => { - ThreadEpiphanyStateUpdatedField::AcceptanceReceipts - } - EpiphanyStateUpdatedField::RuntimeLinks => ThreadEpiphanyStateUpdatedField::RuntimeLinks, - EpiphanyStateUpdatedField::Observations => ThreadEpiphanyStateUpdatedField::Observations, - EpiphanyStateUpdatedField::Evidence => ThreadEpiphanyStateUpdatedField::Evidence, - EpiphanyStateUpdatedField::Churn => ThreadEpiphanyStateUpdatedField::Churn, - EpiphanyStateUpdatedField::Mode => ThreadEpiphanyStateUpdatedField::Mode, - EpiphanyStateUpdatedField::Planning => ThreadEpiphanyStateUpdatedField::Planning, - } -} - -pub fn protocol_freshness_response_from_surface( - surface: EpiphanyFreshnessSurface, -) -> ThreadEpiphanyFreshnessResponse { - ThreadEpiphanyFreshnessResponse { - thread_id: surface.thread_id, - source: match surface.source { - EpiphanySurfaceSource::Stored => ThreadEpiphanyFreshnessSource::Stored, - EpiphanySurfaceSource::Live => ThreadEpiphanyFreshnessSource::Live, - }, - state_revision: surface.state_revision, - retrieval: ThreadEpiphanyRetrievalFreshness { - status: match surface.retrieval.status { - EpiphanyRetrievalFreshnessStatus::Missing => { - ThreadEpiphanyRetrievalFreshnessStatus::Missing - } - EpiphanyRetrievalFreshnessStatus::Ready => { - ThreadEpiphanyRetrievalFreshnessStatus::Ready - } - EpiphanyRetrievalFreshnessStatus::Stale => { - ThreadEpiphanyRetrievalFreshnessStatus::Stale - } - EpiphanyRetrievalFreshnessStatus::Indexing => { - ThreadEpiphanyRetrievalFreshnessStatus::Indexing - } - EpiphanyRetrievalFreshnessStatus::Unavailable => { - ThreadEpiphanyRetrievalFreshnessStatus::Unavailable - } - }, - semantic_available: surface.retrieval.semantic_available, - last_indexed_at_unix_seconds: surface.retrieval.last_indexed_at_unix_seconds, - indexed_file_count: surface.retrieval.indexed_file_count, - indexed_chunk_count: surface.retrieval.indexed_chunk_count, - dirty_paths: surface.retrieval.dirty_paths, - note: surface.retrieval.note, - }, - graph: ThreadEpiphanyGraphFreshness { - status: match surface.graph.status { - EpiphanyGraphFreshnessStatus::Missing => { - ThreadEpiphanyGraphFreshnessStatus::Missing - } - EpiphanyGraphFreshnessStatus::Ready => ThreadEpiphanyGraphFreshnessStatus::Ready, - EpiphanyGraphFreshnessStatus::Stale => ThreadEpiphanyGraphFreshnessStatus::Stale, - }, - graph_freshness: surface.graph.graph_freshness, - checkpoint_id: surface.graph.checkpoint_id, - dirty_path_count: surface.graph.dirty_path_count, - dirty_paths: surface.graph.dirty_paths, - open_question_count: surface.graph.open_question_count, - open_gap_count: surface.graph.open_gap_count, - note: surface.graph.note, - }, - watcher: ThreadEpiphanyInvalidationInput { - status: match surface.watcher.status { - EpiphanyInvalidationStatus::Unavailable => { - ThreadEpiphanyInvalidationStatus::Unavailable - } - EpiphanyInvalidationStatus::Clean => ThreadEpiphanyInvalidationStatus::Clean, - EpiphanyInvalidationStatus::Changed => ThreadEpiphanyInvalidationStatus::Changed, - }, - watched_root: surface.watcher.watched_root, - observed_at_unix_seconds: surface.watcher.observed_at_unix_seconds, - changed_path_count: surface.watcher.changed_path_count, - changed_paths: surface.watcher.changed_paths, - graph_node_ids: surface.watcher.graph_node_ids, - active_frontier_node_ids: surface.watcher.active_frontier_node_ids, - note: surface.watcher.note, - }, - } -} - -pub fn protocol_job_from_surface( - job: EpiphanyJobView, - launcher_job_id: Option, - backend_job_id_override: Option, -) -> ThreadEpiphanyJob { - ThreadEpiphanyJob { - id: job.id, - kind: match job.kind { - EpiphanyJobKind::Indexing => ThreadEpiphanyJobKind::Indexing, - EpiphanyJobKind::Remap => ThreadEpiphanyJobKind::Remap, - EpiphanyJobKind::Verification => ThreadEpiphanyJobKind::Verification, - EpiphanyJobKind::Specialist => ThreadEpiphanyJobKind::Specialist, - }, - scope: job.scope, - owner_role: job.owner_role, - launcher_job_id, - authority_scope: job.authority_scope, - backend_job_id: backend_job_id_override.or(job.runtime_job_id), - status: match job.status { - EpiphanyJobStatus::Idle => ThreadEpiphanyJobStatus::Idle, - EpiphanyJobStatus::Needed => ThreadEpiphanyJobStatus::Needed, - EpiphanyJobStatus::Pending => ThreadEpiphanyJobStatus::Pending, - EpiphanyJobStatus::Running => ThreadEpiphanyJobStatus::Running, - EpiphanyJobStatus::Completed => ThreadEpiphanyJobStatus::Completed, - EpiphanyJobStatus::Failed => ThreadEpiphanyJobStatus::Failed, - EpiphanyJobStatus::Cancelled => ThreadEpiphanyJobStatus::Cancelled, - EpiphanyJobStatus::Blocked => ThreadEpiphanyJobStatus::Blocked, - EpiphanyJobStatus::Unavailable => ThreadEpiphanyJobStatus::Unavailable, - }, - items_processed: job.items_processed, - items_total: job.items_total, - progress_note: job.progress_note, - last_checkpoint_at_unix_seconds: job.last_checkpoint_at_unix_seconds, - blocking_reason: job.blocking_reason, - active_thread_ids: job.active_thread_ids, - linked_subgoal_ids: job.linked_subgoal_ids, - linked_graph_node_ids: job.linked_graph_node_ids, - } -} - -pub fn protocol_reorient_state_status( - status: EpiphanyReorientStateStatus, -) -> ThreadEpiphanyReorientStateStatus { - match status { - EpiphanyReorientStateStatus::Missing => ThreadEpiphanyReorientStateStatus::Missing, - EpiphanyReorientStateStatus::Ready => ThreadEpiphanyReorientStateStatus::Ready, - } -} - -pub fn protocol_reorient_source(source: EpiphanySurfaceSource) -> ThreadEpiphanyReorientSource { - match source { - EpiphanySurfaceSource::Stored => ThreadEpiphanyReorientSource::Stored, - EpiphanySurfaceSource::Live => ThreadEpiphanyReorientSource::Live, - } -} - -pub fn protocol_roles_source(source: EpiphanySurfaceSource) -> ThreadEpiphanyRolesSource { - match source { - EpiphanySurfaceSource::Stored => ThreadEpiphanyRolesSource::Stored, - EpiphanySurfaceSource::Live => ThreadEpiphanyRolesSource::Live, - } -} - -pub fn protocol_reorient_decision( - decision: EpiphanyReorientDecision, -) -> ThreadEpiphanyReorientDecision { - ThreadEpiphanyReorientDecision { - action: match decision.action { - EpiphanyReorientAction::Resume => ThreadEpiphanyReorientAction::Resume, - EpiphanyReorientAction::Regather => ThreadEpiphanyReorientAction::Regather, - }, - checkpoint_status: match decision.checkpoint_status { - EpiphanyReorientCheckpointStatus::Missing => { - ThreadEpiphanyReorientCheckpointStatus::Missing - } - EpiphanyReorientCheckpointStatus::ResumeReady => { - ThreadEpiphanyReorientCheckpointStatus::ResumeReady - } - EpiphanyReorientCheckpointStatus::RegatherRequired => { - ThreadEpiphanyReorientCheckpointStatus::RegatherRequired - } - }, - checkpoint_id: decision.checkpoint_id, - pressure_level: match decision.pressure_level { - EpiphanyReorientPressureLevel::Unknown => ThreadEpiphanyPressureLevel::Unknown, - EpiphanyReorientPressureLevel::Low => ThreadEpiphanyPressureLevel::Low, - EpiphanyReorientPressureLevel::Medium => ThreadEpiphanyPressureLevel::Elevated, - EpiphanyReorientPressureLevel::High => ThreadEpiphanyPressureLevel::High, - EpiphanyReorientPressureLevel::Critical => ThreadEpiphanyPressureLevel::Critical, - }, - retrieval_status: protocol_reorient_retrieval_status(decision.retrieval_status), - graph_status: protocol_reorient_graph_status(decision.graph_status), - watcher_status: protocol_reorient_watcher_status(decision.watcher_status), - reasons: decision - .reasons - .into_iter() - .map(protocol_reorient_reason) - .collect(), - checkpoint_dirty_paths: decision.checkpoint_dirty_paths, - checkpoint_changed_paths: decision.checkpoint_changed_paths, - active_frontier_node_ids: decision.active_frontier_node_ids, - next_action: decision.next_action, - note: decision.note, - } -} - -pub fn protocol_pressure_from_core(pressure: EpiphanyPressure) -> ThreadEpiphanyPressure { - ThreadEpiphanyPressure { - status: match pressure.status { - EpiphanyPressureStatus::Unknown => ThreadEpiphanyPressureStatus::Unknown, - EpiphanyPressureStatus::Ready => ThreadEpiphanyPressureStatus::Ready, - }, - level: protocol_pressure_level(pressure.level), - basis: match pressure.basis { - EpiphanyPressureBasis::Unknown => ThreadEpiphanyPressureBasis::Unknown, - EpiphanyPressureBasis::AutoCompactLimit => { - ThreadEpiphanyPressureBasis::AutoCompactLimit - } - EpiphanyPressureBasis::ModelContextWindow => { - ThreadEpiphanyPressureBasis::ModelContextWindow - } - }, - used_tokens: pressure.used_tokens, - model_context_window: pressure.model_context_window, - model_auto_compact_token_limit: pressure.model_auto_compact_token_limit, - remaining_tokens: pressure.remaining_tokens, - ratio_per_mille: pressure.ratio_per_mille, - should_prepare_compaction: pressure.should_prepare_compaction, - note: pressure.note, - } -} - -pub fn protocol_pressure_level(level: EpiphanyPressureLevel) -> ThreadEpiphanyPressureLevel { - match level { - EpiphanyPressureLevel::Unknown => ThreadEpiphanyPressureLevel::Unknown, - EpiphanyPressureLevel::Low => ThreadEpiphanyPressureLevel::Low, - EpiphanyPressureLevel::Elevated => ThreadEpiphanyPressureLevel::Elevated, - EpiphanyPressureLevel::High => ThreadEpiphanyPressureLevel::High, - EpiphanyPressureLevel::Critical => ThreadEpiphanyPressureLevel::Critical, - } -} - -pub fn protocol_role_result_status( - status: EpiphanyCoordinatorRoleResultStatus, -) -> ThreadEpiphanyRoleResultStatus { - match status { - EpiphanyCoordinatorRoleResultStatus::MissingState => { - ThreadEpiphanyRoleResultStatus::MissingState - } - EpiphanyCoordinatorRoleResultStatus::MissingBinding => { - ThreadEpiphanyRoleResultStatus::MissingBinding - } - EpiphanyCoordinatorRoleResultStatus::BackendUnavailable => { - ThreadEpiphanyRoleResultStatus::BackendUnavailable - } - EpiphanyCoordinatorRoleResultStatus::BackendMissing => { - ThreadEpiphanyRoleResultStatus::BackendMissing - } - EpiphanyCoordinatorRoleResultStatus::Pending => ThreadEpiphanyRoleResultStatus::Pending, - EpiphanyCoordinatorRoleResultStatus::Running => ThreadEpiphanyRoleResultStatus::Running, - EpiphanyCoordinatorRoleResultStatus::Completed => ThreadEpiphanyRoleResultStatus::Completed, - EpiphanyCoordinatorRoleResultStatus::Failed => ThreadEpiphanyRoleResultStatus::Failed, - EpiphanyCoordinatorRoleResultStatus::Cancelled => ThreadEpiphanyRoleResultStatus::Cancelled, - } -} - -pub fn protocol_reorient_result_status( - status: EpiphanyCrrcResultStatus, -) -> ThreadEpiphanyReorientResultStatus { - match status { - EpiphanyCrrcResultStatus::MissingState => ThreadEpiphanyReorientResultStatus::MissingState, - EpiphanyCrrcResultStatus::MissingBinding => { - ThreadEpiphanyReorientResultStatus::MissingBinding - } - EpiphanyCrrcResultStatus::BackendUnavailable => { - ThreadEpiphanyReorientResultStatus::BackendUnavailable - } - EpiphanyCrrcResultStatus::BackendMissing => { - ThreadEpiphanyReorientResultStatus::BackendMissing - } - EpiphanyCrrcResultStatus::Pending => ThreadEpiphanyReorientResultStatus::Pending, - EpiphanyCrrcResultStatus::Running => ThreadEpiphanyReorientResultStatus::Running, - EpiphanyCrrcResultStatus::Completed => ThreadEpiphanyReorientResultStatus::Completed, - EpiphanyCrrcResultStatus::Failed => ThreadEpiphanyReorientResultStatus::Failed, - EpiphanyCrrcResultStatus::Cancelled => ThreadEpiphanyReorientResultStatus::Cancelled, - } -} - -fn protocol_view_lens_to_core(lens: ThreadEpiphanyViewLens) -> EpiphanyViewLens { - match lens { - ThreadEpiphanyViewLens::Scene => EpiphanyViewLens::Scene, - ThreadEpiphanyViewLens::Jobs => EpiphanyViewLens::Jobs, - ThreadEpiphanyViewLens::Roles => EpiphanyViewLens::Roles, - ThreadEpiphanyViewLens::Planning => EpiphanyViewLens::Planning, - ThreadEpiphanyViewLens::Pressure => EpiphanyViewLens::Pressure, - ThreadEpiphanyViewLens::Reorient => EpiphanyViewLens::Reorient, - ThreadEpiphanyViewLens::Crrc => EpiphanyViewLens::Crrc, - ThreadEpiphanyViewLens::Coordinator => EpiphanyViewLens::Coordinator, - } -} - -fn protocol_graph_query_kind_to_core(kind: ThreadEpiphanyGraphQueryKind) -> EpiphanyGraphQueryKind { - match kind { - ThreadEpiphanyGraphQueryKind::Node => EpiphanyGraphQueryKind::Node, - ThreadEpiphanyGraphQueryKind::Path => EpiphanyGraphQueryKind::Path, - ThreadEpiphanyGraphQueryKind::FrontierNeighborhood => { - EpiphanyGraphQueryKind::FrontierNeighborhood - } - ThreadEpiphanyGraphQueryKind::Neighbors => EpiphanyGraphQueryKind::Neighbors, - } -} - -fn protocol_graph_query_direction_to_core( - direction: ThreadEpiphanyGraphQueryDirection, -) -> EpiphanyGraphQueryDirection { - match direction { - ThreadEpiphanyGraphQueryDirection::Incoming => EpiphanyGraphQueryDirection::Incoming, - ThreadEpiphanyGraphQueryDirection::Outgoing => EpiphanyGraphQueryDirection::Outgoing, - ThreadEpiphanyGraphQueryDirection::Both => EpiphanyGraphQueryDirection::Both, - } -} - -fn protocol_reorient_retrieval_status( - status: EpiphanyReorientFreshnessStatus, -) -> ThreadEpiphanyRetrievalFreshnessStatus { - match status { - EpiphanyReorientFreshnessStatus::Unknown => ThreadEpiphanyRetrievalFreshnessStatus::Missing, - EpiphanyReorientFreshnessStatus::Clean => ThreadEpiphanyRetrievalFreshnessStatus::Ready, - EpiphanyReorientFreshnessStatus::Dirty => ThreadEpiphanyRetrievalFreshnessStatus::Indexing, - EpiphanyReorientFreshnessStatus::Stale | EpiphanyReorientFreshnessStatus::Changed => { - ThreadEpiphanyRetrievalFreshnessStatus::Stale - } - } -} - -fn protocol_reorient_graph_status( - status: EpiphanyReorientFreshnessStatus, -) -> ThreadEpiphanyGraphFreshnessStatus { - match status { - EpiphanyReorientFreshnessStatus::Unknown => ThreadEpiphanyGraphFreshnessStatus::Missing, - EpiphanyReorientFreshnessStatus::Clean => ThreadEpiphanyGraphFreshnessStatus::Ready, - EpiphanyReorientFreshnessStatus::Dirty - | EpiphanyReorientFreshnessStatus::Stale - | EpiphanyReorientFreshnessStatus::Changed => ThreadEpiphanyGraphFreshnessStatus::Stale, - } -} - -fn protocol_reorient_watcher_status( - status: EpiphanyReorientFreshnessStatus, -) -> ThreadEpiphanyInvalidationStatus { - match status { - EpiphanyReorientFreshnessStatus::Unknown => ThreadEpiphanyInvalidationStatus::Unavailable, - EpiphanyReorientFreshnessStatus::Clean => ThreadEpiphanyInvalidationStatus::Clean, - EpiphanyReorientFreshnessStatus::Dirty - | EpiphanyReorientFreshnessStatus::Stale - | EpiphanyReorientFreshnessStatus::Changed => ThreadEpiphanyInvalidationStatus::Changed, - } -} - -fn protocol_reorient_reason(reason: EpiphanyReorientReason) -> ThreadEpiphanyReorientReason { - match reason { - EpiphanyReorientReason::MissingState => ThreadEpiphanyReorientReason::MissingState, - EpiphanyReorientReason::MissingCheckpoint => { - ThreadEpiphanyReorientReason::MissingCheckpoint - } - EpiphanyReorientReason::CheckpointReady => ThreadEpiphanyReorientReason::CheckpointReady, - EpiphanyReorientReason::CheckpointRequestedRegather => { - ThreadEpiphanyReorientReason::CheckpointRequestedRegather - } - EpiphanyReorientReason::CheckpointPathsDirty => { - ThreadEpiphanyReorientReason::CheckpointPathsDirty - } - EpiphanyReorientReason::CheckpointPathsChanged => { - ThreadEpiphanyReorientReason::CheckpointPathsChanged - } - EpiphanyReorientReason::FrontierChanged => ThreadEpiphanyReorientReason::FrontierChanged, - EpiphanyReorientReason::UnanchoredCheckpointWhileStateStale => { - ThreadEpiphanyReorientReason::UnanchoredCheckpointWhileStateStale - } - } -} - -fn protocol_self_persistence_review( - review: EpiphanyRoleSelfPersistenceReview, -) -> ThreadEpiphanyRoleSelfPersistenceReview { - ThreadEpiphanyRoleSelfPersistenceReview { - status: match review.status { - EpiphanyRoleSelfPersistenceStatus::Missing => { - ThreadEpiphanyRoleSelfPersistenceStatus::Missing - } - EpiphanyRoleSelfPersistenceStatus::Accepted => { - ThreadEpiphanyRoleSelfPersistenceStatus::Accepted - } - EpiphanyRoleSelfPersistenceStatus::Rejected => { - ThreadEpiphanyRoleSelfPersistenceStatus::Rejected - } - }, - target_agent_id: review.target_agent_id, - target_path: review.target_path, - reasons: review.reasons, - } -} diff --git a/epiphany-codex-bridge/src/reorient.rs b/epiphany-codex-bridge/src/reorient.rs deleted file mode 100644 index 74031ee4..00000000 --- a/epiphany-codex-bridge/src/reorient.rs +++ /dev/null @@ -1,121 +0,0 @@ -use epiphany_core::EpiphanyFreshnessInput; -use epiphany_core::EpiphanyFreshnessView; -use epiphany_core::EpiphanyFreshnessWatcherInput; -use epiphany_core::EpiphanyGraphFreshness as CoreEpiphanyGraphFreshness; -use epiphany_core::EpiphanyGraphFreshnessStatus as CoreEpiphanyGraphFreshnessStatus; -use epiphany_core::EpiphanyInvalidationInput as CoreEpiphanyInvalidationInput; -use epiphany_core::EpiphanyInvalidationStatus as CoreEpiphanyInvalidationStatus; -use epiphany_core::EpiphanyPressure; -use epiphany_core::EpiphanyPressureLevel; -use epiphany_core::EpiphanyReorientDecision as CoreEpiphanyReorientDecision; -use epiphany_core::EpiphanyReorientFreshnessStatus as CoreEpiphanyReorientFreshnessStatus; -use epiphany_core::EpiphanyReorientInput; -use epiphany_core::EpiphanyReorientPressureLevel as CoreEpiphanyReorientPressureLevel; -use epiphany_core::EpiphanyReorientStateStatus as CoreEpiphanyReorientStateStatus; -use epiphany_core::EpiphanyRetrievalFreshness as CoreEpiphanyRetrievalFreshness; -use epiphany_core::EpiphanyRetrievalFreshnessStatus as CoreEpiphanyRetrievalFreshnessStatus; -use epiphany_core::derive_freshness; -use epiphany_core::recommend_reorientation; -use epiphany_state_model::EpiphanyRetrievalState; -use epiphany_state_model::EpiphanyThreadState; -use std::path::Path; -use std::path::PathBuf; - -pub struct EpiphanyFreshnessWatcherSnapshot<'a> { - pub available: bool, - pub workspace_root: Option<&'a Path>, - pub observed_at_unix_seconds: Option, - pub changed_paths: &'a [PathBuf], -} - -pub fn derive_epiphany_freshness_view( - state: Option<&EpiphanyThreadState>, - retrieval_override: Option<&EpiphanyRetrievalState>, - watcher_snapshot: Option>, -) -> EpiphanyFreshnessView { - let watcher = watcher_snapshot.map(|snapshot| EpiphanyFreshnessWatcherInput { - available: snapshot.available, - workspace_root: snapshot.workspace_root, - observed_at_unix_seconds: snapshot.observed_at_unix_seconds, - changed_paths: snapshot.changed_paths, - }); - derive_freshness(EpiphanyFreshnessInput { - state, - retrieval_override, - watcher, - }) -} - -pub fn derive_epiphany_reorient( - state: Option<&EpiphanyThreadState>, - pressure: &EpiphanyPressure, - retrieval: &CoreEpiphanyRetrievalFreshness, - graph: &CoreEpiphanyGraphFreshness, - watcher: &CoreEpiphanyInvalidationInput, -) -> ( - CoreEpiphanyReorientStateStatus, - CoreEpiphanyReorientDecision, -) { - recommend_reorientation(EpiphanyReorientInput { - checkpoint: state.and_then(|state| state.investigation_checkpoint.as_ref()), - state_present: state.is_some(), - pressure_level: map_core_reorient_pressure_level(pressure.level), - retrieval_status: map_core_reorient_retrieval_status(retrieval.status), - retrieval_dirty_paths: retrieval.dirty_paths.clone(), - graph_status: map_core_reorient_graph_status(graph.status), - graph_dirty_paths: graph.dirty_paths.clone(), - watcher_status: map_core_reorient_watcher_status(watcher.status), - watcher_changed_paths: watcher.changed_paths.clone(), - watcher_graph_node_ids: watcher.graph_node_ids.clone(), - active_frontier_node_ids: watcher.active_frontier_node_ids.clone(), - watched_root: watcher.watched_root.clone(), - }) -} - -fn map_core_reorient_pressure_level( - level: EpiphanyPressureLevel, -) -> CoreEpiphanyReorientPressureLevel { - match level { - EpiphanyPressureLevel::Unknown => CoreEpiphanyReorientPressureLevel::Unknown, - EpiphanyPressureLevel::Low => CoreEpiphanyReorientPressureLevel::Low, - EpiphanyPressureLevel::Elevated => CoreEpiphanyReorientPressureLevel::Medium, - EpiphanyPressureLevel::High => CoreEpiphanyReorientPressureLevel::High, - EpiphanyPressureLevel::Critical => CoreEpiphanyReorientPressureLevel::Critical, - } -} - -fn map_core_reorient_retrieval_status( - status: CoreEpiphanyRetrievalFreshnessStatus, -) -> CoreEpiphanyReorientFreshnessStatus { - match status { - CoreEpiphanyRetrievalFreshnessStatus::Missing - | CoreEpiphanyRetrievalFreshnessStatus::Unavailable => { - CoreEpiphanyReorientFreshnessStatus::Unknown - } - CoreEpiphanyRetrievalFreshnessStatus::Ready => CoreEpiphanyReorientFreshnessStatus::Clean, - CoreEpiphanyRetrievalFreshnessStatus::Stale => CoreEpiphanyReorientFreshnessStatus::Stale, - CoreEpiphanyRetrievalFreshnessStatus::Indexing => { - CoreEpiphanyReorientFreshnessStatus::Dirty - } - } -} - -fn map_core_reorient_graph_status( - status: CoreEpiphanyGraphFreshnessStatus, -) -> CoreEpiphanyReorientFreshnessStatus { - match status { - CoreEpiphanyGraphFreshnessStatus::Missing => CoreEpiphanyReorientFreshnessStatus::Unknown, - CoreEpiphanyGraphFreshnessStatus::Ready => CoreEpiphanyReorientFreshnessStatus::Clean, - CoreEpiphanyGraphFreshnessStatus::Stale => CoreEpiphanyReorientFreshnessStatus::Stale, - } -} - -fn map_core_reorient_watcher_status( - status: CoreEpiphanyInvalidationStatus, -) -> CoreEpiphanyReorientFreshnessStatus { - match status { - CoreEpiphanyInvalidationStatus::Unavailable => CoreEpiphanyReorientFreshnessStatus::Unknown, - CoreEpiphanyInvalidationStatus::Clean => CoreEpiphanyReorientFreshnessStatus::Clean, - CoreEpiphanyInvalidationStatus::Changed => CoreEpiphanyReorientFreshnessStatus::Changed, - } -} diff --git a/epiphany-codex-bridge/src/results.rs b/epiphany-codex-bridge/src/results.rs deleted file mode 100644 index ba0e742b..00000000 --- a/epiphany-codex-bridge/src/results.rs +++ /dev/null @@ -1,137 +0,0 @@ -use epiphany_core::EpiphanyCoordinatorRoleResultStatus as CoreEpiphanyCoordinatorRoleResultStatus; -use epiphany_core::EpiphanyCrrcResultStatus as CoreEpiphanyCrrcResultStatus; -use epiphany_core::EpiphanyReorientFindingInterpretation; -use epiphany_core::EpiphanyRoleFindingInterpretation; -use epiphany_core::EpiphanyRoleResultRoleId; -use epiphany_core::EpiphanyRoleSelfPersistenceReview as CoreEpiphanyRoleSelfPersistenceReview; -use epiphany_core::EpiphanyRoleSelfPersistenceStatus as CoreEpiphanyRoleSelfPersistenceStatus; - -pub fn render_core_role_result_note( - role_id: EpiphanyRoleResultRoleId, - status: CoreEpiphanyCoordinatorRoleResultStatus, - finding: Option<&EpiphanyRoleFindingInterpretation>, - item_error: Option<&str>, -) -> String { - match status { - CoreEpiphanyCoordinatorRoleResultStatus::Completed => { - if let Some(finding) = finding { - let next = finding.next_safe_move.as_deref().unwrap_or("not supplied"); - let self_note = - render_core_self_persistence_note(finding.self_persistence.as_ref()) - .map(|note| format!(" {note}")) - .unwrap_or_default(); - if let Some(item_error) = finding.item_error.as_deref().or(item_error) { - format!( - "{:?} role specialist completed, but the finding needs repair: {item_error}. Next safe move: {next}.{self_note}", - role_id - ) - } else { - format!( - "{:?} role specialist completed. Next safe move: {next}.{self_note}", - role_id - ) - } - } else { - format!( - "{:?} role specialist completed, but no structured result was recorded.", - role_id - ) - } - } - CoreEpiphanyCoordinatorRoleResultStatus::Failed => item_error - .map(|error| format!("{:?} role specialist failed: {error}", role_id)) - .unwrap_or_else(|| format!("{:?} role specialist failed.", role_id)), - CoreEpiphanyCoordinatorRoleResultStatus::Cancelled => { - format!( - "{:?} role specialist was cancelled before producing a result.", - role_id - ) - } - CoreEpiphanyCoordinatorRoleResultStatus::Running => { - format!("{:?} role specialist is still running.", role_id) - } - CoreEpiphanyCoordinatorRoleResultStatus::Pending => { - format!( - "{:?} role specialist has not produced a result yet.", - role_id - ) - } - CoreEpiphanyCoordinatorRoleResultStatus::MissingState => { - "No authoritative Epiphany state exists for this thread.".to_string() - } - CoreEpiphanyCoordinatorRoleResultStatus::MissingBinding => { - "No matching Epiphany role specialist binding exists.".to_string() - } - CoreEpiphanyCoordinatorRoleResultStatus::BackendUnavailable => { - "The bound runtime backend is unavailable.".to_string() - } - CoreEpiphanyCoordinatorRoleResultStatus::BackendMissing => { - "The bound runtime backend job or item is missing.".to_string() - } - } -} - -fn render_core_self_persistence_note( - review: Option<&CoreEpiphanyRoleSelfPersistenceReview>, -) -> Option { - let review = review?; - match review.status { - CoreEpiphanyRoleSelfPersistenceStatus::Missing => None, - CoreEpiphanyRoleSelfPersistenceStatus::Accepted => Some(format!( - "Self persistence request is acceptable for {}.", - review - .target_agent_id - .as_deref() - .unwrap_or("the role memory file") - )), - CoreEpiphanyRoleSelfPersistenceStatus::Rejected => { - let reasons = if review.reasons.is_empty() { - "no reason recorded".to_string() - } else { - review.reasons.join("; ") - }; - Some(format!("Self persistence request was refused: {reasons}.")) - } - } -} - -pub fn render_core_reorient_result_note( - status: CoreEpiphanyCrrcResultStatus, - finding: Option<&EpiphanyReorientFindingInterpretation>, - item_error: Option<&str>, -) -> String { - match status { - CoreEpiphanyCrrcResultStatus::Completed => { - if let Some(finding) = finding { - let next = finding.next_safe_move.as_deref().unwrap_or("not supplied"); - format!("Reorientation worker completed. Next safe move: {next}") - } else { - "Reorientation worker completed, but no structured result was recorded.".to_string() - } - } - CoreEpiphanyCrrcResultStatus::Failed => item_error - .map(|error| format!("Reorientation worker failed: {error}")) - .unwrap_or_else(|| "Reorientation worker failed.".to_string()), - CoreEpiphanyCrrcResultStatus::Cancelled => { - "Reorientation worker was cancelled before producing a result.".to_string() - } - CoreEpiphanyCrrcResultStatus::Running => { - "Reorientation worker is still running.".to_string() - } - CoreEpiphanyCrrcResultStatus::Pending => { - "Reorientation worker has not produced a result yet.".to_string() - } - CoreEpiphanyCrrcResultStatus::MissingState => { - "No authoritative Epiphany state exists for this thread.".to_string() - } - CoreEpiphanyCrrcResultStatus::MissingBinding => { - "No matching Epiphany reorientation worker binding exists.".to_string() - } - CoreEpiphanyCrrcResultStatus::BackendUnavailable => { - "The bound runtime backend is unavailable.".to_string() - } - CoreEpiphanyCrrcResultStatus::BackendMissing => { - "The bound runtime backend job or item is missing.".to_string() - } - } -} diff --git a/epiphany-codex-bridge/src/retrieve.rs b/epiphany-codex-bridge/src/retrieve.rs deleted file mode 100644 index d7961848..00000000 --- a/epiphany-codex-bridge/src/retrieve.rs +++ /dev/null @@ -1,63 +0,0 @@ -use epiphany_core::EpiphanyRetrieveQuery; -use epiphany_core::EpiphanyRetrieveResponse as CoreEpiphanyRetrieveResponse; -use epiphany_core::index_workspace; -use epiphany_core::normalize_epiphany_retrieve_query; -use epiphany_core::retrieval_state_for_workspace; -use epiphany_core::retrieve_workspace; -use epiphany_state_model::EpiphanyRetrievalState; -use std::path::PathBuf; - -pub async fn index_epiphany_retrieval_for_paths( - workspace_root: PathBuf, - codex_home: PathBuf, - force_full_rebuild: bool, -) -> anyhow::Result { - index_epiphany_retrieval_state_for_paths(workspace_root, codex_home, force_full_rebuild).await -} - -pub fn normalize_thread_epiphany_retrieve_query( - query: String, - limit: Option, - path_prefixes: Vec, -) -> Result { - normalize_epiphany_retrieve_query(query, limit, path_prefixes).map_err(str::to_string) -} - -pub async fn epiphany_retrieval_state_for_paths( - workspace_root: PathBuf, - codex_home: PathBuf, -) -> EpiphanyRetrievalState { - let fallback_workspace_root = workspace_root.clone(); - let fallback_codex_home = codex_home.clone(); - tokio::task::spawn_blocking(move || { - retrieval_state_for_workspace(&workspace_root, codex_home.as_path()) - }) - .await - .unwrap_or_else(|_| { - retrieval_state_for_workspace(&fallback_workspace_root, fallback_codex_home.as_path()) - }) -} - -pub async fn index_epiphany_retrieval_state_for_paths( - workspace_root: PathBuf, - codex_home: PathBuf, - force_full_rebuild: bool, -) -> anyhow::Result { - tokio::task::spawn_blocking(move || { - index_workspace(&workspace_root, codex_home.as_path(), force_full_rebuild) - }) - .await - .map_err(|err| anyhow::anyhow!("epiphany index worker failed: {err}"))? -} - -pub async fn retrieve_epiphany_for_paths( - workspace_root: PathBuf, - codex_home: PathBuf, - query: EpiphanyRetrieveQuery, -) -> anyhow::Result { - tokio::task::spawn_blocking(move || { - retrieve_workspace(&workspace_root, codex_home.as_path(), query) - }) - .await - .map_err(|err| anyhow::anyhow!("epiphany retrieval worker failed: {err}"))? -} diff --git a/epiphany-codex-bridge/src/runtime_results.rs b/epiphany-codex-bridge/src/runtime_results.rs deleted file mode 100644 index f5e6c83e..00000000 --- a/epiphany-codex-bridge/src/runtime_results.rs +++ /dev/null @@ -1,277 +0,0 @@ -use std::path::Path; - -use epiphany_core::EpiphanyLaunchOrganContract; -use epiphany_core::EpiphanyReorientFindingInterpretation; -use epiphany_core::EpiphanyRoleFindingInterpretation; -use epiphany_core::EpiphanyRoleResultRoleId; -use epiphany_state_model::EpiphanyRuntimeLink; -use epiphany_state_model::EpiphanyThreadState; - -use crate::error::EpiphanyBridgeError; -use crate::error::Result as BridgeResult; - -pub type EpiphanyRoleResultSnapshot = epiphany_core::EpiphanyCoordinatorRoleResultSnapshot; -pub type EpiphanyReorientResultSnapshot = epiphany_core::EpiphanyCoordinatorReorientResultSnapshot; - -pub fn load_core_epiphany_role_result_from_runtime_spine_job( - job_id: &str, - runtime_store_path: Option<&Path>, - role_id: EpiphanyRoleResultRoleId, -) -> EpiphanyRoleResultSnapshot { - epiphany_core::read_runtime_role_result(runtime_store_path, job_id, role_id) -} - -pub fn load_core_epiphany_reorient_result_from_runtime_spine_job( - job_id: &str, - runtime_store_path: Option<&Path>, -) -> EpiphanyReorientResultSnapshot { - epiphany_core::read_runtime_reorient_result(runtime_store_path, job_id) -} - -pub async fn load_core_epiphany_role_result_snapshot( - state: &EpiphanyThreadState, - runtime_store_path: Option<&Path>, - role_id: EpiphanyRoleResultRoleId, - binding_id: &str, -) -> EpiphanyRoleResultSnapshot { - epiphany_core::read_role_result_snapshot(Some(state), runtime_store_path, role_id, binding_id) -} - -pub fn load_completed_core_epiphany_role_finding( - runtime_store_path: Option<&Path>, - state: &EpiphanyThreadState, - role_id: EpiphanyRoleResultRoleId, - binding_id: &str, -) -> BridgeResult { - epiphany_core::completed_role_finding(runtime_store_path, state, role_id, binding_id) - .map_err(map_admission_error) -} - -pub async fn load_core_epiphany_reorient_result_snapshot( - state: Option<&EpiphanyThreadState>, - runtime_store_path: Option<&Path>, - binding_id: &str, -) -> EpiphanyReorientResultSnapshot { - epiphany_core::read_reorient_result_snapshot(state, runtime_store_path, binding_id) -} - -pub fn load_completed_core_epiphany_reorient_finding( - runtime_store_path: Option<&Path>, - state: &EpiphanyThreadState, - binding_id: &str, -) -> BridgeResult { - epiphany_core::completed_reorient_finding(runtime_store_path, state, binding_id) - .map_err(map_admission_error) -} - -pub fn load_launch_organ_contract_for_runtime_job( - runtime_store_path: &Path, - job_id: &str, - expected_document_kind: &str, -) -> BridgeResult { - epiphany_core::load_launch_organ_contract(runtime_store_path, job_id, expected_document_kind) - .map_err(map_admission_error) -} - -fn map_admission_error( - error: epiphany_core::EpiphanyCoordinatorAdmissionError, -) -> EpiphanyBridgeError { - match error { - epiphany_core::EpiphanyCoordinatorAdmissionError::InvalidRequest(message) => { - EpiphanyBridgeError::InvalidRequest(message) - } - epiphany_core::EpiphanyCoordinatorAdmissionError::Store(message) => { - EpiphanyBridgeError::Fatal(message) - } - } -} - -pub fn latest_epiphany_runtime_link_for_binding<'a>( - state: &'a EpiphanyThreadState, - binding_id: &str, -) -> Option<&'a EpiphanyRuntimeLink> { - state - .runtime_links - .iter() - .find(|link| link.binding_id == binding_id && !link.runtime_job_id.trim().is_empty()) -} - -#[cfg(test)] -mod tests { - use std::fs; - use std::path::Path; - use std::path::PathBuf; - - use epiphany_core::EpiphanyCoordinatorRoleResultStatus as CoreEpiphanyCoordinatorRoleResultStatus; - use epiphany_core::EpiphanyCrrcResultStatus as CoreEpiphanyCrrcResultStatus; - use epiphany_core::EpiphanyRoleResultRoleId; - use epiphany_core::RuntimeSpineInitOptions; - use epiphany_core::RuntimeSpineJobOptions; - use epiphany_core::RuntimeSpineJobResultOptions; - use epiphany_core::RuntimeSpineSessionOptions; - use epiphany_core::complete_runtime_job; - use epiphany_core::create_runtime_job; - use epiphany_core::create_runtime_session; - use epiphany_core::initialize_runtime_spine; - - use super::*; - - const NOW: &str = "2026-05-13T00:00:00Z"; - - #[test] - fn role_result_requires_typed_worker_document() { - let store = temp_store_path(); - seed_lifecycle_result(&store, "role-job", "modeling", "completed"); - - let result = load_core_epiphany_role_result_from_runtime_spine_job( - "role-job", - Some(store.as_path()), - EpiphanyRoleResultRoleId::Modeling, - ); - - assert_eq!( - result.status, - CoreEpiphanyCoordinatorRoleResultStatus::BackendUnavailable - ); - assert!(result.finding.is_none()); - assert!( - result - .note - .contains("EpiphanyRuntimeRoleWorkerResult typed document") - ); - - let _ = fs::remove_file(store); - } - - #[test] - fn reorient_result_requires_typed_worker_document() { - let store = temp_store_path(); - seed_lifecycle_result(&store, "reorient-job", "reorientation", "completed"); - - let result = load_core_epiphany_reorient_result_from_runtime_spine_job( - "reorient-job", - Some(store.as_path()), - ); - - assert_eq!( - result.status, - CoreEpiphanyCrrcResultStatus::BackendUnavailable - ); - assert!(result.finding.is_none()); - assert!( - result - .note - .contains("EpiphanyRuntimeReorientWorkerResult typed document") - ); - - let _ = fs::remove_file(store); - } - - #[test] - fn role_result_projects_failed_lifecycle_receipt_as_terminal() { - let store = temp_store_path(); - seed_lifecycle_result(&store, "role-job", "modeling", "failed"); - - let result = load_core_epiphany_role_result_from_runtime_spine_job( - "role-job", - Some(store.as_path()), - EpiphanyRoleResultRoleId::Modeling, - ); - - assert_eq!( - result.status, - CoreEpiphanyCoordinatorRoleResultStatus::Failed - ); - let finding = result.finding.expect("failed receipt should be visible"); - assert_eq!(finding.verdict.as_deref(), Some("failed")); - assert_eq!(finding.runtime_job_id.as_deref(), Some("role-job")); - assert!( - finding - .job_error - .as_deref() - .is_some_and(|error| error.contains("generic lifecycle result")) - ); - assert!(result.note.contains("failed")); - - let _ = fs::remove_file(store); - } - - #[test] - fn reorient_result_projects_failed_lifecycle_receipt_as_terminal() { - let store = temp_store_path(); - seed_lifecycle_result(&store, "reorient-job", "reorientation", "failed"); - - let result = load_core_epiphany_reorient_result_from_runtime_spine_job( - "reorient-job", - Some(store.as_path()), - ); - - assert_eq!(result.status, CoreEpiphanyCrrcResultStatus::Failed); - let finding = result.finding.expect("failed receipt should be visible"); - assert_eq!(finding.runtime_job_id.as_deref(), Some("reorient-job")); - assert!( - finding - .job_error - .as_deref() - .is_some_and(|error| error.contains("generic lifecycle result")) - ); - assert!(result.note.contains("failed")); - - let _ = fs::remove_file(store); - } - - fn temp_store_path() -> PathBuf { - std::env::temp_dir().join(format!( - "epiphany-runtime-results-{}.msgpack", - uuid::Uuid::new_v4() - )) - } - - fn seed_lifecycle_result(store: &Path, job_id: &str, role: &str, verdict: &str) { - initialize_runtime_spine( - store, - RuntimeSpineInitOptions { - runtime_id: "test-runtime".to_string(), - display_name: "Test Runtime".to_string(), - created_at: NOW.to_string(), - }, - ) - .expect("initialize runtime"); - create_runtime_session( - store, - RuntimeSpineSessionOptions { - session_id: "session-1".to_string(), - objective: "test typed result boundary".to_string(), - created_at: NOW.to_string(), - coordinator_note: "test".to_string(), - }, - ) - .expect("create session"); - create_runtime_job( - store, - RuntimeSpineJobOptions { - job_id: job_id.to_string(), - session_id: "session-1".to_string(), - role: role.to_string(), - created_at: NOW.to_string(), - summary: "generic lifecycle job".to_string(), - artifact_refs: Vec::new(), - }, - ) - .expect("create job"); - complete_runtime_job( - store, - RuntimeSpineJobResultOptions { - result_id: format!("result-{job_id}"), - job_id: job_id.to_string(), - completed_at: NOW.to_string(), - verdict: verdict.to_string(), - summary: "generic lifecycle result".to_string(), - next_safe_move: "do not review generic lifecycle receipts".to_string(), - evidence_refs: Vec::new(), - artifact_refs: Vec::new(), - }, - ) - .expect("complete job"); - } -} diff --git a/epiphany-codex-bridge/src/scene.rs b/epiphany-codex-bridge/src/scene.rs deleted file mode 100644 index 75ee35b0..00000000 --- a/epiphany-codex-bridge/src/scene.rs +++ /dev/null @@ -1,16 +0,0 @@ -use epiphany_core::EpiphanyScene; -use epiphany_core::EpiphanySceneInput; -use epiphany_core::derive_scene; -use epiphany_state_model::EpiphanyThreadState; - -pub fn derive_epiphany_scene( - state: Option<&EpiphanyThreadState>, - loaded: bool, - reorient_binding_id: &str, -) -> EpiphanyScene { - derive_scene(EpiphanySceneInput { - state, - loaded, - reorient_binding_id, - }) -} diff --git a/epiphany-codex-bridge/src/scene_protocol.rs b/epiphany-codex-bridge/src/scene_protocol.rs deleted file mode 100644 index 229f1f67..00000000 --- a/epiphany-codex-bridge/src/scene_protocol.rs +++ /dev/null @@ -1,189 +0,0 @@ -use codex_app_server_protocol::ThreadEpiphanyScene; -use codex_app_server_protocol::ThreadEpiphanySceneAction; -use codex_app_server_protocol::ThreadEpiphanySceneChurn; -use codex_app_server_protocol::ThreadEpiphanySceneGraph; -use codex_app_server_protocol::ThreadEpiphanySceneInvestigationCheckpoint; -use codex_app_server_protocol::ThreadEpiphanySceneRecord; -use codex_app_server_protocol::ThreadEpiphanySceneRecords; -use codex_app_server_protocol::ThreadEpiphanySceneRetrieval; -use codex_app_server_protocol::ThreadEpiphanySceneSource; -use codex_app_server_protocol::ThreadEpiphanySceneStateStatus; -use codex_app_server_protocol::ThreadEpiphanySceneStatusCount; -use codex_app_server_protocol::ThreadEpiphanySceneSubgoal; -use epiphany_core::EpiphanyScene as CoreEpiphanyScene; -use epiphany_core::EpiphanySceneAction as CoreEpiphanySceneAction; -use epiphany_core::EpiphanySceneChurn as CoreEpiphanySceneChurn; -use epiphany_core::EpiphanySceneGraph as CoreEpiphanySceneGraph; -use epiphany_core::EpiphanySceneInvestigationCheckpoint as CoreEpiphanySceneInvestigationCheckpoint; -use epiphany_core::EpiphanySceneRecord as CoreEpiphanySceneRecord; -use epiphany_core::EpiphanySceneRecords as CoreEpiphanySceneRecords; -use epiphany_core::EpiphanySceneRetrieval as CoreEpiphanySceneRetrieval; -use epiphany_core::EpiphanySceneSource as CoreEpiphanySceneSource; -use epiphany_core::EpiphanySceneStateStatus as CoreEpiphanySceneStateStatus; -use epiphany_core::EpiphanySceneStatusCount as CoreEpiphanySceneStatusCount; -use epiphany_core::EpiphanySceneSubgoal as CoreEpiphanySceneSubgoal; - -pub fn protocol_scene(scene: CoreEpiphanyScene) -> ThreadEpiphanyScene { - ThreadEpiphanyScene { - state_status: match scene.state_status { - CoreEpiphanySceneStateStatus::Missing => ThreadEpiphanySceneStateStatus::Missing, - CoreEpiphanySceneStateStatus::Ready => ThreadEpiphanySceneStateStatus::Ready, - }, - source: match scene.source { - CoreEpiphanySceneSource::Stored => ThreadEpiphanySceneSource::Stored, - CoreEpiphanySceneSource::Live => ThreadEpiphanySceneSource::Live, - }, - revision: scene.revision, - objective: scene.objective, - active_subgoal: scene.active_subgoal.map(protocol_scene_subgoal), - subgoals: scene - .subgoals - .into_iter() - .map(protocol_scene_subgoal) - .collect(), - invariant_status_counts: scene - .invariant_status_counts - .into_iter() - .map(protocol_scene_status_count) - .collect(), - graph: protocol_scene_graph(scene.graph), - retrieval: scene.retrieval.map(protocol_scene_retrieval), - investigation_checkpoint: scene - .investigation_checkpoint - .map(protocol_scene_investigation_checkpoint), - observations: protocol_scene_records(scene.observations), - evidence: protocol_scene_records(scene.evidence), - churn: scene.churn.map(protocol_scene_churn), - available_actions: scene - .available_actions - .into_iter() - .map(protocol_scene_action) - .collect(), - } -} - -pub fn protocol_scene_action(action: CoreEpiphanySceneAction) -> ThreadEpiphanySceneAction { - match action { - CoreEpiphanySceneAction::Index => ThreadEpiphanySceneAction::Index, - CoreEpiphanySceneAction::Retrieve => ThreadEpiphanySceneAction::Retrieve, - CoreEpiphanySceneAction::Distill => ThreadEpiphanySceneAction::Distill, - CoreEpiphanySceneAction::Context => ThreadEpiphanySceneAction::Context, - CoreEpiphanySceneAction::Planning => ThreadEpiphanySceneAction::Planning, - CoreEpiphanySceneAction::GraphQuery => ThreadEpiphanySceneAction::GraphQuery, - CoreEpiphanySceneAction::Jobs => ThreadEpiphanySceneAction::Jobs, - CoreEpiphanySceneAction::Roles => ThreadEpiphanySceneAction::Roles, - CoreEpiphanySceneAction::Coordinator => ThreadEpiphanySceneAction::Coordinator, - CoreEpiphanySceneAction::RoleLaunch => ThreadEpiphanySceneAction::RoleLaunch, - CoreEpiphanySceneAction::RoleResult => ThreadEpiphanySceneAction::RoleResult, - CoreEpiphanySceneAction::RoleAccept => ThreadEpiphanySceneAction::RoleAccept, - CoreEpiphanySceneAction::JobLaunch => ThreadEpiphanySceneAction::JobLaunch, - CoreEpiphanySceneAction::JobInterrupt => ThreadEpiphanySceneAction::JobInterrupt, - CoreEpiphanySceneAction::Freshness => ThreadEpiphanySceneAction::Freshness, - CoreEpiphanySceneAction::Pressure => ThreadEpiphanySceneAction::Pressure, - CoreEpiphanySceneAction::Reorient => ThreadEpiphanySceneAction::Reorient, - CoreEpiphanySceneAction::Crrc => ThreadEpiphanySceneAction::Crrc, - CoreEpiphanySceneAction::ReorientLaunch => ThreadEpiphanySceneAction::ReorientLaunch, - CoreEpiphanySceneAction::ReorientResult => ThreadEpiphanySceneAction::ReorientResult, - CoreEpiphanySceneAction::ReorientAccept => ThreadEpiphanySceneAction::ReorientAccept, - CoreEpiphanySceneAction::Propose => ThreadEpiphanySceneAction::Propose, - CoreEpiphanySceneAction::Promote => ThreadEpiphanySceneAction::Promote, - CoreEpiphanySceneAction::Update => ThreadEpiphanySceneAction::Update, - } -} - -fn protocol_scene_subgoal(subgoal: CoreEpiphanySceneSubgoal) -> ThreadEpiphanySceneSubgoal { - ThreadEpiphanySceneSubgoal { - id: subgoal.id, - title: subgoal.title, - status: subgoal.status, - summary: subgoal.summary, - active: subgoal.active, - } -} - -fn protocol_scene_status_count( - count: CoreEpiphanySceneStatusCount, -) -> ThreadEpiphanySceneStatusCount { - ThreadEpiphanySceneStatusCount { - status: count.status, - count: count.count, - } -} - -fn protocol_scene_graph(graph: CoreEpiphanySceneGraph) -> ThreadEpiphanySceneGraph { - ThreadEpiphanySceneGraph { - architecture_node_count: graph.architecture_node_count, - architecture_edge_count: graph.architecture_edge_count, - dataflow_node_count: graph.dataflow_node_count, - dataflow_edge_count: graph.dataflow_edge_count, - link_count: graph.link_count, - active_node_ids: graph.active_node_ids, - active_edge_ids: graph.active_edge_ids, - open_question_count: graph.open_question_count, - open_gap_count: graph.open_gap_count, - dirty_paths: graph.dirty_paths, - checkpoint_id: graph.checkpoint_id, - checkpoint_summary: graph.checkpoint_summary, - } -} - -fn protocol_scene_retrieval(retrieval: CoreEpiphanySceneRetrieval) -> ThreadEpiphanySceneRetrieval { - ThreadEpiphanySceneRetrieval { - workspace_root: retrieval.workspace_root, - status: retrieval.status, - semantic_available: retrieval.semantic_available, - index_revision: retrieval.index_revision, - indexed_file_count: retrieval.indexed_file_count, - indexed_chunk_count: retrieval.indexed_chunk_count, - shard_count: retrieval.shard_count, - dirty_path_count: retrieval.dirty_path_count, - } -} - -fn protocol_scene_investigation_checkpoint( - checkpoint: CoreEpiphanySceneInvestigationCheckpoint, -) -> ThreadEpiphanySceneInvestigationCheckpoint { - ThreadEpiphanySceneInvestigationCheckpoint { - checkpoint_id: checkpoint.checkpoint_id, - kind: checkpoint.kind, - disposition: checkpoint.disposition, - focus: checkpoint.focus, - summary: checkpoint.summary, - next_action: checkpoint.next_action, - captured_at_turn_id: checkpoint.captured_at_turn_id, - open_question_count: checkpoint.open_question_count, - code_ref_count: checkpoint.code_ref_count, - evidence_count: checkpoint.evidence_count, - } -} - -fn protocol_scene_records(records: CoreEpiphanySceneRecords) -> ThreadEpiphanySceneRecords { - ThreadEpiphanySceneRecords { - total_count: records.total_count, - latest: records - .latest - .into_iter() - .map(protocol_scene_record) - .collect(), - } -} - -fn protocol_scene_record(record: CoreEpiphanySceneRecord) -> ThreadEpiphanySceneRecord { - ThreadEpiphanySceneRecord { - id: record.id, - kind: record.kind, - status: record.status, - summary: record.summary, - code_ref_count: record.code_ref_count, - } -} - -fn protocol_scene_churn(churn: CoreEpiphanySceneChurn) -> ThreadEpiphanySceneChurn { - ThreadEpiphanySceneChurn { - understanding_status: churn.understanding_status, - diff_pressure: churn.diff_pressure, - graph_freshness: churn.graph_freshness, - warning: churn.warning, - unexplained_writes: churn.unexplained_writes, - } -} diff --git a/epiphany-codex-bridge/src/state.rs b/epiphany-codex-bridge/src/state.rs deleted file mode 100644 index 3ef3ca81..00000000 --- a/epiphany-codex-bridge/src/state.rs +++ /dev/null @@ -1,53 +0,0 @@ -use std::fs; -use std::path::Path; -use std::path::PathBuf; - -use epiphany_core::write_thread_state; -use epiphany_state_model::EpiphanyThreadState; -use tracing::warn; - -use crate::retrieve::epiphany_retrieval_state_for_paths; - -pub async fn client_visible_epiphany_state_for_paths( - mut state: EpiphanyThreadState, - workspace_root: &Path, - codex_home: PathBuf, - mirror_thread_id: Option<&str>, -) -> EpiphanyThreadState { - if state.retrieval.is_none() { - state.retrieval = Some( - epiphany_retrieval_state_for_paths(workspace_root.to_path_buf(), codex_home).await, - ); - } - if let Some(thread_id) = mirror_thread_id - && let Err(err) = mirror_thread_state_to_workspace(workspace_root, thread_id, &state) - { - warn!("failed to mirror Epiphany thread state into native store: {err}"); - } - state -} - -pub fn thread_state_store_path(workspace_root: &Path) -> PathBuf { - workspace_root.join("state").join("thread-state.msgpack") -} - -pub fn mirror_thread_state_to_workspace( - workspace_root: &Path, - thread_id: &str, - state: &EpiphanyThreadState, -) -> anyhow::Result { - let store_path = thread_state_store_path(workspace_root); - if let Some(parent) = store_path.parent() { - fs::create_dir_all(parent)?; - } - write_thread_state(&store_path, thread_id, state)?; - Ok(store_path) -} - -pub fn thread_state_mirror_id_from_rollout_path(rollout_path: Option<&Path>) -> String { - rollout_path - .and_then(|path| path.file_stem()) - .and_then(|stem| stem.to_str()) - .map(str::to_string) - .unwrap_or_else(|| "live-thread".to_string()) -} diff --git a/epiphany-codex-bridge/src/view_protocol.rs b/epiphany-codex-bridge/src/view_protocol.rs deleted file mode 100644 index 6956795a..00000000 --- a/epiphany-codex-bridge/src/view_protocol.rs +++ /dev/null @@ -1,550 +0,0 @@ -use std::path::Path; - -use codex_app_server_protocol::*; -use epiphany_core::EPIPHANY_REORIENT_LAUNCH_BINDING_ID; -use epiphany_core::EpiphanyContextParams; -use epiphany_core::EpiphanyGraphQuery; -use epiphany_core::EpiphanyRoleResultRoleId; -use epiphany_core::EpiphanySceneInput; -use epiphany_core::EpiphanyTokenUsageSnapshot; -use epiphany_core::EpiphanyViewLens; -use epiphany_core::derive_scene; -use epiphany_core::epiphany_view_needs_jobs; -use epiphany_core::epiphany_view_needs_pressure; -use epiphany_core::epiphany_view_needs_reorientation_inputs; -use epiphany_core::reorient_finding_already_accepted; -use epiphany_state_model::EpiphanyRetrievalState; -use epiphany_state_model::EpiphanyThreadState; - -use crate::context::derive_epiphany_context; -use crate::context::derive_epiphany_graph_query; -use crate::context::derive_epiphany_planning; -use crate::context_protocol::protocol_context_view; -use crate::context_protocol::protocol_graph_query_view; -use crate::context_protocol::protocol_planning_view; -use crate::coordinator::derive_epiphany_coordinator_status; -use crate::coordinator::map_epiphany_crrc_recommendation; -use crate::coordinator::map_epiphany_roles; -use crate::coordinator::render_epiphany_roles_note; -use crate::coordinator_protocol::protocol_coordinator_view; -use crate::coordinator_protocol::protocol_crrc_recommendation; -use crate::coordinator_protocol::protocol_role_board_lanes; -use crate::cultnet::EpiphanyFreshnessSurface; -use crate::cultnet::EpiphanySurfaceSource; -use crate::jobs::map_epiphany_jobs; -use crate::pressure::derive_epiphany_pressure; -use crate::protocol_edge::protocol_job_from_surface; -use crate::protocol_edge::protocol_pressure_from_core; -use crate::protocol_edge::protocol_reorient_decision; -use crate::protocol_edge::protocol_reorient_finding; -use crate::protocol_edge::protocol_reorient_result_status; -use crate::protocol_edge::protocol_reorient_source; -use crate::protocol_edge::protocol_reorient_state_status; -use crate::protocol_edge::protocol_role_finding; -use crate::protocol_edge::protocol_role_id_from_core; -use crate::protocol_edge::protocol_role_result_status; -use crate::protocol_edge::protocol_roles_source; -use crate::protocol_edge::protocol_view_lens_from_core; -use crate::reorient::EpiphanyFreshnessWatcherSnapshot; -use crate::reorient::derive_epiphany_freshness_view; -use crate::reorient::derive_epiphany_reorient; -use crate::runtime_results::load_core_epiphany_reorient_result_snapshot; -use crate::runtime_results::load_core_epiphany_role_result_snapshot; -use crate::scene::derive_epiphany_scene; -use crate::scene_protocol::protocol_scene; -use crate::scene_protocol::protocol_scene_action; - -pub struct EpiphanyFreshnessResponseInput<'a> { - pub thread_id: String, - pub loaded: bool, - pub state: Option<&'a EpiphanyThreadState>, - pub retrieval_override: Option<&'a EpiphanyRetrievalState>, - pub watcher_snapshot: Option>, -} -pub fn derive_epiphany_freshness_surface( - input: EpiphanyFreshnessResponseInput<'_>, -) -> EpiphanyFreshnessSurface { - let freshness = derive_epiphany_freshness_view( - input.state, - input.retrieval_override, - input.watcher_snapshot, - ); - EpiphanyFreshnessSurface { - thread_id: input.thread_id, - source: if input.loaded { - EpiphanySurfaceSource::Live - } else { - EpiphanySurfaceSource::Stored - }, - state_revision: freshness.state_revision, - retrieval: freshness.retrieval, - graph: freshness.graph, - watcher: freshness.watcher, - } -} - -pub fn map_epiphany_context_response( - thread_id: String, - loaded: bool, - state: Option<&EpiphanyThreadState>, - params: &EpiphanyContextParams, -) -> ThreadEpiphanyContextResponse { - let (state_status, state_revision, context, missing) = - protocol_context_view(derive_epiphany_context(state, params)); - ThreadEpiphanyContextResponse { - thread_id, - source: if loaded { - ThreadEpiphanyContextSource::Live - } else { - ThreadEpiphanyContextSource::Stored - }, - state_status, - state_revision, - context, - missing, - } -} - -pub fn map_epiphany_graph_query_response( - thread_id: String, - loaded: bool, - state: Option<&EpiphanyThreadState>, - query: &EpiphanyGraphQuery, -) -> ThreadEpiphanyGraphQueryResponse { - let (state_status, state_revision, graph, frontier, checkpoint, matched, missing) = - protocol_graph_query_view(derive_epiphany_graph_query(state, query)); - ThreadEpiphanyGraphQueryResponse { - thread_id, - source: if loaded { - ThreadEpiphanyContextSource::Live - } else { - ThreadEpiphanyContextSource::Stored - }, - state_status, - state_revision, - graph, - frontier, - checkpoint, - matched, - missing, - } -} - -pub struct EpiphanyViewResponseInput<'a> { - pub thread_id: String, - pub lenses: Vec, - pub loaded: bool, - pub state: Option<&'a EpiphanyThreadState>, - pub retrieval_override: Option<&'a EpiphanyRetrievalState>, - pub watcher_snapshot: Option>, - pub token_usage_info: Option<&'a EpiphanyTokenUsageSnapshot>, - pub runtime_store_path: Option<&'a Path>, -} - -pub async fn map_epiphany_view_response( - input: EpiphanyViewResponseInput<'_>, -) -> ThreadEpiphanyViewResponse { - let EpiphanyViewResponseInput { - thread_id, - lenses, - loaded, - state, - retrieval_override, - watcher_snapshot, - token_usage_info, - runtime_store_path, - } = input; - - let needs_jobs = epiphany_view_needs_jobs(&lenses); - let needs_reorientation_inputs = epiphany_view_needs_reorientation_inputs(&lenses); - let needs_pressure = epiphany_view_needs_pressure(&lenses); - let core_pressure = needs_pressure.then(|| derive_epiphany_pressure(token_usage_info)); - let pressure = needs_pressure - .then(|| protocol_pressure_from_core(derive_epiphany_pressure(token_usage_info))); - let core_freshness = needs_reorientation_inputs - .then(|| derive_epiphany_freshness_view(state, retrieval_override, watcher_snapshot)); - let (state_revision, core_reorient_state_status, core_reorient_decision) = - if let (Some(freshness), Some(core_pressure)) = - (core_freshness.as_ref(), core_pressure.as_ref()) - { - let (state_status, decision) = derive_epiphany_reorient( - state, - core_pressure, - &freshness.retrieval, - &freshness.graph, - &freshness.watcher, - ); - (freshness.state_revision, state_status, Some(decision)) - } else { - ( - None, - epiphany_core::EpiphanyReorientStateStatus::Missing, - None, - ) - }; - let reorient_state_status = protocol_reorient_state_status(core_reorient_state_status); - let reorient_decision = core_reorient_decision - .clone() - .map(protocol_reorient_decision); - let jobs = if needs_jobs { - map_epiphany_jobs(state, retrieval_override) - } else { - Vec::new() - }; - let reorient_job = jobs - .iter() - .find(|job| job.id == EPIPHANY_REORIENT_LAUNCH_BINDING_ID) - .cloned(); - let reorient_result = if runtime_store_path.is_some() - || lenses.contains(&EpiphanyViewLens::Crrc) - || lenses.contains(&EpiphanyViewLens::Coordinator) - { - load_core_epiphany_reorient_result_snapshot( - state, - runtime_store_path, - EPIPHANY_REORIENT_LAUNCH_BINDING_ID, - ) - .await - } else { - crate::runtime_results::EpiphanyReorientResultSnapshot { - status: epiphany_core::EpiphanyCrrcResultStatus::MissingState, - finding: None, - note: "Reorient result was not requested.".to_string(), - } - }; - let reorient_result_status = protocol_reorient_result_status(reorient_result.status); - let reorient_finding = reorient_result - .finding - .clone() - .map(protocol_reorient_finding); - let reorient_result_note = reorient_result.note.clone(); - let checkpoint_present = state - .and_then(|state| state.investigation_checkpoint.as_ref()) - .is_some(); - let reorient_finding_accepted = reorient_result.finding.as_ref().is_some_and(|finding| { - state.is_some_and(|state| reorient_finding_already_accepted(state, finding)) - }); - let recommendation = if let (Some(core_pressure), Some(decision)) = - (core_pressure.as_ref(), core_reorient_decision.as_ref()) - { - Some(map_epiphany_crrc_recommendation( - loaded, - core_reorient_state_status, - core_pressure, - decision, - reorient_result.status, - checkpoint_present, - reorient_finding.is_some(), - reorient_finding_accepted, - )) - } else { - None - }; - let roles = if let (Some(core_pressure), Some(decision), Some(recommendation)) = ( - core_pressure.as_ref(), - core_reorient_decision.as_ref(), - recommendation.as_ref(), - ) { - Some(map_epiphany_roles( - state, - &jobs, - decision, - core_pressure, - recommendation, - reorient_result.status, - reorient_job.as_ref(), - )) - } else { - None - }; - let coordinator_response = if lenses.contains(&EpiphanyViewLens::Coordinator) { - if let (Some(core_pressure), Some(recommendation), Some(roles)) = ( - core_pressure.as_ref(), - recommendation.as_ref(), - roles.clone(), - ) { - let status = derive_epiphany_coordinator_status( - state, - runtime_store_path, - core_reorient_state_status, - core_pressure, - recommendation, - roles.roles.clone(), - core_reorient_decision.as_ref(), - reorient_result.status, - reorient_result.finding.as_ref(), - checkpoint_present, - ) - .await; - Some(protocol_coordinator_view( - thread_id.clone(), - loaded, - core_reorient_state_status, - state_revision, - status, - roles, - )) - } else { - None - } - } else { - None - }; - - ThreadEpiphanyViewResponse { - thread_id: thread_id.clone(), - scene: lenses.contains(&EpiphanyViewLens::Scene).then(|| { - protocol_scene(derive_epiphany_scene( - state, - loaded, - EPIPHANY_REORIENT_LAUNCH_BINDING_ID, - )) - }), - jobs: if lenses.contains(&EpiphanyViewLens::Jobs) { - jobs.iter() - .cloned() - .map(|job| protocol_job_from_surface(job, None, None)) - .collect() - } else { - Vec::new() - }, - roles: lenses.contains(&EpiphanyViewLens::Roles).then(|| { - let role_board = roles.clone(); - let protocol_roles = role_board - .as_ref() - .map(protocol_role_board_lanes) - .unwrap_or_default(); - ThreadEpiphanyViewRoles { - thread_id: thread_id.clone(), - source: if loaded { - ThreadEpiphanyRolesSource::Live - } else { - ThreadEpiphanyRolesSource::Stored - }, - state_status: reorient_state_status, - state_revision, - note: render_epiphany_roles_note( - role_board - .as_ref() - .map(|role_board| role_board.roles.as_slice()) - .unwrap_or(&[]), - core_reorient_state_status, - recommendation - .as_ref() - .map(|recommendation| recommendation.action) - .unwrap_or(epiphany_core::EpiphanyCrrcAction::Continue), - ), - roles: protocol_roles, - } - }), - planning: lenses.contains(&EpiphanyViewLens::Planning).then(|| { - let (state_status, state_revision, planning, summary) = - protocol_planning_view(derive_epiphany_planning(state)); - ThreadEpiphanyViewPlanning { - thread_id: thread_id.clone(), - source: if loaded { - ThreadEpiphanyContextSource::Live - } else { - ThreadEpiphanyContextSource::Stored - }, - state_status, - state_revision, - planning, - summary, - } - }), - pressure: lenses - .contains(&EpiphanyViewLens::Pressure) - .then(|| pressure.clone()) - .flatten(), - reorient: lenses - .contains(&EpiphanyViewLens::Reorient) - .then(|| { - reorient_decision - .clone() - .map(|decision| ThreadEpiphanyViewReorient { - thread_id: thread_id.clone(), - source: if loaded { - ThreadEpiphanyReorientSource::Live - } else { - ThreadEpiphanyReorientSource::Stored - }, - state_status: reorient_state_status, - state_revision, - decision, - }) - }) - .flatten(), - crrc: lenses - .contains(&EpiphanyViewLens::Crrc) - .then(|| { - let pressure = pressure.clone()?; - let decision = reorient_decision.clone()?; - let recommendation = recommendation.clone()?; - let protocol_recommendation = protocol_crrc_recommendation(recommendation.clone()); - let available_actions = derive_scene(EpiphanySceneInput { - state, - loaded, - reorient_binding_id: EPIPHANY_REORIENT_LAUNCH_BINDING_ID, - }) - .available_actions - .into_iter() - .map(protocol_scene_action) - .collect(); - let note = format!( - "{} Result status: {:?}. {}", - recommendation.reason, reorient_result_status, reorient_result_note - ); - Some(ThreadEpiphanyViewCrrc { - thread_id: thread_id.clone(), - source: if loaded { - ThreadEpiphanyReorientSource::Live - } else { - ThreadEpiphanyReorientSource::Stored - }, - state_status: reorient_state_status, - state_revision, - pressure, - decision, - recommendation: protocol_recommendation, - reorient_binding_id: EPIPHANY_REORIENT_LAUNCH_BINDING_ID.to_string(), - reorient_result_status, - reorient_job: reorient_job - .clone() - .map(|job| protocol_job_from_surface(job, None, None)), - reorient_finding: reorient_finding.clone(), - available_actions, - note, - }) - }) - .flatten(), - coordinator: coordinator_response, - lenses: lenses - .into_iter() - .map(protocol_view_lens_from_core) - .collect(), - } -} - -pub struct EpiphanyRoleResultResponseInput<'a> { - pub thread_id: String, - pub role_id: EpiphanyRoleResultRoleId, - pub source: EpiphanySurfaceSource, - pub binding_id: String, - pub state: Option<&'a EpiphanyThreadState>, - pub runtime_store_path: Option<&'a Path>, -} - -pub async fn map_epiphany_role_result_response( - input: EpiphanyRoleResultResponseInput<'_>, -) -> ThreadEpiphanyRoleResultResponse { - let EpiphanyRoleResultResponseInput { - thread_id, - role_id, - source, - binding_id, - state, - runtime_store_path, - } = input; - let protocol_role_id = protocol_role_id_from_core(role_id); - let protocol_source = protocol_roles_source(source); - let Some(state) = state else { - return ThreadEpiphanyRoleResultResponse { - thread_id, - role_id: protocol_role_id, - source: protocol_source, - state_status: protocol_reorient_state_status( - epiphany_core::EpiphanyReorientStateStatus::Missing, - ), - state_revision: None, - binding_id, - status: ThreadEpiphanyRoleResultStatus::MissingState, - job: None, - finding: None, - note: "No authoritative Epiphany state exists for this thread.".to_string(), - }; - }; - - let job = map_epiphany_jobs(Some(state), None) - .into_iter() - .find(|job| job.id == binding_id) - .map(|job| protocol_job_from_surface(job, None, None)); - let result = - load_core_epiphany_role_result_snapshot(state, runtime_store_path, role_id, &binding_id) - .await; - - ThreadEpiphanyRoleResultResponse { - thread_id, - role_id: protocol_role_id, - source: protocol_source, - state_status: protocol_reorient_state_status( - epiphany_core::EpiphanyReorientStateStatus::Ready, - ), - state_revision: Some(state.revision), - binding_id, - status: protocol_role_result_status(result.status), - job, - finding: result - .finding - .map(|finding| protocol_role_finding(protocol_role_id, finding)), - note: result.note, - } -} - -pub struct EpiphanyReorientResultResponseInput<'a> { - pub thread_id: String, - pub source: EpiphanySurfaceSource, - pub binding_id: String, - pub state: Option<&'a EpiphanyThreadState>, - pub runtime_store_path: Option<&'a Path>, -} - -pub async fn map_epiphany_reorient_result_response( - input: EpiphanyReorientResultResponseInput<'_>, -) -> ThreadEpiphanyReorientResultResponse { - let EpiphanyReorientResultResponseInput { - thread_id, - source, - binding_id, - state, - runtime_store_path, - } = input; - let protocol_source = protocol_reorient_source(source); - let Some(state) = state else { - return ThreadEpiphanyReorientResultResponse { - thread_id, - source: protocol_source, - state_status: protocol_reorient_state_status( - epiphany_core::EpiphanyReorientStateStatus::Missing, - ), - state_revision: None, - binding_id, - status: ThreadEpiphanyReorientResultStatus::MissingState, - job: None, - finding: None, - note: "No authoritative Epiphany state exists for this thread.".to_string(), - }; - }; - - let job = map_epiphany_jobs(Some(state), None) - .into_iter() - .find(|job| job.id == binding_id) - .map(|job| protocol_job_from_surface(job, None, None)); - let result = - load_core_epiphany_reorient_result_snapshot(Some(state), runtime_store_path, &binding_id) - .await; - - ThreadEpiphanyReorientResultResponse { - thread_id, - source: protocol_source, - state_status: protocol_reorient_state_status( - epiphany_core::EpiphanyReorientStateStatus::Ready, - ), - state_revision: Some(state.revision), - binding_id, - status: protocol_reorient_result_status(result.status), - job, - finding: result.finding.map(protocol_reorient_finding), - note: result.note, - } -} diff --git a/epiphany-core/src/bin/epiphany-mvp-status-smoke.rs b/epiphany-core/src/bin/epiphany-mvp-status-smoke.rs deleted file mode 100644 index 94b4a49a..00000000 --- a/epiphany-core/src/bin/epiphany-mvp-status-smoke.rs +++ /dev/null @@ -1,472 +0,0 @@ -use anyhow::Context; -use anyhow::Result; -use anyhow::anyhow; -use serde_json::Value; -use serde_json::json; -use std::env; -use std::fs; -use std::path::{Path, PathBuf}; -use std::process::Command; - -const DEFAULT_APP_SERVER: &str = r"C:\Users\Meta\.cargo-target-codex\debug\codex-app-server.exe"; - -fn main() -> Result<()> { - let args = Args::parse()?; - let result = run_smoke(&args)?; - println!("{}", serde_json::to_string_pretty(&result)?); - Ok(()) -} - -#[derive(Debug)] -struct Args { - app_server: PathBuf, - codex_home: PathBuf, - result: PathBuf, - transcript: PathBuf, - stderr: PathBuf, - rendered: PathBuf, - status_exe: Option, -} - -impl Args { - fn parse() -> Result { - let root = env::current_dir().context("failed to resolve current dir")?; - let mut parsed = Self { - app_server: PathBuf::from(DEFAULT_APP_SERVER), - codex_home: root.join(".epiphany-smoke").join("mvp-status-codex-home"), - result: root - .join(".epiphany-smoke") - .join("mvp-status-smoke-result.json"), - transcript: root - .join(".epiphany-smoke") - .join("mvp-status-smoke-transcript.jsonl"), - stderr: root - .join(".epiphany-smoke") - .join("mvp-status-smoke-server.stderr.log"), - rendered: root - .join(".epiphany-smoke") - .join("mvp-status-smoke-rendered.txt"), - status_exe: None, - }; - let mut args = env::args().skip(1); - while let Some(arg) = args.next() { - match arg.as_str() { - "--app-server" => parsed.app_server = take_path(&mut args, "--app-server")?, - "--codex-home" => parsed.codex_home = take_path(&mut args, "--codex-home")?, - "--result" => parsed.result = take_path(&mut args, "--result")?, - "--transcript" => parsed.transcript = take_path(&mut args, "--transcript")?, - "--stderr" => parsed.stderr = take_path(&mut args, "--stderr")?, - "--rendered" => parsed.rendered = take_path(&mut args, "--rendered")?, - "--status-exe" => parsed.status_exe = Some(take_path(&mut args, "--status-exe")?), - other => return Err(anyhow!("unknown argument: {other}")), - } - } - Ok(parsed) - } -} - -fn run_smoke(args: &Args) -> Result { - let root = env::current_dir().context("failed to resolve current dir")?; - let app_server = absolute_path(&args.app_server)?; - if !app_server.exists() { - return Err(anyhow!( - "codex app-server binary not found: {}", - app_server.display() - )); - } - let codex_home = absolute_path(&args.codex_home)?; - let result_path = absolute_path(&args.result)?; - let transcript_path = absolute_path(&args.transcript)?; - let stderr_path = absolute_path(&args.stderr)?; - let rendered_path = absolute_path(&args.rendered)?; - reset_smoke_paths( - &root, - &[ - codex_home.clone(), - result_path.clone(), - transcript_path.clone(), - stderr_path.clone(), - rendered_path.clone(), - ], - )?; - let status_exe = match &args.status_exe { - Some(path) => absolute_path(path)?, - None => sibling_exe("epiphany-mvp-status")?, - }; - ensure_status_built(&root, &status_exe)?; - - let status = run_status_json( - &root, - &status_exe, - &app_server, - &codex_home, - &result_path, - &transcript_path, - &stderr_path, - )?; - let rendered = run_status_rendered( - &root, - &status_exe, - &app_server, - &codex_home, - &transcript_path.with_file_name("mvp-status-smoke-render-transcript.jsonl"), - &stderr_path.with_file_name("mvp-status-smoke-render-server.stderr.log"), - )?; - if let Some(parent) = rendered_path.parent() { - fs::create_dir_all(parent)?; - } - fs::write(&rendered_path, &rendered)?; - - validate_status(&status, &rendered)?; - let result = json!({ - "threadId": status["threadId"], - "recommendation": status["crrc"]["recommendation"], - "roles": status["roles"], - "roleResults": status["roleResults"], - "planning": status["planning"], - "heartbeat": status["heartbeat"], - "Persona": status["persona"], - "bifrostBridge": status["bifrostBridge"], - "stateStatus": status["scene"]["scene"]["stateStatus"], - "availableActions": status["scene"]["scene"]["availableActions"], - "rendered": rendered, - }); - write_json(&result_path, &result)?; - Ok(result) -} - -fn run_status_json( - root: &Path, - status_exe: &Path, - app_server: &Path, - codex_home: &Path, - result_path: &Path, - transcript_path: &Path, - stderr_path: &Path, -) -> Result { - let output = Command::new(status_exe) - .current_dir(root) - .arg("--app-server") - .arg(app_server) - .arg("--codex-home") - .arg(codex_home) - .arg("--cwd") - .arg(root) - .arg("--transcript") - .arg(transcript_path) - .arg("--stderr") - .arg(stderr_path) - .arg("--result") - .arg(result_path) - .arg("--json") - .output() - .context("failed to run native status JSON command")?; - if !output.status.success() { - return Err(anyhow!( - "native status JSON command failed: {}{}", - String::from_utf8_lossy(&output.stderr), - String::from_utf8_lossy(&output.stdout) - )); - } - serde_json::from_slice(&output.stdout).context("failed to decode native status JSON") -} - -fn run_status_rendered( - root: &Path, - status_exe: &Path, - app_server: &Path, - codex_home: &Path, - transcript_path: &Path, - stderr_path: &Path, -) -> Result { - let output = Command::new(status_exe) - .current_dir(root) - .arg("--app-server") - .arg(app_server) - .arg("--codex-home") - .arg(codex_home) - .arg("--cwd") - .arg(root) - .arg("--transcript") - .arg(transcript_path) - .arg("--stderr") - .arg(stderr_path) - .output() - .context("failed to run native status rendered command")?; - if !output.status.success() { - return Err(anyhow!( - "native status rendered command failed: {}{}", - String::from_utf8_lossy(&output.stderr), - String::from_utf8_lossy(&output.stdout) - )); - } - String::from_utf8(output.stdout).context("rendered status was not UTF-8") -} - -fn validate_status(status: &Value, rendered: &str) -> Result<()> { - require( - status - .pointer("/scene/scene/stateStatus") - .and_then(Value::as_str) - == Some("missing"), - "fresh status smoke should honestly report missing Epiphany state", - )?; - require( - status - .pointer("/crrc/recommendation/action") - .and_then(Value::as_str) - == Some("regatherManually"), - "fresh status smoke should recommend manual regather without state", - )?; - require( - array_contains(status.pointer("/scene/scene/availableActions"), "crrc"), - "status view should expose the CRRC action in the scene", - )?; - require( - array_contains(status.pointer("/scene/scene/availableActions"), "roles"), - "status view should expose the role ownership action in the scene", - )?; - require( - rendered.contains("Epiphany MVP Status") && rendered.contains("Recommendation"), - "rendered status should include the operator view headings", - )?; - require( - rendered.contains("regatherManually"), - "rendered status should expose the CRRC recommendation", - )?; - let lane_ids = status - .pointer("/roles/roles") - .and_then(Value::as_array) - .ok_or_else(|| anyhow!("roles surface missing roles"))? - .iter() - .filter_map(|lane| lane.get("id").and_then(Value::as_str)) - .collect::>(); - require( - lane_ids - == [ - "implementation", - "imagination", - "research", - "modeling", - "verification", - "reorientation", - ], - "roles surface should expose the six MVP role lanes", - )?; - require( - status - .pointer("/roles/note") - .and_then(Value::as_str) - .is_some_and(|note| note.starts_with("Role ownership is derived read-only")), - "roles surface should declare read-only derived ownership", - )?; - require( - status - .pointer("/planning/stateStatus") - .and_then(Value::as_str) - == Some("missing") - && status - .pointer("/planning/summary/captureCount") - .and_then(Value::as_u64) - == Some(0), - "fresh status smoke should expose empty planning state honestly", - )?; - require( - rendered.contains("Planning") && rendered.contains("captures: 0"), - "rendered status should expose the planning section", - )?; - require( - rendered.contains("Role Lanes") && rendered.contains("Verification / Review"), - "rendered status should expose the role lane section", - )?; - require( - rendered.contains("Role Findings") - && status - .pointer("/roleResults/imagination/status") - .and_then(Value::as_str) - == Some("missingState") - && status - .pointer("/roleResults/research/status") - .and_then(Value::as_str) - == Some("missingState") - && status - .pointer("/roleResults/modeling/status") - .and_then(Value::as_str) - == Some("missingState") - && status - .pointer("/roleResults/verification/status") - .and_then(Value::as_str) - == Some("missingState"), - "rendered status should expose fixed role result read-back status", - )?; - require( - status - .pointer("/heartbeat/schema_version") - .and_then(Value::as_str) - == Some("epiphany.agent_heartbeat_status.v0"), - "status view should expose heartbeat initiative status for Aquarium", - )?; - let persona_actions = status - .pointer("/persona/availableActions") - .and_then(Value::as_array); - require( - persona_actions.is_some_and(|items| { - items - .iter() - .any(|item| item.as_str() == Some("personaBubble")) - && items - .iter() - .any(|item| item.as_str() == Some("characterTurn")) - && items - .iter() - .any(|item| item.as_str() == Some("discordPersonaPost")) - && items - .iter() - .any(|item| item.as_str() == Some("redditPersonaPost")) - && items - .iter() - .any(|item| item.as_str() == Some("otherWorldPersonaRequest")) - }), - "status view should expose Persona bubble, character-turn, and Bifrost-routed public mouth actions for Aquarium", - )?; - require( - status - .pointer("/bifrostBridge/owner") - .and_then(Value::as_str) - == Some("Bifrost") - && status - .pointer("/bifrostBridge/privateStateExposed") - .and_then(Value::as_bool) - == Some(false), - "status view should expose Bifrost bridge sight without private state", - )?; - require( - status - .pointer("/bifrostBridge/surfaceCount") - .and_then(Value::as_u64) - .is_some_and(|count| count >= 5), - "Bifrost bridge sight should include the governed external-world surfaces", - )?; - require( - surface_is(status, "github", &["live"]) - && surface_is(status, "other", &["live"]) - && surface_is(status, "patron", &["live"]) - && surface_is(status, "discord", &["live", "prepared"]) - && surface_is(status, "reddit", &["live", "prepared"]), - "Bifrost bridge sight should report GitHub/Other/Patron live and Discord/Reddit live or prepared", - )?; - require( - rendered.contains("Bifrost bridge") - && rendered.contains("github=live") - && rendered.contains("patron=live"), - "rendered status should expose compact Bifrost bridge rows", - )?; - require( - rendered.contains("Heartbeat") && rendered.contains("Persona"), - "rendered status should expose heartbeat and Persona sections", - )?; - Ok(()) -} - -fn reset_smoke_paths(root: &Path, paths: &[PathBuf]) -> Result<()> { - let smoke_root = root.join(".epiphany-smoke").canonicalize().or_else(|_| { - let smoke_root = root.join(".epiphany-smoke"); - fs::create_dir_all(&smoke_root)?; - smoke_root.canonicalize() - })?; - for path in paths { - if !path.exists() { - continue; - } - let resolved = path.canonicalize()?; - if resolved == smoke_root || !resolved.starts_with(&smoke_root) { - return Err(anyhow!( - "refusing to delete non-smoke path: {}", - path.display() - )); - } - if path.is_dir() { - fs::remove_dir_all(path)?; - } else { - fs::remove_file(path)?; - } - } - Ok(()) -} - -fn ensure_status_built(root: &Path, status_exe: &Path) -> Result<()> { - if status_exe.exists() { - return Ok(()); - } - let status = Command::new("cargo") - .current_dir(root) - .arg("build") - .arg("--manifest-path") - .arg(root.join("epiphany-core").join("Cargo.toml")) - .arg("--bin") - .arg("epiphany-mvp-status") - .status() - .context("failed to build epiphany-mvp-status")?; - require( - status.success() && status_exe.exists(), - &format!( - "native status binary was not built: {}", - status_exe.display() - ), - ) -} - -fn sibling_exe(name: &str) -> Result { - let mut exe = env::current_exe().context("failed to resolve current executable")?; - exe.set_file_name(format!("{name}{}", env::consts::EXE_SUFFIX)); - Ok(exe) -} - -fn array_contains(value: Option<&Value>, needle: &str) -> bool { - value - .and_then(Value::as_array) - .is_some_and(|items| items.iter().any(|item| item.as_str() == Some(needle))) -} - -fn surface_is(status: &Value, id: &str, allowed: &[&str]) -> bool { - status - .pointer("/bifrostBridge/surfaces") - .and_then(Value::as_array) - .and_then(|surfaces| { - surfaces - .iter() - .find(|surface| surface.get("id").and_then(Value::as_str) == Some(id)) - }) - .and_then(|surface| surface.get("status").and_then(Value::as_str)) - .is_some_and(|surface_status| allowed.contains(&surface_status)) -} - -fn absolute_path(path: &Path) -> Result { - if path.is_absolute() { - Ok(path.to_path_buf()) - } else { - Ok(env::current_dir()?.join(path)) - } -} - -fn write_json(path: &Path, value: &Value) -> Result<()> { - if let Some(parent) = path.parent() { - fs::create_dir_all(parent)?; - } - fs::write(path, format!("{}\n", serde_json::to_string_pretty(value)?))?; - Ok(()) -} - -fn require(condition: bool, message: &str) -> Result<()> { - if condition { - Ok(()) - } else { - Err(anyhow!("{message}")) - } -} - -fn take_path(args: &mut impl Iterator, name: &str) -> Result { - args.next() - .map(PathBuf::from) - .ok_or_else(|| anyhow!("{name} requires a value")) -} diff --git a/epiphany-core/src/bin/epiphany-mvp-status.rs b/epiphany-core/src/bin/epiphany-mvp-status.rs index a55cf165..939b44d9 100644 --- a/epiphany-core/src/bin/epiphany-mvp-status.rs +++ b/epiphany-core/src/bin/epiphany-mvp-status.rs @@ -47,19 +47,9 @@ use serde_json::Value; use serde_json::json; use std::env; use std::fs; -use std::fs::File; -use std::io::BufRead; -use std::io::BufReader; -use std::io::Write; use std::path::{Path, PathBuf}; -use std::process::{Child, ChildStdin, Command, Stdio}; -use std::sync::Arc; -use std::sync::Mutex; -use std::sync::mpsc; -use std::thread; -use std::time::{Duration, Instant}; +use std::process::Command; -const DEFAULT_APP_SERVER: &str = r"C:\Users\Meta\.cargo-target-codex\debug\codex-app-server.exe"; const DEFAULT_CARGO_TARGET_DIR: &str = r"C:\Users\Meta\.cargo-target-codex"; const DEFAULT_THREAD_STATE_STORE: &str = "state/thread-state.msgpack"; const DEFAULT_RUNTIME_STORE: &str = "state/runtime-spine.msgpack"; @@ -91,15 +81,6 @@ fn main() -> Result<()> { format!("{}\n", serde_json::to_string_pretty(&status)?), ) .with_context(|| format!("failed to write {}", result.display()))?; - if args.source == StatusSource::Codex { - write_transcript_telemetry(&args.transcript, &result.with_extension("telemetry.json"))?; - } - } - if args.source == StatusSource::Codex { - write_transcript_telemetry( - &args.transcript, - &args.transcript.with_extension("telemetry.json"), - )?; } if args.json { println!("{}", serde_json::to_string_pretty(&status)?); @@ -109,17 +90,8 @@ fn main() -> Result<()> { Ok(()) } -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -enum StatusSource { - Native, - Codex, -} - #[derive(Debug)] struct Args { - source: StatusSource, - app_server: PathBuf, - codex_home: PathBuf, thread_id: Option, cwd: PathBuf, thread_state_store: PathBuf, @@ -138,11 +110,6 @@ impl Args { let root = env::current_dir().context("failed to resolve current directory")?; let mut args = env::args().skip(1); let mut parsed = Args { - source: StatusSource::Native, - app_server: PathBuf::from(DEFAULT_APP_SERVER), - codex_home: env::var_os("CODEX_HOME") - .map(PathBuf::from) - .unwrap_or_else(|| home_dir().join(".codex")), thread_id: None, cwd: root.clone(), thread_state_store: PathBuf::from(DEFAULT_THREAD_STATE_STORE), @@ -161,11 +128,6 @@ impl Args { }; while let Some(arg) = args.next() { match arg.as_str() { - "--source" => parsed.source = take_source(&mut args, "--source")?, - "--native" => parsed.source = StatusSource::Native, - "--codex" => parsed.source = StatusSource::Codex, - "--app-server" => parsed.app_server = take_path(&mut args, "--app-server")?, - "--codex-home" => parsed.codex_home = take_path(&mut args, "--codex-home")?, "--thread-id" => parsed.thread_id = Some(take_string(&mut args, "--thread-id")?), "--cwd" => parsed.cwd = take_path(&mut args, "--cwd")?, "--thread-state-store" => { @@ -195,15 +157,9 @@ impl Args { fn run_status(args: &Args) -> Result { if args.interrupt_binding.is_some() { - return match args.source { - StatusSource::Native => run_native_interrupt(args), - StatusSource::Codex => run_codex_interrupt(args), - }; - } - match args.source { - StatusSource::Native => run_native_status(args), - StatusSource::Codex => run_codex_status(args), + return run_native_interrupt(args); } + run_native_status(args) } fn run_native_interrupt(args: &Args) -> Result { @@ -246,52 +202,6 @@ fn run_native_interrupt(args: &Args) -> Result { })) } -fn run_codex_interrupt(args: &Args) -> Result { - if args.source != StatusSource::Codex { - return Err(anyhow!( - "--interrupt-binding requires Codex/app-server status source" - )); - } - let thread_id = args - .thread_id - .as_ref() - .ok_or_else(|| anyhow!("--interrupt-binding requires --thread-id"))?; - let binding_id = args - .interrupt_binding - .as_ref() - .ok_or_else(|| anyhow!("--interrupt-binding requires a binding id"))?; - let app_server = absolute_path(&args.app_server)?; - let codex_home = absolute_path(&args.codex_home)?; - let transcript = absolute_path(&args.transcript)?; - let stderr = absolute_path(&args.stderr)?; - let mut client = AppServerClient::start(&app_server, &codex_home, &transcript, &stderr)?; - client.send( - "initialize", - Some(json!({ - "clientInfo": { - "name": "epiphany-mvp-status", - "title": "Epiphany MVP Status", - "version": "0.1.0", - }, - "capabilities": {"experimentalApi": true}, - })), - true, - )?; - client.send("initialized", None, false)?; - if !args.ephemeral { - client.send("thread/resume", Some(json!({"threadId": thread_id})), true)?; - } - client.send( - "thread/epiphany/jobInterrupt", - Some(json!({ - "threadId": thread_id, - "bindingId": binding_id, - "reason": args.interrupt_reason, - })), - true, - ) -} - fn run_native_status(args: &Args) -> Result { let cwd = absolute_path(&args.cwd)?; let store_path = absolute_path(&args.thread_state_store)?; @@ -571,123 +481,6 @@ fn run_native_status(args: &Args) -> Result { Ok(sanitize_for_operator(status)) } -fn run_codex_status(args: &Args) -> Result { - let app_server = absolute_path(&args.app_server)?; - let codex_home = absolute_path(&args.codex_home)?; - let cwd = absolute_path(&args.cwd)?; - let transcript = absolute_path(&args.transcript)?; - let stderr = absolute_path(&args.stderr)?; - - if !app_server.exists() { - return Err(anyhow!( - "codex app-server binary not found: {}", - app_server.display() - )); - } - fs::create_dir_all(&codex_home) - .with_context(|| format!("failed to create {}", codex_home.display()))?; - let mut client = AppServerClient::start(&app_server, &codex_home, &transcript, &stderr)?; - client.send( - "initialize", - Some(json!({ - "clientInfo": { - "name": "epiphany-mvp-status", - "title": "Epiphany MVP Status", - "version": "0.1.0", - }, - "capabilities": {"experimentalApi": true}, - })), - true, - )?; - client.send("initialized", None, false)?; - - let thread_id = if let Some(thread_id) = &args.thread_id { - if !args.ephemeral { - client.send("thread/resume", Some(json!({"threadId": thread_id})), true)?; - } - thread_id.clone() - } else { - let started = client.send( - "thread/start", - Some(json!({"cwd": cwd, "ephemeral": args.ephemeral})), - true, - )?; - started["thread"]["id"] - .as_str() - .ok_or_else(|| anyhow!("thread/start returned no thread id"))? - .to_string() - }; - - let read = client.send( - "thread/read", - Some(json!({"threadId": thread_id, "includeTurns": false})), - true, - )?; - let view = client.send( - "thread/epiphany/view", - Some(json!({"threadId": thread_id, "lenses": ["scene", "pressure", "jobs", "roles", "planning", "reorient", "crrc", "coordinator"]})), - true, - )?; - let scene = json!({ - "threadId": thread_id, - "scene": view.get("scene").cloned().unwrap_or_else(|| json!(null)), - }); - let pressure = json!({ - "threadId": thread_id, - "source": "live", - "pressure": view.get("pressure").cloned().unwrap_or_else(|| json!(null)), - }); - let reorient = view.get("reorient").cloned().unwrap_or_else(|| json!(null)); - let jobs = json!({ - "threadId": thread_id, - "source": "live", - "jobs": view.get("jobs").cloned().unwrap_or_else(|| json!([])), - }); - let roles = view.get("roles").cloned().unwrap_or_else(|| json!(null)); - let planning = view.get("planning").cloned().unwrap_or_else(|| json!(null)); - let role_results = json!({ - "imagination": client.send("thread/epiphany/roleResult", Some(json!({"threadId": thread_id, "roleId": "imagination"})), true)?, - "research": client.send("thread/epiphany/roleResult", Some(json!({"threadId": thread_id, "roleId": "research"})), true)?, - "modeling": client.send("thread/epiphany/roleResult", Some(json!({"threadId": thread_id, "roleId": "modeling"})), true)?, - "verification": client.send("thread/epiphany/roleResult", Some(json!({"threadId": thread_id, "roleId": "verification"})), true)?, - }); - let reorient_result = client.send( - "thread/epiphany/reorientResult", - Some(json!({"threadId": thread_id})), - true, - )?; - let crrc = view.get("crrc").cloned().unwrap_or_else(|| json!(null)); - let coordinator = view - .get("coordinator") - .cloned() - .unwrap_or_else(|| json!(null)); - let runtime_store_path = absolute_path(&args.runtime_store)?; - let tool_invocations = native_tool_invocation_surface(&runtime_store_path)?; - let root = env::current_dir().context("failed to resolve current directory")?; - let native_aux = native_auxiliary_status(&root)?; - let status = json!({ - "threadId": thread_id, - "read": read, - "view": view, - "scene": scene, - "pressure": pressure, - "reorient": reorient, - "jobs": jobs, - "roles": roles, - "planning": planning, - "roleResults": role_results, - "reorientResult": reorient_result, - "crrc": crrc, - "coordinator": coordinator, - "tools": tool_invocations, - "heartbeat": native_aux.heartbeat, - "persona": native_aux.persona, - "bifrostBridge": native_aux.bifrost_bridge, - "voidMemory": native_aux.void_memory, - }); - Ok(sanitize_for_operator(status)) -} - struct NativeAuxiliaryStatus { heartbeat: Value, persona: Value, @@ -1293,262 +1086,6 @@ fn role_job_status(status: epiphany_core::EpiphanyJobStatus) -> EpiphanyRoleBoar } } -pub struct AppServerClient { - child: Child, - stdin: ChildStdin, - rx: mpsc::Receiver, - transcript: Arc>, - notifications: Arc>>, - next_id: u64, -} - -impl AppServerClient { - pub fn start( - app_server: &Path, - codex_home: &Path, - transcript_path: &Path, - stderr_path: &Path, - ) -> Result { - if let Some(parent) = transcript_path.parent() { - fs::create_dir_all(parent) - .with_context(|| format!("failed to create {}", parent.display()))?; - } - if let Some(parent) = stderr_path.parent() { - fs::create_dir_all(parent) - .with_context(|| format!("failed to create {}", parent.display()))?; - } - let transcript = Arc::new(Mutex::new( - File::create(transcript_path) - .with_context(|| format!("failed to create {}", transcript_path.display()))?, - )); - let stderr_file = Arc::new(Mutex::new( - File::create(stderr_path) - .with_context(|| format!("failed to create {}", stderr_path.display()))?, - )); - let mut command = Command::new(app_server); - command - .current_dir( - env::current_dir()? - .join("vendor") - .join("codex") - .join("codex-rs"), - ) - .env("CODEX_HOME", codex_home) - .env( - "CARGO_TARGET_DIR", - env::var("CARGO_TARGET_DIR") - .unwrap_or_else(|_| DEFAULT_CARGO_TARGET_DIR.to_string()), - ) - .stdin(Stdio::piped()) - .stdout(Stdio::piped()) - .stderr(Stdio::piped()); - let mut child = command - .spawn() - .context("failed to spawn codex app-server")?; - let stdin = child - .stdin - .take() - .ok_or_else(|| anyhow!("app-server stdin unavailable"))?; - let stdout = child - .stdout - .take() - .ok_or_else(|| anyhow!("app-server stdout unavailable"))?; - let stderr = child - .stderr - .take() - .ok_or_else(|| anyhow!("app-server stderr unavailable"))?; - let (tx, rx) = mpsc::channel(); - let transcript_for_stdout = Arc::clone(&transcript); - let notifications = Arc::new(Mutex::new(Vec::new())); - let notifications_for_stdout = Arc::clone(¬ifications); - thread::spawn(move || { - for line in BufReader::new(stdout).lines().map_while(Result::ok) { - if line.trim().is_empty() { - continue; - } - let message = serde_json::from_str::(&line).unwrap_or_else( - |error| json!({"_decode_error": error.to_string(), "raw": line}), - ); - record(&transcript_for_stdout, "received", &message); - if message.get("method").is_some() - && message.get("id").is_none() - && let Ok(mut notifications) = notifications_for_stdout.lock() - { - notifications.push(message.clone()); - } - let _ = tx.send(message); - } - }); - thread::spawn(move || { - for line in BufReader::new(stderr).lines().map_while(Result::ok) { - if let Ok(mut file) = stderr_file.lock() { - let _ = writeln!(file, "{line}"); - } - } - }); - Ok(Self { - child, - stdin, - rx, - transcript, - notifications, - next_id: 1, - }) - } - - pub fn send( - &mut self, - method: &str, - params: Option, - expect_response: bool, - ) -> Result { - let mut message = serde_json::Map::new(); - message.insert("method".to_string(), json!(method)); - let request_id = if expect_response { - let id = self.next_id; - self.next_id += 1; - message.insert("id".to_string(), json!(id)); - Some(id) - } else { - None - }; - if let Some(params) = params { - message.insert("params".to_string(), params); - } - let message = Value::Object(message); - record(&self.transcript, "sent", &message); - writeln!( - self.stdin, - "{}", - serde_json::to_string(&message).context("failed to encode request")? - ) - .context("failed to write app-server request")?; - self.stdin - .flush() - .context("failed to flush app-server stdin")?; - let Some(request_id) = request_id else { - return Ok(Value::Null); - }; - self.wait_for(request_id) - } - - fn wait_for(&mut self, request_id: u64) -> Result { - let deadline = Instant::now() + Duration::from_secs(45); - while Instant::now() < deadline { - if let Some(status) = self.child.try_wait()? { - return Err(anyhow!( - "app-server exited with {} before response {}", - status, - request_id - )); - } - match self.rx.recv_timeout(Duration::from_millis(500)) { - Ok(message) => { - if message.get("id").and_then(Value::as_u64) != Some(request_id) { - continue; - } - if let Some(error) = message.get("error") { - return Err(anyhow!("request {request_id} failed: {error}")); - } - let result = message - .get("result") - .cloned() - .ok_or_else(|| anyhow!("request {request_id} returned no result"))?; - if !result.is_object() { - return Err(anyhow!( - "request {request_id} returned non-object result: {result}" - )); - } - return Ok(result); - } - Err(mpsc::RecvTimeoutError::Timeout) => {} - Err(error) => return Err(anyhow!("app-server response channel closed: {error}")), - } - } - Err(anyhow!("timed out waiting for response {request_id}")) - } - - pub fn notification_count(&self, method: &str, start_index: usize) -> usize { - self.notifications - .lock() - .ok() - .map(|notifications| { - notifications - .iter() - .skip(start_index) - .filter(|message| message.get("method").and_then(Value::as_str) == Some(method)) - .count() - }) - .unwrap_or(0) - } - - pub fn notification_len(&self) -> usize { - self.notifications - .lock() - .map(|notifications| notifications.len()) - .unwrap_or(0) - } - - pub fn require_no_notification( - &mut self, - method: &str, - start_index: usize, - timeout: Duration, - ) -> Result<()> { - let deadline = Instant::now() + timeout; - while Instant::now() < deadline { - if let Some(status) = self.child.try_wait()? { - return Err(anyhow!( - "app-server exited with {} while checking notification {}", - status, - method - )); - } - if self.notification_count(method, start_index) > 0 { - return Err(anyhow!("unexpected notification {method}")); - } - thread::sleep(Duration::from_millis(100)); - } - Ok(()) - } - - pub fn wait_for_notification( - &mut self, - method: &str, - start_index: usize, - timeout: Duration, - ) -> Result { - let deadline = Instant::now() + timeout; - while Instant::now() < deadline { - if let Some(status) = self.child.try_wait()? { - return Err(anyhow!( - "app-server exited with {} before notification {}", - status, - method - )); - } - if let Ok(notifications) = self.notifications.lock() - && let Some(message) = notifications - .iter() - .skip(start_index) - .find(|message| message.get("method").and_then(Value::as_str) == Some(method)) - { - return Ok(message.clone()); - } - thread::sleep(Duration::from_millis(100)); - } - Err(anyhow!("timed out waiting for notification {method}")) - } -} - -impl Drop for AppServerClient { - fn drop(&mut self) { - let _ = self.stdin.flush(); - let _ = self.child.kill(); - let _ = self.child.wait(); - } -} - pub fn render_status(status: &Value) -> String { let scene = &status["scene"]["scene"]; let pressure = &status["pressure"]["pressure"]; @@ -1825,18 +1362,6 @@ fn sealed_long_text(key: &str, text: &str) -> Value { }) } -pub fn write_transcript_telemetry(transcript: &Path, output: &Path) -> Result<()> { - let _ = native_json( - "epiphany-agent-telemetry", - &[ - &transcript.to_string_lossy(), - "--output", - &output.to_string_lossy(), - ], - )?; - Ok(()) -} - pub fn native_json(bin_name: &str, args: &[&str]) -> Result { let sibling = env::current_exe() .ok() @@ -1876,12 +1401,6 @@ pub fn native_json(bin_name: &str, args: &[&str]) -> Result { .with_context(|| format!("{bin_name} returned invalid JSON")) } -fn record(transcript: &Arc>, kind: &str, payload: &Value) { - if let Ok(mut file) = transcript.lock() { - let _ = writeln!(file, "{}", json!({kind: payload})); - } -} - fn take_string(args: &mut impl Iterator, name: &str) -> Result { args.next() .ok_or_else(|| anyhow!("{name} requires a value")) @@ -1891,23 +1410,6 @@ fn take_path(args: &mut impl Iterator, name: &str) -> Result, name: &str) -> Result { - match take_string(args, name)?.as_str() { - "native" => Ok(StatusSource::Native), - "codex" => Ok(StatusSource::Codex), - other => Err(anyhow!( - "{name} must be 'native' or 'codex', received {other:?}" - )), - } -} - -fn home_dir() -> PathBuf { - env::var_os("USERPROFILE") - .or_else(|| env::var_os("HOME")) - .map(PathBuf::from) - .unwrap_or_else(|| PathBuf::from(".")) -} - #[cfg(test)] mod native_interrupt_tests { use super::*; @@ -1937,9 +1439,6 @@ mod native_interrupt_tests { None, )?; let args = Args { - source: StatusSource::Native, - app_server: PathBuf::new(), - codex_home: PathBuf::new(), thread_id: Some("thread-1".to_string()), cwd: temp.path().to_path_buf(), thread_state_store: store.clone(), diff --git a/epiphany-core/src/bin/epiphany-phase6-context-smoke.rs b/epiphany-core/src/bin/epiphany-phase6-context-smoke.rs deleted file mode 100644 index 0c4b0b65..00000000 --- a/epiphany-core/src/bin/epiphany-phase6-context-smoke.rs +++ /dev/null @@ -1,529 +0,0 @@ -use anyhow::Context; -use anyhow::Result; -use anyhow::anyhow; -use serde_json::Value; -use serde_json::json; -use std::env; -use std::fs; -use std::path::{Path, PathBuf}; -use std::time::Duration; - -#[allow(dead_code)] -#[path = "epiphany-mvp-status.rs"] -mod status_cli; - -const DEFAULT_APP_SERVER: &str = r"C:\Users\Meta\.cargo-target-codex\debug\codex-app-server.exe"; - -fn main() -> Result<()> { - let args = Args::parse()?; - let result = run_smoke(&args)?; - println!("{}", serde_json::to_string_pretty(&result)?); - Ok(()) -} - -#[derive(Debug)] -struct Args { - app_server: PathBuf, - codex_home: PathBuf, - result: PathBuf, - transcript: PathBuf, - stderr: PathBuf, -} - -impl Args { - fn parse() -> Result { - let root = env::current_dir().context("failed to resolve current dir")?; - let mut parsed = Self { - app_server: PathBuf::from(DEFAULT_APP_SERVER), - codex_home: root - .join(".epiphany-smoke") - .join("phase6-context-codex-home"), - result: root - .join(".epiphany-smoke") - .join("phase6-context-smoke-result.json"), - transcript: root - .join(".epiphany-smoke") - .join("phase6-context-smoke-transcript.jsonl"), - stderr: root - .join(".epiphany-smoke") - .join("phase6-context-smoke-server.stderr.log"), - }; - let mut args = env::args().skip(1); - while let Some(arg) = args.next() { - match arg.as_str() { - "--app-server" => parsed.app_server = take_path(&mut args, "--app-server")?, - "--codex-home" => parsed.codex_home = take_path(&mut args, "--codex-home")?, - "--result" => parsed.result = take_path(&mut args, "--result")?, - "--transcript" => parsed.transcript = take_path(&mut args, "--transcript")?, - "--stderr" => parsed.stderr = take_path(&mut args, "--stderr")?, - other => return Err(anyhow!("unknown argument: {other}")), - } - } - Ok(parsed) - } -} - -fn run_smoke(args: &Args) -> Result { - let root = env::current_dir().context("failed to resolve current dir")?; - let app_server = status_cli::absolute_path(&args.app_server)?; - if !app_server.exists() { - return Err(anyhow!( - "codex app-server binary not found: {}", - app_server.display() - )); - } - let codex_home = status_cli::absolute_path(&args.codex_home)?; - let result_path = status_cli::absolute_path(&args.result)?; - let transcript_path = status_cli::absolute_path(&args.transcript)?; - let stderr_path = status_cli::absolute_path(&args.stderr)?; - reset_smoke_paths( - &root, - &[ - codex_home.clone(), - result_path.clone(), - transcript_path.clone(), - stderr_path.clone(), - ], - )?; - fs::create_dir_all(&codex_home) - .with_context(|| format!("failed to create {}", codex_home.display()))?; - - let mut client = status_cli::AppServerClient::start( - &app_server, - &codex_home, - &transcript_path, - &stderr_path, - )?; - client.send( - "initialize", - Some(json!({ - "clientInfo": { - "name": "epiphany-phase6-context-smoke", - "title": "Epiphany Phase 6 Context Smoke", - "version": "0.1.0", - }, - "capabilities": {"experimentalApi": true}, - })), - true, - )?; - client.send("initialized", None, false)?; - let started = client.send( - "thread/start", - Some(json!({"cwd": root.join("epiphany-core"), "ephemeral": true})), - true, - )?; - let thread_id = started - .pointer("/thread/id") - .and_then(Value::as_str) - .ok_or_else(|| anyhow!("thread/start response missing thread.id"))? - .to_string(); - - let missing_notification_start = client.notification_len(); - let missing_response = client.send( - "thread/epiphany/context", - Some(json!({"threadId": thread_id, "graphNodeIds": ["context-surface"]})), - true, - )?; - require( - missing_response.get("threadId").and_then(Value::as_str) == Some(&thread_id), - "context response should echo thread id", - )?; - assert_missing_context(&missing_response)?; - client.require_no_notification( - "thread/epiphany/stateUpdated", - missing_notification_start, - Duration::from_secs(1), - )?; - - let update_notification_start = client.notification_len(); - let update = client.send( - "thread/epiphany/update", - Some(json!({ - "threadId": thread_id, - "expectedRevision": 0, - "patch": context_patch(), - })), - true, - )?; - require( - update.get("revision").and_then(Value::as_u64) == Some(1), - "context smoke patch should advance revision to 1", - )?; - client.wait_for_notification( - "thread/epiphany/stateUpdated", - update_notification_start, - Duration::from_secs(10), - )?; - - let context_notification_start = client.notification_len(); - let ready_response = client.send( - "thread/epiphany/context", - Some(json!({ - "threadId": thread_id, - "graphNodeIds": ["missing-node"], - "graphEdgeIds": ["missing-edge"], - "observationIds": ["obs-context", "missing-observation"], - "evidenceIds": ["ev-context-extra", "missing-evidence"], - })), - true, - )?; - assert_ready_context(&ready_response)?; - client.require_no_notification( - "thread/epiphany/stateUpdated", - context_notification_start, - Duration::from_secs(1), - )?; - - let final_read = client.send( - "thread/read", - Some(json!({"threadId": thread_id, "includeTurns": false})), - true, - )?; - require( - final_read - .pointer("/thread/epiphanyState/revision") - .and_then(Value::as_u64) - == Some(1), - "context reflection should not mutate state revision", - )?; - - let result = json!({ - "threadId": thread_id, - "codexHome": codex_home, - "missingStateStatus": missing_response["stateStatus"], - "readyStateStatus": ready_response["stateStatus"], - "readyRevision": ready_response["stateRevision"], - "architectureNodeIds": ids(&ready_response["context"]["graph"]["architectureNodes"]), - "investigationCheckpointId": ready_response["context"]["investigationCheckpoint"]["checkpoint_id"], - "investigationDisposition": ready_response["context"]["investigationCheckpoint"]["disposition"], - "evidenceIds": ids(&ready_response["context"]["evidence"]), - "contextNotificationCount": client.notification_count( - "thread/epiphany/stateUpdated", - context_notification_start, - ), - "finalReadRevision": final_read["thread"]["epiphanyState"]["revision"], - }); - write_json(&result_path, &result)?; - Ok(result) -} - -fn context_patch() -> Value { - let code_ref = json!({ - "path": "app-server/src/codex_message_processor.rs", - "start_line": 10791, - "end_line": 10989, - "symbol": "map_epiphany_context" - }); - json!({ - "objective": "Expose a read-only Epiphany context shard without returning the full state.", - "activeSubgoalId": "phase6-context-smoke", - "investigationCheckpoint": { - "checkpoint_id": "phase6-context-investigation", - "kind": "source_gathering", - "disposition": "regather_required", - "focus": "Make stale planning obvious when context is re-read after compaction.", - "summary": "Context reflection should expose the full durable checkpoint packet.", - "next_action": "Re-gather source before editing if the packet no longer matches reality.", - "captured_at_turn_id": "turn-phase6-context", - "open_questions": ["How much checkpoint detail belongs in scene versus context?"], - "code_refs": [code_ref.clone()], - "evidence_ids": ["ev-context-linked"] - }, - "subgoals": [{ - "id": "phase6-context-smoke", - "title": "Live-smoke context shard reflection", - "status": "active", - "summary": "The app-server context surface should return targeted graph/evidence state." - }], - "graphs": { - "architecture": { - "nodes": [{ - "id": "context-surface", - "title": "Context shard surface", - "purpose": "Return bounded state context for clients without becoming a writer.", - "code_refs": [code_ref.clone()] - }], - "edges": [{ - "id": "context-edge", - "source_id": "context-surface", - "target_id": "context-surface", - "kind": "reflects", - "code_refs": [code_ref.clone()] - }] - }, - "dataflow": { - "nodes": [{ - "id": "typed-state", - "title": "Typed Epiphany state", - "purpose": "Remain authoritative while context shards reflect a slice." - }] - }, - "links": [{ - "dataflow_node_id": "typed-state", - "architecture_node_id": "context-surface", - "relationship": "bounded-reflection" - }] - }, - "graphFrontier": { - "active_node_ids": ["context-surface"], - "active_edge_ids": ["context-edge"] - }, - "graphCheckpoint": { - "checkpoint_id": "phase6-context-smoke", - "graph_revision": 1, - "summary": "Context shard reflection is the active Phase 6 smoke target.", - "frontier_node_ids": ["context-surface"] - }, - "evidence": [ - { - "id": "ev-context-linked", - "kind": "smoke-test", - "status": "ok", - "summary": "Context smoke linked evidence should come along with the observation.", - "code_refs": [code_ref.clone()] - }, - { - "id": "ev-context-extra", - "kind": "review", - "status": "ok", - "summary": "Context smoke direct evidence should be returned when requested.", - "code_refs": [code_ref] - } - ], - "observations": [{ - "id": "obs-context", - "summary": "Context smoke observation should be selected by id.", - "source_kind": "smoke", - "status": "ok", - "code_refs": [{ - "path": "app-server/src/codex_message_processor.rs", - "start_line": 10791, - "end_line": 10989, - "symbol": "map_epiphany_context" - }], - "evidence_ids": ["ev-context-linked"] - }] - }) -} - -fn assert_missing_context(response: &Value) -> Result<()> { - require( - response.get("source").and_then(Value::as_str) == Some("live"), - "missing context should report live source", - )?; - require( - response.get("stateStatus").and_then(Value::as_str) == Some("missing"), - "missing context should report missing state", - )?; - require( - response.get("stateRevision").is_none(), - "missing context should not invent a revision", - )?; - require( - response.pointer("/context/graph") == Some(&json!({})), - "missing context should not invent graph records", - )?; - require( - string_array_eq( - response - .pointer("/missing/graphNodeIds") - .and_then(Value::as_array), - &["context-surface"], - ), - "missing context should echo requested missing node ids", - ) -} - -fn assert_ready_context(response: &Value) -> Result<()> { - require( - response.get("source").and_then(Value::as_str) == Some("live"), - "ready context should report live source", - )?; - require( - response.get("stateStatus").and_then(Value::as_str) == Some("ready"), - "ready context should report ready state", - )?; - require( - response.get("stateRevision").and_then(Value::as_u64) == Some(1), - "ready context should preserve state revision identity", - )?; - require( - ids_eq( - response - .pointer("/context/graph/architectureNodes") - .and_then(Value::as_array), - &["context-surface"], - ), - "context should include active frontier architecture node", - )?; - require( - ids_eq( - response - .pointer("/context/graph/architectureEdges") - .and_then(Value::as_array), - &["context-edge"], - ), - "context should include active frontier architecture edge", - )?; - require( - response - .pointer("/context/graph/links/0/architecture_node_id") - .and_then(Value::as_str) - == Some("context-surface"), - "context should include links touching selected graph nodes", - )?; - require( - string_array_eq( - response - .pointer("/context/frontier/active_node_ids") - .and_then(Value::as_array), - &["context-surface"], - ), - "context should include frontier when active frontier is requested by default", - )?; - require( - response - .pointer("/context/checkpoint/checkpoint_id") - .and_then(Value::as_str) - == Some("phase6-context-smoke"), - "context should expose the current graph checkpoint", - )?; - require( - response - .pointer("/context/investigationCheckpoint/checkpoint_id") - .and_then(Value::as_str) - == Some("phase6-context-investigation"), - "context should expose the investigation checkpoint id", - )?; - require( - response - .pointer("/context/investigationCheckpoint/disposition") - .and_then(Value::as_str) - == Some("regather_required"), - "context should expose the checkpoint disposition", - )?; - require( - ids_eq( - response - .pointer("/context/observations") - .and_then(Value::as_array), - &["obs-context"], - ), - "context should include requested observation", - )?; - require( - ids_eq( - response - .pointer("/context/evidence") - .and_then(Value::as_array), - &["ev-context-linked", "ev-context-extra"], - ), - "context should include linked and directly requested evidence", - )?; - require( - string_array_eq( - response - .pointer("/missing/graphNodeIds") - .and_then(Value::as_array), - &["missing-node"], - ) && string_array_eq( - response - .pointer("/missing/graphEdgeIds") - .and_then(Value::as_array), - &["missing-edge"], - ) && string_array_eq( - response - .pointer("/missing/observationIds") - .and_then(Value::as_array), - &["missing-observation"], - ) && string_array_eq( - response - .pointer("/missing/evidenceIds") - .and_then(Value::as_array), - &["missing-evidence"], - ), - "context should report unresolved requested ids", - ) -} - -fn ids(value: &Value) -> Value { - json!( - value - .as_array() - .map(|items| { - items - .iter() - .filter_map(|item| item.get("id").and_then(Value::as_str)) - .collect::>() - }) - .unwrap_or_default() - ) -} - -fn ids_eq(values: Option<&Vec>, expected: &[&str]) -> bool { - values.is_some_and(|values| { - values.len() == expected.len() - && values - .iter() - .zip(expected) - .all(|(value, expected)| value.get("id").and_then(Value::as_str) == Some(*expected)) - }) -} - -fn string_array_eq(values: Option<&Vec>, expected: &[&str]) -> bool { - values.is_some_and(|values| { - values.len() == expected.len() - && values - .iter() - .zip(expected) - .all(|(value, expected)| value.as_str() == Some(*expected)) - }) -} - -fn reset_smoke_paths(root: &Path, paths: &[PathBuf]) -> Result<()> { - let smoke_root = root.join(".epiphany-smoke").canonicalize().or_else(|_| { - let smoke_root = root.join(".epiphany-smoke"); - fs::create_dir_all(&smoke_root)?; - smoke_root.canonicalize() - })?; - for path in paths { - if !path.exists() { - continue; - } - let resolved = path.canonicalize()?; - if resolved == smoke_root || !resolved.starts_with(&smoke_root) { - return Err(anyhow!( - "refusing to delete non-smoke path: {}", - path.display() - )); - } - if path.is_dir() { - fs::remove_dir_all(path)?; - } else { - fs::remove_file(path)?; - } - } - Ok(()) -} - -fn write_json(path: &Path, value: &Value) -> Result<()> { - if let Some(parent) = path.parent() { - fs::create_dir_all(parent)?; - } - fs::write(path, format!("{}\n", serde_json::to_string_pretty(value)?))?; - Ok(()) -} - -fn require(condition: bool, message: &str) -> Result<()> { - if condition { - Ok(()) - } else { - Err(anyhow!("{message}")) - } -} - -fn take_path(args: &mut impl Iterator, name: &str) -> Result { - args.next() - .map(PathBuf::from) - .ok_or_else(|| anyhow!("{name} requires a value")) -} diff --git a/epiphany-core/src/bin/epiphany-phase6-freshness-smoke.rs b/epiphany-core/src/bin/epiphany-phase6-freshness-smoke.rs deleted file mode 100644 index 36bb6124..00000000 --- a/epiphany-core/src/bin/epiphany-phase6-freshness-smoke.rs +++ /dev/null @@ -1,389 +0,0 @@ -use anyhow::Context; -use anyhow::Result; -use anyhow::anyhow; -use serde_json::Value; -use serde_json::json; -use std::env; -use std::fs; -use std::path::{Path, PathBuf}; -use std::time::Duration; - -#[allow(dead_code)] -#[path = "epiphany-mvp-status.rs"] -mod status_cli; - -const DEFAULT_APP_SERVER: &str = r"C:\Users\Meta\.cargo-target-codex\debug\codex-app-server.exe"; - -fn main() -> Result<()> { - let args = Args::parse()?; - let result = run_smoke(&args)?; - println!("{}", serde_json::to_string_pretty(&result)?); - Ok(()) -} - -#[derive(Debug)] -struct Args { - app_server: PathBuf, - codex_home: PathBuf, - result: PathBuf, - transcript: PathBuf, - stderr: PathBuf, -} - -impl Args { - fn parse() -> Result { - let root = env::current_dir().context("failed to resolve current dir")?; - let mut parsed = Self { - app_server: PathBuf::from(DEFAULT_APP_SERVER), - codex_home: root - .join(".epiphany-smoke") - .join("phase6-freshness-codex-home"), - result: root - .join(".epiphany-smoke") - .join("phase6-freshness-smoke-result.json"), - transcript: root - .join(".epiphany-smoke") - .join("phase6-freshness-smoke-transcript.jsonl"), - stderr: root - .join(".epiphany-smoke") - .join("phase6-freshness-smoke-server.stderr.log"), - }; - let mut args = env::args().skip(1); - while let Some(arg) = args.next() { - match arg.as_str() { - "--app-server" => parsed.app_server = take_path(&mut args, "--app-server")?, - "--codex-home" => parsed.codex_home = take_path(&mut args, "--codex-home")?, - "--result" => parsed.result = take_path(&mut args, "--result")?, - "--transcript" => parsed.transcript = take_path(&mut args, "--transcript")?, - "--stderr" => parsed.stderr = take_path(&mut args, "--stderr")?, - other => return Err(anyhow!("unknown argument: {other}")), - } - } - Ok(parsed) - } -} - -fn run_smoke(args: &Args) -> Result { - let root = env::current_dir().context("failed to resolve current dir")?; - let app_server = status_cli::absolute_path(&args.app_server)?; - if !app_server.exists() { - return Err(anyhow!( - "codex app-server binary not found: {}", - app_server.display() - )); - } - let codex_home = status_cli::absolute_path(&args.codex_home)?; - let result_path = status_cli::absolute_path(&args.result)?; - let transcript_path = status_cli::absolute_path(&args.transcript)?; - let stderr_path = status_cli::absolute_path(&args.stderr)?; - reset_smoke_paths( - &root, - &[ - codex_home.clone(), - result_path.clone(), - transcript_path.clone(), - stderr_path.clone(), - ], - )?; - fs::create_dir_all(&codex_home) - .with_context(|| format!("failed to create {}", codex_home.display()))?; - - let mut client = status_cli::AppServerClient::start( - &app_server, - &codex_home, - &transcript_path, - &stderr_path, - )?; - client.send( - "initialize", - Some(json!({ - "clientInfo": { - "name": "epiphany-phase6-freshness-smoke", - "title": "Epiphany Phase 6 Freshness Smoke", - "version": "0.1.0", - }, - "capabilities": {"experimentalApi": true}, - })), - true, - )?; - client.send("initialized", None, false)?; - let started = client.send( - "thread/start", - Some(json!({"cwd": root.join("epiphany-core"), "ephemeral": true})), - true, - )?; - let thread_id = started - .pointer("/thread/id") - .and_then(Value::as_str) - .ok_or_else(|| anyhow!("thread/start response missing thread.id"))? - .to_string(); - - let missing_notification_start = client.notification_len(); - let missing_response = client.send( - "thread/epiphany/freshness", - Some(json!({"threadId": thread_id})), - true, - )?; - require( - missing_response.get("threadId").and_then(Value::as_str) == Some(&thread_id), - "freshness response should echo thread id", - )?; - assert_missing_state_freshness(&missing_response)?; - client.require_no_notification( - "thread/epiphany/stateUpdated", - missing_notification_start, - Duration::from_secs(1), - )?; - - let update_notification_start = client.notification_len(); - let update = client.send( - "thread/epiphany/update", - Some(json!({ - "threadId": thread_id, - "expectedRevision": 0, - "patch": freshness_patch(), - })), - true, - )?; - require( - update.get("revision").and_then(Value::as_u64) == Some(1), - "freshness smoke patch should advance revision to 1", - )?; - client.wait_for_notification( - "thread/epiphany/stateUpdated", - update_notification_start, - Duration::from_secs(10), - )?; - - let ready_notification_start = client.notification_len(); - let ready_response = client.send( - "thread/epiphany/freshness", - Some(json!({"threadId": thread_id})), - true, - )?; - assert_ready_freshness(&ready_response)?; - client.require_no_notification( - "thread/epiphany/stateUpdated", - ready_notification_start, - Duration::from_secs(1), - )?; - - let final_read = client.send( - "thread/read", - Some(json!({"threadId": thread_id, "includeTurns": false})), - true, - )?; - require( - final_read - .pointer("/thread/epiphanyState/revision") - .and_then(Value::as_u64) - == Some(1), - "freshness reflection should not mutate state revision", - )?; - - let result = json!({ - "threadId": thread_id, - "codexHome": codex_home, - "missingRetrievalStatus": missing_response["retrieval"]["status"], - "missingGraphStatus": missing_response["graph"]["status"], - "readyRevision": ready_response["stateRevision"], - "readyRetrievalStatus": ready_response["retrieval"]["status"], - "readyGraphStatus": ready_response["graph"]["status"], - "readyDirtyPathCount": ready_response["graph"]["dirtyPathCount"], - "freshnessNotificationCount": client.notification_count( - "thread/epiphany/stateUpdated", - ready_notification_start, - ), - "finalReadRevision": final_read["thread"]["epiphanyState"]["revision"], - }); - write_json(&result_path, &result)?; - Ok(result) -} - -fn freshness_patch() -> Value { - json!({ - "objective": "Expose read-only Epiphany freshness reflection without inventing watcher-driven invalidation.", - "activeSubgoalId": "phase6-freshness-smoke", - "subgoals": [{ - "id": "phase6-freshness-smoke", - "title": "Live-smoke freshness reflection", - "status": "active", - "summary": "The freshness surface should reflect graph staleness and live retrieval state without mutation." - }], - "graphs": { - "architecture": { - "nodes": [{ - "id": "freshness-surface", - "title": "Freshness reflection surface", - "purpose": "Expose exact retrieval and graph freshness pressure without becoming a scheduler.", - "code_refs": [{ - "path": "app-server/src/codex_message_processor.rs", - "start_line": 4200, - "end_line": 4340, - "symbol": "thread_epiphany_freshness" - }] - }] - }, - "dataflow": {"nodes": []}, - "links": [] - }, - "graphFrontier": { - "active_node_ids": ["freshness-surface"], - "dirty_paths": ["app-server/src/codex_message_processor.rs"], - "open_question_ids": ["q-freshness-gap"] - }, - "graphCheckpoint": { - "checkpoint_id": "ck-freshness-1", - "graph_revision": 1, - "summary": "Freshness smoke checkpoint", - "frontier_node_ids": ["freshness-surface"], - "open_question_ids": ["q-freshness-gap"] - }, - "churn": { - "understanding_status": "ready", - "diff_pressure": "low", - "graph_freshness": "stale", - "unexplained_writes": 0 - } - }) -} - -fn assert_missing_state_freshness(response: &Value) -> Result<()> { - require( - response.get("source").and_then(Value::as_str) == Some("live"), - "freshness should report live source for a loaded thread", - )?; - require( - response.get("stateRevision").is_none(), - "missing-state freshness should not invent a revision", - )?; - let retrieval = &response["retrieval"]; - require( - retrieval.get("status").and_then(Value::as_str) == Some("ready"), - "live retrieval freshness should be available", - )?; - require( - retrieval.get("note").and_then(Value::as_str) == Some("Retrieval catalog is ready."), - "fresh live retrieval should report ready note", - )?; - let graph = &response["graph"]; - require( - graph.get("status").and_then(Value::as_str) == Some("missing"), - "missing Epiphany state should block graph freshness", - )?; - require( - graph.get("note").and_then(Value::as_str) - == Some("Epiphany state is missing, so graph freshness cannot be assessed."), - "missing graph freshness should explain itself", - ) -} - -fn assert_ready_freshness(response: &Value) -> Result<()> { - require( - response.get("source").and_then(Value::as_str) == Some("live"), - "ready freshness should report live source", - )?; - require( - response.get("stateRevision").and_then(Value::as_u64) == Some(1), - "freshness should preserve state revision identity", - )?; - let retrieval = &response["retrieval"]; - require( - retrieval.get("status").and_then(Value::as_str) == Some("ready"), - "live retrieval freshness should stay ready for the smoke workspace", - )?; - require( - retrieval.get("semanticAvailable").and_then(Value::as_bool) == Some(true), - "live retrieval freshness should report semantic availability", - )?; - let graph = &response["graph"]; - require( - graph.get("status").and_then(Value::as_str) == Some("stale"), - "dirty graph frontier should report stale freshness", - )?; - require( - graph.get("graphFreshness").and_then(Value::as_str) == Some("stale"), - "graph freshness should expose the churn hint", - )?; - require( - graph.get("checkpointId").and_then(Value::as_str) == Some("ck-freshness-1"), - "graph freshness should expose the checkpoint id", - )?; - require( - graph.get("dirtyPathCount").and_then(Value::as_u64) == Some(1), - "graph freshness should count dirty paths", - )?; - require( - string_array_eq( - graph.get("dirtyPaths").and_then(Value::as_array), - &["app-server/src/codex_message_processor.rs"], - ), - "graph freshness should expose dirty paths", - )?; - require( - graph.get("openQuestionCount").and_then(Value::as_u64) == Some(1), - "graph freshness should count open questions", - )?; - require( - graph.get("openGapCount").and_then(Value::as_u64) == Some(0), - "graph freshness should count open gaps", - ) -} - -fn string_array_eq(values: Option<&Vec>, expected: &[&str]) -> bool { - values.is_some_and(|values| { - values.len() == expected.len() - && values - .iter() - .zip(expected) - .all(|(value, expected)| value.as_str() == Some(*expected)) - }) -} - -fn reset_smoke_paths(root: &Path, paths: &[PathBuf]) -> Result<()> { - let smoke_root = root.join(".epiphany-smoke").canonicalize().or_else(|_| { - let smoke_root = root.join(".epiphany-smoke"); - fs::create_dir_all(&smoke_root)?; - smoke_root.canonicalize() - })?; - for path in paths { - if !path.exists() { - continue; - } - let resolved = path.canonicalize()?; - if resolved == smoke_root || !resolved.starts_with(&smoke_root) { - return Err(anyhow!( - "refusing to delete non-smoke path: {}", - path.display() - )); - } - if path.is_dir() { - fs::remove_dir_all(path)?; - } else { - fs::remove_file(path)?; - } - } - Ok(()) -} - -fn write_json(path: &Path, value: &Value) -> Result<()> { - if let Some(parent) = path.parent() { - fs::create_dir_all(parent)?; - } - fs::write(path, format!("{}\n", serde_json::to_string_pretty(value)?))?; - Ok(()) -} - -fn require(condition: bool, message: &str) -> Result<()> { - if condition { - Ok(()) - } else { - Err(anyhow!("{message}")) - } -} - -fn take_path(args: &mut impl Iterator, name: &str) -> Result { - args.next() - .map(PathBuf::from) - .ok_or_else(|| anyhow!("{name} requires a value")) -} diff --git a/epiphany-core/src/bin/epiphany-phase6-graph-query-smoke.rs b/epiphany-core/src/bin/epiphany-phase6-graph-query-smoke.rs deleted file mode 100644 index b2beeac8..00000000 --- a/epiphany-core/src/bin/epiphany-phase6-graph-query-smoke.rs +++ /dev/null @@ -1,540 +0,0 @@ -use anyhow::Context; -use anyhow::Result; -use anyhow::anyhow; -use serde_json::Value; -use serde_json::json; -use std::env; -use std::fs; -use std::path::{Path, PathBuf}; -use std::time::Duration; - -#[allow(dead_code)] -#[path = "epiphany-mvp-status.rs"] -mod status_cli; - -const DEFAULT_APP_SERVER: &str = r"C:\Users\Meta\.cargo-target-codex\debug\codex-app-server.exe"; - -fn main() -> Result<()> { - let args = Args::parse()?; - let result = run_smoke(&args)?; - println!("{}", serde_json::to_string_pretty(&result)?); - Ok(()) -} - -#[derive(Debug)] -struct Args { - app_server: PathBuf, - codex_home: PathBuf, - result: PathBuf, - transcript: PathBuf, - stderr: PathBuf, -} - -impl Args { - fn parse() -> Result { - let root = env::current_dir().context("failed to resolve current dir")?; - let mut parsed = Self { - app_server: PathBuf::from(DEFAULT_APP_SERVER), - codex_home: root - .join(".epiphany-smoke") - .join("phase6-graph-query-codex-home"), - result: root - .join(".epiphany-smoke") - .join("phase6-graph-query-smoke-result.json"), - transcript: root - .join(".epiphany-smoke") - .join("phase6-graph-query-smoke-transcript.jsonl"), - stderr: root - .join(".epiphany-smoke") - .join("phase6-graph-query-smoke-server.stderr.log"), - }; - let mut args = env::args().skip(1); - while let Some(arg) = args.next() { - match arg.as_str() { - "--app-server" => parsed.app_server = take_path(&mut args, "--app-server")?, - "--codex-home" => parsed.codex_home = take_path(&mut args, "--codex-home")?, - "--result" => parsed.result = take_path(&mut args, "--result")?, - "--transcript" => parsed.transcript = take_path(&mut args, "--transcript")?, - "--stderr" => parsed.stderr = take_path(&mut args, "--stderr")?, - other => return Err(anyhow!("unknown argument: {other}")), - } - } - Ok(parsed) - } -} - -fn run_smoke(args: &Args) -> Result { - let root = env::current_dir().context("failed to resolve current dir")?; - let app_server = status_cli::absolute_path(&args.app_server)?; - if !app_server.exists() { - return Err(anyhow!( - "codex app-server binary not found: {}", - app_server.display() - )); - } - let codex_home = status_cli::absolute_path(&args.codex_home)?; - let result_path = status_cli::absolute_path(&args.result)?; - let transcript_path = status_cli::absolute_path(&args.transcript)?; - let stderr_path = status_cli::absolute_path(&args.stderr)?; - reset_smoke_paths( - &root, - &[ - codex_home.clone(), - result_path.clone(), - transcript_path.clone(), - stderr_path.clone(), - ], - )?; - fs::create_dir_all(&codex_home) - .with_context(|| format!("failed to create {}", codex_home.display()))?; - - let mut client = status_cli::AppServerClient::start( - &app_server, - &codex_home, - &transcript_path, - &stderr_path, - )?; - client.send( - "initialize", - Some(json!({ - "clientInfo": { - "name": "epiphany-phase6-graph-query-smoke", - "title": "Epiphany Phase 6 Graph Query Smoke", - "version": "0.1.0", - }, - "capabilities": {"experimentalApi": true}, - })), - true, - )?; - client.send("initialized", None, false)?; - let started = client.send( - "thread/start", - Some(json!({"cwd": root.join("epiphany-core"), "ephemeral": true})), - true, - )?; - let thread_id = started - .pointer("/thread/id") - .and_then(Value::as_str) - .ok_or_else(|| anyhow!("thread/start response missing thread.id"))? - .to_string(); - - let missing_notification_start = client.notification_len(); - let missing_response = client.send( - "thread/epiphany/graphQuery", - Some(json!({ - "threadId": thread_id, - "query": {"kind": "node", "nodeIds": ["graph-query-surface"]}, - })), - true, - )?; - assert_missing_graph_query(&missing_response, &thread_id)?; - client.require_no_notification( - "thread/epiphany/stateUpdated", - missing_notification_start, - Duration::from_secs(1), - )?; - - let update_notification_start = client.notification_len(); - let update = client.send( - "thread/epiphany/update", - Some(json!({ - "threadId": thread_id, - "expectedRevision": 0, - "patch": graph_query_patch(), - })), - true, - )?; - require( - update.get("revision").and_then(Value::as_u64) == Some(1), - "graph query smoke patch should advance revision to 1", - )?; - client.wait_for_notification( - "thread/epiphany/stateUpdated", - update_notification_start, - Duration::from_secs(10), - )?; - - let frontier_notification_start = client.notification_len(); - let frontier_response = client.send( - "thread/epiphany/graphQuery", - Some(json!({ - "threadId": thread_id, - "query": { - "kind": "frontierNeighborhood", - "direction": "outgoing", - "depth": 1, - }, - })), - true, - )?; - assert_frontier_graph_query(&frontier_response)?; - client.require_no_notification( - "thread/epiphany/stateUpdated", - frontier_notification_start, - Duration::from_secs(1), - )?; - - let path_notification_start = client.notification_len(); - let path_response = client.send( - "thread/epiphany/graphQuery", - Some(json!({ - "threadId": thread_id, - "query": { - "kind": "path", - "paths": ["app-server/src/codex_message_processor.rs"], - "symbols": ["map_epiphany_graph_query"], - }, - })), - true, - )?; - assert_path_graph_query(&path_response)?; - client.require_no_notification( - "thread/epiphany/stateUpdated", - path_notification_start, - Duration::from_secs(1), - )?; - - let final_read = client.send( - "thread/read", - Some(json!({"threadId": thread_id, "includeTurns": false})), - true, - )?; - require( - final_read - .pointer("/thread/epiphanyState/revision") - .and_then(Value::as_u64) - == Some(1), - "graph query reflection should not mutate state revision", - )?; - - let result = json!({ - "threadId": thread_id, - "codexHome": codex_home, - "missingStateStatus": missing_response["stateStatus"], - "frontierStateStatus": frontier_response["stateStatus"], - "pathStateStatus": path_response["stateStatus"], - "readyRevision": frontier_response["stateRevision"], - "frontierArchitectureNodeIds": ids(&frontier_response["graph"]["architectureNodes"]), - "frontierDataflowNodeIds": ids(&frontier_response["graph"]["dataflowNodes"]), - "pathMatchedSymbols": path_response["matched"]["symbols"], - "frontierNotificationCount": client.notification_count( - "thread/epiphany/stateUpdated", - frontier_notification_start, - ), - "pathNotificationCount": client.notification_count( - "thread/epiphany/stateUpdated", - path_notification_start, - ), - "finalReadRevision": final_read["thread"]["epiphanyState"]["revision"], - }); - write_json(&result_path, &result)?; - Ok(result) -} - -fn graph_query_patch() -> Value { - let code_ref = json!({ - "path": "app-server/src/codex_message_processor.rs", - "start_line": 15201, - "end_line": 15534, - "symbol": "map_epiphany_graph_query" - }); - json!({ - "objective": "Expose read-only graph traversal for implementation and verifier agents.", - "activeSubgoalId": "phase6-graph-query-smoke", - "subgoals": [{ - "id": "phase6-graph-query-smoke", - "title": "Live-smoke graph query traversal", - "status": "active", - "summary": "The graph query surface should traverse typed graph state without mutating it." - }], - "graphs": { - "architecture": { - "nodes": [ - { - "id": "graph-query-surface", - "title": "Graph query surface", - "purpose": "Return bounded graph neighborhoods and path matches for agents.", - "code_refs": [code_ref.clone()] - }, - { - "id": "implementation-agent", - "title": "Implementation agent", - "purpose": "Uses graph neighborhoods to decide where to edit." - }, - { - "id": "verifier-agent", - "title": "Verifier agent", - "purpose": "Uses graph neighborhoods to inspect blast radius." - } - ], - "edges": [ - { - "id": "edge-query-implementation", - "source_id": "graph-query-surface", - "target_id": "implementation-agent", - "kind": "guides", - "code_refs": [code_ref.clone()] - }, - { - "id": "edge-query-verifier", - "source_id": "graph-query-surface", - "target_id": "verifier-agent", - "kind": "guides" - } - ] - }, - "dataflow": { - "nodes": [{ - "id": "typed-graph-state", - "title": "Typed graph state", - "purpose": "Remain the authoritative model behind graph traversal.", - "code_refs": [code_ref.clone()] - }] - }, - "links": [{ - "dataflow_node_id": "typed-graph-state", - "architecture_node_id": "graph-query-surface", - "relationship": "authoritative-query-source", - "code_refs": [code_ref] - }] - }, - "graphFrontier": { - "active_node_ids": ["graph-query-surface"], - "active_edge_ids": ["edge-query-implementation"] - }, - "graphCheckpoint": { - "checkpoint_id": "phase6-graph-query-smoke", - "graph_revision": 1, - "summary": "Graph query traversal is the active Phase 6 smoke target.", - "frontier_node_ids": ["graph-query-surface"] - } - }) -} - -fn assert_missing_graph_query(response: &Value, thread_id: &str) -> Result<()> { - require( - response.get("threadId").and_then(Value::as_str) == Some(thread_id), - "graph query should echo thread id", - )?; - require( - response.get("source").and_then(Value::as_str) == Some("live"), - "missing graph query should report live source", - )?; - require( - response.get("stateStatus").and_then(Value::as_str) == Some("missing"), - "missing graph query should report missing state", - )?; - require( - response.get("stateRevision").is_none(), - "missing graph query should not invent a revision", - )?; - require( - response.get("graph") == Some(&json!({})), - "missing graph query should not invent graph records", - )?; - require( - string_array_eq( - response - .pointer("/missing/nodeIds") - .and_then(Value::as_array), - &["graph-query-surface"], - ), - "missing graph query should echo unresolved explicit node ids", - ) -} - -fn assert_frontier_graph_query(response: &Value) -> Result<()> { - require( - response.get("stateStatus").and_then(Value::as_str) == Some("ready"), - "frontier graph query should report ready state", - )?; - require( - response.get("stateRevision").and_then(Value::as_u64) == Some(1), - "frontier graph query should preserve revision", - )?; - require( - ids_eq( - response - .pointer("/graph/architectureNodes") - .and_then(Value::as_array), - &[ - "graph-query-surface", - "implementation-agent", - "verifier-agent", - ], - ), - "frontier graph query should return one-hop architecture neighbors", - )?; - require( - ids_eq( - response - .pointer("/graph/dataflowNodes") - .and_then(Value::as_array), - &["typed-graph-state"], - ), - "frontier graph query should preserve linked dataflow node", - )?; - require( - ids_eq( - response - .pointer("/graph/architectureEdges") - .and_then(Value::as_array), - &["edge-query-implementation", "edge-query-verifier"], - ), - "frontier graph query should return active and incident architecture edges", - )?; - require( - response - .pointer("/graph/links/0/dataflow_node_id") - .and_then(Value::as_str) - == Some("typed-graph-state"), - "frontier graph query should return architecture/dataflow link", - )?; - require( - string_array_eq( - response - .pointer("/frontier/active_node_ids") - .and_then(Value::as_array), - &["graph-query-surface"], - ), - "frontier graph query should include current frontier", - )?; - require( - response - .pointer("/checkpoint/checkpoint_id") - .and_then(Value::as_str) - == Some("phase6-graph-query-smoke"), - "frontier graph query should include graph checkpoint", - )?; - require( - response.get("missing") == Some(&json!({})), - "frontier graph query should have no missing records", - ) -} - -fn assert_path_graph_query(response: &Value) -> Result<()> { - require( - response.get("stateStatus").and_then(Value::as_str) == Some("ready"), - "path graph query should report ready state", - )?; - require( - string_array_eq( - response.pointer("/matched/paths").and_then(Value::as_array), - &["app-server/src/codex_message_processor.rs"], - ), - "path graph query should report matched code ref path", - )?; - require( - string_array_eq( - response - .pointer("/matched/symbols") - .and_then(Value::as_array), - &["map_epiphany_graph_query"], - ), - "path graph query should report matched symbol", - )?; - require( - string_array_contains( - response - .pointer("/matched/nodeIds") - .and_then(Value::as_array), - "graph-query-surface", - ), - "path graph query should include graph query node in matches", - )?; - require( - string_array_contains( - response - .pointer("/matched/nodeIds") - .and_then(Value::as_array), - "typed-graph-state", - ), - "path graph query should include linked dataflow node in matches", - ) -} - -fn ids(value: &Value) -> Value { - json!( - value - .as_array() - .map(|items| { - items - .iter() - .filter_map(|item| item.get("id").and_then(Value::as_str)) - .collect::>() - }) - .unwrap_or_default() - ) -} - -fn ids_eq(values: Option<&Vec>, expected: &[&str]) -> bool { - values.is_some_and(|values| { - values.len() == expected.len() - && values - .iter() - .zip(expected) - .all(|(value, expected)| value.get("id").and_then(Value::as_str) == Some(*expected)) - }) -} - -fn string_array_eq(values: Option<&Vec>, expected: &[&str]) -> bool { - values.is_some_and(|values| { - values.len() == expected.len() - && values - .iter() - .zip(expected) - .all(|(value, expected)| value.as_str() == Some(*expected)) - }) -} - -fn string_array_contains(values: Option<&Vec>, expected: &str) -> bool { - values.is_some_and(|values| values.iter().any(|value| value.as_str() == Some(expected))) -} - -fn reset_smoke_paths(root: &Path, paths: &[PathBuf]) -> Result<()> { - let smoke_root = root.join(".epiphany-smoke").canonicalize().or_else(|_| { - let smoke_root = root.join(".epiphany-smoke"); - fs::create_dir_all(&smoke_root)?; - smoke_root.canonicalize() - })?; - for path in paths { - if !path.exists() { - continue; - } - let resolved = path.canonicalize()?; - if resolved == smoke_root || !resolved.starts_with(&smoke_root) { - return Err(anyhow!( - "refusing to delete non-smoke path: {}", - path.display() - )); - } - if path.is_dir() { - fs::remove_dir_all(path)?; - } else { - fs::remove_file(path)?; - } - } - Ok(()) -} - -fn write_json(path: &Path, value: &Value) -> Result<()> { - if let Some(parent) = path.parent() { - fs::create_dir_all(parent)?; - } - fs::write(path, format!("{}\n", serde_json::to_string_pretty(value)?))?; - Ok(()) -} - -fn require(condition: bool, message: &str) -> Result<()> { - if condition { - Ok(()) - } else { - Err(anyhow!("{message}")) - } -} - -fn take_path(args: &mut impl Iterator, name: &str) -> Result { - args.next() - .map(PathBuf::from) - .ok_or_else(|| anyhow!("{name} requires a value")) -} diff --git a/epiphany-core/src/bin/epiphany-phase6-planning-smoke.rs b/epiphany-core/src/bin/epiphany-phase6-planning-smoke.rs deleted file mode 100644 index 860f8c76..00000000 --- a/epiphany-core/src/bin/epiphany-phase6-planning-smoke.rs +++ /dev/null @@ -1,529 +0,0 @@ -use anyhow::Context; -use anyhow::Result; -use anyhow::anyhow; -use serde_json::Value; -use serde_json::json; -use std::env; -use std::fs; -use std::path::{Path, PathBuf}; -use std::time::Duration; - -#[allow(dead_code)] -#[path = "epiphany-mvp-status.rs"] -mod status_cli; - -const DEFAULT_APP_SERVER: &str = r"C:\Users\Meta\.cargo-target-codex\debug\codex-app-server.exe"; - -fn main() -> Result<()> { - let args = Args::parse()?; - let result = run_smoke(&args)?; - println!("{}", serde_json::to_string_pretty(&result)?); - Ok(()) -} - -#[derive(Debug)] -struct Args { - app_server: PathBuf, - codex_home: PathBuf, - result: PathBuf, - transcript: PathBuf, - stderr: PathBuf, -} - -impl Args { - fn parse() -> Result { - let root = env::current_dir().context("failed to resolve current dir")?; - let mut parsed = Self { - app_server: PathBuf::from(DEFAULT_APP_SERVER), - codex_home: root - .join(".epiphany-smoke") - .join("phase6-planning-codex-home"), - result: root - .join(".epiphany-smoke") - .join("phase6-planning-smoke-result.json"), - transcript: root - .join(".epiphany-smoke") - .join("phase6-planning-smoke-transcript.jsonl"), - stderr: root - .join(".epiphany-smoke") - .join("phase6-planning-smoke-server.stderr.log"), - }; - let mut args = env::args().skip(1); - while let Some(arg) = args.next() { - match arg.as_str() { - "--app-server" => parsed.app_server = take_path(&mut args, "--app-server")?, - "--codex-home" => parsed.codex_home = take_path(&mut args, "--codex-home")?, - "--result" => parsed.result = take_path(&mut args, "--result")?, - "--transcript" => parsed.transcript = take_path(&mut args, "--transcript")?, - "--stderr" => parsed.stderr = take_path(&mut args, "--stderr")?, - other => return Err(anyhow!("unknown argument: {other}")), - } - } - Ok(parsed) - } -} - -fn run_smoke(args: &Args) -> Result { - let root = env::current_dir().context("failed to resolve current dir")?; - let app_server = status_cli::absolute_path(&args.app_server)?; - if !app_server.exists() { - return Err(anyhow!( - "codex app-server binary not found: {}", - app_server.display() - )); - } - let codex_home = status_cli::absolute_path(&args.codex_home)?; - let result_path = status_cli::absolute_path(&args.result)?; - let transcript_path = status_cli::absolute_path(&args.transcript)?; - let stderr_path = status_cli::absolute_path(&args.stderr)?; - reset_smoke_paths( - &root, - &[ - codex_home.clone(), - result_path.clone(), - transcript_path.clone(), - stderr_path.clone(), - ], - )?; - fs::create_dir_all(&codex_home) - .with_context(|| format!("failed to create {}", codex_home.display()))?; - - let mut client = status_cli::AppServerClient::start( - &app_server, - &codex_home, - &transcript_path, - &stderr_path, - )?; - client.send( - "initialize", - Some(json!({ - "clientInfo": { - "name": "epiphany-phase6-planning-smoke", - "title": "Epiphany Phase 6 Planning Smoke", - "version": "0.1.0", - }, - "capabilities": {"experimentalApi": true}, - })), - true, - )?; - client.send("initialized", None, false)?; - let started = client.send( - "thread/start", - Some(json!({"cwd": root.join("epiphany-core"), "ephemeral": true})), - true, - )?; - let thread_id = started - .pointer("/thread/id") - .and_then(Value::as_str) - .ok_or_else(|| anyhow!("thread/start response missing thread.id"))? - .to_string(); - - let missing_notification_start = client.notification_len(); - let missing_view = client.send( - "thread/epiphany/view", - Some(json!({"threadId": thread_id, "lenses": ["planning"]})), - true, - )?; - let missing_response = missing_view - .get("planning") - .ok_or_else(|| anyhow!("view response missing planning lens"))?; - require( - missing_response.get("threadId").and_then(Value::as_str) == Some(&thread_id), - "planning response should echo thread id", - )?; - assert_missing_planning(&missing_response)?; - client.require_no_notification( - "thread/epiphany/stateUpdated", - missing_notification_start, - Duration::from_secs(1), - )?; - - let update_notification_start = client.notification_len(); - let update = client.send( - "thread/epiphany/update", - Some(json!({ - "threadId": thread_id, - "expectedRevision": 0, - "patch": planning_patch(&root), - })), - true, - )?; - require( - update.get("revision").and_then(Value::as_u64) == Some(1), - "planning patch should advance revision to 1", - )?; - let update_notification = client.wait_for_notification( - "thread/epiphany/stateUpdated", - update_notification_start, - Duration::from_secs(10), - )?; - require( - string_array_contains( - update_notification - .pointer("/params/changedFields") - .and_then(Value::as_array), - "planning", - ), - "planning update should report the planning changed field", - )?; - - let planning_notification_start = client.notification_len(); - let ready_view = client.send( - "thread/epiphany/view", - Some(json!({"threadId": thread_id, "lenses": ["planning"]})), - true, - )?; - let ready_response = ready_view - .get("planning") - .ok_or_else(|| anyhow!("view response missing planning lens"))?; - assert_ready_planning(&ready_response)?; - client.require_no_notification( - "thread/epiphany/stateUpdated", - planning_notification_start, - Duration::from_secs(1), - )?; - - let final_read = client.send( - "thread/read", - Some(json!({"threadId": thread_id, "includeTurns": false})), - true, - )?; - require( - final_read - .pointer("/thread/epiphanyState/revision") - .and_then(Value::as_u64) - == Some(1), - "planning reflection should not mutate state revision", - )?; - - let result = json!({ - "threadId": thread_id, - "codexHome": codex_home, - "missingStateStatus": missing_response["stateStatus"], - "readyStateStatus": ready_response["stateStatus"], - "readyRevision": ready_response["stateRevision"], - "captureCount": ready_response["summary"]["captureCount"], - "githubIssueCaptureCount": ready_response["summary"]["githubIssueCaptureCount"], - "backlogItemCount": ready_response["summary"]["backlogItemCount"], - "objectiveDraftCount": ready_response["summary"]["objectiveDraftCount"], - "planningNotificationCount": client.notification_count( - "thread/epiphany/stateUpdated", - planning_notification_start, - ), - "finalReadRevision": final_read["thread"]["epiphanyState"]["revision"], - }); - write_json(&result_path, &result)?; - Ok(result) -} - -fn planning_patch(root: &Path) -> Value { - let github_source = json!({ - "kind": "github_issue", - "provider": "github", - "repo": "GameCult/EpiphanyAgent", - "issue_number": 42, - "url": "https://github.com/GameCult/EpiphanyAgent/issues/42", - "state": "open", - "labels": ["planning", "mvp"], - "assignees": ["Meta"], - "author": "Meta", - "created_at": "2026-05-01T10:00:00Z", - "updated_at": "2026-05-01T10:05:00Z", - "imported_at": "2026-05-01T10:10:00Z" - }); - let chat_source = json!({ - "kind": "chat", - "uri": "codex://threads/planning-smoke", - "external_id": "turn-planning-smoke" - }); - json!({ - "objective": "Keep planning state reviewable before adopting an implementation objective.", - "planning": { - "workspace_root": root, - "captures": [ - { - "id": "capture-github-planning", - "title": "Import GitHub issue into planning inbox", - "body": "Issues should become planning captures before becoming objectives.", - "confidence": "observed", - "status": "inbox", - "speaker": "human", - "tags": ["github", "backlog"], - "source": github_source.clone(), - "created_at": "2026-05-01T10:10:00Z", - "updated_at": "2026-05-01T10:10:00Z" - }, - { - "id": "capture-chat-planning", - "title": "Draft objectives from chat only after bounding them", - "body": "User discussion remains planning material until it becomes a firm artifact.", - "confidence": "medium", - "status": "triaged", - "speaker": "human", - "tags": ["chat", "objective"], - "source": chat_source.clone(), - "created_at": "2026-05-01T10:12:00Z", - "updated_at": "2026-05-01T10:12:00Z" - } - ], - "backlog_items": [{ - "id": "backlog-planning-dashboard", - "title": "Expose planning state in the Epiphany dashboard", - "kind": "feature", - "summary": "Show captures, backlog, roadmap streams, and objective drafts.", - "status": "ready", - "horizon": "near", - "priority": { - "value": "high", - "rationale": "Planning needs a visible user review loop before automation.", - "impact": "user-steering", - "urgency": "soon", - "confidence": "medium", - "effort": "small", - "unblocks": ["objective-adoption"] - }, - "confidence": "medium", - "product_area": "epiphany-gui", - "lane_hints": ["imagination", "hands", "soul"], - "acceptance_sketch": ["Dashboard can render typed planning records."], - "source_refs": [github_source, chat_source], - "updated_at": "2026-05-01T10:15:00Z" - }], - "roadmap_streams": [{ - "id": "stream-user-steering", - "title": "Human-steered planning", - "purpose": "Keep future work visible and bounded before implementation starts.", - "status": "active", - "item_ids": ["backlog-planning-dashboard"], - "near_term_focus": "backlog-planning-dashboard", - "review_cadence": "per objective" - }], - "objective_drafts": [{ - "id": "draft-planning-dashboard", - "title": "Build the planning dashboard slice", - "summary": "Render planning records and let the user adopt one bounded objective.", - "source_item_ids": ["backlog-planning-dashboard"], - "scope": { - "includes": ["read-only planning projection", "objective draft review"], - "excludes": ["automatic objective adoption"] - }, - "acceptance_criteria": [ - "Planning records render without changing thread state.", - "A draft objective remains review-gated." - ], - "evidence_required": ["live smoke", "GUI screenshot"], - "lane_plan": { - "imagination": "organize planning records into a bounded objective candidate", - "eyes": "check prior art and GitHub issue metadata shape", - "hands": "wire dashboard controls after the read-only surface is stable", - "soul": "verify no planning record silently becomes active objective" - }, - "risks": ["accidental objective adoption"], - "review_gates": ["human adoption"], - "status": "draft" - }] - } - }) -} - -fn assert_missing_planning(response: &Value) -> Result<()> { - require( - response.get("source").and_then(Value::as_str) == Some("live"), - "missing planning should report live source", - )?; - require( - response.get("stateStatus").and_then(Value::as_str) == Some("missing"), - "missing planning should report missing state", - )?; - require( - response.get("stateRevision").is_none(), - "missing planning should not invent a revision", - )?; - require( - response.get("planning") == Some(&json!({})), - "missing planning should return empty planning", - )?; - let summary = &response["summary"]; - require( - summary.get("captureCount").and_then(Value::as_u64) == Some(0), - "missing planning should not invent captures", - )?; - require( - summary.get("backlogItemCount").and_then(Value::as_u64) == Some(0), - "missing planning should not invent backlog", - )?; - require( - summary.get("activeObjective").is_none(), - "missing planning should not invent objective", - ) -} - -fn assert_ready_planning(response: &Value) -> Result<()> { - require( - response.get("source").and_then(Value::as_str) == Some("live"), - "ready planning should report live source", - )?; - require( - response.get("stateStatus").and_then(Value::as_str) == Some("ready"), - "ready planning should report ready state", - )?; - require( - response.get("stateRevision").and_then(Value::as_u64) == Some(1), - "ready planning should expose current revision", - )?; - let planning = &response["planning"]; - require( - ids_eq( - planning.get("captures").and_then(Value::as_array), - &["capture-github-planning", "capture-chat-planning"], - ), - "planning should preserve captures", - )?; - require( - planning - .pointer("/captures/0/source/kind") - .and_then(Value::as_str) - == Some("github_issue"), - "planning should preserve GitHub issue source kind", - )?; - require( - planning - .pointer("/captures/0/source/issue_number") - .and_then(Value::as_u64) - == Some(42), - "planning should preserve GitHub issue number", - )?; - require( - ids_eq( - planning.get("backlog_items").and_then(Value::as_array), - &["backlog-planning-dashboard"], - ), - "planning should preserve backlog items", - )?; - require( - planning - .pointer("/roadmap_streams/0/near_term_focus") - .and_then(Value::as_str) - == Some("backlog-planning-dashboard"), - "planning should preserve roadmap near-term focus", - )?; - require( - planning - .pointer("/objective_drafts/0/status") - .and_then(Value::as_str) - == Some("draft"), - "planning should preserve draft objective state", - )?; - let summary = &response["summary"]; - require( - summary.get("captureCount").and_then(Value::as_u64) == Some(2), - "planning summary should count captures", - )?; - require( - summary.get("pendingCaptureCount").and_then(Value::as_u64) == Some(1), - "planning summary should count inbox captures", - )?; - require( - summary - .get("githubIssueCaptureCount") - .and_then(Value::as_u64) - == Some(1), - "planning summary should count GitHub captures", - )?; - require( - summary.get("backlogItemCount").and_then(Value::as_u64) == Some(1), - "planning summary should count backlog", - )?; - require( - summary.get("readyBacklogItemCount").and_then(Value::as_u64) == Some(1), - "planning summary should count ready backlog", - )?; - require( - summary.get("roadmapStreamCount").and_then(Value::as_u64) == Some(1), - "planning summary should count roadmap streams", - )?; - require( - summary.get("objectiveDraftCount").and_then(Value::as_u64) == Some(1), - "planning summary should count drafts", - )?; - require( - summary.get("draftObjectiveCount").and_then(Value::as_u64) == Some(1), - "planning summary should count draft status", - )?; - require( - summary - .get("activeObjective") - .and_then(Value::as_str) - .is_some_and(|objective| objective.starts_with("Keep planning state reviewable")), - "planning summary should expose the active thread objective separately", - )?; - require( - summary - .get("note") - .and_then(Value::as_str) - .is_some_and(|note| note.contains("human explicitly adopts an objective")), - "planning summary should remind clients that adoption is explicit", - ) -} - -fn ids_eq(values: Option<&Vec>, expected: &[&str]) -> bool { - values.is_some_and(|values| { - values.len() == expected.len() - && values - .iter() - .zip(expected) - .all(|(value, expected)| value.get("id").and_then(Value::as_str) == Some(*expected)) - }) -} - -fn string_array_contains(values: Option<&Vec>, expected: &str) -> bool { - values.is_some_and(|values| values.iter().any(|value| value.as_str() == Some(expected))) -} - -fn reset_smoke_paths(root: &Path, paths: &[PathBuf]) -> Result<()> { - let smoke_root = root.join(".epiphany-smoke").canonicalize().or_else(|_| { - let smoke_root = root.join(".epiphany-smoke"); - fs::create_dir_all(&smoke_root)?; - smoke_root.canonicalize() - })?; - for path in paths { - if !path.exists() { - continue; - } - let resolved = path.canonicalize()?; - if resolved == smoke_root || !resolved.starts_with(&smoke_root) { - return Err(anyhow!( - "refusing to delete non-smoke path: {}", - path.display() - )); - } - if path.is_dir() { - fs::remove_dir_all(path)?; - } else { - fs::remove_file(path)?; - } - } - Ok(()) -} - -fn write_json(path: &Path, value: &Value) -> Result<()> { - if let Some(parent) = path.parent() { - fs::create_dir_all(parent)?; - } - fs::write(path, format!("{}\n", serde_json::to_string_pretty(value)?))?; - Ok(()) -} - -fn require(condition: bool, message: &str) -> Result<()> { - if condition { - Ok(()) - } else { - Err(anyhow!("{message}")) - } -} - -fn take_path(args: &mut impl Iterator, name: &str) -> Result { - args.next() - .map(PathBuf::from) - .ok_or_else(|| anyhow!("{name} requires a value")) -} diff --git a/epiphany-core/src/bin/epiphany-phase6-pressure-smoke.rs b/epiphany-core/src/bin/epiphany-phase6-pressure-smoke.rs deleted file mode 100644 index 05672fec..00000000 --- a/epiphany-core/src/bin/epiphany-phase6-pressure-smoke.rs +++ /dev/null @@ -1,241 +0,0 @@ -use anyhow::Context; -use anyhow::Result; -use anyhow::anyhow; -use serde_json::Value; -use serde_json::json; -use std::env; -use std::fs; -use std::path::{Path, PathBuf}; -use std::time::Duration; - -#[allow(dead_code)] -#[path = "epiphany-mvp-status.rs"] -mod status_cli; - -const DEFAULT_APP_SERVER: &str = r"C:\Users\Meta\.cargo-target-codex\debug\codex-app-server.exe"; - -fn main() -> Result<()> { - let args = Args::parse()?; - let result = run_smoke(&args)?; - println!("{}", serde_json::to_string_pretty(&result)?); - Ok(()) -} - -#[derive(Debug)] -struct Args { - app_server: PathBuf, - codex_home: PathBuf, - result: PathBuf, - transcript: PathBuf, - stderr: PathBuf, -} - -impl Args { - fn parse() -> Result { - let root = env::current_dir().context("failed to resolve current dir")?; - let mut parsed = Self { - app_server: PathBuf::from(DEFAULT_APP_SERVER), - codex_home: root - .join(".epiphany-smoke") - .join("phase6-pressure-codex-home"), - result: root - .join(".epiphany-smoke") - .join("phase6-pressure-smoke-result.json"), - transcript: root - .join(".epiphany-smoke") - .join("phase6-pressure-smoke-transcript.jsonl"), - stderr: root - .join(".epiphany-smoke") - .join("phase6-pressure-smoke-server.stderr.log"), - }; - let mut args = env::args().skip(1); - while let Some(arg) = args.next() { - match arg.as_str() { - "--app-server" => parsed.app_server = take_path(&mut args, "--app-server")?, - "--codex-home" => parsed.codex_home = take_path(&mut args, "--codex-home")?, - "--result" => parsed.result = take_path(&mut args, "--result")?, - "--transcript" => parsed.transcript = take_path(&mut args, "--transcript")?, - "--stderr" => parsed.stderr = take_path(&mut args, "--stderr")?, - other => return Err(anyhow!("unknown argument: {other}")), - } - } - Ok(parsed) - } -} - -fn run_smoke(args: &Args) -> Result { - let root = env::current_dir().context("failed to resolve current dir")?; - let app_server = status_cli::absolute_path(&args.app_server)?; - if !app_server.exists() { - return Err(anyhow!( - "codex app-server binary not found: {}", - app_server.display() - )); - } - let codex_home = status_cli::absolute_path(&args.codex_home)?; - let result_path = status_cli::absolute_path(&args.result)?; - let transcript_path = status_cli::absolute_path(&args.transcript)?; - let stderr_path = status_cli::absolute_path(&args.stderr)?; - reset_smoke_paths( - &root, - &[ - codex_home.clone(), - result_path.clone(), - transcript_path.clone(), - stderr_path.clone(), - ], - )?; - fs::create_dir_all(&codex_home) - .with_context(|| format!("failed to create {}", codex_home.display()))?; - - let mut client = status_cli::AppServerClient::start( - &app_server, - &codex_home, - &transcript_path, - &stderr_path, - )?; - client.send( - "initialize", - Some(json!({ - "clientInfo": { - "name": "epiphany-phase6-pressure-smoke", - "title": "Epiphany Phase 6 Pressure Smoke", - "version": "0.1.0", - }, - "capabilities": {"experimentalApi": true}, - })), - true, - )?; - client.send("initialized", None, false)?; - let started = client.send( - "thread/start", - Some(json!({"cwd": root.join("epiphany-core"), "ephemeral": true})), - true, - )?; - let thread_id = started - .pointer("/thread/id") - .and_then(Value::as_str) - .ok_or_else(|| anyhow!("thread/start response missing thread.id"))? - .to_string(); - - let notification_start = client.notification_len(); - let response = client.send( - "thread/epiphany/view", - Some(json!({"threadId": thread_id, "lenses": ["pressure"]})), - true, - )?; - require( - response.get("threadId").and_then(Value::as_str) == Some(&thread_id), - "pressure response should echo thread id", - )?; - assert_unknown_pressure(&response)?; - client.require_no_notification( - "thread/epiphany/stateUpdated", - notification_start, - Duration::from_secs(1), - )?; - - let final_read = client.send( - "thread/read", - Some(json!({"threadId": thread_id, "includeTurns": false})), - true, - )?; - require( - final_read.pointer("/thread/epiphanyState").is_none(), - "pressure reflection should not create Epiphany state", - )?; - - let result = json!({ - "threadId": thread_id, - "codexHome": codex_home, - "source": "thread/epiphany/view", - "status": response["pressure"]["status"], - "level": response["pressure"]["level"], - "basis": response["pressure"]["basis"], - "shouldPrepareCompaction": response["pressure"]["shouldPrepareCompaction"], - "stateUpdatedNotificationCount": client.notification_count( - "thread/epiphany/stateUpdated", - notification_start, - ), - "finalReadHasEpiphanyState": final_read.pointer("/thread/epiphanyState").is_some(), - }); - write_json(&result_path, &result)?; - Ok(result) -} - -fn assert_unknown_pressure(response: &Value) -> Result<()> { - let pressure = response - .get("pressure") - .ok_or_else(|| anyhow!("pressure response missing pressure object"))?; - require( - pressure.get("status").and_then(Value::as_str) == Some("unknown"), - "fresh pressure should be unknown", - )?; - require( - pressure.get("level").and_then(Value::as_str) == Some("unknown"), - "fresh pressure level should be unknown", - )?; - require( - pressure.get("basis").and_then(Value::as_str) == Some("unknown"), - "fresh pressure basis should be unknown", - )?; - require( - pressure - .get("shouldPrepareCompaction") - .and_then(Value::as_bool) - == Some(false), - "unknown pressure must not recommend compaction prep", - )?; - require( - pressure.get("usedTokens").is_none(), - "fresh pressure should not invent token usage", - ) -} - -fn reset_smoke_paths(root: &Path, paths: &[PathBuf]) -> Result<()> { - let smoke_root = root.join(".epiphany-smoke").canonicalize().or_else(|_| { - let smoke_root = root.join(".epiphany-smoke"); - fs::create_dir_all(&smoke_root)?; - smoke_root.canonicalize() - })?; - for path in paths { - if !path.exists() { - continue; - } - let resolved = path.canonicalize()?; - if resolved == smoke_root || !resolved.starts_with(&smoke_root) { - return Err(anyhow!( - "refusing to delete non-smoke path: {}", - path.display() - )); - } - if path.is_dir() { - fs::remove_dir_all(path)?; - } else { - fs::remove_file(path)?; - } - } - Ok(()) -} - -fn write_json(path: &Path, value: &Value) -> Result<()> { - if let Some(parent) = path.parent() { - fs::create_dir_all(parent)?; - } - fs::write(path, format!("{}\n", serde_json::to_string_pretty(value)?))?; - Ok(()) -} - -fn require(condition: bool, message: &str) -> Result<()> { - if condition { - Ok(()) - } else { - Err(anyhow!("{message}")) - } -} - -fn take_path(args: &mut impl Iterator, name: &str) -> Result { - args.next() - .map(PathBuf::from) - .ok_or_else(|| anyhow!("{name} requires a value")) -} diff --git a/epiphany-core/src/bin/epiphany-phase6-reorient-smoke.rs b/epiphany-core/src/bin/epiphany-phase6-reorient-smoke.rs deleted file mode 100644 index a6879a7d..00000000 --- a/epiphany-core/src/bin/epiphany-phase6-reorient-smoke.rs +++ /dev/null @@ -1,498 +0,0 @@ -use anyhow::Context; -use anyhow::Result; -use anyhow::anyhow; -use serde_json::Value; -use serde_json::json; -use std::env; -use std::fs; -use std::path::{Path, PathBuf}; -use std::thread; -use std::time::{Duration, Instant}; - -#[allow(dead_code)] -#[path = "epiphany-mvp-status.rs"] -mod status_cli; - -const DEFAULT_APP_SERVER: &str = r"C:\Users\Meta\.cargo-target-codex\debug\codex-app-server.exe"; -const WATCHED_RELATIVE_PATH: &str = "src/reorient_target.rs"; - -fn main() -> Result<()> { - let args = Args::parse()?; - let result = run_smoke(&args)?; - println!("{}", serde_json::to_string_pretty(&result)?); - Ok(()) -} - -#[derive(Debug)] -struct Args { - app_server: PathBuf, - codex_home: PathBuf, - workspace: PathBuf, - result: PathBuf, - transcript: PathBuf, - stderr: PathBuf, -} - -impl Args { - fn parse() -> Result { - let root = env::current_dir().context("failed to resolve current dir")?; - let mut parsed = Self { - app_server: PathBuf::from(DEFAULT_APP_SERVER), - codex_home: root - .join(".epiphany-smoke") - .join("phase6-reorient-codex-home"), - workspace: root - .join(".epiphany-smoke") - .join("phase6-reorient-workspace"), - result: root - .join(".epiphany-smoke") - .join("phase6-reorient-smoke-result.json"), - transcript: root - .join(".epiphany-smoke") - .join("phase6-reorient-smoke-transcript.jsonl"), - stderr: root - .join(".epiphany-smoke") - .join("phase6-reorient-smoke-server.stderr.log"), - }; - let mut args = env::args().skip(1); - while let Some(arg) = args.next() { - match arg.as_str() { - "--app-server" => parsed.app_server = take_path(&mut args, "--app-server")?, - "--codex-home" => parsed.codex_home = take_path(&mut args, "--codex-home")?, - "--workspace" => parsed.workspace = take_path(&mut args, "--workspace")?, - "--result" => parsed.result = take_path(&mut args, "--result")?, - "--transcript" => parsed.transcript = take_path(&mut args, "--transcript")?, - "--stderr" => parsed.stderr = take_path(&mut args, "--stderr")?, - other => return Err(anyhow!("unknown argument: {other}")), - } - } - Ok(parsed) - } -} - -fn run_smoke(args: &Args) -> Result { - let root = env::current_dir().context("failed to resolve current dir")?; - let app_server = status_cli::absolute_path(&args.app_server)?; - if !app_server.exists() { - return Err(anyhow!( - "codex app-server binary not found: {}", - app_server.display() - )); - } - let codex_home = status_cli::absolute_path(&args.codex_home)?; - let workspace = status_cli::absolute_path(&args.workspace)?; - let result_path = status_cli::absolute_path(&args.result)?; - let transcript_path = status_cli::absolute_path(&args.transcript)?; - let stderr_path = status_cli::absolute_path(&args.stderr)?; - reset_smoke_paths( - &root, - &[ - codex_home.clone(), - workspace.clone(), - result_path.clone(), - transcript_path.clone(), - stderr_path.clone(), - ], - )?; - fs::create_dir_all(&codex_home) - .with_context(|| format!("failed to create {}", codex_home.display()))?; - let watched_file = prepare_workspace(&workspace)?; - - let mut client = status_cli::AppServerClient::start( - &app_server, - &codex_home, - &transcript_path, - &stderr_path, - )?; - client.send( - "initialize", - Some(json!({ - "clientInfo": { - "name": "epiphany-phase6-reorient-smoke", - "title": "Epiphany Phase 6 Reorient Smoke", - "version": "0.1.0", - }, - "capabilities": {"experimentalApi": true}, - })), - true, - )?; - client.send("initialized", None, false)?; - let started = client.send( - "thread/start", - Some(json!({"cwd": workspace, "ephemeral": true})), - true, - )?; - let thread_id = started - .pointer("/thread/id") - .and_then(Value::as_str) - .ok_or_else(|| anyhow!("thread/start response missing thread.id"))? - .to_string(); - - let missing_notification_start = client.notification_len(); - let missing_view = client.send( - "thread/epiphany/view", - Some(json!({"threadId": thread_id, "lenses": ["reorient"]})), - true, - )?; - let missing_response = missing_view - .get("reorient") - .ok_or_else(|| anyhow!("view response missing reorient lens"))?; - assert_missing_reorient(&missing_response)?; - client.require_no_notification( - "thread/epiphany/stateUpdated", - missing_notification_start, - Duration::from_secs(1), - )?; - - let update_notification_start = client.notification_len(); - let update = client.send( - "thread/epiphany/update", - Some(json!({ - "threadId": thread_id, - "expectedRevision": 0, - "patch": reorient_patch(), - })), - true, - )?; - require( - update.get("revision").and_then(Value::as_u64) == Some(1), - "reorient smoke patch should advance revision to 1", - )?; - client.wait_for_notification( - "thread/epiphany/stateUpdated", - update_notification_start, - Duration::from_secs(10), - )?; - - let ready_notification_start = client.notification_len(); - let ready_view = client.send( - "thread/epiphany/view", - Some(json!({"threadId": thread_id, "lenses": ["reorient"]})), - true, - )?; - let ready_response = ready_view - .get("reorient") - .ok_or_else(|| anyhow!("view response missing reorient lens"))?; - assert_ready_reorient(&ready_response)?; - client.require_no_notification( - "thread/epiphany/stateUpdated", - ready_notification_start, - Duration::from_secs(1), - )?; - - fs::write( - watched_file, - "pub fn reorient_target() -> &'static str {\n \"after\"\n}\n", - )?; - - let regather_notification_start = client.notification_len(); - let regather_response = wait_for_regather_reorient(&mut client, &thread_id)?; - assert_regather_reorient(®ather_response)?; - client.require_no_notification( - "thread/epiphany/stateUpdated", - regather_notification_start, - Duration::from_secs(1), - )?; - - let final_read = client.send( - "thread/read", - Some(json!({"threadId": thread_id, "includeTurns": false})), - true, - )?; - require( - final_read - .pointer("/thread/epiphanyState/revision") - .and_then(Value::as_u64) - == Some(1), - "reorient reflection should not mutate durable state", - )?; - - let result = json!({ - "threadId": thread_id, - "codexHome": codex_home, - "workspace": workspace, - "missingAction": missing_response["decision"]["action"], - "readyAction": ready_response["decision"]["action"], - "regatherAction": regather_response["decision"]["action"], - "regatherReasons": regather_response["decision"]["reasons"], - "checkpointChangedPaths": regather_response["decision"]["checkpointChangedPaths"], - "activeFrontierNodeIds": regather_response["decision"]["activeFrontierNodeIds"], - "stateUpdatedNotificationCount": client.notification_count( - "thread/epiphany/stateUpdated", - regather_notification_start, - ), - "finalReadRevision": final_read["thread"]["epiphanyState"]["revision"], - }); - write_json(&result_path, &result)?; - Ok(result) -} - -fn prepare_workspace(workspace: &Path) -> Result { - fs::create_dir_all(workspace)?; - let watched_file = workspace.join(WATCHED_RELATIVE_PATH); - fs::create_dir_all(watched_file.parent().expect("watched path has parent"))?; - fs::write( - &watched_file, - "pub fn reorient_target() -> &'static str {\n \"before\"\n}\n", - )?; - Ok(watched_file) -} - -fn reorient_patch() -> Value { - let code_ref = json!({ - "path": WATCHED_RELATIVE_PATH, - "start_line": 1, - "end_line": 3, - "symbol": "reorient_target" - }); - json!({ - "objective": "Decide whether a durable checkpoint still deserves to be resumed after rehydrate.", - "activeSubgoalId": "phase6-reorient-smoke", - "subgoals": [{ - "id": "phase6-reorient-smoke", - "title": "Live-smoke CRRC reorientation policy", - "status": "active", - "summary": "Resume when the checkpoint is still aligned; regather when the touched file proves it isn't." - }], - "graphs": { - "architecture": { - "nodes": [{ - "id": "reorient-target", - "title": "Reorient target", - "purpose": "Map the file the watcher will touch so reorientation can notice drift.", - "code_refs": [code_ref.clone()] - }] - }, - "dataflow": {"nodes": []}, - "links": [] - }, - "graphFrontier": { - "active_node_ids": ["reorient-target"], - "dirty_paths": [] - }, - "graphCheckpoint": { - "checkpoint_id": "ck-reorient-1", - "graph_revision": 1, - "summary": "Reorientation smoke graph checkpoint", - "frontier_node_ids": ["reorient-target"] - }, - "investigationCheckpoint": { - "checkpoint_id": "ix-reorient-1", - "kind": "source_gathering", - "disposition": "resume_ready", - "focus": "Verify the touched file before broad edits.", - "summary": "This checkpoint should remain resumable until the watched source moves.", - "next_action": "Resume the bounded slice if the watched source still matches the checkpoint.", - "captured_at_turn_id": "turn-phase6-reorient", - "code_refs": [code_ref] - }, - "churn": { - "understanding_status": "ready", - "diff_pressure": "low", - "graph_freshness": "fresh", - "unexplained_writes": 0 - } - }) -} - -fn assert_missing_reorient(response: &Value) -> Result<()> { - require( - response.get("source").and_then(Value::as_str) == Some("live"), - "missing reorient response should report live source", - )?; - require( - response.get("stateStatus").and_then(Value::as_str) == Some("missing"), - "missing reorient response should report missing state", - )?; - let decision = &response["decision"]; - require( - decision.get("action").and_then(Value::as_str) == Some("regather"), - "missing reorient response should regather", - )?; - require( - decision.get("checkpointStatus").and_then(Value::as_str) == Some("missing"), - "missing reorient response should report missing checkpoint", - )?; - require( - string_array_eq( - decision.get("reasons").and_then(Value::as_array), - &["missingState", "missingCheckpoint"], - ), - "missing reorient response should explain missing state and checkpoint", - ) -} - -fn assert_ready_reorient(response: &Value) -> Result<()> { - require( - response.get("source").and_then(Value::as_str) == Some("live"), - "ready reorient response should report live source", - )?; - require( - response.get("stateStatus").and_then(Value::as_str) == Some("ready"), - "ready reorient response should report ready state", - )?; - require( - response.get("stateRevision").and_then(Value::as_u64) == Some(1), - "ready reorient response should preserve revision identity", - )?; - let decision = &response["decision"]; - require( - decision.get("action").and_then(Value::as_str) == Some("resume"), - "clean checkpoint should remain resumable", - )?; - require( - decision.get("checkpointStatus").and_then(Value::as_str) == Some("resumeReady"), - "ready reorient response should report resume-ready checkpoint status", - )?; - require( - string_array_eq( - decision.get("reasons").and_then(Value::as_array), - &["checkpointReady"], - ), - "ready reorient response should explain that the checkpoint is still aligned", - )?; - require( - decision.get("checkpointId").and_then(Value::as_str) == Some("ix-reorient-1"), - "ready reorient response should expose the checkpoint id", - )?; - require( - decision.get("nextAction").and_then(Value::as_str) - == Some("Resume the bounded slice if the watched source still matches the checkpoint."), - "ready reorient response should preserve checkpoint next action", - )?; - require( - decision.get("watcherStatus").and_then(Value::as_str) == Some("clean"), - "ready reorient response should report a clean watcher before drift", - ) -} - -fn wait_for_regather_reorient( - client: &mut status_cli::AppServerClient, - thread_id: &str, -) -> Result { - let deadline = Instant::now() + Duration::from_secs(10); - let mut last_response = Value::Null; - while Instant::now() < deadline { - let response = client.send( - "thread/epiphany/view", - Some(json!({"threadId": thread_id, "lenses": ["reorient"]})), - true, - )?; - let reorient = response - .get("reorient") - .ok_or_else(|| anyhow!("view response missing reorient lens"))?; - if reorient.pointer("/decision/action").and_then(Value::as_str) == Some("regather") { - return Ok(reorient.clone()); - } - last_response = response; - thread::sleep(Duration::from_millis(200)); - } - Err(anyhow!( - "reorientation policy did not switch to regather before timeout; last response: {last_response}" - )) -} - -fn assert_regather_reorient(response: &Value) -> Result<()> { - let decision = &response["decision"]; - require( - decision.get("action").and_then(Value::as_str) == Some("regather"), - "touched checkpoint path should force regather", - )?; - require( - decision.get("checkpointStatus").and_then(Value::as_str) == Some("resumeReady"), - "regather response should preserve the underlying checkpoint disposition", - )?; - require( - string_array_eq( - decision.get("reasons").and_then(Value::as_array), - &["checkpointPathsChanged", "frontierChanged"], - ), - "regather response should explain watcher path and frontier drift", - )?; - let changed_paths = decision - .get("checkpointChangedPaths") - .and_then(Value::as_array) - .ok_or_else(|| anyhow!("regather response missing changed paths"))?; - require( - changed_paths - .iter() - .filter_map(Value::as_str) - .map(|path| path.replace('\\', "/")) - .any(|path| path == WATCHED_RELATIVE_PATH), - "regather response should report the changed checkpoint path", - )?; - require( - string_array_eq( - decision - .get("activeFrontierNodeIds") - .and_then(Value::as_array), - &["reorient-target"], - ), - "regather response should report touched frontier nodes", - )?; - require( - decision - .get("note") - .and_then(Value::as_str) - .is_some_and(|note| note.starts_with("Re-gather before editing:")), - "regather response should explain why the checkpoint is no longer safe to resume", - ) -} - -fn string_array_eq(values: Option<&Vec>, expected: &[&str]) -> bool { - values.is_some_and(|values| { - values.len() == expected.len() - && values - .iter() - .zip(expected) - .all(|(value, expected)| value.as_str() == Some(*expected)) - }) -} - -fn reset_smoke_paths(root: &Path, paths: &[PathBuf]) -> Result<()> { - let smoke_root = root.join(".epiphany-smoke").canonicalize().or_else(|_| { - let smoke_root = root.join(".epiphany-smoke"); - fs::create_dir_all(&smoke_root)?; - smoke_root.canonicalize() - })?; - for path in paths { - if !path.exists() { - continue; - } - let resolved = path.canonicalize()?; - if resolved == smoke_root || !resolved.starts_with(&smoke_root) { - return Err(anyhow!( - "refusing to delete non-smoke path: {}", - path.display() - )); - } - if path.is_dir() { - fs::remove_dir_all(path)?; - } else { - fs::remove_file(path)?; - } - } - Ok(()) -} - -fn write_json(path: &Path, value: &Value) -> Result<()> { - if let Some(parent) = path.parent() { - fs::create_dir_all(parent)?; - } - fs::write(path, format!("{}\n", serde_json::to_string_pretty(value)?))?; - Ok(()) -} - -fn require(condition: bool, message: &str) -> Result<()> { - if condition { - Ok(()) - } else { - Err(anyhow!("{message}")) - } -} - -fn take_path(args: &mut impl Iterator, name: &str) -> Result { - args.next() - .map(PathBuf::from) - .ok_or_else(|| anyhow!("{name} requires a value")) -} diff --git a/epiphany-core/src/bin/epiphany-phase6-scene-smoke.rs b/epiphany-core/src/bin/epiphany-phase6-scene-smoke.rs deleted file mode 100644 index 403ab7fe..00000000 --- a/epiphany-core/src/bin/epiphany-phase6-scene-smoke.rs +++ /dev/null @@ -1,646 +0,0 @@ -use anyhow::Context; -use anyhow::Result; -use anyhow::anyhow; -use serde_json::Value; -use serde_json::json; -use std::env; -use std::fs; -use std::path::{Path, PathBuf}; -use std::time::Duration; - -#[allow(dead_code)] -#[path = "epiphany-mvp-status.rs"] -mod status_cli; - -const DEFAULT_APP_SERVER: &str = r"C:\Users\Meta\.cargo-target-codex\debug\codex-app-server.exe"; - -fn main() -> Result<()> { - let args = Args::parse()?; - let result = run_smoke(&args)?; - println!("{}", serde_json::to_string_pretty(&result)?); - Ok(()) -} - -#[derive(Debug)] -struct Args { - app_server: PathBuf, - codex_home: PathBuf, - result: PathBuf, - transcript: PathBuf, - stderr: PathBuf, -} - -impl Args { - fn parse() -> Result { - let root = env::current_dir().context("failed to resolve current dir")?; - let mut parsed = Self { - app_server: PathBuf::from(DEFAULT_APP_SERVER), - codex_home: root.join(".epiphany-smoke").join("phase6-scene-codex-home"), - result: root - .join(".epiphany-smoke") - .join("phase6-scene-smoke-result.json"), - transcript: root - .join(".epiphany-smoke") - .join("phase6-scene-smoke-transcript.jsonl"), - stderr: root - .join(".epiphany-smoke") - .join("phase6-scene-smoke-server.stderr.log"), - }; - let mut args = env::args().skip(1); - while let Some(arg) = args.next() { - match arg.as_str() { - "--app-server" => parsed.app_server = take_path(&mut args, "--app-server")?, - "--codex-home" => parsed.codex_home = take_path(&mut args, "--codex-home")?, - "--result" => parsed.result = take_path(&mut args, "--result")?, - "--transcript" => parsed.transcript = take_path(&mut args, "--transcript")?, - "--stderr" => parsed.stderr = take_path(&mut args, "--stderr")?, - other => return Err(anyhow!("unknown argument: {other}")), - } - } - Ok(parsed) - } -} - -fn run_smoke(args: &Args) -> Result { - let root = env::current_dir().context("failed to resolve current dir")?; - let app_server = status_cli::absolute_path(&args.app_server)?; - if !app_server.exists() { - return Err(anyhow!( - "codex app-server binary not found: {}", - app_server.display() - )); - } - let codex_home = status_cli::absolute_path(&args.codex_home)?; - let result_path = status_cli::absolute_path(&args.result)?; - let transcript_path = status_cli::absolute_path(&args.transcript)?; - let stderr_path = status_cli::absolute_path(&args.stderr)?; - reset_smoke_paths( - &root, - &[ - codex_home.clone(), - result_path.clone(), - transcript_path.clone(), - stderr_path.clone(), - ], - )?; - fs::create_dir_all(&codex_home) - .with_context(|| format!("failed to create {}", codex_home.display()))?; - - let mut client = status_cli::AppServerClient::start( - &app_server, - &codex_home, - &transcript_path, - &stderr_path, - )?; - client.send( - "initialize", - Some(json!({ - "clientInfo": { - "name": "epiphany-phase6-scene-smoke", - "title": "Epiphany Phase 6 Scene Smoke", - "version": "0.1.0", - }, - "capabilities": {"experimentalApi": true}, - })), - true, - )?; - client.send("initialized", None, false)?; - let started = client.send( - "thread/start", - Some(json!({"cwd": root.join("epiphany-core"), "ephemeral": true})), - true, - )?; - let thread_id = started - .pointer("/thread/id") - .and_then(Value::as_str) - .ok_or_else(|| anyhow!("thread/start response missing thread.id"))? - .to_string(); - - let missing_response = client.send( - "thread/epiphany/view", - Some(json!({"threadId": thread_id, "lenses": ["scene"]})), - true, - )?; - assert_missing_scene(&missing_response["scene"])?; - - let update_notification_start = client.notification_len(); - let update = client.send( - "thread/epiphany/update", - Some(json!({ - "threadId": thread_id, - "expectedRevision": 0, - "patch": initial_scene_patch(), - })), - true, - )?; - require( - update.get("revision").and_then(Value::as_u64) == Some(1), - "initial scene patch should advance revision to 1", - )?; - let update_notification = client.wait_for_notification( - "thread/epiphany/stateUpdated", - update_notification_start, - Duration::from_secs(10), - )?; - require( - update_notification - .pointer("/params/revision") - .and_then(Value::as_u64) - == Some(1), - "initial update notification should expose revision 1", - )?; - - for index in 2..=6 { - let update_notification_start = client.notification_len(); - let update = client.send( - "thread/epiphany/update", - Some(json!({ - "threadId": thread_id, - "expectedRevision": index - 1, - "patch": { - "evidence": [evidence_record(index)], - "observations": [observation_record(index)], - }, - })), - true, - )?; - require( - update.get("revision").and_then(Value::as_u64) == Some(index), - &format!("record update {index} should advance revision to {index}"), - )?; - let update_notification = client.wait_for_notification( - "thread/epiphany/stateUpdated", - update_notification_start as usize, - Duration::from_secs(10), - )?; - require( - update_notification - .pointer("/params/revision") - .and_then(Value::as_u64) - == Some(index), - &format!("record update {index} notification should expose revision {index}"), - )?; - } - - let scene_notification_start = client.notification_len(); - let ready_response = client.send( - "thread/epiphany/view", - Some(json!({"threadId": thread_id, "lenses": ["scene"]})), - true, - )?; - require( - ready_response.get("threadId").and_then(Value::as_str) == Some(&thread_id), - "scene response should echo thread id", - )?; - assert_ready_scene(&ready_response["scene"], 6)?; - client.require_no_notification( - "thread/epiphany/stateUpdated", - scene_notification_start, - Duration::from_secs(1), - )?; - - let final_read = client.send( - "thread/read", - Some(json!({"threadId": thread_id, "includeTurns": false})), - true, - )?; - require( - final_read - .pointer("/thread/epiphanyState/revision") - .and_then(Value::as_u64) - == Some(6), - "scene should not mutate state revision", - )?; - - let scene = &ready_response["scene"]; - let result = json!({ - "threadId": thread_id, - "codexHome": codex_home, - "missingStateStatus": missing_response["scene"]["stateStatus"], - "missingAvailableActions": missing_response["scene"]["availableActions"], - "readyStateStatus": scene["stateStatus"], - "readySource": scene["source"], - "readyRevision": scene["revision"], - "readyAvailableActions": scene["availableActions"], - "investigationCheckpointId": scene["investigationCheckpoint"]["checkpointId"], - "investigationDisposition": scene["investigationCheckpoint"]["disposition"], - "latestObservationIds": ids(&scene["observations"]["latest"]), - "latestEvidenceIds": ids(&scene["evidence"]["latest"]), - "retrievalStatus": scene["retrieval"]["status"], - "sceneNotificationCount": client.notification_count( - "thread/epiphany/stateUpdated", - scene_notification_start, - ), - "finalReadRevision": final_read["thread"]["epiphanyState"]["revision"], - }); - write_json(&result_path, &result)?; - Ok(result) -} - -fn mapper_code_ref() -> Value { - json!({ - "path": "app-server/src/codex_message_processor.rs", - "start_line": 10573, - "end_line": 10689, - "symbol": "map_epiphany_scene" - }) -} - -fn evidence_record(index: u64) -> Value { - json!({ - "id": format!("ev-phase6-scene-{index}"), - "kind": "smoke-test", - "status": "ok", - "summary": format!("Scene smoke evidence {index} should appear newest-first."), - "code_refs": [mapper_code_ref()] - }) -} - -fn observation_record(index: u64) -> Value { - json!({ - "id": format!("obs-phase6-scene-{index}"), - "summary": format!("Scene smoke observation {index} should appear newest-first."), - "source_kind": "smoke", - "status": "ok", - "code_refs": [mapper_code_ref()], - "evidence_ids": [format!("ev-phase6-scene-{index}")] - }) -} - -fn initial_scene_patch() -> Value { - json!({ - "objective": "Expose live Epiphany scene reflection without creating a second source of truth.", - "activeSubgoalId": "phase6-scene-smoke", - "investigationCheckpoint": { - "checkpoint_id": "phase6-scene-investigation", - "kind": "slice_planning", - "disposition": "resume_ready", - "focus": "Bank the active scene-smoke packet before the lights go out.", - "summary": "Scene reflection should surface the durable investigation packet.", - "next_action": "Patch the remaining smoke coverage and rerun the focused verifier pass.", - "captured_at_turn_id": "turn-phase6-scene", - "open_questions": ["Should scene reflection compress checkpoint counts or expose full detail?"], - "code_refs": [mapper_code_ref()], - "evidence_ids": ["ev-phase6-scene-1"] - }, - "subgoals": [ - { - "id": "phase6-scene-smoke", - "title": "Live-smoke scene reflection", - "status": "active", - "summary": "The app-server scene surface should reflect the live typed state." - }, - { - "id": "phase6-job-surface", - "title": "Design job/progress reflection", - "status": "queued", - "summary": "The next larger organ after scene smoke." - } - ], - "invariants": [ - { - "id": "inv-scene-read-only", - "description": "thread/epiphany/view scene lens must not mutate Epiphany state.", - "status": "ok" - }, - { - "id": "inv-gui-not-source", - "description": "Scene projection may reflect state but must not become canonical understanding.", - "status": "ok" - } - ], - "graphs": { - "architecture": { - "nodes": [{ - "id": "scene-projection", - "title": "Scene projection", - "purpose": "Compress authoritative Epiphany state into a client-readable reflection.", - "code_refs": [mapper_code_ref()] - }] - }, - "dataflow": { - "nodes": [{ - "id": "typed-state", - "title": "Typed Epiphany state", - "purpose": "Remain the authoritative source behind scene reflection." - }] - }, - "links": [{ - "dataflow_node_id": "typed-state", - "architecture_node_id": "scene-projection", - "relationship": "derived-reflection" - }] - }, - "graphFrontier": { - "active_node_ids": ["scene-projection"], - "dirty_paths": ["app-server/src/codex_message_processor.rs"] - }, - "graphCheckpoint": { - "checkpoint_id": "phase6-scene-smoke", - "graph_revision": 1, - "summary": "Scene reflection is the active Phase 6 smoke target.", - "frontier_node_ids": ["scene-projection"] - }, - "churn": { - "understanding_status": "ready", - "diff_pressure": "low", - "graph_freshness": "fresh", - "unexplained_writes": 0 - }, - "evidence": [evidence_record(1)], - "observations": [observation_record(1)] - }) -} - -fn assert_missing_scene(scene: &Value) -> Result<()> { - require( - scene.get("stateStatus").and_then(Value::as_str) == Some("missing"), - "initial scene should report missing state", - )?; - require( - scene.get("source").and_then(Value::as_str) == Some("live"), - "loaded missing scene should report live source", - )?; - require( - string_array_eq( - scene.get("availableActions").and_then(Value::as_array), - &[ - "index", - "retrieve", - "distill", - "context", - "planning", - "graphQuery", - "jobs", - "roles", - "coordinator", - "roleLaunch", - "roleResult", - "roleAccept", - "jobLaunch", - "freshness", - "pressure", - "reorient", - "crrc", - "update", - ], - ), - "missing live scene should expose only bootstrap actions", - )?; - require( - scene - .pointer("/observations/totalCount") - .and_then(Value::as_u64) - == Some(0), - "missing scene should not report observations", - )?; - require( - scene - .pointer("/evidence/totalCount") - .and_then(Value::as_u64) - == Some(0), - "missing scene should not report evidence", - ) -} - -fn assert_ready_scene(scene: &Value, expected_revision: u64) -> Result<()> { - require( - scene.get("stateStatus").and_then(Value::as_str) == Some("ready"), - "scene should report ready state after update", - )?; - require( - scene.get("source").and_then(Value::as_str) == Some("live"), - "loaded scene should report live source", - )?; - require( - scene.get("revision").and_then(Value::as_u64) == Some(expected_revision), - "scene should expose current revision", - )?; - require( - scene - .get("objective") - .and_then(Value::as_str) - .is_some_and(|objective| { - objective.starts_with("Expose live Epiphany scene reflection") - }), - "scene should expose objective", - )?; - require( - scene.pointer("/activeSubgoal/id").and_then(Value::as_str) == Some("phase6-scene-smoke"), - "scene should expose active subgoal", - )?; - require( - scene.get("invariantStatusCounts") == Some(&json!([{"status": "ok", "count": 2}])), - "scene should summarize invariant status counts", - )?; - require( - scene - .pointer("/graph/architectureNodeCount") - .and_then(Value::as_u64) - == Some(1), - "scene should count architecture nodes", - )?; - require( - scene - .pointer("/graph/dataflowNodeCount") - .and_then(Value::as_u64) - == Some(1), - "scene should count dataflow nodes", - )?; - require( - scene.pointer("/graph/linkCount").and_then(Value::as_u64) == Some(1), - "scene should count graph links", - )?; - require( - string_array_eq( - scene - .pointer("/graph/activeNodeIds") - .and_then(Value::as_array), - &["scene-projection"], - ), - "scene should expose graph frontier active nodes", - )?; - require( - scene.pointer("/graph/checkpointId").and_then(Value::as_str) == Some("phase6-scene-smoke"), - "scene should expose graph checkpoint", - )?; - require( - scene - .pointer("/investigationCheckpoint/checkpointId") - .and_then(Value::as_str) - == Some("phase6-scene-investigation"), - "scene should expose the investigation checkpoint id", - )?; - require( - scene - .pointer("/investigationCheckpoint/disposition") - .and_then(Value::as_str) - == Some("resume_ready"), - "scene should expose the checkpoint disposition", - )?; - require( - scene - .pointer("/retrieval/workspaceRoot") - .and_then(Value::as_str) - .is_some_and(|root| root.ends_with("epiphany-core")), - "scene should include live retrieval summary backfill", - )?; - require( - scene - .pointer("/observations/totalCount") - .and_then(Value::as_u64) - == Some(6), - "scene should count all observations", - )?; - require( - scene - .pointer("/evidence/totalCount") - .and_then(Value::as_u64) - == Some(6), - "scene should count all evidence", - )?; - require( - ids_eq( - scene - .pointer("/observations/latest") - .and_then(Value::as_array), - &[ - "obs-phase6-scene-6", - "obs-phase6-scene-5", - "obs-phase6-scene-4", - "obs-phase6-scene-3", - "obs-phase6-scene-2", - ], - ), - "scene latest observations should be newest-first and bounded", - )?; - require( - ids_eq( - scene.pointer("/evidence/latest").and_then(Value::as_array), - &[ - "ev-phase6-scene-6", - "ev-phase6-scene-5", - "ev-phase6-scene-4", - "ev-phase6-scene-3", - "ev-phase6-scene-2", - ], - ), - "scene latest evidence should be newest-first and bounded", - )?; - require( - scene.pointer("/churn/diffPressure").and_then(Value::as_str) == Some("low"), - "scene should expose churn pressure", - )?; - require( - string_array_eq( - scene.get("availableActions").and_then(Value::as_array), - &[ - "index", - "retrieve", - "distill", - "context", - "planning", - "graphQuery", - "jobs", - "roles", - "coordinator", - "roleLaunch", - "roleResult", - "roleAccept", - "jobLaunch", - "freshness", - "pressure", - "reorient", - "crrc", - "reorientLaunch", - "update", - "jobInterrupt", - "propose", - "promote", - ], - ), - "ready live scene should expose full loaded-state actions", - ) -} - -fn ids(value: &Value) -> Value { - json!( - value - .as_array() - .map(|items| { - items - .iter() - .filter_map(|item| item.get("id").and_then(Value::as_str)) - .collect::>() - }) - .unwrap_or_default() - ) -} - -fn ids_eq(values: Option<&Vec>, expected: &[&str]) -> bool { - values.is_some_and(|values| { - values.len() == expected.len() - && values - .iter() - .zip(expected) - .all(|(value, expected)| value.get("id").and_then(Value::as_str) == Some(*expected)) - }) -} - -fn string_array_eq(values: Option<&Vec>, expected: &[&str]) -> bool { - values.is_some_and(|values| { - values.len() == expected.len() - && values - .iter() - .zip(expected) - .all(|(value, expected)| value.as_str() == Some(*expected)) - }) -} - -fn reset_smoke_paths(root: &Path, paths: &[PathBuf]) -> Result<()> { - let smoke_root = root.join(".epiphany-smoke").canonicalize().or_else(|_| { - let smoke_root = root.join(".epiphany-smoke"); - fs::create_dir_all(&smoke_root)?; - smoke_root.canonicalize() - })?; - for path in paths { - if !path.exists() { - continue; - } - let resolved = path.canonicalize()?; - if resolved == smoke_root || !resolved.starts_with(&smoke_root) { - return Err(anyhow!( - "refusing to delete non-smoke path: {}", - path.display() - )); - } - if path.is_dir() { - fs::remove_dir_all(path)?; - } else { - fs::remove_file(path)?; - } - } - Ok(()) -} - -fn write_json(path: &Path, value: &Value) -> Result<()> { - if let Some(parent) = path.parent() { - fs::create_dir_all(parent)?; - } - fs::write(path, format!("{}\n", serde_json::to_string_pretty(value)?))?; - Ok(()) -} - -fn require(condition: bool, message: &str) -> Result<()> { - if condition { - Ok(()) - } else { - Err(anyhow!("{message}")) - } -} - -fn take_path(args: &mut impl Iterator, name: &str) -> Result { - args.next() - .map(PathBuf::from) - .ok_or_else(|| anyhow!("{name} requires a value")) -} diff --git a/epiphany-core/src/distillation.rs b/epiphany-core/src/distillation.rs index 0ca7347c..7b90d8c9 100644 --- a/epiphany-core/src/distillation.rs +++ b/epiphany-core/src/distillation.rs @@ -206,7 +206,7 @@ mod tests { let proposal = distill_observation(EpiphanyDistillInput { source_kind: "smoke".to_string(), status: "ok".to_string(), - subject: Some("thread/epiphany/update".to_string()), + subject: Some("native-state-update".to_string()), text: " live smoke returned revision 1 ".to_string(), code_refs: vec![EpiphanyCodeRef { path: PathBuf::from("src/lib.rs"), @@ -229,7 +229,7 @@ mod tests { assert_eq!(proposal.evidence.kind, "verification"); assert_eq!( proposal.observation.summary, - "thread/epiphany/update: live smoke returned revision 1" + "native-state-update: live smoke returned revision 1" ); assert_eq!(proposal.evidence.code_refs.len(), 1); } diff --git a/epiphany-core/src/prompts/epiphany_specialists.toml b/epiphany-core/src/prompts/epiphany_specialists.toml index 5deb3fb0..70baa481 100644 --- a/epiphany-core/src/prompts/epiphany_specialists.toml +++ b/epiphany-core/src/prompts/epiphany_specialists.toml @@ -75,7 +75,7 @@ The current strategic north star is not local cleverness. It is a fundable path When planning from investment or world-scale pressure, keep means and ends aligned. Capital is fuel, not a throne. Bifrost owns governed topics, work items, dispatches, receipts, credit, and reward pressure. Epiphany executes bounded work and produces reviewable artifacts. CultMesh/CultNet carry typed state and public/private knowledge flows. Persona, Discord, VoidBot, and ad hoc scripts may mirror or explain, but they must not become shadow governance. Every Objective Draft aimed at fundraising, public proof, external repos, design partners, rewards, or support programs must include consent, public/private export safety, compute/output measurement, maintainer review, legal/policy gates where relevant, and a clear proof artifact. Read the planning packet as living material: captures, backlog items, roadmap streams, GitHub issue source refs, active objective, scratch, recent evidence, and current constraints. Separate dream from near-term, annoyance from blocker, and plausible work from an objective that is actually bounded enough to adopt. Return a compact structured result that names the planning seam you synthesized, what source records matter, which Objective Drafts were added or revised, what remains uncertain, and the next safe planning move. -`statePatch` is part of the Imagination job. Include a reviewable `thread/epiphany/update` patch using only `planning` plus optional valid `observations` and `evidence`. The patch must return the full replacement planning object and include at least one `objective_drafts[]` record with status `draft`. Do not mutate `objective`, `activeSubgoalId`, `subgoals`, graphs, checkpoints, scratch, jobs, invariants, churn, mode, or implementation code. +`statePatch` is part of the Imagination job. Include a Mind-reviewable native state patch using only `planning` plus optional valid `observations` and `evidence`. The patch must return the full replacement planning object and include at least one `objective_drafts[]` record with status `draft`. Do not mutate `objective`, `activeSubgoalId`, `subgoals`, graphs, checkpoints, scratch, jobs, invariants, churn, mode, or implementation code. Every Objective Draft must preserve explicit adoption gates: `status` stays `draft` unless a human later adopts it, `acceptance_criteria` must not be empty, and `review_gates` should include human adoption or an equivalent review phrase. Every new backlog item or capture must keep source refs where known; GitHub issues and investment dossiers remain source refs, not internal authority. If the draft serves the angel-investor/global-network roadmap, its acceptance criteria must include Bifrost-first provenance, receipt/ledger evidence, cost or compute measurement, public/private export review, and a bounded demo or proof-sprint artifact. Do not edit files, do not launch implementation, do not accept your own output, and do not call planning done because the shape of a plan feels complete. The point is a future the user can inspect without being dragged into it. ''' @@ -88,7 +88,7 @@ In the work loop, Modeling follows Soul: after Hands changes the body and Soul v Inspect source before you trust the model; when the map feels warm but the source feels cold, believe the source and mark the wound. Name the living seam, the open wound, and the next safe modeling move in plain language. Return a compact structured result that says whether the checkpoint or map should be updated, what files you inspected, what frontier nodes matter, and where the next agent can safely place its hands. -`statePatch` is part of the modeling job. If you return `checkpoint-ready`, `checkpoint-update-needed`, or `regather-needed`, include a reviewable `thread/epiphany/update` patch using only modeling-safe fields (`graphs`, `graphFrontier`, `graphCheckpoint`, `scratch`, `investigationCheckpoint`, plus optional valid `observations` and `evidence`). The patch must include at least one durable modeling field: `graphs`, `graphFrontier`, `graphCheckpoint`, `scratch`, or `investigationCheckpoint`. Do not return an observations-only patch. Every observation must include `id`, `summary`, `source_kind`, `status`, and at least one `evidence_ids` entry; every new evidence record must include `id`, `kind`, `status`, and `summary`. For graph growth, return the full replacement graph object with the new or revised nodes/edges already woven into the current anatomy. If you believe no durable state change is needed, still return a small `scratch`, `graphCheckpoint`, or `investigationCheckpoint` patch that banks why the existing model is source-grounded; otherwise the coordinator cannot advance the lane. +`statePatch` is part of the modeling job. If you return `checkpoint-ready`, `checkpoint-update-needed`, or `regather-needed`, include a Mind-reviewable native state patch using only modeling-safe fields (`graphs`, `graphFrontier`, `graphCheckpoint`, `scratch`, `investigationCheckpoint`, plus optional valid `observations` and `evidence`). The patch must include at least one durable modeling field: `graphs`, `graphFrontier`, `graphCheckpoint`, `scratch`, or `investigationCheckpoint`. Do not return an observations-only patch. Every observation must include `id`, `summary`, `source_kind`, `status`, and at least one `evidence_ids` entry; every new evidence record must include `id`, `kind`, `status`, and `summary`. For graph growth, return the full replacement graph object with the new or revised nodes/edges already woven into the current anatomy. If you believe no durable state change is needed, still return a small `scratch`, `graphCheckpoint`, or `investigationCheckpoint` patch that banks why the existing model is source-grounded; otherwise the coordinator cannot advance the lane. Before returning a `statePatch`, validate it as if acceptance will reject you. `graphs.architecture.nodes[].id` defines the only valid `architecture_node_id` values. `graphs.dataflow.nodes[].id` defines the only valid `dataflow_node_id` values. Every `graphs.links[]` entry must point from one existing dataflow node to one existing architecture node; never put a dataflow id in `architecture_node_id` or an architecture id in `dataflow_node_id`. If a concept needs to exist in both layers, create or reuse one node in each layer and link them explicitly. Every frontier/checkpoint node id you name must exist in the graph you return. Do not confuse the modeling verdict with checkpoint enum values. `verdict` may be `checkpoint-ready`, but `statePatch.investigationCheckpoint.disposition` must be exactly `resume_ready` or `regather_required`; never write `checkpoint_ready`. Do not edit files, do not implement product code, do not verify as if you were the reviewer, do not change jobs/subgoals/objective/invariants/churn/mode, and do not promote or accept your own output. @@ -116,7 +116,7 @@ The Eyes improve themselves by seeing earlier and hallucinating less. Record whi Observe the objective, current model, source clues, and recent evidence. Identify whether the work is a known domain with existing algorithms, libraries, vendor guidance, engine APIs, canonical papers, or mature prior art. Search local source/docs first. Use current external docs or web research when the facts are time-sensitive, vendor-specific, or likely to have changed. Prefer primary sources, official docs, papers, and established libraries over blogs and vibes. Return a compact structured result naming the known approaches considered, sources consulted, fit/rejection rationale, risks, and the smallest source-grounded recommendation for modeling or implementation. -`statePatch` is part of the Eyes job. Include a reviewable `thread/epiphany/update` patch using only `observations`, `evidence`, `scratch`, and optional `investigationCheckpoint`. The patch must include at least one evidence record and at least one observation that cites it. Use `scratch` or `investigationCheckpoint` to bank what source seam was looked at, what remains missing, and which lane should act next. Do not mutate objective, subgoals, invariants, planning, graphs, graph frontier, graph checkpoint, jobs, churn, mode, or implementation code. +`statePatch` is part of the Eyes job. Include a Mind-reviewable native state patch using only `observations`, `evidence`, `scratch`, and optional `investigationCheckpoint`. The patch must include at least one evidence record and at least one observation that cites it. Use `scratch` or `investigationCheckpoint` to bank what source seam was looked at, what remains missing, and which lane should act next. Do not mutate objective, subgoals, invariants, planning, graphs, graph frontier, graph checkpoint, jobs, churn, mode, or implementation code. Do not edit files, do not promote your own findings, do not invent a grand architecture, and do not let research become procrastination. The Eyes gather citable evidence when the path is dark; Hands acts on the body, Soul verifies the consequence, and Modeling maps the verified anatomy before the next cut. ''' diff --git a/notes/epiphany-app-server-client-matrix.md b/notes/epiphany-app-server-client-matrix.md index 4d525b49..40689d22 100644 --- a/notes/epiphany-app-server-client-matrix.md +++ b/notes/epiphany-app-server-client-matrix.md @@ -7,20 +7,9 @@ handler itself do not count as clients. ## Living explicit compatibility clients -| Route | Executable consumer | Compatibility purpose | -|---|---|---| -| `view` | phase-6 scene/reorient/pressure/planning smokes; `epiphany-mvp-status --codex` | old aggregate read projection | -| `roleResult` | `epiphany-mvp-status --codex` | old worker-result read projection | -| `freshness` | phase-6 freshness smoke | old freshness projection | -| `context` | phase-6 context smoke | old context projection | -| `graphQuery` | phase-6 graph-query smoke | old graph projection | -| `reorientResult` | `epiphany-mvp-status --codex` | old reorientation-result projection | -| `jobInterrupt` | `epiphany-mvp-status --codex` | explicit delegated interruption fallback | -| `update` | phase-6 scene/context/freshness/graph/reorient/planning smokes | explicit delegated state-update fallback | - -These are retained only while the named compatibility binaries remain. They do -not justify route-local policy, implicit triggers, Codex state ownership, or new -clients. +None. The phase-6 app-server smokes and `epiphany-mvp-status --codex` fallback +were the final clients and are deleted. MVP status and interruption now use the +native coordinator/state stores exclusively. ## Removed unconsumed routes diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index c93bbddc..2aa0b139 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -1963,6 +1963,14 @@ and TypeScript fixtures were regenerated; their two fixture-equivalence tests, protocol/bridge compilation, and full app-server compilation pass. Next map the real invariant behind each phase-6 smoke and `epiphany-mvp-status --codex`, then migrate or retire those clients rather than preserving JSON-RPC for its own tests. +That cut is complete. All phase-6 app-server smokes plus the app-server MVP +status smoke are deleted; MVP status and interruption are native-only. The final +eight request methods, two notifications, dispatch/handlers, `ThreadEpiphany*` +DTO slab, generated exports, Codex thread-state projection, and legacy rollout +migration are gone. Schema fixture equivalence, full app-server compilation, +and native status interruption tests pass. `epiphany-codex-bridge` now contains +only the file-watcher invalidation manager; move that host-owned organ into +app-server and delete the bridge crate next. ## Immediate Re-entry Instruction diff --git a/notes/native-coordinator-liberation-map.md b/notes/native-coordinator-liberation-map.md index d065f72b..0869157a 100644 --- a/notes/native-coordinator-liberation-map.md +++ b/notes/native-coordinator-liberation-map.md @@ -391,3 +391,13 @@ hierarchy and retrieval result/index projection shapes. Bridge-only distill, propose, job-document, index, and retrieve conversions plus the entire `retrieve_protocol` module are deleted. Regenerated JSON/TypeScript fixtures contain none of those types; their in-memory fixture comparison passes. + +The final eight-route compatibility surface is gone too. Seven phase-6 +app-server smoke binaries and the app-server-backed MVP status smoke were +deleted; `epiphany-mvp-status` has one native status/interruption path and no +Codex transport client. App-server request/notification registrations, +dispatch, route modules, all `ThreadEpiphany*` DTOs, generated exports, generic +Codex `Thread.epiphanyState`, and legacy rollout-state migration are deleted. +`codex-app-server-protocol` no longer depends on `epiphany-state-model`. +`epiphany-codex-bridge` has collapsed to its only living consumer surface: the +Codex-hosted file-watcher invalidation manager. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 815b34a18ee0c8b6d0474c4eadd86f6df0d1a9bc..73ce1e82728ca1de3bb7eb183885648a10a1096a 100644 GIT binary patch delta 474 zcmZ8dJxc>Y5cOhABUp+lgaO;+B0&O4=NH(B9|;!0X1$x-t?un^cK6PtN@1a`NC;Lo z78VwQh1gm7C#?M+&XH(gG3+vL=FNNW{i%HOTz*;c7VFK{Mx*;VSL%Gfu6cdW`??wz zuEzzBDu3sxic|}4<3j22XfoL=EfpKBdh_n%es%P4jETxH1Q#RpxMTu$HPT%DwyAY{x?~-5sRf&;3$zv3KRJYL z72*J905Oi@3LuYS2L}5oT1Rv4Qh`*C_jo`jm82HQ2?ZMZbz*}o{FAuTIk2?|B^u_) z1P-(^Imh(QblAt4p*HD3&_71hz`&1^j GC4m6{auHYn diff --git a/state/map.yaml b/state/map.yaml index b1b29be4..984dfb40 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -659,4 +659,4 @@ current_status: - Service lifecycle receipt history is now event-only: `load_epiphany_cultmesh_daemon_service_lifecycle_receipts` filters out the `epiphany-local/daemon-service-lifecycle-receipt/latest` mirror, while `load_latest_epiphany_cultmesh_daemon_service_lifecycle_receipt` remains the latest-state reader. Focused unit test `service_lifecycle_receipt_history_excludes_latest_mirror` proves two per-receipt writes return exactly two history records and latest points at the second. Fresh smoke `verse-query-lifecycle-history-filter-smoke` and live overview/triage `local-20260618-145632-497-efac6f0d` / `local-20260618-145632-321-867947af` prove compact swarm sights still expose service lifecycle attention plus the present elevated runbook artifact without daemon pokes or service mutation. Do not use a broad unscoped cargo test filter for this check on Windows; it fans out across bin harnesses and hit a broken pipe during this pass. - `epiphany-verse-query seed-compact` is the compact seed receipt for wrappers and read-only rites. The older `seed` command still prints the full local Verse context for explicit debugging, but compact wrapper modes now avoid full `seed`/final `query` readback after the combined overview proof exposed Windows debug stack overflow from full-context serialization pressure. last_completed_repo_swarm_cut: Huginn live-fire has crossed the first real repo Body from Persona pressure to branch-local Hands commit and Soul/Mind closure, and now has repeatable closure and redacted-public-proof mouths. On `E:\Projects\Huginn` branch `epiphany/huginn/first-awakening`, `tools/epiphany_local_run.ps1 -Mode repo-persona-intake` accepted item `huginn-inspection-readback-livefire`, Weksa/Persona intake remained sealed, and `epiphany-work derive-plan` lowered it to model-authored safe family `repo.status_section` for `README.md` only. `tools/epiphany_local_run.ps1 -Mode repo-swarm-run` advanced four bounded pulses: run-from-plan, adopt-from-plan, execute-from-plan, and close-from-execute. Huginn commit `e9b07c38fceabbdc89ea35c2156326c80c0393a2` updated only `README.md`; closure receipt `.epiphany\work\work-close-huginn-inspection-readback-livefire.json` records status `closed`, Soul verdict `passed`, Mind state commit `repo-work-close-huginn-inspection-readback-livefire-mind-commit`, safe family `repo.status_section`, path scope `README.md`, Bifrost publication gate, and `privateStateExposed=false`. Verification also ran Huginn's TypeScript compiler through concrete Node path: `C:\Program Files\nodejs\node.exe E:\Projects\Huginn\node_modules\typescript\bin\tsc -p tsconfig.json` passed. Native verifier `epiphany-repo-livefire-closure-smoke --workspace E:\Projects\Huginn --item huginn-inspection-readback-livefire --expected-path README.md --expected-family repo.status_section --expected-gate awaiting-publication --expected-blocker bifrost-publication-missing` checks closure receipt, Mind map entry, overview gate/blocker, authority seals, and `git show` changed paths, returning `status=ok`, `soulVerdict=passed`, `publicationGate=Bifrost`, and `privateStateExposed=false`. Wrapper `tools/epiphany_local_run.ps1 -Mode repo-livefire-closure -Workspace E:\Projects\Huginn -RepoWorkItem huginn-inspection-readback-livefire -SkipBuild` exposes the same read-only proof through the local operator mouth; artifact `local-20260621-190156-803-2f85ba15` printed commit, path, gate, blocker, Soul verdict, Mind commit receipt, and `privateStateExposed=False` without push, merge, publication, or target mutation. New wrapper `tools/epiphany_local_run.ps1 -Mode repo-work-public-proof -Workspace E:\Projects\Huginn -RepoWorkItem huginn-inspection-readback-livefire -SkipBuild` exports the redacted proof bundle and repo-local Verse index without publishing; artifact `local-20260621-190645-345-4555b1dc` wrote `.epiphany\public\proof-bundles\repo-work-public-proof-huginn-inspection-readback-livefire.json`, proof id `repo-work-public-proof-huginn-inspection-readback-livefire`, SHA-256 `857545b199f3e37eb06c2e757e5cfc201958e46667bb1f8403fd333a22620f63`, nine artifact rows, zero publication rows, and `privateStateExposed=False`. Gjallar readback `local-20260621-190701-140-b9519ec6` sees the `REPO-WORK-PUBLIC-PROOF` row and action row from Huginn's repo-local Verse with the same SHA-256 while Bifrost publication remains missing. Launcher compact modes are now named compact operator-context modes instead of read-only modes, and `bifrost-public-proof` summaries print item, target public Verse, room, proof SHA-256, review receipts, and credit receipts so publication receipts are auditable without claiming upstream sync. - next_action: Migrate or retire the phase-6 smoke binaries and `epiphany-mvp-status --codex` fallback that are the only clients of the eight remaining Epiphany app-server methods. Map each smoke's real invariant to an existing native core/bridge test or native executable proof before deletion; do not preserve JSON-RPC merely to keep compatibility tests alive. + next_action: Move the sole surviving `epiphany-codex-bridge` organ, `EpiphanyInvalidationManager`, into the Codex app-server watcher lifecycle that owns it; then delete the bridge crate and dependency entirely. Update whitepaper/anatomy prose that still describes a general Codex translation layer. After that, audit native coordinator status for stale `/read/thread/epiphanyState` compatibility pointers. diff --git a/vendor/codex/codex-rs/Cargo.lock b/vendor/codex/codex-rs/Cargo.lock index 43168521..5b6ce751 100644 --- a/vendor/codex/codex-rs/Cargo.lock +++ b/vendor/codex/codex-rs/Cargo.lock @@ -181,7 +181,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ - "crypto-common 0.1.7", + "crypto-common", "generic-array", ] @@ -193,21 +193,7 @@ checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", - "cpufeatures 0.2.17", -] - -[[package]] -name = "aes-gcm" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", - "subtle", + "cpufeatures", ] [[package]] @@ -221,7 +207,7 @@ dependencies = [ "bech32", "chacha20poly1305", "cookie-factory", - "hmac 0.12.1", + "hmac", "i18n-embed", "i18n-embed-fl", "lazy_static", @@ -230,7 +216,7 @@ dependencies = [ "rand 0.8.5", "rust-embed", "scrypt", - "sha2 0.10.9", + "sha2", "subtle", "x25519-dalek", "zeroize", @@ -250,7 +236,7 @@ dependencies = [ "nom 7.1.3", "rand 0.8.5", "secrecy", - "sha2 0.10.9", + "sha2", ] [[package]] @@ -932,11 +918,11 @@ dependencies = [ "bytes", "form_urlencoded", "hex", - "hmac 0.12.1", + "hmac", "http 0.2.12", "http 1.4.0", "percent-encoding", - "sha2 0.10.9", + "sha2", "time", "tracing", ] @@ -1314,7 +1300,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "digest 0.10.7", + "digest", ] [[package]] @@ -1326,15 +1312,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-buffer" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdd35008169921d80bc60d3d0ab416eecb028c4cd653352907921d95084790be" -dependencies = [ - "hybrid-array", -] - [[package]] name = "block-padding" version = "0.3.3" @@ -1608,18 +1585,7 @@ checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ "cfg-if", "cipher", - "cpufeatures 0.2.17", -] - -[[package]] -name = "chacha20" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" -dependencies = [ - "cfg-if", - "cpufeatures 0.3.0", - "rand_core 0.10.1", + "cpufeatures", ] [[package]] @@ -1629,7 +1595,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ "aead", - "chacha20 0.9.1", + "chacha20", "cipher", "poly1305", "zeroize", @@ -1672,7 +1638,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "crypto-common 0.1.7", + "crypto-common", "inout", "zeroize", ] @@ -1765,12 +1731,6 @@ dependencies = [ "cc", ] -[[package]] -name = "cmov" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f88a43d011fc4a6876cb7344703e297c71dda42494fee094d5f7c76bf13f746" - [[package]] name = "cmp_any" version = "0.8.1" @@ -1803,7 +1763,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "sha2 0.10.9", + "sha2", ] [[package]] @@ -1916,7 +1876,7 @@ dependencies = [ "epiphany-state-model", "futures", "gethostname", - "hmac 0.12.1", + "hmac", "jsonwebtoken", "opentelemetry", "opentelemetry_sdk", @@ -1927,7 +1887,7 @@ dependencies = [ "serde", "serde_json", "serial_test", - "sha2 0.10.9", + "sha2", "shlex", "tempfile", "thiserror 2.0.18", @@ -1980,7 +1940,6 @@ dependencies = [ "codex-shell-command", "codex-utils-absolute-path", "codex-utils-cargo-bin", - "epiphany-state-model", "inventory", "pretty_assertions", "rmcp", @@ -2201,11 +2160,11 @@ dependencies = [ "codex-login", "codex-otel", "codex-protocol", - "hmac 0.12.1", + "hmac", "pretty_assertions", "serde", "serde_json", - "sha2 0.10.9", + "sha2", "tempfile", "thiserror 2.0.18", "tokio", @@ -2314,7 +2273,7 @@ dependencies = [ "serde", "serde_json", "serde_path_to_error", - "sha2 0.10.9", + "sha2", "tempfile", "thiserror 2.0.18", "tokio", @@ -2438,7 +2397,7 @@ dependencies = [ "uuid", "walkdir", "which 8.0.0", - "whoami 1.6.1", + "whoami", "windows-sys 0.52.0", "wiremock", "zip 2.4.2", @@ -2765,7 +2724,7 @@ dependencies = [ "serde", "serde_json", "serial_test", - "sha2 0.10.9", + "sha2", "tempfile", "thiserror 2.0.18", "tiny_http", @@ -3094,7 +3053,7 @@ dependencies = [ "serde", "serde_json", "serial_test", - "sha2 0.10.9", + "sha2", "sse-stream", "tempfile", "thiserror 2.0.18", @@ -3182,7 +3141,7 @@ dependencies = [ "schemars 0.8.22", "serde", "serde_json", - "sha2 0.10.9", + "sha2", "tempfile", "tracing", ] @@ -3750,7 +3709,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3bb320cac8a0750d7f25280aa97b09c26edfe161164238ecbbb31092b079e735" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", + "cpufeatures", "proptest", "serde_core", ] @@ -3761,12 +3720,6 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" -[[package]] -name = "const-oid" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" - [[package]] name = "const_format" version = "0.2.35" @@ -3980,15 +3933,6 @@ dependencies = [ "libc", ] -[[package]] -name = "cpufeatures" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" -dependencies = [ - "libc", -] - [[package]] name = "crc" version = "3.4.0" @@ -4116,15 +4060,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "crypto-common" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77727bb15fa921304124b128af125e7e3b968275d1b108b379190264f4423710" -dependencies = [ - "hybrid-array", -] - [[package]] name = "crypto_box" version = "0.9.1" @@ -4202,79 +4137,6 @@ version = "0.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1" -[[package]] -name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher", -] - -[[package]] -name = "ctutils" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5515a3834141de9eafb9717ad39eea8247b5674e6066c404e8c4b365d2a29e" -dependencies = [ - "cmov", -] - -[[package]] -name = "cultcache-rs" -version = "0.1.0" -dependencies = [ - "anyhow", - "chrono", - "cultcache-rs-derive", - "fs2", - "rmp-serde", - "serde", - "serde_bytes", - "serde_json", - "uuid", -] - -[[package]] -name = "cultcache-rs-derive" -version = "0.1.0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "cultmesh-rs" -version = "0.1.0" -dependencies = [ - "anyhow", - "cultcache-rs", - "cultnet-rs", - "serde", -] - -[[package]] -name = "cultnet-rs" -version = "0.1.0" -dependencies = [ - "aes-gcm", - "anyhow", - "base64 0.22.1", - "chrono", - "cultcache-rs", - "hmac 0.12.1", - "rand 0.9.3", - "rmp-serde", - "rmpv", - "serde", - "serde_bytes", - "serde_json", - "sha2 0.10.9", - "socket2 0.5.10", - "uuid", -] - [[package]] name = "curve25519-dalek" version = "4.1.3" @@ -4282,9 +4144,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", + "cpufeatures", "curve25519-dalek-derive", - "digest 0.10.7", + "digest", "fiat-crypto", "rustc_version", "subtle", @@ -4519,7 +4381,7 @@ dependencies = [ "hkdf", "num", "once_cell", - "sha2 0.10.9", + "sha2", "zeroize", ] @@ -4580,7 +4442,7 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ - "const-oid 0.9.6", + "const-oid", "pem-rfc7468", "zeroize", ] @@ -4709,24 +4571,12 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", - "const-oid 0.9.6", - "crypto-common 0.1.7", + "block-buffer", + "const-oid", + "crypto-common", "subtle", ] -[[package]] -name = "digest" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" -dependencies = [ - "block-buffer 0.12.0", - "const-oid 0.10.2", - "crypto-common 0.2.1", - "ctutils", -] - [[package]] name = "diplomat" version = "0.14.0" @@ -4919,7 +4769,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der", - "digest 0.10.7", + "digest", "elliptic-curve", "rfc6979", "signature", @@ -4945,7 +4795,7 @@ dependencies = [ "curve25519-dalek", "ed25519", "serde", - "sha2 0.10.9", + "sha2", "subtle", "zeroize", ] @@ -4967,7 +4817,7 @@ checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", "crypto-bigint", - "digest 0.10.7", + "digest", "ff", "generic-array", "group", @@ -5093,62 +4943,10 @@ dependencies = [ name = "epiphany-codex-bridge" version = "0.1.0" dependencies = [ - "allocative", - "anyhow", - "chrono", - "codex-app-server-protocol", "codex-utils-absolute-path", - "epiphany-core", - "epiphany-state-model", "notify", - "serde", - "serde_json", "tokio", "tracing", - "uuid", -] - -[[package]] -name = "epiphany-core" -version = "0.1.0" -dependencies = [ - "anyhow", - "bm25", - "chrono", - "cultcache-rs", - "cultmesh-rs", - "cultnet-rs", - "epiphany-model-adapter", - "epiphany-openai-adapter", - "epiphany-state-model", - "epiphany-tool-adapter", - "ignore", - "postgres", - "reqwest", - "rmp-serde", - "serde", - "serde_json", - "sha1", - "sha2 0.10.9", - "toml 0.9.11+spec-1.1.0", - "tracing", - "uuid", -] - -[[package]] -name = "epiphany-model-adapter" -version = "0.1.0" -dependencies = [ - "cultcache-rs", - "serde", -] - -[[package]] -name = "epiphany-openai-adapter" -version = "0.1.0" -dependencies = [ - "cultcache-rs", - "serde", ] [[package]] @@ -5160,14 +4958,6 @@ dependencies = [ "ts-rs", ] -[[package]] -name = "epiphany-tool-adapter" -version = "0.1.0" -dependencies = [ - "cultcache-rs", - "serde", -] - [[package]] name = "equivalent" version = "1.0.2" @@ -5252,12 +5042,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "fallible-iterator" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" - [[package]] name = "faster-hex" version = "0.10.0" @@ -5745,7 +5529,7 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] @@ -5758,35 +5542,11 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "r-efi 5.3.0", + "r-efi", "wasip2", "wasm-bindgen", ] -[[package]] -name = "getrandom" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" -dependencies = [ - "cfg-if", - "libc", - "r-efi 6.0.0", - "rand_core 0.10.1", - "wasip2", - "wasip3", -] - -[[package]] -name = "ghash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" -dependencies = [ - "opaque-debug", - "polyval", -] - [[package]] name = "gif" version = "0.14.1" @@ -6961,7 +6721,7 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ - "hmac 0.12.1", + "hmac", ] [[package]] @@ -6970,16 +6730,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "hmac" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6303bc9732ae41b04cb554b844a762b4115a61bfaa81e3e83050991eeb56863f" -dependencies = [ - "digest 0.11.3", + "digest", ] [[package]] @@ -7075,15 +6826,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "hybrid-array" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3944cf8cf766b40e2a1a333ee5e9b563f854d5fa49d6a8ca2764e97c6eddb214" -dependencies = [ - "typenum", -] - [[package]] name = "hyper" version = "1.8.1" @@ -7417,12 +7159,6 @@ dependencies = [ "zerovec", ] -[[package]] -name = "id-arena" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" - [[package]] name = "ident_case" version = "1.0.1" @@ -7958,12 +7694,6 @@ dependencies = [ "spin", ] -[[package]] -name = "leb128fmt" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" - [[package]] name = "libc" version = "0.2.182" @@ -8319,17 +8049,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ "cfg-if", - "digest 0.10.7", -] - -[[package]] -name = "md-5" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b6441f590336821bb897fb28fc622898ccceb1d6cea3fde5ea86b090c4de98" -dependencies = [ - "cfg-if", - "digest 0.11.3", + "digest", ] [[package]] @@ -8411,7 +8131,7 @@ checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" dependencies = [ "libc", "log", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", "windows-sys 0.61.2", ] @@ -8798,7 +8518,7 @@ dependencies = [ "serde", "serde_json", "serde_path_to_error", - "sha2 0.10.9", + "sha2", "thiserror 1.0.69", "url", ] @@ -8943,15 +8663,6 @@ dependencies = [ "objc2-foundation", ] -[[package]] -name = "objc2-system-configuration" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7216bd11cbda54ccabcab84d523dc93b858ec75ecfb3a7d89513fa22464da396" -dependencies = [ - "objc2-core-foundation", -] - [[package]] name = "objc2-ui-kit" version = "0.3.2" @@ -9294,7 +9005,7 @@ dependencies = [ "ecdsa", "elliptic-curve", "primeorder", - "sha2 0.10.9", + "sha2", ] [[package]] @@ -9416,10 +9127,10 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "digest 0.10.7", - "hmac 0.12.1", + "digest", + "hmac", "password-hash", - "sha2 0.10.9", + "sha2", ] [[package]] @@ -9428,8 +9139,8 @@ version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ - "digest 0.10.7", - "hmac 0.12.1", + "digest", + "hmac", ] [[package]] @@ -9478,16 +9189,6 @@ dependencies = [ "indexmap 2.13.0", ] -[[package]] -name = "phf" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" -dependencies = [ - "phf_shared 0.13.1", - "serde", -] - [[package]] name = "phf_shared" version = "0.11.3" @@ -9497,15 +9198,6 @@ dependencies = [ "siphasher", ] -[[package]] -name = "phf_shared" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" -dependencies = [ - "siphasher", -] - [[package]] name = "pin-project" version = "1.1.10" @@ -9622,19 +9314,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ - "cpufeatures 0.2.17", - "opaque-debug", - "universal-hash", -] - -[[package]] -name = "polyval" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" -dependencies = [ - "cfg-if", - "cpufeatures 0.2.17", + "cpufeatures", "opaque-debug", "universal-hash", ] @@ -9675,49 +9355,6 @@ dependencies = [ "winreg 0.10.1", ] -[[package]] -name = "postgres" -version = "0.19.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aacf632d0554ff75f58183694f41dc8999c8a3a43a386994d0ec2d034f1dfbe1" -dependencies = [ - "bytes", - "fallible-iterator", - "futures-util", - "log", - "tokio", - "tokio-postgres", -] - -[[package]] -name = "postgres-protocol" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56201207dac53e2f38e848e31b4b91616a6bb6e0c7205b77718994a7f49e70fc" -dependencies = [ - "base64 0.22.1", - "byteorder", - "bytes", - "fallible-iterator", - "hmac 0.13.0", - "md-5 0.11.0", - "memchr", - "rand 0.10.1", - "sha2 0.11.0", - "stringprep", -] - -[[package]] -name = "postgres-types" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dc729a129e682e8d24170cd30ae1aa01b336b096cbb56df6d534ffec133d186" -dependencies = [ - "bytes", - "fallible-iterator", - "postgres-protocol", -] - [[package]] name = "potential_utf" version = "0.1.4" @@ -10130,12 +9767,6 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" -[[package]] -name = "r-efi" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" - [[package]] name = "radix_trie" version = "0.2.1" @@ -10367,7 +9998,7 @@ dependencies = [ "rama-macros", "rama-utils", "serde", - "sha2 0.10.9", + "sha2", "socket2 0.6.2", "tokio", ] @@ -10487,17 +10118,6 @@ dependencies = [ "rand_core 0.9.5", ] -[[package]] -name = "rand" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" -dependencies = [ - "chacha20 0.10.0", - "getrandom 0.4.2", - "rand_core 0.10.1", -] - [[package]] name = "rand_chacha" version = "0.3.1" @@ -10536,12 +10156,6 @@ dependencies = [ "getrandom 0.3.4", ] -[[package]] -name = "rand_core" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" - [[package]] name = "rand_xorshift" version = "0.4.0" @@ -10788,7 +10402,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ - "hmac 0.12.1", + "hmac", "subtle", ] @@ -10855,44 +10469,14 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "rmp" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ba8be72d372b2c9b35542551678538b562e7cf86c3315773cae48dfbfe7790c" -dependencies = [ - "num-traits", -] - -[[package]] -name = "rmp-serde" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f81bee8c8ef9b577d1681a70ebbc962c232461e397b22c208c43c04b67a155" -dependencies = [ - "rmp", - "serde", -] - -[[package]] -name = "rmpv" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a4e1d4b9b938a26d2996af33229f0ca0956c652c1375067f0b45291c1df8417" -dependencies = [ - "rmp", - "serde", - "serde_bytes", -] - [[package]] name = "rsa" version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" dependencies = [ - "const-oid 0.9.6", - "digest 0.10.7", + "const-oid", + "digest", "num-bigint-dig", "num-integer", "num-traits", @@ -10946,7 +10530,7 @@ version = "8.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5bcdef0be6fe7f6fa333b1073c949729274b05f123a0ad7efcb8efd878e5c3b1" dependencies = [ - "sha2 0.10.9", + "sha2", "walkdir", ] @@ -11272,7 +10856,7 @@ checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" dependencies = [ "pbkdf2 0.12.2", "salsa20", - "sha2 0.10.9", + "sha2", ] [[package]] @@ -11328,7 +10912,7 @@ dependencies = [ "once_cell", "rand 0.8.5", "serde", - "sha2 0.10.9", + "sha2", "zbus", ] @@ -11520,16 +11104,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde_bytes" -version = "0.11.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8" -dependencies = [ - "serde", - "serde_core", -] - [[package]] name = "serde_core" version = "1.0.228" @@ -11706,8 +11280,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", - "digest 0.10.7", + "cpufeatures", + "digest", ] [[package]] @@ -11716,7 +11290,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89f599ac0c323ebb1c6082821a54962b839832b03984598375bff3975b804423" dependencies = [ - "digest 0.10.7", + "digest", "sha1", ] @@ -11733,19 +11307,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", - "digest 0.10.7", -] - -[[package]] -name = "sha2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" -dependencies = [ - "cfg-if", - "cpufeatures 0.3.0", - "digest 0.11.3", + "cpufeatures", + "digest", ] [[package]] @@ -11816,7 +11379,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest 0.10.7", + "digest", "rand_core 0.6.4", ] @@ -11966,7 +11529,7 @@ dependencies = [ "rustls", "serde", "serde_json", - "sha2 0.10.9", + "sha2", "smallvec", "thiserror 2.0.18", "time", @@ -12006,7 +11569,7 @@ dependencies = [ "quote", "serde", "serde_json", - "sha2 0.10.9", + "sha2", "sqlx-core", "sqlx-mysql", "sqlx-postgres", @@ -12029,7 +11592,7 @@ dependencies = [ "bytes", "chrono", "crc", - "digest 0.10.7", + "digest", "dotenvy", "either", "futures-channel", @@ -12039,10 +11602,10 @@ dependencies = [ "generic-array", "hex", "hkdf", - "hmac 0.12.1", + "hmac", "itoa", "log", - "md-5 0.10.6", + "md-5", "memchr", "once_cell", "percent-encoding", @@ -12050,7 +11613,7 @@ dependencies = [ "rsa", "serde", "sha1", - "sha2 0.10.9", + "sha2", "smallvec", "sqlx-core", "stringprep", @@ -12058,7 +11621,7 @@ dependencies = [ "time", "tracing", "uuid", - "whoami 1.6.1", + "whoami", ] [[package]] @@ -12080,17 +11643,17 @@ dependencies = [ "futures-util", "hex", "hkdf", - "hmac 0.12.1", + "hmac", "home", "itoa", "log", - "md-5 0.10.6", + "md-5", "memchr", "once_cell", "rand 0.8.5", "serde", "serde_json", - "sha2 0.10.9", + "sha2", "smallvec", "sqlx-core", "stringprep", @@ -12098,7 +11661,7 @@ dependencies = [ "time", "tracing", "uuid", - "whoami 1.6.1", + "whoami", ] [[package]] @@ -12275,7 +11838,7 @@ checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" dependencies = [ "new_debug_unreachable", "parking_lot", - "phf_shared 0.11.3", + "phf_shared", "precomputed-hash", ] @@ -12863,32 +12426,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-postgres" -version = "0.7.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd8df5ef180f6364759a6f00f7aadda4fbbac86cdee37480826a6ff9f3574ce" -dependencies = [ - "async-trait", - "byteorder", - "bytes", - "fallible-iterator", - "futures-channel", - "futures-util", - "log", - "parking_lot", - "percent-encoding", - "phf", - "pin-project-lite", - "postgres-protocol", - "postgres-types", - "rand 0.10.1", - "socket2 0.6.2", - "tokio", - "tokio-util", - "whoami 2.1.1", -] - [[package]] name = "tokio-rustls" version = "0.26.4" @@ -13527,7 +13064,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ - "crypto-common 0.1.7", + "crypto-common", "subtle", ] @@ -13724,15 +13261,6 @@ version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" -[[package]] -name = "wasi" -version = "0.14.7+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" -dependencies = [ - "wasip2", -] - [[package]] name = "wasip2" version = "1.0.2+wasi-0.2.9" @@ -13742,30 +13270,12 @@ dependencies = [ "wit-bindgen", ] -[[package]] -name = "wasip3" -version = "0.4.0+wasi-0.3.0-rc-2026-01-06" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" -dependencies = [ - "wit-bindgen", -] - [[package]] name = "wasite" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" -[[package]] -name = "wasite" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66fe902b4a6b8028a753d5424909b764ccf79b7a209eac9bf97e59cda9f71a42" -dependencies = [ - "wasi 0.14.7+wasi-0.2.4", -] - [[package]] name = "wasm-bindgen" version = "0.2.108" @@ -13825,28 +13335,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "wasm-encoder" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" -dependencies = [ - "leb128fmt", - "wasmparser", -] - -[[package]] -name = "wasm-metadata" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" -dependencies = [ - "anyhow", - "indexmap 2.13.0", - "wasm-encoder", - "wasmparser", -] - [[package]] name = "wasm-streams" version = "0.4.2" @@ -13860,18 +13348,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "wasmparser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" -dependencies = [ - "bitflags 2.10.0", - "hashbrown 0.15.5", - "indexmap 2.13.0", - "semver", -] - [[package]] name = "wayland-backend" version = "0.3.12" @@ -14069,20 +13545,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" dependencies = [ "libredox", - "wasite 0.1.0", - "web-sys", -] - -[[package]] -name = "whoami" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6a5b12f9df4f978d2cfdb1bd3bac52433f44393342d7ee9c25f5a1c14c0f45d" -dependencies = [ - "libc", - "libredox", - "objc2-system-configuration", - "wasite 1.0.2", + "wasite", "web-sys", ] @@ -14726,88 +14189,6 @@ name = "wit-bindgen" version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" -dependencies = [ - "wit-bindgen-rust-macro", -] - -[[package]] -name = "wit-bindgen-core" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" -dependencies = [ - "anyhow", - "heck 0.5.0", - "wit-parser", -] - -[[package]] -name = "wit-bindgen-rust" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" -dependencies = [ - "anyhow", - "heck 0.5.0", - "indexmap 2.13.0", - "prettyplease", - "syn 2.0.114", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", -] - -[[package]] -name = "wit-bindgen-rust-macro" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" -dependencies = [ - "anyhow", - "prettyplease", - "proc-macro2", - "quote", - "syn 2.0.114", - "wit-bindgen-core", - "wit-bindgen-rust", -] - -[[package]] -name = "wit-component" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" -dependencies = [ - "anyhow", - "bitflags 2.10.0", - "indexmap 2.13.0", - "log", - "serde", - "serde_derive", - "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", -] - -[[package]] -name = "wit-parser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" -dependencies = [ - "anyhow", - "id-arena", - "indexmap 2.13.0", - "log", - "semver", - "serde", - "serde_derive", - "serde_json", - "unicode-xid", - "wasmparser", -] [[package]] name = "wl-clipboard-rs" @@ -15123,7 +14504,7 @@ dependencies = [ "crc32fast", "crossbeam-utils", "flate2", - "hmac 0.12.1", + "hmac", "pbkdf2 0.11.0", "sha1", "time", @@ -15146,7 +14527,7 @@ dependencies = [ "displaydoc", "flate2", "getrandom 0.3.4", - "hmac 0.12.1", + "hmac", "indexmap 2.13.0", "lzma-rs", "memchr", diff --git a/vendor/codex/codex-rs/app-server-protocol/Cargo.toml b/vendor/codex/codex-rs/app-server-protocol/Cargo.toml index 22f85008..0cb50d85 100644 --- a/vendor/codex/codex-rs/app-server-protocol/Cargo.toml +++ b/vendor/codex/codex-rs/app-server-protocol/Cargo.toml @@ -12,7 +12,6 @@ path = "src/lib.rs" workspace = true [dependencies] -epiphany-state-model = { path = "../../../../epiphany-state-model" } anyhow = { workspace = true } clap = { workspace = true, features = ["derive"] } codex-experimental-api-macros = { workspace = true } diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/ClientRequest.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/ClientRequest.json index 61cda926..e3e00d0c 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/ClientRequest.json +++ b/vendor/codex/codex-rs/app-server-protocol/schema/json/ClientRequest.json @@ -705,1236 +705,6 @@ ], "type": "object" }, - "EpiphanyAcceptanceReceipt": { - "properties": { - "accepted_at": { - "type": "string" - }, - "accepted_evidence_id": { - "type": [ - "string", - "null" - ] - }, - "accepted_observation_id": { - "type": [ - "string", - "null" - ] - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "job_id": { - "type": "string" - }, - "result_id": { - "type": "string" - }, - "role_id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "accepted_at", - "binding_id", - "id", - "job_id", - "result_id", - "role_id", - "status", - "surface" - ], - "type": "object" - }, - "EpiphanyBacklogItem": { - "properties": { - "acceptance_sketch": { - "items": { - "type": "string" - }, - "type": "array" - }, - "blockers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": "string" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "duplicate_of": { - "type": [ - "string", - "null" - ] - }, - "evidence_refs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "horizon": { - "type": "string" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "lane_hints": { - "items": { - "type": "string" - }, - "type": "array" - }, - "priority": { - "$ref": "#/definitions/EpiphanyPlanningPriority" - }, - "product_area": { - "type": "string" - }, - "source_refs": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "horizon", - "id", - "kind", - "priority", - "product_area", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyChurnState": { - "properties": { - "diff_pressure": { - "type": "string" - }, - "graph_freshness": { - "type": [ - "string", - "null" - ] - }, - "understanding_status": { - "type": "string" - }, - "unexplained_writes": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "warning": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "diff_pressure", - "understanding_status" - ], - "type": "object" - }, - "EpiphanyCodeRef": { - "properties": { - "end_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "path": { - "type": "string" - }, - "start_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "symbol": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "path" - ], - "type": "object" - }, - "EpiphanyEvidenceRecord": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyGraph": { - "properties": { - "edges": { - "items": { - "$ref": "#/definitions/EpiphanyGraphEdge" - }, - "type": "array" - }, - "nodes": { - "items": { - "$ref": "#/definitions/EpiphanyGraphNode" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphCheckpoint": { - "properties": { - "checkpoint_id": { - "type": "string" - }, - "frontier_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graph_revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "graph_revision" - ], - "type": "object" - }, - "EpiphanyGraphEdge": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": [ - "string", - "null" - ] - }, - "kind": { - "type": "string" - }, - "label": { - "type": [ - "string", - "null" - ] - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "source_id": { - "type": "string" - }, - "target_id": { - "type": "string" - } - }, - "required": [ - "kind", - "source_id", - "target_id" - ], - "type": "object" - }, - "EpiphanyGraphFrontier": { - "properties": { - "active_edge_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "active_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphLink": { - "properties": { - "architecture_node_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "dataflow_node_id": { - "type": "string" - }, - "relationship": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "architecture_node_id", - "dataflow_node_id" - ], - "type": "object" - }, - "EpiphanyGraphNode": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "metaphor": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "status": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "title" - ], - "type": "object" - }, - "EpiphanyGraphs": { - "properties": { - "architecture": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "dataflow": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "links": { - "items": { - "$ref": "#/definitions/EpiphanyGraphLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyInvariant": { - "properties": { - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "rationale": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - } - }, - "required": [ - "description", - "id", - "status" - ], - "type": "object" - }, - "EpiphanyInvestigationCheckpoint": { - "properties": { - "captured_at_turn_id": { - "type": [ - "string", - "null" - ] - }, - "checkpoint_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "disposition": { - "$ref": "#/definitions/EpiphanyInvestigationDisposition" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "focus": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "next_action": { - "type": [ - "string", - "null" - ] - }, - "open_questions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "disposition", - "focus", - "kind" - ], - "type": "object" - }, - "EpiphanyInvestigationDisposition": { - "enum": [ - "resume_ready", - "regather_required" - ], - "type": "string" - }, - "EpiphanyJobBinding": { - "properties": { - "authority_scope": { - "type": [ - "string", - "null" - ] - }, - "blocking_reason": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "kind": { - "$ref": "#/definitions/EpiphanyJobKind" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "owner_role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "owner_role", - "scope" - ], - "type": "object" - }, - "EpiphanyJobKind": { - "enum": [ - "indexing", - "remap", - "verification", - "specialist" - ], - "type": "string" - }, - "EpiphanyModeKind": { - "enum": [ - "plan", - "default" - ], - "type": "string" - }, - "EpiphanyModeState": { - "properties": { - "kind": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeKind" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "EpiphanyObjectiveDraft": { - "properties": { - "acceptance_criteria": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "evidence_required": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "lane_plan": { - "$ref": "#/definitions/EpiphanyObjectiveDraftLanePlan" - }, - "review_gates": { - "items": { - "type": "string" - }, - "type": "array" - }, - "risks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "scope": { - "$ref": "#/definitions/EpiphanyObjectiveDraftScope" - }, - "source_item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "lane_plan", - "scope", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyObjectiveDraftLanePlan": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "eyes": { - "type": [ - "string", - "null" - ] - }, - "hands": { - "type": [ - "string", - "null" - ] - }, - "imagination": { - "type": [ - "string", - "null" - ] - }, - "life": { - "type": [ - "string", - "null" - ] - }, - "soul": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyObjectiveDraftScope": { - "properties": { - "excludes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "includes": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyObservation": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "source_kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "source_kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyPlanningCapture": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "confidence": { - "type": "string" - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "source": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "speaker": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "id", - "source", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyPlanningPriority": { - "properties": { - "blocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": [ - "string", - "null" - ] - }, - "effort": { - "type": [ - "string", - "null" - ] - }, - "impact": { - "type": [ - "string", - "null" - ] - }, - "rationale": { - "type": "string" - }, - "reason": { - "type": [ - "string", - "null" - ] - }, - "unblocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "urgency": { - "type": [ - "string", - "null" - ] - }, - "value": { - "type": "string" - } - }, - "required": [ - "rationale", - "value" - ], - "type": "object" - }, - "EpiphanyPlanningSourceRef": { - "properties": { - "assignees": { - "items": { - "type": "string" - }, - "type": "array" - }, - "author": { - "type": [ - "string", - "null" - ] - }, - "closed_at": { - "type": [ - "string", - "null" - ] - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "database_id": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "external_id": { - "type": [ - "string", - "null" - ] - }, - "imported_at": { - "type": [ - "string", - "null" - ] - }, - "is_pull_request": { - "type": [ - "boolean", - "null" - ] - }, - "issue_number": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "kind": { - "type": "string" - }, - "labels": { - "items": { - "type": "string" - }, - "type": "array" - }, - "milestone": { - "type": [ - "string", - "null" - ] - }, - "node_id": { - "type": [ - "string", - "null" - ] - }, - "provider": { - "type": [ - "string", - "null" - ] - }, - "repo": { - "type": [ - "string", - "null" - ] - }, - "state": { - "type": [ - "string", - "null" - ] - }, - "updated_at": { - "type": [ - "string", - "null" - ] - }, - "uri": { - "type": [ - "string", - "null" - ] - }, - "url": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "kind" - ], - "type": "object" - }, - "EpiphanyPlanningState": { - "properties": { - "backlog_items": { - "items": { - "$ref": "#/definitions/EpiphanyBacklogItem" - }, - "type": "array" - }, - "captures": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningCapture" - }, - "type": "array" - }, - "objective_drafts": { - "items": { - "$ref": "#/definitions/EpiphanyObjectiveDraft" - }, - "type": "array" - }, - "roadmap_streams": { - "items": { - "$ref": "#/definitions/EpiphanyRoadmapStream" - }, - "type": "array" - }, - "workspace_root": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyRoadmapStream": { - "properties": { - "blocked_by": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "near_term_focus": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "review_cadence": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyRuntimeLink": { - "properties": { - "authority_scope": { - "type": "string" - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "role_id": { - "type": "string" - }, - "runtime_job_id": { - "type": "string" - }, - "runtime_result_id": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "authority_scope", - "binding_id", - "id", - "role_id", - "runtime_job_id", - "surface" - ], - "type": "object" - }, - "EpiphanyScratchPad": { - "properties": { - "hypothesis": { - "type": [ - "string", - "null" - ] - }, - "next_probe": { - "type": [ - "string", - "null" - ] - }, - "notes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanySubgoal": { - "properties": { - "id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "status", - "title" - ], - "type": "object" - }, "ExperimentalFeatureEnablementSetParams": { "properties": { "enablement": { @@ -4144,263 +2914,6 @@ ], "type": "object" }, - "ThreadEpiphanyGraphQuery": { - "properties": { - "depth": { - "description": "Defaults to 1 and is capped by the server.", - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "direction": { - "anyOf": [ - { - "$ref": "#/definitions/ThreadEpiphanyGraphQueryDirection" - }, - { - "type": "null" - } - ], - "description": "Defaults to `both`." - }, - "edgeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "edgeKinds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "includeLinks": { - "description": "Defaults to true so neighborhood queries preserve dataflow/architecture joins.", - "type": [ - "boolean", - "null" - ] - }, - "kind": { - "$ref": "#/definitions/ThreadEpiphanyGraphQueryKind" - }, - "nodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "symbols": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "kind" - ], - "type": "object" - }, - "ThreadEpiphanyGraphQueryDirection": { - "enum": [ - "incoming", - "outgoing", - "both" - ], - "type": "string" - }, - "ThreadEpiphanyGraphQueryKind": { - "enum": [ - "node", - "path", - "frontierNeighborhood", - "neighbors" - ], - "type": "string" - }, - "ThreadEpiphanyRoleId": { - "enum": [ - "implementation", - "imagination", - "research", - "modeling", - "verification", - "reorientation" - ], - "type": "string" - }, - "ThreadEpiphanyUpdatePatch": { - "properties": { - "acceptanceReceipts": { - "items": { - "$ref": "#/definitions/EpiphanyAcceptanceReceipt" - }, - "type": "array" - }, - "activeSubgoalId": { - "type": [ - "string", - "null" - ] - }, - "churn": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyChurnState" - }, - { - "type": "null" - } - ] - }, - "evidence": { - "items": { - "$ref": "#/definitions/EpiphanyEvidenceRecord" - }, - "type": "array" - }, - "graphCheckpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphCheckpoint" - }, - { - "type": "null" - } - ] - }, - "graphFrontier": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphFrontier" - }, - { - "type": "null" - } - ] - }, - "graphs": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphs" - }, - { - "type": "null" - } - ] - }, - "invariants": { - "items": { - "$ref": "#/definitions/EpiphanyInvariant" - }, - "type": [ - "array", - "null" - ] - }, - "investigationCheckpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "jobBindings": { - "items": { - "$ref": "#/definitions/EpiphanyJobBinding" - }, - "type": [ - "array", - "null" - ] - }, - "mode": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeState" - }, - { - "type": "null" - } - ] - }, - "objective": { - "type": [ - "string", - "null" - ] - }, - "observations": { - "items": { - "$ref": "#/definitions/EpiphanyObservation" - }, - "type": "array" - }, - "planning": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyPlanningState" - }, - { - "type": "null" - } - ] - }, - "runtimeLinks": { - "items": { - "$ref": "#/definitions/EpiphanyRuntimeLink" - }, - "type": "array" - }, - "scratch": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyScratchPad" - }, - { - "type": "null" - } - ] - }, - "subgoals": { - "items": { - "$ref": "#/definitions/EpiphanySubgoal" - }, - "type": [ - "array", - "null" - ] - } - }, - "type": "object" - }, - "ThreadEpiphanyViewLens": { - "enum": [ - "scene", - "jobs", - "roles", - "planning", - "pressure", - "reorient", - "crrc", - "coordinator" - ], - "type": "string" - }, "ThreadForkParams": { "description": "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.", "properties": { diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/ServerNotification.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/ServerNotification.json index b2257e75..21411d00 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/ServerNotification.json +++ b/vendor/codex/codex-rs/app-server-protocol/schema/json/ServerNotification.json @@ -730,1502 +730,6 @@ ], "type": "string" }, - "EpiphanyAcceptanceReceipt": { - "properties": { - "accepted_at": { - "type": "string" - }, - "accepted_evidence_id": { - "type": [ - "string", - "null" - ] - }, - "accepted_observation_id": { - "type": [ - "string", - "null" - ] - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "job_id": { - "type": "string" - }, - "result_id": { - "type": "string" - }, - "role_id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "accepted_at", - "binding_id", - "id", - "job_id", - "result_id", - "role_id", - "status", - "surface" - ], - "type": "object" - }, - "EpiphanyBacklogItem": { - "properties": { - "acceptance_sketch": { - "items": { - "type": "string" - }, - "type": "array" - }, - "blockers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": "string" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "duplicate_of": { - "type": [ - "string", - "null" - ] - }, - "evidence_refs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "horizon": { - "type": "string" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "lane_hints": { - "items": { - "type": "string" - }, - "type": "array" - }, - "priority": { - "$ref": "#/definitions/EpiphanyPlanningPriority" - }, - "product_area": { - "type": "string" - }, - "source_refs": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "horizon", - "id", - "kind", - "priority", - "product_area", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyChurnState": { - "properties": { - "diff_pressure": { - "type": "string" - }, - "graph_freshness": { - "type": [ - "string", - "null" - ] - }, - "understanding_status": { - "type": "string" - }, - "unexplained_writes": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "warning": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "diff_pressure", - "understanding_status" - ], - "type": "object" - }, - "EpiphanyCodeRef": { - "properties": { - "end_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "path": { - "type": "string" - }, - "start_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "symbol": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "path" - ], - "type": "object" - }, - "EpiphanyEvidenceRecord": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyGraph": { - "properties": { - "edges": { - "items": { - "$ref": "#/definitions/EpiphanyGraphEdge" - }, - "type": "array" - }, - "nodes": { - "items": { - "$ref": "#/definitions/EpiphanyGraphNode" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphCheckpoint": { - "properties": { - "checkpoint_id": { - "type": "string" - }, - "frontier_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graph_revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "graph_revision" - ], - "type": "object" - }, - "EpiphanyGraphEdge": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": [ - "string", - "null" - ] - }, - "kind": { - "type": "string" - }, - "label": { - "type": [ - "string", - "null" - ] - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "source_id": { - "type": "string" - }, - "target_id": { - "type": "string" - } - }, - "required": [ - "kind", - "source_id", - "target_id" - ], - "type": "object" - }, - "EpiphanyGraphFrontier": { - "properties": { - "active_edge_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "active_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphLink": { - "properties": { - "architecture_node_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "dataflow_node_id": { - "type": "string" - }, - "relationship": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "architecture_node_id", - "dataflow_node_id" - ], - "type": "object" - }, - "EpiphanyGraphNode": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "metaphor": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "status": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "title" - ], - "type": "object" - }, - "EpiphanyGraphs": { - "properties": { - "architecture": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "dataflow": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "links": { - "items": { - "$ref": "#/definitions/EpiphanyGraphLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyInvariant": { - "properties": { - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "rationale": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - } - }, - "required": [ - "description", - "id", - "status" - ], - "type": "object" - }, - "EpiphanyInvestigationCheckpoint": { - "properties": { - "captured_at_turn_id": { - "type": [ - "string", - "null" - ] - }, - "checkpoint_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "disposition": { - "$ref": "#/definitions/EpiphanyInvestigationDisposition" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "focus": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "next_action": { - "type": [ - "string", - "null" - ] - }, - "open_questions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "disposition", - "focus", - "kind" - ], - "type": "object" - }, - "EpiphanyInvestigationDisposition": { - "enum": [ - "resume_ready", - "regather_required" - ], - "type": "string" - }, - "EpiphanyJobBinding": { - "properties": { - "authority_scope": { - "type": [ - "string", - "null" - ] - }, - "blocking_reason": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "kind": { - "$ref": "#/definitions/EpiphanyJobKind" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "owner_role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "owner_role", - "scope" - ], - "type": "object" - }, - "EpiphanyJobKind": { - "enum": [ - "indexing", - "remap", - "verification", - "specialist" - ], - "type": "string" - }, - "EpiphanyModeKind": { - "enum": [ - "plan", - "default" - ], - "type": "string" - }, - "EpiphanyModeState": { - "properties": { - "kind": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeKind" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "EpiphanyObjectiveDraft": { - "properties": { - "acceptance_criteria": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "evidence_required": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "lane_plan": { - "$ref": "#/definitions/EpiphanyObjectiveDraftLanePlan" - }, - "review_gates": { - "items": { - "type": "string" - }, - "type": "array" - }, - "risks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "scope": { - "$ref": "#/definitions/EpiphanyObjectiveDraftScope" - }, - "source_item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "lane_plan", - "scope", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyObjectiveDraftLanePlan": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "eyes": { - "type": [ - "string", - "null" - ] - }, - "hands": { - "type": [ - "string", - "null" - ] - }, - "imagination": { - "type": [ - "string", - "null" - ] - }, - "life": { - "type": [ - "string", - "null" - ] - }, - "soul": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyObjectiveDraftScope": { - "properties": { - "excludes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "includes": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyObservation": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "source_kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "source_kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyPlanningCapture": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "confidence": { - "type": "string" - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "source": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "speaker": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "id", - "source", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyPlanningPriority": { - "properties": { - "blocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": [ - "string", - "null" - ] - }, - "effort": { - "type": [ - "string", - "null" - ] - }, - "impact": { - "type": [ - "string", - "null" - ] - }, - "rationale": { - "type": "string" - }, - "reason": { - "type": [ - "string", - "null" - ] - }, - "unblocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "urgency": { - "type": [ - "string", - "null" - ] - }, - "value": { - "type": "string" - } - }, - "required": [ - "rationale", - "value" - ], - "type": "object" - }, - "EpiphanyPlanningSourceRef": { - "properties": { - "assignees": { - "items": { - "type": "string" - }, - "type": "array" - }, - "author": { - "type": [ - "string", - "null" - ] - }, - "closed_at": { - "type": [ - "string", - "null" - ] - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "database_id": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "external_id": { - "type": [ - "string", - "null" - ] - }, - "imported_at": { - "type": [ - "string", - "null" - ] - }, - "is_pull_request": { - "type": [ - "boolean", - "null" - ] - }, - "issue_number": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "kind": { - "type": "string" - }, - "labels": { - "items": { - "type": "string" - }, - "type": "array" - }, - "milestone": { - "type": [ - "string", - "null" - ] - }, - "node_id": { - "type": [ - "string", - "null" - ] - }, - "provider": { - "type": [ - "string", - "null" - ] - }, - "repo": { - "type": [ - "string", - "null" - ] - }, - "state": { - "type": [ - "string", - "null" - ] - }, - "updated_at": { - "type": [ - "string", - "null" - ] - }, - "uri": { - "type": [ - "string", - "null" - ] - }, - "url": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "kind" - ], - "type": "object" - }, - "EpiphanyPlanningState": { - "properties": { - "backlog_items": { - "items": { - "$ref": "#/definitions/EpiphanyBacklogItem" - }, - "type": "array" - }, - "captures": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningCapture" - }, - "type": "array" - }, - "objective_drafts": { - "items": { - "$ref": "#/definitions/EpiphanyObjectiveDraft" - }, - "type": "array" - }, - "roadmap_streams": { - "items": { - "$ref": "#/definitions/EpiphanyRoadmapStream" - }, - "type": "array" - }, - "workspace_root": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyRetrievalShardSummary": { - "properties": { - "exact_available": { - "type": "boolean" - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "path_prefix": { - "type": "string" - }, - "semantic_available": { - "type": "boolean" - }, - "shard_id": { - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - } - }, - "required": [ - "path_prefix", - "shard_id" - ], - "type": "object" - }, - "EpiphanyRetrievalState": { - "properties": { - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "index_revision": { - "type": [ - "string", - "null" - ] - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "last_indexed_at_unix_seconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "semantic_available": { - "type": "boolean" - }, - "shards": { - "items": { - "$ref": "#/definitions/EpiphanyRetrievalShardSummary" - }, - "type": "array" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - }, - "workspace_root": { - "type": "string" - } - }, - "required": [ - "workspace_root" - ], - "type": "object" - }, - "EpiphanyRetrievalStatus": { - "enum": [ - "unavailable", - "ready", - "stale", - "indexing" - ], - "type": "string" - }, - "EpiphanyRoadmapStream": { - "properties": { - "blocked_by": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "near_term_focus": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "review_cadence": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyRuntimeLink": { - "properties": { - "authority_scope": { - "type": "string" - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "role_id": { - "type": "string" - }, - "runtime_job_id": { - "type": "string" - }, - "runtime_result_id": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "authority_scope", - "binding_id", - "id", - "role_id", - "runtime_job_id", - "surface" - ], - "type": "object" - }, - "EpiphanyScratchPad": { - "properties": { - "hypothesis": { - "type": [ - "string", - "null" - ] - }, - "next_probe": { - "type": [ - "string", - "null" - ] - }, - "notes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanySubgoal": { - "properties": { - "id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyThreadState": { - "properties": { - "acceptance_receipts": { - "items": { - "$ref": "#/definitions/EpiphanyAcceptanceReceipt" - }, - "type": "array" - }, - "active_subgoal_id": { - "type": [ - "string", - "null" - ] - }, - "churn": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyChurnState" - }, - { - "type": "null" - } - ] - }, - "graph_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphCheckpoint" - }, - { - "type": "null" - } - ] - }, - "graph_frontier": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphFrontier" - }, - { - "type": "null" - } - ] - }, - "graphs": { - "$ref": "#/definitions/EpiphanyGraphs" - }, - "invariants": { - "items": { - "$ref": "#/definitions/EpiphanyInvariant" - }, - "type": "array" - }, - "investigation_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "job_bindings": { - "items": { - "$ref": "#/definitions/EpiphanyJobBinding" - }, - "type": "array" - }, - "last_updated_turn_id": { - "type": [ - "string", - "null" - ] - }, - "mode": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeState" - }, - { - "type": "null" - } - ] - }, - "objective": { - "type": [ - "string", - "null" - ] - }, - "observations": { - "items": { - "$ref": "#/definitions/EpiphanyObservation" - }, - "type": "array" - }, - "planning": { - "$ref": "#/definitions/EpiphanyPlanningState" - }, - "recent_evidence": { - "items": { - "$ref": "#/definitions/EpiphanyEvidenceRecord" - }, - "type": "array" - }, - "retrieval": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalState" - }, - { - "type": "null" - } - ] - }, - "revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "runtime_links": { - "items": { - "$ref": "#/definitions/EpiphanyRuntimeLink" - }, - "type": "array" - }, - "scratch": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyScratchPad" - }, - { - "type": "null" - } - ] - }, - "subgoals": { - "items": { - "$ref": "#/definitions/EpiphanySubgoal" - }, - "type": "array" - } - }, - "required": [ - "revision" - ], - "type": "object" - }, "ErrorNotification": { "properties": { "error": { @@ -4098,17 +2602,6 @@ "description": "Whether the thread is ephemeral and should not be materialized on disk.", "type": "boolean" }, - "epiphanyState": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyThreadState" - }, - { - "type": "null" - } - ], - "description": "Only populated on `thread/start`, `thread/resume`, `thread/fork`, `thread/read`, and notifications/responses that reuse those hydrated thread payloads." - }, "forkedFromId": { "description": "Source thread id when this thread was created by forking another thread.", "type": [ @@ -4225,227 +2718,6 @@ ], "type": "object" }, - "ThreadEpiphanyJob": { - "properties": { - "activeThreadIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "authorityScope": { - "type": [ - "string", - "null" - ] - }, - "backendJobId": { - "type": [ - "string", - "null" - ] - }, - "blockingReason": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "itemsProcessed": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "itemsTotal": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "kind": { - "$ref": "#/definitions/ThreadEpiphanyJobKind" - }, - "lastCheckpointAtUnixSeconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "launcherJobId": { - "type": [ - "string", - "null" - ] - }, - "linkedGraphNodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linkedSubgoalIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "ownerRole": { - "type": "string" - }, - "progressNote": { - "type": [ - "string", - "null" - ] - }, - "scope": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/ThreadEpiphanyJobStatus" - } - }, - "required": [ - "id", - "kind", - "ownerRole", - "scope", - "status" - ], - "type": "object" - }, - "ThreadEpiphanyJobKind": { - "enum": [ - "indexing", - "remap", - "verification", - "specialist" - ], - "type": "string" - }, - "ThreadEpiphanyJobStatus": { - "enum": [ - "idle", - "needed", - "pending", - "running", - "completed", - "failed", - "cancelled", - "blocked", - "unavailable" - ], - "type": "string" - }, - "ThreadEpiphanyJobsUpdatedNotification": { - "properties": { - "jobs": { - "items": { - "$ref": "#/definitions/ThreadEpiphanyJob" - }, - "type": "array" - }, - "source": { - "$ref": "#/definitions/ThreadEpiphanyJobsUpdatedSource" - }, - "stateRevision": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "threadId": { - "type": "string" - } - }, - "required": [ - "source", - "threadId" - ], - "type": "object" - }, - "ThreadEpiphanyJobsUpdatedSource": { - "enum": [ - "runtimeProgress" - ], - "type": "string" - }, - "ThreadEpiphanyStateUpdatedField": { - "enum": [ - "objective", - "activeSubgoalId", - "subgoals", - "invariants", - "graphs", - "graphFrontier", - "graphCheckpoint", - "scratch", - "investigationCheckpoint", - "jobBindings", - "acceptanceReceipts", - "runtimeLinks", - "observations", - "evidence", - "churn", - "mode", - "planning" - ], - "type": "string" - }, - "ThreadEpiphanyStateUpdatedNotification": { - "properties": { - "changedFields": { - "items": { - "$ref": "#/definitions/ThreadEpiphanyStateUpdatedField" - }, - "type": "array" - }, - "epiphanyState": { - "$ref": "#/definitions/EpiphanyThreadState" - }, - "revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "source": { - "$ref": "#/definitions/ThreadEpiphanyStateUpdatedSource" - }, - "threadId": { - "type": "string" - } - }, - "required": [ - "changedFields", - "epiphanyState", - "revision", - "source", - "threadId" - ], - "type": "object" - }, - "ThreadEpiphanyStateUpdatedSource": { - "enum": [ - "update", - "promote", - "jobLaunch", - "jobInterrupt", - "reorientAccept", - "roleAccept" - ], - "type": "string" - }, "ThreadId": { "type": "string" }, @@ -6791,46 +5063,6 @@ "title": "ConfigWarningNotification", "type": "object" }, - { - "properties": { - "method": { - "enum": [ - "thread/epiphany/stateUpdated" - ], - "title": "Thread/epiphany/stateUpdatedNotificationMethod", - "type": "string" - }, - "params": { - "$ref": "#/definitions/ThreadEpiphanyStateUpdatedNotification" - } - }, - "required": [ - "method", - "params" - ], - "title": "Thread/epiphany/stateUpdatedNotification", - "type": "object" - }, - { - "properties": { - "method": { - "enum": [ - "thread/epiphany/jobsUpdated" - ], - "title": "Thread/epiphany/jobsUpdatedNotificationMethod", - "type": "string" - }, - "params": { - "$ref": "#/definitions/ThreadEpiphanyJobsUpdatedNotification" - } - }, - "required": [ - "method", - "params" - ], - "title": "Thread/epiphany/jobsUpdatedNotification", - "type": "object" - }, { "properties": { "method": { diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json index 69cb8502..d8636f96 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json +++ b/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json @@ -4180,46 +4180,6 @@ "title": "ConfigWarningNotification", "type": "object" }, - { - "properties": { - "method": { - "enum": [ - "thread/epiphany/stateUpdated" - ], - "title": "Thread/epiphany/stateUpdatedNotificationMethod", - "type": "string" - }, - "params": { - "$ref": "#/definitions/v2/ThreadEpiphanyStateUpdatedNotification" - } - }, - "required": [ - "method", - "params" - ], - "title": "Thread/epiphany/stateUpdatedNotification", - "type": "object" - }, - { - "properties": { - "method": { - "enum": [ - "thread/epiphany/jobsUpdated" - ], - "title": "Thread/epiphany/jobsUpdatedNotificationMethod", - "type": "string" - }, - "params": { - "$ref": "#/definitions/v2/ThreadEpiphanyJobsUpdatedNotification" - } - }, - "required": [ - "method", - "params" - ], - "title": "Thread/epiphany/jobsUpdatedNotification", - "type": "object" - }, { "properties": { "method": { @@ -7066,1502 +7026,6 @@ ], "type": "object" }, - "EpiphanyAcceptanceReceipt": { - "properties": { - "accepted_at": { - "type": "string" - }, - "accepted_evidence_id": { - "type": [ - "string", - "null" - ] - }, - "accepted_observation_id": { - "type": [ - "string", - "null" - ] - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "job_id": { - "type": "string" - }, - "result_id": { - "type": "string" - }, - "role_id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "accepted_at", - "binding_id", - "id", - "job_id", - "result_id", - "role_id", - "status", - "surface" - ], - "type": "object" - }, - "EpiphanyBacklogItem": { - "properties": { - "acceptance_sketch": { - "items": { - "type": "string" - }, - "type": "array" - }, - "blockers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": "string" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "duplicate_of": { - "type": [ - "string", - "null" - ] - }, - "evidence_refs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "horizon": { - "type": "string" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "lane_hints": { - "items": { - "type": "string" - }, - "type": "array" - }, - "priority": { - "$ref": "#/definitions/v2/EpiphanyPlanningPriority" - }, - "product_area": { - "type": "string" - }, - "source_refs": { - "items": { - "$ref": "#/definitions/v2/EpiphanyPlanningSourceRef" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "horizon", - "id", - "kind", - "priority", - "product_area", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyChurnState": { - "properties": { - "diff_pressure": { - "type": "string" - }, - "graph_freshness": { - "type": [ - "string", - "null" - ] - }, - "understanding_status": { - "type": "string" - }, - "unexplained_writes": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "warning": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "diff_pressure", - "understanding_status" - ], - "type": "object" - }, - "EpiphanyCodeRef": { - "properties": { - "end_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "path": { - "type": "string" - }, - "start_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "symbol": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "path" - ], - "type": "object" - }, - "EpiphanyEvidenceRecord": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/v2/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyGraph": { - "properties": { - "edges": { - "items": { - "$ref": "#/definitions/v2/EpiphanyGraphEdge" - }, - "type": "array" - }, - "nodes": { - "items": { - "$ref": "#/definitions/v2/EpiphanyGraphNode" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphCheckpoint": { - "properties": { - "checkpoint_id": { - "type": "string" - }, - "frontier_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graph_revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "graph_revision" - ], - "type": "object" - }, - "EpiphanyGraphEdge": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/v2/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": [ - "string", - "null" - ] - }, - "kind": { - "type": "string" - }, - "label": { - "type": [ - "string", - "null" - ] - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "source_id": { - "type": "string" - }, - "target_id": { - "type": "string" - } - }, - "required": [ - "kind", - "source_id", - "target_id" - ], - "type": "object" - }, - "EpiphanyGraphFrontier": { - "properties": { - "active_edge_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "active_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphLink": { - "properties": { - "architecture_node_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/v2/EpiphanyCodeRef" - }, - "type": "array" - }, - "dataflow_node_id": { - "type": "string" - }, - "relationship": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "architecture_node_id", - "dataflow_node_id" - ], - "type": "object" - }, - "EpiphanyGraphNode": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/v2/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "metaphor": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "status": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "title" - ], - "type": "object" - }, - "EpiphanyGraphs": { - "properties": { - "architecture": { - "$ref": "#/definitions/v2/EpiphanyGraph" - }, - "dataflow": { - "$ref": "#/definitions/v2/EpiphanyGraph" - }, - "links": { - "items": { - "$ref": "#/definitions/v2/EpiphanyGraphLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyInvariant": { - "properties": { - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "rationale": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - } - }, - "required": [ - "description", - "id", - "status" - ], - "type": "object" - }, - "EpiphanyInvestigationCheckpoint": { - "properties": { - "captured_at_turn_id": { - "type": [ - "string", - "null" - ] - }, - "checkpoint_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/v2/EpiphanyCodeRef" - }, - "type": "array" - }, - "disposition": { - "$ref": "#/definitions/v2/EpiphanyInvestigationDisposition" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "focus": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "next_action": { - "type": [ - "string", - "null" - ] - }, - "open_questions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "disposition", - "focus", - "kind" - ], - "type": "object" - }, - "EpiphanyInvestigationDisposition": { - "enum": [ - "resume_ready", - "regather_required" - ], - "type": "string" - }, - "EpiphanyJobBinding": { - "properties": { - "authority_scope": { - "type": [ - "string", - "null" - ] - }, - "blocking_reason": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "kind": { - "$ref": "#/definitions/v2/EpiphanyJobKind" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "owner_role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "owner_role", - "scope" - ], - "type": "object" - }, - "EpiphanyJobKind": { - "enum": [ - "indexing", - "remap", - "verification", - "specialist" - ], - "type": "string" - }, - "EpiphanyModeKind": { - "enum": [ - "plan", - "default" - ], - "type": "string" - }, - "EpiphanyModeState": { - "properties": { - "kind": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyModeKind" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "EpiphanyObjectiveDraft": { - "properties": { - "acceptance_criteria": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "evidence_required": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "lane_plan": { - "$ref": "#/definitions/v2/EpiphanyObjectiveDraftLanePlan" - }, - "review_gates": { - "items": { - "type": "string" - }, - "type": "array" - }, - "risks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "scope": { - "$ref": "#/definitions/v2/EpiphanyObjectiveDraftScope" - }, - "source_item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "lane_plan", - "scope", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyObjectiveDraftLanePlan": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "eyes": { - "type": [ - "string", - "null" - ] - }, - "hands": { - "type": [ - "string", - "null" - ] - }, - "imagination": { - "type": [ - "string", - "null" - ] - }, - "life": { - "type": [ - "string", - "null" - ] - }, - "soul": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyObjectiveDraftScope": { - "properties": { - "excludes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "includes": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyObservation": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/v2/EpiphanyCodeRef" - }, - "type": "array" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "source_kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "source_kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyPlanningCapture": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "confidence": { - "type": "string" - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "source": { - "$ref": "#/definitions/v2/EpiphanyPlanningSourceRef" - }, - "speaker": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "id", - "source", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyPlanningPriority": { - "properties": { - "blocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": [ - "string", - "null" - ] - }, - "effort": { - "type": [ - "string", - "null" - ] - }, - "impact": { - "type": [ - "string", - "null" - ] - }, - "rationale": { - "type": "string" - }, - "reason": { - "type": [ - "string", - "null" - ] - }, - "unblocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "urgency": { - "type": [ - "string", - "null" - ] - }, - "value": { - "type": "string" - } - }, - "required": [ - "rationale", - "value" - ], - "type": "object" - }, - "EpiphanyPlanningSourceRef": { - "properties": { - "assignees": { - "items": { - "type": "string" - }, - "type": "array" - }, - "author": { - "type": [ - "string", - "null" - ] - }, - "closed_at": { - "type": [ - "string", - "null" - ] - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "database_id": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "external_id": { - "type": [ - "string", - "null" - ] - }, - "imported_at": { - "type": [ - "string", - "null" - ] - }, - "is_pull_request": { - "type": [ - "boolean", - "null" - ] - }, - "issue_number": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "kind": { - "type": "string" - }, - "labels": { - "items": { - "type": "string" - }, - "type": "array" - }, - "milestone": { - "type": [ - "string", - "null" - ] - }, - "node_id": { - "type": [ - "string", - "null" - ] - }, - "provider": { - "type": [ - "string", - "null" - ] - }, - "repo": { - "type": [ - "string", - "null" - ] - }, - "state": { - "type": [ - "string", - "null" - ] - }, - "updated_at": { - "type": [ - "string", - "null" - ] - }, - "uri": { - "type": [ - "string", - "null" - ] - }, - "url": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "kind" - ], - "type": "object" - }, - "EpiphanyPlanningState": { - "properties": { - "backlog_items": { - "items": { - "$ref": "#/definitions/v2/EpiphanyBacklogItem" - }, - "type": "array" - }, - "captures": { - "items": { - "$ref": "#/definitions/v2/EpiphanyPlanningCapture" - }, - "type": "array" - }, - "objective_drafts": { - "items": { - "$ref": "#/definitions/v2/EpiphanyObjectiveDraft" - }, - "type": "array" - }, - "roadmap_streams": { - "items": { - "$ref": "#/definitions/v2/EpiphanyRoadmapStream" - }, - "type": "array" - }, - "workspace_root": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyRetrievalShardSummary": { - "properties": { - "exact_available": { - "type": "boolean" - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "path_prefix": { - "type": "string" - }, - "semantic_available": { - "type": "boolean" - }, - "shard_id": { - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/v2/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - } - }, - "required": [ - "path_prefix", - "shard_id" - ], - "type": "object" - }, - "EpiphanyRetrievalState": { - "properties": { - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "index_revision": { - "type": [ - "string", - "null" - ] - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "last_indexed_at_unix_seconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "semantic_available": { - "type": "boolean" - }, - "shards": { - "items": { - "$ref": "#/definitions/v2/EpiphanyRetrievalShardSummary" - }, - "type": "array" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/v2/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - }, - "workspace_root": { - "type": "string" - } - }, - "required": [ - "workspace_root" - ], - "type": "object" - }, - "EpiphanyRetrievalStatus": { - "enum": [ - "unavailable", - "ready", - "stale", - "indexing" - ], - "type": "string" - }, - "EpiphanyRoadmapStream": { - "properties": { - "blocked_by": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "near_term_focus": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "review_cadence": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyRuntimeLink": { - "properties": { - "authority_scope": { - "type": "string" - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "role_id": { - "type": "string" - }, - "runtime_job_id": { - "type": "string" - }, - "runtime_result_id": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "authority_scope", - "binding_id", - "id", - "role_id", - "runtime_job_id", - "surface" - ], - "type": "object" - }, - "EpiphanyScratchPad": { - "properties": { - "hypothesis": { - "type": [ - "string", - "null" - ] - }, - "next_probe": { - "type": [ - "string", - "null" - ] - }, - "notes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanySubgoal": { - "properties": { - "id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyThreadState": { - "properties": { - "acceptance_receipts": { - "items": { - "$ref": "#/definitions/v2/EpiphanyAcceptanceReceipt" - }, - "type": "array" - }, - "active_subgoal_id": { - "type": [ - "string", - "null" - ] - }, - "churn": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyChurnState" - }, - { - "type": "null" - } - ] - }, - "graph_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyGraphCheckpoint" - }, - { - "type": "null" - } - ] - }, - "graph_frontier": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyGraphFrontier" - }, - { - "type": "null" - } - ] - }, - "graphs": { - "$ref": "#/definitions/v2/EpiphanyGraphs" - }, - "invariants": { - "items": { - "$ref": "#/definitions/v2/EpiphanyInvariant" - }, - "type": "array" - }, - "investigation_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "job_bindings": { - "items": { - "$ref": "#/definitions/v2/EpiphanyJobBinding" - }, - "type": "array" - }, - "last_updated_turn_id": { - "type": [ - "string", - "null" - ] - }, - "mode": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyModeState" - }, - { - "type": "null" - } - ] - }, - "objective": { - "type": [ - "string", - "null" - ] - }, - "observations": { - "items": { - "$ref": "#/definitions/v2/EpiphanyObservation" - }, - "type": "array" - }, - "planning": { - "$ref": "#/definitions/v2/EpiphanyPlanningState" - }, - "recent_evidence": { - "items": { - "$ref": "#/definitions/v2/EpiphanyEvidenceRecord" - }, - "type": "array" - }, - "retrieval": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyRetrievalState" - }, - { - "type": "null" - } - ] - }, - "revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "runtime_links": { - "items": { - "$ref": "#/definitions/v2/EpiphanyRuntimeLink" - }, - "type": "array" - }, - "scratch": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyScratchPad" - }, - { - "type": "null" - } - ] - }, - "subgoals": { - "items": { - "$ref": "#/definitions/v2/EpiphanySubgoal" - }, - "type": "array" - } - }, - "required": [ - "revision" - ], - "type": "object" - }, "ErrorNotification": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { @@ -13510,17 +11974,6 @@ "description": "Whether the thread is ephemeral and should not be materialized on disk.", "type": "boolean" }, - "epiphanyState": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyThreadState" - }, - { - "type": "null" - } - ], - "description": "Only populated on `thread/start`, `thread/resume`, `thread/fork`, `thread/read`, and notifications/responses that reuse those hydrated thread payloads." - }, "forkedFromId": { "description": "Source thread id when this thread was created by forking another thread.", "type": [ @@ -13699,2275 +12152,6 @@ "title": "ThreadCompactStartResponse", "type": "object" }, - "ThreadEpiphanyContext": { - "properties": { - "checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyGraphCheckpoint" - }, - { - "type": "null" - } - ] - }, - "evidence": { - "items": { - "$ref": "#/definitions/v2/EpiphanyEvidenceRecord" - }, - "type": "array" - }, - "frontier": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyGraphFrontier" - }, - { - "type": "null" - } - ] - }, - "graph": { - "$ref": "#/definitions/v2/ThreadEpiphanyGraphContext" - }, - "investigationCheckpoint": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "observations": { - "items": { - "$ref": "#/definitions/v2/EpiphanyObservation" - }, - "type": "array" - } - }, - "required": [ - "graph" - ], - "type": "object" - }, - "ThreadEpiphanyContextMissing": { - "properties": { - "evidenceIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graphEdgeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graphNodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "observationIds": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ThreadEpiphanyContextSource": { - "enum": [ - "stored", - "live" - ], - "type": "string" - }, - "ThreadEpiphanyContextStateStatus": { - "enum": [ - "missing", - "ready" - ], - "type": "string" - }, - "ThreadEpiphanyCoordinatorAction": { - "enum": [ - "prepareCheckpoint", - "compactRehydrateReorient", - "launchReorientWorker", - "waitForReorientWorker", - "reviewReorientResult", - "regatherManually", - "launchResearch", - "reviewResearchResult", - "launchModeling", - "reviewModelingResult", - "launchVerification", - "reviewVerificationResult", - "continueImplementation" - ], - "type": "string" - }, - "ThreadEpiphanyCoordinatorSignals": { - "properties": { - "crrcAction": { - "$ref": "#/definitions/v2/ThreadEpiphanyCrrcAction" - }, - "modelingResultStatus": { - "$ref": "#/definitions/v2/ThreadEpiphanyRoleResultStatus" - }, - "pressureLevel": { - "$ref": "#/definitions/v2/ThreadEpiphanyPressureLevel" - }, - "reorientAction": { - "$ref": "#/definitions/v2/ThreadEpiphanyReorientAction" - }, - "reorientResultStatus": { - "$ref": "#/definitions/v2/ThreadEpiphanyReorientResultStatus" - }, - "researchResultStatus": { - "$ref": "#/definitions/v2/ThreadEpiphanyRoleResultStatus" - }, - "shouldPrepareCompaction": { - "type": "boolean" - }, - "verificationResultStatus": { - "$ref": "#/definitions/v2/ThreadEpiphanyRoleResultStatus" - } - }, - "required": [ - "crrcAction", - "modelingResultStatus", - "pressureLevel", - "reorientAction", - "reorientResultStatus", - "researchResultStatus", - "shouldPrepareCompaction", - "verificationResultStatus" - ], - "type": "object" - }, - "ThreadEpiphanyCrrcAction": { - "enum": [ - "continue", - "prepareCheckpoint", - "launchReorientWorker", - "waitForReorientWorker", - "reviewReorientResult", - "acceptReorientResult", - "regatherManually" - ], - "type": "string" - }, - "ThreadEpiphanyCrrcRecommendation": { - "properties": { - "action": { - "$ref": "#/definitions/v2/ThreadEpiphanyCrrcAction" - }, - "reason": { - "type": "string" - }, - "recommendedSceneAction": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ThreadEpiphanySceneAction" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "action", - "reason" - ], - "type": "object" - }, - "ThreadEpiphanyFreshnessSource": { - "enum": [ - "stored", - "live" - ], - "type": "string" - }, - "ThreadEpiphanyGraphContext": { - "properties": { - "architectureEdges": { - "items": { - "$ref": "#/definitions/v2/EpiphanyGraphEdge" - }, - "type": "array" - }, - "architectureNodes": { - "items": { - "$ref": "#/definitions/v2/EpiphanyGraphNode" - }, - "type": "array" - }, - "dataflowEdges": { - "items": { - "$ref": "#/definitions/v2/EpiphanyGraphEdge" - }, - "type": "array" - }, - "dataflowNodes": { - "items": { - "$ref": "#/definitions/v2/EpiphanyGraphNode" - }, - "type": "array" - }, - "links": { - "items": { - "$ref": "#/definitions/v2/EpiphanyGraphLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "ThreadEpiphanyGraphFreshness": { - "properties": { - "checkpointId": { - "type": [ - "string", - "null" - ] - }, - "dirtyPathCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "dirtyPaths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graphFreshness": { - "type": [ - "string", - "null" - ] - }, - "note": { - "type": "string" - }, - "openGapCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "openQuestionCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "status": { - "$ref": "#/definitions/v2/ThreadEpiphanyGraphFreshnessStatus" - } - }, - "required": [ - "dirtyPathCount", - "note", - "openGapCount", - "openQuestionCount", - "status" - ], - "type": "object" - }, - "ThreadEpiphanyGraphFreshnessStatus": { - "enum": [ - "missing", - "ready", - "stale" - ], - "type": "string" - }, - "ThreadEpiphanyGraphQuery": { - "properties": { - "depth": { - "description": "Defaults to 1 and is capped by the server.", - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "direction": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ThreadEpiphanyGraphQueryDirection" - }, - { - "type": "null" - } - ], - "description": "Defaults to `both`." - }, - "edgeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "edgeKinds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "includeLinks": { - "description": "Defaults to true so neighborhood queries preserve dataflow/architecture joins.", - "type": [ - "boolean", - "null" - ] - }, - "kind": { - "$ref": "#/definitions/v2/ThreadEpiphanyGraphQueryKind" - }, - "nodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "symbols": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "kind" - ], - "type": "object" - }, - "ThreadEpiphanyGraphQueryDirection": { - "enum": [ - "incoming", - "outgoing", - "both" - ], - "type": "string" - }, - "ThreadEpiphanyGraphQueryKind": { - "enum": [ - "node", - "path", - "frontierNeighborhood", - "neighbors" - ], - "type": "string" - }, - "ThreadEpiphanyGraphQueryMatched": { - "properties": { - "edgeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "edgeKinds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "nodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "symbols": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ThreadEpiphanyGraphQueryMissing": { - "properties": { - "edgeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "nodeIds": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ThreadEpiphanyInvalidationInput": { - "properties": { - "activeFrontierNodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "changedPathCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "changedPaths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graphNodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "note": { - "type": "string" - }, - "observedAtUnixSeconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "status": { - "$ref": "#/definitions/v2/ThreadEpiphanyInvalidationStatus" - }, - "watchedRoot": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "changedPathCount", - "note", - "status" - ], - "type": "object" - }, - "ThreadEpiphanyInvalidationStatus": { - "enum": [ - "unavailable", - "clean", - "changed" - ], - "type": "string" - }, - "ThreadEpiphanyJob": { - "properties": { - "activeThreadIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "authorityScope": { - "type": [ - "string", - "null" - ] - }, - "backendJobId": { - "type": [ - "string", - "null" - ] - }, - "blockingReason": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "itemsProcessed": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "itemsTotal": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "kind": { - "$ref": "#/definitions/v2/ThreadEpiphanyJobKind" - }, - "lastCheckpointAtUnixSeconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "launcherJobId": { - "type": [ - "string", - "null" - ] - }, - "linkedGraphNodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linkedSubgoalIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "ownerRole": { - "type": "string" - }, - "progressNote": { - "type": [ - "string", - "null" - ] - }, - "scope": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/v2/ThreadEpiphanyJobStatus" - } - }, - "required": [ - "id", - "kind", - "ownerRole", - "scope", - "status" - ], - "type": "object" - }, - "ThreadEpiphanyJobKind": { - "enum": [ - "indexing", - "remap", - "verification", - "specialist" - ], - "type": "string" - }, - "ThreadEpiphanyJobStatus": { - "enum": [ - "idle", - "needed", - "pending", - "running", - "completed", - "failed", - "cancelled", - "blocked", - "unavailable" - ], - "type": "string" - }, - "ThreadEpiphanyJobsUpdatedNotification": { - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "jobs": { - "items": { - "$ref": "#/definitions/v2/ThreadEpiphanyJob" - }, - "type": "array" - }, - "source": { - "$ref": "#/definitions/v2/ThreadEpiphanyJobsUpdatedSource" - }, - "stateRevision": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "threadId": { - "type": "string" - } - }, - "required": [ - "source", - "threadId" - ], - "title": "ThreadEpiphanyJobsUpdatedNotification", - "type": "object" - }, - "ThreadEpiphanyJobsUpdatedSource": { - "enum": [ - "runtimeProgress" - ], - "type": "string" - }, - "ThreadEpiphanyPlanningSummary": { - "properties": { - "activeObjective": { - "type": [ - "string", - "null" - ] - }, - "backlogItemCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "captureCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "draftObjectiveCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "githubIssueCaptureCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "note": { - "type": "string" - }, - "objectiveDraftCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "pendingCaptureCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "readyBacklogItemCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "roadmapStreamCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - } - }, - "required": [ - "backlogItemCount", - "captureCount", - "draftObjectiveCount", - "githubIssueCaptureCount", - "note", - "objectiveDraftCount", - "pendingCaptureCount", - "readyBacklogItemCount", - "roadmapStreamCount" - ], - "type": "object" - }, - "ThreadEpiphanyPressure": { - "properties": { - "basis": { - "$ref": "#/definitions/v2/ThreadEpiphanyPressureBasis" - }, - "level": { - "$ref": "#/definitions/v2/ThreadEpiphanyPressureLevel" - }, - "modelAutoCompactTokenLimit": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "modelContextWindow": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "note": { - "type": "string" - }, - "ratioPerMille": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "remainingTokens": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "shouldPrepareCompaction": { - "type": "boolean" - }, - "status": { - "$ref": "#/definitions/v2/ThreadEpiphanyPressureStatus" - }, - "usedTokens": { - "format": "int64", - "type": [ - "integer", - "null" - ] - } - }, - "required": [ - "basis", - "level", - "note", - "shouldPrepareCompaction", - "status" - ], - "type": "object" - }, - "ThreadEpiphanyPressureBasis": { - "enum": [ - "unknown", - "autoCompactLimit", - "modelContextWindow" - ], - "type": "string" - }, - "ThreadEpiphanyPressureLevel": { - "enum": [ - "unknown", - "low", - "elevated", - "high", - "critical" - ], - "type": "string" - }, - "ThreadEpiphanyPressureStatus": { - "enum": [ - "unknown", - "ready" - ], - "type": "string" - }, - "ThreadEpiphanyReorientAction": { - "enum": [ - "resume", - "regather" - ], - "type": "string" - }, - "ThreadEpiphanyReorientCheckpointStatus": { - "enum": [ - "missing", - "resumeReady", - "regatherRequired" - ], - "type": "string" - }, - "ThreadEpiphanyReorientDecision": { - "properties": { - "action": { - "$ref": "#/definitions/v2/ThreadEpiphanyReorientAction" - }, - "activeFrontierNodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "checkpointChangedPaths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "checkpointDirtyPaths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "checkpointId": { - "type": [ - "string", - "null" - ] - }, - "checkpointStatus": { - "$ref": "#/definitions/v2/ThreadEpiphanyReorientCheckpointStatus" - }, - "graphStatus": { - "$ref": "#/definitions/v2/ThreadEpiphanyGraphFreshnessStatus" - }, - "nextAction": { - "type": "string" - }, - "note": { - "type": "string" - }, - "pressureLevel": { - "$ref": "#/definitions/v2/ThreadEpiphanyPressureLevel" - }, - "reasons": { - "items": { - "$ref": "#/definitions/v2/ThreadEpiphanyReorientReason" - }, - "type": "array" - }, - "retrievalStatus": { - "$ref": "#/definitions/v2/ThreadEpiphanyRetrievalFreshnessStatus" - }, - "watcherStatus": { - "$ref": "#/definitions/v2/ThreadEpiphanyInvalidationStatus" - } - }, - "required": [ - "action", - "checkpointStatus", - "graphStatus", - "nextAction", - "note", - "pressureLevel", - "retrievalStatus", - "watcherStatus" - ], - "type": "object" - }, - "ThreadEpiphanyReorientFinding": { - "properties": { - "artifactRefs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "checkpointStillValid": { - "type": [ - "boolean", - "null" - ] - }, - "evidenceIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "filesInspected": { - "items": { - "type": "string" - }, - "type": "array" - }, - "frontierNodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "itemError": { - "type": [ - "string", - "null" - ] - }, - "jobError": { - "type": [ - "string", - "null" - ] - }, - "mode": { - "type": [ - "string", - "null" - ] - }, - "nextSafeMove": { - "type": [ - "string", - "null" - ] - }, - "runtimeJobId": { - "type": [ - "string", - "null" - ] - }, - "runtimeResultId": { - "type": [ - "string", - "null" - ] - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "ThreadEpiphanyReorientReason": { - "enum": [ - "missingState", - "missingCheckpoint", - "checkpointRequestedRegather", - "checkpointPathsDirty", - "checkpointPathsChanged", - "frontierChanged", - "unanchoredCheckpointWhileStateStale", - "checkpointReady" - ], - "type": "string" - }, - "ThreadEpiphanyReorientResultStatus": { - "enum": [ - "missingState", - "missingBinding", - "backendUnavailable", - "backendMissing", - "pending", - "running", - "completed", - "failed", - "cancelled" - ], - "type": "string" - }, - "ThreadEpiphanyReorientSource": { - "enum": [ - "stored", - "live" - ], - "type": "string" - }, - "ThreadEpiphanyReorientStateStatus": { - "enum": [ - "missing", - "ready" - ], - "type": "string" - }, - "ThreadEpiphanyRetrievalFreshness": { - "properties": { - "dirtyPaths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "indexedChunkCount": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexedFileCount": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "lastIndexedAtUnixSeconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "note": { - "type": "string" - }, - "semanticAvailable": { - "type": [ - "boolean", - "null" - ] - }, - "status": { - "$ref": "#/definitions/v2/ThreadEpiphanyRetrievalFreshnessStatus" - } - }, - "required": [ - "note", - "status" - ], - "type": "object" - }, - "ThreadEpiphanyRetrievalFreshnessStatus": { - "enum": [ - "missing", - "ready", - "stale", - "indexing", - "unavailable" - ], - "type": "string" - }, - "ThreadEpiphanyRoleFinding": { - "properties": { - "artifactRefs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "checkpointSummary": { - "type": [ - "string", - "null" - ] - }, - "evidenceGaps": { - "items": { - "type": "string" - }, - "type": "array" - }, - "evidenceIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "filesInspected": { - "items": { - "type": "string" - }, - "type": "array" - }, - "frontierNodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "itemError": { - "type": [ - "string", - "null" - ] - }, - "jobError": { - "type": [ - "string", - "null" - ] - }, - "nextSafeMove": { - "type": [ - "string", - "null" - ] - }, - "openQuestions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "risks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "roleId": { - "$ref": "#/definitions/v2/ThreadEpiphanyRoleId" - }, - "runtimeJobId": { - "type": [ - "string", - "null" - ] - }, - "runtimeResultId": { - "type": [ - "string", - "null" - ] - }, - "scratchSummary": { - "type": [ - "string", - "null" - ] - }, - "selfPatch": true, - "selfPersistence": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ThreadEpiphanyRoleSelfPersistenceReview" - }, - { - "type": "null" - } - ] - }, - "statePatch": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ThreadEpiphanyUpdatePatch" - }, - { - "type": "null" - } - ] - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "verdict": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "roleId" - ], - "type": "object" - }, - "ThreadEpiphanyRoleId": { - "enum": [ - "implementation", - "imagination", - "research", - "modeling", - "verification", - "reorientation" - ], - "type": "string" - }, - "ThreadEpiphanyRoleLane": { - "properties": { - "authorityScopes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "$ref": "#/definitions/v2/ThreadEpiphanyRoleId" - }, - "jobs": { - "items": { - "$ref": "#/definitions/v2/ThreadEpiphanyJob" - }, - "type": "array" - }, - "note": { - "type": "string" - }, - "ownerRole": { - "type": "string" - }, - "recommendedAction": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ThreadEpiphanySceneAction" - }, - { - "type": "null" - } - ] - }, - "status": { - "$ref": "#/definitions/v2/ThreadEpiphanyRoleStatus" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "note", - "ownerRole", - "status", - "title" - ], - "type": "object" - }, - "ThreadEpiphanyRoleResultStatus": { - "enum": [ - "missingState", - "missingBinding", - "backendUnavailable", - "backendMissing", - "pending", - "running", - "completed", - "failed", - "cancelled" - ], - "type": "string" - }, - "ThreadEpiphanyRoleSelfPersistenceReview": { - "properties": { - "reasons": { - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "$ref": "#/definitions/v2/ThreadEpiphanyRoleSelfPersistenceStatus" - }, - "targetAgentId": { - "type": [ - "string", - "null" - ] - }, - "targetPath": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "status" - ], - "type": "object" - }, - "ThreadEpiphanyRoleSelfPersistenceStatus": { - "enum": [ - "missing", - "accepted", - "rejected" - ], - "type": "string" - }, - "ThreadEpiphanyRoleStatus": { - "enum": [ - "ready", - "needed", - "blocked", - "running", - "completed", - "waiting", - "review", - "unavailable" - ], - "type": "string" - }, - "ThreadEpiphanyRolesSource": { - "enum": [ - "stored", - "live" - ], - "type": "string" - }, - "ThreadEpiphanyScene": { - "properties": { - "activeSubgoal": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ThreadEpiphanySceneSubgoal" - }, - { - "type": "null" - } - ] - }, - "availableActions": { - "items": { - "$ref": "#/definitions/v2/ThreadEpiphanySceneAction" - }, - "type": "array" - }, - "churn": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ThreadEpiphanySceneChurn" - }, - { - "type": "null" - } - ] - }, - "evidence": { - "$ref": "#/definitions/v2/ThreadEpiphanySceneRecords" - }, - "graph": { - "$ref": "#/definitions/v2/ThreadEpiphanySceneGraph" - }, - "invariantStatusCounts": { - "items": { - "$ref": "#/definitions/v2/ThreadEpiphanySceneStatusCount" - }, - "type": "array" - }, - "investigationCheckpoint": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ThreadEpiphanySceneInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "objective": { - "type": [ - "string", - "null" - ] - }, - "observations": { - "$ref": "#/definitions/v2/ThreadEpiphanySceneRecords" - }, - "retrieval": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ThreadEpiphanySceneRetrieval" - }, - { - "type": "null" - } - ] - }, - "revision": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "source": { - "$ref": "#/definitions/v2/ThreadEpiphanySceneSource" - }, - "stateStatus": { - "$ref": "#/definitions/v2/ThreadEpiphanySceneStateStatus" - }, - "subgoals": { - "items": { - "$ref": "#/definitions/v2/ThreadEpiphanySceneSubgoal" - }, - "type": "array" - } - }, - "required": [ - "evidence", - "graph", - "observations", - "source", - "stateStatus" - ], - "type": "object" - }, - "ThreadEpiphanySceneAction": { - "enum": [ - "index", - "retrieve", - "distill", - "context", - "planning", - "graphQuery", - "jobs", - "roles", - "coordinator", - "roleLaunch", - "roleResult", - "roleAccept", - "jobLaunch", - "jobInterrupt", - "freshness", - "pressure", - "reorient", - "crrc", - "reorientLaunch", - "reorientResult", - "reorientAccept", - "propose", - "promote", - "update" - ], - "type": "string" - }, - "ThreadEpiphanySceneChurn": { - "properties": { - "diffPressure": { - "type": "string" - }, - "graphFreshness": { - "type": [ - "string", - "null" - ] - }, - "understandingStatus": { - "type": "string" - }, - "unexplainedWrites": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "warning": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "diffPressure", - "understandingStatus" - ], - "type": "object" - }, - "ThreadEpiphanySceneGraph": { - "properties": { - "activeEdgeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "activeNodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "architectureEdgeCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "architectureNodeCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "checkpointId": { - "type": [ - "string", - "null" - ] - }, - "checkpointSummary": { - "type": [ - "string", - "null" - ] - }, - "dataflowEdgeCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "dataflowNodeCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "dirtyPaths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linkCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "openGapCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "openQuestionCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - } - }, - "required": [ - "architectureEdgeCount", - "architectureNodeCount", - "dataflowEdgeCount", - "dataflowNodeCount", - "linkCount", - "openGapCount", - "openQuestionCount" - ], - "type": "object" - }, - "ThreadEpiphanySceneInvestigationCheckpoint": { - "properties": { - "capturedAtTurnId": { - "type": [ - "string", - "null" - ] - }, - "checkpointId": { - "type": "string" - }, - "codeRefCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "disposition": { - "$ref": "#/definitions/v2/EpiphanyInvestigationDisposition" - }, - "evidenceCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "focus": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "nextAction": { - "type": [ - "string", - "null" - ] - }, - "openQuestionCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpointId", - "codeRefCount", - "disposition", - "evidenceCount", - "focus", - "kind", - "openQuestionCount" - ], - "type": "object" - }, - "ThreadEpiphanySceneRecord": { - "properties": { - "codeRefCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "codeRefCount", - "id", - "kind", - "status", - "summary" - ], - "type": "object" - }, - "ThreadEpiphanySceneRecords": { - "properties": { - "latest": { - "items": { - "$ref": "#/definitions/v2/ThreadEpiphanySceneRecord" - }, - "type": "array" - }, - "totalCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - } - }, - "required": [ - "totalCount" - ], - "type": "object" - }, - "ThreadEpiphanySceneRetrieval": { - "properties": { - "dirtyPathCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "indexRevision": { - "type": [ - "string", - "null" - ] - }, - "indexedChunkCount": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexedFileCount": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "semanticAvailable": { - "type": "boolean" - }, - "shardCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "status": { - "$ref": "#/definitions/v2/EpiphanyRetrievalStatus" - }, - "workspaceRoot": { - "type": "string" - } - }, - "required": [ - "dirtyPathCount", - "semanticAvailable", - "shardCount", - "status", - "workspaceRoot" - ], - "type": "object" - }, - "ThreadEpiphanySceneSource": { - "enum": [ - "stored", - "live" - ], - "type": "string" - }, - "ThreadEpiphanySceneStateStatus": { - "enum": [ - "missing", - "ready" - ], - "type": "string" - }, - "ThreadEpiphanySceneStatusCount": { - "properties": { - "count": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "status": { - "type": "string" - } - }, - "required": [ - "count", - "status" - ], - "type": "object" - }, - "ThreadEpiphanySceneSubgoal": { - "properties": { - "active": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "active", - "id", - "status", - "title" - ], - "type": "object" - }, - "ThreadEpiphanyStateUpdatedField": { - "enum": [ - "objective", - "activeSubgoalId", - "subgoals", - "invariants", - "graphs", - "graphFrontier", - "graphCheckpoint", - "scratch", - "investigationCheckpoint", - "jobBindings", - "acceptanceReceipts", - "runtimeLinks", - "observations", - "evidence", - "churn", - "mode", - "planning" - ], - "type": "string" - }, - "ThreadEpiphanyStateUpdatedNotification": { - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "changedFields": { - "items": { - "$ref": "#/definitions/v2/ThreadEpiphanyStateUpdatedField" - }, - "type": "array" - }, - "epiphanyState": { - "$ref": "#/definitions/v2/EpiphanyThreadState" - }, - "revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "source": { - "$ref": "#/definitions/v2/ThreadEpiphanyStateUpdatedSource" - }, - "threadId": { - "type": "string" - } - }, - "required": [ - "changedFields", - "epiphanyState", - "revision", - "source", - "threadId" - ], - "title": "ThreadEpiphanyStateUpdatedNotification", - "type": "object" - }, - "ThreadEpiphanyStateUpdatedSource": { - "enum": [ - "update", - "promote", - "jobLaunch", - "jobInterrupt", - "reorientAccept", - "roleAccept" - ], - "type": "string" - }, - "ThreadEpiphanyUpdatePatch": { - "properties": { - "acceptanceReceipts": { - "items": { - "$ref": "#/definitions/v2/EpiphanyAcceptanceReceipt" - }, - "type": "array" - }, - "activeSubgoalId": { - "type": [ - "string", - "null" - ] - }, - "churn": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyChurnState" - }, - { - "type": "null" - } - ] - }, - "evidence": { - "items": { - "$ref": "#/definitions/v2/EpiphanyEvidenceRecord" - }, - "type": "array" - }, - "graphCheckpoint": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyGraphCheckpoint" - }, - { - "type": "null" - } - ] - }, - "graphFrontier": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyGraphFrontier" - }, - { - "type": "null" - } - ] - }, - "graphs": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyGraphs" - }, - { - "type": "null" - } - ] - }, - "invariants": { - "items": { - "$ref": "#/definitions/v2/EpiphanyInvariant" - }, - "type": [ - "array", - "null" - ] - }, - "investigationCheckpoint": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "jobBindings": { - "items": { - "$ref": "#/definitions/v2/EpiphanyJobBinding" - }, - "type": [ - "array", - "null" - ] - }, - "mode": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyModeState" - }, - { - "type": "null" - } - ] - }, - "objective": { - "type": [ - "string", - "null" - ] - }, - "observations": { - "items": { - "$ref": "#/definitions/v2/EpiphanyObservation" - }, - "type": "array" - }, - "planning": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyPlanningState" - }, - { - "type": "null" - } - ] - }, - "runtimeLinks": { - "items": { - "$ref": "#/definitions/v2/EpiphanyRuntimeLink" - }, - "type": "array" - }, - "scratch": { - "anyOf": [ - { - "$ref": "#/definitions/v2/EpiphanyScratchPad" - }, - { - "type": "null" - } - ] - }, - "subgoals": { - "items": { - "$ref": "#/definitions/v2/EpiphanySubgoal" - }, - "type": [ - "array", - "null" - ] - } - }, - "type": "object" - }, - "ThreadEpiphanyViewCoordinator": { - "properties": { - "action": { - "$ref": "#/definitions/v2/ThreadEpiphanyCoordinatorAction" - }, - "canAutoRun": { - "type": "boolean" - }, - "note": { - "type": "string" - }, - "reason": { - "type": "string" - }, - "recommendedSceneAction": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ThreadEpiphanySceneAction" - }, - { - "type": "null" - } - ] - }, - "requiresReview": { - "type": "boolean" - }, - "roles": { - "items": { - "$ref": "#/definitions/v2/ThreadEpiphanyRoleLane" - }, - "type": "array" - }, - "source": { - "$ref": "#/definitions/v2/ThreadEpiphanyRolesSource" - }, - "sourceSignals": { - "$ref": "#/definitions/v2/ThreadEpiphanyCoordinatorSignals" - }, - "stateRevision": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "stateStatus": { - "$ref": "#/definitions/v2/ThreadEpiphanyReorientStateStatus" - }, - "targetRole": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ThreadEpiphanyRoleId" - }, - { - "type": "null" - } - ] - }, - "threadId": { - "type": "string" - } - }, - "required": [ - "action", - "canAutoRun", - "note", - "reason", - "requiresReview", - "roles", - "source", - "sourceSignals", - "stateStatus", - "threadId" - ], - "type": "object" - }, - "ThreadEpiphanyViewCrrc": { - "properties": { - "availableActions": { - "items": { - "$ref": "#/definitions/v2/ThreadEpiphanySceneAction" - }, - "type": "array" - }, - "decision": { - "$ref": "#/definitions/v2/ThreadEpiphanyReorientDecision" - }, - "note": { - "type": "string" - }, - "pressure": { - "$ref": "#/definitions/v2/ThreadEpiphanyPressure" - }, - "recommendation": { - "$ref": "#/definitions/v2/ThreadEpiphanyCrrcRecommendation" - }, - "reorientBindingId": { - "type": "string" - }, - "reorientFinding": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ThreadEpiphanyReorientFinding" - }, - { - "type": "null" - } - ] - }, - "reorientJob": { - "anyOf": [ - { - "$ref": "#/definitions/v2/ThreadEpiphanyJob" - }, - { - "type": "null" - } - ] - }, - "reorientResultStatus": { - "$ref": "#/definitions/v2/ThreadEpiphanyReorientResultStatus" - }, - "source": { - "$ref": "#/definitions/v2/ThreadEpiphanyReorientSource" - }, - "stateRevision": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "stateStatus": { - "$ref": "#/definitions/v2/ThreadEpiphanyReorientStateStatus" - }, - "threadId": { - "type": "string" - } - }, - "required": [ - "decision", - "note", - "pressure", - "recommendation", - "reorientBindingId", - "reorientResultStatus", - "source", - "stateStatus", - "threadId" - ], - "type": "object" - }, - "ThreadEpiphanyViewLens": { - "enum": [ - "scene", - "jobs", - "roles", - "planning", - "pressure", - "reorient", - "crrc", - "coordinator" - ], - "type": "string" - }, - "ThreadEpiphanyViewPlanning": { - "properties": { - "planning": { - "$ref": "#/definitions/v2/EpiphanyPlanningState" - }, - "source": { - "$ref": "#/definitions/v2/ThreadEpiphanyContextSource" - }, - "stateRevision": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "stateStatus": { - "$ref": "#/definitions/v2/ThreadEpiphanyContextStateStatus" - }, - "summary": { - "$ref": "#/definitions/v2/ThreadEpiphanyPlanningSummary" - }, - "threadId": { - "type": "string" - } - }, - "required": [ - "planning", - "source", - "stateStatus", - "summary", - "threadId" - ], - "type": "object" - }, - "ThreadEpiphanyViewReorient": { - "properties": { - "decision": { - "$ref": "#/definitions/v2/ThreadEpiphanyReorientDecision" - }, - "source": { - "$ref": "#/definitions/v2/ThreadEpiphanyReorientSource" - }, - "stateRevision": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "stateStatus": { - "$ref": "#/definitions/v2/ThreadEpiphanyReorientStateStatus" - }, - "threadId": { - "type": "string" - } - }, - "required": [ - "decision", - "source", - "stateStatus", - "threadId" - ], - "type": "object" - }, - "ThreadEpiphanyViewRoles": { - "properties": { - "note": { - "type": "string" - }, - "roles": { - "items": { - "$ref": "#/definitions/v2/ThreadEpiphanyRoleLane" - }, - "type": "array" - }, - "source": { - "$ref": "#/definitions/v2/ThreadEpiphanyRolesSource" - }, - "stateRevision": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "stateStatus": { - "$ref": "#/definitions/v2/ThreadEpiphanyReorientStateStatus" - }, - "threadId": { - "type": "string" - } - }, - "required": [ - "note", - "roles", - "source", - "stateStatus", - "threadId" - ], - "type": "object" - }, "ThreadForkParams": { "$schema": "http://json-schema.org/draft-07/schema#", "description": "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.", diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json index ff9a3ba0..bd4521ec 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json +++ b/vendor/codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json @@ -3666,1502 +3666,6 @@ ], "type": "object" }, - "EpiphanyAcceptanceReceipt": { - "properties": { - "accepted_at": { - "type": "string" - }, - "accepted_evidence_id": { - "type": [ - "string", - "null" - ] - }, - "accepted_observation_id": { - "type": [ - "string", - "null" - ] - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "job_id": { - "type": "string" - }, - "result_id": { - "type": "string" - }, - "role_id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "accepted_at", - "binding_id", - "id", - "job_id", - "result_id", - "role_id", - "status", - "surface" - ], - "type": "object" - }, - "EpiphanyBacklogItem": { - "properties": { - "acceptance_sketch": { - "items": { - "type": "string" - }, - "type": "array" - }, - "blockers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": "string" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "duplicate_of": { - "type": [ - "string", - "null" - ] - }, - "evidence_refs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "horizon": { - "type": "string" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "lane_hints": { - "items": { - "type": "string" - }, - "type": "array" - }, - "priority": { - "$ref": "#/definitions/EpiphanyPlanningPriority" - }, - "product_area": { - "type": "string" - }, - "source_refs": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "horizon", - "id", - "kind", - "priority", - "product_area", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyChurnState": { - "properties": { - "diff_pressure": { - "type": "string" - }, - "graph_freshness": { - "type": [ - "string", - "null" - ] - }, - "understanding_status": { - "type": "string" - }, - "unexplained_writes": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "warning": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "diff_pressure", - "understanding_status" - ], - "type": "object" - }, - "EpiphanyCodeRef": { - "properties": { - "end_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "path": { - "type": "string" - }, - "start_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "symbol": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "path" - ], - "type": "object" - }, - "EpiphanyEvidenceRecord": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyGraph": { - "properties": { - "edges": { - "items": { - "$ref": "#/definitions/EpiphanyGraphEdge" - }, - "type": "array" - }, - "nodes": { - "items": { - "$ref": "#/definitions/EpiphanyGraphNode" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphCheckpoint": { - "properties": { - "checkpoint_id": { - "type": "string" - }, - "frontier_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graph_revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "graph_revision" - ], - "type": "object" - }, - "EpiphanyGraphEdge": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": [ - "string", - "null" - ] - }, - "kind": { - "type": "string" - }, - "label": { - "type": [ - "string", - "null" - ] - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "source_id": { - "type": "string" - }, - "target_id": { - "type": "string" - } - }, - "required": [ - "kind", - "source_id", - "target_id" - ], - "type": "object" - }, - "EpiphanyGraphFrontier": { - "properties": { - "active_edge_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "active_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphLink": { - "properties": { - "architecture_node_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "dataflow_node_id": { - "type": "string" - }, - "relationship": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "architecture_node_id", - "dataflow_node_id" - ], - "type": "object" - }, - "EpiphanyGraphNode": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "metaphor": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "status": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "title" - ], - "type": "object" - }, - "EpiphanyGraphs": { - "properties": { - "architecture": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "dataflow": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "links": { - "items": { - "$ref": "#/definitions/EpiphanyGraphLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyInvariant": { - "properties": { - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "rationale": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - } - }, - "required": [ - "description", - "id", - "status" - ], - "type": "object" - }, - "EpiphanyInvestigationCheckpoint": { - "properties": { - "captured_at_turn_id": { - "type": [ - "string", - "null" - ] - }, - "checkpoint_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "disposition": { - "$ref": "#/definitions/EpiphanyInvestigationDisposition" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "focus": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "next_action": { - "type": [ - "string", - "null" - ] - }, - "open_questions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "disposition", - "focus", - "kind" - ], - "type": "object" - }, - "EpiphanyInvestigationDisposition": { - "enum": [ - "resume_ready", - "regather_required" - ], - "type": "string" - }, - "EpiphanyJobBinding": { - "properties": { - "authority_scope": { - "type": [ - "string", - "null" - ] - }, - "blocking_reason": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "kind": { - "$ref": "#/definitions/EpiphanyJobKind" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "owner_role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "owner_role", - "scope" - ], - "type": "object" - }, - "EpiphanyJobKind": { - "enum": [ - "indexing", - "remap", - "verification", - "specialist" - ], - "type": "string" - }, - "EpiphanyModeKind": { - "enum": [ - "plan", - "default" - ], - "type": "string" - }, - "EpiphanyModeState": { - "properties": { - "kind": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeKind" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "EpiphanyObjectiveDraft": { - "properties": { - "acceptance_criteria": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "evidence_required": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "lane_plan": { - "$ref": "#/definitions/EpiphanyObjectiveDraftLanePlan" - }, - "review_gates": { - "items": { - "type": "string" - }, - "type": "array" - }, - "risks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "scope": { - "$ref": "#/definitions/EpiphanyObjectiveDraftScope" - }, - "source_item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "lane_plan", - "scope", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyObjectiveDraftLanePlan": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "eyes": { - "type": [ - "string", - "null" - ] - }, - "hands": { - "type": [ - "string", - "null" - ] - }, - "imagination": { - "type": [ - "string", - "null" - ] - }, - "life": { - "type": [ - "string", - "null" - ] - }, - "soul": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyObjectiveDraftScope": { - "properties": { - "excludes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "includes": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyObservation": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "source_kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "source_kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyPlanningCapture": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "confidence": { - "type": "string" - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "source": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "speaker": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "id", - "source", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyPlanningPriority": { - "properties": { - "blocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": [ - "string", - "null" - ] - }, - "effort": { - "type": [ - "string", - "null" - ] - }, - "impact": { - "type": [ - "string", - "null" - ] - }, - "rationale": { - "type": "string" - }, - "reason": { - "type": [ - "string", - "null" - ] - }, - "unblocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "urgency": { - "type": [ - "string", - "null" - ] - }, - "value": { - "type": "string" - } - }, - "required": [ - "rationale", - "value" - ], - "type": "object" - }, - "EpiphanyPlanningSourceRef": { - "properties": { - "assignees": { - "items": { - "type": "string" - }, - "type": "array" - }, - "author": { - "type": [ - "string", - "null" - ] - }, - "closed_at": { - "type": [ - "string", - "null" - ] - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "database_id": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "external_id": { - "type": [ - "string", - "null" - ] - }, - "imported_at": { - "type": [ - "string", - "null" - ] - }, - "is_pull_request": { - "type": [ - "boolean", - "null" - ] - }, - "issue_number": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "kind": { - "type": "string" - }, - "labels": { - "items": { - "type": "string" - }, - "type": "array" - }, - "milestone": { - "type": [ - "string", - "null" - ] - }, - "node_id": { - "type": [ - "string", - "null" - ] - }, - "provider": { - "type": [ - "string", - "null" - ] - }, - "repo": { - "type": [ - "string", - "null" - ] - }, - "state": { - "type": [ - "string", - "null" - ] - }, - "updated_at": { - "type": [ - "string", - "null" - ] - }, - "uri": { - "type": [ - "string", - "null" - ] - }, - "url": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "kind" - ], - "type": "object" - }, - "EpiphanyPlanningState": { - "properties": { - "backlog_items": { - "items": { - "$ref": "#/definitions/EpiphanyBacklogItem" - }, - "type": "array" - }, - "captures": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningCapture" - }, - "type": "array" - }, - "objective_drafts": { - "items": { - "$ref": "#/definitions/EpiphanyObjectiveDraft" - }, - "type": "array" - }, - "roadmap_streams": { - "items": { - "$ref": "#/definitions/EpiphanyRoadmapStream" - }, - "type": "array" - }, - "workspace_root": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyRetrievalShardSummary": { - "properties": { - "exact_available": { - "type": "boolean" - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "path_prefix": { - "type": "string" - }, - "semantic_available": { - "type": "boolean" - }, - "shard_id": { - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - } - }, - "required": [ - "path_prefix", - "shard_id" - ], - "type": "object" - }, - "EpiphanyRetrievalState": { - "properties": { - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "index_revision": { - "type": [ - "string", - "null" - ] - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "last_indexed_at_unix_seconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "semantic_available": { - "type": "boolean" - }, - "shards": { - "items": { - "$ref": "#/definitions/EpiphanyRetrievalShardSummary" - }, - "type": "array" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - }, - "workspace_root": { - "type": "string" - } - }, - "required": [ - "workspace_root" - ], - "type": "object" - }, - "EpiphanyRetrievalStatus": { - "enum": [ - "unavailable", - "ready", - "stale", - "indexing" - ], - "type": "string" - }, - "EpiphanyRoadmapStream": { - "properties": { - "blocked_by": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "near_term_focus": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "review_cadence": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyRuntimeLink": { - "properties": { - "authority_scope": { - "type": "string" - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "role_id": { - "type": "string" - }, - "runtime_job_id": { - "type": "string" - }, - "runtime_result_id": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "authority_scope", - "binding_id", - "id", - "role_id", - "runtime_job_id", - "surface" - ], - "type": "object" - }, - "EpiphanyScratchPad": { - "properties": { - "hypothesis": { - "type": [ - "string", - "null" - ] - }, - "next_probe": { - "type": [ - "string", - "null" - ] - }, - "notes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanySubgoal": { - "properties": { - "id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyThreadState": { - "properties": { - "acceptance_receipts": { - "items": { - "$ref": "#/definitions/EpiphanyAcceptanceReceipt" - }, - "type": "array" - }, - "active_subgoal_id": { - "type": [ - "string", - "null" - ] - }, - "churn": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyChurnState" - }, - { - "type": "null" - } - ] - }, - "graph_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphCheckpoint" - }, - { - "type": "null" - } - ] - }, - "graph_frontier": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphFrontier" - }, - { - "type": "null" - } - ] - }, - "graphs": { - "$ref": "#/definitions/EpiphanyGraphs" - }, - "invariants": { - "items": { - "$ref": "#/definitions/EpiphanyInvariant" - }, - "type": "array" - }, - "investigation_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "job_bindings": { - "items": { - "$ref": "#/definitions/EpiphanyJobBinding" - }, - "type": "array" - }, - "last_updated_turn_id": { - "type": [ - "string", - "null" - ] - }, - "mode": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeState" - }, - { - "type": "null" - } - ] - }, - "objective": { - "type": [ - "string", - "null" - ] - }, - "observations": { - "items": { - "$ref": "#/definitions/EpiphanyObservation" - }, - "type": "array" - }, - "planning": { - "$ref": "#/definitions/EpiphanyPlanningState" - }, - "recent_evidence": { - "items": { - "$ref": "#/definitions/EpiphanyEvidenceRecord" - }, - "type": "array" - }, - "retrieval": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalState" - }, - { - "type": "null" - } - ] - }, - "revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "runtime_links": { - "items": { - "$ref": "#/definitions/EpiphanyRuntimeLink" - }, - "type": "array" - }, - "scratch": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyScratchPad" - }, - { - "type": "null" - } - ] - }, - "subgoals": { - "items": { - "$ref": "#/definitions/EpiphanySubgoal" - }, - "type": "array" - } - }, - "required": [ - "revision" - ], - "type": "object" - }, "ErrorNotification": { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { @@ -10793,46 +9297,6 @@ "title": "ConfigWarningNotification", "type": "object" }, - { - "properties": { - "method": { - "enum": [ - "thread/epiphany/stateUpdated" - ], - "title": "Thread/epiphany/stateUpdatedNotificationMethod", - "type": "string" - }, - "params": { - "$ref": "#/definitions/ThreadEpiphanyStateUpdatedNotification" - } - }, - "required": [ - "method", - "params" - ], - "title": "Thread/epiphany/stateUpdatedNotification", - "type": "object" - }, - { - "properties": { - "method": { - "enum": [ - "thread/epiphany/jobsUpdated" - ], - "title": "Thread/epiphany/jobsUpdatedNotificationMethod", - "type": "string" - }, - "params": { - "$ref": "#/definitions/ThreadEpiphanyJobsUpdatedNotification" - } - }, - "required": [ - "method", - "params" - ], - "title": "Thread/epiphany/jobsUpdatedNotification", - "type": "object" - }, { "properties": { "method": { @@ -11397,17 +9861,6 @@ "description": "Whether the thread is ephemeral and should not be materialized on disk.", "type": "boolean" }, - "epiphanyState": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyThreadState" - }, - { - "type": "null" - } - ], - "description": "Only populated on `thread/start`, `thread/resume`, `thread/fork`, `thread/read`, and notifications/responses that reuse those hydrated thread payloads." - }, "forkedFromId": { "description": "Source thread id when this thread was created by forking another thread.", "type": [ @@ -11586,2275 +10039,6 @@ "title": "ThreadCompactStartResponse", "type": "object" }, - "ThreadEpiphanyContext": { - "properties": { - "checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphCheckpoint" - }, - { - "type": "null" - } - ] - }, - "evidence": { - "items": { - "$ref": "#/definitions/EpiphanyEvidenceRecord" - }, - "type": "array" - }, - "frontier": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphFrontier" - }, - { - "type": "null" - } - ] - }, - "graph": { - "$ref": "#/definitions/ThreadEpiphanyGraphContext" - }, - "investigationCheckpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "observations": { - "items": { - "$ref": "#/definitions/EpiphanyObservation" - }, - "type": "array" - } - }, - "required": [ - "graph" - ], - "type": "object" - }, - "ThreadEpiphanyContextMissing": { - "properties": { - "evidenceIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graphEdgeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graphNodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "observationIds": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ThreadEpiphanyContextSource": { - "enum": [ - "stored", - "live" - ], - "type": "string" - }, - "ThreadEpiphanyContextStateStatus": { - "enum": [ - "missing", - "ready" - ], - "type": "string" - }, - "ThreadEpiphanyCoordinatorAction": { - "enum": [ - "prepareCheckpoint", - "compactRehydrateReorient", - "launchReorientWorker", - "waitForReorientWorker", - "reviewReorientResult", - "regatherManually", - "launchResearch", - "reviewResearchResult", - "launchModeling", - "reviewModelingResult", - "launchVerification", - "reviewVerificationResult", - "continueImplementation" - ], - "type": "string" - }, - "ThreadEpiphanyCoordinatorSignals": { - "properties": { - "crrcAction": { - "$ref": "#/definitions/ThreadEpiphanyCrrcAction" - }, - "modelingResultStatus": { - "$ref": "#/definitions/ThreadEpiphanyRoleResultStatus" - }, - "pressureLevel": { - "$ref": "#/definitions/ThreadEpiphanyPressureLevel" - }, - "reorientAction": { - "$ref": "#/definitions/ThreadEpiphanyReorientAction" - }, - "reorientResultStatus": { - "$ref": "#/definitions/ThreadEpiphanyReorientResultStatus" - }, - "researchResultStatus": { - "$ref": "#/definitions/ThreadEpiphanyRoleResultStatus" - }, - "shouldPrepareCompaction": { - "type": "boolean" - }, - "verificationResultStatus": { - "$ref": "#/definitions/ThreadEpiphanyRoleResultStatus" - } - }, - "required": [ - "crrcAction", - "modelingResultStatus", - "pressureLevel", - "reorientAction", - "reorientResultStatus", - "researchResultStatus", - "shouldPrepareCompaction", - "verificationResultStatus" - ], - "type": "object" - }, - "ThreadEpiphanyCrrcAction": { - "enum": [ - "continue", - "prepareCheckpoint", - "launchReorientWorker", - "waitForReorientWorker", - "reviewReorientResult", - "acceptReorientResult", - "regatherManually" - ], - "type": "string" - }, - "ThreadEpiphanyCrrcRecommendation": { - "properties": { - "action": { - "$ref": "#/definitions/ThreadEpiphanyCrrcAction" - }, - "reason": { - "type": "string" - }, - "recommendedSceneAction": { - "anyOf": [ - { - "$ref": "#/definitions/ThreadEpiphanySceneAction" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "action", - "reason" - ], - "type": "object" - }, - "ThreadEpiphanyFreshnessSource": { - "enum": [ - "stored", - "live" - ], - "type": "string" - }, - "ThreadEpiphanyGraphContext": { - "properties": { - "architectureEdges": { - "items": { - "$ref": "#/definitions/EpiphanyGraphEdge" - }, - "type": "array" - }, - "architectureNodes": { - "items": { - "$ref": "#/definitions/EpiphanyGraphNode" - }, - "type": "array" - }, - "dataflowEdges": { - "items": { - "$ref": "#/definitions/EpiphanyGraphEdge" - }, - "type": "array" - }, - "dataflowNodes": { - "items": { - "$ref": "#/definitions/EpiphanyGraphNode" - }, - "type": "array" - }, - "links": { - "items": { - "$ref": "#/definitions/EpiphanyGraphLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "ThreadEpiphanyGraphFreshness": { - "properties": { - "checkpointId": { - "type": [ - "string", - "null" - ] - }, - "dirtyPathCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "dirtyPaths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graphFreshness": { - "type": [ - "string", - "null" - ] - }, - "note": { - "type": "string" - }, - "openGapCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "openQuestionCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "status": { - "$ref": "#/definitions/ThreadEpiphanyGraphFreshnessStatus" - } - }, - "required": [ - "dirtyPathCount", - "note", - "openGapCount", - "openQuestionCount", - "status" - ], - "type": "object" - }, - "ThreadEpiphanyGraphFreshnessStatus": { - "enum": [ - "missing", - "ready", - "stale" - ], - "type": "string" - }, - "ThreadEpiphanyGraphQuery": { - "properties": { - "depth": { - "description": "Defaults to 1 and is capped by the server.", - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "direction": { - "anyOf": [ - { - "$ref": "#/definitions/ThreadEpiphanyGraphQueryDirection" - }, - { - "type": "null" - } - ], - "description": "Defaults to `both`." - }, - "edgeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "edgeKinds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "includeLinks": { - "description": "Defaults to true so neighborhood queries preserve dataflow/architecture joins.", - "type": [ - "boolean", - "null" - ] - }, - "kind": { - "$ref": "#/definitions/ThreadEpiphanyGraphQueryKind" - }, - "nodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "symbols": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "kind" - ], - "type": "object" - }, - "ThreadEpiphanyGraphQueryDirection": { - "enum": [ - "incoming", - "outgoing", - "both" - ], - "type": "string" - }, - "ThreadEpiphanyGraphQueryKind": { - "enum": [ - "node", - "path", - "frontierNeighborhood", - "neighbors" - ], - "type": "string" - }, - "ThreadEpiphanyGraphQueryMatched": { - "properties": { - "edgeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "edgeKinds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "nodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "symbols": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ThreadEpiphanyGraphQueryMissing": { - "properties": { - "edgeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "nodeIds": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ThreadEpiphanyInvalidationInput": { - "properties": { - "activeFrontierNodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "changedPathCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "changedPaths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graphNodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "note": { - "type": "string" - }, - "observedAtUnixSeconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "status": { - "$ref": "#/definitions/ThreadEpiphanyInvalidationStatus" - }, - "watchedRoot": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "changedPathCount", - "note", - "status" - ], - "type": "object" - }, - "ThreadEpiphanyInvalidationStatus": { - "enum": [ - "unavailable", - "clean", - "changed" - ], - "type": "string" - }, - "ThreadEpiphanyJob": { - "properties": { - "activeThreadIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "authorityScope": { - "type": [ - "string", - "null" - ] - }, - "backendJobId": { - "type": [ - "string", - "null" - ] - }, - "blockingReason": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "itemsProcessed": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "itemsTotal": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "kind": { - "$ref": "#/definitions/ThreadEpiphanyJobKind" - }, - "lastCheckpointAtUnixSeconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "launcherJobId": { - "type": [ - "string", - "null" - ] - }, - "linkedGraphNodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linkedSubgoalIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "ownerRole": { - "type": "string" - }, - "progressNote": { - "type": [ - "string", - "null" - ] - }, - "scope": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/ThreadEpiphanyJobStatus" - } - }, - "required": [ - "id", - "kind", - "ownerRole", - "scope", - "status" - ], - "type": "object" - }, - "ThreadEpiphanyJobKind": { - "enum": [ - "indexing", - "remap", - "verification", - "specialist" - ], - "type": "string" - }, - "ThreadEpiphanyJobStatus": { - "enum": [ - "idle", - "needed", - "pending", - "running", - "completed", - "failed", - "cancelled", - "blocked", - "unavailable" - ], - "type": "string" - }, - "ThreadEpiphanyJobsUpdatedNotification": { - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "jobs": { - "items": { - "$ref": "#/definitions/ThreadEpiphanyJob" - }, - "type": "array" - }, - "source": { - "$ref": "#/definitions/ThreadEpiphanyJobsUpdatedSource" - }, - "stateRevision": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "threadId": { - "type": "string" - } - }, - "required": [ - "source", - "threadId" - ], - "title": "ThreadEpiphanyJobsUpdatedNotification", - "type": "object" - }, - "ThreadEpiphanyJobsUpdatedSource": { - "enum": [ - "runtimeProgress" - ], - "type": "string" - }, - "ThreadEpiphanyPlanningSummary": { - "properties": { - "activeObjective": { - "type": [ - "string", - "null" - ] - }, - "backlogItemCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "captureCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "draftObjectiveCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "githubIssueCaptureCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "note": { - "type": "string" - }, - "objectiveDraftCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "pendingCaptureCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "readyBacklogItemCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "roadmapStreamCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - } - }, - "required": [ - "backlogItemCount", - "captureCount", - "draftObjectiveCount", - "githubIssueCaptureCount", - "note", - "objectiveDraftCount", - "pendingCaptureCount", - "readyBacklogItemCount", - "roadmapStreamCount" - ], - "type": "object" - }, - "ThreadEpiphanyPressure": { - "properties": { - "basis": { - "$ref": "#/definitions/ThreadEpiphanyPressureBasis" - }, - "level": { - "$ref": "#/definitions/ThreadEpiphanyPressureLevel" - }, - "modelAutoCompactTokenLimit": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "modelContextWindow": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "note": { - "type": "string" - }, - "ratioPerMille": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "remainingTokens": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "shouldPrepareCompaction": { - "type": "boolean" - }, - "status": { - "$ref": "#/definitions/ThreadEpiphanyPressureStatus" - }, - "usedTokens": { - "format": "int64", - "type": [ - "integer", - "null" - ] - } - }, - "required": [ - "basis", - "level", - "note", - "shouldPrepareCompaction", - "status" - ], - "type": "object" - }, - "ThreadEpiphanyPressureBasis": { - "enum": [ - "unknown", - "autoCompactLimit", - "modelContextWindow" - ], - "type": "string" - }, - "ThreadEpiphanyPressureLevel": { - "enum": [ - "unknown", - "low", - "elevated", - "high", - "critical" - ], - "type": "string" - }, - "ThreadEpiphanyPressureStatus": { - "enum": [ - "unknown", - "ready" - ], - "type": "string" - }, - "ThreadEpiphanyReorientAction": { - "enum": [ - "resume", - "regather" - ], - "type": "string" - }, - "ThreadEpiphanyReorientCheckpointStatus": { - "enum": [ - "missing", - "resumeReady", - "regatherRequired" - ], - "type": "string" - }, - "ThreadEpiphanyReorientDecision": { - "properties": { - "action": { - "$ref": "#/definitions/ThreadEpiphanyReorientAction" - }, - "activeFrontierNodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "checkpointChangedPaths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "checkpointDirtyPaths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "checkpointId": { - "type": [ - "string", - "null" - ] - }, - "checkpointStatus": { - "$ref": "#/definitions/ThreadEpiphanyReorientCheckpointStatus" - }, - "graphStatus": { - "$ref": "#/definitions/ThreadEpiphanyGraphFreshnessStatus" - }, - "nextAction": { - "type": "string" - }, - "note": { - "type": "string" - }, - "pressureLevel": { - "$ref": "#/definitions/ThreadEpiphanyPressureLevel" - }, - "reasons": { - "items": { - "$ref": "#/definitions/ThreadEpiphanyReorientReason" - }, - "type": "array" - }, - "retrievalStatus": { - "$ref": "#/definitions/ThreadEpiphanyRetrievalFreshnessStatus" - }, - "watcherStatus": { - "$ref": "#/definitions/ThreadEpiphanyInvalidationStatus" - } - }, - "required": [ - "action", - "checkpointStatus", - "graphStatus", - "nextAction", - "note", - "pressureLevel", - "retrievalStatus", - "watcherStatus" - ], - "type": "object" - }, - "ThreadEpiphanyReorientFinding": { - "properties": { - "artifactRefs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "checkpointStillValid": { - "type": [ - "boolean", - "null" - ] - }, - "evidenceIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "filesInspected": { - "items": { - "type": "string" - }, - "type": "array" - }, - "frontierNodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "itemError": { - "type": [ - "string", - "null" - ] - }, - "jobError": { - "type": [ - "string", - "null" - ] - }, - "mode": { - "type": [ - "string", - "null" - ] - }, - "nextSafeMove": { - "type": [ - "string", - "null" - ] - }, - "runtimeJobId": { - "type": [ - "string", - "null" - ] - }, - "runtimeResultId": { - "type": [ - "string", - "null" - ] - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "ThreadEpiphanyReorientReason": { - "enum": [ - "missingState", - "missingCheckpoint", - "checkpointRequestedRegather", - "checkpointPathsDirty", - "checkpointPathsChanged", - "frontierChanged", - "unanchoredCheckpointWhileStateStale", - "checkpointReady" - ], - "type": "string" - }, - "ThreadEpiphanyReorientResultStatus": { - "enum": [ - "missingState", - "missingBinding", - "backendUnavailable", - "backendMissing", - "pending", - "running", - "completed", - "failed", - "cancelled" - ], - "type": "string" - }, - "ThreadEpiphanyReorientSource": { - "enum": [ - "stored", - "live" - ], - "type": "string" - }, - "ThreadEpiphanyReorientStateStatus": { - "enum": [ - "missing", - "ready" - ], - "type": "string" - }, - "ThreadEpiphanyRetrievalFreshness": { - "properties": { - "dirtyPaths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "indexedChunkCount": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexedFileCount": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "lastIndexedAtUnixSeconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "note": { - "type": "string" - }, - "semanticAvailable": { - "type": [ - "boolean", - "null" - ] - }, - "status": { - "$ref": "#/definitions/ThreadEpiphanyRetrievalFreshnessStatus" - } - }, - "required": [ - "note", - "status" - ], - "type": "object" - }, - "ThreadEpiphanyRetrievalFreshnessStatus": { - "enum": [ - "missing", - "ready", - "stale", - "indexing", - "unavailable" - ], - "type": "string" - }, - "ThreadEpiphanyRoleFinding": { - "properties": { - "artifactRefs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "checkpointSummary": { - "type": [ - "string", - "null" - ] - }, - "evidenceGaps": { - "items": { - "type": "string" - }, - "type": "array" - }, - "evidenceIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "filesInspected": { - "items": { - "type": "string" - }, - "type": "array" - }, - "frontierNodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "itemError": { - "type": [ - "string", - "null" - ] - }, - "jobError": { - "type": [ - "string", - "null" - ] - }, - "nextSafeMove": { - "type": [ - "string", - "null" - ] - }, - "openQuestions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "risks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "roleId": { - "$ref": "#/definitions/ThreadEpiphanyRoleId" - }, - "runtimeJobId": { - "type": [ - "string", - "null" - ] - }, - "runtimeResultId": { - "type": [ - "string", - "null" - ] - }, - "scratchSummary": { - "type": [ - "string", - "null" - ] - }, - "selfPatch": true, - "selfPersistence": { - "anyOf": [ - { - "$ref": "#/definitions/ThreadEpiphanyRoleSelfPersistenceReview" - }, - { - "type": "null" - } - ] - }, - "statePatch": { - "anyOf": [ - { - "$ref": "#/definitions/ThreadEpiphanyUpdatePatch" - }, - { - "type": "null" - } - ] - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "verdict": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "roleId" - ], - "type": "object" - }, - "ThreadEpiphanyRoleId": { - "enum": [ - "implementation", - "imagination", - "research", - "modeling", - "verification", - "reorientation" - ], - "type": "string" - }, - "ThreadEpiphanyRoleLane": { - "properties": { - "authorityScopes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "$ref": "#/definitions/ThreadEpiphanyRoleId" - }, - "jobs": { - "items": { - "$ref": "#/definitions/ThreadEpiphanyJob" - }, - "type": "array" - }, - "note": { - "type": "string" - }, - "ownerRole": { - "type": "string" - }, - "recommendedAction": { - "anyOf": [ - { - "$ref": "#/definitions/ThreadEpiphanySceneAction" - }, - { - "type": "null" - } - ] - }, - "status": { - "$ref": "#/definitions/ThreadEpiphanyRoleStatus" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "note", - "ownerRole", - "status", - "title" - ], - "type": "object" - }, - "ThreadEpiphanyRoleResultStatus": { - "enum": [ - "missingState", - "missingBinding", - "backendUnavailable", - "backendMissing", - "pending", - "running", - "completed", - "failed", - "cancelled" - ], - "type": "string" - }, - "ThreadEpiphanyRoleSelfPersistenceReview": { - "properties": { - "reasons": { - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "$ref": "#/definitions/ThreadEpiphanyRoleSelfPersistenceStatus" - }, - "targetAgentId": { - "type": [ - "string", - "null" - ] - }, - "targetPath": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "status" - ], - "type": "object" - }, - "ThreadEpiphanyRoleSelfPersistenceStatus": { - "enum": [ - "missing", - "accepted", - "rejected" - ], - "type": "string" - }, - "ThreadEpiphanyRoleStatus": { - "enum": [ - "ready", - "needed", - "blocked", - "running", - "completed", - "waiting", - "review", - "unavailable" - ], - "type": "string" - }, - "ThreadEpiphanyRolesSource": { - "enum": [ - "stored", - "live" - ], - "type": "string" - }, - "ThreadEpiphanyScene": { - "properties": { - "activeSubgoal": { - "anyOf": [ - { - "$ref": "#/definitions/ThreadEpiphanySceneSubgoal" - }, - { - "type": "null" - } - ] - }, - "availableActions": { - "items": { - "$ref": "#/definitions/ThreadEpiphanySceneAction" - }, - "type": "array" - }, - "churn": { - "anyOf": [ - { - "$ref": "#/definitions/ThreadEpiphanySceneChurn" - }, - { - "type": "null" - } - ] - }, - "evidence": { - "$ref": "#/definitions/ThreadEpiphanySceneRecords" - }, - "graph": { - "$ref": "#/definitions/ThreadEpiphanySceneGraph" - }, - "invariantStatusCounts": { - "items": { - "$ref": "#/definitions/ThreadEpiphanySceneStatusCount" - }, - "type": "array" - }, - "investigationCheckpoint": { - "anyOf": [ - { - "$ref": "#/definitions/ThreadEpiphanySceneInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "objective": { - "type": [ - "string", - "null" - ] - }, - "observations": { - "$ref": "#/definitions/ThreadEpiphanySceneRecords" - }, - "retrieval": { - "anyOf": [ - { - "$ref": "#/definitions/ThreadEpiphanySceneRetrieval" - }, - { - "type": "null" - } - ] - }, - "revision": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "source": { - "$ref": "#/definitions/ThreadEpiphanySceneSource" - }, - "stateStatus": { - "$ref": "#/definitions/ThreadEpiphanySceneStateStatus" - }, - "subgoals": { - "items": { - "$ref": "#/definitions/ThreadEpiphanySceneSubgoal" - }, - "type": "array" - } - }, - "required": [ - "evidence", - "graph", - "observations", - "source", - "stateStatus" - ], - "type": "object" - }, - "ThreadEpiphanySceneAction": { - "enum": [ - "index", - "retrieve", - "distill", - "context", - "planning", - "graphQuery", - "jobs", - "roles", - "coordinator", - "roleLaunch", - "roleResult", - "roleAccept", - "jobLaunch", - "jobInterrupt", - "freshness", - "pressure", - "reorient", - "crrc", - "reorientLaunch", - "reorientResult", - "reorientAccept", - "propose", - "promote", - "update" - ], - "type": "string" - }, - "ThreadEpiphanySceneChurn": { - "properties": { - "diffPressure": { - "type": "string" - }, - "graphFreshness": { - "type": [ - "string", - "null" - ] - }, - "understandingStatus": { - "type": "string" - }, - "unexplainedWrites": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "warning": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "diffPressure", - "understandingStatus" - ], - "type": "object" - }, - "ThreadEpiphanySceneGraph": { - "properties": { - "activeEdgeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "activeNodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "architectureEdgeCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "architectureNodeCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "checkpointId": { - "type": [ - "string", - "null" - ] - }, - "checkpointSummary": { - "type": [ - "string", - "null" - ] - }, - "dataflowEdgeCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "dataflowNodeCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "dirtyPaths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linkCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "openGapCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "openQuestionCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - } - }, - "required": [ - "architectureEdgeCount", - "architectureNodeCount", - "dataflowEdgeCount", - "dataflowNodeCount", - "linkCount", - "openGapCount", - "openQuestionCount" - ], - "type": "object" - }, - "ThreadEpiphanySceneInvestigationCheckpoint": { - "properties": { - "capturedAtTurnId": { - "type": [ - "string", - "null" - ] - }, - "checkpointId": { - "type": "string" - }, - "codeRefCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "disposition": { - "$ref": "#/definitions/EpiphanyInvestigationDisposition" - }, - "evidenceCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "focus": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "nextAction": { - "type": [ - "string", - "null" - ] - }, - "openQuestionCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpointId", - "codeRefCount", - "disposition", - "evidenceCount", - "focus", - "kind", - "openQuestionCount" - ], - "type": "object" - }, - "ThreadEpiphanySceneRecord": { - "properties": { - "codeRefCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "codeRefCount", - "id", - "kind", - "status", - "summary" - ], - "type": "object" - }, - "ThreadEpiphanySceneRecords": { - "properties": { - "latest": { - "items": { - "$ref": "#/definitions/ThreadEpiphanySceneRecord" - }, - "type": "array" - }, - "totalCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - } - }, - "required": [ - "totalCount" - ], - "type": "object" - }, - "ThreadEpiphanySceneRetrieval": { - "properties": { - "dirtyPathCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "indexRevision": { - "type": [ - "string", - "null" - ] - }, - "indexedChunkCount": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexedFileCount": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "semanticAvailable": { - "type": "boolean" - }, - "shardCount": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "status": { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - }, - "workspaceRoot": { - "type": "string" - } - }, - "required": [ - "dirtyPathCount", - "semanticAvailable", - "shardCount", - "status", - "workspaceRoot" - ], - "type": "object" - }, - "ThreadEpiphanySceneSource": { - "enum": [ - "stored", - "live" - ], - "type": "string" - }, - "ThreadEpiphanySceneStateStatus": { - "enum": [ - "missing", - "ready" - ], - "type": "string" - }, - "ThreadEpiphanySceneStatusCount": { - "properties": { - "count": { - "format": "uint32", - "minimum": 0.0, - "type": "integer" - }, - "status": { - "type": "string" - } - }, - "required": [ - "count", - "status" - ], - "type": "object" - }, - "ThreadEpiphanySceneSubgoal": { - "properties": { - "active": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "active", - "id", - "status", - "title" - ], - "type": "object" - }, - "ThreadEpiphanyStateUpdatedField": { - "enum": [ - "objective", - "activeSubgoalId", - "subgoals", - "invariants", - "graphs", - "graphFrontier", - "graphCheckpoint", - "scratch", - "investigationCheckpoint", - "jobBindings", - "acceptanceReceipts", - "runtimeLinks", - "observations", - "evidence", - "churn", - "mode", - "planning" - ], - "type": "string" - }, - "ThreadEpiphanyStateUpdatedNotification": { - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "changedFields": { - "items": { - "$ref": "#/definitions/ThreadEpiphanyStateUpdatedField" - }, - "type": "array" - }, - "epiphanyState": { - "$ref": "#/definitions/EpiphanyThreadState" - }, - "revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "source": { - "$ref": "#/definitions/ThreadEpiphanyStateUpdatedSource" - }, - "threadId": { - "type": "string" - } - }, - "required": [ - "changedFields", - "epiphanyState", - "revision", - "source", - "threadId" - ], - "title": "ThreadEpiphanyStateUpdatedNotification", - "type": "object" - }, - "ThreadEpiphanyStateUpdatedSource": { - "enum": [ - "update", - "promote", - "jobLaunch", - "jobInterrupt", - "reorientAccept", - "roleAccept" - ], - "type": "string" - }, - "ThreadEpiphanyUpdatePatch": { - "properties": { - "acceptanceReceipts": { - "items": { - "$ref": "#/definitions/EpiphanyAcceptanceReceipt" - }, - "type": "array" - }, - "activeSubgoalId": { - "type": [ - "string", - "null" - ] - }, - "churn": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyChurnState" - }, - { - "type": "null" - } - ] - }, - "evidence": { - "items": { - "$ref": "#/definitions/EpiphanyEvidenceRecord" - }, - "type": "array" - }, - "graphCheckpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphCheckpoint" - }, - { - "type": "null" - } - ] - }, - "graphFrontier": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphFrontier" - }, - { - "type": "null" - } - ] - }, - "graphs": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphs" - }, - { - "type": "null" - } - ] - }, - "invariants": { - "items": { - "$ref": "#/definitions/EpiphanyInvariant" - }, - "type": [ - "array", - "null" - ] - }, - "investigationCheckpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "jobBindings": { - "items": { - "$ref": "#/definitions/EpiphanyJobBinding" - }, - "type": [ - "array", - "null" - ] - }, - "mode": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeState" - }, - { - "type": "null" - } - ] - }, - "objective": { - "type": [ - "string", - "null" - ] - }, - "observations": { - "items": { - "$ref": "#/definitions/EpiphanyObservation" - }, - "type": "array" - }, - "planning": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyPlanningState" - }, - { - "type": "null" - } - ] - }, - "runtimeLinks": { - "items": { - "$ref": "#/definitions/EpiphanyRuntimeLink" - }, - "type": "array" - }, - "scratch": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyScratchPad" - }, - { - "type": "null" - } - ] - }, - "subgoals": { - "items": { - "$ref": "#/definitions/EpiphanySubgoal" - }, - "type": [ - "array", - "null" - ] - } - }, - "type": "object" - }, - "ThreadEpiphanyViewCoordinator": { - "properties": { - "action": { - "$ref": "#/definitions/ThreadEpiphanyCoordinatorAction" - }, - "canAutoRun": { - "type": "boolean" - }, - "note": { - "type": "string" - }, - "reason": { - "type": "string" - }, - "recommendedSceneAction": { - "anyOf": [ - { - "$ref": "#/definitions/ThreadEpiphanySceneAction" - }, - { - "type": "null" - } - ] - }, - "requiresReview": { - "type": "boolean" - }, - "roles": { - "items": { - "$ref": "#/definitions/ThreadEpiphanyRoleLane" - }, - "type": "array" - }, - "source": { - "$ref": "#/definitions/ThreadEpiphanyRolesSource" - }, - "sourceSignals": { - "$ref": "#/definitions/ThreadEpiphanyCoordinatorSignals" - }, - "stateRevision": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "stateStatus": { - "$ref": "#/definitions/ThreadEpiphanyReorientStateStatus" - }, - "targetRole": { - "anyOf": [ - { - "$ref": "#/definitions/ThreadEpiphanyRoleId" - }, - { - "type": "null" - } - ] - }, - "threadId": { - "type": "string" - } - }, - "required": [ - "action", - "canAutoRun", - "note", - "reason", - "requiresReview", - "roles", - "source", - "sourceSignals", - "stateStatus", - "threadId" - ], - "type": "object" - }, - "ThreadEpiphanyViewCrrc": { - "properties": { - "availableActions": { - "items": { - "$ref": "#/definitions/ThreadEpiphanySceneAction" - }, - "type": "array" - }, - "decision": { - "$ref": "#/definitions/ThreadEpiphanyReorientDecision" - }, - "note": { - "type": "string" - }, - "pressure": { - "$ref": "#/definitions/ThreadEpiphanyPressure" - }, - "recommendation": { - "$ref": "#/definitions/ThreadEpiphanyCrrcRecommendation" - }, - "reorientBindingId": { - "type": "string" - }, - "reorientFinding": { - "anyOf": [ - { - "$ref": "#/definitions/ThreadEpiphanyReorientFinding" - }, - { - "type": "null" - } - ] - }, - "reorientJob": { - "anyOf": [ - { - "$ref": "#/definitions/ThreadEpiphanyJob" - }, - { - "type": "null" - } - ] - }, - "reorientResultStatus": { - "$ref": "#/definitions/ThreadEpiphanyReorientResultStatus" - }, - "source": { - "$ref": "#/definitions/ThreadEpiphanyReorientSource" - }, - "stateRevision": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "stateStatus": { - "$ref": "#/definitions/ThreadEpiphanyReorientStateStatus" - }, - "threadId": { - "type": "string" - } - }, - "required": [ - "decision", - "note", - "pressure", - "recommendation", - "reorientBindingId", - "reorientResultStatus", - "source", - "stateStatus", - "threadId" - ], - "type": "object" - }, - "ThreadEpiphanyViewLens": { - "enum": [ - "scene", - "jobs", - "roles", - "planning", - "pressure", - "reorient", - "crrc", - "coordinator" - ], - "type": "string" - }, - "ThreadEpiphanyViewPlanning": { - "properties": { - "planning": { - "$ref": "#/definitions/EpiphanyPlanningState" - }, - "source": { - "$ref": "#/definitions/ThreadEpiphanyContextSource" - }, - "stateRevision": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "stateStatus": { - "$ref": "#/definitions/ThreadEpiphanyContextStateStatus" - }, - "summary": { - "$ref": "#/definitions/ThreadEpiphanyPlanningSummary" - }, - "threadId": { - "type": "string" - } - }, - "required": [ - "planning", - "source", - "stateStatus", - "summary", - "threadId" - ], - "type": "object" - }, - "ThreadEpiphanyViewReorient": { - "properties": { - "decision": { - "$ref": "#/definitions/ThreadEpiphanyReorientDecision" - }, - "source": { - "$ref": "#/definitions/ThreadEpiphanyReorientSource" - }, - "stateRevision": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "stateStatus": { - "$ref": "#/definitions/ThreadEpiphanyReorientStateStatus" - }, - "threadId": { - "type": "string" - } - }, - "required": [ - "decision", - "source", - "stateStatus", - "threadId" - ], - "type": "object" - }, - "ThreadEpiphanyViewRoles": { - "properties": { - "note": { - "type": "string" - }, - "roles": { - "items": { - "$ref": "#/definitions/ThreadEpiphanyRoleLane" - }, - "type": "array" - }, - "source": { - "$ref": "#/definitions/ThreadEpiphanyRolesSource" - }, - "stateRevision": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "stateStatus": { - "$ref": "#/definitions/ThreadEpiphanyReorientStateStatus" - }, - "threadId": { - "type": "string" - } - }, - "required": [ - "note", - "roles", - "source", - "stateStatus", - "threadId" - ], - "type": "object" - }, "ThreadForkParams": { "$schema": "http://json-schema.org/draft-07/schema#", "description": "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.", diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadEpiphanyJobsUpdatedNotification.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadEpiphanyJobsUpdatedNotification.json deleted file mode 100644 index 90049743..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadEpiphanyJobsUpdatedNotification.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "ThreadEpiphanyJob": { - "properties": { - "activeThreadIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "authorityScope": { - "type": [ - "string", - "null" - ] - }, - "backendJobId": { - "type": [ - "string", - "null" - ] - }, - "blockingReason": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "itemsProcessed": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "itemsTotal": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "kind": { - "$ref": "#/definitions/ThreadEpiphanyJobKind" - }, - "lastCheckpointAtUnixSeconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "launcherJobId": { - "type": [ - "string", - "null" - ] - }, - "linkedGraphNodeIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linkedSubgoalIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "ownerRole": { - "type": "string" - }, - "progressNote": { - "type": [ - "string", - "null" - ] - }, - "scope": { - "type": "string" - }, - "status": { - "$ref": "#/definitions/ThreadEpiphanyJobStatus" - } - }, - "required": [ - "id", - "kind", - "ownerRole", - "scope", - "status" - ], - "type": "object" - }, - "ThreadEpiphanyJobKind": { - "enum": [ - "indexing", - "remap", - "verification", - "specialist" - ], - "type": "string" - }, - "ThreadEpiphanyJobStatus": { - "enum": [ - "idle", - "needed", - "pending", - "running", - "completed", - "failed", - "cancelled", - "blocked", - "unavailable" - ], - "type": "string" - }, - "ThreadEpiphanyJobsUpdatedSource": { - "enum": [ - "runtimeProgress" - ], - "type": "string" - } - }, - "properties": { - "jobs": { - "items": { - "$ref": "#/definitions/ThreadEpiphanyJob" - }, - "type": "array" - }, - "source": { - "$ref": "#/definitions/ThreadEpiphanyJobsUpdatedSource" - }, - "stateRevision": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "threadId": { - "type": "string" - } - }, - "required": [ - "source", - "threadId" - ], - "title": "ThreadEpiphanyJobsUpdatedNotification", - "type": "object" -} \ No newline at end of file diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadEpiphanyStateUpdatedNotification.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadEpiphanyStateUpdatedNotification.json deleted file mode 100644 index 548fca40..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadEpiphanyStateUpdatedNotification.json +++ /dev/null @@ -1,1565 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "EpiphanyAcceptanceReceipt": { - "properties": { - "accepted_at": { - "type": "string" - }, - "accepted_evidence_id": { - "type": [ - "string", - "null" - ] - }, - "accepted_observation_id": { - "type": [ - "string", - "null" - ] - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "job_id": { - "type": "string" - }, - "result_id": { - "type": "string" - }, - "role_id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "accepted_at", - "binding_id", - "id", - "job_id", - "result_id", - "role_id", - "status", - "surface" - ], - "type": "object" - }, - "EpiphanyBacklogItem": { - "properties": { - "acceptance_sketch": { - "items": { - "type": "string" - }, - "type": "array" - }, - "blockers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": "string" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "duplicate_of": { - "type": [ - "string", - "null" - ] - }, - "evidence_refs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "horizon": { - "type": "string" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "lane_hints": { - "items": { - "type": "string" - }, - "type": "array" - }, - "priority": { - "$ref": "#/definitions/EpiphanyPlanningPriority" - }, - "product_area": { - "type": "string" - }, - "source_refs": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "horizon", - "id", - "kind", - "priority", - "product_area", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyChurnState": { - "properties": { - "diff_pressure": { - "type": "string" - }, - "graph_freshness": { - "type": [ - "string", - "null" - ] - }, - "understanding_status": { - "type": "string" - }, - "unexplained_writes": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "warning": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "diff_pressure", - "understanding_status" - ], - "type": "object" - }, - "EpiphanyCodeRef": { - "properties": { - "end_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "path": { - "type": "string" - }, - "start_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "symbol": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "path" - ], - "type": "object" - }, - "EpiphanyEvidenceRecord": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyGraph": { - "properties": { - "edges": { - "items": { - "$ref": "#/definitions/EpiphanyGraphEdge" - }, - "type": "array" - }, - "nodes": { - "items": { - "$ref": "#/definitions/EpiphanyGraphNode" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphCheckpoint": { - "properties": { - "checkpoint_id": { - "type": "string" - }, - "frontier_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graph_revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "graph_revision" - ], - "type": "object" - }, - "EpiphanyGraphEdge": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": [ - "string", - "null" - ] - }, - "kind": { - "type": "string" - }, - "label": { - "type": [ - "string", - "null" - ] - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "source_id": { - "type": "string" - }, - "target_id": { - "type": "string" - } - }, - "required": [ - "kind", - "source_id", - "target_id" - ], - "type": "object" - }, - "EpiphanyGraphFrontier": { - "properties": { - "active_edge_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "active_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphLink": { - "properties": { - "architecture_node_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "dataflow_node_id": { - "type": "string" - }, - "relationship": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "architecture_node_id", - "dataflow_node_id" - ], - "type": "object" - }, - "EpiphanyGraphNode": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "metaphor": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "status": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "title" - ], - "type": "object" - }, - "EpiphanyGraphs": { - "properties": { - "architecture": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "dataflow": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "links": { - "items": { - "$ref": "#/definitions/EpiphanyGraphLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyInvariant": { - "properties": { - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "rationale": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - } - }, - "required": [ - "description", - "id", - "status" - ], - "type": "object" - }, - "EpiphanyInvestigationCheckpoint": { - "properties": { - "captured_at_turn_id": { - "type": [ - "string", - "null" - ] - }, - "checkpoint_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "disposition": { - "$ref": "#/definitions/EpiphanyInvestigationDisposition" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "focus": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "next_action": { - "type": [ - "string", - "null" - ] - }, - "open_questions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "disposition", - "focus", - "kind" - ], - "type": "object" - }, - "EpiphanyInvestigationDisposition": { - "enum": [ - "resume_ready", - "regather_required" - ], - "type": "string" - }, - "EpiphanyJobBinding": { - "properties": { - "authority_scope": { - "type": [ - "string", - "null" - ] - }, - "blocking_reason": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "kind": { - "$ref": "#/definitions/EpiphanyJobKind" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "owner_role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "owner_role", - "scope" - ], - "type": "object" - }, - "EpiphanyJobKind": { - "enum": [ - "indexing", - "remap", - "verification", - "specialist" - ], - "type": "string" - }, - "EpiphanyModeKind": { - "enum": [ - "plan", - "default" - ], - "type": "string" - }, - "EpiphanyModeState": { - "properties": { - "kind": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeKind" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "EpiphanyObjectiveDraft": { - "properties": { - "acceptance_criteria": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "evidence_required": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "lane_plan": { - "$ref": "#/definitions/EpiphanyObjectiveDraftLanePlan" - }, - "review_gates": { - "items": { - "type": "string" - }, - "type": "array" - }, - "risks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "scope": { - "$ref": "#/definitions/EpiphanyObjectiveDraftScope" - }, - "source_item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "lane_plan", - "scope", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyObjectiveDraftLanePlan": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "eyes": { - "type": [ - "string", - "null" - ] - }, - "hands": { - "type": [ - "string", - "null" - ] - }, - "imagination": { - "type": [ - "string", - "null" - ] - }, - "life": { - "type": [ - "string", - "null" - ] - }, - "soul": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyObjectiveDraftScope": { - "properties": { - "excludes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "includes": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyObservation": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "source_kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "source_kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyPlanningCapture": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "confidence": { - "type": "string" - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "source": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "speaker": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "id", - "source", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyPlanningPriority": { - "properties": { - "blocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": [ - "string", - "null" - ] - }, - "effort": { - "type": [ - "string", - "null" - ] - }, - "impact": { - "type": [ - "string", - "null" - ] - }, - "rationale": { - "type": "string" - }, - "reason": { - "type": [ - "string", - "null" - ] - }, - "unblocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "urgency": { - "type": [ - "string", - "null" - ] - }, - "value": { - "type": "string" - } - }, - "required": [ - "rationale", - "value" - ], - "type": "object" - }, - "EpiphanyPlanningSourceRef": { - "properties": { - "assignees": { - "items": { - "type": "string" - }, - "type": "array" - }, - "author": { - "type": [ - "string", - "null" - ] - }, - "closed_at": { - "type": [ - "string", - "null" - ] - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "database_id": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "external_id": { - "type": [ - "string", - "null" - ] - }, - "imported_at": { - "type": [ - "string", - "null" - ] - }, - "is_pull_request": { - "type": [ - "boolean", - "null" - ] - }, - "issue_number": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "kind": { - "type": "string" - }, - "labels": { - "items": { - "type": "string" - }, - "type": "array" - }, - "milestone": { - "type": [ - "string", - "null" - ] - }, - "node_id": { - "type": [ - "string", - "null" - ] - }, - "provider": { - "type": [ - "string", - "null" - ] - }, - "repo": { - "type": [ - "string", - "null" - ] - }, - "state": { - "type": [ - "string", - "null" - ] - }, - "updated_at": { - "type": [ - "string", - "null" - ] - }, - "uri": { - "type": [ - "string", - "null" - ] - }, - "url": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "kind" - ], - "type": "object" - }, - "EpiphanyPlanningState": { - "properties": { - "backlog_items": { - "items": { - "$ref": "#/definitions/EpiphanyBacklogItem" - }, - "type": "array" - }, - "captures": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningCapture" - }, - "type": "array" - }, - "objective_drafts": { - "items": { - "$ref": "#/definitions/EpiphanyObjectiveDraft" - }, - "type": "array" - }, - "roadmap_streams": { - "items": { - "$ref": "#/definitions/EpiphanyRoadmapStream" - }, - "type": "array" - }, - "workspace_root": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyRetrievalShardSummary": { - "properties": { - "exact_available": { - "type": "boolean" - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "path_prefix": { - "type": "string" - }, - "semantic_available": { - "type": "boolean" - }, - "shard_id": { - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - } - }, - "required": [ - "path_prefix", - "shard_id" - ], - "type": "object" - }, - "EpiphanyRetrievalState": { - "properties": { - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "index_revision": { - "type": [ - "string", - "null" - ] - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "last_indexed_at_unix_seconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "semantic_available": { - "type": "boolean" - }, - "shards": { - "items": { - "$ref": "#/definitions/EpiphanyRetrievalShardSummary" - }, - "type": "array" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - }, - "workspace_root": { - "type": "string" - } - }, - "required": [ - "workspace_root" - ], - "type": "object" - }, - "EpiphanyRetrievalStatus": { - "enum": [ - "unavailable", - "ready", - "stale", - "indexing" - ], - "type": "string" - }, - "EpiphanyRoadmapStream": { - "properties": { - "blocked_by": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "near_term_focus": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "review_cadence": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyRuntimeLink": { - "properties": { - "authority_scope": { - "type": "string" - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "role_id": { - "type": "string" - }, - "runtime_job_id": { - "type": "string" - }, - "runtime_result_id": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "authority_scope", - "binding_id", - "id", - "role_id", - "runtime_job_id", - "surface" - ], - "type": "object" - }, - "EpiphanyScratchPad": { - "properties": { - "hypothesis": { - "type": [ - "string", - "null" - ] - }, - "next_probe": { - "type": [ - "string", - "null" - ] - }, - "notes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanySubgoal": { - "properties": { - "id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyThreadState": { - "properties": { - "acceptance_receipts": { - "items": { - "$ref": "#/definitions/EpiphanyAcceptanceReceipt" - }, - "type": "array" - }, - "active_subgoal_id": { - "type": [ - "string", - "null" - ] - }, - "churn": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyChurnState" - }, - { - "type": "null" - } - ] - }, - "graph_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphCheckpoint" - }, - { - "type": "null" - } - ] - }, - "graph_frontier": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphFrontier" - }, - { - "type": "null" - } - ] - }, - "graphs": { - "$ref": "#/definitions/EpiphanyGraphs" - }, - "invariants": { - "items": { - "$ref": "#/definitions/EpiphanyInvariant" - }, - "type": "array" - }, - "investigation_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "job_bindings": { - "items": { - "$ref": "#/definitions/EpiphanyJobBinding" - }, - "type": "array" - }, - "last_updated_turn_id": { - "type": [ - "string", - "null" - ] - }, - "mode": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeState" - }, - { - "type": "null" - } - ] - }, - "objective": { - "type": [ - "string", - "null" - ] - }, - "observations": { - "items": { - "$ref": "#/definitions/EpiphanyObservation" - }, - "type": "array" - }, - "planning": { - "$ref": "#/definitions/EpiphanyPlanningState" - }, - "recent_evidence": { - "items": { - "$ref": "#/definitions/EpiphanyEvidenceRecord" - }, - "type": "array" - }, - "retrieval": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalState" - }, - { - "type": "null" - } - ] - }, - "revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "runtime_links": { - "items": { - "$ref": "#/definitions/EpiphanyRuntimeLink" - }, - "type": "array" - }, - "scratch": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyScratchPad" - }, - { - "type": "null" - } - ] - }, - "subgoals": { - "items": { - "$ref": "#/definitions/EpiphanySubgoal" - }, - "type": "array" - } - }, - "required": [ - "revision" - ], - "type": "object" - }, - "ThreadEpiphanyStateUpdatedField": { - "enum": [ - "objective", - "activeSubgoalId", - "subgoals", - "invariants", - "graphs", - "graphFrontier", - "graphCheckpoint", - "scratch", - "investigationCheckpoint", - "jobBindings", - "acceptanceReceipts", - "runtimeLinks", - "observations", - "evidence", - "churn", - "mode", - "planning" - ], - "type": "string" - }, - "ThreadEpiphanyStateUpdatedSource": { - "enum": [ - "update", - "promote", - "jobLaunch", - "jobInterrupt", - "reorientAccept", - "roleAccept" - ], - "type": "string" - } - }, - "properties": { - "changedFields": { - "items": { - "$ref": "#/definitions/ThreadEpiphanyStateUpdatedField" - }, - "type": "array" - }, - "epiphanyState": { - "$ref": "#/definitions/EpiphanyThreadState" - }, - "revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "source": { - "$ref": "#/definitions/ThreadEpiphanyStateUpdatedSource" - }, - "threadId": { - "type": "string" - } - }, - "required": [ - "changedFields", - "epiphanyState", - "revision", - "source", - "threadId" - ], - "title": "ThreadEpiphanyStateUpdatedNotification", - "type": "object" -} \ No newline at end of file diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json index 8cb0c5f2..91f768bb 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json +++ b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json @@ -445,1502 +445,6 @@ ], "type": "string" }, - "EpiphanyAcceptanceReceipt": { - "properties": { - "accepted_at": { - "type": "string" - }, - "accepted_evidence_id": { - "type": [ - "string", - "null" - ] - }, - "accepted_observation_id": { - "type": [ - "string", - "null" - ] - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "job_id": { - "type": "string" - }, - "result_id": { - "type": "string" - }, - "role_id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "accepted_at", - "binding_id", - "id", - "job_id", - "result_id", - "role_id", - "status", - "surface" - ], - "type": "object" - }, - "EpiphanyBacklogItem": { - "properties": { - "acceptance_sketch": { - "items": { - "type": "string" - }, - "type": "array" - }, - "blockers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": "string" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "duplicate_of": { - "type": [ - "string", - "null" - ] - }, - "evidence_refs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "horizon": { - "type": "string" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "lane_hints": { - "items": { - "type": "string" - }, - "type": "array" - }, - "priority": { - "$ref": "#/definitions/EpiphanyPlanningPriority" - }, - "product_area": { - "type": "string" - }, - "source_refs": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "horizon", - "id", - "kind", - "priority", - "product_area", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyChurnState": { - "properties": { - "diff_pressure": { - "type": "string" - }, - "graph_freshness": { - "type": [ - "string", - "null" - ] - }, - "understanding_status": { - "type": "string" - }, - "unexplained_writes": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "warning": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "diff_pressure", - "understanding_status" - ], - "type": "object" - }, - "EpiphanyCodeRef": { - "properties": { - "end_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "path": { - "type": "string" - }, - "start_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "symbol": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "path" - ], - "type": "object" - }, - "EpiphanyEvidenceRecord": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyGraph": { - "properties": { - "edges": { - "items": { - "$ref": "#/definitions/EpiphanyGraphEdge" - }, - "type": "array" - }, - "nodes": { - "items": { - "$ref": "#/definitions/EpiphanyGraphNode" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphCheckpoint": { - "properties": { - "checkpoint_id": { - "type": "string" - }, - "frontier_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graph_revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "graph_revision" - ], - "type": "object" - }, - "EpiphanyGraphEdge": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": [ - "string", - "null" - ] - }, - "kind": { - "type": "string" - }, - "label": { - "type": [ - "string", - "null" - ] - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "source_id": { - "type": "string" - }, - "target_id": { - "type": "string" - } - }, - "required": [ - "kind", - "source_id", - "target_id" - ], - "type": "object" - }, - "EpiphanyGraphFrontier": { - "properties": { - "active_edge_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "active_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphLink": { - "properties": { - "architecture_node_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "dataflow_node_id": { - "type": "string" - }, - "relationship": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "architecture_node_id", - "dataflow_node_id" - ], - "type": "object" - }, - "EpiphanyGraphNode": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "metaphor": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "status": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "title" - ], - "type": "object" - }, - "EpiphanyGraphs": { - "properties": { - "architecture": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "dataflow": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "links": { - "items": { - "$ref": "#/definitions/EpiphanyGraphLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyInvariant": { - "properties": { - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "rationale": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - } - }, - "required": [ - "description", - "id", - "status" - ], - "type": "object" - }, - "EpiphanyInvestigationCheckpoint": { - "properties": { - "captured_at_turn_id": { - "type": [ - "string", - "null" - ] - }, - "checkpoint_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "disposition": { - "$ref": "#/definitions/EpiphanyInvestigationDisposition" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "focus": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "next_action": { - "type": [ - "string", - "null" - ] - }, - "open_questions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "disposition", - "focus", - "kind" - ], - "type": "object" - }, - "EpiphanyInvestigationDisposition": { - "enum": [ - "resume_ready", - "regather_required" - ], - "type": "string" - }, - "EpiphanyJobBinding": { - "properties": { - "authority_scope": { - "type": [ - "string", - "null" - ] - }, - "blocking_reason": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "kind": { - "$ref": "#/definitions/EpiphanyJobKind" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "owner_role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "owner_role", - "scope" - ], - "type": "object" - }, - "EpiphanyJobKind": { - "enum": [ - "indexing", - "remap", - "verification", - "specialist" - ], - "type": "string" - }, - "EpiphanyModeKind": { - "enum": [ - "plan", - "default" - ], - "type": "string" - }, - "EpiphanyModeState": { - "properties": { - "kind": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeKind" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "EpiphanyObjectiveDraft": { - "properties": { - "acceptance_criteria": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "evidence_required": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "lane_plan": { - "$ref": "#/definitions/EpiphanyObjectiveDraftLanePlan" - }, - "review_gates": { - "items": { - "type": "string" - }, - "type": "array" - }, - "risks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "scope": { - "$ref": "#/definitions/EpiphanyObjectiveDraftScope" - }, - "source_item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "lane_plan", - "scope", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyObjectiveDraftLanePlan": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "eyes": { - "type": [ - "string", - "null" - ] - }, - "hands": { - "type": [ - "string", - "null" - ] - }, - "imagination": { - "type": [ - "string", - "null" - ] - }, - "life": { - "type": [ - "string", - "null" - ] - }, - "soul": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyObjectiveDraftScope": { - "properties": { - "excludes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "includes": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyObservation": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "source_kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "source_kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyPlanningCapture": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "confidence": { - "type": "string" - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "source": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "speaker": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "id", - "source", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyPlanningPriority": { - "properties": { - "blocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": [ - "string", - "null" - ] - }, - "effort": { - "type": [ - "string", - "null" - ] - }, - "impact": { - "type": [ - "string", - "null" - ] - }, - "rationale": { - "type": "string" - }, - "reason": { - "type": [ - "string", - "null" - ] - }, - "unblocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "urgency": { - "type": [ - "string", - "null" - ] - }, - "value": { - "type": "string" - } - }, - "required": [ - "rationale", - "value" - ], - "type": "object" - }, - "EpiphanyPlanningSourceRef": { - "properties": { - "assignees": { - "items": { - "type": "string" - }, - "type": "array" - }, - "author": { - "type": [ - "string", - "null" - ] - }, - "closed_at": { - "type": [ - "string", - "null" - ] - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "database_id": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "external_id": { - "type": [ - "string", - "null" - ] - }, - "imported_at": { - "type": [ - "string", - "null" - ] - }, - "is_pull_request": { - "type": [ - "boolean", - "null" - ] - }, - "issue_number": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "kind": { - "type": "string" - }, - "labels": { - "items": { - "type": "string" - }, - "type": "array" - }, - "milestone": { - "type": [ - "string", - "null" - ] - }, - "node_id": { - "type": [ - "string", - "null" - ] - }, - "provider": { - "type": [ - "string", - "null" - ] - }, - "repo": { - "type": [ - "string", - "null" - ] - }, - "state": { - "type": [ - "string", - "null" - ] - }, - "updated_at": { - "type": [ - "string", - "null" - ] - }, - "uri": { - "type": [ - "string", - "null" - ] - }, - "url": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "kind" - ], - "type": "object" - }, - "EpiphanyPlanningState": { - "properties": { - "backlog_items": { - "items": { - "$ref": "#/definitions/EpiphanyBacklogItem" - }, - "type": "array" - }, - "captures": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningCapture" - }, - "type": "array" - }, - "objective_drafts": { - "items": { - "$ref": "#/definitions/EpiphanyObjectiveDraft" - }, - "type": "array" - }, - "roadmap_streams": { - "items": { - "$ref": "#/definitions/EpiphanyRoadmapStream" - }, - "type": "array" - }, - "workspace_root": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyRetrievalShardSummary": { - "properties": { - "exact_available": { - "type": "boolean" - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "path_prefix": { - "type": "string" - }, - "semantic_available": { - "type": "boolean" - }, - "shard_id": { - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - } - }, - "required": [ - "path_prefix", - "shard_id" - ], - "type": "object" - }, - "EpiphanyRetrievalState": { - "properties": { - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "index_revision": { - "type": [ - "string", - "null" - ] - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "last_indexed_at_unix_seconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "semantic_available": { - "type": "boolean" - }, - "shards": { - "items": { - "$ref": "#/definitions/EpiphanyRetrievalShardSummary" - }, - "type": "array" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - }, - "workspace_root": { - "type": "string" - } - }, - "required": [ - "workspace_root" - ], - "type": "object" - }, - "EpiphanyRetrievalStatus": { - "enum": [ - "unavailable", - "ready", - "stale", - "indexing" - ], - "type": "string" - }, - "EpiphanyRoadmapStream": { - "properties": { - "blocked_by": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "near_term_focus": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "review_cadence": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyRuntimeLink": { - "properties": { - "authority_scope": { - "type": "string" - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "role_id": { - "type": "string" - }, - "runtime_job_id": { - "type": "string" - }, - "runtime_result_id": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "authority_scope", - "binding_id", - "id", - "role_id", - "runtime_job_id", - "surface" - ], - "type": "object" - }, - "EpiphanyScratchPad": { - "properties": { - "hypothesis": { - "type": [ - "string", - "null" - ] - }, - "next_probe": { - "type": [ - "string", - "null" - ] - }, - "notes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanySubgoal": { - "properties": { - "id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyThreadState": { - "properties": { - "acceptance_receipts": { - "items": { - "$ref": "#/definitions/EpiphanyAcceptanceReceipt" - }, - "type": "array" - }, - "active_subgoal_id": { - "type": [ - "string", - "null" - ] - }, - "churn": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyChurnState" - }, - { - "type": "null" - } - ] - }, - "graph_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphCheckpoint" - }, - { - "type": "null" - } - ] - }, - "graph_frontier": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphFrontier" - }, - { - "type": "null" - } - ] - }, - "graphs": { - "$ref": "#/definitions/EpiphanyGraphs" - }, - "invariants": { - "items": { - "$ref": "#/definitions/EpiphanyInvariant" - }, - "type": "array" - }, - "investigation_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "job_bindings": { - "items": { - "$ref": "#/definitions/EpiphanyJobBinding" - }, - "type": "array" - }, - "last_updated_turn_id": { - "type": [ - "string", - "null" - ] - }, - "mode": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeState" - }, - { - "type": "null" - } - ] - }, - "objective": { - "type": [ - "string", - "null" - ] - }, - "observations": { - "items": { - "$ref": "#/definitions/EpiphanyObservation" - }, - "type": "array" - }, - "planning": { - "$ref": "#/definitions/EpiphanyPlanningState" - }, - "recent_evidence": { - "items": { - "$ref": "#/definitions/EpiphanyEvidenceRecord" - }, - "type": "array" - }, - "retrieval": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalState" - }, - { - "type": "null" - } - ] - }, - "revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "runtime_links": { - "items": { - "$ref": "#/definitions/EpiphanyRuntimeLink" - }, - "type": "array" - }, - "scratch": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyScratchPad" - }, - { - "type": "null" - } - ] - }, - "subgoals": { - "items": { - "$ref": "#/definitions/EpiphanySubgoal" - }, - "type": "array" - } - }, - "required": [ - "revision" - ], - "type": "object" - }, "FileSystemAccessMode": { "enum": [ "read", @@ -2809,17 +1313,6 @@ "description": "Whether the thread is ephemeral and should not be materialized on disk.", "type": "boolean" }, - "epiphanyState": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyThreadState" - }, - { - "type": "null" - } - ], - "description": "Only populated on `thread/start`, `thread/resume`, `thread/fork`, `thread/read`, and notifications/responses that reuse those hydrated thread payloads." - }, "forkedFromId": { "description": "Source thread id when this thread was created by forking another thread.", "type": [ diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadListResponse.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadListResponse.json index 2f3ae361..9f964302 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadListResponse.json +++ b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadListResponse.json @@ -390,1502 +390,6 @@ ], "type": "string" }, - "EpiphanyAcceptanceReceipt": { - "properties": { - "accepted_at": { - "type": "string" - }, - "accepted_evidence_id": { - "type": [ - "string", - "null" - ] - }, - "accepted_observation_id": { - "type": [ - "string", - "null" - ] - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "job_id": { - "type": "string" - }, - "result_id": { - "type": "string" - }, - "role_id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "accepted_at", - "binding_id", - "id", - "job_id", - "result_id", - "role_id", - "status", - "surface" - ], - "type": "object" - }, - "EpiphanyBacklogItem": { - "properties": { - "acceptance_sketch": { - "items": { - "type": "string" - }, - "type": "array" - }, - "blockers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": "string" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "duplicate_of": { - "type": [ - "string", - "null" - ] - }, - "evidence_refs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "horizon": { - "type": "string" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "lane_hints": { - "items": { - "type": "string" - }, - "type": "array" - }, - "priority": { - "$ref": "#/definitions/EpiphanyPlanningPriority" - }, - "product_area": { - "type": "string" - }, - "source_refs": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "horizon", - "id", - "kind", - "priority", - "product_area", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyChurnState": { - "properties": { - "diff_pressure": { - "type": "string" - }, - "graph_freshness": { - "type": [ - "string", - "null" - ] - }, - "understanding_status": { - "type": "string" - }, - "unexplained_writes": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "warning": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "diff_pressure", - "understanding_status" - ], - "type": "object" - }, - "EpiphanyCodeRef": { - "properties": { - "end_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "path": { - "type": "string" - }, - "start_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "symbol": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "path" - ], - "type": "object" - }, - "EpiphanyEvidenceRecord": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyGraph": { - "properties": { - "edges": { - "items": { - "$ref": "#/definitions/EpiphanyGraphEdge" - }, - "type": "array" - }, - "nodes": { - "items": { - "$ref": "#/definitions/EpiphanyGraphNode" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphCheckpoint": { - "properties": { - "checkpoint_id": { - "type": "string" - }, - "frontier_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graph_revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "graph_revision" - ], - "type": "object" - }, - "EpiphanyGraphEdge": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": [ - "string", - "null" - ] - }, - "kind": { - "type": "string" - }, - "label": { - "type": [ - "string", - "null" - ] - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "source_id": { - "type": "string" - }, - "target_id": { - "type": "string" - } - }, - "required": [ - "kind", - "source_id", - "target_id" - ], - "type": "object" - }, - "EpiphanyGraphFrontier": { - "properties": { - "active_edge_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "active_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphLink": { - "properties": { - "architecture_node_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "dataflow_node_id": { - "type": "string" - }, - "relationship": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "architecture_node_id", - "dataflow_node_id" - ], - "type": "object" - }, - "EpiphanyGraphNode": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "metaphor": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "status": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "title" - ], - "type": "object" - }, - "EpiphanyGraphs": { - "properties": { - "architecture": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "dataflow": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "links": { - "items": { - "$ref": "#/definitions/EpiphanyGraphLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyInvariant": { - "properties": { - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "rationale": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - } - }, - "required": [ - "description", - "id", - "status" - ], - "type": "object" - }, - "EpiphanyInvestigationCheckpoint": { - "properties": { - "captured_at_turn_id": { - "type": [ - "string", - "null" - ] - }, - "checkpoint_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "disposition": { - "$ref": "#/definitions/EpiphanyInvestigationDisposition" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "focus": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "next_action": { - "type": [ - "string", - "null" - ] - }, - "open_questions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "disposition", - "focus", - "kind" - ], - "type": "object" - }, - "EpiphanyInvestigationDisposition": { - "enum": [ - "resume_ready", - "regather_required" - ], - "type": "string" - }, - "EpiphanyJobBinding": { - "properties": { - "authority_scope": { - "type": [ - "string", - "null" - ] - }, - "blocking_reason": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "kind": { - "$ref": "#/definitions/EpiphanyJobKind" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "owner_role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "owner_role", - "scope" - ], - "type": "object" - }, - "EpiphanyJobKind": { - "enum": [ - "indexing", - "remap", - "verification", - "specialist" - ], - "type": "string" - }, - "EpiphanyModeKind": { - "enum": [ - "plan", - "default" - ], - "type": "string" - }, - "EpiphanyModeState": { - "properties": { - "kind": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeKind" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "EpiphanyObjectiveDraft": { - "properties": { - "acceptance_criteria": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "evidence_required": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "lane_plan": { - "$ref": "#/definitions/EpiphanyObjectiveDraftLanePlan" - }, - "review_gates": { - "items": { - "type": "string" - }, - "type": "array" - }, - "risks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "scope": { - "$ref": "#/definitions/EpiphanyObjectiveDraftScope" - }, - "source_item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "lane_plan", - "scope", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyObjectiveDraftLanePlan": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "eyes": { - "type": [ - "string", - "null" - ] - }, - "hands": { - "type": [ - "string", - "null" - ] - }, - "imagination": { - "type": [ - "string", - "null" - ] - }, - "life": { - "type": [ - "string", - "null" - ] - }, - "soul": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyObjectiveDraftScope": { - "properties": { - "excludes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "includes": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyObservation": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "source_kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "source_kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyPlanningCapture": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "confidence": { - "type": "string" - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "source": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "speaker": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "id", - "source", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyPlanningPriority": { - "properties": { - "blocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": [ - "string", - "null" - ] - }, - "effort": { - "type": [ - "string", - "null" - ] - }, - "impact": { - "type": [ - "string", - "null" - ] - }, - "rationale": { - "type": "string" - }, - "reason": { - "type": [ - "string", - "null" - ] - }, - "unblocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "urgency": { - "type": [ - "string", - "null" - ] - }, - "value": { - "type": "string" - } - }, - "required": [ - "rationale", - "value" - ], - "type": "object" - }, - "EpiphanyPlanningSourceRef": { - "properties": { - "assignees": { - "items": { - "type": "string" - }, - "type": "array" - }, - "author": { - "type": [ - "string", - "null" - ] - }, - "closed_at": { - "type": [ - "string", - "null" - ] - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "database_id": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "external_id": { - "type": [ - "string", - "null" - ] - }, - "imported_at": { - "type": [ - "string", - "null" - ] - }, - "is_pull_request": { - "type": [ - "boolean", - "null" - ] - }, - "issue_number": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "kind": { - "type": "string" - }, - "labels": { - "items": { - "type": "string" - }, - "type": "array" - }, - "milestone": { - "type": [ - "string", - "null" - ] - }, - "node_id": { - "type": [ - "string", - "null" - ] - }, - "provider": { - "type": [ - "string", - "null" - ] - }, - "repo": { - "type": [ - "string", - "null" - ] - }, - "state": { - "type": [ - "string", - "null" - ] - }, - "updated_at": { - "type": [ - "string", - "null" - ] - }, - "uri": { - "type": [ - "string", - "null" - ] - }, - "url": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "kind" - ], - "type": "object" - }, - "EpiphanyPlanningState": { - "properties": { - "backlog_items": { - "items": { - "$ref": "#/definitions/EpiphanyBacklogItem" - }, - "type": "array" - }, - "captures": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningCapture" - }, - "type": "array" - }, - "objective_drafts": { - "items": { - "$ref": "#/definitions/EpiphanyObjectiveDraft" - }, - "type": "array" - }, - "roadmap_streams": { - "items": { - "$ref": "#/definitions/EpiphanyRoadmapStream" - }, - "type": "array" - }, - "workspace_root": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyRetrievalShardSummary": { - "properties": { - "exact_available": { - "type": "boolean" - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "path_prefix": { - "type": "string" - }, - "semantic_available": { - "type": "boolean" - }, - "shard_id": { - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - } - }, - "required": [ - "path_prefix", - "shard_id" - ], - "type": "object" - }, - "EpiphanyRetrievalState": { - "properties": { - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "index_revision": { - "type": [ - "string", - "null" - ] - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "last_indexed_at_unix_seconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "semantic_available": { - "type": "boolean" - }, - "shards": { - "items": { - "$ref": "#/definitions/EpiphanyRetrievalShardSummary" - }, - "type": "array" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - }, - "workspace_root": { - "type": "string" - } - }, - "required": [ - "workspace_root" - ], - "type": "object" - }, - "EpiphanyRetrievalStatus": { - "enum": [ - "unavailable", - "ready", - "stale", - "indexing" - ], - "type": "string" - }, - "EpiphanyRoadmapStream": { - "properties": { - "blocked_by": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "near_term_focus": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "review_cadence": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyRuntimeLink": { - "properties": { - "authority_scope": { - "type": "string" - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "role_id": { - "type": "string" - }, - "runtime_job_id": { - "type": "string" - }, - "runtime_result_id": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "authority_scope", - "binding_id", - "id", - "role_id", - "runtime_job_id", - "surface" - ], - "type": "object" - }, - "EpiphanyScratchPad": { - "properties": { - "hypothesis": { - "type": [ - "string", - "null" - ] - }, - "next_probe": { - "type": [ - "string", - "null" - ] - }, - "notes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanySubgoal": { - "properties": { - "id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyThreadState": { - "properties": { - "acceptance_receipts": { - "items": { - "$ref": "#/definitions/EpiphanyAcceptanceReceipt" - }, - "type": "array" - }, - "active_subgoal_id": { - "type": [ - "string", - "null" - ] - }, - "churn": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyChurnState" - }, - { - "type": "null" - } - ] - }, - "graph_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphCheckpoint" - }, - { - "type": "null" - } - ] - }, - "graph_frontier": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphFrontier" - }, - { - "type": "null" - } - ] - }, - "graphs": { - "$ref": "#/definitions/EpiphanyGraphs" - }, - "invariants": { - "items": { - "$ref": "#/definitions/EpiphanyInvariant" - }, - "type": "array" - }, - "investigation_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "job_bindings": { - "items": { - "$ref": "#/definitions/EpiphanyJobBinding" - }, - "type": "array" - }, - "last_updated_turn_id": { - "type": [ - "string", - "null" - ] - }, - "mode": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeState" - }, - { - "type": "null" - } - ] - }, - "objective": { - "type": [ - "string", - "null" - ] - }, - "observations": { - "items": { - "$ref": "#/definitions/EpiphanyObservation" - }, - "type": "array" - }, - "planning": { - "$ref": "#/definitions/EpiphanyPlanningState" - }, - "recent_evidence": { - "items": { - "$ref": "#/definitions/EpiphanyEvidenceRecord" - }, - "type": "array" - }, - "retrieval": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalState" - }, - { - "type": "null" - } - ] - }, - "revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "runtime_links": { - "items": { - "$ref": "#/definitions/EpiphanyRuntimeLink" - }, - "type": "array" - }, - "scratch": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyScratchPad" - }, - { - "type": "null" - } - ] - }, - "subgoals": { - "items": { - "$ref": "#/definitions/EpiphanySubgoal" - }, - "type": "array" - } - }, - "required": [ - "revision" - ], - "type": "object" - }, "FileUpdateChange": { "properties": { "diff": { @@ -2305,17 +809,6 @@ "description": "Whether the thread is ephemeral and should not be materialized on disk.", "type": "boolean" }, - "epiphanyState": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyThreadState" - }, - { - "type": "null" - } - ], - "description": "Only populated on `thread/start`, `thread/resume`, `thread/fork`, `thread/read`, and notifications/responses that reuse those hydrated thread payloads." - }, "forkedFromId": { "description": "Source thread id when this thread was created by forking another thread.", "type": [ diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadMetadataUpdateResponse.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadMetadataUpdateResponse.json index 1846b3bd..a879c758 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadMetadataUpdateResponse.json +++ b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadMetadataUpdateResponse.json @@ -390,1502 +390,6 @@ ], "type": "string" }, - "EpiphanyAcceptanceReceipt": { - "properties": { - "accepted_at": { - "type": "string" - }, - "accepted_evidence_id": { - "type": [ - "string", - "null" - ] - }, - "accepted_observation_id": { - "type": [ - "string", - "null" - ] - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "job_id": { - "type": "string" - }, - "result_id": { - "type": "string" - }, - "role_id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "accepted_at", - "binding_id", - "id", - "job_id", - "result_id", - "role_id", - "status", - "surface" - ], - "type": "object" - }, - "EpiphanyBacklogItem": { - "properties": { - "acceptance_sketch": { - "items": { - "type": "string" - }, - "type": "array" - }, - "blockers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": "string" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "duplicate_of": { - "type": [ - "string", - "null" - ] - }, - "evidence_refs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "horizon": { - "type": "string" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "lane_hints": { - "items": { - "type": "string" - }, - "type": "array" - }, - "priority": { - "$ref": "#/definitions/EpiphanyPlanningPriority" - }, - "product_area": { - "type": "string" - }, - "source_refs": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "horizon", - "id", - "kind", - "priority", - "product_area", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyChurnState": { - "properties": { - "diff_pressure": { - "type": "string" - }, - "graph_freshness": { - "type": [ - "string", - "null" - ] - }, - "understanding_status": { - "type": "string" - }, - "unexplained_writes": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "warning": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "diff_pressure", - "understanding_status" - ], - "type": "object" - }, - "EpiphanyCodeRef": { - "properties": { - "end_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "path": { - "type": "string" - }, - "start_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "symbol": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "path" - ], - "type": "object" - }, - "EpiphanyEvidenceRecord": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyGraph": { - "properties": { - "edges": { - "items": { - "$ref": "#/definitions/EpiphanyGraphEdge" - }, - "type": "array" - }, - "nodes": { - "items": { - "$ref": "#/definitions/EpiphanyGraphNode" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphCheckpoint": { - "properties": { - "checkpoint_id": { - "type": "string" - }, - "frontier_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graph_revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "graph_revision" - ], - "type": "object" - }, - "EpiphanyGraphEdge": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": [ - "string", - "null" - ] - }, - "kind": { - "type": "string" - }, - "label": { - "type": [ - "string", - "null" - ] - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "source_id": { - "type": "string" - }, - "target_id": { - "type": "string" - } - }, - "required": [ - "kind", - "source_id", - "target_id" - ], - "type": "object" - }, - "EpiphanyGraphFrontier": { - "properties": { - "active_edge_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "active_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphLink": { - "properties": { - "architecture_node_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "dataflow_node_id": { - "type": "string" - }, - "relationship": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "architecture_node_id", - "dataflow_node_id" - ], - "type": "object" - }, - "EpiphanyGraphNode": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "metaphor": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "status": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "title" - ], - "type": "object" - }, - "EpiphanyGraphs": { - "properties": { - "architecture": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "dataflow": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "links": { - "items": { - "$ref": "#/definitions/EpiphanyGraphLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyInvariant": { - "properties": { - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "rationale": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - } - }, - "required": [ - "description", - "id", - "status" - ], - "type": "object" - }, - "EpiphanyInvestigationCheckpoint": { - "properties": { - "captured_at_turn_id": { - "type": [ - "string", - "null" - ] - }, - "checkpoint_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "disposition": { - "$ref": "#/definitions/EpiphanyInvestigationDisposition" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "focus": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "next_action": { - "type": [ - "string", - "null" - ] - }, - "open_questions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "disposition", - "focus", - "kind" - ], - "type": "object" - }, - "EpiphanyInvestigationDisposition": { - "enum": [ - "resume_ready", - "regather_required" - ], - "type": "string" - }, - "EpiphanyJobBinding": { - "properties": { - "authority_scope": { - "type": [ - "string", - "null" - ] - }, - "blocking_reason": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "kind": { - "$ref": "#/definitions/EpiphanyJobKind" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "owner_role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "owner_role", - "scope" - ], - "type": "object" - }, - "EpiphanyJobKind": { - "enum": [ - "indexing", - "remap", - "verification", - "specialist" - ], - "type": "string" - }, - "EpiphanyModeKind": { - "enum": [ - "plan", - "default" - ], - "type": "string" - }, - "EpiphanyModeState": { - "properties": { - "kind": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeKind" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "EpiphanyObjectiveDraft": { - "properties": { - "acceptance_criteria": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "evidence_required": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "lane_plan": { - "$ref": "#/definitions/EpiphanyObjectiveDraftLanePlan" - }, - "review_gates": { - "items": { - "type": "string" - }, - "type": "array" - }, - "risks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "scope": { - "$ref": "#/definitions/EpiphanyObjectiveDraftScope" - }, - "source_item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "lane_plan", - "scope", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyObjectiveDraftLanePlan": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "eyes": { - "type": [ - "string", - "null" - ] - }, - "hands": { - "type": [ - "string", - "null" - ] - }, - "imagination": { - "type": [ - "string", - "null" - ] - }, - "life": { - "type": [ - "string", - "null" - ] - }, - "soul": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyObjectiveDraftScope": { - "properties": { - "excludes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "includes": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyObservation": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "source_kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "source_kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyPlanningCapture": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "confidence": { - "type": "string" - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "source": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "speaker": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "id", - "source", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyPlanningPriority": { - "properties": { - "blocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": [ - "string", - "null" - ] - }, - "effort": { - "type": [ - "string", - "null" - ] - }, - "impact": { - "type": [ - "string", - "null" - ] - }, - "rationale": { - "type": "string" - }, - "reason": { - "type": [ - "string", - "null" - ] - }, - "unblocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "urgency": { - "type": [ - "string", - "null" - ] - }, - "value": { - "type": "string" - } - }, - "required": [ - "rationale", - "value" - ], - "type": "object" - }, - "EpiphanyPlanningSourceRef": { - "properties": { - "assignees": { - "items": { - "type": "string" - }, - "type": "array" - }, - "author": { - "type": [ - "string", - "null" - ] - }, - "closed_at": { - "type": [ - "string", - "null" - ] - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "database_id": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "external_id": { - "type": [ - "string", - "null" - ] - }, - "imported_at": { - "type": [ - "string", - "null" - ] - }, - "is_pull_request": { - "type": [ - "boolean", - "null" - ] - }, - "issue_number": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "kind": { - "type": "string" - }, - "labels": { - "items": { - "type": "string" - }, - "type": "array" - }, - "milestone": { - "type": [ - "string", - "null" - ] - }, - "node_id": { - "type": [ - "string", - "null" - ] - }, - "provider": { - "type": [ - "string", - "null" - ] - }, - "repo": { - "type": [ - "string", - "null" - ] - }, - "state": { - "type": [ - "string", - "null" - ] - }, - "updated_at": { - "type": [ - "string", - "null" - ] - }, - "uri": { - "type": [ - "string", - "null" - ] - }, - "url": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "kind" - ], - "type": "object" - }, - "EpiphanyPlanningState": { - "properties": { - "backlog_items": { - "items": { - "$ref": "#/definitions/EpiphanyBacklogItem" - }, - "type": "array" - }, - "captures": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningCapture" - }, - "type": "array" - }, - "objective_drafts": { - "items": { - "$ref": "#/definitions/EpiphanyObjectiveDraft" - }, - "type": "array" - }, - "roadmap_streams": { - "items": { - "$ref": "#/definitions/EpiphanyRoadmapStream" - }, - "type": "array" - }, - "workspace_root": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyRetrievalShardSummary": { - "properties": { - "exact_available": { - "type": "boolean" - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "path_prefix": { - "type": "string" - }, - "semantic_available": { - "type": "boolean" - }, - "shard_id": { - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - } - }, - "required": [ - "path_prefix", - "shard_id" - ], - "type": "object" - }, - "EpiphanyRetrievalState": { - "properties": { - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "index_revision": { - "type": [ - "string", - "null" - ] - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "last_indexed_at_unix_seconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "semantic_available": { - "type": "boolean" - }, - "shards": { - "items": { - "$ref": "#/definitions/EpiphanyRetrievalShardSummary" - }, - "type": "array" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - }, - "workspace_root": { - "type": "string" - } - }, - "required": [ - "workspace_root" - ], - "type": "object" - }, - "EpiphanyRetrievalStatus": { - "enum": [ - "unavailable", - "ready", - "stale", - "indexing" - ], - "type": "string" - }, - "EpiphanyRoadmapStream": { - "properties": { - "blocked_by": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "near_term_focus": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "review_cadence": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyRuntimeLink": { - "properties": { - "authority_scope": { - "type": "string" - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "role_id": { - "type": "string" - }, - "runtime_job_id": { - "type": "string" - }, - "runtime_result_id": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "authority_scope", - "binding_id", - "id", - "role_id", - "runtime_job_id", - "surface" - ], - "type": "object" - }, - "EpiphanyScratchPad": { - "properties": { - "hypothesis": { - "type": [ - "string", - "null" - ] - }, - "next_probe": { - "type": [ - "string", - "null" - ] - }, - "notes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanySubgoal": { - "properties": { - "id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyThreadState": { - "properties": { - "acceptance_receipts": { - "items": { - "$ref": "#/definitions/EpiphanyAcceptanceReceipt" - }, - "type": "array" - }, - "active_subgoal_id": { - "type": [ - "string", - "null" - ] - }, - "churn": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyChurnState" - }, - { - "type": "null" - } - ] - }, - "graph_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphCheckpoint" - }, - { - "type": "null" - } - ] - }, - "graph_frontier": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphFrontier" - }, - { - "type": "null" - } - ] - }, - "graphs": { - "$ref": "#/definitions/EpiphanyGraphs" - }, - "invariants": { - "items": { - "$ref": "#/definitions/EpiphanyInvariant" - }, - "type": "array" - }, - "investigation_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "job_bindings": { - "items": { - "$ref": "#/definitions/EpiphanyJobBinding" - }, - "type": "array" - }, - "last_updated_turn_id": { - "type": [ - "string", - "null" - ] - }, - "mode": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeState" - }, - { - "type": "null" - } - ] - }, - "objective": { - "type": [ - "string", - "null" - ] - }, - "observations": { - "items": { - "$ref": "#/definitions/EpiphanyObservation" - }, - "type": "array" - }, - "planning": { - "$ref": "#/definitions/EpiphanyPlanningState" - }, - "recent_evidence": { - "items": { - "$ref": "#/definitions/EpiphanyEvidenceRecord" - }, - "type": "array" - }, - "retrieval": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalState" - }, - { - "type": "null" - } - ] - }, - "revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "runtime_links": { - "items": { - "$ref": "#/definitions/EpiphanyRuntimeLink" - }, - "type": "array" - }, - "scratch": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyScratchPad" - }, - { - "type": "null" - } - ] - }, - "subgoals": { - "items": { - "$ref": "#/definitions/EpiphanySubgoal" - }, - "type": "array" - } - }, - "required": [ - "revision" - ], - "type": "object" - }, "FileUpdateChange": { "properties": { "diff": { @@ -2305,17 +809,6 @@ "description": "Whether the thread is ephemeral and should not be materialized on disk.", "type": "boolean" }, - "epiphanyState": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyThreadState" - }, - { - "type": "null" - } - ], - "description": "Only populated on `thread/start`, `thread/resume`, `thread/fork`, `thread/read`, and notifications/responses that reuse those hydrated thread payloads." - }, "forkedFromId": { "description": "Source thread id when this thread was created by forking another thread.", "type": [ diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadReadResponse.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadReadResponse.json index 5e46c5de..65bd1c01 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadReadResponse.json +++ b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadReadResponse.json @@ -390,1502 +390,6 @@ ], "type": "string" }, - "EpiphanyAcceptanceReceipt": { - "properties": { - "accepted_at": { - "type": "string" - }, - "accepted_evidence_id": { - "type": [ - "string", - "null" - ] - }, - "accepted_observation_id": { - "type": [ - "string", - "null" - ] - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "job_id": { - "type": "string" - }, - "result_id": { - "type": "string" - }, - "role_id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "accepted_at", - "binding_id", - "id", - "job_id", - "result_id", - "role_id", - "status", - "surface" - ], - "type": "object" - }, - "EpiphanyBacklogItem": { - "properties": { - "acceptance_sketch": { - "items": { - "type": "string" - }, - "type": "array" - }, - "blockers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": "string" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "duplicate_of": { - "type": [ - "string", - "null" - ] - }, - "evidence_refs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "horizon": { - "type": "string" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "lane_hints": { - "items": { - "type": "string" - }, - "type": "array" - }, - "priority": { - "$ref": "#/definitions/EpiphanyPlanningPriority" - }, - "product_area": { - "type": "string" - }, - "source_refs": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "horizon", - "id", - "kind", - "priority", - "product_area", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyChurnState": { - "properties": { - "diff_pressure": { - "type": "string" - }, - "graph_freshness": { - "type": [ - "string", - "null" - ] - }, - "understanding_status": { - "type": "string" - }, - "unexplained_writes": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "warning": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "diff_pressure", - "understanding_status" - ], - "type": "object" - }, - "EpiphanyCodeRef": { - "properties": { - "end_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "path": { - "type": "string" - }, - "start_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "symbol": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "path" - ], - "type": "object" - }, - "EpiphanyEvidenceRecord": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyGraph": { - "properties": { - "edges": { - "items": { - "$ref": "#/definitions/EpiphanyGraphEdge" - }, - "type": "array" - }, - "nodes": { - "items": { - "$ref": "#/definitions/EpiphanyGraphNode" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphCheckpoint": { - "properties": { - "checkpoint_id": { - "type": "string" - }, - "frontier_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graph_revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "graph_revision" - ], - "type": "object" - }, - "EpiphanyGraphEdge": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": [ - "string", - "null" - ] - }, - "kind": { - "type": "string" - }, - "label": { - "type": [ - "string", - "null" - ] - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "source_id": { - "type": "string" - }, - "target_id": { - "type": "string" - } - }, - "required": [ - "kind", - "source_id", - "target_id" - ], - "type": "object" - }, - "EpiphanyGraphFrontier": { - "properties": { - "active_edge_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "active_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphLink": { - "properties": { - "architecture_node_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "dataflow_node_id": { - "type": "string" - }, - "relationship": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "architecture_node_id", - "dataflow_node_id" - ], - "type": "object" - }, - "EpiphanyGraphNode": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "metaphor": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "status": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "title" - ], - "type": "object" - }, - "EpiphanyGraphs": { - "properties": { - "architecture": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "dataflow": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "links": { - "items": { - "$ref": "#/definitions/EpiphanyGraphLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyInvariant": { - "properties": { - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "rationale": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - } - }, - "required": [ - "description", - "id", - "status" - ], - "type": "object" - }, - "EpiphanyInvestigationCheckpoint": { - "properties": { - "captured_at_turn_id": { - "type": [ - "string", - "null" - ] - }, - "checkpoint_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "disposition": { - "$ref": "#/definitions/EpiphanyInvestigationDisposition" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "focus": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "next_action": { - "type": [ - "string", - "null" - ] - }, - "open_questions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "disposition", - "focus", - "kind" - ], - "type": "object" - }, - "EpiphanyInvestigationDisposition": { - "enum": [ - "resume_ready", - "regather_required" - ], - "type": "string" - }, - "EpiphanyJobBinding": { - "properties": { - "authority_scope": { - "type": [ - "string", - "null" - ] - }, - "blocking_reason": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "kind": { - "$ref": "#/definitions/EpiphanyJobKind" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "owner_role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "owner_role", - "scope" - ], - "type": "object" - }, - "EpiphanyJobKind": { - "enum": [ - "indexing", - "remap", - "verification", - "specialist" - ], - "type": "string" - }, - "EpiphanyModeKind": { - "enum": [ - "plan", - "default" - ], - "type": "string" - }, - "EpiphanyModeState": { - "properties": { - "kind": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeKind" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "EpiphanyObjectiveDraft": { - "properties": { - "acceptance_criteria": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "evidence_required": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "lane_plan": { - "$ref": "#/definitions/EpiphanyObjectiveDraftLanePlan" - }, - "review_gates": { - "items": { - "type": "string" - }, - "type": "array" - }, - "risks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "scope": { - "$ref": "#/definitions/EpiphanyObjectiveDraftScope" - }, - "source_item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "lane_plan", - "scope", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyObjectiveDraftLanePlan": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "eyes": { - "type": [ - "string", - "null" - ] - }, - "hands": { - "type": [ - "string", - "null" - ] - }, - "imagination": { - "type": [ - "string", - "null" - ] - }, - "life": { - "type": [ - "string", - "null" - ] - }, - "soul": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyObjectiveDraftScope": { - "properties": { - "excludes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "includes": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyObservation": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "source_kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "source_kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyPlanningCapture": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "confidence": { - "type": "string" - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "source": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "speaker": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "id", - "source", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyPlanningPriority": { - "properties": { - "blocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": [ - "string", - "null" - ] - }, - "effort": { - "type": [ - "string", - "null" - ] - }, - "impact": { - "type": [ - "string", - "null" - ] - }, - "rationale": { - "type": "string" - }, - "reason": { - "type": [ - "string", - "null" - ] - }, - "unblocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "urgency": { - "type": [ - "string", - "null" - ] - }, - "value": { - "type": "string" - } - }, - "required": [ - "rationale", - "value" - ], - "type": "object" - }, - "EpiphanyPlanningSourceRef": { - "properties": { - "assignees": { - "items": { - "type": "string" - }, - "type": "array" - }, - "author": { - "type": [ - "string", - "null" - ] - }, - "closed_at": { - "type": [ - "string", - "null" - ] - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "database_id": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "external_id": { - "type": [ - "string", - "null" - ] - }, - "imported_at": { - "type": [ - "string", - "null" - ] - }, - "is_pull_request": { - "type": [ - "boolean", - "null" - ] - }, - "issue_number": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "kind": { - "type": "string" - }, - "labels": { - "items": { - "type": "string" - }, - "type": "array" - }, - "milestone": { - "type": [ - "string", - "null" - ] - }, - "node_id": { - "type": [ - "string", - "null" - ] - }, - "provider": { - "type": [ - "string", - "null" - ] - }, - "repo": { - "type": [ - "string", - "null" - ] - }, - "state": { - "type": [ - "string", - "null" - ] - }, - "updated_at": { - "type": [ - "string", - "null" - ] - }, - "uri": { - "type": [ - "string", - "null" - ] - }, - "url": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "kind" - ], - "type": "object" - }, - "EpiphanyPlanningState": { - "properties": { - "backlog_items": { - "items": { - "$ref": "#/definitions/EpiphanyBacklogItem" - }, - "type": "array" - }, - "captures": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningCapture" - }, - "type": "array" - }, - "objective_drafts": { - "items": { - "$ref": "#/definitions/EpiphanyObjectiveDraft" - }, - "type": "array" - }, - "roadmap_streams": { - "items": { - "$ref": "#/definitions/EpiphanyRoadmapStream" - }, - "type": "array" - }, - "workspace_root": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyRetrievalShardSummary": { - "properties": { - "exact_available": { - "type": "boolean" - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "path_prefix": { - "type": "string" - }, - "semantic_available": { - "type": "boolean" - }, - "shard_id": { - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - } - }, - "required": [ - "path_prefix", - "shard_id" - ], - "type": "object" - }, - "EpiphanyRetrievalState": { - "properties": { - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "index_revision": { - "type": [ - "string", - "null" - ] - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "last_indexed_at_unix_seconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "semantic_available": { - "type": "boolean" - }, - "shards": { - "items": { - "$ref": "#/definitions/EpiphanyRetrievalShardSummary" - }, - "type": "array" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - }, - "workspace_root": { - "type": "string" - } - }, - "required": [ - "workspace_root" - ], - "type": "object" - }, - "EpiphanyRetrievalStatus": { - "enum": [ - "unavailable", - "ready", - "stale", - "indexing" - ], - "type": "string" - }, - "EpiphanyRoadmapStream": { - "properties": { - "blocked_by": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "near_term_focus": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "review_cadence": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyRuntimeLink": { - "properties": { - "authority_scope": { - "type": "string" - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "role_id": { - "type": "string" - }, - "runtime_job_id": { - "type": "string" - }, - "runtime_result_id": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "authority_scope", - "binding_id", - "id", - "role_id", - "runtime_job_id", - "surface" - ], - "type": "object" - }, - "EpiphanyScratchPad": { - "properties": { - "hypothesis": { - "type": [ - "string", - "null" - ] - }, - "next_probe": { - "type": [ - "string", - "null" - ] - }, - "notes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanySubgoal": { - "properties": { - "id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyThreadState": { - "properties": { - "acceptance_receipts": { - "items": { - "$ref": "#/definitions/EpiphanyAcceptanceReceipt" - }, - "type": "array" - }, - "active_subgoal_id": { - "type": [ - "string", - "null" - ] - }, - "churn": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyChurnState" - }, - { - "type": "null" - } - ] - }, - "graph_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphCheckpoint" - }, - { - "type": "null" - } - ] - }, - "graph_frontier": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphFrontier" - }, - { - "type": "null" - } - ] - }, - "graphs": { - "$ref": "#/definitions/EpiphanyGraphs" - }, - "invariants": { - "items": { - "$ref": "#/definitions/EpiphanyInvariant" - }, - "type": "array" - }, - "investigation_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "job_bindings": { - "items": { - "$ref": "#/definitions/EpiphanyJobBinding" - }, - "type": "array" - }, - "last_updated_turn_id": { - "type": [ - "string", - "null" - ] - }, - "mode": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeState" - }, - { - "type": "null" - } - ] - }, - "objective": { - "type": [ - "string", - "null" - ] - }, - "observations": { - "items": { - "$ref": "#/definitions/EpiphanyObservation" - }, - "type": "array" - }, - "planning": { - "$ref": "#/definitions/EpiphanyPlanningState" - }, - "recent_evidence": { - "items": { - "$ref": "#/definitions/EpiphanyEvidenceRecord" - }, - "type": "array" - }, - "retrieval": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalState" - }, - { - "type": "null" - } - ] - }, - "revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "runtime_links": { - "items": { - "$ref": "#/definitions/EpiphanyRuntimeLink" - }, - "type": "array" - }, - "scratch": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyScratchPad" - }, - { - "type": "null" - } - ] - }, - "subgoals": { - "items": { - "$ref": "#/definitions/EpiphanySubgoal" - }, - "type": "array" - } - }, - "required": [ - "revision" - ], - "type": "object" - }, "FileUpdateChange": { "properties": { "diff": { @@ -2305,17 +809,6 @@ "description": "Whether the thread is ephemeral and should not be materialized on disk.", "type": "boolean" }, - "epiphanyState": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyThreadState" - }, - { - "type": "null" - } - ], - "description": "Only populated on `thread/start`, `thread/resume`, `thread/fork`, `thread/read`, and notifications/responses that reuse those hydrated thread payloads." - }, "forkedFromId": { "description": "Source thread id when this thread was created by forking another thread.", "type": [ diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json index a476f137..5bdee38b 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json +++ b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json @@ -445,1502 +445,6 @@ ], "type": "string" }, - "EpiphanyAcceptanceReceipt": { - "properties": { - "accepted_at": { - "type": "string" - }, - "accepted_evidence_id": { - "type": [ - "string", - "null" - ] - }, - "accepted_observation_id": { - "type": [ - "string", - "null" - ] - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "job_id": { - "type": "string" - }, - "result_id": { - "type": "string" - }, - "role_id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "accepted_at", - "binding_id", - "id", - "job_id", - "result_id", - "role_id", - "status", - "surface" - ], - "type": "object" - }, - "EpiphanyBacklogItem": { - "properties": { - "acceptance_sketch": { - "items": { - "type": "string" - }, - "type": "array" - }, - "blockers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": "string" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "duplicate_of": { - "type": [ - "string", - "null" - ] - }, - "evidence_refs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "horizon": { - "type": "string" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "lane_hints": { - "items": { - "type": "string" - }, - "type": "array" - }, - "priority": { - "$ref": "#/definitions/EpiphanyPlanningPriority" - }, - "product_area": { - "type": "string" - }, - "source_refs": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "horizon", - "id", - "kind", - "priority", - "product_area", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyChurnState": { - "properties": { - "diff_pressure": { - "type": "string" - }, - "graph_freshness": { - "type": [ - "string", - "null" - ] - }, - "understanding_status": { - "type": "string" - }, - "unexplained_writes": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "warning": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "diff_pressure", - "understanding_status" - ], - "type": "object" - }, - "EpiphanyCodeRef": { - "properties": { - "end_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "path": { - "type": "string" - }, - "start_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "symbol": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "path" - ], - "type": "object" - }, - "EpiphanyEvidenceRecord": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyGraph": { - "properties": { - "edges": { - "items": { - "$ref": "#/definitions/EpiphanyGraphEdge" - }, - "type": "array" - }, - "nodes": { - "items": { - "$ref": "#/definitions/EpiphanyGraphNode" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphCheckpoint": { - "properties": { - "checkpoint_id": { - "type": "string" - }, - "frontier_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graph_revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "graph_revision" - ], - "type": "object" - }, - "EpiphanyGraphEdge": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": [ - "string", - "null" - ] - }, - "kind": { - "type": "string" - }, - "label": { - "type": [ - "string", - "null" - ] - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "source_id": { - "type": "string" - }, - "target_id": { - "type": "string" - } - }, - "required": [ - "kind", - "source_id", - "target_id" - ], - "type": "object" - }, - "EpiphanyGraphFrontier": { - "properties": { - "active_edge_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "active_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphLink": { - "properties": { - "architecture_node_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "dataflow_node_id": { - "type": "string" - }, - "relationship": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "architecture_node_id", - "dataflow_node_id" - ], - "type": "object" - }, - "EpiphanyGraphNode": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "metaphor": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "status": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "title" - ], - "type": "object" - }, - "EpiphanyGraphs": { - "properties": { - "architecture": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "dataflow": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "links": { - "items": { - "$ref": "#/definitions/EpiphanyGraphLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyInvariant": { - "properties": { - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "rationale": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - } - }, - "required": [ - "description", - "id", - "status" - ], - "type": "object" - }, - "EpiphanyInvestigationCheckpoint": { - "properties": { - "captured_at_turn_id": { - "type": [ - "string", - "null" - ] - }, - "checkpoint_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "disposition": { - "$ref": "#/definitions/EpiphanyInvestigationDisposition" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "focus": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "next_action": { - "type": [ - "string", - "null" - ] - }, - "open_questions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "disposition", - "focus", - "kind" - ], - "type": "object" - }, - "EpiphanyInvestigationDisposition": { - "enum": [ - "resume_ready", - "regather_required" - ], - "type": "string" - }, - "EpiphanyJobBinding": { - "properties": { - "authority_scope": { - "type": [ - "string", - "null" - ] - }, - "blocking_reason": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "kind": { - "$ref": "#/definitions/EpiphanyJobKind" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "owner_role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "owner_role", - "scope" - ], - "type": "object" - }, - "EpiphanyJobKind": { - "enum": [ - "indexing", - "remap", - "verification", - "specialist" - ], - "type": "string" - }, - "EpiphanyModeKind": { - "enum": [ - "plan", - "default" - ], - "type": "string" - }, - "EpiphanyModeState": { - "properties": { - "kind": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeKind" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "EpiphanyObjectiveDraft": { - "properties": { - "acceptance_criteria": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "evidence_required": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "lane_plan": { - "$ref": "#/definitions/EpiphanyObjectiveDraftLanePlan" - }, - "review_gates": { - "items": { - "type": "string" - }, - "type": "array" - }, - "risks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "scope": { - "$ref": "#/definitions/EpiphanyObjectiveDraftScope" - }, - "source_item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "lane_plan", - "scope", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyObjectiveDraftLanePlan": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "eyes": { - "type": [ - "string", - "null" - ] - }, - "hands": { - "type": [ - "string", - "null" - ] - }, - "imagination": { - "type": [ - "string", - "null" - ] - }, - "life": { - "type": [ - "string", - "null" - ] - }, - "soul": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyObjectiveDraftScope": { - "properties": { - "excludes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "includes": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyObservation": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "source_kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "source_kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyPlanningCapture": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "confidence": { - "type": "string" - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "source": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "speaker": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "id", - "source", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyPlanningPriority": { - "properties": { - "blocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": [ - "string", - "null" - ] - }, - "effort": { - "type": [ - "string", - "null" - ] - }, - "impact": { - "type": [ - "string", - "null" - ] - }, - "rationale": { - "type": "string" - }, - "reason": { - "type": [ - "string", - "null" - ] - }, - "unblocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "urgency": { - "type": [ - "string", - "null" - ] - }, - "value": { - "type": "string" - } - }, - "required": [ - "rationale", - "value" - ], - "type": "object" - }, - "EpiphanyPlanningSourceRef": { - "properties": { - "assignees": { - "items": { - "type": "string" - }, - "type": "array" - }, - "author": { - "type": [ - "string", - "null" - ] - }, - "closed_at": { - "type": [ - "string", - "null" - ] - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "database_id": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "external_id": { - "type": [ - "string", - "null" - ] - }, - "imported_at": { - "type": [ - "string", - "null" - ] - }, - "is_pull_request": { - "type": [ - "boolean", - "null" - ] - }, - "issue_number": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "kind": { - "type": "string" - }, - "labels": { - "items": { - "type": "string" - }, - "type": "array" - }, - "milestone": { - "type": [ - "string", - "null" - ] - }, - "node_id": { - "type": [ - "string", - "null" - ] - }, - "provider": { - "type": [ - "string", - "null" - ] - }, - "repo": { - "type": [ - "string", - "null" - ] - }, - "state": { - "type": [ - "string", - "null" - ] - }, - "updated_at": { - "type": [ - "string", - "null" - ] - }, - "uri": { - "type": [ - "string", - "null" - ] - }, - "url": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "kind" - ], - "type": "object" - }, - "EpiphanyPlanningState": { - "properties": { - "backlog_items": { - "items": { - "$ref": "#/definitions/EpiphanyBacklogItem" - }, - "type": "array" - }, - "captures": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningCapture" - }, - "type": "array" - }, - "objective_drafts": { - "items": { - "$ref": "#/definitions/EpiphanyObjectiveDraft" - }, - "type": "array" - }, - "roadmap_streams": { - "items": { - "$ref": "#/definitions/EpiphanyRoadmapStream" - }, - "type": "array" - }, - "workspace_root": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyRetrievalShardSummary": { - "properties": { - "exact_available": { - "type": "boolean" - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "path_prefix": { - "type": "string" - }, - "semantic_available": { - "type": "boolean" - }, - "shard_id": { - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - } - }, - "required": [ - "path_prefix", - "shard_id" - ], - "type": "object" - }, - "EpiphanyRetrievalState": { - "properties": { - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "index_revision": { - "type": [ - "string", - "null" - ] - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "last_indexed_at_unix_seconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "semantic_available": { - "type": "boolean" - }, - "shards": { - "items": { - "$ref": "#/definitions/EpiphanyRetrievalShardSummary" - }, - "type": "array" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - }, - "workspace_root": { - "type": "string" - } - }, - "required": [ - "workspace_root" - ], - "type": "object" - }, - "EpiphanyRetrievalStatus": { - "enum": [ - "unavailable", - "ready", - "stale", - "indexing" - ], - "type": "string" - }, - "EpiphanyRoadmapStream": { - "properties": { - "blocked_by": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "near_term_focus": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "review_cadence": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyRuntimeLink": { - "properties": { - "authority_scope": { - "type": "string" - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "role_id": { - "type": "string" - }, - "runtime_job_id": { - "type": "string" - }, - "runtime_result_id": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "authority_scope", - "binding_id", - "id", - "role_id", - "runtime_job_id", - "surface" - ], - "type": "object" - }, - "EpiphanyScratchPad": { - "properties": { - "hypothesis": { - "type": [ - "string", - "null" - ] - }, - "next_probe": { - "type": [ - "string", - "null" - ] - }, - "notes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanySubgoal": { - "properties": { - "id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyThreadState": { - "properties": { - "acceptance_receipts": { - "items": { - "$ref": "#/definitions/EpiphanyAcceptanceReceipt" - }, - "type": "array" - }, - "active_subgoal_id": { - "type": [ - "string", - "null" - ] - }, - "churn": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyChurnState" - }, - { - "type": "null" - } - ] - }, - "graph_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphCheckpoint" - }, - { - "type": "null" - } - ] - }, - "graph_frontier": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphFrontier" - }, - { - "type": "null" - } - ] - }, - "graphs": { - "$ref": "#/definitions/EpiphanyGraphs" - }, - "invariants": { - "items": { - "$ref": "#/definitions/EpiphanyInvariant" - }, - "type": "array" - }, - "investigation_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "job_bindings": { - "items": { - "$ref": "#/definitions/EpiphanyJobBinding" - }, - "type": "array" - }, - "last_updated_turn_id": { - "type": [ - "string", - "null" - ] - }, - "mode": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeState" - }, - { - "type": "null" - } - ] - }, - "objective": { - "type": [ - "string", - "null" - ] - }, - "observations": { - "items": { - "$ref": "#/definitions/EpiphanyObservation" - }, - "type": "array" - }, - "planning": { - "$ref": "#/definitions/EpiphanyPlanningState" - }, - "recent_evidence": { - "items": { - "$ref": "#/definitions/EpiphanyEvidenceRecord" - }, - "type": "array" - }, - "retrieval": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalState" - }, - { - "type": "null" - } - ] - }, - "revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "runtime_links": { - "items": { - "$ref": "#/definitions/EpiphanyRuntimeLink" - }, - "type": "array" - }, - "scratch": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyScratchPad" - }, - { - "type": "null" - } - ] - }, - "subgoals": { - "items": { - "$ref": "#/definitions/EpiphanySubgoal" - }, - "type": "array" - } - }, - "required": [ - "revision" - ], - "type": "object" - }, "FileSystemAccessMode": { "enum": [ "read", @@ -2809,17 +1313,6 @@ "description": "Whether the thread is ephemeral and should not be materialized on disk.", "type": "boolean" }, - "epiphanyState": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyThreadState" - }, - { - "type": "null" - } - ], - "description": "Only populated on `thread/start`, `thread/resume`, `thread/fork`, `thread/read`, and notifications/responses that reuse those hydrated thread payloads." - }, "forkedFromId": { "description": "Source thread id when this thread was created by forking another thread.", "type": [ diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadRollbackResponse.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadRollbackResponse.json index 67035c8b..5f405a3c 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadRollbackResponse.json +++ b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadRollbackResponse.json @@ -390,1502 +390,6 @@ ], "type": "string" }, - "EpiphanyAcceptanceReceipt": { - "properties": { - "accepted_at": { - "type": "string" - }, - "accepted_evidence_id": { - "type": [ - "string", - "null" - ] - }, - "accepted_observation_id": { - "type": [ - "string", - "null" - ] - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "job_id": { - "type": "string" - }, - "result_id": { - "type": "string" - }, - "role_id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "accepted_at", - "binding_id", - "id", - "job_id", - "result_id", - "role_id", - "status", - "surface" - ], - "type": "object" - }, - "EpiphanyBacklogItem": { - "properties": { - "acceptance_sketch": { - "items": { - "type": "string" - }, - "type": "array" - }, - "blockers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": "string" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "duplicate_of": { - "type": [ - "string", - "null" - ] - }, - "evidence_refs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "horizon": { - "type": "string" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "lane_hints": { - "items": { - "type": "string" - }, - "type": "array" - }, - "priority": { - "$ref": "#/definitions/EpiphanyPlanningPriority" - }, - "product_area": { - "type": "string" - }, - "source_refs": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "horizon", - "id", - "kind", - "priority", - "product_area", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyChurnState": { - "properties": { - "diff_pressure": { - "type": "string" - }, - "graph_freshness": { - "type": [ - "string", - "null" - ] - }, - "understanding_status": { - "type": "string" - }, - "unexplained_writes": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "warning": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "diff_pressure", - "understanding_status" - ], - "type": "object" - }, - "EpiphanyCodeRef": { - "properties": { - "end_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "path": { - "type": "string" - }, - "start_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "symbol": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "path" - ], - "type": "object" - }, - "EpiphanyEvidenceRecord": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyGraph": { - "properties": { - "edges": { - "items": { - "$ref": "#/definitions/EpiphanyGraphEdge" - }, - "type": "array" - }, - "nodes": { - "items": { - "$ref": "#/definitions/EpiphanyGraphNode" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphCheckpoint": { - "properties": { - "checkpoint_id": { - "type": "string" - }, - "frontier_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graph_revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "graph_revision" - ], - "type": "object" - }, - "EpiphanyGraphEdge": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": [ - "string", - "null" - ] - }, - "kind": { - "type": "string" - }, - "label": { - "type": [ - "string", - "null" - ] - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "source_id": { - "type": "string" - }, - "target_id": { - "type": "string" - } - }, - "required": [ - "kind", - "source_id", - "target_id" - ], - "type": "object" - }, - "EpiphanyGraphFrontier": { - "properties": { - "active_edge_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "active_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphLink": { - "properties": { - "architecture_node_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "dataflow_node_id": { - "type": "string" - }, - "relationship": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "architecture_node_id", - "dataflow_node_id" - ], - "type": "object" - }, - "EpiphanyGraphNode": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "metaphor": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "status": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "title" - ], - "type": "object" - }, - "EpiphanyGraphs": { - "properties": { - "architecture": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "dataflow": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "links": { - "items": { - "$ref": "#/definitions/EpiphanyGraphLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyInvariant": { - "properties": { - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "rationale": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - } - }, - "required": [ - "description", - "id", - "status" - ], - "type": "object" - }, - "EpiphanyInvestigationCheckpoint": { - "properties": { - "captured_at_turn_id": { - "type": [ - "string", - "null" - ] - }, - "checkpoint_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "disposition": { - "$ref": "#/definitions/EpiphanyInvestigationDisposition" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "focus": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "next_action": { - "type": [ - "string", - "null" - ] - }, - "open_questions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "disposition", - "focus", - "kind" - ], - "type": "object" - }, - "EpiphanyInvestigationDisposition": { - "enum": [ - "resume_ready", - "regather_required" - ], - "type": "string" - }, - "EpiphanyJobBinding": { - "properties": { - "authority_scope": { - "type": [ - "string", - "null" - ] - }, - "blocking_reason": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "kind": { - "$ref": "#/definitions/EpiphanyJobKind" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "owner_role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "owner_role", - "scope" - ], - "type": "object" - }, - "EpiphanyJobKind": { - "enum": [ - "indexing", - "remap", - "verification", - "specialist" - ], - "type": "string" - }, - "EpiphanyModeKind": { - "enum": [ - "plan", - "default" - ], - "type": "string" - }, - "EpiphanyModeState": { - "properties": { - "kind": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeKind" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "EpiphanyObjectiveDraft": { - "properties": { - "acceptance_criteria": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "evidence_required": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "lane_plan": { - "$ref": "#/definitions/EpiphanyObjectiveDraftLanePlan" - }, - "review_gates": { - "items": { - "type": "string" - }, - "type": "array" - }, - "risks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "scope": { - "$ref": "#/definitions/EpiphanyObjectiveDraftScope" - }, - "source_item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "lane_plan", - "scope", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyObjectiveDraftLanePlan": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "eyes": { - "type": [ - "string", - "null" - ] - }, - "hands": { - "type": [ - "string", - "null" - ] - }, - "imagination": { - "type": [ - "string", - "null" - ] - }, - "life": { - "type": [ - "string", - "null" - ] - }, - "soul": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyObjectiveDraftScope": { - "properties": { - "excludes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "includes": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyObservation": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "source_kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "source_kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyPlanningCapture": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "confidence": { - "type": "string" - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "source": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "speaker": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "id", - "source", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyPlanningPriority": { - "properties": { - "blocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": [ - "string", - "null" - ] - }, - "effort": { - "type": [ - "string", - "null" - ] - }, - "impact": { - "type": [ - "string", - "null" - ] - }, - "rationale": { - "type": "string" - }, - "reason": { - "type": [ - "string", - "null" - ] - }, - "unblocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "urgency": { - "type": [ - "string", - "null" - ] - }, - "value": { - "type": "string" - } - }, - "required": [ - "rationale", - "value" - ], - "type": "object" - }, - "EpiphanyPlanningSourceRef": { - "properties": { - "assignees": { - "items": { - "type": "string" - }, - "type": "array" - }, - "author": { - "type": [ - "string", - "null" - ] - }, - "closed_at": { - "type": [ - "string", - "null" - ] - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "database_id": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "external_id": { - "type": [ - "string", - "null" - ] - }, - "imported_at": { - "type": [ - "string", - "null" - ] - }, - "is_pull_request": { - "type": [ - "boolean", - "null" - ] - }, - "issue_number": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "kind": { - "type": "string" - }, - "labels": { - "items": { - "type": "string" - }, - "type": "array" - }, - "milestone": { - "type": [ - "string", - "null" - ] - }, - "node_id": { - "type": [ - "string", - "null" - ] - }, - "provider": { - "type": [ - "string", - "null" - ] - }, - "repo": { - "type": [ - "string", - "null" - ] - }, - "state": { - "type": [ - "string", - "null" - ] - }, - "updated_at": { - "type": [ - "string", - "null" - ] - }, - "uri": { - "type": [ - "string", - "null" - ] - }, - "url": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "kind" - ], - "type": "object" - }, - "EpiphanyPlanningState": { - "properties": { - "backlog_items": { - "items": { - "$ref": "#/definitions/EpiphanyBacklogItem" - }, - "type": "array" - }, - "captures": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningCapture" - }, - "type": "array" - }, - "objective_drafts": { - "items": { - "$ref": "#/definitions/EpiphanyObjectiveDraft" - }, - "type": "array" - }, - "roadmap_streams": { - "items": { - "$ref": "#/definitions/EpiphanyRoadmapStream" - }, - "type": "array" - }, - "workspace_root": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyRetrievalShardSummary": { - "properties": { - "exact_available": { - "type": "boolean" - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "path_prefix": { - "type": "string" - }, - "semantic_available": { - "type": "boolean" - }, - "shard_id": { - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - } - }, - "required": [ - "path_prefix", - "shard_id" - ], - "type": "object" - }, - "EpiphanyRetrievalState": { - "properties": { - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "index_revision": { - "type": [ - "string", - "null" - ] - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "last_indexed_at_unix_seconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "semantic_available": { - "type": "boolean" - }, - "shards": { - "items": { - "$ref": "#/definitions/EpiphanyRetrievalShardSummary" - }, - "type": "array" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - }, - "workspace_root": { - "type": "string" - } - }, - "required": [ - "workspace_root" - ], - "type": "object" - }, - "EpiphanyRetrievalStatus": { - "enum": [ - "unavailable", - "ready", - "stale", - "indexing" - ], - "type": "string" - }, - "EpiphanyRoadmapStream": { - "properties": { - "blocked_by": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "near_term_focus": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "review_cadence": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyRuntimeLink": { - "properties": { - "authority_scope": { - "type": "string" - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "role_id": { - "type": "string" - }, - "runtime_job_id": { - "type": "string" - }, - "runtime_result_id": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "authority_scope", - "binding_id", - "id", - "role_id", - "runtime_job_id", - "surface" - ], - "type": "object" - }, - "EpiphanyScratchPad": { - "properties": { - "hypothesis": { - "type": [ - "string", - "null" - ] - }, - "next_probe": { - "type": [ - "string", - "null" - ] - }, - "notes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanySubgoal": { - "properties": { - "id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyThreadState": { - "properties": { - "acceptance_receipts": { - "items": { - "$ref": "#/definitions/EpiphanyAcceptanceReceipt" - }, - "type": "array" - }, - "active_subgoal_id": { - "type": [ - "string", - "null" - ] - }, - "churn": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyChurnState" - }, - { - "type": "null" - } - ] - }, - "graph_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphCheckpoint" - }, - { - "type": "null" - } - ] - }, - "graph_frontier": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphFrontier" - }, - { - "type": "null" - } - ] - }, - "graphs": { - "$ref": "#/definitions/EpiphanyGraphs" - }, - "invariants": { - "items": { - "$ref": "#/definitions/EpiphanyInvariant" - }, - "type": "array" - }, - "investigation_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "job_bindings": { - "items": { - "$ref": "#/definitions/EpiphanyJobBinding" - }, - "type": "array" - }, - "last_updated_turn_id": { - "type": [ - "string", - "null" - ] - }, - "mode": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeState" - }, - { - "type": "null" - } - ] - }, - "objective": { - "type": [ - "string", - "null" - ] - }, - "observations": { - "items": { - "$ref": "#/definitions/EpiphanyObservation" - }, - "type": "array" - }, - "planning": { - "$ref": "#/definitions/EpiphanyPlanningState" - }, - "recent_evidence": { - "items": { - "$ref": "#/definitions/EpiphanyEvidenceRecord" - }, - "type": "array" - }, - "retrieval": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalState" - }, - { - "type": "null" - } - ] - }, - "revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "runtime_links": { - "items": { - "$ref": "#/definitions/EpiphanyRuntimeLink" - }, - "type": "array" - }, - "scratch": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyScratchPad" - }, - { - "type": "null" - } - ] - }, - "subgoals": { - "items": { - "$ref": "#/definitions/EpiphanySubgoal" - }, - "type": "array" - } - }, - "required": [ - "revision" - ], - "type": "object" - }, "FileUpdateChange": { "properties": { "diff": { @@ -2305,17 +809,6 @@ "description": "Whether the thread is ephemeral and should not be materialized on disk.", "type": "boolean" }, - "epiphanyState": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyThreadState" - }, - { - "type": "null" - } - ], - "description": "Only populated on `thread/start`, `thread/resume`, `thread/fork`, `thread/read`, and notifications/responses that reuse those hydrated thread payloads." - }, "forkedFromId": { "description": "Source thread id when this thread was created by forking another thread.", "type": [ diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json index 1c843409..3f4466d7 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json +++ b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json @@ -445,1502 +445,6 @@ ], "type": "string" }, - "EpiphanyAcceptanceReceipt": { - "properties": { - "accepted_at": { - "type": "string" - }, - "accepted_evidence_id": { - "type": [ - "string", - "null" - ] - }, - "accepted_observation_id": { - "type": [ - "string", - "null" - ] - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "job_id": { - "type": "string" - }, - "result_id": { - "type": "string" - }, - "role_id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "accepted_at", - "binding_id", - "id", - "job_id", - "result_id", - "role_id", - "status", - "surface" - ], - "type": "object" - }, - "EpiphanyBacklogItem": { - "properties": { - "acceptance_sketch": { - "items": { - "type": "string" - }, - "type": "array" - }, - "blockers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": "string" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "duplicate_of": { - "type": [ - "string", - "null" - ] - }, - "evidence_refs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "horizon": { - "type": "string" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "lane_hints": { - "items": { - "type": "string" - }, - "type": "array" - }, - "priority": { - "$ref": "#/definitions/EpiphanyPlanningPriority" - }, - "product_area": { - "type": "string" - }, - "source_refs": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "horizon", - "id", - "kind", - "priority", - "product_area", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyChurnState": { - "properties": { - "diff_pressure": { - "type": "string" - }, - "graph_freshness": { - "type": [ - "string", - "null" - ] - }, - "understanding_status": { - "type": "string" - }, - "unexplained_writes": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "warning": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "diff_pressure", - "understanding_status" - ], - "type": "object" - }, - "EpiphanyCodeRef": { - "properties": { - "end_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "path": { - "type": "string" - }, - "start_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "symbol": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "path" - ], - "type": "object" - }, - "EpiphanyEvidenceRecord": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyGraph": { - "properties": { - "edges": { - "items": { - "$ref": "#/definitions/EpiphanyGraphEdge" - }, - "type": "array" - }, - "nodes": { - "items": { - "$ref": "#/definitions/EpiphanyGraphNode" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphCheckpoint": { - "properties": { - "checkpoint_id": { - "type": "string" - }, - "frontier_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graph_revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "graph_revision" - ], - "type": "object" - }, - "EpiphanyGraphEdge": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": [ - "string", - "null" - ] - }, - "kind": { - "type": "string" - }, - "label": { - "type": [ - "string", - "null" - ] - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "source_id": { - "type": "string" - }, - "target_id": { - "type": "string" - } - }, - "required": [ - "kind", - "source_id", - "target_id" - ], - "type": "object" - }, - "EpiphanyGraphFrontier": { - "properties": { - "active_edge_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "active_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphLink": { - "properties": { - "architecture_node_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "dataflow_node_id": { - "type": "string" - }, - "relationship": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "architecture_node_id", - "dataflow_node_id" - ], - "type": "object" - }, - "EpiphanyGraphNode": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "metaphor": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "status": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "title" - ], - "type": "object" - }, - "EpiphanyGraphs": { - "properties": { - "architecture": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "dataflow": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "links": { - "items": { - "$ref": "#/definitions/EpiphanyGraphLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyInvariant": { - "properties": { - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "rationale": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - } - }, - "required": [ - "description", - "id", - "status" - ], - "type": "object" - }, - "EpiphanyInvestigationCheckpoint": { - "properties": { - "captured_at_turn_id": { - "type": [ - "string", - "null" - ] - }, - "checkpoint_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "disposition": { - "$ref": "#/definitions/EpiphanyInvestigationDisposition" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "focus": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "next_action": { - "type": [ - "string", - "null" - ] - }, - "open_questions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "disposition", - "focus", - "kind" - ], - "type": "object" - }, - "EpiphanyInvestigationDisposition": { - "enum": [ - "resume_ready", - "regather_required" - ], - "type": "string" - }, - "EpiphanyJobBinding": { - "properties": { - "authority_scope": { - "type": [ - "string", - "null" - ] - }, - "blocking_reason": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "kind": { - "$ref": "#/definitions/EpiphanyJobKind" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "owner_role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "owner_role", - "scope" - ], - "type": "object" - }, - "EpiphanyJobKind": { - "enum": [ - "indexing", - "remap", - "verification", - "specialist" - ], - "type": "string" - }, - "EpiphanyModeKind": { - "enum": [ - "plan", - "default" - ], - "type": "string" - }, - "EpiphanyModeState": { - "properties": { - "kind": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeKind" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "EpiphanyObjectiveDraft": { - "properties": { - "acceptance_criteria": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "evidence_required": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "lane_plan": { - "$ref": "#/definitions/EpiphanyObjectiveDraftLanePlan" - }, - "review_gates": { - "items": { - "type": "string" - }, - "type": "array" - }, - "risks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "scope": { - "$ref": "#/definitions/EpiphanyObjectiveDraftScope" - }, - "source_item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "lane_plan", - "scope", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyObjectiveDraftLanePlan": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "eyes": { - "type": [ - "string", - "null" - ] - }, - "hands": { - "type": [ - "string", - "null" - ] - }, - "imagination": { - "type": [ - "string", - "null" - ] - }, - "life": { - "type": [ - "string", - "null" - ] - }, - "soul": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyObjectiveDraftScope": { - "properties": { - "excludes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "includes": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyObservation": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "source_kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "source_kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyPlanningCapture": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "confidence": { - "type": "string" - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "source": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "speaker": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "id", - "source", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyPlanningPriority": { - "properties": { - "blocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": [ - "string", - "null" - ] - }, - "effort": { - "type": [ - "string", - "null" - ] - }, - "impact": { - "type": [ - "string", - "null" - ] - }, - "rationale": { - "type": "string" - }, - "reason": { - "type": [ - "string", - "null" - ] - }, - "unblocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "urgency": { - "type": [ - "string", - "null" - ] - }, - "value": { - "type": "string" - } - }, - "required": [ - "rationale", - "value" - ], - "type": "object" - }, - "EpiphanyPlanningSourceRef": { - "properties": { - "assignees": { - "items": { - "type": "string" - }, - "type": "array" - }, - "author": { - "type": [ - "string", - "null" - ] - }, - "closed_at": { - "type": [ - "string", - "null" - ] - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "database_id": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "external_id": { - "type": [ - "string", - "null" - ] - }, - "imported_at": { - "type": [ - "string", - "null" - ] - }, - "is_pull_request": { - "type": [ - "boolean", - "null" - ] - }, - "issue_number": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "kind": { - "type": "string" - }, - "labels": { - "items": { - "type": "string" - }, - "type": "array" - }, - "milestone": { - "type": [ - "string", - "null" - ] - }, - "node_id": { - "type": [ - "string", - "null" - ] - }, - "provider": { - "type": [ - "string", - "null" - ] - }, - "repo": { - "type": [ - "string", - "null" - ] - }, - "state": { - "type": [ - "string", - "null" - ] - }, - "updated_at": { - "type": [ - "string", - "null" - ] - }, - "uri": { - "type": [ - "string", - "null" - ] - }, - "url": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "kind" - ], - "type": "object" - }, - "EpiphanyPlanningState": { - "properties": { - "backlog_items": { - "items": { - "$ref": "#/definitions/EpiphanyBacklogItem" - }, - "type": "array" - }, - "captures": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningCapture" - }, - "type": "array" - }, - "objective_drafts": { - "items": { - "$ref": "#/definitions/EpiphanyObjectiveDraft" - }, - "type": "array" - }, - "roadmap_streams": { - "items": { - "$ref": "#/definitions/EpiphanyRoadmapStream" - }, - "type": "array" - }, - "workspace_root": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyRetrievalShardSummary": { - "properties": { - "exact_available": { - "type": "boolean" - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "path_prefix": { - "type": "string" - }, - "semantic_available": { - "type": "boolean" - }, - "shard_id": { - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - } - }, - "required": [ - "path_prefix", - "shard_id" - ], - "type": "object" - }, - "EpiphanyRetrievalState": { - "properties": { - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "index_revision": { - "type": [ - "string", - "null" - ] - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "last_indexed_at_unix_seconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "semantic_available": { - "type": "boolean" - }, - "shards": { - "items": { - "$ref": "#/definitions/EpiphanyRetrievalShardSummary" - }, - "type": "array" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - }, - "workspace_root": { - "type": "string" - } - }, - "required": [ - "workspace_root" - ], - "type": "object" - }, - "EpiphanyRetrievalStatus": { - "enum": [ - "unavailable", - "ready", - "stale", - "indexing" - ], - "type": "string" - }, - "EpiphanyRoadmapStream": { - "properties": { - "blocked_by": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "near_term_focus": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "review_cadence": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyRuntimeLink": { - "properties": { - "authority_scope": { - "type": "string" - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "role_id": { - "type": "string" - }, - "runtime_job_id": { - "type": "string" - }, - "runtime_result_id": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "authority_scope", - "binding_id", - "id", - "role_id", - "runtime_job_id", - "surface" - ], - "type": "object" - }, - "EpiphanyScratchPad": { - "properties": { - "hypothesis": { - "type": [ - "string", - "null" - ] - }, - "next_probe": { - "type": [ - "string", - "null" - ] - }, - "notes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanySubgoal": { - "properties": { - "id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyThreadState": { - "properties": { - "acceptance_receipts": { - "items": { - "$ref": "#/definitions/EpiphanyAcceptanceReceipt" - }, - "type": "array" - }, - "active_subgoal_id": { - "type": [ - "string", - "null" - ] - }, - "churn": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyChurnState" - }, - { - "type": "null" - } - ] - }, - "graph_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphCheckpoint" - }, - { - "type": "null" - } - ] - }, - "graph_frontier": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphFrontier" - }, - { - "type": "null" - } - ] - }, - "graphs": { - "$ref": "#/definitions/EpiphanyGraphs" - }, - "invariants": { - "items": { - "$ref": "#/definitions/EpiphanyInvariant" - }, - "type": "array" - }, - "investigation_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "job_bindings": { - "items": { - "$ref": "#/definitions/EpiphanyJobBinding" - }, - "type": "array" - }, - "last_updated_turn_id": { - "type": [ - "string", - "null" - ] - }, - "mode": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeState" - }, - { - "type": "null" - } - ] - }, - "objective": { - "type": [ - "string", - "null" - ] - }, - "observations": { - "items": { - "$ref": "#/definitions/EpiphanyObservation" - }, - "type": "array" - }, - "planning": { - "$ref": "#/definitions/EpiphanyPlanningState" - }, - "recent_evidence": { - "items": { - "$ref": "#/definitions/EpiphanyEvidenceRecord" - }, - "type": "array" - }, - "retrieval": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalState" - }, - { - "type": "null" - } - ] - }, - "revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "runtime_links": { - "items": { - "$ref": "#/definitions/EpiphanyRuntimeLink" - }, - "type": "array" - }, - "scratch": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyScratchPad" - }, - { - "type": "null" - } - ] - }, - "subgoals": { - "items": { - "$ref": "#/definitions/EpiphanySubgoal" - }, - "type": "array" - } - }, - "required": [ - "revision" - ], - "type": "object" - }, "FileSystemAccessMode": { "enum": [ "read", @@ -2809,17 +1313,6 @@ "description": "Whether the thread is ephemeral and should not be materialized on disk.", "type": "boolean" }, - "epiphanyState": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyThreadState" - }, - { - "type": "null" - } - ], - "description": "Only populated on `thread/start`, `thread/resume`, `thread/fork`, `thread/read`, and notifications/responses that reuse those hydrated thread payloads." - }, "forkedFromId": { "description": "Source thread id when this thread was created by forking another thread.", "type": [ diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadStartedNotification.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadStartedNotification.json index fa1cb8d5..cf5cab13 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadStartedNotification.json +++ b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadStartedNotification.json @@ -390,1502 +390,6 @@ ], "type": "string" }, - "EpiphanyAcceptanceReceipt": { - "properties": { - "accepted_at": { - "type": "string" - }, - "accepted_evidence_id": { - "type": [ - "string", - "null" - ] - }, - "accepted_observation_id": { - "type": [ - "string", - "null" - ] - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "job_id": { - "type": "string" - }, - "result_id": { - "type": "string" - }, - "role_id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "accepted_at", - "binding_id", - "id", - "job_id", - "result_id", - "role_id", - "status", - "surface" - ], - "type": "object" - }, - "EpiphanyBacklogItem": { - "properties": { - "acceptance_sketch": { - "items": { - "type": "string" - }, - "type": "array" - }, - "blockers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": "string" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "duplicate_of": { - "type": [ - "string", - "null" - ] - }, - "evidence_refs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "horizon": { - "type": "string" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "lane_hints": { - "items": { - "type": "string" - }, - "type": "array" - }, - "priority": { - "$ref": "#/definitions/EpiphanyPlanningPriority" - }, - "product_area": { - "type": "string" - }, - "source_refs": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "horizon", - "id", - "kind", - "priority", - "product_area", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyChurnState": { - "properties": { - "diff_pressure": { - "type": "string" - }, - "graph_freshness": { - "type": [ - "string", - "null" - ] - }, - "understanding_status": { - "type": "string" - }, - "unexplained_writes": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "warning": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "diff_pressure", - "understanding_status" - ], - "type": "object" - }, - "EpiphanyCodeRef": { - "properties": { - "end_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "path": { - "type": "string" - }, - "start_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "symbol": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "path" - ], - "type": "object" - }, - "EpiphanyEvidenceRecord": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyGraph": { - "properties": { - "edges": { - "items": { - "$ref": "#/definitions/EpiphanyGraphEdge" - }, - "type": "array" - }, - "nodes": { - "items": { - "$ref": "#/definitions/EpiphanyGraphNode" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphCheckpoint": { - "properties": { - "checkpoint_id": { - "type": "string" - }, - "frontier_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graph_revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "graph_revision" - ], - "type": "object" - }, - "EpiphanyGraphEdge": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": [ - "string", - "null" - ] - }, - "kind": { - "type": "string" - }, - "label": { - "type": [ - "string", - "null" - ] - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "source_id": { - "type": "string" - }, - "target_id": { - "type": "string" - } - }, - "required": [ - "kind", - "source_id", - "target_id" - ], - "type": "object" - }, - "EpiphanyGraphFrontier": { - "properties": { - "active_edge_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "active_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphLink": { - "properties": { - "architecture_node_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "dataflow_node_id": { - "type": "string" - }, - "relationship": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "architecture_node_id", - "dataflow_node_id" - ], - "type": "object" - }, - "EpiphanyGraphNode": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "metaphor": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "status": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "title" - ], - "type": "object" - }, - "EpiphanyGraphs": { - "properties": { - "architecture": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "dataflow": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "links": { - "items": { - "$ref": "#/definitions/EpiphanyGraphLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyInvariant": { - "properties": { - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "rationale": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - } - }, - "required": [ - "description", - "id", - "status" - ], - "type": "object" - }, - "EpiphanyInvestigationCheckpoint": { - "properties": { - "captured_at_turn_id": { - "type": [ - "string", - "null" - ] - }, - "checkpoint_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "disposition": { - "$ref": "#/definitions/EpiphanyInvestigationDisposition" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "focus": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "next_action": { - "type": [ - "string", - "null" - ] - }, - "open_questions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "disposition", - "focus", - "kind" - ], - "type": "object" - }, - "EpiphanyInvestigationDisposition": { - "enum": [ - "resume_ready", - "regather_required" - ], - "type": "string" - }, - "EpiphanyJobBinding": { - "properties": { - "authority_scope": { - "type": [ - "string", - "null" - ] - }, - "blocking_reason": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "kind": { - "$ref": "#/definitions/EpiphanyJobKind" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "owner_role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "owner_role", - "scope" - ], - "type": "object" - }, - "EpiphanyJobKind": { - "enum": [ - "indexing", - "remap", - "verification", - "specialist" - ], - "type": "string" - }, - "EpiphanyModeKind": { - "enum": [ - "plan", - "default" - ], - "type": "string" - }, - "EpiphanyModeState": { - "properties": { - "kind": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeKind" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "EpiphanyObjectiveDraft": { - "properties": { - "acceptance_criteria": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "evidence_required": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "lane_plan": { - "$ref": "#/definitions/EpiphanyObjectiveDraftLanePlan" - }, - "review_gates": { - "items": { - "type": "string" - }, - "type": "array" - }, - "risks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "scope": { - "$ref": "#/definitions/EpiphanyObjectiveDraftScope" - }, - "source_item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "lane_plan", - "scope", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyObjectiveDraftLanePlan": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "eyes": { - "type": [ - "string", - "null" - ] - }, - "hands": { - "type": [ - "string", - "null" - ] - }, - "imagination": { - "type": [ - "string", - "null" - ] - }, - "life": { - "type": [ - "string", - "null" - ] - }, - "soul": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyObjectiveDraftScope": { - "properties": { - "excludes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "includes": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyObservation": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "source_kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "source_kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyPlanningCapture": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "confidence": { - "type": "string" - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "source": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "speaker": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "id", - "source", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyPlanningPriority": { - "properties": { - "blocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": [ - "string", - "null" - ] - }, - "effort": { - "type": [ - "string", - "null" - ] - }, - "impact": { - "type": [ - "string", - "null" - ] - }, - "rationale": { - "type": "string" - }, - "reason": { - "type": [ - "string", - "null" - ] - }, - "unblocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "urgency": { - "type": [ - "string", - "null" - ] - }, - "value": { - "type": "string" - } - }, - "required": [ - "rationale", - "value" - ], - "type": "object" - }, - "EpiphanyPlanningSourceRef": { - "properties": { - "assignees": { - "items": { - "type": "string" - }, - "type": "array" - }, - "author": { - "type": [ - "string", - "null" - ] - }, - "closed_at": { - "type": [ - "string", - "null" - ] - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "database_id": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "external_id": { - "type": [ - "string", - "null" - ] - }, - "imported_at": { - "type": [ - "string", - "null" - ] - }, - "is_pull_request": { - "type": [ - "boolean", - "null" - ] - }, - "issue_number": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "kind": { - "type": "string" - }, - "labels": { - "items": { - "type": "string" - }, - "type": "array" - }, - "milestone": { - "type": [ - "string", - "null" - ] - }, - "node_id": { - "type": [ - "string", - "null" - ] - }, - "provider": { - "type": [ - "string", - "null" - ] - }, - "repo": { - "type": [ - "string", - "null" - ] - }, - "state": { - "type": [ - "string", - "null" - ] - }, - "updated_at": { - "type": [ - "string", - "null" - ] - }, - "uri": { - "type": [ - "string", - "null" - ] - }, - "url": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "kind" - ], - "type": "object" - }, - "EpiphanyPlanningState": { - "properties": { - "backlog_items": { - "items": { - "$ref": "#/definitions/EpiphanyBacklogItem" - }, - "type": "array" - }, - "captures": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningCapture" - }, - "type": "array" - }, - "objective_drafts": { - "items": { - "$ref": "#/definitions/EpiphanyObjectiveDraft" - }, - "type": "array" - }, - "roadmap_streams": { - "items": { - "$ref": "#/definitions/EpiphanyRoadmapStream" - }, - "type": "array" - }, - "workspace_root": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyRetrievalShardSummary": { - "properties": { - "exact_available": { - "type": "boolean" - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "path_prefix": { - "type": "string" - }, - "semantic_available": { - "type": "boolean" - }, - "shard_id": { - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - } - }, - "required": [ - "path_prefix", - "shard_id" - ], - "type": "object" - }, - "EpiphanyRetrievalState": { - "properties": { - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "index_revision": { - "type": [ - "string", - "null" - ] - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "last_indexed_at_unix_seconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "semantic_available": { - "type": "boolean" - }, - "shards": { - "items": { - "$ref": "#/definitions/EpiphanyRetrievalShardSummary" - }, - "type": "array" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - }, - "workspace_root": { - "type": "string" - } - }, - "required": [ - "workspace_root" - ], - "type": "object" - }, - "EpiphanyRetrievalStatus": { - "enum": [ - "unavailable", - "ready", - "stale", - "indexing" - ], - "type": "string" - }, - "EpiphanyRoadmapStream": { - "properties": { - "blocked_by": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "near_term_focus": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "review_cadence": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyRuntimeLink": { - "properties": { - "authority_scope": { - "type": "string" - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "role_id": { - "type": "string" - }, - "runtime_job_id": { - "type": "string" - }, - "runtime_result_id": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "authority_scope", - "binding_id", - "id", - "role_id", - "runtime_job_id", - "surface" - ], - "type": "object" - }, - "EpiphanyScratchPad": { - "properties": { - "hypothesis": { - "type": [ - "string", - "null" - ] - }, - "next_probe": { - "type": [ - "string", - "null" - ] - }, - "notes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanySubgoal": { - "properties": { - "id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyThreadState": { - "properties": { - "acceptance_receipts": { - "items": { - "$ref": "#/definitions/EpiphanyAcceptanceReceipt" - }, - "type": "array" - }, - "active_subgoal_id": { - "type": [ - "string", - "null" - ] - }, - "churn": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyChurnState" - }, - { - "type": "null" - } - ] - }, - "graph_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphCheckpoint" - }, - { - "type": "null" - } - ] - }, - "graph_frontier": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphFrontier" - }, - { - "type": "null" - } - ] - }, - "graphs": { - "$ref": "#/definitions/EpiphanyGraphs" - }, - "invariants": { - "items": { - "$ref": "#/definitions/EpiphanyInvariant" - }, - "type": "array" - }, - "investigation_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "job_bindings": { - "items": { - "$ref": "#/definitions/EpiphanyJobBinding" - }, - "type": "array" - }, - "last_updated_turn_id": { - "type": [ - "string", - "null" - ] - }, - "mode": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeState" - }, - { - "type": "null" - } - ] - }, - "objective": { - "type": [ - "string", - "null" - ] - }, - "observations": { - "items": { - "$ref": "#/definitions/EpiphanyObservation" - }, - "type": "array" - }, - "planning": { - "$ref": "#/definitions/EpiphanyPlanningState" - }, - "recent_evidence": { - "items": { - "$ref": "#/definitions/EpiphanyEvidenceRecord" - }, - "type": "array" - }, - "retrieval": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalState" - }, - { - "type": "null" - } - ] - }, - "revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "runtime_links": { - "items": { - "$ref": "#/definitions/EpiphanyRuntimeLink" - }, - "type": "array" - }, - "scratch": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyScratchPad" - }, - { - "type": "null" - } - ] - }, - "subgoals": { - "items": { - "$ref": "#/definitions/EpiphanySubgoal" - }, - "type": "array" - } - }, - "required": [ - "revision" - ], - "type": "object" - }, "FileUpdateChange": { "properties": { "diff": { @@ -2305,17 +809,6 @@ "description": "Whether the thread is ephemeral and should not be materialized on disk.", "type": "boolean" }, - "epiphanyState": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyThreadState" - }, - { - "type": "null" - } - ], - "description": "Only populated on `thread/start`, `thread/resume`, `thread/fork`, `thread/read`, and notifications/responses that reuse those hydrated thread payloads." - }, "forkedFromId": { "description": "Source thread id when this thread was created by forking another thread.", "type": [ diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadUnarchiveResponse.json b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadUnarchiveResponse.json index 32a8f460..c32f4638 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadUnarchiveResponse.json +++ b/vendor/codex/codex-rs/app-server-protocol/schema/json/v2/ThreadUnarchiveResponse.json @@ -390,1502 +390,6 @@ ], "type": "string" }, - "EpiphanyAcceptanceReceipt": { - "properties": { - "accepted_at": { - "type": "string" - }, - "accepted_evidence_id": { - "type": [ - "string", - "null" - ] - }, - "accepted_observation_id": { - "type": [ - "string", - "null" - ] - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "job_id": { - "type": "string" - }, - "result_id": { - "type": "string" - }, - "role_id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "accepted_at", - "binding_id", - "id", - "job_id", - "result_id", - "role_id", - "status", - "surface" - ], - "type": "object" - }, - "EpiphanyBacklogItem": { - "properties": { - "acceptance_sketch": { - "items": { - "type": "string" - }, - "type": "array" - }, - "blockers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": "string" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "duplicate_of": { - "type": [ - "string", - "null" - ] - }, - "evidence_refs": { - "items": { - "type": "string" - }, - "type": "array" - }, - "horizon": { - "type": "string" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "lane_hints": { - "items": { - "type": "string" - }, - "type": "array" - }, - "priority": { - "$ref": "#/definitions/EpiphanyPlanningPriority" - }, - "product_area": { - "type": "string" - }, - "source_refs": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "horizon", - "id", - "kind", - "priority", - "product_area", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyChurnState": { - "properties": { - "diff_pressure": { - "type": "string" - }, - "graph_freshness": { - "type": [ - "string", - "null" - ] - }, - "understanding_status": { - "type": "string" - }, - "unexplained_writes": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "warning": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "diff_pressure", - "understanding_status" - ], - "type": "object" - }, - "EpiphanyCodeRef": { - "properties": { - "end_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "note": { - "type": [ - "string", - "null" - ] - }, - "path": { - "type": "string" - }, - "start_line": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "symbol": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "path" - ], - "type": "object" - }, - "EpiphanyEvidenceRecord": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyGraph": { - "properties": { - "edges": { - "items": { - "$ref": "#/definitions/EpiphanyGraphEdge" - }, - "type": "array" - }, - "nodes": { - "items": { - "$ref": "#/definitions/EpiphanyGraphNode" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphCheckpoint": { - "properties": { - "checkpoint_id": { - "type": "string" - }, - "frontier_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "graph_revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "graph_revision" - ], - "type": "object" - }, - "EpiphanyGraphEdge": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": [ - "string", - "null" - ] - }, - "kind": { - "type": "string" - }, - "label": { - "type": [ - "string", - "null" - ] - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "source_id": { - "type": "string" - }, - "target_id": { - "type": "string" - } - }, - "required": [ - "kind", - "source_id", - "target_id" - ], - "type": "object" - }, - "EpiphanyGraphFrontier": { - "properties": { - "active_edge_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "active_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_gap_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "open_question_ids": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyGraphLink": { - "properties": { - "architecture_node_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "dataflow_node_id": { - "type": "string" - }, - "relationship": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "architecture_node_id", - "dataflow_node_id" - ], - "type": "object" - }, - "EpiphanyGraphNode": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "mechanism": { - "type": [ - "string", - "null" - ] - }, - "metaphor": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "status": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "title" - ], - "type": "object" - }, - "EpiphanyGraphs": { - "properties": { - "architecture": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "dataflow": { - "$ref": "#/definitions/EpiphanyGraph" - }, - "links": { - "items": { - "$ref": "#/definitions/EpiphanyGraphLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyInvariant": { - "properties": { - "description": { - "type": "string" - }, - "id": { - "type": "string" - }, - "rationale": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - } - }, - "required": [ - "description", - "id", - "status" - ], - "type": "object" - }, - "EpiphanyInvestigationCheckpoint": { - "properties": { - "captured_at_turn_id": { - "type": [ - "string", - "null" - ] - }, - "checkpoint_id": { - "type": "string" - }, - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "disposition": { - "$ref": "#/definitions/EpiphanyInvestigationDisposition" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "focus": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "next_action": { - "type": [ - "string", - "null" - ] - }, - "open_questions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "checkpoint_id", - "disposition", - "focus", - "kind" - ], - "type": "object" - }, - "EpiphanyInvestigationDisposition": { - "enum": [ - "resume_ready", - "regather_required" - ], - "type": "string" - }, - "EpiphanyJobBinding": { - "properties": { - "authority_scope": { - "type": [ - "string", - "null" - ] - }, - "blocking_reason": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "kind": { - "$ref": "#/definitions/EpiphanyJobKind" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "owner_role": { - "type": "string" - }, - "scope": { - "type": "string" - } - }, - "required": [ - "id", - "kind", - "owner_role", - "scope" - ], - "type": "object" - }, - "EpiphanyJobKind": { - "enum": [ - "indexing", - "remap", - "verification", - "specialist" - ], - "type": "string" - }, - "EpiphanyModeKind": { - "enum": [ - "plan", - "default" - ], - "type": "string" - }, - "EpiphanyModeState": { - "properties": { - "kind": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeKind" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "EpiphanyObjectiveDraft": { - "properties": { - "acceptance_criteria": { - "items": { - "type": "string" - }, - "type": "array" - }, - "dependencies": { - "items": { - "type": "string" - }, - "type": "array" - }, - "evidence_required": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "lane_plan": { - "$ref": "#/definitions/EpiphanyObjectiveDraftLanePlan" - }, - "review_gates": { - "items": { - "type": "string" - }, - "type": "array" - }, - "risks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "scope": { - "$ref": "#/definitions/EpiphanyObjectiveDraftScope" - }, - "source_item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "lane_plan", - "scope", - "status", - "summary", - "title" - ], - "type": "object" - }, - "EpiphanyObjectiveDraftLanePlan": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "eyes": { - "type": [ - "string", - "null" - ] - }, - "hands": { - "type": [ - "string", - "null" - ] - }, - "imagination": { - "type": [ - "string", - "null" - ] - }, - "life": { - "type": [ - "string", - "null" - ] - }, - "soul": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyObjectiveDraftScope": { - "properties": { - "excludes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "includes": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "EpiphanyObservation": { - "properties": { - "code_refs": { - "items": { - "$ref": "#/definitions/EpiphanyCodeRef" - }, - "type": "array" - }, - "evidence_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "source_kind": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": "string" - } - }, - "required": [ - "id", - "source_kind", - "status", - "summary" - ], - "type": "object" - }, - "EpiphanyPlanningCapture": { - "properties": { - "body": { - "type": [ - "string", - "null" - ] - }, - "confidence": { - "type": "string" - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "id": { - "type": "string" - }, - "source": { - "$ref": "#/definitions/EpiphanyPlanningSourceRef" - }, - "speaker": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "title": { - "type": "string" - }, - "updated_at": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "confidence", - "id", - "source", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyPlanningPriority": { - "properties": { - "blocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "confidence": { - "type": [ - "string", - "null" - ] - }, - "effort": { - "type": [ - "string", - "null" - ] - }, - "impact": { - "type": [ - "string", - "null" - ] - }, - "rationale": { - "type": "string" - }, - "reason": { - "type": [ - "string", - "null" - ] - }, - "unblocks": { - "items": { - "type": "string" - }, - "type": "array" - }, - "urgency": { - "type": [ - "string", - "null" - ] - }, - "value": { - "type": "string" - } - }, - "required": [ - "rationale", - "value" - ], - "type": "object" - }, - "EpiphanyPlanningSourceRef": { - "properties": { - "assignees": { - "items": { - "type": "string" - }, - "type": "array" - }, - "author": { - "type": [ - "string", - "null" - ] - }, - "closed_at": { - "type": [ - "string", - "null" - ] - }, - "created_at": { - "type": [ - "string", - "null" - ] - }, - "database_id": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "external_id": { - "type": [ - "string", - "null" - ] - }, - "imported_at": { - "type": [ - "string", - "null" - ] - }, - "is_pull_request": { - "type": [ - "boolean", - "null" - ] - }, - "issue_number": { - "format": "uint64", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "kind": { - "type": "string" - }, - "labels": { - "items": { - "type": "string" - }, - "type": "array" - }, - "milestone": { - "type": [ - "string", - "null" - ] - }, - "node_id": { - "type": [ - "string", - "null" - ] - }, - "provider": { - "type": [ - "string", - "null" - ] - }, - "repo": { - "type": [ - "string", - "null" - ] - }, - "state": { - "type": [ - "string", - "null" - ] - }, - "updated_at": { - "type": [ - "string", - "null" - ] - }, - "uri": { - "type": [ - "string", - "null" - ] - }, - "url": { - "type": [ - "string", - "null" - ] - } - }, - "required": [ - "kind" - ], - "type": "object" - }, - "EpiphanyPlanningState": { - "properties": { - "backlog_items": { - "items": { - "$ref": "#/definitions/EpiphanyBacklogItem" - }, - "type": "array" - }, - "captures": { - "items": { - "$ref": "#/definitions/EpiphanyPlanningCapture" - }, - "type": "array" - }, - "objective_drafts": { - "items": { - "$ref": "#/definitions/EpiphanyObjectiveDraft" - }, - "type": "array" - }, - "roadmap_streams": { - "items": { - "$ref": "#/definitions/EpiphanyRoadmapStream" - }, - "type": "array" - }, - "workspace_root": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanyRetrievalShardSummary": { - "properties": { - "exact_available": { - "type": "boolean" - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "path_prefix": { - "type": "string" - }, - "semantic_available": { - "type": "boolean" - }, - "shard_id": { - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - } - }, - "required": [ - "path_prefix", - "shard_id" - ], - "type": "object" - }, - "EpiphanyRetrievalState": { - "properties": { - "dirty_paths": { - "items": { - "type": "string" - }, - "type": "array" - }, - "index_revision": { - "type": [ - "string", - "null" - ] - }, - "indexed_chunk_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "indexed_file_count": { - "format": "uint32", - "minimum": 0.0, - "type": [ - "integer", - "null" - ] - }, - "last_indexed_at_unix_seconds": { - "format": "int64", - "type": [ - "integer", - "null" - ] - }, - "semantic_available": { - "type": "boolean" - }, - "shards": { - "items": { - "$ref": "#/definitions/EpiphanyRetrievalShardSummary" - }, - "type": "array" - }, - "status": { - "allOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalStatus" - } - ], - "default": "unavailable" - }, - "workspace_root": { - "type": "string" - } - }, - "required": [ - "workspace_root" - ], - "type": "object" - }, - "EpiphanyRetrievalStatus": { - "enum": [ - "unavailable", - "ready", - "stale", - "indexing" - ], - "type": "string" - }, - "EpiphanyRoadmapStream": { - "properties": { - "blocked_by": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "item_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "near_term_focus": { - "type": [ - "string", - "null" - ] - }, - "purpose": { - "type": "string" - }, - "review_cadence": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "purpose", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyRuntimeLink": { - "properties": { - "authority_scope": { - "type": "string" - }, - "binding_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "linked_graph_node_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "linked_subgoal_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "role_id": { - "type": "string" - }, - "runtime_job_id": { - "type": "string" - }, - "runtime_result_id": { - "type": [ - "string", - "null" - ] - }, - "surface": { - "type": "string" - } - }, - "required": [ - "authority_scope", - "binding_id", - "id", - "role_id", - "runtime_job_id", - "surface" - ], - "type": "object" - }, - "EpiphanyScratchPad": { - "properties": { - "hypothesis": { - "type": [ - "string", - "null" - ] - }, - "next_probe": { - "type": [ - "string", - "null" - ] - }, - "notes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "summary": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - }, - "EpiphanySubgoal": { - "properties": { - "id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "summary": { - "type": [ - "string", - "null" - ] - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "status", - "title" - ], - "type": "object" - }, - "EpiphanyThreadState": { - "properties": { - "acceptance_receipts": { - "items": { - "$ref": "#/definitions/EpiphanyAcceptanceReceipt" - }, - "type": "array" - }, - "active_subgoal_id": { - "type": [ - "string", - "null" - ] - }, - "churn": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyChurnState" - }, - { - "type": "null" - } - ] - }, - "graph_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphCheckpoint" - }, - { - "type": "null" - } - ] - }, - "graph_frontier": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyGraphFrontier" - }, - { - "type": "null" - } - ] - }, - "graphs": { - "$ref": "#/definitions/EpiphanyGraphs" - }, - "invariants": { - "items": { - "$ref": "#/definitions/EpiphanyInvariant" - }, - "type": "array" - }, - "investigation_checkpoint": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyInvestigationCheckpoint" - }, - { - "type": "null" - } - ] - }, - "job_bindings": { - "items": { - "$ref": "#/definitions/EpiphanyJobBinding" - }, - "type": "array" - }, - "last_updated_turn_id": { - "type": [ - "string", - "null" - ] - }, - "mode": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyModeState" - }, - { - "type": "null" - } - ] - }, - "objective": { - "type": [ - "string", - "null" - ] - }, - "observations": { - "items": { - "$ref": "#/definitions/EpiphanyObservation" - }, - "type": "array" - }, - "planning": { - "$ref": "#/definitions/EpiphanyPlanningState" - }, - "recent_evidence": { - "items": { - "$ref": "#/definitions/EpiphanyEvidenceRecord" - }, - "type": "array" - }, - "retrieval": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyRetrievalState" - }, - { - "type": "null" - } - ] - }, - "revision": { - "format": "uint64", - "minimum": 0.0, - "type": "integer" - }, - "runtime_links": { - "items": { - "$ref": "#/definitions/EpiphanyRuntimeLink" - }, - "type": "array" - }, - "scratch": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyScratchPad" - }, - { - "type": "null" - } - ] - }, - "subgoals": { - "items": { - "$ref": "#/definitions/EpiphanySubgoal" - }, - "type": "array" - } - }, - "required": [ - "revision" - ], - "type": "object" - }, "FileUpdateChange": { "properties": { "diff": { @@ -2305,17 +809,6 @@ "description": "Whether the thread is ephemeral and should not be materialized on disk.", "type": "boolean" }, - "epiphanyState": { - "anyOf": [ - { - "$ref": "#/definitions/EpiphanyThreadState" - }, - { - "type": "null" - } - ], - "description": "Only populated on `thread/start`, `thread/resume`, `thread/fork`, `thread/read`, and notifications/responses that reuse those hydrated thread payloads." - }, "forkedFromId": { "description": "Source thread id when this thread was created by forking another thread.", "type": [ diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyAcceptanceReceipt.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyAcceptanceReceipt.ts deleted file mode 100644 index 547c1cad..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyAcceptanceReceipt.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type EpiphanyAcceptanceReceipt = { id: string, result_id: string, job_id: string, binding_id: string, surface: string, role_id: string, status: string, accepted_at: string, accepted_observation_id?: string | null, accepted_evidence_id?: string | null, summary?: string | null, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyChurnState.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyChurnState.ts deleted file mode 100644 index 25190bf4..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyChurnState.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type EpiphanyChurnState = { understanding_status: string, diff_pressure: string, graph_freshness?: string | null, warning?: string | null, unexplained_writes?: number | null, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyCodeRef.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyCodeRef.ts deleted file mode 100644 index ed3b2459..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyCodeRef.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type EpiphanyCodeRef = { path: string, start_line?: number | null, end_line?: number | null, symbol?: string | null, note?: string | null, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyEvidenceRecord.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyEvidenceRecord.ts deleted file mode 100644 index cab468f4..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyEvidenceRecord.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { EpiphanyCodeRef } from "./EpiphanyCodeRef"; - -export type EpiphanyEvidenceRecord = { id: string, kind: string, status: string, summary: string, code_refs?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraph.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraph.ts deleted file mode 100644 index 4ceed591..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraph.ts +++ /dev/null @@ -1,7 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { EpiphanyGraphEdge } from "./EpiphanyGraphEdge"; -import type { EpiphanyGraphNode } from "./EpiphanyGraphNode"; - -export type EpiphanyGraph = { nodes?: Array, edges?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphCheckpoint.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphCheckpoint.ts deleted file mode 100644 index a2eea953..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphCheckpoint.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type EpiphanyGraphCheckpoint = { checkpoint_id: string, graph_revision: bigint, summary?: string | null, frontier_node_ids?: Array, open_question_ids?: Array, open_gap_ids?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphEdge.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphEdge.ts deleted file mode 100644 index e830a66f..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphEdge.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type EpiphanyGraphEdge = { source_id: string, target_id: string, kind: string, id?: string | null, label?: string | null, mechanism?: string | null, code_refs?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphFrontier.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphFrontier.ts deleted file mode 100644 index 5804a077..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphFrontier.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type EpiphanyGraphFrontier = { active_node_ids?: Array, active_edge_ids?: Array, open_question_ids?: Array, open_gap_ids?: Array, dirty_paths?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphLink.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphLink.ts deleted file mode 100644 index 9d87d252..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphLink.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type EpiphanyGraphLink = { dataflow_node_id: string, architecture_node_id: string, relationship?: string | null, code_refs?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphNode.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphNode.ts deleted file mode 100644 index 79a88df5..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphNode.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type EpiphanyGraphNode = { id: string, title: string, purpose: string, mechanism?: string | null, metaphor?: string | null, status?: string | null, code_refs?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphs.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphs.ts deleted file mode 100644 index 3e6c5303..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyGraphs.ts +++ /dev/null @@ -1,7 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { EpiphanyGraph } from "./EpiphanyGraph"; -import type { EpiphanyGraphLink } from "./EpiphanyGraphLink"; - -export type EpiphanyGraphs = { architecture?: EpiphanyGraph, dataflow?: EpiphanyGraph, links?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyInvariant.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyInvariant.ts deleted file mode 100644 index 112e0ef3..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyInvariant.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type EpiphanyInvariant = { id: string, description: string, status: string, rationale?: string | null, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyInvestigationCheckpoint.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyInvestigationCheckpoint.ts deleted file mode 100644 index c22360a9..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyInvestigationCheckpoint.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { EpiphanyInvestigationDisposition } from "./EpiphanyInvestigationDisposition"; - -export type EpiphanyInvestigationCheckpoint = { checkpoint_id: string, kind: string, disposition: EpiphanyInvestigationDisposition, focus: string, summary?: string | null, next_action?: string | null, captured_at_turn_id?: string | null, open_questions?: Array, code_refs?: Array, evidence_ids?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyInvestigationDisposition.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyInvestigationDisposition.ts deleted file mode 100644 index 9c6d793b..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyInvestigationDisposition.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type EpiphanyInvestigationDisposition = "resume_ready" | "regather_required"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyJobBinding.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyJobBinding.ts deleted file mode 100644 index 4fca9986..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyJobBinding.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { EpiphanyJobKind } from "./EpiphanyJobKind"; - -export type EpiphanyJobBinding = { id: string, kind: EpiphanyJobKind, scope: string, owner_role: string, authority_scope?: string | null, linked_subgoal_ids?: Array, linked_graph_node_ids?: Array, blocking_reason?: string | null, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyJobKind.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyJobKind.ts deleted file mode 100644 index 6b89f8b1..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyJobKind.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type EpiphanyJobKind = "indexing" | "remap" | "verification" | "specialist"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyModeState.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyModeState.ts deleted file mode 100644 index d1505a42..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyModeState.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type EpiphanyModeState = { name: string, kind?: ModeKind | null, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyObservation.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyObservation.ts deleted file mode 100644 index bfe27df7..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyObservation.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { EpiphanyCodeRef } from "./EpiphanyCodeRef"; - -export type EpiphanyObservation = { id: string, summary: string, source_kind: string, status: string, code_refs?: Array, evidence_ids?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyPlanningState.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyPlanningState.ts deleted file mode 100644 index 2a3b9835..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyPlanningState.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type EpiphanyPlanningState = { workspace_root?: string | null, captures?: Array, backlog_items?: Array, roadmap_streams?: Array, objective_drafts?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyRetrievalStatus.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyRetrievalStatus.ts deleted file mode 100644 index 8e1b6616..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyRetrievalStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type EpiphanyRetrievalStatus = "unavailable" | "ready" | "stale" | "indexing"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyRuntimeLink.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyRuntimeLink.ts deleted file mode 100644 index 4abbf2f6..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyRuntimeLink.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type EpiphanyRuntimeLink = { id: string, binding_id: string, surface: string, role_id: string, authority_scope: string, runtime_job_id: string, runtime_result_id?: string | null, linked_subgoal_ids?: Array, linked_graph_node_ids?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyScratchPad.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyScratchPad.ts deleted file mode 100644 index 4489b165..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyScratchPad.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type EpiphanyScratchPad = { summary?: string | null, hypothesis?: string | null, next_probe?: string | null, notes?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanySubgoal.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanySubgoal.ts deleted file mode 100644 index 266818b6..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanySubgoal.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type EpiphanySubgoal = { id: string, title: string, status: string, summary?: string | null, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyThreadState.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyThreadState.ts deleted file mode 100644 index f447334d..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/EpiphanyThreadState.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type EpiphanyThreadState = { revision: bigint, objective?: string | null, active_subgoal_id?: string | null, subgoals?: Array, invariants?: Array, graphs?: EpiphanyGraphs, graph_frontier?: EpiphanyGraphFrontier | null, graph_checkpoint?: EpiphanyGraphCheckpoint | null, retrieval?: EpiphanyRetrievalState | null, scratch?: EpiphanyScratchPad | null, investigation_checkpoint?: EpiphanyInvestigationCheckpoint | null, job_bindings?: Array, acceptance_receipts?: Array, runtime_links?: Array, observations?: Array, recent_evidence?: Array, churn?: EpiphanyChurnState | null, mode?: EpiphanyModeState | null, planning?: EpiphanyPlanningState, last_updated_turn_id?: string | null, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/ServerNotification.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/ServerNotification.ts index 09438f44..d2edabb5 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/ServerNotification.ts +++ b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/ServerNotification.ts @@ -36,8 +36,6 @@ import type { ServerRequestResolvedNotification } from "./v2/ServerRequestResolv import type { TerminalInteractionNotification } from "./v2/TerminalInteractionNotification"; import type { ThreadArchivedNotification } from "./v2/ThreadArchivedNotification"; import type { ThreadClosedNotification } from "./v2/ThreadClosedNotification"; -import type { ThreadEpiphanyJobsUpdatedNotification } from "./v2/ThreadEpiphanyJobsUpdatedNotification"; -import type { ThreadEpiphanyStateUpdatedNotification } from "./v2/ThreadEpiphanyStateUpdatedNotification"; import type { ThreadNameUpdatedNotification } from "./v2/ThreadNameUpdatedNotification"; import type { ThreadRealtimeClosedNotification } from "./v2/ThreadRealtimeClosedNotification"; import type { ThreadRealtimeErrorNotification } from "./v2/ThreadRealtimeErrorNotification"; @@ -62,4 +60,4 @@ import type { WindowsWorldWritableWarningNotification } from "./v2/WindowsWorldW /** * Notification sent from the server to the client. */ -export type ServerNotification = { "method": "error", "params": ErrorNotification } | { "method": "thread/started", "params": ThreadStartedNotification } | { "method": "thread/status/changed", "params": ThreadStatusChangedNotification } | { "method": "thread/archived", "params": ThreadArchivedNotification } | { "method": "thread/unarchived", "params": ThreadUnarchivedNotification } | { "method": "thread/closed", "params": ThreadClosedNotification } | { "method": "thread/name/updated", "params": ThreadNameUpdatedNotification } | { "method": "thread/tokenUsage/updated", "params": ThreadTokenUsageUpdatedNotification } | { "method": "turn/started", "params": TurnStartedNotification } | { "method": "hook/started", "params": HookStartedNotification } | { "method": "turn/completed", "params": TurnCompletedNotification } | { "method": "hook/completed", "params": HookCompletedNotification } | { "method": "turn/diff/updated", "params": TurnDiffUpdatedNotification } | { "method": "turn/plan/updated", "params": TurnPlanUpdatedNotification } | { "method": "item/started", "params": ItemStartedNotification } | { "method": "item/autoApprovalReview/started", "params": ItemGuardianApprovalReviewStartedNotification } | { "method": "item/autoApprovalReview/completed", "params": ItemGuardianApprovalReviewCompletedNotification } | { "method": "item/completed", "params": ItemCompletedNotification } | { "method": "rawResponseItem/completed", "params": RawResponseItemCompletedNotification } | { "method": "item/agentMessage/delta", "params": AgentMessageDeltaNotification } | { "method": "item/plan/delta", "params": PlanDeltaNotification } | { "method": "command/exec/outputDelta", "params": CommandExecOutputDeltaNotification } | { "method": "item/commandExecution/outputDelta", "params": CommandExecutionOutputDeltaNotification } | { "method": "item/commandExecution/terminalInteraction", "params": TerminalInteractionNotification } | { "method": "item/fileChange/outputDelta", "params": FileChangeOutputDeltaNotification } | { "method": "item/fileChange/patchUpdated", "params": FileChangePatchUpdatedNotification } | { "method": "serverRequest/resolved", "params": ServerRequestResolvedNotification } | { "method": "item/mcpToolCall/progress", "params": McpToolCallProgressNotification } | { "method": "mcpServer/oauthLogin/completed", "params": McpServerOauthLoginCompletedNotification } | { "method": "mcpServer/startupStatus/updated", "params": McpServerStatusUpdatedNotification } | { "method": "account/updated", "params": AccountUpdatedNotification } | { "method": "account/rateLimits/updated", "params": AccountRateLimitsUpdatedNotification } | { "method": "fs/changed", "params": FsChangedNotification } | { "method": "item/reasoning/summaryTextDelta", "params": ReasoningSummaryTextDeltaNotification } | { "method": "item/reasoning/summaryPartAdded", "params": ReasoningSummaryPartAddedNotification } | { "method": "item/reasoning/textDelta", "params": ReasoningTextDeltaNotification } | { "method": "thread/compacted", "params": ContextCompactedNotification } | { "method": "model/rerouted", "params": ModelReroutedNotification } | { "method": "warning", "params": WarningNotification } | { "method": "guardianWarning", "params": GuardianWarningNotification } | { "method": "deprecationNotice", "params": DeprecationNoticeNotification } | { "method": "configWarning", "params": ConfigWarningNotification } | { "method": "thread/epiphany/stateUpdated", "params": ThreadEpiphanyStateUpdatedNotification } | { "method": "thread/epiphany/jobsUpdated", "params": ThreadEpiphanyJobsUpdatedNotification } | { "method": "fuzzyFileSearch/sessionUpdated", "params": FuzzyFileSearchSessionUpdatedNotification } | { "method": "fuzzyFileSearch/sessionCompleted", "params": FuzzyFileSearchSessionCompletedNotification } | { "method": "thread/realtime/started", "params": ThreadRealtimeStartedNotification } | { "method": "thread/realtime/itemAdded", "params": ThreadRealtimeItemAddedNotification } | { "method": "thread/realtime/transcript/delta", "params": ThreadRealtimeTranscriptDeltaNotification } | { "method": "thread/realtime/transcript/done", "params": ThreadRealtimeTranscriptDoneNotification } | { "method": "thread/realtime/outputAudio/delta", "params": ThreadRealtimeOutputAudioDeltaNotification } | { "method": "thread/realtime/sdp", "params": ThreadRealtimeSdpNotification } | { "method": "thread/realtime/error", "params": ThreadRealtimeErrorNotification } | { "method": "thread/realtime/closed", "params": ThreadRealtimeClosedNotification } | { "method": "windows/worldWritableWarning", "params": WindowsWorldWritableWarningNotification } | { "method": "windowsSandbox/setupCompleted", "params": WindowsSandboxSetupCompletedNotification } | { "method": "account/login/completed", "params": AccountLoginCompletedNotification }; +export type ServerNotification = { "method": "error", "params": ErrorNotification } | { "method": "thread/started", "params": ThreadStartedNotification } | { "method": "thread/status/changed", "params": ThreadStatusChangedNotification } | { "method": "thread/archived", "params": ThreadArchivedNotification } | { "method": "thread/unarchived", "params": ThreadUnarchivedNotification } | { "method": "thread/closed", "params": ThreadClosedNotification } | { "method": "thread/name/updated", "params": ThreadNameUpdatedNotification } | { "method": "thread/tokenUsage/updated", "params": ThreadTokenUsageUpdatedNotification } | { "method": "turn/started", "params": TurnStartedNotification } | { "method": "hook/started", "params": HookStartedNotification } | { "method": "turn/completed", "params": TurnCompletedNotification } | { "method": "hook/completed", "params": HookCompletedNotification } | { "method": "turn/diff/updated", "params": TurnDiffUpdatedNotification } | { "method": "turn/plan/updated", "params": TurnPlanUpdatedNotification } | { "method": "item/started", "params": ItemStartedNotification } | { "method": "item/autoApprovalReview/started", "params": ItemGuardianApprovalReviewStartedNotification } | { "method": "item/autoApprovalReview/completed", "params": ItemGuardianApprovalReviewCompletedNotification } | { "method": "item/completed", "params": ItemCompletedNotification } | { "method": "rawResponseItem/completed", "params": RawResponseItemCompletedNotification } | { "method": "item/agentMessage/delta", "params": AgentMessageDeltaNotification } | { "method": "item/plan/delta", "params": PlanDeltaNotification } | { "method": "command/exec/outputDelta", "params": CommandExecOutputDeltaNotification } | { "method": "item/commandExecution/outputDelta", "params": CommandExecutionOutputDeltaNotification } | { "method": "item/commandExecution/terminalInteraction", "params": TerminalInteractionNotification } | { "method": "item/fileChange/outputDelta", "params": FileChangeOutputDeltaNotification } | { "method": "item/fileChange/patchUpdated", "params": FileChangePatchUpdatedNotification } | { "method": "serverRequest/resolved", "params": ServerRequestResolvedNotification } | { "method": "item/mcpToolCall/progress", "params": McpToolCallProgressNotification } | { "method": "mcpServer/oauthLogin/completed", "params": McpServerOauthLoginCompletedNotification } | { "method": "mcpServer/startupStatus/updated", "params": McpServerStatusUpdatedNotification } | { "method": "account/updated", "params": AccountUpdatedNotification } | { "method": "account/rateLimits/updated", "params": AccountRateLimitsUpdatedNotification } | { "method": "fs/changed", "params": FsChangedNotification } | { "method": "item/reasoning/summaryTextDelta", "params": ReasoningSummaryTextDeltaNotification } | { "method": "item/reasoning/summaryPartAdded", "params": ReasoningSummaryPartAddedNotification } | { "method": "item/reasoning/textDelta", "params": ReasoningTextDeltaNotification } | { "method": "thread/compacted", "params": ContextCompactedNotification } | { "method": "model/rerouted", "params": ModelReroutedNotification } | { "method": "warning", "params": WarningNotification } | { "method": "guardianWarning", "params": GuardianWarningNotification } | { "method": "deprecationNotice", "params": DeprecationNoticeNotification } | { "method": "configWarning", "params": ConfigWarningNotification } | { "method": "fuzzyFileSearch/sessionUpdated", "params": FuzzyFileSearchSessionUpdatedNotification } | { "method": "fuzzyFileSearch/sessionCompleted", "params": FuzzyFileSearchSessionCompletedNotification } | { "method": "thread/realtime/started", "params": ThreadRealtimeStartedNotification } | { "method": "thread/realtime/itemAdded", "params": ThreadRealtimeItemAddedNotification } | { "method": "thread/realtime/transcript/delta", "params": ThreadRealtimeTranscriptDeltaNotification } | { "method": "thread/realtime/transcript/done", "params": ThreadRealtimeTranscriptDoneNotification } | { "method": "thread/realtime/outputAudio/delta", "params": ThreadRealtimeOutputAudioDeltaNotification } | { "method": "thread/realtime/sdp", "params": ThreadRealtimeSdpNotification } | { "method": "thread/realtime/error", "params": ThreadRealtimeErrorNotification } | { "method": "thread/realtime/closed", "params": ThreadRealtimeClosedNotification } | { "method": "windows/worldWritableWarning", "params": WindowsWorldWritableWarningNotification } | { "method": "windowsSandbox/setupCompleted", "params": WindowsSandboxSetupCompletedNotification } | { "method": "account/login/completed", "params": AccountLoginCompletedNotification }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/index.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/index.ts index ef43f9ea..7bbb417f 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/index.ts +++ b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/index.ts @@ -12,30 +12,6 @@ export type { CollaborationMode } from "./CollaborationMode"; export type { ContentItem } from "./ContentItem"; export type { ConversationGitInfo } from "./ConversationGitInfo"; export type { ConversationSummary } from "./ConversationSummary"; -export type { EpiphanyAcceptanceReceipt } from "./EpiphanyAcceptanceReceipt"; -export type { EpiphanyChurnState } from "./EpiphanyChurnState"; -export type { EpiphanyCodeRef } from "./EpiphanyCodeRef"; -export type { EpiphanyEvidenceRecord } from "./EpiphanyEvidenceRecord"; -export type { EpiphanyGraph } from "./EpiphanyGraph"; -export type { EpiphanyGraphCheckpoint } from "./EpiphanyGraphCheckpoint"; -export type { EpiphanyGraphEdge } from "./EpiphanyGraphEdge"; -export type { EpiphanyGraphFrontier } from "./EpiphanyGraphFrontier"; -export type { EpiphanyGraphLink } from "./EpiphanyGraphLink"; -export type { EpiphanyGraphNode } from "./EpiphanyGraphNode"; -export type { EpiphanyGraphs } from "./EpiphanyGraphs"; -export type { EpiphanyInvariant } from "./EpiphanyInvariant"; -export type { EpiphanyInvestigationCheckpoint } from "./EpiphanyInvestigationCheckpoint"; -export type { EpiphanyInvestigationDisposition } from "./EpiphanyInvestigationDisposition"; -export type { EpiphanyJobBinding } from "./EpiphanyJobBinding"; -export type { EpiphanyJobKind } from "./EpiphanyJobKind"; -export type { EpiphanyModeState } from "./EpiphanyModeState"; -export type { EpiphanyObservation } from "./EpiphanyObservation"; -export type { EpiphanyPlanningState } from "./EpiphanyPlanningState"; -export type { EpiphanyRetrievalStatus } from "./EpiphanyRetrievalStatus"; -export type { EpiphanyRuntimeLink } from "./EpiphanyRuntimeLink"; -export type { EpiphanyScratchPad } from "./EpiphanyScratchPad"; -export type { EpiphanySubgoal } from "./EpiphanySubgoal"; -export type { EpiphanyThreadState } from "./EpiphanyThreadState"; export type { ExecCommandApprovalParams } from "./ExecCommandApprovalParams"; export type { ExecCommandApprovalResponse } from "./ExecCommandApprovalResponse"; export type { ExecPolicyAmendment } from "./ExecPolicyAmendment"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/Thread.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/Thread.ts index 324805ac..8c4c9394 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/Thread.ts +++ b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/Thread.ts @@ -2,7 +2,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { AbsolutePathBuf } from "../AbsolutePathBuf"; -import type { EpiphanyThreadState } from "../EpiphanyThreadState"; import type { GitInfo } from "./GitInfo"; import type { SessionSource } from "./SessionSource"; import type { ThreadStatus } from "./ThreadStatus"; @@ -69,11 +68,6 @@ gitInfo: GitInfo | null, * Optional user-facing thread title. */ name: string | null, -/** - * Only populated on `thread/start`, `thread/resume`, `thread/fork`, `thread/read`, - * and notifications/responses that reuse those hydrated thread payloads. - */ -epiphanyState?: EpiphanyThreadState, /** * Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` * (when `includeTurns` is true) responses. diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyContext.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyContext.ts deleted file mode 100644 index 1dd87b2b..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyContext.ts +++ /dev/null @@ -1,11 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { EpiphanyEvidenceRecord } from "../EpiphanyEvidenceRecord"; -import type { EpiphanyGraphCheckpoint } from "../EpiphanyGraphCheckpoint"; -import type { EpiphanyGraphFrontier } from "../EpiphanyGraphFrontier"; -import type { EpiphanyInvestigationCheckpoint } from "../EpiphanyInvestigationCheckpoint"; -import type { EpiphanyObservation } from "../EpiphanyObservation"; -import type { ThreadEpiphanyGraphContext } from "./ThreadEpiphanyGraphContext"; - -export type ThreadEpiphanyContext = { graph: ThreadEpiphanyGraphContext, frontier?: EpiphanyGraphFrontier | null, checkpoint?: EpiphanyGraphCheckpoint | null, investigationCheckpoint?: EpiphanyInvestigationCheckpoint | null, observations?: Array, evidence?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyContextMissing.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyContextMissing.ts deleted file mode 100644 index 1e7e307c..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyContextMissing.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyContextMissing = { graphNodeIds?: Array, graphEdgeIds?: Array, observationIds?: Array, evidenceIds?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyContextSource.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyContextSource.ts deleted file mode 100644 index d0d0c4cc..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyContextSource.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyContextSource = "stored" | "live"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyContextStateStatus.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyContextStateStatus.ts deleted file mode 100644 index ac95dc0c..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyContextStateStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyContextStateStatus = "missing" | "ready"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyCoordinatorAction.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyCoordinatorAction.ts deleted file mode 100644 index 1120ebeb..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyCoordinatorAction.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyCoordinatorAction = "prepareCheckpoint" | "compactRehydrateReorient" | "launchReorientWorker" | "waitForReorientWorker" | "reviewReorientResult" | "regatherManually" | "launchResearch" | "reviewResearchResult" | "launchModeling" | "reviewModelingResult" | "launchVerification" | "reviewVerificationResult" | "continueImplementation"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyCoordinatorSignals.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyCoordinatorSignals.ts deleted file mode 100644 index d77a8722..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyCoordinatorSignals.ts +++ /dev/null @@ -1,10 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadEpiphanyCrrcAction } from "./ThreadEpiphanyCrrcAction"; -import type { ThreadEpiphanyPressureLevel } from "./ThreadEpiphanyPressureLevel"; -import type { ThreadEpiphanyReorientAction } from "./ThreadEpiphanyReorientAction"; -import type { ThreadEpiphanyReorientResultStatus } from "./ThreadEpiphanyReorientResultStatus"; -import type { ThreadEpiphanyRoleResultStatus } from "./ThreadEpiphanyRoleResultStatus"; - -export type ThreadEpiphanyCoordinatorSignals = { pressureLevel: ThreadEpiphanyPressureLevel, shouldPrepareCompaction: boolean, reorientAction: ThreadEpiphanyReorientAction, crrcAction: ThreadEpiphanyCrrcAction, researchResultStatus: ThreadEpiphanyRoleResultStatus, modelingResultStatus: ThreadEpiphanyRoleResultStatus, verificationResultStatus: ThreadEpiphanyRoleResultStatus, reorientResultStatus: ThreadEpiphanyReorientResultStatus, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyCrrcAction.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyCrrcAction.ts deleted file mode 100644 index 77e743e0..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyCrrcAction.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyCrrcAction = "continue" | "prepareCheckpoint" | "launchReorientWorker" | "waitForReorientWorker" | "reviewReorientResult" | "acceptReorientResult" | "regatherManually"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyCrrcRecommendation.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyCrrcRecommendation.ts deleted file mode 100644 index c2461d11..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyCrrcRecommendation.ts +++ /dev/null @@ -1,7 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadEpiphanyCrrcAction } from "./ThreadEpiphanyCrrcAction"; -import type { ThreadEpiphanySceneAction } from "./ThreadEpiphanySceneAction"; - -export type ThreadEpiphanyCrrcRecommendation = { action: ThreadEpiphanyCrrcAction, recommendedSceneAction?: ThreadEpiphanySceneAction | null, reason: string, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyFreshnessSource.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyFreshnessSource.ts deleted file mode 100644 index 0a69a9f0..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyFreshnessSource.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyFreshnessSource = "stored" | "live"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphContext.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphContext.ts deleted file mode 100644 index 148c108c..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphContext.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { EpiphanyGraphEdge } from "../EpiphanyGraphEdge"; -import type { EpiphanyGraphLink } from "../EpiphanyGraphLink"; -import type { EpiphanyGraphNode } from "../EpiphanyGraphNode"; - -export type ThreadEpiphanyGraphContext = { architectureNodes?: Array, architectureEdges?: Array, dataflowNodes?: Array, dataflowEdges?: Array, links?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphFreshness.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphFreshness.ts deleted file mode 100644 index 45263f28..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphFreshness.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadEpiphanyGraphFreshnessStatus } from "./ThreadEpiphanyGraphFreshnessStatus"; - -export type ThreadEpiphanyGraphFreshness = { status: ThreadEpiphanyGraphFreshnessStatus, graphFreshness?: string | null, checkpointId?: string | null, dirtyPathCount: number, dirtyPaths?: Array, openQuestionCount: number, openGapCount: number, note: string, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphFreshnessStatus.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphFreshnessStatus.ts deleted file mode 100644 index 4c4fcf17..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphFreshnessStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyGraphFreshnessStatus = "missing" | "ready" | "stale"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQuery.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQuery.ts deleted file mode 100644 index 2f89b6b6..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQuery.ts +++ /dev/null @@ -1,19 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadEpiphanyGraphQueryDirection } from "./ThreadEpiphanyGraphQueryDirection"; -import type { ThreadEpiphanyGraphQueryKind } from "./ThreadEpiphanyGraphQueryKind"; - -export type ThreadEpiphanyGraphQuery = { kind: ThreadEpiphanyGraphQueryKind, nodeIds?: Array, edgeIds?: Array, paths?: Array, symbols?: Array, edgeKinds?: Array, -/** - * Defaults to `both`. - */ -direction?: ThreadEpiphanyGraphQueryDirection | null, -/** - * Defaults to 1 and is capped by the server. - */ -depth?: number | null, -/** - * Defaults to true so neighborhood queries preserve dataflow/architecture joins. - */ -includeLinks?: boolean | null, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQueryDirection.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQueryDirection.ts deleted file mode 100644 index e7cd599e..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQueryDirection.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyGraphQueryDirection = "incoming" | "outgoing" | "both"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQueryKind.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQueryKind.ts deleted file mode 100644 index 12675ef8..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQueryKind.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyGraphQueryKind = "node" | "path" | "frontierNeighborhood" | "neighbors"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQueryMatched.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQueryMatched.ts deleted file mode 100644 index 1446c2f3..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQueryMatched.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyGraphQueryMatched = { nodeIds?: Array, edgeIds?: Array, paths?: Array, symbols?: Array, edgeKinds?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQueryMissing.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQueryMissing.ts deleted file mode 100644 index 136eaf84..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyGraphQueryMissing.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyGraphQueryMissing = { nodeIds?: Array, edgeIds?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyInvalidationInput.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyInvalidationInput.ts deleted file mode 100644 index bdc061a7..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyInvalidationInput.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadEpiphanyInvalidationStatus } from "./ThreadEpiphanyInvalidationStatus"; - -export type ThreadEpiphanyInvalidationInput = { status: ThreadEpiphanyInvalidationStatus, watchedRoot?: string | null, observedAtUnixSeconds?: bigint | null, changedPathCount: number, changedPaths?: Array, graphNodeIds?: Array, activeFrontierNodeIds?: Array, note: string, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyInvalidationStatus.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyInvalidationStatus.ts deleted file mode 100644 index fb7c93a9..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyInvalidationStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyInvalidationStatus = "unavailable" | "clean" | "changed"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJob.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJob.ts deleted file mode 100644 index 59269af3..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJob.ts +++ /dev/null @@ -1,7 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadEpiphanyJobKind } from "./ThreadEpiphanyJobKind"; -import type { ThreadEpiphanyJobStatus } from "./ThreadEpiphanyJobStatus"; - -export type ThreadEpiphanyJob = { id: string, kind: ThreadEpiphanyJobKind, scope: string, ownerRole: string, launcherJobId?: string | null, authorityScope?: string | null, backendJobId?: string | null, status: ThreadEpiphanyJobStatus, itemsProcessed?: number | null, itemsTotal?: number | null, progressNote?: string | null, lastCheckpointAtUnixSeconds?: bigint | null, blockingReason?: string | null, activeThreadIds?: Array, linkedSubgoalIds?: Array, linkedGraphNodeIds?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobKind.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobKind.ts deleted file mode 100644 index 8248f423..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobKind.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyJobKind = "indexing" | "remap" | "verification" | "specialist"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobStatus.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobStatus.ts deleted file mode 100644 index caf52792..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyJobStatus = "idle" | "needed" | "pending" | "running" | "completed" | "failed" | "cancelled" | "blocked" | "unavailable"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobsUpdatedNotification.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobsUpdatedNotification.ts deleted file mode 100644 index 68e1a19f..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobsUpdatedNotification.ts +++ /dev/null @@ -1,7 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadEpiphanyJob } from "./ThreadEpiphanyJob"; -import type { ThreadEpiphanyJobsUpdatedSource } from "./ThreadEpiphanyJobsUpdatedSource"; - -export type ThreadEpiphanyJobsUpdatedNotification = { threadId: string, source: ThreadEpiphanyJobsUpdatedSource, stateRevision?: bigint | null, jobs?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobsUpdatedSource.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobsUpdatedSource.ts deleted file mode 100644 index a0768dc8..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyJobsUpdatedSource.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyJobsUpdatedSource = "runtimeProgress"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPlanningSummary.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPlanningSummary.ts deleted file mode 100644 index e49b7046..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPlanningSummary.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyPlanningSummary = { captureCount: number, pendingCaptureCount: number, githubIssueCaptureCount: number, backlogItemCount: number, readyBacklogItemCount: number, roadmapStreamCount: number, objectiveDraftCount: number, draftObjectiveCount: number, activeObjective?: string | null, note: string, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPressure.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPressure.ts deleted file mode 100644 index 56ca6986..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPressure.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadEpiphanyPressureBasis } from "./ThreadEpiphanyPressureBasis"; -import type { ThreadEpiphanyPressureLevel } from "./ThreadEpiphanyPressureLevel"; -import type { ThreadEpiphanyPressureStatus } from "./ThreadEpiphanyPressureStatus"; - -export type ThreadEpiphanyPressure = { status: ThreadEpiphanyPressureStatus, level: ThreadEpiphanyPressureLevel, basis: ThreadEpiphanyPressureBasis, usedTokens?: bigint | null, modelContextWindow?: bigint | null, modelAutoCompactTokenLimit?: bigint | null, remainingTokens?: bigint | null, ratioPerMille?: number | null, shouldPrepareCompaction: boolean, note: string, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPressureBasis.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPressureBasis.ts deleted file mode 100644 index e6fb3736..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPressureBasis.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyPressureBasis = "unknown" | "autoCompactLimit" | "modelContextWindow"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPressureLevel.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPressureLevel.ts deleted file mode 100644 index 71b67cff..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPressureLevel.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyPressureLevel = "unknown" | "low" | "elevated" | "high" | "critical"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPressureStatus.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPressureStatus.ts deleted file mode 100644 index 0f19fe57..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyPressureStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyPressureStatus = "unknown" | "ready"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientAction.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientAction.ts deleted file mode 100644 index 0f25e4d5..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientAction.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyReorientAction = "resume" | "regather"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientCheckpointStatus.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientCheckpointStatus.ts deleted file mode 100644 index 8df8b4b4..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientCheckpointStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyReorientCheckpointStatus = "missing" | "resumeReady" | "regatherRequired"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientDecision.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientDecision.ts deleted file mode 100644 index ace35b69..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientDecision.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadEpiphanyGraphFreshnessStatus } from "./ThreadEpiphanyGraphFreshnessStatus"; -import type { ThreadEpiphanyInvalidationStatus } from "./ThreadEpiphanyInvalidationStatus"; -import type { ThreadEpiphanyPressureLevel } from "./ThreadEpiphanyPressureLevel"; -import type { ThreadEpiphanyReorientAction } from "./ThreadEpiphanyReorientAction"; -import type { ThreadEpiphanyReorientCheckpointStatus } from "./ThreadEpiphanyReorientCheckpointStatus"; -import type { ThreadEpiphanyReorientReason } from "./ThreadEpiphanyReorientReason"; -import type { ThreadEpiphanyRetrievalFreshnessStatus } from "./ThreadEpiphanyRetrievalFreshnessStatus"; - -export type ThreadEpiphanyReorientDecision = { action: ThreadEpiphanyReorientAction, checkpointStatus: ThreadEpiphanyReorientCheckpointStatus, checkpointId?: string | null, pressureLevel: ThreadEpiphanyPressureLevel, retrievalStatus: ThreadEpiphanyRetrievalFreshnessStatus, graphStatus: ThreadEpiphanyGraphFreshnessStatus, watcherStatus: ThreadEpiphanyInvalidationStatus, reasons?: Array, checkpointDirtyPaths?: Array, checkpointChangedPaths?: Array, activeFrontierNodeIds?: Array, nextAction: string, note: string, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientFinding.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientFinding.ts deleted file mode 100644 index 9253f9f1..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientFinding.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyReorientFinding = { mode?: string | null, summary?: string | null, nextSafeMove?: string | null, checkpointStillValid?: boolean | null, filesInspected?: Array, frontierNodeIds?: Array, evidenceIds?: Array, artifactRefs?: Array, runtimeResultId?: string | null, runtimeJobId?: string | null, jobError?: string | null, itemError?: string | null, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientReason.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientReason.ts deleted file mode 100644 index 57d38b14..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientReason.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyReorientReason = "missingState" | "missingCheckpoint" | "checkpointRequestedRegather" | "checkpointPathsDirty" | "checkpointPathsChanged" | "frontierChanged" | "unanchoredCheckpointWhileStateStale" | "checkpointReady"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientResultStatus.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientResultStatus.ts deleted file mode 100644 index 86d89ed1..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientResultStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyReorientResultStatus = "missingState" | "missingBinding" | "backendUnavailable" | "backendMissing" | "pending" | "running" | "completed" | "failed" | "cancelled"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientSource.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientSource.ts deleted file mode 100644 index a5adcd71..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientSource.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyReorientSource = "stored" | "live"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientStateStatus.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientStateStatus.ts deleted file mode 100644 index 23429719..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyReorientStateStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyReorientStateStatus = "missing" | "ready"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRetrievalFreshness.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRetrievalFreshness.ts deleted file mode 100644 index 849e4c4e..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRetrievalFreshness.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadEpiphanyRetrievalFreshnessStatus } from "./ThreadEpiphanyRetrievalFreshnessStatus"; - -export type ThreadEpiphanyRetrievalFreshness = { status: ThreadEpiphanyRetrievalFreshnessStatus, semanticAvailable?: boolean | null, lastIndexedAtUnixSeconds?: bigint | null, indexedFileCount?: number | null, indexedChunkCount?: number | null, dirtyPaths?: Array, note: string, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRetrievalFreshnessStatus.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRetrievalFreshnessStatus.ts deleted file mode 100644 index cc18e5fb..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRetrievalFreshnessStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyRetrievalFreshnessStatus = "missing" | "ready" | "stale" | "indexing" | "unavailable"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleFinding.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleFinding.ts deleted file mode 100644 index 41be3a06..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleFinding.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadEpiphanyRoleId } from "./ThreadEpiphanyRoleId"; -import type { ThreadEpiphanyRoleSelfPersistenceReview } from "./ThreadEpiphanyRoleSelfPersistenceReview"; -import type { ThreadEpiphanyUpdatePatch } from "./ThreadEpiphanyUpdatePatch"; - -export type ThreadEpiphanyRoleFinding = { roleId: ThreadEpiphanyRoleId, verdict?: string | null, summary?: string | null, nextSafeMove?: string | null, checkpointSummary?: string | null, scratchSummary?: string | null, filesInspected?: Array, frontierNodeIds?: Array, evidenceIds?: Array, artifactRefs?: Array, runtimeResultId?: string | null, runtimeJobId?: string | null, openQuestions?: Array, evidenceGaps?: Array, risks?: Array, statePatch?: ThreadEpiphanyUpdatePatch | null, selfPatch?: unknown, selfPersistence?: ThreadEpiphanyRoleSelfPersistenceReview | null, jobError?: string | null, itemError?: string | null, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleId.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleId.ts deleted file mode 100644 index 2b4487eb..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleId.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyRoleId = "implementation" | "imagination" | "research" | "modeling" | "verification" | "reorientation"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleLane.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleLane.ts deleted file mode 100644 index 8bda0afb..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleLane.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadEpiphanyJob } from "./ThreadEpiphanyJob"; -import type { ThreadEpiphanyRoleId } from "./ThreadEpiphanyRoleId"; -import type { ThreadEpiphanyRoleStatus } from "./ThreadEpiphanyRoleStatus"; -import type { ThreadEpiphanySceneAction } from "./ThreadEpiphanySceneAction"; - -export type ThreadEpiphanyRoleLane = { id: ThreadEpiphanyRoleId, title: string, ownerRole: string, status: ThreadEpiphanyRoleStatus, note: string, jobs?: Array, authorityScopes?: Array, recommendedAction?: ThreadEpiphanySceneAction | null, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleResultStatus.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleResultStatus.ts deleted file mode 100644 index 7b1cbf74..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleResultStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyRoleResultStatus = "missingState" | "missingBinding" | "backendUnavailable" | "backendMissing" | "pending" | "running" | "completed" | "failed" | "cancelled"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleSelfPersistenceReview.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleSelfPersistenceReview.ts deleted file mode 100644 index fcad0d38..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleSelfPersistenceReview.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadEpiphanyRoleSelfPersistenceStatus } from "./ThreadEpiphanyRoleSelfPersistenceStatus"; - -export type ThreadEpiphanyRoleSelfPersistenceReview = { status: ThreadEpiphanyRoleSelfPersistenceStatus, targetAgentId?: string | null, targetPath?: string | null, reasons?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleSelfPersistenceStatus.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleSelfPersistenceStatus.ts deleted file mode 100644 index a8bdb028..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleSelfPersistenceStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyRoleSelfPersistenceStatus = "missing" | "accepted" | "rejected"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleStatus.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleStatus.ts deleted file mode 100644 index 211ab5d5..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRoleStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyRoleStatus = "ready" | "needed" | "blocked" | "running" | "completed" | "waiting" | "review" | "unavailable"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRolesSource.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRolesSource.ts deleted file mode 100644 index dbdb0c53..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyRolesSource.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyRolesSource = "stored" | "live"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyScene.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyScene.ts deleted file mode 100644 index da59f728..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyScene.ts +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadEpiphanySceneAction } from "./ThreadEpiphanySceneAction"; -import type { ThreadEpiphanySceneChurn } from "./ThreadEpiphanySceneChurn"; -import type { ThreadEpiphanySceneGraph } from "./ThreadEpiphanySceneGraph"; -import type { ThreadEpiphanySceneInvestigationCheckpoint } from "./ThreadEpiphanySceneInvestigationCheckpoint"; -import type { ThreadEpiphanySceneRecords } from "./ThreadEpiphanySceneRecords"; -import type { ThreadEpiphanySceneRetrieval } from "./ThreadEpiphanySceneRetrieval"; -import type { ThreadEpiphanySceneSource } from "./ThreadEpiphanySceneSource"; -import type { ThreadEpiphanySceneStateStatus } from "./ThreadEpiphanySceneStateStatus"; -import type { ThreadEpiphanySceneStatusCount } from "./ThreadEpiphanySceneStatusCount"; -import type { ThreadEpiphanySceneSubgoal } from "./ThreadEpiphanySceneSubgoal"; - -export type ThreadEpiphanyScene = { stateStatus: ThreadEpiphanySceneStateStatus, source: ThreadEpiphanySceneSource, revision?: bigint | null, objective?: string | null, activeSubgoal?: ThreadEpiphanySceneSubgoal | null, subgoals?: Array, invariantStatusCounts?: Array, graph: ThreadEpiphanySceneGraph, retrieval?: ThreadEpiphanySceneRetrieval | null, investigationCheckpoint?: ThreadEpiphanySceneInvestigationCheckpoint | null, observations: ThreadEpiphanySceneRecords, evidence: ThreadEpiphanySceneRecords, churn?: ThreadEpiphanySceneChurn | null, availableActions?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneAction.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneAction.ts deleted file mode 100644 index 65c18523..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneAction.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanySceneAction = "index" | "retrieve" | "distill" | "context" | "planning" | "graphQuery" | "jobs" | "roles" | "coordinator" | "roleLaunch" | "roleResult" | "roleAccept" | "jobLaunch" | "jobInterrupt" | "freshness" | "pressure" | "reorient" | "crrc" | "reorientLaunch" | "reorientResult" | "reorientAccept" | "propose" | "promote" | "update"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneChurn.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneChurn.ts deleted file mode 100644 index a999aacb..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneChurn.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanySceneChurn = { understandingStatus: string, diffPressure: string, graphFreshness?: string | null, warning?: string | null, unexplainedWrites?: number | null, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneGraph.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneGraph.ts deleted file mode 100644 index a7646933..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneGraph.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanySceneGraph = { architectureNodeCount: number, architectureEdgeCount: number, dataflowNodeCount: number, dataflowEdgeCount: number, linkCount: number, activeNodeIds?: Array, activeEdgeIds?: Array, openQuestionCount: number, openGapCount: number, dirtyPaths?: Array, checkpointId?: string | null, checkpointSummary?: string | null, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneInvestigationCheckpoint.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneInvestigationCheckpoint.ts deleted file mode 100644 index 0061f664..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneInvestigationCheckpoint.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { EpiphanyInvestigationDisposition } from "../EpiphanyInvestigationDisposition"; - -export type ThreadEpiphanySceneInvestigationCheckpoint = { checkpointId: string, kind: string, disposition: EpiphanyInvestigationDisposition, focus: string, summary?: string | null, nextAction?: string | null, capturedAtTurnId?: string | null, openQuestionCount: number, codeRefCount: number, evidenceCount: number, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneRecord.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneRecord.ts deleted file mode 100644 index ebf5e2a5..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneRecord.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanySceneRecord = { id: string, kind: string, status: string, summary: string, codeRefCount: number, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneRecords.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneRecords.ts deleted file mode 100644 index 48a18d6b..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneRecords.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadEpiphanySceneRecord } from "./ThreadEpiphanySceneRecord"; - -export type ThreadEpiphanySceneRecords = { totalCount: number, latest?: Array, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneRetrieval.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneRetrieval.ts deleted file mode 100644 index 9e0b664a..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneRetrieval.ts +++ /dev/null @@ -1,6 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { EpiphanyRetrievalStatus } from "../EpiphanyRetrievalStatus"; - -export type ThreadEpiphanySceneRetrieval = { workspaceRoot: string, status: EpiphanyRetrievalStatus, semanticAvailable: boolean, indexRevision?: string | null, indexedFileCount?: number | null, indexedChunkCount?: number | null, shardCount: number, dirtyPathCount: number, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneSource.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneSource.ts deleted file mode 100644 index b48ed8ff..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneSource.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanySceneSource = "stored" | "live"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneStateStatus.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneStateStatus.ts deleted file mode 100644 index f0893b27..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneStateStatus.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanySceneStateStatus = "missing" | "ready"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneStatusCount.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneStatusCount.ts deleted file mode 100644 index ab72424a..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneStatusCount.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanySceneStatusCount = { status: string, count: number, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneSubgoal.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneSubgoal.ts deleted file mode 100644 index 442019d6..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanySceneSubgoal.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanySceneSubgoal = { id: string, title: string, status: string, summary?: string | null, active: boolean, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyStateUpdatedField.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyStateUpdatedField.ts deleted file mode 100644 index b0a77bb2..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyStateUpdatedField.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyStateUpdatedField = "objective" | "activeSubgoalId" | "subgoals" | "invariants" | "graphs" | "graphFrontier" | "graphCheckpoint" | "scratch" | "investigationCheckpoint" | "jobBindings" | "acceptanceReceipts" | "runtimeLinks" | "observations" | "evidence" | "churn" | "mode" | "planning"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyStateUpdatedNotification.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyStateUpdatedNotification.ts deleted file mode 100644 index a6dd67c6..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyStateUpdatedNotification.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { EpiphanyThreadState } from "../EpiphanyThreadState"; -import type { ThreadEpiphanyStateUpdatedField } from "./ThreadEpiphanyStateUpdatedField"; -import type { ThreadEpiphanyStateUpdatedSource } from "./ThreadEpiphanyStateUpdatedSource"; - -export type ThreadEpiphanyStateUpdatedNotification = { threadId: string, source: ThreadEpiphanyStateUpdatedSource, revision: bigint, changedFields: Array, epiphanyState: EpiphanyThreadState, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyStateUpdatedSource.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyStateUpdatedSource.ts deleted file mode 100644 index 3084f6fb..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyStateUpdatedSource.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyStateUpdatedSource = "update" | "promote" | "jobLaunch" | "jobInterrupt" | "reorientAccept" | "roleAccept"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyUpdatePatch.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyUpdatePatch.ts deleted file mode 100644 index 2b1795ab..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyUpdatePatch.ts +++ /dev/null @@ -1,20 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { EpiphanyAcceptanceReceipt } from "../EpiphanyAcceptanceReceipt"; -import type { EpiphanyChurnState } from "../EpiphanyChurnState"; -import type { EpiphanyEvidenceRecord } from "../EpiphanyEvidenceRecord"; -import type { EpiphanyGraphCheckpoint } from "../EpiphanyGraphCheckpoint"; -import type { EpiphanyGraphFrontier } from "../EpiphanyGraphFrontier"; -import type { EpiphanyGraphs } from "../EpiphanyGraphs"; -import type { EpiphanyInvariant } from "../EpiphanyInvariant"; -import type { EpiphanyInvestigationCheckpoint } from "../EpiphanyInvestigationCheckpoint"; -import type { EpiphanyJobBinding } from "../EpiphanyJobBinding"; -import type { EpiphanyModeState } from "../EpiphanyModeState"; -import type { EpiphanyObservation } from "../EpiphanyObservation"; -import type { EpiphanyPlanningState } from "../EpiphanyPlanningState"; -import type { EpiphanyRuntimeLink } from "../EpiphanyRuntimeLink"; -import type { EpiphanyScratchPad } from "../EpiphanyScratchPad"; -import type { EpiphanySubgoal } from "../EpiphanySubgoal"; - -export type ThreadEpiphanyUpdatePatch = { objective?: string | null, activeSubgoalId?: string | null, subgoals?: Array | null, invariants?: Array | null, graphs?: EpiphanyGraphs | null, graphFrontier?: EpiphanyGraphFrontier | null, graphCheckpoint?: EpiphanyGraphCheckpoint | null, scratch?: EpiphanyScratchPad | null, investigationCheckpoint?: EpiphanyInvestigationCheckpoint | null, jobBindings?: Array | null, acceptanceReceipts?: Array, runtimeLinks?: Array, observations?: Array, evidence?: Array, churn?: EpiphanyChurnState | null, mode?: EpiphanyModeState | null, planning?: EpiphanyPlanningState | null, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewCoordinator.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewCoordinator.ts deleted file mode 100644 index 3f6f25c7..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewCoordinator.ts +++ /dev/null @@ -1,12 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadEpiphanyCoordinatorAction } from "./ThreadEpiphanyCoordinatorAction"; -import type { ThreadEpiphanyCoordinatorSignals } from "./ThreadEpiphanyCoordinatorSignals"; -import type { ThreadEpiphanyReorientStateStatus } from "./ThreadEpiphanyReorientStateStatus"; -import type { ThreadEpiphanyRoleId } from "./ThreadEpiphanyRoleId"; -import type { ThreadEpiphanyRoleLane } from "./ThreadEpiphanyRoleLane"; -import type { ThreadEpiphanyRolesSource } from "./ThreadEpiphanyRolesSource"; -import type { ThreadEpiphanySceneAction } from "./ThreadEpiphanySceneAction"; - -export type ThreadEpiphanyViewCoordinator = { threadId: string, source: ThreadEpiphanyRolesSource, stateStatus: ThreadEpiphanyReorientStateStatus, stateRevision?: bigint | null, action: ThreadEpiphanyCoordinatorAction, targetRole?: ThreadEpiphanyRoleId | null, recommendedSceneAction?: ThreadEpiphanySceneAction | null, requiresReview: boolean, canAutoRun: boolean, reason: string, sourceSignals: ThreadEpiphanyCoordinatorSignals, roles: Array, note: string, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewCrrc.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewCrrc.ts deleted file mode 100644 index 569c1d93..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewCrrc.ts +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadEpiphanyCrrcRecommendation } from "./ThreadEpiphanyCrrcRecommendation"; -import type { ThreadEpiphanyJob } from "./ThreadEpiphanyJob"; -import type { ThreadEpiphanyPressure } from "./ThreadEpiphanyPressure"; -import type { ThreadEpiphanyReorientDecision } from "./ThreadEpiphanyReorientDecision"; -import type { ThreadEpiphanyReorientFinding } from "./ThreadEpiphanyReorientFinding"; -import type { ThreadEpiphanyReorientResultStatus } from "./ThreadEpiphanyReorientResultStatus"; -import type { ThreadEpiphanyReorientSource } from "./ThreadEpiphanyReorientSource"; -import type { ThreadEpiphanyReorientStateStatus } from "./ThreadEpiphanyReorientStateStatus"; -import type { ThreadEpiphanySceneAction } from "./ThreadEpiphanySceneAction"; - -export type ThreadEpiphanyViewCrrc = { threadId: string, source: ThreadEpiphanyReorientSource, stateStatus: ThreadEpiphanyReorientStateStatus, stateRevision?: bigint | null, pressure: ThreadEpiphanyPressure, decision: ThreadEpiphanyReorientDecision, recommendation: ThreadEpiphanyCrrcRecommendation, reorientBindingId: string, reorientResultStatus: ThreadEpiphanyReorientResultStatus, reorientJob?: ThreadEpiphanyJob | null, reorientFinding?: ThreadEpiphanyReorientFinding | null, availableActions?: Array, note: string, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewLens.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewLens.ts deleted file mode 100644 index 6bcf5dfa..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewLens.ts +++ /dev/null @@ -1,5 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type ThreadEpiphanyViewLens = "scene" | "jobs" | "roles" | "planning" | "pressure" | "reorient" | "crrc" | "coordinator"; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewPlanning.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewPlanning.ts deleted file mode 100644 index 8dc0e239..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewPlanning.ts +++ /dev/null @@ -1,9 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { EpiphanyPlanningState } from "../EpiphanyPlanningState"; -import type { ThreadEpiphanyContextSource } from "./ThreadEpiphanyContextSource"; -import type { ThreadEpiphanyContextStateStatus } from "./ThreadEpiphanyContextStateStatus"; -import type { ThreadEpiphanyPlanningSummary } from "./ThreadEpiphanyPlanningSummary"; - -export type ThreadEpiphanyViewPlanning = { threadId: string, source: ThreadEpiphanyContextSource, stateStatus: ThreadEpiphanyContextStateStatus, stateRevision?: bigint | null, planning: EpiphanyPlanningState, summary: ThreadEpiphanyPlanningSummary, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewReorient.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewReorient.ts deleted file mode 100644 index 6c8ac8db..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewReorient.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadEpiphanyReorientDecision } from "./ThreadEpiphanyReorientDecision"; -import type { ThreadEpiphanyReorientSource } from "./ThreadEpiphanyReorientSource"; -import type { ThreadEpiphanyReorientStateStatus } from "./ThreadEpiphanyReorientStateStatus"; - -export type ThreadEpiphanyViewReorient = { threadId: string, source: ThreadEpiphanyReorientSource, stateStatus: ThreadEpiphanyReorientStateStatus, stateRevision?: bigint | null, decision: ThreadEpiphanyReorientDecision, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewRoles.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewRoles.ts deleted file mode 100644 index f1790e76..00000000 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/ThreadEpiphanyViewRoles.ts +++ /dev/null @@ -1,8 +0,0 @@ -// GENERATED CODE! DO NOT MODIFY BY HAND! - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ThreadEpiphanyReorientStateStatus } from "./ThreadEpiphanyReorientStateStatus"; -import type { ThreadEpiphanyRoleLane } from "./ThreadEpiphanyRoleLane"; -import type { ThreadEpiphanyRolesSource } from "./ThreadEpiphanyRolesSource"; - -export type ThreadEpiphanyViewRoles = { threadId: string, source: ThreadEpiphanyRolesSource, stateStatus: ThreadEpiphanyReorientStateStatus, stateRevision?: bigint | null, roles: Array, note: string, }; diff --git a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/index.ts b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/index.ts index 85926981..72b22525 100644 --- a/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/index.ts +++ b/vendor/codex/codex-rs/app-server-protocol/schema/typescript/v2/index.ts @@ -260,75 +260,6 @@ export type { ThreadArchivedNotification } from "./ThreadArchivedNotification"; export type { ThreadClosedNotification } from "./ThreadClosedNotification"; export type { ThreadCompactStartParams } from "./ThreadCompactStartParams"; export type { ThreadCompactStartResponse } from "./ThreadCompactStartResponse"; -export type { ThreadEpiphanyContext } from "./ThreadEpiphanyContext"; -export type { ThreadEpiphanyContextMissing } from "./ThreadEpiphanyContextMissing"; -export type { ThreadEpiphanyContextSource } from "./ThreadEpiphanyContextSource"; -export type { ThreadEpiphanyContextStateStatus } from "./ThreadEpiphanyContextStateStatus"; -export type { ThreadEpiphanyCoordinatorAction } from "./ThreadEpiphanyCoordinatorAction"; -export type { ThreadEpiphanyCoordinatorSignals } from "./ThreadEpiphanyCoordinatorSignals"; -export type { ThreadEpiphanyCrrcAction } from "./ThreadEpiphanyCrrcAction"; -export type { ThreadEpiphanyCrrcRecommendation } from "./ThreadEpiphanyCrrcRecommendation"; -export type { ThreadEpiphanyFreshnessSource } from "./ThreadEpiphanyFreshnessSource"; -export type { ThreadEpiphanyGraphContext } from "./ThreadEpiphanyGraphContext"; -export type { ThreadEpiphanyGraphFreshness } from "./ThreadEpiphanyGraphFreshness"; -export type { ThreadEpiphanyGraphFreshnessStatus } from "./ThreadEpiphanyGraphFreshnessStatus"; -export type { ThreadEpiphanyGraphQuery } from "./ThreadEpiphanyGraphQuery"; -export type { ThreadEpiphanyGraphQueryDirection } from "./ThreadEpiphanyGraphQueryDirection"; -export type { ThreadEpiphanyGraphQueryKind } from "./ThreadEpiphanyGraphQueryKind"; -export type { ThreadEpiphanyGraphQueryMatched } from "./ThreadEpiphanyGraphQueryMatched"; -export type { ThreadEpiphanyGraphQueryMissing } from "./ThreadEpiphanyGraphQueryMissing"; -export type { ThreadEpiphanyInvalidationInput } from "./ThreadEpiphanyInvalidationInput"; -export type { ThreadEpiphanyInvalidationStatus } from "./ThreadEpiphanyInvalidationStatus"; -export type { ThreadEpiphanyJob } from "./ThreadEpiphanyJob"; -export type { ThreadEpiphanyJobKind } from "./ThreadEpiphanyJobKind"; -export type { ThreadEpiphanyJobStatus } from "./ThreadEpiphanyJobStatus"; -export type { ThreadEpiphanyJobsUpdatedNotification } from "./ThreadEpiphanyJobsUpdatedNotification"; -export type { ThreadEpiphanyJobsUpdatedSource } from "./ThreadEpiphanyJobsUpdatedSource"; -export type { ThreadEpiphanyPlanningSummary } from "./ThreadEpiphanyPlanningSummary"; -export type { ThreadEpiphanyPressure } from "./ThreadEpiphanyPressure"; -export type { ThreadEpiphanyPressureBasis } from "./ThreadEpiphanyPressureBasis"; -export type { ThreadEpiphanyPressureLevel } from "./ThreadEpiphanyPressureLevel"; -export type { ThreadEpiphanyPressureStatus } from "./ThreadEpiphanyPressureStatus"; -export type { ThreadEpiphanyReorientAction } from "./ThreadEpiphanyReorientAction"; -export type { ThreadEpiphanyReorientCheckpointStatus } from "./ThreadEpiphanyReorientCheckpointStatus"; -export type { ThreadEpiphanyReorientDecision } from "./ThreadEpiphanyReorientDecision"; -export type { ThreadEpiphanyReorientFinding } from "./ThreadEpiphanyReorientFinding"; -export type { ThreadEpiphanyReorientReason } from "./ThreadEpiphanyReorientReason"; -export type { ThreadEpiphanyReorientResultStatus } from "./ThreadEpiphanyReorientResultStatus"; -export type { ThreadEpiphanyReorientSource } from "./ThreadEpiphanyReorientSource"; -export type { ThreadEpiphanyReorientStateStatus } from "./ThreadEpiphanyReorientStateStatus"; -export type { ThreadEpiphanyRetrievalFreshness } from "./ThreadEpiphanyRetrievalFreshness"; -export type { ThreadEpiphanyRetrievalFreshnessStatus } from "./ThreadEpiphanyRetrievalFreshnessStatus"; -export type { ThreadEpiphanyRoleFinding } from "./ThreadEpiphanyRoleFinding"; -export type { ThreadEpiphanyRoleId } from "./ThreadEpiphanyRoleId"; -export type { ThreadEpiphanyRoleLane } from "./ThreadEpiphanyRoleLane"; -export type { ThreadEpiphanyRoleResultStatus } from "./ThreadEpiphanyRoleResultStatus"; -export type { ThreadEpiphanyRoleSelfPersistenceReview } from "./ThreadEpiphanyRoleSelfPersistenceReview"; -export type { ThreadEpiphanyRoleSelfPersistenceStatus } from "./ThreadEpiphanyRoleSelfPersistenceStatus"; -export type { ThreadEpiphanyRoleStatus } from "./ThreadEpiphanyRoleStatus"; -export type { ThreadEpiphanyRolesSource } from "./ThreadEpiphanyRolesSource"; -export type { ThreadEpiphanyScene } from "./ThreadEpiphanyScene"; -export type { ThreadEpiphanySceneAction } from "./ThreadEpiphanySceneAction"; -export type { ThreadEpiphanySceneChurn } from "./ThreadEpiphanySceneChurn"; -export type { ThreadEpiphanySceneGraph } from "./ThreadEpiphanySceneGraph"; -export type { ThreadEpiphanySceneInvestigationCheckpoint } from "./ThreadEpiphanySceneInvestigationCheckpoint"; -export type { ThreadEpiphanySceneRecord } from "./ThreadEpiphanySceneRecord"; -export type { ThreadEpiphanySceneRecords } from "./ThreadEpiphanySceneRecords"; -export type { ThreadEpiphanySceneRetrieval } from "./ThreadEpiphanySceneRetrieval"; -export type { ThreadEpiphanySceneSource } from "./ThreadEpiphanySceneSource"; -export type { ThreadEpiphanySceneStateStatus } from "./ThreadEpiphanySceneStateStatus"; -export type { ThreadEpiphanySceneStatusCount } from "./ThreadEpiphanySceneStatusCount"; -export type { ThreadEpiphanySceneSubgoal } from "./ThreadEpiphanySceneSubgoal"; -export type { ThreadEpiphanyStateUpdatedField } from "./ThreadEpiphanyStateUpdatedField"; -export type { ThreadEpiphanyStateUpdatedNotification } from "./ThreadEpiphanyStateUpdatedNotification"; -export type { ThreadEpiphanyStateUpdatedSource } from "./ThreadEpiphanyStateUpdatedSource"; -export type { ThreadEpiphanyUpdatePatch } from "./ThreadEpiphanyUpdatePatch"; -export type { ThreadEpiphanyViewCoordinator } from "./ThreadEpiphanyViewCoordinator"; -export type { ThreadEpiphanyViewCrrc } from "./ThreadEpiphanyViewCrrc"; -export type { ThreadEpiphanyViewLens } from "./ThreadEpiphanyViewLens"; -export type { ThreadEpiphanyViewPlanning } from "./ThreadEpiphanyViewPlanning"; -export type { ThreadEpiphanyViewReorient } from "./ThreadEpiphanyViewReorient"; -export type { ThreadEpiphanyViewRoles } from "./ThreadEpiphanyViewRoles"; export type { ThreadForkParams } from "./ThreadForkParams"; export type { ThreadForkResponse } from "./ThreadForkResponse"; export type { ThreadInjectItemsParams } from "./ThreadInjectItemsParams"; diff --git a/vendor/codex/codex-rs/app-server-protocol/src/export.rs b/vendor/codex/codex-rs/app-server-protocol/src/export.rs index 70be2d46..021b7571 100644 --- a/vendor/codex/codex-rs/app-server-protocol/src/export.rs +++ b/vendor/codex/codex-rs/app-server-protocol/src/export.rs @@ -2116,7 +2116,6 @@ mod tests { // Epiphany DTOs are durable sparse state rather than conventional // request/response envelopes, so optional fields are intentional there. || stem.starts_with("Epiphany") - || stem == "ThreadEpiphanyUpdatePatch" || matches!( stem, "CollabAgentRef" diff --git a/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs b/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs index 2de0adb6..199c1bfa 100644 --- a/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs +++ b/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs @@ -336,46 +336,6 @@ client_request_definitions! { params: v2::ThreadReadParams, response: v2::ThreadReadResponse, }, - #[experimental("thread/epiphany/view")] - ThreadEpiphanyView => "thread/epiphany/view" { - params: v2::ThreadEpiphanyViewParams, - response: v2::ThreadEpiphanyViewResponse, - }, - #[experimental("thread/epiphany/roleResult")] - ThreadEpiphanyRoleResult => "thread/epiphany/roleResult" { - params: v2::ThreadEpiphanyRoleResultParams, - response: v2::ThreadEpiphanyRoleResultResponse, - }, - #[experimental("thread/epiphany/freshness")] - ThreadEpiphanyFreshness => "thread/epiphany/freshness" { - params: v2::ThreadEpiphanyFreshnessParams, - response: v2::ThreadEpiphanyFreshnessResponse, - }, - #[experimental("thread/epiphany/context")] - ThreadEpiphanyContext => "thread/epiphany/context" { - params: v2::ThreadEpiphanyContextParams, - response: v2::ThreadEpiphanyContextResponse, - }, - #[experimental("thread/epiphany/graphQuery")] - ThreadEpiphanyGraphQuery => "thread/epiphany/graphQuery" { - params: v2::ThreadEpiphanyGraphQueryParams, - response: v2::ThreadEpiphanyGraphQueryResponse, - }, - #[experimental("thread/epiphany/reorientResult")] - ThreadEpiphanyReorientResult => "thread/epiphany/reorientResult" { - params: v2::ThreadEpiphanyReorientResultParams, - response: v2::ThreadEpiphanyReorientResultResponse, - }, - #[experimental("thread/epiphany/jobInterrupt")] - ThreadEpiphanyJobInterrupt => "thread/epiphany/jobInterrupt" { - params: v2::ThreadEpiphanyJobInterruptParams, - response: v2::ThreadEpiphanyJobInterruptResponse, - }, - #[experimental("thread/epiphany/update")] - ThreadEpiphanyUpdate => "thread/epiphany/update" { - params: v2::ThreadEpiphanyUpdateParams, - response: v2::ThreadEpiphanyUpdateResponse, - }, ThreadTurnsList => "thread/turns/list" { params: v2::ThreadTurnsListParams, response: v2::ThreadTurnsListResponse, @@ -1057,10 +1017,6 @@ server_notification_definitions! { GuardianWarning => "guardianWarning" (v2::GuardianWarningNotification), DeprecationNotice => "deprecationNotice" (v2::DeprecationNoticeNotification), ConfigWarning => "configWarning" (v2::ConfigWarningNotification), - #[experimental("thread/epiphany/stateUpdated")] - ThreadEpiphanyStateUpdated => "thread/epiphany/stateUpdated" (v2::ThreadEpiphanyStateUpdatedNotification), - #[experimental("thread/epiphany/jobsUpdated")] - ThreadEpiphanyJobsUpdated => "thread/epiphany/jobsUpdated" (v2::ThreadEpiphanyJobsUpdatedNotification), FuzzyFileSearchSessionUpdated => "fuzzyFileSearch/sessionUpdated" (FuzzyFileSearchSessionUpdatedNotification), FuzzyFileSearchSessionCompleted => "fuzzyFileSearch/sessionCompleted" (FuzzyFileSearchSessionCompletedNotification), #[experimental("thread/realtime/started")] @@ -1458,7 +1414,6 @@ mod tests { agent_role: None, git_info: None, name: None, - epiphany_state: None, turns: Vec::new(), }, model: "gpt-5".to_string(), @@ -1544,842 +1499,6 @@ mod tests { Ok(()) } - #[test] - fn serialize_thread_epiphany_view_response() -> Result<()> { - let request = ClientRequest::ThreadEpiphanyView { - request_id: RequestId::Integer(8), - params: v2::ThreadEpiphanyViewParams { - thread_id: "thr_123".to_string(), - lenses: vec![v2::ThreadEpiphanyViewLens::Pressure], - }, - }; - assert_eq!(request.method(), "thread/epiphany/view"); - - let response = ClientResponse::ThreadEpiphanyView { - request_id: RequestId::Integer(8), - response: v2::ThreadEpiphanyViewResponse { - thread_id: "thr_123".to_string(), - lenses: vec![v2::ThreadEpiphanyViewLens::Pressure], - scene: None, - jobs: Vec::new(), - roles: None, - planning: None, - pressure: Some(v2::ThreadEpiphanyPressure { - status: v2::ThreadEpiphanyPressureStatus::Ready, - level: v2::ThreadEpiphanyPressureLevel::Low, - basis: v2::ThreadEpiphanyPressureBasis::ModelContextWindow, - used_tokens: Some(10), - model_context_window: Some(100), - model_auto_compact_token_limit: Some(100), - remaining_tokens: Some(90), - ratio_per_mille: Some(100), - should_prepare_compaction: false, - note: "Context window usage is below the compaction prep threshold." - .to_string(), - }), - reorient: None, - crrc: None, - coordinator: None, - }, - }; - - assert_eq!(response.id(), &RequestId::Integer(8)); - assert_eq!(response.method(), "thread/epiphany/view"); - assert_eq!( - json!({ - "method": "thread/epiphany/view", - "id": 8, - "response": { - "threadId": "thr_123", - "lenses": ["pressure"], - "pressure": { - "status": "ready", - "level": "low", - "basis": "modelContextWindow", - "usedTokens": 10, - "modelContextWindow": 100, - "modelAutoCompactTokenLimit": 100, - "remainingTokens": 90, - "ratioPerMille": 100, - "shouldPrepareCompaction": false, - "note": "Context window usage is below the compaction prep threshold." - } - } - }), - serde_json::to_value(&response)?, - ); - Ok(()) - } - - #[test] - fn serialize_thread_epiphany_role_result_response() -> Result<()> { - let response = ClientResponse::ThreadEpiphanyRoleResult { - request_id: RequestId::Integer(9), - response: v2::ThreadEpiphanyRoleResultResponse { - thread_id: "thr_123".to_string(), - role_id: v2::ThreadEpiphanyRoleId::Verification, - source: v2::ThreadEpiphanyRolesSource::Live, - state_status: v2::ThreadEpiphanyReorientStateStatus::Ready, - state_revision: Some(4), - binding_id: "verification-review-worker".to_string(), - status: v2::ThreadEpiphanyRoleResultStatus::Completed, - job: Some(v2::ThreadEpiphanyJob { - id: "verification-review-worker".to_string(), - kind: v2::ThreadEpiphanyJobKind::Specialist, - scope: "role-scoped verification/review".to_string(), - owner_role: "epiphany-verifier".to_string(), - launcher_job_id: Some("epiphany-launch-2".to_string()), - authority_scope: Some("epiphany.role.verification".to_string()), - backend_job_id: Some("backend-2".to_string()), - status: v2::ThreadEpiphanyJobStatus::Completed, - items_processed: Some(1), - items_total: Some(1), - progress_note: Some("1/1 items completed.".to_string()), - last_checkpoint_at_unix_seconds: None, - blocking_reason: None, - active_thread_ids: Vec::new(), - linked_subgoal_ids: vec!["phase-6".to_string()], - linked_graph_node_ids: vec!["state-spine".to_string()], - }), - finding: Some(v2::ThreadEpiphanyRoleFinding { - role_id: v2::ThreadEpiphanyRoleId::Verification, - verdict: Some("pass".to_string()), - summary: Some("Evidence covers the bounded change.".to_string()), - next_safe_move: Some("Promote the verified patch.".to_string()), - checkpoint_summary: None, - scratch_summary: None, - files_inspected: vec!["src/lib.rs".to_string()], - frontier_node_ids: vec!["state-spine".to_string()], - evidence_ids: vec!["ev-1".to_string()], - artifact_refs: Vec::new(), - runtime_result_id: Some("result-verification-1".to_string()), - runtime_job_id: Some("backend-2".to_string()), - open_questions: Vec::new(), - evidence_gaps: Vec::new(), - risks: Vec::new(), - state_patch: None, - self_patch: None, - self_persistence: None, - job_error: None, - item_error: None, - }), - note: "Verification role specialist completed. Next safe move: Promote the verified patch." - .to_string(), - }, - }; - - assert_eq!(response.id(), &RequestId::Integer(9)); - assert_eq!(response.method(), "thread/epiphany/roleResult"); - assert_eq!( - json!({ - "method": "thread/epiphany/roleResult", - "id": 9, - "response": { - "threadId": "thr_123", - "roleId": "verification", - "source": "live", - "stateStatus": "ready", - "stateRevision": 4, - "bindingId": "verification-review-worker", - "status": "completed", - "job": { - "id": "verification-review-worker", - "kind": "specialist", - "scope": "role-scoped verification/review", - "ownerRole": "epiphany-verifier", - "launcherJobId": "epiphany-launch-2", - "authorityScope": "epiphany.role.verification", - "backendJobId": "backend-2", - "status": "completed", - "itemsProcessed": 1, - "itemsTotal": 1, - "progressNote": "1/1 items completed.", - "linkedSubgoalIds": ["phase-6"], - "linkedGraphNodeIds": ["state-spine"] - }, - "finding": { - "roleId": "verification", - "verdict": "pass", - "summary": "Evidence covers the bounded change.", - "nextSafeMove": "Promote the verified patch.", - "filesInspected": ["src/lib.rs"], - "frontierNodeIds": ["state-spine"], - "evidenceIds": ["ev-1"], - "runtimeResultId": "result-verification-1", - "runtimeJobId": "backend-2" - }, - "note": "Verification role specialist completed. Next safe move: Promote the verified patch." - } - }), - serde_json::to_value(&response)?, - ); - Ok(()) - } - - #[test] - fn serialize_thread_epiphany_freshness_response() -> Result<()> { - let response = ClientResponse::ThreadEpiphanyFreshness { - request_id: RequestId::Integer(8), - response: v2::ThreadEpiphanyFreshnessResponse { - thread_id: "thr_123".to_string(), - source: v2::ThreadEpiphanyFreshnessSource::Live, - state_revision: Some(3), - retrieval: v2::ThreadEpiphanyRetrievalFreshness { - status: v2::ThreadEpiphanyRetrievalFreshnessStatus::Stale, - semantic_available: Some(true), - last_indexed_at_unix_seconds: Some(1_744_500_000), - indexed_file_count: Some(12), - indexed_chunk_count: Some(48), - dirty_paths: vec![PathBuf::from("src/router.rs")], - note: "Retrieval catalog is stale; 1 dirty path(s) need refresh." - .to_string(), - }, - graph: v2::ThreadEpiphanyGraphFreshness { - status: v2::ThreadEpiphanyGraphFreshnessStatus::Stale, - graph_freshness: Some("stale".to_string()), - checkpoint_id: Some("ck-5".to_string()), - dirty_path_count: 1, - dirty_paths: vec![PathBuf::from("src/router.rs")], - open_question_count: 1, - open_gap_count: 0, - note: "Graph freshness is stale; frontier has 1 dirty path(s), 1 open question id(s), and 0 open gap id(s)." - .to_string(), - }, - watcher: v2::ThreadEpiphanyInvalidationInput { - status: v2::ThreadEpiphanyInvalidationStatus::Changed, - watched_root: Some(PathBuf::from("/repo")), - observed_at_unix_seconds: Some(1_744_500_123), - changed_path_count: 1, - changed_paths: vec![PathBuf::from("src/router.rs")], - graph_node_ids: vec!["router-flow".to_string()], - active_frontier_node_ids: vec!["router-flow".to_string()], - note: "Watcher observed 1 recent changed path(s) touching 1 mapped graph node(s), including 1 active frontier node(s)." - .to_string(), - }, - }, - }; - - assert_eq!(response.id(), &RequestId::Integer(8)); - assert_eq!(response.method(), "thread/epiphany/freshness"); - assert_eq!( - json!({ - "method": "thread/epiphany/freshness", - "id": 8, - "response": { - "threadId": "thr_123", - "source": "live", - "stateRevision": 3, - "retrieval": { - "status": "stale", - "semanticAvailable": true, - "lastIndexedAtUnixSeconds": 1744500000, - "indexedFileCount": 12, - "indexedChunkCount": 48, - "dirtyPaths": ["src/router.rs"], - "note": "Retrieval catalog is stale; 1 dirty path(s) need refresh." - }, - "graph": { - "status": "stale", - "graphFreshness": "stale", - "checkpointId": "ck-5", - "dirtyPathCount": 1, - "dirtyPaths": ["src/router.rs"], - "openQuestionCount": 1, - "openGapCount": 0, - "note": "Graph freshness is stale; frontier has 1 dirty path(s), 1 open question id(s), and 0 open gap id(s)." - }, - "watcher": { - "status": "changed", - "watchedRoot": "/repo", - "observedAtUnixSeconds": 1744500123, - "changedPathCount": 1, - "changedPaths": ["src/router.rs"], - "graphNodeIds": ["router-flow"], - "activeFrontierNodeIds": ["router-flow"], - "note": "Watcher observed 1 recent changed path(s) touching 1 mapped graph node(s), including 1 active frontier node(s)." - } - } - }), - serde_json::to_value(&response)?, - ); - Ok(()) - } - - #[test] - fn serialize_thread_epiphany_context_response() -> Result<()> { - let response = ClientResponse::ThreadEpiphanyContext { - request_id: RequestId::Integer(8), - response: v2::ThreadEpiphanyContextResponse { - thread_id: "thr_123".to_string(), - source: v2::ThreadEpiphanyContextSource::Live, - state_status: v2::ThreadEpiphanyContextStateStatus::Ready, - state_revision: Some(3), - context: v2::ThreadEpiphanyContext { - graph: v2::ThreadEpiphanyGraphContext { - architecture_nodes: vec![epiphany_state_model::EpiphanyGraphNode { - id: "state-spine".to_string(), - title: "State spine".to_string(), - purpose: "Keep understanding typed".to_string(), - ..Default::default() - }], - architecture_edges: vec![epiphany_state_model::EpiphanyGraphEdge { - id: Some("edge-state-read".to_string()), - source_id: "state-spine".to_string(), - target_id: "client-read".to_string(), - kind: "projects".to_string(), - ..Default::default() - }], - ..Default::default() - }, - frontier: Some(epiphany_state_model::EpiphanyGraphFrontier { - active_node_ids: vec!["state-spine".to_string()], - ..Default::default() - }), - checkpoint: None, - investigation_checkpoint: Some( - epiphany_state_model::EpiphanyInvestigationCheckpoint { - checkpoint_id: "ix-1".to_string(), - kind: "source_gathering".to_string(), - focus: "Audit the compaction seam.".to_string(), - next_action: Some( - "Re-gather source if this packet is stale.".to_string(), - ), - ..Default::default() - }, - ), - observations: vec![epiphany_state_model::EpiphanyObservation { - id: "obs-1".to_string(), - summary: "Context shard is read-only.".to_string(), - source_kind: "smoke".to_string(), - status: "ok".to_string(), - evidence_ids: vec!["ev-1".to_string()], - ..Default::default() - }], - evidence: vec![epiphany_state_model::EpiphanyEvidenceRecord { - id: "ev-1".to_string(), - kind: "test".to_string(), - status: "ok".to_string(), - summary: "Context shard serialized.".to_string(), - ..Default::default() - }], - }, - missing: v2::ThreadEpiphanyContextMissing { - graph_node_ids: vec!["missing-node".to_string()], - ..Default::default() - }, - }, - }; - - assert_eq!(response.id(), &RequestId::Integer(8)); - assert_eq!(response.method(), "thread/epiphany/context"); - assert_eq!( - json!({ - "method": "thread/epiphany/context", - "id": 8, - "response": { - "threadId": "thr_123", - "source": "live", - "stateStatus": "ready", - "stateRevision": 3, - "context": { - "graph": { - "architectureNodes": [ - { - "id": "state-spine", - "title": "State spine", - "purpose": "Keep understanding typed" - } - ], - "architectureEdges": [ - { - "source_id": "state-spine", - "target_id": "client-read", - "kind": "projects", - "id": "edge-state-read" - } - ] - }, - "frontier": { - "active_node_ids": ["state-spine"] - }, - "investigationCheckpoint": { - "checkpoint_id": "ix-1", - "kind": "source_gathering", - "disposition": "resume_ready", - "focus": "Audit the compaction seam.", - "next_action": "Re-gather source if this packet is stale." - }, - "observations": [ - { - "id": "obs-1", - "summary": "Context shard is read-only.", - "source_kind": "smoke", - "status": "ok", - "evidence_ids": ["ev-1"] - } - ], - "evidence": [ - { - "id": "ev-1", - "kind": "test", - "status": "ok", - "summary": "Context shard serialized." - } - ] - }, - "missing": { - "graphNodeIds": ["missing-node"] - } - } - }), - serde_json::to_value(&response)?, - ); - Ok(()) - } - - #[test] - fn serialize_thread_epiphany_graph_query_request_and_response() -> Result<()> { - let request = ClientRequest::ThreadEpiphanyGraphQuery { - request_id: RequestId::Integer(24), - params: v2::ThreadEpiphanyGraphQueryParams { - thread_id: "thr_123".to_string(), - query: v2::ThreadEpiphanyGraphQuery { - kind: v2::ThreadEpiphanyGraphQueryKind::FrontierNeighborhood, - node_ids: vec!["state-spine".to_string()], - edge_ids: Vec::new(), - paths: vec![PathBuf::from("src/lib.rs")], - symbols: Vec::new(), - edge_kinds: vec!["calls".to_string()], - direction: Some(v2::ThreadEpiphanyGraphQueryDirection::Both), - depth: Some(1), - include_links: Some(true), - }, - }, - }; - - assert_eq!(request.method(), "thread/epiphany/graphQuery"); - assert_eq!( - json!({ - "method": "thread/epiphany/graphQuery", - "id": 24, - "params": { - "threadId": "thr_123", - "query": { - "kind": "frontierNeighborhood", - "nodeIds": ["state-spine"], - "paths": ["src/lib.rs"], - "edgeKinds": ["calls"], - "direction": "both", - "depth": 1, - "includeLinks": true - } - } - }), - serde_json::to_value(&request)?, - ); - - let response = ClientResponse::ThreadEpiphanyGraphQuery { - request_id: RequestId::Integer(24), - response: v2::ThreadEpiphanyGraphQueryResponse { - thread_id: "thr_123".to_string(), - source: v2::ThreadEpiphanyContextSource::Live, - state_status: v2::ThreadEpiphanyContextStateStatus::Ready, - state_revision: Some(2), - graph: v2::ThreadEpiphanyGraphContext { - architecture_nodes: vec![epiphany_state_model::EpiphanyGraphNode { - id: "state-spine".to_string(), - title: "State spine".to_string(), - purpose: "Persist Epiphany state.".to_string(), - ..Default::default() - }], - ..Default::default() - }, - frontier: None, - checkpoint: None, - matched: v2::ThreadEpiphanyGraphQueryMatched { - node_ids: vec!["state-spine".to_string()], - edge_ids: Vec::new(), - paths: Vec::new(), - symbols: Vec::new(), - edge_kinds: Vec::new(), - }, - missing: v2::ThreadEpiphanyGraphQueryMissing::default(), - }, - }; - - assert_eq!(response.method(), "thread/epiphany/graphQuery"); - assert_eq!( - json!({ - "method": "thread/epiphany/graphQuery", - "id": 24, - "response": { - "threadId": "thr_123", - "source": "live", - "stateStatus": "ready", - "stateRevision": 2, - "graph": { - "architectureNodes": [{ - "id": "state-spine", - "title": "State spine", - "purpose": "Persist Epiphany state." - }] - }, - "matched": { - "nodeIds": ["state-spine"] - }, - "missing": {} - } - }), - serde_json::to_value(&response)?, - ); - Ok(()) - } - - #[test] - fn serialize_thread_epiphany_reorient_result_response() -> Result<()> { - let response = ClientResponse::ThreadEpiphanyReorientResult { - request_id: RequestId::Integer(9), - response: v2::ThreadEpiphanyReorientResultResponse { - thread_id: "thr_123".to_string(), - source: v2::ThreadEpiphanyReorientSource::Live, - state_status: v2::ThreadEpiphanyReorientStateStatus::Ready, - state_revision: Some(5), - binding_id: "reorient-worker".to_string(), - status: v2::ThreadEpiphanyReorientResultStatus::Completed, - job: Some(v2::ThreadEpiphanyJob { - id: "reorient-worker".to_string(), - kind: v2::ThreadEpiphanyJobKind::Specialist, - scope: "reorient-guided checkpoint resume".to_string(), - owner_role: "epiphany-reorient".to_string(), - launcher_job_id: Some("epiphany-launch-1".to_string()), - authority_scope: Some("epiphany.reorient.resume".to_string()), - backend_job_id: Some("backend-1".to_string()), - status: v2::ThreadEpiphanyJobStatus::Completed, - items_processed: Some(1), - items_total: Some(1), - progress_note: Some("1/1 items completed.".to_string()), - last_checkpoint_at_unix_seconds: Some(1_744_700_000), - blocking_reason: None, - active_thread_ids: Vec::new(), - linked_subgoal_ids: vec!["phase-6".to_string()], - linked_graph_node_ids: vec!["state-spine".to_string()], - }), - finding: Some(v2::ThreadEpiphanyReorientFinding { - mode: Some("resume".to_string()), - summary: Some("Checkpoint remains source-grounded.".to_string()), - next_safe_move: Some("Continue the read-back slice.".to_string()), - checkpoint_still_valid: Some(true), - files_inspected: vec!["src/lib.rs".to_string()], - frontier_node_ids: vec!["state-spine".to_string()], - evidence_ids: vec!["ev-1".to_string()], - artifact_refs: Vec::new(), - runtime_result_id: Some("result-reorient-1".to_string()), - runtime_job_id: Some("backend-1".to_string()), - job_error: None, - item_error: None, - }), - note: - "Reorientation worker completed. Next safe move: Continue the read-back slice." - .to_string(), - }, - }; - - assert_eq!(response.id(), &RequestId::Integer(9)); - assert_eq!(response.method(), "thread/epiphany/reorientResult"); - assert_eq!( - json!({ - "method": "thread/epiphany/reorientResult", - "id": 9, - "response": { - "threadId": "thr_123", - "source": "live", - "stateStatus": "ready", - "stateRevision": 5, - "bindingId": "reorient-worker", - "status": "completed", - "job": { - "id": "reorient-worker", - "kind": "specialist", - "scope": "reorient-guided checkpoint resume", - "ownerRole": "epiphany-reorient", - "launcherJobId": "epiphany-launch-1", - "authorityScope": "epiphany.reorient.resume", - "backendJobId": "backend-1", - "status": "completed", - "itemsProcessed": 1, - "itemsTotal": 1, - "progressNote": "1/1 items completed.", - "lastCheckpointAtUnixSeconds": 1744700000, - "linkedSubgoalIds": ["phase-6"], - "linkedGraphNodeIds": ["state-spine"] - }, - "finding": { - "mode": "resume", - "summary": "Checkpoint remains source-grounded.", - "nextSafeMove": "Continue the read-back slice.", - "checkpointStillValid": true, - "filesInspected": ["src/lib.rs"], - "frontierNodeIds": ["state-spine"], - "evidenceIds": ["ev-1"], - "runtimeResultId": "result-reorient-1", - "runtimeJobId": "backend-1" - }, - "note": "Reorientation worker completed. Next safe move: Continue the read-back slice." - } - }), - serde_json::to_value(&response)?, - ); - Ok(()) - } - - #[test] - fn serialize_thread_epiphany_job_interrupt_response() -> Result<()> { - let response = ClientResponse::ThreadEpiphanyJobInterrupt { - request_id: RequestId::Integer(13), - response: v2::ThreadEpiphanyJobInterruptResponse { - cancel_requested: true, - interrupted_thread_ids: vec!["worker-thread-1".to_string()], - revision: 4, - changed_fields: vec![v2::ThreadEpiphanyStateUpdatedField::JobBindings], - epiphany_state: epiphany_state_model::EpiphanyThreadState { - revision: 4, - job_bindings: vec![epiphany_state_model::EpiphanyJobBinding { - id: "specialist-work".to_string(), - kind: epiphany_state_model::EpiphanyJobKind::Specialist, - scope: "role-scoped specialist work".to_string(), - owner_role: "epiphany-harness".to_string(), - authority_scope: Some("epiphany.specialist".to_string()), - linked_subgoal_ids: Vec::new(), - linked_graph_node_ids: Vec::new(), - blocking_reason: Some( - "Launch explicitly to resume specialist work.".to_string(), - ), - }], - ..Default::default() - }, - job: v2::ThreadEpiphanyJob { - id: "specialist-work".to_string(), - kind: v2::ThreadEpiphanyJobKind::Specialist, - scope: "role-scoped specialist work".to_string(), - owner_role: "epiphany-harness".to_string(), - launcher_job_id: None, - authority_scope: Some("epiphany.specialist".to_string()), - backend_job_id: None, - status: v2::ThreadEpiphanyJobStatus::Blocked, - items_processed: None, - items_total: None, - progress_note: None, - last_checkpoint_at_unix_seconds: None, - blocking_reason: Some( - "Launch explicitly to resume specialist work.".to_string(), - ), - active_thread_ids: Vec::new(), - linked_subgoal_ids: Vec::new(), - linked_graph_node_ids: Vec::new(), - }, - }, - }; - - assert_eq!(response.id(), &RequestId::Integer(13)); - assert_eq!(response.method(), "thread/epiphany/jobInterrupt"); - assert_eq!( - json!({ - "method": "thread/epiphany/jobInterrupt", - "id": 13, - "response": { - "cancelRequested": true, - "interruptedThreadIds": ["worker-thread-1"], - "revision": 4, - "changedFields": ["jobBindings"], - "epiphanyState": { - "revision": 4, - "job_bindings": [{ - "id": "specialist-work", - "kind": "specialist", - "scope": "role-scoped specialist work", - "owner_role": "epiphany-harness", - "authority_scope": "epiphany.specialist", - "blocking_reason": "Launch explicitly to resume specialist work." - }] - }, - "job": { - "id": "specialist-work", - "kind": "specialist", - "scope": "role-scoped specialist work", - "ownerRole": "epiphany-harness", - "authorityScope": "epiphany.specialist", - "status": "blocked", - "blockingReason": "Launch explicitly to resume specialist work." - } - } - }), - serde_json::to_value(&response)?, - ); - Ok(()) - } - - #[test] - fn serialize_thread_epiphany_update_response() -> Result<()> { - let response = ClientResponse::ThreadEpiphanyUpdate { - request_id: RequestId::Integer(12), - response: v2::ThreadEpiphanyUpdateResponse { - revision: 2, - changed_fields: vec![v2::ThreadEpiphanyStateUpdatedField::Objective], - epiphany_state: epiphany_state_model::EpiphanyThreadState { - revision: 2, - objective: Some("Keep the map honest".to_string()), - ..Default::default() - }, - }, - }; - - assert_eq!(response.id(), &RequestId::Integer(12)); - assert_eq!(response.method(), "thread/epiphany/update"); - assert_eq!( - json!({ - "method": "thread/epiphany/update", - "id": 12, - "response": { - "revision": 2, - "changedFields": ["objective"], - "epiphanyState": { - "revision": 2, - "objective": "Keep the map honest" - } - } - }), - serde_json::to_value(&response)?, - ); - Ok(()) - } - - #[test] - fn serialize_thread_epiphany_state_updated_notification() -> Result<()> { - let notification = ServerNotification::ThreadEpiphanyStateUpdated( - v2::ThreadEpiphanyStateUpdatedNotification { - thread_id: "thr_123".to_string(), - source: v2::ThreadEpiphanyStateUpdatedSource::Update, - revision: 7, - changed_fields: vec![ - v2::ThreadEpiphanyStateUpdatedField::Objective, - v2::ThreadEpiphanyStateUpdatedField::Evidence, - ], - epiphany_state: epiphany_state_model::EpiphanyThreadState { - revision: 7, - objective: Some("Keep the map live".to_string()), - ..Default::default() - }, - }, - ); - assert_eq!( - json!({ - "method": "thread/epiphany/stateUpdated", - "params": { - "threadId": "thr_123", - "source": "update", - "revision": 7, - "changedFields": ["objective", "evidence"], - "epiphanyState": { - "revision": 7, - "objective": "Keep the map live" - } - } - }), - serde_json::to_value(¬ification)?, - ); - Ok(()) - } - - #[test] - fn serialize_thread_epiphany_state_updated_job_launch_notification() -> Result<()> { - let notification = ServerNotification::ThreadEpiphanyStateUpdated( - v2::ThreadEpiphanyStateUpdatedNotification { - thread_id: "thr_123".to_string(), - source: v2::ThreadEpiphanyStateUpdatedSource::JobLaunch, - revision: 8, - changed_fields: vec![v2::ThreadEpiphanyStateUpdatedField::JobBindings], - epiphany_state: epiphany_state_model::EpiphanyThreadState { - revision: 8, - ..Default::default() - }, - }, - ); - assert_eq!( - json!({ - "method": "thread/epiphany/stateUpdated", - "params": { - "threadId": "thr_123", - "source": "jobLaunch", - "revision": 8, - "changedFields": ["jobBindings"], - "epiphanyState": { - "revision": 8 - } - } - }), - serde_json::to_value(¬ification)?, - ); - Ok(()) - } - - #[test] - fn serialize_thread_epiphany_jobs_updated_notification() -> Result<()> { - let notification = ServerNotification::ThreadEpiphanyJobsUpdated( - v2::ThreadEpiphanyJobsUpdatedNotification { - thread_id: "thr_123".to_string(), - source: v2::ThreadEpiphanyJobsUpdatedSource::RuntimeProgress, - state_revision: Some(7), - jobs: vec![v2::ThreadEpiphanyJob { - id: "specialist-work".to_string(), - kind: v2::ThreadEpiphanyJobKind::Specialist, - scope: "runtime-bound specialist work".to_string(), - owner_role: "epiphany-harness".to_string(), - launcher_job_id: Some("launcher-specialist".to_string()), - authority_scope: Some("epiphany.specialist".to_string()), - backend_job_id: Some("job-123".to_string()), - status: v2::ThreadEpiphanyJobStatus::Running, - items_processed: Some(1), - items_total: Some(3), - progress_note: Some("Runtime agent job is running.".to_string()), - last_checkpoint_at_unix_seconds: Some(1_744_500_123), - blocking_reason: None, - active_thread_ids: vec!["worker-thread".to_string()], - linked_subgoal_ids: vec!["phase6".to_string()], - linked_graph_node_ids: vec!["job-surface".to_string()], - }], - }, - ); - assert_eq!( - json!({ - "method": "thread/epiphany/jobsUpdated", - "params": { - "threadId": "thr_123", - "source": "runtimeProgress", - "stateRevision": 7, - "jobs": [{ - "id": "specialist-work", - "kind": "specialist", - "scope": "runtime-bound specialist work", - "ownerRole": "epiphany-harness", - "launcherJobId": "launcher-specialist", - "authorityScope": "epiphany.specialist", - "backendJobId": "job-123", - "status": "running", - "itemsProcessed": 1, - "itemsTotal": 3, - "progressNote": "Runtime agent job is running.", - "lastCheckpointAtUnixSeconds": 1744500123, - "activeThreadIds": ["worker-thread"], - "linkedSubgoalIds": ["phase6"], - "linkedGraphNodeIds": ["job-surface"] - }] - } - }), - serde_json::to_value(¬ification)?, - ); - Ok(()) - } - #[test] fn serialize_config_requirements_read() -> Result<()> { let request = ClientRequest::ConfigRequirementsRead { @@ -2855,141 +1974,6 @@ mod tests { assert_eq!(reason, Some("mock/experimentalMethod")); } - #[test] - fn thread_epiphany_role_result_is_marked_experimental() { - let request = ClientRequest::ThreadEpiphanyRoleResult { - request_id: RequestId::Integer(1), - params: v2::ThreadEpiphanyRoleResultParams { - thread_id: "thr_123".to_string(), - role_id: v2::ThreadEpiphanyRoleId::Verification, - binding_id: None, - }, - }; - let reason = crate::experimental_api::ExperimentalApi::experimental_reason(&request); - assert_eq!(reason, Some("thread/epiphany/roleResult")); - } - - #[test] - fn thread_epiphany_freshness_is_marked_experimental() { - let request = ClientRequest::ThreadEpiphanyFreshness { - request_id: RequestId::Integer(1), - params: v2::ThreadEpiphanyFreshnessParams { - thread_id: "thr_123".to_string(), - }, - }; - let reason = crate::experimental_api::ExperimentalApi::experimental_reason(&request); - assert_eq!(reason, Some("thread/epiphany/freshness")); - } - - #[test] - fn thread_epiphany_context_is_marked_experimental() { - let request = ClientRequest::ThreadEpiphanyContext { - request_id: RequestId::Integer(1), - params: v2::ThreadEpiphanyContextParams { - thread_id: "thr_123".to_string(), - graph_node_ids: vec!["state-spine".to_string()], - graph_edge_ids: Vec::new(), - observation_ids: Vec::new(), - evidence_ids: Vec::new(), - include_active_frontier: Some(true), - include_linked_evidence: Some(true), - }, - }; - let reason = crate::experimental_api::ExperimentalApi::experimental_reason(&request); - assert_eq!(reason, Some("thread/epiphany/context")); - } - - #[test] - fn thread_epiphany_reorient_result_is_marked_experimental() { - let request = ClientRequest::ThreadEpiphanyReorientResult { - request_id: RequestId::Integer(1), - params: v2::ThreadEpiphanyReorientResultParams { - thread_id: "thr_123".to_string(), - binding_id: Some("reorient-worker".to_string()), - }, - }; - let reason = crate::experimental_api::ExperimentalApi::experimental_reason(&request); - assert_eq!(reason, Some("thread/epiphany/reorientResult")); - } - - #[test] - fn thread_epiphany_job_interrupt_is_marked_experimental() { - let request = ClientRequest::ThreadEpiphanyJobInterrupt { - request_id: RequestId::Integer(1), - params: v2::ThreadEpiphanyJobInterruptParams { - thread_id: "thr_123".to_string(), - expected_revision: Some(3), - binding_id: "specialist-work".to_string(), - reason: Some("Stop the specialist smoke job.".to_string()), - }, - }; - let reason = crate::experimental_api::ExperimentalApi::experimental_reason(&request); - assert_eq!(reason, Some("thread/epiphany/jobInterrupt")); - } - - #[test] - fn thread_epiphany_update_is_marked_experimental() { - let request = ClientRequest::ThreadEpiphanyUpdate { - request_id: RequestId::Integer(1), - params: v2::ThreadEpiphanyUpdateParams { - thread_id: "thr_123".to_string(), - expected_revision: Some(1), - patch: v2::ThreadEpiphanyUpdatePatch { - objective: Some("Keep the map honest".to_string()), - ..Default::default() - }, - }, - }; - let reason = crate::experimental_api::ExperimentalApi::experimental_reason(&request); - assert_eq!(reason, Some("thread/epiphany/update")); - } - - #[test] - fn thread_epiphany_state_updated_notification_is_marked_experimental() { - let notification = ServerNotification::ThreadEpiphanyStateUpdated( - v2::ThreadEpiphanyStateUpdatedNotification { - thread_id: "thr_123".to_string(), - source: v2::ThreadEpiphanyStateUpdatedSource::Promote, - revision: 0, - changed_fields: vec![v2::ThreadEpiphanyStateUpdatedField::Churn], - epiphany_state: epiphany_state_model::EpiphanyThreadState::default(), - }, - ); - let reason = crate::experimental_api::ExperimentalApi::experimental_reason(¬ification); - assert_eq!(reason, Some("thread/epiphany/stateUpdated")); - } - - #[test] - fn thread_epiphany_jobs_updated_notification_is_marked_experimental() { - let notification = ServerNotification::ThreadEpiphanyJobsUpdated( - v2::ThreadEpiphanyJobsUpdatedNotification { - thread_id: "thr_123".to_string(), - source: v2::ThreadEpiphanyJobsUpdatedSource::RuntimeProgress, - state_revision: Some(1), - jobs: vec![v2::ThreadEpiphanyJob { - id: "specialist-work".to_string(), - kind: v2::ThreadEpiphanyJobKind::Specialist, - scope: "runtime-bound specialist work".to_string(), - owner_role: "epiphany-harness".to_string(), - launcher_job_id: Some("launcher-specialist".to_string()), - authority_scope: Some("epiphany.specialist".to_string()), - backend_job_id: Some("job-123".to_string()), - status: v2::ThreadEpiphanyJobStatus::Running, - items_processed: Some(1), - items_total: Some(3), - progress_note: Some("Runtime agent job is running.".to_string()), - last_checkpoint_at_unix_seconds: Some(1_744_500_123), - blocking_reason: None, - active_thread_ids: vec!["worker-thread".to_string()], - linked_subgoal_ids: vec!["phase6".to_string()], - linked_graph_node_ids: vec!["job-surface".to_string()], - }], - }, - ); - let reason = crate::experimental_api::ExperimentalApi::experimental_reason(¬ification); - assert_eq!(reason, Some("thread/epiphany/jobsUpdated")); - } - #[test] fn thread_realtime_start_is_marked_experimental() { let request = ClientRequest::ThreadRealtimeStart { diff --git a/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs b/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs index 5c94dc53..b89d5c98 100644 --- a/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs +++ b/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs @@ -57,27 +57,6 @@ use codex_protocol::protocol::AgentStatus as CoreAgentStatus; use codex_protocol::protocol::AskForApproval as CoreAskForApproval; use codex_protocol::protocol::CodexErrorInfo as CoreCodexErrorInfo; use codex_protocol::protocol::CreditsSnapshot as CoreCreditsSnapshot; -use epiphany_state_model::EpiphanyAcceptanceReceipt as CoreEpiphanyAcceptanceReceipt; -use epiphany_state_model::EpiphanyChurnState as CoreEpiphanyChurnState; -use epiphany_state_model::EpiphanyEvidenceRecord as CoreEpiphanyEvidenceRecord; -use epiphany_state_model::EpiphanyGraphCheckpoint as CoreEpiphanyGraphCheckpoint; -use epiphany_state_model::EpiphanyGraphEdge as CoreEpiphanyGraphEdge; -use epiphany_state_model::EpiphanyGraphFrontier as CoreEpiphanyGraphFrontier; -use epiphany_state_model::EpiphanyGraphLink as CoreEpiphanyGraphLink; -use epiphany_state_model::EpiphanyGraphNode as CoreEpiphanyGraphNode; -use epiphany_state_model::EpiphanyGraphs as CoreEpiphanyGraphs; -use epiphany_state_model::EpiphanyInvariant as CoreEpiphanyInvariant; -use epiphany_state_model::EpiphanyInvestigationCheckpoint as CoreEpiphanyInvestigationCheckpoint; -use epiphany_state_model::EpiphanyInvestigationDisposition as CoreEpiphanyInvestigationDisposition; -use epiphany_state_model::EpiphanyJobBinding as CoreEpiphanyJobBinding; -use epiphany_state_model::EpiphanyModeState as CoreEpiphanyModeState; -use epiphany_state_model::EpiphanyObservation as CoreEpiphanyObservation; -use epiphany_state_model::EpiphanyPlanningState as CoreEpiphanyPlanningState; -use epiphany_state_model::EpiphanyRetrievalStatus as CoreEpiphanyRetrievalStatus; -use epiphany_state_model::EpiphanyRuntimeLink as CoreEpiphanyRuntimeLink; -use epiphany_state_model::EpiphanyScratchPad as CoreEpiphanyScratchPad; -use epiphany_state_model::EpiphanySubgoal as CoreEpiphanySubgoal; -use epiphany_state_model::EpiphanyThreadState as CoreEpiphanyThreadState; use codex_protocol::protocol::ExecCommandSource as CoreExecCommandSource; use codex_protocol::protocol::ExecCommandStatus as CoreExecCommandStatus; use codex_protocol::protocol::GranularApprovalConfig as CoreGranularApprovalConfig; @@ -3620,1384 +3599,6 @@ pub struct ThreadReadResponse { pub thread: Thread, } -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyViewLens { - Scene, - Jobs, - Roles, - Planning, - Pressure, - Reorient, - Crrc, - Coordinator, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyViewParams { - pub thread_id: String, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub lenses: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyScene { - pub state_status: ThreadEpiphanySceneStateStatus, - pub source: ThreadEpiphanySceneSource, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub revision: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub objective: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub active_subgoal: Option, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub subgoals: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub invariant_status_counts: Vec, - pub graph: ThreadEpiphanySceneGraph, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub retrieval: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub investigation_checkpoint: Option, - pub observations: ThreadEpiphanySceneRecords, - pub evidence: ThreadEpiphanySceneRecords, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub churn: Option, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub available_actions: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanySceneStateStatus { - Missing, - Ready, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanySceneSource { - Stored, - Live, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanySceneAction { - Index, - Retrieve, - Distill, - Context, - Planning, - GraphQuery, - Jobs, - Roles, - Coordinator, - RoleLaunch, - RoleResult, - RoleAccept, - JobLaunch, - JobInterrupt, - Freshness, - Pressure, - Reorient, - Crrc, - ReorientLaunch, - ReorientResult, - ReorientAccept, - Propose, - Promote, - Update, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanySceneSubgoal { - pub id: String, - pub title: String, - pub status: String, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub summary: Option, - pub active: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanySceneStatusCount { - pub status: String, - pub count: u32, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS, Default)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanySceneGraph { - pub architecture_node_count: u32, - pub architecture_edge_count: u32, - pub dataflow_node_count: u32, - pub dataflow_edge_count: u32, - pub link_count: u32, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub active_node_ids: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub active_edge_ids: Vec, - pub open_question_count: u32, - pub open_gap_count: u32, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub dirty_paths: Vec, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub checkpoint_id: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub checkpoint_summary: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanySceneRetrieval { - pub workspace_root: PathBuf, - pub status: CoreEpiphanyRetrievalStatus, - pub semantic_available: bool, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub index_revision: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub indexed_file_count: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub indexed_chunk_count: Option, - pub shard_count: u32, - pub dirty_path_count: u32, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanySceneInvestigationCheckpoint { - pub checkpoint_id: String, - pub kind: String, - pub disposition: CoreEpiphanyInvestigationDisposition, - pub focus: String, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub summary: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub next_action: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub captured_at_turn_id: Option, - pub open_question_count: u32, - pub code_ref_count: u32, - pub evidence_count: u32, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS, Default)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanySceneRecords { - pub total_count: u32, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub latest: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanySceneRecord { - pub id: String, - pub kind: String, - pub status: String, - pub summary: String, - pub code_ref_count: u32, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanySceneChurn { - pub understanding_status: String, - pub diff_pressure: String, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub graph_freshness: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub warning: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub unexplained_writes: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyRolesSource { - Stored, - Live, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyRoleId { - Implementation, - Imagination, - Research, - Modeling, - Verification, - Reorientation, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyRoleStatus { - Ready, - Needed, - Blocked, - Running, - Completed, - Waiting, - Review, - Unavailable, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyRoleLane { - pub id: ThreadEpiphanyRoleId, - pub title: String, - pub owner_role: String, - pub status: ThreadEpiphanyRoleStatus, - pub note: String, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub jobs: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub authority_scopes: Vec, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub recommended_action: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyRoleResultParams { - pub thread_id: String, - pub role_id: ThreadEpiphanyRoleId, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub binding_id: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyRoleResultResponse { - pub thread_id: String, - pub role_id: ThreadEpiphanyRoleId, - pub source: ThreadEpiphanyRolesSource, - pub state_status: ThreadEpiphanyReorientStateStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub state_revision: Option, - pub binding_id: String, - pub status: ThreadEpiphanyRoleResultStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub job: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub finding: Option, - pub note: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyRoleResultStatus { - MissingState, - MissingBinding, - BackendUnavailable, - BackendMissing, - Pending, - Running, - Completed, - Failed, - Cancelled, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyCoordinatorAction { - PrepareCheckpoint, - CompactRehydrateReorient, - LaunchReorientWorker, - WaitForReorientWorker, - ReviewReorientResult, - RegatherManually, - LaunchResearch, - ReviewResearchResult, - LaunchModeling, - ReviewModelingResult, - LaunchVerification, - ReviewVerificationResult, - ContinueImplementation, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyCoordinatorSignals { - pub pressure_level: ThreadEpiphanyPressureLevel, - pub should_prepare_compaction: bool, - pub reorient_action: ThreadEpiphanyReorientAction, - pub crrc_action: ThreadEpiphanyCrrcAction, - pub research_result_status: ThreadEpiphanyRoleResultStatus, - pub modeling_result_status: ThreadEpiphanyRoleResultStatus, - pub verification_result_status: ThreadEpiphanyRoleResultStatus, - pub reorient_result_status: ThreadEpiphanyReorientResultStatus, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyRoleFinding { - pub role_id: ThreadEpiphanyRoleId, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub verdict: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub summary: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub next_safe_move: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub checkpoint_summary: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub scratch_summary: Option, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub files_inspected: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub frontier_node_ids: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub evidence_ids: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub artifact_refs: Vec, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub runtime_result_id: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub runtime_job_id: Option, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub open_questions: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub evidence_gaps: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub risks: Vec, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub state_patch: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable, type = "unknown")] - pub self_patch: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub self_persistence: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub job_error: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub item_error: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyRoleSelfPersistenceReview { - pub status: ThreadEpiphanyRoleSelfPersistenceStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub target_agent_id: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub target_path: Option, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub reasons: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyRoleSelfPersistenceStatus { - Missing, - Accepted, - Rejected, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyFreshnessParams { - pub thread_id: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyFreshnessResponse { - pub thread_id: String, - pub source: ThreadEpiphanyFreshnessSource, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub state_revision: Option, - pub retrieval: ThreadEpiphanyRetrievalFreshness, - pub graph: ThreadEpiphanyGraphFreshness, - pub watcher: ThreadEpiphanyInvalidationInput, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyFreshnessSource { - Stored, - Live, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyRetrievalFreshnessStatus { - Missing, - Ready, - Stale, - Indexing, - Unavailable, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyRetrievalFreshness { - pub status: ThreadEpiphanyRetrievalFreshnessStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub semantic_available: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub last_indexed_at_unix_seconds: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub indexed_file_count: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub indexed_chunk_count: Option, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub dirty_paths: Vec, - pub note: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyGraphFreshnessStatus { - Missing, - Ready, - Stale, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyGraphFreshness { - pub status: ThreadEpiphanyGraphFreshnessStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub graph_freshness: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub checkpoint_id: Option, - pub dirty_path_count: u32, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub dirty_paths: Vec, - pub open_question_count: u32, - pub open_gap_count: u32, - pub note: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyInvalidationStatus { - Unavailable, - Clean, - Changed, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyInvalidationInput { - pub status: ThreadEpiphanyInvalidationStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub watched_root: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub observed_at_unix_seconds: Option, - pub changed_path_count: u32, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub changed_paths: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub graph_node_ids: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub active_frontier_node_ids: Vec, - pub note: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyJobKind { - Indexing, - Remap, - Verification, - Specialist, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyJobStatus { - Idle, - Needed, - Pending, - Running, - Completed, - Failed, - Cancelled, - Blocked, - Unavailable, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyJob { - pub id: String, - pub kind: ThreadEpiphanyJobKind, - pub scope: String, - pub owner_role: String, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub launcher_job_id: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub authority_scope: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub backend_job_id: Option, - pub status: ThreadEpiphanyJobStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub items_processed: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub items_total: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub progress_note: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub last_checkpoint_at_unix_seconds: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub blocking_reason: Option, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub active_thread_ids: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub linked_subgoal_ids: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub linked_graph_node_ids: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyContextParams { - pub thread_id: String, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub graph_node_ids: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub graph_edge_ids: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub observation_ids: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub evidence_ids: Vec, - /// Defaults to true so clients can request the current working slice with - /// only a thread id. - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub include_active_frontier: Option, - /// Defaults to true so selected observations bring their evidence anchors. - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub include_linked_evidence: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyPlanningSummary { - pub capture_count: u32, - pub pending_capture_count: u32, - pub github_issue_capture_count: u32, - pub backlog_item_count: u32, - pub ready_backlog_item_count: u32, - pub roadmap_stream_count: u32, - pub objective_draft_count: u32, - pub draft_objective_count: u32, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub active_objective: Option, - pub note: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyContextResponse { - pub thread_id: String, - pub source: ThreadEpiphanyContextSource, - pub state_status: ThreadEpiphanyContextStateStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub state_revision: Option, - pub context: ThreadEpiphanyContext, - pub missing: ThreadEpiphanyContextMissing, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyContextSource { - Stored, - Live, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyContextStateStatus { - Missing, - Ready, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS, Default)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyContext { - pub graph: ThreadEpiphanyGraphContext, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub frontier: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub checkpoint: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub investigation_checkpoint: Option, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub observations: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub evidence: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS, Default)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyGraphContext { - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub architecture_nodes: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub architecture_edges: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub dataflow_nodes: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub dataflow_edges: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub links: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS, Default)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyContextMissing { - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub graph_node_ids: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub graph_edge_ids: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub observation_ids: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub evidence_ids: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyGraphQueryParams { - pub thread_id: String, - pub query: ThreadEpiphanyGraphQuery, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyGraphQuery { - pub kind: ThreadEpiphanyGraphQueryKind, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub node_ids: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub edge_ids: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub paths: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub symbols: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub edge_kinds: Vec, - /// Defaults to `both`. - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub direction: Option, - /// Defaults to 1 and is capped by the server. - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub depth: Option, - /// Defaults to true so neighborhood queries preserve dataflow/architecture joins. - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub include_links: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyGraphQueryKind { - Node, - Path, - FrontierNeighborhood, - Neighbors, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyGraphQueryDirection { - Incoming, - Outgoing, - Both, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyGraphQueryResponse { - pub thread_id: String, - pub source: ThreadEpiphanyContextSource, - pub state_status: ThreadEpiphanyContextStateStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub state_revision: Option, - pub graph: ThreadEpiphanyGraphContext, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub frontier: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub checkpoint: Option, - pub matched: ThreadEpiphanyGraphQueryMatched, - pub missing: ThreadEpiphanyGraphQueryMissing, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS, Default)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyGraphQueryMatched { - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub node_ids: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub edge_ids: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub paths: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub symbols: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub edge_kinds: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS, Default)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyGraphQueryMissing { - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub node_ids: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub edge_ids: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyPressure { - pub status: ThreadEpiphanyPressureStatus, - pub level: ThreadEpiphanyPressureLevel, - pub basis: ThreadEpiphanyPressureBasis, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub used_tokens: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub model_context_window: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub model_auto_compact_token_limit: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub remaining_tokens: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub ratio_per_mille: Option, - pub should_prepare_compaction: bool, - pub note: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyPressureStatus { - Unknown, - Ready, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyPressureLevel { - Unknown, - Low, - Elevated, - High, - Critical, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyPressureBasis { - Unknown, - AutoCompactLimit, - ModelContextWindow, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyReorientResultParams { - pub thread_id: String, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub binding_id: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyReorientResultResponse { - pub thread_id: String, - pub source: ThreadEpiphanyReorientSource, - pub state_status: ThreadEpiphanyReorientStateStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub state_revision: Option, - pub binding_id: String, - pub status: ThreadEpiphanyReorientResultStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub job: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub finding: Option, - pub note: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyCrrcRecommendation { - pub action: ThreadEpiphanyCrrcAction, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub recommended_scene_action: Option, - pub reason: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyViewResponse { - pub thread_id: String, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub lenses: Vec, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub scene: Option, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub jobs: Vec, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub roles: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub planning: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub pressure: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub reorient: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub crrc: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub coordinator: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyViewRoles { - pub thread_id: String, - pub source: ThreadEpiphanyRolesSource, - pub state_status: ThreadEpiphanyReorientStateStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub state_revision: Option, - pub roles: Vec, - pub note: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyViewPlanning { - pub thread_id: String, - pub source: ThreadEpiphanyContextSource, - pub state_status: ThreadEpiphanyContextStateStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub state_revision: Option, - pub planning: CoreEpiphanyPlanningState, - pub summary: ThreadEpiphanyPlanningSummary, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyViewReorient { - pub thread_id: String, - pub source: ThreadEpiphanyReorientSource, - pub state_status: ThreadEpiphanyReorientStateStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub state_revision: Option, - pub decision: ThreadEpiphanyReorientDecision, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyViewCrrc { - pub thread_id: String, - pub source: ThreadEpiphanyReorientSource, - pub state_status: ThreadEpiphanyReorientStateStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub state_revision: Option, - pub pressure: ThreadEpiphanyPressure, - pub decision: ThreadEpiphanyReorientDecision, - pub recommendation: ThreadEpiphanyCrrcRecommendation, - pub reorient_binding_id: String, - pub reorient_result_status: ThreadEpiphanyReorientResultStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub reorient_job: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub reorient_finding: Option, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub available_actions: Vec, - pub note: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyViewCoordinator { - pub thread_id: String, - pub source: ThreadEpiphanyRolesSource, - pub state_status: ThreadEpiphanyReorientStateStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub state_revision: Option, - pub action: ThreadEpiphanyCoordinatorAction, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub target_role: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub recommended_scene_action: Option, - pub requires_review: bool, - pub can_auto_run: bool, - pub reason: String, - pub source_signals: ThreadEpiphanyCoordinatorSignals, - pub roles: Vec, - pub note: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyCrrcAction { - Continue, - PrepareCheckpoint, - LaunchReorientWorker, - WaitForReorientWorker, - ReviewReorientResult, - AcceptReorientResult, - RegatherManually, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyReorientResultStatus { - MissingState, - MissingBinding, - BackendUnavailable, - BackendMissing, - Pending, - Running, - Completed, - Failed, - Cancelled, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyReorientFinding { - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub mode: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub summary: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub next_safe_move: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub checkpoint_still_valid: Option, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub files_inspected: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub frontier_node_ids: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub evidence_ids: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub artifact_refs: Vec, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub runtime_result_id: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub runtime_job_id: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub job_error: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub item_error: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyReorientSource { - Stored, - Live, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyReorientStateStatus { - Missing, - Ready, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyReorientAction { - Resume, - Regather, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyReorientCheckpointStatus { - Missing, - ResumeReady, - RegatherRequired, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyReorientReason { - MissingState, - MissingCheckpoint, - CheckpointRequestedRegather, - CheckpointPathsDirty, - CheckpointPathsChanged, - FrontierChanged, - UnanchoredCheckpointWhileStateStale, - CheckpointReady, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyReorientDecision { - pub action: ThreadEpiphanyReorientAction, - pub checkpoint_status: ThreadEpiphanyReorientCheckpointStatus, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub checkpoint_id: Option, - pub pressure_level: ThreadEpiphanyPressureLevel, - pub retrieval_status: ThreadEpiphanyRetrievalFreshnessStatus, - pub graph_status: ThreadEpiphanyGraphFreshnessStatus, - pub watcher_status: ThreadEpiphanyInvalidationStatus, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub reasons: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub checkpoint_dirty_paths: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub checkpoint_changed_paths: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub active_frontier_node_ids: Vec, - pub next_action: String, - pub note: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyUpdateParams { - pub thread_id: String, - #[serde(default)] - #[ts(optional = nullable)] - pub expected_revision: Option, - pub patch: ThreadEpiphanyUpdatePatch, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS, Default)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyUpdatePatch { - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub objective: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub active_subgoal_id: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub subgoals: Option>, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub invariants: Option>, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub graphs: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub graph_frontier: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub graph_checkpoint: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub scratch: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub investigation_checkpoint: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub job_bindings: Option>, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub acceptance_receipts: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub runtime_links: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub observations: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub evidence: Vec, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub churn: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub mode: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub planning: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyUpdateResponse { - pub revision: u64, - pub changed_fields: Vec, - pub epiphany_state: CoreEpiphanyThreadState, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyStateUpdatedNotification { - pub thread_id: String, - pub source: ThreadEpiphanyStateUpdatedSource, - pub revision: u64, - pub changed_fields: Vec, - pub epiphany_state: CoreEpiphanyThreadState, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyStateUpdatedSource { - Update, - Promote, - JobLaunch, - JobInterrupt, - ReorientAccept, - RoleAccept, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyStateUpdatedField { - Objective, - ActiveSubgoalId, - Subgoals, - Invariants, - Graphs, - GraphFrontier, - GraphCheckpoint, - Scratch, - InvestigationCheckpoint, - JobBindings, - AcceptanceReceipts, - RuntimeLinks, - Observations, - Evidence, - Churn, - Mode, - Planning, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyJobsUpdatedNotification { - pub thread_id: String, - pub source: ThreadEpiphanyJobsUpdatedSource, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub state_revision: Option, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub jobs: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub enum ThreadEpiphanyJobsUpdatedSource { - RuntimeProgress, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyJobInterruptParams { - pub thread_id: String, - #[serde(default)] - #[ts(optional = nullable)] - pub expected_revision: Option, - pub binding_id: String, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] - pub reason: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] -#[serde(rename_all = "camelCase")] -#[ts(export_to = "v2/")] -pub struct ThreadEpiphanyJobInterruptResponse { - pub cancel_requested: bool, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub interrupted_thread_ids: Vec, - pub revision: u64, - pub changed_fields: Vec, - pub epiphany_state: CoreEpiphanyThreadState, - pub job: ThreadEpiphanyJob, -} - #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] @@ -5066,11 +3667,6 @@ pub struct Thread { pub git_info: Option, /// Optional user-facing thread title. pub name: Option, - /// Only populated on `thread/start`, `thread/resume`, `thread/fork`, `thread/read`, - /// and notifications/responses that reuse those hydrated thread payloads. - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional)] - pub epiphany_state: Option, /// Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` /// (when `includeTurns` is true) responses. /// For all other responses and notifications returning a Thread, diff --git a/vendor/codex/codex-rs/app-server/README.md b/vendor/codex/codex-rs/app-server/README.md index 0a62caea..8eedc4c5 100644 --- a/vendor/codex/codex-rs/app-server/README.md +++ b/vendor/codex/codex-rs/app-server/README.md @@ -134,19 +134,6 @@ Example with notification opt-out: ## API Overview -Hydrated thread responses such as `thread/start`, `thread/resume`, `thread/fork`, `thread/read`, and `thread/unarchive` may include `thread.epiphanyState` when the thread has persisted Epiphany state. When the thread is currently loaded, app-server prefers the live in-memory value; otherwise it reconstructs the latest surviving snapshot from rollout items using the same rollback/compaction semantics as core session replay. For live threads with Epiphany state but no persisted retrieval summary yet, app-server backfills a lightweight query-time retrieval summary instead of pretending the retrieval field is absent. - -Experimental Epiphany state access: - -- `thread/epiphany/context` is a targeted read-only state-shard surface. It selects graph nodes/edges, active frontier, checkpoint, observations, and evidence from authoritative typed state without mutating or notifying. -- `thread/epiphany/graphQuery` is a read-only graph traversal surface over authoritative typed state. It can return explicit nodes, path/symbol matches, one-to-three-hop neighbors, and the current frontier neighborhood while preserving architecture/dataflow links; it does not mutate, index, schedule, or promote. -- `thread/epiphany/update` is the explicit loaded-thread-only control-plane write path for Epiphany state. It can append observations/evidence and replace bounded typed state fields such as objective, subgoals, graph frontier/checkpoint, scratch, churn, and mode; it bumps the Epiphany revision, returns `revision` plus `changedFields`, and persists a rollout snapshot immediately. -- `thread/epiphany/stateUpdated` is an experimental server notification emitted after successful `thread/epiphany/update`. It carries the updated typed `epiphanyState`, an `update` source, event-level `revision`, and typed `changedFields`. -- `thread/epiphany/jobsUpdated` is a sealed legacy notification shape. Epiphany no longer emits it from Codex batch-job progress; heartbeat/runtime-spine owns live activation telemetry, while the `jobs` lens on `thread/epiphany/view` remains a read-only projection over current typed state. -- `thread/epiphany/freshness` is a read-only reflection surface for retrieval and graph staleness. It reports revision/source identity, retrieval freshness, graph freshness, and exact dirty-path pressure, and for loaded threads now also reports watcher-backed invalidation inputs with watched root, changed paths, mapped graph-node hits, and active-frontier hits. It still does not mutate state, schedule refresh work, or perform automatic watcher-driven semantic invalidation. -- `thread/epiphany/reorient` is a read-only CRRC policy surface. It consumes the durable investigation checkpoint plus freshness, watcher, and pressure signals to return a bounded `resume` versus `regather` verdict with explicit checkpoint-path/frontier reasons. It does not mutate state, compact, notify, schedule, or silently continue work on the caller's behalf. - The request envelope is camelCase, but nested reused Epiphany core DTOs currently keep their core snake_case fields, such as `source_kind`, `understanding_status`, and `diff_pressure`. - - `thread/start` — create a new thread; emits `thread/started` (including the current `thread.status`) and auto-subscribes you to turn/item events for that thread. When the request includes a `cwd` and the resolved sandbox is `workspace-write` or full access, app-server also marks that project as trusted in the user `config.toml`. Pass `sessionStartSource: "clear"` when starting a replacement thread after clearing the current session so `SessionStart` hooks receive `source: "clear"` instead of the default `"startup"`. For permissions, prefer `permissionProfile`; the legacy `sandbox` shorthand is still accepted but cannot be combined with `permissionProfile`. - `thread/resume` — reopen an existing thread by id so subsequent `turn/start` calls append to it. Accepts the same permission override rules as `thread/start`. - `thread/fork` — fork an existing thread into a new thread id by copying the stored history; if the source thread is currently mid-turn, the fork records the same interruption marker as `turn/interrupt` instead of inheriting an unmarked partial turn suffix. The returned `thread.forkedFromId` points at the source thread when known. Accepts `ephemeral: true` for an in-memory temporary fork, emits `thread/started` (including the current `thread.status`), and auto-subscribes you to turn/item events for the new thread. Accepts the same permission override rules as `thread/start`. @@ -376,8 +363,6 @@ Later, after the idle unload timeout: Use `thread/read` to fetch a stored thread by id without resuming it. Pass `includeTurns` when you want the full rollout history loaded into `thread.turns`. The returned thread includes `agentNickname` and `agentRole` for AgentControl-spawned thread sub-agents when available. -When present, `thread.epiphanyState` is the latest surviving persisted `EpiphanyThreadState` snapshot for that thread. - ```json { "method": "thread/read", "id": 22, "params": { "threadId": "thr_123" } } { "id": 22, "result": { diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs index eb9ba295..ad029479 100644 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs +++ b/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs @@ -1,13 +1,7 @@ mod auth_routes; mod catalog_routes; mod command_routes; -mod epiphany_mutation_routes; -mod epiphany_read_routes; -mod epiphany_thread_host; -#[cfg(test)] -mod epiphany_compatibility_architecture; mod listener_lifecycle; -mod legacy_epiphany_rollout; mod mcp_routes; mod realtime_routes; mod review_routes; @@ -26,13 +20,10 @@ mod thread_turn_routes; mod turn_routes; use self::auth_routes::ActiveLogin; -use self::epiphany_thread_host::live_thread_epiphany_state; -use self::epiphany_thread_host::load_epiphany_state_from_rollout_path; pub(super) use self::listener_lifecycle::{EnsureConversationListenerResult, ListenerTaskContext}; pub(crate) use self::running_thread_resume_routes::handle_pending_thread_resume_request; pub(crate) use self::thread_config::{config_load_error, validate_dynamic_tools}; pub(crate) use self::thread_projection::*; -pub(super) use self::thread_read_routes::ThreadReadViewError; pub(crate) use self::thread_turn_projection::*; use crate::bespoke_event_handling::apply_bespoke_event_handling; use crate::bespoke_event_handling::maybe_emit_hook_prompt_item_completed; @@ -374,7 +365,6 @@ use crate::filters::source_kind_matches; use crate::thread_state::ThreadListenerCommand; use crate::thread_state::ThreadState; use crate::thread_state::ThreadStateManager; -use token_usage_replay::latest_token_usage_info_from_rollout_path; use token_usage_replay::latest_token_usage_turn_id_for_thread_path; use token_usage_replay::latest_token_usage_turn_id_from_rollout_items; use token_usage_replay::latest_token_usage_turn_id_from_rollout_path; @@ -637,38 +627,6 @@ impl CodexMessageProcessor { self.thread_read(to_connection_request_id(request_id), params) .await; } - ClientRequest::ThreadEpiphanyView { request_id, params } => { - self.thread_epiphany_view(to_connection_request_id(request_id), params) - .await; - } - ClientRequest::ThreadEpiphanyRoleResult { request_id, params } => { - self.thread_epiphany_role_result(to_connection_request_id(request_id), params) - .await; - } - ClientRequest::ThreadEpiphanyFreshness { request_id, params } => { - self.thread_epiphany_freshness(to_connection_request_id(request_id), params) - .await; - } - ClientRequest::ThreadEpiphanyContext { request_id, params } => { - self.thread_epiphany_context(to_connection_request_id(request_id), params) - .await; - } - ClientRequest::ThreadEpiphanyGraphQuery { request_id, params } => { - self.thread_epiphany_graph_query(to_connection_request_id(request_id), params) - .await; - } - ClientRequest::ThreadEpiphanyReorientResult { request_id, params } => { - self.thread_epiphany_reorient_result(to_connection_request_id(request_id), params) - .await; - } - ClientRequest::ThreadEpiphanyJobInterrupt { request_id, params } => { - self.thread_epiphany_job_interrupt(to_connection_request_id(request_id), params) - .await; - } - ClientRequest::ThreadEpiphanyUpdate { request_id, params } => { - self.thread_epiphany_update(to_connection_request_id(request_id), params) - .await; - } ClientRequest::ThreadTurnsList { request_id, params } => { self.thread_turns_list(to_connection_request_id(request_id), params) .await; diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_compatibility_architecture.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_compatibility_architecture.rs deleted file mode 100644 index 5320ac58..00000000 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_compatibility_architecture.rs +++ /dev/null @@ -1,89 +0,0 @@ -#[test] -fn mutation_routes_are_explicit_compatibility_delegates() { - let source = include_str!("epiphany_mutation_routes.rs"); - for delegate in [ - "apply_thread_epiphany_update(", - "interrupt_thread_epiphany_job(", - ] { - assert!(source.contains(delegate), "missing compatibility delegate {delegate}"); - } - for forbidden in [ - "apply_epiphany_state_update_to_state(", - "acceptance_receipts.push(", - "job_bindings.push(", - "runtime_links.push(", - ".steer_input(", - ".submit(Op::Compact)", - "select_epiphany_coordinator_automation(", - ] { - assert!( - !source.contains(forbidden), - "compatibility route regained local authority through {forbidden}" - ); - } -} - -#[test] -fn only_named_client_routes_remain_registered() { - let protocol = include_str!("../../../app-server-protocol/src/protocol/common.rs"); - let registrations = protocol - .split("ThreadTurnsList =>") - .next() - .expect("client request registration section"); - for retained in [ - "thread/epiphany/view", - "thread/epiphany/roleResult", - "thread/epiphany/freshness", - "thread/epiphany/context", - "thread/epiphany/graphQuery", - "thread/epiphany/reorientResult", - "thread/epiphany/jobInterrupt", - "thread/epiphany/update", - ] { - assert!(registrations.contains(retained), "missing retained client route {retained}"); - } - for removed in [ - "thread/epiphany/roleLaunch", - "thread/epiphany/roleAccept", - "thread/epiphany/reorientLaunch", - "thread/epiphany/reorientAccept", - "thread/epiphany/index", - "thread/epiphany/distill", - "thread/epiphany/propose", - "thread/epiphany/promote", - "thread/epiphany/jobLaunch", - "thread/epiphany/retrieve", - ] { - assert!(!registrations.contains(removed), "unconsumed route remains registered: {removed}"); - } -} - -#[test] -fn read_routes_have_no_mutation_or_scheduler_authority() { - let source = include_str!("epiphany_read_routes.rs"); - for forbidden in [ - "apply_thread_epiphany_", - "launch_thread_epiphany_", - "interrupt_thread_epiphany_", - "index_epiphany_retrieval_for_paths(", - ".steer_input(", - ".submit(Op::Compact)", - "select_epiphany_coordinator_automation(", - ] { - assert!( - !source.contains(forbidden), - "read route regained actuator authority through {forbidden}" - ); - } -} - -#[test] -fn compatibility_surface_has_no_implicit_event_loop_trigger() { - let processor = include_str!("../codex_message_processor.rs"); - let event_loop = include_str!("../bespoke_event_handling.rs"); - let thread_state = include_str!("../thread_state.rs"); - - assert!(!processor.contains("mod epiphany_automation")); - assert!(!event_loop.contains("maybe_run_epiphany")); - assert!(!thread_state.contains("epiphany_checkpoint_intervention")); -} diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_mutation_routes.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_mutation_routes.rs deleted file mode 100644 index e4205609..00000000 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_mutation_routes.rs +++ /dev/null @@ -1,190 +0,0 @@ -use codex_app_server_protocol::*; -use codex_core::CodexThread; -use codex_protocol::ThreadId; -use epiphany_state_model::EpiphanyThreadState; -use epiphany_codex_bridge::cultnet::EpiphanyStateUpdatedField; -use epiphany_codex_bridge::error::EpiphanyBridgeError; -use epiphany_codex_bridge::mutation_service::apply_thread_epiphany_update; -use epiphany_codex_bridge::mutation_service::interrupt_thread_epiphany_job; -use epiphany_codex_bridge::protocol_edge::protocol_job_from_surface; -use epiphany_codex_bridge::protocol_edge::protocol_state_updated_fields; -use epiphany_codex_bridge::protocol_edge::protocol_state_updated_notification; -use epiphany_codex_bridge::protocol_edge::protocol_update_patch_to_core; -use std::sync::Arc; - -use super::CodexMessageProcessor; -use super::ConnectionRequestId; -use super::epiphany_thread_host::EpiphanyCodexThreadHost; - -impl CodexMessageProcessor { - async fn load_epiphany_thread( - &self, - request_id: &ConnectionRequestId, - thread_id: &str, - ) -> Option<(ThreadId, Arc)> { - let thread_uuid = match ThreadId::from_string(thread_id) { - Ok(id) => id, - Err(err) => { - self.send_invalid_request_error( - request_id.clone(), - format!("invalid thread id: {err}"), - ) - .await; - return None; - } - }; - - let thread = match self.thread_manager.get_thread(thread_uuid).await { - Ok(thread) => thread, - Err(_) => { - self.send_invalid_request_error( - request_id.clone(), - format!("thread not loaded: {thread_uuid}"), - ) - .await; - return None; - } - }; - - Some((thread_uuid, thread)) - } - - async fn send_epiphany_state_updated( - &self, - thread_uuid: ThreadId, - source: ThreadEpiphanyStateUpdatedSource, - changed_fields: Vec, - epiphany_state: EpiphanyThreadState, - ) { - self.outgoing - .send_server_notification(ServerNotification::ThreadEpiphanyStateUpdated( - protocol_state_updated_notification( - thread_uuid.to_string(), - source, - epiphany_state.revision, - changed_fields, - epiphany_state, - ), - )) - .await; - } - - pub(super) async fn thread_epiphany_update( - &self, - request_id: ConnectionRequestId, - params: ThreadEpiphanyUpdateParams, - ) { - let ThreadEpiphanyUpdateParams { - thread_id, - expected_revision, - patch, - } = params; - - let (thread_uuid, thread) = match self.load_epiphany_thread(&request_id, &thread_id).await { - Some(thread) => thread, - None => return, - }; - - let host = EpiphanyCodexThreadHost::new(thread.as_ref()); - let core_patch = protocol_update_patch_to_core(&patch); - let applied = match apply_thread_epiphany_update(&host, expected_revision, core_patch).await - { - Ok(applied) => applied, - Err(EpiphanyBridgeError::InvalidRequest(message)) => { - self.send_invalid_request_error(request_id, message).await; - return; - } - Err(err) => { - self.send_internal_error( - request_id, - format!("failed to update Epiphany state for {thread_uuid}: {err}"), - ) - .await; - return; - } - }; - let changed_fields = applied.changed_fields; - let protocol_changed_fields = protocol_state_updated_fields(changed_fields.clone()); - let epiphany_state = applied.epiphany_state; - let response = ThreadEpiphanyUpdateResponse { - revision: applied.revision, - changed_fields: protocol_changed_fields, - epiphany_state: epiphany_state.clone(), - }; - - self.outgoing.send_response(request_id, response).await; - self.send_epiphany_state_updated( - thread_uuid, - ThreadEpiphanyStateUpdatedSource::Update, - changed_fields, - epiphany_state, - ) - .await; - } - - pub(super) async fn thread_epiphany_job_interrupt( - &self, - request_id: ConnectionRequestId, - params: ThreadEpiphanyJobInterruptParams, - ) { - let ThreadEpiphanyJobInterruptParams { - thread_id, - expected_revision, - binding_id, - reason, - } = params; - - let (thread_uuid, thread) = match self.load_epiphany_thread(&request_id, &thread_id).await { - Some(thread) => thread, - None => return, - }; - - let host = EpiphanyCodexThreadHost::new(thread.as_ref()); - let applied = match interrupt_thread_epiphany_job( - &host, - expected_revision, - &binding_id, - reason, - ) - .await - { - Ok(applied) => applied, - Err(EpiphanyBridgeError::InvalidRequest(message)) => { - self.send_invalid_request_error(request_id, message).await; - return; - } - Err(err) => { - self.send_internal_error( - request_id, - format!("failed to interrupt Epiphany job for {thread_uuid}: {err}"), - ) - .await; - return; - } - }; - let changed_fields = applied.changed_fields; - let protocol_changed_fields = protocol_state_updated_fields(changed_fields.clone()); - let epiphany_state = applied.epiphany_state; - - self.outgoing - .send_response( - request_id, - ThreadEpiphanyJobInterruptResponse { - cancel_requested: applied.cancel_requested, - interrupted_thread_ids: applied.interrupted_thread_ids.clone(), - revision: applied.revision, - changed_fields: protocol_changed_fields, - epiphany_state: epiphany_state.clone(), - job: protocol_job_from_surface(applied.job, None, None), - }, - ) - .await; - self.send_epiphany_state_updated( - thread_uuid, - ThreadEpiphanyStateUpdatedSource::JobInterrupt, - changed_fields, - epiphany_state, - ) - .await; - } -} diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_read_routes.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_read_routes.rs deleted file mode 100644 index 4e238af4..00000000 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_read_routes.rs +++ /dev/null @@ -1,418 +0,0 @@ -use codex_app_server_protocol::*; -use codex_core::CodexThread; -use codex_protocol::ThreadId; -use epiphany_state_model::EpiphanyRetrievalState; -use super::epiphany_thread_host::runtime_spine_store_path; -use epiphany_codex_bridge::cultnet::EpiphanySurfaceSource; -use epiphany_codex_bridge::invalidation::epiphany_freshness_watcher_snapshot; -use epiphany_codex_bridge::launch::EPIPHANY_REORIENT_LAUNCH_BINDING_ID; -use epiphany_codex_bridge::launch::epiphany_role_binding_id; -use epiphany_codex_bridge::protocol_edge::core_epiphany_view_needs_jobs; -use epiphany_codex_bridge::protocol_edge::core_epiphany_view_needs_pressure; -use epiphany_codex_bridge::protocol_edge::core_epiphany_view_needs_reorientation_inputs; -use epiphany_codex_bridge::protocol_edge::core_epiphany_view_needs_runtime_store; -use epiphany_codex_bridge::protocol_edge::default_core_epiphany_view_lenses; -use epiphany_codex_bridge::protocol_edge::protocol_context_params_to_core; -use epiphany_codex_bridge::protocol_edge::protocol_freshness_response_from_surface; -use epiphany_codex_bridge::protocol_edge::protocol_graph_query_to_core; -use epiphany_codex_bridge::protocol_edge::protocol_role_id_to_core; -use epiphany_codex_bridge::protocol_edge::protocol_view_lenses_to_core; -use epiphany_codex_bridge::retrieve::epiphany_retrieval_state_for_paths; -use epiphany_codex_bridge::view_protocol::EpiphanyFreshnessResponseInput; -use epiphany_codex_bridge::view_protocol::EpiphanyReorientResultResponseInput; -use epiphany_codex_bridge::view_protocol::EpiphanyRoleResultResponseInput; -use epiphany_codex_bridge::view_protocol::EpiphanyViewResponseInput; -use epiphany_codex_bridge::view_protocol::derive_epiphany_freshness_surface; -use epiphany_codex_bridge::view_protocol::map_epiphany_context_response; -use epiphany_codex_bridge::view_protocol::map_epiphany_graph_query_response; -use epiphany_codex_bridge::view_protocol::map_epiphany_reorient_result_response; -use epiphany_codex_bridge::view_protocol::map_epiphany_role_result_response; -use epiphany_codex_bridge::view_protocol::map_epiphany_view_response; - -use super::CodexMessageProcessor; -use super::ConnectionRequestId; -use super::ThreadReadViewError; -use super::epiphany_thread_host::epiphany_token_usage_snapshot; -use super::latest_token_usage_info_from_rollout_path; - -impl CodexMessageProcessor { - pub(super) async fn thread_epiphany_view( - &self, - request_id: ConnectionRequestId, - params: ThreadEpiphanyViewParams, - ) { - let ThreadEpiphanyViewParams { thread_id, lenses } = params; - let lenses = if lenses.is_empty() { - default_core_epiphany_view_lenses() - } else { - protocol_view_lenses_to_core(lenses) - }; - - let thread_uuid = match ThreadId::from_string(&thread_id) { - Ok(id) => id, - Err(err) => { - self.send_invalid_request_error(request_id, format!("invalid thread id: {err}")) - .await; - return; - } - }; - - let loaded_thread = self.thread_manager.get_thread(thread_uuid).await.ok(); - let loaded = loaded_thread.is_some(); - let thread = match self.read_thread_view(thread_uuid, false).await { - Ok(thread) => thread, - Err(ThreadReadViewError::InvalidRequest(message)) => { - self.send_invalid_request_error(request_id, message).await; - return; - } - Err(ThreadReadViewError::Internal(message)) => { - self.send_internal_error(request_id, message).await; - return; - } - }; - - let needs_jobs = core_epiphany_view_needs_jobs(&lenses); - let needs_reorientation_inputs = core_epiphany_view_needs_reorientation_inputs(&lenses); - let needs_pressure = core_epiphany_view_needs_pressure(&lenses); - let retrieval_override = if (needs_jobs || needs_reorientation_inputs) - && thread - .epiphany_state - .as_ref() - .and_then(|state| state.retrieval.as_ref()) - .is_none() - { - if let Some(loaded_thread) = loaded_thread.as_ref() { - Some(thread_epiphany_retrieval_state(loaded_thread.as_ref()).await) - } else { - None - } - } else { - None - }; - let watcher_snapshot = if needs_reorientation_inputs { - if let Some(loaded_thread) = loaded_thread.as_ref() { - let config_snapshot = loaded_thread.config_snapshot().await; - self.epiphany_invalidation_manager - .ensure_thread_watch(&thread_id, &config_snapshot.cwd) - .await; - Some( - self.epiphany_invalidation_manager - .snapshot(&thread_id) - .await, - ) - } else { - None - } - } else { - None - }; - let token_usage_info = if needs_pressure { - if let Some(loaded_thread) = loaded_thread.as_ref() { - loaded_thread.token_usage_info().await - } else { - match thread.path.as_deref() { - Some(path) => latest_token_usage_info_from_rollout_path(path).await, - None => None, - } - } - } else { - None - }; - let runtime_store_path = if core_epiphany_view_needs_runtime_store(&lenses) { - if let Some(loaded_thread) = loaded_thread.as_ref() { - Some(runtime_spine_store_path(loaded_thread).await) - } else { - None - } - } else { - None - }; - let token_usage_snapshot = epiphany_token_usage_snapshot(token_usage_info.as_ref()); - let response = map_epiphany_view_response(EpiphanyViewResponseInput { - thread_id: thread_id.clone(), - lenses, - loaded, - state: thread.epiphany_state.as_ref(), - retrieval_override: retrieval_override.as_ref(), - watcher_snapshot: watcher_snapshot - .as_ref() - .map(epiphany_freshness_watcher_snapshot), - token_usage_info: token_usage_snapshot.as_ref(), - runtime_store_path: runtime_store_path.as_deref(), - }) - .await; - self.outgoing.send_response(request_id, response).await; - } - - pub(super) async fn thread_epiphany_role_result( - &self, - request_id: ConnectionRequestId, - params: ThreadEpiphanyRoleResultParams, - ) { - let ThreadEpiphanyRoleResultParams { - thread_id, - role_id, - binding_id, - } = params; - let core_role_id = protocol_role_id_to_core(role_id); - - let binding_id = match binding_id { - Some(binding_id) => binding_id, - None => match epiphany_role_binding_id(core_role_id) { - Ok(binding_id) => binding_id.to_string(), - Err(message) => { - self.send_invalid_request_error(request_id, message).await; - return; - } - }, - }; - - let thread_uuid = match ThreadId::from_string(&thread_id) { - Ok(id) => id, - Err(err) => { - self.send_invalid_request_error(request_id, format!("invalid thread id: {err}")) - .await; - return; - } - }; - - let loaded_thread = self.thread_manager.get_thread(thread_uuid).await.ok(); - let thread = match self.read_thread_view(thread_uuid, false).await { - Ok(thread) => thread, - Err(ThreadReadViewError::InvalidRequest(message)) => { - self.send_invalid_request_error(request_id, message).await; - return; - } - Err(ThreadReadViewError::Internal(message)) => { - self.send_internal_error(request_id, message).await; - return; - } - }; - let source = if loaded_thread.is_some() { - EpiphanySurfaceSource::Live - } else { - EpiphanySurfaceSource::Stored - }; - - if let Err(message) = epiphany_role_binding_id(core_role_id) { - self.send_invalid_request_error(request_id, message).await; - return; - } - - let runtime_store_path = if let Some(loaded_thread) = loaded_thread.as_ref() { - Some(runtime_spine_store_path(loaded_thread).await) - } else { - None - }; - let response = map_epiphany_role_result_response(EpiphanyRoleResultResponseInput { - thread_id: thread_uuid.to_string(), - role_id: core_role_id, - source, - binding_id, - state: thread.epiphany_state.as_ref(), - runtime_store_path: runtime_store_path.as_deref(), - }) - .await; - - self.outgoing.send_response(request_id, response).await; - } - - pub(super) async fn thread_epiphany_freshness( - &self, - request_id: ConnectionRequestId, - params: ThreadEpiphanyFreshnessParams, - ) { - let ThreadEpiphanyFreshnessParams { thread_id } = params; - - let thread_uuid = match ThreadId::from_string(&thread_id) { - Ok(id) => id, - Err(err) => { - self.send_invalid_request_error(request_id, format!("invalid thread id: {err}")) - .await; - return; - } - }; - - let loaded_thread = self.thread_manager.get_thread(thread_uuid).await.ok(); - let thread = match self.read_thread_view(thread_uuid, false).await { - Ok(thread) => thread, - Err(ThreadReadViewError::InvalidRequest(message)) => { - self.send_invalid_request_error(request_id, message).await; - return; - } - Err(ThreadReadViewError::Internal(message)) => { - self.send_internal_error(request_id, message).await; - return; - } - }; - - let retrieval_override = if let Some(loaded_thread) = loaded_thread.as_ref() { - Some(thread_epiphany_retrieval_state(loaded_thread.as_ref()).await) - } else { - None - }; - let watcher_snapshot = if let Some(loaded_thread) = loaded_thread.as_ref() { - let config_snapshot = loaded_thread.config_snapshot().await; - self.epiphany_invalidation_manager - .ensure_thread_watch(&thread_id, &config_snapshot.cwd) - .await; - Some( - self.epiphany_invalidation_manager - .snapshot(&thread_id) - .await, - ) - } else { - None - }; - let surface = derive_epiphany_freshness_surface(EpiphanyFreshnessResponseInput { - thread_id, - loaded: loaded_thread.is_some(), - state: thread.epiphany_state.as_ref(), - retrieval_override: retrieval_override.as_ref(), - watcher_snapshot: watcher_snapshot - .as_ref() - .map(epiphany_freshness_watcher_snapshot), - }); - let response = protocol_freshness_response_from_surface(surface); - self.outgoing.send_response(request_id, response).await; - } - - pub(super) async fn thread_epiphany_context( - &self, - request_id: ConnectionRequestId, - params: ThreadEpiphanyContextParams, - ) { - let thread_id = params.thread_id.clone(); - let thread_uuid = match ThreadId::from_string(&thread_id) { - Ok(id) => id, - Err(err) => { - self.send_invalid_request_error(request_id, format!("invalid thread id: {err}")) - .await; - return; - } - }; - - let loaded = self.thread_manager.get_thread(thread_uuid).await.is_ok(); - let thread = match self.read_thread_view(thread_uuid, false).await { - Ok(thread) => thread, - Err(ThreadReadViewError::InvalidRequest(message)) => { - self.send_invalid_request_error(request_id, message).await; - return; - } - Err(ThreadReadViewError::Internal(message)) => { - self.send_internal_error(request_id, message).await; - return; - } - }; - - let core_params = protocol_context_params_to_core(¶ms); - let response = map_epiphany_context_response( - thread_id, - loaded, - thread.epiphany_state.as_ref(), - &core_params, - ); - self.outgoing.send_response(request_id, response).await; - } - - pub(super) async fn thread_epiphany_graph_query( - &self, - request_id: ConnectionRequestId, - params: ThreadEpiphanyGraphQueryParams, - ) { - let thread_id = params.thread_id.clone(); - let thread_uuid = match ThreadId::from_string(&thread_id) { - Ok(id) => id, - Err(err) => { - self.send_invalid_request_error(request_id, format!("invalid thread id: {err}")) - .await; - return; - } - }; - - let loaded = self.thread_manager.get_thread(thread_uuid).await.is_ok(); - let thread = match self.read_thread_view(thread_uuid, false).await { - Ok(thread) => thread, - Err(ThreadReadViewError::InvalidRequest(message)) => { - self.send_invalid_request_error(request_id, message).await; - return; - } - Err(ThreadReadViewError::Internal(message)) => { - self.send_internal_error(request_id, message).await; - return; - } - }; - - let core_query = protocol_graph_query_to_core(¶ms.query); - let response = map_epiphany_graph_query_response( - thread_id, - loaded, - thread.epiphany_state.as_ref(), - &core_query, - ); - self.outgoing.send_response(request_id, response).await; - } - - pub(super) async fn thread_epiphany_reorient_result( - &self, - request_id: ConnectionRequestId, - params: ThreadEpiphanyReorientResultParams, - ) { - let ThreadEpiphanyReorientResultParams { - thread_id, - binding_id, - } = params; - let binding_id = binding_id.unwrap_or_else(|| EPIPHANY_REORIENT_LAUNCH_BINDING_ID.into()); - - let thread_uuid = match ThreadId::from_string(&thread_id) { - Ok(id) => id, - Err(err) => { - self.send_invalid_request_error(request_id, format!("invalid thread id: {err}")) - .await; - return; - } - }; - - let loaded_thread = self.thread_manager.get_thread(thread_uuid).await.ok(); - let thread = match self.read_thread_view(thread_uuid, false).await { - Ok(thread) => thread, - Err(ThreadReadViewError::InvalidRequest(message)) => { - self.send_invalid_request_error(request_id, message).await; - return; - } - Err(ThreadReadViewError::Internal(message)) => { - self.send_internal_error(request_id, message).await; - return; - } - }; - - let source = if loaded_thread.is_some() { - EpiphanySurfaceSource::Live - } else { - EpiphanySurfaceSource::Stored - }; - let runtime_store_path = if let Some(loaded_thread) = loaded_thread.as_ref() { - Some(runtime_spine_store_path(loaded_thread).await) - } else { - None - }; - let response = map_epiphany_reorient_result_response(EpiphanyReorientResultResponseInput { - thread_id: thread_uuid.to_string(), - source, - binding_id, - state: thread.epiphany_state.as_ref(), - runtime_store_path: runtime_store_path.as_deref(), - }) - .await; - - self.outgoing.send_response(request_id, response).await; - } - - -} - -async fn thread_epiphany_retrieval_state(thread: &CodexThread) -> EpiphanyRetrievalState { - let config = thread.config_snapshot().await; - let codex_home = thread.codex_home().await; - epiphany_retrieval_state_for_paths(config.cwd.to_path_buf(), codex_home).await -} diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_thread_host.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_thread_host.rs deleted file mode 100644 index ced69416..00000000 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_thread_host.rs +++ /dev/null @@ -1,124 +0,0 @@ -pub(super) use super::legacy_epiphany_rollout::load_epiphany_state_from_rollout_path; -use codex_core::CodexThread; -use codex_protocol::protocol::TokenUsageInfo; -use epiphany_codex_bridge::mutation_service::EpiphanyMutationHost; -use epiphany_codex_bridge::mutation_service::load_authoritative_accepted_state; -use epiphany_codex_bridge::pressure::EpiphanyTokenUsageSnapshot; -use epiphany_codex_bridge::state::client_visible_epiphany_state_for_paths; -use epiphany_codex_bridge::state::thread_state_mirror_id_from_rollout_path; -use epiphany_state_model::EpiphanyThreadState; - -pub(super) struct EpiphanyCodexThreadHost<'a> { - thread: &'a CodexThread, -} - -impl<'a> EpiphanyCodexThreadHost<'a> { - pub(super) fn new(thread: &'a CodexThread) -> Self { - Self { thread } - } -} - -impl EpiphanyMutationHost for EpiphanyCodexThreadHost<'_> { - async fn epiphany_thread_id(&self) -> String { - thread_state_mirror_id_from_rollout_path(self.thread.rollout_path().as_deref()) - } - - async fn epiphany_state(&self) -> Option { - let store = runtime_spine_store_path(self.thread).await; - match load_authoritative_accepted_state(&store) { - Ok(Some(state)) => Some(state), - Ok(None) => load_legacy_rollout_state(self.thread).await, - Err(error) => { - tracing::error!(%error, store = %store.display(), "failed to read authoritative unified Epiphany acceptance state"); - None - } - } - } - - async fn epiphany_reference_turn_id(&self) -> Option { - self.thread.reference_turn_id().await - } - - async fn epiphany_runtime_spine_store_path(&self) -> std::path::PathBuf { - runtime_spine_store_path(self.thread).await - } - - async fn client_visible_epiphany_state( - &self, - fallback: EpiphanyThreadState, - ) -> EpiphanyThreadState { - client_visible_live_thread_epiphany_state(self.thread, fallback).await - } -} - -pub(super) async fn live_thread_epiphany_state( - thread: &CodexThread, -) -> Option { - let state = load_authoritative_epiphany_state(thread).await?; - let config = thread.config_snapshot().await; - let codex_home = thread.codex_home().await; - let rollout_path = thread.rollout_path(); - let mirror_thread_id = thread_state_mirror_id_from_rollout_path(rollout_path.as_deref()); - Some( - client_visible_epiphany_state_for_paths( - state, - config.cwd.as_path(), - codex_home, - Some(mirror_thread_id.as_str()), - ) - .await, - ) -} - -pub(super) async fn load_authoritative_epiphany_state( - thread: &CodexThread, -) -> Option { - let store = runtime_spine_store_path(thread).await; - match load_authoritative_accepted_state(&store) { - Ok(Some(state)) => Some(state), - Ok(None) => load_legacy_rollout_state(thread).await, - Err(error) => { - tracing::error!(%error, store = %store.display(), "failed to read unified Epiphany state"); - None - } - } -} - -pub(super) async fn runtime_spine_store_path(thread: &CodexThread) -> std::path::PathBuf { - thread - .config_snapshot() - .await - .cwd - .join("state") - .join("runtime-spine.msgpack") - .to_path_buf() -} - -async fn load_legacy_rollout_state(thread: &CodexThread) -> Option { - let rollout_path = thread.rollout_path()?; - match load_epiphany_state_from_rollout_path(&rollout_path).await { - Ok(state) => state, - Err(error) => { - tracing::error!(%error, rollout = %rollout_path.display(), "failed to read legacy Epiphany rollout state"); - None - } - } -} - -pub(super) async fn client_visible_live_thread_epiphany_state( - thread: &CodexThread, - fallback: EpiphanyThreadState, -) -> EpiphanyThreadState { - live_thread_epiphany_state(thread).await.unwrap_or(fallback) -} - -pub(super) fn epiphany_token_usage_snapshot( - info: Option<&TokenUsageInfo>, -) -> Option { - info.map(|info| EpiphanyTokenUsageSnapshot { - total_tokens: info.total_token_usage.total_tokens, - last_turn_tokens: info.last_token_usage.total_tokens, - model_context_window: info.model_context_window, - model_auto_compact_token_limit: info.model_auto_compact_token_limit, - }) -} diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor/legacy_epiphany_rollout.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor/legacy_epiphany_rollout.rs deleted file mode 100644 index c19c9145..00000000 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor/legacy_epiphany_rollout.rs +++ /dev/null @@ -1,262 +0,0 @@ -use std::path::Path; - -use codex_protocol::models::ResponseItem; -use codex_protocol::protocol::EventMsg; -use codex_protocol::protocol::RolloutItem; -use codex_protocol::protocol::RolloutLine; -use epiphany_state_model::EpiphanyStateItem; -use epiphany_state_model::EpiphanyThreadState; - -enum LegacyReplayItem { - Codex(RolloutItem), - Epiphany(EpiphanyStateItem), -} - -#[derive(Default)] -struct LegacySegment { - turn_id: Option, - user_turn: bool, - state: Option, -} - -fn compatible(active: Option<&str>, item: Option<&str>) -> bool { - active.is_none_or(|active| item.is_none_or(|item| item == active)) -} - -fn finish(segment: LegacySegment, state: &mut Option, rollbacks: &mut usize) { - if *rollbacks > 0 && segment.user_turn { - *rollbacks -= 1; - } else if state.is_none() - && (segment.user_turn || (segment.turn_id.is_none() && segment.state.is_some())) - { - *state = segment.state; - } -} - -fn is_out_of_band(segment: &LegacySegment) -> bool { - segment.turn_id.is_none() && !segment.user_turn && segment.state.is_some() -} - -fn latest_legacy_epiphany_state( - items: &[LegacyReplayItem], -) -> Result, String> { - let mut state = None; - let mut rollbacks = 0usize; - let mut segment: Option = None; - - for item in items.iter().rev() { - if segment.as_ref().is_some_and(is_out_of_band) - && let Some(segment) = segment.take() - { - finish(segment, &mut state, &mut rollbacks); - } - if state.is_some() { - break; - } - - match item { - LegacyReplayItem::Codex(RolloutItem::EventMsg(EventMsg::ThreadRolledBack(event))) => { - rollbacks = rollbacks - .saturating_add(usize::try_from(event.num_turns).unwrap_or(usize::MAX)); - } - LegacyReplayItem::Codex(RolloutItem::EventMsg(EventMsg::TurnComplete(event))) => { - let segment = segment.get_or_insert_with(LegacySegment::default); - segment.turn_id.get_or_insert_with(|| event.turn_id.clone()); - } - LegacyReplayItem::Codex(RolloutItem::EventMsg(EventMsg::TurnAborted(event))) => { - if let Some(turn_id) = &event.turn_id { - segment - .get_or_insert_with(LegacySegment::default) - .turn_id - .get_or_insert_with(|| turn_id.clone()); - } - } - LegacyReplayItem::Codex(RolloutItem::EventMsg(EventMsg::UserMessage(_))) => { - segment.get_or_insert_with(LegacySegment::default).user_turn = true; - } - LegacyReplayItem::Codex(RolloutItem::ResponseItem(ResponseItem::Message { - role, - .. - })) if role == "user" => { - segment.get_or_insert_with(LegacySegment::default).user_turn = true; - } - LegacyReplayItem::Epiphany(item) => { - let segment = segment.get_or_insert_with(LegacySegment::default); - if segment.turn_id.is_none() { - segment.turn_id = item.turn_id.clone(); - } - if compatible(segment.turn_id.as_deref(), item.turn_id.as_deref()) - && segment.state.is_none() - { - segment.state = Some(item.state.clone()); - } - } - LegacyReplayItem::Codex(RolloutItem::EventMsg(EventMsg::TurnStarted(event))) => { - if segment.as_ref().is_some_and(|segment| { - compatible(segment.turn_id.as_deref(), Some(event.turn_id.as_str())) - }) && let Some(segment) = segment.take() - { - finish(segment, &mut state, &mut rollbacks); - } - } - LegacyReplayItem::Codex(_) => {} - } - } - - if let Some(segment) = segment { - finish(segment, &mut state, &mut rollbacks); - } - Ok(state) -} - -pub(super) async fn load_epiphany_state_from_rollout_path( - path: &Path, -) -> Result, String> { - let text = tokio::fs::read_to_string(path) - .await - .map_err(|error| format!("failed to read rollout `{}`: {error}", path.display()))?; - let mut items = Vec::new(); - for line in text.lines().filter(|line| !line.trim().is_empty()) { - if let Some(item) = parse_replay_line(line)? { - items.push(item); - } - } - latest_legacy_epiphany_state(&items) -} - -fn parse_replay_line(line: &str) -> Result, String> { - let Ok(value) = serde_json::from_str::(line) else { - return Ok(None); - }; - if value.get("type").and_then(serde_json::Value::as_str) == Some("epiphany_state") { - let payload = value - .get("payload") - .cloned() - .ok_or_else(|| "legacy Epiphany rollout item is missing payload".to_string())?; - let item = serde_json::from_value(payload) - .map_err(|error| format!("invalid legacy Epiphany rollout payload: {error}"))?; - Ok(Some(LegacyReplayItem::Epiphany(item))) - } else { - Ok(serde_json::from_value::(value) - .ok() - .map(|line| LegacyReplayItem::Codex(line.item))) - } -} - -#[cfg(test)] -mod tests { - use super::*; - use codex_protocol::config_types::ModeKind; - use codex_protocol::protocol::ThreadRolledBackEvent; - use codex_protocol::protocol::TurnCompleteEvent; - use codex_protocol::protocol::TurnStartedEvent; - use codex_protocol::protocol::UserMessageEvent; - - #[test] - fn codex_event_loop_has_no_epiphany_automation_authority() { - let event_loop = include_str!("../bespoke_event_handling.rs"); - let processor = include_str!("../codex_message_processor.rs"); - let thread_state = include_str!("../thread_state.rs"); - - assert!(!event_loop.contains("maybe_run_epiphany")); - assert!(!processor.contains("mod epiphany_automation")); - assert!(!thread_state.contains("epiphany_checkpoint_intervention")); - } - use epiphany_state_model::EpiphanyStateItem; - - fn state(id: &str) -> EpiphanyThreadState { - EpiphanyThreadState { - revision: 1, - last_updated_turn_id: Some(id.to_string()), - ..Default::default() - } - } - - fn turn(id: &str, state: EpiphanyThreadState) -> Vec { - vec![ - LegacyReplayItem::Codex(RolloutItem::EventMsg(EventMsg::TurnStarted( - TurnStartedEvent { - turn_id: id.to_string(), - started_at: None, - model_context_window: None, - collaboration_mode_kind: ModeKind::Default, - }, - ))), - LegacyReplayItem::Codex(RolloutItem::EventMsg(EventMsg::UserMessage( - UserMessageEvent { - message: id.to_string(), - images: None, - local_images: Vec::new(), - text_elements: Vec::new(), - }, - ))), - LegacyReplayItem::Epiphany(EpiphanyStateItem { - turn_id: Some(id.to_string()), - state, - }), - LegacyReplayItem::Codex(RolloutItem::EventMsg(EventMsg::TurnComplete( - TurnCompleteEvent { - turn_id: id.to_string(), - last_agent_message: None, - completed_at: None, - duration_ms: None, - time_to_first_token_ms: None, - }, - ))), - ] - } - - #[test] - fn returns_latest_surviving_legacy_state() { - let first = state("one"); - let second = state("two"); - let mut items = turn("one", first); - items.extend(turn("two", second.clone())); - assert_eq!(latest_legacy_epiphany_state(&items), Ok(Some(second))); - } - - #[test] - fn skips_rolled_back_legacy_state() { - let first = state("one"); - let mut items = turn("one", first.clone()); - items.extend(turn("two", state("two"))); - items.push(LegacyReplayItem::Codex(RolloutItem::EventMsg( - EventMsg::ThreadRolledBack(ThreadRolledBackEvent { num_turns: 1 }), - ))); - assert_eq!(latest_legacy_epiphany_state(&items), Ok(Some(first))); - } - - #[test] - fn rejects_malformed_legacy_state_payload() { - let line = serde_json::json!({ - "timestamp": "2026-07-12T00:00:00Z", - "type": "epiphany_state", - "payload": { "turn_id": "not-the-legacy-shape" } - }); - assert!(parse_replay_line(&line.to_string()).is_err()); - } - - #[test] - fn recognizes_only_the_historical_raw_line_tag() { - let expected = state("raw-line"); - let line = serde_json::json!({ - "timestamp": "2026-07-12T00:00:00Z", - "type": "epiphany_state", - "payload": { - "turn_id": "raw-line", - "state": expected - } - }); - let Some(LegacyReplayItem::Epiphany(item)) = - parse_replay_line(&line.to_string()).expect("parse historical line") - else { - panic!("expected quarantined Epiphany migration item"); - }; - assert_eq!(item.turn_id.as_deref(), Some("raw-line")); - assert_eq!(item.state, state("raw-line")); - - assert!(parse_replay_line(r#"{"type":"future_unknown","payload":{}}"#) - .expect("unknown line should remain nonfatal to migration scan") - .is_none()); - } -} diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor/review_routes.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor/review_routes.rs index 35693ae9..f41337f2 100644 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor/review_routes.rs +++ b/vendor/codex/codex-rs/app-server/src/codex_message_processor/review_routes.rs @@ -141,8 +141,6 @@ impl CodexMessageProcessor { match read_summary_from_rollout(rollout_path.as_path(), fallback_provider).await { Ok(summary) => { let mut thread = summary_to_thread(summary, &self.config.cwd); - thread.epiphany_state = - live_thread_epiphany_state(review_thread.as_ref()).await; self.thread_watch_manager .upsert_thread_silently(thread.clone()) .await; diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_archive_routes.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_archive_routes.rs index bc943dc2..e45715ce 100644 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_archive_routes.rs +++ b/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_archive_routes.rs @@ -194,17 +194,6 @@ impl CodexMessageProcessor { /*has_in_progress_turn*/ false, ); self.attach_thread_name(thread_id, &mut thread).await; - if let Some(rollout_path) = thread.path.as_deref() { - match load_epiphany_state_from_rollout_path(rollout_path).await { - Ok(epiphany_state) => { - thread.epiphany_state = epiphany_state; - } - Err(message) => { - self.send_internal_error(request_id, message).await; - return; - } - } - } let thread_id = thread.id.clone(); let response = ThreadUnarchiveResponse { thread }; self.outgoing.send_response(request_id, response).await; diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_fork_routes.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_fork_routes.rs index 2160d1bf..692f6565 100644 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_fork_routes.rs +++ b/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_fork_routes.rs @@ -267,8 +267,6 @@ impl CodexMessageProcessor { return; } - thread.epiphany_state = live_thread_epiphany_state(forked_thread.as_ref()).await; - self.thread_watch_manager .upsert_thread_silently(thread.clone()) .await; diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_projection.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_projection.rs index 4fab78ec..dcca1525 100644 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_projection.rs +++ b/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_projection.rs @@ -248,7 +248,6 @@ pub(crate) fn thread_from_stored_thread( source: source.into(), git_info, name: thread.name, - epiphany_state: None, turns: Vec::new(), }; (thread, history) @@ -709,7 +708,6 @@ pub(crate) fn build_thread_from_snapshot( source: config_snapshot.session_source.clone().into(), git_info: None, name: None, - epiphany_state: None, turns: Vec::new(), } } @@ -765,7 +763,6 @@ pub(crate) fn summary_to_thread( source: source.into(), git_info, name: None, - epiphany_state: None, turns: Vec::new(), } } diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_read_routes.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_read_routes.rs index f4a6bd5a..112c89de 100644 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_read_routes.rs +++ b/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_read_routes.rs @@ -257,9 +257,6 @@ impl CodexMessageProcessor { ))); }; - self.apply_thread_read_epiphany_state(&mut thread, loaded_thread.as_ref()) - .await?; - let has_live_in_progress_turn = if let Some(loaded_thread) = loaded_thread.as_ref() { matches!(loaded_thread.agent_status().await, AgentStatus::Running) } else { @@ -351,27 +348,6 @@ impl CodexMessageProcessor { Ok(Some(thread)) } - async fn apply_thread_read_epiphany_state( - &self, - thread: &mut Thread, - loaded_thread: Option<&Arc>, - ) -> Result<(), ThreadReadViewError> { - if let Some(loaded_thread) = loaded_thread { - thread.epiphany_state = live_thread_epiphany_state(loaded_thread).await; - return Ok(()); - } - - let Some(rollout_path) = thread.path.as_deref() else { - thread.epiphany_state = None; - return Ok(()); - }; - - thread.epiphany_state = load_epiphany_state_from_rollout_path(rollout_path) - .await - .map_err(ThreadReadViewError::Internal)?; - Ok(()) - } - async fn apply_thread_read_rollout_fields( &self, thread_id: ThreadId, diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_resume_routes.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_resume_routes.rs index 4cb6bd1b..2a01359a 100644 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_resume_routes.rs +++ b/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_resume_routes.rs @@ -391,7 +391,6 @@ impl CodexMessageProcessor { ) .await?; self.attach_thread_name(thread_id, &mut thread).await; - thread.epiphany_state = live_thread_epiphany_state(live_thread).await; Ok(thread) } diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_start_routes.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_start_routes.rs index 0d205588..6b3d5e2e 100644 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_start_routes.rs +++ b/vendor/codex/codex-rs/app-server/src/codex_message_processor/thread_start_routes.rs @@ -281,13 +281,6 @@ impl CodexMessageProcessor { &config_snapshot, session_configured.rollout_path.clone(), ); - thread.epiphany_state = live_thread_epiphany_state(&codex_thread) - .instrument(tracing::info_span!( - "app_server.thread_start.epiphany_state", - otel.name = "app_server.thread_start.epiphany_state", - )) - .await; - // Auto-attach a thread listener when starting a thread. Self::log_listener_attach_result( Self::ensure_conversation_listener_task( diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor/token_usage_replay.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor/token_usage_replay.rs index 6299ea98..a9150a26 100644 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor/token_usage_replay.rs +++ b/vendor/codex/codex-rs/app-server/src/codex_message_processor/token_usage_replay.rs @@ -22,7 +22,6 @@ use codex_core::CodexThread; use codex_protocol::ThreadId; use codex_protocol::protocol::EventMsg; use codex_protocol::protocol::RolloutItem; -use codex_protocol::protocol::TokenUsageInfo; use crate::codex_message_processor::read_rollout_items_from_rollout; use crate::outgoing_message::ConnectionId; @@ -72,22 +71,6 @@ pub(super) async fn latest_token_usage_turn_id_from_rollout_path( latest_token_usage_turn_id_from_rollout_items(&rollout_items, thread) } -pub(super) async fn latest_token_usage_info_from_rollout_path( - rollout_path: &Path, -) -> Option { - let rollout_items = read_rollout_items_from_rollout(rollout_path).await.ok()?; - latest_token_usage_info_from_rollout_items(&rollout_items) -} - -fn latest_token_usage_info_from_rollout_items( - rollout_items: &[RolloutItem], -) -> Option { - rollout_items.iter().rev().find_map(|item| match item { - RolloutItem::EventMsg(EventMsg::TokenCount(event)) => event.info.clone(), - _ => None, - }) -} - /// Identifies the turn that was active when a `TokenCount` record appeared. /// /// The id is preferred when it still appears in the rebuilt thread. The position diff --git a/vendor/codex/codex-rs/app-server/src/thread_status.rs b/vendor/codex/codex-rs/app-server/src/thread_status.rs index a2f663d0..f78b8753 100644 --- a/vendor/codex/codex-rs/app-server/src/thread_status.rs +++ b/vendor/codex/codex-rs/app-server/src/thread_status.rs @@ -902,7 +902,6 @@ mod tests { source, git_info: None, name: None, - epiphany_state: None, turns: Vec::new(), } }