Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ jobs:
run: npm ci --ignore-scripts --legacy-peer-deps
- name: Lint mastra-agentmesh
working-directory: agent-governance-python/agentmesh-integrations/mastra-agentmesh
run: npm run lint 2>/dev/null || true
run: npm run lint
- name: Test mastra-agentmesh
working-directory: agent-governance-python/agentmesh-integrations/mastra-agentmesh
run: npm test
Expand All @@ -804,7 +804,7 @@ jobs:
run: npm ci --ignore-scripts --legacy-peer-deps
- name: Lint copilot-governance
working-directory: agent-governance-python/agentmesh-integrations/copilot-governance
run: npm run lint 2>/dev/null || true
run: npm run lint
- name: Test copilot-governance
working-directory: agent-governance-python/agentmesh-integrations/copilot-governance
run: npm test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,11 @@ export function auditMiddleware(config: AuditConfig = {}) {

export type { AuditEntry };

/** Compute SHA-256 hash of a string. Works in Node.js and Edge. */
/** Compute SHA-256 hash of a string. Uses the Web Crypto API (available in Node.js 18+ and all edge runtimes). */
async function computeHash(data: string): Promise<string> {
// Node.js crypto
try {
const { createHash } = await import("crypto");
return createHash("sha256").update(data).digest("hex");
} catch {
// Fallback for edge runtimes
const encoder = new TextEncoder();
const buf = await crypto.subtle.digest("SHA-256", encoder.encode(data));
return Array.from(new Uint8Array(buf))
.map((b) => b.toString(16).padStart(2, "0"))
.join("");
}
const encoder = new TextEncoder();
const buf = await crypto.subtle.digest("SHA-256", encoder.encode(data));
return Array.from(new Uint8Array(buf))
.map((b) => b.toString(16).padStart(2, "0"))
.join("");
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"lib": ["ES2022"],
"lib": ["ES2022", "DOM"],
"types": ["node"],
"outDir": "dist",
"rootDir": "src",
Expand Down
Loading