Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/mobile/src/components/agents/platform-filter-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Text } from '@/components/ui/text';
import { useThemeColors } from '@/lib/hooks/use-theme-colors';
import { cn } from '@/lib/utils';

const PLATFORM_FILTERS = ['cloud-agent', 'extension', 'cli', 'slack', 'other'] as const;
const PLATFORM_FILTERS = ['cloud-agent', 'extension', 'gastown', 'cli', 'slack', 'other'] as const;
const chipScrollContentStyle = { paddingHorizontal: 22, paddingVertical: 8, gap: 8 };

export type ProjectFilterOption = {
Expand Down Expand Up @@ -57,6 +57,9 @@ function platformFilterLabel(p: string): string {
case 'other': {
return 'Other';
}
case 'gastown': {
return 'Gastown';
}
default: {
return p;
}
Expand Down
23 changes: 22 additions & 1 deletion apps/web/src/app/admin/gastown/towns/[townId]/BeadsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import Link from 'next/link';
import { formatDistanceToNow } from 'date-fns';
import { Trash2 } from 'lucide-react';

const beadStatuses = ['open', 'in_progress', 'closed', 'failed'] as const;
const beadStatuses = ['open', 'in_progress', 'in_review', 'closed', 'failed'] as const;
type BeadStatus = (typeof beadStatuses)[number];

const beadTypes = [
Expand All @@ -44,6 +44,7 @@ type BeadType = (typeof beadTypes)[number];
const STATUS_COLORS: Record<BeadStatus, string> = {
open: 'bg-blue-500/10 text-blue-400 border-blue-500/20',
in_progress: 'bg-yellow-500/10 text-yellow-400 border-yellow-500/20',
in_review: 'bg-purple-500/10 text-purple-400 border-purple-500/20',
closed: 'bg-green-500/10 text-green-400 border-green-500/20',
failed: 'bg-red-500/10 text-red-400 border-red-500/20',
};
Expand Down Expand Up @@ -239,6 +240,7 @@ export function BeadsTab({ townId }: { townId: string }) {
<SelectItem value="all">All statuses</SelectItem>
<SelectItem value="open">Open</SelectItem>
<SelectItem value="in_progress">In Progress</SelectItem>
<SelectItem value="in_review">In Review</SelectItem>
<SelectItem value="closed">Closed</SelectItem>
<SelectItem value="failed">Failed</SelectItem>
</SelectContent>
Expand Down Expand Up @@ -321,6 +323,9 @@ export function BeadsTab({ townId }: { townId: string }) {
<th className="text-muted-foreground pb-2 text-left font-medium">Bead</th>
<th className="text-muted-foreground pb-2 text-left font-medium">Type</th>
<th className="text-muted-foreground pb-2 text-left font-medium">Status</th>
<th className="text-muted-foreground pb-2 text-left font-medium">
Failure Reason
</th>
<th className="text-muted-foreground pb-2 text-left font-medium">Agent</th>
<th className="text-muted-foreground pb-2 text-left font-medium">Created</th>
<th className="text-muted-foreground pb-2 text-right font-medium">Actions</th>
Expand Down Expand Up @@ -353,6 +358,22 @@ export function BeadsTab({ townId }: { townId: string }) {
{bead.status}
</Badge>
</td>
<td className="py-2 pr-4">
{bead.status === 'failed' && bead.failure_reason ? (
<div className="max-w-72" title={bead.failure_reason.details}>
<p className="truncate text-sm text-red-300">
{bead.failure_reason.message}
</p>
<p className="text-muted-foreground font-mono text-xs">
{bead.failure_reason.code} · {bead.failure_reason.source}
</p>
</div>
) : bead.status === 'failed' ? (
<span className="text-muted-foreground text-xs">No reason recorded</span>
) : (
<span className="text-muted-foreground text-xs">—</span>
)}
</td>
<td className="py-2 pr-4">
{bead.assignee_agent_bead_id ? (
<Link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { ArrowLeft } from 'lucide-react';
const STATUS_COLORS: Record<string, string> = {
open: 'bg-blue-500/10 text-blue-400 border-blue-500/20',
in_progress: 'bg-yellow-500/10 text-yellow-400 border-yellow-500/20',
in_review: 'bg-purple-500/10 text-purple-400 border-purple-500/20',
closed: 'bg-green-500/10 text-green-400 border-green-500/20',
failed: 'bg-red-500/10 text-red-400 border-red-500/20',
};
Expand Down Expand Up @@ -262,6 +263,28 @@ export function BeadInspectorDashboard({ townId, beadId }: { townId: string; bea
<dd>{bead.title}</dd>
</div>
)}
{bead.status === 'failed' && (
<div className="col-span-2 md:col-span-3">
<dt className="text-muted-foreground text-xs font-medium tracking-wide uppercase">
Failure Reason
</dt>
{bead.failure_reason ? (
<dd className="mt-1 rounded-md border border-red-500/20 bg-red-500/5 p-3">
<p className="text-sm text-red-200">{bead.failure_reason.message}</p>
<p className="text-muted-foreground mt-1 font-mono text-xs">
{bead.failure_reason.code} · {bead.failure_reason.source}
</p>
{bead.failure_reason.details && (
<pre className="text-muted-foreground mt-2 max-h-48 overflow-auto whitespace-pre-wrap rounded bg-black/20 p-2 font-mono text-xs">
{bead.failure_reason.details}
</pre>
)}
</dd>
) : (
<dd className="text-muted-foreground">No failure reason recorded.</dd>
)}
</div>
)}
</dl>
</CardContent>
</Card>
Expand Down
4 changes: 3 additions & 1 deletion apps/web/src/components/cloud-agent-next/ChatSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ function SessionRow({
);
}

const PLATFORM_FILTERS = ['cloud-agent', 'extension', 'cli', 'slack', 'other'] as const;
const PLATFORM_FILTERS = ['cloud-agent', 'extension', 'gastown', 'cli', 'slack', 'other'] as const;

function platformFilterLabel(p: string): string {
switch (p) {
Expand All @@ -284,6 +284,8 @@ function platformFilterLabel(p: string): string {
return 'Slack';
case 'other':
return 'Other';
case 'gastown':
return 'Gastown';
default:
return p;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ export function CloudSidebarLayout({ organizationId, children }: CloudSidebarLay
if (platformFilter.length === 0) return undefined;
return platformFilter.flatMap(p => {
switch (p) {
// 'cloud-agent-web' is a variant of the cloud agent
case 'cloud-agent':
return ['cloud-agent', 'cloud-agent-web'];
// Extension sessions are created from VS Code or agent-manager
case 'extension':
return ['vscode', 'agent-manager'];
default:
// Handles platforms like 'gastown' by passing through unchanged
return [p];
}
});
Expand Down
14 changes: 12 additions & 2 deletions apps/web/src/routers/admin/gastown-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const UserRigRecord = z.object({
const BeadRecord = z.object({
bead_id: z.string(),
type: z.enum(['issue', 'message', 'escalation', 'merge_request', 'convoy', 'molecule', 'agent']),
status: z.enum(['open', 'in_progress', 'closed', 'failed']),
status: z.enum(['open', 'in_progress', 'in_review', 'closed', 'failed']),
title: z.string(),
body: z.string().nullable(),
rig_id: z.string().nullable(),
Expand All @@ -51,6 +51,16 @@ const BeadRecord = z.object({
created_at: z.string(),
updated_at: z.string(),
closed_at: z.string().nullable(),
failure_reason: z
.object({
code: z.string(),
message: z.string(),
details: z.string().optional(),
source: z.string(),
})
.nullable()
.optional()
.default(null),
});

const AgentRecord = z.object({
Expand Down Expand Up @@ -506,7 +516,7 @@ export const adminGastownRouter = createTRPCRouter({
.input(
z.object({
townId: z.string().uuid(),
status: z.enum(['open', 'in_progress', 'closed', 'failed']).optional(),
status: z.enum(['open', 'in_progress', 'in_review', 'closed', 'failed']).optional(),
type: z
.enum(['issue', 'message', 'escalation', 'merge_request', 'convoy', 'molecule', 'agent'])
.optional(),
Expand Down
83 changes: 74 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ catalog:

minimumReleaseAge: 6842
minimumReleaseAgeExclude:
- '@kilocode/*'
- tsx
- expo-dev-client
- expo-dev-launcher
Expand Down
2 changes: 1 addition & 1 deletion services/gastown/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ RUN git lfs install --system
# Install both glibc and musl variants — the CLI's binary resolver may
# pick either depending on the detected libc.
# Also install pnpm — many projects use it as their package manager.
RUN npm install -g @kilocode/cli@7.2.14 @kilocode/cli-linux-x64@7.2.14 @kilocode/cli-linux-x64-musl@7.2.14 @kilocode/plugin@7.2.14 pnpm && \
RUN npm install -g @kilocode/cli@7.3.1 @kilocode/cli-linux-x64@7.3.1 @kilocode/cli-linux-x64-musl@7.3.1 @kilocode/plugin@7.3.1 pnpm && \
ln -s "$(which kilo)" /usr/local/bin/opencode

# Create non-root user for defense-in-depth
Expand Down
2 changes: 1 addition & 1 deletion services/gastown/container/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ RUN git lfs install --system
# pick either depending on the detected libc. bun:1-slim is Debian (glibc)
# but the resolver sometimes misdetects; installing both is safe.
# Also install pnpm — many projects use it as their package manager.
RUN npm install -g @kilocode/cli@7.2.14 @kilocode/cli-linux-arm64@7.2.14 @kilocode/cli-linux-arm64-musl@7.2.14 @kilocode/plugin@7.2.14 pnpm && \
RUN npm install -g @kilocode/cli@7.3.1 @kilocode/cli-linux-arm64@7.3.1 @kilocode/cli-linux-arm64-musl@7.3.1 @kilocode/plugin@7.3.1 pnpm && \
ln -s "$(which kilo)" /usr/local/bin/opencode

# Create non-root user for defense-in-depth
Expand Down
2 changes: 1 addition & 1 deletion services/gastown/container/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"dependencies": {
"@kilocode/plugin": "7.2.52",
"@kilocode/sdk": "7.2.14",
"@kilocode/sdk": "7.3.1",
"hono": "catalog:",
"zod": "catalog:"
},
Expand Down
Loading