@alan-ai-hq/agent-manager-linux-x64 0.1.161 → 0.1.162

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 CHANGED
@@ -47275,8 +47275,9 @@ var init_driver = __esm({
47275
47275
  });
47276
47276
 
47277
47277
  // src/holder/drivers/persistent.ts
47278
- function sessionContextFor(opened, inputs) {
47279
- return opened.fresh ? inputs.agentContext?.full : inputs.agentContext?.update;
47278
+ async function sessionContextFor(opened, inputs) {
47279
+ const text3 = await inputs.agentContext;
47280
+ return opened.fresh ? text3?.full : text3?.update;
47280
47281
  }
47281
47282
  function steerEcho(request2) {
47282
47283
  return {
@@ -47525,7 +47526,7 @@ function createPersistentDriver(provider4, options) {
47525
47526
  };
47526
47527
  signal.addEventListener("abort", onAbort, { once: true });
47527
47528
  try {
47528
- const contextPrefix = [sessionContextFor(opened, inputs), opened.contextPrefix].filter((part) => part !== void 0).join("\n\n");
47529
+ const contextPrefix = [await sessionContextFor(opened, inputs), opened.contextPrefix].filter((part) => part !== void 0).join("\n\n");
47529
47530
  const input2 = await provider4.turnInput(spec, inputs, contextPrefix || void 0);
47530
47531
  if (signal.aborted) return { outcome: "aborted" };
47531
47532
  const timeoutMs = options.firstOutputTimeoutMs ?? FIRST_OUTPUT_TIMEOUT_MS;
@@ -57829,7 +57830,7 @@ var require_websocket_server = __commonJS({
57829
57830
  // package.json
57830
57831
  var package_default = {
57831
57832
  name: "@alan-ai-hq/agent-manager",
57832
- version: "0.1.161",
57833
+ version: "0.1.162",
57833
57834
  private: true,
57834
57835
  type: "module",
57835
57836
  description: "Alan machine runtime (alan-agent): identity, link, reconciler, session holders, run log, uploader, local API",
@@ -72664,20 +72665,17 @@ async function runWithInputs({ spec, skills }, context, sink, signal) {
72664
72665
  message: `Could not fetch this run's attachments or provider credential: ${error62 instanceof Error ? error62.message : String(error62)}`
72665
72666
  };
72666
72667
  }
72667
- const agentContext = await sessionContext;
72668
72668
  const prepared = __using(_stack, inputs, true);
72669
- const result = await context.driver.runTurn(
72670
- spec,
72671
- sink,
72672
- signal,
72673
- agentContext === void 0 ? prepared : {
72674
- ...prepared,
72675
- agentContext: {
72676
- full: agentContext.full,
72677
- ...agentContext.update ? { update: agentContext.update } : {}
72669
+ const result = await context.driver.runTurn(spec, sink, signal, {
72670
+ ...prepared,
72671
+ agentContext: sessionContext.then(
72672
+ (agentContext2) => agentContext2 === void 0 ? void 0 : {
72673
+ full: agentContext2.full,
72674
+ ...agentContext2.update ? { update: agentContext2.update } : {}
72678
72675
  }
72679
- }
72680
- );
72676
+ )
72677
+ });
72678
+ const agentContext = await sessionContext;
72681
72679
  if (agentContext !== void 0 && result.outcome !== "rejected") {
72682
72680
  await agentContext.save().catch((error62) => {
72683
72681
  context.log.warn("holder.agent_context_save_failed", { runId: spec.runId, error: error62 });
package/alan-holder.cjs CHANGED
@@ -42000,8 +42000,9 @@ var init_driver = __esm({
42000
42000
  });
42001
42001
 
42002
42002
  // src/holder/drivers/persistent.ts
42003
- function sessionContextFor(opened, inputs) {
42004
- return opened.fresh ? inputs.agentContext?.full : inputs.agentContext?.update;
42003
+ async function sessionContextFor(opened, inputs) {
42004
+ const text2 = await inputs.agentContext;
42005
+ return opened.fresh ? text2?.full : text2?.update;
42005
42006
  }
42006
42007
  function steerEcho(request2) {
42007
42008
  return {
@@ -42250,7 +42251,7 @@ function createPersistentDriver(provider4, options) {
42250
42251
  };
42251
42252
  signal.addEventListener("abort", onAbort, { once: true });
42252
42253
  try {
42253
- const contextPrefix = [sessionContextFor(opened, inputs), opened.contextPrefix].filter((part) => part !== void 0).join("\n\n");
42254
+ const contextPrefix = [await sessionContextFor(opened, inputs), opened.contextPrefix].filter((part) => part !== void 0).join("\n\n");
42254
42255
  const input2 = await provider4.turnInput(spec, inputs, contextPrefix || void 0);
42255
42256
  if (signal.aborted) return { outcome: "aborted" };
42256
42257
  const timeoutMs = options.firstOutputTimeoutMs ?? FIRST_OUTPUT_TIMEOUT_MS;
@@ -51311,20 +51312,17 @@ async function runWithInputs({ spec, skills }, context, sink, signal) {
51311
51312
  message: `Could not fetch this run's attachments or provider credential: ${error62 instanceof Error ? error62.message : String(error62)}`
51312
51313
  };
51313
51314
  }
51314
- const agentContext = await sessionContext;
51315
51315
  const prepared = __using(_stack, inputs, true);
51316
- const result = await context.driver.runTurn(
51317
- spec,
51318
- sink,
51319
- signal,
51320
- agentContext === void 0 ? prepared : {
51321
- ...prepared,
51322
- agentContext: {
51323
- full: agentContext.full,
51324
- ...agentContext.update ? { update: agentContext.update } : {}
51316
+ const result = await context.driver.runTurn(spec, sink, signal, {
51317
+ ...prepared,
51318
+ agentContext: sessionContext.then(
51319
+ (agentContext2) => agentContext2 === void 0 ? void 0 : {
51320
+ full: agentContext2.full,
51321
+ ...agentContext2.update ? { update: agentContext2.update } : {}
51325
51322
  }
51326
- }
51327
- );
51323
+ )
51324
+ });
51325
+ const agentContext = await sessionContext;
51328
51326
  if (agentContext !== void 0 && result.outcome !== "rejected") {
51329
51327
  await agentContext.save().catch((error62) => {
51330
51328
  context.log.warn("holder.agent_context_save_failed", { runId: spec.runId, error: error62 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alan-ai-hq/agent-manager-linux-x64",
3
- "version": "0.1.161",
3
+ "version": "0.1.162",
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",