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,561 @@
|
|
|
1
|
+
# Managed Agents — Go
|
|
2
|
+
|
|
3
|
+
> **Bindings not shown here:** This README covers the most common managed-agents flows for Go. If you need a class, method, namespace, field, or behavior that isn't shown, WebFetch the Go 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 `agents.New` and pass it to every subsequent `sessions.New`; do not call `agents.New` 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
|
+
go get github.com/anthropics/anthropic-sdk-go
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Client Initialization
|
|
14
|
+
|
|
15
|
+
```go
|
|
16
|
+
import (
|
|
17
|
+
"context"
|
|
18
|
+
|
|
19
|
+
"github.com/anthropics/anthropic-sdk-go"
|
|
20
|
+
"github.com/anthropics/anthropic-sdk-go/option"
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
// Default (uses ANTHROPIC_API_KEY env var)
|
|
24
|
+
client := anthropic.NewClient()
|
|
25
|
+
|
|
26
|
+
// Explicit API key
|
|
27
|
+
client := anthropic.NewClient(
|
|
28
|
+
option.WithAPIKey("your-api-key"),
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
ctx := context.Background()
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Create an Environment
|
|
37
|
+
|
|
38
|
+
```go
|
|
39
|
+
environment, err := client.Beta.Environments.New(ctx, anthropic.BetaEnvironmentNewParams{
|
|
40
|
+
Name: "my-dev-env",
|
|
41
|
+
Config: anthropic.BetaCloudConfigParams{
|
|
42
|
+
Networking: anthropic.BetaCloudConfigParamsNetworkingUnion{
|
|
43
|
+
OfUnrestricted: &anthropic.UnrestrictedNetworkParam{},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
})
|
|
47
|
+
if err != nil {
|
|
48
|
+
panic(err)
|
|
49
|
+
}
|
|
50
|
+
fmt.Println(environment.ID) // env_...
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Create an Agent (required first step)
|
|
56
|
+
|
|
57
|
+
> ⚠️ **There is no inline agent config.** `Model`/`System`/`Tools` live on the agent object, not the session. Always start with `Beta.Agents.New()` — the session only takes `Agent: anthropic.BetaSessionNewParamsAgentUnion{OfString: anthropic.String(agent.ID)}` (or the typed `OfBetaManagedAgentsAgents` variant when you need a specific version).
|
|
58
|
+
|
|
59
|
+
### Minimal
|
|
60
|
+
|
|
61
|
+
```go
|
|
62
|
+
// 1. Create the agent (reusable, versioned)
|
|
63
|
+
agent, err := client.Beta.Agents.New(ctx, anthropic.BetaAgentNewParams{
|
|
64
|
+
Name: "Coding Assistant",
|
|
65
|
+
Model: anthropic.BetaManagedAgentsModelConfigParams{
|
|
66
|
+
ID: "claude-opus-4-8",
|
|
67
|
+
Type: anthropic.BetaManagedAgentsModelConfigParamsTypeModelConfig,
|
|
68
|
+
},
|
|
69
|
+
System: anthropic.String("You are a helpful coding assistant."),
|
|
70
|
+
Tools: []anthropic.BetaAgentNewParamsToolUnion{{
|
|
71
|
+
OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{
|
|
72
|
+
Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401,
|
|
73
|
+
},
|
|
74
|
+
}},
|
|
75
|
+
})
|
|
76
|
+
if err != nil {
|
|
77
|
+
panic(err)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// 2. Start a session
|
|
81
|
+
session, err := client.Beta.Sessions.New(ctx, anthropic.BetaSessionNewParams{
|
|
82
|
+
Agent: anthropic.BetaSessionNewParamsAgentUnion{
|
|
83
|
+
OfBetaManagedAgentsAgents: &anthropic.BetaManagedAgentsAgentParams{
|
|
84
|
+
Type: anthropic.BetaManagedAgentsAgentParamsTypeAgent,
|
|
85
|
+
ID: agent.ID,
|
|
86
|
+
Version: anthropic.Int(agent.Version),
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
EnvironmentID: environment.ID,
|
|
90
|
+
Title: anthropic.String("Quickstart session"),
|
|
91
|
+
})
|
|
92
|
+
if err != nil {
|
|
93
|
+
panic(err)
|
|
94
|
+
}
|
|
95
|
+
fmt.Printf("Session ID: %s, status: %s\n", session.ID, session.Status)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Updating an Agent
|
|
99
|
+
|
|
100
|
+
Updates create new versions; the agent object is immutable per version.
|
|
101
|
+
|
|
102
|
+
```go
|
|
103
|
+
updatedAgent, err := client.Beta.Agents.Update(ctx, agent.ID, anthropic.BetaAgentUpdateParams{
|
|
104
|
+
Version: agent.Version,
|
|
105
|
+
System: anthropic.String("You are a helpful coding agent. Always write tests."),
|
|
106
|
+
})
|
|
107
|
+
if err != nil {
|
|
108
|
+
panic(err)
|
|
109
|
+
}
|
|
110
|
+
fmt.Printf("New version: %d\n", updatedAgent.Version)
|
|
111
|
+
|
|
112
|
+
// List all versions
|
|
113
|
+
iter := client.Beta.Agents.Versions.ListAutoPaging(ctx, agent.ID, anthropic.BetaAgentVersionListParams{})
|
|
114
|
+
for iter.Next() {
|
|
115
|
+
version := iter.Current()
|
|
116
|
+
fmt.Printf("Version %d: %s\n", version.Version, version.UpdatedAt.Format(time.RFC3339))
|
|
117
|
+
}
|
|
118
|
+
if err := iter.Err(); err != nil {
|
|
119
|
+
panic(err)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Archive the agent
|
|
123
|
+
_, err = client.Beta.Agents.Archive(ctx, agent.ID, anthropic.BetaAgentArchiveParams{})
|
|
124
|
+
if err != nil {
|
|
125
|
+
panic(err)
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Send a User Message
|
|
132
|
+
|
|
133
|
+
```go
|
|
134
|
+
_, err = client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{
|
|
135
|
+
Events: []anthropic.SendEventsParamsUnion{{
|
|
136
|
+
OfUserMessage: &anthropic.BetaManagedAgentsUserMessageEventParams{
|
|
137
|
+
Type: anthropic.BetaManagedAgentsUserMessageEventParamsTypeUserMessage,
|
|
138
|
+
Content: []anthropic.BetaManagedAgentsUserMessageEventParamsContentUnion{{
|
|
139
|
+
OfText: &anthropic.BetaManagedAgentsTextBlockParam{
|
|
140
|
+
Type: anthropic.BetaManagedAgentsTextBlockTypeText,
|
|
141
|
+
Text: "Review the auth module",
|
|
142
|
+
},
|
|
143
|
+
}},
|
|
144
|
+
},
|
|
145
|
+
}},
|
|
146
|
+
})
|
|
147
|
+
if err != nil {
|
|
148
|
+
panic(err)
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
> 💡 **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).
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Stream Events (SSE)
|
|
157
|
+
|
|
158
|
+
```go
|
|
159
|
+
// Open the stream first, then send the user message
|
|
160
|
+
stream := client.Beta.Sessions.Events.StreamEvents(ctx, session.ID, anthropic.BetaSessionEventStreamParams{})
|
|
161
|
+
defer stream.Close()
|
|
162
|
+
|
|
163
|
+
if _, err := client.Beta.Sessions.Events.Send(ctx, session.ID, anthropic.BetaSessionEventSendParams{
|
|
164
|
+
Events: []anthropic.SendEventsParamsUnion{{
|
|
165
|
+
OfUserMessage: &anthropic.BetaManagedAgentsUserMessageEventParams{
|
|
166
|
+
Type: anthropic.BetaManagedAgentsUserMessageEventParamsTypeUserMessage,
|
|
167
|
+
Content: []anthropic.BetaManagedAgentsUserMessageEventParamsContentUnion{{
|
|
168
|
+
OfText: &anthropic.BetaManagedAgentsTextBlockParam{
|
|
169
|
+
Type: anthropic.BetaManagedAgentsTextBlockTypeText,
|
|
170
|
+
Text: "Summarize the repo README",
|
|
171
|
+
},
|
|
172
|
+
}},
|
|
173
|
+
},
|
|
174
|
+
}},
|
|
175
|
+
}); err != nil {
|
|
176
|
+
panic(err)
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
events:
|
|
180
|
+
for stream.Next() {
|
|
181
|
+
switch event := stream.Current().AsAny().(type) {
|
|
182
|
+
case anthropic.BetaManagedAgentsAgentMessageEvent:
|
|
183
|
+
for _, block := range event.Content {
|
|
184
|
+
fmt.Print(block.Text)
|
|
185
|
+
}
|
|
186
|
+
case anthropic.BetaManagedAgentsAgentToolUseEvent:
|
|
187
|
+
fmt.Printf("\n[Using tool: %s]\n", event.Name)
|
|
188
|
+
case anthropic.BetaManagedAgentsSessionStatusIdleEvent:
|
|
189
|
+
break events
|
|
190
|
+
case anthropic.BetaManagedAgentsSessionErrorEvent:
|
|
191
|
+
fmt.Printf("\n[Error: %s]\n", event.Error.Message)
|
|
192
|
+
break events
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
if err := stream.Err(); err != nil {
|
|
196
|
+
panic(err)
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Reconnecting and Tailing
|
|
201
|
+
|
|
202
|
+
When reconnecting mid-session, list past events first to dedupe, then tail live events:
|
|
203
|
+
|
|
204
|
+
```go
|
|
205
|
+
stream := client.Beta.Sessions.Events.StreamEvents(ctx, session.ID, anthropic.BetaSessionEventStreamParams{})
|
|
206
|
+
defer stream.Close()
|
|
207
|
+
|
|
208
|
+
// Stream is open and buffering. List history before tailing live.
|
|
209
|
+
seenEventIDs := map[string]struct{}{}
|
|
210
|
+
history := client.Beta.Sessions.Events.ListAutoPaging(ctx, session.ID, anthropic.BetaSessionEventListParams{})
|
|
211
|
+
for history.Next() {
|
|
212
|
+
seenEventIDs[history.Current().ID] = struct{}{}
|
|
213
|
+
}
|
|
214
|
+
if err := history.Err(); err != nil {
|
|
215
|
+
panic(err)
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// Tail live events, skipping anything already seen
|
|
219
|
+
tail:
|
|
220
|
+
for stream.Next() {
|
|
221
|
+
event := stream.Current()
|
|
222
|
+
if _, seen := seenEventIDs[event.ID]; seen {
|
|
223
|
+
continue
|
|
224
|
+
}
|
|
225
|
+
seenEventIDs[event.ID] = struct{}{}
|
|
226
|
+
switch event := event.AsAny().(type) {
|
|
227
|
+
case anthropic.BetaManagedAgentsAgentMessageEvent:
|
|
228
|
+
for _, block := range event.Content {
|
|
229
|
+
fmt.Print(block.Text)
|
|
230
|
+
}
|
|
231
|
+
case anthropic.BetaManagedAgentsSessionStatusIdleEvent:
|
|
232
|
+
break tail
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
if err := stream.Err(); err != nil {
|
|
236
|
+
panic(err)
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Provide Custom Tool Result
|
|
243
|
+
|
|
244
|
+
> ℹ️ The Go 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 `github.com/anthropics/anthropic-sdk-go` repository for the corresponding Go params types.
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Poll Events
|
|
249
|
+
|
|
250
|
+
```go
|
|
251
|
+
// Auto-paginating iterator
|
|
252
|
+
iter := client.Beta.Sessions.Events.ListAutoPaging(ctx, session.ID, anthropic.BetaSessionEventListParams{})
|
|
253
|
+
for iter.Next() {
|
|
254
|
+
event := iter.Current()
|
|
255
|
+
fmt.Printf("%s: %s\n", event.Type, event.ID)
|
|
256
|
+
}
|
|
257
|
+
if err := iter.Err(); err != nil {
|
|
258
|
+
panic(err)
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## Upload a File
|
|
265
|
+
|
|
266
|
+
```go
|
|
267
|
+
csvFile, err := os.Open("data.csv")
|
|
268
|
+
if err != nil {
|
|
269
|
+
panic(err)
|
|
270
|
+
}
|
|
271
|
+
defer csvFile.Close()
|
|
272
|
+
|
|
273
|
+
file, err := client.Beta.Files.Upload(ctx, anthropic.BetaFileUploadParams{
|
|
274
|
+
File: csvFile,
|
|
275
|
+
})
|
|
276
|
+
if err != nil {
|
|
277
|
+
panic(err)
|
|
278
|
+
}
|
|
279
|
+
fmt.Printf("File ID: %s\n", file.ID)
|
|
280
|
+
|
|
281
|
+
// Mount in a session
|
|
282
|
+
session, err := client.Beta.Sessions.New(ctx, anthropic.BetaSessionNewParams{
|
|
283
|
+
Agent: anthropic.BetaSessionNewParamsAgentUnion{
|
|
284
|
+
OfString: anthropic.String(agent.ID),
|
|
285
|
+
},
|
|
286
|
+
EnvironmentID: environment.ID,
|
|
287
|
+
Resources: []anthropic.BetaSessionNewParamsResourceUnion{{
|
|
288
|
+
OfFile: &anthropic.BetaManagedAgentsFileResourceParams{
|
|
289
|
+
Type: anthropic.BetaManagedAgentsFileResourceParamsTypeFile,
|
|
290
|
+
FileID: file.ID,
|
|
291
|
+
MountPath: anthropic.String("/workspace/data.csv"),
|
|
292
|
+
},
|
|
293
|
+
}},
|
|
294
|
+
})
|
|
295
|
+
if err != nil {
|
|
296
|
+
panic(err)
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### Add and Manage Resources on an Existing Session
|
|
301
|
+
|
|
302
|
+
```go
|
|
303
|
+
// Attach an additional file to an open session
|
|
304
|
+
resource, err := client.Beta.Sessions.Resources.Add(ctx, session.ID, anthropic.BetaSessionResourceAddParams{
|
|
305
|
+
BetaManagedAgentsFileResourceParams: anthropic.BetaManagedAgentsFileResourceParams{
|
|
306
|
+
Type: anthropic.BetaManagedAgentsFileResourceParamsTypeFile,
|
|
307
|
+
FileID: file.ID,
|
|
308
|
+
},
|
|
309
|
+
})
|
|
310
|
+
if err != nil {
|
|
311
|
+
panic(err)
|
|
312
|
+
}
|
|
313
|
+
fmt.Println(resource.ID) // "sesrsc_01ABC..."
|
|
314
|
+
|
|
315
|
+
// List resources on the session
|
|
316
|
+
listed, err := client.Beta.Sessions.Resources.List(ctx, session.ID, anthropic.BetaSessionResourceListParams{})
|
|
317
|
+
if err != nil {
|
|
318
|
+
panic(err)
|
|
319
|
+
}
|
|
320
|
+
for _, entry := range listed.Data {
|
|
321
|
+
fmt.Println(entry.ID, entry.Type)
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// Detach a resource
|
|
325
|
+
if _, err := client.Beta.Sessions.Resources.Delete(ctx, resource.ID, anthropic.BetaSessionResourceDeleteParams{
|
|
326
|
+
SessionID: session.ID,
|
|
327
|
+
}); err != nil {
|
|
328
|
+
panic(err)
|
|
329
|
+
}
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## List and Download Session Files
|
|
335
|
+
|
|
336
|
+
> ℹ️ Listing and downloading files an agent wrote during a session is not yet documented for Go in this skill or in the apps source examples. See `shared/managed-agents-events.md` and the `github.com/anthropics/anthropic-sdk-go` repository for the `Beta.Files.List` and `Beta.Files.Download` Go params types.
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Session Management
|
|
341
|
+
|
|
342
|
+
```go
|
|
343
|
+
// List environments
|
|
344
|
+
environments, err := client.Beta.Environments.List(ctx, anthropic.BetaEnvironmentListParams{})
|
|
345
|
+
if err != nil {
|
|
346
|
+
panic(err)
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// Retrieve a specific environment
|
|
350
|
+
env, err := client.Beta.Environments.Get(ctx, environment.ID, anthropic.BetaEnvironmentGetParams{})
|
|
351
|
+
if err != nil {
|
|
352
|
+
panic(err)
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// Archive an environment (read-only, existing sessions continue)
|
|
356
|
+
_, err = client.Beta.Environments.Archive(ctx, environment.ID, anthropic.BetaEnvironmentArchiveParams{})
|
|
357
|
+
if err != nil {
|
|
358
|
+
panic(err)
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// Delete an environment (only if no sessions reference it)
|
|
362
|
+
_, err = client.Beta.Environments.Delete(ctx, environment.ID, anthropic.BetaEnvironmentDeleteParams{})
|
|
363
|
+
if err != nil {
|
|
364
|
+
panic(err)
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// Delete a session
|
|
368
|
+
_, err = client.Beta.Sessions.Delete(ctx, session.ID, anthropic.BetaSessionDeleteParams{})
|
|
369
|
+
if err != nil {
|
|
370
|
+
panic(err)
|
|
371
|
+
}
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
## MCP Server Integration
|
|
377
|
+
|
|
378
|
+
```go
|
|
379
|
+
// Agent declares MCP server (no auth here — auth goes in a vault)
|
|
380
|
+
agent, err := client.Beta.Agents.New(ctx, anthropic.BetaAgentNewParams{
|
|
381
|
+
Name: "GitHub Assistant",
|
|
382
|
+
Model: anthropic.BetaManagedAgentsModelConfigParams{
|
|
383
|
+
ID: "claude-opus-4-8",
|
|
384
|
+
Type: anthropic.BetaManagedAgentsModelConfigParamsTypeModelConfig,
|
|
385
|
+
},
|
|
386
|
+
MCPServers: []anthropic.BetaManagedAgentsUrlmcpServerParams{{
|
|
387
|
+
Type: anthropic.BetaManagedAgentsUrlmcpServerParamsTypeURL,
|
|
388
|
+
Name: "github",
|
|
389
|
+
URL: "https://api.githubcopilot.com/mcp/",
|
|
390
|
+
}},
|
|
391
|
+
Tools: []anthropic.BetaAgentNewParamsToolUnion{
|
|
392
|
+
{
|
|
393
|
+
OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{
|
|
394
|
+
Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401,
|
|
395
|
+
},
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
OfMCPToolset: &anthropic.BetaManagedAgentsMCPToolsetParams{
|
|
399
|
+
Type: anthropic.BetaManagedAgentsMCPToolsetParamsTypeMCPToolset,
|
|
400
|
+
MCPServerName: "github",
|
|
401
|
+
},
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
})
|
|
405
|
+
if err != nil {
|
|
406
|
+
panic(err)
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
// Session attaches vault(s) containing credentials for those MCP server URLs
|
|
410
|
+
session, err := client.Beta.Sessions.New(ctx, anthropic.BetaSessionNewParams{
|
|
411
|
+
Agent: anthropic.BetaSessionNewParamsAgentUnion{
|
|
412
|
+
OfBetaManagedAgentsAgents: &anthropic.BetaManagedAgentsAgentParams{
|
|
413
|
+
Type: anthropic.BetaManagedAgentsAgentParamsTypeAgent,
|
|
414
|
+
ID: agent.ID,
|
|
415
|
+
Version: anthropic.Int(agent.Version),
|
|
416
|
+
},
|
|
417
|
+
},
|
|
418
|
+
EnvironmentID: environment.ID,
|
|
419
|
+
VaultIDs: []string{vault.ID},
|
|
420
|
+
})
|
|
421
|
+
if err != nil {
|
|
422
|
+
panic(err)
|
|
423
|
+
}
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
See `shared/managed-agents-tools.md` §Vaults for creating vaults and adding credentials.
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
## Vaults
|
|
431
|
+
|
|
432
|
+
```go
|
|
433
|
+
// Create a vault
|
|
434
|
+
vault, err := client.Beta.Vaults.New(ctx, anthropic.BetaVaultNewParams{
|
|
435
|
+
DisplayName: "Alice",
|
|
436
|
+
Metadata: map[string]string{"external_user_id": "usr_abc123"},
|
|
437
|
+
})
|
|
438
|
+
if err != nil {
|
|
439
|
+
panic(err)
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
// Add an OAuth credential
|
|
443
|
+
credential, err := client.Beta.Vaults.Credentials.New(ctx, vault.ID, anthropic.BetaVaultCredentialNewParams{
|
|
444
|
+
DisplayName: anthropic.String("Alice's Slack"),
|
|
445
|
+
Auth: anthropic.BetaVaultCredentialNewParamsAuthUnion{
|
|
446
|
+
OfMCPOAuth: &anthropic.BetaManagedAgentsMCPOAuthCreateParams{
|
|
447
|
+
Type: anthropic.BetaManagedAgentsMCPOAuthCreateParamsTypeMCPOAuth,
|
|
448
|
+
MCPServerURL: "https://mcp.slack.com/mcp",
|
|
449
|
+
AccessToken: "xoxp-...",
|
|
450
|
+
ExpiresAt: anthropic.Time(time.Date(2026, time.April, 15, 0, 0, 0, 0, time.UTC)),
|
|
451
|
+
Refresh: anthropic.BetaManagedAgentsMCPOAuthRefreshParams{
|
|
452
|
+
TokenEndpoint: "https://slack.com/api/oauth.v2.access",
|
|
453
|
+
ClientID: "1234567890.0987654321",
|
|
454
|
+
Scope: anthropic.String("channels:read chat:write"),
|
|
455
|
+
RefreshToken: "xoxe-1-...",
|
|
456
|
+
TokenEndpointAuth: anthropic.BetaManagedAgentsMCPOAuthRefreshParamsTokenEndpointAuthUnion{
|
|
457
|
+
OfClientSecretPost: &anthropic.BetaManagedAgentsTokenEndpointAuthPostParam{
|
|
458
|
+
Type: anthropic.BetaManagedAgentsTokenEndpointAuthPostParamTypeClientSecretPost,
|
|
459
|
+
ClientSecret: "abc123...",
|
|
460
|
+
},
|
|
461
|
+
},
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
},
|
|
465
|
+
})
|
|
466
|
+
if err != nil {
|
|
467
|
+
panic(err)
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
// Rotate the credential (e.g., after a token refresh)
|
|
471
|
+
_, err = client.Beta.Vaults.Credentials.Update(ctx, credential.ID, anthropic.BetaVaultCredentialUpdateParams{
|
|
472
|
+
VaultID: vault.ID,
|
|
473
|
+
Auth: anthropic.BetaVaultCredentialUpdateParamsAuthUnion{
|
|
474
|
+
OfMCPOAuth: &anthropic.BetaManagedAgentsMCPOAuthUpdateParams{
|
|
475
|
+
Type: anthropic.BetaManagedAgentsMCPOAuthUpdateParamsTypeMCPOAuth,
|
|
476
|
+
AccessToken: anthropic.String("xoxp-new-..."),
|
|
477
|
+
ExpiresAt: anthropic.Time(time.Date(2026, time.May, 15, 0, 0, 0, 0, time.UTC)),
|
|
478
|
+
Refresh: anthropic.BetaManagedAgentsMCPOAuthRefreshUpdateParams{
|
|
479
|
+
RefreshToken: anthropic.String("xoxe-1-new-..."),
|
|
480
|
+
},
|
|
481
|
+
},
|
|
482
|
+
},
|
|
483
|
+
})
|
|
484
|
+
if err != nil {
|
|
485
|
+
panic(err)
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
// Archive a vault
|
|
489
|
+
_, err = client.Beta.Vaults.Archive(ctx, vault.ID, anthropic.BetaVaultArchiveParams{})
|
|
490
|
+
if err != nil {
|
|
491
|
+
panic(err)
|
|
492
|
+
}
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
---
|
|
496
|
+
|
|
497
|
+
## GitHub Repository Integration
|
|
498
|
+
|
|
499
|
+
Mount a GitHub repository as a session resource (a vault holds the GitHub MCP credential):
|
|
500
|
+
|
|
501
|
+
```go
|
|
502
|
+
session, err := client.Beta.Sessions.New(ctx, anthropic.BetaSessionNewParams{
|
|
503
|
+
Agent: anthropic.BetaSessionNewParamsAgentUnion{OfString: anthropic.String(agent.ID)},
|
|
504
|
+
EnvironmentID: environment.ID,
|
|
505
|
+
VaultIDs: []string{vault.ID},
|
|
506
|
+
Resources: []anthropic.BetaSessionNewParamsResourceUnion{
|
|
507
|
+
{
|
|
508
|
+
OfGitHubRepository: &anthropic.BetaManagedAgentsGitHubRepositoryResourceParams{
|
|
509
|
+
Type: anthropic.BetaManagedAgentsGitHubRepositoryResourceParamsTypeGitHubRepository,
|
|
510
|
+
URL: "https://github.com/org/repo",
|
|
511
|
+
MountPath: anthropic.String("/workspace/repo"),
|
|
512
|
+
AuthorizationToken: "ghp_your_github_token",
|
|
513
|
+
},
|
|
514
|
+
},
|
|
515
|
+
},
|
|
516
|
+
})
|
|
517
|
+
if err != nil {
|
|
518
|
+
panic(err)
|
|
519
|
+
}
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
Multiple repositories on the same session:
|
|
523
|
+
|
|
524
|
+
```go
|
|
525
|
+
resources := []anthropic.BetaSessionNewParamsResourceUnion{
|
|
526
|
+
{
|
|
527
|
+
OfGitHubRepository: &anthropic.BetaManagedAgentsGitHubRepositoryResourceParams{
|
|
528
|
+
Type: anthropic.BetaManagedAgentsGitHubRepositoryResourceParamsTypeGitHubRepository,
|
|
529
|
+
URL: "https://github.com/org/frontend",
|
|
530
|
+
MountPath: anthropic.String("/workspace/frontend"),
|
|
531
|
+
AuthorizationToken: "ghp_your_github_token",
|
|
532
|
+
},
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
OfGitHubRepository: &anthropic.BetaManagedAgentsGitHubRepositoryResourceParams{
|
|
536
|
+
Type: anthropic.BetaManagedAgentsGitHubRepositoryResourceParamsTypeGitHubRepository,
|
|
537
|
+
URL: "https://github.com/org/backend",
|
|
538
|
+
MountPath: anthropic.String("/workspace/backend"),
|
|
539
|
+
AuthorizationToken: "ghp_your_github_token",
|
|
540
|
+
},
|
|
541
|
+
},
|
|
542
|
+
}
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
Rotating a repository's authorization token:
|
|
546
|
+
|
|
547
|
+
```go
|
|
548
|
+
listed, err := client.Beta.Sessions.Resources.List(ctx, session.ID, anthropic.BetaSessionResourceListParams{})
|
|
549
|
+
if err != nil {
|
|
550
|
+
panic(err)
|
|
551
|
+
}
|
|
552
|
+
repoResourceID := listed.Data[0].ID
|
|
553
|
+
|
|
554
|
+
_, err = client.Beta.Sessions.Resources.Update(ctx, repoResourceID, anthropic.BetaSessionResourceUpdateParams{
|
|
555
|
+
SessionID: session.ID,
|
|
556
|
+
AuthorizationToken: "ghp_your_new_github_token",
|
|
557
|
+
})
|
|
558
|
+
if err != nil {
|
|
559
|
+
panic(err)
|
|
560
|
+
}
|
|
561
|
+
```
|