@joe-broadhead/opencode-granola 0.0.3 → 0.0.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.
- package/CHANGELOG.md +7 -0
- package/assets/icon.svg +1 -0
- package/dist/index.js +18 -7
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
+
## [0.0.4] - 2026-11-04
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Jelly shows the plugin's one-line summary and icon. The package declares them in its `jelly` section and ships the
|
|
10
|
+
icon as `assets/icon.svg`.
|
|
11
|
+
|
|
5
12
|
## [0.0.3] - 2026-11-04
|
|
6
13
|
|
|
7
14
|
### Added
|
package/assets/icon.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="48" height="48"><rect width="48" height="48" rx="12" fill="#3E6B2F"/><path d="M24 25a2 2 0 0 1 4 0a4 4 0 0 1 -8 0a6 6 0 0 1 12 0a8 8 0 0 1 -16 0a10 10 0 0 1 20 0" fill="none" stroke="#D8F0A6" stroke-width="3" stroke-linecap="round"/></svg>
|
package/dist/index.js
CHANGED
|
@@ -505,6 +505,7 @@ var DESCRIBED = object(
|
|
|
505
505
|
description: STRING,
|
|
506
506
|
available: { type: "boolean" },
|
|
507
507
|
reason: STRING,
|
|
508
|
+
detail: STRING,
|
|
508
509
|
input: ANY_OBJECT,
|
|
509
510
|
output: ANY_OBJECT
|
|
510
511
|
},
|
|
@@ -638,12 +639,15 @@ async function registerToolsRpc(ctx, options) {
|
|
|
638
639
|
const rules = [...agent.data.permissions, ...info.permissions ?? []];
|
|
639
640
|
return { agent: info.agent, rules };
|
|
640
641
|
};
|
|
642
|
+
const notRegistered = (server) => mcp?.notRegistered?.(server);
|
|
641
643
|
const unavailable = async (server, tool, connected) => {
|
|
642
644
|
const status = (await ctx.mcp.list()).data.find((entry) => entry.name === server)?.status.status;
|
|
643
645
|
const code2 = connection(status) ?? connected;
|
|
644
646
|
if (code2 === "TOOL_UNAVAILABLE") return fail(code2, `OpenCode does not list ${tool} on the connected "${server}" server`);
|
|
645
647
|
if (status === "connected") return fail(code2, `the "${server}" server was reconnecting when ${tool} ran`);
|
|
646
|
-
|
|
648
|
+
const what = `the "${server}" server ${STATUS_TEXT[code2] ?? "is unavailable"}`;
|
|
649
|
+
const own = code2 === "NOT_REGISTERED" ? notRegistered(server) : void 0;
|
|
650
|
+
return own ? new ScriptError({ code: own.code, what, next: own.next }) : fail(code2, what);
|
|
647
651
|
};
|
|
648
652
|
const denied = (action, error, asked = action) => {
|
|
649
653
|
const reason = upstreamText(record2(error) && typeof error["message"] === "string" ? error["message"] : String(error));
|
|
@@ -675,11 +679,15 @@ async function registerToolsRpc(ctx, options) {
|
|
|
675
679
|
}
|
|
676
680
|
};
|
|
677
681
|
};
|
|
678
|
-
const ownedTarget = (spec, envelope2) =>
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
682
|
+
const ownedTarget = (spec, envelope2) => {
|
|
683
|
+
if (accounts) serverOf(envelope2.account);
|
|
684
|
+
const account = accounts && envelope2.account !== void 0 ? { account: envelope2.account } : {};
|
|
685
|
+
return {
|
|
686
|
+
action: spec.action,
|
|
687
|
+
mcp: false,
|
|
688
|
+
run: async (call) => await spec.run(envelope2.input, { ...call, ...account }) ?? null
|
|
689
|
+
};
|
|
690
|
+
};
|
|
683
691
|
const invoke = async (target, raw, context) => {
|
|
684
692
|
const envelope2 = raw;
|
|
685
693
|
let method;
|
|
@@ -732,7 +740,9 @@ async function registerToolsRpc(ctx, options) {
|
|
|
732
740
|
for (const name of KNOWN_READS) {
|
|
733
741
|
const id = `${server}_${name}`;
|
|
734
742
|
const tool = managed ? tools.find((entry) => entry.id === id) : void 0;
|
|
735
|
-
const
|
|
743
|
+
const code2 = !managed ? "SERVER_CONFLICT" : tool ? void 0 : connection(status) ?? "TOOL_UNAVAILABLE";
|
|
744
|
+
const reason = code2 === "NOT_REGISTERED" ? notRegistered(server)?.code ?? code2 : code2;
|
|
745
|
+
const detail = code2 === void 0 ? void 0 : mcp.unavailableDetail?.(name, code2);
|
|
736
746
|
const input = jsonSchema(tool?.input) ?? ANY_OBJECT;
|
|
737
747
|
const output = jsonSchema(tool?.output);
|
|
738
748
|
methods.push({
|
|
@@ -743,6 +753,7 @@ async function registerToolsRpc(ctx, options) {
|
|
|
743
753
|
description: tool?.description ?? "",
|
|
744
754
|
available: reason === void 0,
|
|
745
755
|
...reason ? { reason } : {},
|
|
756
|
+
...detail === void 0 ? {} : { detail },
|
|
746
757
|
input,
|
|
747
758
|
output: mcpOutput(output)
|
|
748
759
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@joe-broadhead/opencode-granola",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Unofficial OpenCode plugin for Granola meeting notes, through Granola's official MCP server",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"opencode",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"dist",
|
|
26
|
+
"assets/icon.svg",
|
|
26
27
|
"skills",
|
|
27
28
|
"README.md",
|
|
28
29
|
"LICENSE",
|
|
@@ -58,6 +59,8 @@
|
|
|
58
59
|
},
|
|
59
60
|
"jelly": {
|
|
60
61
|
"title": "Granola",
|
|
62
|
+
"summary": "Your Granola meetings and notes.",
|
|
63
|
+
"icon": "assets/icon.svg",
|
|
61
64
|
"tools": [
|
|
62
65
|
{
|
|
63
66
|
"name": "granola.get_account_info",
|