@open-mercato/cli 0.9.1-develop.7574.1.837288eec1 → 0.10.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/.turbo/turbo-build.log +12 -2
- package/build.mjs +1 -0
- package/dist/agentic/claude-code/mcp.json.example +5 -1
- package/dist/agentic/codex/mcp.json.example +3 -0
- package/dist/agentic/cursor/mcp.json.example +4 -1
- package/dist/agentic/github-copilot/mcp.json.example +5 -1
- package/dist/agentic/guides/ai-workflows.md +1 -0
- package/dist/agentic/guides/architecture.md +7 -5
- package/dist/agentic/guides/module-facts.json +17621 -2604
- package/dist/agentic/guides/module-facts.v2.json +17710 -2604
- package/dist/agentic/guides/module-tool.md +21 -0
- package/dist/agentic/guides/modules/agent_orchestrator/acl-features.md +2 -1
- package/dist/agentic/guides/modules/agent_orchestrator/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/agent_orchestrator/backend-pages.md +3 -0
- package/dist/agentic/guides/modules/agent_orchestrator/cli-commands.md +4 -0
- package/dist/agentic/guides/modules/agent_orchestrator/contribution-resolutions.md +6 -0
- package/dist/agentic/guides/modules/agent_orchestrator/di-registrations-rich.md +32 -32
- package/dist/agentic/guides/modules/agent_orchestrator/di-service-tokens.md +14 -14
- package/dist/agentic/guides/modules/agent_orchestrator/domain-commands.md +3 -0
- package/dist/agentic/guides/modules/agent_orchestrator/events.md +30 -29
- package/dist/agentic/guides/modules/agent_orchestrator/exact-override-targets.md +104 -35
- package/dist/agentic/guides/modules/agent_orchestrator/index.md +17 -6
- package/dist/agentic/guides/modules/agent_orchestrator/setup.md +1 -1
- package/dist/agentic/guides/modules/agent_orchestrator/umes-contributions.md +6 -0
- package/dist/agentic/guides/modules/agent_orchestrator/umes-hosts.md +2 -1
- package/dist/agentic/guides/modules/agent_orchestrator/workers.md +2 -0
- package/dist/agentic/guides/modules/ai_assistant/acl-features.md +4 -1
- package/dist/agentic/guides/modules/ai_assistant/ai-tools-mcp-capabilities.md +1 -0
- package/dist/agentic/guides/modules/ai_assistant/backend-pages.md +4 -0
- package/dist/agentic/guides/modules/ai_assistant/cli-commands.md +1 -0
- package/dist/agentic/guides/modules/ai_assistant/contribution-resolutions.md +3 -0
- package/dist/agentic/guides/modules/ai_assistant/di-registrations-rich.md +5 -3
- package/dist/agentic/guides/modules/ai_assistant/di-service-tokens.md +4 -2
- package/dist/agentic/guides/modules/ai_assistant/encryption.md +3 -0
- package/dist/agentic/guides/modules/ai_assistant/entities.md +3 -0
- package/dist/agentic/guides/modules/ai_assistant/events.md +9 -8
- package/dist/agentic/guides/modules/ai_assistant/exact-override-targets.md +23 -6
- package/dist/agentic/guides/modules/ai_assistant/index.md +9 -9
- package/dist/agentic/guides/modules/ai_assistant/notifications.md +1 -0
- package/dist/agentic/guides/modules/ai_assistant/setup.md +1 -1
- package/dist/agentic/guides/modules/ai_assistant/umes-contributions.md +3 -0
- package/dist/agentic/guides/modules/ai_assistant/umes-hosts.md +4 -0
- package/dist/agentic/guides/modules/ai_assistant/workers.md +2 -1
- package/dist/agentic/guides/modules/api_docs/index.md +1 -1
- package/dist/agentic/guides/modules/api_keys/index.md +1 -1
- package/dist/agentic/guides/modules/attachments/active-extension-bindings.md +12 -0
- package/dist/agentic/guides/modules/attachments/ai-tools-mcp-capabilities.md +11 -0
- package/dist/agentic/guides/modules/attachments/backend-pages.md +1 -0
- package/dist/agentic/guides/modules/attachments/cli-commands.md +1 -0
- package/dist/agentic/guides/modules/attachments/contribution-resolutions.md +13 -0
- package/dist/agentic/guides/modules/attachments/di-registrations-rich.md +6 -6
- package/dist/agentic/guides/modules/attachments/di-service-tokens.md +5 -5
- package/dist/agentic/guides/modules/attachments/domain-commands.md +11 -0
- package/dist/agentic/guides/modules/attachments/encryption.md +12 -0
- package/dist/agentic/guides/modules/attachments/entities.md +2 -0
- package/dist/agentic/guides/modules/attachments/events.md +3 -3
- package/dist/agentic/guides/modules/attachments/exact-override-targets.md +17 -7
- package/dist/agentic/guides/modules/attachments/generator-plugins.md +11 -0
- package/dist/agentic/guides/modules/attachments/index.md +13 -5
- package/dist/agentic/guides/modules/attachments/search-entities.md +11 -0
- package/dist/agentic/guides/modules/attachments/setup.md +1 -1
- package/dist/agentic/guides/modules/attachments/umes-contributions.md +13 -0
- package/dist/agentic/guides/modules/attachments/umes-hosts.md +4 -0
- package/dist/agentic/guides/modules/attachments/workers.md +2 -0
- package/dist/agentic/guides/modules/audit_logs/active-extension-bindings.md +11 -0
- package/dist/agentic/guides/modules/audit_logs/incoming-installed-contributions.md +12 -0
- package/dist/agentic/guides/modules/audit_logs/index.md +4 -2
- package/dist/agentic/guides/modules/auth/events.md +12 -12
- package/dist/agentic/guides/modules/auth/index.md +1 -1
- package/dist/agentic/guides/modules/availability/events.md +3 -3
- package/dist/agentic/guides/modules/availability/index.md +1 -1
- package/dist/agentic/guides/modules/business_rules/events.md +1 -1
- package/dist/agentic/guides/modules/business_rules/index.md +1 -1
- package/dist/agentic/guides/modules/carrier_inpost/acl-features.md +12 -0
- package/dist/agentic/guides/modules/carrier_inpost/contribution-resolutions.md +13 -0
- package/dist/agentic/guides/modules/carrier_inpost/di-registrations-rich.md +11 -0
- package/dist/agentic/guides/modules/carrier_inpost/exact-override-targets.md +16 -0
- package/dist/agentic/guides/modules/carrier_inpost/index.md +18 -0
- package/dist/agentic/guides/modules/carrier_inpost/owned-contract-module-metadata.md +11 -0
- package/dist/agentic/guides/modules/carrier_inpost/setup.md +11 -0
- package/dist/agentic/guides/modules/carrier_inpost/umes-contributions.md +13 -0
- package/dist/agentic/guides/modules/cart/acl-features.md +19 -0
- package/dist/agentic/guides/modules/cart/contribution-resolutions.md +24 -0
- package/dist/agentic/guides/modules/cart/di-registrations-rich.md +11 -0
- package/dist/agentic/guides/modules/cart/di-service-tokens.md +11 -0
- package/dist/agentic/guides/modules/cart/domain-commands.md +24 -0
- package/dist/agentic/guides/modules/cart/encryption.md +11 -0
- package/dist/agentic/guides/modules/cart/entities.md +15 -0
- package/dist/agentic/guides/modules/cart/events.md +35 -0
- package/dist/agentic/guides/modules/cart/exact-override-targets.md +27 -0
- package/dist/agentic/guides/modules/cart/index.md +25 -0
- package/dist/agentic/guides/modules/cart/owned-contract-module-metadata.md +11 -0
- package/dist/agentic/guides/modules/cart/setup.md +11 -0
- package/dist/agentic/guides/modules/cart/umes-contributions.md +24 -0
- package/dist/agentic/guides/modules/cart/umes-hosts.md +40 -0
- package/dist/agentic/guides/modules/cart/workers.md +14 -0
- package/dist/agentic/guides/modules/catalog/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/catalog/di-registrations-rich.md +7 -5
- package/dist/agentic/guides/modules/catalog/di-service-tokens.md +4 -2
- package/dist/agentic/guides/modules/catalog/events.md +18 -18
- package/dist/agentic/guides/modules/catalog/exact-override-targets.md +7 -5
- package/dist/agentic/guides/modules/catalog/index.md +2 -2
- package/dist/agentic/guides/modules/catalog/owned-contract-module-metadata.md +1 -1
- package/dist/agentic/guides/modules/channel_apns/index.md +1 -1
- package/dist/agentic/guides/modules/channel_discord/index.md +1 -1
- package/dist/agentic/guides/modules/channel_expo/index.md +1 -1
- package/dist/agentic/guides/modules/channel_fcm/index.md +1 -1
- package/dist/agentic/guides/modules/channel_gmail/index.md +1 -1
- package/dist/agentic/guides/modules/channel_imap/index.md +1 -1
- package/dist/agentic/guides/modules/channel_resend/index.md +1 -1
- package/dist/agentic/guides/modules/channel_ses/index.md +1 -1
- package/dist/agentic/guides/modules/channel_smtp/acl-features.md +12 -0
- package/dist/agentic/guides/modules/channel_smtp/contribution-resolutions.md +11 -0
- package/dist/agentic/guides/modules/channel_smtp/di-registrations-rich.md +12 -0
- package/dist/agentic/guides/modules/channel_smtp/exact-override-targets.md +16 -0
- package/dist/agentic/guides/modules/channel_smtp/index.md +18 -0
- package/dist/agentic/guides/modules/channel_smtp/owned-contract-module-metadata.md +11 -0
- package/dist/agentic/guides/modules/channel_smtp/setup.md +11 -0
- package/dist/agentic/guides/modules/channel_smtp/umes-contributions.md +11 -0
- package/dist/agentic/guides/modules/checkout/events.md +16 -16
- package/dist/agentic/guides/modules/checkout/exact-override-targets.md +5 -4
- package/dist/agentic/guides/modules/checkout/index.md +1 -1
- package/dist/agentic/guides/modules/checkout/setup.md +1 -1
- package/dist/agentic/guides/modules/checkout/workers.md +1 -1
- package/dist/agentic/guides/modules/communication_channels/events.md +17 -17
- package/dist/agentic/guides/modules/communication_channels/exact-override-targets.md +5 -4
- package/dist/agentic/guides/modules/communication_channels/index.md +2 -2
- package/dist/agentic/guides/modules/communication_channels/setup.md +1 -1
- package/dist/agentic/guides/modules/communication_channels/workers.md +2 -2
- package/dist/agentic/guides/modules/configs/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/configs/index.md +1 -1
- package/dist/agentic/guides/modules/content/index.md +1 -1
- package/dist/agentic/guides/modules/currencies/di-registrations-rich.md +11 -0
- package/dist/agentic/guides/modules/currencies/di-service-tokens.md +11 -0
- package/dist/agentic/guides/modules/currencies/events.md +6 -6
- package/dist/agentic/guides/modules/currencies/exact-override-targets.md +1 -0
- package/dist/agentic/guides/modules/currencies/index.md +4 -2
- package/dist/agentic/guides/modules/customer_accounts/active-extension-bindings.md +1 -0
- package/dist/agentic/guides/modules/customer_accounts/contribution-resolutions.md +2 -2
- package/dist/agentic/guides/modules/customer_accounts/domain-commands.md +11 -0
- package/dist/agentic/guides/modules/customer_accounts/events.md +27 -26
- package/dist/agentic/guides/modules/customer_accounts/exact-override-targets.md +1 -1
- package/dist/agentic/guides/modules/customer_accounts/index.md +5 -4
- package/dist/agentic/guides/modules/customer_accounts/umes-contributions.md +2 -2
- package/dist/agentic/guides/modules/customer_accounts/umes-hosts.md +1 -0
- package/dist/agentic/guides/modules/customer_groups/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/customer_groups/contribution-resolutions.md +2 -2
- package/dist/agentic/guides/modules/customer_groups/events.md +7 -7
- package/dist/agentic/guides/modules/customer_groups/index.md +1 -1
- package/dist/agentic/guides/modules/customer_groups/umes-contributions.md +2 -2
- package/dist/agentic/guides/modules/customers/active-extension-bindings.md +9 -10
- package/dist/agentic/guides/modules/customers/di-registrations-rich.md +6 -5
- package/dist/agentic/guides/modules/customers/encryption.md +1 -1
- package/dist/agentic/guides/modules/customers/events.md +51 -51
- package/dist/agentic/guides/modules/customers/exact-override-targets.md +6 -5
- package/dist/agentic/guides/modules/customers/incoming-installed-contributions.md +12 -8
- package/dist/agentic/guides/modules/customers/index.md +12 -4
- package/dist/agentic/guides/modules/customers/umes-hosts.md +46 -0
- package/dist/agentic/guides/modules/dashboards/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/dashboards/index.md +1 -1
- package/dist/agentic/guides/modules/data_sync/events.md +4 -4
- package/dist/agentic/guides/modules/data_sync/index.md +1 -1
- package/dist/agentic/guides/modules/design_system/index.md +1 -1
- package/dist/agentic/guides/modules/devices/events.md +5 -5
- package/dist/agentic/guides/modules/devices/index.md +1 -1
- package/dist/agentic/guides/modules/dictionaries/events.md +3 -3
- package/dist/agentic/guides/modules/dictionaries/index.md +1 -1
- package/dist/agentic/guides/modules/directory/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/directory/contribution-resolutions.md +1 -0
- package/dist/agentic/guides/modules/directory/events.md +6 -6
- package/dist/agentic/guides/modules/directory/exact-override-targets.md +1 -0
- package/dist/agentic/guides/modules/directory/incoming-installed-contributions.md +4 -0
- package/dist/agentic/guides/modules/directory/index.md +2 -2
- package/dist/agentic/guides/modules/directory/umes-contributions.md +1 -0
- package/dist/agentic/guides/modules/documents/contribution-resolutions.md +3 -3
- package/dist/agentic/guides/modules/documents/events.md +15 -15
- package/dist/agentic/guides/modules/documents/index.md +1 -1
- package/dist/agentic/guides/modules/documents/umes-contributions.md +5 -5
- package/dist/agentic/guides/modules/ecommerce/contribution-resolutions.md +1 -0
- package/dist/agentic/guides/modules/ecommerce/events.md +12 -12
- package/dist/agentic/guides/modules/ecommerce/exact-override-targets.md +1 -0
- package/dist/agentic/guides/modules/ecommerce/index.md +3 -3
- package/dist/agentic/guides/modules/ecommerce/umes-contributions.md +1 -0
- package/dist/agentic/guides/modules/entities/contribution-resolutions.md +14 -0
- package/dist/agentic/guides/modules/entities/exact-override-targets.md +4 -0
- package/dist/agentic/guides/modules/entities/index.md +5 -3
- package/dist/agentic/guides/modules/entities/umes-contributions.md +14 -0
- package/dist/agentic/guides/modules/eudr/events.md +23 -23
- package/dist/agentic/guides/modules/eudr/index.md +1 -1
- package/dist/agentic/guides/modules/eudr/owned-contract-module-metadata.md +1 -1
- package/dist/agentic/guides/modules/events/index.md +1 -1
- package/dist/agentic/guides/modules/feature_toggles/index.md +1 -1
- package/dist/agentic/guides/modules/forms/events.md +18 -18
- package/dist/agentic/guides/modules/forms/index.md +1 -1
- package/dist/agentic/guides/modules/forms/owned-contract-module-metadata.md +1 -1
- package/dist/agentic/guides/modules/gateway_autopay/acl-features.md +12 -0
- package/dist/agentic/guides/modules/gateway_autopay/cli-commands.md +12 -0
- package/dist/agentic/guides/modules/gateway_autopay/contribution-resolutions.md +12 -0
- package/dist/agentic/guides/modules/gateway_autopay/di-registrations-rich.md +11 -0
- package/dist/agentic/guides/modules/gateway_autopay/exact-override-targets.md +17 -0
- package/dist/agentic/guides/modules/gateway_autopay/index.md +19 -0
- package/dist/agentic/guides/modules/gateway_autopay/owned-contract-module-metadata.md +11 -0
- package/dist/agentic/guides/modules/gateway_autopay/setup.md +11 -0
- package/dist/agentic/guides/modules/gateway_autopay/umes-contributions.md +12 -0
- package/dist/agentic/guides/modules/gateway_stripe/index.md +1 -1
- package/dist/agentic/guides/modules/gateway_tpay/contribution-resolutions.md +1 -0
- package/dist/agentic/guides/modules/gateway_tpay/di-registrations-rich.md +1 -1
- package/dist/agentic/guides/modules/gateway_tpay/exact-override-targets.md +6 -3
- package/dist/agentic/guides/modules/gateway_tpay/index.md +5 -4
- package/dist/agentic/guides/modules/gateway_tpay/setup.md +1 -1
- package/dist/agentic/guides/modules/gateway_tpay/umes-contributions.md +1 -0
- package/dist/agentic/guides/modules/gateway_tpay/workers.md +11 -0
- package/dist/agentic/guides/modules/generators/index.md +1 -1
- package/dist/agentic/guides/modules/inbox_ops/events.md +13 -13
- package/dist/agentic/guides/modules/inbox_ops/index.md +2 -2
- package/dist/agentic/guides/modules/integrations/events.md +4 -4
- package/dist/agentic/guides/modules/integrations/exact-override-targets.md +3 -2
- package/dist/agentic/guides/modules/integrations/incoming-installed-contributions.md +11 -0
- package/dist/agentic/guides/modules/integrations/index.md +3 -2
- package/dist/agentic/guides/modules/integrations/setup.md +1 -1
- package/dist/agentic/guides/modules/messages/entities.md +2 -0
- package/dist/agentic/guides/modules/messages/events.md +9 -9
- package/dist/agentic/guides/modules/messages/index.md +1 -1
- package/dist/agentic/guides/modules/messages/umes-hosts.md +2 -0
- package/dist/agentic/guides/modules/notifications/index.md +1 -1
- package/dist/agentic/guides/modules/onboarding/index.md +1 -1
- package/dist/agentic/guides/modules/payment_gateways/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/payment_gateways/di-registrations-rich.md +4 -4
- package/dist/agentic/guides/modules/payment_gateways/di-service-tokens.md +2 -2
- package/dist/agentic/guides/modules/payment_gateways/events.md +9 -9
- package/dist/agentic/guides/modules/payment_gateways/exact-override-targets.md +5 -4
- package/dist/agentic/guides/modules/payment_gateways/index.md +1 -1
- package/dist/agentic/guides/modules/payment_gateways/setup.md +1 -1
- package/dist/agentic/guides/modules/perspectives/index.md +1 -1
- package/dist/agentic/guides/modules/phone_calls/events.md +3 -3
- package/dist/agentic/guides/modules/phone_calls/index.md +1 -1
- package/dist/agentic/guides/modules/planner/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/planner/events.md +6 -6
- package/dist/agentic/guides/modules/planner/exact-override-targets.md +3 -3
- package/dist/agentic/guides/modules/planner/index.md +1 -1
- package/dist/agentic/guides/modules/planner/setup.md +1 -1
- package/dist/agentic/guides/modules/portal/exact-override-targets.md +1 -0
- package/dist/agentic/guides/modules/portal/frontend-pages.md +1 -0
- package/dist/agentic/guides/modules/portal/index.md +1 -1
- package/dist/agentic/guides/modules/progress/events.md +6 -6
- package/dist/agentic/guides/modules/progress/index.md +2 -2
- package/dist/agentic/guides/modules/promotions/acl-features.md +18 -0
- package/dist/agentic/guides/modules/promotions/active-extension-bindings.md +12 -0
- package/dist/agentic/guides/modules/promotions/backend-pages.md +16 -0
- package/dist/agentic/guides/modules/promotions/contribution-resolutions.md +18 -0
- package/dist/agentic/guides/modules/promotions/di-registrations-rich.md +15 -0
- package/dist/agentic/guides/modules/promotions/di-service-tokens.md +15 -0
- package/dist/agentic/guides/modules/promotions/domain-commands.md +23 -0
- package/dist/agentic/guides/modules/promotions/entities.md +19 -0
- package/dist/agentic/guides/modules/promotions/events.md +24 -0
- package/dist/agentic/guides/modules/promotions/exact-override-targets.md +41 -0
- package/dist/agentic/guides/modules/promotions/index.md +26 -0
- package/dist/agentic/guides/modules/promotions/owned-contract-module-metadata.md +11 -0
- package/dist/agentic/guides/modules/promotions/setup.md +11 -0
- package/dist/agentic/guides/modules/promotions/umes-contributions.md +18 -0
- package/dist/agentic/guides/modules/promotions/umes-hosts.md +33 -0
- package/dist/agentic/guides/modules/promotions/workers.md +12 -0
- package/dist/agentic/guides/modules/push_notifications/active-extension-bindings.md +11 -0
- package/dist/agentic/guides/modules/push_notifications/events.md +2 -2
- package/dist/agentic/guides/modules/push_notifications/index.md +3 -2
- package/dist/agentic/guides/modules/query_index/events.md +8 -8
- package/dist/agentic/guides/modules/query_index/index.md +1 -1
- package/dist/agentic/guides/modules/record_locks/events.md +10 -10
- package/dist/agentic/guides/modules/record_locks/index.md +1 -1
- package/dist/agentic/guides/modules/resources/events.md +15 -15
- package/dist/agentic/guides/modules/resources/index.md +1 -1
- package/dist/agentic/guides/modules/sales/active-extension-bindings.md +5 -0
- package/dist/agentic/guides/modules/sales/di-registrations-rich.md +30 -30
- package/dist/agentic/guides/modules/sales/di-service-tokens.md +5 -5
- package/dist/agentic/guides/modules/sales/domain-commands.md +1 -0
- package/dist/agentic/guides/modules/sales/events.md +44 -44
- package/dist/agentic/guides/modules/sales/exact-override-targets.md +30 -30
- package/dist/agentic/guides/modules/sales/incoming-installed-contributions.md +3 -1
- package/dist/agentic/guides/modules/sales/index.md +4 -4
- package/dist/agentic/guides/modules/sales/umes-hosts.md +5 -2
- package/dist/agentic/guides/modules/scheduler/events.md +4 -4
- package/dist/agentic/guides/modules/scheduler/index.md +1 -1
- package/dist/agentic/guides/modules/search/events.md +1 -1
- package/dist/agentic/guides/modules/search/exact-override-targets.md +1 -1
- package/dist/agentic/guides/modules/search/index.md +1 -1
- package/dist/agentic/guides/modules/search/workers.md +1 -1
- package/dist/agentic/guides/modules/security/contribution-resolutions.md +2 -0
- package/dist/agentic/guides/modules/security/events.md +22 -21
- package/dist/agentic/guides/modules/security/exact-override-targets.md +2 -0
- package/dist/agentic/guides/modules/security/index.md +2 -2
- package/dist/agentic/guides/modules/security/notifications.md +1 -0
- package/dist/agentic/guides/modules/security/umes-contributions.md +2 -0
- package/dist/agentic/guides/modules/security/umes-hosts.md +1 -0
- package/dist/agentic/guides/modules/seeds/index.md +1 -1
- package/dist/agentic/guides/modules/shipping_carriers/contribution-resolutions.md +1 -1
- package/dist/agentic/guides/modules/shipping_carriers/events.md +7 -7
- package/dist/agentic/guides/modules/shipping_carriers/index.md +1 -1
- package/dist/agentic/guides/modules/shipping_carriers/umes-contributions.md +1 -1
- package/dist/agentic/guides/modules/sso/di-registrations-rich.md +8 -7
- package/dist/agentic/guides/modules/sso/di-service-tokens.md +7 -6
- package/dist/agentic/guides/modules/sso/events.md +12 -12
- package/dist/agentic/guides/modules/sso/exact-override-targets.md +8 -7
- package/dist/agentic/guides/modules/sso/index.md +1 -1
- package/dist/agentic/guides/modules/staff/active-extension-bindings.md +5 -3
- package/dist/agentic/guides/modules/staff/backend-pages.md +1 -0
- package/dist/agentic/guides/modules/staff/cli-commands.md +1 -0
- package/dist/agentic/guides/modules/staff/contribution-resolutions.md +23 -0
- package/dist/agentic/guides/modules/staff/di-registrations-rich.md +8 -8
- package/dist/agentic/guides/modules/staff/domain-commands.md +2 -0
- package/dist/agentic/guides/modules/staff/encryption.md +1 -0
- package/dist/agentic/guides/modules/staff/entities.md +3 -0
- package/dist/agentic/guides/modules/staff/events.md +75 -70
- package/dist/agentic/guides/modules/staff/exact-override-targets.md +99 -12
- package/dist/agentic/guides/modules/staff/frontend-pages.md +3 -0
- package/dist/agentic/guides/modules/staff/index.md +26 -13
- package/dist/agentic/guides/modules/staff/notifications.md +4 -0
- package/dist/agentic/guides/modules/staff/owned-contract-module-metadata.md +1 -1
- package/dist/agentic/guides/modules/staff/setup.md +1 -1
- package/dist/agentic/guides/modules/staff/umes-contributions.md +24 -1
- package/dist/agentic/guides/modules/staff/umes-hosts.md +9 -0
- package/dist/agentic/guides/modules/storage_s3/di-registrations-rich.md +3 -3
- package/dist/agentic/guides/modules/storage_s3/di-service-tokens.md +1 -1
- package/dist/agentic/guides/modules/storage_s3/exact-override-targets.md +3 -3
- package/dist/agentic/guides/modules/storage_s3/index.md +1 -1
- package/dist/agentic/guides/modules/sync_akeneo/index.md +1 -1
- package/dist/agentic/guides/modules/sync_excel/index.md +1 -1
- package/dist/agentic/guides/modules/sync_excel/owned-contract-module-metadata.md +1 -1
- package/dist/agentic/guides/modules/system_status_overlays/index.md +1 -1
- package/dist/agentic/guides/modules/telemetry/index.md +1 -1
- package/dist/agentic/guides/modules/tillio/index.md +1 -1
- package/dist/agentic/guides/modules/translations/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/translations/events.md +2 -2
- package/dist/agentic/guides/modules/translations/index.md +1 -1
- package/dist/agentic/guides/modules/warranty_claims/contribution-resolutions.md +2 -2
- package/dist/agentic/guides/modules/warranty_claims/events.md +14 -14
- package/dist/agentic/guides/modules/warranty_claims/exact-override-targets.md +5 -4
- package/dist/agentic/guides/modules/warranty_claims/index.md +2 -2
- package/dist/agentic/guides/modules/warranty_claims/setup.md +1 -1
- package/dist/agentic/guides/modules/warranty_claims/umes-contributions.md +2 -2
- package/dist/agentic/guides/modules/warranty_claims/workers.md +1 -1
- package/dist/agentic/guides/modules/webhooks/events.md +12 -12
- package/dist/agentic/guides/modules/webhooks/index.md +1 -1
- package/dist/agentic/guides/modules/wms/acl-features.md +3 -1
- package/dist/agentic/guides/modules/wms/backend-pages.md +4 -0
- package/dist/agentic/guides/modules/wms/contribution-resolutions.md +7 -1
- package/dist/agentic/guides/modules/wms/custom-entities.md +3 -0
- package/dist/agentic/guides/modules/wms/domain-commands.md +16 -0
- package/dist/agentic/guides/modules/wms/entities.md +3 -0
- package/dist/agentic/guides/modules/wms/events.md +40 -29
- package/dist/agentic/guides/modules/wms/exact-override-targets.md +10 -0
- package/dist/agentic/guides/modules/wms/host-extension-points.md +1 -1
- package/dist/agentic/guides/modules/wms/index.md +14 -10
- package/dist/agentic/guides/modules/wms/owned-contract-module-metadata.md +1 -1
- package/dist/agentic/guides/modules/wms/search-entities.md +2 -0
- package/dist/agentic/guides/modules/wms/umes-contributions.md +7 -1
- package/dist/agentic/guides/modules/wms/umes-diagnostics.md +2 -0
- package/dist/agentic/guides/modules/wms/umes-hosts.md +53 -0
- package/dist/agentic/guides/modules/workflows/contribution-resolutions.md +3 -3
- package/dist/agentic/guides/modules/workflows/events.md +32 -32
- package/dist/agentic/guides/modules/workflows/exact-override-targets.md +2 -1
- package/dist/agentic/guides/modules/workflows/index.md +1 -1
- package/dist/agentic/guides/modules/workflows/setup.md +1 -1
- package/dist/agentic/guides/modules/workflows/umes-contributions.md +3 -3
- package/dist/agentic/guides/production-deployment.md +82 -0
- package/dist/agentic/guides/reference-module-facts.json +384 -16
- package/dist/agentic/guides/reference-modules/example/contribution-resolutions.md +6 -0
- package/dist/agentic/guides/reference-modules/example/di-registrations-rich.md +3 -3
- package/dist/agentic/guides/reference-modules/example/di-service-tokens.md +1 -1
- package/dist/agentic/guides/reference-modules/example/events.md +5 -5
- package/dist/agentic/guides/reference-modules/example/exact-override-targets.md +12 -8
- package/dist/agentic/guides/reference-modules/example/index.md +4 -4
- package/dist/agentic/guides/reference-modules/example/setup.md +1 -1
- package/dist/agentic/guides/reference-modules/example/umes-contributions.md +6 -0
- package/dist/agentic/guides/template-tool.md +38 -0
- package/dist/agentic/guides/testing-debugging.md +2 -2
- package/dist/agentic/guides/upstream/AGENTS.md +3 -3
- package/dist/agentic/guides/upstream/BACKWARD_COMPATIBILITY.md +321 -230
- package/dist/agentic/guides/upstream/manifest.json +3 -3
- package/dist/agentic/shared/AGENTS.md.template +16 -11
- package/dist/agentic/shared/ai/harness/README.md +6 -2
- package/dist/agentic/shared/ai/harness/RELEASE.md +4 -4
- package/dist/agentic/shared/ai/harness/cases.json +282 -19
- package/dist/agentic/shared/ai/harness/cases.schema.json +4 -4
- package/dist/agentic/shared/ai/harness/source-link-inventory.json +204 -4
- package/dist/agentic/shared/ai/harness/validators.json +1 -1
- package/dist/agentic/shared/ai/qa/tests/playwright.config.ts +1 -0
- package/dist/agentic/shared/ai/skills/om-auto-upgrade-0.9.0-to-0.10.0/SKILL.md +269 -0
- package/dist/agentic/shared/ai/skills/om-create-ai-agent/SKILL.md +6 -5
- package/dist/agentic/shared/ai/skills/om-create-ai-agent/references/surface-selector.md +27 -0
- package/dist/agentic/shared/ai/skills/om-data-model-design/references/integrity-and-concurrency.md +1 -1
- package/dist/agentic/shared/ai/skills/om-data-model-design/references/sensitive-data.md +13 -1
- package/dist/agentic/shared/ai/skills/om-find-module/SKILL.md +52 -0
- package/dist/agentic/shared/ai/skills/om-help/references/task-families.md +1 -0
- package/dist/agentic/shared/ai/skills/om-implement-spec/SKILL.md +1 -0
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/api-and-domain.md +7 -5
- package/dist/agentic/shared/ai/skills/om-setup-ci/SKILL.md +42 -0
- package/dist/agentic/shared/ai/skills/om-setup-ci/scripts/setup-ci.mjs +525 -0
- package/dist/agentic/shared/ai/skills/om-setup-ci/scripts/verify-semgrep-rules.mjs +54 -0
- package/dist/agentic/shared/ai/skills/om-setup-ci/templates/docs/README.md +463 -0
- package/dist/agentic/shared/ai/skills/om-setup-ci/templates/github/actions/gitleaks/action.yml +25 -0
- package/dist/agentic/shared/ai/skills/om-setup-ci/templates/github/actions/playwright/action.yml +31 -0
- package/dist/agentic/shared/ai/skills/om-setup-ci/templates/github/actions/setup/action.yml +55 -0
- package/dist/agentic/shared/ai/skills/om-setup-ci/templates/github/dependabot.yml +27 -0
- package/dist/agentic/shared/ai/skills/om-setup-ci/templates/github/workflows/audit.yml +193 -0
- package/dist/agentic/shared/ai/skills/om-setup-ci/templates/github/workflows/ci.yml +477 -0
- package/dist/agentic/shared/ai/skills/om-setup-ci/templates/github/workflows/codeql.yml +63 -0
- package/dist/agentic/shared/ai/skills/om-setup-ci/templates/github/workflows/security.yml +254 -0
- package/dist/agentic/shared/ai/skills/om-setup-ci/templates/scripts/ci/audit-ci-allowlist.json +4 -0
- package/dist/agentic/shared/ai/skills/om-setup-ci/templates/scripts/ci/audit-ci.mjs +283 -0
- package/dist/agentic/shared/ai/skills/om-setup-ci/templates/scripts/ci/semgrep/open-mercato.fixture.txt +89 -0
- package/dist/agentic/shared/ai/skills/om-setup-ci/templates/scripts/ci/semgrep/open-mercato.yml +146 -0
- package/dist/agentic/shared/ai/skills/om-setup-ci/templates/scripts/ci/time-bomb-scanner.mjs +286 -0
- package/dist/agentic/shared/ai/skills/om-setup-ci/templates/scripts/ci/zap-rules.tsv +11 -0
- package/dist/agentic/shared/ai/skills/om-system-extension/references/unified-overrides.md +1 -1
- package/dist/agentic/shared/ai/skills/tiers.json +5 -2
- package/dist/agentic/shared/ai/trackers/github.md +314 -44
- package/dist/agentic/shared/scripts/execution-sandbox.mjs +1 -0
- package/dist/agentic/shared/scripts/run-agent-harness-release.mjs +3 -3
- package/dist/i18n/de.json +4 -0
- package/dist/i18n/en.json +4 -0
- package/dist/i18n/es.json +4 -0
- package/dist/i18n/ko.json +4 -0
- package/dist/i18n/pl.json +4 -0
- package/dist/lib/__fixtures__/module-search/built-in.json +235 -0
- package/dist/lib/__fixtures__/module-search/catalog-parity.json +4076 -0
- package/dist/lib/__fixtures__/module-search/modules-index.json +1980 -0
- package/dist/lib/__fixtures__/official-module-package/package.json +33 -0
- package/dist/lib/__integration__/TC-INT-007.spec.js +241 -21
- package/dist/lib/__integration__/TC-INT-007.spec.js.map +2 -2
- package/dist/lib/__integration__/TC-INT-009.spec.js +267 -0
- package/dist/lib/__integration__/TC-INT-009.spec.js.map +7 -0
- package/dist/lib/db/commands.js +2 -0
- package/dist/lib/db/commands.js.map +2 -2
- package/dist/lib/db/numeric-snapshots.js +13 -0
- package/dist/lib/db/numeric-snapshots.js.map +7 -0
- package/dist/lib/eject.js +25 -9
- package/dist/lib/eject.js.map +2 -2
- package/dist/lib/env-example.js +25 -0
- package/dist/lib/env-example.js.map +7 -0
- package/dist/lib/generate-child-process.js +23 -0
- package/dist/lib/generate-child-process.js.map +7 -0
- package/dist/lib/generators/ast/imports.js +9 -4
- package/dist/lib/generators/ast/imports.js.map +2 -2
- package/dist/lib/generators/entity-ids.js +12 -12
- package/dist/lib/generators/entity-ids.js.map +2 -2
- package/dist/lib/generators/extensions/agent-files.js +119 -4
- package/dist/lib/generators/extensions/agent-files.js.map +2 -2
- package/dist/lib/generators/module-di.js +8 -9
- package/dist/lib/generators/module-di.js.map +2 -2
- package/dist/lib/generators/module-entities.js +8 -9
- package/dist/lib/generators/module-entities.js.map +2 -2
- package/dist/lib/generators/module-facts.js +7 -5
- package/dist/lib/generators/module-facts.js.map +2 -2
- package/dist/lib/generators/module-override-targets.js +6 -1
- package/dist/lib/generators/module-override-targets.js.map +2 -2
- package/dist/lib/generators/module-package-sources.js +6 -4
- package/dist/lib/generators/module-package-sources.js.map +2 -2
- package/dist/lib/generators/module-registry.js +157 -144
- package/dist/lib/generators/module-registry.js.map +2 -2
- package/dist/lib/generators/openapi.js +9 -2
- package/dist/lib/generators/openapi.js.map +2 -2
- package/dist/lib/generators/source-exports.js +73 -0
- package/dist/lib/generators/source-exports.js.map +7 -0
- package/dist/lib/in-process-generate-watcher.js +11 -5
- package/dist/lib/in-process-generate-watcher.js.map +2 -2
- package/dist/lib/init-existing-database.js +26 -0
- package/dist/lib/init-existing-database.js.map +7 -0
- package/dist/lib/init-secrets.js +33 -1
- package/dist/lib/init-secrets.js.map +2 -2
- package/dist/lib/init-summary.js +44 -0
- package/dist/lib/init-summary.js.map +7 -0
- package/dist/lib/module-github.js +98 -0
- package/dist/lib/module-github.js.map +7 -0
- package/dist/lib/module-identity.js +131 -0
- package/dist/lib/module-identity.js.map +7 -0
- package/dist/lib/module-inspection.js +124 -0
- package/dist/lib/module-inspection.js.map +7 -0
- package/dist/lib/module-install.js +186 -19
- package/dist/lib/module-install.js.map +3 -3
- package/dist/lib/module-package.js +205 -15
- package/dist/lib/module-package.js.map +2 -2
- package/dist/lib/module-search-args.js +97 -0
- package/dist/lib/module-search-args.js.map +7 -0
- package/dist/lib/module-search-index.js +681 -0
- package/dist/lib/module-search-index.js.map +7 -0
- package/dist/lib/module-search.js +727 -0
- package/dist/lib/module-search.js.map +7 -0
- package/dist/lib/modules-config.js +210 -66
- package/dist/lib/modules-config.js.map +2 -2
- package/dist/lib/queue-worker-supervisor.js +3 -0
- package/dist/lib/queue-worker-supervisor.js.map +2 -2
- package/dist/lib/resolver.js +54 -35
- package/dist/lib/resolver.js.map +2 -2
- package/dist/lib/telemetry-init.js +1 -1
- package/dist/lib/telemetry-init.js.map +1 -1
- package/dist/lib/testing/integration-discovery.js +61 -21
- package/dist/lib/testing/integration-discovery.js.map +2 -2
- package/dist/lib/testing/integration.js +33 -4
- package/dist/lib/testing/integration.js.map +2 -2
- package/dist/mercato.js +126 -66
- package/dist/mercato.js.map +2 -2
- package/jest.config.cjs +1 -1
- package/package.json +9 -9
- package/src/__tests__/documented-queue-subcommands.test.ts +63 -0
- package/src/__tests__/mercato.test.ts +429 -4
- package/src/i18n/de.json +4 -0
- package/src/i18n/en.json +4 -0
- package/src/i18n/es.json +4 -0
- package/src/i18n/ko.json +4 -0
- package/src/i18n/pl.json +4 -0
- package/src/lib/__fixtures__/module-search/README.md +97 -0
- package/src/lib/__fixtures__/module-search/built-in.json +235 -0
- package/src/lib/__fixtures__/module-search/catalog-parity.json +4076 -0
- package/src/lib/__fixtures__/module-search/modules-index.json +1980 -0
- package/src/lib/__fixtures__/official-module-package/dist/modules/test_package/widgets/injection/test/widget.js +1 -0
- package/src/lib/__integration__/TC-INT-007.spec.ts +259 -21
- package/src/lib/__integration__/TC-INT-009.spec.ts +279 -0
- package/src/lib/__tests__/agentic-setup.ownership.test.ts +4 -0
- package/src/lib/__tests__/eject.test.ts +98 -4
- package/src/lib/__tests__/env-example.test.ts +58 -0
- package/src/lib/__tests__/generate-child-process.test.ts +185 -0
- package/src/lib/__tests__/generate-quiet-entrypoint.test.ts +47 -0
- package/src/lib/__tests__/in-process-generate-watcher.test.ts +91 -0
- package/src/lib/__tests__/init-existing-database.test.ts +27 -0
- package/src/lib/__tests__/init-secrets.test.ts +85 -1
- package/src/lib/__tests__/init-summary.test.ts +50 -0
- package/src/lib/__tests__/module-github.test.ts +108 -0
- package/src/lib/__tests__/module-identity.test.ts +144 -0
- package/src/lib/__tests__/module-inspection.test.ts +195 -0
- package/src/lib/__tests__/module-install.test.ts +614 -19
- package/src/lib/__tests__/module-package.test.ts +154 -0
- package/src/lib/__tests__/module-search.test.ts +1040 -0
- package/src/lib/__tests__/modules-config.test.ts +453 -1
- package/src/lib/__tests__/queue-worker-supervisor.test.ts +145 -1
- package/src/lib/__tests__/resolver.enterprise.test.ts +60 -0
- package/src/lib/__tests__/resolver.packages.test.ts +29 -0
- package/src/lib/__tests__/telemetry-init.test.ts +1 -1
- package/src/lib/db/__tests__/identifiers.test.ts +19 -0
- package/src/lib/db/__tests__/numeric-snapshots.test.ts +79 -0
- package/src/lib/db/commands.ts +2 -0
- package/src/lib/db/numeric-snapshots.ts +12 -0
- package/src/lib/eject.ts +28 -10
- package/src/lib/env-example.ts +31 -0
- package/src/lib/generate-child-process.ts +35 -0
- package/src/lib/generators/__tests__/agent-files-extension.test.ts +178 -0
- package/src/lib/generators/__tests__/attachment-access.test.ts +70 -0
- package/src/lib/generators/__tests__/module-extension-activations.test.ts +42 -18
- package/src/lib/generators/__tests__/module-facts.bc-guard.test.ts +9 -8
- package/src/lib/generators/__tests__/module-facts.owned-contracts.test.ts +5 -1
- package/src/lib/generators/__tests__/module-id-collisions.test.ts +146 -0
- package/src/lib/generators/__tests__/module-override-targets.test.ts +8 -2
- package/src/lib/generators/__tests__/module-package-sources.test.ts +26 -6
- package/src/lib/generators/__tests__/module-registry-requires-enforcement.test.ts +130 -0
- package/src/lib/generators/__tests__/module-requirements.test.ts +56 -0
- package/src/lib/generators/__tests__/module-requires.test.ts +242 -0
- package/src/lib/generators/__tests__/module-subset.test.ts +103 -0
- package/src/lib/generators/__tests__/openapi.test.ts +24 -0
- package/src/lib/generators/ast/imports.ts +14 -4
- package/src/lib/generators/entity-ids.ts +12 -12
- package/src/lib/generators/extensions/agent-files.ts +154 -4
- package/src/lib/generators/module-di.ts +8 -9
- package/src/lib/generators/module-entities.ts +8 -9
- package/src/lib/generators/module-facts.ts +9 -5
- package/src/lib/generators/module-override-targets.ts +6 -1
- package/src/lib/generators/module-package-sources.ts +7 -5
- package/src/lib/generators/module-registry.ts +224 -182
- package/src/lib/generators/openapi.ts +10 -2
- package/src/lib/generators/source-exports.ts +93 -0
- package/src/lib/in-process-generate-watcher.ts +14 -6
- package/src/lib/init-existing-database.ts +24 -0
- package/src/lib/init-secrets.ts +37 -0
- package/src/lib/init-summary.ts +54 -0
- package/src/lib/module-github.ts +109 -0
- package/src/lib/module-identity.ts +145 -0
- package/src/lib/module-inspection.ts +133 -0
- package/src/lib/module-install.ts +214 -22
- package/src/lib/module-package.ts +243 -16
- package/src/lib/module-search-args.ts +116 -0
- package/src/lib/module-search-index.ts +1037 -0
- package/src/lib/module-search.ts +1013 -0
- package/src/lib/modules-config.ts +278 -80
- package/src/lib/queue-worker-supervisor.ts +3 -0
- package/src/lib/resolver.ts +58 -40
- package/src/lib/telemetry-init.ts +1 -1
- package/src/lib/testing/__tests__/integration-discovery.test.ts +89 -0
- package/src/lib/testing/__tests__/integration.test.ts +55 -0
- package/src/lib/testing/integration-discovery.ts +101 -32
- package/src/lib/testing/integration.ts +34 -4
- package/src/mercato.ts +167 -84
- package/src/types/cross-spawn.d.ts +2 -2
- package/src/lib/__tests__/agentic-build-artifacts.test.ts +0 -28
|
@@ -6,66 +6,84 @@ At runtime: `om-setup-agent-pipeline` copies this file into the repository at `.
|
|
|
6
6
|
|
|
7
7
|
## Prerequisites
|
|
8
8
|
|
|
9
|
-
- `gh` CLI installed and authenticated. Verify with the **auth-check** operation before a batch run; fail fast when unauthenticated.
|
|
9
|
+
- `gh` CLI installed and authenticated; `jq` is required for JSON operations. Verify with the **auth-check** operation before a batch run; fail fast when unauthenticated.
|
|
10
10
|
- All operations accept an optional `{repo}` (`owner/name`); when omitted, `gh` infers it from the current checkout's git remote. Pass `--repo {owner}/{repo}` explicitly whenever a skill operates on a repository other than the current one.
|
|
11
11
|
|
|
12
|
+
Older GitHub CLI clients can fail mutation commands when GraphQL requests retired
|
|
13
|
+
Projects (classic) fields. Use the REST examples below for automated writes;
|
|
14
|
+
upgrade `gh` if reads also fail. Do not request `projectCards` in JSON field lists.
|
|
15
|
+
|
|
12
16
|
## Conventions
|
|
13
17
|
|
|
14
18
|
- Issue and PR identifiers are numbers; in text they are written `#123`.
|
|
15
19
|
- A PR is linked to the issue it resolves with `Fixes #{issueId}` (or `Closes #{issueId}`) in the PR body; GitHub then closes the issue on merge. To reference without auto-closing, use a plain issue link.
|
|
16
20
|
- PRs open as **drafts** when a skill says so; a human (or **mark-pr-ready**) promotes them.
|
|
17
|
-
-
|
|
21
|
+
- GitHub claim ownership uses the create-only `refs/om-locks/{kind}-{number}` ref through **get-lock**, **acquire-lock**, and exact-SHA **release-lock**. Acquire first, retain run/comment ids and lock SHA, then assign when supported and verify guarded `in-progress`. For confirmed unassignable bot accounts, retain the atomic lock, timestamped claim comment and verified label without self-assignment. Foreign assignees and live or uncertain claims remain blockers. The `ci-monitoring` label is **not** a claim/lock signal: it marks a PR whose work is finished and already reported while an agent watches CI, so a PR carrying `ci-monitoring` without any of the three signals above MUST be treated as unclaimed and is free to claim.
|
|
18
22
|
- Long, multi-line comment bodies are posted with `--body-file` (or a heredoc via process substitution) so formatting is preserved.
|
|
19
23
|
- CI status truth comes from **get-pr-checks**; the set of *required* checks comes from **get-required-checks** (branch protection). When branch protection is not readable (404), treat every reported check as required.
|
|
20
24
|
|
|
25
|
+
Before declaring CI green, inspect both **get-pr-checks** and **list-runs** for the
|
|
26
|
+
exact head SHA. A workflow can be queued before any check jobs appear. An unfinished
|
|
27
|
+
workflow is pending even if the currently visible checks passed; missing or unreadable
|
|
28
|
+
required evidence is not a successful check.
|
|
29
|
+
|
|
21
30
|
## Label guards
|
|
22
31
|
|
|
23
32
|
Every label mutation goes through an existence guard so a missing label degrades to a logged skip instead of a failure, and `labels.enabled: false` in the config skips label operations entirely.
|
|
24
33
|
|
|
25
34
|
```bash
|
|
35
|
+
tracker_repo() {
|
|
36
|
+
if [ -n "${REPO:-}" ]; then
|
|
37
|
+
printf '%s\n' "$REPO"
|
|
38
|
+
else
|
|
39
|
+
gh repo view --json nameWithOwner --jq .nameWithOwner
|
|
40
|
+
fi
|
|
41
|
+
}
|
|
42
|
+
|
|
26
43
|
label_exists() {
|
|
27
|
-
gh
|
|
44
|
+
tracker_labels=$(gh api --paginate "repos/$(tracker_repo)/labels" --jq '.[].name') || return 1
|
|
45
|
+
printf '%s\n' "$tracker_labels" | grep -Fxq -- "$1"
|
|
28
46
|
}
|
|
29
47
|
|
|
30
|
-
# PR labels
|
|
31
48
|
apply_label() {
|
|
32
|
-
|
|
49
|
+
[ "$LABELS_ENABLED" = true ] || return 0
|
|
33
50
|
if label_exists "$1"; then
|
|
34
|
-
gh
|
|
51
|
+
gh api --method POST "repos/$(tracker_repo)/issues/$2/labels" -f "labels[]=$1" >/dev/null
|
|
35
52
|
else
|
|
36
|
-
|
|
53
|
+
printf "Skipping undefined or unreadable label: %s\n" "$1" >&2
|
|
37
54
|
fi
|
|
38
55
|
}
|
|
39
56
|
|
|
40
|
-
|
|
41
|
-
apply_issue_label() {
|
|
42
|
-
if [ "$LABELS_ENABLED" != "true" ]; then return 0; fi
|
|
43
|
-
if label_exists "$1"; then
|
|
44
|
-
gh issue edit "$2" --add-label "$1"
|
|
45
|
-
else
|
|
46
|
-
echo "Skipping label '$1' (not defined in this repo). Create it with: gh label create '$1'"
|
|
47
|
-
fi
|
|
48
|
-
}
|
|
57
|
+
apply_issue_label() { apply_label "$1" "$2"; }
|
|
49
58
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
remove_label() {
|
|
60
|
+
[ "$LABELS_ENABLED" = true ] || return 0
|
|
61
|
+
tracker_label_path=$(printf '%s' "$1" | jq -sRr @uri) || return 1
|
|
62
|
+
tracker_remove_result=$(gh api --method DELETE "repos/$(tracker_repo)/issues/$2/labels/$tracker_label_path" 2>&1) && return 0
|
|
63
|
+
case "$tracker_remove_result" in
|
|
64
|
+
*"(HTTP 404)"*) return 0 ;;
|
|
65
|
+
*) printf '%s\n' "$tracker_remove_result" >&2; return 1 ;;
|
|
66
|
+
esac
|
|
55
67
|
}
|
|
56
68
|
|
|
57
|
-
|
|
69
|
+
remove_issue_label() { remove_label "$1" "$2"; }
|
|
70
|
+
|
|
58
71
|
set_pipeline_label() {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
72
|
+
[ "$LABELS_ENABLED" = true ] || return 0
|
|
73
|
+
label_exists "$2" || return 1
|
|
74
|
+
printf '%s\n' "$PIPELINE_LABELS" | tr ' ' '\n' | while IFS= read -r tracker_label; do
|
|
75
|
+
[ -n "$tracker_label" ] || continue
|
|
76
|
+
[ "$tracker_label" = "$2" ] || remove_label "$tracker_label" "$1" || exit 1
|
|
77
|
+
done || return 1
|
|
64
78
|
apply_label "$2" "$1"
|
|
65
79
|
}
|
|
66
80
|
```
|
|
67
81
|
|
|
68
|
-
|
|
82
|
+
Set `REPO=owner/name` for another repository: existence checks and writes resolve
|
|
83
|
+
the same target. Pipeline splitting also works in shells that do not implicitly
|
|
84
|
+
split variable expansions. Read labels back before using them as gate evidence;
|
|
85
|
+
a skipped mutation never proves a label was applied. Removal ignores only a
|
|
86
|
+
missing label (404); permission and transport failures stop the transition.
|
|
69
87
|
|
|
70
88
|
## Operations
|
|
71
89
|
|
|
@@ -213,13 +231,13 @@ gh issue comment {issueId} --repo {owner}/{repo} --body "<body>"
|
|
|
213
231
|
#### update-issue
|
|
214
232
|
`{issueId}`, new title and/or body (use a body-file for multi-line bodies). Edits the issue's own fields; does not touch labels or assignees (those have their own operations).
|
|
215
233
|
```bash
|
|
216
|
-
gh
|
|
234
|
+
gh api --method PATCH repos/{owner}/{repo}/issues/{issueId} -f title="<title>" -F body=@<file>
|
|
217
235
|
```
|
|
218
236
|
|
|
219
237
|
#### assign-issue / unassign-issue
|
|
220
238
|
```bash
|
|
221
|
-
gh
|
|
222
|
-
gh
|
|
239
|
+
gh api --method POST repos/{owner}/{repo}/issues/{issueId}/assignees -f "assignees[]=<login>"
|
|
240
|
+
gh api --method DELETE repos/{owner}/{repo}/issues/{issueId}/assignees -f "assignees[]=<login>"
|
|
223
241
|
```
|
|
224
242
|
|
|
225
243
|
#### label-issue / unlabel-issue
|
|
@@ -234,7 +252,7 @@ gh api repos/{owner}/{repo}/issues/comments/{commentId} --jq '{body,user:.user.l
|
|
|
234
252
|
#### list-issue-comments
|
|
235
253
|
`{issueId or prNumber}` → conversation comments (PR conversation comments are issue comments on GitHub).
|
|
236
254
|
```bash
|
|
237
|
-
gh api repos/{owner}/{repo}/issues/{number}/comments --jq '.[] | {id,user:.user.login,body}'
|
|
255
|
+
gh api --paginate repos/{owner}/{repo}/issues/{number}/comments --jq '.[] | {id,user:.user.login,body,createdAt:.created_at,updatedAt:.updated_at}'
|
|
238
256
|
```
|
|
239
257
|
|
|
240
258
|
#### update-comment
|
|
@@ -243,6 +261,219 @@ gh api repos/{owner}/{repo}/issues/{number}/comments --jq '.[] | {id,user:.user.
|
|
|
243
261
|
gh api -X PATCH repos/{owner}/{repo}/issues/comments/{commentId} -F body=@<path>
|
|
244
262
|
```
|
|
245
263
|
|
|
264
|
+
```bash
|
|
265
|
+
tracker_repo() {
|
|
266
|
+
if [ -n "${REPO:-}" ]; then printf '%s\n' "$REPO";
|
|
267
|
+
else gh repo view --json nameWithOwner --jq .nameWithOwner; fi
|
|
268
|
+
}
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
#### get-lock
|
|
272
|
+
|
|
273
|
+
`{kind}` (`issue` or `pr`), `{item}` → `null` for an absent exact lock, or
|
|
274
|
+
`{ref,sha,repo,kind,item,runId,actor,createdAt}`. The authoritative GitHub lock is
|
|
275
|
+
`refs/om-locks/{kind}-{item}`. Its SHA points to an otherwise empty metadata
|
|
276
|
+
commit using the configured base's existing tree, with no branch/history edits.
|
|
277
|
+
The commit message binds the unique run id and actor; a base SHA alone cannot
|
|
278
|
+
identify two runs sharing a bot login. `createdAt` comes from the server commit
|
|
279
|
+
metadata, not a comment timestamp. Unknown/malformed refs and failed reads block.
|
|
280
|
+
Load these helpers before **acquire-lock** or **release-lock**:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
gh_lock_target() {
|
|
284
|
+
case "$1" in issue|pr) ;; *) return 1 ;; esac
|
|
285
|
+
case "$2" in ''|*[!0-9]*) return 1 ;; esac
|
|
286
|
+
LOCK_REPO=$(tracker_repo) || return 1
|
|
287
|
+
LOCK_REF="refs/om-locks/$1-$2"
|
|
288
|
+
}
|
|
289
|
+
gh_get_lock() {
|
|
290
|
+
gh_lock_target "$1" "$2" || return 1
|
|
291
|
+
lock_refs=$(gh api "repos/$LOCK_REPO/git/matching-refs/om-locks/$1-$2") || return 1
|
|
292
|
+
lock_entry=$(printf '%s' "$lock_refs" | jq -c --arg ref "$LOCK_REF" '
|
|
293
|
+
if type != "array" then error("Invalid ref list") else
|
|
294
|
+
[.[] | select(.ref == $ref)] | if length == 0 then null
|
|
295
|
+
elif length == 1 and .[0].object.type == "commit" then .[0]
|
|
296
|
+
else error("Ambiguous lock ref") end end') || return 1
|
|
297
|
+
if [ "$lock_entry" = "null" ]; then printf 'null\n'; return 0; fi
|
|
298
|
+
lock_sha=$(printf '%s' "$lock_entry" | jq -er '.object.sha | select(test("^[0-9a-f]{40}$"))') || return 1
|
|
299
|
+
lock_commit=$(gh api "repos/$LOCK_REPO/git/commits/$lock_sha") || return 1
|
|
300
|
+
printf '%s' "$lock_commit" | jq -ce --arg repo "$LOCK_REPO" --arg kind "$1" --arg item "$2" --arg ref "$LOCK_REF" --arg sha "$lock_sha" '
|
|
301
|
+
.committer.date as $created |
|
|
302
|
+
.message | select(startswith("om-claim-v1\n")) | ltrimstr("om-claim-v1\n") | fromjson |
|
|
303
|
+
select(.repo == $repo and .kind == $kind and .item == $item and
|
|
304
|
+
(.runId | type == "string" and length > 0) and
|
|
305
|
+
(.actor | type == "string" and length > 0) and ($created | type == "string")) |
|
|
306
|
+
. + {ref:$ref,sha:$sha,createdAt:$created}'
|
|
307
|
+
}
|
|
308
|
+
gh_get_lock "{kind}" "{number}"
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
#### acquire-lock
|
|
312
|
+
|
|
313
|
+
`{kind}`, `{item}`, unique run id, authenticated actor, resolved base SHA →
|
|
314
|
+
`{status: acquired|owned|conflict, lock: <get-lock result>}`. On GitHub this is
|
|
315
|
+
mandatory, including for unassignable bots and PRs in split-provider setups.
|
|
316
|
+
Requires contents-write and authenticated Git transport for eventual release.
|
|
317
|
+
Never switch to comments on 403/422/transport errors: an existing ref is a
|
|
318
|
+
conflict only after an exact successful read proves its owner. Reconcile an
|
|
319
|
+
uncertain POST through **get-lock** before retrying. No labels/assignment/comment
|
|
320
|
+
candidate or work is produced by a losing fresh run.
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
gh_acquire_lock() {
|
|
324
|
+
# kind, item, run id, authenticated actor, configured base SHA
|
|
325
|
+
gh_lock_target "$1" "$2" || return 1
|
|
326
|
+
case "$3" in ''|*[!A-Za-z0-9._-]*) return 1 ;; esac
|
|
327
|
+
[ -n "$4" ] || return 1
|
|
328
|
+
printf '%s' "$5" | grep -Eq '^[0-9a-f]{40}$' || return 1
|
|
329
|
+
lock_before=$(gh_get_lock "$1" "$2") || return 1
|
|
330
|
+
if [ "$lock_before" != "null" ]; then
|
|
331
|
+
printf '%s' "$lock_before" | jq --arg run "$3" --arg actor "$4" '
|
|
332
|
+
{status:(if .runId == $run and .actor == $actor then "owned" else "conflict" end),lock:.}'
|
|
333
|
+
return 0
|
|
334
|
+
fi
|
|
335
|
+
lock_tree=$(gh api "repos/$LOCK_REPO/git/commits/$5" --jq '.tree.sha') || return 1
|
|
336
|
+
lock_message=$(jq -cn --arg repo "$LOCK_REPO" --arg kind "$1" --arg item "$2" --arg run "$3" --arg actor "$4" '
|
|
337
|
+
"om-claim-v1\n" + ({repo:$repo,kind:$kind,item:$item,runId:$run,actor:$actor}|tojson)') || return 1
|
|
338
|
+
lock_created=$(jq -n --argjson message "$lock_message" --arg tree "$lock_tree" --arg parent "$5" '
|
|
339
|
+
{message:$message,tree:$tree,parents:[$parent]}' |
|
|
340
|
+
gh api -X POST "repos/$LOCK_REPO/git/commits" --input -) || return 1
|
|
341
|
+
lock_proposed=$(printf '%s' "$lock_created" | jq -er '.sha | select(test("^[0-9a-f]{40}$"))') || return 1
|
|
342
|
+
# Create-only POST is the ownership decision; never PATCH/update an existing ref.
|
|
343
|
+
if gh api -X POST "repos/$LOCK_REPO/git/refs" -f "ref=$LOCK_REF" -f "sha=$lock_proposed" >/dev/null 2>&1; then
|
|
344
|
+
lock_posted=true
|
|
345
|
+
else
|
|
346
|
+
lock_posted=false
|
|
347
|
+
fi
|
|
348
|
+
lock_after=$(gh_get_lock "$1" "$2") || return 1
|
|
349
|
+
[ "$lock_after" != "null" ] || return 1
|
|
350
|
+
printf '%s' "$lock_after" | jq --arg run "$3" --arg actor "$4" --arg sha "$lock_proposed" --arg posted "$lock_posted" '
|
|
351
|
+
{status:(if .sha == $sha and .runId == $run and .actor == $actor then "acquired"
|
|
352
|
+
elif .runId == $run and .actor == $actor then "owned"
|
|
353
|
+
elif $posted == "false" then "conflict" else error("Lock replaced after creation") end),lock:.}'
|
|
354
|
+
}
|
|
355
|
+
gh_acquire_lock "{kind}" "{number}" "$CLAIM_RUN_ID" "$CURRENT_USER" "$BASE_SHA"
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
Persist the returned lock SHA plus run id before comment/label writes; reconcile
|
|
359
|
+
the same run on resume. A metadata commit created by a losing contender may be
|
|
360
|
+
unreferenced and garbage-collected; it contains no secrets or new project content.
|
|
361
|
+
|
|
362
|
+
#### release-lock
|
|
363
|
+
|
|
364
|
+
`{kind}`, `{item}`, exact expected lock SHA, expected owner run id/actor → delete
|
|
365
|
+
only that exact ref. Normal callers pass their own verified identity; recovery
|
|
366
|
+
passes the observed previous owner only after the shared stale/force/UI recovery
|
|
367
|
+
authorization checks. Keep the lock while cleaning up owned labels and marking
|
|
368
|
+
the comment released; delete the ref last. A loser never calls this operation.
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
gh_release_lock() {
|
|
372
|
+
# kind, item, expected SHA, expected owner's run id and actor
|
|
373
|
+
gh_lock_target "$1" "$2" || return 1
|
|
374
|
+
printf '%s' "$3" | grep -Eq '^[0-9a-f]{40}$' || return 1
|
|
375
|
+
lock_current=$(gh_get_lock "$1" "$2") || return 1
|
|
376
|
+
[ "$lock_current" != "null" ] || { printf 'absent\n'; return 0; }
|
|
377
|
+
printf '%s' "$lock_current" | jq -e --arg sha "$3" --arg run "$4" --arg actor "$5" '
|
|
378
|
+
.sha == $sha and .runId == $run and .actor == $actor' >/dev/null || return 1
|
|
379
|
+
lock_url=$(gh repo view "$LOCK_REPO" --json url --jq .url) || return 1
|
|
380
|
+
# Git's explicit expected-SHA lease is atomic compare-and-delete. REST DELETE
|
|
381
|
+
# has no expected-SHA condition and can remove a successor during recovery.
|
|
382
|
+
git push --porcelain --force-with-lease="$LOCK_REF:$3" "$lock_url.git" ":$LOCK_REF" || return 1
|
|
383
|
+
lock_remaining=$(gh_get_lock "$1" "$2") || return 1
|
|
384
|
+
if [ "$lock_remaining" = "null" ]; then printf 'released\n'
|
|
385
|
+
elif printf '%s' "$lock_remaining" | jq -e --arg sha "$3" '.sha != $sha' >/dev/null; then
|
|
386
|
+
printf 'released; successor retained\n'
|
|
387
|
+
else return 1; fi
|
|
388
|
+
}
|
|
389
|
+
gh_release_lock "{kind}" "{number}" "$CLAIM_LOCK_SHA" "$CLAIM_RUN_ID" "$CURRENT_USER"
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
This narrowly scoped lease-deletion is authorized lock housekeeping, never a
|
|
393
|
+
force-push of project branches. Resolve the target repository's GitHub URL as
|
|
394
|
+
above rather than assuming `origin` is the target. Do not change credentials,
|
|
395
|
+
remove hooks or retry with an unconditional REST DELETE when Git transport fails.
|
|
396
|
+
Absent is idempotent; a changed SHA/owner blocks and preserves the successor.
|
|
397
|
+
|
|
398
|
+
#### get-claim-reset
|
|
399
|
+
|
|
400
|
+
`{kind}`, `{item}` → latest tracker-audited human `claim-reset` label application
|
|
401
|
+
as `{id,createdAt,actor}`, or `null` if none. Read every event page, including past
|
|
402
|
+
applications after label removal. Verify the event actor is a human permitted to
|
|
403
|
+
manage item labels; bot applications and comment/body text never authorize reset.
|
|
404
|
+
A failed/unsupported audit read is not `null`: stop recovery and report the gap.
|
|
405
|
+
This cutoff permanently retires claim comments created strictly before it;
|
|
406
|
+
same-second/unknown timestamps are uncertain and remain blocking. It does not
|
|
407
|
+
relax QA, merge, scheduler reservations or command/process isolation.
|
|
408
|
+
|
|
409
|
+
```bash
|
|
410
|
+
gh_get_claim_reset() {
|
|
411
|
+
case "$1" in ''|*[!0-9]*) return 1 ;; esac
|
|
412
|
+
reset_pages=$(gh api --paginate --slurp "repos/$(tracker_repo)/issues/$1/events?per_page=100") || return 1
|
|
413
|
+
printf '%s' "$reset_pages" | jq -e 'type == "array" and all(.[]; type == "array")' >/dev/null || return 1
|
|
414
|
+
reset_event=$(printf '%s' "$reset_pages" | jq '
|
|
415
|
+
[ .[][] | select(.event == "labeled" and .label.name == "claim-reset" and .actor.type == "User") ]
|
|
416
|
+
| sort_by(.created_at, .id) | .[-1] // null') || return 1
|
|
417
|
+
if [ "$reset_event" = "null" ]; then printf 'null\n'; return 0; fi
|
|
418
|
+
reset_actor=$(printf '%s' "$reset_event" | jq -r '.actor.login') || return 1
|
|
419
|
+
case "$reset_actor" in ''|*[!A-Za-z0-9-]*) return 1 ;; esac
|
|
420
|
+
reset_permission=$(gh api "repos/$(tracker_repo)/collaborators/$reset_actor/permission") || return 1
|
|
421
|
+
printf '%s' "$reset_permission" | jq -e '
|
|
422
|
+
(.permission == "admin" or .permission == "write" or .permission == "maintain" or .permission == "triage")
|
|
423
|
+
or (.user.permissions | .admin == true or .maintain == true or .push == true or .triage == true)' >/dev/null || return 1
|
|
424
|
+
printf '%s' "$reset_event" | jq '{id: (.id | tostring), createdAt: .created_at, actor: .actor.login}'
|
|
425
|
+
}
|
|
426
|
+
gh_get_claim_reset "{number}"
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
The platform event plus repository-permission read proves human label authority.
|
|
430
|
+
A label still present is an operator-visible recovery breadcrumb, not a permanent
|
|
431
|
+
bypass. Removing it does not revive retired claims; remove and reapply to request
|
|
432
|
+
a later reset. Never apply this label automatically.
|
|
433
|
+
|
|
434
|
+
#### claim-winner
|
|
435
|
+
|
|
436
|
+
`{kind}`, `{item}`, `LIVE_CLAIM_IDS` (JSON array of comment handles from a complete
|
|
437
|
+
fresh **list-issue-comments** read, selected by the skill's live/stale policy) →
|
|
438
|
+
`{id,user,body}` for the lowest server creation-order candidate, or `null` when
|
|
439
|
+
none is visible. Missing/unreadable/incomplete data is an error, never an empty
|
|
440
|
+
success. Require the caller's own id in the fresh candidate set before proceeding.
|
|
441
|
+
Ignore explicitly `released`/`withdrawn` comments even if passed as live. Do not
|
|
442
|
+
filter by actor: two contenders may share one bot account. Numeric ids compare
|
|
443
|
+
numerically; opaque ids use creation time then stable id. The caller repeats the
|
|
444
|
+
read/election and performs the post-label ownership check; this is not atomic.
|
|
445
|
+
|
|
446
|
+
```bash
|
|
447
|
+
gh_claim_winner() {
|
|
448
|
+
# $1 = item number; $2 = LIVE_CLAIM_IDS as JSON string handles.
|
|
449
|
+
case "$1" in ''|*[!0-9]*) return 1 ;; esac
|
|
450
|
+
printf '%s' "$2" | jq -e 'type == "array" and all(.[]; type == "string")' >/dev/null || return 1
|
|
451
|
+
claim_pages=$(gh api --paginate --slurp "repos/$(tracker_repo)/issues/$1/comments?per_page=100") || return 1
|
|
452
|
+
printf '%s' "$claim_pages" | jq -e 'type == "array" and all(.[]; type == "array")' >/dev/null || return 1
|
|
453
|
+
printf '%s' "$claim_pages" | jq --argjson live "$2" '
|
|
454
|
+
[ .[][] | select((.id | tostring) as $id | $live | index($id))
|
|
455
|
+
| select((.body | test("(?m)^Claim-State: (released|withdrawn)\\r?$")) | not)
|
|
456
|
+
| {id: (.id | tostring), user: .user.login, body} ]
|
|
457
|
+
| sort_by(.id | [length, .]) | .[0] // null'
|
|
458
|
+
}
|
|
459
|
+
gh_claim_winner "{number}" "$LIVE_CLAIM_IDS"
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
All comment pages are read before ranking. Preserve REST numeric ids as string
|
|
463
|
+
handles at the operation boundary (do not substitute GraphQL node ids).
|
|
464
|
+
|
|
465
|
+
#### withdraw-claim
|
|
466
|
+
|
|
467
|
+
`{kind}`, `{item}`, `{commentId}`, full terminal body file, expected authenticated
|
|
468
|
+
actor and `Claim-Run` → rewrite only that run's original candidate through **update-comment**,
|
|
469
|
+
then read it back through **list-issue-comments**. Retain its legacy first line,
|
|
470
|
+
marker and run id; change `Claim-State: active` to `withdrawn` (loser) or `released`
|
|
471
|
+
(owner after cleanup), with the reason/winner. Before writing, verify exact item,
|
|
472
|
+
comment id, authenticated author and run id; a mismatch stops cleanup. Do not
|
|
473
|
+
edit a foreign candidate or delete its label. Return the same id and verified
|
|
474
|
+
terminal state; failed update/read-back is a blocker. Never fall back to a new
|
|
475
|
+
comment leaving the old active candidate in place.
|
|
476
|
+
|
|
246
477
|
### Pull requests
|
|
247
478
|
|
|
248
479
|
#### get-pr
|
|
@@ -274,15 +505,12 @@ PR_NUMBER=$(gh pr view --json number --jq .number)
|
|
|
274
505
|
```
|
|
275
506
|
|
|
276
507
|
#### update-pr
|
|
277
|
-
`{prNumber}`, new title and/or new body → the PR's own title/body rewritten in place (not a comment), e.g. reframing a doc-originated spec PR that grew a feature implementation.
|
|
278
|
-
```bash
|
|
279
|
-
gh pr edit {prNumber} --title "<title>"
|
|
280
|
-
gh pr edit {prNumber} --body-file <path-or-process-substitution>
|
|
281
|
-
```
|
|
282
|
-
If `gh pr edit` silently no-ops in this repo (some GitHub setups do), fall back to the REST API:
|
|
508
|
+
`{prNumber}`, new title and/or new body → the PR's own title/body rewritten in place (not a comment), e.g. reframing a doc-originated spec PR that grew a feature implementation. Patch only the fields that changed; omit the other operation. Use a body file so multi-line bodies survive.
|
|
283
509
|
```bash
|
|
284
|
-
gh api
|
|
510
|
+
gh api --method PATCH repos/{owner}/{repo}/pulls/{prNumber} -f title="<title>"
|
|
511
|
+
gh api --method PATCH repos/{owner}/{repo}/pulls/{prNumber} -F body=@<path>
|
|
285
512
|
```
|
|
513
|
+
Omit the title or body operation when that field is unchanged.
|
|
286
514
|
|
|
287
515
|
#### comment-pr
|
|
288
516
|
`{prNumber}`, body. For long structured comments:
|
|
@@ -331,14 +559,14 @@ Fallbacks: for a **private** repo the raw URLs need auth and will not render —
|
|
|
331
559
|
|
|
332
560
|
#### assign-pr / unassign-pr
|
|
333
561
|
```bash
|
|
334
|
-
gh
|
|
335
|
-
gh
|
|
562
|
+
gh api --method POST repos/{owner}/{repo}/issues/{prNumber}/assignees -f "assignees[]=<login>"
|
|
563
|
+
gh api --method DELETE repos/{owner}/{repo}/issues/{prNumber}/assignees -f "assignees[]=<login>"
|
|
336
564
|
```
|
|
337
565
|
|
|
338
566
|
#### label-pr / unlabel-pr
|
|
339
567
|
Always through the guards: `apply_label "<label>" {prNumber}` / `set_pipeline_label {prNumber} "<label>"` for the mutually exclusive pipeline group; direct removal:
|
|
340
568
|
```bash
|
|
341
|
-
|
|
569
|
+
remove_label "<label>" {prNumber}
|
|
342
570
|
```
|
|
343
571
|
|
|
344
572
|
#### get-pr-diff
|
|
@@ -369,9 +597,9 @@ gh pr review {prNumber} --request-changes --body "<body>"
|
|
|
369
597
|
GitHub rejects self-approval (reviewing your own PR); surface that instead of working around it.
|
|
370
598
|
|
|
371
599
|
#### merge-pr
|
|
372
|
-
`{prNumber}
|
|
600
|
+
`{prNumber}`, `{headSha}` (the reviewed full commit SHA); squash is the default merge strategy. GitHub branch rules remain enforced; this operation has no administrative bypass. `--auto` merges when checks pass; `--delete-branch` only when asked.
|
|
373
601
|
```bash
|
|
374
|
-
gh pr merge {prNumber} --squash
|
|
602
|
+
gh pr merge {prNumber} --repo {owner}/{repo} --squash --match-head-commit "{headSha}"
|
|
375
603
|
```
|
|
376
604
|
|
|
377
605
|
#### mark-pr-ready
|
|
@@ -478,3 +706,45 @@ gh label create risk-low --color 0e8a16 --description "Isolated, low bl
|
|
|
478
706
|
gh label create risk-medium --color fbca04 --description "Ordinary change with tests"
|
|
479
707
|
gh label create risk-high --color b60205 --description "Wide blast radius, review deeply"
|
|
480
708
|
```
|
|
709
|
+
|
|
710
|
+
#### list-review-comments
|
|
711
|
+
`{prNumber}` → every inline review comment on the diff (the conversation comments come from **list-issue-comments**; these are the ones anchored to a file and line).
|
|
712
|
+
```bash
|
|
713
|
+
gh api --paginate repos/{owner}/{repo}/pulls/{prNumber}/comments \
|
|
714
|
+
--jq '.[] | {id,user:.user.login,path,line:(.line // .original_line),body,url:.html_url,reply_to:.in_reply_to_id}'
|
|
715
|
+
```
|
|
716
|
+
REST does not expose a thread's resolved state (that lives in GraphQL's review threads), so treat every returned comment as potentially open and judge it against the current diff. `reply_to` is non-null on replies, which is what lets you reconstruct a thread. Consumers treat an unavailable operation as "inline feedback out of reach", not as a failure: they fall back to review bodies plus conversation comments and state the gap in their report.
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
#### approve-pending-runs
|
|
720
|
+
Head SHA → approve every workflow run on that commit that is waiting for maintainer approval (`conclusion` `action_required` — GitHub holds runs from first-time or outside contributors until a maintainer approves them). Prints the approved run ids; an empty result means nothing was waiting. Approving lets the contributor's workflow code run with this repository's CI, so callers approve only on a PR a human has authorized for automation (e.g. an `automerge` label) and read the diff's workflow changes first.
|
|
721
|
+
```bash
|
|
722
|
+
gh api "repos/{owner}/{repo}/actions/runs?head_sha={headSha}&status=action_required&per_page=100" \
|
|
723
|
+
--jq '.workflow_runs[].id' | while read -r run; do
|
|
724
|
+
gh api -X POST "repos/{owner}/{repo}/actions/runs/$run/approve" >/dev/null && echo "$run"
|
|
725
|
+
done
|
|
726
|
+
```
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
#### get-pr-author-association
|
|
730
|
+
`{prNumber}` → `{login, association}`, normalized from GitHub's `author_association`. GitHub reports `COLLABORATOR` for anyone with explicit repository access who is not an organization member, so on an organization-owned repository that is an `outside-collaborator`. `FIRST_TIMER` (first PR anywhere on GitHub) folds into `first-time-contributor`, and `MANNEQUIN` folds into `none`.
|
|
731
|
+
```bash
|
|
732
|
+
gh api "repos/{owner}/{repo}/pulls/{prNumber}" --jq '{login: .user.login, association: (
|
|
733
|
+
.author_association as $a | .base.repo.owner.type as $t |
|
|
734
|
+
if $a == "OWNER" then "owner"
|
|
735
|
+
elif $a == "MEMBER" then "member"
|
|
736
|
+
elif $a == "COLLABORATOR" then (if $t == "Organization" then "outside-collaborator" else "collaborator" end)
|
|
737
|
+
elif $a == "CONTRIBUTOR" then "contributor"
|
|
738
|
+
elif $a == "FIRST_TIME_CONTRIBUTOR" or $a == "FIRST_TIMER" then "first-time-contributor"
|
|
739
|
+
else "none" end)}'
|
|
740
|
+
```
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
#### close-pr
|
|
744
|
+
`{prNumber}` → close without merging; preserve the head branch, linked issues,
|
|
745
|
+
title and body. Post/update the caller's evidence note before calling. A fresh
|
|
746
|
+
**get-pr** must confirm `CLOSED` and no merge before reporting success; an
|
|
747
|
+
already merged PR is never reported as closed-obsolete.
|
|
748
|
+
```bash
|
|
749
|
+
gh api -X PATCH repos/{owner}/{repo}/pulls/{prNumber} -f state=closed
|
|
750
|
+
```
|
|
@@ -307,6 +307,7 @@ function linuxInvocation({ command, args, cwd, writableRoots, readOnlyRoots, net
|
|
|
307
307
|
sandboxArgs.push('--ro-bind', root, root)
|
|
308
308
|
}
|
|
309
309
|
for (const file of networkReadable) sandboxArgs.push('--ro-bind', file, file)
|
|
310
|
+
sandboxArgs.push('--remount-ro', '/', '--remount-ro', '/tmp')
|
|
310
311
|
const realCwd = regularDirectory(cwd, 'sandbox cwd')
|
|
311
312
|
sandboxArgs.push('--chdir', realCwd, '--', resolveExecutable(command, env), ...args)
|
|
312
313
|
return { command: bubblewrap, args: sandboxArgs, cwd: realCwd, env }
|
|
@@ -14,10 +14,10 @@ const WRITABLE_KINDS = new Set(['implementation', 'regression'])
|
|
|
14
14
|
const RELEASE_SUPPORTED_RUNNERS = ['codex', 'claude']
|
|
15
15
|
const RELEASE_VALIDATION_COMMANDS = ['yarn generate', 'yarn typecheck', 'yarn lint', 'yarn build']
|
|
16
16
|
const RELEASE_VALIDATION_OUTPUT_ROOTS = new Map([
|
|
17
|
-
['yarn generate', ['.mercato/generated']],
|
|
17
|
+
['yarn generate', ['.mercato/cache', '.mercato/generated']],
|
|
18
18
|
['yarn typecheck', ['tsconfig.tsbuildinfo']],
|
|
19
19
|
['yarn lint', []],
|
|
20
|
-
['yarn build', ['.mercato/generated', '.mercato/next', 'next-env.d.ts', 'tsconfig.tsbuildinfo']],
|
|
20
|
+
['yarn build', ['.mercato/cache', '.mercato/generated', '.mercato/next', 'next-env.d.ts', 'tsconfig.tsbuildinfo']],
|
|
21
21
|
])
|
|
22
22
|
const RUNNERS = new Set(RELEASE_SUPPORTED_RUNNERS)
|
|
23
23
|
const ALLOWED_VALIDATION_COMMANDS = new Set(RELEASE_VALIDATION_COMMANDS)
|
|
@@ -33,7 +33,7 @@ export const ROUTING_STEP_SLACK_MS = 60_000
|
|
|
33
33
|
const COPY_EXCLUDED_PREFIXES = [
|
|
34
34
|
'.git', '.next', '.turbo', '.cache', 'build', 'coverage', 'dist', 'node_modules', 'out',
|
|
35
35
|
'.ai/framework-context', '.ai/harness/results', '.ai/reports',
|
|
36
|
-
'.mercato/generated', '.mercato/next', 'next-env.d.ts', 'tsconfig.tsbuildinfo',
|
|
36
|
+
'.mercato/cache', '.mercato/generated', '.mercato/next', 'next-env.d.ts', 'tsconfig.tsbuildinfo',
|
|
37
37
|
]
|
|
38
38
|
const SAFE_ENV_TEMPLATES = new Set(['.env.example', '.env.sample', '.env.template'])
|
|
39
39
|
const SENSITIVE_AUTH_FILES = new Set(['.git-credentials', '.netrc', '.npmrc', '.pypirc', '.yarnrc', '.yarnrc.yml', '.yarnrc.yaml'])
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cli.init.errors.superadminPasswordPolicy": "Das Superadmin-Passwort für die Produktion erfüllt die konfigurierte Passwortrichtlinie nicht. Flags zum Umgehen der Passwortrichtlinie gelten nur außerhalb der Produktion.",
|
|
3
|
+
"cli.init.errors.superadminPasswordRequired": "Die Produktionsinitialisierung erfordert ein eindeutiges Superadmin-Passwort über OM_INIT_SUPERADMIN_PASSWORD oder --password; integrierte Platzhalter sind nicht zulässig."
|
|
4
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cli.init.errors.superadminPasswordPolicy": "Production superadmin password does not meet the configured password policy. Password-policy bypass flags apply only outside production.",
|
|
3
|
+
"cli.init.errors.superadminPasswordRequired": "Production initialization requires a unique superadmin password via OM_INIT_SUPERADMIN_PASSWORD or --password; built-in placeholders are not allowed."
|
|
4
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cli.init.errors.superadminPasswordPolicy": "La contraseña de superadministrador en producción no cumple la política de contraseñas configurada. Las opciones para omitir la política solo se aplican fuera de producción.",
|
|
3
|
+
"cli.init.errors.superadminPasswordRequired": "La inicialización en producción requiere una contraseña única de superadministrador mediante OM_INIT_SUPERADMIN_PASSWORD o --password; no se permiten los valores predeterminados de ejemplo."
|
|
4
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cli.init.errors.superadminPasswordPolicy": "프로덕션 슈퍼관리자 비밀번호가 설정된 비밀번호 정책을 충족하지 않습니다. 비밀번호 정책 우회 플래그는 프로덕션 외 환경에서만 적용됩니다.",
|
|
3
|
+
"cli.init.errors.superadminPasswordRequired": "프로덕션 초기화에는 OM_INIT_SUPERADMIN_PASSWORD 또는 --password로 지정한 고유한 슈퍼관리자 비밀번호가 필요합니다. 기본 예시 비밀번호는 사용할 수 없습니다."
|
|
4
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cli.init.errors.superadminPasswordPolicy": "Hasło superadministratora w środowisku produkcyjnym nie spełnia skonfigurowanej polityki haseł. Flagi pomijające politykę haseł działają tylko poza środowiskiem produkcyjnym.",
|
|
3
|
+
"cli.init.errors.superadminPasswordRequired": "Inicjalizacja produkcyjna wymaga unikalnego hasła superadministratora podanego przez OM_INIT_SUPERADMIN_PASSWORD lub --password; wbudowane hasła przykładowe są niedozwolone."
|
|
4
|
+
}
|