opencode-matrixx 1.0.2 → 1.1.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 +49 -7
- package/dist/agents/architect/default.d.ts +1 -1
- package/dist/agents/architect/gpt.d.ts +1 -1
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/mouse/agent.d.ts +1 -1
- 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/identity-constraints.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/agents/smith.d.ts +1 -1
- package/dist/agents/types.d.ts +1 -1
- package/dist/agents/zion.d.ts +7 -0
- package/dist/cli/index.js +724 -171
- package/dist/config/index.d.ts +2 -2
- package/dist/config/schema/agent-definitions.d.ts +4 -0
- package/dist/config/schema/agent-names.d.ts +7 -0
- package/dist/config/schema/categories.d.ts +2 -0
- package/dist/config/schema/hooks.d.ts +6 -0
- package/dist/config/schema/matrixx-config.d.ts +30 -0
- package/dist/config/schema/model-capabilities.d.ts +8 -0
- package/dist/config/schema/runtime-fallback.d.ts +10 -0
- package/dist/config/schema/tdd-enforcer.d.ts +5 -0
- package/dist/config/schema.d.ts +4 -0
- package/dist/create-hooks.d.ts +6 -0
- package/dist/features/builtin-commands/templates/handoff.d.ts +1 -1
- package/dist/features/builtin-commands/templates/pickup.d.ts +1 -1
- package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
- package/dist/features/builtin-skills/skills/crypto-market-analysis.d.ts +4 -0
- package/dist/features/builtin-skills/skills/crypto-onchain.d.ts +4 -0
- package/dist/features/builtin-skills/skills/crypto-trading.d.ts +4 -0
- package/dist/features/builtin-skills/skills/index.d.ts +5 -0
- package/dist/features/builtin-skills/skills/review-work.d.ts +4 -0
- package/dist/features/builtin-skills/skills/tdd-enforcer.d.ts +4 -0
- package/dist/features/mission-state/constants.d.ts +4 -4
- package/dist/features/mission-state/storage.d.ts +1 -1
- package/dist/features/run-continuation-state/constants.d.ts +1 -0
- package/dist/features/run-continuation-state/index.d.ts +3 -0
- package/dist/features/run-continuation-state/storage.d.ts +6 -0
- package/dist/features/run-continuation-state/types.d.ts +12 -0
- package/dist/features/team-mode/index.d.ts +2 -0
- package/dist/features/team-mode/team-layout-tmux/index.d.ts +1 -0
- package/dist/features/team-mode/team-layout-tmux/layout.d.ts +15 -0
- package/dist/features/team-mode/team-worktree/cleanup.d.ts +3 -0
- package/dist/features/team-mode/team-worktree/index.d.ts +2 -0
- package/dist/features/team-mode/team-worktree/manager.d.ts +15 -0
- package/dist/features/team-mode/types.d.ts +210 -0
- package/dist/hooks/handoff-injector/constants.d.ts +2 -2
- package/dist/hooks/hashline-edit-diff-enhancer/hook.d.ts +28 -0
- package/dist/hooks/hashline-edit-diff-enhancer/index.d.ts +1 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/keyword-detector/ultrawork/planner.d.ts +1 -1
- package/dist/hooks/matrix-loop/constants.d.ts +1 -1
- package/dist/hooks/mouse-notepad/constants.d.ts +1 -1
- package/dist/hooks/preemptive-compaction-degradation-monitor.d.ts +55 -0
- package/dist/hooks/preemptive-compaction-no-text-tail.d.ts +18 -0
- package/dist/hooks/preemptive-compaction-trigger.d.ts +13 -0
- package/dist/hooks/preemptive-compaction-types.d.ts +53 -0
- package/dist/hooks/preemptive-compaction.d.ts +5 -13
- package/dist/hooks/prometheus-md-only/constants.d.ts +1 -1
- package/dist/hooks/prometheus-md-only/path-policy.d.ts +3 -3
- package/dist/hooks/read-image-resizer/hook.d.ts +12 -0
- package/dist/hooks/read-image-resizer/image-dimensions.d.ts +2 -0
- package/dist/hooks/read-image-resizer/image-resizer.d.ts +5 -0
- package/dist/hooks/read-image-resizer/index.d.ts +1 -0
- package/dist/hooks/read-image-resizer/png-fallback-resizer.d.ts +2 -0
- package/dist/hooks/read-image-resizer/types.d.ts +14 -0
- package/dist/hooks/runtime-fallback/agent-resolver.d.ts +6 -0
- package/dist/hooks/runtime-fallback/auto-retry-signal.d.ts +4 -0
- package/dist/hooks/runtime-fallback/auto-retry.d.ts +10 -0
- package/dist/hooks/runtime-fallback/chat-message-handler.d.ts +20 -0
- package/dist/hooks/runtime-fallback/constants.d.ts +4 -0
- package/dist/hooks/runtime-fallback/error-classifier.d.ts +13 -0
- package/dist/hooks/runtime-fallback/event-handler.d.ts +8 -0
- package/dist/hooks/runtime-fallback/fallback-bootstrap-model.d.ts +10 -0
- package/dist/hooks/runtime-fallback/fallback-models.d.ts +2 -0
- package/dist/hooks/runtime-fallback/fallback-retry-dispatcher.d.ts +11 -0
- package/dist/hooks/runtime-fallback/fallback-state.d.ts +6 -0
- package/dist/hooks/runtime-fallback/hook.d.ts +2 -0
- package/dist/hooks/runtime-fallback/index.d.ts +3 -0
- package/dist/hooks/runtime-fallback/is-abort-error.d.ts +1 -0
- package/dist/hooks/runtime-fallback/last-user-retry-parts.d.ts +4 -0
- package/dist/hooks/runtime-fallback/message-update-handler.d.ts +4 -0
- package/dist/hooks/runtime-fallback/model-utils.d.ts +7 -0
- package/dist/hooks/runtime-fallback/retry-model-payload.d.ts +11 -0
- package/dist/hooks/runtime-fallback/retry-status-utils.d.ts +2 -0
- package/dist/hooks/runtime-fallback/session-category-registry.d.ts +6 -0
- package/dist/hooks/runtime-fallback/session-messages.d.ts +9 -0
- package/dist/hooks/runtime-fallback/session-status-handler.d.ts +3 -0
- package/dist/hooks/runtime-fallback/types.d.ts +113 -0
- package/dist/hooks/runtime-fallback/visible-assistant-response.d.ts +3 -0
- package/dist/hooks/shared/compaction-model-resolver.d.ts +5 -0
- package/dist/hooks/todo-description-override/description.d.ts +1 -0
- package/dist/hooks/todo-description-override/hook.d.ts +8 -0
- package/dist/hooks/todo-description-override/index.d.ts +1 -0
- package/dist/hooks/tool-pair-validator/hook.d.ts +28 -0
- package/dist/hooks/tool-pair-validator/index.d.ts +1 -0
- package/dist/hooks/webfetch-redirect-guard/constants.d.ts +6 -0
- package/dist/hooks/webfetch-redirect-guard/hook.d.ts +19 -0
- package/dist/hooks/webfetch-redirect-guard/index.d.ts +1 -0
- package/dist/hooks/webfetch-redirect-guard/redirect-resolution.d.ts +16 -0
- package/dist/index.js +5562 -792
- package/dist/plugin/hooks/create-core-hooks.d.ts +6 -0
- package/dist/plugin/hooks/create-session-hooks.d.ts +2 -1
- package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +5 -1
- package/dist/plugin/hooks/create-transform-hooks.d.ts +2 -1
- package/dist/plugin/tool-definition.d.ts +9 -0
- package/dist/shared/context-limit-resolver.d.ts +5 -0
- package/dist/shared/session-model-state.d.ts +7 -0
- package/dist/shared/tmux/tmux-utils/spawn-process.d.ts +1 -0
- package/dist/tools/ast-grep/pattern-hints.d.ts +4 -0
- package/dist/tools/ast-grep/tool-descriptions.d.ts +3 -0
- package/dist/tools/delegate-task/constants.d.ts +2 -3
- package/dist/tools/delegate-task/prompt-builder.d.ts +1 -0
- package/package.json +28 -15
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const MESSAGE_KINDS: readonly ["message", "shutdown_request", "shutdown_approved", "shutdown_rejected", "announcement"];
|
|
3
|
+
export declare const MEMBER_KINDS: readonly ["category", "subagent_type"];
|
|
4
|
+
export declare const TASK_STATUSES: readonly ["pending", "claimed", "in_progress", "completed", "deleted"];
|
|
5
|
+
export declare const RUNTIME_STATUSES: readonly ["creating", "active", "shutdown_requested", "deleting", "deleted", "failed", "orphaned"];
|
|
6
|
+
export declare const CategoryMemberSchema: z.ZodObject<{
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
9
|
+
worktreePath: z.ZodOptional<z.ZodString>;
|
|
10
|
+
subscriptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
11
|
+
backendType: z.ZodDefault<z.ZodEnum<{
|
|
12
|
+
tmux: "tmux";
|
|
13
|
+
"in-process": "in-process";
|
|
14
|
+
}>>;
|
|
15
|
+
color: z.ZodOptional<z.ZodString>;
|
|
16
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
17
|
+
kind: z.ZodLiteral<"category">;
|
|
18
|
+
category: z.ZodString;
|
|
19
|
+
prompt: z.ZodString;
|
|
20
|
+
}, z.core.$strict>;
|
|
21
|
+
export declare const SubagentMemberSchema: z.ZodObject<{
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
24
|
+
worktreePath: z.ZodOptional<z.ZodString>;
|
|
25
|
+
subscriptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
26
|
+
backendType: z.ZodDefault<z.ZodEnum<{
|
|
27
|
+
tmux: "tmux";
|
|
28
|
+
"in-process": "in-process";
|
|
29
|
+
}>>;
|
|
30
|
+
color: z.ZodOptional<z.ZodString>;
|
|
31
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
32
|
+
kind: z.ZodLiteral<"subagent_type">;
|
|
33
|
+
subagent_type: z.ZodString;
|
|
34
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
export declare const MemberSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
37
|
+
name: z.ZodString;
|
|
38
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
39
|
+
worktreePath: z.ZodOptional<z.ZodString>;
|
|
40
|
+
subscriptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
|
+
backendType: z.ZodDefault<z.ZodEnum<{
|
|
42
|
+
tmux: "tmux";
|
|
43
|
+
"in-process": "in-process";
|
|
44
|
+
}>>;
|
|
45
|
+
color: z.ZodOptional<z.ZodString>;
|
|
46
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
47
|
+
kind: z.ZodLiteral<"category">;
|
|
48
|
+
category: z.ZodString;
|
|
49
|
+
prompt: z.ZodString;
|
|
50
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
51
|
+
name: z.ZodString;
|
|
52
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
53
|
+
worktreePath: z.ZodOptional<z.ZodString>;
|
|
54
|
+
subscriptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
55
|
+
backendType: z.ZodDefault<z.ZodEnum<{
|
|
56
|
+
tmux: "tmux";
|
|
57
|
+
"in-process": "in-process";
|
|
58
|
+
}>>;
|
|
59
|
+
color: z.ZodOptional<z.ZodString>;
|
|
60
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
61
|
+
kind: z.ZodLiteral<"subagent_type">;
|
|
62
|
+
subagent_type: z.ZodString;
|
|
63
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
64
|
+
}, z.core.$strict>], "kind">;
|
|
65
|
+
export declare const TeamSpecSchema: z.ZodObject<{
|
|
66
|
+
version: z.ZodLiteral<1>;
|
|
67
|
+
name: z.ZodString;
|
|
68
|
+
description: z.ZodOptional<z.ZodString>;
|
|
69
|
+
createdAt: z.ZodNumber;
|
|
70
|
+
leadAgentId: z.ZodString;
|
|
71
|
+
teamAllowedPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
72
|
+
sessionPermission: z.ZodOptional<z.ZodString>;
|
|
73
|
+
members: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
74
|
+
name: z.ZodString;
|
|
75
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
76
|
+
worktreePath: z.ZodOptional<z.ZodString>;
|
|
77
|
+
subscriptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
78
|
+
backendType: z.ZodDefault<z.ZodEnum<{
|
|
79
|
+
tmux: "tmux";
|
|
80
|
+
"in-process": "in-process";
|
|
81
|
+
}>>;
|
|
82
|
+
color: z.ZodOptional<z.ZodString>;
|
|
83
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
84
|
+
kind: z.ZodLiteral<"category">;
|
|
85
|
+
category: z.ZodString;
|
|
86
|
+
prompt: z.ZodString;
|
|
87
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
88
|
+
name: z.ZodString;
|
|
89
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
90
|
+
worktreePath: z.ZodOptional<z.ZodString>;
|
|
91
|
+
subscriptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
92
|
+
backendType: z.ZodDefault<z.ZodEnum<{
|
|
93
|
+
tmux: "tmux";
|
|
94
|
+
"in-process": "in-process";
|
|
95
|
+
}>>;
|
|
96
|
+
color: z.ZodOptional<z.ZodString>;
|
|
97
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
98
|
+
kind: z.ZodLiteral<"subagent_type">;
|
|
99
|
+
subagent_type: z.ZodString;
|
|
100
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
101
|
+
}, z.core.$strict>], "kind">>;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
export declare const MessageSchema: z.ZodObject<{
|
|
104
|
+
version: z.ZodLiteral<1>;
|
|
105
|
+
messageId: z.ZodString;
|
|
106
|
+
from: z.ZodString;
|
|
107
|
+
to: z.ZodString;
|
|
108
|
+
kind: z.ZodEnum<{
|
|
109
|
+
message: "message";
|
|
110
|
+
shutdown_request: "shutdown_request";
|
|
111
|
+
shutdown_approved: "shutdown_approved";
|
|
112
|
+
shutdown_rejected: "shutdown_rejected";
|
|
113
|
+
announcement: "announcement";
|
|
114
|
+
}>;
|
|
115
|
+
body: z.ZodString;
|
|
116
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
117
|
+
references: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
118
|
+
path: z.ZodString;
|
|
119
|
+
description: z.ZodOptional<z.ZodString>;
|
|
120
|
+
}, z.core.$strict>>>;
|
|
121
|
+
timestamp: z.ZodNumber;
|
|
122
|
+
correlationId: z.ZodOptional<z.ZodString>;
|
|
123
|
+
color: z.ZodOptional<z.ZodString>;
|
|
124
|
+
}, z.core.$strip>;
|
|
125
|
+
export declare const TaskSchema: z.ZodObject<{
|
|
126
|
+
version: z.ZodLiteral<1>;
|
|
127
|
+
id: z.ZodString;
|
|
128
|
+
subject: z.ZodString;
|
|
129
|
+
description: z.ZodString;
|
|
130
|
+
activeForm: z.ZodOptional<z.ZodString>;
|
|
131
|
+
status: z.ZodEnum<{
|
|
132
|
+
pending: "pending";
|
|
133
|
+
in_progress: "in_progress";
|
|
134
|
+
completed: "completed";
|
|
135
|
+
deleted: "deleted";
|
|
136
|
+
claimed: "claimed";
|
|
137
|
+
}>;
|
|
138
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
139
|
+
blocks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
140
|
+
blockedBy: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
141
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
142
|
+
createdAt: z.ZodNumber;
|
|
143
|
+
updatedAt: z.ZodNumber;
|
|
144
|
+
claimedAt: z.ZodOptional<z.ZodNumber>;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
export declare const RuntimeStateSchema: z.ZodObject<{
|
|
147
|
+
version: z.ZodLiteral<1>;
|
|
148
|
+
teamRunId: z.ZodString;
|
|
149
|
+
teamName: z.ZodString;
|
|
150
|
+
specSource: z.ZodEnum<{
|
|
151
|
+
user: "user";
|
|
152
|
+
project: "project";
|
|
153
|
+
}>;
|
|
154
|
+
createdAt: z.ZodNumber;
|
|
155
|
+
status: z.ZodEnum<{
|
|
156
|
+
deleted: "deleted";
|
|
157
|
+
active: "active";
|
|
158
|
+
failed: "failed";
|
|
159
|
+
creating: "creating";
|
|
160
|
+
shutdown_requested: "shutdown_requested";
|
|
161
|
+
deleting: "deleting";
|
|
162
|
+
orphaned: "orphaned";
|
|
163
|
+
}>;
|
|
164
|
+
leadSessionId: z.ZodOptional<z.ZodString>;
|
|
165
|
+
members: z.ZodArray<z.ZodObject<{
|
|
166
|
+
name: z.ZodString;
|
|
167
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
168
|
+
tmuxPaneId: z.ZodOptional<z.ZodString>;
|
|
169
|
+
agentType: z.ZodEnum<{
|
|
170
|
+
leader: "leader";
|
|
171
|
+
"general-purpose": "general-purpose";
|
|
172
|
+
}>;
|
|
173
|
+
status: z.ZodEnum<{
|
|
174
|
+
pending: "pending";
|
|
175
|
+
completed: "completed";
|
|
176
|
+
running: "running";
|
|
177
|
+
idle: "idle";
|
|
178
|
+
shutdown_approved: "shutdown_approved";
|
|
179
|
+
errored: "errored";
|
|
180
|
+
}>;
|
|
181
|
+
color: z.ZodOptional<z.ZodString>;
|
|
182
|
+
worktreePath: z.ZodOptional<z.ZodString>;
|
|
183
|
+
lastInjectedTurnMarker: z.ZodOptional<z.ZodString>;
|
|
184
|
+
pendingInjectedMessageIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
185
|
+
}, z.core.$strict>>;
|
|
186
|
+
shutdownRequests: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
187
|
+
memberId: z.ZodString;
|
|
188
|
+
requestedAt: z.ZodNumber;
|
|
189
|
+
approvedAt: z.ZodOptional<z.ZodNumber>;
|
|
190
|
+
rejectedReason: z.ZodOptional<z.ZodString>;
|
|
191
|
+
}, z.core.$strict>>>;
|
|
192
|
+
bounds: z.ZodObject<{
|
|
193
|
+
maxMembers: z.ZodDefault<z.ZodNumber>;
|
|
194
|
+
maxParallelMembers: z.ZodDefault<z.ZodNumber>;
|
|
195
|
+
maxMessagesPerRun: z.ZodDefault<z.ZodNumber>;
|
|
196
|
+
maxWallClockMinutes: z.ZodDefault<z.ZodNumber>;
|
|
197
|
+
maxMemberTurns: z.ZodDefault<z.ZodNumber>;
|
|
198
|
+
}, z.core.$strict>;
|
|
199
|
+
}, z.core.$strip>;
|
|
200
|
+
export declare const AGENT_ELIGIBILITY_REGISTRY: Readonly<Record<string, {
|
|
201
|
+
verdict: "eligible" | "conditional" | "hard-reject";
|
|
202
|
+
rejectionMessage?: string;
|
|
203
|
+
}>>;
|
|
204
|
+
export type TeamSpec = z.infer<typeof TeamSpecSchema>;
|
|
205
|
+
export type Member = z.infer<typeof MemberSchema>;
|
|
206
|
+
export type CategoryMember = z.infer<typeof CategoryMemberSchema>;
|
|
207
|
+
export type SubagentMember = z.infer<typeof SubagentMemberSchema>;
|
|
208
|
+
export type Message = z.infer<typeof MessageSchema>;
|
|
209
|
+
export type Task = z.infer<typeof TaskSchema>;
|
|
210
|
+
export type RuntimeState = z.infer<typeof RuntimeStateSchema>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const HANDOFF_FILENAME = "handoff.md";
|
|
2
2
|
export declare const HANDOFF_CONSUMED_FILENAME = "handoff.consumed.md";
|
|
3
|
-
export declare const HANDOFF_FILE_PATH = ".
|
|
4
|
-
export declare const HANDOFF_CONSUMED_FILE_PATH = ".
|
|
3
|
+
export declare const HANDOFF_FILE_PATH = ".matrixx/handoff.md";
|
|
4
|
+
export declare const HANDOFF_CONSUMED_FILE_PATH = ".matrixx/handoff.consumed.md";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
interface HashlineEditDiffEnhancerConfig {
|
|
2
|
+
hashline_edit?: {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
};
|
|
5
|
+
}
|
|
6
|
+
type BeforeInput = {
|
|
7
|
+
tool: string;
|
|
8
|
+
sessionID: string;
|
|
9
|
+
callID: string;
|
|
10
|
+
};
|
|
11
|
+
type BeforeOutput = {
|
|
12
|
+
args: Record<string, unknown>;
|
|
13
|
+
};
|
|
14
|
+
type AfterInput = {
|
|
15
|
+
tool: string;
|
|
16
|
+
sessionID: string;
|
|
17
|
+
callID: string;
|
|
18
|
+
};
|
|
19
|
+
type AfterOutput = {
|
|
20
|
+
title: string;
|
|
21
|
+
output: string;
|
|
22
|
+
metadata: Record<string, unknown>;
|
|
23
|
+
};
|
|
24
|
+
export declare function createHashlineEditDiffEnhancerHook(config: HashlineEditDiffEnhancerConfig): {
|
|
25
|
+
"tool.execute.before": (input: BeforeInput, output: BeforeOutput) => Promise<void>;
|
|
26
|
+
"tool.execute.after": (input: AfterInput, output: AfterOutput) => Promise<void>;
|
|
27
|
+
};
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createHashlineEditDiffEnhancerHook } from "./hook";
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -45,3 +45,9 @@ export { createSecretLeakGuardHook } from "./secret-leak-guard";
|
|
|
45
45
|
export { createEnvFileWriteGuardHook } from "./env-file-write-guard";
|
|
46
46
|
export { createJsonErrorRecoveryHook } from "./json-error-recovery";
|
|
47
47
|
export { createBashFileReadGuardHook } from "./bash-file-read-guard";
|
|
48
|
+
export { createTodoDescriptionOverrideHook } from "./todo-description-override";
|
|
49
|
+
export { createReadImageResizerHook } from "./read-image-resizer";
|
|
50
|
+
export { createRuntimeFallbackHook, type RuntimeFallbackHook, type RuntimeFallbackOptions, SessionCategoryRegistry } from "./runtime-fallback";
|
|
51
|
+
export { createWebFetchRedirectGuardHook } from "./webfetch-redirect-guard";
|
|
52
|
+
export { createHashlineEditDiffEnhancerHook } from "./hashline-edit-diff-enhancer";
|
|
53
|
+
export { createToolPairValidatorHook } from "./tool-pair-validator";
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Ultrawork message section for planner agents (Oracle).
|
|
3
3
|
* Planner agents should NOT be told to call plan agent - they ARE the planner.
|
|
4
4
|
*/
|
|
5
|
-
export declare const ULTRAWORK_PLANNER_SECTION = "## CRITICAL: YOU ARE A PLANNER, NOT AN IMPLEMENTER\n\n**IDENTITY CONSTRAINT (NON-NEGOTIABLE):**\nYou ARE the planner. You ARE NOT an implementer. You DO NOT write code. You DO NOT execute tasks.\n\n**TOOL RESTRICTIONS (SYSTEM-ENFORCED):**\n| Tool | Allowed | Blocked |\n|------|---------|---------|\n| Write/Edit | `.
|
|
5
|
+
export declare const ULTRAWORK_PLANNER_SECTION = "## CRITICAL: YOU ARE A PLANNER, NOT AN IMPLEMENTER\n\n**IDENTITY CONSTRAINT (NON-NEGOTIABLE):**\nYou ARE the planner. You ARE NOT an implementer. You DO NOT write code. You DO NOT execute tasks.\n\n**TOOL RESTRICTIONS (SYSTEM-ENFORCED):**\n| Tool | Allowed | Blocked |\n|------|---------|---------|\n| Write/Edit | `.matrixx/**/*.md` ONLY | Everything else |\n| Read | All files | - |\n| Bash | Research commands only | Implementation commands |\n| task | explore, librarian | - |\n\n**IF YOU TRY TO WRITE/EDIT OUTSIDE `.matrixx/`:**\n- System will BLOCK your action\n- You will receive an error\n- DO NOT retry - you are not supposed to implement\n\n**YOUR ONLY WRITABLE PATHS:**\n- `.matrixx/plans/*.md` - Final work plans\n- `.matrixx/drafts/*.md` - Working drafts during interview\n\n**WHEN USER ASKS YOU TO IMPLEMENT:**\nREFUSE. Say: \"I'm a planner. I create work plans, not implementations. Run `/start-work` after I finish planning.\"\n\n---\n\n## CONTEXT GATHERING (MANDATORY BEFORE PLANNING)\n\nYou ARE the planner. Your job: create bulletproof work plans.\n**Before drafting ANY plan, gather context via explore/librarian agents.**\n\n### Research Protocol\n1. **Fire parallel background agents** for comprehensive context:\n ```\n task(subagent_type=\"trinity\", load_skills=[], prompt=\"Find existing patterns for [topic] in codebase\", run_in_background=true)\n task(subagent_type=\"trinity\", load_skills=[], prompt=\"Find test infrastructure and conventions\", run_in_background=true)\n task(subagent_type=\"operator\", load_skills=[], prompt=\"Find official docs and best practices for [technology]\", run_in_background=true)\n ```\n2. **Wait for results** before planning - rushed plans fail\n3. **Synthesize findings** into informed requirements\n\n### What to Research\n- Existing codebase patterns and conventions\n- Test infrastructure (TDD possible?)\n- External library APIs and constraints\n- Similar implementations in OSS (via librarian)\n\n**NEVER plan blind. Context first, plan second.**\n\n---\n\n## MANDATORY OUTPUT: PARALLEL TASK GRAPH + TODO LIST\n\n**YOUR PRIMARY OUTPUT IS A PARALLEL EXECUTION TASK GRAPH.**\n\nWhen you finalize a plan, you MUST structure it for maximum parallel execution:\n\n### 1. Parallel Execution Waves (REQUIRED)\n\nAnalyze task dependencies and group independent tasks into parallel waves:\n\n```\nWave 1 (Start Immediately - No Dependencies):\n\u251C\u2500\u2500 Task 1: [description] \u2192 category: X, skills: [a, b]\n\u2514\u2500\u2500 Task 4: [description] \u2192 category: Y, skills: [c]\n\nWave 2 (After Wave 1 Completes):\n\u251C\u2500\u2500 Task 2: [depends: 1] \u2192 category: X, skills: [a]\n\u251C\u2500\u2500 Task 3: [depends: 1] \u2192 category: Z, skills: [d]\n\u2514\u2500\u2500 Task 5: [depends: 4] \u2192 category: Y, skills: [c]\n\nWave 3 (After Wave 2 Completes):\n\u2514\u2500\u2500 Task 6: [depends: 2, 3] \u2192 category: X, skills: [a, b]\n\nCritical Path: Task 1 \u2192 Task 2 \u2192 Task 6\nEstimated Parallel Speedup: ~40% faster than sequential\n```\n\n### 2. Dependency Matrix (REQUIRED)\n\n| Task | Depends On | Blocks | Can Parallelize With |\n|------|------------|--------|---------------------|\n| 1 | None | 2, 3 | 4 |\n| 2 | 1 | 6 | 3, 5 |\n| 3 | 1 | 6 | 2, 5 |\n| 4 | None | 5 | 1 |\n| 5 | 4 | None | 2, 3 |\n| 6 | 2, 3 | None | None (final) |\n\n### 3. TODO List Structure (REQUIRED)\n\nEach TODO item MUST include:\n\n```markdown\n- [ ] N. [Task Title]\n\n **What to do**: [Clear steps]\n \n **Dependencies**: [Task numbers this depends on] | None\n **Blocks**: [Task numbers that depend on this]\n **Parallel Group**: Wave N (with Tasks X, Y)\n \n **Recommended Agent Profile**:\n - **Category**: `[construct | source | matrix-bend | quick | blue-pill | red-pill | writing]`\n - **Skills**: [`skill-1`, `skill-2`]\n \n **Acceptance Criteria**: [Verifiable conditions]\n```\n\n### 4. Agent Dispatch Summary (REQUIRED)\n\n| Wave | Tasks | Dispatch Command |\n|------|-------|------------------|\n| 1 | 1, 4 | `task(category=\"...\", load_skills=[...], run_in_background=false)` \u00D7 2 |\n| 2 | 2, 3, 5 | `task(...)` \u00D7 3 after Wave 1 completes |\n| 3 | 6 | `task(...)` final integration |\n\n**WHY PARALLEL TASK GRAPH IS MANDATORY:**\n- Orchestrator (Morpheus) executes tasks in parallel waves\n- Independent tasks run simultaneously via background agents\n- Proper dependency tracking prevents race conditions\n- Category + skills ensure optimal model routing per task";
|
|
6
6
|
export declare function getPlannerUltraworkMessage(): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const HOOK_NAME = "matrix-loop";
|
|
2
|
-
export declare const DEFAULT_STATE_FILE = ".
|
|
2
|
+
export declare const DEFAULT_STATE_FILE = ".matrixx/matrix-loop.local.md";
|
|
3
3
|
export declare const COMPLETION_TAG_PATTERN: RegExp;
|
|
4
4
|
export declare const DEFAULT_MAX_ITERATIONS = 100;
|
|
5
5
|
export declare const DEFAULT_COMPLETION_PROMISE = "DONE";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const HOOK_NAME = "sisyphus-junior-notepad";
|
|
2
|
-
export declare const NOTEPAD_DIRECTIVE = "\n<Work_Context>\n## Notepad Location (for recording learnings)\nNOTEPAD PATH: .
|
|
2
|
+
export declare const NOTEPAD_DIRECTIVE = "\n<Work_Context>\n## Notepad Location (for recording learnings)\nNOTEPAD PATH: .matrixx/notepads/{plan-name}/\n- learnings.md: Record patterns, conventions, successful approaches\n- issues.md: Record problems, blockers, gotchas encountered\n- decisions.md: Record architectural choices and rationales\n- problems.md: Record unresolved issues, technical debt\n\nYou SHOULD append findings to notepad files after completing work.\nIMPORTANT: Always APPEND to notepad files - never overwrite or use Edit tool.\n\n## Plan Location (READ ONLY)\nPLAN PATH: .matrixx/plans/{plan-name}.md\n\nCRITICAL RULE: NEVER MODIFY THE PLAN FILE\n\nThe plan file (.matrixx/plans/*.md) is SACRED and READ-ONLY.\n- You may READ the plan to understand tasks\n- You may READ checkbox items to know what to do\n- You MUST NOT edit, modify, or update the plan file\n- You MUST NOT mark checkboxes as complete in the plan\n- Only the Orchestrator manages the plan file\n\nVIOLATION = IMMEDIATE FAILURE. The Orchestrator tracks plan state.\n</Work_Context>\n";
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { MatrixxConfig } from "../config";
|
|
2
|
+
interface CompactionTargetState {
|
|
3
|
+
providerID: string;
|
|
4
|
+
modelID: string;
|
|
5
|
+
}
|
|
6
|
+
interface ClientLike {
|
|
7
|
+
session: {
|
|
8
|
+
summarize: (input: {
|
|
9
|
+
path: {
|
|
10
|
+
id: string;
|
|
11
|
+
};
|
|
12
|
+
body: {
|
|
13
|
+
providerID: string;
|
|
14
|
+
modelID: string;
|
|
15
|
+
};
|
|
16
|
+
query: {
|
|
17
|
+
directory: string;
|
|
18
|
+
};
|
|
19
|
+
}) => Promise<unknown>;
|
|
20
|
+
messages: (input: {
|
|
21
|
+
path: {
|
|
22
|
+
id: string;
|
|
23
|
+
};
|
|
24
|
+
query?: {
|
|
25
|
+
directory: string;
|
|
26
|
+
};
|
|
27
|
+
}) => Promise<unknown>;
|
|
28
|
+
};
|
|
29
|
+
tui: {
|
|
30
|
+
showToast: (input: {
|
|
31
|
+
body: {
|
|
32
|
+
title: string;
|
|
33
|
+
message: string;
|
|
34
|
+
variant: "warning";
|
|
35
|
+
duration: number;
|
|
36
|
+
};
|
|
37
|
+
}) => Promise<unknown>;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export interface AssistantCompactionMessageInfo {
|
|
41
|
+
sessionID: string;
|
|
42
|
+
id?: string;
|
|
43
|
+
}
|
|
44
|
+
export declare function createPostCompactionDegradationMonitor(args: {
|
|
45
|
+
client: ClientLike;
|
|
46
|
+
directory: string;
|
|
47
|
+
pluginConfig: MatrixxConfig;
|
|
48
|
+
tokenCache: Map<string, CompactionTargetState>;
|
|
49
|
+
compactionInProgress: Set<string>;
|
|
50
|
+
}): {
|
|
51
|
+
clear: (sessionID: string) => void;
|
|
52
|
+
onSessionCompacted: (sessionID: string) => void;
|
|
53
|
+
onAssistantMessageUpdated: (info: AssistantCompactionMessageInfo) => Promise<void>;
|
|
54
|
+
};
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare function isStepOnlyNoTextParts(parts: unknown): boolean;
|
|
2
|
+
export declare function resolveNoTextTailFromSession(args: {
|
|
3
|
+
client: {
|
|
4
|
+
session: {
|
|
5
|
+
messages: (input: {
|
|
6
|
+
path: {
|
|
7
|
+
id: string;
|
|
8
|
+
};
|
|
9
|
+
query?: {
|
|
10
|
+
directory: string;
|
|
11
|
+
};
|
|
12
|
+
}) => Promise<unknown>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
sessionID: string;
|
|
16
|
+
messageID?: string;
|
|
17
|
+
directory: string;
|
|
18
|
+
}): Promise<boolean>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MatrixxConfig } from "../config";
|
|
2
|
+
import { type ContextLimitModelCacheState } from "../shared/context-limit-resolver";
|
|
3
|
+
import type { CachedCompactionState, PreemptiveCompactionContext } from "./preemptive-compaction-types";
|
|
4
|
+
export declare function runPreemptiveCompactionIfNeeded(args: {
|
|
5
|
+
ctx: PreemptiveCompactionContext;
|
|
6
|
+
pluginConfig: MatrixxConfig;
|
|
7
|
+
modelCacheState?: ContextLimitModelCacheState;
|
|
8
|
+
sessionID: string;
|
|
9
|
+
tokenCache: Map<string, CachedCompactionState>;
|
|
10
|
+
compactionInProgress: Set<string>;
|
|
11
|
+
compactedSessions: Set<string>;
|
|
12
|
+
lastCompactionTime: Map<string, number>;
|
|
13
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export interface TokenInfo {
|
|
2
|
+
input: number;
|
|
3
|
+
output: number;
|
|
4
|
+
reasoning: number;
|
|
5
|
+
cache: {
|
|
6
|
+
read: number;
|
|
7
|
+
write: number;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface CachedCompactionState {
|
|
11
|
+
providerID: string;
|
|
12
|
+
modelID: string;
|
|
13
|
+
tokens: TokenInfo;
|
|
14
|
+
}
|
|
15
|
+
export interface PreemptiveCompactionClient {
|
|
16
|
+
session: {
|
|
17
|
+
messages: (input: {
|
|
18
|
+
path: {
|
|
19
|
+
id: string;
|
|
20
|
+
};
|
|
21
|
+
query?: {
|
|
22
|
+
directory: string;
|
|
23
|
+
};
|
|
24
|
+
}) => Promise<unknown>;
|
|
25
|
+
summarize: (input: {
|
|
26
|
+
path: {
|
|
27
|
+
id: string;
|
|
28
|
+
};
|
|
29
|
+
body: {
|
|
30
|
+
providerID: string;
|
|
31
|
+
modelID: string;
|
|
32
|
+
auto?: boolean;
|
|
33
|
+
};
|
|
34
|
+
query: {
|
|
35
|
+
directory: string;
|
|
36
|
+
};
|
|
37
|
+
}) => Promise<unknown>;
|
|
38
|
+
};
|
|
39
|
+
tui: {
|
|
40
|
+
showToast: (input: {
|
|
41
|
+
body: {
|
|
42
|
+
title: string;
|
|
43
|
+
message: string;
|
|
44
|
+
variant: "warning";
|
|
45
|
+
duration: number;
|
|
46
|
+
};
|
|
47
|
+
}) => Promise<unknown>;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export interface PreemptiveCompactionContext {
|
|
51
|
+
client: PreemptiveCompactionClient;
|
|
52
|
+
directory: string;
|
|
53
|
+
}
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
tui: {
|
|
8
|
-
showToast: (...args: any[]) => any;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
directory: string;
|
|
12
|
-
};
|
|
13
|
-
export declare function createPreemptiveCompactionHook(ctx: PluginInput): {
|
|
1
|
+
import type { MatrixxConfig } from "../config";
|
|
2
|
+
import type { ContextLimitModelCacheState } from "../shared/context-limit-resolver";
|
|
3
|
+
import type { PreemptiveCompactionContext } from "./preemptive-compaction-types";
|
|
4
|
+
type PluginInput = PreemptiveCompactionContext;
|
|
5
|
+
export declare function createPreemptiveCompactionHook(ctx: PluginInput, pluginConfig?: MatrixxConfig, modelCacheState?: ContextLimitModelCacheState): {
|
|
14
6
|
"tool.execute.after": (input: {
|
|
15
7
|
tool: string;
|
|
16
8
|
sessionID: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const HOOK_NAME = "prometheus-md-only";
|
|
2
2
|
export declare const ORACLE_AGENT = "oracle";
|
|
3
3
|
export declare const ALLOWED_EXTENSIONS: string[];
|
|
4
|
-
export declare const ALLOWED_PATH_PREFIX = ".
|
|
4
|
+
export declare const ALLOWED_PATH_PREFIX = ".matrixx";
|
|
5
5
|
export declare const BLOCKED_TOOLS: string[];
|
|
6
6
|
export declare const PLANNING_CONSULT_WARNING: string;
|
|
7
7
|
export declare const PROMETHEUS_WORKFLOW_REMINDER: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cross-platform path validator for Oracle file writes.
|
|
3
3
|
* Uses path.resolve/relative instead of string matching to handle:
|
|
4
|
-
* - Windows backslashes (e.g., .
|
|
5
|
-
* - Mixed separators (e.g., .
|
|
4
|
+
* - Windows backslashes (e.g., .matrixx\\plans\\x.md)
|
|
5
|
+
* - Mixed separators (e.g., .matrixx\\plans/x.md)
|
|
6
6
|
* - Case-insensitive directory/extension matching
|
|
7
7
|
* - Workspace confinement (blocks paths outside root or via traversal)
|
|
8
|
-
* - Nested project paths (e.g., parent/.
|
|
8
|
+
* - Nested project paths (e.g., parent/.matrixx/... when ctx.directory is parent)
|
|
9
9
|
*/
|
|
10
10
|
export declare function isAllowedFile(filePath: string, workspaceRoot: string): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
export declare function createReadImageResizerHook(_ctx: PluginInput): {
|
|
3
|
+
"tool.execute.after": (input: {
|
|
4
|
+
tool: string;
|
|
5
|
+
sessionID: string;
|
|
6
|
+
callID: string;
|
|
7
|
+
}, output: {
|
|
8
|
+
title: string;
|
|
9
|
+
output: string;
|
|
10
|
+
metadata: unknown;
|
|
11
|
+
}) => Promise<void>;
|
|
12
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ImageDimensions, ResizeResult } from "./types";
|
|
2
|
+
export declare function calculateTargetDimensions(width: number, height: number, maxLongEdge?: number): ImageDimensions | null;
|
|
3
|
+
export declare function resizeImage(base64DataUrl: string, mimeType: string, target: ImageDimensions, deps?: {
|
|
4
|
+
loadSharpModule?: () => Promise<unknown | null>;
|
|
5
|
+
}): Promise<ResizeResult | null>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createReadImageResizerHook } from "./hook";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ImageDimensions {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
}
|
|
5
|
+
export interface ImageAttachment {
|
|
6
|
+
mime: string;
|
|
7
|
+
url: string;
|
|
8
|
+
filename?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ResizeResult {
|
|
11
|
+
resizedDataUrl: string;
|
|
12
|
+
original: ImageDimensions;
|
|
13
|
+
resized: ImageDimensions;
|
|
14
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const AGENT_NAMES: string[];
|
|
2
|
+
export declare const agentPattern: RegExp;
|
|
3
|
+
export declare function detectAgentFromSession(sessionID: string): string | undefined;
|
|
4
|
+
export declare function normalizeAgentName(agent: string | undefined): string | undefined;
|
|
5
|
+
export declare function resolveAgentForSession(sessionID: string, eventAgent?: string): string | undefined;
|
|
6
|
+
export declare function resolveRegisteredAgentName(agent: string | undefined): string | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HookDeps } from "./types";
|
|
2
|
+
export declare function createAutoRetryHelpers(deps: HookDeps): {
|
|
3
|
+
abortSessionRequest: (sessionID: string, source: string) => Promise<void>;
|
|
4
|
+
clearSessionFallbackTimeout: (sessionID: string) => void;
|
|
5
|
+
scheduleSessionFallbackTimeout: (sessionID: string, resolvedAgent?: string) => void;
|
|
6
|
+
autoRetryWithFallback: (sessionID: string, newModel: string, resolvedAgent: string | undefined, source: string) => Promise<void>;
|
|
7
|
+
resolveAgentForSessionFromContext: (sessionID: string, eventAgent?: string) => Promise<string | undefined>;
|
|
8
|
+
cleanupStaleSessions: () => void;
|
|
9
|
+
};
|
|
10
|
+
export type AutoRetryHelpers = ReturnType<typeof createAutoRetryHelpers>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HookDeps } from "./types";
|
|
2
|
+
export declare function createChatMessageHandler(deps: HookDeps): (input: {
|
|
3
|
+
sessionID: string;
|
|
4
|
+
agent?: string;
|
|
5
|
+
model?: {
|
|
6
|
+
providerID: string;
|
|
7
|
+
modelID: string;
|
|
8
|
+
};
|
|
9
|
+
}, output: {
|
|
10
|
+
message: {
|
|
11
|
+
model?: {
|
|
12
|
+
providerID: string;
|
|
13
|
+
modelID: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
parts?: Array<{
|
|
17
|
+
type: string;
|
|
18
|
+
text?: string;
|
|
19
|
+
}>;
|
|
20
|
+
}) => Promise<void>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { extractAutoRetrySignal } from "./auto-retry-signal";
|
|
2
|
+
export declare function getErrorMessage(error: unknown): string;
|
|
3
|
+
export declare function extractStatusCode(error: unknown, retryOnErrors?: number[]): number | undefined;
|
|
4
|
+
export declare function extractErrorName(error: unknown): string | undefined;
|
|
5
|
+
export declare function classifyErrorType(error: unknown): string | undefined;
|
|
6
|
+
export declare function containsErrorContent(parts: Array<{
|
|
7
|
+
type?: string;
|
|
8
|
+
text?: string;
|
|
9
|
+
}> | undefined): {
|
|
10
|
+
hasError: boolean;
|
|
11
|
+
errorMessage?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function isRetryableError(error: unknown, retryOnErrors: number[]): boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HookDeps } from "./types";
|
|
2
|
+
import type { AutoRetryHelpers } from "./auto-retry";
|
|
3
|
+
export declare function createEventHandler(deps: HookDeps, helpers: AutoRetryHelpers): ({ event }: {
|
|
4
|
+
event: {
|
|
5
|
+
type: string;
|
|
6
|
+
properties?: unknown;
|
|
7
|
+
};
|
|
8
|
+
}) => Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MatrixxConfig } from "../../config";
|
|
2
|
+
type ResolveFallbackBootstrapModelOptions = {
|
|
3
|
+
sessionID: string;
|
|
4
|
+
source: string;
|
|
5
|
+
eventModel?: string;
|
|
6
|
+
resolvedAgent?: string;
|
|
7
|
+
pluginConfig?: MatrixxConfig;
|
|
8
|
+
};
|
|
9
|
+
export declare function resolveFallbackBootstrapModel(options: ResolveFallbackBootstrapModelOptions): string | undefined;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AutoRetryHelpers } from "./auto-retry";
|
|
2
|
+
import type { HookDeps, FallbackState } from "./types";
|
|
3
|
+
type DispatchFallbackRetryOptions = {
|
|
4
|
+
sessionID: string;
|
|
5
|
+
state: FallbackState;
|
|
6
|
+
fallbackModels: string[];
|
|
7
|
+
resolvedAgent?: string;
|
|
8
|
+
source: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function dispatchFallbackRetry(deps: HookDeps, helpers: AutoRetryHelpers, options: DispatchFallbackRetryOptions): Promise<void>;
|
|
11
|
+
export {};
|