@prmichaelsen/acp-mcp 0.1.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 (94) hide show
  1. package/.env.example +5 -0
  2. package/AGENT.md +1279 -0
  3. package/README.md +78 -0
  4. package/agent/commands/acp.command-create.md +372 -0
  5. package/agent/commands/acp.design-create.md +224 -0
  6. package/agent/commands/acp.init.md +410 -0
  7. package/agent/commands/acp.package-create.md +894 -0
  8. package/agent/commands/acp.package-info.md +211 -0
  9. package/agent/commands/acp.package-install.md +461 -0
  10. package/agent/commands/acp.package-list.md +279 -0
  11. package/agent/commands/acp.package-publish.md +540 -0
  12. package/agent/commands/acp.package-remove.md +292 -0
  13. package/agent/commands/acp.package-search.md +306 -0
  14. package/agent/commands/acp.package-update.md +310 -0
  15. package/agent/commands/acp.package-validate.md +535 -0
  16. package/agent/commands/acp.pattern-create.md +326 -0
  17. package/agent/commands/acp.plan.md +552 -0
  18. package/agent/commands/acp.proceed.md +336 -0
  19. package/agent/commands/acp.project-create.md +672 -0
  20. package/agent/commands/acp.report.md +394 -0
  21. package/agent/commands/acp.resume.md +237 -0
  22. package/agent/commands/acp.status.md +280 -0
  23. package/agent/commands/acp.sync.md +363 -0
  24. package/agent/commands/acp.task-create.md +390 -0
  25. package/agent/commands/acp.update.md +301 -0
  26. package/agent/commands/acp.validate.md +436 -0
  27. package/agent/commands/acp.version-check-for-updates.md +275 -0
  28. package/agent/commands/acp.version-check.md +190 -0
  29. package/agent/commands/acp.version-update.md +288 -0
  30. package/agent/commands/command.template.md +316 -0
  31. package/agent/commands/git.commit.md +513 -0
  32. package/agent/commands/git.init.md +513 -0
  33. package/agent/commands/mcp-server-starter.add-tool.md +677 -0
  34. package/agent/commands/mcp-server-starter.init.md +894 -0
  35. package/agent/design/.gitkeep +0 -0
  36. package/agent/design/design.template.md +136 -0
  37. package/agent/design/remember-mcp-analysis.md +987 -0
  38. package/agent/design/requirements.template.md +387 -0
  39. package/agent/manifest.template.yaml +13 -0
  40. package/agent/manifest.yaml +109 -0
  41. package/agent/milestones/.gitkeep +0 -0
  42. package/agent/milestones/milestone-1-{title}.template.md +206 -0
  43. package/agent/package.template.yaml +36 -0
  44. package/agent/patterns/.gitkeep +0 -0
  45. package/agent/patterns/bootstrap.template.md +1237 -0
  46. package/agent/patterns/mcp-server-starter.bootstrap.md +597 -0
  47. package/agent/patterns/mcp-server-starter.build-config.md +554 -0
  48. package/agent/patterns/mcp-server-starter.config-management.md +525 -0
  49. package/agent/patterns/mcp-server-starter.server-factory.md +616 -0
  50. package/agent/patterns/mcp-server-starter.server-standalone.md +642 -0
  51. package/agent/patterns/mcp-server-starter.test-config.md +558 -0
  52. package/agent/patterns/mcp-server-starter.tool-creation.md +653 -0
  53. package/agent/patterns/pattern.template.md +364 -0
  54. package/agent/progress.template.yaml +161 -0
  55. package/agent/progress.yaml +33 -0
  56. package/agent/schemas/package.schema.yaml +161 -0
  57. package/agent/scripts/acp.common.sh +1362 -0
  58. package/agent/scripts/acp.install.sh +213 -0
  59. package/agent/scripts/acp.package-create.sh +925 -0
  60. package/agent/scripts/acp.package-info.sh +270 -0
  61. package/agent/scripts/acp.package-install.sh +550 -0
  62. package/agent/scripts/acp.package-list.sh +263 -0
  63. package/agent/scripts/acp.package-publish.sh +420 -0
  64. package/agent/scripts/acp.package-remove.sh +272 -0
  65. package/agent/scripts/acp.package-search.sh +156 -0
  66. package/agent/scripts/acp.package-update.sh +356 -0
  67. package/agent/scripts/acp.package-validate.sh +766 -0
  68. package/agent/scripts/acp.uninstall.sh +85 -0
  69. package/agent/scripts/acp.version-check-for-updates.sh +98 -0
  70. package/agent/scripts/acp.version-check.sh +47 -0
  71. package/agent/scripts/acp.version-update.sh +158 -0
  72. package/agent/scripts/acp.yaml-parser.sh +736 -0
  73. package/agent/scripts/acp.yaml-validate.sh +205 -0
  74. package/agent/tasks/.gitkeep +0 -0
  75. package/agent/tasks/task-1-{title}.template.md +225 -0
  76. package/dist/config.d.ts +4 -0
  77. package/dist/server-factory.d.ts +9 -0
  78. package/dist/server-factory.js +99 -0
  79. package/dist/server-factory.js.map +7 -0
  80. package/dist/server.d.ts +2 -0
  81. package/dist/server.js +106 -0
  82. package/dist/server.js.map +7 -0
  83. package/dist/tools/acp-remote-list-files.d.ts +15 -0
  84. package/dist/types/ssh-config.d.ts +16 -0
  85. package/esbuild.build.js +34 -0
  86. package/esbuild.watch.js +31 -0
  87. package/jest.config.js +31 -0
  88. package/package.json +54 -0
  89. package/src/config.ts +16 -0
  90. package/src/server-factory.ts +43 -0
  91. package/src/server.ts +46 -0
  92. package/src/tools/acp-remote-list-files.ts +89 -0
  93. package/src/types/ssh-config.ts +17 -0
  94. package/tsconfig.json +22 -0
@@ -0,0 +1,85 @@
1
+ #!/bin/bash
2
+
3
+ # Agent Context Protocol (ACP) Uninstall Script
4
+ # This script removes all ACP files from a project
5
+ # Usage: ./agent/scripts/unacp.install.sh [-y]
6
+
7
+ set -e
8
+
9
+ # Colors for output using tput (more reliable than ANSI codes)
10
+ if command -v tput >/dev/null 2>&1 && [ -t 1 ]; then
11
+ RED=$(tput setaf 1)
12
+ GREEN=$(tput setaf 2)
13
+ YELLOW=$(tput setaf 3)
14
+ BLUE=$(tput setaf 4)
15
+ BOLD=$(tput bold)
16
+ NC=$(tput sgr0)
17
+ else
18
+ RED=''
19
+ GREEN=''
20
+ YELLOW=''
21
+ BLUE=''
22
+ BOLD=''
23
+ NC=''
24
+ fi
25
+
26
+ # Check for -y flag
27
+ AUTO_CONFIRM=false
28
+ if [ "$1" = "-y" ]; then
29
+ AUTO_CONFIRM=true
30
+ fi
31
+
32
+ echo "${YELLOW}Agent Context Protocol (ACP) Uninstall${NC}"
33
+ echo "======================================"
34
+ echo ""
35
+
36
+ # Check if agent directory exists
37
+ if [ ! -d "agent" ] && [ ! -f "AGENT.md" ]; then
38
+ echo "${YELLOW}No ACP files found in current directory${NC}"
39
+ exit 0
40
+ fi
41
+
42
+ # If not auto-confirmed, show instructions for agents
43
+ if [ "$AUTO_CONFIRM" = false ]; then
44
+ echo "${BLUE}Note for AI Agents:${NC}"
45
+ echo "This script requires user confirmation to prevent accidental deletion."
46
+ echo "Please ask the user: 'Do you want to uninstall ACP from this project?'"
47
+ echo "If yes, rerun this script with: ./agent/scripts/unacp.install.sh -y"
48
+ echo ""
49
+ echo "${RED}WARNING: This will permanently delete:${NC}"
50
+ echo " - agent/ directory (all contents)"
51
+ echo " - AGENT.md file"
52
+ echo ""
53
+ echo "Make sure you have committed any important changes to git."
54
+ echo ""
55
+
56
+ read -p "Are you sure you want to remove all ACP files? (y/N) " -n 1 -r
57
+ echo
58
+
59
+ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
60
+ echo "Uninstall cancelled. No files were deleted."
61
+ exit 0
62
+ fi
63
+ fi
64
+
65
+ echo ""
66
+ echo "Removing ACP files..."
67
+
68
+ # Remove agent directory
69
+ if [ -d "agent" ]; then
70
+ rm -rf agent
71
+ echo "${GREEN}✓${NC} Removed agent/ directory"
72
+ fi
73
+
74
+ # Remove AGENT.md
75
+ if [ -f "AGENT.md" ]; then
76
+ rm -f AGENT.md
77
+ echo "${GREEN}✓${NC} Removed AGENT.md"
78
+ fi
79
+
80
+ echo ""
81
+ echo "${GREEN}Uninstall complete!${NC}"
82
+ echo ""
83
+ echo "All ACP files have been removed from this project."
84
+ echo "Use 'git status' to see what was deleted."
85
+ echo ""
@@ -0,0 +1,98 @@
1
+ #!/bin/bash
2
+
3
+ # Agent Context Protocol (ACP) Update Checker
4
+ # This script checks if updates are available for AGENT.md
5
+
6
+ set -e
7
+
8
+ # Colors for output using tput (more reliable than ANSI codes)
9
+ if command -v tput >/dev/null 2>&1 && [ -t 1 ]; then
10
+ RED=$(tput setaf 1)
11
+ GREEN=$(tput setaf 2)
12
+ YELLOW=$(tput setaf 3)
13
+ BLUE=$(tput setaf 4)
14
+ BOLD=$(tput bold)
15
+ NC=$(tput sgr0)
16
+ else
17
+ RED=''
18
+ GREEN=''
19
+ YELLOW=''
20
+ BLUE=''
21
+ BOLD=''
22
+ NC=''
23
+ fi
24
+
25
+ # Repository URL
26
+ REPO_URL="https://raw.githubusercontent.com/prmichaelsen/agent-context-protocol/mainline"
27
+ AGENT_MD_URL="$REPO_URL/AGENT.md"
28
+ CHANGELOG_URL="$REPO_URL/CHANGELOG.md"
29
+
30
+ # Silent mode (no output, just exit codes)
31
+ SILENT=false
32
+ if [ "$1" = "--silent" ] || [ "$1" = "-s" ]; then
33
+ SILENT=true
34
+ fi
35
+
36
+ # Check if AGENT.md exists
37
+ if [ ! -f "AGENT.md" ]; then
38
+ if [ "$SILENT" = false ]; then
39
+ echo "${RED}Error: AGENT.md not found in current directory${NC}" >&2
40
+ echo "This script should be run from your project root where AGENT.md is located." >&2
41
+ fi
42
+ exit 2
43
+ fi
44
+
45
+ # Download latest AGENT.md for comparison
46
+ if [ "$SILENT" = false ]; then
47
+ echo "${BLUE}Checking for updates...${NC}"
48
+ fi
49
+
50
+ if command -v curl &> /dev/null; then
51
+ curl -fsSL "$AGENT_MD_URL" -o /tmp/AGENT.md.latest 2>/dev/null
52
+ elif command -v wget &> /dev/null; then
53
+ wget -q "$AGENT_MD_URL" -O /tmp/AGENT.md.latest 2>/dev/null
54
+ else
55
+ if [ "$SILENT" = false ]; then
56
+ echo "${RED}Error: Neither curl nor wget is available${NC}" >&2
57
+ fi
58
+ exit 2
59
+ fi
60
+
61
+ if [ $? -ne 0 ]; then
62
+ if [ "$SILENT" = false ]; then
63
+ echo "${RED}Error: Failed to download latest AGENT.md${NC}" >&2
64
+ echo "Please check your internet connection." >&2
65
+ fi
66
+ rm -f /tmp/AGENT.md.latest
67
+ exit 2
68
+ fi
69
+
70
+ # Compare files
71
+ if cmp -s AGENT.md /tmp/AGENT.md.latest; then
72
+ # Files are identical - no updates
73
+ if [ "$SILENT" = false ]; then
74
+ echo "${GREEN}✓${NC} Your AGENT.md is up to date!"
75
+ fi
76
+ rm -f /tmp/AGENT.md.latest
77
+ exit 0
78
+ else
79
+ # Files differ - updates available
80
+ if [ "$SILENT" = false ]; then
81
+ echo "${YELLOW}⚠${NC} Updates are available for AGENT.md"
82
+ echo ""
83
+
84
+ # Download and display changelog
85
+ echo "Recent changes:"
86
+ echo "---------------"
87
+ if command -v curl &> /dev/null; then
88
+ curl -fsSL "$CHANGELOG_URL" 2>/dev/null | head -n 50
89
+ elif command -v wget &> /dev/null; then
90
+ wget -q "$CHANGELOG_URL" -O - 2>/dev/null | head -n 50
91
+ fi
92
+ echo ""
93
+ echo "To update, run: ./agent/scripts/acp.version-update.sh"
94
+ echo "Or: curl -fsSL https://raw.githubusercontent.com/prmichaelsen/agent-context-protocol/mainlin./agent/scripts/acp.version-update.sh | bash"
95
+ fi
96
+ rm -f /tmp/AGENT.md.latest
97
+ exit 1
98
+ fi
@@ -0,0 +1,47 @@
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 using tput (more reliable than ANSI codes)
9
+ if command -v tput >/dev/null 2>&1 && [ -t 1 ]; then
10
+ RED=$(tput setaf 1)
11
+ GREEN=$(tput setaf 2)
12
+ YELLOW=$(tput setaf 3)
13
+ BLUE=$(tput setaf 4)
14
+ BOLD=$(tput bold)
15
+ NC=$(tput sgr0)
16
+ else
17
+ RED=''
18
+ GREEN=''
19
+ YELLOW=''
20
+ BLUE=''
21
+ BOLD=''
22
+ NC=''
23
+ fi
24
+
25
+ # Check if AGENT.md exists
26
+ if [ ! -f "AGENT.md" ]; then
27
+ echo "Error: AGENT.md not found in current directory"
28
+ echo "This script should be run from your project root where AGENT.md is located."
29
+ exit 1
30
+ fi
31
+
32
+ # Extract version from AGENT.md
33
+ VERSION=$(grep -m 1 "^\*\*Version\*\*:" AGENT.md | sed 's/.*: //')
34
+ CREATED=$(grep -m 1 "^\*\*Created\*\*:" AGENT.md | sed 's/.*: //')
35
+ STATUS=$(grep -m 1 "^\*\*Status\*\*:" AGENT.md | sed 's/.*: //')
36
+
37
+ # Display version information
38
+ echo "${BLUE}📦 ACP Version Information${NC}"
39
+ echo ""
40
+ echo "Version: $VERSION"
41
+ echo "Created: $CREATED"
42
+ echo "Status: $STATUS"
43
+ echo ""
44
+ echo "${GREEN}✓${NC} ACP is installed"
45
+ echo ""
46
+ echo "To check for updates: ./agent/scripts/acp.version-check-for-updates.sh"
47
+ echo "To update ACP: ./agent/scripts/acp.version-update.sh"
@@ -0,0 +1,158 @@
1
+ #!/bin/bash
2
+
3
+ # Agent Context Protocol (ACP) Update Script
4
+ # This script updates AGENT.md, template files, and utility scripts from the repository
5
+
6
+ set -e
7
+
8
+ # Colors for output using tput (more reliable than ANSI codes)
9
+ if command -v tput >/dev/null 2>&1 && [ -t 1 ]; then
10
+ RED=$(tput setaf 1)
11
+ GREEN=$(tput setaf 2)
12
+ YELLOW=$(tput setaf 3)
13
+ BLUE=$(tput setaf 4)
14
+ BOLD=$(tput bold)
15
+ NC=$(tput sgr0)
16
+ else
17
+ RED=''
18
+ GREEN=''
19
+ YELLOW=''
20
+ BLUE=''
21
+ BOLD=''
22
+ NC=''
23
+ fi
24
+
25
+ # Repository details
26
+ REPO_URL="https://github.com/prmichaelsen/agent-context-protocol.git"
27
+ BRANCH="mainline"
28
+
29
+ echo "${BLUE}Agent Context Protocol (ACP) Updater${NC}"
30
+ echo "======================================"
31
+ echo ""
32
+
33
+ # Check if AGENT.md exists
34
+ if [ ! -f "AGENT.md" ]; then
35
+ echo "${RED}Error: AGENT.md not found in current directory${NC}"
36
+ echo "This script should be run from your project root where AGENT.md is located."
37
+ exit 1
38
+ fi
39
+
40
+ # Create temporary directory
41
+ TEMP_DIR=$(mktemp -d)
42
+ trap "rm -rf $TEMP_DIR" EXIT
43
+
44
+ echo "Fetching latest ACP files..."
45
+ if ! git clone --depth 1 --branch "$BRANCH" "$REPO_URL" "$TEMP_DIR" &>/dev/null; then
46
+ echo "${RED}Error: Failed to fetch repository${NC}"
47
+ echo "Please check your internet connection and try again."
48
+ exit 1
49
+ fi
50
+
51
+ echo "${GREEN}✓${NC} Latest files fetched"
52
+ echo ""
53
+
54
+ # Ensure reports directory exists and is ignored
55
+ mkdir -p "agent/reports"
56
+ if [ ! -f "agent/.gitignore" ]; then
57
+ echo "Creating agent/.gitignore..."
58
+ cat > "agent/.gitignore" << 'EOF'
59
+ # Agent Context Protocol - Local Files
60
+ # These files are generated locally and should not be committed
61
+
62
+ # Reports directory - generated by @acp.report command
63
+ reports/
64
+ EOF
65
+ echo "${GREEN}✓${NC} Created agent/.gitignore"
66
+ fi
67
+
68
+ echo "Updating ACP files..."
69
+
70
+ # Update template files (only .template.md files from these directories)
71
+ find "$TEMP_DIR/agent/design" -maxdepth 1 -name "*.template.md" -exec cp {} "agent/design/" \;
72
+ find "$TEMP_DIR/agent/milestones" -maxdepth 1 -name "*.template.md" -exec cp {} "agent/milestones/" \;
73
+ find "$TEMP_DIR/agent/patterns" -maxdepth 1 -name "*.template.md" -exec cp {} "agent/patterns/" \;
74
+ find "$TEMP_DIR/agent/tasks" -maxdepth 1 -name "*.template.md" -exec cp {} "agent/tasks/" \;
75
+
76
+ # Update command template
77
+ mkdir -p "agent/commands"
78
+ cp "$TEMP_DIR/agent/commands/command.template.md" "agent/commands/"
79
+
80
+ # Update 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 {} "agent/commands/" \;
84
+ fi
85
+
86
+ # Update progress template
87
+ cp "$TEMP_DIR/agent/progress.template.yaml" "agent/"
88
+
89
+ # Update manifest template
90
+ if [ -f "$TEMP_DIR/agent/manifest.template.yaml" ]; then
91
+ cp "$TEMP_DIR/agent/manifest.template.yaml" "agent/"
92
+ fi
93
+
94
+ # Update package template
95
+ if [ -f "$TEMP_DIR/agent/package.template.yaml" ]; then
96
+ cp "$TEMP_DIR/agent/package.template.yaml" "agent/"
97
+ fi
98
+
99
+ # Update AGENT.md
100
+ cp "$TEMP_DIR/AGENT.md" "."
101
+
102
+ # Update all scripts (*.sh files)
103
+ # This ensures all current and future scripts are copied
104
+ if [ -d "$TEMP_DIR/agent/scripts" ]; then
105
+ find "$TEMP_DIR/agent/scripts" -maxdepth 1 -name "*.sh" -exec cp {} "agent/scripts/" \;
106
+ chmod +x agent/scripts/*.sh
107
+ fi
108
+
109
+ # Clean up deprecated scripts (from versions < 2.0.0)
110
+ . "agent/scripts/acp.common.sh"
111
+ init_colors
112
+ cleanup_deprecated_scripts
113
+
114
+ echo "${GREEN}✓${NC} All files updated"
115
+ echo ""
116
+
117
+ # Update acp-core version in manifest if it exists
118
+ if [ -f "agent/manifest.yaml" ]; then
119
+ echo "Updating manifest..."
120
+
121
+ # Get new ACP version
122
+ NEW_VERSION=$(grep "^\*\*Version\*\*:" "AGENT.md" | sed 's/.*: //' | head -1)
123
+ UPDATE_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
124
+
125
+ # Update acp-core version and timestamps
126
+ sed -i "/^ acp-core:/,/^ [a-z]/ {
127
+ s/package_version: .*/package_version: ${NEW_VERSION}/
128
+ s/updated_at: .*/updated_at: ${UPDATE_DATE}/
129
+ }" agent/manifest.yaml
130
+
131
+ # Update manifest timestamp
132
+ sed -i "s/^last_updated: .*/last_updated: ${UPDATE_DATE}/" agent/manifest.yaml
133
+
134
+ echo "${GREEN}✓${NC} Updated acp-core to v${NEW_VERSION} in manifest.yaml"
135
+ echo ""
136
+ fi
137
+
138
+ echo "${GREEN}Update complete!${NC}"
139
+ echo ""
140
+ echo "${BLUE}What was updated:${NC}"
141
+ echo " ✓ AGENT.md (methodology documentation)"
142
+ echo " ✓ Template files (design, milestone, task, pattern)"
143
+ echo " ✓ Command files (all ACP commands)"
144
+ echo " ✓ Utility scripts (update, check-for-updates, version, etc.)"
145
+ echo ""
146
+ echo "${BLUE}Next steps:${NC}"
147
+ echo "1. Review changes: git diff"
148
+ echo "2. See what changed: git status"
149
+ echo "3. Revert if needed: git checkout <file>"
150
+ echo ""
151
+ echo "For detailed changelog:"
152
+ echo " https://github.com/prmichaelsen/agent-context-protocol/blob/mainline/CHANGELOG.md"
153
+ echo ""
154
+ display_available_commands
155
+ echo ""
156
+ echo "${BLUE}For AI agents:${NC}"
157
+ echo "Type '${GREEN}@acp.init${NC}' to reload context with updated files."
158
+ echo ""