@pinta-ai/pinta-codex 1.2.4 → 1.3.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/.codex-plugin/plugin.json +1 -1
- package/dist/core/guard.js +5 -0
- package/dist/core/guard.js.map +1 -1
- package/dist/core/otlp.js +1 -1
- package/package.json +5 -4
package/dist/core/guard.js
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.evaluateGuard = evaluateGuard;
|
|
4
4
|
const TIMEOUT_MS = 50;
|
|
5
|
+
// Self-identify to the manager's guard route so it can attribute calls to this
|
|
6
|
+
// adaptor (the route parses `pinta-*/<version>` out of the User-Agent). Keep the
|
|
7
|
+
// version in sync with package.json.
|
|
8
|
+
const GUARD_UA = 'pinta-codex/1.3.1';
|
|
5
9
|
function sleep(ms) {
|
|
6
10
|
return new Promise((_, reject) => setTimeout(() => {
|
|
7
11
|
const err = new Error('Guard request timed out');
|
|
@@ -21,6 +25,7 @@ async function evaluateGuard(input, endpoint) {
|
|
|
21
25
|
method: 'POST',
|
|
22
26
|
headers: {
|
|
23
27
|
'content-type': 'application/json',
|
|
28
|
+
'user-agent': GUARD_UA,
|
|
24
29
|
'x-pinta-relay-token': process.env.PINTA_RELAY_TOKEN ?? '',
|
|
25
30
|
},
|
|
26
31
|
body: JSON.stringify({ input }),
|
package/dist/core/guard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard.js","sourceRoot":"","sources":["../../src/core/guard.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"guard.js","sourceRoot":"","sources":["../../src/core/guard.ts"],"names":[],"mappings":";;AA+BA,sCA6BC;AA9CD,MAAM,UAAU,GAAG,EAAE,CAAC;AAEtB,+EAA+E;AAC/E,iFAAiF;AACjF,qCAAqC;AACrC,MAAM,QAAQ,GAAG,mBAAmB,CAAC;AAErC,SAA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AC;QACrH,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC;IAC/G,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,MAAM,GAAmC,GAAa,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC;QAC3G,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC;IACrG,CAAC;AACH,CAAC"}
|
package/dist/core/otlp.js
CHANGED
|
@@ -10,7 +10,7 @@ exports.mergeBatch = mergeBatch;
|
|
|
10
10
|
const crypto_1 = __importDefault(require("crypto"));
|
|
11
11
|
const os_1 = __importDefault(require("os"));
|
|
12
12
|
const redact_js_1 = require("./redact.js");
|
|
13
|
-
const PLUGIN_VERSION = "1.
|
|
13
|
+
const PLUGIN_VERSION = "1.3.1"; // keep in sync with .codex-plugin/plugin.json
|
|
14
14
|
/**
|
|
15
15
|
* Resolve the Codex CLI version from an explicit env if present.
|
|
16
16
|
* Hooks run as short-lived processes, so we keep this intentionally simple.
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pinta-ai/pinta-codex",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Generic OTLP forwarder for Codex hook events",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "SEE LICENSE IN ./LICENSE",
|
|
7
7
|
"author": "Pinta AI (https://pinta.sh)",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/
|
|
10
|
+
"url": "git+https://github.com/pinta-ai/pinta-codex.git"
|
|
11
11
|
},
|
|
12
|
-
"homepage": "https://github.com/
|
|
12
|
+
"homepage": "https://github.com/pinta-ai/pinta-codex",
|
|
13
13
|
"bugs": {
|
|
14
|
-
"url": "https://github.com/
|
|
14
|
+
"url": "https://github.com/pinta-ai/pinta-codex/issues"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"dist",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"CHANGELOG.md"
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
|
+
"bump": "node scripts/bump.mjs",
|
|
26
27
|
"build": "tsc",
|
|
27
28
|
"dev": "tsc --watch",
|
|
28
29
|
"setup": "npx tsx tools/setup.ts",
|