@anchrd/intel-api 0.14.0 → 0.16.0
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/dist/adapters/cloudflare/cloudflare.js +0 -68
- package/dist/adapters/cloudflare/cloudflare.types.d.ts +0 -39
- package/dist/adapters/db/db-flows.js +3 -2
- package/dist/adapters/db/db-grants.d.ts +1 -1
- package/dist/adapters/db/db-grants.js +1 -1
- package/dist/adapters/db/db.js +16 -113
- package/dist/adapters/openid/openid.js +1 -1
- package/dist/adapters/remote-tools/remote-tools.js +1 -1
- package/dist/bundle/bundle.js +31 -141
- package/dist/bundle/bundle.types.d.ts +1 -1
- package/dist/cli/cli.js +18 -11
- package/dist/flows/flows.d.ts +1 -1
- package/dist/flows/flows.js +1 -1
- package/dist/flows/flows.types.d.ts +4 -1
- package/dist/http/http.js +43 -238
- package/dist/http/http.types.d.ts +0 -8
- package/dist/indexing/indexing.js +18 -89
- package/dist/intel/intel.js +4 -9
- package/dist/intel/intel.types.d.ts +0 -6
- package/dist/mcp/mcp.js +84 -361
- package/dist/mcp/mcp.types.d.ts +2 -7
- package/dist/nodes/document-links/document-links.d.ts +6 -8
- package/dist/nodes/document-links/document-links.js +8 -31
- package/dist/nodes/nodes.js +24 -890
- package/dist/nodes/nodes.types.d.ts +14 -173
- package/dist/tools/tool-servers/tool-servers.d.ts +1 -1
- package/dist/tools/tool-servers/tool-servers.js +1 -1
- package/dist/tools/tools.js +37 -148
- package/dist/tools/tools.types.d.ts +1 -22
- package/migrations/0018_no_context_policy_at_last.sql +13 -6
- package/migrations/0019_one_name_for_the_grants.sql +52 -0
- package/package.json +2 -2
- package/dist/adapters/cloudflare-api/cloudflare-api.d.ts +0 -22
- package/dist/adapters/cloudflare-api/cloudflare-api.js +0 -306
- package/dist/adapters/cloudflare-api/cloudflare-api.types.d.ts +0 -64
- package/dist/adapters/cloudflare-api/cloudflare-api.types.js +0 -1
- package/dist/adapters/gate-applications/gate-applications.d.ts +0 -23
- package/dist/adapters/gate-applications/gate-applications.js +0 -88
- package/dist/adapters/tool-delegation/tool-delegation.d.ts +0 -22
- package/dist/adapters/tool-delegation/tool-delegation.js +0 -90
- package/dist/agent-costs/agent-costs.d.ts +0 -16
- package/dist/agent-costs/agent-costs.js +0 -105
- package/dist/agent-costs/agent-costs.types.d.ts +0 -30
- package/dist/agent-costs/agent-costs.types.js +0 -1
- package/dist/agent-runtime/agent-runtime.d.ts +0 -16
- package/dist/agent-runtime/agent-runtime.js +0 -150
- package/dist/agent-runtime/agent-runtime.types.d.ts +0 -122
- package/dist/agent-runtime/agent-runtime.types.js +0 -1
- package/dist/model-catalog/model-catalog.d.ts +0 -2
- package/dist/model-catalog/model-catalog.js +0 -99
- package/dist/model-catalog/model-catalog.types.d.ts +0 -15
- package/dist/model-catalog/model-catalog.types.js +0 -1
- package/dist/nodes/board/board.d.ts +0 -61
- package/dist/nodes/board/board.js +0 -826
- package/dist/nodes/board/board.types.d.ts +0 -38
- package/dist/nodes/board/board.types.js +0 -1
- package/migrations/0013_agents_in_the_tree.sql +0 -76
- package/migrations/0014_agent_applications.sql +0 -25
- package/migrations/0015_tools_delegated_from_a_connection.sql +0 -15
- package/migrations/0016_boards_in_the_tree.sql +0 -80
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { ModelCatalog } from "@anchrd/intel-contract";
|
|
2
|
-
import type { CloudflareAccountApi } from "../adapters/cloudflare-api/cloudflare-api.types.js";
|
|
3
|
-
export interface ModelCatalogDeps {
|
|
4
|
-
/** Absent where the deployment configured no Cloudflare read token. A named state, not an error. */
|
|
5
|
-
cloudflare?: Pick<CloudflareAccountApi, "workersAiModels">;
|
|
6
|
-
}
|
|
7
|
-
export interface ModelCatalogService {
|
|
8
|
-
/**
|
|
9
|
-
* ⚠️ The answer shape lives in `@anchrd/intel-contract`, because the select in the browser parses
|
|
10
|
-
* it. Its `source` field is per ENTRY on purpose: Cloudflare publishes figures for the models it
|
|
11
|
-
* serves itself and none for the Anthropic models it resells, so a healthy read still leaves half
|
|
12
|
-
* the list on a written-out table (#257).
|
|
13
|
-
*/
|
|
14
|
-
list(): Promise<ModelCatalog>;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { type BoardDocument } from "@anchrd/intel-contract";
|
|
2
|
-
import type { BoardDeps, BoardOperations } from "./board.types.js";
|
|
3
|
-
/**
|
|
4
|
-
* A stored board brought up to the current schema, before it is validated.
|
|
5
|
-
*
|
|
6
|
-
* ⚠️ It runs before `BoardDocument.parse`, on `unknown`, because after that parse a missing field or
|
|
7
|
-
* a repeated id is already a refusal — and `parseStoredBoard` is deliberately loud
|
|
8
|
-
* (`board_unreadable`), so an un-upgraded board would not read as "old", it would read as corrupt.
|
|
9
|
-
*
|
|
10
|
-
* The upgrade is persisted by the next write of any kind, because every write serialises the whole
|
|
11
|
-
* document. Nothing has to be migrated ahead of time and nothing has to be re-migrated.
|
|
12
|
-
*/
|
|
13
|
-
export declare function upgradeStoredBoard(parsed: unknown): unknown;
|
|
14
|
-
/**
|
|
15
|
-
* The first id a board document uses for two different things (anchrd/intel#321).
|
|
16
|
-
*
|
|
17
|
-
* ⚠️ Deliberately NOT a rule on `BoardDocument`, and that is the whole decision. A schema rule would
|
|
18
|
-
* reach every parse of a stored body — `parseStoredBoard`, `indexing.ts`, the link reader — and a
|
|
19
|
-
* board imported before this existed would stop answering with `board_unreadable`: the whole board
|
|
20
|
-
* gone over something that costs one view. It is the trap #311 walked into, and #318 walked into
|
|
21
|
-
* from the other side.
|
|
22
|
-
*
|
|
23
|
-
* ⚠️ And NOT folded in `upgradeStoredBoard` either, which is where the sibling rules of #318 went. A
|
|
24
|
-
* repeated `dependsOn`, label or reference carries no information, so dropping the second mention
|
|
25
|
-
* loses nothing. Two tasks under one id are two whole tasks — titles, dates, descriptions — and a
|
|
26
|
-
* fold on the READ is written back by the next save of any kind, because every write serialises the
|
|
27
|
-
* whole document. That is one task gone for good, for every board, without anybody having asked.
|
|
28
|
-
* The UI folds the same pair for a DRAWING (`orderedTasks`), which costs nothing: the document keeps
|
|
29
|
-
* both, and repairing the pair brings the second card back.
|
|
30
|
-
*
|
|
31
|
-
* ⚠️ What this does NOT rescue, and it is worth knowing: `replaced` matches a task by id, so the
|
|
32
|
-
* first `board_task_update` against such a pair writes the SAME task into both entries. The stored
|
|
33
|
-
* board is then two identical tasks rather than two different ones. That is a consequence of
|
|
34
|
-
* addressing a board by task id at all (#285) and predates this rule; the reason the rule is at the
|
|
35
|
-
* import is to stop the pair from existing, not to make it survivable. A board that already holds
|
|
36
|
-
* one is repaired by `repairTaskIds` below — asked for, never done on the quiet — and the refusal
|
|
37
|
-
* here names it, because "your file is wrong" without a way out is where anchrd/intel#341 started.
|
|
38
|
-
*
|
|
39
|
-
* So it is asked exactly where there is a caller to answer: the bundle import, the one door a board
|
|
40
|
-
* document written elsewhere comes in through. Everything else mints task ids itself (`deps.id()`)
|
|
41
|
-
* and takes its status list through `ConfigureBoardInput`, which has demanded distinct ids since
|
|
42
|
-
* #285.
|
|
43
|
-
*/
|
|
44
|
-
export declare function repeatedBoardId(document: BoardDocument): {
|
|
45
|
-
list: "statuses" | "tasks";
|
|
46
|
-
id: string;
|
|
47
|
-
} | null;
|
|
48
|
-
/**
|
|
49
|
-
* Every board operation, applied to the document rather than to the file (#285).
|
|
50
|
-
*
|
|
51
|
-
* ⚠️ This module is where a board's rules live, and it is deliberately pure: it takes a document
|
|
52
|
-
* and gives back the next one. The version, R2 and the retry against a racing write are the
|
|
53
|
-
* service's business (`nodes.ts`), and the surfaces have no rules of their own — HTTP, MCP and the
|
|
54
|
-
* UI all arrive here. A second implementation of "may this task depend on that one" is the thing
|
|
55
|
-
* this shape exists to prevent.
|
|
56
|
-
*
|
|
57
|
-
* ⚠️ What it does NOT check is anything that needs the tree: whether a `references` id names a node
|
|
58
|
-
* the writer may see, and whether an `agent` assignee is really an agent. Those are reads against
|
|
59
|
-
* D1 and the ACL, so they happen in the service before the document is touched at all.
|
|
60
|
-
*/
|
|
61
|
-
export declare function createBoard(deps: BoardDeps): BoardOperations;
|