@akemi-mio/creativity 0.1.1 → 0.2.0

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/dist/types.d.ts CHANGED
@@ -5,6 +5,17 @@
5
5
  * - signal: 强制注入 trend/ provocation/insight 来源,限�?randomness
6
6
  */
7
7
  export type Strategy = 'stable' | 'explore' | 'signal';
8
+ /**
9
+ * 规范化概念身份(正向反馈闭环 spec §五.2):稳定字段 `origin` 优先,
10
+ * `name` 仅作展示,缺失时回退 `name:<name>` 以避免与 origin 碰撞。
11
+ * ConceptMixer 与 FeedbackLearning 共用此规则,防止双套身份漂移(R2)。
12
+ */
13
+ export declare function sourceConceptId(s: {
14
+ name: string;
15
+ origin?: string;
16
+ }): string;
17
+ /** 规范化无序概念对键:(A,B) ≡ (B,A)。 */
18
+ export declare function conceptPairKey(a: string, b: string): string;
8
19
  export interface CreativitySource {
9
20
  name: string;
10
21
  content: string;
package/dist/types.js CHANGED
@@ -1,6 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FERMENT_PHASE_OFFSET_MS = exports.FERMENT_INTERVAL_MS = exports.NORMAL_CYCLE_INTERVAL_MS = exports.DREAM_CYCLE_INTERVAL_MS = exports.CREATIVITY_STORE_VERSION = void 0;
4
+ exports.sourceConceptId = sourceConceptId;
5
+ exports.conceptPairKey = conceptPairKey;
6
+ /**
7
+ * 规范化概念身份(正向反馈闭环 spec §五.2):稳定字段 `origin` 优先,
8
+ * `name` 仅作展示,缺失时回退 `name:<name>` 以避免与 origin 碰撞。
9
+ * ConceptMixer 与 FeedbackLearning 共用此规则,防止双套身份漂移(R2)。
10
+ */
11
+ function sourceConceptId(s) {
12
+ const origin = s.origin ? s.origin.trim() : '';
13
+ return origin || `name:${s.name}`;
14
+ }
15
+ /** 规范化无序概念对键:(A,B) ≡ (B,A)。 */
16
+ function conceptPairKey(a, b) {
17
+ return [a, b].sort().join('|');
18
+ }
4
19
  exports.CREATIVITY_STORE_VERSION = 2;
5
20
  exports.DREAM_CYCLE_INTERVAL_MS = 30 * 60 * 1000; // 30min
6
21
  exports.NORMAL_CYCLE_INTERVAL_MS = 5 * 60 * 1000; // 5min
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akemi-mio/creativity",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Creativity layer: ideas, writing, blog, image, inspiration",
5
5
  "main": "./dist/IdeaGenerator.js",
6
6
  "types": "./dist/IdeaGenerator.d.ts",
@@ -50,6 +50,41 @@
50
50
  "require": "./dist/InsightSamplingExperiment.js",
51
51
  "default": "./dist/InsightSamplingExperiment.js"
52
52
  },
53
+ "./FeedbackEvents": {
54
+ "types": "./dist/FeedbackEvents.d.ts",
55
+ "require": "./dist/FeedbackEvents.js",
56
+ "default": "./dist/FeedbackEvents.js"
57
+ },
58
+ "./JsonlFeedbackEventStore": {
59
+ "types": "./dist/JsonlFeedbackEventStore.d.ts",
60
+ "require": "./dist/JsonlFeedbackEventStore.js",
61
+ "default": "./dist/JsonlFeedbackEventStore.js"
62
+ },
63
+ "./FeedbackLearning": {
64
+ "types": "./dist/FeedbackLearning.d.ts",
65
+ "require": "./dist/FeedbackLearning.js",
66
+ "default": "./dist/FeedbackLearning.js"
67
+ },
68
+ "./CreativityPrompt": {
69
+ "types": "./dist/CreativityPrompt.d.ts",
70
+ "require": "./dist/CreativityPrompt.js",
71
+ "default": "./dist/CreativityPrompt.js"
72
+ },
73
+ "./ConceptMixer": {
74
+ "types": "./dist/ConceptMixer.d.ts",
75
+ "require": "./dist/ConceptMixer.js",
76
+ "default": "./dist/ConceptMixer.js"
77
+ },
78
+ "./FeedbackRuntime": {
79
+ "types": "./dist/FeedbackRuntime.d.ts",
80
+ "require": "./dist/FeedbackRuntime.js",
81
+ "default": "./dist/FeedbackRuntime.js"
82
+ },
83
+ "./FeedbackRollout": {
84
+ "types": "./dist/FeedbackRollout.d.ts",
85
+ "require": "./dist/FeedbackRollout.js",
86
+ "default": "./dist/FeedbackRollout.js"
87
+ },
53
88
  "./package.json": "./package.json"
54
89
  },
55
90
  "files": [