perstack 0.0.118 → 0.0.120

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 CHANGED
@@ -16304,7 +16304,7 @@ const EMPTY_COMPLETION_RESULT = { completion: {
16304
16304
  //#endregion
16305
16305
  //#region ../base/package.json
16306
16306
  var name$6 = "@perstack/base";
16307
- var version$2 = "0.0.78";
16307
+ var version$2 = "0.0.79";
16308
16308
 
16309
16309
  //#endregion
16310
16310
  //#region ../base/src/tools/todo.ts
@@ -16376,8 +16376,23 @@ function registerClearTodo(server) {
16376
16376
  //#region ../base/src/tools/attempt-completion.ts
16377
16377
  async function attemptCompletion() {
16378
16378
  const remainingTodos = getRemainingTodos();
16379
- if (remainingTodos.length > 0) return { remainingTodos };
16380
- return {};
16379
+ if (remainingTodos.length > 0) return {
16380
+ isError: true,
16381
+ content: [{
16382
+ type: "text",
16383
+ text: [
16384
+ "Cannot complete: there are incomplete todos remaining.",
16385
+ "",
16386
+ "Remaining todos:",
16387
+ remainingTodos.map((t) => ` - [id=${t.id}] ${t.title}`).join("\n"),
16388
+ "",
16389
+ "You must either:",
16390
+ "1. Complete the remaining work, then mark each todo as done using the todo tool (e.g., todo({ completedTodos: [id1, id2] }))",
16391
+ "2. If the work for a todo is already done, mark it as completed using the todo tool before calling attemptCompletion again"
16392
+ ].join("\n")
16393
+ }]
16394
+ };
16395
+ return successToolResult({});
16381
16396
  }
16382
16397
  function registerAttemptCompletion(server) {
16383
16398
  server.registerTool("attemptCompletion", {
@@ -16386,7 +16401,7 @@ function registerAttemptCompletion(server) {
16386
16401
  inputSchema: object$2({ result: string().optional() }).strict()
16387
16402
  }, async () => {
16388
16403
  try {
16389
- return successToolResult(await attemptCompletion());
16404
+ return await attemptCompletion();
16390
16405
  } catch (e) {
16391
16406
  if (e instanceof Error) return errorToolResult(e);
16392
16407
  throw e;
@@ -21312,7 +21327,7 @@ async function expertVersionsHandler(scopeName, options) {
21312
21327
 
21313
21328
  //#endregion
21314
21329
  //#region ../../packages/runtime/package.json
21315
- var version$1 = "0.0.132";
21330
+ var version$1 = "0.0.133";
21316
21331
 
21317
21332
  //#endregion
21318
21333
  //#region ../../packages/runtime/src/helpers/usage.ts
@@ -122174,8 +122189,9 @@ function TreeNodeLine({ flatNode, spinner }) {
122174
122189
  const usagePercent = (node.contextWindowUsage * 100).toFixed(1);
122175
122190
  const usageIcon = getUsageIcon(node.contextWindowUsage * 100);
122176
122191
  const showUsage = node.status !== "completed";
122177
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, { children: [
122178
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { children: [
122192
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
122193
+ wrap: "truncate",
122194
+ children: [
122179
122195
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
122180
122196
  dimColor: true,
122181
122197
  children: prefix
@@ -122186,42 +122202,33 @@ function TreeNodeLine({ flatNode, spinner }) {
122186
122202
  bold: true,
122187
122203
  children: node.expertName
122188
122204
  }),
122189
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
122205
+ node.model ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
122190
122206
  dimColor: true,
122191
- children: ": "
122192
- })
122193
- ] }),
122194
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
122195
- flexGrow: 1,
122196
- flexShrink: 1,
122197
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
122198
- wrap: "truncate",
122199
- children: [node.actionLabel, node.actionFileArg ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
122200
- color: colors.muted,
122201
- children: [" ", node.actionFileArg]
122202
- }) : null]
122203
- })
122204
- }),
122205
- showUsage ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { children: [
122206
- node.model ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
122207
- dimColor: true,
122208
- children: " · "
122209
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
122210
- dimColor: true,
122211
- children: node.model
122212
- })] }) : null,
122213
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
122214
- dimColor: true,
122215
- children: " · "
122216
- }),
122217
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { children: [
122207
+ children: [" · ", node.model]
122208
+ }) : null,
122209
+ showUsage ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { children: [
122210
+ " ",
122211
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
122212
+ dimColor: true,
122213
+ children: "·"
122214
+ }),
122215
+ " ",
122218
122216
  usageIcon,
122219
122217
  " ",
122220
122218
  usagePercent,
122221
122219
  "%"
122222
- ] })
122223
- ] }) : null
122224
- ] });
122220
+ ] }) : null,
122221
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
122222
+ dimColor: true,
122223
+ children: " · "
122224
+ }),
122225
+ node.actionLabel,
122226
+ node.actionFileArg ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
122227
+ color: colors.muted,
122228
+ children: [" ", node.actionFileArg]
122229
+ }) : null
122230
+ ]
122231
+ });
122225
122232
  }
122226
122233
  const DelegationTree = ({ state }) => {
122227
122234
  const flatNodes = flattenTree(state);
@@ -122881,7 +122888,7 @@ async function startHandler(expertKey, query, options, handlerOptions) {
122881
122888
  //#endregion
122882
122889
  //#region package.json
122883
122890
  var name = "perstack";
122884
- var version = "0.0.118";
122891
+ var version = "0.0.120";
122885
122892
  var description = "PerStack CLI";
122886
122893
 
122887
122894
  //#endregion