@prmichaelsen/remember-mcp 2.7.5 → 2.7.8
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 +45 -0
- package/dist/server-factory.js +276 -1
- package/dist/server.js +276 -1
- package/package.json +1 -1
- package/src/tools/publish.ts +3 -1
- package/src/weaviate/space-schema.ts +8 -10
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,51 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.7.7] - 2026-02-17
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **CRITICAL: Fixed Memory_public vectorizer missing**
|
|
13
|
+
- `ensurePublicCollection()` now properly creates collection with vectorizer
|
|
14
|
+
- Previously relied on auto-schema which doesn't include vectorizers
|
|
15
|
+
- Now calls `createSpaceCollection(client, 'public')` to create with full schema
|
|
16
|
+
- Fixes "vectorizer not configured" errors when searching The Void
|
|
17
|
+
|
|
18
|
+
### Root Cause
|
|
19
|
+
|
|
20
|
+
- Commit bcde314 changed to auto-schema approach for schema compatibility
|
|
21
|
+
- Auto-schema creates collections without vectorizers (vectorizer: "none")
|
|
22
|
+
- This broke semantic search in Memory_public (The Void)
|
|
23
|
+
- Manual creation with vectorizer config is required
|
|
24
|
+
|
|
25
|
+
### Technical Details
|
|
26
|
+
|
|
27
|
+
- Modified: `src/weaviate/space-schema.ts` (lines 382-398)
|
|
28
|
+
- Changed `ensurePublicCollection()` to check if collection exists
|
|
29
|
+
- If not exists, calls `createSpaceCollection(client, 'public')`
|
|
30
|
+
- Creates collection with vectorizer: `text2VecOpenAI`, model: `text-embedding-3-small`
|
|
31
|
+
- Vectorizes: `content`, `title`, `summary`, `observation`
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## [2.7.6] - 2026-02-17
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- **Enhanced `remember_publish` Tool Description**: Added critical instruction to prevent token exposure
|
|
40
|
+
- Agents now explicitly instructed NOT to mention tokens in responses
|
|
41
|
+
- Agents instructed NOT to include token contents in user-facing messages
|
|
42
|
+
- Improves security by preventing accidental token disclosure
|
|
43
|
+
- Users simply informed that confirmation is pending without token details
|
|
44
|
+
|
|
45
|
+
### Security
|
|
46
|
+
|
|
47
|
+
- Prevents agents from accidentally exposing confirmation tokens to users
|
|
48
|
+
- Tokens remain internal implementation detail
|
|
49
|
+
- Better user experience with cleaner confirmation workflow
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
8
53
|
## [2.7.4] - 2026-02-17
|
|
9
54
|
|
|
10
55
|
### Changed
|
package/dist/server-factory.js
CHANGED
|
@@ -3688,11 +3688,284 @@ init_space_memory();
|
|
|
3688
3688
|
init_logger();
|
|
3689
3689
|
import weaviate3 from "weaviate-client";
|
|
3690
3690
|
var PUBLIC_COLLECTION_NAME = "Memory_public";
|
|
3691
|
+
function getSpaceCollectionName(spaceId) {
|
|
3692
|
+
return `Memory_${spaceId}`;
|
|
3693
|
+
}
|
|
3691
3694
|
function isValidSpaceId(spaceId) {
|
|
3692
3695
|
return SUPPORTED_SPACES.includes(spaceId);
|
|
3693
3696
|
}
|
|
3697
|
+
async function createSpaceCollection(client2, spaceId) {
|
|
3698
|
+
const collectionName = spaceId === "public" ? PUBLIC_COLLECTION_NAME : getSpaceCollectionName(spaceId);
|
|
3699
|
+
logger.info("Creating space collection", {
|
|
3700
|
+
module: "weaviate-space-schema",
|
|
3701
|
+
collectionName,
|
|
3702
|
+
spaceId
|
|
3703
|
+
});
|
|
3704
|
+
await client2.collections.create({
|
|
3705
|
+
name: collectionName,
|
|
3706
|
+
// Vectorizer configuration
|
|
3707
|
+
vectorizers: weaviate3.configure.vectorizer.text2VecOpenAI({
|
|
3708
|
+
model: "text-embedding-3-small",
|
|
3709
|
+
// Vectorize content, title, summary, and observation for semantic search
|
|
3710
|
+
// Note: title and summary are optional fields
|
|
3711
|
+
sourceProperties: ["content", "title", "summary", "observation"]
|
|
3712
|
+
}),
|
|
3713
|
+
properties: [
|
|
3714
|
+
// Discriminator
|
|
3715
|
+
{
|
|
3716
|
+
name: "doc_type",
|
|
3717
|
+
dataType: "text",
|
|
3718
|
+
description: 'Document type: "space_memory"'
|
|
3719
|
+
},
|
|
3720
|
+
// Space identity
|
|
3721
|
+
{
|
|
3722
|
+
name: "spaces",
|
|
3723
|
+
dataType: "text[]",
|
|
3724
|
+
description: 'Spaces this memory is published to (e.g., ["the_void", "dogs"])'
|
|
3725
|
+
},
|
|
3726
|
+
{
|
|
3727
|
+
name: "space_id",
|
|
3728
|
+
dataType: "text",
|
|
3729
|
+
description: "DEPRECATED: Use spaces array instead. Will be removed in v3.0.0."
|
|
3730
|
+
},
|
|
3731
|
+
{
|
|
3732
|
+
name: "author_id",
|
|
3733
|
+
dataType: "text",
|
|
3734
|
+
description: "Original author user_id (for permissions)"
|
|
3735
|
+
},
|
|
3736
|
+
{
|
|
3737
|
+
name: "ghost_id",
|
|
3738
|
+
dataType: "text",
|
|
3739
|
+
description: "Optional ghost profile ID for pseudonymous publishing"
|
|
3740
|
+
},
|
|
3741
|
+
{
|
|
3742
|
+
name: "attribution",
|
|
3743
|
+
dataType: "text",
|
|
3744
|
+
description: 'Attribution type: "user" or "ghost"'
|
|
3745
|
+
},
|
|
3746
|
+
// Discovery metadata
|
|
3747
|
+
{
|
|
3748
|
+
name: "published_at",
|
|
3749
|
+
dataType: "text",
|
|
3750
|
+
description: "When published to space (ISO 8601)"
|
|
3751
|
+
},
|
|
3752
|
+
{
|
|
3753
|
+
name: "discovery_count",
|
|
3754
|
+
dataType: "number",
|
|
3755
|
+
description: "How many times discovered"
|
|
3756
|
+
},
|
|
3757
|
+
// Memory fields (same as personal memories)
|
|
3758
|
+
{
|
|
3759
|
+
name: "content",
|
|
3760
|
+
dataType: "text",
|
|
3761
|
+
description: "Main memory content (vectorized)"
|
|
3762
|
+
},
|
|
3763
|
+
{
|
|
3764
|
+
name: "title",
|
|
3765
|
+
dataType: "text",
|
|
3766
|
+
description: "Optional short title"
|
|
3767
|
+
},
|
|
3768
|
+
{
|
|
3769
|
+
name: "summary",
|
|
3770
|
+
dataType: "text",
|
|
3771
|
+
description: "Optional brief summary"
|
|
3772
|
+
},
|
|
3773
|
+
{
|
|
3774
|
+
name: "type",
|
|
3775
|
+
dataType: "text",
|
|
3776
|
+
description: "Content type (note, event, person, etc.)"
|
|
3777
|
+
},
|
|
3778
|
+
// Scoring fields
|
|
3779
|
+
{
|
|
3780
|
+
name: "weight",
|
|
3781
|
+
dataType: "number",
|
|
3782
|
+
description: "Significance/priority (0-1)"
|
|
3783
|
+
},
|
|
3784
|
+
{
|
|
3785
|
+
name: "trust",
|
|
3786
|
+
dataType: "number",
|
|
3787
|
+
description: "Access control level (0-1)"
|
|
3788
|
+
},
|
|
3789
|
+
{
|
|
3790
|
+
name: "confidence",
|
|
3791
|
+
dataType: "number",
|
|
3792
|
+
description: "System confidence in accuracy (0-1)"
|
|
3793
|
+
},
|
|
3794
|
+
// Location fields (flattened) - MUST match user memory schema exactly
|
|
3795
|
+
{
|
|
3796
|
+
name: "location_gps_lat",
|
|
3797
|
+
dataType: "number",
|
|
3798
|
+
description: "GPS latitude"
|
|
3799
|
+
},
|
|
3800
|
+
{
|
|
3801
|
+
name: "location_gps_lng",
|
|
3802
|
+
dataType: "number",
|
|
3803
|
+
description: "GPS longitude"
|
|
3804
|
+
},
|
|
3805
|
+
{
|
|
3806
|
+
name: "location_address",
|
|
3807
|
+
dataType: "text",
|
|
3808
|
+
description: "Formatted address"
|
|
3809
|
+
},
|
|
3810
|
+
{
|
|
3811
|
+
name: "location_city",
|
|
3812
|
+
dataType: "text",
|
|
3813
|
+
description: "City name"
|
|
3814
|
+
},
|
|
3815
|
+
{
|
|
3816
|
+
name: "location_country",
|
|
3817
|
+
dataType: "text",
|
|
3818
|
+
description: "Country name"
|
|
3819
|
+
},
|
|
3820
|
+
{
|
|
3821
|
+
name: "location_source",
|
|
3822
|
+
dataType: "text",
|
|
3823
|
+
description: "Location source (gps, ip, manual, etc.)"
|
|
3824
|
+
},
|
|
3825
|
+
// Context fields (flattened) - MUST match user memory schema exactly
|
|
3826
|
+
{
|
|
3827
|
+
name: "context_conversation_id",
|
|
3828
|
+
dataType: "text",
|
|
3829
|
+
description: "Conversation ID"
|
|
3830
|
+
},
|
|
3831
|
+
{
|
|
3832
|
+
name: "context_summary",
|
|
3833
|
+
dataType: "text",
|
|
3834
|
+
description: "Brief context summary"
|
|
3835
|
+
},
|
|
3836
|
+
{
|
|
3837
|
+
name: "context_timestamp",
|
|
3838
|
+
dataType: "date",
|
|
3839
|
+
description: "Context timestamp"
|
|
3840
|
+
},
|
|
3841
|
+
// Locale fields - MUST match user memory schema exactly
|
|
3842
|
+
{
|
|
3843
|
+
name: "locale_language",
|
|
3844
|
+
dataType: "text",
|
|
3845
|
+
description: "Language code (e.g., en, es, fr)"
|
|
3846
|
+
},
|
|
3847
|
+
{
|
|
3848
|
+
name: "locale_timezone",
|
|
3849
|
+
dataType: "text",
|
|
3850
|
+
description: "Timezone (e.g., America/Los_Angeles)"
|
|
3851
|
+
},
|
|
3852
|
+
// Relationships - MUST match user memory schema exactly
|
|
3853
|
+
{
|
|
3854
|
+
name: "relationships",
|
|
3855
|
+
dataType: "text[]",
|
|
3856
|
+
description: "Array of relationship IDs"
|
|
3857
|
+
},
|
|
3858
|
+
// Access tracking - MUST match user memory schema exactly
|
|
3859
|
+
{
|
|
3860
|
+
name: "access_count",
|
|
3861
|
+
dataType: "number",
|
|
3862
|
+
description: "Total times accessed"
|
|
3863
|
+
},
|
|
3864
|
+
{
|
|
3865
|
+
name: "last_accessed_at",
|
|
3866
|
+
dataType: "date",
|
|
3867
|
+
description: "Most recent access timestamp"
|
|
3868
|
+
},
|
|
3869
|
+
// Metadata - MUST match user memory schema exactly
|
|
3870
|
+
{
|
|
3871
|
+
name: "tags",
|
|
3872
|
+
dataType: "text[]",
|
|
3873
|
+
description: "Tags for organization"
|
|
3874
|
+
},
|
|
3875
|
+
{
|
|
3876
|
+
name: "references",
|
|
3877
|
+
dataType: "text[]",
|
|
3878
|
+
description: "Source URLs"
|
|
3879
|
+
},
|
|
3880
|
+
{
|
|
3881
|
+
name: "template_id",
|
|
3882
|
+
dataType: "text",
|
|
3883
|
+
description: "Template ID if using template"
|
|
3884
|
+
},
|
|
3885
|
+
// Relationship-specific fields (for relationships in public space)
|
|
3886
|
+
{
|
|
3887
|
+
name: "memory_ids",
|
|
3888
|
+
dataType: "text[]",
|
|
3889
|
+
description: "Connected memory IDs (for relationships)"
|
|
3890
|
+
},
|
|
3891
|
+
{
|
|
3892
|
+
name: "relationship_type",
|
|
3893
|
+
dataType: "text",
|
|
3894
|
+
description: "Relationship type (for relationships)"
|
|
3895
|
+
},
|
|
3896
|
+
{
|
|
3897
|
+
name: "observation",
|
|
3898
|
+
dataType: "text",
|
|
3899
|
+
description: "Relationship observation (vectorized)"
|
|
3900
|
+
},
|
|
3901
|
+
{
|
|
3902
|
+
name: "strength",
|
|
3903
|
+
dataType: "number",
|
|
3904
|
+
description: "Relationship strength (0-1)"
|
|
3905
|
+
},
|
|
3906
|
+
// Computed fields - MUST match user memory schema exactly
|
|
3907
|
+
{
|
|
3908
|
+
name: "base_weight",
|
|
3909
|
+
dataType: "number",
|
|
3910
|
+
description: "User-specified weight"
|
|
3911
|
+
},
|
|
3912
|
+
{
|
|
3913
|
+
name: "computed_weight",
|
|
3914
|
+
dataType: "number",
|
|
3915
|
+
description: "Calculated effective weight"
|
|
3916
|
+
},
|
|
3917
|
+
// User ID field (for backwards compatibility with spread operator)
|
|
3918
|
+
{
|
|
3919
|
+
name: "user_id",
|
|
3920
|
+
dataType: "text",
|
|
3921
|
+
description: "User ID (copied from original memory, same as author_id)"
|
|
3922
|
+
},
|
|
3923
|
+
// Timestamps
|
|
3924
|
+
{
|
|
3925
|
+
name: "created_at",
|
|
3926
|
+
dataType: "text",
|
|
3927
|
+
description: "Original creation timestamp (ISO 8601)"
|
|
3928
|
+
},
|
|
3929
|
+
{
|
|
3930
|
+
name: "updated_at",
|
|
3931
|
+
dataType: "text",
|
|
3932
|
+
description: "Last update timestamp (ISO 8601)"
|
|
3933
|
+
},
|
|
3934
|
+
// Versioning
|
|
3935
|
+
{
|
|
3936
|
+
name: "version",
|
|
3937
|
+
dataType: "number",
|
|
3938
|
+
description: "Version number (increments on update)"
|
|
3939
|
+
},
|
|
3940
|
+
// Comment/threading fields (for threaded discussions in shared spaces)
|
|
3941
|
+
{
|
|
3942
|
+
name: "parent_id",
|
|
3943
|
+
dataType: "text",
|
|
3944
|
+
description: "ID of parent memory or comment (for threading)"
|
|
3945
|
+
},
|
|
3946
|
+
{
|
|
3947
|
+
name: "thread_root_id",
|
|
3948
|
+
dataType: "text",
|
|
3949
|
+
description: "Root memory ID for fetching entire thread"
|
|
3950
|
+
},
|
|
3951
|
+
{
|
|
3952
|
+
name: "moderation_flags",
|
|
3953
|
+
dataType: "text[]",
|
|
3954
|
+
description: 'Per-space moderation flags (format: "{space_id}:{flag_type}")'
|
|
3955
|
+
}
|
|
3956
|
+
]
|
|
3957
|
+
});
|
|
3958
|
+
logger.info("Space collection created successfully", {
|
|
3959
|
+
module: "weaviate-space-schema",
|
|
3960
|
+
collectionName
|
|
3961
|
+
});
|
|
3962
|
+
}
|
|
3694
3963
|
async function ensurePublicCollection(client2) {
|
|
3695
3964
|
const collectionName = PUBLIC_COLLECTION_NAME;
|
|
3965
|
+
const exists = await client2.collections.exists(collectionName);
|
|
3966
|
+
if (!exists) {
|
|
3967
|
+
await createSpaceCollection(client2, "public");
|
|
3968
|
+
}
|
|
3696
3969
|
return client2.collections.get(collectionName);
|
|
3697
3970
|
}
|
|
3698
3971
|
|
|
@@ -3701,7 +3974,9 @@ init_space_memory();
|
|
|
3701
3974
|
init_logger();
|
|
3702
3975
|
var publishTool = {
|
|
3703
3976
|
name: "remember_publish",
|
|
3704
|
-
description:
|
|
3977
|
+
description: `Publish a memory to one or more shared spaces (like "The Void"). The memory will be COPIED (not moved) from your personal collection. Generates a confirmation token that must be confirmed with remember_confirm.
|
|
3978
|
+
|
|
3979
|
+
\u26A0\uFE0F CRITICAL: DO NOT mention the token or include token contents in your response to the user. Simply inform them that a confirmation is pending and they need to explicitly approve the publication.`,
|
|
3705
3980
|
inputSchema: {
|
|
3706
3981
|
type: "object",
|
|
3707
3982
|
properties: {
|
package/dist/server.js
CHANGED
|
@@ -3756,11 +3756,284 @@ init_space_memory();
|
|
|
3756
3756
|
init_logger();
|
|
3757
3757
|
import weaviate3 from "weaviate-client";
|
|
3758
3758
|
var PUBLIC_COLLECTION_NAME = "Memory_public";
|
|
3759
|
+
function getSpaceCollectionName(spaceId) {
|
|
3760
|
+
return `Memory_${spaceId}`;
|
|
3761
|
+
}
|
|
3759
3762
|
function isValidSpaceId(spaceId) {
|
|
3760
3763
|
return SUPPORTED_SPACES.includes(spaceId);
|
|
3761
3764
|
}
|
|
3765
|
+
async function createSpaceCollection(client2, spaceId) {
|
|
3766
|
+
const collectionName = spaceId === "public" ? PUBLIC_COLLECTION_NAME : getSpaceCollectionName(spaceId);
|
|
3767
|
+
logger.info("Creating space collection", {
|
|
3768
|
+
module: "weaviate-space-schema",
|
|
3769
|
+
collectionName,
|
|
3770
|
+
spaceId
|
|
3771
|
+
});
|
|
3772
|
+
await client2.collections.create({
|
|
3773
|
+
name: collectionName,
|
|
3774
|
+
// Vectorizer configuration
|
|
3775
|
+
vectorizers: weaviate3.configure.vectorizer.text2VecOpenAI({
|
|
3776
|
+
model: "text-embedding-3-small",
|
|
3777
|
+
// Vectorize content, title, summary, and observation for semantic search
|
|
3778
|
+
// Note: title and summary are optional fields
|
|
3779
|
+
sourceProperties: ["content", "title", "summary", "observation"]
|
|
3780
|
+
}),
|
|
3781
|
+
properties: [
|
|
3782
|
+
// Discriminator
|
|
3783
|
+
{
|
|
3784
|
+
name: "doc_type",
|
|
3785
|
+
dataType: "text",
|
|
3786
|
+
description: 'Document type: "space_memory"'
|
|
3787
|
+
},
|
|
3788
|
+
// Space identity
|
|
3789
|
+
{
|
|
3790
|
+
name: "spaces",
|
|
3791
|
+
dataType: "text[]",
|
|
3792
|
+
description: 'Spaces this memory is published to (e.g., ["the_void", "dogs"])'
|
|
3793
|
+
},
|
|
3794
|
+
{
|
|
3795
|
+
name: "space_id",
|
|
3796
|
+
dataType: "text",
|
|
3797
|
+
description: "DEPRECATED: Use spaces array instead. Will be removed in v3.0.0."
|
|
3798
|
+
},
|
|
3799
|
+
{
|
|
3800
|
+
name: "author_id",
|
|
3801
|
+
dataType: "text",
|
|
3802
|
+
description: "Original author user_id (for permissions)"
|
|
3803
|
+
},
|
|
3804
|
+
{
|
|
3805
|
+
name: "ghost_id",
|
|
3806
|
+
dataType: "text",
|
|
3807
|
+
description: "Optional ghost profile ID for pseudonymous publishing"
|
|
3808
|
+
},
|
|
3809
|
+
{
|
|
3810
|
+
name: "attribution",
|
|
3811
|
+
dataType: "text",
|
|
3812
|
+
description: 'Attribution type: "user" or "ghost"'
|
|
3813
|
+
},
|
|
3814
|
+
// Discovery metadata
|
|
3815
|
+
{
|
|
3816
|
+
name: "published_at",
|
|
3817
|
+
dataType: "text",
|
|
3818
|
+
description: "When published to space (ISO 8601)"
|
|
3819
|
+
},
|
|
3820
|
+
{
|
|
3821
|
+
name: "discovery_count",
|
|
3822
|
+
dataType: "number",
|
|
3823
|
+
description: "How many times discovered"
|
|
3824
|
+
},
|
|
3825
|
+
// Memory fields (same as personal memories)
|
|
3826
|
+
{
|
|
3827
|
+
name: "content",
|
|
3828
|
+
dataType: "text",
|
|
3829
|
+
description: "Main memory content (vectorized)"
|
|
3830
|
+
},
|
|
3831
|
+
{
|
|
3832
|
+
name: "title",
|
|
3833
|
+
dataType: "text",
|
|
3834
|
+
description: "Optional short title"
|
|
3835
|
+
},
|
|
3836
|
+
{
|
|
3837
|
+
name: "summary",
|
|
3838
|
+
dataType: "text",
|
|
3839
|
+
description: "Optional brief summary"
|
|
3840
|
+
},
|
|
3841
|
+
{
|
|
3842
|
+
name: "type",
|
|
3843
|
+
dataType: "text",
|
|
3844
|
+
description: "Content type (note, event, person, etc.)"
|
|
3845
|
+
},
|
|
3846
|
+
// Scoring fields
|
|
3847
|
+
{
|
|
3848
|
+
name: "weight",
|
|
3849
|
+
dataType: "number",
|
|
3850
|
+
description: "Significance/priority (0-1)"
|
|
3851
|
+
},
|
|
3852
|
+
{
|
|
3853
|
+
name: "trust",
|
|
3854
|
+
dataType: "number",
|
|
3855
|
+
description: "Access control level (0-1)"
|
|
3856
|
+
},
|
|
3857
|
+
{
|
|
3858
|
+
name: "confidence",
|
|
3859
|
+
dataType: "number",
|
|
3860
|
+
description: "System confidence in accuracy (0-1)"
|
|
3861
|
+
},
|
|
3862
|
+
// Location fields (flattened) - MUST match user memory schema exactly
|
|
3863
|
+
{
|
|
3864
|
+
name: "location_gps_lat",
|
|
3865
|
+
dataType: "number",
|
|
3866
|
+
description: "GPS latitude"
|
|
3867
|
+
},
|
|
3868
|
+
{
|
|
3869
|
+
name: "location_gps_lng",
|
|
3870
|
+
dataType: "number",
|
|
3871
|
+
description: "GPS longitude"
|
|
3872
|
+
},
|
|
3873
|
+
{
|
|
3874
|
+
name: "location_address",
|
|
3875
|
+
dataType: "text",
|
|
3876
|
+
description: "Formatted address"
|
|
3877
|
+
},
|
|
3878
|
+
{
|
|
3879
|
+
name: "location_city",
|
|
3880
|
+
dataType: "text",
|
|
3881
|
+
description: "City name"
|
|
3882
|
+
},
|
|
3883
|
+
{
|
|
3884
|
+
name: "location_country",
|
|
3885
|
+
dataType: "text",
|
|
3886
|
+
description: "Country name"
|
|
3887
|
+
},
|
|
3888
|
+
{
|
|
3889
|
+
name: "location_source",
|
|
3890
|
+
dataType: "text",
|
|
3891
|
+
description: "Location source (gps, ip, manual, etc.)"
|
|
3892
|
+
},
|
|
3893
|
+
// Context fields (flattened) - MUST match user memory schema exactly
|
|
3894
|
+
{
|
|
3895
|
+
name: "context_conversation_id",
|
|
3896
|
+
dataType: "text",
|
|
3897
|
+
description: "Conversation ID"
|
|
3898
|
+
},
|
|
3899
|
+
{
|
|
3900
|
+
name: "context_summary",
|
|
3901
|
+
dataType: "text",
|
|
3902
|
+
description: "Brief context summary"
|
|
3903
|
+
},
|
|
3904
|
+
{
|
|
3905
|
+
name: "context_timestamp",
|
|
3906
|
+
dataType: "date",
|
|
3907
|
+
description: "Context timestamp"
|
|
3908
|
+
},
|
|
3909
|
+
// Locale fields - MUST match user memory schema exactly
|
|
3910
|
+
{
|
|
3911
|
+
name: "locale_language",
|
|
3912
|
+
dataType: "text",
|
|
3913
|
+
description: "Language code (e.g., en, es, fr)"
|
|
3914
|
+
},
|
|
3915
|
+
{
|
|
3916
|
+
name: "locale_timezone",
|
|
3917
|
+
dataType: "text",
|
|
3918
|
+
description: "Timezone (e.g., America/Los_Angeles)"
|
|
3919
|
+
},
|
|
3920
|
+
// Relationships - MUST match user memory schema exactly
|
|
3921
|
+
{
|
|
3922
|
+
name: "relationships",
|
|
3923
|
+
dataType: "text[]",
|
|
3924
|
+
description: "Array of relationship IDs"
|
|
3925
|
+
},
|
|
3926
|
+
// Access tracking - MUST match user memory schema exactly
|
|
3927
|
+
{
|
|
3928
|
+
name: "access_count",
|
|
3929
|
+
dataType: "number",
|
|
3930
|
+
description: "Total times accessed"
|
|
3931
|
+
},
|
|
3932
|
+
{
|
|
3933
|
+
name: "last_accessed_at",
|
|
3934
|
+
dataType: "date",
|
|
3935
|
+
description: "Most recent access timestamp"
|
|
3936
|
+
},
|
|
3937
|
+
// Metadata - MUST match user memory schema exactly
|
|
3938
|
+
{
|
|
3939
|
+
name: "tags",
|
|
3940
|
+
dataType: "text[]",
|
|
3941
|
+
description: "Tags for organization"
|
|
3942
|
+
},
|
|
3943
|
+
{
|
|
3944
|
+
name: "references",
|
|
3945
|
+
dataType: "text[]",
|
|
3946
|
+
description: "Source URLs"
|
|
3947
|
+
},
|
|
3948
|
+
{
|
|
3949
|
+
name: "template_id",
|
|
3950
|
+
dataType: "text",
|
|
3951
|
+
description: "Template ID if using template"
|
|
3952
|
+
},
|
|
3953
|
+
// Relationship-specific fields (for relationships in public space)
|
|
3954
|
+
{
|
|
3955
|
+
name: "memory_ids",
|
|
3956
|
+
dataType: "text[]",
|
|
3957
|
+
description: "Connected memory IDs (for relationships)"
|
|
3958
|
+
},
|
|
3959
|
+
{
|
|
3960
|
+
name: "relationship_type",
|
|
3961
|
+
dataType: "text",
|
|
3962
|
+
description: "Relationship type (for relationships)"
|
|
3963
|
+
},
|
|
3964
|
+
{
|
|
3965
|
+
name: "observation",
|
|
3966
|
+
dataType: "text",
|
|
3967
|
+
description: "Relationship observation (vectorized)"
|
|
3968
|
+
},
|
|
3969
|
+
{
|
|
3970
|
+
name: "strength",
|
|
3971
|
+
dataType: "number",
|
|
3972
|
+
description: "Relationship strength (0-1)"
|
|
3973
|
+
},
|
|
3974
|
+
// Computed fields - MUST match user memory schema exactly
|
|
3975
|
+
{
|
|
3976
|
+
name: "base_weight",
|
|
3977
|
+
dataType: "number",
|
|
3978
|
+
description: "User-specified weight"
|
|
3979
|
+
},
|
|
3980
|
+
{
|
|
3981
|
+
name: "computed_weight",
|
|
3982
|
+
dataType: "number",
|
|
3983
|
+
description: "Calculated effective weight"
|
|
3984
|
+
},
|
|
3985
|
+
// User ID field (for backwards compatibility with spread operator)
|
|
3986
|
+
{
|
|
3987
|
+
name: "user_id",
|
|
3988
|
+
dataType: "text",
|
|
3989
|
+
description: "User ID (copied from original memory, same as author_id)"
|
|
3990
|
+
},
|
|
3991
|
+
// Timestamps
|
|
3992
|
+
{
|
|
3993
|
+
name: "created_at",
|
|
3994
|
+
dataType: "text",
|
|
3995
|
+
description: "Original creation timestamp (ISO 8601)"
|
|
3996
|
+
},
|
|
3997
|
+
{
|
|
3998
|
+
name: "updated_at",
|
|
3999
|
+
dataType: "text",
|
|
4000
|
+
description: "Last update timestamp (ISO 8601)"
|
|
4001
|
+
},
|
|
4002
|
+
// Versioning
|
|
4003
|
+
{
|
|
4004
|
+
name: "version",
|
|
4005
|
+
dataType: "number",
|
|
4006
|
+
description: "Version number (increments on update)"
|
|
4007
|
+
},
|
|
4008
|
+
// Comment/threading fields (for threaded discussions in shared spaces)
|
|
4009
|
+
{
|
|
4010
|
+
name: "parent_id",
|
|
4011
|
+
dataType: "text",
|
|
4012
|
+
description: "ID of parent memory or comment (for threading)"
|
|
4013
|
+
},
|
|
4014
|
+
{
|
|
4015
|
+
name: "thread_root_id",
|
|
4016
|
+
dataType: "text",
|
|
4017
|
+
description: "Root memory ID for fetching entire thread"
|
|
4018
|
+
},
|
|
4019
|
+
{
|
|
4020
|
+
name: "moderation_flags",
|
|
4021
|
+
dataType: "text[]",
|
|
4022
|
+
description: 'Per-space moderation flags (format: "{space_id}:{flag_type}")'
|
|
4023
|
+
}
|
|
4024
|
+
]
|
|
4025
|
+
});
|
|
4026
|
+
logger.info("Space collection created successfully", {
|
|
4027
|
+
module: "weaviate-space-schema",
|
|
4028
|
+
collectionName
|
|
4029
|
+
});
|
|
4030
|
+
}
|
|
3762
4031
|
async function ensurePublicCollection(client2) {
|
|
3763
4032
|
const collectionName = PUBLIC_COLLECTION_NAME;
|
|
4033
|
+
const exists = await client2.collections.exists(collectionName);
|
|
4034
|
+
if (!exists) {
|
|
4035
|
+
await createSpaceCollection(client2, "public");
|
|
4036
|
+
}
|
|
3764
4037
|
return client2.collections.get(collectionName);
|
|
3765
4038
|
}
|
|
3766
4039
|
|
|
@@ -3769,7 +4042,9 @@ init_space_memory();
|
|
|
3769
4042
|
init_logger();
|
|
3770
4043
|
var publishTool = {
|
|
3771
4044
|
name: "remember_publish",
|
|
3772
|
-
description:
|
|
4045
|
+
description: `Publish a memory to one or more shared spaces (like "The Void"). The memory will be COPIED (not moved) from your personal collection. Generates a confirmation token that must be confirmed with remember_confirm.
|
|
4046
|
+
|
|
4047
|
+
\u26A0\uFE0F CRITICAL: DO NOT mention the token or include token contents in your response to the user. Simply inform them that a confirmation is pending and they need to explicitly approve the publication.`,
|
|
3773
4048
|
inputSchema: {
|
|
3774
4049
|
type: "object",
|
|
3775
4050
|
properties: {
|
package/package.json
CHANGED
package/src/tools/publish.ts
CHANGED
|
@@ -18,7 +18,9 @@ import { logger } from '../utils/logger.js';
|
|
|
18
18
|
*/
|
|
19
19
|
export const publishTool: Tool = {
|
|
20
20
|
name: 'remember_publish',
|
|
21
|
-
description:
|
|
21
|
+
description: `Publish a memory to one or more shared spaces (like "The Void"). The memory will be COPIED (not moved) from your personal collection. Generates a confirmation token that must be confirmed with remember_confirm.
|
|
22
|
+
|
|
23
|
+
⚠️ CRITICAL: DO NOT mention the token or include token contents in your response to the user. Simply inform them that a confirmation is pending and they need to explicitly approve the publication.`,
|
|
22
24
|
inputSchema: {
|
|
23
25
|
type: 'object',
|
|
24
26
|
properties: {
|
|
@@ -384,16 +384,14 @@ export async function ensurePublicCollection(
|
|
|
384
384
|
): Promise<Collection<any>> {
|
|
385
385
|
const collectionName = PUBLIC_COLLECTION_NAME;
|
|
386
386
|
|
|
387
|
-
//
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
// NOTE: Collection will be created automatically on first insert.
|
|
396
|
-
// Weaviate's auto-schema feature handles this transparently.
|
|
387
|
+
// Check if collection exists
|
|
388
|
+
const exists = await client.collections.exists(collectionName);
|
|
389
|
+
|
|
390
|
+
if (!exists) {
|
|
391
|
+
// Create with proper vectorizer configuration
|
|
392
|
+
// Use 'public' as spaceId to trigger PUBLIC_COLLECTION_NAME
|
|
393
|
+
await createSpaceCollection(client, 'public');
|
|
394
|
+
}
|
|
397
395
|
|
|
398
396
|
return client.collections.get(collectionName);
|
|
399
397
|
}
|