@openagentpack/cli 0.2.0-beta-ddef91c-20260720 → 0.2.0-beta.0
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.
package/dist/bin/agents.js
CHANGED
|
@@ -1327,9 +1327,6 @@ function renderCollectedEvents(result, json) {
|
|
|
1327
1327
|
renderTerminalStatus(result.terminalStatus, json);
|
|
1328
1328
|
}
|
|
1329
1329
|
}
|
|
1330
|
-
function shouldStreamSession(options) {
|
|
1331
|
-
return options.stream === true && options.noStream !== true;
|
|
1332
|
-
}
|
|
1333
1330
|
async function sessionRunCommand(promptOrAgent, promptOrOptions, maybeOptions) {
|
|
1334
1331
|
const hasPositionalAgent = typeof promptOrOptions === "string";
|
|
1335
1332
|
const positionalAgent = hasPositionalAgent ? promptOrAgent : void 0;
|
|
@@ -1351,26 +1348,25 @@ async function sessionRunCommand(promptOrAgent, promptOrOptions, maybeOptions) {
|
|
|
1351
1348
|
title: options.title
|
|
1352
1349
|
};
|
|
1353
1350
|
const ctx = await buildCliRuntime(options.file);
|
|
1354
|
-
const
|
|
1355
|
-
const run = stream ? await startSessionRun(ctx, prompt, runOptions) : await startSessionRunPolling(ctx, prompt, runOptions);
|
|
1351
|
+
const run = options.noStream ? await startSessionRunPolling(ctx, prompt, runOptions) : await startSessionRun(ctx, prompt, runOptions);
|
|
1356
1352
|
const session = run.session;
|
|
1357
1353
|
if (!options.json) {
|
|
1358
1354
|
log.success(`Session created: ${chalk9.bold(session.id)}`);
|
|
1359
1355
|
}
|
|
1360
|
-
if (
|
|
1361
|
-
await streamAndRender(run.events, !!options.json);
|
|
1362
|
-
} else {
|
|
1356
|
+
if (options.noStream) {
|
|
1363
1357
|
renderCollectedEvents(run, !!options.json);
|
|
1358
|
+
} else {
|
|
1359
|
+
await streamAndRender(run.events, !!options.json);
|
|
1364
1360
|
}
|
|
1365
1361
|
}
|
|
1366
1362
|
async function sessionSendCommand(sessionId, message, options) {
|
|
1367
1363
|
const ctx = await buildCliRuntime(options.file);
|
|
1368
|
-
if (
|
|
1369
|
-
const events = await sendSessionMessageStreaming(ctx, sessionId, message, { provider: options.provider });
|
|
1370
|
-
await streamAndRender(events, !!options.json);
|
|
1371
|
-
} else {
|
|
1364
|
+
if (options.noStream) {
|
|
1372
1365
|
const result = await sendSessionMessagePolling(ctx, sessionId, message, { provider: options.provider });
|
|
1373
1366
|
renderCollectedEvents(result, !!options.json);
|
|
1367
|
+
} else {
|
|
1368
|
+
const events = await sendSessionMessageStreaming(ctx, sessionId, message, { provider: options.provider });
|
|
1369
|
+
await streamAndRender(events, !!options.json);
|
|
1374
1370
|
}
|
|
1375
1371
|
}
|
|
1376
1372
|
async function sessionEventsCommand(sessionId, options) {
|
|
@@ -1851,8 +1847,8 @@ sessionCmd.command("create [agent-name]").description("Create a new session for
|
|
|
1851
1847
|
sessionCmd.command("list").description("List sessions from the provider").addOption(configFileOption()).option("--agent <name>", "Filter by agent name").option("--all", "Fetch all pages by following the cursor").addOption(providerOption("Target provider")).action(withResolvedConfigFile(sessionListCommand));
|
|
1852
1848
|
sessionCmd.command("get <session-id>").description("Get details of a session").addOption(configFileOption()).addOption(providerOption("Target provider")).action(withResolvedConfigFile(sessionGetCommand));
|
|
1853
1849
|
sessionCmd.command("delete <session-id>").description("Delete a session").addOption(configFileOption()).addOption(providerOption("Target provider")).action(withResolvedConfigFile(sessionDeleteCommand));
|
|
1854
|
-
sessionCmd.command("run <prompt-or-agent> [prompt]").description("Create a session, send a message, and
|
|
1855
|
-
sessionCmd.command("send <session-id> <message>").description("Send a message to an existing session and
|
|
1850
|
+
sessionCmd.command("run <prompt-or-agent> [prompt]").description("Create a session, send a message, and stream the response").addOption(configFileOption()).option("--agent <name>", "Agent name (auto-detected when only one agent is configured)").option("--identity-id <id>", "Override the configured Qoder Forward Identity").option("--environment <name>", "Override agent's declared environment").option("--environment-id <id>", "Use an explicit remote environment id instead of the configured one").option("--tunnel <name>", "Override agent's declared tunnel").option("--tunnel-id <id>", "Use an explicit remote tunnel id instead of the configured one").option("--vault <name>", "Override agent's declared vault").option("--memory-stores <names>", "Override agent's declared memory stores (comma-separated)").option("--title <title>", "Session title").addOption(providerOption("Target provider")).option("--json", "Output events as JSONL").option("--no-stream", "Use polling instead of SSE streaming").action(withResolvedConfigFile(sessionRunCommand));
|
|
1851
|
+
sessionCmd.command("send <session-id> <message>").description("Send a message to an existing session and stream the response").addOption(configFileOption()).addOption(providerOption("Target provider")).option("--json", "Output events as JSONL").option("--no-stream", "Use polling instead of SSE streaming").action(withResolvedConfigFile(sessionSendCommand));
|
|
1856
1852
|
sessionCmd.command("events <session-id>").description("List event history for a session").addOption(configFileOption()).addOption(providerOption("Target provider")).addOption(new Option2("--limit <count>", "Maximum number of events to fetch").argParser(parsePositiveInteger)).option("--all", "Fetch all pages by following the cursor").option("--json", "Output as JSON").action(withResolvedConfigFile(sessionEventsCommand));
|
|
1857
1853
|
var deploymentCmd = program.command("deployment").description("Manage agent deployments (scheduled / triggered runs)");
|
|
1858
1854
|
deploymentCmd.command("list").description("List deployments tracked in state").addOption(configFileOption()).addOption(providerOption("Filter by provider")).action(withResolvedConfigFile(deploymentListCommand));
|
package/dist/src/program.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openagentpack/cli",
|
|
3
|
-
"version": "0.2.0-beta
|
|
3
|
+
"version": "0.2.0-beta.0",
|
|
4
4
|
"description": "Open Agent Pack — Declaratively manage AI agent infrastructure",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"typecheck": "tsc --noEmit"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@openagentpack/playground": "0.2.0-beta
|
|
52
|
+
"@openagentpack/playground": "0.2.0-beta.0",
|
|
53
53
|
"@types/bun": "^1.3.14",
|
|
54
54
|
"typescript": "^6.0.3"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@openagentpack/sdk": "0.2.0-beta
|
|
57
|
+
"@openagentpack/sdk": "0.2.0-beta.0",
|
|
58
58
|
"@clack/prompts": "^1.5.1",
|
|
59
59
|
"chalk": "^5.6.2",
|
|
60
60
|
"commander": "^14.0.3",
|