@dsh-ray/assistant-memory-learning 0.0.1-seed.0 → 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/lib/types.d.ts ADDED
@@ -0,0 +1,128 @@
1
+ import type { MemoryLearningOwner, MemoryLearningReviewRequest } from '@dsh-ray/assistant-growth-contract';
2
+ import type { OwnerForegroundTaskSourceCursor } from '@dsh-ray/assistant-delivery';
3
+ export interface LearningModel {
4
+ provider: string;
5
+ model: string;
6
+ reasoningEffort?: string;
7
+ }
8
+ export interface LearningConfig {
9
+ databasePath: string;
10
+ authorityId: string;
11
+ owner: MemoryLearningOwner;
12
+ expiresAt: number;
13
+ maxExtractions: number;
14
+ maxPending: number;
15
+ lookbackMs: number;
16
+ policy: string;
17
+ maxInputBytes: number;
18
+ maxOutputTokens: number;
19
+ timeoutMs: number;
20
+ budgetId: string;
21
+ budgetAmount: number;
22
+ scanBudgetId: string;
23
+ scanBudgetAmount: number;
24
+ reviewAuthorityId: string;
25
+ reviewAuthorityDigest: string;
26
+ adoptionAuthorityId: string;
27
+ adoptionGrantDigest: string;
28
+ workItemExperiences?: boolean;
29
+ model?: LearningModel;
30
+ }
31
+ export type LearningConfigInput = Pick<LearningConfig, 'databasePath' | 'authorityId' | 'owner' | 'expiresAt' | 'budgetId' | 'scanBudgetId' | 'reviewAuthorityId' | 'reviewAuthorityDigest' | 'adoptionAuthorityId' | 'adoptionGrantDigest'> & Partial<Pick<LearningConfig, 'maxExtractions' | 'maxPending' | 'lookbackMs' | 'policy' | 'maxInputBytes' | 'maxOutputTokens' | 'timeoutMs' | 'budgetAmount' | 'scanBudgetAmount' | 'workItemExperiences' | 'model'>>;
32
+ export type DormantLearningServiceConfig = Readonly<{
33
+ enabled: boolean;
34
+ configured: false;
35
+ workItemExperiences: boolean;
36
+ }>;
37
+ export type LearningServiceConfig = (LearningConfigInput & {
38
+ enabled?: boolean;
39
+ }) | {
40
+ enabled?: boolean;
41
+ configured?: false;
42
+ workItemExperiences?: boolean;
43
+ };
44
+ export type ParsedLearningServiceConfig = DormantLearningServiceConfig | (LearningConfig & {
45
+ enabled?: false;
46
+ });
47
+ export type LearningCursor = OwnerForegroundTaskSourceCursor | Readonly<{
48
+ scopeKey: string;
49
+ watermark: number;
50
+ }>;
51
+ /** Feed metadata only. Source text/model are frozen later, once reply is readable. */
52
+ interface LearningIntentBase {
53
+ configDigest: string;
54
+ owner: MemoryLearningOwner;
55
+ kind: 'fact' | 'experience';
56
+ subject: string;
57
+ expectedSourceDigest?: string;
58
+ canonical?: {
59
+ outcomeId: string;
60
+ version: number;
61
+ digest: string;
62
+ objectiveStatus: 'achieved' | 'not-achieved';
63
+ };
64
+ createdAt: number;
65
+ expiresAt: number;
66
+ }
67
+ export type LearningIntent = LearningIntentBase & ({
68
+ sourceKind?: never;
69
+ inboxId: string;
70
+ itemId?: never;
71
+ } | {
72
+ sourceKind: 'work-item';
73
+ itemId: string;
74
+ inboxId?: never;
75
+ kind: 'experience';
76
+ canonical: NonNullable<LearningIntentBase['canonical']>;
77
+ });
78
+ interface LearningSnapshotBase {
79
+ model: LearningModel;
80
+ targets: readonly Readonly<{
81
+ id: string;
82
+ version: number;
83
+ kind: 'fact' | 'experience';
84
+ content: string;
85
+ knowledge?: import('@dsh-ray/assistant-growth-contract').MemoryLearningEntry['knowledge'];
86
+ }>[];
87
+ }
88
+ export type WorkItemPresentationFlags = Readonly<Record<'brief' | 'report' | 'feedback', Readonly<{
89
+ truncated: boolean;
90
+ redacted: boolean;
91
+ }>>>;
92
+ export type LearningSnapshot = LearningSnapshotBase & ({
93
+ source: Extract<MemoryLearningReviewRequest, {
94
+ protocol: 'memory-learning-review/v1';
95
+ }>['source'];
96
+ sourceKind?: never;
97
+ ownerStatement: string;
98
+ assistantReply: string;
99
+ ownerFeedback?: string;
100
+ taskBrief?: never;
101
+ workerReport?: never;
102
+ } | {
103
+ presentationFlags: WorkItemPresentationFlags;
104
+ source: Extract<MemoryLearningReviewRequest, {
105
+ protocol: 'memory-learning-review/v2';
106
+ }>['source'];
107
+ sourceKind: 'work-item';
108
+ taskBrief: string;
109
+ workerReport: string;
110
+ ownerFeedback: string;
111
+ ownerStatement?: never;
112
+ assistantReply?: never;
113
+ });
114
+ export type LearningState = 'pending' | 'queued' | 'running' | 'unknown' | 'adopted' | 'rejected' | 'noop' | 'failed' | 'superseded';
115
+ export interface LearningJob {
116
+ id: string;
117
+ intent: LearningIntent;
118
+ digest: string;
119
+ state: LearningState;
120
+ snapshot: LearningSnapshot | null;
121
+ definitionHash: string | null;
122
+ occurrenceId: string | null;
123
+ request: MemoryLearningReviewRequest | null;
124
+ resultDigest: string | null;
125
+ reason: string | null;
126
+ }
127
+ export {};
128
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAA;AAC1G,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAA;AAElF,MAAM,WAAW,aAAa;IAAG,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAAE;AAC5F,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,mBAAmB,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,MAAM,CAAA;IACvB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EA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AE,aAAa,CAAA;IACpB,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAA;IACjC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,OAAO,EAAE,2BAA2B,GAAG,IAAI,CAAA;IAC3C,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB"}
package/lib/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare const version = "0.2.0";
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAA"}
package/lib/version.js ADDED
@@ -0,0 +1,2 @@
1
+ export const version = '0.2.0';
2
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAA"}
package/package.json CHANGED
@@ -1,14 +1,127 @@
1
1
  {
2
2
  "name": "@dsh-ray/assistant-memory-learning",
3
- "version": "0.0.1-seed.0",
3
+ "version": "0.2.0",
4
4
  "description": "Durable ordinary-task memory learning through native Automations, independent review and bounded adoption.",
5
5
  "license": "MIT",
6
+ "type": "module",
7
+ "main": "./lib/index.js",
8
+ "types": "./lib/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./lib/index.d.ts",
12
+ "default": "./lib/index.js"
13
+ },
14
+ "./cordis.patch.yml": "./cordis.patch.yml",
15
+ "./package.json": "./package.json"
16
+ },
17
+ "files": [
18
+ "lib",
19
+ "cordis.patch.yml",
20
+ "README.md",
21
+ "LICENSE"
22
+ ],
23
+ "engines": {
24
+ "node": ">=24.9.0"
25
+ },
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
6
29
  "repository": {
7
30
  "type": "git",
8
31
  "url": "git+https://github.com/22-ai-00/dsh-ray.git",
9
32
  "directory": "plugins/assistant-memory-learning"
10
33
  },
11
- "publishConfig": {
12
- "access": "public"
34
+ "keywords": [
35
+ "deepseek",
36
+ "deepseek-harness",
37
+ "dsh-plugin"
38
+ ],
39
+ "dsh": {
40
+ "bundle": {
41
+ "patch": "./cordis.patch.yml"
42
+ }
43
+ },
44
+ "peerDependencies": {
45
+ "@deepseek-ai/cordis": "^4.1.0",
46
+ "@deepseek-ai/dsh-agent": ">=0.2.2-rc.5 <0.3.0",
47
+ "@deepseek-ai/dsh-llm": ">=0.2.2-rc.5 <0.3.0",
48
+ "@deepseek-ai/dsh-session": ">=0.2.2-rc.5 <0.3.0",
49
+ "@deepseek-ai/dsh-tools": ">=0.2.2-rc.5 <0.3.0",
50
+ "@deepseek-ai/dsh-system-prompt": ">=0.2.2-rc.5 <0.3.0",
51
+ "@dsh-ray/assistant-automations": ">=0.1.48 <0.3.0",
52
+ "@dsh-ray/assistant-delivery": ">=0.1.48 <0.3.0",
53
+ "@dsh-ray/assistant-evaluation": ">=0.1.48 <0.3.0",
54
+ "@dsh-ray/assistant-policy": ">=0.1.48 <0.3.0",
55
+ "@dsh-ray/assistant-verifier": ">=0.1.48 <0.3.0",
56
+ "@dsh-ray/personal-memory": ">=0.1.48 <0.3.0"
57
+ },
58
+ "peerDependenciesMeta": {
59
+ "@deepseek-ai/cordis": {
60
+ "optional": true
61
+ },
62
+ "@deepseek-ai/dsh-agent": {
63
+ "optional": true
64
+ },
65
+ "@deepseek-ai/dsh-llm": {
66
+ "optional": true
67
+ },
68
+ "@deepseek-ai/dsh-session": {
69
+ "optional": true
70
+ },
71
+ "@deepseek-ai/dsh-tools": {
72
+ "optional": true
73
+ },
74
+ "@deepseek-ai/dsh-system-prompt": {
75
+ "optional": true
76
+ },
77
+ "@dsh-ray/assistant-automations": {
78
+ "optional": true
79
+ },
80
+ "@dsh-ray/assistant-delivery": {
81
+ "optional": true
82
+ },
83
+ "@dsh-ray/assistant-evaluation": {
84
+ "optional": true
85
+ },
86
+ "@dsh-ray/assistant-policy": {
87
+ "optional": true
88
+ },
89
+ "@dsh-ray/assistant-verifier": {
90
+ "optional": true
91
+ },
92
+ "@dsh-ray/personal-memory": {
93
+ "optional": true
94
+ }
95
+ },
96
+ "devDependencies": {
97
+ "@deepseek-ai/cordis": "4.1.0",
98
+ "@types/node": "22.20.0",
99
+ "typescript": "6.0.3",
100
+ "vitest": "4.1.8",
101
+ "@deepseek-ai/dsh-agent": "0.2.2-rc.5",
102
+ "@deepseek-ai/dsh-llm": "0.2.2-rc.5",
103
+ "@deepseek-ai/dsh-session": "0.2.2-rc.5",
104
+ "@deepseek-ai/dsh-tools": "0.2.2-rc.5",
105
+ "@deepseek-ai/dsh-system-prompt": "0.2.2-rc.5",
106
+ "@deepseek-ai/dsh-agent-default-model": "0.2.2-rc.5",
107
+ "@deepseek-ai/dsh-agent-loop": "0.2.2-rc.5",
108
+ "@deepseek-ai/dsh-agent-loop-testkit": "0.2.2-rc.5",
109
+ "@deepseek-ai/dsh-session-projection": "0.2.2-rc.5",
110
+ "@deepseek-ai/dsh-tool-executor-native": "0.2.2-rc.5",
111
+ "@dsh-ray/assistant-automations": "0.2.0",
112
+ "@dsh-ray/assistant-evaluation": "0.2.0",
113
+ "@dsh-ray/assistant-policy": "0.2.0",
114
+ "@dsh-ray/assistant-delivery": "0.2.0",
115
+ "@dsh-ray/assistant-verifier": "0.2.0",
116
+ "@dsh-ray/personal-memory": "0.2.0"
117
+ },
118
+ "dependencies": {
119
+ "@deepseek-ai/schemastery": "3.19.0",
120
+ "@dsh-ray/assistant-growth-contract": "0.2.0"
121
+ },
122
+ "scripts": {
123
+ "build": "tsc -p tsconfig.build.json",
124
+ "test": "vitest run",
125
+ "typecheck": "tsc -p tsconfig.json --noEmit"
13
126
  }
14
- }
127
+ }