railwise-darwin-x64 1.2.29
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/bin/agent/adjustment_computer.md +44 -0
- package/bin/agent/chief_manager.md +82 -0
- package/bin/agent/commercial_specialist.md +39 -0
- package/bin/agent/cpiii_specialist.md +42 -0
- package/bin/agent/data_analyst.md +55 -0
- package/bin/agent/knowledge_curator.md +41 -0
- package/bin/agent/norm_librarian.md +38 -0
- package/bin/agent/qa_inspector.md +58 -0
- package/bin/agent/qa_reviewer.md +49 -0
- package/bin/agent/solution_architect.md +44 -0
- package/bin/agent/source_ingestor.md +38 -0
- package/bin/agent/technical_writer.md +50 -0
- package/bin/command/bid-prepare.md +21 -0
- package/bin/command/daily-report.md +20 -0
- package/bin/command/data-check.md +19 -0
- package/bin/command/emergency-response.md +62 -0
- package/bin/command/monthly-report.md +32 -0
- package/bin/command/payment-reminder.md +22 -0
- package/bin/command/safety-check.md +18 -0
- package/bin/command/trend-analysis.md +35 -0
- package/bin/railwise +0 -0
- package/bin/railwise.json +4 -0
- package/bin/rw +2 -0
- package/bin/skill/THIRD_PARTY_NOTICES.md +405 -0
- package/bin/skill/algorithmic-art/LICENSE.txt +202 -0
- package/bin/skill/algorithmic-art/SKILL.md +405 -0
- package/bin/skill/algorithmic-art/templates/generator_template.js +223 -0
- package/bin/skill/algorithmic-art/templates/viewer.html +599 -0
- package/bin/skill/bidding-knowledge/SKILL.md +67 -0
- package/bin/skill/brand-guidelines/LICENSE.txt +202 -0
- package/bin/skill/brand-guidelines/SKILL.md +73 -0
- package/bin/skill/bun-file-io/SKILL.md +42 -0
- package/bin/skill/canvas-design/SKILL.md +141 -0
- package/bin/skill/claude-api/LICENSE.txt +202 -0
- package/bin/skill/claude-api/SKILL.md +325 -0
- package/bin/skill/claude-api/csharp/claude-api.md +402 -0
- package/bin/skill/claude-api/curl/examples.md +216 -0
- package/bin/skill/claude-api/curl/managed-agents.md +336 -0
- package/bin/skill/claude-api/go/claude-api.md +421 -0
- package/bin/skill/claude-api/go/managed-agents/README.md +561 -0
- package/bin/skill/claude-api/java/claude-api.md +432 -0
- package/bin/skill/claude-api/java/managed-agents/README.md +442 -0
- package/bin/skill/claude-api/php/claude-api.md +375 -0
- package/bin/skill/claude-api/php/managed-agents/README.md +435 -0
- package/bin/skill/claude-api/python/claude-api/README.md +420 -0
- package/bin/skill/claude-api/python/claude-api/batches.md +185 -0
- package/bin/skill/claude-api/python/claude-api/files-api.md +165 -0
- package/bin/skill/claude-api/python/claude-api/streaming.md +162 -0
- package/bin/skill/claude-api/python/claude-api/tool-use.md +590 -0
- package/bin/skill/claude-api/python/managed-agents/README.md +332 -0
- package/bin/skill/claude-api/ruby/claude-api.md +113 -0
- package/bin/skill/claude-api/ruby/managed-agents/README.md +389 -0
- package/bin/skill/claude-api/shared/agent-design.md +101 -0
- package/bin/skill/claude-api/shared/error-codes.md +213 -0
- package/bin/skill/claude-api/shared/live-sources.md +135 -0
- package/bin/skill/claude-api/shared/managed-agents-api-reference.md +378 -0
- package/bin/skill/claude-api/shared/managed-agents-client-patterns.md +209 -0
- package/bin/skill/claude-api/shared/managed-agents-core.md +238 -0
- package/bin/skill/claude-api/shared/managed-agents-environments.md +215 -0
- package/bin/skill/claude-api/shared/managed-agents-events.md +195 -0
- package/bin/skill/claude-api/shared/managed-agents-memory.md +197 -0
- package/bin/skill/claude-api/shared/managed-agents-multiagent.md +99 -0
- package/bin/skill/claude-api/shared/managed-agents-onboarding.md +114 -0
- package/bin/skill/claude-api/shared/managed-agents-outcomes.md +106 -0
- package/bin/skill/claude-api/shared/managed-agents-overview.md +68 -0
- package/bin/skill/claude-api/shared/managed-agents-self-hosted-sandboxes.md +173 -0
- package/bin/skill/claude-api/shared/managed-agents-tools.md +321 -0
- package/bin/skill/claude-api/shared/managed-agents-webhooks.md +110 -0
- package/bin/skill/claude-api/shared/model-migration.md +879 -0
- package/bin/skill/claude-api/shared/models.md +124 -0
- package/bin/skill/claude-api/shared/prompt-caching.md +171 -0
- package/bin/skill/claude-api/shared/tool-use-concepts.md +327 -0
- package/bin/skill/claude-api/typescript/claude-api/README.md +333 -0
- package/bin/skill/claude-api/typescript/claude-api/batches.md +106 -0
- package/bin/skill/claude-api/typescript/claude-api/files-api.md +98 -0
- package/bin/skill/claude-api/typescript/claude-api/streaming.md +178 -0
- package/bin/skill/claude-api/typescript/claude-api/tool-use.md +527 -0
- package/bin/skill/claude-api/typescript/managed-agents/README.md +359 -0
- package/bin/skill/data-analysis/SKILL.md +79 -0
- package/bin/skill/doc-coauthoring/SKILL.md +375 -0
- package/bin/skill/docx/LICENSE.txt +30 -0
- package/bin/skill/docx/SKILL.md +590 -0
- package/bin/skill/docx/scripts/__init__.py +1 -0
- package/bin/skill/docx/scripts/accept_changes.py +135 -0
- package/bin/skill/docx/scripts/comment.py +318 -0
- package/bin/skill/docx/scripts/office/helpers/__init__.py +0 -0
- package/bin/skill/docx/scripts/office/helpers/merge_runs.py +199 -0
- package/bin/skill/docx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/bin/skill/docx/scripts/office/pack.py +159 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/bin/skill/docx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/bin/skill/docx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/bin/skill/docx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/bin/skill/docx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/bin/skill/docx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/bin/skill/docx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/bin/skill/docx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/bin/skill/docx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/bin/skill/docx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/bin/skill/docx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/bin/skill/docx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/bin/skill/docx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/bin/skill/docx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/bin/skill/docx/scripts/office/soffice.py +183 -0
- package/bin/skill/docx/scripts/office/unpack.py +132 -0
- package/bin/skill/docx/scripts/office/validate.py +111 -0
- package/bin/skill/docx/scripts/office/validators/__init__.py +15 -0
- package/bin/skill/docx/scripts/office/validators/base.py +847 -0
- package/bin/skill/docx/scripts/office/validators/docx.py +446 -0
- package/bin/skill/docx/scripts/office/validators/pptx.py +275 -0
- package/bin/skill/docx/scripts/office/validators/redlining.py +247 -0
- package/bin/skill/docx/scripts/templates/comments.xml +3 -0
- package/bin/skill/docx/scripts/templates/commentsExtended.xml +3 -0
- package/bin/skill/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/bin/skill/docx/scripts/templates/commentsIds.xml +3 -0
- package/bin/skill/docx/scripts/templates/people.xml +3 -0
- package/bin/skill/docx-generation/SKILL.md +160 -0
- package/bin/skill/excel-operations/SKILL.md +121 -0
- package/bin/skill/frontend-design/SKILL.md +151 -0
- package/bin/skill/humanizer/SKILL.md +90 -0
- package/bin/skill/internal-comms/LICENSE.txt +202 -0
- package/bin/skill/internal-comms/SKILL.md +32 -0
- package/bin/skill/internal-comms/examples/3p-updates.md +47 -0
- package/bin/skill/internal-comms/examples/company-newsletter.md +65 -0
- package/bin/skill/internal-comms/examples/faq-answers.md +30 -0
- package/bin/skill/internal-comms/examples/general-comms.md +16 -0
- package/bin/skill/mcp-builder/LICENSE.txt +202 -0
- package/bin/skill/mcp-builder/SKILL.md +236 -0
- package/bin/skill/mcp-builder/reference/evaluation.md +602 -0
- package/bin/skill/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/bin/skill/mcp-builder/reference/node_mcp_server.md +970 -0
- package/bin/skill/mcp-builder/reference/python_mcp_server.md +719 -0
- package/bin/skill/mcp-builder/scripts/connections.py +151 -0
- package/bin/skill/mcp-builder/scripts/evaluation.py +373 -0
- package/bin/skill/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/bin/skill/mcp-builder/scripts/requirements.txt +2 -0
- package/bin/skill/monitoring-design/SKILL.md +79 -0
- package/bin/skill/operational-monitoring/SKILL.md +135 -0
- package/bin/skill/operational-monitoring/assets/checklists/archive-self-check.md +54 -0
- package/bin/skill/operational-monitoring/assets/schemas/convergence-result-table.csv +5 -0
- package/bin/skill/operational-monitoring/assets/schemas/horizontal-result-table.csv +3 -0
- package/bin/skill/operational-monitoring/assets/schemas/settlement-result-table.csv +7 -0
- package/bin/skill/operational-monitoring/assets/scripts/init-archive-tree.sh +65 -0
- package/bin/skill/operational-monitoring/assets/templates/control-network-report.md +102 -0
- package/bin/skill/operational-monitoring/assets/templates/daily-log.md +47 -0
- package/bin/skill/operational-monitoring/assets/templates/i-angle-check.md +38 -0
- package/bin/skill/operational-monitoring/assets/templates/monitoring-scheme.md +234 -0
- package/bin/skill/operational-monitoring/assets/templates/period-report.md +95 -0
- package/bin/skill/operational-monitoring/assets/templates/point-acceptance-record.md +51 -0
- package/bin/skill/operational-monitoring/assets/templates/point-installation-record.md +38 -0
- package/bin/skill/operational-monitoring/assets/templates/summary-report.md +89 -0
- package/bin/skill/operational-monitoring/assets/templates/warning-bulletin.md +61 -0
- package/bin/skill/operational-monitoring/assets/templates/weekly-monthly-report.md +46 -0
- package/bin/skill/operational-monitoring/references/archive-and-delivery.md +146 -0
- package/bin/skill/operational-monitoring/references/baseline-network.md +131 -0
- package/bin/skill/operational-monitoring/references/convergence-monitoring.md +134 -0
- package/bin/skill/operational-monitoring/references/data-processing.md +178 -0
- package/bin/skill/operational-monitoring/references/horizontal-displacement.md +128 -0
- package/bin/skill/operational-monitoring/references/monitoring-points.md +132 -0
- package/bin/skill/operational-monitoring/references/monitoring-scheme.md +178 -0
- package/bin/skill/operational-monitoring/references/period-report.md +108 -0
- package/bin/skill/operational-monitoring/references/regulations-and-frequency.md +127 -0
- package/bin/skill/operational-monitoring/references/settlement-monitoring.md +116 -0
- package/bin/skill/operational-monitoring/references/summary-report.md +128 -0
- package/bin/skill/operational-monitoring/references/warning-and-disposal.md +118 -0
- package/bin/skill/pdf/LICENSE.txt +30 -0
- package/bin/skill/pdf/SKILL.md +314 -0
- package/bin/skill/pdf/forms.md +294 -0
- package/bin/skill/pdf/reference.md +612 -0
- package/bin/skill/pdf/scripts/check_bounding_boxes.py +65 -0
- package/bin/skill/pdf/scripts/check_fillable_fields.py +11 -0
- package/bin/skill/pdf/scripts/convert_pdf_to_images.py +33 -0
- package/bin/skill/pdf/scripts/create_validation_image.py +37 -0
- package/bin/skill/pdf/scripts/extract_form_field_info.py +122 -0
- package/bin/skill/pdf/scripts/extract_form_structure.py +115 -0
- package/bin/skill/pdf/scripts/fill_fillable_fields.py +98 -0
- package/bin/skill/pdf/scripts/fill_pdf_form_with_annotations.py +107 -0
- package/bin/skill/pptx/LICENSE.txt +30 -0
- package/bin/skill/pptx/SKILL.md +232 -0
- package/bin/skill/pptx/editing.md +205 -0
- package/bin/skill/pptx/pptxgenjs.md +420 -0
- package/bin/skill/pptx/scripts/__init__.py +0 -0
- package/bin/skill/pptx/scripts/add_slide.py +195 -0
- package/bin/skill/pptx/scripts/clean.py +286 -0
- package/bin/skill/pptx/scripts/office/helpers/__init__.py +0 -0
- package/bin/skill/pptx/scripts/office/helpers/merge_runs.py +199 -0
- package/bin/skill/pptx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/bin/skill/pptx/scripts/office/pack.py +159 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/bin/skill/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/bin/skill/pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/bin/skill/pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/bin/skill/pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/bin/skill/pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/bin/skill/pptx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/bin/skill/pptx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/bin/skill/pptx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/bin/skill/pptx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/bin/skill/pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/bin/skill/pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/bin/skill/pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/bin/skill/pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/bin/skill/pptx/scripts/office/soffice.py +183 -0
- package/bin/skill/pptx/scripts/office/unpack.py +132 -0
- package/bin/skill/pptx/scripts/office/validate.py +111 -0
- package/bin/skill/pptx/scripts/office/validators/__init__.py +15 -0
- package/bin/skill/pptx/scripts/office/validators/base.py +847 -0
- package/bin/skill/pptx/scripts/office/validators/docx.py +446 -0
- package/bin/skill/pptx/scripts/office/validators/pptx.py +275 -0
- package/bin/skill/pptx/scripts/office/validators/redlining.py +247 -0
- package/bin/skill/pptx/scripts/thumbnail.py +289 -0
- package/bin/skill/rail-monitoring-plan/SKILL.md +147 -0
- package/bin/skill/rail-monitoring-plan/assets/plan-template.md +673 -0
- package/bin/skill/rail-monitoring-plan/references/elevated-line.md +319 -0
- package/bin/skill/rail-monitoring-plan/references/key-difficulties.md +216 -0
- package/bin/skill/rail-monitoring-plan/references/phase0-intake.md +169 -0
- package/bin/skill/rail-monitoring-plan/references/phase1-drafting.md +185 -0
- package/bin/skill/rail-monitoring-plan/references/phase2-internal-review.md +166 -0
- package/bin/skill/rail-monitoring-plan/references/review-checklist.md +140 -0
- package/bin/skill/rail-monitoring-plan/references/review-response-template.md +87 -0
- package/bin/skill/rail-monitoring-plan/references/scoping-and-pricing.md +214 -0
- package/bin/skill/rail-monitoring-plan/references/technical-standards.md +188 -0
- package/bin/skill/rail-monitoring-plan/references/toc-template-A.md +142 -0
- package/bin/skill/rail-monitoring-plan/references/toc-template-B.md +100 -0
- package/bin/skill/report-writing/SKILL.md +103 -0
- package/bin/skill/skill-creator/LICENSE.txt +202 -0
- package/bin/skill/skill-creator/SKILL.md +485 -0
- package/bin/skill/skill-creator/agents/analyzer.md +274 -0
- package/bin/skill/skill-creator/agents/comparator.md +202 -0
- package/bin/skill/skill-creator/agents/grader.md +223 -0
- package/bin/skill/skill-creator/assets/eval_review.html +146 -0
- package/bin/skill/skill-creator/eval-viewer/generate_review.py +471 -0
- package/bin/skill/skill-creator/eval-viewer/viewer.html +1325 -0
- package/bin/skill/skill-creator/references/schemas.md +430 -0
- package/bin/skill/skill-creator/scripts/__init__.py +0 -0
- package/bin/skill/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/bin/skill/skill-creator/scripts/generate_report.py +326 -0
- package/bin/skill/skill-creator/scripts/improve_description.py +247 -0
- package/bin/skill/skill-creator/scripts/package_skill.py +136 -0
- package/bin/skill/skill-creator/scripts/quick_validate.py +103 -0
- package/bin/skill/skill-creator/scripts/run_eval.py +310 -0
- package/bin/skill/skill-creator/scripts/run_loop.py +328 -0
- package/bin/skill/skill-creator/scripts/utils.py +47 -0
- package/bin/skill/slack-gif-creator/LICENSE.txt +202 -0
- package/bin/skill/slack-gif-creator/SKILL.md +254 -0
- package/bin/skill/slack-gif-creator/core/easing.py +234 -0
- package/bin/skill/slack-gif-creator/core/frame_composer.py +176 -0
- package/bin/skill/slack-gif-creator/core/gif_builder.py +269 -0
- package/bin/skill/slack-gif-creator/core/validators.py +136 -0
- package/bin/skill/slack-gif-creator/requirements.txt +4 -0
- package/bin/skill/standard-reference/SKILL.md +89 -0
- package/bin/skill/theme-factory/LICENSE.txt +202 -0
- package/bin/skill/theme-factory/SKILL.md +59 -0
- package/bin/skill/theme-factory/theme-showcase.pdf +0 -0
- package/bin/skill/theme-factory/themes/arctic-frost.md +19 -0
- package/bin/skill/theme-factory/themes/botanical-garden.md +19 -0
- package/bin/skill/theme-factory/themes/desert-rose.md +19 -0
- package/bin/skill/theme-factory/themes/forest-canopy.md +19 -0
- package/bin/skill/theme-factory/themes/golden-hour.md +19 -0
- package/bin/skill/theme-factory/themes/midnight-galaxy.md +19 -0
- package/bin/skill/theme-factory/themes/modern-minimalist.md +19 -0
- package/bin/skill/theme-factory/themes/ocean-depths.md +19 -0
- package/bin/skill/theme-factory/themes/sunset-boulevard.md +19 -0
- package/bin/skill/theme-factory/themes/tech-innovation.md +19 -0
- package/bin/skill/web-artifacts-builder/LICENSE.txt +202 -0
- package/bin/skill/web-artifacts-builder/SKILL.md +74 -0
- package/bin/skill/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/bin/skill/web-artifacts-builder/scripts/init-artifact.sh +322 -0
- package/bin/skill/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/bin/skill/webapp-testing/LICENSE.txt +202 -0
- package/bin/skill/webapp-testing/SKILL.md +96 -0
- package/bin/skill/webapp-testing/examples/console_logging.py +35 -0
- package/bin/skill/webapp-testing/examples/element_discovery.py +40 -0
- package/bin/skill/webapp-testing/examples/static_html_automation.py +33 -0
- package/bin/skill/webapp-testing/scripts/with_server.py +106 -0
- package/bin/skill/xlsx/LICENSE.txt +30 -0
- package/bin/skill/xlsx/SKILL.md +292 -0
- package/bin/skill/xlsx/scripts/office/helpers/__init__.py +0 -0
- package/bin/skill/xlsx/scripts/office/helpers/merge_runs.py +199 -0
- package/bin/skill/xlsx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/bin/skill/xlsx/scripts/office/pack.py +159 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/bin/skill/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/bin/skill/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/bin/skill/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/bin/skill/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/bin/skill/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/bin/skill/xlsx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/bin/skill/xlsx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/bin/skill/xlsx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/bin/skill/xlsx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/bin/skill/xlsx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/bin/skill/xlsx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/bin/skill/xlsx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/bin/skill/xlsx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/bin/skill/xlsx/scripts/office/soffice.py +183 -0
- package/bin/skill/xlsx/scripts/office/unpack.py +132 -0
- package/bin/skill/xlsx/scripts/office/validate.py +111 -0
- package/bin/skill/xlsx/scripts/office/validators/__init__.py +15 -0
- package/bin/skill/xlsx/scripts/office/validators/base.py +847 -0
- package/bin/skill/xlsx/scripts/office/validators/docx.py +446 -0
- package/bin/skill/xlsx/scripts/office/validators/pptx.py +275 -0
- package/bin/skill/xlsx/scripts/office/validators/redlining.py +247 -0
- package/bin/skill/xlsx/scripts/recalc.py +184 -0
- package/package.json +14 -0
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
# Managed Agents — Java
|
|
2
|
+
|
|
3
|
+
> **Bindings not shown here:** This README covers the most common managed-agents flows for Java. If you need a class, method, namespace, field, or behavior that isn't shown, WebFetch the Java 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 `client.beta().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
|
+
```xml
|
|
10
|
+
<dependency>
|
|
11
|
+
<groupId>com.anthropic</groupId>
|
|
12
|
+
<artifactId>anthropic-java</artifactId>
|
|
13
|
+
</dependency>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Client Initialization
|
|
17
|
+
|
|
18
|
+
```java
|
|
19
|
+
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
|
|
20
|
+
|
|
21
|
+
// Default (uses ANTHROPIC_API_KEY env var)
|
|
22
|
+
var client = AnthropicOkHttpClient.fromEnv();
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Create an Environment
|
|
28
|
+
|
|
29
|
+
```java
|
|
30
|
+
import com.anthropic.models.beta.environments.BetaCloudConfigParams;
|
|
31
|
+
import com.anthropic.models.beta.environments.EnvironmentCreateParams;
|
|
32
|
+
import com.anthropic.models.beta.environments.UnrestrictedNetwork;
|
|
33
|
+
|
|
34
|
+
var environment = client.beta().environments().create(EnvironmentCreateParams.builder()
|
|
35
|
+
.name("my-dev-env")
|
|
36
|
+
.config(BetaCloudConfigParams.builder()
|
|
37
|
+
.networking(UnrestrictedNetwork.builder().build())
|
|
38
|
+
.build())
|
|
39
|
+
.build());
|
|
40
|
+
System.out.println("Environment ID: " + environment.id()); // env_...
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Create an Agent (required first step)
|
|
46
|
+
|
|
47
|
+
> ⚠️ **There is no inline agent config.** Model, system, and 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.builder()...build()`.
|
|
48
|
+
|
|
49
|
+
### Minimal
|
|
50
|
+
|
|
51
|
+
```java
|
|
52
|
+
import com.anthropic.models.beta.agents.AgentCreateParams;
|
|
53
|
+
import com.anthropic.models.beta.agents.BetaManagedAgentsAgentToolset20260401Params;
|
|
54
|
+
import com.anthropic.models.beta.sessions.BetaManagedAgentsAgentParams;
|
|
55
|
+
import com.anthropic.models.beta.sessions.SessionCreateParams;
|
|
56
|
+
|
|
57
|
+
// 1. Create the agent (reusable, versioned)
|
|
58
|
+
var agent = client.beta().agents().create(AgentCreateParams.builder()
|
|
59
|
+
.name("Coding Assistant")
|
|
60
|
+
.model("claude-opus-4-8")
|
|
61
|
+
.system("You are a helpful coding assistant.")
|
|
62
|
+
.addTool(BetaManagedAgentsAgentToolset20260401Params.builder()
|
|
63
|
+
.type(BetaManagedAgentsAgentToolset20260401Params.Type.AGENT_TOOLSET_20260401)
|
|
64
|
+
.build())
|
|
65
|
+
.build());
|
|
66
|
+
|
|
67
|
+
// 2. Start a session
|
|
68
|
+
var session = client.beta().sessions().create(SessionCreateParams.builder()
|
|
69
|
+
.agent(BetaManagedAgentsAgentParams.builder()
|
|
70
|
+
.type(BetaManagedAgentsAgentParams.Type.AGENT)
|
|
71
|
+
.id(agent.id())
|
|
72
|
+
.version(agent.version())
|
|
73
|
+
.build())
|
|
74
|
+
.environmentId(environment.id())
|
|
75
|
+
.title("Quickstart session")
|
|
76
|
+
.build());
|
|
77
|
+
System.out.println("Session ID: " + session.id());
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Updating an Agent
|
|
81
|
+
|
|
82
|
+
Updates create new versions; the agent object is immutable per version.
|
|
83
|
+
|
|
84
|
+
```java
|
|
85
|
+
import com.anthropic.models.beta.agents.AgentUpdateParams;
|
|
86
|
+
|
|
87
|
+
var updatedAgent = client.beta().agents().update(agent.id(), AgentUpdateParams.builder()
|
|
88
|
+
.version(agent.version())
|
|
89
|
+
.system("You are a helpful coding agent. Always write tests.")
|
|
90
|
+
.build());
|
|
91
|
+
System.out.println("New version: " + updatedAgent.version());
|
|
92
|
+
|
|
93
|
+
// List all versions
|
|
94
|
+
for (var version : client.beta().agents().versions().list(agent.id()).autoPager()) {
|
|
95
|
+
System.out.println("Version " + version.version() + ": " + version.updatedAt());
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Archive the agent
|
|
99
|
+
var archived = client.beta().agents().archive(agent.id());
|
|
100
|
+
System.out.println("Archived at: " + archived.archivedAt().orElseThrow());
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Send a User Message
|
|
106
|
+
|
|
107
|
+
```java
|
|
108
|
+
import com.anthropic.models.beta.sessions.events.BetaManagedAgentsUserMessageEventParams;
|
|
109
|
+
import com.anthropic.models.beta.sessions.events.EventSendParams;
|
|
110
|
+
|
|
111
|
+
client.beta().sessions().events().send(session.id(), EventSendParams.builder()
|
|
112
|
+
.addEvent(BetaManagedAgentsUserMessageEventParams.builder()
|
|
113
|
+
.type(BetaManagedAgentsUserMessageEventParams.Type.USER_MESSAGE)
|
|
114
|
+
.addTextContent("Review the auth module")
|
|
115
|
+
.build())
|
|
116
|
+
.build());
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
> 💡 **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).
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Stream Events (SSE)
|
|
124
|
+
|
|
125
|
+
```java
|
|
126
|
+
import com.anthropic.models.beta.sessions.events.StreamEvents;
|
|
127
|
+
|
|
128
|
+
// Open the stream first, then send the user message
|
|
129
|
+
try (var stream = client.beta().sessions().events().streamStreaming(session.id())) {
|
|
130
|
+
client.beta().sessions().events().send(session.id(), EventSendParams.builder()
|
|
131
|
+
.addEvent(BetaManagedAgentsUserMessageEventParams.builder()
|
|
132
|
+
.type(BetaManagedAgentsUserMessageEventParams.Type.USER_MESSAGE)
|
|
133
|
+
.addTextContent("Summarize the repo README")
|
|
134
|
+
.build())
|
|
135
|
+
.build());
|
|
136
|
+
|
|
137
|
+
for (var event : (Iterable<StreamEvents>) stream.stream()::iterator) {
|
|
138
|
+
if (event.isAgentMessage()) {
|
|
139
|
+
event.asAgentMessage().content().forEach(block -> System.out.print(block.text()));
|
|
140
|
+
} else if (event.isAgentToolUse()) {
|
|
141
|
+
System.out.println("\n[Using tool: " + event.asAgentToolUse().name() + "]");
|
|
142
|
+
} else if (event.isSessionStatusIdle()) {
|
|
143
|
+
break;
|
|
144
|
+
} else if (event.isSessionError()) {
|
|
145
|
+
System.out.println("\n[Error]");
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Reconnecting and Tailing
|
|
153
|
+
|
|
154
|
+
When reconnecting mid-session, list past events first to dedupe, then tail live events. The cross-variant `id` field is read from the raw `_json()` value:
|
|
155
|
+
|
|
156
|
+
```java
|
|
157
|
+
import com.anthropic.core.JsonValue;
|
|
158
|
+
import java.util.HashSet;
|
|
159
|
+
import java.util.Map;
|
|
160
|
+
import java.util.Optional;
|
|
161
|
+
|
|
162
|
+
try (var stream = client.beta().sessions().events().streamStreaming(session.id())) {
|
|
163
|
+
// Stream is open and buffering. List history before tailing live.
|
|
164
|
+
var seenEventIds = new HashSet<String>();
|
|
165
|
+
for (var past : client.beta().sessions().events().list(session.id()).autoPager()) {
|
|
166
|
+
Optional<Map<String, JsonValue>> obj = past._json().orElseThrow().asObject();
|
|
167
|
+
seenEventIds.add(obj.orElseThrow().get("id").asStringOrThrow());
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Tail live events, skipping anything already seen
|
|
171
|
+
for (var event : (Iterable<StreamEvents>) stream.stream()::iterator) {
|
|
172
|
+
Optional<Map<String, JsonValue>> obj = event._json().orElseThrow().asObject();
|
|
173
|
+
if (!seenEventIds.add(obj.orElseThrow().get("id").asStringOrThrow())) continue;
|
|
174
|
+
if (event.isAgentMessage()) {
|
|
175
|
+
event.asAgentMessage().content().forEach(block -> System.out.print(block.text()));
|
|
176
|
+
} else if (event.isSessionStatusIdle()) {
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Provide Custom Tool Result
|
|
186
|
+
|
|
187
|
+
> ℹ️ The Java 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-java` repository for the corresponding params types.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Poll Events
|
|
192
|
+
|
|
193
|
+
```java
|
|
194
|
+
for (var event : client.beta().sessions().events().list(session.id()).autoPager()) {
|
|
195
|
+
System.out.println(event.type() + ": " + event);
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Upload a File
|
|
202
|
+
|
|
203
|
+
```java
|
|
204
|
+
import com.anthropic.models.beta.files.FileUploadParams;
|
|
205
|
+
import com.anthropic.models.beta.sessions.BetaManagedAgentsFileResourceParams;
|
|
206
|
+
import java.nio.file.Path;
|
|
207
|
+
|
|
208
|
+
var dataCsv = Path.of("data.csv");
|
|
209
|
+
|
|
210
|
+
var file = client.beta().files().upload(FileUploadParams.builder()
|
|
211
|
+
.file(dataCsv)
|
|
212
|
+
.build());
|
|
213
|
+
System.out.println("File ID: " + file.id());
|
|
214
|
+
|
|
215
|
+
// Mount in a session
|
|
216
|
+
var session = client.beta().sessions().create(SessionCreateParams.builder()
|
|
217
|
+
.agent(agent.id())
|
|
218
|
+
.environmentId(environment.id())
|
|
219
|
+
.addResource(BetaManagedAgentsFileResourceParams.builder()
|
|
220
|
+
.type(BetaManagedAgentsFileResourceParams.Type.FILE)
|
|
221
|
+
.fileId(file.id())
|
|
222
|
+
.mountPath("/workspace/data.csv")
|
|
223
|
+
.build())
|
|
224
|
+
.build());
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Add and Manage Resources on an Existing Session
|
|
228
|
+
|
|
229
|
+
```java
|
|
230
|
+
import com.anthropic.models.beta.sessions.resources.ResourceAddParams;
|
|
231
|
+
import com.anthropic.models.beta.sessions.resources.ResourceDeleteParams;
|
|
232
|
+
|
|
233
|
+
// Attach an additional file to an open session
|
|
234
|
+
var resource = client.beta().sessions().resources().add(session.id(), ResourceAddParams.builder()
|
|
235
|
+
.betaManagedAgentsFileResourceParams(BetaManagedAgentsFileResourceParams.builder()
|
|
236
|
+
.type(BetaManagedAgentsFileResourceParams.Type.FILE)
|
|
237
|
+
.fileId(file.id())
|
|
238
|
+
.build())
|
|
239
|
+
.build());
|
|
240
|
+
System.out.println(resource.id()); // "sesrsc_01ABC..."
|
|
241
|
+
|
|
242
|
+
// List resources on the session — entries are a discriminated union
|
|
243
|
+
var listed = client.beta().sessions().resources().list(session.id());
|
|
244
|
+
for (var entry : listed.data()) {
|
|
245
|
+
if (entry.isFile()) {
|
|
246
|
+
var fileResource = entry.asFile();
|
|
247
|
+
System.out.println(fileResource.id() + " " + fileResource.type());
|
|
248
|
+
} else if (entry.isGitHubRepository()) {
|
|
249
|
+
var repoResource = entry.asGitHubRepository();
|
|
250
|
+
System.out.println(repoResource.id() + " " + repoResource.type());
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// Detach a resource
|
|
255
|
+
client.beta().sessions().resources().delete(resource.id(), ResourceDeleteParams.builder()
|
|
256
|
+
.sessionId(session.id())
|
|
257
|
+
.build());
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## List and Download Session Files
|
|
263
|
+
|
|
264
|
+
> ℹ️ Listing and downloading files an agent wrote during a session is not yet documented for Java in this skill or in the apps source examples. See `shared/managed-agents-events.md` and the `anthropic-java` repository for the file list/download bindings.
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## Session Management
|
|
269
|
+
|
|
270
|
+
```java
|
|
271
|
+
// List environments
|
|
272
|
+
var environments = client.beta().environments().list();
|
|
273
|
+
|
|
274
|
+
// Retrieve a specific environment
|
|
275
|
+
var env = client.beta().environments().retrieve(environment.id());
|
|
276
|
+
|
|
277
|
+
// Archive an environment (read-only, existing sessions continue)
|
|
278
|
+
client.beta().environments().archive(environment.id());
|
|
279
|
+
|
|
280
|
+
// Delete an environment (only if no sessions reference it)
|
|
281
|
+
client.beta().environments().delete(environment.id());
|
|
282
|
+
|
|
283
|
+
// Delete a session
|
|
284
|
+
client.beta().sessions().delete(session.id());
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## MCP Server Integration
|
|
290
|
+
|
|
291
|
+
```java
|
|
292
|
+
import com.anthropic.models.beta.agents.BetaManagedAgentsMcpToolsetParams;
|
|
293
|
+
import com.anthropic.models.beta.agents.BetaManagedAgentsUrlmcpServerParams;
|
|
294
|
+
|
|
295
|
+
// Agent declares MCP server (no auth here — auth goes in a vault)
|
|
296
|
+
var agent = client.beta().agents().create(AgentCreateParams.builder()
|
|
297
|
+
.name("GitHub Assistant")
|
|
298
|
+
.model("claude-opus-4-8")
|
|
299
|
+
.addMcpServer(BetaManagedAgentsUrlmcpServerParams.builder()
|
|
300
|
+
.type(BetaManagedAgentsUrlmcpServerParams.Type.URL)
|
|
301
|
+
.name("github")
|
|
302
|
+
.url("https://api.githubcopilot.com/mcp/")
|
|
303
|
+
.build())
|
|
304
|
+
.addTool(BetaManagedAgentsAgentToolset20260401Params.builder()
|
|
305
|
+
.type(BetaManagedAgentsAgentToolset20260401Params.Type.AGENT_TOOLSET_20260401)
|
|
306
|
+
.build())
|
|
307
|
+
.addTool(BetaManagedAgentsMcpToolsetParams.builder()
|
|
308
|
+
.type(BetaManagedAgentsMcpToolsetParams.Type.MCP_TOOLSET)
|
|
309
|
+
.mcpServerName("github")
|
|
310
|
+
.build())
|
|
311
|
+
.build());
|
|
312
|
+
|
|
313
|
+
// Session attaches vault(s) containing credentials for those MCP server URLs
|
|
314
|
+
var session = client.beta().sessions().create(SessionCreateParams.builder()
|
|
315
|
+
.agent(BetaManagedAgentsAgentParams.builder()
|
|
316
|
+
.type(BetaManagedAgentsAgentParams.Type.AGENT)
|
|
317
|
+
.id(agent.id())
|
|
318
|
+
.version(agent.version())
|
|
319
|
+
.build())
|
|
320
|
+
.environmentId(environment.id())
|
|
321
|
+
.addVaultId(vault.id())
|
|
322
|
+
.build());
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
See `shared/managed-agents-tools.md` §Vaults for creating vaults and adding credentials.
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## Vaults
|
|
330
|
+
|
|
331
|
+
```java
|
|
332
|
+
import com.anthropic.core.JsonValue;
|
|
333
|
+
import com.anthropic.models.beta.vaults.VaultCreateParams;
|
|
334
|
+
import com.anthropic.models.beta.vaults.credentials.BetaManagedAgentsMcpOAuthCreateParams;
|
|
335
|
+
import com.anthropic.models.beta.vaults.credentials.BetaManagedAgentsMcpOAuthRefreshParams;
|
|
336
|
+
import com.anthropic.models.beta.vaults.credentials.BetaManagedAgentsMcpOAuthRefreshUpdateParams;
|
|
337
|
+
import com.anthropic.models.beta.vaults.credentials.BetaManagedAgentsMcpOAuthUpdateParams;
|
|
338
|
+
import com.anthropic.models.beta.vaults.credentials.CredentialCreateParams;
|
|
339
|
+
import com.anthropic.models.beta.vaults.credentials.CredentialUpdateParams;
|
|
340
|
+
import java.time.OffsetDateTime;
|
|
341
|
+
|
|
342
|
+
// Create a vault
|
|
343
|
+
var vault = client.beta().vaults().create(VaultCreateParams.builder()
|
|
344
|
+
.displayName("Alice")
|
|
345
|
+
.metadata(VaultCreateParams.Metadata.builder()
|
|
346
|
+
.putAdditionalProperty("external_user_id", JsonValue.from("usr_abc123"))
|
|
347
|
+
.build())
|
|
348
|
+
.build());
|
|
349
|
+
System.out.println(vault.id()); // "vlt_01ABC..."
|
|
350
|
+
|
|
351
|
+
// Add an OAuth credential
|
|
352
|
+
var credential = client.beta().vaults().credentials().create(vault.id(),
|
|
353
|
+
CredentialCreateParams.builder()
|
|
354
|
+
.displayName("Alice's Slack")
|
|
355
|
+
.auth(BetaManagedAgentsMcpOAuthCreateParams.builder()
|
|
356
|
+
.type(BetaManagedAgentsMcpOAuthCreateParams.Type.MCP_OAUTH)
|
|
357
|
+
.mcpServerUrl("https://mcp.slack.com/mcp")
|
|
358
|
+
.accessToken("xoxp-...")
|
|
359
|
+
.expiresAt(OffsetDateTime.parse("2026-04-15T00:00:00Z"))
|
|
360
|
+
.refresh(BetaManagedAgentsMcpOAuthRefreshParams.builder()
|
|
361
|
+
.tokenEndpoint("https://slack.com/api/oauth.v2.access")
|
|
362
|
+
.clientId("1234567890.0987654321")
|
|
363
|
+
.scope("channels:read chat:write")
|
|
364
|
+
.refreshToken("xoxe-1-...")
|
|
365
|
+
.clientSecretPostTokenEndpointAuth("abc123...")
|
|
366
|
+
.build())
|
|
367
|
+
.build())
|
|
368
|
+
.build());
|
|
369
|
+
|
|
370
|
+
// Rotate the credential (e.g., after a token refresh)
|
|
371
|
+
client.beta().vaults().credentials().update(credential.id(),
|
|
372
|
+
CredentialUpdateParams.builder()
|
|
373
|
+
.vaultId(vault.id())
|
|
374
|
+
.auth(BetaManagedAgentsMcpOAuthUpdateParams.builder()
|
|
375
|
+
.type(BetaManagedAgentsMcpOAuthUpdateParams.Type.MCP_OAUTH)
|
|
376
|
+
.accessToken("xoxp-new-...")
|
|
377
|
+
.expiresAt(OffsetDateTime.parse("2026-05-15T00:00:00Z"))
|
|
378
|
+
.refresh(BetaManagedAgentsMcpOAuthRefreshUpdateParams.builder()
|
|
379
|
+
.refreshToken("xoxe-1-new-...")
|
|
380
|
+
.build())
|
|
381
|
+
.build())
|
|
382
|
+
.build());
|
|
383
|
+
|
|
384
|
+
// Archive a vault
|
|
385
|
+
client.beta().vaults().archive(vault.id());
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
## GitHub Repository Integration
|
|
391
|
+
|
|
392
|
+
Mount a GitHub repository as a session resource (a vault holds the GitHub MCP credential):
|
|
393
|
+
|
|
394
|
+
```java
|
|
395
|
+
import com.anthropic.models.beta.sessions.BetaManagedAgentsGitHubRepositoryResourceParams;
|
|
396
|
+
|
|
397
|
+
var session = client.beta().sessions().create(SessionCreateParams.builder()
|
|
398
|
+
.agent(agent.id())
|
|
399
|
+
.environmentId(environment.id())
|
|
400
|
+
.addVaultId(vault.id())
|
|
401
|
+
.addResource(BetaManagedAgentsGitHubRepositoryResourceParams.builder()
|
|
402
|
+
.type(BetaManagedAgentsGitHubRepositoryResourceParams.Type.GITHUB_REPOSITORY)
|
|
403
|
+
.url("https://github.com/org/repo")
|
|
404
|
+
.mountPath("/workspace/repo")
|
|
405
|
+
.authorizationToken("ghp_your_github_token")
|
|
406
|
+
.build())
|
|
407
|
+
.build());
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
Multiple repositories on the same session:
|
|
411
|
+
|
|
412
|
+
```java
|
|
413
|
+
import java.util.List;
|
|
414
|
+
|
|
415
|
+
var resources = List.of(
|
|
416
|
+
BetaManagedAgentsGitHubRepositoryResourceParams.builder()
|
|
417
|
+
.type(BetaManagedAgentsGitHubRepositoryResourceParams.Type.GITHUB_REPOSITORY)
|
|
418
|
+
.url("https://github.com/org/frontend")
|
|
419
|
+
.mountPath("/workspace/frontend")
|
|
420
|
+
.authorizationToken("ghp_your_github_token")
|
|
421
|
+
.build(),
|
|
422
|
+
BetaManagedAgentsGitHubRepositoryResourceParams.builder()
|
|
423
|
+
.type(BetaManagedAgentsGitHubRepositoryResourceParams.Type.GITHUB_REPOSITORY)
|
|
424
|
+
.url("https://github.com/org/backend")
|
|
425
|
+
.mountPath("/workspace/backend")
|
|
426
|
+
.authorizationToken("ghp_your_github_token")
|
|
427
|
+
.build());
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
Rotating a repository's authorization token:
|
|
431
|
+
|
|
432
|
+
```java
|
|
433
|
+
import com.anthropic.models.beta.sessions.resources.ResourceUpdateParams;
|
|
434
|
+
|
|
435
|
+
var listed = client.beta().sessions().resources().list(session.id());
|
|
436
|
+
var repoResourceId = listed.data().get(0).asGitHubRepository().id();
|
|
437
|
+
|
|
438
|
+
client.beta().sessions().resources().update(repoResourceId, ResourceUpdateParams.builder()
|
|
439
|
+
.sessionId(session.id())
|
|
440
|
+
.authorizationToken("ghp_your_new_github_token")
|
|
441
|
+
.build());
|
|
442
|
+
```
|