@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.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +143 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +143 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -351,7 +351,7 @@ declare function isHeadroomWrappable(agentId: string): boolean;
|
|
|
351
351
|
* ubiquitous CLI for the tool → `cliEnv`; otherwise → `mcp`. A tool may
|
|
352
352
|
* declare both.
|
|
353
353
|
*/
|
|
354
|
-
type IntegrationId = 'jira' | 'sentry' | 'linear' | 'slack' | 'notion' | 'azure_devops' | 'figma' | 'microsoft_teams' | 'google_chat' | 'discord' | 'resend' | 'posthog' | 'datadog' | 'stitch' | 'github_issues' | 'github' | 'gitlab' | 'vercel' | 'trello' | 'clickup' | 'n8n' | 'postman' | 'mixpanel' | 'supabase' | 'confluence' | 'cloudflare';
|
|
354
|
+
type IntegrationId = 'jira' | 'sentry' | 'linear' | 'slack' | 'notion' | 'azure_devops' | 'figma' | 'microsoft_teams' | 'google_chat' | 'discord' | 'resend' | 'posthog' | 'datadog' | 'stitch' | 'github_issues' | 'github' | 'gitlab' | 'vercel' | 'trello' | 'clickup' | 'n8n' | 'postman' | 'mixpanel' | 'supabase' | 'convex' | 'confluence' | 'cloudflare';
|
|
355
355
|
/**
|
|
356
356
|
* `derived` = no link flow of its own: the credential is BORROWED live from a
|
|
357
357
|
* connection the user already made elsewhere (see `derivedFrom`). The backend
|
|
@@ -721,7 +721,7 @@ interface AgentReviewReport {
|
|
|
721
721
|
}
|
|
722
722
|
|
|
723
723
|
/** Curated skills shipped with the client. Grows over time. */
|
|
724
|
-
type SkillId = 'code-review' | 'resolve-conflicts' | 'spec-driven-development';
|
|
724
|
+
type SkillId = 'code-review' | 'resolve-conflicts' | 'spec-driven-development' | 'code-naming';
|
|
725
725
|
/** Delivery rails, twin of IntegrationDelivery's mcp/cliEnv. */
|
|
726
726
|
type SkillRail = 'skillFile' | 'instruction';
|
|
727
727
|
/** `skillFile` payload — a Claude-Code SKILL.md bundle (body + optional files). */
|
package/dist/index.d.ts
CHANGED
|
@@ -351,7 +351,7 @@ declare function isHeadroomWrappable(agentId: string): boolean;
|
|
|
351
351
|
* ubiquitous CLI for the tool → `cliEnv`; otherwise → `mcp`. A tool may
|
|
352
352
|
* declare both.
|
|
353
353
|
*/
|
|
354
|
-
type IntegrationId = 'jira' | 'sentry' | 'linear' | 'slack' | 'notion' | 'azure_devops' | 'figma' | 'microsoft_teams' | 'google_chat' | 'discord' | 'resend' | 'posthog' | 'datadog' | 'stitch' | 'github_issues' | 'github' | 'gitlab' | 'vercel' | 'trello' | 'clickup' | 'n8n' | 'postman' | 'mixpanel' | 'supabase' | 'confluence' | 'cloudflare';
|
|
354
|
+
type IntegrationId = 'jira' | 'sentry' | 'linear' | 'slack' | 'notion' | 'azure_devops' | 'figma' | 'microsoft_teams' | 'google_chat' | 'discord' | 'resend' | 'posthog' | 'datadog' | 'stitch' | 'github_issues' | 'github' | 'gitlab' | 'vercel' | 'trello' | 'clickup' | 'n8n' | 'postman' | 'mixpanel' | 'supabase' | 'convex' | 'confluence' | 'cloudflare';
|
|
355
355
|
/**
|
|
356
356
|
* `derived` = no link flow of its own: the credential is BORROWED live from a
|
|
357
357
|
* connection the user already made elsewhere (see `derivedFrom`). The backend
|
|
@@ -721,7 +721,7 @@ interface AgentReviewReport {
|
|
|
721
721
|
}
|
|
722
722
|
|
|
723
723
|
/** Curated skills shipped with the client. Grows over time. */
|
|
724
|
-
type SkillId = 'code-review' | 'resolve-conflicts' | 'spec-driven-development';
|
|
724
|
+
type SkillId = 'code-review' | 'resolve-conflicts' | 'spec-driven-development' | 'code-naming';
|
|
725
725
|
/** Delivery rails, twin of IntegrationDelivery's mcp/cliEnv. */
|
|
726
726
|
type SkillRail = 'skillFile' | 'instruction';
|
|
727
727
|
/** `skillFile` payload — a Claude-Code SKILL.md bundle (body + optional files). */
|
package/dist/index.js
CHANGED
|
@@ -1505,6 +1505,41 @@ var INTEGRATION_REGISTRY = {
|
|
|
1505
1505
|
}
|
|
1506
1506
|
}
|
|
1507
1507
|
},
|
|
1508
|
+
convex: {
|
|
1509
|
+
id: "convex",
|
|
1510
|
+
name: "Convex",
|
|
1511
|
+
icon: "convex",
|
|
1512
|
+
category: "database",
|
|
1513
|
+
// LIVE — OAuth 2.0 (authorization code, Confidential). authorize
|
|
1514
|
+
// dashboard.convex.dev/oauth/authorize/team (the scope is the URL PATH —
|
|
1515
|
+
// `team` for team-wide access — NOT a query param); token
|
|
1516
|
+
// api.convex.dev/oauth/token (form-urlencoded, client creds in the BODY).
|
|
1517
|
+
// ⚠️ Convex issues NO refresh token and the team-scoped application token
|
|
1518
|
+
// does not expire, so there is nothing to rotate (refresh() is a re-link
|
|
1519
|
+
// surface). The OAuth app (Team Settings → OAuth Applications) is registered
|
|
1520
|
+
// and CONVEX_OAUTH_CLIENT_ID/SECRET/REDIRECT_URI are in Secret Manager
|
|
1521
|
+
// (prod+dev); the config-gated 503 keeps this safe mid-rollout.
|
|
1522
|
+
enabled: true,
|
|
1523
|
+
auth: {
|
|
1524
|
+
kind: "oauth_redirect",
|
|
1525
|
+
// ⚠️ Convex's scope is the authorize URL path (`/team`), NOT sent in the
|
|
1526
|
+
// authorize URL as a query param — this list is informational.
|
|
1527
|
+
scopes: []
|
|
1528
|
+
},
|
|
1529
|
+
delivery: {
|
|
1530
|
+
mcp: {
|
|
1531
|
+
// Convex's OFFICIAL MCP server ships inside the `convex` npm package
|
|
1532
|
+
// (`convex mcp start`). The team-scoped OAuth application token doubles
|
|
1533
|
+
// as the CLI/MCP deploy key → fed via CONVEX_DEPLOY_KEY (env only, never
|
|
1534
|
+
// argv). Version PINNED; bump only after re-verifying headless.
|
|
1535
|
+
command: "npx",
|
|
1536
|
+
args: ["-y", "convex@1.42.3", "mcp", "start"],
|
|
1537
|
+
envMapping: {
|
|
1538
|
+
CONVEX_DEPLOY_KEY: "accessToken"
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
},
|
|
1508
1543
|
confluence: {
|
|
1509
1544
|
id: "confluence",
|
|
1510
1545
|
name: "Confluence",
|
|
@@ -1842,6 +1877,14 @@ var INTEGRATION_BRANDING = {
|
|
|
1842
1877
|
brandColor: "#3FCF8E",
|
|
1843
1878
|
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>'
|
|
1844
1879
|
},
|
|
1880
|
+
convex: {
|
|
1881
|
+
id: "convex",
|
|
1882
|
+
name: "Convex",
|
|
1883
|
+
vendor: "Convex",
|
|
1884
|
+
tagline: "Reactive database & backend",
|
|
1885
|
+
brandColor: "#EE342F",
|
|
1886
|
+
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>'
|
|
1887
|
+
},
|
|
1845
1888
|
cloudflare: {
|
|
1846
1889
|
id: "cloudflare",
|
|
1847
1890
|
name: "Cloudflare",
|
|
@@ -2125,11 +2168,110 @@ var specDrivenDevelopmentSkill = {
|
|
|
2125
2168
|
}
|
|
2126
2169
|
};
|
|
2127
2170
|
|
|
2171
|
+
// src/skills/code-naming.ts
|
|
2172
|
+
var CODE_NAMING_BODY = `Use this skill when NAMING or RENAMING code \u2014 variables, functions, classes,
|
|
2173
|
+
interfaces, types, files, modules, components, hooks, constants \u2014 while writing
|
|
2174
|
+
new code, refactoring, or reviewing a diff. A name should reveal intent and
|
|
2175
|
+
domain meaning so a reader understands the code without translating it in their
|
|
2176
|
+
head, and so it needs fewer comments.
|
|
2177
|
+
|
|
2178
|
+
## The five core rules (name the concept, not the implementation)
|
|
2179
|
+
|
|
2180
|
+
1. **Don't abbreviate, and don't use single letters for meaningful values.**
|
|
2181
|
+
\`usr\`/\`cfg\`/\`authReq\` \u2192 \`user\`/\`config\`/\`authRequest\`; \`u\`/\`p\` \u2192 \`user\`/\`project\`.
|
|
2182
|
+
Abbreviations rely on context the next reader may not have. Allowed: standard
|
|
2183
|
+
acronyms the domain already uses (API, URL, HTTP, ID, UUID, CLI, SDK, PR, OAuth),
|
|
2184
|
+
loop indices \`i\`/\`j\`, coordinates \`x\`/\`y\`, and generic type params \`T\`/\`K\`/\`V\`.
|
|
2185
|
+
|
|
2186
|
+
2. **Don't put the data TYPE in a variable name.** \`userList\` \u2192 \`users\`,
|
|
2187
|
+
\`nameString\` \u2192 \`displayName\`, \`isActiveBool\` \u2192 \`isActive\`, \`invoiceMap\` \u2192
|
|
2188
|
+
\`invoicesById\`. The type system and editor already show the type; the name
|
|
2189
|
+
should carry the meaning.
|
|
2190
|
+
|
|
2191
|
+
3. **Include the UNIT when a number has one** (unless the type makes it
|
|
2192
|
+
unmistakable). \`timeout\` \u2192 \`timeoutMs\`, \`delay\` \u2192 \`retryDelaySeconds\`,
|
|
2193
|
+
\`size\` \u2192 \`fileSizeBytes\`, \`price\` \u2192 \`priceUsd\`. Especially time, distance,
|
|
2194
|
+
money, bytes, rates, percentages, token/rate limits.
|
|
2195
|
+
|
|
2196
|
+
4. **Don't put the type CONSTRUCT in a type's name.** \`UserClass\` \u2192 \`User\`,
|
|
2197
|
+
\`PaymentInterface\`/\`IPayment\` \u2192 \`Payment\` (or a role like \`PaymentGateway\`),
|
|
2198
|
+
\`ConfigType\` \u2192 \`Config\`, \`StatusEnum\` \u2192 \`Status\`. Name the concept, not
|
|
2199
|
+
"what kind of programming thing it is."
|
|
2200
|
+
|
|
2201
|
+
5. **Refactor when you're reaching for \`Utils\`/\`Helpers\`/\`Common\`.** A generic
|
|
2202
|
+
bucket usually hides a missing concept. Group by domain instead:
|
|
2203
|
+
\`utils/parseCookie\` \u2192 a \`cookies/\` module or a \`CookieStore\`/\`CookieJar\` class;
|
|
2204
|
+
\`utils/formatDate\` \u2192 \`dates/\` or a \`DateRangeFormatter\`. Same for vague
|
|
2205
|
+
\`Base\`/\`Abstract\`/\`Manager\`/\`Helper\` class names \u2014 prefer the role
|
|
2206
|
+
(\`Repository\`, \`BillingService\`, \`UserProvisioner\`) unless the project
|
|
2207
|
+
convention explicitly requires \`Base\`/\`Abstract\`.
|
|
2208
|
+
|
|
2209
|
+
## Shape rules
|
|
2210
|
+
|
|
2211
|
+
- **Functions are verbs / verb phrases:** \`createInvoice()\`, \`sendPasswordResetEmail()\`,
|
|
2212
|
+
\`findRepositoryById()\`. Booleans read like a question in an \`if\`:
|
|
2213
|
+
\`isActive\`, \`hasAccess\`, \`canDeploy\`, \`shouldRetry\` (prefix \`is/has/can/should/needs\`).
|
|
2214
|
+
- **Classes / interfaces / types are nouns or roles:** \`Invoice\`, \`PaymentGateway\`,
|
|
2215
|
+
\`AgentSession\` \u2014 not \`InvoiceData\`, \`SubscriptionThing\`, \`AgentSessionType\`.
|
|
2216
|
+
- **Collections are plural, or \`\u2026ById\`/\`\u2026ByX\` when indexed:** \`users\`,
|
|
2217
|
+
\`activeSessions\`, \`invoicesByCustomerId\`.
|
|
2218
|
+
- **Don't encode a temporary implementation in a name that may change:**
|
|
2219
|
+
\`postgresUserRepository\` \u2192 \`userRepository\`, \`redisCache\` \u2192 \`cache\` \u2014 unless the
|
|
2220
|
+
implementation IS the meaningful distinction. Name the role, not today's backend.
|
|
2221
|
+
- **Follow the project's existing conventions** (casing, file naming, \`useX\`
|
|
2222
|
+
hooks, \`handleX\` handlers). Match the surrounding code; don't introduce a new
|
|
2223
|
+
style without a strong reason.
|
|
2224
|
+
|
|
2225
|
+
## Words to distrust (infer the real role, then name it)
|
|
2226
|
+
|
|
2227
|
+
\`data\`, \`info\`, \`item\`, \`obj\`, \`temp\`, \`result\`, \`value\`, \`thing\`, \`stuff\`,
|
|
2228
|
+
\`manager\`, \`helper\`, \`utils\`, \`common\`, \`base\`, \`abstract\`, \`processor\`,
|
|
2229
|
+
\`handler\`, \`payload\`. They're acceptable only when the surrounding context makes
|
|
2230
|
+
them precise (e.g. \`config\` inside one \`DatabaseConnection\`); vague when passed
|
|
2231
|
+
across many layers.
|
|
2232
|
+
|
|
2233
|
+
## Guardrails \u2014 this is a review/refactor guide, NOT a mass-rename mandate
|
|
2234
|
+
|
|
2235
|
+
- Names that are already clear and idiomatic are DONE \u2014 leave them.
|
|
2236
|
+
- Before renaming: read how the identifier is used and infer the real domain
|
|
2237
|
+
concept. Prefer the **smallest** clear rename.
|
|
2238
|
+
- Do NOT do large unrelated renames, and do NOT rename purely for personal
|
|
2239
|
+
preference. Stay inside the change you were asked to make.
|
|
2240
|
+
- Preserve public API / exported names unless the task explicitly allows a break;
|
|
2241
|
+
when you do rename, update every reference, tests, and docs in the same change.
|
|
2242
|
+
- No clever names, jokes, or metaphors in production code; don't make names
|
|
2243
|
+
needlessly long either.
|
|
2244
|
+
|
|
2245
|
+
When reviewing, raise a naming issue only when a clearer name would materially
|
|
2246
|
+
help a reader \u2014 one suggestion per finding: \`current \u2192 suggested \u2014 why\`.`;
|
|
2247
|
+
var CODE_NAMING_INSTRUCTION = `When naming or renaming code, name the domain concept, not the implementation:
|
|
2248
|
+
no abbreviations or single-letter names for meaningful values (standard acronyms
|
|
2249
|
+
like API/URL/ID/OAuth are fine); don't put the data type in a variable name
|
|
2250
|
+
(userList \u2192 users); include the unit when a number has one (timeout \u2192 timeoutMs);
|
|
2251
|
+
don't put the type construct in a type's name (IPayment \u2192 Payment); and refactor
|
|
2252
|
+
generic Utils/Helper/Manager/Base buckets into a domain module or a role-named
|
|
2253
|
+
class. Functions are verbs (createInvoice), booleans read like questions
|
|
2254
|
+
(isActive/hasAccess), classes/types are nouns/roles, collections are plural or
|
|
2255
|
+
\u2026ById. This is a review/refactor guide, not a mandate to mass-rename: leave
|
|
2256
|
+
already-clear names alone, prefer the smallest clear rename, don't rename
|
|
2257
|
+
unrelated code, and preserve public/exported names unless the task allows a break.`;
|
|
2258
|
+
var codeNamingSkill = {
|
|
2259
|
+
id: "code-naming",
|
|
2260
|
+
name: "Code Naming",
|
|
2261
|
+
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.`,
|
|
2262
|
+
source: "curated",
|
|
2263
|
+
delivery: {
|
|
2264
|
+
skillFile: { body: CODE_NAMING_BODY },
|
|
2265
|
+
instruction: { body: CODE_NAMING_INSTRUCTION }
|
|
2266
|
+
}
|
|
2267
|
+
};
|
|
2268
|
+
|
|
2128
2269
|
// src/skills/registry.ts
|
|
2129
2270
|
var SKILL_REGISTRY = {
|
|
2130
2271
|
"code-review": codeReviewSkill,
|
|
2131
2272
|
"resolve-conflicts": resolveConflictsSkill,
|
|
2132
|
-
"spec-driven-development": specDrivenDevelopmentSkill
|
|
2273
|
+
"spec-driven-development": specDrivenDevelopmentSkill,
|
|
2274
|
+
"code-naming": codeNamingSkill
|
|
2133
2275
|
};
|
|
2134
2276
|
function isSkillId(id) {
|
|
2135
2277
|
return Object.prototype.hasOwnProperty.call(SKILL_REGISTRY, id);
|