@elevasis/sdk 1.36.0 → 1.36.1
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/cli.cjs +40 -10
- package/dist/index.js +1 -0
- package/package.json +4 -4
package/dist/cli.cjs
CHANGED
|
@@ -44925,6 +44925,7 @@ function serializeOrganization(resources) {
|
|
|
44925
44925
|
status: agent.config.status,
|
|
44926
44926
|
links: agent.config.links,
|
|
44927
44927
|
category: agent.config.category,
|
|
44928
|
+
sessionCapable: agent.config.sessionCapable ?? false,
|
|
44928
44929
|
...getGovernanceMetadata(resourceId, agent.config.resource)
|
|
44929
44930
|
});
|
|
44930
44931
|
commandViewAgents.push({
|
|
@@ -45807,7 +45808,7 @@ function wrapAction(commandName, fn) {
|
|
|
45807
45808
|
// package.json
|
|
45808
45809
|
var package_default = {
|
|
45809
45810
|
name: "@elevasis/sdk",
|
|
45810
|
-
version: "1.36.
|
|
45811
|
+
version: "1.36.1",
|
|
45811
45812
|
description: "SDK for building Elevasis organization resources",
|
|
45812
45813
|
type: "module",
|
|
45813
45814
|
bin: {
|
|
@@ -51943,15 +51944,23 @@ function registerAgentGet(program3) {
|
|
|
51943
51944
|
printJson6(definition);
|
|
51944
51945
|
return;
|
|
51945
51946
|
}
|
|
51946
|
-
|
|
51947
|
-
|
|
51948
|
-
|
|
51949
|
-
|
|
51950
|
-
|
|
51947
|
+
const config3 = definition.config ?? {};
|
|
51948
|
+
const name = config3.name ?? definition.name ?? config3.resourceId ?? definition.resourceId ?? id;
|
|
51949
|
+
const resourceId = config3.resourceId ?? definition.resourceId ?? id;
|
|
51950
|
+
const type = config3.type ?? definition.type ?? "agent";
|
|
51951
|
+
const description = config3.description ?? definition.description;
|
|
51952
|
+
const kind = config3.kind ?? definition.agentKind;
|
|
51953
|
+
const sessionCapable = config3.sessionCapable ?? definition.sessionCapable;
|
|
51954
|
+
const status = config3.status ?? definition.status;
|
|
51955
|
+
console.log(source_default.magenta(`Agent: ${name}`));
|
|
51956
|
+
console.log(source_default.gray(` ID: ${resourceId}`));
|
|
51957
|
+
console.log(source_default.gray(` Type: ${type}`));
|
|
51958
|
+
if (description) console.log(source_default.gray(` Description: ${description}`));
|
|
51959
|
+
if (kind) console.log(source_default.gray(` Kind: ${kind}`));
|
|
51951
51960
|
if (definition.systemPath) console.log(source_default.gray(` System: ${definition.systemPath}`));
|
|
51952
51961
|
if (definition.actsAsRoleId) console.log(source_default.gray(` Acts as role: ${definition.actsAsRoleId}`));
|
|
51953
|
-
console.log(source_default.gray(` Session capable: ${
|
|
51954
|
-
if (
|
|
51962
|
+
console.log(source_default.gray(` Session capable: ${sessionCapable ? "yes" : "no"}`));
|
|
51963
|
+
if (status) console.log(source_default.gray(` Status: ${status}`));
|
|
51955
51964
|
})
|
|
51956
51965
|
);
|
|
51957
51966
|
}
|
|
@@ -52048,6 +52057,14 @@ function messageText(message) {
|
|
|
52048
52057
|
if (value !== void 0) return String(value);
|
|
52049
52058
|
return JSON.stringify(message, null, 2);
|
|
52050
52059
|
}
|
|
52060
|
+
async function fetchLatestAssistantMessage(sessionId, apiUrl) {
|
|
52061
|
+
const result = await fetchSessionMessages(sessionId, apiUrl, { all: true });
|
|
52062
|
+
for (let i = result.messages.length - 1; i >= 0; i -= 1) {
|
|
52063
|
+
const role = result.messages[i].role ?? result.messages[i].messageType;
|
|
52064
|
+
if (role === "assistant") return result.messages[i];
|
|
52065
|
+
}
|
|
52066
|
+
return result.messages[result.messages.length - 1];
|
|
52067
|
+
}
|
|
52051
52068
|
function printMessage(message) {
|
|
52052
52069
|
const index = message.messageIndex === void 0 ? "" : `#${message.messageIndex}`;
|
|
52053
52070
|
const role = message.role ?? message.messageType ?? "message";
|
|
@@ -52143,8 +52160,21 @@ function registerSessionTurn(program3) {
|
|
|
52143
52160
|
console.log(source_default.gray(` Execution ID: ${result.executionId}`));
|
|
52144
52161
|
if (result.duration !== void 0) console.log(source_default.gray(` Duration: ${result.duration}ms`));
|
|
52145
52162
|
console.log();
|
|
52146
|
-
|
|
52147
|
-
|
|
52163
|
+
const hasOutput = result.output !== void 0 && result.output !== null;
|
|
52164
|
+
if (hasOutput) {
|
|
52165
|
+
console.log(source_default.green("Output:"));
|
|
52166
|
+
console.log(JSON.stringify(result.output, null, 2));
|
|
52167
|
+
return;
|
|
52168
|
+
}
|
|
52169
|
+
const latest = await fetchLatestAssistantMessage(id, apiUrl);
|
|
52170
|
+
if (latest) {
|
|
52171
|
+
console.log(source_default.green("Reply:"));
|
|
52172
|
+
printMessage(latest);
|
|
52173
|
+
} else {
|
|
52174
|
+
console.log(source_default.green("Output:"));
|
|
52175
|
+
console.log(JSON.stringify(result.output, null, 2));
|
|
52176
|
+
console.log(source_default.gray(" (no structured output; run `session:messages` to view the transcript)"));
|
|
52177
|
+
}
|
|
52148
52178
|
})
|
|
52149
52179
|
);
|
|
52150
52180
|
}
|
package/dist/index.js
CHANGED
|
@@ -5226,6 +5226,7 @@ function serializeOrganization(resources) {
|
|
|
5226
5226
|
status: agent.config.status,
|
|
5227
5227
|
links: agent.config.links,
|
|
5228
5228
|
category: agent.config.category,
|
|
5229
|
+
sessionCapable: agent.config.sessionCapable ?? false,
|
|
5229
5230
|
...getGovernanceMetadata(resourceId, agent.config.resource)
|
|
5230
5231
|
});
|
|
5231
5232
|
commandViewAgents.push({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/sdk",
|
|
3
|
-
"version": "1.36.
|
|
3
|
+
"version": "1.36.1",
|
|
4
4
|
"description": "SDK for building Elevasis organization resources",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"tsup": "^8.0.0",
|
|
59
59
|
"typescript": "5.9.2",
|
|
60
60
|
"zod": "^4.1.0",
|
|
61
|
-
"@repo/core": "0.49.
|
|
62
|
-
"@repo/
|
|
63
|
-
"@repo/
|
|
61
|
+
"@repo/core": "0.49.1",
|
|
62
|
+
"@repo/eslint-config": "0.0.0",
|
|
63
|
+
"@repo/typescript-config": "0.0.0"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"lint": "eslint src --max-warnings 0",
|