perstack 0.0.130 → 0.0.132
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 +52 -7
- package/dist/bin/cli.js.map +1 -1
- package/dist/{dist-C1wXMdbD.js → dist-CEw_KzeI.js} +16 -4
- package/dist/{dist-C1wXMdbD.js.map → dist-CEw_KzeI.js.map} +1 -1
- package/dist/{resolve-expert-JQOam2_2.js → resolve-expert-DyZJOPWX.js} +2 -2
- package/dist/{resolve-expert-JQOam2_2.js.map → resolve-expert-DyZJOPWX.js.map} +1 -1
- package/package.json +8 -8
package/dist/bin/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "../chunk-DORXReHP.js";
|
|
3
|
-
import { $ as discriminatedUnion, A as stopRunByInteractiveTool, At as $constructor, B as knownModels, C as runParamsSchema, Ct as parse$1, D as startRun, Dt as clone, E as startGeneration, Et as safeParseAsync$1, F as jobSchema, Ft as createId, G as ZodOptional$1, H as resolveModelTierWithFallback, I as expertSchema, J as _null, K as _enum, L as isCoordinatorExpert, M as startCommandInputSchema, Mt as PerstackError, N as perstackConfigSchema, O as stopRunByDelegate, Ot as defineLazy, P as lockfileSchema, Q as custom, R as validateDelegation, S as retry, St as $ZodType, T as skipDelegates, Tt as safeParse$1, U as number$1, V as resolveModelTier, W as ZodIssueCode$1, X as array$1, Y as any, Z as boolean, _ as finishToolCall, _t as datetime, a as createFilteredEventListener, at as number, b as resolveToolResults, ct as preprocess, d as callTools, dt as string, et as intersection, f as completeRun, ft as tuple, g as finishMcpTools, gt as safeParseAsync$2, h as createStreamingEvent, ht as url, i as truncateText$1, it as never, j as runCommandInputSchema, jt as NEVER, k as stopRunByError, kt as normalizeParams, l as createBaseToolActivity, lt as record, m as createRuntimeEvent, mt as unknown, n as formatZodError, nt as literal, o as validateEventFilter, ot as object$2, p as continueToNextStep, pt as union, q as _instanceof, r as parseWithFriendlyError, rt as looseObject, s as getFilteredEnv, st as optional, t as createApiClient, tt as lazy, u as createGeneralToolActivity, ut as strictObject, v as parseExpertKey, vt as toJSONSchema, w as runSettingSchema, wt as parseAsync, x as resumeFromStop, xt as $ZodObject, y as proceedToInteractiveTools, z as checkpointSchema } from "../dist-
|
|
3
|
+
import { $ as discriminatedUnion, A as stopRunByInteractiveTool, At as $constructor, B as knownModels, C as runParamsSchema, Ct as parse$1, D as startRun, Dt as clone, E as startGeneration, Et as safeParseAsync$1, F as jobSchema, Ft as createId, G as ZodOptional$1, H as resolveModelTierWithFallback, I as expertSchema, J as _null, K as _enum, L as isCoordinatorExpert, M as startCommandInputSchema, Mt as PerstackError, N as perstackConfigSchema, O as stopRunByDelegate, Ot as defineLazy, P as lockfileSchema, Q as custom, R as validateDelegation, S as retry, St as $ZodType, T as skipDelegates, Tt as safeParse$1, U as number$1, V as resolveModelTier, W as ZodIssueCode$1, X as array$1, Y as any, Z as boolean, _ as finishToolCall, _t as datetime, a as createFilteredEventListener, at as number, b as resolveToolResults, ct as preprocess, d as callTools, dt as string, et as intersection, f as completeRun, ft as tuple, g as finishMcpTools, gt as safeParseAsync$2, h as createStreamingEvent, ht as url, i as truncateText$1, it as never, j as runCommandInputSchema, jt as NEVER, k as stopRunByError, kt as normalizeParams, l as createBaseToolActivity, lt as record, m as createRuntimeEvent, mt as unknown, n as formatZodError, nt as literal, o as validateEventFilter, ot as object$2, p as continueToNextStep, pt as union, q as _instanceof, r as parseWithFriendlyError, rt as looseObject, s as getFilteredEnv, st as optional, t as createApiClient, tt as lazy, u as createGeneralToolActivity, ut as strictObject, v as parseExpertKey, vt as toJSONSchema, w as runSettingSchema, wt as parseAsync, x as resumeFromStop, xt as $ZodObject, y as proceedToInteractiveTools, z as checkpointSchema } from "../dist-CEw_KzeI.js";
|
|
4
4
|
import { t as require_token_error } from "../token-error-Bru5BVnt.js";
|
|
5
5
|
import fs, { constants, lstat, mkdir, open, readFile, stat, writeFile } from "node:fs/promises";
|
|
6
6
|
import path, { dirname, extname } from "node:path";
|
|
@@ -1172,6 +1172,51 @@ function printPerstackSchema() {
|
|
|
1172
1172
|
sections.push("- Delegates must be in-scope (same coordinator prefix)");
|
|
1173
1173
|
sections.push("- Delegates cannot delegate to their own coordinator");
|
|
1174
1174
|
sections.push("");
|
|
1175
|
+
sections.push("## Example");
|
|
1176
|
+
sections.push("");
|
|
1177
|
+
sections.push("```toml");
|
|
1178
|
+
sections.push("[experts.\"my-team\"]");
|
|
1179
|
+
sections.push("version = \"1.0.0\"");
|
|
1180
|
+
sections.push("defaultModelTier = \"high\"");
|
|
1181
|
+
sections.push("description = \"Coordinates task execution and delegates to specialists\"");
|
|
1182
|
+
sections.push("instruction = \"\"\"");
|
|
1183
|
+
sections.push("Domain-specific constraints and coordination rules here.");
|
|
1184
|
+
sections.push("\"\"\"");
|
|
1185
|
+
sections.push("delegates = [\"@my-team/build\", \"@my-team/verify\"]");
|
|
1186
|
+
sections.push("");
|
|
1187
|
+
sections.push("[experts.\"my-team\".skills.\"@perstack/base\"]");
|
|
1188
|
+
sections.push("type = \"mcpStdioSkill\"");
|
|
1189
|
+
sections.push("command = \"npx\"");
|
|
1190
|
+
sections.push("packageName = \"@perstack/base\"");
|
|
1191
|
+
sections.push("pick = [\"readTextFile\", \"exec\", \"attemptCompletion\"]");
|
|
1192
|
+
sections.push("");
|
|
1193
|
+
sections.push("[experts.\"@my-team/build\"]");
|
|
1194
|
+
sections.push("version = \"1.0.0\"");
|
|
1195
|
+
sections.push("defaultModelTier = \"middle\"");
|
|
1196
|
+
sections.push("description = \"Implements the core deliverable\"");
|
|
1197
|
+
sections.push("instruction = \"\"\"");
|
|
1198
|
+
sections.push("Domain constraints for this specialist.");
|
|
1199
|
+
sections.push("\"\"\"");
|
|
1200
|
+
sections.push("");
|
|
1201
|
+
sections.push("[experts.\"@my-team/build\".skills.\"@perstack/base\"]");
|
|
1202
|
+
sections.push("type = \"mcpStdioSkill\"");
|
|
1203
|
+
sections.push("command = \"npx\"");
|
|
1204
|
+
sections.push("packageName = \"@perstack/base\"");
|
|
1205
|
+
sections.push("pick = [\"readTextFile\", \"writeTextFile\", \"editTextFile\", \"exec\", \"todo\", \"attemptCompletion\"]");
|
|
1206
|
+
sections.push("```");
|
|
1207
|
+
sections.push("");
|
|
1208
|
+
sections.push("## Best Practices");
|
|
1209
|
+
sections.push("");
|
|
1210
|
+
sections.push("- Always set version, defaultModelTier, and description on every expert");
|
|
1211
|
+
sections.push("- Always set an explicit pick list — omitting it grants ALL tools");
|
|
1212
|
+
sections.push("- Instructions should contain only domain constraints the LLM cannot derive on its own");
|
|
1213
|
+
sections.push("- Do not put implementation procedures, file paths, or data schemas in instructions");
|
|
1214
|
+
sections.push("- Shorter instructions outperform longer ones — every line must earn its place");
|
|
1215
|
+
sections.push("- Delegate names should describe function, not persona (/build, /verify, not /builder)");
|
|
1216
|
+
sections.push("- Coordinators should have minimal pick lists (readTextFile, exec, attemptCompletion)");
|
|
1217
|
+
sections.push("- Leaf experts doing file I/O need: readTextFile, writeTextFile, editTextFile, exec, todo, attemptCompletion");
|
|
1218
|
+
sections.push("- Experts managing delegation need: addDelegateFromConfig, addDelegate, removeDelegate");
|
|
1219
|
+
sections.push("");
|
|
1175
1220
|
return sections.join("\n");
|
|
1176
1221
|
}
|
|
1177
1222
|
//#endregion
|
|
@@ -16193,7 +16238,7 @@ const EMPTY_COMPLETION_RESULT = { completion: {
|
|
|
16193
16238
|
//#endregion
|
|
16194
16239
|
//#region ../base/package.json
|
|
16195
16240
|
var name$6 = "@perstack/base";
|
|
16196
|
-
var version$2 = "0.0.
|
|
16241
|
+
var version$2 = "0.0.81";
|
|
16197
16242
|
//#endregion
|
|
16198
16243
|
//#region ../base/src/tools/todo.ts
|
|
16199
16244
|
var Todo = class {
|
|
@@ -21225,7 +21270,7 @@ async function expertVersionsHandler(scopeName, options) {
|
|
|
21225
21270
|
}
|
|
21226
21271
|
//#endregion
|
|
21227
21272
|
//#region ../../packages/runtime/package.json
|
|
21228
|
-
var version$1 = "0.0.
|
|
21273
|
+
var version$1 = "0.0.143";
|
|
21229
21274
|
//#endregion
|
|
21230
21275
|
//#region ../../packages/runtime/src/helpers/usage.ts
|
|
21231
21276
|
function createEmptyUsage() {
|
|
@@ -79710,7 +79755,7 @@ function validateRuntimeVersion(experts) {
|
|
|
79710
79755
|
//#endregion
|
|
79711
79756
|
//#region ../../packages/runtime/src/helpers/setup-experts.ts
|
|
79712
79757
|
async function setupExperts(setting, resolveExpertToRun) {
|
|
79713
|
-
const resolveFn = resolveExpertToRun ?? (await import("../resolve-expert-
|
|
79758
|
+
const resolveFn = resolveExpertToRun ?? (await import("../resolve-expert-DyZJOPWX.js")).resolveExpertToRun;
|
|
79714
79759
|
const { expertKey } = setting;
|
|
79715
79760
|
const experts = { ...setting.experts };
|
|
79716
79761
|
const clientOptions = {
|
|
@@ -92649,8 +92694,8 @@ function getCoordinatorMetaInstruction() {
|
|
|
92649
92694
|
6. Aggregate results and clean up the workspace.
|
|
92650
92695
|
|
|
92651
92696
|
Delegation guidelines:
|
|
92652
|
-
- Be specific: include context,
|
|
92653
|
-
-
|
|
92697
|
+
- Be specific: include context, constraints, and expected output format. No vague delegations.
|
|
92698
|
+
- A single delegate can handle a broad task if the role is straightforward. Only split into multiple delegates when responsibilities are genuinely distinct — unnecessary subdivision adds overhead without improving quality.
|
|
92654
92699
|
- If no suitable delegate exists, use createExpert to create one, then addDelegate to register it.
|
|
92655
92700
|
|
|
92656
92701
|
Workspace cleanup:
|
|
@@ -124645,7 +124690,7 @@ async function startHandler(expertKey, query, options, handlerOptions) {
|
|
|
124645
124690
|
//#endregion
|
|
124646
124691
|
//#region package.json
|
|
124647
124692
|
var name = "perstack";
|
|
124648
|
-
var version = "0.0.
|
|
124693
|
+
var version = "0.0.132";
|
|
124649
124694
|
var description = "PerStack CLI";
|
|
124650
124695
|
//#endregion
|
|
124651
124696
|
//#region bin/cli.ts
|