Skip to content

Commit

A self-hosted g1t's off Worker answers only the JSON protocol the services speak: the runner methods it also stood in for (enabled, modelAccess, instructions, run, plan, applyPlan, update, review, recheck, stopRun) were for the site's calls to g1t's own agents, and nothing calls them. The self-hosted configuration no longer lists the model proxy among the parts it does not run. Checked: the deploy tool's 92 tests.

syntaqxcommitted Parent7c48be8Browse files
2 files+5−410/2 viewed
+2−2
363363 // service in docker-compose.yml), so it stays up when the site does not:
364364 // not in workers.txt. It checks the site from inside Compose
365365 // (STATUS_CHECK_URL) and links to it at PUBLIC_URL. Parts this
366−// installation does not run (the API, MCP, docs, g1t.page, the model
367−// proxy, billing) are left off its page; a public repository of yours in
366+// installation does not run (the API, MCP, docs, g1t.page, billing) are
367+// left off its page; a public repository of yours in
368368 // STATUS_PROBE_REPO adds the git check.
369369 {
370370 const hosted = parseJsonc(readFileSync(join(root, "apps/status/wrangler.jsonc"), "utf8"));
+3−39
22 //
33 // Self-hosted phase 1 runs the core forge only. The site and the services
44 // still hold bindings to the cloud runner and the deployments' builders;
5−// this Worker stands in for each of them, so a page that asks whether the
6−// runner is on here is told no instead of failing.
7−//
8−// - As the runner, for the methods the site once called on it: it is
9−// not enabled, and starting anything fails with a message that says why.
10−// - For the JSON protocol the Rust services speak (`POST /rpc/<method>`):
11−// every method answers with a failed Result.
5+// this Worker stands in for each of them: every method of the JSON protocol
6+// the services speak (`POST /rpc/<method>`) answers with a failed Result
7+// that says why, instead of failing.
128 //
139 // OFF_NAME names the feature in those messages, such as "Cloud runners".
1410
2319 }
2420
2521 export default class Off extends WorkerEntrypoint {
26− // ── The runner's methods, as the site calls them ──
27− async enabled() {
28− return false;
29− }
30− async modelAccess() {
31− return { own: null, hosted: false, trial: null };
32− }
33− async instructions() {
34− return off(this.env);
35− }
36− async run() {
37− return off(this.env);
38− }
39− async plan() {
40− return off(this.env);
41− }
42− async applyPlan() {
43− return off(this.env);
44− }
45− async update() {
46− return off(this.env);
47− }
48− async review() {
49− return off(this.env);
50− }
51− async recheck() {
52− return off(this.env);
53− }
54− async stopRun() {
55− return off(this.env);
56− }
57−
5822 // ── The JSON protocol ──
5923 async fetch(request) {
6024 const { pathname } = new URL(request.url);