@asterism-app/builtin-api 0.26.0 → 0.26.2
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.
- package/README.md +10 -10
- package/docs/agents.md +35 -80
- package/docs/resource-creation.md +10 -6
- package/package.json +1 -1
- package/src/messaging.ts +7 -7
- package/src/peek-renderer.ts +2 -2
- package/src/search.ts +2 -2
- package/src/text.ts +1 -1
- package/src/tools.ts +7 -6
package/README.md
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
# Built-in public API
|
|
2
2
|
|
|
3
|
-
This package
|
|
3
|
+
This package is the public domain boundary shared by Asterism's builtin implementation and external plugins. It lets an integration participate in existing Agent behavior without importing private implementation code.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Extend without taking ownership
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Builtin owns its input admission, conversation history, and Agent execution. An extension owns its business state, external relationships, and presentation contributions. Use this boundary when extending that domain rather than treating the bundled paradigm as a mandatory model for all plugins.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Public declarations retain shared runtime identity across consumers. The package is not a second installed plugin and does not grant access to private objects. Generic hosting capabilities belong to the SDK; builtin-specific capabilities belong here when they are intentionally public.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Depend on the implementation provider
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Develop against compatible SDK and builtin API packages. Development dependencies supply declarations; peer dependencies express the shared provider relationship. Installing the API package does not install or update the builtin implementation that supplies behavior at runtime.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Import original contracts so extensions compose with the provider's operations rather than recreate them by convention. Validate the integration in an application with the intended provider enabled.
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Explain integration choices
|
|
18
18
|
|
|
19
|
-
The
|
|
19
|
+
The package includes domain guides and source examples. Prose explains when to submit, prepare, observe, or present work and which participant owns each decision. Types and maintained examples express the concrete contracts and composition.
|
|
20
20
|
|
|
21
|
-
The
|
|
21
|
+
The manual supports users and plugin authors on demand. Tools remain understandable from their own descriptions, guidelines, and schemas without a separate documentation prerequisite.
|
package/docs/agents.md
CHANGED
|
@@ -1,114 +1,69 @@
|
|
|
1
|
-
# Extend built-in
|
|
1
|
+
# Extend built-in Agents
|
|
2
2
|
|
|
3
|
-
The built-in public API lets plugins
|
|
3
|
+
The built-in public API lets plugins integrate with existing Agents without importing their implementation. The integration owns its business state and external relationships; builtin owns input admission, conversation history, and Agent execution.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Extend the domain you need
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Use the public Agent boundary when the work belongs in an existing Agent conversation. A plugin that needs its own execution model can instead compose host capabilities without adopting that conversation model.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Import original contracts from the domain package. Shared declaration identity lets an extension participate in existing behavior; a copied schema or an implementation import is not an equivalent integration. Depending on the public API also means depending on its enabled implementation provider.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Make messages readable and attributable
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Sender attribution explains where input came from independently of the Agent that receives it. It is not authority to access the source or a guarantee of a reply route. Preserve that distinction when bridging external systems or forwarding another Agent's message.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
| --- | --- | --- |
|
|
17
|
-
| `user` | Input from the user | No additional sender fields; this is the default when sender is omitted |
|
|
18
|
-
| `agent` | Communication from another Agent | Communication resource reference and Agent name, with optional Mesh channel addressing |
|
|
19
|
-
| `event` | Facts reported by a resource | Emitting resource reference and its name when the message is constructed |
|
|
15
|
+
Keep the body useful as ordinary readable text. For example, a pull-request notification can state the repository, change, author, and URL. The integration understands those facts and should explain them; the receiving Agent's instructions supply its responsibilities. A domain event does not need a private machine payload disguised as a message.
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
Use retained attachments when the message must preserve submitted bytes. Use file references when the message should carry an address for later consumption. Forwarding an address does not mean its content has been read or captured.
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
## Choose admission and scheduling intentionally
|
|
24
20
|
|
|
25
|
-
|
|
21
|
+
Successful submission means that input was accepted, not that the Agent completed the requested work. Design acknowledgements and external status updates around that distinction.
|
|
26
22
|
|
|
27
|
-
|
|
23
|
+
Choose steering for information intended to affect current work and follow-up delivery for a subsequent task. An updated fact and a new independent review may deserve different scheduling even when they came from the same sender. Do not assume one submitted message corresponds to one model request or one turn.
|
|
28
24
|
|
|
29
|
-
|
|
25
|
+
Retain the complete submission for a retry, including its identity and attribution. A retry asks about the same work; changing the body or sender while keeping its identity obscures that meaning. New work needs a new submission identity.
|
|
30
26
|
|
|
31
|
-
|
|
27
|
+
Cancellation of the submission and cancellation of the Agent's independent execution are different decisions. Bind an object-owned bridge to its resource lifetime, but do not treat the disappearance of a sending interface as an implicit request to stop the recipient.
|
|
32
28
|
|
|
33
|
-
|
|
34
|
-
| --- | --- |
|
|
35
|
-
| `steer` | At the next request boundary, after the current response and tool batch |
|
|
36
|
-
| `follow` | At a turn boundary, together with other pending inputs eligible for the next turn |
|
|
29
|
+
## Keep creation independent of input
|
|
37
30
|
|
|
38
|
-
|
|
31
|
+
Creating an Agent establishes an object; submitting input asks it to work. An integration can create an Agent now and submit ordinary input later. A starting interface may combine both in one transaction without inventing a separate first-message protocol.
|
|
39
32
|
|
|
40
|
-
|
|
33
|
+
Put required initialization in creation or prepared initial work. Observe creation facts for reactions after commitment, not as a blocking initialization hook. Resource presence is a lifetime concern: reconstruction can make an existing Agent present again without creating a new Agent.
|
|
41
34
|
|
|
42
|
-
|
|
35
|
+
## Route through explicit relationships
|
|
43
36
|
|
|
44
|
-
|
|
37
|
+
The publishing integration chooses recipients. A bridge can use its direct links to find Agents without obtaining their private state or inheriting their access to other resources. The reverse link is a separate relationship.
|
|
45
38
|
|
|
46
|
-
|
|
39
|
+
An SDK event is a transient notification, not an Agent message. Translate it into readable input only when the integration's purpose calls for that. This keeps transport, recipient policy, and conversation meaning with the layer that understands each one.
|
|
47
40
|
|
|
48
|
-
|
|
41
|
+
Communication resources should reuse public operation contracts when the semantics match while owning their own addressing and membership. Capture recipient authority at the request boundary; read mutable descriptions when handling the operation. A member directory informs routing without granting access beyond that scope.
|
|
49
42
|
|
|
50
|
-
|
|
43
|
+
## Distinguish admission, evidence, and execution
|
|
51
44
|
|
|
52
|
-
|
|
45
|
+
Use input preparation to inspect, replace, or reject a proposed submission. Keep it tied to a business rule and free of mutations that assume acceptance: preparation is not proof that the submission committed.
|
|
53
46
|
|
|
54
|
-
|
|
47
|
+
Acceptance is useful for integrations that acknowledge received work. Conversation records are evidence of input actually delivered to history. Queued input can remain editable or be discarded, so those observation points answer different questions.
|
|
55
48
|
|
|
56
|
-
|
|
49
|
+
Turn-end notifications describe execution boundaries, not an immutable seal on the conversation or a promise of future idleness. Use the reported input and history position to identify the work rather than assuming the live session tip still represents that ending. Failure, cancellation, and normal completion should remain distinct in downstream status.
|
|
57
50
|
|
|
58
|
-
|
|
51
|
+
Transient notifications suit live reactions. Durable reconciliation needs saved evidence. An observer runs after facts have committed and cannot replace admission or take control of turn scheduling.
|
|
59
52
|
|
|
60
|
-
##
|
|
53
|
+
## Investigate without continuing the target
|
|
61
54
|
|
|
62
|
-
|
|
55
|
+
A saved-conversation investigation explains evidence without starting a turn on the target Agent. It is useful for status or review questions that should not become new instructions to that Agent.
|
|
63
56
|
|
|
64
|
-
|
|
57
|
+
Keep the evidence snapshot separate from the caller's follow-up conversation. Each investigation can read fresh evidence while the caller retains earlier questions and reports as context. Preserve incomplete outcomes so a follow-up does not mistake a cancelled report for a complete account.
|
|
65
58
|
|
|
66
|
-
|
|
59
|
+
## Prepare context without claiming authority
|
|
67
60
|
|
|
68
|
-
|
|
61
|
+
Request preparation changes the skills and instruction blocks presented to an Agent. Use it for integration-specific context, not as a replacement for authorization. Omitting information from a prompt is not an access restriction.
|
|
69
62
|
|
|
70
|
-
|
|
63
|
+
Keep preparation deterministic within the captured request environment. Changes to configuration or catalogs belong to later requests rather than altering the meaning of a request already being assembled.
|
|
71
64
|
|
|
72
|
-
|
|
65
|
+
## Extend presentation without owning execution
|
|
73
66
|
|
|
74
|
-
|
|
67
|
+
Use presentation extensions for the integration's controls and business state while preserving builtin's conversation and execution ownership. A view closing does not complete or cancel waiting backend work. Reopening should read the current state rather than depend on an earlier component instance.
|
|
75
68
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
## Prepare incoming input
|
|
79
|
-
|
|
80
|
-
An external preparer can inspect, replace, or reject any of the three message sources using the original built-in action contract. Its replacement supplies raw action input that will be parsed again. Preparation applies to idle input, queued steering and follow-ups, and Home's initial input. It runs before acceptance, including on retries, so it is not an acceptance notification. Preparation has read capabilities and does not commit session mutations.
|
|
81
|
-
|
|
82
|
-
Keep a preparer's scope tied to its business purpose. It does not replace the Agent implementation or acquire a private Agent executor.
|
|
83
|
-
|
|
84
|
-
## Observe input and turn boundaries
|
|
85
|
-
|
|
86
|
-
Input preparation, acceptance, and delivery are separate observation points. Use a preparer to modify or reject a submission. Subscribe to `AgentInputAccepted` to react after a new input commits. Its payload contains the final prepared `input`, including `submissionId`, and `queued`, which reports whether it entered drafts instead of being delivered immediately. Rejected inputs and retries of accepted submissions produce no new acceptance event. Home publishes acceptance after its complete session-creation transaction succeeds.
|
|
87
|
-
|
|
88
|
-
Saving a held draft or changing an existing draft's mode is a draft-state operation, not a new input submission. These operations do not emit acceptance events; record observers still see the draft if it is delivered.
|
|
89
|
-
|
|
90
|
-
Observe `AgentInputMessage` through `SessionObserver.committed` to see actual delivery to conversation history. Queued messages produce this record when consumed; idle inputs produce it during acceptance. Steering records do not start a new turn. These records and acceptance events use separate delivery mechanisms; an idle input's record is committed before its acceptance event is published. Acceptance does not guarantee that a queued message will reach a model request: pending drafts remain editable and can be discarded.
|
|
91
|
-
|
|
92
|
-
Subscribe to `AgentTurnEnded` for execution boundaries. Every ending carries `reason` and `settled`. A normal turn followed by another queued batch reports `settled: false`; the last turn reports `settled: true` after the loop stops consuming. Failure and cancellation are reported with their own reasons rather than as successful completion. Steering joins the current turn and does not produce an ending by itself.
|
|
93
|
-
|
|
94
|
-
The event's `inputId` identifies the turn-opening input record, and `position.nodeId` identifies its ending history position before any next-turn inputs. `inputId` can be null when execution has no recorded turn input. By the time a handler runs, the live session may contain later records; use these identities to locate the reported work instead of assuming the current tip is that ending. A stopped turn can be resumed explicitly and emit another ending for the same input. The event does not seal history or promise that the Agent will remain idle.
|
|
95
|
-
|
|
96
|
-
Both events are transient occurrence notifications on `plugin.ipc.events`, with the receiving Agent as their resource source. Subscribe for all Agents or filter by session and resource identity, and bind subscriptions to the plugin lifetime. A plugin does not need its own resource to subscribe. Handlers run asynchronously and do not participate in input admission or turn scheduling. `settled` describes the consuming loop, while host task cleanup may still be tracked independently. Events are not replayed after restart.
|
|
97
|
-
|
|
98
|
-
`SessionObserver.completed` concerns finalized operation records; it is not a turn-end callback. Resource status events describe coarse workbench status. Use the Agent's domain notifications when input identity, turn position, or the distinction between turn end and loop end matters.
|
|
99
|
-
|
|
100
|
-
## Prepare model requests
|
|
101
|
-
|
|
102
|
-
The host collects skill packages and instruction blocks with their registering plugin's provenance. Builtin selects its effective skills and builds structured instruction blocks for each request. User skills override plugin skills, which override builtin skills.
|
|
103
|
-
|
|
104
|
-
Declare an Agent preparer to filter skills or remove, change, and append instruction blocks. Preparers run synchronously in plugin initialization order. Each request captures the catalog and preparer set before awaiting linked context, then uses the prepared result for its prompt. `skill_read` resolves names independently through the current flattened catalog. Removing a skill from the prompt does not restrict reading it; a catalog refresh affects later reads and model requests.
|
|
105
|
-
|
|
106
|
-
## Extend presentation
|
|
107
|
-
|
|
108
|
-
Agent history includes immutable model blocks and tool operations. Complete tool inputs are published before execution and their results fill the same record once. Read both through the public execution decoder when building a history projection; operation completion updates the existing record rather than appending a new tool position.
|
|
109
|
-
|
|
110
|
-
Response termination metadata may describe generation failure or cancellation as well as success. It belongs to the response's last model-ordinal block and does not invalidate all earlier content. Errors before any output remain transient. Retry activity belongs to current execution state, not historical notices.
|
|
111
|
-
|
|
112
|
-
Register Agent UI extensions during frontend preparation and bind registration to its cancellation signal. Extensions can present controls, supplemental content, overlays, or modal interaction using the built-in presentation components. Message sources already share the built-in body renderer and source presentation.
|
|
113
|
-
|
|
114
|
-
The plugin supplies business state for the associated Agent and callbacks for user actions. A component becoming invisible does not complete or cancel waiting backend work. Remounting should reread current state, and each submission entry owns its pending and error state.
|
|
69
|
+
When presenting history, distinguish immutable evidence from live progress and retry activity. A generation failure can coexist with useful earlier output or completed tool effects. Show what the evidence supports instead of assigning one blanket status to all preceding work.
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
# Offer resource creation to
|
|
1
|
+
# Offer resource creation to Agents
|
|
2
2
|
|
|
3
|
-
A plugin can
|
|
3
|
+
A plugin can make its resource available through builtin's model-facing creation mechanism without adopting the Agent's lifecycle or giving up ownership of the resource. The resource plugin still defines what the object means, what state it owns, and how it behaves.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Reuse creation meaning
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Build on the original public creation contract rather than creating a parallel initialization path. A straightforward entry can expose that contract directly. A specialized entry is useful when a model can supply a smaller meaningful input, such as a short note from which the plugin derives a titled document.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Keep that adaptation explainable. It should translate intent into the same domain creation operation, not bypass validation or hide unrelated effects. Descriptions and schemas should make the resulting object's purpose understandable without a manual recipe.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Choose relationships explicitly
|
|
12
|
+
|
|
13
|
+
Creation and access are separate responsibilities. A new resource does not inherit every link or capability of its creator. Decide which initial relationships make it useful within the invoking request's authorized scope.
|
|
14
|
+
|
|
15
|
+
The Agent's access to the new object and the object's access to the Agent are independent. A document may need only to be readable; a communication resource may also need a route back to its creator. Choose the reverse relationship for that purpose rather than treating mutual visibility as an automatic consequence of creation.
|
package/package.json
CHANGED
package/src/messaging.ts
CHANGED
|
@@ -49,17 +49,17 @@ export const sendResultSchema = z.strictObject({ name: z.string() })
|
|
|
49
49
|
export type SendResult = z.infer<typeof sendResultSchema>;
|
|
50
50
|
|
|
51
51
|
export const GetProfile = defineTool({
|
|
52
|
-
id: builtin.name("tool.get_profile"), name: "
|
|
53
|
-
description: "Read an Agent's name, configured type, and task
|
|
54
|
-
guidelines: ["Null target selects your own profile on this
|
|
52
|
+
id: builtin.name("tool.get_profile"), name: "mesh_get_profile",
|
|
53
|
+
description: "Read an Agent's name, configured type, and task descriptions through a Mesh resource.",
|
|
54
|
+
guidelines: ["Null target selects your own profile on this Mesh. Other targets follow the Mesh's channel-local addressing schema."],
|
|
55
55
|
argsSchema: z.strictObject({}).describe("Empty parameter object."),
|
|
56
56
|
});
|
|
57
57
|
export const SetProfile = defineTool({
|
|
58
|
-
id: builtin.name("tool.set_profile"), name: "
|
|
59
|
-
description: "Set your own task description on
|
|
58
|
+
id: builtin.name("tool.set_profile"), name: "mesh_set_profile",
|
|
59
|
+
description: "Set your own task description on a Mesh resource.",
|
|
60
60
|
guidelines: ["The runtime identifies the caller. Name and configured Agent type come from the Agent.",
|
|
61
|
-
"Descriptions belong to this resource. An empty description clears your description."],
|
|
61
|
+
"Descriptions belong to this Mesh resource. An empty description clears your description."],
|
|
62
62
|
argsSchema: z.strictObject({
|
|
63
63
|
description: z.string().trim().max(1000).describe("A brief description of your current task. Empty text clears it."),
|
|
64
|
-
}).describe("Your task description on this resource."),
|
|
64
|
+
}).describe("Your task description on this Mesh resource."),
|
|
65
65
|
});
|
package/src/peek-renderer.ts
CHANGED
|
@@ -2,10 +2,10 @@ import type { RendererObjectContext } from "@asterism-app/sdk/renderer";
|
|
|
2
2
|
import { PeekChannel, type PeekClient, type PeekEvent, type PeekResult } from "./peek.ts";
|
|
3
3
|
|
|
4
4
|
/** Binds Peek to the displayed Agent. Stream completion carries the outcome; early iterator exit closes the channel. */
|
|
5
|
-
export function createPeekClient(
|
|
5
|
+
export function createPeekClient({ openChannel }: Pick<RendererObjectContext, "openChannel">): PeekClient {
|
|
6
6
|
const stream: PeekClient["stream"] = async function* (input, { signal }) {
|
|
7
7
|
signal.throwIfAborted();
|
|
8
|
-
const channel =
|
|
8
|
+
const channel = openChannel(PeekChannel);
|
|
9
9
|
const abort = () => channel.close();
|
|
10
10
|
signal.addEventListener("abort", abort, { once: true });
|
|
11
11
|
let completed = false;
|
package/src/search.ts
CHANGED
|
@@ -12,7 +12,7 @@ const globGuidelines = [
|
|
|
12
12
|
];
|
|
13
13
|
|
|
14
14
|
export const Find = defineTool({
|
|
15
|
-
id: builtin.name("tool.find"), name: "
|
|
15
|
+
id: builtin.name("tool.find"), name: "glob",
|
|
16
16
|
description: "Find files by glob pattern within a resource.",
|
|
17
17
|
guidelines: [
|
|
18
18
|
...globGuidelines,
|
|
@@ -28,7 +28,7 @@ export const Grep = defineTool({
|
|
|
28
28
|
id: builtin.name("tool.grep"), name: "grep",
|
|
29
29
|
description: "Search text for a regular expression or literal pattern within a resource.",
|
|
30
30
|
guidelines: [
|
|
31
|
-
"
|
|
31
|
+
"Matching and context lines carry LINE#HASH anchors usable directly in edit where supported. Resource implementations define additional output views.",
|
|
32
32
|
"Regular expressions use ripgrep's default Rust regex syntax. Matching is line-oriented.",
|
|
33
33
|
"target selects the search scope and resource-specific content view according to the resource implementation's schema.",
|
|
34
34
|
],
|
package/src/text.ts
CHANGED
|
@@ -30,7 +30,7 @@ export type TextRow = z.infer<typeof textRowSchema>;
|
|
|
30
30
|
export const textReadTargetSchema = z.strictObject({
|
|
31
31
|
offset: z.number().int().positive().optional().describe("First line to read, 1-based in the complete text; defaults to 1."),
|
|
32
32
|
limit: z.number().int().positive().max(2000).optional().describe("Maximum lines to read; defaults to 1000, maximum 2000. Output is also limited to 64 KiB of line text; lines longer than 16000 characters are returned as excerpts."),
|
|
33
|
-
anchored: z.boolean().optional().describe("Include LINE#HASH
|
|
33
|
+
anchored: z.boolean().optional().describe("Include per-line content hashes for edit (LINE#HASH│content); defaults to true. Hashes identify complete lines, including excerpts. False returns line-numbered text without edit anchors."),
|
|
34
34
|
});
|
|
35
35
|
export const textReadSchema = z.strictObject({
|
|
36
36
|
totalLines: z.number().int().nonnegative().describe("Number of logical lines in the complete text; empty text has zero lines."),
|
package/src/tools.ts
CHANGED
|
@@ -32,7 +32,7 @@ export const Metadata = defineTool({
|
|
|
32
32
|
export const Read = defineTool({
|
|
33
33
|
id: builtin.name("tool.read"),
|
|
34
34
|
name: "read",
|
|
35
|
-
description: "Read the selected content as text.",
|
|
35
|
+
description: "Read the selected content as text. Where supported, text lines display per-line content hashes by default (LINE#HASH│content) for hashline-verified editing.",
|
|
36
36
|
guidelines: [
|
|
37
37
|
"target selects the content, range, and reading view according to the resource implementation's schema.",
|
|
38
38
|
"The result reports positions and a continuation point where the implementation supports ranges.",
|
|
@@ -43,10 +43,10 @@ export const Read = defineTool({
|
|
|
43
43
|
export const Edit = defineTool({
|
|
44
44
|
id: builtin.name("tool.edit"),
|
|
45
45
|
name: "edit",
|
|
46
|
-
description: "
|
|
46
|
+
description: "Edit selected lines in existing text using hashline operations. LINE#HASH anchors come from the latest read, grep, edit, or replace result.",
|
|
47
47
|
guidelines: [
|
|
48
48
|
"target selects existing editable text according to the resource implementation's schema. args.edits contains the operations.",
|
|
49
|
-
|
|
49
|
+
'For a line shown as 12#ABCD│old, a single-line replacement is args.edits=[{"op":"replace","anchor":{"line":12,"hash":"ABCD"},"body":["new"]}].',
|
|
50
50
|
"replace/delete affect the inclusive anchor..end range. An omitted end selects one line. Validation checks the cited endpoints.",
|
|
51
51
|
"insert_before/insert_after preserve the anchor line. body contains the new lines.",
|
|
52
52
|
"append/prepend take body. Each body item is one text line; an empty string represents a blank line.",
|
|
@@ -113,12 +113,13 @@ export const See = defineTool({
|
|
|
113
113
|
export const Wait = defineTool({
|
|
114
114
|
id: builtin.name("tool.wait"),
|
|
115
115
|
name: "wait",
|
|
116
|
-
description: "Wait until a resource reaches its resting state,
|
|
116
|
+
description: "Wait until a resource reaches its resting state, with an optional timeout.",
|
|
117
117
|
guidelines: [
|
|
118
118
|
"The resource implementation defines its resting state. A resource already at rest returns immediately.",
|
|
119
|
+
"Normally omit timeout and wait for completion or cancellation. Specify it only when the task has an explicit time limit.",
|
|
119
120
|
"Timeout or cancellation ends only the wait; the resource continues its own work. The result reports the observed state.",
|
|
120
121
|
],
|
|
121
122
|
argsSchema: z.strictObject({
|
|
122
|
-
timeout: z.number().positive().max(2147483).describe("
|
|
123
|
-
}).describe("
|
|
123
|
+
timeout: z.number().positive().max(2147483).optional().describe("Optional maximum wait in seconds; omitted means no timeout."),
|
|
124
|
+
}).describe("Wait with an optional time limit."),
|
|
124
125
|
});
|