crewx-pi-kit 0.1.1 → 0.1.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.
- package/README.md +1 -1
- package/extensions/crewx-tools.ts +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -105,7 +105,7 @@ export default function crewxTools(pi: ExtensionAPI) {
|
|
|
105
105
|
label: "Update CrewX memory",
|
|
106
106
|
description: "Update a CrewX memory originally recorded by this agent.",
|
|
107
107
|
parameters: Type.Object({
|
|
108
|
-
id: Type.Integer({minimum: 1}),
|
|
108
|
+
id: Type.Union([Type.String({minLength: 1, maxLength: 128}), Type.Integer({minimum: 1})]),
|
|
109
109
|
title: Type.Optional(Type.String({maxLength: 255})),
|
|
110
110
|
content: Type.Optional(Type.String({maxLength: 100_000})),
|
|
111
111
|
category: Type.Optional(Type.String({maxLength: 50})),
|
|
@@ -114,7 +114,7 @@ export default function crewxTools(pi: ExtensionAPI) {
|
|
|
114
114
|
channel_id: Type.Optional(Type.Union([Type.Integer({minimum: 1}), Type.Null()])),
|
|
115
115
|
}),
|
|
116
116
|
async execute(_id, {id, ...body}, signal) {
|
|
117
|
-
return result(await crewxRequest(`/memories/${id}`, {method: "PATCH", body, signal}));
|
|
117
|
+
return result(await crewxRequest(`/memories/${encodeURIComponent(String(id))}`, {method: "PATCH", body, signal}));
|
|
118
118
|
},
|
|
119
119
|
});
|
|
120
120
|
|
|
@@ -155,7 +155,7 @@ export default function crewxTools(pi: ExtensionAPI) {
|
|
|
155
155
|
label: "Update CrewX task",
|
|
156
156
|
description: "Update a task assigned to this agent.",
|
|
157
157
|
parameters: Type.Object({
|
|
158
|
-
id: Type.Integer({minimum: 1}),
|
|
158
|
+
id: Type.Union([Type.String({minLength: 1, maxLength: 128}), Type.Integer({minimum: 1})]),
|
|
159
159
|
status: Type.Optional(Type.Union([
|
|
160
160
|
Type.Literal("backlog"), Type.Literal("todo"), Type.Literal("in_progress"),
|
|
161
161
|
Type.Literal("review"), Type.Literal("done"), Type.Literal("cancelled"),
|
|
@@ -164,7 +164,7 @@ export default function crewxTools(pi: ExtensionAPI) {
|
|
|
164
164
|
description: Type.Optional(Type.String({maxLength: 100_000})),
|
|
165
165
|
}),
|
|
166
166
|
async execute(_id, {id, ...body}, signal) {
|
|
167
|
-
return result(await crewxRequest(`/tasks/${id}`, {method: "PATCH", body, signal}));
|
|
167
|
+
return result(await crewxRequest(`/tasks/${encodeURIComponent(String(id))}`, {method: "PATCH", body, signal}));
|
|
168
168
|
},
|
|
169
169
|
});
|
|
170
170
|
|
|
@@ -197,14 +197,14 @@ export default function crewxTools(pi: ExtensionAPI) {
|
|
|
197
197
|
label: "Update CrewX document",
|
|
198
198
|
description: "Safely update an unprotected CrewX document using its current version.",
|
|
199
199
|
parameters: Type.Object({
|
|
200
|
-
id: Type.Integer({minimum: 1}),
|
|
200
|
+
id: Type.Union([Type.String({minLength: 1, maxLength: 128}), Type.Integer({minimum: 1})]),
|
|
201
201
|
expected_version: Type.Integer({minimum: 1}),
|
|
202
202
|
title: Type.Optional(Type.String({maxLength: 255})),
|
|
203
203
|
content: Type.Optional(Type.String({maxLength: 250_000})),
|
|
204
204
|
summary: Type.Optional(Type.String({maxLength: 255})),
|
|
205
205
|
}),
|
|
206
206
|
async execute(_id, {id, ...body}, signal) {
|
|
207
|
-
return result(await crewxRequest(`/documents/${id}`, {method: "PATCH", body, signal}));
|
|
207
|
+
return result(await crewxRequest(`/documents/${encodeURIComponent(String(id))}`, {method: "PATCH", body, signal}));
|
|
208
208
|
},
|
|
209
209
|
});
|
|
210
210
|
|