@prmichaelsen/remember-mcp 2.2.1 → 2.3.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 (61) hide show
  1. package/AGENT.md +4 -4
  2. package/CHANGELOG.md +45 -0
  3. package/README.md +43 -3
  4. package/agent/commands/acp.init.md +376 -0
  5. package/agent/commands/acp.proceed.md +311 -0
  6. package/agent/commands/acp.status.md +280 -0
  7. package/agent/commands/acp.version-check-for-updates.md +275 -0
  8. package/agent/commands/acp.version-check.md +190 -0
  9. package/agent/commands/acp.version-update.md +288 -0
  10. package/agent/commands/command.template.md +273 -0
  11. package/agent/design/core-memory-user-profile.md +1253 -0
  12. package/agent/design/ghost-profiles-pseudonymous-identity.md +194 -0
  13. package/agent/design/publish-tools-confirmation-flow.md +922 -0
  14. package/agent/milestones/milestone-10-shared-spaces.md +169 -0
  15. package/agent/progress.yaml +90 -4
  16. package/agent/scripts/install.sh +118 -0
  17. package/agent/scripts/update.sh +22 -10
  18. package/agent/scripts/version.sh +35 -0
  19. package/agent/tasks/task-27-implement-llm-provider-interface.md +51 -0
  20. package/agent/tasks/task-28-implement-llm-provider-factory.md +64 -0
  21. package/agent/tasks/task-29-update-config-for-llm.md +71 -0
  22. package/agent/tasks/task-30-implement-bedrock-provider.md +147 -0
  23. package/agent/tasks/task-31-implement-background-job-service.md +120 -0
  24. package/agent/tasks/task-32-test-llm-provider-integration.md +152 -0
  25. package/agent/tasks/task-34-create-confirmation-token-service.md +191 -0
  26. package/agent/tasks/task-35-create-space-memory-types-schema.md +183 -0
  27. package/agent/tasks/task-36-implement-remember-publish.md +227 -0
  28. package/agent/tasks/task-37-implement-remember-confirm.md +225 -0
  29. package/agent/tasks/task-38-implement-remember-deny.md +161 -0
  30. package/agent/tasks/task-39-implement-remember-search-space.md +188 -0
  31. package/agent/tasks/task-40-implement-remember-query-space.md +193 -0
  32. package/agent/tasks/task-41-configure-firestore-ttl.md +188 -0
  33. package/agent/tasks/task-42-create-tests-shared-spaces.md +216 -0
  34. package/agent/tasks/task-43-update-documentation.md +255 -0
  35. package/dist/llm/types.d.ts +1 -0
  36. package/dist/server-factory.js +914 -1
  37. package/dist/server.js +916 -3
  38. package/dist/services/confirmation-token.service.d.ts +99 -0
  39. package/dist/services/confirmation-token.service.spec.d.ts +5 -0
  40. package/dist/tools/confirm.d.ts +20 -0
  41. package/dist/tools/deny.d.ts +19 -0
  42. package/dist/tools/publish.d.ts +22 -0
  43. package/dist/tools/query-space.d.ts +28 -0
  44. package/dist/tools/search-space.d.ts +29 -0
  45. package/dist/types/space-memory.d.ts +80 -0
  46. package/dist/weaviate/space-schema.d.ts +59 -0
  47. package/dist/weaviate/space-schema.spec.d.ts +5 -0
  48. package/package.json +1 -1
  49. package/src/llm/types.ts +0 -0
  50. package/src/server-factory.ts +33 -0
  51. package/src/server.ts +33 -0
  52. package/src/services/confirmation-token.service.spec.ts +254 -0
  53. package/src/services/confirmation-token.service.ts +232 -0
  54. package/src/tools/confirm.ts +176 -0
  55. package/src/tools/deny.ts +70 -0
  56. package/src/tools/publish.ts +167 -0
  57. package/src/tools/query-space.ts +197 -0
  58. package/src/tools/search-space.ts +189 -0
  59. package/src/types/space-memory.ts +94 -0
  60. package/src/weaviate/space-schema.spec.ts +131 -0
  61. package/src/weaviate/space-schema.ts +275 -0
@@ -0,0 +1,169 @@
1
+ # Milestone 10: Shared Spaces & Confirmation Flow
2
+
3
+ **Goal**: Implement shared memory spaces with token-based confirmation for publishing
4
+ **Duration**: 2-3 weeks
5
+ **Dependencies**: M1-M4 (Foundation, Memory, Relationships, Preferences)
6
+ **Status**: Not Started
7
+
8
+ ---
9
+
10
+ ## Overview
11
+
12
+ Implement a secure, user-controlled system for publishing memories to shared spaces (like "The Void"). Uses token-based confirmation to ensure explicit user consent before any sensitive operation. Includes discovery tools for searching shared spaces.
13
+
14
+ This milestone introduces:
15
+ - **Token-based confirmation pattern** for sensitive operations
16
+ - **Shared space collections** (Memory_Void, Memory_Public, etc.)
17
+ - **Publishing workflow** with explicit user confirmation
18
+ - **Discovery tools** for searching shared spaces
19
+ - **Generic confirmation system** extensible to other actions
20
+
21
+ ---
22
+
23
+ ## Deliverables
24
+
25
+ ### 1. Confirmation Token Service
26
+ - Token generation and validation
27
+ - Firestore storage for pending confirmations
28
+ - Token expiry (5 minutes)
29
+ - Status tracking (pending, confirmed, denied, expired)
30
+ - Cleanup for expired tokens
31
+
32
+ ### 2. Space Memory Architecture
33
+ - Space collection schema (Memory_{space_name})
34
+ - SpaceMemory type definitions
35
+ - Author attribution
36
+ - Discovery metadata
37
+
38
+ ### 3. Publishing Tools (5 tools)
39
+ - `remember_publish` - Generate confirmation token
40
+ - `remember_confirm` - Execute any pending action
41
+ - `remember_deny` - Cancel any pending action
42
+ - `remember_search_space` - Search shared spaces
43
+ - `remember_query_space` - RAG queries on shared spaces
44
+
45
+ ### 4. Testing & Documentation
46
+ - Unit tests for token service
47
+ - Unit tests for all 5 tools
48
+ - End-to-end publishing flow test
49
+ - README updates
50
+ - Firestore TTL configuration guide
51
+
52
+ ---
53
+
54
+ ## Success Criteria
55
+
56
+ - [ ] Token service creates and validates tokens correctly
57
+ - [ ] Tokens expire after 5 minutes
58
+ - [ ] `remember_publish` generates tokens with stored parameters
59
+ - [ ] `remember_confirm` executes publish action successfully
60
+ - [ ] `remember_deny` cancels pending actions
61
+ - [ ] Published memories appear in shared space collections
62
+ - [ ] `remember_search_space` finds published memories
63
+ - [ ] `remember_query_space` answers questions about shared memories
64
+ - [ ] All 5 tools integrated into server.ts and server-factory.ts
65
+ - [ ] TypeScript compiles without errors
66
+ - [ ] All tests passing
67
+ - [ ] Build successful
68
+ - [ ] Firestore TTL policy configured
69
+
70
+ ---
71
+
72
+ ## Key Files to Create
73
+
74
+ ```
75
+ src/
76
+ ├── services/
77
+ │ └── confirmation-token.service.ts # Token management
78
+ ├── types/
79
+ │ └── space-memory.ts # SpaceMemory types
80
+ ├── weaviate/
81
+ │ └── space-schema.ts # Space collection schemas
82
+ └── tools/
83
+ ├── publish.ts # remember_publish
84
+ ├── confirm.ts # remember_confirm
85
+ ├── deny.ts # remember_deny
86
+ ├── search-space.ts # remember_search_space
87
+ └── query-space.ts # remember_query_space
88
+
89
+ tests/
90
+ └── unit/
91
+ ├── confirmation-token.service.test.ts
92
+ ├── publish.test.ts
93
+ ├── confirm.test.ts
94
+ ├── deny.test.ts
95
+ ├── search-space.test.ts
96
+ └── query-space.test.ts
97
+ ```
98
+
99
+ ---
100
+
101
+ ## Implementation Tasks
102
+
103
+ See individual task documents:
104
+ - Task 34: Create Confirmation Token Service
105
+ - Task 35: Create Space Memory Types and Schema
106
+ - Task 36: Implement remember_publish Tool
107
+ - Task 37: Implement remember_confirm Tool
108
+ - Task 38: Implement remember_deny Tool
109
+ - Task 39: Implement remember_search_space Tool
110
+ - Task 40: Implement remember_query_space Tool
111
+ - Task 41: Configure Firestore TTL Policy
112
+ - Task 42: Create Tests for Shared Spaces
113
+ - Task 43: Update Documentation
114
+
115
+ ---
116
+
117
+ ## Architecture Notes
118
+
119
+ ### Token Flow
120
+ ```
121
+ 1. Agent calls remember_publish(memory_id, target="the_void")
122
+ 2. System validates memory, generates token, stores params
123
+ 3. Agent asks user for confirmation
124
+ 4. User confirms → Agent calls remember_confirm(token)
125
+ 5. System validates token, fetches memory fresh, publishes
126
+ 6. Memory copied to Memory_the_void collection
127
+ ```
128
+
129
+ ### Space Collections
130
+ - **Personal**: `Memory_User_123` (single user, sanitized user_id)
131
+ - **Shared**: `Memory_the_void`, `Memory_public_space` (multi-user, snake_case space IDs)
132
+ - **Consistent naming**: `Memory_{snake_case_id}` pattern
133
+
134
+ **Naming Convention**:
135
+ - Space IDs are **snake_case** (lowercase with underscores): `the_void`, `public_space`
136
+ - Collection names use snake_case IDs: `Memory_the_void`, `Memory_public_space`
137
+ - Display names can use any case/spaces: "The Void", "Public Space"
138
+ - Conversion: Display name → lowercase → replace spaces with underscores
139
+ - Example: "The Void" → `the_void` → `Memory_the_void` collection
140
+
141
+ ### Security
142
+ - One-time use tokens (deleted after use)
143
+ - 5-minute expiry
144
+ - User ownership verification
145
+ - Fresh data fetch during confirmation
146
+
147
+ ---
148
+
149
+ ## Testing Strategy
150
+
151
+ 1. **Unit Tests**: Token service, each tool independently
152
+ 2. **Integration Tests**: Full publish flow (request → confirm → verify)
153
+ 3. **E2E Tests**: Multi-user discovery scenarios
154
+ 4. **Security Tests**: Token expiry, replay attacks, ownership
155
+
156
+ ---
157
+
158
+ ## Future Extensions
159
+
160
+ This pattern can be extended to other confirmable actions:
161
+ - `remember_retract` - Unpublish from shared space
162
+ - `remember_delete_permanent` - Permanent deletion with confirmation
163
+ - `remember_share_with_user` - Share with specific user
164
+ - Any other sensitive operation requiring explicit consent
165
+
166
+ ---
167
+
168
+ **Next Milestone**: M11 - Ghost Profiles & Pseudonymous Identity
169
+ **Blockers**: None (builds on M1-M4)
@@ -2,11 +2,11 @@
2
2
 
3
3
  project:
4
4
  name: remember-mcp
5
- version: 2.0.2
5
+ version: 2.3.0
6
6
  started: 2026-02-11
7
7
  status: in_progress
8
8
  current_milestone: M5
9
- last_updated: 2026-02-15
9
+ last_updated: 2026-02-16
10
10
 
11
11
  milestones:
12
12
  - id: M1
@@ -123,6 +123,19 @@ milestones:
123
123
  progress: 0%
124
124
  estimated_weeks: 1
125
125
 
126
+ - id: M10
127
+ name: Shared Spaces & Confirmation Flow
128
+ status: not_started
129
+ progress: 0%
130
+ estimated_weeks: 2-3
131
+ tasks_completed: 0
132
+ tasks_total: 10
133
+ notes: |
134
+ Token-based confirmation pattern for secure publishing
135
+ 5 new MCP tools for shared spaces
136
+ Space collections with snake_case naming
137
+ Firestore TTL for automatic token cleanup
138
+
126
139
  - id: M7
127
140
  name: Trust & Permissions
128
141
  status: not_started
@@ -368,9 +381,9 @@ tasks:
368
381
 
369
382
  documentation:
370
383
  design_documents: 23
371
- milestone_documents: 9
384
+ milestone_documents: 10
372
385
  pattern_documents: 5
373
- task_documents: 23
386
+ task_documents: 33
374
387
 
375
388
  progress:
376
389
  planning: 100%
@@ -378,6 +391,79 @@ progress:
378
391
  overall: 50%
379
392
 
380
393
  recent_work:
394
+ - date: 2026-02-16
395
+ description: Created Milestone 10 and Tasks for Shared Spaces
396
+ items:
397
+ - ✅ Created M10: Shared Spaces & Confirmation Flow milestone
398
+ - ✅ Created Task 34: Confirmation Token Service
399
+ - ✅ Created Task 35: Space Memory Types and Schema
400
+ - ✅ Created Task 36: Implement remember_publish
401
+ - ✅ Created Task 37: Implement remember_confirm
402
+ - ✅ Created Task 38: Implement remember_deny
403
+ - ✅ Created Task 39: Implement remember_search_space
404
+ - ✅ Created Task 40: Implement remember_query_space
405
+ - ✅ Created Task 41: Configure Firestore TTL
406
+ - ✅ Created Task 42: Create Tests
407
+ - ✅ Created Task 43: Update Documentation
408
+ - ✅ Updated naming convention: snake_case for space IDs
409
+ - ✅ "The Void" → `the_void` → `Memory_the_void`
410
+ - ✅ Token-based confirmation pattern documented
411
+ - ✅ 5 new tools planned (publish, confirm, deny, search_space, query_space)
412
+ - 📋 Ready to begin M10 implementation
413
+ - 📋 10 tasks, estimated 30 hours total
414
+
415
+ - date: 2026-02-16
416
+ description: ACP Initialization Complete - Firebase SDK Reverted
417
+ items:
418
+ - ✅ AGENT.md confirmed up-to-date (v1.0.3)
419
+ - ⚠️ ACP updates available (v1.0.3 with new templates and scripts)
420
+ - ✅ All agent documentation reviewed and current
421
+ - ✅ Project status verified: 4 milestones complete (M1-M4: 100%)
422
+ - ✅ Version 2.2.1 confirmed (latest release)
423
+ - ✅ Reverted commit 328abd3 (Firebase Admin SDK migration)
424
+ - ✅ Restored @prmichaelsen/firebase-admin-sdk-v8@2.2.0
425
+ - ✅ 53 unit tests passing (1 skipped integration test)
426
+ - ✅ Test coverage: 29.76% overall
427
+ - ✅ TypeScript compiles without errors
428
+ - ✅ Build successful
429
+ - ✅ All 12 MCP tools implemented and working
430
+ - ✅ Comprehensive error handling framework in place
431
+ - ✅ Dual export: standalone server + factory for mcp-auth
432
+ - ✅ Multi-tenant architecture with per-user isolation
433
+ - ✅ Vector search with Weaviate + metadata with Firestore
434
+ - ✅ 45 content types with dynamic descriptions
435
+ - ✅ N-way relationships with bidirectional tracking
436
+ - ✅ User preferences system (6 categories)
437
+ - 📋 Ready to begin M5: Template System
438
+ - 📋 Project structure follows ACP and bootstrap patterns
439
+ - 📋 Documentation comprehensive and accurate
440
+
441
+ - date: 2026-02-16
442
+ description: ACP Initialization - Complete Project Context Review
443
+ items:
444
+ - ✅ AGENT.md confirmed up-to-date (v1.0.3)
445
+ - ✅ All agent documentation reviewed and current
446
+ - ✅ Project status verified: 4 milestones complete (M1-M4: 100%)
447
+ - ✅ Version 2.2.1 confirmed (latest release)
448
+ - ✅ 53 unit tests passing (1 skipped integration test)
449
+ - ✅ Test coverage: 24.68% overall
450
+ - ✅ TypeScript compiles without errors
451
+ - ✅ Build successful
452
+ - ✅ All 12 MCP tools implemented and working
453
+ - ✅ Comprehensive error handling framework in place
454
+ - ✅ Dual export: standalone server + factory for mcp-auth
455
+ - ✅ Multi-tenant architecture with per-user isolation
456
+ - ✅ Vector search with Weaviate + metadata with Firestore
457
+ - ✅ 45 content types with dynamic descriptions
458
+ - ✅ N-way relationships with bidirectional tracking
459
+ - ✅ User preferences system (6 categories)
460
+ - ✅ LLM provider abstraction (Bedrock implemented)
461
+ - ✅ Background job service for async operations
462
+ - ✅ Production-ready with Cloud Run deployment
463
+ - 📋 Ready to begin M5: Template System
464
+ - 📋 Project structure follows ACP and bootstrap patterns
465
+ - 📋 Documentation comprehensive and accurate
466
+
381
467
  - date: 2026-02-15
382
468
  description: All Production Error Tasks COMPLETED (Tasks 23-25)
383
469
  items:
@@ -0,0 +1,118 @@
1
+ #!/bin/bash
2
+
3
+ # Agent Context Protocol (ACP) Installation Script
4
+ # This script sets up the ACP directory structure and template files in a project
5
+
6
+ set -e
7
+
8
+ # Colors for output
9
+ RED='\033[0;31m'
10
+ GREEN='\033[0;32m'
11
+ YELLOW='\033[1;33m'
12
+ BLUE='\033[0;34m'
13
+ NC='\033[0m' # No Color
14
+
15
+ # Repository details
16
+ REPO_URL="https://github.com/prmichaelsen/agent-context-protocol.git"
17
+ BRANCH="mainline"
18
+
19
+ echo -e "${GREEN}Agent Context Protocol (ACP) Installer${NC}"
20
+ echo "========================================"
21
+ echo ""
22
+
23
+ # Use current directory
24
+ TARGET_DIR="$(pwd)"
25
+
26
+ echo "Installing ACP to: $TARGET_DIR"
27
+ echo ""
28
+
29
+ # Check if agent directory already exists
30
+ if [ -d "$TARGET_DIR/agent" ]; then
31
+ echo -e "${YELLOW}Note: agent/ directory already exists${NC}"
32
+ echo "All ACP files will be updated to latest versions."
33
+ echo ""
34
+ fi
35
+
36
+ # Create temporary directory
37
+ TEMP_DIR=$(mktemp -d)
38
+ trap "rm -rf $TEMP_DIR" EXIT
39
+
40
+ echo "Cloning ACP repository..."
41
+ if ! git clone --depth 1 --branch "$BRANCH" "$REPO_URL" "$TEMP_DIR" &>/dev/null; then
42
+ echo -e "${RED}Error: Failed to clone repository${NC}"
43
+ echo "Please check your internet connection and try again."
44
+ exit 1
45
+ fi
46
+
47
+ echo -e "${GREEN}✓${NC} Repository cloned"
48
+ echo ""
49
+
50
+ # Create directory structure
51
+ echo "Creating directory structure..."
52
+ mkdir -p "$TARGET_DIR/agent/design"
53
+ mkdir -p "$TARGET_DIR/agent/milestones"
54
+ mkdir -p "$TARGET_DIR/agent/patterns"
55
+ mkdir -p "$TARGET_DIR/agent/tasks"
56
+ mkdir -p "$TARGET_DIR/agent/commands"
57
+ mkdir -p "$TARGET_DIR/agent/scripts"
58
+
59
+ # Create .gitkeep files
60
+ touch "$TARGET_DIR/agent/design/.gitkeep"
61
+ touch "$TARGET_DIR/agent/milestones/.gitkeep"
62
+ touch "$TARGET_DIR/agent/patterns/.gitkeep"
63
+ touch "$TARGET_DIR/agent/tasks/.gitkeep"
64
+
65
+ echo -e "${GREEN}✓${NC} Directory structure created"
66
+ echo ""
67
+
68
+ # Copy files
69
+ echo "Installing ACP files..."
70
+
71
+ # Copy template files (only .template.md files from these directories)
72
+ find "$TEMP_DIR/agent/design" -maxdepth 1 -name "*.template.md" -exec cp {} "$TARGET_DIR/agent/design/" \;
73
+ find "$TEMP_DIR/agent/milestones" -maxdepth 1 -name "*.template.md" -exec cp {} "$TARGET_DIR/agent/milestones/" \;
74
+ find "$TEMP_DIR/agent/patterns" -maxdepth 1 -name "*.template.md" -exec cp {} "$TARGET_DIR/agent/patterns/" \;
75
+ find "$TEMP_DIR/agent/tasks" -maxdepth 1 -name "*.template.md" -exec cp {} "$TARGET_DIR/agent/tasks/" \;
76
+
77
+ # Copy command template
78
+ cp "$TEMP_DIR/agent/commands/command.template.md" "$TARGET_DIR/agent/commands/"
79
+
80
+ # Copy all command files (flat structure with dot notation)
81
+ # Copies files like acp.init.md, acp.status.md, deploy.production.md, etc.
82
+ if [ -d "$TEMP_DIR/agent/commands" ]; then
83
+ find "$TEMP_DIR/agent/commands" -maxdepth 1 -name "*.*.md" -exec cp {} "$TARGET_DIR/agent/commands/" \;
84
+ fi
85
+
86
+ # Copy progress template
87
+ cp "$TEMP_DIR/agent/progress.template.yaml" "$TARGET_DIR/agent/"
88
+
89
+ # Copy AGENT.md
90
+ cp "$TEMP_DIR/AGENT.md" "$TARGET_DIR/"
91
+
92
+ # Copy scripts
93
+ cp "$TEMP_DIR/agent/scripts/update.sh" "$TARGET_DIR/agent/scripts/"
94
+ cp "$TEMP_DIR/agent/scripts/check-for-updates.sh" "$TARGET_DIR/agent/scripts/"
95
+ cp "$TEMP_DIR/agent/scripts/uninstall.sh" "$TARGET_DIR/agent/scripts/"
96
+ cp "$TEMP_DIR/agent/scripts/version.sh" "$TARGET_DIR/agent/scripts/"
97
+ cp "$TEMP_DIR/agent/scripts/install.sh" "$TARGET_DIR/agent/scripts/"
98
+ chmod +x "$TARGET_DIR/agent/scripts"/*.sh
99
+
100
+ echo -e "${GREEN}✓${NC} All files installed"
101
+ echo ""
102
+ echo -e "${GREEN}Installation complete!${NC}"
103
+ echo ""
104
+ echo -e "${GREEN}Next steps:${NC}"
105
+ echo "1. Create your requirements document:"
106
+ echo " cp agent/design/requirements.template.md agent/design/requirements.md"
107
+ echo ""
108
+ echo "2. Define your first milestone:"
109
+ echo " cp agent/milestones/milestone-1-{title}.template.md agent/milestones/milestone-1-foundation.md"
110
+ echo ""
111
+ echo "3. Initialize progress tracking:"
112
+ echo " cp agent/progress.template.yaml agent/progress.yaml"
113
+ echo ""
114
+ echo "4. Read AGENT.md for complete documentation"
115
+ echo ""
116
+ echo -e "${BLUE}For AI agents:${NC}"
117
+ echo "Type 'AGENT.md: Initialize' to get started."
118
+ echo ""
@@ -43,22 +43,34 @@ echo ""
43
43
 
44
44
  echo "Updating ACP files..."
45
45
 
46
- # Update template files
47
- cp "$TEMP_DIR/agent/design/design.template.md" "agent/design/"
48
- cp "$TEMP_DIR/agent/design/requirements.template.md" "agent/design/"
49
- cp "$TEMP_DIR/agent/milestones/milestone-1-{title}.template.md" "agent/milestones/"
50
- cp "$TEMP_DIR/agent/tasks/task-1-{title}.template.md" "agent/tasks/"
51
- cp "$TEMP_DIR/agent/patterns/pattern.template.md" "agent/patterns/"
52
- cp "$TEMP_DIR/agent/patterns/bootstrap.template.md" "agent/patterns/"
46
+ # Update template files (only .template.md files from these directories)
47
+ find "$TEMP_DIR/agent/design" -maxdepth 1 -name "*.template.md" -exec cp {} "agent/design/" \;
48
+ find "$TEMP_DIR/agent/milestones" -maxdepth 1 -name "*.template.md" -exec cp {} "agent/milestones/" \;
49
+ find "$TEMP_DIR/agent/patterns" -maxdepth 1 -name "*.template.md" -exec cp {} "agent/patterns/" \;
50
+ find "$TEMP_DIR/agent/tasks" -maxdepth 1 -name "*.template.md" -exec cp {} "agent/tasks/" \;
51
+
52
+ # Update command template
53
+ mkdir -p "agent/commands"
54
+ cp "$TEMP_DIR/agent/commands/command.template.md" "agent/commands/"
55
+
56
+ # Update all command files (flat structure with dot notation)
57
+ # Copies files like acp.init.md, acp.status.md, deploy.production.md, etc.
58
+ if [ -d "$TEMP_DIR/agent/commands" ]; then
59
+ find "$TEMP_DIR/agent/commands" -maxdepth 1 -name "*.*.md" -exec cp {} "agent/commands/" \;
60
+ fi
61
+
62
+ # Update progress template
53
63
  cp "$TEMP_DIR/agent/progress.template.yaml" "agent/"
54
64
 
55
65
  # Update AGENT.md
56
66
  cp "$TEMP_DIR/AGENT.md" "."
57
67
 
58
68
  # Update scripts
59
- cp "$TEMP_DIR/scripts/update.sh" "agent/scripts/"
60
- cp "$TEMP_DIR/scripts/check-for-updates.sh" "agent/scripts/"
61
- cp "$TEMP_DIR/scripts/uninstall.sh" "agent/scripts/"
69
+ cp "$TEMP_DIR/agent/scripts/update.sh" "agent/scripts/"
70
+ cp "$TEMP_DIR/agent/scripts/check-for-updates.sh" "agent/scripts/"
71
+ cp "$TEMP_DIR/agent/scripts/uninstall.sh" "agent/scripts/"
72
+ cp "$TEMP_DIR/agent/scripts/version.sh" "agent/scripts/"
73
+ cp "$TEMP_DIR/agent/scripts/install.sh" "agent/scripts/"
62
74
  chmod +x agent/scripts/*.sh
63
75
 
64
76
  echo -e "${GREEN}✓${NC} All files updated"
@@ -0,0 +1,35 @@
1
+ #!/bin/bash
2
+
3
+ # ACP Version Check Script
4
+ # Extracts and displays the current ACP version from AGENT.md
5
+
6
+ set -e
7
+
8
+ # Colors for output
9
+ GREEN='\033[0;32m'
10
+ BLUE='\033[0;34m'
11
+ NC='\033[0m' # No Color
12
+
13
+ # Check if AGENT.md exists
14
+ if [ ! -f "AGENT.md" ]; then
15
+ echo "Error: AGENT.md not found in current directory"
16
+ echo "This script should be run from your project root where AGENT.md is located."
17
+ exit 1
18
+ fi
19
+
20
+ # Extract version from AGENT.md
21
+ VERSION=$(grep -m 1 "^\*\*Version\*\*:" AGENT.md | sed 's/.*: //')
22
+ CREATED=$(grep -m 1 "^\*\*Created\*\*:" AGENT.md | sed 's/.*: //')
23
+ STATUS=$(grep -m 1 "^\*\*Status\*\*:" AGENT.md | sed 's/.*: //')
24
+
25
+ # Display version information
26
+ echo -e "${BLUE}📦 ACP Version Information${NC}"
27
+ echo ""
28
+ echo "Version: $VERSION"
29
+ echo "Created: $CREATED"
30
+ echo "Status: $STATUS"
31
+ echo ""
32
+ echo -e "${GREEN}✓${NC} ACP is installed"
33
+ echo ""
34
+ echo "To check for updates: ./agent/scripts/check-for-updates.sh"
35
+ echo "To update ACP: ./agent/scripts/update.sh"
@@ -0,0 +1,51 @@
1
+ # Task 27: Implement LLM Provider Interface
2
+
3
+ **Milestone**: Phase 0 - LLM Provider Abstraction
4
+ **Estimated Time**: 2-3 hours
5
+ **Dependencies**: None
6
+ **Status**: Not Started
7
+
8
+ ---
9
+
10
+ ## Objective
11
+
12
+ Create the core LLM provider interface and type definitions that will be used by all LLM provider implementations.
13
+
14
+ ## Steps
15
+
16
+ 1. **Create LLM types file**
17
+ - Create `src/llm/types.ts`
18
+ - Define `LLMMessage` interface (role, content)
19
+ - Define `LLMCompletionOptions` interface (temperature, maxTokens, etc.)
20
+ - Define `LLMCompletionResult` interface (content, usage, finishReason)
21
+ - Define `LLMProvider` interface with `complete()` and `validateConfig()` methods
22
+
23
+ 2. **Add type exports**
24
+ - Export all interfaces from `types.ts`
25
+ - Ensure TypeScript strict mode compatibility
26
+ - Add JSDoc comments for documentation
27
+
28
+ 3. **Create index file**
29
+ - Create `src/llm/index.ts`
30
+ - Re-export all types for easy importing
31
+
32
+ ## Verification
33
+
34
+ - [ ] TypeScript compiles without errors
35
+ - [ ] All interfaces are properly exported
36
+ - [ ] JSDoc comments are present
37
+ - [ ] Types follow existing project conventions
38
+ - [ ] Can import types: `import type { LLMProvider } from '../llm/types.js'`
39
+
40
+ ## Files to Create
41
+
42
+ - `src/llm/types.ts` - Core type definitions
43
+ - `src/llm/index.ts` - Barrel export file
44
+
45
+ ## Reference
46
+
47
+ See [`agent/design/llm-provider-abstraction.md`](../design/llm-provider-abstraction.md) lines 128-162 for interface definitions.
48
+
49
+ ---
50
+
51
+ **Next Task**: [task-28-implement-llm-provider-factory.md](task-28-implement-llm-provider-factory.md)
@@ -0,0 +1,64 @@
1
+ # Task 28: Implement LLM Provider Factory
2
+
3
+ **Milestone**: Phase 0 - LLM Provider Abstraction
4
+ **Estimated Time**: 2-3 hours
5
+ **Dependencies**: task-27-implement-llm-provider-interface.md
6
+ **Status**: Not Started
7
+
8
+ ---
9
+
10
+ ## Objective
11
+
12
+ Create the LLM provider factory that instantiates the correct provider based on configuration and provides a singleton instance.
13
+
14
+ ## Steps
15
+
16
+ 1. **Create factory file**
17
+ - Create `src/llm/factory.ts`
18
+ - Import `LLMProvider` interface from `types.ts`
19
+ - Import config from `../config.js`
20
+
21
+ 2. **Implement provider singleton**
22
+ - Create `providerInstance` variable (initially null)
23
+ - Implement `getLLMProvider()` function
24
+ - Return cached instance if exists
25
+ - Otherwise create new instance based on `config.llm.provider`
26
+
27
+ 3. **Add provider switching logic**
28
+ - Switch on provider type (bedrock, openai, anthropic)
29
+ - Import provider classes dynamically
30
+ - Call `validateConfig()` on instantiation
31
+ - Log which provider is being used
32
+ - Throw error for unsupported providers
33
+
34
+ 4. **Add convenience function**
35
+ - Implement `completeLLM()` function
36
+ - Wrapper around `getLLMProvider().complete()`
37
+ - Makes it easy to call LLM without getting provider first
38
+
39
+ 5. **Add error handling**
40
+ - Handle missing provider implementations gracefully
41
+ - Provide clear error messages
42
+ - Validate configuration before use
43
+
44
+ ## Verification
45
+
46
+ - [ ] TypeScript compiles without errors
47
+ - [ ] Factory returns singleton instance
48
+ - [ ] Throws error for unsupported providers
49
+ - [ ] Validates configuration on instantiation
50
+ - [ ] Logs provider selection
51
+ - [ ] `completeLLM()` convenience function works
52
+ - [ ] Can be imported: `import { getLLMProvider, completeLLM } from '../llm/factory.js'`
53
+
54
+ ## Files to Create
55
+
56
+ - `src/llm/factory.ts` - Provider factory and singleton
57
+
58
+ ## Reference
59
+
60
+ See [`agent/design/llm-provider-abstraction.md`](../design/llm-provider-abstraction.md) lines 328-376 for factory implementation.
61
+
62
+ ---
63
+
64
+ **Next Task**: [task-29-update-config-for-llm.md](task-29-update-config-for-llm.md)
@@ -0,0 +1,71 @@
1
+ # Task 29: Update Config for LLM Providers
2
+
3
+ **Milestone**: Phase 0 - LLM Provider Abstraction
4
+ **Estimated Time**: 1-2 hours
5
+ **Dependencies**: None (can be done in parallel with task-27/28)
6
+ **Status**: Not Started
7
+
8
+ ---
9
+
10
+ ## Objective
11
+
12
+ Update the configuration system to support multiple LLM providers with provider-specific settings.
13
+
14
+ ## Steps
15
+
16
+ 1. **Update config.ts**
17
+ - Add `llm` configuration section
18
+ - Add provider selection (`LLM_PROVIDER` env var)
19
+ - Add model selection (`LLM_MODEL` env var)
20
+ - Add provider-specific configs:
21
+ - `openai`: apiKey, orgId
22
+ - `anthropic`: apiKey
23
+ - `bedrock`: region, accessKeyId, secretAccessKey, sessionToken
24
+ - `cohere`: apiKey
25
+
26
+ 2. **Add type definitions**
27
+ - Define `LLMProvider` type: `'openai' | 'anthropic' | 'bedrock' | 'cohere' | 'custom'`
28
+ - Export type for use in other files
29
+
30
+ 3. **Set defaults**
31
+ - Default provider: 'openai'
32
+ - Default model: 'gpt-4o-mini'
33
+ - Fallback to empty strings for missing keys
34
+
35
+ 4. **Update .env.example**
36
+ - Add LLM provider configuration section
37
+ - Document all environment variables
38
+ - Provide examples for each provider
39
+ - Mark optional vs required variables
40
+
41
+ 5. **Update config validation**
42
+ - Add LLM config to validation output
43
+ - Mask sensitive keys in logs
44
+ - Validate required fields per provider
45
+
46
+ ## Verification
47
+
48
+ - [ ] TypeScript compiles without errors
49
+ - [ ] Config exports `llm` section
50
+ - [ ] All provider configs are present
51
+ - [ ] `.env.example` is updated with examples
52
+ - [ ] Config validation includes LLM settings
53
+ - [ ] Sensitive keys are masked in logs
54
+ - [ ] Can access config: `import { config } from './config.js'`
55
+ - [ ] `config.llm.provider` returns correct type
56
+
57
+ ## Files to Modify
58
+
59
+ - `src/config.ts` - Add LLM configuration
60
+ - `.env.example` - Add LLM environment variables
61
+
62
+ ## Reference
63
+
64
+ See [`agent/design/llm-provider-abstraction.md`](../design/llm-provider-abstraction.md):
65
+ - Lines 33-67 for environment variables
66
+ - Lines 75-123 for config structure
67
+ - Lines 508-568 for .env.example
68
+
69
+ ---
70
+
71
+ **Next Task**: [task-30-implement-bedrock-provider.md](task-30-implement-bedrock-provider.md)