@retaw106/mmc-oc 2.2.1 → 2.3.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/dist/cli.js +2 -2
- package/dist/config/deprecated-config.d.ts +4 -0
- package/dist/config/deprecated-config.d.ts.map +1 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/project-security.d.ts +2 -2
- package/dist/config/schema/magic-context.d.ts +3 -3
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/config-init.js +2 -2
- package/dist/{context-mrvm92n8.js → context-wt7g4f8k.js} +1641 -1543
- package/dist/{derive-budgets-rjjz5f7y.js → derive-budgets-s1p37t2g.js} +2 -2
- package/dist/features/magic-context/compaction-marker.d.ts.map +1 -1
- package/dist/features/magic-context/historian-failure-reason.d.ts +7 -0
- package/dist/features/magic-context/historian-failure-reason.d.ts.map +1 -0
- package/dist/features/magic-context/message-index-async.d.ts +21 -3
- package/dist/features/magic-context/message-index-async.d.ts.map +1 -1
- package/dist/features/magic-context/message-index.d.ts +7 -1
- package/dist/features/magic-context/message-index.d.ts.map +1 -1
- package/dist/features/magic-context/migrations.d.ts.map +1 -1
- package/dist/features/magic-context/pi-content-decisions.d.ts +7 -1
- package/dist/features/magic-context/pi-content-decisions.d.ts.map +1 -1
- package/dist/features/magic-context/search.d.ts +29 -0
- package/dist/features/magic-context/search.d.ts.map +1 -1
- package/dist/features/magic-context/storage-clone.d.ts +2 -0
- package/dist/features/magic-context/storage-clone.d.ts.map +1 -1
- package/dist/features/magic-context/storage-compartment-history-version.d.ts +4 -0
- package/dist/features/magic-context/storage-compartment-history-version.d.ts.map +1 -0
- package/dist/features/magic-context/storage-db.d.ts +1 -1
- package/dist/features/magic-context/storage-db.d.ts.map +1 -1
- package/dist/features/magic-context/storage-historian-runs.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts +23 -5
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-session.d.ts +7 -1
- package/dist/features/magic-context/storage-meta-session.d.ts.map +1 -1
- package/dist/features/magic-context/storage-session-tables.d.ts +5 -1
- package/dist/features/magic-context/storage-session-tables.d.ts.map +1 -1
- package/dist/features/magic-context/storage-tag-identity-revision.d.ts +50 -0
- package/dist/features/magic-context/storage-tag-identity-revision.d.ts.map +1 -0
- package/dist/features/magic-context/storage-tags.d.ts +155 -5
- package/dist/features/magic-context/storage-tags.d.ts.map +1 -1
- package/dist/features/magic-context/tagger.d.ts +2 -0
- package/dist/features/magic-context/tagger.d.ts.map +1 -1
- package/dist/features/magic-context/transform-decision-log.d.ts +3 -0
- package/dist/features/magic-context/transform-decision-log.d.ts.map +1 -1
- package/dist/hooks/magic-context/active-anthropic-turn.d.ts +2 -0
- package/dist/hooks/magic-context/active-anthropic-turn.d.ts.map +1 -1
- package/dist/hooks/magic-context/apply-operations.d.ts +7 -0
- package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-runner.d.ts +2 -2
- package/dist/hooks/magic-context/auto-search-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/heuristic-cleanup.d.ts.map +1 -1
- package/dist/hooks/magic-context/history-boundary-repair.d.ts +11 -2
- package/dist/hooks/magic-context/history-boundary-repair.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook-handlers.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-measured-request.d.ts +3 -1
- package/dist/hooks/magic-context/lkg-measured-request.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-persist.d.ts +10 -13
- package/dist/hooks/magic-context/lkg-persist.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-recovery-fence.d.ts +62 -0
- package/dist/hooks/magic-context/lkg-recovery-fence.d.ts.map +1 -0
- package/dist/hooks/magic-context/lkg-recovery-prefix.d.ts +38 -0
- package/dist/hooks/magic-context/lkg-recovery-prefix.d.ts.map +1 -0
- package/dist/hooks/magic-context/lkg-replay.d.ts +16 -9
- package/dist/hooks/magic-context/lkg-replay.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-slot.d.ts +141 -2
- package/dist/hooks/magic-context/lkg-slot.d.ts.map +1 -1
- package/dist/hooks/magic-context/opaque-thinking.d.ts +12 -0
- package/dist/hooks/magic-context/opaque-thinking.d.ts.map +1 -0
- package/dist/hooks/magic-context/pass-outcome.d.ts +1 -0
- package/dist/hooks/magic-context/pass-outcome.d.ts.map +1 -1
- package/dist/hooks/magic-context/pending-materialization.d.ts +8 -0
- package/dist/hooks/magic-context/pending-materialization.d.ts.map +1 -0
- package/dist/hooks/magic-context/postprocess-read-cache.d.ts.map +1 -1
- package/dist/hooks/magic-context/provider-visible-parts.d.ts +45 -0
- package/dist/hooks/magic-context/provider-visible-parts.d.ts.map +1 -0
- package/dist/hooks/magic-context/read-session-chunk.d.ts +22 -1
- package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-db.d.ts +3 -0
- package/dist/hooks/magic-context/read-session-db.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-formatting.d.ts +5 -0
- package/dist/hooks/magic-context/read-session-formatting.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-raw.d.ts +123 -1
- package/dist/hooks/magic-context/read-session-raw.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-true-raw-tokens.d.ts.map +1 -1
- package/dist/hooks/magic-context/reasoning-budget.d.ts.map +1 -1
- package/dist/hooks/magic-context/sentinel.d.ts +41 -1
- package/dist/hooks/magic-context/sentinel.d.ts.map +1 -1
- package/dist/hooks/magic-context/strict-thinking-prefix.d.ts +8 -0
- package/dist/hooks/magic-context/strict-thinking-prefix.d.ts.map +1 -0
- package/dist/hooks/magic-context/strip-content.d.ts +38 -24
- package/dist/hooks/magic-context/strip-content.d.ts.map +1 -1
- package/dist/hooks/magic-context/system-date-refresh.d.ts +29 -0
- package/dist/hooks/magic-context/system-date-refresh.d.ts.map +1 -0
- package/dist/hooks/magic-context/system-prompt-dates.d.ts +6 -0
- package/dist/hooks/magic-context/system-prompt-dates.d.ts.map +1 -0
- package/dist/hooks/magic-context/system-prompt-delivery.d.ts +47 -0
- package/dist/hooks/magic-context/system-prompt-delivery.d.ts.map +1 -0
- package/dist/hooks/magic-context/system-prompt-hash.d.ts +18 -5
- package/dist/hooks/magic-context/system-prompt-hash.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-messages.d.ts +19 -0
- package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-owner-warmup.d.ts +14 -0
- package/dist/hooks/magic-context/tag-owner-warmup.d.ts.map +1 -0
- package/dist/hooks/magic-context/token-count-exact.d.ts +35 -0
- package/dist/hooks/magic-context/token-count-exact.d.ts.map +1 -0
- package/dist/hooks/magic-context/tool-drop-target.d.ts +2 -0
- package/dist/hooks/magic-context/tool-drop-target.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +7 -0
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +21 -4
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/index-18yrysyj.js +1477 -0
- package/dist/{index-g2z2k5m4.js → index-3gj1ak4c.js} +2 -2
- package/dist/{index-5cep2r9n.js → index-5ty9rnbx.js} +60 -258
- package/dist/{index-amycb7b1.js → index-a5mw0xp3.js} +3 -3
- package/dist/{index-1j34a56j.js → index-czba8tw3.js} +266 -32
- package/dist/{index-qbkzdkk0.js → index-k59af64t.js} +6 -2
- package/dist/{index-53g38ggt.js → index-kmbme1v1.js} +1 -1
- package/dist/{index-5b7x80ec.js → index-kw21z5pe.js} +6055 -3973
- package/dist/{index-33gprt9g.js → index-yjv8dpht.js} +1 -1
- package/dist/{index-btp5tdc8.js → index-z2w1eq3y.js} +840 -456
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +114 -2
- package/dist/{message-time-backfill-phrwp2fz.js → message-time-backfill-sykevdax.js} +3 -3
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/{read-session-chunk-2xm4sc4y.js → read-session-chunk-863d6c06.js} +6 -4
- package/dist/recomp-orchestrator-wrjy3qym.js +21 -0
- package/dist/{safe-notification-target-ph3xd1ve.js → safe-notification-target-1jkf0m82.js} +2 -2
- package/dist/{send-session-notification-rnc4nrsr.js → send-session-notification-cz6ev088.js} +5 -5
- package/dist/shared/auto-search-lifecycle.d.ts +14 -0
- package/dist/shared/auto-search-lifecycle.d.ts.map +1 -1
- package/dist/shared/logger.d.ts.map +1 -1
- package/dist/shared/models-dev-cache.d.ts.map +1 -1
- package/dist/shared/models-dev-temperature.d.ts +18 -0
- package/dist/shared/models-dev-temperature.d.ts.map +1 -0
- package/dist/shared/processed-image-eligibility.d.ts +22 -0
- package/dist/shared/processed-image-eligibility.d.ts.map +1 -0
- package/dist/shared/project-directory-key.d.ts +16 -0
- package/dist/shared/project-directory-key.d.ts.map +1 -1
- package/dist/shared/recovery-reasoning-prefix.d.ts +9 -0
- package/dist/shared/recovery-reasoning-prefix.d.ts.map +1 -0
- package/dist/shared/sqlite.d.ts +33 -1
- package/dist/shared/sqlite.d.ts.map +1 -1
- package/dist/shared/stable-json.d.ts.map +1 -1
- package/dist/shared/storage-file-mutex.d.ts +9 -0
- package/dist/shared/storage-file-mutex.d.ts.map +1 -0
- package/dist/shared/storage-permissions.d.ts +6 -0
- package/dist/shared/storage-permissions.d.ts.map +1 -1
- package/dist/shared/subagent-temperature.d.ts +46 -0
- package/dist/shared/subagent-temperature.d.ts.map +1 -0
- package/dist/shared/tag-owner-id.d.ts +1 -0
- package/dist/shared/tag-owner-id.d.ts.map +1 -1
- package/dist/shared/tag-transcript.d.ts +9 -0
- package/dist/shared/tag-transcript.d.ts.map +1 -1
- package/dist/shared/window-geometry.d.ts +9 -66
- package/dist/shared/window-geometry.d.ts.map +1 -1
- package/dist/standalone-plugin-marker.d.ts +8 -0
- package/dist/standalone-plugin-marker.d.ts.map +1 -0
- package/dist/tools/ctx-expand/search-archive.d.ts +4 -0
- package/dist/tools/ctx-expand/search-archive.d.ts.map +1 -0
- package/dist/tools/ctx-expand/tools.d.ts.map +1 -1
- package/dist/tools/ctx-reduce/constants.d.ts +1 -2
- package/dist/tools/ctx-reduce/constants.d.ts.map +1 -1
- package/dist/tools/ctx-reduce/tools.d.ts +1 -1
- package/dist/tools/ctx-reduce/tools.d.ts.map +1 -1
- package/dist/v2/hooks/context.d.ts +1 -1
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/copied-tag-notation.d.ts +19 -0
- package/dist/v2/hooks/copied-tag-notation.d.ts.map +1 -0
- package/dist/v2/hooks/generate.d.ts +9 -2
- package/dist/v2/hooks/generate.d.ts.map +1 -1
- package/dist/v2/hooks/payload.d.ts.map +1 -1
- package/dist/v2/hooks/system-prompt-response.d.ts +5 -0
- package/dist/v2/hooks/system-prompt-response.d.ts.map +1 -0
- package/dist/v2/server.d.ts.map +1 -1
- package/dist/v2/server.js +34550 -30855
- package/dist/web/main.js +373 -19
- package/dist/{wrapup-orchestrator-yknks3ad.js → wrapup-orchestrator-bmybc5p5.js} +10 -10
- package/package.json +1 -1
- package/src/config/deprecated-config.ts +18 -0
- package/src/config/index.test.ts +13 -37
- package/src/config/index.ts +2 -2
- package/src/config/project-security.ts +3 -3
- package/src/config/schema/magic-context.ts +10 -6
- package/src/shared/auto-search-lifecycle.ts +43 -0
- package/src/shared/logger.ts +10 -2
- package/src/shared/models-dev-cache.ts +1 -7
- package/src/shared/models-dev-temperature.ts +107 -0
- package/src/shared/processed-image-eligibility.test.ts +68 -0
- package/src/shared/processed-image-eligibility.ts +41 -0
- package/src/shared/processed-image-position-review.json +20 -0
- package/src/shared/processed-image-position-review.test.ts +19 -0
- package/src/shared/project-directory-key.ts +20 -0
- package/src/shared/recovery-reasoning-prefix.test.ts +34 -0
- package/src/shared/recovery-reasoning-prefix.ts +35 -0
- package/src/shared/sqlite-acquisition-routing.test.ts +4 -3
- package/src/shared/sqlite-foreground-wait.test.ts +68 -0
- package/src/shared/sqlite-pass-scope.test.ts +4 -4
- package/src/shared/sqlite-writer-diagnostics.test.ts +52 -12
- package/src/shared/sqlite.ts +380 -39
- package/src/shared/stable-json.ts +37 -7
- package/src/shared/storage-file-mutex.test.ts +50 -0
- package/src/shared/storage-file-mutex.ts +130 -0
- package/src/shared/storage-permissions.ts +46 -0
- package/src/shared/subagent-temperature.ts +110 -0
- package/src/shared/tag-owner-id.ts +13 -0
- package/src/shared/tag-transcript.ts +118 -0
- package/src/shared/window-geometry.test.ts +102 -236
- package/src/shared/window-geometry.ts +23 -413
- package/dist/index-ramz5kkm.js +0 -514
- package/dist/recomp-orchestrator-frmwj9hz.js +0 -21
- package/src/shared/__fixtures__/window-overlay.v1.json +0 -337
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAUpC,QAAA,MAAM,MAAM;;;CAGX,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2,9 +2,120 @@ import {
|
|
|
2
2
|
setHarness,
|
|
3
3
|
log,
|
|
4
4
|
flushLogger
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-k59af64t.js";
|
|
6
|
+
// package.json
|
|
7
|
+
var package_default = {
|
|
8
|
+
name: "@retaw106/mmc-oc",
|
|
9
|
+
version: "2.3.0",
|
|
10
|
+
type: "module",
|
|
11
|
+
description: "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
12
|
+
main: "dist/index.js",
|
|
13
|
+
types: "dist/index.d.ts",
|
|
14
|
+
bin: {
|
|
15
|
+
"mmc-oc": "./dist/cli.js"
|
|
16
|
+
},
|
|
17
|
+
author: "ualtinok",
|
|
18
|
+
license: "MIT",
|
|
19
|
+
repository: {
|
|
20
|
+
type: "git",
|
|
21
|
+
url: "git+https://github.com/retaw106/moon-magic-context.git",
|
|
22
|
+
directory: "packages/plugin"
|
|
23
|
+
},
|
|
24
|
+
publishConfig: {
|
|
25
|
+
access: "public"
|
|
26
|
+
},
|
|
27
|
+
keywords: [
|
|
28
|
+
"opencode",
|
|
29
|
+
"plugin",
|
|
30
|
+
"context",
|
|
31
|
+
"memory",
|
|
32
|
+
"ai",
|
|
33
|
+
"llm",
|
|
34
|
+
"prompt-caching",
|
|
35
|
+
"session-history"
|
|
36
|
+
],
|
|
37
|
+
files: [
|
|
38
|
+
"dist",
|
|
39
|
+
"index.js",
|
|
40
|
+
"src/shared",
|
|
41
|
+
"src/config",
|
|
42
|
+
"src/agents",
|
|
43
|
+
"README.md"
|
|
44
|
+
],
|
|
45
|
+
scripts: {
|
|
46
|
+
build: "bun ../../scripts/check-bun.mjs && bun ../../scripts/clean-dist-chunks.mjs dist index.js config-init.js cli.js && rm -rf dist/web && bun build src/index.ts --outdir dist --target node --format esm --splitting --external @opencode-ai/plugin --external bun:sqlite --external node:sqlite && bun run build:v2 && bun run build:web && bun run build:config-init && bun run build:cli && tsc --emitDeclarationOnly",
|
|
47
|
+
"build:v2": "bun build src/v2/server.ts --outfile dist/v2/server.js --target node --format esm --external @opencode/plugin && bun test src/v2/server.test.ts",
|
|
48
|
+
"build:web": "bun build src/web/main.ts --outfile dist/web/main.js --target node --format esm --external bun:sqlite --external node:sqlite && mkdir -p dist/web/ui && cp src/web/ui/* dist/web/ui/",
|
|
49
|
+
"build:config-init": "bun build scripts/config-init-entry.ts --outfile dist/config-init.js --target node --format esm",
|
|
50
|
+
"build:cli": "bun build scripts/cli.ts --outfile dist/cli.js --target node --format esm",
|
|
51
|
+
typecheck: "tsc --noEmit && tsc -p tsconfig.scripts.json",
|
|
52
|
+
test: "bun ../../scripts/check-bun.mjs && bun install --frozen-lockfile && bun test --parallel=4 --timeout 30000",
|
|
53
|
+
"test:serial": "bun install --frozen-lockfile && bun test --timeout 30000",
|
|
54
|
+
"test:parallel:probe": "bun scripts/verify-parallel-db-isolation.ts",
|
|
55
|
+
lint: "bun ../../scripts/check-bun.mjs && biome check .",
|
|
56
|
+
"lint:fix": "biome check --write .",
|
|
57
|
+
format: "biome format --write .",
|
|
58
|
+
"format:check": "biome format .",
|
|
59
|
+
clean: "rm -rf dist",
|
|
60
|
+
prepublishOnly: "bun run build"
|
|
61
|
+
},
|
|
62
|
+
dependencies: {
|
|
63
|
+
"@opencode-ai/plugin": "^1.17.11",
|
|
64
|
+
"@opencode-ai/sdk": "^1.17.11",
|
|
65
|
+
"ai-tokenizer": "^1.0.6",
|
|
66
|
+
"comment-json": "^5.0.0",
|
|
67
|
+
"jsonc-parser": "^3.3.1",
|
|
68
|
+
zod: "^4.1.8"
|
|
69
|
+
},
|
|
70
|
+
devDependencies: {
|
|
71
|
+
"@opencode/plugin": "2.0.22",
|
|
72
|
+
"@opencode/ai": "2.0.22",
|
|
73
|
+
"@opencode/cli": "2.0.22",
|
|
74
|
+
"@opencode/client": "2.0.22",
|
|
75
|
+
effect: "4.0.0-rc.112",
|
|
76
|
+
"@ai-sdk/anthropic": "3.0.82",
|
|
77
|
+
"@ai-sdk/openai-compatible": "2.0.41",
|
|
78
|
+
"@biomejs/biome": "^2.5.1",
|
|
79
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
80
|
+
"@types/bun": "^1.3.10",
|
|
81
|
+
"@types/node": "^22.20.0",
|
|
82
|
+
"bun-types": "^1.3.10",
|
|
83
|
+
typescript: "^5.8.0"
|
|
84
|
+
},
|
|
85
|
+
exports: {
|
|
86
|
+
".": {
|
|
87
|
+
types: "./dist/index.d.ts",
|
|
88
|
+
import: "./dist/index.js"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"oc-plugin": [
|
|
92
|
+
"server"
|
|
93
|
+
],
|
|
94
|
+
peerDependencies: {
|
|
95
|
+
"@opencode-ai/plugin": ">=1.15.0"
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
// src/standalone-plugin-marker.ts
|
|
100
|
+
var markerSymbol = Symbol.for("cortexkit.standalone-plugins");
|
|
101
|
+
function registerStandalonePluginMarker(version) {
|
|
102
|
+
try {
|
|
103
|
+
const globals = globalThis;
|
|
104
|
+
let registry = globals[markerSymbol];
|
|
105
|
+
if (registry === undefined) {
|
|
106
|
+
registry = new Map;
|
|
107
|
+
globals[markerSymbol] = registry;
|
|
108
|
+
}
|
|
109
|
+
registry.set("magic-context", { version });
|
|
110
|
+
} catch (error) {
|
|
111
|
+
try {
|
|
112
|
+
log("could not register the standalone plugin marker", error);
|
|
113
|
+
} catch {}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
6
116
|
|
|
7
117
|
// src/v2/server.ts
|
|
118
|
+
registerStandalonePluginMarker(package_default.version);
|
|
8
119
|
function isOpenCode2HostContext(context) {
|
|
9
120
|
if (typeof context !== "object" || context === null)
|
|
10
121
|
return false;
|
|
@@ -16,7 +127,7 @@ async function setup(context) {
|
|
|
16
127
|
log("v2 setup() called on a host without session.hook; v1 server lane owns this host, v2 lane inert");
|
|
17
128
|
return async () => {};
|
|
18
129
|
}
|
|
19
|
-
const { registerContext } = await import("./context-
|
|
130
|
+
const { registerContext } = await import("./context-wt7g4f8k.js");
|
|
20
131
|
setHarness("opencode2");
|
|
21
132
|
const duties = await registerContext(context);
|
|
22
133
|
log("[magic-context] @retaw106/mmc-oc v2 setup");
|
|
@@ -27,6 +138,7 @@ async function setup(context) {
|
|
|
27
138
|
}
|
|
28
139
|
|
|
29
140
|
// src/index.ts
|
|
141
|
+
registerStandalonePluginMarker(package_default.version);
|
|
30
142
|
var plugin = {
|
|
31
143
|
id: "moon-magic-context",
|
|
32
144
|
setup
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withSqliteBackgroundWriter,
|
|
3
3
|
withoutSqliteTransformPass
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
4
|
+
} from "./index-czba8tw3.js";
|
|
5
|
+
import"./index-k59af64t.js";
|
|
6
6
|
import {
|
|
7
7
|
logSlowWriteTransaction
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-yjv8dpht.js";
|
|
9
9
|
|
|
10
10
|
// src/features/magic-context/message-time-backfill.ts
|
|
11
11
|
var MESSAGE_TIME_BACKFILL_BATCH_SIZE = 500;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-handlers.d.ts","sourceRoot":"","sources":["../../src/plugin/rpc-handlers.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAoBzE,OAAO,EACH,KAAK,eAAe,IAAI,QAAQ,EAGnC,MAAM,mCAAmC,CAAC;AAe3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAQhG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"rpc-handlers.d.ts","sourceRoot":"","sources":["../../src/plugin/rpc-handlers.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAoBzE,OAAO,EACH,KAAK,eAAe,IAAI,QAAQ,EAGnC,MAAM,mCAAmC,CAAC;AAe3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAQhG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAUlF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAcvF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAGR,wBAAwB,EACxB,eAAe,EACf,YAAY,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AAC;KACN,CAAC;CACL;AAiBD,wBAAgB,iBAAiB,CAC7B,MAAM,EAAE,IAAI,CAAC,kBAAkB,EAAE,WAAW,CAAC,EAC7C,GAAG,GAAE,MAAM,CAAC,UAAwB,GACrC,OAAO,CAET;AAED,wBAAgB,qBAAqB,CACjC,cAAc,GAAE,yBAA8B,GAC/C,wBAAwB,CA2E1B;AAuHD;;GAEG;AACH,wBAAgB,mBAAmB,CAC/B,SAAS,EAAE,qBAAqB,EAChC,IAAI,EAAE;IACF,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,wBAAwB,CAAC,EAAE,oBAAoB,CAAC,0BAA0B,CAAC,CAAC;IAC5E,qFAAqF;IACrF,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qBAAqB,CAAC,EAAE,MAAM,yBAAyB,GAAG,SAAS,CAAC;IACpE;0EACsE;IACtE,WAAW,CAAC,EAAE,MAAM,QAAQ,GAAG,IAAI,CAAC;CACvC,GACF,IAAI,CAuSN"}
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
getRawSessionMessageOrdinalCount2,
|
|
12
12
|
visitRawSessionMessages2,
|
|
13
13
|
readRawSessionMessageRange2,
|
|
14
|
+
prepareRawSessionOrdinals2,
|
|
14
15
|
primeTailRawMessageCache2,
|
|
15
16
|
getCachedAbsoluteMessageCount2,
|
|
16
17
|
primeInMemoryTailRawMessageCache2,
|
|
@@ -23,11 +24,11 @@ import {
|
|
|
23
24
|
getRawSessionTagKeysThrough2,
|
|
24
25
|
getLegacyProtectedTailStartOrdinal2,
|
|
25
26
|
readSessionChunk2
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
27
|
+
} from "./index-z2w1eq3y.js";
|
|
28
|
+
import"./index-18yrysyj.js";
|
|
29
|
+
import"./index-czba8tw3.js";
|
|
29
30
|
import"./index-x37vg474.js";
|
|
30
|
-
import"./index-
|
|
31
|
+
import"./index-k59af64t.js";
|
|
31
32
|
export {
|
|
32
33
|
cleanUserText2 as cleanUserText,
|
|
33
34
|
compareRawSessionMessageOrder2 as compareRawSessionMessageOrder,
|
|
@@ -40,6 +41,7 @@ export {
|
|
|
40
41
|
hasMeaningfulUserText2 as hasMeaningfulUserText,
|
|
41
42
|
hasRawMessageProvider2 as hasRawMessageProvider,
|
|
42
43
|
hasRawSessionMessageById2 as hasRawSessionMessageById,
|
|
44
|
+
prepareRawSessionOrdinals2 as prepareRawSessionOrdinals,
|
|
43
45
|
primeInMemoryTailRawMessageCache2 as primeInMemoryTailRawMessageCache,
|
|
44
46
|
primeTailRawMessageCache2 as primeTailRawMessageCache,
|
|
45
47
|
readRawSessionMessageById2 as readRawSessionMessageById,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
setRecompStarting2,
|
|
3
|
+
setRecompTerminal2,
|
|
4
|
+
runManagedRecomp2
|
|
5
|
+
} from "./index-3gj1ak4c.js";
|
|
6
|
+
import"./index-kw21z5pe.js";
|
|
7
|
+
import"./index-a5mw0xp3.js";
|
|
8
|
+
import"./index-z2w1eq3y.js";
|
|
9
|
+
import"./index-18yrysyj.js";
|
|
10
|
+
import"./index-yjv8dpht.js";
|
|
11
|
+
import"./index-czba8tw3.js";
|
|
12
|
+
import"./index-jdxxq8cz.js";
|
|
13
|
+
import"./index-kmbme1v1.js";
|
|
14
|
+
import"./index-5ty9rnbx.js";
|
|
15
|
+
import"./index-x37vg474.js";
|
|
16
|
+
import"./index-k59af64t.js";
|
|
17
|
+
export {
|
|
18
|
+
runManagedRecomp2 as runManagedRecomp,
|
|
19
|
+
setRecompStarting2 as setRecompStarting,
|
|
20
|
+
setRecompTerminal2 as setRecompTerminal
|
|
21
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isDefaultSessionTitle2,
|
|
3
3
|
waitForSafeNotificationTarget2
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
4
|
+
} from "./index-kmbme1v1.js";
|
|
5
|
+
import"./index-k59af64t.js";
|
|
6
6
|
export {
|
|
7
7
|
isDefaultSessionTitle2 as isDefaultSessionTitle,
|
|
8
8
|
waitForSafeNotificationTarget2 as waitForSafeNotificationTarget
|
package/dist/{send-session-notification-rnc4nrsr.js → send-session-notification-cz6ev088.js}
RENAMED
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
clearIgnoredMessages2,
|
|
5
5
|
observeIgnoredNotificationEvent2,
|
|
6
6
|
sendStatusNotification2
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
7
|
+
} from "./index-a5mw0xp3.js";
|
|
8
|
+
import"./index-18yrysyj.js";
|
|
9
|
+
import"./index-czba8tw3.js";
|
|
10
|
+
import"./index-kmbme1v1.js";
|
|
11
|
+
import"./index-k59af64t.js";
|
|
12
12
|
export {
|
|
13
13
|
clearIgnoredMessages2 as clearIgnoredMessages,
|
|
14
14
|
flushIgnoredMessages2 as flushIgnoredMessages,
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
import type { AutoSearchHintNoHintReason } from "../features/magic-context/storage-meta-persisted";
|
|
2
|
+
/**
|
|
3
|
+
* A failed save can still send the user message without a search hint. Remember
|
|
4
|
+
* that no-hint decision until a later pass saves it to SQLite, including across
|
|
5
|
+
* closing and reopening the database handle. Switching or shutting down a session
|
|
6
|
+
* does not prove deletion and must not discard it. If all compare-and-swap (CAS)
|
|
7
|
+
* save retries fail and the process restarts before repair, this unsaved record
|
|
8
|
+
* is lost: that compound failure is the remaining durability gap.
|
|
9
|
+
*/
|
|
10
|
+
export declare function rememberUnpublishedAutoSearchNoHint(sessionId: string, messageId: string, reason: AutoSearchHintNoHintReason): void;
|
|
11
|
+
export declare function getUnpublishedAutoSearchNoHint(sessionId: string, messageId: string): AutoSearchHintNoHintReason | undefined;
|
|
12
|
+
export declare function forgetUnpublishedAutoSearchNoHint(sessionId: string, messageId: string): void;
|
|
13
|
+
/** Deleting a session releases its unsaved no-hint records; switching away does not. */
|
|
14
|
+
export declare function clearUnpublishedAutoSearchNoHints(sessionId?: string): void;
|
|
1
15
|
/** Cleanup cancels optional searches and backfill, not durable served decisions. */
|
|
2
16
|
export declare function registerAutoSearchWork(sessionId: string): {
|
|
3
17
|
signal: AbortSignal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-search-lifecycle.d.ts","sourceRoot":"","sources":["../../src/shared/auto-search-lifecycle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auto-search-lifecycle.d.ts","sourceRoot":"","sources":["../../src/shared/auto-search-lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAKnG;;;;;;;GAOG;AACH,wBAAgB,mCAAmC,CAC/C,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,0BAA0B,GACnC,IAAI,CAON;AAED,wBAAgB,8BAA8B,CAC1C,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAClB,0BAA0B,GAAG,SAAS,CAExC;AAED,wBAAgB,iCAAiC,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAI5F;AAED,wFAAwF;AACxF,wBAAgB,iCAAiC,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAG1E;AAED,oFAAoF;AACpF,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG;IACvD,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,MAAM,IAAI,CAAC;CACpB,CAYA;AAED,wBAAgB,oBAAoB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAM7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/shared/logger.ts"],"names":[],"mappings":"AA4BA,MAAM,WAAW,iBAAiB;IAC9B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/shared/logger.ts"],"names":[],"mappings":"AA4BA,MAAM,WAAW,iBAAiB;IAC9B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAuKD,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAwBzD;AAED,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAEnF;AAED,wBAAgB,oBAAoB,IAAI,iBAAiB,CAMxD;AAED,gGAAgG;AAChG,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models-dev-cache.d.ts","sourceRoot":"","sources":["../../src/shared/models-dev-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAMzE,OAAO,
|
|
1
|
+
{"version":3,"file":"models-dev-cache.d.ts","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,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAWxF;AA2BD,gFAAgF;AAChF,wBAAgB,mBAAmB,IAAI,IAAI,CAI1C;AAED,oDAAoD;AACpD,wBAAgB,sBAAsB,IAAI;IACtC,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAMA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface CatalogTemperature {
|
|
2
|
+
temperature: boolean;
|
|
3
|
+
/** The catalog entry that decided, as `provider/model`. */
|
|
4
|
+
entry: string;
|
|
5
|
+
}
|
|
6
|
+
/** OpenCode reads `OPENCODE_MODELS_PATH` instead of its cache when it is set. */
|
|
7
|
+
export declare function modelsDevCatalogPath(env?: NodeJS.ProcessEnv): string;
|
|
8
|
+
/** Spellings to try for a harness `provider/model` reference, most specific first. */
|
|
9
|
+
export declare function catalogCandidates(providerID: string, modelID: string): string[];
|
|
10
|
+
/**
|
|
11
|
+
* Look `provider/model` up in the cached catalogue, trying only the exact spellings from
|
|
12
|
+
* `catalogCandidates`. A malformed reference, a missing catalogue or no entry returns undefined.
|
|
13
|
+
*/
|
|
14
|
+
export declare function catalogTemperature(model: string): CatalogTemperature | undefined;
|
|
15
|
+
export declare const __catalogTest: {
|
|
16
|
+
reset(): void;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=models-dev-temperature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models-dev-temperature.d.ts","sourceRoot":"","sources":["../../src/shared/models-dev-temperature.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,kBAAkB;IAC/B,WAAW,EAAE,OAAO,CAAC;IACrB,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC;CACjB;AAmBD,iFAAiF;AACjF,wBAAgB,oBAAoB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAGjF;AAgCD,sFAAsF;AACtF,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAQ/E;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAUhF;AAED,eAAO,MAAM,aAAa;aACb,IAAI;CAGhB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared processed-image age and recency policy for both OpenCode adapters.
|
|
3
|
+
* Use the owning message's positive maximum tag; an untagged image-only message
|
|
4
|
+
* inherits the next positive tagged message after it, never age zero or a tag
|
|
5
|
+
* from an earlier message. Without either tag, retain the image at the live tail.
|
|
6
|
+
* A positive dropped-tag watermark must cover that position. Below 95% usage,
|
|
7
|
+
* retain every position at or beyond the protected newest-window cutoff. At
|
|
8
|
+
* 95% and above only that window yields, exactly as for emergency tool drops;
|
|
9
|
+
* independent per-tool protections still apply. Content before retained provider-signed
|
|
10
|
+
* thinking must stay unchanged unless an existing whole-turn rewrite removes that
|
|
11
|
+
* thinking first. Callers enforce these protections, later-assistant/stable-id checks, durable
|
|
12
|
+
* persistence and rewrite-only discovery. Frozen replay bypasses eligibility.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createProcessedImageEligibility<T>(messages: readonly T[], messageTagNumbers: ReadonlyMap<T, number>, options: {
|
|
15
|
+
watermark: number;
|
|
16
|
+
protectedCutoff?: number | null;
|
|
17
|
+
contextPercentage?: number;
|
|
18
|
+
}): {
|
|
19
|
+
ageTags: ReadonlyMap<T, number>;
|
|
20
|
+
mayStrip: (message: T) => boolean;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=processed-image-eligibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"processed-image-eligibility.d.ts","sourceRoot":"","sources":["../../src/shared/processed-image-eligibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,+BAA+B,CAAC,CAAC,EAC7C,QAAQ,EAAE,SAAS,CAAC,EAAE,EACtB,iBAAiB,EAAE,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,EACzC,OAAO,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5F;IAAE,OAAO,EAAE,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,OAAO,CAAA;CAAE,CAuBxE"}
|
|
@@ -7,6 +7,22 @@
|
|
|
7
7
|
* path is resolved to an absolute path, which also drops a trailing slash.
|
|
8
8
|
*/
|
|
9
9
|
export declare function projectDirectoryKey(directory: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Whether two spellings name the same directory, judged by spelling alone.
|
|
12
|
+
*
|
|
13
|
+
* Hosts and the plugin do not agree on how to write a directory: OpenCode 2 on
|
|
14
|
+
* Windows stores a session's directory as `D:/work/app` while the plugin's own
|
|
15
|
+
* location is `D:\work\app`, and a drive letter can arrive in either case.
|
|
16
|
+
* Both sides go through `projectDirectoryKey`, so separators, Windows case,
|
|
17
|
+
* `\\?\` prefixes, trailing separators and `.`/`..` segments cannot make one
|
|
18
|
+
* directory look like two. POSIX paths keep their case. Symlinks are not
|
|
19
|
+
* resolved here; callers that must follow them use `canonicalProjectDirectory`.
|
|
20
|
+
*
|
|
21
|
+
* An empty spelling never matches anything: `path.resolve("")` is the process's
|
|
22
|
+
* working directory, and a session with no recorded directory must not be
|
|
23
|
+
* taken for one in the directory the process happens to run in.
|
|
24
|
+
*/
|
|
25
|
+
export declare function sameProjectDirectory(a: string, b: string): boolean;
|
|
10
26
|
/**
|
|
11
27
|
* One spelling for a project directory, shared by everything that has to agree
|
|
12
28
|
* on it across processes (the RPC server that writes its discovery file and the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-directory-key.d.ts","sourceRoot":"","sources":["../../src/shared/project-directory-key.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAS7D;AAKD;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAQnE;AAED,6FAA6F;AAC7F,wBAAgB,uCAAuC,CACnD,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GACzC,IAAI,CAEN"}
|
|
1
|
+
{"version":3,"file":"project-directory-key.d.ts","sourceRoot":"","sources":["../../src/shared/project-directory-key.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAS7D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAGlE;AAKD;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAQnE;AAED,6FAA6F;AAC7F,wBAAgB,uCAAuC,CACnD,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GACzC,IAAI,CAEN"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serialize each request prefix ending at a thinking/reasoning part, including
|
|
3
|
+
* earlier messages and earlier parts of that message. Comparing these snapshots
|
|
4
|
+
* detects edits to bytes authenticated by a kept signature, or missing blocks.
|
|
5
|
+
* Include reasoning without a visible signature too: a host may carry its
|
|
6
|
+
* provider signature in fields this helper does not interpret.
|
|
7
|
+
*/
|
|
8
|
+
export declare function recoveryReasoningPrefixes(messages: readonly unknown[], partsKey: "parts" | "content"): string[];
|
|
9
|
+
//# sourceMappingURL=recovery-reasoning-prefix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recovery-reasoning-prefix.d.ts","sourceRoot":"","sources":["../../src/shared/recovery-reasoning-prefix.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACrC,QAAQ,EAAE,SAAS,OAAO,EAAE,EAC5B,QAAQ,EAAE,OAAO,GAAG,SAAS,GAC9B,MAAM,EAAE,CAwBV"}
|
package/dist/shared/sqlite.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export declare function registerSlowWriteReporter(reporter: SlowWriteReporter):
|
|
|
57
57
|
* dropped.
|
|
58
58
|
*/
|
|
59
59
|
type SqliteDiagnosticSink = (message: string) => void;
|
|
60
|
-
export declare function registerSqliteDiagnosticSink(sink: SqliteDiagnosticSink): void;
|
|
60
|
+
export declare function registerSqliteDiagnosticSink(sink: SqliteDiagnosticSink, host?: () => string): void;
|
|
61
61
|
export type SqliteRuntime = "Bun" | "Node.js";
|
|
62
62
|
type SqliteModule = {
|
|
63
63
|
Database?: unknown;
|
|
@@ -95,7 +95,25 @@ export interface SqliteMemoryStats {
|
|
|
95
95
|
sqliteStatusApi: "unavailable";
|
|
96
96
|
connections: SqliteConnectionMemoryStats[];
|
|
97
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* Whether a write statement may change an existing `tags` row's identity
|
|
100
|
+
* (session, number, type, owner message, reasoning token count) or remove a
|
|
101
|
+
* row. Plain appends without an explicit `id`, and updates that assign only
|
|
102
|
+
* columns in {@link TAG_COLUMNS_OUTSIDE_IDENTITY}, cannot; everything else that
|
|
103
|
+
* names the table is treated as if it could, including DDL and multi-statement
|
|
104
|
+
* scripts. Erring towards true only costs a cache rebuild.
|
|
105
|
+
*/
|
|
106
|
+
export declare function mayChangeTagIdentity(sql: string): boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Counts executions, on any connection this process opened, of statements for
|
|
109
|
+
* which {@link mayChangeTagIdentity} is true. A cache built from `tags` stays
|
|
110
|
+
* valid for this process's own writes while the count is unchanged; commits by
|
|
111
|
+
* other connections show up in `PRAGMA data_version` instead.
|
|
112
|
+
*/
|
|
113
|
+
export declare function getTagIdentityWriteGeneration(): number;
|
|
98
114
|
export declare const Database: typeof BetterSqlite3;
|
|
115
|
+
/** The constructor path, without querying SQLite on the prompt thread. */
|
|
116
|
+
export declare function getSqliteDatabasePath(db: Database): string | null;
|
|
99
117
|
/**
|
|
100
118
|
* Read the SQLite memory bounds that Bun/node:sqlite expose without native FFI.
|
|
101
119
|
* SQLite's sqlite3_status()/sqlite3_db_status() counters are not surfaced by
|
|
@@ -172,5 +190,19 @@ export declare function withAsyncPrivilegedWriter<T>(db: Database, operation: ()
|
|
|
172
190
|
* flag, so an inner scope releasing does not drop permission out from under its caller.
|
|
173
191
|
*/
|
|
174
192
|
export declare function withPrivilegedWriter<T>(db: Database, operation: () => T): T;
|
|
193
|
+
export declare function indexCoordinationInput(): {
|
|
194
|
+
indexCoordination: SharedArrayBuffer;
|
|
195
|
+
indexOwner: number;
|
|
196
|
+
};
|
|
197
|
+
export declare function releaseIndexOwner(input: {
|
|
198
|
+
indexCoordination?: SharedArrayBuffer;
|
|
199
|
+
indexOwner?: number;
|
|
200
|
+
}): void;
|
|
201
|
+
/** One synchronous transaction per permit; release the permit before yielding. */
|
|
202
|
+
export declare function withIndexChunk<T>(input: {
|
|
203
|
+
indexCoordination?: SharedArrayBuffer;
|
|
204
|
+
indexOwner?: number;
|
|
205
|
+
}, operation: () => T): Promise<T>;
|
|
206
|
+
export declare function yieldIndexChunk(): Promise<void>;
|
|
175
207
|
export {};
|
|
176
208
|
//# sourceMappingURL=sqlite.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../src/shared/sqlite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;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1 @@
|
|
|
1
|
-
{"version":3,"file":"stable-json.d.ts","sourceRoot":"","sources":["../../src/shared/stable-json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,kBAAwB,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"stable-json.d.ts","sourceRoot":"","sources":["../../src/shared/stable-json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,kBAAwB,GAAG,MAAM,CAOpF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lamport's bakery mutex using unique contender files on a local filesystem.
|
|
3
|
+
* Exclusive creation and atomic replacement work on POSIX and Windows. A dead
|
|
4
|
+
* owner is removed by PID/start-time evidence, never by age: a paused live
|
|
5
|
+
* publisher must not lose its lock. Uncertain liveness refuses after the budget.
|
|
6
|
+
* Unique names mean reclaiming a dead ticket cannot unlink a successor's lock.
|
|
7
|
+
*/
|
|
8
|
+
export declare function withStorageFileMutex<T>(directory: string, work: () => T, timeoutMs?: number): T;
|
|
9
|
+
//# sourceMappingURL=storage-file-mutex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-file-mutex.d.ts","sourceRoot":"","sources":["../../src/shared/storage-file-mutex.ts"],"names":[],"mappings":"AAuDA;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,SAAS,SAAO,GAAG,CAAC,CAmE7F"}
|
|
@@ -6,6 +6,8 @@ export declare function shouldEnforcePrivateStoragePermissions(): boolean;
|
|
|
6
6
|
export declare function __resetStoragePrivatePermissionEnforcementForTests(): void;
|
|
7
7
|
/** Create storage directories with owner-only permissions at their creation. */
|
|
8
8
|
export declare function ensureStorageDirectorySync(directory: string, forcePrivate?: boolean, recursive?: boolean): void;
|
|
9
|
+
/** Replay-authorizing files require a private real directory, even after a permissive restore. */
|
|
10
|
+
export declare function ensurePrivateStorageDirectorySync(directory: string): void;
|
|
9
11
|
/** Create or replace a storage file using a private mode from the first byte. */
|
|
10
12
|
export declare function writeStorageFileSync(filePath: string, content: string | Uint8Array, options?: {
|
|
11
13
|
encoding?: BufferEncoding;
|
|
@@ -14,6 +16,10 @@ export declare function writeStorageFileSync(filePath: string, content: string |
|
|
|
14
16
|
}): void;
|
|
15
17
|
/** Write a private sibling then atomically publish it without a permissive temp window. */
|
|
16
18
|
export declare function writeStorageFileAtomicSync(filePath: string, content: string | Uint8Array, forcePrivate?: boolean): void;
|
|
19
|
+
/** Flush the namespace containing a safety-critical sidecar (POSIX only). */
|
|
20
|
+
export declare function syncStorageDirectorySync(directory: string): void;
|
|
21
|
+
/** Publish a safety record only after both its bytes and directory entry are durable. */
|
|
22
|
+
export declare function writeStorageFileDurableAtomicSync(filePath: string, content: string, afterTempSync?: () => void): void;
|
|
17
23
|
export declare function copyStorageFileSync(sourcePath: string, destinationPath: string, forcePrivate?: boolean): void;
|
|
18
24
|
export declare function copyStorageTreeSync(sourcePath: string, destinationPath: string, forcePrivate?: boolean): void;
|
|
19
25
|
export declare function openStorageFileSync(filePath: string, flags: string, forcePrivate?: boolean): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-permissions.d.ts","sourceRoot":"","sources":["../../src/shared/storage-permissions.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"storage-permissions.d.ts","sourceRoot":"","sources":["../../src/shared/storage-permissions.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAkB3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAMn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,KAAK,EAAE,MAAM,EAAE,YAAY,UAAQ,GAAG,MAAM,CAIjG;AAED,wBAAsB,qBAAqB,CACvC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GAAG,UAAU,EAC5B,YAAY,UAAQ,GACrB,OAAO,CAAC,IAAI,CAAC,CAIf;AAED,wBAAsB,2BAA2B,CAC7C,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,UAAQ,GAAG,WAAW,CAG5F;AAED,wBAAsB,4BAA4B,CAC9C,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,YAAY,UAAQ,uBAIvB;AAED,oFAAoF;AACpF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAoC5F"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type TemperatureMetadata = {
|
|
2
|
+
temperature?: boolean;
|
|
3
|
+
capabilities?: {
|
|
4
|
+
temperature?: boolean;
|
|
5
|
+
};
|
|
6
|
+
compat?: {
|
|
7
|
+
supportsTemperature?: boolean;
|
|
8
|
+
supportsSamplingParams?: boolean;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare function temperatureCapability(metadata: unknown): boolean | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Where a temperature decision came from: the host's own model metadata, the models.dev
|
|
14
|
+
* catalog OpenCode caches on disk, or nothing (which omits temperature).
|
|
15
|
+
*/
|
|
16
|
+
export type TemperatureSource = "host" | "catalog" | "none";
|
|
17
|
+
export interface TemperatureDecision {
|
|
18
|
+
supported: boolean | undefined;
|
|
19
|
+
source: TemperatureSource;
|
|
20
|
+
/** The models.dev entry (`provider/model`) when the catalog decided. */
|
|
21
|
+
entry?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Host metadata wins whenever it states a boolean. Only when the host is silent do we
|
|
25
|
+
* consult the cached models.dev catalog, matched by provider and model id.
|
|
26
|
+
*/
|
|
27
|
+
export declare function resolveTemperatureCapability(model: string, metadata: unknown): TemperatureDecision;
|
|
28
|
+
export declare function describeTemperatureDecision(model: string, decision: TemperatureDecision): string;
|
|
29
|
+
/** Log each model's decision once per process, and again only if the decision changes. */
|
|
30
|
+
export declare function logTemperatureDecision(model: string, decision: TemperatureDecision, log: (message: string, decision: TemperatureDecision) => void): void;
|
|
31
|
+
/** Only a positive capability permits sampling; reasoning alone is not evidence. */
|
|
32
|
+
export declare function subagentTemperature(model: string, metadata: unknown, temperature: number | undefined, log: (message: string, decision: TemperatureDecision) => void): number | undefined;
|
|
33
|
+
/** OpenCode 1 computes agent sampling before chat.params resolves the final model. */
|
|
34
|
+
export declare function applyHiddenSubagentTemperature(input: {
|
|
35
|
+
agent: string;
|
|
36
|
+
model?: TemperatureMetadata & {
|
|
37
|
+
providerID?: string;
|
|
38
|
+
id?: string;
|
|
39
|
+
};
|
|
40
|
+
}, output: {
|
|
41
|
+
temperature?: number;
|
|
42
|
+
}, log: (message: string) => void): void;
|
|
43
|
+
export declare const __temperatureTest: {
|
|
44
|
+
reset(): void;
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=subagent-temperature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subagent-temperature.d.ts","sourceRoot":"","sources":["../../src/shared/subagent-temperature.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,mBAAmB,GAAG;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACzC,MAAM,CAAC,EAAE;QAAE,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAAC,sBAAsB,CAAC,EAAE,OAAO,CAAA;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,CAAA;CAAE,EAChC,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAC/B,IAAI,CAWN;AAED,eAAO,MAAM,iBAAiB;aACjB,IAAI;CAIhB,CAAC"}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* tag is treated as belonging to a message that does not exist.
|
|
12
12
|
*/
|
|
13
13
|
export declare const TEXT_TAG_IDENTITY_MARKER = ":mc-text-v1:";
|
|
14
|
+
export declare const PI_FALLBACK_PREFIXES_JSON: string;
|
|
14
15
|
/**
|
|
15
16
|
* The owning message id of a content tag id. An id with neither suffix is
|
|
16
17
|
* returned unchanged: it already is the message id.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-owner-id.d.ts","sourceRoot":"","sources":["../../src/shared/tag-owner-id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AAKvD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAMlE"}
|
|
1
|
+
{"version":3,"file":"tag-owner-id.d.ts","sourceRoot":"","sources":["../../src/shared/tag-owner-id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AAKvD,eAAO,MAAM,yBAAyB,QAQrC,CAAC;AAKF;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAMlE"}
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
*/
|
|
47
47
|
import type { ContextDatabase } from "../features/magic-context/storage";
|
|
48
48
|
import { type Tagger } from "../features/magic-context/tagger";
|
|
49
|
+
import type { TagEntry } from "../features/magic-context/types";
|
|
49
50
|
import type { TagTarget } from "../hooks/magic-context/tag-messages";
|
|
50
51
|
import { TEXT_TAG_IDENTITY_MARKER } from "./tag-owner-id";
|
|
51
52
|
import type { Transcript } from "./transcript";
|
|
@@ -99,5 +100,13 @@ export interface TagTranscriptOptions {
|
|
|
99
100
|
export interface TagTranscriptResult {
|
|
100
101
|
targets: Map<number, TagTarget>;
|
|
101
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Bind durable drops to a saved request without tagging it again. Recovery must
|
|
105
|
+
* not allocate identities, inject prefixes, or write accounting while the store
|
|
106
|
+
* is failing. Reuse the normal targets so persisted modes render identically.
|
|
107
|
+
*/
|
|
108
|
+
export declare function buildPersistedDropTargets(transcript: Transcript, tags: readonly TagEntry[], options?: {
|
|
109
|
+
allowReasoningPrefixRewrite?: boolean;
|
|
110
|
+
}): Map<number, TagTarget>;
|
|
102
111
|
export declare function tagTranscript(sessionId: string, transcript: Transcript, tagger: Tagger, db: ContextDatabase, options?: TagTranscriptOptions): TagTranscriptResult;
|
|
103
112
|
//# sourceMappingURL=tag-transcript.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-transcript.d.ts","sourceRoot":"","sources":["../../src/shared/tag-transcript.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAQzE,OAAO,EAAwB,KAAK,MAAM,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"tag-transcript.d.ts","sourceRoot":"","sources":["../../src/shared/tag-transcript.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAQzE,OAAO,EAAwB,KAAK,MAAM,EAAE,MAAM,kCAAkC,CAAC;AACrF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAWhE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CA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