@controleonline/ui-common 1.2.71 → 1.2.76
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/.github/actions/workers/manager/action.yml +147 -0
- package/.github/actions/workers/qa/action.yml +44 -0
- package/.github/actions/workers/security/action.yml +44 -0
- package/.github/actions/workers/technical-documenter/action.yml +51 -0
- package/.github/workflows/manager-worker.yml +168 -0
- package/.github/workflows/publish-npm.yml +45 -0
- package/.gitmodules +3 -0
- package/AGENTS.md +6 -0
- package/README.md +14 -0
- package/package.json +3 -2
- package/src/api/fetch.js +1 -1
- package/src/api/index.js +92 -22
- package/src/react/components/AddImportModal.js +94 -110
- package/src/react/components/BottomNavigationBar.config.js +211 -231
- package/src/react/components/CategoryForm.js +52 -35
- package/src/react/components/DefaultProvider.native.js +131 -95
- package/src/react/components/DefaultProvider.web.js +148 -74
- package/src/react/components/NetworkPrinterPreviewModal.js +249 -0
- package/src/react/components/NetworkPrinterPreviewModal.styles.js +159 -0
- package/src/react/components/RuntimeInfoFooter.js +164 -104
- package/src/react/components/RuntimeInfoFooter.styles.js +3 -0
- package/src/react/components/UnifiedPaymentBar.js +7 -4
- package/src/react/components/UserAvatar.js +160 -0
- package/src/react/components/integrations/IntegrationHero/index.js +48 -0
- package/src/react/components/integrations/IntegrationHero/styles.js +57 -0
- package/src/react/components/integrations/IntegrationTabs/index.js +89 -0
- package/src/react/components/integrations/IntegrationTabs/styles.js +44 -0
- package/src/react/config/deviceConfigBootstrap.js +5 -3
- package/src/react/pages/Connections.js +229 -0
- package/src/react/pages/Connections.styles.js +222 -0
- package/src/react/pages/DeviceDetailPage.js +2865 -0
- package/src/react/pages/DeviceDetailPage.styles.js +308 -0
- package/src/react/pages/Devices/currentDevice.js +194 -0
- package/src/react/pages/Devices/deviceTypes/DeviceGroupCard.js +257 -0
- package/src/react/pages/Devices/deviceTypes/all.js +23 -0
- package/src/react/pages/Devices/deviceTypes/device.js +25 -0
- package/src/react/pages/Devices/deviceTypes/deviceListHelpers.js +178 -0
- package/src/react/pages/Devices/deviceTypes/display.js +26 -0
- package/src/react/pages/Devices/deviceTypes/index.js +145 -0
- package/src/react/pages/Devices/deviceTypes/ipCamera.js +35 -0
- package/src/react/pages/Devices/deviceTypes/pdv.js +88 -0
- package/src/react/pages/Devices/deviceTypes/printer.js +37 -0
- package/src/react/pages/Devices/deviceTypes/shared.js +453 -0
- package/src/react/pages/Devices/deviceTypes/useDeviceNetworkConnectivity.js +145 -0
- package/src/react/pages/Devices.js +183 -0
- package/src/react/pages/Devices.styles.js +353 -0
- package/src/react/pages/Food99IntegrationPage/components/Food99CatalogTab.js +219 -0
- package/src/react/pages/Food99IntegrationPage/components/Food99OverviewTab.js +134 -0
- package/src/react/pages/Food99IntegrationPage/components/Food99PreviewModal.js +173 -0
- package/src/react/pages/Food99IntegrationPage/components/Food99ProductCard.js +1 -0
- package/src/react/pages/Food99IntegrationPage/components/Food99QuickWalletModal.js +181 -0
- package/src/react/pages/Food99IntegrationPage/components/Food99SettingsTab.js +306 -0
- package/src/react/pages/Food99IntegrationPage/components/Food99StoreTab.js +417 -0
- package/src/react/pages/Food99IntegrationPage/index.js +1530 -0
- package/src/react/pages/Food99IntegrationPage/styles.js +792 -0
- package/src/react/pages/Food99IntegrationPage/utils.js +155 -0
- package/src/react/pages/Food99IntegrationPage.js +1 -0
- package/src/react/pages/Food99IntegrationPage.styles.js +1 -0
- package/src/react/pages/GenericLogPage.js +42 -167
- package/src/react/pages/IFoodIntegrationPage/components/IFoodCatalogTab.js +8 -0
- package/src/react/pages/IFoodIntegrationPage/components/IFoodOperationsTab.js +420 -0
- package/src/react/pages/IFoodIntegrationPage/components/IFoodOverviewTab.js +118 -0
- package/src/react/pages/IFoodIntegrationPage/components/IFoodPreviewModal.js +103 -0
- package/src/react/pages/IFoodIntegrationPage/components/IFoodProductCard.js +1 -0
- package/src/react/pages/IFoodIntegrationPage/components/IFoodStoreTab.js +150 -0
- package/src/react/pages/IFoodIntegrationPage/index.js +1298 -0
- package/src/react/pages/IFoodIntegrationPage/styles.js +764 -0
- package/src/react/pages/IFoodIntegrationPage/utils.js +91 -0
- package/src/react/pages/IFoodIntegrationPage.js +1 -0
- package/src/react/pages/IFoodIntegrationPage.styles.js +1 -0
- package/src/react/pages/Imports.js +214 -166
- package/src/react/pages/IntegrationConfigPage.js +744 -0
- package/src/react/pages/IntegrationConfigPage.styles.js +269 -0
- package/src/react/pages/Integrations.js +299 -0
- package/src/react/pages/Integrations.styles.js +130 -0
- package/src/react/pages/ManagerOrderNotificationsPage.js +642 -0
- package/src/react/pages/MarketplaceIntegrationPage/components/MarketplaceProductCard.js +205 -0
- package/src/react/pages/MarketplaceIntegrationPage/components/RemoteMarketplaceMenuTab.js +335 -0
- package/src/react/pages/MarketplaceIntegrationPage/index.js +60 -0
- package/src/react/pages/MarketplaceIntegrationPage/utils.js +137 -0
- package/src/react/pages/MercadoLivreIntegrationPage.js +538 -0
- package/src/react/pages/PrinterDeviceDetailPage.js +1916 -0
- package/src/react/pages/PrinterDeviceDetailPage.styles.js +223 -0
- package/src/react/pages/PrinterDeviceFormPage.js +521 -0
- package/src/react/pages/PrinterDeviceFormPage.styles.js +159 -0
- package/src/react/pages/WhatsAppConnectionPage.js +459 -0
- package/src/react/pages/WhatsAppConnectionPage.styles.js +284 -0
- package/src/react/pages/integrationsCatalog.js +399 -0
- package/src/react/services/Cielo/Cielo.js +193 -193
- package/src/react/utils/categoryContexts.js +46 -0
- package/src/react/utils/entityDisplay.js +222 -217
- package/src/react/utils/fileUrl.js +39 -20
- package/src/react/utils/integrationPage.js +16 -0
- package/src/react/utils/runtimeFooter.js +40 -22
- package/src/react/utils/runtimeLanguage.js +50 -9
- package/src/react/utils/runtimeMenu.js +191 -131
- package/src/react/utils/runtimeZoom.js +43 -0
- package/src/react/utils/shopConfig.js +27 -15
- package/src/react/utils/shopFranchises.js +126 -1
- package/src/react/utils/storeColumns.js +23 -4
- package/src/react/utils/userAvatar.js +104 -0
- package/src/store/categories/index.js +48 -20
- package/src/store/device_config/index.js +62 -21
- package/src/store/entity_log/index.js +22 -1
- package/src/store/imports/customActions.js +51 -0
- package/src/store/imports/index.js +89 -88
- package/src/store/status/index.js +11 -11
- package/src/store/themes/index.js +22 -0
- package/src/store/timezones/index.js +3 -1
- package/src/tests/browser/manager/connections.spec.js +143 -0
- package/src/tests/browser/manager/devices-current.spec.js +343 -0
- package/src/tests/browser/manager/mercado-livre-integration.spec.js +268 -0
- package/src/tests/react/api/deviceHeaders.test.js +114 -0
- package/src/tests/react/components/AddImportModal.test.js +166 -0
- package/src/tests/react/components/BottomNavigationBar.config.test.js +20 -0
- package/src/tests/react/components/UserAvatar.test.js +52 -0
- package/src/tests/react/pages/DevicePickerStyles.test.js +47 -0
- package/src/tests/react/pages/Devices/deviceListHelpers.test.js +39 -0
- package/src/tests/react/pages/DevicesCurrentDevice.test.js +198 -0
- package/src/tests/react/pages/connectionsHelpers.test.js +34 -0
- package/src/tests/react/pages/mercadoLivreIntegrationPageContract.test.mjs +16 -0
- package/src/tests/react/services/Cielo.test.js +190 -190
- package/src/tests/react/store/categoriesOrdering.test.js +26 -0
- package/src/tests/react/utils/appDomain.test.js +62 -0
- package/src/tests/react/utils/entityDisplay.test.js +2 -2
- package/src/tests/react/utils/fileUrl.test.js +3 -3
- package/src/tests/react/utils/formatter.test.mjs +33 -0
- package/src/tests/react/utils/runtimeFooter.test.js +29 -4
- package/src/tests/react/utils/runtimeLanguage.test.js +79 -9
- package/src/tests/react/utils/runtimeMenu.test.js +198 -134
- package/src/tests/react/utils/runtimeZoom.test.js +38 -0
- package/src/tests/react/utils/shopConfig.test.js +10 -9
- package/src/tests/react/utils/shopFranchises.test.js +43 -0
- package/src/tests/react/utils/translate.discovery.test.mjs +170 -0
- package/src/tests/react/utils/translate.test.helpers.mjs +152 -0
- package/src/tests/react/utils/translate.test.mjs +141 -349
- package/src/tests/react/utils/userAvatar.test.js +63 -0
- package/src/utils/appDomain.js +15 -4
- package/src/utils/formatter.js +104 -16
- package/src/utils/integrationConfigs.js +80 -80
- package/src/utils/translate.js +222 -438
- package/src/utils/translateDiscovery.js +96 -0
- package/src/utils/translateNormalize.js +33 -0
- package/src/utils/translatePending.js +92 -0
- package/src/utils/translateStorage.js +142 -0
- package/.github/agents/developer.agent.md +0 -30
- package/.github/agents/devops.agent.md +0 -30
- package/.github/agents/qa.agent.md +0 -30
- package/.github/agents/security.agent.md +0 -30
- package/.github/workflows/npmjs.yml +0 -35
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
name: Manager Subworker
|
|
2
|
+
description: Resolve/cria issue, aplica labels e decide quais workers invocar (padrão de branch = master)
|
|
3
|
+
inputs:
|
|
4
|
+
gh_token:
|
|
5
|
+
description: PAT (GH_TOKEN)
|
|
6
|
+
required: true
|
|
7
|
+
branch:
|
|
8
|
+
description: Branch do push (master|dev|staging)
|
|
9
|
+
required: true
|
|
10
|
+
outputs:
|
|
11
|
+
issue_number:
|
|
12
|
+
description: Número da issue fonte
|
|
13
|
+
value: ${{ steps.resolve.outputs.issue_number }}
|
|
14
|
+
created:
|
|
15
|
+
description: true se a issue foi criada agora
|
|
16
|
+
value: ${{ steps.resolve.outputs.created }}
|
|
17
|
+
found:
|
|
18
|
+
description: true se issue veio do commit
|
|
19
|
+
value: ${{ steps.resolve.outputs.found }}
|
|
20
|
+
run_qa:
|
|
21
|
+
description: Manager decide invocar QA
|
|
22
|
+
value: ${{ steps.resolve.outputs.run_qa }}
|
|
23
|
+
run_security:
|
|
24
|
+
description: Manager decide invocar Security
|
|
25
|
+
value: ${{ steps.resolve.outputs.run_security }}
|
|
26
|
+
run_docs:
|
|
27
|
+
description: Manager decide invocar Technical Documenter
|
|
28
|
+
value: ${{ steps.resolve.outputs.run_docs }}
|
|
29
|
+
run_gates:
|
|
30
|
+
description: Manager decide checar quarteto em master
|
|
31
|
+
value: ${{ steps.resolve.outputs.run_gates }}
|
|
32
|
+
base_branch:
|
|
33
|
+
description: Branch canônico (sempre master se veio main)
|
|
34
|
+
value: ${{ steps.resolve.outputs.base_branch }}
|
|
35
|
+
runs:
|
|
36
|
+
using: composite
|
|
37
|
+
steps:
|
|
38
|
+
- name: Resolve issue, labels e plano de workers
|
|
39
|
+
id: resolve
|
|
40
|
+
shell: bash
|
|
41
|
+
env:
|
|
42
|
+
GH_TOKEN: ${{ inputs.gh_token }}
|
|
43
|
+
BRANCH_IN: ${{ inputs.branch }}
|
|
44
|
+
REPO: ${{ github.repository }}
|
|
45
|
+
SHA: ${{ github.sha }}
|
|
46
|
+
MSG: ${{ github.event.head_commit.message }}
|
|
47
|
+
BEFORE: ${{ github.event.before }}
|
|
48
|
+
run: |
|
|
49
|
+
set -euo pipefail
|
|
50
|
+
|
|
51
|
+
# Padrão da org: master (nunca main como branch de trabalho)
|
|
52
|
+
BRANCH="$BRANCH_IN"
|
|
53
|
+
if [ "$BRANCH" = "main" ]; then
|
|
54
|
+
echo "AVISO: branch main detectada — tratando como master (padrão org)"
|
|
55
|
+
BRANCH="master"
|
|
56
|
+
fi
|
|
57
|
+
echo "base_branch=$BRANCH" >> "$GITHUB_OUTPUT"
|
|
58
|
+
|
|
59
|
+
MESSAGES=$(git log --pretty=format:"%s %b" "${BEFORE}..${SHA}" 2>/dev/null || git log -1 --pretty=format:"%s %b")
|
|
60
|
+
ISSUE_REF=$(echo "$MESSAGES" | grep -oE '([A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+)?#([0-9]+)' | head -1 || true)
|
|
61
|
+
|
|
62
|
+
if [ -n "$ISSUE_REF" ]; then
|
|
63
|
+
NUM=$(echo "$ISSUE_REF" | grep -oE '[0-9]+$')
|
|
64
|
+
echo "found=true" >> "$GITHUB_OUTPUT"
|
|
65
|
+
echo "created=false" >> "$GITHUB_OUTPUT"
|
|
66
|
+
echo "issue_number=$NUM" >> "$GITHUB_OUTPUT"
|
|
67
|
+
echo "Issue fonte: #$NUM"
|
|
68
|
+
else
|
|
69
|
+
echo "Push sem issue → Manager cria issue"
|
|
70
|
+
TITLE="ops: orquestração automática (push ${BRANCH} ${SHA:0:7})"
|
|
71
|
+
BODY=$(cat <<EOF
|
|
72
|
+
## Manager Worker — issue automática
|
|
73
|
+
|
|
74
|
+
Push em \`${BRANCH}\` sem referência de issue no commit.
|
|
75
|
+
|
|
76
|
+
- **Commit**: ${SHA}
|
|
77
|
+
- **Mensagem**: ${MSG}
|
|
78
|
+
|
|
79
|
+
O Manager aplica labels e **invoca** os workers necessários (QA / Security / Technical Documenter) conforme o branch.
|
|
80
|
+
|
|
81
|
+
Fonte: https://raw.githubusercontent.com/ControleOnline/agents-mcp/master/agents/roles/manager/agent.md
|
|
82
|
+
EOF
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
LABELS='["agent:manager"]'
|
|
86
|
+
case "$BRANCH" in
|
|
87
|
+
master)
|
|
88
|
+
LABELS='["agent:manager","agent:technical-documenter"]'
|
|
89
|
+
;;
|
|
90
|
+
dev)
|
|
91
|
+
LABELS='["agent:manager","agent:qa","agent:security","agent:developer:done"]'
|
|
92
|
+
;;
|
|
93
|
+
staging)
|
|
94
|
+
LABELS='["agent:manager","agent:qa","agent:security"]'
|
|
95
|
+
;;
|
|
96
|
+
esac
|
|
97
|
+
|
|
98
|
+
RESPONSE=$(gh api --method POST \
|
|
99
|
+
-H "Accept: application/vnd.github+json" \
|
|
100
|
+
-H "X-GitHub-Api-Version: 2022-11-28" \
|
|
101
|
+
"/repos/${REPO}/issues" \
|
|
102
|
+
--input - <<EOF
|
|
103
|
+
{
|
|
104
|
+
"title": $(echo "$TITLE" | jq -Rs .),
|
|
105
|
+
"body": $(echo "$BODY" | jq -Rs .),
|
|
106
|
+
"labels": $LABELS
|
|
107
|
+
}
|
|
108
|
+
EOF
|
|
109
|
+
)
|
|
110
|
+
NUM=$(echo "$RESPONSE" | jq -r .number)
|
|
111
|
+
echo "found=false" >> "$GITHUB_OUTPUT"
|
|
112
|
+
echo "created=true" >> "$GITHUB_OUTPUT"
|
|
113
|
+
echo "issue_number=$NUM" >> "$GITHUB_OUTPUT"
|
|
114
|
+
echo "Issue criada: #$NUM"
|
|
115
|
+
fi
|
|
116
|
+
|
|
117
|
+
# Manager decide quais workers invocar
|
|
118
|
+
run_qa=false
|
|
119
|
+
run_security=false
|
|
120
|
+
run_docs=false
|
|
121
|
+
run_gates=false
|
|
122
|
+
|
|
123
|
+
case "$BRANCH" in
|
|
124
|
+
master)
|
|
125
|
+
run_docs=true
|
|
126
|
+
run_gates=true
|
|
127
|
+
gh issue edit "$NUM" --repo "$REPO" --add-label "agent:technical-documenter" || true
|
|
128
|
+
;;
|
|
129
|
+
dev)
|
|
130
|
+
run_qa=true
|
|
131
|
+
run_security=true
|
|
132
|
+
gh issue edit "$NUM" --repo "$REPO" --add-label "agent:qa" --add-label "agent:security" --add-label "agent:developer:done" || true
|
|
133
|
+
;;
|
|
134
|
+
staging)
|
|
135
|
+
run_qa=true
|
|
136
|
+
run_security=true
|
|
137
|
+
gh issue edit "$NUM" --repo "$REPO" --add-label "agent:qa" --add-label "agent:security" || true
|
|
138
|
+
;;
|
|
139
|
+
esac
|
|
140
|
+
|
|
141
|
+
echo "run_qa=$run_qa" >> "$GITHUB_OUTPUT"
|
|
142
|
+
echo "run_security=$run_security" >> "$GITHUB_OUTPUT"
|
|
143
|
+
echo "run_docs=$run_docs" >> "$GITHUB_OUTPUT"
|
|
144
|
+
echo "run_gates=$run_gates" >> "$GITHUB_OUTPUT"
|
|
145
|
+
|
|
146
|
+
gh issue comment "$NUM" --repo "$REPO" --body \
|
|
147
|
+
"**Manager** orquestrou push \`${BRANCH}\`: run_qa=$run_qa run_security=$run_security run_docs=$run_docs run_gates=$run_gates. Workers serão invocados a seguir."
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: QA Worker
|
|
2
|
+
description: Assign Copilot as QA — single link to agents-mcp
|
|
3
|
+
inputs:
|
|
4
|
+
gh_token:
|
|
5
|
+
required: true
|
|
6
|
+
issue_number:
|
|
7
|
+
required: true
|
|
8
|
+
base_branch:
|
|
9
|
+
default: dev
|
|
10
|
+
runs:
|
|
11
|
+
using: composite
|
|
12
|
+
steps:
|
|
13
|
+
- name: Assign Copilot as QA
|
|
14
|
+
shell: bash
|
|
15
|
+
env:
|
|
16
|
+
GH_TOKEN: ${{ inputs.gh_token }}
|
|
17
|
+
ISSUE: ${{ inputs.issue_number }}
|
|
18
|
+
REPO: ${{ github.repository }}
|
|
19
|
+
BASE: ${{ inputs.base_branch }}
|
|
20
|
+
run: |
|
|
21
|
+
set -euo pipefail
|
|
22
|
+
CUSTOM_INSTRUCTIONS='Atue 100% como QA do ControleOnline.
|
|
23
|
+
Leia e siga OBRIGATORIAMENTE a fonte canônica única:
|
|
24
|
+
https://raw.githubusercontent.com/ControleOnline/agents-mcp/master/agents/roles/qa/agent.md'
|
|
25
|
+
|
|
26
|
+
gh issue edit "$ISSUE" --repo "$REPO" --add-label "agent:qa" || true
|
|
27
|
+
|
|
28
|
+
gh api --method POST \
|
|
29
|
+
-H "Accept: application/vnd.github+json" \
|
|
30
|
+
-H "X-GitHub-Api-Version: 2022-11-28" \
|
|
31
|
+
"/repos/${REPO}/issues/${ISSUE}/assignees" \
|
|
32
|
+
--input - <<EOFINNER
|
|
33
|
+
{
|
|
34
|
+
"assignees": ["copilot-swe-agent[bot]"],
|
|
35
|
+
"agent_assignment": {
|
|
36
|
+
"target_repo": "${REPO}",
|
|
37
|
+
"base_branch": "${BASE}",
|
|
38
|
+
"custom_instructions": $(echo "$CUSTOM_INSTRUCTIONS" | jq -Rs .)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
EOFINNER
|
|
42
|
+
|
|
43
|
+
gh issue comment "$ISSUE" --repo "$REPO" --body \
|
|
44
|
+
"Manager Worker → **QA**. Fonte: agents-mcp/agents/roles/qa/agent.md"
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Security Worker
|
|
2
|
+
description: Assign Copilot as Security — single link to agents-mcp
|
|
3
|
+
inputs:
|
|
4
|
+
gh_token:
|
|
5
|
+
required: true
|
|
6
|
+
issue_number:
|
|
7
|
+
required: true
|
|
8
|
+
base_branch:
|
|
9
|
+
default: dev
|
|
10
|
+
runs:
|
|
11
|
+
using: composite
|
|
12
|
+
steps:
|
|
13
|
+
- name: Assign Copilot as Security
|
|
14
|
+
shell: bash
|
|
15
|
+
env:
|
|
16
|
+
GH_TOKEN: ${{ inputs.gh_token }}
|
|
17
|
+
ISSUE: ${{ inputs.issue_number }}
|
|
18
|
+
REPO: ${{ github.repository }}
|
|
19
|
+
BASE: ${{ inputs.base_branch }}
|
|
20
|
+
run: |
|
|
21
|
+
set -euo pipefail
|
|
22
|
+
CUSTOM_INSTRUCTIONS='Atue 100% como Security do ControleOnline.
|
|
23
|
+
Leia e siga OBRIGATORIAMENTE a fonte canônica única:
|
|
24
|
+
https://raw.githubusercontent.com/ControleOnline/agents-mcp/master/agents/roles/security/agent.md'
|
|
25
|
+
|
|
26
|
+
gh issue edit "$ISSUE" --repo "$REPO" --add-label "agent:security" || true
|
|
27
|
+
|
|
28
|
+
gh api --method POST \
|
|
29
|
+
-H "Accept: application/vnd.github+json" \
|
|
30
|
+
-H "X-GitHub-Api-Version: 2022-11-28" \
|
|
31
|
+
"/repos/${REPO}/issues/${ISSUE}/assignees" \
|
|
32
|
+
--input - <<EOFINNER
|
|
33
|
+
{
|
|
34
|
+
"assignees": ["copilot-swe-agent[bot]"],
|
|
35
|
+
"agent_assignment": {
|
|
36
|
+
"target_repo": "${REPO}",
|
|
37
|
+
"base_branch": "${BASE}",
|
|
38
|
+
"custom_instructions": $(echo "$CUSTOM_INSTRUCTIONS" | jq -Rs .)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
EOFINNER
|
|
42
|
+
|
|
43
|
+
gh issue comment "$ISSUE" --repo "$REPO" --body \
|
|
44
|
+
"Manager Worker → **Security**. Fonte: agents-mcp/agents/roles/security/agent.md"
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
name: Technical Documenter Worker
|
|
2
|
+
description: Assign Copilot as technical-documenter — rules live only in agents-mcp
|
|
3
|
+
inputs:
|
|
4
|
+
gh_token:
|
|
5
|
+
required: true
|
|
6
|
+
issue_number:
|
|
7
|
+
required: true
|
|
8
|
+
base_branch:
|
|
9
|
+
default: master
|
|
10
|
+
runs:
|
|
11
|
+
using: composite
|
|
12
|
+
steps:
|
|
13
|
+
- name: Assign Copilot as technical-documenter
|
|
14
|
+
shell: bash
|
|
15
|
+
env:
|
|
16
|
+
GH_TOKEN: ${{ inputs.gh_token }}
|
|
17
|
+
ISSUE: ${{ inputs.issue_number }}
|
|
18
|
+
REPO: ${{ github.repository }}
|
|
19
|
+
BASE: ${{ inputs.base_branch }}
|
|
20
|
+
run: |
|
|
21
|
+
set -euo pipefail
|
|
22
|
+
# Regras 100% no agents-mcp — não copiar checklist/labels aqui
|
|
23
|
+
CUSTOM_INSTRUCTIONS='Atue 100% como technical-documenter do ControleOnline.
|
|
24
|
+
Leia e siga OBRIGATORIAMENTE (fonte canônica única):
|
|
25
|
+
https://raw.githubusercontent.com/ControleOnline/agents-mcp/master/agents/roles/technical-documenter/agent.md
|
|
26
|
+
|
|
27
|
+
Também leia:
|
|
28
|
+
https://raw.githubusercontent.com/ControleOnline/agents-mcp/master/agents/skills/shared/operations/copilot-cooperation.md
|
|
29
|
+
https://raw.githubusercontent.com/ControleOnline/agents-mcp/master/agents/skills/by-role/technical-documenter/README.md
|
|
30
|
+
|
|
31
|
+
Não use regras embutidas neste assignment; a fonte acima prevalece.'
|
|
32
|
+
|
|
33
|
+
gh issue edit "$ISSUE" --repo "$REPO" --add-label "agent:technical-documenter" || true
|
|
34
|
+
|
|
35
|
+
gh api --method POST \
|
|
36
|
+
-H "Accept: application/vnd.github+json" \
|
|
37
|
+
-H "X-GitHub-Api-Version: 2022-11-28" \
|
|
38
|
+
"/repos/${REPO}/issues/${ISSUE}/assignees" \
|
|
39
|
+
--input - <<EOFINNER
|
|
40
|
+
{
|
|
41
|
+
"assignees": ["copilot-swe-agent[bot]"],
|
|
42
|
+
"agent_assignment": {
|
|
43
|
+
"target_repo": "${REPO}",
|
|
44
|
+
"base_branch": "${BASE}",
|
|
45
|
+
"custom_instructions": $(echo "$CUSTOM_INSTRUCTIONS" | jq -Rs .)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
EOFINNER
|
|
49
|
+
|
|
50
|
+
gh issue comment "$ISSUE" --repo "$REPO" --body \
|
|
51
|
+
"Manager Worker → **technical-documenter**. Fonte: agents-mcp/agents/roles/technical-documenter/agent.md"
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
name: Manager Worker
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master, dev, staging]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
issues: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
|
|
12
|
+
# Orquestrador: Manager resolve/cria issue e decide quais workers invocar.
|
|
13
|
+
# Padrão de branch da org = master (não usar main).
|
|
14
|
+
# Em master: bump patch + tag vX.Y.Z → dispara publish-npm.yml (Trusted Publishing).
|
|
15
|
+
jobs:
|
|
16
|
+
manager:
|
|
17
|
+
name: Manager — resolve + plano de workers
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
outputs:
|
|
20
|
+
issue_number: ${{ steps.mgr.outputs.issue_number }}
|
|
21
|
+
created: ${{ steps.mgr.outputs.created }}
|
|
22
|
+
run_qa: ${{ steps.mgr.outputs.run_qa }}
|
|
23
|
+
run_security: ${{ steps.mgr.outputs.run_security }}
|
|
24
|
+
run_docs: ${{ steps.mgr.outputs.run_docs }}
|
|
25
|
+
run_gates: ${{ steps.mgr.outputs.run_gates }}
|
|
26
|
+
base_branch: ${{ steps.mgr.outputs.base_branch }}
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
with:
|
|
30
|
+
fetch-depth: 0
|
|
31
|
+
|
|
32
|
+
- name: Manager subworker
|
|
33
|
+
id: mgr
|
|
34
|
+
uses: ./.github/actions/workers/manager
|
|
35
|
+
with:
|
|
36
|
+
gh_token: ${{ secrets.GH_TOKEN }}
|
|
37
|
+
branch: ${{ github.ref_name }}
|
|
38
|
+
|
|
39
|
+
# Workers invocados pelo plano do Manager (paralelo quando ambos true)
|
|
40
|
+
qa:
|
|
41
|
+
name: QA (invocado pelo Manager)
|
|
42
|
+
needs: manager
|
|
43
|
+
if: needs.manager.outputs.run_qa == 'true'
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v4
|
|
47
|
+
- uses: ./.github/actions/workers/qa
|
|
48
|
+
with:
|
|
49
|
+
gh_token: ${{ secrets.GH_TOKEN }}
|
|
50
|
+
issue_number: ${{ needs.manager.outputs.issue_number }}
|
|
51
|
+
base_branch: ${{ needs.manager.outputs.base_branch }}
|
|
52
|
+
|
|
53
|
+
security:
|
|
54
|
+
name: Security (invocado pelo Manager)
|
|
55
|
+
needs: manager
|
|
56
|
+
if: needs.manager.outputs.run_security == 'true'
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
steps:
|
|
59
|
+
- uses: actions/checkout@v4
|
|
60
|
+
- uses: ./.github/actions/workers/security
|
|
61
|
+
with:
|
|
62
|
+
gh_token: ${{ secrets.GH_TOKEN }}
|
|
63
|
+
issue_number: ${{ needs.manager.outputs.issue_number }}
|
|
64
|
+
base_branch: ${{ needs.manager.outputs.base_branch }}
|
|
65
|
+
|
|
66
|
+
technical-documenter:
|
|
67
|
+
name: Technical Documenter (invocado pelo Manager)
|
|
68
|
+
needs: manager
|
|
69
|
+
if: needs.manager.outputs.run_docs == 'true'
|
|
70
|
+
runs-on: ubuntu-latest
|
|
71
|
+
steps:
|
|
72
|
+
- uses: actions/checkout@v4
|
|
73
|
+
- uses: ./.github/actions/workers/technical-documenter
|
|
74
|
+
with:
|
|
75
|
+
gh_token: ${{ secrets.GH_TOKEN }}
|
|
76
|
+
issue_number: ${{ needs.manager.outputs.issue_number }}
|
|
77
|
+
base_branch: ${{ needs.manager.outputs.base_branch }}
|
|
78
|
+
|
|
79
|
+
# master: se faltar gate do quarteto → tags + workers faltantes
|
|
80
|
+
master-gates:
|
|
81
|
+
name: Master gates (quarteto)
|
|
82
|
+
needs: manager
|
|
83
|
+
if: needs.manager.outputs.run_gates == 'true'
|
|
84
|
+
runs-on: ubuntu-latest
|
|
85
|
+
outputs:
|
|
86
|
+
need_qa: ${{ steps.check.outputs.need_qa }}
|
|
87
|
+
need_security: ${{ steps.check.outputs.need_security }}
|
|
88
|
+
need_docs: ${{ steps.check.outputs.need_docs }}
|
|
89
|
+
steps:
|
|
90
|
+
- uses: actions/checkout@v4
|
|
91
|
+
- name: Inspect quarteto e tags
|
|
92
|
+
id: check
|
|
93
|
+
env:
|
|
94
|
+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
95
|
+
ISSUE: ${{ needs.manager.outputs.issue_number }}
|
|
96
|
+
REPO: ${{ github.repository }}
|
|
97
|
+
run: |
|
|
98
|
+
set -euo pipefail
|
|
99
|
+
LABELS=$(gh issue view "$ISSUE" --repo "$REPO" --json labels --jq '[.labels[].name] | join(",")')
|
|
100
|
+
echo "Labels: $LABELS"
|
|
101
|
+
|
|
102
|
+
need_qa=false
|
|
103
|
+
need_security=false
|
|
104
|
+
need_docs=false
|
|
105
|
+
|
|
106
|
+
echo "$LABELS" | grep -q 'qa:accepted' || need_qa=true
|
|
107
|
+
echo "$LABELS" | grep -q 'security:accepted' || need_security=true
|
|
108
|
+
echo "$LABELS" | grep -q 'agent:technical-documenter:done' || need_docs=true
|
|
109
|
+
|
|
110
|
+
echo "need_qa=$need_qa" >> "$GITHUB_OUTPUT"
|
|
111
|
+
echo "need_security=$need_security" >> "$GITHUB_OUTPUT"
|
|
112
|
+
echo "need_docs=$need_docs" >> "$GITHUB_OUTPUT"
|
|
113
|
+
|
|
114
|
+
[ "$need_qa" = true ] && gh issue edit "$ISSUE" --repo "$REPO" --add-label "agent:qa" || true
|
|
115
|
+
[ "$need_security" = true ] && gh issue edit "$ISSUE" --repo "$REPO" --add-label "agent:security" || true
|
|
116
|
+
[ "$need_docs" = true ] && gh issue edit "$ISSUE" --repo "$REPO" --add-label "agent:technical-documenter" || true
|
|
117
|
+
|
|
118
|
+
gh issue comment "$ISSUE" --repo "$REPO" --body \
|
|
119
|
+
"Master gates (Manager): need_qa=$need_qa need_security=$need_security need_docs=$need_docs"
|
|
120
|
+
|
|
121
|
+
master-qa:
|
|
122
|
+
name: QA (master gap via Manager)
|
|
123
|
+
needs: [manager, master-gates]
|
|
124
|
+
if: needs.master-gates.outputs.need_qa == 'true'
|
|
125
|
+
runs-on: ubuntu-latest
|
|
126
|
+
steps:
|
|
127
|
+
- uses: actions/checkout@v4
|
|
128
|
+
- uses: ./.github/actions/workers/qa
|
|
129
|
+
with:
|
|
130
|
+
gh_token: ${{ secrets.GH_TOKEN }}
|
|
131
|
+
issue_number: ${{ needs.manager.outputs.issue_number }}
|
|
132
|
+
base_branch: master
|
|
133
|
+
|
|
134
|
+
master-security:
|
|
135
|
+
name: Security (master gap via Manager)
|
|
136
|
+
needs: [manager, master-gates]
|
|
137
|
+
if: needs.master-gates.outputs.need_security == 'true'
|
|
138
|
+
runs-on: ubuntu-latest
|
|
139
|
+
steps:
|
|
140
|
+
- uses: actions/checkout@v4
|
|
141
|
+
- uses: ./.github/actions/workers/security
|
|
142
|
+
with:
|
|
143
|
+
gh_token: ${{ secrets.GH_TOKEN }}
|
|
144
|
+
issue_number: ${{ needs.manager.outputs.issue_number }}
|
|
145
|
+
base_branch: master
|
|
146
|
+
|
|
147
|
+
# Em push para master: bump patch + cria tag vX.Y.Z (dispara publish-npm.yml)
|
|
148
|
+
# Ignora commits de release ([skip bump]) para evitar loop.
|
|
149
|
+
version-tag:
|
|
150
|
+
name: Bump version + tag
|
|
151
|
+
if: github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, '[skip bump]')
|
|
152
|
+
runs-on: ubuntu-latest
|
|
153
|
+
steps:
|
|
154
|
+
- uses: actions/checkout@v4
|
|
155
|
+
with:
|
|
156
|
+
fetch-depth: 0
|
|
157
|
+
token: ${{ secrets.GH_TOKEN }}
|
|
158
|
+
|
|
159
|
+
- uses: actions/setup-node@v4
|
|
160
|
+
with:
|
|
161
|
+
node-version: '24'
|
|
162
|
+
|
|
163
|
+
- name: Bump patch + tag
|
|
164
|
+
run: |
|
|
165
|
+
git config user.name "github-actions[bot]"
|
|
166
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
167
|
+
npm version patch -m "chore(release): %s [skip bump]"
|
|
168
|
+
git push origin HEAD:master --follow-tags
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: Publish Package to npmjs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
id-token: write
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
permissions:
|
|
16
|
+
id-token: write
|
|
17
|
+
contents: read
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- uses: actions/setup-node@v4
|
|
22
|
+
with:
|
|
23
|
+
node-version: '24'
|
|
24
|
+
|
|
25
|
+
- name: Ensure npm 11.5.1+ (OIDC support)
|
|
26
|
+
run: |
|
|
27
|
+
npm install -g npm@latest
|
|
28
|
+
echo "node=$(node -v) npm=$(npm -v)"
|
|
29
|
+
|
|
30
|
+
- name: Prepare registry (OIDC only — no classic token)
|
|
31
|
+
run: |
|
|
32
|
+
unset NODE_AUTH_TOKEN NPM_TOKEN || true
|
|
33
|
+
rm -f .npmrc "$HOME/.npmrc" || true
|
|
34
|
+
npm config delete //registry.npmjs.org/:_authToken 2>/dev/null || true
|
|
35
|
+
npm config set registry https://registry.npmjs.org/
|
|
36
|
+
echo "NODE_AUTH_TOKEN=${NODE_AUTH_TOKEN-<unset>}"
|
|
37
|
+
echo "ACTIONS_ID_TOKEN_REQUEST_URL=${ACTIONS_ID_TOKEN_REQUEST_URL:+set}"
|
|
38
|
+
echo "ACTIONS_ID_TOKEN_REQUEST_TOKEN=${ACTIONS_ID_TOKEN_REQUEST_TOKEN:+set}"
|
|
39
|
+
npm config list 2>/dev/null | grep -E "registry|auth|token" || true
|
|
40
|
+
cat "$HOME/.npmrc" 2>/dev/null || echo "(no ~/.npmrc)"
|
|
41
|
+
|
|
42
|
+
- name: Publish to npmjs (Trusted Publishing / OIDC)
|
|
43
|
+
run: |
|
|
44
|
+
unset NODE_AUTH_TOKEN NPM_TOKEN || true
|
|
45
|
+
npm publish --access public --loglevel verbose
|
package/.gitmodules
ADDED
package/AGENTS.md
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
## Ponto de entrada
|
|
2
|
+
|
|
3
|
+
- A documentação funcional e de regras deste modulo vive na wiki do proprio repositório e na wiki principal do app.
|
|
4
|
+
- Regras transversais de qualidade, modularizacao e limites de componente vivem em `https://github.com/ControleOnline/agents-mcp/blob/master/skills/shared/code-quality.md`.
|
|
5
|
+
- Quando houver detalhe especifico de implementacao, prefira comentar no codigo em ingles perto da regra.
|
|
6
|
+
- Este arquivo deve ficar curto e servir apenas como ponte para as fontes oficiais.
|
package/README.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# UI Common
|
|
2
|
+
|
|
3
|
+
Shared runtime, API, and cross-application utilities for ControleOnline clients.
|
|
4
|
+
|
|
5
|
+
## Device request identity
|
|
6
|
+
|
|
7
|
+
Authenticated device requests send the `DEVICE` identifier and, when available, its matching operational `DEVICE-TYPE`. The runtime resolves the `POS` application view to the canonical sales device type `PDV` before persisting the device context.
|
|
8
|
+
|
|
9
|
+
## Links obrigatorios
|
|
10
|
+
|
|
11
|
+
- [Documentacao para clientes](http://ajuda.controleonline.com/)
|
|
12
|
+
- [Site institucional](http://controleonline.com/)
|
|
13
|
+
- [Wiki tecnica](https://github.com/ControleOnline/ui-common/wiki)
|
|
14
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@controleonline/ui-common",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.76",
|
|
4
4
|
"author": "ControleOnline",
|
|
5
5
|
"description": "ControleOnline Common Quasar UI Component",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"last 1 version, not dead, ie >= 11"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@controleonline/ui-default": "*"
|
|
29
|
+
"@controleonline/ui-default": "*",
|
|
30
|
+
"md5": "^2.3.0"
|
|
30
31
|
}
|
|
31
32
|
}
|
package/src/api/fetch.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { APP_ENV
|
|
1
|
+
import {env as APP_ENV} from '@env';
|
|
2
2
|
import resolveSystemErrorMessage from '@controleonline/ui-common/src/react/utils/systemErrorMessage';
|
|
3
3
|
import {resolveApiEntryPoint} from '@controleonline/ui-common/src/utils/apiEntryPoint';
|
|
4
4
|
|