GSS Python reference implementation: provider API + CLI consumer
Project description
Global Support Standard (GSS)
Open protocol for machine-readable e-commerce support.
GSS lets any app, AI agent, or device resolve customer support requests directly with a shop using a consistent command model:
gss <shop> <domain> <action> [--flags]
This repository includes a Python reference implementation of the protocol and supporting project docs.
Why GSS
Most support requests are policy execution, not free-form conversation:
- "Where is my package?"
- "Can I return this item?"
- "Why is my refund delayed?"
- "Can you show my account audit trail?"
Today these flows are reimplemented per shop and routed through human agents. GSS standardizes these operations so support can be:
- Faster (seconds, not days)
- Consistent across shops
- Safer for automation (action levels, confirmation tokens, auditability)
- Consumer-agnostic (AI, mobile app, browser extension, device)
Repository At A Glance
| Area | Purpose |
|---|---|
src/gss_provider |
FastAPI provider server (shop-facing implementation) |
src/gss_cli |
Typer CLI consumer (gss command) |
src/gss_core |
Shared models, envelope helpers, and error contracts |
protocols/ |
Protocol format docs and runnable YAML examples |
providers/mock_shop |
Example consumer-policy configuration |
sdk/typescript |
TypeScript SDK scaffold (non-blocking roadmap) |
spec/ |
Protocol/spec narrative and architecture references |
docs/ |
Getting-started docs for shops and consumers |
tests/ |
API and CLI integration tests |
Reference Implementation Scope
This codebase currently ships an end-to-end production baseline:
- Provider API with standardized response envelope
- CLI with
gss <shop> <domain> <action>routing - Local demo adapter/data layer
- Protocol engine (YAML rules + context enrichment)
- Security baseline:
- Customer auth token flow
- Required
GSS-Consumer-*headers - Two-step request execution (
returns initiate->returns confirm) - Append-only audit log records
- Stateless core boundary:
- Framework defines contracts and orchestration
- Shops own persistence/secret storage in adapter implementations
Architecture
flowchart LR
consumerClient[Client app/AI/device] -->|gss commands| cli[gss CLI]
cli -->|HTTP + GSS headers| provider[gss_provider FastAPI]
provider --> describe[DescribeService]
provider --> domains[Domain Services]
provider --> protocols[Protocol Engine]
provider --> auth[Auth Context]
provider --> audit[Audit Logger]
domains --> adapter[Reference Shop Adapter]
protocols --> yaml[Protocol YAML files]
Quickstart
1) Install
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
2) Start provider
gss-provider
Default endpoint: http://127.0.0.1:8000/v1
3) Run consumer flow
gss mockshop.local describe
gss mockshop.local auth login --method api_key --customer-id CUST-001
gss mockshop.local orders list
gss mockshop.local orders get --id ORD-1001
gss mockshop.local shipping track --order-id ORD-1001
gss mockshop.local protocols get --trigger delivery-not-received --context '{"order_id":"ORD-1002","days_since_expected":1}'
gss mockshop.local returns initiate --order-id ORD-1001 --item-id ITEM-1 --reason defective
gss mockshop.local returns confirm --token <confirmation_token>
gss mockshop.local account audit-log
Optional token behavior:
- default: CLI stores token locally in
~/.gss/tokens.json - disable local storage:
GSS_STORE_TOKENS=0 - provide token explicitly:
GSS_CUSTOMER_TOKEN=<token>
Shopify webshop project (inside this repo)
gss-shopify-provider
See webshop/shopify-test-store/README.md for setup against your test store.
The Shopify demo includes an agent-first auth flow (auth verify-customer -> auth issue-token) in addition to legacy dev login.
HTTP Endpoints
Discovery
GET /v1/describeGET /v1/{domain}/describe
Auth
POST /v1/auth/login
Domains
GET /v1/ordersGET /v1/orders/{order_id}GET /v1/shipping/track/{order_id}POST /v1/returns/check-eligibilityPOST /v1/returns/initiatePOST /v1/returns/confirmPOST /v1/protocols/getGET /v1/account/audit-log
Security Model Highlights
- Every protected request requires:
Authorization: Bearer <token>GSS-Consumer-IdGSS-Consumer-TypeGSS-Version
requestactions are two-step by design (issue confirmation token, then confirm)- Authorization is customer-scoped and domain actions enforce ownership checks
- Request/action events are recorded to the audit log
- Trust signaling:
describeincludes compliance metadata (level,certified,test_suite_version)- CLI warns when a shop is uncertified or missing compliance metadata
Production Minimum Config
For production deployments, minimum baseline should include:
- Auth + headers on protected calls:
Authorization: Bearer <token>GSS-Consumer-IdGSS-Consumer-TypeGSS-Version
- Token policy:
- short-lived access tokens (recommended 5-60 minutes)
- least-privilege scopes per domain/action level
- optional binding to consumer identity (
GSS-Consumer-Id)
- Data guardrails:
- validate identifiers server-side
- enforce customer ownership checks before returning payloads
- fail closed (
VALIDATION_ERROR/FORBIDDEN)
- Action controls:
requestactions with two-step confirmationcriticalactions with out-of-band verification
- Governance and CI:
- branch protection on
main - required checks: lint, tests matrix, coverage, package-check, dependency-audit
- CODEOWNERS and PR template enabled
- branch protection on
Trust Boundary
GSS defines protocol contracts and package logic. Shop implementations own operational security and persistence (token systems, session stores, audit infrastructure).
See docs/compliance-and-trust.md for full guidance.
Testing
pytest
Current test coverage includes:
- happy-path API flows
- forbidden cross-customer order access
- missing header rejection
- protocol enrichment behavior
- CLI integration for login, listing orders, and two-step returns
Documentation
- Spec overview:
spec/overview.md - Architecture deep dive:
docs/architecture.md - API request examples:
docs/api-examples.md - Commands reference:
docs/commands-reference.md - Compliance/trust boundary:
docs/compliance-and-trust.md - Authorization model:
docs/authorization-model.md - Agent delegation model:
docs/agent-delegation-model.md - Multi-language roadmap:
docs/multi-language-roadmap.md - Repository governance:
docs/repository-governance.md - Cloud Run deployment:
docs/deploy-cloud-run.md - Registry security spec:
docs/registry-security.md - Registry conformance checklist:
docs/registry-conformance-checklist.md - Conformance schema:
schemas/conformance/agent-delegation-checklist.json - Shopify webshop project:
webshop/shopify-test-store/README.md - Shop onboarding:
docs/getting-started-shops.md - Consumer onboarding:
docs/getting-started-consumers.md - Protocol format:
protocols/FORMAT.md
Contributing
See CONTRIBUTING.md for contribution expectations.
License
This project is licensed under the terms in LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file global_support_standard-0.2.1.tar.gz.
File metadata
- Download URL: global_support_standard-0.2.1.tar.gz
- Upload date:
- Size: 34.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47599a63e4369a71230d1d3d865156cb991a06044ab17c76f942cfe163bacda7
|
|
| MD5 |
fb445f10f4aaf3964c2fc44e084804b4
|
|
| BLAKE2b-256 |
57d5189c871560aae67a44662b72487f7991c308a8f154ee81728bc30fe2d6b5
|
Provenance
The following attestation bundles were made for global_support_standard-0.2.1.tar.gz:
Publisher:
release.yml on Global-Support-Standard/global-support-standard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
global_support_standard-0.2.1.tar.gz -
Subject digest:
47599a63e4369a71230d1d3d865156cb991a06044ab17c76f942cfe163bacda7 - Sigstore transparency entry: 1193481912
- Sigstore integration time:
-
Permalink:
Global-Support-Standard/global-support-standard@bb548a6e384cac663f1892b69f87d06a25c4c919 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/Global-Support-Standard
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bb548a6e384cac663f1892b69f87d06a25c4c919 -
Trigger Event:
push
-
Statement type:
File details
Details for the file global_support_standard-0.2.1-py3-none-any.whl.
File metadata
- Download URL: global_support_standard-0.2.1-py3-none-any.whl
- Upload date:
- Size: 36.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d0629d60b1fe59fed11d69e4476d3bd235fe5ec061cf6af03db7d2dd53874de
|
|
| MD5 |
1c518f6feb1c6d3c5ec822774bef0551
|
|
| BLAKE2b-256 |
0e8e3203dc7e736b64d67d3e30319b6aadf163bd62b2b9d650a7093c84f82bba
|
Provenance
The following attestation bundles were made for global_support_standard-0.2.1-py3-none-any.whl:
Publisher:
release.yml on Global-Support-Standard/global-support-standard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
global_support_standard-0.2.1-py3-none-any.whl -
Subject digest:
4d0629d60b1fe59fed11d69e4476d3bd235fe5ec061cf6af03db7d2dd53874de - Sigstore transparency entry: 1193481990
- Sigstore integration time:
-
Permalink:
Global-Support-Standard/global-support-standard@bb548a6e384cac663f1892b69f87d06a25c4c919 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/Global-Support-Standard
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bb548a6e384cac663f1892b69f87d06a25c4c919 -
Trigger Event:
push
-
Statement type: