@prmichaelsen/remember-mcp 2.7.11 → 2.8.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.
Files changed (76) hide show
  1. package/.env.example +6 -0
  2. package/AGENT.md +224 -21
  3. package/CHANGELOG.md +47 -937
  4. package/README.md +35 -0
  5. package/agent/commands/acp.command-create.md +373 -0
  6. package/agent/commands/acp.design-create.md +225 -0
  7. package/agent/commands/acp.init.md +40 -5
  8. package/agent/commands/acp.package-create.md +895 -0
  9. package/agent/commands/acp.package-info.md +212 -0
  10. package/agent/commands/acp.package-install.md +207 -33
  11. package/agent/commands/acp.package-list.md +280 -0
  12. package/agent/commands/acp.package-publish.md +541 -0
  13. package/agent/commands/acp.package-remove.md +293 -0
  14. package/agent/commands/acp.package-search.md +307 -0
  15. package/agent/commands/acp.package-update.md +361 -0
  16. package/agent/commands/acp.package-validate.md +540 -0
  17. package/agent/commands/acp.pattern-create.md +327 -0
  18. package/agent/commands/acp.plan.md +553 -0
  19. package/agent/commands/acp.proceed.md +112 -86
  20. package/agent/commands/acp.project-create.md +673 -0
  21. package/agent/commands/acp.project-list.md +225 -0
  22. package/agent/commands/acp.project-set.md +227 -0
  23. package/agent/commands/acp.report.md +3 -0
  24. package/agent/commands/acp.resume.md +238 -0
  25. package/agent/commands/acp.status.md +1 -0
  26. package/agent/commands/acp.sync.md +56 -15
  27. package/agent/commands/acp.task-create.md +391 -0
  28. package/agent/commands/acp.update.md +1 -0
  29. package/agent/commands/acp.validate.md +62 -10
  30. package/agent/commands/acp.version-check-for-updates.md +6 -5
  31. package/agent/commands/acp.version-check.md +7 -6
  32. package/agent/commands/acp.version-update.md +7 -6
  33. package/agent/commands/command.template.md +48 -0
  34. package/agent/commands/git.commit.md +6 -3
  35. package/agent/commands/git.init.md +1 -0
  36. package/agent/manifest.template.yaml +13 -0
  37. package/agent/package.template.yaml +53 -0
  38. package/agent/progress.template.yaml +3 -0
  39. package/agent/progress.yaml +103 -5
  40. package/agent/scripts/acp.common.sh +1536 -0
  41. package/agent/scripts/acp.install.sh +293 -0
  42. package/agent/scripts/acp.package-create.sh +925 -0
  43. package/agent/scripts/acp.package-info.sh +270 -0
  44. package/agent/scripts/acp.package-install.sh +675 -0
  45. package/agent/scripts/acp.package-list.sh +263 -0
  46. package/agent/scripts/acp.package-publish.sh +420 -0
  47. package/agent/scripts/acp.package-remove.sh +272 -0
  48. package/agent/scripts/acp.package-search.sh +156 -0
  49. package/agent/scripts/acp.package-update.sh +438 -0
  50. package/agent/scripts/acp.package-validate.sh +954 -0
  51. package/agent/scripts/acp.project-list.sh +121 -0
  52. package/agent/scripts/acp.project-set.sh +138 -0
  53. package/agent/scripts/{uninstall.sh → acp.uninstall.sh} +25 -15
  54. package/agent/scripts/{check-for-updates.sh → acp.version-check-for-updates.sh} +24 -14
  55. package/agent/scripts/{version.sh → acp.version-check.sh} +20 -8
  56. package/agent/scripts/{update.sh → acp.version-update.sh} +44 -25
  57. package/agent/scripts/acp.yaml-parser.sh +853 -0
  58. package/agent/scripts/acp.yaml-validate.sh +205 -0
  59. package/agent/tasks/task-68-fix-missing-space-properties.md +192 -0
  60. package/agent/tasks/task-69-add-comprehensive-tool-debugging.md +454 -0
  61. package/dist/config.d.ts +18 -0
  62. package/dist/server-factory.js +276 -19
  63. package/dist/server.js +276 -19
  64. package/dist/utils/debug.d.ts +52 -0
  65. package/dist/utils/debug.spec.d.ts +5 -0
  66. package/dist/weaviate/client.d.ts +1 -1
  67. package/package.json +1 -1
  68. package/src/config.ts +33 -0
  69. package/src/tools/confirm.ts +48 -7
  70. package/src/tools/publish.ts +19 -1
  71. package/src/tools/query-space.ts +36 -3
  72. package/src/tools/search-space.ts +36 -3
  73. package/src/utils/debug.spec.ts +257 -0
  74. package/src/utils/debug.ts +138 -0
  75. package/src/weaviate/client.ts +42 -3
  76. package/agent/scripts/install.sh +0 -157
@@ -0,0 +1,205 @@
1
+ #!/bin/bash
2
+ # ACP YAML Schema Validator
3
+ # Pure bash YAML validation against schema definitions
4
+ # Zero external dependencies
5
+
6
+ # Source YAML parser (using new generic AST-based parser)
7
+ SCRIPT_DIR="$(dirname "$0")"
8
+ . "${SCRIPT_DIR}/acp.yaml-parser.sh"
9
+ . "${SCRIPT_DIR}/acp.common.sh"
10
+
11
+ # Initialize colors
12
+ init_colors
13
+
14
+ # Validation error tracking
15
+ VALIDATION_ERRORS=0
16
+ VALIDATION_WARNINGS=0
17
+
18
+ # Add validation error
19
+ # Usage: add_error "Error message"
20
+ add_error() {
21
+ echo "${RED}❌ $1${NC}" >&2
22
+ VALIDATION_ERRORS=$((VALIDATION_ERRORS + 1))
23
+ }
24
+
25
+ # Add validation warning
26
+ # Usage: add_warning "Warning message"
27
+ add_warning() {
28
+ echo "${YELLOW}⚠️ $1${NC}" >&2
29
+ VALIDATION_WARNINGS=$((VALIDATION_WARNINGS + 1))
30
+ }
31
+
32
+ # Validate field exists
33
+ # Usage: validate_field_exists "file.yaml" "field.path"
34
+ validate_field_exists() {
35
+ local yaml_file="$1"
36
+ local field_path="$2"
37
+
38
+ if ! yaml_has_key "$yaml_file" "$field_path"; then
39
+ return 1
40
+ fi
41
+ return 0
42
+ }
43
+
44
+ # Validate string pattern (regex)
45
+ # Usage: validate_pattern "value" "pattern" "field_name"
46
+ validate_pattern() {
47
+ local value="$1"
48
+ local pattern="$2"
49
+ local field_name="$3"
50
+
51
+ if ! echo "$value" | grep -qE "$pattern"; then
52
+ return 1
53
+ fi
54
+ return 0
55
+ }
56
+
57
+ # Validate string length
58
+ # Usage: validate_length "value" min max "field_name"
59
+ validate_length() {
60
+ local value="$1"
61
+ local min="$2"
62
+ local max="$3"
63
+ local field_name="$4"
64
+
65
+ local length=${#value}
66
+
67
+ if [ -n "$min" ] && [ "$length" -lt "$min" ]; then
68
+ add_error "Field '$field_name': Too short (minimum $min characters, got $length)"
69
+ return 1
70
+ fi
71
+
72
+ if [ -n "$max" ] && [ "$length" -gt "$max" ]; then
73
+ add_error "Field '$field_name': Too long (maximum $max characters, got $length)"
74
+ return 1
75
+ fi
76
+
77
+ return 0
78
+ }
79
+
80
+ # Validate package.yaml file
81
+ # Usage: validate_package_yaml "package.yaml"
82
+ # Returns: 0 if valid, 1 if invalid
83
+ validate_package_yaml() {
84
+ local yaml_file="$1"
85
+
86
+ if [ ! -f "$yaml_file" ]; then
87
+ add_error "File not found: $yaml_file"
88
+ return 1
89
+ fi
90
+
91
+ echo "${BLUE}Validating $yaml_file...${NC}"
92
+ echo ""
93
+
94
+ # Check YAML syntax (try to parse)
95
+ if ! yaml_get "$yaml_file" "name" >/dev/null 2>&1; then
96
+ add_error "Invalid YAML syntax in $yaml_file"
97
+ return 1
98
+ fi
99
+
100
+ # Validate required fields
101
+ local required_fields="name version description author license repository"
102
+ for field in $required_fields; do
103
+ if ! validate_field_exists "$yaml_file" "$field"; then
104
+ add_error "Required field missing: '$field'"
105
+ fi
106
+ done
107
+
108
+ # Validate name field
109
+ if validate_field_exists "$yaml_file" "name"; then
110
+ local name=$(yaml_get "$yaml_file" "name")
111
+ if ! validate_pattern "$name" "^[a-z0-9-]+$" "name"; then
112
+ add_error "Field 'name': Must be lowercase letters, numbers, and hyphens only (got: '$name')"
113
+ fi
114
+
115
+ # Check reserved names
116
+ case "$name" in
117
+ acp|local|core|system|global)
118
+ add_error "Field 'name': '$name' is a reserved package name"
119
+ ;;
120
+ esac
121
+ fi
122
+
123
+ # Validate version field
124
+ if validate_field_exists "$yaml_file" "version"; then
125
+ local version=$(yaml_get "$yaml_file" "version")
126
+ if ! validate_pattern "$version" "^[0-9]+\\.[0-9]+\\.[0-9]+$" "version"; then
127
+ add_error "Field 'version': Must be semantic version format X.Y.Z (got: '$version')"
128
+ fi
129
+ fi
130
+
131
+ # Validate description field
132
+ if validate_field_exists "$yaml_file" "description"; then
133
+ local description=$(yaml_get "$yaml_file" "description")
134
+ validate_length "$description" 10 200 "description"
135
+ fi
136
+
137
+ # Validate author field
138
+ if validate_field_exists "$yaml_file" "author"; then
139
+ local author=$(yaml_get "$yaml_file" "author")
140
+ validate_length "$author" 2 "" "author"
141
+ fi
142
+
143
+ # Validate repository field
144
+ if validate_field_exists "$yaml_file" "repository"; then
145
+ local repository=$(yaml_get "$yaml_file" "repository")
146
+ if ! validate_pattern "$repository" "^https?://.*\\.git$" "repository"; then
147
+ add_error "Field 'repository': Must be a git URL ending with .git (got: '$repository')"
148
+ fi
149
+ fi
150
+
151
+ # Validate homepage field (optional)
152
+ if validate_field_exists "$yaml_file" "homepage"; then
153
+ local homepage=$(yaml_get "$yaml_file" "homepage")
154
+ if ! validate_pattern "$homepage" "^https?://.*" "homepage"; then
155
+ add_error "Field 'homepage': Must be a valid HTTP/HTTPS URL (got: '$homepage')"
156
+ fi
157
+ fi
158
+
159
+ # Validate contents field (required) - use grep since yaml_has_key may not work for nested objects
160
+ if ! grep -q "^contents:" "$yaml_file"; then
161
+ add_error "Required field missing: 'contents'"
162
+ fi
163
+
164
+ # Validate requires.acp field (optional)
165
+ if validate_field_exists "$yaml_file" "requires.acp"; then
166
+ local acp_version=$(yaml_get "$yaml_file" "requires.acp")
167
+ if ! validate_pattern "$acp_version" "^>=?[0-9]+\\.[0-9]+\\.[0-9]+$" "requires.acp"; then
168
+ add_error "Field 'requires.acp': Must be version constraint like '>=2.0.0' (got: '$acp_version')"
169
+ fi
170
+ fi
171
+
172
+ # Report results
173
+ echo ""
174
+ if [ "$VALIDATION_ERRORS" -eq 0 ]; then
175
+ echo "${GREEN}✅ Validation passed${NC}"
176
+ if [ "$VALIDATION_WARNINGS" -gt 0 ]; then
177
+ echo "${YELLOW}⚠️ $VALIDATION_WARNINGS warning(s)${NC}"
178
+ fi
179
+ return 0
180
+ else
181
+ echo "${RED}❌ Validation failed${NC}"
182
+ echo "${RED} $VALIDATION_ERRORS error(s)${NC}"
183
+ if [ "$VALIDATION_WARNINGS" -gt 0 ]; then
184
+ echo "${YELLOW} $VALIDATION_WARNINGS warning(s)${NC}"
185
+ fi
186
+ return 1
187
+ fi
188
+ }
189
+
190
+ # Main function for standalone execution
191
+ if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
192
+ # Script is being executed directly
193
+ if [ $# -eq 0 ]; then
194
+ echo "Usage: $0 <yaml-file>"
195
+ echo ""
196
+ echo "Example:"
197
+ echo " $0 package.yaml"
198
+ exit 1
199
+ fi
200
+
201
+ validate_package_yaml "$1"
202
+ exit $?
203
+ fi
204
+
205
+ # Script is being sourced, functions are available
@@ -0,0 +1,192 @@
1
+ # Task 68: Fix Missing Space Properties in ALL_MEMORY_PROPERTIES
2
+
3
+ **Milestone**: M11 (Unified Public Collection) - Bug Fix
4
+ **Estimated Time**: 1 hour
5
+ **Dependencies**: None
6
+ **Status**: Completed
7
+ **Priority**: Critical
8
+
9
+ ---
10
+
11
+ ## Objective
12
+
13
+ Fix bug where published memories don't appear in space search results due to missing space-related properties in the `ALL_MEMORY_PROPERTIES` constant.
14
+
15
+ ---
16
+
17
+ ## Problem Statement
18
+
19
+ ### Bug Report
20
+
21
+ After successfully publishing a memory to The Void:
22
+ 1. Called `remember_publish` with memory ID
23
+ 2. Received confirmation token
24
+ 3. Called `remember_confirm` - succeeded
25
+ 4. Called `remember_search_space` - returned 0 results
26
+
27
+ ### Root Cause
28
+
29
+ The `ALL_MEMORY_PROPERTIES` constant in [`src/weaviate/client.ts`](../../src/weaviate/client.ts) was missing critical space-related fields:
30
+ - `spaces` (array) - Required for multi-space filtering
31
+ - `author_id` - Original author tracking
32
+ - `published_at` - Publication timestamp
33
+ - `discovery_count` - Discovery tracking
34
+ - `space_memory_id` - Bidirectional linking
35
+ - `space_id` - Deprecated but still in schema
36
+ - `ghost_id` - Pseudonymous publishing
37
+ - `attribution` - Attribution type
38
+
39
+ When `fetchMemoryWithAllProperties()` is called, it uses this constant to specify which properties to fetch. Missing properties means they might not be properly retrieved or validated during the publish flow.
40
+
41
+ ---
42
+
43
+ ## Solution
44
+
45
+ Added 8 missing space-related properties to `ALL_MEMORY_PROPERTIES` constant:
46
+
47
+ ```typescript
48
+ // Space/publishing fields (for Memory_public collection)
49
+ 'spaces',
50
+ 'space_id',
51
+ 'author_id',
52
+ 'ghost_id',
53
+ 'attribution',
54
+ 'published_at',
55
+ 'discovery_count',
56
+ 'space_memory_id',
57
+ ```
58
+
59
+ ---
60
+
61
+ ## Steps
62
+
63
+ ### 1. Update ALL_MEMORY_PROPERTIES Constant
64
+
65
+ **File**: [`src/weaviate/client.ts`](../../src/weaviate/client.ts)
66
+
67
+ **Change**: Added space-related properties after comment/threading fields (lines 209-217)
68
+
69
+ ```typescript
70
+ // Comment/threading fields
71
+ 'parent_id',
72
+ 'thread_root_id',
73
+ 'moderation_flags',
74
+
75
+ // Space/publishing fields (for Memory_public collection)
76
+ 'spaces',
77
+ 'space_id',
78
+ 'author_id',
79
+ 'ghost_id',
80
+ 'attribution',
81
+ 'published_at',
82
+ 'discovery_count',
83
+ 'space_memory_id',
84
+ ] as const;
85
+ ```
86
+
87
+ ### 2. Verify Build
88
+
89
+ ```bash
90
+ npm run build
91
+ ```
92
+
93
+ **Expected**: Build successful, TypeScript compiles without errors
94
+
95
+ ### 3. Verify Tests
96
+
97
+ ```bash
98
+ npm test
99
+ ```
100
+
101
+ **Expected**: All 81 tests passing (1 skipped)
102
+
103
+ ---
104
+
105
+ ## Verification
106
+
107
+ - [x] Added 8 space-related properties to `ALL_MEMORY_PROPERTIES`
108
+ - [x] TypeScript compiles without errors
109
+ - [x] Build successful
110
+ - [x] All tests passing
111
+ - [x] Properties match space schema definition
112
+
113
+ ---
114
+
115
+ ## Impact
116
+
117
+ ### Before Fix
118
+ - Published memories had incomplete property sets
119
+ - `spaces` array might not be properly set
120
+ - Search filtering by `spaces` would fail
121
+ - Memories invisible in space search results
122
+
123
+ ### After Fix
124
+ - All space properties properly fetched and validated
125
+ - `spaces` array correctly set during publish
126
+ - Search filtering works correctly
127
+ - Published memories discoverable in spaces
128
+
129
+ ---
130
+
131
+ ## Related Issues
132
+
133
+ This bug was introduced when space-related properties were added to the schema but not added to the `ALL_MEMORY_PROPERTIES` constant. The constant was created in v2.6.3 (CHANGELOG line 434) but didn't include space fields added in v2.4.0.
134
+
135
+ ### Related CHANGELOG Entries
136
+
137
+ - **v2.6.3** (2026-02-16): Created `fetchMemoryWithAllProperties()` utility
138
+ - **v2.4.0** (2026-02-16): Added multi-space support with `spaces` array
139
+ - **v2.3.0** (2026-02-16): Added space-specific fields (`author_id`, `published_at`, etc.)
140
+
141
+ ---
142
+
143
+ ## Testing
144
+
145
+ ### Manual Test
146
+
147
+ 1. Publish a memory to The Void:
148
+ ```typescript
149
+ remember_publish({ memory_id: "test-id", spaces: ["the_void"] })
150
+ ```
151
+
152
+ 2. Confirm publication:
153
+ ```typescript
154
+ remember_confirm({ token: "received-token" })
155
+ ```
156
+
157
+ 3. Search The Void:
158
+ ```typescript
159
+ remember_search_space({ query: "test content", spaces: ["the_void"] })
160
+ ```
161
+
162
+ 4. **Expected**: Memory appears in search results with all properties
163
+
164
+ ### Automated Test
165
+
166
+ Existing tests in [`tests/unit/`](../../tests/unit/) cover property fetching. No new tests needed.
167
+
168
+ ---
169
+
170
+ ## Files Modified
171
+
172
+ - [`src/weaviate/client.ts`](../../src/weaviate/client.ts) - Added 8 space properties to `ALL_MEMORY_PROPERTIES`
173
+
174
+ ---
175
+
176
+ ## Files Created
177
+
178
+ - [`agent/tasks/task-68-fix-missing-space-properties.md`](task-68-fix-missing-space-properties.md) - This task document
179
+
180
+ ---
181
+
182
+ ## Next Steps
183
+
184
+ 1. Test in production with actual publish/search workflow
185
+ 2. Verify memories are discoverable in The Void
186
+ 3. Consider adding integration test for full publish workflow
187
+ 4. Update CHANGELOG.md with bug fix entry
188
+
189
+ ---
190
+
191
+ **Completed**: 2026-02-25
192
+ **Version**: Will be released in v2.7.12