Let local run target existing threads
This commit is contained in:
parent
6073d50cc3
commit
7fe8ece638
3 changed files with 43 additions and 22 deletions
|
|
@ -99,6 +99,7 @@ Useful variants:
|
|||
.\tools\epiphany_local_run.ps1 -Mode status
|
||||
.\tools\epiphany_local_run.ps1 -Mode plan
|
||||
.\tools\epiphany_local_run.ps1 -Mode run -MaxSteps 4
|
||||
.\tools\epiphany_local_run.ps1 -Mode status -ThreadId <id> -Workspace E:\Projects\SomeRepo
|
||||
```
|
||||
|
||||
`run` is the live coordinator loop. It also builds `epiphany-openai-runtime` and
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ remembers doctrine; the branch remembers the blade.
|
|||
## Current Orientation
|
||||
|
||||
- Do not copy exact branch or HEAD from this note. Run `git status --short --branch` and `git log --oneline -5`.
|
||||
- The repo now has a one-command local operator path: `.\tools\epiphany_local_run.ps1`. Default mode is `smoke`; it builds the retained Codex app-server compatibility edge, builds native Epiphany operator binaries, runs the coordinator smoke, and writes launcher artifacts under `.epiphany-run/` plus coordinator artifacts under `.epiphany-dogfood/`. Use `-Mode status`, `-Mode plan`, or `-Mode run -MaxSteps 4` for the other current entrypoints. `status`, `plan`, and `smoke` do not spend model calls; `run` builds and uses `epiphany-openai-runtime`.
|
||||
- The repo now has a one-command local operator path: `.\tools\epiphany_local_run.ps1`. Default mode is `smoke`; it builds the retained Codex app-server compatibility edge, builds native Epiphany operator binaries, runs the coordinator smoke, and writes launcher artifacts under `.epiphany-run/` plus coordinator artifacts under `.epiphany-dogfood/`. Use `-Mode status`, `-Mode plan`, or `-Mode run -MaxSteps 4` for the other current entrypoints; add `-ThreadId <id>` and `-Workspace <path>` to inspect or continue an existing thread. `status`, `plan`, and `smoke` do not spend model calls; `run` builds and uses `epiphany-openai-runtime`.
|
||||
- The active foundation directive is now `notes/codex-starvation-and-cultnet-liberation-plan.md`. The previous Codex app-server control-plane rebuild made Epiphany less rotten inside Codex, but that is not the destination. Epiphany must become a native CultCache/CultNet runtime while remaining an honest modified Codex-derived backend for subscription auth/model use. Codex is a compatibility reliquary for OpenAI subscription auth and model transport, not the host brain and not a mask for impersonation.
|
||||
- `notes/codex-auth-spine-inventory.md` is the source-grounded keeper list for that reliquary. Corrected compliance invariant: Codex-compatible auth identity stays anchored in vendored Codex-derived auth machinery. `epiphany-openai-auth-spine` is now a thin Epiphany-named boundary over `codex-login`, not a clean-room clone of credential storage or token refresh. Codex apps, skills, marketplace, plugin UX, broad app-server workflow, and JSON-RPC sprawl remain cuttable because they are not subscription-auth legitimacy.
|
||||
- Edge JSON is allowed for schema description, hostile ingress before immediate typed parsing, sealed forensic artifacts, or named quarantine experiments. When both subsystems are ours, runtime data must remain typed CultCache documents and move over CultNet typed contracts. Generic `serde_json::Value` in worker launch/result/selfPatch/runtime flow is contamination until classified and replaced.
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ param(
|
|||
[ValidateSet("status", "plan", "smoke", "run")]
|
||||
[string]$Mode = "smoke",
|
||||
[string]$Root = (Resolve-Path ".").Path,
|
||||
[string]$Workspace = "",
|
||||
[string]$ThreadId = "",
|
||||
[string]$CodexHome = "",
|
||||
[string]$TargetDir = "C:\Users\Meta\.cargo-target-codex",
|
||||
[int]$MaxSteps = 4,
|
||||
|
|
@ -51,6 +53,11 @@ Set-Location -LiteralPath $Root
|
|||
$Root = (Resolve-Path ".").Path
|
||||
$env:CARGO_TARGET_DIR = $TargetDir
|
||||
|
||||
if ($Workspace -eq "") {
|
||||
$Workspace = $Root
|
||||
}
|
||||
$Workspace = (Resolve-Path $Workspace).Path
|
||||
|
||||
if ($CodexHome -eq "") {
|
||||
if ($env:CODEX_HOME) {
|
||||
$CodexHome = $env:CODEX_HOME
|
||||
|
|
@ -121,38 +128,46 @@ if ($NoEphemeral) {
|
|||
|
||||
if ($Mode -eq "status") {
|
||||
$statusJson = Join-Path $artifactRoot "status.json"
|
||||
$statusArgs = @(
|
||||
"--app-server", $codexAppServer,
|
||||
"--codex-home", $CodexHome,
|
||||
"--cwd", $Workspace,
|
||||
$ephemeralArg,
|
||||
"--json",
|
||||
"--result", $statusJson,
|
||||
"--transcript", (Join-Path $artifactRoot "status-transcript.jsonl"),
|
||||
"--stderr", (Join-Path $artifactRoot "status-app-server.stderr.log")
|
||||
)
|
||||
if ($ThreadId -ne "") {
|
||||
$statusArgs += @("--thread-id", $ThreadId, "--no-ephemeral")
|
||||
}
|
||||
Invoke-Checked `
|
||||
-Label "run operator status" `
|
||||
-FilePath $statusExe `
|
||||
-Arguments @(
|
||||
"--app-server", $codexAppServer,
|
||||
"--codex-home", $CodexHome,
|
||||
"--cwd", $Root,
|
||||
$ephemeralArg,
|
||||
"--json",
|
||||
"--result", $statusJson,
|
||||
"--transcript", (Join-Path $artifactRoot "status-transcript.jsonl"),
|
||||
"--stderr", (Join-Path $artifactRoot "status-app-server.stderr.log")
|
||||
) `
|
||||
-Arguments $statusArgs `
|
||||
-WorkingDirectory $Root `
|
||||
-StdoutPath (Join-Path $artifactRoot "status.stdout.json") `
|
||||
-StderrPath (Join-Path $artifactRoot "status.stderr.log")
|
||||
}
|
||||
|
||||
if ($Mode -eq "plan") {
|
||||
$planArgs = @(
|
||||
"--app-server", $codexAppServer,
|
||||
"--codex-home", $CodexHome,
|
||||
"--cwd", $Workspace,
|
||||
"--artifact-dir", (Join-Path $dogfoodRoot "coordinator"),
|
||||
"--runtime-store", (Join-Path $dogfoodRoot "runtime-spine.msgpack"),
|
||||
"--mode", "plan",
|
||||
"--max-steps", "1",
|
||||
"--timeout-seconds", "$TimeoutSeconds"
|
||||
)
|
||||
if ($ThreadId -ne "") {
|
||||
$planArgs += @("--thread-id", $ThreadId, "--no-ephemeral")
|
||||
}
|
||||
Invoke-Checked `
|
||||
-Label "run coordinator plan" `
|
||||
-FilePath $coordinatorExe `
|
||||
-Arguments @(
|
||||
"--app-server", $codexAppServer,
|
||||
"--codex-home", $CodexHome,
|
||||
"--cwd", $Root,
|
||||
"--artifact-dir", (Join-Path $dogfoodRoot "coordinator"),
|
||||
"--runtime-store", (Join-Path $dogfoodRoot "runtime-spine.msgpack"),
|
||||
"--mode", "plan",
|
||||
"--max-steps", "1",
|
||||
"--timeout-seconds", "$TimeoutSeconds"
|
||||
) `
|
||||
-Arguments $planArgs `
|
||||
-WorkingDirectory $Root `
|
||||
-StdoutPath (Join-Path $artifactRoot "coordinator-plan.stdout.json") `
|
||||
-StderrPath (Join-Path $artifactRoot "coordinator-plan.stderr.log")
|
||||
|
|
@ -183,7 +198,7 @@ if ($Mode -eq "run") {
|
|||
"--app-server", $codexAppServer,
|
||||
"--openai-runtime-bin", $openaiRuntimeExe,
|
||||
"--codex-home", $CodexHome,
|
||||
"--cwd", $Root,
|
||||
"--cwd", $Workspace,
|
||||
"--artifact-dir", (Join-Path $dogfoodRoot "coordinator"),
|
||||
"--runtime-store", (Join-Path $dogfoodRoot "runtime-spine.msgpack"),
|
||||
"--mode", "run",
|
||||
|
|
@ -193,6 +208,9 @@ if ($Mode -eq "run") {
|
|||
if ($AutoReview) {
|
||||
$runArgs += "--auto-review"
|
||||
}
|
||||
if ($ThreadId -ne "") {
|
||||
$runArgs += @("--thread-id", $ThreadId, "--no-ephemeral")
|
||||
}
|
||||
Invoke-Checked `
|
||||
-Label "run coordinator loop" `
|
||||
-FilePath $coordinatorExe `
|
||||
|
|
@ -207,6 +225,8 @@ $summary = @"
|
|||
|
||||
- mode: $Mode
|
||||
- root: $Root
|
||||
- workspace: $Workspace
|
||||
- threadId: $ThreadId
|
||||
- codexHome: $CodexHome
|
||||
- targetDir: $TargetDir
|
||||
- artifactRoot: $artifactRoot
|
||||
|
|
|
|||
Reference in a new issue