@agentconnect.md/cli 1.18.0-rc.24 → 1.18.0-rc.32
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/index.js +91 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8901,6 +8901,94 @@ const GithubReviewResultReport = object({
|
|
|
8901
8901
|
});
|
|
8902
8902
|
const GithubReviewResultOk = object({ accepted: literal(true) });
|
|
8903
8903
|
//#endregion
|
|
8904
|
+
//#region ../protocol/dist/frames/webchat.js
|
|
8905
|
+
const WEBCHAT_IMAGE_MAX_BYTES = 160 * 1024;
|
|
8906
|
+
const WEBCHAT_IMAGE_MAX_BASE64_CHARS = Math.ceil(WEBCHAT_IMAGE_MAX_BYTES / 3) * 4;
|
|
8907
|
+
const CANONICAL_BASE64 = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
|
|
8908
|
+
function decodedBase64Bytes(value) {
|
|
8909
|
+
const padding = value.endsWith("==") ? 2 : value.endsWith("=") ? 1 : 0;
|
|
8910
|
+
return value.length / 4 * 3 - padding;
|
|
8911
|
+
}
|
|
8912
|
+
const WebchatImageAttachment = object({
|
|
8913
|
+
name: string().trim().min(1).max(255).regex(/^[^\u0000-\u001f\u007f]+$/, "webchat image name must not contain control characters"),
|
|
8914
|
+
mimeType: _enum([
|
|
8915
|
+
"image/png",
|
|
8916
|
+
"image/jpeg",
|
|
8917
|
+
"image/webp"
|
|
8918
|
+
]),
|
|
8919
|
+
data: string().min(4).max(WEBCHAT_IMAGE_MAX_BASE64_CHARS).refine((value) => CANONICAL_BASE64.test(value) && decodedBase64Bytes(value) <= 163840, { message: `webchat image must be canonical base64 encoding at most ${WEBCHAT_IMAGE_MAX_BYTES} bytes` })
|
|
8920
|
+
});
|
|
8921
|
+
object({
|
|
8922
|
+
accepted: boolean(),
|
|
8923
|
+
turnId: string().uuid(),
|
|
8924
|
+
reason: _enum([
|
|
8925
|
+
"queued",
|
|
8926
|
+
"no_agent",
|
|
8927
|
+
"busy",
|
|
8928
|
+
"paused",
|
|
8929
|
+
"draining"
|
|
8930
|
+
]).optional()
|
|
8931
|
+
});
|
|
8932
|
+
const WebchatEvent = discriminatedUnion("kind", [
|
|
8933
|
+
object({
|
|
8934
|
+
kind: literal("message"),
|
|
8935
|
+
text: string()
|
|
8936
|
+
}),
|
|
8937
|
+
object({
|
|
8938
|
+
kind: literal("thinking"),
|
|
8939
|
+
text: string()
|
|
8940
|
+
}),
|
|
8941
|
+
object({
|
|
8942
|
+
kind: literal("tool_call"),
|
|
8943
|
+
toolCallId: string(),
|
|
8944
|
+
title: string(),
|
|
8945
|
+
status: string()
|
|
8946
|
+
}),
|
|
8947
|
+
object({
|
|
8948
|
+
kind: literal("tool_update"),
|
|
8949
|
+
toolCallId: string(),
|
|
8950
|
+
status: string()
|
|
8951
|
+
}),
|
|
8952
|
+
object({
|
|
8953
|
+
kind: literal("session_info"),
|
|
8954
|
+
title: string()
|
|
8955
|
+
})
|
|
8956
|
+
]);
|
|
8957
|
+
const WebchatStatus = object({
|
|
8958
|
+
model: string().optional(),
|
|
8959
|
+
effort: string().optional(),
|
|
8960
|
+
permissionMode: string().optional(),
|
|
8961
|
+
fastMode: boolean().optional(),
|
|
8962
|
+
contextUsed: number().int().optional(),
|
|
8963
|
+
contextSize: number().int().optional(),
|
|
8964
|
+
totalTokens: number().int().optional(),
|
|
8965
|
+
costAmount: number().optional(),
|
|
8966
|
+
costCurrency: string().optional(),
|
|
8967
|
+
models: array(string()).optional(),
|
|
8968
|
+
efforts: array(string()).optional(),
|
|
8969
|
+
permissionModes: array(string()).optional(),
|
|
8970
|
+
fastModeAvailable: boolean().optional(),
|
|
8971
|
+
sessionId: string().optional()
|
|
8972
|
+
});
|
|
8973
|
+
object({
|
|
8974
|
+
conversationId: string().uuid(),
|
|
8975
|
+
turnId: string().uuid(),
|
|
8976
|
+
index: number().int(),
|
|
8977
|
+
event: WebchatEvent.optional(),
|
|
8978
|
+
status: WebchatStatus.optional()
|
|
8979
|
+
}).refine((o) => o.event !== void 0 || o.status !== void 0, { message: "WebchatOutput must carry event and/or status" });
|
|
8980
|
+
object({
|
|
8981
|
+
conversationId: string().uuid(),
|
|
8982
|
+
turnId: string().uuid(),
|
|
8983
|
+
lastIndex: number().int().min(-1).optional(),
|
|
8984
|
+
stopReason: string().optional(),
|
|
8985
|
+
usage: object({
|
|
8986
|
+
used: number().int().optional(),
|
|
8987
|
+
cost: number().optional()
|
|
8988
|
+
}).optional(),
|
|
8989
|
+
error: string().optional()
|
|
8990
|
+
});
|
|
8991
|
+
//#endregion
|
|
8904
8992
|
//#region ../protocol/dist/frames/session.js
|
|
8905
8993
|
/**
|
|
8906
8994
|
* Session read-back (C→D REQ → REP) — the console's on-demand pulls.
|
|
@@ -8965,6 +9053,8 @@ object({
|
|
|
8965
9053
|
})).optional(),
|
|
8966
9054
|
truncated: boolean().optional()
|
|
8967
9055
|
});
|
|
9056
|
+
/** One bounded webchat image persisted only in the daemon-local transcript. */
|
|
9057
|
+
const SessionImageAttachment = WebchatImageAttachment;
|
|
8968
9058
|
/** One message in a session transcript page (a body — returned only for display). */
|
|
8969
9059
|
const SessionMessage = object({
|
|
8970
9060
|
seq: number().int(),
|
|
@@ -8973,6 +9063,7 @@ const SessionMessage = object({
|
|
|
8973
9063
|
ts: string(),
|
|
8974
9064
|
kind: string(),
|
|
8975
9065
|
text: string(),
|
|
9066
|
+
attachments: array(SessionImageAttachment).max(1).optional(),
|
|
8976
9067
|
toolCallId: string().optional(),
|
|
8977
9068
|
toolStatus: string().optional(),
|
|
8978
9069
|
toolKind: string().optional(),
|