@prevalentware/opencode-goal-plugin 0.1.5 → 0.1.6

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/README.md CHANGED
@@ -61,7 +61,7 @@ Server options can be configured in `opencode.json`:
61
61
  "auto_continue": true,
62
62
  "max_auto_turns": 25,
63
63
  "min_continue_interval_seconds": 3,
64
- "default_token_budget": null
64
+ "default_token_budget": 1000000
65
65
  }
66
66
  ]
67
67
  ]
@@ -75,7 +75,7 @@ Defaults:
75
75
  - `min_continue_interval_seconds`: `3`
76
76
  - `register_command`: `true`
77
77
  - `command_name`: `"goal"`
78
- - `default_token_budget`: `null`
78
+ - `default_token_budget`: `1000000`
79
79
 
80
80
  ## Goal Workflow
81
81
 
@@ -87,7 +87,7 @@ Use `/goal <objective>` in a fresh OpenCode chat to create a long-running goal:
87
87
 
88
88
  Bare `/goal` reports the current goal state. `/goal clear` clears the goal. The TUI also includes a `Goal` command-palette entry for viewing, refreshing, or clearing the current goal state without creating a new goal.
89
89
 
90
- By default, `/goal <objective>` omits `token_budget`, matching Codex TUI behavior. If you want every new slash-created goal to use a fixed token budget without prompting the user, set `default_token_budget` to a positive integer in `opencode.json`.
90
+ By default, `/goal <objective>` creates the goal with `token_budget: 1000000`. To omit the budget, set `default_token_budget` to `null`. To use a different fixed budget without prompting the user, set `default_token_budget` to another positive integer in `opencode.json`.
91
91
 
92
92
  When writing the objective, include the scope, non-goals, and verification path when they matter. The agent is reminded to audit real files, command output, tests, or PR state before closing the goal.
93
93
 
package/dist/server.js CHANGED
@@ -298,10 +298,13 @@ Preserve the goal objective, status, budget, elapsed time, token count, and any
298
298
  var DEFAULT_MAX_AUTO_TURNS = 25;
299
299
  var DEFAULT_CONTINUE_INTERVAL_SECONDS = 3;
300
300
  var DEFAULT_COMMAND_NAME = "goal";
301
+ var DEFAULT_TOKEN_BUDGET = 1e6;
301
302
  function defaultTokenBudgetFromOptions(options) {
302
303
  const budget = options?.default_token_budget;
303
- if (budget == null)
304
+ if (budget === null)
304
305
  return null;
306
+ if (budget === undefined)
307
+ return DEFAULT_TOKEN_BUDGET;
305
308
  return Number.isInteger(budget) && budget > 0 ? budget : null;
306
309
  }
307
310
  function goalCommandTemplate(commandName, defaultTokenBudget) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prevalentware/opencode-goal-plugin",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Codex-style long-running goal mode for OpenCode.",
5
5
  "keywords": [
6
6
  "opencode",