opencode-matrixx 2.6.2 → 2.6.3
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 +0 -2
- package/dist/cli.js +24 -11
- package/dist/config/schema/experimental.d.ts +2 -0
- package/dist/config/schema/headroom.d.ts +1 -1
- package/dist/config/schema/hooks.d.ts +4 -8
- package/dist/config/schema/matrixx-config.d.ts +27 -9
- package/dist/config/schema/morpheus.d.ts +0 -2
- package/dist/config/schema/security.d.ts +49 -0
- package/dist/create-hooks.d.ts +2 -4
- package/dist/hooks/context-window-limit-recovery/index.d.ts +8 -0
- package/dist/hooks/context-window-limit-recovery/parser-patterns.d.ts +11 -0
- package/dist/hooks/context-window-limit-recovery/parser.d.ts +15 -0
- package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/recovery-hook.d.ts +2 -0
- package/dist/hooks/context-window-limit-recovery/storage.d.ts +3 -0
- package/dist/hooks/{anthropic-context-window-limit-recovery/tool-result-storage-sdk.d.ts → context-window-limit-recovery/tool-result-store.d.ts} +10 -0
- package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/types.d.ts +1 -1
- package/dist/hooks/context-window-monitor.d.ts +5 -1
- package/dist/hooks/index.d.ts +2 -4
- package/dist/hooks/input-secret-guard/detection-rules.d.ts +10 -0
- package/dist/hooks/input-secret-guard/detector.d.ts +22 -0
- package/dist/hooks/input-secret-guard/detector.test.d.ts +1 -0
- package/dist/hooks/input-secret-guard/hook.d.ts +19 -0
- package/dist/hooks/input-secret-guard/hook.test.d.ts +1 -0
- package/dist/hooks/input-secret-guard/index.d.ts +1 -0
- package/dist/hooks/input-secret-guard/redactor.d.ts +2 -0
- package/dist/hooks/input-secret-guard/redactor.test.d.ts +1 -0
- package/dist/hooks/input-secret-guard/session-allow-cache.d.ts +6 -0
- package/dist/hooks/input-secret-guard/session-allow-cache.test.d.ts +1 -0
- package/dist/hooks/keyword-detector/ultrawork/default.d.ts +2 -9
- package/dist/hooks/preemptive-compaction-trigger.d.ts +1 -1
- package/dist/hooks/rules-injector/constants.d.ts +0 -1
- package/dist/hooks/rules-injector/parser.d.ts +0 -1
- package/dist/hooks/rules-injector/rule-file-finder.d.ts +2 -4
- package/dist/hooks/rules-injector/types.d.ts +2 -3
- package/dist/hooks/task-continuation-enforcer/constants.d.ts +1 -0
- package/dist/hooks/task-continuation-enforcer/ulw-bootstrap.test.d.ts +1 -0
- package/dist/index.js +5052 -5315
- package/dist/matrixx.schema.json +146 -73
- package/dist/plugin/hooks/create-core-hooks.d.ts +2 -4
- package/dist/plugin/hooks/create-session-hooks.d.ts +2 -4
- package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +1 -2
- package/dist/plugin/hooks/create-transform-hooks.d.ts +2 -0
- package/dist/shared/context-limit-resolver.d.ts +1 -0
- package/dist/shared/context-limits.d.ts +36 -0
- package/dist/shared/index.d.ts +0 -1
- package/dist/shared/migration/hook-names.d.ts +1 -0
- package/dist/shared/model-sanitizer.d.ts +1 -1
- package/package.json +1 -1
- package/dist/hooks/anthropic-context-window-limit-recovery/empty-content-recovery-sdk.d.ts +0 -11
- package/dist/hooks/anthropic-context-window-limit-recovery/index.d.ts +0 -8
- package/dist/hooks/anthropic-context-window-limit-recovery/message-storage-directory.d.ts +0 -3
- package/dist/hooks/anthropic-context-window-limit-recovery/parser.d.ts +0 -2
- package/dist/hooks/anthropic-context-window-limit-recovery/storage-paths.d.ts +0 -3
- package/dist/hooks/anthropic-context-window-limit-recovery/storage.d.ts +0 -4
- package/dist/hooks/anthropic-context-window-limit-recovery/tool-result-storage.d.ts +0 -10
- package/dist/hooks/directory-readme-injector/constants.d.ts +0 -2
- package/dist/hooks/directory-readme-injector/finder.d.ts +0 -5
- package/dist/hooks/directory-readme-injector/hook.d.ts +0 -6
- package/dist/hooks/directory-readme-injector/index.d.ts +0 -1
- package/dist/hooks/directory-readme-injector/injector.d.ts +0 -16
- package/dist/hooks/directory-readme-injector/storage.d.ts +0 -1
- package/dist/hooks/mcp-startup-notification/index.d.ts +0 -9
- package/dist/hooks/question-label-truncator/hook.d.ts +0 -7
- package/dist/hooks/question-label-truncator/index.d.ts +0 -1
- package/dist/shared/migration/agent-category.d.ts +0 -19
- package/dist/shared/migration/agent-names.d.ts +0 -6
- package/dist/shared/migration/config-migration.d.ts +0 -1
- package/dist/shared/migration/model-versions.d.ts +0 -13
- package/dist/shared/migration.d.ts +0 -5
- /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/aggressive-truncation-strategy.d.ts +0 -0
- /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/client.d.ts +0 -0
- /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/empty-content-recovery.d.ts +0 -0
- /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/executor.d.ts +0 -0
- /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/message-builder.d.ts +0 -0
- /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/recovery-strategy.d.ts +0 -0
- /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/state.d.ts +0 -0
- /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/summarize-retry-strategy.d.ts +0 -0
- /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/target-token-truncation.d.ts +0 -0
- /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/tool-part-types.d.ts +0 -0
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Default ultrawork message optimized for Claude series models.
|
|
3
|
-
*
|
|
4
|
-
* Key characteristics:
|
|
5
|
-
* - Natural tool-like usage of explore/librarian agents (run_in_background=true)
|
|
6
|
-
* - Parallel execution emphasized - fire agents and continue working
|
|
7
|
-
* - Survey skills first methodology
|
|
8
|
-
* - Goal registration, scenario contracts, durable notepad
|
|
9
|
-
* - TDD workflow with RED→GREEN→SURFACE→REFACTOR→REGRESSION
|
|
10
|
-
* - Manual QA mandate with cleanup receipts
|
|
3
|
+
* Condensed v2: ~9k chars (was 19k) to reduce token pressure.
|
|
11
4
|
*/
|
|
12
|
-
export declare const ULTRAWORK_DEFAULT_MESSAGE:
|
|
5
|
+
export declare const ULTRAWORK_DEFAULT_MESSAGE = "<ultrawork-mode>\n\n**MANDATORY**: You MUST say \"ULTRAWORK MODE ENABLED!\" to the user as your first response when this mode activates. This is non-negotiable.\n\n[CODE RED] Maximum precision required. Ultrathink before acting.\n\n## ABSOLUTE CERTAINTY REQUIRED\n\n**YOU MUST NOT START IMPLEMENTATION UNTIL 100% CERTAIN.** You must: FULLY UNDERSTAND intent, EXPLORE codebase patterns, HAVE CRYSTAL CLEAR PLAN, RESOLVE ALL AMBIGUITY.\n\n### MANDATORY CERTAINTY PROTOCOL\n1. **THINK DEEPLY** - What is user's TRUE intent?\n2. **EXPLORE THOROUGHLY** - Fire trinity/operator agents (see below)\n3. **CONSULT SPECIALISTS** - Oracle (conventional), Matrix-bend (non-conventional)\n4. **ASK USER** - Only if ambiguity remains after exploration\n\n**NOT READY if:** assuming requirements, unsure files, \"probably\"/\"maybe\" in plan, can't explain exact steps.\n\n**WHEN IN DOUBT:**\ntask(subagent_type=\"trinity\", load_skills=[], prompt=\"I'm implementing [TASK] and need [KNOWLEDGE GAP]. Find [X] patterns \u2014 file paths, approach, conventions. Focus src/, skip tests. Return paths + descriptions.\", run_in_background=true)\ntask(subagent_type=\"operator\", load_skills=[], prompt=\"I'm working with [LIBRARY] and need [INFO]. Find docs + production examples \u2014 API, config, pitfalls. Skip tutorials.\", run_in_background=true)\ntask(subagent_type=\"oracle\", load_skills=[], prompt=\"Review my approach to [TASK]: [PLAN + FILES + CHANGES]. Concerns: [UNCERTAINTIES]. Evaluate correctness, missing issues, better alternatives.\", run_in_background=false)\n\n**ONLY AFTER** gathering context, resolving ambiguity, having precise step-by-step plan with 100% confidence \u2014 THEN implement.\n\n---\n\n## NO EXCUSES. DELIVER EXACTLY X.\n\n| Violation | Consequence |\n| \"I couldn't because...\" | UNACCEPTABLE \u2014 Find way or ask |\n| \"Simplified version...\" | UNACCEPTABLE \u2014 Deliver FULL |\n| \"You can extend later...\" | UNACCEPTABLE \u2014 Finish NOW |\n\n**IF BLOCKED:** Consult specialists, ask user, explore alternatives \u2014 never give up or deliver compromised version.\n\n\nTHE USER'S ORIGINAL REQUEST IS SACRED \u2014 deliver exactly X, no subset, no demo.\n\nSURVEY THE SKILLS \u2014 enumerate every skill, read descriptions, pick every relevant one, state choices with one-line reasons before acting.\n\n## MANDATORY: ACCEPTANCE CRITERIA + QA EXECUTION (NON-NEGOTIABLE)\nBEFORE writing ANY code, output an Acceptance Criteria block.\n1. [CRITERION]: [Observable, binary pass/fail condition] \u2014 PASS or FAIL\n2. Minimum 3 criteria (correctness, no regression, typecheck/lint)\n### Verification Commands:\n- [Exact command to run] -> [Expected output]\n3. Run every verification command, report \u2705/\u274C per criterion, fix and re-run ALL if any fail \u2014 NO EVIDENCE = NOT VERIFIED = NOT DONE\n\n---\n\nYOU MUST LEVERAGE ALL AVAILABLE AGENTS / CATEGORY + SKILLS TO THEIR FULLEST POTENTIAL.\n\n**SURVEY THE SKILLS FIRST:** Enumerate every skill, read descriptions, pick every genuinely relevant one, use them rather than working raw. State chosen skills with one-line reasons before acting.\n\n## MANDATORY: PLAN AGENT INVOCATION\n\n**SIZE SCOPE FIRST.** 2+ steps / multi-file / unclear-scope / architecture = MUST call plan agent.\n\n| Task has 2+ steps | MUST call plan agent |\n| Task scope unclear | MUST call plan agent |\n| Implementation required | MUST call plan agent |\n| Architecture needed | MUST call plan agent |\n\nAfter plan returns, execute in EXACT wave order and verification it specifies.\n\ntask(subagent_type=\"oracle\", load_skills=[], prompt=\"<gathered context + user request>\")\n\n**WHY:** Plan agent analyzes dependencies, outputs parallel task graph with waves, provides structured TODOs with category+skills.\n\n### SESSION CONTINUITY\n- Plan asks questions \u2192 task(session_id=\"{id}\", prompt=\"<answer>\")\n- Refine plan \u2192 task(session_id=\"{id}\", prompt=\"Adjust: <feedback>\")\n\n**FAILURE TO CALL PLAN = INCOMPLETE WORK.**\n\n---\n\n## AGENT UTILIZATION\n\n| Type | Action | Why |\n| Codebase exploration | task(subagent_type=\"trinity\", run_in_background=true) | Parallel, context-efficient |\n| Docs lookup | task(subagent_type=\"operator\", run_in_background=true) | Specialized knowledge |\n| Planning | task(subagent_type=\"oracle\") | Parallel task graph |\n| Hard problem | task(subagent_type=\"oracle\" or category=\"matrix-bend\") | Architecture/debugging |\n| Implementation | task(category=\"...\", load_skills=[...]) | Domain-optimized |\n\n**DELEGATE BY DEFAULT. DO IT YOURSELF only if <10 lines, single file, obvious pattern, full context loaded.**\n\n---\n\n## EXPLORER COMPLETION PROTOCOL (MANDATORY \u2014 FIXES STALL)\n\nAfter firing 3 parallel explorers with run_in_background=true:\n\n1. **POLL RESULTS:** Immediately call background_output(task_id=\"...\") for each explorer \u2014 wait max 30s per explorer\n2. **USE Promise.allSettled:** Never halt waiting for one explorer \u2014 collect what you can, note gaps\n3. **ALWAYS INVOKE PLAN:** Even if 0/3 explorers succeed, UNCONDITIONALLY call task(subagent_type=\"oracle\", ...) in finally block\n4. **TIMEOUT FALLBACK:** If background tasks still running after 30s, proceed with partial context and document missing areas as assumptions\n5. **NEVER STALL:** The session idle handler will bootstrap you to plan if you fail \u2014 but don't rely on it; invoke plan yourself\n\n```javascript\n// CORRECT \u2014 always reaches plan\nconst ids = [];\nids.push((await task(trinity, run_in_background=true)).task_id);\nids.push((await task(trinity, run_in_background=true)).task_id);\nids.push((await task(operator, run_in_background=true)).task_id);\n// poll\nconst results = await Promise.allSettled(ids.map(id => background_output(id)));\n// ALWAYS plan\nawait task(subagent_type=\"oracle\", prompt=\"...with explorer results: \"+JSON.stringify(results));\n```\n\n---\n\n## VERIFICATION GUARANTEE\n\n**NOTHING done without PROOF.**\n\n### Goal Registration\nRegister via todowrite: objective + 3+ scenarios (happy/edge/regression) + \"I'll stop when <observable>\"\n\n### Scenario Contract (3+ required)\n- Binary pass condition (\"returns 200 + body matches schema\")\n- Real surface (curl/CLI/browser), not just \"tests pass\"\n- Test file + test id (RED \u2192 GREEN)\n\n### Durable Notepad\n`# Ultrawork Notepad - <goal>\n## Plan\n## Scenarios\n## Now\n## Todo\n## Findings\n## Learnings`\n\n### TDD: RED \u2192 GREEN \u2192 SURFACE \u2192 REFACTOR \u2192 REGRESSION\n\n### QA Protocol\nRun every verification command, report \u2705/\u274C per criterion, fix and re-run ALL if any fail.\n\n## QA Report\n| # | Criterion | Result | Evidence |\n| 1 | ... | \u2705 PASS | ... |\n\n**Overall: X/Y PASS \u2014 ACCEPTED/NEEDS FIX**\n\n### Reviewer Gate\nTrigger: strictly/rigorously, 3+ files, 20+ turns, 30+ min, refactor/security. Spawn reviewer, fix criterion-cited blockers, re-submit max 2x.\n\n## EXECUTION RULES\n- TODO: `path: <action> for <scenario-id> \u2014 verify by <check>` \u2014 ONE in_progress at a time\n- PARALLEL: task(run_in_background=true) \u2014 NEVER sequential, never parallelise RED/GREEN\n- VERIFY: Re-read request, check every scenario PASS with both artifacts\n- DELEGATE: Orchestrate, don't do everything yourself\n\n## WORKFLOW\n1. Analyze request \u2192 2. Spawn explorers+direct tools IN PARALLEL \u2192 3. Plan agent \u2192 4. Execute with verification\n\n## ZERO TOLERANCE\n- NO Scope Reduction, NO MockUp, NO Partial \u2014 deliver FULL 100%\n- NO TEST DELETION \u2014 fix code, not tests\n\n1. EXPLORES + LIBRARIANS (parallel background)\n2. GATHER \u2192 PLAN AGENT\n3. WORK BY DELEGATING\n\nNOW.\n\n</ultrawork-mode>\n\n---\n";
|
|
13
6
|
export declare function getDefaultUltraworkMessage(): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MatrixxConfig } from "../config";
|
|
2
|
-
import { type ContextLimitModelCacheState } from "../shared/context-
|
|
2
|
+
import { type ContextLimitModelCacheState } from "../shared/context-limits";
|
|
3
3
|
import type { CachedCompactionState, PreemptiveCompactionContext } from "./preemptive-compaction-types";
|
|
4
4
|
export declare function runPreemptiveCompactionIfNeeded(args: {
|
|
5
5
|
ctx: PreemptiveCompactionContext;
|
|
@@ -3,5 +3,4 @@ export declare const PROJECT_MARKERS: string[];
|
|
|
3
3
|
export declare const PROJECT_RULE_SUBDIRS: [string, string][];
|
|
4
4
|
export declare const PROJECT_RULE_FILES: string[];
|
|
5
5
|
export declare const GITHUB_INSTRUCTIONS_PATTERN: RegExp;
|
|
6
|
-
export declare const USER_RULE_DIR = ".claude/rules";
|
|
7
6
|
export declare const RULE_EXTENSIONS: string[];
|
|
@@ -13,7 +13,6 @@ interface RuleFrontmatterResult {
|
|
|
13
13
|
* - "**\/*.py"
|
|
14
14
|
* - "src/**\/*.ts"
|
|
15
15
|
* - Comma-separated: globs: "**\/*.py, src/**\/*.ts"
|
|
16
|
-
* - Claude Code 'paths' field (alias for globs)
|
|
17
16
|
*/
|
|
18
17
|
export declare function parseRuleFrontmatter(content: string): RuleFrontmatterResult;
|
|
19
18
|
export {};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import type { RuleFileCandidate } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* Find all rule files for a given context.
|
|
4
|
-
* Searches from currentFile upward to projectRoot for rule directories
|
|
5
|
-
* then user-level directory (~/.claude/rules).
|
|
4
|
+
* Searches from currentFile upward to projectRoot for rule directories.
|
|
6
5
|
*
|
|
7
6
|
* IMPORTANT: This searches EVERY directory from file to project root.
|
|
8
7
|
* Not just the project root itself.
|
|
9
8
|
*
|
|
10
9
|
* @param projectRoot - Project root path (or null if outside any project)
|
|
11
|
-
* @param homeDir - User home directory
|
|
12
10
|
* @param currentFile - Current file being edited (for distance calculation)
|
|
13
11
|
* @returns Array of rule file candidates sorted by distance
|
|
14
12
|
*/
|
|
15
|
-
export declare function findRuleFiles(projectRoot: string | null,
|
|
13
|
+
export declare function findRuleFiles(projectRoot: string | null, currentFile: string): RuleFileCandidate[];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Rule file metadata (
|
|
3
|
-
* Supports
|
|
4
|
-
* @see https://docs.anthropic.com/en/docs/claude-code/settings#rule-files
|
|
2
|
+
* Rule file metadata (frontmatter)
|
|
3
|
+
* Supports globs format and GitHub Copilot format (applyTo)
|
|
5
4
|
* @see https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot
|
|
6
5
|
*/
|
|
7
6
|
export interface RuleMetadata {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const HOOK_NAME = "task-continuation-enforcer";
|
|
2
2
|
export declare const DEFAULT_SKIP_AGENTS: string[];
|
|
3
3
|
export declare const CONTINUATION_PROMPT: string;
|
|
4
|
+
export declare const BOOTSTRAP_PROMPT: string;
|
|
4
5
|
export declare const COUNTDOWN_SECONDS = 2;
|
|
5
6
|
export declare const TOAST_DURATION_MS = 900;
|
|
6
7
|
export declare const COUNTDOWN_GRACE_PERIOD_MS = 500;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|