Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

feat(agent): name connectable apps so Agents post an authorization card

jeffrey4e1e02b7d4be
diff --git a/apps/node-services/src/agent/agent-features/context-instructions/context-instructions.ts b/apps/node-services/src/agent/agent-features/context-instructions/context-instructions.ts
index 64a9f0a4..f564f83b 100644
--- a/apps/node-services/src/agent/agent-features/context-instructions/context-instructions.ts
+++ b/apps/node-services/src/agent/agent-features/context-instructions/context-instructions.ts
@@ -33,6 +33,8 @@ interface ExecutionContextDeveloperInstructionsCommonInput {
readonly connectedApps: boolean;
/** Keys of the apps with an account granted to this Agent. */
readonly connectedAppKeys: readonly string[];
+ /** Keys of every catalog app the Human can connect. */
+ readonly connectableAppKeys: readonly string[];
/** The Runtime model's context window is small: use the compact recipe. */
readonly compactInstructions: boolean;
}
@@ -78,6 +80,7 @@ export const assembleExecutionContextDeveloperInstructions = (
roomKind: input.roomKind,
connectedApps: input.connectedApps,
connectedAppKeys: input.connectedAppKeys,
+ connectableAppKeys: input.connectableAppKeys,
});
const fragments: string[] = [
renderAgentInstructions({
diff --git a/apps/node-services/src/agent/agent-features/context-instructions/feature.ts b/apps/node-services/src/agent/agent-features/context-instructions/feature.ts
index 8945c6cd..4a3ac0a2 100644
--- a/apps/node-services/src/agent/agent-features/context-instructions/feature.ts
+++ b/apps/node-services/src/agent/agent-features/context-instructions/feature.ts
@@ -37,6 +37,7 @@ export const createContextInstructionsFeature = (): FeatureDeclaration =>
sponsor: view.identity.sponsor,
connectedApps: facts.connectedApps,
connectedAppKeys: facts.connectedAppKeys,
+ connectableAppKeys: facts.connectableAppKeys,
compactInstructions: facts.compactInstructions,
...contextPromptInput,
});
diff --git a/apps/node-services/src/agent/agent-features/contracts.ts b/apps/node-services/src/agent/agent-features/contracts.ts
index 1a31a635..2e1fbecb 100644
--- a/apps/node-services/src/agent/agent-features/contracts.ts
+++ b/apps/node-services/src/agent/agent-features/contracts.ts
@@ -86,6 +86,8 @@ export interface ContextInstructionFacts {
readonly connectedApps: boolean;
/** Keys of the apps with an account granted to this Agent, such as gmail. */
readonly connectedAppKeys: readonly string[];
+ /** Keys of every catalog app the Human can connect, such as linear. */
+ readonly connectableAppKeys: readonly string[];
/**
* The placed Runtime model's context window is at most 128K tokens, so
* every section uses its compact version.
diff --git a/apps/node-services/src/agent/executor/activation.ts b/apps/node-services/src/agent/executor/activation.ts
index c9fd2e1e..45f1e5f7 100644
--- a/apps/node-services/src/agent/executor/activation.ts
+++ b/apps/node-services/src/agent/executor/activation.ts
@@ -430,19 +430,23 @@ async function activateContextRuntime<TRuntimeSettings>(
runtimeSessionStartsFresh(request.previousSession),
});
void featurePreparationPromise.catch(() => undefined);
- const { executionResources, connectedApps, connectedAppKeys } =
- await resolveActivationInputs({
- options,
- request,
- acquired,
- signal,
- earlyWorkSignal,
- logger,
- enterStage,
- runtimeInstanceKey,
- ordinaryMeta,
- contextResolutionRequired,
- });
+ const {
+ executionResources,
+ connectedApps,
+ connectedAppKeys,
+ connectableAppKeys,
+ } = await resolveActivationInputs({
+ options,
+ request,
+ acquired,
+ signal,
+ earlyWorkSignal,
+ logger,
+ enterStage,
+ runtimeInstanceKey,
+ ordinaryMeta,
+ contextResolutionRequired,
+ });
signal.throwIfAborted();
const featurePreparation = await featurePreparationPromise;
enterStage("prepare_runtime_view");
@@ -454,6 +458,7 @@ async function activateContextRuntime<TRuntimeSettings>(
featurePreparation.developerInstructions,
connectedApps,
connectedAppKeys,
+ connectableAppKeys,
compactInstructions,
),
executionResources,
@@ -565,12 +570,14 @@ async function resolveActivationInputs<TRuntimeSettings>({
readonly executionResources: ExecutionResources | undefined;
readonly connectedApps: boolean | undefined;
readonly connectedAppKeys: readonly string[];
+ readonly connectableAppKeys: readonly string[];
}> {
const agentResourcesResolver = options.agentResourcesResolver;
const mcpContextResolver = options.mcpContextResolver;
// Read with the Agent's effective resources; renders the instructions.
let connectedApps: boolean | undefined;
let connectedAppKeys: readonly string[] = [];
+ let connectableAppKeys: readonly string[] = [];
const readAgentResources = async (resolveSignal: AbortSignal) => {
const resourcesResolveStartedAt = performance.now();
const current = await agentResourcesResolver!.resolve({
@@ -582,6 +589,7 @@ async function resolveActivationInputs<TRuntimeSettings>({
});
connectedApps = current.connectedApps;
connectedAppKeys = current.connectedAppKeys;
+ connectableAppKeys = current.connectableAppKeys;
return current;
};
let executionResources: ExecutionResources | undefined;
@@ -631,7 +639,12 @@ async function resolveActivationInputs<TRuntimeSettings>({
if (pendingExecutionResources) {
executionResources = await pendingExecutionResources;
}
- return { executionResources, connectedApps, connectedAppKeys };
+ return {
+ executionResources,
+ connectedApps,
+ connectedAppKeys,
+ connectableAppKeys,
+ };
}
const currentExecutionResources = (
@@ -665,6 +678,7 @@ const instructedAgent = <TRuntimeSettings>(
featureInstructions: readonly string[],
connectedApps: boolean | undefined,
connectedAppKeys: readonly string[],
+ connectableAppKeys: readonly string[],
compactInstructions: boolean,
): AgentDefinition => {
const instructed =
@@ -673,6 +687,7 @@ const instructedAgent = <TRuntimeSettings>(
? request.renderDeveloperInstructions({
connectedApps: connectedApps ?? true,
connectedAppKeys,
+ connectableAppKeys,
compactInstructions,
})
: request.agent.developerInstructions;
diff --git a/apps/node-services/src/agent/executor/context-executor.ts b/apps/node-services/src/agent/executor/context-executor.ts
index 21a65975..36a25cb4 100644
--- a/apps/node-services/src/agent/executor/context-executor.ts
+++ b/apps/node-services/src/agent/executor/context-executor.ts
@@ -330,6 +330,7 @@ export class ContextExecutor<TRuntimeSettings> {
instructedAgent(composed, this.#ghost.agent, this.record, {
connectedApps: true,
connectedAppKeys: [],
+ connectableAppKeys: [],
compactInstructions: false,
}),
),
diff --git a/apps/node-services/src/agent/executor/teamhub-context-resolvers.ts b/apps/node-services/src/agent/executor/teamhub-context-resolvers.ts
index 9fb9fbb3..637db5ce 100644
--- a/apps/node-services/src/agent/executor/teamhub-context-resolvers.ts
+++ b/apps/node-services/src/agent/executor/teamhub-context-resolvers.ts
@@ -23,6 +23,8 @@ export interface AgentEffectiveResources {
readonly connectedApps: boolean;
/** Sorted keys of the apps with an account granted to this Agent. */
readonly connectedAppKeys: readonly string[];
+ /** Sorted keys of every catalog app the Human can connect. */
+ readonly connectableAppKeys: readonly string[];
}
export interface AgentResourcesResolver {
@@ -69,7 +71,11 @@ export const parseAgentEffectiveResources = (
!Array.isArray(value.skills) ||
typeof value.connected_apps !== "boolean" ||
!Array.isArray(value.connected_app_keys) ||
- !value.connected_app_keys.every((key: unknown) => typeof key === "string")
+ !value.connected_app_keys.every(
+ (key: unknown) => typeof key === "string",
+ ) ||
+ !Array.isArray(value.connectable_app_keys) ||
+ !value.connectable_app_keys.every((key: unknown) => typeof key === "string")
)
throw new TypeError("Invalid Agent effective resources");
const resources = parseExecutionResources({
@@ -95,6 +101,7 @@ export const parseAgentEffectiveResources = (
skills: resources.skills,
connectedApps: value.connected_apps,
connectedAppKeys: Object.freeze([...value.connected_app_keys]),
+ connectableAppKeys: Object.freeze([...value.connectable_app_keys]),
});
};
diff --git a/apps/node-services/src/agent/prompt/compact-meta-instructions.ts b/apps/node-services/src/agent/prompt/compact-meta-instructions.ts
index 181a311c..63365c87 100644
--- a/apps/node-services/src/agent/prompt/compact-meta-instructions.ts
+++ b/apps/node-services/src/agent/prompt/compact-meta-instructions.ts
@@ -2,7 +2,10 @@ import type { AgentType } from "../executor/types.js";
import type { MetaRoomKind } from "../executor/context-ref.js";
import { COMPACT_PACKAGE_ENVIRONMENT } from "./environment-knowledge.js";
import type { MetaInstructionsInput } from "./meta-instructions.js";
-import { connectedAppsAtRunStart } from "./connected-apps.js";
+import {
+ connectableAppsRule,
+ connectedAppsAtRunStart,
+} from "./connected-apps.js";
import { renderPersonalContextMethod } from "./personal-context-method.js";
import { PERSONAL_KNOWLEDGE_POLICY_COMPACT } from "./personal-knowledge-policy.js";
import { serializePromptData } from "./prompt-data.js";
@@ -149,13 +152,17 @@ const authority = (agentType: AgentType, roomKind: MetaRoomKind): string => {
].join("\n\n");
};
-const connectedAppsCommands = (connectedAppKeys: readonly string[]): string => `
-- Connected apps: gmail, outlook, gcal, gdrive, slack, notion, and figma have their own commands (teamhub gmail --help). For other apps, find the tool with teamhub apps search "<the action in English, with the app name>", then run teamhub apps execute --connectionId <id> --toolSlug <slug> --toolVersion <version> --arguments '<json>'. When this Run started, ${connectedAppsAtRunStart(connectedAppKeys)}; use them without checking first, and check teamhub apps list only when the Human says they connected or disconnected an app during this conversation or a command reports that the account is not connected. When an app the Human wants to use has no account, teamhub apps connect <app-key> posts an authorization card. Never resend a write whose outcome is unknown; check the app first.`;
+const connectedAppsCommands = (
+ connectedAppKeys: readonly string[],
+ connectableAppKeys: readonly string[],
+): string => `
+- Connected apps: gmail, outlook, gcal, gdrive, slack, notion, and figma have their own commands (teamhub gmail --help). For other apps, find the tool with teamhub apps search "<the action in English, with the app name>", then run teamhub apps execute --connectionId <id> --toolSlug <slug> --toolVersion <version> --arguments '<json>'. When this Run started, ${connectedAppsAtRunStart(connectedAppKeys)}; use them without checking first, and check teamhub apps list only when the Human says they connected or disconnected an app during this conversation or a command reports that the account is not connected. Never resend a write whose outcome is unknown; check the app first.${connectableAppsRule(connectableAppKeys)}`;
const commands = (
agentType: AgentType,
connectedApps: boolean,
connectedAppKeys: readonly string[],
+ connectableAppKeys: readonly string[],
): string =>
`TeamHub commands, all run through your shell tool (teamhub <domain> <action> --help explains each; credentials are installed, never read them)
- Run each teamhub command on its own, never joined with &&, pipes, or $(...); a joined command waits for approval. Write a file first, then pass its path.
@@ -169,7 +176,7 @@ const commands = (
Add "multiple": true to allow several options. Every question must be answered. Ask an open question or a missing fact in your reply instead.
- To show something the person looks at or uses here and now (a quick chart, dashboard, checklist or small tool), send it inline as a chat card (read the chat-card skill first); use the artifact skill only for a file to share, print, present or keep, or when a file is asked for.
- For a Human-requested deck or PPT, first ask for any missing audience, style or number of slides with one question card, and read the slide-deck skill before starting its Task. For proactive preparation, infer the audience, style and slide count from the occasion without a question card. Build new .pptx decks with the built-in pptx skill, even when another Skill also covers presentations.
-- Agents: teamhub room invite --agent-id <actor-id> brings an Agent from teamhub agent list into this Room (not a direct chat); teamhub agent create --name "<name>" --prompt "<working instructions>" adds a new teammate; ${agentType === "anotherme" ? 'teamhub agent update --agent-id <actor-id> --prompt "..." changes an Agent you manage' : 'teamhub agent update --prompt "..." changes you, or add --agent-id <actor-id> for an Agent you manage'}. A change to an established Agent waits for approval.${connectedApps ? connectedAppsCommands(connectedAppKeys) : ""}
+- Agents: teamhub room invite --agent-id <actor-id> brings an Agent from teamhub agent list into this Room (not a direct chat); teamhub agent create --name "<name>" --prompt "<working instructions>" adds a new teammate; ${agentType === "anotherme" ? 'teamhub agent update --agent-id <actor-id> --prompt "..." changes an Agent you manage' : 'teamhub agent update --prompt "..." changes you, or add --agent-id <actor-id> for an Agent you manage'}. A change to an established Agent waits for approval.${connectedApps || connectableAppKeys.length > 0 ? connectedAppsCommands(connectedAppKeys, connectableAppKeys) : ""}
- With --operation-id, use a unique id per write; after an unknown outcome, rerun the same command with the id the error printed.`;
const environment = (input: MetaInstructionsInput): string =>
@@ -177,7 +184,7 @@ const environment = (input: MetaInstructionsInput): string =>
This is Room ${input.roomId}, ${input.roomKind === "direct" ? "a direct chat with one Human" : "a collaboration Room"}. New messages arrive in your input; other Rooms you can read are reference only. Keep files in ./playground/${input.roomId}/; ./playground/<task-id>/ holds a Task's live output (read only).
${COMPACT_PACKAGE_ENVIRONMENT}
-${commands(input.agentType, input.connectedApps, input.connectedAppKeys)}`;
+${commands(input.agentType, input.connectedApps, input.connectedAppKeys, input.connectableAppKeys)}`;
/** Room Meta recipe for small context windows; same section order. */
export function renderCompactMetaInstructions(
diff --git a/apps/node-services/src/agent/prompt/connected-apps.ts b/apps/node-services/src/agent/prompt/connected-apps.ts
index 8db6b801..4902a431 100644
--- a/apps/node-services/src/agent/prompt/connected-apps.ts
+++ b/apps/node-services/src/agent/prompt/connected-apps.ts
@@ -1,3 +1,14 @@
+/**
+ * Names the catalog apps the Human can connect and routes a request about one
+ * of them to the connected app commands, so an unconnected app gets an
+ * authorization card instead of a browser session.
+ */
+export function connectableAppsRule(keys: readonly string[]): string {
+ return keys.length === 0
+ ? ""
+ : ` Apps the Human can connect: ${keys.join(", ")}. When a request involves one of these apps, including a link to it, use teamhub apps, not the browser: with no account, run teamhub apps connect <app-key> to post an authorization card instead of asking for credentials, and end your turn; the card result wakes you. Then find the tool with teamhub apps search and run it with teamhub apps execute.`;
+}
+
/** Names the apps the Agent could use when the Run started, by app key. */
export function connectedAppsAtRunStart(keys: readonly string[]): string {
return keys.length === 0
diff --git a/apps/node-services/src/agent/prompt/meta-instructions.ts b/apps/node-services/src/agent/prompt/meta-instructions.ts
index 5cfe6e2b..1dd71351 100644
--- a/apps/node-services/src/agent/prompt/meta-instructions.ts
+++ b/apps/node-services/src/agent/prompt/meta-instructions.ts
@@ -4,7 +4,10 @@ import type {
AgentType,
} from "../executor/types.js";
import type { MetaRoomKind } from "../executor/context-ref.js";
-import { connectedAppsAtRunStart } from "./connected-apps.js";
+import {
+ connectableAppsRule,
+ connectedAppsAtRunStart,
+} from "./connected-apps.js";
import { renderPersonalContextMethod } from "./personal-context-method.js";
import { PERSONAL_KNOWLEDGE_POLICY } from "./personal-knowledge-policy.js";
import { serializePromptData } from "./prompt-data.js";
@@ -21,6 +24,8 @@ export interface MetaInstructionsInput {
readonly connectedApps: boolean;
/** Keys of the apps with an account granted to this Agent. */
readonly connectedAppKeys: readonly string[];
+ /** Keys of every catalog app the Human can connect. */
+ readonly connectableAppKeys: readonly string[];
}
const identity = (input: {
@@ -221,13 +226,17 @@ const WORKSPACE = `Your workspace
- npm and uv are not always installed. If npm, uv, or a system tool you need is missing, ask the user whether to install it. Don't install anything globally (apt, brew, conda, pip --user, npm -g) without the user's yes: that changes the user's computer.
- Extract archives with tar --no-same-owner.`;
-const connectedAppsCommands = (connectedAppKeys: readonly string[]): string => `
-- Connected apps: when this Run started, ${connectedAppsAtRunStart(connectedAppKeys)}. Use them without checking first. Check teamhub apps list only when this may be out of date: the Human says they connected or disconnected an app during this conversation, or an app command reports that the account is not connected. When the Human wants to use an app that isn't listed, run teamhub apps connect <app-key> to post an authorization card here instead of asking for credentials. Never automatically resend a teamhub apps execute call whose outcome is unknown; check the app first. To turn the Human's auto reminders for Gmail, Outlook, Google Calendar or Slack on or off, use teamhub apps auto-reminders list and set (Another Me only).`;
+const connectedAppsCommands = (
+ connectedAppKeys: readonly string[],
+ connectableAppKeys: readonly string[],
+): string => `
+- Connected apps: when this Run started, ${connectedAppsAtRunStart(connectedAppKeys)}. Use them without checking first. Check teamhub apps list only when this may be out of date: the Human says they connected or disconnected an app during this conversation, or an app command reports that the account is not connected.${connectableAppsRule(connectableAppKeys)} Never automatically resend a teamhub apps execute call whose outcome is unknown; check the app first. To turn the Human's auto reminders for Gmail, Outlook, Google Calendar or Slack on or off, use teamhub apps auto-reminders list and set (Another Me only).`;
const commands = (
agentType: AgentType,
connectedApps: boolean,
connectedAppKeys: readonly string[],
+ connectableAppKeys: readonly string[],
): string => `TeamHub commands
- Use the teamhub CLI through your shell for everything in the workspace. teamhub --help and teamhub <domain> <action> --help describe the commands; TeamHub checks your authority on every call, so help is not a permission list. Credentials are installed for you: never read, print, copy, or override them. Add --json when you need structured output.
- Run each teamhub command on its own, not joined with cd, mkdir, cat, pipes, or $(...): alone, the commands you are allowed run without review, while a joined command goes to review and can wait for your Sponsor's approval. Write a file with your file tool first, then pass its path.
@@ -236,7 +245,7 @@ const commands = (
- A Thread is part of this Room and reuses your role here. Its root message is context, not a new request. Read it with teamhub message read --thread <thread-id> and reply only into that Thread, never into the Room itself: message send, message card, and message ask-user all take --thread <thread-id>.
- Documents are identified by document_id, not filenames, and aren't mounted locally. You can read, edit and manage every Document your Human has. Find them with teamhub docs list (--shared lists the ones someone shared with you to look at), read them with teamhub docs get <document-id>, and create one with teamhub docs create --title "..." --file <markdown-path>. Deliver an existing file with teamhub message send --attach <path>. To show a Document in a reply, send one complete --message whose segments end with {"type":"document","document_id":"<document-id>","content":"<title>","presentation":"card"}, so it appears as a file card instead of a link.
- Tasks: teamhub task check lists the Tasks you delegated from this Room; teamhub task check --task-id <id> shows its status, recent activity, pending approvals, and last report. A Task's reports reach you as private Task callbacks; read one again with teamhub message read --inbox taskmeta:<task-id>.
-- Routines: for something recurring in this Room, use teamhub routine create; for a one-off check at a set time, use --at <RFC 3339 time> instead of a schedule, never a recurring routine you plan to turn off later. Omit --mention-actor-id for plain text, pass self to wake yourself, or pass another Agent's actor id. To change one, get its id from teamhub routine list. Delete it when it is no longer needed, and to move it to another time, delete it and create a new one. Pause only when someone wants it stopped for now and resumed later. Delete or pause a routine someone else created only when they ask. Say it is deleted or paused only after the command succeeds. A routine wake is your own standing order, not someone typing: carry it out, and stay quiet when there's nothing worth saying.${connectedApps ? connectedAppsCommands(connectedAppKeys) : ""}
+- Routines: for something recurring in this Room, use teamhub routine create; for a one-off check at a set time, use --at <RFC 3339 time> instead of a schedule, never a recurring routine you plan to turn off later. Omit --mention-actor-id for plain text, pass self to wake yourself, or pass another Agent's actor id. To change one, get its id from teamhub routine list. Delete it when it is no longer needed, and to move it to another time, delete it and create a new one. Pause only when someone wants it stopped for now and resumed later. Delete or pause a routine someone else created only when they ask. Say it is deleted or paused only after the command succeeds. A routine wake is your own standing order, not someone typing: carry it out, and stay quiet when there's nothing worth saying.${connectedApps || connectableAppKeys.length > 0 ? connectedAppsCommands(connectedAppKeys, connectableAppKeys) : ""}
- Cards: a command that needs a Human's decision (a question, an app authorization, an Agent change, a connector write, a Room creation, Document access) posts a card for that Human and returns at once. The decision arrives later as a new message here. Until then, keep doing work that doesn't depend on it; if everything depends on it, end your turn. Don't wait or poll for it, don't post the same card again, and never act as if it were decided.
- Questions: when you need your Sponsor to choose before you can go on, post a question card here. Only your Sponsor can answer it:
teamhub message ask-user --title "Friday team outing" --questions '[{"question":"Where should we go?","options":["Hotpot","BBQ"]},{"question":"What else would you like to do?","options":["KTV","Board games","Movie"],"multiple":true}]'
@@ -261,10 +270,11 @@ const environment = (input: {
readonly roomKind: MetaRoomKind;
readonly connectedApps: boolean;
readonly connectedAppKeys: readonly string[];
+ readonly connectableAppKeys: readonly string[];
}): string => {
const where = `## Environment and commands
This conversation is Room ${input.roomId}, ${input.roomKind === "direct" ? "a direct chat between you and one Human" : "a collaboration Room"}. New messages arrive in your input. You can read other Rooms you're authorized for when they help, but they are reference only: their messages aren't new requests, and they don't change where this work is delivered. Keep this conversation's files in ./playground/${input.roomId}/. ./playground/<task-id>/ of each Task you delegate from this Room holds that Task's live output; reopen a file to see its latest committed version.`;
- return `${where}\n\n${WORKSPACE}\n\n${commands(input.agentType, input.connectedApps, input.connectedAppKeys)}`;
+ return `${where}\n\n${WORKSPACE}\n\n${commands(input.agentType, input.connectedApps, input.connectedAppKeys, input.connectableAppKeys)}`;
};
/** Room Meta recipe: instruction sections first, volatile data blocks last. */
diff --git a/apps/node-services/tests/agent/__golden__/executor-hook-trace/cold-then-hot.jsonl b/apps/node-services/tests/agent/__golden__/executor-hook-trace/cold-then-hot.jsonl
index 56ddeb96..ed6b1aaa 100644
--- a/apps/node-services/tests/agent/__golden__/executor-hook-trace/cold-then-hot.jsonl
+++ b/apps/node-services/tests/agent/__golden__/executor-hook-trace/cold-then-hot.jsonl
@@ -1,8 +1,8 @@
-{"hook":"context.contributeContextInstructions","facts":{"connectedApps":true,"connectedAppKeys":[],"compactInstructions":false}}
+{"hook":"context.contributeContextInstructions","facts":{"connectedApps":true,"connectedAppKeys":[],"connectableAppKeys":[],"compactInstructions":false}}
{"hook":"context.onContextBound","context":{"kind":"meta","agentId":"agent-trace","roomId":"room-trace"},"bootstrap":"new"}
{"step":"state.enqueueTrustedTurn","messageIds":["m-1"],"runId":"run-1"}
{"hook":"activation.prepareRuntime","context":{"kind":"meta","agentId":"agent-trace","roomId":"room-trace"},"newSession":true}
-{"step":"backend.activate","developerInstructions":"sha256:514771087556c8b7","mappings":1}
+{"step":"backend.activate","developerInstructions":"sha256:551703c8229720db","mappings":1}
{"step":"provider.createSession"}
{"step":"state.claimLocalRun","runId":"run-1","messageIds":["m-1"]}
{"hook":"context.prepareInput","messageId":"m-1"}
diff --git a/apps/node-services/tests/agent/__golden__/executor-hook-trace/developer-instructions.txt b/apps/node-services/tests/agent/__golden__/executor-hook-trace/developer-instructions.txt
index 75938ef6..9325a004 100644
--- a/apps/node-services/tests/agent/__golden__/executor-hook-trace/developer-instructions.txt
+++ b/apps/node-services/tests/agent/__golden__/executor-hook-trace/developer-instructions.txt
@@ -121,7 +121,7 @@ TeamHub commands
- Documents are identified by document_id, not filenames, and aren't mounted locally. You can read, edit and manage every Document your Human has. Find them with teamhub docs list (--shared lists the ones someone shared with you to look at), read them with teamhub docs get <document-id>, and create one with teamhub docs create --title "..." --file <markdown-path>. Deliver an existing file with teamhub message send --attach <path>. To show a Document in a reply, send one complete --message whose segments end with {"type":"document","document_id":"<document-id>","content":"<title>","presentation":"card"}, so it appears as a file card instead of a link.
- Tasks: teamhub task check lists the Tasks you delegated from this Room; teamhub task check --task-id <id> shows its status, recent activity, pending approvals, and last report. A Task's reports reach you as private Task callbacks; read one again with teamhub message read --inbox taskmeta:<task-id>.
- Routines: for something recurring in this Room, use teamhub routine create; for a one-off check at a set time, use --at <RFC 3339 time> instead of a schedule, never a recurring routine you plan to turn off later. Omit --mention-actor-id for plain text, pass self to wake yourself, or pass another Agent's actor id. To change one, get its id from teamhub routine list. Delete it when it is no longer needed, and to move it to another time, delete it and create a new one. Pause only when someone wants it stopped for now and resumed later. Delete or pause a routine someone else created only when they ask. Say it is deleted or paused only after the command succeeds. A routine wake is your own standing order, not someone typing: carry it out, and stay quiet when there's nothing worth saying.
-- Connected apps: when this Run started, no app had an account you can use. Use them without checking first. Check teamhub apps list only when this may be out of date: the Human says they connected or disconnected an app during this conversation, or an app command reports that the account is not connected. When the Human wants to use an app that isn't listed, run teamhub apps connect <app-key> to post an authorization card here instead of asking for credentials. Never automatically resend a teamhub apps execute call whose outcome is unknown; check the app first. To turn the Human's auto reminders for Gmail, Outlook, Google Calendar or Slack on or off, use teamhub apps auto-reminders list and set (Another Me only).
+- Connected apps: when this Run started, no app had an account you can use. Use them without checking first. Check teamhub apps list only when this may be out of date: the Human says they connected or disconnected an app during this conversation, or an app command reports that the account is not connected. Never automatically resend a teamhub apps execute call whose outcome is unknown; check the app first. To turn the Human's auto reminders for Gmail, Outlook, Google Calendar or Slack on or off, use teamhub apps auto-reminders list and set (Another Me only).
- Cards: a command that needs a Human's decision (a question, an app authorization, an Agent change, a connector write, a Room creation, Document access) posts a card for that Human and returns at once. The decision arrives later as a new message here. Until then, keep doing work that doesn't depend on it; if everything depends on it, end your turn. Don't wait or poll for it, don't post the same card again, and never act as if it were decided.
- Questions: when you need your Sponsor to choose before you can go on, post a question card here. Only your Sponsor can answer it:
teamhub message ask-user --title "Friday team outing" --questions '[{"question":"Where should we go?","options":["Hotpot","BBQ"]},{"question":"What else would you like to do?","options":["KTV","Board games","Movie"],"multiple":true}]'
diff --git a/apps/node-services/tests/agent/__golden__/executor-hook-trace/release.jsonl b/apps/node-services/tests/agent/__golden__/executor-hook-trace/release.jsonl
index 30e8913d..525198ad 100644
--- a/apps/node-services/tests/agent/__golden__/executor-hook-trace/release.jsonl
+++ b/apps/node-services/tests/agent/__golden__/executor-hook-trace/release.jsonl
@@ -1,8 +1,8 @@
-{"hook":"context.contributeContextInstructions","facts":{"connectedApps":true,"connectedAppKeys":[],"compactInstructions":false}}
+{"hook":"context.contributeContextInstructions","facts":{"connectedApps":true,"connectedAppKeys":[],"connectableAppKeys":[],"compactInstructions":false}}
{"hook":"context.onContextBound","context":{"kind":"meta","agentId":"agent-trace","roomId":"room-trace"},"bootstrap":"new"}
{"step":"state.enqueueTrustedTurn","messageIds":["m-1"],"runId":"run-1"}
{"hook":"activation.prepareRuntime","context":{"kind":"meta","agentId":"agent-trace","roomId":"room-trace"},"newSession":true}
-{"step":"backend.activate","developerInstructions":"sha256:514771087556c8b7","mappings":1}
+{"step":"backend.activate","developerInstructions":"sha256:551703c8229720db","mappings":1}
{"step":"provider.createSession"}
{"step":"state.claimLocalRun","runId":"run-1","messageIds":["m-1"]}
{"hook":"context.prepareInput","messageId":"m-1"}
diff --git a/apps/node-services/tests/agent/__golden__/executor-hook-trace/run-canceled.jsonl b/apps/node-services/tests/agent/__golden__/executor-hook-trace/run-canceled.jsonl
index 026ebd37..e39160bf 100644
--- a/apps/node-services/tests/agent/__golden__/executor-hook-trace/run-canceled.jsonl
+++ b/apps/node-services/tests/agent/__golden__/executor-hook-trace/run-canceled.jsonl
@@ -1,8 +1,8 @@
-{"hook":"context.contributeContextInstructions","facts":{"connectedApps":true,"connectedAppKeys":[],"compactInstructions":false}}
+{"hook":"context.contributeContextInstructions","facts":{"connectedApps":true,"connectedAppKeys":[],"connectableAppKeys":[],"compactInstructions":false}}
{"hook":"context.onContextBound","context":{"kind":"meta","agentId":"agent-trace","roomId":"room-trace"},"bootstrap":"new"}
{"step":"state.enqueueTrustedTurn","messageIds":["m-1"],"runId":"run-1"}
{"hook":"activation.prepareRuntime","context":{"kind":"meta","agentId":"agent-trace","roomId":"room-trace"},"newSession":true}
-{"step":"backend.activate","developerInstructions":"sha256:514771087556c8b7","mappings":1}
+{"step":"backend.activate","developerInstructions":"sha256:551703c8229720db","mappings":1}
{"step":"provider.createSession"}
{"step":"state.claimLocalRun","runId":"run-1","messageIds":["m-1"]}
{"hook":"context.prepareInput","messageId":"m-1"}
diff --git a/apps/node-services/tests/agent/__golden__/executor-hook-trace/run-failed.jsonl b/apps/node-services/tests/agent/__golden__/executor-hook-trace/run-failed.jsonl
index 98c589b3..42f1f5c5 100644
--- a/apps/node-services/tests/agent/__golden__/executor-hook-trace/run-failed.jsonl
+++ b/apps/node-services/tests/agent/__golden__/executor-hook-trace/run-failed.jsonl
@@ -1,8 +1,8 @@
-{"hook":"context.contributeContextInstructions","facts":{"connectedApps":true,"connectedAppKeys":[],"compactInstructions":false}}
+{"hook":"context.contributeContextInstructions","facts":{"connectedApps":true,"connectedAppKeys":[],"connectableAppKeys":[],"compactInstructions":false}}
{"hook":"context.onContextBound","context":{"kind":"meta","agentId":"agent-trace","roomId":"room-trace"},"bootstrap":"new"}
{"step":"state.enqueueTrustedTurn","messageIds":["m-1"],"runId":"run-1"}
{"hook":"activation.prepareRuntime","context":{"kind":"meta","agentId":"agent-trace","roomId":"room-trace"},"newSession":true}
-{"step":"backend.activate","developerInstructions":"sha256:514771087556c8b7","mappings":1}
+{"step":"backend.activate","developerInstructions":"sha256:551703c8229720db","mappings":1}
{"step":"provider.createSession"}
{"step":"state.claimLocalRun","runId":"run-1","messageIds":["m-1"]}
{"hook":"context.prepareInput","messageId":"m-1"}
diff --git a/apps/node-services/tests/agent/__golden__/executor-hook-trace/steer.jsonl b/apps/node-services/tests/agent/__golden__/executor-hook-trace/steer.jsonl
index 37802564..426e8fd4 100644
--- a/apps/node-services/tests/agent/__golden__/executor-hook-trace/steer.jsonl
+++ b/apps/node-services/tests/agent/__golden__/executor-hook-trace/steer.jsonl
@@ -1,8 +1,8 @@
-{"hook":"context.contributeContextInstructions","facts":{"connectedApps":true,"connectedAppKeys":[],"compactInstructions":false}}
+{"hook":"context.contributeContextInstructions","facts":{"connectedApps":true,"connectedAppKeys":[],"connectableAppKeys":[],"compactInstructions":false}}
{"hook":"context.onContextBound","context":{"kind":"meta","agentId":"agent-trace","roomId":"room-trace"},"bootstrap":"new"}
{"step":"state.enqueueTrustedTurn","messageIds":["m-1"],"runId":"run-1"}
{"hook":"activation.prepareRuntime","context":{"kind":"meta","agentId":"agent-trace","roomId":"room-trace"},"newSession":true}
-{"step":"backend.activate","developerInstructions":"sha256:514771087556c8b7","mappings":1}
+{"step":"backend.activate","developerInstructions":"sha256:551703c8229720db","mappings":1}
{"step":"provider.createSession"}
{"step":"state.claimLocalRun","runId":"run-1","messageIds":["m-1"]}
{"hook":"context.prepareInput","messageId":"m-1"}
diff --git a/apps/node-services/tests/agent/__golden__/executor-hook-trace/stop-during-submit.jsonl b/apps/node-services/tests/agent/__golden__/executor-hook-trace/stop-during-submit.jsonl
index 0e34b1b3..11dd8286 100644
--- a/apps/node-services/tests/agent/__golden__/executor-hook-trace/stop-during-submit.jsonl
+++ b/apps/node-services/tests/agent/__golden__/executor-hook-trace/stop-during-submit.jsonl
@@ -1,8 +1,8 @@
-{"hook":"context.contributeContextInstructions","facts":{"connectedApps":true,"connectedAppKeys":[],"compactInstructions":false}}
+{"hook":"context.contributeContextInstructions","facts":{"connectedApps":true,"connectedAppKeys":[],"connectableAppKeys":[],"compactInstructions":false}}
{"hook":"context.onContextBound","context":{"kind":"meta","agentId":"agent-trace","roomId":"room-trace"},"bootstrap":"new"}
{"step":"state.enqueueTrustedTurn","messageIds":["m-1"],"runId":"run-1"}
{"hook":"activation.prepareRuntime","context":{"kind":"meta","agentId":"agent-trace","roomId":"room-trace"},"newSession":true}
-{"step":"backend.activate","developerInstructions":"sha256:514771087556c8b7","mappings":1}
+{"step":"backend.activate","developerInstructions":"sha256:551703c8229720db","mappings":1}
{"mark":"stop during submit"}
{"step":"state.enqueueTrustedTurn","messageIds":["m-1"],"runId":"run-1"}
{"step":"state.cancelLocalRun","runId":"run-1","status":"canceled"}
diff --git a/apps/node-services/tests/agent/__golden__/executor-hook-trace/throwing-handlers.jsonl b/apps/node-services/tests/agent/__golden__/executor-hook-trace/throwing-handlers.jsonl
index a316d384..eeae80eb 100644
--- a/apps/node-services/tests/agent/__golden__/executor-hook-trace/throwing-handlers.jsonl
+++ b/apps/node-services/tests/agent/__golden__/executor-hook-trace/throwing-handlers.jsonl
@@ -1,8 +1,8 @@
-{"hook":"context.contributeContextInstructions","facts":{"connectedApps":true,"connectedAppKeys":[],"compactInstructions":false}}
+{"hook":"context.contributeContextInstructions","facts":{"connectedApps":true,"connectedAppKeys":[],"connectableAppKeys":[],"compactInstructions":false}}
{"hook":"context.onContextBound","context":{"kind":"meta","agentId":"agent-trace","roomId":"room-trace"},"bootstrap":"new"}
{"step":"state.enqueueTrustedTurn","messageIds":["m-1"],"runId":"run-1"}
{"hook":"activation.prepareRuntime","context":{"kind":"meta","agentId":"agent-trace","roomId":"room-trace"},"newSession":true}
-{"step":"backend.activate","developerInstructions":"sha256:514771087556c8b7","mappings":1}
+{"step":"backend.activate","developerInstructions":"sha256:551703c8229720db","mappings":1}
{"step":"provider.createSession"}
{"step":"state.claimLocalRun","runId":"run-1","messageIds":["m-1"]}
{"hook":"context.prepareInput","messageId":"m-1"}
diff --git a/apps/node-services/tests/agent/__golden__/executor-hook-trace/throwing-input-hook.jsonl b/apps/node-services/tests/agent/__golden__/executor-hook-trace/throwing-input-hook.jsonl
index 741be7ea..4121e3af 100644
--- a/apps/node-services/tests/agent/__golden__/executor-hook-trace/throwing-input-hook.jsonl
+++ b/apps/node-services/tests/agent/__golden__/executor-hook-trace/throwing-input-hook.jsonl
@@ -1,8 +1,8 @@
-{"hook":"context.contributeContextInstructions","facts":{"connectedApps":true,"connectedAppKeys":[],"compactInstructions":false}}
+{"hook":"context.contributeContextInstructions","facts":{"connectedApps":true,"connectedAppKeys":[],"connectableAppKeys":[],"compactInstructions":false}}
{"hook":"context.onContextBound","context":{"kind":"meta","agentId":"agent-trace","roomId":"room-trace"},"bootstrap":"new"}
{"step":"state.enqueueTrustedTurn","messageIds":["m-1"],"runId":"run-1"}
{"hook":"activation.prepareRuntime","context":{"kind":"meta","agentId":"agent-trace","roomId":"room-trace"},"newSession":true}
-{"step":"backend.activate","developerInstructions":"sha256:514771087556c8b7","mappings":1}
+{"step":"backend.activate","developerInstructions":"sha256:551703c8229720db","mappings":1}
{"step":"provider.createSession"}
{"step":"state.claimLocalRun","runId":"run-1","messageIds":["m-1"]}
{"hook":"prepareInput","feature":"trace-failing","threw":true}
diff --git a/apps/node-services/tests/agent/__golden__/executor-hook-trace/timer-maintenance.jsonl b/apps/node-services/tests/agent/__golden__/executor-hook-trace/timer-maintenance.jsonl
index a3712579..d92628f6 100644
--- a/apps/node-services/tests/agent/__golden__/executor-hook-trace/timer-maintenance.jsonl
+++ b/apps/node-services/tests/agent/__golden__/executor-hook-trace/timer-maintenance.jsonl
@@ -1,8 +1,8 @@
-{"hook":"context.contributeContextInstructions","facts":{"connectedApps":true,"connectedAppKeys":[],"compactInstructions":false}}
+{"hook":"context.contributeContextInstructions","facts":{"connectedApps":true,"connectedAppKeys":[],"connectableAppKeys":[],"compactInstructions":false}}
{"hook":"context.onContextBound","context":{"kind":"meta","agentId":"agent-trace","roomId":"room-trace"},"bootstrap":"new"}
{"step":"state.enqueueTrustedTurn","messageIds":["m-1"],"runId":"run-1"}
{"hook":"activation.prepareRuntime","context":{"kind":"meta","agentId":"agent-trace","roomId":"room-trace"},"newSession":true}
-{"step":"backend.activate","developerInstructions":"sha256:514771087556c8b7","mappings":1}
+{"step":"backend.activate","developerInstructions":"sha256:551703c8229720db","mappings":1}
{"step":"provider.createSession"}
{"step":"state.claimLocalRun","runId":"run-1","messageIds":["m-1"]}
{"hook":"context.prepareInput","messageId":"m-1"}
diff --git a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-collaboration-compact.txt b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-collaboration-compact.txt
index 12921407..9c50efb7 100644
--- a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-collaboration-compact.txt
+++ b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-collaboration-compact.txt
@@ -80,7 +80,7 @@ TeamHub commands, all run through your shell tool (teamhub <domain> <action> --h
- To show something the person looks at or uses here and now (a quick chart, dashboard, checklist or small tool), send it inline as a chat card (read the chat-card skill first); use the artifact skill only for a file to share, print, present or keep, or when a file is asked for.
- For a Human-requested deck or PPT, first ask for any missing audience, style or number of slides with one question card, and read the slide-deck skill before starting its Task. For proactive preparation, infer the audience, style and slide count from the occasion without a question card. Build new .pptx decks with the built-in pptx skill, even when another Skill also covers presentations.
- Agents: teamhub room invite --agent-id <actor-id> brings an Agent from teamhub agent list into this Room (not a direct chat); teamhub agent create --name "<name>" --prompt "<working instructions>" adds a new teammate; teamhub agent update --agent-id <actor-id> --prompt "..." changes an Agent you manage. A change to an established Agent waits for approval.
-- Connected apps: gmail, outlook, gcal, gdrive, slack, notion, and figma have their own commands (teamhub gmail --help). For other apps, find the tool with teamhub apps search "<the action in English, with the app name>", then run teamhub apps execute --connectionId <id> --toolSlug <slug> --toolVersion <version> --arguments '<json>'. When this Run started, these apps had an account you can use: gmail, google_calendar; use them without checking first, and check teamhub apps list only when the Human says they connected or disconnected an app during this conversation or a command reports that the account is not connected. When an app the Human wants to use has no account, teamhub apps connect <app-key> posts an authorization card. Never resend a write whose outcome is unknown; check the app first.
+- Connected apps: gmail, outlook, gcal, gdrive, slack, notion, and figma have their own commands (teamhub gmail --help). For other apps, find the tool with teamhub apps search "<the action in English, with the app name>", then run teamhub apps execute --connectionId <id> --toolSlug <slug> --toolVersion <version> --arguments '<json>'. When this Run started, these apps had an account you can use: gmail, google_calendar; use them without checking first, and check teamhub apps list only when the Human says they connected or disconnected an app during this conversation or a command reports that the account is not connected. Never resend a write whose outcome is unknown; check the app first. Apps the Human can connect: gmail, google_calendar, linear. When a request involves one of these apps, including a link to it, use teamhub apps, not the browser: with no account, run teamhub apps connect <app-key> to post an authorization card instead of asking for credentials, and end your turn; the card result wakes you. Then find the tool with teamhub apps search and run it with teamhub apps execute.
- With --operation-id, use a unique id per write; after an unknown outcome, rerun the same command with the id the error printed.
<personal-context-method>
diff --git a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-collaboration-unconfigured.txt b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-collaboration-unconfigured.txt
index cbe5c7ea..df828d5e 100644
--- a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-collaboration-unconfigured.txt
+++ b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-collaboration-unconfigured.txt
@@ -128,6 +128,7 @@ TeamHub commands
- Documents are identified by document_id, not filenames, and aren't mounted locally. You can read, edit and manage every Document your Human has. Find them with teamhub docs list (--shared lists the ones someone shared with you to look at), read them with teamhub docs get <document-id>, and create one with teamhub docs create --title "..." --file <markdown-path>. Deliver an existing file with teamhub message send --attach <path>. To show a Document in a reply, send one complete --message whose segments end with {"type":"document","document_id":"<document-id>","content":"<title>","presentation":"card"}, so it appears as a file card instead of a link.
- Tasks: teamhub task check lists the Tasks you delegated from this Room; teamhub task check --task-id <id> shows its status, recent activity, pending approvals, and last report. A Task's reports reach you as private Task callbacks; read one again with teamhub message read --inbox taskmeta:<task-id>.
- Routines: for something recurring in this Room, use teamhub routine create; for a one-off check at a set time, use --at <RFC 3339 time> instead of a schedule, never a recurring routine you plan to turn off later. Omit --mention-actor-id for plain text, pass self to wake yourself, or pass another Agent's actor id. To change one, get its id from teamhub routine list. Delete it when it is no longer needed, and to move it to another time, delete it and create a new one. Pause only when someone wants it stopped for now and resumed later. Delete or pause a routine someone else created only when they ask. Say it is deleted or paused only after the command succeeds. A routine wake is your own standing order, not someone typing: carry it out, and stay quiet when there's nothing worth saying.
+- Connected apps: when this Run started, no app had an account you can use. Use them without checking first. Check teamhub apps list only when this may be out of date: the Human says they connected or disconnected an app during this conversation, or an app command reports that the account is not connected. Apps the Human can connect: gmail, google_calendar, linear. When a request involves one of these apps, including a link to it, use teamhub apps, not the browser: with no account, run teamhub apps connect <app-key> to post an authorization card instead of asking for credentials, and end your turn; the card result wakes you. Then find the tool with teamhub apps search and run it with teamhub apps execute. Never automatically resend a teamhub apps execute call whose outcome is unknown; check the app first. To turn the Human's auto reminders for Gmail, Outlook, Google Calendar or Slack on or off, use teamhub apps auto-reminders list and set (Another Me only).
- Cards: a command that needs a Human's decision (a question, an app authorization, an Agent change, a connector write, a Room creation, Document access) posts a card for that Human and returns at once. The decision arrives later as a new message here. Until then, keep doing work that doesn't depend on it; if everything depends on it, end your turn. Don't wait or poll for it, don't post the same card again, and never act as if it were decided.
- Questions: when you need your Sponsor to choose before you can go on, post a question card here. Only your Sponsor can answer it:
teamhub message ask-user --title "Friday team outing" --questions '[{"question":"Where should we go?","options":["Hotpot","BBQ"]},{"question":"What else would you like to do?","options":["KTV","Board games","Movie"],"multiple":true}]'
diff --git a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-collaboration.txt b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-collaboration.txt
index 073dc2f0..88b39416 100644
--- a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-collaboration.txt
+++ b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-collaboration.txt
@@ -128,7 +128,7 @@ TeamHub commands
- Documents are identified by document_id, not filenames, and aren't mounted locally. You can read, edit and manage every Document your Human has. Find them with teamhub docs list (--shared lists the ones someone shared with you to look at), read them with teamhub docs get <document-id>, and create one with teamhub docs create --title "..." --file <markdown-path>. Deliver an existing file with teamhub message send --attach <path>. To show a Document in a reply, send one complete --message whose segments end with {"type":"document","document_id":"<document-id>","content":"<title>","presentation":"card"}, so it appears as a file card instead of a link.
- Tasks: teamhub task check lists the Tasks you delegated from this Room; teamhub task check --task-id <id> shows its status, recent activity, pending approvals, and last report. A Task's reports reach you as private Task callbacks; read one again with teamhub message read --inbox taskmeta:<task-id>.
- Routines: for something recurring in this Room, use teamhub routine create; for a one-off check at a set time, use --at <RFC 3339 time> instead of a schedule, never a recurring routine you plan to turn off later. Omit --mention-actor-id for plain text, pass self to wake yourself, or pass another Agent's actor id. To change one, get its id from teamhub routine list. Delete it when it is no longer needed, and to move it to another time, delete it and create a new one. Pause only when someone wants it stopped for now and resumed later. Delete or pause a routine someone else created only when they ask. Say it is deleted or paused only after the command succeeds. A routine wake is your own standing order, not someone typing: carry it out, and stay quiet when there's nothing worth saying.
-- Connected apps: when this Run started, these apps had an account you can use: gmail, google_calendar. Use them without checking first. Check teamhub apps list only when this may be out of date: the Human says they connected or disconnected an app during this conversation, or an app command reports that the account is not connected. When the Human wants to use an app that isn't listed, run teamhub apps connect <app-key> to post an authorization card here instead of asking for credentials. Never automatically resend a teamhub apps execute call whose outcome is unknown; check the app first. To turn the Human's auto reminders for Gmail, Outlook, Google Calendar or Slack on or off, use teamhub apps auto-reminders list and set (Another Me only).
+- Connected apps: when this Run started, these apps had an account you can use: gmail, google_calendar. Use them without checking first. Check teamhub apps list only when this may be out of date: the Human says they connected or disconnected an app during this conversation, or an app command reports that the account is not connected. Apps the Human can connect: gmail, google_calendar, linear. When a request involves one of these apps, including a link to it, use teamhub apps, not the browser: with no account, run teamhub apps connect <app-key> to post an authorization card instead of asking for credentials, and end your turn; the card result wakes you. Then find the tool with teamhub apps search and run it with teamhub apps execute. Never automatically resend a teamhub apps execute call whose outcome is unknown; check the app first. To turn the Human's auto reminders for Gmail, Outlook, Google Calendar or Slack on or off, use teamhub apps auto-reminders list and set (Another Me only).
- Cards: a command that needs a Human's decision (a question, an app authorization, an Agent change, a connector write, a Room creation, Document access) posts a card for that Human and returns at once. The decision arrives later as a new message here. Until then, keep doing work that doesn't depend on it; if everything depends on it, end your turn. Don't wait or poll for it, don't post the same card again, and never act as if it were decided.
- Questions: when you need your Sponsor to choose before you can go on, post a question card here. Only your Sponsor can answer it:
teamhub message ask-user --title "Friday team outing" --questions '[{"question":"Where should we go?","options":["Hotpot","BBQ"]},{"question":"What else would you like to do?","options":["KTV","Board games","Movie"],"multiple":true}]'
diff --git a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-direct-compact.txt b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-direct-compact.txt
index 28de0cf8..0eef12af 100644
--- a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-direct-compact.txt
+++ b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-direct-compact.txt
@@ -71,7 +71,7 @@ TeamHub commands, all run through your shell tool (teamhub <domain> <action> --h
- To show something the person looks at or uses here and now (a quick chart, dashboard, checklist or small tool), send it inline as a chat card (read the chat-card skill first); use the artifact skill only for a file to share, print, present or keep, or when a file is asked for.
- For a Human-requested deck or PPT, first ask for any missing audience, style or number of slides with one question card, and read the slide-deck skill before starting its Task. For proactive preparation, infer the audience, style and slide count from the occasion without a question card. Build new .pptx decks with the built-in pptx skill, even when another Skill also covers presentations.
- Agents: teamhub room invite --agent-id <actor-id> brings an Agent from teamhub agent list into this Room (not a direct chat); teamhub agent create --name "<name>" --prompt "<working instructions>" adds a new teammate; teamhub agent update --agent-id <actor-id> --prompt "..." changes an Agent you manage. A change to an established Agent waits for approval.
-- Connected apps: gmail, outlook, gcal, gdrive, slack, notion, and figma have their own commands (teamhub gmail --help). For other apps, find the tool with teamhub apps search "<the action in English, with the app name>", then run teamhub apps execute --connectionId <id> --toolSlug <slug> --toolVersion <version> --arguments '<json>'. When this Run started, these apps had an account you can use: gmail, google_calendar; use them without checking first, and check teamhub apps list only when the Human says they connected or disconnected an app during this conversation or a command reports that the account is not connected. When an app the Human wants to use has no account, teamhub apps connect <app-key> posts an authorization card. Never resend a write whose outcome is unknown; check the app first.
+- Connected apps: gmail, outlook, gcal, gdrive, slack, notion, and figma have their own commands (teamhub gmail --help). For other apps, find the tool with teamhub apps search "<the action in English, with the app name>", then run teamhub apps execute --connectionId <id> --toolSlug <slug> --toolVersion <version> --arguments '<json>'. When this Run started, these apps had an account you can use: gmail, google_calendar; use them without checking first, and check teamhub apps list only when the Human says they connected or disconnected an app during this conversation or a command reports that the account is not connected. Never resend a write whose outcome is unknown; check the app first. Apps the Human can connect: gmail, google_calendar, linear. When a request involves one of these apps, including a link to it, use teamhub apps, not the browser: with no account, run teamhub apps connect <app-key> to post an authorization card instead of asking for credentials, and end your turn; the card result wakes you. Then find the tool with teamhub apps search and run it with teamhub apps execute.
- With --operation-id, use a unique id per write; after an unknown outcome, rerun the same command with the id the error printed.
<personal-context-method>
diff --git a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-direct-unconfigured.txt b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-direct-unconfigured.txt
index a2a394ff..6f9c4773 100644
--- a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-direct-unconfigured.txt
+++ b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-direct-unconfigured.txt
@@ -111,6 +111,7 @@ TeamHub commands
- Documents are identified by document_id, not filenames, and aren't mounted locally. You can read, edit and manage every Document your Human has. Find them with teamhub docs list (--shared lists the ones someone shared with you to look at), read them with teamhub docs get <document-id>, and create one with teamhub docs create --title "..." --file <markdown-path>. Deliver an existing file with teamhub message send --attach <path>. To show a Document in a reply, send one complete --message whose segments end with {"type":"document","document_id":"<document-id>","content":"<title>","presentation":"card"}, so it appears as a file card instead of a link.
- Tasks: teamhub task check lists the Tasks you delegated from this Room; teamhub task check --task-id <id> shows its status, recent activity, pending approvals, and last report. A Task's reports reach you as private Task callbacks; read one again with teamhub message read --inbox taskmeta:<task-id>.
- Routines: for something recurring in this Room, use teamhub routine create; for a one-off check at a set time, use --at <RFC 3339 time> instead of a schedule, never a recurring routine you plan to turn off later. Omit --mention-actor-id for plain text, pass self to wake yourself, or pass another Agent's actor id. To change one, get its id from teamhub routine list. Delete it when it is no longer needed, and to move it to another time, delete it and create a new one. Pause only when someone wants it stopped for now and resumed later. Delete or pause a routine someone else created only when they ask. Say it is deleted or paused only after the command succeeds. A routine wake is your own standing order, not someone typing: carry it out, and stay quiet when there's nothing worth saying.
+- Connected apps: when this Run started, no app had an account you can use. Use them without checking first. Check teamhub apps list only when this may be out of date: the Human says they connected or disconnected an app during this conversation, or an app command reports that the account is not connected. Apps the Human can connect: gmail, google_calendar, linear. When a request involves one of these apps, including a link to it, use teamhub apps, not the browser: with no account, run teamhub apps connect <app-key> to post an authorization card instead of asking for credentials, and end your turn; the card result wakes you. Then find the tool with teamhub apps search and run it with teamhub apps execute. Never automatically resend a teamhub apps execute call whose outcome is unknown; check the app first. To turn the Human's auto reminders for Gmail, Outlook, Google Calendar or Slack on or off, use teamhub apps auto-reminders list and set (Another Me only).
- Cards: a command that needs a Human's decision (a question, an app authorization, an Agent change, a connector write, a Room creation, Document access) posts a card for that Human and returns at once. The decision arrives later as a new message here. Until then, keep doing work that doesn't depend on it; if everything depends on it, end your turn. Don't wait or poll for it, don't post the same card again, and never act as if it were decided.
- Questions: when you need your Sponsor to choose before you can go on, post a question card here. Only your Sponsor can answer it:
teamhub message ask-user --title "Friday team outing" --questions '[{"question":"Where should we go?","options":["Hotpot","BBQ"]},{"question":"What else would you like to do?","options":["KTV","Board games","Movie"],"multiple":true}]'
diff --git a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-direct.txt b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-direct.txt
index 15b43f85..34a2895e 100644
--- a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-direct.txt
+++ b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-anotherme-direct.txt
@@ -111,7 +111,7 @@ TeamHub commands
- Documents are identified by document_id, not filenames, and aren't mounted locally. You can read, edit and manage every Document your Human has. Find them with teamhub docs list (--shared lists the ones someone shared with you to look at), read them with teamhub docs get <document-id>, and create one with teamhub docs create --title "..." --file <markdown-path>. Deliver an existing file with teamhub message send --attach <path>. To show a Document in a reply, send one complete --message whose segments end with {"type":"document","document_id":"<document-id>","content":"<title>","presentation":"card"}, so it appears as a file card instead of a link.
- Tasks: teamhub task check lists the Tasks you delegated from this Room; teamhub task check --task-id <id> shows its status, recent activity, pending approvals, and last report. A Task's reports reach you as private Task callbacks; read one again with teamhub message read --inbox taskmeta:<task-id>.
- Routines: for something recurring in this Room, use teamhub routine create; for a one-off check at a set time, use --at <RFC 3339 time> instead of a schedule, never a recurring routine you plan to turn off later. Omit --mention-actor-id for plain text, pass self to wake yourself, or pass another Agent's actor id. To change one, get its id from teamhub routine list. Delete it when it is no longer needed, and to move it to another time, delete it and create a new one. Pause only when someone wants it stopped for now and resumed later. Delete or pause a routine someone else created only when they ask. Say it is deleted or paused only after the command succeeds. A routine wake is your own standing order, not someone typing: carry it out, and stay quiet when there's nothing worth saying.
-- Connected apps: when this Run started, these apps had an account you can use: gmail, google_calendar. Use them without checking first. Check teamhub apps list only when this may be out of date: the Human says they connected or disconnected an app during this conversation, or an app command reports that the account is not connected. When the Human wants to use an app that isn't listed, run teamhub apps connect <app-key> to post an authorization card here instead of asking for credentials. Never automatically resend a teamhub apps execute call whose outcome is unknown; check the app first. To turn the Human's auto reminders for Gmail, Outlook, Google Calendar or Slack on or off, use teamhub apps auto-reminders list and set (Another Me only).
+- Connected apps: when this Run started, these apps had an account you can use: gmail, google_calendar. Use them without checking first. Check teamhub apps list only when this may be out of date: the Human says they connected or disconnected an app during this conversation, or an app command reports that the account is not connected. Apps the Human can connect: gmail, google_calendar, linear. When a request involves one of these apps, including a link to it, use teamhub apps, not the browser: with no account, run teamhub apps connect <app-key> to post an authorization card instead of asking for credentials, and end your turn; the card result wakes you. Then find the tool with teamhub apps search and run it with teamhub apps execute. Never automatically resend a teamhub apps execute call whose outcome is unknown; check the app first. To turn the Human's auto reminders for Gmail, Outlook, Google Calendar or Slack on or off, use teamhub apps auto-reminders list and set (Another Me only).
- Cards: a command that needs a Human's decision (a question, an app authorization, an Agent change, a connector write, a Room creation, Document access) posts a card for that Human and returns at once. The decision arrives later as a new message here. Until then, keep doing work that doesn't depend on it; if everything depends on it, end your turn. Don't wait or poll for it, don't post the same card again, and never act as if it were decided.
- Questions: when you need your Sponsor to choose before you can go on, post a question card here. Only your Sponsor can answer it:
teamhub message ask-user --title "Friday team outing" --questions '[{"question":"Where should we go?","options":["Hotpot","BBQ"]},{"question":"What else would you like to do?","options":["KTV","Board games","Movie"],"multiple":true}]'
diff --git a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-collaboration-compact.txt b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-collaboration-compact.txt
index 5b10cac9..7024b888 100644
--- a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-collaboration-compact.txt
+++ b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-collaboration-compact.txt
@@ -77,7 +77,7 @@ TeamHub commands, all run through your shell tool (teamhub <domain> <action> --h
- To show something the person looks at or uses here and now (a quick chart, dashboard, checklist or small tool), send it inline as a chat card (read the chat-card skill first); use the artifact skill only for a file to share, print, present or keep, or when a file is asked for.
- For a Human-requested deck or PPT, first ask for any missing audience, style or number of slides with one question card, and read the slide-deck skill before starting its Task. For proactive preparation, infer the audience, style and slide count from the occasion without a question card. Build new .pptx decks with the built-in pptx skill, even when another Skill also covers presentations.
- Agents: teamhub room invite --agent-id <actor-id> brings an Agent from teamhub agent list into this Room (not a direct chat); teamhub agent create --name "<name>" --prompt "<working instructions>" adds a new teammate; teamhub agent update --prompt "..." changes you, or add --agent-id <actor-id> for an Agent you manage. A change to an established Agent waits for approval.
-- Connected apps: gmail, outlook, gcal, gdrive, slack, notion, and figma have their own commands (teamhub gmail --help). For other apps, find the tool with teamhub apps search "<the action in English, with the app name>", then run teamhub apps execute --connectionId <id> --toolSlug <slug> --toolVersion <version> --arguments '<json>'. When this Run started, these apps had an account you can use: gmail, google_calendar; use them without checking first, and check teamhub apps list only when the Human says they connected or disconnected an app during this conversation or a command reports that the account is not connected. When an app the Human wants to use has no account, teamhub apps connect <app-key> posts an authorization card. Never resend a write whose outcome is unknown; check the app first.
+- Connected apps: gmail, outlook, gcal, gdrive, slack, notion, and figma have their own commands (teamhub gmail --help). For other apps, find the tool with teamhub apps search "<the action in English, with the app name>", then run teamhub apps execute --connectionId <id> --toolSlug <slug> --toolVersion <version> --arguments '<json>'. When this Run started, these apps had an account you can use: gmail, google_calendar; use them without checking first, and check teamhub apps list only when the Human says they connected or disconnected an app during this conversation or a command reports that the account is not connected. Never resend a write whose outcome is unknown; check the app first. Apps the Human can connect: gmail, google_calendar, linear. When a request involves one of these apps, including a link to it, use teamhub apps, not the browser: with no account, run teamhub apps connect <app-key> to post an authorization card instead of asking for credentials, and end your turn; the card result wakes you. Then find the tool with teamhub apps search and run it with teamhub apps execute.
- With --operation-id, use a unique id per write; after an unknown outcome, rerun the same command with the id the error printed.
<personal-context-method>
diff --git a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-collaboration-unconfigured.txt b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-collaboration-unconfigured.txt
index add0bcfd..d0efae1d 100644
--- a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-collaboration-unconfigured.txt
+++ b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-collaboration-unconfigured.txt
@@ -119,6 +119,7 @@ TeamHub commands
- Documents are identified by document_id, not filenames, and aren't mounted locally. You can read, edit and manage every Document your Human has. Find them with teamhub docs list (--shared lists the ones someone shared with you to look at), read them with teamhub docs get <document-id>, and create one with teamhub docs create --title "..." --file <markdown-path>. Deliver an existing file with teamhub message send --attach <path>. To show a Document in a reply, send one complete --message whose segments end with {"type":"document","document_id":"<document-id>","content":"<title>","presentation":"card"}, so it appears as a file card instead of a link.
- Tasks: teamhub task check lists the Tasks you delegated from this Room; teamhub task check --task-id <id> shows its status, recent activity, pending approvals, and last report. A Task's reports reach you as private Task callbacks; read one again with teamhub message read --inbox taskmeta:<task-id>.
- Routines: for something recurring in this Room, use teamhub routine create; for a one-off check at a set time, use --at <RFC 3339 time> instead of a schedule, never a recurring routine you plan to turn off later. Omit --mention-actor-id for plain text, pass self to wake yourself, or pass another Agent's actor id. To change one, get its id from teamhub routine list. Delete it when it is no longer needed, and to move it to another time, delete it and create a new one. Pause only when someone wants it stopped for now and resumed later. Delete or pause a routine someone else created only when they ask. Say it is deleted or paused only after the command succeeds. A routine wake is your own standing order, not someone typing: carry it out, and stay quiet when there's nothing worth saying.
+- Connected apps: when this Run started, no app had an account you can use. Use them without checking first. Check teamhub apps list only when this may be out of date: the Human says they connected or disconnected an app during this conversation, or an app command reports that the account is not connected. Apps the Human can connect: gmail, google_calendar, linear. When a request involves one of these apps, including a link to it, use teamhub apps, not the browser: with no account, run teamhub apps connect <app-key> to post an authorization card instead of asking for credentials, and end your turn; the card result wakes you. Then find the tool with teamhub apps search and run it with teamhub apps execute. Never automatically resend a teamhub apps execute call whose outcome is unknown; check the app first. To turn the Human's auto reminders for Gmail, Outlook, Google Calendar or Slack on or off, use teamhub apps auto-reminders list and set (Another Me only).
- Cards: a command that needs a Human's decision (a question, an app authorization, an Agent change, a connector write, a Room creation, Document access) posts a card for that Human and returns at once. The decision arrives later as a new message here. Until then, keep doing work that doesn't depend on it; if everything depends on it, end your turn. Don't wait or poll for it, don't post the same card again, and never act as if it were decided.
- Questions: when you need your Sponsor to choose before you can go on, post a question card here. Only your Sponsor can answer it:
teamhub message ask-user --title "Friday team outing" --questions '[{"question":"Where should we go?","options":["Hotpot","BBQ"]},{"question":"What else would you like to do?","options":["KTV","Board games","Movie"],"multiple":true}]'
diff --git a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-collaboration.txt b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-collaboration.txt
index 371d0891..ab4dfd77 100644
--- a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-collaboration.txt
+++ b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-collaboration.txt
@@ -119,7 +119,7 @@ TeamHub commands
- Documents are identified by document_id, not filenames, and aren't mounted locally. You can read, edit and manage every Document your Human has. Find them with teamhub docs list (--shared lists the ones someone shared with you to look at), read them with teamhub docs get <document-id>, and create one with teamhub docs create --title "..." --file <markdown-path>. Deliver an existing file with teamhub message send --attach <path>. To show a Document in a reply, send one complete --message whose segments end with {"type":"document","document_id":"<document-id>","content":"<title>","presentation":"card"}, so it appears as a file card instead of a link.
- Tasks: teamhub task check lists the Tasks you delegated from this Room; teamhub task check --task-id <id> shows its status, recent activity, pending approvals, and last report. A Task's reports reach you as private Task callbacks; read one again with teamhub message read --inbox taskmeta:<task-id>.
- Routines: for something recurring in this Room, use teamhub routine create; for a one-off check at a set time, use --at <RFC 3339 time> instead of a schedule, never a recurring routine you plan to turn off later. Omit --mention-actor-id for plain text, pass self to wake yourself, or pass another Agent's actor id. To change one, get its id from teamhub routine list. Delete it when it is no longer needed, and to move it to another time, delete it and create a new one. Pause only when someone wants it stopped for now and resumed later. Delete or pause a routine someone else created only when they ask. Say it is deleted or paused only after the command succeeds. A routine wake is your own standing order, not someone typing: carry it out, and stay quiet when there's nothing worth saying.
-- Connected apps: when this Run started, these apps had an account you can use: gmail, google_calendar. Use them without checking first. Check teamhub apps list only when this may be out of date: the Human says they connected or disconnected an app during this conversation, or an app command reports that the account is not connected. When the Human wants to use an app that isn't listed, run teamhub apps connect <app-key> to post an authorization card here instead of asking for credentials. Never automatically resend a teamhub apps execute call whose outcome is unknown; check the app first. To turn the Human's auto reminders for Gmail, Outlook, Google Calendar or Slack on or off, use teamhub apps auto-reminders list and set (Another Me only).
+- Connected apps: when this Run started, these apps had an account you can use: gmail, google_calendar. Use them without checking first. Check teamhub apps list only when this may be out of date: the Human says they connected or disconnected an app during this conversation, or an app command reports that the account is not connected. Apps the Human can connect: gmail, google_calendar, linear. When a request involves one of these apps, including a link to it, use teamhub apps, not the browser: with no account, run teamhub apps connect <app-key> to post an authorization card instead of asking for credentials, and end your turn; the card result wakes you. Then find the tool with teamhub apps search and run it with teamhub apps execute. Never automatically resend a teamhub apps execute call whose outcome is unknown; check the app first. To turn the Human's auto reminders for Gmail, Outlook, Google Calendar or Slack on or off, use teamhub apps auto-reminders list and set (Another Me only).
- Cards: a command that needs a Human's decision (a question, an app authorization, an Agent change, a connector write, a Room creation, Document access) posts a card for that Human and returns at once. The decision arrives later as a new message here. Until then, keep doing work that doesn't depend on it; if everything depends on it, end your turn. Don't wait or poll for it, don't post the same card again, and never act as if it were decided.
- Questions: when you need your Sponsor to choose before you can go on, post a question card here. Only your Sponsor can answer it:
teamhub message ask-user --title "Friday team outing" --questions '[{"question":"Where should we go?","options":["Hotpot","BBQ"]},{"question":"What else would you like to do?","options":["KTV","Board games","Movie"],"multiple":true}]'
diff --git a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-direct-compact.txt b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-direct-compact.txt
index 4d60c6b5..72c5ed2c 100644
--- a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-direct-compact.txt
+++ b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-direct-compact.txt
@@ -69,7 +69,7 @@ TeamHub commands, all run through your shell tool (teamhub <domain> <action> --h
- To show something the person looks at or uses here and now (a quick chart, dashboard, checklist or small tool), send it inline as a chat card (read the chat-card skill first); use the artifact skill only for a file to share, print, present or keep, or when a file is asked for.
- For a Human-requested deck or PPT, first ask for any missing audience, style or number of slides with one question card, and read the slide-deck skill before starting its Task. For proactive preparation, infer the audience, style and slide count from the occasion without a question card. Build new .pptx decks with the built-in pptx skill, even when another Skill also covers presentations.
- Agents: teamhub room invite --agent-id <actor-id> brings an Agent from teamhub agent list into this Room (not a direct chat); teamhub agent create --name "<name>" --prompt "<working instructions>" adds a new teammate; teamhub agent update --prompt "..." changes you, or add --agent-id <actor-id> for an Agent you manage. A change to an established Agent waits for approval.
-- Connected apps: gmail, outlook, gcal, gdrive, slack, notion, and figma have their own commands (teamhub gmail --help). For other apps, find the tool with teamhub apps search "<the action in English, with the app name>", then run teamhub apps execute --connectionId <id> --toolSlug <slug> --toolVersion <version> --arguments '<json>'. When this Run started, these apps had an account you can use: gmail, google_calendar; use them without checking first, and check teamhub apps list only when the Human says they connected or disconnected an app during this conversation or a command reports that the account is not connected. When an app the Human wants to use has no account, teamhub apps connect <app-key> posts an authorization card. Never resend a write whose outcome is unknown; check the app first.
+- Connected apps: gmail, outlook, gcal, gdrive, slack, notion, and figma have their own commands (teamhub gmail --help). For other apps, find the tool with teamhub apps search "<the action in English, with the app name>", then run teamhub apps execute --connectionId <id> --toolSlug <slug> --toolVersion <version> --arguments '<json>'. When this Run started, these apps had an account you can use: gmail, google_calendar; use them without checking first, and check teamhub apps list only when the Human says they connected or disconnected an app during this conversation or a command reports that the account is not connected. Never resend a write whose outcome is unknown; check the app first. Apps the Human can connect: gmail, google_calendar, linear. When a request involves one of these apps, including a link to it, use teamhub apps, not the browser: with no account, run teamhub apps connect <app-key> to post an authorization card instead of asking for credentials, and end your turn; the card result wakes you. Then find the tool with teamhub apps search and run it with teamhub apps execute.
- With --operation-id, use a unique id per write; after an unknown outcome, rerun the same command with the id the error printed.
<personal-context-method>
diff --git a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-direct-unconfigured.txt b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-direct-unconfigured.txt
index 60e5dcac..6d4a0f10 100644
--- a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-direct-unconfigured.txt
+++ b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-direct-unconfigured.txt
@@ -108,6 +108,7 @@ TeamHub commands
- Documents are identified by document_id, not filenames, and aren't mounted locally. You can read, edit and manage every Document your Human has. Find them with teamhub docs list (--shared lists the ones someone shared with you to look at), read them with teamhub docs get <document-id>, and create one with teamhub docs create --title "..." --file <markdown-path>. Deliver an existing file with teamhub message send --attach <path>. To show a Document in a reply, send one complete --message whose segments end with {"type":"document","document_id":"<document-id>","content":"<title>","presentation":"card"}, so it appears as a file card instead of a link.
- Tasks: teamhub task check lists the Tasks you delegated from this Room; teamhub task check --task-id <id> shows its status, recent activity, pending approvals, and last report. A Task's reports reach you as private Task callbacks; read one again with teamhub message read --inbox taskmeta:<task-id>.
- Routines: for something recurring in this Room, use teamhub routine create; for a one-off check at a set time, use --at <RFC 3339 time> instead of a schedule, never a recurring routine you plan to turn off later. Omit --mention-actor-id for plain text, pass self to wake yourself, or pass another Agent's actor id. To change one, get its id from teamhub routine list. Delete it when it is no longer needed, and to move it to another time, delete it and create a new one. Pause only when someone wants it stopped for now and resumed later. Delete or pause a routine someone else created only when they ask. Say it is deleted or paused only after the command succeeds. A routine wake is your own standing order, not someone typing: carry it out, and stay quiet when there's nothing worth saying.
+- Connected apps: when this Run started, no app had an account you can use. Use them without checking first. Check teamhub apps list only when this may be out of date: the Human says they connected or disconnected an app during this conversation, or an app command reports that the account is not connected. Apps the Human can connect: gmail, google_calendar, linear. When a request involves one of these apps, including a link to it, use teamhub apps, not the browser: with no account, run teamhub apps connect <app-key> to post an authorization card instead of asking for credentials, and end your turn; the card result wakes you. Then find the tool with teamhub apps search and run it with teamhub apps execute. Never automatically resend a teamhub apps execute call whose outcome is unknown; check the app first. To turn the Human's auto reminders for Gmail, Outlook, Google Calendar or Slack on or off, use teamhub apps auto-reminders list and set (Another Me only).
- Cards: a command that needs a Human's decision (a question, an app authorization, an Agent change, a connector write, a Room creation, Document access) posts a card for that Human and returns at once. The decision arrives later as a new message here. Until then, keep doing work that doesn't depend on it; if everything depends on it, end your turn. Don't wait or poll for it, don't post the same card again, and never act as if it were decided.
- Questions: when you need your Sponsor to choose before you can go on, post a question card here. Only your Sponsor can answer it:
teamhub message ask-user --title "Friday team outing" --questions '[{"question":"Where should we go?","options":["Hotpot","BBQ"]},{"question":"What else would you like to do?","options":["KTV","Board games","Movie"],"multiple":true}]'
diff --git a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-direct.txt b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-direct.txt
index 86086c7d..a31e7926 100644
--- a/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-direct.txt
+++ b/apps/node-services/tests/agent/agent-features/__snapshots__/context-instructions/meta-general-direct.txt
@@ -108,7 +108,7 @@ TeamHub commands
- Documents are identified by document_id, not filenames, and aren't mounted locally. You can read, edit and manage every Document your Human has. Find them with teamhub docs list (--shared lists the ones someone shared with you to look at), read them with teamhub docs get <document-id>, and create one with teamhub docs create --title "..." --file <markdown-path>. Deliver an existing file with teamhub message send --attach <path>. To show a Document in a reply, send one complete --message whose segments end with {"type":"document","document_id":"<document-id>","content":"<title>","presentation":"card"}, so it appears as a file card instead of a link.
- Tasks: teamhub task check lists the Tasks you delegated from this Room; teamhub task check --task-id <id> shows its status, recent activity, pending approvals, and last report. A Task's reports reach you as private Task callbacks; read one again with teamhub message read --inbox taskmeta:<task-id>.
- Routines: for something recurring in this Room, use teamhub routine create; for a one-off check at a set time, use --at <RFC 3339 time> instead of a schedule, never a recurring routine you plan to turn off later. Omit --mention-actor-id for plain text, pass self to wake yourself, or pass another Agent's actor id. To change one, get its id from teamhub routine list. Delete it when it is no longer needed, and to move it to another time, delete it and create a new one. Pause only when someone wants it stopped for now and resumed later. Delete or pause a routine someone else created only when they ask. Say it is deleted or paused only after the command succeeds. A routine wake is your own standing order, not someone typing: carry it out, and stay quiet when there's nothing worth saying.
-- Connected apps: when this Run started, these apps had an account you can use: gmail, google_calendar. Use them without checking first. Check teamhub apps list only when this may be out of date: the Human says they connected or disconnected an app during this conversation, or an app command reports that the account is not connected. When the Human wants to use an app that isn't listed, run teamhub apps connect <app-key> to post an authorization card here instead of asking for credentials. Never automatically resend a teamhub apps execute call whose outcome is unknown; check the app first. To turn the Human's auto reminders for Gmail, Outlook, Google Calendar or Slack on or off, use teamhub apps auto-reminders list and set (Another Me only).
+- Connected apps: when this Run started, these apps had an account you can use: gmail, google_calendar. Use them without checking first. Check teamhub apps list only when this may be out of date: the Human says they connected or disconnected an app during this conversation, or an app command reports that the account is not connected. Apps the Human can connect: gmail, google_calendar, linear. When a request involves one of these apps, including a link to it, use teamhub apps, not the browser: with no account, run teamhub apps connect <app-key> to post an authorization card instead of asking for credentials, and end your turn; the card result wakes you. Then find the tool with teamhub apps search and run it with teamhub apps execute. Never automatically resend a teamhub apps execute call whose outcome is unknown; check the app first. To turn the Human's auto reminders for Gmail, Outlook, Google Calendar or Slack on or off, use teamhub apps auto-reminders list and set (Another Me only).
- Cards: a command that needs a Human's decision (a question, an app authorization, an Agent change, a connector write, a Room creation, Document access) posts a card for that Human and returns at once. The decision arrives later as a new message here. Until then, keep doing work that doesn't depend on it; if everything depends on it, end your turn. Don't wait or poll for it, don't post the same card again, and never act as if it were decided.
- Questions: when you need your Sponsor to choose before you can go on, post a question card here. Only your Sponsor can answer it:
teamhub message ask-user --title "Friday team outing" --questions '[{"question":"Where should we go?","options":["Hotpot","BBQ"]},{"question":"What else would you like to do?","options":["KTV","Board games","Movie"],"multiple":true}]'
diff --git a/apps/node-services/tests/agent/agent-features/agent-memory/instructions.test.ts b/apps/node-services/tests/agent/agent-features/agent-memory/instructions.test.ts
index faa39803..d76626b3 100644
--- a/apps/node-services/tests/agent/agent-features/agent-memory/instructions.test.ts
+++ b/apps/node-services/tests/agent/agent-features/agent-memory/instructions.test.ts
@@ -15,6 +15,7 @@ const common = {
sponsor: { actorId: "actor:sponsor", displayName: "Test Sponsor" },
connectedApps: true,
connectedAppKeys: [],
+ connectableAppKeys: [],
compactInstructions: false,
} as const;
diff --git a/apps/node-services/tests/agent/agent-features/builtin.test.ts b/apps/node-services/tests/agent/agent-features/builtin.test.ts
index d4ccab73..41edeecd 100644
--- a/apps/node-services/tests/agent/agent-features/builtin.test.ts
+++ b/apps/node-services/tests/agent/agent-features/builtin.test.ts
@@ -184,6 +184,7 @@ describe("createBuiltinAgentFeatures", () => {
composed.contextInstructions({
connectedApps: true,
connectedAppKeys: [],
+ connectableAppKeys: [],
compactInstructions: false,
}),
).not.toContain("<tool-approval-protocol>");
@@ -208,6 +209,7 @@ describe("createBuiltinAgentFeatures", () => {
composed.contextInstructions({
connectedApps: true,
connectedAppKeys: [],
+ connectableAppKeys: [],
compactInstructions: false,
}) ?? "",
};
@@ -292,6 +294,7 @@ describe("createBuiltinAgentFeatures", () => {
composed.contextInstructions({
connectedApps: true,
connectedAppKeys: [],
+ connectableAppKeys: [],
compactInstructions: false,
}),
).toContain("## Who you are");
@@ -299,6 +302,7 @@ describe("createBuiltinAgentFeatures", () => {
composed.contextInstructions({
connectedApps: true,
connectedAppKeys: [],
+ connectableAppKeys: [],
compactInstructions: false,
}),
).toContain("teamhub message emoji <message-id> <emoji>");
diff --git a/apps/node-services/tests/agent/agent-features/compose.test.ts b/apps/node-services/tests/agent/agent-features/compose.test.ts
index 92ee50ae..3f5256a8 100644
--- a/apps/node-services/tests/agent/agent-features/compose.test.ts
+++ b/apps/node-services/tests/agent/agent-features/compose.test.ts
@@ -314,6 +314,7 @@ describe("composeContextFeatures", () => {
compose([a, b, c]).contextInstructions({
connectedApps: true,
connectedAppKeys: [],
+ connectableAppKeys: [],
compactInstructions: false,
}),
).toBe("A\n\nC");
diff --git a/apps/node-services/tests/agent/agent-features/context-instructions.test.ts b/apps/node-services/tests/agent/agent-features/context-instructions.test.ts
index aa634163..ce77bf5a 100644
--- a/apps/node-services/tests/agent/agent-features/context-instructions.test.ts
+++ b/apps/node-services/tests/agent/agent-features/context-instructions.test.ts
@@ -32,6 +32,9 @@ type Scene = Pick<ExecutionContextDeveloperInstructionsInput, "agentType"> &
| { readonly contextKind: "document" }
);
+/** TeamHub sends the app catalog with or without a Composio key. */
+const catalogAppKeys = ["gmail", "google_calendar", "linear"];
+
const render = (scene: Scene): string =>
assembleExecutionContextDeveloperInstructions({
agentName: "Research Partner",
@@ -40,6 +43,7 @@ const render = (scene: Scene): string =>
sponsor,
connectedApps: true,
connectedAppKeys: ["gmail", "google_calendar"],
+ connectableAppKeys: catalogAppKeys,
compactInstructions: false,
...(scene.agentType === "anotherme" ? { representedHuman } : {}),
...scene,
@@ -50,6 +54,7 @@ interface Deployment {
readonly capabilities: readonly AgentCapability[];
readonly connectedApps: boolean;
readonly connectedAppKeys: readonly string[];
+ readonly connectableAppKeys: readonly string[];
/** The placed model's context window is at most 128K tokens. */
readonly compactInstructions?: boolean;
}
@@ -59,16 +64,19 @@ const defaultDeployment: Deployment = {
capabilities: ["permissionReview"],
connectedApps: false,
connectedAppKeys: [],
+ connectableAppKeys: catalogAppKeys,
};
const fullDeployment: Deployment = {
capabilities: ["permissionReview"],
connectedApps: true,
connectedAppKeys: ["gmail", "google_calendar"],
+ connectableAppKeys: catalogAppKeys,
};
const unconfiguredDeployment: Deployment = {
capabilities: [],
connectedApps: false,
connectedAppKeys: [],
+ connectableAppKeys: catalogAppKeys,
};
const compactDeployment: Deployment = {
...fullDeployment,
@@ -104,6 +112,7 @@ const renderComposed = (
}).contextInstructions({
connectedApps: deployment.connectedApps,
connectedAppKeys: deployment.connectedAppKeys,
+ connectableAppKeys: deployment.connectableAppKeys,
compactInstructions: deployment.compactInstructions === true,
});
};
@@ -183,15 +192,27 @@ describe("execution Context instructions", () => {
},
);
- // The default deployment teaches no connected app command, while Routines
- // keep their instructions.
+ // Without a Composio key a Room conversation still names the catalog and
+ // routes a request about one of its apps to teamhub apps connect, which asks
+ // for the key first; other contexts teach no connected app command.
it.each(scenes)(
- "teaches connected apps in %s only with a Composio key",
+ "routes catalog apps to an authorization card in %s even without a Composio key",
(_, scene) => {
const withApps = renderComposed(scene, fullDeployment)!;
const withoutApps = renderComposed(scene, defaultDeployment)!;
- for (const text of ["Connected app", "Connected Apps", "teamhub apps"]) {
- expect(withoutApps).not.toContain(text);
+ if (scene.contextKind === "meta") {
+ expect(withoutApps).toContain(
+ "Apps the Human can connect: gmail, google_calendar, linear.",
+ );
+ expect(withoutApps).toContain("run teamhub apps connect <app-key>");
+ } else {
+ for (const text of [
+ "Connected app",
+ "Connected Apps",
+ "teamhub apps",
+ ]) {
+ expect(withoutApps).not.toContain(text);
+ }
}
expect(withApps).toContain("Connected app");
if (scene.contextKind !== "document") {
@@ -261,6 +282,7 @@ describe("context-instructions feature", () => {
composed.contextInstructions({
connectedApps: true,
connectedAppKeys: [],
+ connectableAppKeys: [],
compactInstructions: false,
}),
).toContain('"display_name":"Research Partner"');
diff --git a/apps/node-services/tests/agent/executor/activation.test.ts b/apps/node-services/tests/agent/executor/activation.test.ts
index 51a114d8..ad47ff59 100644
--- a/apps/node-services/tests/agent/executor/activation.test.ts
+++ b/apps/node-services/tests/agent/executor/activation.test.ts
@@ -947,6 +947,7 @@ describe("Context Runtime Activator", () => {
skills: [],
connectedApps: true,
connectedAppKeys: [],
+ connectableAppKeys: [],
})),
};
const harness = wired({
@@ -1002,6 +1003,7 @@ describe("Context Runtime Activator", () => {
skills: [],
connectedApps,
connectedAppKeys: [],
+ connectableAppKeys: [],
})),
};
const harness = wired({ agentResourcesResolver });
@@ -1040,6 +1042,7 @@ describe("Context Runtime Activator", () => {
skills: [],
connectedApps: true,
connectedAppKeys: [],
+ connectableAppKeys: [],
})),
},
});
@@ -1903,6 +1906,7 @@ describe("Skills of Contexts resolved by TeamHub", () => {
skills: [effectiveSkill],
connectedApps: true,
connectedAppKeys: [],
+ connectableAppKeys: [],
});
resolution.resolve(mcpResolution());
const active = await activation;
diff --git a/apps/node-services/tests/agent/executor/registry.test.ts b/apps/node-services/tests/agent/executor/registry.test.ts
index b6ce547a..f9deaf5c 100644
--- a/apps/node-services/tests/agent/executor/registry.test.ts
+++ b/apps/node-services/tests/agent/executor/registry.test.ts
@@ -3745,6 +3745,7 @@ describe("Execution Context AgentManager", () => {
options?.renderDeveloperInstructions?.({
connectedApps: false,
connectedAppKeys: [],
+ connectableAppKeys: [],
compactInstructions: false,
}),
).not.toContain("Connected app writes");
diff --git a/apps/node-services/tests/agent/executor/teamhub-agent-resources-resolver.test.ts b/apps/node-services/tests/agent/executor/teamhub-agent-resources-resolver.test.ts
index 2287c95d..120a367f 100644
--- a/apps/node-services/tests/agent/executor/teamhub-agent-resources-resolver.test.ts
+++ b/apps/node-services/tests/agent/executor/teamhub-agent-resources-resolver.test.ts
@@ -9,6 +9,7 @@ const response = () => ({
effective_sha256: "a".repeat(64),
connected_apps: true,
connected_app_keys: ["gmail", "google_calendar"],
+ connectable_app_keys: ["gmail", "google_calendar", "linear"],
skills: [
{
skill_id: "skill-one",
@@ -48,6 +49,11 @@ describe("Agent effective resources", () => {
config: { mode: "exact" },
});
expect(resources.connectedAppKeys).toEqual(["gmail", "google_calendar"]);
+ expect(resources.connectableAppKeys).toEqual([
+ "gmail",
+ "google_calendar",
+ "linear",
+ ]);
expect(JSON.stringify(resources)).not.toMatch(/snapshot|access.token/u);
});
it("rejects repeated package identity and never reflects upstream error bodies", async () => {
@@ -60,6 +66,8 @@ describe("Agent effective resources", () => {
expect(() =>
parseAgentEffectiveResources({ ...response(), connected_app_keys: [1] }),
).toThrow();
+ const { connectable_app_keys: _, ...withoutCatalog } = response();
+ expect(() => parseAgentEffectiveResources(withoutCatalog)).toThrow();
const reader = createTeamHubAgentResourcesResolver({
baseUrl: "https://teamhub.example/",
serviceToken: "private-service",
diff --git a/apps/node-services/tests/agent/fixtures/local-runner-stage-c-teamhub-fixture.mjs b/apps/node-services/tests/agent/fixtures/local-runner-stage-c-teamhub-fixture.mjs
index 739e9734..e3826cf9 100644
--- a/apps/node-services/tests/agent/fixtures/local-runner-stage-c-teamhub-fixture.mjs
+++ b/apps/node-services/tests/agent/fixtures/local-runner-stage-c-teamhub-fixture.mjs
@@ -118,6 +118,7 @@ async function handleRequest(request, response) {
effective_sha256: skillPackageSha256,
connected_apps: true,
connected_app_keys: [],
+ connectable_app_keys: [],
skills: [skillItem],
});
return;
diff --git a/apps/node-services/tests/agent/fixtures/teamhub-callback-fixture.mjs b/apps/node-services/tests/agent/fixtures/teamhub-callback-fixture.mjs
index 6be2cd8f..921aa2af 100644
--- a/apps/node-services/tests/agent/fixtures/teamhub-callback-fixture.mjs
+++ b/apps/node-services/tests/agent/fixtures/teamhub-callback-fixture.mjs
@@ -76,6 +76,7 @@ async function handleRequest(request, response) {
effective_sha256: "0".repeat(64),
connected_apps: true,
connected_app_keys: [],
+ connectable_app_keys: [],
skills: [],
});
return;
diff --git a/apps/teamhub/internal/app/handlers_agent_effective_resources.go b/apps/teamhub/internal/app/handlers_agent_effective_resources.go
index 144ebd57..dfc51826 100644
--- a/apps/teamhub/internal/app/handlers_agent_effective_resources.go
+++ b/apps/teamhub/internal/app/handlers_agent_effective_resources.go
@@ -8,6 +8,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/simplexai-labs/linger/apps/teamhub/internal/agentregistry"
+ "github.com/simplexai-labs/linger/apps/teamhub/internal/externalsource"
"github.com/simplexai-labs/linger/apps/teamhub/internal/skill"
)
@@ -20,6 +21,7 @@ func (a *App) getAgentEffectiveResources(c *gin.Context) {
a.writeError(c, http.StatusForbidden, "FORBIDDEN", "Agent resource identity is invalid")
case a.notFoundOrError(c, "resolve active Agent resource identity", err):
default:
+ result.ConnectableAppKeys = externalsource.CatalogAppKeys()
c.JSON(http.StatusOK, result)
}
}
diff --git a/apps/teamhub/internal/externalsource/catalog.go b/apps/teamhub/internal/externalsource/catalog.go
index 0db2505b..8842a36b 100644
--- a/apps/teamhub/internal/externalsource/catalog.go
+++ b/apps/teamhub/internal/externalsource/catalog.go
@@ -162,6 +162,17 @@ var curatedApps = []ExternalApp{
{Key: "outlook_calendar", DisplayName: "Outlook Calendar", Description: "Let Agents work with your Outlook calendars and events.", Capabilities: []string{"connect", "agent_tools"}, AllowsMultipleConnections: true},
}
+// CatalogAppKeys returns the sorted keys of every connectable app. The catalog
+// is fixed, so the keys do not depend on a Composio key being configured.
+func CatalogAppKeys() []string {
+ keys := make([]string, 0, len(curatedApps))
+ for _, app := range curatedApps {
+ keys = append(keys, app.Key)
+ }
+ slices.Sort(keys)
+ return keys
+}
+
// ProviderConfigured reports whether a connection provider backs the catalog.
// Without one, every app stays unavailable.
func (s *Service) ProviderConfigured() bool {
diff --git a/apps/teamhub/tests/integration/agent_effective_resources_test.go b/apps/teamhub/tests/integration/agent_effective_resources_test.go
index 6eb94a7e..c2001fdd 100644
--- a/apps/teamhub/tests/integration/agent_effective_resources_test.go
+++ b/apps/teamhub/tests/integration/agent_effective_resources_test.go
@@ -5,6 +5,7 @@ import (
"encoding/hex"
"io"
"net/http"
+ "slices"
"testing"
"github.com/simplexai-labs/linger/apps/teamhub/internal/agentcredential"
@@ -54,6 +55,11 @@ func TestAgentEffectiveResourcesReadAndExactPackageIsolation(t *testing.T) {
if _, ok := before["skills"].([]any); !ok {
t.Fatalf("missing Skills: %v", before)
}
+ // The catalog reaches the Agent even without a Composio key, so it can ask
+ // for authorization instead of opening the app in a browser.
+ if keys, _ := before["connectable_app_keys"].([]any); !slices.Contains(keys, any("linear")) {
+ t.Fatalf("connectable apps miss linear: %v", before["connectable_app_keys"])
+ }
if _, exists := before["has_external_mcp_servers"]; exists {
t.Fatalf("retired external MCP inventory is still returned: %v", before)
}
diff --git a/contracts/generated/go/teamhubinternal/openapi.gen.go b/contracts/generated/go/teamhubinternal/openapi.gen.go
index 96239af2..a762d038 100644
--- a/contracts/generated/go/teamhubinternal/openapi.gen.go
+++ b/contracts/generated/go/teamhubinternal/openapi.gen.go
@@ -2096,6 +2096,9 @@ type AgentActorRef struct {
// AgentEffectiveResources defines model for AgentEffectiveResources.
type AgentEffectiveResources struct {
+ // ConnectableAppKeys Sorted keys of every catalog app a Human can connect for Agents, such as linear, with or without a Composio key, so the Agent asks for authorization with teamhub apps connect instead of reaching the app another way. A fixed catalog, so the digest leaves it out; Agent Service renders it again on every Run.
+ ConnectableAppKeys []string `json:"connectable_app_keys"`
+
// ConnectedAppKeys Sorted keys of the apps with an account granted to this Agent, such as gmail or google_calendar, so its instructions name only sources it can query. Empty without connected_apps. Agent Service requires this field, so TeamHub ships before Agent Service.
ConnectedAppKeys []string `json:"connected_app_keys"`
diff --git a/contracts/generated/typescript/src/generated/teamhub-internal/types.ts b/contracts/generated/typescript/src/generated/teamhub-internal/types.ts
index 3eefbc40..50b18dec 100644
--- a/contracts/generated/typescript/src/generated/teamhub-internal/types.ts
+++ b/contracts/generated/typescript/src/generated/teamhub-internal/types.ts
@@ -2801,6 +2801,8 @@ export interface components {
connected_apps: boolean;
/** @description Sorted keys of the apps with an account granted to this Agent, such as gmail or google_calendar, so its instructions name only sources it can query. Empty without connected_apps. Agent Service requires this field, so TeamHub ships before Agent Service. */
connected_app_keys: string[];
+ /** @description Sorted keys of every catalog app a Human can connect for Agents, such as linear, with or without a Composio key, so the Agent asks for authorization with teamhub apps connect instead of reaching the app another way. A fixed catalog, so the digest leaves it out; Agent Service renders it again on every Run. */
+ connectable_app_keys: string[];
skills: components["schemas"]["AgentEffectiveSkill"][];
};
ProactiveWindowMessage: {
diff --git a/contracts/openapi/components/agent-effective-resources.yaml b/contracts/openapi/components/agent-effective-resources.yaml
index ec28d13f..43184885 100644
--- a/contracts/openapi/components/agent-effective-resources.yaml
+++ b/contracts/openapi/components/agent-effective-resources.yaml
@@ -37,7 +37,14 @@ components:
AgentEffectiveResources:
type: object
additionalProperties: false
- required: [effective_sha256, skills, connected_apps, connected_app_keys]
+ required:
+ [
+ effective_sha256,
+ skills,
+ connected_apps,
+ connected_app_keys,
+ connectable_app_keys,
+ ]
properties:
effective_sha256:
type: string
@@ -66,6 +73,21 @@ components:
minLength: 1
maxLength: 64
pattern: "^[a-z0-9_]+$"
+ connectable_app_keys:
+ type: array
+ description: >-
+ Sorted keys of every catalog app a Human can connect for Agents,
+ such as linear, with or without a Composio key, so the Agent asks
+ for authorization with teamhub apps connect instead of reaching the
+ app another way. A fixed catalog, so the digest leaves it out;
+ Agent Service renders it again on every Run.
+ maxItems: 100
+ uniqueItems: true
+ items:
+ type: string
+ minLength: 1
+ maxLength: 64
+ pattern: "^[a-z0-9_]+$"
skills:
type: array
maxItems: 100