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.
Files changed (141) hide show
  1. package/dist/config/index.d.ts +1 -0
  2. package/dist/config/index.d.ts.map +1 -1
  3. package/dist/config/index.js +1 -0
  4. package/dist/config/index.js.map +1 -1
  5. package/dist/config/policy_validation.d.ts +68 -0
  6. package/dist/config/policy_validation.d.ts.map +1 -0
  7. package/dist/config/policy_validation.js +58 -0
  8. package/dist/config/policy_validation.js.map +1 -0
  9. package/dist/config/types.d.ts +37 -19
  10. package/dist/config/types.d.ts.map +1 -1
  11. package/dist/connectors/aws/lib/aws_client.js +1 -1
  12. package/dist/connectors/aws/lib/aws_client.js.map +1 -1
  13. package/dist/connectors/confluence/index.js +1 -1
  14. package/dist/connectors/confluence/index.js.map +1 -1
  15. package/dist/connectors/confluence/lib/confluence_client.js +1 -1
  16. package/dist/connectors/confluence/lib/confluence_client.js.map +1 -1
  17. package/dist/connectors/db/connector.d.ts.map +1 -1
  18. package/dist/connectors/db/connector.js +4 -0
  19. package/dist/connectors/db/connector.js.map +1 -1
  20. package/dist/connectors/db/index.d.ts +1 -1
  21. package/dist/connectors/db/index.d.ts.map +1 -1
  22. package/dist/connectors/db/index.js +1 -1
  23. package/dist/connectors/db/index.js.map +1 -1
  24. package/dist/connectors/db/lib/connection.js +1 -1
  25. package/dist/connectors/db/lib/connection.js.map +1 -1
  26. package/dist/connectors/db/lib/credentials.d.ts +1 -1
  27. package/dist/connectors/db/lib/credentials.js +4 -4
  28. package/dist/connectors/db/lib/credentials.js.map +1 -1
  29. package/dist/connectors/db/lib/plugin_config.d.ts +28 -1
  30. package/dist/connectors/db/lib/plugin_config.d.ts.map +1 -1
  31. package/dist/connectors/db/lib/plugin_config.js +7 -1
  32. package/dist/connectors/db/lib/plugin_config.js.map +1 -1
  33. package/dist/connectors/db/lib/policy.d.ts +10 -2
  34. package/dist/connectors/db/lib/policy.d.ts.map +1 -1
  35. package/dist/connectors/db/lib/policy.js.map +1 -1
  36. package/dist/connectors/github/index.js +1 -1
  37. package/dist/connectors/github/index.js.map +1 -1
  38. package/dist/connectors/github/lib/github_client.js +1 -1
  39. package/dist/connectors/github/lib/github_client.js.map +1 -1
  40. package/dist/connectors/jira/index.js +1 -1
  41. package/dist/connectors/jira/index.js.map +1 -1
  42. package/dist/connectors/jira/lib/jira_client.js +1 -1
  43. package/dist/connectors/jira/lib/jira_client.js.map +1 -1
  44. package/dist/connectors/notion/index.js +1 -1
  45. package/dist/connectors/notion/index.js.map +1 -1
  46. package/dist/connectors/notion/lib/notion_client.js +1 -1
  47. package/dist/connectors/notion/lib/notion_client.js.map +1 -1
  48. package/dist/credentials/cloud_secrets.d.ts +57 -0
  49. package/dist/credentials/cloud_secrets.d.ts.map +1 -0
  50. package/dist/credentials/cloud_secrets.js +202 -0
  51. package/dist/credentials/cloud_secrets.js.map +1 -0
  52. package/dist/credentials/env_var.d.ts +24 -0
  53. package/dist/credentials/env_var.d.ts.map +1 -0
  54. package/dist/credentials/env_var.js +30 -0
  55. package/dist/credentials/env_var.js.map +1 -0
  56. package/dist/credentials/file.d.ts +73 -0
  57. package/dist/credentials/file.d.ts.map +1 -0
  58. package/dist/credentials/file.js +159 -0
  59. package/dist/credentials/file.js.map +1 -0
  60. package/dist/credentials/index.d.ts +114 -0
  61. package/dist/credentials/index.d.ts.map +1 -0
  62. package/dist/credentials/index.js +174 -0
  63. package/dist/credentials/index.js.map +1 -0
  64. package/dist/credentials/keychain.d.ts +31 -0
  65. package/dist/credentials/keychain.d.ts.map +1 -0
  66. package/dist/credentials/keychain.js +124 -0
  67. package/dist/credentials/keychain.js.map +1 -0
  68. package/dist/credentials/parse_ref.d.ts +57 -0
  69. package/dist/credentials/parse_ref.d.ts.map +1 -0
  70. package/dist/credentials/parse_ref.js +128 -0
  71. package/dist/credentials/parse_ref.js.map +1 -0
  72. package/dist/credentials/redact.d.ts +30 -0
  73. package/dist/credentials/redact.d.ts.map +1 -0
  74. package/dist/credentials/redact.js +51 -0
  75. package/dist/credentials/redact.js.map +1 -0
  76. package/dist/toolkit/connector.d.ts +11 -0
  77. package/dist/toolkit/connector.d.ts.map +1 -1
  78. package/dist/toolkit/connector.js.map +1 -1
  79. package/dist/toolkit/index.d.ts +1 -1
  80. package/dist/toolkit/index.js +1 -1
  81. package/dist/toolkit/policy/config.d.ts.map +1 -1
  82. package/dist/toolkit/policy/config.js +1 -2
  83. package/dist/toolkit/policy/config.js.map +1 -1
  84. package/dist/toolkit/policy/gate.d.ts +7 -5
  85. package/dist/toolkit/policy/gate.d.ts.map +1 -1
  86. package/dist/toolkit/policy/gate.js +2 -14
  87. package/dist/toolkit/policy/gate.js.map +1 -1
  88. package/dist/toolkit/policy/types.d.ts +30 -8
  89. package/dist/toolkit/policy/types.d.ts.map +1 -1
  90. package/dist/toolkit/policy/types.js +8 -2
  91. package/dist/toolkit/policy/types.js.map +1 -1
  92. package/package.json +21 -3
  93. package/plugins/aws-agent/.claude-plugin/plugin.json +2 -2
  94. package/plugins/aws-agent/README.md +2 -2
  95. package/plugins/aws-agent/bin/aws-agent +2 -2
  96. package/plugins/aws-agent/hooks/hooks.json +5 -5
  97. package/plugins/aws-agent/hooks/reminder.mjs +1 -1
  98. package/plugins/aws-agent/package.json +1 -1
  99. package/plugins/aws-agent/skills/aws-agent/SKILL.md +1 -1
  100. package/plugins/confluence-agent/.claude-plugin/plugin.json +2 -2
  101. package/plugins/confluence-agent/README.md +1 -1
  102. package/plugins/confluence-agent/bin/confluence-agent +1 -1
  103. package/plugins/confluence-agent/hooks/hooks.json +5 -5
  104. package/plugins/confluence-agent/hooks/reminder.mjs +1 -1
  105. package/plugins/confluence-agent/package.json +1 -1
  106. package/plugins/confluence-agent/skills/confluence-agent/SKILL.md +1 -1
  107. package/plugins/db-agent/.claude-plugin/plugin.json +4 -4
  108. package/plugins/db-agent/README.md +2 -2
  109. package/plugins/db-agent/bin/db-agent +1 -1
  110. package/plugins/db-agent/hooks/hooks.json +6 -6
  111. package/plugins/db-agent/hooks/reminder.mjs +1 -1
  112. package/plugins/db-agent/package.json +1 -1
  113. package/plugins/db-agent/skills/db-agent/SKILL.md +1 -1
  114. package/plugins/gcp-agent/.claude-plugin/plugin.json +2 -2
  115. package/plugins/gcp-agent/README.md +2 -2
  116. package/plugins/gcp-agent/bin/gcp-agent +2 -2
  117. package/plugins/gcp-agent/hooks/hooks.json +5 -5
  118. package/plugins/gcp-agent/hooks/reminder.mjs +1 -1
  119. package/plugins/gcp-agent/package.json +1 -1
  120. package/plugins/gcp-agent/skills/gcp-agent/SKILL.md +1 -1
  121. package/plugins/github-agent/.claude-plugin/plugin.json +2 -2
  122. package/plugins/github-agent/README.md +1 -1
  123. package/plugins/github-agent/bin/github-agent +1 -1
  124. package/plugins/github-agent/hooks/hooks.json +5 -5
  125. package/plugins/github-agent/hooks/reminder.mjs +1 -1
  126. package/plugins/github-agent/package.json +1 -1
  127. package/plugins/github-agent/skills/github-agent/SKILL.md +1 -1
  128. package/plugins/jira-agent/.claude-plugin/plugin.json +2 -2
  129. package/plugins/jira-agent/README.md +1 -1
  130. package/plugins/jira-agent/bin/jira-agent +1 -1
  131. package/plugins/jira-agent/hooks/hooks.json +5 -5
  132. package/plugins/jira-agent/hooks/reminder.mjs +1 -1
  133. package/plugins/jira-agent/package.json +1 -1
  134. package/plugins/jira-agent/skills/jira-agent/SKILL.md +1 -1
  135. package/plugins/notion-agent/.claude-plugin/plugin.json +2 -2
  136. package/plugins/notion-agent/README.md +2 -2
  137. package/plugins/notion-agent/bin/notion-agent +1 -1
  138. package/plugins/notion-agent/hooks/hooks.json +5 -5
  139. package/plugins/notion-agent/hooks/reminder.mjs +1 -1
  140. package/plugins/notion-agent/package.json +1 -1
  141. 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}/plugin/hooks/reminder.mjs\" 2>/dev/null || true"
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/@narai/connector-toolkit/plugin-hooks/stale-summarize.mjs\" 2>/dev/null || true",
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/@narai/connector-toolkit/plugin-hooks/usage-record.mjs\" 2>/dev/null || true",
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": "@narai/github-agent-connector"
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/@narai/connector-toolkit/plugin-hooks/session-summary.mjs\" 2>/dev/null || true",
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/@narai/connector-toolkit/dist/plugin/reminder.js`;
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) {
@@ -3,6 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
5
  "dependencies": {
6
- "@narai/github-agent-connector": "file:.."
6
+ "narai-primitives": "^2.0.0"
7
7
  }
8
8
  }
@@ -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
- `@narai/github-agent-connector` via GitHub's REST v3 + GraphQL APIs.
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.0.0",
4
- "description": "Read-only Jira connector for Claude Code. Wraps @narai/jira-agent-connector.",
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
  }
@@ -1,6 +1,6 @@
1
1
  # jira-agent-plugin
2
2
 
3
- Claude Code plugin wrapping `@narai/jira-agent-connector`. Same layout as the other platform plugins.
3
+ Claude Code plugin wrapping `narai-primitives/jira`. Same layout as the other platform plugins.
4
4
 
5
5
  ## Credentials
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/@narai/jira-agent-connector/dist/cli.js"
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}/plugin/hooks/reminder.mjs\" 2>/dev/null || true"
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/@narai/connector-toolkit/plugin-hooks/stale-summarize.mjs\" 2>/dev/null || true",
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/@narai/connector-toolkit/plugin-hooks/usage-record.mjs\" 2>/dev/null || true",
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": "@narai/jira-agent-connector"
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/@narai/connector-toolkit/plugin-hooks/session-summary.mjs\" 2>/dev/null || true",
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/@narai/connector-toolkit/dist/plugin/reminder.js`;
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) {
@@ -3,6 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
5
  "dependencies": {
6
- "@narai/jira-agent-connector": "file:.."
6
+ "narai-primitives": "^2.0.0"
7
7
  }
8
8
  }
@@ -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 `@narai/jira-agent-connector` via
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.0.0",
4
- "description": "Read-only Notion connector for Claude Code. Wraps @narai/notion-agent-connector.",
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 `@narai/notion-agent-connector` as a read-only Notion skill and slash command.
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/@narai/notion-agent-connector/dist/cli.js`
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/@narai/notion-agent-connector/dist/cli.js"
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}/plugin/hooks/reminder.mjs\" 2>/dev/null || true"
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/@narai/connector-toolkit/plugin-hooks/stale-summarize.mjs\" 2>/dev/null || true",
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/@narai/connector-toolkit/plugin-hooks/usage-record.mjs\" 2>/dev/null || true",
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": "@narai/notion-agent-connector"
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/@narai/connector-toolkit/plugin-hooks/session-summary.mjs\" 2>/dev/null || true",
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/@narai/connector-toolkit/dist/plugin/reminder.js`;
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) {
@@ -3,6 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
5
  "dependencies": {
6
- "@narai/notion-agent-connector": "file:.."
6
+ "narai-primitives": "^2.0.0"
7
7
  }
8
8
  }
@@ -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 `@narai/notion-agent-connector`, which
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