opencode-matrixx 2.6.5 → 2.6.7
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/oracle/behavioral-summary.d.ts +1 -1
- package/dist/agents/oracle/high-accuracy-mode.d.ts +1 -1
- package/dist/agents/oracle/interview-mode.d.ts +1 -1
- package/dist/agents/oracle/plan-generation.d.ts +1 -1
- package/dist/agents/oracle/plan-template.d.ts +1 -1
- package/dist/agents/oracle/system-prompt.d.ts +1 -1
- package/dist/cli.js +65 -10
- package/dist/config/schema/background-task.d.ts +37 -0
- package/dist/config/schema/dcp.d.ts +46 -0
- package/dist/config/schema/hooks.d.ts +1 -0
- package/dist/config/schema/matrixx-config.d.ts +33 -0
- package/dist/create-hooks.d.ts +1 -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 +75 -0
- package/dist/features/background-agent/handle-index.test.d.ts +1 -0
- package/dist/features/background-agent/index.d.ts +1 -0
- package/dist/features/background-agent/manager-handles.test.d.ts +1 -0
- package/dist/features/background-agent/manager.d.ts +69 -2
- 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/hooks/background-task-blocker/hook.d.ts +10 -0
- package/dist/hooks/background-task-blocker/index.d.ts +1 -0
- package/dist/hooks/context-mode-enforcer/constants.d.ts +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/index.js +2037 -620
- package/dist/matrixx.schema.json +166 -3
- package/dist/plugin/hooks/create-core-hooks.d.ts +1 -0
- package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +2 -1
- 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 -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 -1
- 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 -1
- package/dist/tools/background-task/types.d.ts +9 -5
- package/dist/tools/dcp-switch-profile/tools.d.ts +1 -0
- package/dist/tools/delegate-task/sync-task.test.d.ts +1 -0
- package/dist/tools/delegate-task/timing.test.d.ts +1 -0
- package/dist/tools/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/tools/background-task/create-background-task.d.ts +0 -3
package/dist/matrixx.schema.json
CHANGED
|
@@ -173,6 +173,7 @@
|
|
|
173
173
|
"preemptive-compaction",
|
|
174
174
|
"rules-injector",
|
|
175
175
|
"background-notification",
|
|
176
|
+
"background-task-blocker",
|
|
176
177
|
"auto-update-checker",
|
|
177
178
|
"startup-toast",
|
|
178
179
|
"keyword-detector",
|
|
@@ -4062,6 +4063,27 @@
|
|
|
4062
4063
|
"turns": 4
|
|
4063
4064
|
}
|
|
4064
4065
|
}
|
|
4066
|
+
},
|
|
4067
|
+
"brutal": {
|
|
4068
|
+
"pruneNotification": "off",
|
|
4069
|
+
"compress": {
|
|
4070
|
+
"maxContextLimit": "15%",
|
|
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
|
+
}
|
|
4065
4087
|
}
|
|
4066
4088
|
},
|
|
4067
4089
|
"type": "object",
|
|
@@ -4183,6 +4205,46 @@
|
|
|
4183
4205
|
"default_profile": {
|
|
4184
4206
|
"type": "string"
|
|
4185
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
|
+
},
|
|
4186
4248
|
"base": {
|
|
4187
4249
|
"default": {
|
|
4188
4250
|
"autoUpdate": false,
|
|
@@ -4216,7 +4278,10 @@
|
|
|
4216
4278
|
"enabled": false,
|
|
4217
4279
|
"automaticStrategies": true
|
|
4218
4280
|
},
|
|
4219
|
-
"protectedFilePatterns": []
|
|
4281
|
+
"protectedFilePatterns": [],
|
|
4282
|
+
"experimental": {
|
|
4283
|
+
"allowSubAgents": true
|
|
4284
|
+
}
|
|
4220
4285
|
},
|
|
4221
4286
|
"type": "object",
|
|
4222
4287
|
"properties": {
|
|
@@ -4435,6 +4500,18 @@
|
|
|
4435
4500
|
"items": {
|
|
4436
4501
|
"type": "string"
|
|
4437
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
|
|
4438
4515
|
}
|
|
4439
4516
|
},
|
|
4440
4517
|
"required": [
|
|
@@ -4445,7 +4522,8 @@
|
|
|
4445
4522
|
"strategies",
|
|
4446
4523
|
"commands",
|
|
4447
4524
|
"manualMode",
|
|
4448
|
-
"protectedFilePatterns"
|
|
4525
|
+
"protectedFilePatterns",
|
|
4526
|
+
"experimental"
|
|
4449
4527
|
],
|
|
4450
4528
|
"additionalProperties": false
|
|
4451
4529
|
}
|
|
@@ -4453,6 +4531,7 @@
|
|
|
4453
4531
|
"required": [
|
|
4454
4532
|
"enabled",
|
|
4455
4533
|
"profiles",
|
|
4534
|
+
"handoffCompression",
|
|
4456
4535
|
"base"
|
|
4457
4536
|
],
|
|
4458
4537
|
"additionalProperties": false
|
|
@@ -4677,6 +4756,91 @@
|
|
|
4677
4756
|
}
|
|
4678
4757
|
},
|
|
4679
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
|
|
4680
4844
|
}
|
|
4681
4845
|
},
|
|
4682
4846
|
"additionalProperties": false
|
|
@@ -5205,7 +5369,6 @@
|
|
|
5205
5369
|
},
|
|
5206
5370
|
"blocked_tools": {
|
|
5207
5371
|
"default": [
|
|
5208
|
-
"read",
|
|
5209
5372
|
"grep",
|
|
5210
5373
|
"glob"
|
|
5211
5374
|
],
|
|
@@ -13,6 +13,7 @@ export declare function createCoreHooks(args: {
|
|
|
13
13
|
thinkingBlockValidator: ReturnType<typeof import("../../hooks").createThinkingBlockValidatorHook> | null;
|
|
14
14
|
toolPairValidator: ReturnType<typeof import("../../hooks").createToolPairValidatorHook> | null;
|
|
15
15
|
designIntentPreserver: ReturnType<typeof import("../../hooks").createDesignIntentPreserverHook> | null;
|
|
16
|
+
backgroundTaskBlocker: ReturnType<typeof import("../../hooks").createBackgroundTaskBlockerHook> | null;
|
|
16
17
|
commentChecker: ReturnType<typeof import("../../hooks").createCommentCheckerHooks> | null;
|
|
17
18
|
toolOutputTruncator: ReturnType<typeof import("../../hooks").createToolOutputTruncatorHook> | null;
|
|
18
19
|
directoryAgentsInjector: ReturnType<typeof import("../../hooks").createDirectoryAgentsInjectorHook> | null;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { HookName, MatrixxConfig } from "../../config";
|
|
2
|
-
import { createBashFileReadGuardHook, createCommentCheckerHooks, createContextModeEnforcerHook, createDirectoryAgentsInjectorHook, createEmptyTaskResponseDetectorHook, createEnvFileWriteGuardHook, createEvolutionWatcherHook, createHashlineEditDiffEnhancerHook, createHashlineReadEnhancerHook, createJsonErrorRecoveryHook, createQualityGateHook, createReadImageResizerHook, createRulesInjectorHook, createSecretLeakGuardHook, createTaskEditGuardHook, createTaskNotepadHook, createTasksTodowriteDisablerHook, createToolOutputTruncatorHook, createWebFetchRedirectGuardHook, createWriteExistingFileGuardHook } from "../../hooks";
|
|
2
|
+
import { createBackgroundTaskBlockerHook, createBashFileReadGuardHook, createCommentCheckerHooks, createContextModeEnforcerHook, createDirectoryAgentsInjectorHook, createEmptyTaskResponseDetectorHook, createEnvFileWriteGuardHook, createEvolutionWatcherHook, createHashlineEditDiffEnhancerHook, createHashlineReadEnhancerHook, createJsonErrorRecoveryHook, createQualityGateHook, createReadImageResizerHook, createRulesInjectorHook, createSecretLeakGuardHook, createTaskEditGuardHook, createTaskNotepadHook, createTasksTodowriteDisablerHook, createToolOutputTruncatorHook, createWebFetchRedirectGuardHook, createWriteExistingFileGuardHook } from "../../hooks";
|
|
3
3
|
import type { PluginContext } from "../types";
|
|
4
4
|
export type ToolGuardHooks = {
|
|
5
|
+
backgroundTaskBlocker: ReturnType<typeof createBackgroundTaskBlockerHook> | null;
|
|
5
6
|
commentChecker: ReturnType<typeof createCommentCheckerHooks> | null;
|
|
6
7
|
toolOutputTruncator: ReturnType<typeof createToolOutputTruncatorHook> | null;
|
|
7
8
|
directoryAgentsInjector: ReturnType<typeof createDirectoryAgentsInjectorHook> | null;
|
|
@@ -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,6 +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-enforcement";
|
|
7
8
|
export * from "./data-path";
|
|
8
9
|
export * from "./deep-merge";
|
|
9
10
|
export * from "./delay";
|
|
@@ -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,3 +1,3 @@
|
|
|
1
|
-
export declare const BACKGROUND_TASK_DESCRIPTION = "Run agent task in background. Returns task_id immediately; notifies on completion.\n\nUse `background_output` to get results. Prompts MUST be in English.";
|
|
2
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.";
|
|
3
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,4 +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 {
|
|
4
|
+
export { createBackgroundRevive } from "./create-background-revive";
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
export interface BackgroundTaskArgs {
|
|
2
|
-
description: string;
|
|
3
|
-
prompt: string;
|
|
4
|
-
agent: string;
|
|
5
|
-
}
|
|
6
1
|
export interface BackgroundOutputArgs {
|
|
7
2
|
task_id: string;
|
|
8
3
|
block?: boolean;
|
|
@@ -18,6 +13,14 @@ export interface BackgroundCancelArgs {
|
|
|
18
13
|
taskId?: string;
|
|
19
14
|
all?: boolean;
|
|
20
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
|
+
}
|
|
21
24
|
export type BackgroundOutputMessage = {
|
|
22
25
|
info?: {
|
|
23
26
|
role?: string;
|
|
@@ -59,6 +62,7 @@ export type BackgroundCancelClient = {
|
|
|
59
62
|
};
|
|
60
63
|
};
|
|
61
64
|
export type BackgroundOutputManager = Pick<import("../../features/background-agent").BackgroundManager, "getTask">;
|
|
65
|
+
export type BackgroundReviveManager = Pick<import("../../features/background-agent").BackgroundManager, "revive" | "listRevivable">;
|
|
62
66
|
export type ToolContextWithMetadata = {
|
|
63
67
|
sessionID: string;
|
|
64
68
|
messageID: string;
|
|
@@ -5,4 +5,5 @@ 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>;
|
|
8
9
|
export declare function createDcpSwitchProfileTool(options?: DcpSwitchProfileOptions): Record<string, ToolDefinition>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -30,5 +30,5 @@ export { createDelegateTask } from "./delegate-task";
|
|
|
30
30
|
export { createHashlineEditTool } from "./hashline-edit";
|
|
31
31
|
export { createLookAt } from "./look-at";
|
|
32
32
|
export { createTaskCleanupTool, createTaskCreateTool, createTaskGetTool, createTaskList, createTaskUpdateTool, } from "./task";
|
|
33
|
-
export declare function createBackgroundTools(manager: BackgroundManager, client: OpencodeClient): Record<string, ToolDefinition>;
|
|
33
|
+
export declare function createBackgroundTools(manager: BackgroundManager, client: OpencodeClient, directory: string): Record<string, ToolDefinition>;
|
|
34
34
|
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.7",
|
|
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",
|