@roarkanalytics/sdk 3.11.0 → 3.13.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.
Files changed (110) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/client.d.mts +12 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +12 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agent-prompt.d.mts +129 -0
  12. package/resources/agent-prompt.d.mts.map +1 -0
  13. package/resources/agent-prompt.d.ts +129 -0
  14. package/resources/agent-prompt.d.ts.map +1 -0
  15. package/resources/agent-prompt.js +58 -0
  16. package/resources/agent-prompt.js.map +1 -0
  17. package/resources/agent-prompt.mjs +54 -0
  18. package/resources/agent-prompt.mjs.map +1 -0
  19. package/resources/benchmark.d.mts +547 -0
  20. package/resources/benchmark.d.mts.map +1 -0
  21. package/resources/benchmark.d.ts +547 -0
  22. package/resources/benchmark.d.ts.map +1 -0
  23. package/resources/benchmark.js +110 -0
  24. package/resources/benchmark.js.map +1 -0
  25. package/resources/benchmark.mjs +106 -0
  26. package/resources/benchmark.mjs.map +1 -0
  27. package/resources/call.d.mts +1 -1
  28. package/resources/call.d.mts.map +1 -1
  29. package/resources/call.d.ts +1 -1
  30. package/resources/call.d.ts.map +1 -1
  31. package/resources/config.d.mts +169 -21
  32. package/resources/config.d.mts.map +1 -1
  33. package/resources/config.d.ts +169 -21
  34. package/resources/config.d.ts.map +1 -1
  35. package/resources/customer-flow-edge-case.d.mts +99 -27
  36. package/resources/customer-flow-edge-case.d.mts.map +1 -1
  37. package/resources/customer-flow-edge-case.d.ts +99 -27
  38. package/resources/customer-flow-edge-case.d.ts.map +1 -1
  39. package/resources/customer-flow.d.mts +2110 -138
  40. package/resources/customer-flow.d.mts.map +1 -1
  41. package/resources/customer-flow.d.ts +2110 -138
  42. package/resources/customer-flow.d.ts.map +1 -1
  43. package/resources/customer-flow.js +18 -0
  44. package/resources/customer-flow.js.map +1 -1
  45. package/resources/customer-flow.mjs +18 -0
  46. package/resources/customer-flow.mjs.map +1 -1
  47. package/resources/index.d.mts +5 -3
  48. package/resources/index.d.mts.map +1 -1
  49. package/resources/index.d.ts +5 -3
  50. package/resources/index.d.ts.map +1 -1
  51. package/resources/index.js +5 -1
  52. package/resources/index.js.map +1 -1
  53. package/resources/index.mjs +2 -0
  54. package/resources/index.mjs.map +1 -1
  55. package/resources/simulation-environment.d.mts +163 -1
  56. package/resources/simulation-environment.d.mts.map +1 -1
  57. package/resources/simulation-environment.d.ts +163 -1
  58. package/resources/simulation-environment.d.ts.map +1 -1
  59. package/resources/simulation-environment.js +51 -0
  60. package/resources/simulation-environment.js.map +1 -1
  61. package/resources/simulation-environment.mjs +51 -0
  62. package/resources/simulation-environment.mjs.map +1 -1
  63. package/resources/simulation-job.d.mts +68 -6
  64. package/resources/simulation-job.d.mts.map +1 -1
  65. package/resources/simulation-job.d.ts +68 -6
  66. package/resources/simulation-job.d.ts.map +1 -1
  67. package/resources/simulation-persona.d.mts +60 -18
  68. package/resources/simulation-persona.d.mts.map +1 -1
  69. package/resources/simulation-persona.d.ts +60 -18
  70. package/resources/simulation-persona.d.ts.map +1 -1
  71. package/resources/simulation-run-plan-job.d.mts +172 -4
  72. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  73. package/resources/simulation-run-plan-job.d.ts +172 -4
  74. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  75. package/resources/simulation-run-plan-job.js +16 -0
  76. package/resources/simulation-run-plan-job.js.map +1 -1
  77. package/resources/simulation-run-plan-job.mjs +16 -0
  78. package/resources/simulation-run-plan-job.mjs.map +1 -1
  79. package/resources/simulation-run-plan.d.mts +102 -0
  80. package/resources/simulation-run-plan.d.mts.map +1 -1
  81. package/resources/simulation-run-plan.d.ts +102 -0
  82. package/resources/simulation-run-plan.d.ts.map +1 -1
  83. package/resources/simulation-template.d.mts +10 -0
  84. package/resources/simulation-template.d.mts.map +1 -1
  85. package/resources/simulation-template.d.ts +10 -0
  86. package/resources/simulation-template.d.ts.map +1 -1
  87. package/resources/simulation.d.mts +26 -1
  88. package/resources/simulation.d.mts.map +1 -1
  89. package/resources/simulation.d.ts +26 -1
  90. package/resources/simulation.d.ts.map +1 -1
  91. package/src/client.ts +66 -0
  92. package/src/resources/agent-prompt.ts +183 -0
  93. package/src/resources/benchmark.ts +740 -0
  94. package/src/resources/call.ts +1 -1
  95. package/src/resources/config.ts +313 -23
  96. package/src/resources/customer-flow-edge-case.ts +207 -27
  97. package/src/resources/customer-flow.ts +3198 -123
  98. package/src/resources/index.ts +30 -0
  99. package/src/resources/simulation-environment.ts +244 -0
  100. package/src/resources/simulation-job.ts +98 -6
  101. package/src/resources/simulation-persona.ts +126 -18
  102. package/src/resources/simulation-run-plan-job.ts +240 -3
  103. package/src/resources/simulation-run-plan.ts +118 -0
  104. package/src/resources/simulation-template.ts +11 -0
  105. package/src/resources/simulation.ts +28 -1
  106. package/src/version.ts +1 -1
  107. package/version.d.mts +1 -1
  108. package/version.d.ts +1 -1
  109. package/version.js +1 -1
  110. package/version.mjs +1 -1
@@ -0,0 +1,129 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { RequestOptions } from "../internal/request-options.mjs";
4
+ export declare class AgentPrompt extends APIResource {
5
+ /**
6
+ * Sets the agent's API-managed prompt. This is its own version history
7
+ * (`source: API_MANAGED`), separate from prompts observed on calls, edited in the
8
+ * app, or managed by config-as-code. Setting the same content twice is a no-op (no
9
+ * new version). Roark does not run your agent and no metric reads this prompt: it
10
+ * is stored and versioned for your reference.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const agentPrompt = await client.agentPrompt.update(
15
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
16
+ * { prompt: 'x' },
17
+ * );
18
+ * ```
19
+ */
20
+ update(agentID: string, body: AgentPromptUpdateParams, options?: RequestOptions): APIPromise<AgentPromptUpdateResponse>;
21
+ /**
22
+ * Returns the agent's prompt lineages. Each lineage is an independent version
23
+ * history, labelled by its `source` (USER, API, CONFIG, or a provider
24
+ * integration). `prompt` is the current content.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const agentPrompts = await client.agentPrompt.list(
29
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
30
+ * );
31
+ * ```
32
+ */
33
+ list(agentID: string, options?: RequestOptions): APIPromise<AgentPromptListResponse>;
34
+ /**
35
+ * Returns the full version history of a single prompt lineage, newest first.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const response = await client.agentPrompt.listVersions(
40
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
41
+ * { agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
42
+ * );
43
+ * ```
44
+ */
45
+ listVersions(promptID: string, params: AgentPromptListVersionsParams, options?: RequestOptions): APIPromise<AgentPromptListVersionsResponse>;
46
+ }
47
+ export interface AgentPromptUpdateResponse {
48
+ data: AgentPromptUpdateResponse.Data;
49
+ }
50
+ export declare namespace AgentPromptUpdateResponse {
51
+ interface Data {
52
+ /**
53
+ * True if a new version was appended; false if the content matched the current
54
+ * version (no-op).
55
+ */
56
+ changed: boolean;
57
+ /**
58
+ * The ID of the API-managed prompt lineage.
59
+ */
60
+ promptId: string;
61
+ /**
62
+ * The current version number after the set.
63
+ */
64
+ versionNumber: number;
65
+ }
66
+ }
67
+ export interface AgentPromptListResponse {
68
+ data: Array<AgentPromptListResponse.Data>;
69
+ }
70
+ export declare namespace AgentPromptListResponse {
71
+ /**
72
+ * A prompt lineage on an agent.
73
+ */
74
+ interface Data {
75
+ /**
76
+ * Prompt lineage ID (its own version history).
77
+ */
78
+ id: string;
79
+ /**
80
+ * When this prompt lineage was first created (ISO 8601).
81
+ */
82
+ createdAt: string;
83
+ /**
84
+ * Current prompt content (the latest version).
85
+ */
86
+ prompt: string;
87
+ /**
88
+ * Where this prompt came from: USER (edited in the app), API (provided via the API
89
+ * or on calls), CONFIG (managed by config-as-code), or a provider integration.
90
+ */
91
+ source: 'USER' | 'RETELL_INTEGRATION' | 'VAPI_INTEGRATION' | 'ELEVEN_LABS_INTEGRATION' | 'BLAND_INTEGRATION' | 'PIPECAT_CLOUD_INTEGRATION' | 'PIPECAT_SELF_HOSTED_INTEGRATION' | 'LIVEKIT_SELF_HOSTED_INTEGRATION' | 'API' | 'CONFIG' | 'API_MANAGED';
92
+ /**
93
+ * When the current version was recorded (ISO 8601).
94
+ */
95
+ updatedAt: string;
96
+ }
97
+ }
98
+ export interface AgentPromptListVersionsResponse {
99
+ data: Array<AgentPromptListVersionsResponse.Data>;
100
+ }
101
+ export declare namespace AgentPromptListVersionsResponse {
102
+ interface Data {
103
+ /**
104
+ * When this version was recorded (ISO 8601).
105
+ */
106
+ createdAt: string;
107
+ /**
108
+ * Prompt content at this version.
109
+ */
110
+ prompt: string;
111
+ /**
112
+ * Version number: 1-based and increasing.
113
+ */
114
+ versionNumber: number;
115
+ }
116
+ }
117
+ export interface AgentPromptUpdateParams {
118
+ /**
119
+ * The prompt content to set.
120
+ */
121
+ prompt: string;
122
+ }
123
+ export interface AgentPromptListVersionsParams {
124
+ agentId: string;
125
+ }
126
+ export declare namespace AgentPrompt {
127
+ export { type AgentPromptUpdateResponse as AgentPromptUpdateResponse, type AgentPromptListResponse as AgentPromptListResponse, type AgentPromptListVersionsResponse as AgentPromptListVersionsResponse, type AgentPromptUpdateParams as AgentPromptUpdateParams, type AgentPromptListVersionsParams as AgentPromptListVersionsParams, };
128
+ }
129
+ //# sourceMappingURL=agent-prompt.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-prompt.d.mts","sourceRoot":"","sources":["../src/resources/agent-prompt.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU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Aa,CAAC;QAElB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;KACnB;CACF;AAED,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,KAAK,CAAC,+BAA+B,CAAC,IAAI,CAAC,CAAC;CACnD;AAED,yBAAiB,+BAA+B,CAAC;IAC/C,UAAiB,IAAI;QACnB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,aAAa,EAAE,MAAM,CAAC;KACvB;CACF;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;CACH"}
@@ -0,0 +1,129 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { APIPromise } from "../core/api-promise.js";
3
+ import { RequestOptions } from "../internal/request-options.js";
4
+ export declare class AgentPrompt extends APIResource {
5
+ /**
6
+ * Sets the agent's API-managed prompt. This is its own version history
7
+ * (`source: API_MANAGED`), separate from prompts observed on calls, edited in the
8
+ * app, or managed by config-as-code. Setting the same content twice is a no-op (no
9
+ * new version). Roark does not run your agent and no metric reads this prompt: it
10
+ * is stored and versioned for your reference.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const agentPrompt = await client.agentPrompt.update(
15
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
16
+ * { prompt: 'x' },
17
+ * );
18
+ * ```
19
+ */
20
+ update(agentID: string, body: AgentPromptUpdateParams, options?: RequestOptions): APIPromise<AgentPromptUpdateResponse>;
21
+ /**
22
+ * Returns the agent's prompt lineages. Each lineage is an independent version
23
+ * history, labelled by its `source` (USER, API, CONFIG, or a provider
24
+ * integration). `prompt` is the current content.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const agentPrompts = await client.agentPrompt.list(
29
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
30
+ * );
31
+ * ```
32
+ */
33
+ list(agentID: string, options?: RequestOptions): APIPromise<AgentPromptListResponse>;
34
+ /**
35
+ * Returns the full version history of a single prompt lineage, newest first.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const response = await client.agentPrompt.listVersions(
40
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
41
+ * { agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
42
+ * );
43
+ * ```
44
+ */
45
+ listVersions(promptID: string, params: AgentPromptListVersionsParams, options?: RequestOptions): APIPromise<AgentPromptListVersionsResponse>;
46
+ }
47
+ export interface AgentPromptUpdateResponse {
48
+ data: AgentPromptUpdateResponse.Data;
49
+ }
50
+ export declare namespace AgentPromptUpdateResponse {
51
+ interface Data {
52
+ /**
53
+ * True if a new version was appended; false if the content matched the current
54
+ * version (no-op).
55
+ */
56
+ changed: boolean;
57
+ /**
58
+ * The ID of the API-managed prompt lineage.
59
+ */
60
+ promptId: string;
61
+ /**
62
+ * The current version number after the set.
63
+ */
64
+ versionNumber: number;
65
+ }
66
+ }
67
+ export interface AgentPromptListResponse {
68
+ data: Array<AgentPromptListResponse.Data>;
69
+ }
70
+ export declare namespace AgentPromptListResponse {
71
+ /**
72
+ * A prompt lineage on an agent.
73
+ */
74
+ interface Data {
75
+ /**
76
+ * Prompt lineage ID (its own version history).
77
+ */
78
+ id: string;
79
+ /**
80
+ * When this prompt lineage was first created (ISO 8601).
81
+ */
82
+ createdAt: string;
83
+ /**
84
+ * Current prompt content (the latest version).
85
+ */
86
+ prompt: string;
87
+ /**
88
+ * Where this prompt came from: USER (edited in the app), API (provided via the API
89
+ * or on calls), CONFIG (managed by config-as-code), or a provider integration.
90
+ */
91
+ source: 'USER' | 'RETELL_INTEGRATION' | 'VAPI_INTEGRATION' | 'ELEVEN_LABS_INTEGRATION' | 'BLAND_INTEGRATION' | 'PIPECAT_CLOUD_INTEGRATION' | 'PIPECAT_SELF_HOSTED_INTEGRATION' | 'LIVEKIT_SELF_HOSTED_INTEGRATION' | 'API' | 'CONFIG' | 'API_MANAGED';
92
+ /**
93
+ * When the current version was recorded (ISO 8601).
94
+ */
95
+ updatedAt: string;
96
+ }
97
+ }
98
+ export interface AgentPromptListVersionsResponse {
99
+ data: Array<AgentPromptListVersionsResponse.Data>;
100
+ }
101
+ export declare namespace AgentPromptListVersionsResponse {
102
+ interface Data {
103
+ /**
104
+ * When this version was recorded (ISO 8601).
105
+ */
106
+ createdAt: string;
107
+ /**
108
+ * Prompt content at this version.
109
+ */
110
+ prompt: string;
111
+ /**
112
+ * Version number: 1-based and increasing.
113
+ */
114
+ versionNumber: number;
115
+ }
116
+ }
117
+ export interface AgentPromptUpdateParams {
118
+ /**
119
+ * The prompt content to set.
120
+ */
121
+ prompt: string;
122
+ }
123
+ export interface AgentPromptListVersionsParams {
124
+ agentId: string;
125
+ }
126
+ export declare namespace AgentPrompt {
127
+ export { type AgentPromptUpdateResponse as AgentPromptUpdateResponse, type AgentPromptListResponse as AgentPromptListResponse, type AgentPromptListVersionsResponse as AgentPromptListVersionsResponse, type AgentPromptUpdateParams as AgentPromptUpdateParams, type AgentPromptListVersionsParams as AgentPromptListVersionsParams, };
128
+ }
129
+ //# sourceMappingURL=agent-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-prompt.d.ts","sourceRoot":"","sources":["../src/resources/agent-prompt.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,E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AAM,CAAC;KACnB;CACF;AAED,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,KAAK,CAAC,+BAA+B,CAAC,IAAI,CAAC,CAAC;CACnD;AAED,yBAAiB,+BAA+B,CAAC;IAC/C,UAAiB,IAAI;QACnB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,aAAa,EAAE,MAAM,CAAC;KACvB;CACF;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;CACH"}
@@ -0,0 +1,58 @@
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.AgentPrompt = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ const path_1 = require("../internal/utils/path.js");
7
+ class AgentPrompt extends resource_1.APIResource {
8
+ /**
9
+ * Sets the agent's API-managed prompt. This is its own version history
10
+ * (`source: API_MANAGED`), separate from prompts observed on calls, edited in the
11
+ * app, or managed by config-as-code. Setting the same content twice is a no-op (no
12
+ * new version). Roark does not run your agent and no metric reads this prompt: it
13
+ * is stored and versioned for your reference.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const agentPrompt = await client.agentPrompt.update(
18
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
19
+ * { prompt: 'x' },
20
+ * );
21
+ * ```
22
+ */
23
+ update(agentID, body, options) {
24
+ return this._client.put((0, path_1.path) `/v1/agent/${agentID}/prompts`, { body, ...options });
25
+ }
26
+ /**
27
+ * Returns the agent's prompt lineages. Each lineage is an independent version
28
+ * history, labelled by its `source` (USER, API, CONFIG, or a provider
29
+ * integration). `prompt` is the current content.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const agentPrompts = await client.agentPrompt.list(
34
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
35
+ * );
36
+ * ```
37
+ */
38
+ list(agentID, options) {
39
+ return this._client.get((0, path_1.path) `/v1/agent/${agentID}/prompts`, options);
40
+ }
41
+ /**
42
+ * Returns the full version history of a single prompt lineage, newest first.
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * const response = await client.agentPrompt.listVersions(
47
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
48
+ * { agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
49
+ * );
50
+ * ```
51
+ */
52
+ listVersions(promptID, params, options) {
53
+ const { agentId } = params;
54
+ return this._client.get((0, path_1.path) `/v1/agent/${agentId}/prompts/${promptID}/versions`, options);
55
+ }
56
+ }
57
+ exports.AgentPrompt = AgentPrompt;
58
+ //# sourceMappingURL=agent-prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-prompt.js","sourceRoot":"","sources":["../src/resources/agent-prompt.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,OAAe,EACf,IAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,OAAO,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,OAAe,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,OAAO,UAAU,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;IAED;;;;;;;;;;OAUG;IACH,YAAY,CACV,QAAgB,EAChB,MAAqC,EACrC,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,OAAO,YAAY,QAAQ,WAAW,EAAE,OAAO,CAAC,CAAC;IAC5F,CAAC;CACF;AA3DD,kCA2DC"}
@@ -0,0 +1,54 @@
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 AgentPrompt extends APIResource {
5
+ /**
6
+ * Sets the agent's API-managed prompt. This is its own version history
7
+ * (`source: API_MANAGED`), separate from prompts observed on calls, edited in the
8
+ * app, or managed by config-as-code. Setting the same content twice is a no-op (no
9
+ * new version). Roark does not run your agent and no metric reads this prompt: it
10
+ * is stored and versioned for your reference.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const agentPrompt = await client.agentPrompt.update(
15
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
16
+ * { prompt: 'x' },
17
+ * );
18
+ * ```
19
+ */
20
+ update(agentID, body, options) {
21
+ return this._client.put(path `/v1/agent/${agentID}/prompts`, { body, ...options });
22
+ }
23
+ /**
24
+ * Returns the agent's prompt lineages. Each lineage is an independent version
25
+ * history, labelled by its `source` (USER, API, CONFIG, or a provider
26
+ * integration). `prompt` is the current content.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const agentPrompts = await client.agentPrompt.list(
31
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
32
+ * );
33
+ * ```
34
+ */
35
+ list(agentID, options) {
36
+ return this._client.get(path `/v1/agent/${agentID}/prompts`, options);
37
+ }
38
+ /**
39
+ * Returns the full version history of a single prompt lineage, newest first.
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * const response = await client.agentPrompt.listVersions(
44
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
45
+ * { agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
46
+ * );
47
+ * ```
48
+ */
49
+ listVersions(promptID, params, options) {
50
+ const { agentId } = params;
51
+ return this._client.get(path `/v1/agent/${agentId}/prompts/${promptID}/versions`, options);
52
+ }
53
+ }
54
+ //# sourceMappingURL=agent-prompt.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-prompt.mjs","sourceRoot":"","sources":["../src/resources/agent-prompt.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,OAAe,EACf,IAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,OAAO,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,OAAe,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,OAAO,UAAU,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;IAED;;;;;;;;;;OAUG;IACH,YAAY,CACV,QAAgB,EAChB,MAAqC,EACrC,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,OAAO,YAAY,QAAQ,WAAW,EAAE,OAAO,CAAC,CAAC;IAC5F,CAAC;CACF"}