default-watch-pinning-client 1.0.0__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 TextForAgents LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,47 @@
1
+ Metadata-Version: 2.4
2
+ Name: default-watch-pinning-client
3
+ Version: 1.0.0
4
+ Summary: Session-start client for the Default-watch and pinning service (TextForAgents LLC): probe the effective default, gate the session before any billable work.
5
+ Author: TextForAgents LLC
6
+ License: MIT
7
+ Keywords: agent,default-model,watch,pinning,session-start
8
+ Requires-Python: >=3.9
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE
11
+ Dynamic: license-file
12
+
13
+ # default-watch-pinning-client
14
+
15
+ Session-start client for the **Default-watch and pinning service**
16
+ (TextForAgents LLC) — https://textforagents.com/products/default-watch-pinning/
17
+
18
+ Your platform changed its default model overnight — did your fleet's
19
+ price and behaviour change with it? The watch service reconciles the
20
+ platform changelog against a session-start probe of the *effective*
21
+ default and gates the session before any billable work. This package is
22
+ the client half: resolve, probe, then bill.
23
+
24
+ ## Quickstart
25
+
26
+ ```python
27
+ from default_watch_pinning_client import session_start, SessionBlocked
28
+
29
+ base = "https://textforagents.com/products/default-watch-pinning"
30
+ catalog = {"release_id": "r2", "default_model": "model-new"}
31
+
32
+ try:
33
+ ok = session_start(base, "my-platform", MY_TOKEN, catalog)
34
+ model = ok["model"] # proceed: bill against this model
35
+ except SessionBlocked as e:
36
+ model = None # blocked BEFORE any billable work
37
+ ```
38
+
39
+ Verdicts: `UNCHANGED`, `PINNED_OK` and `STAGED` proceed (STAGED proceeds
40
+ on the probed old model); `CHANGED` proceeds only with
41
+ `accept_changes=True`; `UNANNOUNCED` and `PIN_VIOLATED` always block.
42
+
43
+ Get a token: `POST /register` then `POST /trial` (one-time free first
44
+ month of Watch) or `POST /subscribe` (x402) on the service.
45
+ Watch $5/mo per operator · Fleet $9/mo per operator · Delta run $0.01/run.
46
+
47
+ Support: support@textforagents.com
@@ -0,0 +1,35 @@
1
+ # default-watch-pinning-client
2
+
3
+ Session-start client for the **Default-watch and pinning service**
4
+ (TextForAgents LLC) — https://textforagents.com/products/default-watch-pinning/
5
+
6
+ Your platform changed its default model overnight — did your fleet's
7
+ price and behaviour change with it? The watch service reconciles the
8
+ platform changelog against a session-start probe of the *effective*
9
+ default and gates the session before any billable work. This package is
10
+ the client half: resolve, probe, then bill.
11
+
12
+ ## Quickstart
13
+
14
+ ```python
15
+ from default_watch_pinning_client import session_start, SessionBlocked
16
+
17
+ base = "https://textforagents.com/products/default-watch-pinning"
18
+ catalog = {"release_id": "r2", "default_model": "model-new"}
19
+
20
+ try:
21
+ ok = session_start(base, "my-platform", MY_TOKEN, catalog)
22
+ model = ok["model"] # proceed: bill against this model
23
+ except SessionBlocked as e:
24
+ model = None # blocked BEFORE any billable work
25
+ ```
26
+
27
+ Verdicts: `UNCHANGED`, `PINNED_OK` and `STAGED` proceed (STAGED proceeds
28
+ on the probed old model); `CHANGED` proceeds only with
29
+ `accept_changes=True`; `UNANNOUNCED` and `PIN_VIOLATED` always block.
30
+
31
+ Get a token: `POST /register` then `POST /trial` (one-time free first
32
+ month of Watch) or `POST /subscribe` (x402) on the service.
33
+ Watch $5/mo per operator · Fleet $9/mo per operator · Delta run $0.01/run.
34
+
35
+ Support: support@textforagents.com
@@ -0,0 +1,5 @@
1
+ """Default-watch and pinning service — session-start client (P25)."""
2
+ from .client import SessionBlocked, resolve_effective, session_start
3
+
4
+ __version__ = "1.0.0"
5
+ __all__ = ["SessionBlocked", "resolve_effective", "session_start"]
@@ -0,0 +1,51 @@
1
+ """Session-start client for the Default-watch and pinning service (P25).
2
+
3
+ The client resolves its platform's effective default the way real
4
+ platforms do — an operator-explicit model wins, otherwise the bundled
5
+ catalog's default for the installed release — probes the watch service,
6
+ and only returns a model to bill against when the verdict allows it.
7
+ PIN_VIOLATED / UNANNOUNCED block; STAGED proceeds on the probed (old)
8
+ model; CHANGED proceeds only under an explicit accept policy, otherwise
9
+ blocks for the operator's pin-or-accept decision.
10
+
11
+ Production shape (vs the EXP-025 lab client): the customer's identity
12
+ is the per-customer Bearer token issued by the service's storefront
13
+ (POST /register -> /trial or /subscribe); the gating logic is unchanged.
14
+ """
15
+ import json
16
+ import urllib.request
17
+
18
+
19
+ def resolve_effective(catalog, operator_model=None):
20
+ if operator_model:
21
+ return operator_model
22
+ return catalog["default_model"]
23
+
24
+
25
+ def _post(base, path, payload, token):
26
+ req = urllib.request.Request(
27
+ base + path, data=json.dumps(payload).encode(),
28
+ headers={"Content-Type": "application/json",
29
+ "Authorization": "Bearer " + token})
30
+ with urllib.request.urlopen(req, timeout=5) as r:
31
+ return json.loads(r.read())
32
+
33
+
34
+ class SessionBlocked(Exception):
35
+ pass
36
+
37
+
38
+ def session_start(base, platform_id, token, catalog, operator_model=None,
39
+ accept_changes=False):
40
+ effective = resolve_effective(catalog, operator_model)
41
+ res = _post(base, "/probe", {"platform_id": platform_id,
42
+ "effective_model": effective}, token)
43
+ verdict = res["verdict"]
44
+ if verdict in ("UNCHANGED", "PINNED_OK", "STAGED"):
45
+ return {"proceed": True, "model": effective, "verdict": verdict,
46
+ "attestation": res.get("attestation")}
47
+ if verdict == "CHANGED" and accept_changes:
48
+ return {"proceed": True, "model": effective, "verdict": verdict,
49
+ "attestation": res.get("attestation")}
50
+ raise SessionBlocked(
51
+ f"{verdict}: session blocked before any billable work (probed={effective})")
@@ -0,0 +1,47 @@
1
+ Metadata-Version: 2.4
2
+ Name: default-watch-pinning-client
3
+ Version: 1.0.0
4
+ Summary: Session-start client for the Default-watch and pinning service (TextForAgents LLC): probe the effective default, gate the session before any billable work.
5
+ Author: TextForAgents LLC
6
+ License: MIT
7
+ Keywords: agent,default-model,watch,pinning,session-start
8
+ Requires-Python: >=3.9
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE
11
+ Dynamic: license-file
12
+
13
+ # default-watch-pinning-client
14
+
15
+ Session-start client for the **Default-watch and pinning service**
16
+ (TextForAgents LLC) — https://textforagents.com/products/default-watch-pinning/
17
+
18
+ Your platform changed its default model overnight — did your fleet's
19
+ price and behaviour change with it? The watch service reconciles the
20
+ platform changelog against a session-start probe of the *effective*
21
+ default and gates the session before any billable work. This package is
22
+ the client half: resolve, probe, then bill.
23
+
24
+ ## Quickstart
25
+
26
+ ```python
27
+ from default_watch_pinning_client import session_start, SessionBlocked
28
+
29
+ base = "https://textforagents.com/products/default-watch-pinning"
30
+ catalog = {"release_id": "r2", "default_model": "model-new"}
31
+
32
+ try:
33
+ ok = session_start(base, "my-platform", MY_TOKEN, catalog)
34
+ model = ok["model"] # proceed: bill against this model
35
+ except SessionBlocked as e:
36
+ model = None # blocked BEFORE any billable work
37
+ ```
38
+
39
+ Verdicts: `UNCHANGED`, `PINNED_OK` and `STAGED` proceed (STAGED proceeds
40
+ on the probed old model); `CHANGED` proceeds only with
41
+ `accept_changes=True`; `UNANNOUNCED` and `PIN_VIOLATED` always block.
42
+
43
+ Get a token: `POST /register` then `POST /trial` (one-time free first
44
+ month of Watch) or `POST /subscribe` (x402) on the service.
45
+ Watch $5/mo per operator · Fleet $9/mo per operator · Delta run $0.01/run.
46
+
47
+ Support: support@textforagents.com
@@ -0,0 +1,10 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ setup.py
5
+ default_watch_pinning_client/__init__.py
6
+ default_watch_pinning_client/client.py
7
+ default_watch_pinning_client.egg-info/PKG-INFO
8
+ default_watch_pinning_client.egg-info/SOURCES.txt
9
+ default_watch_pinning_client.egg-info/dependency_links.txt
10
+ default_watch_pinning_client.egg-info/top_level.txt
@@ -0,0 +1,17 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "default-watch-pinning-client"
7
+ version = "1.0.0"
8
+ description = "Session-start client for the Default-watch and pinning service (TextForAgents LLC): probe the effective default, gate the session before any billable work."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = {text = "MIT"}
12
+ authors = [{name = "TextForAgents LLC"}]
13
+ keywords = ["agent", "default-model", "watch", "pinning", "session-start"]
14
+ dependencies = []
15
+
16
+ [tool.setuptools]
17
+ packages = ["default_watch_pinning_client"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,2 @@
1
+ from setuptools import setup
2
+ setup()