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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,14 @@ rli mcp install # Install Runloop MCP server configurat

```bash
rli axon list # List active axons
rli axon events <id> # List events for an axon
```

### Scenario Commands (alias: `scn`)

```bash
rli scenario info <id> # Display scenario definition details
rli scenario list # List scenario runs
```

### Benchmark-job Commands (alias: `bmj`)
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@
"ink-link": "5.0.0",
"ink-spinner": "5.0.0",
"ink-text-input": "6.0.0",
"nanotar": "^0.3.0",
"react": "19.2.0",
"tar-stream": "3.1.7",
"yaml": "2.8.3",
"zustand": "5.0.10"
},
Expand Down Expand Up @@ -128,6 +128,7 @@
"@types/jest": "29.5.14",
"@types/node": "22.19.7",
"@types/react": "19.2.10",
"@types/tar-stream": "3.1.4",
"@typescript-eslint/eslint-plugin": "8.54.0",
"@typescript-eslint/parser": "8.54.0",
"esbuild": "0.27.2",
Expand Down
88 changes: 80 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions src/commands/agent/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ interface CreateOptions {
ref?: string;
objectId?: string;
setupCommands?: string[];
public?: boolean;
output?: string;
}

Expand Down Expand Up @@ -105,7 +104,6 @@ export async function createAgentCommand(
const agent = await createAgent({
name: options.name,
...(options.agentVersion ? { version: options.agentVersion } : {}),
...(options.public ? { is_public: true } : {}),
source: { type: sourceType, [sourceType]: sourceOptions },
});

Expand Down
2 changes: 1 addition & 1 deletion src/commands/agent/show.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export async function showAgentCommand(
): Promise<void> {
try {
const agent = await resolveAgent(idOrName);
output(agent, { format: options.output, defaultFormat: "text" });
output(agent, { format: options.output, defaultFormat: "json" });
} catch (error) {
outputError("Failed to get agent", error);
}
Expand Down
26 changes: 26 additions & 0 deletions src/commands/axon/events.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* List axon events command
*/

import { listAxonEvents as listAxonEventsService } from "../../services/axonService.js";
import { output, outputError, parseLimit } from "../../utils/output.js";

interface EventsOptions {
limit?: string;
output?: string;
}

export async function listAxonEventsCommand(
axonId: string,
options: EventsOptions,
): Promise<void> {
try {
const parsed = parseLimit(options.limit);
const limit = parsed === Infinity ? 50 : parsed;
const result = await listAxonEventsService(axonId, { limit });

output(result.events, { format: options.output, defaultFormat: "json" });
} catch (error) {
outputError("Failed to get axon events", error);
}
}
48 changes: 0 additions & 48 deletions src/commands/axon/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import React from "react";
import { Box, Text, useInput, useApp } from "ink";
import figures from "figures";
import chalk from "chalk";
import { formatTimeAgo } from "../../components/ResourceListView.js";
import { listActiveAxons, type Axon } from "../../services/axonService.js";
import { output, outputError, parseLimit } from "../../utils/output.js";
Expand Down Expand Up @@ -34,45 +33,6 @@

const CLI_PAGE_SIZE = 100;

function printTable(axons: Axon[]): void {
if (axons.length === 0) {
console.log(chalk.dim("No active axons found"));
return;
}

const COL_ID = 34;
const COL_NAME = 28;
const COL_CREATED = 12;

const header =
"ID".padEnd(COL_ID) +
" " +
"NAME".padEnd(COL_NAME) +
" " +
"CREATED".padEnd(COL_CREATED);
console.log(chalk.bold(header));
console.log(chalk.dim("─".repeat(header.length)));

for (const axon of axons) {
const id =
axon.id.length > COL_ID ? axon.id.slice(0, COL_ID - 1) + "…" : axon.id;
const nameRaw = axon.name ?? "";
const name =
nameRaw.length > COL_NAME
? nameRaw.slice(0, COL_NAME - 1) + "…"
: nameRaw;
const created = formatTimeAgo(axon.created_at_ms);
console.log(
`${id.padEnd(COL_ID)} ${name.padEnd(COL_NAME)} ${created.padEnd(COL_CREATED)}`,
);
}

console.log();
console.log(
chalk.dim(`${axons.length} axon${axons.length !== 1 ? "s" : ""}`),
);
}

export async function listAxonsCommand(options: ListOptions): Promise<void> {
try {
const maxResults = parseLimit(options.limit);
Expand All @@ -82,19 +42,11 @@

if (options.startingAfter) {
const pageLimit = maxResults === Infinity ? CLI_PAGE_SIZE : maxResults;
const { axons: page, hasMore } = await listActiveAxons({

Check warning on line 45 in src/commands/axon/list.tsx

View workflow job for this annotation

GitHub Actions / lint

'hasMore' is assigned a value but never used. Allowed unused vars must match /^_/u
limit: pageLimit,
startingAfter: options.startingAfter,
});
axons = page;
if (format === "text" && hasMore && axons.length > 0) {
console.log(
chalk.dim(
"More results may be available; use --starting-after with the last ID to continue.",
),
);
console.log();
}
} else {
const all: Axon[] = [];
let cursor: string | undefined;
Expand Down Expand Up @@ -188,7 +140,7 @@
totalCount,
nextPage,
prevPage,
refresh,

Check warning on line 143 in src/commands/axon/list.tsx

View workflow job for this annotation

GitHub Actions / lint

'refresh' is assigned a value but never used. Allowed unused vars must match /^_/u
} = useCursorPagination({
fetchPage,
pageSize: PAGE_SIZE,
Expand Down
Loading
Loading