@inkeep/agents-cli 0.53.9 → 0.53.11
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.
|
@@ -52,7 +52,7 @@ function generateSubAgentDefinition(data) {
|
|
|
52
52
|
if (hasHeadersTemplateVariables && parsed.contextConfigId && parsed.contextConfigHeadersReference && parsed.contextConfigHeadersReference.local !== true) namedImports.push(parsed.contextConfigHeadersReference.name);
|
|
53
53
|
if (namedImports.length > 0 && parsed.contextConfigId) sourceFile.addImportDeclaration({
|
|
54
54
|
namedImports: [...new Set(namedImports)],
|
|
55
|
-
moduleSpecifier:
|
|
55
|
+
moduleSpecifier: `../../context-configs/${parsed.contextConfigId}`
|
|
56
56
|
});
|
|
57
57
|
addCanUseToolImports(sourceFile, parsed.canUse, parsed.referenceOverrides?.tools);
|
|
58
58
|
addDataComponentImports(sourceFile, parsed.dataComponents, parsed.referenceOverrides?.dataComponents);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { addValueToObject, createFactoryDefinition, toCamelCase } from "../utils.js";
|
|
1
|
+
import { addValueToObject, convertNullToUndefined, createFactoryDefinition, toCamelCase } from "../utils.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { SyntaxKind } from "ts-morph";
|
|
4
4
|
|
|
@@ -6,15 +6,15 @@ import { SyntaxKind } from "ts-morph";
|
|
|
6
6
|
const TriggerSchema = z.looseObject({
|
|
7
7
|
triggerId: z.string().nonempty(),
|
|
8
8
|
name: z.string().nonempty(),
|
|
9
|
-
description: z.string().optional(),
|
|
9
|
+
description: z.string().nullable().optional().transform(convertNullToUndefined),
|
|
10
10
|
enabled: z.boolean().optional(),
|
|
11
|
-
messageTemplate: z.string().
|
|
11
|
+
messageTemplate: z.string().nullable().optional().transform(convertNullToUndefined),
|
|
12
12
|
inputSchema: z.unknown().optional(),
|
|
13
13
|
outputTransform: z.looseObject({
|
|
14
14
|
jmespath: z.string().optional(),
|
|
15
15
|
objectTransformation: z.unknown().optional()
|
|
16
|
-
}).optional(),
|
|
17
|
-
authentication: z.looseObject({ headers: z.array(z.looseObject({})).optional() }).optional(),
|
|
16
|
+
}).nullable().optional().transform(convertNullToUndefined),
|
|
17
|
+
authentication: z.looseObject({ headers: z.array(z.looseObject({})).optional() }).nullable().optional().transform(convertNullToUndefined),
|
|
18
18
|
signatureVerification: z.looseObject({
|
|
19
19
|
algorithm: z.string().optional(),
|
|
20
20
|
encoding: z.string().optional(),
|
|
@@ -22,9 +22,9 @@ const TriggerSchema = z.looseObject({
|
|
|
22
22
|
signedComponents: z.array(z.looseObject({})).optional(),
|
|
23
23
|
componentJoin: z.looseObject({}).optional(),
|
|
24
24
|
validation: z.looseObject({}).optional()
|
|
25
|
-
}).optional(),
|
|
26
|
-
signingSecretCredentialReferenceId: z.string().optional(),
|
|
27
|
-
signingSecretCredentialReference: z.union([z.string(), z.looseObject({ id: z.string().optional() })]).optional()
|
|
25
|
+
}).nullable().optional().transform(convertNullToUndefined),
|
|
26
|
+
signingSecretCredentialReferenceId: z.string().nullable().optional().transform(convertNullToUndefined),
|
|
27
|
+
signingSecretCredentialReference: z.union([z.string(), z.looseObject({ id: z.string().optional() })]).nullable().optional().transform(convertNullToUndefined)
|
|
28
28
|
});
|
|
29
29
|
function generateTriggerDefinition(data) {
|
|
30
30
|
const result = TriggerSchema.safeParse(data);
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { addValueToObject, createFactoryDefinition, toCamelCase } from "./utils.js";
|
|
1
|
+
import { addValueToObject, convertNullToUndefined, createFactoryDefinition, toCamelCase } from "./utils.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { SyntaxKind } from "ts-morph";
|
|
4
4
|
|
|
5
5
|
//#region src/commands/pull-v4/scheduled-trigger-generator.ts
|
|
6
|
-
const nullToUndefined = (v) => v ?? void 0;
|
|
7
6
|
const ScheduledTriggerSchema = z.looseObject({
|
|
8
7
|
scheduledTriggerId: z.string().nonempty(),
|
|
9
8
|
name: z.string().nonempty(),
|
|
10
|
-
description: z.string().nullable().optional().transform(
|
|
9
|
+
description: z.string().nullable().optional().transform(convertNullToUndefined),
|
|
11
10
|
enabled: z.boolean().optional(),
|
|
12
|
-
cronExpression: z.string().nullable().optional().transform(
|
|
13
|
-
cronTimezone: z.string().nullable().optional().transform(
|
|
14
|
-
runAt: z.string().nullable().optional().transform(
|
|
11
|
+
cronExpression: z.string().nullable().optional().transform(convertNullToUndefined),
|
|
12
|
+
cronTimezone: z.string().nullable().optional().transform(convertNullToUndefined),
|
|
13
|
+
runAt: z.string().nullable().optional().transform(convertNullToUndefined),
|
|
15
14
|
payload: z.record(z.string(), z.unknown()).nullable().optional().transform((v) => v ?? void 0),
|
|
16
|
-
messageTemplate: z.string().nullable().optional().transform(
|
|
15
|
+
messageTemplate: z.string().nullable().optional().transform(convertNullToUndefined),
|
|
17
16
|
maxRetries: z.number().optional(),
|
|
18
17
|
retryDelaySeconds: z.number().optional(),
|
|
19
18
|
timeoutSeconds: z.number().optional(),
|
|
20
|
-
runAsUserId: z.string().nullable().optional().transform(
|
|
19
|
+
runAsUserId: z.string().nullable().optional().transform(convertNullToUndefined)
|
|
21
20
|
});
|
|
22
21
|
function generateScheduledTriggerDefinition(data) {
|
|
23
22
|
const result = ScheduledTriggerSchema.safeParse(data);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-cli",
|
|
3
|
-
"version": "0.53.
|
|
3
|
+
"version": "0.53.11",
|
|
4
4
|
"description": "Inkeep CLI tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"tsx": "^4.20.5",
|
|
38
38
|
"yaml": "^2.7.0",
|
|
39
39
|
"zod": "^4.3.6",
|
|
40
|
-
"@inkeep/agents-
|
|
41
|
-
"@inkeep/agents-
|
|
40
|
+
"@inkeep/agents-core": "^0.53.11",
|
|
41
|
+
"@inkeep/agents-sdk": "^0.53.11"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"diff": "^8.0.3",
|