paperclip-plugin-supermemory-otomatik 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +52 -2
- package/dist/manifest.js +111 -0
- package/dist/manifest.js.map +7 -0
- package/dist/ui/index.js +70 -0
- package/dist/ui/index.js.map +7 -0
- package/dist/worker.js +44394 -0
- package/dist/worker.js.map +7 -0
- package/package.json +36 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Otomatik
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,53 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Supermemory for Paperclip (self-hosted)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Paperclip plugin for the self-hosted Supermemory deployment. It calls the OTOMATIK ACL gateway (`/mcp`) and never connects directly to the Supermemory master API or to the hosted `mcp.supermemory.ai` service.
|
|
4
|
+
|
|
5
|
+
## Agent access is opt-in per company
|
|
6
|
+
|
|
7
|
+
Paperclip installs a plugin instance-wide. The plugin configuration is company-scoped and starts with an empty `agentGrants` list. For every agent the Owner authorizes, add exactly one grant:
|
|
8
|
+
|
|
9
|
+
1. Copy the agent UUID from the company's **Supermemory access** page.
|
|
10
|
+
2. Create or select a Paperclip company secret containing that agent's individual ACL bearer token.
|
|
11
|
+
3. Add the agent UUID and select that token secret in the plugin configuration.
|
|
12
|
+
4. Save. The worker checks the caller's trusted Paperclip `agentId` and `companyId` against that grant on every tool call; a missing, duplicate, or cross-company grant fails closed.
|
|
13
|
+
|
|
14
|
+
Do not reuse one agent's token for another agent. The token must already be mapped in the gateway ACL to the same agent, company, and role. The secret value is resolved at call time and is never displayed, logged, or stored in plugin state.
|
|
15
|
+
|
|
16
|
+
### Self-hosted gateway URL
|
|
17
|
+
|
|
18
|
+
Default: `http://127.0.0.1:6768/mcp`. If the Paperclip plugin worker runs in a separate container, set the URL to the gateway's private Docker/Tailscale address. Public hosts and non-`/mcp` paths are rejected. Keep port `6768` private and do not expose it through a public reverse proxy.
|
|
19
|
+
|
|
20
|
+
## Tools
|
|
21
|
+
|
|
22
|
+
- `search-approved-memory`: searches only compartments allowed by the caller's individual gateway token.
|
|
23
|
+
- `submit-memory-candidate`: submits a bounded, non-sensitive candidate to the role's review staging compartment. The gateway does not promote it automatically.
|
|
24
|
+
|
|
25
|
+
The plugin does not read whole chat transcripts or save automatically. Agents must call its tools intentionally. The existing Supermemory harness hooks are a separate access path: if the Owner removes a grant here but leaves that agent's hook token and `PAPERCLIP_MEMORY_ENABLED=true`, the hooks can still access memory. To disable an agent completely, revoke its gateway token or remove the hook secret/enable flag as well.
|
|
26
|
+
|
|
27
|
+
## Scope and limits
|
|
28
|
+
|
|
29
|
+
The ACL gateway currently enforces company and role/team compartments. This plugin does not create or synchronize per-project or per-task namespaces. Paperclip's current plugin tool context does not include the current task ID or private-task grants, so the plugin cannot safely distinguish a private task from another run inside the same project. Do not save private-task material to company or team memory. Project/task memory requires a future Paperclip run-context and gateway ACL extension.
|
|
30
|
+
|
|
31
|
+
The plugin only checks current company/agent identity and the allowlist; authorization for memory sections remains enforced by the gateway token. Each Paperclip organization must have its own gateway token mappings and company-secret references.
|
|
32
|
+
|
|
33
|
+
## Install from Paperclip
|
|
34
|
+
|
|
35
|
+
This plugin is published as `paperclip-plugin-supermemory-otomatik`.
|
|
36
|
+
|
|
37
|
+
1. In Paperclip, open **Settings → Plugins**.
|
|
38
|
+
2. Choose **Install Plugin** and enter `paperclip-plugin-supermemory-otomatik`.
|
|
39
|
+
3. Review the requested capabilities and install. Installation is instance-wide.
|
|
40
|
+
4. Open the Supermemory plugin's configuration for each organization and configure its private gateway URL and explicit agent grants.
|
|
41
|
+
5. Open **Company Settings → Supermemory access** to confirm the agent UUIDs and allowlist status.
|
|
42
|
+
|
|
43
|
+
The instance must allow runtime npm installs and have access to npm. Cloud-managed Paperclip instances that disable npm installs cannot use this flow.
|
|
44
|
+
|
|
45
|
+
## Development
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
npm install
|
|
49
|
+
npm run typecheck
|
|
50
|
+
npm run build
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Paperclip host compatibility: `2026.1023.0` or later. This package uses `@paperclipai/plugin-sdk@2026.1023.0`.
|
package/dist/manifest.js
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// src/manifest.ts
|
|
2
|
+
var PLUGIN_ID = "paperclipai.supermemory";
|
|
3
|
+
var SEARCH_TOOL = "search-approved-memory";
|
|
4
|
+
var SAVE_TOOL = "submit-memory-candidate";
|
|
5
|
+
var AGENT_DIRECTORY_PAGE = "supermemory-agent-access";
|
|
6
|
+
var manifest = {
|
|
7
|
+
id: PLUGIN_ID,
|
|
8
|
+
apiVersion: 1,
|
|
9
|
+
version: "0.1.0",
|
|
10
|
+
minimumHostVersion: "2026.1023.0",
|
|
11
|
+
displayName: "Supermemory (self-hosted)",
|
|
12
|
+
description: "Paperclip memory tools routed through the self-hosted Supermemory ACL gateway. Company-scoped settings grant access to explicitly selected agents only.",
|
|
13
|
+
author: "Otomatik",
|
|
14
|
+
categories: ["connector", "automation", "ui"],
|
|
15
|
+
capabilities: [
|
|
16
|
+
"agent.tools.register",
|
|
17
|
+
"agents.read",
|
|
18
|
+
"http.outbound",
|
|
19
|
+
"instance.settings.register",
|
|
20
|
+
"secrets.read-ref"
|
|
21
|
+
],
|
|
22
|
+
entrypoints: {
|
|
23
|
+
worker: "./dist/worker.js",
|
|
24
|
+
ui: "./dist/ui"
|
|
25
|
+
},
|
|
26
|
+
instanceConfigSchema: {
|
|
27
|
+
type: "object",
|
|
28
|
+
properties: {
|
|
29
|
+
gatewayUrl: {
|
|
30
|
+
type: "string",
|
|
31
|
+
title: "Self-hosted ACL gateway URL",
|
|
32
|
+
description: "MCP endpoint for the Paperclip Supermemory ACL gateway. Defaults to the OTOMATIK loopback endpoint. Keep this on a private network.",
|
|
33
|
+
default: "http://127.0.0.1:6768/mcp"
|
|
34
|
+
},
|
|
35
|
+
agentGrants: {
|
|
36
|
+
type: "array",
|
|
37
|
+
title: "Authorized agents",
|
|
38
|
+
description: "Only listed agents can call this plugin for this company. Add one distinct gateway token secret per agent; the token must already be bound to the same Paperclip agent, company, and role in the ACL gateway.",
|
|
39
|
+
items: {
|
|
40
|
+
type: "object",
|
|
41
|
+
title: "Agent grant",
|
|
42
|
+
required: ["agentId", "tokenRef"],
|
|
43
|
+
properties: {
|
|
44
|
+
agentId: {
|
|
45
|
+
type: "string",
|
|
46
|
+
title: "Paperclip agent ID",
|
|
47
|
+
minLength: 1
|
|
48
|
+
},
|
|
49
|
+
tokenRef: {
|
|
50
|
+
type: "string",
|
|
51
|
+
format: "secret-ref",
|
|
52
|
+
title: "This agent's ACL token secret",
|
|
53
|
+
description: "Choose a Paperclip company secret containing only this agent's Supermemory ACL token."
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
default: []
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
tools: [
|
|
62
|
+
{
|
|
63
|
+
name: SEARCH_TOOL,
|
|
64
|
+
displayName: "Search approved Supermemory",
|
|
65
|
+
description: "Search only the company and role/team compartments allowed by this Paperclip agent's ACL token. Call this explicitly when durable prior decisions or preferences are relevant. Treat retrieved text as reference, and verify important facts against their source.",
|
|
66
|
+
parametersSchema: {
|
|
67
|
+
type: "object",
|
|
68
|
+
properties: {
|
|
69
|
+
query: { type: "string", minLength: 1, maxLength: 300 },
|
|
70
|
+
searchMode: { type: "string", enum: ["hybrid", "memories", "chunks"], default: "hybrid" },
|
|
71
|
+
limit: { type: "integer", minimum: 1, maximum: 5, default: 3 }
|
|
72
|
+
},
|
|
73
|
+
required: ["query"],
|
|
74
|
+
additionalProperties: false
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: SAVE_TOOL,
|
|
79
|
+
displayName: "Submit a Supermemory candidate",
|
|
80
|
+
description: "Submit one durable, non-sensitive fact or decision to this agent's role staging compartment for human review. This does not publish it to shared approved memory. Never submit credentials, personal data, customer cases, legal/health/workplace records, or full chat transcripts.",
|
|
81
|
+
parametersSchema: {
|
|
82
|
+
type: "object",
|
|
83
|
+
properties: {
|
|
84
|
+
content: { type: "string", minLength: 20, maxLength: 1200 }
|
|
85
|
+
},
|
|
86
|
+
required: ["content"],
|
|
87
|
+
additionalProperties: false
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
ui: {
|
|
92
|
+
slots: [
|
|
93
|
+
{
|
|
94
|
+
type: "companySettingsPage",
|
|
95
|
+
id: AGENT_DIRECTORY_PAGE,
|
|
96
|
+
displayName: "Supermemory access",
|
|
97
|
+
exportName: "SupermemoryAccessPage",
|
|
98
|
+
routePath: "supermemory-access"
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
var manifest_default = manifest;
|
|
104
|
+
export {
|
|
105
|
+
AGENT_DIRECTORY_PAGE,
|
|
106
|
+
PLUGIN_ID,
|
|
107
|
+
SAVE_TOOL,
|
|
108
|
+
SEARCH_TOOL,
|
|
109
|
+
manifest_default as default
|
|
110
|
+
};
|
|
111
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/manifest.ts"],
|
|
4
|
+
"sourcesContent": ["import type { PaperclipPluginManifestV1 } from \"@paperclipai/plugin-sdk\";\n\nexport const PLUGIN_ID = \"paperclipai.supermemory\";\nexport const SEARCH_TOOL = \"search-approved-memory\";\nexport const SAVE_TOOL = \"submit-memory-candidate\";\nexport const AGENT_DIRECTORY_PAGE = \"supermemory-agent-access\";\n\nconst manifest: PaperclipPluginManifestV1 = {\n id: PLUGIN_ID,\n apiVersion: 1,\n version: \"0.1.0\",\n minimumHostVersion: \"2026.1023.0\",\n displayName: \"Supermemory (self-hosted)\",\n description: \"Paperclip memory tools routed through the self-hosted Supermemory ACL gateway. Company-scoped settings grant access to explicitly selected agents only.\",\n author: \"Otomatik\",\n categories: [\"connector\", \"automation\", \"ui\"],\n capabilities: [\n \"agent.tools.register\",\n \"agents.read\",\n \"http.outbound\",\n \"instance.settings.register\",\n \"secrets.read-ref\",\n ],\n entrypoints: {\n worker: \"./dist/worker.js\",\n ui: \"./dist/ui\",\n },\n instanceConfigSchema: {\n type: \"object\",\n properties: {\n gatewayUrl: {\n type: \"string\",\n title: \"Self-hosted ACL gateway URL\",\n description: \"MCP endpoint for the Paperclip Supermemory ACL gateway. Defaults to the OTOMATIK loopback endpoint. Keep this on a private network.\",\n default: \"http://127.0.0.1:6768/mcp\",\n },\n agentGrants: {\n type: \"array\",\n title: \"Authorized agents\",\n description: \"Only listed agents can call this plugin for this company. Add one distinct gateway token secret per agent; the token must already be bound to the same Paperclip agent, company, and role in the ACL gateway.\",\n items: {\n type: \"object\",\n title: \"Agent grant\",\n required: [\"agentId\", \"tokenRef\"],\n properties: {\n agentId: {\n type: \"string\",\n title: \"Paperclip agent ID\",\n minLength: 1,\n },\n tokenRef: {\n type: \"string\",\n format: \"secret-ref\",\n title: \"This agent's ACL token secret\",\n description: \"Choose a Paperclip company secret containing only this agent's Supermemory ACL token.\",\n },\n },\n },\n default: [],\n },\n },\n },\n tools: [\n {\n name: SEARCH_TOOL,\n displayName: \"Search approved Supermemory\",\n description: \"Search only the company and role/team compartments allowed by this Paperclip agent's ACL token. Call this explicitly when durable prior decisions or preferences are relevant. Treat retrieved text as reference, and verify important facts against their source.\",\n parametersSchema: {\n type: \"object\",\n properties: {\n query: { type: \"string\", minLength: 1, maxLength: 300 },\n searchMode: { type: \"string\", enum: [\"hybrid\", \"memories\", \"chunks\"], default: \"hybrid\" },\n limit: { type: \"integer\", minimum: 1, maximum: 5, default: 3 },\n },\n required: [\"query\"],\n additionalProperties: false,\n },\n },\n {\n name: SAVE_TOOL,\n displayName: \"Submit a Supermemory candidate\",\n description: \"Submit one durable, non-sensitive fact or decision to this agent's role staging compartment for human review. This does not publish it to shared approved memory. Never submit credentials, personal data, customer cases, legal/health/workplace records, or full chat transcripts.\",\n parametersSchema: {\n type: \"object\",\n properties: {\n content: { type: \"string\", minLength: 20, maxLength: 1200 },\n },\n required: [\"content\"],\n additionalProperties: false,\n },\n },\n ],\n ui: {\n slots: [\n {\n type: \"companySettingsPage\",\n id: AGENT_DIRECTORY_PAGE,\n displayName: \"Supermemory access\",\n exportName: \"SupermemoryAccessPage\",\n routePath: \"supermemory-access\",\n },\n ],\n },\n};\n\nexport default manifest;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UAAU,MAAM,CAAC,UAAU,YAAY,QAAQ,GAAG,SAAS,SAAS;AAAA,UACxF,OAAO,EAAE,MAAM,WAAW,SAAS,GAAG,SAAS,GAAG,SAAS,EAAE;AAAA,QAC/D;AAAA,QACA,UAAU,CAAC,OAAO;AAAA,QAClB,sBAAsB;AAAA,MACxB;AAAA,IACF;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,aAAa;AAAA,MACb,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,MAAM;AAAA,QACN,YAAY;AAAA,UACV,SAAS,EAAE,MAAM,UAAU,WAAW,IAAI,WAAW,KAAK;AAAA,QAC5D;AAAA,QACA,UAAU,CAAC,SAAS;AAAA,QACpB,sBAAsB;AAAA,MACxB;AAAA,IACF;AAAA,EACF;AAAA,EACA,IAAI;AAAA,IACF,OAAO;AAAA,MACL;AAAA,QACE,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,aAAa;AAAA,QACb,YAAY;AAAA,QACZ,WAAW;AAAA,MACb;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,mBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/ui/index.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// src/ui/index.tsx
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { useHostContext, usePluginData } from "@paperclipai/plugin-sdk/ui";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
var panelStyle = {
|
|
6
|
+
maxWidth: 920,
|
|
7
|
+
display: "grid",
|
|
8
|
+
gap: 16,
|
|
9
|
+
padding: 24
|
|
10
|
+
};
|
|
11
|
+
var cardStyle = {
|
|
12
|
+
border: "1px solid var(--border)",
|
|
13
|
+
borderRadius: 12,
|
|
14
|
+
padding: 16,
|
|
15
|
+
background: "var(--card, transparent)"
|
|
16
|
+
};
|
|
17
|
+
function SupermemoryAccessPage() {
|
|
18
|
+
const { companyId } = useHostContext();
|
|
19
|
+
const query = usePluginData("agent-directory", { companyId: companyId ?? "" });
|
|
20
|
+
const granted = useMemo(() => new Set(query.data?.grants ?? []), [query.data?.grants]);
|
|
21
|
+
if (!companyId) return /* @__PURE__ */ jsx("div", { style: panelStyle, children: "Seleziona un\u2019organizzazione Paperclip." });
|
|
22
|
+
if (query.loading) return /* @__PURE__ */ jsx("div", { style: panelStyle, children: "Caricamento degli agenti\u2026" });
|
|
23
|
+
if (query.error) return /* @__PURE__ */ jsxs("div", { style: panelStyle, role: "alert", children: [
|
|
24
|
+
"Impossibile leggere la configurazione Supermemory: ",
|
|
25
|
+
query.error.message
|
|
26
|
+
] });
|
|
27
|
+
const data = query.data;
|
|
28
|
+
if (!data) return /* @__PURE__ */ jsx("div", { style: panelStyle, children: "Nessun dato disponibile." });
|
|
29
|
+
return /* @__PURE__ */ jsxs("main", { style: panelStyle, children: [
|
|
30
|
+
/* @__PURE__ */ jsxs("header", { children: [
|
|
31
|
+
/* @__PURE__ */ jsx("h1", { style: { fontSize: 24, fontWeight: 650, margin: 0 }, children: "Accesso Supermemory" }),
|
|
32
|
+
/* @__PURE__ */ jsx("p", { style: { color: "var(--muted-foreground)", marginTop: 8 }, children: "Il plugin \xE8 installato sull\u2019istanza. In questa organizzazione possono usarlo solo gli agenti con un grant esplicito nella configurazione del plugin." })
|
|
33
|
+
] }),
|
|
34
|
+
/* @__PURE__ */ jsxs("section", { style: cardStyle, children: [
|
|
35
|
+
/* @__PURE__ */ jsx("strong", { children: "Gateway privato" }),
|
|
36
|
+
/* @__PURE__ */ jsx("p", { style: { fontFamily: "var(--font-mono, monospace)", overflowWrap: "anywhere" }, children: data.gatewayUrl }),
|
|
37
|
+
/* @__PURE__ */ jsx("p", { style: { color: "var(--muted-foreground)" }, children: "La chiave master di Supermemory resta sul server. Ogni grant deve puntare al token ACL individuale dello stesso agente." })
|
|
38
|
+
] }),
|
|
39
|
+
/* @__PURE__ */ jsxs("section", { style: cardStyle, children: [
|
|
40
|
+
/* @__PURE__ */ jsx("h2", { style: { fontSize: 17, fontWeight: 600, marginTop: 0 }, children: "Agenti dell\u2019organizzazione" }),
|
|
41
|
+
/* @__PURE__ */ jsxs("p", { style: { color: "var(--muted-foreground)" }, children: [
|
|
42
|
+
"Copia l\u2019ID dell\u2019agente da inserire in ",
|
|
43
|
+
/* @__PURE__ */ jsx("strong", { children: "Impostazioni \u2192 Plugin \u2192 Supermemory \u2192 Configura" }),
|
|
44
|
+
". Se non \xE8 presente un grant, il tool viene rifiutato."
|
|
45
|
+
] }),
|
|
46
|
+
/* @__PURE__ */ jsx("div", { style: { display: "grid", gap: 8 }, children: data.agents.map((agent) => /* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: "minmax(0, 1fr) auto", gap: 12, alignItems: "center", borderTop: "1px solid var(--border)", paddingTop: 10 }, children: [
|
|
47
|
+
/* @__PURE__ */ jsxs("div", { style: { minWidth: 0 }, children: [
|
|
48
|
+
/* @__PURE__ */ jsx("strong", { children: agent.name }),
|
|
49
|
+
/* @__PURE__ */ jsxs("div", { style: { color: "var(--muted-foreground)", fontSize: 12 }, children: [
|
|
50
|
+
agent.role,
|
|
51
|
+
" \xB7 ",
|
|
52
|
+
agent.status
|
|
53
|
+
] }),
|
|
54
|
+
/* @__PURE__ */ jsx("code", { style: { display: "block", overflowWrap: "anywhere", fontSize: 11, marginTop: 4 }, children: agent.id })
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ jsx("span", { "aria-label": granted.has(agent.id) ? "Supermemory attivo" : "Supermemory disattivo", style: { border: "1px solid var(--border)", borderRadius: 999, padding: "4px 9px", fontSize: 12 }, children: granted.has(agent.id) ? "Autorizzato" : "Non autorizzato" })
|
|
57
|
+
] }, agent.id)) })
|
|
58
|
+
] }),
|
|
59
|
+
/* @__PURE__ */ jsxs("section", { style: cardStyle, children: [
|
|
60
|
+
/* @__PURE__ */ jsx("h2", { style: { fontSize: 17, fontWeight: 600, marginTop: 0 }, children: "Ambito della memoria" }),
|
|
61
|
+
/* @__PURE__ */ jsx("p", { style: { marginBottom: 0, color: "var(--muted-foreground)" }, children: "Ricerca e proposte di salvataggio passano dal gateway ACL. Il gateway applica i compartimenti aziendali e di ruolo gi\xE0 configurati; i salvataggi finiscono nell\u2019area di revisione. Questa versione non crea spazi per progetto o task e non registra automaticamente le conversazioni." })
|
|
62
|
+
] })
|
|
63
|
+
] });
|
|
64
|
+
}
|
|
65
|
+
var index_default = { SupermemoryAccessPage };
|
|
66
|
+
export {
|
|
67
|
+
SupermemoryAccessPage,
|
|
68
|
+
index_default as default
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/ui/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import { useMemo, type CSSProperties } from \"react\";\nimport { useHostContext, usePluginData } from \"@paperclipai/plugin-sdk/ui\";\n\ntype AgentDirectory = {\n agents: Array<{ id: string; name: string; role: string; status: string }>;\n grants: string[];\n gatewayUrl: string;\n};\n\nconst panelStyle: CSSProperties = {\n maxWidth: 920,\n display: \"grid\",\n gap: 16,\n padding: 24,\n};\n\nconst cardStyle: CSSProperties = {\n border: \"1px solid var(--border)\",\n borderRadius: 12,\n padding: 16,\n background: \"var(--card, transparent)\",\n};\n\nexport function SupermemoryAccessPage() {\n const { companyId } = useHostContext();\n const query = usePluginData<AgentDirectory | null>(\"agent-directory\", { companyId: companyId ?? \"\" });\n const granted = useMemo(() => new Set(query.data?.grants ?? []), [query.data?.grants]);\n\n if (!companyId) return <div style={panelStyle}>Seleziona un\u2019organizzazione Paperclip.</div>;\n if (query.loading) return <div style={panelStyle}>Caricamento degli agenti\u2026</div>;\n if (query.error) return <div style={panelStyle} role=\"alert\">Impossibile leggere la configurazione Supermemory: {query.error.message}</div>;\n const data = query.data;\n if (!data) return <div style={panelStyle}>Nessun dato disponibile.</div>;\n\n return (\n <main style={panelStyle}>\n <header>\n <h1 style={{ fontSize: 24, fontWeight: 650, margin: 0 }}>Accesso Supermemory</h1>\n <p style={{ color: \"var(--muted-foreground)\", marginTop: 8 }}>\n Il plugin \u00E8 installato sull\u2019istanza. In questa organizzazione possono usarlo solo gli agenti con un grant esplicito nella configurazione del plugin.\n </p>\n </header>\n <section style={cardStyle}>\n <strong>Gateway privato</strong>\n <p style={{ fontFamily: \"var(--font-mono, monospace)\", overflowWrap: \"anywhere\" }}>{data.gatewayUrl}</p>\n <p style={{ color: \"var(--muted-foreground)\" }}>\n La chiave master di Supermemory resta sul server. Ogni grant deve puntare al token ACL individuale dello stesso agente.\n </p>\n </section>\n <section style={cardStyle}>\n <h2 style={{ fontSize: 17, fontWeight: 600, marginTop: 0 }}>Agenti dell\u2019organizzazione</h2>\n <p style={{ color: \"var(--muted-foreground)\" }}>\n Copia l\u2019ID dell\u2019agente da inserire in <strong>Impostazioni \u2192 Plugin \u2192 Supermemory \u2192 Configura</strong>. Se non \u00E8 presente un grant, il tool viene rifiutato.\n </p>\n <div style={{ display: \"grid\", gap: 8 }}>\n {data.agents.map((agent) => (\n <div key={agent.id} style={{ display: \"grid\", gridTemplateColumns: \"minmax(0, 1fr) auto\", gap: 12, alignItems: \"center\", borderTop: \"1px solid var(--border)\", paddingTop: 10 }}>\n <div style={{ minWidth: 0 }}>\n <strong>{agent.name}</strong>\n <div style={{ color: \"var(--muted-foreground)\", fontSize: 12 }}>{agent.role} \u00B7 {agent.status}</div>\n <code style={{ display: \"block\", overflowWrap: \"anywhere\", fontSize: 11, marginTop: 4 }}>{agent.id}</code>\n </div>\n <span aria-label={granted.has(agent.id) ? \"Supermemory attivo\" : \"Supermemory disattivo\"} style={{ border: \"1px solid var(--border)\", borderRadius: 999, padding: \"4px 9px\", fontSize: 12 }}>\n {granted.has(agent.id) ? \"Autorizzato\" : \"Non autorizzato\"}\n </span>\n </div>\n ))}\n </div>\n </section>\n <section style={cardStyle}>\n <h2 style={{ fontSize: 17, fontWeight: 600, marginTop: 0 }}>Ambito della memoria</h2>\n <p style={{ marginBottom: 0, color: \"var(--muted-foreground)\" }}>\n Ricerca e proposte di salvataggio passano dal gateway ACL. Il gateway applica i compartimenti aziendali e di ruolo gi\u00E0 configurati; i salvataggi finiscono nell\u2019area di revisione. Questa versione non crea spazi per progetto o task e non registra automaticamente le conversazioni.\n </p>\n </section>\n </main>\n );\n}\n\nexport default { SupermemoryAccessPage };\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,eAAmC;AAC5C,SAAS,gBAAgB,qBAAqB;AA2BrB,cAEC,YAFD;AAnBzB,IAAM,aAA4B;AAAA,EAChC,UAAU;AAAA,EACV,SAAS;AAAA,EACT,KAAK;AAAA,EACL,SAAS;AACX;AAEA,IAAM,YAA2B;AAAA,EAC/B,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,SAAS;AAAA,EACT,YAAY;AACd;AAEO,SAAS,wBAAwB;AACtC,QAAM,EAAE,UAAU,IAAI,eAAe;AACrC,QAAM,QAAQ,cAAqC,mBAAmB,EAAE,WAAW,aAAa,GAAG,CAAC;AACpG,QAAM,UAAU,QAAQ,MAAM,IAAI,IAAI,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,CAAC,MAAM,MAAM,MAAM,CAAC;AAErF,MAAI,CAAC,UAAW,QAAO,oBAAC,SAAI,OAAO,YAAY,yDAAsC;AACrF,MAAI,MAAM,QAAS,QAAO,oBAAC,SAAI,OAAO,YAAY,4CAAyB;AAC3E,MAAI,MAAM,MAAO,QAAO,qBAAC,SAAI,OAAO,YAAY,MAAK,SAAQ;AAAA;AAAA,IAAoD,MAAM,MAAM;AAAA,KAAQ;AACrI,QAAM,OAAO,MAAM;AACnB,MAAI,CAAC,KAAM,QAAO,oBAAC,SAAI,OAAO,YAAY,sCAAwB;AAElE,SACE,qBAAC,UAAK,OAAO,YACX;AAAA,yBAAC,YACC;AAAA,0BAAC,QAAG,OAAO,EAAE,UAAU,IAAI,YAAY,KAAK,QAAQ,EAAE,GAA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