@inkeep/agents-core 0.64.2 → 0.64.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/auth-schema.d.ts +108 -108
- package/dist/auth/auth-validation-schemas.d.ts +154 -154
- package/dist/auth/init.js +2 -2
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/constants/otel-attributes.d.ts +5 -0
- package/dist/constants/otel-attributes.js +7 -2
- package/dist/constants/signoz-queries.d.ts +1 -0
- package/dist/constants/signoz-queries.js +2 -1
- package/dist/data-access/index.d.ts +2 -1
- package/dist/data-access/index.js +2 -1
- package/dist/data-access/manage/agents.d.ts +11 -11
- package/dist/data-access/manage/artifactComponents.d.ts +2 -2
- package/dist/data-access/manage/functionTools.d.ts +4 -4
- package/dist/data-access/manage/skills.d.ts +7 -7
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgentRelations.d.ts +6 -6
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +6 -6
- package/dist/data-access/manage/subAgents.d.ts +9 -9
- package/dist/data-access/manage/tools.d.ts +18 -18
- package/dist/data-access/manage/tools.js +1 -1
- package/dist/data-access/manage/triggers.d.ts +2 -2
- package/dist/data-access/runtime/apiKeys.d.ts +4 -4
- package/dist/data-access/runtime/apps.d.ts +4 -4
- package/dist/data-access/runtime/conversations.d.ts +16 -16
- package/dist/data-access/runtime/messages.d.ts +9 -9
- package/dist/data-access/runtime/streamChunks.d.ts +29 -0
- package/dist/data-access/runtime/streamChunks.js +65 -0
- package/dist/data-access/runtime/tasks.d.ts +4 -4
- package/dist/db/manage/dolt-safe-jsonb.d.ts +12 -0
- package/dist/db/manage/dolt-safe-jsonb.js +61 -0
- package/dist/db/manage/manage-schema.d.ts +487 -487
- package/dist/db/manage/manage-schema.js +40 -39
- package/dist/db/runtime/runtime-schema.d.ts +508 -376
- package/dist/db/runtime/runtime-schema.js +20 -1
- package/dist/dolt/ref-helpers.js +15 -1
- package/dist/dolt/ref-scope.js +29 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +5 -4
- package/dist/setup/setup.d.ts +3 -1
- package/dist/setup/setup.js +14 -10
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +3 -3
- package/dist/utils/jwt-helpers.d.ts +2 -3
- package/dist/utils/jwt-helpers.js +2 -3
- package/dist/utils/retry-client.d.ts +8 -0
- package/dist/utils/retry-client.js +29 -0
- package/dist/utils/service-token-auth.d.ts +3 -0
- package/dist/utils/service-token-auth.js +5 -2
- package/dist/utils/temp-jwt.d.ts +1 -6
- package/dist/utils/temp-jwt.js +1 -12
- package/dist/utils/work-app-mcp.js +1 -2
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas/skills.d.ts +35 -35
- package/dist/validation/schemas.d.ts +2012 -2012
- package/drizzle/runtime/0031_fantastic_gorilla_man.sql +13 -0
- package/drizzle/runtime/meta/0031_snapshot.json +4872 -0
- package/drizzle/runtime/meta/_journal.json +7 -0
- package/package.json +6 -2
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { PgJsonb, PgJsonbBuilder } from "drizzle-orm/pg-core";
|
|
2
|
+
|
|
3
|
+
//#region src/db/manage/dolt-safe-jsonb.ts
|
|
4
|
+
/**
|
|
5
|
+
* Workaround for Doltgres JSON parser bug.
|
|
6
|
+
*
|
|
7
|
+
* Doltgres has an off-by-one error in its JSON escape-sequence state machine:
|
|
8
|
+
* after parsing `\\` (escaped backslash), the parser doesn't reset to normal
|
|
9
|
+
* mode, so the next character is incorrectly treated as an escape character.
|
|
10
|
+
*
|
|
11
|
+
* The workaround encodes literal backslash characters in string values as a
|
|
12
|
+
* Unicode Private-Use-Area character (U+E000) before JSON.stringify, so the
|
|
13
|
+
* serialised JSON never contains `\\`. On read the placeholder is decoded back.
|
|
14
|
+
*
|
|
15
|
+
* Usage: import { jsonb } from './dolt-safe-jsonb' instead of from 'drizzle-orm/pg-core'.
|
|
16
|
+
* All existing .$type<T>(), .notNull(), .default() chains work unchanged.
|
|
17
|
+
*/
|
|
18
|
+
const BACKSLASH_PLACEHOLDER = "";
|
|
19
|
+
function encodeBackslashes(value) {
|
|
20
|
+
if (typeof value === "string") return value.replaceAll("\0", "").replaceAll("\\", BACKSLASH_PLACEHOLDER);
|
|
21
|
+
if (Array.isArray(value)) return value.map(encodeBackslashes);
|
|
22
|
+
if (value !== null && typeof value === "object") {
|
|
23
|
+
const out = {};
|
|
24
|
+
for (const [k, v] of Object.entries(value)) out[k] = encodeBackslashes(v);
|
|
25
|
+
return out;
|
|
26
|
+
}
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
function decodeBackslashes(value) {
|
|
30
|
+
if (typeof value === "string") return value.replaceAll(BACKSLASH_PLACEHOLDER, "\\");
|
|
31
|
+
if (Array.isArray(value)) return value.map(decodeBackslashes);
|
|
32
|
+
if (value !== null && typeof value === "object") {
|
|
33
|
+
const out = {};
|
|
34
|
+
for (const [k, v] of Object.entries(value)) out[k] = decodeBackslashes(v);
|
|
35
|
+
return out;
|
|
36
|
+
}
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
var DoltSafeJsonb = class extends PgJsonb {
|
|
40
|
+
mapToDriverValue(value) {
|
|
41
|
+
return super.mapToDriverValue(encodeBackslashes(value));
|
|
42
|
+
}
|
|
43
|
+
mapFromDriverValue(value) {
|
|
44
|
+
return decodeBackslashes(super.mapFromDriverValue(value));
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
var DoltSafeJsonbBuilder = class extends PgJsonbBuilder {
|
|
48
|
+
build(table) {
|
|
49
|
+
return new DoltSafeJsonb(table, this.config);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Drop-in replacement for drizzle-orm's `jsonb()`.
|
|
54
|
+
* Encodes backslashes on write and decodes on read to work around the Doltgres bug.
|
|
55
|
+
*/
|
|
56
|
+
function jsonb(name) {
|
|
57
|
+
return new DoltSafeJsonbBuilder(name);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
export { decodeBackslashes, encodeBackslashes, jsonb };
|