sparkecoder 0.1.119 → 0.1.120
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/agent/index.d.ts +3 -3
- package/dist/agent/index.js +2 -0
- package/dist/agent/index.js.map +1 -1
- package/dist/cli.js +91 -10
- package/dist/cli.js.map +1 -1
- package/dist/db/index.d.ts +2 -2
- package/dist/{index-Bcz0aCAR.d.ts → index-DczYH89U.d.ts} +104 -104
- package/dist/index.d.ts +5 -5
- package/dist/index.js +91 -10
- package/dist/index.js.map +1 -1
- package/dist/{schema-BWbWmfDQ.d.ts → schema-DxrKyetI.d.ts} +3 -3
- package/dist/{search-DOzC4ojH.d.ts → search-CVVfuBPZ.d.ts} +4 -4
- package/dist/server/index.js +91 -10
- package/dist/server/index.js.map +1 -1
- package/dist/tools/index.d.ts +3 -3
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/standalone/web/.next/BUILD_ID +1 -1
- package/web/.next/standalone/web/.next/build-manifest.json +2 -2
- package/web/.next/standalone/web/.next/prerender-manifest.json +3 -3
- package/web/.next/standalone/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/standalone/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.html +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/agents.html +1 -1
- package/web/.next/standalone/web/.next/server/app/agents.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/agents.segments/!KG1haW4p/agents/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/agents.segments/!KG1haW4p/agents.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/agents.segments/!KG1haW4p.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/agents.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/agents.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/agents.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/agents.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.html +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/installation.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.html +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/skills.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.html +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/tools.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.html +2 -2
- package/web/.next/standalone/web/.next/server/app/docs.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.segments/docs.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.html +1 -1
- package/web/.next/standalone/web/.next/server/app/index.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/settings.html +1 -1
- package/web/.next/standalone/web/.next/server/app/settings.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/settings.segments/!KG1haW4p/settings/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/settings.segments/!KG1haW4p/settings.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/settings.segments/!KG1haW4p.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/settings.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/settings.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/pages/404.html +1 -1
- package/web/.next/standalone/web/.next/server/pages/500.html +2 -2
- package/web/.next/standalone/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/server-reference-manifest.json +1 -1
- /package/web/.next/standalone/web/.next/static/{Bt00m8W4k5F79ALhN700F → static/uy1OnyxIm3QeGGgKEmxAj}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{Bt00m8W4k5F79ALhN700F → static/uy1OnyxIm3QeGGgKEmxAj}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/{Bt00m8W4k5F79ALhN700F → static/uy1OnyxIm3QeGGgKEmxAj}/_ssgManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{static/Bt00m8W4k5F79ALhN700F → uy1OnyxIm3QeGGgKEmxAj}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{static/Bt00m8W4k5F79ALhN700F → uy1OnyxIm3QeGGgKEmxAj}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/{static/Bt00m8W4k5F79ALhN700F → uy1OnyxIm3QeGGgKEmxAj}/_ssgManifest.js +0 -0
- /package/web/.next/static/{Bt00m8W4k5F79ALhN700F → uy1OnyxIm3QeGGgKEmxAj}/_buildManifest.js +0 -0
- /package/web/.next/static/{Bt00m8W4k5F79ALhN700F → uy1OnyxIm3QeGGgKEmxAj}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{Bt00m8W4k5F79ALhN700F → uy1OnyxIm3QeGGgKEmxAj}/_ssgManifest.js +0 -0
package/dist/db/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Checkpoint, F as FileBackup, M as ModelMessage, a as Message, S as Session, L as LoadedSkill, T as TodoItem, b as ToolExecution, A as ActiveStream, I as IndexStatusRecord, c as IndexedChunk, d as SubagentExecution, e as SubagentStep, f as Terminal } from '../schema-
|
|
2
|
-
export { N as NewActiveStream, g as NewCheckpoint, h as NewFileBackup, i as NewIndexStatusRecord, j as NewIndexedChunk, k as NewMessage, l as NewSession, m as NewSubagentExecution, n as NewTerminal, o as NewTodoItem, p as NewToolExecution, q as SessionConfig, r as TaskConfig, U as UserContentPart, s as UserFilePart, t as UserImagePart, u as UserModelMessage, v as UserTextPart } from '../schema-
|
|
1
|
+
import { C as Checkpoint, F as FileBackup, M as ModelMessage, a as Message, S as Session, L as LoadedSkill, T as TodoItem, b as ToolExecution, A as ActiveStream, I as IndexStatusRecord, c as IndexedChunk, d as SubagentExecution, e as SubagentStep, f as Terminal } from '../schema-DxrKyetI.js';
|
|
2
|
+
export { N as NewActiveStream, g as NewCheckpoint, h as NewFileBackup, i as NewIndexStatusRecord, j as NewIndexedChunk, k as NewMessage, l as NewSession, m as NewSubagentExecution, n as NewTerminal, o as NewTodoItem, p as NewToolExecution, q as SessionConfig, r as TaskConfig, U as UserContentPart, s as UserFilePart, t as UserImagePart, u as UserModelMessage, v as UserTextPart } from '../schema-DxrKyetI.js';
|
|
3
3
|
import 'drizzle-orm/sqlite-core';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModelMessage, streamText } from 'ai';
|
|
2
|
-
import { S as Session, b as ToolExecution, r as TaskConfig } from './schema-
|
|
2
|
+
import { S as Session, b as ToolExecution, r as TaskConfig } from './schema-DxrKyetI.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { B as BashToolProgress, W as WriteFileProgress, S as SearchToolProgress } from './search-
|
|
4
|
+
import { B as BashToolProgress, W as WriteFileProgress, S as SearchToolProgress } from './search-CVVfuBPZ.js';
|
|
5
5
|
|
|
6
6
|
declare const ToolApprovalConfigSchema: z.ZodObject<{
|
|
7
7
|
bash: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -38,25 +38,25 @@ declare const SessionConfigSchema: z.ZodObject<{
|
|
|
38
38
|
iterations: z.ZodOptional<z.ZodNumber>;
|
|
39
39
|
parentTaskId: z.ZodOptional<z.ZodString>;
|
|
40
40
|
}, "strip", z.ZodTypeAny, {
|
|
41
|
-
status: "
|
|
41
|
+
status: "running" | "completed" | "failed";
|
|
42
42
|
enabled: boolean;
|
|
43
43
|
outputSchema: Record<string, unknown>;
|
|
44
|
-
error?: string | undefined;
|
|
45
|
-
maxIterations?: number | undefined;
|
|
46
44
|
webhookUrl?: string | undefined;
|
|
47
|
-
|
|
45
|
+
maxIterations?: number | undefined;
|
|
48
46
|
result?: unknown;
|
|
47
|
+
error?: string | undefined;
|
|
49
48
|
iterations?: number | undefined;
|
|
49
|
+
parentTaskId?: string | undefined;
|
|
50
50
|
}, {
|
|
51
|
-
status: "
|
|
51
|
+
status: "running" | "completed" | "failed";
|
|
52
52
|
enabled: boolean;
|
|
53
53
|
outputSchema: Record<string, unknown>;
|
|
54
|
-
error?: string | undefined;
|
|
55
|
-
maxIterations?: number | undefined;
|
|
56
54
|
webhookUrl?: string | undefined;
|
|
57
|
-
|
|
55
|
+
maxIterations?: number | undefined;
|
|
58
56
|
result?: unknown;
|
|
57
|
+
error?: string | undefined;
|
|
59
58
|
iterations?: number | undefined;
|
|
59
|
+
parentTaskId?: string | undefined;
|
|
60
60
|
}>>;
|
|
61
61
|
role: z.ZodOptional<z.ZodEnum<["orchestrator", "worker", "chat"]>>;
|
|
62
62
|
personality: z.ZodOptional<z.ZodString>;
|
|
@@ -84,20 +84,20 @@ declare const SessionConfigSchema: z.ZodObject<{
|
|
|
84
84
|
lastFiredAt: z.ZodOptional<z.ZodString>;
|
|
85
85
|
createdAt: z.ZodString;
|
|
86
86
|
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
enabled: boolean;
|
|
87
88
|
id: string;
|
|
88
89
|
name: string;
|
|
89
|
-
enabled: boolean;
|
|
90
|
-
createdAt: string;
|
|
91
|
-
prompt: string;
|
|
92
90
|
cron: string;
|
|
91
|
+
prompt: string;
|
|
92
|
+
createdAt: string;
|
|
93
93
|
replyChannel?: string | undefined;
|
|
94
94
|
lastFiredAt?: string | undefined;
|
|
95
95
|
}, {
|
|
96
96
|
id: string;
|
|
97
97
|
name: string;
|
|
98
|
-
createdAt: string;
|
|
99
|
-
prompt: string;
|
|
100
98
|
cron: string;
|
|
99
|
+
prompt: string;
|
|
100
|
+
createdAt: string;
|
|
101
101
|
enabled?: boolean | undefined;
|
|
102
102
|
replyChannel?: string | undefined;
|
|
103
103
|
lastFiredAt?: string | undefined;
|
|
@@ -112,19 +112,19 @@ declare const SessionConfigSchema: z.ZodObject<{
|
|
|
112
112
|
lastHitAt: z.ZodOptional<z.ZodString>;
|
|
113
113
|
createdAt: z.ZodString;
|
|
114
114
|
}, "strip", z.ZodTypeAny, {
|
|
115
|
-
token: string;
|
|
116
115
|
id: string;
|
|
117
116
|
name: string;
|
|
118
117
|
createdAt: string;
|
|
118
|
+
token: string;
|
|
119
119
|
wake: "now" | "next";
|
|
120
120
|
hitCount: number;
|
|
121
121
|
template?: string | undefined;
|
|
122
122
|
lastHitAt?: string | undefined;
|
|
123
123
|
}, {
|
|
124
|
-
token: string;
|
|
125
124
|
id: string;
|
|
126
125
|
name: string;
|
|
127
126
|
createdAt: string;
|
|
127
|
+
token: string;
|
|
128
128
|
wake?: "now" | "next" | undefined;
|
|
129
129
|
template?: string | undefined;
|
|
130
130
|
hitCount?: number | undefined;
|
|
@@ -134,90 +134,90 @@ declare const SessionConfigSchema: z.ZodObject<{
|
|
|
134
134
|
maxContextChars: number;
|
|
135
135
|
toolApprovals?: Record<string, boolean> | undefined;
|
|
136
136
|
approvalWebhook?: string | undefined;
|
|
137
|
-
|
|
138
|
-
token: string;
|
|
139
|
-
id: string;
|
|
140
|
-
name: string;
|
|
141
|
-
createdAt: string;
|
|
142
|
-
wake: "now" | "next";
|
|
143
|
-
hitCount: number;
|
|
144
|
-
template?: string | undefined;
|
|
145
|
-
lastHitAt?: string | undefined;
|
|
146
|
-
}[] | undefined;
|
|
147
|
-
slack?: {
|
|
148
|
-
channel?: string | undefined;
|
|
149
|
-
threadTs?: string | undefined;
|
|
150
|
-
teamId?: string | undefined;
|
|
151
|
-
} | undefined;
|
|
137
|
+
skillsDirectory?: string | undefined;
|
|
152
138
|
task?: {
|
|
153
|
-
status: "
|
|
139
|
+
status: "running" | "completed" | "failed";
|
|
154
140
|
enabled: boolean;
|
|
155
141
|
outputSchema: Record<string, unknown>;
|
|
156
|
-
error?: string | undefined;
|
|
157
|
-
maxIterations?: number | undefined;
|
|
158
142
|
webhookUrl?: string | undefined;
|
|
159
|
-
|
|
143
|
+
maxIterations?: number | undefined;
|
|
160
144
|
result?: unknown;
|
|
145
|
+
error?: string | undefined;
|
|
161
146
|
iterations?: number | undefined;
|
|
147
|
+
parentTaskId?: string | undefined;
|
|
162
148
|
} | undefined;
|
|
163
|
-
skillsDirectory?: string | undefined;
|
|
164
149
|
role?: "orchestrator" | "worker" | "chat" | undefined;
|
|
165
150
|
personality?: string | undefined;
|
|
166
151
|
orchestratorSessionId?: string | undefined;
|
|
152
|
+
slack?: {
|
|
153
|
+
channel?: string | undefined;
|
|
154
|
+
threadTs?: string | undefined;
|
|
155
|
+
teamId?: string | undefined;
|
|
156
|
+
} | undefined;
|
|
167
157
|
schedules?: {
|
|
158
|
+
enabled: boolean;
|
|
168
159
|
id: string;
|
|
169
160
|
name: string;
|
|
170
|
-
enabled: boolean;
|
|
171
|
-
createdAt: string;
|
|
172
|
-
prompt: string;
|
|
173
161
|
cron: string;
|
|
162
|
+
prompt: string;
|
|
163
|
+
createdAt: string;
|
|
174
164
|
replyChannel?: string | undefined;
|
|
175
165
|
lastFiredAt?: string | undefined;
|
|
176
166
|
}[] | undefined;
|
|
177
|
-
}, {
|
|
178
|
-
toolApprovals?: Record<string, boolean> | undefined;
|
|
179
|
-
approvalWebhook?: string | undefined;
|
|
180
167
|
webhooks?: {
|
|
181
|
-
token: string;
|
|
182
168
|
id: string;
|
|
183
169
|
name: string;
|
|
184
170
|
createdAt: string;
|
|
185
|
-
|
|
171
|
+
token: string;
|
|
172
|
+
wake: "now" | "next";
|
|
173
|
+
hitCount: number;
|
|
186
174
|
template?: string | undefined;
|
|
187
|
-
hitCount?: number | undefined;
|
|
188
175
|
lastHitAt?: string | undefined;
|
|
189
176
|
}[] | undefined;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
177
|
+
}, {
|
|
178
|
+
toolApprovals?: Record<string, boolean> | undefined;
|
|
179
|
+
approvalWebhook?: string | undefined;
|
|
180
|
+
skillsDirectory?: string | undefined;
|
|
181
|
+
maxContextChars?: number | undefined;
|
|
195
182
|
task?: {
|
|
196
|
-
status: "
|
|
183
|
+
status: "running" | "completed" | "failed";
|
|
197
184
|
enabled: boolean;
|
|
198
185
|
outputSchema: Record<string, unknown>;
|
|
199
|
-
error?: string | undefined;
|
|
200
|
-
maxIterations?: number | undefined;
|
|
201
186
|
webhookUrl?: string | undefined;
|
|
202
|
-
|
|
187
|
+
maxIterations?: number | undefined;
|
|
203
188
|
result?: unknown;
|
|
189
|
+
error?: string | undefined;
|
|
204
190
|
iterations?: number | undefined;
|
|
191
|
+
parentTaskId?: string | undefined;
|
|
205
192
|
} | undefined;
|
|
206
|
-
skillsDirectory?: string | undefined;
|
|
207
|
-
maxContextChars?: number | undefined;
|
|
208
193
|
role?: "orchestrator" | "worker" | "chat" | undefined;
|
|
209
194
|
personality?: string | undefined;
|
|
210
195
|
orchestratorSessionId?: string | undefined;
|
|
196
|
+
slack?: {
|
|
197
|
+
channel?: string | undefined;
|
|
198
|
+
threadTs?: string | undefined;
|
|
199
|
+
teamId?: string | undefined;
|
|
200
|
+
} | undefined;
|
|
211
201
|
schedules?: {
|
|
212
202
|
id: string;
|
|
213
203
|
name: string;
|
|
214
|
-
createdAt: string;
|
|
215
|
-
prompt: string;
|
|
216
204
|
cron: string;
|
|
205
|
+
prompt: string;
|
|
206
|
+
createdAt: string;
|
|
217
207
|
enabled?: boolean | undefined;
|
|
218
208
|
replyChannel?: string | undefined;
|
|
219
209
|
lastFiredAt?: string | undefined;
|
|
220
210
|
}[] | undefined;
|
|
211
|
+
webhooks?: {
|
|
212
|
+
id: string;
|
|
213
|
+
name: string;
|
|
214
|
+
createdAt: string;
|
|
215
|
+
token: string;
|
|
216
|
+
wake?: "now" | "next" | undefined;
|
|
217
|
+
template?: string | undefined;
|
|
218
|
+
hitCount?: number | undefined;
|
|
219
|
+
lastHitAt?: string | undefined;
|
|
220
|
+
}[] | undefined;
|
|
221
221
|
}>;
|
|
222
222
|
declare const SparkcoderConfigSchema: z.ZodObject<{
|
|
223
223
|
defaultModel: z.ZodDefault<z.ZodString>;
|
|
@@ -383,15 +383,15 @@ declare const SparkcoderConfigSchema: z.ZodObject<{
|
|
|
383
383
|
expiresAt?: string | undefined;
|
|
384
384
|
}>>;
|
|
385
385
|
}, "strip", z.ZodTypeAny, {
|
|
386
|
+
enabled: boolean;
|
|
386
387
|
id: string;
|
|
387
388
|
name: string;
|
|
388
|
-
transport: "http" | "sse" | "stdio";
|
|
389
|
-
enabled: boolean;
|
|
390
389
|
createdAt: string;
|
|
390
|
+
transport: "http" | "sse" | "stdio";
|
|
391
|
+
args?: string[] | undefined;
|
|
391
392
|
url?: string | undefined;
|
|
392
393
|
headers?: Record<string, string> | undefined;
|
|
393
394
|
command?: string | undefined;
|
|
394
|
-
args?: string[] | undefined;
|
|
395
395
|
oauth?: {
|
|
396
396
|
authorizationUrl?: string | undefined;
|
|
397
397
|
tokenUrl?: string | undefined;
|
|
@@ -404,13 +404,13 @@ declare const SparkcoderConfigSchema: z.ZodObject<{
|
|
|
404
404
|
}, {
|
|
405
405
|
id: string;
|
|
406
406
|
name: string;
|
|
407
|
-
transport: "http" | "sse" | "stdio";
|
|
408
407
|
createdAt: string;
|
|
408
|
+
transport: "http" | "sse" | "stdio";
|
|
409
|
+
enabled?: boolean | undefined;
|
|
410
|
+
args?: string[] | undefined;
|
|
409
411
|
url?: string | undefined;
|
|
410
412
|
headers?: Record<string, string> | undefined;
|
|
411
413
|
command?: string | undefined;
|
|
412
|
-
args?: string[] | undefined;
|
|
413
|
-
enabled?: boolean | undefined;
|
|
414
414
|
oauth?: {
|
|
415
415
|
authorizationUrl?: string | undefined;
|
|
416
416
|
tokenUrl?: string | undefined;
|
|
@@ -423,15 +423,15 @@ declare const SparkcoderConfigSchema: z.ZodObject<{
|
|
|
423
423
|
}>, "many">>>>;
|
|
424
424
|
}, "strip", z.ZodTypeAny, {
|
|
425
425
|
servers?: {
|
|
426
|
+
enabled: boolean;
|
|
426
427
|
id: string;
|
|
427
428
|
name: string;
|
|
428
|
-
transport: "http" | "sse" | "stdio";
|
|
429
|
-
enabled: boolean;
|
|
430
429
|
createdAt: string;
|
|
430
|
+
transport: "http" | "sse" | "stdio";
|
|
431
|
+
args?: string[] | undefined;
|
|
431
432
|
url?: string | undefined;
|
|
432
433
|
headers?: Record<string, string> | undefined;
|
|
433
434
|
command?: string | undefined;
|
|
434
|
-
args?: string[] | undefined;
|
|
435
435
|
oauth?: {
|
|
436
436
|
authorizationUrl?: string | undefined;
|
|
437
437
|
tokenUrl?: string | undefined;
|
|
@@ -446,13 +446,13 @@ declare const SparkcoderConfigSchema: z.ZodObject<{
|
|
|
446
446
|
servers?: {
|
|
447
447
|
id: string;
|
|
448
448
|
name: string;
|
|
449
|
-
transport: "http" | "sse" | "stdio";
|
|
450
449
|
createdAt: string;
|
|
450
|
+
transport: "http" | "sse" | "stdio";
|
|
451
|
+
enabled?: boolean | undefined;
|
|
452
|
+
args?: string[] | undefined;
|
|
451
453
|
url?: string | undefined;
|
|
452
454
|
headers?: Record<string, string> | undefined;
|
|
453
455
|
command?: string | undefined;
|
|
454
|
-
args?: string[] | undefined;
|
|
455
|
-
enabled?: boolean | undefined;
|
|
456
456
|
oauth?: {
|
|
457
457
|
authorizationUrl?: string | undefined;
|
|
458
458
|
tokenUrl?: string | undefined;
|
|
@@ -495,7 +495,6 @@ declare const SparkcoderConfigSchema: z.ZodObject<{
|
|
|
495
495
|
allowedEmails?: string[] | undefined;
|
|
496
496
|
}>>;
|
|
497
497
|
}, "strip", z.ZodTypeAny, {
|
|
498
|
-
defaultModel: string;
|
|
499
498
|
toolApprovals: {
|
|
500
499
|
bash: boolean;
|
|
501
500
|
write_file: boolean;
|
|
@@ -503,6 +502,7 @@ declare const SparkcoderConfigSchema: z.ZodObject<{
|
|
|
503
502
|
load_skill: boolean;
|
|
504
503
|
todo: boolean;
|
|
505
504
|
};
|
|
505
|
+
defaultModel: string;
|
|
506
506
|
skills: {
|
|
507
507
|
directory: string;
|
|
508
508
|
additionalDirectories: string[];
|
|
@@ -518,11 +518,21 @@ declare const SparkcoderConfigSchema: z.ZodObject<{
|
|
|
518
518
|
publicUrl?: string | undefined;
|
|
519
519
|
};
|
|
520
520
|
databasePath: string;
|
|
521
|
-
workingDirectory?: string | undefined;
|
|
522
521
|
approvalWebhook?: string | undefined;
|
|
522
|
+
slack?: {
|
|
523
|
+
botToken?: string | undefined;
|
|
524
|
+
signingSecret?: string | undefined;
|
|
525
|
+
defaultOrchestratorName?: string | undefined;
|
|
526
|
+
allowedUsers?: string[] | undefined;
|
|
527
|
+
allowedChannels?: string[] | undefined;
|
|
528
|
+
allowDmsFromAnyone?: boolean | undefined;
|
|
529
|
+
deniedReplyEnabled?: boolean | undefined;
|
|
530
|
+
deniedReplyTemplate?: string | undefined;
|
|
531
|
+
} | undefined;
|
|
523
532
|
webhooks?: {
|
|
524
533
|
token?: string | undefined;
|
|
525
534
|
} | undefined;
|
|
535
|
+
workingDirectory?: string | undefined;
|
|
526
536
|
remoteServer?: {
|
|
527
537
|
url?: string | undefined;
|
|
528
538
|
authKey?: string | undefined;
|
|
@@ -535,27 +545,17 @@ declare const SparkcoderConfigSchema: z.ZodObject<{
|
|
|
535
545
|
httpUrl?: string | undefined;
|
|
536
546
|
namespace?: string | undefined;
|
|
537
547
|
} | undefined;
|
|
538
|
-
slack?: {
|
|
539
|
-
botToken?: string | undefined;
|
|
540
|
-
signingSecret?: string | undefined;
|
|
541
|
-
defaultOrchestratorName?: string | undefined;
|
|
542
|
-
allowedUsers?: string[] | undefined;
|
|
543
|
-
allowedChannels?: string[] | undefined;
|
|
544
|
-
allowDmsFromAnyone?: boolean | undefined;
|
|
545
|
-
deniedReplyEnabled?: boolean | undefined;
|
|
546
|
-
deniedReplyTemplate?: string | undefined;
|
|
547
|
-
} | undefined;
|
|
548
548
|
mcp?: {
|
|
549
549
|
servers?: {
|
|
550
|
+
enabled: boolean;
|
|
550
551
|
id: string;
|
|
551
552
|
name: string;
|
|
552
|
-
transport: "http" | "sse" | "stdio";
|
|
553
|
-
enabled: boolean;
|
|
554
553
|
createdAt: string;
|
|
554
|
+
transport: "http" | "sse" | "stdio";
|
|
555
|
+
args?: string[] | undefined;
|
|
555
556
|
url?: string | undefined;
|
|
556
557
|
headers?: Record<string, string> | undefined;
|
|
557
558
|
command?: string | undefined;
|
|
558
|
-
args?: string[] | undefined;
|
|
559
559
|
oauth?: {
|
|
560
560
|
authorizationUrl?: string | undefined;
|
|
561
561
|
tokenUrl?: string | undefined;
|
|
@@ -576,8 +576,6 @@ declare const SparkcoderConfigSchema: z.ZodObject<{
|
|
|
576
576
|
allowedEmails?: string[] | undefined;
|
|
577
577
|
} | undefined;
|
|
578
578
|
}, {
|
|
579
|
-
defaultModel?: string | undefined;
|
|
580
|
-
workingDirectory?: string | undefined;
|
|
581
579
|
toolApprovals?: {
|
|
582
580
|
bash?: boolean | undefined;
|
|
583
581
|
write_file?: boolean | undefined;
|
|
@@ -586,6 +584,21 @@ declare const SparkcoderConfigSchema: z.ZodObject<{
|
|
|
586
584
|
todo?: boolean | undefined;
|
|
587
585
|
} | undefined;
|
|
588
586
|
approvalWebhook?: string | undefined;
|
|
587
|
+
slack?: {
|
|
588
|
+
botToken?: string | undefined;
|
|
589
|
+
signingSecret?: string | undefined;
|
|
590
|
+
defaultOrchestratorName?: string | undefined;
|
|
591
|
+
allowedUsers?: string[] | undefined;
|
|
592
|
+
allowedChannels?: string[] | undefined;
|
|
593
|
+
allowDmsFromAnyone?: boolean | undefined;
|
|
594
|
+
deniedReplyEnabled?: boolean | undefined;
|
|
595
|
+
deniedReplyTemplate?: string | undefined;
|
|
596
|
+
} | undefined;
|
|
597
|
+
webhooks?: {
|
|
598
|
+
token?: string | undefined;
|
|
599
|
+
} | undefined;
|
|
600
|
+
workingDirectory?: string | undefined;
|
|
601
|
+
defaultModel?: string | undefined;
|
|
589
602
|
skills?: {
|
|
590
603
|
directory?: string | undefined;
|
|
591
604
|
additionalDirectories?: string[] | undefined;
|
|
@@ -600,9 +613,6 @@ declare const SparkcoderConfigSchema: z.ZodObject<{
|
|
|
600
613
|
host?: string | undefined;
|
|
601
614
|
publicUrl?: string | undefined;
|
|
602
615
|
} | undefined;
|
|
603
|
-
webhooks?: {
|
|
604
|
-
token?: string | undefined;
|
|
605
|
-
} | undefined;
|
|
606
616
|
databasePath?: string | undefined;
|
|
607
617
|
remoteServer?: {
|
|
608
618
|
url?: string | undefined;
|
|
@@ -616,27 +626,17 @@ declare const SparkcoderConfigSchema: z.ZodObject<{
|
|
|
616
626
|
include?: string[] | undefined;
|
|
617
627
|
exclude?: string[] | undefined;
|
|
618
628
|
} | undefined;
|
|
619
|
-
slack?: {
|
|
620
|
-
botToken?: string | undefined;
|
|
621
|
-
signingSecret?: string | undefined;
|
|
622
|
-
defaultOrchestratorName?: string | undefined;
|
|
623
|
-
allowedUsers?: string[] | undefined;
|
|
624
|
-
allowedChannels?: string[] | undefined;
|
|
625
|
-
allowDmsFromAnyone?: boolean | undefined;
|
|
626
|
-
deniedReplyEnabled?: boolean | undefined;
|
|
627
|
-
deniedReplyTemplate?: string | undefined;
|
|
628
|
-
} | undefined;
|
|
629
629
|
mcp?: {
|
|
630
630
|
servers?: {
|
|
631
631
|
id: string;
|
|
632
632
|
name: string;
|
|
633
|
-
transport: "http" | "sse" | "stdio";
|
|
634
633
|
createdAt: string;
|
|
634
|
+
transport: "http" | "sse" | "stdio";
|
|
635
|
+
enabled?: boolean | undefined;
|
|
636
|
+
args?: string[] | undefined;
|
|
635
637
|
url?: string | undefined;
|
|
636
638
|
headers?: Record<string, string> | undefined;
|
|
637
639
|
command?: string | undefined;
|
|
638
|
-
args?: string[] | undefined;
|
|
639
|
-
enabled?: boolean | undefined;
|
|
640
640
|
oauth?: {
|
|
641
641
|
authorizationUrl?: string | undefined;
|
|
642
642
|
tokenUrl?: string | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { R as ResolvedConfig } from './index-
|
|
2
|
-
export { A as Agent, a as AgentOptions, b as AgentRunOptions, c as AgentStreamResult, S as SparkcoderConfig, T as ToolApprovalConfig } from './index-
|
|
1
|
+
import { R as ResolvedConfig } from './index-DczYH89U.js';
|
|
2
|
+
export { A as Agent, a as AgentOptions, b as AgentRunOptions, c as AgentStreamResult, S as SparkcoderConfig, T as ToolApprovalConfig } from './index-DczYH89U.js';
|
|
3
3
|
export { ServerOptions, createApp, startServer, stopServer } from './server/index.js';
|
|
4
4
|
export { checkpointQueries, closeDatabase, fileBackupQueries, getDb, initDatabase, messageQueries, sessionQueries, skillQueries, todoQueries, toolExecutionQueries } from './db/index.js';
|
|
5
|
-
import { F as FileBackup, C as Checkpoint } from './schema-
|
|
6
|
-
export { a as Message, M as ModelMessage, S as Session, q as SessionConfig, f as Terminal, T as TodoItem, b as ToolExecution } from './schema-
|
|
5
|
+
import { F as FileBackup, C as Checkpoint } from './schema-DxrKyetI.js';
|
|
6
|
+
export { a as Message, M as ModelMessage, S as Session, q as SessionConfig, f as Terminal, T as TodoItem, b as ToolExecution } from './schema-DxrKyetI.js';
|
|
7
7
|
export { createLoadSkillTool, createReadFileTool, createTodoTool, createTools } from './tools/index.js';
|
|
8
|
-
export { c as createBashTool, a as createWriteFileTool } from './search-
|
|
8
|
+
export { c as createBashTool, a as createWriteFileTool } from './search-CVVfuBPZ.js';
|
|
9
9
|
import 'ai';
|
|
10
10
|
import 'zod';
|
|
11
11
|
import 'hono/types';
|
package/dist/index.js
CHANGED
|
@@ -7819,6 +7819,9 @@ function isSlackConfigured() {
|
|
|
7819
7819
|
function getSlackSigningSecret() {
|
|
7820
7820
|
return readSlackConfig()?.signingSecret ?? null;
|
|
7821
7821
|
}
|
|
7822
|
+
function getSlackBotToken() {
|
|
7823
|
+
return readSlackConfig()?.botToken ?? null;
|
|
7824
|
+
}
|
|
7822
7825
|
function getDefaultOrchestratorName() {
|
|
7823
7826
|
return readSlackConfig()?.defaultOrchestratorName ?? null;
|
|
7824
7827
|
}
|
|
@@ -7873,6 +7876,62 @@ function getSlackAllowlistPolicy() {
|
|
|
7873
7876
|
return { allowedUsers: [], allowedChannels: [], allowDmsFromAnyone: true };
|
|
7874
7877
|
}
|
|
7875
7878
|
}
|
|
7879
|
+
async function fetchSlackUserName(userId) {
|
|
7880
|
+
const token = getSlackBotToken();
|
|
7881
|
+
if (!token) return null;
|
|
7882
|
+
try {
|
|
7883
|
+
const res = await fetch(`https://slack.com/api/users.info?user=${encodeURIComponent(userId)}`, {
|
|
7884
|
+
headers: { Authorization: `Bearer ${token}` }
|
|
7885
|
+
});
|
|
7886
|
+
const data = await res.json().catch(() => ({}));
|
|
7887
|
+
if (!data?.ok) {
|
|
7888
|
+
console.warn(`[slack] users.info(${userId}) failed: ${data?.error || `HTTP ${res.status}`}`);
|
|
7889
|
+
return null;
|
|
7890
|
+
}
|
|
7891
|
+
const profile = data.user?.profile || {};
|
|
7892
|
+
const name = profile.display_name_normalized || profile.display_name || profile.real_name_normalized || profile.real_name || data.user?.real_name || data.user?.name || null;
|
|
7893
|
+
return name ? String(name) : null;
|
|
7894
|
+
} catch (err) {
|
|
7895
|
+
console.warn(`[slack] users.info(${userId}) error:`, err?.message || err);
|
|
7896
|
+
return null;
|
|
7897
|
+
}
|
|
7898
|
+
}
|
|
7899
|
+
async function resolveSlackUserName(userId) {
|
|
7900
|
+
if (!userId) return null;
|
|
7901
|
+
const now = Date.now();
|
|
7902
|
+
const hit = userNameCache.get(userId);
|
|
7903
|
+
if (hit && hit.expiresAt > now) return hit.name;
|
|
7904
|
+
const inflight = userInflight.get(userId);
|
|
7905
|
+
if (inflight) return inflight;
|
|
7906
|
+
const p = (async () => {
|
|
7907
|
+
const name = await fetchSlackUserName(userId);
|
|
7908
|
+
userNameCache.set(userId, {
|
|
7909
|
+
name,
|
|
7910
|
+
expiresAt: now + (name ? USER_TTL_MS : USER_FAIL_TTL_MS)
|
|
7911
|
+
});
|
|
7912
|
+
userInflight.delete(userId);
|
|
7913
|
+
return name;
|
|
7914
|
+
})();
|
|
7915
|
+
userInflight.set(userId, p);
|
|
7916
|
+
return p;
|
|
7917
|
+
}
|
|
7918
|
+
async function normalizeSlackMentions(text) {
|
|
7919
|
+
if (!text) return text;
|
|
7920
|
+
const userMentionRe = /<@([UW][A-Z0-9]+)(?:\|([^>]+))?>/g;
|
|
7921
|
+
const userIds = /* @__PURE__ */ new Set();
|
|
7922
|
+
for (const m of text.matchAll(userMentionRe)) {
|
|
7923
|
+
if (!m[2]) userIds.add(m[1]);
|
|
7924
|
+
}
|
|
7925
|
+
if (userIds.size > 0) {
|
|
7926
|
+
await Promise.all([...userIds].map((id) => resolveSlackUserName(id)));
|
|
7927
|
+
}
|
|
7928
|
+
return text.replace(userMentionRe, (_full, id, label) => {
|
|
7929
|
+
if (label) return `${label} <@${id}>`;
|
|
7930
|
+
const cached = userNameCache.get(id);
|
|
7931
|
+
const name = cached?.name;
|
|
7932
|
+
return name ? `${name} <@${id}>` : `<@${id}>`;
|
|
7933
|
+
});
|
|
7934
|
+
}
|
|
7876
7935
|
function getSlackDeniedReplyPolicy() {
|
|
7877
7936
|
try {
|
|
7878
7937
|
const cfg = getConfig();
|
|
@@ -7885,13 +7944,17 @@ function getSlackDeniedReplyPolicy() {
|
|
|
7885
7944
|
return { enabled: true, template: DEFAULT_DENIED_TEMPLATE };
|
|
7886
7945
|
}
|
|
7887
7946
|
}
|
|
7888
|
-
var cachedSelf, selfInflight, DEFAULT_DENIED_TEMPLATE;
|
|
7947
|
+
var cachedSelf, selfInflight, USER_TTL_MS, USER_FAIL_TTL_MS, userNameCache, userInflight, DEFAULT_DENIED_TEMPLATE;
|
|
7889
7948
|
var init_client3 = __esm({
|
|
7890
7949
|
"src/integrations/slack/client.ts"() {
|
|
7891
7950
|
"use strict";
|
|
7892
7951
|
init_config();
|
|
7893
7952
|
cachedSelf = null;
|
|
7894
7953
|
selfInflight = null;
|
|
7954
|
+
USER_TTL_MS = 60 * 60 * 1e3;
|
|
7955
|
+
USER_FAIL_TTL_MS = 5 * 60 * 1e3;
|
|
7956
|
+
userNameCache = /* @__PURE__ */ new Map();
|
|
7957
|
+
userInflight = /* @__PURE__ */ new Map();
|
|
7895
7958
|
DEFAULT_DENIED_TEMPLATE = "Sorry, you don't have permission to use this bot. (Contact the bot owner if you think this is a mistake.)";
|
|
7896
7959
|
}
|
|
7897
7960
|
});
|
|
@@ -7906,9 +7969,6 @@ function markThreadOwned(channel, threadTs) {
|
|
|
7906
7969
|
function isThreadOwned(channel, threadTs) {
|
|
7907
7970
|
return ownedThreads.has(threadKey(channel, threadTs));
|
|
7908
7971
|
}
|
|
7909
|
-
function stripMention(text) {
|
|
7910
|
-
return String(text || "").replace(/<@[^>]+>/g, "").trim();
|
|
7911
|
-
}
|
|
7912
7972
|
function isSelfAuthored(event, self) {
|
|
7913
7973
|
if (!self) return true;
|
|
7914
7974
|
if (self.botId && event.bot_id && event.bot_id === self.botId) return true;
|
|
@@ -7923,14 +7983,22 @@ function slackEventToInboundResult(event, opts = {}) {
|
|
|
7923
7983
|
return { event: null, dropReason: "bot_message" };
|
|
7924
7984
|
}
|
|
7925
7985
|
if (event.type === "message" && event.subtype && IGNORED_MESSAGE_SUBTYPES.has(event.subtype)) {
|
|
7926
|
-
return { event: null, dropReason: "
|
|
7986
|
+
return { event: null, dropReason: "ignored_subtype" };
|
|
7927
7987
|
}
|
|
7928
7988
|
const isDm = event.type === "message" && event.channel_type === "im";
|
|
7929
7989
|
const isThreadReply = event.type === "message" && !isDm && typeof event.thread_ts === "string" && event.thread_ts !== event.ts;
|
|
7990
|
+
const isNonThreadChannelMsg = event.type === "message" && !isDm && !isThreadReply && (event.channel_type === "channel" || event.channel_type === "group" || event.channel_type === "mpim" || // Some payload shapes omit channel_type for channel messages.
|
|
7991
|
+
typeof event.channel === "string");
|
|
7930
7992
|
if (event.type !== "app_mention" && !isDm && !isThreadReply) {
|
|
7993
|
+
if (isNonThreadChannelMsg) {
|
|
7994
|
+
return { event: null, dropReason: "non_thread_channel_msg" };
|
|
7995
|
+
}
|
|
7996
|
+
if (event.type !== "message") {
|
|
7997
|
+
return { event: null, dropReason: "non_message_event" };
|
|
7998
|
+
}
|
|
7931
7999
|
return { event: null, dropReason: "unsupported_type" };
|
|
7932
8000
|
}
|
|
7933
|
-
const text =
|
|
8001
|
+
const text = (event.text ?? "").trim();
|
|
7934
8002
|
if (!text) return { event: null, dropReason: "empty_text" };
|
|
7935
8003
|
const policy = getSlackAllowlistPolicy();
|
|
7936
8004
|
const userAllowlistActive = policy.allowedUsers.length > 0;
|
|
@@ -13674,16 +13742,18 @@ init_webhook_events();
|
|
|
13674
13742
|
init_inbox();
|
|
13675
13743
|
var recentlyHandled = /* @__PURE__ */ new Map();
|
|
13676
13744
|
var MAX_RECENT = 1e3;
|
|
13677
|
-
function
|
|
13745
|
+
function wasHandled(channel, ts) {
|
|
13678
13746
|
if (!channel || !ts) return false;
|
|
13747
|
+
return recentlyHandled.has(`${channel}\u241F${ts}`);
|
|
13748
|
+
}
|
|
13749
|
+
function markHandled(channel, ts) {
|
|
13750
|
+
if (!channel || !ts) return;
|
|
13679
13751
|
const key2 = `${channel}\u241F${ts}`;
|
|
13680
|
-
if (recentlyHandled.has(key2)) return true;
|
|
13681
13752
|
recentlyHandled.set(key2, Date.now());
|
|
13682
13753
|
if (recentlyHandled.size > MAX_RECENT) {
|
|
13683
13754
|
const oldest = recentlyHandled.keys().next().value;
|
|
13684
13755
|
if (oldest) recentlyHandled.delete(oldest);
|
|
13685
13756
|
}
|
|
13686
|
-
return false;
|
|
13687
13757
|
}
|
|
13688
13758
|
var slack = new Hono6();
|
|
13689
13759
|
slack.post("/events", async (c) => {
|
|
@@ -13720,7 +13790,7 @@ slack.post("/events", async (c) => {
|
|
|
13720
13790
|
textSnippet: typeof ev.text === "string" ? ev.text : void 0,
|
|
13721
13791
|
meta: { ts: ev.ts, thread_ts: ev.thread_ts, team: ev.team, event_subtype: ev.subtype }
|
|
13722
13792
|
});
|
|
13723
|
-
if (
|
|
13793
|
+
if (wasHandled(ev.channel, ev.ts)) {
|
|
13724
13794
|
updateEvent(auditId, { status: "dropped", dropReason: "duplicate_delivery" });
|
|
13725
13795
|
return c.json({ ok: true });
|
|
13726
13796
|
}
|
|
@@ -13744,7 +13814,18 @@ slack.post("/events", async (c) => {
|
|
|
13744
13814
|
}
|
|
13745
13815
|
const orchestratorId = await findOrCreateOrchestratorId();
|
|
13746
13816
|
if (orchestratorId) {
|
|
13817
|
+
inbound.content = await normalizeSlackMentions(inbound.content);
|
|
13818
|
+
if (ev.user) {
|
|
13819
|
+
const speakerName = await resolveSlackUserName(ev.user);
|
|
13820
|
+
if (speakerName) {
|
|
13821
|
+
inbound.content = inbound.content.replace(
|
|
13822
|
+
`user=${ev.user}`,
|
|
13823
|
+
`user=${speakerName} <@${ev.user}>`
|
|
13824
|
+
);
|
|
13825
|
+
}
|
|
13826
|
+
}
|
|
13747
13827
|
pushToInbox(orchestratorId, inbound);
|
|
13828
|
+
markHandled(ev.channel, ev.ts);
|
|
13748
13829
|
updateEvent(auditId, { status: "routed", sessionId: orchestratorId });
|
|
13749
13830
|
} else {
|
|
13750
13831
|
updateEvent(auditId, { status: "error", error: "no orchestrator session available" });
|