@karedo-hq/agents 0.1.3 → 0.1.4
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.
|
@@ -1,66 +1,51 @@
|
|
|
1
1
|
# Publish to Agents
|
|
2
2
|
|
|
3
|
-
Publishes the `@karedo/agents` package after adding new rules or commands.
|
|
3
|
+
Publishes the `@karedo-hq/agents` package after adding new rules or commands.
|
|
4
4
|
|
|
5
5
|
## Instructions
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**Important:** The `packages/agents` folder is located in a separate repository from the main app repos. Navigate to that repo before running these steps.
|
|
8
8
|
|
|
9
|
-
### 1.
|
|
10
|
-
|
|
11
|
-
Check what files have been added or modified in `packages/agents/`:
|
|
9
|
+
### 1. Navigate to the agents package
|
|
12
10
|
|
|
13
11
|
```bash
|
|
14
|
-
|
|
12
|
+
cd /path/to/karedo/packages/agents
|
|
15
13
|
```
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
### 2. Verify Changes
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
```bash
|
|
18
|
+
git status
|
|
19
|
+
```
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Confirm the changes include new rules (`.mdc` files in `rules/`) or commands (`.md` files in `commands/`).
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
"version": "X.X.X"
|
|
25
|
-
```
|
|
23
|
+
### 3. Bump Version
|
|
26
24
|
|
|
27
|
-
Use semantic versioning:
|
|
25
|
+
Update the version in `package.json`. Use semantic versioning:
|
|
28
26
|
|
|
29
|
-
- **Patch (
|
|
30
|
-
- **Minor (
|
|
27
|
+
- **Patch (0.1.4)**: Minor rule updates, typo fixes
|
|
28
|
+
- **Minor (0.2.0)**: New rules or commands
|
|
31
29
|
- **Major (1.0.0)**: Breaking changes to rule structure
|
|
32
30
|
|
|
33
|
-
###
|
|
31
|
+
### 4. Commit and Push
|
|
34
32
|
|
|
35
33
|
```bash
|
|
36
|
-
git add
|
|
37
|
-
|
|
38
|
-
- Brief description of changes" && git push
|
|
34
|
+
git add . && git commit -m "chore: bump to vX.X.X - brief description" && git push
|
|
39
35
|
```
|
|
40
36
|
|
|
41
|
-
###
|
|
42
|
-
|
|
43
|
-
From the `packages/agents` directory:
|
|
37
|
+
### 5. Publish to npm
|
|
44
38
|
|
|
45
39
|
```bash
|
|
46
40
|
pnpm publish --access public
|
|
47
41
|
```
|
|
48
42
|
|
|
49
|
-
**Note**: You must be logged in to npm with publish access to `@karedo` scope.
|
|
43
|
+
**Note**: You must be logged in to npm with publish access to `@karedo-hq` scope.
|
|
50
44
|
|
|
51
|
-
###
|
|
45
|
+
### 6. Verify Publication
|
|
52
46
|
|
|
53
47
|
```bash
|
|
54
|
-
npm view @karedo/agents version
|
|
48
|
+
npm view @karedo-hq/agents version
|
|
55
49
|
```
|
|
56
50
|
|
|
57
51
|
Confirm the version matches what you just published.
|
|
58
|
-
|
|
59
|
-
## Example Output
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
✅ Changes verified in packages/agents/
|
|
63
|
-
✅ Version bumped to X.X.X
|
|
64
|
-
✅ Committed and pushed to remote
|
|
65
|
-
✅ Published @karedo/agents@X.X.X to npm
|
|
66
|
-
```
|
package/package.json
CHANGED
|
@@ -28,9 +28,24 @@ alwaysApply: false
|
|
|
28
28
|
|
|
29
29
|
### Error Handling
|
|
30
30
|
|
|
31
|
-
- API
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
Use `parseApiResponse` from `@/lib/utils/parse-api-response` to safely parse API responses. This handles HTML error pages from proxies/load balancers gracefully (prevents cryptic "Unexpected token '<'" errors in production).
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
const { data, errorMessage } = await parseApiResponse<ResponseType>(
|
|
35
|
+
response,
|
|
36
|
+
'Fallback error message',
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
if (errorMessage) {
|
|
40
|
+
return {
|
|
41
|
+
isSuccess: false,
|
|
42
|
+
isError: true,
|
|
43
|
+
errorMessage,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Catch block:** Use `getErrorMessage(error)` from `@/lib/utils/get-error-message`. Never use `getErrorMessage()` on strings (causes double-quoting).
|
|
34
49
|
|
|
35
50
|
### Fetch Headers
|
|
36
51
|
|