nolo-cli 0.142.0-alpha.1 → 0.143.0-alpha.1

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.
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-AAROOKLX.js";
5
5
  import {
6
6
  runAgentCreateCommand
7
- } from "./chunk-KT3TUKD2.js";
7
+ } from "./chunk-L6RB42ZR.js";
8
8
  import "./chunk-U4STABYN.js";
9
9
  import {
10
10
  positionalArgs,
@@ -368,6 +368,14 @@ async function runAgentListCommand(args, deps = {}) {
368
368
  if (unavailableCount > 0 && !showUnavailable) {
369
369
  output.write(`\u26D4 ${unavailableCount} agent(s) temporarily unavailable (429) hidden. Use --show-unavailable to list them.
370
370
  `);
371
+ const unavailableList = agents.filter((agent) => isAgentUnavailableNow(agent));
372
+ for (const unavail of unavailableList) {
373
+ const remainingSec = Math.max(0, Math.ceil(((unavail.nextAvailableAt ?? 0) - Date.now()) / 1e3));
374
+ const quotaSummary = formatQuotaSummary(unavail.quota);
375
+ const quotaText = quotaSummary ? ` (${quotaSummary})` : "";
376
+ output.write(` - [429 \u9650\u6D41] ${unavail.name} (id: ${unavail.id}) \u9884\u8BA1 ${remainingSec} \u79D2\u540E\u6062\u590D${quotaText}
377
+ `);
378
+ }
371
379
  }
372
380
  output.write(`source: ${source}
373
381
  `);
@@ -2,7 +2,7 @@ import {
2
2
  runAgentCreateCommand,
3
3
  runAgentReadCommand,
4
4
  runAgentUpdateCommand
5
- } from "./chunk-KT3TUKD2.js";
5
+ } from "./chunk-L6RB42ZR.js";
6
6
  import "./chunk-U4STABYN.js";
7
7
  import "./chunk-ZOI6KA4N.js";
8
8
  import "./chunk-QDT5T7MK.js";
@@ -4,6 +4,9 @@ import {
4
4
  import {
5
5
  clearCliLocalRuntimePreparedAgentCache
6
6
  } from "./chunk-ZOI6KA4N.js";
7
+ import {
8
+ readCredentialAvailability
9
+ } from "./chunk-62IL3KQV.js";
7
10
  import {
8
11
  getReadableCliDb
9
12
  } from "./chunk-CTUQJVQM.js";
@@ -81,8 +84,20 @@ async function runAgentReadCommand(args, deps = {}) {
81
84
  fetchImpl
82
85
  }) : {};
83
86
  const quota = fresh[result.agentKey] ?? recordQuota;
87
+ const rawRecordObj = result.record;
88
+ const credAvail = await readCredentialAvailability(env).catch(() => ({}));
89
+ const credGroup = typeof rawRecordObj?.apiKeyRef === "string" ? rawRecordObj.apiKeyRef : void 0;
90
+ const credDeadline = credGroup ? credAvail[credGroup] : void 0;
91
+ const recordDeadline = typeof rawRecordObj?.nextAvailableAt === "number" ? rawRecordObj.nextAvailableAt : void 0;
92
+ const effectiveNextAvailableAt = Math.max(recordDeadline ?? 0, credDeadline ?? 0) || void 0;
93
+ const isRateLimited = typeof effectiveNextAvailableAt === "number" && effectiveNextAvailableAt > Date.now();
84
94
  output.write(JSON.stringify({
85
95
  ...normalizeAgentRecordForOutput(result.agentKey, authToken, result.record),
96
+ ...isRateLimited ? {
97
+ rateLimited: true,
98
+ cooldownRemainingSeconds: Math.ceil((effectiveNextAvailableAt - Date.now()) / 1e3),
99
+ nextAvailableAt: new Date(effectiveNextAvailableAt).toISOString()
100
+ } : {},
86
101
  ...quota ? { quota } : {},
87
102
  source: result.source
88
103
  }, null, 2));
@@ -115,11 +115,11 @@ function getAgentInternalCommandEntries() {
115
115
  createAgentRunCommand(["run"], "Run a no-login local agent in this workspace"),
116
116
  createAgentRunCommand(["chat"], "Chat with an agent"),
117
117
  createEnvCommand(["agent", "list"], "List owned agents", async (args, deps) => {
118
- const { runAgentListCommand } = await import("./agentListCommands-IYXFYVYR.js");
118
+ const { runAgentListCommand } = await import("./agentListCommands-LGZG2OQR.js");
119
119
  return runAgentListCommand(args, deps);
120
120
  }),
121
121
  createEnvCommand(["agent", "create"], "Create a new agent", async (args, deps) => {
122
- const { runAgentCreateCommand } = await import("./agentRecordCommands-B3AUVK74.js");
122
+ const { runAgentCreateCommand } = await import("./agentRecordCommands-W5ZXPHZV.js");
123
123
  return runAgentCreateCommand(args, deps);
124
124
  }),
125
125
  createEnvCommand(["agent", "models"], "List models available on an OpenAI-compatible provider", async (args, deps) => {
@@ -135,7 +135,7 @@ function getAgentInternalCommandEntries() {
135
135
  return runAgentPullCommand(args, deps);
136
136
  }),
137
137
  createEnvCommand(["agent", "read"], "Read a single agent", async (args, deps) => {
138
- const { runAgentReadCommand } = await import("./agentRecordCommands-B3AUVK74.js");
138
+ const { runAgentReadCommand } = await import("./agentRecordCommands-W5ZXPHZV.js");
139
139
  return runAgentReadCommand(args, deps);
140
140
  }),
141
141
  createAgentRunCommand(["agent", "run"], "Run an agent"),
@@ -164,26 +164,26 @@ function getAgentInternalCommandEntries() {
164
164
  return runSetupOfflineMarxistsAgentCommand(args, deps);
165
165
  }),
166
166
  createEnvCommand(["agent", "update"], "Update agent fields", async (args, deps) => {
167
- const { runAgentUpdateCommand } = await import("./agentRecordCommands-B3AUVK74.js");
167
+ const { runAgentUpdateCommand } = await import("./agentRecordCommands-W5ZXPHZV.js");
168
168
  return runAgentUpdateCommand(args, deps);
169
169
  }),
170
170
  createEnvCommand(["agent", "email", "provision"], "Provision a controlled inbox for an agent", async (args, deps) => {
171
- const { runAgentEmailProvisionCommand } = await import("./agentEmailCommands-NFXKPSBA.js");
171
+ const { runAgentEmailProvisionCommand } = await import("./agentEmailCommands-LW5JMYH2.js");
172
172
  return runAgentEmailProvisionCommand(args, deps);
173
173
  }),
174
174
  createEnvCommand(["agent", "email", "bind"], "Bind an existing email address to an agent", async (args, deps) => {
175
- const { runAgentEmailBindCommand } = await import("./agentEmailCommands-NFXKPSBA.js");
175
+ const { runAgentEmailBindCommand } = await import("./agentEmailCommands-LW5JMYH2.js");
176
176
  return runAgentEmailBindCommand(args, deps);
177
177
  }),
178
178
  createEnvCommand(["agent", "email", "transfer"], "Transfer an email identity from one agent to another (cross-account)", async (args, deps) => {
179
- const { runAgentEmailTransferCommand } = await import("./agentEmailCommands-NFXKPSBA.js");
179
+ const { runAgentEmailTransferCommand } = await import("./agentEmailCommands-LW5JMYH2.js");
180
180
  return runAgentEmailTransferCommand(args, deps);
181
181
  }),
182
182
  createEnvCommand(
183
183
  ["agent", "email", "create-and-provision"],
184
184
  "Create an agent and provision its controlled inbox",
185
185
  async (args, deps) => {
186
- const { runAgentEmailCreateAndProvisionCommand } = await import("./agentEmailCommands-NFXKPSBA.js");
186
+ const { runAgentEmailCreateAndProvisionCommand } = await import("./agentEmailCommands-LW5JMYH2.js");
187
187
  return runAgentEmailCreateAndProvisionCommand(args, deps);
188
188
  }
189
189
  ),
package/index.js CHANGED
@@ -81,7 +81,7 @@ async function launchTuiWorkspace(args2) {
81
81
  });
82
82
  }
83
83
  async function main() {
84
- const { createCliRuntimeContext, looksLikeDaemonShortcut, renderHelpText, resolveCommand, runResolvedCommand } = await import("./commandRegistry-O4L5BBUZ.js");
84
+ const { createCliRuntimeContext, looksLikeDaemonShortcut, renderHelpText, resolveCommand, runResolvedCommand } = await import("./commandRegistry-DETYXF5I.js");
85
85
  const { buildCliRuntimeEnv, loadProfileConfig } = await import("./profileConfig-ZGOFORWV.js");
86
86
  const { resolveTuiLaunchMode } = await import("./runtimeModeArgs-2Y7BALTO.js");
87
87
  const runtimeEnv = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nolo-cli",
3
- "version": "0.142.0-alpha.1",
3
+ "version": "0.143.0-alpha.1",
4
4
  "type": "module",
5
5
  "description": "Agent-first terminal workspace for Nolo",
6
6
  "bin": {