@buoy-gg/agent-core 7.0.36 → 7.0.39
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 +13 -9
- package/lib/commonjs/catalog/catalog.g.js +93 -6
- package/lib/commonjs/catalog/catalog.g.js.map +1 -1
- package/lib/commonjs/catalog/catalog.source.json +106 -4
- package/lib/commonjs/catalog/catalog.types.g.js +3 -3
- package/lib/commonjs/catalog/catalog.types.g.js.map +1 -1
- package/lib/commonjs/catalog/toProviderTools.js +3 -1
- package/lib/commonjs/catalog/toProviderTools.js.map +1 -1
- package/lib/commonjs/effects/ledger.js +13 -1
- package/lib/commonjs/effects/ledger.js.map +1 -1
- package/lib/commonjs/engine/evidence.js +113 -0
- package/lib/commonjs/engine/evidence.js.map +1 -0
- package/lib/commonjs/engine/historyBudget.js +158 -55
- package/lib/commonjs/engine/historyBudget.js.map +1 -1
- package/lib/commonjs/engine/retrieve.js +214 -0
- package/lib/commonjs/engine/retrieve.js.map +1 -0
- package/lib/commonjs/engine/runAgentTurn.js +364 -94
- package/lib/commonjs/engine/runAgentTurn.js.map +1 -1
- package/lib/commonjs/engine/systemPrompt.js +31 -1
- package/lib/commonjs/engine/systemPrompt.js.map +1 -1
- package/lib/commonjs/engine/tokenCalibration.js +81 -0
- package/lib/commonjs/engine/tokenCalibration.js.map +1 -0
- package/lib/commonjs/engine/verify.js +300 -0
- package/lib/commonjs/engine/verify.js.map +1 -0
- package/lib/commonjs/index.js +16 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/providers/anthropic.js +12 -3
- package/lib/commonjs/providers/anthropic.js.map +1 -1
- package/lib/commonjs/providers/openai.js +11 -3
- package/lib/commonjs/providers/openai.js.map +1 -1
- package/lib/commonjs/providers/problem.js +98 -0
- package/lib/commonjs/providers/problem.js.map +1 -0
- package/lib/commonjs/providers/sse.js +6 -5
- package/lib/commonjs/providers/sse.js.map +1 -1
- package/lib/commonjs/providers/transport.js +20 -4
- package/lib/commonjs/providers/transport.js.map +1 -1
- package/lib/commonjs/providers/xhrStream.js +3 -0
- package/lib/commonjs/providers/xhrStream.js.map +1 -1
- package/lib/commonjs/session.js +32 -5
- package/lib/commonjs/session.js.map +1 -1
- package/lib/module/catalog/catalog.g.js +93 -6
- package/lib/module/catalog/catalog.g.js.map +1 -1
- package/lib/module/catalog/catalog.source.json +106 -4
- package/lib/module/catalog/catalog.types.g.js +3 -3
- package/lib/module/catalog/catalog.types.g.js.map +1 -1
- package/lib/module/catalog/toProviderTools.js +3 -1
- package/lib/module/catalog/toProviderTools.js.map +1 -1
- package/lib/module/effects/ledger.js +13 -1
- package/lib/module/effects/ledger.js.map +1 -1
- package/lib/module/engine/evidence.js +107 -0
- package/lib/module/engine/evidence.js.map +1 -0
- package/lib/module/engine/historyBudget.js +158 -54
- package/lib/module/engine/historyBudget.js.map +1 -1
- package/lib/module/engine/retrieve.js +210 -0
- package/lib/module/engine/retrieve.js.map +1 -0
- package/lib/module/engine/runAgentTurn.js +365 -96
- package/lib/module/engine/runAgentTurn.js.map +1 -1
- package/lib/module/engine/systemPrompt.js +30 -1
- package/lib/module/engine/systemPrompt.js.map +1 -1
- package/lib/module/engine/tokenCalibration.js +75 -0
- package/lib/module/engine/tokenCalibration.js.map +1 -0
- package/lib/module/engine/verify.js +292 -0
- package/lib/module/engine/verify.js.map +1 -0
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/providers/anthropic.js +12 -3
- package/lib/module/providers/anthropic.js.map +1 -1
- package/lib/module/providers/openai.js +11 -3
- package/lib/module/providers/openai.js.map +1 -1
- package/lib/module/providers/problem.js +92 -0
- package/lib/module/providers/problem.js.map +1 -0
- package/lib/module/providers/sse.js +6 -5
- package/lib/module/providers/sse.js.map +1 -1
- package/lib/module/providers/transport.js +20 -4
- package/lib/module/providers/transport.js.map +1 -1
- package/lib/module/providers/xhrStream.js +3 -0
- package/lib/module/providers/xhrStream.js.map +1 -1
- package/lib/module/session.js +33 -6
- package/lib/module/session.js.map +1 -1
- package/lib/typescript/catalog/catalog.g.d.ts +2 -2
- package/lib/typescript/catalog/catalog.g.d.ts.map +1 -1
- package/lib/typescript/catalog/catalog.types.g.d.ts +3 -3
- package/lib/typescript/catalog/catalog.types.g.d.ts.map +1 -1
- package/lib/typescript/catalog/toProviderTools.d.ts.map +1 -1
- package/lib/typescript/effects/ledger.d.ts +18 -0
- package/lib/typescript/effects/ledger.d.ts.map +1 -1
- package/lib/typescript/engine/evidence.d.ts +67 -0
- package/lib/typescript/engine/evidence.d.ts.map +1 -0
- package/lib/typescript/engine/historyBudget.d.ts +31 -8
- package/lib/typescript/engine/historyBudget.d.ts.map +1 -1
- package/lib/typescript/engine/retrieve.d.ts +32 -0
- package/lib/typescript/engine/retrieve.d.ts.map +1 -0
- package/lib/typescript/engine/runAgentTurn.d.ts +96 -2
- package/lib/typescript/engine/runAgentTurn.d.ts.map +1 -1
- package/lib/typescript/engine/systemPrompt.d.ts +39 -0
- package/lib/typescript/engine/systemPrompt.d.ts.map +1 -1
- package/lib/typescript/engine/tokenCalibration.d.ts +46 -0
- package/lib/typescript/engine/tokenCalibration.d.ts.map +1 -0
- package/lib/typescript/engine/verify.d.ts +67 -0
- package/lib/typescript/engine/verify.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +4 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/providers/anthropic.d.ts.map +1 -1
- package/lib/typescript/providers/openai.d.ts.map +1 -1
- package/lib/typescript/providers/problem.d.ts +50 -0
- package/lib/typescript/providers/problem.d.ts.map +1 -0
- package/lib/typescript/providers/sse.d.ts +4 -1
- package/lib/typescript/providers/sse.d.ts.map +1 -1
- package/lib/typescript/providers/transport.d.ts +8 -0
- package/lib/typescript/providers/transport.d.ts.map +1 -1
- package/lib/typescript/providers/types.d.ts +14 -0
- package/lib/typescript/providers/types.d.ts.map +1 -1
- package/lib/typescript/providers/xhrStream.d.ts +2 -0
- package/lib/typescript/providers/xhrStream.d.ts.map +1 -1
- package/lib/typescript/session.d.ts +15 -2
- package/lib/typescript/session.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +6 -0
- package/lib/typescript/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
]
|
|
78
78
|
}
|
|
79
79
|
],
|
|
80
|
-
"unavailableWhen": "The app doesn't depend on @buoy-gg/console, or FloatingDevTools never renders — in a release build it bails out for
|
|
80
|
+
"unavailableWhen": "The app doesn't depend on @buoy-gg/console, or FloatingDevTools never renders — in a release build it bails out for free users (only a Pro license renders it), so neither the console capability nor its snapshot is announced at all."
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
"toolId": "sentry",
|
|
@@ -432,7 +432,7 @@
|
|
|
432
432
|
},
|
|
433
433
|
"effect": "write",
|
|
434
434
|
"release": "noop",
|
|
435
|
-
"description": "Calls DebugBordersManager.cycle(). The cycle list is license-dependent: Pro gets [off, borders, labels], free
|
|
435
|
+
"description": "Calls DebugBordersManager.cycle(). The cycle list is license-dependent: Pro gets [off, borders, labels], free gets [off, borders] only — so on a free device this is a plain on/off toggle and will NEVER reach labels no matter how many times it is called. If the current mode isn't in the available list (e.g. the device was in labels and the license lapsed) it resets to \"off\" instead of advancing. Returns undefined, so the wire result is ok:true with no data — read the new mode from the tool snapshot, never assume it. Prefer setMode when you know the mode you want; use cycleMode only for a literal \"toggle it\" request. Once enabled, the overlay draws its first pass ~500ms later and re-measures every 2s, and it hides itself entirely while any Buoy modal or the dial is open, so a screenshot taken with the Buoy UI open shows no borders.",
|
|
436
436
|
"releaseNote": "packages/debug-borders/src/debug-borders/utils/fiberTreeTraversal.js:30 — the overlay enumerates views through global.__REACT_DEVTOOLS_GLOBAL_HOOK__, which React Native installs only when __DEV__ is true. In a release bundle getFiberRoots() returns [], the overlay bails on `instances.length === 0`, and zero borders are drawn even though the mode changed and the snapshot reports \"borders\". Do not tell the user borders are on screen in a release build.",
|
|
437
437
|
"requires": [
|
|
438
438
|
"@buoy-gg/debug-borders installed in the app",
|
|
@@ -1940,6 +1940,43 @@
|
|
|
1940
1940
|
"effect": "destructive",
|
|
1941
1941
|
"release": "works",
|
|
1942
1942
|
"description": "Wipes the whole persisted rule list at once — including rules a human authored and is mid-investigation on, which cannot be recovered. Prefer deleteOverrideRule({id}) for rules you created yourself, or setOverridesEnabled({enabled:false}) when you only need to silence them while keeping them. Returns {ok:true}."
|
|
1943
|
+
},
|
|
1944
|
+
{
|
|
1945
|
+
"action": "getNetworkConditions",
|
|
1946
|
+
"summary": "Read the effective network condition and whether activation is available.",
|
|
1947
|
+
"params": {
|
|
1948
|
+
"type": "object",
|
|
1949
|
+
"properties": {},
|
|
1950
|
+
"additionalProperties": false
|
|
1951
|
+
},
|
|
1952
|
+
"effect": "read",
|
|
1953
|
+
"release": "works"
|
|
1954
|
+
},
|
|
1955
|
+
{
|
|
1956
|
+
"action": "setNetworkConditions",
|
|
1957
|
+
"summary": "Set memory-only network conditions for new intercepted HTTP requests. Pass profile: normal, offline, slow (+500 ms) or verySlow (+2000 ms). Normal clears activation and lets requests through at full speed.",
|
|
1958
|
+
"params": {
|
|
1959
|
+
"type": "object",
|
|
1960
|
+
"properties": {
|
|
1961
|
+
"profile": {
|
|
1962
|
+
"type": "string",
|
|
1963
|
+
"enum": [
|
|
1964
|
+
"normal",
|
|
1965
|
+
"offline",
|
|
1966
|
+
"slow",
|
|
1967
|
+
"verySlow"
|
|
1968
|
+
],
|
|
1969
|
+
"description": "Normal, Offline, 500 ms latency, or 2000 ms latency."
|
|
1970
|
+
}
|
|
1971
|
+
},
|
|
1972
|
+
"required": [
|
|
1973
|
+
"profile"
|
|
1974
|
+
],
|
|
1975
|
+
"additionalProperties": false
|
|
1976
|
+
},
|
|
1977
|
+
"effect": "write",
|
|
1978
|
+
"release": "throws",
|
|
1979
|
+
"releaseNote": "Release builds refuse active conditions. Normal can still clear the profile."
|
|
1943
1980
|
}
|
|
1944
1981
|
],
|
|
1945
1982
|
"unavailableWhen": "The app does not mount the network tool (the @buoy-gg/network preset is absent from the FloatingDevTools apps list), or the runtime has no XMLHttpRequest/fetch to intercept (Node/headless/desktop-mirror — there getCaptureStatus reports interceptorInstalled:null and debugOverrides throws). The override actions are additionally Pro-gated by the MCP/dashboard layer (requireProDevice)."
|
|
@@ -4998,7 +5035,7 @@
|
|
|
4998
5035
|
{
|
|
4999
5036
|
"toolId": "ask-buoy",
|
|
5000
5037
|
"title": "Ask Buoy",
|
|
5001
|
-
"summary": "Ask Buoy's OWN session — the changes it has made in this conversation, and the undo for them. Call listChanges when the user asks \"what did you change?\"; call undoAll when they say \"undo that\" / \"put it back\" / \"clean up\". Undo restores exactly what the ledger captured at write time: override rules Ask Buoy created are deleted, impersonation is stopped, storage keys are restored to their pre-write values, and a query cache edit (setQueryData) is put back to the data read just before the write — unless the app has refetched it since, in which case the server's data is already back and undo says so. Changes listed with reversible:false (state writes, wipes, one-shot actions) cannot be automatically reversed — say so honestly. NEVER improvise a reverse-write with a guessed shape instead of calling undoAll; a hand-rolled \"undo\" that writes invented data is worse than telling the user a change is permanent.",
|
|
5038
|
+
"summary": "Ask Buoy's OWN session — the changes it has made in this conversation, and the undo for them. Call listChanges when the user asks \"what did you change?\"; call undoAll when they say \"undo that\" / \"put it back\" / \"clean up\". Undo restores exactly what the ledger captured at write time: override rules Ask Buoy created are deleted, impersonation is stopped, storage keys are restored to their pre-write values, and a query cache edit (setQueryData) is put back to the data read just before the write — unless the app has refetched it since, in which case the server's data is already back and undo says so. Changes listed with reversible:false (state writes, wipes, one-shot actions) cannot be automatically reversed — say so honestly. NEVER improvise a reverse-write with a guessed shape instead of calling undoAll; a hand-rolled \"undo\" that writes invented data is worse than telling the user a change is permanent. Its retrieve action re-reads any earlier tool result in FULL: every result over 24,000 characters is cut with a `[truncated — …; ref ev_N]` marker and every result compressed out of memory leaves an `[earlier result — …; ref ev_N]` marker — call retrieve with that ref (and a path or pattern) instead of asking the user for a narrower slice or calling the tool again for a value you already had.",
|
|
5002
5039
|
"actions": [
|
|
5003
5040
|
{
|
|
5004
5041
|
"action": "listChanges",
|
|
@@ -5024,7 +5061,72 @@
|
|
|
5024
5061
|
},
|
|
5025
5062
|
"effect": "write",
|
|
5026
5063
|
"release": "works",
|
|
5027
|
-
"description": "Returns `{ok, reverted, failed:[{label, error}], skippedTransients}`. Report the numbers honestly: `failed` entries could not be restored (tell the user which, using the labels), and `skippedTransients` are one-shot actions that never needed undoing. This undoes ALL reversible changes from this conversation, newest first — there is no per-change undo action, so if the user wants to keep one change, say so instead of calling this."
|
|
5064
|
+
"description": "Returns `{ok, reverted, failed:[{label, error}], skippedTransients, permanent}`. Report the numbers honestly: `failed` entries were attempted and could not be restored (tell the user which, using the labels); `permanent` is how many changes were never undoable (state writes, refetches) and are still applied — say so, they are not failures; `skippedTransients` are one-shot actions that never needed undoing. This undoes ALL reversible changes from this conversation, newest first — there is no per-change undo action, so if the user wants to keep one change, say so instead of calling this."
|
|
5065
|
+
},
|
|
5066
|
+
{
|
|
5067
|
+
"action": "retrieve",
|
|
5068
|
+
"summary": "Re-read part of an earlier tool result by its ref (ev_N from a [truncated …] or [earlier result …] marker). With only `ref` it returns the result's SHAPE (top-level keys with types and sizes); add `path` to get one value (\"stats.0.base_stat\", \"moves.3.move.name\"), `slice` for a window of an array or string, or `pattern` for a literal case-insensitive substring search with `contextLines` of surrounding text around each match. The kept copy is exactly what you were shown when it arrived — for the app's CURRENT value call the original tool again.",
|
|
5069
|
+
"params": {
|
|
5070
|
+
"type": "object",
|
|
5071
|
+
"properties": {
|
|
5072
|
+
"ref": {
|
|
5073
|
+
"type": "string",
|
|
5074
|
+
"description": "The ref from the marker, e.g. \"ev_7\"."
|
|
5075
|
+
},
|
|
5076
|
+
"path": {
|
|
5077
|
+
"type": "string",
|
|
5078
|
+
"description": "Dotted path into the JSON result; arrays index by number: \"stats.0.base_stat\", \"data.items.2.name\"."
|
|
5079
|
+
},
|
|
5080
|
+
"slice": {
|
|
5081
|
+
"type": "array",
|
|
5082
|
+
"items": {
|
|
5083
|
+
"type": "number"
|
|
5084
|
+
},
|
|
5085
|
+
"minItems": 2,
|
|
5086
|
+
"maxItems": 2,
|
|
5087
|
+
"description": "[start, end) window of items when the value at path is an array, or of characters when it is a string."
|
|
5088
|
+
},
|
|
5089
|
+
"pattern": {
|
|
5090
|
+
"type": "string",
|
|
5091
|
+
"description": "Literal, case-insensitive text to find. Returns up to 20 matching lines with context. Not a regex."
|
|
5092
|
+
},
|
|
5093
|
+
"contextLines": {
|
|
5094
|
+
"type": "number",
|
|
5095
|
+
"description": "Lines shown around each pattern match. Default 2, max 10."
|
|
5096
|
+
}
|
|
5097
|
+
},
|
|
5098
|
+
"required": [
|
|
5099
|
+
"ref"
|
|
5100
|
+
],
|
|
5101
|
+
"additionalProperties": false,
|
|
5102
|
+
"description": "ref is required; add exactly what you need — a bare ref shows the shape, then path/slice/pattern read a part."
|
|
5103
|
+
},
|
|
5104
|
+
"effect": "read",
|
|
5105
|
+
"release": "works",
|
|
5106
|
+
"servedBy": "engine",
|
|
5107
|
+
"description": "Returns `{ref, from, capturedAt, totalChars, …}` plus `shape` (no selector), `value` (path), `value`+`sliced`+`of` (slice), or `matches:[{line,text}]`+`totalMatches` (pattern). `{ok:false, error}` when the ref is unknown or was evicted to make room (the store keeps the most recent ~4 MB) — then call the original tool again. Results are capped at 24,000 characters like any other; narrow with path or pattern rather than asking for the whole thing."
|
|
5108
|
+
},
|
|
5109
|
+
{
|
|
5110
|
+
"action": "openProcedure",
|
|
5111
|
+
"summary": "Open one of this app's developer-written procedures by `id` (the ids are listed in the system prompt under PROCEDURES, each with a one-line summary). Returns the full playbook: preconditions, the stores and keys involved, the steps in order, and what done looks like. Call it FIRST when a request matches a procedure's summary, then follow it with the ordinary tools.",
|
|
5112
|
+
"params": {
|
|
5113
|
+
"type": "object",
|
|
5114
|
+
"properties": {
|
|
5115
|
+
"id": {
|
|
5116
|
+
"type": "string",
|
|
5117
|
+
"description": "The procedure id from the PROCEDURES list, e.g. \"expire-subscription\"."
|
|
5118
|
+
}
|
|
5119
|
+
},
|
|
5120
|
+
"required": [
|
|
5121
|
+
"id"
|
|
5122
|
+
],
|
|
5123
|
+
"additionalProperties": false,
|
|
5124
|
+
"description": "Just the id."
|
|
5125
|
+
},
|
|
5126
|
+
"effect": "read",
|
|
5127
|
+
"release": "works",
|
|
5128
|
+
"servedBy": "engine",
|
|
5129
|
+
"description": "Returns `{id, title, version?, requires?, body, note}`; `{ok:false, error}` naming the available ids when the id is unknown or the app has none. A procedure grants nothing: each step still runs through the same catalog, policy, approval card and undo as any other call."
|
|
5028
5130
|
}
|
|
5029
5131
|
],
|
|
5030
5132
|
"unavailableWhen": "Only present while an Ask Buoy session is running — which is exactly when this catalog is in use, so in practice always available to you."
|
|
@@ -11,7 +11,7 @@ exports.CATALOG_ACTIONS = void 0;
|
|
|
11
11
|
* The catalog's tool ids and action names as types, so a wrong name fails
|
|
12
12
|
* at compile time. `catalog.g.ts` carries the data.
|
|
13
13
|
*
|
|
14
|
-
* 24 Buoy tools,
|
|
14
|
+
* 24 Buoy tools, 196 actions.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
/** Action names per tool — the runtime mirror of {@link CatalogActionMap}. */
|
|
@@ -27,7 +27,7 @@ const CATALOG_ACTIONS = exports.CATALOG_ACTIONS = {
|
|
|
27
27
|
"impersonate": ["searchUsers", "startImpersonation", "stopImpersonation", "pauseImpersonation", "resumeImpersonation", "updateSettings", "removeFromHistory", "clearHistory"],
|
|
28
28
|
"query": ["listQueries", "getQueryData", "refetch", "invalidate", "reset", "remove", "setQueryData", "triggerError", "restoreError", "triggerLoading", "restoreLoading", "clearQueryCache", "clearMutationCache", "setOnline"],
|
|
29
29
|
"events": ["exportEvents", "setEnabledSources", "clearEvents"],
|
|
30
|
-
"network": ["getSnapshot", "getCaptureStatus", "getEventBody", "setPinned", "setSaved", "removeSavedRecord", "clearSavedRequests", "clearPinnedRequests", "clearEvents", "listOverrideRules", "getOverrideRuleBody", "debugOverrides", "upsertOverrideRule", "setOverrideRuleEnabled", "setOverridesEnabled", "deleteOverrideRule", "clearOverrideRules"],
|
|
30
|
+
"network": ["getSnapshot", "getCaptureStatus", "getEventBody", "setPinned", "setSaved", "removeSavedRecord", "clearSavedRequests", "clearPinnedRequests", "clearEvents", "listOverrideRules", "getOverrideRuleBody", "debugOverrides", "upsertOverrideRule", "setOverrideRuleEnabled", "setOverridesEnabled", "deleteOverrideRule", "clearOverrideRules", "getNetworkConditions", "setNetworkConditions"],
|
|
31
31
|
"js-top": ["sample", "getOriginDetail", "setEnabled", "pause", "resume", "clear"],
|
|
32
32
|
"app": ["ping", "reloadApp"],
|
|
33
33
|
"time-machine": ["list", "capture", "captureBaseline", "wipeAll", "restore", "preview", "inspect", "delete", "rename", "duplicate", "setExclusions", "setScope", "setRestoreRoute"],
|
|
@@ -39,6 +39,6 @@ const CATALOG_ACTIONS = exports.CATALOG_ACTIONS = {
|
|
|
39
39
|
"tv-remote": ["arm", "getEventsSince", "setMenuCapture", "disarm", "clear"],
|
|
40
40
|
"focus-inspector": ["rescan", "focusElement", "setTracking", "clearHistory"],
|
|
41
41
|
"images": ["list", "getDetail", "getCaptureStatus", "retry", "flash", "proveSavings", "setOverride", "clearOverride", "setNetworkMode", "setBlankImages", "hardReload", "evictDisk", "massAction", "clearRecords", "clearExpoCaches"],
|
|
42
|
-
"ask-buoy": ["listChanges", "undoAll"]
|
|
42
|
+
"ask-buoy": ["listChanges", "undoAll", "retrieve", "openProcedure"]
|
|
43
43
|
};
|
|
44
44
|
//# sourceMappingURL=catalog.types.g.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CATALOG_ACTIONS","exports"],"sourceRoot":"../../../src","sources":["catalog/catalog.types.g.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["CATALOG_ACTIONS","exports"],"sourceRoot":"../../../src","sources":["catalog/catalog.types.g.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA4PA;AACO,MAAMA,eAAmE,GAAAC,OAAA,CAAAD,eAAA,GAAG;EACjF,KAAK,EAAE,CACL,aAAa,CACd;EACD,SAAS,EAAE,CACT,aAAa,EACb,cAAc,CACf;EACD,QAAQ,EAAE,CACR,aAAa,EACb,gBAAgB,CACjB;EACD,OAAO,EAAE,CACP,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,aAAa,CACd;EACD,cAAc,EAAE,CACd,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,aAAa,CACd;EACD,eAAe,EAAE,CACf,WAAW,EACX,SAAS,CACV;EACD,SAAS,EAAE,CACT,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,aAAa,CACd;EACD,OAAO,EAAE,CACP,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,aAAa,CACd;EACD,aAAa,EAAE,CACb,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,CACf;EACD,OAAO,EAAE,CACP,aAAa,EACb,cAAc,EACd,SAAS,EACT,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,cAAc,EACd,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,CACZ;EACD,QAAQ,EAAE,CACR,cAAc,EACd,mBAAmB,EACnB,aAAa,CACd;EACD,SAAS,EAAE,CACT,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,UAAU,EACV,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,oBA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,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,aAAa,EACb,UAAU,CACX;EACD,QAAQ,EAAE,CACR,MAAM,EACN,WAAW,EACX,QAAQ,EACR,cAAc,EACd,cAAc,EACd,eAAe,EACf,SAAS,EACT,cAAc,EACd,eAAe,CAChB;EACD,WAAW,EAAE,CACX,KAAK,EACL,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,OAAO,CACR;EACD,iBAAiB,EAAE,CACjB,QAAQ,EACR,cAAc,EACd,aAAa,EACb,cAAc,CACf;EACD,QAAQ,EAAE,CACR,MAAM,EACN,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,OAAO,EACP,cAAc,EACd,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,cAAc,EACd,iBAAiB,CAClB;EACD,UAAU,EAAE,CACV,aAAa,EACb,SAAS,EACT,UAAU,EACV,eAAe;AAEnB,CAAC","ignoreList":[]}
|
|
@@ -88,7 +88,9 @@ function toProviderTools(catalog, opts = {}) {
|
|
|
88
88
|
for (const tool of catalog) {
|
|
89
89
|
if (availableToolIds && !availableToolIds.includes(tool.toolId)) continue;
|
|
90
90
|
const live = availableActions?.[tool.toolId];
|
|
91
|
-
|
|
91
|
+
// An engine-served action needs no adapter to advertise it — the engine
|
|
92
|
+
// is the adapter — so it rides with the tool whenever the tool is here.
|
|
93
|
+
let actions = live ? tool.actions.filter(a => live.includes(a.action) || a.servedBy === "engine") : tool.actions;
|
|
92
94
|
if (isRelease && hideUnavailable) {
|
|
93
95
|
actions = actions.filter(a => a.release === "works");
|
|
94
96
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_signature","require","MAX_TOOL_NAME","toProviderToolName","toolId","replace","slice","fromProviderToolName","name","catalog","find","t","actionLine","a","isRelease","bits","action","summary","effect","push","release","requires","length","join","sig","paramsLine","params","toProviderTools","opts","availableToolIds","availableActions","hideUnavailable","tools","tool","includes","live","actions","filter","summaryDescription","actionsBlock","unavailableWhen","map","desc","Boolean","inputExamples","flatMap","description","inputSchema","type","properties","enum","required","additionalProperties"],"sourceRoot":"../../../src","sources":["catalog/toProviderTools.ts"],"mappings":";;;;;;;;AAgBA,IAAAA,UAAA,GAAAC,OAAA;AAhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA2BA;AACA;AACA;AACA;AACA;AACA,MAAMC,aAAa,GAAG,EAAE;AAEjB,SAASC,kBAAkBA,CAACC,MAAc,EAAU;EACzD,OAAO,QAAQA,MAAM,CAACC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,EAAE,CAACC,KAAK,CAAC,CAAC,EAAEJ,aAAa,CAAC;AACjF;;AAEA;AACO,SAASK,oBAAoBA,CAClCC,IAAY,EACZC,OAAyB,EACL;EACpB,OAAOA,OAAO,CAACC,IAAI,CAAEC,CAAC,IAAKR,kBAAkB,CAACQ,CAAC,CAACP,MAAM,CAAC,KAAKI,IAAI,CAAC,EAAEJ,MAAM;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAASQ,UAAUA,CAACC,CAAmB,EAAEC,SAAkB,EAAU;EACnE,MAAMC,IAAc,GAAG,CAAC,GAAGF,CAAC,CAACG,MAAM,MAAMH,CAAC,CAACI,OAAO,EAAE,CAAC;EACrD,IAAIJ,CAAC,CAACK,MAAM,KAAK,aAAa,EAAEH,IAAI,CAACI,IAAI,CAAC,eAAe,CAAC,CAAC,KACtD,IAAIN,CAAC,CAACK,MAAM,KAAK,OAAO,EAAEH,IAAI,CAACI,IAAI,CAAC,iBAAiB,CAAC;EAC3D,IAAIL,SAAS,IAAID,CAAC,CAACO,OAAO,KAAK,OAAO,EAAE;IACtCL,IAAI,CAACI,IAAI,CAAC,+BAA+BN,CAAC,CAACO,OAAO,GAAG,CAAC;EACxD;EACA,IAAIP,CAAC,CAACQ,QAAQ,EAAEC,MAAM,EAAEP,IAAI,CAACI,IAAI,CAAC,WAAWN,CAAC,CAACQ,QAAQ,CAACE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;EACtE;EACA;EACA;EACA;EACA;EACA;EACA,MAAMC,GAAG,GAAG,IAAAC,qBAAU,EAACZ,CAAC,CAACa,MAAM,CAAC;EAChC,OAAOF,GAAG,GAAG,GAAGT,IAAI,CAACQ,IAAI,CAAC,GAAG,CAAC,SAASC,GAAG,EAAE,GAAGT,IAAI,CAACQ,IAAI,CAAC,GAAG,CAAC;AAC/D;AAsBO,SAASI,eAAeA,CAC7BlB,OAAyB,EACzBmB,IAA4B,GAAG,CAAC,CAAC,EACjB;EAChB,MAAM;IACJC,gBAAgB;IAChBC,gBAAgB;IAChBhB,SAAS,GAAG,KAAK;IACjBiB,eAAe,GAAG;EACpB,CAAC,GAAGH,IAAI;EAER,MAAMI,KAAqB,GAAG,EAAE;EAEhC,KAAK,MAAMC,IAAI,IAAIxB,OAAO,EAAE;IAC1B,IAAIoB,gBAAgB,IAAI,CAACA,gBAAgB,CAACK,QAAQ,CAACD,IAAI,CAAC7B,MAAM,CAAC,EAAE;IAEjE,MAAM+B,IAAI,GAAGL,gBAAgB,GAAGG,IAAI,CAAC7B,MAAM,CAAC;IAC5C,IAAIgC,OAAO,GAAGD,IAAI,GACdF,IAAI,CAACG,OAAO,CAACC,MAAM,CAAExB,CAAC,IAAKsB,IAAI,CAACD,QAAQ,CAACrB,CAAC,CAACG,MAAM,CAAC,CAAC,
|
|
1
|
+
{"version":3,"names":["_signature","require","MAX_TOOL_NAME","toProviderToolName","toolId","replace","slice","fromProviderToolName","name","catalog","find","t","actionLine","a","isRelease","bits","action","summary","effect","push","release","requires","length","join","sig","paramsLine","params","toProviderTools","opts","availableToolIds","availableActions","hideUnavailable","tools","tool","includes","live","actions","filter","servedBy","summaryDescription","actionsBlock","unavailableWhen","map","desc","Boolean","inputExamples","flatMap","description","inputSchema","type","properties","enum","required","additionalProperties"],"sourceRoot":"../../../src","sources":["catalog/toProviderTools.ts"],"mappings":";;;;;;;;AAgBA,IAAAA,UAAA,GAAAC,OAAA;AAhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA2BA;AACA;AACA;AACA;AACA;AACA,MAAMC,aAAa,GAAG,EAAE;AAEjB,SAASC,kBAAkBA,CAACC,MAAc,EAAU;EACzD,OAAO,QAAQA,MAAM,CAACC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,EAAE,CAACC,KAAK,CAAC,CAAC,EAAEJ,aAAa,CAAC;AACjF;;AAEA;AACO,SAASK,oBAAoBA,CAClCC,IAAY,EACZC,OAAyB,EACL;EACpB,OAAOA,OAAO,CAACC,IAAI,CAAEC,CAAC,IAAKR,kBAAkB,CAACQ,CAAC,CAACP,MAAM,CAAC,KAAKI,IAAI,CAAC,EAAEJ,MAAM;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAASQ,UAAUA,CAACC,CAAmB,EAAEC,SAAkB,EAAU;EACnE,MAAMC,IAAc,GAAG,CAAC,GAAGF,CAAC,CAACG,MAAM,MAAMH,CAAC,CAACI,OAAO,EAAE,CAAC;EACrD,IAAIJ,CAAC,CAACK,MAAM,KAAK,aAAa,EAAEH,IAAI,CAACI,IAAI,CAAC,eAAe,CAAC,CAAC,KACtD,IAAIN,CAAC,CAACK,MAAM,KAAK,OAAO,EAAEH,IAAI,CAACI,IAAI,CAAC,iBAAiB,CAAC;EAC3D,IAAIL,SAAS,IAAID,CAAC,CAACO,OAAO,KAAK,OAAO,EAAE;IACtCL,IAAI,CAACI,IAAI,CAAC,+BAA+BN,CAAC,CAACO,OAAO,GAAG,CAAC;EACxD;EACA,IA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C;EACJ;EAEA,OAAOrB,KAAK;AACd","ignoreList":[]}
|
|
@@ -88,6 +88,13 @@ class EffectLedger {
|
|
|
88
88
|
return this.entries;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
/** Tool-call ids of changes still applied — the rounds history budgeting keeps longest. */
|
|
92
|
+
liveCallIds() {
|
|
93
|
+
const out = new Set();
|
|
94
|
+
for (const e of this.entries) if (!e.undoneAt && e.callId) out.add(e.callId);
|
|
95
|
+
return out;
|
|
96
|
+
}
|
|
97
|
+
|
|
91
98
|
/**
|
|
92
99
|
* Put back the entries of a conversation that outlived the app.
|
|
93
100
|
*
|
|
@@ -291,7 +298,8 @@ class EffectLedger {
|
|
|
291
298
|
const outcome = {
|
|
292
299
|
reverted: 0,
|
|
293
300
|
failed: [],
|
|
294
|
-
skippedTransients: 0
|
|
301
|
+
skippedTransients: 0,
|
|
302
|
+
permanent: 0
|
|
295
303
|
};
|
|
296
304
|
const pending = [...this.entries].filter(e => !e.undoneAt).reverse();
|
|
297
305
|
for (const entry of pending) {
|
|
@@ -299,6 +307,10 @@ class EffectLedger {
|
|
|
299
307
|
outcome.skippedTransients += 1;
|
|
300
308
|
continue;
|
|
301
309
|
}
|
|
310
|
+
if (!isReversible(entry.effect)) {
|
|
311
|
+
outcome.permanent += 1;
|
|
312
|
+
continue;
|
|
313
|
+
}
|
|
302
314
|
const error = await this.revertOne(entry, dispatch);
|
|
303
315
|
if (error) outcome.failed.push({
|
|
304
316
|
label: entry.effect.label,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_digest","require","isReversible","effect","kind","seq","EffectLedger","entries","listeners","Set","gen","generation","record","toolId","action","undefined","entry","id","Date","now","at","emit","list","
|
|
1
|
+
{"version":3,"names":["_digest","require","isReversible","effect","kind","seq","EffectLedger","entries","listeners","Set","gen","generation","record","toolId","action","undefined","entry","id","Date","now","at","emit","list","liveCallIds","out","e","undoneAt","callId","add","restore","length","touch","reversible","filter","transients","isEmpty","every","subscribe","fn","delete","clear","noteExternalRevert","params","changed","mark","match","undoError","ruleId","revertOne","dispatch","fx","scope","instanceId","wrote","readAction","current","key","rec","value","found","before","removeAction","wroteDigest","queryHash","hasData","digestOf","data","outcome","force","ok","error","err","msg","Error","message","String","revertAll","reverted","failed","skippedTransients","permanent","pending","reverse","push","label","exports"],"sourceRoot":"../../../src","sources":["effects/ledger.ts"],"mappings":";;;;;;;AAsBA,IAAAA,OAAA,GAAAC,OAAA;AAtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAsDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,YAAYA,CAACC,MAAqB,EAAW;EAC3D,OAAOA,MAAM,CAACC,IAAI,KAAK,WAAW,IAAID,MAAM,CAACC,IAAI,KAAK,aAAa;AACrE;AAoCA,IAAIC,GAAG,GAAG,CAAC;AAEJ,MAAMC,YAAY,CAAC;EAChBC,OAAO,GAAkB,EAAE;EAC3BC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;EACjCC,GAAG,GAAG,CAAC;;EAEf;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,IAAIC,UAAUA,CAAA,EAAW;IACvB,OAAO,IAAI,CAACD,GAAG;EACjB;;EAEA;AACF;AACA;AACA;AACA;;EAQEE,MAAMA,CACJC,MAAc,EACdC,MAAc,EACdX,MAAqB,EACrBQ,UAAmB,EACM;IACzB,IAAIA,UAAU,KAAKI,SAAS,IAAIJ,UAAU,KAAK,IAAI,CAACD,GAAG,EAAE,OAAOK,SAAS;IACzE,MAAMC,KAAkB,GAAG;MACzBC,EAAE,EAAE,MAAM,EAAEZ,GAAG,IAAIa,IAAI,CAACC,GAAG,CAAC,CAAC,EAAE;MAC/BC,EAAE,EAAEF,IAAI,CAACC,GAAG,CAAC,CAAC;MACdN,MAAM;MACNC,MAAM;MACNX;IACF,CAAC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GAAAA,YAAA","ignoreList":[]}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EvidenceStore = void 0;
|
|
7
|
+
exports.compressedMarker = compressedMarker;
|
|
8
|
+
exports.truncationMarker = truncationMarker;
|
|
9
|
+
/**
|
|
10
|
+
* The evidence store: every tool result this conversation produced, kept in
|
|
11
|
+
* full so the model can go back to it.
|
|
12
|
+
*
|
|
13
|
+
* Two markers used to point nowhere. A result over 24 000 characters was cut
|
|
14
|
+
* with "ask for a narrower slice" — and no tool offers one, so the bank has
|
|
15
|
+
* cases tagged `capability` (Pokémon `stats` sit at offset ~180 000 of a
|
|
16
|
+
* 400 000-character detail; unreadable by design). And a result compressed
|
|
17
|
+
* out of memory said "ask again" — a re-dispatch returns the CURRENT value,
|
|
18
|
+
* not what the model saw before it wrote, which is the one it needs when a
|
|
19
|
+
* write is refused and it has to say what it changed FROM.
|
|
20
|
+
*
|
|
21
|
+
* So the full text is kept here, keyed by a short ref the markers carry, and
|
|
22
|
+
* `ask-buoy.retrieve` reads any part of it back: a path, a substring, a
|
|
23
|
+
* window. Borrowed from Strands' ContextOffloader (`retrieve_offloaded_content`
|
|
24
|
+
* with pattern / line_range), minus the storage layer — this is in-memory and
|
|
25
|
+
* per session on purpose: persisted transcripts deliberately carry no tool
|
|
26
|
+
* result payloads (see ask-buoy transcriptPersistence.ts), and this must not
|
|
27
|
+
* quietly change that.
|
|
28
|
+
*
|
|
29
|
+
* What goes in is what the MODEL was given: after `redact` (credential names
|
|
30
|
+
* and value shapes) and `stripSelfTraffic`. Never the raw adapter value.
|
|
31
|
+
*
|
|
32
|
+
* Bounded by bytes and entries, oldest out first; an evicted ref is remembered
|
|
33
|
+
* so the answer is "evicted" rather than "never existed" — the marker still
|
|
34
|
+
* names a real thing, and the honest reply is to call the tool again.
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
const DEFAULT_MAX_CHARS = 4_000_000;
|
|
38
|
+
const DEFAULT_MAX_ENTRIES = 200;
|
|
39
|
+
class EvidenceStore {
|
|
40
|
+
entries = new Map();
|
|
41
|
+
evictedRefs = new Set();
|
|
42
|
+
chars = 0;
|
|
43
|
+
seq = 0;
|
|
44
|
+
constructor(opts = {}) {
|
|
45
|
+
this.maxChars = opts.maxChars ?? DEFAULT_MAX_CHARS;
|
|
46
|
+
this.maxEntries = opts.maxEntries ?? DEFAULT_MAX_ENTRIES;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Keep a result. Returns its ref — `ev_<n>`, counting up for the life of the store. */
|
|
50
|
+
stash(input) {
|
|
51
|
+
const ref = `ev_${++this.seq}`;
|
|
52
|
+
const entry = {
|
|
53
|
+
...input,
|
|
54
|
+
ref
|
|
55
|
+
};
|
|
56
|
+
// A single result larger than the whole store still gets a ref — it is
|
|
57
|
+
// the case the store exists for — and simply evicts everything else.
|
|
58
|
+
this.entries.set(ref, entry);
|
|
59
|
+
this.chars += entry.text.length;
|
|
60
|
+
this.evict();
|
|
61
|
+
return ref;
|
|
62
|
+
}
|
|
63
|
+
get(ref) {
|
|
64
|
+
return this.entries.get(ref);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** True when the ref was real and has since been dropped for space. */
|
|
68
|
+
wasEvicted(ref) {
|
|
69
|
+
return this.evictedRefs.has(ref);
|
|
70
|
+
}
|
|
71
|
+
get size() {
|
|
72
|
+
return this.entries.size;
|
|
73
|
+
}
|
|
74
|
+
get totalChars() {
|
|
75
|
+
return this.chars;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** New conversation: nothing from the old one is retrievable. */
|
|
79
|
+
clear() {
|
|
80
|
+
this.entries.clear();
|
|
81
|
+
this.evictedRefs.clear();
|
|
82
|
+
this.chars = 0;
|
|
83
|
+
}
|
|
84
|
+
evict() {
|
|
85
|
+
// Map iteration is insertion order, so the first key is the oldest.
|
|
86
|
+
for (const [ref, entry] of this.entries) {
|
|
87
|
+
const over = this.chars > this.maxChars || this.entries.size > this.maxEntries;
|
|
88
|
+
if (!over || this.entries.size === 1) return;
|
|
89
|
+
this.entries.delete(ref);
|
|
90
|
+
this.evictedRefs.add(ref);
|
|
91
|
+
this.chars -= entry.text.length;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// ── the markers ──────────────────────────────────────────────────────────────
|
|
97
|
+
exports.EvidenceStore = EvidenceStore;
|
|
98
|
+
const RETRIEVE_HINT = "ask-buoy.retrieve";
|
|
99
|
+
|
|
100
|
+
/** The tail of a result cut at the engine's cap. */
|
|
101
|
+
function truncationMarker(totalChars, ref) {
|
|
102
|
+
const size = totalChars.toLocaleString("en-US");
|
|
103
|
+
if (!ref) return `\n\n[truncated — ${size} characters total. Ask for a narrower slice if you need more.]`;
|
|
104
|
+
return `\n\n[truncated — ${size} characters total; ref ${ref}. Call ${RETRIEVE_HINT} {"ref":"${ref}"} to see its shape, then {"ref":"${ref}","path":"…"} or {"ref":"${ref}","pattern":"…"} to read the part you need.]`;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** What a consumed result is replaced with when history is compressed. Keep the `[earlier result` prefix — historyBudget skips on it. */
|
|
108
|
+
function compressedMarker(totalChars, ref) {
|
|
109
|
+
const size = totalChars.toLocaleString("en-US");
|
|
110
|
+
if (!ref) return `[earlier result — ${size} characters, already read. Ask again if you need it.]`;
|
|
111
|
+
return `[earlier result — ${size} characters, already read; ref ${ref}. ${RETRIEVE_HINT} {"ref":"${ref}",…} re-reads exactly what you saw then; calling the tool again gives the CURRENT value.]`;
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=evidence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DEFAULT_MAX_CHARS","DEFAULT_MAX_ENTRIES","EvidenceStore","entries","Map","evictedRefs","Set","chars","seq","constructor","opts","maxChars","maxEntries","stash","input","ref","entry","set","text","length","evict","get","wasEvicted","has","size","totalChars","clear","over","delete","add","exports","RETRIEVE_HINT","truncationMarker","toLocaleString","compressedMarker"],"sourceRoot":"../../../src","sources":["engine/evidence.ts"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoBA,MAAMA,iBAAiB,GAAG,SAAS;AACnC,MAAMC,mBAAmB,GAAG,GAAG;AAExB,MAAMC,aAAa,CAAC;EACRC,OAAO,GAAG,IAAIC,GAAG,CAAwB,CAAC;EAC1CC,WAAW,GAAG,IAAIC,GAAG,CAAS,CAAC;EAGxCC,KAAK,GAAG,CAAC;EACTC,GAAG,GAAG,CAAC;EAEfC,WAAWA,CAACC,IAA0B,GAAG,CAAC,CAAC,EAAE;IAC3C,IAAI,CAACC,QAAQ,GAAGD,IAAI,CAACC,QAAQ,IAAIX,iBAAiB;IAClD,IAAI,CAACY,UAAU,GAAGF,IAAI,CAACE,UAAU,IAAIX,mBAAmB;EAC1D;;EAEA;EACAY,KAAKA,CAACC,KAAiC,EAAU;IAC/C,MAAMC,GAAG,GAAG,MAAM,EAAE,IAAI,CAACP,GAAG,EAAE;IAC9B,MAAMQ,KAAoB,GAAG;MAAE,GAAGF,KAAK;MAAEC;IAAI,CAAC;IAC9C;IACA;IACA,IAAI,CAACZ,OAAO,CAACc,GAAG,CAACF,GAAG,EAAEC,KAAK,CAAC;IAC5B,IAAI,CAACT,KAAK,IAAIS,KAAK,CAACE,IAAI,CAACC,MAAM;IAC/B,IAAI,CAACC,KAAK,CAAC,CAAC;IACZ,OAAOL,GAAG;EACZ;EAEAM,GAAGA,CAACN,GAAW,EAA6B;IAC1C,OAAO,IAAI,CAACZ,OAAO,CAACkB,GAAG,CAACN,GAAG,CAAC;EAC9B;;EAEA;EACAO,UAAUA,CAACP,GA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