strray-ai 1.14.0 → 1.14.2
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/.opencode/AGENTS-consumer.md +1 -1
- package/.opencode/codex.codex +1 -1
- package/.opencode/enforcer-config.json +2 -2
- package/.opencode/hooks/post-commit +59 -3
- package/.opencode/hooks/post-commit.backup +155 -112
- package/.opencode/hooks/post-push +59 -3
- package/.opencode/hooks/post-push.backup +47 -64
- package/.opencode/package.json +1 -1
- package/.opencode/plugins/strray-codex-injection.js +37 -127
- package/.opencode/strray/agents_template.md +2 -2
- package/.opencode/strray/codex.json +1 -1
- package/.opencode/strray/config.json +1 -1
- package/.opencode/strray/features.json +1 -1
- package/.opencode/strray/integrations.json +3 -3
- package/AGENTS-consumer.md +669 -0
- package/AGENTS.md +16 -17
- package/README.md +104 -13
- package/dist/agents/researcher.d.ts.map +1 -1
- package/dist/agents/researcher.js.map +1 -1
- package/dist/analytics/emerging-pattern-detector.d.ts +1 -1
- package/dist/analytics/emerging-pattern-detector.d.ts.map +1 -1
- package/dist/analytics/prompt-pattern-analyzer.js +1 -1
- package/dist/analytics/prompt-pattern-analyzer.js.map +1 -1
- package/dist/analytics/routing-performance-analyzer.js +1 -1
- package/dist/analytics/routing-performance-analyzer.js.map +1 -1
- package/dist/analytics/routing-refiner.js +1 -1
- package/dist/cli/commands/agent-skills.d.ts +10 -0
- package/dist/cli/commands/agent-skills.d.ts.map +1 -0
- package/dist/cli/commands/agent-skills.js +55 -0
- package/dist/cli/commands/agent-skills.js.map +1 -0
- package/dist/cli/commands/antigravity-status.d.ts +10 -0
- package/dist/cli/commands/antigravity-status.d.ts.map +1 -0
- package/dist/cli/commands/antigravity-status.js +102 -0
- package/dist/cli/commands/antigravity-status.js.map +1 -0
- package/dist/cli/commands/credible-init.d.ts +12 -0
- package/dist/cli/commands/credible-init.d.ts.map +1 -0
- package/dist/cli/commands/credible-init.js +83 -0
- package/dist/cli/commands/credible-init.js.map +1 -0
- package/dist/cli/commands/publish-agent.d.ts +16 -0
- package/dist/cli/commands/publish-agent.d.ts.map +1 -0
- package/dist/cli/commands/publish-agent.js +184 -0
- package/dist/cli/commands/publish-agent.js.map +1 -0
- package/dist/cli/commands/skill-install.d.ts +6 -0
- package/dist/cli/commands/skill-install.d.ts.map +1 -0
- package/dist/cli/commands/skill-install.js +305 -0
- package/dist/cli/commands/skill-install.js.map +1 -0
- package/dist/cli/commands/skill-list.d.ts +11 -0
- package/dist/cli/commands/skill-list.d.ts.map +1 -0
- package/dist/cli/commands/skill-list.js +54 -0
- package/dist/cli/commands/skill-list.js.map +1 -0
- package/dist/cli/commands/status.d.ts +42 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +192 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/index.js +55 -64
- package/dist/cli/index.js.map +1 -1
- package/dist/core/boot-orchestrator.d.ts +2 -0
- package/dist/core/boot-orchestrator.d.ts.map +1 -1
- package/dist/core/boot-orchestrator.js +10 -6
- package/dist/core/boot-orchestrator.js.map +1 -1
- package/dist/core/features-config.js +1 -1
- package/dist/delegation/agent-delegator.d.ts +0 -1
- package/dist/delegation/agent-delegator.d.ts.map +1 -1
- package/dist/delegation/agent-delegator.js +5 -9
- package/dist/delegation/agent-delegator.js.map +1 -1
- package/dist/delegation/analytics/outcome-tracker.d.ts.map +1 -1
- package/dist/delegation/analytics/outcome-tracker.js +1 -2
- package/dist/delegation/analytics/outcome-tracker.js.map +1 -1
- package/dist/delegation/analytics/routing-analytics.d.ts.map +1 -1
- package/dist/delegation/analytics/routing-analytics.js +1 -2
- package/dist/delegation/analytics/routing-analytics.js.map +1 -1
- package/dist/delegation/index.d.ts +0 -1
- package/dist/delegation/index.d.ts.map +1 -1
- package/dist/delegation/index.js +0 -2
- package/dist/delegation/index.js.map +1 -1
- package/dist/enforcement/enforcer-tools.d.ts +0 -4
- package/dist/enforcement/enforcer-tools.d.ts.map +1 -1
- package/dist/enforcement/enforcer-tools.js +4 -15
- package/dist/enforcement/enforcer-tools.js.map +1 -1
- package/dist/mcps/architect-tools.server.js +1 -1
- package/dist/mcps/auto-format.server.js +1 -1
- package/dist/mcps/boot-orchestrator.server.js +1 -1
- package/dist/mcps/enforcer-tools.server.js +1 -1
- package/dist/mcps/estimation.server.js +1 -1
- package/dist/mcps/framework-compliance-audit.server.js +1 -1
- package/dist/mcps/framework-help.server.js +1 -1
- package/dist/mcps/knowledge-skills/api-design.server.js +1 -1
- package/dist/mcps/knowledge-skills/architecture-patterns.server.js +1 -1
- package/dist/mcps/knowledge-skills/bug-triage-specialist.server.js +1 -1
- package/dist/mcps/knowledge-skills/code-analyzer.server.js +1 -1
- package/dist/mcps/knowledge-skills/code-review.server.js +1 -1
- package/dist/mcps/knowledge-skills/content-creator.server.js +1 -1
- package/dist/mcps/knowledge-skills/database-design.server.js +1 -1
- package/dist/mcps/knowledge-skills/devops-deployment.server.js +1 -1
- package/dist/mcps/knowledge-skills/git-workflow.server.js +1 -1
- package/dist/mcps/knowledge-skills/growth-strategist.server.js +1 -1
- package/dist/mcps/knowledge-skills/log-monitor.server.js +1 -1
- package/dist/mcps/knowledge-skills/mobile-development.server.js +1 -1
- package/dist/mcps/knowledge-skills/multimodal-looker.server.js +1 -1
- package/dist/mcps/knowledge-skills/performance-optimization.server.js +1 -1
- package/dist/mcps/knowledge-skills/project-analysis.server.js +1 -1
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.js +1 -1
- package/dist/mcps/knowledge-skills/security-audit.server.js +1 -1
- package/dist/mcps/knowledge-skills/seo-consultant.server.js +1 -1
- package/dist/mcps/knowledge-skills/session-management.server.js +1 -1
- package/dist/mcps/knowledge-skills/skill-invocation.server.js +1 -1
- package/dist/mcps/knowledge-skills/strategist.server.js +1 -1
- package/dist/mcps/knowledge-skills/tech-writer.server.js +2 -2
- package/dist/mcps/knowledge-skills/testing-best-practices.server.js +1 -1
- package/dist/mcps/knowledge-skills/testing-strategy.server.js +1 -1
- package/dist/mcps/knowledge-skills/ui-ux-design.server.js +1 -1
- package/dist/mcps/lint.server.js +1 -1
- package/dist/mcps/model-health-check.server.js +1 -1
- package/dist/mcps/performance-analysis.server.js +1 -1
- package/dist/mcps/processor-pipeline.server.js +1 -1
- package/dist/mcps/researcher.server.js +1 -1
- package/dist/mcps/security-scan.server.js +1 -1
- package/dist/mcps/state-manager.server.js +1 -1
- package/dist/orchestrator/universal-registry-bridge.js +1 -1
- package/dist/plugin/strray-codex-injection.d.ts.map +1 -1
- package/dist/plugin/strray-codex-injection.js +37 -127
- package/dist/plugin/strray-codex-injection.js.map +1 -1
- package/dist/postprocessor/PostProcessor.d.ts.map +1 -1
- package/dist/postprocessor/PostProcessor.js +0 -1
- package/dist/postprocessor/PostProcessor.js.map +1 -1
- package/dist/processors/implementations/inference-improvement-processor.js +1 -1
- package/dist/services/inference-tuner.d.ts +0 -3
- package/dist/services/inference-tuner.d.ts.map +1 -1
- package/dist/services/inference-tuner.js +2 -32
- package/dist/services/inference-tuner.js.map +1 -1
- package/dist/skills/systematic-debugging/condition-based-waiting-example.d.ts +52 -0
- package/dist/skills/systematic-debugging/condition-based-waiting-example.d.ts.map +1 -0
- package/dist/skills/systematic-debugging/condition-based-waiting-example.js +128 -0
- package/dist/skills/systematic-debugging/condition-based-waiting-example.js.map +1 -0
- package/package.json +6 -10
- package/scripts/mjs/validate-mcp-connectivity.cjs +75 -0
- package/scripts/mjs/validate-postinstall-config.mjs +76 -0
- package/scripts/node/ci-cd-auto-fix.cjs +263 -0
- package/scripts/node/enforce-version-compliance.ts +4 -3
- package/scripts/node/install.cjs +595 -0
- package/scripts/node/postinstall.cjs +37 -0
- package/scripts/node/test-install.cjs +79 -0
- package/scripts/node/universal-version-manager.js +4 -4
- package/{.opencode → src}/skills/api-design/SKILL.md +6 -0
- package/{.opencode → src}/skills/architect-tools/SKILL.md +6 -0
- package/{.opencode → src}/skills/architecture-patterns/SKILL.md +6 -0
- package/{.opencode → src}/skills/auto-format/SKILL.md +6 -0
- package/{.opencode → src}/skills/boot-orchestrator/SKILL.md +6 -0
- package/{.opencode → src}/skills/bug-triage/SKILL.md +6 -0
- package/{.opencode → src}/skills/code-analyzer/SKILL.md +6 -0
- package/{.opencode → src}/skills/code-review/SKILL.md +17 -0
- package/{.opencode → src}/skills/enforcer/SKILL.md +6 -0
- package/{.opencode → src}/skills/framework-compliance-audit/SKILL.md +6 -0
- package/{.opencode → src}/skills/git-workflow/SKILL.md +6 -0
- package/{.opencode → src}/skills/inference-improve/SKILL.md +6 -0
- package/{.opencode → src}/skills/lint/SKILL.md +6 -0
- package/{.opencode → src}/skills/log-monitor/SKILL.md +6 -0
- package/{.opencode → src}/skills/model-health-check/SKILL.md +6 -0
- package/{.opencode → src}/skills/multimodal-looker/SKILL.md +6 -0
- package/{.opencode → src}/skills/orchestrator/SKILL.md +6 -0
- package/{.opencode → src}/skills/performance-analysis/SKILL.md +6 -0
- package/{.opencode → src}/skills/performance-optimization/SKILL.md +6 -0
- package/{.opencode → src}/skills/processor-pipeline/SKILL.md +6 -0
- package/{.opencode → src}/skills/project-analysis/SKILL.md +6 -0
- package/{.opencode → src}/skills/refactoring-strategies/SKILL.md +6 -0
- package/src/skills/registry.json +66 -0
- package/{.opencode → src}/skills/researcher/SKILL.md +6 -0
- package/{.opencode → src}/skills/security-audit/SKILL.md +16 -0
- package/{.opencode → src}/skills/security-scan/SKILL.md +6 -0
- package/{.opencode → src}/skills/session-management/SKILL.md +6 -0
- package/{.opencode → src}/skills/state-manager/SKILL.md +6 -0
- package/{.opencode → src}/skills/testing-best-practices/SKILL.md +6 -0
- package/{.opencode → src}/skills/testing-strategy/SKILL.md +6 -0
- package/{.opencode → src}/skills/ui-ux-design/SKILL.md +6 -0
- package/.opencode/integrations/api-security-best-practices/SKILL.md +0 -919
- package/.opencode/integrations/aws-serverless/SKILL.md +0 -337
- package/.opencode/integrations/brainstorming/SKILL.md +0 -241
- package/.opencode/integrations/claude-seo/README.md +0 -77
- package/.opencode/integrations/claude-seo/routing.json +0 -103
- package/.opencode/integrations/claude-seo/seo-audit/SKILL.md +0 -127
- package/.opencode/integrations/claude-seo/seo-competitor-pages/SKILL.md +0 -220
- package/.opencode/integrations/claude-seo/seo-content/SKILL.md +0 -177
- package/.opencode/integrations/claude-seo/seo-geo/SKILL.md +0 -251
- package/.opencode/integrations/claude-seo/seo-hreflang/SKILL.md +0 -200
- package/.opencode/integrations/claude-seo/seo-images/SKILL.md +0 -184
- package/.opencode/integrations/claude-seo/seo-page/SKILL.md +0 -94
- package/.opencode/integrations/claude-seo/seo-plan/SKILL.md +0 -126
- package/.opencode/integrations/claude-seo/seo-programmatic/SKILL.md +0 -178
- package/.opencode/integrations/claude-seo/seo-schema/SKILL.md +0 -167
- package/.opencode/integrations/claude-seo/seo-sitemap/SKILL.md +0 -120
- package/.opencode/integrations/claude-seo/seo-technical/SKILL.md +0 -168
- package/.opencode/integrations/copywriting/SKILL.md +0 -259
- package/.opencode/integrations/docker-expert/SKILL.md +0 -422
- package/.opencode/integrations/pricing-strategy/SKILL.md +0 -371
- package/.opencode/integrations/prompt-engineering/SKILL.md +0 -186
- package/.opencode/integrations/python-patterns/SKILL.md +0 -456
- package/.opencode/integrations/rag-engineer/SKILL.md +0 -104
- package/.opencode/integrations/react-patterns/SKILL.md +0 -212
- package/.opencode/integrations/seo-fundamentals/SKILL.md +0 -184
- package/.opencode/integrations/typescript-expert/SKILL.md +0 -435
- package/.opencode/integrations/vercel-deployment/SKILL.md +0 -89
- package/.opencode/integrations/vulnerability-scanner/SKILL.md +0 -290
- package/.opencode/strray/routing-mappings.json +0 -752
- package/LICENSE.antigravity +0 -42
- package/LICENSE.claude-seo +0 -39
- package/dist/delegation/config/default-mappings/analysis-mappings.d.ts +0 -9
- package/dist/delegation/config/default-mappings/analysis-mappings.d.ts.map +0 -1
- package/dist/delegation/config/default-mappings/analysis-mappings.js +0 -85
- package/dist/delegation/config/default-mappings/analysis-mappings.js.map +0 -1
- package/dist/delegation/config/default-mappings/architecture-mappings.d.ts +0 -9
- package/dist/delegation/config/default-mappings/architecture-mappings.d.ts.map +0 -1
- package/dist/delegation/config/default-mappings/architecture-mappings.js +0 -88
- package/dist/delegation/config/default-mappings/architecture-mappings.js.map +0 -1
- package/dist/delegation/config/default-mappings/content-mappings.d.ts +0 -9
- package/dist/delegation/config/default-mappings/content-mappings.d.ts.map +0 -1
- package/dist/delegation/config/default-mappings/content-mappings.js +0 -120
- package/dist/delegation/config/default-mappings/content-mappings.js.map +0 -1
- package/dist/delegation/config/default-mappings/database-mappings.d.ts +0 -9
- package/dist/delegation/config/default-mappings/database-mappings.d.ts.map +0 -1
- package/dist/delegation/config/default-mappings/database-mappings.js +0 -33
- package/dist/delegation/config/default-mappings/database-mappings.js.map +0 -1
- package/dist/delegation/config/default-mappings/development-mappings.d.ts +0 -9
- package/dist/delegation/config/default-mappings/development-mappings.d.ts.map +0 -1
- package/dist/delegation/config/default-mappings/development-mappings.js +0 -240
- package/dist/delegation/config/default-mappings/development-mappings.js.map +0 -1
- package/dist/delegation/config/default-mappings/devops-mappings.d.ts +0 -9
- package/dist/delegation/config/default-mappings/devops-mappings.d.ts.map +0 -1
- package/dist/delegation/config/default-mappings/devops-mappings.js +0 -83
- package/dist/delegation/config/default-mappings/devops-mappings.js.map +0 -1
- package/dist/delegation/config/default-mappings/documentation-mappings.d.ts +0 -9
- package/dist/delegation/config/default-mappings/documentation-mappings.d.ts.map +0 -1
- package/dist/delegation/config/default-mappings/documentation-mappings.js +0 -48
- package/dist/delegation/config/default-mappings/documentation-mappings.js.map +0 -1
- package/dist/delegation/config/default-mappings/index.d.ts +0 -26
- package/dist/delegation/config/default-mappings/index.d.ts.map +0 -1
- package/dist/delegation/config/default-mappings/index.js +0 -38
- package/dist/delegation/config/default-mappings/index.js.map +0 -1
- package/dist/delegation/config/default-mappings/performance-mappings.d.ts +0 -9
- package/dist/delegation/config/default-mappings/performance-mappings.d.ts.map +0 -1
- package/dist/delegation/config/default-mappings/performance-mappings.js +0 -68
- package/dist/delegation/config/default-mappings/performance-mappings.js.map +0 -1
- package/dist/delegation/config/default-mappings/security-mappings.d.ts +0 -9
- package/dist/delegation/config/default-mappings/security-mappings.d.ts.map +0 -1
- package/dist/delegation/config/default-mappings/security-mappings.js +0 -59
- package/dist/delegation/config/default-mappings/security-mappings.js.map +0 -1
- package/dist/delegation/config/default-mappings/special-mappings.d.ts +0 -9
- package/dist/delegation/config/default-mappings/special-mappings.d.ts.map +0 -1
- package/dist/delegation/config/default-mappings/special-mappings.js +0 -36
- package/dist/delegation/config/default-mappings/special-mappings.js.map +0 -1
- package/dist/delegation/config/default-mappings/testing-mappings.d.ts +0 -9
- package/dist/delegation/config/default-mappings/testing-mappings.d.ts.map +0 -1
- package/dist/delegation/config/default-mappings/testing-mappings.js +0 -88
- package/dist/delegation/config/default-mappings/testing-mappings.js.map +0 -1
- package/dist/delegation/config/default-mappings/ui-ux-mappings.d.ts +0 -9
- package/dist/delegation/config/default-mappings/ui-ux-mappings.d.ts.map +0 -1
- package/dist/delegation/config/default-mappings/ui-ux-mappings.js +0 -72
- package/dist/delegation/config/default-mappings/ui-ux-mappings.js.map +0 -1
- package/dist/delegation/config/index.d.ts +0 -10
- package/dist/delegation/config/index.d.ts.map +0 -1
- package/dist/delegation/config/index.js +0 -10
- package/dist/delegation/config/index.js.map +0 -1
- package/dist/delegation/config/routing-config.d.ts +0 -17
- package/dist/delegation/config/routing-config.d.ts.map +0 -1
- package/dist/delegation/config/routing-config.js +0 -22
- package/dist/delegation/config/routing-config.js.map +0 -1
- package/dist/delegation/config/routing-mappings.d.ts +0 -21
- package/dist/delegation/config/routing-mappings.d.ts.map +0 -1
- package/dist/delegation/config/routing-mappings.js +0 -106
- package/dist/delegation/config/routing-mappings.js.map +0 -1
- package/dist/delegation/routing/complexity-router.d.ts +0 -87
- package/dist/delegation/routing/complexity-router.d.ts.map +0 -1
- package/dist/delegation/routing/complexity-router.js +0 -140
- package/dist/delegation/routing/complexity-router.js.map +0 -1
- package/dist/delegation/routing/history-matcher.d.ts +0 -100
- package/dist/delegation/routing/history-matcher.d.ts.map +0 -1
- package/dist/delegation/routing/history-matcher.js +0 -194
- package/dist/delegation/routing/history-matcher.js.map +0 -1
- package/dist/delegation/routing/index.d.ts +0 -23
- package/dist/delegation/routing/index.d.ts.map +0 -1
- package/dist/delegation/routing/index.js +0 -24
- package/dist/delegation/routing/index.js.map +0 -1
- package/dist/delegation/routing/interfaces.d.ts +0 -99
- package/dist/delegation/routing/interfaces.d.ts.map +0 -1
- package/dist/delegation/routing/interfaces.js +0 -8
- package/dist/delegation/routing/interfaces.js.map +0 -1
- package/dist/delegation/routing/keyword-matcher.d.ts +0 -54
- package/dist/delegation/routing/keyword-matcher.d.ts.map +0 -1
- package/dist/delegation/routing/keyword-matcher.js +0 -142
- package/dist/delegation/routing/keyword-matcher.js.map +0 -1
- package/dist/delegation/routing/router-core.d.ts +0 -136
- package/dist/delegation/routing/router-core.d.ts.map +0 -1
- package/dist/delegation/routing/router-core.js +0 -443
- package/dist/delegation/routing/router-core.js.map +0 -1
- package/dist/delegation/task-skill-router.d.ts +0 -162
- package/dist/delegation/task-skill-router.d.ts.map +0 -1
- package/dist/delegation/task-skill-router.js +0 -301
- package/dist/delegation/task-skill-router.js.map +0 -1
- package/dist/plugins/marketplace/marketplace-service.d.ts +0 -108
- package/dist/plugins/marketplace/marketplace-service.d.ts.map +0 -1
- package/dist/plugins/marketplace/marketplace-service.js +0 -620
- package/dist/plugins/marketplace/marketplace-service.js.map +0 -1
- package/dist/plugins/marketplace/marketplace-types.d.ts +0 -468
- package/dist/plugins/marketplace/marketplace-types.d.ts.map +0 -1
- package/dist/plugins/marketplace/marketplace-types.js +0 -11
- package/dist/plugins/marketplace/marketplace-types.js.map +0 -1
- package/dist/plugins/plugin-system.d.ts +0 -152
- package/dist/plugins/plugin-system.d.ts.map +0 -1
- package/dist/plugins/plugin-system.js +0 -419
- package/dist/plugins/plugin-system.js.map +0 -1
- package/dist/plugins/stringray-codex-injection.d.ts +0 -21
- package/dist/plugins/stringray-codex-injection.d.ts.map +0 -1
- package/dist/plugins/stringray-codex-injection.js +0 -169
- package/dist/plugins/stringray-codex-injection.js.map +0 -1
- package/dist/scripts/analytics/daily-routing-analysis.d.ts +0 -18
- package/dist/scripts/analytics/daily-routing-analysis.d.ts.map +0 -1
- package/dist/scripts/analytics/daily-routing-analysis.js +0 -268
- package/dist/scripts/analytics/daily-routing-analysis.js.map +0 -1
- package/dist/scripts/analytics/index.d.ts +0 -15
- package/dist/scripts/analytics/index.d.ts.map +0 -1
- package/dist/scripts/analytics/index.js +0 -17
- package/dist/scripts/analytics/index.js.map +0 -1
- package/dist/scripts/test-p9.d.ts +0 -15
- package/dist/scripts/test-p9.d.ts.map +0 -1
- package/dist/scripts/test-p9.js +0 -220
- package/dist/scripts/test-p9.js.map +0 -1
- package/scripts/integrations/install-antigravity-skills.js.mjs +0 -195
- package/scripts/integrations/install-claude-seo.js +0 -561
|
@@ -651,4 +651,4 @@ npx strray-ai --version
|
|
|
651
651
|
- [Troubleshooting](https://github.com/htafolla/stringray/blob/master/docs/TROUBLESHOOTING.md)
|
|
652
652
|
|
|
653
653
|
---
|
|
654
|
-
**Version**: 1.14.
|
|
654
|
+
**Version**: 1.14.1 | [GitHub](https://github.com/htafolla/stringray)
|
package/.opencode/codex.codex
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.14.
|
|
2
|
+
"version": "1.14.1",
|
|
3
3
|
"terms": [
|
|
4
4
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60
|
|
5
5
|
],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "StringRay 1.0.0",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.1",
|
|
4
4
|
"description": "Codex-compliant framework configuration for Credible UI project",
|
|
5
5
|
"thresholds": {
|
|
6
6
|
"bundleSize": {
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
}
|
|
221
221
|
},
|
|
222
222
|
"codex": {
|
|
223
|
-
"version": "1.14.
|
|
223
|
+
"version": "1.14.1",
|
|
224
224
|
"terms": [
|
|
225
225
|
1,
|
|
226
226
|
2,
|
|
@@ -97,7 +97,7 @@ fi
|
|
|
97
97
|
|
|
98
98
|
await frameworkLogger.log('-git-hook-trigger', '-post-commit-validation-passed-in-result-duration-', 'success', { message: '✅ Post-commit: Validation passed in ' + result.duration + 'ms' });
|
|
99
99
|
} catch (error) {
|
|
100
|
-
|
|
100
|
+
await frameworkLogger.log('git-hook-trigger', 'post-commit-validation-failed', 'error', { error: error instanceof Error ? error.message : String(error) });
|
|
101
101
|
process.exit(1);
|
|
102
102
|
}
|
|
103
103
|
})();
|
|
@@ -115,16 +115,72 @@ fi
|
|
|
115
115
|
try {
|
|
116
116
|
// Use dynamic import that works in both dev and consumer
|
|
117
117
|
const basePath = process.env.STRRAY_BASE_PATH || '.';
|
|
118
|
+
// First archive logs (compress and rotate) before cleanup
|
|
119
|
+
const { archiveLogFiles } = await import(basePath + '/dist/postprocessor/triggers/GitHookTrigger.js');
|
|
120
|
+
const archiveResult = await archiveLogFiles({
|
|
121
|
+
archiveDirectory: 'logs/framework',
|
|
122
|
+
maxFileSizeMB: 10, // Archive if > 10MB
|
|
123
|
+
rotationIntervalHours: 24, // Archive if > 24 hours old
|
|
124
|
+
compressionEnabled: true,
|
|
125
|
+
maxAgeHours: 168, // Keep archives for 7 days
|
|
126
|
+
directories: ['logs/framework'],
|
|
127
|
+
excludePatterns: []
|
|
128
|
+
});
|
|
129
|
+
if (archiveResult.archived > 0) {
|
|
130
|
+
await frameworkLogger.log('-git-hook-trigger', '-archived-log-files-', 'info', { message: `📦 Archived ${archiveResult.archived} log files` });
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Then cleanup old files
|
|
118
134
|
const { cleanupLogFiles } = await import(basePath + '/dist/postprocessor/triggers/GitHookTrigger.js');
|
|
119
135
|
const result = await cleanupLogFiles({
|
|
120
136
|
maxAgeHours: 24,
|
|
121
|
-
excludePatterns: [
|
|
137
|
+
excludePatterns: [
|
|
138
|
+
// Core inference/logging - NEVER DELETE
|
|
139
|
+
'activity.log',
|
|
140
|
+
'framework-activity-',
|
|
141
|
+
'strray-plugin-',
|
|
142
|
+
|
|
143
|
+
// Analysis & reflections - Contains inference data
|
|
144
|
+
'kernel-',
|
|
145
|
+
'reflection-',
|
|
146
|
+
|
|
147
|
+
// Documentation & plans - Important artifacts
|
|
148
|
+
'.md',
|
|
149
|
+
'AUTOMATED_',
|
|
150
|
+
'REFACTORING-',
|
|
151
|
+
'release-',
|
|
152
|
+
|
|
153
|
+
// Subdirectories with important data (but test-activity should be cleaned)
|
|
154
|
+
'deployment/',
|
|
155
|
+
'monitoring/',
|
|
156
|
+
'reports/',
|
|
157
|
+
'reflections/',
|
|
158
|
+
|
|
159
|
+
// Init logs can be cleaned but keep recent
|
|
160
|
+
'strray-init-2026-01-2', // Keep Jan 20s
|
|
161
|
+
'strray-init-2026-01-3', // Keep Jan 30s
|
|
162
|
+
|
|
163
|
+
// Other important files
|
|
164
|
+
'current-session.log',
|
|
165
|
+
'full-test-run.log',
|
|
166
|
+
'kernel-codex',
|
|
167
|
+
'kernel-methodology',
|
|
168
|
+
'kernel-status',
|
|
169
|
+
'kernel-update',
|
|
170
|
+
'kernel-v2',
|
|
171
|
+
],
|
|
122
172
|
directories: ['logs/'],
|
|
123
173
|
enabled: true
|
|
124
174
|
});
|
|
125
175
|
if (result.cleaned > 0) {
|
|
126
|
-
await frameworkLogger.log('-git-hook-trigger', '-cleaned-result-cleaned-old-log-files-', 'info', { message:
|
|
176
|
+
await frameworkLogger.log('-git-hook-trigger', '-cleaned-result-cleaned-old-log-files-', 'info', { message: '🧹 Cleaned ' + result.cleaned + ' old log files' });
|
|
127
177
|
}
|
|
178
|
+
if (result.errors.length > 0) {
|
|
179
|
+
await frameworkLogger.log('git-hook-trigger', 'log-cleanup-errors', 'error', { errors: result.errors });
|
|
180
|
+
}
|
|
181
|
+
} catch (error) {
|
|
182
|
+
await frameworkLogger.log('git-hook-trigger', 'log-cleanup-failed', 'error', { error: error instanceof Error ? error.message : String(error) });
|
|
183
|
+
}
|
|
128
184
|
if (result.errors.length > 0) {
|
|
129
185
|
console.error('Log cleanup errors:', result.errors);
|
|
130
186
|
}
|
|
@@ -1,129 +1,172 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
#
|
|
3
|
-
# Automatically triggers post-processor after commit
|
|
4
|
-
# Suggests reflection writing for significant changes
|
|
5
|
-
|
|
6
|
-
set -e
|
|
2
|
+
# StringRay Post-Processor post-commit Hook
|
|
3
|
+
# Automatically triggers post-processor after post-commit
|
|
7
4
|
|
|
5
|
+
# Get hook type from script name
|
|
8
6
|
HOOK_NAME=$(basename "$0")
|
|
9
|
-
COMMIT_SHA
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
COMMIT_SHA=""
|
|
8
|
+
|
|
9
|
+
if [ "$HOOK_NAME" = "post-commit" ]; then
|
|
10
|
+
# Light monitoring for local commits - just basic validation
|
|
11
|
+
COMMIT_SHA=$(git rev-parse HEAD)
|
|
12
|
+
MONITORING_LEVEL="basic"
|
|
13
|
+
elif [ "$HOOK_NAME" = "post-push" ]; then
|
|
14
|
+
# Full monitoring for pushes - comprehensive validation
|
|
15
|
+
# For push hooks, we need to parse the pushed refs from stdin
|
|
16
|
+
while read local_ref local_sha remote_ref remote_sha; do
|
|
17
|
+
if [ "$local_sha" != "0000000000000000000000000000000000000000" ]; then
|
|
18
|
+
COMMIT_SHA=$local_sha
|
|
19
|
+
break
|
|
20
|
+
fi
|
|
21
|
+
done
|
|
22
|
+
MONITORING_LEVEL="full"
|
|
23
|
+
else
|
|
24
|
+
COMMIT_SHA=$(git rev-parse HEAD)
|
|
25
|
+
MONITORING_LEVEL="basic"
|
|
26
|
+
fi
|
|
12
27
|
|
|
13
28
|
if [ -z "$COMMIT_SHA" ]; then
|
|
29
|
+
echo "Warning: Could not determine commit SHA for post-processor"
|
|
14
30
|
exit 0
|
|
15
31
|
fi
|
|
16
32
|
|
|
17
|
-
# Get
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
COMMIT_MSG=$(git log -1 --pretty=format:'%s')
|
|
22
|
-
|
|
23
|
-
# Check if this commit warrants reflection
|
|
24
|
-
# (debugging, bug fixes, path issues, significant changes)
|
|
25
|
-
REFLECTION_TRIGGERS="debug|fix|bug|path|mcp|consumer|installation|reflection"
|
|
26
|
-
if echo "$COMMIT_MSG" | grep -qiE "$REFLECTION_TRIGGERS"; then
|
|
27
|
-
echo "📝 Reflection Suggestion: This commit appears to involve debugging, fixes, or significant changes."
|
|
28
|
-
echo " Consider writing a reflection using the template at docs/reflections/TEMPLATE.md"
|
|
29
|
-
echo ""
|
|
30
|
-
fi
|
|
31
|
-
|
|
32
|
-
# Check for new reflection files and validate them
|
|
33
|
-
NEW_REFLECTIONS=$(git diff --name-only HEAD~1 2>/dev/null | grep "^docs/reflections/.*\.md$" | grep -v "TEMPLATE.md" || true)
|
|
34
|
-
if [ -n "$NEW_REFLECTIONS" ]; then
|
|
35
|
-
echo "🔍 Validating new reflection files..."
|
|
36
|
-
for ref in $NEW_REFLECTIONS; do
|
|
37
|
-
if [ -f "$ref" ]; then
|
|
38
|
-
if bash scripts/node/reflection-check.sh "$ref" 2>/dev/null; then
|
|
39
|
-
echo " ✅ $ref passes template validation"
|
|
40
|
-
else
|
|
41
|
-
echo " ❌ $ref FAILED template validation"
|
|
42
|
-
echo " 📖 Read the template: docs/reflections/TEMPLATE.md"
|
|
43
|
-
echo " ⚠️ Please fix the reflection to match the template before committing"
|
|
44
|
-
fi
|
|
45
|
-
fi
|
|
46
|
-
done
|
|
47
|
-
echo ""
|
|
48
|
-
fi
|
|
33
|
+
# Get repository info
|
|
34
|
+
REPO="strray-framework/stringray" # Placeholder for now
|
|
35
|
+
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
36
|
+
AUTHOR=$(git log -1 --pretty=format:'%an <%ae>')
|
|
49
37
|
|
|
50
|
-
#
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
# Check required sections
|
|
56
|
-
ERRORS=0
|
|
57
|
-
for section in "## Available Agents" "## Complexity Routing" "## CLI Commands" "## Codex"; do
|
|
58
|
-
if grep -q "$section" AGENTS.md; then
|
|
59
|
-
echo " ✅ Contains: $section"
|
|
60
|
-
else
|
|
61
|
-
echo " ❌ Missing: $section"
|
|
62
|
-
ERRORS=$((ERRORS + 1))
|
|
63
|
-
fi
|
|
64
|
-
done
|
|
65
|
-
|
|
66
|
-
# Check agent count
|
|
67
|
-
AGENT_COUNT=$(grep -o '@[a-z-]*' AGENTS.md | wc -l)
|
|
68
|
-
if [ "$AGENT_COUNT" -ge 15 ]; then
|
|
69
|
-
echo " ✅ Agent count: $AGENT_COUNT (recommended: 20+)"
|
|
70
|
-
else
|
|
71
|
-
echo " ⚠️ Agent count: $AGENT_COUNT (recommended: 20+)"
|
|
72
|
-
fi
|
|
73
|
-
|
|
74
|
-
if [ "$ERRORS" -gt 0 ]; then
|
|
75
|
-
echo " ⚠️ AGENTS.md has $ERRORS missing required sections"
|
|
76
|
-
echo " 📖 See AGENTS.md in root for current format"
|
|
77
|
-
else
|
|
78
|
-
echo " ✅ AGENTS.md validation passed"
|
|
79
|
-
fi
|
|
80
|
-
else
|
|
81
|
-
echo " ❌ AGENTS.md not found"
|
|
82
|
-
fi
|
|
83
|
-
echo ""
|
|
38
|
+
# Get changed files (different logic for commit vs push)
|
|
39
|
+
if [ "$HOOK_NAME" = "post-commit" ]; then
|
|
40
|
+
FILES=$(git diff --name-only HEAD~1 2>/dev/null || git diff --name-only --cached)
|
|
41
|
+
else
|
|
42
|
+
FILES=$(git log --name-only --oneline -1 $COMMIT_SHA | tail -n +2)
|
|
84
43
|
fi
|
|
85
44
|
|
|
86
|
-
#
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
45
|
+
# Trigger post-processor asynchronously (don't block git operations)
|
|
46
|
+
(
|
|
47
|
+
cd "$(dirname "$0")/../.." # Navigate to project root
|
|
48
|
+
|
|
49
|
+
# Find the StringRay plugin in node_modules or current project (development)
|
|
50
|
+
STRRAY_PLUGIN=""
|
|
51
|
+
if [ -d "node_modules/strray-framework" ]; then
|
|
52
|
+
STRRAY_PLUGIN="node_modules/strray-framework"
|
|
53
|
+
elif [ -d "node_modules/@strray/strray-framework" ]; then
|
|
54
|
+
STRRAY_PLUGIN="node_modules/@strray/strray-framework"
|
|
55
|
+
elif [ -d "node_modules/OpenCode/plugins/strray-framework" ]; then
|
|
56
|
+
STRRAY_PLUGIN="node_modules/OpenCode/plugins/strray-framework"
|
|
57
|
+
elif [ -f "dist/postprocessor/PostProcessor.js" ]; then
|
|
58
|
+
# Development mode - use current project
|
|
59
|
+
STRRAY_PLUGIN="."
|
|
93
60
|
fi
|
|
94
|
-
done
|
|
95
61
|
|
|
96
|
-
if [ -
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
62
|
+
if command -v node >/dev/null 2>&1 && [ -n "$STRRAY_PLUGIN" ]; then
|
|
63
|
+
# Call a separate script to avoid bash variable issues
|
|
64
|
+
export COMMIT_SHA="$COMMIT_SHA"
|
|
65
|
+
export REPO="$REPO"
|
|
66
|
+
export BRANCH="$BRANCH"
|
|
67
|
+
export AUTHOR="$AUTHOR"
|
|
68
|
+
export STRRAY_PLUGIN="$STRRAY_PLUGIN"
|
|
69
|
+
export MONITORING_LEVEL="$MONITORING_LEVEL"
|
|
70
|
+
export IS_FULL_MONITORING="$([ "$MONITORING_LEVEL" = "full" ] && echo "true" || echo "false")"
|
|
71
|
+
|
|
72
|
+
# Run appropriate monitoring based on hook type
|
|
73
|
+
if [ "$HOOK_NAME" = "post-commit" ]; then
|
|
74
|
+
# LIGHT MONITORING: Quick validation, don't block git workflow
|
|
75
|
+
# Timeout: 2 seconds max, log metrics for monitoring
|
|
76
|
+
START_TIME=$(date +%s)
|
|
77
|
+
timeout 2 node -e "
|
|
78
|
+
(async () => {
|
|
79
|
+
try {
|
|
80
|
+
// Use import resolver to avoid hardcoded dist paths
|
|
81
|
+
const { importResolver } = await import('./utils/import-resolver.js');
|
|
82
|
+
const { LightweightValidator } = await importResolver.importModule('postprocessor/validation/LightweightValidator');
|
|
83
|
+
|
|
84
|
+
const validator = new LightweightValidator();
|
|
85
|
+
const result = await validator.validate();
|
|
86
|
+
|
|
87
|
+
if (result.warnings.length > 0) {
|
|
88
|
+
await frameworkLogger.log('-git-hook-trigger', '-result-warnings-length-warning-s-found-', 'info', { message: '⚠️ ' + result.warnings.length + ' warning(s) found:' });
|
|
89
|
+
result.warnings.forEach(w => await frameworkLogger.log('-git-hook-trigger', '-w-', 'info', { message: ' ' + w) });
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (!result.passed) {
|
|
93
|
+
await frameworkLogger.log('-git-hook-trigger', '-result-errors-length-error-s-found-', 'error', { message: '❌ ' + result.errors.length + ' error(s) found:' });
|
|
94
|
+
result.errors.forEach(e => await frameworkLogger.log('-git-hook-trigger', '-e-', 'info', { message: ' ' + e) });
|
|
95
|
+
process.exit(1);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
await frameworkLogger.log('-git-hook-trigger', '-post-commit-validation-passed-in-result-duration-', 'success', { message: '✅ Post-commit: Validation passed in ' + result.duration + 'ms' });
|
|
99
|
+
} catch (error) {
|
|
100
|
+
console.error('❌ Post-commit validation failed:', error instanceof Error ? error.message : String(error));
|
|
101
|
+
process.exit(1);
|
|
102
|
+
}
|
|
103
|
+
})();
|
|
104
|
+
" 2>/dev/null
|
|
105
|
+
EXIT_CODE=$?
|
|
106
|
+
END_TIME=$(date +%s)
|
|
107
|
+
DURATION=$((END_TIME - START_TIME))
|
|
108
|
+
|
|
109
|
+
# Log metrics for monitoring (convert to milliseconds)
|
|
110
|
+
DURATION_MS=$((DURATION * 1000))
|
|
111
|
+
# LOG CLEANUP: Remove old log files after validation
|
|
112
|
+
# Use relative path from CWD - works in both dev and consumer
|
|
113
|
+
node -e "
|
|
114
|
+
(async () => {
|
|
115
|
+
try {
|
|
116
|
+
// Use dynamic import that works in both dev and consumer
|
|
117
|
+
const basePath = process.env.STRRAY_BASE_PATH || '.';
|
|
118
|
+
const { cleanupLogFiles } = await import(basePath + '/dist/postprocessor/triggers/GitHookTrigger.js');
|
|
119
|
+
const result = await cleanupLogFiles({
|
|
120
|
+
maxAgeHours: 24,
|
|
121
|
+
excludePatterns: ['logs/framework/activity.log', 'logs/agents/refactoring-log.md', 'current-session.log'],
|
|
122
|
+
directories: ['logs/'],
|
|
123
|
+
enabled: true
|
|
124
|
+
});
|
|
125
|
+
if (result.cleaned > 0) {
|
|
126
|
+
await frameworkLogger.log('-git-hook-trigger', '-cleaned-result-cleaned-old-log-files-', 'info', { message: `🧹 Cleaned ${result.cleaned} old log files` });
|
|
127
|
+
}
|
|
128
|
+
if (result.errors.length > 0) {
|
|
129
|
+
console.error('Log cleanup errors:', result.errors);
|
|
130
|
+
}
|
|
131
|
+
} catch (error) {
|
|
132
|
+
console.error('Log cleanup failed:', error.message);
|
|
133
|
+
}
|
|
134
|
+
})();
|
|
135
|
+
"
|
|
136
|
+
|
|
137
|
+
echo "HOOK_METRICS: post-commit duration=${DURATION_MS}ms exit_code=${EXIT_CODE}" >&2
|
|
138
|
+
collector.recordMetrics('post-commit', ${DURATION_MS}, ${EXIT_CODE});
|
|
139
|
+
" 2>/dev/null
|
|
140
|
+
EXIT_CODE=$?
|
|
141
|
+
END_TIME=$(date +%s)
|
|
142
|
+
DURATION=$((END_TIME - START_TIME))
|
|
143
|
+
|
|
144
|
+
# Log comprehensive metrics for monitoring (convert to milliseconds)
|
|
145
|
+
DURATION_MS=$((DURATION * 1000))
|
|
146
|
+
echo "HOOK_METRICS: post-push duration=${DURATION_MS}ms exit_code=${EXIT_CODE}" >&2
|
|
147
|
+
|
|
148
|
+
# Record metrics using metrics collector (direct import for reliability)
|
|
149
|
+
# Use environment variable for base path - works in both dev and consumer
|
|
150
|
+
node -e "
|
|
151
|
+
(async () => {
|
|
152
|
+
try {
|
|
153
|
+
const basePath = process.env.STRRAY_BASE_PATH || '.';
|
|
154
|
+
const distPath = process.env.STRRAY_DIST_PATH || 'dist';
|
|
155
|
+
const { HookMetricsCollector } = await import(basePath + '/' + distPath + '/postprocessor/validation/HookMetricsCollector.js');
|
|
156
|
+
const collector = new HookMetricsCollector();
|
|
157
|
+
collector.recordMetrics('post-push', ${DURATION_MS}, ${EXIT_CODE});
|
|
158
|
+
} catch (error) {
|
|
159
|
+
// Silently fail if metrics collection fails
|
|
160
|
+
}
|
|
161
|
+
})();
|
|
162
|
+
" 2>/dev/null || true
|
|
163
|
+
|
|
164
|
+
[ $EXIT_CODE -eq 0 ] && exit 0 || exit 1
|
|
165
|
+
fi
|
|
100
166
|
else
|
|
101
|
-
|
|
167
|
+
echo "Warning: StringRay plugin not found or Node.js not available, skipping post-processor"
|
|
102
168
|
fi
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
# Run post-processor in background with Node.js
|
|
106
|
-
node --input-type=module << EOF &>/dev/null || true
|
|
107
|
-
import { PostProcessor } from './$STRRAY_PATH/dist/postprocessor/PostProcessor.js';
|
|
108
|
-
import { StrRayStateManager } from './$STRRAY_PATH/dist/state/state-manager.js';
|
|
109
|
-
|
|
110
|
-
const stateManager = new StrRayStateManager();
|
|
111
|
-
const postProcessor = new PostProcessor(stateManager, null, {
|
|
112
|
-
reporting: { enabled: false }
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
const files = \`$FILES\`.split('\n').filter(f => f.endsWith('.ts') && !f.includes('.test.'));
|
|
116
|
-
|
|
117
|
-
await postProcessor.executePostProcessorLoop({
|
|
118
|
-
commitSha: '$COMMIT_SHA',
|
|
119
|
-
repository: 'strray-framework/stringray',
|
|
120
|
-
branch: '$BRANCH',
|
|
121
|
-
author: '$AUTHOR',
|
|
122
|
-
files: files,
|
|
123
|
-
trigger: 'git-hook'
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
console.log('Post-processor completed for', files.length, 'files');
|
|
127
|
-
EOF
|
|
169
|
+
)
|
|
128
170
|
|
|
171
|
+
# Don't wait for background process
|
|
129
172
|
exit 0
|
|
@@ -97,7 +97,7 @@ fi
|
|
|
97
97
|
|
|
98
98
|
await frameworkLogger.log('-git-hook-trigger', '-post-commit-validation-passed-in-result-duration-', 'success', { message: '✅ Post-commit: Validation passed in ' + result.duration + 'ms' });
|
|
99
99
|
} catch (error) {
|
|
100
|
-
|
|
100
|
+
await frameworkLogger.log('git-hook-trigger', 'post-commit-validation-failed', 'error', { error: error instanceof Error ? error.message : String(error) });
|
|
101
101
|
process.exit(1);
|
|
102
102
|
}
|
|
103
103
|
})();
|
|
@@ -115,16 +115,72 @@ fi
|
|
|
115
115
|
try {
|
|
116
116
|
// Use dynamic import that works in both dev and consumer
|
|
117
117
|
const basePath = process.env.STRRAY_BASE_PATH || '.';
|
|
118
|
+
// First archive logs (compress and rotate) before cleanup
|
|
119
|
+
const { archiveLogFiles } = await import(basePath + '/dist/postprocessor/triggers/GitHookTrigger.js');
|
|
120
|
+
const archiveResult = await archiveLogFiles({
|
|
121
|
+
archiveDirectory: 'logs/framework',
|
|
122
|
+
maxFileSizeMB: 10, // Archive if > 10MB
|
|
123
|
+
rotationIntervalHours: 24, // Archive if > 24 hours old
|
|
124
|
+
compressionEnabled: true,
|
|
125
|
+
maxAgeHours: 168, // Keep archives for 7 days
|
|
126
|
+
directories: ['logs/framework'],
|
|
127
|
+
excludePatterns: []
|
|
128
|
+
});
|
|
129
|
+
if (archiveResult.archived > 0) {
|
|
130
|
+
await frameworkLogger.log('-git-hook-trigger', '-archived-log-files-', 'info', { message: `📦 Archived ${archiveResult.archived} log files` });
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Then cleanup old files
|
|
118
134
|
const { cleanupLogFiles } = await import(basePath + '/dist/postprocessor/triggers/GitHookTrigger.js');
|
|
119
135
|
const result = await cleanupLogFiles({
|
|
120
136
|
maxAgeHours: 24,
|
|
121
|
-
excludePatterns: [
|
|
137
|
+
excludePatterns: [
|
|
138
|
+
// Core inference/logging - NEVER DELETE
|
|
139
|
+
'activity.log',
|
|
140
|
+
'framework-activity-',
|
|
141
|
+
'strray-plugin-',
|
|
142
|
+
|
|
143
|
+
// Analysis & reflections - Contains inference data
|
|
144
|
+
'kernel-',
|
|
145
|
+
'reflection-',
|
|
146
|
+
|
|
147
|
+
// Documentation & plans - Important artifacts
|
|
148
|
+
'.md',
|
|
149
|
+
'AUTOMATED_',
|
|
150
|
+
'REFACTORING-',
|
|
151
|
+
'release-',
|
|
152
|
+
|
|
153
|
+
// Subdirectories with important data (but test-activity should be cleaned)
|
|
154
|
+
'deployment/',
|
|
155
|
+
'monitoring/',
|
|
156
|
+
'reports/',
|
|
157
|
+
'reflections/',
|
|
158
|
+
|
|
159
|
+
// Init logs can be cleaned but keep recent
|
|
160
|
+
'strray-init-2026-01-2', // Keep Jan 20s
|
|
161
|
+
'strray-init-2026-01-3', // Keep Jan 30s
|
|
162
|
+
|
|
163
|
+
// Other important files
|
|
164
|
+
'current-session.log',
|
|
165
|
+
'full-test-run.log',
|
|
166
|
+
'kernel-codex',
|
|
167
|
+
'kernel-methodology',
|
|
168
|
+
'kernel-status',
|
|
169
|
+
'kernel-update',
|
|
170
|
+
'kernel-v2',
|
|
171
|
+
],
|
|
122
172
|
directories: ['logs/'],
|
|
123
173
|
enabled: true
|
|
124
174
|
});
|
|
125
175
|
if (result.cleaned > 0) {
|
|
126
|
-
await frameworkLogger.log('-git-hook-trigger', '-cleaned-result-cleaned-old-log-files-', 'info', { message:
|
|
176
|
+
await frameworkLogger.log('-git-hook-trigger', '-cleaned-result-cleaned-old-log-files-', 'info', { message: '🧹 Cleaned ' + result.cleaned + ' old log files' });
|
|
127
177
|
}
|
|
178
|
+
if (result.errors.length > 0) {
|
|
179
|
+
await frameworkLogger.log('git-hook-trigger', 'log-cleanup-errors', 'error', { errors: result.errors });
|
|
180
|
+
}
|
|
181
|
+
} catch (error) {
|
|
182
|
+
await frameworkLogger.log('git-hook-trigger', 'log-cleanup-failed', 'error', { error: error instanceof Error ? error.message : String(error) });
|
|
183
|
+
}
|
|
128
184
|
if (result.errors.length > 0) {
|
|
129
185
|
console.error('Log cleanup errors:', result.errors);
|
|
130
186
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
#
|
|
2
|
+
# StringRay Post-Processor post-push Hook
|
|
3
3
|
# Automatically triggers post-processor after post-push
|
|
4
4
|
|
|
5
5
|
# Get hook type from script name
|
|
@@ -46,25 +46,17 @@ fi
|
|
|
46
46
|
(
|
|
47
47
|
cd "$(dirname "$0")/../.." # Navigate to project root
|
|
48
48
|
|
|
49
|
-
# Find the
|
|
49
|
+
# Find the StringRay plugin in node_modules or current project (development)
|
|
50
50
|
STRRAY_PLUGIN=""
|
|
51
|
-
STRRAY_DIST=""
|
|
52
51
|
if [ -d "node_modules/strray-framework" ]; then
|
|
53
52
|
STRRAY_PLUGIN="node_modules/strray-framework"
|
|
54
|
-
STRRAY_DIST="node_modules/strray-framework/dist"
|
|
55
|
-
elif [ -d "node_modules/strray-ai" ]; then
|
|
56
|
-
STRRAY_PLUGIN="node_modules/strray-ai"
|
|
57
|
-
STRRAY_DIST="node_modules/strray-ai/dist"
|
|
58
53
|
elif [ -d "node_modules/@strray/strray-framework" ]; then
|
|
59
54
|
STRRAY_PLUGIN="node_modules/@strray/strray-framework"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
STRRAY_PLUGIN="node_modules/oh-my-opencode/plugins/strray-framework"
|
|
63
|
-
STRRAY_DIST="node_modules/oh-my-opencode/plugins/strray-framework/dist"
|
|
55
|
+
elif [ -d "node_modules/OpenCode/plugins/strray-framework" ]; then
|
|
56
|
+
STRRAY_PLUGIN="node_modules/OpenCode/plugins/strray-framework"
|
|
64
57
|
elif [ -f "dist/postprocessor/PostProcessor.js" ]; then
|
|
65
58
|
# Development mode - use current project
|
|
66
59
|
STRRAY_PLUGIN="."
|
|
67
|
-
STRRAY_DIST="dist"
|
|
68
60
|
fi
|
|
69
61
|
|
|
70
62
|
if command -v node >/dev/null 2>&1 && [ -n "$STRRAY_PLUGIN" ]; then
|
|
@@ -74,7 +66,6 @@ fi
|
|
|
74
66
|
export BRANCH="$BRANCH"
|
|
75
67
|
export AUTHOR="$AUTHOR"
|
|
76
68
|
export STRRAY_PLUGIN="$STRRAY_PLUGIN"
|
|
77
|
-
export STRRAY_DIST="$STRRAY_DIST"
|
|
78
69
|
export MONITORING_LEVEL="$MONITORING_LEVEL"
|
|
79
70
|
export IS_FULL_MONITORING="$([ "$MONITORING_LEVEL" = "full" ] && echo "true" || echo "false")"
|
|
80
71
|
|
|
@@ -94,17 +85,17 @@ fi
|
|
|
94
85
|
const result = await validator.validate();
|
|
95
86
|
|
|
96
87
|
if (result.warnings.length > 0) {
|
|
97
|
-
|
|
98
|
-
result.warnings.forEach(w =>
|
|
88
|
+
await frameworkLogger.log('-git-hook-trigger', '-result-warnings-length-warning-s-found-', 'info', { message: '⚠️ ' + result.warnings.length + ' warning(s) found:' });
|
|
89
|
+
result.warnings.forEach(w => await frameworkLogger.log('-git-hook-trigger', '-w-', 'info', { message: ' ' + w) });
|
|
99
90
|
}
|
|
100
91
|
|
|
101
92
|
if (!result.passed) {
|
|
102
|
-
|
|
103
|
-
result.errors.forEach(e =>
|
|
93
|
+
await frameworkLogger.log('-git-hook-trigger', '-result-errors-length-error-s-found-', 'error', { message: '❌ ' + result.errors.length + ' error(s) found:' });
|
|
94
|
+
result.errors.forEach(e => await frameworkLogger.log('-git-hook-trigger', '-e-', 'info', { message: ' ' + e) });
|
|
104
95
|
process.exit(1);
|
|
105
96
|
}
|
|
106
97
|
|
|
107
|
-
|
|
98
|
+
await frameworkLogger.log('-git-hook-trigger', '-post-commit-validation-passed-in-result-duration-', 'success', { message: '✅ Post-commit: Validation passed in ' + result.duration + 'ms' });
|
|
108
99
|
} catch (error) {
|
|
109
100
|
console.error('❌ Post-commit validation failed:', error instanceof Error ? error.message : String(error));
|
|
110
101
|
process.exit(1);
|
|
@@ -117,56 +108,34 @@ fi
|
|
|
117
108
|
|
|
118
109
|
# Log metrics for monitoring (convert to milliseconds)
|
|
119
110
|
DURATION_MS=$((DURATION * 1000))
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
# Record metrics using metrics collector (direct import for reliability)
|
|
111
|
+
# LOG CLEANUP: Remove old log files after validation
|
|
112
|
+
# Use relative path from CWD - works in both dev and consumer
|
|
123
113
|
node -e "
|
|
124
114
|
(async () => {
|
|
125
115
|
try {
|
|
126
|
-
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
[ $EXIT_CODE -eq 0 ] && exit 0 || exit 1
|
|
136
|
-
else
|
|
137
|
-
# FULL MONITORING: Comprehensive analysis for post-push
|
|
138
|
-
# Timeout: 5 minutes max, comprehensive CI/CD validation
|
|
139
|
-
START_TIME=$(date +%s)
|
|
140
|
-
timeout 300 node -e "
|
|
141
|
-
(async () => {
|
|
142
|
-
try {
|
|
143
|
-
console.log('🚀 Post-push: Comprehensive validation initiated');
|
|
144
|
-
|
|
145
|
-
// Use PostProcessor from environment variable
|
|
146
|
-
const STRRAY_DIST = process.env.STRRAY_DIST || './dist';
|
|
147
|
-
const { PostProcessor } = await import(STRRAY_DIST + '/postprocessor/PostProcessor.js');
|
|
148
|
-
const { StrRayStateManager } = await import(STRRAY_DIST + '/state/state-manager.js');
|
|
149
|
-
|
|
150
|
-
const stateManager = new StrRayStateManager();
|
|
151
|
-
const postProcessor = new PostProcessor(stateManager, null, {
|
|
152
|
-
reporting: { enabled: true, autoGenerate: true, reportThreshold: 10 }
|
|
116
|
+
// Use dynamic import that works in both dev and consumer
|
|
117
|
+
const basePath = process.env.STRRAY_BASE_PATH || '.';
|
|
118
|
+
const { cleanupLogFiles } = await import(basePath + '/dist/postprocessor/triggers/GitHookTrigger.js');
|
|
119
|
+
const result = await cleanupLogFiles({
|
|
120
|
+
maxAgeHours: 24,
|
|
121
|
+
excludePatterns: ['logs/framework/activity.log', 'logs/agents/refactoring-log.md', 'current-session.log'],
|
|
122
|
+
directories: ['logs/'],
|
|
123
|
+
enabled: true
|
|
153
124
|
});
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
timestamp: Date.now()
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
await postProcessor.executePostProcessorLoop(context);
|
|
164
|
-
console.log('✅ Post-push: Comprehensive validation passed');
|
|
125
|
+
if (result.cleaned > 0) {
|
|
126
|
+
await frameworkLogger.log('-git-hook-trigger', '-cleaned-result-cleaned-old-log-files-', 'info', { message: `🧹 Cleaned ${result.cleaned} old log files` });
|
|
127
|
+
}
|
|
128
|
+
if (result.errors.length > 0) {
|
|
129
|
+
console.error('Log cleanup errors:', result.errors);
|
|
130
|
+
}
|
|
165
131
|
} catch (error) {
|
|
166
|
-
|
|
167
|
-
console.log('⚠️ Post-push: Validation skipped (' + (error instanceof Error ? error.message : 'error') + ')');
|
|
132
|
+
console.error('Log cleanup failed:', error.message);
|
|
168
133
|
}
|
|
169
134
|
})();
|
|
135
|
+
"
|
|
136
|
+
|
|
137
|
+
echo "HOOK_METRICS: post-commit duration=${DURATION_MS}ms exit_code=${EXIT_CODE}" >&2
|
|
138
|
+
collector.recordMetrics('post-commit', ${DURATION_MS}, ${EXIT_CODE});
|
|
170
139
|
" 2>/dev/null
|
|
171
140
|
EXIT_CODE=$?
|
|
172
141
|
END_TIME=$(date +%s)
|
|
@@ -176,12 +145,26 @@ fi
|
|
|
176
145
|
DURATION_MS=$((DURATION * 1000))
|
|
177
146
|
echo "HOOK_METRICS: post-push duration=${DURATION_MS}ms exit_code=${EXIT_CODE}" >&2
|
|
178
147
|
|
|
179
|
-
#
|
|
180
|
-
|
|
148
|
+
# Record metrics using metrics collector (direct import for reliability)
|
|
149
|
+
# Use environment variable for base path - works in both dev and consumer
|
|
150
|
+
node -e "
|
|
151
|
+
(async () => {
|
|
152
|
+
try {
|
|
153
|
+
const basePath = process.env.STRRAY_BASE_PATH || '.';
|
|
154
|
+
const distPath = process.env.STRRAY_DIST_PATH || 'dist';
|
|
155
|
+
const { HookMetricsCollector } = await import(basePath + '/' + distPath + '/postprocessor/validation/HookMetricsCollector.js');
|
|
156
|
+
const collector = new HookMetricsCollector();
|
|
157
|
+
collector.recordMetrics('post-push', ${DURATION_MS}, ${EXIT_CODE});
|
|
158
|
+
} catch (error) {
|
|
159
|
+
// Silently fail if metrics collection fails
|
|
160
|
+
}
|
|
161
|
+
})();
|
|
162
|
+
" 2>/dev/null || true
|
|
163
|
+
|
|
181
164
|
[ $EXIT_CODE -eq 0 ] && exit 0 || exit 1
|
|
182
165
|
fi
|
|
183
166
|
else
|
|
184
|
-
echo "Warning:
|
|
167
|
+
echo "Warning: StringRay plugin not found or Node.js not available, skipping post-processor"
|
|
185
168
|
fi
|
|
186
169
|
)
|
|
187
170
|
|