narai-primitives 2.0.0 → 2.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/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/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
|
@@ -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
|