create-expert 0.0.37 → 0.0.39
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/bin/cli.js +672 -211
- package/dist/bin/cli.js.map +1 -1
- package/dist/perstack.toml +51 -11
- package/dist/{resolve-expert-DsQia0Mr.js → resolve-expert-CTnETi9d.js} +2 -2
- package/dist/{resolve-expert-DsQia0Mr.js.map → resolve-expert-CTnETi9d.js.map} +1 -1
- package/dist/{src-D-q0VJ6r.js → src-C0pz_C3h.js} +80 -2
- package/dist/{src-D-q0VJ6r.js.map → src-C0pz_C3h.js.map} +1 -1
- package/package.json +6 -6
|
@@ -6451,6 +6451,36 @@ const generalToolActivitySchema = baseActivitySchema.extend({
|
|
|
6451
6451
|
result: array(messagePartSchema).optional(),
|
|
6452
6452
|
error: string().optional()
|
|
6453
6453
|
});
|
|
6454
|
+
const addSkillActivitySchema = baseActivitySchema.extend({
|
|
6455
|
+
type: literal("addSkill"),
|
|
6456
|
+
name: string(),
|
|
6457
|
+
skillType: string(),
|
|
6458
|
+
tools: array(string()).optional(),
|
|
6459
|
+
error: string().optional()
|
|
6460
|
+
});
|
|
6461
|
+
const removeSkillActivitySchema = baseActivitySchema.extend({
|
|
6462
|
+
type: literal("removeSkill"),
|
|
6463
|
+
skillName: string(),
|
|
6464
|
+
error: string().optional()
|
|
6465
|
+
});
|
|
6466
|
+
const addDelegateActivitySchema = baseActivitySchema.extend({
|
|
6467
|
+
type: literal("addDelegate"),
|
|
6468
|
+
targetExpertKey: string(),
|
|
6469
|
+
delegateToolName: string().optional(),
|
|
6470
|
+
error: string().optional()
|
|
6471
|
+
});
|
|
6472
|
+
const removeDelegateActivitySchema = baseActivitySchema.extend({
|
|
6473
|
+
type: literal("removeDelegate"),
|
|
6474
|
+
expertName: string(),
|
|
6475
|
+
error: string().optional()
|
|
6476
|
+
});
|
|
6477
|
+
const createExpertActivitySchema = baseActivitySchema.extend({
|
|
6478
|
+
type: literal("createExpert"),
|
|
6479
|
+
targetKey: string(),
|
|
6480
|
+
description: string().optional(),
|
|
6481
|
+
resultExpertKey: string().optional(),
|
|
6482
|
+
error: string().optional()
|
|
6483
|
+
});
|
|
6454
6484
|
const activitySchema = discriminatedUnion("type", [
|
|
6455
6485
|
queryActivitySchema,
|
|
6456
6486
|
retryActivitySchema,
|
|
@@ -6468,7 +6498,12 @@ const activitySchema = discriminatedUnion("type", [
|
|
|
6468
6498
|
delegateActivitySchema,
|
|
6469
6499
|
delegationCompleteActivitySchema,
|
|
6470
6500
|
interactiveToolActivitySchema,
|
|
6471
|
-
generalToolActivitySchema
|
|
6501
|
+
generalToolActivitySchema,
|
|
6502
|
+
addSkillActivitySchema,
|
|
6503
|
+
removeSkillActivitySchema,
|
|
6504
|
+
addDelegateActivitySchema,
|
|
6505
|
+
removeDelegateActivitySchema,
|
|
6506
|
+
createExpertActivitySchema
|
|
6472
6507
|
]);
|
|
6473
6508
|
const parallelActivitiesGroupSchema = object({
|
|
6474
6509
|
type: literal("parallelGroup"),
|
|
@@ -7416,6 +7451,41 @@ function createBaseToolActivity(toolName, toolCall, toolResult, reasoning) {
|
|
|
7416
7451
|
stdout: parseStringField(resultContents, "stdout"),
|
|
7417
7452
|
stderr: parseStringField(resultContents, "stderr")
|
|
7418
7453
|
};
|
|
7454
|
+
case "addSkill": return {
|
|
7455
|
+
type: "addSkill",
|
|
7456
|
+
...baseFields,
|
|
7457
|
+
name: String(args["name"] ?? ""),
|
|
7458
|
+
skillType: String(args["type"] ?? ""),
|
|
7459
|
+
tools: parseStringArrayField(resultContents, "tools"),
|
|
7460
|
+
error: errorText
|
|
7461
|
+
};
|
|
7462
|
+
case "removeSkill": return {
|
|
7463
|
+
type: "removeSkill",
|
|
7464
|
+
...baseFields,
|
|
7465
|
+
skillName: String(args["skillName"] ?? ""),
|
|
7466
|
+
error: errorText
|
|
7467
|
+
};
|
|
7468
|
+
case "addDelegate": return {
|
|
7469
|
+
type: "addDelegate",
|
|
7470
|
+
...baseFields,
|
|
7471
|
+
targetExpertKey: String(args["expertKey"] ?? ""),
|
|
7472
|
+
delegateToolName: parseStringField(resultContents, "delegateToolName"),
|
|
7473
|
+
error: errorText
|
|
7474
|
+
};
|
|
7475
|
+
case "removeDelegate": return {
|
|
7476
|
+
type: "removeDelegate",
|
|
7477
|
+
...baseFields,
|
|
7478
|
+
expertName: String(args["expertName"] ?? ""),
|
|
7479
|
+
error: errorText
|
|
7480
|
+
};
|
|
7481
|
+
case "createExpert": return {
|
|
7482
|
+
type: "createExpert",
|
|
7483
|
+
...baseFields,
|
|
7484
|
+
targetKey: String(args["key"] ?? ""),
|
|
7485
|
+
description: typeof args["description"] === "string" ? args["description"] : void 0,
|
|
7486
|
+
resultExpertKey: parseStringField(resultContents, "expertKey"),
|
|
7487
|
+
error: errorText
|
|
7488
|
+
};
|
|
7419
7489
|
default: return createGeneralToolActivity(toolCall.skillName, toolName, toolCall, toolResult, reasoning);
|
|
7420
7490
|
}
|
|
7421
7491
|
}
|
|
@@ -7465,6 +7535,14 @@ function parseNumberField(result, field) {
|
|
|
7465
7535
|
return;
|
|
7466
7536
|
}
|
|
7467
7537
|
}
|
|
7538
|
+
function parseStringArrayField(result, field) {
|
|
7539
|
+
const textPart = result.find((p) => p.type === "textPart");
|
|
7540
|
+
if (!textPart?.text) return void 0;
|
|
7541
|
+
try {
|
|
7542
|
+
const parsed = JSON.parse(textPart.text);
|
|
7543
|
+
if (Array.isArray(parsed[field])) return parsed[field].map(String);
|
|
7544
|
+
} catch {}
|
|
7545
|
+
}
|
|
7468
7546
|
function parseRemainingTodosFromResult(result) {
|
|
7469
7547
|
const textPart = result.find((p) => p.type === "textPart");
|
|
7470
7548
|
if (!textPart?.text) return void 0;
|
|
@@ -7572,4 +7650,4 @@ function parseWithFriendlyError(schema, data, context) {
|
|
|
7572
7650
|
|
|
7573
7651
|
//#endregion
|
|
7574
7652
|
export { boolean$1 as $, startCommandInputSchema as A, defineLazy as At, messageSchema as B, startGeneration as C, $ZodObject as Ct, stopRunByExceededMaxSteps as D, safeParse$1 as Dt, stopRunByError as E, parseAsync$1 as Et, checkpointSchema as F, PerstackError as Ft, number as G, userMessageSchema as H, usageSchema as I, defaultMaxRetries as It, _instanceof as J, ZodOptional as K, toolResultSchema as L, defaultTimeout as Lt, lockfileSchema as M, $constructor as Mt, jobSchema as N, NEVER as Nt, stopRunByInteractiveTool as O, safeParseAsync$1 as Ot, expertSchema as P, knownModels as Pt, array as Q, toolCallSchema as R, createId as Rt, skipDelegates as S, meta$1 as St, stopRunByDelegate as T, parse$1 as Tt, activityOrGroupSchema as U, toolMessageSchema as V, boolean as W, _undefined as X, _null as Y, any as Z, resolveToolResults as _, url as _t, BASE_SKILL_PREFIX as a, looseObject as at, runParamsSchema as b, toJSONSchema as bt, attemptCompletion as c, object as ct, continueToNextStep as d, record as dt, custom as et, createRuntimeEvent as f, strictObject as ft, proceedToInteractiveTools as g, unknown as gt, finishToolCall as h, union as ht, getFilteredEnv as i, literal as it, perstackConfigSchema as j, normalizeParams as jt, runCommandInputSchema as k, clone as kt, callTools as l, optional as lt, finishMcpTools as m, tuple as mt, createFilteredEventListener as n, intersection as nt, createBaseToolActivity as o, never as ot, createStreamingEvent as p, string as pt, _enum as q, validateEventFilter as r, lazy as rt, createGeneralToolActivity as s, number$1 as st, parseWithFriendlyError as t, discriminatedUnion as tt, completeRun as u, preprocess as ut, resumeFromStop as v, safeParseAsync as vt, startRun as w, $ZodType as wt, runSettingSchema as x, describe$1 as xt, retry as y, datetime as yt, instructionMessageSchema as z };
|
|
7575
|
-
//# sourceMappingURL=src-
|
|
7653
|
+
//# sourceMappingURL=src-C0pz_C3h.js.map
|