@animalabs/agent-framework 0.32.0 → 0.33.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 +204 -14
- package/dist/src/admission/admit.d.ts +18 -0
- package/dist/src/admission/admit.d.ts.map +1 -1
- package/dist/src/admission/admit.js +16 -3
- package/dist/src/admission/admit.js.map +1 -1
- package/dist/src/agent.d.ts +185 -78
- package/dist/src/agent.d.ts.map +1 -1
- package/dist/src/agent.js +279 -102
- package/dist/src/agent.js.map +1 -1
- package/dist/src/api/mcp-server-core.d.ts.map +1 -1
- package/dist/src/api/mcp-server-core.js +50 -12
- package/dist/src/api/mcp-server-core.js.map +1 -1
- package/dist/src/api/server.d.ts.map +1 -1
- package/dist/src/api/server.js +4 -20
- package/dist/src/api/server.js.map +1 -1
- package/dist/src/code-execution/isolate/scripts.d.ts +12 -8
- package/dist/src/code-execution/isolate/scripts.d.ts.map +1 -1
- package/dist/src/code-execution/isolate/scripts.js +24 -0
- package/dist/src/code-execution/isolate/scripts.js.map +1 -1
- package/dist/src/config-checks.d.ts +7 -0
- package/dist/src/config-checks.d.ts.map +1 -1
- package/dist/src/config-checks.js +14 -0
- package/dist/src/config-checks.js.map +1 -1
- package/dist/src/context-manager-errors.d.ts +25 -0
- package/dist/src/context-manager-errors.d.ts.map +1 -0
- package/dist/src/context-manager-errors.js +31 -0
- package/dist/src/context-manager-errors.js.map +1 -0
- package/dist/src/context-options.d.ts +67 -0
- package/dist/src/context-options.d.ts.map +1 -0
- package/dist/src/context-options.js +85 -0
- package/dist/src/context-options.js.map +1 -0
- package/dist/src/deferred-import.d.ts +93 -0
- package/dist/src/deferred-import.d.ts.map +1 -0
- package/dist/src/deferred-import.js +177 -0
- package/dist/src/deferred-import.js.map +1 -0
- package/dist/src/dendrite/audience.d.ts +223 -0
- package/dist/src/dendrite/audience.d.ts.map +1 -0
- package/dist/src/dendrite/audience.js +202 -0
- package/dist/src/dendrite/audience.js.map +1 -0
- package/dist/src/dendrite/index.d.ts +5 -3
- package/dist/src/dendrite/index.d.ts.map +1 -1
- package/dist/src/dendrite/index.js +2 -1
- package/dist/src/dendrite/index.js.map +1 -1
- package/dist/src/dendrite/presets.d.ts +10 -5
- package/dist/src/dendrite/presets.d.ts.map +1 -1
- package/dist/src/dendrite/presets.js +17 -5
- package/dist/src/dendrite/presets.js.map +1 -1
- package/dist/src/dendrite/registry.d.ts +62 -7
- package/dist/src/dendrite/registry.d.ts.map +1 -1
- package/dist/src/dendrite/registry.js +179 -10
- package/dist/src/dendrite/registry.js.map +1 -1
- package/dist/src/dendrite/types.d.ts +91 -8
- package/dist/src/dendrite/types.d.ts.map +1 -1
- package/dist/src/foreign-rounds.d.ts +69 -0
- package/dist/src/foreign-rounds.d.ts.map +1 -0
- package/dist/src/foreign-rounds.js +152 -0
- package/dist/src/foreign-rounds.js.map +1 -0
- package/dist/src/framework.d.ts +1976 -818
- package/dist/src/framework.d.ts.map +1 -1
- package/dist/src/framework.js +7566 -3422
- package/dist/src/framework.js.map +1 -1
- package/dist/src/gate/event-gate.d.ts +85 -15
- package/dist/src/gate/event-gate.d.ts.map +1 -1
- package/dist/src/gate/event-gate.js +421 -47
- package/dist/src/gate/event-gate.js.map +1 -1
- package/dist/src/gate/index.d.ts +1 -1
- package/dist/src/gate/index.d.ts.map +1 -1
- package/dist/src/gate/index.js.map +1 -1
- package/dist/src/gate/rule-scope.d.ts +30 -0
- package/dist/src/gate/rule-scope.d.ts.map +1 -0
- package/dist/src/gate/rule-scope.js +41 -0
- package/dist/src/gate/rule-scope.js.map +1 -0
- package/dist/src/gate/suppress-script-worker.d.ts +2 -0
- package/dist/src/gate/suppress-script-worker.d.ts.map +1 -0
- package/dist/src/gate/suppress-script-worker.js +103 -0
- package/dist/src/gate/suppress-script-worker.js.map +1 -0
- package/dist/src/gate/suppress-scripts.d.ts +105 -0
- package/dist/src/gate/suppress-scripts.d.ts.map +1 -0
- package/dist/src/gate/suppress-scripts.js +403 -0
- package/dist/src/gate/suppress-scripts.js.map +1 -0
- package/dist/src/gate/suppression-review.d.ts +143 -0
- package/dist/src/gate/suppression-review.d.ts.map +1 -0
- package/dist/src/gate/suppression-review.js +463 -0
- package/dist/src/gate/suppression-review.js.map +1 -0
- package/dist/src/gate/suppression-stats.d.ts +125 -0
- package/dist/src/gate/suppression-stats.d.ts.map +1 -0
- package/dist/src/gate/suppression-stats.js +214 -0
- package/dist/src/gate/suppression-stats.js.map +1 -0
- package/dist/src/gate/types.d.ts +135 -7
- package/dist/src/gate/types.d.ts.map +1 -1
- package/dist/src/gate/wake-onboarding.d.ts +119 -0
- package/dist/src/gate/wake-onboarding.d.ts.map +1 -0
- package/dist/src/gate/wake-onboarding.js +277 -0
- package/dist/src/gate/wake-onboarding.js.map +1 -0
- package/dist/src/held-writes.d.ts +31 -23
- package/dist/src/held-writes.d.ts.map +1 -1
- package/dist/src/held-writes.js +44 -59
- package/dist/src/held-writes.js.map +1 -1
- package/dist/src/index.d.ts +5 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/jsonrpc-envelope.d.ts +69 -0
- package/dist/src/jsonrpc-envelope.d.ts.map +1 -0
- package/dist/src/jsonrpc-envelope.js +66 -0
- package/dist/src/jsonrpc-envelope.js.map +1 -0
- package/dist/src/mcpl/channel-registry.d.ts +131 -15
- package/dist/src/mcpl/channel-registry.d.ts.map +1 -1
- package/dist/src/mcpl/channel-registry.js +290 -46
- package/dist/src/mcpl/channel-registry.js.map +1 -1
- package/dist/src/mcpl/checkpoint-manager.d.ts +2 -4
- package/dist/src/mcpl/checkpoint-manager.d.ts.map +1 -1
- package/dist/src/mcpl/checkpoint-manager.js.map +1 -1
- package/dist/src/mcpl/feature-set-manager.d.ts +2 -4
- package/dist/src/mcpl/feature-set-manager.d.ts.map +1 -1
- package/dist/src/mcpl/feature-set-manager.js.map +1 -1
- package/dist/src/mcpl/inbound-source.d.ts +2 -1
- package/dist/src/mcpl/inbound-source.d.ts.map +1 -1
- package/dist/src/mcpl/inbound-source.js +2 -1
- package/dist/src/mcpl/inbound-source.js.map +1 -1
- package/dist/src/mcpl/inference-router.d.ts +6 -6
- package/dist/src/mcpl/inference-router.d.ts.map +1 -1
- package/dist/src/mcpl/inference-router.js.map +1 -1
- package/dist/src/mcpl/push-coalescer.d.ts +132 -22
- package/dist/src/mcpl/push-coalescer.d.ts.map +1 -1
- package/dist/src/mcpl/push-coalescer.js +105 -15
- package/dist/src/mcpl/push-coalescer.js.map +1 -1
- package/dist/src/mcpl/push-handler.d.ts +9 -7
- package/dist/src/mcpl/push-handler.d.ts.map +1 -1
- package/dist/src/mcpl/push-handler.js.map +1 -1
- package/dist/src/mcpl/server-connection.d.ts +13 -10
- package/dist/src/mcpl/server-connection.d.ts.map +1 -1
- package/dist/src/mcpl/server-connection.js +134 -56
- package/dist/src/mcpl/server-connection.js.map +1 -1
- package/dist/src/mcpl/tool-classes.d.ts.map +1 -1
- package/dist/src/mcpl/tool-classes.js +3 -0
- package/dist/src/mcpl/tool-classes.js.map +1 -1
- package/dist/src/mcpl/types.d.ts +8 -2
- 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 +24 -1
- package/dist/src/module-registry.d.ts.map +1 -1
- package/dist/src/module-registry.js +68 -18
- package/dist/src/module-registry.js.map +1 -1
- package/dist/src/modules/discord/index.d.ts +45 -8
- package/dist/src/modules/discord/index.d.ts.map +1 -1
- package/dist/src/modules/discord/index.js +237 -86
- package/dist/src/modules/discord/index.js.map +1 -1
- package/dist/src/modules/history/index.d.ts +59 -0
- package/dist/src/modules/history/index.d.ts.map +1 -1
- package/dist/src/modules/history/index.js +432 -67
- package/dist/src/modules/history/index.js.map +1 -1
- package/dist/src/modules/history/semantic.d.ts +6 -5
- package/dist/src/modules/history/semantic.d.ts.map +1 -1
- package/dist/src/modules/history/semantic.js +15 -22
- package/dist/src/modules/history/semantic.js.map +1 -1
- package/dist/src/modules/workspace/disk-agreement.d.ts +1 -1
- package/dist/src/modules/workspace/disk-agreement.js +1 -1
- package/dist/src/modules/workspace/index.d.ts +28 -7
- package/dist/src/modules/workspace/index.d.ts.map +1 -1
- package/dist/src/modules/workspace/index.js +76 -22
- package/dist/src/modules/workspace/index.js.map +1 -1
- package/dist/src/notice-tags.d.ts +10 -1
- package/dist/src/notice-tags.d.ts.map +1 -1
- package/dist/src/notice-tags.js +10 -1
- package/dist/src/notice-tags.js.map +1 -1
- package/dist/src/operator-log.d.ts +36 -3
- package/dist/src/operator-log.d.ts.map +1 -1
- package/dist/src/operator-log.js +2 -2
- package/dist/src/operator-log.js.map +1 -1
- package/dist/src/presentation.d.ts +746 -0
- package/dist/src/presentation.d.ts.map +1 -0
- package/dist/src/presentation.js +1435 -0
- package/dist/src/presentation.js.map +1 -0
- package/dist/src/prose-drafts.d.ts +15 -11
- package/dist/src/prose-drafts.d.ts.map +1 -1
- package/dist/src/prose-drafts.js +16 -12
- package/dist/src/prose-drafts.js.map +1 -1
- package/dist/src/read-marks.d.ts +192 -0
- package/dist/src/read-marks.d.ts.map +1 -0
- package/dist/src/read-marks.js +242 -0
- package/dist/src/read-marks.js.map +1 -0
- package/dist/src/recovery/offline-branch.d.ts +91 -6
- package/dist/src/recovery/offline-branch.d.ts.map +1 -1
- package/dist/src/recovery/offline-branch.js +273 -29
- package/dist/src/recovery/offline-branch.js.map +1 -1
- package/dist/src/recovery/recover-cli.js +22 -3
- package/dist/src/recovery/recover-cli.js.map +1 -1
- package/dist/src/send-tools.d.ts +5 -9
- package/dist/src/send-tools.d.ts.map +1 -1
- package/dist/src/send-tools.js +40 -7
- package/dist/src/send-tools.js.map +1 -1
- package/dist/src/stored-injections.d.ts +2 -2
- package/dist/src/stored-injections.js +2 -2
- package/dist/src/stored-removal.d.ts +17 -4
- package/dist/src/stored-removal.d.ts.map +1 -1
- package/dist/src/stored-removal.js +29 -5
- package/dist/src/stored-removal.js.map +1 -1
- package/dist/src/tool-result-guard.d.ts +12 -1
- package/dist/src/tool-result-guard.d.ts.map +1 -1
- package/dist/src/tool-result-guard.js +42 -8
- package/dist/src/tool-result-guard.js.map +1 -1
- package/dist/src/tune-out/coordinator.d.ts +1159 -79
- package/dist/src/tune-out/coordinator.d.ts.map +1 -1
- package/dist/src/tune-out/coordinator.js +3709 -363
- package/dist/src/tune-out/coordinator.js.map +1 -1
- package/dist/src/tune-out/tools.d.ts +114 -17
- package/dist/src/tune-out/tools.d.ts.map +1 -1
- package/dist/src/tune-out/tools.js +87 -27
- package/dist/src/tune-out/tools.js.map +1 -1
- package/dist/src/tune-out/window-anchor.d.ts +143 -0
- package/dist/src/tune-out/window-anchor.d.ts.map +1 -0
- package/dist/src/tune-out/window-anchor.js +202 -0
- package/dist/src/tune-out/window-anchor.js.map +1 -0
- package/dist/src/types/agent.d.ts +82 -20
- package/dist/src/types/agent.d.ts.map +1 -1
- package/dist/src/types/events.d.ts +2 -0
- package/dist/src/types/events.d.ts.map +1 -1
- package/dist/src/types/framework.d.ts +32 -12
- package/dist/src/types/framework.d.ts.map +1 -1
- package/dist/src/types/module.d.ts +180 -69
- package/dist/src/types/module.d.ts.map +1 -1
- package/dist/src/types/trace.d.ts +510 -36
- package/dist/src/types/trace.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/admission/admit.ts +32 -3
- package/src/agent.ts +323 -120
- package/src/api/mcp-server-core.ts +54 -17
- package/src/api/server.ts +4 -23
- package/src/code-execution/isolate/scripts.ts +28 -3
- package/src/config-checks.ts +14 -0
- package/src/context-manager-errors.ts +37 -0
- package/src/context-options.ts +96 -0
- package/src/deferred-import.ts +239 -0
- package/src/dendrite/audience.ts +315 -0
- package/src/dendrite/index.ts +14 -2
- package/src/dendrite/presets.ts +18 -6
- package/src/dendrite/registry.ts +209 -12
- package/src/dendrite/types.ts +92 -8
- package/src/foreign-rounds.ts +199 -0
- package/src/framework.ts +7804 -3546
- package/src/gate/event-gate.ts +428 -65
- package/src/gate/index.ts +3 -0
- package/src/gate/rule-scope.ts +45 -0
- package/src/gate/suppress-script-worker.ts +89 -0
- package/src/gate/suppress-scripts.ts +414 -0
- package/src/gate/suppression-review.ts +517 -0
- package/src/gate/suppression-stats.ts +314 -0
- package/src/gate/types.ts +141 -7
- package/src/gate/wake-onboarding.ts +309 -0
- package/src/held-writes.ts +49 -60
- package/src/index.ts +9 -2
- package/src/jsonrpc-envelope.ts +81 -0
- package/src/mcpl/channel-registry.ts +353 -85
- package/src/mcpl/checkpoint-manager.ts +3 -2
- package/src/mcpl/feature-set-manager.ts +2 -1
- package/src/mcpl/inbound-source.ts +2 -1
- package/src/mcpl/inference-router.ts +7 -4
- package/src/mcpl/push-coalescer.ts +193 -34
- package/src/mcpl/push-handler.ts +10 -5
- package/src/mcpl/server-connection.ts +141 -60
- package/src/mcpl/tool-classes.ts +3 -0
- package/src/mcpl/types.ts +8 -2
- package/src/module-registry.ts +73 -17
- package/src/modules/discord/index.ts +229 -81
- package/src/modules/history/index.ts +439 -70
- package/src/modules/history/semantic.ts +15 -21
- package/src/modules/workspace/disk-agreement.ts +1 -1
- package/src/modules/workspace/index.ts +85 -23
- package/src/notice-tags.ts +10 -1
- package/src/operator-log.ts +36 -3
- package/src/presentation.ts +1676 -0
- package/src/prose-drafts.ts +16 -12
- package/src/read-marks.ts +328 -0
- package/src/recovery/offline-branch.ts +346 -32
- package/src/recovery/recover-cli.ts +21 -3
- package/src/send-tools.ts +40 -7
- package/src/stored-injections.ts +2 -2
- package/src/stored-removal.ts +31 -7
- package/src/tool-result-guard.ts +41 -7
- package/src/tune-out/coordinator.ts +4089 -457
- package/src/tune-out/tools.ts +160 -43
- package/src/tune-out/window-anchor.ts +277 -0
- package/src/types/agent.ts +86 -20
- package/src/types/events.ts +2 -0
- package/src/types/framework.ts +32 -12
- package/src/types/module.ts +181 -68
- package/src/types/trace.ts +542 -40
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wake onboarding: an MCPL server whose events the agent's wake rules never
|
|
3
|
+
* decided about.
|
|
4
|
+
*
|
|
5
|
+
* A server's events are often skipped by a rule written for something else —
|
|
6
|
+
* a catch-all with no `source` (a Discord-era `discord-ambient`) or the gate's
|
|
7
|
+
* default — so a game that waits on the agent's move, or a message addressed
|
|
8
|
+
* to it, stalls without anyone having chosen that. MCPL RFC-001 §5 lets a
|
|
9
|
+
* server suggest how its tagged events should be treated, and §5.2 forbids a
|
|
10
|
+
* host from applying suggestions it was not told to apply. This module is the
|
|
11
|
+
* missing step between the two: the host notices the first undecided event
|
|
12
|
+
* from a server, offers the agent that server's suggestions once, and records
|
|
13
|
+
* the agent's answer — accepted (all of them or some) or declined — keyed to
|
|
14
|
+
* the server's declared ontology, so it asks again only when the ontology
|
|
15
|
+
* changes.
|
|
16
|
+
*
|
|
17
|
+
* An event is *undecided* when the gate let it go by without waking
|
|
18
|
+
* (`defer`/`skip`) by its default, or by a rule that names neither the event's
|
|
19
|
+
* source nor its channel nor any of its tags. A rule that does — Linn's
|
|
20
|
+
* `touche-quiet`, a channel's debounce — is a decision, and this module leaves
|
|
21
|
+
* it alone. So does the gate's sleep, gate.js, and every rule that wakes later
|
|
22
|
+
* (debounce, judge, a rate limit or sampler).
|
|
23
|
+
*
|
|
24
|
+
* Pure functions here; the framework wires the notice, the wake and the tools.
|
|
25
|
+
*/
|
|
26
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from 'node:fs';
|
|
27
|
+
import { dirname } from 'node:path';
|
|
28
|
+
import { stableHash } from '../stable-hash.js';
|
|
29
|
+
import { firstCatchAll, ruleDecides } from './rule-scope.js';
|
|
30
|
+
/**
|
|
31
|
+
* Tags that say an event is addressed to the agent or waiting on it (MCPL
|
|
32
|
+
* RFC-001 `chat:addressed`, RFC-014 `surface:turn`/`surface:alert`; not
|
|
33
|
+
* `surface:invite`, which only suggests). The first undecided event carrying
|
|
34
|
+
* one wakes the agent to decide; any other undecided event leaves its offer
|
|
35
|
+
* for the agent's next turn.
|
|
36
|
+
*/
|
|
37
|
+
export const ATTENTION_TAGS = ['chat:addressed', 'surface:turn', 'surface:alert'];
|
|
38
|
+
/** Accepted rules are named `suggested:<server>:<n>`: the name is the attribution. */
|
|
39
|
+
export const SUGGESTED_RULE_PREFIX = 'suggested:';
|
|
40
|
+
export const suggestedRuleName = (server, n) => `${SUGGESTED_RULE_PREFIX}${server}:${n}`;
|
|
41
|
+
/** Exactly `suggested:<server>:<n>`: a server id that another extends (`games`, `games:beta`) never claims the other's rules. */
|
|
42
|
+
export const isSuggestedRuleOf = (name, server) => name.startsWith(`${SUGGESTED_RULE_PREFIX}${server}:`) && /^\d+$/.test(name.slice(SUGGESTED_RULE_PREFIX.length + server.length + 1));
|
|
43
|
+
const DEBOUNCE_MIN_MS = 100;
|
|
44
|
+
const DEBOUNCE_MAX_MS = 300_000;
|
|
45
|
+
const THROTTLE_DEFAULT_MS = 60_000;
|
|
46
|
+
/**
|
|
47
|
+
* A suggested behavior (RFC-001 §6's vocabulary, or the gate's own names) as a
|
|
48
|
+
* gate behavior; null for one with no faithful translation.
|
|
49
|
+
*/
|
|
50
|
+
export function translateBehavior(said) {
|
|
51
|
+
if (said === 'immediate' || said === 'always')
|
|
52
|
+
return 'always';
|
|
53
|
+
if (said === 'mute' || said === 'defer' || said === 'skip')
|
|
54
|
+
return 'defer';
|
|
55
|
+
if (said === 'throttle')
|
|
56
|
+
return { rate_limit: { tokens: 1, refillIntervalMs: THROTTLE_DEFAULT_MS } };
|
|
57
|
+
if (said && typeof said === 'object' && !Array.isArray(said)) {
|
|
58
|
+
const o = said;
|
|
59
|
+
if (typeof o.debounce === 'number' && Number.isFinite(o.debounce)) {
|
|
60
|
+
return { debounce: Math.min(DEBOUNCE_MAX_MS, Math.max(DEBOUNCE_MIN_MS, Math.round(o.debounce))) };
|
|
61
|
+
}
|
|
62
|
+
const perMs = o.throttle?.perMs;
|
|
63
|
+
if (typeof perMs === 'number' && perMs > 0)
|
|
64
|
+
return { rate_limit: { tokens: 1, refillIntervalMs: Math.round(perMs) } };
|
|
65
|
+
const every = o.sample?.every;
|
|
66
|
+
if (typeof every === 'number' && Number.isInteger(every) && every > 0)
|
|
67
|
+
return { passive_sample: { every } };
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
const tagList = (v) => {
|
|
72
|
+
if (!Array.isArray(v))
|
|
73
|
+
return undefined;
|
|
74
|
+
const tags = v.filter((t) => typeof t === 'string' && t.length > 0);
|
|
75
|
+
return tags.length > 0 ? tags : undefined;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* A server's suggestions from its declared feature sets (null: none declared).
|
|
79
|
+
* Feature sets in name order; in each, its ordered rules as declared, then
|
|
80
|
+
* per-tag suggestions no ordered rule already makes, by tag. A server that suggests nothing the host can
|
|
81
|
+
* use gets one host-written rule: wake for its events tagged as addressed to
|
|
82
|
+
* the agent or waiting on it, nothing else.
|
|
83
|
+
*/
|
|
84
|
+
export function offerFor(server, declared) {
|
|
85
|
+
const rules = [];
|
|
86
|
+
const tagDescriptions = {};
|
|
87
|
+
const untranslated = [];
|
|
88
|
+
const ontologies = {};
|
|
89
|
+
const seen = new Set();
|
|
90
|
+
const add = (featureSet, match, said, rationale) => {
|
|
91
|
+
const behavior = translateBehavior(said);
|
|
92
|
+
if (!behavior) {
|
|
93
|
+
untranslated.push({ featureSet, ...match, behavior: said });
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const key = stableHash({ match, behavior });
|
|
97
|
+
if (seen.has(key))
|
|
98
|
+
return;
|
|
99
|
+
seen.add(key);
|
|
100
|
+
rules.push({
|
|
101
|
+
n: rules.length + 1, featureSet, match, behavior, said,
|
|
102
|
+
...(typeof rationale === 'string' && rationale.trim() ? { rationale: rationale.trim() } : {}),
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
for (const featureSet of Object.keys(declared ?? {}).sort()) {
|
|
106
|
+
const ontology = declared[featureSet]?.tagOntology;
|
|
107
|
+
if (!ontology || typeof ontology !== 'object')
|
|
108
|
+
continue;
|
|
109
|
+
ontologies[featureSet] = ontology;
|
|
110
|
+
const tags = ontology.tags && typeof ontology.tags === 'object' ? ontology.tags : {};
|
|
111
|
+
const ordered = Array.isArray(ontology.suggestedTreatment) ? ontology.suggestedTreatment
|
|
112
|
+
: Array.isArray(ontology.defaultTreatment) ? ontology.defaultTreatment : [];
|
|
113
|
+
for (const raw of ordered) {
|
|
114
|
+
if (!raw || typeof raw !== 'object')
|
|
115
|
+
continue;
|
|
116
|
+
const r = raw;
|
|
117
|
+
const match = {
|
|
118
|
+
...(tagList(r.tagsAny) ? { tagsAny: tagList(r.tagsAny) } : {}),
|
|
119
|
+
...(tagList(r.tagsAll) ? { tagsAll: tagList(r.tagsAll) } : {}),
|
|
120
|
+
...(tagList(r.tagsNone) ? { tagsNone: tagList(r.tagsNone) } : {}),
|
|
121
|
+
};
|
|
122
|
+
// A rule that names no tag would take every event the server sends: that is the agent's call to write, not an offer.
|
|
123
|
+
if (!match.tagsAny && !match.tagsAll) {
|
|
124
|
+
untranslated.push({ featureSet, ...r });
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
add(featureSet, match, r.behavior, r.rationale);
|
|
128
|
+
}
|
|
129
|
+
// Per-tag suggestions in tag order (UTF-8 bytes, as MCPL RFC-001 §5.2 and SPEC §16.5 order them):
|
|
130
|
+
// a JSON object's key order is no order at all.
|
|
131
|
+
const byTag = Object.keys(tags).sort((a, b) => Buffer.compare(Buffer.from(a), Buffer.from(b)));
|
|
132
|
+
for (const tag of byTag) {
|
|
133
|
+
const descriptor = tags[tag];
|
|
134
|
+
const d = descriptor;
|
|
135
|
+
if (!d || typeof d !== 'object')
|
|
136
|
+
continue;
|
|
137
|
+
if (typeof d.desc === 'string')
|
|
138
|
+
tagDescriptions[tag] = d.desc;
|
|
139
|
+
if (d.suggestedTreatment !== undefined)
|
|
140
|
+
add(featureSet, { tagsAny: [tag] }, d.suggestedTreatment, d.rationale);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
if (rules.length === 0) {
|
|
144
|
+
rules.push({
|
|
145
|
+
n: 1, featureSet: '', match: { tagsAny: [...ATTENTION_TAGS] }, behavior: 'always', said: 'immediate', fallback: true,
|
|
146
|
+
rationale: 'This server suggests nothing the host can use. This rule wakes you for its events marked as addressed to you or waiting on you, and leaves the rest as they are.',
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
const named = new Set(rules.flatMap((r) => [...(r.match.tagsAny ?? []), ...(r.match.tagsAll ?? [])]));
|
|
150
|
+
for (const tag of Object.keys(tagDescriptions))
|
|
151
|
+
if (!named.has(tag))
|
|
152
|
+
delete tagDescriptions[tag];
|
|
153
|
+
const digest = Object.keys(ontologies).length > 0 ? stableHash({ server, ontologies }) : 'none';
|
|
154
|
+
return { server, digest, rules, tagDescriptions, untranslated };
|
|
155
|
+
}
|
|
156
|
+
export { ruleDecides } from './rule-scope.js';
|
|
157
|
+
/**
|
|
158
|
+
* Whether the gate let an event go by without anyone having decided to: it did
|
|
159
|
+
* not wake and will not (`defer`/`skip`), by the default or by a rule that
|
|
160
|
+
* doesn't decide about it (ruleDecides). `policy` is the matched rule, as in
|
|
161
|
+
* force; undefined when the decision named none or it can't be found.
|
|
162
|
+
*/
|
|
163
|
+
export function isUndecided(decision, policy) {
|
|
164
|
+
if (decision.trigger)
|
|
165
|
+
return false;
|
|
166
|
+
if (decision.behavior !== 'skip' && decision.behavior !== 'defer')
|
|
167
|
+
return false;
|
|
168
|
+
if (decision.policyName === null)
|
|
169
|
+
return true;
|
|
170
|
+
if (decision.policyName === 'asleep' || decision.policyName === 'gate.js')
|
|
171
|
+
return false;
|
|
172
|
+
return policy !== undefined && !ruleDecides(policy);
|
|
173
|
+
}
|
|
174
|
+
export const carriesAttention = (tags) => (tags ?? []).some((t) => ATTENTION_TAGS.includes(t));
|
|
175
|
+
/**
|
|
176
|
+
* Where an accepted rule goes: ahead of the first rule that would let the
|
|
177
|
+
* server's events by without deciding about them (a catch-all that defers or
|
|
178
|
+
* skips), so the rules the agent wrote for this server, or for a channel or
|
|
179
|
+
* tags, keep their place before it, and so do catch-alls that wake (a mention
|
|
180
|
+
* rule on metadata): a muted suggestion can't swallow an explicit mention.
|
|
181
|
+
* Null: there is none; the rule goes last, ahead of the default. (Accepted
|
|
182
|
+
* rules name their source, so they are never the catch-all.)
|
|
183
|
+
*/
|
|
184
|
+
export const placementFor = (policies) => firstCatchAll(policies, { lettingBy: true });
|
|
185
|
+
/** The gate rules accepting `rules` of `offer` writes. */
|
|
186
|
+
export function rulesToWrite(offer, accepted) {
|
|
187
|
+
return accepted.map((r) => ({
|
|
188
|
+
name: suggestedRuleName(offer.server, r.n),
|
|
189
|
+
match: { source: offer.server, ...r.match },
|
|
190
|
+
behavior: r.behavior,
|
|
191
|
+
}));
|
|
192
|
+
}
|
|
193
|
+
// ---------------------------------------------------------------- decisions
|
|
194
|
+
/** The least time between two offers for one server (WakeDecisions.mayOffer). */
|
|
195
|
+
export const OFFER_FLOOR_MS = 24 * 60 * 60 * 1000;
|
|
196
|
+
/**
|
|
197
|
+
* The agent's decisions per server, beside gate.json (`wake-decisions.json`).
|
|
198
|
+
* Written whole, through a temporary file; one that can't be read is set aside
|
|
199
|
+
* and starts empty, so a damaged file costs a repeated offer, never a crash.
|
|
200
|
+
*/
|
|
201
|
+
export class WakeDecisions {
|
|
202
|
+
path;
|
|
203
|
+
log;
|
|
204
|
+
records = {};
|
|
205
|
+
constructor(path, log = () => undefined) {
|
|
206
|
+
this.path = path;
|
|
207
|
+
this.log = log;
|
|
208
|
+
if (!existsSync(path))
|
|
209
|
+
return;
|
|
210
|
+
try {
|
|
211
|
+
const parsed = JSON.parse(readFileSync(path, 'utf8'));
|
|
212
|
+
for (const [server, r] of Object.entries(parsed.servers ?? {})) {
|
|
213
|
+
if (r && typeof r.digest === 'string' && (r.state === 'offered' || r.state === 'accepted' || r.state === 'declined'))
|
|
214
|
+
this.records[server] = r;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
catch (error) {
|
|
218
|
+
const aside = `${path}.unreadable-${Date.now()}`;
|
|
219
|
+
try {
|
|
220
|
+
renameSync(path, aside);
|
|
221
|
+
}
|
|
222
|
+
catch { /* leave it */ }
|
|
223
|
+
this.log(`wake decisions: ${path} could not be read (${error.message}); set aside as ${aside}, starting empty`);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
get(server) { return this.records[server]; }
|
|
227
|
+
/**
|
|
228
|
+
* Whether an offer for `server` may go out now: never twice for the same
|
|
229
|
+
* digest, answered or not, and not within OFFER_FLOOR_MS of the server's
|
|
230
|
+
* last offer or decision even when its ontology changed — a server can't
|
|
231
|
+
* buy itself a stream of questions by editing what it declares.
|
|
232
|
+
*/
|
|
233
|
+
/** Whether an offer for `server` could go out at all, before its digest is known: not within the floor of the last one. */
|
|
234
|
+
mayOfferSoon(server, now = Date.now()) {
|
|
235
|
+
const r = this.records[server];
|
|
236
|
+
if (!r)
|
|
237
|
+
return true;
|
|
238
|
+
const at = Date.parse(r.at);
|
|
239
|
+
return !Number.isFinite(at) || now - at >= OFFER_FLOOR_MS;
|
|
240
|
+
}
|
|
241
|
+
mayOffer(server, digest, now = Date.now()) {
|
|
242
|
+
const r = this.records[server];
|
|
243
|
+
if (!r)
|
|
244
|
+
return true;
|
|
245
|
+
if (r.digest === digest || r.shown === digest)
|
|
246
|
+
return false;
|
|
247
|
+
const at = Date.parse(r.at);
|
|
248
|
+
return !Number.isFinite(at) || now - at >= OFFER_FLOOR_MS;
|
|
249
|
+
}
|
|
250
|
+
set(server, record, now = Date.now()) {
|
|
251
|
+
const r = { ...record, at: new Date(now).toISOString() };
|
|
252
|
+
this.records[server] = r;
|
|
253
|
+
this.write();
|
|
254
|
+
return r;
|
|
255
|
+
}
|
|
256
|
+
/** Record that the agent was shown `digest`'s list, leaving the decision and its time as they are (the floor doesn't restart). */
|
|
257
|
+
markShown(server, digest) {
|
|
258
|
+
const r = this.records[server];
|
|
259
|
+
if (!r)
|
|
260
|
+
return;
|
|
261
|
+
this.records[server] = { ...r, shown: digest };
|
|
262
|
+
this.write();
|
|
263
|
+
}
|
|
264
|
+
all() { return this.records; }
|
|
265
|
+
write() {
|
|
266
|
+
try {
|
|
267
|
+
mkdirSync(dirname(this.path), { recursive: true });
|
|
268
|
+
const tmp = `${this.path}.tmp-${process.pid}`;
|
|
269
|
+
writeFileSync(tmp, JSON.stringify({ servers: this.records }, null, 2) + '\n');
|
|
270
|
+
renameSync(tmp, this.path);
|
|
271
|
+
}
|
|
272
|
+
catch (error) {
|
|
273
|
+
this.log(`wake decisions: could not write ${this.path}: ${error.message}`);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
//# sourceMappingURL=wake-onboarding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wake-onboarding.js","sourceRoot":"","sources":["../../../src/gate/wake-onboarding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACzF,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG7D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAsB,CAAC,gBAAgB,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC;AAErG,sFAAsF;AACtF,MAAM,CAAC,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAClD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAE,CAAS,EAAU,EAAE,CAAC,GAAG,qBAAqB,GAAG,MAAM,IAAI,CAAC,EAAE,CAAC;AACjH,i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AAG,GAAG,IAAI,CAAC,IAAI,QAAQ,OAAO,CAAC,GAAG,EAAE,CAAC;YAC9C,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;YAC9E,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,GAAG,CAAC,mCAAmC,IAAI,CAAC,IAAI,KAAM,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;QACxF,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,29 +1,37 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
* and goes on to the store as it did before handles. */
|
|
1
|
+
import type { ContextManager, MessageId, StoredMessage } from '@animalabs/context-manager';
|
|
2
|
+
/** The queued write a `held:` handle names, or undefined for any other id. A
|
|
3
|
+
* value that isn't a string, which only an untyped caller passes, is no
|
|
4
|
+
* handle, and goes on to the store as it did before handles. */
|
|
6
5
|
export declare function heldWriteId(id: MessageId): string | undefined;
|
|
6
|
+
/** What asModuleRow reads of the window of the agent a read is for. */
|
|
7
|
+
export type ModuleRowWindow = Pick<ContextManager, 'windowMode' | 'ordinalOf'>;
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
9
|
+
* A row as a module's context answers it, for the agent whose store it was
|
|
10
|
+
* read from:
|
|
11
|
+
*
|
|
12
|
+
* - `heldFromResidents` when it carries the stamp a tune-out puts on a
|
|
13
|
+
* message it holds from the residents (`metadata.tuneOut`). Every
|
|
14
|
+
* resident's viewFilter leaves a stamped row out of its compiled view
|
|
15
|
+
* (framework.ts, createAgent), and a tool boundary never presents one to a
|
|
16
|
+
* resident, so a marked row is one the store keeps and no resident is
|
|
17
|
+
* shown (ModuleMessage.heldFromResidents says where its text can still
|
|
18
|
+
* reach one). So is a row a suppress rule hid (`metadata.suppressed`),
|
|
19
|
+
* which no view shows either, nor any window presents (one stored before
|
|
20
|
+
* audience stamps stays in a window written down from the record; the
|
|
21
|
+
* view still leaves it out).
|
|
22
|
+
* - `held` when that agent's window (`window`) presents rows and doesn't
|
|
23
|
+
* hold it (#291): stored and not yet presented to the agent, which its
|
|
24
|
+
* next presentation point does, or taken out of it as an undone turn's,
|
|
25
|
+
* or one it is never presented, as a held row is for a resident. Never in
|
|
26
|
+
* legacy mode, where the window is the record. A resident's window
|
|
27
|
+
* written down from the record holds the held rows an earlier release
|
|
28
|
+
* stored, unstamped, so those read without `held`: `heldFromResidents`
|
|
29
|
+
* marks every held row.
|
|
30
|
+
*
|
|
31
|
+
* Any other row comes back as it is.
|
|
14
32
|
*/
|
|
15
|
-
export declare function
|
|
16
|
-
/**
|
|
17
|
-
* A row as a module's context answers it: marked `heldFromResidents` when it
|
|
18
|
-
* carries the stamp a tune-out puts on a message it holds from the residents
|
|
19
|
-
* (`metadata.tuneOut`). Every resident's viewFilter leaves a stamped row out
|
|
20
|
-
* of its compiled view (framework.ts, createAgent), and a resident's tool
|
|
21
|
-
* boundary stores a stamped write without injecting it into the live turn, so
|
|
22
|
-
* a marked row is one the store keeps and no resident is shown
|
|
23
|
-
* (ModuleMessage.heldFromResidents says where its text can still reach
|
|
24
|
-
* one). Any other row comes back as it is.
|
|
25
|
-
*/
|
|
26
|
-
export declare function asModuleRow<T extends Pick<StoredMessage, 'metadata'>>(row: T): T & {
|
|
33
|
+
export declare function asModuleRow<T extends Pick<StoredMessage, 'id' | 'metadata'>>(row: T, window?: ModuleRowWindow): T & {
|
|
27
34
|
heldFromResidents?: true;
|
|
35
|
+
held?: true;
|
|
28
36
|
};
|
|
29
37
|
//# sourceMappingURL=held-writes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"held-writes.d.ts","sourceRoot":"","sources":["../../src/held-writes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"held-writes.d.ts","sourceRoot":"","sources":["../../src/held-writes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAgB3F;;iEAEiE;AACjE,wBAAgB,WAAW,CAAC,EAAE,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAE7D;AAED,uEAAuE;AACvE,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,EAAE,YAAY,GAAG,WAAW,CAAC,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,UAAU,CAAC,EAC1E,GAAG,EAAE,CAAC,EACN,MAAM,CAAC,EAAE,eAAe,GACvB,CAAC,GAAG;IAAE,iBAAiB,CAAC,EAAE,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,CAM/C"}
|
package/dist/src/held-writes.js
CHANGED
|
@@ -1,69 +1,54 @@
|
|
|
1
|
+
import { suppressionRecordOf } from './gate/suppression-stats.js';
|
|
1
2
|
/**
|
|
2
|
-
* The id a module
|
|
3
|
-
* write
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
3
|
+
* The id a release before #291 gave a module for a write it held while the
|
|
4
|
+
* write's agent's turn was alive: `held:` and the write's id in its deferred
|
|
5
|
+
* queue, which the stored row carries as `metadata.deferredWriteId` once it
|
|
6
|
+
* lands. This release stores every write at once and answers its stored id,
|
|
7
|
+
* unless a surgery's hold or a context manager refusing its work keeps the
|
|
8
|
+
* write in memory, where it answers '', so no write gets a handle any more.
|
|
9
|
+
* A module may have kept one across the upgrade: for one release the
|
|
10
|
+
* context's getMessage, editMessage and removeMessage still take it, and
|
|
11
|
+
* reach the row its write landed as (AgentFramework.landedRow), which the
|
|
12
|
+
* importer stores at boot for a write that release left queued.
|
|
10
13
|
*/
|
|
11
14
|
const HELD = 'held:';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/** The deferred write a handle names, or undefined for any other id. A value
|
|
16
|
-
* that isn't a string, which only an untyped caller passes, is no handle,
|
|
17
|
-
* and goes on to the store as it did before handles. */
|
|
15
|
+
/** The queued write a `held:` handle names, or undefined for any other id. A
|
|
16
|
+
* value that isn't a string, which only an untyped caller passes, is no
|
|
17
|
+
* handle, and goes on to the store as it did before handles. */
|
|
18
18
|
export function heldWriteId(id) {
|
|
19
19
|
return typeof id === 'string' && id.startsWith(HELD) ? id.slice(HELD.length) : undefined;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
return true;
|
|
47
|
-
}
|
|
48
|
-
function valueAt(value, path) {
|
|
49
|
-
for (const part of path.split('.')) {
|
|
50
|
-
if (value === undefined || value === null || typeof value !== 'object')
|
|
51
|
-
return undefined;
|
|
52
|
-
value = value[part];
|
|
53
|
-
}
|
|
54
|
-
return value;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* A row as a module's context answers it: marked `heldFromResidents` when it
|
|
58
|
-
* carries the stamp a tune-out puts on a message it holds from the residents
|
|
59
|
-
* (`metadata.tuneOut`). Every resident's viewFilter leaves a stamped row out
|
|
60
|
-
* of its compiled view (framework.ts, createAgent), and a resident's tool
|
|
61
|
-
* boundary stores a stamped write without injecting it into the live turn, so
|
|
62
|
-
* a marked row is one the store keeps and no resident is shown
|
|
63
|
-
* (ModuleMessage.heldFromResidents says where its text can still reach
|
|
64
|
-
* one). Any other row comes back as it is.
|
|
22
|
+
* A row as a module's context answers it, for the agent whose store it was
|
|
23
|
+
* read from:
|
|
24
|
+
*
|
|
25
|
+
* - `heldFromResidents` when it carries the stamp a tune-out puts on a
|
|
26
|
+
* message it holds from the residents (`metadata.tuneOut`). Every
|
|
27
|
+
* resident's viewFilter leaves a stamped row out of its compiled view
|
|
28
|
+
* (framework.ts, createAgent), and a tool boundary never presents one to a
|
|
29
|
+
* resident, so a marked row is one the store keeps and no resident is
|
|
30
|
+
* shown (ModuleMessage.heldFromResidents says where its text can still
|
|
31
|
+
* reach one). So is a row a suppress rule hid (`metadata.suppressed`),
|
|
32
|
+
* which no view shows either, nor any window presents (one stored before
|
|
33
|
+
* audience stamps stays in a window written down from the record; the
|
|
34
|
+
* view still leaves it out).
|
|
35
|
+
* - `held` when that agent's window (`window`) presents rows and doesn't
|
|
36
|
+
* hold it (#291): stored and not yet presented to the agent, which its
|
|
37
|
+
* next presentation point does, or taken out of it as an undone turn's,
|
|
38
|
+
* or one it is never presented, as a held row is for a resident. Never in
|
|
39
|
+
* legacy mode, where the window is the record. A resident's window
|
|
40
|
+
* written down from the record holds the held rows an earlier release
|
|
41
|
+
* stored, unstamped, so those read without `held`: `heldFromResidents`
|
|
42
|
+
* marks every held row.
|
|
43
|
+
*
|
|
44
|
+
* Any other row comes back as it is.
|
|
65
45
|
*/
|
|
66
|
-
export function asModuleRow(row) {
|
|
67
|
-
|
|
46
|
+
export function asModuleRow(row, window) {
|
|
47
|
+
const metadata = row.metadata;
|
|
48
|
+
const fromResidents = !!metadata?.tuneOut || suppressionRecordOf(metadata) !== undefined;
|
|
49
|
+
const held = window !== undefined && window.windowMode() === 'presented' && window.ordinalOf(row.id) === undefined;
|
|
50
|
+
if (!fromResidents && !held)
|
|
51
|
+
return row;
|
|
52
|
+
return { ...row, ...(fromResidents ? { heldFromResidents: true } : {}), ...(held ? { held: true } : {}) };
|
|
68
53
|
}
|
|
69
54
|
//# sourceMappingURL=held-writes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"held-writes.js","sourceRoot":"","sources":["../../src/held-writes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"held-writes.js","sourceRoot":"","sources":["../../src/held-writes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGlE;;;;;;;;;;;GAWG;AACH,MAAM,IAAI,GAAG,OAAO,CAAC;AAErB;;iEAEiE;AACjE,MAAM,UAAU,WAAW,CAAC,EAAa;IACvC,OAAO,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3F,CAAC;AAKD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,WAAW,CACzB,GAAM,EACN,MAAwB;IAExB,MAAM,QAAQ,GAAG,GAAG,CAAC,QAA+C,CAAC;IACrE,MAAM,aAAa,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO,IAAI,mBAAmB,CAAC,QAAQ,CAAC,KAAK,SAAS,CAAC;IACzF,MAAM,IAAI,GAAG,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,UAAU,EAAE,KAAK,WAAW,IAAI,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,SAAS,CAAC;IACnH,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI;QAAE,OAAO,GAAG,CAAC;IACxC,OAAO,EAAE,GAAG,GAAG,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,IAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AAC9H,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -5,6 +5,9 @@ export { Agent } from './agent.js';
|
|
|
5
5
|
export { FLAT_MINIMUM_MS, type InferenceBoundsOptions } from './inference-bounds.js';
|
|
6
6
|
export { storedInjectionMarkOf, type StoredInjectionMark } from './stored-injections.js';
|
|
7
7
|
export type { StartStreamResult } from './agent.js';
|
|
8
|
+
export type { PresentationOccasion } from './presentation.js';
|
|
9
|
+
export { covers, coverTest, describeReadMark, markAtOrAfter, type Cover, type MarkCm, type MarkedRow, type ReadMark } from './read-marks.js';
|
|
10
|
+
export { residentContextOptions, residentViewFilter, subconsciousContextOptions, subconsciousViewFilter, type ContextManagerOpenOptions, } from './context-options.js';
|
|
8
11
|
export { ProcessQueueImpl } from './queue.js';
|
|
9
12
|
export { ModuleRegistry } from './module-registry.js';
|
|
10
13
|
export { ShutdownTimeoutError, DEFAULT_SHUTDOWN_TIMEOUT_MS } from './shutdown.js';
|
|
@@ -21,9 +24,9 @@ export { UsageTracker } from './usage/index.js';
|
|
|
21
24
|
export { buildCodeExecutionToolDefinition, CODE_EXECUTION_TOOL_NAME } from './code-execution/index.js';
|
|
22
25
|
export type { SessionUsage, AgentUsage, SessionUsageSnapshot, UsageUpdatedEvent } from './usage/index.js';
|
|
23
26
|
export { EventGate, MCPL_GATE_EVENT_TYPES, wakeLineText, type EventTypesFrom, type WakeProvenance, type WritePlacement } from './gate/index.js';
|
|
24
|
-
export type { GateConfig, GateOptions, GatePolicy, GatePolicyMatch, GateBehavior, WakeLine } from './gate/index.js';
|
|
27
|
+
export type { GateConfig, GateOptions, GatePolicy, GatePolicyMatch, GateBehavior, WakeLine, SuppressConfig, SuppressionReviewOptions } from './gate/index.js';
|
|
25
28
|
export { ReplyJudge, DEFAULT_JUDGE_MODEL, DEFAULT_JUDGE_MAX_INPUT_TOKENS, MIN_JUDGE_INPUT_TOKENS } from './gate/index.js';
|
|
26
|
-
export type { JudgeConfig, JudgeEventSummary, JudgeFn, JudgeRequest, JudgeVerdict, ReplyJudgeOptions, ReplyJudgeDeps, UpcomingWake } from './gate/index.js';
|
|
29
|
+
export type { JudgeConfig, JudgeEventSummary, JudgeFn, JudgeRequest, JudgeVerdict, ReplyJudgeOptions, ReplyJudgeDeps, UpcomingWake, UpcomingWakeKind } from './gate/index.js';
|
|
27
30
|
export { Heartbeat, DEFAULT_HEARTBEAT, HEARTBEAT_TOOL_PREFIX } from './heartbeat/heartbeat.js';
|
|
28
31
|
export type { HeartbeatOptions, HeartbeatSettings, HeartbeatWake, HeartbeatDeliveryMode, HeartbeatScheduledWake, Reminder } from './heartbeat/heartbeat.js';
|
|
29
32
|
export { ChannelRegistry } from './mcpl/index.js';
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACjL,YAAY,EAAE,sBAAsB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACjG,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AACzF,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CA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oppedError, BudgetPreflightError, DefaultErrorPo
|
|
|
5
5
|
export { Agent } from './agent.js';
|
|
6
6
|
export { FLAT_MINIMUM_MS } from './inference-bounds.js';
|
|
7
7
|
export { storedInjectionMarkOf } from './stored-injections.js';
|
|
8
|
+
export { covers, coverTest, describeReadMark, markAtOrAfter } from './read-marks.js';
|
|
9
|
+
// How a resident's context and the subconscious's are opened (#291), for a host that opens one itself.
|
|
10
|
+
export { residentContextOptions, residentViewFilter, subconsciousContextOptions, subconsciousViewFilter, } from './context-options.js';
|
|
8
11
|
export { ProcessQueueImpl } from './queue.js';
|
|
9
12
|
export { ModuleRegistry } from './module-registry.js';
|
|
10
13
|
export { ShutdownTimeoutError, DEFAULT_SHUTDOWN_TIMEOUT_MS } from './shutdown.js';
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,kBAAkB,CAAC;AAEjC,eAAe;AACf,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEjL,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,eAAe,EAA+B,MAAM,uBAAuB,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAA4B,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,kBAAkB,CAAC;AAEjC,eAAe;AACf,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEjL,OAAO,EAAE,KAAK,EAAE,MAAM,YA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