@alan-ai-hq/agent-manager 0.1.118 → 0.1.120
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/index.cjs +40 -14
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -34932,7 +34932,7 @@ function buildComputerReadiness(input2) {
|
|
|
34932
34932
|
}
|
|
34933
34933
|
|
|
34934
34934
|
// src/version.ts
|
|
34935
|
-
var AGENT_VERSION = "0.1.
|
|
34935
|
+
var AGENT_VERSION = "0.1.120";
|
|
34936
34936
|
|
|
34937
34937
|
// src/daemon/status.ts
|
|
34938
34938
|
var PENDING_RUN_START_TTL_MS = 10 * 6e4;
|
|
@@ -48789,7 +48789,9 @@ function scratchOf(state) {
|
|
|
48789
48789
|
if (existing) return existing;
|
|
48790
48790
|
const fresh = {
|
|
48791
48791
|
launcherByThread: /* @__PURE__ */ Object.create(null),
|
|
48792
|
-
launcherByPath: /* @__PURE__ */ Object.create(null)
|
|
48792
|
+
launcherByPath: /* @__PURE__ */ Object.create(null),
|
|
48793
|
+
messageByParent: /* @__PURE__ */ Object.create(null),
|
|
48794
|
+
messageIdByItemId: /* @__PURE__ */ Object.create(null)
|
|
48793
48795
|
};
|
|
48794
48796
|
state.scratch[SCRATCH] = fresh;
|
|
48795
48797
|
return fresh;
|
|
@@ -48862,7 +48864,8 @@ function latchSessionId(field) {
|
|
|
48862
48864
|
};
|
|
48863
48865
|
}
|
|
48864
48866
|
var turnStarted = (_event, _state, scratch) => {
|
|
48865
|
-
scratch.
|
|
48867
|
+
scratch.messageByParent = /* @__PURE__ */ Object.create(null);
|
|
48868
|
+
scratch.messageIdByItemId = /* @__PURE__ */ Object.create(null);
|
|
48866
48869
|
scratch.reasoningId = void 0;
|
|
48867
48870
|
return [{ sessionUpdate: "state_update", state: "running" }];
|
|
48868
48871
|
};
|
|
@@ -48925,8 +48928,19 @@ function streamedChunk(sessionUpdate, slot, prefix) {
|
|
|
48925
48928
|
return (event, state, scratch) => {
|
|
48926
48929
|
const delta = asString(event.delta);
|
|
48927
48930
|
if (!delta) return [];
|
|
48928
|
-
|
|
48929
|
-
|
|
48931
|
+
let messageId;
|
|
48932
|
+
if (slot === "message") {
|
|
48933
|
+
const parent = parentOf(event, scratch);
|
|
48934
|
+
const key = parent ?? "";
|
|
48935
|
+
if (!scratch.messageByParent[key])
|
|
48936
|
+
scratch.messageByParent[key] = { id: synthId(state, prefix), text: "" };
|
|
48937
|
+
const stream = scratch.messageByParent[key];
|
|
48938
|
+
stream.text += delta;
|
|
48939
|
+
messageId = stream.id;
|
|
48940
|
+
} else {
|
|
48941
|
+
messageId = scratch.reasoningId ?? synthId(state, prefix);
|
|
48942
|
+
scratch.reasoningId = messageId;
|
|
48943
|
+
}
|
|
48930
48944
|
return [
|
|
48931
48945
|
{
|
|
48932
48946
|
sessionUpdate,
|
|
@@ -49005,11 +49019,8 @@ var CODEX_HANDLERS = new Map([
|
|
|
49005
49019
|
["error", runError],
|
|
49006
49020
|
["token_count", tokenCount],
|
|
49007
49021
|
["image_generation_end", generatedImage2],
|
|
49008
|
-
["agent_message_delta", streamedChunk("agent_message_chunk", "
|
|
49009
|
-
[
|
|
49010
|
-
"agent_message_content_delta",
|
|
49011
|
-
streamedChunk("agent_message_chunk", "messageId", "codex-message")
|
|
49012
|
-
],
|
|
49022
|
+
["agent_message_delta", streamedChunk("agent_message_chunk", "message", "codex-message")],
|
|
49023
|
+
["agent_message_content_delta", streamedChunk("agent_message_chunk", "message", "codex-message")],
|
|
49013
49024
|
["agent_reasoning_delta", streamedChunk("agent_thought_chunk", "reasoningId", "codex-reasoning")],
|
|
49014
49025
|
[
|
|
49015
49026
|
"reasoning_content_delta",
|
|
@@ -49075,12 +49086,18 @@ function parseItem(event, scratch, completed) {
|
|
|
49075
49086
|
case "agent_message": {
|
|
49076
49087
|
const text2 = asString(item.text);
|
|
49077
49088
|
if (!text2) return [];
|
|
49089
|
+
const parent = parentOf(item, scratch);
|
|
49090
|
+
const stream = scratch.messageByParent[parent ?? ""];
|
|
49091
|
+
if (!scratch.messageIdByItemId[id] && stream?.text === text2) {
|
|
49092
|
+
scratch.messageIdByItemId[id] = stream.id;
|
|
49093
|
+
delete scratch.messageByParent[parent ?? ""];
|
|
49094
|
+
}
|
|
49078
49095
|
return [
|
|
49079
49096
|
{
|
|
49080
49097
|
sessionUpdate: "agent_message",
|
|
49081
|
-
messageId: id,
|
|
49098
|
+
messageId: scratch.messageIdByItemId[id] ?? id,
|
|
49082
49099
|
content: [textBlock(text2)],
|
|
49083
|
-
...metaOrNothing(parentMeta(
|
|
49100
|
+
...metaOrNothing(parentMeta(parent))
|
|
49084
49101
|
}
|
|
49085
49102
|
];
|
|
49086
49103
|
}
|
|
@@ -50182,6 +50199,7 @@ function createCommandCodeCliBackend(command = "command-code", defaultArgs = [])
|
|
|
50182
50199
|
}
|
|
50183
50200
|
var COPILOT_GRAMMAR_NAME = "copilot_cli";
|
|
50184
50201
|
var ANONYMOUS_TOOL_KEY3 = "copilot.lastAnonymousToolCallId";
|
|
50202
|
+
var ANONYMOUS_MESSAGE_KEY = "copilot.lastAnonymousMessageId";
|
|
50185
50203
|
function trimmed(value2) {
|
|
50186
50204
|
return typeof value2 === "string" && value2.trim().length > 0 ? value2.trim() : void 0;
|
|
50187
50205
|
}
|
|
@@ -50262,6 +50280,7 @@ var copilotGrammar = fromJsonGrammar({
|
|
|
50262
50280
|
}
|
|
50263
50281
|
switch (type) {
|
|
50264
50282
|
case "assistant.turn_start":
|
|
50283
|
+
delete state.scratch[ANONYMOUS_MESSAGE_KEY];
|
|
50265
50284
|
return [{ sessionUpdate: "state_update", state: "running" }];
|
|
50266
50285
|
case "assistant.message_delta": {
|
|
50267
50286
|
const delta = asString(data.deltaContent);
|
|
@@ -50311,11 +50330,18 @@ function unhandled4(event) {
|
|
|
50311
50330
|
return { sessionUpdate: "_alan/unhandled", kind: subtype ? `${base}/${subtype}` : base };
|
|
50312
50331
|
}
|
|
50313
50332
|
function messageIdOf(data, state) {
|
|
50314
|
-
|
|
50333
|
+
const native = asString(data.messageId);
|
|
50334
|
+
if (native) return native;
|
|
50335
|
+
const remembered = state.scratch[ANONYMOUS_MESSAGE_KEY];
|
|
50336
|
+
if (typeof remembered === "string") return remembered;
|
|
50337
|
+
const id = synthId(state, "copilot-msg");
|
|
50338
|
+
state.scratch[ANONYMOUS_MESSAGE_KEY] = id;
|
|
50339
|
+
return id;
|
|
50315
50340
|
}
|
|
50316
50341
|
function parseMessage(data, state) {
|
|
50317
50342
|
const updates = [];
|
|
50318
50343
|
const messageId = messageIdOf(data, state);
|
|
50344
|
+
delete state.scratch[ANONYMOUS_MESSAGE_KEY];
|
|
50319
50345
|
const content = asString(data.content);
|
|
50320
50346
|
if (content) {
|
|
50321
50347
|
updates.push({ sessionUpdate: "agent_message", messageId, content: [textBlock(content)] });
|
|
@@ -55755,7 +55781,7 @@ function resolveRuntimeCwd(payload) {
|
|
|
55755
55781
|
var STAGING_API_URL = process.env.ALAN_STAGING_API_URL ?? "https://staging-api.tryalan.ai";
|
|
55756
55782
|
var STAGING_WS_URL = process.env.ALAN_STAGING_WS_URL ?? "wss://staging-api.tryalan.ai";
|
|
55757
55783
|
var PRODUCTION_API_URL = "https://api.tryalan.ai";
|
|
55758
|
-
var PRODUCTION_WS_URL = "wss://
|
|
55784
|
+
var PRODUCTION_WS_URL = "wss://api.tryalan.ai";
|
|
55759
55785
|
var LOCAL_API_URL = "http://localhost:8400";
|
|
55760
55786
|
var LOCAL_WS_URL = "ws://localhost:8400";
|
|
55761
55787
|
function resolveWorkspaceRunLeaseTargets(payload, cwd, hasVerifiedRepository) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alan-ai-hq/agent-manager",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.120",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Alan agent runtime — cloud sandbox and local daemon (alan-agent CLI)",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"tsup": "^8.5.1",
|
|
28
28
|
"tsx": "^4.19.0",
|
|
29
29
|
"typescript": "~5.9.3",
|
|
30
|
-
"@alan-ai/sandbox-runtime-spec": "0.1.0",
|
|
31
30
|
"@alan-ai/agent-core": "0.1.0",
|
|
31
|
+
"@alan-ai/sandbox-runtime-spec": "0.1.0",
|
|
32
32
|
"@alan-ai/shared": "0.1.0"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|