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 | export function mapToVulcanCommand(repoRoot, input) { |
| #2 | const symbol = input.symbol?.trim().toUpperCase() ?? "SOL"; |
| #3 | const notional = String(input.notionalUsd ?? 100); |
| #4 | const base = { |
| #5 | command: "cargo", |
| #6 | cwd: `${repoRoot}/vulcan-cli-master`, |
| #7 | env: { |
| #8 | NO_COLOR: "1", |
| #9 | }, |
| #10 | }; |
| #11 | switch (input.action) { |
| #12 | case "market-list": |
| #13 | return { ...base, args: ["run", "-p", "vulcan", "--", "market", "list", "-o", "json"] }; |
| #14 | case "ticker": |
| #15 | return { ...base, args: ["run", "-p", "vulcan", "--", "market", "ticker", symbol, "-o", "json"] }; |
| #16 | case "positions": |
| #17 | return { ...base, args: ["run", "-p", "vulcan", "--", "position", "list", "-o", "json"] }; |
| #18 | case "paper-buy": |
| #19 | return { |
| #20 | ...base, |
| #21 | args: [ |
| #22 | "run", |
| #23 | "-p", |
| #24 | "vulcan", |
| #25 | "--", |
| #26 | "paper", |
| #27 | "buy", |
| #28 | symbol, |
| #29 | "--notional-usdc", |
| #30 | notional, |
| #31 | "--type", |
| #32 | "market", |
| #33 | "-o", |
| #34 | "json", |
| #35 | ], |
| #36 | }; |
| #37 | case "paper-sell": |
| #38 | return { |
| #39 | ...base, |
| #40 | args: [ |
| #41 | "run", |
| #42 | "-p", |
| #43 | "vulcan", |
| #44 | "--", |
| #45 | "paper", |
| #46 | "sell", |
| #47 | symbol, |
| #48 | "--notional-usdc", |
| #49 | notional, |
| #50 | "--type", |
| #51 | "market", |
| #52 | "-o", |
| #53 | "json", |
| #54 | ], |
| #55 | }; |
| #56 | case "live-buy": |
| #57 | return { |
| #58 | ...base, |
| #59 | args: [ |
| #60 | "run", |
| #61 | "-p", |
| #62 | "vulcan", |
| #63 | "--", |
| #64 | "trade", |
| #65 | "buy", |
| #66 | symbol, |
| #67 | "--notional-usdc", |
| #68 | notional, |
| #69 | "--type", |
| #70 | "market", |
| #71 | "-o", |
| #72 | "json", |
| #73 | ], |
| #74 | }; |
| #75 | case "live-sell": |
| #76 | return { |
| #77 | ...base, |
| #78 | args: [ |
| #79 | "run", |
| #80 | "-p", |
| #81 | "vulcan", |
| #82 | "--", |
| #83 | "trade", |
| #84 | "sell", |
| #85 | symbol, |
| #86 | "--notional-usdc", |
| #87 | notional, |
| #88 | "--type", |
| #89 | "market", |
| #90 | "-o", |
| #91 | "json", |
| #92 | ], |
| #93 | }; |
| #94 | } |
| #95 | } |
| #96 | export function buildVulcanExecutionPlan(repoRoot, input, preflight) { |
| #97 | const mode = input.action.startsWith("live") |
| #98 | ? "live" |
| #99 | : input.action.startsWith("paper") |
| #100 | ? "paper" |
| #101 | : "observe"; |
| #102 | return { |
| #103 | transport: "cli", |
| #104 | mode, |
| #105 | preflight, |
| #106 | command: mapToVulcanCommand(repoRoot, input), |
| #107 | }; |
| #108 | } |
| #109 | //# sourceMappingURL=vulcan.js.map |