Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t.sh

Commit

Nothing declared and never read is left in the site's components and routes: unused imports, parameters and helpers go, and an allowed Ask-first call on a connector's tool finds the connector among the turn's servers, not only the agent's own. A plugin skill's origin reads as the plugin it came with.

syntaqxcommitted Parent0d75c96Browse files
19 files+17−340/19 viewed
+2−0
3434 return `Drafted by @${origin.agent} from “${origin.title}”`;
3535 case "mirror":
3636 return `From ${origin.repo} at ${origin.commit.slice(0, 7)}`;
37+ case "plugin":
38+ return `From the ${origin.plugin} plugin${origin.sha ? ` at ${origin.sha.slice(0, 7)}` : ""}`;
3739 }
3840 }
3941
+1−1
408408 ))}
409409
410410 {/* Lanes: a raised slab each, with an agent riding it. */}
411− {lanes.map((y, index) => (
411+ {lanes.map((y) => (
412412 <g key={y}>
413413 <Box x={0} y={y} w={150} d={16} h={3} stroke="var(--color-fg)" opacity={0.22} top="var(--color-surface)" />
414414 </g>
+1−1
467467
468468 // --- Add-ons ------------------------------------------------------------------------------------
469469
470−export function AddOns({ plan, security, owner, enabled, error }: { plan: FeatureState | null; security: FeatureState | null; owner: boolean; enabled: boolean; error?: string }) {
470+export function AddOns({ plan, security, error }: { plan: FeatureState | null; security: FeatureState | null; error?: string }) {
471471 const planOn = !!plan?.on;
472472 const rows: { key: string; name: string; about: string; price: string; on: boolean; label: string; control: ReactNode }[] = [];
473473 if (security) {
+0−4
3535 /** An error the action returned, for the section it belongs to. */
3636 export type SectionError = { section: string; error: string } | null | undefined;
3737
38−function errorFor(error: SectionError, section: string): string | undefined {
39− return error && error.section === section ? error.error : undefined;
40−}
41−
4238 const CONTROL =
4339 "rounded-md border border-line bg-bg px-2.5 py-1.5 text-sm tabular-nums outline-none transition-colors placeholder:text-faint hover:border-line-strong focus:border-accent-dim";
4440
+1−1
1−import { type RefObject, useEffect, useRef } from "react";
1+import { type RefObject, useEffect } from "react";
22
33 /**
44 * Keeps a conversation's newest message in view while the reader is at
+0−1
1717 import type { Comment, Comparison, DiffLine } from "@g1t/contracts";
1818
1919 import type {
20− HighlightedComparison,
2120 HighlightedFile,
2221 HighlightedLine,
2322 } from "../lib/diff";
+0−1
99
1010 import { Avatar } from "./ui/avatar";
1111 import { Card } from "./ui/card";
12−import { Hint } from "./ui/hint";
1312 import { Kbd } from "./ui/kbd";
1413 import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "./ui/dialog";
1514 import {
+0−2
117117 } from "./ui/collapsible";
118118 import {
119119 Sidebar,
120− SidebarContent,
121120 SidebarGroup,
122121 SidebarGroupAction,
123122 SidebarGroupContent,
124123 SidebarGroupLabel,
125124 SidebarHeader,
126125 SidebarMenu,
127− SidebarMenuAction,
128126 SidebarMenuBadge,
129127 SidebarMenuButton,
130128 SidebarMenuItem,
+0−10
1010
1111 const KINDS: readonly MissingKind[] = ["project", "issue", "pull", "workspace", "person", "page"];
1212
13−/** Words for each kind, as a sentence uses them. */
14−const NOUN: Record<MissingKind, string> = {
15− project: "project",
16− issue: "issue",
17− pull: "pull request",
18− workspace: "workspace",
19− person: "person",
20− page: "page",
21−};
22−
2313 /** Names that are pages of g1t itself, never a workspace. */
2414 const RESERVED = new Set([
2515 "settings", "explore", "search", "new", "u", "pricing", "avatars", "workspaces", "login", "logout",
+1−1
356356 setLiveViaToken(Boolean(user?.token?.website));
357357 offerTicket("/-/live", root?.liveTicket);
358358 }
359− const { pathname, search } = useLocation();
359+ const { pathname } = useLocation();
360360 // Drawn around the error page too: a 404 keeps the sidebar out of a
361361 // project or workspace the viewer cannot see.
362362 const error = useRouteError();
+1−1
11 import { ArrowUpRight } from "lucide-react";
22
3−import { type FeaturePlan, type FreeTier, MICROS_PER_DOLLAR, type Price } from "@g1t/contracts";
3+import type { FeaturePlan, FreeTier, Price } from "@g1t/contracts";
44
55 import type { Route } from "./+types/pricing";
66 import { money as sum, wholeDollars } from "../lib/money";
+1−1
11 import { Box, CircleAlert, MailOpen } from "lucide-react";
2−import { Form, data, redirect } from "react-router";
2+import { Form, redirect } from "react-router";
33
44 import { REPO_ROLE_LABELS, REPO_ROLE_SUMMARIES } from "@g1t/contracts";
55
+1−2
11 import { env } from "cloudflare:workers";
2−import { Bot, ExternalLink, GitCommitHorizontal, GitMerge, Play, Sparkles } from "lucide-react";
2+import { Bot, ExternalLink, GitCommitHorizontal, GitMerge, Sparkles } from "lucide-react";
33 import { Form, Link, redirect } from "react-router";
44
55 import { type Pull, PROVIDERS, workOwner } from "@g1t/contracts";
2424 import { LabelChip, LabelsBox, MilestoneBox } from "../../components/labels";
2525 import {
2626 Assignee,
27− AssigneeStack,
2827 ChangeSize,
2928 CommentForm,
3029 CommentList,
+1−1
11 import { env } from "cloudflare:workers";
22 import type { G1tEvent } from "@g1t/contracts";
33 import { ArrowRight, CircleCheck, FileCode2, Sparkles } from "lucide-react";
4−import { Form, Link, data } from "react-router";
4+import { Form, Link } from "react-router";
55
66 import type { Route } from "./+types/plan";
77 import { refusal, requireRepo, requireWritableRepo } from "../../lib/access.server";
+2−2
9595 {editing ? (
9696 <EnvironmentEditor key={editing.name} environment={editing} base={base} saved={actionData?.saved ?? false} error={actionData?.error} />
9797 ) : (
98− <EnvironmentList environments={environments} base={base} badName={badName} />
98+ <EnvironmentList environments={environments} badName={badName} />
9999 )}
100100 </div>
101101 );
102102 }
103103
104−function EnvironmentList({ environments, base, badName }: { environments: Environment[]; base: string; badName: string | null }) {
104+function EnvironmentList({ environments, badName }: { environments: Environment[]; badName: string | null }) {
105105 return (
106106 <div className="max-w-4xl space-y-8">
107107 <p className="max-w-3xl text-sm text-muted">
+1−1
371371
372372 {paying && <OverageCard requests={requests} owner={owner} error={err("overage")} />}
373373
374− <AddOns plan={plan} security={securityPlan} owner={owner} enabled={status.enabled} error={err("security")} />
374+ <AddOns plan={plan} security={securityPlan} error={err("security")} />
375375
376376 {status.enabled && (
377377 <Suspense fallback={<StripeSkeleton />}>
+1−1
11 import { ArrowRight } from "lucide-react";
22 import { Suspense, useEffect, useState } from "react";
3−import { Await, Form, Link, data, redirect, useNavigation } from "react-router";
3+import { Await, Form, data, redirect, useNavigation } from "react-router";
44
55 import { hasCodeAccess } from "@g1t/contracts";
66
+1−1
11 import { ArrowRight, ArrowUpRight, Box, CircleDot, GitBranch, GitPullRequest, KeyRound, Lock, Pin, Plus, Rocket } from "lucide-react";
22 import { Link, redirect } from "react-router";
33
4−import type { PackageSummary, Project, ProjectDeploys, User } from "@g1t/contracts";
4+import type { PackageSummary, Project, ProjectDeploys } from "@g1t/contracts";
55
66 import type { Route } from "./+types/overview";
77 import { DeployLink, host, StatusDot } from "../../components/deploy";
+2−2
1313 * (cards.ts). Every refusal names its rule in the transcript, through the
1414 * tool's result, and in the audit log, through `refused`.
1515 */
16−import { type Ability, type AbilitySection, type AbilitySource, type McpServer, type MessageCard, type ServiceBinding, type User, chatClient, identityClient, integrationsClient, newId, notifyClient } from "@g1t/contracts";
16+import { type AbilitySection, type McpServer, type MessageCard, type ServiceBinding, type User, chatClient, identityClient, integrationsClient, newId, notifyClient } from "@g1t/contracts";
1717
1818 import { CONNECTORS, connectorPath, connectorView } from "../../../packages/contracts/src/connectors.ts";
1919 import { findAbility, resolveAbilities } from "../../../packages/contracts/src/abilities.ts";
387387 default: {
388388 // An MCP tool: `<server>__<tool>`.
389389 const [, serverId, ...rest] = request.ability.split(":");
390− const server = (definition.abilities.mcp_servers ?? []).find((s: McpServer) => s.id === serverId);
390+ const server = servers.find((s: McpServer) => s.id === serverId);
391391 const tool = server?.tools.find((t) => t.name === rest.join(":"));
392392 if (!server || !tool) return { ok: false, message: "That MCP tool is no longer there." };
393393 const done = await ports.mcp(server, tool, args);

Comments

Sign in to comment.