@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 +3 -3
- package/dist/server.js +4 -1
- package/package.json +1 -1
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":
|
|
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`: `
|
|
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>`
|
|
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
|
|
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) {
|