@agimon-ai/doompi-autocompact 0.0.1-alpha.82 → 0.0.1-alpha.83
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/extensions/web.mjs
CHANGED
|
@@ -142,10 +142,10 @@ var autocompact_web_default$1 = defineSettingsSection(autocompactSettingsSection
|
|
|
142
142
|
var autocompact_web_default = defineSettingsSection(autocompactSettingsSection);
|
|
143
143
|
//#endregion
|
|
144
144
|
//#region generated/web.ts
|
|
145
|
-
const via = (identity, value) =>
|
|
145
|
+
const via = (identity, value) => value === void 0 ? void 0 : {
|
|
146
146
|
...identity,
|
|
147
147
|
...value
|
|
148
|
-
}
|
|
148
|
+
};
|
|
149
149
|
const webPlugin = defineWebPlugin({
|
|
150
150
|
id: "autocompact",
|
|
151
151
|
global: { get settingsSections() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.mjs","names":["settingAutocompact","settingAutocompact2"],"sources":["../../src/constants/autocompact.ts","../../src/types/autocompactSettings.ts","../../src/extensions/(frontend)/_lib/autocompactSettings.ts","../../src/extensions/(frontend)/setting/autocompact.web.ts","../../src/extensions/workspaces/(frontend)/setting/autocompact.web.ts","../../generated/web.ts"],"sourcesContent":["export const STATE_CUSTOM_TYPE = 'doom-autocompact-state';\nexport const CHECKPOINT_MESSAGE_TYPE = 'doom-autocompact-checkpoint';\nexport const CONTEXT_MESSAGE_TYPE = 'doom-autocompact-context';\nexport const RESUME_MESSAGE_TYPE = 'doom-autocompact-resume';\nexport const RUNTIME_STATE_MESSAGE_TYPE = 'doom-autocompact-runtime-state';\nexport const STATE_VERSION = 2;\n/** Retrying a malformed checkpoint costs a full summarization call per turn, so a pass that\n * keeps failing is abandoned instead of retried for the rest of the session. */\nexport const MAX_INVALID_CHECKPOINT_ATTEMPTS = 3;\n\nexport const COMPACTION_THRESHOLDS = {\n 1: { ratio: 0.5, capTokens: 200_000 },\n 2: { ratio: 0.75, capTokens: 500_000 },\n 3: { ratio: 0.95, capTokens: 800_000 },\n} as const;\n\nexport const CHECKPOINT_HEADINGS = [\n '## Goal',\n '## Constraints & Preferences',\n '## Progress',\n '### Done',\n '### In Progress',\n '### Blocked',\n '## Key Decisions',\n '## Next Steps',\n '## Critical Context',\n] as const;\n","/**\n * The autocompact settings, described once for both surfaces.\n *\n * The cockpit's settings page renders these, and the runtime reads the same key\n * paths out of `.doom/config.yaml`, so the ids, labels and key paths live here\n * rather than in either place.\n *\n * It lives under src/types because that is the one server root a browser bundle\n * may read, which also means it may import nothing outside this directory:\n * pulling the config package in for the thinking levels would drag a node\n * module into the page. They are spelled out instead, and a test asserts they\n * still match the parser's.\n */\n\nimport { COMPACTION_THRESHOLDS } from '../constants/autocompact';\n\nexport const AUTOCOMPACT_CONFIG_SECTION_ID = 'autocompact';\nconst AUTOCOMPACT_PATH = ['modes', AUTOCOMPACT_CONFIG_SECTION_ID] as const;\nconst THRESHOLDS_KEY = 'thresholds';\n\n/** Unset means the session's own model and thinking level do the summarizing. */\nconst INHERIT_MODEL = 'inherit the session model';\nconst INHERIT_THINKING = 'inherit';\n\n/** Mirrors DOOM_PLANNING_THINKING_LEVELS; pinned by this package's config test. */\nexport const AUTOCOMPACT_THINKING_LEVELS: readonly string[] = [\n 'off',\n 'minimal',\n 'low',\n 'medium',\n 'high',\n 'xhigh',\n 'max',\n];\n\n/** The parser accepts a real boolean too; the page can only write strings. */\nexport const AUTOCOMPACT_ENABLED_VALUES: readonly string[] = ['true', 'false'];\n\nexport interface AutocompactSettingShape {\n readonly id: string;\n readonly label: string;\n readonly keyPath: readonly string[];\n readonly placeholder: string;\n readonly detail: string;\n /** Present for a closed set; a renderer offers these rather than free text. */\n readonly options?: readonly string[];\n /** Offers the machine's authenticated models rather than free text. */\n readonly models?: boolean;\n}\n\nexport const AUTOCOMPACT_SETTING_SHAPES: readonly AutocompactSettingShape[] = [\n {\n id: 'enabled',\n label: 'enabled',\n keyPath: [...AUTOCOMPACT_PATH, 'enabled'],\n placeholder: 'on',\n detail: 'off leaves compaction to Pi. unset is on.',\n options: AUTOCOMPACT_ENABLED_VALUES,\n },\n {\n id: 'model',\n label: 'summarization model',\n keyPath: [...AUTOCOMPACT_PATH, 'model'],\n placeholder: INHERIT_MODEL,\n detail: 'model that writes the checkpoint summaries.',\n models: true,\n },\n {\n id: 'thinking',\n label: 'summarization thinking',\n keyPath: [...AUTOCOMPACT_PATH, 'thinking'],\n placeholder: INHERIT_THINKING,\n detail: 'thinking level appended to the summarization model.',\n options: AUTOCOMPACT_THINKING_LEVELS,\n },\n {\n id: 'thresholds.pass1',\n label: 'pass 1 threshold',\n keyPath: [...AUTOCOMPACT_PATH, THRESHOLDS_KEY, 'pass1'],\n placeholder: String(COMPACTION_THRESHOLDS[1].ratio),\n detail: 'fraction of the remaining context window at which the first pass fires.',\n },\n {\n id: 'thresholds.pass2',\n label: 'pass 2 threshold',\n keyPath: [...AUTOCOMPACT_PATH, THRESHOLDS_KEY, 'pass2'],\n placeholder: String(COMPACTION_THRESHOLDS[2].ratio),\n detail: 'second pass. a value below pass 1 is raised back to it.',\n },\n {\n id: 'thresholds.pass3',\n label: 'pass 3 threshold',\n keyPath: [...AUTOCOMPACT_PATH, THRESHOLDS_KEY, 'pass3'],\n placeholder: String(COMPACTION_THRESHOLDS[3].ratio),\n detail: 'last pass before Pi compacts natively. a value below pass 2 is raised back to it.',\n },\n];\n","import type { SettingsSectionContribution } from '@agimon-ai/doompi-core/web';\n\nimport { AUTOCOMPACT_CONFIG_SECTION_ID, AUTOCOMPACT_SETTING_SHAPES } from '../../../types/autocompactSettings';\n\n/**\n * The autocompact settings, as the cockpit's settings page renders them.\n *\n * Built from the same descriptor table the runtime resolves against, so the\n * page and the extension cannot disagree about which config key a field writes.\n * The host owns the scope switch and the writes; this only says what the fields\n * are.\n */\nexport const autocompactSettingsSection: SettingsSectionContribution = {\n id: AUTOCOMPACT_CONFIG_SECTION_ID,\n label: 'autocompact',\n detail: 'the model that writes checkpoint summaries, and when each compaction pass fires',\n order: 40,\n fields: AUTOCOMPACT_SETTING_SHAPES.map((shape) => ({\n id: shape.id,\n label: shape.label,\n // A model field offers the machine's authenticated models, which only the\n // host can enumerate; the rest are a closed set or free text.\n kind: shape.models === true || shape.options !== undefined ? ('select' as const) : ('text' as const),\n keyPath: shape.keyPath,\n detail: shape.detail,\n placeholder: shape.placeholder,\n ...(shape.models === true ? { optionsFrom: 'models' as const } : {}),\n ...(shape.options === undefined\n ? {}\n : { options: shape.options.map((option) => ({ value: option, label: option })) }),\n })),\n};\n","import { defineSettingsSection } from '@agimon-ai/doompi-core/web';\n\nimport { autocompactSettingsSection } from '../_lib/autocompactSettings';\n\nexport default defineSettingsSection(autocompactSettingsSection);\n","import { defineSettingsSection } from '@agimon-ai/doompi-core/web';\n\nimport { autocompactSettingsSection } from '../../../(frontend)/_lib/autocompactSettings';\n\nexport default defineSettingsSection(autocompactSettingsSection);\n","// Generated by @agimon-ai/doompi-build. Do not edit by hand.\nimport { defineWebPlugin, type WebPluginContributions } from '@agimon-ai/doompi-core/web';\n\nimport settingAutocompact from '../src/extensions/(frontend)/setting/autocompact.web';\nimport settingAutocompact2 from '../src/extensions/workspaces/(frontend)/setting/autocompact.web';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T
|
|
1
|
+
{"version":3,"file":"web.mjs","names":["settingAutocompact","settingAutocompact2"],"sources":["../../src/constants/autocompact.ts","../../src/types/autocompactSettings.ts","../../src/extensions/(frontend)/_lib/autocompactSettings.ts","../../src/extensions/(frontend)/setting/autocompact.web.ts","../../src/extensions/workspaces/(frontend)/setting/autocompact.web.ts","../../generated/web.ts"],"sourcesContent":["export const STATE_CUSTOM_TYPE = 'doom-autocompact-state';\nexport const CHECKPOINT_MESSAGE_TYPE = 'doom-autocompact-checkpoint';\nexport const CONTEXT_MESSAGE_TYPE = 'doom-autocompact-context';\nexport const RESUME_MESSAGE_TYPE = 'doom-autocompact-resume';\nexport const RUNTIME_STATE_MESSAGE_TYPE = 'doom-autocompact-runtime-state';\nexport const STATE_VERSION = 2;\n/** Retrying a malformed checkpoint costs a full summarization call per turn, so a pass that\n * keeps failing is abandoned instead of retried for the rest of the session. */\nexport const MAX_INVALID_CHECKPOINT_ATTEMPTS = 3;\n\nexport const COMPACTION_THRESHOLDS = {\n 1: { ratio: 0.5, capTokens: 200_000 },\n 2: { ratio: 0.75, capTokens: 500_000 },\n 3: { ratio: 0.95, capTokens: 800_000 },\n} as const;\n\nexport const CHECKPOINT_HEADINGS = [\n '## Goal',\n '## Constraints & Preferences',\n '## Progress',\n '### Done',\n '### In Progress',\n '### Blocked',\n '## Key Decisions',\n '## Next Steps',\n '## Critical Context',\n] as const;\n","/**\n * The autocompact settings, described once for both surfaces.\n *\n * The cockpit's settings page renders these, and the runtime reads the same key\n * paths out of `.doom/config.yaml`, so the ids, labels and key paths live here\n * rather than in either place.\n *\n * It lives under src/types because that is the one server root a browser bundle\n * may read, which also means it may import nothing outside this directory:\n * pulling the config package in for the thinking levels would drag a node\n * module into the page. They are spelled out instead, and a test asserts they\n * still match the parser's.\n */\n\nimport { COMPACTION_THRESHOLDS } from '../constants/autocompact';\n\nexport const AUTOCOMPACT_CONFIG_SECTION_ID = 'autocompact';\nconst AUTOCOMPACT_PATH = ['modes', AUTOCOMPACT_CONFIG_SECTION_ID] as const;\nconst THRESHOLDS_KEY = 'thresholds';\n\n/** Unset means the session's own model and thinking level do the summarizing. */\nconst INHERIT_MODEL = 'inherit the session model';\nconst INHERIT_THINKING = 'inherit';\n\n/** Mirrors DOOM_PLANNING_THINKING_LEVELS; pinned by this package's config test. */\nexport const AUTOCOMPACT_THINKING_LEVELS: readonly string[] = [\n 'off',\n 'minimal',\n 'low',\n 'medium',\n 'high',\n 'xhigh',\n 'max',\n];\n\n/** The parser accepts a real boolean too; the page can only write strings. */\nexport const AUTOCOMPACT_ENABLED_VALUES: readonly string[] = ['true', 'false'];\n\nexport interface AutocompactSettingShape {\n readonly id: string;\n readonly label: string;\n readonly keyPath: readonly string[];\n readonly placeholder: string;\n readonly detail: string;\n /** Present for a closed set; a renderer offers these rather than free text. */\n readonly options?: readonly string[];\n /** Offers the machine's authenticated models rather than free text. */\n readonly models?: boolean;\n}\n\nexport const AUTOCOMPACT_SETTING_SHAPES: readonly AutocompactSettingShape[] = [\n {\n id: 'enabled',\n label: 'enabled',\n keyPath: [...AUTOCOMPACT_PATH, 'enabled'],\n placeholder: 'on',\n detail: 'off leaves compaction to Pi. unset is on.',\n options: AUTOCOMPACT_ENABLED_VALUES,\n },\n {\n id: 'model',\n label: 'summarization model',\n keyPath: [...AUTOCOMPACT_PATH, 'model'],\n placeholder: INHERIT_MODEL,\n detail: 'model that writes the checkpoint summaries.',\n models: true,\n },\n {\n id: 'thinking',\n label: 'summarization thinking',\n keyPath: [...AUTOCOMPACT_PATH, 'thinking'],\n placeholder: INHERIT_THINKING,\n detail: 'thinking level appended to the summarization model.',\n options: AUTOCOMPACT_THINKING_LEVELS,\n },\n {\n id: 'thresholds.pass1',\n label: 'pass 1 threshold',\n keyPath: [...AUTOCOMPACT_PATH, THRESHOLDS_KEY, 'pass1'],\n placeholder: String(COMPACTION_THRESHOLDS[1].ratio),\n detail: 'fraction of the remaining context window at which the first pass fires.',\n },\n {\n id: 'thresholds.pass2',\n label: 'pass 2 threshold',\n keyPath: [...AUTOCOMPACT_PATH, THRESHOLDS_KEY, 'pass2'],\n placeholder: String(COMPACTION_THRESHOLDS[2].ratio),\n detail: 'second pass. a value below pass 1 is raised back to it.',\n },\n {\n id: 'thresholds.pass3',\n label: 'pass 3 threshold',\n keyPath: [...AUTOCOMPACT_PATH, THRESHOLDS_KEY, 'pass3'],\n placeholder: String(COMPACTION_THRESHOLDS[3].ratio),\n detail: 'last pass before Pi compacts natively. a value below pass 2 is raised back to it.',\n },\n];\n","import type { SettingsSectionContribution } from '@agimon-ai/doompi-core/web';\n\nimport { AUTOCOMPACT_CONFIG_SECTION_ID, AUTOCOMPACT_SETTING_SHAPES } from '../../../types/autocompactSettings';\n\n/**\n * The autocompact settings, as the cockpit's settings page renders them.\n *\n * Built from the same descriptor table the runtime resolves against, so the\n * page and the extension cannot disagree about which config key a field writes.\n * The host owns the scope switch and the writes; this only says what the fields\n * are.\n */\nexport const autocompactSettingsSection: SettingsSectionContribution = {\n id: AUTOCOMPACT_CONFIG_SECTION_ID,\n label: 'autocompact',\n detail: 'the model that writes checkpoint summaries, and when each compaction pass fires',\n order: 40,\n fields: AUTOCOMPACT_SETTING_SHAPES.map((shape) => ({\n id: shape.id,\n label: shape.label,\n // A model field offers the machine's authenticated models, which only the\n // host can enumerate; the rest are a closed set or free text.\n kind: shape.models === true || shape.options !== undefined ? ('select' as const) : ('text' as const),\n keyPath: shape.keyPath,\n detail: shape.detail,\n placeholder: shape.placeholder,\n ...(shape.models === true ? { optionsFrom: 'models' as const } : {}),\n ...(shape.options === undefined\n ? {}\n : { options: shape.options.map((option) => ({ value: option, label: option })) }),\n })),\n};\n","import { defineSettingsSection } from '@agimon-ai/doompi-core/web';\n\nimport { autocompactSettingsSection } from '../_lib/autocompactSettings';\n\nexport default defineSettingsSection(autocompactSettingsSection);\n","import { defineSettingsSection } from '@agimon-ai/doompi-core/web';\n\nimport { autocompactSettingsSection } from '../../../(frontend)/_lib/autocompactSettings';\n\nexport default defineSettingsSection(autocompactSettingsSection);\n","// Generated by @agimon-ai/doompi-build. Do not edit by hand.\nimport { defineWebPlugin, type WebPluginContributions } from '@agimon-ai/doompi-core/web';\n\nimport settingAutocompact from '../src/extensions/(frontend)/setting/autocompact.web';\nimport settingAutocompact2 from '../src/extensions/workspaces/(frontend)/setting/autocompact.web';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const webPlugin = defineWebPlugin({\n id: 'autocompact',\n global: {\n get settingsSections(): WebPluginContributions['settingsSections'] { return [via({ id: 'autocompact' }, settingAutocompact)]; },\n },\n workspace: {\n get settingsSections(): WebPluginContributions['settings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,sBAAsB,EAAE,CAAC,KAAK;GAClD,QAAQ;EACV;CC9EQ,CAAA,CAA2B,KAAK,WAAW;EACjD,IAAI,MAAM;EACV,OAAO,MAAM;EAGb,MAAM,MAAM,WAAW,QAAQ,MAAM,YAAY,KAAA,IAAa,WAAsB;EACpF,SAAS,MAAM;EACf,QAAQ,MAAM;EACd,aAAa,MAAM;EACnB,GAAI,MAAM,WAAW,OAAO,EAAE,aAAa,SAAkB,IAAI,CAAC;EAClE,GAAI,MAAM,YAAY,KAAA,IAClB,CAAC,IACD,EAAE,SAAS,MAAM,QAAQ,KAAK,YAAY;GAAE,OAAO;GAAQ,OAAO;EAAO,EAAE,EAAE;CACnF,EAAE;AACJ;;;AC3BA,IAAA,4BAAe,sBAAsB,0BAA0B;;;ACA/D,IAAA,0BAAe,sBAAsB,0BAA0B;;;ACE/D,MAAM,OAAU,UAAmC,UAChD,UAAU,KAAA,IAAY,KAAA,IAAY;CAAE,GAAG;CAAU,GAAI;AAAiB;AAEzE,MAAa,YAAY,gBAAgB;CACvC,IAAI;CACJ,QAAQ,EACN,IAAI,mBAA+D;EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,cAAc,GAAGA,yBAAkB,CAAC;CAAG,EAChI;CACA,WAAW,EACT,IAAI,mBAA+D;EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,cAAc,GAAGC,uBAAmB,CAAC;CAAG,EACjI;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/doompi-autocompact",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.83",
|
|
4
4
|
"description": "Iterative context compaction and checkpoint summaries for Pi and DoomPi agent sessions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -63,14 +63,14 @@
|
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@agimon-ai/doompi-config": "0.0.1-alpha.
|
|
67
|
-
"@agimon-ai/doompi-core": "0.0.1-alpha.
|
|
68
|
-
"@agimon-ai/doompi-telemetry": "0.0.1-alpha.
|
|
66
|
+
"@agimon-ai/doompi-config": "0.0.1-alpha.83",
|
|
67
|
+
"@agimon-ai/doompi-core": "0.0.1-alpha.84",
|
|
68
|
+
"@agimon-ai/doompi-telemetry": "0.0.1-alpha.80",
|
|
69
69
|
"@deepseek-ai/cordis": "4.0.2",
|
|
70
70
|
"minimatch": "10.2.6"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@agimon-ai/doompi-build": "0.0.1-alpha.
|
|
73
|
+
"@agimon-ai/doompi-build": "0.0.1-alpha.12",
|
|
74
74
|
"@earendil-works/pi-coding-agent": "0.87.1",
|
|
75
75
|
"@types/node": "26.6.1",
|
|
76
76
|
"@vitest/coverage-v8": "5.0.1",
|