@prmichaelsen/remember-mcp 2.8.0 → 3.12.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/AGENT.md +296 -250
- package/CHANGELOG.md +468 -0
- package/README.md +163 -46
- package/agent/commands/acp.clarification-create.md +382 -0
- package/agent/commands/acp.command-create.md +0 -1
- package/agent/commands/acp.design-create.md +0 -1
- package/agent/commands/acp.init.md +0 -1
- package/agent/commands/acp.package-create.md +0 -1
- package/agent/commands/acp.package-info.md +0 -1
- package/agent/commands/acp.package-install.md +0 -1
- package/agent/commands/acp.package-list.md +0 -1
- package/agent/commands/acp.package-publish.md +0 -1
- package/agent/commands/acp.package-remove.md +0 -1
- package/agent/commands/acp.package-search.md +0 -1
- package/agent/commands/acp.package-update.md +0 -1
- package/agent/commands/acp.package-validate.md +0 -1
- package/agent/commands/acp.pattern-create.md +0 -1
- package/agent/commands/acp.plan.md +0 -1
- package/agent/commands/acp.proceed.md +0 -1
- package/agent/commands/acp.project-create.md +0 -1
- package/agent/commands/acp.project-info.md +309 -0
- package/agent/commands/acp.project-list.md +0 -1
- package/agent/commands/acp.project-remove.md +379 -0
- package/agent/commands/acp.project-set.md +0 -1
- package/agent/commands/acp.project-update.md +296 -0
- package/agent/commands/acp.report.md +0 -1
- package/agent/commands/acp.resume.md +0 -1
- package/agent/commands/acp.status.md +0 -1
- package/agent/commands/acp.sync.md +0 -1
- package/agent/commands/acp.task-create.md +17 -10
- package/agent/commands/acp.update.md +0 -1
- package/agent/commands/acp.validate.md +0 -1
- package/agent/commands/acp.version-check-for-updates.md +0 -1
- package/agent/commands/acp.version-check.md +0 -1
- package/agent/commands/acp.version-update.md +0 -1
- package/agent/commands/command.template.md +0 -5
- package/agent/commands/git.commit.md +13 -2
- package/agent/commands/git.init.md +0 -1
- package/agent/design/comment-memory-type.md +2 -2
- package/agent/design/local.collaborative-memory-sync.md +265 -0
- package/agent/design/local.content-flags.md +210 -0
- package/agent/design/local.ghost-persona-system.md +273 -0
- package/agent/design/local.group-acl-integration.md +338 -0
- package/agent/design/local.memory-acl-schema.md +352 -0
- package/agent/design/local.memory-collection-pattern-v2.md +348 -0
- package/agent/design/local.moderation-and-space-config.md +257 -0
- package/agent/design/local.v2-api-reference.md +621 -0
- package/agent/design/local.v2-migration-guide.md +191 -0
- package/agent/design/local.v2-usage-examples.md +265 -0
- package/agent/design/permissions-storage-architecture.md +11 -3
- package/agent/design/soft-delete-system.md +291 -0
- package/agent/design/trust-escalation-prevention.md +9 -2
- package/agent/design/trust-system-implementation.md +12 -3
- package/agent/milestones/milestone-13-soft-delete-system.md +306 -0
- package/agent/milestones/milestone-14-memory-collection-v2.md +182 -0
- package/agent/milestones/milestone-15-moderation-space-config.md +126 -0
- package/agent/package.template.yaml +0 -17
- package/agent/progress.yaml +762 -49
- package/agent/scripts/acp.common.sh +2 -0
- package/agent/scripts/acp.install.sh +15 -85
- package/agent/scripts/acp.package-install-optimized.sh +454 -0
- package/agent/scripts/acp.package-install.sh +248 -380
- package/agent/scripts/acp.package-validate.sh +0 -99
- package/agent/scripts/acp.project-info.sh +218 -0
- package/agent/scripts/acp.project-remove.sh +302 -0
- package/agent/scripts/acp.project-update.sh +296 -0
- package/agent/scripts/acp.yaml-parser.sh +128 -10
- package/agent/tasks/milestone-14-memory-collection-v2/task-165-core-infrastructure-setup.md +171 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-166-update-remember-publish.md +191 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-167-update-remember-retract.md +186 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-168-implement-remember-revise.md +184 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-169-update-remember-search-space.md +179 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-170-update-remember-create-update.md +139 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-172-performance-testing-optimization.md +161 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-173-documentation-examples.md +258 -0
- package/agent/tasks/milestone-15-moderation-space-config/task-174-add-moderation-schema-fields.md +57 -0
- package/agent/tasks/milestone-15-moderation-space-config/task-175-create-space-config-service.md +64 -0
- package/agent/tasks/milestone-15-moderation-space-config/task-176-wire-moderation-publish-flow.md +45 -0
- package/agent/tasks/milestone-15-moderation-space-config/task-177-add-moderation-search-filters.md +70 -0
- package/agent/tasks/milestone-15-moderation-space-config/task-178-create-remember-moderate-tool.md +69 -0
- package/agent/tasks/milestone-15-moderation-space-config/task-179-documentation-integration-tests.md +58 -0
- package/agent/tasks/milestone-16-ghost-system/task-187-ghost-config-firestore.md +41 -0
- package/agent/tasks/milestone-16-ghost-system/task-188-trust-filter-integration.md +44 -0
- package/agent/tasks/milestone-16-ghost-system/task-189-ghost-memory-filtering.md +43 -0
- package/agent/tasks/milestone-16-ghost-system/task-190-ghost-config-tools.md +45 -0
- package/agent/tasks/milestone-16-ghost-system/task-191-escalation-firestore.md +38 -0
- package/agent/tasks/milestone-16-ghost-system/task-192-documentation-verification.md +39 -0
- package/agent/tasks/milestone-7-trust-permissions/task-180-access-result-permission-types.md +69 -0
- package/agent/tasks/milestone-7-trust-permissions/task-181-firestore-permissions-access-logs.md +56 -0
- package/agent/tasks/milestone-7-trust-permissions/task-182-trust-enforcement-service.md +68 -0
- package/agent/tasks/milestone-7-trust-permissions/task-183-access-control-service.md +70 -0
- package/agent/tasks/milestone-7-trust-permissions/task-184-permission-tools.md +79 -0
- package/agent/tasks/milestone-7-trust-permissions/task-185-wire-trust-into-search-query.md +55 -0
- package/agent/tasks/milestone-7-trust-permissions/task-186-documentation-verification.md +56 -0
- package/agent/tasks/task-70-add-soft-delete-schema-fields.md +165 -0
- package/agent/tasks/task-71-implement-delete-confirmation-flow.md +257 -0
- package/agent/tasks/task-72-add-deleted-filter-to-search-tools.md +18 -0
- package/agent/tasks/task-73-update-relationship-handling.md +18 -0
- package/agent/tasks/task-74-add-unit-tests-soft-delete.md +18 -0
- package/agent/tasks/task-75-update-documentation-changelog.md +26 -0
- package/agent/tasks/task-76-fix-indexnullstate-schema-bug.md +197 -0
- package/dist/collections/composite-ids.d.ts +106 -0
- package/dist/collections/core-infrastructure.spec.d.ts +11 -0
- package/dist/collections/dot-notation.d.ts +106 -0
- package/dist/collections/tracking-arrays.d.ts +176 -0
- package/dist/constants/content-types.d.ts +1 -0
- package/dist/schema/v2-collections-comments.spec.d.ts +8 -0
- package/dist/schema/v2-collections.d.ts +210 -0
- package/dist/server-factory.d.ts +15 -0
- package/dist/server-factory.js +3261 -1316
- package/dist/server.js +2926 -1236
- package/dist/services/access-control.d.ts +103 -0
- package/dist/services/access-control.spec.d.ts +2 -0
- package/dist/services/credentials-provider.d.ts +24 -0
- package/dist/services/credentials-provider.spec.d.ts +2 -0
- package/dist/services/escalation.service.d.ts +22 -0
- package/dist/services/escalation.service.spec.d.ts +2 -0
- package/dist/services/ghost-config.service.d.ts +55 -0
- package/dist/services/ghost-config.service.spec.d.ts +2 -0
- package/dist/services/space-config.service.d.ts +23 -0
- package/dist/services/space-config.service.spec.d.ts +2 -0
- package/dist/services/trust-enforcement.d.ts +83 -0
- package/dist/services/trust-enforcement.spec.d.ts +2 -0
- package/dist/services/trust-validator.d.ts +43 -0
- package/dist/services/trust-validator.spec.d.ts +2 -0
- package/dist/tools/confirm-publish-moderation.spec.d.ts +8 -0
- package/dist/tools/confirm.d.ts +8 -1
- package/dist/tools/create-memory.d.ts +2 -1
- package/dist/tools/create-memory.spec.d.ts +10 -0
- package/dist/tools/create-relationship.d.ts +2 -1
- package/dist/tools/delete-memory.d.ts +7 -31
- package/dist/tools/delete-relationship.d.ts +2 -1
- package/dist/tools/deny.d.ts +2 -1
- package/dist/tools/find-similar.d.ts +10 -2
- package/dist/tools/get-preferences.d.ts +2 -1
- package/dist/tools/ghost-config.d.ts +27 -0
- package/dist/tools/ghost-config.spec.d.ts +2 -0
- package/dist/tools/moderate.d.ts +20 -0
- package/dist/tools/moderate.spec.d.ts +5 -0
- package/dist/tools/publish.d.ts +11 -3
- package/dist/tools/query-memory.d.ts +11 -2
- package/dist/tools/query-space.d.ts +4 -1
- package/dist/tools/retract.d.ts +29 -0
- package/dist/tools/revise.d.ts +45 -0
- package/dist/tools/revise.spec.d.ts +8 -0
- package/dist/tools/search-memory.d.ts +8 -1
- package/dist/tools/search-relationship.d.ts +10 -2
- package/dist/tools/search-space.d.ts +25 -5
- package/dist/tools/search-space.spec.d.ts +9 -0
- package/dist/tools/set-preference.d.ts +2 -1
- package/dist/tools/update-memory.d.ts +2 -1
- package/dist/tools/update-relationship.d.ts +2 -1
- package/dist/types/access-result.d.ts +48 -0
- package/dist/types/access-result.spec.d.ts +2 -0
- package/dist/types/auth.d.ts +46 -0
- package/dist/types/ghost-config.d.ts +36 -0
- package/dist/types/memory.d.ts +11 -1
- package/dist/types/preferences.d.ts +1 -1
- package/dist/types/space-memory.d.ts +3 -0
- package/dist/utils/auth-helpers.d.ts +14 -0
- package/dist/utils/auth-helpers.spec.d.ts +2 -0
- package/dist/utils/test-data-generator.d.ts +124 -0
- package/dist/utils/test-data-generator.spec.d.ts +12 -0
- package/dist/utils/weaviate-filters.d.ts +19 -0
- package/dist/v2-performance.e2e.d.ts +17 -0
- package/dist/v2-smoke.e2e.d.ts +14 -0
- package/dist/weaviate/client.d.ts +5 -8
- package/dist/weaviate/space-schema.d.ts +2 -2
- package/docs/performance/v2-benchmarks.md +80 -0
- package/jest.e2e.config.js +14 -3
- package/package.json +1 -1
- package/scripts/.collection-recreation-state.yaml +16 -0
- package/scripts/.gitkeep +5 -0
- package/scripts/README-collection-recreation.md +224 -0
- package/scripts/README.md +51 -0
- package/scripts/backup-collections.ts +543 -0
- package/scripts/delete-collection.ts +137 -0
- package/scripts/migrate-recreate-collections.ts +578 -0
- package/scripts/migrate-v1-to-v2.ts +1094 -0
- package/scripts/package-lock.json +1113 -0
- package/scripts/package.json +27 -0
- package/src/collections/composite-ids.ts +193 -0
- package/src/collections/core-infrastructure.spec.ts +353 -0
- package/src/collections/dot-notation.ts +212 -0
- package/src/collections/tracking-arrays.ts +298 -0
- package/src/constants/content-types.ts +20 -0
- package/src/schema/v2-collections-comments.spec.ts +141 -0
- package/src/schema/v2-collections.ts +433 -0
- package/src/server-factory.ts +89 -20
- package/src/server.ts +45 -17
- package/src/services/access-control.spec.ts +383 -0
- package/src/services/access-control.ts +291 -0
- package/src/services/credentials-provider.spec.ts +22 -0
- package/src/services/credentials-provider.ts +34 -0
- package/src/services/escalation.service.spec.ts +183 -0
- package/src/services/escalation.service.ts +150 -0
- package/src/services/ghost-config.service.spec.ts +339 -0
- package/src/services/ghost-config.service.ts +219 -0
- package/src/services/space-config.service.spec.ts +102 -0
- package/src/services/space-config.service.ts +79 -0
- package/src/services/trust-enforcement.spec.ts +309 -0
- package/src/services/trust-enforcement.ts +197 -0
- package/src/services/trust-validator.spec.ts +108 -0
- package/src/services/trust-validator.ts +105 -0
- package/src/tools/confirm-publish-moderation.spec.ts +240 -0
- package/src/tools/confirm.ts +914 -116
- package/src/tools/create-memory.spec.ts +126 -0
- package/src/tools/create-memory.ts +20 -27
- package/src/tools/create-relationship.ts +30 -8
- package/src/tools/delete-memory.ts +99 -64
- package/src/tools/delete-relationship.ts +15 -6
- package/src/tools/deny.ts +8 -1
- package/src/tools/find-similar.ts +44 -6
- package/src/tools/get-preferences.ts +10 -1
- package/src/tools/ghost-config.spec.ts +180 -0
- package/src/tools/ghost-config.ts +230 -0
- package/src/tools/moderate.spec.ts +277 -0
- package/src/tools/moderate.ts +219 -0
- package/src/tools/publish.ts +99 -41
- package/src/tools/query-memory.ts +44 -9
- package/src/tools/query-space.ts +39 -4
- package/src/tools/retract.ts +292 -0
- package/src/tools/revise.spec.ts +146 -0
- package/src/tools/revise.ts +283 -0
- package/src/tools/search-memory.ts +46 -10
- package/src/tools/search-relationship.ts +30 -7
- package/src/tools/search-space.spec.ts +341 -0
- package/src/tools/search-space.ts +323 -99
- package/src/tools/set-preference.ts +10 -1
- package/src/tools/update-memory.ts +24 -5
- package/src/tools/update-relationship.ts +10 -1
- package/src/types/access-result.spec.ts +193 -0
- package/src/types/access-result.ts +62 -0
- package/src/types/auth.ts +52 -0
- package/src/types/ghost-config.ts +46 -0
- package/src/types/memory.ts +20 -1
- package/src/types/preferences.ts +2 -2
- package/src/types/space-memory.ts +5 -0
- package/src/utils/auth-helpers.spec.ts +75 -0
- package/src/utils/auth-helpers.ts +25 -0
- package/src/utils/test-data-generator.spec.ts +317 -0
- package/src/utils/test-data-generator.ts +292 -0
- package/src/utils/weaviate-filters.ts +32 -5
- package/src/v2-performance.e2e.ts +173 -0
- package/src/v2-smoke.e2e.ts +401 -0
- package/src/weaviate/client.spec.ts +5 -5
- package/src/weaviate/client.ts +55 -35
- package/src/weaviate/schema.ts +11 -239
- package/src/weaviate/space-schema.spec.ts +28 -25
- package/src/weaviate/space-schema.ts +35 -11
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composite ID Utilities
|
|
3
|
+
*
|
|
4
|
+
* Provides utilities for working with composite IDs in Memory Collection Pattern v2.
|
|
5
|
+
* Composite IDs preserve the source reference when memories are published to spaces or groups.
|
|
6
|
+
*
|
|
7
|
+
* Format: {userId}.{memoryId}
|
|
8
|
+
* Example: "user123.my-recipe"
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Components of a composite ID
|
|
12
|
+
*/
|
|
13
|
+
export interface CompositeIdComponents {
|
|
14
|
+
userId: string;
|
|
15
|
+
memoryId: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Error thrown when composite ID is invalid
|
|
19
|
+
*/
|
|
20
|
+
export declare class InvalidCompositeIdError extends Error {
|
|
21
|
+
constructor(message: string);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Generate a composite ID from user ID and memory ID
|
|
25
|
+
*
|
|
26
|
+
* @param userId - User ID (must not contain dots)
|
|
27
|
+
* @param memoryId - Memory ID (must not contain dots)
|
|
28
|
+
* @returns Composite ID in format {userId}.{memoryId}
|
|
29
|
+
* @throws {InvalidCompositeIdError} If userId or memoryId contains dots
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* generateCompositeId('user123', 'my-recipe')
|
|
33
|
+
* // Returns: 'user123.my-recipe'
|
|
34
|
+
*/
|
|
35
|
+
export declare function generateCompositeId(userId: string, memoryId: string): string;
|
|
36
|
+
/**
|
|
37
|
+
* Parse a composite ID into its components
|
|
38
|
+
*
|
|
39
|
+
* @param compositeId - Composite ID to parse
|
|
40
|
+
* @returns Object with userId and memoryId
|
|
41
|
+
* @throws {InvalidCompositeIdError} If composite ID format is invalid
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* parseCompositeId('user123.my-recipe')
|
|
45
|
+
* // Returns: { userId: 'user123', memoryId: 'my-recipe' }
|
|
46
|
+
*/
|
|
47
|
+
export declare function parseCompositeId(compositeId: string): CompositeIdComponents;
|
|
48
|
+
/**
|
|
49
|
+
* Check if a string is a composite ID
|
|
50
|
+
*
|
|
51
|
+
* @param id - String to check
|
|
52
|
+
* @returns true if valid composite ID, false otherwise
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* isCompositeId('user123.my-recipe') // true
|
|
56
|
+
* isCompositeId('simple-id') // false
|
|
57
|
+
* isCompositeId('too.many.dots') // false
|
|
58
|
+
*/
|
|
59
|
+
export declare function isCompositeId(id: string): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Validate a composite ID (returns true on valid, throws on invalid)
|
|
62
|
+
*
|
|
63
|
+
* @param id - Composite ID to validate
|
|
64
|
+
* @returns true if valid
|
|
65
|
+
* @throws {InvalidCompositeIdError} If composite ID is invalid
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* validateCompositeId('user123.my-recipe') // Returns true
|
|
69
|
+
* validateCompositeId('invalid') // Throws InvalidCompositeIdError
|
|
70
|
+
*/
|
|
71
|
+
export declare function validateCompositeId(id: string): true;
|
|
72
|
+
/**
|
|
73
|
+
* Extract user ID from a composite ID
|
|
74
|
+
*
|
|
75
|
+
* @param compositeId - Composite ID
|
|
76
|
+
* @returns User ID component
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* getUserIdFromComposite('user123.my-recipe')
|
|
80
|
+
* // Returns: 'user123'
|
|
81
|
+
*/
|
|
82
|
+
export declare function getUserIdFromComposite(compositeId: string): string;
|
|
83
|
+
/**
|
|
84
|
+
* Extract memory ID from a composite ID
|
|
85
|
+
*
|
|
86
|
+
* @param compositeId - Composite ID
|
|
87
|
+
* @returns Memory ID component
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* getMemoryIdFromComposite('user123.my-recipe')
|
|
91
|
+
* // Returns: 'my-recipe'
|
|
92
|
+
*/
|
|
93
|
+
export declare function getMemoryIdFromComposite(compositeId: string): string;
|
|
94
|
+
/**
|
|
95
|
+
* Check if an ID belongs to a specific user
|
|
96
|
+
*
|
|
97
|
+
* @param compositeId - Composite ID to check
|
|
98
|
+
* @param userId - User ID to match
|
|
99
|
+
* @returns true if composite ID belongs to user, false otherwise
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* belongsToUser('user123.my-recipe', 'user123') // true
|
|
103
|
+
* belongsToUser('user123.my-recipe', 'user456') // false
|
|
104
|
+
*/
|
|
105
|
+
export declare function belongsToUser(compositeId: string, userId: string): boolean;
|
|
106
|
+
//# sourceMappingURL=composite-ids.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit tests for Memory Collection Pattern v2 Core Infrastructure
|
|
3
|
+
*
|
|
4
|
+
* Tests core functionality of:
|
|
5
|
+
* - Dot notation collection utilities
|
|
6
|
+
* - Composite ID utilities
|
|
7
|
+
* - Tracking array management
|
|
8
|
+
* - Schema definitions
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=core-infrastructure.spec.d.ts.map
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dot Notation Collection Utilities
|
|
3
|
+
*
|
|
4
|
+
* Provides utilities for working with Memory Collection Pattern v2's
|
|
5
|
+
* dot notation collection naming scheme.
|
|
6
|
+
*
|
|
7
|
+
* Collection Types:
|
|
8
|
+
* - USERS: Memory_users_{userId} - Private user memories
|
|
9
|
+
* - SPACES: Memory_spaces_public - All public space memories
|
|
10
|
+
* - GROUPS: Memory_groups_{groupId} - Group memories
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Collection type enum for Memory Collection Pattern v2
|
|
14
|
+
*/
|
|
15
|
+
export declare enum CollectionType {
|
|
16
|
+
USERS = "USERS",
|
|
17
|
+
SPACES = "SPACES",
|
|
18
|
+
GROUPS = "GROUPS"
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Metadata about a parsed collection
|
|
22
|
+
*/
|
|
23
|
+
export interface CollectionMetadata {
|
|
24
|
+
type: CollectionType;
|
|
25
|
+
id?: string;
|
|
26
|
+
name: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Error thrown when collection name is invalid
|
|
30
|
+
*/
|
|
31
|
+
export declare class InvalidCollectionNameError extends Error {
|
|
32
|
+
constructor(message: string);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Get the Weaviate collection name for a given type and optional ID
|
|
36
|
+
*
|
|
37
|
+
* @param type - Collection type (USERS, SPACES, or GROUPS)
|
|
38
|
+
* @param id - Optional ID (required for USERS and GROUPS, not used for SPACES)
|
|
39
|
+
* @returns Weaviate collection name
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* getCollectionName(CollectionType.USERS, 'user123')
|
|
43
|
+
* // Returns: 'Memory_users_user123'
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* getCollectionName(CollectionType.SPACES)
|
|
47
|
+
* // Returns: 'Memory_spaces_public'
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* getCollectionName(CollectionType.GROUPS, 'group456')
|
|
51
|
+
* // Returns: 'Memory_groups_group456'
|
|
52
|
+
*/
|
|
53
|
+
export declare function getCollectionName(type: CollectionType, id?: string): string;
|
|
54
|
+
/**
|
|
55
|
+
* Parse a collection name into its components
|
|
56
|
+
*
|
|
57
|
+
* @param name - Weaviate collection name
|
|
58
|
+
* @returns Collection metadata with type, optional ID, and name
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* parseCollectionName('Memory_users_user123')
|
|
62
|
+
* // Returns: { type: CollectionType.USERS, id: 'user123', name: 'Memory_users_user123' }
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* parseCollectionName('Memory_spaces_public')
|
|
66
|
+
* // Returns: { type: CollectionType.SPACES, id: undefined, name: 'Memory_spaces_public' }
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* parseCollectionName('Memory_groups_group456')
|
|
70
|
+
* // Returns: { type: CollectionType.GROUPS, id: 'group456', name: 'Memory_groups_group456' }
|
|
71
|
+
*/
|
|
72
|
+
export declare function parseCollectionName(name: string): CollectionMetadata;
|
|
73
|
+
/**
|
|
74
|
+
* Validate a collection name
|
|
75
|
+
*
|
|
76
|
+
* @param name - Collection name to validate
|
|
77
|
+
* @returns true if valid, false otherwise
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* validateCollectionName('Memory_users_user123') // true
|
|
81
|
+
* validateCollectionName('Memory_spaces_public') // true
|
|
82
|
+
* validateCollectionName('Invalid_name') // false
|
|
83
|
+
*/
|
|
84
|
+
export declare function validateCollectionName(name: string): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Check if a collection name is a user collection
|
|
87
|
+
*
|
|
88
|
+
* @param name - Collection name to check
|
|
89
|
+
* @returns true if user collection, false otherwise
|
|
90
|
+
*/
|
|
91
|
+
export declare function isUserCollection(name: string): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Check if a collection name is the spaces collection
|
|
94
|
+
*
|
|
95
|
+
* @param name - Collection name to check
|
|
96
|
+
* @returns true if spaces collection, false otherwise
|
|
97
|
+
*/
|
|
98
|
+
export declare function isSpacesCollection(name: string): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Check if a collection name is a group collection
|
|
101
|
+
*
|
|
102
|
+
* @param name - Collection name to check
|
|
103
|
+
* @returns true if group collection, false otherwise
|
|
104
|
+
*/
|
|
105
|
+
export declare function isGroupCollection(name: string): boolean;
|
|
106
|
+
//# sourceMappingURL=dot-notation.d.ts.map
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tracking Array Management
|
|
3
|
+
*
|
|
4
|
+
* Provides utilities for managing space_ids and group_ids tracking arrays
|
|
5
|
+
* in Memory Collection Pattern v2. These arrays track where memories have
|
|
6
|
+
* been published.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Memory with tracking arrays
|
|
10
|
+
*/
|
|
11
|
+
export interface MemoryWithTracking {
|
|
12
|
+
space_ids: string[];
|
|
13
|
+
group_ids: string[];
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Published locations summary
|
|
18
|
+
*/
|
|
19
|
+
export interface PublishedLocations {
|
|
20
|
+
spaces: string[];
|
|
21
|
+
groups: string[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Add a space ID to the space_ids array (immutable)
|
|
25
|
+
*
|
|
26
|
+
* @param memory - Memory object with tracking arrays
|
|
27
|
+
* @param spaceId - Space ID to add
|
|
28
|
+
* @returns New memory object with updated space_ids
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* const memory = { space_ids: ['cooking'], group_ids: [] }
|
|
32
|
+
* addToSpaceIds(memory, 'recipes')
|
|
33
|
+
* // Returns: { space_ids: ['cooking', 'recipes'], group_ids: [] }
|
|
34
|
+
*/
|
|
35
|
+
export declare function addToSpaceIds<T extends MemoryWithTracking>(memory: T, spaceId: string): T;
|
|
36
|
+
/**
|
|
37
|
+
* Remove a space ID from the space_ids array (immutable)
|
|
38
|
+
*
|
|
39
|
+
* @param memory - Memory object with tracking arrays
|
|
40
|
+
* @param spaceId - Space ID to remove
|
|
41
|
+
* @returns New memory object with updated space_ids
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* const memory = { space_ids: ['cooking', 'recipes'], group_ids: [] }
|
|
45
|
+
* removeFromSpaceIds(memory, 'cooking')
|
|
46
|
+
* // Returns: { space_ids: ['recipes'], group_ids: [] }
|
|
47
|
+
*/
|
|
48
|
+
export declare function removeFromSpaceIds<T extends MemoryWithTracking>(memory: T, spaceId: string): T;
|
|
49
|
+
/**
|
|
50
|
+
* Add a group ID to the group_ids array (immutable)
|
|
51
|
+
*
|
|
52
|
+
* @param memory - Memory object with tracking arrays
|
|
53
|
+
* @param groupId - Group ID to add
|
|
54
|
+
* @returns New memory object with updated group_ids
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* const memory = { space_ids: [], group_ids: ['family'] }
|
|
58
|
+
* addToGroupIds(memory, 'friends')
|
|
59
|
+
* // Returns: { space_ids: [], group_ids: ['family', 'friends'] }
|
|
60
|
+
*/
|
|
61
|
+
export declare function addToGroupIds<T extends MemoryWithTracking>(memory: T, groupId: string): T;
|
|
62
|
+
/**
|
|
63
|
+
* Remove a group ID from the group_ids array (immutable)
|
|
64
|
+
*
|
|
65
|
+
* @param memory - Memory object with tracking arrays
|
|
66
|
+
* @param groupId - Group ID to remove
|
|
67
|
+
* @returns New memory object with updated group_ids
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* const memory = { space_ids: [], group_ids: ['family', 'friends'] }
|
|
71
|
+
* removeFromGroupIds(memory, 'family')
|
|
72
|
+
* // Returns: { space_ids: [], group_ids: ['friends'] }
|
|
73
|
+
*/
|
|
74
|
+
export declare function removeFromGroupIds<T extends MemoryWithTracking>(memory: T, groupId: string): T;
|
|
75
|
+
/**
|
|
76
|
+
* Check if memory is published to a specific space
|
|
77
|
+
*
|
|
78
|
+
* @param memory - Memory object with tracking arrays
|
|
79
|
+
* @param spaceId - Space ID to check
|
|
80
|
+
* @returns true if published to space, false otherwise
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* const memory = { space_ids: ['cooking'], group_ids: [] }
|
|
84
|
+
* isPublishedToSpace(memory, 'cooking') // true
|
|
85
|
+
* isPublishedToSpace(memory, 'recipes') // false
|
|
86
|
+
*/
|
|
87
|
+
export declare function isPublishedToSpace(memory: MemoryWithTracking, spaceId: string): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Check if memory is published to a specific group
|
|
90
|
+
*
|
|
91
|
+
* @param memory - Memory object with tracking arrays
|
|
92
|
+
* @param groupId - Group ID to check
|
|
93
|
+
* @returns true if published to group, false otherwise
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* const memory = { space_ids: [], group_ids: ['family'] }
|
|
97
|
+
* isPublishedToGroup(memory, 'family') // true
|
|
98
|
+
* isPublishedToGroup(memory, 'friends') // false
|
|
99
|
+
*/
|
|
100
|
+
export declare function isPublishedToGroup(memory: MemoryWithTracking, groupId: string): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Get all published locations for a memory
|
|
103
|
+
*
|
|
104
|
+
* @param memory - Memory object with tracking arrays
|
|
105
|
+
* @returns Object with spaces and groups arrays
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* const memory = { space_ids: ['cooking', 'recipes'], group_ids: ['family'] }
|
|
109
|
+
* getPublishedLocations(memory)
|
|
110
|
+
* // Returns: { spaces: ['cooking', 'recipes'], groups: ['family'] }
|
|
111
|
+
*/
|
|
112
|
+
export declare function getPublishedLocations(memory: MemoryWithTracking): PublishedLocations;
|
|
113
|
+
/**
|
|
114
|
+
* Check if memory is published anywhere
|
|
115
|
+
*
|
|
116
|
+
* @param memory - Memory object with tracking arrays
|
|
117
|
+
* @returns true if published to any space or group, false otherwise
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* const memory = { space_ids: ['cooking'], group_ids: [] }
|
|
121
|
+
* isPublished(memory) // true
|
|
122
|
+
*
|
|
123
|
+
* const unpublished = { space_ids: [], group_ids: [] }
|
|
124
|
+
* isPublished(unpublished) // false
|
|
125
|
+
*/
|
|
126
|
+
export declare function isPublished(memory: MemoryWithTracking): boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Get count of published locations
|
|
129
|
+
*
|
|
130
|
+
* @param memory - Memory object with tracking arrays
|
|
131
|
+
* @returns Total number of spaces and groups memory is published to
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* const memory = { space_ids: ['cooking', 'recipes'], group_ids: ['family'] }
|
|
135
|
+
* getPublishedCount(memory) // 3
|
|
136
|
+
*/
|
|
137
|
+
export declare function getPublishedCount(memory: MemoryWithTracking): number;
|
|
138
|
+
/**
|
|
139
|
+
* Initialize tracking arrays on a memory object (immutable)
|
|
140
|
+
*
|
|
141
|
+
* @param memory - Memory object (may not have tracking arrays)
|
|
142
|
+
* @returns New memory object with initialized tracking arrays
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* const memory = { id: '123', content: 'test' }
|
|
146
|
+
* initializeTracking(memory)
|
|
147
|
+
* // Returns: { id: '123', content: 'test', space_ids: [], group_ids: [] }
|
|
148
|
+
*/
|
|
149
|
+
export declare function initializeTracking<T extends Record<string, any>>(memory: T): T & MemoryWithTracking;
|
|
150
|
+
/**
|
|
151
|
+
* Add multiple space IDs at once (immutable)
|
|
152
|
+
*
|
|
153
|
+
* @param memory - Memory object with tracking arrays
|
|
154
|
+
* @param spaceIds - Array of space IDs to add
|
|
155
|
+
* @returns New memory object with updated space_ids
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* const memory = { space_ids: ['cooking'], group_ids: [] }
|
|
159
|
+
* addMultipleSpaceIds(memory, ['recipes', 'baking'])
|
|
160
|
+
* // Returns: { space_ids: ['cooking', 'recipes', 'baking'], group_ids: [] }
|
|
161
|
+
*/
|
|
162
|
+
export declare function addMultipleSpaceIds<T extends MemoryWithTracking>(memory: T, spaceIds: string[]): T;
|
|
163
|
+
/**
|
|
164
|
+
* Add multiple group IDs at once (immutable)
|
|
165
|
+
*
|
|
166
|
+
* @param memory - Memory object with tracking arrays
|
|
167
|
+
* @param groupIds - Array of group IDs to add
|
|
168
|
+
* @returns New memory object with updated group_ids
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* const memory = { space_ids: [], group_ids: ['family'] }
|
|
172
|
+
* addMultipleGroupIds(memory, ['friends', 'coworkers'])
|
|
173
|
+
* // Returns: { space_ids: [], group_ids: ['family', 'friends', 'coworkers'] }
|
|
174
|
+
*/
|
|
175
|
+
export declare function addMultipleGroupIds<T extends MemoryWithTracking>(memory: T, groupIds: string[]): T;
|
|
176
|
+
//# sourceMappingURL=tracking-arrays.d.ts.map
|
|
@@ -35,6 +35,7 @@ export declare const CONTENT_TYPE_CATEGORIES: {
|
|
|
35
35
|
readonly organizational: readonly ["bookmark", "form", "location"];
|
|
36
36
|
readonly business: readonly ["invoice", "contract"];
|
|
37
37
|
readonly system: readonly ["system", "action", "audit", "history"];
|
|
38
|
+
readonly cross_user: readonly ["ghost", "comment"];
|
|
38
39
|
};
|
|
39
40
|
/**
|
|
40
41
|
* Get content type metadata
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for comment-related schema fields in v2 collections.
|
|
3
|
+
*
|
|
4
|
+
* Verifies that parent_id, thread_root_id, and moderation_flags
|
|
5
|
+
* are present in both user and published collection schemas.
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=v2-collections-comments.spec.d.ts.map
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Weaviate Schema Definitions for Memory Collection Pattern v2
|
|
3
|
+
*
|
|
4
|
+
* Defines schemas for the three collection types:
|
|
5
|
+
* 1. Memory_users_{userId} - User's private memories
|
|
6
|
+
* 2. Memory_spaces_public - Shared space memories
|
|
7
|
+
* 3. Memory_groups_{groupId} - Group memories
|
|
8
|
+
*/
|
|
9
|
+
import { WeaviateClient } from 'weaviate-client';
|
|
10
|
+
/**
|
|
11
|
+
* Create schema for a user's private memory collection
|
|
12
|
+
*
|
|
13
|
+
* @param userId - The user ID
|
|
14
|
+
* @returns Weaviate collection schema configuration
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* const schema = createUserCollectionSchema('user123')
|
|
19
|
+
* await client.collections.create(schema)
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function createUserCollectionSchema(userId: string): {
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
vectorizers: import("weaviate-client").VectorConfigCreate<never, undefined, "hnsw", "text2vec-openai">;
|
|
26
|
+
properties: ({
|
|
27
|
+
name: string;
|
|
28
|
+
dataType: "text";
|
|
29
|
+
} | {
|
|
30
|
+
name: string;
|
|
31
|
+
dataType: "text[]";
|
|
32
|
+
} | {
|
|
33
|
+
name: string;
|
|
34
|
+
dataType: "date";
|
|
35
|
+
} | {
|
|
36
|
+
name: string;
|
|
37
|
+
dataType: "int";
|
|
38
|
+
} | {
|
|
39
|
+
name: string;
|
|
40
|
+
dataType: "number";
|
|
41
|
+
})[];
|
|
42
|
+
invertedIndex: {
|
|
43
|
+
bm25?: {
|
|
44
|
+
k1?: number | undefined;
|
|
45
|
+
b?: number | undefined;
|
|
46
|
+
} | undefined;
|
|
47
|
+
cleanupIntervalSeconds?: number | undefined;
|
|
48
|
+
indexTimestamps?: boolean | undefined;
|
|
49
|
+
indexPropertyLength?: boolean | undefined;
|
|
50
|
+
indexNullState?: boolean | undefined;
|
|
51
|
+
stopwords?: {
|
|
52
|
+
preset?: string | undefined;
|
|
53
|
+
additions?: (string | undefined)[] | undefined;
|
|
54
|
+
removals?: (string | undefined)[] | undefined;
|
|
55
|
+
} | undefined;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Create schema for the shared spaces collection
|
|
60
|
+
*
|
|
61
|
+
* @returns Weaviate collection schema configuration
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* const schema = createSpaceCollectionSchema()
|
|
66
|
+
* await client.collections.create(schema)
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
export declare function createSpaceCollectionSchema(): {
|
|
70
|
+
name: string;
|
|
71
|
+
description: string;
|
|
72
|
+
vectorizers: import("weaviate-client").VectorConfigCreate<never, undefined, "hnsw", "text2vec-openai">;
|
|
73
|
+
properties: ({
|
|
74
|
+
name: string;
|
|
75
|
+
dataType: "text";
|
|
76
|
+
} | {
|
|
77
|
+
name: string;
|
|
78
|
+
dataType: "text[]";
|
|
79
|
+
} | {
|
|
80
|
+
name: string;
|
|
81
|
+
dataType: "date";
|
|
82
|
+
} | {
|
|
83
|
+
name: string;
|
|
84
|
+
dataType: "int";
|
|
85
|
+
} | {
|
|
86
|
+
name: string;
|
|
87
|
+
dataType: "number";
|
|
88
|
+
})[];
|
|
89
|
+
invertedIndex: {
|
|
90
|
+
bm25?: {
|
|
91
|
+
k1?: number | undefined;
|
|
92
|
+
b?: number | undefined;
|
|
93
|
+
} | undefined;
|
|
94
|
+
cleanupIntervalSeconds?: number | undefined;
|
|
95
|
+
indexTimestamps?: boolean | undefined;
|
|
96
|
+
indexPropertyLength?: boolean | undefined;
|
|
97
|
+
indexNullState?: boolean | undefined;
|
|
98
|
+
stopwords?: {
|
|
99
|
+
preset?: string | undefined;
|
|
100
|
+
additions?: (string | undefined)[] | undefined;
|
|
101
|
+
removals?: (string | undefined)[] | undefined;
|
|
102
|
+
} | undefined;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Create schema for a group memory collection
|
|
107
|
+
*
|
|
108
|
+
* @param groupId - The group ID
|
|
109
|
+
* @returns Weaviate collection schema configuration
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```typescript
|
|
113
|
+
* const schema = createGroupCollectionSchema('group456')
|
|
114
|
+
* await client.collections.create(schema)
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
export declare function createGroupCollectionSchema(groupId: string): {
|
|
118
|
+
name: string;
|
|
119
|
+
description: string;
|
|
120
|
+
vectorizers: import("weaviate-client").VectorConfigCreate<never, undefined, "hnsw", "text2vec-openai">;
|
|
121
|
+
properties: ({
|
|
122
|
+
name: string;
|
|
123
|
+
dataType: "text";
|
|
124
|
+
} | {
|
|
125
|
+
name: string;
|
|
126
|
+
dataType: "text[]";
|
|
127
|
+
} | {
|
|
128
|
+
name: string;
|
|
129
|
+
dataType: "date";
|
|
130
|
+
} | {
|
|
131
|
+
name: string;
|
|
132
|
+
dataType: "int";
|
|
133
|
+
} | {
|
|
134
|
+
name: string;
|
|
135
|
+
dataType: "number";
|
|
136
|
+
})[];
|
|
137
|
+
invertedIndex: {
|
|
138
|
+
bm25?: {
|
|
139
|
+
k1?: number | undefined;
|
|
140
|
+
b?: number | undefined;
|
|
141
|
+
} | undefined;
|
|
142
|
+
cleanupIntervalSeconds?: number | undefined;
|
|
143
|
+
indexTimestamps?: boolean | undefined;
|
|
144
|
+
indexPropertyLength?: boolean | undefined;
|
|
145
|
+
indexNullState?: boolean | undefined;
|
|
146
|
+
stopwords?: {
|
|
147
|
+
preset?: string | undefined;
|
|
148
|
+
additions?: (string | undefined)[] | undefined;
|
|
149
|
+
removals?: (string | undefined)[] | undefined;
|
|
150
|
+
} | undefined;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Ensure a user collection exists (create if needed)
|
|
155
|
+
*
|
|
156
|
+
* @param client - Weaviate client
|
|
157
|
+
* @param userId - The user ID
|
|
158
|
+
* @returns True if collection was created, false if it already existed
|
|
159
|
+
*/
|
|
160
|
+
export declare function ensureUserCollection(client: WeaviateClient, userId: string): Promise<boolean>;
|
|
161
|
+
/**
|
|
162
|
+
* Ensure the spaces collection exists (create if needed)
|
|
163
|
+
*
|
|
164
|
+
* @param client - Weaviate client
|
|
165
|
+
* @returns True if collection was created, false if it already existed
|
|
166
|
+
*/
|
|
167
|
+
export declare function ensureSpaceCollection(client: WeaviateClient): Promise<boolean>;
|
|
168
|
+
/**
|
|
169
|
+
* Ensure a group collection exists (create if needed)
|
|
170
|
+
*
|
|
171
|
+
* @param client - Weaviate client
|
|
172
|
+
* @param groupId - The group ID
|
|
173
|
+
* @returns True if collection was created, false if it already existed
|
|
174
|
+
*/
|
|
175
|
+
export declare function ensureGroupCollection(client: WeaviateClient, groupId: string): Promise<boolean>;
|
|
176
|
+
/**
|
|
177
|
+
* Get all property names for user collections
|
|
178
|
+
*
|
|
179
|
+
* @returns Array of property names
|
|
180
|
+
*/
|
|
181
|
+
export declare function getUserCollectionProperties(): string[];
|
|
182
|
+
/**
|
|
183
|
+
* Get all property names for space/group collections
|
|
184
|
+
*
|
|
185
|
+
* @returns Array of property names
|
|
186
|
+
*/
|
|
187
|
+
export declare function getPublishedCollectionProperties(): string[];
|
|
188
|
+
/**
|
|
189
|
+
* Validate that a collection name matches the expected v2 pattern
|
|
190
|
+
*
|
|
191
|
+
* @param collectionName - The collection name to validate
|
|
192
|
+
* @returns True if valid
|
|
193
|
+
* @throws Error if invalid
|
|
194
|
+
*/
|
|
195
|
+
export declare function validateV2CollectionName(collectionName: string): boolean;
|
|
196
|
+
/**
|
|
197
|
+
* Get the collection type from a collection name
|
|
198
|
+
*
|
|
199
|
+
* @param collectionName - The collection name
|
|
200
|
+
* @returns 'users', 'spaces', or 'groups'
|
|
201
|
+
*/
|
|
202
|
+
export declare function getCollectionType(collectionName: string): 'users' | 'spaces' | 'groups';
|
|
203
|
+
/**
|
|
204
|
+
* Extract the ID from a user or group collection name
|
|
205
|
+
*
|
|
206
|
+
* @param collectionName - The collection name
|
|
207
|
+
* @returns The user ID or group ID
|
|
208
|
+
*/
|
|
209
|
+
export declare function extractIdFromCollectionName(collectionName: string): string | null;
|
|
210
|
+
//# sourceMappingURL=v2-collections.d.ts.map
|
package/dist/server-factory.d.ts
CHANGED
|
@@ -6,6 +6,21 @@ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
|
6
6
|
export interface ServerOptions {
|
|
7
7
|
name?: string;
|
|
8
8
|
version?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Ghost mode configuration. When set, the server operates in ghost mode:
|
|
11
|
+
* - Search/query tools search the ghost owner's collection
|
|
12
|
+
* - Trust filtering is applied based on the accessor's trust level
|
|
13
|
+
* - Trust level is resolved server-side from GhostConfig (Firestore)
|
|
14
|
+
*
|
|
15
|
+
* agentbase.me sets this when creating a ghost conversation server.
|
|
16
|
+
* The LLM never has access to set or override these values.
|
|
17
|
+
*/
|
|
18
|
+
ghostMode?: {
|
|
19
|
+
/** Ghost owner's user ID (whose memories to search) */
|
|
20
|
+
owner_user_id: string;
|
|
21
|
+
/** Accessor's user ID (who is chatting with the ghost) */
|
|
22
|
+
accessor_user_id: string;
|
|
23
|
+
};
|
|
9
24
|
}
|
|
10
25
|
/**
|
|
11
26
|
* Create a server instance for a specific user/tenant
|