repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | import { resolveTradingMode } from "./config.js"; |
| #2 | function describeMode(mode) { |
| #3 | switch (mode) { |
| #4 | case "live": |
| #5 | return { |
| #6 | modeLabel: "Live Circuit Armed", |
| #7 | headline: "Phoenix reads are hot and the route to execution is open.", |
| #8 | subheadline: "Every live path still depends on wallet presence, spread limits, and explicit operator intent.", |
| #9 | }; |
| #10 | case "paper": |
| #11 | return { |
| #12 | modeLabel: "Paper Engine Spinning", |
| #13 | headline: "The stack is animated, quoting, and rehearsing without touching real funds.", |
| #14 | subheadline: "Rise drives the market picture while Vulcan-compatible routes stay ready for dry runs and previews.", |
| #15 | }; |
| #16 | default: |
| #17 | return { |
| #18 | modeLabel: "Observe Mode", |
| #19 | headline: "The perp stack is awake, watching the tape, and refusing reckless motion.", |
| #20 | subheadline: "Safe-by-default reads, catalog-backed execution planning, and no blind live flow.", |
| #21 | }; |
| #22 | } |
| #23 | } |
| #24 | export function buildPerpsFrontendCards(runtime) { |
| #25 | const mode = resolveTradingMode(runtime.config); |
| #26 | return [ |
| #27 | { |
| #28 | title: "Exchange Pulse", |
| #29 | value: "Phoenix Perps", |
| #30 | hint: "Rise SDK is the live read plane for tickers, positions, and market posture", |
| #31 | tone: "live", |
| #32 | }, |
| #33 | { |
| #34 | title: "Execution Mood", |
| #35 | value: mode, |
| #36 | hint: "Observe and paper stay default; live only activates when the runtime is intentionally armed", |
| #37 | tone: mode === "live" ? "watch" : "safe", |
| #38 | }, |
| #39 | { |
| #40 | title: "Fallback Rail", |
| #41 | value: "Vulcan CLI", |
| #42 | hint: "Used for compatible paper and live route planning, never as a blind fire-and-forget executor", |
| #43 | tone: "infra", |
| #44 | }, |
| #45 | { |
| #46 | title: "Risk Envelope", |
| #47 | value: `${runtime.config.risk.maxNotionalUsd} USD cap`, |
| #48 | hint: `Allowed: ${runtime.config.risk.allowedSymbols.join(", ")}`, |
| #49 | tone: "watch", |
| #50 | }, |
| #51 | { |
| #52 | title: "Agent Bridge", |
| #53 | value: "Vulcan MCP + CLI", |
| #54 | hint: "Catalog-backed routing for market, trade, position, paper, strategy, and TA command families", |
| #55 | tone: "infra", |
| #56 | }, |
| #57 | { |
| #58 | title: "Operator Posture", |
| #59 | value: runtime.config.wallet ? "Wallet Wired" : "Wallet Missing", |
| #60 | hint: runtime.config.wallet |
| #61 | ? "Runtime can price, preview, and prepare authenticated perp actions" |
| #62 | : "Reads and previews still work, but live execution posture stays intentionally incomplete", |
| #63 | tone: runtime.config.wallet ? "live" : "safe", |
| #64 | }, |
| #65 | ]; |
| #66 | } |
| #67 | export async function buildPerpsFrontendStatus(runtime) { |
| #68 | const [markets, vulcan] = await Promise.all([ |
| #69 | runtime.listMarkets(), |
| #70 | runtime.getVulcanCatalogSummary(), |
| #71 | ]); |
| #72 | const mode = resolveTradingMode(runtime.config); |
| #73 | const mood = describeMode(mode); |
| #74 | return { |
| #75 | mode, |
| #76 | modeLabel: mood.modeLabel, |
| #77 | headline: mood.headline, |
| #78 | subheadline: mood.subheadline, |
| #79 | walletConfigured: Boolean(runtime.config.wallet), |
| #80 | allowedSymbols: runtime.config.risk.allowedSymbols, |
| #81 | trackedMarkets: markets, |
| #82 | vulcan, |
| #83 | cards: buildPerpsFrontendCards(runtime), |
| #84 | }; |
| #85 | } |
| #86 | //# sourceMappingURL=frontend.js.map |