@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.
- package/CHANGELOG.md +22 -0
- package/README.md +1 -1
- package/README.vi.md +1 -1
- package/docs/command-reference-vietnamese.md +4 -2
- package/docs/company-dev-commands.md +6 -0
- 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 +6 -0
- package/docs-site/content/index.html +4 -4
- package/docs-site/content/whats-new.html +6 -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 +7 -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 +7 -1
- package/docs-site/windows.html +1 -1
- package/docs-site/workflows.html +1 -1
- package/evals/private-holdout-v1/public-exposure.v2.json +1 -1
- package/package.json +1 -1
- package/packages/piagent-core/managed/memory.mjs +3 -0
- package/packages/piagent-core/managed/request-stream.mjs +4 -0
- package/packages/piagent-core/managed/session.mjs +2 -2
- package/packages/piagent-core/package.json +1 -1
- package/scripts/company-terminal.mjs +192 -0
- 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
|
-
|
|
187
|
-
|
|
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) {
|