teamWorkspace (tickets.ts)

ClawKitchen · files

Resolves file paths for team-scoped ticket workspaces and stage directories in a markdown-based ticket system.

// Source: https://github.com/JIGGAI/ClawKitchen | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";

export type TicketStage = "backlog" | "in-progress" | "testing" | "done";

const HIDDEN_TEAM_IDS = new Set(["attestations"]);

export interface TicketSummary {
  teamId: string;
  number: number;
  id: string;
  title: string;
  owner: string | null;
  stage: TicketStage;
  file: string;
  updatedAt: string; // ISO
  ageHours: number;
}

function assertSafeTeamId(teamId: string) {
  // Conservative: matches OpenClaw team ids like "development-team".
  if (!/^[a-z0-9][a-z0-9-]{1,63}$/.test(teamId

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key