@memnexus-ai/cli 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.
- package/.env.example +13 -0
- package/.eslintrc.js +24 -0
- package/.github/ISSUE_TEMPLATE/phase-1-foundation.md +1078 -0
- package/.github/workflows/publish.yml +277 -0
- package/.github/workflows/test-app-token.yml +54 -0
- package/.npmrc.backup +3 -0
- package/.npmrc.example +6 -0
- package/.prettierignore +4 -0
- package/.prettierrc +8 -0
- package/CHANGELOG.md +138 -0
- package/PLATFORM_TESTING.md +243 -0
- package/README.md +986 -0
- package/RELEASE.md +428 -0
- package/RELEASE_READINESS.md +253 -0
- package/USAGE.md +1373 -0
- package/bin/mx.js +2 -0
- package/dist/commands/apikeys.d.ts +7 -0
- package/dist/commands/apikeys.d.ts.map +1 -0
- package/dist/commands/apikeys.js +133 -0
- package/dist/commands/apikeys.js.map +1 -0
- package/dist/commands/artifacts.d.ts +7 -0
- package/dist/commands/artifacts.d.ts.map +1 -0
- package/dist/commands/artifacts.js +277 -0
- package/dist/commands/artifacts.js.map +1 -0
- package/dist/commands/auth.d.ts +7 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/auth.js +119 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/communities.d.ts +7 -0
- package/dist/commands/communities.d.ts.map +1 -0
- package/dist/commands/communities.js +137 -0
- package/dist/commands/communities.js.map +1 -0
- package/dist/commands/config.d.ts +7 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +138 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/conversations.d.ts +7 -0
- package/dist/commands/conversations.d.ts.map +1 -0
- package/dist/commands/conversations.js +160 -0
- package/dist/commands/conversations.js.map +1 -0
- package/dist/commands/facts.d.ts +7 -0
- package/dist/commands/facts.d.ts.map +1 -0
- package/dist/commands/facts.js +298 -0
- package/dist/commands/facts.js.map +1 -0
- package/dist/commands/graphrag.d.ts +7 -0
- package/dist/commands/graphrag.d.ts.map +1 -0
- package/dist/commands/graphrag.js +139 -0
- package/dist/commands/graphrag.js.map +1 -0
- package/dist/commands/memories.d.ts +7 -0
- package/dist/commands/memories.d.ts.map +1 -0
- package/dist/commands/memories.js +304 -0
- package/dist/commands/memories.js.map +1 -0
- package/dist/commands/patterns.d.ts +7 -0
- package/dist/commands/patterns.d.ts.map +1 -0
- package/dist/commands/patterns.js +227 -0
- package/dist/commands/patterns.js.map +1 -0
- package/dist/commands/system.d.ts +7 -0
- package/dist/commands/system.d.ts.map +1 -0
- package/dist/commands/system.js +97 -0
- package/dist/commands/system.js.map +1 -0
- package/dist/commands/topics.d.ts +7 -0
- package/dist/commands/topics.d.ts.map +1 -0
- package/dist/commands/topics.js +314 -0
- package/dist/commands/topics.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/api-client.d.ts +29 -0
- package/dist/lib/api-client.d.ts.map +1 -0
- package/dist/lib/api-client.js +64 -0
- package/dist/lib/api-client.js.map +1 -0
- package/dist/lib/auth.d.ts +10 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +47 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/config.d.ts +19 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +59 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/errors.d.ts +7 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +133 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/formatters.d.ts +12 -0
- package/dist/lib/formatters.d.ts.map +1 -0
- package/dist/lib/formatters.js +103 -0
- package/dist/lib/formatters.js.map +1 -0
- package/dist/lib/spinner.d.ts +54 -0
- package/dist/lib/spinner.d.ts.map +1 -0
- package/dist/lib/spinner.js +108 -0
- package/dist/lib/spinner.js.map +1 -0
- package/dist/lib/validators.d.ts +92 -0
- package/dist/lib/validators.d.ts.map +1 -0
- package/dist/lib/validators.js +257 -0
- package/dist/lib/validators.js.map +1 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/docs/README.md +219 -0
- package/docs/code-generation-strategy.md +560 -0
- package/docs/prd.md +748 -0
- package/docs/sync-strategy.md +533 -0
- package/jest.config.js +30 -0
- package/package.json +67 -0
- package/scripts/install-deps.sh +38 -0
- package/src/commands/apikeys.ts +144 -0
- package/src/commands/artifacts.ts +296 -0
- package/src/commands/auth.ts +122 -0
- package/src/commands/communities.ts +153 -0
- package/src/commands/config.ts +144 -0
- package/src/commands/conversations.ts +176 -0
- package/src/commands/facts.ts +320 -0
- package/src/commands/graphrag.ts +149 -0
- package/src/commands/memories.ts +332 -0
- package/src/commands/patterns.ts +251 -0
- package/src/commands/system.ts +102 -0
- package/src/commands/topics.ts +354 -0
- package/src/index.ts +43 -0
- package/src/lib/api-client.ts +68 -0
- package/src/lib/auth.ts +42 -0
- package/src/lib/config.ts +68 -0
- package/src/lib/errors.ts +143 -0
- package/src/lib/formatters.ts +123 -0
- package/src/lib/spinner.ts +113 -0
- package/src/lib/validators.ts +302 -0
- package/src/types/index.ts +17 -0
- package/tests/__mocks__/chalk.ts +16 -0
- package/tests/__mocks__/cli-table3.ts +37 -0
- package/tests/__mocks__/configstore.ts +38 -0
- package/tests/commands/apikeys.test.ts +179 -0
- package/tests/commands/artifacts.test.ts +194 -0
- package/tests/commands/auth.test.ts +120 -0
- package/tests/commands/communities.test.ts +154 -0
- package/tests/commands/config.test.ts +154 -0
- package/tests/commands/conversations.test.ts +136 -0
- package/tests/commands/facts.test.ts +210 -0
- package/tests/commands/graphrag.test.ts +194 -0
- package/tests/commands/memories.test.ts +215 -0
- package/tests/commands/patterns.test.ts +201 -0
- package/tests/commands/system.test.ts +172 -0
- package/tests/commands/topics.test.ts +274 -0
- package/tests/lib/auth.test.ts +77 -0
- package/tests/lib/config.test.ts +50 -0
- package/tests/lib/errors.test.ts +126 -0
- package/tests/lib/formatters.test.ts +87 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
name: Publish CLI Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- 'src/**'
|
|
9
|
+
- 'package.json'
|
|
10
|
+
- 'package-lock.json'
|
|
11
|
+
- 'tsconfig.json'
|
|
12
|
+
- '.github/workflows/publish.yml'
|
|
13
|
+
pull_request:
|
|
14
|
+
branches:
|
|
15
|
+
- main
|
|
16
|
+
paths:
|
|
17
|
+
- 'src/**'
|
|
18
|
+
- 'package.json'
|
|
19
|
+
- 'package-lock.json'
|
|
20
|
+
- 'tsconfig.json'
|
|
21
|
+
workflow_dispatch:
|
|
22
|
+
inputs:
|
|
23
|
+
release_type:
|
|
24
|
+
description: 'Release type (patch/minor/major)'
|
|
25
|
+
required: true
|
|
26
|
+
type: choice
|
|
27
|
+
options:
|
|
28
|
+
- patch
|
|
29
|
+
- minor
|
|
30
|
+
- major
|
|
31
|
+
publish_github:
|
|
32
|
+
description: 'Publish to GitHub Packages'
|
|
33
|
+
required: true
|
|
34
|
+
type: boolean
|
|
35
|
+
default: true
|
|
36
|
+
publish_npm:
|
|
37
|
+
description: 'Publish to npm registry'
|
|
38
|
+
required: true
|
|
39
|
+
type: boolean
|
|
40
|
+
default: true
|
|
41
|
+
|
|
42
|
+
env:
|
|
43
|
+
NODE_VERSION: '20.x'
|
|
44
|
+
|
|
45
|
+
jobs:
|
|
46
|
+
validate:
|
|
47
|
+
name: Validate Package
|
|
48
|
+
runs-on: ubuntu-latest
|
|
49
|
+
steps:
|
|
50
|
+
- name: Checkout code
|
|
51
|
+
uses: actions/checkout@v4
|
|
52
|
+
|
|
53
|
+
- name: Setup Node.js
|
|
54
|
+
uses: actions/setup-node@v4
|
|
55
|
+
with:
|
|
56
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
57
|
+
registry-url: 'https://npm.pkg.github.com'
|
|
58
|
+
scope: '@memnexus-ai'
|
|
59
|
+
|
|
60
|
+
- name: Install dependencies
|
|
61
|
+
run: |
|
|
62
|
+
set -e
|
|
63
|
+
npm install || {
|
|
64
|
+
echo "npm install failed, dumping npm debug logs..."
|
|
65
|
+
find ~/.npm/_logs -maxdepth 1 -type f -name '*-debug-0.log' -print -exec cat {} \;
|
|
66
|
+
exit 1
|
|
67
|
+
}
|
|
68
|
+
env:
|
|
69
|
+
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_READ_TOKEN }}
|
|
70
|
+
|
|
71
|
+
- name: Lint code
|
|
72
|
+
run: npm run lint
|
|
73
|
+
|
|
74
|
+
- name: Build package
|
|
75
|
+
run: npm run build
|
|
76
|
+
|
|
77
|
+
- name: Run tests
|
|
78
|
+
run: npm test
|
|
79
|
+
|
|
80
|
+
- name: Check package contents
|
|
81
|
+
run: npm pack --dry-run
|
|
82
|
+
|
|
83
|
+
publish:
|
|
84
|
+
name: Publish to GitHub Packages
|
|
85
|
+
runs-on: ubuntu-latest
|
|
86
|
+
needs: [validate]
|
|
87
|
+
permissions:
|
|
88
|
+
contents: write
|
|
89
|
+
packages: write
|
|
90
|
+
if: |
|
|
91
|
+
(github.ref == 'refs/heads/main' && github.event_name == 'push') ||
|
|
92
|
+
(github.event_name == 'workflow_dispatch' && github.event.inputs.publish_github == 'true')
|
|
93
|
+
environment:
|
|
94
|
+
name: github-packages
|
|
95
|
+
url: https://github.com/memnexus-ai/memnexus/pkgs/npm/cli
|
|
96
|
+
steps:
|
|
97
|
+
- name: Checkout code
|
|
98
|
+
uses: actions/checkout@v4
|
|
99
|
+
with:
|
|
100
|
+
fetch-depth: 0
|
|
101
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
102
|
+
|
|
103
|
+
- name: Setup Node.js
|
|
104
|
+
uses: actions/setup-node@v4
|
|
105
|
+
with:
|
|
106
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
107
|
+
registry-url: 'https://npm.pkg.github.com'
|
|
108
|
+
scope: '@memnexus-ai'
|
|
109
|
+
|
|
110
|
+
- name: Configure git
|
|
111
|
+
run: |
|
|
112
|
+
git config user.name "GitHub Actions"
|
|
113
|
+
git config user.email "actions@github.com"
|
|
114
|
+
|
|
115
|
+
- name: Install dependencies
|
|
116
|
+
run: npm install
|
|
117
|
+
env:
|
|
118
|
+
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_READ_TOKEN }}
|
|
119
|
+
|
|
120
|
+
- name: Build package
|
|
121
|
+
run: npm run build
|
|
122
|
+
|
|
123
|
+
- name: Bump version
|
|
124
|
+
if: github.event_name == 'workflow_dispatch'
|
|
125
|
+
run: npm version ${{ github.event.inputs.release_type }} --no-git-tag-version
|
|
126
|
+
|
|
127
|
+
- name: Get package version
|
|
128
|
+
id: package-version
|
|
129
|
+
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
|
130
|
+
|
|
131
|
+
- name: Check if version exists on GitHub Packages
|
|
132
|
+
id: check-version
|
|
133
|
+
run: |
|
|
134
|
+
npm config set @memnexus-ai:registry https://npm.pkg.github.com
|
|
135
|
+
if npm view @memnexus-ai/cli@${{ steps.package-version.outputs.version }} version 2>/dev/null; then
|
|
136
|
+
echo "exists=true" >> $GITHUB_OUTPUT
|
|
137
|
+
else
|
|
138
|
+
echo "exists=false" >> $GITHUB_OUTPUT
|
|
139
|
+
fi
|
|
140
|
+
env:
|
|
141
|
+
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_READ_TOKEN }}
|
|
142
|
+
|
|
143
|
+
- name: Publish to GitHub Packages
|
|
144
|
+
if: steps.check-version.outputs.exists == 'false'
|
|
145
|
+
run: npm publish --registry=https://npm.pkg.github.com
|
|
146
|
+
env:
|
|
147
|
+
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_READ_TOKEN }}
|
|
148
|
+
|
|
149
|
+
- name: Create git tag
|
|
150
|
+
if: steps.check-version.outputs.exists == 'false'
|
|
151
|
+
run: |
|
|
152
|
+
git add package.json
|
|
153
|
+
git commit -m "chore(cli): release v${{ steps.package-version.outputs.version }}"
|
|
154
|
+
git tag -a "cli-v${{ steps.package-version.outputs.version }}" -m "Release @memnexus-ai/cli v${{ steps.package-version.outputs.version }}"
|
|
155
|
+
git push origin main
|
|
156
|
+
git push origin "cli-v${{ steps.package-version.outputs.version }}"
|
|
157
|
+
|
|
158
|
+
- name: Create GitHub Release
|
|
159
|
+
if: steps.check-version.outputs.exists == 'false'
|
|
160
|
+
uses: softprops/action-gh-release@v1
|
|
161
|
+
env:
|
|
162
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
163
|
+
with:
|
|
164
|
+
tag_name: cli-v${{ steps.package-version.outputs.version }}
|
|
165
|
+
name: '@memnexus-ai/cli v${{ steps.package-version.outputs.version }}'
|
|
166
|
+
body: |
|
|
167
|
+
## @memnexus-ai/cli v${{ steps.package-version.outputs.version }}
|
|
168
|
+
|
|
169
|
+
Published to GitHub Packages: https://github.com/memnexus-ai/memnexus/pkgs/npm/cli
|
|
170
|
+
|
|
171
|
+
### Installation
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
# Configure npm to use GitHub Packages for @memnexus-ai scope
|
|
175
|
+
npm config set @memnexus-ai:registry https://npm.pkg.github.com
|
|
176
|
+
|
|
177
|
+
# Authenticate with GitHub (requires personal access token with read:packages scope)
|
|
178
|
+
npm login --scope=@memnexus-ai --registry=https://npm.pkg.github.com
|
|
179
|
+
|
|
180
|
+
# Install globally
|
|
181
|
+
npm install -g @memnexus-ai/cli@${{ steps.package-version.outputs.version }}
|
|
182
|
+
|
|
183
|
+
# Verify installation
|
|
184
|
+
mx --version
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Quick Start
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# Configure authentication
|
|
191
|
+
mx auth login --interactive
|
|
192
|
+
|
|
193
|
+
# Verify connection
|
|
194
|
+
mx auth status
|
|
195
|
+
|
|
196
|
+
# Create your first memory
|
|
197
|
+
mx memories create --interactive
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Changes
|
|
201
|
+
See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for details.
|
|
202
|
+
|
|
203
|
+
### Documentation
|
|
204
|
+
- [README](https://github.com/${{ github.repository }}/blob/main/README.md)
|
|
205
|
+
- [Usage Guide](https://github.com/${{ github.repository }}/blob/main/USAGE.md)
|
|
206
|
+
draft: false
|
|
207
|
+
prerelease: false
|
|
208
|
+
|
|
209
|
+
- name: Version already published
|
|
210
|
+
if: steps.check-version.outputs.exists == 'true'
|
|
211
|
+
run: |
|
|
212
|
+
echo "::warning::Version ${{ steps.package-version.outputs.version }} already exists on GitHub Packages. Skipping publish."
|
|
213
|
+
|
|
214
|
+
publish-npm:
|
|
215
|
+
name: Publish to npm Registry
|
|
216
|
+
runs-on: ubuntu-latest
|
|
217
|
+
needs: [validate]
|
|
218
|
+
if: |
|
|
219
|
+
(github.ref == 'refs/heads/main' && github.event_name == 'push') ||
|
|
220
|
+
(github.event_name == 'workflow_dispatch' && github.event.inputs.publish_npm == 'true')
|
|
221
|
+
environment:
|
|
222
|
+
name: npm-registry
|
|
223
|
+
url: https://www.npmjs.com/package/@memnexus-ai/cli
|
|
224
|
+
steps:
|
|
225
|
+
- name: Checkout code
|
|
226
|
+
uses: actions/checkout@v4
|
|
227
|
+
with:
|
|
228
|
+
fetch-depth: 0
|
|
229
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
230
|
+
|
|
231
|
+
- name: Setup Node.js for npm
|
|
232
|
+
uses: actions/setup-node@v4
|
|
233
|
+
with:
|
|
234
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
235
|
+
registry-url: 'https://registry.npmjs.org'
|
|
236
|
+
scope: '@memnexus-ai'
|
|
237
|
+
|
|
238
|
+
- name: Configure git
|
|
239
|
+
run: |
|
|
240
|
+
git config user.name "GitHub Actions"
|
|
241
|
+
git config user.email "actions@github.com"
|
|
242
|
+
|
|
243
|
+
- name: Install dependencies
|
|
244
|
+
run: npm install
|
|
245
|
+
env:
|
|
246
|
+
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_READ_TOKEN }}
|
|
247
|
+
|
|
248
|
+
- name: Build package
|
|
249
|
+
run: npm run build
|
|
250
|
+
|
|
251
|
+
- name: Bump version
|
|
252
|
+
if: github.event_name == 'workflow_dispatch'
|
|
253
|
+
run: npm version ${{ github.event.inputs.release_type }} --no-git-tag-version
|
|
254
|
+
|
|
255
|
+
- name: Get package version
|
|
256
|
+
id: package-version
|
|
257
|
+
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
|
258
|
+
|
|
259
|
+
- name: Check if version exists on npm
|
|
260
|
+
id: check-version
|
|
261
|
+
run: |
|
|
262
|
+
if npm view @memnexus-ai/cli@${{ steps.package-version.outputs.version }} version 2>/dev/null; then
|
|
263
|
+
echo "exists=true" >> $GITHUB_OUTPUT
|
|
264
|
+
else
|
|
265
|
+
echo "exists=false" >> $GITHUB_OUTPUT
|
|
266
|
+
fi
|
|
267
|
+
|
|
268
|
+
- name: Publish to npm
|
|
269
|
+
if: steps.check-version.outputs.exists == 'false'
|
|
270
|
+
run: npm publish --access public
|
|
271
|
+
env:
|
|
272
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
273
|
+
|
|
274
|
+
- name: Version already published
|
|
275
|
+
if: steps.check-version.outputs.exists == 'true'
|
|
276
|
+
run: |
|
|
277
|
+
echo "::warning::Version ${{ steps.package-version.outputs.version }} already exists on npm. Skipping publish."
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Test GitHub App Token
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
test-token:
|
|
8
|
+
name: Test GitHub App Token
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- name: Generate GitHub App Token
|
|
12
|
+
id: app-token
|
|
13
|
+
uses: actions/create-github-app-token@v2
|
|
14
|
+
with:
|
|
15
|
+
app-id: ${{ secrets.MX_BOTT_APP_ID }}
|
|
16
|
+
private-key: ${{ secrets.MX_BOTT_PRIVATE_KEY }}
|
|
17
|
+
owner: ${{ github.repository_owner }}
|
|
18
|
+
repositories: mx-cli,mx-api-gateway
|
|
19
|
+
|
|
20
|
+
- name: Test token - Get user info
|
|
21
|
+
run: |
|
|
22
|
+
echo "Testing GitHub App token..."
|
|
23
|
+
curl -H "Authorization: Bearer ${{ steps.app-token.outputs.token }}" \
|
|
24
|
+
-H "Accept: application/vnd.github+json" \
|
|
25
|
+
https://api.github.com/user | jq .
|
|
26
|
+
|
|
27
|
+
- name: Test token - List packages
|
|
28
|
+
run: |
|
|
29
|
+
echo "Attempting to list organization packages..."
|
|
30
|
+
curl -H "Authorization: Bearer ${{ steps.app-token.outputs.token }}" \
|
|
31
|
+
-H "Accept: application/vnd.github+json" \
|
|
32
|
+
https://api.github.com/orgs/memnexus-ai/packages?package_type=npm | jq .
|
|
33
|
+
|
|
34
|
+
- name: Test token - Get specific package
|
|
35
|
+
run: |
|
|
36
|
+
echo "Attempting to get mx-typescript-sdk package..."
|
|
37
|
+
curl -H "Authorization: Bearer ${{ steps.app-token.outputs.token }}" \
|
|
38
|
+
-H "Accept: application/vnd.github+json" \
|
|
39
|
+
https://api.github.com/orgs/memnexus-ai/packages/npm/mx-typescript-sdk | jq .
|
|
40
|
+
|
|
41
|
+
- name: Test token - Check app installation
|
|
42
|
+
run: |
|
|
43
|
+
echo "Checking app installation permissions..."
|
|
44
|
+
curl -H "Authorization: Bearer ${{ steps.app-token.outputs.token }}" \
|
|
45
|
+
-H "Accept: application/vnd.github+json" \
|
|
46
|
+
https://api.github.com/installation/repositories | jq .
|
|
47
|
+
|
|
48
|
+
- name: Test npm authentication
|
|
49
|
+
run: |
|
|
50
|
+
echo "Testing npm authentication with the token..."
|
|
51
|
+
echo "@memnexus-ai:registry=https://npm.pkg.github.com" > .npmrc
|
|
52
|
+
echo "//npm.pkg.github.com/:_authToken=${{ steps.app-token.outputs.token }}" >> .npmrc
|
|
53
|
+
npm view @memnexus-ai/mx-typescript-sdk --registry=https://npm.pkg.github.com || echo "Failed to view package"
|
|
54
|
+
|
package/.npmrc.backup
ADDED
package/.npmrc.example
ADDED
package/.prettierignore
ADDED
package/.prettierrc
ADDED
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the mx-cli project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Comprehensive README with GitHub Packages installation instructions
|
|
12
|
+
- Quick Start guide with 5-minute setup
|
|
13
|
+
- Common workflows documentation (daily memory capture, knowledge graph building, batch operations)
|
|
14
|
+
- Complete USAGE.md with detailed command reference for all 12 command categories
|
|
15
|
+
- Interactive mode for artifacts create command
|
|
16
|
+
- Comprehensive input validation library (`src/lib/validators.ts`)
|
|
17
|
+
- Progress spinners for all memory operations
|
|
18
|
+
- Conditional spinner helper that respects output format
|
|
19
|
+
- Enhanced error messages with actionable troubleshooting steps
|
|
20
|
+
- Platform testing documentation (PLATFORM_TESTING.md)
|
|
21
|
+
- Release process documentation (RELEASE.md)
|
|
22
|
+
- GitHub Actions publishing workflow with automated testing and release creation
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
- Updated features list to reflect 128 tests and new capabilities
|
|
26
|
+
- Enhanced error handling with "💡 To fix this" sections for all HTTP error codes
|
|
27
|
+
- Improved interactive mode documentation with password masking details
|
|
28
|
+
- Updated prerequisites to Node.js 18+
|
|
29
|
+
- Spinners automatically disabled for JSON output format (prevents interference with piping)
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
- Password masking now works correctly in auth login interactive mode
|
|
33
|
+
- Validation errors now show helpful messages with examples
|
|
34
|
+
|
|
35
|
+
## [0.1.0] - 2024-11-14
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
- Initial release of mx-cli
|
|
39
|
+
- Authentication commands (login, logout, status)
|
|
40
|
+
- Configuration commands (get, set, list)
|
|
41
|
+
- Memory management (CRUD operations, search)
|
|
42
|
+
- Conversation tracking (list, get, timeline, search, by-topic)
|
|
43
|
+
- Fact management (CRUD operations, search)
|
|
44
|
+
- Topic commands (list, get, merge, discover-related, similarity, find-similar, cluster, detect-communities)
|
|
45
|
+
- Community commands (list, get, merge)
|
|
46
|
+
- Pattern commands (compile, feedback, set-state)
|
|
47
|
+
- GraphRAG commands (query, explain, query-communities)
|
|
48
|
+
- Artifact commands (CRUD operations)
|
|
49
|
+
- API key commands (list, create, delete)
|
|
50
|
+
- System commands (health, status, feature-flags)
|
|
51
|
+
- Multiple output formats (JSON, table, YAML)
|
|
52
|
+
- Interactive mode for memory and fact creation
|
|
53
|
+
- Confirmation prompts for destructive operations
|
|
54
|
+
- Pagination support for list operations
|
|
55
|
+
- Environment variable configuration
|
|
56
|
+
- Config file storage (~/.mx-cli/config.json)
|
|
57
|
+
- Comprehensive test suite (128 tests, >80% coverage)
|
|
58
|
+
- TypeScript SDK integration (@memnexus-ai/mx-typescript-sdk)
|
|
59
|
+
- CLI framework with Commander.js
|
|
60
|
+
- Colored terminal output with chalk
|
|
61
|
+
- Table formatting with cli-table3
|
|
62
|
+
- Progress indicators with ora
|
|
63
|
+
- Interactive prompts with inquirer
|
|
64
|
+
|
|
65
|
+
### Security
|
|
66
|
+
- API key storage in config file with restricted permissions
|
|
67
|
+
- Password masking for sensitive inputs
|
|
68
|
+
- No API keys logged or displayed in output
|
|
69
|
+
|
|
70
|
+
## Version History
|
|
71
|
+
|
|
72
|
+
### Version Numbering
|
|
73
|
+
|
|
74
|
+
This project follows [Semantic Versioning](https://semver.org/):
|
|
75
|
+
|
|
76
|
+
- **MAJOR** version (X.0.0): Incompatible API changes
|
|
77
|
+
- **MINOR** version (0.X.0): New functionality in a backward-compatible manner
|
|
78
|
+
- **PATCH** version (0.0.X): Backward-compatible bug fixes
|
|
79
|
+
|
|
80
|
+
### Release Types
|
|
81
|
+
|
|
82
|
+
- **Major Release (1.0.0, 2.0.0, etc.)**
|
|
83
|
+
- Breaking changes to command syntax or behavior
|
|
84
|
+
- Removal of deprecated features
|
|
85
|
+
- Major architectural changes
|
|
86
|
+
- Requires user action to upgrade
|
|
87
|
+
|
|
88
|
+
- **Minor Release (0.1.0, 0.2.0, etc.)**
|
|
89
|
+
- New commands or features
|
|
90
|
+
- New options for existing commands
|
|
91
|
+
- Performance improvements
|
|
92
|
+
- Non-breaking enhancements
|
|
93
|
+
- Backward-compatible changes
|
|
94
|
+
|
|
95
|
+
- **Patch Release (0.1.1, 0.1.2, etc.)**
|
|
96
|
+
- Bug fixes
|
|
97
|
+
- Documentation updates
|
|
98
|
+
- Security patches
|
|
99
|
+
- Minor improvements
|
|
100
|
+
- No new features
|
|
101
|
+
|
|
102
|
+
### Deprecation Policy
|
|
103
|
+
|
|
104
|
+
When features are deprecated:
|
|
105
|
+
1. Marked as deprecated in documentation
|
|
106
|
+
2. Warning message shown when used
|
|
107
|
+
3. Maintained for at least one minor version
|
|
108
|
+
4. Removed in next major version
|
|
109
|
+
|
|
110
|
+
Example:
|
|
111
|
+
- v0.5.0: Feature X deprecated (warning shown)
|
|
112
|
+
- v0.6.0: Feature X still works (warning shown)
|
|
113
|
+
- v1.0.0: Feature X removed
|
|
114
|
+
|
|
115
|
+
## Migration Guides
|
|
116
|
+
|
|
117
|
+
### Upgrading to v1.0.0 (Future)
|
|
118
|
+
|
|
119
|
+
When v1.0.0 is released, this section will contain:
|
|
120
|
+
- Breaking changes from v0.x
|
|
121
|
+
- Migration steps
|
|
122
|
+
- Command syntax changes
|
|
123
|
+
- Configuration changes
|
|
124
|
+
|
|
125
|
+
## Links
|
|
126
|
+
|
|
127
|
+
- [GitHub Repository](https://github.com/memnexus-ai/memnexus/tree/main/mx-cli)
|
|
128
|
+
- [GitHub Packages](https://github.com/memnexus-ai/memnexus/pkgs/npm/cli)
|
|
129
|
+
- [Issue Tracker](https://github.com/memnexus-ai/memnexus/issues)
|
|
130
|
+
- [README](README.md)
|
|
131
|
+
- [Usage Guide](USAGE.md)
|
|
132
|
+
- [Release Process](RELEASE.md)
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
[Unreleased]: https://github.com/memnexus-ai/memnexus/compare/cli-v0.1.0...HEAD
|
|
137
|
+
[0.1.0]: https://github.com/memnexus-ai/memnexus/releases/tag/cli-v0.1.0
|
|
138
|
+
|