@darkhunt-security/endpoint-codex 0.9.5 → 0.9.6
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/bin/backfill.mjs +22 -3
- package/dist/bin/forwarder.mjs +22 -3
- package/package.json +1 -1
package/dist/bin/backfill.mjs
CHANGED
|
@@ -18474,8 +18474,23 @@ var SessionEmitter = class {
|
|
|
18474
18474
|
}
|
|
18475
18475
|
await this.client.flush();
|
|
18476
18476
|
}
|
|
18477
|
+
/**
|
|
18478
|
+
* Which subagent this transcript is, if any.
|
|
18479
|
+
*
|
|
18480
|
+
* From the path where the endpoint's layout says so, and otherwise from the file:
|
|
18481
|
+
* Codex names only the parent, so the subagent is identified by the thread the
|
|
18482
|
+
* transcript itself is — `seedKey`, which is exactly that.
|
|
18483
|
+
*/
|
|
18484
|
+
agentId() {
|
|
18485
|
+
if (this.options.agentId !== void 0)
|
|
18486
|
+
return this.options.agentId;
|
|
18487
|
+
return this.grouping ? this.options.seedKey ?? this.options.sessionId : void 0;
|
|
18488
|
+
}
|
|
18489
|
+
agentType() {
|
|
18490
|
+
return this.options.agentType ?? this.meta["agentType"];
|
|
18491
|
+
}
|
|
18477
18492
|
defaultTraceName() {
|
|
18478
|
-
const agentType = this.
|
|
18493
|
+
const agentType = this.agentType();
|
|
18479
18494
|
if (agentType)
|
|
18480
18495
|
return `subagent: ${agentType}`;
|
|
18481
18496
|
if (this.options.agentId === void 0) {
|
|
@@ -18496,8 +18511,12 @@ var SessionEmitter = class {
|
|
|
18496
18511
|
tags: [this.options.vendor, ...this.options.agentId ? ["subagent"] : []],
|
|
18497
18512
|
metadata: {
|
|
18498
18513
|
...this.meta,
|
|
18499
|
-
|
|
18500
|
-
|
|
18514
|
+
// `agent_id` / `agent_type`, not camelCase: trace-hub lifts each metadata
|
|
18515
|
+
// attribute onto the span under its own key, and the consumers that read an
|
|
18516
|
+
// agent out of a span already look for the snake_case names other producers
|
|
18517
|
+
// send. A camelCase key arrives intact and is never found.
|
|
18518
|
+
...this.agentId() !== void 0 ? { agent_id: this.agentId() } : {},
|
|
18519
|
+
...this.agentType() !== void 0 ? { agent_type: this.agentType() } : {}
|
|
18501
18520
|
},
|
|
18502
18521
|
...this.options.userId !== void 0 ? { userId: this.options.userId } : {},
|
|
18503
18522
|
...this.options.userEmail !== void 0 ? { userEmail: this.options.userEmail } : {},
|
package/dist/bin/forwarder.mjs
CHANGED
|
@@ -18474,8 +18474,23 @@ var SessionEmitter = class {
|
|
|
18474
18474
|
}
|
|
18475
18475
|
await this.client.flush();
|
|
18476
18476
|
}
|
|
18477
|
+
/**
|
|
18478
|
+
* Which subagent this transcript is, if any.
|
|
18479
|
+
*
|
|
18480
|
+
* From the path where the endpoint's layout says so, and otherwise from the file:
|
|
18481
|
+
* Codex names only the parent, so the subagent is identified by the thread the
|
|
18482
|
+
* transcript itself is — `seedKey`, which is exactly that.
|
|
18483
|
+
*/
|
|
18484
|
+
agentId() {
|
|
18485
|
+
if (this.options.agentId !== void 0)
|
|
18486
|
+
return this.options.agentId;
|
|
18487
|
+
return this.grouping ? this.options.seedKey ?? this.options.sessionId : void 0;
|
|
18488
|
+
}
|
|
18489
|
+
agentType() {
|
|
18490
|
+
return this.options.agentType ?? this.meta["agentType"];
|
|
18491
|
+
}
|
|
18477
18492
|
defaultTraceName() {
|
|
18478
|
-
const agentType = this.
|
|
18493
|
+
const agentType = this.agentType();
|
|
18479
18494
|
if (agentType)
|
|
18480
18495
|
return `subagent: ${agentType}`;
|
|
18481
18496
|
if (this.options.agentId === void 0) {
|
|
@@ -18496,8 +18511,12 @@ var SessionEmitter = class {
|
|
|
18496
18511
|
tags: [this.options.vendor, ...this.options.agentId ? ["subagent"] : []],
|
|
18497
18512
|
metadata: {
|
|
18498
18513
|
...this.meta,
|
|
18499
|
-
|
|
18500
|
-
|
|
18514
|
+
// `agent_id` / `agent_type`, not camelCase: trace-hub lifts each metadata
|
|
18515
|
+
// attribute onto the span under its own key, and the consumers that read an
|
|
18516
|
+
// agent out of a span already look for the snake_case names other producers
|
|
18517
|
+
// send. A camelCase key arrives intact and is never found.
|
|
18518
|
+
...this.agentId() !== void 0 ? { agent_id: this.agentId() } : {},
|
|
18519
|
+
...this.agentType() !== void 0 ? { agent_type: this.agentType() } : {}
|
|
18501
18520
|
},
|
|
18502
18521
|
...this.options.userId !== void 0 ? { userId: this.options.userId } : {},
|
|
18503
18522
|
...this.options.userEmail !== void 0 ? { userEmail: this.options.userEmail } : {},
|
package/package.json
CHANGED