Build Rider and graph bridge slice
This commit is contained in:
parent
2901b51802
commit
afdfa230c7
25 changed files with 1421 additions and 28 deletions
26
apps/epiphany-gui/package-lock.json
generated
26
apps/epiphany-gui/package-lock.json
generated
|
|
@ -8,6 +8,7 @@
|
|||
"name": "epiphany-gui",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"@epiphanygraph/epiphany-graph-viewer": "file:../../../EpiphanyGraph/web/epiphany-graph-viewer",
|
||||
"@tauri-apps/api": "^2.0.0",
|
||||
"lucide-react": "^0.468.0",
|
||||
"react": "^18.3.1",
|
||||
|
|
@ -23,6 +24,27 @@
|
|||
"vite": "^6.0.1"
|
||||
}
|
||||
},
|
||||
"../../../EpiphanyGraph/web/epiphany-graph-viewer": {
|
||||
"name": "@epiphanygraph/epiphany-graph-viewer",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"elkjs": "^0.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.2.2",
|
||||
"@types/react-dom": "^19.2.2",
|
||||
"@vitejs/plugin-react": "^5.1.1",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"tsup": "^8.5.0",
|
||||
"typescript": "^5.9.3",
|
||||
"vite": "^7.2.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
"version": "7.29.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz",
|
||||
|
|
@ -305,6 +327,10 @@
|
|||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@epiphanygraph/epiphany-graph-viewer": {
|
||||
"resolved": "../../../EpiphanyGraph/web/epiphany-graph-viewer",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@esbuild/aix-ppc64": {
|
||||
"version": "0.25.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz",
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
"tauri": "tauri"
|
||||
},
|
||||
"dependencies": {
|
||||
"@epiphanygraph/epiphany-graph-viewer": "file:../../../EpiphanyGraph/web/epiphany-graph-viewer",
|
||||
"@tauri-apps/api": "^2.0.0",
|
||||
"lucide-react": "^0.468.0",
|
||||
"react": "^18.3.1",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,112 @@
|
|||
"repoRoot": "E:\\Projects\\EpiphanyAgent",
|
||||
"status": {
|
||||
"threadId": "019dd9d1-045b-7f13-b0e1-38ed89b31495",
|
||||
"read": {
|
||||
"thread": {
|
||||
"id": "019dd9d1-045b-7f13-b0e1-38ed89b31495",
|
||||
"epiphanyState": {
|
||||
"graphs": {
|
||||
"architecture": {
|
||||
"nodes": [
|
||||
{
|
||||
"id": "gui-operator-console",
|
||||
"title": "Tauri/React operator console",
|
||||
"purpose": "Human-facing surface for status, artifacts, graph state, and bounded lane actions.",
|
||||
"code_refs": [
|
||||
{
|
||||
"path": "apps/epiphany-gui/src/App.tsx",
|
||||
"start_line": 1,
|
||||
"symbol": "App"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "rider-context-bridge",
|
||||
"title": "Rider context bridge",
|
||||
"purpose": "Operator-safe source, solution, VCS, and selected-code context receipts for modeling and review.",
|
||||
"code_refs": [
|
||||
{
|
||||
"path": "tools/epiphany_rider_bridge.py",
|
||||
"start_line": 1,
|
||||
"symbol": "status_rider"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "unity-runtime-bridge",
|
||||
"title": "Unity runtime bridge",
|
||||
"purpose": "Pinned-editor runtime, package, compilation, probe, and test receipts for Unity projects.",
|
||||
"code_refs": [
|
||||
{
|
||||
"path": "tools/epiphany_unity_bridge.py",
|
||||
"start_line": 1,
|
||||
"symbol": "probe_unity"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source_id": "gui-operator-console",
|
||||
"target_id": "rider-context-bridge",
|
||||
"kind": "requests-source-context",
|
||||
"label": "Rider facts"
|
||||
},
|
||||
{
|
||||
"source_id": "gui-operator-console",
|
||||
"target_id": "unity-runtime-bridge",
|
||||
"kind": "requests-runtime-facts",
|
||||
"label": "Unity facts"
|
||||
}
|
||||
]
|
||||
},
|
||||
"dataflow": {
|
||||
"nodes": [
|
||||
{
|
||||
"id": "operator-bridge-flow",
|
||||
"title": "Operator bridge flow",
|
||||
"purpose": "GUI button or Rider plugin action writes an artifact, then Epiphany reads the projected receipt."
|
||||
},
|
||||
{
|
||||
"id": "graph-review-flow",
|
||||
"title": "Graph review flow",
|
||||
"purpose": "Modeling state renders into a graph viewer, code refs become Rider-friendly navigation targets."
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source_id": "operator-bridge-flow",
|
||||
"target_id": "graph-review-flow",
|
||||
"kind": "feeds-review"
|
||||
}
|
||||
]
|
||||
},
|
||||
"links": [
|
||||
{
|
||||
"dataflow_node_id": "operator-bridge-flow",
|
||||
"architecture_node_id": "gui-operator-console",
|
||||
"relationship": "operator-surface"
|
||||
},
|
||||
{
|
||||
"dataflow_node_id": "operator-bridge-flow",
|
||||
"architecture_node_id": "rider-context-bridge",
|
||||
"relationship": "source-organ"
|
||||
},
|
||||
{
|
||||
"dataflow_node_id": "operator-bridge-flow",
|
||||
"architecture_node_id": "unity-runtime-bridge",
|
||||
"relationship": "runtime-organ"
|
||||
},
|
||||
{
|
||||
"dataflow_node_id": "graph-review-flow",
|
||||
"architecture_node_id": "gui-operator-console",
|
||||
"relationship": "graph-dashboard"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"scene": {
|
||||
"scene": {
|
||||
"availableActions": [
|
||||
|
|
@ -322,6 +428,45 @@
|
|||
},
|
||||
"modifiedMillis": 1777475848000
|
||||
},
|
||||
{
|
||||
"name": "rider/rider-inspect-sample",
|
||||
"path": "E:\\Projects\\EpiphanyAgent\\.epiphany-gui\\rider\\rider-inspect-sample",
|
||||
"files": [
|
||||
"rider-bridge-status.md",
|
||||
"rider-bridge-summary.json"
|
||||
],
|
||||
"summaryPath": "E:\\Projects\\EpiphanyAgent\\.epiphany-gui\\rider\\rider-inspect-sample\\rider-bridge-summary.json",
|
||||
"riderAudit": {
|
||||
"resultPath": "E:\\Projects\\EpiphanyAgent\\.epiphany-gui\\rider\\rider-inspect-sample\\rider-bridge-summary.json",
|
||||
"status": "ready",
|
||||
"workspace": "E:\\Projects\\Aetheria-Economy",
|
||||
"solutionPath": "E:\\Projects\\Aetheria-Economy\\Aetheria.sln",
|
||||
"solutionStatus": "ready",
|
||||
"riderPath": "C:\\Program Files\\JetBrains\\JetBrains Rider 2026.1.0.1\\bin\\rider64.exe",
|
||||
"installationCount": 1,
|
||||
"note": "Rider executable is available for explicit source navigation and context capture.",
|
||||
"vcs": {
|
||||
"status": "ready",
|
||||
"branch": "codex/epiphany-unity-editor-bridge",
|
||||
"dirty": false,
|
||||
"changedFiles": [
|
||||
"Assets/Editor/Epiphany/EpiphanyEditorBridge.cs"
|
||||
],
|
||||
"stagedFiles": [],
|
||||
"changedRangesKnown": true
|
||||
},
|
||||
"installations": [
|
||||
{
|
||||
"path": "C:\\Program Files\\JetBrains\\JetBrains Rider 2026.1.0.1\\bin\\rider64.exe",
|
||||
"versionHint": "JetBrains Rider 2026.1.0.1"
|
||||
}
|
||||
],
|
||||
"searchRoots": [
|
||||
"C:\\Program Files\\JetBrains"
|
||||
]
|
||||
},
|
||||
"modifiedMillis": 1777475847500
|
||||
},
|
||||
{
|
||||
"name": "mvp-loop-selfdogfood-vanilla2-20260429",
|
||||
"path": "E:\\Projects\\EpiphanyAgent\\.epiphany-dogfood\\mvp-loop-selfdogfood-vanilla2-20260429",
|
||||
|
|
|
|||
|
|
@ -52,12 +52,16 @@ async function smokeViewport(browser, viewport, screenshotPath) {
|
|||
await page.getByText("prepareCheckpoint").waitFor();
|
||||
await page.getByRole("heading", { name: "Environment" }).waitFor();
|
||||
await page.getByText("Unity Editor").waitFor();
|
||||
await page.getByText("Rider").waitFor();
|
||||
await page.getByRole("heading", { name: "Rider", exact: true }).waitFor();
|
||||
await page.getByText("Aetheria.sln").waitFor();
|
||||
await page.getByRole("heading", { name: "Planning", exact: true }).waitFor();
|
||||
await page.getByRole("heading", { name: "Build the planning dashboard slice", exact: true }).waitFor();
|
||||
await page.getByRole("heading", { name: "State Graph", exact: true }).waitFor();
|
||||
await page.getByText("Epiphany Typed Graph").waitFor();
|
||||
await page.getByText("Role Lanes").waitFor();
|
||||
await page.getByText("Artifact Bundles").waitFor();
|
||||
await page.getByRole("button", { name: "Prepare Checkpoint" }).waitFor();
|
||||
await page.getByRole("button", { name: "Inspect Rider" }).waitFor();
|
||||
await page.getByRole("button", { name: "Adopt Draft" }).waitFor();
|
||||
await page.getByRole("button", { name: "Launch Imagination" }).waitFor();
|
||||
await page.getByRole("button", { name: "Read Imagination" }).waitFor();
|
||||
|
|
@ -73,6 +77,8 @@ async function smokeViewport(browser, viewport, screenshotPath) {
|
|||
await page.getByText("statusSnapshot sample completed.").waitFor();
|
||||
await page.getByRole("button", { name: "Coordinator Plan" }).click();
|
||||
await page.getByText("coordinatorPlan sample completed.").waitFor();
|
||||
await page.getByRole("button", { name: "Inspect Rider" }).click();
|
||||
await page.getByText("inspectRider sample completed.").waitFor();
|
||||
await page.getByRole("button", { name: "Prepare Checkpoint" }).click();
|
||||
await page.getByText("prepareCheckpoint sample completed.").waitFor();
|
||||
await page.getByRole("button", { name: "Read Imagination" }).click();
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ struct ArtifactBundle {
|
|||
comparison_path: Option<String>,
|
||||
implementation_audit: Option<ImplementationAudit>,
|
||||
runtime_audit: Option<RuntimeAudit>,
|
||||
rider_audit: Option<RiderAudit>,
|
||||
modified_millis: Option<u128>,
|
||||
}
|
||||
|
||||
|
|
@ -62,6 +63,40 @@ struct RuntimeAudit {
|
|||
search_roots: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct RiderAudit {
|
||||
result_path: String,
|
||||
status: String,
|
||||
workspace: Option<String>,
|
||||
solution_path: Option<String>,
|
||||
solution_status: Option<String>,
|
||||
rider_path: Option<String>,
|
||||
installation_count: Option<u64>,
|
||||
note: Option<String>,
|
||||
vcs: Option<RiderVcsAudit>,
|
||||
installations: Vec<RiderInstallation>,
|
||||
search_roots: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct RiderVcsAudit {
|
||||
status: Option<String>,
|
||||
branch: Option<String>,
|
||||
dirty: Option<bool>,
|
||||
changed_files: Vec<String>,
|
||||
staged_files: Vec<String>,
|
||||
changed_ranges_known: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct RiderInstallation {
|
||||
path: Option<String>,
|
||||
version_hint: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct EditorBridgeAudit {
|
||||
|
|
@ -111,6 +146,7 @@ fn run_operator_action(
|
|||
"statusSnapshot" => run_status_snapshot(&repo_root, request),
|
||||
"coordinatorPlan" => run_coordinator_plan(&repo_root, request),
|
||||
"inspectUnity" => run_unity_inspection(&repo_root, request),
|
||||
"inspectRider" => run_rider_inspection(&repo_root, request),
|
||||
"launchImagination"
|
||||
| "readImaginationResult"
|
||||
| "acceptImagination"
|
||||
|
|
@ -130,6 +166,39 @@ fn run_operator_action(
|
|||
}
|
||||
}
|
||||
|
||||
fn run_rider_inspection(
|
||||
repo_root: &Path,
|
||||
request: StatusRequest,
|
||||
) -> Result<OperatorActionResult, String> {
|
||||
let python = find_python()?;
|
||||
let artifact_root = repo_root.join(".epiphany-gui").join("rider");
|
||||
let workspace = request
|
||||
.cwd
|
||||
.map(PathBuf::from)
|
||||
.unwrap_or_else(|| repo_root.to_path_buf());
|
||||
|
||||
let mut command = Command::new(python);
|
||||
command
|
||||
.current_dir(repo_root)
|
||||
.arg(repo_root.join("tools").join("epiphany_rider_bridge.py"))
|
||||
.arg("status")
|
||||
.arg("--project-root")
|
||||
.arg(workspace)
|
||||
.arg("--artifact-root")
|
||||
.arg(artifact_root);
|
||||
let value = run_json_command(command, "rider inspection")?;
|
||||
let status = value
|
||||
.get("status")
|
||||
.and_then(Value::as_str)
|
||||
.unwrap_or("unknown");
|
||||
Ok(OperatorActionResult {
|
||||
action: "inspectRider".to_string(),
|
||||
artifact_path: json_string(&value, "artifactPath")?,
|
||||
summary: format!("Rider bridge inspection: {status}."),
|
||||
thread_id: None,
|
||||
})
|
||||
}
|
||||
|
||||
fn run_unity_inspection(
|
||||
repo_root: &Path,
|
||||
request: StatusRequest,
|
||||
|
|
@ -417,6 +486,11 @@ fn list_artifacts(repo_root: &Path) -> Result<Vec<ArtifactBundle>, String> {
|
|||
&repo_root.join(".epiphany-gui").join("runtime"),
|
||||
"runtime/",
|
||||
)?;
|
||||
collect_artifact_root(
|
||||
&mut bundles,
|
||||
&repo_root.join(".epiphany-gui").join("rider"),
|
||||
"rider/",
|
||||
)?;
|
||||
|
||||
bundles.sort_by(|a, b| b.modified_millis.cmp(&a.modified_millis));
|
||||
Ok(bundles)
|
||||
|
|
@ -459,12 +533,14 @@ fn collect_artifact_root(
|
|||
summary_path: existing_path(&path, "epiphany-dogfood-summary.json")
|
||||
.or_else(|| existing_path(&path, "gui-action-summary.json"))
|
||||
.or_else(|| existing_path(&path, "unity-bridge-summary.json"))
|
||||
.or_else(|| existing_path(&path, "rider-bridge-summary.json"))
|
||||
.or_else(|| existing_path(&path, "status.json")),
|
||||
final_status_path: existing_path(&path, "epiphany-final-status.json")
|
||||
.or_else(|| existing_path(&path, "after-status.json")),
|
||||
comparison_path: existing_path(&path, "comparison.md"),
|
||||
implementation_audit: read_implementation_audit(&path),
|
||||
runtime_audit: read_runtime_audit(&path),
|
||||
rider_audit: read_rider_audit(&path),
|
||||
files,
|
||||
modified_millis,
|
||||
});
|
||||
|
|
@ -473,6 +549,54 @@ fn collect_artifact_root(
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn read_rider_audit(root: &Path) -> Option<RiderAudit> {
|
||||
let result_path = root.join("rider-bridge-summary.json");
|
||||
let text = fs::read_to_string(&result_path).ok()?;
|
||||
let value: Value = serde_json::from_str(&text).ok()?;
|
||||
let status = value.get("status").and_then(Value::as_str)?.to_string();
|
||||
Some(RiderAudit {
|
||||
result_path: result_path.display().to_string(),
|
||||
status,
|
||||
workspace: json_optional_string(&value, "workspace"),
|
||||
solution_path: json_optional_string(&value, "solutionPath"),
|
||||
solution_status: json_optional_string(&value, "solutionStatus"),
|
||||
rider_path: json_optional_string(&value, "riderPath"),
|
||||
installation_count: value.get("installationCount").and_then(Value::as_u64),
|
||||
note: json_optional_string(&value, "note"),
|
||||
vcs: read_rider_vcs(&value),
|
||||
installations: read_rider_installations(&value),
|
||||
search_roots: read_string_array(&value, "searchRoots"),
|
||||
})
|
||||
}
|
||||
|
||||
fn read_rider_vcs(value: &Value) -> Option<RiderVcsAudit> {
|
||||
let vcs = value.get("vcs")?;
|
||||
Some(RiderVcsAudit {
|
||||
status: json_optional_string(vcs, "status"),
|
||||
branch: json_optional_string(vcs, "branch"),
|
||||
dirty: vcs.get("dirty").and_then(Value::as_bool),
|
||||
changed_files: read_string_array(vcs, "changedFiles"),
|
||||
staged_files: read_string_array(vcs, "stagedFiles"),
|
||||
changed_ranges_known: vcs.get("changedRangesKnown").and_then(Value::as_bool),
|
||||
})
|
||||
}
|
||||
|
||||
fn read_rider_installations(value: &Value) -> Vec<RiderInstallation> {
|
||||
value
|
||||
.get("installations")
|
||||
.and_then(Value::as_array)
|
||||
.map(|items| {
|
||||
items
|
||||
.iter()
|
||||
.map(|item| RiderInstallation {
|
||||
path: json_optional_string(item, "path"),
|
||||
version_hint: json_optional_string(item, "versionHint"),
|
||||
})
|
||||
.collect()
|
||||
})
|
||||
.unwrap_or_default()
|
||||
}
|
||||
|
||||
fn read_runtime_audit(root: &Path) -> Option<RuntimeAudit> {
|
||||
let result_path = root.join("unity-bridge-summary.json");
|
||||
let text = fs::read_to_string(&result_path).ok()?;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import {
|
||||
Boxes,
|
||||
AlertTriangle,
|
||||
BriefcaseBusiness,
|
||||
CheckCircle2,
|
||||
|
|
@ -8,12 +9,15 @@ import {
|
|||
FileText,
|
||||
GitBranch,
|
||||
ListChecks,
|
||||
Map,
|
||||
Play,
|
||||
RefreshCw,
|
||||
} from "lucide-react";
|
||||
import { EpiphanyGraphViewer, validateEpiphanyGraphsState } from "@epiphanygraph/epiphany-graph-viewer";
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { loadOperatorSnapshot, runOperatorAction } from "./operatorApi";
|
||||
import type { ArtifactBundle, OperatorAction, OperatorActionResult, OperatorSnapshot, StatusRequest } from "./types";
|
||||
import type { EpiphanyCodeRef, EpiphanyGraphsState } from "@epiphanygraph/epiphany-graph-viewer";
|
||||
|
||||
const roleOrder = ["implementation", "imagination", "modeling", "verification", "reorientation"];
|
||||
const actionButtons: Array<{
|
||||
|
|
@ -29,7 +33,7 @@ const actionButtons: Array<{
|
|||
requiresReorientResult?: boolean;
|
||||
requiresPlanningDraft?: boolean;
|
||||
requiresContinueImplementation?: boolean;
|
||||
icon: "file" | "check" | "play" | "eye" | "accept" | "runtime" | "plan";
|
||||
icon: "file" | "check" | "play" | "eye" | "accept" | "runtime" | "plan" | "ide";
|
||||
}> = [
|
||||
{
|
||||
action: "statusSnapshot",
|
||||
|
|
@ -52,6 +56,13 @@ const actionButtons: Array<{
|
|||
title: "Resolve the project-pinned Unity editor and write runtime artifacts",
|
||||
icon: "runtime",
|
||||
},
|
||||
{
|
||||
action: "inspectRider",
|
||||
label: "Inspect Rider",
|
||||
runningLabel: "Inspecting",
|
||||
title: "Inspect Rider, solution, and source control status through the local bridge",
|
||||
icon: "ide",
|
||||
},
|
||||
{
|
||||
action: "prepareCheckpoint",
|
||||
label: "Prepare Checkpoint",
|
||||
|
|
@ -222,6 +233,69 @@ function statusClass(value: unknown): string {
|
|||
return "neutral";
|
||||
}
|
||||
|
||||
const emptyGraphState: EpiphanyGraphsState = {
|
||||
architecture: { nodes: [], edges: [] },
|
||||
dataflow: { nodes: [], edges: [] },
|
||||
links: [],
|
||||
};
|
||||
|
||||
function normalizeGraphState(value: any): EpiphanyGraphsState {
|
||||
if (!value || typeof value !== "object") return emptyGraphState;
|
||||
return {
|
||||
architecture: normalizeGraph(value.architecture),
|
||||
dataflow: normalizeGraph(value.dataflow),
|
||||
links: objectList(value.links).map((link) => ({
|
||||
dataflow_node_id: text(link.dataflow_node_id ?? link.dataflowNodeId, ""),
|
||||
architecture_node_id: text(link.architecture_node_id ?? link.architectureNodeId, ""),
|
||||
relationship: link.relationship ?? null,
|
||||
code_refs: normalizeCodeRefs(link.code_refs ?? link.codeRefs),
|
||||
})).filter((link) => link.dataflow_node_id && link.architecture_node_id),
|
||||
};
|
||||
}
|
||||
|
||||
function normalizeGraph(value: any) {
|
||||
return {
|
||||
nodes: objectList(value?.nodes).map((node) => ({
|
||||
id: text(node.id, ""),
|
||||
title: text(node.title ?? node.id, "Untitled node"),
|
||||
purpose: text(node.purpose ?? node.summary, "No purpose recorded."),
|
||||
mechanism: node.mechanism ?? null,
|
||||
metaphor: node.metaphor ?? null,
|
||||
status: node.status ?? null,
|
||||
code_refs: normalizeCodeRefs(node.code_refs ?? node.codeRefs),
|
||||
})).filter((node) => node.id),
|
||||
edges: objectList(value?.edges).map((edge) => ({
|
||||
id: edge.id ?? null,
|
||||
source_id: text(edge.source_id ?? edge.sourceId, ""),
|
||||
target_id: text(edge.target_id ?? edge.targetId, ""),
|
||||
kind: text(edge.kind, "link"),
|
||||
label: edge.label ?? null,
|
||||
mechanism: edge.mechanism ?? null,
|
||||
code_refs: normalizeCodeRefs(edge.code_refs ?? edge.codeRefs),
|
||||
})).filter((edge) => edge.source_id && edge.target_id),
|
||||
};
|
||||
}
|
||||
|
||||
function normalizeCodeRefs(value: any): EpiphanyCodeRef[] {
|
||||
return objectList(value).map((ref) => ({
|
||||
path: text(ref.path, ""),
|
||||
start_line: typeof ref.start_line === "number" ? ref.start_line : ref.startLine,
|
||||
end_line: typeof ref.end_line === "number" ? ref.end_line : ref.endLine,
|
||||
symbol: ref.symbol ?? null,
|
||||
note: ref.note ?? null,
|
||||
})).filter((ref) => ref.path);
|
||||
}
|
||||
|
||||
function graphRecordCount(state: EpiphanyGraphsState): number {
|
||||
return state.architecture.nodes.length + state.architecture.edges.length + state.dataflow.nodes.length + state.dataflow.edges.length + state.links.length;
|
||||
}
|
||||
|
||||
function codeRefLabel(ref: EpiphanyCodeRef): string {
|
||||
const line = ref.start_line ? `:${ref.start_line}` : "";
|
||||
const symbol = ref.symbol ? ` ${ref.symbol}` : "";
|
||||
return `${ref.path}${line}${symbol}`;
|
||||
}
|
||||
|
||||
function useSnapshot() {
|
||||
const [snapshot, setSnapshot] = useState<OperatorSnapshot | null>(null);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
|
@ -282,6 +356,7 @@ function useSnapshot() {
|
|||
|
||||
export function App() {
|
||||
const { snapshot, loading, error, request, setRequest, refresh, actionResult, runningAction, runAction } = useSnapshot();
|
||||
const [selectedCodeRef, setSelectedCodeRef] = useState<EpiphanyCodeRef | null>(null);
|
||||
const status = snapshot?.status;
|
||||
const scene = status?.scene?.scene ?? {};
|
||||
const pressure = status?.pressure?.pressure ?? {};
|
||||
|
|
@ -314,6 +389,11 @@ export function App() {
|
|||
[snapshot?.artifacts],
|
||||
);
|
||||
const latestRuntimeAudit = latestRuntimeArtifact?.runtimeAudit;
|
||||
const latestRiderArtifact = useMemo(
|
||||
() => (snapshot?.artifacts ?? []).find((artifact) => artifact.riderAudit),
|
||||
[snapshot?.artifacts],
|
||||
);
|
||||
const latestRiderAudit = latestRiderArtifact?.riderAudit;
|
||||
const implementationNoDiffPending =
|
||||
Boolean(latestArtifact?.implementationAudit) && latestArtifact?.implementationAudit?.workspaceChanged === false;
|
||||
const readyState = scene.stateStatus === "ready";
|
||||
|
|
@ -337,6 +417,13 @@ export function App() {
|
|||
const candidatePaths = latestRuntimeAudit?.candidatePaths ?? [];
|
||||
const searchRoots = latestRuntimeAudit?.searchRoots ?? [];
|
||||
const unityBridgeReady = latestRuntimeAudit?.status === "ready" && unityBridge?.exists === true;
|
||||
const epiphanyState = status?.read?.thread?.epiphanyState ?? status?.scene?.scene?.epiphanyState ?? {};
|
||||
const graphState = useMemo(() => normalizeGraphState(epiphanyState?.graphs), [epiphanyState]);
|
||||
const graphIssues = useMemo(() => validateEpiphanyGraphsState(graphState), [graphState]);
|
||||
const graphCount = graphRecordCount(graphState);
|
||||
const riderInstallations = latestRiderAudit?.installations ?? [];
|
||||
const riderSearchRoots = latestRiderAudit?.searchRoots ?? [];
|
||||
const riderChangedFiles = latestRiderAudit?.vcs?.changedFiles ?? [];
|
||||
|
||||
useEffect(() => {
|
||||
if (objectiveDrafts.length === 0) return;
|
||||
|
|
@ -507,15 +594,20 @@ export function App() {
|
|||
<article className="environmentCard">
|
||||
<div className="cardTopline">
|
||||
<h3>Rider</h3>
|
||||
<Pill tone="neutral">pending</Pill>
|
||||
<Pill tone={statusClass(latestRiderAudit?.status)}>{text(latestRiderAudit?.status, "unknown")}</Pill>
|
||||
</div>
|
||||
<dl className="facts environmentFacts">
|
||||
<div><dt>Workspace</dt><dd>{text(request.cwd ?? snapshot?.repoRoot)}</dd></div>
|
||||
<div><dt>Plugin</dt><dd>not wired</dd></div>
|
||||
<div><dt>Diagnostics</dt><dd>pending</dd></div>
|
||||
<div><dt>Diff view</dt><dd>pending</dd></div>
|
||||
<div><dt>Workspace</dt><dd>{text(latestRiderAudit?.workspace ?? request.cwd ?? snapshot?.repoRoot)}</dd></div>
|
||||
<div><dt>Solution</dt><dd>{text(latestRiderAudit?.solutionPath)}</dd></div>
|
||||
<div><dt>Rider</dt><dd>{text(latestRiderAudit?.riderPath, "missing")}</dd></div>
|
||||
<div><dt>Branch</dt><dd>{text(latestRiderAudit?.vcs?.branch)}</dd></div>
|
||||
<div><dt>Dirty</dt><dd>{text(latestRiderAudit?.vcs?.dirty)}</dd></div>
|
||||
<div><dt>Changed</dt><dd>{riderChangedFiles.length}</dd></div>
|
||||
</dl>
|
||||
<p className="environmentNote">Bridge pending.</p>
|
||||
<p className="environmentNote">{text(latestRiderAudit?.note, "Run Inspect Rider to capture source-context status.")}</p>
|
||||
<PathList title="Installations" items={riderInstallations.map((installation) => `${text(installation.versionHint)} ${text(installation.path)}`)} />
|
||||
<PathList title="Changed files" items={riderChangedFiles} />
|
||||
<PathList title="Search roots" items={riderSearchRoots} />
|
||||
</article>
|
||||
|
||||
<article className="environmentCard">
|
||||
|
|
@ -647,6 +739,45 @@ export function App() {
|
|||
</div>
|
||||
</section>
|
||||
|
||||
<section className="sectionBand graphBand">
|
||||
<SectionHeader title="State Graph" icon={<Map size={18} />} />
|
||||
<div className="graphSummary">
|
||||
<dl className="facts environmentFacts">
|
||||
<div><dt>Architecture</dt><dd>{graphState.architecture.nodes.length} nodes / {graphState.architecture.edges.length} edges</dd></div>
|
||||
<div><dt>Dataflow</dt><dd>{graphState.dataflow.nodes.length} nodes / {graphState.dataflow.edges.length} edges</dd></div>
|
||||
<div><dt>Links</dt><dd>{graphState.links.length}</dd></div>
|
||||
<div><dt>Issues</dt><dd>{graphIssues.length}</dd></div>
|
||||
</dl>
|
||||
{selectedCodeRef && (
|
||||
<div className="selectedCodeRef">
|
||||
<Boxes size={16} aria-hidden="true" />
|
||||
<span>Selected code ref</span>
|
||||
<code title={codeRefLabel(selectedCodeRef)}>{codeRefLabel(selectedCodeRef)}</code>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{graphIssues.length > 0 && (
|
||||
<div className="graphIssues">
|
||||
{graphIssues.slice(0, 4).map((issue) => (
|
||||
<Pill tone="warn" key={`${issue.scope}:${issue.message}`}>{issue.scope}: {issue.message}</Pill>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
{graphCount > 0 ? (
|
||||
<div className="graphViewerFrame">
|
||||
<EpiphanyGraphViewer
|
||||
state={graphState}
|
||||
title="Epiphany Typed Graph"
|
||||
className="embeddedGraphViewer"
|
||||
style={{ minHeight: 520 }}
|
||||
onCodeRefSelect={(codeRef) => setSelectedCodeRef(codeRef)}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<EmptyState label="No graph state loaded. Prepare a checkpoint or accept a modeling patch to grow the map." />
|
||||
)}
|
||||
</section>
|
||||
|
||||
<section className="statusGrid" aria-label="Coordinator summary">
|
||||
<Panel title="Recommendation" icon={<ClipboardCheck size={18} />}>
|
||||
<div className={`actionBanner ${statusClass(coordinator.action ?? crrc.action)}`}>
|
||||
|
|
@ -758,13 +889,14 @@ function SectionHeader({ title, icon }: { title: string; icon: React.ReactNode }
|
|||
);
|
||||
}
|
||||
|
||||
function ActionIcon({ icon }: { icon: "file" | "check" | "play" | "eye" | "accept" | "runtime" | "plan" }) {
|
||||
function ActionIcon({ icon }: { icon: "file" | "check" | "play" | "eye" | "accept" | "runtime" | "plan" | "ide" }) {
|
||||
if (icon === "file") return <FileText size={16} aria-hidden="true" />;
|
||||
if (icon === "check") return <ClipboardCheck size={16} aria-hidden="true" />;
|
||||
if (icon === "play") return <Play size={16} aria-hidden="true" />;
|
||||
if (icon === "eye") return <Eye size={16} aria-hidden="true" />;
|
||||
if (icon === "runtime") return <Database size={16} aria-hidden="true" />;
|
||||
if (icon === "plan") return <ListChecks size={16} aria-hidden="true" />;
|
||||
if (icon === "ide") return <GitBranch size={16} aria-hidden="true" />;
|
||||
return <CheckCircle2 size={16} aria-hidden="true" />;
|
||||
}
|
||||
|
||||
|
|
@ -825,6 +957,14 @@ function PlanningItem({
|
|||
function ArtifactOutcome({ artifact }: { artifact: ArtifactBundle }) {
|
||||
const audit = artifact.implementationAudit;
|
||||
const runtime = artifact.runtimeAudit;
|
||||
const rider = artifact.riderAudit;
|
||||
if (rider) {
|
||||
return (
|
||||
<Pill tone={rider.status === "ready" || rider.status === "captured" ? "ok" : "warn"}>
|
||||
Rider {rider.status}
|
||||
</Pill>
|
||||
);
|
||||
}
|
||||
if (runtime) {
|
||||
return (
|
||||
<Pill tone={runtime.status === "ready" ? "ok" : "warn"}>
|
||||
|
|
|
|||
|
|
@ -362,6 +362,56 @@ dd {
|
|||
min-height: 30px;
|
||||
}
|
||||
|
||||
.graphBand {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.graphSummary {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(240px, auto);
|
||||
gap: 12px;
|
||||
align-items: end;
|
||||
}
|
||||
|
||||
.selectedCodeRef {
|
||||
display: grid;
|
||||
grid-template-columns: auto auto minmax(0, 1fr);
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
min-width: 0;
|
||||
border: 1px solid #d9ded5;
|
||||
border-radius: 8px;
|
||||
padding: 10px 12px;
|
||||
color: #3e493f;
|
||||
background: #ffffff;
|
||||
font-size: 0.84rem;
|
||||
}
|
||||
|
||||
.selectedCodeRef span {
|
||||
color: #667168;
|
||||
font-weight: 800;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.graphIssues {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.graphViewerFrame {
|
||||
min-height: 560px;
|
||||
overflow: hidden;
|
||||
border: 1px solid #d9ded5;
|
||||
border-radius: 8px;
|
||||
background: #07101e;
|
||||
}
|
||||
|
||||
.embeddedGraphViewer {
|
||||
min-height: 560px;
|
||||
}
|
||||
|
||||
.draftPicker {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
|
@ -545,6 +595,10 @@ code {
|
|||
.planningGrid {
|
||||
grid-template-columns: repeat(2, minmax(220px, 1fr));
|
||||
}
|
||||
|
||||
.graphSummary {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ export type OperatorAction =
|
|||
| "statusSnapshot"
|
||||
| "coordinatorPlan"
|
||||
| "inspectUnity"
|
||||
| "inspectRider"
|
||||
| "prepareCheckpoint"
|
||||
| "continueImplementation"
|
||||
| "launchImagination"
|
||||
|
|
@ -66,6 +67,29 @@ export interface ArtifactBundle {
|
|||
candidatePaths?: string[];
|
||||
searchRoots?: string[];
|
||||
};
|
||||
riderAudit?: {
|
||||
resultPath: string;
|
||||
status: string;
|
||||
workspace?: string;
|
||||
solutionPath?: string;
|
||||
solutionStatus?: string;
|
||||
riderPath?: string;
|
||||
installationCount?: number;
|
||||
note?: string;
|
||||
vcs?: {
|
||||
status?: string;
|
||||
branch?: string;
|
||||
dirty?: boolean;
|
||||
changedFiles?: string[];
|
||||
stagedFiles?: string[];
|
||||
changedRangesKnown?: boolean;
|
||||
};
|
||||
installations?: Array<{
|
||||
path?: string;
|
||||
versionHint?: string;
|
||||
}>;
|
||||
searchRoots?: string[];
|
||||
};
|
||||
modifiedMillis?: number;
|
||||
}
|
||||
|
||||
|
|
|
|||
46
integrations/rider/README.md
Normal file
46
integrations/rider/README.md
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# Epiphany Rider Plugin MVP
|
||||
|
||||
This is the first Rider-side bridge surface for Epiphany.
|
||||
|
||||
It is deliberately small:
|
||||
|
||||
- show an Epiphany tool window inside Rider
|
||||
- call `tools/epiphany_rider_bridge.py status`
|
||||
- send current editor file/selection context through
|
||||
`tools/epiphany_rider_bridge.py context`
|
||||
- write operator-safe artifacts under `.epiphany-gui/rider`
|
||||
|
||||
The plugin does not talk to worker transcripts, raw results, or agent internals.
|
||||
Rider is the code view and context organ; Epiphany remains the coordinator and
|
||||
source of durable state.
|
||||
|
||||
## Build
|
||||
|
||||
The project uses the IntelliJ Platform Gradle Plugin. This machine currently
|
||||
does not have `gradle` on PATH, so the scaffold is source-ready but not yet
|
||||
locally build-verified.
|
||||
|
||||
```powershell
|
||||
cd E:\Projects\EpiphanyAgent\integrations\rider
|
||||
gradle buildPlugin
|
||||
```
|
||||
|
||||
## Runtime Contract
|
||||
|
||||
The plugin shells out to the local bridge script instead of owning protocol
|
||||
logic:
|
||||
|
||||
```powershell
|
||||
python E:\Projects\EpiphanyAgent\tools\epiphany_rider_bridge.py status --project-root <repo>
|
||||
python E:\Projects\EpiphanyAgent\tools\epiphany_rider_bridge.py context --project-root <repo> --file <file> --selection-start <line> --selection-end <line>
|
||||
```
|
||||
|
||||
Set these environment variables if needed:
|
||||
|
||||
- `EPIPHANY_REPO_ROOT`
|
||||
- `EPIPHANY_PYTHON`
|
||||
- `EPIPHANY_RIDER_ARTIFACT_ROOT`
|
||||
|
||||
The first dogfood use can also skip the plugin and use the bridge script
|
||||
directly. The point is the receipt shape, not making Rider perform authority
|
||||
the Epiphany coordinator owns.
|
||||
33
integrations/rider/build.gradle.kts
Normal file
33
integrations/rider/build.gradle.kts
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
plugins {
|
||||
id("org.jetbrains.kotlin.jvm") version "2.0.21"
|
||||
id("org.jetbrains.intellij.platform") version "2.14.0"
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
intellijPlatform {
|
||||
defaultRepositories()
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
intellijPlatform {
|
||||
rider("2026.1")
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(21)
|
||||
}
|
||||
|
||||
intellijPlatform {
|
||||
pluginConfiguration {
|
||||
id = "dev.epiphany.rider"
|
||||
name = "Epiphany"
|
||||
version = "0.1.0"
|
||||
|
||||
ideaVersion {
|
||||
sinceBuild = "261"
|
||||
}
|
||||
}
|
||||
}
|
||||
15
integrations/rider/settings.gradle.kts
Normal file
15
integrations/rider/settings.gradle.kts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "epiphany-rider"
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package dev.epiphany.rider
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import java.io.File
|
||||
import java.nio.charset.StandardCharsets
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class EpiphanyBridgeClient(private val project: Project) {
|
||||
private val projectRoot: File = File(project.basePath ?: ".").absoluteFile
|
||||
private val epiphanyRoot: File = findEpiphanyRoot()
|
||||
|
||||
fun status(): String {
|
||||
return runBridge(listOf("status", "--project-root", projectRoot.absolutePath))
|
||||
}
|
||||
|
||||
fun captureContext(filePath: String, startLine: Int?, endLine: Int?): String {
|
||||
val args = mutableListOf(
|
||||
"context",
|
||||
"--project-root",
|
||||
projectRoot.absolutePath,
|
||||
"--file",
|
||||
filePath,
|
||||
)
|
||||
if (startLine != null) {
|
||||
args.add("--selection-start")
|
||||
args.add(startLine.toString())
|
||||
}
|
||||
if (endLine != null) {
|
||||
args.add("--selection-end")
|
||||
args.add(endLine.toString())
|
||||
}
|
||||
return runBridge(args)
|
||||
}
|
||||
|
||||
private fun runBridge(args: List<String>): String {
|
||||
val script = File(epiphanyRoot, "tools/epiphany_rider_bridge.py")
|
||||
val artifactRoot = System.getenv("EPIPHANY_RIDER_ARTIFACT_ROOT")
|
||||
?: File(epiphanyRoot, ".epiphany-gui/rider").absolutePath
|
||||
val command = mutableListOf(pythonPath(), script.absolutePath)
|
||||
command.addAll(args)
|
||||
command.add("--artifact-root")
|
||||
command.add(artifactRoot)
|
||||
|
||||
val process = ProcessBuilder(command)
|
||||
.directory(epiphanyRoot)
|
||||
.redirectErrorStream(true)
|
||||
.start()
|
||||
val output = process.inputStream.readBytes().toString(StandardCharsets.UTF_8)
|
||||
process.waitFor(30, TimeUnit.SECONDS)
|
||||
return output.ifBlank { "Epiphany bridge returned no output." }
|
||||
}
|
||||
|
||||
private fun pythonPath(): String {
|
||||
return System.getenv("EPIPHANY_PYTHON")
|
||||
?: "C:\\Users\\Meta\\.cache\\codex-runtimes\\codex-primary-runtime\\dependencies\\python\\python.exe"
|
||||
}
|
||||
|
||||
private fun findEpiphanyRoot(): File {
|
||||
System.getenv("EPIPHANY_REPO_ROOT")?.let { return File(it).absoluteFile }
|
||||
var cursor: File? = projectRoot
|
||||
while (cursor != null) {
|
||||
if (File(cursor, "tools/epiphany_rider_bridge.py").exists()) {
|
||||
return cursor
|
||||
}
|
||||
cursor = cursor.parentFile
|
||||
}
|
||||
return File("E:\\Projects\\EpiphanyAgent")
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package dev.epiphany.rider
|
||||
|
||||
import com.intellij.openapi.actionSystem.AnAction
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import com.intellij.openapi.actionSystem.CommonDataKeys
|
||||
import com.intellij.openapi.ui.Messages
|
||||
|
||||
class EpiphanyCaptureContextAction : AnAction() {
|
||||
override fun actionPerformed(event: AnActionEvent) {
|
||||
val project = event.project ?: return
|
||||
val editor = event.getData(CommonDataKeys.EDITOR)
|
||||
val file = event.getData(CommonDataKeys.VIRTUAL_FILE)
|
||||
if (file == null) {
|
||||
Messages.showWarningDialog(project, "No file is selected.", "Epiphany")
|
||||
return
|
||||
}
|
||||
|
||||
val document = editor?.document
|
||||
val selection = editor?.selectionModel
|
||||
val startLine = if (document != null && selection?.hasSelection() == true) {
|
||||
document.getLineNumber(selection.selectionStart) + 1
|
||||
} else {
|
||||
null
|
||||
}
|
||||
val endLine = if (document != null && selection?.hasSelection() == true) {
|
||||
document.getLineNumber(selection.selectionEnd) + 1
|
||||
} else {
|
||||
null
|
||||
}
|
||||
|
||||
val output = EpiphanyBridgeClient(project).captureContext(file.path, startLine, endLine)
|
||||
Messages.showInfoMessage(project, output.take(1200), "Epiphany Context Captured")
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package dev.epiphany.rider
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.wm.ToolWindow
|
||||
import com.intellij.openapi.wm.ToolWindowFactory
|
||||
import com.intellij.ui.content.ContentFactory
|
||||
import java.awt.BorderLayout
|
||||
import javax.swing.JButton
|
||||
import javax.swing.JPanel
|
||||
import javax.swing.JScrollPane
|
||||
import javax.swing.JTextArea
|
||||
|
||||
class EpiphanyToolWindowFactory : ToolWindowFactory {
|
||||
override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
|
||||
val output = JTextArea()
|
||||
output.isEditable = false
|
||||
output.lineWrap = true
|
||||
output.wrapStyleWord = true
|
||||
output.text = "Epiphany Rider bridge is ready. Click Refresh to capture a source-context status receipt."
|
||||
|
||||
val refresh = JButton("Refresh")
|
||||
refresh.addActionListener {
|
||||
output.text = EpiphanyBridgeClient(project).status()
|
||||
}
|
||||
|
||||
val panel = JPanel(BorderLayout(8, 8))
|
||||
panel.add(refresh, BorderLayout.NORTH)
|
||||
panel.add(JScrollPane(output), BorderLayout.CENTER)
|
||||
|
||||
val content = ContentFactory.getInstance().createContent(panel, "", false)
|
||||
toolWindow.contentManager.addContent(content)
|
||||
}
|
||||
}
|
||||
25
integrations/rider/src/main/resources/META-INF/plugin.xml
Normal file
25
integrations/rider/src/main/resources/META-INF/plugin.xml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<idea-plugin>
|
||||
<id>dev.epiphany.rider</id>
|
||||
<name>Epiphany</name>
|
||||
<vendor>GameCult</vendor>
|
||||
|
||||
<depends>com.intellij.modules.platform</depends>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<toolWindow
|
||||
id="Epiphany"
|
||||
anchor="right"
|
||||
factoryClass="dev.epiphany.rider.EpiphanyToolWindowFactory" />
|
||||
</extensions>
|
||||
|
||||
<actions>
|
||||
<action
|
||||
id="Epiphany.CaptureContext"
|
||||
class="dev.epiphany.rider.EpiphanyCaptureContextAction"
|
||||
text="Send Context to Epiphany"
|
||||
description="Write the current Rider file and selection as an Epiphany source-context artifact.">
|
||||
<add-to-group group-id="EditorPopupMenu" anchor="last" />
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="ctrl alt E" />
|
||||
</action>
|
||||
</actions>
|
||||
</idea-plugin>
|
||||
|
|
@ -1478,7 +1478,7 @@ model/tool observations
|
|||
|
||||
The typed write path exists, the first deterministic observation/evidence distillation path exists, source-output-aware distillation now summarizes noisy tool/model output into typed evidence with final result/error/finished lines ahead of generic warnings, the first deterministic map/churn proposal path exists, proposal-quality hardening now auto-selects bounded observation clusters when ids are omitted, requires accepting recent evidence, reuses existing graph nodes by observed code refs, prioritizes stronger selected observations, rescues unanchored graph nodes by strict semantic overlap, focuses linked frontier context, reports match-kind-aware map-delta pressure, and the first verifier-backed promotion gate exists. The first map/churn safety layer also exists: promotion can reject state replacement patches that are not tied to explicit observations/evidence, that contain structurally broken subgoal, invariant, graph, frontier, checkpoint, investigation-checkpoint, or churn fields, that try to promote risky churn without a warning and stronger verifier evidence, that claim a graph expansion is low-pressure to dodge the warning gate, or that rely on substring verifier-kind accidents. The first live state notification layer also exists: accepted writes publish updated typed state plus event-level revision and typed changed fields; rejected promotions stay quiet.
|
||||
|
||||
In natural language: current Epiphany can preserve a map, show a map, project a compact scene from the map, project derived job/progress slots from the map and retrieval summary, reflect a thin launcher seam over bound work, explicitly launch or interrupt that bound work through a bounded authority surface, emit live bound-job progress notifications from runtime `agent_job_progress` events, project a read-only freshness lens over retrieval and graph staleness, layer watcher-backed invalidation telemetry onto that lens for loaded threads, project a targeted graph/evidence context shard from the map, traverse bounded graph neighborhoods and path/symbol matches from the map, project planning captures/backlog/roadmap/objective drafts without adopting them, synthesize planning material through a review-gated Imagination lane, project context pressure from token telemetry, bank an in-flight investigation packet in durable typed state, reflect that packet back into prompt/scene/context, turn those signals into a read-only resume-versus-regather verdict, recommend the next explicit CRRC action over the verdict and worker/result state, print that recommendation in a dogfood operator view, explicitly launch one bounded `reorient-worker` job from that verdict, read its result back for review, explicitly accept a completed finding into typed state, retrieve evidence for the map, draft one explicit observation/evidence patch, derive a bounded graph/frontier/churn candidate from verified evidence-backed observations with code refs, choose a small coherent observation set when the caller does not provide one, favor the strongest selected observation when drafting that candidate, reject or accept a verified candidate, apply explicit map/evidence/churn/planning edits, notify clients after successful writes, and sanity-check those edits before they hit the ledger. It still does not invalidate stale graph regions automatically, run scheduler automation over the fixed lanes, adopt objective drafts without a human gate, or coordinate broad specialist ownership. Teeth are installed; chewing is supervised; the first bell rings; the first wall board exists; the first shift board exists; the first freshness clipboard exists; the first door sensor now exists too; the first binder lens exists; the first graph-walk lens exists; the first planning wall exists; the first pressure gauge exists; the first ember packet exists; the first verdict slip now exists too; the first bounded launch lever and stop switch now exist too; the first explicit wakeup-hand now exists too; the first coordinator clipboard now exists too; the first operator readout exists too; Imagination now has a fenced workbench. The next slice is the EpiphanyGraph-backed GUI graph dashboard, Rider context bridge, and Rider plugin MVP so the next dogfood run can be inspected through real tools instead of stale backlog archaeology.
|
||||
In natural language: current Epiphany can preserve a map, show a map, project a compact scene from the map, project derived job/progress slots from the map and retrieval summary, reflect a thin launcher seam over bound work, explicitly launch or interrupt that bound work through a bounded authority surface, emit live bound-job progress notifications from runtime `agent_job_progress` events, project a read-only freshness lens over retrieval and graph staleness, layer watcher-backed invalidation telemetry onto that lens for loaded threads, project a targeted graph/evidence context shard from the map, traverse bounded graph neighborhoods and path/symbol matches from the map, render typed graph state in the GUI through the adjacent EpiphanyGraph viewer, project planning captures/backlog/roadmap/objective drafts without adopting them, synthesize planning material through a review-gated Imagination lane, project context pressure from token telemetry, bank an in-flight investigation packet in durable typed state, reflect that packet back into prompt/scene/context, turn those signals into a read-only resume-versus-regather verdict, recommend the next explicit CRRC action over the verdict and worker/result state, print that recommendation in a dogfood operator view, explicitly launch one bounded `reorient-worker` job from that verdict, read its result back for review, explicitly accept a completed finding into typed state, retrieve evidence for the map, draft one explicit observation/evidence patch, derive a bounded graph/frontier/churn candidate from verified evidence-backed observations with code refs, choose a small coherent observation set when the caller does not provide one, favor the strongest selected observation when drafting that candidate, reject or accept a verified candidate, apply explicit map/evidence/churn/planning edits, notify clients after successful writes, inspect Rider/source-context status through an operator-safe bridge, capture Rider file/selection/symbol packets as artifacts, and sanity-check those edits before they hit the ledger. It still does not invalidate stale graph regions automatically, run scheduler automation over the fixed lanes, adopt objective drafts without a human gate, coordinate broad specialist ownership, or build-verify the Rider plugin scaffold on this machine. Teeth are installed; chewing is supervised; the first bell rings; the first wall board exists; the first shift board exists; the first freshness clipboard exists; the first door sensor now exists too; the first binder lens exists; the first graph-walk lens exists; the first planning wall exists; the first pressure gauge exists; the first ember packet exists; the first verdict slip now exists too; the first bounded launch lever and stop switch now exist too; the first explicit wakeup-hand now exists too; the first coordinator clipboard now exists too; the first operator readout exists too; Imagination now has a fenced workbench; Rider now has a first source-context hand; the GUI graph is no longer dead paper. The next slice is build-verifying or packaging the Rider plugin scaffold once Gradle/wrapper support exists, installing Unity `6000.1.10f1`, and running the next bridge-equipped Aetheria dogfood pass.
|
||||
|
||||
The role board, fixed specialist templates, and first role accept paths now exist too. Current Epiphany can project implementation, Imagination/planning, modeling/checkpoint, verification/review, and reorientation ownership through `thread/epiphany/roles`, explicitly launch fixed Imagination/modeling/verification workers, read their findings back, apply reviewed Imagination planning patches and reviewed modeling graph/checkpoint patches through `thread/epiphany/roleAccept`, and keep semantic acceptance review-gated. What remains is dogfooding the operator loop until real product friction, not imagined architecture guilt, tells us the next organ.
|
||||
|
||||
|
|
|
|||
|
|
@ -304,8 +304,8 @@ Phase 6 should grow observable harness state outward from the typed spine.
|
|||
|
||||
Useful candidates:
|
||||
|
||||
1. Build the three-pronged Rider/Epiphany GUI/Unity workflow before the next Aetheria implementation dogfood run: Aetheria-side resident Unity editor package, named Unity bridge operations over that package, GUI Environment panel, EpiphanyGraph-backed GUI graph dashboard, Rider context bridge, then Rider plugin MVP.
|
||||
2. Use the next dogfood run to test the bridge-equipped loop, not to discover again that Epiphany cannot prove runtime/editor assumptions from source inspection alone.
|
||||
1. Treat the first three-pronged Rider/Epiphany GUI/Unity workflow as landed enough for local bridge testing: Aetheria-side resident Unity editor package, named Unity bridge operations over that package, GUI Environment panel, EpiphanyGraph-backed GUI graph dashboard, Rider context bridge CLI, and a Rider plugin MVP source scaffold now exist.
|
||||
2. Before the next Aetheria dogfood run, build-verify or package the Rider plugin scaffold when Gradle/wrapper support is available and install the Aetheria-pinned Unity `6000.1.10f1` editor; do not rediscover that Epiphany cannot prove runtime/editor assumptions from source inspection alone.
|
||||
3. Keep dogfood execution agent-run and auditable through the fixed-lane coordinator and GUI/operator view over the same status/artifact surfaces once the bridges exist.
|
||||
4. Keep accepted worker findings review-gated; do not convert acceptance into automatic promotion of arbitrary worker output.
|
||||
5. Keep pre-compaction intervention narrow: steer once at `shouldPrepareCompaction`, latch the compact handoff only after successful steering, then let explicit checkpointing, compact/resume/reorient, and review gates do their jobs.
|
||||
|
|
|
|||
|
|
@ -219,6 +219,15 @@ Already landed:
|
|||
- Epiphany app-server typed state and fixed-lane coordinator.
|
||||
- Modeling/checkpoint, verification/review, and reorientation specialist lanes.
|
||||
- Tauri + React operator GUI over app-server/status/artifact surfaces.
|
||||
- GUI graph dashboard using the adjacent `@epiphanygraph/epiphany-graph-viewer`
|
||||
package over typed `graphs.architecture`, `graphs.dataflow`, and
|
||||
`graphs.links`.
|
||||
- `tools/epiphany_rider_bridge.py`, which writes operator-safe Rider
|
||||
installation, solution, VCS, context, and open-ref artifacts.
|
||||
- GUI **Inspect Rider** action and Rider artifact listing.
|
||||
- `integrations/rider` frontend-only plugin scaffold for a tool window and
|
||||
Send Context to Epiphany action. This scaffold still needs build verification
|
||||
because Gradle is not installed on the current machine.
|
||||
- `tools/epiphany_unity_bridge.py`, which:
|
||||
- reads `ProjectSettings/ProjectVersion.txt`
|
||||
- resolves only the exact project-pinned Unity Hub editor
|
||||
|
|
|
|||
|
|
@ -51,7 +51,9 @@ Do not trust this file for the exact live HEAD. Always check git.
|
|||
- The current Aetheria runtime truth is blocked but legible: the project pins Unity `6000.1.10f1`, this machine currently has Hub editor `6000.4.2f1`, and the bridge wrote `.epiphany-gui/runtime/unity-inspect-1777549218802064800-23832` proving the exact editor is missing. Treat that artifact as the evidence gap until the pinned editor exists.
|
||||
- The GUI parses `implementation-result.json` into artifact metadata, surfaces the latest implementation diff/no-diff outcome, and pauses immediate `Continue Implementation` repeats when the newest artifact is a no-diff implementation audit.
|
||||
- The planning loop is now runtime-backed and operator-visible. Typed captures, backlog items, roadmap streams, Objective Drafts, and GitHub issue source refs live in `EpiphanyThreadState`, validate through revision-gated `thread/epiphany/update`, render into prompts when present, project read-only through `thread/epiphany/planning`, render in the GUI Planning panel, can be synthesized by the fixed Imagination/planning lane, and can be explicitly adopted through the artifacted `adoptObjectiveDraft` GUI action. Chat is deliberation, not an objective pipe; ideas and GitHub Issues remain planning state until explicit human adoption.
|
||||
- Next real product move: build the EpiphanyGraph-backed GUI graph dashboard, Rider context bridge, and Rider plugin MVP before another Aetheria implementation dogfood run. GitHub Issues import is deferred until the backlog source is fresh enough to deserve Imagination's attention.
|
||||
- The bridge/dashboard slice is now landed far enough to test locally. `tools/epiphany_rider_bridge.py` inspects Rider installation, solution, VCS, changed files, and captures file/selection/symbol context into `.epiphany-gui/rider` artifacts; the GUI has Inspect Rider and renders Rider audit artifacts in Environment; the GUI also embeds the adjacent EpiphanyGraph viewer over typed `graphs.architecture`, `graphs.dataflow`, and `graphs.links`.
|
||||
- A first Rider plugin scaffold lives under `integrations/rider`: tool window, Refresh status, and Send Context to Epiphany action. It shells through `tools/epiphany_rider_bridge.py` and does not own state. `gradle` is not installed on this machine, so the scaffold is not build-verified yet.
|
||||
- Next real product move: build-verify/package the Rider plugin scaffold when Gradle/wrapper support is available, install the Aetheria-pinned Unity `6000.1.10f1` editor, then run the next Aetheria dogfood pass through GUI/Rider/Unity bridge artifacts. GitHub Issues import is deferred until the backlog source is fresh enough to deserve Imagination's attention.
|
||||
- The repo is an Epiphany fork of Codex, not a Codex preset.
|
||||
- `vendor/codex` is tracked directly, not a submodule.
|
||||
- `epiphany-core` owns the heavy Epiphany organs where practical.
|
||||
|
|
@ -123,6 +125,8 @@ The current spine:
|
|||
- durable investigation checkpoint packet through typed state, prompt, scene, and context
|
||||
- distilled shared and config-backed prompt doctrine through the base prompt, rendered Epiphany state prompt files, modeling/Body, implementation/Hands, verification/Soul, reorientation/Life, coordinator/Self, and CRRC intervention surfaces
|
||||
- first Unity runtime bridge through `tools/epiphany_unity_bridge.py`, `tools/epiphany_unity_bridge_smoke.py`, GUI Inspect Unity, runtime artifact listing, and implementation prompt guardrails
|
||||
- first Rider source-context bridge through `tools/epiphany_rider_bridge.py`, `tools/epiphany_rider_bridge_smoke.py`, GUI Inspect Rider, Rider artifact listing, implementation prompt guardrails, and a source scaffold under `integrations/rider`
|
||||
- first GUI graph dashboard through the adjacent `@epiphanygraph/epiphany-graph-viewer` package over typed Epiphany graph state
|
||||
- live scene app-server smoke through `tools/epiphany_phase6_scene_smoke.py`
|
||||
- live jobs app-server smoke through `tools/epiphany_phase6_jobs_smoke.py`
|
||||
- live freshness app-server smoke through `tools/epiphany_phase6_freshness_smoke.py`
|
||||
|
|
@ -409,7 +413,9 @@ editor-resident probes/tests through
|
|||
`GameCult.Epiphany.Unity.EpiphanyEditorBridge.RunProbe`. The GUI Environment
|
||||
panel now shows the latest Unity runtime audit, resident package presence,
|
||||
execute method, installed/candidate editor paths, search roots, and artifact
|
||||
bundle details, with Rider explicitly pending until its bridge exists. Runtime
|
||||
bundle details. Rider bridge status now exists too: the GUI can inspect Rider
|
||||
installation, solution, VCS branch/dirty state, changed files, installations,
|
||||
and source-context artifacts through `tools/epiphany_rider_bridge.py`. Runtime
|
||||
execution still correctly blocks until Unity `6000.1.10f1` is installed. The
|
||||
detailed next-environment plan now lives in
|
||||
`notes/epiphany-rider-unity-integration-plan.md`: Rider is the
|
||||
|
|
@ -419,17 +425,19 @@ three-pronged: Rider is the human code view for repo state, source tree, diffs,
|
|||
diagnostics, and code refs; Epiphany GUI is the agent dashboard for objectives,
|
||||
specialist lane state, logs/artifacts, persisted state, and graph/control-flow
|
||||
views; Unity is the pinned runtime environment for tests, probes, scene
|
||||
configuration, assets, shaders, and play/edit-mode evidence. Build the
|
||||
remaining slices before the next run: EpiphanyGraph-backed GUI graph dashboard,
|
||||
Rider context bridge, and Rider plugin MVP. The Unity package is not optional decoration: scene files, prefabs,
|
||||
configuration, assets, shaders, and play/edit-mode evidence. The EpiphanyGraph
|
||||
GUI dashboard and Rider bridge CLI are now landed, and the Rider plugin MVP is
|
||||
source-scaffolded but not build-verified because Gradle is not on PATH. The
|
||||
Unity package is not optional decoration: scene files, prefabs,
|
||||
materials, shaders, ScriptableObjects, asset GUIDs, and prefab overrides must be
|
||||
inspected from inside the Unity Editor through Unity APIs, not inferred from
|
||||
serialized text unless there is no editor-level path. The adjacent
|
||||
`E:\Projects\EpiphanyGraph\web\epiphany-graph-viewer` component consumes
|
||||
`graphs.architecture`, `graphs.dataflow`, and `graphs.links` directly and is
|
||||
the preferred seed for GUI graph/control-flow diagramming. The next Aetheria
|
||||
dogfood pass should happen only after Epiphany can gather Rider/source context
|
||||
and Unity/editor runtime evidence through auditable bridges. The implementation
|
||||
now embedded in the GUI graph dashboard. The next Aetheria dogfood pass should
|
||||
happen only after the pinned Unity editor is installed and Epiphany can gather
|
||||
Rider/source context plus Unity/editor runtime evidence through auditable
|
||||
bridges. The implementation
|
||||
lane may inspect source and may use bridge artifacts as evidence, but it must
|
||||
not launch Unity directly or use installed `6000.4.2f1` as a substitute. Read
|
||||
only operator-safe projections; do not open raw worker
|
||||
|
|
|
|||
|
|
@ -65,3 +65,4 @@
|
|||
{"ts": "2026-05-01T09:11:50+01:00", "type": "implementation", "status": "ok", "note": "The Imagination planning lane landed: ThreadEpiphanyRoleId now includes imagination, app-server fixed roleLaunch/roleResult/roleAccept supports the planning-synthesis-worker, roleAccept accepts only review-gated planning patches without objective adoption, status/GUI surfaces can launch/read/accept the lane, schemas include the new role id, and tools/epiphany_phase6_role_smoke.py proves Imagination acceptance grows planning state while modeling and verification still complete."}
|
||||
{"ts": "2026-05-01T15:23:57+00:00", "type": "design", "status": "ok", "note": "Prompt doctrine now states salience explicitly: emotionally weightless checklists get parsed and forgotten under pressure, while vivid consequence-laden guardrails act as better steering surfaces. Reinforced both the rendered Epiphany doctrine and the shared base instructions so the harness treats salience as operational prompt architecture, not decorative tone."}
|
||||
{"ts": "2026-05-04T15:53:04+01:00", "type": "planning", "status": "deferred", "note": "GitHub Issues import is deferred for now because the available Aetheria backlog is likely stale enough to waste Imagination's attention. The next product move returns to the EpiphanyGraph dashboard, Rider context bridge, and Rider plugin MVP before another Aetheria dogfood run."}
|
||||
{"ts": "2026-05-04T16:12:44+01:00", "type": "implementation", "status": "ok", "note": "Bridge slice landed: the GUI now embeds the adjacent EpiphanyGraph viewer over typed graph state, `tools/epiphany_rider_bridge.py` writes operator-safe Rider installation/solution/VCS/context/open-ref artifacts, the GUI Inspect Rider action surfaces those artifacts, implementation prompts include Rider bridge guidance, and `integrations/rider` contains a frontend-only Rider plugin scaffold. `tools/epiphany_rider_bridge_smoke.py`, GUI build/visual smoke, Tauri cargo checks, and `npm run tauri -- build --debug --no-bundle` passed; plugin build remains unverified because Gradle is not installed."}
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ objective:
|
|||
explicit typed models of the codebase, active goal, evidence, and change
|
||||
machinery they are working on.
|
||||
current: >
|
||||
Make Epiphany's planning loop operable in the local GUI: visible captures,
|
||||
backlog, roadmap streams, Objective Drafts, and explicit human adoption
|
||||
before planning material becomes an implementation objective.
|
||||
Make Epiphany's local operator workflow bridge-aware: GUI graph inspection,
|
||||
Rider source-context receipts, Unity pinned-runtime receipts, and explicit
|
||||
dogfood artifacts before the next Aetheria implementation pass.
|
||||
|
||||
constraints:
|
||||
- No frontier-scale training budget.
|
||||
|
|
@ -65,7 +65,7 @@ active_subgoals:
|
|||
- Keep the supervisor out of Epiphany worker thought streams: dogfood artifacts should be operator-safe by default, with direct transcripts and raw result payloads sealed.
|
||||
- Use `tools/epiphany_agent_telemetry.py` and generated `agent-function-telemetry.json` files to inspect behavior shape without opening sealed transcripts.
|
||||
- Treat repeated no-diff implementation turns as an MVP blocker, not success. A bounded implementation pass must leave a reviewable workspace diff or an explicit reviewable failure artifact before dogfood can be called healthy.
|
||||
- Build the Rider and Unity bridges before the next Aetheria implementation dogfood run: the Aetheria-side resident Unity editor package, named Unity bridge operation planner, and GUI Environment panel are now landed; next build the EpiphanyGraph-backed GUI graph dashboard, Rider context bridge, and Rider plugin MVP.
|
||||
- Build the Rider and Unity bridges before the next Aetheria implementation dogfood run: the Aetheria-side resident Unity editor package, named Unity bridge operation planner, GUI Environment panel, EpiphanyGraph-backed GUI graph dashboard, Rider context bridge CLI, and Rider plugin MVP scaffold are now landed; the Rider plugin still needs build verification.
|
||||
- Preserve the newly landed GUI Planning view, explicit Objective Draft adoption action, and Imagination planning synthesis lane; defer GitHub Issues import until a backlog source is fresh enough to be worth feeding Imagination.
|
||||
- Treat the target workflow as three integrated surfaces: Rider is the human code/diff view, Epiphany GUI is the agent dashboard and persisted-state graph view, and Unity is the pinned runtime/test/scene environment.
|
||||
- Use `notes/epiphany-rider-unity-integration-plan.md` as the source-grounded plan for Rider-as-IDE and Unity-as-editor/runtime integration seams.
|
||||
|
|
@ -141,8 +141,9 @@ accepted_design:
|
|||
- The Imagination lane is now a fixed roleLaunch/roleResult/roleAccept specialist over the existing job-control seam: it may launch as `planning-synthesis-worker`, return a reviewable planning-only `statePatch`, and update captures/backlog/roadmap/objective drafts after explicit acceptance without adopting an objective or touching implementation/modeling state.
|
||||
- Unity integration must be editor-resident, not text-archeology-only: scene files, prefabs, materials, shaders, ScriptableObjects, asset GUIDs, prefab overrides, and serialized component fields should be inspected through a Unity Editor package using Unity APIs, with narrow mutation preview/apply commands and artifact receipts.
|
||||
- The first resident Unity editor package now lives in the Aetheria branch `codex/epiphany-unity-editor-bridge`: `Assets/Editor/Epiphany/EpiphanyEditorBridge.cs` exposes editor-resident inspect, compilation, scene, prefab, serialized-object, and reference-search probes with JSON/Markdown artifacts. Epiphany's Unity bridge detects that package and plans named probe/test commands through `GameCult.Epiphany.Unity.EpiphanyEditorBridge.RunProbe`, while runtime execution remains blocked until the exact project-pinned Unity editor is present.
|
||||
- The GUI Environment panel now reflects the latest Unity bridge runtime audit, including project-pinned editor status, resident package presence, execute method, installed/candidate editor paths, search roots, and artifact bundle details; Rider is shown as a pending environment lane until its bridge exists.
|
||||
- The adjacent EpiphanyGraph React viewer is the preferred seed for GUI graph/control-flow diagramming because it consumes `graphs.architecture`, `graphs.dataflow`, and `graphs.links` directly and exposes node/edge/code-ref inspection with machine-readable graph data behind the visual layout.
|
||||
- The GUI Environment panel now reflects latest Unity and Rider bridge audits: Unity shows project-pinned editor status, resident package presence, execute method, installed/candidate editor paths, search roots, and artifact bundle details; Rider shows executable, solution, branch, dirty state, changed files, installations, and bridge artifacts.
|
||||
- The adjacent EpiphanyGraph React viewer is now embedded in the GUI graph dashboard through the local package dependency; it consumes `graphs.architecture`, `graphs.dataflow`, and `graphs.links` directly and exposes node/edge/code-ref inspection with machine-readable graph data behind the visual layout.
|
||||
- `tools/epiphany_rider_bridge.py` is the first operator-safe Rider source-context bridge: it inspects Rider installation/solution/VCS status, captures current file/selection/symbol context packets, plans explicit Rider code-ref opens, writes `.epiphany-gui/rider` artifacts, and feeds implementation prompt guardrails without reading sealed worker streams or owning durable state.
|
||||
- GitHub Issues should import into planning captures first, not directly into active objectives. The importer should preserve repository, issue number, ids, URL, title/body, labels, milestone, assignees, author, state, timestamps, comment metadata, PR marker, and optional Projects v2 metadata while keeping GitHub as a source adapter rather than Epiphany's internal backlog model.
|
||||
- If the agent's persistent instructions, memory, workflow, or state shape are making it less coherent, slower to rehydrate, less honest, or more likely to build Jenga, the agent should ask the user to change it.
|
||||
- Epiphany should make compaction less like death and more like sleep: bank the fire before the dark, so the next waking thing finds coals instead of ash and can meaningfully resume the pattern instead of merely continuing the task.
|
||||
|
|
@ -172,6 +173,7 @@ landed_baseline:
|
|||
- Phase 6 planning substrate runtime slice: typed planning state in `EpiphanyThreadState`, prompt rendering, revision-gated update validation, read-only `thread/epiphany/planning`, scene action reflection, generated schemas, and live planning smoke coverage.
|
||||
- Phase 6 GUI planning operator slice: MVP status and Tauri/React GUI now render planning state, and `tools/epiphany_gui_action.py` exposes explicit selected Objective Draft adoption with artifacted state patch/update proof.
|
||||
- Phase 6 Imagination role lane: `thread/epiphany/roles` now exposes Imagination/planning, `roleLaunch` can launch the fixed `planning-synthesis-worker`, `roleResult` projects its finding, `roleAccept` applies planning-only patches with review-gated Objective Drafts, and the GUI/status tools can launch, read, and accept that lane.
|
||||
- Phase 6 GUI graph and Rider bridge slice: the Tauri/React GUI now embeds the adjacent EpiphanyGraph viewer over typed graph state, `tools/epiphany_rider_bridge.py` writes Rider/source-context artifacts, GUI Inspect Rider surfaces those artifacts, and `integrations/rider` scaffolds the first frontend-only Rider tool-window/context-action plugin.
|
||||
guardrails:
|
||||
- Use `tools/epiphany_phase5_smoke.py` before modifying update, distill, propose, promote, read-projection, or notification behavior.
|
||||
- Use `tools/epiphany_phase6_scene_smoke.py` before modifying scene projection behavior.
|
||||
|
|
@ -192,6 +194,7 @@ landed_baseline:
|
|||
- Use `tools/epiphany_mvp_coordinator_smoke.py` before modifying the fixed-lane MVP coordinator endpoint or runner.
|
||||
- Use `tools/epiphany_phase6_role_smoke.py` before modifying explicit role launch/read-back/acceptance behavior.
|
||||
- Use `tools/epiphany_unity_bridge_smoke.py` before modifying the Unity editor/runtime bridge.
|
||||
- Use `tools/epiphany_rider_bridge_smoke.py` before modifying the Rider source-context bridge.
|
||||
- Use `tools/epiphany_mvp_live_specialist.py` before claiming live specialist execution still works end to end.
|
||||
- Use `npm run build`, `npm run smoke:visual`, `cargo fmt --check`, `cargo check`, and `npm run tauri -- build --debug --no-bundle` under `apps/epiphany-gui` before claiming GUI operator changes are usable.
|
||||
- Use focused scene/jobs/context/pressure/reorient/protocol/schema checks for reflection-only changes.
|
||||
|
|
@ -212,5 +215,5 @@ rejected_paths:
|
|||
reason: persistent state that accumulates every local truth becomes memory cruft and weakens rehydration
|
||||
|
||||
current_status:
|
||||
summary: Phase 1 durable state through Phase 6 GUI/coordinator/specialist/CRRC MVP surfaces are landed. The Aetheria supervised run found and fixed real harness wounds in coordinator policy, no-diff audits, stale job/result projection, and reorient acceptance. The Unity incident proved the next blocker is environment access, so `notes/epiphany-rider-unity-integration-plan.md` governs the Rider/Epiphany GUI/Unity workflow. Planning is now an operator-visible loop: typed captures, backlog items, roadmap streams, Objective Drafts, and GitHub source refs live in Epiphany state, render into prompts, validate through revision-gated updates, project through `thread/epiphany/planning`, render in the GUI, can be synthesized by the fixed Imagination/planning lane, and can be explicitly adopted into the active objective through an artifacted GUI action.
|
||||
next_action: Build the EpiphanyGraph-backed GUI graph dashboard, Rider context bridge, and Rider plugin MVP before another Aetheria implementation dogfood run. Defer GitHub Issues import until the backlog source is fresh enough to be useful.
|
||||
summary: Phase 1 durable state through Phase 6 GUI/coordinator/specialist/CRRC MVP surfaces are landed. The Aetheria supervised run found and fixed real harness wounds in coordinator policy, no-diff audits, stale job/result projection, and reorient acceptance. The Unity incident proved the next blocker is environment access, so `notes/epiphany-rider-unity-integration-plan.md` governs the Rider/Epiphany GUI/Unity workflow. Planning is now an operator-visible loop, the GUI renders typed graph state through the adjacent EpiphanyGraph viewer, and Rider now has an operator-safe source-context bridge plus a first plugin scaffold. Runtime Unity execution remains blocked until the exact project-pinned editor exists.
|
||||
next_action: Build-verify or package the Rider plugin scaffold when Gradle/wrapper support is available, install the Aetheria-pinned Unity 6000.1.10f1 editor, then run the next Aetheria dogfood pass through the GUI/Rider/Unity bridge surfaces. Defer GitHub Issues import until the backlog source is fresh enough to be useful.
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ from epiphany_mvp_status import sanitize_for_operator
|
|||
from epiphany_phase5_smoke import AppServerClient
|
||||
from epiphany_phase5_smoke import ROOT
|
||||
from epiphany_phase6_reorient_launch_smoke import BINDING_ID as REORIENT_BINDING_ID
|
||||
from epiphany_rider_bridge import bridge_guidance as rider_bridge_guidance
|
||||
from epiphany_unity_bridge import bridge_guidance as unity_bridge_guidance
|
||||
|
||||
|
||||
|
|
@ -353,6 +354,10 @@ def unity_guidance(cwd: Path) -> str:
|
|||
return unity_bridge_guidance(cwd, ROOT)
|
||||
|
||||
|
||||
def rider_guidance(cwd: Path) -> str:
|
||||
return rider_bridge_guidance(cwd, ROOT)
|
||||
|
||||
|
||||
def first_present(value: dict[str, Any], *paths: tuple[str, ...]) -> Any:
|
||||
for path in paths:
|
||||
item = nested_get(value, *path)
|
||||
|
|
@ -436,6 +441,7 @@ def build_implementation_prompt(status: dict[str, Any], cwd: Path) -> str:
|
|||
scratch_summary=prompt_text(scratch.get("summary")),
|
||||
accepted_evidence="\n".join(evidence_lines),
|
||||
unity_guidance=unity_guidance(cwd),
|
||||
rider_guidance=rider_guidance(cwd),
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
434
tools/epiphany_rider_bridge.py
Normal file
434
tools/epiphany_rider_bridge.py
Normal file
|
|
@ -0,0 +1,434 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
from datetime import datetime
|
||||
from datetime import timezone
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import subprocess
|
||||
import time
|
||||
from typing import Any
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
DEFAULT_ARTIFACT_ROOT = ROOT / ".epiphany-gui" / "rider"
|
||||
RIDER_EXECUTABLE_NAMES = ("rider64.exe", "rider.exe", "rider.bat", "rider")
|
||||
|
||||
|
||||
def now_iso() -> str:
|
||||
return datetime.now(timezone.utc).isoformat()
|
||||
|
||||
|
||||
def write_json(path: Path, value: Any) -> None:
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
path.write_text(json.dumps(value, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")
|
||||
|
||||
|
||||
def write_text(path: Path, value: str) -> None:
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
path.write_text(value, encoding="utf-8")
|
||||
|
||||
|
||||
def artifact_dir(root: Path, action: str) -> Path:
|
||||
return root.resolve() / f"rider-{action}-{time.time_ns()}-{os.getpid()}"
|
||||
|
||||
|
||||
def maybe_resolve(path: Path) -> str:
|
||||
try:
|
||||
return str(path.resolve())
|
||||
except OSError:
|
||||
return str(path)
|
||||
|
||||
|
||||
def is_inside(path: Path, root: Path) -> bool:
|
||||
try:
|
||||
path.resolve().relative_to(root.resolve())
|
||||
return True
|
||||
except ValueError:
|
||||
return False
|
||||
|
||||
|
||||
def relative_or_absolute(path: Path, root: Path) -> str:
|
||||
try:
|
||||
return str(path.resolve().relative_to(root.resolve())).replace("\\", "/")
|
||||
except ValueError:
|
||||
return str(path)
|
||||
|
||||
|
||||
def dedupe_paths(paths: list[Path]) -> list[Path]:
|
||||
seen: set[str] = set()
|
||||
result: list[Path] = []
|
||||
for path in paths:
|
||||
key = str(path.resolve()) if path.exists() else str(path)
|
||||
if key.lower() in seen:
|
||||
continue
|
||||
seen.add(key.lower())
|
||||
result.append(path)
|
||||
return result
|
||||
|
||||
|
||||
def rider_search_roots() -> list[Path]:
|
||||
roots: list[Path] = []
|
||||
env_roots = os.environ.get("EPIPHANY_RIDER_ROOTS")
|
||||
if env_roots:
|
||||
roots.extend(Path(item) for item in env_roots.split(os.pathsep) if item)
|
||||
for variable, fallback in (
|
||||
("ProgramFiles", r"C:\Program Files"),
|
||||
("ProgramFiles(x86)", r"C:\Program Files (x86)"),
|
||||
("LOCALAPPDATA", str(Path.home() / "AppData" / "Local")),
|
||||
):
|
||||
roots.append(Path(os.environ.get(variable, fallback)) / "JetBrains")
|
||||
return dedupe_paths(roots)
|
||||
|
||||
|
||||
def discover_rider_installations() -> list[dict[str, Any]]:
|
||||
candidates: list[Path] = []
|
||||
env_path = os.environ.get("EPIPHANY_RIDER_PATH")
|
||||
if env_path:
|
||||
candidates.append(Path(env_path))
|
||||
for name in RIDER_EXECUTABLE_NAMES:
|
||||
found = shutil.which(name)
|
||||
if found:
|
||||
candidates.append(Path(found))
|
||||
for root in rider_search_roots():
|
||||
if not root.exists():
|
||||
continue
|
||||
for directory in root.glob("JetBrains Rider*"):
|
||||
for name in RIDER_EXECUTABLE_NAMES:
|
||||
candidates.append(directory / "bin" / name)
|
||||
|
||||
installations: list[dict[str, Any]] = []
|
||||
for path in dedupe_paths(candidates):
|
||||
exists = path.exists()
|
||||
if not exists:
|
||||
continue
|
||||
version_hint = None
|
||||
for part in reversed(path.parts):
|
||||
if "Rider" in part:
|
||||
version_hint = part
|
||||
break
|
||||
installations.append(
|
||||
{
|
||||
"path": maybe_resolve(path),
|
||||
"exists": exists,
|
||||
"versionHint": version_hint,
|
||||
}
|
||||
)
|
||||
return installations
|
||||
|
||||
|
||||
def discover_solution(project_root: Path) -> dict[str, Any]:
|
||||
root = project_root.resolve()
|
||||
top_level = sorted(root.glob("*.sln"))
|
||||
if top_level:
|
||||
return {
|
||||
"status": "ready",
|
||||
"path": str(top_level[0]),
|
||||
"candidates": [str(path) for path in top_level[:8]],
|
||||
}
|
||||
|
||||
candidates: list[Path] = []
|
||||
for path in root.rglob("*.sln"):
|
||||
if any(
|
||||
part.startswith(".") or part in {"Library", "Temp", "obj", "bin", "node_modules"}
|
||||
for part in path.relative_to(root).parts
|
||||
):
|
||||
continue
|
||||
candidates.append(path)
|
||||
if len(candidates) >= 8:
|
||||
break
|
||||
return {
|
||||
"status": "ready" if candidates else "missingSolution",
|
||||
"path": str(candidates[0]) if candidates else None,
|
||||
"candidates": [str(path) for path in candidates],
|
||||
}
|
||||
|
||||
|
||||
def run_git(project_root: Path, args: list[str]) -> str | None:
|
||||
try:
|
||||
completed = subprocess.run(
|
||||
["git", "-C", str(project_root), *args],
|
||||
capture_output=True,
|
||||
check=False,
|
||||
encoding="utf-8",
|
||||
errors="replace",
|
||||
timeout=10,
|
||||
)
|
||||
except (OSError, subprocess.TimeoutExpired):
|
||||
return None
|
||||
if completed.returncode != 0:
|
||||
return None
|
||||
return completed.stdout.strip()
|
||||
|
||||
|
||||
def vcs_summary(project_root: Path) -> dict[str, Any]:
|
||||
branch = run_git(project_root, ["rev-parse", "--abbrev-ref", "HEAD"])
|
||||
status = run_git(project_root, ["status", "--porcelain=v1"])
|
||||
changed_files = run_git(project_root, ["diff", "--name-only"])
|
||||
staged_files = run_git(project_root, ["diff", "--cached", "--name-only"])
|
||||
visible_changed = changed_files.splitlines() if changed_files else []
|
||||
if status:
|
||||
for line in status.splitlines():
|
||||
path = line[3:].strip()
|
||||
if path and path not in visible_changed:
|
||||
visible_changed.append(path)
|
||||
return {
|
||||
"status": "ready" if branch is not None else "notGit",
|
||||
"branch": branch,
|
||||
"dirty": bool(status),
|
||||
"changedFiles": visible_changed,
|
||||
"stagedFiles": staged_files.splitlines() if staged_files else [],
|
||||
"changedRangesKnown": branch is not None,
|
||||
}
|
||||
|
||||
|
||||
def render_status(summary: dict[str, Any]) -> str:
|
||||
lines = [
|
||||
"# Rider Bridge Status",
|
||||
"",
|
||||
f"- status: {summary.get('status')}",
|
||||
f"- workspace: `{summary.get('workspace')}`",
|
||||
f"- solution: `{summary.get('solutionPath') or 'none'}`",
|
||||
f"- rider: `{summary.get('riderPath') or 'missing'}`",
|
||||
f"- installations: {summary.get('installationCount')}",
|
||||
f"- branch: {summary.get('vcs', {}).get('branch') or 'unknown'}",
|
||||
f"- dirty: {summary.get('vcs', {}).get('dirty')}",
|
||||
f"- note: {summary.get('note')}",
|
||||
"",
|
||||
"Rider is a source-context organ. This artifact is an operator-safe projection, not durable Epiphany truth.",
|
||||
]
|
||||
return "\n".join(lines) + "\n"
|
||||
|
||||
|
||||
def render_context(packet: dict[str, Any], summary: dict[str, Any]) -> str:
|
||||
symbol = packet.get("symbol") or {}
|
||||
selection = packet.get("selection") or {}
|
||||
lines = [
|
||||
"# Rider Context Packet",
|
||||
"",
|
||||
f"- status: {summary.get('status')}",
|
||||
f"- project: `{packet.get('projectRoot')}`",
|
||||
f"- solution: `{packet.get('solutionPath') or 'none'}`",
|
||||
f"- file: `{packet.get('filePath') or 'none'}`",
|
||||
f"- selection: {selection.get('startLine') or 'none'}-{selection.get('endLine') or 'none'}",
|
||||
f"- symbol: {symbol.get('name') or 'none'}",
|
||||
f"- artifact: `{summary.get('artifactPath')}`",
|
||||
"",
|
||||
"Modeling may use this packet as scratch/context. It is not accepted map state until reviewed.",
|
||||
]
|
||||
return "\n".join(lines) + "\n"
|
||||
|
||||
|
||||
def bridge_guidance(project_root: Path, repo_root: Path | None = None) -> str:
|
||||
repo_root = repo_root or ROOT
|
||||
script_path = repo_root / "tools" / "epiphany_rider_bridge.py"
|
||||
installations = discover_rider_installations()
|
||||
solution = discover_solution(project_root)
|
||||
status_command = f"`python {script_path} status --project-root {project_root}`"
|
||||
if installations:
|
||||
solution_text = solution.get("path") or "no solution found yet"
|
||||
return (
|
||||
f"- Rider bridge: Rider is available at `{installations[0].get('path')}` and solution "
|
||||
f"context is `{solution_text}`. Use {status_command} for an auditable source/IDE "
|
||||
"status receipt, and use `context --file <path> --selection-start <line> --selection-end "
|
||||
"<line> --symbol-name <name>` when the future plugin or operator sends a bounded source "
|
||||
"slice. Rider facts are scratch/context until modeling or verification accepts them."
|
||||
)
|
||||
return (
|
||||
f"- Rider bridge: no Rider executable was found. Use {status_command} to write an "
|
||||
"auditable missing-IDE artifact, or set EPIPHANY_RIDER_PATH. Do not pretend IDE "
|
||||
"diagnostics, changed ranges, or source navigation were captured until the bridge has a "
|
||||
"receipt."
|
||||
)
|
||||
|
||||
|
||||
def status_rider(args: argparse.Namespace) -> dict[str, Any]:
|
||||
project_root = args.project_root.resolve()
|
||||
directory = args.artifact_dir.resolve() if args.artifact_dir else artifact_dir(args.artifact_root, "inspect")
|
||||
installations = discover_rider_installations()
|
||||
solution = discover_solution(project_root)
|
||||
first_rider = installations[0] if installations else None
|
||||
status = "ready" if first_rider else "missingRider"
|
||||
note = (
|
||||
"Rider executable is available for explicit source navigation and context capture."
|
||||
if first_rider
|
||||
else "No Rider executable was found. Install Rider or set EPIPHANY_RIDER_PATH."
|
||||
)
|
||||
summary: dict[str, Any] = {
|
||||
"kind": "riderBridgeStatus",
|
||||
"status": status,
|
||||
"workspace": str(project_root),
|
||||
"solutionPath": solution.get("path"),
|
||||
"solutionStatus": solution.get("status"),
|
||||
"solutionCandidates": solution.get("candidates", []),
|
||||
"riderPath": first_rider.get("path") if first_rider else None,
|
||||
"installationCount": len(installations),
|
||||
"installations": installations,
|
||||
"searchRoots": [str(path) for path in rider_search_roots()],
|
||||
"vcs": vcs_summary(project_root),
|
||||
"capturedAt": now_iso(),
|
||||
"artifactPath": str(directory),
|
||||
"note": note,
|
||||
}
|
||||
write_json(directory / "rider-bridge-summary.json", summary)
|
||||
write_text(directory / "rider-bridge-status.md", render_status(summary))
|
||||
return summary
|
||||
|
||||
|
||||
def packet_from_args(args: argparse.Namespace, project_root: Path) -> dict[str, Any]:
|
||||
if args.packet:
|
||||
packet = json.loads(args.packet.read_text(encoding="utf-8"))
|
||||
if not isinstance(packet, dict):
|
||||
raise ValueError("context packet must be a JSON object")
|
||||
return packet
|
||||
|
||||
solution = discover_solution(project_root)
|
||||
file_path = args.file.resolve() if args.file else None
|
||||
if file_path and not is_inside(file_path, project_root):
|
||||
raise ValueError(f"context file is outside project root: {file_path}")
|
||||
packet: dict[str, Any] = {
|
||||
"kind": "riderContext",
|
||||
"capturedAt": now_iso(),
|
||||
"projectRoot": str(project_root),
|
||||
"solutionPath": solution.get("path"),
|
||||
"filePath": relative_or_absolute(file_path, project_root) if file_path else None,
|
||||
"caret": {
|
||||
"line": args.line,
|
||||
"column": args.column,
|
||||
}
|
||||
if args.line
|
||||
else None,
|
||||
"selection": {
|
||||
"startLine": args.selection_start,
|
||||
"endLine": args.selection_end,
|
||||
}
|
||||
if args.selection_start or args.selection_end
|
||||
else None,
|
||||
"symbol": {
|
||||
"name": args.symbol_name,
|
||||
"kind": args.symbol_kind,
|
||||
"namespace": args.symbol_namespace,
|
||||
}
|
||||
if args.symbol_name
|
||||
else None,
|
||||
"vcs": vcs_summary(project_root),
|
||||
}
|
||||
return packet
|
||||
|
||||
|
||||
def context_rider(args: argparse.Namespace) -> dict[str, Any]:
|
||||
project_root = args.project_root.resolve()
|
||||
directory = args.artifact_dir.resolve() if args.artifact_dir else artifact_dir(args.artifact_root, "context")
|
||||
packet = packet_from_args(args, project_root)
|
||||
summary = status_rider(
|
||||
argparse.Namespace(
|
||||
project_root=project_root,
|
||||
artifact_root=args.artifact_root,
|
||||
artifact_dir=directory,
|
||||
)
|
||||
)
|
||||
summary.update(
|
||||
{
|
||||
"kind": "riderContextCapture",
|
||||
"status": "captured",
|
||||
"contextPath": str(directory / "rider-context.json"),
|
||||
"filePath": packet.get("filePath"),
|
||||
"symbol": packet.get("symbol"),
|
||||
}
|
||||
)
|
||||
write_json(directory / "rider-context.json", packet)
|
||||
write_json(directory / "rider-bridge-summary.json", summary)
|
||||
write_text(directory / "rider-context.md", render_context(packet, summary))
|
||||
return summary
|
||||
|
||||
|
||||
def open_ref_rider(args: argparse.Namespace) -> dict[str, Any]:
|
||||
project_root = args.project_root.resolve()
|
||||
directory = args.artifact_dir.resolve() if args.artifact_dir else artifact_dir(args.artifact_root, "open-ref")
|
||||
status = status_rider(
|
||||
argparse.Namespace(
|
||||
project_root=project_root,
|
||||
artifact_root=args.artifact_root,
|
||||
artifact_dir=directory,
|
||||
)
|
||||
)
|
||||
file_path = args.file.resolve()
|
||||
if not is_inside(file_path, project_root):
|
||||
raise ValueError(f"code ref is outside project root: {file_path}")
|
||||
rider_path = status.get("riderPath")
|
||||
command = [rider_path, str(file_path)] if rider_path else []
|
||||
if rider_path and args.line:
|
||||
command.extend(["--line", str(args.line)])
|
||||
summary = {
|
||||
**status,
|
||||
"kind": "riderOpenRef",
|
||||
"status": "planned" if rider_path else "missingRider",
|
||||
"filePath": str(file_path),
|
||||
"line": args.line,
|
||||
"column": args.column,
|
||||
"command": command,
|
||||
"launched": False,
|
||||
}
|
||||
if rider_path and args.launch:
|
||||
subprocess.Popen(command, cwd=project_root)
|
||||
summary["status"] = "launched"
|
||||
summary["launched"] = True
|
||||
write_json(directory / "rider-open-ref.json", summary)
|
||||
write_json(directory / "rider-bridge-summary.json", summary)
|
||||
write_text(directory / "rider-bridge-status.md", render_status(summary))
|
||||
return summary
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(description="Operator-safe Rider source context bridge.")
|
||||
subparsers = parser.add_subparsers(dest="command", required=True)
|
||||
|
||||
status_parser = subparsers.add_parser("status", help="Inspect Rider and source workspace status.")
|
||||
status_parser.add_argument("--project-root", type=Path, default=Path.cwd())
|
||||
status_parser.add_argument("--artifact-root", type=Path, default=DEFAULT_ARTIFACT_ROOT)
|
||||
status_parser.add_argument("--artifact-dir", type=Path)
|
||||
|
||||
context_parser = subparsers.add_parser("context", help="Capture a Rider-style source context packet.")
|
||||
context_parser.add_argument("--project-root", type=Path, default=Path.cwd())
|
||||
context_parser.add_argument("--artifact-root", type=Path, default=DEFAULT_ARTIFACT_ROOT)
|
||||
context_parser.add_argument("--artifact-dir", type=Path)
|
||||
context_parser.add_argument("--packet", type=Path)
|
||||
context_parser.add_argument("--file", type=Path)
|
||||
context_parser.add_argument("--line", type=int)
|
||||
context_parser.add_argument("--column", type=int)
|
||||
context_parser.add_argument("--selection-start", type=int)
|
||||
context_parser.add_argument("--selection-end", type=int)
|
||||
context_parser.add_argument("--symbol-name")
|
||||
context_parser.add_argument("--symbol-kind")
|
||||
context_parser.add_argument("--symbol-namespace")
|
||||
|
||||
open_parser = subparsers.add_parser("open-ref", help="Plan or launch Rider at one code ref.")
|
||||
open_parser.add_argument("--project-root", type=Path, default=Path.cwd())
|
||||
open_parser.add_argument("--artifact-root", type=Path, default=DEFAULT_ARTIFACT_ROOT)
|
||||
open_parser.add_argument("--artifact-dir", type=Path)
|
||||
open_parser.add_argument("--file", type=Path, required=True)
|
||||
open_parser.add_argument("--line", type=int)
|
||||
open_parser.add_argument("--column", type=int)
|
||||
open_parser.add_argument("--launch", action="store_true")
|
||||
|
||||
args = parser.parse_args()
|
||||
try:
|
||||
if args.command == "status":
|
||||
result = status_rider(args)
|
||||
elif args.command == "context":
|
||||
result = context_rider(args)
|
||||
elif args.command == "open-ref":
|
||||
result = open_ref_rider(args)
|
||||
else:
|
||||
raise ValueError(f"Unsupported command: {args.command}")
|
||||
except Exception as error:
|
||||
print(json.dumps({"status": "error", "error": str(error)}, indent=2), flush=True)
|
||||
return 1
|
||||
print(json.dumps(result, indent=2, ensure_ascii=False))
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
156
tools/epiphany_rider_bridge_smoke.py
Normal file
156
tools/epiphany_rider_bridge_smoke.py
Normal file
|
|
@ -0,0 +1,156 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
from typing import Any
|
||||
|
||||
from epiphany_phase5_smoke import ROOT
|
||||
from epiphany_phase5_smoke import require
|
||||
|
||||
|
||||
DEFAULT_WORKSPACE = ROOT / ".epiphany-smoke" / "rider-bridge-workspace"
|
||||
DEFAULT_ARTIFACT_ROOT = ROOT / ".epiphany-smoke" / "rider-bridge-artifacts"
|
||||
DEFAULT_RESULT = ROOT / ".epiphany-smoke" / "rider-bridge-smoke-result.json"
|
||||
|
||||
|
||||
def reset_path(path: Path) -> None:
|
||||
if path.exists():
|
||||
shutil.rmtree(path)
|
||||
path.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
|
||||
def prepare_workspace(workspace: Path) -> Path:
|
||||
reset_path(workspace)
|
||||
(workspace / "Aetheria.sln").write_text("Microsoft Visual Studio Solution File\n", encoding="utf-8")
|
||||
source = workspace / "Assets" / "Scripts" / "GravityTileRenderer.cs"
|
||||
source.parent.mkdir(parents=True, exist_ok=True)
|
||||
source.write_text(
|
||||
"\n".join(
|
||||
[
|
||||
"namespace Aetheria.Rendering",
|
||||
"{",
|
||||
" public sealed class GravityTileRenderer",
|
||||
" {",
|
||||
" }",
|
||||
"}",
|
||||
"",
|
||||
]
|
||||
),
|
||||
encoding="utf-8",
|
||||
)
|
||||
return source
|
||||
|
||||
|
||||
def create_fake_rider(root: Path) -> Path:
|
||||
rider = root / "JetBrains Rider 2026.1.0.1" / "bin" / "rider64.exe"
|
||||
rider.parent.mkdir(parents=True, exist_ok=True)
|
||||
rider.write_text("fake rider binary for smoke planning only\n", encoding="utf-8")
|
||||
return rider
|
||||
|
||||
|
||||
def run_bridge(workspace: Path, artifact_root: Path, env: dict[str, str], args: list[str]) -> dict[str, Any]:
|
||||
completed = subprocess.run(
|
||||
[
|
||||
sys.executable,
|
||||
str(ROOT / "tools" / "epiphany_rider_bridge.py"),
|
||||
args[0],
|
||||
"--project-root",
|
||||
str(workspace),
|
||||
"--artifact-root",
|
||||
str(artifact_root),
|
||||
*args[1:],
|
||||
],
|
||||
cwd=ROOT,
|
||||
env=env,
|
||||
capture_output=True,
|
||||
encoding="utf-8",
|
||||
errors="replace",
|
||||
check=False,
|
||||
)
|
||||
require(completed.returncode == 0, f"rider bridge failed: {completed.stderr}")
|
||||
try:
|
||||
return json.loads(completed.stdout)
|
||||
except json.JSONDecodeError as error:
|
||||
raise AssertionError(f"rider bridge did not return JSON: {error}\n{completed.stdout}") from error
|
||||
|
||||
|
||||
def require_artifact(summary: dict[str, Any], name: str) -> None:
|
||||
artifact_path = Path(str(summary["artifactPath"]))
|
||||
require((artifact_path / name).exists(), f"missing rider artifact: {name}")
|
||||
|
||||
|
||||
def main() -> int:
|
||||
workspace = DEFAULT_WORKSPACE.resolve()
|
||||
artifact_root = DEFAULT_ARTIFACT_ROOT.resolve()
|
||||
fake_rider_root = ROOT / ".epiphany-smoke" / "rider-bridge-install"
|
||||
result_path = DEFAULT_RESULT.resolve()
|
||||
source = prepare_workspace(workspace)
|
||||
reset_path(artifact_root)
|
||||
reset_path(fake_rider_root)
|
||||
fake_rider = create_fake_rider(fake_rider_root)
|
||||
|
||||
env = os.environ.copy()
|
||||
env["EPIPHANY_RIDER_PATH"] = str(fake_rider)
|
||||
|
||||
status = run_bridge(workspace, artifact_root, env, ["status"])
|
||||
require(status["status"] == "ready", "fake Rider path should make status ready")
|
||||
require(status["riderPath"] == str(fake_rider), "status should resolve fake Rider path")
|
||||
require(status["solutionPath"].endswith("Aetheria.sln"), "status should find the workspace solution")
|
||||
require_artifact(status, "rider-bridge-summary.json")
|
||||
require_artifact(status, "rider-bridge-status.md")
|
||||
|
||||
context = run_bridge(
|
||||
workspace,
|
||||
artifact_root,
|
||||
env,
|
||||
[
|
||||
"context",
|
||||
"--file",
|
||||
str(source),
|
||||
"--selection-start",
|
||||
"3",
|
||||
"--selection-end",
|
||||
"5",
|
||||
"--symbol-name",
|
||||
"GravityTileRenderer",
|
||||
"--symbol-kind",
|
||||
"class",
|
||||
"--symbol-namespace",
|
||||
"Aetheria.Rendering",
|
||||
],
|
||||
)
|
||||
require(context["status"] == "captured", "context command should capture a packet")
|
||||
require(context["filePath"] == "Assets/Scripts/GravityTileRenderer.cs", "context file should be project-relative")
|
||||
require_artifact(context, "rider-context.json")
|
||||
require_artifact(context, "rider-context.md")
|
||||
|
||||
open_ref = run_bridge(
|
||||
workspace,
|
||||
artifact_root,
|
||||
env,
|
||||
["open-ref", "--file", str(source), "--line", "3"],
|
||||
)
|
||||
require(open_ref["status"] == "planned", "open-ref should plan without launch")
|
||||
require(open_ref["command"][0] == str(fake_rider), "open-ref should use discovered Rider path")
|
||||
require_artifact(open_ref, "rider-open-ref.json")
|
||||
|
||||
result = {
|
||||
"workspace": str(workspace),
|
||||
"artifactRoot": str(artifact_root),
|
||||
"status": status["status"],
|
||||
"contextStatus": context["status"],
|
||||
"openRefStatus": open_ref["status"],
|
||||
"riderPath": status["riderPath"],
|
||||
}
|
||||
result_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
result_path.write_text(json.dumps(result, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")
|
||||
print(json.dumps(result, indent=2, ensure_ascii=False))
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
|
|
@ -77,6 +77,7 @@ Implementation rules:
|
|||
- Avoid pointless embellishments. Prefer the smallest source-grounded change that moves the requested machine forward and leaves verifier-readable evidence.
|
||||
- Environment guardrails:
|
||||
{unity_guidance}
|
||||
{rider_guidance}
|
||||
- Make a bounded first pass: design or implement a parallel compute-backed gravity height producer that preserves the current `_NebulaSurfaceHeight`, `_GridTransform`, and Slime `Heightmap` contracts before changing shader consumers.
|
||||
- This is an implementation turn, not a planning turn. Leave a concrete source diff unless direct source evidence proves the bounded pass is impossible.
|
||||
- If there is no implementation diff yet, prefer a small reversible compatibility scaffold over another explanation. A valid first diff may be a source-local contract/scaffold for a compute-backed gravity height producer that runs beside the camera path and does not rewire consumers yet.
|
||||
|
|
|
|||
Reference in a new issue