opencode-matrixx 2.6.6 → 2.6.8
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/agents/seraph.d.ts +1 -1
- package/dist/cli.js +51 -4
- package/dist/config/schema/background-task.d.ts +37 -0
- package/dist/config/schema/dcp.d.ts +46 -0
- package/dist/config/schema/matrixx-config.d.ts +32 -0
- package/dist/features/background-agent/admission.d.ts +24 -0
- package/dist/features/background-agent/concurrency.d.ts +9 -0
- package/dist/features/background-agent/constants.d.ts +13 -0
- package/dist/features/background-agent/handle-index.d.ts +12 -0
- package/dist/features/background-agent/manager.d.ts +59 -4
- package/dist/features/background-agent/notification-builder.d.ts +1 -0
- package/dist/features/background-agent/reconcile.d.ts +33 -0
- package/dist/features/background-agent/revive.d.ts +39 -0
- package/dist/features/background-agent/session-output.d.ts +40 -0
- package/dist/features/background-agent/task-history.d.ts +20 -0
- package/dist/features/background-agent/types.d.ts +21 -1
- package/dist/features/background-agent/wake-scheduler.d.ts +47 -0
- package/dist/features/background-agent/wallclock.d.ts +37 -0
- package/dist/features/bdd/schema.d.ts +5 -5
- package/dist/features/builtin-commands/templates/refactor.d.ts +1 -1
- package/dist/features/context-injector/collector.d.ts +2 -0
- package/dist/features/context-injector/index.d.ts +1 -1
- package/dist/hooks/agent-usage-reminder/constants.d.ts +1 -0
- package/dist/hooks/compaction-context-injector/hook.d.ts +1 -0
- package/dist/hooks/context-mode-enforcer/constants.d.ts +1 -1
- package/dist/hooks/task-continuation-enforcer/constants.d.ts +4 -0
- package/dist/index.js +2172 -1276
- package/dist/matrixx.schema.json +165 -3
- package/dist/plugin-handlers/agent-config-handler.d.ts +2 -1
- package/dist/shared/context-mode-enforcement.d.ts +35 -0
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/poll-timeout-outcome.d.ts +21 -0
- package/dist/shared/revive-outcome.d.ts +15 -0
- package/dist/shared/saturated-outcome.d.ts +18 -0
- package/dist/shared/wallclock-outcome.d.ts +18 -0
- package/dist/tools/background-task/constants.d.ts +1 -0
- package/dist/tools/background-task/create-background-revive.d.ts +3 -0
- package/dist/tools/background-task/index.d.ts +1 -1
- package/dist/tools/background-task/tools.d.ts +1 -0
- package/dist/tools/background-task/types.d.ts +9 -0
- package/dist/tools/dcp-switch-profile/tools.d.ts +7 -0
- package/dist/tools/delegate-task/constants.d.ts +1 -0
- package/dist/tools/index.d.ts +1 -2
- package/package.json +1 -1
- package/dist/shared/context-mode-prompt.d.ts +0 -12
- package/dist/tools/delegate-agent/background-executor.d.ts +0 -13
- package/dist/tools/delegate-agent/completion-poller.d.ts +0 -11
- package/dist/tools/delegate-agent/constants.d.ts +0 -2
- package/dist/tools/delegate-agent/index.d.ts +0 -3
- package/dist/tools/delegate-agent/message-dir.d.ts +0 -1
- package/dist/tools/delegate-agent/message-processor.d.ts +0 -2
- package/dist/tools/delegate-agent/session-creator.d.ts +0 -15
- package/dist/tools/delegate-agent/sync-executor.d.ts +0 -21
- package/dist/tools/delegate-agent/tools.d.ts +0 -3
- package/dist/tools/delegate-agent/types.d.ts +0 -19
- /package/dist/{shared/context-mode-prompt.test.d.ts → tools/delegate-task/poll-timeout-outcome.test.d.ts} +0 -0
package/dist/matrixx.schema.json
CHANGED
|
@@ -4063,6 +4063,27 @@
|
|
|
4063
4063
|
"turns": 4
|
|
4064
4064
|
}
|
|
4065
4065
|
}
|
|
4066
|
+
},
|
|
4067
|
+
"brutal": {
|
|
4068
|
+
"pruneNotification": "off",
|
|
4069
|
+
"compress": {
|
|
4070
|
+
"maxContextLimit": "20%",
|
|
4071
|
+
"minContextLimit": "10%",
|
|
4072
|
+
"nudgeFrequency": 1,
|
|
4073
|
+
"nudgeForce": "strong",
|
|
4074
|
+
"iterationNudgeThreshold": 1
|
|
4075
|
+
},
|
|
4076
|
+
"turnProtection": {
|
|
4077
|
+
"enabled": false
|
|
4078
|
+
},
|
|
4079
|
+
"experimental": {
|
|
4080
|
+
"allowSubAgents": false
|
|
4081
|
+
},
|
|
4082
|
+
"strategies": {
|
|
4083
|
+
"purgeErrors": {
|
|
4084
|
+
"turns": 1
|
|
4085
|
+
}
|
|
4086
|
+
}
|
|
4066
4087
|
}
|
|
4067
4088
|
},
|
|
4068
4089
|
"type": "object",
|
|
@@ -4184,6 +4205,46 @@
|
|
|
4184
4205
|
"default_profile": {
|
|
4185
4206
|
"type": "string"
|
|
4186
4207
|
},
|
|
4208
|
+
"handoffCompression": {
|
|
4209
|
+
"default": {
|
|
4210
|
+
"enabled": true,
|
|
4211
|
+
"maxMessages": 6,
|
|
4212
|
+
"keepFirst": 2,
|
|
4213
|
+
"keepLast": 3
|
|
4214
|
+
},
|
|
4215
|
+
"type": "object",
|
|
4216
|
+
"properties": {
|
|
4217
|
+
"enabled": {
|
|
4218
|
+
"default": true,
|
|
4219
|
+
"type": "boolean"
|
|
4220
|
+
},
|
|
4221
|
+
"maxMessages": {
|
|
4222
|
+
"default": 6,
|
|
4223
|
+
"type": "integer",
|
|
4224
|
+
"minimum": 1,
|
|
4225
|
+
"maximum": 9007199254740991
|
|
4226
|
+
},
|
|
4227
|
+
"keepFirst": {
|
|
4228
|
+
"default": 2,
|
|
4229
|
+
"type": "integer",
|
|
4230
|
+
"minimum": 0,
|
|
4231
|
+
"maximum": 9007199254740991
|
|
4232
|
+
},
|
|
4233
|
+
"keepLast": {
|
|
4234
|
+
"default": 3,
|
|
4235
|
+
"type": "integer",
|
|
4236
|
+
"minimum": 0,
|
|
4237
|
+
"maximum": 9007199254740991
|
|
4238
|
+
}
|
|
4239
|
+
},
|
|
4240
|
+
"required": [
|
|
4241
|
+
"enabled",
|
|
4242
|
+
"maxMessages",
|
|
4243
|
+
"keepFirst",
|
|
4244
|
+
"keepLast"
|
|
4245
|
+
],
|
|
4246
|
+
"additionalProperties": false
|
|
4247
|
+
},
|
|
4187
4248
|
"base": {
|
|
4188
4249
|
"default": {
|
|
4189
4250
|
"autoUpdate": false,
|
|
@@ -4217,7 +4278,10 @@
|
|
|
4217
4278
|
"enabled": false,
|
|
4218
4279
|
"automaticStrategies": true
|
|
4219
4280
|
},
|
|
4220
|
-
"protectedFilePatterns": []
|
|
4281
|
+
"protectedFilePatterns": [],
|
|
4282
|
+
"experimental": {
|
|
4283
|
+
"allowSubAgents": true
|
|
4284
|
+
}
|
|
4221
4285
|
},
|
|
4222
4286
|
"type": "object",
|
|
4223
4287
|
"properties": {
|
|
@@ -4436,6 +4500,18 @@
|
|
|
4436
4500
|
"items": {
|
|
4437
4501
|
"type": "string"
|
|
4438
4502
|
}
|
|
4503
|
+
},
|
|
4504
|
+
"experimental": {
|
|
4505
|
+
"default": {
|
|
4506
|
+
"allowSubAgents": true
|
|
4507
|
+
},
|
|
4508
|
+
"type": "object",
|
|
4509
|
+
"properties": {
|
|
4510
|
+
"allowSubAgents": {
|
|
4511
|
+
"type": "boolean"
|
|
4512
|
+
}
|
|
4513
|
+
},
|
|
4514
|
+
"additionalProperties": false
|
|
4439
4515
|
}
|
|
4440
4516
|
},
|
|
4441
4517
|
"required": [
|
|
@@ -4446,7 +4522,8 @@
|
|
|
4446
4522
|
"strategies",
|
|
4447
4523
|
"commands",
|
|
4448
4524
|
"manualMode",
|
|
4449
|
-
"protectedFilePatterns"
|
|
4525
|
+
"protectedFilePatterns",
|
|
4526
|
+
"experimental"
|
|
4450
4527
|
],
|
|
4451
4528
|
"additionalProperties": false
|
|
4452
4529
|
}
|
|
@@ -4454,6 +4531,7 @@
|
|
|
4454
4531
|
"required": [
|
|
4455
4532
|
"enabled",
|
|
4456
4533
|
"profiles",
|
|
4534
|
+
"handoffCompression",
|
|
4457
4535
|
"base"
|
|
4458
4536
|
],
|
|
4459
4537
|
"additionalProperties": false
|
|
@@ -4678,6 +4756,91 @@
|
|
|
4678
4756
|
}
|
|
4679
4757
|
},
|
|
4680
4758
|
"additionalProperties": false
|
|
4759
|
+
},
|
|
4760
|
+
"admissionTimeoutMs": {
|
|
4761
|
+
"anyOf": [
|
|
4762
|
+
{
|
|
4763
|
+
"type": "number",
|
|
4764
|
+
"const": 0
|
|
4765
|
+
},
|
|
4766
|
+
{
|
|
4767
|
+
"type": "number",
|
|
4768
|
+
"minimum": 60000
|
|
4769
|
+
}
|
|
4770
|
+
]
|
|
4771
|
+
},
|
|
4772
|
+
"nestedAdmission": {
|
|
4773
|
+
"type": "object",
|
|
4774
|
+
"properties": {
|
|
4775
|
+
"enabled": {
|
|
4776
|
+
"type": "boolean"
|
|
4777
|
+
},
|
|
4778
|
+
"mode": {
|
|
4779
|
+
"type": "string",
|
|
4780
|
+
"enum": [
|
|
4781
|
+
"bypass",
|
|
4782
|
+
"reserve"
|
|
4783
|
+
]
|
|
4784
|
+
},
|
|
4785
|
+
"maxDepth": {
|
|
4786
|
+
"type": "integer",
|
|
4787
|
+
"minimum": 1,
|
|
4788
|
+
"maximum": 5
|
|
4789
|
+
}
|
|
4790
|
+
},
|
|
4791
|
+
"additionalProperties": false
|
|
4792
|
+
},
|
|
4793
|
+
"wakeScheduler": {
|
|
4794
|
+
"type": "object",
|
|
4795
|
+
"properties": {
|
|
4796
|
+
"enabled": {
|
|
4797
|
+
"type": "boolean"
|
|
4798
|
+
},
|
|
4799
|
+
"intervalMs": {
|
|
4800
|
+
"type": "number",
|
|
4801
|
+
"minimum": 60000
|
|
4802
|
+
}
|
|
4803
|
+
},
|
|
4804
|
+
"additionalProperties": false
|
|
4805
|
+
},
|
|
4806
|
+
"jobBoard": {
|
|
4807
|
+
"type": "object",
|
|
4808
|
+
"properties": {
|
|
4809
|
+
"enabled": {
|
|
4810
|
+
"type": "boolean"
|
|
4811
|
+
},
|
|
4812
|
+
"strategy": {
|
|
4813
|
+
"type": "string",
|
|
4814
|
+
"enum": [
|
|
4815
|
+
"latest",
|
|
4816
|
+
"checkpoint-compatible"
|
|
4817
|
+
]
|
|
4818
|
+
},
|
|
4819
|
+
"maxRetainedSnapshots": {
|
|
4820
|
+
"type": "integer",
|
|
4821
|
+
"minimum": 1,
|
|
4822
|
+
"maximum": 100
|
|
4823
|
+
}
|
|
4824
|
+
},
|
|
4825
|
+
"additionalProperties": false
|
|
4826
|
+
},
|
|
4827
|
+
"wallClockTimeoutMs": {
|
|
4828
|
+
"anyOf": [
|
|
4829
|
+
{
|
|
4830
|
+
"type": "number",
|
|
4831
|
+
"const": 0
|
|
4832
|
+
},
|
|
4833
|
+
{
|
|
4834
|
+
"type": "integer",
|
|
4835
|
+
"minimum": 60000,
|
|
4836
|
+
"maximum": 2147483647
|
|
4837
|
+
}
|
|
4838
|
+
]
|
|
4839
|
+
},
|
|
4840
|
+
"wallClockAbortGraceMs": {
|
|
4841
|
+
"type": "integer",
|
|
4842
|
+
"minimum": 1000,
|
|
4843
|
+
"maximum": 60000
|
|
4681
4844
|
}
|
|
4682
4845
|
},
|
|
4683
4846
|
"additionalProperties": false
|
|
@@ -5206,7 +5369,6 @@
|
|
|
5206
5369
|
},
|
|
5207
5370
|
"blocked_tools": {
|
|
5208
5371
|
"default": [
|
|
5209
|
-
"read",
|
|
5210
5372
|
"grep",
|
|
5211
5373
|
"glob"
|
|
5212
5374
|
],
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { MatrixxConfig } from "../config";
|
|
2
|
+
import { type ContextModeConfigInput } from "../shared/context-mode-enforcement";
|
|
2
3
|
import type { PluginComponents } from "./plugin-components-loader";
|
|
3
4
|
export declare function setAvailableToolNames(names: string[]): void;
|
|
4
5
|
export declare function getAvailableToolNames(): string[];
|
|
5
|
-
export declare function injectContextDiscipline(availableToolNames: string[], agents: Record<string, Record<string, unknown
|
|
6
|
+
export declare function injectContextDiscipline(availableToolNames: string[], agents: Record<string, Record<string, unknown>>, contextMode?: ContextModeConfigInput): void;
|
|
6
7
|
export declare function applyAgentConfig(params: {
|
|
7
8
|
config: Record<string, unknown>;
|
|
8
9
|
pluginConfig: MatrixxConfig;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Canonical default — hook, constants, and schema must all agree on this. */
|
|
2
|
+
export declare const CONTEXT_MODE_DEFAULT_BLOCKED_TOOLS: readonly ["grep", "glob"];
|
|
3
|
+
export interface ContextModeEnforcement {
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
enforce: boolean;
|
|
6
|
+
blockedTools: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface ContextModeConfigInput {
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
enforce?: boolean;
|
|
11
|
+
blocked_tools?: string[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Single source of truth for context-mode enforcement state.
|
|
15
|
+
* Both the context-mode-enforcer hook (block decision) and the agent prompt
|
|
16
|
+
* builders (guidance text) derive from this — prompt and hook can never
|
|
17
|
+
* disagree because they read the same resolved flags.
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveContextModeEnforcement(contextMode: ContextModeConfigInput | undefined): ContextModeEnforcement;
|
|
20
|
+
/** Exact tool-name match for the raw search tools (mirrors the hook's check). */
|
|
21
|
+
export declare function hasGrepGlobToolNames(toolNames: readonly string[]): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Whether agent prompts may advertise a grep/glob fallback.
|
|
24
|
+
* Usable = registered AND not blocked. Under enforce:true the hook throws on
|
|
25
|
+
* grep/glob, so the prompt must never offer them — it must name the working
|
|
26
|
+
* substitute (ctx_batch_execute / ctx_execute running `rg`) instead.
|
|
27
|
+
*/
|
|
28
|
+
export declare function resolveGrepGlobUsable(toolNames: readonly string[], contextMode?: ContextModeConfigInput): boolean;
|
|
29
|
+
export declare function _setDisciplinePathForTesting(p: string | null | undefined): void;
|
|
30
|
+
export declare function setContextModeForPrompts(contextMode: ContextModeConfigInput | undefined): void;
|
|
31
|
+
export declare function getContextModeForPrompts(): ContextModeConfigInput | undefined;
|
|
32
|
+
export declare function _resetContextModeEnforcementForTesting(): void;
|
|
33
|
+
export declare function willBlockGrepGlob(contextMode: ContextModeConfigInput | undefined): boolean;
|
|
34
|
+
export declare function resolveContextModeDisciplinePath(): string | null;
|
|
35
|
+
export declare function hasWorkingSubstitute(): boolean;
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export * from "./binary-downloader";
|
|
|
4
4
|
export * from "./command-executor";
|
|
5
5
|
export * from "./config-errors";
|
|
6
6
|
export * from "./connected-providers-cache";
|
|
7
|
-
export * from "./context-mode-
|
|
7
|
+
export * from "./context-mode-enforcement";
|
|
8
8
|
export * from "./data-path";
|
|
9
9
|
export * from "./deep-merge";
|
|
10
10
|
export * from "./delay";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Poll-timeout outcome helper shared by the sync session poller.
|
|
3
|
+
*
|
|
4
|
+
* When `pollSyncSession` exhausts `maxPollTimeMs` without observing
|
|
5
|
+
* completion, the session is still running server-side. This helper turns
|
|
6
|
+
* that state into a machine-readable, non-throwing outcome string.
|
|
7
|
+
*
|
|
8
|
+
* Mirrors the shape of `src/shared/saturated-outcome.ts`
|
|
9
|
+
* (`formatSaturatedOutcome`): human-readable block plus a trailing
|
|
10
|
+
* `<task_metadata>{JSON}</task_metadata>` line for programmatic parsing.
|
|
11
|
+
*/
|
|
12
|
+
export declare const POLL_TIMEOUT_PREFIX = "Poll timeout reached";
|
|
13
|
+
export declare const LAST_ASSISTANT_TEXT_CAP = 2000;
|
|
14
|
+
export interface PollTimeoutOutcomeArgs {
|
|
15
|
+
sessionID: string;
|
|
16
|
+
agentToUse: string;
|
|
17
|
+
maxPollTimeMs: number;
|
|
18
|
+
lastAssistantText?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function formatPollTimeoutOutcome(args: PollTimeoutOutcomeArgs): string;
|
|
21
|
+
export declare function isPollTimeoutOutcome(text: string): boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Revive-outcome helpers shared by the background task revive tools.
|
|
3
|
+
*
|
|
4
|
+
* A revive either produces a fresh session for a terminal task or is refused
|
|
5
|
+
* with a machine-readable reason. These helpers turn either case into a
|
|
6
|
+
* human-readable, non-throwing outcome for the revive tools.
|
|
7
|
+
*
|
|
8
|
+
* The status and reason are typed as `string` on purpose: this module lives
|
|
9
|
+
* in `src/shared` and must not depend on `BackgroundTaskStatus`
|
|
10
|
+
* or `ReviveBlockReason` from the background-agent feature.
|
|
11
|
+
*/
|
|
12
|
+
export declare const UNREVIVABLE_REASONS: readonly ["active", "uncertain", "no-session", "unknown-task", "expired"];
|
|
13
|
+
export declare function isUnrevivableReason(reason: string): boolean;
|
|
14
|
+
export declare function formatReviveOutcome(taskId: string, sessionID: string, status: string): string;
|
|
15
|
+
export declare function formatUnrevivable(taskId: string, reason: string, detail?: string): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Launch-outcome helpers shared by the background task launch tools.
|
|
3
|
+
*
|
|
4
|
+
* A launch can terminate without ever producing a session. T7 made a saturated
|
|
5
|
+
* queue admission produce a terminal `stopped` task with
|
|
6
|
+
* `terminalReason: "queue-saturated"` (nested depth-exceeded produces
|
|
7
|
+
* `terminalReason: "nested-depth-exceeded"`). These helpers turn that terminal
|
|
8
|
+
* state into a machine-readable, non-throwing outcome for the launch tools.
|
|
9
|
+
*
|
|
10
|
+
* The status is typed as `string` on purpose: this module must not import from
|
|
11
|
+
* `src/features/**`, so it cannot depend on `BackgroundTaskStatus`.
|
|
12
|
+
*/
|
|
13
|
+
export declare const LAUNCH_TERMINAL_STATUSES: readonly ["error", "cancelled", "interrupt", "stopped", "statusUncertain"];
|
|
14
|
+
export type LaunchTerminalStatus = (typeof LAUNCH_TERMINAL_STATUSES)[number];
|
|
15
|
+
export declare function isLaunchTerminalStatus(status: string): status is LaunchTerminalStatus;
|
|
16
|
+
export declare function isQueueSaturated(status: string, terminalReason: string | undefined): boolean;
|
|
17
|
+
export declare function formatSaturatedOutcome(taskId: string): string;
|
|
18
|
+
export declare function formatLaunchFailure(taskId: string, status: string): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wall-clock outcome helpers shared by the background agent wall-clock supervisor.
|
|
3
|
+
*
|
|
4
|
+
* A wall-clock timeout terminates a running task that exceeds its elapsed-time bound
|
|
5
|
+
* measured from `startedAt`. This module formats the human-readable + machine-readable
|
|
6
|
+
* outcome payload (mirroring saturated-outcome.ts / revive-outcome.ts).
|
|
7
|
+
*
|
|
8
|
+
* The status and reason are typed as `string` on purpose: this module lives in
|
|
9
|
+
* `src/shared` and must not depend on `BackgroundTaskStatus` or any type from
|
|
10
|
+
* `src/features/**`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function formatWallclockTimeout(taskId: string, elapsedMs: number, limitMs: number): string;
|
|
13
|
+
/**
|
|
14
|
+
* Checks whether the given status and terminal reason pair indicates a
|
|
15
|
+
* wall-clock timeout. Uses raw strings so this module never imports
|
|
16
|
+
* from src/features/**.
|
|
17
|
+
*/
|
|
18
|
+
export declare function isWallclockTimeout(status: string, terminalReason: string | undefined): boolean;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export declare const BACKGROUND_OUTPUT_DESCRIPTION = "Get output from background task. Use full_session=true to fetch session messages with filters. System notifies on completion, so block=true rarely needed.";
|
|
2
2
|
export declare const BACKGROUND_CANCEL_DESCRIPTION = "Cancel running background task(s). Use all=true to cancel ALL before final answer.";
|
|
3
|
+
export declare const BACKGROUND_REVIVE_DESCRIPTION = "Revive a retained terminal background task with a NEW instruction.\n\nCall with no arguments (or list=true) to DISCOVER revivable tasks.\n\nRevivable: cancelled, stopped, interrupt, error, completed \u2014 provided the task still has a session ID.\nNot revivable: pending/running (still active \u2014 use background_output), statusUncertain (unknown liveness \u2014 pass force=true to acknowledge), and tasks that never produced a session (e.g. queue-saturated).\n\nHandles are retained for 30 minutes, so revive works after a task was pruned or the plugin restarted.";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export type { BackgroundCancelClient, BackgroundOutputClient, BackgroundOutputManager, BackgroundOutputMessage, BackgroundOutputMessagesResult, } from "./clients";
|
|
2
2
|
export { createBackgroundCancel } from "./create-background-cancel";
|
|
3
3
|
export { createBackgroundOutput } from "./create-background-output";
|
|
4
|
+
export { createBackgroundRevive } from "./create-background-revive";
|
|
@@ -13,6 +13,14 @@ export interface BackgroundCancelArgs {
|
|
|
13
13
|
taskId?: string;
|
|
14
14
|
all?: boolean;
|
|
15
15
|
}
|
|
16
|
+
export interface BackgroundReviveArgs {
|
|
17
|
+
taskId?: string;
|
|
18
|
+
session_id?: string;
|
|
19
|
+
prompt?: string;
|
|
20
|
+
list?: boolean;
|
|
21
|
+
force?: boolean;
|
|
22
|
+
parentSessionID?: string;
|
|
23
|
+
}
|
|
16
24
|
export type BackgroundOutputMessage = {
|
|
17
25
|
info?: {
|
|
18
26
|
role?: string;
|
|
@@ -54,6 +62,7 @@ export type BackgroundCancelClient = {
|
|
|
54
62
|
};
|
|
55
63
|
};
|
|
56
64
|
export type BackgroundOutputManager = Pick<import("../../features/background-agent").BackgroundManager, "getTask">;
|
|
65
|
+
export type BackgroundReviveManager = Pick<import("../../features/background-agent").BackgroundManager, "revive" | "listRevivable">;
|
|
57
66
|
export type ToolContextWithMetadata = {
|
|
58
67
|
sessionID: string;
|
|
59
68
|
messageID: string;
|
|
@@ -5,4 +5,11 @@ export interface DcpSwitchProfileOptions {
|
|
|
5
5
|
dcp?: DcpConfig;
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
+
export declare function deepMergeProfile(builtin: Record<string, unknown>, override: Record<string, unknown>): Record<string, unknown>;
|
|
9
|
+
/**
|
|
10
|
+
* Switch the active DCP profile.
|
|
11
|
+
* Reads profile parameters from the Matrixx plugin configuration and writes
|
|
12
|
+
* a full inline DCP config to ~/.config/opencode/dcp.jsonc.
|
|
13
|
+
*/
|
|
14
|
+
export declare function switchProfile(profile: string, options?: DcpSwitchProfileOptions): string;
|
|
8
15
|
export declare function createDcpSwitchProfileTool(options?: DcpSwitchProfileOptions): Record<string, ToolDefinition>;
|
|
@@ -3,6 +3,7 @@ import type { CategoryConfig } from "../../config/schema";
|
|
|
3
3
|
export declare const DEFAULT_CATEGORIES: Record<string, CategoryConfig>;
|
|
4
4
|
export declare const CATEGORY_PROMPT_APPENDS: Record<string, string>;
|
|
5
5
|
export declare const CATEGORY_DESCRIPTIONS: Record<string, string>;
|
|
6
|
+
export declare const SHORT_CATEGORY_HINTS: Record<string, string>;
|
|
6
7
|
export declare function buildPlanAgentSystemPrepend(categories?: AvailableCategory[], skills?: AvailableSkill[]): string;
|
|
7
8
|
/**
|
|
8
9
|
* List of agent names that should be treated as plan agents (receive plan system prompt).
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -25,10 +25,9 @@ import type { BackgroundManager } from "../features/background-agent";
|
|
|
25
25
|
type OpencodeClient = PluginInput["client"];
|
|
26
26
|
export { createAssemblyTool } from "./assembly";
|
|
27
27
|
export { createDcpSwitchProfileTool } from "./dcp-switch-profile";
|
|
28
|
-
export { createDelegateAgent } from "./delegate-agent";
|
|
29
28
|
export { createDelegateTask } from "./delegate-task";
|
|
30
29
|
export { createHashlineEditTool } from "./hashline-edit";
|
|
31
30
|
export { createLookAt } from "./look-at";
|
|
32
31
|
export { createTaskCleanupTool, createTaskCreateTool, createTaskGetTool, createTaskList, createTaskUpdateTool, } from "./task";
|
|
33
|
-
export declare function createBackgroundTools(manager: BackgroundManager, client: OpencodeClient): Record<string, ToolDefinition>;
|
|
32
|
+
export declare function createBackgroundTools(manager: BackgroundManager, client: OpencodeClient, directory: string): Record<string, ToolDefinition>;
|
|
34
33
|
export declare const builtinTools: Record<string, ToolDefinition>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-matrixx",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.8",
|
|
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",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface ContextModeToolGuidance {
|
|
2
|
-
searchGuidance: string;
|
|
3
|
-
readGuidance: string;
|
|
4
|
-
analysisGuidance: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Returns context-mode-aware tool guidance for subagent prompts.
|
|
8
|
-
* When `enforce` is true, raw grep/glob/read/bash-cat are blocked by the
|
|
9
|
-
* context-mode-enforcer hook, so guidance routes to ctx_* tools instead.
|
|
10
|
-
* When `enforce` is false, legacy tool guidance is preserved.
|
|
11
|
-
*/
|
|
12
|
-
export declare function getContextModeToolGuidance(enforce: boolean): ContextModeToolGuidance;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
-
import type { BackgroundManager } from "../../features/background-agent";
|
|
3
|
-
import type { DelegateAgentArgs } from "./types";
|
|
4
|
-
export declare function executeBackground(args: DelegateAgentArgs, toolContext: {
|
|
5
|
-
sessionID: string;
|
|
6
|
-
messageID: string;
|
|
7
|
-
agent: string;
|
|
8
|
-
abort: AbortSignal;
|
|
9
|
-
metadata?: (input: {
|
|
10
|
-
title?: string;
|
|
11
|
-
metadata?: Record<string, unknown>;
|
|
12
|
-
}) => void;
|
|
13
|
-
}, manager: BackgroundManager, client: PluginInput["client"]): Promise<string>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
-
export declare function waitForCompletion(sessionID: string, toolContext: {
|
|
3
|
-
sessionID: string;
|
|
4
|
-
messageID: string;
|
|
5
|
-
agent: string;
|
|
6
|
-
abort: AbortSignal;
|
|
7
|
-
metadata?: (input: {
|
|
8
|
-
title?: string;
|
|
9
|
-
metadata?: Record<string, unknown>;
|
|
10
|
-
}) => void;
|
|
11
|
-
}, ctx: PluginInput): Promise<void>;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const ALLOWED_AGENTS: readonly ["trinity", "operator", "oracle", "construct"];
|
|
2
|
-
export declare const CALL_DELEGATE_AGENT_DESCRIPTION = "Spawn explore/librarian agent. run_in_background REQUIRED (true=async with task_id, false=sync).\n\nAvailable: {agents}\n\nPass `session_id=<id>` to continue previous agent with full context. Prompts MUST be in English. Use `background_output` for async results.";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { getMessageDir } from "../../shared/opencode-message-dir";
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
-
import type { DelegateAgentArgs } from "./types";
|
|
3
|
-
export declare function createOrGetSession(args: DelegateAgentArgs, toolContext: {
|
|
4
|
-
sessionID: string;
|
|
5
|
-
messageID: string;
|
|
6
|
-
agent: string;
|
|
7
|
-
abort: AbortSignal;
|
|
8
|
-
metadata?: (input: {
|
|
9
|
-
title?: string;
|
|
10
|
-
metadata?: Record<string, unknown>;
|
|
11
|
-
}) => void;
|
|
12
|
-
}, ctx: PluginInput): Promise<{
|
|
13
|
-
sessionID: string;
|
|
14
|
-
isNew: boolean;
|
|
15
|
-
}>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
-
import { waitForCompletion } from "./completion-poller";
|
|
3
|
-
import { processMessages } from "./message-processor";
|
|
4
|
-
import { createOrGetSession } from "./session-creator";
|
|
5
|
-
import type { DelegateAgentArgs } from "./types";
|
|
6
|
-
type ExecuteSyncDeps = {
|
|
7
|
-
createOrGetSession: typeof createOrGetSession;
|
|
8
|
-
waitForCompletion: typeof waitForCompletion;
|
|
9
|
-
processMessages: typeof processMessages;
|
|
10
|
-
};
|
|
11
|
-
export declare function executeSync(args: DelegateAgentArgs, toolContext: {
|
|
12
|
-
sessionID: string;
|
|
13
|
-
messageID: string;
|
|
14
|
-
agent: string;
|
|
15
|
-
abort: AbortSignal;
|
|
16
|
-
metadata?: (input: {
|
|
17
|
-
title?: string;
|
|
18
|
-
metadata?: Record<string, unknown>;
|
|
19
|
-
}) => void;
|
|
20
|
-
}, ctx: PluginInput, deps?: ExecuteSyncDeps): Promise<string>;
|
|
21
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { type PluginInput, type ToolDefinition } from "@opencode-ai/plugin";
|
|
2
|
-
import type { BackgroundManager } from "../../features/background-agent";
|
|
3
|
-
export declare function createDelegateAgent(ctx: PluginInput, backgroundManager: BackgroundManager, disabledAgents?: string[]): ToolDefinition;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ALLOWED_AGENTS } from "./constants";
|
|
2
|
-
export type AllowedAgentType = (typeof ALLOWED_AGENTS)[number];
|
|
3
|
-
export interface DelegateAgentArgs {
|
|
4
|
-
description: string;
|
|
5
|
-
prompt: string;
|
|
6
|
-
subagent_type: string;
|
|
7
|
-
run_in_background: boolean;
|
|
8
|
-
session_id?: string;
|
|
9
|
-
}
|
|
10
|
-
export type ToolContextWithMetadata = {
|
|
11
|
-
sessionID: string;
|
|
12
|
-
messageID: string;
|
|
13
|
-
agent: string;
|
|
14
|
-
abort: AbortSignal;
|
|
15
|
-
metadata?: (input: {
|
|
16
|
-
title?: string;
|
|
17
|
-
metadata?: Record<string, unknown>;
|
|
18
|
-
}) => void;
|
|
19
|
-
};
|
|
File without changes
|