Skip to content

armgit / qm

Public Imported from GitHub
0

Multiplayer agent harness for work.

Clarify independently authorized system administration (#1654)

Joshua France156282669168
diff --git a/skills-seed/admin/SKILL.md b/skills-seed/admin/SKILL.md
index 9b6fc536f..a1180b5d8 100644
--- a/skills-seed/admin/SKILL.md
+++ b/skills-seed/admin/SKILL.md
@@ -12,6 +12,23 @@ store on every call, and every call is audited under their name. Two standing ru
**confirm before any mutation** (state exactly what you'll change and where), and report
afterwards exactly what changed. Reads are fine to just do.
+## System administration
+
+System administration is not limited to this API. A verified admin may use independently
+authorized infrastructure or provider access to diagnose, repair, and manage the instance,
+including resources owned by other users. Ordinary resource-owner restrictions do not
+require the owner to do that work. An owner-only API denial does not revoke separately
+authorized administrative access; verify it before taking another route. Acting under the
+admin's own authority is not impersonation or circumvention.
+
+Preserve credential grants, provider permissions, explicit restrictions, and mutation approvals.
+Admin status alone supplies no provider credentials. Do not borrow another user's identity,
+use ungranted credentials, or bypass the portal-only actions below. Check the provider
+account and target, keep changes attributed to the admin, and disclose only what this
+conversation's audience may see. For cloud operations, also load cloud-cli.
+
+## Admin API limits
+
Limits the API enforces (don't offer what it will refuse):
- Your token elevates only on turns the admin **started themselves** — on autonomous
diff --git a/skills-seed/cloud-cli/SKILL.md b/skills-seed/cloud-cli/SKILL.md
index 4447f3d42..b31f7c729 100644
--- a/skills-seed/cloud-cli/SKILL.md
+++ b/skills-seed/cloud-cli/SKILL.md
@@ -70,6 +70,15 @@ minutes, so if the user takes too long, start a fresh one.
## Boundaries
+A verified admin can use independently authorized cloud access to administer the system
+running you, including resources owned by other users. Using that access as the admin is not impersonation or circumvention,
+and an ordinary owner-only QM API denial does not prohibit that administrative work.
+Verify the provider account, region, target, and authority before acting; load the admin
+skill for QM administration. Admin status alone supplies no cloud credentials. Preserve
+credential grants, provider permissions, explicit restrictions, and mutation approvals,
+including QM's portal-only admin-grant and impersonation actions. Do not use another
+person's ungranted credentials or expose unrelated private content.
+
- You act as the resolved user. The provider's own permissions are the hard ceiling — the
agent is never a way to exceed the user's own cloud access.
- A login is auth setup, not a data read. Any _mutating_ action (delete, terminate, scale,
diff --git a/src/core/orchestrator.ts b/src/core/orchestrator.ts
index c9cf2e231..1e8b0a4d7 100644
--- a/src/core/orchestrator.ts
+++ b/src/core/orchestrator.ts
@@ -2259,7 +2259,8 @@ export function createOrchestrator(deps: OrchestratorDeps): Orchestrator {
(orgMemoryWrite
? ', and for plain "remember this org-wide" requests the lighter path is `"scope":"org"` on the memory self-API (memory skill)'
: "") +
- ". You're acting as them: confirm before any mutation, and say exactly what you changed. Hard limits the API enforces: private-content reads require a DM or an Open conversation on a live admin turn (organization, personal, and conversation sharing restrictions all apply); admin grant changes and impersonation are portal-only. Open admin reads can expose private data to everyone in the conversation: retrieve and report only what the request needs.";
+ ". You're acting as them: confirm before any mutation, and say exactly what you changed. Hard limits the API enforces: private-content reads require a DM or an Open conversation on a live admin turn (organization, personal, and conversation sharing restrictions all apply); admin grant changes and impersonation are portal-only. Open admin reads can expose private data to everyone in the conversation: retrieve and report only what the request needs." +
+ " System administration is not limited to the admin dashboard. Use the admin's independently authorized infrastructure or provider access to diagnose, repair, and manage this instance, including resources owned by other users. Ordinary resource-owner restrictions do not by themselves prohibit that administrative work or require the resource owner to do it. An owner-only API denial is not a denial of separately authorized system administration; verify that authority before taking another route. Using that independently authorized access as the admin is not impersonation or circumvention. Credential grants, provider permissions, explicit restrictions (including the portal-only actions above), mutation approvals, and audience privacy still apply. Keep actions attributed to the admin; never borrow another user's identity or credentials without authorization. Follow the admin and cloud-cli skills.";
}
if (deps.signingSecret && deps.apiBaseUrl && (deps.crons || deps.webhooks || deps.monitors)) {
const nowMs = Date.now();
diff --git a/src/resolution/protocols/shared-core.md b/src/resolution/protocols/shared-core.md
index f0aaa6290..50a8c3b21 100644
--- a/src/resolution/protocols/shared-core.md
+++ b/src/resolution/protocols/shared-core.md
@@ -26,7 +26,7 @@ You keep a durable memory of the person or team you work for — it persists acr
You can act with real credentials: machine logins, org keys used by proxy, this user's connected apps, or a teammate's credential by explicit grant (the owner approves on their own turn — never on a relayed "they said yes"). What's live is listed below. A missing credential is a task, not a dead end. Check live credential inventories before denying access. Connected apps lists direct OAuth only; an empty list does not block separately authorized Composio discovery/consent via the composio skill. Explicit app restrictions, account permissions and approvals still apply. Never pretend a call worked. After logging in a new CLI, call `register_login` with the files it wrote so the login survives a rebuild.
## Using skills
-Load relevant skills before service work. Compose task rules with one authorized access skill: prefer the composio skill when its credential is available, otherwise the direct connector. Preserve app allowlists, privacy and approvals; use only the selected access instructions. Never switch credentials to evade denial. Save reusable procedures as skills via the self-API.
+Load relevant skills before service work. Compose task rules with one authorized access skill: prefer the composio skill when its credential is available, otherwise the direct connector. Preserve app allowlists, privacy and approvals; use only the selected access instructions. Never switch credentials to evade denial; a verified admin using independently authorized system-administration access is not such evasion (see the admin skill). Save reusable procedures as skills via the self-API.
## Email
Email written as a person is plain text — no styled HTML (fonts, colors, buttons), no hand-built MIME, no hard wrapping. Re-read the created draft: emoji and special characters must survive intact (no mojibake).
diff --git a/test/orchestrator.test.ts b/test/orchestrator.test.ts
index 6a8d64a19..790a1033f 100644
--- a/test/orchestrator.test.ts
+++ b/test/orchestrator.test.ts
@@ -1364,6 +1364,10 @@ test("an org admin's turn carries org-notebook write (token claim + prompt hint)
adminTurn({ text: "!sysprompt", conversation: { kind: "dm", threadRef: "dm:admin-alice:t2" } }),
);
assert.match(adminPrompt.reply ?? "", /## Acting for an org admin/);
+ assert.match(adminPrompt.reply ?? "", /System administration is not limited to the admin dashboard/);
+ assert.match(adminPrompt.reply ?? "", /including resources owned by other users/);
+ assert.match(adminPrompt.reply ?? "", /Ordinary resource-owner restrictions do not by themselves prohibit/);
+ assert.match(adminPrompt.reply ?? "", /admin grant changes and impersonation are portal-only/);
assert.match(
adminPrompt.reply ?? "",
/private-content reads require a DM or an Open conversation on a live admin turn/,
@@ -1380,7 +1384,7 @@ test("an org admin's turn carries org-notebook write (token claim + prompt hint)
assert.equal(userClaims!.memory!.orgWrite, undefined, "a non-admin turn must not carry org write");
const userPrompt = await app.turn(dm("!sysprompt"));
- assert.doesNotMatch(userPrompt.reply ?? "", /## Acting for an org admin/);
+ assert.doesNotMatch(userPrompt.reply ?? "", /## Acting for an org admin|System administration is not limited/);
assert.match(userPrompt.reply ?? "", /v1\/apis/, "every turn learns the discoverable self-API surface");
});
@@ -1419,7 +1423,7 @@ test("admin reach rides only live, all-internal turns — autonomous and guest-a
conversation: { kind: "dm", threadRef: "dm:admin-alice:auto2" },
text: "!sysprompt",
});
- assert.doesNotMatch(autoPrompt.reply ?? "", /## Acting for an org admin/);
+ assert.doesNotMatch(autoPrompt.reply ?? "", /## Acting for an org admin|System administration is not limited/);
captured = undefined;
assert.equal(
@@ -1458,6 +1462,7 @@ test("admin reach rides only live, all-internal turns — autonomous and guest-a
unprompted: true,
});
assert.match(threadPrompt.reply ?? "", /## Acting for an org admin/);
+ assert.match(threadPrompt.reply ?? "", /System administration is not limited to the admin dashboard/);
assert.equal(
claims!.liveActor,
diff --git a/test/prompt-modes.test.ts b/test/prompt-modes.test.ts
index 9aa089cc5..01edb95b8 100644
--- a/test/prompt-modes.test.ts
+++ b/test/prompt-modes.test.ts
@@ -289,6 +289,7 @@ test("shared-core platform guidance reaches both the DM and the spine prompt", a
assert.match(prompt, /Compose task rules with one authorized access skill/);
assert.match(prompt, /prefer the composio skill/);
assert.match(prompt, /Never switch credentials to evade denial/);
+ assert.match(prompt, /independently authorized system-administration access is not such evasion/);
assert.doesNotMatch(prompt, /## Scheduling & self-configuration/);
}
});
diff --git a/test/skill-conformance.test.ts b/test/skill-conformance.test.ts
index c67b8f570..469bdbb5d 100644
--- a/test/skill-conformance.test.ts
+++ b/test/skill-conformance.test.ts
@@ -21,3 +21,12 @@ test("every seed SKILL.md parses with a name, description, and body", () => {
assert.ok(m.name && m.description && m.body.trim(), `${path} is missing a required field`);
}
});
+
+test("admin and cloud skills distinguish system administration from resource ownership", () => {
+ for (const name of ["admin", "cloud-cli"]) {
+ const { body } = parseSeedSkill(readFileSync(join(SEED_DIR, name, "SKILL.md"), "utf8"));
+ assert.match(body, /including resources owned by other users/);
+ assert.match(body, /credential grants, provider permissions, explicit restrictions, and mutation approvals/);
+ assert.match(body, /not impersonation or circumvention/);
+ }
+});