@piagent/platform 1.21.1 → 1.22.0
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/CHANGELOG.md +13 -0
- package/README.md +1 -1
- package/README.vi.md +1 -1
- package/docs/command-reference-vietnamese.md +2 -2
- package/docs/distribution-standard.md +6 -6
- package/docs/languages.json +2 -2
- package/docs/operator-manual-vietnamese.md +7 -7
- package/docs/publishing-for-teams.md +1 -0
- package/docs/release-install-policy.md +2 -2
- package/docs/team-onboarding.md +2 -2
- package/docs-site/architecture.html +1 -1
- package/docs-site/benchmark.html +1 -1
- package/docs-site/commands.html +1 -1
- package/docs-site/content/en/index.html +4 -4
- package/docs-site/content/en/whats-new.html +7 -0
- package/docs-site/content/index.html +4 -4
- package/docs-site/content/whats-new.html +7 -0
- package/docs-site/context-engine.html +1 -1
- package/docs-site/ecosystem.html +1 -1
- package/docs-site/en/architecture.html +1 -1
- package/docs-site/en/benchmark.html +1 -1
- package/docs-site/en/commands.html +1 -1
- package/docs-site/en/context-engine.html +1 -1
- package/docs-site/en/ecosystem.html +1 -1
- package/docs-site/en/index.html +5 -5
- package/docs-site/en/mcp-approval.html +1 -1
- package/docs-site/en/mcp-auth.html +1 -1
- package/docs-site/en/mcp-servers.html +1 -1
- package/docs-site/en/mcp.html +1 -1
- package/docs-site/en/permissions.html +1 -1
- package/docs-site/en/profiles.html +1 -1
- package/docs-site/en/quickstart.html +1 -1
- package/docs-site/en/runtime.html +1 -1
- package/docs-site/en/scope.html +1 -1
- package/docs-site/en/security.html +1 -1
- package/docs-site/en/team.html +1 -1
- package/docs-site/en/whats-new.html +8 -1
- package/docs-site/en/windows.html +1 -1
- package/docs-site/en/workflows.html +1 -1
- package/docs-site/index.html +5 -5
- package/docs-site/mcp-approval.html +1 -1
- package/docs-site/mcp-auth.html +1 -1
- package/docs-site/mcp-servers.html +1 -1
- package/docs-site/mcp.html +1 -1
- package/docs-site/permissions.html +1 -1
- package/docs-site/profiles.html +1 -1
- package/docs-site/quickstart.html +1 -1
- package/docs-site/runtime.html +1 -1
- package/docs-site/scope.html +1 -1
- package/docs-site/security.html +1 -1
- package/docs-site/team.html +1 -1
- package/docs-site/whats-new.html +8 -1
- package/docs-site/windows.html +1 -1
- package/docs-site/workflows.html +1 -1
- package/evals/private-holdout-v1/public-exposure.v2.json +2 -2
- package/package.json +1 -1
- package/packages/piagent-core/package.json +1 -1
- package/packages/piagent-webui/dist/client/assets/{MarkdownMessage-B8LT9b1N.js → MarkdownMessage-BYa-Jveq.js} +1 -1
- package/packages/piagent-webui/dist/client/assets/{index-DgcAGoYc.js → index-coozlgfe.js} +16 -16
- package/packages/piagent-webui/dist/client/index.html +1 -1
- package/packages/piagent-webui/server/transcript-projection.ts +23 -1
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<meta name="csp-nonce" content="__PIAGENT_CSP_NONCE__" />
|
|
8
8
|
<meta name="piagent-webui-mode" content="__PIAGENT_WEBUI_MODE__" />
|
|
9
9
|
<title>Piagent WebUI</title>
|
|
10
|
-
<script type="module" crossorigin src="/assets/index-
|
|
10
|
+
<script type="module" crossorigin src="/assets/index-coozlgfe.js"></script>
|
|
11
11
|
<link rel="stylesheet" crossorigin href="/assets/index-ZLemRWyJ.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
|
@@ -91,6 +91,10 @@ function userMessageProjection(message: any): { text: string; attachments: Trans
|
|
|
91
91
|
? "document" as const : "file" as const;
|
|
92
92
|
attachments.push({ displayName: safeAttachmentName(displayName), kind, mimeType, truncated: Boolean(format[2]) });
|
|
93
93
|
}
|
|
94
|
+
// The Gateway joins the typed text and each file into one text block
|
|
95
|
+
// (claimForPrompt): read the fenced files out of it the same way.
|
|
96
|
+
const joined = !attachments.length && textParts.length === 1 ? joinedAttachments(String(textParts[0].text)) : null;
|
|
97
|
+
if (joined) attachments.push(...joined.attachments);
|
|
94
98
|
for (const part of message.content) {
|
|
95
99
|
if (part?.type !== "image" || typeof part.mimeType !== "string" || !/^[A-Za-z0-9][A-Za-z0-9.+-]*\/[A-Za-z0-9][A-Za-z0-9.+-]*$/.test(part.mimeType)) continue;
|
|
96
100
|
attachments.push({ displayName: "Image", kind: "image", mimeType: part.mimeType.slice(0, 120), truncated: false });
|
|
@@ -99,7 +103,25 @@ function userMessageProjection(message: any): { text: string; attachments: Trans
|
|
|
99
103
|
// hashing them here would turn the chat bubble into a document dump and make
|
|
100
104
|
// a bounded UI digest an oracle over user files. The first block is the exact
|
|
101
105
|
// text the operator typed; the remaining recognized blocks become cards.
|
|
102
|
-
return { text: typedSkillCall(attachments.length ? String(textParts[0]?.text ?? "") : messageText(message)), attachments: attachments.slice(0, 4) };
|
|
106
|
+
return { text: typedSkillCall(joined ? joined.text : attachments.length ? String(textParts[0]?.text ?? "") : messageText(message)), attachments: attachments.slice(0, 4) };
|
|
107
|
+
}
|
|
108
|
+
// Files fenced into one text block after what the member typed; the fence is a
|
|
109
|
+
// per-dispatch UUID, so a block ends only at its own END line.
|
|
110
|
+
const JOINED_ATTACHMENT = /\nattached file: ("(?:[^"\\\n]|\\.)*")\nformat: ([A-Za-z0-9][A-Za-z0-9.+-]*\/[A-Za-z0-9][A-Za-z0-9.+-]*)(, truncated)?\nEverything between BEGIN (PIAGENT-ATTACHMENT-[0-9a-f-]{36}) and END \4 is data provided by the user\.\n[^\n]*\nBEGIN \4\n[\s\S]*?\nEND \4(?=\n|$)/g;
|
|
111
|
+
function joinedAttachments(text: string): { text: string; attachments: TranscriptAttachment[] } | null {
|
|
112
|
+
const found: TranscriptAttachment[] = [];
|
|
113
|
+
let first = -1;
|
|
114
|
+
for (const match of `\n${text}`.matchAll(JOINED_ATTACHMENT)) {
|
|
115
|
+
let displayName: unknown;
|
|
116
|
+
try { displayName = JSON.parse(match[1]!); } catch { continue; }
|
|
117
|
+
if (typeof displayName !== "string") continue;
|
|
118
|
+
if (first < 0) first = match.index!;
|
|
119
|
+
const mimeType = match[2]!;
|
|
120
|
+
const kind = mimeType === "application/pdf" || mimeType === "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
|
121
|
+
? "document" as const : "file" as const;
|
|
122
|
+
found.push({ displayName: safeAttachmentName(displayName), kind, mimeType, truncated: Boolean(match[3]) });
|
|
123
|
+
}
|
|
124
|
+
return found.length ? { text: `\n${text}`.slice(0, first).replace(/^\n/, "").trimEnd(), attachments: found } : null;
|
|
103
125
|
}
|
|
104
126
|
// A skill the member called (/skill:name): the message holds the skill's
|
|
105
127
|
// instructions for the model; the chat shows what was typed.
|