| 144 | } |
| 145 | |
| 146 | function showHelp() { |
| 147 | console.log(` |
| 148 | Agent Canvas Static-frontend Development Stack |
| 149 | |
| 150 | Runs the automation stack, but serves a production build of the |
| 151 | frontend via scripts/static-server.mjs. Use this when a remote or flaky network |
| 152 | makes Vite's per-module requests painful (e.g. ngrok or plane wifi). |
| 153 | |
| 154 | USAGE: |
| 155 | npm run dev:static [-- options] |
| 156 | |
| 157 | OPTIONS: |
| 158 | -p, --port <port> Ingress port (default: 8000) |
| 159 | --automation-ref <ref> Git ref for automation backend (default: main) |
| 160 | --automation-repo <url> Git repo URL for automation |
| 161 | --skip-build Reuse existing build/ directory (faster restart) |
| 162 | -v, --verbose Show detailed output |
| 163 | -h, --help Show this help |
| 164 | |
| 165 | ENVIRONMENT VARIABLES: |
| 166 | PORT Alternative to --port |
| 167 | OH_AUTOMATION_GIT_REF Alternative to --automation-ref |
| 168 | OH_AGENT_SERVER_GIT_REF Git ref for agent-server SDK |
| 169 | OH_SECRET_KEY Secret key for sessions |
| 170 | |
| 171 | ACCESS POINTS: |
| 172 | Main UI: http://localhost:PORT/ |
| 173 | API Docs: http://localhost:PORT/api/automation/docs |
| 174 | |
| 175 | NOTES: |
| 176 | • The build is produced once at startup. Edit the source and rerun this |
| 177 | command (or rebuild with \`npm run build:app\`) to pick up changes. |
| 178 | • The static server sends ETag headers, so reloads return 304s instead of |
| 179 | refetching content — much friendlier on slow links. |
| 180 | `); |
| 181 | } |
| 182 | |
| 183 | // ═══════════════════════════════════════════════════════════════════════════ |
| 184 | // Prerequisites & Setup |