@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/dist/cli.js CHANGED
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  Kairos,
4
4
  TemplateSyncer
5
- } from "./chunk-Q77XA7UC.js";
5
+ } from "./chunk-KQSNT3HZ.js";
6
6
  import {
7
7
  FileLibrary
8
- } from "./chunk-DDV7ZART.js";
8
+ } from "./chunk-RYGYNOR6.js";
9
9
 
10
10
  // src/cli.ts
11
11
  var HELP = `
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: SYSTEM_PROMPT_V1,
1191
+ text: basePrompt,
1177
1192
  cache_control: { type: "ephemeral" }
1178
1193
  }
1179
1194
  ];