@inkeep/agents-core 0.70.1 → 0.70.2

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 (54) hide show
  1. package/dist/auth/auth-schema.d.ts +163 -163
  2. package/dist/auth/auth-validation-schemas.d.ts +154 -154
  3. package/dist/auth/permissions.d.ts +9 -9
  4. package/dist/client-exports.d.ts +2 -2
  5. package/dist/client-exports.js +2 -2
  6. package/dist/data-access/index.d.ts +4 -2
  7. package/dist/data-access/index.js +4 -2
  8. package/dist/data-access/manage/agents.d.ts +16 -16
  9. package/dist/data-access/manage/artifactComponents.d.ts +6 -6
  10. package/dist/data-access/manage/contextConfigs.d.ts +4 -4
  11. package/dist/data-access/manage/dataComponents.d.ts +2 -2
  12. package/dist/data-access/manage/functionTools.d.ts +6 -6
  13. package/dist/data-access/manage/improvementRowRevert.d.ts +29 -0
  14. package/dist/data-access/manage/improvementRowRevert.js +84 -0
  15. package/dist/data-access/manage/skills.d.ts +10 -10
  16. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
  17. package/dist/data-access/manage/subAgentRelations.d.ts +10 -10
  18. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +12 -12
  19. package/dist/data-access/manage/subAgents.d.ts +12 -12
  20. package/dist/data-access/manage/tools.d.ts +18 -18
  21. package/dist/data-access/manage/triggers.d.ts +4 -4
  22. package/dist/data-access/runtime/apiKeys.d.ts +8 -8
  23. package/dist/data-access/runtime/apps.d.ts +11 -11
  24. package/dist/data-access/runtime/conversations.d.ts +24 -24
  25. package/dist/data-access/runtime/feedback.d.ts +16 -5
  26. package/dist/data-access/runtime/feedback.js +18 -2
  27. package/dist/data-access/runtime/improvementRuns.d.ts +49 -0
  28. package/dist/data-access/runtime/improvementRuns.js +41 -0
  29. package/dist/data-access/runtime/messages.d.ts +21 -21
  30. package/dist/data-access/runtime/scheduledTriggerUsers.d.ts +1 -1
  31. package/dist/data-access/runtime/tasks.d.ts +6 -6
  32. package/dist/db/manage/manage-schema.d.ts +362 -362
  33. package/dist/db/runtime/runtime-schema.d.ts +195 -12
  34. package/dist/db/runtime/runtime-schema.js +18 -1
  35. package/dist/dolt/diff.d.ts +2 -1
  36. package/dist/dolt/fk-map.d.ts +10 -1
  37. package/dist/dolt/fk-map.js +37 -1
  38. package/dist/dolt/index.d.ts +3 -3
  39. package/dist/dolt/index.js +3 -3
  40. package/dist/dolt/pk-map.d.ts +5 -1
  41. package/dist/dolt/pk-map.js +17 -1
  42. package/dist/index.d.ts +8 -6
  43. package/dist/index.js +8 -6
  44. package/dist/utils/error.d.ts +51 -51
  45. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  46. package/dist/validation/index.d.ts +2 -2
  47. package/dist/validation/index.js +2 -2
  48. package/dist/validation/schemas/skills.d.ts +44 -44
  49. package/dist/validation/schemas.d.ts +2338 -2105
  50. package/dist/validation/schemas.js +131 -2
  51. package/drizzle/runtime/0038_windy_kinsey_walden.sql +15 -0
  52. package/drizzle/runtime/meta/0038_snapshot.json +6111 -0
  53. package/drizzle/runtime/meta/_journal.json +7 -0
  54. package/package.json +1 -1
@@ -7,7 +7,7 @@ import * as drizzle_orm_pg_core1561 from "drizzle-orm/pg-core";
7
7
 
8
8
  //#region src/db/runtime/runtime-schema.d.ts
9
9
  declare namespace runtime_schema_d_exports {
10
- export { GenerationType, USAGE_GENERATION_TYPES, account, apiKeys, apps, contextCache, conversations, conversationsRelations, datasetRun, datasetRunConversationRelations, deviceCode, evaluationResult, evaluationRun, feedback, feedbackRelations, invitation, invitationProjectAssignment, jwks, ledgerArtifacts, ledgerArtifactsRelations, member, messages, messagesRelations, oauthAccessToken, oauthClient, oauthConsent, oauthRefreshToken, orgEntitlement, organization, projectMetadata, scheduledTriggerInvocations, scheduledTriggerUsers, scheduledTriggers, schedulerState, session, ssoProvider, streamChunks, taskRelations, taskRelationsRelations, tasks, tasksRelations, triggerInvocations, user, userProfile, userProfileRelations, verification, workAppGitHubInstallations, workAppGitHubInstallationsRelations, workAppGitHubMcpToolAccessMode, workAppGitHubMcpToolRepositoryAccess, workAppGitHubMcpToolRepositoryAccessRelations, workAppGitHubProjectAccessMode, workAppGitHubProjectRepositoryAccess, workAppGitHubProjectRepositoryAccessRelations, workAppGitHubRepositories, workAppGitHubRepositoriesRelations, workAppSlackChannelAgentConfigs, workAppSlackMcpToolAccessConfig, workAppSlackUserMappings, workAppSlackWorkspaces, workflowExecutions };
10
+ export { GenerationType, USAGE_GENERATION_TYPES, account, apiKeys, apps, coPilotRuns, contextCache, conversations, conversationsRelations, datasetRun, datasetRunConversationRelations, deviceCode, evaluationResult, evaluationRun, feedback, feedbackRelations, invitation, invitationProjectAssignment, jwks, ledgerArtifacts, ledgerArtifactsRelations, member, messages, messagesRelations, oauthAccessToken, oauthClient, oauthConsent, oauthRefreshToken, orgEntitlement, organization, projectMetadata, scheduledTriggerInvocations, scheduledTriggerUsers, scheduledTriggers, schedulerState, session, ssoProvider, streamChunks, taskRelations, taskRelationsRelations, tasks, tasksRelations, triggerInvocations, user, userProfile, userProfileRelations, verification, workAppGitHubInstallations, workAppGitHubInstallationsRelations, workAppGitHubMcpToolAccessMode, workAppGitHubMcpToolRepositoryAccess, workAppGitHubMcpToolRepositoryAccessRelations, workAppGitHubProjectAccessMode, workAppGitHubProjectRepositoryAccess, workAppGitHubProjectRepositoryAccessRelations, workAppGitHubRepositories, workAppGitHubRepositoriesRelations, workAppSlackChannelAgentConfigs, workAppSlackMcpToolAccessConfig, workAppSlackUserMappings, workAppSlackWorkspaces, workflowExecutions };
11
11
  }
12
12
  /**
13
13
  * Runtime projects table - source of truth for which projects exist in a tenant.
@@ -1358,7 +1358,7 @@ declare const apps: drizzle_orm_pg_core1561.PgTableWithColumns<{
1358
1358
  publicKeys: {
1359
1359
  kid: string;
1360
1360
  publicKey: string;
1361
- algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
1361
+ algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
1362
1362
  addedAt: string;
1363
1363
  }[];
1364
1364
  allowAnonymous: boolean;
@@ -1399,7 +1399,7 @@ declare const apps: drizzle_orm_pg_core1561.PgTableWithColumns<{
1399
1399
  publicKeys: {
1400
1400
  kid: string;
1401
1401
  publicKey: string;
1402
- algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
1402
+ algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
1403
1403
  addedAt: string;
1404
1404
  }[];
1405
1405
  allowAnonymous: boolean;
@@ -3975,6 +3975,189 @@ declare const feedback: drizzle_orm_pg_core1561.PgTableWithColumns<{
3975
3975
  };
3976
3976
  dialect: "pg";
3977
3977
  }>;
3978
+ declare const coPilotRuns: drizzle_orm_pg_core1561.PgTableWithColumns<{
3979
+ name: "copilot_runs";
3980
+ schema: undefined;
3981
+ columns: {
3982
+ createdAt: drizzle_orm_pg_core1561.PgColumn<{
3983
+ name: "created_at";
3984
+ tableName: "copilot_runs";
3985
+ dataType: "string";
3986
+ columnType: "PgTimestampString";
3987
+ data: string;
3988
+ driverParam: string;
3989
+ notNull: true;
3990
+ hasDefault: true;
3991
+ isPrimaryKey: false;
3992
+ isAutoincrement: false;
3993
+ hasRuntimeDefault: false;
3994
+ enumValues: undefined;
3995
+ baseColumn: never;
3996
+ identity: undefined;
3997
+ generated: undefined;
3998
+ }, {}, {}>;
3999
+ updatedAt: drizzle_orm_pg_core1561.PgColumn<{
4000
+ name: "updated_at";
4001
+ tableName: "copilot_runs";
4002
+ dataType: "string";
4003
+ columnType: "PgTimestampString";
4004
+ data: string;
4005
+ driverParam: string;
4006
+ notNull: true;
4007
+ hasDefault: true;
4008
+ isPrimaryKey: false;
4009
+ isAutoincrement: false;
4010
+ hasRuntimeDefault: false;
4011
+ enumValues: undefined;
4012
+ baseColumn: never;
4013
+ identity: undefined;
4014
+ generated: undefined;
4015
+ }, {}, {}>;
4016
+ ref: drizzle_orm_pg_core1561.PgColumn<{
4017
+ name: "ref";
4018
+ tableName: "copilot_runs";
4019
+ dataType: "json";
4020
+ columnType: "PgJsonb";
4021
+ data: {
4022
+ type: "commit" | "tag" | "branch";
4023
+ name: string;
4024
+ hash: string;
4025
+ };
4026
+ driverParam: unknown;
4027
+ notNull: false;
4028
+ hasDefault: false;
4029
+ isPrimaryKey: false;
4030
+ isAutoincrement: false;
4031
+ hasRuntimeDefault: false;
4032
+ enumValues: undefined;
4033
+ baseColumn: never;
4034
+ identity: undefined;
4035
+ generated: undefined;
4036
+ }, {}, {
4037
+ $type: {
4038
+ type: "commit" | "tag" | "branch";
4039
+ name: string;
4040
+ hash: string;
4041
+ };
4042
+ }>;
4043
+ conversationId: drizzle_orm_pg_core1561.PgColumn<{
4044
+ name: "conversation_id";
4045
+ tableName: "copilot_runs";
4046
+ dataType: "string";
4047
+ columnType: "PgVarchar";
4048
+ data: string;
4049
+ driverParam: string;
4050
+ notNull: true;
4051
+ hasDefault: false;
4052
+ isPrimaryKey: false;
4053
+ isAutoincrement: false;
4054
+ hasRuntimeDefault: false;
4055
+ enumValues: [string, ...string[]];
4056
+ baseColumn: never;
4057
+ identity: undefined;
4058
+ generated: undefined;
4059
+ }, {}, {
4060
+ length: 256;
4061
+ }>;
4062
+ feedbackIds: drizzle_orm_pg_core1561.PgColumn<{
4063
+ name: "feedback_ids";
4064
+ tableName: "copilot_runs";
4065
+ dataType: "json";
4066
+ columnType: "PgJsonb";
4067
+ data: string[];
4068
+ driverParam: unknown;
4069
+ notNull: false;
4070
+ hasDefault: false;
4071
+ isPrimaryKey: false;
4072
+ isAutoincrement: false;
4073
+ hasRuntimeDefault: false;
4074
+ enumValues: undefined;
4075
+ baseColumn: never;
4076
+ identity: undefined;
4077
+ generated: undefined;
4078
+ }, {}, {
4079
+ $type: string[];
4080
+ }>;
4081
+ status: drizzle_orm_pg_core1561.PgColumn<{
4082
+ name: "status";
4083
+ tableName: "copilot_runs";
4084
+ dataType: "string";
4085
+ columnType: "PgVarchar";
4086
+ data: "failed" | "running" | "completed" | "suspended";
4087
+ driverParam: string;
4088
+ notNull: true;
4089
+ hasDefault: false;
4090
+ isPrimaryKey: false;
4091
+ isAutoincrement: false;
4092
+ hasRuntimeDefault: false;
4093
+ enumValues: [string, ...string[]];
4094
+ baseColumn: never;
4095
+ identity: undefined;
4096
+ generated: undefined;
4097
+ }, {}, {
4098
+ length: 50;
4099
+ $type: "failed" | "running" | "completed" | "suspended";
4100
+ }>;
4101
+ projectId: drizzle_orm_pg_core1561.PgColumn<{
4102
+ name: "project_id";
4103
+ tableName: "copilot_runs";
4104
+ dataType: "string";
4105
+ columnType: "PgVarchar";
4106
+ data: string;
4107
+ driverParam: string;
4108
+ notNull: true;
4109
+ hasDefault: false;
4110
+ isPrimaryKey: false;
4111
+ isAutoincrement: false;
4112
+ hasRuntimeDefault: false;
4113
+ enumValues: [string, ...string[]];
4114
+ baseColumn: never;
4115
+ identity: undefined;
4116
+ generated: undefined;
4117
+ }, {}, {
4118
+ length: 256;
4119
+ }>;
4120
+ tenantId: drizzle_orm_pg_core1561.PgColumn<{
4121
+ name: "tenant_id";
4122
+ tableName: "copilot_runs";
4123
+ dataType: "string";
4124
+ columnType: "PgVarchar";
4125
+ data: string;
4126
+ driverParam: string;
4127
+ notNull: true;
4128
+ hasDefault: false;
4129
+ isPrimaryKey: false;
4130
+ isAutoincrement: false;
4131
+ hasRuntimeDefault: false;
4132
+ enumValues: [string, ...string[]];
4133
+ baseColumn: never;
4134
+ identity: undefined;
4135
+ generated: undefined;
4136
+ }, {}, {
4137
+ length: 256;
4138
+ }>;
4139
+ id: drizzle_orm_pg_core1561.PgColumn<{
4140
+ name: "id";
4141
+ tableName: "copilot_runs";
4142
+ dataType: "string";
4143
+ columnType: "PgVarchar";
4144
+ data: string;
4145
+ driverParam: string;
4146
+ notNull: true;
4147
+ hasDefault: false;
4148
+ isPrimaryKey: false;
4149
+ isAutoincrement: false;
4150
+ hasRuntimeDefault: false;
4151
+ enumValues: [string, ...string[]];
4152
+ baseColumn: never;
4153
+ identity: undefined;
4154
+ generated: undefined;
4155
+ }, {}, {
4156
+ length: 256;
4157
+ }>;
4158
+ };
4159
+ dialect: "pg";
4160
+ }>;
3978
4161
  declare const taskRelations: drizzle_orm_pg_core1561.PgTableWithColumns<{
3979
4162
  name: "task_relations";
3980
4163
  schema: undefined;
@@ -5666,7 +5849,7 @@ declare const workAppGitHubInstallations: drizzle_orm_pg_core1561.PgTableWithCol
5666
5849
  tableName: "work_app_github_installations";
5667
5850
  dataType: "string";
5668
5851
  columnType: "PgVarchar";
5669
- data: "Organization" | "User";
5852
+ data: "User" | "Organization";
5670
5853
  driverParam: string;
5671
5854
  notNull: true;
5672
5855
  hasDefault: false;
@@ -5679,7 +5862,7 @@ declare const workAppGitHubInstallations: drizzle_orm_pg_core1561.PgTableWithCol
5679
5862
  generated: undefined;
5680
5863
  }, {}, {
5681
5864
  length: 20;
5682
- $type: "Organization" | "User";
5865
+ $type: "User" | "Organization";
5683
5866
  }>;
5684
5867
  status: drizzle_orm_pg_core1561.PgColumn<{
5685
5868
  name: "status";
@@ -6253,7 +6436,7 @@ declare const workAppGitHubProjectAccessMode: drizzle_orm_pg_core1561.PgTableWit
6253
6436
  tableName: "work_app_github_project_access_mode";
6254
6437
  dataType: "string";
6255
6438
  columnType: "PgVarchar";
6256
- data: "all" | "selected";
6439
+ data: "selected" | "all";
6257
6440
  driverParam: string;
6258
6441
  notNull: true;
6259
6442
  hasDefault: false;
@@ -6266,7 +6449,7 @@ declare const workAppGitHubProjectAccessMode: drizzle_orm_pg_core1561.PgTableWit
6266
6449
  generated: undefined;
6267
6450
  }, {}, {
6268
6451
  length: 20;
6269
- $type: "all" | "selected";
6452
+ $type: "selected" | "all";
6270
6453
  }>;
6271
6454
  };
6272
6455
  dialect: "pg";
@@ -6377,7 +6560,7 @@ declare const workAppGitHubMcpToolAccessMode: drizzle_orm_pg_core1561.PgTableWit
6377
6560
  tableName: "work_app_github_mcp_tool_access_mode";
6378
6561
  dataType: "string";
6379
6562
  columnType: "PgVarchar";
6380
- data: "all" | "selected";
6563
+ data: "selected" | "all";
6381
6564
  driverParam: string;
6382
6565
  notNull: true;
6383
6566
  hasDefault: false;
@@ -6390,7 +6573,7 @@ declare const workAppGitHubMcpToolAccessMode: drizzle_orm_pg_core1561.PgTableWit
6390
6573
  generated: undefined;
6391
6574
  }, {}, {
6392
6575
  length: 20;
6393
- $type: "all" | "selected";
6576
+ $type: "selected" | "all";
6394
6577
  }>;
6395
6578
  };
6396
6579
  dialect: "pg";
@@ -6509,7 +6692,7 @@ declare const workAppSlackMcpToolAccessConfig: drizzle_orm_pg_core1561.PgTableWi
6509
6692
  tableName: "work_app_slack_mcp_tool_access_config";
6510
6693
  dataType: "string";
6511
6694
  columnType: "PgVarchar";
6512
- data: "all" | "selected";
6695
+ data: "selected" | "all";
6513
6696
  driverParam: string;
6514
6697
  notNull: true;
6515
6698
  hasDefault: false;
@@ -6522,7 +6705,7 @@ declare const workAppSlackMcpToolAccessConfig: drizzle_orm_pg_core1561.PgTableWi
6522
6705
  generated: undefined;
6523
6706
  }, {}, {
6524
6707
  length: 20;
6525
- $type: "all" | "selected";
6708
+ $type: "selected" | "all";
6526
6709
  }>;
6527
6710
  dmEnabled: drizzle_orm_pg_core1561.PgColumn<{
6528
6711
  name: "dm_enabled";
@@ -6769,4 +6952,4 @@ declare const orgEntitlement: drizzle_orm_pg_core1561.PgTableWithColumns<{
6769
6952
  dialect: "pg";
6770
6953
  }>;
6771
6954
  //#endregion
6772
- export { GenerationType, USAGE_GENERATION_TYPES, account, apiKeys, apps, contextCache, conversations, conversationsRelations, datasetRun, datasetRunConversationRelations, deviceCode, evaluationResult, evaluationRun, feedback, feedbackRelations, invitation, invitationProjectAssignment, jwks, ledgerArtifacts, ledgerArtifactsRelations, member, messages, messagesRelations, oauthAccessToken, oauthClient, oauthConsent, oauthRefreshToken, orgEntitlement, organization, projectMetadata, runtime_schema_d_exports, scheduledTriggerInvocations, scheduledTriggerUsers, scheduledTriggers, schedulerState, session, ssoProvider, streamChunks, taskRelations, taskRelationsRelations, tasks, tasksRelations, triggerInvocations, user, userProfile, userProfileRelations, verification, workAppGitHubInstallations, workAppGitHubInstallationsRelations, workAppGitHubMcpToolAccessMode, workAppGitHubMcpToolRepositoryAccess, workAppGitHubMcpToolRepositoryAccessRelations, workAppGitHubProjectAccessMode, workAppGitHubProjectRepositoryAccess, workAppGitHubProjectRepositoryAccessRelations, workAppGitHubRepositories, workAppGitHubRepositoriesRelations, workAppSlackChannelAgentConfigs, workAppSlackMcpToolAccessConfig, workAppSlackUserMappings, workAppSlackWorkspaces, workflowExecutions };
6955
+ export { GenerationType, USAGE_GENERATION_TYPES, account, apiKeys, apps, coPilotRuns, contextCache, conversations, conversationsRelations, datasetRun, datasetRunConversationRelations, deviceCode, evaluationResult, evaluationRun, feedback, feedbackRelations, invitation, invitationProjectAssignment, jwks, ledgerArtifacts, ledgerArtifactsRelations, member, messages, messagesRelations, oauthAccessToken, oauthClient, oauthConsent, oauthRefreshToken, orgEntitlement, organization, projectMetadata, runtime_schema_d_exports, scheduledTriggerInvocations, scheduledTriggerUsers, scheduledTriggers, schedulerState, session, ssoProvider, streamChunks, taskRelations, taskRelationsRelations, tasks, tasksRelations, triggerInvocations, user, userProfile, userProfileRelations, verification, workAppGitHubInstallations, workAppGitHubInstallationsRelations, workAppGitHubMcpToolAccessMode, workAppGitHubMcpToolRepositoryAccess, workAppGitHubMcpToolRepositoryAccessRelations, workAppGitHubProjectAccessMode, workAppGitHubProjectRepositoryAccess, workAppGitHubProjectRepositoryAccessRelations, workAppGitHubRepositories, workAppGitHubRepositoriesRelations, workAppSlackChannelAgentConfigs, workAppSlackMcpToolAccessConfig, workAppSlackUserMappings, workAppSlackWorkspaces, workflowExecutions };
@@ -10,6 +10,7 @@ var runtime_schema_exports = /* @__PURE__ */ __exportAll({
10
10
  account: () => account,
11
11
  apiKeys: () => apiKeys,
12
12
  apps: () => apps,
13
+ coPilotRuns: () => coPilotRuns,
13
14
  contextCache: () => contextCache,
14
15
  conversations: () => conversations,
15
16
  conversationsRelations: () => conversationsRelations,
@@ -487,6 +488,22 @@ const feedback = pgTable("feedback", {
487
488
  name: "feedback_message_fk"
488
489
  }).onDelete("cascade")
489
490
  ]);
491
+ const coPilotRuns = pgTable("copilot_runs", {
492
+ ...projectScoped,
493
+ ref: jsonb("ref").$type(),
494
+ conversationId: varchar("conversation_id", { length: 256 }).notNull(),
495
+ feedbackIds: jsonb("feedback_ids").$type(),
496
+ status: varchar("status", { length: 50 }).$type().notNull(),
497
+ ...timestamps
498
+ }, (table) => [
499
+ primaryKey({ columns: [
500
+ table.tenantId,
501
+ table.projectId,
502
+ table.id
503
+ ] }),
504
+ index("copilot_runs_status_idx").on(table.tenantId, table.projectId, table.status),
505
+ uniqueIndex("copilot_runs_conversation_id_idx").on(table.conversationId)
506
+ ]);
490
507
  const taskRelations = pgTable("task_relations", {
491
508
  ...projectScoped,
492
509
  parentTaskId: varchar("parent_task_id", { length: 256 }).notNull(),
@@ -1033,4 +1050,4 @@ const orgEntitlement = pgTable("org_entitlement", {
1033
1050
  ]);
1034
1051
 
1035
1052
  //#endregion
1036
- export { USAGE_GENERATION_TYPES, account, apiKeys, apps, contextCache, conversations, conversationsRelations, datasetRun, datasetRunConversationRelations, deviceCode, evaluationResult, evaluationRun, feedback, feedbackRelations, invitation, invitationProjectAssignment, jwks, ledgerArtifacts, ledgerArtifactsRelations, member, messages, messagesRelations, oauthAccessToken, oauthClient, oauthConsent, oauthRefreshToken, orgEntitlement, organization, projectMetadata, runtime_schema_exports, scheduledTriggerInvocations, scheduledTriggerUsers, scheduledTriggers, schedulerState, session, ssoProvider, streamChunks, taskRelations, taskRelationsRelations, tasks, tasksRelations, triggerInvocations, user, userProfile, userProfileRelations, verification, workAppGitHubInstallations, workAppGitHubInstallationsRelations, workAppGitHubMcpToolAccessMode, workAppGitHubMcpToolRepositoryAccess, workAppGitHubMcpToolRepositoryAccessRelations, workAppGitHubProjectAccessMode, workAppGitHubProjectRepositoryAccess, workAppGitHubProjectRepositoryAccessRelations, workAppGitHubRepositories, workAppGitHubRepositoriesRelations, workAppSlackChannelAgentConfigs, workAppSlackMcpToolAccessConfig, workAppSlackUserMappings, workAppSlackWorkspaces, workflowExecutions };
1053
+ export { USAGE_GENERATION_TYPES, account, apiKeys, apps, coPilotRuns, contextCache, conversations, conversationsRelations, datasetRun, datasetRunConversationRelations, deviceCode, evaluationResult, evaluationRun, feedback, feedbackRelations, invitation, invitationProjectAssignment, jwks, ledgerArtifacts, ledgerArtifactsRelations, member, messages, messagesRelations, oauthAccessToken, oauthClient, oauthConsent, oauthRefreshToken, orgEntitlement, organization, projectMetadata, runtime_schema_exports, scheduledTriggerInvocations, scheduledTriggerUsers, scheduledTriggers, schedulerState, session, ssoProvider, streamChunks, taskRelations, taskRelationsRelations, tasks, tasksRelations, triggerInvocations, user, userProfile, userProfileRelations, verification, workAppGitHubInstallations, workAppGitHubInstallationsRelations, workAppGitHubMcpToolAccessMode, workAppGitHubMcpToolRepositoryAccess, workAppGitHubMcpToolRepositoryAccessRelations, workAppGitHubProjectAccessMode, workAppGitHubProjectRepositoryAccess, workAppGitHubProjectRepositoryAccessRelations, workAppGitHubRepositories, workAppGitHubRepositoriesRelations, workAppSlackChannelAgentConfigs, workAppSlackMcpToolAccessConfig, workAppSlackUserMappings, workAppSlackWorkspaces, workflowExecutions };
@@ -18,7 +18,8 @@ declare const doltDiffSummary: (db: AgentsManageDatabaseClient) => (params: {
18
18
  toRevision: string;
19
19
  tableName?: string;
20
20
  }) => Promise<{
21
- table_name: string;
21
+ from_table_name: string | null;
22
+ to_table_name: string | null;
22
23
  diff_type: string;
23
24
  data_change: boolean;
24
25
  schema_change: boolean;
@@ -1,5 +1,14 @@
1
1
  //#region src/dolt/fk-map.d.ts
2
2
  type FkDeps = Record<string, string[]>;
3
+ interface FkColumnLink {
4
+ childTable: string;
5
+ parentTable: string;
6
+ columns: {
7
+ child: string;
8
+ parent: string;
9
+ }[];
10
+ }
3
11
  declare const manageFkDeps: FkDeps;
12
+ declare const manageFkColumnLinks: FkColumnLink[];
4
13
  //#endregion
5
- export { FkDeps, manageFkDeps };
14
+ export { FkColumnLink, FkDeps, manageFkColumnLinks, manageFkDeps };
@@ -29,6 +29,42 @@ function buildFkDepsFromSchema() {
29
29
  return deps;
30
30
  }
31
31
  const manageFkDeps = buildFkDepsFromSchema();
32
+ function buildFkColumnLinksFromSchema() {
33
+ const links = [];
34
+ for (const value of Object.values(manage_schema_exports)) {
35
+ if (value == null || typeof value !== "object") continue;
36
+ let config;
37
+ try {
38
+ config = getTableConfig(value);
39
+ } catch {
40
+ continue;
41
+ }
42
+ if (!config?.name) continue;
43
+ for (const fk of config.foreignKeys ?? []) {
44
+ const ref = fk.reference();
45
+ let parentName;
46
+ try {
47
+ parentName = getTableConfig(ref.foreignTable).name;
48
+ } catch {
49
+ continue;
50
+ }
51
+ if (!parentName || parentName === config.name) continue;
52
+ const childCols = ref.columns.map((c) => c.name);
53
+ const parentCols = ref.foreignColumns.map((c) => c.name);
54
+ if (childCols.length !== parentCols.length || childCols.length === 0) continue;
55
+ links.push({
56
+ childTable: config.name,
57
+ parentTable: parentName,
58
+ columns: childCols.map((child, i) => ({
59
+ child,
60
+ parent: parentCols[i]
61
+ }))
62
+ });
63
+ }
64
+ }
65
+ return links;
66
+ }
67
+ const manageFkColumnLinks = buildFkColumnLinksFromSchema();
32
68
 
33
69
  //#endregion
34
- export { manageFkDeps };
70
+ export { manageFkColumnLinks, manageFkDeps };
@@ -3,12 +3,12 @@ import { branchScopes, doltActiveBranch, doltBranch, doltBranchExists, doltCheck
3
3
  import { CheckoutBranchParams, CheckoutBranchResult, CreateBranchParams, DeleteBranchParams, GetBranchParams, MAIN_BRANCH_SUFFIX, checkoutBranch, createBranch, deleteBranch, getBranch, getTempBranchSuffix, getTenantMainBranch, invalidBranchParamsError, isProtectedBranchName, isTempBranchName, listBranches, listBranchesForAgent, syncSchemaOnBranch } from "./branches-api.js";
4
4
  import { doltAdd, doltAddAndCommit, doltCommit, doltDeleteTag, doltHashOf, doltListTags, doltLog, doltReset, doltStatus, doltTag } from "./commit.js";
5
5
  import { doltDiff, doltDiffSummary } from "./diff.js";
6
- import { FkDeps, manageFkDeps } from "./fk-map.js";
6
+ import { FkColumnLink, FkDeps, manageFkColumnLinks, manageFkDeps } from "./fk-map.js";
7
7
  import { MergeConflictError, doltAbortMerge, doltConflicts, doltMerge, doltMergeStatus, doltPreviewMergeConflicts, doltPreviewMergeConflictsSummary, doltResolveConflicts, doltSchemaConflicts, doltTableConflicts } from "./merge.js";
8
- import { PkMap, isValidManageTable, managePkMap } from "./pk-map.js";
8
+ import { PkMap, isValidManageTable, managePkMap, manageTableMap } from "./pk-map.js";
9
9
  import { RefType, checkoutRef, getCurrentBranchOrCommit, getProjectMainResolvedRef, getProjectScopedRef, getTenantScopedRef, isRefWritable, isValidCommitHash, resolveProjectMainRefs, resolveRef } from "./ref-helpers.js";
10
10
  import { RefContext, RefMiddlewareOptions, createRefMiddleware, createWriteProtectionMiddleware, isMergeRoute, refMiddlewareFactory, writeProtectionMiddlewareFactory } from "./ref-middleware.js";
11
11
  import { NestedRefScopeError, WithRefOptions, getCurrentRefScope, getRefScopedDb, isInRefScope, withRef } from "./ref-scope.js";
12
12
  import { ResolutionValidationError, applyResolutions, computeTableInsertOrder, sortByFkDependencyOrder } from "./resolve-conflicts.js";
13
13
  import { EnsureSchemaSyncOptions, SCHEMA_SOURCE_BRANCH, SchemaDiff, SchemaSyncOptions, SchemaSyncResult, areBranchesSchemaCompatible, ensureSchemaSync, formatSchemaDiffSummary, getActiveBranch, getSchemaDiff, hasSchemaDifferences, hasUncommittedChanges, isLocalhostUrl, syncSchemaFromMain } from "./schema-sync.js";
14
- export { CheckoutBranchParams, CheckoutBranchResult, CreateBranchParams, DeleteBranchParams, EnsureSchemaSyncOptions, FkDeps, GetBranchParams, MAIN_BRANCH_SUFFIX, MergeConflictError, NestedRefScopeError, PkMap, RefContext, RefMiddlewareOptions, RefType, ResolutionValidationError, SCHEMA_SOURCE_BRANCH, SchemaDiff, SchemaSyncOptions, SchemaSyncResult, WithRefOptions, applyResolutions, areBranchesSchemaCompatible, branchScopes, checkoutBranch, checkoutRef, computeTableInsertOrder, createBranch, createRefMiddleware, createWriteProtectionMiddleware, deleteBranch, doltAbortMerge, doltActiveBranch, doltAdd, doltAddAndCommit, doltBranch, doltBranchExists, doltCheckout, doltCommit, doltConflicts, doltDeleteBranch, doltDeleteTag, doltDiff, doltDiffSummary, doltGetBranchNamespace, doltHashOf, doltListBranches, doltListTags, doltLog, doltMerge, doltMergeStatus, doltPreviewMergeConflicts, doltPreviewMergeConflictsSummary, doltRenameBranch, doltReset, doltResolveConflicts, doltSchemaConflicts, doltStatus, doltTableConflicts, doltTag, ensureBranchExists, ensureSchemaSync, formatSchemaDiffSummary, getActiveBranch, getBranch, getCurrentBranchOrCommit, getCurrentRefScope, getProjectMainResolvedRef, getProjectScopedRef, getRefScopedDb, getSchemaDiff, getTempBranchSuffix, getTenantMainBranch, getTenantScopedRef, hasSchemaDifferences, hasUncommittedChanges, invalidBranchParamsError, isInRefScope, isLocalhostUrl, isMergeRoute, isProtectedBranchName, isRefWritable, isTempBranchName, isValidCommitHash, isValidManageTable, listBranches, listBranchesForAgent, manageFkDeps, managePkMap, refMiddlewareFactory, releaseAdvisoryLock, resolveProjectMainRefs, resolveRef, sortByFkDependencyOrder, syncSchemaFromMain, syncSchemaOnBranch, tryAdvisoryLock, withRef, writeProtectionMiddlewareFactory };
14
+ export { CheckoutBranchParams, CheckoutBranchResult, CreateBranchParams, DeleteBranchParams, EnsureSchemaSyncOptions, FkColumnLink, FkDeps, GetBranchParams, MAIN_BRANCH_SUFFIX, MergeConflictError, NestedRefScopeError, PkMap, RefContext, RefMiddlewareOptions, RefType, ResolutionValidationError, SCHEMA_SOURCE_BRANCH, SchemaDiff, SchemaSyncOptions, SchemaSyncResult, WithRefOptions, applyResolutions, areBranchesSchemaCompatible, branchScopes, checkoutBranch, checkoutRef, computeTableInsertOrder, createBranch, createRefMiddleware, createWriteProtectionMiddleware, deleteBranch, doltAbortMerge, doltActiveBranch, doltAdd, doltAddAndCommit, doltBranch, doltBranchExists, doltCheckout, doltCommit, doltConflicts, doltDeleteBranch, doltDeleteTag, doltDiff, doltDiffSummary, doltGetBranchNamespace, doltHashOf, doltListBranches, doltListTags, doltLog, doltMerge, doltMergeStatus, doltPreviewMergeConflicts, doltPreviewMergeConflictsSummary, doltRenameBranch, doltReset, doltResolveConflicts, doltSchemaConflicts, doltStatus, doltTableConflicts, doltTag, ensureBranchExists, ensureSchemaSync, formatSchemaDiffSummary, getActiveBranch, getBranch, getCurrentBranchOrCommit, getCurrentRefScope, getProjectMainResolvedRef, getProjectScopedRef, getRefScopedDb, getSchemaDiff, getTempBranchSuffix, getTenantMainBranch, getTenantScopedRef, hasSchemaDifferences, hasUncommittedChanges, invalidBranchParamsError, isInRefScope, isLocalhostUrl, isMergeRoute, isProtectedBranchName, isRefWritable, isTempBranchName, isValidCommitHash, isValidManageTable, listBranches, listBranchesForAgent, manageFkColumnLinks, manageFkDeps, managePkMap, manageTableMap, refMiddlewareFactory, releaseAdvisoryLock, resolveProjectMainRefs, resolveRef, sortByFkDependencyOrder, syncSchemaFromMain, syncSchemaOnBranch, tryAdvisoryLock, withRef, writeProtectionMiddlewareFactory };
@@ -1,6 +1,6 @@
1
1
  import { doltAdd, doltAddAndCommit, doltCommit, doltDeleteTag, doltHashOf, doltListTags, doltLog, doltReset, doltStatus, doltTag } from "./commit.js";
2
- import { isValidManageTable, managePkMap } from "./pk-map.js";
3
- import { manageFkDeps } from "./fk-map.js";
2
+ import { isValidManageTable, managePkMap, manageTableMap } from "./pk-map.js";
3
+ import { manageFkColumnLinks, manageFkDeps } from "./fk-map.js";
4
4
  import { ResolutionValidationError, applyResolutions, computeTableInsertOrder, sortByFkDependencyOrder } from "./resolve-conflicts.js";
5
5
  import { MergeConflictError, doltAbortMerge, doltConflicts, doltMerge, doltMergeStatus, doltPreviewMergeConflicts, doltPreviewMergeConflictsSummary, doltResolveConflicts, doltSchemaConflicts, doltTableConflicts } from "./merge.js";
6
6
  import { SCHEMA_SOURCE_BRANCH, areBranchesSchemaCompatible, ensureSchemaSync, formatSchemaDiffSummary, getActiveBranch, getSchemaDiff, hasSchemaDifferences, hasUncommittedChanges, isLocalhostUrl, syncSchemaFromMain } from "./schema-sync.js";
@@ -12,4 +12,4 @@ import { doltDiff, doltDiffSummary } from "./diff.js";
12
12
  import { createRefMiddleware, createWriteProtectionMiddleware, isMergeRoute, refMiddlewareFactory, writeProtectionMiddlewareFactory } from "./ref-middleware.js";
13
13
  import { NestedRefScopeError, getCurrentRefScope, getRefScopedDb, isInRefScope, withRef } from "./ref-scope.js";
14
14
 
15
- export { MAIN_BRANCH_SUFFIX, MergeConflictError, NestedRefScopeError, ResolutionValidationError, SCHEMA_SOURCE_BRANCH, applyResolutions, areBranchesSchemaCompatible, checkoutBranch, checkoutRef, computeTableInsertOrder, createBranch, createRefMiddleware, createWriteProtectionMiddleware, deleteBranch, doltAbortMerge, doltActiveBranch, doltAdd, doltAddAndCommit, doltBranch, doltBranchExists, doltCheckout, doltCommit, doltConflicts, doltDeleteBranch, doltDeleteTag, doltDiff, doltDiffSummary, doltGetBranchNamespace, doltHashOf, doltListBranches, doltListTags, doltLog, doltMerge, doltMergeStatus, doltPreviewMergeConflicts, doltPreviewMergeConflictsSummary, doltRenameBranch, doltReset, doltResolveConflicts, doltSchemaConflicts, doltStatus, doltTableConflicts, doltTag, ensureBranchExists, ensureSchemaSync, formatSchemaDiffSummary, getActiveBranch, getBranch, getCurrentBranchOrCommit, getCurrentRefScope, getProjectMainResolvedRef, getProjectScopedRef, getRefScopedDb, getSchemaDiff, getTempBranchSuffix, getTenantMainBranch, getTenantScopedRef, hasSchemaDifferences, hasUncommittedChanges, invalidBranchParamsError, isInRefScope, isLocalhostUrl, isMergeRoute, isProtectedBranchName, isRefWritable, isTempBranchName, isValidCommitHash, isValidManageTable, listBranches, listBranchesForAgent, manageFkDeps, managePkMap, refMiddlewareFactory, releaseAdvisoryLock, resolveProjectMainRefs, resolveRef, sortByFkDependencyOrder, syncSchemaFromMain, syncSchemaOnBranch, tryAdvisoryLock, withRef, writeProtectionMiddlewareFactory };
15
+ export { MAIN_BRANCH_SUFFIX, MergeConflictError, NestedRefScopeError, ResolutionValidationError, SCHEMA_SOURCE_BRANCH, applyResolutions, areBranchesSchemaCompatible, checkoutBranch, checkoutRef, computeTableInsertOrder, createBranch, createRefMiddleware, createWriteProtectionMiddleware, deleteBranch, doltAbortMerge, doltActiveBranch, doltAdd, doltAddAndCommit, doltBranch, doltBranchExists, doltCheckout, doltCommit, doltConflicts, doltDeleteBranch, doltDeleteTag, doltDiff, doltDiffSummary, doltGetBranchNamespace, doltHashOf, doltListBranches, doltListTags, doltLog, doltMerge, doltMergeStatus, doltPreviewMergeConflicts, doltPreviewMergeConflictsSummary, doltRenameBranch, doltReset, doltResolveConflicts, doltSchemaConflicts, doltStatus, doltTableConflicts, doltTag, ensureBranchExists, ensureSchemaSync, formatSchemaDiffSummary, getActiveBranch, getBranch, getCurrentBranchOrCommit, getCurrentRefScope, getProjectMainResolvedRef, getProjectScopedRef, getRefScopedDb, getSchemaDiff, getTempBranchSuffix, getTenantMainBranch, getTenantScopedRef, hasSchemaDifferences, hasUncommittedChanges, invalidBranchParamsError, isInRefScope, isLocalhostUrl, isMergeRoute, isProtectedBranchName, isRefWritable, isTempBranchName, isValidCommitHash, isValidManageTable, listBranches, listBranchesForAgent, manageFkColumnLinks, manageFkDeps, managePkMap, manageTableMap, refMiddlewareFactory, releaseAdvisoryLock, resolveProjectMainRefs, resolveRef, sortByFkDependencyOrder, syncSchemaFromMain, syncSchemaOnBranch, tryAdvisoryLock, withRef, writeProtectionMiddlewareFactory };
@@ -1,6 +1,10 @@
1
+ import { PgTable } from "drizzle-orm/pg-core";
2
+
1
3
  //#region src/dolt/pk-map.d.ts
2
4
  type PkMap = Record<string, string[]>;
3
5
  declare const managePkMap: PkMap;
4
6
  declare const isValidManageTable: (tableName: string) => boolean;
7
+ type ManageTableMap = Record<string, PgTable>;
8
+ declare const manageTableMap: ManageTableMap;
5
9
  //#endregion
6
- export { PkMap, isValidManageTable, managePkMap };
10
+ export { PkMap, isValidManageTable, managePkMap, manageTableMap };
@@ -22,6 +22,22 @@ const managePkMap = buildPkMapFromSchema();
22
22
  const isValidManageTable = (tableName) => {
23
23
  return tableName in managePkMap;
24
24
  };
25
+ function buildTableMapFromSchema() {
26
+ const tableMap = {};
27
+ for (const value of Object.values(manage_schema_exports)) {
28
+ if (value == null || typeof value !== "object") continue;
29
+ let config;
30
+ try {
31
+ config = getTableConfig(value);
32
+ } catch {
33
+ continue;
34
+ }
35
+ if (!config?.name) continue;
36
+ tableMap[config.name] = value;
37
+ }
38
+ return tableMap;
39
+ }
40
+ const manageTableMap = buildTableMapFromSchema();
25
41
 
26
42
  //#endregion
27
- export { isValidManageTable, managePkMap };
43
+ export { isValidManageTable, managePkMap, manageTableMap };