narai-primitives 2.1.3 → 2.2.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/README.md +16 -4
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/load.js +12 -1
- package/dist/config/load.js.map +1 -1
- package/dist/connectors/confluence/index.d.ts +3 -1
- package/dist/connectors/confluence/index.d.ts.map +1 -1
- package/dist/connectors/confluence/index.js +246 -31
- package/dist/connectors/confluence/index.js.map +1 -1
- package/dist/connectors/confluence/lib/confluence_client.d.ts +50 -30
- package/dist/connectors/confluence/lib/confluence_client.d.ts.map +1 -1
- package/dist/connectors/confluence/lib/confluence_client.js +69 -225
- 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 +12 -6
- package/dist/connectors/db/connector.js.map +1 -1
- package/dist/connectors/db/dispatcher.d.ts +3 -2
- package/dist/connectors/db/dispatcher.d.ts.map +1 -1
- package/dist/connectors/db/dispatcher.js +136 -40
- package/dist/connectors/db/dispatcher.js.map +1 -1
- package/dist/connectors/db/index.d.ts +9 -0
- package/dist/connectors/db/index.d.ts.map +1 -1
- package/dist/connectors/db/index.js +9 -0
- package/dist/connectors/db/index.js.map +1 -1
- package/dist/connectors/db/lib/audit.d.ts.map +1 -1
- package/dist/connectors/db/lib/audit.js +46 -4
- package/dist/connectors/db/lib/audit.js.map +1 -1
- package/dist/connectors/db/lib/drivers/dynamodb.d.ts.map +1 -1
- package/dist/connectors/db/lib/drivers/dynamodb.js +24 -4
- package/dist/connectors/db/lib/drivers/dynamodb.js.map +1 -1
- package/dist/connectors/db/lib/drivers/mysql.js +1 -1
- package/dist/connectors/db/lib/drivers/mysql.js.map +1 -1
- package/dist/connectors/db/lib/drivers/postgresql.js +1 -1
- package/dist/connectors/db/lib/drivers/postgresql.js.map +1 -1
- package/dist/connectors/db/lib/drivers/sqlite.d.ts.map +1 -1
- package/dist/connectors/db/lib/drivers/sqlite.js +9 -5
- package/dist/connectors/db/lib/drivers/sqlite.js.map +1 -1
- package/dist/connectors/db/lib/drivers/sqlserver.d.ts.map +1 -1
- package/dist/connectors/db/lib/drivers/sqlserver.js +66 -32
- package/dist/connectors/db/lib/drivers/sqlserver.js.map +1 -1
- package/dist/connectors/db/lib/environments.d.ts +16 -0
- package/dist/connectors/db/lib/environments.d.ts.map +1 -1
- package/dist/connectors/db/lib/environments.js +16 -0
- package/dist/connectors/db/lib/environments.js.map +1 -1
- package/dist/connectors/db/lib/grant-store.d.ts +70 -0
- package/dist/connectors/db/lib/grant-store.d.ts.map +1 -0
- package/dist/connectors/db/lib/grant-store.js +149 -0
- package/dist/connectors/db/lib/grant-store.js.map +1 -0
- package/dist/connectors/db/lib/plugin_config.d.ts +2 -0
- package/dist/connectors/db/lib/plugin_config.d.ts.map +1 -1
- package/dist/connectors/db/lib/plugin_config.js +23 -2
- package/dist/connectors/db/lib/plugin_config.js.map +1 -1
- package/dist/connectors/db/lib/policy.d.ts +50 -14
- package/dist/connectors/db/lib/policy.d.ts.map +1 -1
- package/dist/connectors/db/lib/policy.js +295 -73
- package/dist/connectors/db/lib/policy.js.map +1 -1
- package/dist/connectors/github/actions/_fields.d.ts +18 -0
- package/dist/connectors/github/actions/_fields.d.ts.map +1 -0
- package/dist/connectors/github/actions/_fields.js +29 -0
- package/dist/connectors/github/actions/_fields.js.map +1 -0
- package/dist/connectors/github/actions/_pagination.d.ts +12 -0
- package/dist/connectors/github/actions/_pagination.d.ts.map +1 -0
- package/dist/connectors/github/actions/_pagination.js +26 -0
- package/dist/connectors/github/actions/_pagination.js.map +1 -0
- package/dist/connectors/github/actions/_types.d.ts +14 -0
- package/dist/connectors/github/actions/_types.d.ts.map +1 -0
- package/dist/connectors/github/actions/_types.js +2 -0
- package/dist/connectors/github/actions/_types.js.map +1 -0
- package/dist/connectors/github/actions/comments.d.ts +3 -0
- package/dist/connectors/github/actions/comments.d.ts.map +1 -0
- package/dist/connectors/github/actions/comments.js +166 -0
- package/dist/connectors/github/actions/comments.js.map +1 -0
- package/dist/connectors/github/actions/issues.d.ts +3 -0
- package/dist/connectors/github/actions/issues.d.ts.map +1 -0
- package/dist/connectors/github/actions/issues.js +129 -0
- package/dist/connectors/github/actions/issues.js.map +1 -0
- package/dist/connectors/github/actions/pulls.d.ts +3 -0
- package/dist/connectors/github/actions/pulls.d.ts.map +1 -0
- package/dist/connectors/github/actions/pulls.js +182 -0
- package/dist/connectors/github/actions/pulls.js.map +1 -0
- package/dist/connectors/github/actions/reads.d.ts +3 -0
- package/dist/connectors/github/actions/reads.d.ts.map +1 -0
- package/dist/connectors/github/actions/reads.js +349 -0
- package/dist/connectors/github/actions/reads.js.map +1 -0
- package/dist/connectors/github/actions/releases.d.ts +3 -0
- package/dist/connectors/github/actions/releases.d.ts.map +1 -0
- package/dist/connectors/github/actions/releases.js +124 -0
- package/dist/connectors/github/actions/releases.js.map +1 -0
- package/dist/connectors/github/actions/workflows.d.ts +3 -0
- package/dist/connectors/github/actions/workflows.d.ts.map +1 -0
- package/dist/connectors/github/actions/workflows.js +224 -0
- package/dist/connectors/github/actions/workflows.js.map +1 -0
- package/dist/connectors/github/index.d.ts +13 -1
- package/dist/connectors/github/index.d.ts.map +1 -1
- package/dist/connectors/github/index.js +33 -396
- package/dist/connectors/github/index.js.map +1 -1
- package/dist/connectors/github/lib/github_client.d.ts +242 -29
- package/dist/connectors/github/lib/github_client.d.ts.map +1 -1
- package/dist/connectors/github/lib/github_client.js +202 -256
- package/dist/connectors/github/lib/github_client.js.map +1 -1
- package/dist/connectors/github/lib/github_config.d.ts +10 -0
- package/dist/connectors/github/lib/github_config.d.ts.map +1 -0
- package/dist/connectors/github/lib/github_config.js +79 -0
- package/dist/connectors/github/lib/github_config.js.map +1 -0
- package/dist/connectors/gitlab/actions/_fields.d.ts +20 -0
- package/dist/connectors/gitlab/actions/_fields.d.ts.map +1 -0
- package/dist/connectors/gitlab/actions/_fields.js +44 -0
- package/dist/connectors/gitlab/actions/_fields.js.map +1 -0
- package/dist/connectors/gitlab/actions/_pagination.d.ts +19 -0
- package/dist/connectors/gitlab/actions/_pagination.d.ts.map +1 -0
- package/dist/connectors/gitlab/actions/_pagination.js +33 -0
- package/dist/connectors/gitlab/actions/_pagination.js.map +1 -0
- package/dist/connectors/gitlab/actions/_types.d.ts +12 -0
- package/dist/connectors/gitlab/actions/_types.d.ts.map +1 -0
- package/dist/connectors/gitlab/actions/_types.js +2 -0
- package/dist/connectors/gitlab/actions/_types.js.map +1 -0
- package/dist/connectors/gitlab/actions/issues.d.ts +3 -0
- package/dist/connectors/gitlab/actions/issues.d.ts.map +1 -0
- package/dist/connectors/gitlab/actions/issues.js +119 -0
- package/dist/connectors/gitlab/actions/issues.js.map +1 -0
- package/dist/connectors/gitlab/actions/merges.d.ts +3 -0
- package/dist/connectors/gitlab/actions/merges.d.ts.map +1 -0
- package/dist/connectors/gitlab/actions/merges.js +198 -0
- package/dist/connectors/gitlab/actions/merges.js.map +1 -0
- package/dist/connectors/gitlab/actions/notes.d.ts +3 -0
- package/dist/connectors/gitlab/actions/notes.d.ts.map +1 -0
- package/dist/connectors/gitlab/actions/notes.js +145 -0
- package/dist/connectors/gitlab/actions/notes.js.map +1 -0
- package/dist/connectors/gitlab/actions/pipelines.d.ts +3 -0
- package/dist/connectors/gitlab/actions/pipelines.d.ts.map +1 -0
- package/dist/connectors/gitlab/actions/pipelines.js +136 -0
- package/dist/connectors/gitlab/actions/pipelines.js.map +1 -0
- package/dist/connectors/gitlab/actions/reads.d.ts +3 -0
- package/dist/connectors/gitlab/actions/reads.d.ts.map +1 -0
- package/dist/connectors/gitlab/actions/reads.js +422 -0
- package/dist/connectors/gitlab/actions/reads.js.map +1 -0
- package/dist/connectors/gitlab/actions/releases.d.ts +3 -0
- package/dist/connectors/gitlab/actions/releases.d.ts.map +1 -0
- package/dist/connectors/gitlab/actions/releases.js +99 -0
- package/dist/connectors/gitlab/actions/releases.js.map +1 -0
- package/dist/connectors/gitlab/cli.d.ts +3 -0
- package/dist/connectors/gitlab/cli.d.ts.map +1 -0
- package/dist/connectors/gitlab/cli.js +24 -0
- package/dist/connectors/gitlab/cli.js.map +1 -0
- package/dist/connectors/gitlab/index.d.ts +29 -0
- package/dist/connectors/gitlab/index.d.ts.map +1 -0
- package/dist/connectors/gitlab/index.js +95 -0
- package/dist/connectors/gitlab/index.js.map +1 -0
- package/dist/connectors/gitlab/lib/gitlab_client.d.ts +306 -0
- package/dist/connectors/gitlab/lib/gitlab_client.d.ts.map +1 -0
- package/dist/connectors/gitlab/lib/gitlab_client.js +249 -0
- package/dist/connectors/gitlab/lib/gitlab_client.js.map +1 -0
- package/dist/connectors/gitlab/lib/gitlab_config.d.ts +11 -0
- package/dist/connectors/gitlab/lib/gitlab_config.d.ts.map +1 -0
- package/dist/connectors/gitlab/lib/gitlab_config.js +115 -0
- package/dist/connectors/gitlab/lib/gitlab_config.js.map +1 -0
- package/dist/connectors/jira/index.d.ts +3 -1
- package/dist/connectors/jira/index.d.ts.map +1 -1
- package/dist/connectors/jira/index.js +299 -41
- package/dist/connectors/jira/index.js.map +1 -1
- package/dist/connectors/jira/lib/jira_client.d.ts +56 -41
- package/dist/connectors/jira/lib/jira_client.d.ts.map +1 -1
- package/dist/connectors/jira/lib/jira_client.js +71 -248
- package/dist/connectors/jira/lib/jira_client.js.map +1 -1
- package/dist/connectors/linear/cli.d.ts +3 -0
- package/dist/connectors/linear/cli.d.ts.map +1 -0
- package/dist/connectors/linear/cli.js +22 -0
- package/dist/connectors/linear/cli.js.map +1 -0
- package/dist/connectors/linear/index.d.ts +27 -0
- package/dist/connectors/linear/index.d.ts.map +1 -0
- package/dist/connectors/linear/index.js +496 -0
- package/dist/connectors/linear/index.js.map +1 -0
- package/dist/connectors/linear/lib/linear_client.d.ts +249 -0
- package/dist/connectors/linear/lib/linear_client.d.ts.map +1 -0
- package/dist/connectors/linear/lib/linear_client.js +154 -0
- package/dist/connectors/linear/lib/linear_client.js.map +1 -0
- package/dist/connectors/linear/lib/queries.d.ts +15 -0
- package/dist/connectors/linear/lib/queries.d.ts.map +1 -0
- package/dist/connectors/linear/lib/queries.js +188 -0
- package/dist/connectors/linear/lib/queries.js.map +1 -0
- package/dist/connectors/notion/index.d.ts +2 -1
- package/dist/connectors/notion/index.d.ts.map +1 -1
- package/dist/connectors/notion/index.js +213 -28
- package/dist/connectors/notion/index.js.map +1 -1
- package/dist/connectors/notion/lib/markdown_to_blocks.d.ts +21 -0
- package/dist/connectors/notion/lib/markdown_to_blocks.d.ts.map +1 -0
- package/dist/connectors/notion/lib/markdown_to_blocks.js +102 -0
- package/dist/connectors/notion/lib/markdown_to_blocks.js.map +1 -0
- package/dist/connectors/notion/lib/notion_blocks.d.ts +34 -0
- package/dist/connectors/notion/lib/notion_blocks.d.ts.map +1 -0
- package/dist/connectors/notion/lib/notion_blocks.js +87 -0
- package/dist/connectors/notion/lib/notion_blocks.js.map +1 -0
- package/dist/connectors/notion/lib/notion_client.d.ts +35 -25
- package/dist/connectors/notion/lib/notion_client.d.ts.map +1 -1
- package/dist/connectors/notion/lib/notion_client.js +63 -185
- package/dist/connectors/notion/lib/notion_client.js.map +1 -1
- package/dist/hub/index.d.ts.map +1 -1
- package/dist/hub/index.js +23 -3
- package/dist/hub/index.js.map +1 -1
- package/dist/toolkit/agent_resolver.d.ts +14 -4
- package/dist/toolkit/agent_resolver.d.ts.map +1 -1
- package/dist/toolkit/agent_resolver.js +38 -6
- package/dist/toolkit/agent_resolver.js.map +1 -1
- package/dist/toolkit/atlassian/adf_validator.d.ts +45 -0
- package/dist/toolkit/atlassian/adf_validator.d.ts.map +1 -0
- package/dist/toolkit/atlassian/adf_validator.js +83 -0
- package/dist/toolkit/atlassian/adf_validator.js.map +1 -0
- package/dist/toolkit/atlassian/index.d.ts +5 -0
- package/dist/toolkit/atlassian/index.d.ts.map +1 -0
- package/dist/toolkit/atlassian/index.js +5 -0
- package/dist/toolkit/atlassian/index.js.map +1 -0
- package/dist/toolkit/audit/writer.d.ts.map +1 -1
- package/dist/toolkit/audit/writer.js +45 -5
- package/dist/toolkit/audit/writer.js.map +1 -1
- package/dist/toolkit/connector_error.d.ts +12 -0
- package/dist/toolkit/connector_error.d.ts.map +1 -0
- package/dist/toolkit/connector_error.js +18 -0
- package/dist/toolkit/connector_error.js.map +1 -0
- package/dist/toolkit/guardrail.d.ts +12 -2
- package/dist/toolkit/guardrail.d.ts.map +1 -1
- package/dist/toolkit/guardrail.js +17 -3
- package/dist/toolkit/guardrail.js.map +1 -1
- package/dist/toolkit/http_client.d.ts +134 -0
- package/dist/toolkit/http_client.d.ts.map +1 -0
- package/dist/toolkit/http_client.js +385 -0
- package/dist/toolkit/http_client.js.map +1 -0
- package/dist/toolkit/index.d.ts +3 -0
- package/dist/toolkit/index.d.ts.map +1 -1
- package/dist/toolkit/index.js +5 -0
- package/dist/toolkit/index.js.map +1 -1
- package/dist/toolkit/usage/aggregate.d.ts.map +1 -1
- package/dist/toolkit/usage/aggregate.js +19 -3
- package/dist/toolkit/usage/aggregate.js.map +1 -1
- package/package.json +14 -2
- package/plugin-hooks/dispatcher.mjs +584 -0
- package/plugin-hooks/plugin-config.mjs +36 -0
- package/plugins/{aws-agent → aws-connector}/.claude-plugin/plugin.json +1 -1
- package/plugins/{aws-agent → aws-connector}/README.md +7 -7
- package/plugins/{aws-agent/bin/aws-agent → aws-connector/bin/aws-connector} +3 -3
- package/plugins/aws-connector/commands/aws-connector.md +6 -0
- package/plugins/{gcp-agent → aws-connector}/hooks/hooks.json +12 -11
- package/plugins/aws-connector/package.json +9 -0
- package/plugins/aws-connector/plugin-config.json +4 -0
- package/plugins/{aws-agent/skills/aws-agent → aws-connector/skills/aws-connector}/SKILL.md +5 -5
- package/plugins/confluence-connector/.claude-plugin/plugin.json +6 -0
- package/plugins/{confluence-agent → confluence-connector}/README.md +2 -2
- package/plugins/confluence-connector/bin/confluence-connector +17 -0
- package/plugins/confluence-connector/commands/confluence-connector.md +6 -0
- package/plugins/{jira-agent → confluence-connector}/hooks/hooks.json +12 -11
- package/plugins/confluence-connector/package.json +8 -0
- package/plugins/confluence-connector/plugin-config.json +4 -0
- package/plugins/confluence-connector/skills/confluence-connector/SKILL.md +146 -0
- package/plugins/{create-connector → connector-creator}/.claude-plugin/plugin.json +1 -1
- package/plugins/{create-connector → connector-creator}/README.md +2 -2
- package/plugins/connector-creator/skills/connector-creator/SKILL.md +412 -0
- package/plugins/connector-creator/skills/connector-creator/assets/templates/_runtime/connector-gate.mjs.tmpl +120 -0
- package/plugins/connector-creator/skills/connector-creator/assets/templates/composite/SKILL.md.tmpl +26 -0
- package/plugins/connector-creator/skills/connector-creator/assets/templates/composite/bin.tmpl +2 -0
- package/plugins/connector-creator/skills/connector-creator/assets/templates/composite/index.mjs.tmpl +35 -0
- package/plugins/connector-creator/skills/connector-creator/assets/templates/knowledge/SKILL.md.tmpl +23 -0
- package/plugins/connector-creator/skills/connector-creator/assets/templates/shell-gate/SKILL.md.tmpl +27 -0
- package/plugins/connector-creator/skills/connector-creator/assets/templates/shell-gate/gates.json.tmpl +5 -0
- package/plugins/connector-creator/skills/connector-creator/lib/connector-registry.mjs +43 -0
- package/plugins/connector-creator/skills/connector-creator/lib/settings-wiring.mjs +71 -0
- package/plugins/connector-creator/skills/connector-creator/references/connector-contract.md +79 -0
- package/plugins/connector-creator/skills/connector-creator/references/flavor-authoring.md +58 -0
- package/plugins/connector-creator/skills/connector-creator/references/research-patterns.md +51 -0
- package/plugins/{db-agent → db-connector}/.claude-plugin/plugin.json +3 -3
- package/plugins/{db-agent → db-connector}/README.md +2 -2
- package/plugins/{github-agent/bin/github-agent → db-connector/bin/db-connector} +3 -3
- package/plugins/db-connector/commands/db-connector.md +6 -0
- package/plugins/db-connector/gates.json +37 -0
- package/plugins/{db-agent → db-connector}/hooks/guardrails.json +4 -2
- package/plugins/{aws-agent → db-connector}/hooks/hooks.json +15 -11
- package/plugins/{db-agent → db-connector}/package.json +1 -1
- package/plugins/db-connector/plugin-config.json +5 -0
- package/plugins/{db-agent/skills/db-agent → db-connector/skills/db-connector}/SKILL.md +5 -5
- package/plugins/{gcp-agent → gcp-connector}/.claude-plugin/plugin.json +1 -1
- package/plugins/{gcp-agent → gcp-connector}/README.md +5 -5
- package/plugins/{gcp-agent/bin/gcp-agent → gcp-connector/bin/gcp-connector} +3 -3
- package/plugins/gcp-connector/commands/gcp-connector.md +6 -0
- package/plugins/{github-agent → gcp-connector}/hooks/hooks.json +12 -11
- package/plugins/gcp-connector/package.json +9 -0
- package/plugins/gcp-connector/plugin-config.json +4 -0
- package/plugins/{gcp-agent/skills/gcp-agent → gcp-connector/skills/gcp-connector}/SKILL.md +5 -5
- package/plugins/git-connector/.claude-plugin/plugin.json +6 -0
- package/plugins/git-connector/CONTRIBUTING.md +117 -0
- package/plugins/git-connector/README.md +94 -0
- package/plugins/git-connector/SECURITY.md +143 -0
- package/plugins/git-connector/gates.json +54 -0
- package/plugins/git-connector/hooks/hooks.json +25 -0
- package/plugins/git-connector/package.json +9 -0
- package/plugins/git-connector/plugin-config.json +4 -0
- package/plugins/{github-agent → github-connector}/.claude-plugin/plugin.json +1 -1
- package/plugins/github-connector/README.md +48 -0
- package/plugins/{confluence-agent/bin/confluence-agent → github-connector/bin/github-connector} +3 -3
- package/plugins/github-connector/commands/github-connector.md +6 -0
- package/plugins/github-connector/hooks/hooks.json +50 -0
- package/plugins/{jira-agent → github-connector}/package.json +1 -1
- package/plugins/github-connector/plugin-config.json +4 -0
- package/plugins/github-connector/skills/github-connector/SKILL.md +106 -0
- package/plugins/gitlab-connector/.claude-plugin/plugin.json +6 -0
- package/plugins/gitlab-connector/README.md +62 -0
- package/plugins/{db-agent/bin/db-agent → gitlab-connector/bin/gitlab-connector} +3 -3
- package/plugins/gitlab-connector/commands/gitlab-connector.md +6 -0
- package/plugins/gitlab-connector/hooks/hooks.json +50 -0
- package/plugins/{confluence-agent → gitlab-connector}/package.json +1 -1
- package/plugins/gitlab-connector/plugin-config.json +4 -0
- package/plugins/gitlab-connector/skills/gitlab-connector/SKILL.md +115 -0
- package/plugins/jira-connector/.claude-plugin/plugin.json +6 -0
- package/plugins/{jira-agent → jira-connector}/README.md +1 -1
- package/plugins/{jira-agent/bin/jira-agent → jira-connector/bin/jira-connector} +2 -2
- package/plugins/jira-connector/commands/jira-connector.md +6 -0
- package/plugins/jira-connector/hooks/hooks.json +50 -0
- package/plugins/{github-agent → jira-connector}/package.json +1 -1
- package/plugins/jira-connector/plugin-config.json +4 -0
- package/plugins/jira-connector/skills/jira-connector/SKILL.md +146 -0
- package/plugins/linear-connector/.claude-plugin/plugin.json +6 -0
- package/plugins/linear-connector/README.md +29 -0
- package/plugins/linear-connector/bin/linear-connector +17 -0
- package/plugins/linear-connector/commands/linear-connector.md +6 -0
- package/plugins/linear-connector/hooks/hooks.json +50 -0
- package/plugins/linear-connector/package.json +8 -0
- package/plugins/linear-connector/plugin-config.json +4 -0
- package/plugins/linear-connector/skills/linear-connector/SKILL.md +159 -0
- package/plugins/notion-connector/.claude-plugin/plugin.json +6 -0
- package/plugins/{notion-agent → notion-connector}/README.md +5 -5
- package/plugins/{notion-agent/bin/notion-agent → notion-connector/bin/notion-connector} +2 -2
- package/plugins/notion-connector/commands/notion-connector.md +6 -0
- package/plugins/notion-connector/hooks/hooks.json +50 -0
- package/plugins/notion-connector/package.json +8 -0
- package/plugins/notion-connector/plugin-config.json +4 -0
- package/plugins/notion-connector/skills/notion-connector/SKILL.md +141 -0
- package/dist/connectors/confluence/lib/confluence_error.d.ts +0 -13
- package/dist/connectors/confluence/lib/confluence_error.d.ts.map +0 -1
- package/dist/connectors/confluence/lib/confluence_error.js +0 -19
- package/dist/connectors/confluence/lib/confluence_error.js.map +0 -1
- package/dist/connectors/github/lib/github_error.d.ts +0 -11
- package/dist/connectors/github/lib/github_error.d.ts.map +0 -1
- package/dist/connectors/github/lib/github_error.js +0 -17
- package/dist/connectors/github/lib/github_error.js.map +0 -1
- package/dist/connectors/jira/lib/jira_error.d.ts +0 -11
- package/dist/connectors/jira/lib/jira_error.d.ts.map +0 -1
- package/dist/connectors/jira/lib/jira_error.js +0 -17
- package/dist/connectors/jira/lib/jira_error.js.map +0 -1
- package/dist/connectors/notion/lib/notion_error.d.ts +0 -12
- package/dist/connectors/notion/lib/notion_error.d.ts.map +0 -1
- package/dist/connectors/notion/lib/notion_error.js +0 -18
- package/dist/connectors/notion/lib/notion_error.js.map +0 -1
- package/plugins/aws-agent/commands/aws-agent.md +0 -6
- package/plugins/aws-agent/hooks/reminder.mjs +0 -16
- package/plugins/aws-agent/package.json +0 -9
- package/plugins/confluence-agent/.claude-plugin/plugin.json +0 -6
- package/plugins/confluence-agent/commands/confluence-agent.md +0 -6
- package/plugins/confluence-agent/hooks/hooks.json +0 -49
- package/plugins/confluence-agent/hooks/reminder.mjs +0 -25
- package/plugins/confluence-agent/skills/confluence-agent/SKILL.md +0 -40
- package/plugins/create-connector/skills/create-connector/SKILL.md +0 -252
- package/plugins/db-agent/commands/db-agent.md +0 -6
- package/plugins/db-agent/hooks/db-guard.mjs +0 -110
- package/plugins/db-agent/hooks/hooks.json +0 -61
- package/plugins/db-agent/hooks/reminder.mjs +0 -16
- package/plugins/gcp-agent/commands/gcp-agent.md +0 -6
- package/plugins/gcp-agent/hooks/reminder.mjs +0 -16
- package/plugins/gcp-agent/package.json +0 -9
- package/plugins/github-agent/README.md +0 -13
- package/plugins/github-agent/commands/github-agent.md +0 -6
- package/plugins/github-agent/hooks/reminder.mjs +0 -16
- package/plugins/github-agent/skills/github-agent/SKILL.md +0 -41
- package/plugins/jira-agent/.claude-plugin/plugin.json +0 -6
- package/plugins/jira-agent/commands/jira-agent.md +0 -6
- package/plugins/jira-agent/hooks/reminder.mjs +0 -16
- package/plugins/jira-agent/skills/jira-agent/SKILL.md +0 -37
- package/plugins/notion-agent/.claude-plugin/plugin.json +0 -6
- package/plugins/notion-agent/commands/notion-agent.md +0 -6
- package/plugins/notion-agent/hooks/hooks.json +0 -49
- package/plugins/notion-agent/hooks/reminder.mjs +0 -17
- package/plugins/notion-agent/package.json +0 -8
- package/plugins/notion-agent/skills/notion-agent/SKILL.md +0 -48
- /package/plugins/{create-connector/skills/create-connector → connector-creator/skills/connector-creator}/assets/templates/bin.tmpl +0 -0
- /package/plugins/{create-connector/skills/create-connector → connector-creator/skills/connector-creator}/assets/templates/connector-SKILL.md.tmpl +0 -0
- /package/plugins/{create-connector/skills/create-connector → connector-creator/skills/connector-creator}/assets/templates/index.mjs.tmpl +0 -0
- /package/plugins/{create-connector/skills/create-connector → connector-creator/skills/connector-creator}/assets/templates/tests-example.mjs.tmpl +0 -0
- /package/plugins/{create-connector/skills/create-connector → connector-creator/skills/connector-creator}/references/action-design.md +0 -0
- /package/plugins/{create-connector/skills/create-connector → connector-creator/skills/connector-creator}/references/auth-patterns.md +0 -0
- /package/plugins/{create-connector/skills/create-connector → connector-creator/skills/connector-creator}/references/connector-anatomy.md +0 -0
- /package/plugins/{create-connector/skills/create-connector/references/db-agent-pointer.md → connector-creator/skills/connector-creator/references/db-connector-pointer.md} +0 -0
- /package/plugins/{create-connector/skills/create-connector → connector-creator/skills/connector-creator}/references/plugin-layer.md +0 -0
- /package/plugins/{create-connector/skills/create-connector → connector-creator/skills/connector-creator}/references/template-sync.md +0 -0
- /package/plugins/{create-connector/skills/create-connector → connector-creator/skills/connector-creator}/references/verification.md +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# linear-connector plugin
|
|
2
|
+
|
|
3
|
+
Claude Code plugin for the Linear connector. Exposes the `linear-connector` binary
|
|
4
|
+
that delegates to `narai-primitives/linear` — a GraphQL-based connector with
|
|
5
|
+
7 read actions and 7 write actions for Linear issues, comments, and attachments.
|
|
6
|
+
|
|
7
|
+
## Environment variables
|
|
8
|
+
|
|
9
|
+
| Variable | Description |
|
|
10
|
+
|-------------------|------------------------------------|
|
|
11
|
+
| `LINEAR_API_KEY` | Linear personal API key (no Bearer prefix — Linear is opinionated) |
|
|
12
|
+
|
|
13
|
+
Obtain your API key from Linear → Settings → API → Personal API keys.
|
|
14
|
+
|
|
15
|
+
## Credentials note
|
|
16
|
+
|
|
17
|
+
The connector reads `LINEAR_API_KEY` from the environment. You can also
|
|
18
|
+
register a credential provider via `narai-primitives/credentials`, or
|
|
19
|
+
configure it under `connectors.linear.options.api_key` in
|
|
20
|
+
`~/.connectors/config.yaml`.
|
|
21
|
+
|
|
22
|
+
The authorization header sent to `https://api.linear.app/graphql` is:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Authorization: <api_key>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Note: Linear does **not** use a `Bearer` prefix — this is Linear-specific
|
|
29
|
+
and differs from most REST APIs.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
if [ -z "${CLAUDE_PLUGIN_DATA:-}" ]; then
|
|
5
|
+
echo "linear-connector: CLAUDE_PLUGIN_DATA is not set (run from inside Claude Code)" >&2
|
|
6
|
+
exit 2
|
|
7
|
+
fi
|
|
8
|
+
|
|
9
|
+
CLI="${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/dist/connectors/linear/cli.js"
|
|
10
|
+
|
|
11
|
+
if [ ! -f "$CLI" ]; then
|
|
12
|
+
echo "linear-connector: connector CLI not found at $CLI" >&2
|
|
13
|
+
echo "Restart your Claude Code session to re-run the SessionStart install hook." >&2
|
|
14
|
+
exit 2
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
exec node "$CLI" "$@"
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run a Linear query or mutation via the linear-connector connector
|
|
3
|
+
argument-hint: "<action> <params-json>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Invoke the `linear-connector` skill with the user's $ARGUMENTS as the action name and params JSON. Return the connector's JSON envelope verbatim.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"hooks": [
|
|
6
|
+
{
|
|
7
|
+
"type": "command",
|
|
8
|
+
"command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (mkdir -p \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/\" && cd \"${CLAUDE_PLUGIN_DATA}\" && npm install --no-audit --no-fund) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\""
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"type": "command",
|
|
12
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/dispatcher.mjs\" session-start"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"PreToolUse": [
|
|
18
|
+
{
|
|
19
|
+
"matcher": "Bash",
|
|
20
|
+
"hooks": [
|
|
21
|
+
{
|
|
22
|
+
"type": "command",
|
|
23
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/dispatcher.mjs\" pre-tool-use"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"PostToolUse": [
|
|
29
|
+
{
|
|
30
|
+
"matcher": "Bash",
|
|
31
|
+
"hooks": [
|
|
32
|
+
{
|
|
33
|
+
"type": "command",
|
|
34
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/dispatcher.mjs\" post-tool-use"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"SessionEnd": [
|
|
40
|
+
{
|
|
41
|
+
"hooks": [
|
|
42
|
+
{
|
|
43
|
+
"type": "command",
|
|
44
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/dispatcher.mjs\" session-end"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: linear-connector
|
|
3
|
+
description: |
|
|
4
|
+
Use when the user asks about Linear data or wants to create, update, or
|
|
5
|
+
archive Linear content — issue search, issue details, project metadata,
|
|
6
|
+
comments, attachment links, or any write operation on issues and comments.
|
|
7
|
+
Supports both read and write surfaces; every action passes the policy gate
|
|
8
|
+
before any network call is made: read actions succeed by default, write and
|
|
9
|
+
delete actions escalate by default, privilege actions are hard-denied.
|
|
10
|
+
context: fork
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Linear Connector
|
|
14
|
+
|
|
15
|
+
Answer the user's question by invoking the `linear-connector` binary exposed by
|
|
16
|
+
this plugin. It delegates to `narai-primitives/linear`, which enforces the
|
|
17
|
+
policy gate before any Linear GraphQL call is made.
|
|
18
|
+
|
|
19
|
+
## Invocation
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
linear-connector --action <action> --params '<json>'
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Return the connector's JSON envelope verbatim.
|
|
26
|
+
|
|
27
|
+
## Supported actions
|
|
28
|
+
|
|
29
|
+
| Action | Classification | Required params | Optional params |
|
|
30
|
+
|----------------------|----------------|----------------------------------------------------------|----------------------------------------------------------------------------|
|
|
31
|
+
| `get_issue` | read | `id` (identifier like `ENG-123` or UUID) | |
|
|
32
|
+
| `search_issues` | read | | `team_key`, `state`, `assignee_email`, `text`, `max_results` (default 50) |
|
|
33
|
+
| `get_project` | read | `id` (UUID) | |
|
|
34
|
+
| `get_team` | read | `key_or_id` (team key like `ENG` or UUID) | |
|
|
35
|
+
| `get_comments` | read | `issue_id` | `max_results` (default 50) |
|
|
36
|
+
| `list_attachments` | read | `issue_id` | |
|
|
37
|
+
| `get_attachment` | read | `attachment_id` | Use `list_attachments` first to get the URL; then fetch externally. |
|
|
38
|
+
| `create_issue` | write | `team_id`, `title` | `description` (markdown), `assignee_id`, `label_ids`, `priority`, `parent_id` |
|
|
39
|
+
| `update_issue` | write | `id` | `title`, `description`, `assignee_id`, `state_id`, `priority` |
|
|
40
|
+
| `archive_issue` | write/delete | `id` | |
|
|
41
|
+
| `add_comment` | write | `issue_id`, `body` (markdown) | |
|
|
42
|
+
| `update_comment` | write | `comment_id`, `body` (markdown) | |
|
|
43
|
+
| `delete_comment` | write/delete | `comment_id` | |
|
|
44
|
+
| `attachment_link` | write | `issue_id`, `title`, `url` | `subtitle`, `metadata` |
|
|
45
|
+
|
|
46
|
+
## Envelope shape
|
|
47
|
+
|
|
48
|
+
**success**
|
|
49
|
+
```json
|
|
50
|
+
{"status": "success", "action": "create_issue", "data": {"id": "abc-uuid", "identifier": "ENG-123", "url": "https://linear.app/team/issue/ENG-123", "title": "Fix login bug", "created_at": "2026-05-01T00:00:00.000Z"}}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**escalate** (default for write/delete actions)
|
|
54
|
+
```json
|
|
55
|
+
{"status": "escalate", "action": "create_issue", "reason": "WRITE statements require approval"}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**denied** (default for privilege actions, or operator-set policy)
|
|
59
|
+
```json
|
|
60
|
+
{"status": "denied", "action": "archive_issue", "reason": "DELETE actions are not allowed by operator policy"}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**error**
|
|
64
|
+
```json
|
|
65
|
+
{"status": "error", "action": "get_issue", "error_code": "NOT_FOUND", "message": "Issue 'ENG-999' not found", "retriable": false}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Issue identifiers
|
|
69
|
+
|
|
70
|
+
Linear issues can be addressed two ways:
|
|
71
|
+
|
|
72
|
+
- **Identifier** (human-readable): `ENG-123` — team key + number
|
|
73
|
+
- **UUID** (internal): `abc12345-...` — 32+ hex character UUID
|
|
74
|
+
|
|
75
|
+
Both formats are accepted by `get_issue`, `search_issues`, `get_comments`,
|
|
76
|
+
`list_attachments`, `update_issue`, `archive_issue`, `add_comment`.
|
|
77
|
+
|
|
78
|
+
## Descriptions and comments
|
|
79
|
+
|
|
80
|
+
Linear is **markdown-native**. Pass descriptions and comment bodies as plain
|
|
81
|
+
markdown strings — no ADF conversion needed:
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"team_id": "team-uuid",
|
|
86
|
+
"title": "Fix login redirect",
|
|
87
|
+
"description": "## Problem\n\nUsers are redirected to a blank page after login.\n\n## Steps to reproduce\n\n1. Log out\n2. Log in again"
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Priority values
|
|
92
|
+
|
|
93
|
+
Linear priorities map to integers:
|
|
94
|
+
|
|
95
|
+
| Value | Label |
|
|
96
|
+
|-------|-----------|
|
|
97
|
+
| 0 | No priority |
|
|
98
|
+
| 1 | Urgent |
|
|
99
|
+
| 2 | High |
|
|
100
|
+
| 3 | Medium |
|
|
101
|
+
| 4 | Low |
|
|
102
|
+
|
|
103
|
+
## Attachment linking
|
|
104
|
+
|
|
105
|
+
Linear does not host files via the public API. Use `attachment_link` to
|
|
106
|
+
associate an externally-hosted URL with an issue:
|
|
107
|
+
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"issue_id": "ENG-123",
|
|
111
|
+
"title": "Design mockup",
|
|
112
|
+
"url": "https://figma.com/file/abc",
|
|
113
|
+
"subtitle": "v3 iteration"
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Credentials
|
|
118
|
+
|
|
119
|
+
Set this environment variable before use:
|
|
120
|
+
|
|
121
|
+
| Variable | Description |
|
|
122
|
+
|-------------------|----------------------------------------------|
|
|
123
|
+
| `LINEAR_API_KEY` | Linear personal API key |
|
|
124
|
+
|
|
125
|
+
Obtain from Linear → Settings → API → Personal API keys.
|
|
126
|
+
|
|
127
|
+
The authorization header is `Authorization: <api_key>` (no `Bearer` prefix —
|
|
128
|
+
this is Linear-specific).
|
|
129
|
+
|
|
130
|
+
Alternatively, configure under `connectors.linear.options.api_key` in
|
|
131
|
+
`~/.connectors/config.yaml`.
|
|
132
|
+
|
|
133
|
+
## Safety
|
|
134
|
+
|
|
135
|
+
Read AND write surface; the policy gate gates every action before any network
|
|
136
|
+
call is made. WRITE escalates by default; DELETE also escalates by default;
|
|
137
|
+
PRIVILEGE is hard-denied. Never bypass the `linear-connector` binary to call the
|
|
138
|
+
Linear GraphQL API directly — the binary is the only sanctioned channel. Never
|
|
139
|
+
edit the operator's config to weaken a policy decision; report the decision
|
|
140
|
+
instead.
|
|
141
|
+
|
|
142
|
+
`archive_issue` and `delete_comment` are classified as `{kind: "write", aspects: ["delete"]}`.
|
|
143
|
+
Linear has no hard-delete via the public API; `archive_issue` invokes the
|
|
144
|
+
`issueArchive` mutation which sets `archivedAt`.
|
|
145
|
+
|
|
146
|
+
Default policy (operator may override under `connectors.linear.policy` in
|
|
147
|
+
`~/.connectors/config.yaml`):
|
|
148
|
+
|
|
149
|
+
```yaml
|
|
150
|
+
policy:
|
|
151
|
+
read: allow
|
|
152
|
+
write: escalate
|
|
153
|
+
delete: escalate
|
|
154
|
+
admin: deny
|
|
155
|
+
privilege: deny
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
The `admin` and `privilege` rules cannot be set to `allow` — the safety floor
|
|
159
|
+
is enforced at config load.
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
# notion-
|
|
1
|
+
# notion-connector-plugin
|
|
2
2
|
|
|
3
3
|
Claude Code plugin that wraps `narai-primitives/notion` as a read-only Notion skill and slash command.
|
|
4
4
|
|
|
5
|
-
- Skill `notion-
|
|
6
|
-
- Slash command `/notion-
|
|
7
|
-
- Binary `notion-
|
|
5
|
+
- Skill `notion-connector` — automatic invocation for Notion workspace questions.
|
|
6
|
+
- Slash command `/notion-connector <action> <params-json>`.
|
|
7
|
+
- Binary `notion-connector` — thin shim over the installed connector CLI.
|
|
8
8
|
|
|
9
9
|
## How install works
|
|
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
13
|
once. After that, `${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/dist/connectors/notion/cli.js`
|
|
14
|
-
exists and `bin/notion-
|
|
14
|
+
exists and `bin/notion-connector` exec's it.
|
|
15
15
|
|
|
16
16
|
## Credentials
|
|
17
17
|
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
4
|
if [ -z "${CLAUDE_PLUGIN_DATA:-}" ]; then
|
|
5
|
-
echo "notion-
|
|
5
|
+
echo "notion-connector: CLAUDE_PLUGIN_DATA is not set (run from inside Claude Code)" >&2
|
|
6
6
|
exit 2
|
|
7
7
|
fi
|
|
8
8
|
|
|
9
9
|
CLI="${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/dist/connectors/notion/cli.js"
|
|
10
10
|
|
|
11
11
|
if [ ! -f "$CLI" ]; then
|
|
12
|
-
echo "notion-
|
|
12
|
+
echo "notion-connector: connector CLI not found at $CLI" >&2
|
|
13
13
|
echo "Restart your Claude Code session to re-run the SessionStart install hook." >&2
|
|
14
14
|
exit 2
|
|
15
15
|
fi
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run a read-only Notion query via the notion-connector connector
|
|
3
|
+
argument-hint: "<action> <params-json>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Invoke the `notion-connector` skill with the user's $ARGUMENTS as the action name and params JSON. Return the connector's JSON envelope verbatim.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"hooks": [
|
|
6
|
+
{
|
|
7
|
+
"type": "command",
|
|
8
|
+
"command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (mkdir -p \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/\" && cd \"${CLAUDE_PLUGIN_DATA}\" && npm install --no-audit --no-fund) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\""
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"type": "command",
|
|
12
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/dispatcher.mjs\" session-start"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"PreToolUse": [
|
|
18
|
+
{
|
|
19
|
+
"matcher": "Bash",
|
|
20
|
+
"hooks": [
|
|
21
|
+
{
|
|
22
|
+
"type": "command",
|
|
23
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/dispatcher.mjs\" pre-tool-use"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"PostToolUse": [
|
|
29
|
+
{
|
|
30
|
+
"matcher": "Bash",
|
|
31
|
+
"hooks": [
|
|
32
|
+
{
|
|
33
|
+
"type": "command",
|
|
34
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/dispatcher.mjs\" post-tool-use"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"SessionEnd": [
|
|
40
|
+
{
|
|
41
|
+
"hooks": [
|
|
42
|
+
{
|
|
43
|
+
"type": "command",
|
|
44
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/plugin-hooks/dispatcher.mjs\" session-end"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: notion-connector
|
|
3
|
+
description: |
|
|
4
|
+
Use when the user asks about Notion workspace content or wants to create,
|
|
5
|
+
update, or archive Notion pages, blocks, and database entries — workspace
|
|
6
|
+
search, page retrieval, database schema, database queries, comments,
|
|
7
|
+
block-level attachments, or any write operation on pages and blocks.
|
|
8
|
+
Supports both read and write surfaces; every action passes the policy gate
|
|
9
|
+
before any network call is made: read actions succeed by default, write and
|
|
10
|
+
delete actions escalate by default, privilege actions are hard-denied.
|
|
11
|
+
context: fork
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Notion Connector
|
|
15
|
+
|
|
16
|
+
Answer the user's question by invoking the `notion-connector` binary exposed by
|
|
17
|
+
this plugin. It delegates to `narai-primitives/notion`, which enforces the
|
|
18
|
+
policy gate before any Notion Public API call is made.
|
|
19
|
+
|
|
20
|
+
## Invocation
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
notion-connector --action <action> --params '<json>'
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Return the connector's JSON envelope verbatim.
|
|
27
|
+
|
|
28
|
+
## Supported actions
|
|
29
|
+
|
|
30
|
+
| Action | Classification | Required params | Optional params |
|
|
31
|
+
|--------------------------|----------------|----------------------------------------------------------------------------|-------------------------------------------------------------------|
|
|
32
|
+
| `search` | read | `query` | `filter_type` (`page`/`database`), `max_results` (default 25, max 100) |
|
|
33
|
+
| `get_page` | read | `page_id` (UUID) | |
|
|
34
|
+
| `get_database` | read | `database_id` (UUID) | |
|
|
35
|
+
| `query_database` | read | `database_id` | `filter` (Notion filter object), `max_results` (default 25) |
|
|
36
|
+
| `list_attachments` | read | `page_id` | |
|
|
37
|
+
| `get_attachment` | read | `page_id`, `block_id` | |
|
|
38
|
+
| `get_comments` | read | `page_id` | |
|
|
39
|
+
| `create_page` | write | `parent` (object), `properties` | `children` (children input) |
|
|
40
|
+
| `update_page` | write | `page_id` | `properties`, `archived` |
|
|
41
|
+
| `archive_page` | write/delete | `page_id` | |
|
|
42
|
+
| `append_blocks` | write | `block_id`, `children` (children input) | |
|
|
43
|
+
| `update_block` | write | `block_id`, `payload` (block update object) | |
|
|
44
|
+
| `delete_block` | write/delete | `block_id` | |
|
|
45
|
+
| `create_database_entry` | write | `database_id`, `properties` | `children` (children input) |
|
|
46
|
+
| `update_database_entry` | write | `page_id`, `properties` | |
|
|
47
|
+
|
|
48
|
+
Note: Notion has no hard-delete via the public API. `archive_page` sets
|
|
49
|
+
`archived: true`; `delete_block` archives the block via `DELETE
|
|
50
|
+
/v1/blocks/{id}`.
|
|
51
|
+
|
|
52
|
+
## Envelope shape
|
|
53
|
+
|
|
54
|
+
**success**
|
|
55
|
+
```json
|
|
56
|
+
{"status": "success", "action": "create_page", "data": {"id": "1a2b3c4d-...", "url": "https://notion.so/My-Page-1a2b3c4d", "created_time": "2025-05-09T12:00:00.000Z"}}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**escalate** (default for write/delete actions)
|
|
60
|
+
```json
|
|
61
|
+
{"status": "escalate", "action": "create_page", "reason": "WRITE statements require approval"}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**denied** (default for privilege actions, or operator-set policy)
|
|
65
|
+
```json
|
|
66
|
+
{"status": "denied", "action": "archive_page", "reason": "DELETE statements are not allowed"}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**error**
|
|
70
|
+
```json
|
|
71
|
+
{"status": "error", "action": "create_page", "error_code": "VALIDATION_ERROR", "message": "Invalid page_id — expected UUID format", "retriable": false}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Children input (blocks / markdown)
|
|
75
|
+
|
|
76
|
+
Actions that accept page or block content (`create_page`, `append_blocks`,
|
|
77
|
+
`create_database_entry`) use a discriminated union for the `children` field:
|
|
78
|
+
|
|
79
|
+
**Pre-built Notion block objects**:
|
|
80
|
+
```json
|
|
81
|
+
{"children": {"format": "blocks", "value": [{"object": "block", "type": "paragraph", "paragraph": {"rich_text": [{"type": "text", "text": {"content": "Hello"}}]}}]}}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Markdown** (auto-converted to Notion blocks via markdownToBlocks):
|
|
85
|
+
```json
|
|
86
|
+
{"children": {"format": "markdown", "value": "# Title\n\n- one\n- two"}}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Markdown conversion supports: paragraphs, headings (h1–h3), bullet lists,
|
|
90
|
+
numbered lists, code fences with language, and block quotes. Inline marks
|
|
91
|
+
(bold, italic, links) are not converted in v1 — use the `blocks` format for
|
|
92
|
+
rich inline formatting.
|
|
93
|
+
|
|
94
|
+
## Parent object for `create_page`
|
|
95
|
+
|
|
96
|
+
Pass one of these parent shapes:
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{"parent": {"type": "page_id", "page_id": "1a2b3c4d-..."}}
|
|
100
|
+
{"parent": {"type": "database_id", "database_id": "1a2b3c4d-..."}}
|
|
101
|
+
{"parent": {"type": "workspace", "workspace": true}}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Credentials
|
|
105
|
+
|
|
106
|
+
Set this environment variable before use:
|
|
107
|
+
|
|
108
|
+
| Variable | Description |
|
|
109
|
+
|----------------|------------------------------------------------------------------|
|
|
110
|
+
| `NOTION_TOKEN` | Notion internal integration secret |
|
|
111
|
+
|
|
112
|
+
The integration must be invited to the pages and databases you want to
|
|
113
|
+
access. Alternatively, register a credential provider via
|
|
114
|
+
`narai-primitives/credentials`. Per-workspace credentials can be configured
|
|
115
|
+
under `connectors.notion.options.workspaces.<alias>` in
|
|
116
|
+
`~/.connectors/config.yaml`.
|
|
117
|
+
|
|
118
|
+
## Safety
|
|
119
|
+
|
|
120
|
+
Read AND write surface; the policy gate gates every action before any
|
|
121
|
+
network call is made. WRITE escalates by default; DELETE also escalates by
|
|
122
|
+
default; PRIVILEGE is hard-denied. Never bypass the `notion-connector` binary to
|
|
123
|
+
call the Notion API directly — the binary is the only sanctioned channel.
|
|
124
|
+
Never edit the operator's config to weaken a policy decision; report the
|
|
125
|
+
decision instead.
|
|
126
|
+
|
|
127
|
+
Default policy (operator may override under `connectors.notion.policy` in
|
|
128
|
+
`~/.connectors/config.yaml`; per-workspace override under
|
|
129
|
+
`connectors.notion.options.workspaces.<alias>.policy`):
|
|
130
|
+
|
|
131
|
+
```yaml
|
|
132
|
+
policy:
|
|
133
|
+
read: allow
|
|
134
|
+
write: escalate
|
|
135
|
+
delete: escalate
|
|
136
|
+
admin: deny
|
|
137
|
+
privilege: deny
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
The `admin` and `privilege` rules cannot be set to `allow` — the safety
|
|
141
|
+
floor is enforced at config load.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Error class bridging the ConfluenceClient's `{ok: false, code, ...}` result
|
|
3
|
-
* shape into the handler-throws-an-Error contract that `createConnector`
|
|
4
|
-
* expects. The factory's `mapError` hook unwraps these back into a proper
|
|
5
|
-
* error envelope with the canonical toolkit error codes.
|
|
6
|
-
*/
|
|
7
|
-
export declare class ConfluenceError extends Error {
|
|
8
|
-
readonly code: string;
|
|
9
|
-
readonly retriable: boolean;
|
|
10
|
-
readonly httpStatus: number | undefined;
|
|
11
|
-
constructor(code: string, message: string, retriable: boolean, httpStatus?: number);
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=confluence_error.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"confluence_error.d.ts","sourceRoot":"","sources":["../../../../src/connectors/confluence/lib/confluence_error.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;gBAGtC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,OAAO,EAClB,UAAU,CAAC,EAAE,MAAM;CAQtB"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Error class bridging the ConfluenceClient's `{ok: false, code, ...}` result
|
|
3
|
-
* shape into the handler-throws-an-Error contract that `createConnector`
|
|
4
|
-
* expects. The factory's `mapError` hook unwraps these back into a proper
|
|
5
|
-
* error envelope with the canonical toolkit error codes.
|
|
6
|
-
*/
|
|
7
|
-
export class ConfluenceError extends Error {
|
|
8
|
-
code;
|
|
9
|
-
retriable;
|
|
10
|
-
httpStatus;
|
|
11
|
-
constructor(code, message, retriable, httpStatus) {
|
|
12
|
-
super(message);
|
|
13
|
-
this.name = "ConfluenceError";
|
|
14
|
-
this.code = code;
|
|
15
|
-
this.retriable = retriable;
|
|
16
|
-
this.httpStatus = httpStatus;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=confluence_error.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"confluence_error.js","sourceRoot":"","sources":["../../../../src/connectors/confluence/lib/confluence_error.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAC/B,IAAI,CAAS;IACb,SAAS,CAAU;IACnB,UAAU,CAAqB;IAExC,YACE,IAAY,EACZ,OAAe,EACf,SAAkB,EAClB,UAAmB;QAEnB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bridges GithubClient's `{ok: false, code, ...}` result shape to the
|
|
3
|
-
* handler-throws-an-Error contract the factory expects.
|
|
4
|
-
*/
|
|
5
|
-
export declare class GithubError extends Error {
|
|
6
|
-
readonly code: string;
|
|
7
|
-
readonly retriable: boolean;
|
|
8
|
-
readonly httpStatus: number | undefined;
|
|
9
|
-
constructor(code: string, message: string, retriable: boolean, httpStatus?: number);
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=github_error.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"github_error.d.ts","sourceRoot":"","sources":["../../../../src/connectors/github/lib/github_error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,WAAY,SAAQ,KAAK;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;gBAGtC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,OAAO,EAClB,UAAU,CAAC,EAAE,MAAM;CAQtB"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bridges GithubClient's `{ok: false, code, ...}` result shape to the
|
|
3
|
-
* handler-throws-an-Error contract the factory expects.
|
|
4
|
-
*/
|
|
5
|
-
export class GithubError extends Error {
|
|
6
|
-
code;
|
|
7
|
-
retriable;
|
|
8
|
-
httpStatus;
|
|
9
|
-
constructor(code, message, retriable, httpStatus) {
|
|
10
|
-
super(message);
|
|
11
|
-
this.name = "GithubError";
|
|
12
|
-
this.code = code;
|
|
13
|
-
this.retriable = retriable;
|
|
14
|
-
this.httpStatus = httpStatus;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=github_error.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"github_error.js","sourceRoot":"","sources":["../../../../src/connectors/github/lib/github_error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,OAAO,WAAY,SAAQ,KAAK;IAC3B,IAAI,CAAS;IACb,SAAS,CAAU;IACnB,UAAU,CAAqB;IAExC,YACE,IAAY,EACZ,OAAe,EACf,SAAkB,EAClB,UAAmB;QAEnB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bridges JiraClient's `{ok: false, code, ...}` result shape to the
|
|
3
|
-
* handler-throws-an-Error contract the factory expects.
|
|
4
|
-
*/
|
|
5
|
-
export declare class JiraError extends Error {
|
|
6
|
-
readonly code: string;
|
|
7
|
-
readonly retriable: boolean;
|
|
8
|
-
readonly httpStatus: number | undefined;
|
|
9
|
-
constructor(code: string, message: string, retriable: boolean, httpStatus?: number);
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=jira_error.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jira_error.d.ts","sourceRoot":"","sources":["../../../../src/connectors/jira/lib/jira_error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,SAAU,SAAQ,KAAK;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;gBAGtC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,OAAO,EAClB,UAAU,CAAC,EAAE,MAAM;CAQtB"}
|