aipoch/open-science
Open Science by AIPOCH is an open-source, local-first, model-agnostic AI research workbench for macOS, Windows, and Linux, with scientific agents, Python/R notebooks, data connectors, and reproducible provenance.
TypeScript★ 3,946+146 that day#6 on trending
1.61%duplicated code · 8,853 of 550,774 lines
728clones in code
1,733code files of 3,628 scanned
7.82%duplicated over all files · 8,967 clones
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code, and 3 generated files: scripts/merge-mac-feed.mjs, src/main/database/generated/runtime-schema.ts, src/shared/web-api-map.generated.ts.
Largest clones in the code
- 9 lines in 8 placestypescript67 tokenssrc/main/database/migration-service.ts:407–415src/main/database/migration-service.ts:416–424src/main/database/migration-service.ts:425–433src/main/database/migration-service.ts:435–443src/main/database/migration-service.ts:444–452and 3 more
407 notificationAttentionMetadataMigration.verifiers 408 .filter((verifier) => verifier.kind === 'check-constraints-exist') 409 .flatMap((verifier) => verifier.tables) 410 .map(({ table, constraints }) => [ 411 table, 412 Object.fromEntries(constraints.map(({ name, expression }) => [name, expression])) 413 ]) 414 ) 415const DATABASE_JSON_ALLOWED_SUFFIX_CHECKS: AllowedSuffixCheckConstraints = Object.fromEntries(416 databaseJsonConstraintsMigration.verifiers 417 .filter((verifier) => verifier.kind === 'check-constraints-exist') 418 .flatMap((verifier) => verifier.tables) 419 .map(({ table, constraints }) => [ 420 table, 421 Object.fromEntries(constraints.map(({ name, expression }) => [name, expression])) 422 ]) 423) 424const VISION_EVIDENCE_ALLOWED_SUFFIX_CHECKS: AllowedSuffixCheckConstraints = Object.fromEntries( - 57 lines in 2 placestypescript346 tokens
212 throw new Error(`Unsupported entry type in CodeBuddy archive: ${name}`) 213 } 214 215 await mkdir(dirname(output), { recursive: true }) 216 this.currentFile = await open(output, 'w', this.currentMode) 217 this.currentPath = output 218 this.entries += 1 219} 220 221private async finishEntry(): Promise<void> {First 10 of 57 lines.
- 9 lines in 4 placestypescript104 tokenssrc/main/notebook/dependency-analysis-python.ts:2523–2531src/main/notebook/dependency-analysis-python.ts:2535–2543src/main/notebook/dependency-analysis-python.ts:2548–2556src/main/notebook/dependency-analysis-python.ts:2562–2570
2523 SAFE_CALLS.has(node.func.id ?? '') 2524) { 2525 this.safeCallNames.add(node.func.id ?? '') 2526 const possible = new Set( 2527 [...args, ...(node.keywords ?? []).map((keyword) => keyword.value)] 2528 .map((candidate) => this.visibleRootName(candidate)) 2529 .filter((name): name is string => Boolean(name)) 2530 ) 2531 for (const name of possible) this.safeCallArgumentNames.add(name)
7 more
- 19 lines in 4 placestsx100 tokens
- 26 lines in 3 placestsx139 tokens
- 35 lines in 2 placesjavascript253 tokens
- 47 lines in 2 placestypescript252 tokens
- 24 lines in 2 placestypescript250 tokens
- 41 lines in 2 placestypescript243 tokens
- 43 lines in 2 placestypescript241 tokens
Largest clones over all files, tests and data included
- 18 lines in 28 placestypescripttests91 tokenssrc/main/notebook/dependency-analysis.test.ts:4412–4429src/main/notebook/dependency-analysis.test.ts:4798–4815src/main/notebook/dependency-analysis.test.ts:4833–4850src/main/notebook/dependency-analysis.test.ts:4897–4914src/main/notebook/dependency-analysis.test.ts:4935–4952and 23 more
4412const scripts = ['x <- 1', 'y <- x + 1', 'x <- 2'] 4413let projection 4414for (const [index, script] of scripts.entries()) { 4415 const completedRun = { 4416 ...run(`run-${index + 1}`, `cell-${index + 1}`, script, index + 1), 4417 kernelKind: 'r' as const, 4418 environment: 'default-r' 4419 } 4420 runs.push(completedRun) 4421 projection = await analyzer.project({First 10 of 18 lines.
- 14 lines in 29 placestypescripttests80 tokenssrc/main/notebook/dependency-analysis.test.ts:2287–2300src/main/notebook/dependency-analysis.test.ts:2335–2348src/main/notebook/dependency-analysis.test.ts:2359–2372src/main/notebook/dependency-analysis.test.ts:2386–2399src/main/notebook/dependency-analysis.test.ts:2420–2433and 24 more
2287const scripts = ['x = 1', 'y = x + 1', 'x = 2'] 2288let projection 2289for (const [index, script] of scripts.entries()) { 2290 const completedRun = run(`run-${index + 1}`, `cell-${index + 1}`, script, index + 1) 2291 runs.push(completedRun) 2292 projection = await analyzer.project({ 2293 projectId: 'default-project', 2294 sessionId: 'session-1', 2295 completedRun, 2296 interpreter: unusedPythonFirst 10 of 14 lines.
- 7 lines in 23 placestypescripttests68 tokenssrc/main/acp/isolated-execution-preflight.test.ts:58–64src/main/acp/opencode-immediate-handoff.integration.test.ts:71–78src/main/acp/runtime.test.ts:2174–2180src/main/acp/runtime.test.ts:6962–6971src/main/acp/runtime.test.ts:9047–9056and 18 more
58.agent({ name: 'isolated-preflight-agent' }) 59.onRequest(acp.methods.agent.initialize, () => ({ 60 protocolVersion: acp.PROTOCOL_VERSION, 61 agentCapabilities: { loadSession: false, sessionCapabilities: { close: {} } }, 62 authMethods: [] 63})) 64.onRequest(acp.methods.agent.session.new, () => ({ sessionId: identity.providerSessionId }))71.agent({ name: 'fake-opencode' }) 72.onRequest(acp.methods.agent.initialize, () => ({ 73 protocolVersion: acp.PROTOCOL_VERSION, 74 agentCapabilities: { loadSession: false, sessionCapabilities: { close: {} } }, 75 authMethods: [] 76})) 77.onRequest(acp.methods.agent.session.new, () => ({ 78 sessionId: 'opencode-session', - 9 lines in 13 placestypescripttests95 tokens
- 13 lines in 15 placestsxtests70 tokenssrc/renderer/src/components/FieldHelp.render.test.tsx:8–20src/renderer/src/components/SessionPersistenceAlert.render.test.tsx:8–20src/renderer/src/components/ui/editable-number-combobox.render.test.tsx:8–20src/renderer/src/pages/settings/AgentFrameworkCard.render.test.tsx:10–22src/renderer/src/pages/settings/ClaudeIsolatedSignInModal.render.test.tsx:12–24and 10 more
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 1,310 | 410,383 | 498 | 6,058 | 1.48% |
| tsx | 344 | 116,814 | 166 | 2,110 | 1.81% |
| javascript | 59 | 18,327 | 53 | 595 | 3.25% |
| r | 1 | 1,647 | 5 | 39 | 2.37% |
| powershell | 2 | 343 | 4 | 37 | 10.79% |
| python | 6 | 1,861 | 2 | 14 | 0.75% |
| bash | 9 | 644 | 0 | 0 | 0% |
| cpp | 1 | 581 | 0 | 0 | 0% |
| perl | 1 | 174 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 2,563 | 1,046,962 | 6,510 | 81,273 | 7.76% |
| tsx | 655 | 280,993 | 2,301 | 28,421 | 10.11% |
| javascript | 70 | 21,154 | 60 | 658 | 3.11% |
| yaml | 48 | 6,579 | 33 | 465 | 7.07% |
| markdown | 169 | 18,730 | 19 | 230 | 1.23% |
| json | 27 | 42,389 | 14 | 340 | 0.8% |
| css | 5 | 2,188 | 11 | 102 | 4.66% |
| text | 13 | 128 | 8 | 56 | 43.75% |
| r | 1 | 1,647 | 5 | 39 | 2.37% |
| bash | 34 | 1,011 | 3 | 31 | 3.07% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Sep 7, 2026 | #6 | 3,946 (+146) | 3,628 | 1,427,983 | 8,967 | 7.82% | 1.61% | — | 7cb201c |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.