@lobehub/cli 0.0.149 → 0.0.151
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/dist/acceptance-report.html +252 -252
- package/dist/index.js +1192 -320
- package/man/man1/lh.1 +4 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@ import { finished, pipeline } from "node:stream/promises";
|
|
|
21
21
|
import { Duplex, PassThrough, Readable, Transform, Writable, getDefaultHighWaterMark, pipeline as pipeline$1 } from "node:stream";
|
|
22
22
|
import readline, { createInterface } from "node:readline";
|
|
23
23
|
import { ReadableStream as ReadableStream$1 } from "node:stream/web";
|
|
24
|
-
import { text } from "node:stream/consumers";
|
|
24
|
+
import { buffer, text } from "node:stream/consumers";
|
|
25
25
|
import http, { Agent, ServerResponse, createServer as createServer$1, request } from "node:http";
|
|
26
26
|
import { createServer as createServer$2, request as request$1 } from "node:https";
|
|
27
27
|
import zlib, { zstdDecompress } from "node:zlib";
|
|
@@ -5656,7 +5656,7 @@ function nativeEnum(entries, params) {
|
|
|
5656
5656
|
...normalizeParams(params)
|
|
5657
5657
|
});
|
|
5658
5658
|
}
|
|
5659
|
-
function literal(value, params) {
|
|
5659
|
+
function literal$1(value, params) {
|
|
5660
5660
|
return new ZodLiteral$1({
|
|
5661
5661
|
type: "literal",
|
|
5662
5662
|
values: Array.isArray(value) ? value : [value],
|
|
@@ -7788,6 +7788,7 @@ var init_pluginConfig = __esmMin((() => {
|
|
|
7788
7788
|
"disabled"
|
|
7789
7789
|
]);
|
|
7790
7790
|
AgentPluginEntrySchema = union([string(), object$1({
|
|
7791
|
+
builtinOverride: literal$1(true).optional(),
|
|
7791
7792
|
identifier: string(),
|
|
7792
7793
|
mode: AgentPluginModeSchema.optional()
|
|
7793
7794
|
})]);
|
|
@@ -8153,8 +8154,8 @@ var init_agentHook = __esmMin((() => {
|
|
|
8153
8154
|
var toolCallHookDecisionSchema;
|
|
8154
8155
|
var init_agentHookResponse = __esmMin((() => {
|
|
8155
8156
|
init_zod$1();
|
|
8156
|
-
toolCallHookDecisionSchema = discriminatedUnion("decision", [object$1({ decision: literal("allow") }), object$1({
|
|
8157
|
-
decision: literal("deny"),
|
|
8157
|
+
toolCallHookDecisionSchema = discriminatedUnion("decision", [object$1({ decision: literal$1("allow") }), object$1({
|
|
8158
|
+
decision: literal$1("deny"),
|
|
8158
8159
|
reason: string().optional()
|
|
8159
8160
|
})]);
|
|
8160
8161
|
}));
|
|
@@ -8238,9 +8239,9 @@ var init_base$1 = __esmMin((() => {
|
|
|
8238
8239
|
]).optional(),
|
|
8239
8240
|
summary: array(object$1({
|
|
8240
8241
|
text: string(),
|
|
8241
|
-
type: literal("summary_text")
|
|
8242
|
+
type: literal$1("summary_text")
|
|
8242
8243
|
})),
|
|
8243
|
-
type: literal("reasoning")
|
|
8244
|
+
type: literal$1("reasoning")
|
|
8244
8245
|
}).passthrough();
|
|
8245
8246
|
ModelReasoningSchema = object$1({
|
|
8246
8247
|
content: string().optional(),
|
|
@@ -8369,7 +8370,7 @@ var init_contextAccounting = __esmMin((() => {
|
|
|
8369
8370
|
toolCalls: 0,
|
|
8370
8371
|
toolDefinition: 0
|
|
8371
8372
|
}),
|
|
8372
|
-
estimator: literal("tokenx").catch("tokenx"),
|
|
8373
|
+
estimator: literal$1("tokenx").catch("tokenx"),
|
|
8373
8374
|
messageCount: tokens,
|
|
8374
8375
|
system: tokens,
|
|
8375
8376
|
total: tokens
|
|
@@ -8406,7 +8407,7 @@ var init_contextSelection = __esmMin((() => {
|
|
|
8406
8407
|
startOffset: number$1()
|
|
8407
8408
|
}).optional(),
|
|
8408
8409
|
pageId: string(),
|
|
8409
|
-
source: literal("page"),
|
|
8410
|
+
source: literal$1("page"),
|
|
8410
8411
|
xml: string().optional()
|
|
8411
8412
|
});
|
|
8412
8413
|
CodeContextSelectionSchema = ContextSelectionBaseSchema.extend({
|
|
@@ -8417,10 +8418,10 @@ var init_contextSelection = __esmMin((() => {
|
|
|
8417
8418
|
"context",
|
|
8418
8419
|
"deletions"
|
|
8419
8420
|
]).optional(),
|
|
8420
|
-
source: literal("code"),
|
|
8421
|
+
source: literal$1("code"),
|
|
8421
8422
|
workingDirectory: string().optional()
|
|
8422
8423
|
});
|
|
8423
|
-
TextContextSelectionSchema = ContextSelectionBaseSchema.extend({ source: literal("text") });
|
|
8424
|
+
TextContextSelectionSchema = ContextSelectionBaseSchema.extend({ source: literal$1("text") });
|
|
8424
8425
|
ElementContextSelectionSchema = ContextSelectionBaseSchema.extend({
|
|
8425
8426
|
element: object$1({
|
|
8426
8427
|
pageTitle: string().optional(),
|
|
@@ -8430,11 +8431,11 @@ var init_contextSelection = __esmMin((() => {
|
|
|
8430
8431
|
thumbnailUrl: string().optional(),
|
|
8431
8432
|
url: string().optional()
|
|
8432
8433
|
}),
|
|
8433
|
-
source: literal("element")
|
|
8434
|
+
source: literal$1("element")
|
|
8434
8435
|
});
|
|
8435
8436
|
McpAppContextSelectionSchema = ContextSelectionBaseSchema.extend({
|
|
8436
8437
|
identifier: string(),
|
|
8437
|
-
source: literal("mcpApp")
|
|
8438
|
+
source: literal$1("mcpApp")
|
|
8438
8439
|
});
|
|
8439
8440
|
ContextSelectionSchema = discriminatedUnion("source", [
|
|
8440
8441
|
PageContextSelectionSchema,
|
|
@@ -8486,17 +8487,17 @@ var init_metadata = __esmMin((() => {
|
|
|
8486
8487
|
taskId: string().optional(),
|
|
8487
8488
|
taskIdentifier: string().optional()
|
|
8488
8489
|
})),
|
|
8489
|
-
type: literal("task")
|
|
8490
|
+
type: literal$1("task")
|
|
8490
8491
|
}),
|
|
8491
8492
|
object$1({
|
|
8492
8493
|
args: record(string(), unknown()).optional(),
|
|
8493
8494
|
data: unknown(),
|
|
8494
8495
|
provider: string(),
|
|
8495
8496
|
toolName: string(),
|
|
8496
|
-
type: literal("skill")
|
|
8497
|
+
type: literal$1("skill")
|
|
8497
8498
|
}),
|
|
8498
8499
|
object$1({
|
|
8499
|
-
action: literal("register"),
|
|
8500
|
+
action: literal$1("register"),
|
|
8500
8501
|
document: object$1({
|
|
8501
8502
|
agentDocumentId: string().nullish(),
|
|
8502
8503
|
agentId: string().nullish(),
|
|
@@ -8505,19 +8506,19 @@ var init_metadata = __esmMin((() => {
|
|
|
8505
8506
|
changeType: _enum(["created", "updated"]),
|
|
8506
8507
|
toolName: string()
|
|
8507
8508
|
}),
|
|
8508
|
-
type: literal("document")
|
|
8509
|
+
type: literal$1("document")
|
|
8509
8510
|
}),
|
|
8510
8511
|
object$1({
|
|
8511
|
-
action: literal("delete"),
|
|
8512
|
+
action: literal$1("delete"),
|
|
8512
8513
|
document: object$1({
|
|
8513
8514
|
agentDocumentId: string().nullish(),
|
|
8514
8515
|
agentId: string().nullish(),
|
|
8515
8516
|
documentId: string()
|
|
8516
8517
|
}),
|
|
8517
|
-
type: literal("document")
|
|
8518
|
+
type: literal$1("document")
|
|
8518
8519
|
}),
|
|
8519
8520
|
object$1({
|
|
8520
|
-
action: literal("register"),
|
|
8521
|
+
action: literal$1("register"),
|
|
8521
8522
|
canvas: object$1({
|
|
8522
8523
|
canvasId: string(),
|
|
8523
8524
|
description: string().nullish(),
|
|
@@ -8531,7 +8532,7 @@ var init_metadata = __esmMin((() => {
|
|
|
8531
8532
|
totalSize: number$1()
|
|
8532
8533
|
})
|
|
8533
8534
|
}),
|
|
8534
|
-
type: literal("canvas")
|
|
8535
|
+
type: literal$1("canvas")
|
|
8535
8536
|
})
|
|
8536
8537
|
]);
|
|
8537
8538
|
LocalSystemToolSnapshotSchema = object$1({
|
|
@@ -8545,7 +8546,7 @@ var init_metadata = __esmMin((() => {
|
|
|
8545
8546
|
capturedAt: string(),
|
|
8546
8547
|
content: string().nullable(),
|
|
8547
8548
|
error: unknown().optional(),
|
|
8548
|
-
identifier: literal("lobe-local-system"),
|
|
8549
|
+
identifier: literal$1("lobe-local-system"),
|
|
8549
8550
|
result: unknown().optional(),
|
|
8550
8551
|
snapshotId: string(),
|
|
8551
8552
|
state: unknown().optional(),
|
|
@@ -8624,7 +8625,7 @@ var init_metadata = __esmMin((() => {
|
|
|
8624
8625
|
});
|
|
8625
8626
|
AgentDispatchMetadataSchema = object$1({
|
|
8626
8627
|
kind: _enum(["callAgent"]),
|
|
8627
|
-
visibility: literal("internal")
|
|
8628
|
+
visibility: literal$1("internal")
|
|
8628
8629
|
});
|
|
8629
8630
|
AgentSenderMetadataSchema = object$1({
|
|
8630
8631
|
agentId: string(),
|
|
@@ -9002,14 +9003,14 @@ var init_builtin = __esmMin((() => {
|
|
|
9002
9003
|
identifier: string(),
|
|
9003
9004
|
meta: MetaSchema,
|
|
9004
9005
|
systemRole: string(),
|
|
9005
|
-
type: literal("builtin").optional()
|
|
9006
|
+
type: literal$1("builtin").optional()
|
|
9006
9007
|
});
|
|
9007
9008
|
LobeBuiltinToolSchema = object$1({
|
|
9008
9009
|
discoverable: boolean().optional(),
|
|
9009
9010
|
hidden: boolean().optional(),
|
|
9010
9011
|
identifier: string(),
|
|
9011
9012
|
manifest: BuiltinToolManifestSchema,
|
|
9012
|
-
type: literal("builtin")
|
|
9013
|
+
type: literal$1("builtin")
|
|
9013
9014
|
});
|
|
9014
9015
|
}));
|
|
9015
9016
|
|
|
@@ -9030,7 +9031,7 @@ var init_manifest = __esmMin((() => {
|
|
|
9030
9031
|
ToolManifestSettingsSchema = object$1({
|
|
9031
9032
|
properties: record(string(), any()),
|
|
9032
9033
|
required: array(string()).optional(),
|
|
9033
|
-
type: literal("object")
|
|
9034
|
+
type: literal$1("object")
|
|
9034
9035
|
});
|
|
9035
9036
|
ToolManifestSchema = object$1({
|
|
9036
9037
|
$schema: string().optional(),
|
|
@@ -9096,7 +9097,7 @@ var init_tool$2 = __esmMin((() => {
|
|
|
9096
9097
|
additionalProperties: boolean().optional(),
|
|
9097
9098
|
properties: record(string(), any()),
|
|
9098
9099
|
required: array(string()).optional(),
|
|
9099
|
-
type: literal("object")
|
|
9100
|
+
type: literal$1("object")
|
|
9100
9101
|
})
|
|
9101
9102
|
});
|
|
9102
9103
|
}));
|
|
@@ -9129,7 +9130,7 @@ var init_understanding = __esmMin((() => {
|
|
|
9129
9130
|
MAX_UNDERSTANDING_FEEDBACK_LENGTH = 2e3;
|
|
9130
9131
|
MAX_UNDERSTANDING_FEEDBACK_TURNS = 16;
|
|
9131
9132
|
MAX_PERSONA_CONTENT_LENGTH = 12e3;
|
|
9132
|
-
OnboardingUnderstandingThreadMarkerSchema = object$1({ kind: literal("writing") }).strict();
|
|
9133
|
+
OnboardingUnderstandingThreadMarkerSchema = object$1({ kind: literal$1("writing") }).strict();
|
|
9133
9134
|
CollectionErrorSchema = object$1({
|
|
9134
9135
|
code: string().max(64),
|
|
9135
9136
|
message: string(),
|
|
@@ -9191,7 +9192,7 @@ var init_understanding = __esmMin((() => {
|
|
|
9191
9192
|
diagnostics: CollectionDiagnosticsSchema,
|
|
9192
9193
|
feedbackRevision: number$1().int().nonnegative().max(MAX_COLLECTION_COUNT).default(0),
|
|
9193
9194
|
generationRevision: number$1().int().nonnegative().max(MAX_COLLECTION_COUNT).default(0),
|
|
9194
|
-
kind: literal("proposal"),
|
|
9195
|
+
kind: literal$1("proposal"),
|
|
9195
9196
|
providers: array(string().max(64)),
|
|
9196
9197
|
resultId: string(),
|
|
9197
9198
|
sourceFingerprint: string()
|
|
@@ -9221,16 +9222,16 @@ var init_understanding = __esmMin((() => {
|
|
|
9221
9222
|
understandingWritingStateBaseShape = {
|
|
9222
9223
|
detailed: discriminatedUnion("status", [
|
|
9223
9224
|
object$1({
|
|
9224
|
-
status: literal("running"),
|
|
9225
|
+
status: literal$1("running"),
|
|
9225
9226
|
updatedAt: string()
|
|
9226
9227
|
}).strict(),
|
|
9227
9228
|
object$1({
|
|
9228
|
-
status: literal("completed"),
|
|
9229
|
+
status: literal$1("completed"),
|
|
9229
9230
|
updatedAt: string()
|
|
9230
9231
|
}).strict(),
|
|
9231
9232
|
object$1({
|
|
9232
9233
|
error: CollectionErrorSchema,
|
|
9233
|
-
status: literal("failed"),
|
|
9234
|
+
status: literal$1("failed"),
|
|
9234
9235
|
updatedAt: string()
|
|
9235
9236
|
}).strict()
|
|
9236
9237
|
]).optional(),
|
|
@@ -9243,18 +9244,18 @@ var init_understanding = __esmMin((() => {
|
|
|
9243
9244
|
object$1({
|
|
9244
9245
|
...understandingWritingStateBaseShape,
|
|
9245
9246
|
resultMessageId: string().optional(),
|
|
9246
|
-
status: literal("running")
|
|
9247
|
+
status: literal$1("running")
|
|
9247
9248
|
}).strict(),
|
|
9248
9249
|
object$1({
|
|
9249
9250
|
...understandingWritingStateBaseShape,
|
|
9250
9251
|
resultMessageId: string(),
|
|
9251
|
-
status: literal("completed")
|
|
9252
|
+
status: literal$1("completed")
|
|
9252
9253
|
}).strict(),
|
|
9253
9254
|
object$1({
|
|
9254
9255
|
...understandingWritingStateBaseShape,
|
|
9255
9256
|
error: CollectionErrorSchema,
|
|
9256
9257
|
resultMessageId: string().optional(),
|
|
9257
|
-
status: literal("failed")
|
|
9258
|
+
status: literal$1("failed")
|
|
9258
9259
|
}).strict()
|
|
9259
9260
|
]);
|
|
9260
9261
|
OnboardingUnderstandingSessionSchema = object$1({
|
|
@@ -9403,7 +9404,7 @@ var init_aiChat = __esmMin((() => {
|
|
|
9403
9404
|
additionalProperties: boolean().optional(),
|
|
9404
9405
|
properties: record(string(), any()),
|
|
9405
9406
|
required: array(string()).optional(),
|
|
9406
|
-
type: literal("object")
|
|
9407
|
+
type: literal$1("object")
|
|
9407
9408
|
}),
|
|
9408
9409
|
strict: boolean().optional()
|
|
9409
9410
|
});
|
|
@@ -9419,7 +9420,7 @@ var init_aiChat = __esmMin((() => {
|
|
|
9419
9420
|
schema: StructureSchema.optional(),
|
|
9420
9421
|
tools: array(object$1({
|
|
9421
9422
|
function: LobeUniformToolSchema,
|
|
9422
|
-
type: literal("function")
|
|
9423
|
+
type: literal$1("function")
|
|
9423
9424
|
})).optional(),
|
|
9424
9425
|
/**
|
|
9425
9426
|
* Structured tracing config (scenario / promptVersion / schemaName /
|
|
@@ -9446,17 +9447,17 @@ var init_aiChat = __esmMin((() => {
|
|
|
9446
9447
|
true: DecisionContentSchema
|
|
9447
9448
|
}).optional(),
|
|
9448
9449
|
instructions: DecisionContentSchema,
|
|
9449
|
-
type: literal("boolean")
|
|
9450
|
+
type: literal$1("boolean")
|
|
9450
9451
|
}),
|
|
9451
9452
|
object$1({
|
|
9452
9453
|
criteria: record(string(), DecisionContentSchema.nullable()),
|
|
9453
9454
|
instructions: DecisionContentSchema,
|
|
9454
|
-
type: literal("choice")
|
|
9455
|
+
type: literal$1("choice")
|
|
9455
9456
|
}),
|
|
9456
9457
|
object$1({
|
|
9457
9458
|
criteria: array(DecisionContentSchema).min(1),
|
|
9458
9459
|
instructions: DecisionContentSchema,
|
|
9459
|
-
type: literal("score")
|
|
9460
|
+
type: literal$1("score")
|
|
9460
9461
|
})
|
|
9461
9462
|
]);
|
|
9462
9463
|
DecisionOutputSchema = object$1({
|
|
@@ -10109,9 +10110,9 @@ var init_followUpAction = __esmMin((() => {
|
|
|
10109
10110
|
init_zod$1();
|
|
10110
10111
|
init_agentOnboarding();
|
|
10111
10112
|
FollowUpHintSchema = union([object$1({
|
|
10112
|
-
kind: literal("onboarding"),
|
|
10113
|
+
kind: literal$1("onboarding"),
|
|
10113
10114
|
phase: OnboardingPhaseSchema
|
|
10114
|
-
}), object$1({ kind: literal("chat") })]);
|
|
10115
|
+
}), object$1({ kind: literal$1("chat") })]);
|
|
10115
10116
|
FollowUpModelConfigSchema = object$1({
|
|
10116
10117
|
model: string().min(1),
|
|
10117
10118
|
provider: string().min(1)
|
|
@@ -10239,7 +10240,7 @@ var init_heteroSessionImport = __esmMin((() => {
|
|
|
10239
10240
|
arguments: string(),
|
|
10240
10241
|
id: string(),
|
|
10241
10242
|
identifier: string(),
|
|
10242
|
-
type: literal("default")
|
|
10243
|
+
type: literal$1("default")
|
|
10243
10244
|
});
|
|
10244
10245
|
heteroSessionImportMessageSchema = object$1({
|
|
10245
10246
|
clientId: string(),
|
|
@@ -11067,7 +11068,7 @@ var init_topic$1 = __esmMin((() => {
|
|
|
11067
11068
|
resumeAfterRateLimitRunSchema = topicScheduledRunBaseSchema.extend({
|
|
11068
11069
|
/** The failed assistant turn that hit the rate limit (regenerated in place). */
|
|
11069
11070
|
failedAssistantMessageId: string(),
|
|
11070
|
-
kind: literal("resume_after_rate_limit"),
|
|
11071
|
+
kind: literal$1("resume_after_rate_limit"),
|
|
11071
11072
|
/** Diagnostics only — `runAt` is derived from `resetsAt` at write time. */
|
|
11072
11073
|
rateLimit: object$1({
|
|
11073
11074
|
rateLimitType: string().optional(),
|
|
@@ -11078,12 +11079,12 @@ var init_topic$1 = __esmMin((() => {
|
|
|
11078
11079
|
sessionId: string().optional(),
|
|
11079
11080
|
workingDirectory: string().optional()
|
|
11080
11081
|
}).optional(),
|
|
11081
|
-
source: literal("heterogeneous_agent"),
|
|
11082
|
+
source: literal$1("heterogeneous_agent"),
|
|
11082
11083
|
/** The user message whose turn is being continued. */
|
|
11083
11084
|
userMessageId: string()
|
|
11084
11085
|
});
|
|
11085
11086
|
delayedStartRunSchema = topicScheduledRunBaseSchema.extend({
|
|
11086
|
-
kind: literal("delayed_start"),
|
|
11087
|
+
kind: literal$1("delayed_start"),
|
|
11087
11088
|
/** Model override captured at schedule time (the agent default is used if absent). */
|
|
11088
11089
|
model: string().optional(),
|
|
11089
11090
|
/** Provider override captured at schedule time. */
|
|
@@ -11108,7 +11109,7 @@ var init_topic$1 = __esmMin((() => {
|
|
|
11108
11109
|
});
|
|
11109
11110
|
worktreeStartRunSchema = topicScheduledRunBaseSchema.extend({
|
|
11110
11111
|
error: string().optional(),
|
|
11111
|
-
kind: literal("worktree_start"),
|
|
11112
|
+
kind: literal$1("worktree_start"),
|
|
11112
11113
|
operationId: string(),
|
|
11113
11114
|
retryable: boolean().optional(),
|
|
11114
11115
|
userMessageId: string(),
|
|
@@ -11128,12 +11129,12 @@ var init_topic$1 = __esmMin((() => {
|
|
|
11128
11129
|
rateLimitType: string().optional(),
|
|
11129
11130
|
resetsAt: number$1().optional()
|
|
11130
11131
|
}).optional(),
|
|
11131
|
-
reason: literal("rate_limit"),
|
|
11132
|
+
reason: literal$1("rate_limit"),
|
|
11132
11133
|
resume: object$1({
|
|
11133
11134
|
sessionId: string().optional(),
|
|
11134
11135
|
workingDirectory: string().optional()
|
|
11135
11136
|
}).optional(),
|
|
11136
|
-
source: literal("heterogeneous_agent"),
|
|
11137
|
+
source: literal$1("heterogeneous_agent"),
|
|
11137
11138
|
updatedAt: string(),
|
|
11138
11139
|
userMessageId: string()
|
|
11139
11140
|
});
|
|
@@ -11814,23 +11815,23 @@ var init_tools = __esmMin((() => {
|
|
|
11814
11815
|
]);
|
|
11815
11816
|
searchMemoryDayIntentSchema = object$1({
|
|
11816
11817
|
date: date$1(),
|
|
11817
|
-
selector: literal("day")
|
|
11818
|
+
selector: literal$1("day")
|
|
11818
11819
|
});
|
|
11819
11820
|
searchMemoryMonthIntentSchema = object$1({
|
|
11820
11821
|
month: number$1().int().min(1).max(12),
|
|
11821
|
-
selector: literal("month"),
|
|
11822
|
+
selector: literal$1("month"),
|
|
11822
11823
|
year: number$1().int().min(1970).max(9999)
|
|
11823
11824
|
});
|
|
11824
11825
|
searchMemoryRangeIntentSchema = object$1({
|
|
11825
11826
|
end: date$1().optional(),
|
|
11826
|
-
selector: literal("range"),
|
|
11827
|
+
selector: literal$1("range"),
|
|
11827
11828
|
start: date$1().optional()
|
|
11828
11829
|
}).refine((value) => Boolean(value.start || value.end), {
|
|
11829
11830
|
message: "range selector requires start or end",
|
|
11830
11831
|
path: ["start"]
|
|
11831
11832
|
});
|
|
11832
11833
|
searchMemoryYearIntentSchema = object$1({
|
|
11833
|
-
selector: literal("year"),
|
|
11834
|
+
selector: literal$1("year"),
|
|
11834
11835
|
year: number$1().int().min(1970).max(9999)
|
|
11835
11836
|
});
|
|
11836
11837
|
searchMemoryLegacyRelativeDayAnchorSchema = _enum(["today", "yesterday"]);
|
|
@@ -11841,7 +11842,7 @@ var init_tools = __esmMin((() => {
|
|
|
11841
11842
|
object$1({
|
|
11842
11843
|
anchor: union([searchMemoryLegacyRelativeDayAnchorSchema, searchMemoryTimeIntentSchema]),
|
|
11843
11844
|
offsetDays: number$1().int(),
|
|
11844
|
-
selector: literal("relativeDay")
|
|
11845
|
+
selector: literal$1("relativeDay")
|
|
11845
11846
|
}),
|
|
11846
11847
|
searchMemoryRangeIntentSchema,
|
|
11847
11848
|
searchMemoryYearIntentSchema
|
|
@@ -12063,7 +12064,7 @@ var init_acceptanceReview = __esmMin((() => {
|
|
|
12063
12064
|
})).max(8),
|
|
12064
12065
|
title: string().max(300).optional(),
|
|
12065
12066
|
url: string().url().max(2e3),
|
|
12066
|
-
v: literal(1),
|
|
12067
|
+
v: literal$1(1),
|
|
12067
12068
|
viewport: object$1({
|
|
12068
12069
|
dpr: number$1().positive(),
|
|
12069
12070
|
height: number$1().finite(),
|
|
@@ -12177,7 +12178,251 @@ var init_acceptanceReviewRound = __esmMin((() => {
|
|
|
12177
12178
|
|
|
12178
12179
|
//#endregion
|
|
12179
12180
|
//#region ../../packages/types/src/artboard.ts
|
|
12180
|
-
var
|
|
12181
|
+
var ARTBOARD_GROUP_KINDS, ARTBOARD_BOARD_TYPES, text$1, coordinate, size$1, artboardBoardSourceSchema, artboardBoardSourceInputSchema, ref, id, boardFields, groupFields, artboardOpSchema, formatArtboardResultLine;
|
|
12182
|
+
var init_artboard = __esmMin((() => {
|
|
12183
|
+
init_zod$1();
|
|
12184
|
+
ARTBOARD_GROUP_KINDS = [
|
|
12185
|
+
"journey",
|
|
12186
|
+
"options",
|
|
12187
|
+
"references",
|
|
12188
|
+
"other"
|
|
12189
|
+
];
|
|
12190
|
+
ARTBOARD_BOARD_TYPES = [
|
|
12191
|
+
"html",
|
|
12192
|
+
"image",
|
|
12193
|
+
"video",
|
|
12194
|
+
"decision"
|
|
12195
|
+
];
|
|
12196
|
+
text$1 = string();
|
|
12197
|
+
coordinate = number$1().finite();
|
|
12198
|
+
size$1 = number$1().finite().positive();
|
|
12199
|
+
artboardBoardSourceSchema = object$1({
|
|
12200
|
+
/** Version tag of the file (its object ETag); null while the file does not exist. */
|
|
12201
|
+
hash: string().min(1).nullable(),
|
|
12202
|
+
kind: literal$1("file"),
|
|
12203
|
+
path: string().min(1)
|
|
12204
|
+
});
|
|
12205
|
+
artboardBoardSourceInputSchema = object$1({
|
|
12206
|
+
kind: literal$1("file"),
|
|
12207
|
+
path: string().min(1)
|
|
12208
|
+
});
|
|
12209
|
+
ref = string().min(1).optional();
|
|
12210
|
+
id = string().min(1);
|
|
12211
|
+
boardFields = {
|
|
12212
|
+
expected: text$1.optional(),
|
|
12213
|
+
groupId: id.optional(),
|
|
12214
|
+
h: size$1.optional(),
|
|
12215
|
+
pageId: id.optional(),
|
|
12216
|
+
recommended: boolean().optional(),
|
|
12217
|
+
roundId: id.optional(),
|
|
12218
|
+
source: artboardBoardSourceInputSchema.optional(),
|
|
12219
|
+
title: text$1,
|
|
12220
|
+
type: _enum(ARTBOARD_BOARD_TYPES).optional(),
|
|
12221
|
+
w: size$1.optional(),
|
|
12222
|
+
x: coordinate,
|
|
12223
|
+
y: coordinate
|
|
12224
|
+
};
|
|
12225
|
+
groupFields = {
|
|
12226
|
+
desc: text$1.optional(),
|
|
12227
|
+
kind: _enum(ARTBOARD_GROUP_KINDS),
|
|
12228
|
+
pageId: id.optional(),
|
|
12229
|
+
title: text$1
|
|
12230
|
+
};
|
|
12231
|
+
artboardOpSchema = discriminatedUnion("type", [
|
|
12232
|
+
object$1({
|
|
12233
|
+
page: object$1({ name: text$1.min(1) }),
|
|
12234
|
+
ref,
|
|
12235
|
+
type: literal$1("addPage")
|
|
12236
|
+
}),
|
|
12237
|
+
object$1({
|
|
12238
|
+
id,
|
|
12239
|
+
patch: object$1({ name: text$1.min(1) }),
|
|
12240
|
+
type: literal$1("updatePage")
|
|
12241
|
+
}),
|
|
12242
|
+
object$1({
|
|
12243
|
+
id,
|
|
12244
|
+
type: literal$1("removePage")
|
|
12245
|
+
}),
|
|
12246
|
+
object$1({
|
|
12247
|
+
ref,
|
|
12248
|
+
round: object$1({
|
|
12249
|
+
batchId: id.optional(),
|
|
12250
|
+
pageId: id.optional(),
|
|
12251
|
+
title: text$1.min(1)
|
|
12252
|
+
}),
|
|
12253
|
+
type: literal$1("addRound")
|
|
12254
|
+
}),
|
|
12255
|
+
object$1({
|
|
12256
|
+
id,
|
|
12257
|
+
patch: object$1({ title: text$1.min(1) }),
|
|
12258
|
+
type: literal$1("updateRound")
|
|
12259
|
+
}),
|
|
12260
|
+
object$1({
|
|
12261
|
+
group: object$1(groupFields),
|
|
12262
|
+
ref,
|
|
12263
|
+
type: literal$1("addGroup")
|
|
12264
|
+
}),
|
|
12265
|
+
object$1({
|
|
12266
|
+
id,
|
|
12267
|
+
patch: object$1({
|
|
12268
|
+
desc: text$1,
|
|
12269
|
+
kind: _enum(ARTBOARD_GROUP_KINDS),
|
|
12270
|
+
title: text$1
|
|
12271
|
+
}).partial(),
|
|
12272
|
+
type: literal$1("updateGroup")
|
|
12273
|
+
}),
|
|
12274
|
+
object$1({
|
|
12275
|
+
id,
|
|
12276
|
+
type: literal$1("removeGroup")
|
|
12277
|
+
}),
|
|
12278
|
+
object$1({
|
|
12279
|
+
board: object$1(boardFields),
|
|
12280
|
+
ref,
|
|
12281
|
+
type: literal$1("addBoard")
|
|
12282
|
+
}),
|
|
12283
|
+
object$1({
|
|
12284
|
+
id,
|
|
12285
|
+
patch: object$1({
|
|
12286
|
+
...boardFields,
|
|
12287
|
+
groupId: id.nullable(),
|
|
12288
|
+
roundId: id.nullable()
|
|
12289
|
+
}).omit({
|
|
12290
|
+
pageId: true,
|
|
12291
|
+
type: true
|
|
12292
|
+
}).partial(),
|
|
12293
|
+
type: literal$1("updateBoard")
|
|
12294
|
+
}),
|
|
12295
|
+
object$1({
|
|
12296
|
+
id,
|
|
12297
|
+
type: literal$1("removeBoard")
|
|
12298
|
+
}),
|
|
12299
|
+
object$1({
|
|
12300
|
+
edge: object$1({
|
|
12301
|
+
condition: text$1.optional(),
|
|
12302
|
+
from: id,
|
|
12303
|
+
isDefault: boolean().optional(),
|
|
12304
|
+
label: text$1.optional(),
|
|
12305
|
+
to: id
|
|
12306
|
+
}),
|
|
12307
|
+
ref,
|
|
12308
|
+
type: literal$1("addEdge")
|
|
12309
|
+
}),
|
|
12310
|
+
object$1({
|
|
12311
|
+
id,
|
|
12312
|
+
type: literal$1("removeEdge")
|
|
12313
|
+
}),
|
|
12314
|
+
object$1({
|
|
12315
|
+
boardId: id,
|
|
12316
|
+
expected: text$1,
|
|
12317
|
+
type: literal$1("setCheck")
|
|
12318
|
+
})
|
|
12319
|
+
]);
|
|
12320
|
+
formatArtboardResultLine = ({ boardCount, groupCount, id: artboardId, revision }) => `artboard ${artboardId} · revision ${revision} · ${groupCount} groups · ${boardCount} boards`;
|
|
12321
|
+
}));
|
|
12322
|
+
|
|
12323
|
+
//#endregion
|
|
12324
|
+
//#region ../../packages/types/src/artboardFiles.ts
|
|
12325
|
+
var ARTBOARD_FILE_LIMITS, CONTENT_TYPES, TEXT_EXTENSIONS, SEGMENT, extensionOf, artboardFileContentType, isArtboardTextPath, normalizeArtboardFilePath, filePathSchema, artboardFileWriteSchema, artboardFileUploadsSchema, artboardFileEditSchema, artboardFileChangesSchema;
|
|
12326
|
+
var init_artboardFiles = __esmMin((() => {
|
|
12327
|
+
init_zod$1();
|
|
12328
|
+
ARTBOARD_FILE_LIMITS = {
|
|
12329
|
+
maxFiles: 500,
|
|
12330
|
+
maxImageBytes: 10 * 1024 * 1024,
|
|
12331
|
+
maxPathLength: 200,
|
|
12332
|
+
maxTextFileBytes: 512 * 1024,
|
|
12333
|
+
maxTotalBytes: 50 * 1024 * 1024
|
|
12334
|
+
};
|
|
12335
|
+
CONTENT_TYPES = {
|
|
12336
|
+
css: "text/css; charset=utf-8",
|
|
12337
|
+
gif: "image/gif",
|
|
12338
|
+
htm: "text/html; charset=utf-8",
|
|
12339
|
+
html: "text/html; charset=utf-8",
|
|
12340
|
+
jpeg: "image/jpeg",
|
|
12341
|
+
jpg: "image/jpeg",
|
|
12342
|
+
js: "text/javascript; charset=utf-8",
|
|
12343
|
+
json: "application/json; charset=utf-8",
|
|
12344
|
+
mjs: "text/javascript; charset=utf-8",
|
|
12345
|
+
png: "image/png",
|
|
12346
|
+
svg: "image/svg+xml",
|
|
12347
|
+
txt: "text/plain; charset=utf-8",
|
|
12348
|
+
webp: "image/webp",
|
|
12349
|
+
woff: "font/woff",
|
|
12350
|
+
woff2: "font/woff2"
|
|
12351
|
+
};
|
|
12352
|
+
TEXT_EXTENSIONS = new Set([
|
|
12353
|
+
"css",
|
|
12354
|
+
"htm",
|
|
12355
|
+
"html",
|
|
12356
|
+
"js",
|
|
12357
|
+
"json",
|
|
12358
|
+
"mjs",
|
|
12359
|
+
"svg",
|
|
12360
|
+
"txt"
|
|
12361
|
+
]);
|
|
12362
|
+
SEGMENT = /^[\w.@-]+$/;
|
|
12363
|
+
extensionOf = (path) => {
|
|
12364
|
+
const name = path.slice(path.lastIndexOf("/") + 1);
|
|
12365
|
+
const dot = name.lastIndexOf(".");
|
|
12366
|
+
return dot > 0 ? name.slice(dot + 1).toLowerCase() : "";
|
|
12367
|
+
};
|
|
12368
|
+
artboardFileContentType = (path) => CONTENT_TYPES[extensionOf(path)];
|
|
12369
|
+
isArtboardTextPath = (path) => TEXT_EXTENSIONS.has(extensionOf(path));
|
|
12370
|
+
normalizeArtboardFilePath = (path) => {
|
|
12371
|
+
const trimmed = path.trim().replace(/^\.\//, "");
|
|
12372
|
+
if (!trimmed || trimmed.length > ARTBOARD_FILE_LIMITS.maxPathLength) return;
|
|
12373
|
+
if (trimmed.split("/").some((segment) => !SEGMENT.test(segment) || segment === "." || segment === "..")) return;
|
|
12374
|
+
if (!artboardFileContentType(trimmed)) return;
|
|
12375
|
+
return trimmed;
|
|
12376
|
+
};
|
|
12377
|
+
filePathSchema = string().min(1).max(ARTBOARD_FILE_LIMITS.maxPathLength + 2);
|
|
12378
|
+
artboardFileWriteSchema = union([
|
|
12379
|
+
object$1({
|
|
12380
|
+
content: string(),
|
|
12381
|
+
path: filePathSchema
|
|
12382
|
+
}).strict(),
|
|
12383
|
+
object$1({
|
|
12384
|
+
fileRef: string().min(1),
|
|
12385
|
+
path: filePathSchema
|
|
12386
|
+
}).strict(),
|
|
12387
|
+
object$1({
|
|
12388
|
+
base64: string().min(1),
|
|
12389
|
+
path: filePathSchema
|
|
12390
|
+
}).strict(),
|
|
12391
|
+
object$1({
|
|
12392
|
+
path: filePathSchema,
|
|
12393
|
+
uploaded: literal$1(true)
|
|
12394
|
+
}).strict(),
|
|
12395
|
+
object$1({
|
|
12396
|
+
fromCanvas: object$1({
|
|
12397
|
+
canvasId: string().min(1),
|
|
12398
|
+
version: number$1().int().positive().optional()
|
|
12399
|
+
}).strict(),
|
|
12400
|
+
path: filePathSchema
|
|
12401
|
+
}).strict()
|
|
12402
|
+
]);
|
|
12403
|
+
artboardFileUploadsSchema = array(object$1({
|
|
12404
|
+
path: filePathSchema,
|
|
12405
|
+
size: number$1().int().nonnegative()
|
|
12406
|
+
}).strict()).min(1).max(ARTBOARD_FILE_LIMITS.maxFiles);
|
|
12407
|
+
artboardFileEditSchema = object$1({
|
|
12408
|
+
newText: string(),
|
|
12409
|
+
oldText: string().min(1),
|
|
12410
|
+
path: filePathSchema
|
|
12411
|
+
}).strict();
|
|
12412
|
+
artboardFileChangesSchema = object$1({
|
|
12413
|
+
deletes: array(filePathSchema).max(ARTBOARD_FILE_LIMITS.maxFiles).optional(),
|
|
12414
|
+
edits: array(artboardFileEditSchema).max(200).optional(),
|
|
12415
|
+
writes: array(artboardFileWriteSchema).max(ARTBOARD_FILE_LIMITS.maxFiles).optional()
|
|
12416
|
+
}).strict();
|
|
12417
|
+
}));
|
|
12418
|
+
|
|
12419
|
+
//#endregion
|
|
12420
|
+
//#region ../../packages/types/src/artboardPublish.ts
|
|
12421
|
+
var init_artboardPublish = __esmMin((() => {}));
|
|
12422
|
+
|
|
12423
|
+
//#endregion
|
|
12424
|
+
//#region ../../packages/types/src/artboardReadiness.ts
|
|
12425
|
+
var init_artboardReadiness = __esmMin((() => {}));
|
|
12181
12426
|
|
|
12182
12427
|
//#endregion
|
|
12183
12428
|
//#region ../../packages/types/src/connector.ts
|
|
@@ -12218,7 +12463,7 @@ var init_inboundWebhook = __esmMin((() => {
|
|
|
12218
12463
|
remoteSubscriptionId: string().optional(),
|
|
12219
12464
|
truncated: boolean().optional()
|
|
12220
12465
|
}).strict();
|
|
12221
|
-
McpEventsWebhookVerificationSchema = object$1({ scheme: literal("standard_webhooks") }).strict();
|
|
12466
|
+
McpEventsWebhookVerificationSchema = object$1({ scheme: literal$1("standard_webhooks") }).strict();
|
|
12222
12467
|
GenericWebhookConfigSchema = object$1({
|
|
12223
12468
|
autoApprove: boolean(),
|
|
12224
12469
|
delivery: InboundWebhookChannelDeliverySchema.optional(),
|
|
@@ -12227,14 +12472,14 @@ var init_inboundWebhook = __esmMin((() => {
|
|
|
12227
12472
|
topicId: string().min(1).optional()
|
|
12228
12473
|
}).strict();
|
|
12229
12474
|
GenericWebhookStateSchema = object$1({}).strict();
|
|
12230
|
-
GenericWebhookVerificationSchema = object$1({ scheme: literal("bearer_token") }).strict();
|
|
12475
|
+
GenericWebhookVerificationSchema = object$1({ scheme: literal$1("bearer_token") }).strict();
|
|
12231
12476
|
InboundWebhookDataSchema = discriminatedUnion("kind", [object$1({
|
|
12232
|
-
kind: literal("mcp_events"),
|
|
12477
|
+
kind: literal$1("mcp_events"),
|
|
12233
12478
|
config: McpEventsWebhookConfigSchema,
|
|
12234
12479
|
state: McpEventsWebhookStateSchema,
|
|
12235
12480
|
verification: McpEventsWebhookVerificationSchema
|
|
12236
12481
|
}), object$1({
|
|
12237
|
-
kind: literal("generic"),
|
|
12482
|
+
kind: literal$1("generic"),
|
|
12238
12483
|
config: GenericWebhookConfigSchema,
|
|
12239
12484
|
state: GenericWebhookStateSchema,
|
|
12240
12485
|
verification: GenericWebhookVerificationSchema
|
|
@@ -12391,6 +12636,9 @@ var init_src$2 = __esmMin((() => {
|
|
|
12391
12636
|
init_acceptanceReviewRound();
|
|
12392
12637
|
init_agentRuntime();
|
|
12393
12638
|
init_artboard();
|
|
12639
|
+
init_artboardFiles();
|
|
12640
|
+
init_artboardPublish();
|
|
12641
|
+
init_artboardReadiness();
|
|
12394
12642
|
init_connector();
|
|
12395
12643
|
init_connectorToolIdentifier();
|
|
12396
12644
|
init_heteroPermissionMode();
|
|
@@ -18232,6 +18480,7 @@ const TRPC_NAMESPACE_API_KEY_RULES = {
|
|
|
18232
18480
|
apiKey: "blocked",
|
|
18233
18481
|
asr: { any: "model:invoke" },
|
|
18234
18482
|
auth: "open",
|
|
18483
|
+
artboard: "blocked",
|
|
18235
18484
|
artifactShare: rw("chat:read", null),
|
|
18236
18485
|
botMessage: "blocked",
|
|
18237
18486
|
brief: rw("chat:read", "chat:write"),
|
|
@@ -46449,8 +46698,8 @@ const AGENT_GRAPH_ROOT_NODE_ID = "__root__";
|
|
|
46449
46698
|
const AgentGraphNodeSchema = discriminatedUnion("type", [object$1({
|
|
46450
46699
|
allowedToolApiNames: array(string().min(1)).optional(),
|
|
46451
46700
|
maxAgentSteps: number$1().int().positive().optional(),
|
|
46452
|
-
type: literal("agent")
|
|
46453
|
-
}), object$1({ type: literal("llm") })]);
|
|
46701
|
+
type: literal$1("agent")
|
|
46702
|
+
}), object$1({ type: literal$1("llm") })]);
|
|
46454
46703
|
const AgentGraphFieldSchema = object$1({
|
|
46455
46704
|
desc: string().min(1),
|
|
46456
46705
|
schema: record(string(), unknown())
|
|
@@ -50779,6 +51028,539 @@ function registerAgentSignalCommand(program) {
|
|
|
50779
51028
|
});
|
|
50780
51029
|
}
|
|
50781
51030
|
|
|
51031
|
+
//#endregion
|
|
51032
|
+
//#region src/commands/artboardComments.ts
|
|
51033
|
+
const runAgentId = () => {
|
|
51034
|
+
const id = process.env.LOBEHUB_AGENT_ID?.trim();
|
|
51035
|
+
if (!id) throw new Error("Comments are answered by the agent of a LobeHub conversation, and LOBEHUB_AGENT_ID is not set in this shell");
|
|
51036
|
+
return id;
|
|
51037
|
+
};
|
|
51038
|
+
const placeOf = (thread, content) => {
|
|
51039
|
+
const board = content.boards.find((item) => item.id === thread.boardId);
|
|
51040
|
+
if (board) return `board ${board.id} "${board.title}"`;
|
|
51041
|
+
const group = content.groups.find((item) => item.id === thread.groupId);
|
|
51042
|
+
if (group) return `group ${group.id} "${group.title}"`;
|
|
51043
|
+
const page = content.pages.find((item) => item.id === thread.pageId);
|
|
51044
|
+
return page ? `page ${page.id} "${page.name}"` : "the canvas";
|
|
51045
|
+
};
|
|
51046
|
+
const speaker = (comment) => comment.authorAgentId ? "you" : "user";
|
|
51047
|
+
const formatThread = (thread, content) => {
|
|
51048
|
+
const tags = [
|
|
51049
|
+
thread.unread && "new",
|
|
51050
|
+
thread.resolvedAt && "resolved",
|
|
51051
|
+
thread.stale && "screen changed since"
|
|
51052
|
+
].filter(Boolean);
|
|
51053
|
+
return [`${thread.id} on ${placeOf(thread, content)}${tags.length ? ` [${tags.join(", ")}]` : ""}`, ...[thread, ...thread.replies].map((comment) => ` ${speaker(comment)}: ${comment.content}`)].join("\n");
|
|
51054
|
+
};
|
|
51055
|
+
const textOf = (words) => {
|
|
51056
|
+
const text = words.join(" ").trim();
|
|
51057
|
+
if (!text) throw new Error("Write the text after the id");
|
|
51058
|
+
return text;
|
|
51059
|
+
};
|
|
51060
|
+
const registerArtboardCommentCommands = (artboard) => {
|
|
51061
|
+
artboard.command("comments <id>").description("Print the user's comment threads waiting for you, with their ids; the ones printed count as read").option("--json", "Print structured JSON").action(async (id, options) => {
|
|
51062
|
+
const agentId = runAgentId();
|
|
51063
|
+
const client = await getTrpcClient();
|
|
51064
|
+
const [threads, { artboard: board }] = await Promise.all([client.artboard.takeComments.mutate({
|
|
51065
|
+
agentId,
|
|
51066
|
+
id
|
|
51067
|
+
}), client.artboard.read.query({ id })]);
|
|
51068
|
+
if (options.json) return outputJson(threads);
|
|
51069
|
+
if (!threads.length) return console.log("No comment threads are waiting for you");
|
|
51070
|
+
console.log(threads.map((thread) => formatThread(thread, board.content)).join("\n\n"));
|
|
51071
|
+
});
|
|
51072
|
+
artboard.command("reply <commentId> <text...>").description("Answer a comment thread on the artboard").action(async (commentId, words) => {
|
|
51073
|
+
const agentId = runAgentId();
|
|
51074
|
+
await (await getTrpcClient()).artboard.replyAsAgent.mutate({
|
|
51075
|
+
agentId,
|
|
51076
|
+
commentId,
|
|
51077
|
+
content: textOf(words)
|
|
51078
|
+
});
|
|
51079
|
+
console.log(`replied in ${commentId}`);
|
|
51080
|
+
});
|
|
51081
|
+
artboard.command("resolve <commentId>").description("Close a thread once what it asks for is done, or once your question in it is answered").action(async (commentId) => {
|
|
51082
|
+
await (await getTrpcClient()).artboard.resolveComment.mutate({ commentId });
|
|
51083
|
+
console.log(`resolved ${commentId}`);
|
|
51084
|
+
});
|
|
51085
|
+
artboard.command("ask <id> <text...>").description("Ask the user a question on the artboard as a new thread; the artboard cannot be finalized while it is open").option("--board <boardId>", "Board the question is about").option("--group <groupId>", "Group the question is about").option("--page <pageId>", "Page the question is about").action(async (id, words, options) => {
|
|
51086
|
+
const agentId = runAgentId();
|
|
51087
|
+
const question = await (await getTrpcClient()).artboard.askQuestion.mutate({
|
|
51088
|
+
agentId,
|
|
51089
|
+
boardId: options.board,
|
|
51090
|
+
content: textOf(words),
|
|
51091
|
+
groupId: options.group,
|
|
51092
|
+
id,
|
|
51093
|
+
pageId: options.page
|
|
51094
|
+
});
|
|
51095
|
+
console.log(`asked ${question.id}`);
|
|
51096
|
+
});
|
|
51097
|
+
};
|
|
51098
|
+
|
|
51099
|
+
//#endregion
|
|
51100
|
+
//#region src/commands/artboardOps.ts
|
|
51101
|
+
init_src$2();
|
|
51102
|
+
init_zod$1();
|
|
51103
|
+
const literal = (value) => JSON.stringify(value);
|
|
51104
|
+
const renderNode = (node) => {
|
|
51105
|
+
if (node.const !== void 0) return literal(node.const);
|
|
51106
|
+
if (node.enum) return node.enum.map(literal).join(" | ");
|
|
51107
|
+
const variants = node.oneOf ?? node.anyOf;
|
|
51108
|
+
if (variants) return variants.map(renderNode).join(" | ");
|
|
51109
|
+
if (node.type === "object" && node.properties) return renderObject(node);
|
|
51110
|
+
if (node.type === "integer") return "number";
|
|
51111
|
+
return node.type ?? "unknown";
|
|
51112
|
+
};
|
|
51113
|
+
const renderObject = (node) => {
|
|
51114
|
+
const required = new Set(node.required);
|
|
51115
|
+
const rank = ([key, value]) => value.const !== void 0 ? 0 : required.has(key) ? 1 : 2;
|
|
51116
|
+
return `{ ${Object.entries(node.properties).map((entry, index) => ({
|
|
51117
|
+
entry,
|
|
51118
|
+
index,
|
|
51119
|
+
rank: rank(entry)
|
|
51120
|
+
})).sort((a, b) => a.rank - b.rank || a.index - b.index).map(({ entry: [key, value] }) => `"${key}"${required.has(key) ? "" : "?"}: ${renderNode(value)}`).join(", ")} }`;
|
|
51121
|
+
};
|
|
51122
|
+
const NOTES = [
|
|
51123
|
+
"--ops takes a JSON array of these, inline or as @file.json. Every op in one call applies, or none does.",
|
|
51124
|
+
"A field marked ? is optional.",
|
|
51125
|
+
"\"ref\" is a name you choose on an add op; later ops in the same call can use it wherever an id is expected.",
|
|
51126
|
+
"x and y are page coordinates; w and h default to 640×400. A board without pageId lands on the page of its group or round, otherwise on the first page.",
|
|
51127
|
+
"A file source names a file of the artboard: put it there with `lh artboard push <id> <dir>` or --files, then point the board at its relative path.",
|
|
51128
|
+
"A board of type \"decision\" has no source and no \"expected\". An .html file makes an \"html\" board and an image file an \"image\" board; \"video\" is refused.",
|
|
51129
|
+
"\"recommended\" marks a board as the option you would pick in its round; it needs \"roundId\", and a board with a \"roundId\" must sit in an options group."
|
|
51130
|
+
];
|
|
51131
|
+
const opsAction = (options) => {
|
|
51132
|
+
const schema = toJSONSchema(artboardOpSchema);
|
|
51133
|
+
if (options.json) return outputJson(schema);
|
|
51134
|
+
console.log("Ops accepted by `lh artboard create --ops` and `lh artboard update --ops`:\n");
|
|
51135
|
+
for (const op of schema.oneOf ?? schema.anyOf ?? []) console.log(` ${renderNode(op)}\n`);
|
|
51136
|
+
for (const note of NOTES) console.log(`- ${note}`);
|
|
51137
|
+
};
|
|
51138
|
+
const registerArtboardOpsCommand = (artboard) => {
|
|
51139
|
+
artboard.command("ops").description("Print the shape of every op that create and update accept").option("--json", "Print the ops as JSON Schema").action(opsAction);
|
|
51140
|
+
};
|
|
51141
|
+
|
|
51142
|
+
//#endregion
|
|
51143
|
+
//#region src/commands/artboardPush.ts
|
|
51144
|
+
init_src$2();
|
|
51145
|
+
/**
|
|
51146
|
+
* Encoded JSON size of one writeFiles request. Vercel rejects bodies over 4.5 MB
|
|
51147
|
+
* and tRPC can batch other calls into the same request, so stay at 2 MB like
|
|
51148
|
+
* the web client's message write batcher.
|
|
51149
|
+
*/
|
|
51150
|
+
const BATCH_BYTES = 2 * 1024 * 1024;
|
|
51151
|
+
const encodedBytes = (value) => Buffer.byteLength(JSON.stringify(value));
|
|
51152
|
+
const toLocalArtboardFile = (relative, bytes) => ({
|
|
51153
|
+
bytes,
|
|
51154
|
+
hash: createHash("md5").update(bytes).digest("hex"),
|
|
51155
|
+
path: relative
|
|
51156
|
+
});
|
|
51157
|
+
const putBlob = async (file, upload) => {
|
|
51158
|
+
const response = await fetch(upload.url, {
|
|
51159
|
+
body: file.bytes,
|
|
51160
|
+
headers: upload.headers,
|
|
51161
|
+
method: "PUT"
|
|
51162
|
+
}).catch((error) => {
|
|
51163
|
+
throw new Error(`Upload of ${file.path} failed: ${error?.message ?? String(error)}`);
|
|
51164
|
+
});
|
|
51165
|
+
if (!response.ok) throw new Error(`Upload of ${file.path} failed: ${response.status} ${response.statusText}`);
|
|
51166
|
+
};
|
|
51167
|
+
/**
|
|
51168
|
+
* Writes files to an artboard in requests of at most 2 MB encoded. A file too
|
|
51169
|
+
* large for one request is PUT to its path through a presigned URL first and
|
|
51170
|
+
* then committed as uploaded.
|
|
51171
|
+
*/
|
|
51172
|
+
const writeArtboardFiles = async (api, id, files) => {
|
|
51173
|
+
const envelope = encodedBytes({
|
|
51174
|
+
files: { writes: [] },
|
|
51175
|
+
id
|
|
51176
|
+
});
|
|
51177
|
+
const writes = [];
|
|
51178
|
+
const large = [];
|
|
51179
|
+
for (const file of files) {
|
|
51180
|
+
const write = isArtboardTextPath(file.path) ? {
|
|
51181
|
+
content: file.bytes.toString("utf8"),
|
|
51182
|
+
path: file.path
|
|
51183
|
+
} : {
|
|
51184
|
+
base64: file.bytes.toString("base64"),
|
|
51185
|
+
path: file.path
|
|
51186
|
+
};
|
|
51187
|
+
if (envelope + encodedBytes(write) > BATCH_BYTES) large.push(file);
|
|
51188
|
+
else writes.push(write);
|
|
51189
|
+
}
|
|
51190
|
+
if (large.length) {
|
|
51191
|
+
const { uploads } = await api.prepareFileUploads.mutate({
|
|
51192
|
+
files: large.map((file) => ({
|
|
51193
|
+
path: file.path,
|
|
51194
|
+
size: file.bytes.byteLength
|
|
51195
|
+
})),
|
|
51196
|
+
id
|
|
51197
|
+
});
|
|
51198
|
+
const byPath = new Map(uploads.map((upload) => [upload.path, upload]));
|
|
51199
|
+
for (const file of large) {
|
|
51200
|
+
const upload = byPath.get(file.path);
|
|
51201
|
+
if (!upload) throw new Error(`Upload of ${file.path} failed: the server returned no upload URL`);
|
|
51202
|
+
await putBlob(file, upload);
|
|
51203
|
+
writes.push({
|
|
51204
|
+
path: file.path,
|
|
51205
|
+
uploaded: true
|
|
51206
|
+
});
|
|
51207
|
+
}
|
|
51208
|
+
}
|
|
51209
|
+
let batch = [];
|
|
51210
|
+
let batchBytes = envelope;
|
|
51211
|
+
for (const write of writes) {
|
|
51212
|
+
const bytes = encodedBytes(write) + 1;
|
|
51213
|
+
if (batch.length && batchBytes + bytes > BATCH_BYTES) {
|
|
51214
|
+
await api.writeFiles.mutate({
|
|
51215
|
+
files: { writes: batch },
|
|
51216
|
+
id
|
|
51217
|
+
});
|
|
51218
|
+
batch = [];
|
|
51219
|
+
batchBytes = envelope;
|
|
51220
|
+
}
|
|
51221
|
+
batch.push(write);
|
|
51222
|
+
batchBytes += bytes;
|
|
51223
|
+
}
|
|
51224
|
+
if (batch.length) await api.writeFiles.mutate({
|
|
51225
|
+
files: { writes: batch },
|
|
51226
|
+
id
|
|
51227
|
+
});
|
|
51228
|
+
};
|
|
51229
|
+
const listLocal = (root, dir = root) => fs.readdirSync(dir, { withFileTypes: true }).flatMap((entry) => {
|
|
51230
|
+
if (entry.name.startsWith(".")) return [];
|
|
51231
|
+
const full = path.join(dir, entry.name);
|
|
51232
|
+
if (entry.isDirectory()) return listLocal(root, full);
|
|
51233
|
+
return entry.isFile() ? [path.relative(root, full).split(path.sep).join("/")] : [];
|
|
51234
|
+
});
|
|
51235
|
+
const pushArtboardDir = async (api, id, dir, options) => {
|
|
51236
|
+
const remote = new Map((await api.listFiles.query({ id })).map((file) => [file.path, file.hash]));
|
|
51237
|
+
const result = {
|
|
51238
|
+
deleted: [],
|
|
51239
|
+
skipped: [],
|
|
51240
|
+
unchanged: [],
|
|
51241
|
+
uploaded: []
|
|
51242
|
+
};
|
|
51243
|
+
const local = /* @__PURE__ */ new Set();
|
|
51244
|
+
const changed = [];
|
|
51245
|
+
for (const relative of listLocal(dir).sort()) {
|
|
51246
|
+
const normalized = normalizeArtboardFilePath(relative);
|
|
51247
|
+
if (!normalized) {
|
|
51248
|
+
result.skipped.push(relative);
|
|
51249
|
+
continue;
|
|
51250
|
+
}
|
|
51251
|
+
local.add(normalized);
|
|
51252
|
+
const file = toLocalArtboardFile(normalized, fs.readFileSync(path.join(dir, relative)));
|
|
51253
|
+
if (remote.get(normalized) === file.hash) {
|
|
51254
|
+
result.unchanged.push(normalized);
|
|
51255
|
+
continue;
|
|
51256
|
+
}
|
|
51257
|
+
changed.push(file);
|
|
51258
|
+
result.uploaded.push(normalized);
|
|
51259
|
+
}
|
|
51260
|
+
await writeArtboardFiles(api, id, changed);
|
|
51261
|
+
if (options.prune) {
|
|
51262
|
+
const missing = [...remote.keys()].filter((file) => !local.has(file));
|
|
51263
|
+
if (missing.length) {
|
|
51264
|
+
await api.writeFiles.mutate({
|
|
51265
|
+
files: { deletes: missing },
|
|
51266
|
+
id
|
|
51267
|
+
});
|
|
51268
|
+
result.deleted = missing;
|
|
51269
|
+
}
|
|
51270
|
+
}
|
|
51271
|
+
return result;
|
|
51272
|
+
};
|
|
51273
|
+
|
|
51274
|
+
//#endregion
|
|
51275
|
+
//#region src/commands/artboardSkillContent.ts
|
|
51276
|
+
const artboardSkillDescription = "Lay out a feature or requirement on a LobeHub artboard so the user decides on the canvas. Use when the user wants to discuss, explore, shape or confirm a feature or requirement and this session runs inside a LobeHub project conversation (`LOBEHUB_TOPIC_ID` is set). In that case this skill takes the place of a generic brainstorming or requirements skill: the open decisions go on the artboard as choices, not into a run of questions in chat. Not for bug fixes, small or already specified changes, or questions about existing code.";
|
|
51277
|
+
const artboardSkillBody = `# Requirement artboard
|
|
51278
|
+
|
|
51279
|
+
An artboard is a canvas in the user's LobeHub project. You lay a requirement out on it: the screens, the flow between them, and the decisions you are unsure of as choices. The user picks on the canvas and submits; you carry on from their picks. You work on it through the \`lh\` CLI, which is already installed and signed in for this run.
|
|
51280
|
+
|
|
51281
|
+
## 1. Check first
|
|
51282
|
+
|
|
51283
|
+
- \`LOBEHUB_TOPIC_ID\` is set: this session runs inside a LobeHub conversation.
|
|
51284
|
+
- \`lh artboard --help\` prints the artboard commands.
|
|
51285
|
+
|
|
51286
|
+
If either fails, or \`lh artboard create\` is refused, say so in one line and hold the discussion in chat the way you normally would. Do not install or upgrade \`lh\`.
|
|
51287
|
+
|
|
51288
|
+
## 2. Read before you draw
|
|
51289
|
+
|
|
51290
|
+
Read the repository for the data and the screens the requirement touches, so the artboard starts from what exists. Change no code while the requirement is being discussed.
|
|
51291
|
+
|
|
51292
|
+
## 3. Lay it out
|
|
51293
|
+
|
|
51294
|
+
Run \`lh man artboard\` for the exact flags and \`lh artboard ops\` for the shape of every op; both come from the installed CLI and are not repeated here. One requirement gets one artboard: \`lh artboard create\` makes it for this conversation's project, \`lh artboard list\` shows the ones that already exist.
|
|
51295
|
+
|
|
51296
|
+
**Screens.** A board shows a screen. Write each screen as a plain HTML page, a real screen of the product at the board's size with its own layout, colors, type and inline SVG, in a folder laid out like the artboard (for example \`pages/checkout/a.html\`, shared CSS in \`shared/base.css\`, screenshots in \`shots/\`, all referenced by relative paths). A board points at its page with source \`{"kind":"file","path":"pages/checkout/a.html"}\`; the file may not be written yet, and the board shows the page as soon as it is. Build the artboard in this order, so the user watches it fill in:
|
|
51297
|
+
|
|
51298
|
+
1. Lay out the whole structure first: one \`lh artboard create --ops\` (or \`lh artboard update --ops\` on an artboard that exists) with the pages, groups, edges and every board, each board's source pointing at the path its page will have although that file is not written yet.
|
|
51299
|
+
2. Then write the pages one board at a time with \`lh artboard files write <id> <path> --from <file>\` (or from stdin), each as soon as it is ready, so the boards appear one by one. Write the shared CSS and images a page uses before the page.
|
|
51300
|
+
3. \`lh artboard push <id> <dir>\` re-syncs a whole folder later: it uploads only the files that changed, and with \`--prune\` deletes the artboard files that are no longer in the folder.
|
|
51301
|
+
|
|
51302
|
+
- a page cannot fetch or open network connections; https images, fonts, styles and scripts load;
|
|
51303
|
+
- to change a screen, write its file again: every board showing it updates and comments on it are marked outdated;
|
|
51304
|
+
- \`lh artboard files list <id>\`, \`lh artboard files read <id> <path>\` and \`lh artboard files rm <id> <path>\` list, print and remove files; a board whose file is removed stays and shows the page again once it is written;
|
|
51305
|
+
- a screenshot of the current product can be an image board: write it under \`shots/\` and point a board at it.
|
|
51306
|
+
|
|
51307
|
+
A board of type "decision" needs no source.
|
|
51308
|
+
|
|
51309
|
+
If no screen can be made (writing the files is refused or times out), tell the user in one line which step failed and hold the discussion in chat. Never stand a decision board or a text card in for a screen: a decision board marks where the journey branches and shows only a short title.
|
|
51310
|
+
|
|
51311
|
+
**Layout.**
|
|
51312
|
+
|
|
51313
|
+
- An artboard has pages; each page has its own coordinates. Use a second page when the choices would crowd the flow.
|
|
51314
|
+
- Group the boards: one journey group for the flow the user will accept, and separate groups for options and references.
|
|
51315
|
+
- In the journey group one board is one page state. Edges connect boards. The journey has exactly one starting screen, the only journey board no edge points to, and every other journey board is reached from it. No edge may point back to it: a way back to the start belongs in that screen's acceptance check. A journey that breaks this cannot be finalized. Label an edge, in at most four words, only when the two screens do not already show what the user does to get there.
|
|
51316
|
+
- Where the flow branches, add a decision board, give each edge leaving it a condition, and mark the fallback branch as the default.
|
|
51317
|
+
- Give every journey board an acceptance check: what the user must see on that page. A decision board takes none; one that carries a check is refused.
|
|
51318
|
+
- You place every board; the user cannot move them. Boards are 640×400 unless you set a size. Leave 80 between boards in a row and lay a journey out left to right.
|
|
51319
|
+
- A frame is drawn around each group (144 above its boards, 48 on the other sides). Leave 240 between the boards of two groups stacked vertically and 200 between groups side by side, measured from the lowest and rightmost board of a group. An update whose group frames overlap is refused.
|
|
51320
|
+
|
|
51321
|
+
**Choices.** Every decision you are not sure of becomes a round:
|
|
51322
|
+
|
|
51323
|
+
- add a round whose title is the question, then add each alternative as a board that carries that round's id and sits in an options group, and mark the one you would pick as recommended;
|
|
51324
|
+
- one options group holds the options of exactly one round;
|
|
51325
|
+
- the user submits every open round at once, so open only the rounds you want answered now.
|
|
51326
|
+
|
|
51327
|
+
**Comments and questions.** The user comments on boards, groups and pages. Answer them on the artboard, not only in chat:
|
|
51328
|
+
|
|
51329
|
+
- \`lh artboard comments <id>\` prints the threads waiting for you, each with its id and what it is on; the ones printed count as read;
|
|
51330
|
+
- \`lh artboard reply <commentId> <text>\` answers a thread, and \`lh artboard resolve <commentId>\` closes it once what it asks for is done;
|
|
51331
|
+
- to ask about one screen, group or page, use \`lh artboard ask <id> --board <boardId> <question>\` (or \`--group\`, \`--page\`) instead of asking in chat. The user answers in that thread, and the artboard cannot be finalized while your question is open: resolve it once you have the answer.
|
|
51332
|
+
|
|
51333
|
+
## 4. Hand over
|
|
51334
|
+
|
|
51335
|
+
Reply with what is on the artboard and what is waiting for the user's choice. Do not ask the same questions again in chat. A question about something on the artboard goes there with \`lh artboard ask\`; ask in your reply only what concerns no screen.
|
|
51336
|
+
|
|
51337
|
+
## 5. After the user submits
|
|
51338
|
+
|
|
51339
|
+
The picks and the user's new comments arrive as one message in this conversation. Then:
|
|
51340
|
+
|
|
51341
|
+
1. \`lh artboard read <id>\` to see each round's chosen board; a round the user left unpicked takes your recommendation.
|
|
51342
|
+
2. \`lh artboard comments <id>\` for the threads and their ids; the user's answers to your questions are there too.
|
|
51343
|
+
3. Apply the picks and what the comments ask for in one \`lh artboard update\`.
|
|
51344
|
+
4. Reply in each thread with what you changed, then resolve the threads that are done and the questions that are answered.
|
|
51345
|
+
5. Open the next rounds if something is still undecided; otherwise say the requirement is settled and what was decided.
|
|
51346
|
+
|
|
51347
|
+
## 6. After the user finalizes
|
|
51348
|
+
|
|
51349
|
+
Finalizing turns the journey into an acceptance. The message that arrives carries its link, and \`lh artboard read <id> --json\` gives its \`acceptanceId\`. Its flow is already published: one check per journey board, whose expected result is that board's acceptance check. Then:
|
|
51350
|
+
|
|
51351
|
+
1. Build the journey in this repository.
|
|
51352
|
+
2. Verify it with the acceptance skill (\`lh acceptance install\` adds it to \`.agents/skills\` when it is missing), on that acceptance and its published flow: \`lh acceptance flow plan <acceptanceId>\` opens a round, \`lh acceptance flow record\` records each check's verdict, \`lh acceptance run evidence upload\` attaches a screenshot of the page to it, and \`lh acceptance flow complete\` closes the round. Do not publish another flow or create another acceptance: the artboard shows only this one.
|
|
51353
|
+
3. Reply with the acceptance link and which checks passed or failed. Each journey board on the artboard then shows its check's result and screenshot.
|
|
51354
|
+
|
|
51355
|
+
## Editing rules
|
|
51356
|
+
|
|
51357
|
+
- \`lh artboard update\` needs the revision you last read. If it is refused as stale, read again and redo the change on the new revision.
|
|
51358
|
+
- Every op in one update applies, or none does.
|
|
51359
|
+
- Use only ids the CLI returned; never invent one. Inside one call, give an added item a ref so later ops can point at it.
|
|
51360
|
+
- After the artboard is finalized, the journey group's boards, edges and checks are locked; other groups can still change.
|
|
51361
|
+
`;
|
|
51362
|
+
|
|
51363
|
+
//#endregion
|
|
51364
|
+
//#region src/commands/artboardSkill.ts
|
|
51365
|
+
const ARTBOARD_SKILL_ID = "lobehub-artboard";
|
|
51366
|
+
const VERSION_LINE = /^\s+version:\s*["']?(\d+)\.(\d+)\.(\d+)/m;
|
|
51367
|
+
const renderSkill = (version) => [
|
|
51368
|
+
"---",
|
|
51369
|
+
`name: ${ARTBOARD_SKILL_ID}`,
|
|
51370
|
+
`description: ${JSON.stringify(artboardSkillDescription)}`,
|
|
51371
|
+
"metadata:",
|
|
51372
|
+
` version: ${JSON.stringify(version)}`,
|
|
51373
|
+
"---",
|
|
51374
|
+
"",
|
|
51375
|
+
artboardSkillBody
|
|
51376
|
+
].join("\n");
|
|
51377
|
+
const versionParts = (text) => {
|
|
51378
|
+
const match = /^(\d+)\.(\d+)\.(\d+)/.exec(text);
|
|
51379
|
+
return match ? match.slice(1).map(Number) : void 0;
|
|
51380
|
+
};
|
|
51381
|
+
const installedVersion = (skillFile) => {
|
|
51382
|
+
if (!existsSync(skillFile)) return void 0;
|
|
51383
|
+
const match = VERSION_LINE.exec(readFileSync(skillFile, "utf8"));
|
|
51384
|
+
return match ? match.slice(1, 4).join(".") : void 0;
|
|
51385
|
+
};
|
|
51386
|
+
const isNewer = (installed, current) => {
|
|
51387
|
+
const a = installed && versionParts(installed);
|
|
51388
|
+
const b = versionParts(current);
|
|
51389
|
+
if (!a || !b) return false;
|
|
51390
|
+
for (let index = 0; index < 3; index += 1) if (a[index] !== b[index]) return a[index] > b[index];
|
|
51391
|
+
return false;
|
|
51392
|
+
};
|
|
51393
|
+
const listFiles = (directory) => {
|
|
51394
|
+
if (!existsSync(directory)) return [];
|
|
51395
|
+
return readdirSync(directory, { withFileTypes: true }).flatMap((entry) => {
|
|
51396
|
+
const entryPath = path.join(directory, entry.name);
|
|
51397
|
+
return entry.isDirectory() ? listFiles(entryPath) : [entryPath];
|
|
51398
|
+
});
|
|
51399
|
+
};
|
|
51400
|
+
const printLinks = (links) => {
|
|
51401
|
+
const arrow = import_picocolors.default.dim(" ↳");
|
|
51402
|
+
for (const link of links) if (link.kind === "linked" || link.kind === "linked-single") console.log(`${arrow} linked ${link.link} → ${import_picocolors.default.dim(link.target)}`);
|
|
51403
|
+
else if (link.kind === "already") console.log(`${arrow} ${import_picocolors.default.dim(`${link.link} already linked`)}`);
|
|
51404
|
+
else if (link.kind === "skipped") console.log(`${arrow} ${import_picocolors.default.yellow(`skipped ${link.link}: ${link.reason}`)}`);
|
|
51405
|
+
else console.log(`${arrow} ${import_picocolors.default.dim("no harness dirs detected — agents that read .agents/skills pick it up automatically")}`);
|
|
51406
|
+
};
|
|
51407
|
+
const initAction = (options) => {
|
|
51408
|
+
const baseDir = options.dir ? path.resolve(options.dir) : process.cwd();
|
|
51409
|
+
const skillDir = path.join(baseDir, AGENTS_SKILLS_DIR, ARTBOARD_SKILL_ID);
|
|
51410
|
+
const skillFile = path.join(skillDir, "SKILL.md");
|
|
51411
|
+
if (lstatSync(skillDir, { throwIfNoEntry: false })?.isSymbolicLink()) throw new Error(`${skillDir} is a symbolic link; remove it or point --dir at the repository that owns the skill`);
|
|
51412
|
+
const installed = installedVersion(skillFile);
|
|
51413
|
+
if (isNewer(installed, cliVersion)) {
|
|
51414
|
+
const result = {
|
|
51415
|
+
dir: skillDir,
|
|
51416
|
+
installedVersion: installed,
|
|
51417
|
+
links: [],
|
|
51418
|
+
removed: [],
|
|
51419
|
+
skill: ARTBOARD_SKILL_ID,
|
|
51420
|
+
status: "newer-installed",
|
|
51421
|
+
version: cliVersion,
|
|
51422
|
+
written: []
|
|
51423
|
+
};
|
|
51424
|
+
if (options.json) return outputJson(result);
|
|
51425
|
+
console.log(`${import_picocolors.default.yellow("!")} ${ARTBOARD_SKILL_ID} v${installed} is already installed and this lh is v${cliVersion}; nothing changed`);
|
|
51426
|
+
return;
|
|
51427
|
+
}
|
|
51428
|
+
const removed = listFiles(skillDir).filter((file) => file !== skillFile).map((file) => {
|
|
51429
|
+
rmSync(file, { force: true });
|
|
51430
|
+
return path.relative(skillDir, file).split(path.sep).join("/");
|
|
51431
|
+
});
|
|
51432
|
+
mkdirSync(skillDir, { recursive: true });
|
|
51433
|
+
writeFileSync(skillFile, renderSkill(cliVersion), "utf8");
|
|
51434
|
+
const links = linkHarnessSkills(baseDir, ARTBOARD_SKILL_ID);
|
|
51435
|
+
const result = {
|
|
51436
|
+
dir: skillDir,
|
|
51437
|
+
installedVersion: installed,
|
|
51438
|
+
links,
|
|
51439
|
+
removed,
|
|
51440
|
+
skill: ARTBOARD_SKILL_ID,
|
|
51441
|
+
status: "installed",
|
|
51442
|
+
version: cliVersion,
|
|
51443
|
+
written: ["SKILL.md"]
|
|
51444
|
+
};
|
|
51445
|
+
if (options.json) return outputJson(result);
|
|
51446
|
+
console.log(`${import_picocolors.default.green("✓")} ${import_picocolors.default.bold(ARTBOARD_SKILL_ID)} ${import_picocolors.default.dim(`v${cliVersion}`)} skill → ${import_picocolors.default.dim(path.relative(process.cwd(), skillDir) || skillDir)}`);
|
|
51447
|
+
console.log(` written: SKILL.md${removed.length ? ` · removed: ${removed.join(", ")}` : ""}`);
|
|
51448
|
+
printLinks(links);
|
|
51449
|
+
console.log(import_picocolors.default.dim(" Commit these files so agents working in this repository load the skill."));
|
|
51450
|
+
};
|
|
51451
|
+
const registerArtboardSkillCommand = (artboard) => {
|
|
51452
|
+
artboard.command("skill").description("The agent skill that tells CLI agents when and how to use the artboard").command("init").description("Write the artboard skill into this repository (.agents/skills) or bring it up to date").option("--dir <path>", "Target working directory (default: current dir)").option("--json", "Print structured JSON").action(initAction);
|
|
51453
|
+
};
|
|
51454
|
+
|
|
51455
|
+
//#endregion
|
|
51456
|
+
//#region src/commands/artboard.ts
|
|
51457
|
+
init_src$2();
|
|
51458
|
+
const resultLine = (artboard) => formatArtboardResultLine({
|
|
51459
|
+
boardCount: artboard.content.boards.length,
|
|
51460
|
+
groupCount: artboard.content.groups.length,
|
|
51461
|
+
id: artboard.id,
|
|
51462
|
+
revision: artboard.revision
|
|
51463
|
+
});
|
|
51464
|
+
const parseOps = (value) => {
|
|
51465
|
+
if (value === void 0) return void 0;
|
|
51466
|
+
const text = value.startsWith("@") ? fs.readFileSync(value.slice(1), "utf8") : value;
|
|
51467
|
+
const ops = JSON.parse(text);
|
|
51468
|
+
if (!Array.isArray(ops)) throw new Error("--ops must be a JSON array of ops");
|
|
51469
|
+
return ops;
|
|
51470
|
+
};
|
|
51471
|
+
const parseFiles = (value) => {
|
|
51472
|
+
if (value === void 0) return void 0;
|
|
51473
|
+
const text = value.startsWith("@") ? fs.readFileSync(value.slice(1), "utf8") : value;
|
|
51474
|
+
const files = JSON.parse(text);
|
|
51475
|
+
if (!files || typeof files !== "object" || Array.isArray(files)) throw new Error("--files must be a JSON object of writes, edits and deletes");
|
|
51476
|
+
return files;
|
|
51477
|
+
};
|
|
51478
|
+
const FILES_HELP = "File changes applied before the ops: {\"writes\":[{\"path\",\"content\"}],\"edits\":[{\"path\",\"oldText\",\"newText\"}],\"deletes\":[path]} as JSON, or @file.json";
|
|
51479
|
+
const positiveInteger = (value) => {
|
|
51480
|
+
const result = Number(value);
|
|
51481
|
+
if (!Number.isSafeInteger(result) || result < 1) throw new Error("Expected a positive integer");
|
|
51482
|
+
return result;
|
|
51483
|
+
};
|
|
51484
|
+
const topicId = () => process.env.LOBEHUB_TOPIC_ID || void 0;
|
|
51485
|
+
const registerArtboardCommand = (program) => {
|
|
51486
|
+
const artboard = program.command("artboard").description("Lay out a requirement on a project artboard (same ops as the builtin-artboard tool)");
|
|
51487
|
+
artboard.command("create").description("Create the artboard for a task; without --task it uses the run's conversation project").requiredOption("--title <title>", "Board title").option("--description <text>", "One line shown on the board card").option("--task <task>", "Task id or identifier, such as PRJ-12").option("--files <json>", FILES_HELP).option("--ops <json>", "Initial ops (addGroup, addBoard, addEdge, addRound, addPage, …) as a JSON array, or @file.json; shapes: lh artboard ops").option("--json", "Print structured JSON").action(async (options) => {
|
|
51488
|
+
if (!options.task && !topicId()) throw new Error("Pass --task: this shell has no LOBEHUB_TOPIC_ID to find the project");
|
|
51489
|
+
const result = await (await getTrpcClient()).artboard.create.mutate({
|
|
51490
|
+
description: options.description,
|
|
51491
|
+
files: parseFiles(options.files),
|
|
51492
|
+
ops: parseOps(options.ops),
|
|
51493
|
+
taskId: options.task,
|
|
51494
|
+
title: options.title,
|
|
51495
|
+
topicId: topicId()
|
|
51496
|
+
});
|
|
51497
|
+
if (options.json) return outputJson(result);
|
|
51498
|
+
console.log(resultLine(result.artboard));
|
|
51499
|
+
});
|
|
51500
|
+
artboard.command("update <id>").description("Apply file changes and ops; everything applies or nothing does").requiredOption("--revision <n>", "Revision you last read", positiveInteger).option("--files <json>", FILES_HELP).option("--ops <json>", "Ops (add/update/remove Board, Group, Page; addRound, updateRound; addEdge, removeEdge; setCheck) as a JSON array, or @file.json; shapes: lh artboard ops").option("--json", "Print structured JSON").action(async (id, options) => {
|
|
51501
|
+
if (options.files === void 0 && options.ops === void 0) throw new Error("Pass --ops, --files or both");
|
|
51502
|
+
const result = await (await getTrpcClient()).artboard.update.mutate({
|
|
51503
|
+
files: parseFiles(options.files),
|
|
51504
|
+
id,
|
|
51505
|
+
ops: parseOps(options.ops),
|
|
51506
|
+
revision: options.revision
|
|
51507
|
+
});
|
|
51508
|
+
if (options.json) return outputJson(result);
|
|
51509
|
+
console.log(resultLine(result.artboard));
|
|
51510
|
+
});
|
|
51511
|
+
artboard.command("read <id>").description("Print the artboard and its revision").option("--json", "Print structured JSON").action(async (id, options) => {
|
|
51512
|
+
const result = await (await getTrpcClient()).artboard.read.query({ id });
|
|
51513
|
+
if (options.json) return outputJson(result);
|
|
51514
|
+
console.log(resultLine(result.artboard));
|
|
51515
|
+
console.log(JSON.stringify(result.artboard.content, null, 2));
|
|
51516
|
+
});
|
|
51517
|
+
artboard.command("push <id> <dir>").description("Upload the HTML pages, styles and images under <dir> as files of the artboard; unchanged files are skipped").option("--prune", "Also delete artboard files that are not in <dir>").option("--json", "Print structured JSON").action(async (id, dir, options) => {
|
|
51518
|
+
const result = await pushArtboardDir((await getTrpcClient()).artboard, id, dir, { prune: options.prune });
|
|
51519
|
+
if (options.json) return outputJson(result);
|
|
51520
|
+
console.log(`pushed ${result.uploaded.length} · unchanged ${result.unchanged.length} · deleted ${result.deleted.length}`);
|
|
51521
|
+
for (const skipped of result.skipped) console.log(`skipped ${skipped}: not a file a board can serve`);
|
|
51522
|
+
});
|
|
51523
|
+
const files = artboard.command("files").description("List, read, write and remove artboard files");
|
|
51524
|
+
files.command("list <id>").description("List the files of the artboard").option("--json", "Print structured JSON").action(async (id, options) => {
|
|
51525
|
+
const list = await (await getTrpcClient()).artboard.listFiles.query({ id });
|
|
51526
|
+
if (options.json) return outputJson(list);
|
|
51527
|
+
for (const file of list) console.log(`${file.path} ${file.size} B`);
|
|
51528
|
+
});
|
|
51529
|
+
files.command("read <id> <path>").description("Print one text file of the artboard").action(async (id, path) => {
|
|
51530
|
+
const file = await (await getTrpcClient()).artboard.readFile.query({
|
|
51531
|
+
id,
|
|
51532
|
+
path
|
|
51533
|
+
});
|
|
51534
|
+
if (file.content === void 0) throw new Error(`${file.path} is binary`);
|
|
51535
|
+
process.stdout.write(file.content);
|
|
51536
|
+
});
|
|
51537
|
+
files.command("write <id> <path>").description("Write one file of the artboard from stdin, or from a local file with --from").option("--from <file>", "Local file to upload instead of stdin").action(async (id, path, options) => {
|
|
51538
|
+
const normalized = normalizeArtboardFilePath(path);
|
|
51539
|
+
if (!normalized) throw new Error(`${path} is not a file a board can serve`);
|
|
51540
|
+
const bytes = options.from ? fs.readFileSync(options.from) : await buffer(process.stdin);
|
|
51541
|
+
await writeArtboardFiles((await getTrpcClient()).artboard, id, [toLocalArtboardFile(normalized, bytes)]);
|
|
51542
|
+
console.log(`wrote ${normalized} ${bytes.byteLength} B`);
|
|
51543
|
+
});
|
|
51544
|
+
files.command("rm <id> <paths...>").description("Delete files of the artboard; boards that show one stay and wait for it again").action(async (id, paths) => {
|
|
51545
|
+
await (await getTrpcClient()).artboard.writeFiles.mutate({
|
|
51546
|
+
files: { deletes: paths },
|
|
51547
|
+
id
|
|
51548
|
+
});
|
|
51549
|
+
for (const path of paths) console.log(`deleted ${path}`);
|
|
51550
|
+
});
|
|
51551
|
+
artboard.command("list").description("List the artboards in the run's project").option("--task <task>", "Find the project through this task instead").option("--json", "Print structured JSON").action(async (options) => {
|
|
51552
|
+
const boards = await (await getTrpcClient()).artboard.list.query({
|
|
51553
|
+
taskId: options.task,
|
|
51554
|
+
topicId: topicId()
|
|
51555
|
+
});
|
|
51556
|
+
if (options.json) return outputJson(boards);
|
|
51557
|
+
for (const board of boards) console.log(`${board.id} ${board.title} ${board.phase} revision ${board.revision}`);
|
|
51558
|
+
});
|
|
51559
|
+
registerArtboardCommentCommands(artboard);
|
|
51560
|
+
registerArtboardOpsCommand(artboard);
|
|
51561
|
+
registerArtboardSkillCommand(artboard);
|
|
51562
|
+
};
|
|
51563
|
+
|
|
50782
51564
|
//#endregion
|
|
50783
51565
|
//#region ../../packages/html-artifact/src/fileExtension.ts
|
|
50784
51566
|
const getFileExtension = (filename) => {
|
|
@@ -56658,6 +57440,10 @@ const bindingSchema = object$1({
|
|
|
56658
57440
|
workId: string().min(1)
|
|
56659
57441
|
}).optional()
|
|
56660
57442
|
}).optional(),
|
|
57443
|
+
pendingCanvasSave: object$1({
|
|
57444
|
+
fingerprint: string().regex(/^[\da-f]{64}$/),
|
|
57445
|
+
requestId: uuid()
|
|
57446
|
+
}).optional(),
|
|
56661
57447
|
pendingCreateFingerprint: string().min(1).optional(),
|
|
56662
57448
|
pendingCreateKey: string().min(1).optional(),
|
|
56663
57449
|
pendingType: _enum(["canvas", "html"]).optional()
|
|
@@ -56669,7 +57455,7 @@ const bindingSchema = object$1({
|
|
|
56669
57455
|
});
|
|
56670
57456
|
const manifestSchema = object$1({
|
|
56671
57457
|
artifacts: record(string(), bindingSchema),
|
|
56672
|
-
version: literal(1)
|
|
57458
|
+
version: literal$1(1)
|
|
56673
57459
|
}).passthrough();
|
|
56674
57460
|
const emptyManifest = () => ({
|
|
56675
57461
|
artifacts: {},
|
|
@@ -56870,6 +57656,55 @@ const publishCanvasArtifact = async (client, params) => {
|
|
|
56870
57656
|
subdomainLabel: published.subdomainLabel
|
|
56871
57657
|
};
|
|
56872
57658
|
};
|
|
57659
|
+
const saveFingerprint = (html, title, createNew) => createHash("sha256").update(JSON.stringify([
|
|
57660
|
+
"save",
|
|
57661
|
+
html,
|
|
57662
|
+
title,
|
|
57663
|
+
createNew
|
|
57664
|
+
])).digest("hex");
|
|
57665
|
+
const saveCanvasArtifact = async (client, params) => {
|
|
57666
|
+
const { binding, html, manifest, title } = params;
|
|
57667
|
+
if (binding.pendingCanvas) throw new Error("A Canvas publication is pending; retry lh artifact publish with the original input first");
|
|
57668
|
+
if (binding.pendingCreateKey && binding.pendingType !== "canvas") throw new Error("Complete the pending HTML publication before saving a Canvas");
|
|
57669
|
+
const context = await client.canvas.getPublishContext.query();
|
|
57670
|
+
const scope = JSON.stringify([
|
|
57671
|
+
resolveServerUrl(),
|
|
57672
|
+
context.userId,
|
|
57673
|
+
context.workspaceId
|
|
57674
|
+
]);
|
|
57675
|
+
if (binding.scope && binding.scope !== scope) throw new Error("This artifact is bound to a different server, account or workspace");
|
|
57676
|
+
const createNew = !!params.new;
|
|
57677
|
+
const canvasId = createNew ? void 0 : binding.canvasId;
|
|
57678
|
+
const current = canvasId ? await client.canvas.getVersion.query({ canvasId }) : null;
|
|
57679
|
+
if (canvasId && !current) throw new Error("The bound Canvas is unavailable to this account; save it with --new");
|
|
57680
|
+
const fingerprint = saveFingerprint(html, title, createNew);
|
|
57681
|
+
const requestId = binding.pendingCanvasSave?.fingerprint === fingerprint ? binding.pendingCanvasSave.requestId : createIdempotencyKey();
|
|
57682
|
+
writeBinding(manifest, {
|
|
57683
|
+
...binding,
|
|
57684
|
+
pendingCanvasSave: {
|
|
57685
|
+
fingerprint,
|
|
57686
|
+
requestId
|
|
57687
|
+
}
|
|
57688
|
+
});
|
|
57689
|
+
const saved = await client.canvas.save.mutate({
|
|
57690
|
+
canvasId,
|
|
57691
|
+
expectedVersion: current?.version ?? 0,
|
|
57692
|
+
html,
|
|
57693
|
+
requestId,
|
|
57694
|
+
title
|
|
57695
|
+
});
|
|
57696
|
+
const { pendingCanvasSave: _pending, ...settled } = binding;
|
|
57697
|
+
writeBinding(manifest, {
|
|
57698
|
+
...settled,
|
|
57699
|
+
...createNew && { deploymentId: void 0 },
|
|
57700
|
+
canvasId: saved.canvasId,
|
|
57701
|
+
scope,
|
|
57702
|
+
type: "canvas",
|
|
57703
|
+
version: saved.version,
|
|
57704
|
+
workId: saved.workId
|
|
57705
|
+
});
|
|
57706
|
+
return saved;
|
|
57707
|
+
};
|
|
56873
57708
|
|
|
56874
57709
|
//#endregion
|
|
56875
57710
|
//#region src/commands/artifact.ts
|
|
@@ -56923,6 +57758,42 @@ function registerArtifactCommand(program) {
|
|
|
56923
57758
|
}
|
|
56924
57759
|
console.log(output.content);
|
|
56925
57760
|
});
|
|
57761
|
+
artifact.command("save <file>").description("Save a local Canvas page as a new Canvas version without publishing it to the web").option("--root <dir>", "Directory the page may reference assets from (defaults to the working directory)").option("--new", "Start a separate Canvas instead of a new version of the bound one").option("--title <title>", "Override the page title").option("--json [fields]", "Output JSON, optionally specify fields (comma-separated)").action(async (file, options) => {
|
|
57762
|
+
const entryPath = path.resolve(file);
|
|
57763
|
+
const rootDirectory = path.resolve(options.root ?? process.cwd());
|
|
57764
|
+
if (!entryPath.startsWith(`${rootDirectory}${path.sep}`) && entryPath !== rootDirectory) {
|
|
57765
|
+
fail$4(`${file} is outside ${rootDirectory}. Pass --root to widen the saved directory.`);
|
|
57766
|
+
return;
|
|
57767
|
+
}
|
|
57768
|
+
const entry = await readLocalHtmlAsset(entryPath);
|
|
57769
|
+
if (!entry.ok || entry.text === void 0) {
|
|
57770
|
+
fail$4(`Cannot read ${file}`);
|
|
57771
|
+
return;
|
|
57772
|
+
}
|
|
57773
|
+
const manifest = resolveManifest(entryPath, rootDirectory);
|
|
57774
|
+
const binding = readBinding(manifest);
|
|
57775
|
+
if (!options.new && binding.deploymentId && (binding.type ?? "html") !== "canvas") {
|
|
57776
|
+
fail$4("This file is bound to an HTML artifact; pass --new to save it as a Canvas.");
|
|
57777
|
+
return;
|
|
57778
|
+
}
|
|
57779
|
+
try {
|
|
57780
|
+
const saved = await saveCanvasArtifact(await getTrpcClient(), {
|
|
57781
|
+
binding,
|
|
57782
|
+
html: entry.text,
|
|
57783
|
+
manifest,
|
|
57784
|
+
new: options.new,
|
|
57785
|
+
title: options.title || extractHtmlTitle(entry.text) || path.basename(entryPath, path.extname(entryPath))
|
|
57786
|
+
});
|
|
57787
|
+
if (options.json !== void 0) outputJson(saved, typeof options.json === "string" ? options.json : void 0);
|
|
57788
|
+
else console.log(`${import_picocolors.default.green("✓")} Saved Canvas ${saved.canvasId} (version ${saved.version})`);
|
|
57789
|
+
} catch (error) {
|
|
57790
|
+
if (options.json !== void 0) outputJson({
|
|
57791
|
+
error: formatError(error),
|
|
57792
|
+
success: false
|
|
57793
|
+
});
|
|
57794
|
+
fail$4(formatError(error));
|
|
57795
|
+
}
|
|
57796
|
+
});
|
|
56926
57797
|
artifact.command("publish <file>").description("Publish a local HTML file, bundling the assets it references").option("--root <dir>", "Directory the page may reference assets from (defaults to the working directory)").option("--deployment <id>", "Publish to this deployment for this run only").option("--new", "Create a separate deployment instead of updating the bound one").option("--type <type>", "Artifact content type: html or canvas (defaults to the bound type, then html)").option("--title <title>", "Override the page title").option("--slug <slug>", "Requested public slug").option("--json [fields]", "Output JSON, optionally specify fields (comma-separated)").action(async (file, options) => {
|
|
56927
57798
|
const entryPath = path.resolve(file);
|
|
56928
57799
|
const rootDirectory = path.resolve(options.root ?? process.cwd());
|
|
@@ -60770,7 +61641,7 @@ const LOBEHUB_CLI_GUIDE_CONTEXT = "lobehub-cli-guide";
|
|
|
60770
61641
|
* agent keeps in context, so it names the LobeHub-shaped requests and, just as
|
|
60771
61642
|
* deliberately, says what is not one.
|
|
60772
61643
|
*/
|
|
60773
|
-
const lobeHubCliSkillDescription = "Reach the user's LobeHub — the app this conversation runs in — through the preinstalled `lh` CLI. Use when the request concerns LobeHub itself: its documents, knowledge bases, files, memory, earlier conversations (topic ids start with `tpc_`, or a `<refer_topic>` tag), agents and your own agent configuration, tasks, projects, widgets, bots, models, providers, plugins or skills, or generating images, video or speech there. Not needed for ordinary work on local files or other tools.";
|
|
61644
|
+
const lobeHubCliSkillDescription = "Reach the user's LobeHub — the app this conversation runs in — through the preinstalled `lh` CLI. Use when the request concerns LobeHub itself: its documents, knowledge bases, files, memory, earlier conversations (topic ids start with `tpc_`, or a `<refer_topic>` tag), agents and your own agent configuration, tasks, projects, artboards, widgets, bots, models, providers, plugins or skills, or generating images, video or speech there. Not needed for ordinary work on local files or other tools.";
|
|
60774
61645
|
const lobeHubCliGuideBody = [
|
|
60775
61646
|
"You are running inside a LobeHub conversation, on a machine where the `lh` CLI is already installed and the run normally carries the user's credentials in its environment. Never install, upgrade or replace `lh` globally — that binary may be the one running `lh connect`, which is executing you — and never run `lh login`.",
|
|
60776
61647
|
"",
|
|
@@ -60780,7 +61651,7 @@ const lobeHubCliGuideBody = [
|
|
|
60780
61651
|
"- **Talking to another conversation:** `lh topic send <tpc_id> -c \"…\"` delivers a message to that conversation and has its agent act on it (queued behind its current turn if it is busy). To hand work to a fresh conversation instead, `lh topic send --new -c \"…\"` opens one for you (or `--agent-id` another agent), optionally on a given machine with `--device <id|local>` and named with `--title`; it is linked to this conversation as its parent (`--parent-topic-id <tpc_id>` names another, `--detach` links none), and `lh topic list --opened-by-me` lists the ones you opened; `lh topic stop <tpc_id>` stops a topic's running turn and `lh topic archive <tpc_id>` archives it; `lh message send -c \"…\"` is the same thing spelled message-first: without `--topic-id` it opens a new conversation, with `--topic-id <tpc_id>` it sends to that one. Prefer these over `lh agent run` for handing off work. `lh message create` only writes a row — nobody sees or answers it. A message another agent sent you starts with an `<agent_sender>` header; answer it with `lh message reply <message_id> -c \"…\"`, which wakes the sender's conversation. Your ordinary response is not delivered to that agent.",
|
|
60781
61652
|
"- **If `lh` is too old** — `lh man` lacks a command you expect, or `lh` reports an unknown command or option — the shell may have found a stale global install first. When `LOBEHUB_CLI` is set it is the path of the CLI this app ships — run that path instead of `lh` for the rest of the session. Otherwise, or if that one is too old as well, run the latest CLI once without installing it: `pnpm --package @lobehub/cli@latest dlx lh …` (or `npx -y -p @lobehub/cli@latest lh …`). It reads the same environment and saved login as `lh`. If the user asks you to run `lh` this way, do so.",
|
|
60782
61653
|
"- **Look commands up, do not guess them.** `lh man` lists every command, and `lh man <command>` (e.g. `lh man doc create`) prints the manual for the CLI actually installed here, including exactly which flags that command takes. Many commands offer `--json` for structured output, but not all of them — the manual is what says so, and an invented flag just fails the call.",
|
|
60783
|
-
"- **What it reaches:** `lh kb` knowledge bases · `lh doc` documents · `lh file` files · `lh artifact` artifacts · `lh topic` / `lh message` past conversations · `lh agent` agents · `lh task` / `lh project` work · `lh widget` / `lh dashboard` monitoring widgets and dashboards · `lh search` local resources and the web · `lh recall` past messages, topics, goals and pages in a time window · `lh gen` text/image/video/TTS/ASR generation · `lh memory` user memory · `lh notify` notifications to the user · `lh model` / `lh provider` / `lh legacy-plugin` / `lh skill` platform configuration · `lh bot` chat-platform bots.",
|
|
61654
|
+
"- **What it reaches:** `lh kb` knowledge bases · `lh doc` documents · `lh file` files · `lh artifact` artifacts · `lh topic` / `lh message` past conversations · `lh agent` agents · `lh task` / `lh project` work · `lh artboard` the requirement artboard of a project (boards, flows and choices the user answers on the canvas) · `lh widget` / `lh dashboard` monitoring widgets and dashboards · `lh search` local resources and the web · `lh recall` past messages, topics, goals and pages in a time window · `lh gen` text/image/video/TTS/ASR generation · `lh memory` user memory · `lh notify` notifications to the user · `lh model` / `lh provider` / `lh legacy-plugin` / `lh skill` platform configuration · `lh bot` chat-platform bots.",
|
|
60784
61655
|
"- **Widgets run code with the user's credentials.** Before `lh widget dry-run` of a draft that declares connector credentials (`manifest.env`) or network hosts (`manifest.network.allow`), show the user that version id, what the script does and which credentials and hosts it uses, and wait for their explicit approval of that exact version before passing `--version <id> --yes`. Never publish (`lh widget publish`) without the user's confirmation.",
|
|
60785
61656
|
"- **If a command fails with an authentication or permission error**, tell the user what you were trying to do — do not work around it.",
|
|
60786
61657
|
"- **Leave these alone:** `lh hetero` and `lh connect` run the infrastructure that is executing you. And never change the persistent workspace scope with `lh workspace use` — it silently rewrites the target of every later command on this machine."
|
|
@@ -63241,7 +64112,7 @@ init_zod$1();
|
|
|
63241
64112
|
const questionSchema = object$1({
|
|
63242
64113
|
header: string().max(200),
|
|
63243
64114
|
id: string().min(1),
|
|
63244
|
-
isSecret: literal(false),
|
|
64115
|
+
isSecret: literal$1(false),
|
|
63245
64116
|
options: array(object$1({
|
|
63246
64117
|
description: string().max(1e3),
|
|
63247
64118
|
label: string().min(1).max(200)
|
|
@@ -63289,13 +64160,13 @@ const codexUserInputResponse = (request, answer) => {
|
|
|
63289
64160
|
init_zod$1();
|
|
63290
64161
|
const nonBlank = string().refine((value) => value.trim().length > 0);
|
|
63291
64162
|
const notificationSchema = object$1({ item: object$1({
|
|
63292
|
-
delivery: literal("async"),
|
|
64163
|
+
delivery: literal$1("async"),
|
|
63293
64164
|
id: nonBlank,
|
|
63294
64165
|
questions: array(object$1({
|
|
63295
64166
|
options: array(nonBlank).nullish(),
|
|
63296
64167
|
title: nonBlank
|
|
63297
64168
|
})).min(1),
|
|
63298
|
-
type: literal("agentMessage")
|
|
64169
|
+
type: literal$1("agentMessage")
|
|
63299
64170
|
}) });
|
|
63300
64171
|
const readCodexAsyncQuestion = (params) => {
|
|
63301
64172
|
const item = notificationSchema.safeParse(params).data?.item;
|
|
@@ -98645,14 +99516,14 @@ var require_stream$1 = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
|
98645
99516
|
//#endregion
|
|
98646
99517
|
//#region node_modules/.pnpm/safe-buffer@5.1.2/node_modules/safe-buffer/index.js
|
|
98647
99518
|
var require_safe_buffer$1 = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
98648
|
-
var buffer$
|
|
98649
|
-
var Buffer = buffer$
|
|
99519
|
+
var buffer$2 = __require("buffer");
|
|
99520
|
+
var Buffer = buffer$2.Buffer;
|
|
98650
99521
|
function copyProps(src, dst) {
|
|
98651
99522
|
for (var key in src) dst[key] = src[key];
|
|
98652
99523
|
}
|
|
98653
|
-
if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) module.exports = buffer$
|
|
99524
|
+
if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) module.exports = buffer$2;
|
|
98654
99525
|
else {
|
|
98655
|
-
copyProps(buffer$
|
|
99526
|
+
copyProps(buffer$2, exports);
|
|
98656
99527
|
exports.Buffer = SafeBuffer;
|
|
98657
99528
|
}
|
|
98658
99529
|
function SafeBuffer(arg, encodingOrOffset, length) {
|
|
@@ -98677,7 +99548,7 @@ var require_safe_buffer$1 = /* @__PURE__ */ __commonJSMin$2(((exports, module) =
|
|
|
98677
99548
|
};
|
|
98678
99549
|
SafeBuffer.allocUnsafeSlow = function(size) {
|
|
98679
99550
|
if (typeof size !== "number") throw new TypeError("Argument must be a number");
|
|
98680
|
-
return buffer$
|
|
99551
|
+
return buffer$2.SlowBuffer(size);
|
|
98681
99552
|
};
|
|
98682
99553
|
}));
|
|
98683
99554
|
|
|
@@ -260885,14 +261756,14 @@ var require__stream_duplex = /* @__PURE__ */ __commonJSMin$2(((exports, module)
|
|
|
260885
261756
|
//#region node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js
|
|
260886
261757
|
var require_safe_buffer = /* @__PURE__ */ __commonJSMin$2(((exports, module) => {
|
|
260887
261758
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
260888
|
-
var buffer = __require("buffer");
|
|
260889
|
-
var Buffer = buffer.Buffer;
|
|
261759
|
+
var buffer$1 = __require("buffer");
|
|
261760
|
+
var Buffer = buffer$1.Buffer;
|
|
260890
261761
|
function copyProps(src, dst) {
|
|
260891
261762
|
for (var key in src) dst[key] = src[key];
|
|
260892
261763
|
}
|
|
260893
|
-
if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) module.exports = buffer;
|
|
261764
|
+
if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) module.exports = buffer$1;
|
|
260894
261765
|
else {
|
|
260895
|
-
copyProps(buffer, exports);
|
|
261766
|
+
copyProps(buffer$1, exports);
|
|
260896
261767
|
exports.Buffer = SafeBuffer;
|
|
260897
261768
|
}
|
|
260898
261769
|
function SafeBuffer(arg, encodingOrOffset, length) {
|
|
@@ -260918,7 +261789,7 @@ var require_safe_buffer = /* @__PURE__ */ __commonJSMin$2(((exports, module) =>
|
|
|
260918
261789
|
};
|
|
260919
261790
|
SafeBuffer.allocUnsafeSlow = function(size) {
|
|
260920
261791
|
if (typeof size !== "number") throw new TypeError("Argument must be a number");
|
|
260921
|
-
return buffer.SlowBuffer(size);
|
|
261792
|
+
return buffer$1.SlowBuffer(size);
|
|
260922
261793
|
};
|
|
260923
261794
|
}));
|
|
260924
261795
|
|
|
@@ -308758,21 +309629,21 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
308758
309629
|
ResultSchema = looseObject({ _meta: ResultMetaObjectSchema.optional() });
|
|
308759
309630
|
RequestIdSchema = union([string(), number$1().int()]);
|
|
308760
309631
|
JSONRPCRequestSchema = object$1({
|
|
308761
|
-
jsonrpc: literal("2.0"),
|
|
309632
|
+
jsonrpc: literal$1("2.0"),
|
|
308762
309633
|
id: RequestIdSchema,
|
|
308763
309634
|
...RequestSchema.shape
|
|
308764
309635
|
}).strict();
|
|
308765
309636
|
JSONRPCNotificationSchema = object$1({
|
|
308766
|
-
jsonrpc: literal("2.0"),
|
|
309637
|
+
jsonrpc: literal$1("2.0"),
|
|
308767
309638
|
...NotificationSchema.shape
|
|
308768
309639
|
}).strict();
|
|
308769
309640
|
JSONRPCResultResponseSchema = object$1({
|
|
308770
|
-
jsonrpc: literal("2.0"),
|
|
309641
|
+
jsonrpc: literal$1("2.0"),
|
|
308771
309642
|
id: RequestIdSchema,
|
|
308772
309643
|
result: ResultSchema
|
|
308773
309644
|
}).strict();
|
|
308774
309645
|
JSONRPCErrorResponseSchema = object$1({
|
|
308775
|
-
jsonrpc: literal("2.0"),
|
|
309646
|
+
jsonrpc: literal$1("2.0"),
|
|
308776
309647
|
id: RequestIdSchema.optional(),
|
|
308777
309648
|
error: object$1({
|
|
308778
309649
|
code: number$1().int(),
|
|
@@ -308793,7 +309664,7 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
308793
309664
|
reason: string().optional()
|
|
308794
309665
|
});
|
|
308795
309666
|
CancelledNotificationSchema = NotificationSchema.extend({
|
|
308796
|
-
method: literal("notifications/cancelled"),
|
|
309667
|
+
method: literal$1("notifications/cancelled"),
|
|
308797
309668
|
params: CancelledNotificationParamsSchema
|
|
308798
309669
|
});
|
|
308799
309670
|
IconSchema = object$1({
|
|
@@ -308852,7 +309723,7 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
308852
309723
|
clientInfo: ImplementationSchema
|
|
308853
309724
|
});
|
|
308854
309725
|
InitializeRequestSchema = RequestSchema.extend({
|
|
308855
|
-
method: literal("initialize"),
|
|
309726
|
+
method: literal$1("initialize"),
|
|
308856
309727
|
params: InitializeRequestParamsSchema
|
|
308857
309728
|
});
|
|
308858
309729
|
ServerCapabilitiesSchema = object$1({
|
|
@@ -308875,11 +309746,11 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
308875
309746
|
instructions: string().optional()
|
|
308876
309747
|
});
|
|
308877
309748
|
InitializedNotificationSchema = NotificationSchema.extend({
|
|
308878
|
-
method: literal("notifications/initialized"),
|
|
309749
|
+
method: literal$1("notifications/initialized"),
|
|
308879
309750
|
params: NotificationsParamsSchema.optional()
|
|
308880
309751
|
});
|
|
308881
309752
|
DiscoverRequestSchema = RequestSchema.extend({
|
|
308882
|
-
method: literal("server/discover"),
|
|
309753
|
+
method: literal$1("server/discover"),
|
|
308883
309754
|
params: BaseRequestParamsSchema.optional()
|
|
308884
309755
|
});
|
|
308885
309756
|
DiscoverResultSchema = ResultSchema.extend({
|
|
@@ -308888,7 +309759,7 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
308888
309759
|
instructions: string().optional()
|
|
308889
309760
|
});
|
|
308890
309761
|
PingRequestSchema = RequestSchema.extend({
|
|
308891
|
-
method: literal("ping"),
|
|
309762
|
+
method: literal$1("ping"),
|
|
308892
309763
|
params: BaseRequestParamsSchema.optional()
|
|
308893
309764
|
});
|
|
308894
309765
|
ProgressSchema = object$1({
|
|
@@ -308902,7 +309773,7 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
308902
309773
|
progressToken: ProgressTokenSchema
|
|
308903
309774
|
});
|
|
308904
309775
|
ProgressNotificationSchema = NotificationSchema.extend({
|
|
308905
|
-
method: literal("notifications/progress"),
|
|
309776
|
+
method: literal$1("notifications/progress"),
|
|
308906
309777
|
params: ProgressNotificationParamsSchema
|
|
308907
309778
|
});
|
|
308908
309779
|
PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({ cursor: CursorSchema.optional() });
|
|
@@ -308948,29 +309819,29 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
308948
309819
|
annotations: AnnotationsSchema.optional(),
|
|
308949
309820
|
_meta: optional(looseObject({}))
|
|
308950
309821
|
});
|
|
308951
|
-
ListResourcesRequestSchema = PaginatedRequestSchema.extend({ method: literal("resources/list") });
|
|
309822
|
+
ListResourcesRequestSchema = PaginatedRequestSchema.extend({ method: literal$1("resources/list") });
|
|
308952
309823
|
ListResourcesResultSchema = PaginatedResultSchema.extend({ resources: array(ResourceSchema) });
|
|
308953
|
-
ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({ method: literal("resources/templates/list") });
|
|
309824
|
+
ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({ method: literal$1("resources/templates/list") });
|
|
308954
309825
|
ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({ resourceTemplates: array(ResourceTemplateSchema) });
|
|
308955
309826
|
ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({ uri: string() });
|
|
308956
309827
|
ReadResourceRequestParamsSchema = ResourceRequestParamsSchema;
|
|
308957
309828
|
ReadResourceRequestSchema = RequestSchema.extend({
|
|
308958
|
-
method: literal("resources/read"),
|
|
309829
|
+
method: literal$1("resources/read"),
|
|
308959
309830
|
params: ReadResourceRequestParamsSchema
|
|
308960
309831
|
});
|
|
308961
309832
|
ReadResourceResultSchema = ResultSchema.extend({ contents: array(union([TextResourceContentsSchema, BlobResourceContentsSchema])) });
|
|
308962
309833
|
ResourceListChangedNotificationSchema = NotificationSchema.extend({
|
|
308963
|
-
method: literal("notifications/resources/list_changed"),
|
|
309834
|
+
method: literal$1("notifications/resources/list_changed"),
|
|
308964
309835
|
params: NotificationsParamsSchema.optional()
|
|
308965
309836
|
});
|
|
308966
309837
|
SubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
308967
309838
|
SubscribeRequestSchema = RequestSchema.extend({
|
|
308968
|
-
method: literal("resources/subscribe"),
|
|
309839
|
+
method: literal$1("resources/subscribe"),
|
|
308969
309840
|
params: SubscribeRequestParamsSchema
|
|
308970
309841
|
});
|
|
308971
309842
|
UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
308972
309843
|
UnsubscribeRequestSchema = RequestSchema.extend({
|
|
308973
|
-
method: literal("resources/unsubscribe"),
|
|
309844
|
+
method: literal$1("resources/unsubscribe"),
|
|
308974
309845
|
params: UnsubscribeRequestParamsSchema
|
|
308975
309846
|
});
|
|
308976
309847
|
SubscriptionFilterSchema = object$1({
|
|
@@ -308981,19 +309852,19 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
308981
309852
|
});
|
|
308982
309853
|
SubscriptionsListenRequestParamsSchema = BaseRequestParamsSchema.extend({ notifications: SubscriptionFilterSchema });
|
|
308983
309854
|
SubscriptionsListenRequestSchema = RequestSchema.extend({
|
|
308984
|
-
method: literal("subscriptions/listen"),
|
|
309855
|
+
method: literal$1("subscriptions/listen"),
|
|
308985
309856
|
params: SubscriptionsListenRequestParamsSchema
|
|
308986
309857
|
});
|
|
308987
309858
|
SubscriptionsAcknowledgedNotificationParamsSchema = NotificationsParamsSchema.extend({ notifications: SubscriptionFilterSchema });
|
|
308988
309859
|
SubscriptionsAcknowledgedNotificationSchema = NotificationSchema.extend({
|
|
308989
|
-
method: literal("notifications/subscriptions/acknowledged"),
|
|
309860
|
+
method: literal$1("notifications/subscriptions/acknowledged"),
|
|
308990
309861
|
params: SubscriptionsAcknowledgedNotificationParamsSchema
|
|
308991
309862
|
});
|
|
308992
309863
|
SubscriptionsListenResultMetaSchema = ResultMetaObjectSchema.extend({ [SUBSCRIPTION_ID_META_KEY]: RequestIdSchema });
|
|
308993
309864
|
SubscriptionsListenResultSchema = ResultSchema.extend({ _meta: SubscriptionsListenResultMetaSchema });
|
|
308994
309865
|
ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({ uri: string() });
|
|
308995
309866
|
ResourceUpdatedNotificationSchema = NotificationSchema.extend({
|
|
308996
|
-
method: literal("notifications/resources/updated"),
|
|
309867
|
+
method: literal$1("notifications/resources/updated"),
|
|
308997
309868
|
params: ResourceUpdatedNotificationParamsSchema
|
|
308998
309869
|
});
|
|
308999
309870
|
PromptArgumentSchema = object$1({
|
|
@@ -309008,50 +309879,50 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
309008
309879
|
arguments: optional(array(PromptArgumentSchema)),
|
|
309009
309880
|
_meta: optional(looseObject({}))
|
|
309010
309881
|
});
|
|
309011
|
-
ListPromptsRequestSchema = PaginatedRequestSchema.extend({ method: literal("prompts/list") });
|
|
309882
|
+
ListPromptsRequestSchema = PaginatedRequestSchema.extend({ method: literal$1("prompts/list") });
|
|
309012
309883
|
ListPromptsResultSchema = PaginatedResultSchema.extend({ prompts: array(PromptSchema) });
|
|
309013
309884
|
GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
309014
309885
|
name: string(),
|
|
309015
309886
|
arguments: record(string(), string()).optional()
|
|
309016
309887
|
});
|
|
309017
309888
|
GetPromptRequestSchema = RequestSchema.extend({
|
|
309018
|
-
method: literal("prompts/get"),
|
|
309889
|
+
method: literal$1("prompts/get"),
|
|
309019
309890
|
params: GetPromptRequestParamsSchema
|
|
309020
309891
|
});
|
|
309021
309892
|
TextContentSchema = object$1({
|
|
309022
|
-
type: literal("text"),
|
|
309893
|
+
type: literal$1("text"),
|
|
309023
309894
|
text: string(),
|
|
309024
309895
|
annotations: AnnotationsSchema.optional(),
|
|
309025
309896
|
_meta: record(string(), unknown()).optional()
|
|
309026
309897
|
});
|
|
309027
309898
|
ImageContentSchema = object$1({
|
|
309028
|
-
type: literal("image"),
|
|
309899
|
+
type: literal$1("image"),
|
|
309029
309900
|
data: Base64Schema,
|
|
309030
309901
|
mimeType: string(),
|
|
309031
309902
|
annotations: AnnotationsSchema.optional(),
|
|
309032
309903
|
_meta: record(string(), unknown()).optional()
|
|
309033
309904
|
});
|
|
309034
309905
|
AudioContentSchema = object$1({
|
|
309035
|
-
type: literal("audio"),
|
|
309906
|
+
type: literal$1("audio"),
|
|
309036
309907
|
data: Base64Schema,
|
|
309037
309908
|
mimeType: string(),
|
|
309038
309909
|
annotations: AnnotationsSchema.optional(),
|
|
309039
309910
|
_meta: record(string(), unknown()).optional()
|
|
309040
309911
|
});
|
|
309041
309912
|
ToolUseContentSchema = object$1({
|
|
309042
|
-
type: literal("tool_use"),
|
|
309913
|
+
type: literal$1("tool_use"),
|
|
309043
309914
|
name: string(),
|
|
309044
309915
|
id: string(),
|
|
309045
309916
|
input: record(string(), unknown()),
|
|
309046
309917
|
_meta: record(string(), unknown()).optional()
|
|
309047
309918
|
});
|
|
309048
309919
|
EmbeddedResourceSchema = object$1({
|
|
309049
|
-
type: literal("resource"),
|
|
309920
|
+
type: literal$1("resource"),
|
|
309050
309921
|
resource: union([TextResourceContentsSchema, BlobResourceContentsSchema]),
|
|
309051
309922
|
annotations: AnnotationsSchema.optional(),
|
|
309052
309923
|
_meta: record(string(), unknown()).optional()
|
|
309053
309924
|
});
|
|
309054
|
-
ResourceLinkSchema = ResourceSchema.extend({ type: literal("resource_link") });
|
|
309925
|
+
ResourceLinkSchema = ResourceSchema.extend({ type: literal$1("resource_link") });
|
|
309055
309926
|
ContentBlockSchema = union([
|
|
309056
309927
|
TextContentSchema,
|
|
309057
309928
|
ImageContentSchema,
|
|
@@ -309068,7 +309939,7 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
309068
309939
|
messages: array(PromptMessageSchema)
|
|
309069
309940
|
});
|
|
309070
309941
|
PromptListChangedNotificationSchema = NotificationSchema.extend({
|
|
309071
|
-
method: literal("notifications/prompts/list_changed"),
|
|
309942
|
+
method: literal$1("notifications/prompts/list_changed"),
|
|
309072
309943
|
params: NotificationsParamsSchema.optional()
|
|
309073
309944
|
});
|
|
309074
309945
|
ToolAnnotationsSchema = object$1({
|
|
@@ -309088,7 +309959,7 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
309088
309959
|
...IconsSchema.shape,
|
|
309089
309960
|
description: string().optional(),
|
|
309090
309961
|
inputSchema: object$1({
|
|
309091
|
-
type: literal("object"),
|
|
309962
|
+
type: literal$1("object"),
|
|
309092
309963
|
properties: record(string(), JSONValueSchema).optional(),
|
|
309093
309964
|
required: array(string()).optional()
|
|
309094
309965
|
}).catchall(unknown()),
|
|
@@ -309097,7 +309968,7 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
309097
309968
|
execution: ToolExecutionSchema.optional(),
|
|
309098
309969
|
_meta: record(string(), unknown()).optional()
|
|
309099
309970
|
});
|
|
309100
|
-
ListToolsRequestSchema = PaginatedRequestSchema.extend({ method: literal("tools/list") });
|
|
309971
|
+
ListToolsRequestSchema = PaginatedRequestSchema.extend({ method: literal$1("tools/list") });
|
|
309101
309972
|
ListToolsResultSchema = PaginatedResultSchema.extend({ tools: array(ToolSchema) });
|
|
309102
309973
|
CallToolResultSchema = ResultSchema.extend({
|
|
309103
309974
|
content: array(ContentBlockSchema).default([]),
|
|
@@ -309110,11 +309981,11 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
309110
309981
|
arguments: record(string(), unknown()).optional()
|
|
309111
309982
|
});
|
|
309112
309983
|
CallToolRequestSchema = RequestSchema.extend({
|
|
309113
|
-
method: literal("tools/call"),
|
|
309984
|
+
method: literal$1("tools/call"),
|
|
309114
309985
|
params: CallToolRequestParamsSchema
|
|
309115
309986
|
});
|
|
309116
309987
|
ToolListChangedNotificationSchema = NotificationSchema.extend({
|
|
309117
|
-
method: literal("notifications/tools/list_changed"),
|
|
309988
|
+
method: literal$1("notifications/tools/list_changed"),
|
|
309118
309989
|
params: NotificationsParamsSchema.optional()
|
|
309119
309990
|
});
|
|
309120
309991
|
ListChangedOptionsBaseSchema = object$1({
|
|
@@ -309133,7 +310004,7 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
309133
310004
|
]);
|
|
309134
310005
|
SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({ level: LoggingLevelSchema });
|
|
309135
310006
|
SetLevelRequestSchema = RequestSchema.extend({
|
|
309136
|
-
method: literal("logging/setLevel"),
|
|
310007
|
+
method: literal$1("logging/setLevel"),
|
|
309137
310008
|
params: SetLevelRequestParamsSchema
|
|
309138
310009
|
});
|
|
309139
310010
|
LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
@@ -309142,7 +310013,7 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
309142
310013
|
data: unknown()
|
|
309143
310014
|
});
|
|
309144
310015
|
LoggingMessageNotificationSchema = NotificationSchema.extend({
|
|
309145
|
-
method: literal("notifications/message"),
|
|
310016
|
+
method: literal$1("notifications/message"),
|
|
309146
310017
|
params: LoggingMessageNotificationParamsSchema
|
|
309147
310018
|
});
|
|
309148
310019
|
ModelHintSchema = object$1({ name: string().optional() });
|
|
@@ -309158,7 +310029,7 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
309158
310029
|
"none"
|
|
309159
310030
|
]).optional() });
|
|
309160
310031
|
ToolResultContentSchema = object$1({
|
|
309161
|
-
type: literal("tool_result"),
|
|
310032
|
+
type: literal$1("tool_result"),
|
|
309162
310033
|
toolUseId: string().describe("The unique identifier for the corresponding tool call."),
|
|
309163
310034
|
content: array(ContentBlockSchema),
|
|
309164
310035
|
structuredContent: unknown().optional(),
|
|
@@ -309199,7 +310070,7 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
309199
310070
|
toolChoice: ToolChoiceSchema.optional()
|
|
309200
310071
|
});
|
|
309201
310072
|
CreateMessageRequestSchema = RequestSchema.extend({
|
|
309202
|
-
method: literal("sampling/createMessage"),
|
|
310073
|
+
method: literal$1("sampling/createMessage"),
|
|
309203
310074
|
params: CreateMessageRequestParamsSchema
|
|
309204
310075
|
});
|
|
309205
310076
|
CreateMessageResultSchema = ResultSchema.extend({
|
|
@@ -309224,13 +310095,13 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
309224
310095
|
content: union([SamplingMessageContentBlockSchema, array(SamplingMessageContentBlockSchema)])
|
|
309225
310096
|
});
|
|
309226
310097
|
BooleanSchemaSchema = object$1({
|
|
309227
|
-
type: literal("boolean"),
|
|
310098
|
+
type: literal$1("boolean"),
|
|
309228
310099
|
title: string().optional(),
|
|
309229
310100
|
description: string().optional(),
|
|
309230
310101
|
default: boolean().optional()
|
|
309231
310102
|
});
|
|
309232
310103
|
StringSchemaSchema = object$1({
|
|
309233
|
-
type: literal("string"),
|
|
310104
|
+
type: literal$1("string"),
|
|
309234
310105
|
title: string().optional(),
|
|
309235
310106
|
description: string().optional(),
|
|
309236
310107
|
minLength: number$1().optional(),
|
|
@@ -309252,14 +310123,14 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
309252
310123
|
default: number$1().optional()
|
|
309253
310124
|
});
|
|
309254
310125
|
UntitledSingleSelectEnumSchemaSchema = object$1({
|
|
309255
|
-
type: literal("string"),
|
|
310126
|
+
type: literal$1("string"),
|
|
309256
310127
|
title: string().optional(),
|
|
309257
310128
|
description: string().optional(),
|
|
309258
310129
|
enum: array(string()),
|
|
309259
310130
|
default: string().optional()
|
|
309260
310131
|
});
|
|
309261
310132
|
TitledSingleSelectEnumSchemaSchema = object$1({
|
|
309262
|
-
type: literal("string"),
|
|
310133
|
+
type: literal$1("string"),
|
|
309263
310134
|
title: string().optional(),
|
|
309264
310135
|
description: string().optional(),
|
|
309265
310136
|
oneOf: array(object$1({
|
|
@@ -309269,7 +310140,7 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
309269
310140
|
default: string().optional()
|
|
309270
310141
|
});
|
|
309271
310142
|
LegacyTitledEnumSchemaSchema = object$1({
|
|
309272
|
-
type: literal("string"),
|
|
310143
|
+
type: literal$1("string"),
|
|
309273
310144
|
title: string().optional(),
|
|
309274
310145
|
description: string().optional(),
|
|
309275
310146
|
enum: array(string()),
|
|
@@ -309278,19 +310149,19 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
309278
310149
|
});
|
|
309279
310150
|
SingleSelectEnumSchemaSchema = union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);
|
|
309280
310151
|
UntitledMultiSelectEnumSchemaSchema = object$1({
|
|
309281
|
-
type: literal("array"),
|
|
310152
|
+
type: literal$1("array"),
|
|
309282
310153
|
title: string().optional(),
|
|
309283
310154
|
description: string().optional(),
|
|
309284
310155
|
minItems: number$1().optional(),
|
|
309285
310156
|
maxItems: number$1().optional(),
|
|
309286
310157
|
items: object$1({
|
|
309287
|
-
type: literal("string"),
|
|
310158
|
+
type: literal$1("string"),
|
|
309288
310159
|
enum: array(string())
|
|
309289
310160
|
}),
|
|
309290
310161
|
default: array(string()).optional()
|
|
309291
310162
|
});
|
|
309292
310163
|
TitledMultiSelectEnumSchemaSchema = object$1({
|
|
309293
|
-
type: literal("array"),
|
|
310164
|
+
type: literal$1("array"),
|
|
309294
310165
|
title: string().optional(),
|
|
309295
310166
|
description: string().optional(),
|
|
309296
310167
|
minItems: number$1().optional(),
|
|
@@ -309314,28 +310185,28 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
309314
310185
|
NumberSchemaSchema
|
|
309315
310186
|
]);
|
|
309316
310187
|
ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
309317
|
-
mode: literal("form").optional(),
|
|
310188
|
+
mode: literal$1("form").optional(),
|
|
309318
310189
|
message: string(),
|
|
309319
310190
|
requestedSchema: object$1({
|
|
309320
|
-
type: literal("object"),
|
|
310191
|
+
type: literal$1("object"),
|
|
309321
310192
|
properties: record(string(), PrimitiveSchemaDefinitionSchema),
|
|
309322
310193
|
required: array(string()).optional()
|
|
309323
310194
|
}).catchall(unknown())
|
|
309324
310195
|
});
|
|
309325
310196
|
ElicitRequestURLParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
309326
|
-
mode: literal("url"),
|
|
310197
|
+
mode: literal$1("url"),
|
|
309327
310198
|
message: string(),
|
|
309328
310199
|
elicitationId: string(),
|
|
309329
310200
|
url: string().url()
|
|
309330
310201
|
});
|
|
309331
310202
|
ElicitRequestParamsSchema = union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema]);
|
|
309332
310203
|
ElicitRequestSchema = RequestSchema.extend({
|
|
309333
|
-
method: literal("elicitation/create"),
|
|
310204
|
+
method: literal$1("elicitation/create"),
|
|
309334
310205
|
params: ElicitRequestParamsSchema
|
|
309335
310206
|
});
|
|
309336
310207
|
ElicitationCompleteNotificationParamsSchema = NotificationsParamsSchema.extend({ elicitationId: string() });
|
|
309337
310208
|
ElicitationCompleteNotificationSchema = NotificationSchema.extend({
|
|
309338
|
-
method: literal("notifications/elicitation/complete"),
|
|
310209
|
+
method: literal$1("notifications/elicitation/complete"),
|
|
309339
310210
|
params: ElicitationCompleteNotificationParamsSchema
|
|
309340
310211
|
});
|
|
309341
310212
|
ElicitResultSchema = ResultSchema.extend({
|
|
@@ -309352,11 +310223,11 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
309352
310223
|
])).optional())
|
|
309353
310224
|
});
|
|
309354
310225
|
ResourceTemplateReferenceSchema = object$1({
|
|
309355
|
-
type: literal("ref/resource"),
|
|
310226
|
+
type: literal$1("ref/resource"),
|
|
309356
310227
|
uri: string()
|
|
309357
310228
|
});
|
|
309358
310229
|
PromptReferenceSchema = object$1({
|
|
309359
|
-
type: literal("ref/prompt"),
|
|
310230
|
+
type: literal$1("ref/prompt"),
|
|
309360
310231
|
name: string()
|
|
309361
310232
|
});
|
|
309362
310233
|
CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
@@ -309368,7 +310239,7 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
309368
310239
|
context: object$1({ arguments: record(string(), string()).optional() }).optional()
|
|
309369
310240
|
});
|
|
309370
310241
|
CompleteRequestSchema = RequestSchema.extend({
|
|
309371
|
-
method: literal("completion/complete"),
|
|
310242
|
+
method: literal$1("completion/complete"),
|
|
309372
310243
|
params: CompleteRequestParamsSchema
|
|
309373
310244
|
});
|
|
309374
310245
|
CompleteResultSchema = ResultSchema.extend({ completion: looseObject({
|
|
@@ -309382,12 +310253,12 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
309382
310253
|
_meta: record(string(), unknown()).optional()
|
|
309383
310254
|
});
|
|
309384
310255
|
ListRootsRequestSchema = RequestSchema.extend({
|
|
309385
|
-
method: literal("roots/list"),
|
|
310256
|
+
method: literal$1("roots/list"),
|
|
309386
310257
|
params: BaseRequestParamsSchema.optional()
|
|
309387
310258
|
});
|
|
309388
310259
|
ListRootsResultSchema = ResultSchema.extend({ roots: array(RootSchema) });
|
|
309389
310260
|
RootsListChangedNotificationSchema = NotificationSchema.extend({
|
|
309390
|
-
method: literal("notifications/roots/list_changed"),
|
|
310261
|
+
method: literal$1("notifications/roots/list_changed"),
|
|
309391
310262
|
params: NotificationsParamsSchema.optional()
|
|
309392
310263
|
});
|
|
309393
310264
|
TaskCreationParamsSchema = looseObject({
|
|
@@ -309413,23 +310284,23 @@ var init_schemas_DscsoNZN = __esmMin((() => {
|
|
|
309413
310284
|
CreateTaskResultSchema = ResultSchema.extend({ task: TaskSchema });
|
|
309414
310285
|
TaskStatusNotificationParamsSchema = NotificationsParamsSchema.merge(TaskSchema);
|
|
309415
310286
|
TaskStatusNotificationSchema = NotificationSchema.extend({
|
|
309416
|
-
method: literal("notifications/tasks/status"),
|
|
310287
|
+
method: literal$1("notifications/tasks/status"),
|
|
309417
310288
|
params: TaskStatusNotificationParamsSchema
|
|
309418
310289
|
});
|
|
309419
310290
|
GetTaskRequestSchema = RequestSchema.extend({
|
|
309420
|
-
method: literal("tasks/get"),
|
|
310291
|
+
method: literal$1("tasks/get"),
|
|
309421
310292
|
params: BaseRequestParamsSchema.extend({ taskId: string() })
|
|
309422
310293
|
});
|
|
309423
310294
|
GetTaskResultSchema = ResultSchema.merge(TaskSchema);
|
|
309424
310295
|
GetTaskPayloadRequestSchema = RequestSchema.extend({
|
|
309425
|
-
method: literal("tasks/result"),
|
|
310296
|
+
method: literal$1("tasks/result"),
|
|
309426
310297
|
params: BaseRequestParamsSchema.extend({ taskId: string() })
|
|
309427
310298
|
});
|
|
309428
310299
|
GetTaskPayloadResultSchema = ResultSchema.loose();
|
|
309429
|
-
ListTasksRequestSchema = PaginatedRequestSchema.extend({ method: literal("tasks/list") });
|
|
310300
|
+
ListTasksRequestSchema = PaginatedRequestSchema.extend({ method: literal$1("tasks/list") });
|
|
309430
310301
|
ListTasksResultSchema = PaginatedResultSchema.extend({ tasks: array(TaskSchema) });
|
|
309431
310302
|
CancelTaskRequestSchema = RequestSchema.extend({
|
|
309432
|
-
method: literal("tasks/cancel"),
|
|
310303
|
+
method: literal$1("tasks/cancel"),
|
|
309433
310304
|
params: BaseRequestParamsSchema.extend({ taskId: string() })
|
|
309434
310305
|
});
|
|
309435
310306
|
CancelTaskResultSchema = ResultSchema.merge(TaskSchema);
|
|
@@ -309606,7 +310477,7 @@ var init_auth_UMQCo_ad = __esmMin((() => {
|
|
|
309606
310477
|
issuer: string().optional().catch(void 0)
|
|
309607
310478
|
}).strip();
|
|
309608
310479
|
IdJagTokenExchangeResponseSchema = object$1({
|
|
309609
|
-
issued_token_type: literal("urn:ietf:params:oauth:token-type:id-jag"),
|
|
310480
|
+
issued_token_type: literal$1("urn:ietf:params:oauth:token-type:id-jag"),
|
|
309610
310481
|
access_token: string(),
|
|
309611
310482
|
token_type: string().optional(),
|
|
309612
310483
|
expires_in: number$1().optional(),
|
|
@@ -309617,7 +310488,7 @@ var init_auth_UMQCo_ad = __esmMin((() => {
|
|
|
309617
310488
|
error_description: string().optional(),
|
|
309618
310489
|
error_uri: string().optional()
|
|
309619
310490
|
});
|
|
309620
|
-
OptionalSafeUrlSchema = SafeUrlSchema.optional().or(literal("").transform(() => void 0));
|
|
310491
|
+
OptionalSafeUrlSchema = SafeUrlSchema.optional().or(literal$1("").transform(() => void 0));
|
|
309621
310492
|
OAuthClientMetadataSchema = object$1({
|
|
309622
310493
|
redirect_uris: array(SafeUrlSchema),
|
|
309623
310494
|
token_endpoint_auth_method: string().optional(),
|
|
@@ -309890,7 +310761,7 @@ function build$1$1() {
|
|
|
309890
310761
|
* A client MUST NOT attempt to cancel its {@linkcode InitializeRequest | initialize} request.
|
|
309891
310762
|
*/
|
|
309892
310763
|
const CancelledNotificationSchema$1 = NotificationSchema$1.extend({
|
|
309893
|
-
method: literal("notifications/cancelled"),
|
|
310764
|
+
method: literal$1("notifications/cancelled"),
|
|
309894
310765
|
params: CancelledNotificationParamsSchema$1
|
|
309895
310766
|
});
|
|
309896
310767
|
/**
|
|
@@ -309978,7 +310849,7 @@ function build$1$1() {
|
|
|
309978
310849
|
* This request is sent from the client to the server when it first connects, asking it to begin initialization.
|
|
309979
310850
|
*/
|
|
309980
310851
|
const InitializeRequestSchema$1 = RequestSchema$1.extend({
|
|
309981
|
-
method: literal("initialize"),
|
|
310852
|
+
method: literal$1("initialize"),
|
|
309982
310853
|
params: InitializeRequestParamsSchema$1
|
|
309983
310854
|
});
|
|
309984
310855
|
/**
|
|
@@ -310010,14 +310881,14 @@ function build$1$1() {
|
|
|
310010
310881
|
* This notification is sent from the client to the server after initialization has finished.
|
|
310011
310882
|
*/
|
|
310012
310883
|
const InitializedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
310013
|
-
method: literal("notifications/initialized"),
|
|
310884
|
+
method: literal$1("notifications/initialized"),
|
|
310014
310885
|
params: NotificationsParamsSchema$1.optional()
|
|
310015
310886
|
});
|
|
310016
310887
|
/**
|
|
310017
310888
|
* A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else may be disconnected.
|
|
310018
310889
|
*/
|
|
310019
310890
|
const PingRequestSchema$1 = RequestSchema$1.extend({
|
|
310020
|
-
method: literal("ping"),
|
|
310891
|
+
method: literal$1("ping"),
|
|
310021
310892
|
params: BaseRequestParamsSchema$1.optional()
|
|
310022
310893
|
});
|
|
310023
310894
|
const ProgressSchema$1 = object$1({
|
|
@@ -310036,7 +310907,7 @@ function build$1$1() {
|
|
|
310036
310907
|
* @category notifications/progress
|
|
310037
310908
|
*/
|
|
310038
310909
|
const ProgressNotificationSchema$1 = NotificationSchema$1.extend({
|
|
310039
|
-
method: literal("notifications/progress"),
|
|
310910
|
+
method: literal$1("notifications/progress"),
|
|
310040
310911
|
params: ProgressNotificationParamsSchema$1
|
|
310041
310912
|
});
|
|
310042
310913
|
const PaginatedRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({ cursor: CursorSchema$1.optional() });
|
|
@@ -310105,7 +310976,7 @@ function build$1$1() {
|
|
|
310105
310976
|
/**
|
|
310106
310977
|
* Sent from the client to request a list of resources the server has.
|
|
310107
310978
|
*/
|
|
310108
|
-
const ListResourcesRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal("resources/list") });
|
|
310979
|
+
const ListResourcesRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal$1("resources/list") });
|
|
310109
310980
|
/**
|
|
310110
310981
|
* The server's response to a {@linkcode ListResourcesRequest | resources/list} request from the client.
|
|
310111
310982
|
*/
|
|
@@ -310113,7 +310984,7 @@ function build$1$1() {
|
|
|
310113
310984
|
/**
|
|
310114
310985
|
* Sent from the client to request a list of resource templates the server has.
|
|
310115
310986
|
*/
|
|
310116
|
-
const ListResourceTemplatesRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal("resources/templates/list") });
|
|
310987
|
+
const ListResourceTemplatesRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal$1("resources/templates/list") });
|
|
310117
310988
|
/**
|
|
310118
310989
|
* The server's response to a {@linkcode ListResourceTemplatesRequest | resources/templates/list} request from the client.
|
|
310119
310990
|
*/
|
|
@@ -310127,7 +310998,7 @@ function build$1$1() {
|
|
|
310127
310998
|
* Sent from the client to the server, to read a specific resource URI.
|
|
310128
310999
|
*/
|
|
310129
311000
|
const ReadResourceRequestSchema$1 = RequestSchema$1.extend({
|
|
310130
|
-
method: literal("resources/read"),
|
|
311001
|
+
method: literal$1("resources/read"),
|
|
310131
311002
|
params: ReadResourceRequestParamsSchema$1
|
|
310132
311003
|
});
|
|
310133
311004
|
/**
|
|
@@ -310138,7 +311009,7 @@ function build$1$1() {
|
|
|
310138
311009
|
* An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This may be issued by servers without any previous subscription from the client.
|
|
310139
311010
|
*/
|
|
310140
311011
|
const ResourceListChangedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
310141
|
-
method: literal("notifications/resources/list_changed"),
|
|
311012
|
+
method: literal$1("notifications/resources/list_changed"),
|
|
310142
311013
|
params: NotificationsParamsSchema$1.optional()
|
|
310143
311014
|
});
|
|
310144
311015
|
const SubscribeRequestParamsSchema$1 = ResourceRequestParamsSchema$1;
|
|
@@ -310146,7 +311017,7 @@ function build$1$1() {
|
|
|
310146
311017
|
* Sent from the client to request `resources/updated` notifications from the server whenever a particular resource changes.
|
|
310147
311018
|
*/
|
|
310148
311019
|
const SubscribeRequestSchema$1 = RequestSchema$1.extend({
|
|
310149
|
-
method: literal("resources/subscribe"),
|
|
311020
|
+
method: literal$1("resources/subscribe"),
|
|
310150
311021
|
params: SubscribeRequestParamsSchema$1
|
|
310151
311022
|
});
|
|
310152
311023
|
const UnsubscribeRequestParamsSchema$1 = ResourceRequestParamsSchema$1;
|
|
@@ -310154,7 +311025,7 @@ function build$1$1() {
|
|
|
310154
311025
|
* Sent from the client to request cancellation of {@linkcode ResourceUpdatedNotification | resources/updated} notifications from the server. This should follow a previous {@linkcode SubscribeRequest | resources/subscribe} request.
|
|
310155
311026
|
*/
|
|
310156
311027
|
const UnsubscribeRequestSchema$1 = RequestSchema$1.extend({
|
|
310157
|
-
method: literal("resources/unsubscribe"),
|
|
311028
|
+
method: literal$1("resources/unsubscribe"),
|
|
310158
311029
|
params: UnsubscribeRequestParamsSchema$1
|
|
310159
311030
|
});
|
|
310160
311031
|
/**
|
|
@@ -310165,7 +311036,7 @@ function build$1$1() {
|
|
|
310165
311036
|
* A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a {@linkcode SubscribeRequest | resources/subscribe} request.
|
|
310166
311037
|
*/
|
|
310167
311038
|
const ResourceUpdatedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
310168
|
-
method: literal("notifications/resources/updated"),
|
|
311039
|
+
method: literal$1("notifications/resources/updated"),
|
|
310169
311040
|
params: ResourceUpdatedNotificationParamsSchema$1
|
|
310170
311041
|
});
|
|
310171
311042
|
/**
|
|
@@ -310189,7 +311060,7 @@ function build$1$1() {
|
|
|
310189
311060
|
/**
|
|
310190
311061
|
* Sent from the client to request a list of prompts and prompt templates the server has.
|
|
310191
311062
|
*/
|
|
310192
|
-
const ListPromptsRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal("prompts/list") });
|
|
311063
|
+
const ListPromptsRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal$1("prompts/list") });
|
|
310193
311064
|
/**
|
|
310194
311065
|
* The server's response to a {@linkcode ListPromptsRequest | prompts/list} request from the client.
|
|
310195
311066
|
*/
|
|
@@ -310205,14 +311076,14 @@ function build$1$1() {
|
|
|
310205
311076
|
* Used by the client to get a prompt provided by the server.
|
|
310206
311077
|
*/
|
|
310207
311078
|
const GetPromptRequestSchema$1 = RequestSchema$1.extend({
|
|
310208
|
-
method: literal("prompts/get"),
|
|
311079
|
+
method: literal$1("prompts/get"),
|
|
310209
311080
|
params: GetPromptRequestParamsSchema$1
|
|
310210
311081
|
});
|
|
310211
311082
|
/**
|
|
310212
311083
|
* Text provided to or from an LLM.
|
|
310213
311084
|
*/
|
|
310214
311085
|
const TextContentSchema$1 = object$1({
|
|
310215
|
-
type: literal("text"),
|
|
311086
|
+
type: literal$1("text"),
|
|
310216
311087
|
text: string(),
|
|
310217
311088
|
annotations: AnnotationsSchema$1.optional(),
|
|
310218
311089
|
_meta: record(string(), unknown()).optional()
|
|
@@ -310221,7 +311092,7 @@ function build$1$1() {
|
|
|
310221
311092
|
* An image provided to or from an LLM.
|
|
310222
311093
|
*/
|
|
310223
311094
|
const ImageContentSchema$1 = object$1({
|
|
310224
|
-
type: literal("image"),
|
|
311095
|
+
type: literal$1("image"),
|
|
310225
311096
|
data: Base64Schema,
|
|
310226
311097
|
mimeType: string(),
|
|
310227
311098
|
annotations: AnnotationsSchema$1.optional(),
|
|
@@ -310231,7 +311102,7 @@ function build$1$1() {
|
|
|
310231
311102
|
* Audio content provided to or from an LLM.
|
|
310232
311103
|
*/
|
|
310233
311104
|
const AudioContentSchema$1 = object$1({
|
|
310234
|
-
type: literal("audio"),
|
|
311105
|
+
type: literal$1("audio"),
|
|
310235
311106
|
data: Base64Schema,
|
|
310236
311107
|
mimeType: string(),
|
|
310237
311108
|
annotations: AnnotationsSchema$1.optional(),
|
|
@@ -310246,7 +311117,7 @@ function build$1$1() {
|
|
|
310246
311117
|
* provider APIs directly.
|
|
310247
311118
|
*/
|
|
310248
311119
|
const ToolUseContentSchema$1 = object$1({
|
|
310249
|
-
type: literal("tool_use"),
|
|
311120
|
+
type: literal$1("tool_use"),
|
|
310250
311121
|
name: string(),
|
|
310251
311122
|
id: string(),
|
|
310252
311123
|
input: record(string(), unknown()),
|
|
@@ -310256,7 +311127,7 @@ function build$1$1() {
|
|
|
310256
311127
|
* The contents of a resource, embedded into a prompt or tool call result.
|
|
310257
311128
|
*/
|
|
310258
311129
|
const EmbeddedResourceSchema$1 = object$1({
|
|
310259
|
-
type: literal("resource"),
|
|
311130
|
+
type: literal$1("resource"),
|
|
310260
311131
|
resource: union([TextResourceContentsSchema$1, BlobResourceContentsSchema$1]),
|
|
310261
311132
|
annotations: AnnotationsSchema$1.optional(),
|
|
310262
311133
|
_meta: record(string(), unknown()).optional()
|
|
@@ -310266,7 +311137,7 @@ function build$1$1() {
|
|
|
310266
311137
|
*
|
|
310267
311138
|
* Note: resource links returned by tools are not guaranteed to appear in the results of {@linkcode ListResourcesRequest | resources/list} requests.
|
|
310268
311139
|
*/
|
|
310269
|
-
const ResourceLinkSchema$1 = ResourceSchema$1.extend({ type: literal("resource_link") });
|
|
311140
|
+
const ResourceLinkSchema$1 = ResourceSchema$1.extend({ type: literal$1("resource_link") });
|
|
310270
311141
|
/**
|
|
310271
311142
|
* A content block that can be used in prompts and tool results.
|
|
310272
311143
|
*/
|
|
@@ -310295,7 +311166,7 @@ function build$1$1() {
|
|
|
310295
311166
|
* An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This may be issued by servers without any previous subscription from the client.
|
|
310296
311167
|
*/
|
|
310297
311168
|
const PromptListChangedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
310298
|
-
method: literal("notifications/prompts/list_changed"),
|
|
311169
|
+
method: literal$1("notifications/prompts/list_changed"),
|
|
310299
311170
|
params: NotificationsParamsSchema$1.optional()
|
|
310300
311171
|
});
|
|
310301
311172
|
/**
|
|
@@ -310331,12 +311202,12 @@ function build$1$1() {
|
|
|
310331
311202
|
...IconsSchema$1.shape,
|
|
310332
311203
|
description: string().optional(),
|
|
310333
311204
|
inputSchema: object$1({
|
|
310334
|
-
type: literal("object"),
|
|
311205
|
+
type: literal$1("object"),
|
|
310335
311206
|
properties: record(string(), JSONValueSchema$1).optional(),
|
|
310336
311207
|
required: array(string()).optional()
|
|
310337
311208
|
}).catchall(unknown()),
|
|
310338
311209
|
outputSchema: object$1({
|
|
310339
|
-
type: literal("object"),
|
|
311210
|
+
type: literal$1("object"),
|
|
310340
311211
|
properties: record(string(), JSONValueSchema$1).optional(),
|
|
310341
311212
|
required: array(string()).optional()
|
|
310342
311213
|
}).catchall(unknown()).optional(),
|
|
@@ -310347,7 +311218,7 @@ function build$1$1() {
|
|
|
310347
311218
|
/**
|
|
310348
311219
|
* Sent from the client to request a list of tools the server has.
|
|
310349
311220
|
*/
|
|
310350
|
-
const ListToolsRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal("tools/list") });
|
|
311221
|
+
const ListToolsRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal$1("tools/list") });
|
|
310351
311222
|
/**
|
|
310352
311223
|
* The server's response to a {@linkcode ListToolsRequest | tools/list} request from the client.
|
|
310353
311224
|
*/
|
|
@@ -310371,14 +311242,14 @@ function build$1$1() {
|
|
|
310371
311242
|
* Used by the client to invoke a tool provided by the server.
|
|
310372
311243
|
*/
|
|
310373
311244
|
const CallToolRequestSchema$1 = RequestSchema$1.extend({
|
|
310374
|
-
method: literal("tools/call"),
|
|
311245
|
+
method: literal$1("tools/call"),
|
|
310375
311246
|
params: CallToolRequestParamsSchema$1
|
|
310376
311247
|
});
|
|
310377
311248
|
/**
|
|
310378
311249
|
* An optional notification from the server to the client, informing it that the list of tools it offers has changed. This may be issued by servers without any previous subscription from the client.
|
|
310379
311250
|
*/
|
|
310380
311251
|
const ToolListChangedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
310381
|
-
method: literal("notifications/tools/list_changed"),
|
|
311252
|
+
method: literal$1("notifications/tools/list_changed"),
|
|
310382
311253
|
params: NotificationsParamsSchema$1.optional()
|
|
310383
311254
|
});
|
|
310384
311255
|
/**
|
|
@@ -310414,7 +311285,7 @@ function build$1$1() {
|
|
|
310414
311285
|
* (STDIO servers) or OpenTelemetry.
|
|
310415
311286
|
*/
|
|
310416
311287
|
const SetLevelRequestSchema$1 = RequestSchema$1.extend({
|
|
310417
|
-
method: literal("logging/setLevel"),
|
|
311288
|
+
method: literal$1("logging/setLevel"),
|
|
310418
311289
|
params: SetLevelRequestParamsSchema$1
|
|
310419
311290
|
});
|
|
310420
311291
|
/**
|
|
@@ -310437,7 +311308,7 @@ function build$1$1() {
|
|
|
310437
311308
|
* (STDIO servers) or OpenTelemetry.
|
|
310438
311309
|
*/
|
|
310439
311310
|
const LoggingMessageNotificationSchema$1 = NotificationSchema$1.extend({
|
|
310440
|
-
method: literal("notifications/message"),
|
|
311311
|
+
method: literal$1("notifications/message"),
|
|
310441
311312
|
params: LoggingMessageNotificationParamsSchema$1
|
|
310442
311313
|
});
|
|
310443
311314
|
/**
|
|
@@ -310482,7 +311353,7 @@ function build$1$1() {
|
|
|
310482
311353
|
* provider APIs directly.
|
|
310483
311354
|
*/
|
|
310484
311355
|
const ToolResultContentSchema$1 = object$1({
|
|
310485
|
-
type: literal("tool_result"),
|
|
311356
|
+
type: literal$1("tool_result"),
|
|
310486
311357
|
toolUseId: string().describe("The unique identifier for the corresponding tool call."),
|
|
310487
311358
|
content: array(ContentBlockSchema$1),
|
|
310488
311359
|
structuredContent: object$1({}).loose().optional(),
|
|
@@ -310560,7 +311431,7 @@ function build$1$1() {
|
|
|
310560
311431
|
* provider APIs directly.
|
|
310561
311432
|
*/
|
|
310562
311433
|
const CreateMessageRequestSchema$1 = RequestSchema$1.extend({
|
|
310563
|
-
method: literal("sampling/createMessage"),
|
|
311434
|
+
method: literal$1("sampling/createMessage"),
|
|
310564
311435
|
params: CreateMessageRequestParamsSchema$1
|
|
310565
311436
|
});
|
|
310566
311437
|
/**
|
|
@@ -310605,7 +311476,7 @@ function build$1$1() {
|
|
|
310605
311476
|
* Primitive schema definition for boolean fields.
|
|
310606
311477
|
*/
|
|
310607
311478
|
const BooleanSchemaSchema$1 = object$1({
|
|
310608
|
-
type: literal("boolean"),
|
|
311479
|
+
type: literal$1("boolean"),
|
|
310609
311480
|
title: string().optional(),
|
|
310610
311481
|
description: string().optional(),
|
|
310611
311482
|
default: boolean().optional()
|
|
@@ -310614,7 +311485,7 @@ function build$1$1() {
|
|
|
310614
311485
|
* Primitive schema definition for string fields.
|
|
310615
311486
|
*/
|
|
310616
311487
|
const StringSchemaSchema$1 = object$1({
|
|
310617
|
-
type: literal("string"),
|
|
311488
|
+
type: literal$1("string"),
|
|
310618
311489
|
title: string().optional(),
|
|
310619
311490
|
description: string().optional(),
|
|
310620
311491
|
minLength: number$1().optional(),
|
|
@@ -310642,7 +311513,7 @@ function build$1$1() {
|
|
|
310642
311513
|
* Schema for single-selection enumeration without display titles for options.
|
|
310643
311514
|
*/
|
|
310644
311515
|
const UntitledSingleSelectEnumSchemaSchema$1 = object$1({
|
|
310645
|
-
type: literal("string"),
|
|
311516
|
+
type: literal$1("string"),
|
|
310646
311517
|
title: string().optional(),
|
|
310647
311518
|
description: string().optional(),
|
|
310648
311519
|
enum: array(string()),
|
|
@@ -310652,7 +311523,7 @@ function build$1$1() {
|
|
|
310652
311523
|
* Schema for single-selection enumeration with display titles for each option.
|
|
310653
311524
|
*/
|
|
310654
311525
|
const TitledSingleSelectEnumSchemaSchema$1 = object$1({
|
|
310655
|
-
type: literal("string"),
|
|
311526
|
+
type: literal$1("string"),
|
|
310656
311527
|
title: string().optional(),
|
|
310657
311528
|
description: string().optional(),
|
|
310658
311529
|
oneOf: array(object$1({
|
|
@@ -310666,7 +311537,7 @@ function build$1$1() {
|
|
|
310666
311537
|
* This interface will be removed in a future version.
|
|
310667
311538
|
*/
|
|
310668
311539
|
const LegacyTitledEnumSchemaSchema$1 = object$1({
|
|
310669
|
-
type: literal("string"),
|
|
311540
|
+
type: literal$1("string"),
|
|
310670
311541
|
title: string().optional(),
|
|
310671
311542
|
description: string().optional(),
|
|
310672
311543
|
enum: array(string()),
|
|
@@ -310678,13 +311549,13 @@ function build$1$1() {
|
|
|
310678
311549
|
* Schema for multiple-selection enumeration without display titles for options.
|
|
310679
311550
|
*/
|
|
310680
311551
|
const UntitledMultiSelectEnumSchemaSchema$1 = object$1({
|
|
310681
|
-
type: literal("array"),
|
|
311552
|
+
type: literal$1("array"),
|
|
310682
311553
|
title: string().optional(),
|
|
310683
311554
|
description: string().optional(),
|
|
310684
311555
|
minItems: number$1().optional(),
|
|
310685
311556
|
maxItems: number$1().optional(),
|
|
310686
311557
|
items: object$1({
|
|
310687
|
-
type: literal("string"),
|
|
311558
|
+
type: literal$1("string"),
|
|
310688
311559
|
enum: array(string())
|
|
310689
311560
|
}),
|
|
310690
311561
|
default: array(string()).optional()
|
|
@@ -310693,7 +311564,7 @@ function build$1$1() {
|
|
|
310693
311564
|
* Schema for multiple-selection enumeration with display titles for each option.
|
|
310694
311565
|
*/
|
|
310695
311566
|
const TitledMultiSelectEnumSchemaSchema$1 = object$1({
|
|
310696
|
-
type: literal("array"),
|
|
311567
|
+
type: literal$1("array"),
|
|
310697
311568
|
title: string().optional(),
|
|
310698
311569
|
description: string().optional(),
|
|
310699
311570
|
minItems: number$1().optional(),
|
|
@@ -310729,10 +311600,10 @@ function build$1$1() {
|
|
|
310729
311600
|
* Parameters for an `elicitation/create` request for form-based elicitation.
|
|
310730
311601
|
*/
|
|
310731
311602
|
const ElicitRequestFormParamsSchema$1 = TaskAugmentedRequestParamsSchema$1.extend({
|
|
310732
|
-
mode: literal("form").optional(),
|
|
311603
|
+
mode: literal$1("form").optional(),
|
|
310733
311604
|
message: string(),
|
|
310734
311605
|
requestedSchema: object$1({
|
|
310735
|
-
type: literal("object"),
|
|
311606
|
+
type: literal$1("object"),
|
|
310736
311607
|
properties: record(string(), PrimitiveSchemaDefinitionSchema$1),
|
|
310737
311608
|
required: array(string()).optional()
|
|
310738
311609
|
}).catchall(unknown())
|
|
@@ -310741,7 +311612,7 @@ function build$1$1() {
|
|
|
310741
311612
|
* Parameters for an {@linkcode ElicitRequest | elicitation/create} request for URL-based elicitation.
|
|
310742
311613
|
*/
|
|
310743
311614
|
const ElicitRequestURLParamsSchema$1 = TaskAugmentedRequestParamsSchema$1.extend({
|
|
310744
|
-
mode: literal("url"),
|
|
311615
|
+
mode: literal$1("url"),
|
|
310745
311616
|
message: string(),
|
|
310746
311617
|
elicitationId: string(),
|
|
310747
311618
|
url: string().url()
|
|
@@ -310756,7 +311627,7 @@ function build$1$1() {
|
|
|
310756
311627
|
* or navigate to a URL (URL mode).
|
|
310757
311628
|
*/
|
|
310758
311629
|
const ElicitRequestSchema$1 = RequestSchema$1.extend({
|
|
310759
|
-
method: literal("elicitation/create"),
|
|
311630
|
+
method: literal$1("elicitation/create"),
|
|
310760
311631
|
params: ElicitRequestParamsSchema$1
|
|
310761
311632
|
});
|
|
310762
311633
|
/**
|
|
@@ -310771,7 +311642,7 @@ function build$1$1() {
|
|
|
310771
311642
|
* @category notifications/elicitation/complete
|
|
310772
311643
|
*/
|
|
310773
311644
|
const ElicitationCompleteNotificationSchema$1 = NotificationSchema$1.extend({
|
|
310774
|
-
method: literal("notifications/elicitation/complete"),
|
|
311645
|
+
method: literal$1("notifications/elicitation/complete"),
|
|
310775
311646
|
params: ElicitationCompleteNotificationParamsSchema$1
|
|
310776
311647
|
});
|
|
310777
311648
|
/**
|
|
@@ -310794,14 +311665,14 @@ function build$1$1() {
|
|
|
310794
311665
|
* A reference to a resource or resource template definition.
|
|
310795
311666
|
*/
|
|
310796
311667
|
const ResourceTemplateReferenceSchema$1 = object$1({
|
|
310797
|
-
type: literal("ref/resource"),
|
|
311668
|
+
type: literal$1("ref/resource"),
|
|
310798
311669
|
uri: string()
|
|
310799
311670
|
});
|
|
310800
311671
|
/**
|
|
310801
311672
|
* Identifies a prompt.
|
|
310802
311673
|
*/
|
|
310803
311674
|
const PromptReferenceSchema$1 = object$1({
|
|
310804
|
-
type: literal("ref/prompt"),
|
|
311675
|
+
type: literal$1("ref/prompt"),
|
|
310805
311676
|
name: string()
|
|
310806
311677
|
});
|
|
310807
311678
|
/**
|
|
@@ -310819,7 +311690,7 @@ function build$1$1() {
|
|
|
310819
311690
|
* A request from the client to the server, to ask for completion options.
|
|
310820
311691
|
*/
|
|
310821
311692
|
const CompleteRequestSchema$1 = RequestSchema$1.extend({
|
|
310822
|
-
method: literal("completion/complete"),
|
|
311693
|
+
method: literal$1("completion/complete"),
|
|
310823
311694
|
params: CompleteRequestParamsSchema$1
|
|
310824
311695
|
});
|
|
310825
311696
|
/**
|
|
@@ -310850,7 +311721,7 @@ function build$1$1() {
|
|
|
310850
311721
|
* tool parameters, resource URIs, or configuration.
|
|
310851
311722
|
*/
|
|
310852
311723
|
const ListRootsRequestSchema$1 = RequestSchema$1.extend({
|
|
310853
|
-
method: literal("roots/list"),
|
|
311724
|
+
method: literal$1("roots/list"),
|
|
310854
311725
|
params: BaseRequestParamsSchema$1.optional()
|
|
310855
311726
|
});
|
|
310856
311727
|
/**
|
|
@@ -310869,7 +311740,7 @@ function build$1$1() {
|
|
|
310869
311740
|
* tool parameters, resource URIs, or configuration.
|
|
310870
311741
|
*/
|
|
310871
311742
|
const RootsListChangedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
310872
|
-
method: literal("notifications/roots/list_changed"),
|
|
311743
|
+
method: literal$1("notifications/roots/list_changed"),
|
|
310873
311744
|
params: NotificationsParamsSchema$1.optional()
|
|
310874
311745
|
});
|
|
310875
311746
|
/**
|
|
@@ -310925,7 +311796,7 @@ function build$1$1() {
|
|
|
310925
311796
|
* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
|
|
310926
311797
|
*/
|
|
310927
311798
|
const TaskStatusNotificationSchema$1 = NotificationSchema$1.extend({
|
|
310928
|
-
method: literal("notifications/tasks/status"),
|
|
311799
|
+
method: literal$1("notifications/tasks/status"),
|
|
310929
311800
|
params: TaskStatusNotificationParamsSchema$1
|
|
310930
311801
|
});
|
|
310931
311802
|
/**
|
|
@@ -310934,7 +311805,7 @@ function build$1$1() {
|
|
|
310934
311805
|
* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
|
|
310935
311806
|
*/
|
|
310936
311807
|
const GetTaskRequestSchema$1 = RequestSchema$1.extend({
|
|
310937
|
-
method: literal("tasks/get"),
|
|
311808
|
+
method: literal$1("tasks/get"),
|
|
310938
311809
|
params: BaseRequestParamsSchema$1.extend({ taskId: string() })
|
|
310939
311810
|
});
|
|
310940
311811
|
/**
|
|
@@ -310949,7 +311820,7 @@ function build$1$1() {
|
|
|
310949
311820
|
* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
|
|
310950
311821
|
*/
|
|
310951
311822
|
const GetTaskPayloadRequestSchema$1 = RequestSchema$1.extend({
|
|
310952
|
-
method: literal("tasks/result"),
|
|
311823
|
+
method: literal$1("tasks/result"),
|
|
310953
311824
|
params: BaseRequestParamsSchema$1.extend({ taskId: string() })
|
|
310954
311825
|
});
|
|
310955
311826
|
/**
|
|
@@ -310966,7 +311837,7 @@ function build$1$1() {
|
|
|
310966
311837
|
*
|
|
310967
311838
|
* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
|
|
310968
311839
|
*/
|
|
310969
|
-
const ListTasksRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal("tasks/list") });
|
|
311840
|
+
const ListTasksRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal$1("tasks/list") });
|
|
310970
311841
|
/**
|
|
310971
311842
|
* The response to a {@linkcode ListTasksRequest | tasks/list} request.
|
|
310972
311843
|
*
|
|
@@ -310979,7 +311850,7 @@ function build$1$1() {
|
|
|
310979
311850
|
* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
|
|
310980
311851
|
*/
|
|
310981
311852
|
const CancelTaskRequestSchema$1 = RequestSchema$1.extend({
|
|
310982
|
-
method: literal("tasks/cancel"),
|
|
311853
|
+
method: literal$1("tasks/cancel"),
|
|
310983
311854
|
params: BaseRequestParamsSchema$1.extend({ taskId: string() })
|
|
310984
311855
|
});
|
|
310985
311856
|
return {
|
|
@@ -311597,7 +312468,7 @@ function build$2() {
|
|
|
311597
312468
|
progressToken: ProgressTokenSchema$1
|
|
311598
312469
|
});
|
|
311599
312470
|
const ProgressNotificationSchema$1 = NotificationSchema$1.extend({
|
|
311600
|
-
method: literal("notifications/progress"),
|
|
312471
|
+
method: literal$1("notifications/progress"),
|
|
311601
312472
|
params: ProgressNotificationParamsSchema$1
|
|
311602
312473
|
});
|
|
311603
312474
|
const LoggingMessageNotificationParamsSchema$1 = NotificationsParamsSchema$1.extend({
|
|
@@ -311606,7 +312477,7 @@ function build$2() {
|
|
|
311606
312477
|
data: unknown()
|
|
311607
312478
|
});
|
|
311608
312479
|
const LoggingMessageNotificationSchema$1 = NotificationSchema$1.extend({
|
|
311609
|
-
method: literal("notifications/message"),
|
|
312480
|
+
method: literal$1("notifications/message"),
|
|
311610
312481
|
params: LoggingMessageNotificationParamsSchema$1
|
|
311611
312482
|
});
|
|
311612
312483
|
const ResourceContentsSchema$1 = object$1({
|
|
@@ -311641,12 +312512,12 @@ function build$2() {
|
|
|
311641
312512
|
_meta: optional(looseObject({}))
|
|
311642
312513
|
});
|
|
311643
312514
|
const ResourceListChangedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
311644
|
-
method: literal("notifications/resources/list_changed"),
|
|
312515
|
+
method: literal$1("notifications/resources/list_changed"),
|
|
311645
312516
|
params: NotificationsParamsSchema$1.optional()
|
|
311646
312517
|
});
|
|
311647
312518
|
const ResourceUpdatedNotificationParamsSchema$1 = NotificationsParamsSchema$1.extend({ uri: string() });
|
|
311648
312519
|
const ResourceUpdatedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
311649
|
-
method: literal("notifications/resources/updated"),
|
|
312520
|
+
method: literal$1("notifications/resources/updated"),
|
|
311650
312521
|
params: ResourceUpdatedNotificationParamsSchema$1
|
|
311651
312522
|
});
|
|
311652
312523
|
const PromptArgumentSchema$1 = object$1({
|
|
@@ -311662,43 +312533,43 @@ function build$2() {
|
|
|
311662
312533
|
_meta: optional(looseObject({}))
|
|
311663
312534
|
});
|
|
311664
312535
|
const PromptListChangedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
311665
|
-
method: literal("notifications/prompts/list_changed"),
|
|
312536
|
+
method: literal$1("notifications/prompts/list_changed"),
|
|
311666
312537
|
params: NotificationsParamsSchema$1.optional()
|
|
311667
312538
|
});
|
|
311668
312539
|
const TextContentSchema$1 = object$1({
|
|
311669
|
-
type: literal("text"),
|
|
312540
|
+
type: literal$1("text"),
|
|
311670
312541
|
text: string(),
|
|
311671
312542
|
annotations: AnnotationsSchema$1.optional(),
|
|
311672
312543
|
_meta: record(string(), unknown()).optional()
|
|
311673
312544
|
});
|
|
311674
312545
|
const ImageContentSchema$1 = object$1({
|
|
311675
|
-
type: literal("image"),
|
|
312546
|
+
type: literal$1("image"),
|
|
311676
312547
|
data: Base64Schema,
|
|
311677
312548
|
mimeType: string(),
|
|
311678
312549
|
annotations: AnnotationsSchema$1.optional(),
|
|
311679
312550
|
_meta: record(string(), unknown()).optional()
|
|
311680
312551
|
});
|
|
311681
312552
|
const AudioContentSchema$1 = object$1({
|
|
311682
|
-
type: literal("audio"),
|
|
312553
|
+
type: literal$1("audio"),
|
|
311683
312554
|
data: Base64Schema,
|
|
311684
312555
|
mimeType: string(),
|
|
311685
312556
|
annotations: AnnotationsSchema$1.optional(),
|
|
311686
312557
|
_meta: record(string(), unknown()).optional()
|
|
311687
312558
|
});
|
|
311688
312559
|
const ToolUseContentSchema$1 = object$1({
|
|
311689
|
-
type: literal("tool_use"),
|
|
312560
|
+
type: literal$1("tool_use"),
|
|
311690
312561
|
name: string(),
|
|
311691
312562
|
id: string(),
|
|
311692
312563
|
input: record(string(), unknown()),
|
|
311693
312564
|
_meta: record(string(), unknown()).optional()
|
|
311694
312565
|
});
|
|
311695
312566
|
const EmbeddedResourceSchema$1 = object$1({
|
|
311696
|
-
type: literal("resource"),
|
|
312567
|
+
type: literal$1("resource"),
|
|
311697
312568
|
resource: union([TextResourceContentsSchema$1, BlobResourceContentsSchema$1]),
|
|
311698
312569
|
annotations: AnnotationsSchema$1.optional(),
|
|
311699
312570
|
_meta: record(string(), unknown()).optional()
|
|
311700
312571
|
});
|
|
311701
|
-
const ResourceLinkSchema$1 = ResourceSchema$1.extend({ type: literal("resource_link") });
|
|
312572
|
+
const ResourceLinkSchema$1 = ResourceSchema$1.extend({ type: literal$1("resource_link") });
|
|
311702
312573
|
const ContentBlockSchema$1 = union([
|
|
311703
312574
|
TextContentSchema$1,
|
|
311704
312575
|
ImageContentSchema$1,
|
|
@@ -311718,7 +312589,7 @@ function build$2() {
|
|
|
311718
312589
|
openWorldHint: boolean().optional()
|
|
311719
312590
|
});
|
|
311720
312591
|
const ToolListChangedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
311721
|
-
method: literal("notifications/tools/list_changed"),
|
|
312592
|
+
method: literal$1("notifications/tools/list_changed"),
|
|
311722
312593
|
params: NotificationsParamsSchema$1.optional()
|
|
311723
312594
|
});
|
|
311724
312595
|
const ModelHintSchema$1 = object$1({ name: string().optional() });
|
|
@@ -311734,13 +312605,13 @@ function build$2() {
|
|
|
311734
312605
|
"none"
|
|
311735
312606
|
]).optional() });
|
|
311736
312607
|
const BooleanSchemaSchema$1 = object$1({
|
|
311737
|
-
type: literal("boolean"),
|
|
312608
|
+
type: literal$1("boolean"),
|
|
311738
312609
|
title: string().optional(),
|
|
311739
312610
|
description: string().optional(),
|
|
311740
312611
|
default: boolean().optional()
|
|
311741
312612
|
});
|
|
311742
312613
|
const StringSchemaSchema$1 = object$1({
|
|
311743
|
-
type: literal("string"),
|
|
312614
|
+
type: literal$1("string"),
|
|
311744
312615
|
title: string().optional(),
|
|
311745
312616
|
description: string().optional(),
|
|
311746
312617
|
minLength: number$1().optional(),
|
|
@@ -311762,14 +312633,14 @@ function build$2() {
|
|
|
311762
312633
|
default: number$1().optional()
|
|
311763
312634
|
});
|
|
311764
312635
|
const UntitledSingleSelectEnumSchemaSchema$1 = object$1({
|
|
311765
|
-
type: literal("string"),
|
|
312636
|
+
type: literal$1("string"),
|
|
311766
312637
|
title: string().optional(),
|
|
311767
312638
|
description: string().optional(),
|
|
311768
312639
|
enum: array(string()),
|
|
311769
312640
|
default: string().optional()
|
|
311770
312641
|
});
|
|
311771
312642
|
const TitledSingleSelectEnumSchemaSchema$1 = object$1({
|
|
311772
|
-
type: literal("string"),
|
|
312643
|
+
type: literal$1("string"),
|
|
311773
312644
|
title: string().optional(),
|
|
311774
312645
|
description: string().optional(),
|
|
311775
312646
|
oneOf: array(object$1({
|
|
@@ -311779,7 +312650,7 @@ function build$2() {
|
|
|
311779
312650
|
default: string().optional()
|
|
311780
312651
|
});
|
|
311781
312652
|
const LegacyTitledEnumSchemaSchema$1 = object$1({
|
|
311782
|
-
type: literal("string"),
|
|
312653
|
+
type: literal$1("string"),
|
|
311783
312654
|
title: string().optional(),
|
|
311784
312655
|
description: string().optional(),
|
|
311785
312656
|
enum: array(string()),
|
|
@@ -311788,19 +312659,19 @@ function build$2() {
|
|
|
311788
312659
|
});
|
|
311789
312660
|
const SingleSelectEnumSchemaSchema$1 = union([UntitledSingleSelectEnumSchemaSchema$1, TitledSingleSelectEnumSchemaSchema$1]);
|
|
311790
312661
|
const UntitledMultiSelectEnumSchemaSchema$1 = object$1({
|
|
311791
|
-
type: literal("array"),
|
|
312662
|
+
type: literal$1("array"),
|
|
311792
312663
|
title: string().optional(),
|
|
311793
312664
|
description: string().optional(),
|
|
311794
312665
|
minItems: number$1().optional(),
|
|
311795
312666
|
maxItems: number$1().optional(),
|
|
311796
312667
|
items: object$1({
|
|
311797
|
-
type: literal("string"),
|
|
312668
|
+
type: literal$1("string"),
|
|
311798
312669
|
enum: array(string())
|
|
311799
312670
|
}),
|
|
311800
312671
|
default: array(string()).optional()
|
|
311801
312672
|
});
|
|
311802
312673
|
const TitledMultiSelectEnumSchemaSchema$1 = object$1({
|
|
311803
|
-
type: literal("array"),
|
|
312674
|
+
type: literal$1("array"),
|
|
311804
312675
|
title: string().optional(),
|
|
311805
312676
|
description: string().optional(),
|
|
311806
312677
|
minItems: number$1().optional(),
|
|
@@ -311824,20 +312695,20 @@ function build$2() {
|
|
|
311824
312695
|
NumberSchemaSchema$1
|
|
311825
312696
|
]);
|
|
311826
312697
|
const ElicitRequestFormParamsSchema$1 = TaskAugmentedRequestParamsSchema$1.extend({
|
|
311827
|
-
mode: literal("form").optional(),
|
|
312698
|
+
mode: literal$1("form").optional(),
|
|
311828
312699
|
message: string(),
|
|
311829
312700
|
requestedSchema: object$1({
|
|
311830
|
-
type: literal("object"),
|
|
312701
|
+
type: literal$1("object"),
|
|
311831
312702
|
properties: record(string(), PrimitiveSchemaDefinitionSchema$1),
|
|
311832
312703
|
required: array(string()).optional()
|
|
311833
312704
|
}).catchall(unknown())
|
|
311834
312705
|
});
|
|
311835
312706
|
const ResourceTemplateReferenceSchema$1 = object$1({
|
|
311836
|
-
type: literal("ref/resource"),
|
|
312707
|
+
type: literal$1("ref/resource"),
|
|
311837
312708
|
uri: string()
|
|
311838
312709
|
});
|
|
311839
312710
|
const PromptReferenceSchema$1 = object$1({
|
|
311840
|
-
type: literal("ref/prompt"),
|
|
312711
|
+
type: literal$1("ref/prompt"),
|
|
311841
312712
|
name: string()
|
|
311842
312713
|
});
|
|
311843
312714
|
const RootSchema$1 = object$1({
|
|
@@ -311888,7 +312759,7 @@ function build$2() {
|
|
|
311888
312759
|
description: string().optional(),
|
|
311889
312760
|
inputSchema: looseObject({
|
|
311890
312761
|
$schema: string().optional(),
|
|
311891
|
-
type: literal("object")
|
|
312762
|
+
type: literal$1("object")
|
|
311892
312763
|
}),
|
|
311893
312764
|
outputSchema: looseObject({ $schema: string().optional() }).optional(),
|
|
311894
312765
|
annotations: ToolAnnotationsSchema$1.optional(),
|
|
@@ -311896,7 +312767,7 @@ function build$2() {
|
|
|
311896
312767
|
});
|
|
311897
312768
|
/** 2026-era ToolResultContent (anchor-exact: `structuredContent?: unknown`). */
|
|
311898
312769
|
const ToolResultContentSchema$1 = object$1({
|
|
311899
|
-
type: literal("tool_result"),
|
|
312770
|
+
type: literal$1("tool_result"),
|
|
311900
312771
|
toolUseId: string(),
|
|
311901
312772
|
content: array(ContentBlockSchema$1),
|
|
311902
312773
|
structuredContent: unknown().optional(),
|
|
@@ -312009,7 +312880,7 @@ function build$2() {
|
|
|
312009
312880
|
});
|
|
312010
312881
|
/** 2026-era embedded sampling request (de-JSON-RPC'd). */
|
|
312011
312882
|
const CreateMessageRequestSchema$1 = object$1({
|
|
312012
|
-
method: literal("sampling/createMessage"),
|
|
312883
|
+
method: literal$1("sampling/createMessage"),
|
|
312013
312884
|
params: CreateMessageRequestParamsSchema$1
|
|
312014
312885
|
});
|
|
312015
312886
|
/**
|
|
@@ -312018,7 +312889,7 @@ function build$2() {
|
|
|
312018
312889
|
* the anchor declares a bare optional `_meta` on `params`.
|
|
312019
312890
|
*/
|
|
312020
312891
|
const ListRootsRequestSchema$1 = object$1({
|
|
312021
|
-
method: literal("roots/list"),
|
|
312892
|
+
method: literal$1("roots/list"),
|
|
312022
312893
|
params: object$1({ _meta: record(string(), unknown()).optional() }).optional()
|
|
312023
312894
|
});
|
|
312024
312895
|
/** 2026-era embedded sampling response (anchor-exact: extends the forked SamplingMessage). */
|
|
@@ -312050,7 +312921,7 @@ function build$2() {
|
|
|
312050
312921
|
* frozen 2025-11-25 revision.
|
|
312051
312922
|
*/
|
|
312052
312923
|
const ElicitRequestURLParamsSchema$1 = object$1({
|
|
312053
|
-
mode: literal("url"),
|
|
312924
|
+
mode: literal$1("url"),
|
|
312054
312925
|
message: string(),
|
|
312055
312926
|
url: string().url()
|
|
312056
312927
|
});
|
|
@@ -312058,7 +312929,7 @@ function build$2() {
|
|
|
312058
312929
|
const ElicitRequestParamsSchema$1 = union([ElicitRequestFormParamsSchema$1, ElicitRequestURLParamsSchema$1]);
|
|
312059
312930
|
/** 2026-era embedded elicitation request (de-JSON-RPC'd; see the URL-mode fork above). */
|
|
312060
312931
|
const ElicitRequestSchema$1 = object$1({
|
|
312061
|
-
method: literal("elicitation/create"),
|
|
312932
|
+
method: literal$1("elicitation/create"),
|
|
312062
312933
|
params: ElicitRequestParamsSchema$1
|
|
312063
312934
|
});
|
|
312064
312935
|
/** A single embedded input request (one of the three demoted server→client requests). */
|
|
@@ -312100,7 +312971,7 @@ function build$2() {
|
|
|
312100
312971
|
const DispatchRequestMetaSchema = looseObject({ progressToken: ProgressTokenSchema$1.optional() });
|
|
312101
312972
|
function wireRequest(method, paramsShape) {
|
|
312102
312973
|
return object$1({
|
|
312103
|
-
method: literal(method),
|
|
312974
|
+
method: literal$1(method),
|
|
312104
312975
|
params: object$1({
|
|
312105
312976
|
_meta: RequestMetaEnvelopeSchema,
|
|
312106
312977
|
...paramsShape
|
|
@@ -312109,7 +312980,7 @@ function build$2() {
|
|
|
312109
312980
|
}
|
|
312110
312981
|
function dispatchRequest(method, paramsShape) {
|
|
312111
312982
|
return object$1({
|
|
312112
|
-
method: literal(method),
|
|
312983
|
+
method: literal$1(method),
|
|
312113
312984
|
params: object$1({
|
|
312114
312985
|
_meta: DispatchRequestMetaSchema.optional(),
|
|
312115
312986
|
...paramsShape
|
|
@@ -312257,7 +313128,7 @@ function build$2() {
|
|
|
312257
313128
|
const NotificationMetaSchema = looseObject({ "io.modelcontextprotocol/subscriptionId": RequestIdSchema$1.optional() });
|
|
312258
313129
|
/** Anchor SubscriptionsAcknowledgedNotification (2026-only). */
|
|
312259
313130
|
const SubscriptionsAcknowledgedNotificationSchema$1 = object$1({
|
|
312260
|
-
method: literal("notifications/subscriptions/acknowledged"),
|
|
313131
|
+
method: literal$1("notifications/subscriptions/acknowledged"),
|
|
312261
313132
|
params: object$1({
|
|
312262
313133
|
_meta: NotificationMetaSchema.optional(),
|
|
312263
313134
|
notifications: SubscriptionFilterSchema$1
|
|
@@ -312277,7 +313148,7 @@ function build$2() {
|
|
|
312277
313148
|
});
|
|
312278
313149
|
/** 2026-era `notifications/cancelled` (see the params fork above). */
|
|
312279
313150
|
const CancelledNotificationSchema$1 = object$1({
|
|
312280
|
-
method: literal("notifications/cancelled"),
|
|
313151
|
+
method: literal$1("notifications/cancelled"),
|
|
312281
313152
|
params: CancelledNotificationParamsSchema$1
|
|
312282
313153
|
});
|
|
312283
313154
|
const notificationSchemas2026 = {
|
|
@@ -312291,7 +313162,7 @@ function build$2() {
|
|
|
312291
313162
|
"notifications/subscriptions/acknowledged": SubscriptionsAcknowledgedNotificationSchema$1
|
|
312292
313163
|
};
|
|
312293
313164
|
const wireResultResponse = (result) => object$1({
|
|
312294
|
-
jsonrpc: literal("2.0"),
|
|
313165
|
+
jsonrpc: literal$1("2.0"),
|
|
312295
313166
|
id: union([string(), number$1().int()]),
|
|
312296
313167
|
result
|
|
312297
313168
|
}).strict();
|
|
@@ -312574,15 +313445,15 @@ function inputSchemaMaps$1() {
|
|
|
312574
313445
|
maps$2 = {
|
|
312575
313446
|
request: {
|
|
312576
313447
|
"elicitation/create": object$1({
|
|
312577
|
-
method: literal("elicitation/create"),
|
|
313448
|
+
method: literal$1("elicitation/create"),
|
|
312578
313449
|
params: s.ElicitRequestParamsSchema
|
|
312579
313450
|
}),
|
|
312580
313451
|
"sampling/createMessage": object$1({
|
|
312581
|
-
method: literal("sampling/createMessage"),
|
|
313452
|
+
method: literal$1("sampling/createMessage"),
|
|
312582
313453
|
params: s.CreateMessageRequestParamsSchema
|
|
312583
313454
|
}),
|
|
312584
313455
|
"roots/list": object$1({
|
|
312585
|
-
method: literal("roots/list"),
|
|
313456
|
+
method: literal$1("roots/list"),
|
|
312586
313457
|
params: looseObject({}).optional()
|
|
312587
313458
|
})
|
|
312588
313459
|
},
|
|
@@ -564034,7 +564905,7 @@ function build$1() {
|
|
|
564034
564905
|
* A client MUST NOT attempt to cancel its {@linkcode InitializeRequest | initialize} request.
|
|
564035
564906
|
*/
|
|
564036
564907
|
const CancelledNotificationSchema$1 = NotificationSchema$1.extend({
|
|
564037
|
-
method: literal("notifications/cancelled"),
|
|
564908
|
+
method: literal$1("notifications/cancelled"),
|
|
564038
564909
|
params: CancelledNotificationParamsSchema$1
|
|
564039
564910
|
});
|
|
564040
564911
|
/**
|
|
@@ -564122,7 +564993,7 @@ function build$1() {
|
|
|
564122
564993
|
* This request is sent from the client to the server when it first connects, asking it to begin initialization.
|
|
564123
564994
|
*/
|
|
564124
564995
|
const InitializeRequestSchema$1 = RequestSchema$1.extend({
|
|
564125
|
-
method: literal("initialize"),
|
|
564996
|
+
method: literal$1("initialize"),
|
|
564126
564997
|
params: InitializeRequestParamsSchema$1
|
|
564127
564998
|
});
|
|
564128
564999
|
/**
|
|
@@ -564154,14 +565025,14 @@ function build$1() {
|
|
|
564154
565025
|
* This notification is sent from the client to the server after initialization has finished.
|
|
564155
565026
|
*/
|
|
564156
565027
|
const InitializedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
564157
|
-
method: literal("notifications/initialized"),
|
|
565028
|
+
method: literal$1("notifications/initialized"),
|
|
564158
565029
|
params: NotificationsParamsSchema$1.optional()
|
|
564159
565030
|
});
|
|
564160
565031
|
/**
|
|
564161
565032
|
* A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else may be disconnected.
|
|
564162
565033
|
*/
|
|
564163
565034
|
const PingRequestSchema$1 = RequestSchema$1.extend({
|
|
564164
|
-
method: literal("ping"),
|
|
565035
|
+
method: literal$1("ping"),
|
|
564165
565036
|
params: BaseRequestParamsSchema$1.optional()
|
|
564166
565037
|
});
|
|
564167
565038
|
const ProgressSchema$1 = object$1({
|
|
@@ -564180,7 +565051,7 @@ function build$1() {
|
|
|
564180
565051
|
* @category notifications/progress
|
|
564181
565052
|
*/
|
|
564182
565053
|
const ProgressNotificationSchema$1 = NotificationSchema$1.extend({
|
|
564183
|
-
method: literal("notifications/progress"),
|
|
565054
|
+
method: literal$1("notifications/progress"),
|
|
564184
565055
|
params: ProgressNotificationParamsSchema$1
|
|
564185
565056
|
});
|
|
564186
565057
|
const PaginatedRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({ cursor: CursorSchema$1.optional() });
|
|
@@ -564249,7 +565120,7 @@ function build$1() {
|
|
|
564249
565120
|
/**
|
|
564250
565121
|
* Sent from the client to request a list of resources the server has.
|
|
564251
565122
|
*/
|
|
564252
|
-
const ListResourcesRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal("resources/list") });
|
|
565123
|
+
const ListResourcesRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal$1("resources/list") });
|
|
564253
565124
|
/**
|
|
564254
565125
|
* The server's response to a {@linkcode ListResourcesRequest | resources/list} request from the client.
|
|
564255
565126
|
*/
|
|
@@ -564257,7 +565128,7 @@ function build$1() {
|
|
|
564257
565128
|
/**
|
|
564258
565129
|
* Sent from the client to request a list of resource templates the server has.
|
|
564259
565130
|
*/
|
|
564260
|
-
const ListResourceTemplatesRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal("resources/templates/list") });
|
|
565131
|
+
const ListResourceTemplatesRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal$1("resources/templates/list") });
|
|
564261
565132
|
/**
|
|
564262
565133
|
* The server's response to a {@linkcode ListResourceTemplatesRequest | resources/templates/list} request from the client.
|
|
564263
565134
|
*/
|
|
@@ -564271,7 +565142,7 @@ function build$1() {
|
|
|
564271
565142
|
* Sent from the client to the server, to read a specific resource URI.
|
|
564272
565143
|
*/
|
|
564273
565144
|
const ReadResourceRequestSchema$1 = RequestSchema$1.extend({
|
|
564274
|
-
method: literal("resources/read"),
|
|
565145
|
+
method: literal$1("resources/read"),
|
|
564275
565146
|
params: ReadResourceRequestParamsSchema$1
|
|
564276
565147
|
});
|
|
564277
565148
|
/**
|
|
@@ -564282,7 +565153,7 @@ function build$1() {
|
|
|
564282
565153
|
* An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This may be issued by servers without any previous subscription from the client.
|
|
564283
565154
|
*/
|
|
564284
565155
|
const ResourceListChangedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
564285
|
-
method: literal("notifications/resources/list_changed"),
|
|
565156
|
+
method: literal$1("notifications/resources/list_changed"),
|
|
564286
565157
|
params: NotificationsParamsSchema$1.optional()
|
|
564287
565158
|
});
|
|
564288
565159
|
const SubscribeRequestParamsSchema$1 = ResourceRequestParamsSchema$1;
|
|
@@ -564290,7 +565161,7 @@ function build$1() {
|
|
|
564290
565161
|
* Sent from the client to request `resources/updated` notifications from the server whenever a particular resource changes.
|
|
564291
565162
|
*/
|
|
564292
565163
|
const SubscribeRequestSchema$1 = RequestSchema$1.extend({
|
|
564293
|
-
method: literal("resources/subscribe"),
|
|
565164
|
+
method: literal$1("resources/subscribe"),
|
|
564294
565165
|
params: SubscribeRequestParamsSchema$1
|
|
564295
565166
|
});
|
|
564296
565167
|
const UnsubscribeRequestParamsSchema$1 = ResourceRequestParamsSchema$1;
|
|
@@ -564298,7 +565169,7 @@ function build$1() {
|
|
|
564298
565169
|
* Sent from the client to request cancellation of {@linkcode ResourceUpdatedNotification | resources/updated} notifications from the server. This should follow a previous {@linkcode SubscribeRequest | resources/subscribe} request.
|
|
564299
565170
|
*/
|
|
564300
565171
|
const UnsubscribeRequestSchema$1 = RequestSchema$1.extend({
|
|
564301
|
-
method: literal("resources/unsubscribe"),
|
|
565172
|
+
method: literal$1("resources/unsubscribe"),
|
|
564302
565173
|
params: UnsubscribeRequestParamsSchema$1
|
|
564303
565174
|
});
|
|
564304
565175
|
/**
|
|
@@ -564309,7 +565180,7 @@ function build$1() {
|
|
|
564309
565180
|
* A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a {@linkcode SubscribeRequest | resources/subscribe} request.
|
|
564310
565181
|
*/
|
|
564311
565182
|
const ResourceUpdatedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
564312
|
-
method: literal("notifications/resources/updated"),
|
|
565183
|
+
method: literal$1("notifications/resources/updated"),
|
|
564313
565184
|
params: ResourceUpdatedNotificationParamsSchema$1
|
|
564314
565185
|
});
|
|
564315
565186
|
/**
|
|
@@ -564333,7 +565204,7 @@ function build$1() {
|
|
|
564333
565204
|
/**
|
|
564334
565205
|
* Sent from the client to request a list of prompts and prompt templates the server has.
|
|
564335
565206
|
*/
|
|
564336
|
-
const ListPromptsRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal("prompts/list") });
|
|
565207
|
+
const ListPromptsRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal$1("prompts/list") });
|
|
564337
565208
|
/**
|
|
564338
565209
|
* The server's response to a {@linkcode ListPromptsRequest | prompts/list} request from the client.
|
|
564339
565210
|
*/
|
|
@@ -564349,14 +565220,14 @@ function build$1() {
|
|
|
564349
565220
|
* Used by the client to get a prompt provided by the server.
|
|
564350
565221
|
*/
|
|
564351
565222
|
const GetPromptRequestSchema$1 = RequestSchema$1.extend({
|
|
564352
|
-
method: literal("prompts/get"),
|
|
565223
|
+
method: literal$1("prompts/get"),
|
|
564353
565224
|
params: GetPromptRequestParamsSchema$1
|
|
564354
565225
|
});
|
|
564355
565226
|
/**
|
|
564356
565227
|
* Text provided to or from an LLM.
|
|
564357
565228
|
*/
|
|
564358
565229
|
const TextContentSchema$1 = object$1({
|
|
564359
|
-
type: literal("text"),
|
|
565230
|
+
type: literal$1("text"),
|
|
564360
565231
|
text: string(),
|
|
564361
565232
|
annotations: AnnotationsSchema$1.optional(),
|
|
564362
565233
|
_meta: record(string(), unknown()).optional()
|
|
@@ -564365,7 +565236,7 @@ function build$1() {
|
|
|
564365
565236
|
* An image provided to or from an LLM.
|
|
564366
565237
|
*/
|
|
564367
565238
|
const ImageContentSchema$1 = object$1({
|
|
564368
|
-
type: literal("image"),
|
|
565239
|
+
type: literal$1("image"),
|
|
564369
565240
|
data: Base64Schema,
|
|
564370
565241
|
mimeType: string(),
|
|
564371
565242
|
annotations: AnnotationsSchema$1.optional(),
|
|
@@ -564375,7 +565246,7 @@ function build$1() {
|
|
|
564375
565246
|
* Audio content provided to or from an LLM.
|
|
564376
565247
|
*/
|
|
564377
565248
|
const AudioContentSchema$1 = object$1({
|
|
564378
|
-
type: literal("audio"),
|
|
565249
|
+
type: literal$1("audio"),
|
|
564379
565250
|
data: Base64Schema,
|
|
564380
565251
|
mimeType: string(),
|
|
564381
565252
|
annotations: AnnotationsSchema$1.optional(),
|
|
@@ -564390,7 +565261,7 @@ function build$1() {
|
|
|
564390
565261
|
* provider APIs directly.
|
|
564391
565262
|
*/
|
|
564392
565263
|
const ToolUseContentSchema$1 = object$1({
|
|
564393
|
-
type: literal("tool_use"),
|
|
565264
|
+
type: literal$1("tool_use"),
|
|
564394
565265
|
name: string(),
|
|
564395
565266
|
id: string(),
|
|
564396
565267
|
input: record(string(), unknown()),
|
|
@@ -564400,7 +565271,7 @@ function build$1() {
|
|
|
564400
565271
|
* The contents of a resource, embedded into a prompt or tool call result.
|
|
564401
565272
|
*/
|
|
564402
565273
|
const EmbeddedResourceSchema$1 = object$1({
|
|
564403
|
-
type: literal("resource"),
|
|
565274
|
+
type: literal$1("resource"),
|
|
564404
565275
|
resource: union([TextResourceContentsSchema$1, BlobResourceContentsSchema$1]),
|
|
564405
565276
|
annotations: AnnotationsSchema$1.optional(),
|
|
564406
565277
|
_meta: record(string(), unknown()).optional()
|
|
@@ -564410,7 +565281,7 @@ function build$1() {
|
|
|
564410
565281
|
*
|
|
564411
565282
|
* Note: resource links returned by tools are not guaranteed to appear in the results of {@linkcode ListResourcesRequest | resources/list} requests.
|
|
564412
565283
|
*/
|
|
564413
|
-
const ResourceLinkSchema$1 = ResourceSchema$1.extend({ type: literal("resource_link") });
|
|
565284
|
+
const ResourceLinkSchema$1 = ResourceSchema$1.extend({ type: literal$1("resource_link") });
|
|
564414
565285
|
/**
|
|
564415
565286
|
* A content block that can be used in prompts and tool results.
|
|
564416
565287
|
*/
|
|
@@ -564439,7 +565310,7 @@ function build$1() {
|
|
|
564439
565310
|
* An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This may be issued by servers without any previous subscription from the client.
|
|
564440
565311
|
*/
|
|
564441
565312
|
const PromptListChangedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
564442
|
-
method: literal("notifications/prompts/list_changed"),
|
|
565313
|
+
method: literal$1("notifications/prompts/list_changed"),
|
|
564443
565314
|
params: NotificationsParamsSchema$1.optional()
|
|
564444
565315
|
});
|
|
564445
565316
|
/**
|
|
@@ -564475,12 +565346,12 @@ function build$1() {
|
|
|
564475
565346
|
...IconsSchema$1.shape,
|
|
564476
565347
|
description: string().optional(),
|
|
564477
565348
|
inputSchema: object$1({
|
|
564478
|
-
type: literal("object"),
|
|
565349
|
+
type: literal$1("object"),
|
|
564479
565350
|
properties: record(string(), JSONValueSchema$1).optional(),
|
|
564480
565351
|
required: array(string()).optional()
|
|
564481
565352
|
}).catchall(unknown()),
|
|
564482
565353
|
outputSchema: object$1({
|
|
564483
|
-
type: literal("object"),
|
|
565354
|
+
type: literal$1("object"),
|
|
564484
565355
|
properties: record(string(), JSONValueSchema$1).optional(),
|
|
564485
565356
|
required: array(string()).optional()
|
|
564486
565357
|
}).catchall(unknown()).optional(),
|
|
@@ -564491,7 +565362,7 @@ function build$1() {
|
|
|
564491
565362
|
/**
|
|
564492
565363
|
* Sent from the client to request a list of tools the server has.
|
|
564493
565364
|
*/
|
|
564494
|
-
const ListToolsRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal("tools/list") });
|
|
565365
|
+
const ListToolsRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal$1("tools/list") });
|
|
564495
565366
|
/**
|
|
564496
565367
|
* The server's response to a {@linkcode ListToolsRequest | tools/list} request from the client.
|
|
564497
565368
|
*/
|
|
@@ -564515,14 +565386,14 @@ function build$1() {
|
|
|
564515
565386
|
* Used by the client to invoke a tool provided by the server.
|
|
564516
565387
|
*/
|
|
564517
565388
|
const CallToolRequestSchema$1 = RequestSchema$1.extend({
|
|
564518
|
-
method: literal("tools/call"),
|
|
565389
|
+
method: literal$1("tools/call"),
|
|
564519
565390
|
params: CallToolRequestParamsSchema$1
|
|
564520
565391
|
});
|
|
564521
565392
|
/**
|
|
564522
565393
|
* An optional notification from the server to the client, informing it that the list of tools it offers has changed. This may be issued by servers without any previous subscription from the client.
|
|
564523
565394
|
*/
|
|
564524
565395
|
const ToolListChangedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
564525
|
-
method: literal("notifications/tools/list_changed"),
|
|
565396
|
+
method: literal$1("notifications/tools/list_changed"),
|
|
564526
565397
|
params: NotificationsParamsSchema$1.optional()
|
|
564527
565398
|
});
|
|
564528
565399
|
/**
|
|
@@ -564558,7 +565429,7 @@ function build$1() {
|
|
|
564558
565429
|
* (STDIO servers) or OpenTelemetry.
|
|
564559
565430
|
*/
|
|
564560
565431
|
const SetLevelRequestSchema$1 = RequestSchema$1.extend({
|
|
564561
|
-
method: literal("logging/setLevel"),
|
|
565432
|
+
method: literal$1("logging/setLevel"),
|
|
564562
565433
|
params: SetLevelRequestParamsSchema$1
|
|
564563
565434
|
});
|
|
564564
565435
|
/**
|
|
@@ -564581,7 +565452,7 @@ function build$1() {
|
|
|
564581
565452
|
* (STDIO servers) or OpenTelemetry.
|
|
564582
565453
|
*/
|
|
564583
565454
|
const LoggingMessageNotificationSchema$1 = NotificationSchema$1.extend({
|
|
564584
|
-
method: literal("notifications/message"),
|
|
565455
|
+
method: literal$1("notifications/message"),
|
|
564585
565456
|
params: LoggingMessageNotificationParamsSchema$1
|
|
564586
565457
|
});
|
|
564587
565458
|
/**
|
|
@@ -564626,7 +565497,7 @@ function build$1() {
|
|
|
564626
565497
|
* provider APIs directly.
|
|
564627
565498
|
*/
|
|
564628
565499
|
const ToolResultContentSchema$1 = object$1({
|
|
564629
|
-
type: literal("tool_result"),
|
|
565500
|
+
type: literal$1("tool_result"),
|
|
564630
565501
|
toolUseId: string().describe("The unique identifier for the corresponding tool call."),
|
|
564631
565502
|
content: array(ContentBlockSchema$1),
|
|
564632
565503
|
structuredContent: object$1({}).loose().optional(),
|
|
@@ -564704,7 +565575,7 @@ function build$1() {
|
|
|
564704
565575
|
* provider APIs directly.
|
|
564705
565576
|
*/
|
|
564706
565577
|
const CreateMessageRequestSchema$1 = RequestSchema$1.extend({
|
|
564707
|
-
method: literal("sampling/createMessage"),
|
|
565578
|
+
method: literal$1("sampling/createMessage"),
|
|
564708
565579
|
params: CreateMessageRequestParamsSchema$1
|
|
564709
565580
|
});
|
|
564710
565581
|
/**
|
|
@@ -564749,7 +565620,7 @@ function build$1() {
|
|
|
564749
565620
|
* Primitive schema definition for boolean fields.
|
|
564750
565621
|
*/
|
|
564751
565622
|
const BooleanSchemaSchema$1 = object$1({
|
|
564752
|
-
type: literal("boolean"),
|
|
565623
|
+
type: literal$1("boolean"),
|
|
564753
565624
|
title: string().optional(),
|
|
564754
565625
|
description: string().optional(),
|
|
564755
565626
|
default: boolean().optional()
|
|
@@ -564758,7 +565629,7 @@ function build$1() {
|
|
|
564758
565629
|
* Primitive schema definition for string fields.
|
|
564759
565630
|
*/
|
|
564760
565631
|
const StringSchemaSchema$1 = object$1({
|
|
564761
|
-
type: literal("string"),
|
|
565632
|
+
type: literal$1("string"),
|
|
564762
565633
|
title: string().optional(),
|
|
564763
565634
|
description: string().optional(),
|
|
564764
565635
|
minLength: number$1().optional(),
|
|
@@ -564786,7 +565657,7 @@ function build$1() {
|
|
|
564786
565657
|
* Schema for single-selection enumeration without display titles for options.
|
|
564787
565658
|
*/
|
|
564788
565659
|
const UntitledSingleSelectEnumSchemaSchema$1 = object$1({
|
|
564789
|
-
type: literal("string"),
|
|
565660
|
+
type: literal$1("string"),
|
|
564790
565661
|
title: string().optional(),
|
|
564791
565662
|
description: string().optional(),
|
|
564792
565663
|
enum: array(string()),
|
|
@@ -564796,7 +565667,7 @@ function build$1() {
|
|
|
564796
565667
|
* Schema for single-selection enumeration with display titles for each option.
|
|
564797
565668
|
*/
|
|
564798
565669
|
const TitledSingleSelectEnumSchemaSchema$1 = object$1({
|
|
564799
|
-
type: literal("string"),
|
|
565670
|
+
type: literal$1("string"),
|
|
564800
565671
|
title: string().optional(),
|
|
564801
565672
|
description: string().optional(),
|
|
564802
565673
|
oneOf: array(object$1({
|
|
@@ -564810,7 +565681,7 @@ function build$1() {
|
|
|
564810
565681
|
* This interface will be removed in a future version.
|
|
564811
565682
|
*/
|
|
564812
565683
|
const LegacyTitledEnumSchemaSchema$1 = object$1({
|
|
564813
|
-
type: literal("string"),
|
|
565684
|
+
type: literal$1("string"),
|
|
564814
565685
|
title: string().optional(),
|
|
564815
565686
|
description: string().optional(),
|
|
564816
565687
|
enum: array(string()),
|
|
@@ -564822,13 +565693,13 @@ function build$1() {
|
|
|
564822
565693
|
* Schema for multiple-selection enumeration without display titles for options.
|
|
564823
565694
|
*/
|
|
564824
565695
|
const UntitledMultiSelectEnumSchemaSchema$1 = object$1({
|
|
564825
|
-
type: literal("array"),
|
|
565696
|
+
type: literal$1("array"),
|
|
564826
565697
|
title: string().optional(),
|
|
564827
565698
|
description: string().optional(),
|
|
564828
565699
|
minItems: number$1().optional(),
|
|
564829
565700
|
maxItems: number$1().optional(),
|
|
564830
565701
|
items: object$1({
|
|
564831
|
-
type: literal("string"),
|
|
565702
|
+
type: literal$1("string"),
|
|
564832
565703
|
enum: array(string())
|
|
564833
565704
|
}),
|
|
564834
565705
|
default: array(string()).optional()
|
|
@@ -564837,7 +565708,7 @@ function build$1() {
|
|
|
564837
565708
|
* Schema for multiple-selection enumeration with display titles for each option.
|
|
564838
565709
|
*/
|
|
564839
565710
|
const TitledMultiSelectEnumSchemaSchema$1 = object$1({
|
|
564840
|
-
type: literal("array"),
|
|
565711
|
+
type: literal$1("array"),
|
|
564841
565712
|
title: string().optional(),
|
|
564842
565713
|
description: string().optional(),
|
|
564843
565714
|
minItems: number$1().optional(),
|
|
@@ -564873,10 +565744,10 @@ function build$1() {
|
|
|
564873
565744
|
* Parameters for an `elicitation/create` request for form-based elicitation.
|
|
564874
565745
|
*/
|
|
564875
565746
|
const ElicitRequestFormParamsSchema$1 = TaskAugmentedRequestParamsSchema$1.extend({
|
|
564876
|
-
mode: literal("form").optional(),
|
|
565747
|
+
mode: literal$1("form").optional(),
|
|
564877
565748
|
message: string(),
|
|
564878
565749
|
requestedSchema: object$1({
|
|
564879
|
-
type: literal("object"),
|
|
565750
|
+
type: literal$1("object"),
|
|
564880
565751
|
properties: record(string(), PrimitiveSchemaDefinitionSchema$1),
|
|
564881
565752
|
required: array(string()).optional()
|
|
564882
565753
|
}).catchall(unknown())
|
|
@@ -564885,7 +565756,7 @@ function build$1() {
|
|
|
564885
565756
|
* Parameters for an {@linkcode ElicitRequest | elicitation/create} request for URL-based elicitation.
|
|
564886
565757
|
*/
|
|
564887
565758
|
const ElicitRequestURLParamsSchema$1 = TaskAugmentedRequestParamsSchema$1.extend({
|
|
564888
|
-
mode: literal("url"),
|
|
565759
|
+
mode: literal$1("url"),
|
|
564889
565760
|
message: string(),
|
|
564890
565761
|
elicitationId: string(),
|
|
564891
565762
|
url: string().url()
|
|
@@ -564900,7 +565771,7 @@ function build$1() {
|
|
|
564900
565771
|
* or navigate to a URL (URL mode).
|
|
564901
565772
|
*/
|
|
564902
565773
|
const ElicitRequestSchema$1 = RequestSchema$1.extend({
|
|
564903
|
-
method: literal("elicitation/create"),
|
|
565774
|
+
method: literal$1("elicitation/create"),
|
|
564904
565775
|
params: ElicitRequestParamsSchema$1
|
|
564905
565776
|
});
|
|
564906
565777
|
/**
|
|
@@ -564915,7 +565786,7 @@ function build$1() {
|
|
|
564915
565786
|
* @category notifications/elicitation/complete
|
|
564916
565787
|
*/
|
|
564917
565788
|
const ElicitationCompleteNotificationSchema$1 = NotificationSchema$1.extend({
|
|
564918
|
-
method: literal("notifications/elicitation/complete"),
|
|
565789
|
+
method: literal$1("notifications/elicitation/complete"),
|
|
564919
565790
|
params: ElicitationCompleteNotificationParamsSchema$1
|
|
564920
565791
|
});
|
|
564921
565792
|
/**
|
|
@@ -564938,14 +565809,14 @@ function build$1() {
|
|
|
564938
565809
|
* A reference to a resource or resource template definition.
|
|
564939
565810
|
*/
|
|
564940
565811
|
const ResourceTemplateReferenceSchema$1 = object$1({
|
|
564941
|
-
type: literal("ref/resource"),
|
|
565812
|
+
type: literal$1("ref/resource"),
|
|
564942
565813
|
uri: string()
|
|
564943
565814
|
});
|
|
564944
565815
|
/**
|
|
564945
565816
|
* Identifies a prompt.
|
|
564946
565817
|
*/
|
|
564947
565818
|
const PromptReferenceSchema$1 = object$1({
|
|
564948
|
-
type: literal("ref/prompt"),
|
|
565819
|
+
type: literal$1("ref/prompt"),
|
|
564949
565820
|
name: string()
|
|
564950
565821
|
});
|
|
564951
565822
|
/**
|
|
@@ -564963,7 +565834,7 @@ function build$1() {
|
|
|
564963
565834
|
* A request from the client to the server, to ask for completion options.
|
|
564964
565835
|
*/
|
|
564965
565836
|
const CompleteRequestSchema$1 = RequestSchema$1.extend({
|
|
564966
|
-
method: literal("completion/complete"),
|
|
565837
|
+
method: literal$1("completion/complete"),
|
|
564967
565838
|
params: CompleteRequestParamsSchema$1
|
|
564968
565839
|
});
|
|
564969
565840
|
/**
|
|
@@ -564994,7 +565865,7 @@ function build$1() {
|
|
|
564994
565865
|
* tool parameters, resource URIs, or configuration.
|
|
564995
565866
|
*/
|
|
564996
565867
|
const ListRootsRequestSchema$1 = RequestSchema$1.extend({
|
|
564997
|
-
method: literal("roots/list"),
|
|
565868
|
+
method: literal$1("roots/list"),
|
|
564998
565869
|
params: BaseRequestParamsSchema$1.optional()
|
|
564999
565870
|
});
|
|
565000
565871
|
/**
|
|
@@ -565013,7 +565884,7 @@ function build$1() {
|
|
|
565013
565884
|
* tool parameters, resource URIs, or configuration.
|
|
565014
565885
|
*/
|
|
565015
565886
|
const RootsListChangedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
565016
|
-
method: literal("notifications/roots/list_changed"),
|
|
565887
|
+
method: literal$1("notifications/roots/list_changed"),
|
|
565017
565888
|
params: NotificationsParamsSchema$1.optional()
|
|
565018
565889
|
});
|
|
565019
565890
|
/**
|
|
@@ -565069,7 +565940,7 @@ function build$1() {
|
|
|
565069
565940
|
* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
|
|
565070
565941
|
*/
|
|
565071
565942
|
const TaskStatusNotificationSchema$1 = NotificationSchema$1.extend({
|
|
565072
|
-
method: literal("notifications/tasks/status"),
|
|
565943
|
+
method: literal$1("notifications/tasks/status"),
|
|
565073
565944
|
params: TaskStatusNotificationParamsSchema$1
|
|
565074
565945
|
});
|
|
565075
565946
|
/**
|
|
@@ -565078,7 +565949,7 @@ function build$1() {
|
|
|
565078
565949
|
* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
|
|
565079
565950
|
*/
|
|
565080
565951
|
const GetTaskRequestSchema$1 = RequestSchema$1.extend({
|
|
565081
|
-
method: literal("tasks/get"),
|
|
565952
|
+
method: literal$1("tasks/get"),
|
|
565082
565953
|
params: BaseRequestParamsSchema$1.extend({ taskId: string() })
|
|
565083
565954
|
});
|
|
565084
565955
|
/**
|
|
@@ -565093,7 +565964,7 @@ function build$1() {
|
|
|
565093
565964
|
* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
|
|
565094
565965
|
*/
|
|
565095
565966
|
const GetTaskPayloadRequestSchema$1 = RequestSchema$1.extend({
|
|
565096
|
-
method: literal("tasks/result"),
|
|
565967
|
+
method: literal$1("tasks/result"),
|
|
565097
565968
|
params: BaseRequestParamsSchema$1.extend({ taskId: string() })
|
|
565098
565969
|
});
|
|
565099
565970
|
/**
|
|
@@ -565110,7 +565981,7 @@ function build$1() {
|
|
|
565110
565981
|
*
|
|
565111
565982
|
* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
|
|
565112
565983
|
*/
|
|
565113
|
-
const ListTasksRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal("tasks/list") });
|
|
565984
|
+
const ListTasksRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: literal$1("tasks/list") });
|
|
565114
565985
|
/**
|
|
565115
565986
|
* The response to a {@linkcode ListTasksRequest | tasks/list} request.
|
|
565116
565987
|
*
|
|
@@ -565123,7 +565994,7 @@ function build$1() {
|
|
|
565123
565994
|
* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
|
|
565124
565995
|
*/
|
|
565125
565996
|
const CancelTaskRequestSchema$1 = RequestSchema$1.extend({
|
|
565126
|
-
method: literal("tasks/cancel"),
|
|
565997
|
+
method: literal$1("tasks/cancel"),
|
|
565127
565998
|
params: BaseRequestParamsSchema$1.extend({ taskId: string() })
|
|
565128
565999
|
});
|
|
565129
566000
|
return {
|
|
@@ -565877,7 +566748,7 @@ function build() {
|
|
|
565877
566748
|
progressToken: ProgressTokenSchema$1
|
|
565878
566749
|
});
|
|
565879
566750
|
const ProgressNotificationSchema$1 = NotificationSchema$1.extend({
|
|
565880
|
-
method: literal("notifications/progress"),
|
|
566751
|
+
method: literal$1("notifications/progress"),
|
|
565881
566752
|
params: ProgressNotificationParamsSchema$1
|
|
565882
566753
|
});
|
|
565883
566754
|
const LoggingMessageNotificationParamsSchema$1 = NotificationsParamsSchema$1.extend({
|
|
@@ -565886,7 +566757,7 @@ function build() {
|
|
|
565886
566757
|
data: unknown()
|
|
565887
566758
|
});
|
|
565888
566759
|
const LoggingMessageNotificationSchema$1 = NotificationSchema$1.extend({
|
|
565889
|
-
method: literal("notifications/message"),
|
|
566760
|
+
method: literal$1("notifications/message"),
|
|
565890
566761
|
params: LoggingMessageNotificationParamsSchema$1
|
|
565891
566762
|
});
|
|
565892
566763
|
const ResourceContentsSchema$1 = object$1({
|
|
@@ -565921,12 +566792,12 @@ function build() {
|
|
|
565921
566792
|
_meta: optional(looseObject({}))
|
|
565922
566793
|
});
|
|
565923
566794
|
const ResourceListChangedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
565924
|
-
method: literal("notifications/resources/list_changed"),
|
|
566795
|
+
method: literal$1("notifications/resources/list_changed"),
|
|
565925
566796
|
params: NotificationsParamsSchema$1.optional()
|
|
565926
566797
|
});
|
|
565927
566798
|
const ResourceUpdatedNotificationParamsSchema$1 = NotificationsParamsSchema$1.extend({ uri: string() });
|
|
565928
566799
|
const ResourceUpdatedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
565929
|
-
method: literal("notifications/resources/updated"),
|
|
566800
|
+
method: literal$1("notifications/resources/updated"),
|
|
565930
566801
|
params: ResourceUpdatedNotificationParamsSchema$1
|
|
565931
566802
|
});
|
|
565932
566803
|
const PromptArgumentSchema$1 = object$1({
|
|
@@ -565942,43 +566813,43 @@ function build() {
|
|
|
565942
566813
|
_meta: optional(looseObject({}))
|
|
565943
566814
|
});
|
|
565944
566815
|
const PromptListChangedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
565945
|
-
method: literal("notifications/prompts/list_changed"),
|
|
566816
|
+
method: literal$1("notifications/prompts/list_changed"),
|
|
565946
566817
|
params: NotificationsParamsSchema$1.optional()
|
|
565947
566818
|
});
|
|
565948
566819
|
const TextContentSchema$1 = object$1({
|
|
565949
|
-
type: literal("text"),
|
|
566820
|
+
type: literal$1("text"),
|
|
565950
566821
|
text: string(),
|
|
565951
566822
|
annotations: AnnotationsSchema$1.optional(),
|
|
565952
566823
|
_meta: record(string(), unknown()).optional()
|
|
565953
566824
|
});
|
|
565954
566825
|
const ImageContentSchema$1 = object$1({
|
|
565955
|
-
type: literal("image"),
|
|
566826
|
+
type: literal$1("image"),
|
|
565956
566827
|
data: Base64Schema,
|
|
565957
566828
|
mimeType: string(),
|
|
565958
566829
|
annotations: AnnotationsSchema$1.optional(),
|
|
565959
566830
|
_meta: record(string(), unknown()).optional()
|
|
565960
566831
|
});
|
|
565961
566832
|
const AudioContentSchema$1 = object$1({
|
|
565962
|
-
type: literal("audio"),
|
|
566833
|
+
type: literal$1("audio"),
|
|
565963
566834
|
data: Base64Schema,
|
|
565964
566835
|
mimeType: string(),
|
|
565965
566836
|
annotations: AnnotationsSchema$1.optional(),
|
|
565966
566837
|
_meta: record(string(), unknown()).optional()
|
|
565967
566838
|
});
|
|
565968
566839
|
const ToolUseContentSchema$1 = object$1({
|
|
565969
|
-
type: literal("tool_use"),
|
|
566840
|
+
type: literal$1("tool_use"),
|
|
565970
566841
|
name: string(),
|
|
565971
566842
|
id: string(),
|
|
565972
566843
|
input: record(string(), unknown()),
|
|
565973
566844
|
_meta: record(string(), unknown()).optional()
|
|
565974
566845
|
});
|
|
565975
566846
|
const EmbeddedResourceSchema$1 = object$1({
|
|
565976
|
-
type: literal("resource"),
|
|
566847
|
+
type: literal$1("resource"),
|
|
565977
566848
|
resource: union([TextResourceContentsSchema$1, BlobResourceContentsSchema$1]),
|
|
565978
566849
|
annotations: AnnotationsSchema$1.optional(),
|
|
565979
566850
|
_meta: record(string(), unknown()).optional()
|
|
565980
566851
|
});
|
|
565981
|
-
const ResourceLinkSchema$1 = ResourceSchema$1.extend({ type: literal("resource_link") });
|
|
566852
|
+
const ResourceLinkSchema$1 = ResourceSchema$1.extend({ type: literal$1("resource_link") });
|
|
565982
566853
|
const ContentBlockSchema$1 = union([
|
|
565983
566854
|
TextContentSchema$1,
|
|
565984
566855
|
ImageContentSchema$1,
|
|
@@ -565998,7 +566869,7 @@ function build() {
|
|
|
565998
566869
|
openWorldHint: boolean().optional()
|
|
565999
566870
|
});
|
|
566000
566871
|
const ToolListChangedNotificationSchema$1 = NotificationSchema$1.extend({
|
|
566001
|
-
method: literal("notifications/tools/list_changed"),
|
|
566872
|
+
method: literal$1("notifications/tools/list_changed"),
|
|
566002
566873
|
params: NotificationsParamsSchema$1.optional()
|
|
566003
566874
|
});
|
|
566004
566875
|
const ModelHintSchema$1 = object$1({ name: string().optional() });
|
|
@@ -566014,13 +566885,13 @@ function build() {
|
|
|
566014
566885
|
"none"
|
|
566015
566886
|
]).optional() });
|
|
566016
566887
|
const BooleanSchemaSchema$1 = object$1({
|
|
566017
|
-
type: literal("boolean"),
|
|
566888
|
+
type: literal$1("boolean"),
|
|
566018
566889
|
title: string().optional(),
|
|
566019
566890
|
description: string().optional(),
|
|
566020
566891
|
default: boolean().optional()
|
|
566021
566892
|
});
|
|
566022
566893
|
const StringSchemaSchema$1 = object$1({
|
|
566023
|
-
type: literal("string"),
|
|
566894
|
+
type: literal$1("string"),
|
|
566024
566895
|
title: string().optional(),
|
|
566025
566896
|
description: string().optional(),
|
|
566026
566897
|
minLength: number$1().optional(),
|
|
@@ -566042,14 +566913,14 @@ function build() {
|
|
|
566042
566913
|
default: number$1().optional()
|
|
566043
566914
|
});
|
|
566044
566915
|
const UntitledSingleSelectEnumSchemaSchema$1 = object$1({
|
|
566045
|
-
type: literal("string"),
|
|
566916
|
+
type: literal$1("string"),
|
|
566046
566917
|
title: string().optional(),
|
|
566047
566918
|
description: string().optional(),
|
|
566048
566919
|
enum: array(string()),
|
|
566049
566920
|
default: string().optional()
|
|
566050
566921
|
});
|
|
566051
566922
|
const TitledSingleSelectEnumSchemaSchema$1 = object$1({
|
|
566052
|
-
type: literal("string"),
|
|
566923
|
+
type: literal$1("string"),
|
|
566053
566924
|
title: string().optional(),
|
|
566054
566925
|
description: string().optional(),
|
|
566055
566926
|
oneOf: array(object$1({
|
|
@@ -566059,7 +566930,7 @@ function build() {
|
|
|
566059
566930
|
default: string().optional()
|
|
566060
566931
|
});
|
|
566061
566932
|
const LegacyTitledEnumSchemaSchema$1 = object$1({
|
|
566062
|
-
type: literal("string"),
|
|
566933
|
+
type: literal$1("string"),
|
|
566063
566934
|
title: string().optional(),
|
|
566064
566935
|
description: string().optional(),
|
|
566065
566936
|
enum: array(string()),
|
|
@@ -566068,19 +566939,19 @@ function build() {
|
|
|
566068
566939
|
});
|
|
566069
566940
|
const SingleSelectEnumSchemaSchema$1 = union([UntitledSingleSelectEnumSchemaSchema$1, TitledSingleSelectEnumSchemaSchema$1]);
|
|
566070
566941
|
const UntitledMultiSelectEnumSchemaSchema$1 = object$1({
|
|
566071
|
-
type: literal("array"),
|
|
566942
|
+
type: literal$1("array"),
|
|
566072
566943
|
title: string().optional(),
|
|
566073
566944
|
description: string().optional(),
|
|
566074
566945
|
minItems: number$1().optional(),
|
|
566075
566946
|
maxItems: number$1().optional(),
|
|
566076
566947
|
items: object$1({
|
|
566077
|
-
type: literal("string"),
|
|
566948
|
+
type: literal$1("string"),
|
|
566078
566949
|
enum: array(string())
|
|
566079
566950
|
}),
|
|
566080
566951
|
default: array(string()).optional()
|
|
566081
566952
|
});
|
|
566082
566953
|
const TitledMultiSelectEnumSchemaSchema$1 = object$1({
|
|
566083
|
-
type: literal("array"),
|
|
566954
|
+
type: literal$1("array"),
|
|
566084
566955
|
title: string().optional(),
|
|
566085
566956
|
description: string().optional(),
|
|
566086
566957
|
minItems: number$1().optional(),
|
|
@@ -566104,20 +566975,20 @@ function build() {
|
|
|
566104
566975
|
NumberSchemaSchema$1
|
|
566105
566976
|
]);
|
|
566106
566977
|
const ElicitRequestFormParamsSchema$1 = TaskAugmentedRequestParamsSchema$1.extend({
|
|
566107
|
-
mode: literal("form").optional(),
|
|
566978
|
+
mode: literal$1("form").optional(),
|
|
566108
566979
|
message: string(),
|
|
566109
566980
|
requestedSchema: object$1({
|
|
566110
|
-
type: literal("object"),
|
|
566981
|
+
type: literal$1("object"),
|
|
566111
566982
|
properties: record(string(), PrimitiveSchemaDefinitionSchema$1),
|
|
566112
566983
|
required: array(string()).optional()
|
|
566113
566984
|
}).catchall(unknown())
|
|
566114
566985
|
});
|
|
566115
566986
|
const ResourceTemplateReferenceSchema$1 = object$1({
|
|
566116
|
-
type: literal("ref/resource"),
|
|
566987
|
+
type: literal$1("ref/resource"),
|
|
566117
566988
|
uri: string()
|
|
566118
566989
|
});
|
|
566119
566990
|
const PromptReferenceSchema$1 = object$1({
|
|
566120
|
-
type: literal("ref/prompt"),
|
|
566991
|
+
type: literal$1("ref/prompt"),
|
|
566121
566992
|
name: string()
|
|
566122
566993
|
});
|
|
566123
566994
|
const RootSchema$1 = object$1({
|
|
@@ -566168,7 +567039,7 @@ function build() {
|
|
|
566168
567039
|
description: string().optional(),
|
|
566169
567040
|
inputSchema: looseObject({
|
|
566170
567041
|
$schema: string().optional(),
|
|
566171
|
-
type: literal("object")
|
|
567042
|
+
type: literal$1("object")
|
|
566172
567043
|
}),
|
|
566173
567044
|
outputSchema: looseObject({ $schema: string().optional() }).optional(),
|
|
566174
567045
|
annotations: ToolAnnotationsSchema$1.optional(),
|
|
@@ -566176,7 +567047,7 @@ function build() {
|
|
|
566176
567047
|
});
|
|
566177
567048
|
/** 2026-era ToolResultContent (anchor-exact: `structuredContent?: unknown`). */
|
|
566178
567049
|
const ToolResultContentSchema$1 = object$1({
|
|
566179
|
-
type: literal("tool_result"),
|
|
567050
|
+
type: literal$1("tool_result"),
|
|
566180
567051
|
toolUseId: string(),
|
|
566181
567052
|
content: array(ContentBlockSchema$1),
|
|
566182
567053
|
structuredContent: unknown().optional(),
|
|
@@ -566289,7 +567160,7 @@ function build() {
|
|
|
566289
567160
|
});
|
|
566290
567161
|
/** 2026-era embedded sampling request (de-JSON-RPC'd). */
|
|
566291
567162
|
const CreateMessageRequestSchema$1 = object$1({
|
|
566292
|
-
method: literal("sampling/createMessage"),
|
|
567163
|
+
method: literal$1("sampling/createMessage"),
|
|
566293
567164
|
params: CreateMessageRequestParamsSchema$1
|
|
566294
567165
|
});
|
|
566295
567166
|
/**
|
|
@@ -566298,7 +567169,7 @@ function build() {
|
|
|
566298
567169
|
* the anchor declares a bare optional `_meta` on `params`.
|
|
566299
567170
|
*/
|
|
566300
567171
|
const ListRootsRequestSchema$1 = object$1({
|
|
566301
|
-
method: literal("roots/list"),
|
|
567172
|
+
method: literal$1("roots/list"),
|
|
566302
567173
|
params: object$1({ _meta: record(string(), unknown()).optional() }).optional()
|
|
566303
567174
|
});
|
|
566304
567175
|
/** 2026-era embedded sampling response (anchor-exact: extends the forked SamplingMessage). */
|
|
@@ -566330,7 +567201,7 @@ function build() {
|
|
|
566330
567201
|
* frozen 2025-11-25 revision.
|
|
566331
567202
|
*/
|
|
566332
567203
|
const ElicitRequestURLParamsSchema$1 = object$1({
|
|
566333
|
-
mode: literal("url"),
|
|
567204
|
+
mode: literal$1("url"),
|
|
566334
567205
|
message: string(),
|
|
566335
567206
|
url: string().url()
|
|
566336
567207
|
});
|
|
@@ -566338,7 +567209,7 @@ function build() {
|
|
|
566338
567209
|
const ElicitRequestParamsSchema$1 = union([ElicitRequestFormParamsSchema$1, ElicitRequestURLParamsSchema$1]);
|
|
566339
567210
|
/** 2026-era embedded elicitation request (de-JSON-RPC'd; see the URL-mode fork above). */
|
|
566340
567211
|
const ElicitRequestSchema$1 = object$1({
|
|
566341
|
-
method: literal("elicitation/create"),
|
|
567212
|
+
method: literal$1("elicitation/create"),
|
|
566342
567213
|
params: ElicitRequestParamsSchema$1
|
|
566343
567214
|
});
|
|
566344
567215
|
/** A single embedded input request (one of the three demoted server→client requests). */
|
|
@@ -566380,7 +567251,7 @@ function build() {
|
|
|
566380
567251
|
const DispatchRequestMetaSchema = looseObject({ progressToken: ProgressTokenSchema$1.optional() });
|
|
566381
567252
|
function wireRequest(method, paramsShape) {
|
|
566382
567253
|
return object$1({
|
|
566383
|
-
method: literal(method),
|
|
567254
|
+
method: literal$1(method),
|
|
566384
567255
|
params: object$1({
|
|
566385
567256
|
_meta: RequestMetaEnvelopeSchema,
|
|
566386
567257
|
...paramsShape
|
|
@@ -566389,7 +567260,7 @@ function build() {
|
|
|
566389
567260
|
}
|
|
566390
567261
|
function dispatchRequest(method, paramsShape) {
|
|
566391
567262
|
return object$1({
|
|
566392
|
-
method: literal(method),
|
|
567263
|
+
method: literal$1(method),
|
|
566393
567264
|
params: object$1({
|
|
566394
567265
|
_meta: DispatchRequestMetaSchema.optional(),
|
|
566395
567266
|
...paramsShape
|
|
@@ -566537,7 +567408,7 @@ function build() {
|
|
|
566537
567408
|
const NotificationMetaSchema = looseObject({ "io.modelcontextprotocol/subscriptionId": RequestIdSchema$1.optional() });
|
|
566538
567409
|
/** Anchor SubscriptionsAcknowledgedNotification (2026-only). */
|
|
566539
567410
|
const SubscriptionsAcknowledgedNotificationSchema$1 = object$1({
|
|
566540
|
-
method: literal("notifications/subscriptions/acknowledged"),
|
|
567411
|
+
method: literal$1("notifications/subscriptions/acknowledged"),
|
|
566541
567412
|
params: object$1({
|
|
566542
567413
|
_meta: NotificationMetaSchema.optional(),
|
|
566543
567414
|
notifications: SubscriptionFilterSchema$1
|
|
@@ -566557,7 +567428,7 @@ function build() {
|
|
|
566557
567428
|
});
|
|
566558
567429
|
/** 2026-era `notifications/cancelled` (see the params fork above). */
|
|
566559
567430
|
const CancelledNotificationSchema$1 = object$1({
|
|
566560
|
-
method: literal("notifications/cancelled"),
|
|
567431
|
+
method: literal$1("notifications/cancelled"),
|
|
566561
567432
|
params: CancelledNotificationParamsSchema$1
|
|
566562
567433
|
});
|
|
566563
567434
|
const notificationSchemas2026 = {
|
|
@@ -566571,7 +567442,7 @@ function build() {
|
|
|
566571
567442
|
"notifications/subscriptions/acknowledged": SubscriptionsAcknowledgedNotificationSchema$1
|
|
566572
567443
|
};
|
|
566573
567444
|
const wireResultResponse = (result) => object$1({
|
|
566574
|
-
jsonrpc: literal("2.0"),
|
|
567445
|
+
jsonrpc: literal$1("2.0"),
|
|
566575
567446
|
id: union([string(), number$1().int()]),
|
|
566576
567447
|
result
|
|
566577
567448
|
}).strict();
|
|
@@ -567150,15 +568021,15 @@ function inputSchemaMaps() {
|
|
|
567150
568021
|
maps = {
|
|
567151
568022
|
request: {
|
|
567152
568023
|
"elicitation/create": object$1({
|
|
567153
|
-
method: literal("elicitation/create"),
|
|
568024
|
+
method: literal$1("elicitation/create"),
|
|
567154
568025
|
params: s.ElicitRequestParamsSchema
|
|
567155
568026
|
}),
|
|
567156
568027
|
"sampling/createMessage": object$1({
|
|
567157
|
-
method: literal("sampling/createMessage"),
|
|
568028
|
+
method: literal$1("sampling/createMessage"),
|
|
567158
568029
|
params: s.CreateMessageRequestParamsSchema
|
|
567159
568030
|
}),
|
|
567160
568031
|
"roots/list": object$1({
|
|
567161
|
-
method: literal("roots/list"),
|
|
568032
|
+
method: literal$1("roots/list"),
|
|
567162
568033
|
params: looseObject({}).optional()
|
|
567163
568034
|
})
|
|
567164
568035
|
},
|
|
@@ -592812,6 +593683,7 @@ function createProgram() {
|
|
|
592812
593683
|
registerAgentGroupCommand(program);
|
|
592813
593684
|
registerAgentSignalCommand(program);
|
|
592814
593685
|
registerBotCommand(program);
|
|
593686
|
+
registerArtboardCommand(program);
|
|
592815
593687
|
registerChannelCommand(program);
|
|
592816
593688
|
registerGenerateCommand(program);
|
|
592817
593689
|
registerGoalCommand$1(program);
|