@animalabs/agent-framework 0.23.1 → 0.24.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/README.md +212 -42
- package/dist/src/agent.d.ts +60 -9
- package/dist/src/agent.d.ts.map +1 -1
- package/dist/src/agent.js +92 -12
- package/dist/src/agent.js.map +1 -1
- package/dist/src/api/server.d.ts.map +1 -1
- package/dist/src/api/server.js +14 -12
- package/dist/src/api/server.js.map +1 -1
- package/dist/src/code-execution/engine.d.ts +177 -0
- package/dist/src/code-execution/engine.d.ts.map +1 -0
- package/dist/src/code-execution/engine.js +494 -0
- package/dist/src/code-execution/engine.js.map +1 -0
- package/dist/src/code-execution/index.d.ts +5 -10
- package/dist/src/code-execution/index.d.ts.map +1 -1
- package/dist/src/code-execution/index.js +5 -9
- package/dist/src/code-execution/index.js.map +1 -1
- package/dist/src/code-execution/isolate/calls.d.ts +114 -0
- package/dist/src/code-execution/isolate/calls.d.ts.map +1 -0
- package/dist/src/code-execution/isolate/calls.js +145 -0
- package/dist/src/code-execution/isolate/calls.js.map +1 -0
- package/dist/src/code-execution/isolate/child-entry.d.ts +2 -0
- package/dist/src/code-execution/isolate/child-entry.d.ts.map +1 -0
- package/dist/src/code-execution/isolate/child-entry.js +5 -0
- package/dist/src/code-execution/isolate/child-entry.js.map +1 -0
- package/dist/src/code-execution/isolate/child-main.d.ts +26 -0
- package/dist/src/code-execution/isolate/child-main.d.ts.map +1 -0
- package/dist/src/code-execution/isolate/child-main.js +132 -0
- package/dist/src/code-execution/isolate/child-main.js.map +1 -0
- package/dist/src/code-execution/isolate/child.d.ts +44 -0
- package/dist/src/code-execution/isolate/child.d.ts.map +1 -0
- package/dist/src/code-execution/isolate/child.js +315 -0
- package/dist/src/code-execution/isolate/child.js.map +1 -0
- package/dist/src/code-execution/isolate/frames.d.ts +80 -0
- package/dist/src/code-execution/isolate/frames.d.ts.map +1 -0
- package/dist/src/code-execution/isolate/frames.js +210 -0
- package/dist/src/code-execution/isolate/frames.js.map +1 -0
- package/dist/src/code-execution/isolate/output.d.ts +68 -0
- package/dist/src/code-execution/isolate/output.d.ts.map +1 -0
- package/dist/src/code-execution/isolate/output.js +143 -0
- package/dist/src/code-execution/isolate/output.js.map +1 -0
- package/dist/src/code-execution/isolate/prelude.d.ts +109 -0
- package/dist/src/code-execution/isolate/prelude.d.ts.map +1 -0
- package/dist/src/code-execution/isolate/prelude.js +401 -0
- package/dist/src/code-execution/isolate/prelude.js.map +1 -0
- package/dist/src/code-execution/isolate/protocol.d.ts +151 -0
- package/dist/src/code-execution/isolate/protocol.d.ts.map +1 -0
- package/dist/src/code-execution/isolate/protocol.js +150 -0
- package/dist/src/code-execution/isolate/protocol.js.map +1 -0
- package/dist/src/code-execution/isolate/render.d.ts +57 -0
- package/dist/src/code-execution/isolate/render.d.ts.map +1 -0
- package/dist/src/code-execution/isolate/render.js +214 -0
- package/dist/src/code-execution/isolate/render.js.map +1 -0
- package/dist/src/code-execution/isolate/runner.d.ts +250 -0
- package/dist/src/code-execution/isolate/runner.d.ts.map +1 -0
- package/dist/src/code-execution/isolate/runner.js +854 -0
- package/dist/src/code-execution/isolate/runner.js.map +1 -0
- package/dist/src/code-execution/isolate/scripts.d.ts +175 -0
- package/dist/src/code-execution/isolate/scripts.d.ts.map +1 -0
- package/dist/src/code-execution/isolate/scripts.js +357 -0
- package/dist/src/code-execution/isolate/scripts.js.map +1 -0
- package/dist/src/code-execution/quickjs.wasm +0 -0
- package/dist/src/code-execution/tool-definition.d.ts +93 -43
- package/dist/src/code-execution/tool-definition.d.ts.map +1 -1
- package/dist/src/code-execution/tool-definition.js +176 -142
- package/dist/src/code-execution/tool-definition.js.map +1 -1
- package/dist/src/deadline-timer.d.ts +3 -0
- package/dist/src/deadline-timer.d.ts.map +1 -1
- package/dist/src/deadline-timer.js +1 -1
- package/dist/src/deadline-timer.js.map +1 -1
- package/dist/src/framework.d.ts +1036 -440
- package/dist/src/framework.d.ts.map +1 -1
- package/dist/src/framework.js +4131 -2228
- package/dist/src/framework.js.map +1 -1
- package/dist/src/gate/event-gate.d.ts +28 -1
- package/dist/src/gate/event-gate.d.ts.map +1 -1
- package/dist/src/gate/event-gate.js +88 -10
- package/dist/src/gate/event-gate.js.map +1 -1
- package/dist/src/held-writes.d.ts +16 -3
- package/dist/src/held-writes.d.ts.map +1 -1
- package/dist/src/held-writes.js +16 -3
- package/dist/src/held-writes.js.map +1 -1
- package/dist/src/index.d.ts +6 -6
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +9 -8
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcpl/channel-registry.d.ts +471 -75
- package/dist/src/mcpl/channel-registry.d.ts.map +1 -1
- package/dist/src/mcpl/channel-registry.js +1673 -337
- package/dist/src/mcpl/channel-registry.js.map +1 -1
- package/dist/src/mcpl/conversation-router.d.ts +12 -7
- package/dist/src/mcpl/conversation-router.d.ts.map +1 -1
- package/dist/src/mcpl/conversation-router.js +12 -7
- package/dist/src/mcpl/conversation-router.js.map +1 -1
- package/dist/src/mcpl/convert-block.d.ts.map +1 -1
- package/dist/src/mcpl/convert-block.js +9 -5
- package/dist/src/mcpl/convert-block.js.map +1 -1
- package/dist/src/mcpl/inbound-source.d.ts +50 -0
- package/dist/src/mcpl/inbound-source.d.ts.map +1 -1
- package/dist/src/mcpl/inbound-source.js +130 -0
- package/dist/src/mcpl/inbound-source.js.map +1 -1
- package/dist/src/mcpl/index.d.ts +2 -1
- package/dist/src/mcpl/index.d.ts.map +1 -1
- package/dist/src/mcpl/index.js +3 -2
- package/dist/src/mcpl/index.js.map +1 -1
- package/dist/src/mcpl/log-value.d.ts +6 -0
- package/dist/src/mcpl/log-value.d.ts.map +1 -1
- package/dist/src/mcpl/log-value.js +8 -0
- package/dist/src/mcpl/log-value.js.map +1 -1
- package/dist/src/mcpl/modern-connection.d.ts +15 -6
- package/dist/src/mcpl/modern-connection.d.ts.map +1 -1
- package/dist/src/mcpl/modern-connection.js +168 -53
- package/dist/src/mcpl/modern-connection.js.map +1 -1
- package/dist/src/mcpl/prose-grammar.d.ts +4 -5
- package/dist/src/mcpl/prose-grammar.d.ts.map +1 -1
- package/dist/src/mcpl/prose-grammar.js +4 -5
- package/dist/src/mcpl/prose-grammar.js.map +1 -1
- package/dist/src/mcpl/protocol-family.d.ts +97 -10
- package/dist/src/mcpl/protocol-family.d.ts.map +1 -1
- package/dist/src/mcpl/protocol-family.js +173 -16
- package/dist/src/mcpl/protocol-family.js.map +1 -1
- package/dist/src/mcpl/push-coalescer.d.ts +132 -14
- package/dist/src/mcpl/push-coalescer.d.ts.map +1 -1
- package/dist/src/mcpl/push-coalescer.js +227 -50
- package/dist/src/mcpl/push-coalescer.js.map +1 -1
- package/dist/src/mcpl/push-handler.d.ts +6 -1
- package/dist/src/mcpl/push-handler.d.ts.map +1 -1
- package/dist/src/mcpl/push-handler.js +4 -1
- package/dist/src/mcpl/push-handler.js.map +1 -1
- package/dist/src/mcpl/reference-fetcher.d.ts +2 -2
- package/dist/src/mcpl/reference-fetcher.d.ts.map +1 -1
- package/dist/src/mcpl/reference-fetcher.js +4 -4
- package/dist/src/mcpl/reference-fetcher.js.map +1 -1
- package/dist/src/mcpl/server-connection.d.ts +50 -21
- package/dist/src/mcpl/server-connection.d.ts.map +1 -1
- package/dist/src/mcpl/server-connection.js +158 -74
- package/dist/src/mcpl/server-connection.js.map +1 -1
- package/dist/src/mcpl/tags.d.ts +24 -0
- package/dist/src/mcpl/tags.d.ts.map +1 -1
- package/dist/src/mcpl/tags.js +33 -0
- package/dist/src/mcpl/tags.js.map +1 -1
- package/dist/src/mcpl/tool-result-normalize.d.ts +2 -1
- package/dist/src/mcpl/tool-result-normalize.d.ts.map +1 -1
- package/dist/src/mcpl/tool-result-normalize.js.map +1 -1
- package/dist/src/mcpl/transport.d.ts +55 -7
- package/dist/src/mcpl/transport.d.ts.map +1 -1
- package/dist/src/mcpl/transport.js +163 -34
- package/dist/src/mcpl/transport.js.map +1 -1
- package/dist/src/mcpl/types.d.ts +22 -6
- package/dist/src/mcpl/types.d.ts.map +1 -1
- package/dist/src/mcpl/types.js.map +1 -1
- package/dist/src/module-registry.d.ts +4 -2
- package/dist/src/module-registry.d.ts.map +1 -1
- package/dist/src/module-registry.js +100 -13
- package/dist/src/module-registry.js.map +1 -1
- package/dist/src/modules/discord/index.d.ts.map +1 -1
- package/dist/src/modules/discord/index.js +8 -13
- package/dist/src/modules/discord/index.js.map +1 -1
- package/dist/src/modules/history/index.d.ts.map +1 -1
- package/dist/src/modules/history/index.js +27 -4
- package/dist/src/modules/history/index.js.map +1 -1
- package/dist/src/modules/history/semantic.d.ts +15 -3
- package/dist/src/modules/history/semantic.d.ts.map +1 -1
- package/dist/src/modules/history/semantic.js +27 -5
- package/dist/src/modules/history/semantic.js.map +1 -1
- package/dist/src/modules/index.d.ts +1 -1
- package/dist/src/modules/index.d.ts.map +1 -1
- package/dist/src/modules/index.js.map +1 -1
- package/dist/src/modules/unknown-tool.d.ts +4 -1
- package/dist/src/modules/unknown-tool.d.ts.map +1 -1
- package/dist/src/modules/unknown-tool.js +4 -1
- package/dist/src/modules/unknown-tool.js.map +1 -1
- package/dist/src/modules/workspace/branch-intent.d.ts +3 -1
- package/dist/src/modules/workspace/branch-intent.d.ts.map +1 -1
- package/dist/src/modules/workspace/branch-intent.js +3 -1
- package/dist/src/modules/workspace/branch-intent.js.map +1 -1
- package/dist/src/modules/workspace/edit-plan.d.ts +265 -0
- package/dist/src/modules/workspace/edit-plan.d.ts.map +1 -0
- package/dist/src/modules/workspace/edit-plan.js +794 -0
- package/dist/src/modules/workspace/edit-plan.js.map +1 -0
- package/dist/src/modules/workspace/edit-text.d.ts +117 -0
- package/dist/src/modules/workspace/edit-text.d.ts.map +1 -0
- package/dist/src/modules/workspace/edit-text.js +584 -0
- package/dist/src/modules/workspace/edit-text.js.map +1 -0
- package/dist/src/modules/workspace/effects.d.ts +5 -4
- package/dist/src/modules/workspace/effects.d.ts.map +1 -1
- package/dist/src/modules/workspace/effects.js +78 -25
- package/dist/src/modules/workspace/effects.js.map +1 -1
- package/dist/src/modules/workspace/index.d.ts +484 -61
- package/dist/src/modules/workspace/index.d.ts.map +1 -1
- package/dist/src/modules/workspace/index.js +2173 -645
- package/dist/src/modules/workspace/index.js.map +1 -1
- package/dist/src/modules/workspace/observe.d.ts +213 -38
- package/dist/src/modules/workspace/observe.d.ts.map +1 -1
- package/dist/src/modules/workspace/observe.js +416 -36
- package/dist/src/modules/workspace/observe.js.map +1 -1
- package/dist/src/modules/workspace/reconcile.d.ts.map +1 -1
- package/dist/src/modules/workspace/reconcile.js +15 -8
- package/dist/src/modules/workspace/reconcile.js.map +1 -1
- package/dist/src/modules/workspace/text.d.ts +32 -0
- package/dist/src/modules/workspace/text.d.ts.map +1 -0
- package/dist/src/modules/workspace/text.js +67 -0
- package/dist/src/modules/workspace/text.js.map +1 -0
- package/dist/src/modules/workspace/types.d.ts +210 -6
- package/dist/src/modules/workspace/types.d.ts.map +1 -1
- package/dist/src/modules/workspace/types.js.map +1 -1
- package/dist/src/modules/workspace/watcher.d.ts +3 -2
- package/dist/src/modules/workspace/watcher.d.ts.map +1 -1
- package/dist/src/modules/workspace/watcher.js.map +1 -1
- package/dist/src/operator-log.d.ts +52 -24
- package/dist/src/operator-log.d.ts.map +1 -1
- package/dist/src/operator-log.js.map +1 -1
- package/dist/src/recovery/discord-awareness-outbox.d.ts +496 -72
- package/dist/src/recovery/discord-awareness-outbox.d.ts.map +1 -1
- package/dist/src/recovery/discord-awareness-outbox.js +1196 -289
- package/dist/src/recovery/discord-awareness-outbox.js.map +1 -1
- package/dist/src/recovery/offline-branch.d.ts +26 -1
- package/dist/src/recovery/offline-branch.d.ts.map +1 -1
- package/dist/src/recovery/offline-branch.js +164 -39
- package/dist/src/recovery/offline-branch.js.map +1 -1
- package/dist/src/recovery/recover-cli.js +23 -4
- package/dist/src/recovery/recover-cli.js.map +1 -1
- package/dist/src/send-tools.d.ts +11 -0
- package/dist/src/send-tools.d.ts.map +1 -0
- package/dist/src/send-tools.js +11 -0
- package/dist/src/send-tools.js.map +1 -0
- package/dist/src/tool-result-guard.d.ts +4 -3
- package/dist/src/tool-result-guard.d.ts.map +1 -1
- package/dist/src/tool-result-guard.js +5 -4
- package/dist/src/tool-result-guard.js.map +1 -1
- package/dist/src/tool-result-history.d.ts +1 -1
- package/dist/src/tool-result-history.js +1 -1
- package/dist/src/tune-out/coordinator.d.ts +21 -0
- package/dist/src/tune-out/coordinator.d.ts.map +1 -1
- package/dist/src/tune-out/coordinator.js +139 -37
- package/dist/src/tune-out/coordinator.js.map +1 -1
- package/dist/src/types/agent.d.ts +4 -0
- package/dist/src/types/agent.d.ts.map +1 -1
- package/dist/src/types/events.d.ts +62 -9
- package/dist/src/types/events.d.ts.map +1 -1
- package/dist/src/types/framework.d.ts +62 -58
- package/dist/src/types/framework.d.ts.map +1 -1
- package/dist/src/types/module.d.ts +40 -8
- package/dist/src/types/module.d.ts.map +1 -1
- package/dist/src/types/trace.d.ts +111 -10
- package/dist/src/types/trace.d.ts.map +1 -1
- package/dist/src/usage/types.d.ts +16 -0
- package/dist/src/usage/types.d.ts.map +1 -1
- package/dist/src/usage/usage-tracker.d.ts +14 -1
- package/dist/src/usage/usage-tracker.d.ts.map +1 -1
- package/dist/src/usage/usage-tracker.js +81 -41
- package/dist/src/usage/usage-tracker.js.map +1 -1
- package/package.json +6 -5
- package/src/agent.ts +93 -12
- package/src/api/server.ts +14 -12
- package/src/code-execution/engine.ts +595 -0
- package/src/code-execution/index.ts +5 -17
- package/src/code-execution/isolate/calls.ts +199 -0
- package/src/code-execution/isolate/child-entry.ts +5 -0
- package/src/code-execution/isolate/child-main.ts +132 -0
- package/src/code-execution/isolate/child.ts +327 -0
- package/src/code-execution/isolate/frames.ts +209 -0
- package/src/code-execution/isolate/output.ts +161 -0
- package/src/code-execution/isolate/prelude.ts +409 -0
- package/src/code-execution/isolate/protocol.ts +240 -0
- package/src/code-execution/isolate/render.ts +230 -0
- package/src/code-execution/isolate/runner.ts +911 -0
- package/src/code-execution/isolate/scripts.ts +479 -0
- package/src/code-execution/quickjs.wasm +0 -0
- package/src/code-execution/quickjs.wasm.LICENSES +149 -0
- package/src/code-execution/tool-definition.ts +236 -167
- package/src/deadline-timer.ts +1 -1
- package/src/framework.ts +4507 -2406
- package/src/gate/event-gate.ts +78 -11
- package/src/held-writes.ts +17 -3
- package/src/index.ts +30 -22
- package/src/mcpl/channel-registry.ts +1825 -368
- package/src/mcpl/conversation-router.ts +12 -7
- package/src/mcpl/convert-block.ts +9 -5
- package/src/mcpl/inbound-source.ts +131 -0
- package/src/mcpl/index.ts +4 -2
- package/src/mcpl/log-value.ts +9 -0
- package/src/mcpl/modern-connection.ts +162 -53
- package/src/mcpl/prose-grammar.ts +4 -5
- package/src/mcpl/protocol-family.ts +199 -21
- package/src/mcpl/push-coalescer.ts +306 -62
- package/src/mcpl/push-handler.ts +10 -2
- package/src/mcpl/reference-fetcher.ts +4 -4
- package/src/mcpl/server-connection.ts +180 -79
- package/src/mcpl/tags.ts +36 -0
- package/src/mcpl/tool-result-normalize.ts +2 -1
- package/src/mcpl/transport.ts +162 -33
- package/src/mcpl/types.ts +23 -6
- package/src/module-registry.ts +92 -13
- package/src/modules/discord/index.ts +8 -13
- package/src/modules/history/index.ts +25 -3
- package/src/modules/history/semantic.ts +29 -6
- package/src/modules/index.ts +1 -0
- package/src/modules/unknown-tool.ts +4 -1
- package/src/modules/workspace/branch-intent.ts +3 -1
- package/src/modules/workspace/edit-plan.ts +954 -0
- package/src/modules/workspace/edit-text.ts +618 -0
- package/src/modules/workspace/effects.ts +70 -19
- package/src/modules/workspace/index.ts +2247 -642
- package/src/modules/workspace/observe.ts +465 -56
- package/src/modules/workspace/reconcile.ts +14 -7
- package/src/modules/workspace/text.ts +68 -0
- package/src/modules/workspace/types.ts +211 -6
- package/src/modules/workspace/watcher.ts +3 -2
- package/src/operator-log.ts +47 -19
- package/src/recovery/discord-awareness-outbox.ts +1500 -356
- package/src/recovery/offline-branch.ts +189 -55
- package/src/recovery/recover-cli.ts +25 -4
- package/src/send-tools.ts +11 -0
- package/src/tool-result-guard.ts +6 -5
- package/src/tool-result-history.ts +1 -1
- package/src/tune-out/coordinator.ts +163 -42
- package/src/types/agent.ts +4 -0
- package/src/types/events.ts +62 -9
- package/src/types/framework.ts +62 -58
- package/src/types/module.ts +40 -8
- package/src/types/trace.ts +121 -15
- package/src/usage/types.ts +16 -0
- package/src/usage/usage-tracker.ts +86 -43
- package/dist/src/code-execution/py-runner.d.ts +0 -191
- package/dist/src/code-execution/py-runner.d.ts.map +0 -1
- package/dist/src/code-execution/py-runner.js +0 -655
- package/dist/src/code-execution/py-runner.js.map +0 -1
- package/dist/src/code-execution/runtime-py.d.ts +0 -50
- package/dist/src/code-execution/runtime-py.d.ts.map +0 -1
- package/dist/src/code-execution/runtime-py.js +0 -677
- package/dist/src/code-execution/runtime-py.js.map +0 -1
- package/dist/src/mcpl/prose-stream-router.d.ts +0 -88
- package/dist/src/mcpl/prose-stream-router.d.ts.map +0 -1
- package/dist/src/mcpl/prose-stream-router.js +0 -291
- package/dist/src/mcpl/prose-stream-router.js.map +0 -1
- package/src/code-execution/py-runner.ts +0 -791
- package/src/code-execution/runtime-py.ts +0 -677
- package/src/mcpl/prose-stream-router.ts +0 -268
|
@@ -1,109 +1,533 @@
|
|
|
1
|
+
import type { JsStore } from '@animalabs/chronicle';
|
|
2
|
+
/**
|
|
3
|
+
* Discord awareness marks: a reaction (💤 by default) that an operator may
|
|
4
|
+
* choose to place on Discord messages a surgery removed from a resident's
|
|
5
|
+
* context, so the people who wrote them can see the resident no longer has
|
|
6
|
+
* them in view.
|
|
7
|
+
*
|
|
8
|
+
* Marks are an explicit publication choice, separate from the surgery itself
|
|
9
|
+
* (`DiscordAwarenessMarks`, default `none`). Once requested, they are
|
|
10
|
+
* one-shot: branch moves and restarts never derive new requests from branch
|
|
11
|
+
* state, and a restart never activates a surgery's marks. A batch a crash
|
|
12
|
+
* left prepared is retired at startup, unsent, and the operator redoes the
|
|
13
|
+
* surgery from its source to choose marks again (see recoverAtStartup).
|
|
14
|
+
* Requests an activated batch owes go out with any delivery pass, a start's
|
|
15
|
+
* included. What a restart does finish is an interrupted suppression's body,
|
|
16
|
+
* on its own branch. An operator retracts or cancels explicitly. A version 2
|
|
17
|
+
* ledger's batches are kept as history when it is rewritten as version 3,
|
|
18
|
+
* and the work it had still to do is dropped, none of it sent, since nobody
|
|
19
|
+
* chose it (see migrateLedger).
|
|
20
|
+
*
|
|
21
|
+
* The ledger is a table with one entry per reaction, keyed by (MCPL server
|
|
22
|
+
* id, channel, message, emoji): what the acts that still stand want of it,
|
|
23
|
+
* whether Discord is owed a request for that, and what Discord last
|
|
24
|
+
* answered. It is never a model of what is on Discord: an answer is kept as
|
|
25
|
+
* an answer, and a request never answered is kept as one that may land,
|
|
26
|
+
* which nothing takes back. The server id is the configured route to a bot,
|
|
27
|
+
* not the bot's identity: if the route is re-pointed at another bot, owed
|
|
28
|
+
* requests act as that bot, and nothing here can detect it.
|
|
29
|
+
*
|
|
30
|
+
* Acts are ordered by the ledger's own counter (`moment`), never the clock:
|
|
31
|
+
* a surgery's marks choice (its prepare), its activation and each retract
|
|
32
|
+
* take the next moment. Between opposite wishes for one reaction the later
|
|
33
|
+
* act wins, and an activation never revives a reaction that a retract made
|
|
34
|
+
* after the surgery's choice decided against, even once that retract is
|
|
35
|
+
* cancelled.
|
|
36
|
+
*
|
|
37
|
+
* One instance is the file's only writer: the running framework, or the
|
|
38
|
+
* offline recovery while the host is stopped. It keeps the document in
|
|
39
|
+
* memory, reads the file when it first needs it and again after a write
|
|
40
|
+
* fails, and answers views from memory. Acts run one at a time, each written
|
|
41
|
+
* before the next starts: compact JSON to a temporary file, synced, renamed
|
|
42
|
+
* over the ledger, then the ledger's directory and its parent synced, by the
|
|
43
|
+
* rule the framework's own recovery files follow (writeRecoveryFile). A
|
|
44
|
+
* write that activates, completes or retires a batch syncs the store first,
|
|
45
|
+
* so the ledger never outlives the branch state it relies on. A write that
|
|
46
|
+
* throws has left the file as it was, and the act's change is dropped with
|
|
47
|
+
* it; a directory that can't be synced after the rename is reported
|
|
48
|
+
* (onUnsyncedWrite), and the write stands.
|
|
49
|
+
*/
|
|
1
50
|
export declare const DEFAULT_DISCORD_AWARENESS_EMOJI = "\uD83D\uDCA4";
|
|
51
|
+
/**
|
|
52
|
+
* Bound text that came from elsewhere (a Discord error body, a filesystem
|
|
53
|
+
* error) before it is written to the ledger, logged or returned in a
|
|
54
|
+
* receipt: the ledger keeps its entries for the store's life, and a server's
|
|
55
|
+
* error text has no length limit of its own. Head and tail are kept, with
|
|
56
|
+
* the omitted length stated; a cut never splits a surrogate pair.
|
|
57
|
+
*/
|
|
58
|
+
export declare function boundDiscordAwarenessText(text: string, max?: number): string;
|
|
59
|
+
/**
|
|
60
|
+
* A Discord answer that the reaction can never succeed: the message or
|
|
61
|
+
* channel is gone or inaccessible, the emoji can't be used, or the message
|
|
62
|
+
* takes no more reactions (or blocks this one). Retrying cannot help.
|
|
63
|
+
*/
|
|
64
|
+
export declare function isPermanentDiscordReactionFailure(message: string): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* An operator's request the ledger won't carry out: an unknown batch or
|
|
67
|
+
* retract request. Nothing was written. Any other error from an operator
|
|
68
|
+
* control is a failure to read or write the ledger.
|
|
69
|
+
*/
|
|
70
|
+
export declare class DiscordAwarenessRefusal extends Error {
|
|
71
|
+
constructor(message: string);
|
|
72
|
+
}
|
|
73
|
+
/** Where a store's awareness ledger lives: the path every release used. */
|
|
2
74
|
export declare function defaultDiscordAwarenessOutboxPath(storePath: string): string;
|
|
3
75
|
export interface DiscordAwarenessRef {
|
|
4
76
|
serverId: string;
|
|
5
77
|
channelId: string;
|
|
6
78
|
messageId: string;
|
|
7
79
|
}
|
|
80
|
+
/** Which removed messages a publication choice covers. */
|
|
81
|
+
export type DiscordAwarenessScope = 'addressed' | 'all';
|
|
82
|
+
/**
|
|
83
|
+
* An operator's publication choice for one surgery. `none`, the default,
|
|
84
|
+
* keeps the surgery local. With `refs`, the choice authorizes exactly those
|
|
85
|
+
* refs (as a preview showed them): the surgery marks only the ones it
|
|
86
|
+
* actually removes, and never widens the set. Without `refs`, the scope is
|
|
87
|
+
* evaluated when the surgery applies; that form is for an immediate act whose
|
|
88
|
+
* choice and application are the same moment.
|
|
89
|
+
*/
|
|
90
|
+
export type DiscordAwarenessMarks = 'none' | {
|
|
91
|
+
scope: DiscordAwarenessScope;
|
|
92
|
+
refs?: DiscordAwarenessRef[];
|
|
93
|
+
};
|
|
8
94
|
export type DiscordAwarenessAction = 'add' | 'remove';
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
markerPresent: boolean;
|
|
13
|
-
deliveryStatus: DiscordAwarenessDeliveryStatus;
|
|
14
|
-
attempts: number;
|
|
15
|
-
lastAction?: DiscordAwarenessAction;
|
|
16
|
-
lastAttemptAt?: number;
|
|
17
|
-
lastError?: string;
|
|
95
|
+
export interface DiscordSuppressionInterval {
|
|
96
|
+
fromId: string;
|
|
97
|
+
toId: string;
|
|
18
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Where a batch is in its life:
|
|
101
|
+
* - `prepared`: recorded before its surgery's body change, which settles it.
|
|
102
|
+
* One a crash leaves is retired at startup, never activated (see
|
|
103
|
+
* recoverAtStartup), except a suppression whose body a start on its branch
|
|
104
|
+
* finishes first. One an operator cancelled stays prepared, with
|
|
105
|
+
* `cancelled` set, and is never activated;
|
|
106
|
+
* - `active`: activated by its surgery, or kept so from a version 2 ledger;
|
|
107
|
+
* - `retired`: none of its marks will be sent: its surgery never happened or
|
|
108
|
+
* couldn't record its activation, a start found it left prepared, or a
|
|
109
|
+
* version 2 ledger never activated it.
|
|
110
|
+
*/
|
|
111
|
+
export type DiscordAwarenessBatchStatus = 'prepared' | 'active' | 'retired';
|
|
112
|
+
/** One surgery's marks choice, and a suppression's body to resume. */
|
|
19
113
|
export interface DiscordAwarenessBatch {
|
|
20
114
|
id: string;
|
|
21
|
-
status:
|
|
115
|
+
status: DiscordAwarenessBatchStatus;
|
|
22
116
|
agentName: string;
|
|
23
117
|
sourceBranch: string;
|
|
24
118
|
targetBranch: string;
|
|
25
119
|
emoji: string;
|
|
120
|
+
/** The clock when it was prepared: shown, never compared. */
|
|
26
121
|
createdAt: number;
|
|
27
|
-
|
|
122
|
+
/** The ledger moment of the surgery's marks choice (its prepare). */
|
|
123
|
+
chosen: number;
|
|
124
|
+
/** `none` for a suppression's batch with no marks; `legacy` for a version 2 ledger's. */
|
|
125
|
+
scope: 'none' | DiscordAwarenessScope | 'legacy';
|
|
126
|
+
/** The refs this batch requests marks on (authorized ∩ removed). */
|
|
127
|
+
refs: DiscordAwarenessRef[];
|
|
128
|
+
/** Removed addressable messages this batch leaves unmarked. */
|
|
129
|
+
unmarked?: number;
|
|
130
|
+
/** Authorized refs the surgery did not remove. */
|
|
131
|
+
notRemoved?: number;
|
|
28
132
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
133
|
+
* A suppression's removals, by message ids, which a start on its target
|
|
134
|
+
* branch applies again while the batch is prepared: that branch being
|
|
135
|
+
* active doesn't prove the redactions finished. The ids make each one
|
|
136
|
+
* idempotent.
|
|
31
137
|
*/
|
|
32
|
-
activationPolicy?: 'target-branch' | 'explicit';
|
|
33
|
-
/** Idempotent interval operations used to resume an interrupted suppression. */
|
|
34
138
|
suppressionIntervals?: DiscordSuppressionInterval[];
|
|
139
|
+
cancelled?: {
|
|
140
|
+
at: number;
|
|
141
|
+
by?: string;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* A version 2 ledger's batch: how many of its refs agent-framework 0.22.x's
|
|
145
|
+
* last attempt saw added (an add it recorded no error for), set when the
|
|
146
|
+
* ledger was rewritten as version 3. It is history, never a claim about
|
|
147
|
+
* what is on Discord now.
|
|
148
|
+
*/
|
|
149
|
+
legacyAdded?: number;
|
|
35
150
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
151
|
+
/** A surgery's request, as it prepares a batch. */
|
|
152
|
+
export interface DiscordAwarenessPrepareInput {
|
|
153
|
+
agentName: string;
|
|
154
|
+
sourceBranch: string;
|
|
155
|
+
targetBranch: string;
|
|
156
|
+
refs: DiscordAwarenessRef[];
|
|
157
|
+
scope: 'none' | DiscordAwarenessScope;
|
|
158
|
+
emoji?: string;
|
|
159
|
+
suppressionIntervals?: DiscordSuppressionInterval[];
|
|
160
|
+
unmarked?: number;
|
|
161
|
+
notRemoved?: number;
|
|
39
162
|
}
|
|
40
|
-
|
|
41
|
-
|
|
163
|
+
/**
|
|
164
|
+
* What the ledger will do with a batch whose body change has landed:
|
|
165
|
+
* - `queued`: it is active, its requests owed;
|
|
166
|
+
* - `not-scheduled`: none of its marks will be sent. It was retired, or it
|
|
167
|
+
* couldn't be, and stays prepared for the next start to retire, or it was
|
|
168
|
+
* never recorded; `error` says which, and why its activation failed.
|
|
169
|
+
*/
|
|
170
|
+
export type DiscordAwarenessSettlement = {
|
|
171
|
+
status: 'queued';
|
|
172
|
+
queued: number;
|
|
173
|
+
} | {
|
|
174
|
+
status: 'not-scheduled';
|
|
175
|
+
error: string;
|
|
176
|
+
};
|
|
177
|
+
export type DiscordAwarenessOutcome = 'confirmed' | 'failed' | 'not-sent' | 'unknown';
|
|
178
|
+
/** A request Discord is owed for one reaction, or one claimed to send. */
|
|
179
|
+
export interface DiscordAwarenessRequest extends DiscordAwarenessRef {
|
|
42
180
|
emoji: string;
|
|
43
181
|
action: DiscordAwarenessAction;
|
|
44
|
-
|
|
182
|
+
/** The moment of the act that owes it. */
|
|
183
|
+
due: number;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* A reaction's state, as views and receipts count it:
|
|
187
|
+
* - `queued`: a request is owed and not yet sent;
|
|
188
|
+
* - `sending`: a request is on the wire;
|
|
189
|
+
* - `present`, `absent`: nothing is owed, and that was Discord's last answer;
|
|
190
|
+
* - `unknown`: nothing is owed, and the last request went unanswered;
|
|
191
|
+
* - `failed`: what was owed ended unconfirmed: Discord refused it for good,
|
|
192
|
+
* or three attempts went unconfirmed;
|
|
193
|
+
* - `untouched`: no request was ever answered or owed.
|
|
194
|
+
*/
|
|
195
|
+
export type DiscordAwarenessReactionState = 'queued' | 'sending' | 'present' | 'absent' | 'unknown' | 'failed' | 'untouched';
|
|
196
|
+
/** Receipt for cancel(). Nothing is ever removed from Discord by a cancel. */
|
|
197
|
+
export interface DiscordAwarenessCancelReceipt {
|
|
198
|
+
/** The batch id or retract request id that was cancelled. */
|
|
199
|
+
target: string;
|
|
200
|
+
kind: 'batch' | 'retract';
|
|
201
|
+
/** Reactions this call left with nothing owed before any request for what
|
|
202
|
+
* the act wanted went out: for a batch not yet activated, every mark it
|
|
203
|
+
* would have requested. A repeated cancel stops none. */
|
|
204
|
+
cancelled: number;
|
|
205
|
+
/** The act's reactions whose last answer from Discord is what the act
|
|
206
|
+
* wanted (cancel undoes none of them). */
|
|
207
|
+
confirmed: number;
|
|
208
|
+
/** The act's reactions with a request on the wire or one never answered:
|
|
209
|
+
* any may land. */
|
|
210
|
+
mayStillLand: number;
|
|
211
|
+
}
|
|
212
|
+
/** Receipt for retract(). */
|
|
213
|
+
export interface DiscordAwarenessRetractReceipt {
|
|
214
|
+
requestId: string;
|
|
215
|
+
/** Removals queued: one per selected reaction, whatever was answered before. */
|
|
216
|
+
removalsQueued: number;
|
|
217
|
+
/** Reactions whose owed add this removal replaced. An add on the wire
|
|
218
|
+
* still settles before the removal is sent, and may land
|
|
219
|
+
* (keysWithUnresolvedAdds). */
|
|
220
|
+
addsSuperseded: number;
|
|
221
|
+
/** Reactions with an add on the wire or one never answered: such an add
|
|
222
|
+
* may land after this removal. */
|
|
223
|
+
keysWithUnresolvedAdds: number;
|
|
224
|
+
}
|
|
225
|
+
/** A version 2 ledger's batch whose undelivered work its rewrite as version
|
|
226
|
+
* 3 dropped, none of it sent (see migrateLedger). */
|
|
227
|
+
export interface DiscordAwarenessImportedUnsent {
|
|
228
|
+
batchId: string;
|
|
229
|
+
agentName: string;
|
|
230
|
+
sourceBranch: string;
|
|
231
|
+
targetBranch: string;
|
|
232
|
+
/** Marks agent-framework 0.22.x had still to add, and to remove. */
|
|
233
|
+
adds: number;
|
|
234
|
+
removals: number;
|
|
235
|
+
}
|
|
236
|
+
/** A batch startup retired (see recoverAtStartup), with what the operator
|
|
237
|
+
* needs to redo its surgery. */
|
|
238
|
+
export interface DiscordAwarenessRetirement {
|
|
239
|
+
batchId: string;
|
|
240
|
+
agentName: string;
|
|
241
|
+
sourceBranch: string;
|
|
242
|
+
targetBranch: string;
|
|
243
|
+
/** The marks it would have requested, none of them sent: 0 for a batch
|
|
244
|
+
* with none, one an operator cancelled, or a version 2 ledger's, whose
|
|
245
|
+
* undelivered work its rewrite dropped and reported. */
|
|
246
|
+
marks: number;
|
|
247
|
+
/** Whether it is a suppression (it names removal intervals). */
|
|
248
|
+
suppression: boolean;
|
|
249
|
+
/** A version 2 ledger's batch: its marks stay as that ledger left them. */
|
|
250
|
+
imported?: boolean;
|
|
251
|
+
}
|
|
252
|
+
/** Per-batch view for operators: what was asked and what is known. */
|
|
253
|
+
export interface DiscordAwarenessBatchView {
|
|
254
|
+
kind: 'batch';
|
|
255
|
+
id: string;
|
|
256
|
+
status: DiscordAwarenessBatchStatus;
|
|
257
|
+
scope: DiscordAwarenessBatch['scope'];
|
|
258
|
+
agentName: string;
|
|
259
|
+
sourceBranch: string;
|
|
260
|
+
targetBranch: string;
|
|
261
|
+
emoji: string;
|
|
262
|
+
createdAt: number;
|
|
263
|
+
refs: number;
|
|
264
|
+
unmarked?: number;
|
|
265
|
+
notRemoved?: number;
|
|
266
|
+
cancelled?: {
|
|
267
|
+
at: number;
|
|
268
|
+
by?: string;
|
|
269
|
+
};
|
|
270
|
+
/** Its refs' reactions, by state. */
|
|
271
|
+
reactions: Record<DiscordAwarenessReactionState, number>;
|
|
272
|
+
/** Its refs' reactions with a request on the wire or one never answered. */
|
|
273
|
+
mayStillLand: number;
|
|
274
|
+
/** A version 2 ledger's batch: refs 0.22.x's last attempt saw added
|
|
275
|
+
* (DiscordAwarenessBatch.legacyAdded). */
|
|
276
|
+
legacyAdded?: number;
|
|
45
277
|
}
|
|
46
|
-
|
|
278
|
+
/** One retract request: the removals it queued and what became of them. */
|
|
279
|
+
export interface DiscordAwarenessRetractView {
|
|
280
|
+
kind: 'retract';
|
|
281
|
+
/** The retract's request id (what cancel takes). */
|
|
47
282
|
id: string;
|
|
48
|
-
|
|
49
|
-
|
|
283
|
+
/** The batch it retracted, or `all`. */
|
|
284
|
+
target: string;
|
|
285
|
+
at: number;
|
|
286
|
+
by?: string;
|
|
287
|
+
cancelled?: {
|
|
288
|
+
at: number;
|
|
289
|
+
by?: string;
|
|
290
|
+
};
|
|
291
|
+
/** Removals it queued. */
|
|
292
|
+
keys: number;
|
|
293
|
+
/** The reactions it still wants absent, by state. */
|
|
294
|
+
reactions: Record<DiscordAwarenessReactionState, number>;
|
|
295
|
+
/** Of those, the ones with a request on the wire or one never answered. */
|
|
296
|
+
mayStillLand: number;
|
|
50
297
|
}
|
|
298
|
+
export type DiscordAwarenessView = DiscordAwarenessBatchView | DiscordAwarenessRetractView;
|
|
299
|
+
/** Extract Discord addressing metadata without reading message content. */
|
|
51
300
|
export interface DiscordMessageMetadataCarrier {
|
|
52
301
|
metadata?: Record<string, unknown>;
|
|
53
302
|
}
|
|
54
|
-
/** Extract Discord addressing metadata without reading message content. */
|
|
55
303
|
export declare function extractDiscordAwarenessRefs(messages: DiscordMessageMetadataCarrier[], forcedServerId?: string): DiscordAwarenessRef[];
|
|
56
304
|
/**
|
|
57
|
-
* A
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
305
|
+
* A surgery's marks choice as a caller passes it at runtime: `none` (or left
|
|
306
|
+
* out), or `{ scope: 'addressed' | 'all', refs? }` with each ref a Discord
|
|
307
|
+
* address. Anything else is refused, never guessed: a bare scope string (the
|
|
308
|
+
* host/command vocabulary) or a misspelled scope would otherwise skip the
|
|
309
|
+
* scope filter and mark every addressable message. Each entry point that
|
|
310
|
+
* takes a choice in this form checks it with this before it plans or
|
|
311
|
+
* changes anything: the framework's rollback and suppression, and the
|
|
312
|
+
* offline recovery. host/command's undo by messages takes the bare scope
|
|
313
|
+
* words instead and refuses any other, and the recovery CLI parses its --marks.
|
|
314
|
+
*/
|
|
315
|
+
export declare function checkedDiscordAwarenessMarks(marks: unknown): DiscordAwarenessMarks;
|
|
316
|
+
/**
|
|
317
|
+
* Select the refs a publication choice covers among removed messages.
|
|
318
|
+
* `addressed` means the message carried the MCPL `chat:addressed` tag (a
|
|
319
|
+
* mention, a reply to the bot, or a DM, as the server classified it); the
|
|
320
|
+
* same signal the framework uses for loci and wakes. With `marks.refs`, only
|
|
321
|
+
* those refs are eligible as well.
|
|
322
|
+
*/
|
|
323
|
+
export declare function selectDiscordAwarenessRefs(messages: DiscordMessageMetadataCarrier[], marks: DiscordAwarenessMarks, forcedServerId?: string): {
|
|
324
|
+
refs: DiscordAwarenessRef[];
|
|
325
|
+
addressable: number;
|
|
326
|
+
unmarked: number;
|
|
327
|
+
notRemoved: number;
|
|
328
|
+
};
|
|
329
|
+
/**
|
|
330
|
+
* The durable awareness-mark ledger (see the module comment). Writing calls
|
|
331
|
+
* are async and resolve once their write is on disk; each runs alone. Views
|
|
332
|
+
* are synchronous, from memory: one made while a write is in progress sees
|
|
333
|
+
* the act that write records.
|
|
62
334
|
*/
|
|
63
335
|
export declare class DiscordAwarenessOutbox {
|
|
64
336
|
readonly path: string;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
337
|
+
private readonly store?;
|
|
338
|
+
/** Told what a version 2 ledger's rewrite drops, before it is written. */
|
|
339
|
+
private readonly announceImport?;
|
|
340
|
+
/** Told of a directory that couldn't be synced after a write's rename. */
|
|
341
|
+
private readonly onUnsyncedWrite;
|
|
342
|
+
/** The document, or null until it is read, and after a failed write
|
|
343
|
+
* whose file couldn't be read back: the next read tries again. */
|
|
344
|
+
private state;
|
|
345
|
+
/** The tail of the acts queued so far: each act starts after it. */
|
|
346
|
+
private queue;
|
|
347
|
+
/**
|
|
348
|
+
* @param path the ledger file (defaultDiscordAwarenessOutboxPath under a store).
|
|
349
|
+
* @param opts.store the store whose branch state activations, completions
|
|
350
|
+
* and retirements rely on, synced before each is written.
|
|
351
|
+
* @param opts.announceImport told, before a version 2 ledger is rewritten
|
|
352
|
+
* as version 3, which batches' undelivered work that drops, none of it sent.
|
|
353
|
+
* @param opts.onUnsyncedWrite told of a directory that couldn't be synced
|
|
354
|
+
* after a write's rename: the write stands, though an operating system
|
|
355
|
+
* crash could lose it. Logged to stderr when not given.
|
|
356
|
+
*/
|
|
357
|
+
constructor(path: string, opts?: {
|
|
358
|
+
store?: JsStore;
|
|
359
|
+
announceImport?: (unsent: DiscordAwarenessImportedUnsent[]) => void;
|
|
360
|
+
onUnsyncedWrite?: (directory: string, error: unknown) => void;
|
|
361
|
+
});
|
|
362
|
+
/**
|
|
363
|
+
* Record a surgery's choice before its body change. Returns null when it
|
|
364
|
+
* carries neither marks nor a suppression's removals. A prepared batch
|
|
365
|
+
* never delivers: only its surgery's activate() does. If its write fails it
|
|
366
|
+
* throws, saying what the ledger may hold (failedPrepare), and the surgery
|
|
367
|
+
* doesn't run.
|
|
368
|
+
*/
|
|
369
|
+
prepare(input: DiscordAwarenessPrepareInput): Promise<DiscordAwarenessBatch | null>;
|
|
370
|
+
/**
|
|
371
|
+
* Activate a prepared batch after its body change landed: each of its
|
|
372
|
+
* refs is wanted present, and a request is owed for it, on disk before
|
|
373
|
+
* this returns. Activation completes the surgery's earlier choice; it is
|
|
374
|
+
* not a new one, so a reaction a retract reached after that choice, even
|
|
375
|
+
* one cancelled since, keeps what the retract decided. Returns how many
|
|
376
|
+
* requests it made owed.
|
|
377
|
+
*/
|
|
378
|
+
activate(batchId: string): Promise<number>;
|
|
379
|
+
private activateIn;
|
|
380
|
+
/**
|
|
381
|
+
* Activate a batch after its body change landed, and if that cannot be
|
|
382
|
+
* recorded, retire it instead, so that what the caller reports is what
|
|
383
|
+
* the ledger will do: `queued`, or `not-scheduled`. A batch that can be
|
|
384
|
+
* neither activated nor retired stays prepared in the file, since a write
|
|
385
|
+
* that fails leaves it as it was, and a start retires it, none of its
|
|
386
|
+
* marks sent: the next start, or for a suppression the first start on its
|
|
387
|
+
* branch, once it finds the removals applied. Never throws.
|
|
388
|
+
*/
|
|
389
|
+
settleActivation(batchId: string): Promise<DiscordAwarenessSettlement>;
|
|
390
|
+
/**
|
|
391
|
+
* Retire a batch whose surgery did not complete. Only a prepared batch can
|
|
392
|
+
* be retired; returns false when nothing was.
|
|
393
|
+
*/
|
|
394
|
+
discard(batchId: string): Promise<boolean>;
|
|
395
|
+
private retireIn;
|
|
396
|
+
/**
|
|
397
|
+
* The suppressions whose body a start on `branch` finishes: prepared
|
|
398
|
+
* batches that name removal intervals, cancelled or not, whose target is
|
|
399
|
+
* exactly that branch: a surgery's leftovers, or a version 2 ledger's that
|
|
400
|
+
* agent-framework 0.22.x never activated. Branch ancestry is never
|
|
401
|
+
* consulted. Throws when the ledger can't be read.
|
|
402
|
+
*/
|
|
403
|
+
pendingSuppressionsFor(branch: string): DiscordAwarenessBatch[];
|
|
404
|
+
/**
|
|
405
|
+
* Retire a suppression's batch once a start on its branch has finished
|
|
406
|
+
* its removals, none of its marks sent: a restart never activates a
|
|
407
|
+
* surgery's marks. `announceRetirement` is told before that is written,
|
|
408
|
+
* for the reason recoverAtStartup's `announce` is. Nothing is written for
|
|
409
|
+
* a batch that isn't prepared.
|
|
410
|
+
*/
|
|
411
|
+
completeSuppression(batchId: string, announceRetirement?: () => void): Promise<void>;
|
|
412
|
+
/**
|
|
413
|
+
* Startup reconciliation, run once before any delivery. It derives nothing
|
|
414
|
+
* from branch ancestry, and it activates nothing:
|
|
415
|
+
* - a request a previous process left on the wire is recorded unanswered
|
|
416
|
+
* (recordUnanswered): it may have reached Discord. It counts toward the
|
|
417
|
+
* bound like any unanswered attempt, and `givenUp` is how many reactions
|
|
418
|
+
* that brought there, which nothing more is sent for;
|
|
419
|
+
* - a prepared batch, which an interrupted surgery left, or a failed one
|
|
420
|
+
* that couldn't retire it, is retired, none of its marks sent: the
|
|
421
|
+
* operator redoes the surgery from its source to choose marks again. A
|
|
422
|
+
* suppression whose body is pending is kept instead: a start on its
|
|
423
|
+
* branch finishes its removals and then retires it (completeSuppression).
|
|
424
|
+
* Each retirement is reported in `retired`, and the store is synced before
|
|
425
|
+
* any is written. `announce` is told what it retires and records
|
|
426
|
+
* unanswered before that is written: each is written once, so a notice
|
|
427
|
+
* given after the write would be lost for good if the process ended
|
|
428
|
+
* between the two. If the write doesn't land, the next start says it
|
|
429
|
+
* again.
|
|
430
|
+
*/
|
|
431
|
+
recoverAtStartup(announce?: (planned: {
|
|
432
|
+
retired: DiscordAwarenessRetirement[];
|
|
433
|
+
unknownAttempts: number;
|
|
434
|
+
givenUp: number;
|
|
435
|
+
}) => void): Promise<{
|
|
436
|
+
retired: DiscordAwarenessRetirement[];
|
|
437
|
+
unknownAttempts: number;
|
|
438
|
+
givenUp: number;
|
|
439
|
+
}>;
|
|
440
|
+
/**
|
|
441
|
+
* Stop a batch's marks, or a retract's removals (by its request id), from
|
|
442
|
+
* being sent or sent again: the act is taken out of each reaction it
|
|
443
|
+
* wants, and a reaction no act wants any more is owed nothing. A request
|
|
444
|
+
* on the wire still has its answer recorded, before anything else goes for
|
|
445
|
+
* that reaction. Nothing is ever removed from Discord by a cancel: the
|
|
446
|
+
* receipt reports what may already have landed, and retract removes it.
|
|
447
|
+
*/
|
|
448
|
+
cancel(target: string, by?: string): Promise<DiscordAwarenessCancelReceipt>;
|
|
449
|
+
/**
|
|
450
|
+
* Remove this bot's mark (through the configured route) from a batch's
|
|
451
|
+
* refs, or (`all`) from every ref of every batch not retired, whether
|
|
452
|
+
* prepared or active, and every reaction the ledger holds. That covers
|
|
453
|
+
* every mark a version 2 ledger recorded: one of its batches that
|
|
454
|
+
* agent-framework 0.22.x activated stays active, and 0.22.x attempted only
|
|
455
|
+
* an active batch's refs. A reaction is one per (route, message, emoji),
|
|
456
|
+
* whichever batches asked for it, so this acts across batches. A removal
|
|
457
|
+
* is owed for every selected reaction, whatever was answered before: an
|
|
458
|
+
* answer can't establish what is on Discord now, and removing an absent
|
|
459
|
+
* reaction does nothing. It is the latest act on those reactions: an add
|
|
460
|
+
* owed there is replaced, and a batch whose choice came before it, once
|
|
461
|
+
* activated, leaves them as this decides. The receipt reports the adds
|
|
462
|
+
* that may still land.
|
|
463
|
+
*/
|
|
464
|
+
retract(target: string | 'all', by?: string): Promise<DiscordAwarenessRetractReceipt>;
|
|
465
|
+
/**
|
|
466
|
+
* The requests owed and not on the wire, oldest act first, for one server
|
|
467
|
+
* or every one. Throws when the ledger can't be read.
|
|
468
|
+
*/
|
|
469
|
+
due(serverId?: string): DiscordAwarenessRequest[];
|
|
470
|
+
/**
|
|
471
|
+
* Choose a server's next owed request and write it ahead, in one act:
|
|
472
|
+
* what is owed is read as the ledger holds it now, so a cancel or retract
|
|
473
|
+
* made while an earlier request was on the wire is never overridden by an
|
|
474
|
+
* older list. A reaction with a request on the wire is never chosen again
|
|
475
|
+
* until its answer is written. `skip` excludes requests already tried in
|
|
476
|
+
* this pass. Resolves once the write-ahead is on disk, with the request to
|
|
477
|
+
* send, or null when nothing is owed.
|
|
478
|
+
*
|
|
479
|
+
* A delivery pass claims only once its last request's answer is written,
|
|
480
|
+
* so a request of this server still marked on the wire here is one whose
|
|
481
|
+
* answer couldn't be written. It is recorded as unanswered first, as a
|
|
482
|
+
* start records one an earlier process left: it may land, and what it
|
|
483
|
+
* served is owed again.
|
|
484
|
+
*/
|
|
485
|
+
claim(serverId: string, skip?: (request: DiscordAwarenessRequest) => boolean): Promise<DiscordAwarenessRequest | null>;
|
|
486
|
+
/**
|
|
487
|
+
* Record a claimed request's answer. An answer ends what is owed only if
|
|
488
|
+
* it is for the act its request served: one for an older act updates what
|
|
489
|
+
* Discord last answered, and what may land, alone, so an act made while a
|
|
490
|
+
* request was out still gets its own request. Resolves to whether this
|
|
491
|
+
* ended what is owed without a confirmation (refused for good, or at the
|
|
492
|
+
* third unconfirmed attempt), so nothing more is sent for it.
|
|
493
|
+
*/
|
|
494
|
+
recordOutcome(request: DiscordAwarenessRequest, outcome: DiscordAwarenessOutcome, detail?: {
|
|
495
|
+
permanent?: boolean;
|
|
496
|
+
}): Promise<boolean>;
|
|
103
497
|
batches(): DiscordAwarenessBatch[];
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
498
|
+
view(): DiscordAwarenessView[];
|
|
499
|
+
/**
|
|
500
|
+
* Run one act after every act queued before it, on the document as it is
|
|
501
|
+
* then (read first if it isn't held). A version 2 ledger is rewritten as
|
|
502
|
+
* version 3 by the first act, before the act's own change.
|
|
503
|
+
*/
|
|
504
|
+
private act;
|
|
505
|
+
/** Drop the document held in memory and read the file back; if it can't
|
|
506
|
+
* be read, the next read tries again. */
|
|
507
|
+
private forget;
|
|
508
|
+
/**
|
|
509
|
+
* Read the ledger for an act. A version 2 ledger is rewritten as version
|
|
510
|
+
* 3 (migrateLedger), the work it drops announced before the write; the
|
|
511
|
+
* rewritten document is held only once its write is on disk.
|
|
512
|
+
*/
|
|
513
|
+
private open;
|
|
514
|
+
/**
|
|
515
|
+
* The document for a view: as held, or read now. A version 2 ledger is
|
|
516
|
+
* refused here: only an act rewrites it.
|
|
517
|
+
*/
|
|
518
|
+
private loaded;
|
|
519
|
+
/**
|
|
520
|
+
* Write the document. A write that throws has left the file as it was, so
|
|
521
|
+
* the act's change, already made in memory, is dropped: the document is
|
|
522
|
+
* read back from the file, and if it can't be read, the next read tries
|
|
523
|
+
* again. `afterCommittedState` syncs the store first.
|
|
524
|
+
*/
|
|
525
|
+
private persist;
|
|
107
526
|
}
|
|
108
|
-
|
|
527
|
+
/** The report of a directory that couldn't be synced, in the words of the
|
|
528
|
+
* framework's recovery-sync alert. */
|
|
529
|
+
export declare function unsyncedWriteText(directory: string, path: string, error: unknown): string;
|
|
530
|
+
/** The Discord channel id a ref's channel names: its last part, when it's
|
|
531
|
+
* spelled `discord:<guild>:<channel>`. Delivery sends it, and keys use it. */
|
|
532
|
+
export declare function discordChannelOf(channelId: string): string;
|
|
109
533
|
//# sourceMappingURL=discord-awareness-outbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discord-awareness-outbox.d.ts","sourceRoot":"","sources":["../../../src/recovery/discord-awareness-outbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"discord-awareness-outbox.d.ts","sourceRoot":"","sources":["../../../src/recovery/discord-awareness-outbox.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAGpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,eAAO,MAAM,+BAA+B,iBAAO,CAAC;AAEpD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAM,GAAG,MAAM,CAQzE;AAED;;;;GAIG;AACH,wBAAgB,iCAAiC,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAG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