opencode-matrixx 2.6.12 → 2.6.14
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 +25 -21
- package/dist/agents/architect/default.d.ts +1 -1
- package/dist/agents/architect/gpt.d.ts +1 -1
- package/dist/agents/builtin-agents/architect-agent.d.ts +0 -1
- package/dist/agents/builtin-agents/general-agents.d.ts +0 -1
- package/dist/agents/builtin-agents/keymaker-agent.d.ts +0 -1
- package/dist/agents/builtin-agents/morpheus-agent.d.ts +0 -1
- package/dist/agents/builtin-agents.d.ts +1 -1
- package/dist/agents/dynamic-agent-prompt-builder.d.ts +4 -4
- package/dist/agents/keymaker.d.ts +1 -1
- package/dist/agents/model-directives.d.ts +7 -0
- package/dist/agents/morpheus.d.ts +1 -1
- package/dist/agents/mouse/agent.d.ts +2 -2
- package/dist/agents/mouse/deepseek.d.ts +1 -1
- package/dist/agents/mouse/default.d.ts +1 -1
- package/dist/agents/mouse/gpt.d.ts +1 -1
- package/dist/agents/mouse/mimo.d.ts +1 -1
- package/dist/agents/mouse/qwen.d.ts +1 -1
- package/dist/agents/mouse/shared.d.ts +3 -3
- package/dist/agents/oracle/plan-generation.d.ts +1 -1
- package/dist/agents/seraph.d.ts +1 -1
- package/dist/cli.js +17 -10
- package/dist/config/schema/dcp.d.ts +15 -11
- package/dist/config/schema/experimental.d.ts +1 -1
- package/dist/config/schema/hooks.d.ts +4 -5
- package/dist/config/schema/matrixx-config.d.ts +8 -6
- package/dist/config/schema/tasks.d.ts +5 -1
- package/dist/create-hooks.d.ts +3 -4
- package/dist/features/background-agent/manager.d.ts +5 -2
- package/dist/features/background-agent/reconcile.d.ts +8 -1
- package/dist/features/builtin-commands/templates/handoff.d.ts +1 -1
- package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -1
- package/dist/features/builtin-commands/templates/refactor.d.ts +1 -1
- package/dist/features/builtin-commands/templates/remove-deadcode.d.ts +1 -1
- package/dist/features/builtin-commands/templates/stop-continuation.d.ts +1 -1
- package/dist/features/session-state/state.d.ts +3 -0
- package/dist/features/task-session-scope/ancestry.d.ts +23 -0
- package/dist/features/task-session-scope/index.d.ts +2 -0
- package/dist/features/task-session-scope/session-task-pending.d.ts +83 -0
- package/dist/hooks/architect/system-reminder-templates.d.ts +1 -1
- package/dist/hooks/dcp-nudge-sanitizer/constants.d.ts +2 -0
- package/dist/hooks/dcp-nudge-sanitizer/hook.d.ts +25 -0
- package/dist/hooks/dcp-nudge-sanitizer/index.d.ts +1 -0
- package/dist/hooks/index.d.ts +3 -5
- package/dist/hooks/keyword-detector/ultrawork/deepseek.d.ts +1 -1
- package/dist/hooks/keyword-detector/ultrawork/default.d.ts +1 -1
- package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +1 -1
- package/dist/hooks/keyword-detector/ultrawork/glm.d.ts +1 -1
- package/dist/hooks/keyword-detector/ultrawork/mimo.d.ts +1 -1
- package/dist/hooks/nudge-loop-breaker/constants.d.ts +9 -0
- package/dist/hooks/nudge-loop-breaker/hook.d.ts +18 -0
- package/dist/hooks/nudge-loop-breaker/index.d.ts +1 -0
- package/dist/hooks/nudge-loop-breaker/session-state.d.ts +11 -0
- package/dist/hooks/plan-persister/hook.d.ts +1 -1
- package/dist/hooks/session-notification-scheduler.d.ts +1 -1
- package/dist/hooks/session-notification.d.ts +9 -2
- package/dist/hooks/task-continuation-enforcer/handler.d.ts +0 -1
- package/dist/hooks/task-continuation-enforcer/index.d.ts +0 -1
- package/dist/hooks/task-continuation-enforcer/staleness.d.ts +10 -0
- package/dist/hooks/task-continuation-enforcer/todo.d.ts +2 -1
- package/dist/hooks/task-continuation-enforcer/types.d.ts +0 -8
- package/dist/hooks/task-notepad-writer/constants.d.ts +42 -0
- package/dist/hooks/task-notepad-writer/hook.d.ts +14 -0
- package/dist/hooks/task-notepad-writer/index.d.ts +2 -0
- package/dist/hooks/task-notepad-writer/notepad-path.d.ts +36 -0
- package/dist/index.js +1834 -2138
- package/dist/matrixx.schema.json +69 -18
- package/dist/plugin/hooks/create-continuation-hooks.d.ts +2 -3
- package/dist/plugin/hooks/create-core-hooks.d.ts +2 -2
- package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +2 -3
- package/dist/plugin/hooks/create-transform-hooks.d.ts +2 -0
- package/dist/plugin-handlers/task-permissions.d.ts +48 -0
- package/dist/shared/dcp-switch-profile.d.ts +12 -0
- package/dist/shared/logger.d.ts +1 -0
- package/dist/shared/system-directive.d.ts +0 -1
- package/dist/shared/task-system-gating.d.ts +24 -4
- package/dist/tools/session-manager/constants.d.ts +1 -1
- package/dist/tools/session-manager/storage.d.ts +44 -0
- package/dist/tools/session-manager/tools.d.ts +2 -1
- package/dist/tools/task/create-one.d.ts +21 -0
- package/dist/tools/task/types.d.ts +56 -1
- package/package.json +1 -1
- package/dist/cli/setup/config-writer.test.d.ts +0 -1
- package/dist/cli/setup/deps.test.d.ts +0 -1
- package/dist/cli/setup/index.test.d.ts +0 -1
- package/dist/cli/setup/opencode-sync.test.d.ts +0 -1
- package/dist/cli/setup/prompts.test.d.ts +0 -1
- package/dist/features/background-agent/handle-index.test.d.ts +0 -1
- package/dist/features/background-agent/manager-handles.test.d.ts +0 -1
- package/dist/features/knowledge-hub/loader.test.d.ts +0 -1
- package/dist/features/knowledge-hub/resolver.test.d.ts +0 -1
- package/dist/features/mission-state/plan-storage.test.d.ts +0 -1
- package/dist/features/mission-state/reconcile.test.d.ts +0 -1
- package/dist/features/session-state/state.test.d.ts +0 -1
- package/dist/hooks/compaction-todo-preserver/hook.d.ts +0 -24
- package/dist/hooks/compaction-todo-preserver/index.d.ts +0 -2
- package/dist/hooks/input-secret-guard/detector.test.d.ts +0 -1
- package/dist/hooks/input-secret-guard/hook.test.d.ts +0 -1
- package/dist/hooks/input-secret-guard/redactor.test.d.ts +0 -1
- package/dist/hooks/input-secret-guard/session-allow-cache.test.d.ts +0 -1
- package/dist/hooks/interactive-bash-session/hook.test.d.ts +0 -1
- package/dist/hooks/knowledge-hub-guard/hook.test.d.ts +0 -1
- package/dist/hooks/knowledge-hub-injector/hook.test.d.ts +0 -1
- package/dist/hooks/knowledge-hub-search-nudge/hook.test.d.ts +0 -1
- package/dist/hooks/plan-persister/task-sync.test.d.ts +0 -1
- package/dist/hooks/rtk-bash-rewriter/hook.test.d.ts +0 -1
- package/dist/hooks/session-todo-status.d.ts +0 -2
- package/dist/hooks/stop-continuation-guard/repro.test.d.ts +0 -1
- package/dist/hooks/task-continuation-enforcer/awaiting-user.test.d.ts +0 -1
- package/dist/hooks/task-continuation-enforcer/continuation-injection.test.d.ts +0 -1
- package/dist/hooks/task-continuation-enforcer/countdown.test.d.ts +0 -1
- package/dist/hooks/task-continuation-enforcer/idle-event.test.d.ts +0 -1
- package/dist/hooks/task-continuation-enforcer/staleness.test.d.ts +0 -1
- package/dist/hooks/task-continuation-enforcer/todo.test.d.ts +0 -1
- package/dist/hooks/task-continuation-enforcer/ulw-bootstrap.test.d.ts +0 -1
- package/dist/hooks/task-notepad/constants.d.ts +0 -10
- package/dist/hooks/task-notepad/hook.d.ts +0 -12
- package/dist/hooks/task-notepad/index.d.ts +0 -3
- package/dist/hooks/task-notepad/types.d.ts +0 -16
- package/dist/hooks/tasks-todowrite-disabler/constants.d.ts +0 -3
- package/dist/hooks/tasks-todowrite-disabler/hook.d.ts +0 -14
- package/dist/hooks/tasks-todowrite-disabler/index.d.ts +0 -2
- package/dist/hooks/todo-continuation-enforcer/abort-detection.d.ts +0 -4
- package/dist/hooks/todo-continuation-enforcer/awaiting-user.test.d.ts +0 -1
- package/dist/hooks/todo-continuation-enforcer/constants.d.ts +0 -10
- package/dist/hooks/todo-continuation-enforcer/continuation-injection.d.ts +0 -12
- package/dist/hooks/todo-continuation-enforcer/countdown.d.ts +0 -14
- package/dist/hooks/todo-continuation-enforcer/countdown.test.d.ts +0 -1
- package/dist/hooks/todo-continuation-enforcer/handler.d.ts +0 -15
- package/dist/hooks/todo-continuation-enforcer/idle-event.d.ts +0 -11
- package/dist/hooks/todo-continuation-enforcer/idle-event.test.d.ts +0 -1
- package/dist/hooks/todo-continuation-enforcer/index.d.ts +0 -4
- package/dist/hooks/todo-continuation-enforcer/message-directory.d.ts +0 -1
- package/dist/hooks/todo-continuation-enforcer/non-idle-events.d.ts +0 -6
- package/dist/hooks/todo-continuation-enforcer/session-state.d.ts +0 -10
- package/dist/hooks/todo-continuation-enforcer/todo.d.ts +0 -2
- package/dist/hooks/todo-continuation-enforcer/types.d.ts +0 -61
- package/dist/shared/format-bytes.test.d.ts +0 -1
- package/dist/shared/is-abort-error.test.d.ts +0 -1
- package/dist/shared/task-system-gating.test.d.ts +0 -1
- package/dist/shared/with-timeout.test.d.ts +0 -1
- package/dist/tools/delegate-task/poll-timeout-outcome.test.d.ts +0 -1
- package/dist/tools/delegate-task/prompt-builder.tdd.test.d.ts +0 -1
- package/dist/tools/delegate-task/sync-task.test.d.ts +0 -1
- package/dist/tools/delegate-task/tdd-enforcement.test.d.ts +0 -1
- package/dist/tools/delegate-task/timing.test.d.ts +0 -1
- package/dist/tools/evolution/query-actions.test.d.ts +0 -1
- package/dist/tools/evolution/tools.test.d.ts +0 -1
- package/dist/tools/github-search/result-formatter.test.d.ts +0 -1
- package/dist/tools/knowledge-hub-confirm/tools.test.d.ts +0 -1
- package/dist/tools/task/task-cleanup.test.d.ts +0 -1
|
@@ -13,7 +13,7 @@ export declare function createIdleNotificationScheduler(options: {
|
|
|
13
13
|
ctx: PluginInput;
|
|
14
14
|
platform: Platform;
|
|
15
15
|
config: SessionNotificationConfig;
|
|
16
|
-
|
|
16
|
+
hasIncompleteTaskWork: (ctx: PluginInput, sessionID: string) => Promise<boolean>;
|
|
17
17
|
send: (ctx: PluginInput, platform: Platform, title: string, message: string) => Promise<void>;
|
|
18
18
|
playSound: (ctx: PluginInput, platform: Platform, soundPath: string) => Promise<void>;
|
|
19
19
|
}): {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import type { MatrixxConfig } from "../config/schema";
|
|
2
3
|
interface SessionNotificationConfig {
|
|
3
4
|
title?: string;
|
|
4
5
|
message?: string;
|
|
@@ -6,12 +7,18 @@ interface SessionNotificationConfig {
|
|
|
6
7
|
soundPath?: string;
|
|
7
8
|
/** Delay in ms before sending notification to confirm session is still idle (default: 1500) */
|
|
8
9
|
idleConfirmationDelay?: number;
|
|
9
|
-
/** Skip notification if
|
|
10
|
+
/** Skip notification if the session (or one of its subagents) still has pending work in the file-backed task store (default: true) */
|
|
10
11
|
skipIfIncompleteTodos?: boolean;
|
|
11
12
|
/** Maximum number of sessions to track before cleanup (default: 100) */
|
|
12
13
|
maxTrackedSessions?: number;
|
|
13
14
|
}
|
|
14
|
-
export declare function createSessionNotification(ctx: PluginInput, config?: SessionNotificationConfig
|
|
15
|
+
export declare function createSessionNotification(ctx: PluginInput, config?: SessionNotificationConfig,
|
|
16
|
+
/**
|
|
17
|
+
* The plugin config is a separate parameter, not part of `SessionNotificationConfig`:
|
|
18
|
+
* only `tasks.*` is read here, and widening the hook-local config would blur a
|
|
19
|
+
* presentation-only shape into a carrier for task-storage settings.
|
|
20
|
+
*/
|
|
21
|
+
pluginConfig?: Partial<MatrixxConfig>): ({ event }: {
|
|
15
22
|
event: {
|
|
16
23
|
type: string;
|
|
17
24
|
properties?: unknown;
|
|
@@ -3,4 +3,3 @@ import type { TaskContinuationEnforcer, TaskContinuationEnforcerOptions } from "
|
|
|
3
3
|
export { createTaskContinuationHandler } from "./handler";
|
|
4
4
|
export type { TaskContinuationEnforcer, TaskContinuationEnforcerOptions } from "./types";
|
|
5
5
|
export declare function createTaskContinuationEnforcer(ctx: PluginInput, options?: TaskContinuationEnforcerOptions): TaskContinuationEnforcer;
|
|
6
|
-
export declare const createTodoContinuationEnforcer: typeof createTaskContinuationEnforcer;
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import type { MatrixxConfig } from "../../config/schema";
|
|
2
2
|
import type { Task } from "../../features/task-storage/types";
|
|
3
3
|
export declare const DEFAULT_STALE_AFTER_HOURS = 24;
|
|
4
|
+
export { DEFAULT_BACKGROUND_STALE_AFTER_HOURS } from "../../shared/task-system-gating";
|
|
4
5
|
/**
|
|
5
6
|
* Resolve the stale threshold (ms) from plugin config.
|
|
6
7
|
* `tasks.stale_after_hours` (default 24h, legacy `morpheus.tasks.stale_after_hours`) — a pending task whose
|
|
7
8
|
* task file has had no write activity for longer than this is "stale".
|
|
8
9
|
*/
|
|
9
10
|
export declare function getStaleAfterMs(config?: Partial<MatrixxConfig>): number;
|
|
11
|
+
/**
|
|
12
|
+
* Resolve the background completion-gate threshold (ms) from plugin config.
|
|
13
|
+
* `tasks.background_stale_after_hours` (default 2h, canonical only) — the same
|
|
14
|
+
* mtime basis as `getStaleAfterMs`, but a much shorter window because a task
|
|
15
|
+
* held `pending`/`in_progress` with no file activity is a far stronger signal
|
|
16
|
+
* when it is blocking a background handle than when it is merely delaying a
|
|
17
|
+
* continuation nudge. The enforcer's 24h default deliberately stays at 24.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getBackgroundStaleAfterMs(config?: Partial<MatrixxConfig>): number;
|
|
10
20
|
/**
|
|
11
21
|
* Age of a task file in ms since last write (mtime). Returns null when the
|
|
12
22
|
* file cannot be stat'ed (missing/unreadable) — callers treat null as "not stale".
|
|
@@ -20,9 +20,10 @@ export declare function dropSubtasksWithResolvedParent(tasks: Task[]): Task[];
|
|
|
20
20
|
/**
|
|
21
21
|
* Filter tasks by session scope.
|
|
22
22
|
* - When sessionScoped=false: all tasks pass through (opt-out / legacy behavior)
|
|
23
|
-
* - Pre-migration tasks (no threadID) are always included for backward compatibility
|
|
24
23
|
* - Current session's tasks (threadID === sessionID) are included
|
|
25
24
|
* - Subagent session tasks (threadID in subagentIDs) are included
|
|
25
|
+
* - Tasks with no threadID are excluded: threadID is required by TaskObjectSchema, so
|
|
26
|
+
* an unattributed task cannot be attributed and is not claimed by any session
|
|
26
27
|
* - All other tasks are excluded
|
|
27
28
|
*/
|
|
28
29
|
export declare function filterTasksBySession(tasks: Task[], options: SessionFilterOptions): Task[];
|
|
@@ -20,14 +20,6 @@ export interface TaskContinuationEnforcer {
|
|
|
20
20
|
cancelAllCountdowns: () => void;
|
|
21
21
|
isAwaitingUser: (sessionID: string) => boolean;
|
|
22
22
|
}
|
|
23
|
-
export type TodoContinuationEnforcerOptions = TaskContinuationEnforcerOptions;
|
|
24
|
-
export type TodoContinuationEnforcer = TaskContinuationEnforcer;
|
|
25
|
-
export interface Todo {
|
|
26
|
-
content: string;
|
|
27
|
-
status: string;
|
|
28
|
-
priority: string;
|
|
29
|
-
id?: string;
|
|
30
|
-
}
|
|
31
23
|
export interface SessionState {
|
|
32
24
|
countdownTimer?: ReturnType<typeof setTimeout>;
|
|
33
25
|
countdownInterval?: ReturnType<typeof setInterval>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare const HOOK_NAME = "task-notepad-writer";
|
|
2
|
+
export declare const MATRIXX_DIR_NAME = ".matrixx";
|
|
3
|
+
export declare const PLANS_SUBDIR = "plans";
|
|
4
|
+
export declare const NOTEPADS_SUBDIR = "notepads";
|
|
5
|
+
export declare const PLAN_EXTENSION = ".md";
|
|
6
|
+
export declare const NOTEPAD_EXTENSION = ".md";
|
|
7
|
+
export declare const ADHOC_BUCKET = "adhoc";
|
|
8
|
+
export declare const TASK_CREATE_TOOL = "task_create";
|
|
9
|
+
export declare const TASK_UPDATE_TOOL = "task_update";
|
|
10
|
+
export declare const COMPLETED_STATUS = "completed";
|
|
11
|
+
export declare const DEFAULT_PRIORITY = "medium";
|
|
12
|
+
export declare const COMPLETION_SECTION_TITLE = "## Completion";
|
|
13
|
+
export declare const PLAN_NAME_METADATA_KEY = "planName";
|
|
14
|
+
export declare const SLUG_MAX_LENGTH = 60;
|
|
15
|
+
export declare const NOTEPAD_SECTIONS: readonly [{
|
|
16
|
+
readonly heading: "## Findings";
|
|
17
|
+
readonly body: "(Record what you learn about this code as you work — patterns, conventions, gotchas, useful references.)";
|
|
18
|
+
}, {
|
|
19
|
+
readonly heading: "## Blockers";
|
|
20
|
+
readonly body: "(Anything blocking progress. Be specific: file path, line, error, workaround if any.)";
|
|
21
|
+
}, {
|
|
22
|
+
readonly heading: "## Questions";
|
|
23
|
+
readonly body: "(Open questions to revisit later. Don't lose them when context compacts.)";
|
|
24
|
+
}, {
|
|
25
|
+
readonly heading: "## Results";
|
|
26
|
+
readonly body: "(Summary on completion. What changed, what was verified, what remains.)";
|
|
27
|
+
}];
|
|
28
|
+
/**
|
|
29
|
+
* The header's `**Task ID**: <id>` line is the durable idempotency marker: it
|
|
30
|
+
* lives inside the file, so a lookup finds the same notepad across process
|
|
31
|
+
* restarts, with no in-memory bookkeeping to lose.
|
|
32
|
+
*/
|
|
33
|
+
export declare function taskIdMarkerLine(taskId: string): string;
|
|
34
|
+
export declare function taskIdMarkerPresent(content: string, taskId: string): boolean;
|
|
35
|
+
export declare function renderNotepad(input: {
|
|
36
|
+
subject: string;
|
|
37
|
+
taskId: string;
|
|
38
|
+
priority?: string | undefined;
|
|
39
|
+
status?: string | undefined;
|
|
40
|
+
startedAt: string;
|
|
41
|
+
}): string;
|
|
42
|
+
export declare function renderCompletionStamp(completedAt: string): string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type TaskNotepadWriterContext } from "./notepad-path";
|
|
2
|
+
export interface ToolAfterInput {
|
|
3
|
+
tool: string;
|
|
4
|
+
sessionID: string;
|
|
5
|
+
callID: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ToolAfterOutput {
|
|
8
|
+
title: string;
|
|
9
|
+
output: string;
|
|
10
|
+
metadata?: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
export declare function createTaskNotepadWriterHook(ctx: TaskNotepadWriterContext): {
|
|
13
|
+
"tool.execute.after": (input: ToolAfterInput, output: ToolAfterOutput | undefined) => Promise<void>;
|
|
14
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import type { MatrixxConfig } from "../../config/schema";
|
|
3
|
+
export type TaskNotepadWriterContext = PluginInput & {
|
|
4
|
+
config?: Partial<MatrixxConfig>;
|
|
5
|
+
};
|
|
6
|
+
export interface NotepadTask {
|
|
7
|
+
id: string;
|
|
8
|
+
subject: string;
|
|
9
|
+
metadata?: Record<string, unknown> | undefined;
|
|
10
|
+
status?: string | undefined;
|
|
11
|
+
priority?: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
export type BucketReason = "plan-file-exists" | "no-plan-name" | "plan-file-missing";
|
|
14
|
+
export interface NotepadResolution {
|
|
15
|
+
bucketDir: string;
|
|
16
|
+
filePath: string;
|
|
17
|
+
reason: BucketReason;
|
|
18
|
+
}
|
|
19
|
+
export declare function notepadsRootFor(directory: string): string;
|
|
20
|
+
export declare function extractPlanName(task: NotepadTask): string | null;
|
|
21
|
+
export declare function slugifySubject(subject: string, fallback: string): string;
|
|
22
|
+
export declare function countNotepadFiles(bucketDir: string): number;
|
|
23
|
+
export declare function resolveNotepadPath(input: {
|
|
24
|
+
ctx: TaskNotepadWriterContext;
|
|
25
|
+
task: NotepadTask;
|
|
26
|
+
notepadRoot: string;
|
|
27
|
+
}): NotepadResolution;
|
|
28
|
+
export declare function findExistingNotepadForTask(bucketDir: string, taskId: string): string | null;
|
|
29
|
+
export declare function findNotepadForTask(input: {
|
|
30
|
+
ctx: TaskNotepadWriterContext;
|
|
31
|
+
task: NotepadTask;
|
|
32
|
+
notepadRoot: string;
|
|
33
|
+
}): {
|
|
34
|
+
filePath: string;
|
|
35
|
+
bucketDir: string;
|
|
36
|
+
} | null;
|