@inkeep/agents-cli 0.30.0 → 0.30.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/index.js +91 -18
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1326,7 +1326,7 @@ function columnToSchema(column, factory) {
|
|
|
1326
1326
|
}
|
|
1327
1327
|
return schema;
|
|
1328
1328
|
}
|
|
1329
|
-
function numberColumnToSchema(column,
|
|
1329
|
+
function numberColumnToSchema(column, z13, coerce) {
|
|
1330
1330
|
let unsigned = column.getSQLType().includes("unsigned");
|
|
1331
1331
|
let min;
|
|
1332
1332
|
let max;
|
|
@@ -1394,20 +1394,20 @@ function numberColumnToSchema(column, z12, coerce) {
|
|
|
1394
1394
|
min = Number.MIN_SAFE_INTEGER;
|
|
1395
1395
|
max = Number.MAX_SAFE_INTEGER;
|
|
1396
1396
|
}
|
|
1397
|
-
let schema = coerce === true || coerce?.number ? integer2 ?
|
|
1397
|
+
let schema = coerce === true || coerce?.number ? integer2 ? z13.coerce.number() : z13.coerce.number().int() : integer2 ? z13.int() : z13.number();
|
|
1398
1398
|
schema = schema.gte(min).lte(max);
|
|
1399
1399
|
return schema;
|
|
1400
1400
|
}
|
|
1401
|
-
function bigintColumnToSchema(column,
|
|
1401
|
+
function bigintColumnToSchema(column, z13, coerce) {
|
|
1402
1402
|
const unsigned = column.getSQLType().includes("unsigned");
|
|
1403
1403
|
const min = unsigned ? 0n : CONSTANTS.INT64_MIN;
|
|
1404
1404
|
const max = unsigned ? CONSTANTS.INT64_UNSIGNED_MAX : CONSTANTS.INT64_MAX;
|
|
1405
|
-
const schema = coerce === true || coerce?.bigint ?
|
|
1405
|
+
const schema = coerce === true || coerce?.bigint ? z13.coerce.bigint() : z13.bigint();
|
|
1406
1406
|
return schema.gte(min).lte(max);
|
|
1407
1407
|
}
|
|
1408
|
-
function stringColumnToSchema(column,
|
|
1408
|
+
function stringColumnToSchema(column, z13, coerce) {
|
|
1409
1409
|
if (isColumnType(column, ["PgUUID"])) {
|
|
1410
|
-
return
|
|
1410
|
+
return z13.uuid();
|
|
1411
1411
|
}
|
|
1412
1412
|
let max;
|
|
1413
1413
|
let regex;
|
|
@@ -1439,7 +1439,7 @@ function stringColumnToSchema(column, z12, coerce) {
|
|
|
1439
1439
|
regex = /^[01]+$/;
|
|
1440
1440
|
max = column.dimensions;
|
|
1441
1441
|
}
|
|
1442
|
-
let schema = coerce === true || coerce?.string ?
|
|
1442
|
+
let schema = coerce === true || coerce?.string ? z13.coerce.string() : z13.string();
|
|
1443
1443
|
schema = regex ? schema.regex(regex) : schema;
|
|
1444
1444
|
return max && fixed ? schema.length(max) : max ? schema.max(max) : schema;
|
|
1445
1445
|
}
|
|
@@ -5009,11 +5009,20 @@ var init_conversations = __esm({
|
|
|
5009
5009
|
}
|
|
5010
5010
|
});
|
|
5011
5011
|
|
|
5012
|
+
// ../packages/agents-core/src/validation/cycleDetection.ts
|
|
5013
|
+
var init_cycleDetection = __esm({
|
|
5014
|
+
"../packages/agents-core/src/validation/cycleDetection.ts"() {
|
|
5015
|
+
"use strict";
|
|
5016
|
+
init_esm_shims();
|
|
5017
|
+
}
|
|
5018
|
+
});
|
|
5019
|
+
|
|
5012
5020
|
// ../packages/agents-core/src/validation/agentFull.ts
|
|
5013
5021
|
var init_agentFull = __esm({
|
|
5014
5022
|
"../packages/agents-core/src/validation/agentFull.ts"() {
|
|
5015
5023
|
"use strict";
|
|
5016
5024
|
init_esm_shims();
|
|
5025
|
+
init_cycleDetection();
|
|
5017
5026
|
init_schemas();
|
|
5018
5027
|
}
|
|
5019
5028
|
});
|
|
@@ -234075,6 +234084,67 @@ var init_id_validation = __esm({
|
|
|
234075
234084
|
}
|
|
234076
234085
|
});
|
|
234077
234086
|
|
|
234087
|
+
// ../packages/agents-core/src/validation/stream-event-schemas.ts
|
|
234088
|
+
import { z as z11 } from "zod";
|
|
234089
|
+
var TextStartEventSchema, TextDeltaEventSchema, TextEndEventSchema, DataComponentStreamEventSchema, DataOperationStreamEventSchema, DataSummaryStreamEventSchema, StreamErrorEventSchema, StreamFinishEventSchema, StreamEventSchema;
|
|
234090
|
+
var init_stream_event_schemas = __esm({
|
|
234091
|
+
"../packages/agents-core/src/validation/stream-event-schemas.ts"() {
|
|
234092
|
+
"use strict";
|
|
234093
|
+
init_esm_shims();
|
|
234094
|
+
TextStartEventSchema = z11.object({
|
|
234095
|
+
type: z11.literal("text-start"),
|
|
234096
|
+
id: z11.string()
|
|
234097
|
+
});
|
|
234098
|
+
TextDeltaEventSchema = z11.object({
|
|
234099
|
+
type: z11.literal("text-delta"),
|
|
234100
|
+
id: z11.string(),
|
|
234101
|
+
delta: z11.string()
|
|
234102
|
+
});
|
|
234103
|
+
TextEndEventSchema = z11.object({
|
|
234104
|
+
type: z11.literal("text-end"),
|
|
234105
|
+
id: z11.string()
|
|
234106
|
+
});
|
|
234107
|
+
DataComponentStreamEventSchema = z11.object({
|
|
234108
|
+
type: z11.literal("data-component"),
|
|
234109
|
+
id: z11.string(),
|
|
234110
|
+
data: z11.any()
|
|
234111
|
+
});
|
|
234112
|
+
DataOperationStreamEventSchema = z11.object({
|
|
234113
|
+
type: z11.literal("data-operation"),
|
|
234114
|
+
data: z11.any()
|
|
234115
|
+
// Contains OperationEvent types (AgentInitializingEvent, CompletionEvent, etc.)
|
|
234116
|
+
});
|
|
234117
|
+
DataSummaryStreamEventSchema = z11.object({
|
|
234118
|
+
type: z11.literal("data-summary"),
|
|
234119
|
+
data: z11.any()
|
|
234120
|
+
// Contains SummaryEvent from entities.ts
|
|
234121
|
+
});
|
|
234122
|
+
StreamErrorEventSchema = z11.object({
|
|
234123
|
+
type: z11.literal("error"),
|
|
234124
|
+
error: z11.string()
|
|
234125
|
+
});
|
|
234126
|
+
StreamFinishEventSchema = z11.object({
|
|
234127
|
+
type: z11.literal("finish"),
|
|
234128
|
+
finishReason: z11.string().optional(),
|
|
234129
|
+
usage: z11.object({
|
|
234130
|
+
promptTokens: z11.number().optional(),
|
|
234131
|
+
completionTokens: z11.number().optional(),
|
|
234132
|
+
totalTokens: z11.number().optional()
|
|
234133
|
+
}).optional()
|
|
234134
|
+
});
|
|
234135
|
+
StreamEventSchema = z11.discriminatedUnion("type", [
|
|
234136
|
+
TextStartEventSchema,
|
|
234137
|
+
TextDeltaEventSchema,
|
|
234138
|
+
TextEndEventSchema,
|
|
234139
|
+
DataComponentStreamEventSchema,
|
|
234140
|
+
DataOperationStreamEventSchema,
|
|
234141
|
+
DataSummaryStreamEventSchema,
|
|
234142
|
+
StreamErrorEventSchema,
|
|
234143
|
+
StreamFinishEventSchema
|
|
234144
|
+
]);
|
|
234145
|
+
}
|
|
234146
|
+
});
|
|
234147
|
+
|
|
234078
234148
|
// ../packages/agents-core/src/validation/index.ts
|
|
234079
234149
|
var init_validation2 = __esm({
|
|
234080
234150
|
"../packages/agents-core/src/validation/index.ts"() {
|
|
@@ -234086,6 +234156,7 @@ var init_validation2 = __esm({
|
|
|
234086
234156
|
init_props_validation();
|
|
234087
234157
|
init_render_validation();
|
|
234088
234158
|
init_schemas();
|
|
234159
|
+
init_stream_event_schemas();
|
|
234089
234160
|
}
|
|
234090
234161
|
});
|
|
234091
234162
|
|
|
@@ -237754,6 +237825,8 @@ function getDetailedFieldChanges(basePath, oldObj, newObj, depth = 0) {
|
|
|
237754
237825
|
"teamAgentRelationId",
|
|
237755
237826
|
"_agentId",
|
|
237756
237827
|
"teamAgents",
|
|
237828
|
+
"_parentAgentId",
|
|
237829
|
+
"_contextConfigData",
|
|
237757
237830
|
// SDK-generated metadata
|
|
237758
237831
|
"type",
|
|
237759
237832
|
// Runtime context fields
|
|
@@ -240270,26 +240343,26 @@ init_esm_shims();
|
|
|
240270
240343
|
// src/env.ts
|
|
240271
240344
|
init_esm_shims();
|
|
240272
240345
|
init_src();
|
|
240273
|
-
import { z as
|
|
240346
|
+
import { z as z12 } from "zod";
|
|
240274
240347
|
loadEnvironmentFiles();
|
|
240275
|
-
var envSchema2 =
|
|
240276
|
-
DEBUG:
|
|
240348
|
+
var envSchema2 = z12.object({
|
|
240349
|
+
DEBUG: z12.string().optional(),
|
|
240277
240350
|
// Secrets loaded from .env files (relative to where CLI is executed)
|
|
240278
|
-
ANTHROPIC_API_KEY:
|
|
240279
|
-
OPENAI_API_KEY:
|
|
240280
|
-
GOOGLE_API_KEY:
|
|
240351
|
+
ANTHROPIC_API_KEY: z12.string().optional(),
|
|
240352
|
+
OPENAI_API_KEY: z12.string().optional(),
|
|
240353
|
+
GOOGLE_API_KEY: z12.string().optional(),
|
|
240281
240354
|
// Langfuse configuration for LLM observability
|
|
240282
|
-
LANGFUSE_SECRET_KEY:
|
|
240283
|
-
LANGFUSE_PUBLIC_KEY:
|
|
240284
|
-
LANGFUSE_BASEURL:
|
|
240285
|
-
LANGFUSE_ENABLED:
|
|
240355
|
+
LANGFUSE_SECRET_KEY: z12.string().optional(),
|
|
240356
|
+
LANGFUSE_PUBLIC_KEY: z12.string().optional(),
|
|
240357
|
+
LANGFUSE_BASEURL: z12.string().optional().default("https://cloud.langfuse.com"),
|
|
240358
|
+
LANGFUSE_ENABLED: z12.string().optional().transform((val) => val === "true")
|
|
240286
240359
|
});
|
|
240287
240360
|
var parseEnv2 = () => {
|
|
240288
240361
|
try {
|
|
240289
240362
|
const parsedEnv = envSchema2.parse(process.env);
|
|
240290
240363
|
return parsedEnv;
|
|
240291
240364
|
} catch (error) {
|
|
240292
|
-
if (error instanceof
|
|
240365
|
+
if (error instanceof z12.ZodError) {
|
|
240293
240366
|
const missingVars = error.issues.map((issue) => issue.path.join("."));
|
|
240294
240367
|
throw new Error(
|
|
240295
240368
|
`\u274C Invalid environment variables: ${missingVars.join(", ")}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-cli",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.2",
|
|
4
4
|
"description": "Inkeep CLI tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"ts-morph": "^26.0.0",
|
|
50
50
|
"tsx": "^4.20.5",
|
|
51
51
|
"open": "^10.2.0",
|
|
52
|
-
"@inkeep/agents-core": "^0.30.
|
|
53
|
-
"@inkeep/agents-sdk": "^0.30.
|
|
52
|
+
"@inkeep/agents-core": "^0.30.2",
|
|
53
|
+
"@inkeep/agents-sdk": "^0.30.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/degit": "^2.8.6",
|