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

21
node_modules/@paperclipai/shared/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 Paperclip AI
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,4 @@
export declare function isUuidLike(value: string | null | undefined): boolean;
export declare function normalizeAgentUrlKey(value: string | null | undefined): string | null;
export declare function deriveAgentUrlKey(name: string | null | undefined, fallback?: string | null): string;
//# sourceMappingURL=agent-url-key.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"agent-url-key.d.ts","sourceRoot":"","sources":["../src/agent-url-key.ts"],"names":[],"mappings":"AAIA,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAGpE;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAQpF;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAEnG"}

22
node_modules/@paperclipai/shared/dist/agent-url-key.js generated vendored Normal file
View File

@@ -0,0 +1,22 @@
const AGENT_URL_KEY_DELIM_RE = /[^a-z0-9]+/g;
const AGENT_URL_KEY_TRIM_RE = /^-+|-+$/g;
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
export function isUuidLike(value) {
if (typeof value !== "string")
return false;
return UUID_RE.test(value.trim());
}
export function normalizeAgentUrlKey(value) {
if (typeof value !== "string")
return null;
const normalized = value
.trim()
.toLowerCase()
.replace(AGENT_URL_KEY_DELIM_RE, "-")
.replace(AGENT_URL_KEY_TRIM_RE, "");
return normalized.length > 0 ? normalized : null;
}
export function deriveAgentUrlKey(name, fallback) {
return normalizeAgentUrlKey(name) ?? normalizeAgentUrlKey(fallback) ?? "agent";
}
//# sourceMappingURL=agent-url-key.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"agent-url-key.js","sourceRoot":"","sources":["../src/agent-url-key.ts"],"names":[],"mappings":"AAAA,MAAM,sBAAsB,GAAG,aAAa,CAAC;AAC7C,MAAM,qBAAqB,GAAG,UAAU,CAAC;AACzC,MAAM,OAAO,GAAG,4EAA4E,CAAC;AAE7F,MAAM,UAAU,UAAU,CAAC,KAAgC;IACzD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,KAAgC;IACnE,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC3C,MAAM,UAAU,GAAG,KAAK;SACrB,IAAI,EAAE;SACN,WAAW,EAAE;SACb,OAAO,CAAC,sBAAsB,EAAE,GAAG,CAAC;SACpC,OAAO,CAAC,qBAAqB,EAAE,EAAE,CAAC,CAAC;IACtC,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAA+B,EAAE,QAAwB;IACzF,OAAO,oBAAoB,CAAC,IAAI,CAAC,IAAI,oBAAoB,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAC;AACjF,CAAC"}

20
node_modules/@paperclipai/shared/dist/api.d.ts generated vendored Normal file
View File

@@ -0,0 +1,20 @@
export declare const API_PREFIX = "/api";
export declare const API: {
readonly health: "/api/health";
readonly companies: "/api/companies";
readonly agents: "/api/agents";
readonly projects: "/api/projects";
readonly issues: "/api/issues";
readonly goals: "/api/goals";
readonly approvals: "/api/approvals";
readonly secrets: "/api/secrets";
readonly costs: "/api/costs";
readonly activity: "/api/activity";
readonly dashboard: "/api/dashboard";
readonly sidebarBadges: "/api/sidebar-badges";
readonly invites: "/api/invites";
readonly joinRequests: "/api/join-requests";
readonly members: "/api/members";
readonly admin: "/api/admin";
};
//# sourceMappingURL=api.d.ts.map

1
node_modules/@paperclipai/shared/dist/api.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,SAAS,CAAC;AAEjC,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;CAiBN,CAAC"}

20
node_modules/@paperclipai/shared/dist/api.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
export const API_PREFIX = "/api";
export const API = {
health: `${API_PREFIX}/health`,
companies: `${API_PREFIX}/companies`,
agents: `${API_PREFIX}/agents`,
projects: `${API_PREFIX}/projects`,
issues: `${API_PREFIX}/issues`,
goals: `${API_PREFIX}/goals`,
approvals: `${API_PREFIX}/approvals`,
secrets: `${API_PREFIX}/secrets`,
costs: `${API_PREFIX}/costs`,
activity: `${API_PREFIX}/activity`,
dashboard: `${API_PREFIX}/dashboard`,
sidebarBadges: `${API_PREFIX}/sidebar-badges`,
invites: `${API_PREFIX}/invites`,
joinRequests: `${API_PREFIX}/join-requests`,
members: `${API_PREFIX}/members`,
admin: `${API_PREFIX}/admin`,
};
//# sourceMappingURL=api.js.map

1
node_modules/@paperclipai/shared/dist/api.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC;AAEjC,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,MAAM,EAAE,GAAG,UAAU,SAAS;IAC9B,SAAS,EAAE,GAAG,UAAU,YAAY;IACpC,MAAM,EAAE,GAAG,UAAU,SAAS;IAC9B,QAAQ,EAAE,GAAG,UAAU,WAAW;IAClC,MAAM,EAAE,GAAG,UAAU,SAAS;IAC9B,KAAK,EAAE,GAAG,UAAU,QAAQ;IAC5B,SAAS,EAAE,GAAG,UAAU,YAAY;IACpC,OAAO,EAAE,GAAG,UAAU,UAAU;IAChC,KAAK,EAAE,GAAG,UAAU,QAAQ;IAC5B,QAAQ,EAAE,GAAG,UAAU,WAAW;IAClC,SAAS,EAAE,GAAG,UAAU,YAAY;IACpC,aAAa,EAAE,GAAG,UAAU,iBAAiB;IAC7C,OAAO,EAAE,GAAG,UAAU,UAAU;IAChC,YAAY,EAAE,GAAG,UAAU,gBAAgB;IAC3C,OAAO,EAAE,GAAG,UAAU,UAAU;IAChC,KAAK,EAAE,GAAG,UAAU,QAAQ;CACpB,CAAC"}

View File

@@ -0,0 +1,678 @@
import { z } from "zod";
export declare const configMetaSchema: z.ZodObject<{
version: z.ZodLiteral<1>;
updatedAt: z.ZodString;
source: z.ZodEnum<["onboard", "configure", "doctor"]>;
}, "strip", z.ZodTypeAny, {
version: 1;
updatedAt: string;
source: "onboard" | "configure" | "doctor";
}, {
version: 1;
updatedAt: string;
source: "onboard" | "configure" | "doctor";
}>;
export declare const llmConfigSchema: z.ZodObject<{
provider: z.ZodEnum<["claude", "openai"]>;
apiKey: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
provider: "claude" | "openai";
apiKey?: string | undefined;
}, {
provider: "claude" | "openai";
apiKey?: string | undefined;
}>;
export declare const databaseBackupConfigSchema: z.ZodObject<{
enabled: z.ZodDefault<z.ZodBoolean>;
intervalMinutes: z.ZodDefault<z.ZodNumber>;
retentionDays: z.ZodDefault<z.ZodNumber>;
dir: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
enabled: boolean;
intervalMinutes: number;
retentionDays: number;
dir: string;
}, {
enabled?: boolean | undefined;
intervalMinutes?: number | undefined;
retentionDays?: number | undefined;
dir?: string | undefined;
}>;
export declare const databaseConfigSchema: z.ZodObject<{
mode: z.ZodDefault<z.ZodEnum<["embedded-postgres", "postgres"]>>;
connectionString: z.ZodOptional<z.ZodString>;
embeddedPostgresDataDir: z.ZodDefault<z.ZodString>;
embeddedPostgresPort: z.ZodDefault<z.ZodNumber>;
backup: z.ZodDefault<z.ZodObject<{
enabled: z.ZodDefault<z.ZodBoolean>;
intervalMinutes: z.ZodDefault<z.ZodNumber>;
retentionDays: z.ZodDefault<z.ZodNumber>;
dir: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
enabled: boolean;
intervalMinutes: number;
retentionDays: number;
dir: string;
}, {
enabled?: boolean | undefined;
intervalMinutes?: number | undefined;
retentionDays?: number | undefined;
dir?: string | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
mode: "embedded-postgres" | "postgres";
embeddedPostgresDataDir: string;
embeddedPostgresPort: number;
backup: {
enabled: boolean;
intervalMinutes: number;
retentionDays: number;
dir: string;
};
connectionString?: string | undefined;
}, {
mode?: "embedded-postgres" | "postgres" | undefined;
connectionString?: string | undefined;
embeddedPostgresDataDir?: string | undefined;
embeddedPostgresPort?: number | undefined;
backup?: {
enabled?: boolean | undefined;
intervalMinutes?: number | undefined;
retentionDays?: number | undefined;
dir?: string | undefined;
} | undefined;
}>;
export declare const loggingConfigSchema: z.ZodObject<{
mode: z.ZodEnum<["file", "cloud"]>;
logDir: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
mode: "file" | "cloud";
logDir: string;
}, {
mode: "file" | "cloud";
logDir?: string | undefined;
}>;
export declare const serverConfigSchema: z.ZodObject<{
deploymentMode: z.ZodDefault<z.ZodEnum<["local_trusted", "authenticated"]>>;
exposure: z.ZodDefault<z.ZodEnum<["private", "public"]>>;
host: z.ZodDefault<z.ZodString>;
port: z.ZodDefault<z.ZodNumber>;
allowedHostnames: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
serveUi: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
deploymentMode: "local_trusted" | "authenticated";
exposure: "private" | "public";
host: string;
port: number;
allowedHostnames: string[];
serveUi: boolean;
}, {
deploymentMode?: "local_trusted" | "authenticated" | undefined;
exposure?: "private" | "public" | undefined;
host?: string | undefined;
port?: number | undefined;
allowedHostnames?: string[] | undefined;
serveUi?: boolean | undefined;
}>;
export declare const authConfigSchema: z.ZodObject<{
baseUrlMode: z.ZodDefault<z.ZodEnum<["auto", "explicit"]>>;
publicBaseUrl: z.ZodOptional<z.ZodString>;
disableSignUp: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
baseUrlMode: "auto" | "explicit";
disableSignUp: boolean;
publicBaseUrl?: string | undefined;
}, {
baseUrlMode?: "auto" | "explicit" | undefined;
publicBaseUrl?: string | undefined;
disableSignUp?: boolean | undefined;
}>;
export declare const storageLocalDiskConfigSchema: z.ZodObject<{
baseDir: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
baseDir: string;
}, {
baseDir?: string | undefined;
}>;
export declare const storageS3ConfigSchema: z.ZodObject<{
bucket: z.ZodDefault<z.ZodString>;
region: z.ZodDefault<z.ZodString>;
endpoint: z.ZodOptional<z.ZodString>;
prefix: z.ZodDefault<z.ZodString>;
forcePathStyle: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
bucket: string;
region: string;
prefix: string;
forcePathStyle: boolean;
endpoint?: string | undefined;
}, {
bucket?: string | undefined;
region?: string | undefined;
endpoint?: string | undefined;
prefix?: string | undefined;
forcePathStyle?: boolean | undefined;
}>;
export declare const storageConfigSchema: z.ZodObject<{
provider: z.ZodDefault<z.ZodEnum<["local_disk", "s3"]>>;
localDisk: z.ZodDefault<z.ZodObject<{
baseDir: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
baseDir: string;
}, {
baseDir?: string | undefined;
}>>;
s3: z.ZodDefault<z.ZodObject<{
bucket: z.ZodDefault<z.ZodString>;
region: z.ZodDefault<z.ZodString>;
endpoint: z.ZodOptional<z.ZodString>;
prefix: z.ZodDefault<z.ZodString>;
forcePathStyle: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
bucket: string;
region: string;
prefix: string;
forcePathStyle: boolean;
endpoint?: string | undefined;
}, {
bucket?: string | undefined;
region?: string | undefined;
endpoint?: string | undefined;
prefix?: string | undefined;
forcePathStyle?: boolean | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
s3: {
bucket: string;
region: string;
prefix: string;
forcePathStyle: boolean;
endpoint?: string | undefined;
};
provider: "local_disk" | "s3";
localDisk: {
baseDir: string;
};
}, {
s3?: {
bucket?: string | undefined;
region?: string | undefined;
endpoint?: string | undefined;
prefix?: string | undefined;
forcePathStyle?: boolean | undefined;
} | undefined;
provider?: "local_disk" | "s3" | undefined;
localDisk?: {
baseDir?: string | undefined;
} | undefined;
}>;
export declare const secretsLocalEncryptedConfigSchema: z.ZodObject<{
keyFilePath: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
keyFilePath: string;
}, {
keyFilePath?: string | undefined;
}>;
export declare const secretsConfigSchema: z.ZodObject<{
provider: z.ZodDefault<z.ZodEnum<["local_encrypted", "aws_secrets_manager", "gcp_secret_manager", "vault"]>>;
strictMode: z.ZodDefault<z.ZodBoolean>;
localEncrypted: z.ZodDefault<z.ZodObject<{
keyFilePath: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
keyFilePath: string;
}, {
keyFilePath?: string | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
provider: "local_encrypted" | "aws_secrets_manager" | "gcp_secret_manager" | "vault";
strictMode: boolean;
localEncrypted: {
keyFilePath: string;
};
}, {
provider?: "local_encrypted" | "aws_secrets_manager" | "gcp_secret_manager" | "vault" | undefined;
strictMode?: boolean | undefined;
localEncrypted?: {
keyFilePath?: string | undefined;
} | undefined;
}>;
export declare const paperclipConfigSchema: z.ZodEffects<z.ZodObject<{
$meta: z.ZodObject<{
version: z.ZodLiteral<1>;
updatedAt: z.ZodString;
source: z.ZodEnum<["onboard", "configure", "doctor"]>;
}, "strip", z.ZodTypeAny, {
version: 1;
updatedAt: string;
source: "onboard" | "configure" | "doctor";
}, {
version: 1;
updatedAt: string;
source: "onboard" | "configure" | "doctor";
}>;
llm: z.ZodOptional<z.ZodObject<{
provider: z.ZodEnum<["claude", "openai"]>;
apiKey: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
provider: "claude" | "openai";
apiKey?: string | undefined;
}, {
provider: "claude" | "openai";
apiKey?: string | undefined;
}>>;
database: z.ZodObject<{
mode: z.ZodDefault<z.ZodEnum<["embedded-postgres", "postgres"]>>;
connectionString: z.ZodOptional<z.ZodString>;
embeddedPostgresDataDir: z.ZodDefault<z.ZodString>;
embeddedPostgresPort: z.ZodDefault<z.ZodNumber>;
backup: z.ZodDefault<z.ZodObject<{
enabled: z.ZodDefault<z.ZodBoolean>;
intervalMinutes: z.ZodDefault<z.ZodNumber>;
retentionDays: z.ZodDefault<z.ZodNumber>;
dir: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
enabled: boolean;
intervalMinutes: number;
retentionDays: number;
dir: string;
}, {
enabled?: boolean | undefined;
intervalMinutes?: number | undefined;
retentionDays?: number | undefined;
dir?: string | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
mode: "embedded-postgres" | "postgres";
embeddedPostgresDataDir: string;
embeddedPostgresPort: number;
backup: {
enabled: boolean;
intervalMinutes: number;
retentionDays: number;
dir: string;
};
connectionString?: string | undefined;
}, {
mode?: "embedded-postgres" | "postgres" | undefined;
connectionString?: string | undefined;
embeddedPostgresDataDir?: string | undefined;
embeddedPostgresPort?: number | undefined;
backup?: {
enabled?: boolean | undefined;
intervalMinutes?: number | undefined;
retentionDays?: number | undefined;
dir?: string | undefined;
} | undefined;
}>;
logging: z.ZodObject<{
mode: z.ZodEnum<["file", "cloud"]>;
logDir: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
mode: "file" | "cloud";
logDir: string;
}, {
mode: "file" | "cloud";
logDir?: string | undefined;
}>;
server: z.ZodObject<{
deploymentMode: z.ZodDefault<z.ZodEnum<["local_trusted", "authenticated"]>>;
exposure: z.ZodDefault<z.ZodEnum<["private", "public"]>>;
host: z.ZodDefault<z.ZodString>;
port: z.ZodDefault<z.ZodNumber>;
allowedHostnames: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
serveUi: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
deploymentMode: "local_trusted" | "authenticated";
exposure: "private" | "public";
host: string;
port: number;
allowedHostnames: string[];
serveUi: boolean;
}, {
deploymentMode?: "local_trusted" | "authenticated" | undefined;
exposure?: "private" | "public" | undefined;
host?: string | undefined;
port?: number | undefined;
allowedHostnames?: string[] | undefined;
serveUi?: boolean | undefined;
}>;
auth: z.ZodDefault<z.ZodObject<{
baseUrlMode: z.ZodDefault<z.ZodEnum<["auto", "explicit"]>>;
publicBaseUrl: z.ZodOptional<z.ZodString>;
disableSignUp: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
baseUrlMode: "auto" | "explicit";
disableSignUp: boolean;
publicBaseUrl?: string | undefined;
}, {
baseUrlMode?: "auto" | "explicit" | undefined;
publicBaseUrl?: string | undefined;
disableSignUp?: boolean | undefined;
}>>;
storage: z.ZodDefault<z.ZodObject<{
provider: z.ZodDefault<z.ZodEnum<["local_disk", "s3"]>>;
localDisk: z.ZodDefault<z.ZodObject<{
baseDir: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
baseDir: string;
}, {
baseDir?: string | undefined;
}>>;
s3: z.ZodDefault<z.ZodObject<{
bucket: z.ZodDefault<z.ZodString>;
region: z.ZodDefault<z.ZodString>;
endpoint: z.ZodOptional<z.ZodString>;
prefix: z.ZodDefault<z.ZodString>;
forcePathStyle: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
bucket: string;
region: string;
prefix: string;
forcePathStyle: boolean;
endpoint?: string | undefined;
}, {
bucket?: string | undefined;
region?: string | undefined;
endpoint?: string | undefined;
prefix?: string | undefined;
forcePathStyle?: boolean | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
s3: {
bucket: string;
region: string;
prefix: string;
forcePathStyle: boolean;
endpoint?: string | undefined;
};
provider: "local_disk" | "s3";
localDisk: {
baseDir: string;
};
}, {
s3?: {
bucket?: string | undefined;
region?: string | undefined;
endpoint?: string | undefined;
prefix?: string | undefined;
forcePathStyle?: boolean | undefined;
} | undefined;
provider?: "local_disk" | "s3" | undefined;
localDisk?: {
baseDir?: string | undefined;
} | undefined;
}>>;
secrets: z.ZodDefault<z.ZodObject<{
provider: z.ZodDefault<z.ZodEnum<["local_encrypted", "aws_secrets_manager", "gcp_secret_manager", "vault"]>>;
strictMode: z.ZodDefault<z.ZodBoolean>;
localEncrypted: z.ZodDefault<z.ZodObject<{
keyFilePath: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
keyFilePath: string;
}, {
keyFilePath?: string | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
provider: "local_encrypted" | "aws_secrets_manager" | "gcp_secret_manager" | "vault";
strictMode: boolean;
localEncrypted: {
keyFilePath: string;
};
}, {
provider?: "local_encrypted" | "aws_secrets_manager" | "gcp_secret_manager" | "vault" | undefined;
strictMode?: boolean | undefined;
localEncrypted?: {
keyFilePath?: string | undefined;
} | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
database: {
mode: "embedded-postgres" | "postgres";
embeddedPostgresDataDir: string;
embeddedPostgresPort: number;
backup: {
enabled: boolean;
intervalMinutes: number;
retentionDays: number;
dir: string;
};
connectionString?: string | undefined;
};
$meta: {
version: 1;
updatedAt: string;
source: "onboard" | "configure" | "doctor";
};
logging: {
mode: "file" | "cloud";
logDir: string;
};
server: {
deploymentMode: "local_trusted" | "authenticated";
exposure: "private" | "public";
host: string;
port: number;
allowedHostnames: string[];
serveUi: boolean;
};
auth: {
baseUrlMode: "auto" | "explicit";
disableSignUp: boolean;
publicBaseUrl?: string | undefined;
};
storage: {
s3: {
bucket: string;
region: string;
prefix: string;
forcePathStyle: boolean;
endpoint?: string | undefined;
};
provider: "local_disk" | "s3";
localDisk: {
baseDir: string;
};
};
secrets: {
provider: "local_encrypted" | "aws_secrets_manager" | "gcp_secret_manager" | "vault";
strictMode: boolean;
localEncrypted: {
keyFilePath: string;
};
};
llm?: {
provider: "claude" | "openai";
apiKey?: string | undefined;
} | undefined;
}, {
database: {
mode?: "embedded-postgres" | "postgres" | undefined;
connectionString?: string | undefined;
embeddedPostgresDataDir?: string | undefined;
embeddedPostgresPort?: number | undefined;
backup?: {
enabled?: boolean | undefined;
intervalMinutes?: number | undefined;
retentionDays?: number | undefined;
dir?: string | undefined;
} | undefined;
};
$meta: {
version: 1;
updatedAt: string;
source: "onboard" | "configure" | "doctor";
};
logging: {
mode: "file" | "cloud";
logDir?: string | undefined;
};
server: {
deploymentMode?: "local_trusted" | "authenticated" | undefined;
exposure?: "private" | "public" | undefined;
host?: string | undefined;
port?: number | undefined;
allowedHostnames?: string[] | undefined;
serveUi?: boolean | undefined;
};
llm?: {
provider: "claude" | "openai";
apiKey?: string | undefined;
} | undefined;
auth?: {
baseUrlMode?: "auto" | "explicit" | undefined;
publicBaseUrl?: string | undefined;
disableSignUp?: boolean | undefined;
} | undefined;
storage?: {
s3?: {
bucket?: string | undefined;
region?: string | undefined;
endpoint?: string | undefined;
prefix?: string | undefined;
forcePathStyle?: boolean | undefined;
} | undefined;
provider?: "local_disk" | "s3" | undefined;
localDisk?: {
baseDir?: string | undefined;
} | undefined;
} | undefined;
secrets?: {
provider?: "local_encrypted" | "aws_secrets_manager" | "gcp_secret_manager" | "vault" | undefined;
strictMode?: boolean | undefined;
localEncrypted?: {
keyFilePath?: string | undefined;
} | undefined;
} | undefined;
}>, {
database: {
mode: "embedded-postgres" | "postgres";
embeddedPostgresDataDir: string;
embeddedPostgresPort: number;
backup: {
enabled: boolean;
intervalMinutes: number;
retentionDays: number;
dir: string;
};
connectionString?: string | undefined;
};
$meta: {
version: 1;
updatedAt: string;
source: "onboard" | "configure" | "doctor";
};
logging: {
mode: "file" | "cloud";
logDir: string;
};
server: {
deploymentMode: "local_trusted" | "authenticated";
exposure: "private" | "public";
host: string;
port: number;
allowedHostnames: string[];
serveUi: boolean;
};
auth: {
baseUrlMode: "auto" | "explicit";
disableSignUp: boolean;
publicBaseUrl?: string | undefined;
};
storage: {
s3: {
bucket: string;
region: string;
prefix: string;
forcePathStyle: boolean;
endpoint?: string | undefined;
};
provider: "local_disk" | "s3";
localDisk: {
baseDir: string;
};
};
secrets: {
provider: "local_encrypted" | "aws_secrets_manager" | "gcp_secret_manager" | "vault";
strictMode: boolean;
localEncrypted: {
keyFilePath: string;
};
};
llm?: {
provider: "claude" | "openai";
apiKey?: string | undefined;
} | undefined;
}, {
database: {
mode?: "embedded-postgres" | "postgres" | undefined;
connectionString?: string | undefined;
embeddedPostgresDataDir?: string | undefined;
embeddedPostgresPort?: number | undefined;
backup?: {
enabled?: boolean | undefined;
intervalMinutes?: number | undefined;
retentionDays?: number | undefined;
dir?: string | undefined;
} | undefined;
};
$meta: {
version: 1;
updatedAt: string;
source: "onboard" | "configure" | "doctor";
};
logging: {
mode: "file" | "cloud";
logDir?: string | undefined;
};
server: {
deploymentMode?: "local_trusted" | "authenticated" | undefined;
exposure?: "private" | "public" | undefined;
host?: string | undefined;
port?: number | undefined;
allowedHostnames?: string[] | undefined;
serveUi?: boolean | undefined;
};
llm?: {
provider: "claude" | "openai";
apiKey?: string | undefined;
} | undefined;
auth?: {
baseUrlMode?: "auto" | "explicit" | undefined;
publicBaseUrl?: string | undefined;
disableSignUp?: boolean | undefined;
} | undefined;
storage?: {
s3?: {
bucket?: string | undefined;
region?: string | undefined;
endpoint?: string | undefined;
prefix?: string | undefined;
forcePathStyle?: boolean | undefined;
} | undefined;
provider?: "local_disk" | "s3" | undefined;
localDisk?: {
baseDir?: string | undefined;
} | undefined;
} | undefined;
secrets?: {
provider?: "local_encrypted" | "aws_secrets_manager" | "gcp_secret_manager" | "vault" | undefined;
strictMode?: boolean | undefined;
localEncrypted?: {
keyFilePath?: string | undefined;
} | undefined;
} | undefined;
}>;
export type PaperclipConfig = z.infer<typeof paperclipConfigSchema>;
export type LlmConfig = z.infer<typeof llmConfigSchema>;
export type DatabaseConfig = z.infer<typeof databaseConfigSchema>;
export type LoggingConfig = z.infer<typeof loggingConfigSchema>;
export type ServerConfig = z.infer<typeof serverConfigSchema>;
export type StorageConfig = z.infer<typeof storageConfigSchema>;
export type StorageLocalDiskConfig = z.infer<typeof storageLocalDiskConfigSchema>;
export type StorageS3Config = z.infer<typeof storageS3ConfigSchema>;
export type SecretsConfig = z.infer<typeof secretsConfigSchema>;
export type SecretsLocalEncryptedConfig = z.infer<typeof secretsLocalEncryptedConfigSchema>;
export type AuthConfig = z.infer<typeof authConfigSchema>;
export type ConfigMeta = z.infer<typeof configMetaSchema>;
export type DatabaseBackupConfig = z.infer<typeof databaseBackupConfigSchema>;
//# sourceMappingURL=config-schema.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"config-schema.d.ts","sourceRoot":"","sources":["../src/config-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAI3B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;EAG1B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;EAKrC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW/B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;EAG9B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;EAO7B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAI3B,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;EAEvC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;EAMhC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW9B,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;EAE5C,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;EAM9B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}

143
node_modules/@paperclipai/shared/dist/config-schema.js generated vendored Normal file
View File

@@ -0,0 +1,143 @@
import { z } from "zod";
import { AUTH_BASE_URL_MODES, DEPLOYMENT_EXPOSURES, DEPLOYMENT_MODES, SECRET_PROVIDERS, STORAGE_PROVIDERS, } from "./constants.js";
export const configMetaSchema = z.object({
version: z.literal(1),
updatedAt: z.string(),
source: z.enum(["onboard", "configure", "doctor"]),
});
export const llmConfigSchema = z.object({
provider: z.enum(["claude", "openai"]),
apiKey: z.string().optional(),
});
export const databaseBackupConfigSchema = z.object({
enabled: z.boolean().default(true),
intervalMinutes: z.number().int().min(1).max(7 * 24 * 60).default(60),
retentionDays: z.number().int().min(1).max(3650).default(30),
dir: z.string().default("~/.paperclip/instances/default/data/backups"),
});
export const databaseConfigSchema = z.object({
mode: z.enum(["embedded-postgres", "postgres"]).default("embedded-postgres"),
connectionString: z.string().optional(),
embeddedPostgresDataDir: z.string().default("~/.paperclip/instances/default/db"),
embeddedPostgresPort: z.number().int().min(1).max(65535).default(54329),
backup: databaseBackupConfigSchema.default({
enabled: true,
intervalMinutes: 60,
retentionDays: 30,
dir: "~/.paperclip/instances/default/data/backups",
}),
});
export const loggingConfigSchema = z.object({
mode: z.enum(["file", "cloud"]),
logDir: z.string().default("~/.paperclip/instances/default/logs"),
});
export const serverConfigSchema = z.object({
deploymentMode: z.enum(DEPLOYMENT_MODES).default("local_trusted"),
exposure: z.enum(DEPLOYMENT_EXPOSURES).default("private"),
host: z.string().default("127.0.0.1"),
port: z.number().int().min(1).max(65535).default(3100),
allowedHostnames: z.array(z.string().min(1)).default([]),
serveUi: z.boolean().default(true),
});
export const authConfigSchema = z.object({
baseUrlMode: z.enum(AUTH_BASE_URL_MODES).default("auto"),
publicBaseUrl: z.string().url().optional(),
disableSignUp: z.boolean().default(false),
});
export const storageLocalDiskConfigSchema = z.object({
baseDir: z.string().default("~/.paperclip/instances/default/data/storage"),
});
export const storageS3ConfigSchema = z.object({
bucket: z.string().min(1).default("paperclip"),
region: z.string().min(1).default("us-east-1"),
endpoint: z.string().optional(),
prefix: z.string().default(""),
forcePathStyle: z.boolean().default(false),
});
export const storageConfigSchema = z.object({
provider: z.enum(STORAGE_PROVIDERS).default("local_disk"),
localDisk: storageLocalDiskConfigSchema.default({
baseDir: "~/.paperclip/instances/default/data/storage",
}),
s3: storageS3ConfigSchema.default({
bucket: "paperclip",
region: "us-east-1",
prefix: "",
forcePathStyle: false,
}),
});
export const secretsLocalEncryptedConfigSchema = z.object({
keyFilePath: z.string().default("~/.paperclip/instances/default/secrets/master.key"),
});
export const secretsConfigSchema = z.object({
provider: z.enum(SECRET_PROVIDERS).default("local_encrypted"),
strictMode: z.boolean().default(false),
localEncrypted: secretsLocalEncryptedConfigSchema.default({
keyFilePath: "~/.paperclip/instances/default/secrets/master.key",
}),
});
export const paperclipConfigSchema = z
.object({
$meta: configMetaSchema,
llm: llmConfigSchema.optional(),
database: databaseConfigSchema,
logging: loggingConfigSchema,
server: serverConfigSchema,
auth: authConfigSchema.default({
baseUrlMode: "auto",
disableSignUp: false,
}),
storage: storageConfigSchema.default({
provider: "local_disk",
localDisk: {
baseDir: "~/.paperclip/instances/default/data/storage",
},
s3: {
bucket: "paperclip",
region: "us-east-1",
prefix: "",
forcePathStyle: false,
},
}),
secrets: secretsConfigSchema.default({
provider: "local_encrypted",
strictMode: false,
localEncrypted: {
keyFilePath: "~/.paperclip/instances/default/secrets/master.key",
},
}),
})
.superRefine((value, ctx) => {
if (value.server.deploymentMode === "local_trusted") {
if (value.server.exposure !== "private") {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: "server.exposure must be private when deploymentMode is local_trusted",
path: ["server", "exposure"],
});
}
return;
}
if (value.auth.baseUrlMode === "explicit" && !value.auth.publicBaseUrl) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: "auth.publicBaseUrl is required when auth.baseUrlMode is explicit",
path: ["auth", "publicBaseUrl"],
});
}
if (value.server.exposure === "public" && value.auth.baseUrlMode !== "explicit") {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: "auth.baseUrlMode must be explicit when deploymentMode=authenticated and exposure=public",
path: ["auth", "baseUrlMode"],
});
}
if (value.server.exposure === "public" && !value.auth.publicBaseUrl) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: "auth.publicBaseUrl is required when deploymentMode=authenticated and exposure=public",
path: ["auth", "publicBaseUrl"],
});
}
});
//# sourceMappingURL=config-schema.js.map

File diff suppressed because one or more lines are too long

224
node_modules/@paperclipai/shared/dist/constants.d.ts generated vendored Normal file
View File

@@ -0,0 +1,224 @@
export declare const COMPANY_STATUSES: readonly ["active", "paused", "archived"];
export type CompanyStatus = (typeof COMPANY_STATUSES)[number];
export declare const DEPLOYMENT_MODES: readonly ["local_trusted", "authenticated"];
export type DeploymentMode = (typeof DEPLOYMENT_MODES)[number];
export declare const DEPLOYMENT_EXPOSURES: readonly ["private", "public"];
export type DeploymentExposure = (typeof DEPLOYMENT_EXPOSURES)[number];
export declare const AUTH_BASE_URL_MODES: readonly ["auto", "explicit"];
export type AuthBaseUrlMode = (typeof AUTH_BASE_URL_MODES)[number];
export declare const AGENT_STATUSES: readonly ["active", "paused", "idle", "running", "error", "pending_approval", "terminated"];
export type AgentStatus = (typeof AGENT_STATUSES)[number];
export declare const AGENT_ADAPTER_TYPES: readonly ["process", "http", "claude_local", "codex_local", "opencode_local", "pi_local", "cursor", "openclaw_gateway", "hermes_local"];
export type AgentAdapterType = (typeof AGENT_ADAPTER_TYPES)[number];
export declare const AGENT_ROLES: readonly ["ceo", "cto", "cmo", "cfo", "engineer", "designer", "pm", "qa", "devops", "researcher", "general"];
export type AgentRole = (typeof AGENT_ROLES)[number];
export declare const AGENT_ROLE_LABELS: Record<AgentRole, string>;
export declare const AGENT_ICON_NAMES: readonly ["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"];
export type AgentIconName = (typeof AGENT_ICON_NAMES)[number];
export declare const ISSUE_STATUSES: readonly ["backlog", "todo", "in_progress", "in_review", "done", "blocked", "cancelled"];
export type IssueStatus = (typeof ISSUE_STATUSES)[number];
export declare const ISSUE_PRIORITIES: readonly ["critical", "high", "medium", "low"];
export type IssuePriority = (typeof ISSUE_PRIORITIES)[number];
export declare const ISSUE_ORIGIN_KINDS: readonly ["manual", "routine_execution"];
export type IssueOriginKind = (typeof ISSUE_ORIGIN_KINDS)[number];
export declare const GOAL_LEVELS: readonly ["company", "team", "agent", "task"];
export type GoalLevel = (typeof GOAL_LEVELS)[number];
export declare const GOAL_STATUSES: readonly ["planned", "active", "achieved", "cancelled"];
export type GoalStatus = (typeof GOAL_STATUSES)[number];
export declare const PROJECT_STATUSES: readonly ["backlog", "planned", "in_progress", "completed", "cancelled"];
export type ProjectStatus = (typeof PROJECT_STATUSES)[number];
export declare const ROUTINE_STATUSES: readonly ["active", "paused", "archived"];
export type RoutineStatus = (typeof ROUTINE_STATUSES)[number];
export declare const ROUTINE_CONCURRENCY_POLICIES: readonly ["coalesce_if_active", "always_enqueue", "skip_if_active"];
export type RoutineConcurrencyPolicy = (typeof ROUTINE_CONCURRENCY_POLICIES)[number];
export declare const ROUTINE_CATCH_UP_POLICIES: readonly ["skip_missed", "enqueue_missed_with_cap"];
export type RoutineCatchUpPolicy = (typeof ROUTINE_CATCH_UP_POLICIES)[number];
export declare const ROUTINE_TRIGGER_KINDS: readonly ["schedule", "webhook", "api"];
export type RoutineTriggerKind = (typeof ROUTINE_TRIGGER_KINDS)[number];
export declare const ROUTINE_TRIGGER_SIGNING_MODES: readonly ["bearer", "hmac_sha256"];
export type RoutineTriggerSigningMode = (typeof ROUTINE_TRIGGER_SIGNING_MODES)[number];
export declare const ROUTINE_RUN_STATUSES: readonly ["received", "coalesced", "skipped", "issue_created", "completed", "failed"];
export type RoutineRunStatus = (typeof ROUTINE_RUN_STATUSES)[number];
export declare const ROUTINE_RUN_SOURCES: readonly ["schedule", "manual", "api", "webhook"];
export type RoutineRunSource = (typeof ROUTINE_RUN_SOURCES)[number];
export declare const PAUSE_REASONS: readonly ["manual", "budget", "system"];
export type PauseReason = (typeof PAUSE_REASONS)[number];
export declare const PROJECT_COLORS: readonly ["#6366f1", "#8b5cf6", "#ec4899", "#ef4444", "#f97316", "#eab308", "#22c55e", "#14b8a6", "#06b6d4", "#3b82f6"];
export declare const APPROVAL_TYPES: readonly ["hire_agent", "approve_ceo_strategy", "budget_override_required"];
export type ApprovalType = (typeof APPROVAL_TYPES)[number];
export declare const APPROVAL_STATUSES: readonly ["pending", "revision_requested", "approved", "rejected", "cancelled"];
export type ApprovalStatus = (typeof APPROVAL_STATUSES)[number];
export declare const SECRET_PROVIDERS: readonly ["local_encrypted", "aws_secrets_manager", "gcp_secret_manager", "vault"];
export type SecretProvider = (typeof SECRET_PROVIDERS)[number];
export declare const STORAGE_PROVIDERS: readonly ["local_disk", "s3"];
export type StorageProvider = (typeof STORAGE_PROVIDERS)[number];
export declare const BILLING_TYPES: readonly ["metered_api", "subscription_included", "subscription_overage", "credits", "fixed", "unknown"];
export type BillingType = (typeof BILLING_TYPES)[number];
export declare const FINANCE_EVENT_KINDS: readonly ["inference_charge", "platform_fee", "credit_purchase", "credit_refund", "credit_expiry", "byok_fee", "gateway_overhead", "log_storage_charge", "logpush_charge", "provisioned_capacity_charge", "training_charge", "custom_model_import_charge", "custom_model_storage_charge", "manual_adjustment"];
export type FinanceEventKind = (typeof FINANCE_EVENT_KINDS)[number];
export declare const FINANCE_DIRECTIONS: readonly ["debit", "credit"];
export type FinanceDirection = (typeof FINANCE_DIRECTIONS)[number];
export declare const FINANCE_UNITS: readonly ["input_token", "output_token", "cached_input_token", "request", "credit_usd", "credit_unit", "model_unit_minute", "model_unit_hour", "gb_month", "train_token", "unknown"];
export type FinanceUnit = (typeof FINANCE_UNITS)[number];
export declare const BUDGET_SCOPE_TYPES: readonly ["company", "agent", "project"];
export type BudgetScopeType = (typeof BUDGET_SCOPE_TYPES)[number];
export declare const BUDGET_METRICS: readonly ["billed_cents"];
export type BudgetMetric = (typeof BUDGET_METRICS)[number];
export declare const BUDGET_WINDOW_KINDS: readonly ["calendar_month_utc", "lifetime"];
export type BudgetWindowKind = (typeof BUDGET_WINDOW_KINDS)[number];
export declare const BUDGET_THRESHOLD_TYPES: readonly ["soft", "hard"];
export type BudgetThresholdType = (typeof BUDGET_THRESHOLD_TYPES)[number];
export declare const BUDGET_INCIDENT_STATUSES: readonly ["open", "resolved", "dismissed"];
export type BudgetIncidentStatus = (typeof BUDGET_INCIDENT_STATUSES)[number];
export declare const BUDGET_INCIDENT_RESOLUTION_ACTIONS: readonly ["keep_paused", "raise_budget_and_resume"];
export type BudgetIncidentResolutionAction = (typeof BUDGET_INCIDENT_RESOLUTION_ACTIONS)[number];
export declare const HEARTBEAT_INVOCATION_SOURCES: readonly ["timer", "assignment", "on_demand", "automation"];
export type HeartbeatInvocationSource = (typeof HEARTBEAT_INVOCATION_SOURCES)[number];
export declare const WAKEUP_TRIGGER_DETAILS: readonly ["manual", "ping", "callback", "system"];
export type WakeupTriggerDetail = (typeof WAKEUP_TRIGGER_DETAILS)[number];
export declare const WAKEUP_REQUEST_STATUSES: readonly ["queued", "deferred_issue_execution", "claimed", "coalesced", "skipped", "completed", "failed", "cancelled"];
export type WakeupRequestStatus = (typeof WAKEUP_REQUEST_STATUSES)[number];
export declare const HEARTBEAT_RUN_STATUSES: readonly ["queued", "running", "succeeded", "failed", "cancelled", "timed_out"];
export type HeartbeatRunStatus = (typeof HEARTBEAT_RUN_STATUSES)[number];
export declare const LIVE_EVENT_TYPES: readonly ["heartbeat.run.queued", "heartbeat.run.status", "heartbeat.run.event", "heartbeat.run.log", "agent.status", "activity.logged", "plugin.ui.updated", "plugin.worker.crashed", "plugin.worker.restarted"];
export type LiveEventType = (typeof LIVE_EVENT_TYPES)[number];
export declare const PRINCIPAL_TYPES: readonly ["user", "agent"];
export type PrincipalType = (typeof PRINCIPAL_TYPES)[number];
export declare const MEMBERSHIP_STATUSES: readonly ["pending", "active", "suspended"];
export type MembershipStatus = (typeof MEMBERSHIP_STATUSES)[number];
export declare const INSTANCE_USER_ROLES: readonly ["instance_admin"];
export type InstanceUserRole = (typeof INSTANCE_USER_ROLES)[number];
export declare const INVITE_TYPES: readonly ["company_join", "bootstrap_ceo"];
export type InviteType = (typeof INVITE_TYPES)[number];
export declare const INVITE_JOIN_TYPES: readonly ["human", "agent", "both"];
export type InviteJoinType = (typeof INVITE_JOIN_TYPES)[number];
export declare const JOIN_REQUEST_TYPES: readonly ["human", "agent"];
export type JoinRequestType = (typeof JOIN_REQUEST_TYPES)[number];
export declare const JOIN_REQUEST_STATUSES: readonly ["pending_approval", "approved", "rejected"];
export type JoinRequestStatus = (typeof JOIN_REQUEST_STATUSES)[number];
export declare const PERMISSION_KEYS: readonly ["agents:create", "users:invite", "users:manage_permissions", "tasks:assign", "tasks:assign_scope", "joins:approve"];
export type PermissionKey = (typeof PERMISSION_KEYS)[number];
/**
* The current version of the Plugin API contract.
*
* Increment this value whenever a breaking change is made to the plugin API
* so that the host can reject incompatible plugin manifests.
*
* @see PLUGIN_SPEC.md §4 — Versioning
*/
export declare const PLUGIN_API_VERSION: 1;
/**
* Lifecycle statuses for an installed plugin.
*
* State machine: installed → ready | error, ready → disabled | error | upgrade_pending | uninstalled,
* disabled → ready | uninstalled, error → ready | uninstalled,
* upgrade_pending → ready | error | uninstalled, uninstalled → installed (reinstall).
*
* @see {@link PluginStatus} — inferred union type
* @see PLUGIN_SPEC.md §21.3 `plugins.status`
*/
export declare const PLUGIN_STATUSES: readonly ["installed", "ready", "disabled", "error", "upgrade_pending", "uninstalled"];
export type PluginStatus = (typeof PLUGIN_STATUSES)[number];
/**
* Plugin classification categories. A plugin declares one or more categories
* in its manifest to describe its primary purpose.
*
* @see PLUGIN_SPEC.md §6.2
*/
export declare const PLUGIN_CATEGORIES: readonly ["connector", "workspace", "automation", "ui"];
export type PluginCategory = (typeof PLUGIN_CATEGORIES)[number];
/**
* Named permissions the host grants to a plugin. Plugins declare required
* capabilities in their manifest; the host enforces them at runtime via the
* plugin capability validator.
*
* Grouped into: Data Read, Data Write, Plugin State, Runtime/Integration,
* Agent Tools, and UI.
*
* @see PLUGIN_SPEC.md §15 — Capability Model
*/
export declare const PLUGIN_CAPABILITIES: readonly ["companies.read", "projects.read", "project.workspaces.read", "issues.read", "issue.comments.read", "issue.documents.read", "agents.read", "goals.read", "goals.create", "goals.update", "activity.read", "costs.read", "issues.create", "issues.update", "issue.comments.create", "issue.documents.write", "agents.pause", "agents.resume", "agents.invoke", "agent.sessions.create", "agent.sessions.list", "agent.sessions.send", "agent.sessions.close", "activity.log.write", "metrics.write", "plugin.state.read", "plugin.state.write", "events.subscribe", "events.emit", "jobs.schedule", "webhooks.receive", "http.outbound", "secrets.read-ref", "agent.tools.register", "instance.settings.register", "ui.sidebar.register", "ui.page.register", "ui.detailTab.register", "ui.dashboardWidget.register", "ui.commentAnnotation.register", "ui.action.register"];
export type PluginCapability = (typeof PLUGIN_CAPABILITIES)[number];
/**
* UI extension slot types. Each slot type corresponds to a mount point in the
* Paperclip UI where plugin components can be rendered.
*
* @see PLUGIN_SPEC.md §19 — UI Extension Model
*/
export declare const PLUGIN_UI_SLOT_TYPES: readonly ["page", "detailTab", "taskDetailView", "dashboardWidget", "sidebar", "sidebarPanel", "projectSidebarItem", "globalToolbarButton", "toolbarButton", "contextMenuItem", "commentAnnotation", "commentContextMenuItem", "settingsPage"];
export type PluginUiSlotType = (typeof PLUGIN_UI_SLOT_TYPES)[number];
/**
* Reserved company-scoped route segments that plugin page routes may not claim.
*
* These map to first-class host pages under `/:companyPrefix/...`.
*/
export declare const PLUGIN_RESERVED_COMPANY_ROUTE_SEGMENTS: readonly ["dashboard", "onboarding", "companies", "company", "settings", "plugins", "org", "agents", "projects", "issues", "goals", "approvals", "costs", "activity", "inbox", "design-guide", "tests"];
export type PluginReservedCompanyRouteSegment = (typeof PLUGIN_RESERVED_COMPANY_ROUTE_SEGMENTS)[number];
/**
* Launcher placement zones describe where a plugin-owned launcher can appear
* in the host UI. These are intentionally aligned with current slot surfaces
* so manifest authors can describe launch intent without coupling to a single
* component implementation detail.
*/
export declare const PLUGIN_LAUNCHER_PLACEMENT_ZONES: readonly ["page", "detailTab", "taskDetailView", "dashboardWidget", "sidebar", "sidebarPanel", "projectSidebarItem", "globalToolbarButton", "toolbarButton", "contextMenuItem", "commentAnnotation", "commentContextMenuItem", "settingsPage"];
export type PluginLauncherPlacementZone = (typeof PLUGIN_LAUNCHER_PLACEMENT_ZONES)[number];
/**
* Launcher action kinds describe what the launcher does when activated.
*/
export declare const PLUGIN_LAUNCHER_ACTIONS: readonly ["navigate", "openModal", "openDrawer", "openPopover", "performAction", "deepLink"];
export type PluginLauncherAction = (typeof PLUGIN_LAUNCHER_ACTIONS)[number];
/**
* Optional size hints the host can use when rendering plugin-owned launcher
* destinations such as overlays, drawers, or full page handoffs.
*/
export declare const PLUGIN_LAUNCHER_BOUNDS: readonly ["inline", "compact", "default", "wide", "full"];
export type PluginLauncherBounds = (typeof PLUGIN_LAUNCHER_BOUNDS)[number];
/**
* Render environments describe the container a launcher expects after it is
* activated. The current host may map these to concrete UI primitives.
*/
export declare const PLUGIN_LAUNCHER_RENDER_ENVIRONMENTS: readonly ["hostInline", "hostOverlay", "hostRoute", "external", "iframe"];
export type PluginLauncherRenderEnvironment = (typeof PLUGIN_LAUNCHER_RENDER_ENVIRONMENTS)[number];
/**
* Entity types that a `detailTab` UI slot can attach to.
*
* @see PLUGIN_SPEC.md §19.3 — Detail Tabs
*/
export declare const PLUGIN_UI_SLOT_ENTITY_TYPES: readonly ["project", "issue", "agent", "goal", "run", "comment"];
export type PluginUiSlotEntityType = (typeof PLUGIN_UI_SLOT_ENTITY_TYPES)[number];
/**
* Scope kinds for plugin state storage. Determines the granularity at which
* a plugin stores key-value state data.
*
* @see PLUGIN_SPEC.md §21.3 `plugin_state.scope_kind`
*/
export declare const PLUGIN_STATE_SCOPE_KINDS: readonly ["instance", "company", "project", "project_workspace", "agent", "issue", "goal", "run"];
export type PluginStateScopeKind = (typeof PLUGIN_STATE_SCOPE_KINDS)[number];
/** Statuses for a plugin's scheduled job definition. */
export declare const PLUGIN_JOB_STATUSES: readonly ["active", "paused", "failed"];
export type PluginJobStatus = (typeof PLUGIN_JOB_STATUSES)[number];
/** Statuses for individual job run executions. */
export declare const PLUGIN_JOB_RUN_STATUSES: readonly ["pending", "queued", "running", "succeeded", "failed", "cancelled"];
export type PluginJobRunStatus = (typeof PLUGIN_JOB_RUN_STATUSES)[number];
/** What triggered a particular job run. */
export declare const PLUGIN_JOB_RUN_TRIGGERS: readonly ["schedule", "manual", "retry"];
export type PluginJobRunTrigger = (typeof PLUGIN_JOB_RUN_TRIGGERS)[number];
/** Statuses for inbound webhook deliveries. */
export declare const PLUGIN_WEBHOOK_DELIVERY_STATUSES: readonly ["pending", "success", "failed"];
export type PluginWebhookDeliveryStatus = (typeof PLUGIN_WEBHOOK_DELIVERY_STATUSES)[number];
/**
* Core domain event types that plugins can subscribe to via the
* `events.subscribe` capability.
*
* @see PLUGIN_SPEC.md §16 — Event System
*/
export declare const PLUGIN_EVENT_TYPES: readonly ["company.created", "company.updated", "project.created", "project.updated", "project.workspace_created", "project.workspace_updated", "project.workspace_deleted", "issue.created", "issue.updated", "issue.comment.created", "agent.created", "agent.updated", "agent.status_changed", "agent.run.started", "agent.run.finished", "agent.run.failed", "agent.run.cancelled", "goal.created", "goal.updated", "approval.created", "approval.decided", "cost_event.created", "activity.logged"];
export type PluginEventType = (typeof PLUGIN_EVENT_TYPES)[number];
/**
* Error codes returned by the plugin bridge when a UI → worker call fails.
*
* @see PLUGIN_SPEC.md §19.7 — Error Propagation Through The Bridge
*/
export declare const PLUGIN_BRIDGE_ERROR_CODES: readonly ["WORKER_UNAVAILABLE", "CAPABILITY_DENIED", "WORKER_ERROR", "TIMEOUT", "UNKNOWN"];
export type PluginBridgeErrorCode = (typeof PLUGIN_BRIDGE_ERROR_CODES)[number];
//# sourceMappingURL=constants.d.ts.map

File diff suppressed because one or more lines are too long

553
node_modules/@paperclipai/shared/dist/constants.js generated vendored Normal file
View File

@@ -0,0 +1,553 @@
export const COMPANY_STATUSES = ["active", "paused", "archived"];
export const DEPLOYMENT_MODES = ["local_trusted", "authenticated"];
export const DEPLOYMENT_EXPOSURES = ["private", "public"];
export const AUTH_BASE_URL_MODES = ["auto", "explicit"];
export const AGENT_STATUSES = [
"active",
"paused",
"idle",
"running",
"error",
"pending_approval",
"terminated",
];
export const AGENT_ADAPTER_TYPES = [
"process",
"http",
"claude_local",
"codex_local",
"opencode_local",
"pi_local",
"cursor",
"openclaw_gateway",
"hermes_local",
];
export const AGENT_ROLES = [
"ceo",
"cto",
"cmo",
"cfo",
"engineer",
"designer",
"pm",
"qa",
"devops",
"researcher",
"general",
];
export const AGENT_ROLE_LABELS = {
ceo: "CEO",
cto: "CTO",
cmo: "CMO",
cfo: "CFO",
engineer: "Engineer",
designer: "Designer",
pm: "PM",
qa: "QA",
devops: "DevOps",
researcher: "Researcher",
general: "General",
};
export const AGENT_ICON_NAMES = [
"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",
];
export const ISSUE_STATUSES = [
"backlog",
"todo",
"in_progress",
"in_review",
"done",
"blocked",
"cancelled",
];
export const ISSUE_PRIORITIES = ["critical", "high", "medium", "low"];
export const ISSUE_ORIGIN_KINDS = ["manual", "routine_execution"];
export const GOAL_LEVELS = ["company", "team", "agent", "task"];
export const GOAL_STATUSES = ["planned", "active", "achieved", "cancelled"];
export const PROJECT_STATUSES = [
"backlog",
"planned",
"in_progress",
"completed",
"cancelled",
];
export const ROUTINE_STATUSES = ["active", "paused", "archived"];
export const ROUTINE_CONCURRENCY_POLICIES = ["coalesce_if_active", "always_enqueue", "skip_if_active"];
export const ROUTINE_CATCH_UP_POLICIES = ["skip_missed", "enqueue_missed_with_cap"];
export const ROUTINE_TRIGGER_KINDS = ["schedule", "webhook", "api"];
export const ROUTINE_TRIGGER_SIGNING_MODES = ["bearer", "hmac_sha256"];
export const ROUTINE_RUN_STATUSES = [
"received",
"coalesced",
"skipped",
"issue_created",
"completed",
"failed",
];
export const ROUTINE_RUN_SOURCES = ["schedule", "manual", "api", "webhook"];
export const PAUSE_REASONS = ["manual", "budget", "system"];
export const PROJECT_COLORS = [
"#6366f1", // indigo
"#8b5cf6", // violet
"#ec4899", // pink
"#ef4444", // red
"#f97316", // orange
"#eab308", // yellow
"#22c55e", // green
"#14b8a6", // teal
"#06b6d4", // cyan
"#3b82f6", // blue
];
export const APPROVAL_TYPES = ["hire_agent", "approve_ceo_strategy", "budget_override_required"];
export const APPROVAL_STATUSES = [
"pending",
"revision_requested",
"approved",
"rejected",
"cancelled",
];
export const SECRET_PROVIDERS = [
"local_encrypted",
"aws_secrets_manager",
"gcp_secret_manager",
"vault",
];
export const STORAGE_PROVIDERS = ["local_disk", "s3"];
export const BILLING_TYPES = [
"metered_api",
"subscription_included",
"subscription_overage",
"credits",
"fixed",
"unknown",
];
export const FINANCE_EVENT_KINDS = [
"inference_charge",
"platform_fee",
"credit_purchase",
"credit_refund",
"credit_expiry",
"byok_fee",
"gateway_overhead",
"log_storage_charge",
"logpush_charge",
"provisioned_capacity_charge",
"training_charge",
"custom_model_import_charge",
"custom_model_storage_charge",
"manual_adjustment",
];
export const FINANCE_DIRECTIONS = ["debit", "credit"];
export const FINANCE_UNITS = [
"input_token",
"output_token",
"cached_input_token",
"request",
"credit_usd",
"credit_unit",
"model_unit_minute",
"model_unit_hour",
"gb_month",
"train_token",
"unknown",
];
export const BUDGET_SCOPE_TYPES = ["company", "agent", "project"];
export const BUDGET_METRICS = ["billed_cents"];
export const BUDGET_WINDOW_KINDS = ["calendar_month_utc", "lifetime"];
export const BUDGET_THRESHOLD_TYPES = ["soft", "hard"];
export const BUDGET_INCIDENT_STATUSES = ["open", "resolved", "dismissed"];
export const BUDGET_INCIDENT_RESOLUTION_ACTIONS = [
"keep_paused",
"raise_budget_and_resume",
];
export const HEARTBEAT_INVOCATION_SOURCES = [
"timer",
"assignment",
"on_demand",
"automation",
];
export const WAKEUP_TRIGGER_DETAILS = ["manual", "ping", "callback", "system"];
export const WAKEUP_REQUEST_STATUSES = [
"queued",
"deferred_issue_execution",
"claimed",
"coalesced",
"skipped",
"completed",
"failed",
"cancelled",
];
export const HEARTBEAT_RUN_STATUSES = [
"queued",
"running",
"succeeded",
"failed",
"cancelled",
"timed_out",
];
export const LIVE_EVENT_TYPES = [
"heartbeat.run.queued",
"heartbeat.run.status",
"heartbeat.run.event",
"heartbeat.run.log",
"agent.status",
"activity.logged",
"plugin.ui.updated",
"plugin.worker.crashed",
"plugin.worker.restarted",
];
export const PRINCIPAL_TYPES = ["user", "agent"];
export const MEMBERSHIP_STATUSES = ["pending", "active", "suspended"];
export const INSTANCE_USER_ROLES = ["instance_admin"];
export const INVITE_TYPES = ["company_join", "bootstrap_ceo"];
export const INVITE_JOIN_TYPES = ["human", "agent", "both"];
export const JOIN_REQUEST_TYPES = ["human", "agent"];
export const JOIN_REQUEST_STATUSES = ["pending_approval", "approved", "rejected"];
export const PERMISSION_KEYS = [
"agents:create",
"users:invite",
"users:manage_permissions",
"tasks:assign",
"tasks:assign_scope",
"joins:approve",
];
// ---------------------------------------------------------------------------
// Plugin System — see doc/plugins/PLUGIN_SPEC.md for the full specification
// ---------------------------------------------------------------------------
/**
* The current version of the Plugin API contract.
*
* Increment this value whenever a breaking change is made to the plugin API
* so that the host can reject incompatible plugin manifests.
*
* @see PLUGIN_SPEC.md §4 — Versioning
*/
export const PLUGIN_API_VERSION = 1;
/**
* Lifecycle statuses for an installed plugin.
*
* State machine: installed → ready | error, ready → disabled | error | upgrade_pending | uninstalled,
* disabled → ready | uninstalled, error → ready | uninstalled,
* upgrade_pending → ready | error | uninstalled, uninstalled → installed (reinstall).
*
* @see {@link PluginStatus} — inferred union type
* @see PLUGIN_SPEC.md §21.3 `plugins.status`
*/
export const PLUGIN_STATUSES = [
"installed",
"ready",
"disabled",
"error",
"upgrade_pending",
"uninstalled",
];
/**
* Plugin classification categories. A plugin declares one or more categories
* in its manifest to describe its primary purpose.
*
* @see PLUGIN_SPEC.md §6.2
*/
export const PLUGIN_CATEGORIES = [
"connector",
"workspace",
"automation",
"ui",
];
/**
* Named permissions the host grants to a plugin. Plugins declare required
* capabilities in their manifest; the host enforces them at runtime via the
* plugin capability validator.
*
* Grouped into: Data Read, Data Write, Plugin State, Runtime/Integration,
* Agent Tools, and UI.
*
* @see PLUGIN_SPEC.md §15 — Capability Model
*/
export const PLUGIN_CAPABILITIES = [
// Data Read
"companies.read",
"projects.read",
"project.workspaces.read",
"issues.read",
"issue.comments.read",
"issue.documents.read",
"agents.read",
"goals.read",
"goals.create",
"goals.update",
"activity.read",
"costs.read",
// Data Write
"issues.create",
"issues.update",
"issue.comments.create",
"issue.documents.write",
"agents.pause",
"agents.resume",
"agents.invoke",
"agent.sessions.create",
"agent.sessions.list",
"agent.sessions.send",
"agent.sessions.close",
"activity.log.write",
"metrics.write",
// Plugin State
"plugin.state.read",
"plugin.state.write",
// Runtime / Integration
"events.subscribe",
"events.emit",
"jobs.schedule",
"webhooks.receive",
"http.outbound",
"secrets.read-ref",
// Agent Tools
"agent.tools.register",
// UI
"instance.settings.register",
"ui.sidebar.register",
"ui.page.register",
"ui.detailTab.register",
"ui.dashboardWidget.register",
"ui.commentAnnotation.register",
"ui.action.register",
];
/**
* UI extension slot types. Each slot type corresponds to a mount point in the
* Paperclip UI where plugin components can be rendered.
*
* @see PLUGIN_SPEC.md §19 — UI Extension Model
*/
export const PLUGIN_UI_SLOT_TYPES = [
"page",
"detailTab",
"taskDetailView",
"dashboardWidget",
"sidebar",
"sidebarPanel",
"projectSidebarItem",
"globalToolbarButton",
"toolbarButton",
"contextMenuItem",
"commentAnnotation",
"commentContextMenuItem",
"settingsPage",
];
/**
* Reserved company-scoped route segments that plugin page routes may not claim.
*
* These map to first-class host pages under `/:companyPrefix/...`.
*/
export const PLUGIN_RESERVED_COMPANY_ROUTE_SEGMENTS = [
"dashboard",
"onboarding",
"companies",
"company",
"settings",
"plugins",
"org",
"agents",
"projects",
"issues",
"goals",
"approvals",
"costs",
"activity",
"inbox",
"design-guide",
"tests",
];
/**
* Launcher placement zones describe where a plugin-owned launcher can appear
* in the host UI. These are intentionally aligned with current slot surfaces
* so manifest authors can describe launch intent without coupling to a single
* component implementation detail.
*/
export const PLUGIN_LAUNCHER_PLACEMENT_ZONES = [
"page",
"detailTab",
"taskDetailView",
"dashboardWidget",
"sidebar",
"sidebarPanel",
"projectSidebarItem",
"globalToolbarButton",
"toolbarButton",
"contextMenuItem",
"commentAnnotation",
"commentContextMenuItem",
"settingsPage",
];
/**
* Launcher action kinds describe what the launcher does when activated.
*/
export const PLUGIN_LAUNCHER_ACTIONS = [
"navigate",
"openModal",
"openDrawer",
"openPopover",
"performAction",
"deepLink",
];
/**
* Optional size hints the host can use when rendering plugin-owned launcher
* destinations such as overlays, drawers, or full page handoffs.
*/
export const PLUGIN_LAUNCHER_BOUNDS = [
"inline",
"compact",
"default",
"wide",
"full",
];
/**
* Render environments describe the container a launcher expects after it is
* activated. The current host may map these to concrete UI primitives.
*/
export const PLUGIN_LAUNCHER_RENDER_ENVIRONMENTS = [
"hostInline",
"hostOverlay",
"hostRoute",
"external",
"iframe",
];
/**
* Entity types that a `detailTab` UI slot can attach to.
*
* @see PLUGIN_SPEC.md §19.3 — Detail Tabs
*/
export const PLUGIN_UI_SLOT_ENTITY_TYPES = [
"project",
"issue",
"agent",
"goal",
"run",
"comment",
];
/**
* Scope kinds for plugin state storage. Determines the granularity at which
* a plugin stores key-value state data.
*
* @see PLUGIN_SPEC.md §21.3 `plugin_state.scope_kind`
*/
export const PLUGIN_STATE_SCOPE_KINDS = [
"instance",
"company",
"project",
"project_workspace",
"agent",
"issue",
"goal",
"run",
];
/** Statuses for a plugin's scheduled job definition. */
export const PLUGIN_JOB_STATUSES = [
"active",
"paused",
"failed",
];
/** Statuses for individual job run executions. */
export const PLUGIN_JOB_RUN_STATUSES = [
"pending",
"queued",
"running",
"succeeded",
"failed",
"cancelled",
];
/** What triggered a particular job run. */
export const PLUGIN_JOB_RUN_TRIGGERS = [
"schedule",
"manual",
"retry",
];
/** Statuses for inbound webhook deliveries. */
export const PLUGIN_WEBHOOK_DELIVERY_STATUSES = [
"pending",
"success",
"failed",
];
/**
* Core domain event types that plugins can subscribe to via the
* `events.subscribe` capability.
*
* @see PLUGIN_SPEC.md §16 — Event System
*/
export const PLUGIN_EVENT_TYPES = [
"company.created",
"company.updated",
"project.created",
"project.updated",
"project.workspace_created",
"project.workspace_updated",
"project.workspace_deleted",
"issue.created",
"issue.updated",
"issue.comment.created",
"agent.created",
"agent.updated",
"agent.status_changed",
"agent.run.started",
"agent.run.finished",
"agent.run.failed",
"agent.run.cancelled",
"goal.created",
"goal.updated",
"approval.created",
"approval.decided",
"cost_event.created",
"activity.logged",
];
/**
* Error codes returned by the plugin bridge when a UI → worker call fails.
*
* @see PLUGIN_SPEC.md §19.7 — Error Propagation Through The Bridge
*/
export const PLUGIN_BRIDGE_ERROR_CODES = [
"WORKER_UNAVAILABLE",
"CAPABILITY_DENIED",
"WORKER_ERROR",
"TIMEOUT",
"UNKNOWN",
];
//# sourceMappingURL=constants.js.map

File diff suppressed because one or more lines are too long

10
node_modules/@paperclipai/shared/dist/index.d.ts generated vendored Normal file

File diff suppressed because one or more lines are too long

1
node_modules/@paperclipai/shared/dist/index.d.ts.map generated vendored Normal file

File diff suppressed because one or more lines are too long

9
node_modules/@paperclipai/shared/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,9 @@
export { COMPANY_STATUSES, DEPLOYMENT_MODES, DEPLOYMENT_EXPOSURES, AUTH_BASE_URL_MODES, AGENT_STATUSES, AGENT_ADAPTER_TYPES, AGENT_ROLES, AGENT_ROLE_LABELS, AGENT_ICON_NAMES, ISSUE_STATUSES, ISSUE_PRIORITIES, ISSUE_ORIGIN_KINDS, GOAL_LEVELS, GOAL_STATUSES, PROJECT_STATUSES, ROUTINE_STATUSES, ROUTINE_CONCURRENCY_POLICIES, ROUTINE_CATCH_UP_POLICIES, ROUTINE_TRIGGER_KINDS, ROUTINE_TRIGGER_SIGNING_MODES, ROUTINE_RUN_STATUSES, ROUTINE_RUN_SOURCES, PAUSE_REASONS, PROJECT_COLORS, APPROVAL_TYPES, APPROVAL_STATUSES, SECRET_PROVIDERS, STORAGE_PROVIDERS, BILLING_TYPES, FINANCE_EVENT_KINDS, FINANCE_DIRECTIONS, FINANCE_UNITS, BUDGET_SCOPE_TYPES, BUDGET_METRICS, BUDGET_WINDOW_KINDS, BUDGET_THRESHOLD_TYPES, BUDGET_INCIDENT_STATUSES, BUDGET_INCIDENT_RESOLUTION_ACTIONS, HEARTBEAT_INVOCATION_SOURCES, HEARTBEAT_RUN_STATUSES, WAKEUP_TRIGGER_DETAILS, WAKEUP_REQUEST_STATUSES, LIVE_EVENT_TYPES, PRINCIPAL_TYPES, MEMBERSHIP_STATUSES, INSTANCE_USER_ROLES, INVITE_TYPES, INVITE_JOIN_TYPES, JOIN_REQUEST_TYPES, JOIN_REQUEST_STATUSES, PERMISSION_KEYS, PLUGIN_API_VERSION, PLUGIN_STATUSES, PLUGIN_CATEGORIES, PLUGIN_CAPABILITIES, PLUGIN_UI_SLOT_TYPES, PLUGIN_UI_SLOT_ENTITY_TYPES, PLUGIN_LAUNCHER_PLACEMENT_ZONES, PLUGIN_LAUNCHER_ACTIONS, PLUGIN_LAUNCHER_BOUNDS, PLUGIN_LAUNCHER_RENDER_ENVIRONMENTS, PLUGIN_STATE_SCOPE_KINDS, PLUGIN_JOB_STATUSES, PLUGIN_JOB_RUN_STATUSES, PLUGIN_JOB_RUN_TRIGGERS, PLUGIN_WEBHOOK_DELIVERY_STATUSES, PLUGIN_EVENT_TYPES, PLUGIN_BRIDGE_ERROR_CODES, } from "./constants.js";
export { instanceGeneralSettingsSchema, patchInstanceGeneralSettingsSchema, instanceExperimentalSettingsSchema, patchInstanceExperimentalSettingsSchema, } from "./validators/index.js";
export { createCompanySchema, updateCompanySchema, updateCompanyBrandingSchema, agentSkillStateSchema, agentSkillSyncModeSchema, agentSkillEntrySchema, agentSkillSnapshotSchema, agentSkillSyncSchema, createAgentSchema, createAgentHireSchema, updateAgentSchema, agentInstructionsBundleModeSchema, updateAgentInstructionsBundleSchema, upsertAgentInstructionsFileSchema, updateAgentInstructionsPathSchema, createAgentKeySchema, wakeAgentSchema, resetAgentSessionSchema, testAdapterEnvironmentSchema, agentPermissionsSchema, updateAgentPermissionsSchema, createProjectSchema, updateProjectSchema, createProjectWorkspaceSchema, updateProjectWorkspaceSchema, projectExecutionWorkspacePolicySchema, createIssueSchema, createIssueLabelSchema, updateIssueSchema, issueExecutionWorkspaceSettingsSchema, checkoutIssueSchema, addIssueCommentSchema, linkIssueApprovalSchema, createIssueAttachmentMetadataSchema, createIssueWorkProductSchema, updateIssueWorkProductSchema, issueWorkProductTypeSchema, issueWorkProductStatusSchema, issueWorkProductReviewStateSchema, updateExecutionWorkspaceSchema, executionWorkspaceStatusSchema, issueDocumentFormatSchema, issueDocumentKeySchema, upsertIssueDocumentSchema, createGoalSchema, updateGoalSchema, createApprovalSchema, upsertBudgetPolicySchema, resolveBudgetIncidentSchema, resolveApprovalSchema, requestApprovalRevisionSchema, resubmitApprovalSchema, addApprovalCommentSchema, envBindingPlainSchema, envBindingSecretRefSchema, envBindingSchema, envConfigSchema, createSecretSchema, rotateSecretSchema, updateSecretSchema, createRoutineSchema, updateRoutineSchema, createRoutineTriggerSchema, updateRoutineTriggerSchema, runRoutineSchema, rotateRoutineTriggerSecretSchema, createCostEventSchema, createFinanceEventSchema, updateBudgetSchema, createAssetImageMetadataSchema, createCompanyInviteSchema, createOpenClawInvitePromptSchema, acceptInviteSchema, listJoinRequestsQuerySchema, claimJoinRequestApiKeySchema, boardCliAuthAccessLevelSchema, createCliAuthChallengeSchema, resolveCliAuthChallengeSchema, updateMemberPermissionsSchema, updateUserCompanyAccessSchema, companySkillSourceTypeSchema, companySkillTrustLevelSchema, companySkillCompatibilitySchema, companySkillSourceBadgeSchema, companySkillFileInventoryEntrySchema, companySkillSchema, companySkillListItemSchema, companySkillUsageAgentSchema, companySkillDetailSchema, companySkillUpdateStatusSchema, companySkillImportSchema, companySkillProjectScanRequestSchema, companySkillProjectScanSkippedSchema, companySkillProjectScanConflictSchema, companySkillProjectScanResultSchema, companySkillCreateSchema, companySkillFileDetailSchema, companySkillFileUpdateSchema, portabilityIncludeSchema, portabilityEnvInputSchema, portabilityCompanyManifestEntrySchema, portabilitySidebarOrderSchema, portabilityAgentManifestEntrySchema, portabilityManifestSchema, portabilitySourceSchema, portabilityTargetSchema, portabilityAgentSelectionSchema, portabilityCollisionStrategySchema, companyPortabilityExportSchema, companyPortabilityPreviewSchema, companyPortabilityImportSchema, jsonSchemaSchema, pluginJobDeclarationSchema, pluginWebhookDeclarationSchema, pluginToolDeclarationSchema, pluginUiSlotDeclarationSchema, pluginLauncherActionDeclarationSchema, pluginLauncherRenderDeclarationSchema, pluginLauncherDeclarationSchema, pluginManifestV1Schema, installPluginSchema, upsertPluginConfigSchema, patchPluginConfigSchema, updatePluginStatusSchema, uninstallPluginSchema, pluginStateScopeKeySchema, setPluginStateSchema, listPluginStateSchema, } from "./validators/index.js";
export { API_PREFIX, API } from "./api.js";
export { normalizeAgentUrlKey, deriveAgentUrlKey, isUuidLike } from "./agent-url-key.js";
export { deriveProjectUrlKey, normalizeProjectUrlKey } from "./project-url-key.js";
export { AGENT_MENTION_SCHEME, PROJECT_MENTION_SCHEME, buildAgentMentionHref, buildProjectMentionHref, extractAgentMentionIds, parseAgentMentionHref, parseProjectMentionHref, extractProjectMentionIds, } from "./project-mentions.js";
export { paperclipConfigSchema, configMetaSchema, llmConfigSchema, databaseBackupConfigSchema, databaseConfigSchema, loggingConfigSchema, serverConfigSchema, authConfigSchema, secretsConfigSchema, storageConfigSchema, storageLocalDiskConfigSchema, storageS3ConfigSchema, secretsLocalEncryptedConfigSchema, } from "./config-schema.js";
//# sourceMappingURL=index.js.map

1
node_modules/@paperclipai/shared/dist/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,4BAA4B,EAC5B,yBAAyB,EACzB,qBAAqB,EACrB,6BAA6B,EAC7B,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,EACxB,kCAAkC,EAClC,4BAA4B,EAC5B,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,eAAe,EACf,mBAA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AO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACzF,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,GAGzB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,0BAA0B,EAC1B,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,4BAA4B,EAC5B,qBAAqB,EACrB,iCAAiC,GAclC,MAAM,oBAAoB,CAAC"}

View File

@@ -0,0 +1,17 @@
export declare const PROJECT_MENTION_SCHEME = "project://";
export declare const AGENT_MENTION_SCHEME = "agent://";
export interface ParsedProjectMention {
projectId: string;
color: string | null;
}
export interface ParsedAgentMention {
agentId: string;
icon: string | null;
}
export declare function buildProjectMentionHref(projectId: string, color?: string | null): string;
export declare function parseProjectMentionHref(href: string): ParsedProjectMention | null;
export declare function buildAgentMentionHref(agentId: string, icon?: string | null): string;
export declare function parseAgentMentionHref(href: string): ParsedAgentMention | null;
export declare function extractProjectMentionIds(markdown: string): string[];
export declare function extractAgentMentionIds(markdown: string): string[];
//# sourceMappingURL=project-mentions.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"project-mentions.d.ts","sourceRoot":"","sources":["../src/project-mentions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,eAAe,CAAC;AACnD,eAAO,MAAM,oBAAoB,aAAa,CAAC;AAU/C,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAwBD,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAOxF;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAqBjF;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAOnF;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAmB7E;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAUnE;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAUjE"}

View File

@@ -0,0 +1,123 @@
export const PROJECT_MENTION_SCHEME = "project://";
export const AGENT_MENTION_SCHEME = "agent://";
const HEX_COLOR_RE = /^[0-9a-f]{6}$/i;
const HEX_COLOR_SHORT_RE = /^[0-9a-f]{3}$/i;
const HEX_COLOR_WITH_HASH_RE = /^#[0-9a-f]{6}$/i;
const HEX_COLOR_SHORT_WITH_HASH_RE = /^#[0-9a-f]{3}$/i;
const PROJECT_MENTION_LINK_RE = /\[[^\]]*]\((project:\/\/[^)\s]+)\)/gi;
const AGENT_MENTION_LINK_RE = /\[[^\]]*]\((agent:\/\/[^)\s]+)\)/gi;
const AGENT_ICON_NAME_RE = /^[a-z0-9-]+$/i;
function normalizeHexColor(input) {
if (!input)
return null;
const trimmed = input.trim();
if (!trimmed)
return null;
if (HEX_COLOR_WITH_HASH_RE.test(trimmed)) {
return trimmed.toLowerCase();
}
if (HEX_COLOR_RE.test(trimmed)) {
return `#${trimmed.toLowerCase()}`;
}
if (HEX_COLOR_SHORT_WITH_HASH_RE.test(trimmed)) {
const raw = trimmed.slice(1).toLowerCase();
return `#${raw[0]}${raw[0]}${raw[1]}${raw[1]}${raw[2]}${raw[2]}`;
}
if (HEX_COLOR_SHORT_RE.test(trimmed)) {
const raw = trimmed.toLowerCase();
return `#${raw[0]}${raw[0]}${raw[1]}${raw[1]}${raw[2]}${raw[2]}`;
}
return null;
}
export function buildProjectMentionHref(projectId, color) {
const trimmedProjectId = projectId.trim();
const normalizedColor = normalizeHexColor(color ?? null);
if (!normalizedColor) {
return `${PROJECT_MENTION_SCHEME}${trimmedProjectId}`;
}
return `${PROJECT_MENTION_SCHEME}${trimmedProjectId}?c=${encodeURIComponent(normalizedColor.slice(1))}`;
}
export function parseProjectMentionHref(href) {
if (!href.startsWith(PROJECT_MENTION_SCHEME))
return null;
let url;
try {
url = new URL(href);
}
catch {
return null;
}
if (url.protocol !== "project:")
return null;
const projectId = `${url.hostname}${url.pathname}`.replace(/^\/+/, "").trim();
if (!projectId)
return null;
const color = normalizeHexColor(url.searchParams.get("c") ?? url.searchParams.get("color"));
return {
projectId,
color,
};
}
export function buildAgentMentionHref(agentId, icon) {
const trimmedAgentId = agentId.trim();
const normalizedIcon = normalizeAgentIcon(icon ?? null);
if (!normalizedIcon) {
return `${AGENT_MENTION_SCHEME}${trimmedAgentId}`;
}
return `${AGENT_MENTION_SCHEME}${trimmedAgentId}?i=${encodeURIComponent(normalizedIcon)}`;
}
export function parseAgentMentionHref(href) {
if (!href.startsWith(AGENT_MENTION_SCHEME))
return null;
let url;
try {
url = new URL(href);
}
catch {
return null;
}
if (url.protocol !== "agent:")
return null;
const agentId = `${url.hostname}${url.pathname}`.replace(/^\/+/, "").trim();
if (!agentId)
return null;
return {
agentId,
icon: normalizeAgentIcon(url.searchParams.get("i") ?? url.searchParams.get("icon")),
};
}
export function extractProjectMentionIds(markdown) {
if (!markdown)
return [];
const ids = new Set();
const re = new RegExp(PROJECT_MENTION_LINK_RE);
let match;
while ((match = re.exec(markdown)) !== null) {
const parsed = parseProjectMentionHref(match[1]);
if (parsed)
ids.add(parsed.projectId);
}
return [...ids];
}
export function extractAgentMentionIds(markdown) {
if (!markdown)
return [];
const ids = new Set();
const re = new RegExp(AGENT_MENTION_LINK_RE);
let match;
while ((match = re.exec(markdown)) !== null) {
const parsed = parseAgentMentionHref(match[1]);
if (parsed)
ids.add(parsed.agentId);
}
return [...ids];
}
function normalizeAgentIcon(input) {
if (!input)
return null;
const trimmed = input.trim().toLowerCase();
if (!trimmed || !AGENT_ICON_NAME_RE.test(trimmed))
return null;
return trimmed;
}
//# sourceMappingURL=project-mentions.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"project-mentions.js","sourceRoot":"","sources":["../src/project-mentions.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG,YAAY,CAAC;AACnD,MAAM,CAAC,MAAM,oBAAoB,GAAG,UAAU,CAAC;AAE/C,MAAM,YAAY,GAAG,gBAAgB,CAAC;AACtC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;AAC5C,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;AACjD,MAAM,4BAA4B,GAAG,iBAAiB,CAAC;AACvD,MAAM,uBAAuB,GAAG,sCAAsC,CAAC;AACvE,MAAM,qBAAqB,GAAG,oCAAoC,CAAC;AACnE,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAY3C,SAAS,iBAAiB,CAAC,KAAgC;IACzD,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAE1B,IAAI,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACzC,OAAO,OAAO,CAAC,WAAW,EAAE,CAAC;IAC/B,CAAC;IACD,IAAI,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QAC/B,OAAO,IAAI,OAAO,CAAC,WAAW,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IAC9B,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,qBAAqB,CAAC,CAAC;IAC7C,IAAI,KAA6B,CAAC;IAClC,OAAO,CAAC,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAC5C,MAAM,MAAM,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/C,IAAI,MAAM;YAAE,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC;AAClB,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAgC;IAC1D,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC3C,IAAI,CAAC,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/D,OAAO,OAAO,CAAC;AACjB,CAAC"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=project-mentions.test.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"project-mentions.test.d.ts","sourceRoot":"","sources":["../src/project-mentions.test.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,21 @@
import { describe, expect, it } from "vitest";
import { buildAgentMentionHref, buildProjectMentionHref, extractAgentMentionIds, extractProjectMentionIds, parseAgentMentionHref, parseProjectMentionHref, } from "./project-mentions.js";
describe("project-mentions", () => {
it("round-trips project mentions with color metadata", () => {
const href = buildProjectMentionHref("project-123", "#336699");
expect(parseProjectMentionHref(href)).toEqual({
projectId: "project-123",
color: "#336699",
});
expect(extractProjectMentionIds(`[@Paperclip App](${href})`)).toEqual(["project-123"]);
});
it("round-trips agent mentions with icon metadata", () => {
const href = buildAgentMentionHref("agent-123", "code");
expect(parseAgentMentionHref(href)).toEqual({
agentId: "agent-123",
icon: "code",
});
expect(extractAgentMentionIds(`[@CodexCoder](${href})`)).toEqual(["agent-123"]);
});
});
//# sourceMappingURL=project-mentions.test.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"project-mentions.test.js","sourceRoot":"","sources":["../src/project-mentions.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAE/B,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,kDAAkD,EAAE,GAAG,EAAE;QAC1D,MAAM,IAAI,GAAG,uBAAuB,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;QAC/D,MAAM,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC;YAC5C,SAAS,EAAE,aAAa;YACxB,KAAK,EAAE,SAAS;SACjB,CAAC,CAAC;QACH,MAAM,CAAC,wBAAwB,CAAC,oBAAoB,IAAI,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;IACzF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;QACvD,MAAM,IAAI,GAAG,qBAAqB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QACxD,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC;YAC1C,OAAO,EAAE,WAAW;YACpB,IAAI,EAAE,MAAM;SACb,CAAC,CAAC;QACH,MAAM,CAAC,sBAAsB,CAAC,iBAAiB,IAAI,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;IAClF,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}

View File

@@ -0,0 +1,3 @@
export declare function normalizeProjectUrlKey(value: string | null | undefined): string | null;
export declare function deriveProjectUrlKey(name: string | null | undefined, fallback?: string | null): string;
//# sourceMappingURL=project-url-key.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"project-url-key.d.ts","sourceRoot":"","sources":["../src/project-url-key.ts"],"names":[],"mappings":"AAGA,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAQtF;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAErG"}

View File

@@ -0,0 +1,16 @@
const PROJECT_URL_KEY_DELIM_RE = /[^a-z0-9]+/g;
const PROJECT_URL_KEY_TRIM_RE = /^-+|-+$/g;
export function normalizeProjectUrlKey(value) {
if (typeof value !== "string")
return null;
const normalized = value
.trim()
.toLowerCase()
.replace(PROJECT_URL_KEY_DELIM_RE, "-")
.replace(PROJECT_URL_KEY_TRIM_RE, "");
return normalized.length > 0 ? normalized : null;
}
export function deriveProjectUrlKey(name, fallback) {
return normalizeProjectUrlKey(name) ?? normalizeProjectUrlKey(fallback) ?? "project";
}
//# sourceMappingURL=project-url-key.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"project-url-key.js","sourceRoot":"","sources":["../src/project-url-key.ts"],"names":[],"mappings":"AAAA,MAAM,wBAAwB,GAAG,aAAa,CAAC;AAC/C,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAE3C,MAAM,UAAU,sBAAsB,CAAC,KAAgC;IACrE,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC3C,MAAM,UAAU,GAAG,KAAK;SACrB,IAAI,EAAE;SACN,WAAW,EAAE;SACb,OAAO,CAAC,wBAAwB,EAAE,GAAG,CAAC;SACtC,OAAO,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC;IACxC,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,IAA+B,EAAE,QAAwB;IAC3F,OAAO,sBAAsB,CAAC,IAAI,CAAC,IAAI,sBAAsB,CAAC,QAAQ,CAAC,IAAI,SAAS,CAAC;AACvF,CAAC"}

View File

@@ -0,0 +1,67 @@
import type { AgentAdapterType, InstanceUserRole, InviteJoinType, InviteType, JoinRequestStatus, JoinRequestType, MembershipStatus, PermissionKey, PrincipalType } from "../constants.js";
export interface CompanyMembership {
id: string;
companyId: string;
principalType: PrincipalType;
principalId: string;
status: MembershipStatus;
membershipRole: string | null;
createdAt: Date;
updatedAt: Date;
}
export interface PrincipalPermissionGrant {
id: string;
companyId: string;
principalType: PrincipalType;
principalId: string;
permissionKey: PermissionKey;
scope: Record<string, unknown> | null;
grantedByUserId: string | null;
createdAt: Date;
updatedAt: Date;
}
export interface Invite {
id: string;
companyId: string | null;
inviteType: InviteType;
tokenHash: string;
allowedJoinTypes: InviteJoinType;
defaultsPayload: Record<string, unknown> | null;
expiresAt: Date;
invitedByUserId: string | null;
revokedAt: Date | null;
acceptedAt: Date | null;
createdAt: Date;
updatedAt: Date;
}
export interface JoinRequest {
id: string;
inviteId: string;
companyId: string;
requestType: JoinRequestType;
status: JoinRequestStatus;
requestIp: string;
requestingUserId: string | null;
requestEmailSnapshot: string | null;
agentName: string | null;
adapterType: AgentAdapterType | null;
capabilities: string | null;
agentDefaultsPayload: Record<string, unknown> | null;
claimSecretExpiresAt: Date | null;
claimSecretConsumedAt: Date | null;
createdAgentId: string | null;
approvedByUserId: string | null;
approvedAt: Date | null;
rejectedByUserId: string | null;
rejectedAt: Date | null;
createdAt: Date;
updatedAt: Date;
}
export interface InstanceUserRoleGrant {
id: string;
userId: string;
role: InstanceUserRole;
createdAt: Date;
updatedAt: Date;
}
//# sourceMappingURL=access.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../src/types/access.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,aAAa,EACd,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,aAAa,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,gBAAgB,CAAC;IACzB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,aAAa,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,aAAa,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACtC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,cAAc,CAAC;IACjC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAChD,SAAS,EA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ChB,SAAS,EAAE,IAAI,CAAC;CACjB"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=access.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"access.js","sourceRoot":"","sources":["../../src/types/access.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,14 @@
export interface ActivityEvent {
id: string;
companyId: string;
actorType: "agent" | "user" | "system";
actorId: string;
action: string;
entityType: string;
entityId: string;
agentId: string | null;
runId: string | null;
details: Record<string, unknown> | null;
createdAt: Date;
}
//# sourceMappingURL=activity.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../src/types/activity.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACxC,SAAS,EAAE,IAAI,CAAC;CACjB"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=activity.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"activity.js","sourceRoot":"","sources":["../../src/types/activity.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,31 @@
export type AgentSkillSyncMode = "unsupported" | "persistent" | "ephemeral";
export type AgentSkillState = "available" | "configured" | "installed" | "missing" | "stale" | "external";
export type AgentSkillOrigin = "company_managed" | "paperclip_required" | "user_installed" | "external_unknown";
export interface AgentSkillEntry {
key: string;
runtimeName: string | null;
desired: boolean;
managed: boolean;
required?: boolean;
requiredReason?: string | null;
state: AgentSkillState;
origin?: AgentSkillOrigin;
originLabel?: string | null;
locationLabel?: string | null;
readOnly?: boolean;
sourcePath?: string | null;
targetPath?: string | null;
detail?: string | null;
}
export interface AgentSkillSnapshot {
adapterType: string;
supported: boolean;
mode: AgentSkillSyncMode;
desiredSkills: string[];
entries: AgentSkillEntry[];
warnings: string[];
}
export interface AgentSkillSyncRequest {
desiredSkills: string[];
}
//# sourceMappingURL=adapter-skills.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"adapter-skills.d.ts","sourceRoot":"","sources":["../../src/types/adapter-skills.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG,YAAY,GAAG,WAAW,CAAC;AAE5E,MAAM,MAAM,eAAe,GACvB,WAAW,GACX,YAAY,GACZ,WAAW,GACX,SAAS,GACT,OAAO,GACP,UAAU,CAAC;AAEf,MAAM,MAAM,gBAAgB,GACxB,iBAAiB,GACjB,oBAAoB,GACpB,gBAAgB,GAChB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,KAAK,EAAE,eAAe,CAAC;IACvB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,kBAAkB,CAAC;IACzB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=adapter-skills.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"adapter-skills.js","sourceRoot":"","sources":["../../src/types/adapter-skills.ts"],"names":[],"mappings":""}

108
node_modules/@paperclipai/shared/dist/types/agent.d.ts generated vendored Normal file
View File

@@ -0,0 +1,108 @@
import type { AgentAdapterType, PauseReason, AgentRole, AgentStatus } from "../constants.js";
import type { CompanyMembership, PrincipalPermissionGrant } from "./access.js";
export interface AgentPermissions {
canCreateAgents: boolean;
}
export type AgentInstructionsBundleMode = "managed" | "external";
export interface AgentInstructionsFileSummary {
path: string;
size: number;
language: string;
markdown: boolean;
isEntryFile: boolean;
editable: boolean;
deprecated: boolean;
virtual: boolean;
}
export interface AgentInstructionsFileDetail extends AgentInstructionsFileSummary {
content: string;
}
export interface AgentInstructionsBundle {
agentId: string;
companyId: string;
mode: AgentInstructionsBundleMode | null;
rootPath: string | null;
managedRootPath: string;
entryFile: string;
resolvedEntryPath: string | null;
editable: boolean;
warnings: string[];
legacyPromptTemplateActive: boolean;
legacyBootstrapPromptTemplateActive: boolean;
files: AgentInstructionsFileSummary[];
}
export interface AgentAccessState {
canAssignTasks: boolean;
taskAssignSource: "explicit_grant" | "agent_creator" | "ceo_role" | "none";
membership: CompanyMembership | null;
grants: PrincipalPermissionGrant[];
}
export interface AgentChainOfCommandEntry {
id: string;
name: string;
role: AgentRole;
title: string | null;
}
export interface Agent {
id: string;
companyId: string;
name: string;
urlKey: string;
role: AgentRole;
title: string | null;
icon: string | null;
status: AgentStatus;
reportsTo: string | null;
capabilities: string | null;
adapterType: AgentAdapterType;
adapterConfig: Record<string, unknown>;
runtimeConfig: Record<string, unknown>;
budgetMonthlyCents: number;
spentMonthlyCents: number;
pauseReason: PauseReason | null;
pausedAt: Date | null;
permissions: AgentPermissions;
lastHeartbeatAt: Date | null;
metadata: Record<string, unknown> | null;
createdAt: Date;
updatedAt: Date;
}
export interface AgentDetail extends Agent {
chainOfCommand: AgentChainOfCommandEntry[];
access: AgentAccessState;
}
export interface AgentKeyCreated {
id: string;
name: string;
token: string;
createdAt: Date;
}
export interface AgentConfigRevision {
id: string;
companyId: string;
agentId: string;
createdByAgentId: string | null;
createdByUserId: string | null;
source: string;
rolledBackFromRevisionId: string | null;
changedKeys: string[];
beforeConfig: Record<string, unknown>;
afterConfig: Record<string, unknown>;
createdAt: Date;
}
export type AdapterEnvironmentCheckLevel = "info" | "warn" | "error";
export type AdapterEnvironmentTestStatus = "pass" | "warn" | "fail";
export interface AdapterEnvironmentCheck {
code: string;
level: AdapterEnvironmentCheckLevel;
message: string;
detail?: string | null;
hint?: string | null;
}
export interface AdapterEnvironmentTestResult {
adapterType: string;
status: AdapterEnvironmentTestStatus;
checks: AdapterEnvironmentCheck[];
testedAt: string;
}
//# sourceMappingURL=agent.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/types/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,WAAW,EACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,gBAAgB;IAC/B,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,MAAM,2BAA2B,GAAG,SAAS,GAAG,U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,CAAC;IAChB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,MAAM,4BAA4B,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AACrE,MAAM,MAAM,4BAA4B,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpE,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,4BAA4B,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,4BAA4B;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,4BAA4B,CAAC;IACrC,MAAM,EAAE,uBAAuB,EAAE,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;CAClB"}

2
node_modules/@paperclipai/shared/dist/types/agent.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=agent.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/types/agent.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,26 @@
import type { ApprovalStatus, ApprovalType } from "../constants.js";
export interface Approval {
id: string;
companyId: string;
type: ApprovalType;
requestedByAgentId: string | null;
requestedByUserId: string | null;
status: ApprovalStatus;
payload: Record<string, unknown>;
decisionNote: string | null;
decidedByUserId: string | null;
decidedAt: Date | null;
createdAt: Date;
updatedAt: Date;
}
export interface ApprovalComment {
id: string;
companyId: string;
approvalId: string;
authorAgentId: string | null;
authorUserId: string | null;
body: string;
createdAt: Date;
updatedAt: Date;
}
//# sourceMappingURL=approval.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"approval.d.ts","sourceRoot":"","sources":["../../src/types/approval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpE,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,YAAY,CAAC;IACnB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=approval.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"approval.js","sourceRoot":"","sources":["../../src/types/approval.ts"],"names":[],"mappings":""}

16
node_modules/@paperclipai/shared/dist/types/asset.d.ts generated vendored Normal file
View File

@@ -0,0 +1,16 @@
export interface AssetImage {
assetId: string;
companyId: string;
provider: string;
objectKey: string;
contentType: string;
byteSize: number;
sha256: string;
originalFilename: string | null;
createdByAgentId: string | null;
createdByUserId: string | null;
createdAt: Date;
updatedAt: Date;
contentPath: string;
}
//# sourceMappingURL=asset.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../../src/types/asset.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB"}

2
node_modules/@paperclipai/shared/dist/types/asset.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=asset.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"asset.js","sourceRoot":"","sources":["../../src/types/asset.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,86 @@
import type { BudgetIncidentResolutionAction, BudgetIncidentStatus, BudgetMetric, BudgetScopeType, BudgetThresholdType, BudgetWindowKind, PauseReason } from "../constants.js";
export interface BudgetPolicy {
id: string;
companyId: string;
scopeType: BudgetScopeType;
scopeId: string;
metric: BudgetMetric;
windowKind: BudgetWindowKind;
amount: number;
warnPercent: number;
hardStopEnabled: boolean;
notifyEnabled: boolean;
isActive: boolean;
createdByUserId: string | null;
updatedByUserId: string | null;
createdAt: Date;
updatedAt: Date;
}
export interface BudgetPolicySummary {
policyId: string;
companyId: string;
scopeType: BudgetScopeType;
scopeId: string;
scopeName: string;
metric: BudgetMetric;
windowKind: BudgetWindowKind;
amount: number;
observedAmount: number;
remainingAmount: number;
utilizationPercent: number;
warnPercent: number;
hardStopEnabled: boolean;
notifyEnabled: boolean;
isActive: boolean;
status: "ok" | "warning" | "hard_stop";
paused: boolean;
pauseReason: PauseReason | null;
windowStart: Date;
windowEnd: Date;
}
export interface BudgetIncident {
id: string;
companyId: string;
policyId: string;
scopeType: BudgetScopeType;
scopeId: string;
scopeName: string;
metric: BudgetMetric;
windowKind: BudgetWindowKind;
windowStart: Date;
windowEnd: Date;
thresholdType: BudgetThresholdType;
amountLimit: number;
amountObserved: number;
status: BudgetIncidentStatus;
approvalId: string | null;
approvalStatus: string | null;
resolvedAt: Date | null;
createdAt: Date;
updatedAt: Date;
}
export interface BudgetOverview {
companyId: string;
policies: BudgetPolicySummary[];
activeIncidents: BudgetIncident[];
pausedAgentCount: number;
pausedProjectCount: number;
pendingApprovalCount: number;
}
export interface BudgetPolicyUpsertInput {
scopeType: BudgetScopeType;
scopeId: string;
metric?: BudgetMetric;
windowKind?: BudgetWindowKind;
amount: number;
warnPercent?: number;
hardStopEnabled?: boolean;
notifyEnabled?: boolean;
isActive?: boolean;
}
export interface BudgetIncidentResolutionInput {
action: BudgetIncidentResolutionAction;
amount?: number;
decisionNote?: string | null;
}
//# sourceMappingURL=budget.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"budget.d.ts","sourceRoot":"","sources":["../../src/types/budget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,8BAA8B,EAC9B,oBAAoB,EACpB,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACZ,MAAM,iBAAiB,CAAC;AAEzB,MAA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,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=budget.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"budget.js","sourceRoot":"","sources":["../../src/types/budget.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,276 @@
export interface CompanyPortabilityInclude {
company: boolean;
agents: boolean;
projects: boolean;
issues: boolean;
skills: boolean;
}
export interface CompanyPortabilityEnvInput {
key: string;
description: string | null;
agentSlug: string | null;
kind: "secret" | "plain";
requirement: "required" | "optional";
defaultValue: string | null;
portability: "portable" | "system_dependent";
}
export type CompanyPortabilityFileEntry = string | {
encoding: "base64";
data: string;
contentType?: string | null;
};
export interface CompanyPortabilityCompanyManifestEntry {
path: string;
name: string;
description: string | null;
brandColor: string | null;
logoPath: string | null;
requireBoardApprovalForNewAgents: boolean;
}
export interface CompanyPortabilitySidebarOrder {
agents: string[];
projects: string[];
}
export interface CompanyPortabilityProjectManifestEntry {
slug: string;
name: string;
path: string;
description: string | null;
ownerAgentSlug: string | null;
leadAgentSlug: string | null;
targetDate: string | null;
color: string | null;
status: string | null;
executionWorkspacePolicy: Record<string, unknown> | null;
workspaces: CompanyPortabilityProjectWorkspaceManifestEntry[];
metadata: Record<string, unknown> | null;
}
export interface CompanyPortabilityProjectWorkspaceManifestEntry {
key: string;
name: string;
sourceType: string | null;
repoUrl: string | null;
repoRef: string | null;
defaultRef: string | null;
visibility: string | null;
setupCommand: string | null;
cleanupCommand: string | null;
metadata: Record<string, unknown> | null;
isPrimary: boolean;
}
export interface CompanyPortabilityIssueRoutineTriggerManifestEntry {
kind: string;
label: string | null;
enabled: boolean;
cronExpression: string | null;
timezone: string | null;
signingMode: string | null;
replayWindowSec: number | null;
}
export interface CompanyPortabilityIssueRoutineManifestEntry {
concurrencyPolicy: string | null;
catchUpPolicy: string | null;
triggers: CompanyPortabilityIssueRoutineTriggerManifestEntry[];
}
export interface CompanyPortabilityIssueManifestEntry {
slug: string;
identifier: string | null;
title: string;
path: string;
projectSlug: string | null;
projectWorkspaceKey: string | null;
assigneeAgentSlug: string | null;
description: string | null;
recurring: boolean;
routine: CompanyPortabilityIssueRoutineManifestEntry | null;
legacyRecurrence: Record<string, unknown> | null;
status: string | null;
priority: string | null;
labelIds: string[];
billingCode: string | null;
executionWorkspaceSettings: Record<string, unknown> | null;
assigneeAdapterOverrides: Record<string, unknown> | null;
metadata: Record<string, unknown> | null;
}
export interface CompanyPortabilityAgentManifestEntry {
slug: string;
name: string;
path: string;
skills: string[];
role: string;
title: string | null;
icon: string | null;
capabilities: string | null;
reportsToSlug: string | null;
adapterType: string;
adapterConfig: Record<string, unknown>;
runtimeConfig: Record<string, unknown>;
permissions: Record<string, unknown>;
budgetMonthlyCents: number;
metadata: Record<string, unknown> | null;
}
export interface CompanyPortabilitySkillManifestEntry {
key: string;
slug: string;
name: string;
path: string;
description: string | null;
sourceType: string;
sourceLocator: string | null;
sourceRef: string | null;
trustLevel: string | null;
compatibility: string | null;
metadata: Record<string, unknown> | null;
fileInventory: Array<{
path: string;
kind: string;
}>;
}
export interface CompanyPortabilityManifest {
schemaVersion: number;
generatedAt: string;
source: {
companyId: string;
companyName: string;
} | null;
includes: CompanyPortabilityInclude;
company: CompanyPortabilityCompanyManifestEntry | null;
sidebar: CompanyPortabilitySidebarOrder | null;
agents: CompanyPortabilityAgentManifestEntry[];
skills: CompanyPortabilitySkillManifestEntry[];
projects: CompanyPortabilityProjectManifestEntry[];
issues: CompanyPortabilityIssueManifestEntry[];
envInputs: CompanyPortabilityEnvInput[];
}
export interface CompanyPortabilityExportResult {
rootPath: string;
manifest: CompanyPortabilityManifest;
files: Record<string, CompanyPortabilityFileEntry>;
warnings: string[];
paperclipExtensionPath: string;
}
export interface CompanyPortabilityExportPreviewFile {
path: string;
kind: "company" | "agent" | "skill" | "project" | "issue" | "extension" | "readme" | "other";
}
export interface CompanyPortabilityExportPreviewResult {
rootPath: string;
manifest: CompanyPortabilityManifest;
files: Record<string, CompanyPortabilityFileEntry>;
fileInventory: CompanyPortabilityExportPreviewFile[];
counts: {
files: number;
agents: number;
skills: number;
projects: number;
issues: number;
};
warnings: string[];
paperclipExtensionPath: string;
}
export type CompanyPortabilitySource = {
type: "inline";
rootPath?: string | null;
files: Record<string, CompanyPortabilityFileEntry>;
} | {
type: "github";
url: string;
};
export type CompanyPortabilityImportTarget = {
mode: "new_company";
newCompanyName?: string | null;
} | {
mode: "existing_company";
companyId: string;
};
export type CompanyPortabilityAgentSelection = "all" | string[];
export type CompanyPortabilityCollisionStrategy = "rename" | "skip" | "replace";
export interface CompanyPortabilityPreviewRequest {
source: CompanyPortabilitySource;
include?: Partial<CompanyPortabilityInclude>;
target: CompanyPortabilityImportTarget;
agents?: CompanyPortabilityAgentSelection;
collisionStrategy?: CompanyPortabilityCollisionStrategy;
nameOverrides?: Record<string, string>;
selectedFiles?: string[];
}
export interface CompanyPortabilityPreviewAgentPlan {
slug: string;
action: "create" | "update" | "skip";
plannedName: string;
existingAgentId: string | null;
reason: string | null;
}
export interface CompanyPortabilityPreviewProjectPlan {
slug: string;
action: "create" | "update" | "skip";
plannedName: string;
existingProjectId: string | null;
reason: string | null;
}
export interface CompanyPortabilityPreviewIssuePlan {
slug: string;
action: "create" | "skip";
plannedTitle: string;
reason: string | null;
}
export interface CompanyPortabilityPreviewResult {
include: CompanyPortabilityInclude;
targetCompanyId: string | null;
targetCompanyName: string | null;
collisionStrategy: CompanyPortabilityCollisionStrategy;
selectedAgentSlugs: string[];
plan: {
companyAction: "none" | "create" | "update";
agentPlans: CompanyPortabilityPreviewAgentPlan[];
projectPlans: CompanyPortabilityPreviewProjectPlan[];
issuePlans: CompanyPortabilityPreviewIssuePlan[];
};
manifest: CompanyPortabilityManifest;
files: Record<string, CompanyPortabilityFileEntry>;
envInputs: CompanyPortabilityEnvInput[];
warnings: string[];
errors: string[];
}
export interface CompanyPortabilityAdapterOverride {
adapterType: string;
adapterConfig?: Record<string, unknown>;
}
export interface CompanyPortabilityImportRequest extends CompanyPortabilityPreviewRequest {
adapterOverrides?: Record<string, CompanyPortabilityAdapterOverride>;
}
export interface CompanyPortabilityImportResult {
company: {
id: string;
name: string;
action: "created" | "updated" | "unchanged";
};
agents: {
slug: string;
id: string | null;
action: "created" | "updated" | "skipped";
name: string;
reason: string | null;
}[];
projects: {
slug: string;
id: string | null;
action: "created" | "updated" | "skipped";
name: string;
reason: string | null;
}[];
envInputs: CompanyPortabilityEnvInput[];
warnings: string[];
}
export interface CompanyPortabilityExportRequest {
include?: Partial<CompanyPortabilityInclude>;
agents?: string[];
skills?: string[];
projects?: string[];
issues?: string[];
projectIssues?: string[];
selectedFiles?: string[];
expandReferencedSkills?: boolean;
sidebarOrder?: Partial<CompanyPortabilitySidebarOrder>;
}
//# sourceMappingURL=company-portability.d.ts.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=company-portability.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"company-portability.js","sourceRoot":"","sources":["../../src/types/company-portability.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,135 @@
export type CompanySkillSourceType = "local_path" | "github" | "url" | "catalog" | "skills_sh";
export type CompanySkillTrustLevel = "markdown_only" | "assets" | "scripts_executables";
export type CompanySkillCompatibility = "compatible" | "unknown" | "invalid";
export type CompanySkillSourceBadge = "paperclip" | "github" | "local" | "url" | "catalog" | "skills_sh";
export interface CompanySkillFileInventoryEntry {
path: string;
kind: "skill" | "markdown" | "reference" | "script" | "asset" | "other";
}
export interface CompanySkill {
id: string;
companyId: string;
key: string;
slug: string;
name: string;
description: string | null;
markdown: string;
sourceType: CompanySkillSourceType;
sourceLocator: string | null;
sourceRef: string | null;
trustLevel: CompanySkillTrustLevel;
compatibility: CompanySkillCompatibility;
fileInventory: CompanySkillFileInventoryEntry[];
metadata: Record<string, unknown> | null;
createdAt: Date;
updatedAt: Date;
}
export interface CompanySkillListItem {
id: string;
companyId: string;
key: string;
slug: string;
name: string;
description: string | null;
sourceType: CompanySkillSourceType;
sourceLocator: string | null;
sourceRef: string | null;
trustLevel: CompanySkillTrustLevel;
compatibility: CompanySkillCompatibility;
fileInventory: CompanySkillFileInventoryEntry[];
createdAt: Date;
updatedAt: Date;
attachedAgentCount: number;
editable: boolean;
editableReason: string | null;
sourceLabel: string | null;
sourceBadge: CompanySkillSourceBadge;
sourcePath: string | null;
}
export interface CompanySkillUsageAgent {
id: string;
name: string;
urlKey: string;
adapterType: string;
desired: boolean;
actualState: string | null;
}
export interface CompanySkillDetail extends CompanySkill {
attachedAgentCount: number;
usedByAgents: CompanySkillUsageAgent[];
editable: boolean;
editableReason: string | null;
sourceLabel: string | null;
sourceBadge: CompanySkillSourceBadge;
sourcePath: string | null;
}
export interface CompanySkillUpdateStatus {
supported: boolean;
reason: string | null;
trackingRef: string | null;
currentRef: string | null;
latestRef: string | null;
hasUpdate: boolean;
}
export interface CompanySkillImportRequest {
source: string;
}
export interface CompanySkillImportResult {
imported: CompanySkill[];
warnings: string[];
}
export interface CompanySkillProjectScanRequest {
projectIds?: string[];
workspaceIds?: string[];
}
export interface CompanySkillProjectScanSkipped {
projectId: string;
projectName: string;
workspaceId: string | null;
workspaceName: string | null;
path: string | null;
reason: string;
}
export interface CompanySkillProjectScanConflict {
slug: string;
key: string;
projectId: string;
projectName: string;
workspaceId: string;
workspaceName: string;
path: string;
existingSkillId: string;
existingSkillKey: string;
existingSourceLocator: string | null;
reason: string;
}
export interface CompanySkillProjectScanResult {
scannedProjects: number;
scannedWorkspaces: number;
discovered: number;
imported: CompanySkill[];
updated: CompanySkill[];
skipped: CompanySkillProjectScanSkipped[];
conflicts: CompanySkillProjectScanConflict[];
warnings: string[];
}
export interface CompanySkillCreateRequest {
name: string;
slug?: string | null;
description?: string | null;
markdown?: string | null;
}
export interface CompanySkillFileDetail {
skillId: string;
path: string;
kind: CompanySkillFileInventoryEntry["kind"];
content: string;
language: string | null;
markdown: boolean;
editable: boolean;
}
export interface CompanySkillFileUpdateRequest {
path: string;
content: string;
}
//# sourceMappingURL=company-skill.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"company-skill.d.ts","sourceRoot":"","sources":["../../src/types/company-skill.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,WAAW,CAAC;AAE/F,MAAM,MAAM,sBAAsB,GAAG,eAAe,GAAG,QAAQ,GAAG,qBAAqB,CAAC;AAExF,MAAM,MAAM,yBAAyB,GAAG,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC;AAE7E,MAAM,MAAM,uBAAuB,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,GAAG,WAAW,CAAC;AAEzG,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;CACzE;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,sBAAsB,CAAC;IACnC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,sBAAsB,CAAC;IACnC,aAAa,EAAE,yBAAyB,CAAC;IACzC,aAAa,EAAE,8BAA8B,EAAE,CAAC;IAChD,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAA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IAAI,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,6BAA6B;IAC5C,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,OAAO,EAAE,8BAA8B,EAAE,CAAC;IAC1C,SAAS,EAAE,+BAA+B,EAAE,CAAC;IAC7C,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,8BAA8B,CAAC,MAAM,CAAC,CAAC;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=company-skill.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"company-skill.js","sourceRoot":"","sources":["../../src/types/company-skill.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,20 @@
import type { CompanyStatus, PauseReason } from "../constants.js";
export interface Company {
id: string;
name: string;
description: string | null;
status: CompanyStatus;
pauseReason: PauseReason | null;
pausedAt: Date | null;
issuePrefix: string;
issueCounter: number;
budgetMonthlyCents: number;
spentMonthlyCents: number;
requireBoardApprovalForNewAgents: boolean;
brandColor: string | null;
logoAssetId: string | null;
logoUrl: string | null;
createdAt: Date;
updatedAt: Date;
}
//# sourceMappingURL=company.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"company.d.ts","sourceRoot":"","sources":["../../src/types/company.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAElE,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gCAAgC,EAAE,OAAO,CAAC;IAC1C,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=company.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"company.js","sourceRoot":"","sources":["../../src/types/company.ts"],"names":[],"mappings":""}

106
node_modules/@paperclipai/shared/dist/types/cost.d.ts generated vendored Normal file
View File

@@ -0,0 +1,106 @@
import type { BillingType } from "../constants.js";
export interface CostEvent {
id: string;
companyId: string;
agentId: string;
issueId: string | null;
projectId: string | null;
goalId: string | null;
heartbeatRunId: string | null;
billingCode: string | null;
provider: string;
biller: string;
billingType: BillingType;
model: string;
inputTokens: number;
cachedInputTokens: number;
outputTokens: number;
costCents: number;
occurredAt: Date;
createdAt: Date;
}
export interface CostSummary {
companyId: string;
spendCents: number;
budgetCents: number;
utilizationPercent: number;
}
export interface CostByAgent {
agentId: string;
agentName: string | null;
agentStatus: string | null;
costCents: number;
inputTokens: number;
cachedInputTokens: number;
outputTokens: number;
apiRunCount: number;
subscriptionRunCount: number;
subscriptionCachedInputTokens: number;
subscriptionInputTokens: number;
subscriptionOutputTokens: number;
}
export interface CostByProviderModel {
provider: string;
biller: string;
billingType: BillingType;
model: string;
costCents: number;
inputTokens: number;
cachedInputTokens: number;
outputTokens: number;
apiRunCount: number;
subscriptionRunCount: number;
subscriptionCachedInputTokens: number;
subscriptionInputTokens: number;
subscriptionOutputTokens: number;
}
export interface CostByBiller {
biller: string;
costCents: number;
inputTokens: number;
cachedInputTokens: number;
outputTokens: number;
apiRunCount: number;
subscriptionRunCount: number;
subscriptionCachedInputTokens: number;
subscriptionInputTokens: number;
subscriptionOutputTokens: number;
providerCount: number;
modelCount: number;
}
/** per-agent breakdown by provider + model, for identifying token-hungry agents */
export interface CostByAgentModel {
agentId: string;
agentName: string | null;
provider: string;
biller: string;
billingType: BillingType;
model: string;
costCents: number;
inputTokens: number;
cachedInputTokens: number;
outputTokens: number;
}
/** spend per provider for a fixed rolling time window */
export interface CostWindowSpendRow {
provider: string;
biller: string;
/** duration label, e.g. "5h", "24h", "7d" */
window: string;
/** rolling window duration in hours */
windowHours: number;
costCents: number;
inputTokens: number;
cachedInputTokens: number;
outputTokens: number;
}
/** cost attributed to a project via heartbeat run → activity log → issue → project chain */
export interface CostByProject {
projectId: string | null;
projectName: string | null;
costCents: number;
inputTokens: number;
cachedInputTokens: number;
outputTokens: number;
}
//# sourceMappingURL=cost.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../src/types/cost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,E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,yDAAyD;AACzD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,4FAA4F;AAC5F,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;CACtB"}

2
node_modules/@paperclipai/shared/dist/types/cost.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=cost.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"cost.js","sourceRoot":"","sources":["../../src/types/cost.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,28 @@
export interface DashboardSummary {
companyId: string;
agents: {
active: number;
running: number;
paused: number;
error: number;
};
tasks: {
open: number;
inProgress: number;
blocked: number;
done: number;
};
costs: {
monthSpendCents: number;
monthBudgetCents: number;
monthUtilizationPercent: number;
};
pendingApprovals: number;
budgets: {
activeIncidents: number;
pendingApprovals: number;
pausedAgents: number;
pausedProjects: number;
};
}
//# sourceMappingURL=dashboard.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../src/types/dashboard.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,KAAK,EAAE;QACL,eAAe,EAAE,MAAM,CAAC;QACxB,gBAAgB,EAAE,MAAM,CAAC;QACzB,uBAAuB,EAAE,MAAM,CAAC;KACjC,CAAC;IACF,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE;QACP,eAAe,EAAE,MAAM,CAAC;QACxB,gBAAgB,EAAE,MAAM,CAAC;QACzB,YAAY,EAAE,MAAM,CAAC;QACrB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;CACH"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=dashboard.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../src/types/dashboard.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,57 @@
import type { AgentAdapterType, FinanceDirection, FinanceEventKind, FinanceUnit } from "../constants.js";
export interface FinanceEvent {
id: string;
companyId: string;
agentId: string | null;
issueId: string | null;
projectId: string | null;
goalId: string | null;
heartbeatRunId: string | null;
costEventId: string | null;
billingCode: string | null;
description: string | null;
eventKind: FinanceEventKind;
direction: FinanceDirection;
biller: string;
provider: string | null;
executionAdapterType: AgentAdapterType | null;
pricingTier: string | null;
region: string | null;
model: string | null;
quantity: number | null;
unit: FinanceUnit | null;
amountCents: number;
currency: string;
estimated: boolean;
externalInvoiceId: string | null;
metadataJson: Record<string, unknown> | null;
occurredAt: Date;
createdAt: Date;
}
export interface FinanceSummary {
companyId: string;
debitCents: number;
creditCents: number;
netCents: number;
estimatedDebitCents: number;
eventCount: number;
}
export interface FinanceByBiller {
biller: string;
debitCents: number;
creditCents: number;
netCents: number;
estimatedDebitCents: number;
eventCount: number;
kindCount: number;
}
export interface FinanceByKind {
eventKind: FinanceEventKind;
debitCents: number;
creditCents: number;
netCents: number;
estimatedDebitCents: number;
eventCount: number;
billerCount: number;
}
//# sourceMappingURL=finance.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"finance.d.ts","sourceRoot":"","sources":["../../src/types/finance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEzG,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,gBAAgB,CAAC;IAC5B,SAAS,EAAE,gBAAgB,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,oBAAoB,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC9C,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC7C,UAAU,EAAE,IAAI,CAAC;IACjB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,gBAAgB,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=finance.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"finance.js","sourceRoot":"","sources":["../../src/types/finance.ts"],"names":[],"mappings":""}

14
node_modules/@paperclipai/shared/dist/types/goal.d.ts generated vendored Normal file
View File

@@ -0,0 +1,14 @@
import type { GoalLevel, GoalStatus } from "../constants.js";
export interface Goal {
id: string;
companyId: string;
title: string;
description: string | null;
level: GoalLevel;
status: GoalStatus;
parentId: string | null;
ownerAgentId: string | null;
createdAt: Date;
updatedAt: Date;
}
//# sourceMappingURL=goal.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"goal.d.ts","sourceRoot":"","sources":["../../src/types/goal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB"}

2
node_modules/@paperclipai/shared/dist/types/goal.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=goal.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"goal.js","sourceRoot":"","sources":["../../src/types/goal.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,118 @@
import type { AgentRole, AgentStatus, HeartbeatInvocationSource, HeartbeatRunStatus, WakeupTriggerDetail, WakeupRequestStatus } from "../constants.js";
export interface HeartbeatRun {
id: string;
companyId: string;
agentId: string;
invocationSource: HeartbeatInvocationSource;
triggerDetail: WakeupTriggerDetail | null;
status: HeartbeatRunStatus;
startedAt: Date | null;
finishedAt: Date | null;
error: string | null;
wakeupRequestId: string | null;
exitCode: number | null;
signal: string | null;
usageJson: Record<string, unknown> | null;
resultJson: Record<string, unknown> | null;
sessionIdBefore: string | null;
sessionIdAfter: string | null;
logStore: string | null;
logRef: string | null;
logBytes: number | null;
logSha256: string | null;
logCompressed: boolean;
stdoutExcerpt: string | null;
stderrExcerpt: string | null;
errorCode: string | null;
externalRunId: string | null;
processPid: number | null;
processStartedAt: Date | null;
retryOfRunId: string | null;
processLossRetryCount: number;
contextSnapshot: Record<string, unknown> | null;
createdAt: Date;
updatedAt: Date;
}
export interface HeartbeatRunEvent {
id: number;
companyId: string;
runId: string;
agentId: string;
seq: number;
eventType: string;
stream: "system" | "stdout" | "stderr" | null;
level: "info" | "warn" | "error" | null;
color: string | null;
message: string | null;
payload: Record<string, unknown> | null;
createdAt: Date;
}
export interface AgentRuntimeState {
agentId: string;
companyId: string;
adapterType: string;
sessionId: string | null;
sessionDisplayId?: string | null;
sessionParamsJson?: Record<string, unknown> | null;
stateJson: Record<string, unknown>;
lastRunId: string | null;
lastRunStatus: string | null;
totalInputTokens: number;
totalOutputTokens: number;
totalCachedInputTokens: number;
totalCostCents: number;
lastError: string | null;
createdAt: Date;
updatedAt: Date;
}
export interface AgentTaskSession {
id: string;
companyId: string;
agentId: string;
adapterType: string;
taskKey: string;
sessionParamsJson: Record<string, unknown> | null;
sessionDisplayId: string | null;
lastRunId: string | null;
lastError: string | null;
createdAt: Date;
updatedAt: Date;
}
export interface AgentWakeupRequest {
id: string;
companyId: string;
agentId: string;
source: HeartbeatInvocationSource;
triggerDetail: WakeupTriggerDetail | null;
reason: string | null;
payload: Record<string, unknown> | null;
status: WakeupRequestStatus;
coalescedCount: number;
requestedByActorType: "user" | "agent" | "system" | null;
requestedByActorId: string | null;
idempotencyKey: string | null;
runId: string | null;
requestedAt: Date;
claimedAt: Date | null;
finishedAt: Date | null;
error: string | null;
createdAt: Date;
updatedAt: Date;
}
export interface InstanceSchedulerHeartbeatAgent {
id: string;
companyId: string;
companyName: string;
companyIssuePrefix: string;
agentName: string;
agentUrlKey: string;
role: AgentRole;
title: string | null;
status: AgentStatus;
adapterType: string;
intervalSec: number;
heartbeatEnabled: boolean;
schedulerActive: boolean;
lastHeartbeatAt: Date | null;
}
//# sourceMappingURL=heartbeat.d.ts.map

View File

@@ -0,0 +1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BAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,IAAI,CAAC;IAClB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,+BAA+B;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,WAAW,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;IACzB,eAAe,EAAE,IAAI,GAAG,IAAI,CAAC;CAC9B"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=heartbeat.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"heartbeat.js","sourceRoot":"","sources":["../../src/types/heartbeat.ts"],"names":[],"mappings":""}

28
node_modules/@paperclipai/shared/dist/types/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,28 @@
export type { Company } from "./company.js";
export type { InstanceExperimentalSettings, InstanceGeneralSettings, InstanceSettings } from "./instance.js";
export type { CompanySkillSourceType, CompanySkillTrustLevel, CompanySkillCompatibility, CompanySkillSourceBadge, CompanySkillFileInventoryEntry, CompanySkill, CompanySkillListItem, CompanySkillUsageAgent, CompanySkillDetail, CompanySkillUpdateStatus, CompanySkillImportRequest, CompanySkillImportResult, CompanySkillProjectScanRequest, CompanySkillProjectScanSkipped, CompanySkillProjectScanConflict, CompanySkillProjectScanResult, CompanySkillCreateRequest, CompanySkillFileDetail, CompanySkillFileUpdateRequest, } from "./company-skill.js";
export type { AgentSkillSyncMode, AgentSkillState, AgentSkillOrigin, AgentSkillEntry, AgentSkillSnapshot, AgentSkillSyncRequest, } from "./adapter-skills.js";
export type { Agent, AgentAccessState, AgentChainOfCommandEntry, AgentDetail, AgentPermissions, AgentInstructionsBundleMode, AgentInstructionsFileSummary, AgentInstructionsFileDetail, AgentInstructionsBundle, AgentKeyCreated, AgentConfigRevision, AdapterEnvironmentCheckLevel, AdapterEnvironmentTestStatus, AdapterEnvironmentCheck, AdapterEnvironmentTestResult, } from "./agent.js";
export type { AssetImage } from "./asset.js";
export type { Project, ProjectCodebase, ProjectCodebaseOrigin, ProjectGoalRef, ProjectWorkspace } from "./project.js";
export type { ExecutionWorkspace, WorkspaceRuntimeService, ExecutionWorkspaceStrategyType, ExecutionWorkspaceMode, ExecutionWorkspaceProviderType, ExecutionWorkspaceStatus, ExecutionWorkspaceStrategy, ProjectExecutionWorkspacePolicy, ProjectExecutionWorkspaceDefaultMode, IssueExecutionWorkspaceSettings, } from "./workspace-runtime.js";
export type { WorkspaceOperation, WorkspaceOperationPhase, WorkspaceOperationStatus, } from "./workspace-operation.js";
export type { IssueWorkProduct, IssueWorkProductType, IssueWorkProductProvider, IssueWorkProductStatus, IssueWorkProductReviewState, } from "./work-product.js";
export type { Issue, IssueAssigneeAdapterOverrides, IssueComment, IssueDocument, IssueDocumentSummary, DocumentRevision, DocumentFormat, LegacyPlanDocument, IssueAncestor, IssueAncestorProject, IssueAncestorGoal, IssueAttachment, IssueLabel, } from "./issue.js";
export type { Goal } from "./goal.js";
export type { Approval, ApprovalComment } from "./approval.js";
export type { BudgetPolicy, BudgetPolicySummary, BudgetIncident, BudgetOverview, BudgetPolicyUpsertInput, BudgetIncidentResolutionInput, } from "./budget.js";
export type { SecretProvider, SecretVersionSelector, EnvPlainBinding, EnvSecretRefBinding, EnvBinding, AgentEnvConfig, CompanySecret, SecretProviderDescriptor, } from "./secrets.js";
export type { Routine, RoutineTrigger, RoutineRun, RoutineTriggerSecretMaterial, RoutineDetail, RoutineRunSummary, RoutineExecutionIssueOrigin, RoutineListItem, } from "./routine.js";
export type { CostEvent, CostSummary, CostByAgent, CostByProviderModel, CostByBiller, CostByAgentModel, CostWindowSpendRow, CostByProject } from "./cost.js";
export type { FinanceEvent, FinanceSummary, FinanceByBiller, FinanceByKind } from "./finance.js";
export type { HeartbeatRun, HeartbeatRunEvent, AgentRuntimeState, AgentTaskSession, AgentWakeupRequest, InstanceSchedulerHeartbeatAgent, } from "./heartbeat.js";
export type { LiveEvent } from "./live.js";
export type { DashboardSummary } from "./dashboard.js";
export type { ActivityEvent } from "./activity.js";
export type { SidebarBadges } from "./sidebar-badges.js";
export type { CompanyMembership, PrincipalPermissionGrant, Invite, JoinRequest, InstanceUserRoleGrant, } from "./access.js";
export type { QuotaWindow, ProviderQuotaResult } from "./quota.js";
export type { CompanyPortabilityInclude, CompanyPortabilityEnvInput, CompanyPortabilityFileEntry, CompanyPortabilityCompanyManifestEntry, CompanyPortabilitySidebarOrder, CompanyPortabilityAgentManifestEntry, CompanyPortabilitySkillManifestEntry, CompanyPortabilityProjectManifestEntry, CompanyPortabilityProjectWorkspaceManifestEntry, CompanyPortabilityIssueRoutineTriggerManifestEntry, CompanyPortabilityIssueRoutineManifestEntry, CompanyPortabilityIssueManifestEntry, CompanyPortabilityManifest, CompanyPortabilityExportResult, CompanyPortabilityExportPreviewFile, CompanyPortabilityExportPreviewResult, CompanyPortabilitySource, CompanyPortabilityImportTarget, CompanyPortabilityAgentSelection, CompanyPortabilityCollisionStrategy, CompanyPortabilityPreviewRequest, CompanyPortabilityPreviewAgentPlan, CompanyPortabilityPreviewProjectPlan, CompanyPortabilityPreviewIssuePlan, CompanyPortabilityPreviewResult, CompanyPortabilityAdapterOverride, CompanyPortabilityImportRequest, CompanyPortabilityImportResult, CompanyPortabilityExportRequest, } from "./company-portability.js";
export type { JsonSchema, PluginJobDeclaration, PluginWebhookDeclaration, PluginToolDeclaration, PluginUiSlotDeclaration, PluginLauncherActionDeclaration, PluginLauncherRenderDeclaration, PluginLauncherRenderContextSnapshot, PluginLauncherDeclaration, PluginMinimumHostVersion, PluginUiDeclaration, PaperclipPluginManifestV1, PluginRecord, PluginStateRecord, PluginConfig, PluginEntityRecord, PluginEntityQuery, PluginJobRecord, PluginJobRunRecord, PluginWebhookDeliveryRecord, } from "./plugin.js";
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,YAAY,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC7G,YAAY,EACV,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,8BAA8B,EAC9B,YAAY,EACZ,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EAClB,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,8BAA8B,EAC9B,8BAA8B,EAC9B,+BAA+B,EAC/B,6BAA6B,EAC7B,yBAAyB,EACzB,sBAAsB,EACtB,6BAA6B,GAC9B,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,KAAK,EACL,gBAAgB,EAChB,wBAAwB,EACxB,WAAW,EACX,gBAAgB,EAChB,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC3B,uBAAuB,EACvB,eAAe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,+BAA+B,GAChC,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,UAAU,EACV,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,+BAA+B,EAC/B,+BAA+B,EAC/B,mCAAmC,EACnC,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EACzB,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,aAAa,CAAC"}

2
node_modules/@paperclipai/shared/dist/types/index.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,15 @@
export interface InstanceGeneralSettings {
censorUsernameInLogs: boolean;
}
export interface InstanceExperimentalSettings {
enableIsolatedWorkspaces: boolean;
autoRestartDevServerWhenIdle: boolean;
}
export interface InstanceSettings {
id: string;
general: InstanceGeneralSettings;
experimental: InstanceExperimentalSettings;
createdAt: Date;
updatedAt: Date;
}
//# sourceMappingURL=instance.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"instance.d.ts","sourceRoot":"","sources":["../../src/types/instance.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,4BAA4B;IAC3C,wBAAwB,EAAE,OAAO,CAAC;IAClC,4BAA4B,EAAE,OAAO,CAAC;CACvC;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,uBAAuB,CAAC;IACjC,YAAY,EAAE,4BAA4B,CAAC;IAC3C,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=instance.js.map

Some files were not shown because too many files have changed in this diff Show More