@magic6/dsh-compaction-policy-engine 0.0.0-stage → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +75 -0
- package/LICENSE +21 -0
- package/README.md +353 -2
- package/README.zh-CN.md +308 -0
- package/cordis.patch.yml +61 -0
- package/docs/DESIGN.md +161 -0
- package/examples/standard-with-policy/cordis.patch.yml +139 -0
- package/examples/standard-with-policy/package.json +12 -0
- package/lib/client-policy.js +192 -0
- package/lib/client.js +1791 -0
- package/lib/companion.js +13 -0
- package/lib/engine.js +19 -0
- package/lib/index.js +1384 -0
- package/lib/policy.js +608 -0
- package/lib/settings-file.js +396 -0
- package/lib/settings.js +138 -0
- package/package.json +70 -4
package/lib/companion.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings-companion entry point for dsh-compaction-policy-engine.
|
|
3
|
+
*
|
|
4
|
+
* What the **bare package name** resolves to. It publishes the
|
|
5
|
+
* `compaction-control` settings section and the standing "compaction is
|
|
6
|
+
* automatic" prompt rule, and claims no service — so mounting it is inert with
|
|
7
|
+
* respect to compaction itself, and it can never mount an engine (see
|
|
8
|
+
* `./engine.js` for why that matters).
|
|
9
|
+
*
|
|
10
|
+
* @module dsh-compaction-policy-engine/companion
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export { CompactionControlSettings as default, CompactionControlSettings } from './index.js';
|
package/lib/engine.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Engine entry point for dsh-compaction-policy-engine.
|
|
3
|
+
*
|
|
4
|
+
* The package needs two independently mountable halves, and the Cordis loader
|
|
5
|
+
* cannot pick one: it resolves a row's module as `exports.default ?? exports` and
|
|
6
|
+
* consults no entry option. The halves are therefore split across specifiers:
|
|
7
|
+
*
|
|
8
|
+
* - `dsh-compaction-policy-engine` → `./companion.js` (settings + prompt rule)
|
|
9
|
+
* - `dsh-compaction-policy-engine/engine` → this file (the compaction engine)
|
|
10
|
+
*
|
|
11
|
+
* The bare name must stay the companion: the host plane is where the browser
|
|
12
|
+
* bundle anchor lives, and that row must never mount a second engine — the host
|
|
13
|
+
* plane's `agent/pre-step` sees every preset's engine by bubbling, so a host
|
|
14
|
+
* engine would run *beside* the preset one and the lower threshold would win.
|
|
15
|
+
*
|
|
16
|
+
* @module dsh-compaction-policy-engine/engine
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export { CompactionControlEngine as default, CompactionControlEngine } from './index.js';
|