@duvoai/cli 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -2
- package/dist/bin/duvo.js +635 -252
- package/dist/bin/duvo.js.map +4 -4
- package/package.json +1 -1
package/dist/bin/duvo.js
CHANGED
|
@@ -1887,45 +1887,6 @@ var __name2 = /* @__PURE__ */ __name((target, value) => __defProp2(target, "name
|
|
|
1887
1887
|
var customerPortalResponseSchema = z3.object({
|
|
1888
1888
|
url: z3.string()
|
|
1889
1889
|
});
|
|
1890
|
-
var limitSchema = z22.union([z22.number(), z22.literal("unlimited")]);
|
|
1891
|
-
var entitlementsResponseSchema = z22.object({
|
|
1892
|
-
planVersionId: z22.string(),
|
|
1893
|
-
planName: z22.string(),
|
|
1894
|
-
basePlan: z22.enum(["free", "pro", "enterprise"]),
|
|
1895
|
-
features: z22.array(z22.string()),
|
|
1896
|
-
limits: z22.object({
|
|
1897
|
-
maxAgents: limitSchema,
|
|
1898
|
-
maxAgentRunsPerMonth: limitSchema,
|
|
1899
|
-
runCountingMode: z22.enum(["monthly", "lifetime"])
|
|
1900
|
-
}),
|
|
1901
|
-
usage: z22.object({
|
|
1902
|
-
currentAssignments: z22.number(),
|
|
1903
|
-
currentMonthAgentRuns: z22.number()
|
|
1904
|
-
}),
|
|
1905
|
-
subscription: z22.object({
|
|
1906
|
-
status: z22.enum(["active", "trialing", "canceled", "past_due"]),
|
|
1907
|
-
trialEndsAt: z22.coerce.date().nullable(),
|
|
1908
|
-
currentPeriodEnd: z22.coerce.date().nullable()
|
|
1909
|
-
}),
|
|
1910
|
-
canCreateTeams: z22.boolean()
|
|
1911
|
-
});
|
|
1912
|
-
var invoiceSchema = z32.object({
|
|
1913
|
-
id: z32.string(),
|
|
1914
|
-
number: z32.string().nullable(),
|
|
1915
|
-
status: z32.enum(["draft", "open", "paid", "uncollectible", "void"]),
|
|
1916
|
-
amountDue: z32.number(),
|
|
1917
|
-
amountPaid: z32.number(),
|
|
1918
|
-
currency: z32.string(),
|
|
1919
|
-
createdAt: z32.string(),
|
|
1920
|
-
paidAt: z32.string().nullable(),
|
|
1921
|
-
hostedInvoiceUrl: z32.string().nullable(),
|
|
1922
|
-
invoicePdf: z32.string().nullable()
|
|
1923
|
-
});
|
|
1924
|
-
var invoicesResponseSchema = z32.object({
|
|
1925
|
-
invoices: z32.array(invoiceSchema),
|
|
1926
|
-
hasMore: z32.boolean(),
|
|
1927
|
-
nextCursor: z32.string().nullable()
|
|
1928
|
-
});
|
|
1929
1890
|
var PLAN_FEATURE = {
|
|
1930
1891
|
API_ACCESS: "api_access",
|
|
1931
1892
|
BROWSER_AUTOMATION: "browser_automation",
|
|
@@ -2033,6 +1994,15 @@ var AGENT_PLAN_FEATURES = [
|
|
|
2033
1994
|
PLAN_FEATURE.AGENTIC_MEMORY,
|
|
2034
1995
|
PLAN_FEATURE.BROWSING_SKILL_RECORDING
|
|
2035
1996
|
];
|
|
1997
|
+
function isClarityOnlyPlan(plan) {
|
|
1998
|
+
const hasClarity = plan.features.includes(PLAN_FEATURE.CLARITY);
|
|
1999
|
+
const hasAgentFeature = AGENT_PLAN_FEATURES.some(
|
|
2000
|
+
(feature) => plan.features.includes(feature)
|
|
2001
|
+
);
|
|
2002
|
+
return hasClarity && !hasAgentFeature;
|
|
2003
|
+
}
|
|
2004
|
+
__name(isClarityOnlyPlan, "isClarityOnlyPlan");
|
|
2005
|
+
__name2(isClarityOnlyPlan, "isClarityOnlyPlan");
|
|
2036
2006
|
var STRIPE_PRICE_IDS = {
|
|
2037
2007
|
development: {
|
|
2038
2008
|
pro_v1: "price_1SsNA0G2suWmkoit1EDZ1yIp",
|
|
@@ -2112,6 +2082,247 @@ function isWithinPlanLimit(planVersionId, limit, currentValue) {
|
|
|
2112
2082
|
}
|
|
2113
2083
|
__name(isWithinPlanLimit, "isWithinPlanLimit");
|
|
2114
2084
|
__name2(isWithinPlanLimit, "isWithinPlanLimit");
|
|
2085
|
+
var PRODUCT = {
|
|
2086
|
+
AUTOMATION: "automation",
|
|
2087
|
+
CLARITY: "clarity",
|
|
2088
|
+
PLATFORM: "platform"
|
|
2089
|
+
};
|
|
2090
|
+
var PRODUCT_KEYS = [
|
|
2091
|
+
PRODUCT.AUTOMATION,
|
|
2092
|
+
PRODUCT.CLARITY,
|
|
2093
|
+
PRODUCT.PLATFORM
|
|
2094
|
+
];
|
|
2095
|
+
var CUSTOMER_VISIBLE_PRODUCTS = [
|
|
2096
|
+
PRODUCT.AUTOMATION,
|
|
2097
|
+
PRODUCT.CLARITY
|
|
2098
|
+
];
|
|
2099
|
+
var PRODUCT_FEATURE_COMPATIBILITY = {
|
|
2100
|
+
[PRODUCT.AUTOMATION]: [],
|
|
2101
|
+
[PRODUCT.CLARITY]: [PLAN_FEATURE.CLARITY],
|
|
2102
|
+
[PRODUCT.PLATFORM]: []
|
|
2103
|
+
};
|
|
2104
|
+
var CAPABILITY = {
|
|
2105
|
+
API_ACCESS: "api_access",
|
|
2106
|
+
BROWSER_AUTOMATION: "browser_automation",
|
|
2107
|
+
ADVANCED_INTEGRATIONS: "advanced_integrations",
|
|
2108
|
+
CUSTOM_MCP_SERVERS: "custom_mcp_servers",
|
|
2109
|
+
CASE_QUEUE: "case_queue",
|
|
2110
|
+
CLARITY_OVERVIEW: "clarity_overview",
|
|
2111
|
+
PORTFOLIO_INTELLIGENCE: "portfolio_intelligence",
|
|
2112
|
+
SSO: "sso",
|
|
2113
|
+
AUDIT_LOGS: "audit_logs",
|
|
2114
|
+
PRIORITY_SUPPORT: "priority_support",
|
|
2115
|
+
CAN_CREATE_TEAMS: "can_create_teams",
|
|
2116
|
+
LEARNINGS: "learnings",
|
|
2117
|
+
BROWSING_SKILL_RECORDING: "browsing_skill_recording",
|
|
2118
|
+
WORKFLOW_BUILDER: "workflow_builder",
|
|
2119
|
+
AGENTIC_MEMORY: "agentic_memory"
|
|
2120
|
+
};
|
|
2121
|
+
var CAPABILITY_KEYS = [
|
|
2122
|
+
CAPABILITY.API_ACCESS,
|
|
2123
|
+
CAPABILITY.BROWSER_AUTOMATION,
|
|
2124
|
+
CAPABILITY.ADVANCED_INTEGRATIONS,
|
|
2125
|
+
CAPABILITY.CUSTOM_MCP_SERVERS,
|
|
2126
|
+
CAPABILITY.CASE_QUEUE,
|
|
2127
|
+
CAPABILITY.CLARITY_OVERVIEW,
|
|
2128
|
+
CAPABILITY.PORTFOLIO_INTELLIGENCE,
|
|
2129
|
+
CAPABILITY.SSO,
|
|
2130
|
+
CAPABILITY.AUDIT_LOGS,
|
|
2131
|
+
CAPABILITY.PRIORITY_SUPPORT,
|
|
2132
|
+
CAPABILITY.CAN_CREATE_TEAMS,
|
|
2133
|
+
CAPABILITY.LEARNINGS,
|
|
2134
|
+
CAPABILITY.BROWSING_SKILL_RECORDING,
|
|
2135
|
+
CAPABILITY.WORKFLOW_BUILDER,
|
|
2136
|
+
CAPABILITY.AGENTIC_MEMORY
|
|
2137
|
+
];
|
|
2138
|
+
var CAPABILITY_PRODUCT = {
|
|
2139
|
+
[CAPABILITY.API_ACCESS]: PRODUCT.AUTOMATION,
|
|
2140
|
+
[CAPABILITY.BROWSER_AUTOMATION]: PRODUCT.AUTOMATION,
|
|
2141
|
+
[CAPABILITY.ADVANCED_INTEGRATIONS]: PRODUCT.AUTOMATION,
|
|
2142
|
+
[CAPABILITY.CUSTOM_MCP_SERVERS]: PRODUCT.AUTOMATION,
|
|
2143
|
+
[CAPABILITY.CASE_QUEUE]: PRODUCT.AUTOMATION,
|
|
2144
|
+
[CAPABILITY.CLARITY_OVERVIEW]: PRODUCT.CLARITY,
|
|
2145
|
+
[CAPABILITY.PORTFOLIO_INTELLIGENCE]: PRODUCT.CLARITY,
|
|
2146
|
+
[CAPABILITY.SSO]: PRODUCT.PLATFORM,
|
|
2147
|
+
[CAPABILITY.AUDIT_LOGS]: PRODUCT.PLATFORM,
|
|
2148
|
+
[CAPABILITY.PRIORITY_SUPPORT]: PRODUCT.PLATFORM,
|
|
2149
|
+
[CAPABILITY.CAN_CREATE_TEAMS]: PRODUCT.PLATFORM,
|
|
2150
|
+
[CAPABILITY.LEARNINGS]: PRODUCT.AUTOMATION,
|
|
2151
|
+
[CAPABILITY.BROWSING_SKILL_RECORDING]: PRODUCT.AUTOMATION,
|
|
2152
|
+
[CAPABILITY.WORKFLOW_BUILDER]: PRODUCT.AUTOMATION,
|
|
2153
|
+
[CAPABILITY.AGENTIC_MEMORY]: PRODUCT.AUTOMATION
|
|
2154
|
+
};
|
|
2155
|
+
var CAPABILITY_FEATURE_COMPATIBILITY = {
|
|
2156
|
+
[CAPABILITY.API_ACCESS]: PLAN_FEATURE.API_ACCESS,
|
|
2157
|
+
[CAPABILITY.BROWSER_AUTOMATION]: PLAN_FEATURE.BROWSER_AUTOMATION,
|
|
2158
|
+
[CAPABILITY.ADVANCED_INTEGRATIONS]: PLAN_FEATURE.ADVANCED_INTEGRATIONS,
|
|
2159
|
+
[CAPABILITY.CUSTOM_MCP_SERVERS]: PLAN_FEATURE.CUSTOM_MCP_SERVERS,
|
|
2160
|
+
[CAPABILITY.CASE_QUEUE]: PLAN_FEATURE.CASE_QUEUE,
|
|
2161
|
+
[CAPABILITY.CLARITY_OVERVIEW]: PLAN_FEATURE.CLARITY_OVERVIEW,
|
|
2162
|
+
[CAPABILITY.SSO]: PLAN_FEATURE.SSO,
|
|
2163
|
+
[CAPABILITY.AUDIT_LOGS]: PLAN_FEATURE.AUDIT_LOGS,
|
|
2164
|
+
[CAPABILITY.PRIORITY_SUPPORT]: PLAN_FEATURE.PRIORITY_SUPPORT,
|
|
2165
|
+
[CAPABILITY.CAN_CREATE_TEAMS]: PLAN_FEATURE.CAN_CREATE_TEAMS,
|
|
2166
|
+
[CAPABILITY.LEARNINGS]: PLAN_FEATURE.LEARNINGS,
|
|
2167
|
+
[CAPABILITY.BROWSING_SKILL_RECORDING]: PLAN_FEATURE.BROWSING_SKILL_RECORDING,
|
|
2168
|
+
[CAPABILITY.WORKFLOW_BUILDER]: PLAN_FEATURE.WORKFLOW_BUILDER,
|
|
2169
|
+
[CAPABILITY.AGENTIC_MEMORY]: PLAN_FEATURE.AGENTIC_MEMORY
|
|
2170
|
+
};
|
|
2171
|
+
var ENTITLEMENT_LIMIT = {
|
|
2172
|
+
MAX_AGENTS: "maxAgents",
|
|
2173
|
+
MAX_AGENT_RUNS_PER_MONTH: "maxAgentRunsPerMonth",
|
|
2174
|
+
MAX_CONCURRENT_RUNS: "maxConcurrentRuns"
|
|
2175
|
+
};
|
|
2176
|
+
var ENTITLEMENT_LIMIT_KEYS = [
|
|
2177
|
+
ENTITLEMENT_LIMIT.MAX_AGENTS,
|
|
2178
|
+
ENTITLEMENT_LIMIT.MAX_AGENT_RUNS_PER_MONTH,
|
|
2179
|
+
ENTITLEMENT_LIMIT.MAX_CONCURRENT_RUNS
|
|
2180
|
+
];
|
|
2181
|
+
function getLimitsFromPlan(plan) {
|
|
2182
|
+
return {
|
|
2183
|
+
maxAgents: plan.maxAgents,
|
|
2184
|
+
maxAgentRunsPerMonth: plan.maxAgentRunsPerMonth,
|
|
2185
|
+
maxConcurrentRuns: plan.maxConcurrentRuns
|
|
2186
|
+
};
|
|
2187
|
+
}
|
|
2188
|
+
__name(getLimitsFromPlan, "getLimitsFromPlan");
|
|
2189
|
+
__name2(getLimitsFromPlan, "getLimitsFromPlan");
|
|
2190
|
+
var PLAN_PRESET_ENTITLEMENTS = {
|
|
2191
|
+
free_v1: {
|
|
2192
|
+
products: [PRODUCT.AUTOMATION],
|
|
2193
|
+
capabilities: [],
|
|
2194
|
+
limits: getLimitsFromPlan(PLAN_VERSIONS.free_v1)
|
|
2195
|
+
},
|
|
2196
|
+
pro_v1: {
|
|
2197
|
+
products: [PRODUCT.AUTOMATION],
|
|
2198
|
+
capabilities: [
|
|
2199
|
+
CAPABILITY.BROWSER_AUTOMATION,
|
|
2200
|
+
CAPABILITY.ADVANCED_INTEGRATIONS,
|
|
2201
|
+
CAPABILITY.CUSTOM_MCP_SERVERS,
|
|
2202
|
+
CAPABILITY.BROWSING_SKILL_RECORDING,
|
|
2203
|
+
CAPABILITY.AGENTIC_MEMORY
|
|
2204
|
+
],
|
|
2205
|
+
limits: getLimitsFromPlan(PLAN_VERSIONS.pro_v1)
|
|
2206
|
+
},
|
|
2207
|
+
enterprise_v1: {
|
|
2208
|
+
products: [PRODUCT.AUTOMATION, PRODUCT.CLARITY, PRODUCT.PLATFORM],
|
|
2209
|
+
capabilities: [
|
|
2210
|
+
CAPABILITY.API_ACCESS,
|
|
2211
|
+
CAPABILITY.BROWSER_AUTOMATION,
|
|
2212
|
+
CAPABILITY.ADVANCED_INTEGRATIONS,
|
|
2213
|
+
CAPABILITY.CUSTOM_MCP_SERVERS,
|
|
2214
|
+
CAPABILITY.CASE_QUEUE,
|
|
2215
|
+
CAPABILITY.CLARITY_OVERVIEW,
|
|
2216
|
+
CAPABILITY.SSO,
|
|
2217
|
+
CAPABILITY.AUDIT_LOGS,
|
|
2218
|
+
CAPABILITY.PRIORITY_SUPPORT,
|
|
2219
|
+
CAPABILITY.CAN_CREATE_TEAMS,
|
|
2220
|
+
CAPABILITY.LEARNINGS,
|
|
2221
|
+
CAPABILITY.BROWSING_SKILL_RECORDING,
|
|
2222
|
+
CAPABILITY.WORKFLOW_BUILDER,
|
|
2223
|
+
CAPABILITY.AGENTIC_MEMORY
|
|
2224
|
+
],
|
|
2225
|
+
limits: getLimitsFromPlan(PLAN_VERSIONS.enterprise_v1)
|
|
2226
|
+
},
|
|
2227
|
+
clarity_v1: {
|
|
2228
|
+
products: [PRODUCT.CLARITY],
|
|
2229
|
+
capabilities: [CAPABILITY.CLARITY_OVERVIEW],
|
|
2230
|
+
limits: getLimitsFromPlan(PLAN_VERSIONS.clarity_v1)
|
|
2231
|
+
}
|
|
2232
|
+
};
|
|
2233
|
+
function getPlanPresetEntitlements(planVersionId) {
|
|
2234
|
+
return PLAN_PRESET_ENTITLEMENTS[planVersionId];
|
|
2235
|
+
}
|
|
2236
|
+
__name(getPlanPresetEntitlements, "getPlanPresetEntitlements");
|
|
2237
|
+
__name2(getPlanPresetEntitlements, "getPlanPresetEntitlements");
|
|
2238
|
+
function getPlanProducts(planVersionId) {
|
|
2239
|
+
return getPlanPresetEntitlements(planVersionId).products;
|
|
2240
|
+
}
|
|
2241
|
+
__name(getPlanProducts, "getPlanProducts");
|
|
2242
|
+
__name2(getPlanProducts, "getPlanProducts");
|
|
2243
|
+
function getPlanCapabilities(planVersionId) {
|
|
2244
|
+
return getPlanPresetEntitlements(planVersionId).capabilities;
|
|
2245
|
+
}
|
|
2246
|
+
__name(getPlanCapabilities, "getPlanCapabilities");
|
|
2247
|
+
__name2(getPlanCapabilities, "getPlanCapabilities");
|
|
2248
|
+
function getPlanPresetLimits(planVersionId) {
|
|
2249
|
+
return getPlanPresetEntitlements(planVersionId).limits;
|
|
2250
|
+
}
|
|
2251
|
+
__name(getPlanPresetLimits, "getPlanPresetLimits");
|
|
2252
|
+
__name2(getPlanPresetLimits, "getPlanPresetLimits");
|
|
2253
|
+
function getCompatibilityFeaturesForEntitlements(entitlements) {
|
|
2254
|
+
const features = /* @__PURE__ */ new Set();
|
|
2255
|
+
for (const product of entitlements.products) {
|
|
2256
|
+
for (const feature of PRODUCT_FEATURE_COMPATIBILITY[product]) {
|
|
2257
|
+
features.add(feature);
|
|
2258
|
+
}
|
|
2259
|
+
}
|
|
2260
|
+
for (const capability of entitlements.capabilities) {
|
|
2261
|
+
const feature = CAPABILITY_FEATURE_COMPATIBILITY[capability];
|
|
2262
|
+
if (feature) {
|
|
2263
|
+
features.add(feature);
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
return [...features];
|
|
2267
|
+
}
|
|
2268
|
+
__name(getCompatibilityFeaturesForEntitlements, "getCompatibilityFeaturesForEntitlements");
|
|
2269
|
+
__name2(getCompatibilityFeaturesForEntitlements, "getCompatibilityFeaturesForEntitlements");
|
|
2270
|
+
function getPlanPresetCompatibilityFeatures(planVersionId) {
|
|
2271
|
+
const features = new Set(
|
|
2272
|
+
getCompatibilityFeaturesForEntitlements(
|
|
2273
|
+
getPlanPresetEntitlements(planVersionId)
|
|
2274
|
+
)
|
|
2275
|
+
);
|
|
2276
|
+
return PLAN_VERSIONS[planVersionId].features.filter(
|
|
2277
|
+
(feature) => features.has(feature)
|
|
2278
|
+
);
|
|
2279
|
+
}
|
|
2280
|
+
__name(getPlanPresetCompatibilityFeatures, "getPlanPresetCompatibilityFeatures");
|
|
2281
|
+
__name2(getPlanPresetCompatibilityFeatures, "getPlanPresetCompatibilityFeatures");
|
|
2282
|
+
var limitSchema = z22.union([z22.number(), z22.literal("unlimited")]);
|
|
2283
|
+
var entitlementsResponseSchema = z22.object({
|
|
2284
|
+
planVersionId: z22.string(),
|
|
2285
|
+
planName: z22.string(),
|
|
2286
|
+
basePlan: z22.enum(["free", "pro", "enterprise"]),
|
|
2287
|
+
features: z22.array(z22.string()),
|
|
2288
|
+
products: z22.array(z22.string()).default([]),
|
|
2289
|
+
capabilities: z22.array(z22.string()).default([]),
|
|
2290
|
+
source: z22.literal("team_subscription").default("team_subscription"),
|
|
2291
|
+
organizationId: z22.string().nullable().default(null),
|
|
2292
|
+
limits: z22.object({
|
|
2293
|
+
maxAgents: limitSchema,
|
|
2294
|
+
maxAgentRunsPerMonth: limitSchema,
|
|
2295
|
+
maxConcurrentRuns: limitSchema.default(0),
|
|
2296
|
+
runCountingMode: z22.enum(["monthly", "lifetime"])
|
|
2297
|
+
}),
|
|
2298
|
+
usage: z22.object({
|
|
2299
|
+
currentAssignments: z22.number(),
|
|
2300
|
+
currentMonthAgentRuns: z22.number()
|
|
2301
|
+
}),
|
|
2302
|
+
subscription: z22.object({
|
|
2303
|
+
status: z22.enum(["active", "trialing", "canceled", "past_due"]),
|
|
2304
|
+
trialEndsAt: z22.coerce.date().nullable(),
|
|
2305
|
+
currentPeriodEnd: z22.coerce.date().nullable()
|
|
2306
|
+
}),
|
|
2307
|
+
canCreateTeams: z22.boolean()
|
|
2308
|
+
});
|
|
2309
|
+
var invoiceSchema = z32.object({
|
|
2310
|
+
id: z32.string(),
|
|
2311
|
+
number: z32.string().nullable(),
|
|
2312
|
+
status: z32.enum(["draft", "open", "paid", "uncollectible", "void"]),
|
|
2313
|
+
amountDue: z32.number(),
|
|
2314
|
+
amountPaid: z32.number(),
|
|
2315
|
+
currency: z32.string(),
|
|
2316
|
+
createdAt: z32.string(),
|
|
2317
|
+
paidAt: z32.string().nullable(),
|
|
2318
|
+
hostedInvoiceUrl: z32.string().nullable(),
|
|
2319
|
+
invoicePdf: z32.string().nullable()
|
|
2320
|
+
});
|
|
2321
|
+
var invoicesResponseSchema = z32.object({
|
|
2322
|
+
invoices: z32.array(invoiceSchema),
|
|
2323
|
+
hasMore: z32.boolean(),
|
|
2324
|
+
nextCursor: z32.string().nullable()
|
|
2325
|
+
});
|
|
2115
2326
|
var PLAN_FEATURE_LABELS = {
|
|
2116
2327
|
[PLAN_FEATURE.API_ACCESS]: "API Access",
|
|
2117
2328
|
[PLAN_FEATURE.BROWSER_AUTOMATION]: "Browser Automation",
|
|
@@ -3344,14 +3555,6 @@ var updateClarityProcessSchema = z11.object({
|
|
|
3344
3555
|
name: z11.string().min(1).max(255).optional(),
|
|
3345
3556
|
customPrompt: z11.string().max(5e3).nullable().optional()
|
|
3346
3557
|
});
|
|
3347
|
-
var saveClarityCaptureInterviewSchema = z11.object({
|
|
3348
|
-
captureId: z11.guid().optional(),
|
|
3349
|
-
extraCaptureRequestId: z11.guid().optional(),
|
|
3350
|
-
transcript: z11.array(conversationMessageSchema).min(1)
|
|
3351
|
-
});
|
|
3352
|
-
var startClarityCaptureInterviewQuerySchema = z11.object({
|
|
3353
|
-
extraCaptureRequestId: z11.guid().optional()
|
|
3354
|
-
});
|
|
3355
3558
|
var INTERVIEW_LANGUAGES = [
|
|
3356
3559
|
"en",
|
|
3357
3560
|
"cs",
|
|
@@ -3631,11 +3834,7 @@ function captureSubTypeToColumnValue(subType) {
|
|
|
3631
3834
|
__name(captureSubTypeToColumnValue, "captureSubTypeToColumnValue");
|
|
3632
3835
|
__name2(captureSubTypeToColumnValue, "captureSubTypeToColumnValue");
|
|
3633
3836
|
var clarityInterviewTurnBodySchema = z12.object({
|
|
3634
|
-
|
|
3635
|
-
// deprecated `/v1/clarity/screenshare/*` routes (which don't send `type`)
|
|
3636
|
-
// still parse cleanly. New `/v1/clarity/interview/*` callers always
|
|
3637
|
-
// include it explicitly.
|
|
3638
|
-
type: clarityCaptureSubTypeSchema.default("screenshare"),
|
|
3837
|
+
type: clarityCaptureSubTypeSchema,
|
|
3639
3838
|
transcript: z12.array(conversationMessageSchema).max(MAX_INTERVIEW_TRANSCRIPT_ENTRIES),
|
|
3640
3839
|
images: z12.array(clarityInterviewFrameSchema).max(MAX_INTERVIEW_FRAMES_PER_TURN),
|
|
3641
3840
|
coverage: clarityInterviewCoverageSchema,
|
|
@@ -4510,9 +4709,7 @@ var startInterviewCaptureResponseSchema = clarityCaptureSchema.extend({
|
|
|
4510
4709
|
});
|
|
4511
4710
|
var MAX_INTERVIEW_FRAMES_PER_CAPTURE = 300;
|
|
4512
4711
|
var interviewUploadUrlsBodySchema = z19.object({
|
|
4513
|
-
|
|
4514
|
-
// back-compat — see `clarityInterviewTurnBodySchema`.
|
|
4515
|
-
type: clarityCaptureSubTypeSchema.default("screenshare"),
|
|
4712
|
+
type: clarityCaptureSubTypeSchema,
|
|
4516
4713
|
screenshareStartTime: z19.int().nonnegative(),
|
|
4517
4714
|
frameTimestamps: z19.array(z19.int().nonnegative()).max(MAX_INTERVIEW_FRAMES_PER_CAPTURE)
|
|
4518
4715
|
});
|
|
@@ -4535,8 +4732,7 @@ var completeInterviewCaptureResponseSchema = clarityCaptureSchema.extend({
|
|
|
4535
4732
|
updatedAt: z19.string()
|
|
4536
4733
|
});
|
|
4537
4734
|
var autoSaveInterviewCaptureBodySchema = z19.object({
|
|
4538
|
-
|
|
4539
|
-
type: clarityCaptureSubTypeSchema.default("screenshare"),
|
|
4735
|
+
type: clarityCaptureSubTypeSchema,
|
|
4540
4736
|
transcript: z19.array(conversationMessageSchema).max(MAX_INTERVIEW_TRANSCRIPT_ENTRIES),
|
|
4541
4737
|
images: z19.array(clarityInterviewFrameSchema).max(MAX_INTERVIEW_FRAMES_PER_CAPTURE)
|
|
4542
4738
|
});
|
|
@@ -5264,6 +5460,7 @@ var agentApiSchema = z27.object({
|
|
|
5264
5460
|
team_id: z27.string().nullable(),
|
|
5265
5461
|
thread_id: z27.string().nullable(),
|
|
5266
5462
|
folder_id: z27.string().nullable().optional(),
|
|
5463
|
+
pinned_at: z27.string().nullable().optional(),
|
|
5267
5464
|
created_at: z27.string().nullable(),
|
|
5268
5465
|
updated_at: z27.string().nullable(),
|
|
5269
5466
|
last_run_at: z27.string().nullable(),
|
|
@@ -8010,7 +8207,9 @@ var TABLE_COLUMNS2 = [
|
|
|
8010
8207
|
}
|
|
8011
8208
|
];
|
|
8012
8209
|
function registerAgentsCaseTriggersList(caseTriggers) {
|
|
8013
|
-
caseTriggers.command("list <agent-id>", { isDefault: true }).description(
|
|
8210
|
+
caseTriggers.command("list <agent-id>", { isDefault: true }).description(
|
|
8211
|
+
"List case triggers configured for an agent (use to find the trigger ID for get / update / delete)"
|
|
8212
|
+
).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(agentId, options) {
|
|
8014
8213
|
const id = trimRequired(agentId, "<agent-id>");
|
|
8015
8214
|
const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
|
|
8016
8215
|
const raw = await httpRequest({
|
|
@@ -8149,7 +8348,9 @@ function renderTriggerDetails3(trigger) {
|
|
|
8149
8348
|
}
|
|
8150
8349
|
__name(renderTriggerDetails3, "renderTriggerDetails");
|
|
8151
8350
|
function registerAgentsCaseTriggersUpdate(caseTriggers) {
|
|
8152
|
-
caseTriggers.command("update <agent-id> <trigger-id>").description(
|
|
8351
|
+
caseTriggers.command("update <agent-id> <trigger-id>").description(
|
|
8352
|
+
"Update a case trigger \u2014 enable, disable, change its queue, or set concurrency"
|
|
8353
|
+
).option("--queue <id>", "new queue ID").option("--enable", "enable the trigger").option("--disable", "disable the trigger").option("--concurrency <n>", "new max number of concurrent runs").option("--clear-concurrency", "remove the concurrency limit (unlimited)").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function updateAction(agentId, triggerId, options) {
|
|
8153
8354
|
const trimmedAgentId = trimRequired(agentId, "<agent-id>");
|
|
8154
8355
|
const trimmedTriggerId = trimRequired(triggerId, "<trigger-id>");
|
|
8155
8356
|
const body = buildBody2(options);
|
|
@@ -9494,6 +9695,51 @@ function registerBuildsList(builds) {
|
|
|
9494
9695
|
}
|
|
9495
9696
|
__name(registerBuildsList, "registerBuildsList");
|
|
9496
9697
|
|
|
9698
|
+
// src/commands/builds/promote.ts
|
|
9699
|
+
import { z as z61 } from "zod";
|
|
9700
|
+
var promoteResponseSchema = z61.object({
|
|
9701
|
+
success: z61.boolean()
|
|
9702
|
+
});
|
|
9703
|
+
function registerBuildsPromote(builds) {
|
|
9704
|
+
builds.command("promote <id>").description(
|
|
9705
|
+
"Promote a draft or historic revision to live. The live revision is used by triggers and new runs."
|
|
9706
|
+
).option(
|
|
9707
|
+
"--name <text>",
|
|
9708
|
+
"display name to set on the promoted revision (1-80 chars)"
|
|
9709
|
+
).option("--description <text>", "description for the promoted revision").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function promoteAction(id, options) {
|
|
9710
|
+
const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
|
|
9711
|
+
const body = {};
|
|
9712
|
+
if (options.name !== void 0) {
|
|
9713
|
+
body.revision_name = options.name;
|
|
9714
|
+
}
|
|
9715
|
+
if (options.description !== void 0) {
|
|
9716
|
+
body.revision_description = options.description;
|
|
9717
|
+
}
|
|
9718
|
+
const raw = await httpRequest({
|
|
9719
|
+
method: "POST",
|
|
9720
|
+
path: `/v1/revisions/${encodeURIComponent(id)}/promote`,
|
|
9721
|
+
apiKey,
|
|
9722
|
+
apiBaseUrl,
|
|
9723
|
+
body
|
|
9724
|
+
});
|
|
9725
|
+
if (options.json) {
|
|
9726
|
+
printJson(raw);
|
|
9727
|
+
return;
|
|
9728
|
+
}
|
|
9729
|
+
const parsed = promoteResponseSchema.safeParse(raw);
|
|
9730
|
+
if (!parsed.success) {
|
|
9731
|
+
throw new CliError(
|
|
9732
|
+
`Unexpected response from the API: ${parsed.error.message}`
|
|
9733
|
+
);
|
|
9734
|
+
}
|
|
9735
|
+
if (!parsed.data.success) {
|
|
9736
|
+
throw new CliError("Promotion failed.");
|
|
9737
|
+
}
|
|
9738
|
+
console.log(green(`Revision "${id}" promoted to live!`));
|
|
9739
|
+
}, "promoteAction"));
|
|
9740
|
+
}
|
|
9741
|
+
__name(registerBuildsPromote, "registerBuildsPromote");
|
|
9742
|
+
|
|
9497
9743
|
// src/commands/builds/update.ts
|
|
9498
9744
|
function registerBuildsUpdate(builds) {
|
|
9499
9745
|
builds.command("update <revision-id>").description(
|
|
@@ -9561,6 +9807,7 @@ function registerBuilds(program) {
|
|
|
9561
9807
|
registerBuildsGet(builds);
|
|
9562
9808
|
registerBuildsCreate(builds);
|
|
9563
9809
|
registerBuildsUpdate(builds);
|
|
9810
|
+
registerBuildsPromote(builds);
|
|
9564
9811
|
}
|
|
9565
9812
|
__name(registerBuilds, "registerBuilds");
|
|
9566
9813
|
|
|
@@ -9925,7 +10172,7 @@ function registerCasesCreate(cases) {
|
|
|
9925
10172
|
[]
|
|
9926
10173
|
).option(
|
|
9927
10174
|
"--from-file <path>",
|
|
9928
|
-
'JSON file with a single case object or an array of cases (max 100). "-" reads from stdin.'
|
|
10175
|
+
'JSON file with a single case object or an array of cases (max 100). Each case: {"title":"\u2026","data":"\u2026","labels":[{"key":"\u2026","value":"\u2026"}]}. "-" reads from stdin.'
|
|
9929
10176
|
).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function createAction(options) {
|
|
9930
10177
|
const body = await buildRequestBody(options);
|
|
9931
10178
|
const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
|
|
@@ -10460,7 +10707,11 @@ function parseSortOrder(raw) {
|
|
|
10460
10707
|
__name(parseSortOrder, "parseSortOrder");
|
|
10461
10708
|
|
|
10462
10709
|
// src/commands/cases/runs.ts
|
|
10463
|
-
|
|
10710
|
+
import { z as z62 } from "zod";
|
|
10711
|
+
var MIN_LIMIT4 = 1;
|
|
10712
|
+
var MAX_LIMIT4 = 10;
|
|
10713
|
+
var DEFAULT_LIMIT4 = 3;
|
|
10714
|
+
var RUNS_TABLE_COLUMNS = [
|
|
10464
10715
|
{ header: "RUN ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
|
|
10465
10716
|
{ header: "AGENT", cell: /* @__PURE__ */ __name((row) => row.agent_name, "cell") },
|
|
10466
10717
|
{ header: "STATUS", cell: /* @__PURE__ */ __name((row) => row.status, "cell") },
|
|
@@ -10474,8 +10725,46 @@ var TABLE_COLUMNS12 = [
|
|
|
10474
10725
|
cell: /* @__PURE__ */ __name((row) => row.has_pending_human_request ? row.pending_human_request_title ?? "(unknown)" : "", "cell")
|
|
10475
10726
|
}
|
|
10476
10727
|
];
|
|
10728
|
+
var recentMessageSchema = z62.object({
|
|
10729
|
+
id: z62.string(),
|
|
10730
|
+
type: z62.string(),
|
|
10731
|
+
role: z62.string(),
|
|
10732
|
+
timestamp: z62.string(),
|
|
10733
|
+
text_content: z62.string().nullish(),
|
|
10734
|
+
tool_call: z62.object({ id: z62.string(), name: z62.string() }).passthrough().nullish(),
|
|
10735
|
+
tool_result: z62.object({ tool_call_id: z62.string() }).passthrough().nullish()
|
|
10736
|
+
});
|
|
10737
|
+
var recentMessagesResponseSchema = z62.object({
|
|
10738
|
+
messages: z62.array(recentMessageSchema)
|
|
10739
|
+
});
|
|
10740
|
+
var TEXT_PREVIEW_WIDTH = 60;
|
|
10741
|
+
var MESSAGES_TABLE_COLUMNS = [
|
|
10742
|
+
{ header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
|
|
10743
|
+
{ header: "ROLE", cell: /* @__PURE__ */ __name((row) => row.role, "cell") },
|
|
10744
|
+
{ header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
|
|
10745
|
+
{ header: "TIMESTAMP", cell: /* @__PURE__ */ __name((row) => row.timestamp, "cell") },
|
|
10746
|
+
{
|
|
10747
|
+
header: "PREVIEW",
|
|
10748
|
+
cell: previewMessageCell,
|
|
10749
|
+
maxWidth: TEXT_PREVIEW_WIDTH
|
|
10750
|
+
}
|
|
10751
|
+
];
|
|
10752
|
+
function previewMessageCell(row) {
|
|
10753
|
+
if (row.text_content) {
|
|
10754
|
+
return row.text_content.replace(/\s+/g, " ").trim();
|
|
10755
|
+
}
|
|
10756
|
+
if (row.tool_call) {
|
|
10757
|
+
return `tool_call ${row.tool_call.name}`;
|
|
10758
|
+
}
|
|
10759
|
+
if (row.tool_result) {
|
|
10760
|
+
return `tool_result ${row.tool_result.tool_call_id}`;
|
|
10761
|
+
}
|
|
10762
|
+
return "";
|
|
10763
|
+
}
|
|
10764
|
+
__name(previewMessageCell, "previewMessageCell");
|
|
10477
10765
|
function registerCasesRuns(cases) {
|
|
10478
|
-
cases.command("runs
|
|
10766
|
+
const runs = cases.command("runs").description("Manage jobs (agent runs) for a case");
|
|
10767
|
+
runs.command("list <case-id>", { isDefault: true }).description("List jobs (agent runs) that have worked on a case").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(caseId, options) {
|
|
10479
10768
|
const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
|
|
10480
10769
|
const raw = await httpRequest({
|
|
10481
10770
|
method: "GET",
|
|
@@ -10497,11 +10786,66 @@ function registerCasesRuns(cases) {
|
|
|
10497
10786
|
console.log("No runs found for this case.");
|
|
10498
10787
|
return;
|
|
10499
10788
|
}
|
|
10500
|
-
console.log(renderTable(
|
|
10789
|
+
console.log(renderTable(RUNS_TABLE_COLUMNS, parsed.data.runs));
|
|
10501
10790
|
console.log(`Showing ${parsed.data.runs.length}`);
|
|
10502
|
-
}, "
|
|
10791
|
+
}, "listAction"));
|
|
10792
|
+
runs.command("recent-messages <case-id> <run-id>").description(
|
|
10793
|
+
"Show the latest messages from a Job on a case (assistant text and tool calls)"
|
|
10794
|
+
).option(
|
|
10795
|
+
"--limit <n>",
|
|
10796
|
+
`number of messages to return (${MIN_LIMIT4}-${MAX_LIMIT4}, default ${DEFAULT_LIMIT4})`
|
|
10797
|
+
).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function recentMessagesAction(caseId, runId, options) {
|
|
10798
|
+
const limit = parseRecentMessageLimit(options.limit);
|
|
10799
|
+
const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
|
|
10800
|
+
const searchParams = new URLSearchParams();
|
|
10801
|
+
if (limit !== DEFAULT_LIMIT4) {
|
|
10802
|
+
searchParams.append("limit", String(limit));
|
|
10803
|
+
}
|
|
10804
|
+
const raw = await httpRequest({
|
|
10805
|
+
method: "GET",
|
|
10806
|
+
path: `/v1/cases/${encodeURIComponent(caseId)}/runs/${encodeURIComponent(runId)}/recent-messages`,
|
|
10807
|
+
apiKey,
|
|
10808
|
+
apiBaseUrl,
|
|
10809
|
+
searchParams: searchParams.size > 0 ? searchParams : void 0
|
|
10810
|
+
});
|
|
10811
|
+
if (options.json) {
|
|
10812
|
+
printJson(raw);
|
|
10813
|
+
return;
|
|
10814
|
+
}
|
|
10815
|
+
const parsed = recentMessagesResponseSchema.safeParse(raw);
|
|
10816
|
+
if (!parsed.success) {
|
|
10817
|
+
throw new CliError(
|
|
10818
|
+
`Unexpected response from the API: ${parsed.error.message}`
|
|
10819
|
+
);
|
|
10820
|
+
}
|
|
10821
|
+
if (parsed.data.messages.length === 0) {
|
|
10822
|
+
console.log("No recent messages found.");
|
|
10823
|
+
return;
|
|
10824
|
+
}
|
|
10825
|
+
console.log(renderTable(MESSAGES_TABLE_COLUMNS, parsed.data.messages));
|
|
10826
|
+
console.log(
|
|
10827
|
+
renderKeyValue([
|
|
10828
|
+
{ label: "Case", value: caseId },
|
|
10829
|
+
{ label: "Run", value: runId },
|
|
10830
|
+
{ label: "Messages", value: String(parsed.data.messages.length) }
|
|
10831
|
+
])
|
|
10832
|
+
);
|
|
10833
|
+
}, "recentMessagesAction"));
|
|
10503
10834
|
}
|
|
10504
10835
|
__name(registerCasesRuns, "registerCasesRuns");
|
|
10836
|
+
function parseRecentMessageLimit(raw) {
|
|
10837
|
+
if (raw === void 0) {
|
|
10838
|
+
return DEFAULT_LIMIT4;
|
|
10839
|
+
}
|
|
10840
|
+
const value = Number.parseInt(raw, 10);
|
|
10841
|
+
if (Number.isNaN(value) || value < MIN_LIMIT4 || value > MAX_LIMIT4) {
|
|
10842
|
+
throw new CliError(
|
|
10843
|
+
`--limit must be an integer between ${MIN_LIMIT4} and ${MAX_LIMIT4}`
|
|
10844
|
+
);
|
|
10845
|
+
}
|
|
10846
|
+
return value;
|
|
10847
|
+
}
|
|
10848
|
+
__name(parseRecentMessageLimit, "parseRecentMessageLimit");
|
|
10505
10849
|
|
|
10506
10850
|
// src/commands/cases/index.ts
|
|
10507
10851
|
function registerCases(program) {
|
|
@@ -10776,7 +11120,7 @@ function registerConnectionsGet(connections) {
|
|
|
10776
11120
|
__name(registerConnectionsGet, "registerConnectionsGet");
|
|
10777
11121
|
|
|
10778
11122
|
// src/commands/connections/list.ts
|
|
10779
|
-
var
|
|
11123
|
+
var TABLE_COLUMNS12 = [
|
|
10780
11124
|
{ header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
|
|
10781
11125
|
{ header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
|
|
10782
11126
|
{ header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
|
|
@@ -10812,26 +11156,26 @@ function registerConnectionsList(connections) {
|
|
|
10812
11156
|
console.log("No connections found.");
|
|
10813
11157
|
return;
|
|
10814
11158
|
}
|
|
10815
|
-
console.log(renderTable(
|
|
11159
|
+
console.log(renderTable(TABLE_COLUMNS12, rows));
|
|
10816
11160
|
console.log(`Showing ${rows.length}`);
|
|
10817
11161
|
}, "listAction"));
|
|
10818
11162
|
}
|
|
10819
11163
|
__name(registerConnectionsList, "registerConnectionsList");
|
|
10820
11164
|
|
|
10821
11165
|
// src/commands/connections/probe.ts
|
|
10822
|
-
import { z as
|
|
10823
|
-
var toolSchema =
|
|
10824
|
-
name:
|
|
10825
|
-
description:
|
|
10826
|
-
input_schema:
|
|
11166
|
+
import { z as z63 } from "zod";
|
|
11167
|
+
var toolSchema = z63.object({
|
|
11168
|
+
name: z63.string(),
|
|
11169
|
+
description: z63.string().optional(),
|
|
11170
|
+
input_schema: z63.record(z63.string(), z63.unknown()).optional()
|
|
10827
11171
|
});
|
|
10828
|
-
var probeResponseSchema =
|
|
10829
|
-
success:
|
|
10830
|
-
tools:
|
|
10831
|
-
error:
|
|
11172
|
+
var probeResponseSchema = z63.object({
|
|
11173
|
+
success: z63.boolean(),
|
|
11174
|
+
tools: z63.array(toolSchema).optional(),
|
|
11175
|
+
error: z63.string().optional()
|
|
10832
11176
|
});
|
|
10833
11177
|
var DESCRIPTION_MAX_WIDTH = 80;
|
|
10834
|
-
var
|
|
11178
|
+
var TABLE_COLUMNS13 = [
|
|
10835
11179
|
{ header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
|
|
10836
11180
|
{
|
|
10837
11181
|
header: "DESCRIPTION",
|
|
@@ -10887,7 +11231,7 @@ function registerConnectionsProbe(connections) {
|
|
|
10887
11231
|
console.log("No tools found.");
|
|
10888
11232
|
return;
|
|
10889
11233
|
}
|
|
10890
|
-
console.log(renderTable(
|
|
11234
|
+
console.log(renderTable(TABLE_COLUMNS13, tools));
|
|
10891
11235
|
console.log(
|
|
10892
11236
|
`Showing ${tools.length} tool${tools.length === 1 ? "" : "s"}`
|
|
10893
11237
|
);
|
|
@@ -11198,7 +11542,7 @@ function registerFilesDownloadUrl(files) {
|
|
|
11198
11542
|
__name(registerFilesDownloadUrl, "registerFilesDownloadUrl");
|
|
11199
11543
|
|
|
11200
11544
|
// src/commands/files/list.ts
|
|
11201
|
-
var
|
|
11545
|
+
var TABLE_COLUMNS14 = [
|
|
11202
11546
|
{ header: "PATH", cell: /* @__PURE__ */ __name((row) => row.path, "cell") },
|
|
11203
11547
|
{ header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
|
|
11204
11548
|
{
|
|
@@ -11237,7 +11581,7 @@ function registerFilesList(files) {
|
|
|
11237
11581
|
console.log("No files found.");
|
|
11238
11582
|
return;
|
|
11239
11583
|
}
|
|
11240
|
-
console.log(renderTable(
|
|
11584
|
+
console.log(renderTable(TABLE_COLUMNS14, parsed.data.files));
|
|
11241
11585
|
console.log(`Showing ${parsed.data.files.length}`);
|
|
11242
11586
|
}, "listAction"));
|
|
11243
11587
|
}
|
|
@@ -11487,7 +11831,7 @@ function registerIntegrationsCustom(integrations) {
|
|
|
11487
11831
|
__name(registerIntegrationsCustom, "registerIntegrationsCustom");
|
|
11488
11832
|
|
|
11489
11833
|
// src/commands/integrations/list.ts
|
|
11490
|
-
var
|
|
11834
|
+
var TABLE_COLUMNS15 = [
|
|
11491
11835
|
{ header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
|
|
11492
11836
|
{ header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
|
|
11493
11837
|
{ header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
|
|
@@ -11521,7 +11865,7 @@ function registerIntegrationsList(integrations) {
|
|
|
11521
11865
|
console.log("No integrations found.");
|
|
11522
11866
|
return;
|
|
11523
11867
|
}
|
|
11524
|
-
console.log(renderTable(
|
|
11868
|
+
console.log(renderTable(TABLE_COLUMNS15, rows));
|
|
11525
11869
|
console.log(`Showing ${rows.length}`);
|
|
11526
11870
|
}, "listAction"));
|
|
11527
11871
|
}
|
|
@@ -12348,7 +12692,7 @@ function parseHeaders(raw) {
|
|
|
12348
12692
|
return result;
|
|
12349
12693
|
}
|
|
12350
12694
|
__name(parseHeaders, "parseHeaders");
|
|
12351
|
-
var
|
|
12695
|
+
var TABLE_COLUMNS16 = [
|
|
12352
12696
|
{ header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
|
|
12353
12697
|
{ header: "DESCRIPTION", cell: /* @__PURE__ */ __name((row) => row.description, "cell") }
|
|
12354
12698
|
];
|
|
@@ -12402,7 +12746,7 @@ function registerOauthMcpProbe(mcp) {
|
|
|
12402
12746
|
console.log("No tools advertised by this MCP server.");
|
|
12403
12747
|
return;
|
|
12404
12748
|
}
|
|
12405
|
-
console.log(renderTable(
|
|
12749
|
+
console.log(renderTable(TABLE_COLUMNS16, rows));
|
|
12406
12750
|
console.log(`Showing ${rows.length}`);
|
|
12407
12751
|
}, "probeMcpAction"));
|
|
12408
12752
|
}
|
|
@@ -12477,7 +12821,7 @@ function registerOauth(program) {
|
|
|
12477
12821
|
__name(registerOauth, "registerOauth");
|
|
12478
12822
|
|
|
12479
12823
|
// src/commands/plugins/list.ts
|
|
12480
|
-
var
|
|
12824
|
+
var TABLE_COLUMNS17 = [
|
|
12481
12825
|
{ header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
|
|
12482
12826
|
{ header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
|
|
12483
12827
|
{
|
|
@@ -12511,7 +12855,7 @@ function registerPluginsList(plugins) {
|
|
|
12511
12855
|
console.log("No plugins found.");
|
|
12512
12856
|
return;
|
|
12513
12857
|
}
|
|
12514
|
-
console.log(renderTable(
|
|
12858
|
+
console.log(renderTable(TABLE_COLUMNS17, parsed.data.plugins));
|
|
12515
12859
|
console.log(`Showing ${parsed.data.plugins.length}`);
|
|
12516
12860
|
}, "listAction"));
|
|
12517
12861
|
}
|
|
@@ -12709,7 +13053,7 @@ function registerProfiles(program) {
|
|
|
12709
13053
|
__name(registerProfiles, "registerProfiles");
|
|
12710
13054
|
|
|
12711
13055
|
// src/commands/queue-labels/index.ts
|
|
12712
|
-
var
|
|
13056
|
+
var TABLE_COLUMNS18 = [
|
|
12713
13057
|
{ header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
|
|
12714
13058
|
{ header: "KEY", cell: /* @__PURE__ */ __name((row) => row.key, "cell") },
|
|
12715
13059
|
{ header: "VALUE", cell: /* @__PURE__ */ __name((row) => row.value, "cell") },
|
|
@@ -12763,7 +13107,7 @@ function registerList2(labels) {
|
|
|
12763
13107
|
console.log("No labels defined on this queue.");
|
|
12764
13108
|
return;
|
|
12765
13109
|
}
|
|
12766
|
-
console.log(renderTable(
|
|
13110
|
+
console.log(renderTable(TABLE_COLUMNS18, parsed.data.labels));
|
|
12767
13111
|
console.log(`Showing ${parsed.data.labels.length}`);
|
|
12768
13112
|
}, "listAction"));
|
|
12769
13113
|
}
|
|
@@ -13121,10 +13465,10 @@ function registerQueuesGet(queues) {
|
|
|
13121
13465
|
__name(registerQueuesGet, "registerQueuesGet");
|
|
13122
13466
|
|
|
13123
13467
|
// src/commands/queues/list.ts
|
|
13124
|
-
var
|
|
13125
|
-
var
|
|
13126
|
-
var
|
|
13127
|
-
var
|
|
13468
|
+
var DEFAULT_LIMIT5 = 20;
|
|
13469
|
+
var MIN_LIMIT5 = 1;
|
|
13470
|
+
var MAX_LIMIT5 = 100;
|
|
13471
|
+
var TABLE_COLUMNS19 = [
|
|
13128
13472
|
{ header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
|
|
13129
13473
|
{ header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
|
|
13130
13474
|
{
|
|
@@ -13135,11 +13479,11 @@ var TABLE_COLUMNS20 = [
|
|
|
13135
13479
|
{ header: "CREATED", cell: /* @__PURE__ */ __name((row) => row.created_at ?? "", "cell") }
|
|
13136
13480
|
];
|
|
13137
13481
|
function registerQueuesList(queues) {
|
|
13138
|
-
queues.command("list", { isDefault: true }).description("List case queues for your team").option("--limit <n>", `page size (${
|
|
13482
|
+
queues.command("list", { isDefault: true }).description("List case queues for your team").option("--limit <n>", `page size (${MIN_LIMIT5}-${MAX_LIMIT5})`).option("--offset <n>", "number of queues to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(options) {
|
|
13139
13483
|
const limit = parseLimit(options.limit, {
|
|
13140
|
-
defaultValue:
|
|
13141
|
-
min:
|
|
13142
|
-
max:
|
|
13484
|
+
defaultValue: DEFAULT_LIMIT5,
|
|
13485
|
+
min: MIN_LIMIT5,
|
|
13486
|
+
max: MAX_LIMIT5
|
|
13143
13487
|
});
|
|
13144
13488
|
const offset = parseOffset(options.offset);
|
|
13145
13489
|
const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
|
|
@@ -13168,7 +13512,7 @@ function registerQueuesList(queues) {
|
|
|
13168
13512
|
console.log("No queues found.");
|
|
13169
13513
|
return;
|
|
13170
13514
|
}
|
|
13171
|
-
console.log(renderTable(
|
|
13515
|
+
console.log(renderTable(TABLE_COLUMNS19, response.queues));
|
|
13172
13516
|
const resolvedOffset = response.offset ?? offset;
|
|
13173
13517
|
const total = response.total ?? null;
|
|
13174
13518
|
const summary = total === null ? `Showing ${response.queues.length} \xB7 offset ${resolvedOffset}` : `Showing ${response.queues.length} of ${total} \xB7 offset ${resolvedOffset}`;
|
|
@@ -13270,91 +13614,91 @@ function registerQueues(program) {
|
|
|
13270
13614
|
__name(registerQueues, "registerQueues");
|
|
13271
13615
|
|
|
13272
13616
|
// src/api/run-schemas.ts
|
|
13273
|
-
import { z as
|
|
13274
|
-
var publicRunSchema =
|
|
13275
|
-
id:
|
|
13276
|
-
agent_id:
|
|
13277
|
-
build_id:
|
|
13278
|
-
status:
|
|
13279
|
-
source:
|
|
13280
|
-
sandbox_id:
|
|
13281
|
-
started_at:
|
|
13282
|
-
completed_at:
|
|
13283
|
-
created_at:
|
|
13284
|
-
updated_at:
|
|
13285
|
-
human_in_the_loop_enabled:
|
|
13286
|
-
});
|
|
13287
|
-
var startRunResponseSchema =
|
|
13617
|
+
import { z as z64 } from "zod";
|
|
13618
|
+
var publicRunSchema = z64.object({
|
|
13619
|
+
id: z64.string(),
|
|
13620
|
+
agent_id: z64.string(),
|
|
13621
|
+
build_id: z64.string(),
|
|
13622
|
+
status: z64.string(),
|
|
13623
|
+
source: z64.string().nullish(),
|
|
13624
|
+
sandbox_id: z64.string().nullish(),
|
|
13625
|
+
started_at: z64.string().nullish(),
|
|
13626
|
+
completed_at: z64.string().nullish(),
|
|
13627
|
+
created_at: z64.string(),
|
|
13628
|
+
updated_at: z64.string().nullish(),
|
|
13629
|
+
human_in_the_loop_enabled: z64.boolean().nullish()
|
|
13630
|
+
});
|
|
13631
|
+
var startRunResponseSchema = z64.object({
|
|
13288
13632
|
run: publicRunSchema
|
|
13289
13633
|
});
|
|
13290
|
-
var questionOptionSchema =
|
|
13291
|
-
label:
|
|
13292
|
-
description:
|
|
13293
|
-
});
|
|
13294
|
-
var questionSchema =
|
|
13295
|
-
question:
|
|
13296
|
-
header:
|
|
13297
|
-
options:
|
|
13298
|
-
multi_select:
|
|
13299
|
-
});
|
|
13300
|
-
var pendingHumanRequestSchema =
|
|
13301
|
-
id:
|
|
13302
|
-
title:
|
|
13303
|
-
description:
|
|
13304
|
-
created_at:
|
|
13305
|
-
type:
|
|
13306
|
-
questions:
|
|
13307
|
-
});
|
|
13308
|
-
var getRunResponseSchema =
|
|
13634
|
+
var questionOptionSchema = z64.object({
|
|
13635
|
+
label: z64.string(),
|
|
13636
|
+
description: z64.string().nullish()
|
|
13637
|
+
});
|
|
13638
|
+
var questionSchema = z64.object({
|
|
13639
|
+
question: z64.string(),
|
|
13640
|
+
header: z64.string().nullish(),
|
|
13641
|
+
options: z64.array(questionOptionSchema).nullish(),
|
|
13642
|
+
multi_select: z64.boolean().nullish()
|
|
13643
|
+
});
|
|
13644
|
+
var pendingHumanRequestSchema = z64.object({
|
|
13645
|
+
id: z64.string(),
|
|
13646
|
+
title: z64.string(),
|
|
13647
|
+
description: z64.string().nullish(),
|
|
13648
|
+
created_at: z64.string(),
|
|
13649
|
+
type: z64.string(),
|
|
13650
|
+
questions: z64.array(questionSchema).nullish()
|
|
13651
|
+
});
|
|
13652
|
+
var getRunResponseSchema = z64.object({
|
|
13309
13653
|
run: publicRunSchema.nullable(),
|
|
13310
13654
|
pending_human_request: pendingHumanRequestSchema.nullish()
|
|
13311
13655
|
});
|
|
13312
|
-
var stopRunResponseSchema =
|
|
13313
|
-
success:
|
|
13314
|
-
message:
|
|
13315
|
-
});
|
|
13316
|
-
var runMessageSchema =
|
|
13317
|
-
id:
|
|
13318
|
-
type:
|
|
13319
|
-
role:
|
|
13320
|
-
timestamp:
|
|
13321
|
-
text_content:
|
|
13322
|
-
tool_call:
|
|
13323
|
-
id:
|
|
13324
|
-
name:
|
|
13325
|
-
arguments:
|
|
13656
|
+
var stopRunResponseSchema = z64.object({
|
|
13657
|
+
success: z64.boolean(),
|
|
13658
|
+
message: z64.string().nullish()
|
|
13659
|
+
});
|
|
13660
|
+
var runMessageSchema = z64.object({
|
|
13661
|
+
id: z64.string(),
|
|
13662
|
+
type: z64.string(),
|
|
13663
|
+
role: z64.string(),
|
|
13664
|
+
timestamp: z64.string(),
|
|
13665
|
+
text_content: z64.string().nullish(),
|
|
13666
|
+
tool_call: z64.object({
|
|
13667
|
+
id: z64.string(),
|
|
13668
|
+
name: z64.string(),
|
|
13669
|
+
arguments: z64.record(z64.string(), z64.unknown()).nullish()
|
|
13326
13670
|
}).nullish(),
|
|
13327
|
-
tool_result:
|
|
13328
|
-
tool_call_id:
|
|
13329
|
-
result:
|
|
13330
|
-
error:
|
|
13671
|
+
tool_result: z64.object({
|
|
13672
|
+
tool_call_id: z64.string(),
|
|
13673
|
+
result: z64.unknown().nullish(),
|
|
13674
|
+
error: z64.string().nullish()
|
|
13331
13675
|
}).nullish()
|
|
13332
13676
|
});
|
|
13333
|
-
var listRunMessagesResponseSchema =
|
|
13334
|
-
messages:
|
|
13335
|
-
total:
|
|
13336
|
-
limit:
|
|
13337
|
-
offset:
|
|
13677
|
+
var listRunMessagesResponseSchema = z64.object({
|
|
13678
|
+
messages: z64.array(runMessageSchema),
|
|
13679
|
+
total: z64.number().nullish(),
|
|
13680
|
+
limit: z64.number().nullish(),
|
|
13681
|
+
offset: z64.number().nullish()
|
|
13338
13682
|
});
|
|
13339
|
-
var postedMessageSchema =
|
|
13340
|
-
id:
|
|
13341
|
-
type:
|
|
13342
|
-
role:
|
|
13343
|
-
timestamp:
|
|
13344
|
-
text_content:
|
|
13683
|
+
var postedMessageSchema = z64.object({
|
|
13684
|
+
id: z64.string(),
|
|
13685
|
+
type: z64.string(),
|
|
13686
|
+
role: z64.string(),
|
|
13687
|
+
timestamp: z64.string(),
|
|
13688
|
+
text_content: z64.string()
|
|
13345
13689
|
});
|
|
13346
|
-
var postRunMessageResponseSchema =
|
|
13690
|
+
var postRunMessageResponseSchema = z64.object({
|
|
13347
13691
|
message: postedMessageSchema
|
|
13348
13692
|
});
|
|
13349
|
-
var respondHumanRequestResponseSchema =
|
|
13350
|
-
human_request:
|
|
13351
|
-
id:
|
|
13352
|
-
run_id:
|
|
13353
|
-
title:
|
|
13354
|
-
description:
|
|
13355
|
-
response:
|
|
13356
|
-
responded_at:
|
|
13357
|
-
created_at:
|
|
13693
|
+
var respondHumanRequestResponseSchema = z64.object({
|
|
13694
|
+
human_request: z64.object({
|
|
13695
|
+
id: z64.string(),
|
|
13696
|
+
run_id: z64.string(),
|
|
13697
|
+
title: z64.string(),
|
|
13698
|
+
description: z64.string().nullish(),
|
|
13699
|
+
response: z64.string().nullish(),
|
|
13700
|
+
responded_at: z64.string().nullish(),
|
|
13701
|
+
created_at: z64.string()
|
|
13358
13702
|
})
|
|
13359
13703
|
});
|
|
13360
13704
|
|
|
@@ -13417,13 +13761,13 @@ function registerRunsGet(runs) {
|
|
|
13417
13761
|
__name(registerRunsGet, "registerRunsGet");
|
|
13418
13762
|
|
|
13419
13763
|
// src/commands/runs/list.ts
|
|
13420
|
-
var
|
|
13421
|
-
var
|
|
13422
|
-
var
|
|
13764
|
+
var DEFAULT_LIMIT6 = 20;
|
|
13765
|
+
var MIN_LIMIT6 = 1;
|
|
13766
|
+
var MAX_LIMIT6 = 100;
|
|
13423
13767
|
var SORT_ORDERS2 = ["asc", "desc"];
|
|
13424
13768
|
var HAS_ISSUES_VALUES = ["true", "false"];
|
|
13425
13769
|
var TITLE_PREVIEW_WIDTH = 50;
|
|
13426
|
-
var
|
|
13770
|
+
var TABLE_COLUMNS20 = [
|
|
13427
13771
|
{ header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
|
|
13428
13772
|
{ header: "RUN#", cell: /* @__PURE__ */ __name((row) => String(row.run_number), "cell") },
|
|
13429
13773
|
{ header: "STATUS", cell: /* @__PURE__ */ __name((row) => row.status, "cell") },
|
|
@@ -13447,7 +13791,7 @@ function isHasIssuesValue(value) {
|
|
|
13447
13791
|
}
|
|
13448
13792
|
__name(isHasIssuesValue, "isHasIssuesValue");
|
|
13449
13793
|
function registerRunsList(runs) {
|
|
13450
|
-
runs.command("list").description("List agent runs for your team").option("--limit <n>", `page size (${
|
|
13794
|
+
runs.command("list").description("List agent runs for your team").option("--limit <n>", `page size (${MIN_LIMIT6}-${MAX_LIMIT6})`).option("--offset <n>", "number of runs to skip").option("--sort-order <order>", `sort direction (${SORT_ORDERS2.join("|")})`).option(
|
|
13451
13795
|
"--status <status>",
|
|
13452
13796
|
"filter by status (e.g. running, completed, failed, waiting, interrupted, stopped, needs_attention)"
|
|
13453
13797
|
).option("--agent <id>", "filter by agent ID").option("--user <id>", "filter by user ID").option("--case-queue <id>", "filter by case queue ID").option("--source <source>", "filter by source").option("--search <query>", "free-text search across runs").option(
|
|
@@ -13455,9 +13799,9 @@ function registerRunsList(runs) {
|
|
|
13455
13799
|
`show only runs with (or without) issues (${HAS_ISSUES_VALUES.join("|")})`
|
|
13456
13800
|
).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(options) {
|
|
13457
13801
|
const limit = parseLimit(options.limit, {
|
|
13458
|
-
defaultValue:
|
|
13459
|
-
min:
|
|
13460
|
-
max:
|
|
13802
|
+
defaultValue: DEFAULT_LIMIT6,
|
|
13803
|
+
min: MIN_LIMIT6,
|
|
13804
|
+
max: MAX_LIMIT6
|
|
13461
13805
|
});
|
|
13462
13806
|
const offset = parseOffset(options.offset);
|
|
13463
13807
|
if (options.sortOrder !== void 0 && !isSortOrder(options.sortOrder)) {
|
|
@@ -13520,7 +13864,7 @@ function registerRunsList(runs) {
|
|
|
13520
13864
|
console.log("No runs found.");
|
|
13521
13865
|
return;
|
|
13522
13866
|
}
|
|
13523
|
-
console.log(renderTable(
|
|
13867
|
+
console.log(renderTable(TABLE_COLUMNS20, response.data));
|
|
13524
13868
|
console.log(
|
|
13525
13869
|
`Showing ${response.data.length} of ${response.total} \xB7 offset ${offset}`
|
|
13526
13870
|
);
|
|
@@ -13529,11 +13873,11 @@ function registerRunsList(runs) {
|
|
|
13529
13873
|
__name(registerRunsList, "registerRunsList");
|
|
13530
13874
|
|
|
13531
13875
|
// src/commands/runs/messages.ts
|
|
13532
|
-
var
|
|
13533
|
-
var
|
|
13534
|
-
var
|
|
13535
|
-
var
|
|
13536
|
-
var
|
|
13876
|
+
var DEFAULT_LIMIT7 = 20;
|
|
13877
|
+
var MIN_LIMIT7 = 1;
|
|
13878
|
+
var MAX_LIMIT7 = 50;
|
|
13879
|
+
var TEXT_PREVIEW_WIDTH2 = 60;
|
|
13880
|
+
var TABLE_COLUMNS21 = [
|
|
13537
13881
|
{ header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
|
|
13538
13882
|
{ header: "ROLE", cell: /* @__PURE__ */ __name((row) => row.role, "cell") },
|
|
13539
13883
|
{ header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
|
|
@@ -13541,7 +13885,7 @@ var TABLE_COLUMNS22 = [
|
|
|
13541
13885
|
{
|
|
13542
13886
|
header: "PREVIEW",
|
|
13543
13887
|
cell: previewCell,
|
|
13544
|
-
maxWidth:
|
|
13888
|
+
maxWidth: TEXT_PREVIEW_WIDTH2
|
|
13545
13889
|
}
|
|
13546
13890
|
];
|
|
13547
13891
|
function previewCell(row) {
|
|
@@ -13558,11 +13902,11 @@ function previewCell(row) {
|
|
|
13558
13902
|
}
|
|
13559
13903
|
__name(previewCell, "previewCell");
|
|
13560
13904
|
function registerRunsMessages(runs) {
|
|
13561
|
-
runs.command("messages <id>").description("List messages for an agent run").option("--limit <n>", `page size (${
|
|
13905
|
+
runs.command("messages <id>").description("List messages for an agent run").option("--limit <n>", `page size (${MIN_LIMIT7}-${MAX_LIMIT7})`).option("--offset <n>", "number of messages to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function messagesAction(id, options) {
|
|
13562
13906
|
const limit = parseLimit(options.limit, {
|
|
13563
|
-
defaultValue:
|
|
13564
|
-
min:
|
|
13565
|
-
max:
|
|
13907
|
+
defaultValue: DEFAULT_LIMIT7,
|
|
13908
|
+
min: MIN_LIMIT7,
|
|
13909
|
+
max: MAX_LIMIT7
|
|
13566
13910
|
});
|
|
13567
13911
|
const offset = parseOffset(options.offset);
|
|
13568
13912
|
const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
|
|
@@ -13591,7 +13935,7 @@ function registerRunsMessages(runs) {
|
|
|
13591
13935
|
console.log("No messages found.");
|
|
13592
13936
|
return;
|
|
13593
13937
|
}
|
|
13594
|
-
console.log(renderTable(
|
|
13938
|
+
console.log(renderTable(TABLE_COLUMNS21, response.messages));
|
|
13595
13939
|
const resolvedOffset = response.offset ?? offset;
|
|
13596
13940
|
const summary = response.total === null || response.total === void 0 ? `Showing ${response.messages.length} \xB7 offset ${resolvedOffset}` : `Showing ${response.messages.length} of ${response.total} \xB7 offset ${resolvedOffset}`;
|
|
13597
13941
|
console.log(summary);
|
|
@@ -13848,28 +14192,28 @@ function registerRuns(program) {
|
|
|
13848
14192
|
__name(registerRuns, "registerRuns");
|
|
13849
14193
|
|
|
13850
14194
|
// src/api/sandbox-schemas.ts
|
|
13851
|
-
import { z as
|
|
13852
|
-
var createSandboxResponseSchema =
|
|
13853
|
-
sandbox_id:
|
|
13854
|
-
expires_at:
|
|
14195
|
+
import { z as z65 } from "zod";
|
|
14196
|
+
var createSandboxResponseSchema = z65.object({
|
|
14197
|
+
sandbox_id: z65.string(),
|
|
14198
|
+
expires_at: z65.string()
|
|
13855
14199
|
});
|
|
13856
|
-
var createSandboxUploadUrlResponseSchema =
|
|
13857
|
-
upload_url:
|
|
13858
|
-
path:
|
|
13859
|
-
expires_in_seconds:
|
|
14200
|
+
var createSandboxUploadUrlResponseSchema = z65.object({
|
|
14201
|
+
upload_url: z65.string(),
|
|
14202
|
+
path: z65.string(),
|
|
14203
|
+
expires_in_seconds: z65.number()
|
|
13860
14204
|
});
|
|
13861
|
-
var sandboxFileSchema =
|
|
13862
|
-
name:
|
|
13863
|
-
path:
|
|
13864
|
-
type:
|
|
13865
|
-
size_bytes:
|
|
14205
|
+
var sandboxFileSchema = z65.object({
|
|
14206
|
+
name: z65.string(),
|
|
14207
|
+
path: z65.string(),
|
|
14208
|
+
type: z65.enum(["file", "dir"]),
|
|
14209
|
+
size_bytes: z65.number()
|
|
13866
14210
|
});
|
|
13867
|
-
var listSandboxFilesResponseSchema =
|
|
13868
|
-
files:
|
|
14211
|
+
var listSandboxFilesResponseSchema = z65.object({
|
|
14212
|
+
files: z65.array(sandboxFileSchema)
|
|
13869
14213
|
});
|
|
13870
|
-
var uploadSandboxFileResponseSchema =
|
|
13871
|
-
path:
|
|
13872
|
-
size_bytes:
|
|
14214
|
+
var uploadSandboxFileResponseSchema = z65.object({
|
|
14215
|
+
path: z65.string(),
|
|
14216
|
+
size_bytes: z65.number()
|
|
13873
14217
|
});
|
|
13874
14218
|
var DEFAULT_SANDBOX_FILES_PATH = "/workspace";
|
|
13875
14219
|
|
|
@@ -13906,7 +14250,7 @@ function registerSandboxesCreate(sandboxes) {
|
|
|
13906
14250
|
__name(registerSandboxesCreate, "registerSandboxesCreate");
|
|
13907
14251
|
|
|
13908
14252
|
// src/commands/sandboxes/files.ts
|
|
13909
|
-
var
|
|
14253
|
+
var TABLE_COLUMNS22 = [
|
|
13910
14254
|
{ header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
|
|
13911
14255
|
{ header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
|
|
13912
14256
|
{ header: "PATH", cell: /* @__PURE__ */ __name((row) => row.path, "cell") },
|
|
@@ -13944,7 +14288,7 @@ function registerSandboxesFiles(sandboxes) {
|
|
|
13944
14288
|
console.log("No files found.");
|
|
13945
14289
|
return;
|
|
13946
14290
|
}
|
|
13947
|
-
console.log(renderTable(
|
|
14291
|
+
console.log(renderTable(TABLE_COLUMNS22, files));
|
|
13948
14292
|
console.log(`Showing ${files.length}`);
|
|
13949
14293
|
}, "filesAction"));
|
|
13950
14294
|
}
|
|
@@ -14080,7 +14424,7 @@ function registerSandboxes(program) {
|
|
|
14080
14424
|
__name(registerSandboxes, "registerSandboxes");
|
|
14081
14425
|
|
|
14082
14426
|
// src/commands/skills/assignments.ts
|
|
14083
|
-
var
|
|
14427
|
+
var TABLE_COLUMNS23 = [
|
|
14084
14428
|
{ header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
|
|
14085
14429
|
{ header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") }
|
|
14086
14430
|
];
|
|
@@ -14108,7 +14452,7 @@ function registerSkillsAssignments(skills) {
|
|
|
14108
14452
|
console.log("No assignments use this skill.");
|
|
14109
14453
|
return;
|
|
14110
14454
|
}
|
|
14111
|
-
console.log(renderTable(
|
|
14455
|
+
console.log(renderTable(TABLE_COLUMNS23, assignments));
|
|
14112
14456
|
console.log(`Showing ${assignments.length} of ${total}`);
|
|
14113
14457
|
}, "assignmentsAction"));
|
|
14114
14458
|
}
|
|
@@ -14116,13 +14460,13 @@ __name(registerSkillsAssignments, "registerSkillsAssignments");
|
|
|
14116
14460
|
|
|
14117
14461
|
// src/commands/skills/create.ts
|
|
14118
14462
|
import { readFileSync as readFileSync4 } from "node:fs";
|
|
14119
|
-
import { z as
|
|
14120
|
-
var createSkillResponseSchema =
|
|
14121
|
-
skill:
|
|
14122
|
-
id:
|
|
14123
|
-
name:
|
|
14124
|
-
description:
|
|
14125
|
-
team_id:
|
|
14463
|
+
import { z as z66 } from "zod";
|
|
14464
|
+
var createSkillResponseSchema = z66.object({
|
|
14465
|
+
skill: z66.object({
|
|
14466
|
+
id: z66.string(),
|
|
14467
|
+
name: z66.string(),
|
|
14468
|
+
description: z66.string(),
|
|
14469
|
+
team_id: z66.string()
|
|
14126
14470
|
})
|
|
14127
14471
|
});
|
|
14128
14472
|
function registerSkillsCreate(skills) {
|
|
@@ -14386,7 +14730,7 @@ function readContent2(options) {
|
|
|
14386
14730
|
__name(readContent2, "readContent");
|
|
14387
14731
|
|
|
14388
14732
|
// src/commands/skills/files.ts
|
|
14389
|
-
var
|
|
14733
|
+
var TABLE_COLUMNS24 = [
|
|
14390
14734
|
{ header: "PATH", cell: /* @__PURE__ */ __name((row) => row.path, "cell") },
|
|
14391
14735
|
{ header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
|
|
14392
14736
|
{
|
|
@@ -14425,7 +14769,7 @@ function registerSkillsFiles(skills) {
|
|
|
14425
14769
|
console.log("No files found.");
|
|
14426
14770
|
return;
|
|
14427
14771
|
}
|
|
14428
|
-
console.log(renderTable(
|
|
14772
|
+
console.log(renderTable(TABLE_COLUMNS24, parsed.data.files));
|
|
14429
14773
|
console.log(`Showing ${parsed.data.files.length}`);
|
|
14430
14774
|
}, "filesAction"));
|
|
14431
14775
|
}
|
|
@@ -14549,16 +14893,55 @@ function registerSkillsList(skills) {
|
|
|
14549
14893
|
}
|
|
14550
14894
|
__name(registerSkillsList, "registerSkillsList");
|
|
14551
14895
|
|
|
14896
|
+
// src/commands/skills/system.ts
|
|
14897
|
+
var SYSTEM_COLUMNS2 = [
|
|
14898
|
+
{ header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
|
|
14899
|
+
{ header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
|
|
14900
|
+
{
|
|
14901
|
+
header: "DESCRIPTION",
|
|
14902
|
+
cell: /* @__PURE__ */ __name((row) => row.description, "cell"),
|
|
14903
|
+
maxWidth: 60
|
|
14904
|
+
}
|
|
14905
|
+
];
|
|
14906
|
+
function registerSkillsSystem(skills) {
|
|
14907
|
+
skills.command("system").description("List global system skills available to all teams").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function systemAction(options) {
|
|
14908
|
+
const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
|
|
14909
|
+
const raw = await httpRequest({
|
|
14910
|
+
method: "GET",
|
|
14911
|
+
path: "/v1/skills/system",
|
|
14912
|
+
apiKey,
|
|
14913
|
+
apiBaseUrl
|
|
14914
|
+
});
|
|
14915
|
+
if (options.json) {
|
|
14916
|
+
printJson(raw);
|
|
14917
|
+
return;
|
|
14918
|
+
}
|
|
14919
|
+
const parsed = listSystemSkillsResponseSchema.safeParse(raw);
|
|
14920
|
+
if (!parsed.success) {
|
|
14921
|
+
throw new CliError(
|
|
14922
|
+
`Unexpected response from the API: ${parsed.error.message}`
|
|
14923
|
+
);
|
|
14924
|
+
}
|
|
14925
|
+
if (parsed.data.skills.length === 0) {
|
|
14926
|
+
console.log("No system skills found.");
|
|
14927
|
+
return;
|
|
14928
|
+
}
|
|
14929
|
+
console.log(renderTable(SYSTEM_COLUMNS2, parsed.data.skills));
|
|
14930
|
+
console.log(`Showing ${parsed.data.skills.length}`);
|
|
14931
|
+
}, "systemAction"));
|
|
14932
|
+
}
|
|
14933
|
+
__name(registerSkillsSystem, "registerSkillsSystem");
|
|
14934
|
+
|
|
14552
14935
|
// src/commands/skills/upload.ts
|
|
14553
14936
|
import { readFile as readFile6, stat as stat2 } from "node:fs/promises";
|
|
14554
14937
|
import { basename as basename2 } from "node:path";
|
|
14555
|
-
import { z as
|
|
14556
|
-
var uploadSkillResponseSchema =
|
|
14557
|
-
skill:
|
|
14558
|
-
id:
|
|
14559
|
-
name:
|
|
14560
|
-
description:
|
|
14561
|
-
team_id:
|
|
14938
|
+
import { z as z67 } from "zod";
|
|
14939
|
+
var uploadSkillResponseSchema = z67.object({
|
|
14940
|
+
skill: z67.object({
|
|
14941
|
+
id: z67.string(),
|
|
14942
|
+
name: z67.string(),
|
|
14943
|
+
description: z67.string(),
|
|
14944
|
+
team_id: z67.string()
|
|
14562
14945
|
})
|
|
14563
14946
|
});
|
|
14564
14947
|
function registerSkillsUpload(skills) {
|
|
@@ -14614,6 +14997,7 @@ __name(registerSkillsUpload, "registerSkillsUpload");
|
|
|
14614
14997
|
function registerSkills(program) {
|
|
14615
14998
|
const skills = program.command("skills").description("Manage skills (custom and system)");
|
|
14616
14999
|
registerSkillsList(skills);
|
|
15000
|
+
registerSkillsSystem(skills);
|
|
14617
15001
|
registerSkillsCreate(skills);
|
|
14618
15002
|
registerSkillsUpload(skills);
|
|
14619
15003
|
registerSkillsDelete(skills);
|
|
@@ -14627,7 +15011,7 @@ function registerSkills(program) {
|
|
|
14627
15011
|
__name(registerSkills, "registerSkills");
|
|
14628
15012
|
|
|
14629
15013
|
// src/commands/team/get.ts
|
|
14630
|
-
import { z as
|
|
15014
|
+
import { z as z68 } from "zod";
|
|
14631
15015
|
|
|
14632
15016
|
// src/commands/team/resolve-team-id.ts
|
|
14633
15017
|
async function resolveTeamIdFromApiKey(options) {
|
|
@@ -14654,15 +15038,15 @@ async function resolveTeamIdFromApiKey(options) {
|
|
|
14654
15038
|
__name(resolveTeamIdFromApiKey, "resolveTeamIdFromApiKey");
|
|
14655
15039
|
|
|
14656
15040
|
// src/commands/team/get.ts
|
|
14657
|
-
var teamApiSchema2 =
|
|
14658
|
-
id:
|
|
14659
|
-
name:
|
|
14660
|
-
organization_id:
|
|
14661
|
-
slack_team_id:
|
|
14662
|
-
discovery_mode:
|
|
14663
|
-
created_at:
|
|
14664
|
-
});
|
|
14665
|
-
var teamResponseSchema =
|
|
15041
|
+
var teamApiSchema2 = z68.object({
|
|
15042
|
+
id: z68.string(),
|
|
15043
|
+
name: z68.string(),
|
|
15044
|
+
organization_id: z68.string().nullable(),
|
|
15045
|
+
slack_team_id: z68.string().nullable(),
|
|
15046
|
+
discovery_mode: z68.string(),
|
|
15047
|
+
created_at: z68.string()
|
|
15048
|
+
});
|
|
15049
|
+
var teamResponseSchema = z68.object({
|
|
14666
15050
|
team: teamApiSchema2
|
|
14667
15051
|
});
|
|
14668
15052
|
function registerTeamGet(team) {
|
|
@@ -14706,10 +15090,10 @@ function registerTeamGet(team) {
|
|
|
14706
15090
|
__name(registerTeamGet, "registerTeamGet");
|
|
14707
15091
|
|
|
14708
15092
|
// src/commands/team/members.ts
|
|
14709
|
-
var
|
|
14710
|
-
var
|
|
14711
|
-
var
|
|
14712
|
-
var
|
|
15093
|
+
var DEFAULT_LIMIT8 = 50;
|
|
15094
|
+
var MIN_LIMIT8 = 1;
|
|
15095
|
+
var MAX_LIMIT8 = 100;
|
|
15096
|
+
var TABLE_COLUMNS25 = [
|
|
14713
15097
|
{ header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
|
|
14714
15098
|
{ header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name ?? "", "cell") },
|
|
14715
15099
|
{ header: "EMAIL", cell: /* @__PURE__ */ __name((row) => row.email, "cell") },
|
|
@@ -14723,11 +15107,11 @@ function registerTeamMembers(team) {
|
|
|
14723
15107
|
team.command("members").description("List members of a team").option(
|
|
14724
15108
|
"--team <id>",
|
|
14725
15109
|
"team ID (defaults to the team scoped to your API key)"
|
|
14726
|
-
).option("--limit <n>", `page size (${
|
|
15110
|
+
).option("--limit <n>", `page size (${MIN_LIMIT8}-${MAX_LIMIT8})`).option("--offset <n>", "number of members to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function membersAction(options) {
|
|
14727
15111
|
const limit = parseLimit(options.limit, {
|
|
14728
|
-
defaultValue:
|
|
14729
|
-
min:
|
|
14730
|
-
max:
|
|
15112
|
+
defaultValue: DEFAULT_LIMIT8,
|
|
15113
|
+
min: MIN_LIMIT8,
|
|
15114
|
+
max: MAX_LIMIT8
|
|
14731
15115
|
});
|
|
14732
15116
|
const offset = parseOffset(options.offset);
|
|
14733
15117
|
const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
|
|
@@ -14757,7 +15141,7 @@ function registerTeamMembers(team) {
|
|
|
14757
15141
|
console.log("No members found.");
|
|
14758
15142
|
return;
|
|
14759
15143
|
}
|
|
14760
|
-
console.log(renderTable(
|
|
15144
|
+
console.log(renderTable(TABLE_COLUMNS25, response.members));
|
|
14761
15145
|
console.log(
|
|
14762
15146
|
`Showing ${response.members.length} of ${response.total} \xB7 offset ${response.offset}`
|
|
14763
15147
|
);
|
|
@@ -14776,21 +15160,20 @@ __name(registerTeam, "registerTeam");
|
|
|
14776
15160
|
// src/commands/whoami.ts
|
|
14777
15161
|
function registerWhoami(program) {
|
|
14778
15162
|
program.command("whoami").description(
|
|
14779
|
-
"Print the active profile, the API key owner's name and email,
|
|
15163
|
+
"Print the active profile, the API key owner's name and email, and the auth type"
|
|
14780
15164
|
).action(/* @__PURE__ */ __name(async function whoamiAction() {
|
|
14781
15165
|
const resolved = await requireAuthenticatedConfig(this);
|
|
14782
15166
|
const profileLabel = resolved.profileName ?? "(env-only, no stored profile)";
|
|
14783
|
-
console.log(`Profile
|
|
15167
|
+
console.log(`Profile ${profileLabel}`);
|
|
14784
15168
|
const userLine = await fetchUserLine({
|
|
14785
15169
|
apiKey: resolved.apiKey,
|
|
14786
15170
|
apiBaseUrl: resolved.apiBaseUrl
|
|
14787
15171
|
});
|
|
14788
15172
|
if (userLine !== null) {
|
|
14789
|
-
console.log(`User
|
|
15173
|
+
console.log(`User ${userLine}`);
|
|
14790
15174
|
}
|
|
14791
|
-
const
|
|
14792
|
-
console.log(
|
|
14793
|
-
console.log(`Base URL ${resolved.apiBaseUrl}`);
|
|
15175
|
+
const authTypeLabel = resolved.authType === "oauth" ? "OAuth" : "API key";
|
|
15176
|
+
console.log(`Auth type ${authTypeLabel}`);
|
|
14794
15177
|
}, "whoamiAction"));
|
|
14795
15178
|
}
|
|
14796
15179
|
__name(registerWhoami, "registerWhoami");
|