@lazehq/cli 0.1.63 → 0.1.64
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 +64 -11
- package/package.json +1 -1
package/dist/laze.mjs
CHANGED
|
@@ -36371,7 +36371,7 @@ function flagText({
|
|
|
36371
36371
|
}
|
|
36372
36372
|
|
|
36373
36373
|
// src/rules/cli-version.rules.ts
|
|
36374
|
-
var STAMPED = "0.1.
|
|
36374
|
+
var STAMPED = "0.1.64";
|
|
36375
36375
|
function cliVersionOf({ stamped = STAMPED } = {}) {
|
|
36376
36376
|
return stamped.startsWith("__") ? "dev" : stamped;
|
|
36377
36377
|
}
|
|
@@ -59888,7 +59888,9 @@ var extendChannelInputSchema = extendChannelInputSchemaDefinition;
|
|
|
59888
59888
|
var openDirectInputSchemaDefinition = external_exports.object({
|
|
59889
59889
|
workspaceId: workspaceIdSchema,
|
|
59890
59890
|
/** The other people; the opener is added. */
|
|
59891
|
-
userIds: external_exports.array(idSchema4).
|
|
59891
|
+
userIds: external_exports.array(idSchema4).max(GROUP_DM_MAX_MEMBERS),
|
|
59892
|
+
/** The workspace's agents that join it from the start, beside the people. */
|
|
59893
|
+
agentIds: external_exports.array(idSchema4).max(GROUP_DM_MAX_MEMBERS).optional()
|
|
59892
59894
|
});
|
|
59893
59895
|
var openDirectInputSchema = openDirectInputSchemaDefinition;
|
|
59894
59896
|
var chatTitleSchema = external_exports.string().max(200);
|
|
@@ -61334,7 +61336,9 @@ var postedForwardSchemaDefinition = external_exports.object({
|
|
|
61334
61336
|
author: messageAuthorSchema,
|
|
61335
61337
|
/** The author's name at the source, for an author with no Laze account. */
|
|
61336
61338
|
authorName: external_exports.string().optional(),
|
|
61337
|
-
body: external_exports.string()
|
|
61339
|
+
body: external_exports.string(),
|
|
61340
|
+
/** The files the quote carries; a reader of the forward may open them through it. */
|
|
61341
|
+
attachmentIds: external_exports.array(external_exports.string()).optional()
|
|
61338
61342
|
});
|
|
61339
61343
|
var messagePostedPayloadSchemaDefinition = external_exports.object({
|
|
61340
61344
|
workspaceId: external_exports.string().min(1),
|
|
@@ -69424,6 +69428,9 @@ var slackFileParamsSchemaDefinition = external_exports.object({
|
|
|
69424
69428
|
channelId: external_exports.string().min(1).max(200),
|
|
69425
69429
|
fileId: external_exports.string().regex(/^F[A-Z0-9]{2,30}$/)
|
|
69426
69430
|
});
|
|
69431
|
+
var slackFileQuerySchemaDefinition = external_exports.object({
|
|
69432
|
+
via: external_exports.string().min(1).max(200).optional()
|
|
69433
|
+
});
|
|
69427
69434
|
var SLACK_SEARCH_QUERY_MIN = 2;
|
|
69428
69435
|
var SLACK_SEARCH_QUERY_MAX = 200;
|
|
69429
69436
|
var slackSearchInputSchemaDefinition = external_exports.object({
|
|
@@ -73665,7 +73672,11 @@ async function settleLinked({
|
|
|
73665
73672
|
pid,
|
|
73666
73673
|
linked
|
|
73667
73674
|
}) {
|
|
73668
|
-
const name3 = linkedProfileNameOf({
|
|
73675
|
+
const name3 = linkedProfileNameOf({
|
|
73676
|
+
args,
|
|
73677
|
+
linked,
|
|
73678
|
+
profiles: (await context.store.read()).profiles
|
|
73679
|
+
});
|
|
73669
73680
|
const claude = harness === "claude-code";
|
|
73670
73681
|
const directory = await sessionFolderOf({ context, args, claude, pid });
|
|
73671
73682
|
await context.store.saveProfile({
|
|
@@ -73713,9 +73724,22 @@ async function settleLinked({
|
|
|
73713
73724
|
""
|
|
73714
73725
|
].join("\n")
|
|
73715
73726
|
);
|
|
73727
|
+
return name3;
|
|
73716
73728
|
}
|
|
73717
|
-
function linkedProfileNameOf({
|
|
73718
|
-
|
|
73729
|
+
function linkedProfileNameOf({
|
|
73730
|
+
args,
|
|
73731
|
+
linked,
|
|
73732
|
+
profiles: profiles2
|
|
73733
|
+
}) {
|
|
73734
|
+
const wanted = flagText({ args, name: "profile" }) || `agent-${slugOf(linked.agent.name)}`;
|
|
73735
|
+
const free = (name3) => {
|
|
73736
|
+
const held = profiles2[name3];
|
|
73737
|
+
return !held || held.kind === "agent" && held.agentId === linked.agent.id;
|
|
73738
|
+
};
|
|
73739
|
+
if (free(wanted)) return wanted;
|
|
73740
|
+
for (let number4 = 2; ; number4 += 1) {
|
|
73741
|
+
if (free(`${wanted}-${number4}`)) return `${wanted}-${number4}`;
|
|
73742
|
+
}
|
|
73719
73743
|
}
|
|
73720
73744
|
function requestProfileNameOf({ profile }) {
|
|
73721
73745
|
return `${profile}-request`;
|
|
@@ -73732,7 +73756,10 @@ async function nextStepsFor({
|
|
|
73732
73756
|
if (harness === "codex") return linkCodexSession({ context, args, profile, laze, directory });
|
|
73733
73757
|
if (!hooked) return waiterStepsOf({ profile, laze });
|
|
73734
73758
|
const session = await currentSessionOf({ context, args });
|
|
73735
|
-
if (session)
|
|
73759
|
+
if (session) {
|
|
73760
|
+
await context.store.bindSession({ session: sessionKeyOf({ session }), profile });
|
|
73761
|
+
await bindInLaze({ context, args, session, profile });
|
|
73762
|
+
}
|
|
73736
73763
|
const plugin2 = args.flags["no-plugin"] ? void 0 : await installLazePlugin({ context });
|
|
73737
73764
|
if (plugin2?.registered) await markReloadTipTold({ context, session });
|
|
73738
73765
|
const mcp2 = args.flags.mcp ? await registerMcp({ context, directory, profile }) : void 0;
|
|
@@ -73740,6 +73767,23 @@ async function nextStepsFor({
|
|
|
73740
73767
|
const lines2 = pluginLinesOf({ context, registered: plugin2?.registered });
|
|
73741
73768
|
return claudeStepsOf({ profile, laze, directory, mcp: mcp2, mcpAdd: mcpAdd2, plugin: lines2 });
|
|
73742
73769
|
}
|
|
73770
|
+
async function bindInLaze({
|
|
73771
|
+
context,
|
|
73772
|
+
args,
|
|
73773
|
+
session,
|
|
73774
|
+
profile
|
|
73775
|
+
}) {
|
|
73776
|
+
try {
|
|
73777
|
+
const { client } = await signedIn({
|
|
73778
|
+
context,
|
|
73779
|
+
args: { ...args, flags: { ...args.flags, profile } }
|
|
73780
|
+
});
|
|
73781
|
+
await forSession({ client, session }).post("/api/agents/me/bind", {});
|
|
73782
|
+
} catch (error62) {
|
|
73783
|
+
context.err(`laze: could not bind the agent to this session yet: ${String(error62)}
|
|
73784
|
+
`);
|
|
73785
|
+
}
|
|
73786
|
+
}
|
|
73743
73787
|
async function reportTranscript({
|
|
73744
73788
|
client,
|
|
73745
73789
|
input: input2
|
|
@@ -75046,9 +75090,15 @@ async function requestAgent({ context, args }) {
|
|
|
75046
75090
|
return;
|
|
75047
75091
|
}
|
|
75048
75092
|
const { status: _status, workspaceName: _workspace, ...linked } = answer5;
|
|
75049
|
-
await settleLinked({
|
|
75093
|
+
const profile = await settleLinked({
|
|
75094
|
+
context,
|
|
75095
|
+
args,
|
|
75096
|
+
url: request2.url,
|
|
75097
|
+
harness,
|
|
75098
|
+
pid: void 0,
|
|
75099
|
+
linked
|
|
75100
|
+
});
|
|
75050
75101
|
if (!session) return;
|
|
75051
|
-
const profile = linkedProfileNameOf({ args, linked });
|
|
75052
75102
|
const own2 = LazeClient.create({
|
|
75053
75103
|
baseUrl: request2.url,
|
|
75054
75104
|
token: linked.apiKey,
|
|
@@ -86885,7 +86935,9 @@ var decideFeedRequestInputSchemaDefinition = external_exports.object({
|
|
|
86885
86935
|
...itemRef.shape,
|
|
86886
86936
|
decision: external_exports.enum(["approved", "denied"]),
|
|
86887
86937
|
/** With a Deny: why, for the agent that asked. It goes on the card as the person's reply. */
|
|
86888
|
-
resolutionNote: external_exports.string().max(4e3).optional()
|
|
86938
|
+
resolutionNote: external_exports.string().max(4e3).optional(),
|
|
86939
|
+
/** With an Approve of an agent asking to join: the name it joins as. */
|
|
86940
|
+
name: external_exports.string().trim().max(80).optional()
|
|
86889
86941
|
});
|
|
86890
86942
|
var decideFeedRequestInputSchema = decideFeedRequestInputSchemaDefinition;
|
|
86891
86943
|
var feedPublishDurationSchema = external_exports.enum(["once", "day", "always"]);
|
|
@@ -88402,7 +88454,8 @@ async function joinAsAgent({ context, args }) {
|
|
|
88402
88454
|
const where = outcome.workspaceName || pending2.workspaceName || linked.agent.workspaceId;
|
|
88403
88455
|
context.out(`Joined ${where} as ${linked.agent.name}.
|
|
88404
88456
|
`);
|
|
88405
|
-
|
|
88457
|
+
await settleLinked({ context, args, url: url2, harness, pid, linked });
|
|
88458
|
+
return;
|
|
88406
88459
|
}
|
|
88407
88460
|
context.out(
|
|
88408
88461
|
`Not approved yet. Run \`laze join\` again to keep waiting; the code works until ${pending2.expiresAt}.
|
package/package.json
CHANGED