@robbeverhelst/do 1.311.7 → 1.312.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/do.js +58 -5
  2. package/package.json +1 -1
package/dist/do.js CHANGED
@@ -29059,14 +29059,16 @@ var API_KEY_SCOPE_VALUES = [
29059
29059
  "finance:read",
29060
29060
  "finance:write",
29061
29061
  "people:family-tree",
29062
+ "connections:write",
29062
29063
  "private:*",
29063
29064
  "*"
29064
29065
  ];
29065
29066
  var FULL_ACCESS_SCOPE = "*";
29067
+ var CONNECTIONS_WRITE_SCOPE = "connections:write";
29066
29068
  function scopeGranted(granted, required) {
29067
29069
  if (granted.includes(required))
29068
29070
  return true;
29069
- if (required === PRIVATE_ACCESS_SCOPE)
29071
+ if (required === PRIVATE_ACCESS_SCOPE || required === CONNECTIONS_WRITE_SCOPE)
29070
29072
  return false;
29071
29073
  if (isSensitiveScope(required))
29072
29074
  return granted.includes(PRIVATE_ACCESS_SCOPE);
@@ -31734,6 +31736,18 @@ var googleHealthOperations = defineOperations({
31734
31736
  status: 200,
31735
31737
  response: { description: "What came in, and the status after it." },
31736
31738
  errors: { 403: true, 409: true }
31739
+ },
31740
+ connect: {
31741
+ method: "post",
31742
+ path: "/health/google-health/connect",
31743
+ scopes: ["connections:write"],
31744
+ afterScopes: "`*` and `private:*` never grant `connections:write`: a key holds it by name, and a guest's key never does.",
31745
+ tag: "Health",
31746
+ summary: "Connect Google Health",
31747
+ description: "As the key's member, start connecting Google Health (replacing a link they had): answers the consent `authorizationUrl` for the member to open in a browser. Once they agree, Google sends them back to do and the link is theirs, as if they had connected in the app (Settings \u2192 Health). 403 while the server has Google Health off.",
31748
+ status: 200,
31749
+ response: { description: "The consent URL." },
31750
+ errors: { 403: true }
31737
31751
  }
31738
31752
  });
31739
31753
 
@@ -34055,9 +34069,36 @@ var runOperations = defineOperations({
34055
34069
  scopes: READ4,
34056
34070
  tag: "Runs",
34057
34071
  summary: "Get the Steam achievements link",
34058
- description: "Whether the key's member has linked Steam (from Settings in the app; the Steam ID and Web API key are never returned), how many games carry a `steamAppId` and `lastSyncedAt`, the newest sync on a run. 403 for a key no member minted.",
34072
+ description: "Whether the key's member has linked Steam (in Settings, or with a key that holds `connections:write`; the Steam ID and Web API key are never returned), how many games carry a `steamAppId` and `lastSyncedAt`, the newest sync on a run. 403 for a key no member minted.",
34073
+ status: 200,
34074
+ response: { description: "The link's status." },
34075
+ errors: { 403: true }
34076
+ },
34077
+ steamLink: {
34078
+ method: "put",
34079
+ path: "/runs/steam",
34080
+ scopes: ["connections:write"],
34081
+ afterScopes: "`*` and `private:*` never grant `connections:write`: a key holds it by name, and a guest's key never does.",
34082
+ tag: "Runs",
34083
+ summary: "Link Steam",
34084
+ description: "Link (or replace) the key's member's Steam account: `{ steamId, apiKey }` (the 17-digit SteamID64 and a Steam Web API key), sealed and never read back. Answers the link's status, as the status route does.",
34085
+ body: steamAccountInputSchema,
34059
34086
  status: 200,
34060
34087
  response: { description: "The link's status." },
34088
+ errors: { 400: true, 403: true },
34089
+ throttle: "strict",
34090
+ mcp: false
34091
+ },
34092
+ steamUnlink: {
34093
+ method: "delete",
34094
+ path: "/runs/steam",
34095
+ scopes: ["connections:write"],
34096
+ afterScopes: "`*` and `private:*` never grant `connections:write`: a key holds it by name, and a guest's key never does.",
34097
+ tag: "Runs",
34098
+ summary: "Unlink Steam",
34099
+ description: "Forget the key's member's Steam account. The runs keep what was synced.",
34100
+ status: 204,
34101
+ response: { description: "Unlinked." },
34061
34102
  errors: { 403: true }
34062
34103
  },
34063
34104
  steamSync: {
@@ -35034,6 +35075,18 @@ var withingsOperations = defineOperations({
35034
35075
  status: 200,
35035
35076
  response: { description: "What came in, and the status after it." },
35036
35077
  errors: { 403: true, 409: true }
35078
+ },
35079
+ connect: {
35080
+ method: "post",
35081
+ path: "/health/withings/connect",
35082
+ scopes: ["connections:write"],
35083
+ afterScopes: "`*` and `private:*` never grant `connections:write`: a key holds it by name, and a guest's key never does.",
35084
+ tag: "Health",
35085
+ summary: "Connect Withings",
35086
+ description: "As the key's member, start connecting Withings (replacing a link they had): answers the consent `authorizationUrl` for the member to open in a browser. Once they agree, Withings sends them back to do and the link is theirs, as if they had connected in the app (Settings \u2192 Health). 403 while the server has Withings off.",
35087
+ status: 200,
35088
+ response: { description: "The consent URL." },
35089
+ errors: { 403: true }
35037
35090
  }
35038
35091
  });
35039
35092
 
@@ -35354,7 +35407,7 @@ function parseCapture2(input, now) {
35354
35407
 
35355
35408
  // src/meta.ts
35356
35409
  var CLI_NAME = "do";
35357
- var VERSION = "1.311.7";
35410
+ var VERSION = "1.312.0";
35358
35411
  var API_PREFIX = "/api/v1";
35359
35412
  var DEFAULT_API_URL = "http://localhost:3001";
35360
35413
 
@@ -38182,9 +38235,9 @@ var COMMAND_SPECS = [
38182
38235
  description: "Read the password from the first line of stdin (else DO_DOCCLE_PASSWORD)."
38183
38236
  }
38184
38237
  ],
38185
- scopes: ["documents:write"],
38238
+ scopes: ["connections:write"],
38186
38239
  returns: "DoccleStatus",
38187
- notes: "PUT /api/v1/documents/doccle/login. The password is never a flag (shell history): pipe it in with --password-stdin or set DO_DOCCLE_PASSWORD. 422 when Doccle refuses the login or asks for a captcha (nothing is kept), 503 when Doccle is down. The login is never returned."
38240
+ notes: "PUT /api/v1/documents/doccle/login. Needs a key with the opt-in connections:write (held by name: Full access never grants it, and a guest's key never holds it). The password is never a flag (shell history): pipe it in with --password-stdin or set DO_DOCCLE_PASSWORD. 422 when Doccle refuses the login or asks for a captcha (nothing is kept), 503 when Doccle is down. The login is never returned."
38188
38241
  },
38189
38242
  {
38190
38243
  path: ["documents", "doccle", "disconnect"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robbeverhelst/do",
3
- "version": "1.311.7",
3
+ "version": "1.312.0",
4
4
  "private": false,
5
5
  "description": "do — the agent-drivable CLI over the public /api/v1 surface",
6
6
  "homepage": "https://github.com/robbeverhelst/do/tree/main/apps/cli",