@piagent/platform 1.26.1 → 1.27.1
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 +26 -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 +2 -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 +12 -0
- package/docs-site/content/index.html +4 -4
- package/docs-site/content/whats-new.html +12 -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 +13 -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 +13 -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/managed/helper-run.mjs +4 -3
- package/packages/piagent-core/managed/memory.mjs +237 -0
- package/packages/piagent-core/managed/session.mjs +5 -5
- package/packages/piagent-core/package.json +1 -1
|
@@ -27,7 +27,7 @@ import { beforeDelegate } from './objections.mjs';
|
|
|
27
27
|
import { HELPER_CALLS, HELPER_ROLES, helperRoles, helperPrompt, webPrompt, delegateDescription } from './helper-roles.mjs';
|
|
28
28
|
import { loadAgentResources } from './agent-skills.mjs';
|
|
29
29
|
import { restorePermission, permissionSetter } from './permission.mjs';
|
|
30
|
-
import { commandTools, servicesPrompt } from './command-tools.mjs';
|
|
30
|
+
import { commandTools, servicesPrompt } from './command-tools.mjs'; import { attachMemory, memoryToolsFor, openRound, closeRound } from './memory.mjs';
|
|
31
31
|
|
|
32
32
|
const PROVIDER = 'agent_watch_managed';
|
|
33
33
|
export const HELPER_BEAT_MS = 60_000;
|
|
@@ -132,14 +132,14 @@ export class ManagedSession {
|
|
|
132
132
|
return { content: [{ type: 'text', text: `Plan updated: ${plan.plan.filter(p => p.status === 'completed').length}/${plan.plan.length} steps completed.` }], details: { plan: plan.plan } };
|
|
133
133
|
}));
|
|
134
134
|
// The member decides what the request leaves open: numbered options, or their own words.
|
|
135
|
-
customTools.push(askTool(self));
|
|
135
|
+
customTools.push(askTool(self), ...memoryToolsFor(self, agentDir)); // team memory's tools, once Studio answered memory here (memory.mjs)
|
|
136
136
|
const agentsFiles = projectInstructions(self.cwd, self.boundary.repositoryTop);
|
|
137
137
|
self.checks = repositoryChecks(agentsFiles, self.cwd, self.boundary.repositoryTop);
|
|
138
138
|
// The Harness workflow (possibly changed on a later enrollment) adds its process to the prompt.
|
|
139
139
|
const loader = managedResourceLoader(api, { systemPrompt: () => BASE_PROMPT + referencePrompt(self.boundary.userHome) + TEST_PROMPT + servicesPrompt(self.boundary) + webPrompt(helperRoles(manifest)) + helperPrompt(helperRoles(self.manifest)) + workflowPrompt(workflowPolicy(self.manifest), self.checks), agentsFiles,
|
|
140
140
|
skills: self.resources.skills, prompts: self.resources.prompts, ...await inlineExtensions(api, sdk, self.cwd, terminalExtensions) });
|
|
141
141
|
const settings = api.SettingsManager.inMemory({ retry: { enabled: false, provider: { maxRetries: 0 } }, cacheWarming: 'off', enableInstallTelemetry: false, enableAnalytics: false, enableSkillCommands: true });
|
|
142
|
-
const manager = sessionManager ?? api.SessionManager.inMemory(self.cwd);
|
|
142
|
+
const manager = sessionManager ?? api.SessionManager.inMemory(self.cwd); attachMemory(self, manager, agentDir, g => verifyGrant(g, self.manifest, 'main'));
|
|
143
143
|
const scope = scopeOf(self.origin, manifest);
|
|
144
144
|
const prior = manager.getEntries().filter(e => e.type === 'custom' && e.customType === 'agent-watch-scope').at(-1)?.data;
|
|
145
145
|
// Under another member or another Studio a conversation still opens and
|
|
@@ -263,7 +263,7 @@ export class ManagedSession {
|
|
|
263
263
|
const pending = pendingBaseline(manager);
|
|
264
264
|
self.ownPaths = new Set(pending !== null ? pendingPaths(manager) : []);
|
|
265
265
|
self.base = (pending !== null ? pendingHead(manager) : null) ?? await readHead(self.boundary);
|
|
266
|
-
self.run.startDigest = pending ?? await self.digest();
|
|
266
|
+
self.run.startDigest = pending ?? await self.digest(); await openRound(self, manager, text); // sends what waited; a new conversation gets the team brief
|
|
267
267
|
} catch (error) { self.preflight = describeFailure('main', failureText(error)); }
|
|
268
268
|
self.activePrompt = true;
|
|
269
269
|
})();
|
|
@@ -286,7 +286,7 @@ export class ManagedSession {
|
|
|
286
286
|
// The round's model work is over: a member message now waits for the next round.
|
|
287
287
|
self.between = true;
|
|
288
288
|
Object.assign(round, { planUpdated: !!self.run?.planUpdated, changed: !!self.run?.changed });
|
|
289
|
-
await Promise.allSettled([...self.helpers.values()]);
|
|
289
|
+
await Promise.allSettled([...self.helpers.values()]); await closeRound(self); // the round goes to team memory while its run token is valid
|
|
290
290
|
// What a command left running in the background ends with the turn.
|
|
291
291
|
try { await self.boundary.stopStrays(); } catch { /* best effort; the boundary stops them on close */ }
|
|
292
292
|
await self.refreshReview();
|