Skip to content

An open-source, faster Devin alternative

TypeScript

Merge branch 'feat/knowledge-repo-hooks' into integration/devin-work

Igor Zalutski via Computer289456202647
diff --cc computer/README.md
index 63fe7602,409b5ac5..d1175074
--- a/computer/README.md
+++ b/computer/README.md
@@@ -582,7 -596,8 +596,8 @@@ src
workspace.ts scratch workdirs and git diff (one-machine mode)
dev/ fakes and checks
scripts/ `npm run check` helpers: file-size ratchet, import boundaries
-bin/ git credential helper and gh shim for hosts
+bin/ git credential helper and gh shim for hosts; ws-*.sh, the git sequences of src/workspaces
definitions/ workspace definitions (computer.json + its root AGENTS.md)
+ hooks/knowledge/ git hooks the host installs in the knowledge repository's clone
deploy/ gateway image entrypoint, VM provisioning, runbook
```
diff --cc computer/src/workspaces/clones.ts
index 7bcb86b0,68a943d0..f7ebe108
--- a/computer/src/workspaces/clones.ts
+++ b/computer/src/workspaces/clones.ts
@@@ -18,9 -17,9 +18,10 @@@ import { promisify } from 'node:util'
import { log } from '../log.js';
import { HOST_DATA, type Person } from '../protocol.js';
import { type Definition, isLazy, loadDefinition, type RepoDef } from './definition.js';
-import { command, copyFile, mkdir, rename, rm, writeFile } from './as-runner.js';
+import { command, copyFile, mkdir, writeFile } from './as-runner.js';
import { Freshness, keyedQueue } from './fetch-schedule.js';
+ import { syncKnowledgeHooks } from './knowledge-hooks.js';
+import { hostScripts, row } from './script-runner.js';
const exec = promisify(execFile);
diff --cc computer/src/workspaces/fork.ts
index 2e58a0cc,4af57272..c25cab84
--- a/computer/src/workspaces/fork.ts
+++ b/computer/src/workspaces/fork.ts
@@@ -15,15 -15,16 +15,16 @@@ import { existsSync, readFileSync } fro
import path from 'node:path';
import { log } from '../log.js';
import type { CheckoutResult, Person } from '../protocol.js';
- import { isLazy, loadDefinition, type RepoDef, repoSlug } from './definition.js';
+ import { isKnowledge, isLazy, loadDefinition, type RepoDef, repoSlug } from './definition.js';
+ import { knowledgeSection } from './knowledge.js';
import { repoIndex } from './repo-index.js';
-import { appendFile, mkdir, rm, touch, writeFile } from './as-runner.js';
+import { appendFile, mkdir, touch, writeFile } from './as-runner.js';
import {
cloneRepo, copyRootFiles, defaultBranch, errText, fetchedAt, fetchErrorType, fetchLane, fetchTimeout, forkDir, forkFetchFresh, forkFetchTimeout,
- freshness, git, isClone, observe, observed, ok, prepareInBackground, safeKey, serial, workspaceDir, workspacePrepared,
+ freshness, isClone, observe, observed, prepareInBackground, safeKey, scriptsFor, serial, workspaceDir, workspacePrepared,
} from './clones.js';
import { FORK_FILE } from './idle.js';
+import { row } from './script-runner.js';
export interface ForkInfo {
key: string;
diff --cc computer/src/workspaces/housekeep.ts
index 51105923,d860950a..b6a2989e
--- a/computer/src/workspaces/housekeep.ts
+++ b/computer/src/workspaces/housekeep.ts
@@@ -17,13 -17,13 +17,14 @@@ import type { Person, WorkspaceStatus
import { isLazy, loadDefinition, type RepoDef, repoSlug, workspacesEnabled } from './definition.js';
import { mkdir } from './as-runner.js';
import {
- cloneRepo, copyRootFiles, defaultBranch, errText, type FetchTrigger, fetchedAt, fetchErrorType, fetchInterval, fetchLane, fetchTimeout, freshness, git,
- HOUSEKEEPING_FETCHES, isClone, observe, observed, ok, personRoot, serial, workspaceDir,
+ cloneRepo, copyRootFiles, defaultBranch, errText, type FetchTrigger, fetchedAt, fetchErrorType, fetchInterval, fetchLane, fetchTimeout, freshness,
+ HOUSEKEEPING_FETCHES, isClone, observe, observed, personRoot, scriptsFor, serial, workspaceDir,
} from './clones.js';
import { limit } from './fetch-schedule.js';
+ import { syncKnowledgeHooks } from './knowledge-hooks.js';
import { pruneIdleArtifacts } from './idle.js';
import { pruneForks } from './prune.js';
+import { row } from './script-runner.js';
type RepoStatus = WorkspaceStatus['repos'][number];