@inkeep/agents-core 0.70.0 → 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.
- package/dist/auth/auth-schema.d.ts +227 -227
- package/dist/auth/auth-validation-schemas.d.ts +154 -154
- package/dist/auth/auth.d.ts +9 -9
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/client-exports.d.ts +2 -2
- package/dist/client-exports.js +2 -2
- package/dist/data-access/index.d.ts +4 -2
- package/dist/data-access/index.js +4 -2
- package/dist/data-access/manage/agents.d.ts +20 -20
- package/dist/data-access/manage/artifactComponents.d.ts +8 -8
- package/dist/data-access/manage/contextConfigs.d.ts +8 -8
- package/dist/data-access/manage/dataComponents.d.ts +2 -2
- package/dist/data-access/manage/functionTools.d.ts +10 -10
- package/dist/data-access/manage/improvementRowRevert.d.ts +29 -0
- package/dist/data-access/manage/improvementRowRevert.js +84 -0
- package/dist/data-access/manage/skills.d.ts +9 -9
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgentRelations.d.ts +18 -18
- 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/manage/triggers.d.ts +4 -4
- package/dist/data-access/runtime/apiKeys.d.ts +16 -16
- package/dist/data-access/runtime/apps.d.ts +11 -11
- package/dist/data-access/runtime/conversations.d.ts +24 -24
- package/dist/data-access/runtime/feedback.d.ts +16 -5
- package/dist/data-access/runtime/feedback.js +18 -2
- package/dist/data-access/runtime/improvementRuns.d.ts +49 -0
- package/dist/data-access/runtime/improvementRuns.js +41 -0
- package/dist/data-access/runtime/messages.d.ts +9 -9
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +4 -4
- package/dist/data-access/runtime/scheduledTriggerUsers.d.ts +1 -1
- package/dist/data-access/runtime/tasks.d.ts +6 -6
- package/dist/db/manage/manage-schema.d.ts +457 -457
- package/dist/db/runtime/runtime-schema.d.ts +608 -425
- package/dist/db/runtime/runtime-schema.js +18 -1
- package/dist/dolt/diff.d.ts +2 -1
- package/dist/dolt/fk-map.d.ts +10 -1
- package/dist/dolt/fk-map.js +37 -1
- package/dist/dolt/index.d.ts +3 -3
- package/dist/dolt/index.js +3 -3
- package/dist/dolt/pk-map.d.ts +5 -1
- package/dist/dolt/pk-map.js +17 -1
- package/dist/index.d.ts +8 -6
- package/dist/index.js +8 -6
- package/dist/utils/error.d.ts +51 -51
- 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/skills.d.ts +43 -43
- package/dist/validation/schemas.d.ts +2469 -2236
- package/dist/validation/schemas.js +131 -2
- package/drizzle/runtime/0038_windy_kinsey_walden.sql +15 -0
- package/drizzle/runtime/meta/0038_snapshot.json +6111 -0
- package/drizzle/runtime/meta/_journal.json +7 -0
- package/package.json +1 -1
|
@@ -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 };
|
package/dist/dolt/diff.d.ts
CHANGED
|
@@ -18,7 +18,8 @@ declare const doltDiffSummary: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
18
18
|
toRevision: string;
|
|
19
19
|
tableName?: string;
|
|
20
20
|
}) => Promise<{
|
|
21
|
-
|
|
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;
|
package/dist/dolt/fk-map.d.ts
CHANGED
|
@@ -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 };
|
package/dist/dolt/fk-map.js
CHANGED
|
@@ -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 };
|
package/dist/dolt/index.d.ts
CHANGED
|
@@ -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 };
|
package/dist/dolt/index.js
CHANGED
|
@@ -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 };
|
package/dist/dolt/pk-map.d.ts
CHANGED
|
@@ -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 };
|
package/dist/dolt/pk-map.js
CHANGED
|
@@ -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 };
|