omp-fabric 1.24.2 → 1.25.1
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 +17 -0
- package/README.md +1 -1
- package/dist/chunks/{chunk-NCPJZXLM.js → chunk-NOZBB266.js} +8 -4
- package/dist/chunks/chunk-NOZBB266.js.map +7 -0
- package/dist/core/skill-prompt.d.ts.map +1 -1
- package/dist/fabric-runtime-state.js +2 -3
- package/dist/fabric-runtime-state.js.map +2 -2
- package/dist/host-compatibility.d.ts +1 -1
- package/dist/host-compatibility.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +2 -2
- package/dist/judgment/host-judge.d.ts.map +1 -1
- package/dist/providers/omp-session-scope.d.ts.map +1 -1
- package/dist/ui/conversation-chrome.d.ts.map +1 -1
- package/dist/ui/conversation-chrome.js +1 -1
- package/dist/ui/conversation.js +1 -1
- package/docs/certification.md +1 -1
- package/package.json +11 -11
- package/dist/chunks/chunk-NCPJZXLM.js.map +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-judge.d.ts","sourceRoot":"","sources":["../../src/judgment/host-judge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"host-judge.d.ts","sourceRoot":"","sources":["../../src/judgment/host-judge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAUD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAU,SAAS,gBAAgB,KAAG,OAAO,CAAC,KAAK,GAAG,SAAS,CAe3F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"omp-session-scope.d.ts","sourceRoot":"","sources":["../../src/providers/omp-session-scope.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"omp-session-scope.d.ts","sourceRoot":"","sources":["../../src/providers/omp-session-scope.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAoBvE,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,eAAe,CAAC;IACzB,OAAO,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,2GAA2G;AAC3G,eAAO,MAAM,WAAW,GAAI,cAAc,MAAM,MAAM,GAAG,IAAI,KAAG,WAAW,GAAG,SAO7E,CAAC;AAKF,6GAA6G;AAC7G,eAAO,MAAM,uBAAuB,GAClC,MAAM,WAAW,GAAG,SAAS,EAC7B,eAAc,MAAM,OAA0B,KAC7C,MAAM,CAAC,MAAM,EAAE,OAAO,CAGvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-chrome.d.ts","sourceRoot":"","sources":["../../src/ui/conversation-chrome.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAGvD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAElE,MAAM,WAAW,4BAA4B;IAC3C,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,4FAA4F;AAC5F,wBAAsB,0BAA0B,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,GAAG,OAAO,CAAC,4BAA4B,CAAC,
|
|
1
|
+
{"version":3,"file":"conversation-chrome.d.ts","sourceRoot":"","sources":["../../src/ui/conversation-chrome.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAGvD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAElE,MAAM,WAAW,4BAA4B;IAC3C,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,4FAA4F;AAC5F,wBAAsB,0BAA0B,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAgB9I;AAQD,sFAAsF;AACtF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,wBAAwB,GAAG,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CA2BtH"}
|
package/dist/ui/conversation.js
CHANGED
package/docs/certification.md
CHANGED
|
@@ -23,7 +23,7 @@ The package command builds `dist/` first, then runs `scripts/certify-context.mjs
|
|
|
23
23
|
|
|
24
24
|
The harness builds a persisted session through OMP's `SessionManager`. Messages and compactions go in through its public methods. The active parent-linked branch comes back through `getBranch()`. Under deterministic settings (`contextWindow=64`, `reserveTokens=63`, `keepRecentTokens=1`), the harness performs exactly 100 Fabric compactions. Before every hook event it sums the host's `estimateTokens` over `SessionManager.buildSessionContext().messages`, applies `shouldCompact`, and requires `prepareCompaction` to return a preparation. It then invokes the callback registered by `registerCompactionHook` with OMP's `SessionBeforeCompactEvent` shape: `type`, `preparation`, `branchEntries`, an optional `customInstructions`, and `signal`. That event carries neither a compaction reason nor a retry flag, so certification asserts nothing about either.
|
|
25
25
|
|
|
26
|
-
The host package is `@oh-my-pi/pi-coding-agent`. Certification reads the installed version from its own `package.json` and checks it against the range `omp-fabric` declares in `peerDependencies`, so no certified version is hard-coded; a host outside the declared range aborts the run and reports both the range and the resolved version and path. Each function is then resolved from a supported entry point, and a missing one aborts the run naming the entry point: `SessionManager` and `buildSessionContext` from the package root, `estimateTokens` from `@oh-my-pi/pi-coding-agent/extensibility/legacy-pi-coding-agent-shim`, and `prepareCompaction` plus `shouldCompact` from `@oh-my-pi/pi-agent-core/compaction`. At the pinned 18.1
|
|
26
|
+
The host package is `@oh-my-pi/pi-coding-agent`. Certification reads the installed version from its own `package.json` and checks it against the range `omp-fabric` declares in `peerDependencies`, so no certified version is hard-coded; a host outside the declared range aborts the run and reports both the range and the resolved version and path. Each function is then resolved from a supported entry point, and a missing one aborts the run naming the entry point: `SessionManager` and `buildSessionContext` from the package root, `estimateTokens` from `@oh-my-pi/pi-coding-agent/extensibility/legacy-pi-coding-agent-shim`, and `prepareCompaction` plus `shouldCompact` from `@oh-my-pi/pi-agent-core/compaction`. At the pinned 18.3.1 host the package root exports `SessionManager` and `buildSessionContext`, does not export `prepareCompaction` or `shouldCompact`, and has no `buildContextEntries` export at all; the report records each of those observations under `hostApi.rootExports`. No public API supplies a preparation unless an `AgentSession` runs with a model, so certification makes no claim past that.
|
|
27
27
|
|
|
28
28
|
Every persisted summary carries a cycle-unique `PRIOR_SUMMARY_POISON_991_…` suffix inside the actual `CompactionEntry`. On the next cycle, OMP's preparation has to expose that exact stored previous summary. A proxy around the event preparation records whether the registered Fabric callback reads `previousSummary`. The result derives from those accesses. Fabric must leave the value unread and keep its poison out of anything it emits. No step converts a summary into a user message by hand.
|
|
29
29
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omp-fabric",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.25.1",
|
|
4
4
|
"description": "A programmable tool and agent runtime for Oh My Pi (OMP)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -81,10 +81,10 @@
|
|
|
81
81
|
"image": "https://raw.githubusercontent.com/tickernelz/omp-fabric/main/media/banner.svg"
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@oh-my-pi/omptype": "18.
|
|
85
|
-
"@oh-my-pi/pi-agent-core": "18.
|
|
86
|
-
"@oh-my-pi/pi-ai": "18.
|
|
87
|
-
"@oh-my-pi/pi-utils": "18.
|
|
84
|
+
"@oh-my-pi/omptype": "18.3.1",
|
|
85
|
+
"@oh-my-pi/pi-agent-core": "18.3.1",
|
|
86
|
+
"@oh-my-pi/pi-ai": "18.3.1",
|
|
87
|
+
"@oh-my-pi/pi-utils": "18.3.1",
|
|
88
88
|
"@jitl/quickjs-singlefile-mjs-release-sync": "^0.32.0",
|
|
89
89
|
"@shikijs/langs": "4.4.3",
|
|
90
90
|
"@shikijs/themes": "4.4.3",
|
|
@@ -97,14 +97,14 @@
|
|
|
97
97
|
"yaml": "^2.9.0"
|
|
98
98
|
},
|
|
99
99
|
"peerDependencies": {
|
|
100
|
-
"@oh-my-pi/pi-coding-agent": ">=18.
|
|
101
|
-
"@oh-my-pi/pi-natives": ">=18.
|
|
102
|
-
"@oh-my-pi/pi-tui": ">=18.
|
|
100
|
+
"@oh-my-pi/pi-coding-agent": ">=18.3.0",
|
|
101
|
+
"@oh-my-pi/pi-natives": ">=18.3.0",
|
|
102
|
+
"@oh-my-pi/pi-tui": ">=18.3.0"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
|
-
"@oh-my-pi/pi-coding-agent": "18.
|
|
106
|
-
"@oh-my-pi/pi-natives": "18.
|
|
107
|
-
"@oh-my-pi/pi-tui": "18.
|
|
105
|
+
"@oh-my-pi/pi-coding-agent": "18.3.1",
|
|
106
|
+
"@oh-my-pi/pi-natives": "18.3.1",
|
|
107
|
+
"@oh-my-pi/pi-tui": "18.3.1",
|
|
108
108
|
"@types/cross-spawn": "^6.0.6",
|
|
109
109
|
"@types/node": "^26.1.2",
|
|
110
110
|
"esbuild": "^0.25.12",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/ui/conversation-chrome.ts"],
|
|
4
|
-
"sourcesContent": ["import { homedir } from \"node:os\";\nimport path from \"node:path\";\nimport type { Theme } from \"@oh-my-pi/pi-coding-agent\";\nimport { Ellipsis, truncateToWidth, visibleWidth } from \"@oh-my-pi/pi-tui\";\nimport { formatTokens, safeText } from \"./format.js\";\nimport type { FabricConversationTarget } from \"./conversation.js\";\n\nexport interface FabricConversationAppearance {\n editorPaddingX: number;\n outputPad: 0 | 1;\n codeBlockIndent?: string;\n hideThinkingBlock?: boolean;\n showImages?: boolean;\n imageWidthCells?: number;\n}\n\n/** Read OMP appearance settings; cwd and agentDir apply only to trusted project loading. */\nexport async function readConversationAppearance(cwd: string, agentDir: string, projectTrusted: boolean): Promise<FabricConversationAppearance> {\n const { Settings } = await import(\"@oh-my-pi/pi-coding-agent/config/settings\");\n const settings = projectTrusted\n ? await Settings.loadReadOnly({ cwd, agentDir })\n : Settings.isolated();\n return {\n editorPaddingX: 0,\n outputPad: 0,\n codeBlockIndent: \" \",\n hideThinkingBlock: settings.get(\"hideThinkingBlock\") === true,\n showImages: settings.get(\"terminal.showImages\") === true,\n };\n}\n\nconst footerPath = (cwd: string): string => {\n const home = homedir();\n if (cwd === home) return \"~\";\n return cwd.startsWith(`${home}${path.sep}`) ? `~${cwd.slice(home.length)}` : cwd;\n};\n\n/** Native-shaped footer backed by this participant, never by Main's session stats. */\nexport function conversationFooter(target: FabricConversationTarget | undefined, theme: Theme, width: number): string[] {\n if (!target || width <= 0) return [];\n const location = target.cwd ? footerPath(target.cwd) : \"cwd unavailable\";\n const branch = target.branch ? ` (${target.branch})` : \"\";\n const pwd = safeText(`${location}${branch} \u2022 ${target.name}`);\n const stats = [safeText(target.status)];\n if (target.usage) {\n const usage = target.usage;\n // Agent usage is run-scoped; actor values describe the current/last activation.\n stats.push(\"run\", `\u2191${formatTokens(usage.input)}`, `\u2193${formatTokens(usage.output)}`);\n if (usage.cacheRead > 0) stats.push(`R${formatTokens(usage.cacheRead)}`);\n if (usage.cacheWrite > 0) stats.push(`W${formatTokens(usage.cacheWrite)}`);\n if (Number.isFinite(usage.cost)) stats.push(`$${usage.cost.toFixed(3)}`);\n } else {\n stats.push(\"usage unavailable\");\n }\n // Cumulative run tokens are not current context occupancy. Do not invent a percentage.\n stats.push(target.contextWindow ? `?/${formatTokens(target.contextWindow)} ctx` : \"ctx ?\");\n const model = safeText(target.model ?? `${target.runner ?? \"\"} model unavailable`).trim();\n const thinking = target.thinking ? ` \u2022 ${safeText(target.thinking === \"off\" ? \"thinking off\" : target.thinking)}` : \"\";\n const left = truncateToWidth(stats.join(\" \"), width, Ellipsis.Unicode);\n const right = truncateToWidth(`${model}${thinking}`, Math.max(0, width - visibleWidth(left) - 2), \"\");\n const gap = \" \".repeat(Math.max(0, width - visibleWidth(left) - visibleWidth(right)));\n return [\n truncateToWidth(theme.fg(\"dim\", pwd), width, Ellipsis.Unicode),\n theme.fg(\"dim\", `${left}${gap}${right}`),\n ];\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;AAAA,SAAS,eAAe;AACxB,OAAO,UAAU;AAEjB,SAAS,UAAU,iBAAiB,oBAAoB;AAcxD,eAAsB,2BAA2B,KAAa,UAAkB,gBAAgE;AAC9I,QAAM,EAAE,SAAS,IAAI,MAAM,OAAO,2CAA2C;AAC7E,QAAM,WAAW,iBACb,MAAM,SAAS,aAAa,EAAE,KAAK,SAAS,CAAC,IAC7C,SAAS,SAAS;AACtB,SAAO;AAAA,IACL,gBAAgB;AAAA,IAChB,WAAW;AAAA,IACX,iBAAiB;AAAA,IAC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