@coalex-ai/sdk 2.0.0-beta.664 → 2.1.0-beta.665
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/inventory.d.ts +9 -0
- package/dist/inventory.d.ts.map +1 -1
- package/dist/inventory.js +10 -1
- package/dist/inventory.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/inventory.d.ts
CHANGED
|
@@ -12,6 +12,15 @@ export interface AgentInventory {
|
|
|
12
12
|
* traces are already attributed to — so the declared agent and the observed one are one row.
|
|
13
13
|
*/
|
|
14
14
|
name?: string;
|
|
15
|
+
/** The agent's title, shown on a new chat in the Console. */
|
|
16
|
+
displayName?: string;
|
|
17
|
+
/** How the agent introduces itself on a new chat, shown as its first message. */
|
|
18
|
+
description?: string;
|
|
19
|
+
/**
|
|
20
|
+
* What an operator can ask it, shown as buttons that send that text. The Console serves every
|
|
21
|
+
* customer's agents, so it shows these as given and invents nothing when they are absent.
|
|
22
|
+
*/
|
|
23
|
+
suggestedPrompts?: string[];
|
|
15
24
|
}
|
|
16
25
|
interface DeclareArgs {
|
|
17
26
|
config: CoalexConfig;
|
package/dist/inventory.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inventory.d.ts","sourceRoot":"","sources":["../src/inventory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inventory.d.ts","sourceRoot":"","sources":["../src/inventory.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAQhD,0FAA0F;AAC1F,MAAM,WAAW,cAAc;IAC7B,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;IACjB,2FAA2F;IAC3F,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,UAAU,WAAW;IACnB,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,cAAc,EACzB,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,WAAW,GAC3C,OAAO,CAAC,OAAO,CAAC,CAoClB"}
|
package/dist/inventory.js
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
// PUT it. That drifts the moment an agent moves or a new one is deployed. Here the agent declares
|
|
5
5
|
// itself at startup instead.
|
|
6
6
|
//
|
|
7
|
-
// What it may declare is deliberately narrow: **where it lives
|
|
7
|
+
// What it may declare is deliberately narrow: **where it lives, what tools it has, and how it
|
|
8
|
+
// introduces itself**. It cannot
|
|
8
9
|
// declare whether those tools are governed or who may approve them — that is the org's decision,
|
|
9
10
|
// made in the dashboard, because an agent that governs itself is not governed at all. The
|
|
10
11
|
// transformer enforces the same boundary and answers 422 to a policy field rather than dropping it.
|
|
@@ -30,6 +31,14 @@ export async function declareInventory(inventory, { config, apiKey, defaultName
|
|
|
30
31
|
if (inventory.resumeUrl) {
|
|
31
32
|
body.resume_hook = { kind: "checkpoint", url: inventory.resumeUrl };
|
|
32
33
|
}
|
|
34
|
+
// Only what was declared: a control plane that predates these fields answers 422 to an unknown
|
|
35
|
+
// key, and that would refuse the whole declaration, endpoint and tools included.
|
|
36
|
+
if (inventory.displayName !== undefined)
|
|
37
|
+
body.display_name = inventory.displayName;
|
|
38
|
+
if (inventory.description !== undefined)
|
|
39
|
+
body.description = inventory.description;
|
|
40
|
+
if (inventory.suggestedPrompts !== undefined)
|
|
41
|
+
body.suggested_prompts = [...inventory.suggestedPrompts];
|
|
33
42
|
try {
|
|
34
43
|
const res = await fetch(`${config.endpoint}/api/v1/agent-inventory`, {
|
|
35
44
|
method: "POST",
|
package/dist/inventory.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inventory.js","sourceRoot":"","sources":["../src/inventory.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,EAAE;AACF,gGAAgG;AAChG,kGAAkG;AAClG,6BAA6B;AAC7B,EAAE;AACF,
|
|
1
|
+
{"version":3,"file":"inventory.js","sourceRoot":"","sources":["../src/inventory.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,EAAE;AACF,gGAAgG;AAChG,kGAAkG;AAClG,6BAA6B;AAC7B,EAAE;AACF,8FAA8F;AAC9F,iCAAiC;AACjC,iGAAiG;AACjG,0FAA0F;AAC1F,oGAAoG;AAGpG,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,4FAA4F;AAC5F,MAAM,UAAU,GAAG,IAAI,CAAC;AAgCxB;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,SAAyB,EACzB,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAe;IAE5C,MAAM,IAAI,GAA4B;QACpC,IAAI,EAAE,SAAS,CAAC,IAAI,IAAI,WAAW;QACnC,QAAQ,EAAE,SAAS,CAAC,QAAQ;QAC5B,KAAK,EAAE,SAAS,CAAC,KAAK,IAAI,EAAE;QAC5B,GAAG,EAAE,qBAAqB,OAAO,EAAE;KACpC,CAAC;IACF,IAAI,SAAS,CAAC,SAAS,EAAE,CAAC;QACxB,IAAI,CAAC,WAAW,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,EAA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IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.1.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SDK version, sent in the X-SDK-Version header so the platform can see which
|
|
2
2
|
// SDK releases customers run before removing a deprecated field (COA-261).
|
|
3
3
|
// Keep in sync with package.json "version".
|
|
4
|
-
export const VERSION = "2.
|
|
4
|
+
export const VERSION = "2.1.0";
|
|
5
5
|
//# sourceMappingURL=version.js.map
|