@ghl-ai/aw 0.1.89 → 0.1.90
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/commands/push.mjs +13 -6
- package/package.json +1 -1
package/commands/push.mjs
CHANGED
|
@@ -155,10 +155,12 @@ function normalizeRelPath(value) {
|
|
|
155
155
|
|
|
156
156
|
// Root namespaces publish at the AW docs root (aw_docs/<ns>/...), mirroring the
|
|
157
157
|
// local .aw_docs/<ns>/... subtree 1:1 — NO per-workspace <repo>/<user> segment
|
|
158
|
-
// and full nested folders. Use for shared,
|
|
159
|
-
// reviews (pr-reviews/<owner>/<repo>/pr-<n>/<run>)
|
|
160
|
-
//
|
|
161
|
-
|
|
158
|
+
// and full nested folders. Use for shared, resource-keyed doc trees such as PR
|
|
159
|
+
// reviews (pr-reviews/<owner>/<repo>/pr-<n>/<run>), security audits
|
|
160
|
+
// (security-audits/<repo>/<date>), support ticket investigations
|
|
161
|
+
// (support-tickets/<ticketId>), and infra incident RCAs (incidents/<fingerprint>)
|
|
162
|
+
// so they do not land under the runner's workspace namespace as one mangled flat slug.
|
|
163
|
+
const AW_DOCS_ROOT_NAMESPACES = ['pr-reviews', 'security-audits', 'support-tickets', 'incidents'];
|
|
162
164
|
|
|
163
165
|
// Compound root prefixes (multi-segment). Longest match wins in matchRootPrefix().
|
|
164
166
|
const AW_DOCS_ROOT_PREFIX_RULES = [
|
|
@@ -174,9 +176,13 @@ const AW_DOCS_ROOT_PREFIX_RULES = [
|
|
|
174
176
|
// pr-reviews/<repo>/pr-<number>/<run> → 4 segments
|
|
175
177
|
// security-audits/<repo>/<date> → 3 segments
|
|
176
178
|
// security/audit/<repo>/<run-id> → 4 segments
|
|
179
|
+
// support-tickets/<ticketId> → 2 segments
|
|
180
|
+
// incidents/<fingerprint> → 2 segments
|
|
177
181
|
const AW_DOCS_ROOT_MIN_SEGMENTS = {
|
|
178
182
|
'pr-reviews': 4,
|
|
179
183
|
'security-audits': 3,
|
|
184
|
+
'support-tickets': 2,
|
|
185
|
+
'incidents': 2,
|
|
180
186
|
};
|
|
181
187
|
|
|
182
188
|
function normalizeAwDocsRootInput(stripped) {
|
|
@@ -214,7 +220,8 @@ function awDocsRootScope(relPath) {
|
|
|
214
220
|
if (!rule || segments.length < rule.minSegments) {
|
|
215
221
|
throw new Error(
|
|
216
222
|
'Root-scope docs publish must target pr-reviews/<repo>/pr-<number>/<run>, ' +
|
|
217
|
-
'security-audits/<repo>/<date>,
|
|
223
|
+
'security-audits/<repo>/<date>, security/audit/<repo>/<run-id>, ' +
|
|
224
|
+
'support-tickets/<ticketId>, or incidents/<fingerprint>, ' +
|
|
218
225
|
`got "${relPath}".`
|
|
219
226
|
);
|
|
220
227
|
}
|
|
@@ -237,7 +244,7 @@ function featureScopeFromInput(input) {
|
|
|
237
244
|
|
|
238
245
|
const match = value.match(/^(?:\.aw_docs\/)?features\/([^/]+)$/);
|
|
239
246
|
if (!match) {
|
|
240
|
-
throw new Error('Docs-only publish path must be .aw_docs/features/<feature-slug>, .aw_docs/pr-reviews/<...>, .aw_docs/security-audits/<...> (or legacy .aw_docs/security/audit/<...>), or use --feature <feature-slug>.');
|
|
247
|
+
throw new Error('Docs-only publish path must be .aw_docs/features/<feature-slug>, .aw_docs/pr-reviews/<...>, .aw_docs/security-audits/<...>, .aw_docs/support-tickets/<...>, .aw_docs/incidents/<...> (or legacy .aw_docs/security/audit/<...>), or use --feature <feature-slug>.');
|
|
241
248
|
}
|
|
242
249
|
return awDocsFeatureScope(match[1]);
|
|
243
250
|
}
|