@lazehq/cli 0.1.76 → 0.1.78
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 +257 -28
- package/package.json +1 -1
package/dist/laze.mjs
CHANGED
|
@@ -36884,6 +36884,7 @@ var SWITCHES = /* @__PURE__ */ new Set([
|
|
|
36884
36884
|
// retired: accepted and ignored, every push is live
|
|
36885
36885
|
"local",
|
|
36886
36886
|
"done",
|
|
36887
|
+
"quiet",
|
|
36887
36888
|
"names",
|
|
36888
36889
|
"shell",
|
|
36889
36890
|
"self",
|
|
@@ -36927,7 +36928,7 @@ function flagText({
|
|
|
36927
36928
|
}
|
|
36928
36929
|
|
|
36929
36930
|
// src/rules/cli-version.rules.ts
|
|
36930
|
-
var STAMPED = "0.1.
|
|
36931
|
+
var STAMPED = "0.1.78";
|
|
36931
36932
|
function cliVersionOf({ stamped = STAMPED } = {}) {
|
|
36932
36933
|
return stamped.startsWith("__") ? "dev" : stamped;
|
|
36933
36934
|
}
|
|
@@ -60360,6 +60361,18 @@ var vaultConnectionUseSchemaDefinition = external_exports.object({
|
|
|
60360
60361
|
}).nullable().optional()
|
|
60361
60362
|
});
|
|
60362
60363
|
var vaultConnectionUseSchema = vaultConnectionUseSchemaDefinition;
|
|
60364
|
+
var vaultKeyActivitySchemaDefinition = external_exports.object({
|
|
60365
|
+
connectionId: external_exports.string(),
|
|
60366
|
+
uses: external_exports.array(vaultConnectionUseSchema).nullable(),
|
|
60367
|
+
grants: external_exports.array(vaultGrantSchema).nullable()
|
|
60368
|
+
});
|
|
60369
|
+
var vaultKeyActivitySchema = vaultKeyActivitySchemaDefinition;
|
|
60370
|
+
var VAULT_KEY_ACTIVITY_MAX_KEYS = 50;
|
|
60371
|
+
var listVaultKeyActivityInputSchemaDefinition = external_exports.object({
|
|
60372
|
+
workspaceId: external_exports.string(),
|
|
60373
|
+
connectionIds: external_exports.array(external_exports.string()).min(1).max(VAULT_KEY_ACTIVITY_MAX_KEYS)
|
|
60374
|
+
});
|
|
60375
|
+
var listVaultKeyActivityInputSchema = listVaultKeyActivityInputSchemaDefinition;
|
|
60363
60376
|
var vaultRevokeAtProviderSchema = external_exports.enum(["revoked", "failed", "not_supported"]);
|
|
60364
60377
|
var saveGithubInstallationInputSchemaDefinition = external_exports.object({
|
|
60365
60378
|
workspaceId: external_exports.string().min(1),
|
|
@@ -60458,7 +60471,7 @@ var vaultTrpc = defineTrpcContract("vault").mutation("createConnection").withInp
|
|
|
60458
60471
|
reason: external_exports.string().trim().min(1).max(200),
|
|
60459
60472
|
reauthToken: external_exports.string().min(1).max(200).optional()
|
|
60460
60473
|
})
|
|
60461
|
-
).withOutput(external_exports.object({ fields: external_exports.record(external_exports.string(), external_exports.string()) })).mutation("beginReauth").withInput(beginVaultReauthInputSchema).withOutput(vaultReauthChallengeSchema).mutation("confirmReauth").withInput(confirmVaultReauthInputSchema).withOutput(vaultReauthProofSchema).mutation("grantConnection").withInput(grantVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("lendToChannel").withInput(lendVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("revokeGrant").withInput(revokeVaultGrantInputSchema).withOutput(external_exports.object({ revoked: external_exports.literal(true) })).query("listGrants").withInput(connectionInput).withOutput(external_exports.array(vaultGrantSchema)).mutation("shareConnection").withInput(shareVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("approveShare").withInput(approveVaultShareInputSchema).withOutput(vaultGrantSchema).mutation("approveMachineKey").withInput(approveVaultMachineKeyInputSchema).withOutput(approvedVaultMachineKeySchema).query("readLock").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(vaultReadLockSchema).query("referenceHolder").withInput(vaultReferenceHolderInputSchema).withOutput(vaultReferenceHolderSchema).mutation("unlockReads").withInput(unlockVaultReadsInputSchema).withOutput(vaultReadLockSchema).mutation("sealConnection").withInput(sealVaultConnectionInputSchema).withOutput(vaultConnectionSchema).query("listApprovals").withInput(external_exports.object({ ...workspaceInput.shape, state: vaultApprovalListStateSchema.optional() })).withOutput(external_exports.array(vaultApprovalRequestSchema)).mutation("answerApproval").withInput(answerVaultApprovalInputSchema).withOutput(vaultApprovalRequestSchema).query("listAudit").withInput(vaultAuditReadInputSchema).withOutput(vaultAuditPageSchema).query("listActivity").withInput(vaultAuditReadInputSchema).withOutput(external_exports.array(vaultAuditEntrySchema)).query("listLeases").withInput(workspaceInput).withOutput(external_exports.array(vaultLeaseSchema)).mutation("endLease").withInput(endVaultLeaseInputSchema).withOutput(external_exports.object({ ended: external_exports.literal(true) })).query("mostAsked").withInput(vaultMostAskedInputSchema).withOutput(vaultMostAskedSchema).query("judgeStatus").withInput(workspaceInput).withOutput(vaultJudgeStatusSchema).query("listLevelLimits").withInput(workspaceInput).withOutput(external_exports.array(vaultLevelLimitSchema)).mutation("setLevelLimit").withInput(setVaultLevelLimitInputSchema).withOutput(external_exports.array(vaultLevelLimitSchema)).query("listDevices").withInput(listVaultDevicesInput).withOutput(external_exports.array(vaultDeviceSchema)).mutation("beginDeviceEnrolment").withInput(workspaceInput).withOutput(vaultDeviceEnrolmentSchema).mutation("finishDeviceEnrolment").withInput(finishVaultDeviceEnrolmentInputSchema).withOutput(vaultDeviceSchema).mutation("beginDeviceApproval").withInput(external_exports.object({ ...workspaceInput.shape, deviceId: external_exports.string().min(1) })).withOutput(external_exports.object({ challenge: external_exports.string(), sealed: external_exports.array(vaultSealedMaterialSchema) })).mutation("approveDevice").withInput(approveVaultDeviceInputSchema).withOutput(vaultDeviceSchema).mutation("renameDevice").withInput(renameVaultDeviceInputSchema).withOutput(vaultDeviceSchema).mutation("removeDevice").withInput(
|
|
60474
|
+
).withOutput(external_exports.object({ fields: external_exports.record(external_exports.string(), external_exports.string()) })).mutation("beginReauth").withInput(beginVaultReauthInputSchema).withOutput(vaultReauthChallengeSchema).mutation("confirmReauth").withInput(confirmVaultReauthInputSchema).withOutput(vaultReauthProofSchema).mutation("grantConnection").withInput(grantVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("lendToChannel").withInput(lendVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("revokeGrant").withInput(revokeVaultGrantInputSchema).withOutput(external_exports.object({ revoked: external_exports.literal(true) })).query("listGrants").withInput(connectionInput).withOutput(external_exports.array(vaultGrantSchema)).query("listKeyActivity").withInput(listVaultKeyActivityInputSchema).withOutput(external_exports.array(vaultKeyActivitySchema)).mutation("shareConnection").withInput(shareVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("approveShare").withInput(approveVaultShareInputSchema).withOutput(vaultGrantSchema).mutation("approveMachineKey").withInput(approveVaultMachineKeyInputSchema).withOutput(approvedVaultMachineKeySchema).query("readLock").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(vaultReadLockSchema).query("referenceHolder").withInput(vaultReferenceHolderInputSchema).withOutput(vaultReferenceHolderSchema).mutation("unlockReads").withInput(unlockVaultReadsInputSchema).withOutput(vaultReadLockSchema).mutation("sealConnection").withInput(sealVaultConnectionInputSchema).withOutput(vaultConnectionSchema).query("listApprovals").withInput(external_exports.object({ ...workspaceInput.shape, state: vaultApprovalListStateSchema.optional() })).withOutput(external_exports.array(vaultApprovalRequestSchema)).mutation("answerApproval").withInput(answerVaultApprovalInputSchema).withOutput(vaultApprovalRequestSchema).query("listAudit").withInput(vaultAuditReadInputSchema).withOutput(vaultAuditPageSchema).query("listActivity").withInput(vaultAuditReadInputSchema).withOutput(external_exports.array(vaultAuditEntrySchema)).query("listLeases").withInput(workspaceInput).withOutput(external_exports.array(vaultLeaseSchema)).mutation("endLease").withInput(endVaultLeaseInputSchema).withOutput(external_exports.object({ ended: external_exports.literal(true) })).query("mostAsked").withInput(vaultMostAskedInputSchema).withOutput(vaultMostAskedSchema).query("judgeStatus").withInput(workspaceInput).withOutput(vaultJudgeStatusSchema).query("listLevelLimits").withInput(workspaceInput).withOutput(external_exports.array(vaultLevelLimitSchema)).mutation("setLevelLimit").withInput(setVaultLevelLimitInputSchema).withOutput(external_exports.array(vaultLevelLimitSchema)).query("listDevices").withInput(listVaultDevicesInput).withOutput(external_exports.array(vaultDeviceSchema)).mutation("beginDeviceEnrolment").withInput(workspaceInput).withOutput(vaultDeviceEnrolmentSchema).mutation("finishDeviceEnrolment").withInput(finishVaultDeviceEnrolmentInputSchema).withOutput(vaultDeviceSchema).mutation("beginDeviceApproval").withInput(external_exports.object({ ...workspaceInput.shape, deviceId: external_exports.string().min(1) })).withOutput(external_exports.object({ challenge: external_exports.string(), sealed: external_exports.array(vaultSealedMaterialSchema) })).mutation("approveDevice").withInput(approveVaultDeviceInputSchema).withOutput(vaultDeviceSchema).mutation("renameDevice").withInput(renameVaultDeviceInputSchema).withOutput(vaultDeviceSchema).mutation("removeDevice").withInput(
|
|
60462
60475
|
external_exports.object({
|
|
60463
60476
|
...workspaceInput.shape,
|
|
60464
60477
|
deviceId: external_exports.string().min(1),
|
|
@@ -64784,7 +64797,9 @@ var lazeAgentEventSchemaDefinition = external_exports.discriminatedUnion("type",
|
|
|
64784
64797
|
external_exports.object({
|
|
64785
64798
|
type: external_exports.literal("turn_alive"),
|
|
64786
64799
|
turnId: external_exports.string().min(1).optional(),
|
|
64787
|
-
messageIds: external_exports.array(external_exports.string().min(1)).optional()
|
|
64800
|
+
messageIds: external_exports.array(external_exports.string().min(1)).optional(),
|
|
64801
|
+
/** The harness or what it runs did something since the last beat. */
|
|
64802
|
+
progressing: external_exports.literal(true).optional()
|
|
64788
64803
|
}),
|
|
64789
64804
|
/** A supervisor process came up with empty queues: Laze sends it what is still unanswered. */
|
|
64790
64805
|
external_exports.object({ type: external_exports.literal("supervisor_started"), bootId: external_exports.string().min(1) }),
|
|
@@ -69561,6 +69576,11 @@ var LazeApiError = class extends Error {
|
|
|
69561
69576
|
meta;
|
|
69562
69577
|
};
|
|
69563
69578
|
var AGENT_MIGRATED = "agent_migrated";
|
|
69579
|
+
function unreachableReasonOf(error63) {
|
|
69580
|
+
if (!(error63 instanceof TypeError) || error63.message !== "fetch failed") return void 0;
|
|
69581
|
+
const { cause } = error63;
|
|
69582
|
+
return cause instanceof Error && cause.message ? cause.message : "the connection failed";
|
|
69583
|
+
}
|
|
69564
69584
|
function migratedNoticeOf(error63) {
|
|
69565
69585
|
if (!(error63 instanceof LazeApiError) || error63.code !== AGENT_MIGRATED) return void 0;
|
|
69566
69586
|
const notice = typeof error63.meta?.notice === "string" ? error63.meta.notice : error63.message;
|
|
@@ -75314,15 +75334,21 @@ the press brings you the edited text: update the native draft with it first, the
|
|
|
75314
75334
|
A card you post or update while answering is linked under your reply: don't describe where the
|
|
75315
75335
|
card is, say what changed.
|
|
75316
75336
|
|
|
75337
|
+
Labels and priority are optional. \`--label <word>\` adds a topic word people filter by: run
|
|
75338
|
+
\`laze feed labels\` and reuse one first; they show across the workspace, so never a person,
|
|
75339
|
+
customer or deal name. \`--priority high|low|<0 to 100>\` orders the feed under urgent cards:
|
|
75340
|
+
leave it out by default, high is rare. With Manage my feed, \`laze feed rank\` lists your owner's
|
|
75341
|
+
open cards by title and ranks them for them alone.
|
|
75342
|
+
|
|
75317
75343
|
## Apps
|
|
75318
75344
|
|
|
75319
75345
|
Asked for an app (a tracker, a CRM, a dashboard, a page that explains something), read the full
|
|
75320
75346
|
guide first: https://laze.so/docs/agents/apps.md. The short version:
|
|
75321
75347
|
|
|
75322
|
-
- Create it where it was asked for
|
|
75323
|
-
|
|
75324
|
-
|
|
75325
|
-
-
|
|
75348
|
+
- Create it where it was asked for: \`laze app create "<Name>" --channel <channel>\`. It starts
|
|
75349
|
+
empty: build it from scratch and design it for its subject. Be visual and creative (a diagram,
|
|
75350
|
+
a map, a timeline, something to explore), not stat tiles and bullet lists.
|
|
75351
|
+
- The slides template is only for a new deck. Sent files that already are a page or a deck (an
|
|
75326
75352
|
HTML export, a zip with index.html, a static site): unpack them as they are into a new app
|
|
75327
75353
|
with no template (\`laze app create "<Name>" --channel <channel>\`), index.html at the top of
|
|
75328
75354
|
its folder, then \`laze app push -m "<what it is>"\`. "Move them here" or "put this here" with
|
|
@@ -79134,7 +79160,7 @@ var appCliCommands = [
|
|
|
79134
79160
|
command: "laze app create",
|
|
79135
79161
|
operation: "createApp",
|
|
79136
79162
|
arguments: ["<name>", "--template <template>", "--dir <dir>", "--channel <c>"],
|
|
79137
|
-
summary: "Create an app in a folder linked to it. --template starts
|
|
79163
|
+
summary: "Create an app in a folder linked to it. With no --template it starts empty, to build from scratch. --template slides starts a deck (laze app templates lists the templates): its files are the first live version and land in the folder to change"
|
|
79138
79164
|
},
|
|
79139
79165
|
{
|
|
79140
79166
|
command: "laze app templates",
|
|
@@ -89412,6 +89438,52 @@ var feedPinByKeyInputSchemaDefinition = external_exports.object({
|
|
|
89412
89438
|
pinned: external_exports.boolean()
|
|
89413
89439
|
});
|
|
89414
89440
|
|
|
89441
|
+
// ../../modules/feed/contract/src/feed.priority.ts
|
|
89442
|
+
var FEED_PRIORITY = { low: 25, normal: 50, high: 75 };
|
|
89443
|
+
var FEED_PRIORITY_MAX = 100;
|
|
89444
|
+
var FEED_RANK_MAX = 200;
|
|
89445
|
+
var feedPrioritySchemaDefinition = external_exports.union([
|
|
89446
|
+
external_exports.enum(["low", "normal", "high"]).transform((word3) => FEED_PRIORITY[word3]),
|
|
89447
|
+
external_exports.number().int().min(0).max(FEED_PRIORITY_MAX)
|
|
89448
|
+
]);
|
|
89449
|
+
var feedPrioritySchema = feedPrioritySchemaDefinition;
|
|
89450
|
+
function feedPriorityWordOf(priority) {
|
|
89451
|
+
if (priority > FEED_PRIORITY.normal) return "high";
|
|
89452
|
+
return priority < FEED_PRIORITY.normal ? "low" : "normal";
|
|
89453
|
+
}
|
|
89454
|
+
var feedRankEntrySchemaDefinition = external_exports.object({
|
|
89455
|
+
itemId: external_exports.string().min(1),
|
|
89456
|
+
/** Null goes back to the card's own priority. */
|
|
89457
|
+
priority: feedPrioritySchema.nullable()
|
|
89458
|
+
});
|
|
89459
|
+
var feedRankByKeyInputSchemaDefinition = external_exports.object({
|
|
89460
|
+
ranks: external_exports.array(feedRankEntrySchemaDefinition).min(1).max(FEED_RANK_MAX)
|
|
89461
|
+
});
|
|
89462
|
+
var feedRankAnswerSchemaDefinition = external_exports.object({
|
|
89463
|
+
ranked: external_exports.array(external_exports.string()),
|
|
89464
|
+
refused: external_exports.array(external_exports.object({ itemId: external_exports.string(), reason: external_exports.enum(["not_found", "approval"]) }))
|
|
89465
|
+
});
|
|
89466
|
+
var feedRankCardSchemaDefinition = external_exports.object({
|
|
89467
|
+
id: external_exports.string(),
|
|
89468
|
+
title: external_exports.string(),
|
|
89469
|
+
tag: external_exports.string(),
|
|
89470
|
+
labels: external_exports.array(external_exports.string()),
|
|
89471
|
+
author: external_exports.string(),
|
|
89472
|
+
urgent: external_exports.boolean(),
|
|
89473
|
+
pinned: external_exports.boolean(),
|
|
89474
|
+
/** What the person reads now, 50 for normal. */
|
|
89475
|
+
priority: external_exports.number().int(),
|
|
89476
|
+
/** The person's own rank holds, not the card's priority. */
|
|
89477
|
+
ranked: external_exports.boolean(),
|
|
89478
|
+
sortAt: external_exports.iso.datetime()
|
|
89479
|
+
});
|
|
89480
|
+
var feedRankViewSchemaDefinition = external_exports.object({
|
|
89481
|
+
cards: external_exports.array(feedRankCardSchemaDefinition),
|
|
89482
|
+
/** Every open card that can be ranked; `cards` stops at FEED_RANK_MAX. */
|
|
89483
|
+
total: external_exports.number().int().nonnegative()
|
|
89484
|
+
});
|
|
89485
|
+
var feedLabelListSchemaDefinition = external_exports.object({ labels: external_exports.array(external_exports.string()) });
|
|
89486
|
+
|
|
89415
89487
|
// ../../modules/feed/contract/src/feed.ts
|
|
89416
89488
|
var feedAuthorSchemaDefinition = external_exports.object({
|
|
89417
89489
|
kind: external_exports.enum(["agent", "person", "system"]),
|
|
@@ -89430,7 +89502,9 @@ var feedActionSchemaDefinition = external_exports.object({
|
|
|
89430
89502
|
/** What the button says once pressed, and the handled line: "Sent". */
|
|
89431
89503
|
doneLabel: external_exports.string().optional(),
|
|
89432
89504
|
/** A done action closes the card as it is pressed; the agent still hears which one. */
|
|
89433
|
-
done: external_exports.boolean().optional()
|
|
89505
|
+
done: external_exports.boolean().optional(),
|
|
89506
|
+
/** Needs words: pressing opens the comment box prefilled with the label and sends nothing. */
|
|
89507
|
+
comment: external_exports.boolean().optional()
|
|
89434
89508
|
});
|
|
89435
89509
|
var feedActionSchema = feedActionSchemaDefinition;
|
|
89436
89510
|
var feedItemActionSchemaDefinition = external_exports.object({
|
|
@@ -89440,7 +89514,9 @@ var feedItemActionSchemaDefinition = external_exports.object({
|
|
|
89440
89514
|
style: external_exports.enum(["primary", "secondary"]),
|
|
89441
89515
|
doneLabel: external_exports.string().nullable(),
|
|
89442
89516
|
/** Present only on a done action: pressing it closes the card for everyone who gets it. */
|
|
89443
|
-
done: external_exports.literal(true).optional()
|
|
89517
|
+
done: external_exports.literal(true).optional(),
|
|
89518
|
+
/** Present only on a needs-words action; a client without it sends `message` as a plain press. */
|
|
89519
|
+
comment: external_exports.literal(true).optional()
|
|
89444
89520
|
});
|
|
89445
89521
|
var feedItemActionSchema = feedItemActionSchemaDefinition;
|
|
89446
89522
|
var feedLinkSchemaDefinition = external_exports.object({ label: external_exports.string(), url: external_exports.string() });
|
|
@@ -89492,7 +89568,7 @@ var feedContentSchemaDefinition = external_exports.object({
|
|
|
89492
89568
|
rich: feedRichBodySchemaDefinition.nullable().default(null)
|
|
89493
89569
|
});
|
|
89494
89570
|
var feedGroupSchema = external_exports.string().trim().min(1).max(80);
|
|
89495
|
-
var feedLabelSchema = external_exports.string().trim().min(1).max(24)
|
|
89571
|
+
var feedLabelSchema = external_exports.string().trim().min(1).max(24);
|
|
89496
89572
|
var feedLabelsSchema = external_exports.array(feedLabelSchema).max(5);
|
|
89497
89573
|
var feedDateSchema = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/, "a date like 2026-10-14");
|
|
89498
89574
|
var feedSnoozeForSchemaDefinition = external_exports.object({
|
|
@@ -89514,9 +89590,11 @@ var postFeedItemInputSchemaDefinition = external_exports.object({
|
|
|
89514
89590
|
/** Keeps the item under "Coming up" for everyone until then. */
|
|
89515
89591
|
showAt: external_exports.iso.datetime({ offset: true }).nullable().default(null),
|
|
89516
89592
|
snoozeFor: feedSnoozeForSchema.nullable().default(null),
|
|
89517
|
-
/** The group the card belongs to, and its labels, the group's
|
|
89593
|
+
/** The group the card belongs to, and its labels, which also filter the group's cards. */
|
|
89518
89594
|
group: feedGroupSchema.nullable().default(null),
|
|
89519
89595
|
labels: feedLabelsSchema.default([]),
|
|
89596
|
+
/** A word or 0 to 100; left out it reads as normal, and the feed sorts by it. */
|
|
89597
|
+
priority: feedPrioritySchema.nullable().default(null),
|
|
89520
89598
|
/** One card per open loop: a second post with the same key updates that card instead. */
|
|
89521
89599
|
loop: external_exports.string().trim().min(1).max(120).nullable().default(null),
|
|
89522
89600
|
/** The day the agent acts unless a person says stop; the card counts down to it. */
|
|
@@ -89545,6 +89623,8 @@ var updateFeedItemInputSchemaDefinition = external_exports.object({
|
|
|
89545
89623
|
snoozeFor: feedSnoozeForSchema.optional(),
|
|
89546
89624
|
group: feedGroupSchema.nullable().optional(),
|
|
89547
89625
|
labels: feedLabelsSchema.optional(),
|
|
89626
|
+
/** Null goes back to normal. A person's own rank stays over it. */
|
|
89627
|
+
priority: feedPrioritySchema.nullable().optional(),
|
|
89548
89628
|
/** Null removes the countdown. */
|
|
89549
89629
|
autoSendOn: feedDateSchema.nullable().optional(),
|
|
89550
89630
|
/** Puts the item back in front of everyone who handled it, without a reply. */
|
|
@@ -89560,7 +89640,11 @@ var replyFeedItemInputSchemaDefinition = external_exports.object({
|
|
|
89560
89640
|
/** Wakes the item now for everyone who snoozed it. */
|
|
89561
89641
|
urgent: external_exports.boolean().default(false),
|
|
89562
89642
|
/** Closes the item with this reply: it leaves every feed and later replies keep it closed. */
|
|
89563
|
-
done: external_exports.boolean().default(false)
|
|
89643
|
+
done: external_exports.boolean().default(false),
|
|
89644
|
+
/** A plain acknowledgement: it lands on the card, which stays where it is, and nobody is told. */
|
|
89645
|
+
quiet: external_exports.boolean().default(false),
|
|
89646
|
+
/** Snoozes the item for these people in the same step, as `update` does. */
|
|
89647
|
+
snoozeFor: feedSnoozeForSchema.optional()
|
|
89564
89648
|
});
|
|
89565
89649
|
var feedEntrySchemaDefinition = external_exports.object({
|
|
89566
89650
|
id: external_exports.string(),
|
|
@@ -89658,7 +89742,9 @@ var feedViewerStateSchemaDefinition = external_exports.object({
|
|
|
89658
89742
|
/** The reader has seen the newest thing on the card, or marked it read. */
|
|
89659
89743
|
isRead: external_exports.boolean().optional(),
|
|
89660
89744
|
/** The card's text names the reader. */
|
|
89661
|
-
mentioned: external_exports.boolean().optional()
|
|
89745
|
+
mentioned: external_exports.boolean().optional(),
|
|
89746
|
+
/** What the reader's rank or the card says, 0 to 100; absent reads as normal. */
|
|
89747
|
+
priority: external_exports.number().int().optional()
|
|
89662
89748
|
});
|
|
89663
89749
|
var feedViewerStateSchema = feedViewerStateSchemaDefinition;
|
|
89664
89750
|
var feedAssigneeSchemaDefinition = external_exports.object({
|
|
@@ -89667,6 +89753,13 @@ var feedAssigneeSchemaDefinition = external_exports.object({
|
|
|
89667
89753
|
/** Who added them; null for the owner. */
|
|
89668
89754
|
sharedByName: external_exports.string().nullable()
|
|
89669
89755
|
});
|
|
89756
|
+
var feedParticipantSchemaDefinition = external_exports.object({
|
|
89757
|
+
userId: external_exports.string(),
|
|
89758
|
+
/** Empty when only the workspace knows it: the reader's member list names them. */
|
|
89759
|
+
name: external_exports.string(),
|
|
89760
|
+
sharedByName: external_exports.string().nullable().optional(),
|
|
89761
|
+
sharedById: external_exports.string().nullable().optional()
|
|
89762
|
+
});
|
|
89670
89763
|
var feedSharingSchemaDefinition = external_exports.object({
|
|
89671
89764
|
ownerUserId: external_exports.string(),
|
|
89672
89765
|
ownerName: external_exports.string(),
|
|
@@ -89700,6 +89793,8 @@ var feedItemSchemaDefinition = external_exports.object({
|
|
|
89700
89793
|
deviceApproval: external_exports.object({ deviceId: external_exports.string() }).optional(),
|
|
89701
89794
|
group: external_exports.string().nullable(),
|
|
89702
89795
|
labels: external_exports.array(external_exports.string()),
|
|
89796
|
+
/** What the card's author set, 0 to 100; absent reads as normal. */
|
|
89797
|
+
priority: external_exports.number().int().optional(),
|
|
89703
89798
|
loop: external_exports.string().nullable(),
|
|
89704
89799
|
/** How many groups the card has been posted in: 2 shows "Seen 2 times". */
|
|
89705
89800
|
groupDays: external_exports.number().int().nonnegative(),
|
|
@@ -89711,6 +89806,8 @@ var feedItemSchemaDefinition = external_exports.object({
|
|
|
89711
89806
|
lastReplyAt: external_exports.iso.datetime().nullable(),
|
|
89712
89807
|
/** Set once the item is shared with someone besides its owner. */
|
|
89713
89808
|
sharing: feedSharingSchemaDefinition.nullable().optional(),
|
|
89809
|
+
/** Who is on an agent's plain card, for its faces; absent on a card with no one to show. */
|
|
89810
|
+
participants: external_exports.array(feedParticipantSchemaDefinition).optional(),
|
|
89714
89811
|
me: feedViewerStateSchema
|
|
89715
89812
|
});
|
|
89716
89813
|
var feedItemSchema = feedItemSchemaDefinition;
|
|
@@ -89745,7 +89842,8 @@ var feedFilterCardSchemaDefinition = external_exports.object({
|
|
|
89745
89842
|
channelId: external_exports.string().nullable(),
|
|
89746
89843
|
author: feedAuthorSchema,
|
|
89747
89844
|
unread: external_exports.boolean().optional(),
|
|
89748
|
-
mentioned: external_exports.boolean().optional()
|
|
89845
|
+
mentioned: external_exports.boolean().optional(),
|
|
89846
|
+
labels: external_exports.array(external_exports.string()).optional()
|
|
89749
89847
|
});
|
|
89750
89848
|
var feedFilterCardSchema = feedFilterCardSchemaDefinition;
|
|
89751
89849
|
var feedPageSchemaDefinition = external_exports.object({
|
|
@@ -89765,7 +89863,9 @@ var feedAgentItemSchemaDefinition = external_exports.object({
|
|
|
89765
89863
|
/** Person entries newer than the agent's own last reply, as messages ready to act on. */
|
|
89766
89864
|
messages: external_exports.array(external_exports.string()),
|
|
89767
89865
|
/** On a post or update in a turn: the turn's reply will link the card. */
|
|
89768
|
-
linkedToReply: external_exports.boolean().optional()
|
|
89866
|
+
linkedToReply: external_exports.boolean().optional(),
|
|
89867
|
+
/** On a quiet reply: what the agent still owes the people on the card. */
|
|
89868
|
+
reminder: external_exports.string().optional()
|
|
89769
89869
|
});
|
|
89770
89870
|
var feedAgentItemSchema = feedAgentItemSchemaDefinition;
|
|
89771
89871
|
var itemRef = external_exports.object({ workspaceId: external_exports.string().min(1), itemId: external_exports.string().min(1) });
|
|
@@ -90058,7 +90158,8 @@ var feedItemChangedPayloadSchemaDefinition = external_exports.object({
|
|
|
90058
90158
|
"approval_resolved",
|
|
90059
90159
|
"closed",
|
|
90060
90160
|
"pinned",
|
|
90061
|
-
"read_marked"
|
|
90161
|
+
"read_marked",
|
|
90162
|
+
"ranked"
|
|
90062
90163
|
]),
|
|
90063
90164
|
byKind,
|
|
90064
90165
|
byId: external_exports.string(),
|
|
@@ -90066,6 +90167,8 @@ var feedItemChangedPayloadSchemaDefinition = external_exports.object({
|
|
|
90066
90167
|
entryId: external_exports.string().nullable(),
|
|
90067
90168
|
/** Written as a reply in the item card's chat thread, so it is already there. */
|
|
90068
90169
|
fromThread: external_exports.boolean().optional(),
|
|
90170
|
+
/** A quiet reply: it reaches the card and pushes nobody. */
|
|
90171
|
+
quiet: external_exports.boolean().optional(),
|
|
90069
90172
|
/** The agent the item answers to, so its runtime can pick up the entry. */
|
|
90070
90173
|
agentId: external_exports.string(),
|
|
90071
90174
|
showAt: external_exports.iso.datetime().nullable(),
|
|
@@ -90235,19 +90338,47 @@ function pairsOf(args) {
|
|
|
90235
90338
|
}
|
|
90236
90339
|
const actions = args.lists.action ?? [];
|
|
90237
90340
|
const doneLabels = new Set(args.lists["done-action"] ?? []);
|
|
90341
|
+
const commentLabels = new Set(args.lists["comment-action"] ?? []);
|
|
90238
90342
|
const labels = /* @__PURE__ */ new Set();
|
|
90239
90343
|
if (actions.length > 0) {
|
|
90240
90344
|
fields.actions = actions.map((value) => {
|
|
90241
90345
|
const [label3, message2] = pairOf({ value, flag: "action" });
|
|
90242
90346
|
labels.add(label3);
|
|
90243
|
-
return
|
|
90347
|
+
return {
|
|
90348
|
+
label: label3,
|
|
90349
|
+
message: message2,
|
|
90350
|
+
...doneLabels.has(label3) ? { done: true } : {},
|
|
90351
|
+
...commentLabels.has(label3) ? { comment: true } : {}
|
|
90352
|
+
};
|
|
90244
90353
|
});
|
|
90245
90354
|
}
|
|
90355
|
+
refuseActionFlags({ labels, doneLabels, commentLabels });
|
|
90356
|
+
return fields;
|
|
90357
|
+
}
|
|
90358
|
+
function refuseActionFlags({
|
|
90359
|
+
labels,
|
|
90360
|
+
doneLabels,
|
|
90361
|
+
commentLabels
|
|
90362
|
+
}) {
|
|
90246
90363
|
for (const label3 of doneLabels) {
|
|
90247
90364
|
if (!labels.has(label3))
|
|
90248
90365
|
throw new Error(`--done-action "${label3}" names no --action of this card`);
|
|
90249
90366
|
}
|
|
90250
|
-
|
|
90367
|
+
for (const label3 of commentLabels) {
|
|
90368
|
+
if (!labels.has(label3))
|
|
90369
|
+
throw new Error(`--comment-action "${label3}" names no --action of this card`);
|
|
90370
|
+
if (doneLabels.has(label3))
|
|
90371
|
+
throw new Error(`"${label3}" cannot be both --done-action and --comment-action`);
|
|
90372
|
+
}
|
|
90373
|
+
}
|
|
90374
|
+
function priorityOf(text3) {
|
|
90375
|
+
if (text3 === "high" || text3 === "low" || text3 === "normal") return text3;
|
|
90376
|
+
const number4 = Number(text3);
|
|
90377
|
+
if (text3.trim() !== "" && Number.isInteger(number4) && number4 >= 0 && number4 <= 100) return number4;
|
|
90378
|
+
throw new Error(`Priority "${text3}" is not high, low, normal or a number from 0 to 100`);
|
|
90379
|
+
}
|
|
90380
|
+
function rankOf(text3) {
|
|
90381
|
+
return text3 === "default" ? null : priorityOf(text3);
|
|
90251
90382
|
}
|
|
90252
90383
|
function feedFlagsOf({ args }) {
|
|
90253
90384
|
if (args.flags.body !== void 0) throw new Error(FEED_NO_BODY);
|
|
@@ -90265,6 +90396,8 @@ function feedFlagsOf({ args }) {
|
|
|
90265
90396
|
if (group) fields.group = group;
|
|
90266
90397
|
const labels = args.lists.label ?? [];
|
|
90267
90398
|
if (labels.length > 0) fields.labels = [...labels];
|
|
90399
|
+
const priority = flagText({ args, name: "priority" });
|
|
90400
|
+
if (priority) fields.priority = priority === "none" ? null : priorityOf(priority);
|
|
90268
90401
|
const autoSendOn = flagText({ args, name: "auto-send-on" });
|
|
90269
90402
|
if (autoSendOn) fields.autoSendOn = dateOf(autoSendOn);
|
|
90270
90403
|
const rich = richOf(args);
|
|
@@ -90335,16 +90468,18 @@ var USAGE10 = `Usage:
|
|
|
90335
90468
|
[--metric <json|@file.json> | --table <csv|@file.csv>]
|
|
90336
90469
|
[--image <path|url|fileId>]... [--file <path|url|fileId>]... (at most 6 on a card)
|
|
90337
90470
|
[--link <label>=<url>]... [--action <label>=<message>]... [--done-action <label>]...
|
|
90471
|
+
[--comment-action <label>]...
|
|
90338
90472
|
[--to <userId>]...
|
|
90339
|
-
[--urgent] [--
|
|
90340
|
-
[--snooze-for <userId>... --until <ISO time>]
|
|
90341
|
-
[--group <name> [--label <word>]...
|
|
90473
|
+
[--urgent] [--priority high|low|normal|<0 to 100>] [--done-label <line>]
|
|
90474
|
+
[--show-at <ISO time>] [--snooze-for <userId>... --until <ISO time>]
|
|
90475
|
+
[--group <name>] [--label <word>]... [--loop <key> [--reopen]]
|
|
90342
90476
|
[--auto-send-on <YYYY-MM-DD>] [--force]
|
|
90343
90477
|
laze feed update <id> [the post flags that change] [--title <title>]
|
|
90344
90478
|
[--image|--file <path|url|fileId>]... (adds) [--remove-file <fileId|name>]...
|
|
90345
|
-
[--auto-send-on <YYYY-MM-DD>|none]
|
|
90479
|
+
[--auto-send-on <YYYY-MM-DD>|none] [--priority high|low|normal|<0 to 100>|none]
|
|
90346
90480
|
[--show-at <ISO time>|none] [--snooze-for <userId>... --until <ISO time>|none] [--reopen]
|
|
90347
|
-
laze feed reply <id> <text> [--done] [--urgent] [--force]
|
|
90481
|
+
laze feed reply <id> <text> [--done] [--quiet] [--urgent] [--force]
|
|
90482
|
+
[--snooze-for <userId>... --until <ISO time>]
|
|
90348
90483
|
laze feed read <id>
|
|
90349
90484
|
laze feed inbox
|
|
90350
90485
|
laze feed close <id>|--loop <key> --note <text>
|
|
@@ -90360,6 +90495,10 @@ var USAGE10 = `Usage:
|
|
|
90360
90495
|
laze feed done|put-back|unsnooze|pin|unpin <id>
|
|
90361
90496
|
laze feed snooze <id> --until <ISO time>
|
|
90362
90497
|
laze feed channel <channelId>
|
|
90498
|
+
laze feed labels [--json]
|
|
90499
|
+
laze feed rank [--json]
|
|
90500
|
+
laze feed rank <id> high|low|normal|<0 to 100>|default
|
|
90501
|
+
laze feed rank --set <id>=<priority>... | --file <ranks.json>
|
|
90363
90502
|
|
|
90364
90503
|
Managing your owner's feed: when your owner turned on Manage my feed for you (in your settings,
|
|
90365
90504
|
or laze agent feed-access <you> on), laze feed list, count, decisions, done, put-back, snooze,
|
|
@@ -90367,6 +90506,13 @@ unsnooze, pin and unpin work on their whole feed, cards from every agent include
|
|
|
90367
90506
|
is stale, snooze what can wait, pin what matters. You never press actions, comment or answer
|
|
90368
90507
|
approvals there: those stay your owner's. Each change shows on the card as yours.
|
|
90369
90508
|
|
|
90509
|
+
Labels and priority are optional. A label is a word people filter by: run laze feed labels and
|
|
90510
|
+
reuse one before adding a word. Labels show across the workspace, so never a person, customer or
|
|
90511
|
+
deal name. Priority orders the feed under Urgent: leave it out for most cards, high is rare and
|
|
90512
|
+
never your default, low is for what can wait. With Manage my feed, laze feed rank lists your
|
|
90513
|
+
owner's open cards by title and ranks them for them alone, like a secretary would; lower what
|
|
90514
|
+
went stale. Read titles there rather than the whole feed.
|
|
90515
|
+
|
|
90370
90516
|
${FEED_WRITING}`;
|
|
90371
90517
|
function flagsOf(args) {
|
|
90372
90518
|
try {
|
|
@@ -90514,9 +90660,13 @@ async function feedReply({ context, args }) {
|
|
|
90514
90660
|
body: text3,
|
|
90515
90661
|
urgent: Boolean(args.flags.urgent),
|
|
90516
90662
|
...args.flags.force ? { force: true } : {},
|
|
90517
|
-
...args.flags.done === true ? { done: true } : {}
|
|
90663
|
+
...args.flags.done === true ? { done: true } : {},
|
|
90664
|
+
...args.flags.quiet === true ? { quiet: true } : {},
|
|
90665
|
+
...snoozeOf(args)
|
|
90518
90666
|
});
|
|
90519
90667
|
printItem({ context, args, item: replied });
|
|
90668
|
+
if (replied.reminder && !args.flags.json) context.out(`${replied.reminder}
|
|
90669
|
+
`);
|
|
90520
90670
|
}
|
|
90521
90671
|
async function feedRead({ context, args }) {
|
|
90522
90672
|
const itemId = args.words[2];
|
|
@@ -90612,7 +90762,9 @@ function printCard2({ context, item }) {
|
|
|
90612
90762
|
const when = item.me.place === "coming_up" ? ` (back ${item.me.snoozedUntil ?? item.showAt ?? ""})` : "";
|
|
90613
90763
|
const handled = item.me.place === "handled" && item.me.handledLabel;
|
|
90614
90764
|
const pinned = item.me.pinned ? " (pinned)" : "";
|
|
90615
|
-
const
|
|
90765
|
+
const word3 = feedPriorityWordOf(item.me.priority ?? FEED_PRIORITY.normal);
|
|
90766
|
+
const marks = `${pinned}${word3 === "normal" ? "" : ` (${word3})`}${item.labels.map((one) => ` [${one}]`).join("")}`;
|
|
90767
|
+
const shown2 = `${item.title}${marks}${when}${handled ? ` ${handled}` : ""}`;
|
|
90616
90768
|
context.out(`${item.id} ${item.tag} ${shown2}
|
|
90617
90769
|
`);
|
|
90618
90770
|
if (item.me.place === "handled") return;
|
|
@@ -90721,6 +90873,73 @@ function moveItem(path) {
|
|
|
90721
90873
|
printMoved({ context, args, item });
|
|
90722
90874
|
};
|
|
90723
90875
|
}
|
|
90876
|
+
async function ranksOf({
|
|
90877
|
+
context,
|
|
90878
|
+
args
|
|
90879
|
+
}) {
|
|
90880
|
+
const file3 = flagText({ args, name: "file" });
|
|
90881
|
+
if (file3) {
|
|
90882
|
+
const parsed = JSON.parse(await readFile33(resolve15(context.cwd, file3), "utf8"));
|
|
90883
|
+
if (Array.isArray(parsed)) return parsed;
|
|
90884
|
+
throw new CliUsageError("--file holds a list of {itemId, priority}");
|
|
90885
|
+
}
|
|
90886
|
+
const [itemId, priority] = args.words.slice(2);
|
|
90887
|
+
const named = itemId && priority ? [`${itemId}=${priority}`] : [];
|
|
90888
|
+
return [...named, ...args.lists.set ?? []].map((pair2) => {
|
|
90889
|
+
const at = pair2.indexOf("=");
|
|
90890
|
+
if (at < 1) throw new CliUsageError(USAGE10);
|
|
90891
|
+
try {
|
|
90892
|
+
return { itemId: pair2.slice(0, at), priority: rankOf(pair2.slice(at + 1)) };
|
|
90893
|
+
} catch (error63) {
|
|
90894
|
+
throw new CliUsageError(error63 instanceof Error ? error63.message : String(error63));
|
|
90895
|
+
}
|
|
90896
|
+
});
|
|
90897
|
+
}
|
|
90898
|
+
function printRankView({
|
|
90899
|
+
context,
|
|
90900
|
+
args,
|
|
90901
|
+
view
|
|
90902
|
+
}) {
|
|
90903
|
+
if (args.flags.json) return context.out(`${JSON.stringify(view, null, 2)}
|
|
90904
|
+
`);
|
|
90905
|
+
if (view.cards.length === 0) return context.out("No open cards to rank.\n");
|
|
90906
|
+
for (const card2 of view.cards) {
|
|
90907
|
+
const marks = `${card2.urgent ? " (urgent)" : ""}${card2.pinned ? " (pinned)" : ""}`;
|
|
90908
|
+
const labels = card2.labels.map((one) => ` [${one}]`).join("");
|
|
90909
|
+
context.out(`${card2.id} ${card2.priority} ${card2.title}${marks}${labels} ${card2.author}
|
|
90910
|
+
`);
|
|
90911
|
+
}
|
|
90912
|
+
if (view.total > view.cards.length) {
|
|
90913
|
+
context.out(`${view.cards.length} of ${view.total} open cards
|
|
90914
|
+
`);
|
|
90915
|
+
}
|
|
90916
|
+
}
|
|
90917
|
+
async function feedRank({ context, args }) {
|
|
90918
|
+
const single = args.words[2] !== void 0;
|
|
90919
|
+
const ranks = await ranksOf({ context, args });
|
|
90920
|
+
if (single && ranks.length === 0) throw new CliUsageError(USAGE10);
|
|
90921
|
+
const { client } = await signedIn({ context, args });
|
|
90922
|
+
if (ranks.length === 0) {
|
|
90923
|
+
const view = await client.get("/api/feed/mine/rank");
|
|
90924
|
+
return printRankView({ context, args, view });
|
|
90925
|
+
}
|
|
90926
|
+
const answer6 = await client.post("/api/feed/mine/rank", { ranks });
|
|
90927
|
+
if (args.flags.json) return context.out(`${JSON.stringify(answer6, null, 2)}
|
|
90928
|
+
`);
|
|
90929
|
+
context.out(`Ranked ${answer6.ranked.length} of ${ranks.length}
|
|
90930
|
+
`);
|
|
90931
|
+
for (const one of answer6.refused) context.out(` ${one.itemId} ${one.reason}
|
|
90932
|
+
`);
|
|
90933
|
+
}
|
|
90934
|
+
async function feedLabels({ context, args }) {
|
|
90935
|
+
const { client } = await signedIn({ context, args });
|
|
90936
|
+
const { labels } = await client.get("/api/feed/labels");
|
|
90937
|
+
if (args.flags.json) return context.out(`${JSON.stringify(labels, null, 2)}
|
|
90938
|
+
`);
|
|
90939
|
+
if (labels.length === 0) return context.out("No labels yet.\n");
|
|
90940
|
+
context.out(`${labels.join("\n")}
|
|
90941
|
+
`);
|
|
90942
|
+
}
|
|
90724
90943
|
async function feedSnooze({ context, args }) {
|
|
90725
90944
|
const itemId = args.words[2];
|
|
90726
90945
|
const until = flagText({ args, name: "until" });
|
|
@@ -90758,6 +90977,8 @@ var FEED_COMMANDS = {
|
|
|
90758
90977
|
done: moveItem("done"),
|
|
90759
90978
|
"put-back": moveItem("put-back"),
|
|
90760
90979
|
unsnooze: moveItem("unsnooze"),
|
|
90980
|
+
rank: feedRank,
|
|
90981
|
+
labels: feedLabels,
|
|
90761
90982
|
pin: pinItem(true),
|
|
90762
90983
|
unpin: pinItem(false),
|
|
90763
90984
|
snooze: feedSnooze,
|
|
@@ -96701,12 +96922,15 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
|
|
|
96701
96922
|
laze feed done|put-back|unsnooze|pin|unpin <id>, snooze <id> --until <time> move or pin a card
|
|
96702
96923
|
an agent whose owner turned on Manage my feed runs these on its owner's whole feed
|
|
96703
96924
|
laze feed channel <channelId> the feed cards a channel shows
|
|
96925
|
+
laze feed labels the workspace's labels, to reuse before adding one
|
|
96926
|
+
laze feed rank [<id> <priority>|--set <id>=<priority>...] order your own feed for you alone
|
|
96927
|
+
an agent with Manage my feed lists its owner's cards by title and ranks many in one call
|
|
96704
96928
|
laze schedule add <name> --prompt <p> --cron "0 8 * * 1-5" --tz <zone> work on a timer
|
|
96705
96929
|
laze schedule list|update|pause|resume|rm|runs your agent's schedules and their runs
|
|
96706
96930
|
laze memory get|set|append|history <file>, search, pull SOUL.md, AGENTS.md, a channel's MEMORY.md
|
|
96707
96931
|
laze wiki list|get|put|search|history|mv|rm the workspace wiki
|
|
96708
96932
|
laze skill list|install|show|pull|rm|update|pin|unpin your agent's skills and the catalogue
|
|
96709
|
-
laze app create <name>
|
|
96933
|
+
laze app create <name> ... build an app from scratch (--template slides for a deck), push, revert
|
|
96710
96934
|
laze app every laze app command, with its flags
|
|
96711
96935
|
laze agents list | laze agents status <name> the workspace's agents and their context
|
|
96712
96936
|
laze agents show <name> [--json] an agent's profile: kind, how it runs, intelligence
|
|
@@ -97106,7 +97330,12 @@ function exitCodeOf({ context, error: error63 }) {
|
|
|
97106
97330
|
`);
|
|
97107
97331
|
else if (error63 instanceof LazeApiError) context.err(`laze: ${error63.message} (${error63.code})
|
|
97108
97332
|
`);
|
|
97109
|
-
else
|
|
97333
|
+
else {
|
|
97334
|
+
const unreachable = unreachableReasonOf(error63);
|
|
97335
|
+
if (unreachable === void 0) throw error63;
|
|
97336
|
+
context.err(`laze: could not reach Laze: ${unreachable}
|
|
97337
|
+
`);
|
|
97338
|
+
}
|
|
97110
97339
|
return 1;
|
|
97111
97340
|
}
|
|
97112
97341
|
|
package/package.json
CHANGED