opencode-matrixx 2.0.0 → 2.2.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.
- package/README.md +138 -23
- package/dist/agents/architect/agent.d.ts +9 -9
- package/dist/agents/architect/default.d.ts +3 -3
- package/dist/agents/architect/gpt.d.ts +3 -3
- package/dist/agents/architect/index.d.ts +4 -4
- package/dist/agents/architect/prompt-section-builder.d.ts +1 -1
- package/dist/agents/builtin-agents/{atlas-agent.d.ts → architect-agent.d.ts} +1 -1
- package/dist/agents/builtin-agents/general-agents.d.ts +1 -1
- package/dist/agents/builtin-agents/model-resolution.d.ts +1 -1
- package/dist/agents/index.d.ts +2 -2
- package/dist/agents/merovingian.d.ts +3 -2
- package/dist/agents/types.d.ts +2 -2
- package/dist/config/index.d.ts +2 -2
- package/dist/config/schema/agent-names.d.ts +4 -18
- package/dist/config/schema/assembly.d.ts +13 -0
- package/dist/config/schema/categories.d.ts +0 -1
- package/dist/config/schema/commands.d.ts +4 -0
- package/dist/config/schema/hooks.d.ts +1 -2
- package/dist/config/schema/matrixx-config.d.ts +18 -3
- package/dist/config/schema/security.d.ts +0 -5
- package/dist/config/schema.d.ts +1 -0
- package/dist/create-hooks.d.ts +2 -2
- package/dist/features/assembly-state/index.d.ts +1 -0
- package/dist/features/assembly-state/manager.d.ts +6 -0
- package/dist/features/background-agent/error-helpers.d.ts +6 -0
- package/dist/features/background-agent/manager.d.ts +6 -8
- package/dist/features/background-agent/message-dir.d.ts +5 -0
- package/dist/features/background-agent/notification-builder.d.ts +17 -0
- package/dist/features/builtin-commands/templates/assembly.d.ts +1 -0
- package/dist/features/builtin-commands/templates/research.d.ts +1 -0
- package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
- package/dist/features/builtin-commands/templates/ultrawork.d.ts +1 -0
- package/dist/features/builtin-commands/types.d.ts +1 -1
- package/dist/features/builtin-skills/skills/index.d.ts +2 -0
- package/dist/features/builtin-skills/skills/remove-ai-slops.d.ts +2 -0
- package/dist/features/builtin-skills/skills/ulw-research.d.ts +2 -0
- package/dist/features/claude-code-command-loader/loader.d.ts +0 -1
- package/dist/features/hook-message-injector/injector.d.ts +2 -3
- package/dist/features/mission-state/types.d.ts +1 -1
- package/dist/features/tmux-subagent/index.d.ts +0 -2
- package/dist/features/ultrawork-state/index.d.ts +1 -0
- package/dist/features/ultrawork-state/manager.d.ts +6 -0
- package/dist/hooks/architect/{atlas-hook.d.ts → architect-hook.d.ts} +2 -2
- package/dist/hooks/architect/event-handler.d.ts +3 -3
- package/dist/hooks/architect/index.d.ts +2 -2
- package/dist/hooks/architect/types.d.ts +1 -1
- package/dist/hooks/auto-update-checker/cache.d.ts +0 -2
- package/dist/hooks/auto-update-checker/index.d.ts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/interactive-bash-session/parser.d.ts +0 -6
- package/dist/hooks/mouse-notepad/constants.d.ts +1 -1
- package/dist/index.js +1966 -631
- package/dist/plugin/hooks/create-continuation-hooks.d.ts +2 -2
- package/dist/plugin/hooks/create-core-hooks.d.ts +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts +1 -1
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/model-resolution-pipeline.d.ts +1 -24
- package/dist/shared/model-resolution-types.d.ts +1 -0
- package/dist/shared/model-resolver.d.ts +4 -2
- package/dist/shared/opencode-config-dir.d.ts +1 -2
- package/dist/shared/session-directory-resolver.d.ts +0 -6
- package/dist/shared/tool-guards.d.ts +16 -0
- package/dist/tools/assembly/assembly-executor.d.ts +17 -0
- package/dist/tools/assembly/constants.d.ts +6 -0
- package/dist/tools/assembly/index.d.ts +2 -0
- package/dist/tools/assembly/provider-selector.d.ts +3 -0
- package/dist/tools/assembly/synthesizer.d.ts +3 -0
- package/dist/tools/assembly/tool-description.d.ts +2 -0
- package/dist/tools/assembly/tools.d.ts +10 -0
- package/dist/tools/assembly/types.d.ts +25 -0
- package/dist/tools/assembly/voter-spawner.d.ts +3 -0
- package/dist/tools/delegate-task/executor-types.d.ts +1 -1
- package/dist/tools/delegate-task/mouse-agent.d.ts +1 -1
- package/dist/tools/delegate-task/types.d.ts +1 -1
- package/dist/tools/handoff/constants.d.ts +0 -3
- package/dist/tools/index.d.ts +1 -0
- package/package.json +4 -29
- package/bin/matrixx.js +0 -80
- package/bin/platform.js +0 -38
- package/bin/platform.test.ts +0 -148
- package/dist/cli/cli-installer.d.ts +0 -2
- package/dist/cli/cli-program.d.ts +0 -1
- package/dist/cli/config-manager/add-plugin-to-opencode-config.d.ts +0 -2
- package/dist/cli/config-manager/add-provider-config.d.ts +0 -2
- package/dist/cli/config-manager/antigravity-provider-configuration.d.ts +0 -122
- package/dist/cli/config-manager/auth-plugins.d.ts +0 -3
- package/dist/cli/config-manager/bun-install.d.ts +0 -7
- package/dist/cli/config-manager/config-context.d.ts +0 -13
- package/dist/cli/config-manager/deep-merge-record.d.ts +0 -1
- package/dist/cli/config-manager/detect-current-config.d.ts +0 -2
- package/dist/cli/config-manager/ensure-config-directory-exists.d.ts +0 -1
- package/dist/cli/config-manager/format-error-with-suggestion.d.ts +0 -1
- package/dist/cli/config-manager/generate-matrixx-config.d.ts +0 -2
- package/dist/cli/config-manager/jsonc-provider-editor.d.ts +0 -1
- package/dist/cli/config-manager/npm-dist-tags.d.ts +0 -7
- package/dist/cli/config-manager/opencode-binary.d.ts +0 -2
- package/dist/cli/config-manager/opencode-config-format.d.ts +0 -6
- package/dist/cli/config-manager/parse-opencode-config-file.d.ts +0 -10
- package/dist/cli/config-manager/plugin-name-with-version.d.ts +0 -1
- package/dist/cli/config-manager/write-matrixx-config.d.ts +0 -2
- package/dist/cli/config-manager.d.ts +0 -14
- package/dist/cli/doctor/checks/config.d.ts +0 -2
- package/dist/cli/doctor/checks/dependencies.d.ts +0 -4
- package/dist/cli/doctor/checks/index.d.ts +0 -7
- package/dist/cli/doctor/checks/model-resolution-cache.d.ts +0 -2
- package/dist/cli/doctor/checks/model-resolution-config.d.ts +0 -2
- package/dist/cli/doctor/checks/model-resolution-details.d.ts +0 -6
- package/dist/cli/doctor/checks/model-resolution-effective-model.d.ts +0 -3
- package/dist/cli/doctor/checks/model-resolution-types.d.ts +0 -37
- package/dist/cli/doctor/checks/model-resolution-variant.d.ts +0 -5
- package/dist/cli/doctor/checks/model-resolution.d.ts +0 -6
- package/dist/cli/doctor/checks/system-binary.d.ts +0 -8
- package/dist/cli/doctor/checks/system-loaded-version.d.ts +0 -10
- package/dist/cli/doctor/checks/system-plugin.d.ts +0 -15
- package/dist/cli/doctor/checks/system.d.ts +0 -3
- package/dist/cli/doctor/checks/tools-gh.d.ts +0 -11
- package/dist/cli/doctor/checks/tools-lsp.d.ts +0 -6
- package/dist/cli/doctor/checks/tools-mcp.d.ts +0 -3
- package/dist/cli/doctor/checks/tools.d.ts +0 -3
- package/dist/cli/doctor/constants.d.ts +0 -31
- package/dist/cli/doctor/format-default.d.ts +0 -2
- package/dist/cli/doctor/format-shared.d.ts +0 -6
- package/dist/cli/doctor/format-status.d.ts +0 -2
- package/dist/cli/doctor/format-verbose.d.ts +0 -2
- package/dist/cli/doctor/formatter.d.ts +0 -3
- package/dist/cli/doctor/index.d.ts +0 -5
- package/dist/cli/doctor/runner.d.ts +0 -5
- package/dist/cli/doctor/types.d.ts +0 -96
- package/dist/cli/fallback-chain-resolution.d.ts +0 -10
- package/dist/cli/get-local-version/formatter.d.ts +0 -3
- package/dist/cli/get-local-version/get-local-version.d.ts +0 -2
- package/dist/cli/get-local-version/index.d.ts +0 -2
- package/dist/cli/get-local-version/types.d.ts +0 -13
- package/dist/cli/index.d.ts +0 -2
- package/dist/cli/index.js +0 -30690
- package/dist/cli/install-validators.d.ts +0 -31
- package/dist/cli/install.d.ts +0 -2
- package/dist/cli/mcp-oauth/index.d.ts +0 -6
- package/dist/cli/mcp-oauth/login.d.ts +0 -7
- package/dist/cli/mcp-oauth/logout.d.ts +0 -5
- package/dist/cli/mcp-oauth/status.d.ts +0 -1
- package/dist/cli/model-fallback-types.d.ts +0 -25
- package/dist/cli/model-fallback.d.ts +0 -4
- package/dist/cli/provider-availability.d.ts +0 -4
- package/dist/cli/provider-model-id-transform.d.ts +0 -1
- package/dist/cli/run/agent-resolver.d.ts +0 -5
- package/dist/cli/run/completion.d.ts +0 -2
- package/dist/cli/run/event-formatting.d.ts +0 -3
- package/dist/cli/run/event-handlers.d.ts +0 -10
- package/dist/cli/run/event-state.d.ts +0 -13
- package/dist/cli/run/event-stream-processor.d.ts +0 -3
- package/dist/cli/run/events.d.ts +0 -4
- package/dist/cli/run/index.d.ts +0 -9
- package/dist/cli/run/json-output.d.ts +0 -12
- package/dist/cli/run/on-complete-hook.d.ts +0 -7
- package/dist/cli/run/opencode-bin-path.d.ts +0 -3
- package/dist/cli/run/opencode-binary-resolver.d.ts +0 -4
- package/dist/cli/run/poll-for-completion.d.ts +0 -9
- package/dist/cli/run/runner.d.ts +0 -5
- package/dist/cli/run/server-connection.d.ts +0 -6
- package/dist/cli/run/session-resolver.d.ts +0 -6
- package/dist/cli/run/types.d.ts +0 -119
- package/dist/cli/tui-install-prompts.d.ts +0 -2
- package/dist/cli/tui-installer.d.ts +0 -2
- package/dist/cli/types.d.ts +0 -36
- package/dist/features/background-agent/background-task-notification-template.d.ts +0 -11
- package/dist/features/background-agent/opencode-client.d.ts +0 -2
- package/dist/features/background-agent/task-poller.d.ts +0 -21
- package/dist/features/claude-tasks/index.d.ts +0 -3
- package/dist/features/claude-tasks/session-storage.d.ts +0 -10
- package/dist/features/mcp-oauth/index.d.ts +0 -3
- package/dist/features/mcp-oauth/schema.d.ts +0 -5
- package/dist/features/run-continuation-state/constants.d.ts +0 -1
- package/dist/features/run-continuation-state/index.d.ts +0 -3
- package/dist/features/run-continuation-state/storage.d.ts +0 -6
- package/dist/features/run-continuation-state/types.d.ts +0 -13
- package/dist/features/tmux-subagent/cleanup.d.ts +0 -1
- package/dist/features/tmux-subagent/polling.d.ts +0 -1
- package/dist/hooks/session-recovery/recover-empty-content-message-sdk.d.ts +0 -13
- package/dist/hooks/task-reminder/hook.d.ts +0 -19
- package/dist/hooks/task-reminder/index.d.ts +0 -1
- package/dist/tools/delegate-agent/background-agent-executor.d.ts +0 -5
- package/dist/tools/delegate-agent/message-storage-directory.d.ts +0 -1
- package/dist/tools/delegate-agent/subagent-session-creator.d.ts +0 -10
- package/dist/tools/delegate-agent/tool-context-with-metadata.d.ts +0 -10
- package/postinstall.mjs +0 -43
- /package/dist/agents/builtin-agents/{sisyphus-agent.d.ts → morpheus-agent.d.ts} +0 -0
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { BooleanArg, ClaudeSubscription, DetectedConfig, InstallArgs, InstallConfig } from "./types";
|
|
2
|
-
export declare const SYMBOLS: {
|
|
3
|
-
check: string;
|
|
4
|
-
cross: string;
|
|
5
|
-
arrow: string;
|
|
6
|
-
bullet: string;
|
|
7
|
-
info: string;
|
|
8
|
-
warn: string;
|
|
9
|
-
star: string;
|
|
10
|
-
};
|
|
11
|
-
export declare function formatConfigSummary(config: InstallConfig): string;
|
|
12
|
-
export declare function printHeader(isUpdate: boolean): void;
|
|
13
|
-
export declare function printStep(step: number, total: number, message: string): void;
|
|
14
|
-
export declare function printSuccess(message: string): void;
|
|
15
|
-
export declare function printError(message: string): void;
|
|
16
|
-
export declare function printInfo(message: string): void;
|
|
17
|
-
export declare function printWarning(message: string): void;
|
|
18
|
-
export declare function printBox(content: string, title?: string): void;
|
|
19
|
-
export declare function validateNonTuiArgs(args: InstallArgs): {
|
|
20
|
-
valid: boolean;
|
|
21
|
-
errors: string[];
|
|
22
|
-
};
|
|
23
|
-
export declare function argsToConfig(args: InstallArgs): InstallConfig;
|
|
24
|
-
export declare function detectedToInitialValues(detected: DetectedConfig): {
|
|
25
|
-
claude: ClaudeSubscription;
|
|
26
|
-
openai: BooleanArg;
|
|
27
|
-
gemini: BooleanArg;
|
|
28
|
-
copilot: BooleanArg;
|
|
29
|
-
opencodeZen: BooleanArg;
|
|
30
|
-
zaiCodingPlan: BooleanArg;
|
|
31
|
-
};
|
package/dist/cli/install.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function status(serverName: string | undefined): Promise<number>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export interface ProviderAvailability {
|
|
2
|
-
native: {
|
|
3
|
-
claude: boolean;
|
|
4
|
-
openai: boolean;
|
|
5
|
-
gemini: boolean;
|
|
6
|
-
};
|
|
7
|
-
opencodeZen: boolean;
|
|
8
|
-
copilot: boolean;
|
|
9
|
-
zai: boolean;
|
|
10
|
-
isMaxPlan: boolean;
|
|
11
|
-
}
|
|
12
|
-
export interface AgentConfig {
|
|
13
|
-
model: string;
|
|
14
|
-
variant?: string;
|
|
15
|
-
}
|
|
16
|
-
export interface CategoryConfig {
|
|
17
|
-
model: string;
|
|
18
|
-
variant?: string;
|
|
19
|
-
}
|
|
20
|
-
export interface GeneratedMatrixxConfig {
|
|
21
|
-
$schema: string;
|
|
22
|
-
agents?: Record<string, AgentConfig>;
|
|
23
|
-
categories?: Record<string, CategoryConfig>;
|
|
24
|
-
[key: string]: unknown;
|
|
25
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { GeneratedMatrixxConfig } from "./model-fallback-types";
|
|
2
|
-
import type { InstallConfig } from "./types";
|
|
3
|
-
export type { GeneratedMatrixxConfig } from "./model-fallback-types";
|
|
4
|
-
export declare function generateModelConfig(config: InstallConfig): GeneratedMatrixxConfig;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ProviderAvailability } from "./model-fallback-types";
|
|
2
|
-
import type { InstallConfig } from "./types";
|
|
3
|
-
export declare function toProviderAvailability(config: InstallConfig): ProviderAvailability;
|
|
4
|
-
export declare function isProviderAvailable(provider: string, availability: ProviderAvailability): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function transformModelForProvider(provider: string, model: string): string;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { MatrixxConfig } from "../../config";
|
|
2
|
-
import type { RunOptions } from "./types";
|
|
3
|
-
type EnvVars = Record<string, string | undefined>;
|
|
4
|
-
export declare const resolveRunAgent: (options: RunOptions, pluginConfig: MatrixxConfig, env?: EnvVars) => string;
|
|
5
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { EventState } from "./event-state";
|
|
2
|
-
import type { EventPayload, RunContext } from "./types";
|
|
3
|
-
export declare function handleSessionIdle(ctx: RunContext, payload: EventPayload, state: EventState): void;
|
|
4
|
-
export declare function handleSessionStatus(ctx: RunContext, payload: EventPayload, state: EventState): void;
|
|
5
|
-
export declare function handleSessionError(ctx: RunContext, payload: EventPayload, state: EventState): void;
|
|
6
|
-
export declare function handleMessagePartUpdated(ctx: RunContext, payload: EventPayload, state: EventState): void;
|
|
7
|
-
export declare function handleMessageUpdated(ctx: RunContext, payload: EventPayload, state: EventState): void;
|
|
8
|
-
export declare function handleToolExecute(ctx: RunContext, payload: EventPayload, state: EventState): void;
|
|
9
|
-
export declare function handleToolResult(ctx: RunContext, payload: EventPayload, state: EventState): void;
|
|
10
|
-
export declare function handleTuiToast(_ctx: RunContext, payload: EventPayload, state: EventState): void;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface EventState {
|
|
2
|
-
mainSessionIdle: boolean;
|
|
3
|
-
mainSessionError: boolean;
|
|
4
|
-
lastError: string | null;
|
|
5
|
-
lastOutput: string;
|
|
6
|
-
lastPartText: string;
|
|
7
|
-
currentTool: string | null;
|
|
8
|
-
/** Set to true when the main session has produced meaningful work (text, tool call, or tool result) */
|
|
9
|
-
hasReceivedMeaningfulWork: boolean;
|
|
10
|
-
/** Count of assistant messages for the main session */
|
|
11
|
-
messageCount: number;
|
|
12
|
-
}
|
|
13
|
-
export declare function createEventState(): EventState;
|
package/dist/cli/run/events.d.ts
DELETED
package/dist/cli/run/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { resolveRunAgent } from "./agent-resolver";
|
|
2
|
-
export type { EventState } from "./events";
|
|
3
|
-
export { createEventState, processEvents, serializeError } from "./events";
|
|
4
|
-
export { createJsonOutputManager } from "./json-output";
|
|
5
|
-
export { executeOnCompleteHook } from "./on-complete-hook";
|
|
6
|
-
export { run } from "./runner";
|
|
7
|
-
export { createServerConnection } from "./server-connection";
|
|
8
|
-
export { resolveSession } from "./session-resolver";
|
|
9
|
-
export type { RunContext, RunOptions, RunResult, ServerConnection } from "./types";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { RunResult } from "./types";
|
|
2
|
-
interface JsonOutputManager {
|
|
3
|
-
redirectToStderr: () => void;
|
|
4
|
-
restore: () => void;
|
|
5
|
-
emitResult: (result: RunResult) => void;
|
|
6
|
-
}
|
|
7
|
-
interface JsonOutputManagerOptions {
|
|
8
|
-
stdout?: NodeJS.WriteStream;
|
|
9
|
-
stderr?: NodeJS.WriteStream;
|
|
10
|
-
}
|
|
11
|
-
export declare function createJsonOutputManager(options?: JsonOutputManagerOptions): JsonOutputManager;
|
|
12
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare function collectCandidateBinaryPaths(pathEnv: string | undefined, which?: (command: string) => string | null | undefined, platform?: NodeJS.Platform): string[];
|
|
2
|
-
export declare function findWorkingOpencodeBinary(pathEnv?: string | undefined, probe?: (binaryPath: string) => Promise<boolean>, which?: (command: string) => string | null | undefined, platform?: NodeJS.Platform): Promise<string | null>;
|
|
3
|
-
export declare function buildPathWithBinaryFirst(pathEnv: string | undefined, binaryPath: string): string;
|
|
4
|
-
export declare function withWorkingOpencodePath<T>(startServer: () => Promise<T>, finder?: (pathEnv: string | undefined) => Promise<string | null>): Promise<T>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { EventState } from "./events";
|
|
2
|
-
import type { RunContext } from "./types";
|
|
3
|
-
interface PollOptions {
|
|
4
|
-
pollIntervalMs?: number;
|
|
5
|
-
requiredConsecutive?: number;
|
|
6
|
-
minStabilizationMs?: number;
|
|
7
|
-
}
|
|
8
|
-
export declare function pollForCompletion(ctx: RunContext, eventState: EventState, abortController: AbortController, options?: PollOptions): Promise<number>;
|
|
9
|
-
export {};
|
package/dist/cli/run/runner.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { resolveRunAgent } from "./agent-resolver";
|
|
2
|
-
import type { RunOptions } from "./types";
|
|
3
|
-
export { resolveRunAgent };
|
|
4
|
-
export declare function waitForEventProcessorShutdown(eventProcessor: Promise<void>, timeoutMs?: number): Promise<void>;
|
|
5
|
-
export declare function run(options: RunOptions): Promise<number>;
|
package/dist/cli/run/types.d.ts
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import type { OpencodeClient } from "@opencode-ai/sdk";
|
|
2
|
-
export type { OpencodeClient };
|
|
3
|
-
export interface RunOptions {
|
|
4
|
-
message: string;
|
|
5
|
-
agent?: string;
|
|
6
|
-
directory?: string;
|
|
7
|
-
timeout?: number;
|
|
8
|
-
port?: number;
|
|
9
|
-
attach?: string;
|
|
10
|
-
onComplete?: string;
|
|
11
|
-
json?: boolean;
|
|
12
|
-
sessionId?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface ServerConnection {
|
|
15
|
-
client: OpencodeClient;
|
|
16
|
-
cleanup: () => void;
|
|
17
|
-
}
|
|
18
|
-
export interface RunResult {
|
|
19
|
-
sessionId: string;
|
|
20
|
-
success: boolean;
|
|
21
|
-
durationMs: number;
|
|
22
|
-
messageCount: number;
|
|
23
|
-
summary: string;
|
|
24
|
-
}
|
|
25
|
-
export interface RunContext {
|
|
26
|
-
client: OpencodeClient;
|
|
27
|
-
sessionID: string;
|
|
28
|
-
directory: string;
|
|
29
|
-
abortController: AbortController;
|
|
30
|
-
}
|
|
31
|
-
export interface Todo {
|
|
32
|
-
id?: string;
|
|
33
|
-
content: string;
|
|
34
|
-
status: string;
|
|
35
|
-
priority: string;
|
|
36
|
-
}
|
|
37
|
-
export interface SessionStatus {
|
|
38
|
-
type: "idle" | "busy" | "retry";
|
|
39
|
-
}
|
|
40
|
-
export interface ChildSession {
|
|
41
|
-
id: string;
|
|
42
|
-
}
|
|
43
|
-
export interface EventPayload {
|
|
44
|
-
type: string;
|
|
45
|
-
properties?: Record<string, unknown>;
|
|
46
|
-
}
|
|
47
|
-
export interface SessionIdleProps {
|
|
48
|
-
sessionID?: string;
|
|
49
|
-
sessionId?: string;
|
|
50
|
-
}
|
|
51
|
-
export interface SessionStatusProps {
|
|
52
|
-
sessionID?: string;
|
|
53
|
-
sessionId?: string;
|
|
54
|
-
status?: {
|
|
55
|
-
type?: string;
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
export interface MessageUpdatedProps {
|
|
59
|
-
info?: {
|
|
60
|
-
sessionID?: string;
|
|
61
|
-
sessionId?: string;
|
|
62
|
-
role?: string;
|
|
63
|
-
modelID?: string;
|
|
64
|
-
providerID?: string;
|
|
65
|
-
agent?: string;
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
export interface MessagePartUpdatedProps {
|
|
69
|
-
/** @deprecated Legacy structure — current OpenCode puts sessionID inside part */
|
|
70
|
-
info?: {
|
|
71
|
-
sessionID?: string;
|
|
72
|
-
sessionId?: string;
|
|
73
|
-
role?: string;
|
|
74
|
-
};
|
|
75
|
-
part?: {
|
|
76
|
-
id?: string;
|
|
77
|
-
sessionID?: string;
|
|
78
|
-
sessionId?: string;
|
|
79
|
-
messageID?: string;
|
|
80
|
-
type?: string;
|
|
81
|
-
text?: string;
|
|
82
|
-
/** Tool name (for part.type === "tool") */
|
|
83
|
-
tool?: string;
|
|
84
|
-
/** Tool state (for part.type === "tool") */
|
|
85
|
-
state?: {
|
|
86
|
-
status?: string;
|
|
87
|
-
input?: Record<string, unknown>;
|
|
88
|
-
output?: string;
|
|
89
|
-
};
|
|
90
|
-
name?: string;
|
|
91
|
-
input?: unknown;
|
|
92
|
-
time?: {
|
|
93
|
-
start?: number;
|
|
94
|
-
end?: number;
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
export interface ToolExecuteProps {
|
|
99
|
-
sessionID?: string;
|
|
100
|
-
sessionId?: string;
|
|
101
|
-
name?: string;
|
|
102
|
-
input?: Record<string, unknown>;
|
|
103
|
-
}
|
|
104
|
-
export interface ToolResultProps {
|
|
105
|
-
sessionID?: string;
|
|
106
|
-
sessionId?: string;
|
|
107
|
-
name?: string;
|
|
108
|
-
output?: string;
|
|
109
|
-
}
|
|
110
|
-
export interface SessionErrorProps {
|
|
111
|
-
sessionID?: string;
|
|
112
|
-
sessionId?: string;
|
|
113
|
-
error?: unknown;
|
|
114
|
-
}
|
|
115
|
-
export interface TuiToastShowProps {
|
|
116
|
-
title?: string;
|
|
117
|
-
message?: string;
|
|
118
|
-
variant?: "info" | "success" | "warning" | "error";
|
|
119
|
-
}
|
package/dist/cli/types.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export type ClaudeSubscription = "no" | "yes" | "max20";
|
|
2
|
-
export type BooleanArg = "no" | "yes";
|
|
3
|
-
export interface InstallArgs {
|
|
4
|
-
tui: boolean;
|
|
5
|
-
claude?: ClaudeSubscription;
|
|
6
|
-
openai?: BooleanArg;
|
|
7
|
-
gemini?: BooleanArg;
|
|
8
|
-
copilot?: BooleanArg;
|
|
9
|
-
opencodeZen?: BooleanArg;
|
|
10
|
-
zaiCodingPlan?: BooleanArg;
|
|
11
|
-
skipAuth?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export interface InstallConfig {
|
|
14
|
-
hasClaude: boolean;
|
|
15
|
-
isMax20: boolean;
|
|
16
|
-
hasOpenAI: boolean;
|
|
17
|
-
hasGemini: boolean;
|
|
18
|
-
hasCopilot: boolean;
|
|
19
|
-
hasOpencodeZen: boolean;
|
|
20
|
-
hasZaiCodingPlan: boolean;
|
|
21
|
-
}
|
|
22
|
-
export interface ConfigMergeResult {
|
|
23
|
-
success: boolean;
|
|
24
|
-
configPath: string;
|
|
25
|
-
error?: string;
|
|
26
|
-
}
|
|
27
|
-
export interface DetectedConfig {
|
|
28
|
-
isInstalled: boolean;
|
|
29
|
-
hasClaude: boolean;
|
|
30
|
-
isMax20: boolean;
|
|
31
|
-
hasOpenAI: boolean;
|
|
32
|
-
hasGemini: boolean;
|
|
33
|
-
hasCopilot: boolean;
|
|
34
|
-
hasOpencodeZen: boolean;
|
|
35
|
-
hasZaiCodingPlan: boolean;
|
|
36
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { BackgroundTask } from "./types";
|
|
2
|
-
type BackgroundTaskNotificationStatus = "COMPLETED" | "CANCELLED" | "INTERRUPTED";
|
|
3
|
-
export declare function buildBackgroundTaskNotificationText(input: {
|
|
4
|
-
task: BackgroundTask;
|
|
5
|
-
duration: string;
|
|
6
|
-
statusText: BackgroundTaskNotificationStatus;
|
|
7
|
-
allComplete: boolean;
|
|
8
|
-
remainingCount: number;
|
|
9
|
-
completedTasks: BackgroundTask[];
|
|
10
|
-
}): string;
|
|
11
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { BackgroundTaskConfig } from "../../config/schema";
|
|
2
|
-
import type { ConcurrencyManager } from "./concurrency";
|
|
3
|
-
import type { OpencodeClient } from "./opencode-client";
|
|
4
|
-
import type { BackgroundTask } from "./types";
|
|
5
|
-
export declare function pruneStaleTasksAndNotifications(args: {
|
|
6
|
-
tasks: Map<string, BackgroundTask>;
|
|
7
|
-
notifications: Map<string, BackgroundTask[]>;
|
|
8
|
-
onTaskPruned: (taskId: string, task: BackgroundTask, errorMessage: string) => void;
|
|
9
|
-
}): void;
|
|
10
|
-
type SessionStatusMap = Record<string, {
|
|
11
|
-
type: string;
|
|
12
|
-
}>;
|
|
13
|
-
export declare function checkAndInterruptStaleTasks(args: {
|
|
14
|
-
tasks: Iterable<BackgroundTask>;
|
|
15
|
-
client: OpencodeClient;
|
|
16
|
-
config: BackgroundTaskConfig | undefined;
|
|
17
|
-
concurrencyManager: ConcurrencyManager;
|
|
18
|
-
notifyParentSession: (task: BackgroundTask) => Promise<void>;
|
|
19
|
-
sessionStatuses?: SessionStatusMap;
|
|
20
|
-
}): Promise<void>;
|
|
21
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { MatrixxConfig } from "../../config/schema";
|
|
2
|
-
export declare function getSessionTaskDir(config: Partial<MatrixxConfig>, sessionID: string): string;
|
|
3
|
-
export declare function listSessionTaskFiles(config: Partial<MatrixxConfig>, sessionID: string): string[];
|
|
4
|
-
export declare function listAllSessionDirs(config: Partial<MatrixxConfig>): string[];
|
|
5
|
-
interface TaskLocation {
|
|
6
|
-
path: string;
|
|
7
|
-
sessionID: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function findTaskAcrossSessions(config: Partial<MatrixxConfig>, taskId: string): TaskLocation | null;
|
|
10
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const CONTINUATION_MARKER_DIR = ".matrixx/run-continuation";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ContinuationMarker, ContinuationMarkerSource, ContinuationMarkerState } from "./types";
|
|
2
|
-
export declare function readContinuationMarker(directory: string, sessionID: string): ContinuationMarker | null;
|
|
3
|
-
export declare function setContinuationMarkerSource(directory: string, sessionID: string, source: ContinuationMarkerSource, state: ContinuationMarkerState, reason?: string): ContinuationMarker;
|
|
4
|
-
export declare function clearContinuationMarker(directory: string, sessionID: string): void;
|
|
5
|
-
export declare function isContinuationMarkerActive(marker: ContinuationMarker): boolean;
|
|
6
|
-
export declare function getActiveContinuationMarkerReason(marker: ContinuationMarker): string | null;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type ContinuationMarkerSource = "todo" | "stop";
|
|
2
|
-
export type ContinuationMarkerState = "idle" | "active" | "stopped";
|
|
3
|
-
interface ContinuationMarkerSourceEntry {
|
|
4
|
-
state: ContinuationMarkerState;
|
|
5
|
-
reason?: string;
|
|
6
|
-
updatedAt: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ContinuationMarker {
|
|
9
|
-
sessionID: string;
|
|
10
|
-
updatedAt: string;
|
|
11
|
-
sources: Partial<Record<ContinuationMarkerSource, ContinuationMarkerSourceEntry>>;
|
|
12
|
-
}
|
|
13
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { createOpencodeClient } from "@opencode-ai/sdk";
|
|
2
|
-
import type { MessageData } from "./types";
|
|
3
|
-
type Client = ReturnType<typeof createOpencodeClient>;
|
|
4
|
-
type ReplaceEmptyTextPartsAsync = (client: Client, sessionID: string, messageID: string, replacementText: string) => Promise<boolean>;
|
|
5
|
-
type InjectTextPartAsync = (client: Client, sessionID: string, messageID: string, text: string) => Promise<boolean>;
|
|
6
|
-
type FindMessagesWithEmptyTextPartsFromSDK = (client: Client, sessionID: string) => Promise<string[]>;
|
|
7
|
-
export declare function recoverEmptyContentMessageFromSDK(client: Client, sessionID: string, failedAssistantMsg: MessageData, error: unknown, dependencies: {
|
|
8
|
-
placeholderText: string;
|
|
9
|
-
replaceEmptyTextPartsAsync: ReplaceEmptyTextPartsAsync;
|
|
10
|
-
injectTextPartAsync: InjectTextPartAsync;
|
|
11
|
-
findMessagesWithEmptyTextPartsFromSDK: FindMessagesWithEmptyTextPartsFromSDK;
|
|
12
|
-
}): Promise<boolean>;
|
|
13
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
-
interface ToolExecuteInput {
|
|
3
|
-
tool: string;
|
|
4
|
-
sessionID: string;
|
|
5
|
-
callID: string;
|
|
6
|
-
}
|
|
7
|
-
interface ToolExecuteOutput {
|
|
8
|
-
output: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function createTaskReminderHook(_ctx: PluginInput): {
|
|
11
|
-
"tool.execute.after": (input: ToolExecuteInput, output: ToolExecuteOutput) => Promise<void>;
|
|
12
|
-
event: ({ event }: {
|
|
13
|
-
event: {
|
|
14
|
-
type: string;
|
|
15
|
-
properties?: unknown;
|
|
16
|
-
};
|
|
17
|
-
}) => Promise<void>;
|
|
18
|
-
};
|
|
19
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { createTaskReminderHook } from "./hook";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
-
import type { BackgroundManager } from "../../features/background-agent";
|
|
3
|
-
import type { ToolContextWithMetadata } from "./tool-context-with-metadata";
|
|
4
|
-
import type { DelegateAgentArgs } from "./types";
|
|
5
|
-
export declare function executeBackgroundAgent(args: DelegateAgentArgs, toolContext: ToolContextWithMetadata, manager: BackgroundManager, client: PluginInput["client"]): Promise<string>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { getMessageDir } from "../../shared";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
-
import type { ToolContextWithMetadata } from "./tool-context-with-metadata";
|
|
3
|
-
import type { DelegateAgentArgs } from "./types";
|
|
4
|
-
export declare function resolveOrCreateSessionId(ctx: PluginInput, args: DelegateAgentArgs, toolContext: ToolContextWithMetadata): Promise<{
|
|
5
|
-
ok: true;
|
|
6
|
-
sessionID: string;
|
|
7
|
-
} | {
|
|
8
|
-
ok: false;
|
|
9
|
-
error: string;
|
|
10
|
-
}>;
|
package/postinstall.mjs
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// postinstall.mjs
|
|
2
|
-
// Runs after npm install to verify platform binary is available
|
|
3
|
-
|
|
4
|
-
import { createRequire } from "node:module";
|
|
5
|
-
import { getPlatformPackage, getBinaryPath } from "./bin/platform.js";
|
|
6
|
-
|
|
7
|
-
const require = createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Detect libc family on Linux
|
|
11
|
-
*/
|
|
12
|
-
function getLibcFamily() {
|
|
13
|
-
if (process.platform !== "linux") {
|
|
14
|
-
return undefined;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
try {
|
|
18
|
-
const detectLibc = require("detect-libc");
|
|
19
|
-
return detectLibc.familySync();
|
|
20
|
-
} catch {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function main() {
|
|
26
|
-
const { platform, arch } = process;
|
|
27
|
-
const libcFamily = getLibcFamily();
|
|
28
|
-
|
|
29
|
-
try {
|
|
30
|
-
const pkg = getPlatformPackage({ platform, arch, libcFamily });
|
|
31
|
-
const binPath = getBinaryPath(pkg, platform);
|
|
32
|
-
|
|
33
|
-
// Try to resolve the binary
|
|
34
|
-
require.resolve(binPath);
|
|
35
|
-
console.log(`✓ matrixx binary installed for ${platform}-${arch}`);
|
|
36
|
-
} catch (error) {
|
|
37
|
-
console.warn(`⚠ matrixx: ${error.message}`);
|
|
38
|
-
console.warn(` The CLI may not work on this platform.`);
|
|
39
|
-
// Don't fail installation - let user try anyway
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
main();
|
|
File without changes
|