progmune-runtime 3.6.0 → 3.6.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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.6.1] — 2026-08-23
4
+
5
+ ### 文档
6
+
7
+ - README 社区章节直展双群二维码:微信(`assets/wechat-group.png`)+ WhatsApp(`assets/whatsapp-group.jpg`),中英双语同步
8
+ - 微信群码 7 天过期提醒 workflow 文案同步直展形态
9
+
3
10
  ## [3.6.0] — 2026-08-23
4
11
 
5
12
  ### 新增:SSG endState 检查(序列末尾资源未释放)
package/README.md CHANGED
@@ -197,10 +197,12 @@ SDK (src/sdk.ts) verify() → APPROVED / NEEDS_REVIEW / BLOCKED
197
197
  ## Community & Feedback
198
198
 
199
199
  <p align="center">
200
- <img src="https://raw.githubusercontent.com/shenlian19831109/progmune-runtime/main/assets/wechat-group.png" width="240" alt="Progmune user discussion group QR code" />
200
+ <img src="https://github.com/shenlian19831109/progmune-runtime/blob/main/assets/wechat-group.png?raw=true" width="200" alt="WeChat group QR code" />
201
+ &nbsp;&nbsp;&nbsp;
202
+ <img src="https://github.com/shenlian19831109/progmune-runtime/blob/main/assets/whatsapp-group.jpg?raw=true" width="200" alt="WhatsApp group QR code" />
201
203
  </p>
202
204
 
203
- Your feedback shapes Progmune. Scan the QR code to join the user discussion group (WeChat), or open a [GitHub Issue](https://github.com/shenlian19831109/progmune-runtime/issues) for bug reports, feature requests, and suggestions.
205
+ Your feedback shapes Progmune. Scan the QR code to join the user discussion group (WeChat / WhatsApp), or open a [GitHub Issue](https://github.com/shenlian19831109/progmune-runtime/issues) for bug reports, feature requests, and suggestions.
204
206
 
205
207
  ---
206
208
 
package/README.zh-CN.md CHANGED
@@ -196,10 +196,12 @@ SDK (src/sdk.ts) verify() → APPROVED / NEEDS_REVIEW / BLOCKED
196
196
  ## 社区与反馈
197
197
 
198
198
  <p align="center">
199
- <img src="https://raw.githubusercontent.com/shenlian19831109/progmune-runtime/main/assets/wechat-group.png" width="240" alt="Progmune 用户讨论群二维码" />
199
+ <img src="https://github.com/shenlian19831109/progmune-runtime/blob/main/assets/wechat-group.png?raw=true" width="200" alt="微信群二维码" />
200
+ &nbsp;&nbsp;&nbsp;
201
+ <img src="https://github.com/shenlian19831109/progmune-runtime/blob/main/assets/whatsapp-group.jpg?raw=true" width="200" alt="WhatsApp 群二维码" />
200
202
  </p>
201
203
 
202
- 你的意见塑造 Progmune。扫码加入用户讨论群(微信),或通过 [GitHub Issue](https://github.com/shenlian19831109/progmune-runtime/issues) 提交缺陷报告、功能需求与建议。
204
+ 你的意见塑造 Progmune。扫码加入用户讨论群(微信 / WhatsApp),或通过 [GitHub Issue](https://github.com/shenlian19831109/progmune-runtime/issues) 提交缺陷报告、功能需求与建议。
203
205
 
204
206
  ---
205
207
 
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ /**
3
+ * 跨函数调用序列构建(P4.6:跨函数传播)
4
+ *
5
+ * per-function 序列验证的扩展模型:
6
+ * - 入口函数(不被任何项目函数调用的函数)的调用序列做传递展开——
7
+ * 内联被调项目函数体(深度 ≤ MAX_DEPTH、环安全),外部调用(非项目函数)
8
+ * 原样保留给规则匹配层(别名/词段匹配)。
9
+ * - 非入口函数的孤立片段不再单独验证——违规归因到调用它的入口函数,
10
+ * 消除"helper 单独 close_file / read_file"类的片段误报。
11
+ *
12
+ * 边界(与 C 的 L3 同类,如实记录):展开是语法内联(调用链扁平化),
13
+ * 不做数据流/指针/分支分析;跨文件依赖 IR 的 calls[] 图。
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.buildCallSequences = buildCallSequences;
17
+ const MAX_DEPTH = 4;
18
+ /** 项目函数判定:有真实文件且非外部导入条目(external 条目无函数体可内联)。 */
19
+ function isProjectFn(f) {
20
+ return !f.external && !!f.file && f.file !== "(external)";
21
+ }
22
+ /**
23
+ * 从 IR 构建验证序列:入口函数展开 + 非入口抑制。
24
+ * @param ir - FunctionInfo 列表(TS 或 Python 提取器输出)
25
+ */
26
+ function buildCallSequences(ir) {
27
+ const fnMap = new Map();
28
+ for (const f of ir) {
29
+ if (isProjectFn(f))
30
+ fnMap.set(f.name, f);
31
+ }
32
+ // 被项目函数调用过的函数不是入口(其片段并入调用方展开序列)
33
+ const calledBy = new Set();
34
+ for (const f of ir) {
35
+ if (!isProjectFn(f))
36
+ continue;
37
+ for (const c of f.calls || []) {
38
+ if (fnMap.has(c))
39
+ calledBy.add(c);
40
+ }
41
+ }
42
+ const expand = (name, depth, visiting) => {
43
+ if (depth > MAX_DEPTH || visiting.has(name))
44
+ return [];
45
+ const fn = fnMap.get(name);
46
+ if (!fn)
47
+ return [name]; // 外部调用:保留给规则匹配
48
+ visiting.add(name);
49
+ const out = [];
50
+ for (const c of fn.calls || []) {
51
+ if (typeof c !== "string" || c.startsWith("__progmune_"))
52
+ continue;
53
+ out.push(...expand(c, depth + 1, visiting));
54
+ }
55
+ visiting.delete(name);
56
+ return out;
57
+ };
58
+ const sequences = [];
59
+ for (const f of ir) {
60
+ if (!isProjectFn(f))
61
+ continue;
62
+ if (calledBy.has(f.name))
63
+ continue; // 非入口:片段并入调用方
64
+ const calls = expand(f.name, 0, new Set());
65
+ if (calls.length === 0)
66
+ continue;
67
+ sequences.push({ calls, file: f.file, function: f.name });
68
+ }
69
+ return sequences;
70
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "progmune-runtime",
3
- "version": "3.6.0",
3
+ "version": "3.6.1",
4
4
  "description": "Progmune — AI Trust Decision Engine. Verify AI-generated code before it reaches production. Outputs APPROVED / NEEDS_REVIEW / BLOCKED with evidence.",
5
5
  "files": [
6
6
  "dist/",