pi-note 0.20.0 → 0.20.1
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/dist-mcp/mcp/server.js +3 -3
- package/mcp/README.md +15 -3
- package/mcp/server.ts +3 -3
- package/package.json +1 -1
package/dist-mcp/mcp/server.js
CHANGED
|
@@ -26,7 +26,7 @@ const Action = z.object({ method: z.literal('native-ui/action'), params: z.objec
|
|
|
26
26
|
uri: z.literal(URI), revision: z.string().min(1).max(256), action: z.string().min(1).max(256),
|
|
27
27
|
value: z.union([z.string().max(20_000), z.number().finite(), z.boolean(), z.null()]).optional(), _meta: z.record(z.unknown()).optional(),
|
|
28
28
|
}) });
|
|
29
|
-
const server = new Server({ name: 'pinote', version: '0.20.
|
|
29
|
+
const server = new Server({ name: 'pinote', version: '0.20.1' }, { capabilities: { tools: {}, resources: {}, experimental: { 'native-ui-v1': {} } } });
|
|
30
30
|
// Serialize complete read/check/write cycles even when a host sends parallel calls.
|
|
31
31
|
let queue = Promise.resolve();
|
|
32
32
|
function serial(run) {
|
|
@@ -331,8 +331,8 @@ server.setRequestHandler(Action, (request, extra) => serial(async () => {
|
|
|
331
331
|
}));
|
|
332
332
|
const empty = { type: 'object', properties: {}, additionalProperties: false };
|
|
333
333
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [
|
|
334
|
-
{ name: 'propose', description: '
|
|
335
|
-
{ name: 'get_current', description: 'Read the task selected through the native Pinote UI for this conversation. Returns null if unselected.', inputSchema: empty, annotations: { readOnlyHint: true } },
|
|
334
|
+
{ name: 'propose', description: 'Before multi-step implementation or configuration migrations, suggest a task if get_current returns null; skip informational questions and trivial edits. Show a short action-oriented title, optional details after a blank line, and reuse a saved tag from tags. The user clicks + to create/start/select or dismiss. Replaces an unaccepted suggestion; continue working without waiting or asking again. Never creates a task before a user action.', inputSchema: { type: 'object', properties: { text: { type: 'string', minLength: 1, maxLength: 4000 }, tag: { type: 'string', minLength: 1, maxLength: 64 } }, required: ['text'], additionalProperties: false } },
|
|
335
|
+
{ name: 'get_current', description: 'Read the task selected through the native Pinote UI for this conversation before multi-step implementation or configuration migrations. Returns null if unselected; then use tags and propose to suggest a task without creating one. Skip informational questions and trivial edits; never replace an existing selection.', inputSchema: empty, annotations: { readOnlyHint: true } },
|
|
336
336
|
{ name: 'fields', description: 'Read global footer field definitions before setting task handoff values. Does not edit settings.', inputSchema: empty, annotations: { readOnlyHint: true } },
|
|
337
337
|
{ name: 'tags', description: 'List saved Pinote tags.', inputSchema: empty, annotations: { readOnlyHint: true } },
|
|
338
338
|
{ name: 'update_current', description: 'Merge Markdown handoff fields on the selected task. Read get_current first. Keep handoff notes concise; PR is one GitHub PR URL.', inputSchema: { type: 'object', properties: { expected_updated_at: { type: 'string' }, set: { type: 'object', additionalProperties: { type: 'string' } }, remove: { type: 'array', items: { type: 'string' } } }, required: ['expected_updated_at'], additionalProperties: false } },
|
package/mcp/README.md
CHANGED
|
@@ -77,13 +77,25 @@ have saved the session for resume persistence. Existing extension selections are
|
|
|
77
77
|
not imported. Changing the gateway config path or service name starts a separate
|
|
78
78
|
selection namespace.
|
|
79
79
|
|
|
80
|
+
## Task-offer guidance
|
|
81
|
+
|
|
82
|
+
Before multi-step implementation or configuration migrations, agents should call
|
|
83
|
+
`get_current`. If it returns null, use `tags` and `propose` to suggest a short task
|
|
84
|
+
with a saved tag, then continue without waiting. Skip informational questions and
|
|
85
|
+
trivial edits. Never replace an existing selection or create/select without consent.
|
|
86
|
+
|
|
87
|
+
The tool descriptions reinforce this workflow after discovery. For proactive
|
|
88
|
+
discovery, include the same guidance in the client's always-loaded agent rules;
|
|
89
|
+
tool descriptions alone cannot make an agent discover the service.
|
|
90
|
+
|
|
80
91
|
## Initial-version limits
|
|
81
92
|
|
|
82
93
|
This is a working alternative, **not full parity with the old extension**. It does
|
|
83
94
|
not retag/edit existing tasks or install/upgrade the CLI. Completion intentionally
|
|
84
|
-
does not reset conversations.
|
|
85
|
-
|
|
86
|
-
|
|
95
|
+
does not reset conversations. The legacy `taskOfferPolicy` and new-session prompt
|
|
96
|
+
remain editable for native-extension compatibility; the MCP host does not apply
|
|
97
|
+
them automatically. Agent-side task offers follow the client rules and tool
|
|
98
|
+
descriptions above. Continue requests a separately confirmed draft;
|
|
87
99
|
it never overwrites existing editor text or submits a prompt. Previews are display-only transcript entries (never model context), showing plain
|
|
88
100
|
text/Markdown source limited to 20,000 characters; the task list shows at most 200
|
|
89
101
|
filtered matches (fewer if the serialized display budget is reached). Use the CLI for full text and unsupported task operations.
|
package/mcp/server.ts
CHANGED
|
@@ -31,7 +31,7 @@ const Action = z.object({ method: z.literal('native-ui/action'), params: z.objec
|
|
|
31
31
|
uri: z.literal(URI), revision: z.string().min(1).max(256), action: z.string().min(1).max(256),
|
|
32
32
|
value: z.union([z.string().max(20_000), z.number().finite(), z.boolean(), z.null()]).optional(), _meta: z.record(z.unknown()).optional(),
|
|
33
33
|
}) });
|
|
34
|
-
const server = new Server({ name: 'pinote', version: '0.20.
|
|
34
|
+
const server = new Server({ name: 'pinote', version: '0.20.1' }, { capabilities: { tools: {}, resources: {}, experimental: { 'native-ui-v1': {} } } });
|
|
35
35
|
// Serialize complete read/check/write cycles even when a host sends parallel calls.
|
|
36
36
|
let queue = Promise.resolve();
|
|
37
37
|
function serial<T>(run: () => Promise<T>): Promise<T> {
|
|
@@ -256,8 +256,8 @@ server.setRequestHandler(Action, (request, extra) => serial(async () => {
|
|
|
256
256
|
}));
|
|
257
257
|
const empty = { type: 'object' as const, properties: {}, additionalProperties: false };
|
|
258
258
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [
|
|
259
|
-
{ name: 'propose', description: '
|
|
260
|
-
{ name: 'get_current', description: 'Read the task selected through the native Pinote UI for this conversation. Returns null if unselected.', inputSchema: empty, annotations: { readOnlyHint: true } },
|
|
259
|
+
{ name: 'propose', description: 'Before multi-step implementation or configuration migrations, suggest a task if get_current returns null; skip informational questions and trivial edits. Show a short action-oriented title, optional details after a blank line, and reuse a saved tag from tags. The user clicks + to create/start/select or dismiss. Replaces an unaccepted suggestion; continue working without waiting or asking again. Never creates a task before a user action.', inputSchema: { type: 'object' as const, properties: { text: { type: 'string', minLength: 1, maxLength: 4000 }, tag: { type: 'string', minLength: 1, maxLength: 64 } }, required: ['text'], additionalProperties: false } },
|
|
260
|
+
{ name: 'get_current', description: 'Read the task selected through the native Pinote UI for this conversation before multi-step implementation or configuration migrations. Returns null if unselected; then use tags and propose to suggest a task without creating one. Skip informational questions and trivial edits; never replace an existing selection.', inputSchema: empty, annotations: { readOnlyHint: true } },
|
|
261
261
|
{ name: 'fields', description: 'Read global footer field definitions before setting task handoff values. Does not edit settings.', inputSchema: empty, annotations: { readOnlyHint: true } },
|
|
262
262
|
{ name: 'tags', description: 'List saved Pinote tags.', inputSchema: empty, annotations: { readOnlyHint: true } },
|
|
263
263
|
{ name: 'update_current', description: 'Merge Markdown handoff fields on the selected task. Read get_current first. Keep handoff notes concise; PR is one GitHub PR URL.', inputSchema: { type: 'object' as const, properties: { expected_updated_at: { type: 'string' }, set: { type: 'object', additionalProperties: { type: 'string' } }, remove: { type: 'array', items: { type: 'string' } } }, required: ['expected_updated_at'], additionalProperties: false } },
|