@open-mercato/cli 0.6.7-develop.6694.1.a06be5605e → 0.6.7-develop.6696.1.4236709f7e
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/dist/agentic/guides/module-facts.json +108 -108
- package/dist/agentic/guides/modules/ai_assistant.md +1 -1
- package/dist/agentic/guides/modules/api_docs.md +1 -1
- package/dist/agentic/guides/modules/api_keys.md +1 -1
- package/dist/agentic/guides/modules/attachments.md +1 -1
- package/dist/agentic/guides/modules/audit_logs.md +1 -1
- package/dist/agentic/guides/modules/auth.md +1 -1
- package/dist/agentic/guides/modules/business_rules.md +1 -1
- package/dist/agentic/guides/modules/catalog.md +1 -1
- package/dist/agentic/guides/modules/channel_gmail.md +1 -1
- package/dist/agentic/guides/modules/channel_imap.md +1 -1
- package/dist/agentic/guides/modules/checkout.md +1 -1
- package/dist/agentic/guides/modules/communication_channels.md +1 -1
- package/dist/agentic/guides/modules/configs.md +1 -1
- package/dist/agentic/guides/modules/content.md +1 -1
- package/dist/agentic/guides/modules/currencies.md +1 -1
- package/dist/agentic/guides/modules/customer_accounts.md +1 -1
- package/dist/agentic/guides/modules/customers.md +1 -1
- package/dist/agentic/guides/modules/dashboards.md +1 -1
- package/dist/agentic/guides/modules/data_sync.md +1 -1
- package/dist/agentic/guides/modules/dictionaries.md +1 -1
- package/dist/agentic/guides/modules/directory.md +1 -1
- package/dist/agentic/guides/modules/entities.md +1 -1
- package/dist/agentic/guides/modules/events.md +1 -1
- package/dist/agentic/guides/modules/feature_toggles.md +1 -1
- package/dist/agentic/guides/modules/gateway_stripe.md +1 -1
- package/dist/agentic/guides/modules/generators.md +1 -1
- package/dist/agentic/guides/modules/inbox_ops.md +1 -1
- package/dist/agentic/guides/modules/integrations.md +1 -1
- package/dist/agentic/guides/modules/messages.md +1 -1
- package/dist/agentic/guides/modules/notifications.md +1 -1
- package/dist/agentic/guides/modules/onboarding.md +1 -1
- package/dist/agentic/guides/modules/payment_gateways.md +1 -1
- package/dist/agentic/guides/modules/perspectives.md +1 -1
- package/dist/agentic/guides/modules/planner.md +1 -1
- package/dist/agentic/guides/modules/portal.md +1 -1
- package/dist/agentic/guides/modules/progress.md +1 -1
- package/dist/agentic/guides/modules/query_index.md +1 -1
- package/dist/agentic/guides/modules/record_locks.md +1 -1
- package/dist/agentic/guides/modules/resources.md +1 -1
- package/dist/agentic/guides/modules/sales.md +1 -1
- package/dist/agentic/guides/modules/scheduler.md +1 -1
- package/dist/agentic/guides/modules/search.md +1 -1
- package/dist/agentic/guides/modules/security.md +1 -1
- package/dist/agentic/guides/modules/shipping_carriers.md +1 -1
- package/dist/agentic/guides/modules/sso.md +1 -1
- package/dist/agentic/guides/modules/staff.md +1 -1
- package/dist/agentic/guides/modules/storage_s3.md +1 -1
- package/dist/agentic/guides/modules/sync_akeneo.md +1 -1
- package/dist/agentic/guides/modules/sync_excel.md +1 -1
- package/dist/agentic/guides/modules/system_status_overlays.md +1 -1
- package/dist/agentic/guides/modules/translations.md +1 -1
- package/dist/agentic/guides/modules/webhooks.md +1 -1
- package/dist/agentic/guides/modules/wms.md +1 -1
- package/dist/agentic/guides/modules/workflows.md +1 -1
- package/dist/agentic/guides/upstream/manifest.json +1 -1
- package/dist/agentic/shared/ai/skills/om-help/references/delivery-workflows.md +1 -0
- package/dist/agentic/shared/ai/skills/om-share-this-session/SKILL.md +41 -0
- package/dist/agentic/shared/ai/skills/om-share-this-session/references/agentic-setup.md +19 -0
- package/dist/agentic/shared/ai/skills/om-share-this-session/references/bundle-preparation.md +44 -0
- package/dist/agentic/shared/ai/skills/om-share-this-session/references/consent-and-review.md +39 -0
- package/dist/agentic/shared/ai/skills/om-share-this-session/references/publication.md +20 -0
- package/dist/agentic/shared/ai/skills/om-share-this-session/references/report-templates.md +57 -0
- package/dist/agentic/shared/ai/skills/om-share-this-session/references/rules.md +11 -0
- package/dist/agentic/shared/ai/skills/om-share-this-session/scripts/prepare-share-bundle.mjs +486 -0
- package/dist/agentic/shared/ai/skills/tiers.json +1 -0
- package/dist/agentic/shared/ai/trackers/github.md +106 -3
- package/package.json +5 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Tracker provider: GitHub
|
|
2
2
|
|
|
3
|
-
This file is the GitHub implementation of the tracker operations contract (see `TEMPLATE.md` for the contract itself).
|
|
3
|
+
This file is the GitHub implementation of the tracker operations contract (see `TEMPLATE.md` for the contract itself). Skills perform issue/PR state management through **named tracker operations** — `**get-issue**`, `**comment-pr**`, and so on — and this file defines what each operation means for GitHub, using the `gh` CLI.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
At runtime: `om-setup-agent-pipeline` copies this file into the repository at `.ai/trackers/github.md`, and the config's `tracker` field selects it. When a skill says "tracker operation **get-pr**", execute the command documented under that operation heading in the repo's copy. The repo's copy is authoritative: teams extend or override any operation by editing it, and every skill picks the change up on its next run. An operation not covered by an edit keeps its behavior from this file's text as copied.
|
|
6
6
|
|
|
7
7
|
## Prerequisites
|
|
8
8
|
|
|
@@ -98,6 +98,84 @@ BASE_BRANCH=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
|
|
|
98
98
|
[ -z "$BASE_BRANCH" ] && BASE_BRANCH="main"
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
+
### Public session-share artifacts
|
|
102
|
+
|
|
103
|
+
#### publish-session-share
|
|
104
|
+
`{owner}/{repo}`, `{branch}`, `{shareName}`, and a local `{bundleDir}` → atomically publish the four reviewed session-share artifacts on a new public branch and return repository, branch, commit, branch URL, and raw artifact URLs as JSON.
|
|
105
|
+
|
|
106
|
+
This operation is intentionally strict: the repository must already be public; the branch must be a new slash-free `session-share-…` ref; and the bundle directory must contain regular, non-symlinked `session.json`, `generated-files.zip`, `manifest.json`, and `privacy-report.json` files within the documented size cap. Git blobs, a tree, and a commit are created first; the public ref is created last, so a preparation failure does not expose a partial branch.
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
TARGET_REPO="{owner}/{repo}"
|
|
110
|
+
SHARE_BRANCH="{branch}"
|
|
111
|
+
SHARE_NAME="{shareName}"
|
|
112
|
+
BUNDLE_DIR="{bundleDir}"
|
|
113
|
+
printf '%s' "$TARGET_REPO" | grep -Eq '^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$' || exit 1
|
|
114
|
+
printf '%s' "$SHARE_NAME" | grep -Eq '^[a-z0-9][a-z0-9-]{1,46}[a-z0-9]$' || exit 1
|
|
115
|
+
[ "$SHARE_BRANCH" = "session-share-$SHARE_NAME" ] || exit 1
|
|
116
|
+
[ "$(gh repo view "$TARGET_REPO" --json visibility --jq .visibility)" = "PUBLIC" ] || exit 1
|
|
117
|
+
gh api "repos/${TARGET_REPO}/git/ref/heads/${SHARE_BRANCH}" >/dev/null 2>&1 && exit 1
|
|
118
|
+
|
|
119
|
+
SESSION_SHARE_TMP=$(mktemp -d)
|
|
120
|
+
trap 'rm -rf "$SESSION_SHARE_TMP"' EXIT HUP INT TERM
|
|
121
|
+
printf '[]\n' > "$SESSION_SHARE_TMP/tree.json"
|
|
122
|
+
TOTAL_BYTES=0
|
|
123
|
+
for ARTIFACT in session.json generated-files.zip manifest.json privacy-report.json; do
|
|
124
|
+
ARTIFACT_PATH="$BUNDLE_DIR/$ARTIFACT"
|
|
125
|
+
[ -f "$ARTIFACT_PATH" ] && [ ! -L "$ARTIFACT_PATH" ] || exit 1
|
|
126
|
+
ARTIFACT_BYTES=$(wc -c < "$ARTIFACT_PATH" | tr -d ' ')
|
|
127
|
+
TOTAL_BYTES=$((TOTAL_BYTES + ARTIFACT_BYTES))
|
|
128
|
+
[ "$ARTIFACT_BYTES" -le 26214400 ] && [ "$TOTAL_BYTES" -le 31457280 ] || exit 1
|
|
129
|
+
done
|
|
130
|
+
|
|
131
|
+
for ARTIFACT in session.json generated-files.zip manifest.json privacy-report.json; do
|
|
132
|
+
ARTIFACT_PATH="$BUNDLE_DIR/$ARTIFACT"
|
|
133
|
+
base64 < "$ARTIFACT_PATH" | tr -d '\n' > "$SESSION_SHARE_TMP/content.b64"
|
|
134
|
+
BLOB_SHA=$(jq -n --rawfile content "$SESSION_SHARE_TMP/content.b64" '{content:$content,encoding:"base64"}' \
|
|
135
|
+
| gh api -X POST "repos/${TARGET_REPO}/git/blobs" --input - --jq .sha) || exit 1
|
|
136
|
+
jq --arg path "$ARTIFACT" --arg sha "$BLOB_SHA" \
|
|
137
|
+
'. + [{path:$path,mode:"100644",type:"blob",sha:$sha}]' \
|
|
138
|
+
"$SESSION_SHARE_TMP/tree.json" > "$SESSION_SHARE_TMP/tree.next.json" || exit 1
|
|
139
|
+
mv "$SESSION_SHARE_TMP/tree.next.json" "$SESSION_SHARE_TMP/tree.json"
|
|
140
|
+
done
|
|
141
|
+
|
|
142
|
+
DEFAULT_BRANCH=$(gh repo view "$TARGET_REPO" --json defaultBranchRef --jq .defaultBranchRef.name) || exit 1
|
|
143
|
+
BASE_COMMIT=$(gh api "repos/${TARGET_REPO}/git/ref/heads/${DEFAULT_BRANCH}" --jq .object.sha) || exit 1
|
|
144
|
+
BASE_TREE=$(gh api "repos/${TARGET_REPO}/git/commits/${BASE_COMMIT}" --jq .tree.sha) || exit 1
|
|
145
|
+
TREE_SHA=$(jq -n --arg base "$BASE_TREE" --slurpfile entries "$SESSION_SHARE_TMP/tree.json" \
|
|
146
|
+
'{base_tree:$base,tree:$entries[0]}' \
|
|
147
|
+
| gh api -X POST "repos/${TARGET_REPO}/git/trees" --input - --jq .sha) || exit 1
|
|
148
|
+
COMMIT_SHA=$(jq -n --arg message "session share ${SHARE_NAME}" --arg tree "$TREE_SHA" --arg parent "$BASE_COMMIT" \
|
|
149
|
+
'{message:$message,tree:$tree,parents:[$parent]}' \
|
|
150
|
+
| gh api -X POST "repos/${TARGET_REPO}/git/commits" --input - --jq .sha) || exit 1
|
|
151
|
+
jq -n --arg ref "refs/heads/${SHARE_BRANCH}" --arg sha "$COMMIT_SHA" '{ref:$ref,sha:$sha}' \
|
|
152
|
+
| gh api -X POST "repos/${TARGET_REPO}/git/refs" --input - >/dev/null || exit 1
|
|
153
|
+
|
|
154
|
+
jq -n \
|
|
155
|
+
--arg repository "$TARGET_REPO" \
|
|
156
|
+
--arg branch "$SHARE_BRANCH" \
|
|
157
|
+
--arg commit "$COMMIT_SHA" \
|
|
158
|
+
--arg branchUrl "https://github.com/${TARGET_REPO}/tree/${SHARE_BRANCH}" \
|
|
159
|
+
--arg sessionUrl "https://raw.githubusercontent.com/${TARGET_REPO}/${SHARE_BRANCH}/session.json" \
|
|
160
|
+
--arg archiveUrl "https://raw.githubusercontent.com/${TARGET_REPO}/${SHARE_BRANCH}/generated-files.zip" \
|
|
161
|
+
--arg manifestUrl "https://raw.githubusercontent.com/${TARGET_REPO}/${SHARE_BRANCH}/manifest.json" \
|
|
162
|
+
--arg privacyUrl "https://raw.githubusercontent.com/${TARGET_REPO}/${SHARE_BRANCH}/privacy-report.json" \
|
|
163
|
+
'{repository:$repository,branch:$branch,commit:$commit,branchUrl:$branchUrl,artifacts:{session:$sessionUrl,archive:$archiveUrl,manifest:$manifestUrl,privacy:$privacyUrl}}'
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
#### delete-session-share
|
|
167
|
+
`{owner}/{repo}`, `{branch}`, and `{shareName}` → remove only the exact derived session-share ref after a failed issue creation or an explicit retention cleanup request. Deleting a public ref cannot guarantee erasure from clones, forks, caches, logs, or archives.
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
TARGET_REPO="{owner}/{repo}"
|
|
171
|
+
SHARE_BRANCH="{branch}"
|
|
172
|
+
SHARE_NAME="{shareName}"
|
|
173
|
+
printf '%s' "$TARGET_REPO" | grep -Eq '^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$' || exit 1
|
|
174
|
+
printf '%s' "$SHARE_NAME" | grep -Eq '^[a-z0-9][a-z0-9-]{1,46}[a-z0-9]$' || exit 1
|
|
175
|
+
[ "$SHARE_BRANCH" = "session-share-$SHARE_NAME" ] || exit 1
|
|
176
|
+
gh api -X DELETE "repos/${TARGET_REPO}/git/refs/heads/${SHARE_BRANCH}"
|
|
177
|
+
```
|
|
178
|
+
|
|
101
179
|
### Issues
|
|
102
180
|
|
|
103
181
|
#### get-issue
|
|
@@ -109,7 +187,9 @@ gh issue view {issueId} --repo {owner}/{repo} --json number,title,body,state,aut
|
|
|
109
187
|
#### search-issues
|
|
110
188
|
Query (text, `in:title,body`, state) → matching issues.
|
|
111
189
|
```bash
|
|
112
|
-
|
|
190
|
+
ISSUE_STATE="{state}"
|
|
191
|
+
case "$ISSUE_STATE" in open|closed|all) ;; *) exit 1 ;; esac
|
|
192
|
+
gh issue list --repo {owner}/{repo} --state "$ISSUE_STATE" --search "<query> in:title,body" --json number,title,url
|
|
113
193
|
```
|
|
114
194
|
|
|
115
195
|
#### create-issue
|
|
@@ -130,6 +210,12 @@ gh issue close {issueId} --repo {owner}/{repo} --reason completed --comment "<co
|
|
|
130
210
|
gh issue comment {issueId} --repo {owner}/{repo} --body "<body>"
|
|
131
211
|
```
|
|
132
212
|
|
|
213
|
+
#### update-issue
|
|
214
|
+
`{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
|
+
```bash
|
|
216
|
+
gh issue edit {issueId} --repo {owner}/{repo} --title "<title>" --body-file <file>
|
|
217
|
+
```
|
|
218
|
+
|
|
133
219
|
#### assign-issue / unassign-issue
|
|
134
220
|
```bash
|
|
135
221
|
gh issue edit {issueId} --repo {owner}/{repo} --add-assignee "<login>"
|
|
@@ -151,6 +237,12 @@ gh api repos/{owner}/{repo}/issues/comments/{commentId} --jq '{body,user:.user.l
|
|
|
151
237
|
gh api repos/{owner}/{repo}/issues/{number}/comments --jq '.[] | {id,user:.user.login,body}'
|
|
152
238
|
```
|
|
153
239
|
|
|
240
|
+
#### update-comment
|
|
241
|
+
`{commentId}`, new body → rewrite an existing conversation comment in place (works for issue and PR conversation comments alike). This is how marker-idempotent comments (label rationale, verification, claim take-overs) are updated on re-runs: find your `🤖 …` marker via **list-issue-comments**, then update that comment instead of posting a new one. Use a body file so multi-line bodies survive.
|
|
242
|
+
```bash
|
|
243
|
+
gh api -X PATCH repos/{owner}/{repo}/issues/comments/{commentId} -F body=@<path>
|
|
244
|
+
```
|
|
245
|
+
|
|
154
246
|
### Pull requests
|
|
155
247
|
|
|
156
248
|
#### get-pr
|
|
@@ -181,6 +273,17 @@ PR_URL=$(gh pr view --json url --jq .url)
|
|
|
181
273
|
PR_NUMBER=$(gh pr view --json number --jq .number)
|
|
182
274
|
```
|
|
183
275
|
|
|
276
|
+
#### 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. Pass whichever of `--title` / `--body-file` changed; omit the other. Use a body file so multi-line bodies survive.
|
|
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:
|
|
283
|
+
```bash
|
|
284
|
+
gh api -X PATCH repos/{owner}/{repo}/pulls/{prNumber} -f title="<title>" -f body="$(cat <path>)"
|
|
285
|
+
```
|
|
286
|
+
|
|
184
287
|
#### comment-pr
|
|
185
288
|
`{prNumber}`, body. For long structured comments:
|
|
186
289
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/cli",
|
|
3
|
-
"version": "0.6.7-develop.
|
|
3
|
+
"version": "0.6.7-develop.6696.1.4236709f7e",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"@mikro-orm/decorators": "^7.1.5",
|
|
61
61
|
"@mikro-orm/migrations": "^7.1.5",
|
|
62
62
|
"@mikro-orm/postgresql": "^7.1.5",
|
|
63
|
-
"@open-mercato/queue": "0.6.7-develop.
|
|
64
|
-
"@open-mercato/shared": "0.6.7-develop.
|
|
63
|
+
"@open-mercato/queue": "0.6.7-develop.6696.1.4236709f7e",
|
|
64
|
+
"@open-mercato/shared": "0.6.7-develop.6696.1.4236709f7e",
|
|
65
65
|
"cross-spawn": "^7.0.6",
|
|
66
66
|
"pg": "8.22.0",
|
|
67
67
|
"semver": "^7.8.5",
|
|
@@ -72,10 +72,10 @@
|
|
|
72
72
|
"typescript-js": "npm:typescript@6.0.3"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@open-mercato/shared": "0.6.7-develop.
|
|
75
|
+
"@open-mercato/shared": "0.6.7-develop.6696.1.4236709f7e"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@open-mercato/shared": "0.6.7-develop.
|
|
78
|
+
"@open-mercato/shared": "0.6.7-develop.6696.1.4236709f7e",
|
|
79
79
|
"@types/jest": "^30.0.0",
|
|
80
80
|
"jest": "^30.4.2",
|
|
81
81
|
"ts-jest": "^29.4.11"
|