@mokoconsulting/mokoabs-mcp 0.0.0-stage → 4.0.2

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 (51) hide show
  1. package/.editorconfig +41 -0
  2. package/.gitattributes +94 -0
  3. package/.gitmessage +9 -0
  4. package/.mokogit/ISSUE_TEMPLATE/adr.md +110 -0
  5. package/.mokogit/ISSUE_TEMPLATE/bug_report.md +48 -0
  6. package/.mokogit/ISSUE_TEMPLATE/config.yml +18 -0
  7. package/.mokogit/ISSUE_TEMPLATE/documentation.md +52 -0
  8. package/.mokogit/ISSUE_TEMPLATE/feature_request.md +51 -0
  9. package/.mokogit/ISSUE_TEMPLATE/mcp_api_integration.md +48 -0
  10. package/.mokogit/ISSUE_TEMPLATE/mcp_connection_issue.md +69 -0
  11. package/.mokogit/ISSUE_TEMPLATE/mcp_tool_request.md +50 -0
  12. package/.mokogit/ISSUE_TEMPLATE/question.md +82 -0
  13. package/.mokogit/ISSUE_TEMPLATE/rfc.md +126 -0
  14. package/.mokogit/ISSUE_TEMPLATE/security.md +51 -0
  15. package/.mokogit/ISSUE_TEMPLATE/version.md +24 -0
  16. package/.mokogit/actions/resolve-source-dir/action.yml +72 -0
  17. package/.mokogit/workflows/apidocs.yml +132 -0
  18. package/.mokogit/workflows/auto-assign.yml +76 -0
  19. package/.mokogit/workflows/auto-dev-issue.yml +207 -0
  20. package/.mokogit/workflows/auto-release.yml +1787 -0
  21. package/.mokogit/workflows/branch-cleanup.yml +63 -0
  22. package/.mokogit/workflows/cascade.yml +645 -0
  23. package/.mokogit/workflows/ci-issue-reporter.yml +100 -0
  24. package/.mokogit/workflows/cleanup.yml +112 -0
  25. package/.mokogit/workflows/makefile-lint.yml +240 -0
  26. package/.mokogit/workflows/npm-build-test.yml +507 -0
  27. package/.mokogit/workflows/npm-sdk-check.yml +110 -0
  28. package/.mokogit/workflows/npm-tool-inventory.yml +81 -0
  29. package/.mokogit/workflows/pr-branch-check.yml +92 -0
  30. package/.mokogit/workflows/pre-release.yml +1134 -0
  31. package/.mokogit/workflows/rc-revert.yml +75 -0
  32. package/AGENTS.md +48 -0
  33. package/CHANGELOG.md +37 -0
  34. package/CODE_OF_CONDUCT.md +70 -0
  35. package/CONTRIBUTING.md +164 -0
  36. package/LICENSE +696 -0
  37. package/Makefile +94 -0
  38. package/README.md +109 -2
  39. package/SECURITY.md +245 -0
  40. package/build/README.md +7 -0
  41. package/dist/README.md +7 -0
  42. package/dist/index.js +153 -0
  43. package/package.json +34 -5
  44. package/sample/config.example.json +15 -0
  45. package/source/client.ts +132 -0
  46. package/source/config.ts +139 -0
  47. package/source/credentialStore.ts +216 -0
  48. package/source/index.ts +235 -0
  49. package/source/tokenReader.ts +120 -0
  50. package/source/types.ts +63 -0
  51. package/tsconfig.json +19 -0
@@ -0,0 +1,81 @@
1
+ # MCP Tool Inventory
2
+ # Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
3
+ # SPDX-License-Identifier: GPL-3.0-or-later
4
+ #
5
+ # Generates a tool inventory report on each push to main.
6
+ # Extracts tool names, descriptions, and parameter counts from src/index.ts.
7
+
8
+ name: "MCP: Tool Inventory"
9
+
10
+ on:
11
+ push:
12
+ branches: [main, stable]
13
+ paths: ['source/index.ts', 'src/index.ts']
14
+ workflow_dispatch:
15
+
16
+
17
+ permissions:
18
+ contents: read
19
+
20
+ env:
21
+ MOKOGIT_URL: ${{ vars.MOKOGIT_URL || 'https://git.mokoconsulting.tech' }}
22
+ GIT_ORG: ${{ vars.MOKOGIT_ORG || github.repository_owner }}
23
+ GIT_REPO: ${{ vars.MOKOGIT_REPO || github.event.repository.name }}
24
+
25
+ jobs:
26
+ inventory:
27
+ runs-on: ubuntu-latest
28
+
29
+ steps:
30
+ - uses: actions/checkout@v4
31
+
32
+ - name: Resolve source dir
33
+ id: srcdir
34
+ uses: ./.mokogit/actions/resolve-source-dir
35
+ with:
36
+ mokogit_token: ${{ secrets.MOKOGIT_TOKEN }}
37
+ strict: 'false'
38
+
39
+ - name: Generate tool inventory
40
+ run: |
41
+ INDEX_FILE="${{ steps.srcdir.outputs.source_dir }}index.ts"
42
+ if [ ! -f "${INDEX_FILE}" ]; then
43
+ echo "::warning::resolved entrypoint ${INDEX_FILE} missing; falling back to src/index.ts"
44
+ INDEX_FILE="src/index.ts"
45
+ fi
46
+ [ -r "${INDEX_FILE}" ] || { echo "::error::entry file ${INDEX_FILE} unreadable"; exit 1; }
47
+
48
+ echo "# MCP Tool Inventory" > TOOLS.md
49
+ echo "" >> TOOLS.md
50
+ echo "Auto-generated from \`${INDEX_FILE}\` on $(date -u +%Y-%m-%dT%H:%M:%SZ)" >> TOOLS.md
51
+ echo "" >> TOOLS.md
52
+
53
+ # Count tools
54
+ TOOL_COUNT=$(grep -cE "(server\.tool|registerTool)\(" "${INDEX_FILE}" || true)
55
+ echo "**Total tools: ${TOOL_COUNT}**" >> TOOLS.md
56
+ echo "" >> TOOLS.md
57
+
58
+ # Extract tool names
59
+ echo "| Tool | Description |" >> TOOLS.md
60
+ echo "|------|-------------|" >> TOOLS.md
61
+
62
+ grep -A1 -hE "(server\.tool|registerTool)\(" "${INDEX_FILE}" \
63
+ | grep -oE "['\"][A-Za-z0-9_.:-]+['\"]" \
64
+ | sed -E "s/^['\"]//; s/['\"]$//" \
65
+ | awk '!seen[$0]++' \
66
+ | while read -r TOOL_NAME; do
67
+ echo "| \`${TOOL_NAME}\` | |" >> TOOLS.md
68
+ done || true
69
+
70
+ echo "" >> TOOLS.md
71
+ echo "---" >> TOOLS.md
72
+ echo "*Generated by MCP Tool Inventory workflow*" >> TOOLS.md
73
+
74
+ cat TOOLS.md
75
+
76
+ - name: Upload inventory artifact
77
+ uses: actions/upload-artifact@v4
78
+ with:
79
+ name: tool-inventory
80
+ path: TOOLS.md
81
+ retention-days: 90
@@ -0,0 +1,92 @@
1
+ # Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
2
+ # SPDX-License-Identifier: GPL-3.0-or-later
3
+ #
4
+ # Enforces branch merge policy:
5
+ # feature/* → dev only
6
+ # fix/* → dev only
7
+ # hotfix/* → dev or main (emergency)
8
+ # dev → main only
9
+ # alpha/* → dev only
10
+ # beta/* → dev only
11
+ # rc/* → main only
12
+
13
+ name: Branch Policy Check
14
+
15
+ on:
16
+ pull_request:
17
+ types: [opened, synchronize, reopened, edited]
18
+
19
+ jobs:
20
+ check-target:
21
+ name: Verify merge target
22
+ runs-on: ubuntu-latest
23
+ steps:
24
+ - name: Check branch policy
25
+ env:
26
+ DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
27
+ run: |
28
+ HEAD="${{ github.head_ref }}"
29
+ BASE="${{ github.base_ref }}"
30
+
31
+ echo "PR: ${HEAD} → ${BASE}"
32
+
33
+ ALLOWED=true
34
+ REASON=""
35
+
36
+ case "$HEAD" in
37
+ feature/*|feat/*)
38
+ if [ "$BASE" != "dev" ]; then
39
+ ALLOWED=false
40
+ REASON="Feature branches must target 'dev', not '${BASE}'"
41
+ fi
42
+ ;;
43
+ fix/*|bugfix/*)
44
+ if [ "$BASE" != "dev" ]; then
45
+ ALLOWED=false
46
+ REASON="Fix branches must target 'dev', not '${BASE}'"
47
+ fi
48
+ ;;
49
+ hotfix/*)
50
+ if [ "$BASE" != "dev" ] && [ "$BASE" != "$DEFAULT_BRANCH" ]; then
51
+ ALLOWED=false
52
+ REASON="Hotfix branches can only target 'dev' or 'main', not '${BASE}'"
53
+ fi
54
+ ;;
55
+ alpha/*|beta/*)
56
+ if [ "$BASE" != "dev" ]; then
57
+ ALLOWED=false
58
+ REASON="Pre-release branches must target 'dev', not '${BASE}'"
59
+ fi
60
+ ;;
61
+ rc/*)
62
+ if [ "$BASE" != "$DEFAULT_BRANCH" ]; then
63
+ ALLOWED=false
64
+ REASON="Release candidate branches must target 'main', not '${BASE}'"
65
+ fi
66
+ ;;
67
+ dev)
68
+ if [ "$BASE" != "$DEFAULT_BRANCH" ]; then
69
+ ALLOWED=false
70
+ REASON="Dev branch can only merge into 'main', not '${BASE}'"
71
+ fi
72
+ ;;
73
+ esac
74
+
75
+ if [ "$ALLOWED" = false ]; then
76
+ echo "::error::${REASON}"
77
+ echo ""
78
+ echo "## Branch Policy Violation" >> $GITHUB_STEP_SUMMARY
79
+ echo "" >> $GITHUB_STEP_SUMMARY
80
+ echo "${REASON}" >> $GITHUB_STEP_SUMMARY
81
+ echo "" >> $GITHUB_STEP_SUMMARY
82
+ echo "### Allowed merge paths:" >> $GITHUB_STEP_SUMMARY
83
+ echo "- \`feature/*\` → \`dev\`" >> $GITHUB_STEP_SUMMARY
84
+ echo "- \`fix/*\` → \`dev\`" >> $GITHUB_STEP_SUMMARY
85
+ echo "- \`hotfix/*\` → \`dev\` or \`main\`" >> $GITHUB_STEP_SUMMARY
86
+ echo "- \`dev\` → \`main\`" >> $GITHUB_STEP_SUMMARY
87
+ echo "- \`rc/*\` → \`main\`" >> $GITHUB_STEP_SUMMARY
88
+ exit 1
89
+ fi
90
+
91
+ echo "Branch policy: OK (${HEAD} → ${BASE})"
92
+ echo "## Branch Policy: Passed" >> $GITHUB_STEP_SUMMARY