@inkeep/agents-core 0.0.0-dev-20260120222159 → 0.0.0-dev-20260121022749

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.
Files changed (64) hide show
  1. package/dist/auth/auth.d.ts +53 -53
  2. package/dist/auth/auth.js +1 -1
  3. package/dist/auth/permissions.d.ts +13 -13
  4. package/dist/context/ContextConfig.js +3 -3
  5. package/dist/data-access/index.d.ts +5 -5
  6. package/dist/data-access/index.js +5 -5
  7. package/dist/data-access/manage/agents.d.ts +37 -37
  8. package/dist/data-access/manage/artifactComponents.d.ts +12 -12
  9. package/dist/data-access/manage/contextConfigs.d.ts +12 -12
  10. package/dist/data-access/manage/dataComponents.d.ts +6 -6
  11. package/dist/data-access/manage/evalConfig.d.ts +12 -2
  12. package/dist/data-access/manage/evalConfig.js +25 -1
  13. package/dist/data-access/manage/functionTools.d.ts +14 -14
  14. package/dist/data-access/manage/projectFull.d.ts +0 -4
  15. package/dist/data-access/manage/projectFull.js +8 -21
  16. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
  17. package/dist/data-access/manage/subAgentRelations.d.ts +36 -36
  18. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
  19. package/dist/data-access/manage/subAgents.d.ts +27 -27
  20. package/dist/data-access/manage/tools.d.ts +41 -34
  21. package/dist/data-access/manage/tools.js +9 -1
  22. package/dist/data-access/manage/triggers.d.ts +0 -4
  23. package/dist/data-access/manage/triggers.js +1 -15
  24. package/dist/data-access/runtime/apiKeys.d.ts +20 -20
  25. package/dist/data-access/runtime/conversations.d.ts +31 -31
  26. package/dist/data-access/runtime/messages.d.ts +18 -18
  27. package/dist/data-access/runtime/organizations.d.ts +10 -1
  28. package/dist/data-access/runtime/organizations.js +13 -1
  29. package/dist/data-access/runtime/tasks.d.ts +7 -7
  30. package/dist/db/manage/manage-client.d.ts +3 -1
  31. package/dist/db/manage/manage-client.js +13 -1
  32. package/dist/db/manage/manage-schema.d.ts +375 -375
  33. package/dist/db/migrations/cleanup-old-trigger-auth.d.ts +1 -0
  34. package/dist/db/migrations/cleanup-old-trigger-auth.js +68 -0
  35. package/dist/db/runtime/runtime-schema.d.ts +181 -181
  36. package/dist/dolt/branch.d.ts +4 -53
  37. package/dist/dolt/branch.js +23 -81
  38. package/dist/dolt/branches-api.js +1 -1
  39. package/dist/dolt/index.d.ts +5 -3
  40. package/dist/dolt/index.js +5 -3
  41. package/dist/dolt/migrate-all-branches.js +1 -1
  42. package/dist/dolt/{ref.d.ts → ref-helpers.d.ts} +5 -2
  43. package/dist/dolt/{ref.js → ref-helpers.js} +15 -3
  44. package/dist/dolt/ref-middleware.d.ts +82 -0
  45. package/dist/dolt/ref-middleware.js +217 -0
  46. package/dist/dolt/ref-scope.d.ts +101 -0
  47. package/dist/dolt/ref-scope.js +231 -0
  48. package/dist/env.d.ts +2 -2
  49. package/dist/env.js +1 -1
  50. package/dist/index.d.ts +12 -10
  51. package/dist/index.js +15 -13
  52. package/dist/types/entities.d.ts +3 -2
  53. package/dist/types/index.d.ts +2 -2
  54. package/dist/utils/index.d.ts +2 -2
  55. package/dist/utils/index.js +2 -2
  56. package/dist/utils/third-party-mcp-servers/composio-client.js +23 -23
  57. package/dist/utils/trigger-auth.d.ts +37 -7
  58. package/dist/utils/trigger-auth.js +72 -77
  59. package/dist/validation/dolt-schemas.d.ts +1 -1
  60. package/dist/validation/index.d.ts +2 -2
  61. package/dist/validation/index.js +2 -2
  62. package/dist/validation/schemas.d.ts +473 -486
  63. package/dist/validation/schemas.js +23 -28
  64. package/package.json +2 -1
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,68 @@
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 { };