flieber 0.0.1__tar.gz
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.
- flieber-0.0.1/.gitignore +16 -0
- flieber-0.0.1/.gitlab-ci.yml +38 -0
- flieber-0.0.1/CHANGELOG.md +5 -0
- flieber-0.0.1/PKG-INFO +72 -0
- flieber-0.0.1/README.md +57 -0
- flieber-0.0.1/pyproject.toml +28 -0
- flieber-0.0.1/src/flieber/__init__.py +3 -0
- flieber-0.0.1/src/flieber/__main__.py +27 -0
flieber-0.0.1/.gitignore
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Build on every pipeline; publish to PyPI only from a version tag (vX.Y.Z).
|
|
2
|
+
# Publishing uses PyPI trusted publishing (OIDC): no stored token. The job must match the
|
|
3
|
+
# PyPI trusted publisher exactly: this file, environment `pypi`, ID token audience `pypi`.
|
|
4
|
+
|
|
5
|
+
stages: [build, publish]
|
|
6
|
+
|
|
7
|
+
default:
|
|
8
|
+
image: python:3.12-slim
|
|
9
|
+
|
|
10
|
+
build:
|
|
11
|
+
stage: build
|
|
12
|
+
script:
|
|
13
|
+
- pip install --quiet build
|
|
14
|
+
- python -m build
|
|
15
|
+
- pip install --quiet dist/*.whl
|
|
16
|
+
- ver=$(flieber --version | cut -d' ' -f2)
|
|
17
|
+
- if [ -n "${CI_COMMIT_TAG}" ] && [ "${CI_COMMIT_TAG}" != "v${ver}" ]; then echo "Tag ${CI_COMMIT_TAG} does not match package version ${ver}"; exit 1; fi
|
|
18
|
+
artifacts:
|
|
19
|
+
paths: [dist/]
|
|
20
|
+
expire_in: 1 week
|
|
21
|
+
|
|
22
|
+
publish-pypi:
|
|
23
|
+
stage: publish
|
|
24
|
+
rules:
|
|
25
|
+
- if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+([ab]\d+|rc\d+)?$/'
|
|
26
|
+
environment: pypi
|
|
27
|
+
id_tokens:
|
|
28
|
+
PYPI_ID_TOKEN:
|
|
29
|
+
aud: pypi
|
|
30
|
+
needs: [build]
|
|
31
|
+
script:
|
|
32
|
+
- pip install --quiet twine
|
|
33
|
+
- apt-get update -qq && apt-get install -y -qq curl jq > /dev/null
|
|
34
|
+
# Exchange the GitLab OIDC token for a short-lived PyPI upload token.
|
|
35
|
+
- resp=$(curl -sS -X POST https://pypi.org/_/oidc/mint-token -d "{\"token\":\"${PYPI_ID_TOKEN}\"}")
|
|
36
|
+
- api_token=$(echo "${resp}" | jq -r '.token')
|
|
37
|
+
- if [ -z "${api_token}" ] || [ "${api_token}" = "null" ]; then echo "PyPI token exchange failed:"; echo "${resp}" | jq 'del(.token)'; exit 1; fi
|
|
38
|
+
- twine upload --non-interactive -u __token__ -p "${api_token}" dist/*
|
flieber-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: flieber
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: The flieber command: CLI and MCP server for Flieber commerce data (actual sales, adjusted sales, forecast).
|
|
5
|
+
Project-URL: Homepage, https://flieber.com
|
|
6
|
+
Author: Flieber
|
|
7
|
+
License: Proprietary
|
|
8
|
+
Classifier: Development Status :: 1 - Planning
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: License :: Other/Proprietary License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Requires-Python: >=3.12
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# flieber-cli
|
|
17
|
+
|
|
18
|
+
`flieber` is the command-line and agent interface to Flieber's commerce data. It gives developers, scripts and AI agents (Claude, Cursor, Lovable, custom agents) one stable, versioned way to read a tenant's:
|
|
19
|
+
|
|
20
|
+
- **actual sales**: what each channel recorded, per product × store;
|
|
21
|
+
- **adjusted sales**: actuals corrected for stockouts, outliers and price effects, used as the forecast input;
|
|
22
|
+
- **forecast**: expected daily demand per product × store, about 12–14 months ahead.
|
|
23
|
+
|
|
24
|
+
> **Status: v0 in design.** This README is the charter. The code arrives through the issues in the Linear project "Vibee Backend: v0 → greenfield gate" (team Flieber AI - R&D, milestone M3).
|
|
25
|
+
|
|
26
|
+
## Shape
|
|
27
|
+
|
|
28
|
+
One Python package: a shared core, and several surfaces built on it.
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
┌──────────────────── flieber (Python package) ────────────────────┐
|
|
32
|
+
│ core: auth · GraphQL client · versioned tool contract · shaping │
|
|
33
|
+
└──────┬──────────────────────┬───────────────────────┬────────────┘
|
|
34
|
+
│ │ │
|
|
35
|
+
CLI `flieber …` MCP (local) `flieber mcp` MCP (hosted) `flieber mcp --http`
|
|
36
|
+
humans & scripts stdio, launched by container behind a stable URL,
|
|
37
|
+
Claude / Cursor used by the self-serve product
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
- **Core**
|
|
41
|
+
- Authentication with a Flieber public-API key (`FLIEBER_API_KEY`, or a config file written by `flieber auth login`).
|
|
42
|
+
- A client for core-service's public GraphQL API.
|
|
43
|
+
- **The versioned tool contract:** one definition per capability. It drives both the CLI command and the MCP tool, so the two can never drift.
|
|
44
|
+
- Output shaping for humans (tables) and for LLMs (compact `{columns, rows}`, point caps, pagination).
|
|
45
|
+
- **CLI:** `flieber status`, `flieber listings`, `flieber sales`, `flieber adjusted`, `flieber forecast`, `flieber trends`. JSON output is available for scripts.
|
|
46
|
+
- **MCP:** the same capabilities as MCP tools, over stdio (local) or streamable HTTP (hosted, stateless). The hosted mode forwards the caller's own API key and stores nothing.
|
|
47
|
+
|
|
48
|
+
**Design rule:** customers bind to this contract, never to the raw GraphQL schema. The backend behind it may change; the contract changes only through versioning.
|
|
49
|
+
|
|
50
|
+
## Principles
|
|
51
|
+
|
|
52
|
+
- **The three signals are never mixed.**
|
|
53
|
+
- Adjusted sales never include today or later.
|
|
54
|
+
- The forecast never includes dates before today.
|
|
55
|
+
- Actual sales come only from the sales-analytics fields.
|
|
56
|
+
- **Least privilege:** the key's grants in core-service decide what can be read. The tool reports a missing grant by name.
|
|
57
|
+
- **No secrets at rest in the hosted mode.** Logs carry only a hash prefix of the key.
|
|
58
|
+
- **Honest errors:** rate limits, missing grants and stale data are reported plainly, with a hint about what to do next.
|
|
59
|
+
|
|
60
|
+
## Tooling (v0)
|
|
61
|
+
|
|
62
|
+
- Python 3.12.
|
|
63
|
+
- Packaging with `uv` and `pyproject.toml`; installable as `uvx flieber …` / `pipx install flieber`.
|
|
64
|
+
- Tests with `pytest`.
|
|
65
|
+
|
|
66
|
+
The PyPI names `flieber` and `flieber-cli` were free on 2026-09-29.
|
|
67
|
+
|
|
68
|
+
## Related
|
|
69
|
+
|
|
70
|
+
- **core-service:** the public GraphQL API at `/api/graphql`, and public-API keys with per-resource grants.
|
|
71
|
+
- **flieber-build-front:** the self-serve portal, which issues API keys and shows the MCP and CLI configuration.
|
|
72
|
+
- **ai-lab `tools/flieber_agent_tunnel`:** the existing `ask_flieber` MCP server. It is the reference for the streamable-HTTP MCP skeleton and the Clerk OAuth pieces.
|
flieber-0.0.1/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# flieber-cli
|
|
2
|
+
|
|
3
|
+
`flieber` is the command-line and agent interface to Flieber's commerce data. It gives developers, scripts and AI agents (Claude, Cursor, Lovable, custom agents) one stable, versioned way to read a tenant's:
|
|
4
|
+
|
|
5
|
+
- **actual sales**: what each channel recorded, per product × store;
|
|
6
|
+
- **adjusted sales**: actuals corrected for stockouts, outliers and price effects, used as the forecast input;
|
|
7
|
+
- **forecast**: expected daily demand per product × store, about 12–14 months ahead.
|
|
8
|
+
|
|
9
|
+
> **Status: v0 in design.** This README is the charter. The code arrives through the issues in the Linear project "Vibee Backend: v0 → greenfield gate" (team Flieber AI - R&D, milestone M3).
|
|
10
|
+
|
|
11
|
+
## Shape
|
|
12
|
+
|
|
13
|
+
One Python package: a shared core, and several surfaces built on it.
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
┌──────────────────── flieber (Python package) ────────────────────┐
|
|
17
|
+
│ core: auth · GraphQL client · versioned tool contract · shaping │
|
|
18
|
+
└──────┬──────────────────────┬───────────────────────┬────────────┘
|
|
19
|
+
│ │ │
|
|
20
|
+
CLI `flieber …` MCP (local) `flieber mcp` MCP (hosted) `flieber mcp --http`
|
|
21
|
+
humans & scripts stdio, launched by container behind a stable URL,
|
|
22
|
+
Claude / Cursor used by the self-serve product
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- **Core**
|
|
26
|
+
- Authentication with a Flieber public-API key (`FLIEBER_API_KEY`, or a config file written by `flieber auth login`).
|
|
27
|
+
- A client for core-service's public GraphQL API.
|
|
28
|
+
- **The versioned tool contract:** one definition per capability. It drives both the CLI command and the MCP tool, so the two can never drift.
|
|
29
|
+
- Output shaping for humans (tables) and for LLMs (compact `{columns, rows}`, point caps, pagination).
|
|
30
|
+
- **CLI:** `flieber status`, `flieber listings`, `flieber sales`, `flieber adjusted`, `flieber forecast`, `flieber trends`. JSON output is available for scripts.
|
|
31
|
+
- **MCP:** the same capabilities as MCP tools, over stdio (local) or streamable HTTP (hosted, stateless). The hosted mode forwards the caller's own API key and stores nothing.
|
|
32
|
+
|
|
33
|
+
**Design rule:** customers bind to this contract, never to the raw GraphQL schema. The backend behind it may change; the contract changes only through versioning.
|
|
34
|
+
|
|
35
|
+
## Principles
|
|
36
|
+
|
|
37
|
+
- **The three signals are never mixed.**
|
|
38
|
+
- Adjusted sales never include today or later.
|
|
39
|
+
- The forecast never includes dates before today.
|
|
40
|
+
- Actual sales come only from the sales-analytics fields.
|
|
41
|
+
- **Least privilege:** the key's grants in core-service decide what can be read. The tool reports a missing grant by name.
|
|
42
|
+
- **No secrets at rest in the hosted mode.** Logs carry only a hash prefix of the key.
|
|
43
|
+
- **Honest errors:** rate limits, missing grants and stale data are reported plainly, with a hint about what to do next.
|
|
44
|
+
|
|
45
|
+
## Tooling (v0)
|
|
46
|
+
|
|
47
|
+
- Python 3.12.
|
|
48
|
+
- Packaging with `uv` and `pyproject.toml`; installable as `uvx flieber …` / `pipx install flieber`.
|
|
49
|
+
- Tests with `pytest`.
|
|
50
|
+
|
|
51
|
+
The PyPI names `flieber` and `flieber-cli` were free on 2026-09-29.
|
|
52
|
+
|
|
53
|
+
## Related
|
|
54
|
+
|
|
55
|
+
- **core-service:** the public GraphQL API at `/api/graphql`, and public-API keys with per-resource grants.
|
|
56
|
+
- **flieber-build-front:** the self-serve portal, which issues API keys and shows the MCP and CLI configuration.
|
|
57
|
+
- **ai-lab `tools/flieber_agent_tunnel`:** the existing `ask_flieber` MCP server. It is the reference for the streamable-HTTP MCP skeleton and the Clerk OAuth pieces.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.25"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "flieber"
|
|
7
|
+
version = "0.0.1"
|
|
8
|
+
description = "The flieber command: CLI and MCP server for Flieber commerce data (actual sales, adjusted sales, forecast)."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.12"
|
|
11
|
+
license = { text = "Proprietary" }
|
|
12
|
+
authors = [{ name = "Flieber" }]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 1 - Planning",
|
|
15
|
+
"Environment :: Console",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Programming Language :: Python :: 3.12",
|
|
18
|
+
"License :: Other/Proprietary License",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[project.urls]
|
|
22
|
+
Homepage = "https://flieber.com"
|
|
23
|
+
|
|
24
|
+
[project.scripts]
|
|
25
|
+
flieber = "flieber.__main__:main"
|
|
26
|
+
|
|
27
|
+
[tool.hatch.build.targets.wheel]
|
|
28
|
+
packages = ["src/flieber"]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Entry point for the `flieber` command.
|
|
2
|
+
|
|
3
|
+
0.0.1 is a placeholder release that reserves the package name. The real CLI and
|
|
4
|
+
MCP server (actual sales, adjusted sales and forecast) arrive in later versions.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import sys
|
|
8
|
+
|
|
9
|
+
from flieber import __version__
|
|
10
|
+
|
|
11
|
+
MESSAGE = (
|
|
12
|
+
f"flieber {__version__}: placeholder release.\n"
|
|
13
|
+
"The Flieber CLI and MCP server (actual sales, adjusted sales and forecast) are coming soon."
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def main(argv: list[str] | None = None) -> int:
|
|
18
|
+
args = sys.argv[1:] if argv is None else argv
|
|
19
|
+
if args in (["--version"], ["-V"]):
|
|
20
|
+
print(f"flieber {__version__}")
|
|
21
|
+
return 0
|
|
22
|
+
print(MESSAGE)
|
|
23
|
+
return 0
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
if __name__ == "__main__":
|
|
27
|
+
raise SystemExit(main())
|