@pulsarinteractive/geniustasker 0.1.0-beta.13 → 0.1.0-beta.14
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/CHANGELOG.md +14 -0
- package/README.md +5 -1
- package/docs/CLI.md +31 -1
- package/docs/FEEDBACK.md +96 -0
- package/docs/INTEGRATIONS.md +4 -4
- package/docs/PLANNING.md +95 -0
- package/docs/TASK_LOCKS.md +91 -0
- package/examples/codex.toml +1 -1
- package/examples/mcp.json +1 -1
- package/mcp.json +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/remote/tool-catalog.json +595 -1
- package/remote/workflows.json +36 -2
- package/skills/geniustasker/SKILL.md +19 -0
- package/skills/geniustasker/references/agent-runs.md +13 -0
- package/skills/geniustasker/references/incremental-reads.md +9 -0
- package/skills/geniustasker/references/protocols.md +18 -3
- package/skills/geniustasker-feedback/SKILL.md +44 -0
- package/skills/geniustasker-feedback/agents/openai.yaml +4 -0
- package/skills/geniustasker-planning/SKILL.md +28 -0
- package/src/changes.mjs +5 -1
- package/src/cli.mjs +127 -7
- package/src/client.mjs +16 -0
- package/src/command-catalog.mjs +55 -1
- package/src/command-input-schemas.mjs +610 -0
- package/src/commands.mjs +237 -19
- package/src/feedback-contract.mjs +629 -0
- package/src/feedback-image.mjs +123 -0
- package/src/feedback-media-transfer.mjs +61 -0
- package/src/feedback.mjs +152 -0
- package/src/intents.mjs +111 -0
- package/src/mcp.mjs +126 -3
- package/src/protocols.mjs +1 -0
- package/src/resources.mjs +19 -3
- package/src/task-availability-contract.mjs +121 -0
- package/src/task-availability.mjs +25 -0
- package/src/transport.mjs +10 -3
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// Generated public task availability schema. Do not edit by hand.
|
|
2
|
+
export default {
|
|
3
|
+
"type": "object",
|
|
4
|
+
"required": [
|
|
5
|
+
"blockersTruncated",
|
|
6
|
+
"blockingIds",
|
|
7
|
+
"dependencyCount",
|
|
8
|
+
"incomplete",
|
|
9
|
+
"manualReason",
|
|
10
|
+
"progress",
|
|
11
|
+
"source",
|
|
12
|
+
"status"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"blockersTruncated": {
|
|
16
|
+
"type": "boolean"
|
|
17
|
+
},
|
|
18
|
+
"blockingIds": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"maxItems": 20,
|
|
21
|
+
"items": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"dependencyCount": {
|
|
26
|
+
"type": "integer",
|
|
27
|
+
"minimum": 0,
|
|
28
|
+
"maximum": 1000
|
|
29
|
+
},
|
|
30
|
+
"incomplete": {
|
|
31
|
+
"type": "boolean"
|
|
32
|
+
},
|
|
33
|
+
"manualReason": {
|
|
34
|
+
"anyOf": [
|
|
35
|
+
{
|
|
36
|
+
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "null"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"progress": {
|
|
44
|
+
"oneOf": [
|
|
45
|
+
{
|
|
46
|
+
"type": "string",
|
|
47
|
+
"enum": [
|
|
48
|
+
"New"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "string",
|
|
53
|
+
"enum": [
|
|
54
|
+
"InProgress"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "string",
|
|
59
|
+
"enum": [
|
|
60
|
+
"Done"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"source": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"required": [
|
|
68
|
+
"authorizationEpoch",
|
|
69
|
+
"epoch",
|
|
70
|
+
"head"
|
|
71
|
+
],
|
|
72
|
+
"properties": {
|
|
73
|
+
"authorizationEpoch": {
|
|
74
|
+
"type": "string"
|
|
75
|
+
},
|
|
76
|
+
"epoch": {
|
|
77
|
+
"type": "string"
|
|
78
|
+
},
|
|
79
|
+
"head": {
|
|
80
|
+
"type": "string"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"additionalProperties": false
|
|
84
|
+
},
|
|
85
|
+
"status": {
|
|
86
|
+
"oneOf": [
|
|
87
|
+
{
|
|
88
|
+
"type": "string",
|
|
89
|
+
"enum": [
|
|
90
|
+
"New"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"type": "string",
|
|
95
|
+
"enum": [
|
|
96
|
+
"InProgress"
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"type": "string",
|
|
101
|
+
"enum": [
|
|
102
|
+
"Done"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"type": "string",
|
|
107
|
+
"enum": [
|
|
108
|
+
"Locked"
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"type": "string",
|
|
113
|
+
"enum": [
|
|
114
|
+
"Unknown"
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"additionalProperties": false
|
|
121
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import contract from './task-availability-contract.mjs';
|
|
3
|
+
|
|
4
|
+
export const taskAvailabilitySchema = z.fromJSONSchema(contract);
|
|
5
|
+
|
|
6
|
+
/** Validate only the optional projection. Its head belongs to the current task
|
|
7
|
+
* module, not necessarily the page's historical checkpoint or the row revision.
|
|
8
|
+
* Legacy absence is retained; it must never become an invented unlocked state. */
|
|
9
|
+
export function validTaskAvailabilityPage(page, collection, taskState) {
|
|
10
|
+
if (!Array.isArray(page?.items)) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
return page.items.every((item) => {
|
|
14
|
+
if (!item || !Object.hasOwn(item, 'taskAvailability')) {
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
return (
|
|
18
|
+
collection === 'tasks' &&
|
|
19
|
+
taskState === 'v1' &&
|
|
20
|
+
item.kind !== 'remove' &&
|
|
21
|
+
taskAvailabilitySchema.safeParse(item.taskAvailability).success &&
|
|
22
|
+
item.taskAvailability.source.epoch === page.epoch
|
|
23
|
+
);
|
|
24
|
+
});
|
|
25
|
+
}
|
package/src/transport.mjs
CHANGED
|
@@ -80,10 +80,17 @@ export class Transport {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
+
const feedbackMedia =
|
|
84
|
+
/^\/api\/agents\/v1\/feedback\/media\/[a-f0-9]{8}-(?:[a-f0-9]{4}-){3}[a-f0-9]{12}\/content$/.test(
|
|
85
|
+
url.pathname,
|
|
86
|
+
);
|
|
83
87
|
if (
|
|
84
88
|
(bytes !== undefined || binary) &&
|
|
85
|
-
(url.pathname !== '/api/agents/v1/media/content' ||
|
|
86
|
-
(
|
|
89
|
+
((!feedbackMedia && url.pathname !== '/api/agents/v1/media/content') ||
|
|
90
|
+
(feedbackMedia &&
|
|
91
|
+
(url.search || (bytes !== undefined ? method !== 'PUT' : method !== 'GET'))) ||
|
|
92
|
+
(bytes !== undefined &&
|
|
93
|
+
(!Buffer.isBuffer(bytes) || bytes.length > (feedbackMedia ? 4_000_000 : 15_000_000))) ||
|
|
87
94
|
(bytes !== undefined && (json !== undefined || form)))
|
|
88
95
|
) {
|
|
89
96
|
fail('invalid_arguments', 'Binary transfer requires the bounded delegated media endpoint.');
|
|
@@ -144,7 +151,7 @@ export class Transport {
|
|
|
144
151
|
if (response.body) {
|
|
145
152
|
for await (const chunk of response.body) {
|
|
146
153
|
size += chunk.length;
|
|
147
|
-
if (size > (binary && response.ok ?
|
|
154
|
+
if (size > (binary && response.ok ? (feedbackMedia ? 1_000_000 : 15_000_000) : 262144)) {
|
|
148
155
|
fail('invalid_response', 'The API response exceeded the size limit.');
|
|
149
156
|
}
|
|
150
157
|
chunks.push(chunk);
|