claudecode-omc 5.6.4 → 5.6.6
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/.local/commands/code-review.md +416 -0
- package/.local/commands/pr.md +250 -0
- package/.local/commands/prp-pr.md +244 -0
- package/.local/guidelines/CLAUDE.md +47 -0
- package/.local/skills/prompt-optimizer/SKILL.md +23 -4
- package/bundled/manifest.json +4 -4
- package/bundled/upstream/anthropic-skills/skills/algorithmic-art/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/brand-guidelines/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/canvas-design/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/claude-api/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/claude-api/SKILL.md +120 -58
- package/bundled/upstream/anthropic-skills/skills/claude-api/curl/examples.md +9 -9
- package/bundled/upstream/anthropic-skills/skills/claude-api/curl/managed-agents.md +336 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/go/managed-agents/README.md +561 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/java/claude-api.md +2 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/java/managed-agents/README.md +442 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/php/claude-api.md +10 -10
- package/bundled/upstream/anthropic-skills/skills/claude-api/php/managed-agents/README.md +435 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/README.md +16 -16
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/batches.md +3 -3
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/files-api.md +3 -3
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/streaming.md +7 -7
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/tool-use.md +19 -19
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/managed-agents/README.md +332 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/claude-api.md +4 -4
- package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/managed-agents/README.md +389 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/agent-design.md +101 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/error-codes.md +11 -4
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/live-sources.md +60 -48
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-api-reference.md +372 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-client-patterns.md +209 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-core.md +220 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-environments.md +211 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-events.md +195 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-memory.md +197 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-multiagent.md +99 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-onboarding.md +114 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-outcomes.md +106 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-overview.md +67 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-tools.md +315 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-webhooks.md +110 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/model-migration.md +779 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/models.md +16 -14
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/prompt-caching.md +45 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/tool-use-concepts.md +28 -6
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/README.md +15 -15
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/batches.md +2 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/files-api.md +1 -1
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/streaming.md +5 -5
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/tool-use.md +15 -15
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/managed-agents/README.md +359 -0
- package/bundled/upstream/anthropic-skills/skills/internal-comms/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/mcp-builder/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/skill-creator/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/slack-gif-creator/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/theme-factory/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/web-artifacts-builder/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/webapp-testing/LICENSE.txt +1 -1
- package/bundled/upstream/ecc/.omc-source/bundle.json +2 -3
- package/bundled/upstream/ecc/.omc-source/manifests/.claude-plugin/marketplace.json +4 -4
- package/bundled/upstream/ecc/agents/a11y-architect.md +10 -2
- package/bundled/upstream/ecc/agents/architect.md +9 -0
- package/bundled/upstream/ecc/agents/build-error-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/chief-of-staff.md +9 -0
- package/bundled/upstream/ecc/agents/code-architect.md +9 -0
- package/bundled/upstream/ecc/agents/code-explorer.md +10 -1
- package/bundled/upstream/ecc/agents/code-reviewer.md +87 -1
- package/bundled/upstream/ecc/agents/code-simplifier.md +9 -0
- package/bundled/upstream/ecc/agents/comment-analyzer.md +10 -1
- package/bundled/upstream/ecc/agents/conversation-analyzer.md +9 -0
- package/bundled/upstream/ecc/agents/cpp-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/cpp-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/csharp-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/dart-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/database-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/django-build-resolver.md +252 -0
- package/bundled/upstream/ecc/agents/django-reviewer.md +169 -0
- package/bundled/upstream/ecc/agents/doc-updater.md +9 -0
- package/bundled/upstream/ecc/agents/docs-lookup.md +9 -0
- package/bundled/upstream/ecc/agents/e2e-runner.md +9 -0
- package/bundled/upstream/ecc/agents/fastapi-reviewer.md +79 -0
- package/bundled/upstream/ecc/agents/flutter-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/fsharp-reviewer.md +109 -0
- package/bundled/upstream/ecc/agents/gan-evaluator.md +9 -0
- package/bundled/upstream/ecc/agents/gan-generator.md +9 -0
- package/bundled/upstream/ecc/agents/gan-planner.md +9 -0
- package/bundled/upstream/ecc/agents/go-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/go-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/harmonyos-app-resolver.md +182 -0
- package/bundled/upstream/ecc/agents/harness-optimizer.md +9 -0
- package/bundled/upstream/ecc/agents/healthcare-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/homelab-architect.md +107 -0
- package/bundled/upstream/ecc/agents/java-build-resolver.md +133 -11
- package/bundled/upstream/ecc/agents/java-reviewer.md +130 -32
- package/bundled/upstream/ecc/agents/kotlin-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/kotlin-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/loop-operator.md +9 -0
- package/bundled/upstream/ecc/agents/mle-reviewer.md +162 -0
- package/bundled/upstream/ecc/agents/network-architect.md +106 -0
- package/bundled/upstream/ecc/agents/network-config-reviewer.md +106 -0
- package/bundled/upstream/ecc/agents/network-troubleshooter.md +128 -0
- package/bundled/upstream/ecc/agents/opensource-forker.md +9 -0
- package/bundled/upstream/ecc/agents/opensource-packager.md +9 -0
- package/bundled/upstream/ecc/agents/opensource-sanitizer.md +9 -0
- package/bundled/upstream/ecc/agents/performance-optimizer.md +9 -0
- package/bundled/upstream/ecc/agents/planner.md +9 -0
- package/bundled/upstream/ecc/agents/pr-test-analyzer.md +9 -0
- package/bundled/upstream/ecc/agents/python-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/pytorch-build-resolver.md +12 -3
- package/bundled/upstream/ecc/agents/refactor-cleaner.md +9 -0
- package/bundled/upstream/ecc/agents/rust-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/rust-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/security-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/seo-specialist.md +10 -1
- package/bundled/upstream/ecc/agents/silent-failure-hunter.md +9 -0
- package/bundled/upstream/ecc/agents/swift-build-resolver.md +170 -0
- package/bundled/upstream/ecc/agents/swift-reviewer.md +116 -0
- package/bundled/upstream/ecc/agents/tdd-guide.md +9 -0
- package/bundled/upstream/ecc/agents/type-design-analyzer.md +10 -1
- package/bundled/upstream/ecc/agents/typescript-reviewer.md +9 -0
- package/bundled/upstream/ecc/commands/auto-update.md +28 -0
- package/bundled/upstream/ecc/commands/build-fix.md +4 -0
- package/bundled/upstream/ecc/commands/checkpoint.md +4 -0
- package/bundled/upstream/ecc/commands/code-review.md +3 -3
- package/bundled/upstream/ecc/commands/cost-report.md +107 -0
- package/bundled/upstream/ecc/commands/cpp-build.md +1 -1
- package/bundled/upstream/ecc/commands/cpp-test.md +1 -1
- package/bundled/upstream/ecc/commands/ecc-guide.md +93 -0
- package/bundled/upstream/ecc/commands/fastapi-review.md +39 -0
- package/bundled/upstream/ecc/commands/flutter-build.md +1 -1
- package/bundled/upstream/ecc/commands/flutter-test.md +1 -1
- package/bundled/upstream/ecc/commands/gan-build.md +4 -0
- package/bundled/upstream/ecc/commands/gan-design.md +4 -0
- package/bundled/upstream/ecc/commands/go-build.md +1 -1
- package/bundled/upstream/ecc/commands/go-test.md +1 -1
- package/bundled/upstream/ecc/commands/harness-audit.md +4 -0
- package/bundled/upstream/ecc/commands/jira.md +2 -2
- package/bundled/upstream/ecc/commands/kotlin-build.md +1 -1
- package/bundled/upstream/ecc/commands/kotlin-test.md +1 -1
- package/bundled/upstream/ecc/commands/learn.md +4 -0
- package/bundled/upstream/ecc/commands/loop-start.md +4 -0
- package/bundled/upstream/ecc/commands/loop-status.md +54 -1
- package/bundled/upstream/ecc/commands/model-route.md +4 -0
- package/bundled/upstream/ecc/commands/multi-backend.md +4 -0
- package/bundled/upstream/ecc/commands/multi-execute.md +4 -0
- package/bundled/upstream/ecc/commands/multi-frontend.md +4 -0
- package/bundled/upstream/ecc/commands/multi-plan.md +4 -0
- package/bundled/upstream/ecc/commands/multi-workflow.md +4 -0
- package/bundled/upstream/ecc/commands/plan-prd.md +160 -0
- package/bundled/upstream/ecc/commands/plan.md +96 -13
- package/bundled/upstream/ecc/commands/pm2.md +4 -0
- package/bundled/upstream/ecc/commands/pr.md +184 -0
- package/bundled/upstream/ecc/commands/project-init.md +86 -0
- package/bundled/upstream/ecc/commands/python-review.md +1 -1
- package/bundled/upstream/ecc/commands/quality-gate.md +4 -0
- package/bundled/upstream/ecc/commands/refactor-clean.md +4 -0
- package/bundled/upstream/ecc/commands/rust-build.md +1 -1
- package/bundled/upstream/ecc/commands/rust-test.md +1 -1
- package/bundled/upstream/ecc/commands/security-scan.md +92 -0
- package/bundled/upstream/ecc/commands/sessions.md +6 -6
- package/bundled/upstream/ecc/commands/skill-health.md +3 -3
- package/bundled/upstream/ecc/commands/test-coverage.md +4 -0
- package/bundled/upstream/ecc/commands/update-codemaps.md +4 -0
- package/bundled/upstream/ecc/commands/update-docs.md +4 -0
- package/bundled/upstream/ecc/skills/accessibility/SKILL.md +1 -1
- package/bundled/upstream/ecc/skills/agent-architecture-audit/SKILL.md +256 -0
- package/bundled/upstream/ecc/skills/agent-payment-x402/SKILL.md +49 -3
- package/bundled/upstream/ecc/skills/agentic-os/SKILL.md +387 -0
- package/bundled/upstream/ecc/skills/angular-developer/SKILL.md +154 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/angular-animations.md +160 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/angular-aria.md +410 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/cli.md +86 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/component-harnesses.md +59 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/component-styling.md +91 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/components.md +117 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/creating-services.md +97 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/data-resolvers.md +69 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/define-routes.md +67 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/defining-providers.md +72 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/di-fundamentals.md +120 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/e2e-testing.md +56 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/effects.md +83 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/hierarchical-injectors.md +43 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/host-elements.md +80 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/injection-context.md +63 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/inputs.md +101 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/linked-signal.md +59 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/loading-strategies.md +61 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/mcp.md +108 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/navigate-to-routes.md +69 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/outputs.md +86 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/reactive-forms.md +122 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/rendering-strategies.md +44 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/resource.md +77 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/route-animations.md +56 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/route-guards.md +52 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/router-lifecycle.md +45 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/router-testing.md +87 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/show-routes-with-outlets.md +68 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/signal-forms.md +795 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/signals-overview.md +94 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/tailwind-css.md +69 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/template-driven-forms.md +114 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/testing-fundamentals.md +65 -0
- package/bundled/upstream/ecc/skills/autonomous-agent-harness/SKILL.md +6 -0
- package/bundled/upstream/ecc/skills/backend-patterns/SKILL.md +8 -45
- package/bundled/upstream/ecc/skills/cisco-ios-patterns/SKILL.md +163 -0
- package/bundled/upstream/ecc/skills/configure-ecc/SKILL.md +31 -14
- package/bundled/upstream/ecc/skills/continuous-learning/SKILL.md +10 -2
- package/bundled/upstream/ecc/skills/continuous-learning-v2/SKILL.md +19 -5
- package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/observer-loop.sh +44 -4
- package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/observer.md +4 -4
- package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/start-observer.sh +5 -1
- package/bundled/upstream/ecc/skills/continuous-learning-v2/hooks/observe.sh +21 -5
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/detect-project.sh +58 -13
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/instinct-cli.py +97 -4
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/lib/homunculus-dir.sh +31 -0
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/migrate-homunculus.sh +62 -0
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/test_parse_instinct.py +34 -0
- package/bundled/upstream/ecc/skills/cost-tracking/SKILL.md +147 -0
- package/bundled/upstream/ecc/skills/deep-research/SKILL.md +4 -0
- package/bundled/upstream/ecc/skills/defi-amm-security/SKILL.md +6 -0
- package/bundled/upstream/ecc/skills/django-celery/SKILL.md +457 -0
- package/bundled/upstream/ecc/skills/ecc-guide/SKILL.md +189 -0
- package/bundled/upstream/ecc/skills/error-handling/SKILL.md +376 -0
- package/bundled/upstream/ecc/skills/exa-search/SKILL.md +4 -0
- package/bundled/upstream/ecc/skills/fal-ai-media/SKILL.md +4 -0
- package/bundled/upstream/ecc/skills/fastapi-patterns/SKILL.md +327 -0
- package/bundled/upstream/ecc/skills/flox-environments/SKILL.md +496 -0
- package/bundled/upstream/ecc/skills/frontend-design-direction/SKILL.md +92 -0
- package/bundled/upstream/ecc/skills/frontend-slides/animation-patterns.md +122 -0
- package/bundled/upstream/ecc/skills/frontend-slides/html-template.md +419 -0
- package/bundled/upstream/ecc/skills/frontend-slides/scripts/export-pdf.sh +418 -0
- package/bundled/upstream/ecc/skills/frontend-slides/scripts/extract-pptx.py +96 -0
- package/bundled/upstream/ecc/skills/frontend-slides/viewport-base.css +153 -0
- package/bundled/upstream/ecc/skills/fsharp-testing/SKILL.md +280 -0
- package/bundled/upstream/ecc/skills/gateguard/SKILL.md +4 -0
- package/bundled/upstream/ecc/skills/hermes-imports/SKILL.md +88 -0
- package/bundled/upstream/ecc/skills/homelab-network-readiness/SKILL.md +169 -0
- package/bundled/upstream/ecc/skills/homelab-network-setup/SKILL.md +129 -0
- package/bundled/upstream/ecc/skills/homelab-pihole-dns/SKILL.md +274 -0
- package/bundled/upstream/ecc/skills/homelab-vlan-segmentation/SKILL.md +311 -0
- package/bundled/upstream/ecc/skills/homelab-wireguard-vpn/SKILL.md +305 -0
- package/bundled/upstream/ecc/skills/ios-icon-gen/SKILL.md +157 -0
- package/bundled/upstream/ecc/skills/ios-icon-gen/scripts/generate_icons.swift +258 -0
- package/bundled/upstream/ecc/skills/ios-icon-gen/scripts/iconify_gen.sh +235 -0
- package/bundled/upstream/ecc/skills/java-coding-standards/SKILL.md +241 -5
- package/bundled/upstream/ecc/skills/make-interfaces-feel-better/SKILL.md +151 -0
- package/bundled/upstream/ecc/skills/mle-workflow/SKILL.md +346 -0
- package/bundled/upstream/ecc/skills/motion-advanced/SKILL.md +596 -0
- package/bundled/upstream/ecc/skills/motion-foundations/SKILL.md +299 -0
- package/bundled/upstream/ecc/skills/motion-patterns/SKILL.md +435 -0
- package/bundled/upstream/ecc/skills/motion-ui/SKILL.md +575 -0
- package/bundled/upstream/ecc/skills/mysql-patterns/SKILL.md +412 -0
- package/bundled/upstream/ecc/skills/netmiko-ssh-automation/SKILL.md +173 -0
- package/bundled/upstream/ecc/skills/network-bgp-diagnostics/SKILL.md +167 -0
- package/bundled/upstream/ecc/skills/network-config-validation/SKILL.md +210 -0
- package/bundled/upstream/ecc/skills/network-interface-health/SKILL.md +152 -0
- package/bundled/upstream/ecc/skills/openclaw-persona-forge/SKILL.md +1 -9
- package/bundled/upstream/ecc/skills/plan-orchestrate/SKILL.md +262 -0
- package/bundled/upstream/ecc/skills/prisma-patterns/SKILL.md +371 -0
- package/bundled/upstream/ecc/skills/production-audit/SKILL.md +206 -0
- package/bundled/upstream/ecc/skills/prompt-optimizer/SKILL.md +24 -400
- package/bundled/upstream/ecc/skills/quarkus-patterns/SKILL.md +722 -0
- package/bundled/upstream/ecc/skills/quarkus-security/SKILL.md +467 -0
- package/bundled/upstream/ecc/skills/quarkus-tdd/SKILL.md +811 -0
- package/bundled/upstream/ecc/skills/quarkus-verification/SKILL.md +479 -0
- package/bundled/upstream/ecc/skills/redis-patterns/SKILL.md +403 -0
- package/bundled/upstream/ecc/skills/scientific-db-pubmed-database/SKILL.md +175 -0
- package/bundled/upstream/ecc/skills/scientific-db-uspto-database/SKILL.md +177 -0
- package/bundled/upstream/ecc/skills/scientific-pkg-gget/SKILL.md +166 -0
- package/bundled/upstream/ecc/skills/scientific-thinking-literature-review/SKILL.md +192 -0
- package/bundled/upstream/ecc/skills/scientific-thinking-scholar-evaluation/SKILL.md +160 -0
- package/bundled/upstream/ecc/skills/search-first/SKILL.md +23 -2
- package/bundled/upstream/ecc/skills/security-review/SKILL.md +10 -2
- package/bundled/upstream/ecc/skills/skill-comply/scripts/runner.py +28 -3
- package/bundled/upstream/ecc/skills/skill-comply/tests/test_runner.py +172 -0
- package/bundled/upstream/ecc/skills/skill-scout/SKILL.md +140 -0
- package/bundled/upstream/ecc/skills/skill-stocktake/SKILL.md +1 -0
- package/bundled/upstream/ecc/skills/strategic-compact/SKILL.md +2 -2
- package/bundled/upstream/ecc/skills/tinystruct-patterns/SKILL.md +203 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/architecture.md +90 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/data-handling.md +60 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/database.md +99 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/routing.md +64 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/system-usage.md +97 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/testing.md +72 -0
- package/bundled/upstream/ecc/skills/ui-to-vue/SKILL.md +134 -0
- package/bundled/upstream/ecc/skills/vite-patterns/SKILL.md +449 -0
- package/bundled/upstream/ecc/skills/windows-desktop-e2e/SKILL.md +788 -0
- package/bundled/upstream/ecc/skills/x-api/SKILL.md +4 -0
- package/bundled/upstream/oh-my-claudecode/.omc-source/bundle.json +20 -0
- package/bundled/upstream/oh-my-claudecode/agents/analyst.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/architect.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/code-reviewer.md +26 -7
- package/bundled/upstream/oh-my-claudecode/agents/critic.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/debugger.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/designer.md +14 -1
- package/bundled/upstream/oh-my-claudecode/agents/document-specialist.md +1 -1
- package/bundled/upstream/oh-my-claudecode/agents/executor.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/explore.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/git-master.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/planner.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/qa-tester.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/scientist.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/security-reviewer.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/test-engineer.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/tracer.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/verifier.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/writer.md +2 -1
- package/bundled/upstream/oh-my-claudecode/skills/AGENTS.md +4 -3
- package/bundled/upstream/oh-my-claudecode/skills/ai-slop-cleaner/SKILL.md +12 -0
- package/bundled/upstream/oh-my-claudecode/skills/deep-dive/SKILL.md +69 -13
- package/bundled/upstream/oh-my-claudecode/skills/deep-interview/SKILL.md +176 -63
- package/bundled/upstream/oh-my-claudecode/skills/learner/SKILL.md +3 -1
- package/bundled/upstream/oh-my-claudecode/skills/omc-doctor/SKILL.md +22 -3
- package/bundled/upstream/oh-my-claudecode/skills/omc-reference/SKILL.md +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/01-install-claude-md.md +2 -2
- package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/02-configure.md +45 -2
- package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/03-integrations.md +46 -5
- package/bundled/upstream/oh-my-claudecode/skills/plan/SKILL.md +19 -17
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/config.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/parse.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/azure-devops.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/bitbucket.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/gitea.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/github.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/gitlab.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/interface.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/jira.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/session.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/tmux.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/worktree.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/psm.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/tests/test-psm-prompt-injection.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/ralph/SKILL.md +8 -8
- package/bundled/upstream/oh-my-claudecode/skills/ralplan/SKILL.md +9 -5
- package/bundled/upstream/oh-my-claudecode/skills/skill/SKILL.md +6 -6
- package/bundled/upstream/oh-my-claudecode/skills/skillify/SKILL.md +19 -3
- package/bundled/upstream/oh-my-claudecode/skills/trace/SKILL.md +3 -1
- package/bundled/upstream/oh-my-claudecode/skills/ultrawork/SKILL.md +20 -7
- package/bundled/upstream/superpowers/.omc-source/bundle.json +21 -0
- package/bundled/upstream/superpowers/hooks/hooks-cursor.json +1 -1
- package/bundled/upstream/superpowers/skills/executing-plans/SKILL.md +1 -1
- package/bundled/upstream/superpowers/skills/finishing-a-development-branch/SKILL.md +93 -42
- package/bundled/upstream/superpowers/skills/requesting-code-review/SKILL.md +7 -9
- package/bundled/upstream/superpowers/skills/requesting-code-review/code-reviewer.md +107 -85
- package/bundled/upstream/superpowers/skills/subagent-driven-development/SKILL.md +3 -1
- package/bundled/upstream/superpowers/skills/subagent-driven-development/code-quality-reviewer-prompt.md +2 -3
- package/bundled/upstream/superpowers/skills/systematic-debugging/CREATION-LOG.md +1 -1
- package/bundled/upstream/superpowers/skills/systematic-debugging/root-cause-tracing.md +1 -1
- package/bundled/upstream/superpowers/skills/using-git-worktrees/SKILL.md +95 -98
- package/bundled/upstream/superpowers/skills/using-superpowers/references/codex-tools.md +7 -48
- package/bundled/upstream/superpowers/skills/using-superpowers/references/copilot-tools.md +1 -11
- package/bundled/upstream/superpowers/skills/using-superpowers/references/gemini-tools.md +21 -3
- package/bundled/upstream/superpowers/skills/writing-plans/SKILL.md +1 -1
- package/package.json +1 -1
- package/src/cli/index.js +1 -0
- package/src/cli/setup.js +9 -0
- package/src/cli/skill-index.js +209 -0
- package/src/cli/skill.js +4 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/agent-sdk/README.md +0 -355
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/agent-sdk/patterns.md +0 -359
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/agent-sdk/README.md +0 -297
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/agent-sdk/patterns.md +0 -209
- package/bundled/upstream/ecc/commands/agent-sort.md +0 -23
- package/bundled/upstream/ecc/commands/claw.md +0 -23
- package/bundled/upstream/ecc/commands/context-budget.md +0 -23
- package/bundled/upstream/ecc/commands/devfleet.md +0 -23
- package/bundled/upstream/ecc/commands/docs.md +0 -23
- package/bundled/upstream/ecc/commands/e2e.md +0 -268
- package/bundled/upstream/ecc/commands/eval.md +0 -23
- package/bundled/upstream/ecc/commands/orchestrate.md +0 -135
- package/bundled/upstream/ecc/commands/prompt-optimize.md +0 -23
- package/bundled/upstream/ecc/commands/rules-distill.md +0 -20
- package/bundled/upstream/ecc/commands/tdd.md +0 -231
- package/bundled/upstream/ecc/commands/verify.md +0 -23
- package/bundled/upstream/ecc/skills/claude-api/SKILL.md +0 -337
- package/bundled/upstream/ecc/skills/frontend-design/SKILL.md +0 -145
- package/bundled/upstream/superpowers/agents/code-reviewer.md +0 -48
- package/bundled/upstream/superpowers/commands/brainstorm.md +0 -5
- package/bundled/upstream/superpowers/commands/execute-plan.md +0 -5
- package/bundled/upstream/superpowers/commands/write-plan.md +0 -5
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
# Managed Agents — PHP
|
|
2
|
+
|
|
3
|
+
> **Bindings not shown here:** This README covers the most common managed-agents flows for PHP. If you need a class, method, namespace, field, or behavior that isn't shown, WebFetch the PHP SDK repo **or the relevant docs page** from `shared/live-sources.md` rather than guess. Do not extrapolate from cURL shapes or another language's SDK.
|
|
4
|
+
|
|
5
|
+
> **Agents are persistent — create once, reference by ID.** Store the agent ID returned by `$client->beta->agents->create` and pass it to every subsequent `->sessions->create`; do not call `agents->create` in the request path. The Anthropic CLI is one convenient way to create agents and environments from version-controlled YAML — its URL is in `shared/live-sources.md`. The examples below show in-code creation for completeness; in production the create call belongs in setup, not in the request path.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
composer require "anthropic-ai/sdk"
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Client Initialization
|
|
14
|
+
|
|
15
|
+
```php
|
|
16
|
+
use Anthropic\Client;
|
|
17
|
+
|
|
18
|
+
// Default (uses ANTHROPIC_API_KEY env var)
|
|
19
|
+
$client = new Client();
|
|
20
|
+
|
|
21
|
+
// Explicit API key
|
|
22
|
+
$client = new Client(apiKey: 'your-api-key');
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Create an Environment
|
|
28
|
+
|
|
29
|
+
```php
|
|
30
|
+
$environment = $client->beta->environments->create(
|
|
31
|
+
name: 'my-dev-env',
|
|
32
|
+
config: ['type' => 'cloud', 'networking' => ['type' => 'unrestricted']],
|
|
33
|
+
);
|
|
34
|
+
echo "Environment ID: {$environment->id}\n"; // env_...
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Create an Agent (required first step)
|
|
40
|
+
|
|
41
|
+
> ⚠️ **There is no inline agent config.** `model`/`system`/`tools` live on the agent object, not the session. Always start with `$client->beta->agents->create()` — the session takes either `agent: $agent->id` or the typed `BetaManagedAgentsAgentParams::with(type: 'agent', id: $agent->id, version: $agent->version)`.
|
|
42
|
+
|
|
43
|
+
### Minimal
|
|
44
|
+
|
|
45
|
+
```php
|
|
46
|
+
use Anthropic\Beta\Agents\BetaManagedAgentsAgentToolset20260401Params;
|
|
47
|
+
|
|
48
|
+
// 1. Create the agent (reusable, versioned)
|
|
49
|
+
$agent = $client->beta->agents->create(
|
|
50
|
+
name: 'Coding Assistant',
|
|
51
|
+
model: 'claude-opus-4-7',
|
|
52
|
+
system: 'You are a helpful coding assistant.',
|
|
53
|
+
tools: [
|
|
54
|
+
BetaManagedAgentsAgentToolset20260401Params::with(
|
|
55
|
+
type: 'agent_toolset_20260401',
|
|
56
|
+
),
|
|
57
|
+
],
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
// 2. Start a session
|
|
61
|
+
$session = $client->beta->sessions->create(
|
|
62
|
+
agent: ['type' => 'agent', 'id' => $agent->id, 'version' => $agent->version],
|
|
63
|
+
environmentID: $environment->id,
|
|
64
|
+
title: 'Quickstart session',
|
|
65
|
+
);
|
|
66
|
+
echo "Session ID: {$session->id}\n";
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Updating an Agent
|
|
70
|
+
|
|
71
|
+
Updates create new versions; the agent object is immutable per version.
|
|
72
|
+
|
|
73
|
+
```php
|
|
74
|
+
$updatedAgent = $client->beta->agents->update(
|
|
75
|
+
$agent->id,
|
|
76
|
+
version: $agent->version,
|
|
77
|
+
system: 'You are a helpful coding agent. Always write tests.',
|
|
78
|
+
);
|
|
79
|
+
echo "New version: {$updatedAgent->version}\n";
|
|
80
|
+
|
|
81
|
+
// List all versions
|
|
82
|
+
foreach ($client->beta->agents->versions->list($agent->id)->pagingEachItem() as $version) {
|
|
83
|
+
echo "Version {$version->version}: {$version->updatedAt->format(DateTimeInterface::ATOM)}\n";
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Archive the agent
|
|
87
|
+
$archived = $client->beta->agents->archive($agent->id);
|
|
88
|
+
echo "Archived at: {$archived->archivedAt->format(DateTimeInterface::ATOM)}\n";
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Send a User Message
|
|
94
|
+
|
|
95
|
+
```php
|
|
96
|
+
$client->beta->sessions->events->send(
|
|
97
|
+
$session->id,
|
|
98
|
+
events: [
|
|
99
|
+
[
|
|
100
|
+
'type' => 'user.message',
|
|
101
|
+
'content' => [['type' => 'text', 'text' => 'Review the auth module']],
|
|
102
|
+
],
|
|
103
|
+
],
|
|
104
|
+
);
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
> 💡 **Stream-first:** Open the stream *before* (or concurrently with) sending the message. The stream only delivers events that occur after it opens — stream-after-send means early events arrive buffered in one batch. See [Steering Patterns](../../shared/managed-agents-events.md#steering-patterns).
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Stream Events (SSE)
|
|
112
|
+
|
|
113
|
+
> ℹ️ **Streaming transporter:** PHP's default buffered PSR-18 client never returns for the open-ended session event stream. Use a streaming Guzzle transporter for `streamStream()` calls — other calls keep the default client.
|
|
114
|
+
|
|
115
|
+
```php
|
|
116
|
+
$streamingClient = new GuzzleHttp\Client(['stream' => true]);
|
|
117
|
+
|
|
118
|
+
// Open the stream first, then send the user message
|
|
119
|
+
$stream = $client->beta->sessions->events->streamStream(
|
|
120
|
+
$session->id,
|
|
121
|
+
requestOptions: ['transporter' => $streamingClient],
|
|
122
|
+
);
|
|
123
|
+
$client->beta->sessions->events->send(
|
|
124
|
+
$session->id,
|
|
125
|
+
events: [
|
|
126
|
+
[
|
|
127
|
+
'type' => 'user.message',
|
|
128
|
+
'content' => [['type' => 'text', 'text' => 'Summarize the repo README']],
|
|
129
|
+
],
|
|
130
|
+
],
|
|
131
|
+
);
|
|
132
|
+
|
|
133
|
+
foreach ($stream as $event) {
|
|
134
|
+
match ($event->type) {
|
|
135
|
+
'agent.message' => array_walk(
|
|
136
|
+
$event->content,
|
|
137
|
+
static fn($block) => $block->type === 'text' ? print($block->text) : null,
|
|
138
|
+
),
|
|
139
|
+
'agent.tool_use' => print("\n[Using tool: {$event->name}]\n"),
|
|
140
|
+
'session.error' => printf("\n[Error: %s]", $event->error?->message ?? 'unknown'),
|
|
141
|
+
default => null,
|
|
142
|
+
};
|
|
143
|
+
if ($event->type === 'session.status_idle' || $event->type === 'session.error') {
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
$stream->close();
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Reconnecting and Tailing
|
|
151
|
+
|
|
152
|
+
When reconnecting mid-session, list past events first to dedupe, then tail live events:
|
|
153
|
+
|
|
154
|
+
```php
|
|
155
|
+
$stream = $client->beta->sessions->events->streamStream(
|
|
156
|
+
$session->id,
|
|
157
|
+
requestOptions: ['transporter' => $streamingClient],
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
// Stream is open and buffering. List history before tailing live.
|
|
161
|
+
$seenEventIds = [];
|
|
162
|
+
foreach ($client->beta->sessions->events->list($session->id)->pagingEachItem() as $event) {
|
|
163
|
+
$seenEventIds[$event->id] = true;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Tail live events, skipping anything already seen
|
|
167
|
+
foreach ($stream as $event) {
|
|
168
|
+
if (isset($seenEventIds[$event->id])) {
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
$seenEventIds[$event->id] = true;
|
|
172
|
+
match ($event->type) {
|
|
173
|
+
'agent.message' => array_walk(
|
|
174
|
+
$event->content,
|
|
175
|
+
static fn($block) => $block->type === 'text' ? print($block->text) : null,
|
|
176
|
+
),
|
|
177
|
+
default => null,
|
|
178
|
+
};
|
|
179
|
+
if ($event->type === 'session.status_idle') {
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
$stream->close();
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Provide Custom Tool Result
|
|
189
|
+
|
|
190
|
+
> ℹ️ The PHP managed-agents bindings for `user.custom_tool_result` are not yet documented in this skill or in the apps source examples. Refer to `shared/managed-agents-events.md` for the wire format and the `anthropic-ai/sdk` PHP repository for the corresponding params.
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Poll Events
|
|
195
|
+
|
|
196
|
+
```php
|
|
197
|
+
foreach ($client->beta->sessions->events->list($session->id)->pagingEachItem() as $event) {
|
|
198
|
+
echo "{$event->type}: {$event->id}\n";
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Upload a File
|
|
205
|
+
|
|
206
|
+
> ℹ️ **PHP file upload:** The PHP SDK's beta managed-agents file upload binding is not shown in the apps source examples; the canonical PHP example uses raw cURL against `POST /v1/files`. If your codebase prefers the SDK, WebFetch the `anthropic-ai/sdk` PHP repository for the latest binding before writing code.
|
|
207
|
+
|
|
208
|
+
```php
|
|
209
|
+
use Anthropic\Beta\Sessions\BetaManagedAgentsFileResourceParams;
|
|
210
|
+
|
|
211
|
+
// Raw cURL upload (canonical example from the apps source)
|
|
212
|
+
$csvPath = 'data.csv';
|
|
213
|
+
$ch = curl_init('https://api.anthropic.com/v1/files');
|
|
214
|
+
curl_setopt_array($ch, [
|
|
215
|
+
CURLOPT_RETURNTRANSFER => true,
|
|
216
|
+
CURLOPT_POST => true,
|
|
217
|
+
CURLOPT_HTTPHEADER => [
|
|
218
|
+
'x-api-key: ' . getenv('ANTHROPIC_API_KEY'),
|
|
219
|
+
'anthropic-version: 2023-06-01',
|
|
220
|
+
'anthropic-beta: files-api-2025-04-14',
|
|
221
|
+
],
|
|
222
|
+
CURLOPT_POSTFIELDS => ['file' => new CURLFile($csvPath, 'text/csv', 'data.csv')],
|
|
223
|
+
]);
|
|
224
|
+
$file = json_decode(curl_exec($ch));
|
|
225
|
+
echo "File ID: {$file->id}\n";
|
|
226
|
+
|
|
227
|
+
// Mount in a session
|
|
228
|
+
$session = $client->beta->sessions->create(
|
|
229
|
+
agent: $agent->id,
|
|
230
|
+
environmentID: $environment->id,
|
|
231
|
+
resources: [
|
|
232
|
+
BetaManagedAgentsFileResourceParams::with(
|
|
233
|
+
type: 'file',
|
|
234
|
+
fileID: $file->id,
|
|
235
|
+
mountPath: '/workspace/data.csv',
|
|
236
|
+
),
|
|
237
|
+
],
|
|
238
|
+
);
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Add and Manage Resources on an Existing Session
|
|
242
|
+
|
|
243
|
+
```php
|
|
244
|
+
// Attach an additional file to an open session
|
|
245
|
+
$resource = $client->beta->sessions->resources->add(
|
|
246
|
+
$session->id,
|
|
247
|
+
type: 'file',
|
|
248
|
+
fileID: $file->id,
|
|
249
|
+
);
|
|
250
|
+
echo "{$resource->id}\n"; // "sesrsc_01ABC..."
|
|
251
|
+
|
|
252
|
+
// List resources on the session
|
|
253
|
+
$listed = $client->beta->sessions->resources->list($session->id);
|
|
254
|
+
foreach ($listed->data as $entry) {
|
|
255
|
+
echo "{$entry->id} {$entry->type}\n";
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// Detach a resource
|
|
259
|
+
$client->beta->sessions->resources->delete($resource->id, sessionID: $session->id);
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## List and Download Session Files
|
|
265
|
+
|
|
266
|
+
> ℹ️ Listing and downloading files an agent wrote during a session is not yet documented for PHP in this skill or in the apps source examples. See `shared/managed-agents-events.md` and the `anthropic-ai/sdk` PHP repository for the file list/download bindings.
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## Session Management
|
|
271
|
+
|
|
272
|
+
```php
|
|
273
|
+
// List environments
|
|
274
|
+
$environments = $client->beta->environments->list();
|
|
275
|
+
|
|
276
|
+
// Retrieve a specific environment
|
|
277
|
+
$env = $client->beta->environments->retrieve($environment->id);
|
|
278
|
+
|
|
279
|
+
// Archive an environment (read-only, existing sessions continue)
|
|
280
|
+
$client->beta->environments->archive($environment->id);
|
|
281
|
+
|
|
282
|
+
// Delete an environment (only if no sessions reference it)
|
|
283
|
+
$client->beta->environments->delete($environment->id);
|
|
284
|
+
|
|
285
|
+
// Delete a session
|
|
286
|
+
$client->beta->sessions->delete($session->id);
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## MCP Server Integration
|
|
292
|
+
|
|
293
|
+
```php
|
|
294
|
+
use Anthropic\Beta\Agents\BetaManagedAgentsAgentToolset20260401Params;
|
|
295
|
+
use Anthropic\Beta\Agents\BetaManagedAgentsMCPToolsetParams;
|
|
296
|
+
use Anthropic\Beta\Agents\BetaManagedAgentsUrlmcpServerParams;
|
|
297
|
+
use Anthropic\Beta\Sessions\BetaManagedAgentsAgentParams;
|
|
298
|
+
|
|
299
|
+
// Agent declares MCP server (no auth here — auth goes in a vault)
|
|
300
|
+
$agent = $client->beta->agents->create(
|
|
301
|
+
name: 'GitHub Assistant',
|
|
302
|
+
model: 'claude-opus-4-7',
|
|
303
|
+
mcpServers: [
|
|
304
|
+
BetaManagedAgentsUrlmcpServerParams::with(
|
|
305
|
+
type: 'url',
|
|
306
|
+
name: 'github',
|
|
307
|
+
url: 'https://api.githubcopilot.com/mcp/',
|
|
308
|
+
),
|
|
309
|
+
],
|
|
310
|
+
tools: [
|
|
311
|
+
BetaManagedAgentsAgentToolset20260401Params::with(type: 'agent_toolset_20260401'),
|
|
312
|
+
BetaManagedAgentsMCPToolsetParams::with(
|
|
313
|
+
type: 'mcp_toolset',
|
|
314
|
+
mcpServerName: 'github',
|
|
315
|
+
),
|
|
316
|
+
],
|
|
317
|
+
);
|
|
318
|
+
|
|
319
|
+
// Session attaches vault(s) containing credentials for those MCP server URLs
|
|
320
|
+
$session = $client->beta->sessions->create(
|
|
321
|
+
agent: BetaManagedAgentsAgentParams::with(
|
|
322
|
+
type: 'agent',
|
|
323
|
+
id: $agent->id,
|
|
324
|
+
version: $agent->version,
|
|
325
|
+
),
|
|
326
|
+
environmentID: $environment->id,
|
|
327
|
+
vaultIDs: [$vault->id],
|
|
328
|
+
);
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
See `shared/managed-agents-tools.md` §Vaults for creating vaults and adding credentials.
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
## Vaults
|
|
336
|
+
|
|
337
|
+
```php
|
|
338
|
+
// Create a vault
|
|
339
|
+
$vault = $client->beta->vaults->create(
|
|
340
|
+
displayName: 'Alice',
|
|
341
|
+
metadata: ['external_user_id' => 'usr_abc123'],
|
|
342
|
+
);
|
|
343
|
+
echo $vault->id . "\n"; // "vlt_01ABC..."
|
|
344
|
+
|
|
345
|
+
// Add an OAuth credential
|
|
346
|
+
$credential = $client->beta->vaults->credentials->create(
|
|
347
|
+
vaultID: $vault->id,
|
|
348
|
+
displayName: "Alice's Slack",
|
|
349
|
+
auth: [
|
|
350
|
+
'type' => 'mcp_oauth',
|
|
351
|
+
'mcp_server_url' => 'https://mcp.slack.com/mcp',
|
|
352
|
+
'access_token' => 'xoxp-...',
|
|
353
|
+
'expires_at' => '2026-04-15T00:00:00Z',
|
|
354
|
+
'refresh' => [
|
|
355
|
+
'token_endpoint' => 'https://slack.com/api/oauth.v2.access',
|
|
356
|
+
'client_id' => '1234567890.0987654321',
|
|
357
|
+
'scope' => 'channels:read chat:write',
|
|
358
|
+
'refresh_token' => 'xoxe-1-...',
|
|
359
|
+
'token_endpoint_auth' => [
|
|
360
|
+
'type' => 'client_secret_post',
|
|
361
|
+
'client_secret' => 'abc123...',
|
|
362
|
+
],
|
|
363
|
+
],
|
|
364
|
+
],
|
|
365
|
+
);
|
|
366
|
+
|
|
367
|
+
// Rotate the credential (e.g., after a token refresh)
|
|
368
|
+
$client->beta->vaults->credentials->update(
|
|
369
|
+
$credential->id,
|
|
370
|
+
vaultID: $vault->id,
|
|
371
|
+
auth: [
|
|
372
|
+
'type' => 'mcp_oauth',
|
|
373
|
+
'access_token' => 'xoxp-new-...',
|
|
374
|
+
'expires_at' => '2026-05-15T00:00:00Z',
|
|
375
|
+
'refresh' => ['refresh_token' => 'xoxe-1-new-...'],
|
|
376
|
+
],
|
|
377
|
+
);
|
|
378
|
+
|
|
379
|
+
// Archive a vault
|
|
380
|
+
$client->beta->vaults->archive($vault->id);
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
## GitHub Repository Integration
|
|
386
|
+
|
|
387
|
+
Mount a GitHub repository as a session resource (a vault holds the GitHub MCP credential):
|
|
388
|
+
|
|
389
|
+
```php
|
|
390
|
+
$session = $client->beta->sessions->create(
|
|
391
|
+
agent: $agent->id,
|
|
392
|
+
environmentID: $environment->id,
|
|
393
|
+
vaultIDs: [$vault->id],
|
|
394
|
+
resources: [
|
|
395
|
+
[
|
|
396
|
+
'type' => 'github_repository',
|
|
397
|
+
'url' => 'https://github.com/org/repo',
|
|
398
|
+
'mountPath' => '/workspace/repo',
|
|
399
|
+
'authorizationToken' => 'ghp_your_github_token',
|
|
400
|
+
],
|
|
401
|
+
],
|
|
402
|
+
);
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
Multiple repositories on the same session:
|
|
406
|
+
|
|
407
|
+
```php
|
|
408
|
+
$resources = [
|
|
409
|
+
[
|
|
410
|
+
'type' => 'github_repository',
|
|
411
|
+
'url' => 'https://github.com/org/frontend',
|
|
412
|
+
'mountPath' => '/workspace/frontend',
|
|
413
|
+
'authorizationToken' => 'ghp_your_github_token',
|
|
414
|
+
],
|
|
415
|
+
[
|
|
416
|
+
'type' => 'github_repository',
|
|
417
|
+
'url' => 'https://github.com/org/backend',
|
|
418
|
+
'mountPath' => '/workspace/backend',
|
|
419
|
+
'authorizationToken' => 'ghp_your_github_token',
|
|
420
|
+
],
|
|
421
|
+
];
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
Rotating a repository's authorization token:
|
|
425
|
+
|
|
426
|
+
```php
|
|
427
|
+
$listed = $client->beta->sessions->resources->list($session->id);
|
|
428
|
+
$repoResourceId = $listed->data[0]->id;
|
|
429
|
+
|
|
430
|
+
$client->beta->sessions->resources->update(
|
|
431
|
+
$repoResourceId,
|
|
432
|
+
sessionID: $session->id,
|
|
433
|
+
authorizationToken: 'ghp_your_new_github_token',
|
|
434
|
+
);
|
|
435
|
+
```
|
|
@@ -27,7 +27,7 @@ async_client = anthropic.AsyncAnthropic()
|
|
|
27
27
|
|
|
28
28
|
```python
|
|
29
29
|
response = client.messages.create(
|
|
30
|
-
model="claude-opus-4-
|
|
30
|
+
model="claude-opus-4-7",
|
|
31
31
|
max_tokens=16000,
|
|
32
32
|
messages=[
|
|
33
33
|
{"role": "user", "content": "What is the capital of France?"}
|
|
@@ -46,7 +46,7 @@ for block in response.content:
|
|
|
46
46
|
|
|
47
47
|
```python
|
|
48
48
|
response = client.messages.create(
|
|
49
|
-
model="claude-opus-4-
|
|
49
|
+
model="claude-opus-4-7",
|
|
50
50
|
max_tokens=16000,
|
|
51
51
|
system="You are a helpful coding assistant. Always provide examples in Python.",
|
|
52
52
|
messages=[{"role": "user", "content": "How do I read a JSON file?"}]
|
|
@@ -66,7 +66,7 @@ with open("image.png", "rb") as f:
|
|
|
66
66
|
image_data = base64.standard_b64encode(f.read()).decode("utf-8")
|
|
67
67
|
|
|
68
68
|
response = client.messages.create(
|
|
69
|
-
model="claude-opus-4-
|
|
69
|
+
model="claude-opus-4-7",
|
|
70
70
|
max_tokens=16000,
|
|
71
71
|
messages=[{
|
|
72
72
|
"role": "user",
|
|
@@ -89,7 +89,7 @@ response = client.messages.create(
|
|
|
89
89
|
|
|
90
90
|
```python
|
|
91
91
|
response = client.messages.create(
|
|
92
|
-
model="claude-opus-4-
|
|
92
|
+
model="claude-opus-4-7",
|
|
93
93
|
max_tokens=16000,
|
|
94
94
|
messages=[{
|
|
95
95
|
"role": "user",
|
|
@@ -119,7 +119,7 @@ Use top-level `cache_control` to automatically cache the last cacheable block in
|
|
|
119
119
|
|
|
120
120
|
```python
|
|
121
121
|
response = client.messages.create(
|
|
122
|
-
model="claude-opus-4-
|
|
122
|
+
model="claude-opus-4-7",
|
|
123
123
|
max_tokens=16000,
|
|
124
124
|
cache_control={"type": "ephemeral"}, # auto-caches the last cacheable block
|
|
125
125
|
system="You are an expert on this large document...",
|
|
@@ -133,7 +133,7 @@ For fine-grained control, add `cache_control` to specific content blocks:
|
|
|
133
133
|
|
|
134
134
|
```python
|
|
135
135
|
response = client.messages.create(
|
|
136
|
-
model="claude-opus-4-
|
|
136
|
+
model="claude-opus-4-7",
|
|
137
137
|
max_tokens=16000,
|
|
138
138
|
system=[{
|
|
139
139
|
"type": "text",
|
|
@@ -145,7 +145,7 @@ response = client.messages.create(
|
|
|
145
145
|
|
|
146
146
|
# With explicit TTL (time-to-live)
|
|
147
147
|
response = client.messages.create(
|
|
148
|
-
model="claude-opus-4-
|
|
148
|
+
model="claude-opus-4-7",
|
|
149
149
|
max_tokens=16000,
|
|
150
150
|
system=[{
|
|
151
151
|
"type": "text",
|
|
@@ -170,13 +170,13 @@ If `cache_read_input_tokens` is zero across repeated identical-prefix requests,
|
|
|
170
170
|
|
|
171
171
|
## Extended Thinking
|
|
172
172
|
|
|
173
|
-
> **Opus 4.6 and Sonnet 4.6:** Use adaptive thinking. `budget_tokens` is deprecated on
|
|
173
|
+
> **Opus 4.7, Opus 4.6, and Sonnet 4.6:** Use adaptive thinking. `budget_tokens` is removed on Opus 4.7 (400 if sent); deprecated on Opus 4.6 and Sonnet 4.6.
|
|
174
174
|
> **Older models:** Use `thinking: {type: "enabled", budget_tokens: N}` (must be < `max_tokens`, min 1024).
|
|
175
175
|
|
|
176
176
|
```python
|
|
177
|
-
# Opus 4.6: adaptive thinking (recommended)
|
|
177
|
+
# Opus 4.7 / 4.6: adaptive thinking (recommended)
|
|
178
178
|
response = client.messages.create(
|
|
179
|
-
model="claude-opus-4-
|
|
179
|
+
model="claude-opus-4-7",
|
|
180
180
|
max_tokens=16000,
|
|
181
181
|
thinking={"type": "adaptive"},
|
|
182
182
|
output_config={"effort": "high"}, # low | medium | high | max
|
|
@@ -258,7 +258,7 @@ class ConversationManager:
|
|
|
258
258
|
# Usage
|
|
259
259
|
conversation = ConversationManager(
|
|
260
260
|
client=anthropic.Anthropic(),
|
|
261
|
-
model="claude-opus-4-
|
|
261
|
+
model="claude-opus-4-7",
|
|
262
262
|
system="You are a helpful assistant."
|
|
263
263
|
)
|
|
264
264
|
|
|
@@ -275,7 +275,7 @@ response2 = conversation.send("What's my name?") # Claude remembers "Alice"
|
|
|
275
275
|
|
|
276
276
|
### Compaction (long conversations)
|
|
277
277
|
|
|
278
|
-
> **Beta, Opus 4.6 and Sonnet 4.6.** When conversations approach the 200K context window, compaction automatically summarizes earlier context server-side. The API returns a `compaction` block; you must pass it back on subsequent requests — append `response.content`, not just the text.
|
|
278
|
+
> **Beta, Opus 4.7, Opus 4.6, and Sonnet 4.6.** When conversations approach the 200K context window, compaction automatically summarizes earlier context server-side. The API returns a `compaction` block; you must pass it back on subsequent requests — append `response.content`, not just the text.
|
|
279
279
|
|
|
280
280
|
```python
|
|
281
281
|
import anthropic
|
|
@@ -288,7 +288,7 @@ def chat(user_message: str) -> str:
|
|
|
288
288
|
|
|
289
289
|
response = client.beta.messages.create(
|
|
290
290
|
betas=["compact-2026-01-12"],
|
|
291
|
-
model="claude-opus-4-
|
|
291
|
+
model="claude-opus-4-7",
|
|
292
292
|
max_tokens=16000,
|
|
293
293
|
messages=messages,
|
|
294
294
|
context_management={
|
|
@@ -331,7 +331,7 @@ The `stop_reason` field in the response indicates why the model stopped generati
|
|
|
331
331
|
```python
|
|
332
332
|
# Automatic caching (simplest — caches the last cacheable block)
|
|
333
333
|
response = client.messages.create(
|
|
334
|
-
model="claude-opus-4-
|
|
334
|
+
model="claude-opus-4-7",
|
|
335
335
|
max_tokens=16000,
|
|
336
336
|
cache_control={"type": "ephemeral"},
|
|
337
337
|
system=large_document_text, # e.g., 50KB of context
|
|
@@ -347,7 +347,7 @@ response = client.messages.create(
|
|
|
347
347
|
```python
|
|
348
348
|
# Default to Opus for most tasks
|
|
349
349
|
response = client.messages.create(
|
|
350
|
-
model="claude-opus-4-
|
|
350
|
+
model="claude-opus-4-7", # $5.00/$25.00 per 1M tokens
|
|
351
351
|
max_tokens=16000,
|
|
352
352
|
messages=[{"role": "user", "content": "Explain quantum computing"}]
|
|
353
353
|
)
|
|
@@ -371,7 +371,7 @@ simple_response = client.messages.create(
|
|
|
371
371
|
|
|
372
372
|
```python
|
|
373
373
|
count_response = client.messages.count_tokens(
|
|
374
|
-
model="claude-opus-4-
|
|
374
|
+
model="claude-opus-4-7",
|
|
375
375
|
messages=messages,
|
|
376
376
|
system=system
|
|
377
377
|
)
|
|
@@ -26,7 +26,7 @@ message_batch = client.messages.batches.create(
|
|
|
26
26
|
Request(
|
|
27
27
|
custom_id="request-1",
|
|
28
28
|
params=MessageCreateParamsNonStreaming(
|
|
29
|
-
model="claude-opus-4-
|
|
29
|
+
model="claude-opus-4-7",
|
|
30
30
|
max_tokens=16000,
|
|
31
31
|
messages=[{"role": "user", "content": "Summarize climate change impacts"}]
|
|
32
32
|
)
|
|
@@ -34,7 +34,7 @@ message_batch = client.messages.batches.create(
|
|
|
34
34
|
Request(
|
|
35
35
|
custom_id="request-2",
|
|
36
36
|
params=MessageCreateParamsNonStreaming(
|
|
37
|
-
model="claude-opus-4-
|
|
37
|
+
model="claude-opus-4-7",
|
|
38
38
|
max_tokens=16000,
|
|
39
39
|
messages=[{"role": "user", "content": "Explain quantum computing basics"}]
|
|
40
40
|
)
|
|
@@ -117,7 +117,7 @@ message_batch = client.messages.batches.create(
|
|
|
117
117
|
Request(
|
|
118
118
|
custom_id=f"analysis-{i}",
|
|
119
119
|
params=MessageCreateParamsNonStreaming(
|
|
120
|
-
model="claude-opus-4-
|
|
120
|
+
model="claude-opus-4-7",
|
|
121
121
|
max_tokens=16000,
|
|
122
122
|
system=shared_system,
|
|
123
123
|
messages=[{"role": "user", "content": question}]
|
|
@@ -36,7 +36,7 @@ print(f"Size: {uploaded.size_bytes} bytes")
|
|
|
36
36
|
|
|
37
37
|
```python
|
|
38
38
|
response = client.beta.messages.create(
|
|
39
|
-
model="claude-opus-4-
|
|
39
|
+
model="claude-opus-4-7",
|
|
40
40
|
max_tokens=16000,
|
|
41
41
|
messages=[{
|
|
42
42
|
"role": "user",
|
|
@@ -65,7 +65,7 @@ image_file = client.beta.files.upload(
|
|
|
65
65
|
)
|
|
66
66
|
|
|
67
67
|
response = client.beta.messages.create(
|
|
68
|
-
model="claude-opus-4-
|
|
68
|
+
model="claude-opus-4-7",
|
|
69
69
|
max_tokens=16000,
|
|
70
70
|
messages=[{
|
|
71
71
|
"role": "user",
|
|
@@ -142,7 +142,7 @@ questions = [
|
|
|
142
142
|
|
|
143
143
|
for question in questions:
|
|
144
144
|
response = client.beta.messages.create(
|
|
145
|
-
model="claude-opus-4-
|
|
145
|
+
model="claude-opus-4-7",
|
|
146
146
|
max_tokens=16000,
|
|
147
147
|
messages=[{
|
|
148
148
|
"role": "user",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
```python
|
|
6
6
|
with client.messages.stream(
|
|
7
|
-
model="claude-opus-4-
|
|
7
|
+
model="claude-opus-4-7",
|
|
8
8
|
max_tokens=64000,
|
|
9
9
|
messages=[{"role": "user", "content": "Write a story"}]
|
|
10
10
|
) as stream:
|
|
@@ -16,7 +16,7 @@ with client.messages.stream(
|
|
|
16
16
|
|
|
17
17
|
```python
|
|
18
18
|
async with async_client.messages.stream(
|
|
19
|
-
model="claude-opus-4-
|
|
19
|
+
model="claude-opus-4-7",
|
|
20
20
|
max_tokens=64000,
|
|
21
21
|
messages=[{"role": "user", "content": "Write a story"}]
|
|
22
22
|
) as stream:
|
|
@@ -30,11 +30,11 @@ async with async_client.messages.stream(
|
|
|
30
30
|
|
|
31
31
|
Claude may return text, thinking blocks, or tool use. Handle each appropriately:
|
|
32
32
|
|
|
33
|
-
> **Opus 4.6:** Use `thinking: {type: "adaptive"}`. On older models, use `thinking: {type: "enabled", budget_tokens: N}` instead.
|
|
33
|
+
> **Opus 4.7 / Opus 4.6:** Use `thinking: {type: "adaptive"}`. On older models, use `thinking: {type: "enabled", budget_tokens: N}` instead.
|
|
34
34
|
|
|
35
35
|
```python
|
|
36
36
|
with client.messages.stream(
|
|
37
|
-
model="claude-opus-4-
|
|
37
|
+
model="claude-opus-4-7",
|
|
38
38
|
max_tokens=64000,
|
|
39
39
|
thinking={"type": "adaptive"},
|
|
40
40
|
messages=[{"role": "user", "content": "Analyze this problem"}]
|
|
@@ -61,7 +61,7 @@ The Python tool runner currently returns complete messages. Use streaming for in
|
|
|
61
61
|
|
|
62
62
|
```python
|
|
63
63
|
with client.messages.stream(
|
|
64
|
-
model="claude-opus-4-
|
|
64
|
+
model="claude-opus-4-7",
|
|
65
65
|
max_tokens=64000,
|
|
66
66
|
tools=tools,
|
|
67
67
|
messages=messages
|
|
@@ -79,7 +79,7 @@ with client.messages.stream(
|
|
|
79
79
|
|
|
80
80
|
```python
|
|
81
81
|
with client.messages.stream(
|
|
82
|
-
model="claude-opus-4-
|
|
82
|
+
model="claude-opus-4-7",
|
|
83
83
|
max_tokens=64000,
|
|
84
84
|
messages=[{"role": "user", "content": "Hello"}]
|
|
85
85
|
) as stream:
|
|
@@ -126,7 +126,7 @@ def stream_with_progress(client, **kwargs):
|
|
|
126
126
|
```python
|
|
127
127
|
try:
|
|
128
128
|
with client.messages.stream(
|
|
129
|
-
model="claude-opus-4-
|
|
129
|
+
model="claude-opus-4-7",
|
|
130
130
|
max_tokens=64000,
|
|
131
131
|
messages=[{"role": "user", "content": "Write a story"}]
|
|
132
132
|
) as stream:
|