@intentface/latch-agent-builder 0.9.1
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/LICENSE +21 -0
- package/README.md +30 -0
- package/dist/agent-builder.d.ts +105 -0
- package/dist/agent-builder.d.ts.map +1 -0
- package/dist/agent-builder.js +559 -0
- package/dist/agent-builder.js.map +1 -0
- package/dist/extension.d.ts +58 -0
- package/dist/extension.d.ts.map +1 -0
- package/dist/extension.js +2 -0
- package/dist/extension.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/record.d.ts +230 -0
- package/dist/record.d.ts.map +1 -0
- package/dist/record.js +217 -0
- package/dist/record.js.map +1 -0
- package/dist/shared-read-tools.d.ts +16 -0
- package/dist/shared-read-tools.d.ts.map +1 -0
- package/dist/shared-read-tools.js +28 -0
- package/dist/shared-read-tools.js.map +1 -0
- package/dist/store.d.ts +40 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +2 -0
- package/dist/store.js.map +1 -0
- package/package.json +59 -0
package/dist/store.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { DynamicAgentStore } from "@intentface/latch-core";
|
|
2
|
+
import type { AgentRecord, AgentScope } from "./record";
|
|
3
|
+
/**
|
|
4
|
+
* The store seam for agent records.
|
|
5
|
+
*
|
|
6
|
+
* The record SHAPE lives in `./record` (one zod schema → type, validator,
|
|
7
|
+
* tool input, editor form). Storage is host-supplied: `@intentface/latch-drizzle`
|
|
8
|
+
* ships an implementation. The store doubles as a `DynamicAgentStore` so saved
|
|
9
|
+
* records are runnable by the host's runtime — `resolve` builds the same
|
|
10
|
+
* `AgentConfig` a code-declared agent would.
|
|
11
|
+
*/
|
|
12
|
+
export type { AgentRecord, AgentScope, AttachedEval, AgentRecordInput } from "./record";
|
|
13
|
+
export { normalizeAgentName, parseAgentRef } from "./record";
|
|
14
|
+
/**
|
|
15
|
+
* The storage seam the builder writes through. Extends `DynamicAgentStore` so
|
|
16
|
+
* one object serves both duties: record CRUD for the builder/editor, and
|
|
17
|
+
* list/resolve for the runtime's dynamic-agent registry.
|
|
18
|
+
*/
|
|
19
|
+
export interface AgentBuilderStore<P> extends DynamicAgentStore<P> {
|
|
20
|
+
/** Full records visible to the caller (org + personal), for the builder/editor. */
|
|
21
|
+
listRecords: (p: P) => Promise<AgentRecord[]>;
|
|
22
|
+
/**
|
|
23
|
+
* One record by name — personal wins over org on a clash, unless the name is
|
|
24
|
+
* pinned with an `org:`/`user:` prefix (see `parseAgentRef`), which is how
|
|
25
|
+
* channel bindings and run records refer to an agent.
|
|
26
|
+
*/
|
|
27
|
+
getRecord: (p: P, name: string) => Promise<AgentRecord | undefined>;
|
|
28
|
+
/** Create or update by (owner, name). Callers pass a NORMALIZED record (`normalizeAgentRecord`). */
|
|
29
|
+
upsert: (p: P, rec: AgentRecord) => Promise<void>;
|
|
30
|
+
remove: (p: P, scope: AgentScope, name: string) => Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* SYSTEM op (principal-free, cross-tenant): distinct names of records that
|
|
33
|
+
* look memory-enabled — a cheap prefilter for a background memory sweep. The
|
|
34
|
+
* sweep must re-check each candidate authoritatively (via `getRecord` under
|
|
35
|
+
* the chat's own principal); false positives here are harmless, and results
|
|
36
|
+
* must never feed anything but that per-principal check.
|
|
37
|
+
*/
|
|
38
|
+
listMemoryEnabledNames: () => Promise<string[]>;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAExD;;;;;;;;GAQG;AAEH,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE7D;;;;GAIG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC,CAAE,SAAQ,iBAAiB,CAAC,CAAC,CAAC;IAChE,mFAAmF;IACnF,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAC9C;;;;OAIG;IACH,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC;IACpE,oGAAoG;IACpG,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE;;;;;;OAMG;IACH,sBAAsB,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CACjD"}
|
package/dist/store.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@intentface/latch-agent-builder",
|
|
3
|
+
"version": "0.9.1",
|
|
4
|
+
"description": "Latch agent builder — the meta-agent that designs, creates, and updates agents from a conversation. Host-agnostic core with an extension seam (evals, tool authoring) so hosts plug in what they support.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ai",
|
|
7
|
+
"ai-sdk",
|
|
8
|
+
"agents",
|
|
9
|
+
"llm",
|
|
10
|
+
"agent-builder",
|
|
11
|
+
"prompt-management"
|
|
12
|
+
],
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"type": "module",
|
|
15
|
+
"main": "./dist/index.js",
|
|
16
|
+
"module": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./record": {
|
|
24
|
+
"types": "./dist/record.d.ts",
|
|
25
|
+
"import": "./dist/record.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
31
|
+
"sideEffects": false,
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public",
|
|
34
|
+
"registry": "https://registry.npmjs.org"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"zod": "^4.0.0",
|
|
38
|
+
"@intentface/latch-core": "^0.9.1"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"ai": ">=7.0.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/node": "^22",
|
|
45
|
+
"ai": "^7.0.2",
|
|
46
|
+
"typescript": "^5.7.0",
|
|
47
|
+
"vitest": "^4"
|
|
48
|
+
},
|
|
49
|
+
"repository": {
|
|
50
|
+
"type": "git",
|
|
51
|
+
"url": "git+https://github.com/Intentface/intentface-latch.git",
|
|
52
|
+
"directory": "packages/agent-builder"
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"build": "tsc -p tsconfig.build.json",
|
|
56
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
57
|
+
"test": "vitest run"
|
|
58
|
+
}
|
|
59
|
+
}
|