@rbbtsn0w/adg 0.5.0-beta.6 → 0.5.0-beta.7

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.
@@ -13,13 +13,18 @@ export function skippedResult(agent) {
13
13
  function clipText(value, max = 512) {
14
14
  return value.length <= max ? value : `${value.slice(0, max - 1)}…`;
15
15
  }
16
+ function redactFailureText(value) {
17
+ return value
18
+ .replace(/\b(?:github_pat_[A-Za-z0-9_]+|gh[pousr]_[A-Za-z0-9]+)\b/gu, "[REDACTED_TOKEN]")
19
+ .replace(/\b(Authorization\s*:\s*Bearer\s+)[^\s,;]+/giu, "$1[REDACTED_TOKEN]");
20
+ }
16
21
  function summarizeFailure(r) {
17
22
  const stderr = r.stderr?.trim();
18
23
  if (stderr)
19
- return { stream: "stderr", text: clipText(stderr) };
24
+ return { stream: "stderr", text: clipText(redactFailureText(stderr)) };
20
25
  const stdout = r.stdout?.trim();
21
26
  if (stdout)
22
- return { stream: "stdout", text: clipText(stdout) };
27
+ return { stream: "stdout", text: clipText(redactFailureText(stdout)) };
23
28
  return undefined;
24
29
  }
25
30
  function recordFailureExcerpt(span, summary) {
@@ -6,9 +6,13 @@ import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions"
6
6
  import * as opentelemetry from "@opentelemetry/api";
7
7
  import {} from "@opentelemetry/api";
8
8
  const baseEndpoint = process.env.OTEL_EXPORTER_OTLP_ENDPOINT;
9
+ export function normalizeTraceEndpoint(endpoint) {
10
+ const normalized = endpoint.replace(/\/$/, "");
11
+ return normalized.endsWith("/v1/traces") ? normalized : `${normalized}/v1/traces`;
12
+ }
9
13
  const TELEMETRY_URL = process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ||
10
14
  (baseEndpoint
11
- ? `${baseEndpoint.replace(/\/$/, "")}/v1/traces`
15
+ ? normalizeTraceEndpoint(baseEndpoint)
12
16
  : "https://telemetry-gateway.hamiltonsnow.workers.dev/v1/traces");
13
17
  function isEnabled() {
14
18
  return (!process.env.DISABLE_TELEMETRY &&
@@ -107,6 +107,7 @@ export async function removeCommand(skillNames, options) {
107
107
  targetAgents = Object.keys(agents);
108
108
  spinner.stop(`Targeting ${targetAgents.length} potential agent(s)`);
109
109
  }
110
+ const eveSubagents = !isGlobal && targetAgents.includes('eve') ? getEveSubagents(cwd) : [];
110
111
  if (!options.yes) {
111
112
  console.log();
112
113
  p.log.info('Skills to remove:');
@@ -142,7 +143,7 @@ export async function removeCommand(skillNames, options) {
142
143
  pathsToCleanup.add(join(cwd, agent.skillsDir, sanitizedName));
143
144
  // Eve skills may also live in subagent directories.
144
145
  if (agentKey === 'eve') {
145
- for (const subagent of getEveSubagents(cwd)) {
146
+ for (const subagent of eveSubagents) {
146
147
  pathsToCleanup.add(join(getEveSubagentSkillsDir(subagent, cwd), sanitizedName));
147
148
  }
148
149
  }
@@ -9,9 +9,13 @@ import { readFileSync, existsSync } from "node:fs";
9
9
  import { dirname, join } from "node:path";
10
10
  import { fileURLToPath } from "node:url";
11
11
  const baseEndpoint = process.env.OTEL_EXPORTER_OTLP_ENDPOINT;
12
+ function normalizeTraceEndpoint(endpoint) {
13
+ const normalized = endpoint.replace(/\/$/, "");
14
+ return normalized.endsWith("/v1/traces") ? normalized : `${normalized}/v1/traces`;
15
+ }
12
16
  const TELEMETRY_URL = process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ||
13
17
  (baseEndpoint
14
- ? `${baseEndpoint.replace(/\/$/, "")}/v1/traces`
18
+ ? normalizeTraceEndpoint(baseEndpoint)
15
19
  : "https://telemetry-gateway.hamiltonsnow.workers.dev/v1/traces");
16
20
  const AUDIT_URL = "https://add-skill.vercel.sh/audit";
17
21
  let provider = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbbtsn0w/adg",
3
- "version": "0.5.0-beta.6",
3
+ "version": "0.5.0-beta.7",
4
4
  "description": "Agent Directory Group (ADG) toolkit — two domains: plugins and skills.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -137,6 +137,7 @@ export async function removeCommand(skillNames: string[], options: RemoveOptions
137
137
  targetAgents = Object.keys(agents) as AgentType[];
138
138
  spinner.stop(`Targeting ${targetAgents.length} potential agent(s)`);
139
139
  }
140
+ const eveSubagents = !isGlobal && targetAgents.includes('eve') ? getEveSubagents(cwd) : [];
140
141
 
141
142
  if (!options.yes) {
142
143
  console.log();
@@ -185,7 +186,7 @@ export async function removeCommand(skillNames: string[], options: RemoveOptions
185
186
  pathsToCleanup.add(join(cwd, agent.skillsDir, sanitizedName));
186
187
  // Eve skills may also live in subagent directories.
187
188
  if (agentKey === 'eve') {
188
- for (const subagent of getEveSubagents(cwd)) {
189
+ for (const subagent of eveSubagents) {
189
190
  pathsToCleanup.add(join(getEveSubagentSkillsDir(subagent, cwd), sanitizedName));
190
191
  }
191
192
  }
@@ -10,10 +10,15 @@ import { dirname, join } from "node:path";
10
10
  import { fileURLToPath } from "node:url";
11
11
 
12
12
  const baseEndpoint = process.env.OTEL_EXPORTER_OTLP_ENDPOINT;
13
+ function normalizeTraceEndpoint(endpoint: string): string {
14
+ const normalized = endpoint.replace(/\/$/, "");
15
+ return normalized.endsWith("/v1/traces") ? normalized : `${normalized}/v1/traces`;
16
+ }
17
+
13
18
  const TELEMETRY_URL =
14
19
  process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ||
15
20
  (baseEndpoint
16
- ? `${baseEndpoint.replace(/\/$/, "")}/v1/traces`
21
+ ? normalizeTraceEndpoint(baseEndpoint)
17
22
  : "https://telemetry-gateway.hamiltonsnow.workers.dev/v1/traces");
18
23
 
19
24
  const AUDIT_URL = "https://add-skill.vercel.sh/audit";