@codeam/shared 2.61.75 → 2.61.77

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.
package/dist/index.mjs CHANGED
@@ -1423,6 +1423,41 @@ var INTEGRATION_REGISTRY = {
1423
1423
  }
1424
1424
  }
1425
1425
  },
1426
+ convex: {
1427
+ id: "convex",
1428
+ name: "Convex",
1429
+ icon: "convex",
1430
+ category: "database",
1431
+ // LIVE — OAuth 2.0 (authorization code, Confidential). authorize
1432
+ // dashboard.convex.dev/oauth/authorize/team (the scope is the URL PATH —
1433
+ // `team` for team-wide access — NOT a query param); token
1434
+ // api.convex.dev/oauth/token (form-urlencoded, client creds in the BODY).
1435
+ // ⚠️ Convex issues NO refresh token and the team-scoped application token
1436
+ // does not expire, so there is nothing to rotate (refresh() is a re-link
1437
+ // surface). The OAuth app (Team Settings → OAuth Applications) is registered
1438
+ // and CONVEX_OAUTH_CLIENT_ID/SECRET/REDIRECT_URI are in Secret Manager
1439
+ // (prod+dev); the config-gated 503 keeps this safe mid-rollout.
1440
+ enabled: true,
1441
+ auth: {
1442
+ kind: "oauth_redirect",
1443
+ // ⚠️ Convex's scope is the authorize URL path (`/team`), NOT sent in the
1444
+ // authorize URL as a query param — this list is informational.
1445
+ scopes: []
1446
+ },
1447
+ delivery: {
1448
+ mcp: {
1449
+ // Convex's OFFICIAL MCP server ships inside the `convex` npm package
1450
+ // (`convex mcp start`). The team-scoped OAuth application token doubles
1451
+ // as the CLI/MCP deploy key → fed via CONVEX_DEPLOY_KEY (env only, never
1452
+ // argv). Version PINNED; bump only after re-verifying headless.
1453
+ command: "npx",
1454
+ args: ["-y", "convex@1.42.3", "mcp", "start"],
1455
+ envMapping: {
1456
+ CONVEX_DEPLOY_KEY: "accessToken"
1457
+ }
1458
+ }
1459
+ }
1460
+ },
1426
1461
  confluence: {
1427
1462
  id: "confluence",
1428
1463
  name: "Confluence",
@@ -1760,6 +1795,14 @@ var INTEGRATION_BRANDING = {
1760
1795
  brandColor: "#3FCF8E",
1761
1796
  logoSvg: '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Supabase</title><path fill="#FFFFFF" d="M11.9 1.036c-.015-.986-1.26-1.41-1.874-.637L.764 12.05C-.33 13.427.65 15.455 2.409 15.455h9.579l.113 7.51c.014.985 1.259 1.408 1.873.636l9.262-11.653c1.093-1.375.113-3.403-1.645-3.403h-9.642z"/></svg>'
1762
1797
  },
1798
+ convex: {
1799
+ id: "convex",
1800
+ name: "Convex",
1801
+ vendor: "Convex",
1802
+ tagline: "Reactive database & backend",
1803
+ brandColor: "#EE342F",
1804
+ logoSvg: '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Convex</title><path fill="#FFFFFF" d="M15.09 18.916c3.488-.387 6.776-2.246 8.586-5.348-.857 7.673-9.247 12.522-16.095 9.545a3.47 3.47 0 0 1-1.547-1.314c-1.539-2.417-2.044-5.492-1.318-8.282 2.077 3.584 6.3 5.78 10.374 5.399m-10.501-7.65c-1.414 3.266-1.475 7.092.258 10.24-6.1-4.59-6.033-14.41-.074-18.953a3.44 3.44 0 0 1 1.893-.707c2.825-.15 5.695.942 7.708 2.977-4.09.04-8.073 2.66-9.785 6.442m11.757-5.437C14.283 2.951 11.053.992 7.515.933c6.84-3.105 15.253 1.929 16.17 9.37a3.6 3.6 0 0 1-.334 2.02c-1.278 2.594-3.647 4.607-6.416 5.352 2.029-3.763 1.778-8.36-.589-11.847"/></svg>'
1805
+ },
1763
1806
  cloudflare: {
1764
1807
  id: "cloudflare",
1765
1808
  name: "Cloudflare",
@@ -2043,11 +2086,110 @@ var specDrivenDevelopmentSkill = {
2043
2086
  }
2044
2087
  };
2045
2088
 
2089
+ // src/skills/code-naming.ts
2090
+ var CODE_NAMING_BODY = `Use this skill when NAMING or RENAMING code \u2014 variables, functions, classes,
2091
+ interfaces, types, files, modules, components, hooks, constants \u2014 while writing
2092
+ new code, refactoring, or reviewing a diff. A name should reveal intent and
2093
+ domain meaning so a reader understands the code without translating it in their
2094
+ head, and so it needs fewer comments.
2095
+
2096
+ ## The five core rules (name the concept, not the implementation)
2097
+
2098
+ 1. **Don't abbreviate, and don't use single letters for meaningful values.**
2099
+ \`usr\`/\`cfg\`/\`authReq\` \u2192 \`user\`/\`config\`/\`authRequest\`; \`u\`/\`p\` \u2192 \`user\`/\`project\`.
2100
+ Abbreviations rely on context the next reader may not have. Allowed: standard
2101
+ acronyms the domain already uses (API, URL, HTTP, ID, UUID, CLI, SDK, PR, OAuth),
2102
+ loop indices \`i\`/\`j\`, coordinates \`x\`/\`y\`, and generic type params \`T\`/\`K\`/\`V\`.
2103
+
2104
+ 2. **Don't put the data TYPE in a variable name.** \`userList\` \u2192 \`users\`,
2105
+ \`nameString\` \u2192 \`displayName\`, \`isActiveBool\` \u2192 \`isActive\`, \`invoiceMap\` \u2192
2106
+ \`invoicesById\`. The type system and editor already show the type; the name
2107
+ should carry the meaning.
2108
+
2109
+ 3. **Include the UNIT when a number has one** (unless the type makes it
2110
+ unmistakable). \`timeout\` \u2192 \`timeoutMs\`, \`delay\` \u2192 \`retryDelaySeconds\`,
2111
+ \`size\` \u2192 \`fileSizeBytes\`, \`price\` \u2192 \`priceUsd\`. Especially time, distance,
2112
+ money, bytes, rates, percentages, token/rate limits.
2113
+
2114
+ 4. **Don't put the type CONSTRUCT in a type's name.** \`UserClass\` \u2192 \`User\`,
2115
+ \`PaymentInterface\`/\`IPayment\` \u2192 \`Payment\` (or a role like \`PaymentGateway\`),
2116
+ \`ConfigType\` \u2192 \`Config\`, \`StatusEnum\` \u2192 \`Status\`. Name the concept, not
2117
+ "what kind of programming thing it is."
2118
+
2119
+ 5. **Refactor when you're reaching for \`Utils\`/\`Helpers\`/\`Common\`.** A generic
2120
+ bucket usually hides a missing concept. Group by domain instead:
2121
+ \`utils/parseCookie\` \u2192 a \`cookies/\` module or a \`CookieStore\`/\`CookieJar\` class;
2122
+ \`utils/formatDate\` \u2192 \`dates/\` or a \`DateRangeFormatter\`. Same for vague
2123
+ \`Base\`/\`Abstract\`/\`Manager\`/\`Helper\` class names \u2014 prefer the role
2124
+ (\`Repository\`, \`BillingService\`, \`UserProvisioner\`) unless the project
2125
+ convention explicitly requires \`Base\`/\`Abstract\`.
2126
+
2127
+ ## Shape rules
2128
+
2129
+ - **Functions are verbs / verb phrases:** \`createInvoice()\`, \`sendPasswordResetEmail()\`,
2130
+ \`findRepositoryById()\`. Booleans read like a question in an \`if\`:
2131
+ \`isActive\`, \`hasAccess\`, \`canDeploy\`, \`shouldRetry\` (prefix \`is/has/can/should/needs\`).
2132
+ - **Classes / interfaces / types are nouns or roles:** \`Invoice\`, \`PaymentGateway\`,
2133
+ \`AgentSession\` \u2014 not \`InvoiceData\`, \`SubscriptionThing\`, \`AgentSessionType\`.
2134
+ - **Collections are plural, or \`\u2026ById\`/\`\u2026ByX\` when indexed:** \`users\`,
2135
+ \`activeSessions\`, \`invoicesByCustomerId\`.
2136
+ - **Don't encode a temporary implementation in a name that may change:**
2137
+ \`postgresUserRepository\` \u2192 \`userRepository\`, \`redisCache\` \u2192 \`cache\` \u2014 unless the
2138
+ implementation IS the meaningful distinction. Name the role, not today's backend.
2139
+ - **Follow the project's existing conventions** (casing, file naming, \`useX\`
2140
+ hooks, \`handleX\` handlers). Match the surrounding code; don't introduce a new
2141
+ style without a strong reason.
2142
+
2143
+ ## Words to distrust (infer the real role, then name it)
2144
+
2145
+ \`data\`, \`info\`, \`item\`, \`obj\`, \`temp\`, \`result\`, \`value\`, \`thing\`, \`stuff\`,
2146
+ \`manager\`, \`helper\`, \`utils\`, \`common\`, \`base\`, \`abstract\`, \`processor\`,
2147
+ \`handler\`, \`payload\`. They're acceptable only when the surrounding context makes
2148
+ them precise (e.g. \`config\` inside one \`DatabaseConnection\`); vague when passed
2149
+ across many layers.
2150
+
2151
+ ## Guardrails \u2014 this is a review/refactor guide, NOT a mass-rename mandate
2152
+
2153
+ - Names that are already clear and idiomatic are DONE \u2014 leave them.
2154
+ - Before renaming: read how the identifier is used and infer the real domain
2155
+ concept. Prefer the **smallest** clear rename.
2156
+ - Do NOT do large unrelated renames, and do NOT rename purely for personal
2157
+ preference. Stay inside the change you were asked to make.
2158
+ - Preserve public API / exported names unless the task explicitly allows a break;
2159
+ when you do rename, update every reference, tests, and docs in the same change.
2160
+ - No clever names, jokes, or metaphors in production code; don't make names
2161
+ needlessly long either.
2162
+
2163
+ When reviewing, raise a naming issue only when a clearer name would materially
2164
+ help a reader \u2014 one suggestion per finding: \`current \u2192 suggested \u2014 why\`.`;
2165
+ var CODE_NAMING_INSTRUCTION = `When naming or renaming code, name the domain concept, not the implementation:
2166
+ no abbreviations or single-letter names for meaningful values (standard acronyms
2167
+ like API/URL/ID/OAuth are fine); don't put the data type in a variable name
2168
+ (userList \u2192 users); include the unit when a number has one (timeout \u2192 timeoutMs);
2169
+ don't put the type construct in a type's name (IPayment \u2192 Payment); and refactor
2170
+ generic Utils/Helper/Manager/Base buckets into a domain module or a role-named
2171
+ class. Functions are verbs (createInvoice), booleans read like questions
2172
+ (isActive/hasAccess), classes/types are nouns/roles, collections are plural or
2173
+ \u2026ById. This is a review/refactor guide, not a mandate to mass-rename: leave
2174
+ already-clear names alone, prefer the smallest clear rename, don't rename
2175
+ unrelated code, and preserve public/exported names unless the task allows a break.`;
2176
+ var codeNamingSkill = {
2177
+ id: "code-naming",
2178
+ name: "Code Naming",
2179
+ description: `Naming review & refactor: name the domain concept, not the implementation \u2014 no abbreviations, no type-in-name, units when they matter, no Utils/Manager/Base buckets; rename minimally, never mass-rename.`,
2180
+ source: "curated",
2181
+ delivery: {
2182
+ skillFile: { body: CODE_NAMING_BODY },
2183
+ instruction: { body: CODE_NAMING_INSTRUCTION }
2184
+ }
2185
+ };
2186
+
2046
2187
  // src/skills/registry.ts
2047
2188
  var SKILL_REGISTRY = {
2048
2189
  "code-review": codeReviewSkill,
2049
2190
  "resolve-conflicts": resolveConflictsSkill,
2050
- "spec-driven-development": specDrivenDevelopmentSkill
2191
+ "spec-driven-development": specDrivenDevelopmentSkill,
2192
+ "code-naming": codeNamingSkill
2051
2193
  };
2052
2194
  function isSkillId(id) {
2053
2195
  return Object.prototype.hasOwnProperty.call(SKILL_REGISTRY, id);