@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,207 @@
1
+ # Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
2
+ #
3
+ # This file is part of a Moko Consulting project.
4
+ #
5
+ # SPDX-License-Identifier: GPL-3.0-or-later
6
+ #
7
+ # FILE INFORMATION
8
+ # DEFGROUP: GitHub.Workflow
9
+ # INGROUP: MokoStandards.Automation
10
+ # REPO: https://github.com/mokoconsulting-tech/MokoStandards
11
+ # PATH: /templates/workflows/shared/auto-dev-issue.yml.template
12
+ # VERSION: 04.06.00
13
+ # BRIEF: Auto-create tracking issue with sub-issues for dev/rc branch workflow
14
+ # NOTE: Synced via bulk-repo-sync to .mokogit/workflows/auto-dev-issue.yml in all governed repos.
15
+
16
+ name: "Universal: Dev/RC Branch Issue"
17
+
18
+ on:
19
+ # Auto-create on RC branch creation
20
+ create:
21
+ # Manual trigger for dev branches
22
+ workflow_dispatch:
23
+ inputs:
24
+ branch:
25
+ description: 'Branch name (e.g., dev/my-feature or dev/04.06)'
26
+ required: true
27
+ type: string
28
+
29
+ env:
30
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
31
+
32
+ permissions:
33
+ contents: read
34
+ issues: write
35
+
36
+ jobs:
37
+ create-issue:
38
+ name: Create version tracking issue
39
+ runs-on: ubuntu-latest
40
+ if: >-
41
+ (github.event_name == 'workflow_dispatch') ||
42
+ (github.event.ref_type == 'branch' &&
43
+ (startsWith(github.event.ref, 'rc/') ||
44
+ startsWith(github.event.ref, 'alpha/') ||
45
+ startsWith(github.event.ref, 'beta/')))
46
+
47
+ steps:
48
+ - name: Create tracking issue and sub-issues
49
+ env:
50
+ GH_TOKEN: ${{ secrets.GH_TOKEN || github.token }}
51
+ run: |
52
+ # For manual dispatch, use input; for auto, use event ref
53
+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
54
+ BRANCH="${{ inputs.branch }}"
55
+ else
56
+ BRANCH="${{ github.event.ref }}"
57
+ fi
58
+ REPO="${{ github.repository }}"
59
+ ACTOR="${{ github.actor }}"
60
+ NOW=$(date -u '+%Y-%m-%d %H:%M UTC')
61
+
62
+ # Determine branch type and version
63
+ if [[ "$BRANCH" == rc/* ]]; then
64
+ VERSION="${BRANCH#rc/}"
65
+ BRANCH_TYPE="Release Candidate"
66
+ LABEL_TYPE="type: release"
67
+ TITLE_PREFIX="rc"
68
+ elif [[ "$BRANCH" == beta/* ]]; then
69
+ VERSION="${BRANCH#beta/}"
70
+ BRANCH_TYPE="Beta"
71
+ LABEL_TYPE="type: release"
72
+ TITLE_PREFIX="beta"
73
+ elif [[ "$BRANCH" == alpha/* ]]; then
74
+ VERSION="${BRANCH#alpha/}"
75
+ BRANCH_TYPE="Alpha"
76
+ LABEL_TYPE="type: release"
77
+ TITLE_PREFIX="alpha"
78
+ else
79
+ VERSION="${BRANCH#dev/}"
80
+ BRANCH_TYPE="Development"
81
+ LABEL_TYPE="type: feature"
82
+ TITLE_PREFIX="feat"
83
+ fi
84
+
85
+ TITLE="${TITLE_PREFIX}(${VERSION}): ${BRANCH_TYPE} tracking for ${BRANCH}"
86
+
87
+ # Check for existing issue with same title prefix
88
+ EXISTING=$(gh api "repos/${REPO}/issues?state=open&per_page=10" \
89
+ --jq ".[] | select(.title | startswith(\"${TITLE_PREFIX}(${VERSION})\")) | .number" 2>/dev/null | head -1)
90
+
91
+ if [ -n "$EXISTING" ]; then
92
+ echo "ℹ️ Issue #${EXISTING} already exists for ${VERSION}" >> $GITHUB_STEP_SUMMARY
93
+ exit 0
94
+ fi
95
+
96
+ # ── Define sub-issues for the workflow ─────────────────────────
97
+ if [[ "$BRANCH" == rc/* ]]; then
98
+ SUB_ISSUES=(
99
+ "RC Testing|Verify all features work on rc branch|type: test,release-candidate"
100
+ "Regression Testing|Run full regression suite before merge|type: test,release-candidate"
101
+ "Version Bump|Bump version in README.md and all headers|type: version,release-candidate"
102
+ "Changelog Update|Update CHANGELOG.md with release notes|documentation,release-candidate"
103
+ "Merge to Version Branch|Create PR to version/XX|type: release,needs-review"
104
+ )
105
+ elif [[ "$BRANCH" == alpha/* ]] || [[ "$BRANCH" == beta/* ]]; then
106
+ SUB_ISSUES=(
107
+ "Testing|Verify features on ${BRANCH_TYPE} branch|type: test,status: in-progress"
108
+ "Bug Fixes|Fix issues found during ${BRANCH_TYPE} testing|type: bug,status: pending"
109
+ "Promote to Next Stage|Create PR to promote to next release stage|type: release,needs-review"
110
+ )
111
+ else
112
+ SUB_ISSUES=(
113
+ "Development|Implement feature/fix on dev branch|type: feature,status: in-progress"
114
+ "Unit Testing|Write and pass unit tests|type: test,status: pending"
115
+ "Code Review|Request and complete code review|needs-review,status: pending"
116
+ "Version Bump|Bump version in README.md and all headers|type: version,status: pending"
117
+ "Changelog Update|Update CHANGELOG.md with release notes|documentation,status: pending"
118
+ "Create RC Branch|Promote dev to rc branch for final testing|type: release,status: pending"
119
+ "Merge to Main|Create PR from rc/dev to main|type: release,needs-review,status: pending"
120
+ )
121
+ fi
122
+
123
+ # ── Create sub-issues first ───────────────────────────────────────
124
+ SUB_LIST=""
125
+ SUB_NUMBERS=""
126
+ for SUB in "${SUB_ISSUES[@]}"; do
127
+ IFS='|' read -r SUB_TITLE SUB_DESC SUB_LABELS <<< "$SUB"
128
+ SUB_FULL_TITLE="${TITLE_PREFIX}(${VERSION}): ${SUB_TITLE}"
129
+
130
+ SUB_BODY=$(printf '### %s\n\n%s\n\n| Field | Value |\n|-------|-------|\n| **Parent Branch** | `%s` |\n| **Version** | `%s` |\n\n---\n*Sub-issue of the %s tracking issue for `%s`.*' \
131
+ "$SUB_TITLE" "$SUB_DESC" "$BRANCH" "$VERSION" "$BRANCH_TYPE" "$BRANCH")
132
+
133
+ SUB_URL=$(gh issue create \
134
+ --repo "$REPO" \
135
+ --title "$SUB_FULL_TITLE" \
136
+ --body "$SUB_BODY" \
137
+ --label "${SUB_LABELS}" \
138
+ --assignee "jmiller" 2>&1)
139
+
140
+ SUB_NUM=$(echo "$SUB_URL" | grep -oE '[0-9]+$')
141
+ if [ -n "$SUB_NUM" ]; then
142
+ SUB_LIST="${SUB_LIST}\n- [ ] ${SUB_TITLE} (#${SUB_NUM})"
143
+ SUB_NUMBERS="${SUB_NUMBERS} #${SUB_NUM}"
144
+ fi
145
+ sleep 0.3
146
+ done
147
+
148
+ # ── Create parent tracking issue ──────────────────────────────────
149
+ PARENT_BODY=$(printf '## %s Branch Created\n\n| Field | Value |\n|-------|-------|\n| **Branch** | `%s` |\n| **Version** | `%s` |\n| **Type** | %s |\n| **Created by** | @%s |\n| **Created at** | %s |\n| **Repository** | `%s` |\n\n## Workflow Sub-Issues\n\n%b\n\n---\n*Auto-created by [auto-dev-issue.yml](.github/workflows/auto-dev-issue.yml) on branch creation.*' \
150
+ "$BRANCH_TYPE" "$BRANCH" "$VERSION" "$BRANCH_TYPE" "$ACTOR" "$NOW" "$REPO" "$SUB_LIST")
151
+
152
+ PARENT_URL=$(gh issue create \
153
+ --repo "$REPO" \
154
+ --title "$TITLE" \
155
+ --body "$PARENT_BODY" \
156
+ --label "${LABEL_TYPE},version" \
157
+ --assignee "jmiller" 2>&1)
158
+
159
+ PARENT_NUM=$(echo "$PARENT_URL" | grep -oE '[0-9]+$')
160
+
161
+ # ── Link sub-issues back to parent ────────────────────────────────
162
+ if [ -n "$PARENT_NUM" ]; then
163
+ for SUB in "${SUB_ISSUES[@]}"; do
164
+ IFS='|' read -r SUB_TITLE _ _ <<< "$SUB"
165
+ SUB_FULL_TITLE="${TITLE_PREFIX}(${VERSION}): ${SUB_TITLE}"
166
+ SUB_NUM=$(gh api "repos/${REPO}/issues?state=open&per_page=20" \
167
+ --jq ".[] | select(.title == \"${SUB_FULL_TITLE}\") | .number" 2>/dev/null | head -1)
168
+ if [ -n "$SUB_NUM" ]; then
169
+ gh api "repos/${REPO}/issues/${SUB_NUM}" -X PATCH \
170
+ -f body="$(gh api "repos/${REPO}/issues/${SUB_NUM}" --jq '.body' 2>/dev/null)
171
+
172
+ > **Parent Issue:** #${PARENT_NUM}" --silent 2>/dev/null || true
173
+ fi
174
+ sleep 0.2
175
+ done
176
+ fi
177
+
178
+ # ── Create or update prerelease for alpha/beta/rc ────────────────
179
+ if [[ "$BRANCH" == rc/* ]] || [[ "$BRANCH" == alpha/* ]] || [[ "$BRANCH" == beta/* ]]; then
180
+ case "$BRANCH_TYPE" in
181
+ Alpha) RELEASE_TAG="alpha" ;;
182
+ Beta) RELEASE_TAG="beta" ;;
183
+ "Release Candidate") RELEASE_TAG="release-candidate" ;;
184
+ esac
185
+
186
+ EXISTING=$(gh release view "$RELEASE_TAG" --json tagName -q .tagName 2>/dev/null || true)
187
+ if [ -z "$EXISTING" ]; then
188
+ gh release create "$RELEASE_TAG" \
189
+ --title "${RELEASE_TAG} (${VERSION})" \
190
+ --notes "## ${BRANCH_TYPE} ${VERSION}\n\nBranch: \`${BRANCH}\`\nTracking issue: ${PARENT_URL}" \
191
+ --prerelease \
192
+ --target main 2>/dev/null || true
193
+ echo "${BRANCH_TYPE} release created: ${RELEASE_TAG}" >> $GITHUB_STEP_SUMMARY
194
+ else
195
+ gh release edit "$RELEASE_TAG" \
196
+ --title "${RELEASE_TAG} (${VERSION})" --prerelease 2>/dev/null || true
197
+ echo "${BRANCH_TYPE} release updated: ${RELEASE_TAG}" >> $GITHUB_STEP_SUMMARY
198
+ fi
199
+ fi
200
+
201
+ # ── Summary ───────────────────────────────────────────────────────
202
+ echo "## Dev Workflow Issues Created" >> $GITHUB_STEP_SUMMARY
203
+ echo "" >> $GITHUB_STEP_SUMMARY
204
+ echo "| Item | Issue |" >> $GITHUB_STEP_SUMMARY
205
+ echo "|------|-------|" >> $GITHUB_STEP_SUMMARY
206
+ echo "| **Parent** | ${PARENT_URL} |" >> $GITHUB_STEP_SUMMARY
207
+ echo "| **Sub-issues** |${SUB_NUMBERS} |" >> $GITHUB_STEP_SUMMARY