@goreal-ai/echo-pdk 0.11.0 → 0.12.0
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/context/plp-resolver.d.ts +2 -1
- package/dist/context/plp-resolver.d.ts.map +1 -1
- package/dist/context/plp-resolver.js.map +1 -1
- package/dist/context/resolver.d.ts +3 -3
- package/dist/context/resolver.d.ts.map +1 -1
- package/dist/context/resolver.js +1 -0
- package/dist/context/resolver.js.map +1 -1
- package/dist/echo-pdk.graaljs.js +173 -38
- package/dist/eval/assertions.js +2 -0
- package/dist/eval/assertions.js.map +1 -1
- package/dist/eval/loader.js.map +1 -1
- package/dist/eval/runner.js +1 -2
- package/dist/eval/runner.js.map +1 -1
- package/dist/evaluator/evaluator.d.ts.map +1 -1
- package/dist/evaluator/evaluator.js +12 -12
- package/dist/evaluator/evaluator.js.map +1 -1
- package/dist/evaluator/operators.d.ts.map +1 -1
- package/dist/evaluator/operators.js +1 -0
- package/dist/evaluator/operators.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/parser/ast.d.ts +6 -1
- package/dist/parser/ast.d.ts.map +1 -1
- package/dist/parser/ast.js +19 -1
- package/dist/parser/ast.js.map +1 -1
- package/dist/parser/index.d.ts +1 -1
- package/dist/parser/index.d.ts.map +1 -1
- package/dist/parser/index.js +1 -1
- package/dist/parser/index.js.map +1 -1
- package/dist/parser/lexer.d.ts +10 -2
- package/dist/parser/lexer.d.ts.map +1 -1
- package/dist/parser/lexer.js +24 -1
- package/dist/parser/lexer.js.map +1 -1
- package/dist/parser/parser.d.ts.map +1 -1
- package/dist/parser/parser.js +97 -25
- package/dist/parser/parser.js.map +1 -1
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +1 -0
- package/dist/plugins/index.js.map +1 -1
- package/dist/project/meta.js.map +1 -1
- package/dist/providers/openai.js.map +1 -1
- package/dist/providers/types.d.ts +3 -2
- package/dist/providers/types.d.ts.map +1 -1
- package/dist/renderer/renderer.d.ts.map +1 -1
- package/dist/renderer/renderer.js +56 -1
- package/dist/renderer/renderer.js.map +1 -1
- package/dist/types.d.ts +40 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -30,12 +30,13 @@
|
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
32
|
import type { ContextResolver, ContextResolveResult, ContextBatchResult } from './resolver.js';
|
|
33
|
+
import type { PLPClient as PLPClientType } from '@goreal-ai/plp-client';
|
|
33
34
|
/**
|
|
34
35
|
* PLP resolver configuration.
|
|
35
36
|
*/
|
|
36
37
|
export interface PlpResolverConfig {
|
|
37
38
|
/** Pre-configured PLPClient instance (preferred) */
|
|
38
|
-
client?:
|
|
39
|
+
client?: PLPClientType;
|
|
39
40
|
/** The PLP server URL (e.g., 'https://api.echostash.com') - required if client not provided */
|
|
40
41
|
serverUrl?: string;
|
|
41
42
|
/** Authentication token or API key - required if client not provided */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plp-resolver.d.ts","sourceRoot":"","sources":["../../src/context/plp-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"plp-resolver.d.ts","sourceRoot":"","sources":["../../src/context/plp-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE/F,OAAO,KAAK,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAqBxE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oDAAoD;IACpD,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,+FAA+F;IAC/F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAMD;;;;;;GAMG;AACH,qBAAa,kBAAmB,YAAW,eAAe;IACxD,OAAO,CAAC,MAAM,CAA8B;IAC5C,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,WAAW,CAA8B;gBAErC,MAAM,EAAE,iBAAiB;IAOrC;;;OAGG;YACW,YAAY;IA0B1B;;OAEG;IACG,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA+B1D;;OAEG;IACG,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAyDhE;;OAEG;YACW,uBAAuB;IA2BrC;;OAEG;YACW,wBAAwB;IAKtC;;OAEG;YACW,yBAAyB;CA0CxC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,GAAG,kBAAkB,CAM/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plp-resolver.js","sourceRoot":"","sources":["../../src/context/plp-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;
|
|
1
|
+
{"version":3,"file":"plp-resolver.js","sourceRoot":"","sources":["../../src/context/plp-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAKH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpF,+CAA+C;AAC/C,IAAI,cAAc,GAAgC,IAAI,CAAC;AAEvD,KAAK,UAAU,YAAY;IACzB,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ED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAyB;IACzD,4DAA4D;IAC5D,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1D,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;IACrF,CAAC;IACD,OAAO,IAAI,kBAAkB,CAAC,MAAM,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* - Uses local files or fixtures
|
|
22
22
|
* - No auth required
|
|
23
23
|
*/
|
|
24
|
-
import type { ResolvedContextContent } from '../types.js';
|
|
24
|
+
import type { ASTNode, ResolvedContextContent } from '../types.js';
|
|
25
25
|
/**
|
|
26
26
|
* Result from resolving a single context reference.
|
|
27
27
|
*/
|
|
@@ -124,7 +124,7 @@ export declare function validateContextPath(path: string): {
|
|
|
124
124
|
* @param ast - The AST nodes to search
|
|
125
125
|
* @returns Array of unique context paths
|
|
126
126
|
*/
|
|
127
|
-
export declare function collectContextPaths(ast:
|
|
127
|
+
export declare function collectContextPaths(ast: ASTNode[]): string[];
|
|
128
128
|
/**
|
|
129
129
|
* Apply resolved content to context nodes in the AST.
|
|
130
130
|
*
|
|
@@ -134,7 +134,7 @@ export declare function collectContextPaths(ast: import('../types.js').ASTNode[]
|
|
|
134
134
|
* @param ast - The AST nodes to update
|
|
135
135
|
* @param resolved - Map of path to resolved content
|
|
136
136
|
*/
|
|
137
|
-
export declare function applyResolvedContext(ast:
|
|
137
|
+
export declare function applyResolvedContext(ast: ASTNode[], resolved: ContextBatchResult): void;
|
|
138
138
|
/**
|
|
139
139
|
* A mock resolver that returns test data.
|
|
140
140
|
* Useful for unit tests and playground.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../src/context/resolver.ts"],"names":[],"mapp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GAQG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,OAAO,EAAE,EACd,QAAQ,EAAE,kBAAkB,GAC3B,IAAI,CAwBN;AAMD;;;GAGG;AACH,qBAAa,mBAAoB,YAAW,eAAe;IACzD,OAAO,CAAC,QAAQ,CAAsC;gBAE1C,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC;IAIzD;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,sBAAsB,GAAG,IAAI;IAKtD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAoBpD,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC;CASjE"}
|
package/dist/context/resolver.js
CHANGED
|
@@ -195,6 +195,7 @@ export class MockContextResolver {
|
|
|
195
195
|
addMock(path, content) {
|
|
196
196
|
this.mockData.set(path, content);
|
|
197
197
|
}
|
|
198
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
198
199
|
async resolve(path) {
|
|
199
200
|
// Validate the path first
|
|
200
201
|
const validation = validateContextPath(path);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../src/context/resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AA4EH,gFAAgF;AAChF,aAAa;AACb,gFAAgF;AAEhF;;GAEG;AACH,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AAEjD;;GAEG;AACH,MAAM,gBAAgB,GAAG,yBAAyB,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AACnC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,IAAI,CAAC,cAAc,CAAC,IAAI,CAA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I,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;QACpC,CAAC;QAED,qBAAqB;QACrB,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,sBAAsB,IAAI,EAAE;SACpC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,KAAe;QAChC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAgC,CAAC;QAExD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9C,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
|
package/dist/echo-pdk.graaljs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
// Echo PDK Bundle for GraalJS
|
|
3
|
-
// Generated: 2026-03-
|
|
3
|
+
// Generated: 2026-03-26T19:08:37.785Z
|
|
4
4
|
|
|
5
5
|
"use strict";
|
|
6
6
|
var EchoPDK = (() => {
|
|
@@ -77,6 +77,7 @@ var EchoPDK = (() => {
|
|
|
77
77
|
createRoleNode: () => createRoleNode,
|
|
78
78
|
createSchemaNode: () => createSchemaNode,
|
|
79
79
|
createSectionNode: () => createSectionNode,
|
|
80
|
+
createSkillNode: () => createSkillNode,
|
|
80
81
|
createTextNode: () => createTextNode,
|
|
81
82
|
createToolNode: () => createToolNode,
|
|
82
83
|
createVariableNode: () => createVariableNode,
|
|
@@ -9419,6 +9420,10 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
9419
9420
|
name: "EndTool",
|
|
9420
9421
|
pattern: /\[END TOOL\]/
|
|
9421
9422
|
});
|
|
9423
|
+
var EndSkill = createToken({
|
|
9424
|
+
name: "EndSkill",
|
|
9425
|
+
pattern: /\[END SKILL\]/
|
|
9426
|
+
});
|
|
9422
9427
|
var EndSchema = createToken({
|
|
9423
9428
|
name: "EndSchema",
|
|
9424
9429
|
pattern: /\[END SCHEMA\]/
|
|
@@ -9452,6 +9457,11 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
9452
9457
|
pattern: /\[#TOOL/,
|
|
9453
9458
|
push_mode: "DIRECTIVE_MODE"
|
|
9454
9459
|
});
|
|
9460
|
+
var SkillOpen = createToken({
|
|
9461
|
+
name: "SkillOpen",
|
|
9462
|
+
pattern: /\[#SKILL/,
|
|
9463
|
+
push_mode: "DIRECTIVE_MODE"
|
|
9464
|
+
});
|
|
9455
9465
|
var SchemaStart = createToken({
|
|
9456
9466
|
name: "SchemaStart",
|
|
9457
9467
|
pattern: /\[#SCHEMA\]/
|
|
@@ -9564,7 +9574,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
9564
9574
|
});
|
|
9565
9575
|
var Text = createToken({
|
|
9566
9576
|
name: "Text",
|
|
9567
|
-
pattern: /(?:[
|
|
9577
|
+
pattern: /(?:[^[{#]|\[(?![#E])|\{(?!\{)|#(?!context\())+/,
|
|
9568
9578
|
line_breaks: true
|
|
9569
9579
|
});
|
|
9570
9580
|
var defaultModeTokens = [
|
|
@@ -9573,6 +9583,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
9573
9583
|
EndSection,
|
|
9574
9584
|
EndRole,
|
|
9575
9585
|
EndTool,
|
|
9586
|
+
EndSkill,
|
|
9576
9587
|
EndSchema,
|
|
9577
9588
|
Else,
|
|
9578
9589
|
// Directive openers (push to DIRECTIVE_MODE)
|
|
@@ -9581,6 +9592,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
9581
9592
|
SectionOpen,
|
|
9582
9593
|
RoleOpen,
|
|
9583
9594
|
ToolOpen,
|
|
9595
|
+
SkillOpen,
|
|
9584
9596
|
SchemaStart,
|
|
9585
9597
|
Import,
|
|
9586
9598
|
Include,
|
|
@@ -9652,11 +9664,17 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
9652
9664
|
// Directive keywords
|
|
9653
9665
|
EndIf,
|
|
9654
9666
|
EndSection,
|
|
9667
|
+
EndRole,
|
|
9668
|
+
EndTool,
|
|
9669
|
+
EndSkill,
|
|
9655
9670
|
EndSchema,
|
|
9656
9671
|
Else,
|
|
9657
9672
|
IfOpen,
|
|
9658
9673
|
ElseIf,
|
|
9659
9674
|
SectionOpen,
|
|
9675
|
+
RoleOpen,
|
|
9676
|
+
ToolOpen,
|
|
9677
|
+
SkillOpen,
|
|
9660
9678
|
SchemaStart,
|
|
9661
9679
|
Import,
|
|
9662
9680
|
Include,
|
|
@@ -9789,6 +9807,16 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
9789
9807
|
location
|
|
9790
9808
|
};
|
|
9791
9809
|
}
|
|
9810
|
+
function createSkillNode(name, description, parameters, location, source) {
|
|
9811
|
+
return {
|
|
9812
|
+
type: "skill",
|
|
9813
|
+
name,
|
|
9814
|
+
description,
|
|
9815
|
+
source,
|
|
9816
|
+
parameters,
|
|
9817
|
+
location
|
|
9818
|
+
};
|
|
9819
|
+
}
|
|
9792
9820
|
function createSchemaNode(schema4, location) {
|
|
9793
9821
|
return {
|
|
9794
9822
|
type: "schema",
|
|
@@ -9816,6 +9844,8 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
9816
9844
|
return visitor.visitRole?.(node);
|
|
9817
9845
|
case "tool":
|
|
9818
9846
|
return visitor.visitTool?.(node);
|
|
9847
|
+
case "skill":
|
|
9848
|
+
return visitor.visitSkill?.(node);
|
|
9819
9849
|
case "schema":
|
|
9820
9850
|
return visitor.visitSchema?.(node);
|
|
9821
9851
|
default: {
|
|
@@ -9870,7 +9900,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
9870
9900
|
break;
|
|
9871
9901
|
case "conditional":
|
|
9872
9902
|
lines.push(
|
|
9873
|
-
`${pad}IF: {{${node.condition.variable}}} #${node.condition.operator}(${node.condition.argument ?? ""})`
|
|
9903
|
+
`${pad}IF: {{${node.condition.variable}}} #${node.condition.operator}(${String(node.condition.argument ?? "")})`
|
|
9874
9904
|
);
|
|
9875
9905
|
lines.push(prettyPrint(node.consequent, indent + 1));
|
|
9876
9906
|
if (node.alternate) {
|
|
@@ -9906,6 +9936,9 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
9906
9936
|
case "tool":
|
|
9907
9937
|
lines.push(`${pad}TOOL: ${node.name} (${node.parameters.length} params)`);
|
|
9908
9938
|
break;
|
|
9939
|
+
case "skill":
|
|
9940
|
+
lines.push(`${pad}SKILL: ${node.name} (${node.parameters.length} params)${node.source ? ` source=${node.source}` : ""}`);
|
|
9941
|
+
break;
|
|
9909
9942
|
case "schema":
|
|
9910
9943
|
lines.push(`${pad}SCHEMA: (${Object.keys(node.schema.properties).length} properties)`);
|
|
9911
9944
|
break;
|
|
@@ -9943,6 +9976,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
9943
9976
|
{ ALT: () => this.SUBRULE(this.sectionNode) },
|
|
9944
9977
|
{ ALT: () => this.SUBRULE(this.roleNode) },
|
|
9945
9978
|
{ ALT: () => this.SUBRULE(this.toolNode) },
|
|
9979
|
+
{ ALT: () => this.SUBRULE(this.skillNode) },
|
|
9946
9980
|
{ ALT: () => this.SUBRULE(this.schemaNode) },
|
|
9947
9981
|
{ ALT: () => this.SUBRULE(this.importNode) },
|
|
9948
9982
|
{ ALT: () => this.SUBRULE(this.includeNode) },
|
|
@@ -10098,6 +10132,21 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
10098
10132
|
});
|
|
10099
10133
|
this.CONSUME(EndTool);
|
|
10100
10134
|
}));
|
|
10135
|
+
/**
|
|
10136
|
+
* Skill definition: [#SKILL name]...[END SKILL]
|
|
10137
|
+
*
|
|
10138
|
+
* The body between [#SKILL name] and [END SKILL] is captured as Text tokens
|
|
10139
|
+
* and parsed as YAML-like structured data by the visitor.
|
|
10140
|
+
*/
|
|
10141
|
+
__publicField(this, "skillNode", this.RULE("skillNode", () => {
|
|
10142
|
+
this.CONSUME(SkillOpen);
|
|
10143
|
+
this.CONSUME(Identifier);
|
|
10144
|
+
this.CONSUME(CloseBracket);
|
|
10145
|
+
this.MANY(() => {
|
|
10146
|
+
this.CONSUME(Text);
|
|
10147
|
+
});
|
|
10148
|
+
this.CONSUME(EndSkill);
|
|
10149
|
+
}));
|
|
10101
10150
|
/**
|
|
10102
10151
|
* Schema definition: [#SCHEMA]...[END SCHEMA]
|
|
10103
10152
|
*
|
|
@@ -10128,6 +10177,12 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
10128
10177
|
super();
|
|
10129
10178
|
this.validateVisitor();
|
|
10130
10179
|
}
|
|
10180
|
+
/**
|
|
10181
|
+
* Type-safe wrapper around Chevrotain's this.visit() which returns `any`.
|
|
10182
|
+
*/
|
|
10183
|
+
typedVisit(cstNode) {
|
|
10184
|
+
return this.visit(cstNode);
|
|
10185
|
+
}
|
|
10131
10186
|
/**
|
|
10132
10187
|
* Visit the root template rule.
|
|
10133
10188
|
*/
|
|
@@ -10135,7 +10190,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
10135
10190
|
const nodes = [];
|
|
10136
10191
|
if (ctx.node) {
|
|
10137
10192
|
for (const nodeCtx of ctx.node) {
|
|
10138
|
-
const node = this.
|
|
10193
|
+
const node = this.typedVisit(nodeCtx);
|
|
10139
10194
|
if (node) {
|
|
10140
10195
|
nodes.push(node);
|
|
10141
10196
|
}
|
|
@@ -10148,34 +10203,37 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
10148
10203
|
*/
|
|
10149
10204
|
node(ctx) {
|
|
10150
10205
|
if (ctx.textNode?.[0]) {
|
|
10151
|
-
return this.
|
|
10206
|
+
return this.typedVisit(ctx.textNode[0]);
|
|
10152
10207
|
}
|
|
10153
10208
|
if (ctx.variableNode?.[0]) {
|
|
10154
|
-
return this.
|
|
10209
|
+
return this.typedVisit(ctx.variableNode[0]);
|
|
10155
10210
|
}
|
|
10156
10211
|
if (ctx.conditionalNode?.[0]) {
|
|
10157
|
-
return this.
|
|
10212
|
+
return this.typedVisit(ctx.conditionalNode[0]);
|
|
10158
10213
|
}
|
|
10159
10214
|
if (ctx.sectionNode?.[0]) {
|
|
10160
|
-
return this.
|
|
10215
|
+
return this.typedVisit(ctx.sectionNode[0]);
|
|
10161
10216
|
}
|
|
10162
10217
|
if (ctx.importNode?.[0]) {
|
|
10163
|
-
return this.
|
|
10218
|
+
return this.typedVisit(ctx.importNode[0]);
|
|
10164
10219
|
}
|
|
10165
10220
|
if (ctx.includeNode?.[0]) {
|
|
10166
|
-
return this.
|
|
10221
|
+
return this.typedVisit(ctx.includeNode[0]);
|
|
10167
10222
|
}
|
|
10168
10223
|
if (ctx.contextNode?.[0]) {
|
|
10169
|
-
return this.
|
|
10224
|
+
return this.typedVisit(ctx.contextNode[0]);
|
|
10170
10225
|
}
|
|
10171
10226
|
if (ctx.roleNode?.[0]) {
|
|
10172
|
-
return this.
|
|
10227
|
+
return this.typedVisit(ctx.roleNode[0]);
|
|
10173
10228
|
}
|
|
10174
10229
|
if (ctx.toolNode?.[0]) {
|
|
10175
|
-
return this.
|
|
10230
|
+
return this.typedVisit(ctx.toolNode[0]);
|
|
10231
|
+
}
|
|
10232
|
+
if (ctx.skillNode?.[0]) {
|
|
10233
|
+
return this.typedVisit(ctx.skillNode[0]);
|
|
10176
10234
|
}
|
|
10177
10235
|
if (ctx.schemaNode?.[0]) {
|
|
10178
|
-
return this.
|
|
10236
|
+
return this.typedVisit(ctx.schemaNode[0]);
|
|
10179
10237
|
}
|
|
10180
10238
|
return void 0;
|
|
10181
10239
|
}
|
|
@@ -10234,11 +10292,11 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
10234
10292
|
const ifOpenToken = ctx.IfOpen?.[0];
|
|
10235
10293
|
const endIfToken = ctx.EndIf?.[0];
|
|
10236
10294
|
const conditionCtx = ctx.condition?.[0];
|
|
10237
|
-
const condition = conditionCtx ? this.
|
|
10295
|
+
const condition = conditionCtx ? this.typedVisit(conditionCtx) : createConditionExpr("", "exists");
|
|
10238
10296
|
const consequent = [];
|
|
10239
10297
|
if (ctx.node) {
|
|
10240
10298
|
for (const nodeCtx of ctx.node) {
|
|
10241
|
-
const node = this.
|
|
10299
|
+
const node = this.typedVisit(nodeCtx);
|
|
10242
10300
|
if (node) {
|
|
10243
10301
|
consequent.push(node);
|
|
10244
10302
|
}
|
|
@@ -10246,7 +10304,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
10246
10304
|
}
|
|
10247
10305
|
let alternate;
|
|
10248
10306
|
if (ctx.elseBlock?.[0]) {
|
|
10249
|
-
alternate = this.
|
|
10307
|
+
alternate = this.typedVisit(ctx.elseBlock[0]);
|
|
10250
10308
|
}
|
|
10251
10309
|
if (ctx.elseIfBlock) {
|
|
10252
10310
|
for (let i = ctx.elseIfBlock.length - 1; i >= 0; i--) {
|
|
@@ -10270,11 +10328,11 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
10270
10328
|
const elseIfToken = children.ElseIf?.[0];
|
|
10271
10329
|
const closeBracketToken = children.CloseBracket?.[0];
|
|
10272
10330
|
const conditionCtx = children.condition?.[0];
|
|
10273
|
-
const condition = conditionCtx ? this.
|
|
10331
|
+
const condition = conditionCtx ? this.typedVisit(conditionCtx) : createConditionExpr("", "exists");
|
|
10274
10332
|
const consequent = [];
|
|
10275
10333
|
if (children.node) {
|
|
10276
10334
|
for (const nodeCtx of children.node) {
|
|
10277
|
-
const node = this.
|
|
10335
|
+
const node = this.typedVisit(nodeCtx);
|
|
10278
10336
|
if (node) {
|
|
10279
10337
|
consequent.push(node);
|
|
10280
10338
|
}
|
|
@@ -10307,7 +10365,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
10307
10365
|
const nodes = [];
|
|
10308
10366
|
if (ctx.node) {
|
|
10309
10367
|
for (const nodeCtx of ctx.node) {
|
|
10310
|
-
const node = this.
|
|
10368
|
+
const node = this.typedVisit(nodeCtx);
|
|
10311
10369
|
if (node) {
|
|
10312
10370
|
nodes.push(node);
|
|
10313
10371
|
}
|
|
@@ -10350,7 +10408,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
10350
10408
|
const body = [];
|
|
10351
10409
|
if (ctx.node) {
|
|
10352
10410
|
for (const nodeCtx of ctx.node) {
|
|
10353
|
-
const node = this.
|
|
10411
|
+
const node = this.typedVisit(nodeCtx);
|
|
10354
10412
|
if (node) {
|
|
10355
10413
|
body.push(node);
|
|
10356
10414
|
}
|
|
@@ -10413,7 +10471,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
10413
10471
|
const body = [];
|
|
10414
10472
|
if (ctx.node) {
|
|
10415
10473
|
for (const nodeCtx of ctx.node) {
|
|
10416
|
-
const node = this.
|
|
10474
|
+
const node = this.typedVisit(nodeCtx);
|
|
10417
10475
|
if (node) {
|
|
10418
10476
|
body.push(node);
|
|
10419
10477
|
}
|
|
@@ -10436,6 +10494,20 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
10436
10494
|
const location = toolOpenToken && endToolToken ? mergeLocations(getTokenLocation(toolOpenToken), getTokenLocation(endToolToken)) : defaultLocation;
|
|
10437
10495
|
return createToolNode(name, description, parameters, location);
|
|
10438
10496
|
}
|
|
10497
|
+
/**
|
|
10498
|
+
* Visit a skill node.
|
|
10499
|
+
* Collects raw text body and parses as YAML-like skill definition.
|
|
10500
|
+
*/
|
|
10501
|
+
skillNode(ctx) {
|
|
10502
|
+
const skillOpenToken = ctx.SkillOpen?.[0];
|
|
10503
|
+
const endSkillToken = ctx.EndSkill?.[0];
|
|
10504
|
+
const identifierToken = ctx.Identifier?.[0];
|
|
10505
|
+
const name = identifierToken?.image ?? "";
|
|
10506
|
+
const bodyText = (ctx.Text ?? []).map((t) => t.image).join("");
|
|
10507
|
+
const { description, source, parameters } = parseSkillBody(bodyText);
|
|
10508
|
+
const location = skillOpenToken && endSkillToken ? mergeLocations(getTokenLocation(skillOpenToken), getTokenLocation(endSkillToken)) : defaultLocation;
|
|
10509
|
+
return createSkillNode(name, description, parameters, location, source);
|
|
10510
|
+
}
|
|
10439
10511
|
/**
|
|
10440
10512
|
* Visit a schema node.
|
|
10441
10513
|
* Collects raw text body and parses as YAML-like schema definition.
|
|
@@ -10523,10 +10595,11 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
10523
10595
|
};
|
|
10524
10596
|
});
|
|
10525
10597
|
}
|
|
10526
|
-
function
|
|
10598
|
+
function parseBlockBody(text, extraFields = []) {
|
|
10527
10599
|
const lines = text.split("\n");
|
|
10528
10600
|
let description = "";
|
|
10529
10601
|
const parameters = [];
|
|
10602
|
+
const extra = {};
|
|
10530
10603
|
let section = "root";
|
|
10531
10604
|
let currentParam = null;
|
|
10532
10605
|
for (const line of lines) {
|
|
@@ -10538,6 +10611,14 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
10538
10611
|
section = "root";
|
|
10539
10612
|
} else if (trimmed === "parameters:") {
|
|
10540
10613
|
section = "parameters";
|
|
10614
|
+
} else {
|
|
10615
|
+
for (const field of extraFields) {
|
|
10616
|
+
if (trimmed.startsWith(`${field}:`)) {
|
|
10617
|
+
extra[field] = trimmed.slice(field.length + 1).trim();
|
|
10618
|
+
section = "root";
|
|
10619
|
+
break;
|
|
10620
|
+
}
|
|
10621
|
+
}
|
|
10541
10622
|
}
|
|
10542
10623
|
continue;
|
|
10543
10624
|
}
|
|
@@ -10580,8 +10661,16 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
10580
10661
|
if (currentParam?.name) {
|
|
10581
10662
|
parameters.push(currentParam);
|
|
10582
10663
|
}
|
|
10664
|
+
return { description, parameters, extra };
|
|
10665
|
+
}
|
|
10666
|
+
function parseToolBody(text) {
|
|
10667
|
+
const { description, parameters } = parseBlockBody(text);
|
|
10583
10668
|
return { description, parameters };
|
|
10584
10669
|
}
|
|
10670
|
+
function parseSkillBody(text) {
|
|
10671
|
+
const { description, parameters, extra } = parseBlockBody(text, ["source"]);
|
|
10672
|
+
return { description, source: extra.source, parameters };
|
|
10673
|
+
}
|
|
10585
10674
|
function parseSchemaBody(text) {
|
|
10586
10675
|
const lines = text.split("\n");
|
|
10587
10676
|
const properties = {};
|
|
@@ -10928,6 +11017,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
10928
11017
|
trigger: "#ai",
|
|
10929
11018
|
snippet: "#ai_gate($1)"
|
|
10930
11019
|
},
|
|
11020
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
10931
11021
|
handler: async (_value, _question) => {
|
|
10932
11022
|
throw new Error(
|
|
10933
11023
|
"AI gate not configured. Set aiProvider in createEcho() config."
|
|
@@ -11123,13 +11213,12 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
11123
11213
|
case "import":
|
|
11124
11214
|
return [node];
|
|
11125
11215
|
case "include": {
|
|
11126
|
-
const
|
|
11127
|
-
const sectionContent = ctx.sections.get(includeNode.name);
|
|
11216
|
+
const sectionContent = ctx.sections.get(node.name);
|
|
11128
11217
|
if (sectionContent) {
|
|
11129
11218
|
return evaluateNodes(sectionContent, ctx);
|
|
11130
11219
|
}
|
|
11131
11220
|
if (ctx.config.strict) {
|
|
11132
|
-
throw new Error(`Section not found: ${
|
|
11221
|
+
throw new Error(`Section not found: ${node.name}`);
|
|
11133
11222
|
}
|
|
11134
11223
|
return [];
|
|
11135
11224
|
}
|
|
@@ -11141,6 +11230,8 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
11141
11230
|
}
|
|
11142
11231
|
case "tool":
|
|
11143
11232
|
return [node];
|
|
11233
|
+
case "skill":
|
|
11234
|
+
return [node];
|
|
11144
11235
|
case "schema":
|
|
11145
11236
|
return [node];
|
|
11146
11237
|
default: {
|
|
@@ -11159,17 +11250,15 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
11159
11250
|
function collectSections(nodes, sections) {
|
|
11160
11251
|
for (const node of nodes) {
|
|
11161
11252
|
if (node.type === "section") {
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
collectSections(sectionNode.body, sections);
|
|
11253
|
+
sections.set(node.name, node.body);
|
|
11254
|
+
collectSections(node.body, sections);
|
|
11165
11255
|
} else if (node.type === "conditional") {
|
|
11166
|
-
|
|
11167
|
-
|
|
11168
|
-
|
|
11169
|
-
|
|
11170
|
-
collectSections(conditionalNode.alternate, sections);
|
|
11256
|
+
collectSections(node.consequent, sections);
|
|
11257
|
+
if (node.alternate) {
|
|
11258
|
+
if (Array.isArray(node.alternate)) {
|
|
11259
|
+
collectSections(node.alternate, sections);
|
|
11171
11260
|
} else {
|
|
11172
|
-
collectSections([
|
|
11261
|
+
collectSections([node.alternate], sections);
|
|
11173
11262
|
}
|
|
11174
11263
|
}
|
|
11175
11264
|
}
|
|
@@ -11352,6 +11441,8 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
11352
11441
|
return render(node.body, options);
|
|
11353
11442
|
case "tool":
|
|
11354
11443
|
return void 0;
|
|
11444
|
+
case "skill":
|
|
11445
|
+
return formatSkillText(node);
|
|
11355
11446
|
case "schema":
|
|
11356
11447
|
return void 0;
|
|
11357
11448
|
default: {
|
|
@@ -11458,6 +11549,9 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
11458
11549
|
break;
|
|
11459
11550
|
case "tool":
|
|
11460
11551
|
break;
|
|
11552
|
+
case "skill":
|
|
11553
|
+
currentText += formatSkillText(node);
|
|
11554
|
+
break;
|
|
11461
11555
|
case "schema":
|
|
11462
11556
|
break;
|
|
11463
11557
|
default: {
|
|
@@ -11561,6 +11655,8 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
11561
11655
|
function renderMessages(ast, options) {
|
|
11562
11656
|
const messages = [];
|
|
11563
11657
|
const tools = [];
|
|
11658
|
+
const skills = [];
|
|
11659
|
+
const allSkillNodes = collectAllSkillNodes(ast);
|
|
11564
11660
|
const roleNodes = [];
|
|
11565
11661
|
const toolNodes = [];
|
|
11566
11662
|
const schemaNodes = [];
|
|
@@ -11602,9 +11698,27 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
11602
11698
|
for (const toolNode of toolNodes) {
|
|
11603
11699
|
tools.push(convertToolNode(toolNode));
|
|
11604
11700
|
}
|
|
11701
|
+
for (const skillNode of allSkillNodes) {
|
|
11702
|
+
skills.push(convertSkillNode(skillNode));
|
|
11703
|
+
}
|
|
11605
11704
|
const firstSchema = schemaNodes[0];
|
|
11606
11705
|
const schema4 = firstSchema ? firstSchema.schema : void 0;
|
|
11607
|
-
return { messages, tools, meta: {}, ...schema4 && { schema: schema4 } };
|
|
11706
|
+
return { messages, tools, skills, meta: {}, ...schema4 && { schema: schema4 } };
|
|
11707
|
+
}
|
|
11708
|
+
function formatSkillText(node) {
|
|
11709
|
+
return `- **${node.name}**: ${node.description}
|
|
11710
|
+
`;
|
|
11711
|
+
}
|
|
11712
|
+
function collectAllSkillNodes(nodes) {
|
|
11713
|
+
const skills = [];
|
|
11714
|
+
for (const node of nodes) {
|
|
11715
|
+
if (node.type === "skill") {
|
|
11716
|
+
skills.push(node);
|
|
11717
|
+
} else if (node.type === "role") {
|
|
11718
|
+
skills.push(...collectAllSkillNodes(node.body));
|
|
11719
|
+
}
|
|
11720
|
+
}
|
|
11721
|
+
return skills;
|
|
11608
11722
|
}
|
|
11609
11723
|
function convertToolNode(node) {
|
|
11610
11724
|
return {
|
|
@@ -11616,6 +11730,17 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
11616
11730
|
}
|
|
11617
11731
|
};
|
|
11618
11732
|
}
|
|
11733
|
+
function convertSkillNode(node) {
|
|
11734
|
+
return {
|
|
11735
|
+
type: "skill",
|
|
11736
|
+
skill: {
|
|
11737
|
+
name: node.name,
|
|
11738
|
+
description: node.description,
|
|
11739
|
+
...node.source && { source: node.source },
|
|
11740
|
+
parameters: convertParameters(node.parameters)
|
|
11741
|
+
}
|
|
11742
|
+
};
|
|
11743
|
+
}
|
|
11619
11744
|
function convertParameters(params) {
|
|
11620
11745
|
const properties = {};
|
|
11621
11746
|
const required = [];
|
|
@@ -12375,6 +12500,7 @@ ${question}`;
|
|
|
12375
12500
|
addMock(path, content) {
|
|
12376
12501
|
this.mockData.set(path, content);
|
|
12377
12502
|
}
|
|
12503
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
12378
12504
|
async resolve(path) {
|
|
12379
12505
|
const validation = validateContextPath(path);
|
|
12380
12506
|
if (!validation.isValid) {
|
|
@@ -19930,9 +20056,8 @@ ${end.comment}` : end.comment;
|
|
|
19930
20056
|
variables = {};
|
|
19931
20057
|
}
|
|
19932
20058
|
const allAssertions = [];
|
|
19933
|
-
let renderedOutput;
|
|
19934
20059
|
let llmResponseText;
|
|
19935
|
-
renderedOutput = await ctx.echo.render(ctx.template, variables);
|
|
20060
|
+
const renderedOutput = await ctx.echo.render(ctx.template, variables);
|
|
19936
20061
|
if (test.expect_render) {
|
|
19937
20062
|
const renderCtx = { text: renderedOutput };
|
|
19938
20063
|
const results = await runAssertions(test.expect_render, renderCtx);
|
|
@@ -20834,6 +20959,16 @@ ${formattedErrors}`);
|
|
|
20834
20959
|
});
|
|
20835
20960
|
break;
|
|
20836
20961
|
}
|
|
20962
|
+
case "skill": {
|
|
20963
|
+
if (!node.name) {
|
|
20964
|
+
errors.push({
|
|
20965
|
+
code: "EMPTY_SKILL_NAME",
|
|
20966
|
+
message: "Skill name is required",
|
|
20967
|
+
location: node.location
|
|
20968
|
+
});
|
|
20969
|
+
}
|
|
20970
|
+
break;
|
|
20971
|
+
}
|
|
20837
20972
|
case "context": {
|
|
20838
20973
|
const validation = validateContextPath(node.path);
|
|
20839
20974
|
if (!validation.isValid) {
|
package/dist/eval/assertions.js
CHANGED
|
@@ -47,6 +47,7 @@ export async function runAssertions(assertions, ctx) {
|
|
|
47
47
|
}
|
|
48
48
|
return results;
|
|
49
49
|
}
|
|
50
|
+
/* eslint-disable @typescript-eslint/require-await -- Handlers conform to async AssertionHandler interface; some need await, some don't */
|
|
50
51
|
const assertionHandlers = {
|
|
51
52
|
// Text assertions
|
|
52
53
|
contains: async (value, ctx) => {
|
|
@@ -338,6 +339,7 @@ const assertionHandlers = {
|
|
|
338
339
|
};
|
|
339
340
|
},
|
|
340
341
|
};
|
|
342
|
+
/* eslint-enable @typescript-eslint/require-await */
|
|
341
343
|
// =============================================================================
|
|
342
344
|
// HELPERS
|
|
343
345
|
// =============================================================================
|