@lazehq/cli 0.1.69 → 0.1.70
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/laze.mjs +189 -94
- package/package.json +1 -1
package/dist/laze.mjs
CHANGED
|
@@ -36927,7 +36927,7 @@ function flagText({
|
|
|
36927
36927
|
}
|
|
36928
36928
|
|
|
36929
36929
|
// src/rules/cli-version.rules.ts
|
|
36930
|
-
var STAMPED = "0.1.
|
|
36930
|
+
var STAMPED = "0.1.70";
|
|
36931
36931
|
function cliVersionOf({ stamped = STAMPED } = {}) {
|
|
36932
36932
|
return stamped.startsWith("__") ? "dev" : stamped;
|
|
36933
36933
|
}
|
|
@@ -59548,7 +59548,9 @@ var layoutPartSchemaDefinition = external_exports.union([
|
|
|
59548
59548
|
]);
|
|
59549
59549
|
var messageLayoutSchemaDefinition = external_exports.object({
|
|
59550
59550
|
/** No parts means the source drew only its text: no layout is kept. */
|
|
59551
|
-
parts: external_exports.array(layoutPartSchemaDefinition).max(LAYOUT_BLOCKS_MAX)
|
|
59551
|
+
parts: external_exports.array(layoutPartSchemaDefinition).max(LAYOUT_BLOCKS_MAX),
|
|
59552
|
+
/** Served only: each https image on a host the page does not allow, to its signed address. */
|
|
59553
|
+
images: external_exports.record(external_exports.string().max(2e3), external_exports.string().max(5e3)).optional()
|
|
59552
59554
|
});
|
|
59553
59555
|
var messageLayoutSchema = messageLayoutSchemaDefinition;
|
|
59554
59556
|
|
|
@@ -60205,6 +60207,8 @@ var messageSchemaDefinition = external_exports.object({
|
|
|
60205
60207
|
forward: messageForwardSchemaDefinition.nullable().optional(),
|
|
60206
60208
|
/** The blocks and attachments a mirrored message's source drew; clients draw it for the body. */
|
|
60207
60209
|
layout: messageLayoutSchema.nullable().optional(),
|
|
60210
|
+
/** Each https body image and outside author picture the page cannot load, to its Laze address. */
|
|
60211
|
+
images: external_exports.record(external_exports.string().max(2e3), external_exports.string().max(5e3)).optional(),
|
|
60208
60212
|
/** A message written in Laze that its mirror is still waiting to send, or could not send. */
|
|
60209
60213
|
mirrorDelivery: mirrorDeliverySchema.nullable().optional(),
|
|
60210
60214
|
/** A thread reply also sent to its conversation: it shows in the thread and the channel. */
|
|
@@ -62188,6 +62192,13 @@ function withSlackMarkupAsText(text3) {
|
|
|
62188
62192
|
return withSlackPeopleAsNames(text3).replace(SLACK_DATE_TOKEN, "$1").replace(ANGLE_LINK, (_link, address, label3) => label3 ?? address);
|
|
62189
62193
|
}
|
|
62190
62194
|
|
|
62195
|
+
// ../../modules/chat/contract/src/chat.images.ts
|
|
62196
|
+
var externalImageParamsSchemaDefinition = external_exports.object({ workspaceId: external_exports.string().min(1).max(64) });
|
|
62197
|
+
var externalImageQuerySchemaDefinition = external_exports.object({
|
|
62198
|
+
u: external_exports.string().min(1).max(2e3),
|
|
62199
|
+
sig: external_exports.string().max(100).default("")
|
|
62200
|
+
});
|
|
62201
|
+
|
|
62191
62202
|
// ../../modules/vault/contract/src/resolution-note.ts
|
|
62192
62203
|
var RESOLUTION_NOTE_INPUT_MAX_CHARS = 4e3;
|
|
62193
62204
|
function cleanResolutionNote(text3) {
|
|
@@ -63381,6 +63392,8 @@ var vaultApprovalResolvedPayloadSchemaDefinition = external_exports.object({
|
|
|
63381
63392
|
endedWithTurn: external_exports.boolean().optional(),
|
|
63382
63393
|
/** A task card: its Allow covered the rest of the agent's turn. */
|
|
63383
63394
|
coversTask: external_exports.boolean().optional(),
|
|
63395
|
+
/** Settled by another card's Allow for this agent, whose lease now covers this ask too. */
|
|
63396
|
+
coveredByLease: external_exports.boolean().optional(),
|
|
63384
63397
|
/** Who decides the card, so their open approvals lists refresh. */
|
|
63385
63398
|
approverUserIds: external_exports.array(external_exports.string()).readonly().default([])
|
|
63386
63399
|
});
|
|
@@ -68125,7 +68138,7 @@ var lazeChangeSchemaDefinition = external_exports.object({
|
|
|
68125
68138
|
// ../../modules/agent/contract/src/agent.config.ts
|
|
68126
68139
|
var positiveInt3 = external_exports.coerce.number().int().positive();
|
|
68127
68140
|
var agentConfig = Config.define((c) => ({
|
|
68128
|
-
/** Agent
|
|
68141
|
+
/** Agent messages in a row, each within 10 minutes of the last, before agents stop waking. */
|
|
68129
68142
|
hopLimit: c.env("AGENT_HOP_LIMIT", positiveInt3.default(12)),
|
|
68130
68143
|
/** The gateway's Anthropic-compatible root Claude Code reaches for a Laze model. */
|
|
68131
68144
|
claudeGatewayUrl: c.env(
|
|
@@ -68149,6 +68162,8 @@ var agentConfig = Config.define((c) => ({
|
|
|
68149
68162
|
"AGENT_CLAUDE_GATEWAY_THINKING",
|
|
68150
68163
|
external_exports.enum(["on", "off"]).default("on")
|
|
68151
68164
|
),
|
|
68165
|
+
/** Where the inbox watchdog writes its progress board card; unset, it only logs. */
|
|
68166
|
+
opsAlertDir: c.env("AGENT_OPS_ALERT_DIR", external_exports.string().min(1).optional()),
|
|
68152
68167
|
/** A harness prompt or question no one answers is denied or dismissed after this long. */
|
|
68153
68168
|
attentionTimeoutMinutes: c.env("AGENT_ATTENTION_TIMEOUT_MINUTES", positiveInt3.default(30)),
|
|
68154
68169
|
/** Where a GitHub signature links back; the origin the connect command fetches the CLI from. */
|
|
@@ -88202,10 +88217,65 @@ async function external({ context, args }) {
|
|
|
88202
88217
|
await command({ context, args });
|
|
88203
88218
|
}
|
|
88204
88219
|
|
|
88220
|
+
// src/services/feed-access-commands.service.ts
|
|
88221
|
+
var USAGE9 = `Usage:
|
|
88222
|
+
laze agent feed-access the agents that manage your feed
|
|
88223
|
+
laze agent feed-access <agent> on|off let one of your personal agents sort your whole feed`;
|
|
88224
|
+
var SWITCH = { on: true, off: false };
|
|
88225
|
+
function linesOf2(delegates) {
|
|
88226
|
+
if (delegates.length === 0) return "No agent manages your feed.\n";
|
|
88227
|
+
const lines2 = delegates.map((one) => `${one.agentName} ${one.agentId} since ${one.grantedAt}`);
|
|
88228
|
+
return `${lines2.join("\n")}
|
|
88229
|
+
`;
|
|
88230
|
+
}
|
|
88231
|
+
async function agentFeedAccess({
|
|
88232
|
+
context,
|
|
88233
|
+
args
|
|
88234
|
+
}) {
|
|
88235
|
+
const [agent3, state] = [args.words[2], args.words[3]];
|
|
88236
|
+
if (agent3 && !(state === "on" || state === "off")) throw new CliUsageError(USAGE9);
|
|
88237
|
+
const { client } = await signedIn({ context, args });
|
|
88238
|
+
const delegates = agent3 && (state === "on" || state === "off") ? await client.post("/api/feed/delegates", { agent: agent3, on: SWITCH[state] }) : await client.get("/api/feed/delegates");
|
|
88239
|
+
if (args.flags.json) return context.out(`${JSON.stringify(delegates, null, 2)}
|
|
88240
|
+
`);
|
|
88241
|
+
const named = delegates.find((one) => one.agentId === agent3)?.agentName ?? agent3;
|
|
88242
|
+
if (agent3) context.out(`Manage my feed is ${state} for ${named}.
|
|
88243
|
+
`);
|
|
88244
|
+
context.out(linesOf2(delegates));
|
|
88245
|
+
}
|
|
88246
|
+
|
|
88205
88247
|
// src/services/feed-commands.service.ts
|
|
88206
88248
|
import { readFile as readFile32 } from "node:fs/promises";
|
|
88207
88249
|
import { resolve as resolve15 } from "node:path";
|
|
88208
88250
|
|
|
88251
|
+
// ../../modules/feed/contract/src/feed.delegate.ts
|
|
88252
|
+
var feedDelegateSchemaDefinition = external_exports.object({
|
|
88253
|
+
agentId: external_exports.string(),
|
|
88254
|
+
agentName: external_exports.string(),
|
|
88255
|
+
grantedAt: external_exports.iso.datetime()
|
|
88256
|
+
});
|
|
88257
|
+
var feedDelegateSchema = feedDelegateSchemaDefinition;
|
|
88258
|
+
var setFeedDelegateInputSchemaDefinition = external_exports.object({
|
|
88259
|
+
workspaceId: external_exports.string().min(1),
|
|
88260
|
+
agentId: external_exports.string().min(1),
|
|
88261
|
+
on: external_exports.boolean()
|
|
88262
|
+
});
|
|
88263
|
+
var setFeedDelegateInputSchema = setFeedDelegateInputSchemaDefinition;
|
|
88264
|
+
var feedDelegateByKeyInputSchemaDefinition = external_exports.object({
|
|
88265
|
+
agent: external_exports.string().trim().min(1),
|
|
88266
|
+
on: external_exports.boolean()
|
|
88267
|
+
});
|
|
88268
|
+
var pinFeedItemInputSchemaDefinition = external_exports.object({
|
|
88269
|
+
workspaceId: external_exports.string().min(1),
|
|
88270
|
+
itemId: external_exports.string().min(1),
|
|
88271
|
+
pinned: external_exports.boolean()
|
|
88272
|
+
});
|
|
88273
|
+
var pinFeedItemInputSchema = pinFeedItemInputSchemaDefinition;
|
|
88274
|
+
var feedPinByKeyInputSchemaDefinition = external_exports.object({
|
|
88275
|
+
itemId: external_exports.string().min(1),
|
|
88276
|
+
pinned: external_exports.boolean()
|
|
88277
|
+
});
|
|
88278
|
+
|
|
88209
88279
|
// ../../modules/feed/contract/src/feed.ts
|
|
88210
88280
|
var feedAuthorSchemaDefinition = external_exports.object({
|
|
88211
88281
|
kind: external_exports.enum(["agent", "person", "system"]),
|
|
@@ -88446,7 +88516,9 @@ var feedViewerStateSchemaDefinition = external_exports.object({
|
|
|
88446
88516
|
/** On a shared item: the reader's own item they shared, or someone's item shared with them. */
|
|
88447
88517
|
shared: external_exports.enum(["by_you", "with_you"]).optional(),
|
|
88448
88518
|
/** The reader owns the item and may add or remove people on it. */
|
|
88449
|
-
mayShare: external_exports.boolean().optional()
|
|
88519
|
+
mayShare: external_exports.boolean().optional(),
|
|
88520
|
+
/** Pinned first in the reader's open cards, by them or the agent managing their feed. */
|
|
88521
|
+
pinned: external_exports.boolean().optional()
|
|
88450
88522
|
});
|
|
88451
88523
|
var feedViewerStateSchema = feedViewerStateSchemaDefinition;
|
|
88452
88524
|
var feedAssigneeSchemaDefinition = external_exports.object({
|
|
@@ -88752,12 +88824,13 @@ var feedFileLinkInputSchemaDefinition = external_exports.object({
|
|
|
88752
88824
|
var feedFileLinkInputSchema = feedFileLinkInputSchemaDefinition;
|
|
88753
88825
|
var feedFileLinkSchemaDefinition = external_exports.object({ url: external_exports.string(), expiresAt: external_exports.iso.datetime() });
|
|
88754
88826
|
var feedFileLinkSchema = feedFileLinkSchemaDefinition;
|
|
88755
|
-
var feedTrpc = defineTrpcContract("feed").query("channelItems").withInput(external_exports.object({ workspaceId: external_exports.string().min(1), channelId: external_exports.string().min(1) })).withOutput(external_exports.array(feedAgentItemSchema)).query("list").withInput(listFeedInputSchema).withOutput(feedViewSchema).query("card").withInput(itemRef).withOutput(feedCardViewSchema).query("fileLink").withInput(feedFileLinkInputSchema).withOutput(feedFileLinkSchema).query("count").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(external_exports.object({ count: external_exports.number().int().nonnegative() })).query("decisions").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(feedDecisionsSchema).mutation("act").withInput(actFeedItemInputSchema).withOutput(feedItemSchema).mutation("comment").withInput(commentFeedItemInputSchema).withOutput(feedItemSchema).mutation("done").withInput(itemRef).withOutput(feedItemSchema).mutation("stopAutoSend").withInput(itemRef).withOutput(feedItemSchema).mutation("putBack").withInput(putBackFeedItemInputSchema).withOutput(feedItemSchema).mutation("snooze").withInput(snoozeFeedItemInputSchema).withOutput(feedItemSchema).mutation("unsnooze").withInput(itemRef).withOutput(feedItemSchema).mutation("saveDraft").withInput(saveFeedDraftInputSchema).withOutput(feedItemSchema).mutation("editItem").withInput(editFeedItemInputSchema).withOutput(feedItemSchema).mutation("saveMessage").withInput(saveFeedMessageInputSchema).withOutput(feedItemSchema).mutation("share").withInput(shareFeedItemInputSchema).withOutput(feedShareAnswerSchema).mutation("unshare").withInput(unshareFeedItemInputSchema).withOutput(feedShareAnswerSchema).query("shareCandidates").withInput(itemRef).withOutput(external_exports.array(feedSharePersonSchema)).mutation("answerApproval").withInput(answerFeedApprovalInputSchema).withOutput(feedItemSchema).mutation("decidePublish").withInput(decideFeedPublishInputSchema).withOutput(feedItemSchema).mutation("decideAccess").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideServer").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideAppAccess").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideComputer").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideAgentJoin").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideAgentTransfer").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).build();
|
|
88827
|
+
var feedTrpc = defineTrpcContract("feed").query("channelItems").withInput(external_exports.object({ workspaceId: external_exports.string().min(1), channelId: external_exports.string().min(1) })).withOutput(external_exports.array(feedAgentItemSchema)).query("list").withInput(listFeedInputSchema).withOutput(feedViewSchema).query("card").withInput(itemRef).withOutput(feedCardViewSchema).query("fileLink").withInput(feedFileLinkInputSchema).withOutput(feedFileLinkSchema).query("count").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(external_exports.object({ count: external_exports.number().int().nonnegative() })).query("decisions").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(feedDecisionsSchema).mutation("act").withInput(actFeedItemInputSchema).withOutput(feedItemSchema).mutation("comment").withInput(commentFeedItemInputSchema).withOutput(feedItemSchema).mutation("done").withInput(itemRef).withOutput(feedItemSchema).mutation("stopAutoSend").withInput(itemRef).withOutput(feedItemSchema).mutation("putBack").withInput(putBackFeedItemInputSchema).withOutput(feedItemSchema).mutation("snooze").withInput(snoozeFeedItemInputSchema).withOutput(feedItemSchema).mutation("unsnooze").withInput(itemRef).withOutput(feedItemSchema).mutation("saveDraft").withInput(saveFeedDraftInputSchema).withOutput(feedItemSchema).mutation("editItem").withInput(editFeedItemInputSchema).withOutput(feedItemSchema).mutation("saveMessage").withInput(saveFeedMessageInputSchema).withOutput(feedItemSchema).mutation("share").withInput(shareFeedItemInputSchema).withOutput(feedShareAnswerSchema).mutation("unshare").withInput(unshareFeedItemInputSchema).withOutput(feedShareAnswerSchema).query("shareCandidates").withInput(itemRef).withOutput(external_exports.array(feedSharePersonSchema)).mutation("answerApproval").withInput(answerFeedApprovalInputSchema).withOutput(feedItemSchema).mutation("decidePublish").withInput(decideFeedPublishInputSchema).withOutput(feedItemSchema).mutation("decideAccess").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideServer").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideAppAccess").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideComputer").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideAgentJoin").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideAgentTransfer").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("pin").withInput(pinFeedItemInputSchema).withOutput(feedItemSchema).query("delegates").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(external_exports.array(feedDelegateSchema)).mutation("setDelegate").withInput(setFeedDelegateInputSchema).withOutput(external_exports.array(feedDelegateSchema)).build();
|
|
88756
88828
|
var feedUi = uiTokens("feed");
|
|
88757
88829
|
var FeedNavSlot = feedUi.component("nav");
|
|
88758
88830
|
var FeedDecisionsSlot = feedUi.component("decisions");
|
|
88759
88831
|
var FeedCountHooksToken = feedUi.hooks("count");
|
|
88760
88832
|
var FeedChannelCardSlot = feedUi.component("channel-card");
|
|
88833
|
+
var FeedDelegateSlot = feedUi.component("delegate");
|
|
88761
88834
|
var FeedSearchSlot = feedUi.component("search");
|
|
88762
88835
|
|
|
88763
88836
|
// ../../modules/feed/contract/src/feed.events.ts
|
|
@@ -89034,7 +89107,7 @@ async function feedAttachmentIdsOf({
|
|
|
89034
89107
|
}
|
|
89035
89108
|
|
|
89036
89109
|
// src/services/feed-commands.service.ts
|
|
89037
|
-
var
|
|
89110
|
+
var USAGE10 = `Usage:
|
|
89038
89111
|
laze feed post <title> [--channel <channel>] [--tag <tag>] [--summary <line>]
|
|
89039
89112
|
[--draft <text|@file>] [--draft-header "To: ...\\nRe: ..."]
|
|
89040
89113
|
[--metric <json|@file.json> | --table <csv|@file.csv>]
|
|
@@ -89062,10 +89135,16 @@ var USAGE9 = `Usage:
|
|
|
89062
89135
|
laze feed decisions [--json]
|
|
89063
89136
|
laze feed act <id> <actionId> [--draft <text|@file>]
|
|
89064
89137
|
laze feed comment <id> <text> [--draft <text|@file>] [--force]
|
|
89065
|
-
laze feed done|put-back|unsnooze <id>
|
|
89138
|
+
laze feed done|put-back|unsnooze|pin|unpin <id>
|
|
89066
89139
|
laze feed snooze <id> --until <ISO time>
|
|
89067
89140
|
laze feed channel <channelId>
|
|
89068
89141
|
|
|
89142
|
+
Managing your owner's feed: when your owner turned on Manage my feed for you (in your settings,
|
|
89143
|
+
or laze agent feed-access <you> on), laze feed list, count, decisions, done, put-back, snooze,
|
|
89144
|
+
unsnooze, pin and unpin work on their whole feed, cards from every agent included. Close what
|
|
89145
|
+
is stale, snooze what can wait, pin what matters. You never press actions, comment or answer
|
|
89146
|
+
approvals there: those stay your owner's. Each change shows on the card as yours.
|
|
89147
|
+
|
|
89069
89148
|
${FEED_WRITING}`;
|
|
89070
89149
|
function flagsOf(args) {
|
|
89071
89150
|
try {
|
|
@@ -89130,7 +89209,7 @@ function printItem({
|
|
|
89130
89209
|
}
|
|
89131
89210
|
async function feedPost({ context, args }) {
|
|
89132
89211
|
const title = args.words.slice(2).join(" ").trim();
|
|
89133
|
-
if (!title) throw new CliUsageError(
|
|
89212
|
+
if (!title) throw new CliUsageError(USAGE10);
|
|
89134
89213
|
const flags2 = flagsOf(args);
|
|
89135
89214
|
const { client } = await signedIn({ context, args });
|
|
89136
89215
|
const channel = flagText({ args, name: "channel" });
|
|
@@ -89153,7 +89232,7 @@ async function feedPost({ context, args }) {
|
|
|
89153
89232
|
}
|
|
89154
89233
|
async function feedUpdate({ context, args }) {
|
|
89155
89234
|
const itemId = args.words[2];
|
|
89156
|
-
if (!itemId) throw new CliUsageError(
|
|
89235
|
+
if (!itemId) throw new CliUsageError(USAGE10);
|
|
89157
89236
|
const flags2 = flagsOf(args);
|
|
89158
89237
|
const { client } = await signedIn({ context, args });
|
|
89159
89238
|
const body = await bodyOf2({ context, flags: flags2 });
|
|
@@ -89192,7 +89271,7 @@ async function feedUpdate({ context, args }) {
|
|
|
89192
89271
|
async function feedReply({ context, args }) {
|
|
89193
89272
|
const itemId = args.words[2];
|
|
89194
89273
|
const text3 = args.words.slice(3).join(" ").trim();
|
|
89195
|
-
if (!itemId || !text3) throw new CliUsageError(
|
|
89274
|
+
if (!itemId || !text3) throw new CliUsageError(USAGE10);
|
|
89196
89275
|
const { client } = await signedIn({ context, args });
|
|
89197
89276
|
const replied = await client.post("/api/feed/items/reply", {
|
|
89198
89277
|
itemId,
|
|
@@ -89205,7 +89284,7 @@ async function feedReply({ context, args }) {
|
|
|
89205
89284
|
}
|
|
89206
89285
|
async function feedRead({ context, args }) {
|
|
89207
89286
|
const itemId = args.words[2];
|
|
89208
|
-
if (!itemId) throw new CliUsageError(
|
|
89287
|
+
if (!itemId) throw new CliUsageError(USAGE10);
|
|
89209
89288
|
const { client } = await signedIn({ context, args });
|
|
89210
89289
|
const read4 = await client.post("/api/feed/items/read", { itemId });
|
|
89211
89290
|
printItem({ context, args, item: read4 });
|
|
@@ -89224,7 +89303,7 @@ async function feedClose({ context, args }) {
|
|
|
89224
89303
|
const itemId = args.words[2];
|
|
89225
89304
|
const loop = flagText({ args, name: "loop" });
|
|
89226
89305
|
const note = flagText({ args, name: "note" });
|
|
89227
|
-
if (!note || Boolean(itemId) === Boolean(loop)) throw new CliUsageError(
|
|
89306
|
+
if (!note || Boolean(itemId) === Boolean(loop)) throw new CliUsageError(USAGE10);
|
|
89228
89307
|
const { client } = await signedIn({ context, args });
|
|
89229
89308
|
const closed = await client.post("/api/feed/items/close", {
|
|
89230
89309
|
...itemId ? { itemId } : { loop },
|
|
@@ -89239,7 +89318,7 @@ function shareCommand({ move: move3 }) {
|
|
|
89239
89318
|
const itemId = args.words[2];
|
|
89240
89319
|
const all = args.flags.all === true;
|
|
89241
89320
|
const people2 = args.lists.with ?? [];
|
|
89242
|
-
if (people2.length === 0 || Boolean(itemId) === all) throw new CliUsageError(
|
|
89321
|
+
if (people2.length === 0 || Boolean(itemId) === all) throw new CliUsageError(USAGE10);
|
|
89243
89322
|
const label3 = flagText({ args, name: "label" });
|
|
89244
89323
|
const group = flagText({ args, name: "group" });
|
|
89245
89324
|
const { client } = await signedIn({ context, args });
|
|
@@ -89282,7 +89361,7 @@ async function feedLoops({ context, args }) {
|
|
|
89282
89361
|
}
|
|
89283
89362
|
async function feedGroupSummary({ context, args }) {
|
|
89284
89363
|
const group = args.words.slice(2).join(" ").trim();
|
|
89285
|
-
if (!group) throw new CliUsageError(
|
|
89364
|
+
if (!group) throw new CliUsageError(USAGE10);
|
|
89286
89365
|
const { client } = await signedIn({ context, args });
|
|
89287
89366
|
const pointer = await client.post("/api/feed/group-summary", { group });
|
|
89288
89367
|
if (args.flags.json) return context.out(`${JSON.stringify(pointer, null, 2)}
|
|
@@ -89296,7 +89375,9 @@ var PLACES = { open: "open", coming_up: "coming up", handled: "handled" };
|
|
|
89296
89375
|
function printCard2({ context, item }) {
|
|
89297
89376
|
const when = item.me.place === "coming_up" ? ` (back ${item.me.snoozedUntil ?? item.showAt ?? ""})` : "";
|
|
89298
89377
|
const handled = item.me.place === "handled" && item.me.handledLabel;
|
|
89299
|
-
|
|
89378
|
+
const pinned = item.me.pinned ? " (pinned)" : "";
|
|
89379
|
+
const shown2 = `${item.title}${pinned}${when}${handled ? ` ${handled}` : ""}`;
|
|
89380
|
+
context.out(`${item.id} ${item.tag} ${shown2}
|
|
89300
89381
|
`);
|
|
89301
89382
|
if (item.me.place === "handled") return;
|
|
89302
89383
|
if (item.approval) context.out(" an approval: answer it in Laze\n");
|
|
@@ -89362,7 +89443,7 @@ async function feedDecisions({ context, args }) {
|
|
|
89362
89443
|
}
|
|
89363
89444
|
async function feedAct({ context, args }) {
|
|
89364
89445
|
const [itemId, actionId] = [args.words[2], args.words[3]];
|
|
89365
|
-
if (!itemId || !actionId) throw new CliUsageError(
|
|
89446
|
+
if (!itemId || !actionId) throw new CliUsageError(USAGE10);
|
|
89366
89447
|
const draft = await textFlag({ context, args, name: "draft" });
|
|
89367
89448
|
const { client } = await signedIn({ context, args });
|
|
89368
89449
|
const item = await client.post("/api/feed/mine/act", {
|
|
@@ -89375,7 +89456,7 @@ async function feedAct({ context, args }) {
|
|
|
89375
89456
|
async function feedComment({ context, args }) {
|
|
89376
89457
|
const itemId = args.words[2];
|
|
89377
89458
|
const text3 = args.words.slice(3).join(" ").trim();
|
|
89378
|
-
if (!itemId || !text3) throw new CliUsageError(
|
|
89459
|
+
if (!itemId || !text3) throw new CliUsageError(USAGE10);
|
|
89379
89460
|
const draft = await textFlag({ context, args, name: "draft" });
|
|
89380
89461
|
const { client } = await signedIn({ context, args });
|
|
89381
89462
|
const item = await client.post("/api/feed/mine/comment", {
|
|
@@ -89386,10 +89467,19 @@ async function feedComment({ context, args }) {
|
|
|
89386
89467
|
});
|
|
89387
89468
|
printMoved({ context, args, item });
|
|
89388
89469
|
}
|
|
89470
|
+
function pinItem(pinned) {
|
|
89471
|
+
return async ({ context, args }) => {
|
|
89472
|
+
const itemId = args.words[2];
|
|
89473
|
+
if (!itemId) throw new CliUsageError(USAGE10);
|
|
89474
|
+
const { client } = await signedIn({ context, args });
|
|
89475
|
+
const item = await client.post("/api/feed/mine/pin", { itemId, pinned });
|
|
89476
|
+
printMoved({ context, args, item });
|
|
89477
|
+
};
|
|
89478
|
+
}
|
|
89389
89479
|
function moveItem(path) {
|
|
89390
89480
|
return async ({ context, args }) => {
|
|
89391
89481
|
const itemId = args.words[2];
|
|
89392
|
-
if (!itemId) throw new CliUsageError(
|
|
89482
|
+
if (!itemId) throw new CliUsageError(USAGE10);
|
|
89393
89483
|
const { client } = await signedIn({ context, args });
|
|
89394
89484
|
const item = await client.post(`/api/feed/mine/${path}`, { itemId });
|
|
89395
89485
|
printMoved({ context, args, item });
|
|
@@ -89398,14 +89488,14 @@ function moveItem(path) {
|
|
|
89398
89488
|
async function feedSnooze({ context, args }) {
|
|
89399
89489
|
const itemId = args.words[2];
|
|
89400
89490
|
const until = flagText({ args, name: "until" });
|
|
89401
|
-
if (!itemId || !until) throw new CliUsageError(
|
|
89491
|
+
if (!itemId || !until) throw new CliUsageError(USAGE10);
|
|
89402
89492
|
const { client } = await signedIn({ context, args });
|
|
89403
89493
|
const item = await client.post("/api/feed/mine/snooze", { itemId, until });
|
|
89404
89494
|
printMoved({ context, args, item });
|
|
89405
89495
|
}
|
|
89406
89496
|
async function feedChannel({ context, args }) {
|
|
89407
89497
|
const channelId = args.words[2];
|
|
89408
|
-
if (!channelId) throw new CliUsageError(
|
|
89498
|
+
if (!channelId) throw new CliUsageError(USAGE10);
|
|
89409
89499
|
const { client } = await signedIn({ context, args });
|
|
89410
89500
|
const items = await client.post("/api/feed/channel", { channelId });
|
|
89411
89501
|
if (args.flags.json) return context.out(`${JSON.stringify(items, null, 2)}
|
|
@@ -89432,13 +89522,15 @@ var FEED_COMMANDS = {
|
|
|
89432
89522
|
done: moveItem("done"),
|
|
89433
89523
|
"put-back": moveItem("put-back"),
|
|
89434
89524
|
unsnooze: moveItem("unsnooze"),
|
|
89525
|
+
pin: pinItem(true),
|
|
89526
|
+
unpin: pinItem(false),
|
|
89435
89527
|
snooze: feedSnooze,
|
|
89436
89528
|
channel: feedChannel
|
|
89437
89529
|
};
|
|
89438
89530
|
async function feed({ context, args }) {
|
|
89439
89531
|
const name3 = args.words[1] ?? "";
|
|
89440
89532
|
const command = Object.hasOwn(FEED_COMMANDS, name3) ? FEED_COMMANDS[name3] : void 0;
|
|
89441
|
-
if (!command) throw new CliUsageError(
|
|
89533
|
+
if (!command) throw new CliUsageError(USAGE10);
|
|
89442
89534
|
await command({ context, args });
|
|
89443
89535
|
}
|
|
89444
89536
|
|
|
@@ -89681,7 +89773,7 @@ import { readFile as readFile34 } from "node:fs/promises";
|
|
|
89681
89773
|
function timeOf2(iso3) {
|
|
89682
89774
|
return `${iso3.slice(0, 10)} ${iso3.slice(11, 16)} UTC`;
|
|
89683
89775
|
}
|
|
89684
|
-
function
|
|
89776
|
+
function linesOf3(output2) {
|
|
89685
89777
|
const live = (output2.live?.messages ?? []).map((message2) => ({
|
|
89686
89778
|
at: message2.createdAt,
|
|
89687
89779
|
author: message2.authorName,
|
|
@@ -89711,7 +89803,7 @@ function blockOf2(line) {
|
|
|
89711
89803
|
return [head, ...body, ...replies].join("\n");
|
|
89712
89804
|
}
|
|
89713
89805
|
function olderCursorOf(output2) {
|
|
89714
|
-
const oldest =
|
|
89806
|
+
const oldest = linesOf3(output2)[0];
|
|
89715
89807
|
if (!oldest) return null;
|
|
89716
89808
|
const more = output2.live ? output2.live.hasOlder : output2.laze.hasOlder || output2.laze.liveBefore !== null;
|
|
89717
89809
|
return more ? oldest.cursor : null;
|
|
@@ -89720,7 +89812,7 @@ function formatHistory(output2) {
|
|
|
89720
89812
|
const { laze } = output2;
|
|
89721
89813
|
const where = laze.channelName ? `#${laze.channelName}` : laze.channelId;
|
|
89722
89814
|
const from = laze.mirror ? ` (mirrors ${laze.mirror.label})` : "";
|
|
89723
|
-
const lines2 =
|
|
89815
|
+
const lines2 = linesOf3(output2);
|
|
89724
89816
|
if (lines2.length === 0) return `${where}${from}: no messages.
|
|
89725
89817
|
`;
|
|
89726
89818
|
const count5 = lines2.length === 1 ? "1 message" : `${lines2.length} messages`;
|
|
@@ -90705,7 +90797,7 @@ function machineAccessCommand(name3) {
|
|
|
90705
90797
|
}
|
|
90706
90798
|
|
|
90707
90799
|
// src/services/machine-commands.service.ts
|
|
90708
|
-
var
|
|
90800
|
+
var USAGE11 = [
|
|
90709
90801
|
"Usage: laze machine connect <name> the command to run on your own machine (people)",
|
|
90710
90802
|
" laze machine connect <name> --again a new command for a machine you connected; the old code stops working",
|
|
90711
90803
|
" laze machine connect <name> --ssh <user>@<host>[:port] a machine that cannot run the connector, over SSH (people)",
|
|
@@ -90751,7 +90843,7 @@ function listLine(machine2) {
|
|
|
90751
90843
|
var EXEC_ENV_MAX = 32;
|
|
90752
90844
|
function machineArg2({ args }) {
|
|
90753
90845
|
const machine2 = args.words[2];
|
|
90754
|
-
if (!machine2) throw new CliUsageError(
|
|
90846
|
+
if (!machine2) throw new CliUsageError(USAGE11);
|
|
90755
90847
|
return machine2;
|
|
90756
90848
|
}
|
|
90757
90849
|
async function connect4({ context, args }) {
|
|
@@ -90777,7 +90869,7 @@ async function connectSsh({
|
|
|
90777
90869
|
}) {
|
|
90778
90870
|
const ssh = flagText({ args, name: "ssh" });
|
|
90779
90871
|
if (!ssh) throw new CliUsageError(`--ssh takes <user>@<host>[:port]
|
|
90780
|
-
${
|
|
90872
|
+
${USAGE11}`);
|
|
90781
90873
|
const client = await computeClient({ context, args });
|
|
90782
90874
|
const made = await client.post(COMPUTE_REST_PATHS.connectSsh, {
|
|
90783
90875
|
name: name3,
|
|
@@ -90853,11 +90945,11 @@ async function exec({
|
|
|
90853
90945
|
}) {
|
|
90854
90946
|
const machine2 = machineArg2({ args });
|
|
90855
90947
|
const command = commandText({ rest: args.rest });
|
|
90856
|
-
if (!command.trim()) throw new CliUsageError(
|
|
90948
|
+
if (!command.trim()) throw new CliUsageError(USAGE11);
|
|
90857
90949
|
const timeout = flagText({ args, name: "timeout" });
|
|
90858
90950
|
if (timeout && !(Number(timeout) >= 1))
|
|
90859
90951
|
throw new CliUsageError(`--timeout takes a number of seconds
|
|
90860
|
-
${
|
|
90952
|
+
${USAGE11}`);
|
|
90861
90953
|
const released = await vaultEnv({ context, args });
|
|
90862
90954
|
if ("exitCode" in released) return released.exitCode;
|
|
90863
90955
|
const client = await computeClient({ context, args });
|
|
@@ -90885,11 +90977,11 @@ async function vaultEnv({
|
|
|
90885
90977
|
const connections = args.lists.vault ?? [];
|
|
90886
90978
|
if (args.flags.vault === true)
|
|
90887
90979
|
throw new CliUsageError(`--vault takes a connection name
|
|
90888
|
-
${
|
|
90980
|
+
${USAGE11}`);
|
|
90889
90981
|
if (connections.length === 0) return {};
|
|
90890
90982
|
const reason = flagText({ args, name: "reason" });
|
|
90891
90983
|
if (!reason) throw new CliUsageError(`Say why with --reason "<one plain sentence>"
|
|
90892
|
-
${
|
|
90984
|
+
${USAGE11}`);
|
|
90893
90985
|
const env = {};
|
|
90894
90986
|
for (const connection of new Set(connections)) {
|
|
90895
90987
|
const released = await vaultRelease({ context, args, connection, reason, command: args.rest });
|
|
@@ -90909,11 +91001,11 @@ ${USAGE10}`);
|
|
|
90909
91001
|
async function host({ context, args }) {
|
|
90910
91002
|
const machineName = args.words[2];
|
|
90911
91003
|
const agent3 = args.words[3];
|
|
90912
|
-
if (!machineName || !agent3) throw new CliUsageError(
|
|
91004
|
+
if (!machineName || !agent3) throw new CliUsageError(USAGE11);
|
|
90913
91005
|
const whenOffline = flagText({ args, name: "when-offline", fallback: "wait" });
|
|
90914
91006
|
if (whenOffline !== "wait" && whenOffline !== "computer" && whenOffline !== "sandbox")
|
|
90915
91007
|
throw new CliUsageError(`--when-offline takes wait or computer
|
|
90916
|
-
${
|
|
91008
|
+
${USAGE11}`);
|
|
90917
91009
|
const client = await computeClient({ context, args });
|
|
90918
91010
|
const machine2 = await client.post(COMPUTE_REST_PATHS.host, {
|
|
90919
91011
|
machine: machineName,
|
|
@@ -90930,7 +91022,7 @@ ${USAGE10}`);
|
|
|
90930
91022
|
}
|
|
90931
91023
|
async function unhost({ context, args }) {
|
|
90932
91024
|
const agent3 = args.words[2];
|
|
90933
|
-
if (!agent3) throw new CliUsageError(
|
|
91025
|
+
if (!agent3) throw new CliUsageError(USAGE11);
|
|
90934
91026
|
const client = await computeClient({ context, args });
|
|
90935
91027
|
const done = await client.post(COMPUTE_REST_PATHS.unhost, { agent: agent3 });
|
|
90936
91028
|
if (args.flags.json) return context.out(`${JSON.stringify(done, null, 2)}
|
|
@@ -90967,7 +91059,7 @@ async function machine({ context, args }) {
|
|
|
90967
91059
|
if (command === "unhost") return unhost({ context, args });
|
|
90968
91060
|
const access = machineAccessCommand(command);
|
|
90969
91061
|
if (access) return access({ context, args });
|
|
90970
|
-
throw new CliUsageError(
|
|
91062
|
+
throw new CliUsageError(USAGE11);
|
|
90971
91063
|
}
|
|
90972
91064
|
|
|
90973
91065
|
// src/services/mcp-server.service.ts
|
|
@@ -91257,7 +91349,7 @@ async function writeMount({
|
|
|
91257
91349
|
}
|
|
91258
91350
|
|
|
91259
91351
|
// src/services/memory-commands.service.ts
|
|
91260
|
-
var
|
|
91352
|
+
var USAGE12 = `Usage:
|
|
91261
91353
|
laze memory get SOUL.md|AGENTS.md|MEMORY.md [--channel <channel>]
|
|
91262
91354
|
laze memory set <file> <text|@file|-> [--channel <channel>] [--base <version>]
|
|
91263
91355
|
laze memory append MEMORY.md <text|@file|-> [--channel <channel>]
|
|
@@ -91283,7 +91375,7 @@ var PROVENANCES = ["said", "decided", "verified", "inferred", "observed"];
|
|
|
91283
91375
|
var FILES = /* @__PURE__ */ new Set(["SOUL.md", "AGENTS.md", "MEMORY.md"]);
|
|
91284
91376
|
function fileRef({ context, args }) {
|
|
91285
91377
|
const file3 = args.words[2] ?? "";
|
|
91286
|
-
if (!FILES.has(file3)) throw new CliUsageError(
|
|
91378
|
+
if (!FILES.has(file3)) throw new CliUsageError(USAGE12);
|
|
91287
91379
|
const channel = turnChannel({ context, args });
|
|
91288
91380
|
return { file: file3, ...channel ? { channel } : {} };
|
|
91289
91381
|
}
|
|
@@ -91322,7 +91414,7 @@ async function memoryHistory({ context, args }) {
|
|
|
91322
91414
|
async function memorySet({ context, args }) {
|
|
91323
91415
|
const ref = fileRef({ context, args });
|
|
91324
91416
|
const value = args.words.slice(3).join(" ");
|
|
91325
|
-
if (!value) throw new CliUsageError(
|
|
91417
|
+
if (!value) throw new CliUsageError(USAGE12);
|
|
91326
91418
|
const content = await textArgument({ context, value });
|
|
91327
91419
|
const base = args.flags.base;
|
|
91328
91420
|
const { client } = await signedIn({ context, args });
|
|
@@ -91338,7 +91430,7 @@ async function memorySet({ context, args }) {
|
|
|
91338
91430
|
async function memoryAppend({ context, args }) {
|
|
91339
91431
|
const ref = fileRef({ context, args });
|
|
91340
91432
|
const value = args.words.slice(3).join(" ");
|
|
91341
|
-
if (!value) throw new CliUsageError(
|
|
91433
|
+
if (!value) throw new CliUsageError(USAGE12);
|
|
91342
91434
|
const text3 = await textArgument({ context, value });
|
|
91343
91435
|
const { client } = await signedIn({ context, args });
|
|
91344
91436
|
const saved3 = await client.post("/api/memory/append", { ...ref, text: text3 });
|
|
@@ -91348,7 +91440,7 @@ async function memoryAppend({ context, args }) {
|
|
|
91348
91440
|
}
|
|
91349
91441
|
async function memorySearch({ context, args }) {
|
|
91350
91442
|
const query = args.words.slice(2).join(" ").trim();
|
|
91351
|
-
if (!query) throw new CliUsageError(
|
|
91443
|
+
if (!query) throw new CliUsageError(USAGE12);
|
|
91352
91444
|
const { client } = await signedIn({ context, args });
|
|
91353
91445
|
const hits = await client.post("/api/memory/search", { query });
|
|
91354
91446
|
if (args.flags.json) return context.out(`${JSON.stringify(hits, null, 2)}
|
|
@@ -91373,7 +91465,7 @@ async function memoryPull({ context, args }) {
|
|
|
91373
91465
|
}
|
|
91374
91466
|
function logTarget({ context, args }) {
|
|
91375
91467
|
const layer = flagText({ args, name: "layer", fallback: "person" });
|
|
91376
|
-
if (layer !== "person" && layer !== "agent") throw new CliUsageError(
|
|
91468
|
+
if (layer !== "person" && layer !== "agent") throw new CliUsageError(USAGE12);
|
|
91377
91469
|
const channel = turnChannel({ context, args });
|
|
91378
91470
|
const turn = (context.environment.inherited.LAZE_TURN_MESSAGES ?? "").split(",").map((id2) => id2.trim()).filter(Boolean);
|
|
91379
91471
|
const message2 = flagText({ args, name: "message" }) || turn.at(-1) || "";
|
|
@@ -91399,7 +91491,7 @@ async function taggedLine({
|
|
|
91399
91491
|
const [tag] = given;
|
|
91400
91492
|
const value = args.flags[tag];
|
|
91401
91493
|
const raw = typeof value === "string" ? value : args.words.slice(from).join(" ");
|
|
91402
|
-
if (!raw.trim()) throw new CliUsageError(
|
|
91494
|
+
if (!raw.trim()) throw new CliUsageError(USAGE12);
|
|
91403
91495
|
const text3 = await textArgument({ context, value: raw });
|
|
91404
91496
|
return { tag, text: text3, pins: [...args.lists.pin ?? []] };
|
|
91405
91497
|
}
|
|
@@ -91432,12 +91524,12 @@ async function logCall({
|
|
|
91432
91524
|
}
|
|
91433
91525
|
function entryId(args) {
|
|
91434
91526
|
const id2 = Number((args.words[2] ?? "").replace(/^#/, ""));
|
|
91435
|
-
if (!Number.isInteger(id2) || id2 < 0) throw new CliUsageError(
|
|
91527
|
+
if (!Number.isInteger(id2) || id2 < 0) throw new CliUsageError(USAGE12);
|
|
91436
91528
|
return id2;
|
|
91437
91529
|
}
|
|
91438
91530
|
function blockArg(args) {
|
|
91439
91531
|
const block2 = (args.words[2] ?? "").replace(/^#/, "");
|
|
91440
|
-
if (!block2) throw new CliUsageError(
|
|
91532
|
+
if (!block2) throw new CliUsageError(USAGE12);
|
|
91441
91533
|
return block2;
|
|
91442
91534
|
}
|
|
91443
91535
|
async function memoryNote({ context, args }) {
|
|
@@ -91455,7 +91547,7 @@ async function memoryRemove({ context, args }) {
|
|
|
91455
91547
|
async function memoryNap({ context, args }) {
|
|
91456
91548
|
const block2 = (args.words[2] ?? "").replace(/^#/, "");
|
|
91457
91549
|
const text3 = args.words.slice(3).join(" ");
|
|
91458
|
-
if (block2 && !text3) throw new CliUsageError(
|
|
91550
|
+
if (block2 && !text3) throw new CliUsageError(USAGE12);
|
|
91459
91551
|
const line = text3 ? await textArgument({ context, value: text3 }) : "";
|
|
91460
91552
|
await logCall({ context, args, path: "nap", body: block2 ? { block: block2, text: line } : {} });
|
|
91461
91553
|
}
|
|
@@ -91467,7 +91559,7 @@ async function memoryForget({ context, args }) {
|
|
|
91467
91559
|
}
|
|
91468
91560
|
async function memoryRecall({ context, args }) {
|
|
91469
91561
|
const query = args.words.slice(2).join(" ").trim();
|
|
91470
|
-
if (!query) throw new CliUsageError(
|
|
91562
|
+
if (!query) throw new CliUsageError(USAGE12);
|
|
91471
91563
|
await logCall({ context, args, path: "recall", body: { query } });
|
|
91472
91564
|
}
|
|
91473
91565
|
async function memoryWake({ context, args }) {
|
|
@@ -91513,7 +91605,7 @@ async function memoryImport({ context, args }) {
|
|
|
91513
91605
|
const siesta = flagText({ args, name: "siesta" });
|
|
91514
91606
|
if (siesta) return siestaImport({ context, args, dir: siesta });
|
|
91515
91607
|
const dir = flagText({ args, name: "optmem" });
|
|
91516
|
-
if (!dir) throw new CliUsageError(
|
|
91608
|
+
if (!dir) throw new CliUsageError(USAGE12);
|
|
91517
91609
|
const root = resolve17(context.cwd, dir);
|
|
91518
91610
|
const log = await readFile37(join26(root, "LOG.txt"));
|
|
91519
91611
|
const sizes2 = (await readdir7(join26(root, "TREE")).catch(() => [])).filter(
|
|
@@ -91555,13 +91647,13 @@ var MEMORY_COMMANDS = {
|
|
|
91555
91647
|
async function memory({ context, args }) {
|
|
91556
91648
|
const name3 = args.words[1] ?? "";
|
|
91557
91649
|
const command = Object.hasOwn(MEMORY_COMMANDS, name3) ? MEMORY_COMMANDS[name3] : void 0;
|
|
91558
|
-
if (!command) throw new CliUsageError(
|
|
91650
|
+
if (!command) throw new CliUsageError(USAGE12);
|
|
91559
91651
|
await command({ context, args });
|
|
91560
91652
|
}
|
|
91561
91653
|
|
|
91562
91654
|
// src/services/models-commands.service.ts
|
|
91563
91655
|
var WINDOWS = ["day", "week", "month"];
|
|
91564
|
-
var
|
|
91656
|
+
var USAGE13 = `Usage:
|
|
91565
91657
|
laze models policy whether Laze models are on, the default budget and the cap
|
|
91566
91658
|
laze models set-policy [on|off] [--default-day <usd|none>] [--cap-day <usd|none>] ... (admins)
|
|
91567
91659
|
--default-week, --default-month, --cap-week and --cap-month set the other windows
|
|
@@ -91586,7 +91678,7 @@ function limitsFrom({
|
|
|
91586
91678
|
const value = text3 === "none" ? null : Number(text3);
|
|
91587
91679
|
if (value !== null && (!Number.isFinite(value) || value < 0))
|
|
91588
91680
|
throw new CliUsageError(`--${prefix}${window2} takes an amount in USD or none.
|
|
91589
|
-
${
|
|
91681
|
+
${USAGE13}`);
|
|
91590
91682
|
next[window2] = value;
|
|
91591
91683
|
changed = true;
|
|
91592
91684
|
}
|
|
@@ -91611,12 +91703,12 @@ async function showPolicy({ context, args }) {
|
|
|
91611
91703
|
}
|
|
91612
91704
|
async function setPolicy({ context, args }) {
|
|
91613
91705
|
const state = args.words[2];
|
|
91614
|
-
if (state !== void 0 && state !== "on" && state !== "off") throw new CliUsageError(
|
|
91706
|
+
if (state !== void 0 && state !== "on" && state !== "off") throw new CliUsageError(USAGE13);
|
|
91615
91707
|
const { client } = await signedIn({ context, args });
|
|
91616
91708
|
const current3 = await client.get("/api/models/policy");
|
|
91617
91709
|
const defaultBudget = limitsFrom({ args, prefix: "default-", current: current3.defaultBudget });
|
|
91618
91710
|
const cap = limitsFrom({ args, prefix: "cap-", current: current3.cap });
|
|
91619
|
-
if (!state && !defaultBudget && !cap) throw new CliUsageError(
|
|
91711
|
+
if (!state && !defaultBudget && !cap) throw new CliUsageError(USAGE13);
|
|
91620
91712
|
const updated = await client.post("/api/models/policy", {
|
|
91621
91713
|
...state ? { lazeModels: state === "on" } : {},
|
|
91622
91714
|
...defaultBudget ? { defaultBudget } : {},
|
|
@@ -91657,11 +91749,11 @@ async function agentNamed({ client, name: name3 }) {
|
|
|
91657
91749
|
}
|
|
91658
91750
|
async function setBudget({ context, args }) {
|
|
91659
91751
|
const name3 = args.words[2];
|
|
91660
|
-
if (!name3) throw new CliUsageError(
|
|
91752
|
+
if (!name3) throw new CliUsageError(USAGE13);
|
|
91661
91753
|
const { client } = await signedIn({ context, args });
|
|
91662
91754
|
const agent3 = await agentNamed({ client, name: name3 });
|
|
91663
91755
|
const next = limitsFrom({ args, prefix: "", current: agent3.budget });
|
|
91664
|
-
if (!next) throw new CliUsageError(
|
|
91756
|
+
if (!next) throw new CliUsageError(USAGE13);
|
|
91665
91757
|
const updated = await client.post("/api/models/agents/budget", {
|
|
91666
91758
|
agentId: agent3.agentId,
|
|
91667
91759
|
budget: next
|
|
@@ -91694,7 +91786,7 @@ var MODEL_COMMANDS = {
|
|
|
91694
91786
|
async function models({ context, args }) {
|
|
91695
91787
|
const name3 = args.words[1] ?? "policy";
|
|
91696
91788
|
const command = Object.hasOwn(MODEL_COMMANDS, name3) ? MODEL_COMMANDS[name3] : void 0;
|
|
91697
|
-
if (!command) throw new CliUsageError(
|
|
91789
|
+
if (!command) throw new CliUsageError(USAGE13);
|
|
91698
91790
|
await command({ context, args });
|
|
91699
91791
|
}
|
|
91700
91792
|
|
|
@@ -91772,7 +91864,7 @@ var monitorResume = stateRun("/api/agents/monitors/resume", "resume");
|
|
|
91772
91864
|
var monitorRemove = stateRun("/api/agents/monitors/remove", "rm");
|
|
91773
91865
|
|
|
91774
91866
|
// src/services/notification-commands.service.ts
|
|
91775
|
-
var
|
|
91867
|
+
var USAGE14 = `Usage:
|
|
91776
91868
|
laze notifications [show] your notification settings (people)
|
|
91777
91869
|
laze notifications set [--channels all|mentions|nothing] [--keywords a,b] [--dnd on|off]
|
|
91778
91870
|
[--dnd-from 22:00] [--dnd-to 08:00] [--tz <IANA zone>] [--push on|off] [--email on|off]
|
|
@@ -91801,14 +91893,14 @@ function switchOf({ args, name: name3 }) {
|
|
|
91801
91893
|
if (!text3) return void 0;
|
|
91802
91894
|
if (text3 !== "on" && text3 !== "off")
|
|
91803
91895
|
throw new CliUsageError(`--${name3} takes on or off.
|
|
91804
|
-
${
|
|
91896
|
+
${USAGE14}`);
|
|
91805
91897
|
return text3 === "on";
|
|
91806
91898
|
}
|
|
91807
91899
|
function changesOf(args) {
|
|
91808
91900
|
const channels3 = flagText({ args, name: "channels" });
|
|
91809
91901
|
if (channels3 && !["all", "mentions", "nothing"].includes(channels3))
|
|
91810
91902
|
throw new CliUsageError(`--channels takes all, mentions or nothing.
|
|
91811
|
-
${
|
|
91903
|
+
${USAGE14}`);
|
|
91812
91904
|
const keywords = typeof args.flags.keywords === "string" ? args.flags.keywords : void 0;
|
|
91813
91905
|
const emailAfter = flagText({ args, name: "email-after" });
|
|
91814
91906
|
const changes2 = {
|
|
@@ -91830,7 +91922,7 @@ async function showSettings({ context, args }) {
|
|
|
91830
91922
|
}
|
|
91831
91923
|
async function setSettings({ context, args }) {
|
|
91832
91924
|
const changes2 = changesOf(args);
|
|
91833
|
-
if (Object.keys(changes2).length === 0) throw new CliUsageError(
|
|
91925
|
+
if (Object.keys(changes2).length === 0) throw new CliUsageError(USAGE14);
|
|
91834
91926
|
const { client } = await signedIn({ context, args });
|
|
91835
91927
|
print8({
|
|
91836
91928
|
context,
|
|
@@ -91841,7 +91933,7 @@ async function setSettings({ context, args }) {
|
|
|
91841
91933
|
async function snoozeFor({ context, args }) {
|
|
91842
91934
|
const word3 = args.words[2];
|
|
91843
91935
|
const minutes = word3 === "off" ? 0 : Number(word3);
|
|
91844
|
-
if (!word3 || !Number.isInteger(minutes) || minutes < 0) throw new CliUsageError(
|
|
91936
|
+
if (!word3 || !Number.isInteger(minutes) || minutes < 0) throw new CliUsageError(USAGE14);
|
|
91845
91937
|
const { client } = await signedIn({ context, args });
|
|
91846
91938
|
print8({
|
|
91847
91939
|
context,
|
|
@@ -91859,7 +91951,7 @@ var NOTIFICATION_COMMANDS = {
|
|
|
91859
91951
|
async function notifications({ context, args }) {
|
|
91860
91952
|
const name3 = args.words[1] ?? "show";
|
|
91861
91953
|
const command = Object.hasOwn(NOTIFICATION_COMMANDS, name3) ? NOTIFICATION_COMMANDS[name3] : void 0;
|
|
91862
|
-
if (!command) throw new CliUsageError(
|
|
91954
|
+
if (!command) throw new CliUsageError(USAGE14);
|
|
91863
91955
|
await command({ context, args });
|
|
91864
91956
|
}
|
|
91865
91957
|
|
|
@@ -92369,7 +92461,7 @@ async function rushWakeHook({ context, args }) {
|
|
|
92369
92461
|
}
|
|
92370
92462
|
|
|
92371
92463
|
// src/services/schedule-commands.service.ts
|
|
92372
|
-
var
|
|
92464
|
+
var USAGE15 = `Usage:
|
|
92373
92465
|
laze schedule add <name> --prompt <text> (--cron "<m h dom mon dow>" | --rrule "<RRULE>" | --at <local time>)
|
|
92374
92466
|
[--tz <IANA zone>] [--channel <channelId>] [--agent <agentId>]
|
|
92375
92467
|
laze schedule list
|
|
@@ -92385,7 +92477,7 @@ function timingOf(args) {
|
|
|
92385
92477
|
const given = [cron, rrule, at].filter(Boolean);
|
|
92386
92478
|
if (given.length !== 1)
|
|
92387
92479
|
throw new CliUsageError(`Give exactly one of --cron, --rrule or --at.
|
|
92388
|
-
${
|
|
92480
|
+
${USAGE15}`);
|
|
92389
92481
|
if (cron) return { kind: "cron", cron };
|
|
92390
92482
|
if (rrule) return { kind: "rrule", rrule };
|
|
92391
92483
|
return { kind: "once", at };
|
|
@@ -92400,7 +92492,7 @@ function printSchedule({ context, schedule: schedule2 }) {
|
|
|
92400
92492
|
async function scheduleAdd({ context, args }) {
|
|
92401
92493
|
const name3 = args.words.slice(2).join(" ").trim();
|
|
92402
92494
|
const prompt = flagText({ args, name: "prompt" });
|
|
92403
|
-
if (!name3 || !prompt) throw new CliUsageError(
|
|
92495
|
+
if (!name3 || !prompt) throw new CliUsageError(USAGE15);
|
|
92404
92496
|
const timing = timingOf(args);
|
|
92405
92497
|
const { client } = await signedIn({ context, args });
|
|
92406
92498
|
const channelId = flagText({ args, name: "channel" });
|
|
@@ -92437,7 +92529,7 @@ function changesOf2(args) {
|
|
|
92437
92529
|
async function scheduleUpdate({ context, args }) {
|
|
92438
92530
|
const scheduleId = args.words[2];
|
|
92439
92531
|
const changes2 = changesOf2(args);
|
|
92440
|
-
if (!scheduleId || Object.keys(changes2).length === 0) throw new CliUsageError(
|
|
92532
|
+
if (!scheduleId || Object.keys(changes2).length === 0) throw new CliUsageError(USAGE15);
|
|
92441
92533
|
const { client } = await signedIn({ context, args });
|
|
92442
92534
|
const schedule2 = await client.post("/api/schedules/update", { scheduleId, ...changes2 });
|
|
92443
92535
|
if (args.flags.json) return context.out(`${JSON.stringify(schedule2, null, 2)}
|
|
@@ -92454,7 +92546,7 @@ async function scheduleList({ context, args }) {
|
|
|
92454
92546
|
function byId(path) {
|
|
92455
92547
|
return async ({ context, args }) => {
|
|
92456
92548
|
const scheduleId = args.words[2];
|
|
92457
|
-
if (!scheduleId) throw new CliUsageError(
|
|
92549
|
+
if (!scheduleId) throw new CliUsageError(USAGE15);
|
|
92458
92550
|
const { client } = await signedIn({ context, args });
|
|
92459
92551
|
const answer6 = await client.post(`/api/schedules/${path}`, {
|
|
92460
92552
|
scheduleId
|
|
@@ -92468,7 +92560,7 @@ function byId(path) {
|
|
|
92468
92560
|
}
|
|
92469
92561
|
async function scheduleRuns({ context, args }) {
|
|
92470
92562
|
const scheduleId = args.words[2];
|
|
92471
|
-
if (!scheduleId) throw new CliUsageError(
|
|
92563
|
+
if (!scheduleId) throw new CliUsageError(USAGE15);
|
|
92472
92564
|
const { client } = await signedIn({ context, args });
|
|
92473
92565
|
const runs = await client.post("/api/schedules/runs", { scheduleId });
|
|
92474
92566
|
if (args.flags.json) return context.out(`${JSON.stringify(runs, null, 2)}
|
|
@@ -92482,7 +92574,7 @@ async function scheduleRuns({ context, args }) {
|
|
|
92482
92574
|
}
|
|
92483
92575
|
async function scheduleRun({ context, args }) {
|
|
92484
92576
|
const scheduleId = args.words[2];
|
|
92485
|
-
if (!scheduleId) throw new CliUsageError(
|
|
92577
|
+
if (!scheduleId) throw new CliUsageError(USAGE15);
|
|
92486
92578
|
const { client } = await signedIn({ context, args });
|
|
92487
92579
|
const run4 = await client.post("/api/schedules/run", { scheduleId });
|
|
92488
92580
|
if (args.flags.json) return context.out(`${JSON.stringify(run4, null, 2)}
|
|
@@ -92503,14 +92595,14 @@ var SCHEDULE_COMMANDS = {
|
|
|
92503
92595
|
async function schedule({ context, args }) {
|
|
92504
92596
|
const name3 = args.words[1] ?? "";
|
|
92505
92597
|
const command = Object.hasOwn(SCHEDULE_COMMANDS, name3) ? SCHEDULE_COMMANDS[name3] : void 0;
|
|
92506
|
-
if (!command) throw new CliUsageError(
|
|
92598
|
+
if (!command) throw new CliUsageError(USAGE15);
|
|
92507
92599
|
await command({ context, args });
|
|
92508
92600
|
}
|
|
92509
92601
|
|
|
92510
92602
|
// src/services/skill-commands.service.ts
|
|
92511
92603
|
import { readdir as readdir8, readFile as readFile40 } from "node:fs/promises";
|
|
92512
92604
|
import { join as join28, relative as relative6, resolve as resolve19 } from "node:path";
|
|
92513
|
-
var
|
|
92605
|
+
var USAGE16 = `Usage:
|
|
92514
92606
|
laze skill list [--agent <agentId>]
|
|
92515
92607
|
laze skill install <catalogue-id> [--as <name>] [--agent <agentId>]
|
|
92516
92608
|
laze skill install --from <folder> [--as <name>] [--agent <agentId>] a folder with a SKILL.md
|
|
@@ -92559,7 +92651,7 @@ async function skillList({ context, args }) {
|
|
|
92559
92651
|
async function skillInstall({ context, args }) {
|
|
92560
92652
|
const catalogueId = args.words[2];
|
|
92561
92653
|
const from = flagText({ args, name: "from" });
|
|
92562
|
-
if (!catalogueId === !from) throw new CliUsageError(
|
|
92654
|
+
if (!catalogueId === !from) throw new CliUsageError(USAGE16);
|
|
92563
92655
|
const name3 = flagText({ args, name: "as" });
|
|
92564
92656
|
const agent3 = flagText({ args, name: "agent" });
|
|
92565
92657
|
const files2 = from ? await folderFiles({ root: resolve19(context.cwd, from) }) : void 0;
|
|
@@ -92577,7 +92669,7 @@ async function skillInstall({ context, args }) {
|
|
|
92577
92669
|
}
|
|
92578
92670
|
async function skillShow({ context, args }) {
|
|
92579
92671
|
const name3 = args.words[2];
|
|
92580
|
-
if (!name3) throw new CliUsageError(
|
|
92672
|
+
if (!name3) throw new CliUsageError(USAGE16);
|
|
92581
92673
|
const agent3 = flagText({ args, name: "agent" });
|
|
92582
92674
|
const { client } = await signedIn({ context, args });
|
|
92583
92675
|
const skill2 = await client.post("/api/skills/show", {
|
|
@@ -92610,7 +92702,7 @@ function agentFlag(args) {
|
|
|
92610
92702
|
}
|
|
92611
92703
|
async function skillRemove({ context, args }) {
|
|
92612
92704
|
const name3 = args.words[2];
|
|
92613
|
-
if (!name3) throw new CliUsageError(
|
|
92705
|
+
if (!name3) throw new CliUsageError(USAGE16);
|
|
92614
92706
|
const { client } = await signedIn({ context, args });
|
|
92615
92707
|
const removed = await client.post("/api/skills/remove", {
|
|
92616
92708
|
name: name3,
|
|
@@ -92627,7 +92719,7 @@ async function skillUpdate({ context, args }) {
|
|
|
92627
92719
|
const description = typeof args.flags.description === "string" ? args.flags.description : void 0;
|
|
92628
92720
|
const skillMdFile = flagText({ args, name: "skill-md" });
|
|
92629
92721
|
if (!name3 || !newName && description === void 0 && !skillMdFile) {
|
|
92630
|
-
throw new CliUsageError(
|
|
92722
|
+
throw new CliUsageError(USAGE16);
|
|
92631
92723
|
}
|
|
92632
92724
|
const skillMd = skillMdFile ? await readFile40(resolve19(context.cwd, skillMdFile), "utf8") : void 0;
|
|
92633
92725
|
const { client } = await signedIn({ context, args });
|
|
@@ -92646,7 +92738,7 @@ async function skillUpdate({ context, args }) {
|
|
|
92646
92738
|
function pinning({ unpin }) {
|
|
92647
92739
|
return async ({ context, args }) => {
|
|
92648
92740
|
const name3 = args.words[2];
|
|
92649
|
-
if (!name3) throw new CliUsageError(
|
|
92741
|
+
if (!name3) throw new CliUsageError(USAGE16);
|
|
92650
92742
|
const { client } = await signedIn({ context, args });
|
|
92651
92743
|
const path = unpin ? "/api/skills/unpin" : "/api/skills/pin";
|
|
92652
92744
|
const skill2 = await client.post(path, { name: name3, ...agentFlag(args) });
|
|
@@ -92670,7 +92762,7 @@ var SKILL_COMMANDS = {
|
|
|
92670
92762
|
async function skill({ context, args }) {
|
|
92671
92763
|
const name3 = args.words[1] ?? "";
|
|
92672
92764
|
const command = Object.hasOwn(SKILL_COMMANDS, name3) ? SKILL_COMMANDS[name3] : void 0;
|
|
92673
|
-
if (!command) throw new CliUsageError(
|
|
92765
|
+
if (!command) throw new CliUsageError(USAGE16);
|
|
92674
92766
|
await command({ context, args });
|
|
92675
92767
|
}
|
|
92676
92768
|
|
|
@@ -93281,11 +93373,11 @@ function statusLine2({ presence: presence2 }) {
|
|
|
93281
93373
|
}
|
|
93282
93374
|
|
|
93283
93375
|
// src/services/status-commands.service.ts
|
|
93284
|
-
var
|
|
93376
|
+
var USAGE17 = "Usage: laze status set <emoji> [text] [--for 30m|1h|4h|today|week|never] [--tz <zone>], laze status clear|away|active";
|
|
93285
93377
|
function clearAfterOf({ args }) {
|
|
93286
93378
|
const wanted = flagText({ args, name: "for", fallback: "never" });
|
|
93287
93379
|
const known = STATUS_CLEAR_AFTER.find((candidate) => candidate === wanted);
|
|
93288
|
-
if (!known) throw new CliUsageError(
|
|
93380
|
+
if (!known) throw new CliUsageError(USAGE17);
|
|
93289
93381
|
return known;
|
|
93290
93382
|
}
|
|
93291
93383
|
function answer5({
|
|
@@ -93299,7 +93391,7 @@ function answer5({
|
|
|
93299
93391
|
}
|
|
93300
93392
|
async function statusSet({ context, args }) {
|
|
93301
93393
|
const [, , emoji4, ...words] = args.words;
|
|
93302
|
-
if (!emoji4) throw new CliUsageError(
|
|
93394
|
+
if (!emoji4) throw new CliUsageError(USAGE17);
|
|
93303
93395
|
const clearAfter = clearAfterOf({ args });
|
|
93304
93396
|
const timeZone = flagText({ args, name: "tz" }) || Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
93305
93397
|
const { client } = await signedIn({ context, args });
|
|
@@ -93323,7 +93415,7 @@ async function statusAway({ context, args }) {
|
|
|
93323
93415
|
answer5({ context, args, presence: presence2 });
|
|
93324
93416
|
}
|
|
93325
93417
|
async function statusUsage() {
|
|
93326
|
-
throw new CliUsageError(
|
|
93418
|
+
throw new CliUsageError(USAGE17);
|
|
93327
93419
|
}
|
|
93328
93420
|
|
|
93329
93421
|
// src/services/update-commands.service.ts
|
|
@@ -94829,7 +94921,7 @@ var PATHS3 = {
|
|
|
94829
94921
|
var STATUS_WAIT_SECONDS2 = 50;
|
|
94830
94922
|
var STATUS_CALLS2 = 2;
|
|
94831
94923
|
var SETTLED = /* @__PURE__ */ new Set(["sent", "denied", "expired", "failed"]);
|
|
94832
|
-
var
|
|
94924
|
+
var USAGE18 = [
|
|
94833
94925
|
"Usage: laze whatsapp chats <machine> [--limit <n>] the chats on the machine, newest first",
|
|
94834
94926
|
" laze whatsapp read <machine> <chat> [--limit <n>] a chat's last messages, oldest first",
|
|
94835
94927
|
' laze whatsapp send <machine> <chat> "<text>" send as the owner; an agent waits for their approval',
|
|
@@ -94839,14 +94931,14 @@ var USAGE17 = [
|
|
|
94839
94931
|
].join("\n");
|
|
94840
94932
|
function word2({ args, at }) {
|
|
94841
94933
|
const value = args.words[at];
|
|
94842
|
-
if (!value) throw new CliUsageError(
|
|
94934
|
+
if (!value) throw new CliUsageError(USAGE18);
|
|
94843
94935
|
return value;
|
|
94844
94936
|
}
|
|
94845
94937
|
function limitOf5({ args }) {
|
|
94846
94938
|
const text3 = flagText({ args, name: "limit" });
|
|
94847
94939
|
if (!text3) return {};
|
|
94848
94940
|
const limit = Number(text3);
|
|
94849
|
-
if (!Number.isInteger(limit) || limit < 1) throw new CliUsageError(
|
|
94941
|
+
if (!Number.isInteger(limit) || limit < 1) throw new CliUsageError(USAGE18);
|
|
94850
94942
|
return { limit };
|
|
94851
94943
|
}
|
|
94852
94944
|
async function chats({ context, args }) {
|
|
@@ -94908,7 +95000,7 @@ Still waiting. Run \`laze whatsapp status ${send5.id}\` later to see the answer.
|
|
|
94908
95000
|
}
|
|
94909
95001
|
async function send4({ context, args }) {
|
|
94910
95002
|
const text3 = args.words.slice(4).join(" ") || args.rest.join(" ");
|
|
94911
|
-
if (!text3) throw new CliUsageError(
|
|
95003
|
+
if (!text3) throw new CliUsageError(USAGE18);
|
|
94912
95004
|
const client = await computeClient({ context, args });
|
|
94913
95005
|
const asked = await client.post(PATHS3.send, {
|
|
94914
95006
|
machine: word2({ args, at: 2 }),
|
|
@@ -94938,11 +95030,11 @@ async function whatsapp({
|
|
|
94938
95030
|
if (command === "status") return status10({ context, args });
|
|
94939
95031
|
const linking = whatsappPairingCommand(command);
|
|
94940
95032
|
if (linking) return linking({ context, args });
|
|
94941
|
-
throw new CliUsageError(
|
|
95033
|
+
throw new CliUsageError(USAGE18);
|
|
94942
95034
|
}
|
|
94943
95035
|
|
|
94944
95036
|
// src/services/wiki-commands.service.ts
|
|
94945
|
-
var
|
|
95037
|
+
var USAGE19 = `Usage:
|
|
94946
95038
|
laze wiki list
|
|
94947
95039
|
laze wiki get <path>
|
|
94948
95040
|
laze wiki put <path> <markdown|@file|-> [--title <title>] [--channel <channel>] [--base <version>]
|
|
@@ -94962,7 +95054,7 @@ async function wikiList({ context, args }) {
|
|
|
94962
95054
|
}
|
|
94963
95055
|
async function wikiGet({ context, args }) {
|
|
94964
95056
|
const path = args.words[2];
|
|
94965
|
-
if (!path) throw new CliUsageError(
|
|
95057
|
+
if (!path) throw new CliUsageError(USAGE19);
|
|
94966
95058
|
const { client } = await signedIn({ context, args });
|
|
94967
95059
|
const page = await client.post("/api/wiki/get", { path });
|
|
94968
95060
|
if (args.flags.json) return context.out(`${JSON.stringify(page, null, 2)}
|
|
@@ -94979,7 +95071,7 @@ Linked from: ${page.backlinks.map((link2) => link2.path).join(", ")}
|
|
|
94979
95071
|
async function wikiPut({ context, args }) {
|
|
94980
95072
|
const path = args.words[2];
|
|
94981
95073
|
const value = args.words.slice(3).join(" ");
|
|
94982
|
-
if (!path || !value) throw new CliUsageError(
|
|
95074
|
+
if (!path || !value) throw new CliUsageError(USAGE19);
|
|
94983
95075
|
const body = await textArgument({ context, value });
|
|
94984
95076
|
const title = flagText({ args, name: "title" });
|
|
94985
95077
|
const channel = flagText({ args, name: "channel" });
|
|
@@ -94999,7 +95091,7 @@ async function wikiPut({ context, args }) {
|
|
|
94999
95091
|
}
|
|
95000
95092
|
async function wikiSearch({ context, args }) {
|
|
95001
95093
|
const query = args.words.slice(2).join(" ").trim();
|
|
95002
|
-
if (!query) throw new CliUsageError(
|
|
95094
|
+
if (!query) throw new CliUsageError(USAGE19);
|
|
95003
95095
|
const { client } = await signedIn({ context, args });
|
|
95004
95096
|
const hits = await client.post("/api/wiki/search", { query });
|
|
95005
95097
|
if (args.flags.json) return context.out(`${JSON.stringify(hits, null, 2)}
|
|
@@ -95009,7 +95101,7 @@ async function wikiSearch({ context, args }) {
|
|
|
95009
95101
|
}
|
|
95010
95102
|
async function wikiHistory({ context, args }) {
|
|
95011
95103
|
const path = args.words[2];
|
|
95012
|
-
if (!path) throw new CliUsageError(
|
|
95104
|
+
if (!path) throw new CliUsageError(USAGE19);
|
|
95013
95105
|
const { client } = await signedIn({ context, args });
|
|
95014
95106
|
const revisions = await client.post("/api/wiki/history", { path });
|
|
95015
95107
|
if (args.flags.json) return context.out(`${JSON.stringify(revisions, null, 2)}
|
|
@@ -95023,7 +95115,7 @@ async function wikiHistory({ context, args }) {
|
|
|
95023
95115
|
}
|
|
95024
95116
|
async function wikiMove({ context, args }) {
|
|
95025
95117
|
const [, , path, to] = args.words;
|
|
95026
|
-
if (!path || !to) throw new CliUsageError(
|
|
95118
|
+
if (!path || !to) throw new CliUsageError(USAGE19);
|
|
95027
95119
|
const { client } = await signedIn({ context, args });
|
|
95028
95120
|
const page = await client.post("/api/wiki/move", { path, to });
|
|
95029
95121
|
if (args.flags.json) return context.out(`${JSON.stringify(page, null, 2)}
|
|
@@ -95033,7 +95125,7 @@ async function wikiMove({ context, args }) {
|
|
|
95033
95125
|
}
|
|
95034
95126
|
async function wikiRemove({ context, args }) {
|
|
95035
95127
|
const path = args.words[2];
|
|
95036
|
-
if (!path) throw new CliUsageError(
|
|
95128
|
+
if (!path) throw new CliUsageError(USAGE19);
|
|
95037
95129
|
const { client } = await signedIn({ context, args });
|
|
95038
95130
|
const removed = await client.post("/api/wiki/remove", { path });
|
|
95039
95131
|
if (args.flags.json) return context.out(`${JSON.stringify(removed)}
|
|
@@ -95053,7 +95145,7 @@ var WIKI_COMMANDS = {
|
|
|
95053
95145
|
async function wiki({ context, args }) {
|
|
95054
95146
|
const name3 = args.words[1] ?? "";
|
|
95055
95147
|
const command = Object.hasOwn(WIKI_COMMANDS, name3) ? WIKI_COMMANDS[name3] : void 0;
|
|
95056
|
-
if (!command) throw new CliUsageError(
|
|
95148
|
+
if (!command) throw new CliUsageError(USAGE19);
|
|
95057
95149
|
await command({ context, args });
|
|
95058
95150
|
}
|
|
95059
95151
|
|
|
@@ -95239,7 +95331,8 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
|
|
|
95239
95331
|
laze feed update|reply|read <id>, laze feed inbox change, answer and read your items
|
|
95240
95332
|
laze feed list|count|decisions your own feed as a person: cards and their actions
|
|
95241
95333
|
laze feed act <id> <actionId>, comment <id> <text> answer a card in your feed
|
|
95242
|
-
laze feed done|put-back|unsnooze <id>, snooze <id> --until <time> move a card
|
|
95334
|
+
laze feed done|put-back|unsnooze|pin|unpin <id>, snooze <id> --until <time> move or pin a card
|
|
95335
|
+
an agent whose owner turned on Manage my feed runs these on its owner's whole feed
|
|
95243
95336
|
laze feed channel <channelId> the feed cards a channel shows
|
|
95244
95337
|
laze schedule add <name> --prompt <p> --cron "0 8 * * 1-5" --tz <zone> work on a timer
|
|
95245
95338
|
laze schedule list|update|pause|resume|rm|runs your agent's schedules and their runs
|
|
@@ -95260,6 +95353,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
|
|
|
95260
95353
|
laze agent update <agent>|--self [--name] [--description] [--avatar|--avatar-emoji] [--model] [--effort] [--max-context] change an agent your owner owns, or yourself
|
|
95261
95354
|
laze agent archive <agent> remove an agent your owner owns; kept 30 days
|
|
95262
95355
|
laze agent archived removed agents you may restore, with the day each goes
|
|
95356
|
+
laze agent feed-access [<agent> on|off] let your own agent sort your whole feed (Manage my feed)
|
|
95263
95357
|
laze agent restore|delete <agent> bring an archived agent back, or delete it for good now
|
|
95264
95358
|
laze agent copy <agent> <name> a team copy of a personal agent, with its skills
|
|
95265
95359
|
laze agent pause|resume <agent> [--reason <why>] pause an agent Laze runs, or resume it
|
|
@@ -95530,6 +95624,7 @@ var COMMANDS3 = {
|
|
|
95530
95624
|
"agent update": updateAgent,
|
|
95531
95625
|
"agent archive": archiveAgent,
|
|
95532
95626
|
"agent archived": listArchivedAgents,
|
|
95627
|
+
"agent feed-access": agentFeedAccess,
|
|
95533
95628
|
"agent restore": restoreAgent,
|
|
95534
95629
|
"agent delete": deleteArchivedAgent,
|
|
95535
95630
|
"agent copy": copyAgent,
|
package/package.json
CHANGED