Skip to content

Commit e2d1d76

Browse files
committed
refine descriptions, add runtime_hint, name_hint->value_hint
1 parent 7b02966 commit e2d1d76

File tree

2 files changed

+28
-16
lines changed

2 files changed

+28
-16
lines changed

api/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ GET /v0/servers/a5e8a7f0-d4e4-4a1d-b12f-2896a23fd4f1?version=0.0.3
6868
"package_arguments": [
6969
{
7070
"type": "positional",
71-
"name_hint": "target_dir",
71+
"value_hint": "target_dir",
7272
"description": "Path to access",
7373
"default": "/Users/username/Desktop",
7474
"is_required": true,
@@ -112,7 +112,7 @@ GET /v0/servers/a5e8a7f0-d4e4-4a1d-b12f-2896a23fd4f1?version=0.0.3
112112
"package_arguments": [
113113
{
114114
"type": "positional",
115-
"name_hint": "target_dir",
115+
"value_hint": "target_dir",
116116
"value": "/project",
117117
}
118118
],
@@ -238,7 +238,7 @@ API Response:
238238
"package_arguments": [
239239
{
240240
"type": "positional",
241-
"name_hint": "target_dir",
241+
"value_hint": "target_dir",
242242
"value": "/project",
243243
}
244244
]

api/openapi.yaml

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -180,48 +180,59 @@ components:
180180
version:
181181
type: string
182182
example: "1.0.2"
183+
runtime_hint:
184+
type: string
185+
description: A hint to help clients determine the appropriate runtime for the package. This field should be provided when `runtime_arguments` are present.
186+
examples: [npx, uvx]
183187
runtime_arguments:
184188
type: array
185-
description: List of arguments passed to the package's runtime command (such as docker or npx).
189+
description: A list of arguments to be passed to the package's runtime command (such as docker or npx). The `runtime_hint` field should be provided when `runtime_arguments` are present.
186190
items:
187191
$ref: '#/components/schemas/Argument'
188192
package_arguments:
189193
type: array
190-
description: List of arguments passed to the package's binary.
194+
description: A list of arguments to be passed to the package's binary.
191195
items:
192196
$ref: '#/components/schemas/Argument'
193197
environment_variables:
194198
type: array
199+
description: A mapping of environment variables to be set when running the package.
195200
items:
196201
$ref: '#/components/schemas/KeyValueInput'
197202

198203
Input:
199204
type: object
200205
properties:
201206
description:
202-
description: A description of the input, which can be used by clients to provide context to the user.
207+
description: A description of the input, which clients can use to provide context to the user.
203208
type: string
204209
is_required:
205210
type: boolean
206211
default: false
207212
format:
208213
type: string
209-
description: Input format. Includes a variety of standardized formats, including `filepath`, which should be interpreted as a file on the user's filesystem.
214+
description: |
215+
Specifies the input format. Supported values include `filepath`, which should be interpreted as a file on the user's filesystem.
216+
217+
When the input is converted to a string, booleans should be represented by the strings "true" and "false", and numbers should be represented as decimal values.
210218
enum: [string, number, boolean, filepath]
211219
default: string
212220
value:
213221
type: string
214-
description: The default value for the input. If this is not set, the user will be asked to provide a value. If the `variables` property is provided, then values wrapped in `{curly_braces}` will be replaced with the corresponding variables.
222+
description: |
223+
The default value for the input. If this is not set, the user may be prompted to provide a value.
224+
225+
Identifiers wrapped in `{curly_braces}` will be replaced with the corresponding properties from the input `variables` map. If an identifier in braces is not found in `variables`, or if `variables` is not provided, the `{curly_braces}` substring should remain unchanged.
215226
is_secret:
216227
type: boolean
217-
description: Whether the input is a secret value (e.g., password, token). If true, clients should handle the value securely.
228+
description: Indicates whether the input is a secret value (e.g., password, token). If true, clients should handle the value securely.
218229
default: false
219230
default:
220231
type: string
221232
description: The default value for the input.
222233
choices:
223234
type: array
224-
description: A list of possible values for the input. If given, the user must pick one of these values.
235+
description: A list of possible values for the input. If provided, the user must select one of these values.
225236
items:
226237
type: string
227238
example: []
@@ -233,7 +244,7 @@ components:
233244
properties:
234245
variables:
235246
type: object
236-
description: A map of variable names to their values. Keys in the input `value` wrapped in `{curly_braces}` will be replaced with the corresponding variables.
247+
description: A map of variable names to their values. Keys in the input `value` that are wrapped in `{curly_braces}` will be replaced with the corresponding variable values.
237248
additionalProperties:
238249
$ref: '#/components/schemas/Input'
239250

@@ -244,19 +255,19 @@ components:
244255
- type: object
245256
required:
246257
- type
247-
- name_hint
258+
- value_hint
248259
properties:
249260
type:
250261
type: string
251262
enum: [positional]
252263
example: "positional"
253-
name_hint:
264+
value_hint:
254265
type: string
255-
description: Name of the positional argument. This is not part of the command line, but can be used for reference by client configuration and used to hint users.
266+
description: An identifier-like hint for the value. This is not part of the command line, but can be used by client configuration and to provide hints to users.
256267
example: file_path
257268
is_repeated:
258269
type: boolean
259-
description: Whether the input can be repeated multiple times in the command line.
270+
description: Whether the argument can be repeated multiple times in the command line.
260271
default: false
261272

262273
NamedArgument:
@@ -274,10 +285,11 @@ components:
274285
example: "named"
275286
name:
276287
type: string
288+
description: The flag name, including any leading dashes.
277289
example: "--port"
278290
is_repeated:
279291
type: boolean
280-
description: Whether the argument can be repeated multiple times. Has no effect for environment variables.
292+
description: Whether the argument can be repeated multiple times.
281293
default: false
282294

283295
KeyValueInput:

0 commit comments

Comments
 (0)