mainsequence 9.0.9.dev46__py3-none-any.whl → 9.0.10.dev47__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.
- agent_scaffold/skills/mainsequence-inference/SKILL.md +15 -0
- mainsequence/client/agent_runtime_models.py +17 -1
- mainsequence/client/inference.py +12 -1
- {mainsequence-9.0.9.dev46.dist-info → mainsequence-9.0.10.dev47.dist-info}/METADATA +1 -1
- {mainsequence-9.0.9.dev46.dist-info → mainsequence-9.0.10.dev47.dist-info}/RECORD +9 -9
- {mainsequence-9.0.9.dev46.dist-info → mainsequence-9.0.10.dev47.dist-info}/WHEEL +0 -0
- {mainsequence-9.0.9.dev46.dist-info → mainsequence-9.0.10.dev47.dist-info}/entry_points.txt +0 -0
- {mainsequence-9.0.9.dev46.dist-info → mainsequence-9.0.10.dev47.dist-info}/licenses/LICENSE +0 -0
- {mainsequence-9.0.9.dev46.dist-info → mainsequence-9.0.10.dev47.dist-info}/top_level.txt +0 -0
|
@@ -46,6 +46,21 @@ context. Never invent an Environment, use another branch as a fallback, or add
|
|
|
46
46
|
inference environment variables. Provider secrets remain in existing server-side
|
|
47
47
|
credential storage and must not appear in messages or `provider_options`.
|
|
48
48
|
|
|
49
|
+
## Select a configured provider
|
|
50
|
+
|
|
51
|
+
Pass optional `custom_id="openai-work"` to `client.complete()` to select that named
|
|
52
|
+
credential within the caller's Environment. Omit it to retain the first available
|
|
53
|
+
owned credential, then the first shared credential. A missing or ambiguous explicit
|
|
54
|
+
name fails; do not retry using a different credential. Recorded requests retain the
|
|
55
|
+
exact credential UID for replay. Custom endpoints use their existing provider
|
|
56
|
+
identifier and do not accept `custom_id`.
|
|
57
|
+
|
|
58
|
+
Sharing a configured provider authorizes recipients, including workload users,
|
|
59
|
+
to use its credentials and receive them in local Tau. They may copy those credentials;
|
|
60
|
+
revoking a share cannot remove copies already delivered. Explain this before
|
|
61
|
+
guiding someone through sharing. This inference client executes on the server;
|
|
62
|
+
provider management remains with the existing provider clients.
|
|
63
|
+
|
|
49
64
|
## Construct a completion envelope
|
|
50
65
|
|
|
51
66
|
Every call supplies complete ordered text messages: `system`, `user`, `assistant`.
|
|
@@ -727,6 +727,7 @@ class Agent(
|
|
|
727
727
|
llm_provider: str | None = None,
|
|
728
728
|
llm_model: str | None = None,
|
|
729
729
|
llm_thinking: str | None = None,
|
|
730
|
+
custom_id: str | None = None,
|
|
730
731
|
timeout=None,
|
|
731
732
|
) -> AgentSession:
|
|
732
733
|
"""
|
|
@@ -759,6 +760,10 @@ class Agent(
|
|
|
759
760
|
"llm_provider": llm_provider,
|
|
760
761
|
"llm_model": llm_model,
|
|
761
762
|
"llm_thinking": llm_thinking,
|
|
763
|
+
"custom_id": (
|
|
764
|
+
custom_id
|
|
765
|
+
if custom_id is not None else None
|
|
766
|
+
),
|
|
762
767
|
}
|
|
763
768
|
if resolved_session_uid and any(value is not None for value in creation_options.values()):
|
|
764
769
|
raise ValueError("Creation options require handle_unique_id, not session_uid")
|
|
@@ -787,7 +792,14 @@ class Agent(
|
|
|
787
792
|
session_payload = response.json()
|
|
788
793
|
if not isinstance(session_payload, dict):
|
|
789
794
|
raise TypeError("get_or_create_session response must be an AgentSession object")
|
|
790
|
-
|
|
795
|
+
session = AgentSession(**session_payload)
|
|
796
|
+
if (
|
|
797
|
+
custom_id is not None
|
|
798
|
+
and session.custom_id
|
|
799
|
+
!= creation_options["custom_id"]
|
|
800
|
+
):
|
|
801
|
+
raise ValueError("The returned session does not use the requested configured provider")
|
|
802
|
+
return session
|
|
791
803
|
|
|
792
804
|
|
|
793
805
|
class AgentSessionInsightsBase(BasePydanticModel):
|
|
@@ -1745,6 +1757,10 @@ class AgentSession(
|
|
|
1745
1757
|
None,
|
|
1746
1758
|
description="Timestamp when the session was archived.",
|
|
1747
1759
|
)
|
|
1760
|
+
model_provider_credential_uid: str | None = None
|
|
1761
|
+
custom_id: str | None = Field(
|
|
1762
|
+
None, description="Resolved configured provider name; None for custom endpoints."
|
|
1763
|
+
)
|
|
1748
1764
|
llm_provider: str = Field(
|
|
1749
1765
|
...,
|
|
1750
1766
|
description="Resolved LLM provider actually used for this session. Unlike Agent defaults, this is intended to be the authoritative runtime record.",
|
mainsequence/client/inference.py
CHANGED
|
@@ -20,6 +20,8 @@ class InferenceResult(BaseModel):
|
|
|
20
20
|
sequence: int
|
|
21
21
|
provider: str
|
|
22
22
|
model: str
|
|
23
|
+
custom_id: str | None = None
|
|
24
|
+
model_provider_credential_uid: str | None = None
|
|
23
25
|
status: str
|
|
24
26
|
error_code: str
|
|
25
27
|
content_available: bool
|
|
@@ -125,6 +127,7 @@ class InferenceClient:
|
|
|
125
127
|
messages: list[dict[str, str]],
|
|
126
128
|
idempotency_key: str,
|
|
127
129
|
conversation_uid: str | UUID | None = None,
|
|
130
|
+
custom_id: str | None = None,
|
|
128
131
|
thinking_level: str | None = None,
|
|
129
132
|
provider_options: dict[str, Any] | None = None,
|
|
130
133
|
provider_storage: dict[str, Any] | None = None,
|
|
@@ -142,6 +145,8 @@ class InferenceClient:
|
|
|
142
145
|
"idempotency_key must contain 1–128 letters, digits, dots, underscores, colons or hyphens."
|
|
143
146
|
)
|
|
144
147
|
body = {"provider": provider, "model": model, "messages": deepcopy(messages)}
|
|
148
|
+
if custom_id is not None:
|
|
149
|
+
body["custom_id"] = custom_id
|
|
145
150
|
if conversation_uid is not None:
|
|
146
151
|
body["conversation_uid"] = str(UUID(str(conversation_uid)))
|
|
147
152
|
for name, value in (
|
|
@@ -153,9 +158,15 @@ class InferenceClient:
|
|
|
153
158
|
):
|
|
154
159
|
if value is not None:
|
|
155
160
|
body[name] = deepcopy(value)
|
|
156
|
-
|
|
161
|
+
result = self._request(
|
|
157
162
|
"POST", "inference/completions/", body=body, key=idempotency_key, timeout=timeout
|
|
158
163
|
)
|
|
164
|
+
if (
|
|
165
|
+
custom_id is not None
|
|
166
|
+
and result.custom_id != body["custom_id"]
|
|
167
|
+
):
|
|
168
|
+
raise InferenceTransportError(idempotency_key)
|
|
169
|
+
return result
|
|
159
170
|
|
|
160
171
|
def conversations(self, *, limit: int = 25, offset: int = 0) -> dict[str, Any]:
|
|
161
172
|
return self._request(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
agent_scaffold/AGENTS.md,sha256=W91rpnyQuoQIa-3dsebIYyuwnbGLvkmuq_8X5k2hTAw,6399
|
|
2
2
|
agent_scaffold/skills/a2a_sdk_execution/SKILL.md,sha256=NKtcXibE8TxZzKzz1KzJ2cVZ_EeuJJkb660U6wLvZ3s,11809
|
|
3
3
|
agent_scaffold/skills/application_surfaces/api_surfaces/SKILL.md,sha256=GdbPjIf4xMs5Pz6VrjAwBBePkc7rC3P57s70PNjYZWU,15997
|
|
4
|
-
agent_scaffold/skills/mainsequence-inference/SKILL.md,sha256=
|
|
4
|
+
agent_scaffold/skills/mainsequence-inference/SKILL.md,sha256=yv8aAHLQ2FBBSWPIFadY7pGNTwtR-yiR_-UzaGRN9-g,12502
|
|
5
5
|
agent_scaffold/skills/maintenance/bug_auditor/SKILL.md,sha256=CCKs7edyZ9RK-WtAgXJXucokJFXZxk8sRUe0_imFtu8,8610
|
|
6
6
|
agent_scaffold/skills/maintenance/code_repository_maintenance/SKILL.md,sha256=pPsZaERlfokSJ6b6vLjpA5U0KuKxbOFzzcxOVW_ikiI,17935
|
|
7
7
|
agent_scaffold/skills/maintenance/metatables_transition/SKILL.md,sha256=PisgpytcksJnfZMS6aiPCmahsT3fm8DIwk_cefXA2qU,3759
|
|
@@ -36,13 +36,13 @@ mainsequence/cli/ssh_utils.py,sha256=m7HgFHZQ545sxY9igfQLpaNjWHm4SiN9VwCkAuGy2yw
|
|
|
36
36
|
mainsequence/cli/ui.py,sha256=memd6pmjALfGj8zndGCx_z80ztQeqTcOvcofU0un34U,2277
|
|
37
37
|
mainsequence/client/__init__.py,sha256=lsr9JWxeVqOG0KRoHErW5M40ACPSR7SAEE508dTN5XM,672
|
|
38
38
|
mainsequence/client/_transport.py,sha256=l2xkbJ21SbrJhzgOf58Yikxg-uzOQPyo-H5hENdCBo8,5374
|
|
39
|
-
mainsequence/client/agent_runtime_models.py,sha256=
|
|
39
|
+
mainsequence/client/agent_runtime_models.py,sha256=VVURaxtY28o2R_J697AE0_mkj19CKPZYo8aFNflMnGg,67370
|
|
40
40
|
mainsequence/client/base.py,sha256=T3k3xptM09TreiVogrxAPWoIy8zM6Dtn3Cbwsnb33ag,42678
|
|
41
41
|
mainsequence/client/client.py,sha256=Jaw9RYObdVDS5J2O0pln99-XpuW9e4vW-SsbJRNldfw,3866
|
|
42
42
|
mainsequence/client/compute_validation.py,sha256=ByeX0CkIE7qq06ggZFfN92U3Qp2e9cvo2RTIGWa5_Vw,6662
|
|
43
43
|
mainsequence/client/exceptions.py,sha256=xx2L4l3OMNsTybbYkiTKK398ahnutEascM0It35tGr0,3815
|
|
44
44
|
mainsequence/client/github_issues.py,sha256=pSTUw3UPrmE6wqnpoJctartTaNSq6iu6PQRrd8hip6I,14568
|
|
45
|
-
mainsequence/client/inference.py,sha256=
|
|
45
|
+
mainsequence/client/inference.py,sha256=tYKHRxLR6mA5iLmgd3qURwweWc2OPQuw0__tD3LQgSI,7748
|
|
46
46
|
mainsequence/client/models_foundry.py,sha256=JwQdPLDSO4dZI-KC0SUdmN6izmNIKMb9IzZlYXy0Mig,36488
|
|
47
47
|
mainsequence/client/models_helpers.py,sha256=vwZdQhEQZBCxXojP9-DxhdRc-TlceWz4lTqQQnT05Ms,46465
|
|
48
48
|
mainsequence/client/models_user.py,sha256=co9uhe-LKkt7Kw5u8-wDMWcp0yL_lS2LuUOyauW5KF0,38557
|
|
@@ -54,9 +54,9 @@ mainsequence/instrumentation/utils.py,sha256=b-ihjSioAepeLfMpudM2SqCtvnxMqIXileH
|
|
|
54
54
|
mainsequence/server/__init__.py,sha256=BHUAhtdWPDRdxX07NYO_6wrBv5mf0GsXflecO52PmUc,73
|
|
55
55
|
mainsequence/server/caller_assertions.py,sha256=f9jHhVeoFK1ScDCmW8h3lEIU5V7zKw70SUSVV2P7wUI,10975
|
|
56
56
|
mainsequence/server/fastapi.py,sha256=Y5QB51CRVbuUVRUcWh5GKQ5b5vMPjbs9scioTt684oQ,10712
|
|
57
|
-
mainsequence-9.0.
|
|
58
|
-
mainsequence-9.0.
|
|
59
|
-
mainsequence-9.0.
|
|
60
|
-
mainsequence-9.0.
|
|
61
|
-
mainsequence-9.0.
|
|
62
|
-
mainsequence-9.0.
|
|
57
|
+
mainsequence-9.0.10.dev47.dist-info/licenses/LICENSE,sha256=b6Ecsk8wjsEby3lbSzdljR6hHiFGHBizt9iWV2p1c_I,1074
|
|
58
|
+
mainsequence-9.0.10.dev47.dist-info/METADATA,sha256=t0hclwLjy2rK78xGkVSr9-JGEpOpE77iTfe0s-ZP-tQ,7403
|
|
59
|
+
mainsequence-9.0.10.dev47.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
60
|
+
mainsequence-9.0.10.dev47.dist-info/entry_points.txt,sha256=XGAOq3-mF2lWWpeRJvoaWyMarRcK167mH1g124aGdUs,88
|
|
61
|
+
mainsequence-9.0.10.dev47.dist-info/top_level.txt,sha256=BFeblM_Q9q0cUWBvTxnfWcWQEHtf5XZi9nOS-Gdfwus,28
|
|
62
|
+
mainsequence-9.0.10.dev47.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|