opencode-ultra 0.2.1 → 0.2.2

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/config.d.ts CHANGED
@@ -38,6 +38,10 @@ declare const PluginConfigSchema: z.ZodObject<{
38
38
  disabled_hooks: z.ZodOptional<z.ZodArray<z.ZodString>>;
39
39
  disabled_tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
40
40
  disabled_mcps: z.ZodOptional<z.ZodArray<z.ZodString>>;
41
+ token_truncation: z.ZodOptional<z.ZodObject<{
42
+ maxChars: z.ZodOptional<z.ZodNumber>;
43
+ }, z.core.$strip>>;
44
+ demote_builtin: z.ZodOptional<z.ZodBoolean>;
41
45
  background_task: z.ZodOptional<z.ZodObject<{
42
46
  defaultConcurrency: z.ZodOptional<z.ZodNumber>;
43
47
  providerConcurrency: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
@@ -1,5 +1,5 @@
1
1
  export interface DetectedKeyword {
2
- type: "ultrawork" | "search" | "analyze";
2
+ type: "ultrawork" | "search" | "analyze" | "think";
3
3
  message: string;
4
4
  }
5
5
  export declare function removeCodeBlocks(text: string): string;
package/dist/index.js CHANGED
@@ -14400,6 +14400,10 @@ var PluginConfigSchema = exports_external.object({
14400
14400
  disabled_hooks: exports_external.array(exports_external.string()).optional(),
14401
14401
  disabled_tools: exports_external.array(exports_external.string()).optional(),
14402
14402
  disabled_mcps: exports_external.array(exports_external.string()).optional(),
14403
+ token_truncation: exports_external.object({
14404
+ maxChars: exports_external.number().min(1).optional()
14405
+ }).optional(),
14406
+ demote_builtin: exports_external.boolean().optional(),
14403
14407
  background_task: exports_external.object({
14404
14408
  defaultConcurrency: exports_external.number().optional(),
14405
14409
  providerConcurrency: exports_external.record(exports_external.string(), exports_external.number()).optional(),
@@ -14510,15 +14514,15 @@ function loadConfig(projectDir) {
14510
14514
  // src/agents/index.ts
14511
14515
  var BUILTIN_AGENTS = {
14512
14516
  sisyphus: {
14513
- model: "anthropic/claude-opus-4-5",
14514
- description: "Primary orchestrator \u2014 analyzes requests, delegates to specialists, verifies results",
14517
+ model: "openai-codex/gpt-5.3-codex",
14518
+ description: "Primary orchestrator \u2014 analyzes requests, reads code directly, delegates implementation to specialists",
14515
14519
  prompt: "__DYNAMIC__",
14516
14520
  maxTokens: 64000,
14517
- thinking: { type: "enabled", budgetTokens: 32000 },
14521
+ reasoningEffort: "high",
14518
14522
  tools: {
14519
- Grep: false,
14520
- Glob: false,
14521
- Read: false,
14523
+ Grep: true,
14524
+ Glob: true,
14525
+ Read: true,
14522
14526
  Write: false,
14523
14527
  Edit: false,
14524
14528
  Bash: false
@@ -14622,17 +14626,19 @@ ${example1}
14622
14626
 
14623
14627
  Estimated agents: N | Phases: M`;
14624
14628
  }
14625
- var SISYPHUS_PROMPT_TEMPLATE = (agentTable, planExample) => `You are Sisyphus, the ORCHESTRATOR. You do NOT do the work yourself.
14629
+ var SISYPHUS_PROMPT_TEMPLATE = (agentTable, planExample) => `You are Sisyphus, the ORCHESTRATOR. You read code yourself and delegate implementation.
14626
14630
 
14627
14631
  ## YOUR ROLE
14628
- You are a conductor. You THINK, PLAN, and DELEGATE via spawn_agent.
14629
- Your specialist agents run on models optimized for their tasks \u2014 faster and cheaper than you.
14630
- When you do Grep/Glob/Read directly, you waste your own expensive tokens on work a specialist does better.
14632
+ You are a conductor who can read the score directly. You THINK, READ, PLAN, and DELEGATE writing via spawn_agent.
14633
+ You can use Grep, Glob, Read to understand the codebase \u2014 this is FASTER than spawning an explore agent.
14634
+ Your specialist agents handle WRITING code, running tests, and implementation tasks.
14631
14635
 
14632
14636
  ## RULES
14633
- - Do NOT use Grep, Glob, Read, Write, Edit, Bash directly. Delegate via spawn_agent.
14637
+ - You CAN use Grep, Glob, Read directly \u2014 read code to understand context before planning.
14638
+ - You CANNOT use Write, Edit, Bash \u2014 delegate these via spawn_agent.
14634
14639
  - You may: use spawn_agent, track TODOs, ask the user questions, synthesize agent results.
14635
- - Always run independent tasks in PARALLEL via spawn_agent.
14640
+ - Always run independent IMPLEMENTATION tasks in PARALLEL via spawn_agent.
14641
+ - Do NOT spawn agents just to read files \u2014 do that yourself.
14636
14642
 
14637
14643
  ## AGENTS (via spawn_agent)
14638
14644
  ${agentTable}
@@ -14706,6 +14712,7 @@ function buildAgents(config2) {
14706
14712
  var CODE_BLOCK_PATTERN = /```[\s\S]*?```/g;
14707
14713
  var INLINE_CODE_PATTERN = /`[^`]+`/g;
14708
14714
  var ULTRAWORK_PATTERN = /\b(ultrawork|ulw)\b/i;
14715
+ var THINK_PATTERN = /\b(think\s+hard|think\s+through|think\s+deeply|think\s+carefully)\b|\u3058\u3063\u304F\u308A|\u6DF1\u304F\u8003\u3048\u3066|\u719F\u8003/i;
14709
14716
  var SEARCH_PATTERN = /\b(search|find|locate|lookup|look\s*up|explore|discover|scan|grep|query|browse|detect|trace|seek|track|pinpoint|hunt)\b|where\s+is|show\s+me|list\s+all|\u691C\u7D22|\u63A2\u3057\u3066|\u898B\u3064\u3051\u3066|\u30B5\u30FC\u30C1|\u63A2\u7D22|\u30B9\u30AD\u30E3\u30F3|\u3069\u3053|\u767A\u898B|\u635C\u7D22|\u898B\u3064\u3051\u51FA\u3059|\u4E00\u89A7|\u641C\u7D22|\u67E5\u627E|\u5BFB\u627E|\u67E5\u8BE2|\u68C0\u7D22|\u5B9A\u4F4D|\u626B\u63CF|\u53D1\u73B0|\u5728\u54EA\u91CC|\u627E\u51FA\u6765|\u5217\u51FA/i;
14710
14717
  var ANALYZE_PATTERN = /\b(analyze|analyse|investigate|examine|research|study|deep[\s-]?dive|inspect|audit|evaluate|assess|review|diagnose|scrutinize|dissect|debug|comprehend|interpret|breakdown|understand)\b|why\s+is|how\s+does|how\s+to|\u5206\u6790|\u8ABF\u67FB|\u89E3\u6790|\u691C\u8A0E|\u7814\u7A76|\u8A3A\u65AD|\u7406\u89E3|\u8AAC\u660E|\u691C\u8A3C|\u7CBE\u67FB|\u7A76\u660E|\u30C7\u30D0\u30C3\u30B0|\u306A\u305C|\u3069\u3046|\u4ED5\u7D44\u307F|\u8C03\u67E5|\u68C0\u67E5|\u5256\u6790|\u6DF1\u5165|\u8BCA\u65AD|\u89E3\u91CA|\u8C03\u8BD5|\u4E3A\u4EC0\u4E48|\u539F\u7406|\u641E\u6E05\u695A|\u5F04\u660E\u767D/i;
14711
14718
  function removeCodeBlocks(text) {
@@ -14717,7 +14724,8 @@ function extractPromptText(parts) {
14717
14724
  var KEYWORD_DEFS = [
14718
14725
  { pattern: ULTRAWORK_PATTERN, type: "ultrawork", getMessage: () => ULTRAWORK_MESSAGE },
14719
14726
  { pattern: SEARCH_PATTERN, type: "search", getMessage: () => SEARCH_MESSAGE },
14720
- { pattern: ANALYZE_PATTERN, type: "analyze", getMessage: () => ANALYZE_MESSAGE }
14727
+ { pattern: ANALYZE_PATTERN, type: "analyze", getMessage: () => ANALYZE_MESSAGE },
14728
+ { pattern: THINK_PATTERN, type: "think", getMessage: () => THINK_MESSAGE }
14721
14729
  ];
14722
14730
  function detectKeywords(text) {
14723
14731
  const clean = removeCodeBlocks(text);
@@ -14806,6 +14814,7 @@ IF COMPLEX \u2014 DO NOT STRUGGLE ALONE. Consult specialists:
14806
14814
  - **Oracle**: Conventional problems (architecture, debugging, complex logic)
14807
14815
 
14808
14816
  SYNTHESIZE findings before proceeding.`;
14817
+ var THINK_MESSAGE = `Extended thinking enabled. Take your time to reason thoroughly.`;
14809
14818
 
14810
14819
  // src/hooks/rules-injector.ts
14811
14820
  import * as fs2 from "fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-ultra",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Lightweight OpenCode 1.2.x plugin — ultrawork mode, multi-agent orchestration, rules injection",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",