@pinta-ai/pinta-gemini 0.2.0 → 0.2.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/index.js +5 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -139,7 +139,7 @@ function sleep(ms) {
|
|
|
139
139
|
}, ms)
|
|
140
140
|
);
|
|
141
141
|
}
|
|
142
|
-
async function evaluateGuard(input, endpoint) {
|
|
142
|
+
async function evaluateGuard(input, endpoint, relayToken) {
|
|
143
143
|
if (!endpoint) return null;
|
|
144
144
|
if (process.env.PINTA_GUARD_DISABLED === "1") return null;
|
|
145
145
|
const start = Date.now();
|
|
@@ -149,7 +149,7 @@ async function evaluateGuard(input, endpoint) {
|
|
|
149
149
|
method: "POST",
|
|
150
150
|
headers: {
|
|
151
151
|
"content-type": "application/json",
|
|
152
|
-
"x-pinta-relay-token": process.env.PINTA_RELAY_TOKEN ?? ""
|
|
152
|
+
"x-pinta-relay-token": relayToken ?? process.env.PINTA_RELAY_TOKEN ?? ""
|
|
153
153
|
},
|
|
154
154
|
body: JSON.stringify({ input })
|
|
155
155
|
}),
|
|
@@ -402,7 +402,7 @@ function redact(input, opts = {}) {
|
|
|
402
402
|
}
|
|
403
403
|
|
|
404
404
|
// src/core/otlp.ts
|
|
405
|
-
var PLUGIN_VERSION = "0.2.
|
|
405
|
+
var PLUGIN_VERSION = "0.2.1";
|
|
406
406
|
var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
407
407
|
function ulidToTraceId(ulid) {
|
|
408
408
|
if (ulid.length !== 26) throw new Error(`ulidToTraceId: expected 26 chars, got ${ulid.length}`);
|
|
@@ -671,7 +671,8 @@ async function main() {
|
|
|
671
671
|
const rawToolInput = typeof c.tool_input === "string" ? c.tool_input : JSON.stringify(c.tool_input ?? null);
|
|
672
672
|
guard = await evaluateGuard(
|
|
673
673
|
{ spanId: sessionId, toolName: c.tool_name, toolInput: c.tool_input, rawTextFields: { toolInput: rawToolInput } },
|
|
674
|
-
config.guardEndpoint
|
|
674
|
+
config.guardEndpoint,
|
|
675
|
+
config.headers["x-pinta-relay-token"]
|
|
675
676
|
);
|
|
676
677
|
}
|
|
677
678
|
const product = isGemini(agent) ? void 0 : antigravityProduct(ev);
|
package/package.json
CHANGED