Skip to content

Commit 0e7fb1d

Browse files
committed
Remove uv.lock, remove README changes.
1 parent 7dc76a2 commit 0e7fb1d

File tree

181 files changed

+68562
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+68562
-0
lines changed

.tessl/RULES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Agent Rules
2+
3+
This file is updated when running `tessl install`. If a linked file is missing, make sure to run the command to download any missing tiles from the registry.
4+
5+
## tessl/cli-setup — query_library_docs
6+
7+
@tiles/tessl/cli-setup/steering/query_library_docs.md [query_library_docs](tiles/tessl/cli-setup/steering/query_library_docs.md)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
You are a coding agent with access to an MCP tool called `query_library_docs` provided by `tessl`. This tool allows you to query documentation that may be relevant to your task.
2+
3+
Before you begin working on the user request, you should use the `query_library_docs` tool to search for relevant documentation. This is especially important when:
4+
5+
- The request mentions specific code files, functions, classes, or services
6+
- The request involves debugging errors or investigating issues
7+
- The request asks about how something works or why something behaves a certain way
8+
- The request involves making changes to existing code
9+
- The request references specific frameworks, libraries, or systems
10+
11+
When in doubt, use the tool. It's better to query documentation even if it might not be relevant than to miss important context.
12+
13+
How to use the tool:
14+
15+
1. Extract key terms, file names, service names, error types, or concepts from the user's request
16+
2. Call `query_library_docs` with relevant search terms
17+
3. Use the returned documentation to inform your approach to the task
18+
4. Proceed with completing the user's request using both the documentation context and your own analysis
19+
20+
Important rules:
21+
22+
- Do NOT ask for permission to use the tool - just use it
23+
- Do NOT explain that you're going to use the tool - just use it
24+
- If the tool fails or returns no results, simply continue with the task as you normally would
25+
- You may call the tool multiple times with different search terms if needed
26+
- Use the tool BEFORE reading files or making changes
27+
28+
After using the tool (or if the tool returns nothing useful), proceed directly to completing the user's request. Your response should focus on addressing the user's needs, incorporating any relevant documentation you found.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "tessl/cli-setup",
3+
"private": false,
4+
"version": "0.70.0",
5+
"summary": "Tessl CLI MCP tool usage guidelines",
6+
"steering": {
7+
"query_library_docs": {
8+
"rules": "steering/query_library_docs.md"
9+
}
10+
}
11+
}
Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
# Batches API Reference
2+
3+
Process multiple messages asynchronously in batches for high-throughput use cases with 50% cost reduction.
4+
5+
## Create Batch
6+
7+
```python { .api }
8+
def create(
9+
self,
10+
*,
11+
requests: list[MessageBatchIndividualRequest],
12+
**kwargs
13+
) -> MessageBatch:
14+
"""
15+
Create a batch of message requests.
16+
17+
Parameters:
18+
requests: List of individual message requests with custom_id
19+
20+
Returns:
21+
MessageBatch with id, processing_status, request counts
22+
"""
23+
...
24+
25+
async def create(...) -> MessageBatch: ...
26+
```
27+
28+
## Retrieve Batch
29+
30+
```python { .api }
31+
def retrieve(
32+
self,
33+
message_batch_id: str,
34+
**kwargs
35+
) -> MessageBatch:
36+
"""Retrieve batch status and metadata."""
37+
...
38+
39+
async def retrieve(...) -> MessageBatch: ...
40+
```
41+
42+
## List Batches
43+
44+
```python { .api }
45+
def list(
46+
self,
47+
*,
48+
before_id: str = NOT_GIVEN,
49+
after_id: str = NOT_GIVEN,
50+
limit: int = NOT_GIVEN,
51+
**kwargs
52+
) -> SyncPage[MessageBatch]:
53+
"""List batches with pagination."""
54+
...
55+
56+
def list(...) -> AsyncPage[MessageBatch]: ...
57+
```
58+
59+
## Cancel Batch
60+
61+
```python { .api }
62+
def cancel(
63+
self,
64+
message_batch_id: str,
65+
**kwargs
66+
) -> MessageBatch:
67+
"""Cancel a batch in progress."""
68+
...
69+
70+
async def cancel(...) -> MessageBatch: ...
71+
```
72+
73+
## Delete Batch
74+
75+
```python { .api }
76+
def delete(
77+
self,
78+
message_batch_id: str,
79+
**kwargs
80+
) -> DeletedMessageBatch:
81+
"""Delete a batch."""
82+
...
83+
84+
async def delete(...) -> DeletedMessageBatch: ...
85+
```
86+
87+
## Get Results
88+
89+
```python { .api }
90+
def results(
91+
self,
92+
message_batch_id: str,
93+
**kwargs
94+
) -> JSONLDecoder[MessageBatchIndividualResponse]:
95+
"""Stream batch results as JSONL."""
96+
...
97+
98+
def results(...) -> AsyncJSONLDecoder[MessageBatchIndividualResponse]: ...
99+
```
100+
101+
## Response Types
102+
103+
```python { .api }
104+
class MessageBatch(BaseModel):
105+
"""Batch metadata and status."""
106+
id: str
107+
type: Literal["message_batch"]
108+
processing_status: Literal["in_progress", "canceling", "ended"]
109+
request_counts: MessageBatchRequestCounts
110+
ended_at: str | None
111+
created_at: str
112+
expires_at: str
113+
cancel_initiated_at: str | None
114+
results_url: str | None
115+
116+
class MessageBatchRequestCounts(BaseModel):
117+
"""Request count statistics."""
118+
processing: int
119+
succeeded: int
120+
errored: int
121+
canceled: int
122+
expired: int
123+
```
124+
125+
## Request Types
126+
127+
```python { .api }
128+
class MessageBatchIndividualRequest(TypedDict):
129+
"""Individual request in batch."""
130+
custom_id: str
131+
params: MessageCreateParams
132+
```
133+
134+
## Quick Examples
135+
136+
### Create Basic Batch
137+
138+
```python
139+
batch = client.messages.batches.create(
140+
requests=[
141+
{
142+
"custom_id": "request-1",
143+
"params": {
144+
"model": "claude-sonnet-4-5-20250929",
145+
"max_tokens": 1024,
146+
"messages": [{"role": "user", "content": "What is AI?"}]
147+
}
148+
},
149+
{
150+
"custom_id": "request-2",
151+
"params": {
152+
"model": "claude-sonnet-4-5-20250929",
153+
"max_tokens": 1024,
154+
"messages": [{"role": "user", "content": "What is ML?"}]
155+
}
156+
}
157+
]
158+
)
159+
print(f"Batch ID: {batch.id}")
160+
```
161+
162+
### Check Status
163+
164+
```python
165+
batch = client.messages.batches.retrieve("batch_abc123")
166+
print(f"Status: {batch.processing_status}")
167+
print(f"Succeeded: {batch.request_counts.succeeded}")
168+
print(f"Errored: {batch.request_counts.errored}")
169+
```
170+
171+
### Poll Until Complete
172+
173+
```python
174+
import time
175+
176+
while True:
177+
batch = client.messages.batches.retrieve(batch_id)
178+
if batch.processing_status == "ended":
179+
break
180+
time.sleep(60)
181+
```
182+
183+
### Get Results
184+
185+
```python
186+
results = client.messages.batches.results("batch_abc123")
187+
188+
for response in results:
189+
if response.result.type == "succeeded":
190+
print(f"{response.custom_id}: {response.result.message.content[0].text}")
191+
elif response.result.type == "errored":
192+
print(f"{response.custom_id}: Error - {response.result.error.message}")
193+
```
194+
195+
## See Also
196+
197+
- [Messages API](./messages.md) - Core message creation
198+
- [Batch Processing Guide](../guides/batch-processing.md) - Advanced batch patterns
199+
- [Type System](../reference/types.md) - Complete type definitions

0 commit comments

Comments
 (0)