@granular-software/sdk 0.4.25 → 0.4.26
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/agent-evals.d.mts +1 -1
- package/dist/agent-evals.d.ts +1 -1
- package/dist/agent-evals.js +30 -0
- package/dist/agent-evals.js.map +1 -1
- package/dist/agent-evals.mjs +30 -0
- package/dist/agent-evals.mjs.map +1 -1
- package/dist/cli/index.js +30 -0
- package/dist/{client-BeKRGMoT.d.mts → client-Zoo8YITZ.d.mts} +38 -1
- package/dist/{client-BeKRGMoT.d.ts → client-Zoo8YITZ.d.ts} +38 -1
- package/dist/index.d.mts +8 -3
- package/dist/index.d.ts +8 -3
- package/dist/index.js +331 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +331 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/agent-evals.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as Prompt,
|
|
1
|
+
import { P as Prompt, e as Environment, c as SessionHeapSnapshot, b3 as ManifestContent, aB as RecordObjectOptions, T as ToolWithHandler, G as Granular, C as ConnectOptions, z as CreateEnvironmentData, j as GranularOptions } from './client-Zoo8YITZ.mjs';
|
|
2
2
|
import { GeneratedJobCodeIssue, HarnessControllerBudgets } from './agent-harness.mjs';
|
|
3
3
|
import '@automerge/automerge';
|
|
4
4
|
import '@automerge/automerge/slim';
|
package/dist/agent-evals.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as Prompt,
|
|
1
|
+
import { P as Prompt, e as Environment, c as SessionHeapSnapshot, b3 as ManifestContent, aB as RecordObjectOptions, T as ToolWithHandler, G as Granular, C as ConnectOptions, z as CreateEnvironmentData, j as GranularOptions } from './client-Zoo8YITZ.js';
|
|
2
2
|
import { GeneratedJobCodeIssue, HarnessControllerBudgets } from './agent-harness.js';
|
|
3
3
|
import '@automerge/automerge';
|
|
4
4
|
import '@automerge/automerge/slim';
|
package/dist/agent-evals.js
CHANGED
|
@@ -4615,6 +4615,22 @@ var Session = class {
|
|
|
4615
4615
|
}
|
|
4616
4616
|
};
|
|
4617
4617
|
}
|
|
4618
|
+
stringifyConversationValue(value) {
|
|
4619
|
+
if (typeof value === "string") {
|
|
4620
|
+
return value;
|
|
4621
|
+
}
|
|
4622
|
+
if (typeof value === "boolean") {
|
|
4623
|
+
return value ? "Confirmed" : "Canceled";
|
|
4624
|
+
}
|
|
4625
|
+
if (value === void 0) {
|
|
4626
|
+
return "";
|
|
4627
|
+
}
|
|
4628
|
+
try {
|
|
4629
|
+
return JSON.stringify(value, null, 2);
|
|
4630
|
+
} catch {
|
|
4631
|
+
return String(value);
|
|
4632
|
+
}
|
|
4633
|
+
}
|
|
4618
4634
|
// --- Public API ---
|
|
4619
4635
|
get document() {
|
|
4620
4636
|
return this.client.doc;
|
|
@@ -4765,6 +4781,20 @@ var Session = class {
|
|
|
4765
4781
|
answer: resolvedAnswer,
|
|
4766
4782
|
value: resolvedAnswer
|
|
4767
4783
|
});
|
|
4784
|
+
try {
|
|
4785
|
+
const content = this.stringifyConversationValue(resolvedAnswer);
|
|
4786
|
+
if (content.trim()) {
|
|
4787
|
+
await this.appendConversationMessage({
|
|
4788
|
+
role: "user",
|
|
4789
|
+
content,
|
|
4790
|
+
promptId
|
|
4791
|
+
});
|
|
4792
|
+
}
|
|
4793
|
+
} catch {
|
|
4794
|
+
}
|
|
4795
|
+
}
|
|
4796
|
+
async appendConversationMessage(input) {
|
|
4797
|
+
return this.client.call("conversation.append", input);
|
|
4768
4798
|
}
|
|
4769
4799
|
/**
|
|
4770
4800
|
* Get the current list of available effects.
|