@roarkanalytics/sdk 6.2.0 → 7.0.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/CHANGELOG.md +16 -0
- package/client.d.mts +6 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -0
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/lib/config.d.mts +12 -0
- package/lib/config.d.mts.map +1 -1
- package/lib/config.d.ts +12 -0
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +11 -1
- package/lib/config.js.map +1 -1
- package/lib/config.mjs +9 -0
- package/lib/config.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/calendar-connection.d.mts +897 -0
- package/resources/calendar-connection.d.mts.map +1 -0
- package/resources/calendar-connection.d.ts +897 -0
- package/resources/calendar-connection.d.ts.map +1 -0
- package/resources/calendar-connection.js +143 -0
- package/resources/calendar-connection.js.map +1 -0
- package/resources/calendar-connection.mjs +139 -0
- package/resources/calendar-connection.mjs.map +1 -0
- package/resources/call.d.mts +2 -0
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +2 -0
- package/resources/call.d.ts.map +1 -1
- package/resources/config.d.mts +506 -26
- package/resources/config.d.mts.map +1 -1
- package/resources/config.d.ts +506 -26
- package/resources/config.d.ts.map +1 -1
- package/resources/http-request-definition.d.mts +4 -4
- package/resources/http-request-definition.d.mts.map +1 -1
- package/resources/http-request-definition.d.ts +4 -4
- package/resources/http-request-definition.d.ts.map +1 -1
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/metric-variant.d.mts +5 -0
- package/resources/metric-variant.d.mts.map +1 -1
- package/resources/metric-variant.d.ts +5 -0
- package/resources/metric-variant.d.ts.map +1 -1
- package/resources/metric.d.mts +90 -0
- package/resources/metric.d.mts.map +1 -1
- package/resources/metric.d.ts +90 -0
- package/resources/metric.d.ts.map +1 -1
- package/resources/tool.d.mts +671 -0
- package/resources/tool.d.mts.map +1 -0
- package/resources/tool.d.ts +671 -0
- package/resources/tool.d.ts.map +1 -0
- package/resources/tool.js +83 -0
- package/resources/tool.js.map +1 -0
- package/resources/tool.mjs +79 -0
- package/resources/tool.mjs.map +1 -0
- package/src/client.ts +58 -0
- package/src/lib/config.ts +22 -0
- package/src/resources/calendar-connection.ts +1103 -0
- package/src/resources/call.ts +4 -0
- package/src/resources/config.ts +937 -23
- package/src/resources/http-request-definition.ts +4 -4
- package/src/resources/index.ts +26 -0
- package/src/resources/metric-variant.ts +6 -0
- package/src/resources/metric.ts +108 -0
- package/src/resources/tool.ts +884 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Tool = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const path_1 = require("../internal/utils/path.js");
|
|
7
|
+
class Tool extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a tool and declares its first version. A tool only recorded from calls
|
|
10
|
+
* under the same name is adopted; one already declared returns 409. Give it a
|
|
11
|
+
* `runtime` for a hosted agent to call your endpoint. Header values are returned
|
|
12
|
+
* on read, so keep secrets out of them.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const tool = await client.tool.create({
|
|
17
|
+
* description: 'x',
|
|
18
|
+
* name: 'book_appointment',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
create(body, options) {
|
|
23
|
+
return this._client.post('/v1/tool', { body, ...options });
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Replaces the tool: its name, scope, inputs, description, grading hints and
|
|
27
|
+
* runtime. A field left out is cleared, so omitting agentId makes the tool
|
|
28
|
+
* project-wide. A change declares a new version; agent versions pinned to an older
|
|
29
|
+
* one keep it.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const tool = await client.tool.update(
|
|
34
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
35
|
+
* { description: 'x', name: 'book_appointment' },
|
|
36
|
+
* );
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
update(toolID, body, options) {
|
|
40
|
+
return this._client.put((0, path_1.path) `/v1/tool/${toolID}`, { body, ...options });
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The project's tools and the built-in ones, each with its latest version: inputs,
|
|
44
|
+
* description and, for a tool a hosted agent runs, its request. Attach one to an
|
|
45
|
+
* agent draft by id.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const tools = await client.tool.list();
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
list(query = {}, options) {
|
|
53
|
+
return this._client.get('/v1/tool', { query, ...options });
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Deletes a tool no agent version uses. A tool an agent version uses returns 409.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const tool = await client.tool.delete(
|
|
61
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
62
|
+
* );
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
delete(toolID, options) {
|
|
66
|
+
return this._client.delete((0, path_1.path) `/v1/tool/${toolID}`, options);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Get a tool
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const response = await client.tool.getByID(
|
|
74
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
75
|
+
* );
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
getByID(toolID, options) {
|
|
79
|
+
return this._client.get((0, path_1.path) `/v1/tool/${toolID}`, options);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.Tool = Tool;
|
|
83
|
+
//# sourceMappingURL=tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.js","sourceRoot":"","sources":["../src/resources/tool.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,MAAc,EAAE,IAAsB,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,YAAY,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,YAAY,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAc,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,YAAY,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;CACF;AAjFD,oBAiFC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { path } from "../internal/utils/path.mjs";
|
|
4
|
+
export class Tool extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Creates a tool and declares its first version. A tool only recorded from calls
|
|
7
|
+
* under the same name is adopted; one already declared returns 409. Give it a
|
|
8
|
+
* `runtime` for a hosted agent to call your endpoint. Header values are returned
|
|
9
|
+
* on read, so keep secrets out of them.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const tool = await client.tool.create({
|
|
14
|
+
* description: 'x',
|
|
15
|
+
* name: 'book_appointment',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
create(body, options) {
|
|
20
|
+
return this._client.post('/v1/tool', { body, ...options });
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Replaces the tool: its name, scope, inputs, description, grading hints and
|
|
24
|
+
* runtime. A field left out is cleared, so omitting agentId makes the tool
|
|
25
|
+
* project-wide. A change declares a new version; agent versions pinned to an older
|
|
26
|
+
* one keep it.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const tool = await client.tool.update(
|
|
31
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
32
|
+
* { description: 'x', name: 'book_appointment' },
|
|
33
|
+
* );
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
update(toolID, body, options) {
|
|
37
|
+
return this._client.put(path `/v1/tool/${toolID}`, { body, ...options });
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The project's tools and the built-in ones, each with its latest version: inputs,
|
|
41
|
+
* description and, for a tool a hosted agent runs, its request. Attach one to an
|
|
42
|
+
* agent draft by id.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const tools = await client.tool.list();
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
list(query = {}, options) {
|
|
50
|
+
return this._client.get('/v1/tool', { query, ...options });
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Deletes a tool no agent version uses. A tool an agent version uses returns 409.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const tool = await client.tool.delete(
|
|
58
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
59
|
+
* );
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
delete(toolID, options) {
|
|
63
|
+
return this._client.delete(path `/v1/tool/${toolID}`, options);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Get a tool
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* const response = await client.tool.getByID(
|
|
71
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
72
|
+
* );
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
getByID(toolID, options) {
|
|
76
|
+
return this._client.get(path `/v1/tool/${toolID}`, options);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=tool.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.mjs","sourceRoot":"","sources":["../src/resources/tool.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,MAAc,EAAE,IAAsB,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,YAAY,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAc,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -114,6 +114,21 @@ import {
|
|
|
114
114
|
BenchmarkListTargetScoreSamplesParams,
|
|
115
115
|
BenchmarkListTargetScoreSamplesResponse,
|
|
116
116
|
} from './resources/benchmark';
|
|
117
|
+
import {
|
|
118
|
+
CalendarConnection,
|
|
119
|
+
CalendarConnectionCheckResponse,
|
|
120
|
+
CalendarConnectionCreateParams,
|
|
121
|
+
CalendarConnectionCreateResponse,
|
|
122
|
+
CalendarConnectionDeleteResponse,
|
|
123
|
+
CalendarConnectionGetByIDResponse,
|
|
124
|
+
CalendarConnectionGetTargetParams,
|
|
125
|
+
CalendarConnectionGetTargetResponse,
|
|
126
|
+
CalendarConnectionListParams,
|
|
127
|
+
CalendarConnectionListResponse,
|
|
128
|
+
CalendarConnectionListTargetsResponse,
|
|
129
|
+
CalendarConnectionUpdateParams,
|
|
130
|
+
CalendarConnectionUpdateResponse,
|
|
131
|
+
} from './resources/calendar-connection';
|
|
117
132
|
import {
|
|
118
133
|
Call,
|
|
119
134
|
CallAppendToolInvocationsParams,
|
|
@@ -381,6 +396,17 @@ import {
|
|
|
381
396
|
SimulationToolFixtureUpdateParams,
|
|
382
397
|
SimulationToolFixtureUpdateResponse,
|
|
383
398
|
} from './resources/simulation-tool-fixture';
|
|
399
|
+
import {
|
|
400
|
+
Tool,
|
|
401
|
+
ToolCreateParams,
|
|
402
|
+
ToolCreateResponse,
|
|
403
|
+
ToolDeleteResponse,
|
|
404
|
+
ToolGetByIDResponse,
|
|
405
|
+
ToolListParams,
|
|
406
|
+
ToolListResponse,
|
|
407
|
+
ToolUpdateParams,
|
|
408
|
+
ToolUpdateResponse,
|
|
409
|
+
} from './resources/tool';
|
|
384
410
|
import { Usage, UsageGetParams, UsageGetResponse } from './resources/usage';
|
|
385
411
|
import {
|
|
386
412
|
Webhook,
|
|
@@ -1170,7 +1196,9 @@ export class Roark {
|
|
|
1170
1196
|
agentPrompt: API.AgentPrompt = new API.AgentPrompt(this);
|
|
1171
1197
|
agentVersion: API.AgentVersion = new API.AgentVersion(this);
|
|
1172
1198
|
agentDraft: API.AgentDraft = new API.AgentDraft(this);
|
|
1199
|
+
tool: API.Tool = new API.Tool(this);
|
|
1173
1200
|
httpRequestDefinition: API.HTTPRequestDefinition = new API.HTTPRequestDefinition(this);
|
|
1201
|
+
calendarConnection: API.CalendarConnection = new API.CalendarConnection(this);
|
|
1174
1202
|
webhook: API.Webhook = new API.Webhook(this);
|
|
1175
1203
|
benchmark: API.Benchmark = new API.Benchmark(this);
|
|
1176
1204
|
config: API.Config = new API.Config(this);
|
|
@@ -1209,7 +1237,9 @@ Roark.PhoneNumber = PhoneNumber;
|
|
|
1209
1237
|
Roark.AgentPrompt = AgentPrompt;
|
|
1210
1238
|
Roark.AgentVersion = AgentVersion;
|
|
1211
1239
|
Roark.AgentDraft = AgentDraft;
|
|
1240
|
+
Roark.Tool = Tool;
|
|
1212
1241
|
Roark.HTTPRequestDefinition = HTTPRequestDefinition;
|
|
1242
|
+
Roark.CalendarConnection = CalendarConnection;
|
|
1213
1243
|
Roark.Webhook = Webhook;
|
|
1214
1244
|
Roark.Benchmark = Benchmark;
|
|
1215
1245
|
Roark.Config = Config;
|
|
@@ -1585,6 +1615,18 @@ export declare namespace Roark {
|
|
|
1585
1615
|
type AgentDraftPublishParams as AgentDraftPublishParams,
|
|
1586
1616
|
};
|
|
1587
1617
|
|
|
1618
|
+
export {
|
|
1619
|
+
Tool as Tool,
|
|
1620
|
+
type ToolCreateResponse as ToolCreateResponse,
|
|
1621
|
+
type ToolUpdateResponse as ToolUpdateResponse,
|
|
1622
|
+
type ToolListResponse as ToolListResponse,
|
|
1623
|
+
type ToolDeleteResponse as ToolDeleteResponse,
|
|
1624
|
+
type ToolGetByIDResponse as ToolGetByIDResponse,
|
|
1625
|
+
type ToolCreateParams as ToolCreateParams,
|
|
1626
|
+
type ToolUpdateParams as ToolUpdateParams,
|
|
1627
|
+
type ToolListParams as ToolListParams,
|
|
1628
|
+
};
|
|
1629
|
+
|
|
1588
1630
|
export {
|
|
1589
1631
|
HTTPRequestDefinition as HTTPRequestDefinition,
|
|
1590
1632
|
type HTTPRequestDefinitionCreateResponse as HTTPRequestDefinitionCreateResponse,
|
|
@@ -1596,6 +1638,22 @@ export declare namespace Roark {
|
|
|
1596
1638
|
type HTTPRequestDefinitionListParams as HTTPRequestDefinitionListParams,
|
|
1597
1639
|
};
|
|
1598
1640
|
|
|
1641
|
+
export {
|
|
1642
|
+
CalendarConnection as CalendarConnection,
|
|
1643
|
+
type CalendarConnectionCreateResponse as CalendarConnectionCreateResponse,
|
|
1644
|
+
type CalendarConnectionUpdateResponse as CalendarConnectionUpdateResponse,
|
|
1645
|
+
type CalendarConnectionListResponse as CalendarConnectionListResponse,
|
|
1646
|
+
type CalendarConnectionDeleteResponse as CalendarConnectionDeleteResponse,
|
|
1647
|
+
type CalendarConnectionCheckResponse as CalendarConnectionCheckResponse,
|
|
1648
|
+
type CalendarConnectionGetByIDResponse as CalendarConnectionGetByIDResponse,
|
|
1649
|
+
type CalendarConnectionGetTargetResponse as CalendarConnectionGetTargetResponse,
|
|
1650
|
+
type CalendarConnectionListTargetsResponse as CalendarConnectionListTargetsResponse,
|
|
1651
|
+
type CalendarConnectionCreateParams as CalendarConnectionCreateParams,
|
|
1652
|
+
type CalendarConnectionUpdateParams as CalendarConnectionUpdateParams,
|
|
1653
|
+
type CalendarConnectionListParams as CalendarConnectionListParams,
|
|
1654
|
+
type CalendarConnectionGetTargetParams as CalendarConnectionGetTargetParams,
|
|
1655
|
+
};
|
|
1656
|
+
|
|
1599
1657
|
export {
|
|
1600
1658
|
Webhook as Webhook,
|
|
1601
1659
|
type WebhookCreateResponse as WebhookCreateResponse,
|
package/src/lib/config.ts
CHANGED
|
@@ -39,6 +39,7 @@ export type SimulationGroupConfig = ConfigApplyParams.SimulationGroupConfig;
|
|
|
39
39
|
export type AlertConfig = ConfigApplyParams.AlertConfig;
|
|
40
40
|
export type ToolConfig = ConfigApplyParams.ToolConfig;
|
|
41
41
|
export type DashboardConfig = ConfigApplyParams.DashboardConfig;
|
|
42
|
+
export type LiveReportConfig = ConfigApplyParams.LiveReportConfig;
|
|
42
43
|
export type ProjectConfig = ConfigApplyParams.ProjectConfig;
|
|
43
44
|
|
|
44
45
|
/** Any resource a config bundle can carry. */
|
|
@@ -134,6 +135,27 @@ export const defineTool = (tool: DefineToolInput): ToolConfig => {
|
|
|
134
135
|
return { kind: 'tool', ...rest, ...(agent === undefined ? {} : { agent: refName(agent) }) };
|
|
135
136
|
};
|
|
136
137
|
|
|
138
|
+
/**
|
|
139
|
+
* Input to `defineLiveReport`: `agent` and `dashboard` accept the construct a `define*` helper
|
|
140
|
+
* returned or a bare name string, the same as `defineTool`'s `agent`.
|
|
141
|
+
*/
|
|
142
|
+
export type DefineLiveReportInput = Omit<LiveReportConfig, 'kind' | 'agent' | 'dashboard'> & {
|
|
143
|
+
/** Scope the report to one agent's calls (omit to report on the whole project). */
|
|
144
|
+
agent?: Ref<AgentConfig>;
|
|
145
|
+
/** Embed this dashboard's charts, read over the report's calls. */
|
|
146
|
+
dashboard?: Ref<DashboardConfig>;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export const defineLiveReport = (report: DefineLiveReportInput): LiveReportConfig => {
|
|
150
|
+
const { agent, dashboard, ...rest } = report;
|
|
151
|
+
return {
|
|
152
|
+
kind: 'liveReport',
|
|
153
|
+
...rest,
|
|
154
|
+
...(agent === undefined ? {} : { agent: refName(agent) }),
|
|
155
|
+
...(dashboard === undefined ? {} : { dashboard: refName(dashboard) }),
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
|
|
137
159
|
// ── The bundle ──
|
|
138
160
|
// `defineConfig` assembles the bundle you hand to `client.config.apply(bundle)`
|
|
139
161
|
// or `client.config.diff(bundle)`. `resources` accepts both construct outputs
|