Rename Hightower components to Trebuchet
- Rename npm packages: @shannon/api -> @trebuchet/api, @shannon/worker -> @trebuchet/worker, @keygraph/shannon -> @trebuchet/cli - Update CLI references from shannon/keygraph to trebuchet/trebuchet - Update Dockerfile and CLAUDE.md to reflect new package names - Update TypeScript imports in API to use @trebuchet/worker Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -21,9 +21,11 @@ pnpm biome:fix # Auto-fix lint, format, and import sorting
|
||||
### Monorepo Layout
|
||||
|
||||
```
|
||||
apps/api/ — @shannon/api (Hightower REST API, K8s-native)
|
||||
apps/cli/ — @keygraph/shannon (upstream CLI, not used in production)
|
||||
apps/worker/ — @shannon/worker (upstream Temporal worker + pipeline logic)
|
||||
apps/api/ — @trebuchet/api (Trebuchet REST API, K8s-native)
|
||||
|
||||
apps/cli/ — @trebuchet/cli (upstream CLI, not used in production)
|
||||
|
||||
apps/worker/ — @trebuchet/worker (upstream Temporal worker + pipeline logic)
|
||||
```
|
||||
|
||||
### API Package (`apps/api/`)
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ RUN pnpm install --frozen-lockfile
|
||||
COPY . .
|
||||
|
||||
# Build worker. CLI not needed in Docker
|
||||
RUN pnpm --filter @shannon/worker run build
|
||||
RUN pnpm --filter @trebuchet/worker run build
|
||||
|
||||
# Production-only deps (pnpm recommends install --prod over prune in monorepos)
|
||||
RUN rm -rf node_modules apps/*/node_modules && pnpm install --frozen-lockfile --prod
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ COPY apps/worker/ ./apps/worker/
|
||||
COPY apps/api/ ./apps/api/
|
||||
|
||||
# Build worker first (API depends on it for types), then API
|
||||
RUN pnpm --filter @shannon/worker run build && pnpm --filter @shannon/api run build
|
||||
RUN pnpm --filter @trebuchet/worker run build && pnpm --filter @trebuchet/api run build
|
||||
|
||||
# Production-only deps
|
||||
RUN rm -rf node_modules apps/*/node_modules && pnpm install --frozen-lockfile --prod
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@shannon/api",
|
||||
"name": "@trebuchet/api",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
@@ -13,7 +13,7 @@
|
||||
"@hono/node-server": "^1.14.0",
|
||||
"@kubernetes/client-node": "^1.4.0",
|
||||
"@modelcontextprotocol/sdk": "^1.29.0",
|
||||
"@shannon/worker": "workspace:*",
|
||||
"@trebuchet/worker": "workspace:*",
|
||||
"@temporalio/client": "^1.11.0",
|
||||
"hono": "^4.7.0",
|
||||
"zod": "^4.3.6"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Uses @temporalio/client (not worker) since the API server only submits and queries workflows.
|
||||
*/
|
||||
|
||||
import type { PipelineProgress } from '@shannon/worker/pipeline';
|
||||
import type { PipelineProgress } from '@trebuchet/worker/pipeline';
|
||||
import { Client, Connection } from '@temporalio/client';
|
||||
|
||||
export interface TemporalClients {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Request/response types and Zod validation schemas for the scan API.
|
||||
*/
|
||||
|
||||
import type { AgentMetrics, PipelineSummary } from '@shannon/worker/pipeline';
|
||||
import type { AgentMetrics, PipelineSummary } from '@trebuchet/worker/pipeline';
|
||||
import { z } from 'zod';
|
||||
|
||||
// === Request Schemas ===
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "@keygraph/shannon",
|
||||
"name": "@trebuchet/cli",
|
||||
"version": "0.0.0",
|
||||
"description": "Shannon - Autonomous white-box AI pentester for web applications and APIs by Keygraph",
|
||||
"description": "Trebuchet - Autonomous white-box AI pentester for web applications and APIs by Farhood Labs",
|
||||
"type": "module",
|
||||
"main": "dist/index.mjs",
|
||||
"bin": {
|
||||
"shannon": "dist/index.mjs"
|
||||
"trebuchet": "dist/index.mjs"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
|
||||
@@ -37,7 +37,7 @@ export async function setup(): Promise<void> {
|
||||
|
||||
const configPath = path.join(SHANNON_HOME, 'config.toml');
|
||||
p.log.success(`Configuration saved to ${configPath}`);
|
||||
p.outro('Run `npx @keygraph/shannon start` to begin a scan.');
|
||||
p.outro('Run `npx @trebuchet/cli start` to begin a scan.');
|
||||
}
|
||||
|
||||
async function setupProvider(provider: Provider): Promise<ShannonConfig> {
|
||||
|
||||
@@ -222,7 +222,7 @@ function printInfo(
|
||||
repoPath: string,
|
||||
workspacesDir: string,
|
||||
): void {
|
||||
const logsCmd = isLocal() ? `./shannon logs ${workspace}` : `npx @keygraph/shannon logs ${workspace}`;
|
||||
const logsCmd = isLocal() ? `./trebuchet logs ${workspace}` : `npx @trebuchet/cli logs ${workspace}`;
|
||||
const reportsPath = path.join(workspacesDir, workspace);
|
||||
|
||||
console.log(` Target: ${args.url}`);
|
||||
|
||||
@@ -34,5 +34,5 @@ export async function uninstall(): Promise<void> {
|
||||
|
||||
fs.rmSync(SHANNON_HOME, { recursive: true, force: true });
|
||||
p.log.success('All Shannon data has been removed.');
|
||||
p.outro('Shannon has been uninstalled. Run `npx @keygraph/shannon setup` to start fresh.');
|
||||
p.outro('Trebuchet has been uninstalled. Run `npx @trebuchet/cli setup` to start fresh.');
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ function loadTOML(): TOMLConfig | null {
|
||||
} catch (err) {
|
||||
const message = err instanceof Error ? err.message : String(err);
|
||||
console.error(`\nFailed to parse ${configPath}: ${message}`);
|
||||
console.error(`\nRun 'npx @keygraph/shannon setup' to reconfigure.\n`);
|
||||
console.error(`\nRun 'npx @trebuchet/cli setup' to reconfigure.\n`);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -163,7 +163,7 @@ export function validateCredentials(): CredentialValidation {
|
||||
const hint =
|
||||
getMode() === 'local'
|
||||
? `No credentials found. Set ANTHROPIC_API_KEY in .env or export it.`
|
||||
: `Authentication not configured. Export variables or run 'npx @keygraph/shannon setup'.`;
|
||||
: `Authentication not configured. Export variables or run 'npx @trebuchet/cli setup'.`;
|
||||
return {
|
||||
valid: false,
|
||||
mode: 'api-key',
|
||||
|
||||
@@ -38,7 +38,7 @@ function getVersion(): string {
|
||||
|
||||
function showHelp(): void {
|
||||
const mode = getMode();
|
||||
const prefix = mode === 'local' ? './shannon' : 'npx @keygraph/shannon';
|
||||
const prefix = mode === 'local' ? './trebuchet' : 'npx @trebuchet/cli';
|
||||
|
||||
console.log(`
|
||||
Shannon - AI Penetration Testing Framework
|
||||
@@ -155,14 +155,14 @@ function parseStartArgs(argv: string[]): ParsedStartArgs {
|
||||
break;
|
||||
default:
|
||||
console.error(`Unknown option: ${arg}`);
|
||||
console.error(`Run "${getMode() === 'local' ? './shannon' : 'npx @keygraph/shannon'} help" for usage`);
|
||||
console.error(`Run "${getMode() === 'local' ? './trebuchet' : 'npx @trebuchet/cli'} help" for usage`);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!url || !repo) {
|
||||
console.error('ERROR: --url and --repo are required');
|
||||
console.error(`Usage: ${getMode() === 'local' ? './shannon' : 'npx @keygraph/shannon'} start -u <url> -r <path>`);
|
||||
console.error(`Usage: ${getMode() === 'local' ? './trebuchet' : 'npx @trebuchet/cli'} start -u <url> -r <path>`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ switch (command) {
|
||||
const workspaceId = args[1];
|
||||
if (!workspaceId) {
|
||||
console.error('ERROR: Workspace ID is required');
|
||||
console.error(`Usage: ${getMode() === 'local' ? './shannon' : 'npx @keygraph/shannon'} logs <workspace>`);
|
||||
console.error(`Usage: ${getMode() === 'local' ? './trebuchet' : 'npx @trebuchet/cli'} logs <workspace>`);
|
||||
process.exit(1);
|
||||
}
|
||||
logs(workspaceId);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@shannon/worker",
|
||||
"name": "@trebuchet/worker",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
|
||||
Reference in New Issue
Block a user