3 views

cloudflare/cloudflare-os

Agent workspace built on Cloudflare Workers for creating documents, building apps, and running agents with your company’s context and systems.

TypeScript★ 11,086+101 that day#7 on trending

Analyzed October 6, 2026 at b304e8c (main) with jscpd 5.4.0 in 2.2s. Code duplication went from 2.15% on Oct 4 to 2.05% on Oct 6.

E18.4/100
Project health646,117 lines of code (L)
Duplication3
45.2% in typescript, tsx, bash, perl
Dead code80
2.4%
Complexity31
84.5%

The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.

2.05%duplicated code · 4,435 of 216,720 lines
351clones in code
647code files of 1,301 scanned
43.5%duplicated over all files · 1,382 clones

The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code, and 2 generated files: packages/workshop-backend/src/env.d.ts, packages/workshop-frontend/src/routeTree.gen.ts.

Largest clones in the code

  • 48 lines in 2 placestypescript368 tokens
    529  if (!this.ctx.storage.kv.get<LinearOAuthGrant>("grant")) {
    530    await this.ctx.storage.setAlarm(Date.now() + CONNECT_TIMEOUT_MS);
    531  }
    532  this.ctx.storage.kv.put("callback", callback);
    533  this.ctx.storage.kv.put<StoredNonce>("nonce", {
    534    value: initiationNonce,
    535    expiresAt: Date.now() + INITIATION_NONCE_LIFETIME_MS,
    536    stage: "initiation",
    537  });
    538}
    

    First 10 of 48 lines.

  • 48 lines in 2 placestypescript362 tokens
    284  if (!this.ctx.storage.kv.get<StoredGrant>("grant")) {
    285    this.ctx.storage.setAlarm(Date.now() + CONNECT_TIMEOUT_MS);
    286  }
    287  this.ctx.storage.kv.put("callback", callback);
    288  this.ctx.storage.kv.put<StoredNonce>("nonce", {
    289    value: initiationNonce, expiresAt: Date.now() + INITIATION_NONCE_LIFETIME_MS, stage: "initiation",
    290  });
    291}
    292
    293async prepareReconnect(initiationNonce: string) {
    
    327  if (!this.ctx.storage.kv.get<string>("accessToken")) {
    328    this.ctx.storage.setAlarm(Date.now() + CONNECT_TIMEOUT_MS);
    329  }
    330  this.ctx.storage.kv.put("callback", callback);
    331  this.ctx.storage.kv.put<StoredNonce>("nonce", {
    332    value: initiationNonce,
    333    expiresAt: Date.now() + INITIATION_NONCE_LIFETIME_MS,
    334    stage: "initiation",
    335  });
    336}
    

    First 10 of 48 lines, the second copy on the right.

  • 27 lines in 3 placestypescript150 tokens
    257      "knowledge bases, or keep pages up to date.",
    258  };
    259}
    260
    261async connectAccount(
    262  callback: Fetcher<GatekeeperConnectCallback>, _options?: GatekeeperConnectOptions,
    263): Promise<{ url: string }> {
    264  const userObjectId = this.ctx.exports.UserAccount.newUniqueId();
    265  const initiationNonce = generateNonce();
    266  await this.ctx.exports.UserAccount.get(userObjectId).setCallback(callback, initiationNonce);
    
    483      "or scope a Gadget to a single playlist.",
    484  };
    485}
    486
    487async connectAccount(
    488  callback: Fetcher<GatekeeperConnectCallback>,
    489  _options?: GatekeeperConnectOptions,
    490): Promise<{ url: string }> {
    491  const userObjectId = this.ctx.exports.UserAccount.newUniqueId();
    492  const initiationNonce = generateNonce();
    

    First 10 of 27 lines, the second copy on the right.

7 more
Largest clones over all files, tests and data included
By format, code only
FormatFilesLinesClonesDuplicated linesDuplication
typescript452166,6703063,9072.34%
tsx18549,232455281.07%
bash9644000%
perl1174000%
By format, all files
FormatFilesLinesClonesDuplicated linesDuplication
typescript875579,7301,119290,27850.07%
tsx24066,7651961,9342.9%
json693,0063967922.59%
css81,9081325913.57%
yaml141,643121378.34%
markdown6019,9582180.09%
text13187173.74%
bash11659000%
perl1174000%
markup6116000%

Trending appearances

DayRankStarsFilesLinesClonesAll filesCodeHealthCommit
Oct 6, 2026#711,086 (+101)1,301674,2781,38243.5%2.05%E 18.4b304e8c
Oct 4, 2026#410,651 (+85)1,272657,8451,33344.52%2.15%E 17.95cae880

Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.