@alan-ai-hq/agent-manager-linux-x64 0.1.180 → 0.1.182
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/alan-agent.cjs +2273 -1106
- package/alan-holder.cjs +1430 -487
- package/alan-lease.cjs +27 -6
- package/package.json +1 -1
package/alan-lease.cjs
CHANGED
|
@@ -21460,11 +21460,15 @@ var init_delegation = __esm({
|
|
|
21460
21460
|
function wire() {
|
|
21461
21461
|
return (schema) => schema;
|
|
21462
21462
|
}
|
|
21463
|
-
var canonicalUserMessageSchema, canonicalAssistantMessageSchema, externalMcpServerSchema, runAttachmentSchema, parsedAttachmentSchema, taskMetaSchema, pullRequestMetaSchema, agentUserIdentitySchema, workflowToolRefSchema, runPromptContextSchema;
|
|
21463
|
+
var messageSenderSchema, canonicalUserMessageSchema, canonicalAssistantMessageSchema, externalMcpServerSchema, runAttachmentSchema, parsedAttachmentSchema, taskMetaSchema, pullRequestMetaSchema, agentUserIdentitySchema, workflowToolRefSchema, runPromptContextSchema;
|
|
21464
21464
|
var init_run_context = __esm({
|
|
21465
21465
|
"../shared/src/runtime-v2/run-context.ts"() {
|
|
21466
21466
|
"use strict";
|
|
21467
21467
|
init_zod();
|
|
21468
|
+
messageSenderSchema = external_exports.object({
|
|
21469
|
+
userId: external_exports.string().min(1),
|
|
21470
|
+
name: external_exports.string().nullable()
|
|
21471
|
+
});
|
|
21468
21472
|
canonicalUserMessageSchema = wire()(
|
|
21469
21473
|
external_exports.object({
|
|
21470
21474
|
id: external_exports.string().min(1),
|
|
@@ -21472,7 +21476,8 @@ var init_run_context = __esm({
|
|
|
21472
21476
|
turnOrdinal: external_exports.number().int().nullable(),
|
|
21473
21477
|
createdAt: external_exports.string().min(1),
|
|
21474
21478
|
clientMessageId: external_exports.string().min(1).optional(),
|
|
21475
|
-
attachmentIds: external_exports.array(external_exports.string().min(1)).optional()
|
|
21479
|
+
attachmentIds: external_exports.array(external_exports.string().min(1)).optional(),
|
|
21480
|
+
sender: messageSenderSchema.optional()
|
|
21476
21481
|
})
|
|
21477
21482
|
);
|
|
21478
21483
|
canonicalAssistantMessageSchema = wire()(
|
|
@@ -21934,6 +21939,7 @@ var init_link = __esm({
|
|
|
21934
21939
|
init_desired_state();
|
|
21935
21940
|
init_ids();
|
|
21936
21941
|
init_machine_identity();
|
|
21942
|
+
init_run_context();
|
|
21937
21943
|
init_session_interaction();
|
|
21938
21944
|
init_workspace();
|
|
21939
21945
|
LINK_PROTOCOL = 2;
|
|
@@ -22000,7 +22006,8 @@ var init_link = __esm({
|
|
|
22000
22006
|
runSteerRequestSchema = external_exports.object({
|
|
22001
22007
|
runId: runIdSchema,
|
|
22002
22008
|
steerId: steerIdSchema,
|
|
22003
|
-
text: external_exports.string().min(1).max(RUN_ANSWER_MAX_LENGTH)
|
|
22009
|
+
text: external_exports.string().min(1).max(RUN_ANSWER_MAX_LENGTH),
|
|
22010
|
+
sender: messageSenderSchema.optional()
|
|
22004
22011
|
});
|
|
22005
22012
|
runSteerStatusSchema = external_exports.enum([
|
|
22006
22013
|
"delivered",
|
|
@@ -23865,6 +23872,7 @@ var init_runtime_v2 = __esm({
|
|
|
23865
23872
|
init_machine_identity();
|
|
23866
23873
|
init_machine_local_sessions();
|
|
23867
23874
|
init_mcp();
|
|
23875
|
+
init_run_context();
|
|
23868
23876
|
init_run_log();
|
|
23869
23877
|
init_run_log_upload();
|
|
23870
23878
|
init_run_media();
|
|
@@ -24604,7 +24612,8 @@ var runMetaSchema = external_exports.object({
|
|
|
24604
24612
|
turnOrdinal: external_exports.number().int().nullable(),
|
|
24605
24613
|
createdAt: external_exports.string(),
|
|
24606
24614
|
clientMessageId: external_exports.string().optional(),
|
|
24607
|
-
attachmentIds: external_exports.array(external_exports.string()).optional()
|
|
24615
|
+
attachmentIds: external_exports.array(external_exports.string()).optional(),
|
|
24616
|
+
sender: messageSenderSchema.optional()
|
|
24608
24617
|
}).optional(),
|
|
24609
24618
|
assistantMessage: external_exports.object({
|
|
24610
24619
|
id: external_exports.string(),
|
|
@@ -24690,7 +24699,7 @@ function createLeaseProducer(deps) {
|
|
|
24690
24699
|
const byConversation = new Map(
|
|
24691
24700
|
activities.map(({ conversationId, activity }) => [conversationId, activity])
|
|
24692
24701
|
);
|
|
24693
|
-
|
|
24702
|
+
const leased = await Promise.all(
|
|
24694
24703
|
(state.snapshot?.runs ?? []).map(async (run) => {
|
|
24695
24704
|
const activity = byConversation.get(run.conversationId);
|
|
24696
24705
|
const ownsRun = activity?.runId === run.runId;
|
|
@@ -24703,6 +24712,18 @@ function createLeaseProducer(deps) {
|
|
|
24703
24712
|
};
|
|
24704
24713
|
})
|
|
24705
24714
|
);
|
|
24715
|
+
const kept = leased.filter((run) => run.state !== "ended" || run.backgroundTasks > 0);
|
|
24716
|
+
const newestEnded = /* @__PURE__ */ new Map();
|
|
24717
|
+
for (const run of kept) {
|
|
24718
|
+
if (run.state !== "ended") continue;
|
|
24719
|
+
const current = newestEnded.get(run.conversationId);
|
|
24720
|
+
if (current === void 0 || (run.lastOutputAtMs ?? 0) > (current.lastOutputAtMs ?? 0)) {
|
|
24721
|
+
newestEnded.set(run.conversationId, run);
|
|
24722
|
+
}
|
|
24723
|
+
}
|
|
24724
|
+
return kept.filter(
|
|
24725
|
+
(run) => run.state !== "ended" || newestEnded.get(run.conversationId) === run
|
|
24726
|
+
);
|
|
24706
24727
|
};
|
|
24707
24728
|
const produce = async () => {
|
|
24708
24729
|
const activities = await readHolderActivities(deps.sessionsDir);
|
|
@@ -24783,7 +24804,7 @@ var leaseWorkerDataSchema = external_exports.object({
|
|
|
24783
24804
|
var snapshotRunSchema = external_exports.object({
|
|
24784
24805
|
runId: runIdSchema,
|
|
24785
24806
|
conversationId: conversationIdSchema,
|
|
24786
|
-
state: external_exports.enum(["starting", "running"])
|
|
24807
|
+
state: external_exports.enum(["starting", "running", "ended"])
|
|
24787
24808
|
});
|
|
24788
24809
|
var leaseSnapshotSchema = external_exports.object({
|
|
24789
24810
|
type: external_exports.literal("snapshot"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alan-ai-hq/agent-manager-linux-x64",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.182",
|
|
4
4
|
"description": "Alan machine runtime (alan-agent) for one platform: the official Node.js binary, the runtime bundle and its launcher. Installed by @alan-ai-hq/agent-manager.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://tryalan.ai",
|