graph-agents-cli 0.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. graph_agents_cli/__init__.py +26 -0
  2. graph_agents_cli/_api_policy.py +2145 -0
  3. graph_agents_cli/_approvals.py +400 -0
  4. graph_agents_cli/_build.py +186 -0
  5. graph_agents_cli/_build_info.json +7 -0
  6. graph_agents_cli/_chat_client.py +462 -0
  7. graph_agents_cli/_click.py +157 -0
  8. graph_agents_cli/_defaults.py +139 -0
  9. graph_agents_cli/_experiments.py +64 -0
  10. graph_agents_cli/_http.py +192 -0
  11. graph_agents_cli/_output.py +83 -0
  12. graph_agents_cli/_project.py +462 -0
  13. graph_agents_cli/_remote.py +220 -0
  14. graph_agents_cli/_response_schema.py +264 -0
  15. graph_agents_cli/_runner.py +319 -0
  16. graph_agents_cli/_skills_check.py +274 -0
  17. graph_agents_cli/_tools.py +189 -0
  18. graph_agents_cli/_trust.py +66 -0
  19. graph_agents_cli/api/__init__.py +15 -0
  20. graph_agents_cli/api/_changes.py +506 -0
  21. graph_agents_cli/api/_files.py +658 -0
  22. graph_agents_cli/api/cmd_api.py +2480 -0
  23. graph_agents_cli/deploy/__init__.py +15 -0
  24. graph_agents_cli/deploy/_config.py +171 -0
  25. graph_agents_cli/deploy/_image.py +128 -0
  26. graph_agents_cli/deploy/_kube.py +286 -0
  27. graph_agents_cli/deploy/_modes.py +234 -0
  28. graph_agents_cli/deploy/_preflight.py +370 -0
  29. graph_agents_cli/deploy/_values.py +168 -0
  30. graph_agents_cli/deploy/cmd_deploy.py +1866 -0
  31. graph_agents_cli/deploy/gitops.py +562 -0
  32. graph_agents_cli/deploy/local_load.py +273 -0
  33. graph_agents_cli/dev/__init__.py +13 -0
  34. graph_agents_cli/dev/cmd_build.py +131 -0
  35. graph_agents_cli/dev/cmd_install.py +78 -0
  36. graph_agents_cli/dev/cmd_lint.py +119 -0
  37. graph_agents_cli/dev/cmd_playground.py +297 -0
  38. graph_agents_cli/dev/policy_check.py +1287 -0
  39. graph_agents_cli/eval/__init__.py +22 -0
  40. graph_agents_cli/eval/_client.py +670 -0
  41. graph_agents_cli/eval/_common.py +177 -0
  42. graph_agents_cli/eval/_judge.py +168 -0
  43. graph_agents_cli/eval/_judge_runner.py +238 -0
  44. graph_agents_cli/eval/_paths.py +212 -0
  45. graph_agents_cli/eval/checks.py +581 -0
  46. graph_agents_cli/eval/cmd_analyze.py +278 -0
  47. graph_agents_cli/eval/cmd_compare.py +284 -0
  48. graph_agents_cli/eval/cmd_eval_group.py +80 -0
  49. graph_agents_cli/eval/cmd_generate.py +558 -0
  50. graph_agents_cli/eval/cmd_grade.py +466 -0
  51. graph_agents_cli/eval/cmd_metric.py +156 -0
  52. graph_agents_cli/eval/cmd_run.py +370 -0
  53. graph_agents_cli/eval/cmd_submit.py +400 -0
  54. graph_agents_cli/eval/config.py +435 -0
  55. graph_agents_cli/eval/dataset.py +350 -0
  56. graph_agents_cli/eval/gate.py +420 -0
  57. graph_agents_cli/eval/transcript.py +192 -0
  58. graph_agents_cli/extension/__init__.py +13 -0
  59. graph_agents_cli/extension/_compat.py +86 -0
  60. graph_agents_cli/extension/_loader.py +293 -0
  61. graph_agents_cli/extension/_manifest.py +135 -0
  62. graph_agents_cli/extension/_overrides.py +195 -0
  63. graph_agents_cli/extension/_paths.py +91 -0
  64. graph_agents_cli/extension/_refs.py +193 -0
  65. graph_agents_cli/extension/_resolver.py +453 -0
  66. graph_agents_cli/extension/_schema.py +106 -0
  67. graph_agents_cli/extension/_spec.py +253 -0
  68. graph_agents_cli/extension/_sync.py +102 -0
  69. graph_agents_cli/extension/_trust.py +58 -0
  70. graph_agents_cli/extension/cmd_extension_add.py +259 -0
  71. graph_agents_cli/extension/cmd_extension_group.py +57 -0
  72. graph_agents_cli/extension/cmd_extension_list.py +56 -0
  73. graph_agents_cli/extension/cmd_extension_remove.py +61 -0
  74. graph_agents_cli/extension/cmd_extension_update.py +195 -0
  75. graph_agents_cli/info/__init__.py +13 -0
  76. graph_agents_cli/info/cmd_info.py +222 -0
  77. graph_agents_cli/infra/__init__.py +15 -0
  78. graph_agents_cli/infra/checks.py +1169 -0
  79. graph_agents_cli/infra/cmd_infra.py +103 -0
  80. graph_agents_cli/main.py +591 -0
  81. graph_agents_cli/peer/__init__.py +15 -0
  82. graph_agents_cli/peer/_generate.py +254 -0
  83. graph_agents_cli/peer/cmd_peer.py +1151 -0
  84. graph_agents_cli/run/__init__.py +13 -0
  85. graph_agents_cli/run/_local_server.py +1157 -0
  86. graph_agents_cli/run/_signals.py +141 -0
  87. graph_agents_cli/run/cmd_approvals.py +530 -0
  88. graph_agents_cli/run/cmd_run.py +1421 -0
  89. graph_agents_cli/scaffold/__init__.py +19 -0
  90. graph_agents_cli/scaffold/agents/README.md +24 -0
  91. graph_agents_cli/scaffold/agents/empty_py/.template/templateconfig.yaml +22 -0
  92. graph_agents_cli/scaffold/agents/langgraph/.env.example +292 -0
  93. graph_agents_cli/scaffold/agents/langgraph/.template/templateconfig.yaml +28 -0
  94. graph_agents_cli/scaffold/agents/langgraph/Dockerfile +59 -0
  95. graph_agents_cli/scaffold/agents/langgraph/Dockerfile.langgraph-server +59 -0
  96. graph_agents_cli/scaffold/agents/langgraph/README.md +571 -0
  97. graph_agents_cli/scaffold/agents/langgraph/api-policy.yaml +60 -0
  98. graph_agents_cli/scaffold/agents/langgraph/app/__init__.py +20 -0
  99. graph_agents_cli/scaffold/agents/langgraph/app/agent.py +174 -0
  100. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/__init__.py +15 -0
  101. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/a2a.py +2162 -0
  102. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/a2a_client.py +1167 -0
  103. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/api_client.py +4220 -0
  104. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/approvals.py +1349 -0
  105. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/auth.py +1986 -0
  106. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/chat.py +2962 -0
  107. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/checkpointer.py +432 -0
  108. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/content.py +569 -0
  109. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/db.py +580 -0
  110. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/limits.py +203 -0
  111. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/metrics.py +231 -0
  112. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/middleware.py +361 -0
  113. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/model.py +611 -0
  114. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/playground.py +230 -0
  115. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/run_locks.py +459 -0
  116. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/structured.py +755 -0
  117. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/telemetry.py +681 -0
  118. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/threads.py +493 -0
  119. graph_agents_cli/scaffold/agents/langgraph/app/app_utils/token_exchange.py +959 -0
  120. graph_agents_cli/scaffold/agents/langgraph/app/fast_api_app.py +770 -0
  121. graph_agents_cli/scaffold/agents/langgraph/app/policies/__init__.py +55 -0
  122. graph_agents_cli/scaffold/agents/langgraph/app/policies/custom.py +97 -0
  123. graph_agents_cli/scaffold/agents/langgraph/app/tools/__init__.py +46 -0
  124. graph_agents_cli/scaffold/agents/langgraph/app/tools/example_api.py +92 -0
  125. graph_agents_cli/scaffold/agents/langgraph/app/tools/weather.py +33 -0
  126. graph_agents_cli/scaffold/agents/langgraph/langgraph.json +14 -0
  127. graph_agents_cli/scaffold/agents/langgraph/pyproject.toml +78 -0
  128. graph_agents_cli/scaffold/agents/langgraph/tests/conftest.py +376 -0
  129. graph_agents_cli/scaffold/agents/langgraph/tests/eval/datasets/basic-dataset.json +53 -0
  130. graph_agents_cli/scaffold/agents/langgraph/tests/eval/eval_config.yaml +32 -0
  131. graph_agents_cli/scaffold/agents/langgraph/tests/integration/approval_graph.py +137 -0
  132. graph_agents_cli/scaffold/agents/langgraph/tests/integration/fake_issuer.py +216 -0
  133. graph_agents_cli/scaffold/agents/langgraph/tests/integration/fake_openai.py +357 -0
  134. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_a2a_outcomes.py +569 -0
  135. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_a2a_relay.py +479 -0
  136. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_api_surface.py +812 -0
  137. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_approvals.py +1367 -0
  138. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_approvals_server.py +794 -0
  139. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_cross_actor.py +497 -0
  140. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_cross_actor_server.py +247 -0
  141. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_history_repair.py +278 -0
  142. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_model_apis.py +242 -0
  143. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_postgres.py +637 -0
  144. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_resilience_postgres.py +770 -0
  145. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_runtime_guardrails.py +854 -0
  146. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_server_e2e.py +340 -0
  147. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_server_runtime.py +989 -0
  148. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_structured_answers.py +584 -0
  149. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_structured_server.py +222 -0
  150. graph_agents_cli/scaffold/agents/langgraph/tests/integration/test_token_exchange_issuer.py +650 -0
  151. graph_agents_cli/scaffold/agents/langgraph/tests/load_test/.results/.placeholder +0 -0
  152. graph_agents_cli/scaffold/agents/langgraph/tests/load_test/README.md +22 -0
  153. graph_agents_cli/scaffold/agents/langgraph/tests/load_test/conftest.py +21 -0
  154. graph_agents_cli/scaffold/agents/langgraph/tests/load_test/load_test.py +81 -0
  155. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_a2a_client.py +824 -0
  156. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_a2a_scoping.py +724 -0
  157. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_api_client.py +1214 -0
  158. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_api_client_hardening.py +716 -0
  159. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_api_policy_rpc.py +767 -0
  160. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_approval_ledger.py +1536 -0
  161. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_fake_model.py +115 -0
  162. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_jwt_policy.py +991 -0
  163. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_limits.py +310 -0
  164. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_logging.py +148 -0
  165. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_logging_hardening.py +271 -0
  166. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_policy.py +378 -0
  167. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_resilience.py +610 -0
  168. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_server_auth.py +702 -0
  169. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_structured.py +673 -0
  170. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_telemetry.py +404 -0
  171. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_thread_listing.py +255 -0
  172. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_threads.py +268 -0
  173. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_token_exchange.py +1320 -0
  174. graph_agents_cli/scaffold/agents/langgraph/tests/unit/test_untrusted_content.py +393 -0
  175. graph_agents_cli/scaffold/agents/langgraph/uv-fastapi.lock +2084 -0
  176. graph_agents_cli/scaffold/agents/langgraph/uv-langgraph-server.lock +2106 -0
  177. graph_agents_cli/scaffold/agents/langgraph/{{cookiecutter.agent_guidance_filename}} +129 -0
  178. graph_agents_cli/scaffold/base_templates/_shared/graph-agents-cli-manifest.yaml +36 -0
  179. graph_agents_cli/scaffold/base_templates/python/.dockerignore +32 -0
  180. graph_agents_cli/scaffold/base_templates/python/.github/CODEOWNERS +30 -0
  181. graph_agents_cli/scaffold/base_templates/python/.github/agent.env +7 -0
  182. graph_agents_cli/scaffold/base_templates/python/.github/workflows/pr_checks.yaml +214 -0
  183. graph_agents_cli/scaffold/base_templates/python/.gitignore +209 -0
  184. graph_agents_cli/scaffold/base_templates/python/tests/unit/test_dummy.py +23 -0
  185. graph_agents_cli/scaffold/base_templates/python/{{cookiecutter.agent_guidance_filename}} +35 -0
  186. graph_agents_cli/scaffold/cmd_scaffold_group.py +49 -0
  187. graph_agents_cli/scaffold/commands/__init__.py +13 -0
  188. graph_agents_cli/scaffold/commands/create.py +1424 -0
  189. graph_agents_cli/scaffold/commands/enhance.py +1652 -0
  190. graph_agents_cli/scaffold/commands/upgrade.py +570 -0
  191. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/.github/agent.env +12 -0
  192. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/.github/workflows/promote-to-prod.yaml +371 -0
  193. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/.github/workflows/staging.yaml +450 -0
  194. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/argocd/application-dev.yaml +43 -0
  195. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/argocd/application-prod.yaml +41 -0
  196. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/argocd/application-staging.yaml +43 -0
  197. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/.helmignore +14 -0
  198. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/Chart.yaml +21 -0
  199. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/examples/networkpolicy.yaml +103 -0
  200. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/NOTES.txt +48 -0
  201. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/_helpers.tpl +189 -0
  202. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/certificate.yaml +15 -0
  203. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/configmap.yaml +10 -0
  204. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/deployment.yaml +199 -0
  205. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/hpa.yaml +22 -0
  206. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/httproute.yaml +30 -0
  207. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/ingress.yaml +39 -0
  208. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/networkpolicy.yaml +48 -0
  209. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/pdb.yaml +13 -0
  210. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/postgresql-secret.yaml +37 -0
  211. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/service.yaml +15 -0
  212. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/serviceaccount.yaml +13 -0
  213. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/templates/servicemonitor.yaml +42 -0
  214. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/values-dev.yaml +22 -0
  215. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/values-prod.yaml +45 -0
  216. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/values-staging.yaml +29 -0
  217. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/deployment/helm/{{cookiecutter.project_name}}/values.yaml +396 -0
  218. graph_agents_cli/scaffold/deployment_targets/kubernetes/python/tests/integration/test_chart.py +269 -0
  219. graph_agents_cli/scaffold/deployment_targets/none/README.md +5 -0
  220. graph_agents_cli/scaffold/deployment_targets/none/python/README.md +6 -0
  221. graph_agents_cli/scaffold/utils/__init__.py +13 -0
  222. graph_agents_cli/scaffold/utils/backup.py +212 -0
  223. graph_agents_cli/scaffold/utils/build_record.py +257 -0
  224. graph_agents_cli/scaffold/utils/cli_options.py +184 -0
  225. graph_agents_cli/scaffold/utils/fs.py +83 -0
  226. graph_agents_cli/scaffold/utils/generate_locks.py +214 -0
  227. graph_agents_cli/scaffold/utils/generation_metadata.py +88 -0
  228. graph_agents_cli/scaffold/utils/keyedit.py +768 -0
  229. graph_agents_cli/scaffold/utils/keymerge.py +537 -0
  230. graph_agents_cli/scaffold/utils/language.py +138 -0
  231. graph_agents_cli/scaffold/utils/lock_utils.py +94 -0
  232. graph_agents_cli/scaffold/utils/logging.py +77 -0
  233. graph_agents_cli/scaffold/utils/manifest.py +292 -0
  234. graph_agents_cli/scaffold/utils/merge.py +970 -0
  235. graph_agents_cli/scaffold/utils/merge3.py +216 -0
  236. graph_agents_cli/scaffold/utils/openapi_seed.py +199 -0
  237. graph_agents_cli/scaffold/utils/remote_template.py +376 -0
  238. graph_agents_cli/scaffold/utils/template.py +1352 -0
  239. graph_agents_cli/scaffold/utils/upgrade.py +894 -0
  240. graph_agents_cli/scaffold/utils/version.py +438 -0
  241. graph_agents_cli/secrets/__init__.py +15 -0
  242. graph_agents_cli/secrets/_apply.py +954 -0
  243. graph_agents_cli/secrets/_required.py +188 -0
  244. graph_agents_cli/secrets/cmd_secrets.py +211 -0
  245. graph_agents_cli/setup/__init__.py +13 -0
  246. graph_agents_cli/setup/_antigravity.py +221 -0
  247. graph_agents_cli/setup/cmd_auth.py +1030 -0
  248. graph_agents_cli/setup/cmd_dev_token.py +513 -0
  249. graph_agents_cli/setup/cmd_setup.py +428 -0
  250. graph_agents_cli/setup/cmd_update.py +140 -0
  251. graph_agents_cli/skills/__init__.py +13 -0
  252. graph_agents_cli/skills/_bundle.py +65 -0
  253. graph_agents_cli/skills/data/README.md +19 -0
  254. graph_agents_cli/skills/data/graph-agents-cli-deploy/SKILL.md +357 -0
  255. graph_agents_cli/skills/data/graph-agents-cli-deploy/references/github-settings.md +113 -0
  256. graph_agents_cli/skills/data/graph-agents-cli-deploy/references/gitops.md +137 -0
  257. graph_agents_cli/skills/data/graph-agents-cli-deploy/references/kubernetes.md +315 -0
  258. graph_agents_cli/skills/data/graph-agents-cli-deploy/references/secrets.md +160 -0
  259. graph_agents_cli/skills/data/graph-agents-cli-eval/SKILL.md +303 -0
  260. graph_agents_cli/skills/data/graph-agents-cli-eval/references/dataset_schema.md +282 -0
  261. graph_agents_cli/skills/data/graph-agents-cli-eval/references/metrics-guide.md +143 -0
  262. graph_agents_cli/skills/data/graph-agents-cli-langgraph-code/SKILL.md +659 -0
  263. graph_agents_cli/skills/data/graph-agents-cli-langgraph-code/references/langchain-models.md +124 -0
  264. graph_agents_cli/skills/data/graph-agents-cli-langgraph-code/references/langgraph.md +235 -0
  265. graph_agents_cli/skills/data/graph-agents-cli-langgraph-code/references/template-contract.md +477 -0
  266. graph_agents_cli/skills/data/graph-agents-cli-observability/SKILL.md +231 -0
  267. graph_agents_cli/skills/data/graph-agents-cli-observability/references/langsmith.md +46 -0
  268. graph_agents_cli/skills/data/graph-agents-cli-observability/references/otel.md +59 -0
  269. graph_agents_cli/skills/data/graph-agents-cli-scaffold/SKILL.md +414 -0
  270. graph_agents_cli/skills/data/graph-agents-cli-scaffold/references/flags.md +134 -0
  271. graph_agents_cli/skills/data/graph-agents-cli-workflow/SKILL.md +478 -0
  272. graph_agents_cli/skills/data/graph-agents-cli-workflow/references/brainstorming.md +118 -0
  273. graph_agents_cli/skills/data/graph-agents-cli-workflow/references/commands.md +419 -0
  274. graph_agents_cli/skills/data/graph-agents-cli-workflow/references/extension.md +156 -0
  275. graph_agents_cli/skills/data/graph-agents-cli-workflow/references/internals.md +67 -0
  276. graph_agents_cli/skills/data/graph-agents-cli-workflow/references/spec-template.md +56 -0
  277. graph_agents_cli/skills/data/graph-agents-cli-workflow/references/terminology.md +119 -0
  278. graph_agents_cli/system/__init__.py +15 -0
  279. graph_agents_cli/system/_apply.py +519 -0
  280. graph_agents_cli/system/_checks.py +1023 -0
  281. graph_agents_cli/system/_deploy.py +215 -0
  282. graph_agents_cli/system/_model.py +363 -0
  283. graph_agents_cli/system/_system.py +664 -0
  284. graph_agents_cli/system/_views.py +208 -0
  285. graph_agents_cli/system/cmd_system.py +423 -0
  286. graph_agents_cli-0.3.1.dist-info/METADATA +162 -0
  287. graph_agents_cli-0.3.1.dist-info/RECORD +291 -0
  288. graph_agents_cli-0.3.1.dist-info/WHEEL +4 -0
  289. graph_agents_cli-0.3.1.dist-info/entry_points.txt +2 -0
  290. graph_agents_cli-0.3.1.dist-info/licenses/LICENSE +201 -0
  291. graph_agents_cli-0.3.1.dist-info/licenses/NOTICE +19 -0
@@ -0,0 +1,428 @@
1
+ # Copyright 2026 Google LLC
2
+ # Modifications Copyright 2026 graph-agents-cli contributors
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # https://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ """graph-agents-cli setup command — install the CLI and skills via npx skills.
17
+
18
+ Skills install ladder (each step is tried only when the previous one is unavailable):
19
+
20
+ 1. ``npx skills add <source>`` from ``--skills-source``, else this repository
21
+ at the running release's tag (``<repo>#v<version>``; the default branch for a
22
+ development build), so the skills match the CLI (needs ``git`` and network).
23
+ 2. ``npx skills add <bundled dir>`` from the skills shipped inside the wheel
24
+ (needs ``npx`` only).
25
+ 3. Copy the bundled skills straight into ``~/.agents/skills`` (or
26
+ ``./.agents/skills`` with ``--workspace``) when ``npx`` is unavailable.
27
+
28
+ No authentication step: the CLI stores no credentials; run
29
+ ``graph-agents-cli login`` for the preflight instead.
30
+
31
+ The CLI itself is installed from ``install_spec()`` (a pinned git reference to
32
+ the GitHub repository, or ``GRAPH_AGENTS_CLI_INSTALL_SPEC``).
33
+ """
34
+
35
+ from __future__ import annotations
36
+
37
+ import random
38
+ import shlex
39
+ import shutil
40
+ from pathlib import Path
41
+
42
+ import click
43
+
44
+ from graph_agents_cli._runner import run
45
+ from graph_agents_cli._skills_check import SKILLS_NPX_PACKAGE
46
+ from graph_agents_cli._tools import default_skills_source, run_npx_skills
47
+ from graph_agents_cli.skills._bundle import (
48
+ SKILL_BUNDLE_DIR,
49
+ get_bundled_skills_dir,
50
+ is_skill_dir,
51
+ )
52
+
53
+ PACKAGE_NAME = "graph-agents-cli"
54
+
55
+ _MOTTOS = [
56
+ "Give your coding agent the power to build LangGraph agents.",
57
+ "From prototype to your own cluster — one CLI away.",
58
+ "Skills up. Ship faster.",
59
+ "Agent skills, installed in seconds.",
60
+ "Your coding agent just got an upgrade.",
61
+ ]
62
+
63
+
64
+ def _print_logo():
65
+ """Print the GRAPH AGENTS CLI banner with a random motto."""
66
+ click.secho(
67
+ " █▀▀ █▀█ █▀█ █▀█ █ █ █▀█ █▀▀ █▀▀ █▄ █ ▀█▀ █▀ █▀▀ █ █",
68
+ fg="blue",
69
+ bold=True,
70
+ )
71
+ click.secho(
72
+ " █▄█ █▀▄ █▀█ █▀▀ █▀█ █▀█ █▄█ ██▄ █ ▀█ █ ▄█ █▄▄ █▄ █",
73
+ fg="cyan",
74
+ bold=True,
75
+ )
76
+ click.echo()
77
+ click.echo(f" {random.choice(_MOTTOS)}")
78
+
79
+
80
+ def _print_section(number, title):
81
+ """Print a numbered section header."""
82
+ click.echo()
83
+ click.secho(f" {number}. {title}", bold=True)
84
+ click.echo(f" {'─' * (len(title) + 3)}")
85
+
86
+
87
+ def _get_source_root():
88
+ """Return the cwd if it is the graph-agents-cli repo root, else None.
89
+
90
+ Checks that a ``pyproject.toml`` with the ``graph-agents-cli`` package
91
+ name exists in the current working directory.
92
+ """
93
+ candidate = Path.cwd() / "pyproject.toml"
94
+ if candidate.is_file():
95
+ try:
96
+ text = candidate.read_text(encoding="utf-8")
97
+ if f'name = "{PACKAGE_NAME}"' in text:
98
+ return Path.cwd()
99
+ except OSError:
100
+ pass
101
+ return None
102
+
103
+
104
+ def _build_skills_args(source, *, workspace, agent):
105
+ """Build the ``npx skills add`` argument list for ``source``."""
106
+ args = ["add", source, "-y"]
107
+ if "all" in agent:
108
+ args.append("--all")
109
+ elif agent:
110
+ for a in agent:
111
+ args.extend(["--agent", a])
112
+ if not workspace:
113
+ args.append("-g")
114
+ return args
115
+
116
+
117
+ def _skills_store_dir(*, workspace):
118
+ """Return the canonical skills store (global home or workspace-relative)."""
119
+ base = Path.cwd() if workspace else Path.home()
120
+ return base / ".agents" / "skills"
121
+
122
+
123
+ def _display_path(path):
124
+ """Render ``path`` with the home directory collapsed to ``~`` for output."""
125
+ try:
126
+ return f"~/{path.relative_to(Path.home())}"
127
+ except ValueError:
128
+ return str(path)
129
+
130
+
131
+ def _copy_bundled_skills(bundled_dir, dest_root):
132
+ """Copy every bundled skill into ``dest_root``.
133
+
134
+ Returns the number of skills copied. Existing copies are replaced so the
135
+ store always reflects the version shipped with this CLI.
136
+ """
137
+ dest_root.mkdir(parents=True, exist_ok=True)
138
+ count = 0
139
+ for skill in sorted(bundled_dir.iterdir()):
140
+ if not is_skill_dir(skill):
141
+ continue
142
+ target = dest_root / skill.name
143
+ if target.exists():
144
+ shutil.rmtree(target)
145
+ shutil.copytree(skill, target)
146
+ count += 1
147
+ return count
148
+
149
+
150
+ def _install_skills(remote_source, *, workspace, agent, allow_fallback):
151
+ """Install skills, falling back progressively when the remote path fails.
152
+
153
+ 1. ``npx skills add`` from ``remote_source`` (the GitHub repo by default,
154
+ which requires ``git`` and network access).
155
+ 2. ``npx skills add`` from the skills bundled with this CLI (no ``git`` or
156
+ network needed).
157
+ 3. Copy the bundled skills straight into the ``.agents/skills`` store and
158
+ warn the user.
159
+
160
+ Fallbacks (2 and 3) are only attempted when ``allow_fallback`` is true — an
161
+ explicit ``--skills-source`` disables them so the user's chosen source is
162
+ never silently swapped for the bundled copy.
163
+
164
+ Returns the strategy that succeeded: ``"remote"``, ``"bundled"`` or ``"copy"``.
165
+ """
166
+
167
+ args = _build_skills_args(remote_source, workspace=workspace, agent=agent)
168
+ bundled_dir = get_bundled_skills_dir() if allow_fallback else None
169
+
170
+ # Remote (or explicitly requested) source
171
+ try:
172
+ run_npx_skills(args, "Installing skills")
173
+ return "remote"
174
+ except click.ClickException:
175
+ if bundled_dir is None:
176
+ raise
177
+ click.secho(f" Could not install skills from {remote_source}.", fg="yellow")
178
+ click.secho(" Falling back to the skills bundled with this CLI.", dim=True)
179
+
180
+ # Bundled skills via npx (skips a redundant identical run)
181
+ if bundled_dir.resolve() != Path(remote_source).resolve():
182
+ local_args = _build_skills_args(str(bundled_dir), workspace=workspace, agent=agent)
183
+ try:
184
+ run_npx_skills(local_args, "Installing bundled skills")
185
+ return "bundled"
186
+ except click.ClickException:
187
+ click.secho(" Could not install bundled skills via npx skills.", fg="yellow")
188
+
189
+ # Copy the bundled skills directly (no npx / git needed)
190
+ dest_root = _skills_store_dir(workspace=workspace)
191
+ copied = _copy_bundled_skills(bundled_dir, dest_root)
192
+ click.secho(
193
+ f" ⚠️ Installed {copied} skills by copying them into {_display_path(dest_root)} "
194
+ "(npx skills was unavailable).",
195
+ fg="yellow",
196
+ )
197
+ click.secho(
198
+ f" '{PACKAGE_NAME} update' may not manage these copied skills; re-run "
199
+ f"'{PACKAGE_NAME} setup' once git and npx are available.",
200
+ dim=True,
201
+ )
202
+ return "copy"
203
+
204
+
205
+ def _resolve_skills_source(skills_source, *, dev):
206
+ """Pick the skills source from the flags.
207
+
208
+ ``--skills-source`` wins; ``--dev`` uses the checkout's bundled copy;
209
+ otherwise this repository at the tag of the running release
210
+ (``default_skills_source``; the default branch for a development build).
211
+ Local paths are made absolute so ``npx skills`` sees them regardless of its
212
+ own cwd; remote references are left untouched.
213
+ """
214
+ if skills_source:
215
+ source_path = Path(skills_source)
216
+ # Only resolve to an absolute path if the source is a local file/directory
217
+ # to prevent resolving remote URIs (e.g., GitHub URLs or package identifiers).
218
+ if skills_source.startswith((".", "/")) or source_path.exists():
219
+ return str(source_path.resolve())
220
+ return skills_source
221
+ if dev:
222
+ # In dev mode, use skills from the local repo checkout
223
+ return str(SKILL_BUNDLE_DIR)
224
+ from graph_agents_cli.scaffold.utils.version import get_current_version
225
+
226
+ return default_skills_source(get_current_version())
227
+
228
+
229
+ def _cli_install_args(*, dev):
230
+ """Return the ``uv tool install`` argv for the CLI itself.
231
+
232
+ Outside ``--dev`` the CLI installs from ``install_spec()`` pinned to the
233
+ running version, so ``setup`` reproduces the CLI the user is running.
234
+ """
235
+ if dev:
236
+ project_root = _get_source_root()
237
+ if not project_root:
238
+ raise click.ClickException(
239
+ f"--dev requires running from the root of the {PACKAGE_NAME} repository"
240
+ )
241
+ return ["uv", "tool", "install", "--force", "--editable", str(project_root)]
242
+ from graph_agents_cli.scaffold.utils.version import get_current_version, install_spec
243
+
244
+ return ["uv", "tool", "install", install_spec(get_current_version())]
245
+
246
+
247
+ @click.command("setup")
248
+ @click.option(
249
+ "--workspace",
250
+ is_flag=True,
251
+ default=False,
252
+ help=(
253
+ "Install to project/workspace scope instead of global. "
254
+ "Skills are installed relative to the current directory."
255
+ ),
256
+ )
257
+ @click.option(
258
+ "--dry-run",
259
+ "--dryrun",
260
+ is_flag=True,
261
+ default=False,
262
+ help="Show what would be done without making changes.",
263
+ )
264
+ @click.option(
265
+ "--dev",
266
+ is_flag=True,
267
+ default=False,
268
+ help="Install as editable from the local repo (for contributors).",
269
+ )
270
+ @click.option(
271
+ "--skills-source",
272
+ default=None,
273
+ help=(
274
+ "Skills source: local path, GitHub owner/repo, or URL (default: this repository at "
275
+ "the running release's tag; no fallback to the bundled copy)."
276
+ ),
277
+ )
278
+ @click.option(
279
+ "--agent",
280
+ multiple=True,
281
+ help=(
282
+ "Specify the agent to install skills to (e.g. --agent claude-code --agent cursor). "
283
+ "Use 'all' to install for all supported agents."
284
+ ),
285
+ )
286
+ def cmd_setup(*, workspace, dry_run, dev, skills_source, agent):
287
+ """Install graph-agents-cli and skills to detected coding agents.
288
+
289
+ Installs the graph-agents-cli tool (via uv tool install) and detects
290
+ installed coding agents (Claude Code, Antigravity, Codex, Gemini CLI,
291
+ Cursor, etc.) to install the LangGraph development skills via npx skills.
292
+ The skills come from this repository at the tag of the running release
293
+ (the default branch for a development build), falling back to the copy
294
+ bundled with the CLI when that fails.
295
+
296
+ By default, skills are installed globally for all detected agents.
297
+ Use --workspace to install at the project level instead.
298
+ Use --agent to specify specific coding agents (e.g. --agent claude-code --agent cursor) or 'all'.
299
+ Use --dry-run to preview what would happen without executing.
300
+ Use --dev to install graph-agents-cli as editable from the local repo (for contributors).
301
+
302
+ This command stores no credentials; run 'graph-agents-cli login' to check
303
+ provider keys and kubeconfig.
304
+ """
305
+ click.echo("Setting up...")
306
+ click.echo()
307
+ _print_logo()
308
+
309
+ scope = "workspace" if workspace else "global"
310
+ source = _resolve_skills_source(skills_source, dev=dev)
311
+ args = _build_skills_args(source, workspace=workspace, agent=agent)
312
+
313
+ # ── Dry Run ──
314
+ if dry_run:
315
+ _print_section(1, "Dry Run")
316
+ click.echo()
317
+ tool_args = _cli_install_args(dev=dev)
318
+ click.echo(f" Would install {PACKAGE_NAME}{' (editable)' if dev else ''}:")
319
+ click.secho(f" ▸ {shlex.join(tool_args)}", fg="cyan", dim=True)
320
+ click.echo()
321
+ click.echo(" Would install skills:")
322
+ full_args = ["npx", "-y", SKILLS_NPX_PACKAGE, *args]
323
+ click.secho(f" ▸ {shlex.join(full_args)}", fg="cyan", dim=True)
324
+ if not skills_source:
325
+ click.secho(
326
+ f" (falls back to the bundled skills, then to a copy into "
327
+ f"{_display_path(_skills_store_dir(workspace=workspace))})",
328
+ dim=True,
329
+ )
330
+ click.echo(f" Scope: {scope}")
331
+ # Temporary compatibility step (see TODO at the real linking call below).
332
+ if not workspace and (Path.home() / ".gemini").is_dir():
333
+ click.echo(
334
+ " Would link global skills into Antigravity's skill directories "
335
+ "(~/.gemini/config/skills, ~/.gemini/antigravity-cli/skills)."
336
+ )
337
+ click.echo()
338
+ click.secho(" No changes made (dry run).", fg="yellow")
339
+ click.echo()
340
+ return
341
+
342
+ step = 1
343
+
344
+ # ── CLI Installation ──
345
+ _print_section(step, "CLI Installation")
346
+ step += 1
347
+ click.echo()
348
+ cli_installed = False
349
+ tool_args = _cli_install_args(dev=dev)
350
+ result = run(tool_args, capture=True, check=False)
351
+ stdout = result.stdout or ""
352
+ stderr = result.stderr or ""
353
+ if "already installed" in stdout.lower() or "already installed" in stderr.lower():
354
+ from graph_agents_cli.scaffold.utils.version import check_for_updates
355
+
356
+ needs_update, current, latest = check_for_updates()
357
+ if needs_update:
358
+ click.secho(
359
+ f" Installed ({current}), but {latest} is available.",
360
+ fg="yellow",
361
+ )
362
+ click.secho(
363
+ f" Run '{PACKAGE_NAME} update' to update.",
364
+ dim=True,
365
+ )
366
+ else:
367
+ click.secho(" Already installed and up to date.", dim=True)
368
+ cli_installed = True
369
+ elif result.returncode != 0:
370
+ click.secho(f" Could not install {PACKAGE_NAME} automatically.", fg="yellow")
371
+ if stderr.strip():
372
+ for line in stderr.strip().splitlines():
373
+ click.echo(f" {line}")
374
+ click.secho(f" Install manually: {shlex.join(tool_args)}", dim=True)
375
+ else:
376
+ for line in stdout.strip().splitlines():
377
+ click.echo(f" {line}")
378
+ cli_installed = True
379
+
380
+ # ── Skills Installation ──
381
+ _print_section(step, "Skills Installation")
382
+ step += 1
383
+ click.echo()
384
+
385
+ strategy = _install_skills(
386
+ source,
387
+ workspace=workspace,
388
+ agent=agent,
389
+ allow_fallback=not skills_source,
390
+ )
391
+
392
+ # ── Antigravity skill links ──
393
+ # Temporary until npx skills supports Antigravity's IDE / CLI / 2.0 paths:
394
+ # npx installs global skills to ~/.agents/skills, which Antigravity does not
395
+ # read, so mirror them into the locations the IDE/2.0 and CLI look in.
396
+ # TODO: remove once Antigravity/npx align on skill paths.
397
+ if not workspace:
398
+ from graph_agents_cli.setup._antigravity import link_skills_for_antigravity
399
+
400
+ for line in link_skills_for_antigravity():
401
+ click.echo(f" {line}")
402
+
403
+ # ── Summary ──
404
+ _print_section(step, "Summary")
405
+ click.echo()
406
+
407
+ # CLI tool status
408
+ if cli_installed:
409
+ if dev:
410
+ click.echo(f" CLI: {PACKAGE_NAME} installed (editable)")
411
+ else:
412
+ click.echo(f" CLI: {PACKAGE_NAME} installed")
413
+ else:
414
+ click.echo(f" CLI: Not installed (run: {shlex.join(tool_args)})")
415
+
416
+ # Skills status
417
+ strategy_label = {
418
+ "remote": "Installed",
419
+ "bundled": "Installed (bundled copy)",
420
+ "copy": "Installed (copied; npx unavailable)",
421
+ }[strategy]
422
+ click.echo(f" Skills: {strategy_label}")
423
+ click.echo(f" Scope: {scope}")
424
+ click.echo(f" Next: {PACKAGE_NAME} login (checks provider keys and kubeconfig)")
425
+
426
+ click.echo()
427
+ click.secho(" Done.", fg="green", bold=True)
428
+ click.echo()
@@ -0,0 +1,140 @@
1
+ # Copyright 2026 Google LLC
2
+ # Modifications Copyright 2026 graph-agents-cli contributors
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # https://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ """graph-agents-cli update command — update the skills (npx skills) and the CLI itself.
17
+
18
+ The CLI is reinstalled from ``install_spec()`` pinned to the latest GitHub
19
+ release (``uv tool install --force``) when that release is newer than the
20
+ running version; ``GRAPH_AGENTS_CLI_INSTALL_SPEC`` forces a reinstall from the
21
+ override. ``uv tool upgrade`` cannot move a git-pinned install to a new tag,
22
+ which is why the install is forced.
23
+ """
24
+
25
+ from __future__ import annotations
26
+
27
+ import os
28
+ import shlex
29
+
30
+ import click
31
+ from packaging import version as pkg_version
32
+
33
+ from graph_agents_cli._runner import run
34
+ from graph_agents_cli._tools import run_npx_skills
35
+ from graph_agents_cli._trust import require_confirmation
36
+
37
+ PACKAGE_NAME = "graph-agents-cli"
38
+
39
+
40
+ @click.command("update")
41
+ @click.option(
42
+ "--workspace",
43
+ is_flag=True,
44
+ default=False,
45
+ help="Update workspace-level skills instead of global.",
46
+ )
47
+ @require_confirmation(f"This will force-reinstall {PACKAGE_NAME} skills to all detected IDEs.")
48
+ def cmd_update(workspace, auto_approve):
49
+ """Force reinstall skills to all detected coding agents.
50
+
51
+ Refreshes the installed skills via npx skills, then reinstalls the CLI
52
+ from the latest GitHub release (best effort) and, when it did, installs
53
+ that release's skills (pinned to its tag) so the two stay in step.
54
+ """
55
+ click.echo()
56
+ args = ["update"]
57
+ if not workspace:
58
+ args.append("-g")
59
+
60
+ run_npx_skills(args, "Updating skills")
61
+
62
+ # Temporary until npx skills supports Antigravity's IDE / CLI / 2.0 paths:
63
+ # refresh the mirrored skill links so the IDE/2.0 and CLI see the update.
64
+ # TODO: remove once Antigravity/npx align on skill paths.
65
+ if not workspace:
66
+ from graph_agents_cli.setup._antigravity import link_skills_for_antigravity
67
+
68
+ for line in link_skills_for_antigravity():
69
+ click.echo(f" {line}")
70
+
71
+ # Only reached if run_npx_skills did not raise (i.e. all skills updated
72
+ # successfully). Avoid bold colors here: bold-bright-green renders as
73
+ # hard-to-read white-on-green in some Windows terminals.
74
+ click.echo()
75
+ click.secho("✓ Skills updated.", fg="green")
76
+
77
+ # Best-effort CLI upgrade: a failure (offline, not installed with uv tool)
78
+ # must not turn a successful skills update into a non-zero exit.
79
+ click.echo()
80
+ from graph_agents_cli.scaffold.utils.version import (
81
+ INSTALL_SPEC_ENV,
82
+ UNKNOWN_VERSION,
83
+ InstallSpecError,
84
+ InvalidInstallSpecError,
85
+ get_current_version,
86
+ get_latest_version,
87
+ install_spec,
88
+ )
89
+
90
+ latest = get_latest_version()
91
+ overridden = bool(os.environ.get(INSTALL_SPEC_ENV, "").strip())
92
+ if latest == UNKNOWN_VERSION and not overridden:
93
+ click.secho(
94
+ f" No {PACKAGE_NAME} release found on GitHub (offline, or none published yet); "
95
+ "the CLI was left as is.",
96
+ dim=True,
97
+ )
98
+ return
99
+ current = get_current_version()
100
+ if (
101
+ not overridden
102
+ and current != UNKNOWN_VERSION
103
+ and pkg_version.parse(latest) <= pkg_version.parse(current)
104
+ ):
105
+ click.secho(f" {PACKAGE_NAME} {current} is up to date.", dim=True)
106
+ return
107
+ try:
108
+ spec = install_spec(None if latest == UNKNOWN_VERSION else latest)
109
+ except InvalidInstallSpecError:
110
+ # A malformed override is a configuration error (exit 3), not a
111
+ # transient failure of the best-effort upgrade.
112
+ raise
113
+ except InstallSpecError as exc: # {version} in the override, no release known
114
+ click.secho(f" {exc.format_message()} The CLI was left as is.", fg="yellow")
115
+ return
116
+ cmd = ["uv", "tool", "install", "--force", spec]
117
+ result = run(cmd, check=False)
118
+ if result.returncode != 0:
119
+ click.secho(
120
+ f" Could not upgrade {PACKAGE_NAME} automatically "
121
+ f"(exit code {result.returncode}); run '{shlex.join(cmd)}' manually.",
122
+ fg="yellow",
123
+ )
124
+ return
125
+ if latest == UNKNOWN_VERSION:
126
+ return
127
+ # Skills are pinned to a release tag: move them to the one just installed.
128
+ from graph_agents_cli._tools import default_skills_source
129
+
130
+ skills_args = ["add", default_skills_source(latest), "-y"]
131
+ if not workspace:
132
+ skills_args.append("-g")
133
+ try:
134
+ run_npx_skills(skills_args, f"Installing the skills of {latest}")
135
+ except click.ClickException as exc:
136
+ click.secho(
137
+ f" Could not install the skills of {latest} ({exc.format_message()}); run "
138
+ f"'{PACKAGE_NAME} setup' with the new CLI.",
139
+ fg="yellow",
140
+ )
@@ -0,0 +1,13 @@
1
+ # Copyright 2026 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
@@ -0,0 +1,65 @@
1
+ # Copyright 2026 Google LLC
2
+ # Modifications Copyright 2026 graph-agents-cli contributors
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # https://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ """Locate the bundled graph-agents-cli skills.
17
+
18
+ The canonical skills live in ``data/`` next to this file
19
+ (``src/graph_agents_cli/skills/data/``). Because that directory is inside the
20
+ package, it's automatically bundled in the wheel - so ``graph-agents-cli setup``
21
+ can install skills with no ``git`` and no network (disconnected installs).
22
+
23
+ The repository keeps a byte-identical copy under ``skills/`` at the repo root
24
+ for ``npx skills add <repo>`` and the plugin manifests; CONTRIBUTING.md
25
+ describes how the two are kept in sync.
26
+
27
+ This module is just a small helper to locate the skills dir based on a relative
28
+ path from this module.
29
+ """
30
+
31
+ from __future__ import annotations
32
+
33
+ from pathlib import Path
34
+
35
+ SKILL_PREFIX = "graph-agents-cli-"
36
+
37
+ # Directory bundled in the wheel that holds one ``graph-agents-cli-*`` skill per
38
+ # subdirectory.
39
+ SKILL_BUNDLE_DIR = Path(__file__).resolve().parent / "data"
40
+
41
+
42
+ def is_skill_dir(path: Path) -> bool:
43
+ """Return True if ``path`` is a bundled skill directory.
44
+
45
+ A skill is a ``graph-agents-cli-*`` directory containing a ``SKILL.md``
46
+ spec.
47
+ """
48
+ return path.is_dir() and path.name.startswith(SKILL_PREFIX) and (path / "SKILL.md").is_file()
49
+
50
+
51
+ def list_bundled_skills(bundle_dir: Path | None = None) -> list[Path]:
52
+ """Return the bundled skill directories, sorted by name."""
53
+ root = bundle_dir or SKILL_BUNDLE_DIR
54
+ if not root.is_dir():
55
+ return []
56
+ return sorted(d for d in root.iterdir() if is_skill_dir(d))
57
+
58
+
59
+ def get_bundled_skills_dir() -> Path | None:
60
+ """Return the bundle directory when it exists and contains at least one skill.
61
+
62
+ Returns None otherwise, so callers can fall through to the next install
63
+ strategy instead of running ``npx skills add`` against an empty directory.
64
+ """
65
+ return SKILL_BUNDLE_DIR if list_bundled_skills() else None
@@ -0,0 +1,19 @@
1
+ # graph-agents-cli skills
2
+
3
+ Development skills for building [LangGraph](https://langchain-ai.github.io/langgraph/) agents with
4
+ graph-agents-cli and deploying them to self-hosted Kubernetes. Install into any coding agent with
5
+ `graph-agents-cli setup` or [`npx skills`](https://github.com/vercel-labs/skills).
6
+
7
+ The copy under `src/graph_agents_cli/skills/data/` is byte-identical to this directory and ships
8
+ in the wheel so `setup` works without network.
9
+
10
+ ## Skills
11
+
12
+ | Skill | Description |
13
+ |-------|-------------|
14
+ | `graph-agents-cli-workflow` | Development lifecycle (understand, scaffold, build, evaluate, deploy, observe), process deference, code preservation, model rule, approval before deploy, loop breaker |
15
+ | `graph-agents-cli-langgraph-code` | LangGraph and LangChain patterns the template uses: create_agent and StateGraph, tools with API_CALLS, checkpointers, streaming, interrupts, subgraphs, init_chat_model, the auth policy adapter, the API client |
16
+ | `graph-agents-cli-scaffold` | `create`, `scaffold enhance`, `scaffold upgrade`, every flag, the combination table, upgrade guarantees |
17
+ | `graph-agents-cli-eval` | The enforceable eval gate, dataset schema, expect checks, judge and quality metrics, exit codes, `eval submit` |
18
+ | `graph-agents-cli-deploy` | Deployment modes, environments, env-file and kube-context rules, rollouts and rollback, secrets and rotation, the Helm chart, Argo CD PR flow, GitHub settings, `infra check`, local-load clusters, disconnected profile |
19
+ | `graph-agents-cli-observability` | `TRACING_ENABLED` opt-in, `TRACE_CAPTURE`, LangSmith versus OTLP, hashed principal id, run records and retention, JSON logs, `/metrics`, `/health` and `/ready` |