narai-primitives 2.1.3 → 2.3.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 +20 -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 +142 -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 +77 -0
- package/dist/connectors/db/lib/grant-store.d.ts.map +1 -0
- package/dist/connectors/db/lib/grant-store.js +158 -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 +298 -74
- 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 +639 -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 +45 -0
- package/plugins/db-connector/gates.strict-bare.json +13 -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 +67 -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/gates.json +18 -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/gates.json +12 -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,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: github-connector
|
|
3
|
+
description: |
|
|
4
|
+
Use when the user asks about GitHub data or wants to act on GitHub —
|
|
5
|
+
repository info, code search, issue/PR/release/workflow inspection,
|
|
6
|
+
or any write that creates, updates, closes, or deletes a PR, issue,
|
|
7
|
+
comment, or release; merging PRs (admin); and managing Actions
|
|
8
|
+
workflow runs (rerun / cancel / dispatch).
|
|
9
|
+
context: fork
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# GitHub Connector
|
|
13
|
+
|
|
14
|
+
Answer the user's question by invoking the `github-connector` binary
|
|
15
|
+
exposed by this plugin. It delegates to `narai-primitives/github`
|
|
16
|
+
via GitHub's REST v3 + GraphQL APIs.
|
|
17
|
+
|
|
18
|
+
## Invocation
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
github-connector --action <action> --params '<json>'
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Return the connector's JSON envelope verbatim.
|
|
25
|
+
|
|
26
|
+
## Read actions
|
|
27
|
+
|
|
28
|
+
| Action | Required params |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `repo_info` | `owner`, `repo` |
|
|
31
|
+
| `search_code` | `owner`, `repo`, `query`, optional `max_results` |
|
|
32
|
+
| `get_issues` | `owner`, `repo`, optional `state`, `labels`, `max_results` |
|
|
33
|
+
| `get_pulls` | `owner`, `repo`, optional `state`, `max_results` |
|
|
34
|
+
| `get_pull_request` | `owner`, `repo`, `pull_number` |
|
|
35
|
+
| `get_issue` | `owner`, `repo`, `issue_number` |
|
|
36
|
+
| `get_file` | `owner`, `repo`, `path`, optional `ref` |
|
|
37
|
+
| `get_issue_comments` | `owner`, `repo`, `issue_number` |
|
|
38
|
+
| `get_pr_review_comments` | `owner`, `repo`, `pr_number` |
|
|
39
|
+
| `list_release_assets` | `owner`, `repo`, `tag` |
|
|
40
|
+
| `get_release_asset` | `owner`, `repo`, `asset_id` |
|
|
41
|
+
| `list_workflow_runs` | `owner`, `repo`, optional `branch`/`event`/`status`/`head_sha` |
|
|
42
|
+
| `get_workflow_run` | `owner`, `repo`, `run_id` |
|
|
43
|
+
| `list_workflow_run_jobs` | `owner`, `repo`, `run_id` |
|
|
44
|
+
| `get_workflow_run_logs` | `owner`, `repo`, `run_id` — returns redirect URL, not the ZIP body |
|
|
45
|
+
|
|
46
|
+
## Write actions (escalate by default)
|
|
47
|
+
|
|
48
|
+
| Action | Required params |
|
|
49
|
+
|---|---|
|
|
50
|
+
| `create_pull_request` | `owner`, `repo`, `title`, `head`, `base`, optional `body`/`draft` |
|
|
51
|
+
| `update_pull_request` | `owner`, `repo`, `pull_number`, optional `title`/`body`/`base`/`state=open` |
|
|
52
|
+
| `close_pull_request` | `owner`, `repo`, `pull_number` |
|
|
53
|
+
| `create_issue` | `owner`, `repo`, `title`, optional `body`/`labels`/`assignees` |
|
|
54
|
+
| `update_issue` | `owner`, `repo`, `issue_number`, optional `title`/`body`/`labels`/`state=open` |
|
|
55
|
+
| `close_issue` | `owner`, `repo`, `issue_number`, optional `state_reason` |
|
|
56
|
+
| `add_issue_comment` | `owner`, `repo`, `issue_number`, `body` |
|
|
57
|
+
| `update_issue_comment` | `owner`, `repo`, `comment_id`, `body` |
|
|
58
|
+
| `delete_issue_comment` | `owner`, `repo`, `comment_id` |
|
|
59
|
+
| `add_pr_review_comment` | `owner`, `repo`, `pr_number`, `body`, `commit_id`, `path`, `line` |
|
|
60
|
+
| `update_pr_review_comment` | `owner`, `repo`, `comment_id`, `body` |
|
|
61
|
+
| `delete_pr_review_comment` | `owner`, `repo`, `comment_id` |
|
|
62
|
+
| `create_release` | `owner`, `repo`, `tag_name`, optional `name`/`body`/`draft`/`prerelease` |
|
|
63
|
+
| `update_release` | `owner`, `repo`, `release_id`, optional fields |
|
|
64
|
+
| `delete_release` | `owner`, `repo`, `release_id` |
|
|
65
|
+
| `delete_release_asset` | `owner`, `repo`, `asset_id` |
|
|
66
|
+
| `rerun_workflow_run` | `owner`, `repo`, `run_id` |
|
|
67
|
+
| `rerun_failed_jobs` | `owner`, `repo`, `run_id` |
|
|
68
|
+
| `cancel_workflow_run` | `owner`, `repo`, `run_id` |
|
|
69
|
+
| `trigger_workflow_dispatch` | `owner`, `repo`, `workflow_id_or_filename`, `ref`, optional `inputs` |
|
|
70
|
+
|
|
71
|
+
## Admin actions (denied by default — operator must opt in)
|
|
72
|
+
|
|
73
|
+
| Action | Required params |
|
|
74
|
+
|---|---|
|
|
75
|
+
| `merge_pull_request` | `owner`, `repo`, `pull_number`, `merge_method` ∈ {merge, squash, rebase} |
|
|
76
|
+
|
|
77
|
+
To enable `merge_pull_request`, set `policy.admin: escalate` in
|
|
78
|
+
`~/.github-agent/config.yaml` (or the repo-level overlay).
|
|
79
|
+
|
|
80
|
+
## Credentials
|
|
81
|
+
|
|
82
|
+
Set `GITHUB_TOKEN` to a PAT with:
|
|
83
|
+
- `repo` — read + write on code, issues, PRs, comments, releases
|
|
84
|
+
- `workflow` — required for `rerun_*`, `cancel_workflow_run`, and
|
|
85
|
+
`trigger_workflow_dispatch`
|
|
86
|
+
|
|
87
|
+
## Config
|
|
88
|
+
|
|
89
|
+
`~/.github-agent/config.yaml` (user-level) merges with
|
|
90
|
+
`<cwd>/.github-agent/config.yaml` (repo overlay). Beyond the toolkit's
|
|
91
|
+
standard `policy` and `approval_mode` keys, the connector reads:
|
|
92
|
+
|
|
93
|
+
```yaml
|
|
94
|
+
github:
|
|
95
|
+
require_draft_pr: true # forces every create_pull_request to draft=true
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
This can be overridden at runtime by `GITHUB_REQUIRE_DRAFT_PR=1` (or 0).
|
|
99
|
+
|
|
100
|
+
## Safety
|
|
101
|
+
|
|
102
|
+
Every write call goes through the toolkit's policy gate. With no
|
|
103
|
+
operator config, writes escalate (asking once), deletes escalate with a
|
|
104
|
+
`delete` aspect for audit, and admin actions are denied until the
|
|
105
|
+
operator explicitly opts in via YAML. The `delete` aspect is floored —
|
|
106
|
+
operator config cannot downgrade it to `success`.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gitlab-connector-plugin",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Read + write GitLab connector — projects, issues, merge requests, notes, releases, and CI pipelines. Policy-gated. Built on narai-primitives. Self-hosted GitLab supported via GITLAB_HOST.",
|
|
5
|
+
"author": "narailabs"
|
|
6
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# gitlab-connector plugin
|
|
2
|
+
|
|
3
|
+
Read and write GitLab data — project info, code search, issues,
|
|
4
|
+
merge requests, notes, releases, and CI pipelines — through the
|
|
5
|
+
narai-primitives connector toolkit's policy gate.
|
|
6
|
+
|
|
7
|
+
## Credentials
|
|
8
|
+
|
|
9
|
+
Set `GITLAB_TOKEN` to a PAT with `api` scope.
|
|
10
|
+
|
|
11
|
+
| Scope | Why |
|
|
12
|
+
|---|---|
|
|
13
|
+
| `api` | Full read + write access to projects, issues, MRs, notes, releases, and pipelines |
|
|
14
|
+
|
|
15
|
+
Tokens without `api` scope will see `AUTH_ERROR` with a scope hint
|
|
16
|
+
when invoking any endpoint.
|
|
17
|
+
|
|
18
|
+
Optional environment variables:
|
|
19
|
+
|
|
20
|
+
| Variable | Default | Purpose |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| `GITLAB_HOST` | `https://gitlab.com` | Self-hosted GitLab base URL |
|
|
23
|
+
| `GITLAB_NAMESPACE` | (none) | Default group/user namespace; omit when passing `namespace` explicitly per action |
|
|
24
|
+
|
|
25
|
+
## Config
|
|
26
|
+
|
|
27
|
+
Place YAML at `~/.gitlab-agent/config.yaml` (user-level) or
|
|
28
|
+
`<cwd>/.gitlab-agent/config.yaml` (repo overlay). Repo overlay wins on
|
|
29
|
+
collisions.
|
|
30
|
+
|
|
31
|
+
```yaml
|
|
32
|
+
policy:
|
|
33
|
+
read: success
|
|
34
|
+
write: escalate
|
|
35
|
+
admin: escalate # enables merge_merge_request
|
|
36
|
+
aspects:
|
|
37
|
+
delete: escalate # cannot be set to success — floored
|
|
38
|
+
approval_mode: confirm_once
|
|
39
|
+
gitlab:
|
|
40
|
+
require_draft_mr: true # forces every create_merge_request to draft=true
|
|
41
|
+
host: https://gitlab.example.com # self-hosted GitLab base URL (overrides GITLAB_HOST)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Runtime override: `GITLAB_REQUIRE_DRAFT_MR=1` forces drafts even when
|
|
45
|
+
the YAML says false; `GITLAB_REQUIRE_DRAFT_MR=0` forces non-drafts.
|
|
46
|
+
Invalid values throw at startup.
|
|
47
|
+
|
|
48
|
+
## Action surface
|
|
49
|
+
|
|
50
|
+
33 actions across reads (14), writes (18), and admin (1). See
|
|
51
|
+
`skills/gitlab-connector/SKILL.md` for the full table.
|
|
52
|
+
|
|
53
|
+
## Self-hosted GitLab
|
|
54
|
+
|
|
55
|
+
Self-hosted GitLab >= 12.x (Bearer-auth PAT support) is supported. Set
|
|
56
|
+
`GITLAB_HOST` or `gitlab.host` in config to your instance base URL,
|
|
57
|
+
e.g. `https://gitlab.example.com`. The connector appends `/api/v4/` to
|
|
58
|
+
all requests.
|
|
59
|
+
|
|
60
|
+
## License
|
|
61
|
+
|
|
62
|
+
See repo root.
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
4
|
if [ -z "${CLAUDE_PLUGIN_DATA:-}" ]; then
|
|
5
|
-
echo "
|
|
5
|
+
echo "gitlab-connector: CLAUDE_PLUGIN_DATA is not set (run from inside Claude Code)" >&2
|
|
6
6
|
exit 2
|
|
7
7
|
fi
|
|
8
8
|
|
|
9
|
-
CLI="${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/dist/connectors/
|
|
9
|
+
CLI="${CLAUDE_PLUGIN_DATA}/node_modules/narai-primitives/dist/connectors/gitlab/cli.js"
|
|
10
10
|
|
|
11
11
|
if [ ! -f "$CLI" ]; then
|
|
12
|
-
echo "
|
|
12
|
+
echo "gitlab-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 GitLab action via the gitlab-connector connector
|
|
3
|
+
argument-hint: "<action> <params-json>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Invoke the `gitlab-connector` skill with the user's $ARGUMENTS as the action name and params JSON. Return the connector's JSON envelope verbatim.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"name": "gitlab",
|
|
4
|
+
"rules": [
|
|
5
|
+
{
|
|
6
|
+
"name": "mr_create_without_draft",
|
|
7
|
+
"decision": "deny",
|
|
8
|
+
"reason": "Creating a GitLab merge request without a draft marker is denied by this example policy. Add --draft (or -draft) so the MR opens as a draft, or customize this rule. Note: the absence-of-flag check uses a negative lookahead and only inspects the same command segment.",
|
|
9
|
+
"pattern": "^glab\\s+mr\\s+create\\b(?!.*\\s-?-draft\\b)|\\bcurl\\b(?!.*\\bdraft\\b).*(\\s-X\\s+POST\\b|\\s--request\\s+POST\\b).*\\bmerge_requests\\b|\\bcurl\\b(?!.*\\bdraft\\b).*\\bmerge_requests\\b.*(\\s-X\\s+POST\\b|\\s--request\\s+POST\\b)"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "gitlab_state_changing_http",
|
|
13
|
+
"decision": "ask",
|
|
14
|
+
"reason": "This looks like a state-changing HTTP request (POST/PUT/DELETE/PATCH) to a GitLab host. Confirm before mutating remote data. This is a conservative example preset; customize the host and verbs in your own gates.json.",
|
|
15
|
+
"pattern": "\\b(curl|http|https|wget)\\b.*(\\s-X\\s+(POST|PUT|DELETE|PATCH)\\b|\\s--request\\s+(POST|PUT|DELETE|PATCH)\\b).*\\bgitlab\\b|\\b(curl|http|https|wget)\\b.*\\bgitlab\\b.*(\\s-X\\s+(POST|PUT|DELETE|PATCH)\\b|\\s--request\\s+(POST|PUT|DELETE|PATCH)\\b)"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -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,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gitlab-connector
|
|
3
|
+
description: |
|
|
4
|
+
Use when the user asks about GitLab data or wants to act on GitLab —
|
|
5
|
+
project info, code search, issue/MR/release/pipeline inspection,
|
|
6
|
+
or any write that creates, updates, closes, or deletes an MR, issue,
|
|
7
|
+
note, or release; merging MRs (admin); and managing CI pipeline runs
|
|
8
|
+
(retry / cancel / trigger / play_job).
|
|
9
|
+
context: fork
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# GitLab Connector
|
|
13
|
+
|
|
14
|
+
Answer the user's question by invoking the `gitlab-connector` binary
|
|
15
|
+
exposed by this plugin. It delegates to `narai-primitives/gitlab`
|
|
16
|
+
via GitLab's REST API v4.
|
|
17
|
+
|
|
18
|
+
## Invocation
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
gitlab-connector --action <action> --params '<json>'
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Return the connector's JSON envelope verbatim.
|
|
25
|
+
|
|
26
|
+
## Read actions
|
|
27
|
+
|
|
28
|
+
| Action | Required params |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `project_info` | `namespace`, `project` |
|
|
31
|
+
| `search_code` | `namespace`, `project`, `query`, optional `max_results` |
|
|
32
|
+
| `get_issues` | `namespace`, `project`, optional `state`, `max_results` |
|
|
33
|
+
| `get_issue` | `namespace`, `project`, `iid` |
|
|
34
|
+
| `get_merge_requests` | `namespace`, `project`, optional `state`, `max_results` |
|
|
35
|
+
| `get_merge_request` | `namespace`, `project`, `iid` |
|
|
36
|
+
| `get_file` | `namespace`, `project`, `path`, optional `ref` |
|
|
37
|
+
| `get_notes` | `namespace`, `project`, `noteable_type` ∈ {issue, merge_request}, `noteable_iid` |
|
|
38
|
+
| `list_release_links` | `namespace`, `project`, `tag` |
|
|
39
|
+
| `get_release_link` | `namespace`, `project`, `tag`, `link_id` |
|
|
40
|
+
| `list_pipelines` | `namespace`, `project`, optional `ref`, `status`, `max_results` |
|
|
41
|
+
| `get_pipeline` | `namespace`, `project`, `pipeline_id` |
|
|
42
|
+
| `list_pipeline_jobs` | `namespace`, `project`, `pipeline_id` |
|
|
43
|
+
| `get_job_logs` | `namespace`, `project`, `job_id` |
|
|
44
|
+
|
|
45
|
+
## Write actions (escalate by default)
|
|
46
|
+
|
|
47
|
+
| Action | Required params |
|
|
48
|
+
|---|---|
|
|
49
|
+
| `create_merge_request` | `namespace`, `project`, `source_branch`, `target_branch`, `title`, optional `description`/`draft`/`assignee_ids`/`reviewer_ids`/`labels`/`milestone_id`/`remove_source_branch`/`squash` |
|
|
50
|
+
| `update_merge_request` | `namespace`, `project`, `mr_iid`, optional `title`/`description`/`target_branch`/`state_event=reopen`/`assignee_ids`/`reviewer_ids`/`labels`/`milestone_id`/`remove_source_branch`/`squash` |
|
|
51
|
+
| `close_merge_request` | `namespace`, `project`, `mr_iid` |
|
|
52
|
+
| `create_issue` | `namespace`, `project`, `title`, optional `description`/`assignee_ids`/`labels`/`milestone_id`/`due_date` |
|
|
53
|
+
| `update_issue` | `namespace`, `project`, `iid`, optional `title`/`description`/`assignee_ids`/`labels`/`milestone_id`/`due_date`/`state_event=reopen` |
|
|
54
|
+
| `close_issue` | `namespace`, `project`, `iid` |
|
|
55
|
+
| `add_note` | `namespace`, `project`, `noteable_type`, `noteable_iid`, `body`, optional `position` (MR diff comments only) |
|
|
56
|
+
| `update_note` | `namespace`, `project`, `noteable_type`, `noteable_iid`, `note_id`, `body` |
|
|
57
|
+
| `delete_note` | `namespace`, `project`, `noteable_type`, `noteable_iid`, `note_id` |
|
|
58
|
+
| `create_release` | `namespace`, `project`, `tag_name`, `name`, optional `description`/`ref`/`assets` |
|
|
59
|
+
| `update_release` | `namespace`, `project`, `tag_name`, optional `name`/`description`/`milestones` |
|
|
60
|
+
| `delete_release` | `namespace`, `project`, `tag_name` |
|
|
61
|
+
| `delete_release_link` | `namespace`, `project`, `tag_name`, `link_id` |
|
|
62
|
+
| `retry_pipeline` | `namespace`, `project`, `pipeline_id` |
|
|
63
|
+
| `retry_failed_jobs` | `namespace`, `project`, `pipeline_id` |
|
|
64
|
+
| `cancel_pipeline` | `namespace`, `project`, `pipeline_id` |
|
|
65
|
+
| `trigger_pipeline` | `namespace`, `project`, `token`, `ref`, optional `variables` |
|
|
66
|
+
| `play_job` | `namespace`, `project`, `job_id`, optional `variables` |
|
|
67
|
+
|
|
68
|
+
## Admin actions (denied by default — operator must opt in)
|
|
69
|
+
|
|
70
|
+
| Action | Required params |
|
|
71
|
+
|---|---|
|
|
72
|
+
| `merge_merge_request` | `namespace`, `project`, `mr_iid`, optional `merge_commit_message`/`squash_commit_message`/`should_remove_source_branch`/`merge_when_pipeline_succeeds`/`sha`/`squash` |
|
|
73
|
+
|
|
74
|
+
To enable `merge_merge_request`, set `policy.admin: escalate` in
|
|
75
|
+
`~/.gitlab-agent/config.yaml` (or the repo-level overlay).
|
|
76
|
+
|
|
77
|
+
## Credentials
|
|
78
|
+
|
|
79
|
+
Set `GITLAB_TOKEN` to a PAT with:
|
|
80
|
+
- `api` scope — required for all read + write + admin actions
|
|
81
|
+
|
|
82
|
+
Optional:
|
|
83
|
+
- `GITLAB_HOST` — self-hosted GitLab base URL (default: `https://gitlab.com`)
|
|
84
|
+
- `GITLAB_NAMESPACE` — default group/user namespace; omit when passing `namespace` explicitly
|
|
85
|
+
|
|
86
|
+
## Config
|
|
87
|
+
|
|
88
|
+
`~/.gitlab-agent/config.yaml` (user-level) merges with
|
|
89
|
+
`<cwd>/.gitlab-agent/config.yaml` (repo overlay). Beyond the toolkit's
|
|
90
|
+
standard `policy` and `approval_mode` keys, the connector reads:
|
|
91
|
+
|
|
92
|
+
```yaml
|
|
93
|
+
policy:
|
|
94
|
+
read: success
|
|
95
|
+
write: escalate
|
|
96
|
+
admin: escalate # enables merge_merge_request
|
|
97
|
+
aspects:
|
|
98
|
+
delete: escalate # cannot be set to success — floored
|
|
99
|
+
approval_mode: confirm_once
|
|
100
|
+
gitlab:
|
|
101
|
+
require_draft_mr: true # forces every create_merge_request to draft=true
|
|
102
|
+
host: https://gitlab.example.com # self-hosted GitLab base URL
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Runtime override: `GITLAB_REQUIRE_DRAFT_MR=1` forces drafts even when
|
|
106
|
+
the YAML says false; `GITLAB_REQUIRE_DRAFT_MR=0` forces non-drafts.
|
|
107
|
+
Invalid values throw at startup.
|
|
108
|
+
|
|
109
|
+
## Safety
|
|
110
|
+
|
|
111
|
+
Every write call goes through the toolkit's policy gate. With no
|
|
112
|
+
operator config, writes escalate (asking once), deletes escalate with a
|
|
113
|
+
`delete` aspect for audit, and admin actions are denied until the
|
|
114
|
+
operator explicitly opts in via YAML. The `delete` aspect is floored —
|
|
115
|
+
operator config cannot downgrade it to `success`.
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
4
|
if [ -z "${CLAUDE_PLUGIN_DATA:-}" ]; then
|
|
5
|
-
echo "jira-
|
|
5
|
+
echo "jira-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/jira/cli.js"
|
|
10
10
|
|
|
11
11
|
if [ ! -f "$CLI" ]; then
|
|
12
|
-
echo "jira-
|
|
12
|
+
echo "jira-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 Jira query via the jira-connector connector
|
|
3
|
+
argument-hint: "<action> <params-json>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Invoke the `jira-connector` skill with the user's $ARGUMENTS as the action name and params JSON. Return the connector's JSON envelope verbatim.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"name": "jira",
|
|
4
|
+
"rules": [
|
|
5
|
+
{
|
|
6
|
+
"name": "jira_state_changing_http",
|
|
7
|
+
"decision": "ask",
|
|
8
|
+
"reason": "This looks like a state-changing HTTP request (POST/PUT/DELETE/PATCH) to a Jira/Atlassian host. Confirm before mutating remote issue data. This is a conservative example preset; customize the host and verbs in your own gates.json.",
|
|
9
|
+
"pattern": "\\b(curl|http|https|wget)\\b.*(\\s-X\\s+(POST|PUT|DELETE|PATCH)\\b|\\s--request\\s+(POST|PUT|DELETE|PATCH)\\b).*\\b(atlassian\\.net|jira)\\b|\\b(curl|http|https|wget)\\b.*\\b(atlassian\\.net|jira)\\b.*(\\s-X\\s+(POST|PUT|DELETE|PATCH)\\b|\\s--request\\s+(POST|PUT|DELETE|PATCH)\\b)"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
@@ -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
|
+
}
|