@inkeep/agents-cli 0.0.0-dev-20251208221830 → 0.0.0-dev-20251211230224

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 (2) hide show
  1. package/dist/index.js +26 -20
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1936,14 +1936,10 @@ var init_schema = __esm({
1936
1936
  name: "external_agents_project_fk"
1937
1937
  }).onDelete("cascade"),
1938
1938
  foreignKey({
1939
- columns: [table.tenantId, table.projectId, table.credentialReferenceId],
1940
- foreignColumns: [
1941
- credentialReferences.tenantId,
1942
- credentialReferences.projectId,
1943
- credentialReferences.id
1944
- ],
1939
+ columns: [table.credentialReferenceId],
1940
+ foreignColumns: [credentialReferences.id],
1945
1941
  name: "external_agents_credential_reference_fk"
1946
- }).onDelete("cascade")
1942
+ }).onDelete("set null")
1947
1943
  ]
1948
1944
  );
1949
1945
  tasks = pgTable2(
@@ -2073,6 +2069,8 @@ var init_schema = __esm({
2073
2069
  description: text2("description"),
2074
2070
  config: jsonb("config").$type().notNull(),
2075
2071
  credentialReferenceId: varchar("credential_reference_id", { length: 256 }),
2072
+ credentialScope: varchar("credential_scope", { length: 50 }).notNull().default("project"),
2073
+ // 'project' | 'user'
2076
2074
  headers: jsonb("headers").$type(),
2077
2075
  imageUrl: text2("image_url"),
2078
2076
  capabilities: jsonb("capabilities").$type(),
@@ -2085,7 +2083,12 @@ var init_schema = __esm({
2085
2083
  columns: [table.tenantId, table.projectId],
2086
2084
  foreignColumns: [projects.tenantId, projects.id],
2087
2085
  name: "tools_project_fk"
2088
- }).onDelete("cascade")
2086
+ }).onDelete("cascade"),
2087
+ foreignKey({
2088
+ columns: [table.credentialReferenceId],
2089
+ foreignColumns: [credentialReferences.id],
2090
+ name: "tools_credential_reference_fk"
2091
+ }).onDelete("set null")
2089
2092
  ]
2090
2093
  );
2091
2094
  functionTools = pgTable2(
@@ -2351,6 +2354,13 @@ var init_schema = __esm({
2351
2354
  type: varchar("type", { length: 256 }).notNull(),
2352
2355
  credentialStoreId: varchar("credential_store_id", { length: 256 }).notNull(),
2353
2356
  retrievalParams: jsonb("retrieval_params").$type(),
2357
+ // For user-scoped credentials
2358
+ toolId: varchar("tool_id", { length: 256 }),
2359
+ // Links to the tool this credential is for
2360
+ userId: varchar("user_id", { length: 256 }),
2361
+ // User who owns this credential (null = project-scoped)
2362
+ createdBy: varchar("created_by", { length: 256 }),
2363
+ // User who created this credential
2354
2364
  ...timestamps
2355
2365
  },
2356
2366
  (t2) => [
@@ -2359,7 +2369,12 @@ var init_schema = __esm({
2359
2369
  columns: [t2.tenantId, t2.projectId],
2360
2370
  foreignColumns: [projects.tenantId, projects.id],
2361
2371
  name: "credential_references_project_fk"
2362
- }).onDelete("cascade")
2372
+ }).onDelete("cascade"),
2373
+ // Unique constraint on id alone to support simple FK references
2374
+ // (id is globally unique via nanoid generation)
2375
+ unique("credential_references_id_unique").on(t2.id),
2376
+ // One credential per user per tool (for user-scoped credentials)
2377
+ unique("credential_references_tool_user_unique").on(t2.toolId, t2.userId)
2363
2378
  ]
2364
2379
  );
2365
2380
  tasksRelations = relations2(tasks, ({ one, many }) => ({
@@ -3537,17 +3552,7 @@ var init_schemas = __esm({
3537
3552
  // Not set on creation
3538
3553
  }).openapi("ApiKeyCreate");
3539
3554
  ApiKeyApiUpdateSchema = ApiKeyUpdateSchema.openapi("ApiKeyUpdate");
3540
- CredentialReferenceSelectSchema = z.object({
3541
- id: z.string(),
3542
- tenantId: z.string(),
3543
- projectId: z.string(),
3544
- name: z.string(),
3545
- type: z.string(),
3546
- credentialStoreId: z.string(),
3547
- retrievalParams: z.record(z.string(), z.unknown()).nullish(),
3548
- createdAt: z.string(),
3549
- updatedAt: z.string()
3550
- });
3555
+ CredentialReferenceSelectSchema = createSelectSchema2(credentialReferences);
3551
3556
  CredentialReferenceInsertSchema = createInsertSchema2(credentialReferences).extend({
3552
3557
  id: resourceIdSchema,
3553
3558
  type: z.string(),
@@ -3617,6 +3622,7 @@ var init_schemas = __esm({
3617
3622
  status: ToolStatusSchema.default("unknown"),
3618
3623
  version: z.string().optional(),
3619
3624
  expiresAt: z.string().optional(),
3625
+ createdBy: z.string().optional(),
3620
3626
  relationshipId: z.string().optional()
3621
3627
  }).openapi("McpTool");
3622
3628
  MCPToolConfigSchema = McpToolSchema.omit({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-cli",
3
- "version": "0.0.0-dev-20251208221830",
3
+ "version": "0.0.0-dev-20251211230224",
4
4
  "description": "Inkeep CLI tool",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -50,8 +50,8 @@
50
50
  "ts-morph": "^26.0.0",
51
51
  "tsx": "^4.20.5",
52
52
  "open": "^10.2.0",
53
- "@inkeep/agents-core": "^0.0.0-dev-20251208221830",
54
- "@inkeep/agents-sdk": "^0.0.0-dev-20251208221830"
53
+ "@inkeep/agents-core": "^0.0.0-dev-20251211230224",
54
+ "@inkeep/agents-sdk": "^0.0.0-dev-20251211230224"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@types/degit": "^2.8.6",
@@ -64,7 +64,7 @@
64
64
  "vitest": "^3.2.4"
65
65
  },
66
66
  "peerDependencies": {
67
- "@inkeep/agents-manage-ui": "0.0.0-dev-20251208221830",
67
+ "@inkeep/agents-manage-ui": "0.0.0-dev-20251211230224",
68
68
  "zod": "^4.1.11"
69
69
  },
70
70
  "engines": {