diff --git a/skills/stackone-connection/SKILL.md b/skills/stackone-connection/SKILL.md index 940f5a5..0d5b82e 100644 --- a/skills/stackone-connection/SKILL.md +++ b/skills/stackone-connection/SKILL.md @@ -17,7 +17,8 @@ If this session has no connector-profile or account-linking tools (such as `stac Find the thing before you touch it, and stop if it is already right. - A profile: `stackone_get_connector_profiles {connector_key: [""]}`, or `stackone_get_connector_profiles {id}` for one profile. `connector_key` is a list. -- An account: `stackone_list_linked_accounts {providers}` or `stackone_get_account {id}`. +- An account: `stackone_get_accounts {connector_key: [""], expand: "connector,connector_profile"}`, or + `stackone_get_accounts {id, expand: "connector,connector_profile"}` for one account. If the account is already linked and authenticated, or the profile already enables the action, say so and change nothing. @@ -47,28 +48,30 @@ user finishes in the browser. There is no status-poll tool. `{ auth_link_url, expires_at, provider, connector_profile_id, next_steps }`. Give the user the `auth_link_url` to open and relay `next_steps`. 2. When the user says they are done, confirm the account exists with a read: - `stackone_list_linked_accounts` or `stackone_get_account` returns the new account. Confirm + `stackone_get_accounts {connector_key: [""]}` returns the new account. Confirm success from that read, never from the fact that you started the link. ## Reconnect a broken account; do not replace it -`stackone_link_account` has no `account_id` input, and this surface has no separate repair or -edit-mode tool. You reconnect an expired or deauthorized account by starting a fresh link through -the same connector profile the account already uses, then confirming by re-reading the account. +How you reconnect an expired or deauthorized account depends on the tools this session has. A +repair tool brings the same account back; a fresh link adds a new account beside the broken one. -- Read the broken account with `stackone_get_account {id}`. Its output names the provider and the - profile (`integration_config_labels`), but not the profile id. -- Look the profile up with `stackone_get_connector_profiles {connector_key: [""]}` and match it by name to get its `id`. -- Relink through that profile: +- Read the broken account with `stackone_get_accounts {id, expand: "connector,connector_profile"}`. + Its `connector_profile_id` is the profile it links through. When that is null, choose the profile + as in "Pick the profile deliberately" above. +- If the session has a tool that reconnects or repairs an existing account by its id (for example + `stackone_relink_account`), use it on the broken account's `id`. +- Only when no such tool exists, start a fresh link through the profile the account already uses. + `stackone_link_account` has no `account_id` input, so it creates a new account through that + profile and leaves the broken one as it is: ``` stackone_link_account { connector_profile_id: "" } ``` Do not delete the old account first, and do not start a bare `provider` link when more than one -profile exists for the connector. Confirm the repair by re-reading the account and checking its -status. +profile exists for the connector. Confirm the repair by re-reading the account (after a fresh link, +the new one) and checking its status. ## Diagnose a new or suspect link from evidence