@atbash/sdk 0.5.7 → 0.5.8
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/browser.d.mts +16 -0
- package/dist/browser.mjs +7 -1
- package/dist/browser.mjs.map +1 -1
- package/dist/index.d.mts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/index.js +52 -52
- package/package.json +4 -4
package/dist/browser.d.mts
CHANGED
|
@@ -257,6 +257,16 @@ interface ToolCallInput {
|
|
|
257
257
|
toolName: string;
|
|
258
258
|
args?: unknown;
|
|
259
259
|
context?: string;
|
|
260
|
+
/**
|
|
261
|
+
* Plain-language facts about the action, produced by the caller after
|
|
262
|
+
* any tool-specific parsing (e.g., an ERC-20 contract address resolved
|
|
263
|
+
* to `{asset: "USDT"}`). Not run through the secret redactor — the
|
|
264
|
+
* caller is expected to keep secret-shaped values out. The judge LLM
|
|
265
|
+
* sees this as a distinct PARSED_METADATA block, so it can apply
|
|
266
|
+
* asset- or recipient-specific policy even when raw addresses in
|
|
267
|
+
* `args` were redacted.
|
|
268
|
+
*/
|
|
269
|
+
resolved?: Record<string, unknown>;
|
|
260
270
|
}
|
|
261
271
|
/** Options accepted by `Atbash.fromConfig`. All fields are explicit overrides. */
|
|
262
272
|
interface FromConfigOptions {
|
|
@@ -294,6 +304,12 @@ interface JudgeOptions {
|
|
|
294
304
|
* org-resolved chain.
|
|
295
305
|
*/
|
|
296
306
|
chainOpts?: ChainOpts;
|
|
307
|
+
/**
|
|
308
|
+
* Plain-language facts about the action — see
|
|
309
|
+
* {@link ToolCallInput.resolved}. Also accepted here for callers that
|
|
310
|
+
* use `judgeAction` directly without going through `auditToolCall`.
|
|
311
|
+
*/
|
|
312
|
+
resolved?: Record<string, unknown>;
|
|
297
313
|
}
|
|
298
314
|
/** Options accepted by `logToolCall`. */
|
|
299
315
|
interface LogToolCallOptions {
|
package/dist/browser.mjs
CHANGED
|
@@ -43375,6 +43375,9 @@ var native = {
|
|
|
43375
43375
|
DEFAULT_BLOCKCHAIN_RID: DEV_BLOCKCHAIN_RID,
|
|
43376
43376
|
DEFAULT_PRIVATE_BLOCKCHAIN_RID: DEV_PRIVATE_BLOCKCHAIN_RID,
|
|
43377
43377
|
DEFAULT_ENDPOINT: DEV_ENDPOINT,
|
|
43378
|
+
// Browser has no NAPI channel to Rust's HONEYCOMB_KEY — telemetry
|
|
43379
|
+
// silently no-ops. `HONEYCOMB_API_KEY` env var still overrides at runtime.
|
|
43380
|
+
HONEYCOMB_KEY: "",
|
|
43378
43381
|
defaultChromiaNodeUrls: () => [...DEFAULT_CHROMIA_NODE_URLS_ARR],
|
|
43379
43382
|
defaultPrivateNodeUrls: () => [...DEFAULT_PRIVATE_NODE_URLS_ARR]
|
|
43380
43383
|
};
|
|
@@ -43800,6 +43803,7 @@ var Atbash = class _Atbash {
|
|
|
43800
43803
|
if (options.provider) body.provider = options.provider;
|
|
43801
43804
|
if (options.toolName) body.tool_name = options.toolName;
|
|
43802
43805
|
if (options.model) body.model = options.model;
|
|
43806
|
+
if (options.resolved) body.resolved = options.resolved;
|
|
43803
43807
|
let resp;
|
|
43804
43808
|
try {
|
|
43805
43809
|
resp = await this.http.post("/api/v1/judge", body);
|
|
@@ -43877,7 +43881,9 @@ var Atbash = class _Atbash {
|
|
|
43877
43881
|
const result = await this.judgeAction(actionText, contextText, {
|
|
43878
43882
|
toolName,
|
|
43879
43883
|
toolArgsJson: argsJson,
|
|
43880
|
-
orgName: this.orgName
|
|
43884
|
+
orgName: this.orgName,
|
|
43885
|
+
// Passed through unredacted — caller vouches for the contents.
|
|
43886
|
+
resolved: input.resolved
|
|
43881
43887
|
});
|
|
43882
43888
|
if (result.verdict === "No verdict") {
|
|
43883
43889
|
return {
|