polygram 0.28.0 → 0.28.2
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://anthropic.com/claude-code/plugin.schema.json",
|
|
3
3
|
"name": "polygram",
|
|
4
|
-
"version": "0.28.
|
|
4
|
+
"version": "0.28.2",
|
|
5
5
|
"description": "Telegram integration for Claude Code that preserves the OpenClaw per-chat session model. Migration target for OpenClaw users. Multi-bot, multi-chat, per-topic isolation; SQLite transcripts; inline-keyboard approvals. Bundles /polygram:status|logs|pair-code|approvals admin commands plus history (transcript queries) and polygram-send (out-of-turn IPC sends with file-upload validation) skills.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"telegram",
|
|
@@ -697,11 +697,13 @@ function validateProjectedConfig(config, materialized) {
|
|
|
697
697
|
}
|
|
698
698
|
|
|
699
699
|
function validateProjectedLayers(layers, materialized) {
|
|
700
|
-
if (!Array.isArray(layers) || ![1, 2].includes(layers.length)) {
|
|
700
|
+
if (!Array.isArray(layers) || ![1, 2, 3].includes(layers.length)) {
|
|
701
701
|
throw new Error('config layers are outside the owned layer set');
|
|
702
702
|
}
|
|
703
703
|
let userCount = 0;
|
|
704
704
|
let systemCount = 0;
|
|
705
|
+
let projectCount = 0;
|
|
706
|
+
const emptyConfigSha256 = digest({});
|
|
705
707
|
for (const layer of layers) {
|
|
706
708
|
if (
|
|
707
709
|
!layer
|
|
@@ -711,26 +713,40 @@ function validateProjectedLayers(layers, materialized) {
|
|
|
711
713
|
!== JSON.stringify(['configSha256', 'disabled', 'type', 'version'])
|
|
712
714
|
|| typeof layer.version !== 'string'
|
|
713
715
|
|| layer.version.length === 0
|
|
714
|
-
|| layer.disabled !== false
|
|
715
716
|
|| !SHA256_RE.test(layer.configSha256)
|
|
716
717
|
) {
|
|
717
718
|
throw new Error('config layer projection is malformed');
|
|
718
719
|
}
|
|
719
720
|
if (layer.type === 'user') {
|
|
720
721
|
userCount += 1;
|
|
721
|
-
if (
|
|
722
|
+
if (
|
|
723
|
+
layer.disabled !== false
|
|
724
|
+
|| layer.configSha256 !== digest(materialized.ownedConfig)
|
|
725
|
+
) {
|
|
722
726
|
throw new Error('owned user layer hash changed');
|
|
723
727
|
}
|
|
724
728
|
} else if (layer.type === 'system') {
|
|
725
729
|
systemCount += 1;
|
|
726
|
-
if (
|
|
730
|
+
if (
|
|
731
|
+
layer.disabled !== false
|
|
732
|
+
|| layer.configSha256 !== emptyConfigSha256
|
|
733
|
+
) {
|
|
727
734
|
throw new Error('system layer is not empty');
|
|
728
735
|
}
|
|
736
|
+
} else if (layer.type === 'project') {
|
|
737
|
+
projectCount += 1;
|
|
738
|
+
if (
|
|
739
|
+
layer.disabled !== true
|
|
740
|
+
|| layer.configSha256 !== emptyConfigSha256
|
|
741
|
+
|| layer.version !== `sha256:${emptyConfigSha256}`
|
|
742
|
+
) {
|
|
743
|
+
throw new Error('disabled project layer is not empty');
|
|
744
|
+
}
|
|
729
745
|
} else {
|
|
730
746
|
throw new Error('unexpected config layer is active');
|
|
731
747
|
}
|
|
732
748
|
}
|
|
733
|
-
if (userCount !== 1 || systemCount > 1) {
|
|
749
|
+
if (userCount !== 1 || systemCount > 1 || projectCount > 1) {
|
|
734
750
|
throw new Error('owned user layer is not unique');
|
|
735
751
|
}
|
|
736
752
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polygram",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.2",
|
|
4
4
|
"description": "Telegram daemon for Claude Code that preserves the OpenClaw per-chat session model. Migration path for OpenClaw users moving to Claude Code.",
|
|
5
5
|
"main": "lib/ipc/client.js",
|
|
6
6
|
"bin": {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@anthropic-ai/claude-agent-sdk": "0.2.123",
|
|
65
65
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
66
|
-
"@shumkov/orchestra": "0.10.
|
|
66
|
+
"@shumkov/orchestra": "0.10.1",
|
|
67
67
|
"better-sqlite3": "^12.9.0",
|
|
68
68
|
"grammy": "^1.42.0",
|
|
69
69
|
"markdown-it": "^14.1.1",
|