@storewright/cli 0.14.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.
Files changed (67) hide show
  1. package/README.md +19 -0
  2. package/VERSION +1 -0
  3. package/bin/storewright.mjs +62 -0
  4. package/contracts/action-registry.json +175 -0
  5. package/contracts/capability-registry.json +63 -0
  6. package/contracts/workflow-manifest.json +207 -0
  7. package/lib/cli/storewright-cli.mjs +259 -0
  8. package/lib/internal/launch-envelope.mjs +223 -0
  9. package/lib/internal/multi-agent-contracts.mjs +137 -0
  10. package/lib/internal/operation-ledger.mjs +190 -0
  11. package/lib/internal/pricing/default-preview-pricing.mjs +181 -0
  12. package/lib/internal/run-state-helpers.mjs +313 -0
  13. package/lib/internal/shopify-operation-adapter.mjs +456 -0
  14. package/package.json +38 -0
  15. package/schemas/action-registry.schema.json +11 -0
  16. package/schemas/agent-report.schema.json +14 -0
  17. package/schemas/approval-grant.schema.json +16 -0
  18. package/schemas/base-theme-report.schema.json +25 -0
  19. package/schemas/brand-identity.schema.json +142 -0
  20. package/schemas/capability-registry.schema.json +11 -0
  21. package/schemas/competitor-audit.schema.json +38 -0
  22. package/schemas/design-direction.schema.json +64 -0
  23. package/schemas/external-operation.schema.json +34 -0
  24. package/schemas/intake-blocked-report.schema.json +76 -0
  25. package/schemas/launch-envelope.schema.json +25 -0
  26. package/schemas/launch-readiness.schema.json +73 -0
  27. package/schemas/media-file-inspection-report.schema.json +223 -0
  28. package/schemas/media-manifest.schema.json +84 -0
  29. package/schemas/merchandising-brief.schema.json +27 -0
  30. package/schemas/normalized-product-catalog.schema.json +42 -0
  31. package/schemas/product-content-generation-input.schema.json +40 -0
  32. package/schemas/product-content-generation-output.schema.json +43 -0
  33. package/schemas/raw-product-candidates.schema.json +32 -0
  34. package/schemas/shopify-access-preflight-report.schema.json +213 -0
  35. package/schemas/shopify-content-sync-report.schema.json +190 -0
  36. package/schemas/shopify-media-map.schema.json +87 -0
  37. package/schemas/shopify-media-upload-report.schema.json +96 -0
  38. package/schemas/shopify-operation-request.schema.json +81 -0
  39. package/schemas/shopify-preflight-report.schema.json +187 -0
  40. package/schemas/store-blueprint.schema.json +112 -0
  41. package/schemas/store-content-generation-output.schema.json +102 -0
  42. package/schemas/store-intake.schema.json +205 -0
  43. package/schemas/store-ops-plan.schema.json +82 -0
  44. package/schemas/storefront-preview-review.schema.json +227 -0
  45. package/schemas/supplier-access-report.schema.json +36 -0
  46. package/schemas/supplier-extraction-report.schema.json +185 -0
  47. package/schemas/theme-build-report.schema.json +43 -0
  48. package/schemas/theme-code-change-summary.schema.json +65 -0
  49. package/schemas/theme-plan.schema.json +26 -0
  50. package/schemas/theme-push-report.schema.json +151 -0
  51. package/schemas/theme-workspace-validation-report.schema.json +61 -0
  52. package/schemas/workflow-manifest.schema.json +29 -0
  53. package/scripts/audit-run-state.mjs +472 -0
  54. package/scripts/execute-shopify-operation.mjs +190 -0
  55. package/scripts/generate-image-assets-openai.mjs +342 -0
  56. package/scripts/generate-media-assets.mjs +121 -0
  57. package/scripts/init-run-state.mjs +69 -0
  58. package/scripts/inspect-media-files.mjs +334 -0
  59. package/scripts/prepare-launch-envelope.mjs +47 -0
  60. package/scripts/shopify-access-preflight.mjs +432 -0
  61. package/scripts/upload-shopify-media.mjs +831 -0
  62. package/scripts/validate-agent-report.mjs +46 -0
  63. package/scripts/validate-artifact.mjs +196 -0
  64. package/scripts/validate-launch-envelope.mjs +50 -0
  65. package/scripts/validate-registries.mjs +50 -0
  66. package/scripts/validate-workflow-manifest.mjs +38 -0
  67. package/scripts/version.mjs +192 -0
@@ -0,0 +1,142 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://example.local/storewright/brand-identity.schema.json",
4
+ "title": "Storewright Brand Identity",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "runId", "authoring", "brandIdentity"],
8
+ "properties": {
9
+ "schemaVersion": { "type": "string", "const": "1.0.0" },
10
+ "runId": { "type": "string", "minLength": 1 },
11
+ "authoring": {
12
+ "type": "object",
13
+ "additionalProperties": false,
14
+ "required": ["mode", "createdBy", "sourceInputArtifacts"],
15
+ "properties": {
16
+ "mode": { "type": "string", "const": "agent-authored" },
17
+ "createdBy": { "type": "string", "minLength": 1 },
18
+ "sourceInputArtifacts": {
19
+ "type": "array",
20
+ "minItems": 1,
21
+ "items": { "type": "string", "minLength": 1 }
22
+ }
23
+ }
24
+ },
25
+ "brandIdentity": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": [
29
+ "mode",
30
+ "candidates",
31
+ "selectedName",
32
+ "positioning",
33
+ "desiredImpression",
34
+ "selectionPrinciples",
35
+ "brandValues",
36
+ "voice",
37
+ "claimsPolicy",
38
+ "identityRationale",
39
+ "domainAndConflictReview",
40
+ "domainChecks"
41
+ ],
42
+ "properties": {
43
+ "mode": { "type": "string", "enum": ["user-provided", "agent-generated"] },
44
+ "selectedName": { "type": "string", "minLength": 1 },
45
+ "positioning": { "type": "string", "minLength": 1 },
46
+ "desiredImpression": { "type": "string", "minLength": 1 },
47
+ "selectionPrinciples": {
48
+ "type": "array",
49
+ "minItems": 1,
50
+ "items": { "type": "string", "minLength": 1 }
51
+ },
52
+ "brandValues": {
53
+ "type": "array",
54
+ "minItems": 1,
55
+ "items": { "type": "string", "minLength": 1 }
56
+ },
57
+ "voice": {
58
+ "type": "array",
59
+ "minItems": 1,
60
+ "items": { "type": "string", "minLength": 1 }
61
+ },
62
+ "claimsPolicy": {
63
+ "type": "object",
64
+ "additionalProperties": false,
65
+ "required": ["provenFacts", "agentPositioningOnly", "forbiddenClaims"],
66
+ "properties": {
67
+ "provenFacts": {
68
+ "type": "array",
69
+ "items": { "type": "string", "minLength": 1 }
70
+ },
71
+ "agentPositioningOnly": {
72
+ "type": "array",
73
+ "items": { "type": "string", "minLength": 1 }
74
+ },
75
+ "forbiddenClaims": {
76
+ "type": "array",
77
+ "items": { "type": "string", "minLength": 1 }
78
+ }
79
+ }
80
+ },
81
+ "identityRationale": { "type": "string", "minLength": 1 },
82
+ "domainAndConflictReview": {
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": ["summary", "riskLevel"],
86
+ "properties": {
87
+ "summary": { "type": "string", "minLength": 1 },
88
+ "riskLevel": { "type": "string", "enum": ["low", "medium", "high", "unknown"] },
89
+ "notes": { "type": "string" }
90
+ }
91
+ },
92
+ "candidates": {
93
+ "type": "array",
94
+ "minItems": 1,
95
+ "items": {
96
+ "type": "object",
97
+ "additionalProperties": false,
98
+ "required": ["name", "meaning", "categoryFit", "riskLevel"],
99
+ "properties": {
100
+ "name": { "type": "string", "minLength": 1 },
101
+ "meaning": { "type": "string" },
102
+ "categoryFit": { "type": "string" },
103
+ "recommendedDomains": {
104
+ "type": "array",
105
+ "items": { "type": "string" }
106
+ },
107
+ "riskLevel": { "type": "string", "enum": ["low", "medium", "high", "unknown"] },
108
+ "notes": { "type": "string" }
109
+ }
110
+ }
111
+ },
112
+ "domainChecks": {
113
+ "type": "array",
114
+ "items": {
115
+ "type": "object",
116
+ "additionalProperties": false,
117
+ "required": ["domain", "status", "signals"],
118
+ "properties": {
119
+ "domain": { "type": "string", "minLength": 1 },
120
+ "status": { "type": "string", "enum": ["available-signal", "occupied-signal", "unknown", "unavailable"] },
121
+ "signals": { "type": "array", "items": { "type": "string" } },
122
+ "checkedAt": { "type": "string" }
123
+ }
124
+ }
125
+ },
126
+ "conflictChecks": {
127
+ "type": "array",
128
+ "items": {
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "required": ["name", "riskLevel", "notes"],
132
+ "properties": {
133
+ "name": { "type": "string" },
134
+ "riskLevel": { "type": "string", "enum": ["low", "medium", "high", "unknown"] },
135
+ "notes": { "type": "string" }
136
+ }
137
+ }
138
+ }
139
+ }
140
+ }
141
+ }
142
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "type": "object",
3
+ "required": ["schemaVersion", "profiles"],
4
+ "properties": {
5
+ "schemaVersion": { "const": "1.0.0" },
6
+ "profiles": {
7
+ "type": "object"
8
+ }
9
+ },
10
+ "additionalProperties": false
11
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://example.local/storewright/competitor-audit.schema.json",
4
+ "title": "Storewright Competitor Audit",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "runId", "competitorAudit"],
8
+ "properties": {
9
+ "schemaVersion": { "type": "string", "const": "1.0.0" },
10
+ "runId": { "type": "string", "minLength": 1 },
11
+ "competitorAudit": {
12
+ "type": "object",
13
+ "additionalProperties": false,
14
+ "required": ["competitors", "summary"],
15
+ "properties": {
16
+ "competitors": {
17
+ "type": "array",
18
+ "items": {
19
+ "type": "object",
20
+ "additionalProperties": false,
21
+ "required": ["url", "navigation", "priceBands", "conversionPatterns"],
22
+ "properties": {
23
+ "url": { "type": "string", "format": "uri" },
24
+ "navigation": { "type": "array", "items": { "type": "string" } },
25
+ "homepageSections": { "type": "array", "items": { "type": "string" } },
26
+ "categories": { "type": "array", "items": { "type": "string" } },
27
+ "priceBands": { "type": "array", "items": { "type": "string" } },
28
+ "conversionPatterns": { "type": "array", "items": { "type": "string" } },
29
+ "seoPatterns": { "type": "array", "items": { "type": "string" } },
30
+ "policyCoverage": { "type": "array", "items": { "type": "string" } }
31
+ }
32
+ }
33
+ },
34
+ "summary": { "type": "string", "minLength": 1 }
35
+ }
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,64 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://example.local/storewright/design-direction.schema.json",
4
+ "title": "Storewright Design Direction",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "runId", "authoring", "designDirection"],
8
+ "properties": {
9
+ "schemaVersion": { "type": "string", "const": "1.0.0" },
10
+ "runId": { "type": "string", "minLength": 1 },
11
+ "authoring": {
12
+ "type": "object",
13
+ "additionalProperties": false,
14
+ "required": ["mode", "createdBy", "sourceInputArtifacts"],
15
+ "properties": {
16
+ "mode": { "type": "string", "const": "agent-authored" },
17
+ "createdBy": { "type": "string", "minLength": 1 },
18
+ "sourceInputArtifacts": {
19
+ "type": "array",
20
+ "minItems": 1,
21
+ "items": { "type": "string", "minLength": 1 }
22
+ }
23
+ }
24
+ },
25
+ "designDirection": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": ["positioning", "layoutDensity", "colorRoles", "typography", "do", "dont"],
29
+ "properties": {
30
+ "positioning": { "type": "string", "minLength": 1 },
31
+ "layoutDensity": { "type": "string", "enum": ["spacious", "standard", "dense"] },
32
+ "colorRoles": {
33
+ "type": "array",
34
+ "items": {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "required": ["role", "value", "usage"],
38
+ "properties": {
39
+ "role": { "type": "string" },
40
+ "value": { "type": "string" },
41
+ "usage": { "type": "string" }
42
+ }
43
+ }
44
+ },
45
+ "typography": {
46
+ "type": "object",
47
+ "additionalProperties": false,
48
+ "required": ["heading", "body"],
49
+ "properties": {
50
+ "heading": { "type": "string" },
51
+ "body": { "type": "string" },
52
+ "scale": { "type": "string" }
53
+ }
54
+ },
55
+ "spacingScale": { "type": "array", "items": { "type": "string" } },
56
+ "sectionRhythm": { "type": "string" },
57
+ "motion": { "type": "string" },
58
+ "references": { "type": "array", "items": { "type": "string" } },
59
+ "do": { "type": "array", "items": { "type": "string" } },
60
+ "dont": { "type": "array", "items": { "type": "string" } }
61
+ }
62
+ }
63
+ }
64
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "type": "object",
3
+ "required": ["schemaVersion", "operationId", "actionId", "status", "recordedAt"],
4
+ "properties": {
5
+ "schemaVersion": { "const": "1.0.0" },
6
+ "operationId": { "type": "string", "minLength": 1 },
7
+ "operationKey": { "type": "string" },
8
+ "actionId": { "type": "string", "minLength": 1 },
9
+ "launchEnvelopeSha256": { "type": "string" },
10
+ "targetStore": { "type": "string" },
11
+ "apiVersion": { "type": "string" },
12
+ "requestFingerprint": { "type": "string" },
13
+ "naturalResourceKey": { "type": "string" },
14
+ "providerIdempotencySupported": { "type": "boolean" },
15
+ "resourceType": { "type": "string" },
16
+ "resourceId": {
17
+ "anyOf": [
18
+ { "type": "string" },
19
+ { "const": null }
20
+ ]
21
+ },
22
+ "resourceOwnership": { "type": "string" },
23
+ "status": { "enum": ["prepared", "dispatched", "succeeded", "failed", "indeterminate", "reconciled", "compensated"] },
24
+ "reconcileStrategy": { "type": "string" },
25
+ "compensation": {
26
+ "anyOf": [
27
+ { "type": "object" },
28
+ { "const": null }
29
+ ]
30
+ },
31
+ "recordedAt": { "type": "string", "minLength": 1 }
32
+ },
33
+ "additionalProperties": true
34
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://example.local/storewright/intake-blocked-report.schema.json",
4
+ "title": "Official Intake Blocked Report",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "runId", "intakeBlockedReport"],
7
+ "properties": {
8
+ "schemaVersion": { "type": "string" },
9
+ "runId": { "type": "string" },
10
+ "intakeBlockedReport": {
11
+ "type": "object",
12
+ "required": ["missingRequiredFields", "fieldDefinitions", "intakeReview"],
13
+ "properties": {
14
+ "missingRequiredFields": {
15
+ "type": "array",
16
+ "items": { "type": "string" }
17
+ },
18
+ "fieldDefinitions": {
19
+ "type": "array",
20
+ "items": {
21
+ "type": "object",
22
+ "required": ["field", "definition"],
23
+ "properties": {
24
+ "field": { "type": "string" },
25
+ "definition": { "type": "string" }
26
+ }
27
+ }
28
+ },
29
+ "intakeReview": {
30
+ "type": "object",
31
+ "required": [
32
+ "recognizedFields",
33
+ "missingRequiredFields",
34
+ "optionalClarificationItems",
35
+ "leadPromptRecommendation"
36
+ ],
37
+ "properties": {
38
+ "recognizedFields": {
39
+ "type": "array",
40
+ "items": {
41
+ "type": "object",
42
+ "required": ["field", "status", "evidence"],
43
+ "properties": {
44
+ "field": { "type": "string" },
45
+ "status": { "type": "string" },
46
+ "evidence": { "type": "string" }
47
+ }
48
+ }
49
+ },
50
+ "missingRequiredFields": {
51
+ "type": "array",
52
+ "items": { "type": "string" }
53
+ },
54
+ "optionalClarificationItems": {
55
+ "type": "array",
56
+ "items": {
57
+ "type": "object",
58
+ "required": ["field", "status", "prompt", "skipBehavior"],
59
+ "properties": {
60
+ "field": { "type": "string" },
61
+ "status": { "type": "string" },
62
+ "prompt": { "type": "string" },
63
+ "skipBehavior": { "type": "string" }
64
+ }
65
+ }
66
+ },
67
+ "leadPromptRecommendation": {
68
+ "type": "string",
69
+ "enum": ["blocked-required", "nonblocking-optional", "none"]
70
+ }
71
+ }
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "type": "object",
3
+ "required": ["schemaVersion", "run", "stage", "attempt", "launchEnvelopePath", "ownerProfile", "runtimeAgentType", "packetPath", "specPath", "gateSpecPath", "actionPolicyRef", "requestedRuntimePolicy", "runtimeToolSnapshot", "effectiveAllowedActions", "resolvedInputs", "declaredOutputs", "pathConstraints"],
4
+ "properties": {
5
+ "schemaVersion": { "const": "1.0.0" },
6
+ "run": { "type": "object" },
7
+ "stage": { "type": "object" },
8
+ "attempt": { "type": "object" },
9
+ "launchEnvelopePath": { "type": "string", "minLength": 1 },
10
+ "ownerProfile": { "type": "string", "minLength": 1 },
11
+ "runtimeAgentType": { "type": "string", "minLength": 1 },
12
+ "packetPath": { "type": "string", "minLength": 1 },
13
+ "specPath": { "type": "string", "minLength": 1 },
14
+ "gateSpecPath": { "type": "string", "minLength": 1 },
15
+ "actionPolicyRef": { "type": "string", "minLength": 1 },
16
+ "requestedRuntimePolicy": { "type": "object" },
17
+ "runtimeToolSnapshot": { "type": "array" },
18
+ "effectiveAllowedActions": { "type": "array" },
19
+ "resolvedInputs": { "type": "array" },
20
+ "declaredOutputs": { "type": "array" },
21
+ "pathConstraints": { "type": "object" },
22
+ "launchEnvelopeSha256": { "type": "string" }
23
+ },
24
+ "additionalProperties": false
25
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://example.local/storewright/launch-readiness.schema.json",
4
+ "title": "Official Launch Readiness",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "runId", "launchReadiness"],
8
+ "properties": {
9
+ "schemaVersion": { "type": "string", "const": "1.0.0" },
10
+ "runId": { "type": "string", "minLength": 1 },
11
+ "launchReadiness": {
12
+ "type": "object",
13
+ "additionalProperties": false,
14
+ "required": ["levels", "brandStoryReadiness", "blockers", "warnings", "manualLaunchSteps"],
15
+ "properties": {
16
+ "levels": {
17
+ "type": "object",
18
+ "additionalProperties": false,
19
+ "required": [
20
+ "previewReady",
21
+ "merchandisingReady",
22
+ "productCatalogReady",
23
+ "contentReady",
24
+ "storeOpsReady",
25
+ "launchReady"
26
+ ],
27
+ "properties": {
28
+ "previewReady": { "type": "boolean" },
29
+ "merchandisingReady": { "type": "boolean" },
30
+ "productCatalogReady": { "type": "boolean" },
31
+ "contentReady": { "type": "boolean" },
32
+ "storeOpsReady": { "type": "boolean" },
33
+ "launchReady": { "type": "boolean" }
34
+ }
35
+ },
36
+ "brandStoryReadiness": {
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "required": ["pageHandle", "status", "checks"],
40
+ "properties": {
41
+ "pageHandle": { "type": "string", "const": "our-story" },
42
+ "status": { "type": "string", "enum": ["pass", "warning", "repairable", "blocked"] },
43
+ "checks": {
44
+ "type": "array",
45
+ "items": {
46
+ "type": "object",
47
+ "additionalProperties": false,
48
+ "required": ["name", "status"],
49
+ "properties": {
50
+ "name": {
51
+ "type": "string",
52
+ "enum": [
53
+ "page-present",
54
+ "synced-to-shopify",
55
+ "minimum-sections",
56
+ "thin-content",
57
+ "unsupported-factual-claims"
58
+ ]
59
+ },
60
+ "status": { "type": "string", "enum": ["pass", "warning", "repairable", "blocked"] },
61
+ "detail": { "type": "string" }
62
+ }
63
+ }
64
+ }
65
+ }
66
+ },
67
+ "blockers": { "type": "array", "items": { "type": "string" } },
68
+ "warnings": { "type": "array", "items": { "type": "string" } },
69
+ "manualLaunchSteps": { "type": "array", "items": { "type": "string" } }
70
+ }
71
+ }
72
+ }
73
+ }