gcf-python 2.7.0__py3-none-any.whl → 2.7.1__py3-none-any.whl
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.
- gcf/__init__.py +1 -1
- gcf/fastmcp.py +13 -2
- {gcf_python-2.7.0.dist-info → gcf_python-2.7.1.dist-info}/METADATA +2 -2
- {gcf_python-2.7.0.dist-info → gcf_python-2.7.1.dist-info}/RECORD +7 -7
- {gcf_python-2.7.0.dist-info → gcf_python-2.7.1.dist-info}/WHEEL +0 -0
- {gcf_python-2.7.0.dist-info → gcf_python-2.7.1.dist-info}/entry_points.txt +0 -0
- {gcf_python-2.7.0.dist-info → gcf_python-2.7.1.dist-info}/licenses/LICENSE +0 -0
gcf/__init__.py
CHANGED
gcf/fastmcp.py
CHANGED
|
@@ -18,8 +18,11 @@ wire, so the response uses fewer tokens when it crosses the LLM boundary. It is:
|
|
|
18
18
|
|
|
19
19
|
- **Opt-in** — nothing changes unless ``RESPONSE_FORMAT=gcf`` is set (or
|
|
20
20
|
``enabled=True`` is passed).
|
|
21
|
-
- **
|
|
22
|
-
|
|
21
|
+
- **Never-grow** — GCF is used only when the wire is actually smaller than the
|
|
22
|
+
JSON it would replace; a small result is never enlarged.
|
|
23
|
+
- **Lossless and fail-safe** — the wire must decode back to the same value, and
|
|
24
|
+
on any encoding error the original result is returned, so a tool call is never
|
|
25
|
+
grown, dropped, or garbled over formatting.
|
|
23
26
|
- **Non-destructive** — only a lone JSON text block is re-encoded; a result
|
|
24
27
|
carrying an image or any second block is left untouched, and the tool's
|
|
25
28
|
``structuredContent`` (if any) is preserved so output-schema validation and
|
|
@@ -94,8 +97,16 @@ class GcfResponseMiddleware(Middleware):
|
|
|
94
97
|
if payload is None:
|
|
95
98
|
return result
|
|
96
99
|
|
|
100
|
+
# _json_payload guarantees exactly one text block, so this is the JSON text
|
|
101
|
+
# the client would otherwise receive.
|
|
102
|
+
original = result.content[0].text
|
|
103
|
+
|
|
97
104
|
try:
|
|
98
105
|
wire = encode_generic(payload)
|
|
106
|
+
# Never-grow: only replace the JSON when GCF is actually smaller, so a
|
|
107
|
+
# small result is never enlarged.
|
|
108
|
+
if len(wire) >= len(original):
|
|
109
|
+
return result
|
|
99
110
|
# Verify the wire decodes back to the same value before shipping it, so a
|
|
100
111
|
# result is never replaced with an unparseable or lossy encoding.
|
|
101
112
|
if decode_generic(wire) != payload:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: gcf-python
|
|
3
|
-
Version: 2.7.
|
|
3
|
+
Version: 2.7.1
|
|
4
4
|
Summary: The AI-native wire format for structured data. 50-92% fewer tokens than JSON, with multi-turn delta encoding for agent loops. 100% comprehension on every frontier model. Zero dependencies.
|
|
5
5
|
Project-URL: Homepage, https://github.com/blackwell-systems/gcf-python
|
|
6
6
|
Project-URL: Documentation, https://gcformat.com/
|
|
@@ -322,7 +322,7 @@ GCF wins 15/16 datasets on the expanded [token efficiency benchmark](https://git
|
|
|
322
322
|
|
|
323
323
|
**Zero runtime dependencies. Permanently.** All six implementations depend only on their language's standard library. No transitive dependencies. No supply chain risk. This is a permanent commitment: GCF will never take on external runtime dependencies. MIT licensed. All implementations support both generic profile (`encodeGeneric`) and graph profile (`encode`). CLI included in all 6 languages.
|
|
324
324
|
|
|
325
|
-
**Specification:** [SPEC v3.5.3 Stable](https://github.com/blackwell-systems/gcf/blob/main/SPEC.md) with
|
|
325
|
+
**Specification:** [SPEC v3.5.3 Stable](https://github.com/blackwell-systems/gcf/blob/main/SPEC.md) with 281 conformance fixtures, 43,000,000,000+ lossless round-trips verified across 5 formats and 6 languages. Current versions: Go v1.7.1, TypeScript v2.6.1, Python v2.7.0, Rust v3.0.1, Swift v2.7.1, Kotlin v2.6.1, .NET v0.2.1. Cross-language conformance verified across all seven SDKs.
|
|
326
326
|
|
|
327
327
|
## Adopted by
|
|
328
328
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
gcf/__init__.py,sha256=
|
|
1
|
+
gcf/__init__.py,sha256=uRYqyGTFSlmnfoj0hh79AZ_KhxiCgZgJt_v-okiK4_k,2616
|
|
2
2
|
gcf/__main__.py,sha256=EpvBz1yc8H0D5OJ1zy2tYke-kRzvudKa4DEbfeW14ao,71
|
|
3
3
|
gcf/cli.py,sha256=UEe1CAZn-rKGNIo_ap8-oez3ucl6DSRbsdv6RDnzygY,5256
|
|
4
4
|
gcf/constants.py,sha256=cmZ8YJSOB0im_eyfN8v4UvrLpBC6Fuf4cfcKZGbutxY,638
|
|
@@ -6,7 +6,7 @@ gcf/decode.py,sha256=TP58_7UBhfeI0o9zpNgtQvAnLQGhNt0RaUjku7Ke75A,7162
|
|
|
6
6
|
gcf/decode_generic.py,sha256=X59J2tV_ybZdWupVIVRtfLiqdxko2wfIn78Kkm5lNls,31170
|
|
7
7
|
gcf/delta.py,sha256=oviQ9WsDRYXPXE8bw6SFutmzMRIvu-U_Zzw-39Nd5Ic,8053
|
|
8
8
|
gcf/encode.py,sha256=OYGDyF3oP2I8Y2PrPL_5yDVURqB0mghtqlOGyDEd-Fs,4081
|
|
9
|
-
gcf/fastmcp.py,sha256=
|
|
9
|
+
gcf/fastmcp.py,sha256=cwIX77DhA96rMrelQcrlAlFXGQ4FDNModa4rSGlGN7I,5139
|
|
10
10
|
gcf/generic.py,sha256=1c53utF2GcD8lS_wks2opQw08hMz4KGL-7C8g7JB5bA,21577
|
|
11
11
|
gcf/generic_delta.py,sha256=5KSUT_QUeH7OILLWfu9JveaXRSrqRIi3c6E8WjlgC4Q,18785
|
|
12
12
|
gcf/keyed_map.py,sha256=qCwhehXB1FQ2iYCPhcvXOqGwrVqdXhGYZGxv56CSUgc,3644
|
|
@@ -16,8 +16,8 @@ gcf/session.py,sha256=rPqR4xsHKpi_G37t1ODwkTUdHhVAGa3Uig8F60h34Ms,5335
|
|
|
16
16
|
gcf/stream.py,sha256=3eyzmLMZPyEGC1MS9pujxio2x_t7rCL-eNuJ4DjYkaA,5938
|
|
17
17
|
gcf/stream_generic.py,sha256=h2mJ-jI-c1H2L0uoQVhrvDc7uJEcOwS1MB51k4SCPNM,5775
|
|
18
18
|
gcf/types.py,sha256=AWm-LQoSqLHAYtEjcAxWQZqJ4JXqNreLUKO2mJFgNMA,1465
|
|
19
|
-
gcf_python-2.7.
|
|
20
|
-
gcf_python-2.7.
|
|
21
|
-
gcf_python-2.7.
|
|
22
|
-
gcf_python-2.7.
|
|
23
|
-
gcf_python-2.7.
|
|
19
|
+
gcf_python-2.7.1.dist-info/METADATA,sha256=FYQP8X41OUkaB4Bwyvl0rvUCmlMsdTfINUDiRqQMcLM,17107
|
|
20
|
+
gcf_python-2.7.1.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
21
|
+
gcf_python-2.7.1.dist-info/entry_points.txt,sha256=aFT6gqlkh8iGfM8cblE-LUMxHH08_v71IIoZtDdRIVA,37
|
|
22
|
+
gcf_python-2.7.1.dist-info/licenses/LICENSE,sha256=2Fit9wnaIe--RMSAgyQqxC5hfZTyZqn4fIdBtp9qPDw,1072
|
|
23
|
+
gcf_python-2.7.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|