@aria-cli/tools 1.0.9 → 1.0.11
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/package.json +9 -5
- package/src/__tests__/web-fetch-download.test.ts +0 -433
- package/src/__tests__/web-tools.test.ts +0 -619
- package/src/ask-user-interaction.ts +0 -33
- package/src/cache/web-cache.ts +0 -110
- package/src/definitions/arion.ts +0 -118
- package/src/definitions/browser/browser.ts +0 -502
- package/src/definitions/browser/index.ts +0 -5
- package/src/definitions/browser/pw-downloads.ts +0 -142
- package/src/definitions/browser/pw-interactions.ts +0 -282
- package/src/definitions/browser/pw-responses.ts +0 -98
- package/src/definitions/browser/pw-session.ts +0 -405
- package/src/definitions/browser/pw-shared.ts +0 -85
- package/src/definitions/browser/pw-snapshot.ts +0 -383
- package/src/definitions/browser/pw-state.ts +0 -101
- package/src/definitions/browser/types.ts +0 -203
- package/src/definitions/code-intelligence.ts +0 -526
- package/src/definitions/core.ts +0 -118
- package/src/definitions/delegation.ts +0 -567
- package/src/definitions/deploy.ts +0 -73
- package/src/definitions/filesystem.ts +0 -217
- package/src/definitions/frg.ts +0 -67
- package/src/definitions/index.ts +0 -28
- package/src/definitions/memory.ts +0 -150
- package/src/definitions/messaging.ts +0 -734
- package/src/definitions/meta.ts +0 -392
- package/src/definitions/network.ts +0 -179
- package/src/definitions/outlook.ts +0 -318
- package/src/definitions/patch/apply-patch.ts +0 -235
- package/src/definitions/patch/fuzzy-match.ts +0 -217
- package/src/definitions/patch/index.ts +0 -1
- package/src/definitions/patch/patch-parser.ts +0 -297
- package/src/definitions/patch/sandbox-paths.ts +0 -129
- package/src/definitions/process/index.ts +0 -5
- package/src/definitions/process/process-registry.ts +0 -303
- package/src/definitions/process/process.ts +0 -456
- package/src/definitions/process/pty-keys.ts +0 -298
- package/src/definitions/process/session-slug.ts +0 -147
- package/src/definitions/quip.ts +0 -225
- package/src/definitions/search.ts +0 -67
- package/src/definitions/session-history.ts +0 -79
- package/src/definitions/shell.ts +0 -202
- package/src/definitions/slack.ts +0 -211
- package/src/definitions/web.ts +0 -119
- package/src/executors/apply-patch.ts +0 -1035
- package/src/executors/arion.ts +0 -199
- package/src/executors/code-intelligence.ts +0 -1179
- package/src/executors/deploy.ts +0 -1066
- package/src/executors/filesystem.ts +0 -1428
- package/src/executors/frg-freshness.ts +0 -743
- package/src/executors/frg.ts +0 -394
- package/src/executors/index.ts +0 -280
- package/src/executors/learning-meta.ts +0 -1367
- package/src/executors/lsp-client.ts +0 -355
- package/src/executors/memory.ts +0 -978
- package/src/executors/meta.ts +0 -293
- package/src/executors/process-registry.ts +0 -570
- package/src/executors/pty-session-store.ts +0 -43
- package/src/executors/pty.ts +0 -342
- package/src/executors/restart.ts +0 -133
- package/src/executors/search-freshness.ts +0 -249
- package/src/executors/search-types.ts +0 -98
- package/src/executors/search.ts +0 -89
- package/src/executors/self-diagnose.ts +0 -552
- package/src/executors/session-history.ts +0 -435
- package/src/executors/shell-safety.ts +0 -519
- package/src/executors/shell.ts +0 -1243
- package/src/executors/utils.ts +0 -40
- package/src/executors/web.ts +0 -786
- package/src/extraction/content-extraction.ts +0 -281
- package/src/extraction/index.ts +0 -5
- package/src/headless-control-contract.ts +0 -1149
- package/src/index.ts +0 -788
- package/src/local-control-http-auth.ts +0 -2
- package/src/mcp/client.ts +0 -218
- package/src/mcp/connection.ts +0 -568
- package/src/mcp/index.ts +0 -11
- package/src/mcp/jsonrpc.ts +0 -195
- package/src/mcp/types.ts +0 -199
- package/src/network-control-adapter.ts +0 -88
- package/src/network-runtime/address-types.ts +0 -218
- package/src/network-runtime/db-owner-fencing.ts +0 -91
- package/src/network-runtime/delivery-receipts.ts +0 -372
- package/src/network-runtime/direct-endpoint-authority.ts +0 -35
- package/src/network-runtime/index.ts +0 -316
- package/src/network-runtime/local-control-contract.ts +0 -784
- package/src/network-runtime/node-store-contract.ts +0 -46
- package/src/network-runtime/pair-route-contract.ts +0 -97
- package/src/network-runtime/peer-capabilities.ts +0 -48
- package/src/network-runtime/peer-principal-ref.ts +0 -20
- package/src/network-runtime/peer-state-machine.ts +0 -160
- package/src/network-runtime/protocol-schemas.ts +0 -265
- package/src/network-runtime/runtime-bootstrap-contract.ts +0 -83
- package/src/outlook/desktop-session.ts +0 -409
- package/src/policy.ts +0 -171
- package/src/providers/brave.ts +0 -80
- package/src/providers/duckduckgo.ts +0 -199
- package/src/providers/exa.ts +0 -85
- package/src/providers/firecrawl.ts +0 -77
- package/src/providers/index.ts +0 -8
- package/src/providers/jina.ts +0 -70
- package/src/providers/router.ts +0 -121
- package/src/providers/search-provider.ts +0 -74
- package/src/providers/tavily.ts +0 -74
- package/src/quip/desktop-session.ts +0 -435
- package/src/registry/index.ts +0 -1
- package/src/registry/registry.ts +0 -905
- package/src/runtime-socket-local-control-client.ts +0 -632
- package/src/security/dns-normalization.ts +0 -34
- package/src/security/dns-pinning.ts +0 -138
- package/src/security/external-content.ts +0 -129
- package/src/security/ssrf.ts +0 -207
- package/src/slack/desktop-session.ts +0 -493
- package/src/tool-factory.ts +0 -91
- package/src/types.ts +0 -1341
- package/src/utils/retry.ts +0 -163
- package/src/utils/safe-parse-json.ts +0 -176
- package/src/utils/url.ts +0 -20
- package/tests/benchmarks/registry.bench.ts +0 -57
- package/tests/cache/web-cache.test.ts +0 -147
- package/tests/critical-integration.test.ts +0 -1465
- package/tests/definitions/apply-patch.test.ts +0 -586
- package/tests/definitions/browser.test.ts +0 -495
- package/tests/definitions/delegation-pause-resume.test.ts +0 -758
- package/tests/definitions/execution.test.ts +0 -671
- package/tests/definitions/messaging-inbox-scope.test.ts +0 -229
- package/tests/definitions/messaging.test.ts +0 -1468
- package/tests/definitions/outlook.test.ts +0 -30
- package/tests/definitions/process.test.ts +0 -469
- package/tests/definitions/slack.test.ts +0 -28
- package/tests/definitions/tool-inventory.test.ts +0 -218
- package/tests/e2e/delegation-quest-orchestration.e2e.test.ts +0 -433
- package/tests/e2e/memory-tool-discovery-contract.e2e.test.ts +0 -81
- package/tests/executors/apply-patch.test.ts +0 -538
- package/tests/executors/arion.test.ts +0 -309
- package/tests/executors/conversation-primitives.test.ts +0 -250
- package/tests/executors/deploy.test.ts +0 -746
- package/tests/executors/filesystem-tools.test.ts +0 -357
- package/tests/executors/filesystem.test.ts +0 -959
- package/tests/executors/frg-freshness.test.ts +0 -136
- package/tests/executors/frg-merge.test.ts +0 -70
- package/tests/executors/frg-session-content.test.ts +0 -40
- package/tests/executors/frg.test.ts +0 -56
- package/tests/executors/memory-bugfixes.test.ts +0 -257
- package/tests/executors/memory-real-memoria.integration.test.ts +0 -316
- package/tests/executors/memory.test.ts +0 -853
- package/tests/executors/meta-tools.test.ts +0 -411
- package/tests/executors/meta.test.ts +0 -683
- package/tests/executors/path-containment.test.ts +0 -51
- package/tests/executors/process-registry.test.ts +0 -505
- package/tests/executors/pty.test.ts +0 -664
- package/tests/executors/quest-security.test.ts +0 -249
- package/tests/executors/read-file-media.test.ts +0 -230
- package/tests/executors/recall-knowledge-schema.test.ts +0 -209
- package/tests/executors/recall-tags.test.ts +0 -278
- package/tests/executors/remember-null-safety.contract.test.ts +0 -41
- package/tests/executors/restart.test.ts +0 -67
- package/tests/executors/search-unified.test.ts +0 -381
- package/tests/executors/session-history.test.ts +0 -340
- package/tests/executors/session-transcript.test.ts +0 -561
- package/tests/executors/shell-abort.test.ts +0 -416
- package/tests/executors/shell-env-blocklist.test.ts +0 -648
- package/tests/executors/shell-env-process.test.ts +0 -245
- package/tests/executors/shell-process-registry.test.ts +0 -334
- package/tests/executors/shell-tools.test.ts +0 -393
- package/tests/executors/shell.test.ts +0 -690
- package/tests/executors/web-abort-vs-timeout.test.ts +0 -213
- package/tests/executors/web-integration.test.ts +0 -633
- package/tests/executors/web-symlink.test.ts +0 -18
- package/tests/executors/web.test.ts +0 -1400
- package/tests/executors/write-stdin.test.ts +0 -145
- package/tests/extraction/content-extraction.test.ts +0 -153
- package/tests/guards/tools-default-test-lane.integration.test.ts +0 -21
- package/tests/guards/tools-package-test-commands.e2e.test.ts +0 -43
- package/tests/guards/tools-test-lane-manifest.contract.test.ts +0 -76
- package/tests/guards/tools-vitest-workspace-alias.contract.test.ts +0 -63
- package/tests/helpers/async-waits.ts +0 -53
- package/tests/integration/headless-control-contract.integration.test.ts +0 -153
- package/tests/integration/memory-tool-schema-parity.integration.test.ts +0 -67
- package/tests/integration/meta-tools-round-trip.integration.test.ts +0 -506
- package/tests/integration/quest-round-trip.test.ts +0 -303
- package/tests/integration/registry-executor-flow.test.ts +0 -85
- package/tests/integration.test.ts +0 -177
- package/tests/loading-tier.test.ts +0 -126
- package/tests/mcp/client-reconnect.test.ts +0 -267
- package/tests/mcp/connection.test.ts +0 -846
- package/tests/mcp/injectable-logger.test.ts +0 -83
- package/tests/mcp/jsonrpc.test.ts +0 -109
- package/tests/mcp/lifecycle.test.ts +0 -879
- package/tests/network-runtime/address-types.contract.test.ts +0 -143
- package/tests/network-runtime/continuity-bind-schema.contract.test.ts +0 -203
- package/tests/network-runtime/local-control-contract.test.ts +0 -869
- package/tests/network-runtime/local-control-invite-token.contract.test.ts +0 -146
- package/tests/network-runtime/node-store-contract.test.ts +0 -11
- package/tests/network-runtime/pair-protocol-nodeid.contract.test.ts +0 -15
- package/tests/network-runtime/peer-state-machine.contract.test.ts +0 -148
- package/tests/network-runtime/protocol-schemas.contract.test.ts +0 -512
- package/tests/network-runtime/relay-pending-nodeid.contract.test.ts +0 -62
- package/tests/network-runtime/runtime-bootstrap-contract.test.ts +0 -227
- package/tests/network-runtime/runtime-socket-local-control-client.test.ts +0 -621
- package/tests/network-runtime/wait-for-message-script.test.ts +0 -288
- package/tests/parallel.test.ts +0 -71
- package/tests/policy.test.ts +0 -184
- package/tests/print-default-test-lane.ts +0 -14
- package/tests/print-test-lane-manifest.ts +0 -22
- package/tests/providers/brave.test.ts +0 -159
- package/tests/providers/duckduckgo.test.ts +0 -207
- package/tests/providers/exa.test.ts +0 -175
- package/tests/providers/firecrawl.test.ts +0 -168
- package/tests/providers/jina.test.ts +0 -144
- package/tests/providers/router.test.ts +0 -328
- package/tests/providers/tavily.test.ts +0 -165
- package/tests/registry/discovery.test.ts +0 -154
- package/tests/registry/injectable-logger.test.ts +0 -230
- package/tests/registry/input-validation.test.ts +0 -361
- package/tests/registry/interface-completeness.test.ts +0 -85
- package/tests/registry/mcp-integration.test.ts +0 -103
- package/tests/registry/mcp-read-only-hint.test.ts +0 -60
- package/tests/registry/memoria-discovery.test.ts +0 -390
- package/tests/registry/nested-validation.test.ts +0 -283
- package/tests/registry/pseudo-tool-filtering.test.ts +0 -258
- package/tests/registry/registration-lifecycle.test.ts +0 -133
- package/tests/registry-validation.test.ts +0 -424
- package/tests/registry.test.ts +0 -460
- package/tests/security/dns-pinning.test.ts +0 -162
- package/tests/security/external-content.test.ts +0 -144
- package/tests/security/ssrf.test.ts +0 -118
- package/tests/shell-safety-integration.test.ts +0 -32
- package/tests/shell-safety.test.ts +0 -365
- package/tests/slack/desktop-session.test.ts +0 -50
- package/tests/test-lane-manifest.ts +0 -440
- package/tests/test-utils.ts +0 -27
- package/tests/tool-factory.test.ts +0 -188
- package/tests/utils/retry.test.ts +0 -231
- package/tests/utils/url.test.ts +0 -63
- package/tsconfig.cjs.json +0 -24
- package/tsconfig.json +0 -12
- package/vitest.config.ts +0 -55
- package/vitest.e2e.config.ts +0 -24
- package/vitest.integration.config.ts +0 -24
- package/vitest.native.config.ts +0 -24
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Integration tests for the quest system — round-trip through executors
|
|
3
|
-
*
|
|
4
|
-
* Tests create → list → update → filter flows through executeQuestUpdate and
|
|
5
|
-
* executeQuestList with a mock QuestStore that stores data in memory.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { describe, it, expect, beforeEach, vi } from "vitest";
|
|
9
|
-
import type {
|
|
10
|
-
ToolContext,
|
|
11
|
-
QuestStoreRef,
|
|
12
|
-
QuestStoreItem,
|
|
13
|
-
QuestStoreStatus,
|
|
14
|
-
} from "../../src/types.js";
|
|
15
|
-
import {
|
|
16
|
-
executeQuestUpdate,
|
|
17
|
-
executeQuestList,
|
|
18
|
-
type QuestUpdateOutput,
|
|
19
|
-
type QuestListOutput,
|
|
20
|
-
} from "../../src/executors/meta.js";
|
|
21
|
-
|
|
22
|
-
// ─── In-memory QuestStore mock ──────────────────────────────────
|
|
23
|
-
|
|
24
|
-
const createMockQuestStore = (): QuestStoreRef & { _quests: Map<string, QuestStoreItem> } => {
|
|
25
|
-
const quests = new Map<string, QuestStoreItem>();
|
|
26
|
-
return {
|
|
27
|
-
_quests: quests,
|
|
28
|
-
createQuest: vi.fn(
|
|
29
|
-
(input: {
|
|
30
|
-
id: string;
|
|
31
|
-
title: string;
|
|
32
|
-
description?: string;
|
|
33
|
-
priority?: number;
|
|
34
|
-
status?: QuestStoreStatus;
|
|
35
|
-
progress?: string;
|
|
36
|
-
blockedBy?: string;
|
|
37
|
-
}) => {
|
|
38
|
-
const now = Date.now();
|
|
39
|
-
const quest: QuestStoreItem = {
|
|
40
|
-
id: input.id,
|
|
41
|
-
title: input.title,
|
|
42
|
-
description: input.description,
|
|
43
|
-
priority: input.priority ?? 2,
|
|
44
|
-
status: input.status ?? "open",
|
|
45
|
-
progress: input.progress ?? "",
|
|
46
|
-
blockedBy: input.blockedBy,
|
|
47
|
-
attempts: 0,
|
|
48
|
-
createdAt: now,
|
|
49
|
-
updatedAt: now,
|
|
50
|
-
};
|
|
51
|
-
quests.set(input.id, quest);
|
|
52
|
-
return quest;
|
|
53
|
-
},
|
|
54
|
-
),
|
|
55
|
-
updateQuest: vi.fn(
|
|
56
|
-
(
|
|
57
|
-
id: string,
|
|
58
|
-
updates: Partial<{
|
|
59
|
-
title: string;
|
|
60
|
-
description: string;
|
|
61
|
-
priority: number;
|
|
62
|
-
status: QuestStoreStatus;
|
|
63
|
-
progress: string;
|
|
64
|
-
blockedBy: string;
|
|
65
|
-
}>,
|
|
66
|
-
) => {
|
|
67
|
-
const existing = quests.get(id);
|
|
68
|
-
if (!existing) throw new Error(`Quest not found: ${id}`);
|
|
69
|
-
// Match real QuestStore behavior: only apply non-undefined fields
|
|
70
|
-
const updated: QuestStoreItem = { ...existing, updatedAt: Date.now() };
|
|
71
|
-
for (const [key, value] of Object.entries(updates)) {
|
|
72
|
-
if (value !== undefined) (updated as Record<string, unknown>)[key] = value;
|
|
73
|
-
}
|
|
74
|
-
quests.set(id, updated);
|
|
75
|
-
return updated;
|
|
76
|
-
},
|
|
77
|
-
),
|
|
78
|
-
getQuest: vi.fn((id: string) => quests.get(id) ?? null),
|
|
79
|
-
listQuests: vi.fn((filter?: { status?: string }) => {
|
|
80
|
-
const all = Array.from(quests.values());
|
|
81
|
-
if (filter?.status) return all.filter((q) => q.status === filter.status);
|
|
82
|
-
return all;
|
|
83
|
-
}),
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
// ─── Helpers ─────────────────────────────────────────────────────
|
|
88
|
-
|
|
89
|
-
function createContext(questStore: QuestStoreRef): ToolContext {
|
|
90
|
-
return {
|
|
91
|
-
workingDir: "/tmp/test",
|
|
92
|
-
env: {},
|
|
93
|
-
confirm: async () => true,
|
|
94
|
-
questStore,
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// ─── Tests ───────────────────────────────────────────────────────
|
|
99
|
-
|
|
100
|
-
describe("Quest round-trip integration", () => {
|
|
101
|
-
let questStore: ReturnType<typeof createMockQuestStore>;
|
|
102
|
-
let ctx: ToolContext;
|
|
103
|
-
|
|
104
|
-
beforeEach(() => {
|
|
105
|
-
questStore = createMockQuestStore();
|
|
106
|
-
ctx = createContext(questStore);
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
it("create a quest → list it → verify it appears", async () => {
|
|
110
|
-
// Create
|
|
111
|
-
const createResult = await executeQuestUpdate(
|
|
112
|
-
{
|
|
113
|
-
quests: [{ title: "Fix authentication bug", status: "open" }],
|
|
114
|
-
},
|
|
115
|
-
ctx,
|
|
116
|
-
);
|
|
117
|
-
|
|
118
|
-
expect(createResult.success).toBe(true);
|
|
119
|
-
const createData = createResult.data as QuestUpdateOutput;
|
|
120
|
-
expect(createData.quests).toHaveLength(1);
|
|
121
|
-
expect(createData.quests[0]!.action).toBe("created");
|
|
122
|
-
const questId = createData.quests[0]!.id;
|
|
123
|
-
|
|
124
|
-
// List
|
|
125
|
-
const listResult = await executeQuestList({}, ctx);
|
|
126
|
-
|
|
127
|
-
expect(listResult.success).toBe(true);
|
|
128
|
-
const listData = listResult.data as QuestListOutput;
|
|
129
|
-
expect(listData.count).toBeGreaterThanOrEqual(1);
|
|
130
|
-
|
|
131
|
-
const found = listData.quests.find((q) => q.id === questId);
|
|
132
|
-
expect(found).toBeDefined();
|
|
133
|
-
expect(found!.status).toBe("open");
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
it("create quest → update status → list filtered → verify filter works", async () => {
|
|
137
|
-
// Create two quests
|
|
138
|
-
const createResult = await executeQuestUpdate(
|
|
139
|
-
{
|
|
140
|
-
quests: [
|
|
141
|
-
{ title: "Task A", status: "open" },
|
|
142
|
-
{ title: "Task B", status: "open" },
|
|
143
|
-
],
|
|
144
|
-
},
|
|
145
|
-
ctx,
|
|
146
|
-
);
|
|
147
|
-
|
|
148
|
-
expect(createResult.success).toBe(true);
|
|
149
|
-
const createData = createResult.data as QuestUpdateOutput;
|
|
150
|
-
const idA = createData.quests[0]!.id;
|
|
151
|
-
|
|
152
|
-
// Update Task A to active
|
|
153
|
-
const updateResult = await executeQuestUpdate(
|
|
154
|
-
{
|
|
155
|
-
quests: [{ id: idA, title: "Task A", status: "active" }],
|
|
156
|
-
},
|
|
157
|
-
ctx,
|
|
158
|
-
);
|
|
159
|
-
|
|
160
|
-
expect(updateResult.success).toBe(true);
|
|
161
|
-
const updateData = updateResult.data as QuestUpdateOutput;
|
|
162
|
-
expect(updateData.quests[0]!.action).toBe("updated");
|
|
163
|
-
|
|
164
|
-
// List only active quests
|
|
165
|
-
const listResult = await executeQuestList({ status: "active" }, ctx);
|
|
166
|
-
|
|
167
|
-
expect(listResult.success).toBe(true);
|
|
168
|
-
const listData = listResult.data as QuestListOutput;
|
|
169
|
-
// Should find Task A (active) but not Task B (open)
|
|
170
|
-
expect(listData.count).toBe(1);
|
|
171
|
-
expect(listData.quests[0]!.id).toBe(idA);
|
|
172
|
-
expect(listData.quests[0]!.status).toBe("active");
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
it("create quest → complete it → list with status filter", async () => {
|
|
176
|
-
// Create
|
|
177
|
-
const createResult = await executeQuestUpdate(
|
|
178
|
-
{
|
|
179
|
-
quests: [{ title: "Deploy to staging", status: "open" }],
|
|
180
|
-
},
|
|
181
|
-
ctx,
|
|
182
|
-
);
|
|
183
|
-
|
|
184
|
-
const createData = createResult.data as QuestUpdateOutput;
|
|
185
|
-
const questId = createData.quests[0]!.id;
|
|
186
|
-
|
|
187
|
-
// Complete it
|
|
188
|
-
const completeResult = await executeQuestUpdate(
|
|
189
|
-
{
|
|
190
|
-
quests: [{ id: questId, title: "Deploy to staging", status: "done" }],
|
|
191
|
-
},
|
|
192
|
-
ctx,
|
|
193
|
-
);
|
|
194
|
-
|
|
195
|
-
expect(completeResult.success).toBe(true);
|
|
196
|
-
|
|
197
|
-
// List done quests
|
|
198
|
-
const listDone = await executeQuestList({ status: "done" }, ctx);
|
|
199
|
-
expect(listDone.success).toBe(true);
|
|
200
|
-
const doneData = listDone.data as QuestListOutput;
|
|
201
|
-
expect(doneData.count).toBe(1);
|
|
202
|
-
expect(doneData.quests[0]!.id).toBe(questId);
|
|
203
|
-
expect(doneData.quests[0]!.status).toBe("done");
|
|
204
|
-
|
|
205
|
-
// List open quests — should NOT include the done quest
|
|
206
|
-
const listOpen = await executeQuestList({ status: "open" }, ctx);
|
|
207
|
-
expect(listOpen.success).toBe(true);
|
|
208
|
-
const openData = listOpen.data as QuestListOutput;
|
|
209
|
-
const stillOpen = openData.quests.find((q) => q.id === questId);
|
|
210
|
-
expect(stillOpen).toBeUndefined();
|
|
211
|
-
});
|
|
212
|
-
|
|
213
|
-
it("all quests are visible regardless of creation order", async () => {
|
|
214
|
-
await executeQuestUpdate(
|
|
215
|
-
{
|
|
216
|
-
quests: [{ title: "Quest 1", status: "open" }],
|
|
217
|
-
},
|
|
218
|
-
ctx,
|
|
219
|
-
);
|
|
220
|
-
|
|
221
|
-
await executeQuestUpdate(
|
|
222
|
-
{
|
|
223
|
-
quests: [{ title: "Quest 2", status: "active" }],
|
|
224
|
-
},
|
|
225
|
-
ctx,
|
|
226
|
-
);
|
|
227
|
-
|
|
228
|
-
// Both quests should be retrievable
|
|
229
|
-
const listResult = await executeQuestList({}, ctx);
|
|
230
|
-
expect(listResult.success).toBe(true);
|
|
231
|
-
const listData = listResult.data as QuestListOutput;
|
|
232
|
-
expect(listData.count).toBe(2);
|
|
233
|
-
|
|
234
|
-
const titles = listData.quests.map((q) => q.title);
|
|
235
|
-
expect(titles).toContain("Quest 1");
|
|
236
|
-
expect(titles).toContain("Quest 2");
|
|
237
|
-
});
|
|
238
|
-
|
|
239
|
-
it("partial update — status only, title preserved", async () => {
|
|
240
|
-
// Create a quest
|
|
241
|
-
const createResult = await executeQuestUpdate(
|
|
242
|
-
{
|
|
243
|
-
quests: [{ title: "Important task", status: "open", notes: "Initial notes" }],
|
|
244
|
-
},
|
|
245
|
-
ctx,
|
|
246
|
-
);
|
|
247
|
-
|
|
248
|
-
const createData = createResult.data as QuestUpdateOutput;
|
|
249
|
-
const questId = createData.quests[0]!.id;
|
|
250
|
-
|
|
251
|
-
// Update only status — no title or notes
|
|
252
|
-
const updateResult = await executeQuestUpdate(
|
|
253
|
-
{
|
|
254
|
-
quests: [{ id: questId, status: "active" }],
|
|
255
|
-
},
|
|
256
|
-
ctx,
|
|
257
|
-
);
|
|
258
|
-
|
|
259
|
-
expect(updateResult.success).toBe(true);
|
|
260
|
-
const updateData = updateResult.data as QuestUpdateOutput;
|
|
261
|
-
expect(updateData.quests[0]!.action).toBe("updated");
|
|
262
|
-
expect(updateData.quests[0]!.title).toBe("Important task"); // preserved
|
|
263
|
-
|
|
264
|
-
// List and verify all fields preserved
|
|
265
|
-
const listResult = await executeQuestList({}, ctx);
|
|
266
|
-
const listData = listResult.data as QuestListOutput;
|
|
267
|
-
const quest = listData.quests.find((q) => q.id === questId);
|
|
268
|
-
expect(quest).toBeDefined();
|
|
269
|
-
expect(quest!.title).toBe("Important task");
|
|
270
|
-
expect(quest!.status).toBe("active");
|
|
271
|
-
expect(quest!.notes).toBe("Initial notes"); // preserved
|
|
272
|
-
});
|
|
273
|
-
|
|
274
|
-
it("quest with notes and blockedBy round-trips correctly", async () => {
|
|
275
|
-
const createResult = await executeQuestUpdate(
|
|
276
|
-
{
|
|
277
|
-
quests: [
|
|
278
|
-
{
|
|
279
|
-
title: "Investigate flaky tests",
|
|
280
|
-
status: "blocked",
|
|
281
|
-
blocked_by: "quest_xyz",
|
|
282
|
-
notes: "Waiting on CI fix",
|
|
283
|
-
},
|
|
284
|
-
],
|
|
285
|
-
},
|
|
286
|
-
ctx,
|
|
287
|
-
);
|
|
288
|
-
|
|
289
|
-
expect(createResult.success).toBe(true);
|
|
290
|
-
const createData = createResult.data as QuestUpdateOutput;
|
|
291
|
-
const questId = createData.quests[0]!.id;
|
|
292
|
-
|
|
293
|
-
const listResult = await executeQuestList({}, ctx);
|
|
294
|
-
expect(listResult.success).toBe(true);
|
|
295
|
-
const listData = listResult.data as QuestListOutput;
|
|
296
|
-
|
|
297
|
-
const quest = listData.quests.find((q) => q.id === questId);
|
|
298
|
-
expect(quest).toBeDefined();
|
|
299
|
-
expect(quest!.status).toBe("blocked");
|
|
300
|
-
expect(quest!.blocked_by).toBe("quest_xyz");
|
|
301
|
-
expect(quest!.notes).toBe("Waiting on CI fix");
|
|
302
|
-
});
|
|
303
|
-
});
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, beforeEach, afterEach } from "vitest";
|
|
2
|
-
import { createToolRegistry } from "../../src/index.js";
|
|
3
|
-
import type { ToolRegistry, ToolContext } from "../../src/types.js";
|
|
4
|
-
import * as fs from "node:fs/promises";
|
|
5
|
-
import * as path from "node:path";
|
|
6
|
-
import * as os from "node:os";
|
|
7
|
-
|
|
8
|
-
describe("Tool Registry→Executor Integration", () => {
|
|
9
|
-
let registry: ToolRegistry;
|
|
10
|
-
let tempDir: string;
|
|
11
|
-
let mockContext: ToolContext;
|
|
12
|
-
|
|
13
|
-
beforeEach(async () => {
|
|
14
|
-
tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "registry-test-"));
|
|
15
|
-
mockContext = {
|
|
16
|
-
workingDir: tempDir,
|
|
17
|
-
env: {},
|
|
18
|
-
confirm: async () => true,
|
|
19
|
-
};
|
|
20
|
-
registry = createToolRegistry();
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
afterEach(async () => {
|
|
24
|
-
await fs.rm(tempDir, { recursive: true, force: true }).catch(() => {});
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it("should execute read_file tool through registry", async () => {
|
|
28
|
-
const testFile = path.join(tempDir, "test.txt");
|
|
29
|
-
await fs.writeFile(testFile, "Hello from registry test");
|
|
30
|
-
|
|
31
|
-
const tool = registry.get("read_file");
|
|
32
|
-
expect(tool).toBeDefined();
|
|
33
|
-
expect(tool!.name).toBe("read_file");
|
|
34
|
-
|
|
35
|
-
const result = await tool!.execute({ path: "test.txt" }, mockContext);
|
|
36
|
-
|
|
37
|
-
expect(result.success).toBe(true);
|
|
38
|
-
expect(result.data).toBe("Hello from registry test");
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
it("should execute write_file tool through registry", async () => {
|
|
42
|
-
const tool = registry.get("write_file");
|
|
43
|
-
expect(tool).toBeDefined();
|
|
44
|
-
|
|
45
|
-
const result = await tool!.execute(
|
|
46
|
-
{ path: "output.txt", content: "Written via registry" },
|
|
47
|
-
mockContext,
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
expect(result.success).toBe(true);
|
|
51
|
-
|
|
52
|
-
const writtenContent = await fs.readFile(
|
|
53
|
-
path.join(tempDir, "output.txt"),
|
|
54
|
-
"utf-8",
|
|
55
|
-
);
|
|
56
|
-
expect(writtenContent).toBe("Written via registry");
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
it("should execute bash tool through registry", async () => {
|
|
60
|
-
const tool = registry.get("bash");
|
|
61
|
-
expect(tool).toBeDefined();
|
|
62
|
-
|
|
63
|
-
const result = await tool!.execute(
|
|
64
|
-
{ command: "echo 'Registry test'" },
|
|
65
|
-
mockContext,
|
|
66
|
-
);
|
|
67
|
-
|
|
68
|
-
expect(result.success).toBe(true);
|
|
69
|
-
const data = result.data as { stdout: string };
|
|
70
|
-
expect(data.stdout).toMatch(/Registry test/);
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
it("should return undefined for non-existent tool", () => {
|
|
74
|
-
const tool = registry.get("nonexistent_tool");
|
|
75
|
-
expect(tool).toBeUndefined();
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
it("should list all registered tools", () => {
|
|
79
|
-
const tools = registry.list();
|
|
80
|
-
expect(tools.length).toBeGreaterThan(0);
|
|
81
|
-
expect(tools.map((t) => t.name)).toContain("read_file");
|
|
82
|
-
expect(tools.map((t) => t.name)).toContain("write_file");
|
|
83
|
-
expect(tools.map((t) => t.name)).toContain("bash");
|
|
84
|
-
});
|
|
85
|
-
});
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
// packages/tools/tests/integration.test.ts
|
|
2
|
-
import { describe, it, expect, beforeEach, afterEach } from "vitest";
|
|
3
|
-
import { mkdir, rm, writeFile } from "fs/promises";
|
|
4
|
-
import { join } from "path";
|
|
5
|
-
import { tmpdir } from "os";
|
|
6
|
-
import {
|
|
7
|
-
ToolRegistry,
|
|
8
|
-
createToolRegistry,
|
|
9
|
-
getCoreTools,
|
|
10
|
-
getCoreTool,
|
|
11
|
-
executeReadFile,
|
|
12
|
-
executeBash,
|
|
13
|
-
PTYSession,
|
|
14
|
-
createPTYSession,
|
|
15
|
-
SpawnedProcessRegistry,
|
|
16
|
-
} from "../src/index.js";
|
|
17
|
-
import type { ToolContext } from "../src/index.js";
|
|
18
|
-
|
|
19
|
-
// Check if PTY is available in this environment
|
|
20
|
-
let ptyAvailable = true;
|
|
21
|
-
try {
|
|
22
|
-
const nodePty = await import("node-pty");
|
|
23
|
-
const testPty = nodePty.spawn("/bin/echo", ["test"]);
|
|
24
|
-
testPty.kill();
|
|
25
|
-
} catch {
|
|
26
|
-
ptyAvailable = false;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
describe("@aria-cli/tools Integration", () => {
|
|
30
|
-
let testDir: string;
|
|
31
|
-
let ctx: ToolContext;
|
|
32
|
-
|
|
33
|
-
beforeEach(async () => {
|
|
34
|
-
testDir = join(tmpdir(), `aria-tools-int-${Date.now()}`);
|
|
35
|
-
await mkdir(testDir, { recursive: true });
|
|
36
|
-
ctx = { workingDir: testDir, env: {}, confirm: async () => true };
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
afterEach(async () => {
|
|
40
|
-
await rm(testDir, { recursive: true, force: true });
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
describe("Complete workflow", () => {
|
|
44
|
-
it("should register core tools and execute them", async () => {
|
|
45
|
-
const registry = new ToolRegistry();
|
|
46
|
-
|
|
47
|
-
// Register all core tools
|
|
48
|
-
for (const tool of getCoreTools()) {
|
|
49
|
-
registry.register(tool);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
expect(registry.size).toBe(getCoreTools().length);
|
|
53
|
-
|
|
54
|
-
// Use read_file tool
|
|
55
|
-
const filePath = join(testDir, "test.txt");
|
|
56
|
-
await writeFile(filePath, "Hello from integration test");
|
|
57
|
-
|
|
58
|
-
const readTool = registry.get("read_file");
|
|
59
|
-
expect(readTool).toBeDefined();
|
|
60
|
-
|
|
61
|
-
const result = await readTool!.execute({ path: filePath }, ctx);
|
|
62
|
-
expect(result.success).toBe(true);
|
|
63
|
-
expect(result.data).toBe("Hello from integration test");
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
it("should search for tools", async () => {
|
|
67
|
-
const registry = new ToolRegistry();
|
|
68
|
-
|
|
69
|
-
for (const tool of getCoreTools()) {
|
|
70
|
-
registry.register(tool);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const fileTools = registry.search("file");
|
|
74
|
-
expect(fileTools.length).toBeGreaterThan(0);
|
|
75
|
-
|
|
76
|
-
const shellTools = registry.list("shell");
|
|
77
|
-
expect(shellTools).toHaveLength(
|
|
78
|
-
getCoreTools().filter((tool) => tool.category === "shell").length,
|
|
79
|
-
);
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
it("should directly use executors", async () => {
|
|
83
|
-
const filePath = join(testDir, "direct.txt");
|
|
84
|
-
await writeFile(filePath, "Direct access");
|
|
85
|
-
|
|
86
|
-
const result = await executeReadFile({ path: filePath }, ctx);
|
|
87
|
-
expect(result.success).toBe(true);
|
|
88
|
-
expect(result.data).toBe("Direct access");
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
it("should wire shell process observability tools through definitions", async () => {
|
|
92
|
-
const processRegistry = new SpawnedProcessRegistry();
|
|
93
|
-
const ctxWithRegistry: ToolContext = {
|
|
94
|
-
...ctx,
|
|
95
|
-
processRegistry,
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
const spawnTool = getCoreTool("spawn");
|
|
99
|
-
const listTool = getCoreTool("list_processes");
|
|
100
|
-
const waitTool = getCoreTool("wait_process");
|
|
101
|
-
|
|
102
|
-
expect(spawnTool).toBeDefined();
|
|
103
|
-
expect(listTool).toBeDefined();
|
|
104
|
-
expect(waitTool).toBeDefined();
|
|
105
|
-
|
|
106
|
-
const spawned = await spawnTool!.execute({ program: "sleep", args: ["1"] }, ctxWithRegistry);
|
|
107
|
-
expect(spawned.success).toBe(true);
|
|
108
|
-
const { pid } = spawned.data as { pid: number };
|
|
109
|
-
|
|
110
|
-
const listed = await listTool!.execute({}, ctxWithRegistry);
|
|
111
|
-
expect(listed.success).toBe(true);
|
|
112
|
-
expect(listed.data).toMatchObject({
|
|
113
|
-
processes: expect.arrayContaining([expect.objectContaining({ pid, status: "running" })]),
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
const waited = await waitTool!.execute({ pid, timeoutMs: 3_000 }, ctxWithRegistry);
|
|
117
|
-
expect(waited.success).toBe(true);
|
|
118
|
-
expect(waited.data).toMatchObject({
|
|
119
|
-
pid,
|
|
120
|
-
exited: true,
|
|
121
|
-
timedOut: false,
|
|
122
|
-
});
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
it.skipIf(!ptyAvailable)("should run interactive PTY sessions", async () => {
|
|
126
|
-
const session = await createPTYSession({
|
|
127
|
-
command: "echo",
|
|
128
|
-
args: ["PTY works"],
|
|
129
|
-
cwd: testDir,
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
const output = await session.waitForExit();
|
|
133
|
-
expect(output).toContain("PTY works");
|
|
134
|
-
|
|
135
|
-
session.close();
|
|
136
|
-
});
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
describe("Exports", () => {
|
|
140
|
-
it("should export all necessary types", async () => {
|
|
141
|
-
// These imports should all work
|
|
142
|
-
const {
|
|
143
|
-
ToolRegistry,
|
|
144
|
-
getCoreTools,
|
|
145
|
-
getCoreTool,
|
|
146
|
-
getCoreToolsByCategory,
|
|
147
|
-
getCoreToolsByRiskLevel,
|
|
148
|
-
CORE_TOOL_DEFINITIONS,
|
|
149
|
-
executeReadFile,
|
|
150
|
-
executeWriteFile,
|
|
151
|
-
executeBash,
|
|
152
|
-
executeExec,
|
|
153
|
-
PTYSession,
|
|
154
|
-
createPTYSession,
|
|
155
|
-
runInPTY,
|
|
156
|
-
} = await import("../src/index.js");
|
|
157
|
-
|
|
158
|
-
expect(ToolRegistry).toBeDefined();
|
|
159
|
-
expect(getCoreTools).toBeDefined();
|
|
160
|
-
expect(executeReadFile).toBeDefined();
|
|
161
|
-
expect(PTYSession).toBeDefined();
|
|
162
|
-
});
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
describe("createToolRegistry", () => {
|
|
166
|
-
it("should create registry with builtins by default", () => {
|
|
167
|
-
const registry = createToolRegistry();
|
|
168
|
-
expect(registry.size).toBeGreaterThan(0);
|
|
169
|
-
expect(registry.has("read_file")).toBe(true);
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
it("should create empty registry when includeBuiltins is false", () => {
|
|
173
|
-
const registry = createToolRegistry({ includeBuiltins: false });
|
|
174
|
-
expect(registry.size).toBe(0);
|
|
175
|
-
});
|
|
176
|
-
});
|
|
177
|
-
});
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for loadingTier field on Tool type.
|
|
3
|
-
*
|
|
4
|
-
* loadingTier determines which tools are sent to the LLM on every request
|
|
5
|
-
* ("always") vs. which are only available via search ("deferred").
|
|
6
|
-
*
|
|
7
|
-
* After the aria-c3x refactoring, ALL built-in tools are "always" (no deferred built-ins).
|
|
8
|
-
* MCP tools may still be deferred, but that is handled by the MCP layer.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { describe, it, expect } from "vitest";
|
|
12
|
-
import { z } from "zod";
|
|
13
|
-
import { CORE_TOOL_DEFINITIONS } from "../src/definitions/core.js";
|
|
14
|
-
import { tool } from "../src/tool-factory.js";
|
|
15
|
-
|
|
16
|
-
describe("loadingTier", () => {
|
|
17
|
-
describe("Tool interface: all core tools have loadingTier defined", () => {
|
|
18
|
-
it("every core tool has loadingTier as either 'always' or 'deferred'", () => {
|
|
19
|
-
expect(CORE_TOOL_DEFINITIONS.length).toBeGreaterThan(0);
|
|
20
|
-
|
|
21
|
-
for (const t of CORE_TOOL_DEFINITIONS) {
|
|
22
|
-
expect(
|
|
23
|
-
(t as Record<string, unknown>).loadingTier,
|
|
24
|
-
`Tool "${t.name}" should have loadingTier defined`,
|
|
25
|
-
).toBeDefined();
|
|
26
|
-
|
|
27
|
-
expect(
|
|
28
|
-
["always", "deferred"],
|
|
29
|
-
`Tool "${t.name}" should have loadingTier of "always" or "deferred"`,
|
|
30
|
-
).toContain((t as Record<string, unknown>).loadingTier);
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
describe("All built-in tools are always-on or explicitly deferred", () => {
|
|
36
|
-
const ALLOWED_DEFERRED = new Set(["session_history", "frg"]);
|
|
37
|
-
it("every core tool has loadingTier === 'always' except explicitly deferred tools", () => {
|
|
38
|
-
for (const t of CORE_TOOL_DEFINITIONS) {
|
|
39
|
-
if (ALLOWED_DEFERRED.has(t.name)) {
|
|
40
|
-
expect(
|
|
41
|
-
(t as Record<string, unknown>).loadingTier,
|
|
42
|
-
`Tool "${t.name}" should have loadingTier === "deferred"`,
|
|
43
|
-
).toBe("deferred");
|
|
44
|
-
} else {
|
|
45
|
-
expect(
|
|
46
|
-
(t as Record<string, unknown>).loadingTier,
|
|
47
|
-
`Tool "${t.name}" should have loadingTier === "always"`,
|
|
48
|
-
).toBe("always");
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
describe("requiresConfirmation tools", () => {
|
|
55
|
-
it("forget and kill have requiresConfirmation: true", () => {
|
|
56
|
-
const forgetTool = CORE_TOOL_DEFINITIONS.find((t) => t.name === "forget");
|
|
57
|
-
const killTool = CORE_TOOL_DEFINITIONS.find((t) => t.name === "kill");
|
|
58
|
-
|
|
59
|
-
expect(forgetTool).toBeDefined();
|
|
60
|
-
expect(killTool).toBeDefined();
|
|
61
|
-
expect(forgetTool!.requiresConfirmation).toBe(true);
|
|
62
|
-
expect(killTool!.requiresConfirmation).toBe(true);
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
it("apply_patch has requiresConfirmation: true", () => {
|
|
66
|
-
const applyPatch = CORE_TOOL_DEFINITIONS.find((t) => t.name === "apply_patch");
|
|
67
|
-
expect(applyPatch).toBeDefined();
|
|
68
|
-
expect(applyPatch!.requiresConfirmation).toBe(true);
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
it("bash has requiresConfirmation: true", () => {
|
|
72
|
-
const bash = CORE_TOOL_DEFINITIONS.find((t) => t.name === "bash");
|
|
73
|
-
expect(bash).toBeDefined();
|
|
74
|
-
expect(bash!.requiresConfirmation).toBe(true);
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
describe("Tool factory", () => {
|
|
79
|
-
it("sets loadingTier when specified", () => {
|
|
80
|
-
const t = tool({
|
|
81
|
-
name: "test_deferred_tool",
|
|
82
|
-
description: "A test tool with deferred loading",
|
|
83
|
-
parameters: z.object({ input: z.string() }),
|
|
84
|
-
execute: async () => ({ success: true, message: "ok" }),
|
|
85
|
-
loadingTier: "deferred",
|
|
86
|
-
} as Parameters<typeof tool>[0] & { loadingTier: "deferred" });
|
|
87
|
-
|
|
88
|
-
expect(
|
|
89
|
-
(t as Record<string, unknown>).loadingTier,
|
|
90
|
-
"Tool created with loadingTier: 'deferred' should have that value on the result",
|
|
91
|
-
).toBe("deferred");
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
it("defaults loadingTier to 'always' when not specified", () => {
|
|
95
|
-
const t = tool({
|
|
96
|
-
name: "test_default_tool",
|
|
97
|
-
description: "A test tool without explicit loadingTier",
|
|
98
|
-
parameters: z.object({ input: z.string() }),
|
|
99
|
-
execute: async () => ({ success: true, message: "ok" }),
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
expect(
|
|
103
|
-
(t as Record<string, unknown>).loadingTier,
|
|
104
|
-
"Tool created without loadingTier should default to 'always'",
|
|
105
|
-
).toBe("always");
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
describe("Total core tools split", () => {
|
|
110
|
-
it("72 always + 2 deferred = 74 total core tools", () => {
|
|
111
|
-
// 64 original + 4 frg + 8 code-intel (rg,ug,probe,sg,cbm,lsp,serena,fff) - 3 removed + 1 code_search = 74
|
|
112
|
-
expect(CORE_TOOL_DEFINITIONS.length).toBe(74);
|
|
113
|
-
|
|
114
|
-
const alwaysTools = CORE_TOOL_DEFINITIONS.filter(
|
|
115
|
-
(t) => (t as Record<string, unknown>).loadingTier === "always",
|
|
116
|
-
);
|
|
117
|
-
const deferredTools = CORE_TOOL_DEFINITIONS.filter(
|
|
118
|
-
(t) => (t as Record<string, unknown>).loadingTier === "deferred",
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
expect(alwaysTools.length).toBe(72);
|
|
122
|
-
expect(deferredTools.length).toBe(2);
|
|
123
|
-
expect(alwaysTools.length + deferredTools.length).toBe(74);
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
});
|