@almyty/acp-server 1.0.12 → 1.0.13

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/agent.js CHANGED
@@ -310,11 +310,11 @@ export class AlmytyAcpAgent {
310
310
  run = await this.proxy.sendRunInput(session.agentId, session.activeRunId, { message: input });
311
311
  }
312
312
  else {
313
- // Start a new run
314
- run = await this.proxy.startRun(session.agentId, { message: input });
313
+ // Start a new run, reusing the session's conversation for history
314
+ run = await this.proxy.startRun(session.agentId, { message: input }, session.conversationId);
315
315
  this.sessions.update(session.id, {
316
316
  activeRunId: run.id,
317
- conversationId: run.conversationId,
317
+ conversationId: run.conversationId || session.conversationId,
318
318
  });
319
319
  }
320
320
  process.stderr.write(`[acp] Run started: ${run.id} (status: ${run.status})\n`);
package/dist/proxy.d.ts CHANGED
@@ -50,7 +50,7 @@ export declare class AlmytyProxy {
50
50
  * iterator; aborting the signal will terminate the stream.
51
51
  */
52
52
  streamAgent(id: string, input: Record<string, unknown>, signal?: AbortSignal): AsyncGenerator<StreamEvent>;
53
- startRun(id: string, input: Record<string, unknown>): Promise<AgentRun>;
53
+ startRun(id: string, input: Record<string, unknown>, conversationId?: string): Promise<AgentRun>;
54
54
  getRun(agentId: string, runId: string): Promise<AgentRun>;
55
55
  sendRunInput(agentId: string, runId: string, input: Record<string, unknown>): Promise<AgentRun>;
56
56
  cancelRun(agentId: string, runId: string): Promise<void>;
package/dist/proxy.js CHANGED
@@ -40,8 +40,11 @@ export class AlmytyProxy {
40
40
  yield* this.ssePost(`/agents/${encodeURIComponent(id)}/stream`, input, signal);
41
41
  }
42
42
  // ── Autonomous run management ──────────────────────────────────
43
- async startRun(id, input) {
44
- const data = await this.post(`/agents/${encodeURIComponent(id)}/runs`, { input }, INVOKE_TIMEOUT_MS);
43
+ async startRun(id, input, conversationId) {
44
+ const body = { input };
45
+ if (conversationId)
46
+ body.conversationId = conversationId;
47
+ const data = await this.post(`/agents/${encodeURIComponent(id)}/runs`, body, INVOKE_TIMEOUT_MS);
45
48
  return data?.data || data;
46
49
  }
47
50
  async getRun(agentId, runId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almyty/acp-server",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "ACP agent server for almyty — expose any almyty agent via the Agent Client Protocol",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",