caisson-cli 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -38
- package/dist/admin/workspaceAdmin.d.ts +3 -3
- package/dist/auth/agentAuth.d.ts +11 -1
- package/dist/auth/agentAuth.js +44 -15
- package/dist/auth/agentAuth.js.map +1 -1
- package/dist/cli/caissonCli.d.ts +5 -0
- package/dist/cli/caissonCli.js +61 -4
- package/dist/cli/caissonCli.js.map +1 -1
- package/dist/cli/doctor.d.ts +31 -0
- package/dist/cli/doctor.js +321 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/inviteCard.d.ts +13 -0
- package/dist/cli/inviteCard.js +81 -19
- package/dist/cli/inviteCard.js.map +1 -1
- package/dist/mcp/handlers.d.ts +2 -0
- package/dist/mcp/handlers.js +53 -25
- package/dist/mcp/handlers.js.map +1 -1
- package/dist/mcp/httpServer.d.ts +4 -0
- package/dist/mcp/httpServer.js +20 -4
- package/dist/mcp/httpServer.js.map +1 -1
- package/dist/web/discoveryRoutes.d.ts +4 -0
- package/dist/web/discoveryRoutes.js +80 -4
- package/dist/web/discoveryRoutes.js.map +1 -1
- package/dist/web/docsRoutes.d.ts +14 -0
- package/dist/web/docsRoutes.js +451 -0
- package/dist/web/docsRoutes.js.map +1 -0
- package/dist/web/explorer/renderers.js +4 -2
- package/dist/web/explorer/renderers.js.map +1 -1
- package/dist/web/landing.d.ts +36 -0
- package/dist/web/landing.js +532 -0
- package/dist/web/landing.js.map +1 -0
- package/dist/web/onboardingRoutes.d.ts +96 -0
- package/dist/web/onboardingRoutes.js +629 -0
- package/dist/web/onboardingRoutes.js.map +1 -0
- package/package.json +58 -57
- package/public/.well-known/agent-card.json +162 -153
- package/public/llms.txt +40 -35
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import type Database from 'better-sqlite3';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export type OnboardingClientKind = 'claude-code' | 'cursor' | 'codex' | 'antigravity' | 'cloud-sandbox' | 'windows-proxy' | 'generic';
|
|
5
|
+
export declare const OnboardingRegisterInput: z.ZodObject<{
|
|
6
|
+
handle: z.ZodOptional<z.ZodString>;
|
|
7
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
8
|
+
workspace_id: z.ZodOptional<z.ZodString>;
|
|
9
|
+
invite_code: z.ZodOptional<z.ZodString>;
|
|
10
|
+
client: z.ZodDefault<z.ZodEnum<["claude-code", "cursor", "codex", "antigravity", "cloud-sandbox", "windows-proxy", "generic"]>>;
|
|
11
|
+
}, "strict", z.ZodTypeAny, {
|
|
12
|
+
client: "cursor" | "generic" | "claude-code" | "codex" | "antigravity" | "cloud-sandbox" | "windows-proxy";
|
|
13
|
+
workspace_id?: string | undefined;
|
|
14
|
+
display_name?: string | undefined;
|
|
15
|
+
handle?: string | undefined;
|
|
16
|
+
invite_code?: string | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
workspace_id?: string | undefined;
|
|
19
|
+
display_name?: string | undefined;
|
|
20
|
+
handle?: string | undefined;
|
|
21
|
+
invite_code?: string | undefined;
|
|
22
|
+
client?: "cursor" | "generic" | "claude-code" | "codex" | "antigravity" | "cloud-sandbox" | "windows-proxy" | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
export interface OnboardingRateLimitConfig {
|
|
25
|
+
maxPerIpPerHour?: number;
|
|
26
|
+
maxGlobalPerHour?: number;
|
|
27
|
+
windowMs?: number;
|
|
28
|
+
}
|
|
29
|
+
export declare class OnboardingRateLimiter {
|
|
30
|
+
private readonly maxPerIp;
|
|
31
|
+
private readonly maxGlobal;
|
|
32
|
+
private readonly windowMs;
|
|
33
|
+
private readonly byIp;
|
|
34
|
+
private globalHits;
|
|
35
|
+
constructor(cfg?: OnboardingRateLimitConfig);
|
|
36
|
+
checkAndConsume(ip: string, nowMs?: number): {
|
|
37
|
+
allowed: boolean;
|
|
38
|
+
remaining: number;
|
|
39
|
+
retryAfterSeconds: number;
|
|
40
|
+
reason?: 'ip_limit' | 'global_limit';
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface RegisteredSandboxResult {
|
|
44
|
+
agent_id: string;
|
|
45
|
+
operator_id: string;
|
|
46
|
+
handle: string;
|
|
47
|
+
display_name: string;
|
|
48
|
+
api_key: string;
|
|
49
|
+
api_key_prefix: string;
|
|
50
|
+
rate_limit_tier: 'sandbox' | 'standard';
|
|
51
|
+
hourly_verification_quota: number;
|
|
52
|
+
client: OnboardingClientKind;
|
|
53
|
+
mcp_endpoint: string;
|
|
54
|
+
primary_workspace: {
|
|
55
|
+
workspace_id: string;
|
|
56
|
+
slug: string;
|
|
57
|
+
title: string;
|
|
58
|
+
environment_version: string;
|
|
59
|
+
} | null;
|
|
60
|
+
workspaces: Array<{
|
|
61
|
+
workspace_id: string;
|
|
62
|
+
slug: string;
|
|
63
|
+
title: string;
|
|
64
|
+
role: 'contributor';
|
|
65
|
+
}>;
|
|
66
|
+
configs: {
|
|
67
|
+
claude_code_cmd: string;
|
|
68
|
+
mcp_json: string;
|
|
69
|
+
windows_proxy_json: string;
|
|
70
|
+
codex_toml: string;
|
|
71
|
+
doctor_cmd: string;
|
|
72
|
+
cloud_sandbox_egress_hosts: string[];
|
|
73
|
+
human_go_ahead_prompt: string;
|
|
74
|
+
task_prompt: string;
|
|
75
|
+
invite_card_md: string;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export declare function registerSandboxAgent(db: Database.Database, rawInput: unknown, opts?: {
|
|
79
|
+
apiUrl?: string;
|
|
80
|
+
allowedInviteCodes?: string[];
|
|
81
|
+
}): RegisteredSandboxResult;
|
|
82
|
+
export declare function renderStartPageHtml(db: Database.Database, opts: {
|
|
83
|
+
baseUrl: string;
|
|
84
|
+
apiUrl: string;
|
|
85
|
+
selectedWorkspace?: string;
|
|
86
|
+
selectedClient?: OnboardingClientKind;
|
|
87
|
+
minted?: RegisteredSandboxResult;
|
|
88
|
+
errorMessage?: string;
|
|
89
|
+
}): string;
|
|
90
|
+
export interface OnboardingRouterOptions {
|
|
91
|
+
baseUrl?: string;
|
|
92
|
+
apiUrl?: string;
|
|
93
|
+
rateLimiter?: OnboardingRateLimiter;
|
|
94
|
+
allowedInviteCodes?: string[];
|
|
95
|
+
}
|
|
96
|
+
export declare function createOnboardingRouter(db: Database.Database, opts?: OnboardingRouterOptions): express.Router;
|