Skip to content
32 linesCodeBlameRaw

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Security matches the workspace's other pages and leaves out deleted repositories; every section has a name in the trail1/**
2 * How the site shows what the compute gate says (`@g1t/contracts`
3 * compute.ts): its messages name the page to act on, such as
4 * `/acme/-/billing`, which is shown as a link. Pure, so it can be tested.
5 */
6
7/** A message in pieces: plain text, and g1t paths to link. */
8export type Piece = { text: string; href?: string };
9
10/** A workspace page path, such as `/acme/-/billing` or `/acme/-/settings`. */
11const PATH = /(?<![\w/])(\/[a-z0-9][a-z0-9-]*\/-\/[a-z0-9][a-z0-9/#-]*)/gi;
12
13/** Splits a message so the g1t pages it names can be links. */
14export function linkPaths(message: string): Piece[] {
15 const pieces: Piece[] = [];
16 let at = 0;
17 for (const match of message.matchAll(PATH)) {
18 // A sentence's full stop is not part of the path.
19 const path = match[1].replace(/[.#/-]+$/, "");
20 const start = match.index ?? 0;
21 if (start > at) pieces.push({ text: message.slice(at, start) });
22 pieces.push({ text: path, href: path });
23 at = start + path.length;
24 }
25 if (at < message.length) pieces.push({ text: message.slice(at) });
26 return pieces;
27}
28
The site no longer has g1t's own agents. g1t is where the coding agents you already use do their work, so the Agents mode is gone from the rail, with every page under /<workspace>/-/agents: personas, faces, skills, abilities, routines, computers, sessions and agent spend. Customize (skills, connectors, plugins, marketplaces), the context hub, model providers, the AI Gateway page, the Spend page and pill, Ask g1t, and the repository's Agents, Plans and agent settings pages go too, and their addresses now answer 404.29/** How a run waiting for a free slot says so (`WAITING_PREFIX`). */
Security matches the workspace's other pages and leaves out deleted repositories; every section has a name in the trail30export function isWaitingMessage(message: string): boolean {
31 return message.startsWith("Waiting for a free slot");
32}

This file's history is long; its oldest lines are credited to the oldest commit read.