@womp/spark-agent 13.1.0 → 13.1.1

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,14 @@ 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.1.1 — 2026-10-20
8
+
9
+ ### Fixed
10
+
11
+ - The `goal` tool asks for `tries` and `credits` of 0 when the user did not ask for a limit, and
12
+ takes 0 as no limit (for `change`, no change). The agent filled in caps of its own, such as
13
+ 10 credits, that ended the goal's run at the next model call.
14
+
7
15
  ## 13.1.0 — 2026-10-20
8
16
 
9
17
  A 3D model the user asked for lands in their scene, and an import question nobody answers no longer
@@ -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, 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.`),
112
+ tries: sparkGoalRequestSchema.shape.tries.describe(`For set or change: the tries limit the user asked for, or 0 when they did not ask for one. continue adds ${GOAL_MORE_TRIES} to a goal that used its tries.`),
113
+ credits: sparkGoalRequestSchema.shape.credits.describe(`For set or change: the credit limit the user asked for, or 0 when they did not ask for one.`),
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
@@ -30,7 +30,8 @@ export declare const GOAL_MORE_TRIES = 3;
30
30
  * What the agent asks with the `goal` tool, for the user. `set` starts a goal
31
31
  * from `title` and `conditions`, at once, with the asking run as its first try;
32
32
  * a goal the conversation already has ends. `change` gives the goal new
33
- * `conditions`, `tries` or `credits`. `continue` has a goal that stopped go on.
33
+ * `conditions`, `tries` or `credits`; a `tries` or `credits` of 0 is no limit,
34
+ * or for `change` no change. `continue` has a goal that stopped go on.
34
35
  * `remove` ends the goal. After a change the goal goes on, with the asking run
35
36
  * as its next try.
36
37
  */
package/dist/goals.js CHANGED
@@ -19,7 +19,8 @@ export const GOAL_MORE_TRIES = 3;
19
19
  * What the agent asks with the `goal` tool, for the user. `set` starts a goal
20
20
  * from `title` and `conditions`, at once, with the asking run as its first try;
21
21
  * a goal the conversation already has ends. `change` gives the goal new
22
- * `conditions`, `tries` or `credits`. `continue` has a goal that stopped go on.
22
+ * `conditions`, `tries` or `credits`; a `tries` or `credits` of 0 is no limit,
23
+ * or for `change` no change. `continue` has a goal that stopped go on.
23
24
  * `remove` ends the goal. After a change the goal goes on, with the asking run
24
25
  * as its next try.
25
26
  */
@@ -27,8 +28,8 @@ export const sparkGoalRequestSchema = z.object({
27
28
  action: z.enum(["set", "change", "continue", "remove"]),
28
29
  title: z.string().trim().min(1).max(80).optional(),
29
30
  conditions: z.array(sparkGoalConditionSchema).min(1).max(MAX_GOAL_CONDITIONS).optional(),
30
- tries: goalCaps.maxTurns,
31
- credits: goalCaps.creditBudget,
31
+ tries: z.number().int().min(0).max(100).optional(),
32
+ credits: z.number().int().min(0).max(1_000_000_000).optional(),
32
33
  });
33
34
  export const sparkGoalCommandSchema = z.discriminatedUnion("action", [
34
35
  z.object({
@@ -643,7 +643,8 @@ export class SparkAgentService {
643
643
  const message = conversation.messages.find(({ id }) => id === run.inputMessageId);
644
644
  if (message?.metadata?.goalContinuation)
645
645
  return { result: { goal: "refused" }, run };
646
- const caps = { maxTurns: request.tries, creditBudget: request.credits };
646
+ // 0, like a cap left out, is no cap.
647
+ const caps = { maxTurns: request.tries || undefined, creditBudget: request.credits || undefined };
647
648
  let goal;
648
649
  let ended;
649
650
  let outcome = "running";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@womp/spark-agent",
3
- "version": "13.1.0",
3
+ "version": "13.1.1",
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",