Skip to content

An open-source, faster Devin alternative

TypeScript

Work index: the WORK_INDEX binding and its v7 migration

Igor Zalutski via Computer2f5d693b4083
diff --git a/services/managed-agents/src/computer/config.ts b/services/managed-agents/src/computer/config.ts
index 5aa410c3..98799940 100644
--- a/services/managed-agents/src/computer/config.ts
+++ b/services/managed-agents/src/computer/config.ts
@@ -87,6 +87,8 @@ export interface ComputerEdgeEnv extends PreviewsEnv {
CF_VERSION_METADATA?: { id?: string };
/** Work 084: one SessionLogDurableObject per session (`getByName(cs_…)`): the API's copy of its event log. */
SESSION_LOG?: DurableObjectNamespace;
+ /** Work tracking 3.6: the Work index, one per organization (work/index-do.ts). */
+ WORK_INDEX?: DurableObjectNamespace;
/** Work 084: the SessionLog's large payloads and sealed segments (`<org>/<session>/…`). */
SESSION_LOG_BLOBS?: R2Bucket;
/** Work 084: `h:<sha256(key)>` → the wire's key record, `k:<keyId>` → its hash; written by keys.ts, read by the wire Worker. */
diff --git a/services/managed-agents/src/edge/index.ts b/services/managed-agents/src/edge/index.ts
index 73b3bb9f..c5a66c6b 100644
--- a/services/managed-agents/src/edge/index.ts
+++ b/services/managed-agents/src/edge/index.ts
@@ -316,6 +316,7 @@ import {
computerReachableConnections,
} from "./computer-grants.js";
import { SessionLogDurableObject } from "../computer/session-log.js";
+import { WorkIndexDurableObject } from "../computer/work/index-do.js";
import type { ComputerEdgeEnv } from "../computer/config.js";
import {
type Latency,
@@ -335,6 +336,7 @@ export {
ProjectDatabaseDurableObject,
SessionDurableObject,
SessionLogDurableObject,
+ WorkIndexDurableObject,
};
const MICROVM_STATES = new Set([
diff --git a/services/managed-agents/wrangler.jsonc b/services/managed-agents/wrangler.jsonc
index 67d17d13..34cec283 100644
--- a/services/managed-agents/wrangler.jsonc
+++ b/services/managed-agents/wrangler.jsonc
@@ -57,7 +57,9 @@
"class_name": "ComputerDurableObject"
},
// Work 084: one per computer session, the API's copy of its event log.
- { "name": "SESSION_LOG", "class_name": "SessionLogDurableObject" }
+ { "name": "SESSION_LOG", "class_name": "SessionLogDurableObject" },
+ // Work tracking 3.6: one per organization, the projection of its knowledge repository.
+ { "name": "WORK_INDEX", "class_name": "WorkIndexDurableObject" }
]
},
"migrations": [
@@ -84,7 +86,8 @@
"tag": "v5",
"new_sqlite_classes": ["ComputerDurableObject"]
},
- { "tag": "v6", "new_sqlite_classes": ["SessionLogDurableObject"] }
+ { "tag": "v6", "new_sqlite_classes": ["SessionLogDurableObject"] },
+ { "tag": "v7", "new_sqlite_classes": ["WorkIndexDurableObject"] }
],
"observability": {
"enabled": true,
diff --git a/services/managed-agents/wrangler.production.jsonc b/services/managed-agents/wrangler.production.jsonc
index 09bdf2e5..4154d50a 100644
--- a/services/managed-agents/wrangler.production.jsonc
+++ b/services/managed-agents/wrangler.production.jsonc
@@ -106,6 +106,8 @@
},
// Work 084: one per computer session, the API's copy of its event log.
{ "name": "SESSION_LOG", "class_name": "SessionLogDurableObject" },
+ // Work tracking 3.6: one per organization, the projection of its knowledge repository.
+ { "name": "WORK_INDEX", "class_name": "WorkIndexDurableObject" },
// Work 074: preview names, owned by the `previews` Worker (deploy it
// first). Previews stay off until PREVIEW_PLATFORM_KEY,
// PREVIEW_CF_API_TOKEN, PREVIEW_CF_ACCOUNT_ID and PREVIEW_CF_ZONE_ID are
@@ -157,7 +159,8 @@
"tag": "v5",
"new_sqlite_classes": ["ComputerDurableObject"]
},
- { "tag": "v6", "new_sqlite_classes": ["SessionLogDurableObject"] }
+ { "tag": "v6", "new_sqlite_classes": ["SessionLogDurableObject"] },
+ { "tag": "v7", "new_sqlite_classes": ["WorkIndexDurableObject"] }
],
// Console output and exceptions go to Axiom (dataset oc-platform-edge)
// through the tail Worker cloudflare-workers/log-tail.