Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

fix(auth): verify OAuth exports in security release (#2711)

rUv14c41d77845f
diff --git a/.github/workflows/v3-ci.yml b/.github/workflows/v3-ci.yml
index c3cf69c731..6dd2e16e49 100644
--- a/.github/workflows/v3-ci.yml
+++ b/.github/workflows/v3-ci.yml
@@ -2006,6 +2006,7 @@ jobs:
pnpm --filter @claude-flow/security run build
test -f @claude-flow/security/dist/index.js \
|| (echo "::error::@claude-flow/security/dist/index.js missing after build"; exit 1)
+ node @claude-flow/security/scripts/verify-oauth-exports.mjs
- name: Run guardrail smoke
shell: bash
diff --git a/ruflo/package.json b/ruflo/package.json
index 2ac09036d9..9bea16560a 100644
--- a/ruflo/package.json
+++ b/ruflo/package.json
@@ -1,6 +1,6 @@
{
"name": "ruflo",
- "version": "3.32.5",
+ "version": "3.32.6",
"description": "Ruflo - Enterprise AI agent orchestration platform. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
"main": "bin/ruflo.js",
"type": "module",
@@ -40,7 +40,7 @@
"package:rvf": "bash src/scripts/package-rvf.sh"
},
"dependencies": {
- "@claude-flow/cli": "^3.32.5"
+ "@claude-flow/cli": "^3.32.6"
},
"optionalDependencies": {},
"overrides": {
diff --git a/v3/@claude-flow/cli/package.json b/v3/@claude-flow/cli/package.json
index 2d172b9865..225c48b797 100644
--- a/v3/@claude-flow/cli/package.json
+++ b/v3/@claude-flow/cli/package.json
@@ -1,6 +1,6 @@
{
"name": "@claude-flow/cli",
- "version": "3.32.5",
+ "version": "3.32.6",
"type": "module",
"description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
"main": "dist/src/index.js",
@@ -112,7 +112,7 @@
},
"optionalDependencies": {
"@claude-flow/memory": "^3.0.0-alpha.21",
- "@claude-flow/security": "^3.0.0-alpha.10",
+ "@claude-flow/security": "^3.0.0-alpha.11",
"agentdb": "^3.0.0-alpha.17",
"agentic-flow": "^3.0.0-alpha.1",
"ruvector": "^0.2.27"
diff --git a/v3/@claude-flow/security/__tests__/oauth-export-surface.test.ts b/v3/@claude-flow/security/__tests__/oauth-export-surface.test.ts
new file mode 100644
index 0000000000..91b012c689
--- /dev/null
+++ b/v3/@claude-flow/security/__tests__/oauth-export-surface.test.ts
@@ -0,0 +1,21 @@
+import { describe, expect, it } from 'vitest';
+import * as security from '../src/index.js';
+
+describe('OAuth public export surface', () => {
+ it('exports every primitive required by ruflo auth', () => {
+ for (const name of [
+ 'authorizeUrl',
+ 'exchangeCode',
+ 'refreshToken',
+ 'exchangeManualCode',
+ 'generatePkce',
+ 'CallbackServer',
+ 'openBrowser',
+ 'createKeychainAdapter',
+ 'OAuthError',
+ ] as const) {
+ expect(security[name]).toBeTypeOf('function');
+ }
+ expect(security.OOB_REDIRECT_URI).toBeTypeOf('string');
+ });
+});
diff --git a/v3/@claude-flow/security/package.json b/v3/@claude-flow/security/package.json
index 166e34d905..504c520c84 100644
--- a/v3/@claude-flow/security/package.json
+++ b/v3/@claude-flow/security/package.json
@@ -1,6 +1,6 @@
{
"name": "@claude-flow/security",
- "version": "3.0.0-alpha.10",
+ "version": "3.0.0-alpha.11",
"type": "module",
"description": "Security module - CVE fixes, input validation, path security",
"main": "dist/index.js",
@@ -11,7 +11,9 @@
},
"scripts": {
"test": "vitest run",
- "build": "tsc"
+ "test:oauth-surface": "vitest run __tests__/oauth-export-surface.test.ts __tests__/oauth-pkce.test.ts __tests__/oauth-browser.test.ts",
+ "build": "tsc && node scripts/verify-oauth-exports.mjs",
+ "prepublishOnly": "npm run build && npm run test:oauth-surface"
},
"dependencies": {
"@noble/ed25519": "^2.1.0",
diff --git a/v3/@claude-flow/security/scripts/verify-oauth-exports.mjs b/v3/@claude-flow/security/scripts/verify-oauth-exports.mjs
new file mode 100644
index 0000000000..8dde6b7f92
--- /dev/null
+++ b/v3/@claude-flow/security/scripts/verify-oauth-exports.mjs
@@ -0,0 +1,29 @@
+/**
+ * Release and CI guard for the OAuth surface consumed by `ruflo auth`.
+ * This deliberately imports the built package entry point, rather than
+ * source files, so a stale or incomplete npm artifact cannot pass.
+ */
+const security = await import('../dist/index.js');
+
+const requiredFunctions = [
+ 'authorizeUrl',
+ 'exchangeCode',
+ 'refreshToken',
+ 'exchangeManualCode',
+ 'generatePkce',
+ 'openBrowser',
+ 'createKeychainAdapter',
+];
+const requiredClasses = ['CallbackServer', 'OAuthError'];
+
+const missing = [
+ ...requiredFunctions.filter((name) => typeof security[name] !== 'function'),
+ ...requiredClasses.filter((name) => typeof security[name] !== 'function'),
+ ...(typeof security.OOB_REDIRECT_URI === 'string' ? [] : ['OOB_REDIRECT_URI']),
+];
+
+if (missing.length > 0) {
+ throw new Error(`@claude-flow/security is missing required OAuth exports: ${missing.join(', ')}`);
+}
+
+console.log(`OAuth export surface verified (${requiredFunctions.length + requiredClasses.length + 1} exports)`);