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,269 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
GIF Builder - Core module for assembling frames into GIFs optimized for Slack.
|
|
4
|
+
|
|
5
|
+
This module provides the main interface for creating GIFs from programmatically
|
|
6
|
+
generated frames, with automatic optimization for Slack's requirements.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
from typing import Optional
|
|
11
|
+
|
|
12
|
+
import imageio.v3 as imageio
|
|
13
|
+
import numpy as np
|
|
14
|
+
from PIL import Image
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class GIFBuilder:
|
|
18
|
+
"""Builder for creating optimized GIFs from frames."""
|
|
19
|
+
|
|
20
|
+
def __init__(self, width: int = 480, height: int = 480, fps: int = 15):
|
|
21
|
+
"""
|
|
22
|
+
Initialize GIF builder.
|
|
23
|
+
|
|
24
|
+
Args:
|
|
25
|
+
width: Frame width in pixels
|
|
26
|
+
height: Frame height in pixels
|
|
27
|
+
fps: Frames per second
|
|
28
|
+
"""
|
|
29
|
+
self.width = width
|
|
30
|
+
self.height = height
|
|
31
|
+
self.fps = fps
|
|
32
|
+
self.frames: list[np.ndarray] = []
|
|
33
|
+
|
|
34
|
+
def add_frame(self, frame: np.ndarray | Image.Image):
|
|
35
|
+
"""
|
|
36
|
+
Add a frame to the GIF.
|
|
37
|
+
|
|
38
|
+
Args:
|
|
39
|
+
frame: Frame as numpy array or PIL Image (will be converted to RGB)
|
|
40
|
+
"""
|
|
41
|
+
if isinstance(frame, Image.Image):
|
|
42
|
+
frame = np.array(frame.convert("RGB"))
|
|
43
|
+
|
|
44
|
+
# Ensure frame is correct size
|
|
45
|
+
if frame.shape[:2] != (self.height, self.width):
|
|
46
|
+
pil_frame = Image.fromarray(frame)
|
|
47
|
+
pil_frame = pil_frame.resize(
|
|
48
|
+
(self.width, self.height), Image.Resampling.LANCZOS
|
|
49
|
+
)
|
|
50
|
+
frame = np.array(pil_frame)
|
|
51
|
+
|
|
52
|
+
self.frames.append(frame)
|
|
53
|
+
|
|
54
|
+
def add_frames(self, frames: list[np.ndarray | Image.Image]):
|
|
55
|
+
"""Add multiple frames at once."""
|
|
56
|
+
for frame in frames:
|
|
57
|
+
self.add_frame(frame)
|
|
58
|
+
|
|
59
|
+
def optimize_colors(
|
|
60
|
+
self, num_colors: int = 128, use_global_palette: bool = True
|
|
61
|
+
) -> list[np.ndarray]:
|
|
62
|
+
"""
|
|
63
|
+
Reduce colors in all frames using quantization.
|
|
64
|
+
|
|
65
|
+
Args:
|
|
66
|
+
num_colors: Target number of colors (8-256)
|
|
67
|
+
use_global_palette: Use a single palette for all frames (better compression)
|
|
68
|
+
|
|
69
|
+
Returns:
|
|
70
|
+
List of color-optimized frames
|
|
71
|
+
"""
|
|
72
|
+
optimized = []
|
|
73
|
+
|
|
74
|
+
if use_global_palette and len(self.frames) > 1:
|
|
75
|
+
# Create a global palette from all frames
|
|
76
|
+
# Sample frames to build palette
|
|
77
|
+
sample_size = min(5, len(self.frames))
|
|
78
|
+
sample_indices = [
|
|
79
|
+
int(i * len(self.frames) / sample_size) for i in range(sample_size)
|
|
80
|
+
]
|
|
81
|
+
sample_frames = [self.frames[i] for i in sample_indices]
|
|
82
|
+
|
|
83
|
+
# Combine sample frames into a single image for palette generation
|
|
84
|
+
# Flatten each frame to get all pixels, then stack them
|
|
85
|
+
all_pixels = np.vstack(
|
|
86
|
+
[f.reshape(-1, 3) for f in sample_frames]
|
|
87
|
+
) # (total_pixels, 3)
|
|
88
|
+
|
|
89
|
+
# Create a properly-shaped RGB image from the pixel data
|
|
90
|
+
# We'll make a roughly square image from all the pixels
|
|
91
|
+
total_pixels = len(all_pixels)
|
|
92
|
+
width = min(512, int(np.sqrt(total_pixels))) # Reasonable width, max 512
|
|
93
|
+
height = (total_pixels + width - 1) // width # Ceiling division
|
|
94
|
+
|
|
95
|
+
# Pad if necessary to fill the rectangle
|
|
96
|
+
pixels_needed = width * height
|
|
97
|
+
if pixels_needed > total_pixels:
|
|
98
|
+
padding = np.zeros((pixels_needed - total_pixels, 3), dtype=np.uint8)
|
|
99
|
+
all_pixels = np.vstack([all_pixels, padding])
|
|
100
|
+
|
|
101
|
+
# Reshape to proper RGB image format (H, W, 3)
|
|
102
|
+
img_array = (
|
|
103
|
+
all_pixels[:pixels_needed].reshape(height, width, 3).astype(np.uint8)
|
|
104
|
+
)
|
|
105
|
+
combined_img = Image.fromarray(img_array, mode="RGB")
|
|
106
|
+
|
|
107
|
+
# Generate global palette
|
|
108
|
+
global_palette = combined_img.quantize(colors=num_colors, method=2)
|
|
109
|
+
|
|
110
|
+
# Apply global palette to all frames
|
|
111
|
+
for frame in self.frames:
|
|
112
|
+
pil_frame = Image.fromarray(frame)
|
|
113
|
+
quantized = pil_frame.quantize(palette=global_palette, dither=1)
|
|
114
|
+
optimized.append(np.array(quantized.convert("RGB")))
|
|
115
|
+
else:
|
|
116
|
+
# Use per-frame quantization
|
|
117
|
+
for frame in self.frames:
|
|
118
|
+
pil_frame = Image.fromarray(frame)
|
|
119
|
+
quantized = pil_frame.quantize(colors=num_colors, method=2, dither=1)
|
|
120
|
+
optimized.append(np.array(quantized.convert("RGB")))
|
|
121
|
+
|
|
122
|
+
return optimized
|
|
123
|
+
|
|
124
|
+
def deduplicate_frames(self, threshold: float = 0.9995) -> int:
|
|
125
|
+
"""
|
|
126
|
+
Remove duplicate or near-duplicate consecutive frames.
|
|
127
|
+
|
|
128
|
+
Args:
|
|
129
|
+
threshold: Similarity threshold (0.0-1.0). Higher = more strict (0.9995 = nearly identical).
|
|
130
|
+
Use 0.9995+ to preserve subtle animations, 0.98 for aggressive removal.
|
|
131
|
+
|
|
132
|
+
Returns:
|
|
133
|
+
Number of frames removed
|
|
134
|
+
"""
|
|
135
|
+
if len(self.frames) < 2:
|
|
136
|
+
return 0
|
|
137
|
+
|
|
138
|
+
deduplicated = [self.frames[0]]
|
|
139
|
+
removed_count = 0
|
|
140
|
+
|
|
141
|
+
for i in range(1, len(self.frames)):
|
|
142
|
+
# Compare with previous frame
|
|
143
|
+
prev_frame = np.array(deduplicated[-1], dtype=np.float32)
|
|
144
|
+
curr_frame = np.array(self.frames[i], dtype=np.float32)
|
|
145
|
+
|
|
146
|
+
# Calculate similarity (normalized)
|
|
147
|
+
diff = np.abs(prev_frame - curr_frame)
|
|
148
|
+
similarity = 1.0 - (np.mean(diff) / 255.0)
|
|
149
|
+
|
|
150
|
+
# Keep frame if sufficiently different
|
|
151
|
+
# High threshold (0.9995+) means only remove nearly identical frames
|
|
152
|
+
if similarity < threshold:
|
|
153
|
+
deduplicated.append(self.frames[i])
|
|
154
|
+
else:
|
|
155
|
+
removed_count += 1
|
|
156
|
+
|
|
157
|
+
self.frames = deduplicated
|
|
158
|
+
return removed_count
|
|
159
|
+
|
|
160
|
+
def save(
|
|
161
|
+
self,
|
|
162
|
+
output_path: str | Path,
|
|
163
|
+
num_colors: int = 128,
|
|
164
|
+
optimize_for_emoji: bool = False,
|
|
165
|
+
remove_duplicates: bool = False,
|
|
166
|
+
) -> dict:
|
|
167
|
+
"""
|
|
168
|
+
Save frames as optimized GIF for Slack.
|
|
169
|
+
|
|
170
|
+
Args:
|
|
171
|
+
output_path: Where to save the GIF
|
|
172
|
+
num_colors: Number of colors to use (fewer = smaller file)
|
|
173
|
+
optimize_for_emoji: If True, optimize for emoji size (128x128, fewer colors)
|
|
174
|
+
remove_duplicates: If True, remove duplicate consecutive frames (opt-in)
|
|
175
|
+
|
|
176
|
+
Returns:
|
|
177
|
+
Dictionary with file info (path, size, dimensions, frame_count)
|
|
178
|
+
"""
|
|
179
|
+
if not self.frames:
|
|
180
|
+
raise ValueError("No frames to save. Add frames with add_frame() first.")
|
|
181
|
+
|
|
182
|
+
output_path = Path(output_path)
|
|
183
|
+
|
|
184
|
+
# Remove duplicate frames to reduce file size
|
|
185
|
+
if remove_duplicates:
|
|
186
|
+
removed = self.deduplicate_frames(threshold=0.9995)
|
|
187
|
+
if removed > 0:
|
|
188
|
+
print(
|
|
189
|
+
f" Removed {removed} nearly identical frames (preserved subtle animations)"
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
# Optimize for emoji if requested
|
|
193
|
+
if optimize_for_emoji:
|
|
194
|
+
if self.width > 128 or self.height > 128:
|
|
195
|
+
print(
|
|
196
|
+
f" Resizing from {self.width}x{self.height} to 128x128 for emoji"
|
|
197
|
+
)
|
|
198
|
+
self.width = 128
|
|
199
|
+
self.height = 128
|
|
200
|
+
# Resize all frames
|
|
201
|
+
resized_frames = []
|
|
202
|
+
for frame in self.frames:
|
|
203
|
+
pil_frame = Image.fromarray(frame)
|
|
204
|
+
pil_frame = pil_frame.resize((128, 128), Image.Resampling.LANCZOS)
|
|
205
|
+
resized_frames.append(np.array(pil_frame))
|
|
206
|
+
self.frames = resized_frames
|
|
207
|
+
num_colors = min(num_colors, 48) # More aggressive color limit for emoji
|
|
208
|
+
|
|
209
|
+
# More aggressive FPS reduction for emoji
|
|
210
|
+
if len(self.frames) > 12:
|
|
211
|
+
print(
|
|
212
|
+
f" Reducing frames from {len(self.frames)} to ~12 for emoji size"
|
|
213
|
+
)
|
|
214
|
+
# Keep every nth frame to get close to 12 frames
|
|
215
|
+
keep_every = max(1, len(self.frames) // 12)
|
|
216
|
+
self.frames = [
|
|
217
|
+
self.frames[i] for i in range(0, len(self.frames), keep_every)
|
|
218
|
+
]
|
|
219
|
+
|
|
220
|
+
# Optimize colors with global palette
|
|
221
|
+
optimized_frames = self.optimize_colors(num_colors, use_global_palette=True)
|
|
222
|
+
|
|
223
|
+
# Calculate frame duration in milliseconds
|
|
224
|
+
frame_duration = 1000 / self.fps
|
|
225
|
+
|
|
226
|
+
# Save GIF
|
|
227
|
+
imageio.imwrite(
|
|
228
|
+
output_path,
|
|
229
|
+
optimized_frames,
|
|
230
|
+
duration=frame_duration,
|
|
231
|
+
loop=0, # Infinite loop
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
# Get file info
|
|
235
|
+
file_size_kb = output_path.stat().st_size / 1024
|
|
236
|
+
file_size_mb = file_size_kb / 1024
|
|
237
|
+
|
|
238
|
+
info = {
|
|
239
|
+
"path": str(output_path),
|
|
240
|
+
"size_kb": file_size_kb,
|
|
241
|
+
"size_mb": file_size_mb,
|
|
242
|
+
"dimensions": f"{self.width}x{self.height}",
|
|
243
|
+
"frame_count": len(optimized_frames),
|
|
244
|
+
"fps": self.fps,
|
|
245
|
+
"duration_seconds": len(optimized_frames) / self.fps,
|
|
246
|
+
"colors": num_colors,
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
# Print info
|
|
250
|
+
print(f"\n✓ GIF created successfully!")
|
|
251
|
+
print(f" Path: {output_path}")
|
|
252
|
+
print(f" Size: {file_size_kb:.1f} KB ({file_size_mb:.2f} MB)")
|
|
253
|
+
print(f" Dimensions: {self.width}x{self.height}")
|
|
254
|
+
print(f" Frames: {len(optimized_frames)} @ {self.fps} fps")
|
|
255
|
+
print(f" Duration: {info['duration_seconds']:.1f}s")
|
|
256
|
+
print(f" Colors: {num_colors}")
|
|
257
|
+
|
|
258
|
+
# Size info
|
|
259
|
+
if optimize_for_emoji:
|
|
260
|
+
print(f" Optimized for emoji (128x128, reduced colors)")
|
|
261
|
+
if file_size_mb > 1.0:
|
|
262
|
+
print(f"\n Note: Large file size ({file_size_kb:.1f} KB)")
|
|
263
|
+
print(" Consider: fewer frames, smaller dimensions, or fewer colors")
|
|
264
|
+
|
|
265
|
+
return info
|
|
266
|
+
|
|
267
|
+
def clear(self):
|
|
268
|
+
"""Clear all frames (useful for creating multiple GIFs)."""
|
|
269
|
+
self.frames = []
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Validators - Check if GIFs meet Slack's requirements.
|
|
4
|
+
|
|
5
|
+
These validators help ensure your GIFs meet Slack's size and dimension constraints.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def validate_gif(
|
|
12
|
+
gif_path: str | Path, is_emoji: bool = True, verbose: bool = True
|
|
13
|
+
) -> tuple[bool, dict]:
|
|
14
|
+
"""
|
|
15
|
+
Validate GIF for Slack (dimensions, size, frame count).
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
gif_path: Path to GIF file
|
|
19
|
+
is_emoji: True for emoji (128x128 recommended), False for message GIF
|
|
20
|
+
verbose: Print validation details
|
|
21
|
+
|
|
22
|
+
Returns:
|
|
23
|
+
Tuple of (passes: bool, results: dict with all details)
|
|
24
|
+
"""
|
|
25
|
+
from PIL import Image
|
|
26
|
+
|
|
27
|
+
gif_path = Path(gif_path)
|
|
28
|
+
|
|
29
|
+
if not gif_path.exists():
|
|
30
|
+
return False, {"error": f"File not found: {gif_path}"}
|
|
31
|
+
|
|
32
|
+
# Get file size
|
|
33
|
+
size_bytes = gif_path.stat().st_size
|
|
34
|
+
size_kb = size_bytes / 1024
|
|
35
|
+
size_mb = size_kb / 1024
|
|
36
|
+
|
|
37
|
+
# Get dimensions and frame info
|
|
38
|
+
try:
|
|
39
|
+
with Image.open(gif_path) as img:
|
|
40
|
+
width, height = img.size
|
|
41
|
+
|
|
42
|
+
# Count frames
|
|
43
|
+
frame_count = 0
|
|
44
|
+
try:
|
|
45
|
+
while True:
|
|
46
|
+
img.seek(frame_count)
|
|
47
|
+
frame_count += 1
|
|
48
|
+
except EOFError:
|
|
49
|
+
pass
|
|
50
|
+
|
|
51
|
+
# Get duration
|
|
52
|
+
try:
|
|
53
|
+
duration_ms = img.info.get("duration", 100)
|
|
54
|
+
total_duration = (duration_ms * frame_count) / 1000
|
|
55
|
+
fps = frame_count / total_duration if total_duration > 0 else 0
|
|
56
|
+
except:
|
|
57
|
+
total_duration = None
|
|
58
|
+
fps = None
|
|
59
|
+
|
|
60
|
+
except Exception as e:
|
|
61
|
+
return False, {"error": f"Failed to read GIF: {e}"}
|
|
62
|
+
|
|
63
|
+
# Validate dimensions
|
|
64
|
+
if is_emoji:
|
|
65
|
+
optimal = width == height == 128
|
|
66
|
+
acceptable = width == height and 64 <= width <= 128
|
|
67
|
+
dim_pass = acceptable
|
|
68
|
+
else:
|
|
69
|
+
aspect_ratio = (
|
|
70
|
+
max(width, height) / min(width, height)
|
|
71
|
+
if min(width, height) > 0
|
|
72
|
+
else float("inf")
|
|
73
|
+
)
|
|
74
|
+
dim_pass = aspect_ratio <= 2.0 and 320 <= min(width, height) <= 640
|
|
75
|
+
|
|
76
|
+
results = {
|
|
77
|
+
"file": str(gif_path),
|
|
78
|
+
"passes": dim_pass,
|
|
79
|
+
"width": width,
|
|
80
|
+
"height": height,
|
|
81
|
+
"size_kb": size_kb,
|
|
82
|
+
"size_mb": size_mb,
|
|
83
|
+
"frame_count": frame_count,
|
|
84
|
+
"duration_seconds": total_duration,
|
|
85
|
+
"fps": fps,
|
|
86
|
+
"is_emoji": is_emoji,
|
|
87
|
+
"optimal": optimal if is_emoji else None,
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
# Print if verbose
|
|
91
|
+
if verbose:
|
|
92
|
+
print(f"\nValidating {gif_path.name}:")
|
|
93
|
+
print(
|
|
94
|
+
f" Dimensions: {width}x{height}"
|
|
95
|
+
+ (
|
|
96
|
+
f" ({'optimal' if optimal else 'acceptable'})"
|
|
97
|
+
if is_emoji and acceptable
|
|
98
|
+
else ""
|
|
99
|
+
)
|
|
100
|
+
)
|
|
101
|
+
print(
|
|
102
|
+
f" Size: {size_kb:.1f} KB"
|
|
103
|
+
+ (f" ({size_mb:.2f} MB)" if size_mb >= 1.0 else "")
|
|
104
|
+
)
|
|
105
|
+
print(
|
|
106
|
+
f" Frames: {frame_count}"
|
|
107
|
+
+ (f" @ {fps:.1f} fps ({total_duration:.1f}s)" if fps else "")
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
if not dim_pass:
|
|
111
|
+
print(
|
|
112
|
+
f" Note: {'Emoji should be 128x128' if is_emoji else 'Unusual dimensions for Slack'}"
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
if size_mb > 5.0:
|
|
116
|
+
print(f" Note: Large file size - consider fewer frames/colors")
|
|
117
|
+
|
|
118
|
+
return dim_pass, results
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def is_slack_ready(
|
|
122
|
+
gif_path: str | Path, is_emoji: bool = True, verbose: bool = True
|
|
123
|
+
) -> bool:
|
|
124
|
+
"""
|
|
125
|
+
Quick check if GIF is ready for Slack.
|
|
126
|
+
|
|
127
|
+
Args:
|
|
128
|
+
gif_path: Path to GIF file
|
|
129
|
+
is_emoji: True for emoji GIF, False for message GIF
|
|
130
|
+
verbose: Print feedback
|
|
131
|
+
|
|
132
|
+
Returns:
|
|
133
|
+
True if dimensions are acceptable
|
|
134
|
+
"""
|
|
135
|
+
passes, _ = validate_gif(gif_path, is_emoji, verbose)
|
|
136
|
+
return passes
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: standard-reference
|
|
3
|
+
description: 工程监测规范条文速查技能包。当需要引用规范条文、核查技术指标或进行合规审查时加载此技能,获取规范查询方法和常用条文速查表。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## 适用场景
|
|
7
|
+
|
|
8
|
+
- 审查技术方案时查找规范依据
|
|
9
|
+
- 核实报警值、监测频率等技术指标的规范要求
|
|
10
|
+
- 编制报告时准确引用规范条文
|
|
11
|
+
- 回答客户关于规范要求的咨询
|
|
12
|
+
|
|
13
|
+
## 规范查询方法
|
|
14
|
+
|
|
15
|
+
### 工具调用(优先)
|
|
16
|
+
|
|
17
|
+
使用 `query_standard` 工具进行精确查询,该工具内置了四部核心规范的条文库:
|
|
18
|
+
|
|
19
|
+
1. **按关键词查询**:`keywords: ["报警值", "基坑"]`
|
|
20
|
+
2. **按规范编号过滤**:`standardCode: "GB 50497"`
|
|
21
|
+
3. **只查强制性条文**:`mandatoryOnly: true`
|
|
22
|
+
4. **按条文编号精确定位**:`keywords: ["5.0.1"]`
|
|
23
|
+
|
|
24
|
+
### 使用 `list_standards` 工具查看规范库覆盖范围
|
|
25
|
+
|
|
26
|
+
## 四部核心规范速查
|
|
27
|
+
|
|
28
|
+
### GB 50911 城市轨道交通工程监测技术规范
|
|
29
|
+
|
|
30
|
+
| 常用条文 | 核心内容 |
|
|
31
|
+
|---------|---------|
|
|
32
|
+
| 3.0.1 | 设计、施工、运营各阶段均应监测 |
|
|
33
|
+
| 4.2.1 | 基准点≥3个,间距≤500m |
|
|
34
|
+
| 5.1.2 | 保护区监测必测项:结构沉降、水平位移、隧道收敛、地表沉降 |
|
|
35
|
+
| 5.4.1 | 施工关键阶段频率≥1次/天 |
|
|
36
|
+
| 5.5.1 | 报警值依据设计文件和规范综合确定 |
|
|
37
|
+
| 7.2.1 | 竖向位移精度≥二等水准,中误差≤±0.5mm |
|
|
38
|
+
| 7.3.1 | 水平位移:全站仪测角≤1″,测距≤1mm+1ppm |
|
|
39
|
+
|
|
40
|
+
### GB 50497 建筑基坑工程监测技术标准
|
|
41
|
+
|
|
42
|
+
| 常用条文 | 核心内容 |
|
|
43
|
+
|---------|---------|
|
|
44
|
+
| 3.0.1 | 开挖深度≥5m 或环境复杂时须监测 |
|
|
45
|
+
| 3.0.2 | 必测项:围护墙顶水平位移、地表沉降、围护墙顶竖向位移 |
|
|
46
|
+
| 5.0.1 | 一级基坑围护墙顶位移报警值≤30mm,日变化≤3mm/d |
|
|
47
|
+
| 5.0.3 | 地表沉降报警值≤0.15%L,管线(刚性)≤10mm |
|
|
48
|
+
| 6.2.1 | 开挖期间≥1次/天,异常时加密 |
|
|
49
|
+
| 7.1.1 | 围护墙监测点间距≤20m |
|
|
50
|
+
|
|
51
|
+
### JGJ 8 建筑变形测量规范
|
|
52
|
+
|
|
53
|
+
| 常用条文 | 核心内容 |
|
|
54
|
+
|---------|---------|
|
|
55
|
+
| 3.0.2 | 变形测量分四个等级 |
|
|
56
|
+
| 4.1.3 | 水准基点≥3个,组成闭合环路 |
|
|
57
|
+
| 4.3.1 | 二等水准:视线≤50m,前后视距差≤1m |
|
|
58
|
+
| 5.1.1 | 沉降稳定标准:100天内速率<0.01~0.04mm/d |
|
|
59
|
+
| 5.5.1 | 倾斜报警值 H/500,极限 H/250 |
|
|
60
|
+
|
|
61
|
+
### GB 50026 工程测量标准
|
|
62
|
+
|
|
63
|
+
| 常用条文 | 核心内容 |
|
|
64
|
+
|---------|---------|
|
|
65
|
+
| 4.2.1 | 控制网等级:一等至四等 + 一级至三级 |
|
|
66
|
+
| 4.3.1 | 水准闭合差限差:一等±4√L,二等±6√L,三等±12√L,四等±20√L |
|
|
67
|
+
| 5.1.1 | 导线角度闭合差:DJ1±5″√n,DJ2±10″√n,DJ6±20″√n |
|
|
68
|
+
| 6.2.1 | 地形测量高程注记取位至0.01m |
|
|
69
|
+
|
|
70
|
+
## 规范引用格式规范
|
|
71
|
+
|
|
72
|
+
### 首次引用(全称)
|
|
73
|
+
> 根据《城市轨道交通工程监测技术规范》(GB 50911-2013)第5.4.1条,施工关键阶段监测频率不应低于1次/天。
|
|
74
|
+
|
|
75
|
+
### 后续引用(简称)
|
|
76
|
+
> 根据GB 50911第7.2.1条,竖向位移监测精度不应低于二等水准。
|
|
77
|
+
|
|
78
|
+
### 多规范对比引用
|
|
79
|
+
> 结合GB 50911第5.5.1条和GB 50497第5.0.1条的要求,报警值应综合考虑设计文件和规范限值。
|
|
80
|
+
|
|
81
|
+
## 审查时的规范核查清单
|
|
82
|
+
|
|
83
|
+
1. 报警值/控制值是否满足规范最低要求
|
|
84
|
+
2. 监测频率是否满足施工阶段的最低要求
|
|
85
|
+
3. 基准点数量和分布是否满足要求
|
|
86
|
+
4. 仪器精度等级是否满足监测等级要求
|
|
87
|
+
5. 必测项目是否完整(无遗漏)
|
|
88
|
+
6. 引用的规范版本是否为现行有效版本
|
|
89
|
+
7. 强制性条文是否严格执行(无折扣)
|