@womp/spark-agent 12.0.0 → 13.0.0

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/CHANGELOG.md CHANGED
@@ -4,6 +4,23 @@ Notable changes to `@womp/spark-agent`, newest first. Versions follow
4
4
  [Semantic Versioning](https://semver.org/). Add an entry with each version bump; describe what
5
5
  changed for hosts and users, and how to migrate across breaking changes.
6
6
 
7
+ ## 13.0.0 — 2026-10-19
8
+
9
+ A goal has no tries or credit limit of its own: it goes on until its conditions are verified, it is
10
+ blocked, it pauses, or the user's own credits run out.
11
+
12
+ ### Changed
13
+
14
+ - A goal the agent sets without `tries` or `credits` gets no `maxTurns` and no `creditBudget`
15
+ (before: 5 tries and 2,000 credits where the host counts credits). Limits the user asks for, and
16
+ the Wompify tiers' limits, still apply. The `goal` tool tells the agent so.
17
+ - The standalone goal bar shows the try number of a goal without a tries limit.
18
+
19
+ ### Removed
20
+
21
+ - `DEFAULT_GOAL_CREDITS` from `@womp/spark-agent/server` and `@womp/spark-agent/ui`. A host that
22
+ filled it in for `set` stops doing so, or passes its own `creditBudget`.
23
+
7
24
  ## 12.0.0 — 2026-10-16
8
25
 
9
26
  ### Changed
package/README.md CHANGED
@@ -158,7 +158,7 @@ A goal starts from an ordinary message, when the agent sets one, and changes whe
158
158
  chat. A service with `evaluateGoal` gives the agent the `goal` tool. With `set` it starts a goal
159
159
  before building, when the request sets constraints a result can be measured against, from a title
160
160
  and the conditions, each one tool results can check. The goal starts at once,
161
- with that run as its first try and with 5 tries and 2,000 credits unless the call gives others; the
161
+ with that run as its first try, and with no tries or credit limit unless the call gives one; the
162
162
  service evaluates each condition after every try and records the result on
163
163
  `goal.conditions`. `change` gives the goal new conditions or limits, `continue` has a stopped goal
164
164
  go on, and `remove` ends it; after a change the goal goes on in that turn. A `set` over an existing
@@ -3,7 +3,7 @@ import { z } from "zod";
3
3
  import { boundedResultText, canonicalJsonValue } from "./bounded-output.js";
4
4
  import { completedInputString } from "./tool-input-label.js";
5
5
  import { UserWait } from "./execution-lifetime.js";
6
- import { GOAL_DEFAULT_CAPS, GOAL_MORE_TRIES, sparkGoalRequestSchema } from "./goals.js";
6
+ import { GOAL_MORE_TRIES, sparkGoalRequestSchema } from "./goals.js";
7
7
  function errorMessage(error) {
8
8
  return error instanceof Error ? error.message : String(error);
9
9
  }
@@ -31,7 +31,7 @@ function goalResultText({ goal, tries, credits }) {
31
31
  const upTo = limits ? `, up to ${limits}` : "";
32
32
  switch (goal) {
33
33
  case "started":
34
- return `The goal is set and running${upTo}. Tell the user in one line that you set a goal from their message, its limits, and that they can tell you to stop or change anything. Then build it. An independent check follows each try and sends back what is still unmet. It cannot run tools: it reads what your tool calls print. So before you finish, print each condition's measured value in one call.`;
34
+ return `The goal is set and running${upTo}. Tell the user in one line that you set a goal from their message${limits ? ", its limits" : ""}, and that they can tell you to stop or change anything. Then build it. An independent check follows each try and sends back what is still unmet. It cannot run tools: it reads what your tool calls print. So before you finish, print each condition's measured value in one call.`;
35
35
  case "running":
36
36
  return `The goal is running${upTo}, with this turn as its next try. Confirm to the user in one line what changed, then keep working toward it.`;
37
37
  case "done":
@@ -109,8 +109,8 @@ export function createSparkTools(options) {
109
109
  inputSchema: sparkGoalRequestSchema.extend({
110
110
  title: sparkGoalRequestSchema.shape.title.describe("For set: two to four words in sentence case naming what is being made."),
111
111
  conditions: sparkGoalRequestSchema.shape.conditions.describe("For set, and for change when the conditions change: the full list. Only constraints the user stated or directly implied, never your own, that tool results can check. The description of what to make is not a list of constraints: leave out its parts and features, and any instruction about how to work, what to check or what to render. State each as a fact about the finished result in a few words of the user's language, with its number and unit: \"Height is 120 mm\", not \"Make it 120 mm tall\". Split compound constraints. Leave out a look, style, feel or quality that takes judgement: it is not a condition. Keep a condition's words as they are when it does not change."),
112
- tries: sparkGoalRequestSchema.shape.tries.describe(`For set or change: the most tries the goal may take, when the user gave a number. A new goal otherwise gets ${GOAL_DEFAULT_CAPS.tries}, and continue adds ${GOAL_MORE_TRIES} to one that used its tries.`),
113
- credits: sparkGoalRequestSchema.shape.credits.describe(`For set or change: the most credits the goal may spend, when the user gave a number. A new goal otherwise gets ${GOAL_DEFAULT_CAPS.credits.toLocaleString("en-US")}.`),
112
+ tries: sparkGoalRequestSchema.shape.tries.describe(`For set or change: the most tries the goal may take, only when the user gave a number. Without one the goal has no tries limit; continue adds ${GOAL_MORE_TRIES} to one that used its tries.`),
113
+ credits: sparkGoalRequestSchema.shape.credits.describe(`For set or change: the most credits the goal may spend, only when the user gave a number. Without one the goal has no credit limit of its own.`),
114
114
  }),
115
115
  execute: (input, { toolCallId }) => execute({ id: toolCallId, name: "goal", input }, () => handleGoal(input)),
116
116
  toModelOutput: ({ output }) => ({ type: "text", value: goalResultText(output) }),
package/dist/goals.d.ts CHANGED
@@ -24,11 +24,6 @@ export type SparkGoalTry = {
24
24
  /** In the order of the goal's conditions; a condition left to the user has no result. */
25
25
  conditions: Pick<SparkGoalCondition, "met" | "reason">[];
26
26
  };
27
- /** The caps of a goal the agent sets, unless the user asked for others. */
28
- export declare const GOAL_DEFAULT_CAPS: {
29
- readonly tries: 5;
30
- readonly credits: 2000;
31
- };
32
27
  /** The tries a goal that used its tries gets when the user has it keep going. */
33
28
  export declare const GOAL_MORE_TRIES = 3;
34
29
  /**
@@ -125,4 +120,3 @@ export declare const sparkGoalCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
125
120
  }>;
126
121
  }, z.core.$strip>], "action">;
127
122
  export type SparkGoalCommand = z.infer<typeof sparkGoalCommandSchema>;
128
- export declare const DEFAULT_GOAL_CREDITS = 50000;
package/dist/goals.js CHANGED
@@ -13,8 +13,6 @@ const goalCaps = {
13
13
  creditBudget: z.number().int().positive().max(1_000_000_000).optional(),
14
14
  maxTurns: z.number().int().min(1).max(100).optional(),
15
15
  };
16
- /** The caps of a goal the agent sets, unless the user asked for others. */
17
- export const GOAL_DEFAULT_CAPS = { tries: 5, credits: 2_000 };
18
16
  /** The tries a goal that used its tries gets when the user has it keep going. */
19
17
  export const GOAL_MORE_TRIES = 3;
20
18
  /**
@@ -46,4 +44,3 @@ export const sparkGoalCommandSchema = z.discriminatedUnion("action", [
46
44
  }),
47
45
  z.object({ action: z.enum(["status", "pause", "resume", "clear"]) }),
48
46
  ]);
49
- export const DEFAULT_GOAL_CREDITS = 50_000;
@@ -9,4 +9,3 @@ export { MemorySparkAgentStore } from "./store.js";
9
9
  export { SqliteSparkStore } from "./sqlite-store.js";
10
10
  export { createStandaloneSparkAgentApp, type StandaloneSparkAgentOptions, type StandaloneSparkAgentApp, } from "./standalone.js";
11
11
  export type { SparkAgentStore, SparkConversation, SparkConversationSummary, SparkRun, SparkRunExecutionContext, SparkRunExecutor, SparkRunSettings, } from "./types.js";
12
- export { DEFAULT_GOAL_CREDITS } from "../goals.js";
@@ -6,4 +6,3 @@ export { DEFAULT_ENDING_RETRY_DELAYS_MS, RUN_INTERRUPTED_ERROR, RUN_NOT_SAVED_ER
6
6
  export { MemorySparkAgentStore } from "./store.js";
7
7
  export { SqliteSparkStore } from "./sqlite-store.js";
8
8
  export { createStandaloneSparkAgentApp, } from "./standalone.js";
9
- export { DEFAULT_GOAL_CREDITS } from "../goals.js";
@@ -2,7 +2,7 @@ import { sparkErrorDiagnostics } from "../error-diagnostics.js";
2
2
  import { validateUIMessages } from "ai";
3
3
  import { foldAllChunks } from "./message-fold.js";
4
4
  import { sparkDataPartSchemas, sparkMessageMetadataSchema, } from "../ui.js";
5
- import { GOAL_DEFAULT_CAPS, GOAL_MORE_TRIES, MAX_GOAL_LENGTH, sparkGoalCommandSchema } from "../goals.js";
5
+ import { GOAL_MORE_TRIES, MAX_GOAL_LENGTH, sparkGoalCommandSchema } from "../goals.js";
6
6
  import { goalVerdictSchema } from "./goal-evaluator.js";
7
7
  const TERMINAL_STATUSES = new Set([
8
8
  "completed",
@@ -657,8 +657,8 @@ export class SparkAgentService {
657
657
  id: crypto.randomUUID(), objective: (message ? messageText(message) : "").slice(0, MAX_GOAL_LENGTH) || request.title,
658
658
  title: request.title, conditions: request.conditions,
659
659
  status: "active", settings: run.settings, createdAt, updatedAt: createdAt, turns: 0, runId: run.id,
660
- maxTurns: caps.maxTurns ?? GOAL_DEFAULT_CAPS.tries,
661
- ...(this.readGoalCredits ? { creditBudget: caps.creditBudget ?? GOAL_DEFAULT_CAPS.credits, creditsUsed: 0 } : {}),
660
+ ...(caps.maxTurns === undefined ? {} : { maxTurns: caps.maxTurns }),
661
+ ...(caps.creditBudget === undefined ? {} : { creditBudget: caps.creditBudget, creditsUsed: 0 }),
662
662
  };
663
663
  if (current)
664
664
  ended = goalSummary(current, current.status === "completed" ? "done" : "replaced");
package/dist/ui.d.ts CHANGED
@@ -455,4 +455,3 @@ export declare const sparkDataPartSchemas: {
455
455
  }, z.core.$strip>]>>;
456
456
  }, z.core.$strip>;
457
457
  };
458
- export { DEFAULT_GOAL_CREDITS } from "./goals.js";
package/dist/ui.js CHANGED
@@ -137,4 +137,3 @@ export const sparkDataPartSchemas = {
137
137
  */
138
138
  "flow-run-result": flowRunResultSchema,
139
139
  };
140
- export { DEFAULT_GOAL_CREDITS } from "./goals.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@womp/spark-agent",
3
- "version": "12.0.0",
3
+ "version": "13.0.0",
4
4
  "description": "Portable skills-based AI agent with local and durable chat transports for Womp",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",