specmodule 0.1.0__tar.gz → 0.1.1__tar.gz
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.
- {specmodule-0.1.0/specmodule.egg-info → specmodule-0.1.1}/PKG-INFO +5 -2
- {specmodule-0.1.0 → specmodule-0.1.1}/README.md +4 -1
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/cli.py +1 -1
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/scaffold.py +9 -9
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/store.py +9 -6
- {specmodule-0.1.0 → specmodule-0.1.1}/pyproject.toml +1 -1
- {specmodule-0.1.0 → specmodule-0.1.1/specmodule.egg-info}/PKG-INFO +5 -2
- {specmodule-0.1.0 → specmodule-0.1.1}/LICENSE +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/llm/__init__.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/llm/client.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/llm/config.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/__init__.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/align.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/builtins.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/checkpoint.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/command.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/config.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/consistency.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/entry.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/events.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/feed.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/graph_builder.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/harness.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/loader.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/module.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/outputfmt.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/prompt.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/query.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/registry.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/spec.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/status.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/submodule.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/templates/builtin/codereview.json +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/templates/builtin/docwrite.json +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/templates/builtin/summarize.json +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/templates/builtin/translate.json +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/module_harness/translator.py +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/setup.cfg +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/specmodule.egg-info/SOURCES.txt +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/specmodule.egg-info/dependency_links.txt +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/specmodule.egg-info/entry_points.txt +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/specmodule.egg-info/requires.txt +0 -0
- {specmodule-0.1.0 → specmodule-0.1.1}/specmodule.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: specmodule
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: 可审计、可调试、可完全掌控的 LLM 使用框架(tickflow + llm + module_harness)
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: llm,workflow,petri-net,agent
|
|
@@ -304,7 +304,10 @@ EventBus 提供两层事件——流程级(tickflow hooks:`on_fire`、`on_ti
|
|
|
304
304
|
(`pyproject.toml` + `specmodule` CLI 随库分发)、module-user-store 全系列
|
|
305
305
|
(store 家目录 / 配置回退链 / 统一枚举 run 打通 / CLI 管理面 setup-install-list-info-
|
|
306
306
|
uninstall-publish-update / init 目录形态)、独立线(嵌入式验证 demo + stdlib 可视化
|
|
307
|
-
feed
|
|
307
|
+
feed)。**0.1.1(2026-08-23)**:`init --as-dir` 脚手架模板花括号渲染修复(生成物可直接
|
|
308
|
+
`run --mock`);git URL 来源安装完善——clone 工作树的 `.git` 不落 store、`update`
|
|
309
|
+
脏检测不再被版本库噪音干扰(git 来源仓库根须为 pack 目录:`module.json` 在根)。
|
|
310
|
+
待做:M2 实践线(store 真实验收)、收口 API 稳定化、生态项目(TUI/MCP/Web)。
|
|
308
311
|
完整进度与路线图见 [module-roadmap.md](docs/progress/module-roadmap.md)。
|
|
309
312
|
|
|
310
313
|
## 开发原则
|
|
@@ -276,7 +276,10 @@ EventBus 提供两层事件——流程级(tickflow hooks:`on_fire`、`on_ti
|
|
|
276
276
|
(`pyproject.toml` + `specmodule` CLI 随库分发)、module-user-store 全系列
|
|
277
277
|
(store 家目录 / 配置回退链 / 统一枚举 run 打通 / CLI 管理面 setup-install-list-info-
|
|
278
278
|
uninstall-publish-update / init 目录形态)、独立线(嵌入式验证 demo + stdlib 可视化
|
|
279
|
-
feed
|
|
279
|
+
feed)。**0.1.1(2026-08-23)**:`init --as-dir` 脚手架模板花括号渲染修复(生成物可直接
|
|
280
|
+
`run --mock`);git URL 来源安装完善——clone 工作树的 `.git` 不落 store、`update`
|
|
281
|
+
脏检测不再被版本库噪音干扰(git 来源仓库根须为 pack 目录:`module.json` 在根)。
|
|
282
|
+
待做:M2 实践线(store 真实验收)、收口 API 稳定化、生态项目(TUI/MCP/Web)。
|
|
280
283
|
完整进度与路线图见 [module-roadmap.md](docs/progress/module-roadmap.md)。
|
|
281
284
|
|
|
282
285
|
## 开发原则
|
|
@@ -1463,7 +1463,7 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
1463
1463
|
p_setup.set_defaults(func=_cmd_setup)
|
|
1464
1464
|
|
|
1465
1465
|
p_publish = sub.add_parser(
|
|
1466
|
-
"publish", help="发布模块到 store
|
|
1466
|
+
"publish", help="发布模块到 store(目录形态校验复制;单文件形态经 SubModule 转化)"
|
|
1467
1467
|
)
|
|
1468
1468
|
p_publish.add_argument("name", help="模块名")
|
|
1469
1469
|
p_publish.add_argument("--from", dest="from_dir", default=".", help="发布源目录(默认 cwd)")
|
|
@@ -65,7 +65,7 @@ README_MD = """# {name}
|
|
|
65
65
|
python -m module_harness.cli run --module {name} --mock
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
输出结尾应含 `回显: {
|
|
68
|
+
输出结尾应含 `回显: {"message": "你好,世界"}` 一类的节点摘要。
|
|
69
69
|
|
|
70
70
|
## 真实 LLM 运行
|
|
71
71
|
|
|
@@ -75,7 +75,7 @@ python -m module_harness.cli run --module {name} --mock
|
|
|
75
75
|
3. 运行:
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
|
-
python -m module_harness.cli run --module {name} --spec '{
|
|
78
|
+
python -m module_harness.cli run --module {name} --spec '{"message": "..."}'
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
## 配置分工
|
|
@@ -305,19 +305,19 @@ from __future__ import annotations
|
|
|
305
305
|
|
|
306
306
|
def greet(view):
|
|
307
307
|
"""回显上游输入(tasklist 固定:无上游依赖,直接输出)。"""
|
|
308
|
-
return {
|
|
308
|
+
return {"message": "hello from {name}"}
|
|
309
309
|
'''
|
|
310
310
|
|
|
311
311
|
DIR_HARNESS_EXAMPLE = '''\
|
|
312
312
|
"""{name} harness 组件示例(JSON 文件):LLM 调用节点,三层 prompt。
|
|
313
313
|
|
|
314
314
|
复制为 ``harnesses/<名>.json`` 并在 module.json 的 tasklist 中引用:
|
|
315
|
-
{
|
|
315
|
+
{
|
|
316
316
|
"type": "harness",
|
|
317
317
|
"harness": "<名>",
|
|
318
|
-
"inputs": {
|
|
319
|
-
"outputformat": {
|
|
320
|
-
}
|
|
318
|
+
"inputs": {"text": "{spec.message}"},
|
|
319
|
+
"outputformat": {"type": "text"}
|
|
320
|
+
}
|
|
321
321
|
"""
|
|
322
322
|
|
|
323
323
|
'''
|
|
@@ -333,8 +333,8 @@ DIR_README = """# {name}
|
|
|
333
333
|
运行:
|
|
334
334
|
|
|
335
335
|
```bash
|
|
336
|
-
specmodule run --module {name} --spec '{
|
|
337
|
-
specmodule publish {name} --from .
|
|
336
|
+
specmodule run --module {name} --spec '{"message": "hi"}' --mock
|
|
337
|
+
specmodule publish {name} --from .
|
|
338
338
|
```
|
|
339
339
|
"""
|
|
340
340
|
|
|
@@ -317,12 +317,14 @@ def install_pack(
|
|
|
317
317
|
)
|
|
318
318
|
import shutil
|
|
319
319
|
|
|
320
|
-
|
|
320
|
+
# git URL 来源的 src 是 clone 工作树:.git 是版本库元数据,不属于模块
|
|
321
|
+
# 内容——不复制、不写入 manifest(否则 update 哈希比对被 .git 噪音污染)。
|
|
322
|
+
shutil.copytree(src, dest, ignore=shutil.ignore_patterns(".git"))
|
|
321
323
|
try:
|
|
322
324
|
files = {
|
|
323
325
|
str(p.relative_to(dest)): file_sha256(p)
|
|
324
326
|
for p in dest.rglob("*")
|
|
325
|
-
if p.is_file()
|
|
327
|
+
if p.is_file() and ".git" not in p.parts
|
|
326
328
|
}
|
|
327
329
|
manifest_path = manifests_dir() / f"{target_name}.json"
|
|
328
330
|
manifest_path.write_text(json.dumps({
|
|
@@ -405,11 +407,11 @@ def check_updates(name: str, src: Path) -> dict[str, Any]:
|
|
|
405
407
|
untracked: list[str] = []
|
|
406
408
|
local_modified: list[str] = []
|
|
407
409
|
|
|
408
|
-
#
|
|
410
|
+
# 来源侧(.git 为 clone 工作树元数据,与模块内容无关——忽略)
|
|
409
411
|
src_files = {
|
|
410
412
|
str(p.relative_to(src)): p
|
|
411
413
|
for p in src.rglob("*")
|
|
412
|
-
if p.is_file()
|
|
414
|
+
if p.is_file() and ".git" not in p.parts
|
|
413
415
|
}
|
|
414
416
|
for rel, sp in src_files.items():
|
|
415
417
|
if rel in recorded:
|
|
@@ -457,14 +459,15 @@ def apply_update(name: str, src: Path) -> None:
|
|
|
457
459
|
if dest.exists():
|
|
458
460
|
shutil.move(str(dest), str(backup))
|
|
459
461
|
try:
|
|
460
|
-
|
|
462
|
+
# .git 同 install:clone 元数据不落 store
|
|
463
|
+
shutil.copytree(src, dest, ignore=shutil.ignore_patterns(".git"))
|
|
461
464
|
shutil.rmtree(backup, ignore_errors=True)
|
|
462
465
|
old = load_manifest(name) or {}
|
|
463
466
|
manifest = validate_pack_dir(src)
|
|
464
467
|
files = {
|
|
465
468
|
str(p.relative_to(dest)): file_sha256(p)
|
|
466
469
|
for p in dest.rglob("*")
|
|
467
|
-
if p.is_file()
|
|
470
|
+
if p.is_file() and ".git" not in p.parts
|
|
468
471
|
}
|
|
469
472
|
mp = manifests_dir() / f"{name}.json"
|
|
470
473
|
mp.write_text(json.dumps({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: specmodule
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: 可审计、可调试、可完全掌控的 LLM 使用框架(tickflow + llm + module_harness)
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: llm,workflow,petri-net,agent
|
|
@@ -304,7 +304,10 @@ EventBus 提供两层事件——流程级(tickflow hooks:`on_fire`、`on_ti
|
|
|
304
304
|
(`pyproject.toml` + `specmodule` CLI 随库分发)、module-user-store 全系列
|
|
305
305
|
(store 家目录 / 配置回退链 / 统一枚举 run 打通 / CLI 管理面 setup-install-list-info-
|
|
306
306
|
uninstall-publish-update / init 目录形态)、独立线(嵌入式验证 demo + stdlib 可视化
|
|
307
|
-
feed
|
|
307
|
+
feed)。**0.1.1(2026-08-23)**:`init --as-dir` 脚手架模板花括号渲染修复(生成物可直接
|
|
308
|
+
`run --mock`);git URL 来源安装完善——clone 工作树的 `.git` 不落 store、`update`
|
|
309
|
+
脏检测不再被版本库噪音干扰(git 来源仓库根须为 pack 目录:`module.json` 在根)。
|
|
310
|
+
待做:M2 实践线(store 真实验收)、收口 API 稳定化、生态项目(TUI/MCP/Web)。
|
|
308
311
|
完整进度与路线图见 [module-roadmap.md](docs/progress/module-roadmap.md)。
|
|
309
312
|
|
|
310
313
|
## 开发原则
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|