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.
- package/{agentEmailCommands-NFXKPSBA.js → agentEmailCommands-LW5JMYH2.js} +1 -1
- package/{agentListCommands-IYXFYVYR.js → agentListCommands-LGZG2OQR.js} +8 -0
- package/{agentRecordCommands-B3AUVK74.js → agentRecordCommands-W5ZXPHZV.js} +1 -1
- package/{chunk-KT3TUKD2.js → chunk-L6RB42ZR.js} +15 -0
- package/{commandRegistry-O4L5BBUZ.js → commandRegistry-DETYXF5I.js} +8 -8
- package/index.js +1 -1
- package/package.json +1 -1
|
@@ -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
|
`);
|
|
@@ -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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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 = {
|