@inkeep/agents-core 0.0.0-dev-20260121184116 ā 0.0.0-dev-20260121211317
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 +22 -22
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/client-exports.d.ts +0 -1
- package/dist/data-access/manage/agents.d.ts +21 -21
- package/dist/data-access/manage/artifactComponents.d.ts +12 -12
- package/dist/data-access/manage/contextConfigs.d.ts +12 -12
- package/dist/data-access/manage/dataComponents.d.ts +8 -8
- package/dist/data-access/manage/functionTools.d.ts +14 -14
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentRelations.d.ts +28 -28
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgents.d.ts +15 -15
- package/dist/data-access/manage/tools.d.ts +33 -33
- package/dist/data-access/manage/tools.js +2 -16
- package/dist/data-access/runtime/apiKeys.d.ts +20 -20
- package/dist/data-access/runtime/conversations.d.ts +24 -24
- package/dist/data-access/runtime/messages.d.ts +15 -15
- package/dist/data-access/runtime/tasks.d.ts +7 -7
- package/dist/db/manage/manage-schema.d.ts +375 -375
- package/dist/db/runtime/runtime-schema.d.ts +175 -175
- package/dist/validation/schemas.d.ts +1274 -1274
- package/package.json +1 -2
- package/dist/db/migrations/cleanup-old-trigger-auth.d.ts +0 -1
- package/dist/db/migrations/cleanup-old-trigger-auth.js +0 -68
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-core",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260121211317",
|
|
4
4
|
"description": "Agents Core contains the database schema, types, and validation schemas for Inkeep Agent Framework, along with core components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -194,7 +194,6 @@
|
|
|
194
194
|
"db:reset": "pnpm db:delete && pnpm db:migrate",
|
|
195
195
|
"db:studio": "echo 'Use db:manage:studio or db:run:studio'",
|
|
196
196
|
"db:check": "pnpm db:manage:check && pnpm db:run:check",
|
|
197
|
-
"db:migrate:cleanup-old-triggers": "tsx src/db/migrations/cleanup-old-trigger-auth.ts",
|
|
198
197
|
"db:manage:generate": "drizzle-kit generate --config=drizzle.manage.config.ts",
|
|
199
198
|
"db:manage:migrate": "tsx src/dolt/migrate-dolt.ts",
|
|
200
199
|
"db:manage:sync-all-branches": "tsx src/dolt/migrate-all-branches.ts",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { loadEnvironmentFiles } from "../../env.js";
|
|
2
|
-
import { getLogger } from "../../utils/logger.js";
|
|
3
|
-
import { createAgentsManageDatabaseClient } from "../manage/manage-client.js";
|
|
4
|
-
import { sql } from "drizzle-orm";
|
|
5
|
-
|
|
6
|
-
//#region src/db/migrations/cleanup-old-trigger-auth.ts
|
|
7
|
-
/**
|
|
8
|
-
* Migration Script: Clean up triggers with old authentication format
|
|
9
|
-
*
|
|
10
|
-
* This migration removes all triggers that have the old authentication format.
|
|
11
|
-
* The old format used:
|
|
12
|
-
* { type: 'api_key' | 'basic_auth' | 'bearer_token' | 'none', data: {...} }
|
|
13
|
-
*
|
|
14
|
-
* The new format uses:
|
|
15
|
-
* { headers: [{ name: string, valueHash: string, valuePrefix: string }] }
|
|
16
|
-
*
|
|
17
|
-
* Existing triggers with the old format will fail validation, so this script
|
|
18
|
-
* removes them. Users will need to recreate their triggers with the new format.
|
|
19
|
-
*
|
|
20
|
-
* Usage:
|
|
21
|
-
* pnpm db:migrate:cleanup-old-triggers
|
|
22
|
-
*/
|
|
23
|
-
const logger = getLogger("migration:cleanup-old-trigger-auth");
|
|
24
|
-
async function cleanupOldTriggerAuth() {
|
|
25
|
-
loadEnvironmentFiles();
|
|
26
|
-
const connectionString = process.env.INKEEP_AGENTS_MANAGE_DATABASE_URL;
|
|
27
|
-
if (!connectionString) {
|
|
28
|
-
console.error("ā INKEEP_AGENTS_MANAGE_DATABASE_URL not set");
|
|
29
|
-
process.exit(1);
|
|
30
|
-
}
|
|
31
|
-
const db = createAgentsManageDatabaseClient({ connectionString });
|
|
32
|
-
console.log("š Checking for triggers with old authentication format...\n");
|
|
33
|
-
const triggersToDelete = (await db.execute(sql`
|
|
34
|
-
SELECT tenant_id, project_id, agent_id, id, name
|
|
35
|
-
FROM triggers
|
|
36
|
-
WHERE authentication IS NOT NULL
|
|
37
|
-
AND authentication->>'type' IS NOT NULL
|
|
38
|
-
`)).rows || [];
|
|
39
|
-
if (triggersToDelete.length === 0) {
|
|
40
|
-
console.log("ā
No triggers with old authentication format found. Nothing to do.\n");
|
|
41
|
-
process.exit(0);
|
|
42
|
-
}
|
|
43
|
-
console.log(`Found ${triggersToDelete.length} trigger(s) with old authentication format:\n`);
|
|
44
|
-
for (const trigger of triggersToDelete) {
|
|
45
|
-
console.log(` - ${trigger.name} (ID: ${trigger.id})`);
|
|
46
|
-
console.log(` Tenant: ${trigger.tenant_id}, Project: ${trigger.project_id}, Agent: ${trigger.agent_id}`);
|
|
47
|
-
}
|
|
48
|
-
console.log("\nā ļø These triggers will be DELETED because they use the old authentication format.");
|
|
49
|
-
console.log(" Users will need to recreate them with the new header-based authentication.\n");
|
|
50
|
-
await db.execute(sql`
|
|
51
|
-
DELETE FROM triggers
|
|
52
|
-
WHERE authentication IS NOT NULL
|
|
53
|
-
AND authentication->>'type' IS NOT NULL
|
|
54
|
-
`);
|
|
55
|
-
console.log(`ā
Deleted ${triggersToDelete.length} trigger(s) with old authentication format.\n`);
|
|
56
|
-
logger.info({
|
|
57
|
-
deletedCount: triggersToDelete.length,
|
|
58
|
-
triggers: triggersToDelete
|
|
59
|
-
}, "Cleaned up triggers with old authentication format");
|
|
60
|
-
process.exit(0);
|
|
61
|
-
}
|
|
62
|
-
cleanupOldTriggerAuth().catch((error) => {
|
|
63
|
-
console.error("ā Migration failed:", error);
|
|
64
|
-
process.exit(1);
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
//#endregion
|
|
68
|
-
export { };
|