mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-10 12:37:55 +01:00
fix(chat): name the managed-profile CLI and the dev-only labs in agent guidance
Chat agents told people to create a Claude Managed Agent profile "in the Paperclip web app", which has no such page; the catalog never said profiles are created with `paperclipai managed-agent setup`. Agents asked to open the task-chat lab on a production instance probed its bundle in a headless browser for dozens of steps because nothing said the labs exist only in a dev build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
524e2f3c76
commit
6bf26629f4
4 files changed
+21
-1
No files matched your search
@@ -1047,6 +1047,13 @@ describe("chat prompt policy", () => {
|
||||
expect(prompt).toContain("/<prefix>/agents/<agentId>/runs/<runId>");
|
||||
});
|
||||
|
||||
it("says developer labs exist only under pnpm dev in the person's own checkout", () => {
|
||||
expect(AGENT_CHAT_DIRECTIVE).toContain("registered only in a development build of the UI");
|
||||
expect(AGENT_CHAT_DIRECTIVE).toContain("running pnpm dev in their own Paperclip checkout and visiting /<prefix>/dev/task-chat-lab");
|
||||
const prompt = buildPaperclipTaskMarkdown({ issue: { id: "chat", identifier: null, title: "Chat", workMode: "ask", conversationAgentId: "agent" } });
|
||||
expect(prompt).toContain("/<prefix>/dev/task-chat-lab");
|
||||
});
|
||||
|
||||
it("routes a person's own profile change to their profile settings instead of an agent write", () => {
|
||||
expect(AGENT_CHAT_DIRECTIVE).toContain("only they can change them in their profile settings at /<prefix>/company/settings/instance/profile");
|
||||
expect(AGENT_CHAT_DIRECTIVE).toContain("link that page instead of attempting the change");
|
||||
|
||||
@@ -331,6 +331,16 @@ function loadSpecRoutes() {
|
||||
}
|
||||
|
||||
describe("openapi routes", () => {
|
||||
it("tells agents managed-agent profiles are created with the CLI, not a web page", () => {
|
||||
const route = buildOpenApiSpec().paths["/api/companies/{companyId}/managed-agent-profiles"];
|
||||
for (const operation of [route.get, route.post]) {
|
||||
expect(operation.description).toContain("Board only");
|
||||
expect(operation.description).toContain("There is no web page");
|
||||
}
|
||||
expect(route.post.description).toContain("paperclipai managed-agent setup");
|
||||
expect(route.post.description).toContain("--acknowledge-retention");
|
||||
});
|
||||
|
||||
it("documents the export include body so agents can request projects and skills", () => {
|
||||
const spec = buildOpenApiSpec();
|
||||
for (const path of ["/api/companies/{companyId}/exports", "/api/companies/{companyId}/exports/preview"]) {
|
||||
|
||||
@@ -7575,6 +7575,7 @@ registry.registerPath({
|
||||
path: "/api/companies/{companyId}/managed-agent-profiles",
|
||||
tags: ["agents"],
|
||||
summary: "List Claude Managed Agent profiles for a company",
|
||||
description: "Board only: agent credentials get 403. There is no web page for Claude Managed Agent profiles; see the POST route for how a board user creates one.",
|
||||
request: { params: z.object({ companyId: z.string() }) },
|
||||
responses: { 200: r.ok(), 401: r.unauthorized, 403: r.forbidden },
|
||||
});
|
||||
@@ -7584,7 +7585,7 @@ registry.registerPath({
|
||||
path: "/api/companies/{companyId}/managed-agent-profiles",
|
||||
tags: ["agents"],
|
||||
summary: "Create or operator-attest a Claude Managed Agent profile",
|
||||
description: "Board only: agent credentials get 403. A Claude Managed Agent runs on Anthropic's managed-agents beta. A board operator creates the company profile with an Anthropic API-key secret and a limited environment (no hosts, no packages), attests its qualification and explicitly acknowledges stateful retention before it can be enabled.",
|
||||
description: "Board only: agent credentials get 403. A Claude Managed Agent runs on Anthropic's managed-agents beta. A board operator creates the company profile with an Anthropic API-key secret and a limited environment (no hosts, no packages), attests its qualification and explicitly acknowledges stateful retention before it can be enabled. There is no web page for this: the board user runs the CLI command `paperclipai managed-agent setup --profile-key <key> --display-name <name> --api-key-secret-id <secretId> --acknowledge-retention` with ANTHROPIC_API_KEY set in their shell (add --probe for a read-only qualification check first). It creates or adopts the limited Anthropic Agent and Environment, qualifies them and calls this route with board credentials. The secret itself is added on the company Secrets page, /<prefix>/company/settings/secrets.",
|
||||
request: {
|
||||
params: z.object({ companyId: z.string() }),
|
||||
body: jsonBody(
|
||||
|
||||
@@ -119,6 +119,8 @@ When a reply lists many tasks, write each task identifier in full, such as RUN-1
|
||||
|
||||
A person's own display name and avatar belong to their account, and only they can change them in their profile settings at /<prefix>/company/settings/instance/profile. Agent credentials cannot edit a person's profile, and renaming an agent, a member record or the company does not change it. When the person asks to change their own name or avatar, link that page instead of attempting the change.
|
||||
|
||||
Developer labs, such as the task-chat interaction lab at /<prefix>/dev/task-chat-lab, are registered only in a development build of the UI. A production or hosted instance has no such page, and nothing here can enable one, so do not probe its bundle or try to open the lab with a browser. Tell the person the lab is development-only and that they can open it by running pnpm dev in their own Paperclip checkout and visiting /<prefix>/dev/task-chat-lab on that dev server.
|
||||
|
||||
This conversation and your credentials belong to one company. A task identifier whose prefix differs from this conversation's prefix belongs to another company or to none, and you cannot read it here, even when the person can open it themselves: a lookup that is not found does not mean the task does not exist. Do not search for it further, guess its content or copy anything from it. Say that this chat can only work in this company, and that to use that task the person can switch to its company and open a chat there. Link the task at /<its prefix>/issues/<identifier>, taking the prefix from the identifier the person gave; this is the one link that does not use this conversation's prefix.
|
||||
|
||||
Tasks and projects in this company can be private. A private task is hidden from you unless you have access to it: your searches, lists and direct lookups leave it out or return not found, even when the person who asks can open it. So when the person refers to a task in this company that one search does not find, especially one they call private, it may be private rather than missing. Do not search for it further through other tools, endpoints, files or activity records, and do not guess its content. Say that this chat cannot see that task, possibly because it is private, and that if they want you to work on it they can open the task and share it with you from its sharing controls, or paste the parts they want here.
|
||||
|
||||
Reference in new issue
Block a user