@piagent/platform 1.15.2 → 1.16.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 +11 -0
- package/docs-site/content/index.html +4 -4
- package/docs-site/content/whats-new.html +11 -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 +12 -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 +12 -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/extensions/piagent-guard.ts +8 -1
- package/packages/piagent-core/managed/permission.mjs +22 -0
- package/packages/piagent-core/managed/session.mjs +15 -7
- package/packages/piagent-core/package.json +1 -1
- package/packages/piagent-core/runtime/policy/bypass-policy.mjs +42 -0
- package/packages/piagent-webui/dist/client/assets/{MarkdownMessage-DjA3OGyI.js → MarkdownMessage-FBwt5TJv.js} +1 -1
- package/packages/piagent-webui/dist/client/assets/{index-bE2DKmc1.js → index-Bj9Tlouu.js} +12 -12
- package/packages/piagent-webui/dist/client/index.html +1 -1
- package/packages/piagent-webui/gateway/gateway-service.ts +2 -1
- package/packages/piagent-webui/gateway/managed-projection.ts +3 -1
- package/packages/piagent-webui/gateway/runtime-session-controls.ts +7 -1
- package/packages/piagent-webui/gateway/session-catalog.ts +3 -2
- package/schemas/piagent-webui/session-catalog-v1.schema.json +1 -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-Bj9Tlouu.js"></script>
|
|
11
11
|
<link rel="stylesheet" crossorigin href="/assets/index-Z91z6SlN.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
|
@@ -71,7 +71,8 @@ function capabilities(gatewayInstanceRef: string, runtimeAvailable = false, mana
|
|
|
71
71
|
abort: runtimeAvailable ? available() : unavailable("session-runtime-not-enabled"),
|
|
72
72
|
setModel: runtimeAvailable && !managed ? available() : unavailable("model-managed-by-studio"),
|
|
73
73
|
setThinking: runtimeAvailable ? available() : unavailable("session-runtime-not-enabled"),
|
|
74
|
-
|
|
74
|
+
// A company conversation offers "Ask first" or Bypass (no read-only).
|
|
75
|
+
setPermission: runtimeAvailable ? available() : unavailable("session-runtime-not-enabled"),
|
|
75
76
|
rename: runtimeAvailable ? available() : unavailable("session-runtime-not-enabled"),
|
|
76
77
|
pin: runtimeAvailable ? available() : unavailable("session-runtime-not-enabled"),
|
|
77
78
|
archive: runtimeAvailable ? available() : unavailable("session-runtime-not-enabled"),
|
|
@@ -17,7 +17,9 @@ export function managedProjection(context: any, entries: any[]) {
|
|
|
17
17
|
// Helpers the Harness enables (up to four); a conversation recorded before
|
|
18
18
|
// that was known says two.
|
|
19
19
|
const maximum = Number.isInteger(counter?.maximum) && counter.maximum >= 0 && counter.maximum <= 4 ? counter.maximum : 2;
|
|
20
|
-
|
|
20
|
+
// The member's access choice: "trusted-full-access" is Bypass.
|
|
21
|
+
const permission = last('agent-watch-permission')?.mode === 'trusted-full-access' ? 'trusted-full-access' : 'workspace-write';
|
|
22
|
+
return {modelLabel:'agent-watch-auto', managedPermission: permission, managedHelpers:{active:Number.isInteger(counter?.active) && counter.active>=0 && counter.active<=maximum ? counter.active : 0, maximum},
|
|
21
23
|
...(Array.isArray(capabilities)?{managedThinkingLevels:levels.filter(level=>capabilities.includes(level))}:{}),
|
|
22
24
|
...(steps ? {managedPlan:{steps}} : {}), ...(process ? {managedProcess:process} : {})};
|
|
23
25
|
}
|
|
@@ -15,7 +15,13 @@ type RuntimeCommandOutput = {
|
|
|
15
15
|
|
|
16
16
|
export async function executePermissionCommand(session: any,
|
|
17
17
|
permissionMode: "read-only" | "workspace-write" | "trusted-full-access"): Promise<void> {
|
|
18
|
-
|
|
18
|
+
// A company conversation: "Ask first" or "Bypass" (no read-only mode); the
|
|
19
|
+
// runtime keeps the choice in the conversation.
|
|
20
|
+
if (session.managedExecution) {
|
|
21
|
+
if (typeof session.managedSetPermission !== "function" || permissionMode === "read-only") throw new Error("managed-permission-unavailable");
|
|
22
|
+
session.managedSetPermission(permissionMode);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
19
25
|
const before = Array.isArray(session.messages) ? session.messages.length : 0;
|
|
20
26
|
await session.prompt(`/permission ${permissionMode}`);
|
|
21
27
|
const messages = Array.isArray(session.messages) ? session.messages.slice(before) : [];
|
|
@@ -47,7 +47,7 @@ function catalogRef(key: Buffer, namespace: string, value: string): string {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export type SessionOwnerProjection = Pick<SessionRow, "state" | "liveState" | "composerAvailable" | "needsAttention" | "owner" | "reasonCode">;
|
|
50
|
-
export type SessionOptionProjection = Pick<SessionRow, "modelLabel" | "thinkingLevel" | "managedHelpers" | "managedThinkingLevels" | "managedPlan" | "managedProcess">;
|
|
50
|
+
export type SessionOptionProjection = Pick<SessionRow, "modelLabel" | "thinkingLevel" | "managedHelpers" | "managedThinkingLevels" | "managedPermission" | "managedPlan" | "managedProcess">;
|
|
51
51
|
|
|
52
52
|
function display(value: unknown, maximum: number, fallback: string): string {
|
|
53
53
|
const clean = redactSensitiveText(String(value ?? "")).text
|
|
@@ -126,6 +126,7 @@ function row(key: Buffer, info: PiSessionInfo, metadata: SessionMetadata | undef
|
|
|
126
126
|
...(sessionOptions?.managedHelpers ? {managedHelpers:{...sessionOptions.managedHelpers,
|
|
127
127
|
active: ownership?.liveState === 'idle' ? 0 : ownership?.liveState === 'running' || ownership?.liveState === 'waiting-approval' ? sessionOptions.managedHelpers.active : null}} : {}),
|
|
128
128
|
...(sessionOptions?.managedThinkingLevels ? {managedThinkingLevels:sessionOptions.managedThinkingLevels} : {}),
|
|
129
|
+
...(sessionOptions?.managedPermission ? {managedPermission:sessionOptions.managedPermission} : {}),
|
|
129
130
|
...(sessionOptions?.managedPlan ? {managedPlan:sessionOptions.managedPlan} : {}),
|
|
130
131
|
...(sessionOptions?.managedProcess ? {managedProcess:sessionOptions.managedProcess} : {}),
|
|
131
132
|
modelLabel: sessionOptions?.modelLabel ?? null,
|
|
@@ -136,7 +137,7 @@ function row(key: Buffer, info: PiSessionInfo, metadata: SessionMetadata | undef
|
|
|
136
137
|
? { kind: "none", ownerEpoch: null, gatewayInstanceRef: null, runtimeInstanceRef: null, continuity: "released" }
|
|
137
138
|
: ownership?.owner ?? { kind: "none", ownerEpoch: null, gatewayInstanceRef: null, runtimeInstanceRef: null, continuity: "unknown" },
|
|
138
139
|
sessionRevision: revision(key, [info.path, info.modified.toISOString(), info.messageCount, info.name ?? null, metadata?.revision ?? null,
|
|
139
|
-
sessionOptions?.modelLabel ?? null, sessionOptions?.thinkingLevel ?? "unknown", sessionOptions?.managedHelpers, sessionOptions?.managedThinkingLevels, sessionOptions?.managedPlan, sessionOptions?.managedProcess,
|
|
140
|
+
sessionOptions?.modelLabel ?? null, sessionOptions?.thinkingLevel ?? "unknown", sessionOptions?.managedHelpers, sessionOptions?.managedThinkingLevels, sessionOptions?.managedPermission ?? null, sessionOptions?.managedPlan, sessionOptions?.managedProcess,
|
|
140
141
|
metadata?.archived ? "archived" : ownership ? [ownership.state, ownership.liveState, ownership.owner.kind,
|
|
141
142
|
ownership.owner.ownerEpoch, ownership.owner.runtimeInstanceRef, ownership.reasonCode] : "offline"]),
|
|
142
143
|
reasonCode: metadata?.archived ? metadataReason : ownership?.reasonCode ?? metadataReason
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"composerAvailable": { "type": "boolean" },
|
|
93
93
|
"needsAttention": { "type": "boolean" },
|
|
94
94
|
"managedHelpers": { "type": "object", "additionalProperties": false, "required": ["active", "maximum"], "properties": {"active": {"type": ["integer", "null"], "minimum": 0, "maximum": 4}, "maximum": {"type": "integer", "minimum": 0, "maximum": 4}} },
|
|
95
|
-
"managedThinkingLevels": {"type": "array", "uniqueItems": true, "maxItems": 7, "items": {"enum": ["off","minimal","low","medium","high","xhigh","max"]}},
|
|
95
|
+
"managedThinkingLevels": {"type": "array", "uniqueItems": true, "maxItems": 7, "items": {"enum": ["off","minimal","low","medium","high","xhigh","max"]}}, "managedPermission": {"enum": ["workspace-write","trusted-full-access"]},
|
|
96
96
|
"managedPlan": { "type": "object", "additionalProperties": false, "required": ["steps"], "properties": {
|
|
97
97
|
"steps": { "type": "array", "minItems": 1, "maxItems": 30, "items": { "type": "object", "additionalProperties": false, "required": ["step", "status"], "properties": {
|
|
98
98
|
"step": { "type": "string", "minLength": 1, "maxLength": 200 }, "status": { "enum": ["pending", "in_progress", "completed"] } } } } } },
|