@kairos-sdk/core 0.3.0 → 0.3.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/README.md +8 -7
- package/dist/{chunk-Q77XA7UC.js → chunk-KQSNT3HZ.js} +2 -2
- package/dist/{chunk-DDV7ZART.js → chunk-RYGYNOR6.js} +20 -5
- package/dist/chunk-RYGYNOR6.js.map +1 -0
- package/dist/cli.cjs +19 -4
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/index.cjs +19 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +2 -2
- package/dist/mcp-server.cjs +150 -5
- package/dist/mcp-server.cjs.map +1 -1
- package/dist/mcp-server.js +136 -2
- package/dist/mcp-server.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-DDV7ZART.js.map +0 -1
- /package/dist/{chunk-Q77XA7UC.js.map → chunk-KQSNT3HZ.js.map} +0 -0
package/dist/cli.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -283,6 +283,14 @@ var N8nApiClient = class {
|
|
|
283
283
|
const remaining = (current.tags ?? []).filter((t) => !tagIds.includes(t.id)).map((t) => ({ id: t.id }));
|
|
284
284
|
await this.request("PUT", `/workflows/${workflowId}/tags`, remaining);
|
|
285
285
|
}
|
|
286
|
+
async getNodeTypes() {
|
|
287
|
+
try {
|
|
288
|
+
const response = await this.request("GET", "/node-types");
|
|
289
|
+
return response.data ?? response;
|
|
290
|
+
} catch {
|
|
291
|
+
return [];
|
|
292
|
+
}
|
|
293
|
+
}
|
|
286
294
|
mapExecution(e) {
|
|
287
295
|
return {
|
|
288
296
|
id: e.id,
|
|
@@ -1148,9 +1156,9 @@ var RULE_REMEDIES = {
|
|
|
1148
1156
|
22: "Ensure all required parameters are set for each node type (e.g. webhook needs httpMethod and path)"
|
|
1149
1157
|
};
|
|
1150
1158
|
var PromptBuilder = class {
|
|
1151
|
-
build(request, matches, globalFailureRates = []) {
|
|
1159
|
+
build(request, matches, globalFailureRates = [], dynamicCatalog) {
|
|
1152
1160
|
const mode = this.resolveMode(matches);
|
|
1153
|
-
const system = this.buildSystem(matches, mode, globalFailureRates);
|
|
1161
|
+
const system = this.buildSystem(matches, mode, globalFailureRates, dynamicCatalog);
|
|
1154
1162
|
const userMessage = this.buildUserMessage(request, matches, mode);
|
|
1155
1163
|
return { system, userMessage, mode, matches };
|
|
1156
1164
|
}
|
|
@@ -1169,11 +1177,18 @@ Fix ALL of the above issues in your new response. Do not repeat any of these mis
|
|
|
1169
1177
|
if (!top) return "scratch";
|
|
1170
1178
|
return scoreToMode(top.score);
|
|
1171
1179
|
}
|
|
1172
|
-
buildSystem(matches, mode, globalFailureRates = []) {
|
|
1180
|
+
buildSystem(matches, mode, globalFailureRates = [], dynamicCatalog) {
|
|
1181
|
+
let basePrompt = SYSTEM_PROMPT_V1;
|
|
1182
|
+
if (dynamicCatalog) {
|
|
1183
|
+
basePrompt = basePrompt.replace(
|
|
1184
|
+
/## NODE CATALOG — exact type strings and safe typeVersions[\s\S]*?(?=## PRE-DELIVERY SELF-CHECK)/,
|
|
1185
|
+
dynamicCatalog + "\n\n"
|
|
1186
|
+
);
|
|
1187
|
+
}
|
|
1173
1188
|
const blocks = [
|
|
1174
1189
|
{
|
|
1175
1190
|
type: "text",
|
|
1176
|
-
text:
|
|
1191
|
+
text: basePrompt,
|
|
1177
1192
|
cache_control: { type: "ephemeral" }
|
|
1178
1193
|
}
|
|
1179
1194
|
];
|