@aliou/pi-durable-channels 0.0.1 → 0.2.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.
- package/CHANGELOG.md +13 -0
- package/LICENSE +21 -0
- package/README.md +158 -0
- package/dist/index.d.mts +184 -0
- package/dist/index.mjs +864 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +42 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# @aliou/pi-durable-channels
|
|
2
|
+
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c87d00b: Support transactional conversation initialization during channel creation. `ConversationSetup.init` runs after agent configuration and before address binding in the creating commit.
|
|
8
|
+
|
|
9
|
+
## 0.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 030fc90: Initial release of durable messaging channels for pi-durable hosts. Includes the adapter contract, persistent address bindings, inbound deduplication, queue and steer policies, durable outbound retries, run events, attachments, and conversation-scoped messaging tools.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Aliou Diallo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# @aliou/pi-durable-channels
|
|
2
|
+
|
|
3
|
+
Durable messaging for [pi-durable](https://github.com/earendil-works/pi/tree/main/packages/durable) hosts. Platform messages become persistent conversations; replies run as durable tasks that survive crashes.
|
|
4
|
+
|
|
5
|
+
This is a pi-durable Harness extension, not a Pi coding-agent extension. Adapters bring HTTP, socket, or polling transports. The package owns address bindings, inbound deduplication, queue and steer policies, replies, retries, and conversation-scoped messaging tools.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
Requires Node 24+ and pi-durable 1.5.0. Hosts using the example below also import pi-ai and Chord directly:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pnpm add @aliou/pi-durable-channels @earendil-works/pi-durable@1.5.0 @earendil-works/pi-ai@1.5.0 @earendil-works/chord@1.5.0
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick start
|
|
16
|
+
|
|
17
|
+
This complete example uses an in-memory store, a scripted model, and an adapter that prints replies. Save it as `demo.mjs` and run `node demo.mjs`; it needs no platform credentials or model API key.
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
import { createChannels } from "@aliou/pi-durable-channels";
|
|
21
|
+
import { BACKGROUND_CONTEXT as context } from "@earendil-works/chord/context";
|
|
22
|
+
import { createModels, fauxAssistantMessage, fauxProvider } from "@earendil-works/pi-ai";
|
|
23
|
+
import { createRegistry, Harness, MemoryStorage } from "@earendil-works/pi-durable";
|
|
24
|
+
|
|
25
|
+
const faux = fauxProvider();
|
|
26
|
+
faux.setResponses([fauxAssistantMessage("Hello from pi-durable.")]);
|
|
27
|
+
const models = createModels();
|
|
28
|
+
models.setProvider(faux.provider);
|
|
29
|
+
|
|
30
|
+
const channels = createChannels({
|
|
31
|
+
channels: {
|
|
32
|
+
inbox: {
|
|
33
|
+
adapter: {
|
|
34
|
+
async send(message) {
|
|
35
|
+
for (const part of message.parts) console.log(part.text);
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
conversation: () => ({
|
|
39
|
+
agent: { model: { provider: "faux", modelId: "faux-1" } },
|
|
40
|
+
}),
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
const registry = createRegistry();
|
|
45
|
+
registry.install(channels.extension);
|
|
46
|
+
registry.install(channels.tools);
|
|
47
|
+
const harness = await Harness.open(new MemoryStorage(), { models, registry }, context);
|
|
48
|
+
const hub = channels.hub(harness);
|
|
49
|
+
|
|
50
|
+
try {
|
|
51
|
+
await hub.start();
|
|
52
|
+
await hub.deliver("inbox", {
|
|
53
|
+
address: "thread-1",
|
|
54
|
+
text: "Say hello.",
|
|
55
|
+
requestId: "message-1",
|
|
56
|
+
author: "reader",
|
|
57
|
+
});
|
|
58
|
+
await harness.waitForIdle(context);
|
|
59
|
+
} finally {
|
|
60
|
+
await hub.stop();
|
|
61
|
+
await harness.close(context);
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
It prints `Hello from pi-durable.`. For crash recovery, use a persistent pi-durable store and reinstall the same extensions when opening the Harness.
|
|
66
|
+
|
|
67
|
+
## Host registration
|
|
68
|
+
|
|
69
|
+
`createChannels(options)` returns `extension`, `tools`, transactional `bind`, and a `hub` factory. Install `channels.extension` in the Harness registry for durable sends and reply hooks. Install `channels.tools` when the agent needs messaging tools and the address prompt section.
|
|
70
|
+
|
|
71
|
+
A channel is a host-assigned name, not an agent persona. Its optional `conversation(message, { channel })` factory creates a conversation for an unknown address. Returning `undefined` ignores the message. Without a factory, only bound addresses accept messages. `message.event` can select an agent, but is not stored in the channel entry.
|
|
72
|
+
|
|
73
|
+
The factory returns `agent` creation defaults and an optional `init(tx, conversationId)` callback. Creation, configuration, initialization, and address binding share one commit. `init` runs after the agent is configured and before the address is bound; it can read and write conversation documents, and asynchronous work finishes before message admission continues. Table reads are unavailable after creation, so use `tx.doc()` for document access. A failure rolls back the conversation and binding. An existing binding skips the factory and initialization.
|
|
74
|
+
|
|
75
|
+
If an agent selects extensions through an explicit list, binding adds `channels` to that list. Select `channels-tools` separately if the agent needs its tools. Without an explicit list, pi-durable selects installed extensions according to its defaults.
|
|
76
|
+
|
|
77
|
+
Start the hub after opening the Harness. On shutdown, stop the hub before closing the Harness.
|
|
78
|
+
|
|
79
|
+
## Admission and bindings
|
|
80
|
+
|
|
81
|
+
- `whenBusy: "queue"` is the default: a message gets its own run after the current one. `"steer"` joins the current run. Set a default on `createChannels` or override per delivery.
|
|
82
|
+
- `run: false` stores a message as context without starting a run or creating a conversation.
|
|
83
|
+
- `create: false` permits a run only for an already-bound address.
|
|
84
|
+
- A repeated `requestId` within the same conversation returns the original receipt without starting another run. IDs must distinguish messages from all addresses sharing that conversation.
|
|
85
|
+
- `deliver` resolves after admission, not after the reply. Attachments are fetched before admission and can delay acknowledgement.
|
|
86
|
+
|
|
87
|
+
An address identifies a destination within a channel, such as a Slack thread. Several addresses can bind to the same conversation, but an address belongs to only one conversation at a time. Bind from host code with `hub.bind(target, conversationId)`, or from a tool's commit with `channels.bind(tx, target, api.conversationId)`. Binding an address owned by another conversation throws.
|
|
88
|
+
|
|
89
|
+
## Adapter contract
|
|
90
|
+
|
|
91
|
+
Implement the exported `ChannelAdapter` type:
|
|
92
|
+
|
|
93
|
+
| Method | Contract |
|
|
94
|
+
| --- | --- |
|
|
95
|
+
| `start(ctx)` | Optional. Keep `deliver`, `cancel`, and `report`; resolve once the transport is ready. A rejection fails `hub.start()` |
|
|
96
|
+
| `stop()` | Optional. Resolve once the transport is closed |
|
|
97
|
+
| `fetch(request)` | Optional HTTP entry point, mounted by the host. Socket and polling adapters omit it |
|
|
98
|
+
| `send(message, ctx)` | Required. Post the outbound parts; throwing retries the send |
|
|
99
|
+
| `events(target, event)` | Optional best-effort run presentation |
|
|
100
|
+
| `fetchFile(url)` | Optional authenticated attachment download |
|
|
101
|
+
|
|
102
|
+
The start context's `signal` aborts during hub shutdown. The send context has its own task signal; wire it into outbound I/O. `cancel(address)` stops the run, sends, and notifications for the bound conversation.
|
|
103
|
+
|
|
104
|
+
`send` receives `addressData`, `replyContext`, and a stable `idempotencyKey`. It can return `{ addressData?, alias? }`: the data updates the binding, and an unbound alias is attached to the same conversation. Use this when an initial platform post creates the actual thread.
|
|
105
|
+
|
|
106
|
+
Address data persists until replaced. Reply context belongs to one message, and is also passed to its run events. A reply with no parts means `no_reply`; post nothing and clear the adapter's presentation state.
|
|
107
|
+
|
|
108
|
+
[Slack, GitHub, and webhook adapters](https://github.com/aliou/pi-durable-channels/tree/main/examples/channels) are copyable examples, not published adapter packages. The [examples guide](https://github.com/aliou/pi-durable-channels/tree/main/examples) covers complete platform integrations.
|
|
109
|
+
|
|
110
|
+
## Delivery and retries
|
|
111
|
+
|
|
112
|
+
Inbound acknowledgement must follow successful `deliver`. A crash before acknowledgement lets the platform redeliver with the same request ID. A receipt confirms that the message was stored, not that the agent answered or the platform accepted a reply.
|
|
113
|
+
|
|
114
|
+
Outbound sends are at least once. A crash after the platform accepts a post but before the task records success can repeat it with the same key. Replies use `reply:<entry>`; tool notifications use `notify:<task>`. Treat those keys as opaque and pass them to platforms that support deduplication.
|
|
115
|
+
|
|
116
|
+
The default retry policy is five attempts with a one-second initial delay and exponential backoff. Override it with `retry: { attempts, baseDelayMs }`. Every thrown send error consumes an attempt; there is no adapter-supplied permanent-error category.
|
|
117
|
+
|
|
118
|
+
## Run events
|
|
119
|
+
|
|
120
|
+
Adapters receive `run_started`, narration `text`, `tool_started`, `tool_finished`, and `run_ended` with `completed`, `failed`, or `aborted`. Events follow committed state; the final answer arrives through `send`, not a run event. A lone `no_reply` call and its accompanying text produce no activity events.
|
|
121
|
+
|
|
122
|
+
Events can be lost while the host is down and can repeat after restart. Activity events have an `id`; use it for deduplication. `run_started` and `run_ended` have no event ID: use the event type and `target.idempotencyKey`. That target key matches the corresponding reply's send key. Anything requiring durable delivery belongs in `send`.
|
|
123
|
+
|
|
124
|
+
## Attachments
|
|
125
|
+
|
|
126
|
+
Pass the host's environment builder to `channels.hub(harness, { env })`. The core downloads files through `fetchFile` and saves them under `.channels/attachments/<hash>/` in the conversation's environment. It appends paths after the inbound text, and includes supported images inline within pi-durable's image limit. Without an environment, files are named to the model but not saved. Download or save failures are included with the file description.
|
|
127
|
+
|
|
128
|
+
The adapter must validate a file URL's origin before sending credentials. Verify signatures over raw inbound bodies, enforce timestamp windows when supported, cap body size, and use fixed or allowlisted outbound origins with no redirects and a timeout. Treat inbound text as untrusted model input.
|
|
129
|
+
|
|
130
|
+
## Hub operations
|
|
131
|
+
|
|
132
|
+
| Method | Effect |
|
|
133
|
+
| --- | --- |
|
|
134
|
+
| `start()` | Start adapters and the run-events watcher; a hub starts once |
|
|
135
|
+
| `stop()` | Reject further changes, drain deliveries and events, then abort and stop transports |
|
|
136
|
+
| `deliver(channel, message, options?)` | Admit an inbound message, returning a receipt or `undefined` when ignored |
|
|
137
|
+
| `bind(target, conversationId)` | Attach an address to a conversation |
|
|
138
|
+
| `addresses(conversationId)` | Return all bound addresses, including aliases |
|
|
139
|
+
| `conversationOf(key)` | Return the bound conversation ID or `undefined` |
|
|
140
|
+
| `status(submissionId)` | Return `queued`, `running`, `sending`, `done`, `aborted`, `failed`, or `blocked`; unknown submissions return `undefined` |
|
|
141
|
+
| `cancel(key)` | Abort the run and sends, and withdraw queued messages |
|
|
142
|
+
| `clear(key)` | Cancel, then reset context in the same conversation |
|
|
143
|
+
| `compact(key)` | Compact the conversation |
|
|
144
|
+
| `end(key)` | Cancel and unbind all addresses of the conversation |
|
|
145
|
+
|
|
146
|
+
After `end`, another message creates a conversation only if the channel's factory accepts it.
|
|
147
|
+
|
|
148
|
+
## Model tools
|
|
149
|
+
|
|
150
|
+
`channels.tools` adds `send_message({ channel, address, text })`, `list_addresses()`, `no_reply()`, and an address prompt section. Sending and listing are restricted to addresses bound to the calling conversation. `send_message` queues a background notification; the final answer already goes to the inbound address.
|
|
151
|
+
|
|
152
|
+
## Reports
|
|
153
|
+
|
|
154
|
+
`onReport` receives `admitted` with a duplicate flag, `ignored`, `send_retry`, `send_failed`, and adapter-supplied `skipped` or `adapter_error`, each with its channel. Send reports may repeat after restart; use them for logs, not accounting. A throwing report callback is ignored. The core writes nothing to the console.
|
|
155
|
+
|
|
156
|
+
## License
|
|
157
|
+
|
|
158
|
+
MIT. See `LICENSE`.
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { AgentChange, ConversationId, ConversationInit, Extension, Harness, HarnessOptions, SubmissionId, Tx } from "@earendil-works/pi-durable";
|
|
2
|
+
import { JsonValue } from "@earendil-works/chord";
|
|
3
|
+
import "@earendil-works/chord/context";
|
|
4
|
+
import { JsonObject } from "@earendil-works/pi-ai";
|
|
5
|
+
type BusyPolicy = "queue" | "steer";
|
|
6
|
+
type InboundFile = {
|
|
7
|
+
name: string;
|
|
8
|
+
mimeType: string;
|
|
9
|
+
url: string;
|
|
10
|
+
};
|
|
11
|
+
type InboundMessage = {
|
|
12
|
+
address: string;
|
|
13
|
+
text: string;
|
|
14
|
+
requestId: string;
|
|
15
|
+
author: string;
|
|
16
|
+
event?: string;
|
|
17
|
+
files?: readonly InboundFile[];
|
|
18
|
+
addressData?: JsonValue;
|
|
19
|
+
replyContext?: JsonValue;
|
|
20
|
+
};
|
|
21
|
+
type DeliverOptions = {
|
|
22
|
+
whenBusy?: BusyPolicy;
|
|
23
|
+
run?: boolean;
|
|
24
|
+
create?: boolean;
|
|
25
|
+
};
|
|
26
|
+
type OutboundPart = {
|
|
27
|
+
type: "text";
|
|
28
|
+
text: string;
|
|
29
|
+
};
|
|
30
|
+
type OutboundMessage = {
|
|
31
|
+
address: string;
|
|
32
|
+
parts: readonly OutboundPart[];
|
|
33
|
+
};
|
|
34
|
+
type SendContext = {
|
|
35
|
+
addressData?: JsonValue;
|
|
36
|
+
replyContext?: JsonValue;
|
|
37
|
+
idempotencyKey: string;
|
|
38
|
+
signal: AbortSignal;
|
|
39
|
+
};
|
|
40
|
+
type SendResult = {
|
|
41
|
+
addressData?: JsonValue;
|
|
42
|
+
alias?: string;
|
|
43
|
+
};
|
|
44
|
+
type DeliveryReceipt = {
|
|
45
|
+
submissionId: SubmissionId;
|
|
46
|
+
conversationId: ConversationId;
|
|
47
|
+
};
|
|
48
|
+
type Deliver = (message: InboundMessage, options?: DeliverOptions) => Promise<DeliveryReceipt | undefined>;
|
|
49
|
+
type ReplyTarget = {
|
|
50
|
+
address: string;
|
|
51
|
+
addressData?: JsonValue;
|
|
52
|
+
replyContext?: JsonValue;
|
|
53
|
+
idempotencyKey: string;
|
|
54
|
+
};
|
|
55
|
+
type ChannelEvent = {
|
|
56
|
+
type: "run_started";
|
|
57
|
+
} | {
|
|
58
|
+
type: "text";
|
|
59
|
+
id: string;
|
|
60
|
+
text: string;
|
|
61
|
+
} | {
|
|
62
|
+
type: "tool_started";
|
|
63
|
+
id: string;
|
|
64
|
+
name: string;
|
|
65
|
+
args: JsonObject;
|
|
66
|
+
} | {
|
|
67
|
+
type: "tool_finished";
|
|
68
|
+
id: string;
|
|
69
|
+
name: string;
|
|
70
|
+
isError: boolean;
|
|
71
|
+
output: string;
|
|
72
|
+
} | {
|
|
73
|
+
type: "run_ended";
|
|
74
|
+
outcome: "completed" | "failed" | "aborted";
|
|
75
|
+
};
|
|
76
|
+
type AdapterReport = {
|
|
77
|
+
kind: "skipped";
|
|
78
|
+
detail: string;
|
|
79
|
+
} | {
|
|
80
|
+
kind: "adapter_error";
|
|
81
|
+
address?: string;
|
|
82
|
+
error: unknown;
|
|
83
|
+
};
|
|
84
|
+
type ChannelReport = {
|
|
85
|
+
kind: "admitted";
|
|
86
|
+
channel: string;
|
|
87
|
+
address: string;
|
|
88
|
+
conversationId: ConversationId;
|
|
89
|
+
submissionId: SubmissionId;
|
|
90
|
+
duplicate: boolean;
|
|
91
|
+
} | {
|
|
92
|
+
kind: "ignored";
|
|
93
|
+
channel: string;
|
|
94
|
+
address: string;
|
|
95
|
+
} | {
|
|
96
|
+
kind: "send_retry";
|
|
97
|
+
channel: string;
|
|
98
|
+
address: string;
|
|
99
|
+
attempt: number;
|
|
100
|
+
error: unknown;
|
|
101
|
+
} | {
|
|
102
|
+
kind: "send_failed";
|
|
103
|
+
channel: string;
|
|
104
|
+
address: string;
|
|
105
|
+
error: unknown;
|
|
106
|
+
} | (AdapterReport & {
|
|
107
|
+
channel: string;
|
|
108
|
+
});
|
|
109
|
+
type AdapterStart = {
|
|
110
|
+
deliver: Deliver;
|
|
111
|
+
cancel(address: string): Promise<void>;
|
|
112
|
+
report(report: AdapterReport): void;
|
|
113
|
+
signal: AbortSignal;
|
|
114
|
+
};
|
|
115
|
+
type ChannelAdapter = {
|
|
116
|
+
start?(ctx: AdapterStart): void | Promise<void>;
|
|
117
|
+
stop?(): Promise<void>;
|
|
118
|
+
fetch?(request: Request): Promise<Response>;
|
|
119
|
+
send(message: OutboundMessage, ctx: SendContext): Promise<SendResult | undefined | void>;
|
|
120
|
+
events?(target: ReplyTarget, event: ChannelEvent): void | Promise<void>;
|
|
121
|
+
fetchFile?(url: string): Promise<Uint8Array>;
|
|
122
|
+
};
|
|
123
|
+
type AddressKey = {
|
|
124
|
+
channel: string;
|
|
125
|
+
address: string;
|
|
126
|
+
};
|
|
127
|
+
type ConversationSetup = {
|
|
128
|
+
agent?: AgentChange;
|
|
129
|
+
init?: ConversationInit;
|
|
130
|
+
};
|
|
131
|
+
type ChannelRegistration = {
|
|
132
|
+
adapter: ChannelAdapter;
|
|
133
|
+
conversation?(message: InboundMessage, source: {
|
|
134
|
+
channel: string;
|
|
135
|
+
}): ConversationSetup | undefined;
|
|
136
|
+
};
|
|
137
|
+
type SendRetry = {
|
|
138
|
+
attempts: number;
|
|
139
|
+
baseDelayMs: number;
|
|
140
|
+
};
|
|
141
|
+
type ChannelsOptions = {
|
|
142
|
+
channels: Readonly<Record<string, ChannelRegistration>>;
|
|
143
|
+
whenBusy?: BusyPolicy;
|
|
144
|
+
retry?: SendRetry;
|
|
145
|
+
onReport?(report: ChannelReport): void;
|
|
146
|
+
};
|
|
147
|
+
type DeliveryStatus = {
|
|
148
|
+
state: "queued" | "running" | "sending" | "done" | "aborted";
|
|
149
|
+
} | {
|
|
150
|
+
state: "failed";
|
|
151
|
+
error: string;
|
|
152
|
+
} | {
|
|
153
|
+
state: "blocked";
|
|
154
|
+
reason: string;
|
|
155
|
+
};
|
|
156
|
+
type BindTarget = AddressKey & {
|
|
157
|
+
addressData?: JsonValue;
|
|
158
|
+
};
|
|
159
|
+
type EnvBuilder = NonNullable<HarnessOptions["env"]>;
|
|
160
|
+
type ChannelsHub = {
|
|
161
|
+
start(): Promise<void>;
|
|
162
|
+
stop(): Promise<void>;
|
|
163
|
+
deliver(channel: string, message: InboundMessage, options?: DeliverOptions): Promise<DeliveryReceipt | undefined>;
|
|
164
|
+
bind(target: BindTarget, conversationId: ConversationId): Promise<void>;
|
|
165
|
+
addresses(conversationId: ConversationId): Promise<AddressKey[]>;
|
|
166
|
+
conversationOf(key: AddressKey): Promise<ConversationId | undefined>;
|
|
167
|
+
status(deliveryId: SubmissionId): Promise<DeliveryStatus | undefined>;
|
|
168
|
+
cancel(key: AddressKey): Promise<void>;
|
|
169
|
+
clear(key: AddressKey): Promise<void>;
|
|
170
|
+
compact(key: AddressKey): Promise<void>;
|
|
171
|
+
end(key: AddressKey): Promise<void>;
|
|
172
|
+
};
|
|
173
|
+
type HubOptions = {
|
|
174
|
+
env?: EnvBuilder;
|
|
175
|
+
};
|
|
176
|
+
type Channels = {
|
|
177
|
+
extension: Extension;
|
|
178
|
+
tools: Extension;
|
|
179
|
+
bind(tx: Tx, target: BindTarget, conversationId: ConversationId): Promise<void>;
|
|
180
|
+
hub(harness: Harness, options?: HubOptions): ChannelsHub;
|
|
181
|
+
};
|
|
182
|
+
export declare function createChannels(options: ChannelsOptions): Channels;
|
|
183
|
+
export type { AdapterReport, AdapterStart, AddressKey, BindTarget, BusyPolicy, ChannelAdapter, ChannelEvent, ChannelRegistration, ChannelReport, Channels, ChannelsHub, ChannelsOptions, ConversationSetup, Deliver, DeliverOptions, DeliveryReceipt, DeliveryStatus, HubOptions, InboundFile, InboundMessage, OutboundMessage, OutboundPart, ReplyTarget, SendContext, SendResult, SendRetry };
|
|
184
|
+
//# sourceMappingURL=index.d.mts.map
|