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 sources15d ago| #1 | #!/usr/bin/env node |
| #2 | /** |
| #3 | * automaton-main/automation/index.ts — Leviathan automation entrypoint |
| #4 | * |
| #5 | * automaton-main/automation is the central build + runtime orchestration |
| #6 | * layer for solana-clawd. It lives under the automaton-main hub and owns: |
| #7 | * |
| #8 | * • leviathan.sh — one-liner runtime bootstrap (x402.wtf/automation) |
| #9 | * • runtime.ts — Node-side runtime builder called by leviathan.sh |
| #10 | * • ci.ts — CI/CD pipeline (typecheck → lint → build → test) |
| #11 | * • index.ts — CLI dispatcher (this file) |
| #12 | * |
| #13 | * Quick start: |
| #14 | * curl -fsSL https://x402.wtf/automation/install.sh | bash |
| #15 | * |
| #16 | * Local: |
| #17 | * npx tsx automaton-main/automation/index.ts [flags] |
| #18 | * bash automaton-main/automation/leviathan.sh [flags] |
| #19 | * npm run automation:build |
| #20 | * npm run automation:ci |
| #21 | * npm run automation:spawn |
| #22 | * npm run automation:full |
| #23 | */ |
| #24 | |
| #25 | import { parseArgs } from 'node:util'; |
| #26 | import { buildRuntime } from './runtime.js'; |
| #27 | import { runCi } from './ci.js'; |
| #28 | |
| #29 | const { values } = parseArgs({ |
| #30 | options: { |
| #31 | build: { type: 'boolean', default: false }, |
| #32 | spawn: { type: 'boolean', default: false }, |
| #33 | run: { type: 'boolean', default: false }, |
| #34 | hermes: { type: 'boolean', default: false }, |
| #35 | brain: { type: 'boolean', default: false }, |
| #36 | mcp: { type: 'boolean', default: false }, |
| #37 | full: { type: 'boolean', default: false }, |
| #38 | ci: { type: 'boolean', default: false }, |
| #39 | 'no-install': { type: 'boolean', default: false }, |
| #40 | quiet: { type: 'boolean', default: false }, |
| #41 | help: { type: 'boolean', short: 'h', default: false }, |
| #42 | }, |
| #43 | strict: false, |
| #44 | }); |
| #45 | |
| #46 | if (values.help) { |
| #47 | console.log(` |
| #48 | automaton-main/automation/index.ts — Leviathan runtime dispatcher |
| #49 | |
| #50 | curl -fsSL https://x402.wtf/automation/install.sh | bash |
| #51 | |
| #52 | Flags: |
| #53 | --build Compile TypeScript to dist/ |
| #54 | --spawn Hatch a new Leviathan identity |
| #55 | --run Start the OODA pulse loop |
| #56 | --hermes Launch HERMES x402 terminal (TUI) |
| #57 | --brain Init Clawd memory subsystem |
| #58 | --mcp Start MCP tool server |
| #59 | --full All of the above |
| #60 | --ci Type-check + lint + build (CI mode) |
| #61 | --no-install Skip npm install |
| #62 | --quiet Suppress banners |
| #63 | -h|--help Show this message |
| #64 | `); |
| #65 | process.exit(0); |
| #66 | } |
| #67 | |
| #68 | async function main(): Promise<void> { |
| #69 | if (values.ci) { |
| #70 | await runCi({ quiet: values.quiet }); |
| #71 | return; |
| #72 | } |
| #73 | |
| #74 | const full = values.full ?? false; |
| #75 | |
| #76 | await buildRuntime({ |
| #77 | install: !(values['no-install'] ?? false), |
| #78 | build: full || (values.build ?? false), |
| #79 | spawn: full || (values.spawn ?? false), |
| #80 | brain: full || (values.brain ?? false), |
| #81 | mcp: full || (values.mcp ?? false), |
| #82 | hermes: full || (values.hermes ?? false), |
| #83 | run: values.run ?? false, |
| #84 | quiet: values.quiet ?? false, |
| #85 | }); |
| #86 | } |
| #87 | |
| #88 | main().catch((err) => { |
| #89 | console.error(err); |
| #90 | process.exit(1); |
| #91 | }); |
| #92 |