@piagent/platform 1.28.3 → 1.29.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 (63) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +1 -1
  3. package/README.vi.md +1 -1
  4. package/docs/command-reference-vietnamese.md +4 -2
  5. package/docs/company-dev-commands.md +6 -0
  6. package/docs/distribution-standard.md +6 -6
  7. package/docs/languages.json +2 -2
  8. package/docs/operator-manual-vietnamese.md +7 -7
  9. package/docs/publishing-for-teams.md +1 -0
  10. package/docs/release-install-policy.md +2 -2
  11. package/docs/team-onboarding.md +2 -2
  12. package/docs-site/architecture.html +1 -1
  13. package/docs-site/benchmark.html +1 -1
  14. package/docs-site/commands.html +1 -1
  15. package/docs-site/content/en/index.html +4 -4
  16. package/docs-site/content/en/whats-new.html +6 -0
  17. package/docs-site/content/index.html +4 -4
  18. package/docs-site/content/whats-new.html +6 -0
  19. package/docs-site/context-engine.html +1 -1
  20. package/docs-site/ecosystem.html +1 -1
  21. package/docs-site/en/architecture.html +1 -1
  22. package/docs-site/en/benchmark.html +1 -1
  23. package/docs-site/en/commands.html +1 -1
  24. package/docs-site/en/context-engine.html +1 -1
  25. package/docs-site/en/ecosystem.html +1 -1
  26. package/docs-site/en/index.html +5 -5
  27. package/docs-site/en/mcp-approval.html +1 -1
  28. package/docs-site/en/mcp-auth.html +1 -1
  29. package/docs-site/en/mcp-servers.html +1 -1
  30. package/docs-site/en/mcp.html +1 -1
  31. package/docs-site/en/permissions.html +1 -1
  32. package/docs-site/en/profiles.html +1 -1
  33. package/docs-site/en/quickstart.html +1 -1
  34. package/docs-site/en/runtime.html +1 -1
  35. package/docs-site/en/scope.html +1 -1
  36. package/docs-site/en/security.html +1 -1
  37. package/docs-site/en/team.html +1 -1
  38. package/docs-site/en/whats-new.html +7 -1
  39. package/docs-site/en/windows.html +1 -1
  40. package/docs-site/en/workflows.html +1 -1
  41. package/docs-site/index.html +5 -5
  42. package/docs-site/mcp-approval.html +1 -1
  43. package/docs-site/mcp-auth.html +1 -1
  44. package/docs-site/mcp-servers.html +1 -1
  45. package/docs-site/mcp.html +1 -1
  46. package/docs-site/permissions.html +1 -1
  47. package/docs-site/profiles.html +1 -1
  48. package/docs-site/quickstart.html +1 -1
  49. package/docs-site/runtime.html +1 -1
  50. package/docs-site/scope.html +1 -1
  51. package/docs-site/security.html +1 -1
  52. package/docs-site/team.html +1 -1
  53. package/docs-site/whats-new.html +7 -1
  54. package/docs-site/windows.html +1 -1
  55. package/docs-site/workflows.html +1 -1
  56. package/evals/private-holdout-v1/public-exposure.v2.json +1 -1
  57. package/package.json +1 -1
  58. package/packages/piagent-core/managed/memory.mjs +3 -0
  59. package/packages/piagent-core/managed/request-stream.mjs +4 -0
  60. package/packages/piagent-core/managed/session.mjs +2 -2
  61. package/packages/piagent-core/package.json +1 -1
  62. package/scripts/company-terminal.mjs +192 -0
  63. package/scripts/piagent-studio.mjs +11 -3
@@ -134,7 +134,8 @@ try {
134
134
  // at the same time. One the WebUI is running is refused.
135
135
  const { holdManagedSession } = await import('../packages/piagent-webui/ownership/managed-terminal-lease.ts');
136
136
  // The Terminal's own commands and words (updates, Bypass, Harness notes): company-terminal.mjs.
137
- const { companyTerminalExtension } = await import('./company-terminal.mjs');
137
+ const { companyTerminalExtension, companyToolRenderers, companyInteractiveMode, harnessSummary } = await import('./company-terminal.mjs');
138
+ const toolRenderers = await companyToolRenderers(config.sdk_root);
138
139
  const packageRoot = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
139
140
  const terminal = companyTerminalExtension({ managed: () => current, packageRoot, sdkRoot: config.sdk_root,
140
141
  bindingChanged: () => { try { return digest(config.entrypoint) !== config.entrypoint_sha256; } catch { return true; } } });
@@ -147,6 +148,8 @@ try {
147
148
  if (current) { broker = current.broker; await current.session.abort(); await Promise.allSettled([...current.helpers.values()]); await broker.request('close'); current.session.dispose(); await current.boundary.dispose(); }
148
149
  current = await ManagedSession.create({ sdkRoot: config.sdk_root, cwd, origin: config.origin, broker, agentDir, sessionManager,
149
150
  protectedRoots: [configPath, agentDir], renewBroker: newBroker, bindingRevision, terminalExtensions: [terminal] });
151
+ // The plan is drawn as a checklist here; Pi keeps this definition object.
152
+ for (const [name, draw] of Object.entries(toolRenderers)) Object.assign(current.session.getToolDefinition(name) ?? {}, draw);
150
153
  return { session: current.session, extensionsResult: current.extensionsResult, services: current.services, diagnostics: [] };
151
154
  };
152
155
  const host = await api.createAgentSessionRuntime(factory, { cwd, agentDir, sessionManager: api.SessionManager.create(cwd, path.join(agentDir, 'sessions')) });
@@ -183,8 +186,13 @@ try {
183
186
  // Pi's exit line names `pi --session-dir …`, which would open this company
184
187
  // conversation in personal Pi; name the company Terminal instead.
185
188
  const write = process.stdout.write.bind(process.stdout), project = /^[\w./~:-]+$/.test(cwd) ? cwd : `'${cwd.replaceAll("'", "'\\''")}'`;
186
- process.stdout.write = (chunk, ...rest) => write(typeof chunk === 'string' && chunk.includes('To resume this session:') ? `Mở lại cuộc trò chuyện này: piagent studio --project ${project}, rồi /resume\n` : chunk, ...rest);
187
- await new api.InteractiveMode(host, { verbose: false }).run();
189
+ // Pi's "Model scope: agent-watch-auto (Ctrl+P to cycle)" line names a
190
+ // model nobody picks; the company header says what the Harness runs.
191
+ process.stdout.write = (chunk, ...rest) => typeof chunk === 'string' && chunk.includes('Model scope: ') ? true
192
+ : write(typeof chunk === 'string' && chunk.includes('To resume this session:') ? `Mở lại cuộc trò chuyện này: piagent studio --project ${project}, rồi /resume\n` : chunk, ...rest);
193
+ // /share, /bug, /login, /model, /thinking, /settings and /changelog: company-terminal.mjs.
194
+ const CompanyMode = await companyInteractiveMode(api, { sdkRoot: config.sdk_root, packageRoot, summary: () => harnessSummary(current) });
195
+ await new CompanyMode(host, { verbose: false }).run();
188
196
  }
189
197
  }
190
198
  } catch (error) {