@aigne/afs-user-profile-memory 1.2.5 → 1.3.0-beta.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,37 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.3.0-beta.1](https://github.com/AIGNE-io/aigne-framework/compare/afs-user-profile-memory-v1.3.0-beta...afs-user-profile-memory-v1.3.0-beta.1) (2025-12-17)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * bump version ([70d217c](https://github.com/AIGNE-io/aigne-framework/commit/70d217c8360dd0dda7f5f17011c4e92ec836e801))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @aigne/afs bumped to 1.4.0-beta.1
16
+ * @aigne/afs-history bumped to 1.2.0-beta.1
17
+ * @aigne/core bumped to 1.72.0-beta.1
18
+
19
+ ## [1.3.0-beta](https://github.com/AIGNE-io/aigne-framework/compare/afs-user-profile-memory-v1.2.5...afs-user-profile-memory-v1.3.0-beta) (2025-12-17)
20
+
21
+
22
+ ### Features
23
+
24
+ * **afs:** support expand context into prompt template by call `$afs.xxx` ([#830](https://github.com/AIGNE-io/aigne-framework/issues/830)) ([5616acd](https://github.com/AIGNE-io/aigne-framework/commit/5616acd6ea257c91aa0b766608f45c5ce17f0345))
25
+
26
+
27
+ ### Dependencies
28
+
29
+ * The following workspace dependencies were updated
30
+ * dependencies
31
+ * @aigne/afs bumped to 1.4.0-beta
32
+ * @aigne/afs-history bumped to 1.2.0-beta
33
+ * @aigne/core bumped to 1.72.0-beta
34
+
3
35
  ## [1.2.5](https://github.com/AIGNE-io/aigne-framework/compare/afs-user-profile-memory-v1.2.5-beta.6...afs-user-profile-memory-v1.2.5) (2025-12-12)
4
36
 
5
37
 
@@ -1,4 +1,4 @@
1
- import type { AFSEntry, AFSListOptions, AFSModule, AFSRoot, AFSSearchOptions, AFSWriteEntryPayload } from "@aigne/afs";
1
+ import type { AFSEntry, AFSListOptions, AFSListResult, AFSModule, AFSReadResult, AFSRoot, AFSSearchOptions, AFSSearchResult, AFSWriteEntryPayload, AFSWriteResult } from "@aigne/afs";
2
2
  import { SharedAFSStorage, type SharedAFSStorageOptions } from "@aigne/afs-history";
3
3
  import { AIAgent, type Context } from "@aigne/core";
4
4
  import type { z } from "zod";
@@ -20,20 +20,9 @@ export declare class UserProfileMemory implements AFSModule {
20
20
  entry: AFSEntry;
21
21
  }, z.infer<typeof userProfileJsonPathSchema>>;
22
22
  onMount(afs: AFSRoot): void;
23
- updateProfile(entry: AFSEntry): Promise<{
24
- result: AFSEntry;
25
- }>;
26
- list(_path: string, _options?: AFSListOptions): Promise<{
27
- list: AFSEntry[];
28
- message?: string;
29
- }>;
30
- read(path: string): Promise<{
31
- result: AFSEntry | undefined;
32
- }>;
33
- write(path: string, entry: AFSWriteEntryPayload): Promise<{
34
- result: AFSEntry;
35
- }>;
36
- search(_path: string, _query: string, _options?: AFSSearchOptions): Promise<{
37
- list: AFSEntry[];
38
- }>;
23
+ updateProfile(entry: AFSEntry): Promise<AFSWriteResult>;
24
+ list(_path: string, _options?: AFSListOptions): Promise<AFSListResult>;
25
+ read(path: string): Promise<AFSReadResult>;
26
+ write(path: string, entry: AFSWriteEntryPayload): Promise<AFSWriteResult>;
27
+ search(_path: string, _query: string, _options?: AFSSearchOptions): Promise<AFSSearchResult>;
39
28
  }
package/lib/cjs/index.js CHANGED
@@ -43,7 +43,7 @@ class UserProfileMemory {
43
43
  });
44
44
  }
45
45
  async updateProfile(entry) {
46
- const { result: previous } = await this.read("/");
46
+ const { data: previous } = await this.read("/");
47
47
  const { ops } = await this.options.context.newContext({ reset: true }).invoke(this.extractor, {
48
48
  schema: (0, zod_to_json_schema_1.zodToJsonSchema)(schema_js_1.userProfileSchema),
49
49
  profile: previous?.content,
@@ -56,24 +56,24 @@ class UserProfileMemory {
56
56
  return await this.write("/", { content: profile });
57
57
  }
58
58
  async list(_path, _options) {
59
- const { result: profile } = await this.read("/");
60
- return { list: profile ? [profile] : [] };
59
+ const { data: profile } = await this.read("/");
60
+ return { data: profile ? [profile] : [] };
61
61
  }
62
62
  async read(path) {
63
- const result = await this.storage.read(path);
64
- if (result)
65
- result.description = this.description;
66
- return { result };
63
+ const data = await this.storage.read(path);
64
+ if (data)
65
+ data.description = this.description;
66
+ return { data };
67
67
  }
68
68
  async write(path, entry) {
69
- const result = await this.storage.create({ ...entry, path });
70
- if (result)
71
- result.description = this.description;
72
- return { result };
69
+ const data = await this.storage.create({ ...entry, path });
70
+ if (data)
71
+ data.description = this.description;
72
+ return { data };
73
73
  }
74
74
  async search(_path, _query, _options) {
75
- const { result: profile } = await this.read("/");
76
- return { list: profile ? [profile] : [] };
75
+ const { data: profile } = await this.read("/");
76
+ return { data: profile ? [profile] : [] };
77
77
  }
78
78
  }
79
79
  exports.UserProfileMemory = UserProfileMemory;
@@ -1,4 +1,4 @@
1
- import type { AFSEntry, AFSListOptions, AFSModule, AFSRoot, AFSSearchOptions, AFSWriteEntryPayload } from "@aigne/afs";
1
+ import type { AFSEntry, AFSListOptions, AFSListResult, AFSModule, AFSReadResult, AFSRoot, AFSSearchOptions, AFSSearchResult, AFSWriteEntryPayload, AFSWriteResult } from "@aigne/afs";
2
2
  import { SharedAFSStorage, type SharedAFSStorageOptions } from "@aigne/afs-history";
3
3
  import { AIAgent, type Context } from "@aigne/core";
4
4
  import type { z } from "zod";
@@ -20,20 +20,9 @@ export declare class UserProfileMemory implements AFSModule {
20
20
  entry: AFSEntry;
21
21
  }, z.infer<typeof userProfileJsonPathSchema>>;
22
22
  onMount(afs: AFSRoot): void;
23
- updateProfile(entry: AFSEntry): Promise<{
24
- result: AFSEntry;
25
- }>;
26
- list(_path: string, _options?: AFSListOptions): Promise<{
27
- list: AFSEntry[];
28
- message?: string;
29
- }>;
30
- read(path: string): Promise<{
31
- result: AFSEntry | undefined;
32
- }>;
33
- write(path: string, entry: AFSWriteEntryPayload): Promise<{
34
- result: AFSEntry;
35
- }>;
36
- search(_path: string, _query: string, _options?: AFSSearchOptions): Promise<{
37
- list: AFSEntry[];
38
- }>;
23
+ updateProfile(entry: AFSEntry): Promise<AFSWriteResult>;
24
+ list(_path: string, _options?: AFSListOptions): Promise<AFSListResult>;
25
+ read(path: string): Promise<AFSReadResult>;
26
+ write(path: string, entry: AFSWriteEntryPayload): Promise<AFSWriteResult>;
27
+ search(_path: string, _query: string, _options?: AFSSearchOptions): Promise<AFSSearchResult>;
39
28
  }
@@ -1,4 +1,4 @@
1
- import type { AFSEntry, AFSListOptions, AFSModule, AFSRoot, AFSSearchOptions, AFSWriteEntryPayload } from "@aigne/afs";
1
+ import type { AFSEntry, AFSListOptions, AFSListResult, AFSModule, AFSReadResult, AFSRoot, AFSSearchOptions, AFSSearchResult, AFSWriteEntryPayload, AFSWriteResult } from "@aigne/afs";
2
2
  import { SharedAFSStorage, type SharedAFSStorageOptions } from "@aigne/afs-history";
3
3
  import { AIAgent, type Context } from "@aigne/core";
4
4
  import type { z } from "zod";
@@ -20,20 +20,9 @@ export declare class UserProfileMemory implements AFSModule {
20
20
  entry: AFSEntry;
21
21
  }, z.infer<typeof userProfileJsonPathSchema>>;
22
22
  onMount(afs: AFSRoot): void;
23
- updateProfile(entry: AFSEntry): Promise<{
24
- result: AFSEntry;
25
- }>;
26
- list(_path: string, _options?: AFSListOptions): Promise<{
27
- list: AFSEntry[];
28
- message?: string;
29
- }>;
30
- read(path: string): Promise<{
31
- result: AFSEntry | undefined;
32
- }>;
33
- write(path: string, entry: AFSWriteEntryPayload): Promise<{
34
- result: AFSEntry;
35
- }>;
36
- search(_path: string, _query: string, _options?: AFSSearchOptions): Promise<{
37
- list: AFSEntry[];
38
- }>;
23
+ updateProfile(entry: AFSEntry): Promise<AFSWriteResult>;
24
+ list(_path: string, _options?: AFSListOptions): Promise<AFSListResult>;
25
+ read(path: string): Promise<AFSReadResult>;
26
+ write(path: string, entry: AFSWriteEntryPayload): Promise<AFSWriteResult>;
27
+ search(_path: string, _query: string, _options?: AFSSearchOptions): Promise<AFSSearchResult>;
39
28
  }
package/lib/esm/index.js CHANGED
@@ -40,7 +40,7 @@ export class UserProfileMemory {
40
40
  });
41
41
  }
42
42
  async updateProfile(entry) {
43
- const { result: previous } = await this.read("/");
43
+ const { data: previous } = await this.read("/");
44
44
  const { ops } = await this.options.context.newContext({ reset: true }).invoke(this.extractor, {
45
45
  schema: zodToJsonSchema(userProfileSchema),
46
46
  profile: previous?.content,
@@ -53,23 +53,23 @@ export class UserProfileMemory {
53
53
  return await this.write("/", { content: profile });
54
54
  }
55
55
  async list(_path, _options) {
56
- const { result: profile } = await this.read("/");
57
- return { list: profile ? [profile] : [] };
56
+ const { data: profile } = await this.read("/");
57
+ return { data: profile ? [profile] : [] };
58
58
  }
59
59
  async read(path) {
60
- const result = await this.storage.read(path);
61
- if (result)
62
- result.description = this.description;
63
- return { result };
60
+ const data = await this.storage.read(path);
61
+ if (data)
62
+ data.description = this.description;
63
+ return { data };
64
64
  }
65
65
  async write(path, entry) {
66
- const result = await this.storage.create({ ...entry, path });
67
- if (result)
68
- result.description = this.description;
69
- return { result };
66
+ const data = await this.storage.create({ ...entry, path });
67
+ if (data)
68
+ data.description = this.description;
69
+ return { data };
70
70
  }
71
71
  async search(_path, _query, _options) {
72
- const { result: profile } = await this.read("/");
73
- return { list: profile ? [profile] : [] };
72
+ const { data: profile } = await this.read("/");
73
+ return { data: profile ? [profile] : [] };
74
74
  }
75
75
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/afs-user-profile-memory",
3
- "version": "1.2.5",
3
+ "version": "1.3.0-beta.1",
4
4
  "description": "AIGNE AFS module for user profile memory",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -50,9 +50,9 @@
50
50
  "fast-json-patch": "^3.1.1",
51
51
  "zod": "^3.25.67",
52
52
  "zod-to-json-schema": "^3.24.6",
53
- "@aigne/afs": "^1.3.0",
54
- "@aigne/afs-history": "^1.1.3",
55
- "@aigne/core": "^1.71.0"
53
+ "@aigne/afs": "^1.4.0-beta.1",
54
+ "@aigne/afs-history": "^1.2.0-beta.1",
55
+ "@aigne/core": "^1.72.0-beta.1"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/bun": "^1.2.22",