@agenthippo-ai/agenthippo 0.1.0
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/LICENSE +21 -0
- package/bin/agenthippo.js +2 -0
- package/out/agentpack/github.js +547 -0
- package/out/agentpack/index.js +66 -0
- package/out/agentpack/install.js +297 -0
- package/out/agentpack/manager.js +441 -0
- package/out/agentpack/manifest.js +135 -0
- package/out/agentpack/paths.js +475 -0
- package/out/agentpack/publish.js +248 -0
- package/out/agentpack/stores.js +554 -0
- package/out/agentpack/types.js +5 -0
- package/out/analytics/dashboard/artifactManager.js +439 -0
- package/out/analytics/dashboard/fleetDisplayUtils.js +159 -0
- package/out/analytics/dashboard/fleetOrchestrator.js +142 -0
- package/out/analytics/dashboard/fleetRegistry.js +79 -0
- package/out/analytics/dashboard/fleetRowDefaults.js +87 -0
- package/out/analytics/dashboard/fleetScriptAdapter.js +146 -0
- package/out/analytics/dashboard/fleetStatusUtils.js +30 -0
- package/out/analytics/dashboard/fleetTitleUtils.js +68 -0
- package/out/analytics/dashboard/fleetTypes.js +29 -0
- package/out/analytics/dashboard/index.js +17 -0
- package/out/analytics/dashboard/indexingService.js +422 -0
- package/out/analytics/dashboard/localFleetAdapter.js +222 -0
- package/out/analytics/dashboard/performanceMonitor.js +76 -0
- package/out/analytics/dashboard/processManager.js +209 -0
- package/out/analytics/dashboard/provider.js +3885 -0
- package/out/analytics/dashboard/queryRunner.js +994 -0
- package/out/analytics/dashboard/refreshPolicy.js +16 -0
- package/out/analytics/dashboard/scheduledFleetFingerprint.js +22 -0
- package/out/analytics/dashboard/scheduledFleetStorage.js +241 -0
- package/out/analytics/dashboard/scheduledFleetUtils.js +22 -0
- package/out/analytics/dashboard/sessionEventFleetStats.js +118 -0
- package/out/analytics/dashboard/sessionJsonlFleet.js +204 -0
- package/out/analytics/dashboard/teamViewDiscovery.js +106 -0
- package/out/analytics/dashboard/viewsConfigMerge.js +221 -0
- package/out/analytics/dashboard/webview/analytics-panel.html +155 -0
- package/out/analytics/dashboard/webview/codicon.ttf +0 -0
- package/out/analytics/dashboard/webview/index.html +78 -0
- package/out/analytics/dashboard/webview/panel.js +2295 -0
- package/out/analytics/dashboard/webview/runtime-bridge.js +82 -0
- package/out/analytics/dashboard/webview/styles.css +1009 -0
- package/out/analytics/lifecycle.js +43 -0
- package/out/analytics/service.js +1279 -0
- package/out/analytics/sessionEvents.js +231 -0
- package/out/auth/bootstrapApply.js +72 -0
- package/out/auth/brokerClient.js +126 -0
- package/out/auth/callbackUri.js +59 -0
- package/out/auth/callbackUriParse.js +59 -0
- package/out/auth/githubStoreGate.js +70 -0
- package/out/auth/loopbackAuthServer.js +165 -0
- package/out/auth/pkce.js +9 -0
- package/out/auth/provider.js +239 -0
- package/out/auth/sessionStore.js +193 -0
- package/out/auth/signInFlow.js +182 -0
- package/out/auth/types.js +12 -0
- package/out/auth-broker/config.js +62 -0
- package/out/auth-broker/jwt.js +105 -0
- package/out/auth-broker/pkce.js +57 -0
- package/out/auth-broker/server.js +539 -0
- package/out/auth-broker/store.js +273 -0
- package/out/base-prompts/gateway/openclaw-starter.json5 +144 -0
- package/out/base-prompts/gateway/slack-socket-mode-minimal.manifest.json +44 -0
- package/out/base-prompts/mcp-servers/.mcp.json +13 -0
- package/out/base-prompts/mcp-servers/langfuse-analytics/README.md +142 -0
- package/out/base-prompts/mcp-servers/langfuse-analytics/mcp.json +13 -0
- package/out/base-prompts/mcp-servers/langfuse-analytics/package-lock.json +1192 -0
- package/out/base-prompts/mcp-servers/langfuse-analytics/package.json +23 -0
- package/out/base-prompts/mcp-servers/langfuse-analytics/scripts/run-with-env.sh +12 -0
- package/out/base-prompts/mcp-servers/langfuse-analytics/scripts/sdk-test.js +102 -0
- package/out/base-prompts/mcp-servers/langfuse-analytics/scripts/simple-test.js +137 -0
- package/out/base-prompts/mcp-servers/langfuse-analytics/scripts/test-client.js +118 -0
- package/out/base-prompts/mcp-servers/langfuse-analytics/scripts/test-server.js +209 -0
- package/out/base-prompts/mcp-servers/langfuse-analytics/src/client.ts +431 -0
- package/out/base-prompts/mcp-servers/langfuse-analytics/src/index.ts +270 -0
- package/out/base-prompts/mcp-servers/langfuse-analytics/tsconfig.json +18 -0
- package/out/base-prompts/rules/AGENTS.md +204 -0
- package/out/base-prompts/skills/agent-browser/SKILL.md +102 -0
- package/out/base-prompts/skills/agent-builder/SKILL.md +73 -0
- package/out/base-prompts/skills/agent-builder/references/agent-pack.md +63 -0
- package/out/base-prompts/skills/agent-builder/references/crewai.md +66 -0
- package/out/base-prompts/skills/agent-builder/references/langchain.md +60 -0
- package/out/base-prompts/skills/agent-builder/references/raw-sdk.md +73 -0
- package/out/base-prompts/skills/agent-engine-creator/SKILL.md +586 -0
- package/out/base-prompts/skills/agent-engine-installer/SKILL.md +106 -0
- package/out/base-prompts/skills/agent-engine-installer/scripts/install-engine.mjs +259 -0
- package/out/base-prompts/skills/agent-engine-installer/scripts/install-engine.ps1 +189 -0
- package/out/base-prompts/skills/agenthippo-cli/SKILL.md +69 -0
- package/out/base-prompts/skills/agenthippo-cli/scripts/install.sh +63 -0
- package/out/base-prompts/skills/agentpack-creator/SKILL.md +375 -0
- package/out/base-prompts/skills/agentpack-creator/references/agent-templates.md +261 -0
- package/out/base-prompts/skills/agentpack-creator/references/agents-md-guide.md +195 -0
- package/out/base-prompts/skills/agentpack-creator/scripts/init_pack.py +391 -0
- package/out/base-prompts/skills/agentpack-creator/scripts/init_pack_test.py +294 -0
- package/out/base-prompts/skills/agentpack-testbench/SKILL.md +135 -0
- package/out/base-prompts/skills/algorithmic-art/LICENSE.txt +202 -0
- package/out/base-prompts/skills/algorithmic-art/SKILL.md +405 -0
- package/out/base-prompts/skills/algorithmic-art/templates/generator_template.js +223 -0
- package/out/base-prompts/skills/algorithmic-art/templates/viewer.html +599 -0
- package/out/base-prompts/skills/debug-agent/SKILL.md +83 -0
- package/out/base-prompts/skills/desktop-automation/SKILL.md +166 -0
- package/out/base-prompts/skills/desktop-automation/references/agenthippo-ui-recipes.md +441 -0
- package/out/base-prompts/skills/desktop-automation/scripts/windows-desktop-uia.psm1 +280 -0
- package/out/base-prompts/skills/docx/LICENSE.txt +30 -0
- package/out/base-prompts/skills/docx/SKILL.md +197 -0
- package/out/base-prompts/skills/docx/docx-js.md +350 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/mce/mc.xsd +75 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/out/base-prompts/skills/docx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/out/base-prompts/skills/docx/ooxml/scripts/pack.py +159 -0
- package/out/base-prompts/skills/docx/ooxml/scripts/unpack.py +29 -0
- package/out/base-prompts/skills/docx/ooxml/scripts/validate.py +69 -0
- package/out/base-prompts/skills/docx/ooxml/scripts/validation/__init__.py +15 -0
- package/out/base-prompts/skills/docx/ooxml/scripts/validation/base.py +951 -0
- package/out/base-prompts/skills/docx/ooxml/scripts/validation/docx.py +274 -0
- package/out/base-prompts/skills/docx/ooxml/scripts/validation/pptx.py +315 -0
- package/out/base-prompts/skills/docx/ooxml/scripts/validation/redlining.py +279 -0
- package/out/base-prompts/skills/docx/ooxml.md +610 -0
- package/out/base-prompts/skills/docx/scripts/__init__.py +1 -0
- package/out/base-prompts/skills/docx/scripts/document.py +1276 -0
- package/out/base-prompts/skills/docx/scripts/templates/comments.xml +3 -0
- package/out/base-prompts/skills/docx/scripts/templates/commentsExtended.xml +3 -0
- package/out/base-prompts/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/out/base-prompts/skills/docx/scripts/templates/commentsIds.xml +3 -0
- package/out/base-prompts/skills/docx/scripts/templates/people.xml +3 -0
- package/out/base-prompts/skills/docx/scripts/utilities.py +374 -0
- package/out/base-prompts/skills/gateway-outbound/SKILL.md +136 -0
- package/out/base-prompts/skills/mcp-builder/LICENSE.txt +202 -0
- package/out/base-prompts/skills/mcp-builder/SKILL.md +328 -0
- package/out/base-prompts/skills/mcp-builder/reference/evaluation.md +602 -0
- package/out/base-prompts/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/out/base-prompts/skills/mcp-builder/reference/node_mcp_server.md +970 -0
- package/out/base-prompts/skills/mcp-builder/reference/python_mcp_server.md +719 -0
- package/out/base-prompts/skills/mcp-builder/scripts/connections.py +151 -0
- package/out/base-prompts/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/out/base-prompts/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/out/base-prompts/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/out/base-prompts/skills/openclaw/SKILL.md +406 -0
- package/out/base-prompts/skills/openclaw/scripts/run-smoke.sh +61 -0
- package/out/base-prompts/skills/pdf/LICENSE.txt +30 -0
- package/out/base-prompts/skills/pdf/SKILL.md +294 -0
- package/out/base-prompts/skills/pdf/forms.md +205 -0
- package/out/base-prompts/skills/pdf/reference.md +612 -0
- package/out/base-prompts/skills/pdf/scripts/check_bounding_boxes.py +70 -0
- package/out/base-prompts/skills/pdf/scripts/check_bounding_boxes_test.py +226 -0
- package/out/base-prompts/skills/pdf/scripts/check_fillable_fields.py +12 -0
- package/out/base-prompts/skills/pdf/scripts/convert_pdf_to_images.py +35 -0
- package/out/base-prompts/skills/pdf/scripts/create_validation_image.py +41 -0
- package/out/base-prompts/skills/pdf/scripts/extract_form_field_info.py +152 -0
- package/out/base-prompts/skills/pdf/scripts/fill_fillable_fields.py +114 -0
- package/out/base-prompts/skills/pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
- package/out/base-prompts/skills/pptx/LICENSE.txt +30 -0
- package/out/base-prompts/skills/pptx/SKILL.md +484 -0
- package/out/base-prompts/skills/pptx/html2pptx.md +625 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/mce/mc.xsd +75 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/out/base-prompts/skills/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/out/base-prompts/skills/pptx/ooxml/scripts/pack.py +159 -0
- package/out/base-prompts/skills/pptx/ooxml/scripts/unpack.py +29 -0
- package/out/base-prompts/skills/pptx/ooxml/scripts/validate.py +69 -0
- package/out/base-prompts/skills/pptx/ooxml/scripts/validation/__init__.py +15 -0
- package/out/base-prompts/skills/pptx/ooxml/scripts/validation/base.py +951 -0
- package/out/base-prompts/skills/pptx/ooxml/scripts/validation/docx.py +274 -0
- package/out/base-prompts/skills/pptx/ooxml/scripts/validation/pptx.py +315 -0
- package/out/base-prompts/skills/pptx/ooxml/scripts/validation/redlining.py +279 -0
- package/out/base-prompts/skills/pptx/ooxml.md +427 -0
- package/out/base-prompts/skills/pptx/scripts/html2pptx.js +984 -0
- package/out/base-prompts/skills/pptx/scripts/inventory.py +1020 -0
- package/out/base-prompts/skills/pptx/scripts/rearrange.py +231 -0
- package/out/base-prompts/skills/pptx/scripts/replace.py +385 -0
- package/out/base-prompts/skills/pptx/scripts/thumbnail.py +450 -0
- package/out/base-prompts/skills/prompt-lab/SKILL.md +149 -0
- package/out/base-prompts/skills/prompt-lab/scripts/query-analytics.sh +2551 -0
- package/out/base-prompts/skills/skill-creator/LICENSE.txt +202 -0
- package/out/base-prompts/skills/skill-creator/SKILL.md +371 -0
- package/out/base-prompts/skills/skill-creator/references/output-patterns.md +82 -0
- package/out/base-prompts/skills/skill-creator/references/workflows.md +28 -0
- package/out/base-prompts/skills/skill-creator/scripts/init_skill.py +303 -0
- package/out/base-prompts/skills/skill-creator/scripts/package_skill.py +110 -0
- package/out/base-prompts/skills/skill-creator/scripts/quick_validate.py +95 -0
- package/out/base-prompts/skills/skill-installer/SKILL.md +251 -0
- package/out/base-prompts/skills/skill-installer/references/store-api.md +219 -0
- package/out/base-prompts/skills/spotlight-dashboard/SKILL.md +83 -0
- package/out/base-prompts/skills/spotlight-insights/SKILL.md +101 -0
- package/out/base-prompts/skills/spotlight-optimize/SKILL.md +93 -0
- package/out/base-prompts/skills/spotlight-optimize/scripts/query-analytics.sh +2551 -0
- package/out/base-prompts/skills/spotlight-query/SKILL.md +314 -0
- package/out/base-prompts/skills/spotlight-query/references/otel-schema.md +163 -0
- package/out/base-prompts/skills/spotlight-query/scripts/query-analytics.sh +2551 -0
- package/out/base-prompts/skills/spotlight-query/scripts/query-analytics.test.sh +744 -0
- package/out/base-prompts/skills/spotlight-query/scripts/test-fixtures/analytics/sessions/sess-test-1.jsonl +14 -0
- package/out/base-prompts/skills/spotlight-query/scripts/test-fixtures/analytics/traces/.duckdb-index.json +7 -0
- package/out/base-prompts/skills/spotlight-query/scripts/test-fixtures/analytics/traces/sample.jsonl +5 -0
- package/out/base-prompts/skills/spotlight-report/SKILL.md +86 -0
- package/out/base-prompts/skills/spotlight-visualize/SKILL.md +92 -0
- package/out/base-prompts/skills/spotlight-visualize/scripts/query-analytics.sh +2551 -0
- package/out/base-prompts/skills/xlsx/LICENSE.txt +30 -0
- package/out/base-prompts/skills/xlsx/SKILL.md +289 -0
- package/out/base-prompts/skills/xlsx/recalc.py +178 -0
- package/out/branding.js +23 -0
- package/out/cli/commands/anywhere.js +66 -0
- package/out/cli/commands/ask.js +243 -0
- package/out/cli/commands/auth-broker.js +24 -0
- package/out/cli/commands/auth.js +219 -0
- package/out/cli/commands/chat.js +354 -0
- package/out/cli/commands/deploy.js +223 -0
- package/out/cli/commands/gateway.js +160 -0
- package/out/cli/commands/pack.js +220 -0
- package/out/cli/commands/probe-custom-engine.js +82 -0
- package/out/cli/commands/serve.js +583 -0
- package/out/cli/commands/store.js +919 -0
- package/out/cli/credential-context.js +113 -0
- package/out/cli/deploy-init.js +2087 -0
- package/out/cli/deps.js +238 -0
- package/out/cli/index.js +390 -0
- package/out/cli/pack-loader.js +376 -0
- package/out/cli/run-custom-engine-runner.js +318 -0
- package/out/cli/runtime.js +409 -0
- package/out/cli/serve-hardening.js +325 -0
- package/out/cli/state-sync.js +135 -0
- package/out/cli/utils.js +220 -0
- package/out/cli/vscode-shim.js +86 -0
- package/out/engines/base.js +159 -0
- package/out/engines/claude.js +1215 -0
- package/out/engines/codex.js +759 -0
- package/out/engines/custom.js +632 -0
- package/out/engines/customEngineIpc.js +95 -0
- package/out/engines/customEngineRunnerEmbed.js +107 -0
- package/out/engines/customRegistry.js +274 -0
- package/out/engines/embeddedCustomEngineRunner.generated.js +9 -0
- package/out/engines/engineApiKey.js +138 -0
- package/out/engines/factory.js +45 -0
- package/out/engines/install.js +372 -0
- package/out/engines/persistentEngineWorker.js +320 -0
- package/out/engines/publish.js +341 -0
- package/out/engines/types.js +17 -0
- package/out/examples/run-headless-repl.js +291 -0
- package/out/examples/run-headless.js +187 -0
- package/out/extension.js +4472 -0
- package/out/gateway/bridge.js +805 -0
- package/out/gateway/cli-agent-id.js +36 -0
- package/out/gateway/client.js +303 -0
- package/out/gateway/client.test.js +395 -0
- package/out/gateway/gateway-scope-errors.js +14 -0
- package/out/gateway/gatewayBackup.js +76 -0
- package/out/gateway/gatewayRouteIndex.js +371 -0
- package/out/gateway/gatewaySessionStore.js +243 -0
- package/out/gateway/index.js +31 -0
- package/out/gateway/lifecycle.js +3056 -0
- package/out/gateway/openclaw-channel-routing.js +317 -0
- package/out/gateway/outboundHandles.js +373 -0
- package/out/gateway/outboundPaths.js +72 -0
- package/out/gateway/outboundSend.js +254 -0
- package/out/gateway/protocol.js +48 -0
- package/out/gateway/resetMappings.js +52 -0
- package/out/gateway/service.js +1244 -0
- package/out/gateway/sessionRouting.js +77 -0
- package/out/headless/index.js +505 -0
- package/out/headless/sync.js +473 -0
- package/out/mcp/publish.js +143 -0
- package/out/mcp.js +597 -0
- package/out/permissions.js +108 -0
- package/out/permissions.mapping.yaml +68 -0
- package/out/registry/index.js +332 -0
- package/out/remote/handleRemoteChat.js +122 -0
- package/out/remote/remotePackStatusBar.js +103 -0
- package/out/remote/serveClient.js +216 -0
- package/out/remoteSkills.js +191 -0
- package/out/runtime/index.js +32 -0
- package/out/runtime/interfaces/config-provider.js +32 -0
- package/out/runtime/interfaces/edit-tracker.js +22 -0
- package/out/runtime/interfaces/index.js +29 -0
- package/out/runtime/interfaces/logger.js +40 -0
- package/out/runtime/interfaces/permission-handler.js +66 -0
- package/out/runtime/interfaces/session-store.js +342 -0
- package/out/runtime/vscode/index.js +20 -0
- package/out/runtime/vscode/vscode-config-provider.js +77 -0
- package/out/runtime/vscode/vscode-edit-tracker.js +120 -0
- package/out/runtime/vscode/vscode-logger.js +30 -0
- package/out/runtime/vscode/vscode-permission-handler.js +72 -0
- package/out/runtime/vscode/vscode-session-store.js +22 -0
- package/out/scripts/agentide-litellm.ps1 +501 -0
- package/out/scripts/agentide-litellm.sh +700 -0
- package/out/scripts/agentide_litellm_hooks_v1.py +604 -0
- package/out/scripts/analytics/agent-fleet-widget.js +954 -0
- package/out/scripts/analytics/agentide-litellm-otel.config.yaml +160 -0
- package/out/scripts/analytics/default-seed-scripts.json +12 -0
- package/out/scripts/analytics/duckdbLocator.js +29 -0
- package/out/scripts/analytics/fleet-local-adapter.js +246 -0
- package/out/scripts/analytics/fleet-workflow.sh +263 -0
- package/out/scripts/analytics/generate-default-charts.py +685 -0
- package/out/scripts/analytics/hotspot-analysis-widget.js +909 -0
- package/out/scripts/analytics/index-traces.py +1394 -0
- package/out/scripts/analytics/install-analytics.sh +286 -0
- package/out/scripts/analytics/live-fleet-4-collector.cjs +315 -0
- package/out/scripts/analytics/live-fleet-4-daemon.mjs +134 -0
- package/out/scripts/analytics/live-fleet-4-widget.cjs +433 -0
- package/out/scripts/analytics/otel-collector.yaml +55 -0
- package/out/scripts/analytics/query-analytics.ps1 +396 -0
- package/out/scripts/analytics/query-analytics.sh +2551 -0
- package/out/scripts/analytics/session-comparison-widget.js +1468 -0
- package/out/scripts/analytics/session-timeline-widget.js +2137 -0
- package/out/scripts/analytics/setup-analytics.ps1 +432 -0
- package/out/scripts/analytics/setup-analytics.sh +854 -0
- package/out/scripts/analytics/start-analytics.ps1 +169 -0
- package/out/scripts/analytics/start-analytics.sh +323 -0
- package/out/scripts/analytics/token-cost-flamegraph-widget.js +954 -0
- package/out/scripts/analytics/token-cost-trend-widget.js +1062 -0
- package/out/scripts/analytics/workflows-collector.cjs +315 -0
- package/out/scripts/analytics/workflows-daemon.mjs +186 -0
- package/out/scripts/analytics/workflows-widget.cjs +433 -0
- package/out/scripts/analytics/wow-model-widget.js +191 -0
- package/out/scripts/gateway/Dockerfile.serve +45 -0
- package/out/scripts/gateway/docker-serve.sh +248 -0
- package/out/scripts/gateway/setup-gateway-server.ps1 +953 -0
- package/out/scripts/gateway/setup-gateway-server.sh +935 -0
- package/out/scripts/gateway/setup-gateway.ps1 +1813 -0
- package/out/scripts/gateway/setup-gateway.sh +1541 -0
- package/out/scripts/setup-cli.ps1 +86 -0
- package/out/scripts/setup-cli.sh +117 -0
- package/out/scripts/tools-manifest.json +83 -0
- package/out/scripts/vendor-tools.mjs +234 -0
- package/out/session.js +272 -0
- package/out/shared/agentEngines.js +170 -0
- package/out/shared/index.js +109 -0
- package/out/shared/models.js +235 -0
- package/out/shared/providers.js +202 -0
- package/out/skills/publish.js +178 -0
- package/out/spotlight/install.js +339 -0
- package/out/spotlight/publish.js +544 -0
- package/out/spotlight/yaml.js +31 -0
- package/out/store/github/setup.js +235 -0
- package/out/store/github/templates/build-index.ts +339 -0
- package/out/store/github/templates/build-index.yml +97 -0
- package/out/store/github/templates/package.json +11 -0
- package/out/store/index.js +755 -0
- package/out/store/oramaIndex.js +884 -0
- package/out/store/shared.js +241 -0
- package/out/sync.js +1827 -0
- package/out/terminalLogger.js +358 -0
- package/out/test/agentEnvFile.test.js +97 -0
- package/out/test/agentYaml.test.js +373 -0
- package/out/test/agentpack.test.js +639 -0
- package/out/test/analytics-lifecycle.test.js +174 -0
- package/out/test/analytics.test.js +524 -0
- package/out/test/auth-bootstrapApply.test.js +102 -0
- package/out/test/auth-broker.test.js +434 -0
- package/out/test/auth-callback.test.js +62 -0
- package/out/test/branding.test.js +229 -0
- package/out/test/cli-agent-id.test.js +55 -0
- package/out/test/credential-context.test.js +105 -0
- package/out/test/customEngineInstall.test.js +100 -0
- package/out/test/customRegistry.test.js +122 -0
- package/out/test/deploy-init.test.js +532 -0
- package/out/test/deps-auto-install.test.js +81 -0
- package/out/test/engine-integration.test.js +297 -0
- package/out/test/enginePaths.test.js +195 -0
- package/out/test/enginePublish.test.js +82 -0
- package/out/test/fleetDisplayUtils.test.js +96 -0
- package/out/test/gateway-client.test.js +381 -0
- package/out/test/gateway-lifecycle.test.js +608 -0
- package/out/test/gateway-outbound.test.js +531 -0
- package/out/test/gateway-reset-mappings.test.js +221 -0
- package/out/test/gateway-route-index.test.js +235 -0
- package/out/test/gateway-session-routing.test.js +47 -0
- package/out/test/gateway-session-store.test.js +216 -0
- package/out/test/github.test.js +232 -0
- package/out/test/headless-sync.test.js +279 -0
- package/out/test/helpers/manifest-fixtures.js +27 -0
- package/out/test/mcp-obo.test.js +82 -0
- package/out/test/mcp.test.js +307 -0
- package/out/test/openclaw-channel-routing.test.js +191 -0
- package/out/test/pathSafety.test.js +63 -0
- package/out/test/permissions.test.js +175 -0
- package/out/test/persistent-engine-worker.test.js +220 -0
- package/out/test/refreshPolicy.test.js +60 -0
- package/out/test/registry.test.js +351 -0
- package/out/test/runtime.test.js +349 -0
- package/out/test/scheduledFleetStorage.test.js +72 -0
- package/out/test/serve-hardening.test.js +192 -0
- package/out/test/serveClient.test.js +173 -0
- package/out/test/sessionJsonlFleet.test.js +78 -0
- package/out/test/shared.test.js +173 -0
- package/out/test/skills-mcp.test.js +299 -0
- package/out/test/spotlightPublish.test.js +299 -0
- package/out/test/spotlightYaml.test.js +58 -0
- package/out/test/state-sync-peer.test.js +74 -0
- package/out/test/store.test.js +331 -0
- package/out/test/stores.test.js +504 -0
- package/out/test/sync-switch.test.js +251 -0
- package/out/test/teamViewDiscovery.test.js +90 -0
- package/out/test/toolPath.test.js +120 -0
- package/out/test/utils.test.js +308 -0
- package/out/test/viewsConfigMerge.test.js +180 -0
- package/out/test/windows-command-line.test.js +75 -0
- package/out/utils/agentEnvFile.js +131 -0
- package/out/utils/binary.js +175 -0
- package/out/utils/index.js +37 -0
- package/out/utils/network.js +74 -0
- package/out/utils/pathSafety.js +60 -0
- package/out/utils/paths.js +116 -0
- package/out/utils/pid.js +180 -0
- package/out/utils/pythonRunner.js +258 -0
- package/out/utils/resolveNodeBinary.js +168 -0
- package/out/utils/toolPath.js +83 -0
- package/out/utils/windowsCommandLine.js +29 -0
- package/out/utils.js +915 -0
- package/out/workspaceFolders.js +59 -0
- package/package.json +41 -0
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Create thumbnail grids from PowerPoint presentation slides.
|
|
4
|
+
|
|
5
|
+
Creates a grid layout of slide thumbnails with configurable columns (max 6).
|
|
6
|
+
Each grid contains up to cols×(cols+1) images. For presentations with more
|
|
7
|
+
slides, multiple numbered grid files are created automatically.
|
|
8
|
+
|
|
9
|
+
The program outputs the names of all files created.
|
|
10
|
+
|
|
11
|
+
Output:
|
|
12
|
+
- Single grid: {prefix}.jpg (if slides fit in one grid)
|
|
13
|
+
- Multiple grids: {prefix}-1.jpg, {prefix}-2.jpg, etc.
|
|
14
|
+
|
|
15
|
+
Grid limits by column count:
|
|
16
|
+
- 3 cols: max 12 slides per grid (3×4)
|
|
17
|
+
- 4 cols: max 20 slides per grid (4×5)
|
|
18
|
+
- 5 cols: max 30 slides per grid (5×6) [default]
|
|
19
|
+
- 6 cols: max 42 slides per grid (6×7)
|
|
20
|
+
|
|
21
|
+
Usage:
|
|
22
|
+
python thumbnail.py input.pptx [output_prefix] [--cols N] [--outline-placeholders]
|
|
23
|
+
|
|
24
|
+
Examples:
|
|
25
|
+
python thumbnail.py presentation.pptx
|
|
26
|
+
# Creates: thumbnails.jpg (using default prefix)
|
|
27
|
+
# Outputs:
|
|
28
|
+
# Created 1 grid(s):
|
|
29
|
+
# - thumbnails.jpg
|
|
30
|
+
|
|
31
|
+
python thumbnail.py large-deck.pptx grid --cols 4
|
|
32
|
+
# Creates: grid-1.jpg, grid-2.jpg, grid-3.jpg
|
|
33
|
+
# Outputs:
|
|
34
|
+
# Created 3 grid(s):
|
|
35
|
+
# - grid-1.jpg
|
|
36
|
+
# - grid-2.jpg
|
|
37
|
+
# - grid-3.jpg
|
|
38
|
+
|
|
39
|
+
python thumbnail.py template.pptx analysis --outline-placeholders
|
|
40
|
+
# Creates thumbnail grids with red outlines around text placeholders
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
import argparse
|
|
44
|
+
import subprocess
|
|
45
|
+
import sys
|
|
46
|
+
import tempfile
|
|
47
|
+
from pathlib import Path
|
|
48
|
+
|
|
49
|
+
from inventory import extract_text_inventory
|
|
50
|
+
from PIL import Image, ImageDraw, ImageFont
|
|
51
|
+
from pptx import Presentation
|
|
52
|
+
|
|
53
|
+
# Constants
|
|
54
|
+
THUMBNAIL_WIDTH = 300 # Fixed thumbnail width in pixels
|
|
55
|
+
CONVERSION_DPI = 100 # DPI for PDF to image conversion
|
|
56
|
+
MAX_COLS = 6 # Maximum number of columns
|
|
57
|
+
DEFAULT_COLS = 5 # Default number of columns
|
|
58
|
+
JPEG_QUALITY = 95 # JPEG compression quality
|
|
59
|
+
|
|
60
|
+
# Grid layout constants
|
|
61
|
+
GRID_PADDING = 20 # Padding between thumbnails
|
|
62
|
+
BORDER_WIDTH = 2 # Border width around thumbnails
|
|
63
|
+
FONT_SIZE_RATIO = 0.12 # Font size as fraction of thumbnail width
|
|
64
|
+
LABEL_PADDING_RATIO = 0.4 # Label padding as fraction of font size
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def main():
|
|
68
|
+
parser = argparse.ArgumentParser(
|
|
69
|
+
description="Create thumbnail grids from PowerPoint slides."
|
|
70
|
+
)
|
|
71
|
+
parser.add_argument("input", help="Input PowerPoint file (.pptx)")
|
|
72
|
+
parser.add_argument(
|
|
73
|
+
"output_prefix",
|
|
74
|
+
nargs="?",
|
|
75
|
+
default="thumbnails",
|
|
76
|
+
help="Output prefix for image files (default: thumbnails, will create prefix.jpg or prefix-N.jpg)",
|
|
77
|
+
)
|
|
78
|
+
parser.add_argument(
|
|
79
|
+
"--cols",
|
|
80
|
+
type=int,
|
|
81
|
+
default=DEFAULT_COLS,
|
|
82
|
+
help=f"Number of columns (default: {DEFAULT_COLS}, max: {MAX_COLS})",
|
|
83
|
+
)
|
|
84
|
+
parser.add_argument(
|
|
85
|
+
"--outline-placeholders",
|
|
86
|
+
action="store_true",
|
|
87
|
+
help="Outline text placeholders with a colored border",
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
args = parser.parse_args()
|
|
91
|
+
|
|
92
|
+
# Validate columns
|
|
93
|
+
cols = min(args.cols, MAX_COLS)
|
|
94
|
+
if args.cols > MAX_COLS:
|
|
95
|
+
print(f"Warning: Columns limited to {MAX_COLS} (requested {args.cols})")
|
|
96
|
+
|
|
97
|
+
# Validate input
|
|
98
|
+
input_path = Path(args.input)
|
|
99
|
+
if not input_path.exists() or input_path.suffix.lower() != ".pptx":
|
|
100
|
+
print(f"Error: Invalid PowerPoint file: {args.input}")
|
|
101
|
+
sys.exit(1)
|
|
102
|
+
|
|
103
|
+
# Construct output path (always JPG)
|
|
104
|
+
output_path = Path(f"{args.output_prefix}.jpg")
|
|
105
|
+
|
|
106
|
+
print(f"Processing: {args.input}")
|
|
107
|
+
|
|
108
|
+
try:
|
|
109
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
110
|
+
# Get placeholder regions if outlining is enabled
|
|
111
|
+
placeholder_regions = None
|
|
112
|
+
slide_dimensions = None
|
|
113
|
+
if args.outline_placeholders:
|
|
114
|
+
print("Extracting placeholder regions...")
|
|
115
|
+
placeholder_regions, slide_dimensions = get_placeholder_regions(
|
|
116
|
+
input_path
|
|
117
|
+
)
|
|
118
|
+
if placeholder_regions:
|
|
119
|
+
print(f"Found placeholders on {len(placeholder_regions)} slides")
|
|
120
|
+
|
|
121
|
+
# Convert slides to images
|
|
122
|
+
slide_images = convert_to_images(input_path, Path(temp_dir), CONVERSION_DPI)
|
|
123
|
+
if not slide_images:
|
|
124
|
+
print("Error: No slides found")
|
|
125
|
+
sys.exit(1)
|
|
126
|
+
|
|
127
|
+
print(f"Found {len(slide_images)} slides")
|
|
128
|
+
|
|
129
|
+
# Create grids (max cols×(cols+1) images per grid)
|
|
130
|
+
grid_files = create_grids(
|
|
131
|
+
slide_images,
|
|
132
|
+
cols,
|
|
133
|
+
THUMBNAIL_WIDTH,
|
|
134
|
+
output_path,
|
|
135
|
+
placeholder_regions,
|
|
136
|
+
slide_dimensions,
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
# Print saved files
|
|
140
|
+
print(f"Created {len(grid_files)} grid(s):")
|
|
141
|
+
for grid_file in grid_files:
|
|
142
|
+
print(f" - {grid_file}")
|
|
143
|
+
|
|
144
|
+
except Exception as e:
|
|
145
|
+
print(f"Error: {e}")
|
|
146
|
+
sys.exit(1)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def create_hidden_slide_placeholder(size):
|
|
150
|
+
"""Create placeholder image for hidden slides."""
|
|
151
|
+
img = Image.new("RGB", size, color="#F0F0F0")
|
|
152
|
+
draw = ImageDraw.Draw(img)
|
|
153
|
+
line_width = max(5, min(size) // 100)
|
|
154
|
+
draw.line([(0, 0), size], fill="#CCCCCC", width=line_width)
|
|
155
|
+
draw.line([(size[0], 0), (0, size[1])], fill="#CCCCCC", width=line_width)
|
|
156
|
+
return img
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
def get_placeholder_regions(pptx_path):
|
|
160
|
+
"""Extract ALL text regions from the presentation.
|
|
161
|
+
|
|
162
|
+
Returns a tuple of (placeholder_regions, slide_dimensions).
|
|
163
|
+
text_regions is a dict mapping slide indices to lists of text regions.
|
|
164
|
+
Each region is a dict with 'left', 'top', 'width', 'height' in inches.
|
|
165
|
+
slide_dimensions is a tuple of (width_inches, height_inches).
|
|
166
|
+
"""
|
|
167
|
+
prs = Presentation(str(pptx_path))
|
|
168
|
+
inventory = extract_text_inventory(pptx_path, prs)
|
|
169
|
+
placeholder_regions = {}
|
|
170
|
+
|
|
171
|
+
# Get actual slide dimensions in inches (EMU to inches conversion)
|
|
172
|
+
slide_width_inches = (prs.slide_width or 9144000) / 914400.0
|
|
173
|
+
slide_height_inches = (prs.slide_height or 5143500) / 914400.0
|
|
174
|
+
|
|
175
|
+
for slide_key, shapes in inventory.items():
|
|
176
|
+
# Extract slide index from "slide-N" format
|
|
177
|
+
slide_idx = int(slide_key.split("-")[1])
|
|
178
|
+
regions = []
|
|
179
|
+
|
|
180
|
+
for shape_key, shape_data in shapes.items():
|
|
181
|
+
# The inventory only contains shapes with text, so all shapes should be highlighted
|
|
182
|
+
regions.append(
|
|
183
|
+
{
|
|
184
|
+
"left": shape_data.left,
|
|
185
|
+
"top": shape_data.top,
|
|
186
|
+
"width": shape_data.width,
|
|
187
|
+
"height": shape_data.height,
|
|
188
|
+
}
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
if regions:
|
|
192
|
+
placeholder_regions[slide_idx] = regions
|
|
193
|
+
|
|
194
|
+
return placeholder_regions, (slide_width_inches, slide_height_inches)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
def convert_to_images(pptx_path, temp_dir, dpi):
|
|
198
|
+
"""Convert PowerPoint to images via PDF, handling hidden slides."""
|
|
199
|
+
# Detect hidden slides
|
|
200
|
+
print("Analyzing presentation...")
|
|
201
|
+
prs = Presentation(str(pptx_path))
|
|
202
|
+
total_slides = len(prs.slides)
|
|
203
|
+
|
|
204
|
+
# Find hidden slides (1-based indexing for display)
|
|
205
|
+
hidden_slides = {
|
|
206
|
+
idx + 1
|
|
207
|
+
for idx, slide in enumerate(prs.slides)
|
|
208
|
+
if slide.element.get("show") == "0"
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
print(f"Total slides: {total_slides}")
|
|
212
|
+
if hidden_slides:
|
|
213
|
+
print(f"Hidden slides: {sorted(hidden_slides)}")
|
|
214
|
+
|
|
215
|
+
pdf_path = temp_dir / f"{pptx_path.stem}.pdf"
|
|
216
|
+
|
|
217
|
+
# Convert to PDF
|
|
218
|
+
print("Converting to PDF...")
|
|
219
|
+
result = subprocess.run(
|
|
220
|
+
[
|
|
221
|
+
"soffice",
|
|
222
|
+
"--headless",
|
|
223
|
+
"--convert-to",
|
|
224
|
+
"pdf",
|
|
225
|
+
"--outdir",
|
|
226
|
+
str(temp_dir),
|
|
227
|
+
str(pptx_path),
|
|
228
|
+
],
|
|
229
|
+
capture_output=True,
|
|
230
|
+
text=True,
|
|
231
|
+
)
|
|
232
|
+
if result.returncode != 0 or not pdf_path.exists():
|
|
233
|
+
raise RuntimeError("PDF conversion failed")
|
|
234
|
+
|
|
235
|
+
# Convert PDF to images
|
|
236
|
+
print(f"Converting to images at {dpi} DPI...")
|
|
237
|
+
result = subprocess.run(
|
|
238
|
+
["pdftoppm", "-jpeg", "-r", str(dpi), str(pdf_path), str(temp_dir / "slide")],
|
|
239
|
+
capture_output=True,
|
|
240
|
+
text=True,
|
|
241
|
+
)
|
|
242
|
+
if result.returncode != 0:
|
|
243
|
+
raise RuntimeError("Image conversion failed")
|
|
244
|
+
|
|
245
|
+
visible_images = sorted(temp_dir.glob("slide-*.jpg"))
|
|
246
|
+
|
|
247
|
+
# Create full list with placeholders for hidden slides
|
|
248
|
+
all_images = []
|
|
249
|
+
visible_idx = 0
|
|
250
|
+
|
|
251
|
+
# Get placeholder dimensions from first visible slide
|
|
252
|
+
if visible_images:
|
|
253
|
+
with Image.open(visible_images[0]) as img:
|
|
254
|
+
placeholder_size = img.size
|
|
255
|
+
else:
|
|
256
|
+
placeholder_size = (1920, 1080)
|
|
257
|
+
|
|
258
|
+
for slide_num in range(1, total_slides + 1):
|
|
259
|
+
if slide_num in hidden_slides:
|
|
260
|
+
# Create placeholder image for hidden slide
|
|
261
|
+
placeholder_path = temp_dir / f"hidden-{slide_num:03d}.jpg"
|
|
262
|
+
placeholder_img = create_hidden_slide_placeholder(placeholder_size)
|
|
263
|
+
placeholder_img.save(placeholder_path, "JPEG")
|
|
264
|
+
all_images.append(placeholder_path)
|
|
265
|
+
else:
|
|
266
|
+
# Use the actual visible slide image
|
|
267
|
+
if visible_idx < len(visible_images):
|
|
268
|
+
all_images.append(visible_images[visible_idx])
|
|
269
|
+
visible_idx += 1
|
|
270
|
+
|
|
271
|
+
return all_images
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
def create_grids(
|
|
275
|
+
image_paths,
|
|
276
|
+
cols,
|
|
277
|
+
width,
|
|
278
|
+
output_path,
|
|
279
|
+
placeholder_regions=None,
|
|
280
|
+
slide_dimensions=None,
|
|
281
|
+
):
|
|
282
|
+
"""Create multiple thumbnail grids from slide images, max cols×(cols+1) images per grid."""
|
|
283
|
+
# Maximum images per grid is cols × (cols + 1) for better proportions
|
|
284
|
+
max_images_per_grid = cols * (cols + 1)
|
|
285
|
+
grid_files = []
|
|
286
|
+
|
|
287
|
+
print(
|
|
288
|
+
f"Creating grids with {cols} columns (max {max_images_per_grid} images per grid)"
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
# Split images into chunks
|
|
292
|
+
for chunk_idx, start_idx in enumerate(
|
|
293
|
+
range(0, len(image_paths), max_images_per_grid)
|
|
294
|
+
):
|
|
295
|
+
end_idx = min(start_idx + max_images_per_grid, len(image_paths))
|
|
296
|
+
chunk_images = image_paths[start_idx:end_idx]
|
|
297
|
+
|
|
298
|
+
# Create grid for this chunk
|
|
299
|
+
grid = create_grid(
|
|
300
|
+
chunk_images, cols, width, start_idx, placeholder_regions, slide_dimensions
|
|
301
|
+
)
|
|
302
|
+
|
|
303
|
+
# Generate output filename
|
|
304
|
+
if len(image_paths) <= max_images_per_grid:
|
|
305
|
+
# Single grid - use base filename without suffix
|
|
306
|
+
grid_filename = output_path
|
|
307
|
+
else:
|
|
308
|
+
# Multiple grids - insert index before extension with dash
|
|
309
|
+
stem = output_path.stem
|
|
310
|
+
suffix = output_path.suffix
|
|
311
|
+
grid_filename = output_path.parent / f"{stem}-{chunk_idx + 1}{suffix}"
|
|
312
|
+
|
|
313
|
+
# Save grid
|
|
314
|
+
grid_filename.parent.mkdir(parents=True, exist_ok=True)
|
|
315
|
+
grid.save(str(grid_filename), quality=JPEG_QUALITY)
|
|
316
|
+
grid_files.append(str(grid_filename))
|
|
317
|
+
|
|
318
|
+
return grid_files
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
def create_grid(
|
|
322
|
+
image_paths,
|
|
323
|
+
cols,
|
|
324
|
+
width,
|
|
325
|
+
start_slide_num=0,
|
|
326
|
+
placeholder_regions=None,
|
|
327
|
+
slide_dimensions=None,
|
|
328
|
+
):
|
|
329
|
+
"""Create thumbnail grid from slide images with optional placeholder outlining."""
|
|
330
|
+
font_size = int(width * FONT_SIZE_RATIO)
|
|
331
|
+
label_padding = int(font_size * LABEL_PADDING_RATIO)
|
|
332
|
+
|
|
333
|
+
# Get dimensions
|
|
334
|
+
with Image.open(image_paths[0]) as img:
|
|
335
|
+
aspect = img.height / img.width
|
|
336
|
+
height = int(width * aspect)
|
|
337
|
+
|
|
338
|
+
# Calculate grid size
|
|
339
|
+
rows = (len(image_paths) + cols - 1) // cols
|
|
340
|
+
grid_w = cols * width + (cols + 1) * GRID_PADDING
|
|
341
|
+
grid_h = rows * (height + font_size + label_padding * 2) + (rows + 1) * GRID_PADDING
|
|
342
|
+
|
|
343
|
+
# Create grid
|
|
344
|
+
grid = Image.new("RGB", (grid_w, grid_h), "white")
|
|
345
|
+
draw = ImageDraw.Draw(grid)
|
|
346
|
+
|
|
347
|
+
# Load font with size based on thumbnail width
|
|
348
|
+
try:
|
|
349
|
+
# Use Pillow's default font with size
|
|
350
|
+
font = ImageFont.load_default(size=font_size)
|
|
351
|
+
except Exception:
|
|
352
|
+
# Fall back to basic default font if size parameter not supported
|
|
353
|
+
font = ImageFont.load_default()
|
|
354
|
+
|
|
355
|
+
# Place thumbnails
|
|
356
|
+
for i, img_path in enumerate(image_paths):
|
|
357
|
+
row, col = i // cols, i % cols
|
|
358
|
+
x = col * width + (col + 1) * GRID_PADDING
|
|
359
|
+
y_base = (
|
|
360
|
+
row * (height + font_size + label_padding * 2) + (row + 1) * GRID_PADDING
|
|
361
|
+
)
|
|
362
|
+
|
|
363
|
+
# Add label with actual slide number
|
|
364
|
+
label = f"{start_slide_num + i}"
|
|
365
|
+
bbox = draw.textbbox((0, 0), label, font=font)
|
|
366
|
+
text_w = bbox[2] - bbox[0]
|
|
367
|
+
draw.text(
|
|
368
|
+
(x + (width - text_w) // 2, y_base + label_padding),
|
|
369
|
+
label,
|
|
370
|
+
fill="black",
|
|
371
|
+
font=font,
|
|
372
|
+
)
|
|
373
|
+
|
|
374
|
+
# Add thumbnail below label with proportional spacing
|
|
375
|
+
y_thumbnail = y_base + label_padding + font_size + label_padding
|
|
376
|
+
|
|
377
|
+
with Image.open(img_path) as img:
|
|
378
|
+
# Get original dimensions before thumbnail
|
|
379
|
+
orig_w, orig_h = img.size
|
|
380
|
+
|
|
381
|
+
# Apply placeholder outlines if enabled
|
|
382
|
+
if placeholder_regions and (start_slide_num + i) in placeholder_regions:
|
|
383
|
+
# Convert to RGBA for transparency support
|
|
384
|
+
if img.mode != "RGBA":
|
|
385
|
+
img = img.convert("RGBA")
|
|
386
|
+
|
|
387
|
+
# Get the regions for this slide
|
|
388
|
+
regions = placeholder_regions[start_slide_num + i]
|
|
389
|
+
|
|
390
|
+
# Calculate scale factors using actual slide dimensions
|
|
391
|
+
if slide_dimensions:
|
|
392
|
+
slide_width_inches, slide_height_inches = slide_dimensions
|
|
393
|
+
else:
|
|
394
|
+
# Fallback: estimate from image size at CONVERSION_DPI
|
|
395
|
+
slide_width_inches = orig_w / CONVERSION_DPI
|
|
396
|
+
slide_height_inches = orig_h / CONVERSION_DPI
|
|
397
|
+
|
|
398
|
+
x_scale = orig_w / slide_width_inches
|
|
399
|
+
y_scale = orig_h / slide_height_inches
|
|
400
|
+
|
|
401
|
+
# Create a highlight overlay
|
|
402
|
+
overlay = Image.new("RGBA", img.size, (255, 255, 255, 0))
|
|
403
|
+
overlay_draw = ImageDraw.Draw(overlay)
|
|
404
|
+
|
|
405
|
+
# Highlight each placeholder region
|
|
406
|
+
for region in regions:
|
|
407
|
+
# Convert from inches to pixels in the original image
|
|
408
|
+
px_left = int(region["left"] * x_scale)
|
|
409
|
+
px_top = int(region["top"] * y_scale)
|
|
410
|
+
px_width = int(region["width"] * x_scale)
|
|
411
|
+
px_height = int(region["height"] * y_scale)
|
|
412
|
+
|
|
413
|
+
# Draw highlight outline with red color and thick stroke
|
|
414
|
+
# Using a bright red outline instead of fill
|
|
415
|
+
stroke_width = max(
|
|
416
|
+
5, min(orig_w, orig_h) // 150
|
|
417
|
+
) # Thicker proportional stroke width
|
|
418
|
+
overlay_draw.rectangle(
|
|
419
|
+
[(px_left, px_top), (px_left + px_width, px_top + px_height)],
|
|
420
|
+
outline=(255, 0, 0, 255), # Bright red, fully opaque
|
|
421
|
+
width=stroke_width,
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
# Composite the overlay onto the image using alpha blending
|
|
425
|
+
img = Image.alpha_composite(img, overlay)
|
|
426
|
+
# Convert back to RGB for JPEG saving
|
|
427
|
+
img = img.convert("RGB")
|
|
428
|
+
|
|
429
|
+
img.thumbnail((width, height), Image.Resampling.LANCZOS)
|
|
430
|
+
w, h = img.size
|
|
431
|
+
tx = x + (width - w) // 2
|
|
432
|
+
ty = y_thumbnail + (height - h) // 2
|
|
433
|
+
grid.paste(img, (tx, ty))
|
|
434
|
+
|
|
435
|
+
# Add border
|
|
436
|
+
if BORDER_WIDTH > 0:
|
|
437
|
+
draw.rectangle(
|
|
438
|
+
[
|
|
439
|
+
(tx - BORDER_WIDTH, ty - BORDER_WIDTH),
|
|
440
|
+
(tx + w + BORDER_WIDTH - 1, ty + h + BORDER_WIDTH - 1),
|
|
441
|
+
],
|
|
442
|
+
outline="gray",
|
|
443
|
+
width=BORDER_WIDTH,
|
|
444
|
+
)
|
|
445
|
+
|
|
446
|
+
return grid
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
if __name__ == "__main__":
|
|
450
|
+
main()
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prompt-lab
|
|
3
|
+
description: Find agent failure patterns in traces, add few-shot examples or prompt edits to fix them, and verify improvement with before/after comparison.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Prompt Lab
|
|
7
|
+
|
|
8
|
+
Find edge cases from trace data, fix agent prompts with specific edits (few-shot examples, structured outputs, routing rules), and verify the fix worked.
|
|
9
|
+
|
|
10
|
+
The loop: **trace -> diagnose -> fix -> verify -> trace again**
|
|
11
|
+
|
|
12
|
+
## Examples
|
|
13
|
+
|
|
14
|
+
- "Use prompt-lab: the agent gives wrong answers sometimes"
|
|
15
|
+
- "Use prompt-lab: fix the edge case where the agent loops on large files"
|
|
16
|
+
- "Use prompt-lab: verify my last prompt change improved costs"
|
|
17
|
+
|
|
18
|
+
## Prerequisites
|
|
19
|
+
|
|
20
|
+
Requires trace data. Run `scripts/query-analytics.sh --problems` (bundled with this skill, relative to this SKILL.md) to verify.
|
|
21
|
+
If you add Python analysis snippets during debugging, run them with `uv run ...` (not bare `python3`) so dependencies resolve reliably.
|
|
22
|
+
|
|
23
|
+
Message-debug guidance:
|
|
24
|
+
- Prefer `scripts/query-analytics.sh --session-debug <session-id>` for an agent-safe summary.
|
|
25
|
+
- Use `scripts/query-analytics.sh --session-last <session-id> [N]` when you need recent user/assistant turns.
|
|
26
|
+
- Multipart message previews are shown as per-part tail excerpts; full extracted message text is written to a local artifact path when needed.
|
|
27
|
+
|
|
28
|
+
## Workflows
|
|
29
|
+
|
|
30
|
+
### 1. Find Edge Cases from Traces
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Find problem sessions (outliers in cost, tokens, or call count)
|
|
34
|
+
scripts/query-analytics.sh --problems
|
|
35
|
+
|
|
36
|
+
# Drill into the worst request
|
|
37
|
+
scripts/query-analytics.sh --request <request-id>
|
|
38
|
+
|
|
39
|
+
# Get a compact latest-session summary
|
|
40
|
+
scripts/query-analytics.sh --latest-session
|
|
41
|
+
|
|
42
|
+
# For the actual recent turns, prefer bounded message queries
|
|
43
|
+
scripts/query-analytics.sh --session-debug <session-id>
|
|
44
|
+
scripts/query-analytics.sh --session-last <session-id> 6
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
For a specific request's messages, use custom SQL:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
scripts/query-analytics.sh --sql "
|
|
51
|
+
${BASE_QUERY}
|
|
52
|
+
SELECT
|
|
53
|
+
max(CASE WHEN attr_key IN ('gen_ai.input.messages') THEN attr_string END) as input,
|
|
54
|
+
max(CASE WHEN attr_key IN ('gen_ai.output.messages') THEN attr_string END) as output
|
|
55
|
+
FROM attrs
|
|
56
|
+
WHERE trace_id = (
|
|
57
|
+
SELECT trace_id FROM (
|
|
58
|
+
${BASE_QUERY},
|
|
59
|
+
extracted AS (${EXTRACT_ATTRS})
|
|
60
|
+
SELECT trace_id FROM extracted WHERE request_id = '<request_id>' ORDER BY start_ms LIMIT 1
|
|
61
|
+
)
|
|
62
|
+
)
|
|
63
|
+
GROUP BY trace_id
|
|
64
|
+
"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Output:** A list of concrete failure cases: "On input X, the agent produced output Y, which was wrong/expensive because Z."
|
|
68
|
+
|
|
69
|
+
### 2. Propose a Fix
|
|
70
|
+
|
|
71
|
+
Based on the failure pattern, propose one of these edits to the agent's AGENTS.md or rules:
|
|
72
|
+
|
|
73
|
+
**For wrong behavior on edge cases — add a few-shot example:**
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
## Edge Case: [description]
|
|
77
|
+
When the user asks [pattern], respond with [correct behavior].
|
|
78
|
+
Example:
|
|
79
|
+
Input: [concrete input from trace]
|
|
80
|
+
Expected output: [correct output]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**For excessive retries — add structured output schema:**
|
|
84
|
+
|
|
85
|
+
```markdown
|
|
86
|
+
Always respond in this format:
|
|
87
|
+
1. Analysis: [brief reasoning]
|
|
88
|
+
2. Action: [tool call or answer]
|
|
89
|
+
3. Confidence: [high/medium/low]
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**For model mismatch — add routing guidance:**
|
|
93
|
+
|
|
94
|
+
```markdown
|
|
95
|
+
For simple questions (< 3 sentences, no code), use a fast model.
|
|
96
|
+
For complex analysis, use the full model.
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**For prompt bloat — make rules conditional:**
|
|
100
|
+
|
|
101
|
+
```markdown
|
|
102
|
+
# Only include when the user's request involves security review
|
|
103
|
+
## Security Review Guidelines
|
|
104
|
+
[guidelines that were previously always included]
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### 3. Verify the Fix
|
|
108
|
+
|
|
109
|
+
After the developer applies the edit:
|
|
110
|
+
|
|
111
|
+
1. Bump version in `agent.yaml`
|
|
112
|
+
2. Run test sessions:
|
|
113
|
+
```bash
|
|
114
|
+
agenthippo ask --agent <slug> "<failing input from step 1>" --json
|
|
115
|
+
```
|
|
116
|
+
3. Compare versions:
|
|
117
|
+
```bash
|
|
118
|
+
scripts/query-analytics.sh --compare-versions <agent>
|
|
119
|
+
```
|
|
120
|
+
4. Check if the problem session pattern disappeared:
|
|
121
|
+
```bash
|
|
122
|
+
scripts/query-analytics.sh --problems
|
|
123
|
+
scripts/query-analytics.sh --cost-per-request <new-session-id>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Output format for verification:**
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
## Prompt Lab: Fix Verification
|
|
130
|
+
|
|
131
|
+
### Change
|
|
132
|
+
[Description of what was changed]
|
|
133
|
+
|
|
134
|
+
### Before (vX.Y.Z, N sessions)
|
|
135
|
+
- Avg cost/session: $X.XX
|
|
136
|
+
- Avg LLM calls/request: X.X
|
|
137
|
+
- Edge case failure rate: N/M sessions
|
|
138
|
+
|
|
139
|
+
### After (vX.Y.Z, N sessions)
|
|
140
|
+
- Avg cost/session: $X.XX (change%)
|
|
141
|
+
- Avg LLM calls/request: X.X (change%)
|
|
142
|
+
- Edge case failure rate: N/M sessions
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Connection to Other Skills
|
|
146
|
+
|
|
147
|
+
- **spotlight-query** surfaces "what happened" -> Prompt Lab says "here's the fix"
|
|
148
|
+
- **spotlight-optimize** surfaces "where money is wasted" -> Prompt Lab says "here's the prompt edit"
|
|
149
|
+
- **debug-agent** surfaces "why it's broken" -> Prompt Lab says "add this few-shot example"
|