@piagent/platform 1.23.0 → 1.24.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.
Files changed (67) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +1 -1
  3. package/README.vi.md +1 -1
  4. package/docs/command-reference-vietnamese.md +2 -2
  5. package/docs/distribution-standard.md +6 -6
  6. package/docs/languages.json +2 -2
  7. package/docs/operator-manual-vietnamese.md +7 -7
  8. package/docs/publishing-for-teams.md +2 -0
  9. package/docs/release-install-policy.md +2 -2
  10. package/docs/team-onboarding.md +2 -2
  11. package/docs-site/architecture.html +1 -1
  12. package/docs-site/benchmark.html +1 -1
  13. package/docs-site/commands.html +1 -1
  14. package/docs-site/content/en/index.html +4 -4
  15. package/docs-site/content/en/whats-new.html +13 -0
  16. package/docs-site/content/index.html +4 -4
  17. package/docs-site/content/whats-new.html +13 -0
  18. package/docs-site/context-engine.html +1 -1
  19. package/docs-site/ecosystem.html +1 -1
  20. package/docs-site/en/architecture.html +1 -1
  21. package/docs-site/en/benchmark.html +1 -1
  22. package/docs-site/en/commands.html +1 -1
  23. package/docs-site/en/context-engine.html +1 -1
  24. package/docs-site/en/ecosystem.html +1 -1
  25. package/docs-site/en/index.html +5 -5
  26. package/docs-site/en/mcp-approval.html +1 -1
  27. package/docs-site/en/mcp-auth.html +1 -1
  28. package/docs-site/en/mcp-servers.html +1 -1
  29. package/docs-site/en/mcp.html +1 -1
  30. package/docs-site/en/permissions.html +1 -1
  31. package/docs-site/en/profiles.html +1 -1
  32. package/docs-site/en/quickstart.html +1 -1
  33. package/docs-site/en/runtime.html +1 -1
  34. package/docs-site/en/scope.html +1 -1
  35. package/docs-site/en/security.html +1 -1
  36. package/docs-site/en/team.html +1 -1
  37. package/docs-site/en/whats-new.html +14 -1
  38. package/docs-site/en/windows.html +1 -1
  39. package/docs-site/en/workflows.html +1 -1
  40. package/docs-site/index.html +5 -5
  41. package/docs-site/mcp-approval.html +1 -1
  42. package/docs-site/mcp-auth.html +1 -1
  43. package/docs-site/mcp-servers.html +1 -1
  44. package/docs-site/mcp.html +1 -1
  45. package/docs-site/permissions.html +1 -1
  46. package/docs-site/profiles.html +1 -1
  47. package/docs-site/quickstart.html +1 -1
  48. package/docs-site/runtime.html +1 -1
  49. package/docs-site/scope.html +1 -1
  50. package/docs-site/security.html +1 -1
  51. package/docs-site/team.html +1 -1
  52. package/docs-site/whats-new.html +14 -1
  53. package/docs-site/windows.html +1 -1
  54. package/docs-site/workflows.html +1 -1
  55. package/evals/private-holdout-v1/public-exposure.v2.json +2 -2
  56. package/package.json +1 -1
  57. package/packages/piagent-core/managed/session.mjs +1 -1
  58. package/packages/piagent-core/package.json +1 -1
  59. package/packages/piagent-webui/dist/client/assets/{MarkdownMessage-lWHlCJq4.js → MarkdownMessage-GDGT_YLS.js} +1 -1
  60. package/packages/piagent-webui/dist/client/assets/{index-ZLemRWyJ.css → index-B5XOKQy-.css} +1 -1
  61. package/packages/piagent-webui/dist/client/assets/index-BmXL8XrW.js +231 -0
  62. package/packages/piagent-webui/dist/client/index.html +2 -2
  63. package/packages/piagent-webui/gateway/managed-gateway.mjs +7 -1
  64. package/packages/piagent-webui/gateway/session-command-controller.ts +5 -1
  65. package/packages/piagent-webui/gateway/session-inspection-registry.ts +2 -1
  66. package/schemas/piagent-webui/session-command-v1.schema.json +4 -0
  67. package/packages/piagent-webui/dist/client/assets/index-CDVdO4C7.js +0 -231
@@ -7,8 +7,8 @@
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-CDVdO4C7.js"></script>
11
- <link rel="stylesheet" crossorigin href="/assets/index-ZLemRWyJ.css">
10
+ <script type="module" crossorigin src="/assets/index-BmXL8XrW.js"></script>
11
+ <link rel="stylesheet" crossorigin href="/assets/index-B5XOKQy-.css">
12
12
  </head>
13
13
  <body>
14
14
  <div id="root"></div>
@@ -1,8 +1,14 @@
1
1
  import { managedThinkingLevels, nearestLevel } from '../../piagent-core/managed/capabilities.mjs';
2
2
  import { ManagedBrokerClient } from '../../piagent-core/managed/broker-client.mjs';
3
3
  import { ManagedSession } from '../../piagent-core/managed/session.mjs';
4
+ import { fastAllowed } from '../../piagent-core/managed/fast-mode.mjs';
4
5
  import fs from 'node:fs';
5
6
 
7
+ // A company model as the new chat page sees it: the thinking levels its
8
+ // Harness allows, and whether the Harness allows Fast mode (the page shows
9
+ // the Fast switch only then).
10
+ export const managedModelOption=(manifest,models,model)=>({...model,managedThinkingLevels:managedThinkingLevels(manifest,models,model),managedFast:fastAllowed(manifest)});
11
+
6
12
  // Only called by the pinned launcher with Watch's non-secret import manifest.
7
13
  // Each web session owns its own broker; no personal auth/model/resource loader.
8
14
  export async function startManagedGateway({ config, configPath, cwd, agentDir, packageRoot, registerProject = true }) {
@@ -22,7 +28,7 @@ export async function startManagedGateway({ config, configPath, cwd, agentDir, p
22
28
  const { webUiModelRef } = await import('../../piagent-core/runtime/inspection/webui-snapshot.ts');
23
29
  const host=probe.api,models=probe.modelRuntime;
24
30
  const snapshot=models.getAvailableSnapshot.bind(models);
25
- models.getAvailableSnapshot=()=>snapshot().map(model=>({...model,managedThinkingLevels:managedThinkingLevels(probe.manifest,models,model)}));
31
+ models.getAvailableSnapshot=()=>snapshot().map(model=>managedModelOption(probe.manifest,models,model));
26
32
  const factory=async(info,_instance,manager,initial)=>{
27
33
  if(initial?.modelRef && initial.modelRef!==webUiModelRef('agent_watch_managed','agent-watch-auto')) throw Error('managed-personal-switch-requires-new-session');
28
34
  const broker=newBroker();
@@ -66,12 +66,13 @@ function validPayload(action: SessionAction, payload: Record<string, unknown>):
66
66
  && (payload.title === null || typeof payload.title === "string" && payload.title.length >= 1 && payload.title.length <= 500
67
67
  && !/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/.test(payload.title));
68
68
  const createKeys = ["projectRef", "placeRef", "modelRef", "thinkingLevel", "message", "messageRequestId"];
69
- return requiredOptionalKeys(payload, createKeys, ["deferInitialMessage", "permissionMode", "workflow"])
69
+ return requiredOptionalKeys(payload, createKeys, ["deferInitialMessage", "permissionMode", "fast", "workflow"])
70
70
  && REF.test(String(payload.projectRef)) && REF.test(String(payload.placeRef)) && nullableRef(payload.modelRef)
71
71
  && ["off", "minimal", "low", "medium", "high", "xhigh", "max"].includes(String(payload.thinkingLevel))
72
72
  && typeof payload.message === "string" && payload.message.length >= 1 && payload.message.length <= 32_768 && !payload.message.includes("\0")
73
73
  && REF.test(String(payload.messageRequestId)) && (payload.deferInitialMessage === undefined || typeof payload.deferInitialMessage === "boolean")
74
74
  && (payload.permissionMode === undefined || ["read-only", "workspace-write", "trusted-full-access"].includes(String(payload.permissionMode)))
75
+ && (payload.fast === undefined || typeof payload.fast === "boolean")
75
76
  && (payload.workflow === undefined || isWebUiWorkflowId(payload.workflow));
76
77
  }
77
78
 
@@ -181,6 +182,9 @@ export class SessionCommandController {
181
182
  await this.#runtimes.setPermission(targetSessionRef, String(command.payload.permissionMode) as
182
183
  "read-only" | "workspace-write" | "trusted-full-access");
183
184
  }
185
+ // Fast mode chosen on the new chat page is on before the first message
186
+ // runs; a Harness that does not allow it refuses the create.
187
+ if (command.payload.fast === true) await this.#runtimes.setFast(targetSessionRef, true);
184
188
  const created = await this.#readyCatalog(), createdRow = created.sessions.find((item) => item.sessionRef === targetSessionRef);
185
189
  if (!createdRow) throw new Error("session-catalog-refresh-failed");
186
190
  observedCatalog = created; observedRow = createdRow;
@@ -238,7 +238,8 @@ export class SessionInspectionRegistry {
238
238
  .filter((level) => mapping[level] !== null && !(["xhigh", "max"].includes(level) && mapping[level] === undefined)) : ["off"];
239
239
  const inputs = Array.isArray(value.input) ? value.input.filter((item): item is string => typeof item === "string") : null;
240
240
  return [{ modelRef: webUiModelRef(provider, modelId), provider, modelId, displayName: safeName(value.name ?? modelId),
241
- reasoning: value.reasoning, imageInput: inputs ? inputs.includes("image") : null, thinkingLevels }];
241
+ reasoning: value.reasoning, imageInput: inputs ? inputs.includes("image") : null, thinkingLevels,
242
+ ...(provider === "agent_watch_managed" && value.managedFast === true ? { managedFast: true } : {}) }];
242
243
  });
243
244
  // Only offer a default present in the authenticated host catalog. Retain
244
245
  // the previous Sol baseline for accounts that have not received GPT-6 yet.
@@ -57,6 +57,10 @@
57
57
  "modelRef": { "$ref": "common-v1.schema.json#/$defs/nullableOpaqueRef" },
58
58
  "thinkingLevel": { "$ref": "#/$defs/thinkingLevel" },
59
59
  "permissionMode": { "$ref": "#/$defs/permissionMode" },
60
+ "fast": {
61
+ "description": "Start a company conversation with Fast mode on, before its first message runs. Refused when the team's Harness does not allow Fast mode.",
62
+ "type": "boolean"
63
+ },
60
64
  "workflow": { "$ref": "#/$defs/workflow" },
61
65
  "message": { "type": "string", "minLength": 1, "maxLength": 32768, "pattern": "^[^\\u0000]*$" },
62
66
  "messageRequestId": { "$ref": "common-v1.schema.json#/$defs/opaqueRef" },