narai-primitives 2.0.0 → 2.1.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/config/index.d.ts +1 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -0
- package/dist/config/index.js.map +1 -1
- package/dist/config/policy_validation.d.ts +68 -0
- package/dist/config/policy_validation.d.ts.map +1 -0
- package/dist/config/policy_validation.js +58 -0
- package/dist/config/policy_validation.js.map +1 -0
- package/dist/config/types.d.ts +37 -19
- package/dist/config/types.d.ts.map +1 -1
- package/dist/connectors/aws/lib/aws_client.js +1 -1
- package/dist/connectors/aws/lib/aws_client.js.map +1 -1
- package/dist/connectors/confluence/index.js +1 -1
- package/dist/connectors/confluence/index.js.map +1 -1
- package/dist/connectors/confluence/lib/confluence_client.js +1 -1
- package/dist/connectors/confluence/lib/confluence_client.js.map +1 -1
- package/dist/connectors/db/connector.d.ts.map +1 -1
- package/dist/connectors/db/connector.js +4 -0
- package/dist/connectors/db/connector.js.map +1 -1
- package/dist/connectors/db/index.d.ts +1 -1
- package/dist/connectors/db/index.d.ts.map +1 -1
- package/dist/connectors/db/index.js +1 -1
- package/dist/connectors/db/index.js.map +1 -1
- package/dist/connectors/db/lib/connection.js +1 -1
- package/dist/connectors/db/lib/connection.js.map +1 -1
- package/dist/connectors/db/lib/credentials.d.ts +1 -1
- package/dist/connectors/db/lib/credentials.js +4 -4
- package/dist/connectors/db/lib/credentials.js.map +1 -1
- package/dist/connectors/db/lib/plugin_config.d.ts +28 -1
- package/dist/connectors/db/lib/plugin_config.d.ts.map +1 -1
- package/dist/connectors/db/lib/plugin_config.js +7 -1
- package/dist/connectors/db/lib/plugin_config.js.map +1 -1
- package/dist/connectors/db/lib/policy.d.ts +10 -2
- package/dist/connectors/db/lib/policy.d.ts.map +1 -1
- package/dist/connectors/db/lib/policy.js.map +1 -1
- package/dist/connectors/github/index.js +1 -1
- package/dist/connectors/github/index.js.map +1 -1
- package/dist/connectors/github/lib/github_client.js +1 -1
- package/dist/connectors/github/lib/github_client.js.map +1 -1
- package/dist/connectors/jira/index.js +1 -1
- package/dist/connectors/jira/index.js.map +1 -1
- package/dist/connectors/jira/lib/jira_client.js +1 -1
- package/dist/connectors/jira/lib/jira_client.js.map +1 -1
- package/dist/connectors/notion/index.js +1 -1
- package/dist/connectors/notion/index.js.map +1 -1
- package/dist/connectors/notion/lib/notion_client.js +1 -1
- package/dist/connectors/notion/lib/notion_client.js.map +1 -1
- package/dist/credentials/cloud_secrets.d.ts +57 -0
- package/dist/credentials/cloud_secrets.d.ts.map +1 -0
- package/dist/credentials/cloud_secrets.js +202 -0
- package/dist/credentials/cloud_secrets.js.map +1 -0
- package/dist/credentials/env_var.d.ts +24 -0
- package/dist/credentials/env_var.d.ts.map +1 -0
- package/dist/credentials/env_var.js +30 -0
- package/dist/credentials/env_var.js.map +1 -0
- package/dist/credentials/file.d.ts +73 -0
- package/dist/credentials/file.d.ts.map +1 -0
- package/dist/credentials/file.js +159 -0
- package/dist/credentials/file.js.map +1 -0
- package/dist/credentials/index.d.ts +114 -0
- package/dist/credentials/index.d.ts.map +1 -0
- package/dist/credentials/index.js +174 -0
- package/dist/credentials/index.js.map +1 -0
- package/dist/credentials/keychain.d.ts +31 -0
- package/dist/credentials/keychain.d.ts.map +1 -0
- package/dist/credentials/keychain.js +124 -0
- package/dist/credentials/keychain.js.map +1 -0
- package/dist/credentials/parse_ref.d.ts +57 -0
- package/dist/credentials/parse_ref.d.ts.map +1 -0
- package/dist/credentials/parse_ref.js +128 -0
- package/dist/credentials/parse_ref.js.map +1 -0
- package/dist/credentials/redact.d.ts +30 -0
- package/dist/credentials/redact.d.ts.map +1 -0
- package/dist/credentials/redact.js +51 -0
- package/dist/credentials/redact.js.map +1 -0
- package/dist/toolkit/agent_resolver.d.ts +22 -6
- package/dist/toolkit/agent_resolver.d.ts.map +1 -1
- package/dist/toolkit/agent_resolver.js +53 -8
- package/dist/toolkit/agent_resolver.js.map +1 -1
- package/dist/toolkit/connector.d.ts +11 -0
- package/dist/toolkit/connector.d.ts.map +1 -1
- package/dist/toolkit/connector.js.map +1 -1
- package/dist/toolkit/index.d.ts +1 -1
- package/dist/toolkit/index.js +1 -1
- package/dist/toolkit/policy/config.d.ts.map +1 -1
- package/dist/toolkit/policy/config.js +1 -2
- package/dist/toolkit/policy/config.js.map +1 -1
- package/dist/toolkit/policy/gate.d.ts +7 -5
- package/dist/toolkit/policy/gate.d.ts.map +1 -1
- package/dist/toolkit/policy/gate.js +2 -14
- package/dist/toolkit/policy/gate.js.map +1 -1
- package/dist/toolkit/policy/types.d.ts +30 -8
- package/dist/toolkit/policy/types.d.ts.map +1 -1
- package/dist/toolkit/policy/types.js +8 -2
- package/dist/toolkit/policy/types.js.map +1 -1
- package/package.json +21 -3
- package/plugins/aws-agent/.claude-plugin/plugin.json +2 -2
- package/plugins/aws-agent/README.md +2 -2
- package/plugins/aws-agent/bin/aws-agent +2 -2
- package/plugins/aws-agent/hooks/hooks.json +5 -5
- package/plugins/aws-agent/hooks/reminder.mjs +1 -1
- package/plugins/aws-agent/package.json +1 -1
- package/plugins/aws-agent/skills/aws-agent/SKILL.md +1 -1
- package/plugins/confluence-agent/.claude-plugin/plugin.json +2 -2
- package/plugins/confluence-agent/README.md +1 -1
- package/plugins/confluence-agent/bin/confluence-agent +1 -1
- package/plugins/confluence-agent/hooks/hooks.json +5 -5
- package/plugins/confluence-agent/hooks/reminder.mjs +1 -1
- package/plugins/confluence-agent/package.json +1 -1
- package/plugins/confluence-agent/skills/confluence-agent/SKILL.md +1 -1
- package/plugins/db-agent/.claude-plugin/plugin.json +4 -4
- package/plugins/db-agent/README.md +2 -2
- package/plugins/db-agent/bin/db-agent +1 -1
- package/plugins/db-agent/hooks/hooks.json +6 -6
- package/plugins/db-agent/hooks/reminder.mjs +1 -1
- package/plugins/db-agent/package.json +1 -1
- package/plugins/db-agent/skills/db-agent/SKILL.md +1 -1
- package/plugins/gcp-agent/.claude-plugin/plugin.json +2 -2
- package/plugins/gcp-agent/README.md +2 -2
- package/plugins/gcp-agent/bin/gcp-agent +2 -2
- package/plugins/gcp-agent/hooks/hooks.json +5 -5
- package/plugins/gcp-agent/hooks/reminder.mjs +1 -1
- package/plugins/gcp-agent/package.json +1 -1
- package/plugins/gcp-agent/skills/gcp-agent/SKILL.md +1 -1
- package/plugins/github-agent/.claude-plugin/plugin.json +2 -2
- package/plugins/github-agent/README.md +1 -1
- package/plugins/github-agent/bin/github-agent +1 -1
- package/plugins/github-agent/hooks/hooks.json +5 -5
- package/plugins/github-agent/hooks/reminder.mjs +1 -1
- package/plugins/github-agent/package.json +1 -1
- package/plugins/github-agent/skills/github-agent/SKILL.md +1 -1
- package/plugins/jira-agent/.claude-plugin/plugin.json +2 -2
- package/plugins/jira-agent/README.md +1 -1
- package/plugins/jira-agent/bin/jira-agent +1 -1
- package/plugins/jira-agent/hooks/hooks.json +5 -5
- package/plugins/jira-agent/hooks/reminder.mjs +1 -1
- package/plugins/jira-agent/package.json +1 -1
- package/plugins/jira-agent/skills/jira-agent/SKILL.md +1 -1
- package/plugins/notion-agent/.claude-plugin/plugin.json +2 -2
- package/plugins/notion-agent/README.md +2 -2
- package/plugins/notion-agent/bin/notion-agent +1 -1
- package/plugins/notion-agent/hooks/hooks.json +5 -5
- package/plugins/notion-agent/hooks/reminder.mjs +1 -1
- package/plugins/notion-agent/package.json +1 -1
- package/plugins/notion-agent/skills/notion-agent/SKILL.md +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gcp-agent-plugin",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Read-only GCP connector for Claude Code.
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Read-only GCP connector for Claude Code. Built on narai-primitives (subpath ./gcp). Cloud Run, Cloud SQL, Pub/Sub, Cloud Logging.",
|
|
5
5
|
"author": "narai"
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# gcp-agent-plugin
|
|
2
2
|
|
|
3
|
-
Claude Code plugin that wraps [
|
|
3
|
+
Claude Code plugin that wraps [`narai-primitives/gcp`](https://www.npmjs.com/package/narai-primitives) as a read-only GCP skill and slash command.
|
|
4
4
|
|
|
5
5
|
- **Skill** `gcp-agent` — automatic invocation for Cloud Run / Cloud SQL / Pub/Sub / Cloud Logging questions.
|
|
6
6
|
- **Slash command** `/gcp-agent <action> <params-json>`.
|
|
@@ -15,7 +15,7 @@ On first `SessionStart` the hook in `hooks/hooks.json`:
|
|
|
15
15
|
3. if the install fails, removes the stale copy so the hook re-runs next session.
|
|
16
16
|
|
|
17
17
|
After install,
|
|
18
|
-
`${CLAUDE_PLUGIN_DATA}/node_modules
|
|
18
|
+
`${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/dist/connectors/gcp/cli.js`
|
|
19
19
|
exists and `bin/gcp-agent` exec's it.
|
|
20
20
|
|
|
21
21
|
## Credentials
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# gcp-agent — thin shim over
|
|
2
|
+
# gcp-agent — thin shim over narai-primitives (CLI at dist/connectors/gcp).
|
|
3
3
|
set -euo pipefail
|
|
4
4
|
|
|
5
5
|
if [ -z "${CLAUDE_PLUGIN_DATA:-}" ]; then
|
|
@@ -7,7 +7,7 @@ if [ -z "${CLAUDE_PLUGIN_DATA:-}" ]; then
|
|
|
7
7
|
exit 2
|
|
8
8
|
fi
|
|
9
9
|
|
|
10
|
-
CLI="${CLAUDE_PLUGIN_DATA}/node_modules
|
|
10
|
+
CLI="${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/dist/connectors/gcp/cli.js"
|
|
11
11
|
|
|
12
12
|
if [ ! -f "$CLI" ]; then
|
|
13
13
|
echo "gcp-agent: connector CLI not found at $CLI" >&2
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"type": "command",
|
|
12
|
-
"command": "node \"${CLAUDE_PLUGIN_ROOT}/
|
|
12
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/reminder.mjs\" 2>/dev/null || true"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"type": "command",
|
|
16
|
-
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules
|
|
16
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/stale-summarize.mjs\" 2>/dev/null || true",
|
|
17
17
|
"env": { "USAGE_CONNECTOR_NAME": "gcp" }
|
|
18
18
|
}
|
|
19
19
|
]
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"hooks": [
|
|
26
26
|
{
|
|
27
27
|
"type": "command",
|
|
28
|
-
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules
|
|
28
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/usage-record.mjs\" 2>/dev/null || true",
|
|
29
29
|
"env": {
|
|
30
30
|
"USAGE_CONNECTOR_NAME": "gcp",
|
|
31
|
-
"USAGE_BIN_HINT": "
|
|
31
|
+
"USAGE_BIN_HINT": "narai-primitives/dist/connectors/gcp"
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
]
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"hooks": [
|
|
40
40
|
{
|
|
41
41
|
"type": "command",
|
|
42
|
-
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules
|
|
42
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/session-summary.mjs\" 2>/dev/null || true",
|
|
43
43
|
"env": { "USAGE_CONNECTOR_NAME": "gcp" }
|
|
44
44
|
}
|
|
45
45
|
]
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
try {
|
|
6
6
|
const data = process.env.CLAUDE_PLUGIN_DATA;
|
|
7
7
|
if (!data) process.exit(0);
|
|
8
|
-
const toolkitEntry = `${data}/node_modules
|
|
8
|
+
const toolkitEntry = `${data}/node_modules/narai-primitives/dist/toolkit/plugin/reminder.js`;
|
|
9
9
|
const mod = await import(toolkitEntry);
|
|
10
10
|
const decision = mod.evaluateNudge({ connectors: ["gcp"] });
|
|
11
11
|
if (decision.nudge) {
|
|
@@ -10,7 +10,7 @@ context: fork
|
|
|
10
10
|
# GCP Agent
|
|
11
11
|
|
|
12
12
|
Answer the user's question by invoking the `gcp-agent` binary exposed by
|
|
13
|
-
this plugin. It delegates to
|
|
13
|
+
this plugin. It delegates to `narai-primitives/gcp`, which speaks to
|
|
14
14
|
GCP by shelling out to `gcloud` / `bq` with Application Default Credentials.
|
|
15
15
|
|
|
16
16
|
## Invocation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "github-agent-plugin",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Read-only GitHub connector for Claude Code.
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Read-only GitHub connector for Claude Code. Built on narai-primitives (subpath ./github).",
|
|
5
5
|
"author": "narai"
|
|
6
6
|
}
|
|
@@ -6,7 +6,7 @@ if [ -z "${CLAUDE_PLUGIN_DATA:-}" ]; then
|
|
|
6
6
|
exit 2
|
|
7
7
|
fi
|
|
8
8
|
|
|
9
|
-
CLI="${CLAUDE_PLUGIN_DATA}/node_modules
|
|
9
|
+
CLI="${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/dist/connectors/github/cli.js"
|
|
10
10
|
|
|
11
11
|
if [ ! -f "$CLI" ]; then
|
|
12
12
|
echo "github-agent: connector CLI not found at $CLI" >&2
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"type": "command",
|
|
12
|
-
"command": "node \"${CLAUDE_PLUGIN_ROOT}/
|
|
12
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/reminder.mjs\" 2>/dev/null || true"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"type": "command",
|
|
16
|
-
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules
|
|
16
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/stale-summarize.mjs\" 2>/dev/null || true",
|
|
17
17
|
"env": { "USAGE_CONNECTOR_NAME": "github" }
|
|
18
18
|
}
|
|
19
19
|
]
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"hooks": [
|
|
26
26
|
{
|
|
27
27
|
"type": "command",
|
|
28
|
-
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules
|
|
28
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/usage-record.mjs\" 2>/dev/null || true",
|
|
29
29
|
"env": {
|
|
30
30
|
"USAGE_CONNECTOR_NAME": "github",
|
|
31
|
-
"USAGE_BIN_HINT": "
|
|
31
|
+
"USAGE_BIN_HINT": "narai-primitives/dist/connectors/github"
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
]
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"hooks": [
|
|
40
40
|
{
|
|
41
41
|
"type": "command",
|
|
42
|
-
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules
|
|
42
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/session-summary.mjs\" 2>/dev/null || true",
|
|
43
43
|
"env": { "USAGE_CONNECTOR_NAME": "github" }
|
|
44
44
|
}
|
|
45
45
|
]
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
try {
|
|
6
6
|
const data = process.env.CLAUDE_PLUGIN_DATA;
|
|
7
7
|
if (!data) process.exit(0);
|
|
8
|
-
const toolkitEntry = `${data}/node_modules
|
|
8
|
+
const toolkitEntry = `${data}/node_modules/narai-primitives/dist/toolkit/plugin/reminder.js`;
|
|
9
9
|
const mod = await import(toolkitEntry);
|
|
10
10
|
const decision = mod.evaluateNudge({ connectors: ["github"] });
|
|
11
11
|
if (decision.nudge) {
|
|
@@ -11,7 +11,7 @@ context: fork
|
|
|
11
11
|
|
|
12
12
|
Answer the user's question by invoking the `github-agent` binary
|
|
13
13
|
exposed by this plugin. It delegates to
|
|
14
|
-
|
|
14
|
+
`narai-primitives/github` via GitHub's REST v3 + GraphQL APIs.
|
|
15
15
|
|
|
16
16
|
## Invocation
|
|
17
17
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jira-agent-plugin",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Read-only Jira connector for Claude Code.
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Read-only Jira connector for Claude Code. Built on narai-primitives (subpath ./jira).",
|
|
5
5
|
"author": "narai"
|
|
6
6
|
}
|
|
@@ -6,7 +6,7 @@ if [ -z "${CLAUDE_PLUGIN_DATA:-}" ]; then
|
|
|
6
6
|
exit 2
|
|
7
7
|
fi
|
|
8
8
|
|
|
9
|
-
CLI="${CLAUDE_PLUGIN_DATA}/node_modules
|
|
9
|
+
CLI="${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/dist/connectors/jira/cli.js"
|
|
10
10
|
|
|
11
11
|
if [ ! -f "$CLI" ]; then
|
|
12
12
|
echo "jira-agent: connector CLI not found at $CLI" >&2
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"type": "command",
|
|
12
|
-
"command": "node \"${CLAUDE_PLUGIN_ROOT}/
|
|
12
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/reminder.mjs\" 2>/dev/null || true"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"type": "command",
|
|
16
|
-
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules
|
|
16
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/stale-summarize.mjs\" 2>/dev/null || true",
|
|
17
17
|
"env": { "USAGE_CONNECTOR_NAME": "jira" }
|
|
18
18
|
}
|
|
19
19
|
]
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"hooks": [
|
|
26
26
|
{
|
|
27
27
|
"type": "command",
|
|
28
|
-
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules
|
|
28
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/usage-record.mjs\" 2>/dev/null || true",
|
|
29
29
|
"env": {
|
|
30
30
|
"USAGE_CONNECTOR_NAME": "jira",
|
|
31
|
-
"USAGE_BIN_HINT": "
|
|
31
|
+
"USAGE_BIN_HINT": "narai-primitives/dist/connectors/jira"
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
]
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"hooks": [
|
|
40
40
|
{
|
|
41
41
|
"type": "command",
|
|
42
|
-
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules
|
|
42
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/session-summary.mjs\" 2>/dev/null || true",
|
|
43
43
|
"env": { "USAGE_CONNECTOR_NAME": "jira" }
|
|
44
44
|
}
|
|
45
45
|
]
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
try {
|
|
6
6
|
const data = process.env.CLAUDE_PLUGIN_DATA;
|
|
7
7
|
if (!data) process.exit(0);
|
|
8
|
-
const toolkitEntry = `${data}/node_modules
|
|
8
|
+
const toolkitEntry = `${data}/node_modules/narai-primitives/dist/toolkit/plugin/reminder.js`;
|
|
9
9
|
const mod = await import(toolkitEntry);
|
|
10
10
|
const decision = mod.evaluateNudge({ connectors: ["jira"] });
|
|
11
11
|
if (decision.nudge) {
|
|
@@ -9,7 +9,7 @@ context: fork
|
|
|
9
9
|
# Jira Agent
|
|
10
10
|
|
|
11
11
|
Answer the user's question by invoking the `jira-agent` binary exposed
|
|
12
|
-
by this plugin. It delegates to
|
|
12
|
+
by this plugin. It delegates to `narai-primitives/jira` via
|
|
13
13
|
Atlassian's Jira REST v3.
|
|
14
14
|
|
|
15
15
|
## Invocation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "notion-agent-plugin",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Read-only Notion connector for Claude Code.
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Read-only Notion connector for Claude Code. Built on narai-primitives (subpath ./notion).",
|
|
5
5
|
"author": "narai"
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# notion-agent-plugin
|
|
2
2
|
|
|
3
|
-
Claude Code plugin that wraps
|
|
3
|
+
Claude Code plugin that wraps `narai-primitives/notion` as a read-only Notion skill and slash command.
|
|
4
4
|
|
|
5
5
|
- Skill `notion-agent` — automatic invocation for Notion workspace questions.
|
|
6
6
|
- Slash command `/notion-agent <action> <params-json>`.
|
|
@@ -10,7 +10,7 @@ Claude Code plugin that wraps `@narai/notion-agent-connector` as a read-only Not
|
|
|
10
10
|
|
|
11
11
|
On first `SessionStart` the hook copies `package.json` into
|
|
12
12
|
`${CLAUDE_PLUGIN_DATA}` and runs `npm install --no-audit --no-fund` there
|
|
13
|
-
once. After that, `${CLAUDE_PLUGIN_DATA}/node_modules
|
|
13
|
+
once. After that, `${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/dist/connectors/notion/cli.js`
|
|
14
14
|
exists and `bin/notion-agent` exec's it.
|
|
15
15
|
|
|
16
16
|
## Credentials
|
|
@@ -6,7 +6,7 @@ if [ -z "${CLAUDE_PLUGIN_DATA:-}" ]; then
|
|
|
6
6
|
exit 2
|
|
7
7
|
fi
|
|
8
8
|
|
|
9
|
-
CLI="${CLAUDE_PLUGIN_DATA}/node_modules
|
|
9
|
+
CLI="${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/dist/connectors/notion/cli.js"
|
|
10
10
|
|
|
11
11
|
if [ ! -f "$CLI" ]; then
|
|
12
12
|
echo "notion-agent: connector CLI not found at $CLI" >&2
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"type": "command",
|
|
12
|
-
"command": "node \"${CLAUDE_PLUGIN_ROOT}/
|
|
12
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/reminder.mjs\" 2>/dev/null || true"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"type": "command",
|
|
16
|
-
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules
|
|
16
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/stale-summarize.mjs\" 2>/dev/null || true",
|
|
17
17
|
"env": { "USAGE_CONNECTOR_NAME": "notion" }
|
|
18
18
|
}
|
|
19
19
|
]
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"hooks": [
|
|
26
26
|
{
|
|
27
27
|
"type": "command",
|
|
28
|
-
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules
|
|
28
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/usage-record.mjs\" 2>/dev/null || true",
|
|
29
29
|
"env": {
|
|
30
30
|
"USAGE_CONNECTOR_NAME": "notion",
|
|
31
|
-
"USAGE_BIN_HINT": "
|
|
31
|
+
"USAGE_BIN_HINT": "narai-primitives/dist/connectors/notion"
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
]
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"hooks": [
|
|
40
40
|
{
|
|
41
41
|
"type": "command",
|
|
42
|
-
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules
|
|
42
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/session-summary.mjs\" 2>/dev/null || true",
|
|
43
43
|
"env": { "USAGE_CONNECTOR_NAME": "notion" }
|
|
44
44
|
}
|
|
45
45
|
]
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
try {
|
|
7
7
|
const data = process.env.CLAUDE_PLUGIN_DATA;
|
|
8
8
|
if (!data) process.exit(0);
|
|
9
|
-
const toolkitEntry = `${data}/node_modules
|
|
9
|
+
const toolkitEntry = `${data}/node_modules/narai-primitives/dist/toolkit/plugin/reminder.js`;
|
|
10
10
|
const mod = await import(toolkitEntry);
|
|
11
11
|
const decision = mod.evaluateNudge({ connectors: ["notion"] });
|
|
12
12
|
if (decision.nudge) {
|
|
@@ -9,7 +9,7 @@ context: fork
|
|
|
9
9
|
# Notion Agent
|
|
10
10
|
|
|
11
11
|
Answer the user's question by invoking the `notion-agent` binary exposed
|
|
12
|
-
by this plugin. It delegates to
|
|
12
|
+
by this plugin. It delegates to `narai-primitives/notion`, which
|
|
13
13
|
speaks to the Notion Public API with a `NOTION_TOKEN` integration secret.
|
|
14
14
|
|
|
15
15
|
## Invocation
|