@prave/shared 1.4.6 → 1.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/schemas/api-keys.schema.d.ts +2 -2
- package/dist/schemas/billing.schema.d.ts +7 -7
- package/dist/schemas/billing.schema.d.ts.map +1 -1
- package/dist/schemas/billing.schema.js +2 -2
- package/dist/schemas/index.d.ts +0 -9
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +0 -9
- package/dist/schemas/install.schema.d.ts +4 -4
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/plan-limits.d.ts +26 -73
- package/dist/types/plan-limits.d.ts.map +1 -1
- package/dist/types/plan-limits.js +33 -69
- package/package.json +1 -1
- package/dist/schemas/credits.schema.d.ts +0 -73
- package/dist/schemas/credits.schema.d.ts.map +0 -1
- package/dist/schemas/credits.schema.js +0 -52
- package/dist/schemas/kv.schema.d.ts +0 -56
- package/dist/schemas/kv.schema.d.ts.map +0 -1
- package/dist/schemas/kv.schema.js +0 -39
- package/dist/schemas/run.schema.d.ts +0 -509
- package/dist/schemas/run.schema.d.ts.map +0 -1
- package/dist/schemas/run.schema.js +0 -192
- package/dist/schemas/sdk.schema.d.ts +0 -51
- package/dist/schemas/sdk.schema.d.ts.map +0 -1
- package/dist/schemas/sdk.schema.js +0 -36
- package/dist/schemas/skill-pr.schema.d.ts +0 -544
- package/dist/schemas/skill-pr.schema.d.ts.map +0 -1
- package/dist/schemas/skill-pr.schema.js +0 -87
- package/dist/schemas/skill-test.schema.d.ts +0 -60
- package/dist/schemas/skill-test.schema.d.ts.map +0 -1
- package/dist/schemas/skill-test.schema.js +0 -25
- package/dist/schemas/skill-version.schema.d.ts +0 -69
- package/dist/schemas/skill-version.schema.d.ts.map +0 -1
- package/dist/schemas/skill-version.schema.js +0 -21
- package/dist/schemas/vault.schema.d.ts +0 -54
- package/dist/schemas/vault.schema.d.ts.map +0 -1
- package/dist/schemas/vault.schema.js +0 -39
- package/dist/schemas/webhook-endpoint.schema.d.ts +0 -161
- package/dist/schemas/webhook-endpoint.schema.d.ts.map +0 -1
- package/dist/schemas/webhook-endpoint.schema.js +0 -74
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* Credit-pack catalog. One-time purchases that top up
|
|
4
|
-
* `profiles.tester_credits_balance`. Prices are denominated in USD now
|
|
5
|
-
* (the `price_eur` field name kept for column-rename safety — Stripe
|
|
6
|
-
* still treats it as the gross USD amount, see stripe-seed.ts).
|
|
7
|
-
*
|
|
8
|
-
* Margin: Haiku 4.5 worst-case = ~$0.013 per Tester run = ~$0.0026 per
|
|
9
|
-
* credit. We charge $0.10–$0.12 per credit on top-ups, ~40-45× markup,
|
|
10
|
-
* which keeps the per-credit price *higher* than any subscription
|
|
11
|
-
* average so power-users always come out ahead by upgrading.
|
|
12
|
-
*/
|
|
13
|
-
export const CREDIT_PACK_IDS = ['pack_25', 'pack_100'];
|
|
14
|
-
export const creditPackIdSchema = z.enum(CREDIT_PACK_IDS);
|
|
15
|
-
/**
|
|
16
|
-
* Two top-up tiers — entry and refill. Per-credit price stays *higher*
|
|
17
|
-
* than the subscription effective rates so a heavy user always saves
|
|
18
|
-
* by upgrading instead of hoarding top-ups.
|
|
19
|
-
*
|
|
20
|
-
* Margin (per pack, full burn):
|
|
21
|
-
* pack_25 ($3): ~$0.07 API + ~$0.39 Stripe = $0.46 cost. Net ~$2.54 (85%).
|
|
22
|
-
* pack_100 ($10): ~$0.26 API + ~$0.59 Stripe = $0.85 cost. Net ~$9.15 (92%).
|
|
23
|
-
* Both safely positive even on worst-case burn.
|
|
24
|
-
*/
|
|
25
|
-
export const CREDIT_PACKS = {
|
|
26
|
-
pack_25: {
|
|
27
|
-
id: 'pack_25',
|
|
28
|
-
credits: 25,
|
|
29
|
-
price_eur: 3,
|
|
30
|
-
blurb: 'Quick top-up when you hit the wall.',
|
|
31
|
-
},
|
|
32
|
-
pack_100: {
|
|
33
|
-
id: 'pack_100',
|
|
34
|
-
credits: 100,
|
|
35
|
-
price_eur: 10,
|
|
36
|
-
blurb: 'Best value for active builders.',
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
export const creditCheckoutInputSchema = z.object({
|
|
40
|
-
pack: creditPackIdSchema,
|
|
41
|
-
});
|
|
42
|
-
export const creditBalanceSchema = z.object({
|
|
43
|
-
monthly_quota: z.number().int().nonnegative(),
|
|
44
|
-
monthly_used: z.number().int().nonnegative(),
|
|
45
|
-
monthly_remaining: z.number().int().nonnegative(),
|
|
46
|
-
/** Purchased top-up balance (never expires). */
|
|
47
|
-
balance: z.number().int().nonnegative(),
|
|
48
|
-
/** Total credits available right now (monthly_remaining + balance). */
|
|
49
|
-
total_available: z.number().int().nonnegative(),
|
|
50
|
-
/** ISO timestamp when the monthly window resets. */
|
|
51
|
-
resets_at: z.string().datetime(),
|
|
52
|
-
});
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* KV — per-run persistent key/value store, encrypted at rest.
|
|
4
|
-
*
|
|
5
|
-
* Lives in the `run_kv` table. Each row is scoped to a single `run_id`;
|
|
6
|
-
* RLS for dashboard reads, JWT-scoped service-role for SDK reads.
|
|
7
|
-
*
|
|
8
|
-
* Designed for the canonical "skill exchanged OAuth code → access token,
|
|
9
|
-
* stashes it for the next cron tick" pattern. Values are opaque blobs
|
|
10
|
-
* (we don't introspect them); 64KB per value, optional TTL.
|
|
11
|
-
*/
|
|
12
|
-
export declare const kvKeySchema: z.ZodString;
|
|
13
|
-
export type KvKey = z.infer<typeof kvKeySchema>;
|
|
14
|
-
export declare const kvEntrySchema: z.ZodObject<{
|
|
15
|
-
key: z.ZodString;
|
|
16
|
-
value: z.ZodString;
|
|
17
|
-
size_bytes: z.ZodNumber;
|
|
18
|
-
expires_at: z.ZodNullable<z.ZodString>;
|
|
19
|
-
updated_at: z.ZodString;
|
|
20
|
-
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
value: string;
|
|
22
|
-
size_bytes: number;
|
|
23
|
-
updated_at: string;
|
|
24
|
-
expires_at: string | null;
|
|
25
|
-
key: string;
|
|
26
|
-
}, {
|
|
27
|
-
value: string;
|
|
28
|
-
size_bytes: number;
|
|
29
|
-
updated_at: string;
|
|
30
|
-
expires_at: string | null;
|
|
31
|
-
key: string;
|
|
32
|
-
}>;
|
|
33
|
-
export type KvEntry = z.infer<typeof kvEntrySchema>;
|
|
34
|
-
export declare const kvPutInputSchema: z.ZodObject<{
|
|
35
|
-
value: z.ZodString;
|
|
36
|
-
ttl_seconds: z.ZodOptional<z.ZodNumber>;
|
|
37
|
-
}, "strip", z.ZodTypeAny, {
|
|
38
|
-
value: string;
|
|
39
|
-
ttl_seconds?: number | undefined;
|
|
40
|
-
}, {
|
|
41
|
-
value: string;
|
|
42
|
-
ttl_seconds?: number | undefined;
|
|
43
|
-
}>;
|
|
44
|
-
export type KvPutInput = z.infer<typeof kvPutInputSchema>;
|
|
45
|
-
export declare const kvListQuerySchema: z.ZodObject<{
|
|
46
|
-
prefix: z.ZodOptional<z.ZodString>;
|
|
47
|
-
limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
48
|
-
}, "strip", z.ZodTypeAny, {
|
|
49
|
-
limit?: number | undefined;
|
|
50
|
-
prefix?: string | undefined;
|
|
51
|
-
}, {
|
|
52
|
-
limit?: number | undefined;
|
|
53
|
-
prefix?: string | undefined;
|
|
54
|
-
}>;
|
|
55
|
-
export type KvListQuery = z.infer<typeof kvListQuerySchema>;
|
|
56
|
-
//# sourceMappingURL=kv.schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kv.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/kv.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;;;;GASG;AAMH,eAAO,MAAM,WAAW,aAOrB,CAAA;AACH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAE/C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;EAMxB,CAAA;AACF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAKnD,eAAO,MAAM,gBAAgB;;;;;;;;;EAG3B,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAGzD,eAAO,MAAM,iBAAiB;;;;;;;;;EAG5B,CAAA;AACF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* KV — per-run persistent key/value store, encrypted at rest.
|
|
4
|
-
*
|
|
5
|
-
* Lives in the `run_kv` table. Each row is scoped to a single `run_id`;
|
|
6
|
-
* RLS for dashboard reads, JWT-scoped service-role for SDK reads.
|
|
7
|
-
*
|
|
8
|
-
* Designed for the canonical "skill exchanged OAuth code → access token,
|
|
9
|
-
* stashes it for the next cron tick" pattern. Values are opaque blobs
|
|
10
|
-
* (we don't introspect them); 64KB per value, optional TTL.
|
|
11
|
-
*/
|
|
12
|
-
// Same shape as a URL path-segment with a few "scoped" delimiters so
|
|
13
|
-
// skills can build namespaces (`oauth:tiktok:state`, `queue:pending`).
|
|
14
|
-
// We keep it permissive enough not to surprise users; the colon /
|
|
15
|
-
// dash / dot are common across all KV ecosystems.
|
|
16
|
-
export const kvKeySchema = z
|
|
17
|
-
.string()
|
|
18
|
-
.min(1)
|
|
19
|
-
.max(256)
|
|
20
|
-
.regex(/^[A-Za-z0-9_\-.:]+$/, 'Letters, digits, and any of `_ - . :` — no spaces or slashes.');
|
|
21
|
-
export const kvEntrySchema = z.object({
|
|
22
|
-
key: kvKeySchema,
|
|
23
|
-
value: z.string(),
|
|
24
|
-
size_bytes: z.number().int().nonnegative(),
|
|
25
|
-
expires_at: z.string().datetime().nullable(),
|
|
26
|
-
updated_at: z.string().datetime(),
|
|
27
|
-
});
|
|
28
|
-
// Body for PUT /api/v1/sdk/kv/:key (the SDK route) and PUT
|
|
29
|
-
// /api/v1/runs/:slug/kv/:key (the dashboard debug route). ttlSeconds
|
|
30
|
-
// translates to expires_at = now() + ttlSeconds in the service layer.
|
|
31
|
-
export const kvPutInputSchema = z.object({
|
|
32
|
-
value: z.string().max(65_536),
|
|
33
|
-
ttl_seconds: z.number().int().positive().max(60 * 60 * 24 * 365).optional(),
|
|
34
|
-
});
|
|
35
|
-
// GET list filter — prefix is the only filter supported.
|
|
36
|
-
export const kvListQuerySchema = z.object({
|
|
37
|
-
prefix: z.string().max(256).optional(),
|
|
38
|
-
limit: z.number().int().min(1).max(1_000).default(100).optional(),
|
|
39
|
-
});
|
|
@@ -1,509 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* Run schemas — server-side scheduled Skill executions.
|
|
4
|
-
*
|
|
5
|
-
* The on-disk shape is split across three tables:
|
|
6
|
-
*
|
|
7
|
-
* - `skill_bundles` uploaded project folder (SKILL.md + scripts + .env)
|
|
8
|
-
* - `runs` schedule + agent + status for one deployment
|
|
9
|
-
* - `run_executions` append-only fire-history with logs and tokens
|
|
10
|
-
*
|
|
11
|
-
* (See supabase/migrations/049_runs_and_bundles.sql for the full
|
|
12
|
-
* column-level docstrings.)
|
|
13
|
-
*/
|
|
14
|
-
export declare const runAgentSchema: z.ZodEnum<["claude", "codex", "cursor", "gemini", "cline", "amp"]>;
|
|
15
|
-
export type RunAgent = z.infer<typeof runAgentSchema>;
|
|
16
|
-
export declare const runScheduleKindSchema: z.ZodEnum<["hourly", "daily", "weekly", "monthly", "custom"]>;
|
|
17
|
-
export type RunScheduleKind = z.infer<typeof runScheduleKindSchema>;
|
|
18
|
-
export declare const runStatusSchema: z.ZodEnum<["active", "paused", "failed", "disabled"]>;
|
|
19
|
-
export type RunStatus = z.infer<typeof runStatusSchema>;
|
|
20
|
-
export declare const runExecutionStatusSchema: z.ZodEnum<["running", "success", "failed", "timeout", "cancelled"]>;
|
|
21
|
-
export type RunExecutionStatus = z.infer<typeof runExecutionStatusSchema>;
|
|
22
|
-
export declare const runScheduleInputSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
23
|
-
kind: z.ZodLiteral<"hourly">;
|
|
24
|
-
}, "strip", z.ZodTypeAny, {
|
|
25
|
-
kind: "hourly";
|
|
26
|
-
}, {
|
|
27
|
-
kind: "hourly";
|
|
28
|
-
}>, z.ZodObject<{
|
|
29
|
-
kind: z.ZodLiteral<"daily">;
|
|
30
|
-
time: z.ZodString;
|
|
31
|
-
}, "strip", z.ZodTypeAny, {
|
|
32
|
-
kind: "daily";
|
|
33
|
-
time: string;
|
|
34
|
-
}, {
|
|
35
|
-
kind: "daily";
|
|
36
|
-
time: string;
|
|
37
|
-
}>, z.ZodObject<{
|
|
38
|
-
kind: z.ZodLiteral<"weekly">;
|
|
39
|
-
time: z.ZodString;
|
|
40
|
-
weekday: z.ZodNumber;
|
|
41
|
-
}, "strip", z.ZodTypeAny, {
|
|
42
|
-
kind: "weekly";
|
|
43
|
-
time: string;
|
|
44
|
-
weekday: number;
|
|
45
|
-
}, {
|
|
46
|
-
kind: "weekly";
|
|
47
|
-
time: string;
|
|
48
|
-
weekday: number;
|
|
49
|
-
}>, z.ZodObject<{
|
|
50
|
-
kind: z.ZodLiteral<"monthly">;
|
|
51
|
-
time: z.ZodString;
|
|
52
|
-
day_of_month: z.ZodNumber;
|
|
53
|
-
}, "strip", z.ZodTypeAny, {
|
|
54
|
-
kind: "monthly";
|
|
55
|
-
time: string;
|
|
56
|
-
day_of_month: number;
|
|
57
|
-
}, {
|
|
58
|
-
kind: "monthly";
|
|
59
|
-
time: string;
|
|
60
|
-
day_of_month: number;
|
|
61
|
-
}>, z.ZodObject<{
|
|
62
|
-
kind: z.ZodLiteral<"custom">;
|
|
63
|
-
cron_expr: z.ZodString;
|
|
64
|
-
}, "strip", z.ZodTypeAny, {
|
|
65
|
-
kind: "custom";
|
|
66
|
-
cron_expr: string;
|
|
67
|
-
}, {
|
|
68
|
-
kind: "custom";
|
|
69
|
-
cron_expr: string;
|
|
70
|
-
}>]>;
|
|
71
|
-
export type RunScheduleInput = z.infer<typeof runScheduleInputSchema>;
|
|
72
|
-
export declare const skillBundleSchema: z.ZodObject<{
|
|
73
|
-
id: z.ZodString;
|
|
74
|
-
owner_id: z.ZodString;
|
|
75
|
-
skill_id: z.ZodNullable<z.ZodString>;
|
|
76
|
-
source: z.ZodEnum<["upload", "github"]>;
|
|
77
|
-
tarball_path: z.ZodString;
|
|
78
|
-
manifest: z.ZodArray<z.ZodObject<{
|
|
79
|
-
path: z.ZodString;
|
|
80
|
-
size: z.ZodNumber;
|
|
81
|
-
sha256: z.ZodString;
|
|
82
|
-
kind: z.ZodEnum<["text", "binary", "script"]>;
|
|
83
|
-
}, "strip", z.ZodTypeAny, {
|
|
84
|
-
path: string;
|
|
85
|
-
kind: "text" | "binary" | "script";
|
|
86
|
-
size: number;
|
|
87
|
-
sha256: string;
|
|
88
|
-
}, {
|
|
89
|
-
path: string;
|
|
90
|
-
kind: "text" | "binary" | "script";
|
|
91
|
-
size: number;
|
|
92
|
-
sha256: string;
|
|
93
|
-
}>, "many">;
|
|
94
|
-
total_size_bytes: z.ZodNumber;
|
|
95
|
-
has_scripts: z.ZodBoolean;
|
|
96
|
-
has_env_template: z.ZodBoolean;
|
|
97
|
-
secret_scan_status: z.ZodEnum<["pending", "clean", "rejected"]>;
|
|
98
|
-
secret_scan_findings: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
99
|
-
path: z.ZodString;
|
|
100
|
-
rule: z.ZodString;
|
|
101
|
-
line: z.ZodOptional<z.ZodNumber>;
|
|
102
|
-
}, "strip", z.ZodTypeAny, {
|
|
103
|
-
path: string;
|
|
104
|
-
rule: string;
|
|
105
|
-
line?: number | undefined;
|
|
106
|
-
}, {
|
|
107
|
-
path: string;
|
|
108
|
-
rule: string;
|
|
109
|
-
line?: number | undefined;
|
|
110
|
-
}>, "many">>;
|
|
111
|
-
created_at: z.ZodString;
|
|
112
|
-
updated_at: z.ZodString;
|
|
113
|
-
}, "strip", z.ZodTypeAny, {
|
|
114
|
-
id: string;
|
|
115
|
-
skill_id: string | null;
|
|
116
|
-
created_at: string;
|
|
117
|
-
updated_at: string;
|
|
118
|
-
owner_id: string;
|
|
119
|
-
source: "upload" | "github";
|
|
120
|
-
tarball_path: string;
|
|
121
|
-
manifest: {
|
|
122
|
-
path: string;
|
|
123
|
-
kind: "text" | "binary" | "script";
|
|
124
|
-
size: number;
|
|
125
|
-
sha256: string;
|
|
126
|
-
}[];
|
|
127
|
-
total_size_bytes: number;
|
|
128
|
-
has_scripts: boolean;
|
|
129
|
-
has_env_template: boolean;
|
|
130
|
-
secret_scan_status: "pending" | "clean" | "rejected";
|
|
131
|
-
secret_scan_findings: {
|
|
132
|
-
path: string;
|
|
133
|
-
rule: string;
|
|
134
|
-
line?: number | undefined;
|
|
135
|
-
}[] | null;
|
|
136
|
-
}, {
|
|
137
|
-
id: string;
|
|
138
|
-
skill_id: string | null;
|
|
139
|
-
created_at: string;
|
|
140
|
-
updated_at: string;
|
|
141
|
-
owner_id: string;
|
|
142
|
-
source: "upload" | "github";
|
|
143
|
-
tarball_path: string;
|
|
144
|
-
manifest: {
|
|
145
|
-
path: string;
|
|
146
|
-
kind: "text" | "binary" | "script";
|
|
147
|
-
size: number;
|
|
148
|
-
sha256: string;
|
|
149
|
-
}[];
|
|
150
|
-
total_size_bytes: number;
|
|
151
|
-
has_scripts: boolean;
|
|
152
|
-
has_env_template: boolean;
|
|
153
|
-
secret_scan_status: "pending" | "clean" | "rejected";
|
|
154
|
-
secret_scan_findings: {
|
|
155
|
-
path: string;
|
|
156
|
-
rule: string;
|
|
157
|
-
line?: number | undefined;
|
|
158
|
-
}[] | null;
|
|
159
|
-
}>;
|
|
160
|
-
export type SkillBundle = z.infer<typeof skillBundleSchema>;
|
|
161
|
-
export declare const runSchema: z.ZodObject<{
|
|
162
|
-
id: z.ZodString;
|
|
163
|
-
owner_id: z.ZodString;
|
|
164
|
-
bundle_id: z.ZodString;
|
|
165
|
-
slug: z.ZodString;
|
|
166
|
-
name: z.ZodString;
|
|
167
|
-
agent: z.ZodEnum<["claude", "codex", "cursor", "gemini", "cline", "amp"]>;
|
|
168
|
-
schedule_kind: z.ZodEnum<["hourly", "daily", "weekly", "monthly", "custom"]>;
|
|
169
|
-
cron_expr: z.ZodString;
|
|
170
|
-
timezone: z.ZodString;
|
|
171
|
-
status: z.ZodEnum<["active", "paused", "failed", "disabled"]>;
|
|
172
|
-
timeout_seconds: z.ZodNumber;
|
|
173
|
-
max_log_bytes: z.ZodNumber;
|
|
174
|
-
next_run_at: z.ZodNullable<z.ZodString>;
|
|
175
|
-
last_run_at: z.ZodNullable<z.ZodString>;
|
|
176
|
-
last_exec_status: z.ZodNullable<z.ZodEnum<["success", "failed", "timeout", "cancelled"]>>;
|
|
177
|
-
total_runs: z.ZodNumber;
|
|
178
|
-
total_failures: z.ZodNumber;
|
|
179
|
-
created_at: z.ZodString;
|
|
180
|
-
updated_at: z.ZodString;
|
|
181
|
-
}, "strip", z.ZodTypeAny, {
|
|
182
|
-
status: "failed" | "active" | "paused" | "disabled";
|
|
183
|
-
id: string;
|
|
184
|
-
created_at: string;
|
|
185
|
-
updated_at: string;
|
|
186
|
-
slug: string;
|
|
187
|
-
name: string;
|
|
188
|
-
owner_id: string;
|
|
189
|
-
cron_expr: string;
|
|
190
|
-
bundle_id: string;
|
|
191
|
-
agent: "claude" | "codex" | "cursor" | "gemini" | "cline" | "amp";
|
|
192
|
-
schedule_kind: "custom" | "monthly" | "hourly" | "daily" | "weekly";
|
|
193
|
-
timezone: string;
|
|
194
|
-
timeout_seconds: number;
|
|
195
|
-
max_log_bytes: number;
|
|
196
|
-
next_run_at: string | null;
|
|
197
|
-
last_run_at: string | null;
|
|
198
|
-
last_exec_status: "success" | "failed" | "timeout" | "cancelled" | null;
|
|
199
|
-
total_runs: number;
|
|
200
|
-
total_failures: number;
|
|
201
|
-
}, {
|
|
202
|
-
status: "failed" | "active" | "paused" | "disabled";
|
|
203
|
-
id: string;
|
|
204
|
-
created_at: string;
|
|
205
|
-
updated_at: string;
|
|
206
|
-
slug: string;
|
|
207
|
-
name: string;
|
|
208
|
-
owner_id: string;
|
|
209
|
-
cron_expr: string;
|
|
210
|
-
bundle_id: string;
|
|
211
|
-
agent: "claude" | "codex" | "cursor" | "gemini" | "cline" | "amp";
|
|
212
|
-
schedule_kind: "custom" | "monthly" | "hourly" | "daily" | "weekly";
|
|
213
|
-
timezone: string;
|
|
214
|
-
timeout_seconds: number;
|
|
215
|
-
max_log_bytes: number;
|
|
216
|
-
next_run_at: string | null;
|
|
217
|
-
last_run_at: string | null;
|
|
218
|
-
last_exec_status: "success" | "failed" | "timeout" | "cancelled" | null;
|
|
219
|
-
total_runs: number;
|
|
220
|
-
total_failures: number;
|
|
221
|
-
}>;
|
|
222
|
-
export type Run = z.infer<typeof runSchema>;
|
|
223
|
-
export declare const runEnvVarsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodString>, Record<string, string>, Record<string, string>>;
|
|
224
|
-
export type RunEnvVars = z.infer<typeof runEnvVarsSchema>;
|
|
225
|
-
export declare const createRunInputSchema: z.ZodObject<{
|
|
226
|
-
bundle_id: z.ZodString;
|
|
227
|
-
name: z.ZodString;
|
|
228
|
-
agent: z.ZodEnum<["claude", "codex", "cursor", "gemini", "cline", "amp"]>;
|
|
229
|
-
schedule: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
230
|
-
kind: z.ZodLiteral<"hourly">;
|
|
231
|
-
}, "strip", z.ZodTypeAny, {
|
|
232
|
-
kind: "hourly";
|
|
233
|
-
}, {
|
|
234
|
-
kind: "hourly";
|
|
235
|
-
}>, z.ZodObject<{
|
|
236
|
-
kind: z.ZodLiteral<"daily">;
|
|
237
|
-
time: z.ZodString;
|
|
238
|
-
}, "strip", z.ZodTypeAny, {
|
|
239
|
-
kind: "daily";
|
|
240
|
-
time: string;
|
|
241
|
-
}, {
|
|
242
|
-
kind: "daily";
|
|
243
|
-
time: string;
|
|
244
|
-
}>, z.ZodObject<{
|
|
245
|
-
kind: z.ZodLiteral<"weekly">;
|
|
246
|
-
time: z.ZodString;
|
|
247
|
-
weekday: z.ZodNumber;
|
|
248
|
-
}, "strip", z.ZodTypeAny, {
|
|
249
|
-
kind: "weekly";
|
|
250
|
-
time: string;
|
|
251
|
-
weekday: number;
|
|
252
|
-
}, {
|
|
253
|
-
kind: "weekly";
|
|
254
|
-
time: string;
|
|
255
|
-
weekday: number;
|
|
256
|
-
}>, z.ZodObject<{
|
|
257
|
-
kind: z.ZodLiteral<"monthly">;
|
|
258
|
-
time: z.ZodString;
|
|
259
|
-
day_of_month: z.ZodNumber;
|
|
260
|
-
}, "strip", z.ZodTypeAny, {
|
|
261
|
-
kind: "monthly";
|
|
262
|
-
time: string;
|
|
263
|
-
day_of_month: number;
|
|
264
|
-
}, {
|
|
265
|
-
kind: "monthly";
|
|
266
|
-
time: string;
|
|
267
|
-
day_of_month: number;
|
|
268
|
-
}>, z.ZodObject<{
|
|
269
|
-
kind: z.ZodLiteral<"custom">;
|
|
270
|
-
cron_expr: z.ZodString;
|
|
271
|
-
}, "strip", z.ZodTypeAny, {
|
|
272
|
-
kind: "custom";
|
|
273
|
-
cron_expr: string;
|
|
274
|
-
}, {
|
|
275
|
-
kind: "custom";
|
|
276
|
-
cron_expr: string;
|
|
277
|
-
}>]>;
|
|
278
|
-
timezone: z.ZodDefault<z.ZodString>;
|
|
279
|
-
timeout_seconds: z.ZodOptional<z.ZodNumber>;
|
|
280
|
-
env_vars: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodString>, Record<string, string>, Record<string, string>>>;
|
|
281
|
-
}, "strip", z.ZodTypeAny, {
|
|
282
|
-
name: string;
|
|
283
|
-
bundle_id: string;
|
|
284
|
-
agent: "claude" | "codex" | "cursor" | "gemini" | "cline" | "amp";
|
|
285
|
-
timezone: string;
|
|
286
|
-
schedule: {
|
|
287
|
-
kind: "hourly";
|
|
288
|
-
} | {
|
|
289
|
-
kind: "daily";
|
|
290
|
-
time: string;
|
|
291
|
-
} | {
|
|
292
|
-
kind: "weekly";
|
|
293
|
-
time: string;
|
|
294
|
-
weekday: number;
|
|
295
|
-
} | {
|
|
296
|
-
kind: "monthly";
|
|
297
|
-
time: string;
|
|
298
|
-
day_of_month: number;
|
|
299
|
-
} | {
|
|
300
|
-
kind: "custom";
|
|
301
|
-
cron_expr: string;
|
|
302
|
-
};
|
|
303
|
-
timeout_seconds?: number | undefined;
|
|
304
|
-
env_vars?: Record<string, string> | undefined;
|
|
305
|
-
}, {
|
|
306
|
-
name: string;
|
|
307
|
-
bundle_id: string;
|
|
308
|
-
agent: "claude" | "codex" | "cursor" | "gemini" | "cline" | "amp";
|
|
309
|
-
schedule: {
|
|
310
|
-
kind: "hourly";
|
|
311
|
-
} | {
|
|
312
|
-
kind: "daily";
|
|
313
|
-
time: string;
|
|
314
|
-
} | {
|
|
315
|
-
kind: "weekly";
|
|
316
|
-
time: string;
|
|
317
|
-
weekday: number;
|
|
318
|
-
} | {
|
|
319
|
-
kind: "monthly";
|
|
320
|
-
time: string;
|
|
321
|
-
day_of_month: number;
|
|
322
|
-
} | {
|
|
323
|
-
kind: "custom";
|
|
324
|
-
cron_expr: string;
|
|
325
|
-
};
|
|
326
|
-
timezone?: string | undefined;
|
|
327
|
-
timeout_seconds?: number | undefined;
|
|
328
|
-
env_vars?: Record<string, string> | undefined;
|
|
329
|
-
}>;
|
|
330
|
-
export type CreateRunInput = z.infer<typeof createRunInputSchema>;
|
|
331
|
-
export declare const updateRunInputSchema: z.ZodObject<{
|
|
332
|
-
name: z.ZodOptional<z.ZodString>;
|
|
333
|
-
agent: z.ZodOptional<z.ZodEnum<["claude", "codex", "cursor", "gemini", "cline", "amp"]>>;
|
|
334
|
-
schedule: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
335
|
-
kind: z.ZodLiteral<"hourly">;
|
|
336
|
-
}, "strip", z.ZodTypeAny, {
|
|
337
|
-
kind: "hourly";
|
|
338
|
-
}, {
|
|
339
|
-
kind: "hourly";
|
|
340
|
-
}>, z.ZodObject<{
|
|
341
|
-
kind: z.ZodLiteral<"daily">;
|
|
342
|
-
time: z.ZodString;
|
|
343
|
-
}, "strip", z.ZodTypeAny, {
|
|
344
|
-
kind: "daily";
|
|
345
|
-
time: string;
|
|
346
|
-
}, {
|
|
347
|
-
kind: "daily";
|
|
348
|
-
time: string;
|
|
349
|
-
}>, z.ZodObject<{
|
|
350
|
-
kind: z.ZodLiteral<"weekly">;
|
|
351
|
-
time: z.ZodString;
|
|
352
|
-
weekday: z.ZodNumber;
|
|
353
|
-
}, "strip", z.ZodTypeAny, {
|
|
354
|
-
kind: "weekly";
|
|
355
|
-
time: string;
|
|
356
|
-
weekday: number;
|
|
357
|
-
}, {
|
|
358
|
-
kind: "weekly";
|
|
359
|
-
time: string;
|
|
360
|
-
weekday: number;
|
|
361
|
-
}>, z.ZodObject<{
|
|
362
|
-
kind: z.ZodLiteral<"monthly">;
|
|
363
|
-
time: z.ZodString;
|
|
364
|
-
day_of_month: z.ZodNumber;
|
|
365
|
-
}, "strip", z.ZodTypeAny, {
|
|
366
|
-
kind: "monthly";
|
|
367
|
-
time: string;
|
|
368
|
-
day_of_month: number;
|
|
369
|
-
}, {
|
|
370
|
-
kind: "monthly";
|
|
371
|
-
time: string;
|
|
372
|
-
day_of_month: number;
|
|
373
|
-
}>, z.ZodObject<{
|
|
374
|
-
kind: z.ZodLiteral<"custom">;
|
|
375
|
-
cron_expr: z.ZodString;
|
|
376
|
-
}, "strip", z.ZodTypeAny, {
|
|
377
|
-
kind: "custom";
|
|
378
|
-
cron_expr: string;
|
|
379
|
-
}, {
|
|
380
|
-
kind: "custom";
|
|
381
|
-
cron_expr: string;
|
|
382
|
-
}>]>>;
|
|
383
|
-
timezone: z.ZodOptional<z.ZodString>;
|
|
384
|
-
timeout_seconds: z.ZodOptional<z.ZodNumber>;
|
|
385
|
-
status: z.ZodOptional<z.ZodEnum<["active", "paused"]>>;
|
|
386
|
-
env_vars: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodString>, Record<string, string>, Record<string, string>>>;
|
|
387
|
-
}, "strip", z.ZodTypeAny, {
|
|
388
|
-
status?: "active" | "paused" | undefined;
|
|
389
|
-
name?: string | undefined;
|
|
390
|
-
agent?: "claude" | "codex" | "cursor" | "gemini" | "cline" | "amp" | undefined;
|
|
391
|
-
timezone?: string | undefined;
|
|
392
|
-
timeout_seconds?: number | undefined;
|
|
393
|
-
schedule?: {
|
|
394
|
-
kind: "hourly";
|
|
395
|
-
} | {
|
|
396
|
-
kind: "daily";
|
|
397
|
-
time: string;
|
|
398
|
-
} | {
|
|
399
|
-
kind: "weekly";
|
|
400
|
-
time: string;
|
|
401
|
-
weekday: number;
|
|
402
|
-
} | {
|
|
403
|
-
kind: "monthly";
|
|
404
|
-
time: string;
|
|
405
|
-
day_of_month: number;
|
|
406
|
-
} | {
|
|
407
|
-
kind: "custom";
|
|
408
|
-
cron_expr: string;
|
|
409
|
-
} | undefined;
|
|
410
|
-
env_vars?: Record<string, string> | undefined;
|
|
411
|
-
}, {
|
|
412
|
-
status?: "active" | "paused" | undefined;
|
|
413
|
-
name?: string | undefined;
|
|
414
|
-
agent?: "claude" | "codex" | "cursor" | "gemini" | "cline" | "amp" | undefined;
|
|
415
|
-
timezone?: string | undefined;
|
|
416
|
-
timeout_seconds?: number | undefined;
|
|
417
|
-
schedule?: {
|
|
418
|
-
kind: "hourly";
|
|
419
|
-
} | {
|
|
420
|
-
kind: "daily";
|
|
421
|
-
time: string;
|
|
422
|
-
} | {
|
|
423
|
-
kind: "weekly";
|
|
424
|
-
time: string;
|
|
425
|
-
weekday: number;
|
|
426
|
-
} | {
|
|
427
|
-
kind: "monthly";
|
|
428
|
-
time: string;
|
|
429
|
-
day_of_month: number;
|
|
430
|
-
} | {
|
|
431
|
-
kind: "custom";
|
|
432
|
-
cron_expr: string;
|
|
433
|
-
} | undefined;
|
|
434
|
-
env_vars?: Record<string, string> | undefined;
|
|
435
|
-
}>;
|
|
436
|
-
export type UpdateRunInput = z.infer<typeof updateRunInputSchema>;
|
|
437
|
-
export declare const runExecutionSchema: z.ZodObject<{
|
|
438
|
-
id: z.ZodString;
|
|
439
|
-
run_id: z.ZodString;
|
|
440
|
-
worker_id: z.ZodNullable<z.ZodString>;
|
|
441
|
-
status: z.ZodEnum<["running", "success", "failed", "timeout", "cancelled"]>;
|
|
442
|
-
started_at: z.ZodString;
|
|
443
|
-
finished_at: z.ZodNullable<z.ZodString>;
|
|
444
|
-
duration_ms: z.ZodNullable<z.ZodNumber>;
|
|
445
|
-
exit_code: z.ZodNullable<z.ZodNumber>;
|
|
446
|
-
log_text: z.ZodNullable<z.ZodString>;
|
|
447
|
-
log_truncated: z.ZodBoolean;
|
|
448
|
-
input_tokens: z.ZodNullable<z.ZodNumber>;
|
|
449
|
-
output_tokens: z.ZodNullable<z.ZodNumber>;
|
|
450
|
-
cost_estimate_cents: z.ZodNullable<z.ZodNumber>;
|
|
451
|
-
error_message: z.ZodNullable<z.ZodString>;
|
|
452
|
-
created_at: z.ZodString;
|
|
453
|
-
}, "strip", z.ZodTypeAny, {
|
|
454
|
-
status: "success" | "failed" | "running" | "timeout" | "cancelled";
|
|
455
|
-
id: string;
|
|
456
|
-
created_at: string;
|
|
457
|
-
input_tokens: number | null;
|
|
458
|
-
output_tokens: number | null;
|
|
459
|
-
error_message: string | null;
|
|
460
|
-
run_id: string;
|
|
461
|
-
worker_id: string | null;
|
|
462
|
-
started_at: string;
|
|
463
|
-
finished_at: string | null;
|
|
464
|
-
duration_ms: number | null;
|
|
465
|
-
exit_code: number | null;
|
|
466
|
-
log_text: string | null;
|
|
467
|
-
log_truncated: boolean;
|
|
468
|
-
cost_estimate_cents: number | null;
|
|
469
|
-
}, {
|
|
470
|
-
status: "success" | "failed" | "running" | "timeout" | "cancelled";
|
|
471
|
-
id: string;
|
|
472
|
-
created_at: string;
|
|
473
|
-
input_tokens: number | null;
|
|
474
|
-
output_tokens: number | null;
|
|
475
|
-
error_message: string | null;
|
|
476
|
-
run_id: string;
|
|
477
|
-
worker_id: string | null;
|
|
478
|
-
started_at: string;
|
|
479
|
-
finished_at: string | null;
|
|
480
|
-
duration_ms: number | null;
|
|
481
|
-
exit_code: number | null;
|
|
482
|
-
log_text: string | null;
|
|
483
|
-
log_truncated: boolean;
|
|
484
|
-
cost_estimate_cents: number | null;
|
|
485
|
-
}>;
|
|
486
|
-
export type RunExecution = z.infer<typeof runExecutionSchema>;
|
|
487
|
-
export declare const deploySessionSchema: z.ZodObject<{
|
|
488
|
-
session_id: z.ZodString;
|
|
489
|
-
upload_url: z.ZodString;
|
|
490
|
-
wizard_url: z.ZodString;
|
|
491
|
-
expires_at: z.ZodString;
|
|
492
|
-
}, "strip", z.ZodTypeAny, {
|
|
493
|
-
expires_at: string;
|
|
494
|
-
session_id: string;
|
|
495
|
-
upload_url: string;
|
|
496
|
-
wizard_url: string;
|
|
497
|
-
}, {
|
|
498
|
-
expires_at: string;
|
|
499
|
-
session_id: string;
|
|
500
|
-
upload_url: string;
|
|
501
|
-
wizard_url: string;
|
|
502
|
-
}>;
|
|
503
|
-
export type DeploySession = z.infer<typeof deploySessionSchema>;
|
|
504
|
-
export interface RunExecuteJob {
|
|
505
|
-
run_id: string;
|
|
506
|
-
execution_id: string;
|
|
507
|
-
scheduled_at: string;
|
|
508
|
-
}
|
|
509
|
-
//# sourceMappingURL=run.schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"run.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/run.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;;;;;;GAWG;AAKH,eAAO,MAAM,cAAc,oEAOzB,CAAA;AACF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAKrD,eAAO,MAAM,qBAAqB,+DAMhC,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE,eAAO,MAAM,eAAe,uDAK1B,CAAA;AACF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAEvD,eAAO,MAAM,wBAAwB,qEAMnC,CAAA;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAezE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAsBjC,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAGrE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6B5B,CAAA;AACF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAG3D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBpB,CAAA;AACF,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAA;AAK3C,eAAO,MAAM,gBAAgB,qGASzB,CAAA;AACJ,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ/B,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS/B,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAGjE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgB7B,CAAA;AACF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAO7D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAK9B,CAAA;AACF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAG/D,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;CACrB"}
|