mirror of
https://github.com/stablyai/orca.git
synced 2026-10-07 16:02:29 +00:00
* Revert "feat(orcad): source-side dormant export of a relay-hosted SSH target (#16741 T6-8) (#24519)" This reverts commit783101b304. * Revert "feat(ssh): update, roll back, recover and stop a managed orcad server (#16741 T6-5 follow-up) (#24463)" This reverts commit38c2d1dcb9. * Revert "feat(ssh): deploy and pair an empty managed orcad server over SSH (#16741 T6-5) (#24453)" This reverts commit8b76683b40. * Revert "fix(ssh): orcad GC honors the activation journal; readiness requires proven daemon coverage (#16741 T6 follow-up) (#24451)" This reverts commitd3f8c5063b. * Revert "feat(ssh): remote orcad stop by request file and journaled decommission (#16741 T6-4) (#24449)" This reverts commit43d9b43d3f. * Revert "feat(orcad): supervisable server: stop requests, managed stop receipts and a lifetime that keeps its lock on failed teardown (#16741 T6-3) (#24433)" This reverts commitb093d3ab20. * Revert "feat(ssh): crash-safe orcad activation, rollback and recovery (#16741 T6-2) (#24423)" This reverts commit1a9ac0e955. * Revert "feat(runtime): SSH access links for paired servers in a downgrade-safe sidecar (#16741 T5-1+T5-2) (#24420)" This reverts commit99db2bfae4. * Revert "feat(relay): capability-gated owner reset with a durable preparation journal (#16741 T3 R1) (#24418)" This reverts commit34a582bd39. * Revert "feat(ssh): track connection-manager drains, test probes and provider continuations (#16741 T2 P3+P8a) (#24407)" This reverts commitd53063d2b1. * Revert "feat(daemon): idle retirement, session census and recovery-only provider (#16741 T2 P4b) (#24409)" This reverts commitff212dbbef. * Revert "feat(ssh): add pty.resumeClient and split SSH PTY process listing (#16741 T2 P5+P6) (#24414)" This reverts commit92cb71765e. * Revert "feat(relay): await owned watcher and agent children on shutdown (#16741 T2 P1) (#24400)" This reverts commit6b36e4f85b. * Revert "feat(session): retry failed renderer session writes and verify local folder PTYs (#16741 T2 P9) (#24406)" This reverts commitd23ecef301. * Revert "feat(ssh): remote orcad primitives on the pinned Node runtime (#16741 T6-1) (#24419)" This reverts commitdd87ae578d. * Revert "fix(runtime): fence runtime-environment subscriptions and status probes by identity (#16741 T5-3) (#24421)" This reverts commitece9e4d2e3. * Revert "feat(orcad): migration manifest and dormant-state contracts (#16741 T6-7) (#24422)" This reverts commit3fbdaba262. * Revert "feat(ssh): wire SshConnection through the work and transport close ledgers (#16741 T2 P2) (#24401)" This reverts commit4e8edc8872. * Revert "feat(profiles): carry markdown frontmatter visibility in project transfers (#16741 T2 P7) (#24405)" This reverts commit60c93263cc. * Revert "fix(runtime): project the PTY incarnation onto mobile session tabs (#24413)" This reverts commit99e0303572. * Revert "feat(daemon): tag daemon stream data with the PTY incarnation id (#16741 T2 P4a) (#24402)" This reverts commit817af768b0. * Revert "feat(ssh): port the SSH connection work ledger and transport close ledger (#16741 T2) (#24210)" This reverts commitc9918931c8. * Revert "feat(relay): fence and drain file and git response streams on shutdown (#24185)" This reverts commitdc08ffeba9. * Revert "refactor(runtime-rpc): extract the Node WebSocket lifecycle; opt-in pinned port (#24186)" This reverts commita789233bbb. * Revert "feat(relay): route relay handlers through work admission; producer publication drain (#24181)" This reverts commit0b812bd698. * Revert "feat(relay): land the #16741 T1 seam (work drain, publication drain, release gate) (#24156)" This reverts commit3aa2d3af7c. --------- Co-authored-by: m4air <m4air@Mac.localdomain>
50 lines
1.4 KiB
TypeScript
50 lines
1.4 KiB
TypeScript
import { join } from 'node:path'
|
|
|
|
export type RuntimeTransportMetadata =
|
|
| {
|
|
kind: 'unix'
|
|
endpoint: string
|
|
}
|
|
| {
|
|
kind: 'named-pipe'
|
|
endpoint: string
|
|
}
|
|
| {
|
|
kind: 'websocket'
|
|
endpoint: string
|
|
}
|
|
|
|
export type RuntimeMetadata = {
|
|
runtimeId: string
|
|
pid: number
|
|
transports: RuntimeTransportMetadata[]
|
|
authToken: string | null
|
|
startedAt: number
|
|
}
|
|
|
|
// Why: the CLI must handle metadata files written by older Orca versions that
|
|
// used a singular `transport` field. This helper extracts the first transport
|
|
// matching the given kinds from either the new `transports` array or the
|
|
// legacy `transport` field.
|
|
export function findTransport(
|
|
metadata: RuntimeMetadata,
|
|
...kinds: RuntimeTransportMetadata['kind'][]
|
|
): RuntimeTransportMetadata | null {
|
|
const transports = metadata.transports
|
|
if (transports && Array.isArray(transports)) {
|
|
return transports.find((t) => kinds.includes(t.kind)) ?? null
|
|
}
|
|
// Why: backward compatibility with pre-transports-array metadata files.
|
|
const legacy = (metadata as Record<string, unknown>).transport as RuntimeTransportMetadata | null
|
|
if (legacy && kinds.includes(legacy.kind)) {
|
|
return legacy
|
|
}
|
|
return null
|
|
}
|
|
|
|
const PRIMARY_RUNTIME_METADATA_FILE = 'orca-runtime.json'
|
|
|
|
export function getRuntimeMetadataPath(userDataPath: string): string {
|
|
return join(userDataPath, PRIMARY_RUNTIME_METADATA_FILE)
|
|
}
|