@inkeep/agents-core 0.0.0-dev-20260204182014 → 0.0.0-dev-20260204210021
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/auth/auth-schema.d.ts +104 -104
- package/dist/auth/auth-validation-schemas.d.ts +129 -129
- package/dist/auth/auth.d.ts +54 -54
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/client-exports.d.ts +2 -2
- package/dist/data-access/index.d.ts +1 -3
- package/dist/data-access/index.js +1 -3
- package/dist/data-access/manage/agents.d.ts +36 -36
- package/dist/data-access/manage/artifactComponents.d.ts +10 -10
- package/dist/data-access/manage/contextConfigs.d.ts +16 -16
- package/dist/data-access/manage/dataComponents.d.ts +6 -6
- package/dist/data-access/manage/functionTools.d.ts +12 -12
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentRelations.d.ts +20 -20
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgents.d.ts +12 -12
- package/dist/data-access/manage/tools.d.ts +21 -21
- package/dist/data-access/runtime/apiKeys.d.ts +16 -16
- package/dist/data-access/runtime/conversations.d.ts +27 -27
- package/dist/data-access/runtime/messages.d.ts +9 -9
- package/dist/data-access/runtime/tasks.d.ts +6 -6
- package/dist/db/manage/manage-schema.d.ts +304 -524
- package/dist/db/manage/manage-schema.js +2 -27
- package/dist/db/runtime/runtime-schema.d.ts +240 -1153
- package/dist/db/runtime/runtime-schema.js +2 -98
- package/dist/index.d.ts +5 -10
- package/dist/index.js +4 -9
- package/dist/types/entities.d.ts +2 -8
- package/dist/types/index.d.ts +2 -2
- package/dist/utils/index.d.ts +1 -4
- package/dist/utils/index.js +1 -4
- package/dist/utils/trigger-auth.d.ts +1 -1
- package/dist/validation/dolt-schemas.d.ts +1 -1
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/dist/validation/schemas.d.ts +1627 -4187
- package/dist/validation/schemas.js +4 -66
- package/drizzle/manage/meta/_journal.json +0 -7
- package/drizzle/runtime/meta/_journal.json +0 -14
- package/package.json +1 -1
- package/dist/auth/create-test-users.d.ts +0 -1
- package/dist/auth/create-test-users.js +0 -102
- package/dist/data-access/manage/workAppConfigs.d.ts +0 -228
- package/dist/data-access/manage/workAppConfigs.js +0 -120
- package/dist/data-access/runtime/workAppSlack.d.ts +0 -45
- package/dist/data-access/runtime/workAppSlack.js +0 -154
- package/dist/utils/slack-link-token.d.ts +0 -60
- package/dist/utils/slack-link-token.js +0 -124
- package/dist/utils/slack-user-token.d.ts +0 -87
- package/dist/utils/slack-user-token.js +0 -156
- package/dist/utils/sse-parser.d.ts +0 -35
- package/dist/utils/sse-parser.js +0 -71
- package/drizzle/manage/0007_whole_skreet.sql +0 -17
- package/drizzle/manage/meta/0007_snapshot.json +0 -3265
- package/drizzle/runtime/0011_grey_energizer.sql +0 -131
- package/drizzle/runtime/0012_salty_zuras.sql +0 -6
- package/drizzle/runtime/meta/0011_snapshot.json +0 -3747
- package/drizzle/runtime/meta/0012_snapshot.json +0 -3747
package/dist/utils/sse-parser.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
//#region src/utils/sse-parser.ts
|
|
2
|
-
/**
|
|
3
|
-
* Parse SSE (Server-Sent Events) response from chat API
|
|
4
|
-
* Handles text deltas, error operations, and other data operations
|
|
5
|
-
*
|
|
6
|
-
* Supports:
|
|
7
|
-
* - OpenAI-compatible format: `chat.completion.chunk` with `delta.content`
|
|
8
|
-
* - Vercel AI SDK format: `text-delta` with `delta`
|
|
9
|
-
* - Vercel AI SDK format: `text-start` and `text-end` markers (ignored)
|
|
10
|
-
* - Error operations: `data-operation` with `type: 'error'`
|
|
11
|
-
* - Direct error events: `type: 'error'`
|
|
12
|
-
*
|
|
13
|
-
* Ignores:
|
|
14
|
-
* - `data-operation` events (metadata, not content)
|
|
15
|
-
* - `text-start` and `text-end` markers
|
|
16
|
-
* - `[DONE]` markers
|
|
17
|
-
*/
|
|
18
|
-
function parseSSEResponse(sseText) {
|
|
19
|
-
let textContent = "";
|
|
20
|
-
let hasError = false;
|
|
21
|
-
let errorMessage = "";
|
|
22
|
-
const lines = sseText.split("\n").filter((line) => line.startsWith("data: "));
|
|
23
|
-
for (const line of lines) {
|
|
24
|
-
const jsonStr = line.slice(6).trim();
|
|
25
|
-
if (!jsonStr || jsonStr === "[DONE]") continue;
|
|
26
|
-
try {
|
|
27
|
-
const data = JSON.parse(jsonStr);
|
|
28
|
-
if (data.object === "chat.completion.chunk" && data.choices?.[0]?.delta) {
|
|
29
|
-
const delta = data.choices[0].delta;
|
|
30
|
-
if (delta.content && typeof delta.content === "string") try {
|
|
31
|
-
const parsedContent = JSON.parse(delta.content);
|
|
32
|
-
if (parsedContent.type === "data-operation") {
|
|
33
|
-
if (parsedContent.data?.type === "error") {
|
|
34
|
-
hasError = true;
|
|
35
|
-
errorMessage = parsedContent.data.message || "Unknown error occurred";
|
|
36
|
-
}
|
|
37
|
-
continue;
|
|
38
|
-
}
|
|
39
|
-
textContent += delta.content;
|
|
40
|
-
} catch {
|
|
41
|
-
textContent += delta.content;
|
|
42
|
-
}
|
|
43
|
-
continue;
|
|
44
|
-
}
|
|
45
|
-
if (data.type === "text-delta" && data.delta) {
|
|
46
|
-
textContent += data.delta;
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
if (data.type === "text-start" || data.type === "text-end") continue;
|
|
50
|
-
if (data.type === "data-operation") {
|
|
51
|
-
if (data.data?.type === "error") {
|
|
52
|
-
hasError = true;
|
|
53
|
-
errorMessage = data.data.message || "Unknown error occurred";
|
|
54
|
-
}
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
|
-
if (data.type === "error") {
|
|
58
|
-
hasError = true;
|
|
59
|
-
errorMessage = data.message || "Unknown error occurred";
|
|
60
|
-
}
|
|
61
|
-
} catch {}
|
|
62
|
-
}
|
|
63
|
-
if (hasError) return {
|
|
64
|
-
text: textContent.trim(),
|
|
65
|
-
error: errorMessage
|
|
66
|
-
};
|
|
67
|
-
return { text: textContent.trim() };
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
//#endregion
|
|
71
|
-
export { parseSSEResponse };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
CREATE TABLE "work_app_configs" (
|
|
2
|
-
"tenant_id" varchar(256) NOT NULL,
|
|
3
|
-
"id" varchar(256) NOT NULL,
|
|
4
|
-
"app_type" varchar(50) NOT NULL,
|
|
5
|
-
"workspace_id" varchar(256) NOT NULL,
|
|
6
|
-
"channel_id" varchar(256),
|
|
7
|
-
"project_id" varchar(256) NOT NULL,
|
|
8
|
-
"agent_id" varchar(256) NOT NULL,
|
|
9
|
-
"enabled" boolean DEFAULT true NOT NULL,
|
|
10
|
-
"metadata" jsonb,
|
|
11
|
-
"created_at" timestamp DEFAULT now() NOT NULL,
|
|
12
|
-
"updated_at" timestamp DEFAULT now() NOT NULL,
|
|
13
|
-
CONSTRAINT "work_app_configs_tenant_id_id_pk" PRIMARY KEY("tenant_id","id"),
|
|
14
|
-
CONSTRAINT "work_app_configs_workspace_channel_unique" UNIQUE("tenant_id","app_type","workspace_id","channel_id")
|
|
15
|
-
);
|
|
16
|
-
--> statement-breakpoint
|
|
17
|
-
ALTER TABLE "work_app_configs" ADD CONSTRAINT "work_app_configs_project_fk" FOREIGN KEY ("tenant_id","project_id") REFERENCES "public"."projects"("tenant_id","id") ON DELETE cascade ON UPDATE no action;
|