narai-primitives 2.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +64 -0
- package/dist/config/bootstrap.d.ts +28 -0
- package/dist/config/bootstrap.d.ts.map +1 -0
- package/dist/config/bootstrap.js +80 -0
- package/dist/config/bootstrap.js.map +1 -0
- package/dist/config/index.d.ts +13 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +12 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/load.d.ts +37 -0
- package/dist/config/load.d.ts.map +1 -0
- package/dist/config/load.js +99 -0
- package/dist/config/load.js.map +1 -0
- package/dist/config/resolve.d.ts +23 -0
- package/dist/config/resolve.d.ts.map +1 -0
- package/dist/config/resolve.js +198 -0
- package/dist/config/resolve.js.map +1 -0
- package/dist/config/secrets.d.ts +20 -0
- package/dist/config/secrets.d.ts.map +1 -0
- package/dist/config/secrets.js +43 -0
- package/dist/config/secrets.js.map +1 -0
- package/dist/config/types.d.ts +104 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +11 -0
- package/dist/config/types.js.map +1 -0
- package/dist/connectors/aws/cli.d.ts +3 -0
- package/dist/connectors/aws/cli.d.ts.map +1 -0
- package/dist/connectors/aws/cli.js +27 -0
- package/dist/connectors/aws/cli.js.map +1 -0
- package/dist/connectors/aws/index.d.ts +27 -0
- package/dist/connectors/aws/index.d.ts.map +1 -0
- package/dist/connectors/aws/index.js +281 -0
- package/dist/connectors/aws/index.js.map +1 -0
- package/dist/connectors/aws/lib/aws_client.d.ts +140 -0
- package/dist/connectors/aws/lib/aws_client.d.ts.map +1 -0
- package/dist/connectors/aws/lib/aws_client.js +196 -0
- package/dist/connectors/aws/lib/aws_client.js.map +1 -0
- package/dist/connectors/aws/lib/aws_error.d.ts +10 -0
- package/dist/connectors/aws/lib/aws_error.d.ts.map +1 -0
- package/dist/connectors/aws/lib/aws_error.js +15 -0
- package/dist/connectors/aws/lib/aws_error.js.map +1 -0
- package/dist/connectors/confluence/cli.d.ts +3 -0
- package/dist/connectors/confluence/cli.d.ts.map +1 -0
- package/dist/connectors/confluence/cli.js +24 -0
- package/dist/connectors/confluence/cli.js.map +1 -0
- package/dist/connectors/confluence/index.d.ts +15 -0
- package/dist/connectors/confluence/index.d.ts.map +1 -0
- package/dist/connectors/confluence/index.js +295 -0
- package/dist/connectors/confluence/index.js.map +1 -0
- package/dist/connectors/confluence/lib/confluence_client.d.ts +135 -0
- package/dist/connectors/confluence/lib/confluence_client.d.ts.map +1 -0
- package/dist/connectors/confluence/lib/confluence_client.js +329 -0
- package/dist/connectors/confluence/lib/confluence_client.js.map +1 -0
- package/dist/connectors/confluence/lib/confluence_error.d.ts +13 -0
- package/dist/connectors/confluence/lib/confluence_error.d.ts.map +1 -0
- package/dist/connectors/confluence/lib/confluence_error.js +19 -0
- package/dist/connectors/confluence/lib/confluence_error.js.map +1 -0
- package/dist/connectors/db/cli.d.ts +5 -0
- package/dist/connectors/db/cli.d.ts.map +1 -0
- package/dist/connectors/db/cli.js +34 -0
- package/dist/connectors/db/cli.js.map +1 -0
- package/dist/connectors/db/config.d.ts +18 -0
- package/dist/connectors/db/config.d.ts.map +1 -0
- package/dist/connectors/db/config.js +142 -0
- package/dist/connectors/db/config.js.map +1 -0
- package/dist/connectors/db/connector.d.ts +31 -0
- package/dist/connectors/db/connector.d.ts.map +1 -0
- package/dist/connectors/db/connector.js +175 -0
- package/dist/connectors/db/connector.js.map +1 -0
- package/dist/connectors/db/dispatcher.d.ts +36 -0
- package/dist/connectors/db/dispatcher.d.ts.map +1 -0
- package/dist/connectors/db/dispatcher.js +597 -0
- package/dist/connectors/db/dispatcher.js.map +1 -0
- package/dist/connectors/db/index.d.ts +22 -0
- package/dist/connectors/db/index.d.ts.map +1 -0
- package/dist/connectors/db/index.js +26 -0
- package/dist/connectors/db/index.js.map +1 -0
- package/dist/connectors/db/lib/audit.d.ts +32 -0
- package/dist/connectors/db/lib/audit.d.ts.map +1 -0
- package/dist/connectors/db/lib/audit.js +130 -0
- package/dist/connectors/db/lib/audit.js.map +1 -0
- package/dist/connectors/db/lib/connection.d.ts +61 -0
- package/dist/connectors/db/lib/connection.d.ts.map +1 -0
- package/dist/connectors/db/lib/connection.js +326 -0
- package/dist/connectors/db/lib/connection.js.map +1 -0
- package/dist/connectors/db/lib/credentials.d.ts +60 -0
- package/dist/connectors/db/lib/credentials.d.ts.map +1 -0
- package/dist/connectors/db/lib/credentials.js +117 -0
- package/dist/connectors/db/lib/credentials.js.map +1 -0
- package/dist/connectors/db/lib/drivers/base.d.ts +83 -0
- package/dist/connectors/db/lib/drivers/base.d.ts.map +1 -0
- package/dist/connectors/db/lib/drivers/base.js +46 -0
- package/dist/connectors/db/lib/drivers/base.js.map +1 -0
- package/dist/connectors/db/lib/drivers/dynamodb.d.ts +108 -0
- package/dist/connectors/db/lib/drivers/dynamodb.d.ts.map +1 -0
- package/dist/connectors/db/lib/drivers/dynamodb.js +468 -0
- package/dist/connectors/db/lib/drivers/dynamodb.js.map +1 -0
- package/dist/connectors/db/lib/drivers/mongodb.d.ts +60 -0
- package/dist/connectors/db/lib/drivers/mongodb.d.ts.map +1 -0
- package/dist/connectors/db/lib/drivers/mongodb.js +371 -0
- package/dist/connectors/db/lib/drivers/mongodb.js.map +1 -0
- package/dist/connectors/db/lib/drivers/mysql.d.ts +45 -0
- package/dist/connectors/db/lib/drivers/mysql.d.ts.map +1 -0
- package/dist/connectors/db/lib/drivers/mysql.js +265 -0
- package/dist/connectors/db/lib/drivers/mysql.js.map +1 -0
- package/dist/connectors/db/lib/drivers/oracle.d.ts +53 -0
- package/dist/connectors/db/lib/drivers/oracle.d.ts.map +1 -0
- package/dist/connectors/db/lib/drivers/oracle.js +350 -0
- package/dist/connectors/db/lib/drivers/oracle.js.map +1 -0
- package/dist/connectors/db/lib/drivers/postgresql.d.ts +65 -0
- package/dist/connectors/db/lib/drivers/postgresql.d.ts.map +1 -0
- package/dist/connectors/db/lib/drivers/postgresql.js +294 -0
- package/dist/connectors/db/lib/drivers/postgresql.js.map +1 -0
- package/dist/connectors/db/lib/drivers/register.d.ts +16 -0
- package/dist/connectors/db/lib/drivers/register.d.ts.map +1 -0
- package/dist/connectors/db/lib/drivers/register.js +111 -0
- package/dist/connectors/db/lib/drivers/register.js.map +1 -0
- package/dist/connectors/db/lib/drivers/sqlite.d.ts +11 -0
- package/dist/connectors/db/lib/drivers/sqlite.d.ts.map +1 -0
- package/dist/connectors/db/lib/drivers/sqlite.js +147 -0
- package/dist/connectors/db/lib/drivers/sqlite.js.map +1 -0
- package/dist/connectors/db/lib/drivers/sqlserver.d.ts +58 -0
- package/dist/connectors/db/lib/drivers/sqlserver.d.ts.map +1 -0
- package/dist/connectors/db/lib/drivers/sqlserver.js +274 -0
- package/dist/connectors/db/lib/drivers/sqlserver.js.map +1 -0
- package/dist/connectors/db/lib/environments.d.ts +68 -0
- package/dist/connectors/db/lib/environments.d.ts.map +1 -0
- package/dist/connectors/db/lib/environments.js +53 -0
- package/dist/connectors/db/lib/environments.js.map +1 -0
- package/dist/connectors/db/lib/index.d.ts +28 -0
- package/dist/connectors/db/lib/index.d.ts.map +1 -0
- package/dist/connectors/db/lib/index.js +30 -0
- package/dist/connectors/db/lib/index.js.map +1 -0
- package/dist/connectors/db/lib/plugin_config.d.ts +64 -0
- package/dist/connectors/db/lib/plugin_config.d.ts.map +1 -0
- package/dist/connectors/db/lib/plugin_config.js +287 -0
- package/dist/connectors/db/lib/plugin_config.js.map +1 -0
- package/dist/connectors/db/lib/policy.d.ts +162 -0
- package/dist/connectors/db/lib/policy.d.ts.map +1 -0
- package/dist/connectors/db/lib/policy.js +581 -0
- package/dist/connectors/db/lib/policy.js.map +1 -0
- package/dist/connectors/db/lib/query.d.ts +22 -0
- package/dist/connectors/db/lib/query.d.ts.map +1 -0
- package/dist/connectors/db/lib/query.js +93 -0
- package/dist/connectors/db/lib/query.js.map +1 -0
- package/dist/connectors/db/lib/schema.d.ts +13 -0
- package/dist/connectors/db/lib/schema.d.ts.map +1 -0
- package/dist/connectors/db/lib/schema.js +80 -0
- package/dist/connectors/db/lib/schema.js.map +1 -0
- package/dist/connectors/gcp/cli.d.ts +3 -0
- package/dist/connectors/gcp/cli.d.ts.map +1 -0
- package/dist/connectors/gcp/cli.js +24 -0
- package/dist/connectors/gcp/cli.js.map +1 -0
- package/dist/connectors/gcp/index.d.ts +24 -0
- package/dist/connectors/gcp/index.d.ts.map +1 -0
- package/dist/connectors/gcp/index.js +205 -0
- package/dist/connectors/gcp/index.js.map +1 -0
- package/dist/connectors/gcp/lib/gcp_client.d.ts +88 -0
- package/dist/connectors/gcp/lib/gcp_client.d.ts.map +1 -0
- package/dist/connectors/gcp/lib/gcp_client.js +434 -0
- package/dist/connectors/gcp/lib/gcp_client.js.map +1 -0
- package/dist/connectors/gcp/lib/gcp_error.d.ts +10 -0
- package/dist/connectors/gcp/lib/gcp_error.d.ts.map +1 -0
- package/dist/connectors/gcp/lib/gcp_error.js +15 -0
- package/dist/connectors/gcp/lib/gcp_error.js.map +1 -0
- package/dist/connectors/github/cli.d.ts +3 -0
- package/dist/connectors/github/cli.d.ts.map +1 -0
- package/dist/connectors/github/cli.js +23 -0
- package/dist/connectors/github/cli.js.map +1 -0
- package/dist/connectors/github/index.d.ts +23 -0
- package/dist/connectors/github/index.d.ts.map +1 -0
- package/dist/connectors/github/index.js +462 -0
- package/dist/connectors/github/index.js.map +1 -0
- package/dist/connectors/github/lib/github_client.d.ts +181 -0
- package/dist/connectors/github/lib/github_client.d.ts.map +1 -0
- package/dist/connectors/github/lib/github_client.js +383 -0
- package/dist/connectors/github/lib/github_client.js.map +1 -0
- package/dist/connectors/github/lib/github_error.d.ts +11 -0
- package/dist/connectors/github/lib/github_error.d.ts.map +1 -0
- package/dist/connectors/github/lib/github_error.js +17 -0
- package/dist/connectors/github/lib/github_error.js.map +1 -0
- package/dist/connectors/jira/cli.d.ts +3 -0
- package/dist/connectors/jira/cli.d.ts.map +1 -0
- package/dist/connectors/jira/cli.js +24 -0
- package/dist/connectors/jira/cli.js.map +1 -0
- package/dist/connectors/jira/index.d.ts +13 -0
- package/dist/connectors/jira/index.d.ts.map +1 -0
- package/dist/connectors/jira/index.js +287 -0
- package/dist/connectors/jira/index.js.map +1 -0
- package/dist/connectors/jira/lib/adf.d.ts +25 -0
- package/dist/connectors/jira/lib/adf.d.ts.map +1 -0
- package/dist/connectors/jira/lib/adf.js +105 -0
- package/dist/connectors/jira/lib/adf.js.map +1 -0
- package/dist/connectors/jira/lib/jira_client.d.ts +143 -0
- package/dist/connectors/jira/lib/jira_client.d.ts.map +1 -0
- package/dist/connectors/jira/lib/jira_client.js +355 -0
- package/dist/connectors/jira/lib/jira_client.js.map +1 -0
- package/dist/connectors/jira/lib/jira_error.d.ts +11 -0
- package/dist/connectors/jira/lib/jira_error.d.ts.map +1 -0
- package/dist/connectors/jira/lib/jira_error.js +17 -0
- package/dist/connectors/jira/lib/jira_error.js.map +1 -0
- package/dist/connectors/notion/cli.d.ts +3 -0
- package/dist/connectors/notion/cli.d.ts.map +1 -0
- package/dist/connectors/notion/cli.js +22 -0
- package/dist/connectors/notion/cli.js.map +1 -0
- package/dist/connectors/notion/index.d.ts +20 -0
- package/dist/connectors/notion/index.d.ts.map +1 -0
- package/dist/connectors/notion/index.js +317 -0
- package/dist/connectors/notion/index.js.map +1 -0
- package/dist/connectors/notion/lib/notion_client.d.ts +117 -0
- package/dist/connectors/notion/lib/notion_client.d.ts.map +1 -0
- package/dist/connectors/notion/lib/notion_client.js +377 -0
- package/dist/connectors/notion/lib/notion_client.js.map +1 -0
- package/dist/connectors/notion/lib/notion_error.d.ts +12 -0
- package/dist/connectors/notion/lib/notion_error.d.ts.map +1 -0
- package/dist/connectors/notion/lib/notion_error.js +18 -0
- package/dist/connectors/notion/lib/notion_error.js.map +1 -0
- package/dist/hub/cli.d.ts +4 -0
- package/dist/hub/cli.d.ts.map +1 -0
- package/dist/hub/cli.js +93 -0
- package/dist/hub/cli.js.map +1 -0
- package/dist/hub/dispatch.d.ts +33 -0
- package/dist/hub/dispatch.d.ts.map +1 -0
- package/dist/hub/dispatch.js +297 -0
- package/dist/hub/dispatch.js.map +1 -0
- package/dist/hub/index.d.ts +9 -0
- package/dist/hub/index.d.ts.map +1 -0
- package/dist/hub/index.js +215 -0
- package/dist/hub/index.js.map +1 -0
- package/dist/hub/plan.d.ts +24 -0
- package/dist/hub/plan.d.ts.map +1 -0
- package/dist/hub/plan.js +103 -0
- package/dist/hub/plan.js.map +1 -0
- package/dist/hub/types.d.ts +65 -0
- package/dist/hub/types.d.ts.map +1 -0
- package/dist/hub/types.js +3 -0
- package/dist/hub/types.js.map +1 -0
- package/dist/toolkit/_optional.d.ts +14 -0
- package/dist/toolkit/_optional.d.ts.map +1 -0
- package/dist/toolkit/_optional.js +96 -0
- package/dist/toolkit/_optional.js.map +1 -0
- package/dist/toolkit/agent_cli.d.ts +33 -0
- package/dist/toolkit/agent_cli.d.ts.map +1 -0
- package/dist/toolkit/agent_cli.js +62 -0
- package/dist/toolkit/agent_cli.js.map +1 -0
- package/dist/toolkit/agent_resolver.d.ts +46 -0
- package/dist/toolkit/agent_resolver.d.ts.map +1 -0
- package/dist/toolkit/agent_resolver.js +78 -0
- package/dist/toolkit/agent_resolver.js.map +1 -0
- package/dist/toolkit/audit/events.d.ts +45 -0
- package/dist/toolkit/audit/events.d.ts.map +1 -0
- package/dist/toolkit/audit/events.js +8 -0
- package/dist/toolkit/audit/events.js.map +1 -0
- package/dist/toolkit/audit/writer.d.ts +16 -0
- package/dist/toolkit/audit/writer.d.ts.map +1 -0
- package/dist/toolkit/audit/writer.js +73 -0
- package/dist/toolkit/audit/writer.js.map +1 -0
- package/dist/toolkit/cli/usage-report.d.ts +3 -0
- package/dist/toolkit/cli/usage-report.d.ts.map +1 -0
- package/dist/toolkit/cli/usage-report.js +76 -0
- package/dist/toolkit/cli/usage-report.js.map +1 -0
- package/dist/toolkit/connector.d.ts +142 -0
- package/dist/toolkit/connector.d.ts.map +1 -0
- package/dist/toolkit/connector.js +593 -0
- package/dist/toolkit/connector.js.map +1 -0
- package/dist/toolkit/extract_binary.d.ts +45 -0
- package/dist/toolkit/extract_binary.d.ts.map +1 -0
- package/dist/toolkit/extract_binary.js +342 -0
- package/dist/toolkit/extract_binary.js.map +1 -0
- package/dist/toolkit/extract_multimodal.d.ts +22 -0
- package/dist/toolkit/extract_multimodal.d.ts.map +1 -0
- package/dist/toolkit/extract_multimodal.js +209 -0
- package/dist/toolkit/extract_multimodal.js.map +1 -0
- package/dist/toolkit/fetch_attachment.d.ts +21 -0
- package/dist/toolkit/fetch_attachment.d.ts.map +1 -0
- package/dist/toolkit/fetch_attachment.js +169 -0
- package/dist/toolkit/fetch_attachment.js.map +1 -0
- package/dist/toolkit/fetch_helper.d.ts +47 -0
- package/dist/toolkit/fetch_helper.d.ts.map +1 -0
- package/dist/toolkit/fetch_helper.js +124 -0
- package/dist/toolkit/fetch_helper.js.map +1 -0
- package/dist/toolkit/guardrail.d.ts +63 -0
- package/dist/toolkit/guardrail.d.ts.map +1 -0
- package/dist/toolkit/guardrail.js +166 -0
- package/dist/toolkit/guardrail.js.map +1 -0
- package/dist/toolkit/hardship/curate.d.ts +47 -0
- package/dist/toolkit/hardship/curate.d.ts.map +1 -0
- package/dist/toolkit/hardship/curate.js +113 -0
- package/dist/toolkit/hardship/curate.js.map +1 -0
- package/dist/toolkit/hardship/patterns.d.ts +32 -0
- package/dist/toolkit/hardship/patterns.d.ts.map +1 -0
- package/dist/toolkit/hardship/patterns.js +98 -0
- package/dist/toolkit/hardship/patterns.js.map +1 -0
- package/dist/toolkit/hardship/preamble.d.ts +13 -0
- package/dist/toolkit/hardship/preamble.d.ts.map +1 -0
- package/dist/toolkit/hardship/preamble.js +47 -0
- package/dist/toolkit/hardship/preamble.js.map +1 -0
- package/dist/toolkit/hardship/read.d.ts +34 -0
- package/dist/toolkit/hardship/read.d.ts.map +1 -0
- package/dist/toolkit/hardship/read.js +116 -0
- package/dist/toolkit/hardship/read.js.map +1 -0
- package/dist/toolkit/hardship/record.d.ts +43 -0
- package/dist/toolkit/hardship/record.d.ts.map +1 -0
- package/dist/toolkit/hardship/record.js +74 -0
- package/dist/toolkit/hardship/record.js.map +1 -0
- package/dist/toolkit/hardship/scope.d.ts +20 -0
- package/dist/toolkit/hardship/scope.d.ts.map +1 -0
- package/dist/toolkit/hardship/scope.js +56 -0
- package/dist/toolkit/hardship/scope.js.map +1 -0
- package/dist/toolkit/index.d.ts +42 -0
- package/dist/toolkit/index.d.ts.map +1 -0
- package/dist/toolkit/index.js +51 -0
- package/dist/toolkit/index.js.map +1 -0
- package/dist/toolkit/plugin/curate-cmd.d.ts +22 -0
- package/dist/toolkit/plugin/curate-cmd.d.ts.map +1 -0
- package/dist/toolkit/plugin/curate-cmd.js +72 -0
- package/dist/toolkit/plugin/curate-cmd.js.map +1 -0
- package/dist/toolkit/plugin/prefs.d.ts +15 -0
- package/dist/toolkit/plugin/prefs.d.ts.map +1 -0
- package/dist/toolkit/plugin/prefs.js +78 -0
- package/dist/toolkit/plugin/prefs.js.map +1 -0
- package/dist/toolkit/plugin/reminder.d.ts +28 -0
- package/dist/toolkit/plugin/reminder.d.ts.map +1 -0
- package/dist/toolkit/plugin/reminder.js +103 -0
- package/dist/toolkit/plugin/reminder.js.map +1 -0
- package/dist/toolkit/policy/approval.d.ts +24 -0
- package/dist/toolkit/policy/approval.d.ts.map +1 -0
- package/dist/toolkit/policy/approval.js +56 -0
- package/dist/toolkit/policy/approval.js.map +1 -0
- package/dist/toolkit/policy/config.d.ts +38 -0
- package/dist/toolkit/policy/config.d.ts.map +1 -0
- package/dist/toolkit/policy/config.js +172 -0
- package/dist/toolkit/policy/config.js.map +1 -0
- package/dist/toolkit/policy/gate.d.ts +28 -0
- package/dist/toolkit/policy/gate.d.ts.map +1 -0
- package/dist/toolkit/policy/gate.js +126 -0
- package/dist/toolkit/policy/gate.js.map +1 -0
- package/dist/toolkit/policy/types.d.ts +106 -0
- package/dist/toolkit/policy/types.d.ts.map +1 -0
- package/dist/toolkit/policy/types.js +22 -0
- package/dist/toolkit/policy/types.js.map +1 -0
- package/dist/toolkit/security_check.d.ts +15 -0
- package/dist/toolkit/security_check.d.ts.map +1 -0
- package/dist/toolkit/security_check.js +109 -0
- package/dist/toolkit/security_check.js.map +1 -0
- package/dist/toolkit/usage/aggregate-cross-session.d.ts +36 -0
- package/dist/toolkit/usage/aggregate-cross-session.d.ts.map +1 -0
- package/dist/toolkit/usage/aggregate-cross-session.js +142 -0
- package/dist/toolkit/usage/aggregate-cross-session.js.map +1 -0
- package/dist/toolkit/usage/aggregate.d.ts +4 -0
- package/dist/toolkit/usage/aggregate.d.ts.map +1 -0
- package/dist/toolkit/usage/aggregate.js +105 -0
- package/dist/toolkit/usage/aggregate.js.map +1 -0
- package/dist/toolkit/usage/index.d.ts +11 -0
- package/dist/toolkit/usage/index.d.ts.map +1 -0
- package/dist/toolkit/usage/index.js +7 -0
- package/dist/toolkit/usage/index.js.map +1 -0
- package/dist/toolkit/usage/parse.d.ts +5 -0
- package/dist/toolkit/usage/parse.d.ts.map +1 -0
- package/dist/toolkit/usage/parse.js +19 -0
- package/dist/toolkit/usage/parse.js.map +1 -0
- package/dist/toolkit/usage/record.d.ts +8 -0
- package/dist/toolkit/usage/record.d.ts.map +1 -0
- package/dist/toolkit/usage/record.js +18 -0
- package/dist/toolkit/usage/record.js.map +1 -0
- package/dist/toolkit/usage/retention.d.ts +6 -0
- package/dist/toolkit/usage/retention.d.ts.map +1 -0
- package/dist/toolkit/usage/retention.js +71 -0
- package/dist/toolkit/usage/retention.js.map +1 -0
- package/dist/toolkit/usage/tokenize.d.ts +11 -0
- package/dist/toolkit/usage/tokenize.d.ts.map +1 -0
- package/dist/toolkit/usage/tokenize.js +24 -0
- package/dist/toolkit/usage/tokenize.js.map +1 -0
- package/dist/toolkit/usage/types.d.ts +34 -0
- package/dist/toolkit/usage/types.d.ts.map +1 -0
- package/dist/toolkit/usage/types.js +2 -0
- package/dist/toolkit/usage/types.js.map +1 -0
- package/package.json +124 -0
- package/plugin-hooks/session-summary.mjs +138 -0
- package/plugin-hooks/stale-summarize.mjs +70 -0
- package/plugin-hooks/usage-record.mjs +112 -0
- package/plugins/aws-agent/.claude-plugin/plugin.json +6 -0
- package/plugins/aws-agent/README.md +46 -0
- package/plugins/aws-agent/bin/aws-agent +22 -0
- package/plugins/aws-agent/commands/aws-agent.md +6 -0
- package/plugins/aws-agent/hooks/hooks.json +49 -0
- package/plugins/aws-agent/hooks/reminder.mjs +16 -0
- package/plugins/aws-agent/package.json +9 -0
- package/plugins/aws-agent/skills/aws-agent/SKILL.md +70 -0
- package/plugins/confluence-agent/.claude-plugin/plugin.json +6 -0
- package/plugins/confluence-agent/README.md +15 -0
- package/plugins/confluence-agent/bin/confluence-agent +17 -0
- package/plugins/confluence-agent/commands/confluence-agent.md +6 -0
- package/plugins/confluence-agent/hooks/hooks.json +49 -0
- package/plugins/confluence-agent/hooks/reminder.mjs +25 -0
- package/plugins/confluence-agent/package.json +8 -0
- package/plugins/confluence-agent/skills/confluence-agent/SKILL.md +40 -0
- package/plugins/db-agent/.claude-plugin/plugin.json +20 -0
- package/plugins/db-agent/README.md +13 -0
- package/plugins/db-agent/bin/db-agent +17 -0
- package/plugins/db-agent/commands/db-agent.md +6 -0
- package/plugins/db-agent/hooks/db-guard.mjs +110 -0
- package/plugins/db-agent/hooks/guardrails.json +26 -0
- package/plugins/db-agent/hooks/hooks.json +61 -0
- package/plugins/db-agent/hooks/reminder.mjs +16 -0
- package/plugins/db-agent/package.json +8 -0
- package/plugins/db-agent/skills/db-agent/SKILL.md +50 -0
- package/plugins/gcp-agent/.claude-plugin/plugin.json +6 -0
- package/plugins/gcp-agent/README.md +31 -0
- package/plugins/gcp-agent/bin/gcp-agent +18 -0
- package/plugins/gcp-agent/commands/gcp-agent.md +6 -0
- package/plugins/gcp-agent/hooks/hooks.json +49 -0
- package/plugins/gcp-agent/hooks/reminder.mjs +16 -0
- package/plugins/gcp-agent/package.json +9 -0
- package/plugins/gcp-agent/skills/gcp-agent/SKILL.md +54 -0
- package/plugins/github-agent/.claude-plugin/plugin.json +6 -0
- package/plugins/github-agent/README.md +13 -0
- package/plugins/github-agent/bin/github-agent +17 -0
- package/plugins/github-agent/commands/github-agent.md +6 -0
- package/plugins/github-agent/hooks/hooks.json +49 -0
- package/plugins/github-agent/hooks/reminder.mjs +16 -0
- package/plugins/github-agent/package.json +8 -0
- package/plugins/github-agent/skills/github-agent/SKILL.md +41 -0
- package/plugins/jira-agent/.claude-plugin/plugin.json +6 -0
- package/plugins/jira-agent/README.md +15 -0
- package/plugins/jira-agent/bin/jira-agent +17 -0
- package/plugins/jira-agent/commands/jira-agent.md +6 -0
- package/plugins/jira-agent/hooks/hooks.json +49 -0
- package/plugins/jira-agent/hooks/reminder.mjs +16 -0
- package/plugins/jira-agent/package.json +8 -0
- package/plugins/jira-agent/skills/jira-agent/SKILL.md +37 -0
- package/plugins/notion-agent/.claude-plugin/plugin.json +6 -0
- package/plugins/notion-agent/README.md +23 -0
- package/plugins/notion-agent/bin/notion-agent +17 -0
- package/plugins/notion-agent/commands/notion-agent.md +6 -0
- package/plugins/notion-agent/hooks/hooks.json +49 -0
- package/plugins/notion-agent/hooks/reminder.mjs +17 -0
- package/plugins/notion-agent/package.json +8 -0
- package/plugins/notion-agent/skills/notion-agent/SKILL.md +48 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gcp-agent
|
|
3
|
+
description: |
|
|
4
|
+
Use when the user asks about read-only GCP inventory — Cloud Run services,
|
|
5
|
+
Cloud SQL instances, Pub/Sub topics, or Cloud Logging entries. Queries are
|
|
6
|
+
scoped to a single GCP project. Never modifies GCP resources.
|
|
7
|
+
context: fork
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# GCP Agent
|
|
11
|
+
|
|
12
|
+
Answer the user's question by invoking the `gcp-agent` binary exposed by
|
|
13
|
+
this plugin. It delegates to `@narai/gcp-agent-connector`, which speaks to
|
|
14
|
+
GCP by shelling out to `gcloud` / `bq` with Application Default Credentials.
|
|
15
|
+
|
|
16
|
+
## Invocation
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
gcp-agent --action <action> --params '<json>'
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The CLI writes a single JSON envelope to stdout and exits 0 on success, 1
|
|
23
|
+
on a handled error, 2 on CLI misuse. Return the envelope verbatim to the
|
|
24
|
+
orchestrator.
|
|
25
|
+
|
|
26
|
+
## Supported actions
|
|
27
|
+
|
|
28
|
+
| Action | Required params |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `list_services` | `project_id` |
|
|
31
|
+
| `describe_db` | `project_id`, `instance_id`, optional `database` |
|
|
32
|
+
| `list_topics` | `project_id` |
|
|
33
|
+
| `query_logs` | `project_id`, `filter`, optional `hours` (default 24, max 168), optional `max_results` (default 100, max 1000) |
|
|
34
|
+
|
|
35
|
+
Example:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
gcp-agent --action list_services --params '{"project_id":"acme-prod-123"}'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Credentials
|
|
42
|
+
|
|
43
|
+
Uses Application Default Credentials. Before first use, run:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
gcloud auth application-default login
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Safety
|
|
50
|
+
|
|
51
|
+
Read-only by construction: the connector enforces a binary and sub-command
|
|
52
|
+
whitelist at the `execFileSync` layer, forbids shell strings, and refuses
|
|
53
|
+
write-style flags. Cannot invoke `create`, `delete`, `update`, or any
|
|
54
|
+
mutating `gcloud` sub-command.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
if [ -z "${CLAUDE_PLUGIN_DATA:-}" ]; then
|
|
5
|
+
echo "github-agent: 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/github-agent-connector/dist/cli.js"
|
|
10
|
+
|
|
11
|
+
if [ ! -f "$CLI" ]; then
|
|
12
|
+
echo "github-agent: 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 read-only GitHub query via the github-agent connector
|
|
3
|
+
argument-hint: "<action> <params-json>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Invoke the `github-agent` skill with the user's $ARGUMENTS as the action name and params JSON. Return the connector's JSON envelope verbatim.
|
|
@@ -0,0 +1,49 @@
|
|
|
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_ROOT}/plugin/hooks/reminder.mjs\" 2>/dev/null || true"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"type": "command",
|
|
16
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/@narai/connector-toolkit/plugin-hooks/stale-summarize.mjs\" 2>/dev/null || true",
|
|
17
|
+
"env": { "USAGE_CONNECTOR_NAME": "github" }
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"PostToolUse": [
|
|
23
|
+
{
|
|
24
|
+
"matcher": "Bash",
|
|
25
|
+
"hooks": [
|
|
26
|
+
{
|
|
27
|
+
"type": "command",
|
|
28
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/@narai/connector-toolkit/plugin-hooks/usage-record.mjs\" 2>/dev/null || true",
|
|
29
|
+
"env": {
|
|
30
|
+
"USAGE_CONNECTOR_NAME": "github",
|
|
31
|
+
"USAGE_BIN_HINT": "@narai/github-agent-connector"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"SessionEnd": [
|
|
38
|
+
{
|
|
39
|
+
"hooks": [
|
|
40
|
+
{
|
|
41
|
+
"type": "command",
|
|
42
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/@narai/connector-toolkit/plugin-hooks/session-summary.mjs\" 2>/dev/null || true",
|
|
43
|
+
"env": { "USAGE_CONNECTOR_NAME": "github" }
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* SessionStart curation reminder for the GitHub connector.
|
|
4
|
+
*/
|
|
5
|
+
try {
|
|
6
|
+
const data = process.env.CLAUDE_PLUGIN_DATA;
|
|
7
|
+
if (!data) process.exit(0);
|
|
8
|
+
const toolkitEntry = `${data}/node_modules/@narai/connector-toolkit/dist/plugin/reminder.js`;
|
|
9
|
+
const mod = await import(toolkitEntry);
|
|
10
|
+
const decision = mod.evaluateNudge({ connectors: ["github"] });
|
|
11
|
+
if (decision.nudge) {
|
|
12
|
+
process.stdout.write(decision.banner + "\n");
|
|
13
|
+
}
|
|
14
|
+
} catch {
|
|
15
|
+
// best-effort — reminder never blocks startup
|
|
16
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: github-agent
|
|
3
|
+
description: |
|
|
4
|
+
Use when the user asks about read-only GitHub data — repository info,
|
|
5
|
+
code search, issue/PR listing, or single-file retrieval. Never
|
|
6
|
+
modifies GitHub.
|
|
7
|
+
context: fork
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# GitHub Agent
|
|
11
|
+
|
|
12
|
+
Answer the user's question by invoking the `github-agent` binary
|
|
13
|
+
exposed by this plugin. It delegates to
|
|
14
|
+
`@narai/github-agent-connector` via GitHub's REST v3 + GraphQL APIs.
|
|
15
|
+
|
|
16
|
+
## Invocation
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
github-agent --action <action> --params '<json>'
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Return the connector's JSON envelope verbatim.
|
|
23
|
+
|
|
24
|
+
## Supported actions
|
|
25
|
+
|
|
26
|
+
| Action | Required params |
|
|
27
|
+
|---|---|
|
|
28
|
+
| `repo_info` | `owner`, `repo` |
|
|
29
|
+
| `search_code` | `query`, optional `max_results` |
|
|
30
|
+
| `get_issues` | `owner`, `repo`, optional `state`, `max_results` |
|
|
31
|
+
| `get_pulls` | `owner`, `repo`, optional `state`, `max_results` |
|
|
32
|
+
| `get_file` | `owner`, `repo`, `path`, optional `ref` |
|
|
33
|
+
|
|
34
|
+
## Credentials
|
|
35
|
+
|
|
36
|
+
Export `GITHUB_TOKEN` (PAT with `repo` / `read:org` as needed).
|
|
37
|
+
|
|
38
|
+
## Safety
|
|
39
|
+
|
|
40
|
+
Read-only — only GET (REST) and POST /graphql (read-only queries)
|
|
41
|
+
are permitted.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# jira-agent-plugin
|
|
2
|
+
|
|
3
|
+
Claude Code plugin wrapping `@narai/jira-agent-connector`. Same layout as the other platform plugins.
|
|
4
|
+
|
|
5
|
+
## Credentials
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
export JIRA_SITE_URL="https://your.atlassian.net"
|
|
9
|
+
export JIRA_EMAIL="you@example.com"
|
|
10
|
+
export JIRA_API_TOKEN="…"
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## License
|
|
14
|
+
|
|
15
|
+
MIT
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
if [ -z "${CLAUDE_PLUGIN_DATA:-}" ]; then
|
|
5
|
+
echo "jira-agent: 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/jira-agent-connector/dist/cli.js"
|
|
10
|
+
|
|
11
|
+
if [ ! -f "$CLI" ]; then
|
|
12
|
+
echo "jira-agent: 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,49 @@
|
|
|
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_ROOT}/plugin/hooks/reminder.mjs\" 2>/dev/null || true"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"type": "command",
|
|
16
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/@narai/connector-toolkit/plugin-hooks/stale-summarize.mjs\" 2>/dev/null || true",
|
|
17
|
+
"env": { "USAGE_CONNECTOR_NAME": "jira" }
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"PostToolUse": [
|
|
23
|
+
{
|
|
24
|
+
"matcher": "Bash",
|
|
25
|
+
"hooks": [
|
|
26
|
+
{
|
|
27
|
+
"type": "command",
|
|
28
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/@narai/connector-toolkit/plugin-hooks/usage-record.mjs\" 2>/dev/null || true",
|
|
29
|
+
"env": {
|
|
30
|
+
"USAGE_CONNECTOR_NAME": "jira",
|
|
31
|
+
"USAGE_BIN_HINT": "@narai/jira-agent-connector"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"SessionEnd": [
|
|
38
|
+
{
|
|
39
|
+
"hooks": [
|
|
40
|
+
{
|
|
41
|
+
"type": "command",
|
|
42
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/@narai/connector-toolkit/plugin-hooks/session-summary.mjs\" 2>/dev/null || true",
|
|
43
|
+
"env": { "USAGE_CONNECTOR_NAME": "jira" }
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* SessionStart curation reminder for the Jira connector.
|
|
4
|
+
*/
|
|
5
|
+
try {
|
|
6
|
+
const data = process.env.CLAUDE_PLUGIN_DATA;
|
|
7
|
+
if (!data) process.exit(0);
|
|
8
|
+
const toolkitEntry = `${data}/node_modules/@narai/connector-toolkit/dist/plugin/reminder.js`;
|
|
9
|
+
const mod = await import(toolkitEntry);
|
|
10
|
+
const decision = mod.evaluateNudge({ connectors: ["jira"] });
|
|
11
|
+
if (decision.nudge) {
|
|
12
|
+
process.stdout.write(decision.banner + "\n");
|
|
13
|
+
}
|
|
14
|
+
} catch {
|
|
15
|
+
// best-effort — reminder never blocks startup
|
|
16
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jira-agent
|
|
3
|
+
description: |
|
|
4
|
+
Use when the user asks about read-only Jira data — JQL search, single
|
|
5
|
+
issue details, or project metadata. Never modifies Jira.
|
|
6
|
+
context: fork
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Jira Agent
|
|
10
|
+
|
|
11
|
+
Answer the user's question by invoking the `jira-agent` binary exposed
|
|
12
|
+
by this plugin. It delegates to `@narai/jira-agent-connector` via
|
|
13
|
+
Atlassian's Jira REST v3.
|
|
14
|
+
|
|
15
|
+
## Invocation
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
jira-agent --action <action> --params '<json>'
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Return the connector's JSON envelope verbatim.
|
|
22
|
+
|
|
23
|
+
## Supported actions
|
|
24
|
+
|
|
25
|
+
| Action | Required params |
|
|
26
|
+
|---|---|
|
|
27
|
+
| `jql_search` | `jql`, optional `max_results` (default 50, max 500) |
|
|
28
|
+
| `get_issue` | `issue_key` (e.g. `FOO-123`), optional `expand` |
|
|
29
|
+
| `get_project` | `project_key` (e.g. `FOO`) |
|
|
30
|
+
|
|
31
|
+
## Credentials
|
|
32
|
+
|
|
33
|
+
Set `JIRA_SITE_URL`, `JIRA_EMAIL`, `JIRA_API_TOKEN` before use.
|
|
34
|
+
|
|
35
|
+
## Safety
|
|
36
|
+
|
|
37
|
+
Read-only — only GET requests permitted.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# notion-agent-plugin
|
|
2
|
+
|
|
3
|
+
Claude Code plugin that wraps `@narai/notion-agent-connector` as a read-only Notion skill and slash command.
|
|
4
|
+
|
|
5
|
+
- Skill `notion-agent` — automatic invocation for Notion workspace questions.
|
|
6
|
+
- Slash command `/notion-agent <action> <params-json>`.
|
|
7
|
+
- Binary `notion-agent` — thin shim over the installed connector CLI.
|
|
8
|
+
|
|
9
|
+
## How install works
|
|
10
|
+
|
|
11
|
+
On first `SessionStart` the hook copies `package.json` into
|
|
12
|
+
`${CLAUDE_PLUGIN_DATA}` and runs `npm install --no-audit --no-fund` there
|
|
13
|
+
once. After that, `${CLAUDE_PLUGIN_DATA}/node_modules/@narai/notion-agent-connector/dist/cli.js`
|
|
14
|
+
exists and `bin/notion-agent` exec's it.
|
|
15
|
+
|
|
16
|
+
## Credentials
|
|
17
|
+
|
|
18
|
+
Export `NOTION_TOKEN` before starting Claude Code, or configure a
|
|
19
|
+
credential provider via `@narai/credential-providers`.
|
|
20
|
+
|
|
21
|
+
## License
|
|
22
|
+
|
|
23
|
+
MIT
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
if [ -z "${CLAUDE_PLUGIN_DATA:-}" ]; then
|
|
5
|
+
echo "notion-agent: 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/notion-agent-connector/dist/cli.js"
|
|
10
|
+
|
|
11
|
+
if [ ! -f "$CLI" ]; then
|
|
12
|
+
echo "notion-agent: 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 read-only Notion query via the notion-agent connector
|
|
3
|
+
argument-hint: "<action> <params-json>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Invoke the `notion-agent` skill with the user's $ARGUMENTS as the action name and params JSON. Return the connector's JSON envelope verbatim.
|
|
@@ -0,0 +1,49 @@
|
|
|
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_ROOT}/plugin/hooks/reminder.mjs\" 2>/dev/null || true"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"type": "command",
|
|
16
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/@narai/connector-toolkit/plugin-hooks/stale-summarize.mjs\" 2>/dev/null || true",
|
|
17
|
+
"env": { "USAGE_CONNECTOR_NAME": "notion" }
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"PostToolUse": [
|
|
23
|
+
{
|
|
24
|
+
"matcher": "Bash",
|
|
25
|
+
"hooks": [
|
|
26
|
+
{
|
|
27
|
+
"type": "command",
|
|
28
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/@narai/connector-toolkit/plugin-hooks/usage-record.mjs\" 2>/dev/null || true",
|
|
29
|
+
"env": {
|
|
30
|
+
"USAGE_CONNECTOR_NAME": "notion",
|
|
31
|
+
"USAGE_BIN_HINT": "@narai/notion-agent-connector"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"SessionEnd": [
|
|
38
|
+
{
|
|
39
|
+
"hooks": [
|
|
40
|
+
{
|
|
41
|
+
"type": "command",
|
|
42
|
+
"command": "node \"${CLAUDE_PLUGIN_DATA}/node_modules/@narai/connector-toolkit/plugin-hooks/session-summary.mjs\" 2>/dev/null || true",
|
|
43
|
+
"env": { "USAGE_CONNECTOR_NAME": "notion" }
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* SessionStart curation reminder for the Notion connector.
|
|
4
|
+
* See Confluence connector for pattern docs.
|
|
5
|
+
*/
|
|
6
|
+
try {
|
|
7
|
+
const data = process.env.CLAUDE_PLUGIN_DATA;
|
|
8
|
+
if (!data) process.exit(0);
|
|
9
|
+
const toolkitEntry = `${data}/node_modules/@narai/connector-toolkit/dist/plugin/reminder.js`;
|
|
10
|
+
const mod = await import(toolkitEntry);
|
|
11
|
+
const decision = mod.evaluateNudge({ connectors: ["notion"] });
|
|
12
|
+
if (decision.nudge) {
|
|
13
|
+
process.stdout.write(decision.banner + "\n");
|
|
14
|
+
}
|
|
15
|
+
} catch {
|
|
16
|
+
// best-effort — reminder never blocks startup
|
|
17
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: notion-agent
|
|
3
|
+
description: |
|
|
4
|
+
Use when the user asks about read-only Notion workspace content — search,
|
|
5
|
+
page contents, database schema, or database queries. Never modifies Notion.
|
|
6
|
+
context: fork
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Notion Agent
|
|
10
|
+
|
|
11
|
+
Answer the user's question by invoking the `notion-agent` binary exposed
|
|
12
|
+
by this plugin. It delegates to `@narai/notion-agent-connector`, which
|
|
13
|
+
speaks to the Notion Public API with a `NOTION_TOKEN` integration secret.
|
|
14
|
+
|
|
15
|
+
## Invocation
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
notion-agent --action <action> --params '<json>'
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Return the JSON envelope from the CLI verbatim.
|
|
22
|
+
|
|
23
|
+
## Supported actions
|
|
24
|
+
|
|
25
|
+
| Action | Required params |
|
|
26
|
+
|---|---|
|
|
27
|
+
| `search` | `query`, optional `filter_type` (`page`/`database`), optional `max_results` (default 25, max 100) |
|
|
28
|
+
| `get_page` | `page_id` (UUID) |
|
|
29
|
+
| `get_database` | `database_id` (UUID) |
|
|
30
|
+
| `query_database` | `database_id`, optional `filter` object, optional `max_results` |
|
|
31
|
+
|
|
32
|
+
Example:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
notion-agent --action search --params '{"query":"architecture","filter_type":"page"}'
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Credentials
|
|
39
|
+
|
|
40
|
+
Set `NOTION_TOKEN` to a Notion internal integration secret. The
|
|
41
|
+
integration must be invited to the pages/databases you want to read.
|
|
42
|
+
|
|
43
|
+
## Safety
|
|
44
|
+
|
|
45
|
+
Read-only by construction: the connector's HTTP method whitelist allows
|
|
46
|
+
`GET` plus only two narrow `POST` endpoints (`/v1/search` and
|
|
47
|
+
`/v1/databases/{id}/query`, which Notion requires `POST` for despite
|
|
48
|
+
being read). No other endpoints can be reached.
|