@eventop/sdk 1.2.14 → 1.2.15
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/core.cjs +12 -31
- package/dist/core.js +12 -31
- package/dist/react/core.cjs +12 -31
- package/dist/react/core.js +12 -31
- package/package.json +1 -1
package/dist/core.cjs
CHANGED
|
@@ -486,13 +486,7 @@ function buildSystemPrompt(config) {
|
|
|
486
486
|
var _f$screen;
|
|
487
487
|
return (_f$screen = f.screen) === null || _f$screen === void 0 ? void 0 : _f$screen.id;
|
|
488
488
|
}).map(f => f.screen.id))];
|
|
489
|
-
|
|
490
|
-
// Split features into live (current page) and ghost (other pages).
|
|
491
|
-
// This lets the AI understand what's immediately available vs reachable
|
|
492
|
-
// via navigation, and craft the right message when something isn't found.
|
|
493
|
-
const liveFeatures = (config.features || []).filter(f => !f._ghost);
|
|
494
|
-
const ghostFeatures = (config.features || []).filter(f => f._ghost);
|
|
495
|
-
const summarise = f => {
|
|
489
|
+
const featureSummary = (config.features || []).map(f => {
|
|
496
490
|
var _f$screen2, _f$flow;
|
|
497
491
|
const entry = {
|
|
498
492
|
id: f.id,
|
|
@@ -507,18 +501,15 @@ function buildSystemPrompt(config) {
|
|
|
507
501
|
entry.note = `This feature has ${f.flow.length} sequential sub-steps. Include ONE step per flow entry.`;
|
|
508
502
|
}
|
|
509
503
|
return entry;
|
|
510
|
-
};
|
|
511
|
-
const liveSection = liveFeatures.length ? `CURRENT PAGE FEATURES (user is here now):\n${JSON.stringify(liveFeatures.map(summarise), null, 2)}` : `CURRENT PAGE FEATURES: none registered yet.`;
|
|
512
|
-
const ghostSection = ghostFeatures.length ? `OTHER PAGE FEATURES (reachable via navigation — SDK handles it automatically):\n${JSON.stringify(ghostFeatures.map(summarise), null, 2)}` : '';
|
|
504
|
+
});
|
|
513
505
|
return `
|
|
514
506
|
You are an in-app assistant called "${config.assistantName || 'AI Guide'}" for "${config.appName}".
|
|
515
507
|
Your ONLY job: guide users step-by-step through tasks using the feature map below.
|
|
516
508
|
|
|
517
|
-
${screens.length > 1 ? `SCREENS: This app has multiple screens: ${screens.join(', ')}. The SDK
|
|
518
|
-
|
|
519
|
-
${liveSection}
|
|
509
|
+
${screens.length > 1 ? `SCREENS: This app has multiple screens: ${screens.join(', ')}. Features are screen-specific. The SDK handles navigation — just pick the right features.` : ''}
|
|
520
510
|
|
|
521
|
-
|
|
511
|
+
FEATURE MAP (only reference IDs from this list):
|
|
512
|
+
${JSON.stringify(featureSummary, null, 2)}
|
|
522
513
|
|
|
523
514
|
RESPOND ONLY with this exact JSON — no markdown, no extra text:
|
|
524
515
|
{
|
|
@@ -535,26 +526,16 @@ RESPOND ONLY with this exact JSON — no markdown, no extra text:
|
|
|
535
526
|
}
|
|
536
527
|
|
|
537
528
|
RULES:
|
|
538
|
-
1. The step "id" MUST match a feature id from the
|
|
529
|
+
1. The step "id" MUST match a feature id from the feature map.
|
|
539
530
|
2. Only use selectors and IDs from the feature map. Never invent them.
|
|
540
|
-
3.
|
|
541
|
-
4.
|
|
542
|
-
5.
|
|
531
|
+
3. No matching feature → steps: [], explain kindly in message.
|
|
532
|
+
4. position values: top | bottom | left | right | auto only.
|
|
533
|
+
5. Order steps logically. For multi-step flows, order as the user encounters them.
|
|
534
|
+
6. For forms: ALWAYS include a step for the form section or first input BEFORE the
|
|
543
535
|
continue/submit button. The button step must always be LAST in its section.
|
|
544
|
-
|
|
536
|
+
7. If a feature has a flow, include one step per flow entry using the same feature id —
|
|
545
537
|
the SDK expands them automatically.
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
WHEN THE USER'S REQUEST DOESN'T MATCH ANY FEATURE:
|
|
549
|
-
- If it partially matches something (e.g. they said "create template" and there's a
|
|
550
|
-
"template-gallery" feature): guide them to the closest matching feature and explain
|
|
551
|
-
what it does. Don't say you can't help.
|
|
552
|
-
- If it matches a feature on another page (ghost): include that feature's steps normally.
|
|
553
|
-
The SDK will navigate there automatically. Do NOT tell the user to navigate manually.
|
|
554
|
-
- If there is genuinely no match anywhere in the feature map: set steps to [] and say
|
|
555
|
-
something like "That doesn't seem to be a feature in ${config.appName} yet. Here's
|
|
556
|
-
what I can help you with:" then list 2-3 relevant features from the map by name.
|
|
557
|
-
Never say you "can only guide through available features" — always offer alternatives.
|
|
538
|
+
8. Never skip features in a required sequence. Include every step end-to-end.
|
|
558
539
|
`.trim();
|
|
559
540
|
}
|
|
560
541
|
|
package/dist/core.js
CHANGED
|
@@ -484,13 +484,7 @@ function buildSystemPrompt(config) {
|
|
|
484
484
|
var _f$screen;
|
|
485
485
|
return (_f$screen = f.screen) === null || _f$screen === void 0 ? void 0 : _f$screen.id;
|
|
486
486
|
}).map(f => f.screen.id))];
|
|
487
|
-
|
|
488
|
-
// Split features into live (current page) and ghost (other pages).
|
|
489
|
-
// This lets the AI understand what's immediately available vs reachable
|
|
490
|
-
// via navigation, and craft the right message when something isn't found.
|
|
491
|
-
const liveFeatures = (config.features || []).filter(f => !f._ghost);
|
|
492
|
-
const ghostFeatures = (config.features || []).filter(f => f._ghost);
|
|
493
|
-
const summarise = f => {
|
|
487
|
+
const featureSummary = (config.features || []).map(f => {
|
|
494
488
|
var _f$screen2, _f$flow;
|
|
495
489
|
const entry = {
|
|
496
490
|
id: f.id,
|
|
@@ -505,18 +499,15 @@ function buildSystemPrompt(config) {
|
|
|
505
499
|
entry.note = `This feature has ${f.flow.length} sequential sub-steps. Include ONE step per flow entry.`;
|
|
506
500
|
}
|
|
507
501
|
return entry;
|
|
508
|
-
};
|
|
509
|
-
const liveSection = liveFeatures.length ? `CURRENT PAGE FEATURES (user is here now):\n${JSON.stringify(liveFeatures.map(summarise), null, 2)}` : `CURRENT PAGE FEATURES: none registered yet.`;
|
|
510
|
-
const ghostSection = ghostFeatures.length ? `OTHER PAGE FEATURES (reachable via navigation — SDK handles it automatically):\n${JSON.stringify(ghostFeatures.map(summarise), null, 2)}` : '';
|
|
502
|
+
});
|
|
511
503
|
return `
|
|
512
504
|
You are an in-app assistant called "${config.assistantName || 'AI Guide'}" for "${config.appName}".
|
|
513
505
|
Your ONLY job: guide users step-by-step through tasks using the feature map below.
|
|
514
506
|
|
|
515
|
-
${screens.length > 1 ? `SCREENS: This app has multiple screens: ${screens.join(', ')}. The SDK
|
|
516
|
-
|
|
517
|
-
${liveSection}
|
|
507
|
+
${screens.length > 1 ? `SCREENS: This app has multiple screens: ${screens.join(', ')}. Features are screen-specific. The SDK handles navigation — just pick the right features.` : ''}
|
|
518
508
|
|
|
519
|
-
|
|
509
|
+
FEATURE MAP (only reference IDs from this list):
|
|
510
|
+
${JSON.stringify(featureSummary, null, 2)}
|
|
520
511
|
|
|
521
512
|
RESPOND ONLY with this exact JSON — no markdown, no extra text:
|
|
522
513
|
{
|
|
@@ -533,26 +524,16 @@ RESPOND ONLY with this exact JSON — no markdown, no extra text:
|
|
|
533
524
|
}
|
|
534
525
|
|
|
535
526
|
RULES:
|
|
536
|
-
1. The step "id" MUST match a feature id from the
|
|
527
|
+
1. The step "id" MUST match a feature id from the feature map.
|
|
537
528
|
2. Only use selectors and IDs from the feature map. Never invent them.
|
|
538
|
-
3.
|
|
539
|
-
4.
|
|
540
|
-
5.
|
|
529
|
+
3. No matching feature → steps: [], explain kindly in message.
|
|
530
|
+
4. position values: top | bottom | left | right | auto only.
|
|
531
|
+
5. Order steps logically. For multi-step flows, order as the user encounters them.
|
|
532
|
+
6. For forms: ALWAYS include a step for the form section or first input BEFORE the
|
|
541
533
|
continue/submit button. The button step must always be LAST in its section.
|
|
542
|
-
|
|
534
|
+
7. If a feature has a flow, include one step per flow entry using the same feature id —
|
|
543
535
|
the SDK expands them automatically.
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
WHEN THE USER'S REQUEST DOESN'T MATCH ANY FEATURE:
|
|
547
|
-
- If it partially matches something (e.g. they said "create template" and there's a
|
|
548
|
-
"template-gallery" feature): guide them to the closest matching feature and explain
|
|
549
|
-
what it does. Don't say you can't help.
|
|
550
|
-
- If it matches a feature on another page (ghost): include that feature's steps normally.
|
|
551
|
-
The SDK will navigate there automatically. Do NOT tell the user to navigate manually.
|
|
552
|
-
- If there is genuinely no match anywhere in the feature map: set steps to [] and say
|
|
553
|
-
something like "That doesn't seem to be a feature in ${config.appName} yet. Here's
|
|
554
|
-
what I can help you with:" then list 2-3 relevant features from the map by name.
|
|
555
|
-
Never say you "can only guide through available features" — always offer alternatives.
|
|
536
|
+
8. Never skip features in a required sequence. Include every step end-to-end.
|
|
556
537
|
`.trim();
|
|
557
538
|
}
|
|
558
539
|
|
package/dist/react/core.cjs
CHANGED
|
@@ -486,13 +486,7 @@ function buildSystemPrompt(config) {
|
|
|
486
486
|
var _f$screen;
|
|
487
487
|
return (_f$screen = f.screen) === null || _f$screen === void 0 ? void 0 : _f$screen.id;
|
|
488
488
|
}).map(f => f.screen.id))];
|
|
489
|
-
|
|
490
|
-
// Split features into live (current page) and ghost (other pages).
|
|
491
|
-
// This lets the AI understand what's immediately available vs reachable
|
|
492
|
-
// via navigation, and craft the right message when something isn't found.
|
|
493
|
-
const liveFeatures = (config.features || []).filter(f => !f._ghost);
|
|
494
|
-
const ghostFeatures = (config.features || []).filter(f => f._ghost);
|
|
495
|
-
const summarise = f => {
|
|
489
|
+
const featureSummary = (config.features || []).map(f => {
|
|
496
490
|
var _f$screen2, _f$flow;
|
|
497
491
|
const entry = {
|
|
498
492
|
id: f.id,
|
|
@@ -507,18 +501,15 @@ function buildSystemPrompt(config) {
|
|
|
507
501
|
entry.note = `This feature has ${f.flow.length} sequential sub-steps. Include ONE step per flow entry.`;
|
|
508
502
|
}
|
|
509
503
|
return entry;
|
|
510
|
-
};
|
|
511
|
-
const liveSection = liveFeatures.length ? `CURRENT PAGE FEATURES (user is here now):\n${JSON.stringify(liveFeatures.map(summarise), null, 2)}` : `CURRENT PAGE FEATURES: none registered yet.`;
|
|
512
|
-
const ghostSection = ghostFeatures.length ? `OTHER PAGE FEATURES (reachable via navigation — SDK handles it automatically):\n${JSON.stringify(ghostFeatures.map(summarise), null, 2)}` : '';
|
|
504
|
+
});
|
|
513
505
|
return `
|
|
514
506
|
You are an in-app assistant called "${config.assistantName || 'AI Guide'}" for "${config.appName}".
|
|
515
507
|
Your ONLY job: guide users step-by-step through tasks using the feature map below.
|
|
516
508
|
|
|
517
|
-
${screens.length > 1 ? `SCREENS: This app has multiple screens: ${screens.join(', ')}. The SDK
|
|
518
|
-
|
|
519
|
-
${liveSection}
|
|
509
|
+
${screens.length > 1 ? `SCREENS: This app has multiple screens: ${screens.join(', ')}. Features are screen-specific. The SDK handles navigation — just pick the right features.` : ''}
|
|
520
510
|
|
|
521
|
-
|
|
511
|
+
FEATURE MAP (only reference IDs from this list):
|
|
512
|
+
${JSON.stringify(featureSummary, null, 2)}
|
|
522
513
|
|
|
523
514
|
RESPOND ONLY with this exact JSON — no markdown, no extra text:
|
|
524
515
|
{
|
|
@@ -535,26 +526,16 @@ RESPOND ONLY with this exact JSON — no markdown, no extra text:
|
|
|
535
526
|
}
|
|
536
527
|
|
|
537
528
|
RULES:
|
|
538
|
-
1. The step "id" MUST match a feature id from the
|
|
529
|
+
1. The step "id" MUST match a feature id from the feature map.
|
|
539
530
|
2. Only use selectors and IDs from the feature map. Never invent them.
|
|
540
|
-
3.
|
|
541
|
-
4.
|
|
542
|
-
5.
|
|
531
|
+
3. No matching feature → steps: [], explain kindly in message.
|
|
532
|
+
4. position values: top | bottom | left | right | auto only.
|
|
533
|
+
5. Order steps logically. For multi-step flows, order as the user encounters them.
|
|
534
|
+
6. For forms: ALWAYS include a step for the form section or first input BEFORE the
|
|
543
535
|
continue/submit button. The button step must always be LAST in its section.
|
|
544
|
-
|
|
536
|
+
7. If a feature has a flow, include one step per flow entry using the same feature id —
|
|
545
537
|
the SDK expands them automatically.
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
WHEN THE USER'S REQUEST DOESN'T MATCH ANY FEATURE:
|
|
549
|
-
- If it partially matches something (e.g. they said "create template" and there's a
|
|
550
|
-
"template-gallery" feature): guide them to the closest matching feature and explain
|
|
551
|
-
what it does. Don't say you can't help.
|
|
552
|
-
- If it matches a feature on another page (ghost): include that feature's steps normally.
|
|
553
|
-
The SDK will navigate there automatically. Do NOT tell the user to navigate manually.
|
|
554
|
-
- If there is genuinely no match anywhere in the feature map: set steps to [] and say
|
|
555
|
-
something like "That doesn't seem to be a feature in ${config.appName} yet. Here's
|
|
556
|
-
what I can help you with:" then list 2-3 relevant features from the map by name.
|
|
557
|
-
Never say you "can only guide through available features" — always offer alternatives.
|
|
538
|
+
8. Never skip features in a required sequence. Include every step end-to-end.
|
|
558
539
|
`.trim();
|
|
559
540
|
}
|
|
560
541
|
|
package/dist/react/core.js
CHANGED
|
@@ -484,13 +484,7 @@ function buildSystemPrompt(config) {
|
|
|
484
484
|
var _f$screen;
|
|
485
485
|
return (_f$screen = f.screen) === null || _f$screen === void 0 ? void 0 : _f$screen.id;
|
|
486
486
|
}).map(f => f.screen.id))];
|
|
487
|
-
|
|
488
|
-
// Split features into live (current page) and ghost (other pages).
|
|
489
|
-
// This lets the AI understand what's immediately available vs reachable
|
|
490
|
-
// via navigation, and craft the right message when something isn't found.
|
|
491
|
-
const liveFeatures = (config.features || []).filter(f => !f._ghost);
|
|
492
|
-
const ghostFeatures = (config.features || []).filter(f => f._ghost);
|
|
493
|
-
const summarise = f => {
|
|
487
|
+
const featureSummary = (config.features || []).map(f => {
|
|
494
488
|
var _f$screen2, _f$flow;
|
|
495
489
|
const entry = {
|
|
496
490
|
id: f.id,
|
|
@@ -505,18 +499,15 @@ function buildSystemPrompt(config) {
|
|
|
505
499
|
entry.note = `This feature has ${f.flow.length} sequential sub-steps. Include ONE step per flow entry.`;
|
|
506
500
|
}
|
|
507
501
|
return entry;
|
|
508
|
-
};
|
|
509
|
-
const liveSection = liveFeatures.length ? `CURRENT PAGE FEATURES (user is here now):\n${JSON.stringify(liveFeatures.map(summarise), null, 2)}` : `CURRENT PAGE FEATURES: none registered yet.`;
|
|
510
|
-
const ghostSection = ghostFeatures.length ? `OTHER PAGE FEATURES (reachable via navigation — SDK handles it automatically):\n${JSON.stringify(ghostFeatures.map(summarise), null, 2)}` : '';
|
|
502
|
+
});
|
|
511
503
|
return `
|
|
512
504
|
You are an in-app assistant called "${config.assistantName || 'AI Guide'}" for "${config.appName}".
|
|
513
505
|
Your ONLY job: guide users step-by-step through tasks using the feature map below.
|
|
514
506
|
|
|
515
|
-
${screens.length > 1 ? `SCREENS: This app has multiple screens: ${screens.join(', ')}. The SDK
|
|
516
|
-
|
|
517
|
-
${liveSection}
|
|
507
|
+
${screens.length > 1 ? `SCREENS: This app has multiple screens: ${screens.join(', ')}. Features are screen-specific. The SDK handles navigation — just pick the right features.` : ''}
|
|
518
508
|
|
|
519
|
-
|
|
509
|
+
FEATURE MAP (only reference IDs from this list):
|
|
510
|
+
${JSON.stringify(featureSummary, null, 2)}
|
|
520
511
|
|
|
521
512
|
RESPOND ONLY with this exact JSON — no markdown, no extra text:
|
|
522
513
|
{
|
|
@@ -533,26 +524,16 @@ RESPOND ONLY with this exact JSON — no markdown, no extra text:
|
|
|
533
524
|
}
|
|
534
525
|
|
|
535
526
|
RULES:
|
|
536
|
-
1. The step "id" MUST match a feature id from the
|
|
527
|
+
1. The step "id" MUST match a feature id from the feature map.
|
|
537
528
|
2. Only use selectors and IDs from the feature map. Never invent them.
|
|
538
|
-
3.
|
|
539
|
-
4.
|
|
540
|
-
5.
|
|
529
|
+
3. No matching feature → steps: [], explain kindly in message.
|
|
530
|
+
4. position values: top | bottom | left | right | auto only.
|
|
531
|
+
5. Order steps logically. For multi-step flows, order as the user encounters them.
|
|
532
|
+
6. For forms: ALWAYS include a step for the form section or first input BEFORE the
|
|
541
533
|
continue/submit button. The button step must always be LAST in its section.
|
|
542
|
-
|
|
534
|
+
7. If a feature has a flow, include one step per flow entry using the same feature id —
|
|
543
535
|
the SDK expands them automatically.
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
WHEN THE USER'S REQUEST DOESN'T MATCH ANY FEATURE:
|
|
547
|
-
- If it partially matches something (e.g. they said "create template" and there's a
|
|
548
|
-
"template-gallery" feature): guide them to the closest matching feature and explain
|
|
549
|
-
what it does. Don't say you can't help.
|
|
550
|
-
- If it matches a feature on another page (ghost): include that feature's steps normally.
|
|
551
|
-
The SDK will navigate there automatically. Do NOT tell the user to navigate manually.
|
|
552
|
-
- If there is genuinely no match anywhere in the feature map: set steps to [] and say
|
|
553
|
-
something like "That doesn't seem to be a feature in ${config.appName} yet. Here's
|
|
554
|
-
what I can help you with:" then list 2-3 relevant features from the map by name.
|
|
555
|
-
Never say you "can only guide through available features" — always offer alternatives.
|
|
536
|
+
8. Never skip features in a required sequence. Include every step end-to-end.
|
|
556
537
|
`.trim();
|
|
557
538
|
}
|
|
558
539
|
|