perstack 0.0.117 → 0.0.119

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
@@ -120037,6 +120052,7 @@ const SPINNER_FRAMES = [
120037
120052
  "⠏"
120038
120053
  ];
120039
120054
  const USAGE_INDICATORS = {
120055
+ EMPTY: "○",
120040
120056
  LOW: "◔",
120041
120057
  MEDIUM: "◑",
120042
120058
  HIGH: "◕",
@@ -122127,10 +122143,11 @@ const useSpinner = ({ isActive }) => {
122127
122143
  //#endregion
122128
122144
  //#region ../../packages/tui-components/src/execution/components/delegation-tree.tsx
122129
122145
  function getUsageIcon(percent) {
122130
- if (percent <= 25) return USAGE_INDICATORS.LOW;
122131
- if (percent <= 50) return USAGE_INDICATORS.MEDIUM;
122132
- if (percent <= 75) return USAGE_INDICATORS.HIGH;
122133
- return USAGE_INDICATORS.FULL;
122146
+ if (percent >= 75) return USAGE_INDICATORS.FULL;
122147
+ if (percent >= 50) return USAGE_INDICATORS.HIGH;
122148
+ if (percent >= 25) return USAGE_INDICATORS.MEDIUM;
122149
+ if (percent >= 5) return USAGE_INDICATORS.LOW;
122150
+ return USAGE_INDICATORS.EMPTY;
122134
122151
  }
122135
122152
  function buildPrefix(flatNode) {
122136
122153
  if (flatNode.depth === 0) return "";
@@ -122172,27 +122189,35 @@ function TreeNodeLine({ flatNode, spinner }) {
122172
122189
  const usagePercent = (node.contextWindowUsage * 100).toFixed(1);
122173
122190
  const usageIcon = getUsageIcon(node.contextWindowUsage * 100);
122174
122191
  const showUsage = node.status !== "completed";
122175
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { children: [
122176
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
122177
- dimColor: true,
122178
- children: prefix
122179
- }),
122180
- indicator,
122181
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: " " }),
122182
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
122183
- bold: true,
122184
- children: node.expertName
122185
- }),
122186
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
122187
- dimColor: true,
122188
- children: ": "
122192
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box, { children: [
122193
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { children: [
122194
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
122195
+ dimColor: true,
122196
+ children: prefix
122197
+ }),
122198
+ indicator,
122199
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: " " }),
122200
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
122201
+ bold: true,
122202
+ children: node.expertName
122203
+ }),
122204
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
122205
+ dimColor: true,
122206
+ children: ": "
122207
+ })
122208
+ ] }),
122209
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
122210
+ flexGrow: 1,
122211
+ flexShrink: 1,
122212
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
122213
+ wrap: "truncate",
122214
+ children: [node.actionLabel, node.actionFileArg ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
122215
+ color: colors.muted,
122216
+ children: [" ", node.actionFileArg]
122217
+ }) : null]
122218
+ })
122189
122219
  }),
122190
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: node.actionLabel }),
122191
- node.actionFileArg ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, {
122192
- color: colors.muted,
122193
- children: [" ", node.actionFileArg]
122194
- }) : null,
122195
- showUsage ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
122220
+ showUsage ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { children: [
122196
122221
  node.model ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
122197
122222
  dimColor: true,
122198
122223
  children: " · "
@@ -122871,7 +122896,7 @@ async function startHandler(expertKey, query, options, handlerOptions) {
122871
122896
  //#endregion
122872
122897
  //#region package.json
122873
122898
  var name = "perstack";
122874
- var version = "0.0.117";
122899
+ var version = "0.0.119";
122875
122900
  var description = "PerStack CLI";
122876
122901
 
122877
122902
  //#endregion