@alan-ai-hq/agent-manager 0.1.125 → 0.1.126
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 +48 -3
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -35445,7 +35445,7 @@ function buildComputerReadiness(input2) {
|
|
|
35445
35445
|
}
|
|
35446
35446
|
|
|
35447
35447
|
// src/version.ts
|
|
35448
|
-
var AGENT_VERSION = "0.1.
|
|
35448
|
+
var AGENT_VERSION = "0.1.126";
|
|
35449
35449
|
|
|
35450
35450
|
// src/daemon/status.ts
|
|
35451
35451
|
var PENDING_RUN_START_TTL_MS = 10 * 6e4;
|
|
@@ -48816,6 +48816,12 @@ function alanCodeEngineDirectories(root) {
|
|
|
48816
48816
|
function defaultEngineRoot(env) {
|
|
48817
48817
|
return (0, import_path10.join)(env.HOME?.trim() || (0, import_os4.homedir)(), ".alan", "alan-code", "engine");
|
|
48818
48818
|
}
|
|
48819
|
+
var ALAN_CODE_TOOL_NAMING_PROMPT = `## Alan tool names
|
|
48820
|
+
|
|
48821
|
+
This engine exposes Alan MCP tools with an \`alan_\` prefix. Where these instructions name an Alan tool, call its prefixed form: \`search_context\` is \`alan_search_context\`, \`search_code_context\` is \`alan_search_code_context\`, and \`find_records\` is \`alan_find_records\`.`;
|
|
48822
|
+
function buildAlanCodeSystemPrompt(alanSystemPrompt) {
|
|
48823
|
+
return [ALAN_CODE_BASELINE_PROMPT, ALAN_CODE_TOOL_NAMING_PROMPT, alanSystemPrompt?.trim()].filter((part) => Boolean(part)).join("\n\n");
|
|
48824
|
+
}
|
|
48819
48825
|
async function withAlanCodeEngine(context, dependencies = {}) {
|
|
48820
48826
|
const registration = context.config.alanMcp;
|
|
48821
48827
|
if (!registration) {
|
|
@@ -48826,10 +48832,11 @@ async function withAlanCodeEngine(context, dependencies = {}) {
|
|
|
48826
48832
|
const apiOrigin = new URL(registration.url).origin;
|
|
48827
48833
|
const models = await loadAlanCodeModels(apiOrigin, registration, dependencies.fetchCatalog);
|
|
48828
48834
|
const modelId = resolveAlanCodeModelId(context.config.selectedModel, models);
|
|
48835
|
+
const { systemPrompt, systemPromptAppend: _append, ...config4 } = context.config;
|
|
48829
48836
|
return {
|
|
48830
48837
|
...context,
|
|
48831
48838
|
config: {
|
|
48832
|
-
...
|
|
48839
|
+
...config4,
|
|
48833
48840
|
selectedModel: `${ALAN_CODE_ENGINE_PROVIDER_ID}/${modelId}`
|
|
48834
48841
|
},
|
|
48835
48842
|
env: {
|
|
@@ -48841,7 +48848,8 @@ async function withAlanCodeEngine(context, dependencies = {}) {
|
|
|
48841
48848
|
baseURL: `${apiOrigin}${ALAN_CODE_PROXY_PATH}`,
|
|
48842
48849
|
modelId,
|
|
48843
48850
|
models,
|
|
48844
|
-
pluginUrl: materializeEnginePlugin(dependencies.pluginDirectory, apiOrigin)
|
|
48851
|
+
pluginUrl: materializeEnginePlugin(dependencies.pluginDirectory, apiOrigin),
|
|
48852
|
+
prompt: buildAlanCodeSystemPrompt(systemPrompt)
|
|
48845
48853
|
})
|
|
48846
48854
|
}
|
|
48847
48855
|
};
|
|
@@ -58054,6 +58062,23 @@ var AgentRunner = class {
|
|
|
58054
58062
|
content: [{ type: "text", text: text2 }]
|
|
58055
58063
|
});
|
|
58056
58064
|
}
|
|
58065
|
+
/**
|
|
58066
|
+
* Memory the API retrieved before the provider started, recorded as the
|
|
58067
|
+
* `search_context` call it stands in for so the transcript shows what the agent was given.
|
|
58068
|
+
*/
|
|
58069
|
+
recordRelevantContext(recall) {
|
|
58070
|
+
if (!recall) return;
|
|
58071
|
+
this.emit({
|
|
58072
|
+
sessionUpdate: "tool_call_update",
|
|
58073
|
+
toolCallId: `relevant-context-${(0, import_crypto.randomUUID)()}`,
|
|
58074
|
+
name: "search_context",
|
|
58075
|
+
kind: "search",
|
|
58076
|
+
status: "completed",
|
|
58077
|
+
rawInput: { query: recall.query },
|
|
58078
|
+
rawOutput: JSON.stringify(recall.envelope),
|
|
58079
|
+
_meta: { "alan.dev/contextRecall": "prefetch" }
|
|
58080
|
+
});
|
|
58081
|
+
}
|
|
58057
58082
|
log(message) {
|
|
58058
58083
|
this.emit({ sessionUpdate: "_alan/log", source: "agent", message });
|
|
58059
58084
|
}
|
|
@@ -58353,6 +58378,7 @@ ${runtimeConfig.task}` } : {}
|
|
|
58353
58378
|
};
|
|
58354
58379
|
this.host.onStart?.(initialConfig);
|
|
58355
58380
|
this.recordUserMessage(config4.task);
|
|
58381
|
+
this.recordRelevantContext(config4.relevantContext);
|
|
58356
58382
|
this.emit({ sessionUpdate: "state_update", state: "running" });
|
|
58357
58383
|
let safeProjectPath = initialConfig.teamPath;
|
|
58358
58384
|
if (initialConfig.teamPath) {
|
|
@@ -68560,6 +68586,9 @@ function buildAgentRunConfig(input2) {
|
|
|
68560
68586
|
teamId: input2.teamId,
|
|
68561
68587
|
currentUser: input2.currentUser,
|
|
68562
68588
|
sessionVisibility: input2.sessionVisibility,
|
|
68589
|
+
codeIndexEnabled: input2.codeIndexEnabled,
|
|
68590
|
+
contextGraphEnabled: input2.contextGraphEnabled,
|
|
68591
|
+
relevantContext: input2.relevantContext,
|
|
68563
68592
|
workflowTools: input2.workflowTools,
|
|
68564
68593
|
workflowId: input2.workflowId,
|
|
68565
68594
|
workflowExecutionId: input2.workflowExecutionId,
|
|
@@ -69633,6 +69662,9 @@ async function launchRun(ctx, payload, plan) {
|
|
|
69633
69662
|
teamId: payload.teamId,
|
|
69634
69663
|
currentUser: payload.currentUser,
|
|
69635
69664
|
sessionVisibility: payload.sessionVisibility,
|
|
69665
|
+
codeIndexEnabled: payload.codeIndexEnabled,
|
|
69666
|
+
contextGraphEnabled: payload.contextGraphEnabled,
|
|
69667
|
+
relevantContext: payload.relevantContext,
|
|
69636
69668
|
workflowTools: payload.workflowTools,
|
|
69637
69669
|
workflowId: payload.workflowId,
|
|
69638
69670
|
workflowExecutionId: payload.workflowExecutionId,
|
|
@@ -75992,6 +76024,9 @@ var WSClient = class {
|
|
|
75992
76024
|
teamId: data.teamId,
|
|
75993
76025
|
currentUser: data.currentUser,
|
|
75994
76026
|
sessionVisibility: data.sessionVisibility,
|
|
76027
|
+
codeIndexEnabled: data.codeIndexEnabled,
|
|
76028
|
+
contextGraphEnabled: data.contextGraphEnabled,
|
|
76029
|
+
relevantContext: data.relevantContext,
|
|
75995
76030
|
terminalContextRefs: data.terminalContextRefs,
|
|
75996
76031
|
terminalSnapshots: data.terminalSnapshots,
|
|
75997
76032
|
externalMcpServers: data.externalMcpServers
|
|
@@ -76804,6 +76839,9 @@ function initialTurn(seed) {
|
|
|
76804
76839
|
teamId: seed.teamId,
|
|
76805
76840
|
currentUser: seed.currentUser,
|
|
76806
76841
|
sessionVisibility: seed.sessionVisibility,
|
|
76842
|
+
codeIndexEnabled: void 0,
|
|
76843
|
+
contextGraphEnabled: void 0,
|
|
76844
|
+
relevantContext: void 0,
|
|
76807
76845
|
terminalContextRefs: void 0,
|
|
76808
76846
|
terminalSnapshots: void 0
|
|
76809
76847
|
};
|
|
@@ -76826,6 +76864,10 @@ function applyUserMessage(turn, patch) {
|
|
|
76826
76864
|
canonicalUserMessage: patch.canonicalUserMessage,
|
|
76827
76865
|
canonicalAssistantMessage: patch.canonicalAssistantMessage,
|
|
76828
76866
|
cloudEnvironmentId: patch.cloudEnvironmentId,
|
|
76867
|
+
// Entitlements and recall are decided per message, so an omission never inherits.
|
|
76868
|
+
codeIndexEnabled: patch.codeIndexEnabled,
|
|
76869
|
+
contextGraphEnabled: patch.contextGraphEnabled,
|
|
76870
|
+
relevantContext: patch.relevantContext,
|
|
76829
76871
|
// A resume hint only travels with the session it belongs to.
|
|
76830
76872
|
...patch.providerSessionId ? {
|
|
76831
76873
|
providerSessionId: patch.providerSessionId,
|
|
@@ -77201,6 +77243,9 @@ async function runSandbox(config4) {
|
|
|
77201
77243
|
teamId: turn.teamId,
|
|
77202
77244
|
currentUser: turn.currentUser,
|
|
77203
77245
|
sessionVisibility: turn.sessionVisibility,
|
|
77246
|
+
codeIndexEnabled: turn.codeIndexEnabled,
|
|
77247
|
+
contextGraphEnabled: turn.contextGraphEnabled,
|
|
77248
|
+
relevantContext: turn.relevantContext,
|
|
77204
77249
|
workflowTools: turn.workflowTools,
|
|
77205
77250
|
workflowId,
|
|
77206
77251
|
workflowExecutionId,
|
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.126",
|
|
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)",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"tsx": "^4.19.0",
|
|
29
29
|
"typescript": "~5.9.3",
|
|
30
30
|
"@alan-ai/agent-core": "0.1.0",
|
|
31
|
-
"@alan-ai/
|
|
32
|
-
"@alan-ai/
|
|
31
|
+
"@alan-ai/sandbox-runtime-spec": "0.1.0",
|
|
32
|
+
"@alan-ai/shared": "0.1.0"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "tsup",
|