Initial commit: Paperclip plugin for Legal AI integration

16 agent tools, event handler for auto-linking, sync job every 15m.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-04 08:03:43 +00:00
commit 587a2a76ca
1183 changed files with 629235 additions and 0 deletions

View File

@@ -0,0 +1,279 @@
import { z } from "zod";
export declare const agentPermissionsSchema: z.ZodObject<{
canCreateAgents: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
}, "strip", z.ZodTypeAny, {
canCreateAgents: boolean;
}, {
canCreateAgents?: boolean | undefined;
}>;
export declare const agentInstructionsBundleModeSchema: z.ZodEnum<["managed", "external"]>;
export declare const updateAgentInstructionsBundleSchema: z.ZodObject<{
mode: z.ZodOptional<z.ZodEnum<["managed", "external"]>>;
rootPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
entryFile: z.ZodOptional<z.ZodString>;
clearLegacyPromptTemplate: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
}, "strip", z.ZodTypeAny, {
clearLegacyPromptTemplate: boolean;
mode?: "external" | "managed" | undefined;
rootPath?: string | null | undefined;
entryFile?: string | undefined;
}, {
mode?: "external" | "managed" | undefined;
rootPath?: string | null | undefined;
entryFile?: string | undefined;
clearLegacyPromptTemplate?: boolean | undefined;
}>;
export type UpdateAgentInstructionsBundle = z.infer<typeof updateAgentInstructionsBundleSchema>;
export declare const upsertAgentInstructionsFileSchema: z.ZodObject<{
path: z.ZodString;
content: z.ZodString;
clearLegacyPromptTemplate: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
}, "strip", z.ZodTypeAny, {
path: string;
content: string;
clearLegacyPromptTemplate: boolean;
}, {
path: string;
content: string;
clearLegacyPromptTemplate?: boolean | undefined;
}>;
export type UpsertAgentInstructionsFile = z.infer<typeof upsertAgentInstructionsFileSchema>;
export declare const createAgentSchema: z.ZodObject<{
name: z.ZodString;
role: z.ZodDefault<z.ZodOptional<z.ZodEnum<["ceo", "cto", "cmo", "cfo", "engineer", "designer", "pm", "qa", "devops", "researcher", "general"]>>>;
title: z.ZodNullable<z.ZodOptional<z.ZodString>>;
icon: z.ZodNullable<z.ZodOptional<z.ZodEnum<["bot", "cpu", "brain", "zap", "rocket", "code", "terminal", "shield", "eye", "search", "wrench", "hammer", "lightbulb", "sparkles", "star", "heart", "flame", "bug", "cog", "database", "globe", "lock", "mail", "message-square", "file-code", "git-branch", "package", "puzzle", "target", "wand", "atom", "circuit-board", "radar", "swords", "telescope", "microscope", "crown", "gem", "hexagon", "pentagon", "fingerprint"]>>>;
reportsTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
capabilities: z.ZodNullable<z.ZodOptional<z.ZodString>>;
desiredSkills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
adapterType: z.ZodDefault<z.ZodOptional<z.ZodEnum<["process", "http", "claude_local", "codex_local", "opencode_local", "pi_local", "cursor", "openclaw_gateway", "hermes_local"]>>>;
adapterConfig: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>>>;
runtimeConfig: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
budgetMonthlyCents: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
permissions: z.ZodOptional<z.ZodObject<{
canCreateAgents: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
}, "strip", z.ZodTypeAny, {
canCreateAgents: boolean;
}, {
canCreateAgents?: boolean | undefined;
}>>;
metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
}, "strip", z.ZodTypeAny, {
name: string;
budgetMonthlyCents: number;
adapterType: "process" | "http" | "claude_local" | "codex_local" | "opencode_local" | "pi_local" | "cursor" | "openclaw_gateway" | "hermes_local";
role: "ceo" | "cto" | "cmo" | "cfo" | "engineer" | "designer" | "pm" | "qa" | "devops" | "researcher" | "general";
adapterConfig: Record<string, unknown>;
runtimeConfig: Record<string, unknown>;
metadata?: Record<string, unknown> | null | undefined;
desiredSkills?: string[] | undefined;
title?: string | null | undefined;
icon?: "bot" | "cpu" | "brain" | "zap" | "rocket" | "code" | "terminal" | "shield" | "eye" | "search" | "wrench" | "hammer" | "lightbulb" | "sparkles" | "star" | "heart" | "flame" | "bug" | "cog" | "database" | "globe" | "lock" | "mail" | "message-square" | "file-code" | "git-branch" | "package" | "puzzle" | "target" | "wand" | "atom" | "circuit-board" | "radar" | "swords" | "telescope" | "microscope" | "crown" | "gem" | "hexagon" | "pentagon" | "fingerprint" | null | undefined;
capabilities?: string | null | undefined;
permissions?: {
canCreateAgents: boolean;
} | undefined;
reportsTo?: string | null | undefined;
}, {
name: string;
budgetMonthlyCents?: number | undefined;
metadata?: Record<string, unknown> | null | undefined;
adapterType?: "process" | "http" | "claude_local" | "codex_local" | "opencode_local" | "pi_local" | "cursor" | "openclaw_gateway" | "hermes_local" | undefined;
desiredSkills?: string[] | undefined;
role?: "ceo" | "cto" | "cmo" | "cfo" | "engineer" | "designer" | "pm" | "qa" | "devops" | "researcher" | "general" | undefined;
title?: string | null | undefined;
icon?: "bot" | "cpu" | "brain" | "zap" | "rocket" | "code" | "terminal" | "shield" | "eye" | "search" | "wrench" | "hammer" | "lightbulb" | "sparkles" | "star" | "heart" | "flame" | "bug" | "cog" | "database" | "globe" | "lock" | "mail" | "message-square" | "file-code" | "git-branch" | "package" | "puzzle" | "target" | "wand" | "atom" | "circuit-board" | "radar" | "swords" | "telescope" | "microscope" | "crown" | "gem" | "hexagon" | "pentagon" | "fingerprint" | null | undefined;
capabilities?: string | null | undefined;
adapterConfig?: Record<string, unknown> | undefined;
runtimeConfig?: Record<string, unknown> | undefined;
permissions?: {
canCreateAgents?: boolean | undefined;
} | undefined;
reportsTo?: string | null | undefined;
}>;
export type CreateAgent = z.infer<typeof createAgentSchema>;
export declare const createAgentHireSchema: z.ZodObject<{
name: z.ZodString;
role: z.ZodDefault<z.ZodOptional<z.ZodEnum<["ceo", "cto", "cmo", "cfo", "engineer", "designer", "pm", "qa", "devops", "researcher", "general"]>>>;
title: z.ZodNullable<z.ZodOptional<z.ZodString>>;
icon: z.ZodNullable<z.ZodOptional<z.ZodEnum<["bot", "cpu", "brain", "zap", "rocket", "code", "terminal", "shield", "eye", "search", "wrench", "hammer", "lightbulb", "sparkles", "star", "heart", "flame", "bug", "cog", "database", "globe", "lock", "mail", "message-square", "file-code", "git-branch", "package", "puzzle", "target", "wand", "atom", "circuit-board", "radar", "swords", "telescope", "microscope", "crown", "gem", "hexagon", "pentagon", "fingerprint"]>>>;
reportsTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
capabilities: z.ZodNullable<z.ZodOptional<z.ZodString>>;
desiredSkills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
adapterType: z.ZodDefault<z.ZodOptional<z.ZodEnum<["process", "http", "claude_local", "codex_local", "opencode_local", "pi_local", "cursor", "openclaw_gateway", "hermes_local"]>>>;
adapterConfig: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>>>;
runtimeConfig: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
budgetMonthlyCents: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
permissions: z.ZodOptional<z.ZodObject<{
canCreateAgents: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
}, "strip", z.ZodTypeAny, {
canCreateAgents: boolean;
}, {
canCreateAgents?: boolean | undefined;
}>>;
metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
} & {
sourceIssueId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
sourceIssueIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
name: string;
budgetMonthlyCents: number;
adapterType: "process" | "http" | "claude_local" | "codex_local" | "opencode_local" | "pi_local" | "cursor" | "openclaw_gateway" | "hermes_local";
role: "ceo" | "cto" | "cmo" | "cfo" | "engineer" | "designer" | "pm" | "qa" | "devops" | "researcher" | "general";
adapterConfig: Record<string, unknown>;
runtimeConfig: Record<string, unknown>;
metadata?: Record<string, unknown> | null | undefined;
desiredSkills?: string[] | undefined;
title?: string | null | undefined;
icon?: "bot" | "cpu" | "brain" | "zap" | "rocket" | "code" | "terminal" | "shield" | "eye" | "search" | "wrench" | "hammer" | "lightbulb" | "sparkles" | "star" | "heart" | "flame" | "bug" | "cog" | "database" | "globe" | "lock" | "mail" | "message-square" | "file-code" | "git-branch" | "package" | "puzzle" | "target" | "wand" | "atom" | "circuit-board" | "radar" | "swords" | "telescope" | "microscope" | "crown" | "gem" | "hexagon" | "pentagon" | "fingerprint" | null | undefined;
capabilities?: string | null | undefined;
permissions?: {
canCreateAgents: boolean;
} | undefined;
reportsTo?: string | null | undefined;
sourceIssueId?: string | null | undefined;
sourceIssueIds?: string[] | undefined;
}, {
name: string;
budgetMonthlyCents?: number | undefined;
metadata?: Record<string, unknown> | null | undefined;
adapterType?: "process" | "http" | "claude_local" | "codex_local" | "opencode_local" | "pi_local" | "cursor" | "openclaw_gateway" | "hermes_local" | undefined;
desiredSkills?: string[] | undefined;
role?: "ceo" | "cto" | "cmo" | "cfo" | "engineer" | "designer" | "pm" | "qa" | "devops" | "researcher" | "general" | undefined;
title?: string | null | undefined;
icon?: "bot" | "cpu" | "brain" | "zap" | "rocket" | "code" | "terminal" | "shield" | "eye" | "search" | "wrench" | "hammer" | "lightbulb" | "sparkles" | "star" | "heart" | "flame" | "bug" | "cog" | "database" | "globe" | "lock" | "mail" | "message-square" | "file-code" | "git-branch" | "package" | "puzzle" | "target" | "wand" | "atom" | "circuit-board" | "radar" | "swords" | "telescope" | "microscope" | "crown" | "gem" | "hexagon" | "pentagon" | "fingerprint" | null | undefined;
capabilities?: string | null | undefined;
adapterConfig?: Record<string, unknown> | undefined;
runtimeConfig?: Record<string, unknown> | undefined;
permissions?: {
canCreateAgents?: boolean | undefined;
} | undefined;
reportsTo?: string | null | undefined;
sourceIssueId?: string | null | undefined;
sourceIssueIds?: string[] | undefined;
}>;
export type CreateAgentHire = z.infer<typeof createAgentHireSchema>;
export declare const updateAgentSchema: z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
budgetMonthlyCents: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
metadata: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
adapterType: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodEnum<["process", "http", "claude_local", "codex_local", "opencode_local", "pi_local", "cursor", "openclaw_gateway", "hermes_local"]>>>>;
desiredSkills: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
role: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodEnum<["ceo", "cto", "cmo", "cfo", "engineer", "designer", "pm", "qa", "devops", "researcher", "general"]>>>>;
title: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
icon: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodEnum<["bot", "cpu", "brain", "zap", "rocket", "code", "terminal", "shield", "eye", "search", "wrench", "hammer", "lightbulb", "sparkles", "star", "heart", "flame", "bug", "cog", "database", "globe", "lock", "mail", "message-square", "file-code", "git-branch", "package", "puzzle", "target", "wand", "atom", "circuit-board", "radar", "swords", "telescope", "microscope", "crown", "gem", "hexagon", "pentagon", "fingerprint"]>>>>;
capabilities: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
adapterConfig: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>>>>;
runtimeConfig: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
reportsTo: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
} & {
permissions: z.ZodOptional<z.ZodNever>;
replaceAdapterConfig: z.ZodOptional<z.ZodBoolean>;
status: z.ZodOptional<z.ZodEnum<["active", "paused", "idle", "running", "error", "pending_approval", "terminated"]>>;
spentMonthlyCents: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
status?: "active" | "paused" | "idle" | "running" | "error" | "pending_approval" | "terminated" | undefined;
name?: string | undefined;
budgetMonthlyCents?: number | undefined;
spentMonthlyCents?: number | undefined;
metadata?: Record<string, unknown> | null | undefined;
adapterType?: "process" | "http" | "claude_local" | "codex_local" | "opencode_local" | "pi_local" | "cursor" | "openclaw_gateway" | "hermes_local" | undefined;
desiredSkills?: string[] | undefined;
role?: "ceo" | "cto" | "cmo" | "cfo" | "engineer" | "designer" | "pm" | "qa" | "devops" | "researcher" | "general" | undefined;
title?: string | null | undefined;
icon?: "bot" | "cpu" | "brain" | "zap" | "rocket" | "code" | "terminal" | "shield" | "eye" | "search" | "wrench" | "hammer" | "lightbulb" | "sparkles" | "star" | "heart" | "flame" | "bug" | "cog" | "database" | "globe" | "lock" | "mail" | "message-square" | "file-code" | "git-branch" | "package" | "puzzle" | "target" | "wand" | "atom" | "circuit-board" | "radar" | "swords" | "telescope" | "microscope" | "crown" | "gem" | "hexagon" | "pentagon" | "fingerprint" | null | undefined;
capabilities?: string | null | undefined;
adapterConfig?: Record<string, unknown> | undefined;
runtimeConfig?: Record<string, unknown> | undefined;
permissions?: undefined;
reportsTo?: string | null | undefined;
replaceAdapterConfig?: boolean | undefined;
}, {
status?: "active" | "paused" | "idle" | "running" | "error" | "pending_approval" | "terminated" | undefined;
name?: string | undefined;
budgetMonthlyCents?: number | undefined;
spentMonthlyCents?: number | undefined;
metadata?: Record<string, unknown> | null | undefined;
adapterType?: "process" | "http" | "claude_local" | "codex_local" | "opencode_local" | "pi_local" | "cursor" | "openclaw_gateway" | "hermes_local" | undefined;
desiredSkills?: string[] | undefined;
role?: "ceo" | "cto" | "cmo" | "cfo" | "engineer" | "designer" | "pm" | "qa" | "devops" | "researcher" | "general" | undefined;
title?: string | null | undefined;
icon?: "bot" | "cpu" | "brain" | "zap" | "rocket" | "code" | "terminal" | "shield" | "eye" | "search" | "wrench" | "hammer" | "lightbulb" | "sparkles" | "star" | "heart" | "flame" | "bug" | "cog" | "database" | "globe" | "lock" | "mail" | "message-square" | "file-code" | "git-branch" | "package" | "puzzle" | "target" | "wand" | "atom" | "circuit-board" | "radar" | "swords" | "telescope" | "microscope" | "crown" | "gem" | "hexagon" | "pentagon" | "fingerprint" | null | undefined;
capabilities?: string | null | undefined;
adapterConfig?: Record<string, unknown> | undefined;
runtimeConfig?: Record<string, unknown> | undefined;
permissions?: undefined;
reportsTo?: string | null | undefined;
replaceAdapterConfig?: boolean | undefined;
}>;
export type UpdateAgent = z.infer<typeof updateAgentSchema>;
export declare const updateAgentInstructionsPathSchema: z.ZodObject<{
path: z.ZodNullable<z.ZodString>;
adapterConfigKey: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
path: string | null;
adapterConfigKey?: string | undefined;
}, {
path: string | null;
adapterConfigKey?: string | undefined;
}>;
export type UpdateAgentInstructionsPath = z.infer<typeof updateAgentInstructionsPathSchema>;
export declare const createAgentKeySchema: z.ZodObject<{
name: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
name: string;
}, {
name?: string | undefined;
}>;
export type CreateAgentKey = z.infer<typeof createAgentKeySchema>;
export declare const wakeAgentSchema: z.ZodObject<{
source: z.ZodDefault<z.ZodOptional<z.ZodEnum<["timer", "assignment", "on_demand", "automation"]>>>;
triggerDetail: z.ZodOptional<z.ZodEnum<["manual", "ping", "callback", "system"]>>;
reason: z.ZodNullable<z.ZodOptional<z.ZodString>>;
payload: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
idempotencyKey: z.ZodNullable<z.ZodOptional<z.ZodString>>;
forceFreshSession: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>, boolean, unknown>;
}, "strip", z.ZodTypeAny, {
source: "timer" | "assignment" | "on_demand" | "automation";
forceFreshSession: boolean;
reason?: string | null | undefined;
triggerDetail?: "manual" | "system" | "ping" | "callback" | undefined;
payload?: Record<string, unknown> | null | undefined;
idempotencyKey?: string | null | undefined;
}, {
source?: "timer" | "assignment" | "on_demand" | "automation" | undefined;
reason?: string | null | undefined;
triggerDetail?: "manual" | "system" | "ping" | "callback" | undefined;
payload?: Record<string, unknown> | null | undefined;
idempotencyKey?: string | null | undefined;
forceFreshSession?: unknown;
}>;
export type WakeAgent = z.infer<typeof wakeAgentSchema>;
export declare const resetAgentSessionSchema: z.ZodObject<{
taskKey: z.ZodNullable<z.ZodOptional<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
taskKey?: string | null | undefined;
}, {
taskKey?: string | null | undefined;
}>;
export type ResetAgentSession = z.infer<typeof resetAgentSessionSchema>;
export declare const testAdapterEnvironmentSchema: z.ZodObject<{
adapterConfig: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>>>;
}, "strip", z.ZodTypeAny, {
adapterConfig: Record<string, unknown>;
}, {
adapterConfig?: Record<string, unknown> | undefined;
}>;
export type TestAdapterEnvironment = z.infer<typeof testAdapterEnvironmentSchema>;
export declare const updateAgentPermissionsSchema: z.ZodObject<{
canCreateAgents: z.ZodBoolean;
canAssignTasks: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
canCreateAgents: boolean;
canAssignTasks: boolean;
}, {
canCreateAgents: boolean;
canAssignTasks: boolean;
}>;
export type UpdateAgentPermissions = z.infer<typeof updateAgentPermissionsSchema>;
//# sourceMappingURL=agent.d.ts.map