pasm-framework 0.5.3__tar.gz → 0.5.4__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.
Files changed (38) hide show
  1. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/PKG-INFO +2 -2
  2. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/__init__.py +1 -1
  3. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/service.py +30 -10
  4. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework.egg-info/PKG-INFO +2 -2
  5. pasm_framework-0.5.4/pasm_framework.egg-info/requires.txt +1 -0
  6. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pyproject.toml +2 -2
  7. pasm_framework-0.5.3/pasm_framework.egg-info/requires.txt +0 -1
  8. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/LICENSE +0 -0
  9. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/README.md +0 -0
  10. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/__main__.py +0 -0
  11. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/adapter.py +0 -0
  12. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/application.py +0 -0
  13. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/config.py +0 -0
  14. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/demo.py +0 -0
  15. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/discovery.py +0 -0
  16. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/errors.py +0 -0
  17. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/plugins/__init__.py +0 -0
  18. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/plugins/builtins/__init__.py +0 -0
  19. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/plugins/builtins/_web_assets.py +0 -0
  20. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/plugins/builtins/cognitive_api.py +0 -0
  21. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/plugins/builtins/knowledge_base.py +0 -0
  22. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/plugins/builtins/llm_responder.py +0 -0
  23. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/plugins/builtins/observability.py +0 -0
  24. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/plugins/builtins/safety.py +0 -0
  25. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/plugins/builtins/sessions.py +0 -0
  26. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/plugins/builtins/warmth.py +0 -0
  27. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/plugins/builtins/web_gateway.py +0 -0
  28. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/plugins/core.py +0 -0
  29. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/plugins/registry.py +0 -0
  30. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/py.typed +0 -0
  31. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/scaffold.py +0 -0
  32. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/simple.py +0 -0
  33. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework/skill.py +0 -0
  34. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework.egg-info/SOURCES.txt +0 -0
  35. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework.egg-info/dependency_links.txt +0 -0
  36. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework.egg-info/entry_points.txt +0 -0
  37. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/pasm_framework.egg-info/top_level.txt +0 -0
  38. {pasm_framework-0.5.3 → pasm_framework-0.5.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pasm-framework
3
- Version: 0.5.3
3
+ Version: 0.5.4
4
4
  Summary: PASM 应用开发框架 —— 产品智能体/应用与认知引擎之间的防腐层(V1↔V2 唯一变动点)
5
5
  Author: arronzheng
6
6
  License-Expression: MIT
@@ -22,7 +22,7 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
22
22
  Requires-Python: >=3.10
23
23
  Description-Content-Type: text/markdown
24
24
  License-File: LICENSE
25
- Requires-Dist: pasm-skills>=0.6.0
25
+ Requires-Dist: pasm-skills>=0.6.3
26
26
  Dynamic: license-file
27
27
 
28
28
  # pasm-framework
@@ -39,7 +39,7 @@ PASM V1→V2 升级时,**不重写 4 个产品智能体 + 3 个技能**。手
39
39
  """
40
40
  from __future__ import annotations
41
41
 
42
- __version__ = "0.5.3"
42
+ __version__ = "0.5.4"
43
43
 
44
44
  from .adapter import ( # noqa: F401
45
45
  DomainAdapter,
@@ -25,7 +25,7 @@ from typing import Any, Dict, List, Optional
25
25
 
26
26
  from pasm_skills.sdk.backend import (
27
27
  CognitiveBackend,
28
- create_v1_backend,
28
+ create_backend,
29
29
  )
30
30
  from .adapter import DomainAdapter, NullDomainAdapter
31
31
 
@@ -67,6 +67,11 @@ class CognitiveService:
67
67
  def emotion_system(self) -> Optional[Any]:
68
68
  return getattr(self._backend, "emotion_system", None)
69
69
 
70
+ @property
71
+ def engine(self) -> str:
72
+ """实际装配的后端类名(``PasmV1*`` / ``PasmV2CognitiveBackend``),用于诚实核查。"""
73
+ return type(self._backend).__name__
74
+
70
75
  def episode_push(self, *, title, brief, tags, category, salience) -> None:
71
76
  self._backend.episode_push(
72
77
  title=title, brief=brief, tags=tags,
@@ -116,8 +121,9 @@ class CognitiveAssembler:
116
121
 
117
122
  这是 V1↔V2 的唯一变动点:
118
123
 
119
- - ``CognitiveAssembler.v1(...)`` → 返回 V1 后端装配出的服务(当前默认)。
120
- - ``CognitiveAssembler.v2(...)`` → (V2.0 落地时新增)返回 V2 后端装配出的服务。
124
+ - ``CognitiveAssembler.v1(...)`` → 经基座 ``create_backend`` 探测装配
125
+ (默认 V1;``PASM_BACKEND=v2`` 时切 pasm2)。
126
+ - ``CognitiveAssembler.v2(...)`` → 显式选 pasm2 V2 后端(未装则如实回退 V1)。
121
127
  上层 ``BaseApplication`` / 4 智能体 / 3 技能只调用装配器,**不直接碰后端类型**,
122
128
  因此换引擎 = 改这一处工厂方法。
123
129
  """
@@ -141,14 +147,28 @@ class CognitiveAssembler:
141
147
  stage: int = 0,
142
148
  domain: Optional[DomainAdapter] = None,
143
149
  ) -> CognitiveService:
144
- """默认路径:V1 后端(core 优先,降级 light)装配成服务。"""
145
- backend = create_v1_backend(
150
+ """默认路径:经基座 ``create_backend`` 探测工厂装配服务。
151
+
152
+ 未设 ``PASM_BACKEND`` 时**逐字节等于**历史的 V1 路径
153
+ (core 优先,降级 light);``PASM_BACKEND=v2`` 且本机已装 ``pasm2``
154
+ 时自动切 V2 认知后端(未装则如实回退 V1,不虚构能力)。
155
+ """
156
+ backend = create_backend(
146
157
  persist_dir, persona, use_core=use_core, stage=stage
147
158
  )
148
159
  return cls.wrap(backend, domain)
149
160
 
150
- # —— V2.0 落地时在此新增(示例,先留接口不实现,避免提前引入 pasm_v2 依赖):
151
- # @classmethod
152
- # def v2(cls, persist_dir, persona=None, *, domain=None) -> CognitiveService:
153
- # from pasm_skills.contrib.v2 import create_v2_backend
154
- # return cls.wrap(create_v2_backend(persist_dir, persona), domain)
161
+ # —— V2.0 落地(2026-09-29):显式选用 pasm2 认知后端 ——
162
+ @classmethod
163
+ def v2(cls, persist_dir, persona=None, *, domain=None,
164
+ use_core: bool = True, stage: int = 0) -> "CognitiveService":
165
+ """显式选用 PASM v2.0 认知后端(``pasm2`` 包)。
166
+
167
+ 诚实约定:``pasm2`` 未安装或构造失败时**如实回退 V1**,
168
+ 调用方用 ``svc.engine`` 可读回实际装配的引擎类名(不虚构 V2)。
169
+ """
170
+ backend = create_backend(
171
+ persist_dir, persona, use_core=use_core, stage=stage,
172
+ backend_choice="v2",
173
+ )
174
+ return cls.wrap(backend, domain)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pasm-framework
3
- Version: 0.5.3
3
+ Version: 0.5.4
4
4
  Summary: PASM 应用开发框架 —— 产品智能体/应用与认知引擎之间的防腐层(V1↔V2 唯一变动点)
5
5
  Author: arronzheng
6
6
  License-Expression: MIT
@@ -22,7 +22,7 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
22
22
  Requires-Python: >=3.10
23
23
  Description-Content-Type: text/markdown
24
24
  License-File: LICENSE
25
- Requires-Dist: pasm-skills>=0.6.0
25
+ Requires-Dist: pasm-skills>=0.6.3
26
26
  Dynamic: license-file
27
27
 
28
28
  # pasm-framework
@@ -0,0 +1 @@
1
+ pasm-skills>=0.6.3
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pasm-framework"
7
- version = "0.5.3"
7
+ version = "0.5.4"
8
8
  description = "PASM 应用开发框架 —— 产品智能体/应用与认知引擎之间的防腐层(V1↔V2 唯一变动点)"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -30,7 +30,7 @@ classifiers = [
30
30
  ]
31
31
 
32
32
  # 依赖基座(SDK / 认知后端协议),不依赖具体引擎
33
- dependencies = ["pasm-skills>=0.6.0"]
33
+ dependencies = ["pasm-skills>=0.6.3"]
34
34
 
35
35
  [project.urls]
36
36
  Homepage = "https://gitee.com/arronzheng/pasm-framework"
@@ -1 +0,0 @@
1
- pasm-skills>=0.6.0
File without changes
File without changes
File without changes