opencode-matrixx 2.5.0 → 2.6.0

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.
Files changed (102) hide show
  1. package/README.md +181 -8
  2. package/dist/agents/dynamic-agent-prompt-builder.d.ts +3 -0
  3. package/dist/cli/doctor/checks/auth.d.ts +2 -0
  4. package/dist/cli/doctor/checks/config.d.ts +2 -0
  5. package/dist/cli/doctor/checks/index.d.ts +10 -0
  6. package/dist/cli/doctor/checks/mcp.d.ts +2 -0
  7. package/dist/cli/doctor/checks/optional.d.ts +2 -0
  8. package/dist/cli/doctor/checks/plugin.d.ts +2 -0
  9. package/dist/cli/doctor/checks/runtime.d.ts +2 -0
  10. package/dist/cli/doctor/format.d.ts +3 -0
  11. package/dist/cli/doctor/index.d.ts +9 -0
  12. package/dist/cli/doctor/types.d.ts +24 -0
  13. package/dist/cli/index.d.ts +13 -0
  14. package/dist/cli/install/index.d.ts +12 -0
  15. package/dist/cli.js +927 -0
  16. package/dist/config/index.d.ts +1 -1
  17. package/dist/config/schema/evolution.d.ts +89 -0
  18. package/dist/config/schema/headroom.d.ts +23 -0
  19. package/dist/config/schema/hooks.d.ts +6 -0
  20. package/dist/config/schema/matrixx-config.d.ts +54 -6
  21. package/dist/config/schema.d.ts +3 -3
  22. package/dist/create-hooks.d.ts +5 -0
  23. package/dist/features/background-agent/error-helpers.d.ts +0 -2
  24. package/dist/features/builtin-commands/templates/evolution.d.ts +1 -0
  25. package/dist/features/builtin-commands/types.d.ts +1 -1
  26. package/dist/features/evolution/compressor/index.d.ts +5 -0
  27. package/dist/features/evolution/compressor/interface.d.ts +5 -0
  28. package/dist/features/evolution/compressor/llm.d.ts +12 -0
  29. package/dist/features/evolution/evaluator.d.ts +11 -0
  30. package/dist/features/evolution/index.d.ts +7 -0
  31. package/dist/features/evolution/pipeline.d.ts +7 -0
  32. package/dist/features/evolution/store.d.ts +22 -0
  33. package/dist/features/evolution/types.d.ts +51 -0
  34. package/dist/features/evolution/writer.d.ts +20 -0
  35. package/dist/features/task-storage/types.d.ts +2 -2
  36. package/dist/features/task-toast-manager/types.d.ts +2 -2
  37. package/dist/hooks/anthropic-context-window-limit-recovery/message-builder.d.ts +0 -1
  38. package/dist/hooks/anthropic-context-window-limit-recovery/tool-part-types.d.ts +2 -1
  39. package/dist/hooks/evolution-compressor/index.d.ts +15 -0
  40. package/dist/hooks/evolution-hitl/index.d.ts +12 -0
  41. package/dist/hooks/evolution-quality-gate/index.d.ts +6 -0
  42. package/dist/hooks/evolution-watcher/index.d.ts +21 -0
  43. package/dist/hooks/evolution-watcher/utils.d.ts +5 -0
  44. package/dist/hooks/index.d.ts +6 -0
  45. package/dist/hooks/keyword-detector/analyze/default.d.ts +1 -1
  46. package/dist/hooks/keyword-detector/constants.d.ts +1 -1
  47. package/dist/hooks/keyword-detector/search/default.d.ts +1 -1
  48. package/dist/hooks/keyword-detector/ultrawork/deepseek.d.ts +16 -0
  49. package/dist/hooks/keyword-detector/ultrawork/default.d.ts +5 -2
  50. package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +12 -0
  51. package/dist/hooks/keyword-detector/ultrawork/glm.d.ts +11 -0
  52. package/dist/hooks/keyword-detector/ultrawork/gpt5.2.d.ts +4 -7
  53. package/dist/hooks/keyword-detector/ultrawork/index.d.ts +11 -3
  54. package/dist/hooks/keyword-detector/ultrawork/mimo.d.ts +16 -0
  55. package/dist/hooks/keyword-detector/ultrawork/source-detector.d.ts +17 -5
  56. package/dist/hooks/matrix-loop/with-timeout.d.ts +1 -1
  57. package/dist/hooks/mcp-startup-notification/index.d.ts +9 -0
  58. package/dist/hooks/session-recovery/types.d.ts +2 -1
  59. package/dist/hooks/task-todo-mirror/constants.d.ts +3 -0
  60. package/dist/hooks/task-todo-mirror/hook.d.ts +43 -0
  61. package/dist/hooks/task-todo-mirror/index.d.ts +2 -0
  62. package/dist/hooks/think-mode/types.d.ts +3 -0
  63. package/dist/index.js +6136 -3867
  64. package/dist/matrixx.schema.json +5412 -0
  65. package/dist/mcp/index.d.ts +10 -1
  66. package/dist/mcp/mcp-startup-state.d.ts +4 -0
  67. package/dist/mcp/mcp-validator.d.ts +13 -0
  68. package/dist/plugin/hooks/create-continuation-hooks.d.ts +3 -1
  69. package/dist/plugin/hooks/create-core-hooks.d.ts +3 -0
  70. package/dist/plugin/hooks/create-session-hooks.d.ts +2 -1
  71. package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +3 -1
  72. package/dist/plugin-handlers/agent-config-handler.d.ts +1 -0
  73. package/dist/shared/delay.d.ts +1 -0
  74. package/dist/shared/error-formatting.d.ts +1 -0
  75. package/dist/shared/format-bytes.d.ts +1 -0
  76. package/dist/shared/format-bytes.test.d.ts +1 -0
  77. package/dist/shared/index.d.ts +7 -9
  78. package/dist/shared/is-abort-error.test.d.ts +1 -0
  79. package/dist/shared/model-resolution-pipeline.d.ts +26 -1
  80. package/dist/shared/opencode-config-dir.d.ts +13 -2
  81. package/dist/shared/sentinels.d.ts +2 -0
  82. package/dist/shared/session-state.d.ts +15 -0
  83. package/dist/shared/status-types.d.ts +1 -0
  84. package/dist/shared/with-timeout.d.ts +1 -0
  85. package/dist/shared/with-timeout.test.d.ts +1 -0
  86. package/dist/tools/background-task/delay.d.ts +1 -1
  87. package/dist/tools/index.d.ts +1 -0
  88. package/dist/tools/pdf-extract-figures/index.d.ts +1 -0
  89. package/dist/tools/pdf-extract-figures/tools.d.ts +11 -0
  90. package/dist/tools/task/todo-sync.d.ts +1 -1
  91. package/dist/tools/task/types.d.ts +5 -5
  92. package/package.json +15 -4
  93. package/dist/config/schema/model-capabilities.d.ts +0 -8
  94. package/dist/hooks/runtime-fallback/is-abort-error.d.ts +0 -1
  95. package/dist/shared/is-object.d.ts +0 -1
  96. package/dist/shared/model-resolution-types.d.ts +0 -27
  97. package/dist/shared/model-resolver.d.ts +0 -24
  98. package/dist/shared/opencode-config-dir-types.d.ts +0 -13
  99. package/dist/shared/session-model-state.d.ts +0 -6
  100. package/dist/shared/session-temperature-store.d.ts +0 -3
  101. package/dist/shared/session-tools-store.d.ts +0 -3
  102. /package/dist/{hooks/architect → shared}/is-abort-error.d.ts +0 -0
@@ -1,4 +1,6 @@
1
1
  import type { MatrixxConfig } from "../config/schema";
2
+ import { type McpCreationFailure } from "./mcp-validator";
3
+ export type { McpCreationFailure } from "./mcp-validator";
2
4
  export { type McpName, McpNameSchema } from "./types";
3
5
  type RemoteMcpConfig = {
4
6
  type: "remote";
@@ -13,4 +15,11 @@ type LocalMcpConfig = {
13
15
  enabled: boolean;
14
16
  };
15
17
  type BuiltinMcpConfig = RemoteMcpConfig | LocalMcpConfig;
16
- export declare function createBuiltinMcps(disabledMcps?: string[], config?: MatrixxConfig): Record<string, BuiltinMcpConfig>;
18
+ export interface CreateBuiltinMcpsOptions {
19
+ isCommandAvailable?: (command: string) => boolean;
20
+ }
21
+ export interface CreateBuiltinMcpsResult {
22
+ mcps: Record<string, BuiltinMcpConfig>;
23
+ failures: McpCreationFailure[];
24
+ }
25
+ export declare function createBuiltinMcps(disabledMcps?: string[], config?: MatrixxConfig, options?: CreateBuiltinMcpsOptions): CreateBuiltinMcpsResult;
@@ -0,0 +1,4 @@
1
+ import type { McpCreationFailure } from "./mcp-validator";
2
+ export declare function setMcpStartupFailures(failures: McpCreationFailure[]): void;
3
+ export declare function getMcpStartupFailures(): McpCreationFailure[];
4
+ export declare function _resetMcpStartupFailuresForTesting(): void;
@@ -0,0 +1,13 @@
1
+ import type { WebsearchConfig } from "../config/schema";
2
+ export interface McpCreationFailure {
3
+ name: string;
4
+ error: string;
5
+ }
6
+ export type McpValidationResult = {
7
+ ok: true;
8
+ } | {
9
+ ok: false;
10
+ error: string;
11
+ };
12
+ export declare function validateWebsearchConfig(config?: WebsearchConfig): McpValidationResult;
13
+ export declare function isCommandAvailable(command: string): boolean;
@@ -1,6 +1,6 @@
1
1
  import type { HookName, MatrixxConfig } from "../../config";
2
2
  import type { BackgroundManager } from "../../features/background-agent";
3
- import { createArchitectHook, createBackgroundNotificationHook, createCompactionContextInjector, createCompactionTodoPreserverHook, createPlanPersister, createStopContinuationGuardHook, createTodoContinuationEnforcer } from "../../hooks";
3
+ import { createArchitectHook, createBackgroundNotificationHook, createCompactionContextInjector, createCompactionTodoPreserverHook, createEvolutionCompressorHook, createEvolutionHitlHook, createPlanPersister, createStopContinuationGuardHook, createTodoContinuationEnforcer } from "../../hooks";
4
4
  import type { PluginContext } from "../types";
5
5
  import { createUnstableAgentBabysitter } from "../unstable-agent-babysitter";
6
6
  export type ContinuationHooks = {
@@ -12,6 +12,8 @@ export type ContinuationHooks = {
12
12
  backgroundNotificationHook: ReturnType<typeof createBackgroundNotificationHook> | null;
13
13
  architectHook: ReturnType<typeof createArchitectHook> | null;
14
14
  planPersister: ReturnType<typeof createPlanPersister> | null;
15
+ evolutionCompressor: ReturnType<typeof createEvolutionCompressorHook> | null;
16
+ evolutionHitl: ReturnType<typeof createEvolutionHitlHook> | null;
15
17
  };
16
18
  type SessionRecovery = {
17
19
  setOnAbortCallback: (callback: (sessionID: string) => void) => void;
@@ -31,6 +31,8 @@ export declare function createCoreHooks(args: {
31
31
  hashlineEditDiffEnhancer: ReturnType<typeof import("../../hooks").createHashlineEditDiffEnhancerHook> | null;
32
32
  qualityGate: ReturnType<typeof import("../../hooks").createQualityGateHook> | null;
33
33
  taskNotepad: ReturnType<typeof import("../../hooks").createTaskNotepadHook> | null;
34
+ evolutionWatcher: ReturnType<typeof import("../../hooks").createEvolutionWatcherHook> | null;
35
+ taskTodoMirror: ReturnType<typeof import("../../hooks").createTaskTodoMirrorHook> | null;
34
36
  contextWindowMonitor: ReturnType<typeof import("../../hooks").createContextWindowMonitorHook> | null;
35
37
  preemptiveCompaction: ReturnType<typeof import("../../hooks").createPreemptiveCompactionHook> | null;
36
38
  sessionRecovery: ReturnType<typeof import("../../hooks").createSessionRecoveryHook> | null;
@@ -52,4 +54,5 @@ export declare function createCoreHooks(args: {
52
54
  anthropicEffort: ReturnType<typeof import("../../hooks/anthropic-effort").createAnthropicEffortHook> | null;
53
55
  runtimeFallback: ReturnType<typeof import("../../hooks").createRuntimeFallbackHook> | null;
54
56
  rtkBashRewriter: ReturnType<typeof import("../../hooks").createRtkBashRewriterHook> | null;
57
+ mcpStartupNotification: ReturnType<typeof import("../../hooks").createMcpStartupNotificationHook> | null;
55
58
  };
@@ -1,5 +1,5 @@
1
1
  import type { HookName, MatrixxConfig } from "../../config";
2
- import { createAgentUsageReminderHook, createAnthropicContextWindowLimitRecoveryHook, createAutoUpdateCheckerHook, createContextWindowMonitorHook, createDelegateTaskRetryHook, createEditErrorRecoveryHook, createInteractiveBashSessionHook, createMatrixLoopHook, createMouseNotepadHook, createNonInteractiveEnvHook, createOracleMdOnlyHook, createPreemptiveCompactionHook, createQuestionLabelTruncatorHook, createRtkBashRewriterHook, createRuntimeFallbackHook, createSessionNotification, createSessionRecoveryHook, createStartWorkHook, createTaskResumeInfoHook, createThinkModeHook } from "../../hooks";
2
+ import { createAgentUsageReminderHook, createAnthropicContextWindowLimitRecoveryHook, createAutoUpdateCheckerHook, createContextWindowMonitorHook, createDelegateTaskRetryHook, createEditErrorRecoveryHook, createInteractiveBashSessionHook, createMatrixLoopHook, createMcpStartupNotificationHook, createMouseNotepadHook, createNonInteractiveEnvHook, createOracleMdOnlyHook, createPreemptiveCompactionHook, createQuestionLabelTruncatorHook, createRtkBashRewriterHook, createRuntimeFallbackHook, createSessionNotification, createSessionRecoveryHook, createStartWorkHook, createTaskResumeInfoHook, createThinkModeHook } from "../../hooks";
3
3
  import { createAnthropicEffortHook } from "../../hooks/anthropic-effort";
4
4
  import type { PluginContext } from "../types";
5
5
  export type SessionHooks = {
@@ -24,6 +24,7 @@ export type SessionHooks = {
24
24
  anthropicEffort: ReturnType<typeof createAnthropicEffortHook> | null;
25
25
  runtimeFallback: ReturnType<typeof createRuntimeFallbackHook> | null;
26
26
  rtkBashRewriter: ReturnType<typeof createRtkBashRewriterHook> | null;
27
+ mcpStartupNotification: ReturnType<typeof createMcpStartupNotificationHook> | null;
27
28
  };
28
29
  export declare function createSessionHooks(args: {
29
30
  ctx: PluginContext;
@@ -1,5 +1,5 @@
1
1
  import type { HookName, MatrixxConfig } from "../../config";
2
- import { createBashFileReadGuardHook, createCommentCheckerHooks, createDirectoryAgentsInjectorHook, createDirectoryReadmeInjectorHook, createEmptyTaskResponseDetectorHook, createEnvFileWriteGuardHook, createHashlineEditDiffEnhancerHook, createHashlineReadEnhancerHook, createJsonErrorRecoveryHook, createQualityGateHook, createReadImageResizerHook, createRulesInjectorHook, createSecretLeakGuardHook, createTaskNotepadHook, createTasksTodowriteDisablerHook, createTodoDescriptionOverrideHook, createToolOutputTruncatorHook, createWebFetchRedirectGuardHook, createWriteExistingFileGuardHook } from "../../hooks";
2
+ import { createBashFileReadGuardHook, createCommentCheckerHooks, createDirectoryAgentsInjectorHook, createDirectoryReadmeInjectorHook, createEmptyTaskResponseDetectorHook, createEnvFileWriteGuardHook, createEvolutionWatcherHook, createHashlineEditDiffEnhancerHook, createHashlineReadEnhancerHook, createJsonErrorRecoveryHook, createQualityGateHook, createReadImageResizerHook, createRulesInjectorHook, createSecretLeakGuardHook, createTaskNotepadHook, createTasksTodowriteDisablerHook, createTaskTodoMirrorHook, createTodoDescriptionOverrideHook, createToolOutputTruncatorHook, createWebFetchRedirectGuardHook, createWriteExistingFileGuardHook } from "../../hooks";
3
3
  import type { PluginContext } from "../types";
4
4
  export type ToolGuardHooks = {
5
5
  commentChecker: ReturnType<typeof createCommentCheckerHooks> | null;
@@ -21,6 +21,8 @@ export type ToolGuardHooks = {
21
21
  hashlineEditDiffEnhancer: ReturnType<typeof createHashlineEditDiffEnhancerHook> | null;
22
22
  qualityGate: ReturnType<typeof createQualityGateHook> | null;
23
23
  taskNotepad: ReturnType<typeof createTaskNotepadHook> | null;
24
+ evolutionWatcher: ReturnType<typeof createEvolutionWatcherHook> | null;
25
+ taskTodoMirror: ReturnType<typeof createTaskTodoMirrorHook> | null;
24
26
  };
25
27
  export declare function createToolGuardHooks(args: {
26
28
  ctx: PluginContext;
@@ -2,6 +2,7 @@ import type { MatrixxConfig } from "../config";
2
2
  import type { PluginComponents } from "./plugin-components-loader";
3
3
  export declare function setAvailableToolNames(names: string[]): void;
4
4
  export declare function getAvailableToolNames(): string[];
5
+ export declare function injectContextDiscipline(availableToolNames: string[], agents: Record<string, Record<string, unknown>>): void;
5
6
  export declare function applyAgentConfig(params: {
6
7
  config: Record<string, unknown>;
7
8
  pluginConfig: MatrixxConfig;
@@ -0,0 +1 @@
1
+ export declare function delay(ms: number): Promise<void>;
@@ -25,3 +25,4 @@ export interface ErrorContext {
25
25
  * Replaces the `?? "pending"` anti-pattern across matrixx background task tools.
26
26
  */
27
27
  export declare function formatDetailedError(error: unknown, ctx: ErrorContext): string;
28
+ export declare function getErrorMessage(error: unknown): string;
@@ -0,0 +1 @@
1
+ export declare function formatBytes(bytes: number): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,34 +1,30 @@
1
1
  export * from "./agent-tool-restrictions";
2
2
  export * from "./agent-variant";
3
3
  export * from "./binary-downloader";
4
- export * from "./code-patterns";
5
- export * from "./code-patterns";
6
4
  export * from "./command-executor";
7
5
  export * from "./config-errors";
8
6
  export * from "./connected-providers-cache";
9
7
  export * from "./data-path";
10
8
  export * from "./deep-merge";
9
+ export * from "./delay";
11
10
  export * from "./dynamic-truncator";
12
11
  export * from "./external-plugin-detector";
13
12
  export * from "./file-reference-resolver";
14
13
  export * from "./file-utils";
14
+ export * from "./format-bytes";
15
15
  export * from "./format-duration";
16
16
  export * from "./frontmatter";
17
17
  export * from "./git-worktree";
18
- export * from "./is-object";
18
+ export * from "./is-abort-error";
19
19
  export * from "./jsonc-parser";
20
20
  export * from "./logger";
21
21
  export * from "./migration";
22
22
  export * from "./model-availability";
23
23
  export * from "./model-requirements";
24
- export { resolveModelPipeline } from "./model-resolution-pipeline";
25
- export type { ModelResolutionProvenance, ModelResolutionRequest, ModelResolutionResult, } from "./model-resolution-types";
26
- export * from "./model-resolver";
27
- export * from "./model-sanitizer";
24
+ export { type ModelResolutionProvenance, type ModelResolutionRequest, type ModelResolutionResult, normalizeModel, resolveModelPipeline, } from "./model-resolution-pipeline";
28
25
  export * from "./model-suggestion-retry";
29
26
  export * from "./normalize-sdk-response";
30
27
  export * from "./opencode-config-dir";
31
- export type { OpenCodeBinaryType, OpenCodeConfigDirOptions, OpenCodeConfigPaths, } from "./opencode-config-dir-types";
32
28
  export * from "./opencode-http-api";
33
29
  export * from "./opencode-message-dir";
34
30
  export * from "./opencode-server-auth";
@@ -38,14 +34,16 @@ export * from "./opencode-version";
38
34
  export * from "./permission-compat";
39
35
  export * from "./port-utils";
40
36
  export * from "./safe-create-hook";
37
+ export * from "./sentinels";
41
38
  export * from "./session-cursor";
42
39
  export * from "./session-directory-resolver";
43
40
  export * from "./session-utils";
44
41
  export * from "./shell-env";
42
+ export * from "./status-types";
45
43
  export * from "./system-directive";
46
44
  export * from "./tmux";
47
45
  export * from "./token-cache";
48
- export * from "./tool-guards";
49
46
  export * from "./transcript-path";
50
47
  export * from "./truncate-description";
48
+ export * from "./with-timeout";
51
49
  export * from "./zip-extractor";
@@ -0,0 +1 @@
1
+ export {};
@@ -1,2 +1,27 @@
1
- import type { ModelResolutionRequest, ModelResolutionResult } from "./model-resolution-types";
1
+ import type { FallbackEntry } from "./model-requirements";
2
+ export type ModelResolutionRequest = {
3
+ intent?: {
4
+ globalOverrideModel?: string;
5
+ uiSelectedModel?: string;
6
+ userModel?: string;
7
+ categoryDefaultModel?: string;
8
+ };
9
+ constraints: {
10
+ availableModels: Set<string>;
11
+ connectedProviders?: string[];
12
+ };
13
+ policy?: {
14
+ fallbackChain?: FallbackEntry[];
15
+ systemDefaultModel?: string;
16
+ };
17
+ };
18
+ export type ModelResolutionProvenance = "override" | "category-default" | "provider-fallback" | "system-default";
19
+ export type ModelResolutionResult = {
20
+ model: string;
21
+ provenance: ModelResolutionProvenance;
22
+ variant?: string;
23
+ attempted?: string[];
24
+ reason?: string;
25
+ };
26
+ export declare function normalizeModel(model?: string): string | undefined;
2
27
  export declare function resolveModelPipeline(request: ModelResolutionRequest): ModelResolutionResult | undefined;
@@ -1,5 +1,16 @@
1
- import type { OpenCodeConfigDirOptions, OpenCodeConfigPaths } from "./opencode-config-dir-types";
2
- export type { OpenCodeBinaryType, OpenCodeConfigDirOptions, OpenCodeConfigPaths, } from "./opencode-config-dir-types";
1
+ export type OpenCodeBinaryType = "opencode" | "opencode-desktop";
2
+ export type OpenCodeConfigDirOptions = {
3
+ binary: OpenCodeBinaryType;
4
+ version?: string | null;
5
+ checkExisting?: boolean;
6
+ };
7
+ export type OpenCodeConfigPaths = {
8
+ configDir: string;
9
+ configJson: string;
10
+ configJsonc: string;
11
+ packageJson: string;
12
+ matrixxConfig: string;
13
+ };
3
14
  export declare const TAURI_APP_IDENTIFIER = "ai.opencode.desktop";
4
15
  export declare const TAURI_APP_IDENTIFIER_DEV = "ai.opencode.desktop.dev";
5
16
  export declare function isDevBuild(version: string | null | undefined): boolean;
@@ -0,0 +1,2 @@
1
+ export declare const NOT_CACHED: unique symbol;
2
+ export declare const FALSE_PENDING_RETRY: unique symbol;
@@ -0,0 +1,15 @@
1
+ export declare function setSessionTemperature(sessionID: string, temperature: number): void;
2
+ export declare function getSessionTemperature(sessionID: string): number | undefined;
3
+ export declare function clearSessionTemperature(sessionID: string): void;
4
+ export declare function setSessionTools(sessionID: string, tools: Record<string, boolean>): void;
5
+ export declare function getSessionTools(sessionID: string): Record<string, boolean> | undefined;
6
+ export declare function clearSessionTools(): void;
7
+ /**
8
+ * Per-session model tracking.
9
+ */
10
+ type SessionModel = {
11
+ providerID: string;
12
+ modelID: string;
13
+ };
14
+ export declare function getSessionModel(sessionID: string): SessionModel | undefined;
15
+ export {};
@@ -0,0 +1 @@
1
+ export type TaskStatus = "pending" | "running" | "completed" | "error";
@@ -0,0 +1 @@
1
+ export declare function withTimeout<T>(promise: Promise<T>, timeoutMs: number, errorMessage?: string): Promise<T>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1 @@
1
- export declare function delay(ms: number): Promise<void>;
1
+ export { delay } from "../../shared/delay";
@@ -8,6 +8,7 @@ export { createGlobTools } from "./glob";
8
8
  export { createGrepTools } from "./grep";
9
9
  export { createHandoffTools } from "./handoff";
10
10
  export { interactive_bash, startBackgroundCheck as startTmuxCheck } from "./interactive-bash";
11
+ export { createPdfExtractFiguresTool } from "./pdf-extract-figures";
11
12
  export { createSessionManagerTools } from "./session-manager";
12
13
  export { sessionExists } from "./session-manager/storage";
13
14
  export { createSkillTool } from "./skill";
@@ -0,0 +1 @@
1
+ export { createPdfExtractFiguresTool } from "./tools";
@@ -0,0 +1,11 @@
1
+ import { type ToolDefinition } from "@opencode-ai/plugin/tool";
2
+ export interface PdfExtractFiguresArgs {
3
+ file_path: string;
4
+ output_dir?: string;
5
+ page?: number;
6
+ min_width?: number;
7
+ min_height?: number;
8
+ min_area?: number;
9
+ json_only?: boolean;
10
+ }
11
+ export declare function createPdfExtractFiguresTool(): Record<string, ToolDefinition>;
@@ -1,5 +1,5 @@
1
1
  import type { PluginInput } from "@opencode-ai/plugin";
2
- import type { Task } from "../../features/task-storage/types.ts";
2
+ import type { Task } from "../../features/task-storage/types";
3
3
  export interface TodoInfo {
4
4
  id?: string;
5
5
  content: string;
@@ -1,8 +1,8 @@
1
1
  import { z } from "zod";
2
2
  export declare const TaskStatusSchema: z.ZodEnum<{
3
3
  deleted: "deleted";
4
- completed: "completed";
5
4
  pending: "pending";
5
+ completed: "completed";
6
6
  in_progress: "in_progress";
7
7
  }>;
8
8
  export type TaskStatus = z.infer<typeof TaskStatusSchema>;
@@ -12,8 +12,8 @@ export declare const TaskObjectSchema: z.ZodObject<{
12
12
  description: z.ZodString;
13
13
  status: z.ZodEnum<{
14
14
  deleted: "deleted";
15
- completed: "completed";
16
15
  pending: "pending";
16
+ completed: "completed";
17
17
  in_progress: "in_progress";
18
18
  }>;
19
19
  activeForm: z.ZodOptional<z.ZodString>;
@@ -32,8 +32,8 @@ export declare const TaskSchema: z.ZodObject<{
32
32
  description: z.ZodString;
33
33
  status: z.ZodEnum<{
34
34
  deleted: "deleted";
35
- completed: "completed";
36
35
  pending: "pending";
36
+ completed: "completed";
37
37
  in_progress: "in_progress";
38
38
  }>;
39
39
  activeForm: z.ZodOptional<z.ZodString>;
@@ -61,8 +61,8 @@ export type TaskCreateInput = z.infer<typeof TaskCreateInputSchema>;
61
61
  export declare const TaskListInputSchema: z.ZodObject<{
62
62
  status: z.ZodOptional<z.ZodEnum<{
63
63
  deleted: "deleted";
64
- completed: "completed";
65
64
  pending: "pending";
65
+ completed: "completed";
66
66
  in_progress: "in_progress";
67
67
  }>>;
68
68
  parentID: z.ZodOptional<z.ZodString>;
@@ -78,8 +78,8 @@ export declare const TaskUpdateInputSchema: z.ZodObject<{
78
78
  description: z.ZodOptional<z.ZodString>;
79
79
  status: z.ZodOptional<z.ZodEnum<{
80
80
  deleted: "deleted";
81
- completed: "completed";
82
81
  pending: "pending";
82
+ completed: "completed";
83
83
  in_progress: "in_progress";
84
84
  }>>;
85
85
  activeForm: z.ZodOptional<z.ZodString>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-matrixx",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,6 +8,10 @@
8
8
  "files": [
9
9
  "dist"
10
10
  ],
11
+ "bin": {
12
+ "opencode-matrixx": "dist/cli.js",
13
+ "matrixx": "dist/cli.js"
14
+ },
11
15
  "exports": {
12
16
  ".": {
13
17
  "types": "./dist/index.d.ts",
@@ -16,7 +20,9 @@
16
20
  "./schema.json": "./dist/matrixx.schema.json"
17
21
  },
18
22
  "scripts": {
19
- "build": "bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi && tsc --emitDeclarationOnly && bun run build:schema",
23
+ "build": "bun run build:plugin && bun run build:cli && tsc --emitDeclarationOnly && bun run build:schema",
24
+ "build:plugin": "bun build src/index.ts --outdir dist --target bun --format esm --external @ast-grep/napi --external \"opencode/*\" --external \"@opencode-ai/core/*\"",
25
+ "build:cli": "bun build src/cli/index.ts --outfile dist/cli.js --target bun --format esm && chmod +x dist/cli.js",
20
26
  "build:schema": "bun run script/build-schema.ts",
21
27
  "clean": "rm -rf dist",
22
28
  "prepublishOnly": "bun run clean && bun run build",
@@ -24,7 +30,8 @@
24
30
  "lint": "biome check src/",
25
31
  "lint:fix": "biome check --write src/",
26
32
  "ci": "bash script/run-ci.sh",
27
- "test": "bash script/run-ci.sh"
33
+ "test": "bash script/run-ci.sh",
34
+ "matrixx": "bun run bin/matrixx.ts"
28
35
  },
29
36
  "keywords": [
30
37
  "opencode",
@@ -94,5 +101,9 @@
94
101
  "@ast-grep/cli",
95
102
  "@ast-grep/napi",
96
103
  "@code-yeongyu/comment-checker"
97
- ]
104
+ ],
105
+ "publishConfig": {
106
+ "access": "public",
107
+ "provenance": true
108
+ }
98
109
  }
@@ -1,8 +0,0 @@
1
- import { z } from "zod";
2
- export declare const ModelCapabilitiesConfigSchema: z.ZodObject<{
3
- enabled: z.ZodOptional<z.ZodBoolean>;
4
- auto_refresh_on_start: z.ZodOptional<z.ZodBoolean>;
5
- refresh_timeout_ms: z.ZodOptional<z.ZodNumber>;
6
- source_url: z.ZodOptional<z.ZodString>;
7
- }, z.core.$strip>;
8
- export type ModelCapabilitiesConfig = z.infer<typeof ModelCapabilitiesConfigSchema>;
@@ -1 +0,0 @@
1
- export declare function isAbortError(error: unknown): boolean;
@@ -1 +0,0 @@
1
- export declare function isObject(value: unknown): value is Record<string, unknown>;
@@ -1,27 +0,0 @@
1
- import type { FallbackEntry } from "./model-requirements";
2
- export type ModelResolutionRequest = {
3
- intent?: {
4
- /** Global override for all agents and categories — set via the global_model config.
5
- * Highest priority; checked before everything else. */
6
- globalOverrideModel?: string;
7
- uiSelectedModel?: string;
8
- userModel?: string;
9
- categoryDefaultModel?: string;
10
- };
11
- constraints: {
12
- availableModels: Set<string>;
13
- connectedProviders?: string[];
14
- };
15
- policy?: {
16
- fallbackChain?: FallbackEntry[];
17
- systemDefaultModel?: string;
18
- };
19
- };
20
- export type ModelResolutionProvenance = "override" | "category-default" | "provider-fallback" | "system-default";
21
- export type ModelResolutionResult = {
22
- model: string;
23
- provenance: ModelResolutionProvenance;
24
- variant?: string;
25
- attempted?: string[];
26
- reason?: string;
27
- };
@@ -1,24 +0,0 @@
1
- import type { FallbackEntry } from "./model-requirements";
2
- import type { ModelResolutionProvenance } from "./model-resolution-types";
3
- export type ModelResolutionInput = {
4
- userModel?: string;
5
- inheritedModel?: string;
6
- systemDefault?: string;
7
- };
8
- /** @deprecated Use ModelResolutionProvenance from model-resolution-types.ts */
9
- export type ModelSource = ModelResolutionProvenance;
10
- export type ModelResolutionResult = {
11
- model: string;
12
- source: ModelResolutionProvenance;
13
- variant?: string;
14
- };
15
- export type ExtendedModelResolutionInput = {
16
- uiSelectedModel?: string;
17
- userModel?: string;
18
- categoryDefaultModel?: string;
19
- fallbackChain?: FallbackEntry[];
20
- availableModels: Set<string>;
21
- systemDefaultModel?: string;
22
- };
23
- export declare function resolveModel(input: ModelResolutionInput): string | undefined;
24
- export declare function resolveModelWithFallback(input: ExtendedModelResolutionInput): ModelResolutionResult | undefined;
@@ -1,13 +0,0 @@
1
- export type OpenCodeBinaryType = "opencode" | "opencode-desktop";
2
- export type OpenCodeConfigDirOptions = {
3
- binary: OpenCodeBinaryType;
4
- version?: string | null;
5
- checkExisting?: boolean;
6
- };
7
- export type OpenCodeConfigPaths = {
8
- configDir: string;
9
- configJson: string;
10
- configJsonc: string;
11
- packageJson: string;
12
- matrixxConfig: string;
13
- };
@@ -1,6 +0,0 @@
1
- type SessionModel = {
2
- providerID: string;
3
- modelID: string;
4
- };
5
- export declare function getSessionModel(sessionID: string): SessionModel | undefined;
6
- export {};
@@ -1,3 +0,0 @@
1
- export declare function setSessionTemperature(sessionID: string, temperature: number): void;
2
- export declare function getSessionTemperature(sessionID: string): number | undefined;
3
- export declare function clearSessionTemperature(sessionID: string): void;
@@ -1,3 +0,0 @@
1
- export declare function setSessionTools(sessionID: string, tools: Record<string, boolean>): void;
2
- export declare function getSessionTools(sessionID: string): Record<string, boolean> | undefined;
3
- export declare function clearSessionTools(): void;