veryfront 0.1.892 → 0.1.894
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/esm/deno.d.ts +4 -0
- package/esm/deno.js +5 -1
- package/esm/src/discovery/import-rewriter.d.ts +1 -1
- package/esm/src/discovery/import-rewriter.d.ts.map +1 -1
- package/esm/src/discovery/import-rewriter.js +1 -0
- package/esm/src/discovery/transpiler.d.ts.map +1 -1
- package/esm/src/discovery/transpiler.js +2 -0
- package/esm/src/metrics/index.d.ts +31 -0
- package/esm/src/metrics/index.d.ts.map +1 -0
- package/esm/src/metrics/index.js +110 -0
- package/esm/src/server/handlers/request/project-run-execute.handler.d.ts +1 -0
- package/esm/src/server/handlers/request/project-run-execute.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/project-run-execute.handler.js +18 -1
- package/esm/src/skill/index.d.ts +10 -1
- package/esm/src/skill/index.d.ts.map +1 -1
- package/esm/src/skill/index.js +11 -1
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +9 -1
package/esm/deno.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ declare namespace _default {
|
|
|
25
25
|
"./agent": string;
|
|
26
26
|
"./agent/identity": string;
|
|
27
27
|
"./eval": string;
|
|
28
|
+
"./metrics": string;
|
|
28
29
|
"./eval/agent-service": string;
|
|
29
30
|
"./channels/control-plane": string;
|
|
30
31
|
"./channels/invoke": string;
|
|
@@ -39,6 +40,7 @@ declare namespace _default {
|
|
|
39
40
|
"./prompt": string;
|
|
40
41
|
"./resource": string;
|
|
41
42
|
"./runs": string;
|
|
43
|
+
"./skill": string;
|
|
42
44
|
"./mcp": string;
|
|
43
45
|
"./middleware": string;
|
|
44
46
|
"./observability": string;
|
|
@@ -94,6 +96,7 @@ declare namespace _default {
|
|
|
94
96
|
"veryfront/embedding": string;
|
|
95
97
|
"veryfront/runs": string;
|
|
96
98
|
"veryfront/eval": string;
|
|
99
|
+
"veryfront/metrics": string;
|
|
97
100
|
"veryfront/eval/agent-service": string;
|
|
98
101
|
"veryfront/agent/identity": string;
|
|
99
102
|
"veryfront/agent/react": string;
|
|
@@ -178,6 +181,7 @@ declare namespace _default {
|
|
|
178
181
|
"#veryfront/errors": string;
|
|
179
182
|
"#veryfront/eval": string;
|
|
180
183
|
"#veryfront/eval/agent-service": string;
|
|
184
|
+
"#veryfront/metrics": string;
|
|
181
185
|
"#veryfront/extensions/eval": string;
|
|
182
186
|
"#veryfront/html": string;
|
|
183
187
|
"#veryfront/mcp": string;
|
package/esm/deno.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"name": "veryfront",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.894",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"nodeModulesDir": "auto",
|
|
6
6
|
"minimumDependencyAge": {
|
|
@@ -81,6 +81,7 @@ export default {
|
|
|
81
81
|
"./agent": "./src/agent/index.ts",
|
|
82
82
|
"./agent/identity": "./src/agent/identity-contracts.ts",
|
|
83
83
|
"./eval": "./src/eval/index.ts",
|
|
84
|
+
"./metrics": "./src/metrics/index.ts",
|
|
84
85
|
"./eval/agent-service": "./src/eval/agent-service.ts",
|
|
85
86
|
"./channels/control-plane": "./src/channels/control-plane.ts",
|
|
86
87
|
"./channels/invoke": "./src/channels/invoke.ts",
|
|
@@ -95,6 +96,7 @@ export default {
|
|
|
95
96
|
"./prompt": "./src/prompt/index.ts",
|
|
96
97
|
"./resource": "./src/resource/index.ts",
|
|
97
98
|
"./runs": "./src/runs/index.ts",
|
|
99
|
+
"./skill": "./src/skill/index.ts",
|
|
98
100
|
"./mcp": "./src/mcp/index.ts",
|
|
99
101
|
"./middleware": "./src/middleware/index.ts",
|
|
100
102
|
"./observability": "./src/observability/index.ts",
|
|
@@ -150,6 +152,7 @@ export default {
|
|
|
150
152
|
"veryfront/embedding": "./src/embedding/index.ts",
|
|
151
153
|
"veryfront/runs": "./src/runs/index.ts",
|
|
152
154
|
"veryfront/eval": "./src/eval/index.ts",
|
|
155
|
+
"veryfront/metrics": "./src/metrics/index.ts",
|
|
153
156
|
"veryfront/eval/agent-service": "./src/eval/agent-service.ts",
|
|
154
157
|
"veryfront/agent/identity": "./src/agent/identity-contracts.ts",
|
|
155
158
|
"veryfront/agent/react": "./src/agent/react/index.ts",
|
|
@@ -234,6 +237,7 @@ export default {
|
|
|
234
237
|
"#veryfront/errors": "./src/errors/index.ts",
|
|
235
238
|
"#veryfront/eval": "./src/eval/index.ts",
|
|
236
239
|
"#veryfront/eval/agent-service": "./src/eval/agent-service.ts",
|
|
240
|
+
"#veryfront/metrics": "./src/metrics/index.ts",
|
|
237
241
|
"#veryfront/extensions/eval": "./src/extensions/eval/index.ts",
|
|
238
242
|
"#veryfront/html": "./src/html/index.ts",
|
|
239
243
|
"#veryfront/mcp": "./src/mcp/index.ts",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* (Deno, Node.js) and handles veryfront package resolution.
|
|
6
6
|
*/
|
|
7
7
|
import { createFileSystem } from "../platform/compat/fs.js";
|
|
8
|
-
export declare const DISCOVERY_GLOBAL_VERYFRONT_MODULES: readonly ["veryfront/agent", "veryfront/tool", "veryfront/platform", "veryfront/prompt", "veryfront/resource", "veryfront/embedding", "veryfront/workflow", "veryfront/work", "veryfront/eval", "veryfront/schemas"];
|
|
8
|
+
export declare const DISCOVERY_GLOBAL_VERYFRONT_MODULES: readonly ["veryfront/agent", "veryfront/tool", "veryfront/platform", "veryfront/prompt", "veryfront/resource", "veryfront/embedding", "veryfront/workflow", "veryfront/work", "veryfront/eval", "veryfront/metrics", "veryfront/schemas"];
|
|
9
9
|
interface DenoRewriteOptions {
|
|
10
10
|
compiled?: boolean;
|
|
11
11
|
resolveSpecifier?: (specifier: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-rewriter.d.ts","sourceRoot":"","sources":["../../../src/src/discovery/import-rewriter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,eAAO,MAAM,kCAAkC,
|
|
1
|
+
{"version":3,"file":"import-rewriter.d.ts","sourceRoot":"","sources":["../../../src/src/discovery/import-rewriter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,eAAO,MAAM,kCAAkC,2OAYrC,CAAC;AAEX,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;CAClD;AAkHD;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,kBAAuB,GAC/B,MAAM,CA2BR;AAqFD;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,EACvC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CA2PjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transpiler.d.ts","sourceRoot":"","sources":["../../../src/src/discovery/transpiler.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"transpiler.d.ts","sourceRoot":"","sources":["../../../src/src/discovery/transpiler.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAyIvD;;GAEG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,OAAO,CAAC,CAkGlB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C"}
|
|
@@ -22,6 +22,7 @@ import * as embeddingMod from "../embedding/index.js";
|
|
|
22
22
|
import * as workflowMod from "../workflow/index.js";
|
|
23
23
|
import * as workMod from "../work/index.js";
|
|
24
24
|
import * as evalMod from "../eval/index.js";
|
|
25
|
+
import * as metricsMod from "../metrics/index.js";
|
|
25
26
|
import * as schemasMod from "../schemas/index.js";
|
|
26
27
|
const transpileCache = new Map();
|
|
27
28
|
// Setup veryfront modules as globals for compiled binary support
|
|
@@ -42,6 +43,7 @@ async function ensureVeryfrontGlobals() {
|
|
|
42
43
|
"veryfront/workflow": workflowMod,
|
|
43
44
|
"veryfront/work": workMod,
|
|
44
45
|
"veryfront/eval": evalMod,
|
|
46
|
+
"veryfront/metrics": metricsMod,
|
|
45
47
|
"veryfront/schemas": schemasMod,
|
|
46
48
|
};
|
|
47
49
|
dntShim.dntGlobalThis.__VERYFRONT_MODULES__ = modules;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime/application metric hooks for project code.
|
|
3
|
+
*
|
|
4
|
+
* @module metrics
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { metrics } from "veryfront/metrics";
|
|
9
|
+
*
|
|
10
|
+
* metrics.counter("vf_eval_result_total", 1, { provider: "openai" });
|
|
11
|
+
* metrics.histogram("vf_eval_latency_ms", 420, { model: "gpt-5" });
|
|
12
|
+
* metrics.gauge("vf_eval_queue_depth", 3);
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
import "../../_dnt.polyfills.js";
|
|
16
|
+
export type MetricAttributeValue = string | number | boolean | null | undefined;
|
|
17
|
+
export type MetricAttributes = Record<string, MetricAttributeValue>;
|
|
18
|
+
export interface MetricInstrumentOptions {
|
|
19
|
+
description?: string;
|
|
20
|
+
unit?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function counter(name: string, value?: number, attributes?: MetricAttributes, options?: MetricInstrumentOptions): void;
|
|
23
|
+
export declare function histogram(name: string, value: number, attributes?: MetricAttributes, options?: MetricInstrumentOptions): void;
|
|
24
|
+
export declare function gauge(name: string, value: number, attributes?: MetricAttributes, options?: MetricInstrumentOptions): void;
|
|
25
|
+
export declare const metrics: {
|
|
26
|
+
counter: typeof counter;
|
|
27
|
+
histogram: typeof histogram;
|
|
28
|
+
gauge: typeof gauge;
|
|
29
|
+
__resetForTests(): void;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/metrics/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,yBAAyB,CAAC;AAYjC,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;AAChF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;AAEpE,MAAM,WAAW,uBAAuB;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAqFD,wBAAgB,OAAO,CACrB,IAAI,EAAE,MAAM,EACZ,KAAK,SAAI,EACT,UAAU,CAAC,EAAE,gBAAgB,EAC7B,OAAO,CAAC,EAAE,uBAAuB,GAChC,IAAI,CAEN;AAED,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,gBAAgB,EAC7B,OAAO,CAAC,EAAE,uBAAuB,GAChC,IAAI,CAEN;AAED,wBAAgB,KAAK,CACnB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,gBAAgB,EAC7B,OAAO,CAAC,EAAE,uBAAuB,GAChC,IAAI,CASN;AAED,eAAO,MAAM,OAAO;;;;uBAIC,IAAI;CAKxB,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime/application metric hooks for project code.
|
|
3
|
+
*
|
|
4
|
+
* @module metrics
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { metrics } from "veryfront/metrics";
|
|
9
|
+
*
|
|
10
|
+
* metrics.counter("vf_eval_result_total", 1, { provider: "openai" });
|
|
11
|
+
* metrics.histogram("vf_eval_latency_ms", 420, { model: "gpt-5" });
|
|
12
|
+
* metrics.gauge("vf_eval_queue_depth", 3);
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
import "../../_dnt.polyfills.js";
|
|
16
|
+
import { getGlobalMetricsAPI, } from "../observability/tracing/api-shim.js";
|
|
17
|
+
import { getCurrentRequestContext } from "../platform/adapters/fs/veryfront/request-context.js";
|
|
18
|
+
const counters = new Map();
|
|
19
|
+
const histograms = new Map();
|
|
20
|
+
const gauges = new Map();
|
|
21
|
+
function getMeter() {
|
|
22
|
+
return getGlobalMetricsAPI()?.getMeter("veryfront.project.metrics");
|
|
23
|
+
}
|
|
24
|
+
function normalizeAttributes(attributes) {
|
|
25
|
+
const normalized = {};
|
|
26
|
+
for (const [key, value] of Object.entries(attributes ?? {})) {
|
|
27
|
+
if (value === null || value === undefined)
|
|
28
|
+
continue;
|
|
29
|
+
normalized[key] = value;
|
|
30
|
+
}
|
|
31
|
+
const context = getCurrentRequestContext();
|
|
32
|
+
if (context?.projectId)
|
|
33
|
+
normalized.project_id = context.projectId;
|
|
34
|
+
if (context?.projectSlug)
|
|
35
|
+
normalized.project_slug = context.projectSlug;
|
|
36
|
+
if (context?.environmentName)
|
|
37
|
+
normalized.environment = context.environmentName;
|
|
38
|
+
return normalized;
|
|
39
|
+
}
|
|
40
|
+
function attributesKey(attributes) {
|
|
41
|
+
return JSON.stringify(Object.entries(attributes)
|
|
42
|
+
.sort(([left], [right]) => left.localeCompare(right))
|
|
43
|
+
.map(([key, value]) => [key, value]));
|
|
44
|
+
}
|
|
45
|
+
function getCounter(name, options) {
|
|
46
|
+
const cached = counters.get(name);
|
|
47
|
+
if (cached)
|
|
48
|
+
return cached;
|
|
49
|
+
const meter = getMeter();
|
|
50
|
+
if (!meter)
|
|
51
|
+
return null;
|
|
52
|
+
const counter = meter.createCounter(name, options);
|
|
53
|
+
counters.set(name, counter);
|
|
54
|
+
return counter;
|
|
55
|
+
}
|
|
56
|
+
function getHistogram(name, options) {
|
|
57
|
+
const cached = histograms.get(name);
|
|
58
|
+
if (cached)
|
|
59
|
+
return cached;
|
|
60
|
+
const meter = getMeter();
|
|
61
|
+
if (!meter)
|
|
62
|
+
return null;
|
|
63
|
+
const histogram = meter.createHistogram(name, options);
|
|
64
|
+
histograms.set(name, histogram);
|
|
65
|
+
return histogram;
|
|
66
|
+
}
|
|
67
|
+
function getGauge(name, options) {
|
|
68
|
+
const cached = gauges.get(name);
|
|
69
|
+
if (cached)
|
|
70
|
+
return cached;
|
|
71
|
+
const meter = getMeter();
|
|
72
|
+
if (!meter)
|
|
73
|
+
return null;
|
|
74
|
+
const samples = new Map();
|
|
75
|
+
const instrument = meter.createObservableGauge(name, options);
|
|
76
|
+
instrument.addCallback((result) => {
|
|
77
|
+
for (const sample of samples.values()) {
|
|
78
|
+
result.observe(sample.value, sample.attributes);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
const gauge = { instrument, samples };
|
|
82
|
+
gauges.set(name, gauge);
|
|
83
|
+
return gauge;
|
|
84
|
+
}
|
|
85
|
+
export function counter(name, value = 1, attributes, options) {
|
|
86
|
+
getCounter(name, options)?.add(value, normalizeAttributes(attributes));
|
|
87
|
+
}
|
|
88
|
+
export function histogram(name, value, attributes, options) {
|
|
89
|
+
getHistogram(name, options)?.record(value, normalizeAttributes(attributes));
|
|
90
|
+
}
|
|
91
|
+
export function gauge(name, value, attributes, options) {
|
|
92
|
+
const normalizedAttributes = normalizeAttributes(attributes);
|
|
93
|
+
const target = getGauge(name, options);
|
|
94
|
+
if (!target)
|
|
95
|
+
return;
|
|
96
|
+
target.samples.set(attributesKey(normalizedAttributes), {
|
|
97
|
+
value,
|
|
98
|
+
attributes: normalizedAttributes,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
export const metrics = {
|
|
102
|
+
counter,
|
|
103
|
+
histogram,
|
|
104
|
+
gauge,
|
|
105
|
+
__resetForTests() {
|
|
106
|
+
counters.clear();
|
|
107
|
+
histograms.clear();
|
|
108
|
+
gauges.clear();
|
|
109
|
+
},
|
|
110
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-run-execute.handler.d.ts","sourceRoot":"","sources":["../../../../../src/src/server/handlers/request/project-run-execute.handler.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,KAAK,cAAc,EAAgB,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAW,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,KAAK,cAAc,EAAgB,MAAM,4BAA4B,CAAC;AAE/E,OAAO,EACL,KAAK,6BAA6B,EAEnC,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EAGd,UAAU,EACV,cAAc,EACf,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,KAAK,kBAAkB,EAAoB,MAAM,sCAAsC,CAAC;AAEjG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAGvE,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAmB,aAAa,EAAE,MAAM,aAAa,CAAC;AACnG,OAAO,EAAE,WAAW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I,CAAC,CAAC;IAC3D,sBAAsB,CAAC,KAAK,EAAE;QAC5B,OAAO,EAAE,wBAAwB,CAAC;QAClC,GAAG,EAAE,cAAc,CAAC;QACpB,GAAG,EAAE,OAAO,CAAC;KACd,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACvC,wBAAwB,CAAC,KAAK,EAAE;QAC9B,OAAO,EAAE,wBAAwB,CAAC;QAClC,GAAG,EAAE,cAAc,CAAC;QACpB,GAAG,EAAE,OAAO,CAAC;KACd,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACvC,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,GAAG,IAAI,MAAM,CAAC;CACf;
|
|
1
|
+
{"version":3,"file":"project-run-execute.handler.d.ts","sourceRoot":"","sources":["../../../../../src/src/server/handlers/request/project-run-execute.handler.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,KAAK,cAAc,EAAgB,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAW,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,KAAK,cAAc,EAAgB,MAAM,4BAA4B,CAAC;AAE/E,OAAO,EACL,KAAK,6BAA6B,EAEnC,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EAGd,UAAU,EACV,cAAc,EACf,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,KAAK,kBAAkB,EAAoB,MAAM,sCAAsC,CAAC;AAEjG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAGvE,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAmB,aAAa,EAAE,MAAM,aAAa,CAAC;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C;IAChF,sBAAsB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D,sBAAsB,CAAC,KAAK,EAAE;QAC5B,OAAO,EAAE,wBAAwB,CAAC;QAClC,GAAG,EAAE,cAAc,CAAC;QACpB,GAAG,EAAE,OAAO,CAAC;KACd,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACvC,wBAAwB,CAAC,KAAK,EAAE;QAC9B,OAAO,EAAE,wBAAwB,CAAC;QAClC,GAAG,EAAE,cAAc,CAAC;QACpB,GAAG,EAAE,OAAO,CAAC;KACd,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACvC,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,GAAG,IAAI,MAAM,CAAC;CACf;AA8vBD,qBAAa,wBAAyB,SAAQ,WAAW;IAS3C,OAAO,CAAC,QAAQ,CAAC,IAAI;IARjC,QAAQ,EAAE,eAAe,CAMvB;gBAE2B,IAAI,GAAE,4BAA0C;IAIvE,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAsExE"}
|
|
@@ -30,6 +30,22 @@ function parseRecord(value) {
|
|
|
30
30
|
throw new Error("Expected object");
|
|
31
31
|
return value;
|
|
32
32
|
}
|
|
33
|
+
function parseOptionalUrl(value, fieldName) {
|
|
34
|
+
if (value === undefined)
|
|
35
|
+
return undefined;
|
|
36
|
+
if (typeof value !== "string" || value.length === 0)
|
|
37
|
+
throw new Error(`Invalid ${fieldName}`);
|
|
38
|
+
try {
|
|
39
|
+
const url = new URL(value);
|
|
40
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
41
|
+
throw new Error(`Invalid ${fieldName}`);
|
|
42
|
+
}
|
|
43
|
+
return url.toString();
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
throw new Error(`Invalid ${fieldName}`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
33
49
|
function parseExecuteRequest(value, pathRunId) {
|
|
34
50
|
if (!isRecord(value))
|
|
35
51
|
throw new Error("Expected object");
|
|
@@ -60,6 +76,7 @@ function parseExecuteRequest(value, pathRunId) {
|
|
|
60
76
|
kind,
|
|
61
77
|
target,
|
|
62
78
|
projectId,
|
|
79
|
+
runtimeAgUiEndpoint: parseOptionalUrl(value.runtimeAgUiEndpoint, "runtimeAgUiEndpoint"),
|
|
63
80
|
config: parseRecord(value.config),
|
|
64
81
|
input: parseRecord(value.input),
|
|
65
82
|
};
|
|
@@ -478,7 +495,7 @@ function createEvalAdapterConfig(input) {
|
|
|
478
495
|
throw new Error("Missing project runtime API token");
|
|
479
496
|
}
|
|
480
497
|
return {
|
|
481
|
-
endpoint: getSameOriginAgUiEndpoint(input.req),
|
|
498
|
+
endpoint: input.request.runtimeAgUiEndpoint ?? getSameOriginAgUiEndpoint(input.req),
|
|
482
499
|
authToken,
|
|
483
500
|
agentId: getEvalTargetAgentId(input.definition),
|
|
484
501
|
projectId: input.request.projectId,
|
package/esm/src/skill/index.d.ts
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Agent
|
|
2
|
+
* Agent skills.
|
|
3
3
|
*
|
|
4
4
|
* Public API for the agent skills system.
|
|
5
5
|
* Skills are project-level capabilities defined as SKILL.md files
|
|
6
6
|
* following the agentskills.io specification.
|
|
7
7
|
*
|
|
8
8
|
* @module
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { parseSkillFrontmatter, validateSkillMetadata } from "veryfront/skill";
|
|
13
|
+
*
|
|
14
|
+
* const parsed = await parseSkillFrontmatter("---\nname: review\ndescription: Review code\n---\n");
|
|
15
|
+
* validateSkillMetadata(parsed.frontmatter, "review");
|
|
16
|
+
* ```
|
|
9
17
|
*/
|
|
18
|
+
import "../../_dnt.polyfills.js";
|
|
10
19
|
export type { ActiveSkillContext, Skill, SkillContent, SkillMetadata, SkillScriptExecutor, SkillScriptExecutorInput, SkillScriptResult, } from "./types.js";
|
|
11
20
|
export { SKILL_ALLOWED_TOOL_PATTERN_REGEX, SKILL_ASSETS_DIR, SKILL_DESCRIPTION_MAX_LENGTH, SKILL_MD_FILENAME, SKILL_NAME_REGEX, SKILL_REFERENCES_DIR, SKILL_RESOURCES_DIR, SKILL_SCRIPTS_DIR, SKILL_TOOL_IDS, } from "./types.js";
|
|
12
21
|
export { type AgentCapabilityScope, getAllSkills, getSkill, isSkillVisibleTo, registerSkill, skillRegistry, } from "./registry.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/skill/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/skill/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,yBAAyB,CAAC;AAEjC,YAAY,EACV,kBAAkB,EAClB,KAAK,EACL,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,gCAAgC,EAChC,gBAAgB,EAChB,4BAA4B,EAC5B,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,GACf,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,KAAK,oBAAoB,EACzB,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,aAAa,GACd,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAG3E,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGtE,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAGvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAGpE,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,oBAAoB,CAAC"}
|
package/esm/src/skill/index.js
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Agent
|
|
2
|
+
* Agent skills.
|
|
3
3
|
*
|
|
4
4
|
* Public API for the agent skills system.
|
|
5
5
|
* Skills are project-level capabilities defined as SKILL.md files
|
|
6
6
|
* following the agentskills.io specification.
|
|
7
7
|
*
|
|
8
8
|
* @module
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { parseSkillFrontmatter, validateSkillMetadata } from "veryfront/skill";
|
|
13
|
+
*
|
|
14
|
+
* const parsed = await parseSkillFrontmatter("---\nname: review\ndescription: Review code\n---\n");
|
|
15
|
+
* validateSkillMetadata(parsed.frontmatter, "review");
|
|
16
|
+
* ```
|
|
9
17
|
*/
|
|
18
|
+
// Types
|
|
19
|
+
import "../../_dnt.polyfills.js";
|
|
10
20
|
export { SKILL_ALLOWED_TOOL_PATTERN_REGEX, SKILL_ASSETS_DIR, SKILL_DESCRIPTION_MAX_LENGTH, SKILL_MD_FILENAME, SKILL_NAME_REGEX, SKILL_REFERENCES_DIR, SKILL_RESOURCES_DIR, SKILL_SCRIPTS_DIR, SKILL_TOOL_IDS, } from "./types.js";
|
|
11
21
|
// Registry
|
|
12
22
|
export { getAllSkills, getSkill, isSkillVisibleTo, registerSkill, skillRegistry, } from "./registry.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "veryfront",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.894",
|
|
4
4
|
"description": "The simplest way to build AI-powered apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -81,6 +81,10 @@
|
|
|
81
81
|
"import": "./esm/src/eval/index.js",
|
|
82
82
|
"types": "./esm/src/eval/index.d.ts"
|
|
83
83
|
},
|
|
84
|
+
"./metrics": {
|
|
85
|
+
"import": "./esm/src/metrics/index.js",
|
|
86
|
+
"types": "./esm/src/metrics/index.d.ts"
|
|
87
|
+
},
|
|
84
88
|
"./eval/agent-service": {
|
|
85
89
|
"import": "./esm/src/eval/agent-service.js",
|
|
86
90
|
"types": "./esm/src/eval/agent-service.d.ts"
|
|
@@ -137,6 +141,10 @@
|
|
|
137
141
|
"import": "./esm/src/runs/index.js",
|
|
138
142
|
"types": "./esm/src/runs/index.d.ts"
|
|
139
143
|
},
|
|
144
|
+
"./skill": {
|
|
145
|
+
"import": "./esm/src/skill/index.js",
|
|
146
|
+
"types": "./esm/src/skill/index.d.ts"
|
|
147
|
+
},
|
|
140
148
|
"./mcp": {
|
|
141
149
|
"import": "./esm/src/mcp/index.js",
|
|
142
150
|
"types": "./esm/src/mcp/index.d.ts"
|