@kuralle-agents/cf-agent 0.11.0 → 0.12.0

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.
@@ -23,7 +23,7 @@ import { type HarnessConfig } from '@kuralle-agents/core';
23
23
  import type { PersistentMemoryStore, SignalDelivery, ScheduledJob, Scheduler, WakeJobPayload } from '@kuralle-agents/core';
24
24
  import type { StreamTextOnFinishCallback, ToolSet } from 'ai';
25
25
  import type { OnChatMessageOptions } from '@cloudflare/ai-chat';
26
- import type { StreamAdapterConfig } from './types.js';
26
+ import type { StreamAdapterConfig, SqlExecutor } from './types.js';
27
27
  /**
28
28
  * Abstract base class for running Kuralle agents on Cloudflare.
29
29
  *
@@ -75,6 +75,12 @@ export declare abstract class KuralleAgent<Env = unknown, State = unknown> exten
75
75
  * CF's AIChatAgent exposes this.sql as a tagged template function.
76
76
  */
77
77
  private getSql;
78
+ /**
79
+ * The DO's SQL executor, for subclasses that need to read/write Kuralle session
80
+ * state out-of-band (e.g. a payment-confirmation webhook handler that runs
81
+ * outside a chat turn). Pair with `BridgeSessionStore` + `getDurableObjectId()`.
82
+ */
83
+ protected getSqlExecutor(): SqlExecutor;
78
84
  /**
79
85
  * Get the Durable Object ID as the session identifier.
80
86
  */
@@ -78,6 +78,14 @@ export class KuralleAgent extends AIChatAgent {
78
78
  getSql() {
79
79
  return durableAgentSurface(this).sql.bind(this);
80
80
  }
81
+ /**
82
+ * The DO's SQL executor, for subclasses that need to read/write Kuralle session
83
+ * state out-of-band (e.g. a payment-confirmation webhook handler that runs
84
+ * outside a chat turn). Pair with `BridgeSessionStore` + `getDurableObjectId()`.
85
+ */
86
+ getSqlExecutor() {
87
+ return this.getSql();
88
+ }
81
89
  /**
82
90
  * Get the Durable Object ID as the session identifier.
83
91
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuralle-agents/cf-agent",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Kuralle agent integration for Cloudflare Workers with AIChatAgent",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -21,21 +21,21 @@
21
21
  "dependencies": {
22
22
  "@cloudflare/ai-chat": "^0.8.4",
23
23
  "ai": "^6.0.90",
24
- "@kuralle-agents/core": "0.11.0",
25
- "@kuralle-agents/messaging": "0.11.0",
26
- "@kuralle-agents/realtime-audio": "0.11.0"
24
+ "@kuralle-agents/messaging": "0.12.0",
25
+ "@kuralle-agents/realtime-audio": "0.12.0",
26
+ "@kuralle-agents/core": "0.12.0"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "agents": ">=0.14.0 <1.0.0",
30
30
  "zod": "^4.0.0",
31
- "@kuralle-agents/voice-protocol": "0.11.0"
31
+ "@kuralle-agents/voice-protocol": "0.12.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@cloudflare/vitest-pool-workers": "^0.12.7",
35
35
  "agents": "^0.15.0",
36
36
  "typescript": "^5.7.0",
37
37
  "vitest": "^3.2.4",
38
- "@kuralle-agents/voice-protocol": "0.11.0"
38
+ "@kuralle-agents/voice-protocol": "0.12.0"
39
39
  },
40
40
  "engines": {
41
41
  "node": ">=20"