qlogicagent 2.16.4 → 2.16.5
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/README.md +2 -11
- package/dist/agent.js +20 -21
- package/dist/cli.js +502 -367
- package/dist/index.js +502 -367
- package/dist/orchestration.js +12 -13
- package/dist/protocol.js +1 -1
- package/dist/types/agent/tool-loop/completion-action-policy.d.ts +2 -1
- package/dist/types/agent/tool-loop.d.ts +4 -0
- package/dist/types/agent/types.d.ts +2 -2
- package/dist/types/cli/acp-extended-handlers.d.ts +25 -0
- package/dist/types/cli/agent-runtime-bootstrap.d.ts +0 -2
- package/dist/types/cli/community-resource-installer.d.ts +5 -3
- package/dist/types/cli/core-tools/fork-system-prompt.d.ts +0 -2
- package/dist/types/cli/core-tools/registry.d.ts +1 -2
- package/dist/types/cli/core-tools/session-tool-manifest.d.ts +0 -2
- package/dist/types/cli/handlers/community-handler.d.ts +4 -0
- package/dist/types/cli/handlers/goal-handler.d.ts +54 -0
- package/dist/types/cli/handlers/turn-handler.d.ts +0 -1
- package/dist/types/cli/skill-invocation-service.d.ts +6 -0
- package/dist/types/cli/{skill-meta-tool-bootstrap.d.ts → skill-tools-bootstrap.d.ts} +6 -12
- package/dist/types/cli/stdio-agent-session-bootstrap.d.ts +0 -1
- package/dist/types/cli/tool-bootstrap-core-registration.d.ts +1 -9
- package/dist/types/cli/tool-bootstrap.d.ts +0 -2
- package/dist/types/contracts/turn-event.d.ts +1 -1
- package/dist/types/orchestration/agent-instance.d.ts +19 -2
- package/dist/types/orchestration/delegation-coordinator.d.ts +43 -0
- package/dist/types/orchestration/goal-acceptance.d.ts +20 -0
- package/dist/types/orchestration/goal-loop-coordinator.d.ts +87 -0
- package/dist/types/orchestration/goal-mode-adapters.d.ts +94 -0
- package/dist/types/orchestration/goal-run-persistence.d.ts +15 -0
- package/dist/types/orchestration/goal-run-types.d.ts +112 -0
- package/dist/types/orchestration/index.d.ts +1 -1
- package/dist/types/orchestration/skill-improvement.d.ts +1 -21
- package/dist/types/orchestration/subagent/agent-registry.d.ts +1 -1
- package/dist/types/orchestration/workflow/host-executors.d.ts +1 -1
- package/dist/types/orchestration/workflow/node-schema.d.ts +3 -3
- package/dist/types/orchestration/workflow/qla-executor-host.d.ts +2 -2
- package/dist/types/orchestration/workflow/workflow-scheduler.d.ts +1 -1
- package/dist/types/protocol/methods.d.ts +0 -3
- package/dist/types/protocol/wire/acp-agent-management.d.ts +33 -1
- package/dist/types/protocol/wire/acp-protocol.d.ts +14 -2
- package/dist/types/protocol/wire/agent-events.d.ts +2 -2
- package/dist/types/protocol/wire/agent-methods.d.ts +0 -2
- package/dist/types/protocol/wire/notification-payloads.d.ts +36 -20
- package/dist/types/runtime/community/community-pet-publisher.d.ts +21 -24
- package/dist/types/runtime/community/community-signal-reporter.d.ts +0 -14
- package/dist/types/runtime/config/tunable-defaults.d.ts +0 -21
- package/dist/types/runtime/hooks/community-discovery-hook.d.ts +18 -0
- package/dist/types/runtime/infra/acp-protocol-adapter.d.ts +2 -2
- package/dist/types/runtime/infra/agent-install-runner.d.ts +1 -1
- package/dist/types/runtime/infra/skill-resolver.d.ts +1 -1
- package/dist/types/runtime/pet/pet-community-assets.d.ts +16 -11
- package/dist/types/runtime/pet/pet-profile-service.d.ts +2 -2
- package/dist/types/runtime/pet/petdex-asset.d.ts +28 -0
- package/dist/types/runtime/ports/tool-contracts.d.ts +1 -10
- package/dist/types/runtime/prompt/environment-context.d.ts +8 -32
- package/dist/types/runtime/tasks/task-types.d.ts +2 -32
- package/dist/types/skills/permissions/hook-runner.d.ts +0 -22
- package/dist/types/skills/plugins/plugin-api.d.ts +1 -1
- package/dist/types/skills/portable-tool.d.ts +2 -8
- package/dist/types/skills/tools/skill-tool.d.ts +57 -22
- package/dist/types/skills/tools.d.ts +5 -39
- package/dist/types/transport/acp-server.d.ts +13 -1
- package/package.json +1 -2
- package/dist/types/cli/core-tools/team-registry.d.ts +0 -62
- package/dist/types/cli/core-tools/team-tool-bootstrap.d.ts +0 -11
- package/dist/types/cli/core-tools/team-tool-service.d.ts +0 -43
- package/dist/types/cli/skill-meta-subturn-service.d.ts +0 -26
- package/dist/types/runtime/hooks/skill-recall-hooks.d.ts +0 -37
- package/dist/types/runtime/sandbox/skill-sandbox.d.ts +0 -53
- package/dist/types/runtime/sandbox/windows-skill-sandbox.d.ts +0 -78
- package/dist/types/skills/permissions/community-sandbox-policy.d.ts +0 -3
- package/dist/types/skills/permissions/community-sandbox-red-team-cli.d.ts +0 -7
- package/dist/types/skills/permissions/community-sandbox-red-team.d.ts +0 -32
- package/dist/types/skills/tools/team-tool.d.ts +0 -152
- package/dist/types/skills/tools/tool-search-tool.d.ts +0 -75
- package/dist/types/skills/tools/tool-selection-eval.d.ts +0 -49
- package/dist/types/skills/tools/tool-selection-eval.dataset.d.ts +0 -5
- package/dist/types/skills/tools/tool-selection-eval.tasks.d.ts +0 -9
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { buildWindowsProcessTreeLauncherAuditEnvelope, type WindowsSkillSandboxAvailability } from "./windows-skill-sandbox.js";
|
|
2
|
-
export type SkillSandboxOrigin = "community" | "first-party" | "official";
|
|
3
|
-
export type SkillSandboxRiskTier = "R0" | "R1" | "R2" | "R3" | "unknown";
|
|
4
|
-
export type SkillSandboxDecisionReason = "first-party-action" | "community-low-risk" | "manual-run" | "l0-available" | "l0-unavailable" | "launcher-required" | "launcher-unavailable";
|
|
5
|
-
export interface SkillSandboxAvailability extends WindowsSkillSandboxAvailability {
|
|
6
|
-
}
|
|
7
|
-
export interface SkillSandboxRunRequest {
|
|
8
|
-
origin: SkillSandboxOrigin;
|
|
9
|
-
official?: boolean;
|
|
10
|
-
riskTier?: SkillSandboxRiskTier;
|
|
11
|
-
autoRun?: boolean;
|
|
12
|
-
executable?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export interface SkillSandboxLauncherDecisionMetadata {
|
|
15
|
-
level: "L0";
|
|
16
|
-
mode: "os-native-launcher";
|
|
17
|
-
defaultHostAccess: true;
|
|
18
|
-
noFsNetworkRestriction: true;
|
|
19
|
-
audit: {
|
|
20
|
-
envelope: "l0-launcher-audit-v1";
|
|
21
|
-
subject: {
|
|
22
|
-
origin: SkillSandboxOrigin;
|
|
23
|
-
official: boolean;
|
|
24
|
-
executable: boolean;
|
|
25
|
-
autoRun: boolean;
|
|
26
|
-
};
|
|
27
|
-
decision: "allowed" | "blocked";
|
|
28
|
-
reason: "launcher-required" | "launcher-unavailable";
|
|
29
|
-
};
|
|
30
|
-
windows?: ReturnType<typeof buildWindowsProcessTreeLauncherAuditEnvelope>;
|
|
31
|
-
}
|
|
32
|
-
export interface SkillSandboxDecision {
|
|
33
|
-
allowed: boolean;
|
|
34
|
-
spawnAllowed: boolean;
|
|
35
|
-
launcherRequired: boolean;
|
|
36
|
-
reason: SkillSandboxDecisionReason;
|
|
37
|
-
backend: "first-party" | "community-l1-l2" | "community-l0" | "community-l0-launcher";
|
|
38
|
-
l0: SkillSandboxAvailability;
|
|
39
|
-
launcher?: SkillSandboxLauncherDecisionMetadata;
|
|
40
|
-
}
|
|
41
|
-
export interface SkillSandbox {
|
|
42
|
-
getAvailability(): SkillSandboxAvailability;
|
|
43
|
-
decide(request: SkillSandboxRunRequest): SkillSandboxDecision;
|
|
44
|
-
}
|
|
45
|
-
export interface SkillSandboxOptions {
|
|
46
|
-
availability?: SkillSandboxAvailability;
|
|
47
|
-
platform?: string;
|
|
48
|
-
appContainerAvailable?: boolean;
|
|
49
|
-
jobObjectAvailable?: boolean;
|
|
50
|
-
processTreeLauncherAvailable?: boolean;
|
|
51
|
-
}
|
|
52
|
-
export declare function createSkillSandbox(options?: SkillSandboxOptions): SkillSandbox;
|
|
53
|
-
export declare function createDefaultSkillSandbox(): SkillSandbox;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
export type WindowsSkillSandboxBackend = "windows-process-tree-launcher";
|
|
2
|
-
export type WindowsProcessTreeLauncherAuditEvent = "launch-requested" | "process-started" | "process-exited" | "tree-kill-requested" | "launch-failed";
|
|
3
|
-
export interface WindowsSkillSandboxAvailabilityOptions {
|
|
4
|
-
platform?: string;
|
|
5
|
-
appContainerAvailable?: boolean;
|
|
6
|
-
jobObjectAvailable?: boolean;
|
|
7
|
-
processTreeLauncherAvailable?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export interface WindowsSkillSandboxAvailability {
|
|
10
|
-
level: "L0";
|
|
11
|
-
available: boolean;
|
|
12
|
-
backend: WindowsSkillSandboxBackend | "unsupported-platform" | "unavailable";
|
|
13
|
-
platform: string;
|
|
14
|
-
reason?: "unsupported-platform" | "windows-l0-not-provisioned";
|
|
15
|
-
}
|
|
16
|
-
export interface WindowsSandboxLaunchMetadata {
|
|
17
|
-
backend: WindowsSkillSandboxBackend;
|
|
18
|
-
command: string;
|
|
19
|
-
args: string[];
|
|
20
|
-
elevated: false;
|
|
21
|
-
defaultHostAccess: true;
|
|
22
|
-
noFsNetworkRestriction: true;
|
|
23
|
-
jobObject: {
|
|
24
|
-
implemented: false;
|
|
25
|
-
ready: true;
|
|
26
|
-
};
|
|
27
|
-
processTree: {
|
|
28
|
-
killOnClose: true;
|
|
29
|
-
trackChildren: true;
|
|
30
|
-
terminateOnLauncherClose: true;
|
|
31
|
-
};
|
|
32
|
-
audit: {
|
|
33
|
-
envelope: "l0-launcher-audit-v1";
|
|
34
|
-
lifecycle: WindowsProcessTreeLauncherAuditEvent[];
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export interface WindowsProcessTreeLauncherAuditEnvelope {
|
|
38
|
-
envelope: "l0-launcher-audit-v1";
|
|
39
|
-
backend: WindowsSkillSandboxBackend;
|
|
40
|
-
defaultHostAccess: true;
|
|
41
|
-
noFsNetworkRestriction: true;
|
|
42
|
-
processTree: {
|
|
43
|
-
killOnClose: true;
|
|
44
|
-
trackChildren: true;
|
|
45
|
-
};
|
|
46
|
-
jobObject: {
|
|
47
|
-
implemented: false;
|
|
48
|
-
ready: true;
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
export interface WindowsProcessTreeChild {
|
|
52
|
-
pid?: number;
|
|
53
|
-
}
|
|
54
|
-
export interface WindowsProcessTreeLauncherDependencies {
|
|
55
|
-
spawn?: (command: string, args: string[]) => WindowsProcessTreeChild;
|
|
56
|
-
killProcessTree?: (pid: number) => Promise<void> | void;
|
|
57
|
-
}
|
|
58
|
-
export interface WindowsProcessTreeLaunchRequest {
|
|
59
|
-
command: string;
|
|
60
|
-
args?: string[];
|
|
61
|
-
}
|
|
62
|
-
export interface WindowsProcessTreeLaunchHandle {
|
|
63
|
-
pid: number;
|
|
64
|
-
metadata: WindowsSandboxLaunchMetadata;
|
|
65
|
-
auditEvents: WindowsProcessTreeLauncherAuditEvent[];
|
|
66
|
-
close(): Promise<void>;
|
|
67
|
-
}
|
|
68
|
-
export interface WindowsProcessTreeLauncher {
|
|
69
|
-
auditEvents: WindowsProcessTreeLauncherAuditEvent[];
|
|
70
|
-
launch(request: WindowsProcessTreeLaunchRequest): WindowsProcessTreeLaunchHandle;
|
|
71
|
-
}
|
|
72
|
-
export declare function getWindowsSkillSandboxAvailability(options?: WindowsSkillSandboxAvailabilityOptions): WindowsSkillSandboxAvailability;
|
|
73
|
-
export declare function buildWindowsSandboxLaunchMetadata(input: {
|
|
74
|
-
command: string;
|
|
75
|
-
args?: string[];
|
|
76
|
-
}): WindowsSandboxLaunchMetadata;
|
|
77
|
-
export declare function buildWindowsProcessTreeLauncherAuditEnvelope(): WindowsProcessTreeLauncherAuditEnvelope;
|
|
78
|
-
export declare function createWindowsProcessTreeLauncher(dependencies?: WindowsProcessTreeLauncherDependencies): WindowsProcessTreeLauncher;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { PermissionRuleEntry } from "./types.js";
|
|
2
|
-
export type CommunitySandboxRuleId = "community-l1-shell" | "community-l1-file-read" | "community-l1-file-write" | "community-l1-network" | "community-l1-mcp" | "community-l1-host-control" | "community-l2-host-side-effect" | "community-l2-data-egress" | "community-l2-provider-prompt-egress" | "community-l2-provider-media-egress";
|
|
3
|
-
export declare function createCommunitySandboxScopedRules(): PermissionRuleEntry[];
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { type SkillSandboxAvailability } from "../../runtime/sandbox/skill-sandbox.js";
|
|
2
|
-
export type CommunitySandboxRedTeamFinding = "community-sandbox:shell-exec" | "community-sandbox:file-read" | "community-sandbox:file-write" | "community-sandbox:network-egress" | "community-sandbox:mcp-call" | "community-sandbox:host-side-effect" | "community-sandbox:data-egress" | "community-sandbox:provider-prompt-egress" | "community-sandbox:provider-media-egress";
|
|
3
|
-
export interface CommunitySandboxRedTeamCase {
|
|
4
|
-
id: string;
|
|
5
|
-
expectedFinding: CommunitySandboxRedTeamFinding;
|
|
6
|
-
toolName: string;
|
|
7
|
-
arguments?: Record<string, unknown>;
|
|
8
|
-
}
|
|
9
|
-
export interface CommunitySandboxRedTeamReport {
|
|
10
|
-
suite: "sandbox";
|
|
11
|
-
generatedAt: string;
|
|
12
|
-
cases: number;
|
|
13
|
-
passed: boolean;
|
|
14
|
-
failures: number;
|
|
15
|
-
telemetryEvents: number;
|
|
16
|
-
approvalRequests: number;
|
|
17
|
-
l0: SkillSandboxAvailability;
|
|
18
|
-
breakdown: Record<CommunitySandboxRedTeamFinding, {
|
|
19
|
-
cases: number;
|
|
20
|
-
failures: number;
|
|
21
|
-
}>;
|
|
22
|
-
failureDetails: Array<{
|
|
23
|
-
id: string;
|
|
24
|
-
expectedFinding: CommunitySandboxRedTeamFinding;
|
|
25
|
-
action: "continue" | "abort" | "skip" | "prevent";
|
|
26
|
-
reason?: string;
|
|
27
|
-
telemetryRecorded: boolean;
|
|
28
|
-
approvalRecorded: boolean;
|
|
29
|
-
}>;
|
|
30
|
-
}
|
|
31
|
-
export declare function buildCommunitySandboxRedTeamCases(): CommunitySandboxRedTeamCase[];
|
|
32
|
-
export declare function runCommunitySandboxRedTeam(cases?: CommunitySandboxRedTeamCase[]): Promise<CommunitySandboxRedTeamReport>;
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import type { PortableTool } from "../portable-tool.js";
|
|
2
|
-
export declare const TEAM_TOOL_NAME: "team";
|
|
3
|
-
export type TeamAction = "create" | "delete" | "list" | "status" | "send";
|
|
4
|
-
export interface TeamMember {
|
|
5
|
-
name: string;
|
|
6
|
-
role: string;
|
|
7
|
-
tools?: string[];
|
|
8
|
-
/** Working directory for this member (worktree path or inherited cwd). */
|
|
9
|
-
cwd?: string;
|
|
10
|
-
/** Git worktree path if auto-provisioned (CC TeamMember.worktreePath parity). */
|
|
11
|
-
worktreePath?: string;
|
|
12
|
-
/** Git worktree branch name (for cleanup). */
|
|
13
|
-
worktreeBranch?: string;
|
|
14
|
-
/** Whether the member is currently active. */
|
|
15
|
-
isActive?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export interface TeamToolParams {
|
|
18
|
-
action: TeamAction;
|
|
19
|
-
/** Team name (required for create/delete) */
|
|
20
|
-
teamName?: string;
|
|
21
|
-
/** Team description */
|
|
22
|
-
description?: string;
|
|
23
|
-
/** Members to include (for create) */
|
|
24
|
-
members?: TeamMember[];
|
|
25
|
-
/** Target member name or '*' for broadcast (required for send) */
|
|
26
|
-
to?: string;
|
|
27
|
-
/** Message content (required for send) */
|
|
28
|
-
message?: string;
|
|
29
|
-
/** Optional short summary for logging/routing (send) */
|
|
30
|
-
summary?: string;
|
|
31
|
-
}
|
|
32
|
-
export declare const TEAM_TOOL_SCHEMA: {
|
|
33
|
-
readonly type: "object";
|
|
34
|
-
readonly properties: {
|
|
35
|
-
readonly action: {
|
|
36
|
-
readonly type: "string";
|
|
37
|
-
readonly enum: readonly ["create", "delete", "list", "status", "send"];
|
|
38
|
-
readonly description: "Team action: create (new team), delete (disband), list (all teams), status (team details), send (message a member and collect the reply).";
|
|
39
|
-
};
|
|
40
|
-
readonly teamName: {
|
|
41
|
-
readonly type: "string";
|
|
42
|
-
readonly description: "Team name. Required for create/delete/status.";
|
|
43
|
-
};
|
|
44
|
-
readonly to: {
|
|
45
|
-
readonly type: "string";
|
|
46
|
-
readonly description: "Target member name, full member id, or '*' to broadcast to all live members. Required for send.";
|
|
47
|
-
};
|
|
48
|
-
readonly message: {
|
|
49
|
-
readonly type: "string";
|
|
50
|
-
readonly description: "Message content to deliver to the member. Required for send.";
|
|
51
|
-
};
|
|
52
|
-
readonly summary: {
|
|
53
|
-
readonly type: "string";
|
|
54
|
-
readonly description: "Optional short summary (for logging/routing). Used by send.";
|
|
55
|
-
};
|
|
56
|
-
readonly description: {
|
|
57
|
-
readonly type: "string";
|
|
58
|
-
readonly description: "Team description/objective. Used for create.";
|
|
59
|
-
};
|
|
60
|
-
readonly members: {
|
|
61
|
-
readonly type: "array";
|
|
62
|
-
readonly description: "Team members with roles and tool restrictions.";
|
|
63
|
-
readonly items: {
|
|
64
|
-
readonly type: "object";
|
|
65
|
-
readonly properties: {
|
|
66
|
-
readonly name: {
|
|
67
|
-
readonly type: "string";
|
|
68
|
-
readonly description: "Agent name/role identifier.";
|
|
69
|
-
};
|
|
70
|
-
readonly role: {
|
|
71
|
-
readonly type: "string";
|
|
72
|
-
readonly description: "Role description (e.g. 'frontend developer').";
|
|
73
|
-
};
|
|
74
|
-
readonly tools: {
|
|
75
|
-
readonly type: "array";
|
|
76
|
-
readonly items: {
|
|
77
|
-
readonly type: "string";
|
|
78
|
-
};
|
|
79
|
-
readonly description: "Allowed tools for this member.";
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
readonly required: readonly ["name", "role"];
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
readonly required: readonly ["action"];
|
|
87
|
-
};
|
|
88
|
-
export interface Team {
|
|
89
|
-
name: string;
|
|
90
|
-
description?: string;
|
|
91
|
-
leadId: string;
|
|
92
|
-
members: TeamMember[];
|
|
93
|
-
createdAt: string;
|
|
94
|
-
}
|
|
95
|
-
export interface TeamResult {
|
|
96
|
-
success: boolean;
|
|
97
|
-
team?: Team;
|
|
98
|
-
teams?: Team[];
|
|
99
|
-
error?: string;
|
|
100
|
-
/** Members that failed to spawn (team still created with the survivors). */
|
|
101
|
-
partialFailures?: Array<{
|
|
102
|
-
name: string;
|
|
103
|
-
error: string;
|
|
104
|
-
}>;
|
|
105
|
-
}
|
|
106
|
-
export interface TeamSendResult {
|
|
107
|
-
success: boolean;
|
|
108
|
-
recipients?: string[];
|
|
109
|
-
error?: string;
|
|
110
|
-
/** Replies collected from the recipient(s) — the message loop is synchronous. */
|
|
111
|
-
replies?: Array<{
|
|
112
|
-
memberId: string;
|
|
113
|
-
name: string;
|
|
114
|
-
reply: string;
|
|
115
|
-
}>;
|
|
116
|
-
}
|
|
117
|
-
export interface TeamToolDeps {
|
|
118
|
-
createTeam(params: {
|
|
119
|
-
teamName: string;
|
|
120
|
-
description?: string;
|
|
121
|
-
members?: TeamMember[];
|
|
122
|
-
}): Promise<TeamResult>;
|
|
123
|
-
deleteTeam(teamName: string): Promise<TeamResult>;
|
|
124
|
-
listTeams(): Promise<TeamResult>;
|
|
125
|
-
getTeamStatus(teamName: string): Promise<TeamResult & {
|
|
126
|
-
memberProgress?: Record<string, {
|
|
127
|
-
mediaProgress?: {
|
|
128
|
-
taskId: string;
|
|
129
|
-
mediaType: string;
|
|
130
|
-
percent: number;
|
|
131
|
-
status: string;
|
|
132
|
-
provider?: string;
|
|
133
|
-
updatedAt: number;
|
|
134
|
-
};
|
|
135
|
-
lastToolCall?: string;
|
|
136
|
-
idleFor?: number;
|
|
137
|
-
runningFor?: number;
|
|
138
|
-
}>;
|
|
139
|
-
}>;
|
|
140
|
-
/** Deliver a message to member(s) and collect their replies (send action). */
|
|
141
|
-
sendMessage(params: {
|
|
142
|
-
to: string;
|
|
143
|
-
message: string;
|
|
144
|
-
summary?: string;
|
|
145
|
-
senderId: string;
|
|
146
|
-
}): Promise<TeamSendResult>;
|
|
147
|
-
/** Current agent's id (send action sender). */
|
|
148
|
-
getSenderId(): string;
|
|
149
|
-
/** Live teammate names (send action target validation). */
|
|
150
|
-
listTeammates(): string[];
|
|
151
|
-
}
|
|
152
|
-
export declare function createTeamTool(deps: TeamToolDeps): PortableTool<TeamToolParams>;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import type { PortableTool } from "../portable-tool.js";
|
|
2
|
-
export declare const TOOL_SEARCH_TOOL_NAME: "tool_search";
|
|
3
|
-
export interface ToolSearchToolParams {
|
|
4
|
-
query: string;
|
|
5
|
-
maxResults?: number;
|
|
6
|
-
}
|
|
7
|
-
export declare const TOOL_SEARCH_TOOL_SCHEMA: {
|
|
8
|
-
readonly type: "object";
|
|
9
|
-
readonly properties: {
|
|
10
|
-
readonly query: {
|
|
11
|
-
readonly type: "string";
|
|
12
|
-
readonly description: string;
|
|
13
|
-
};
|
|
14
|
-
readonly maxResults: {
|
|
15
|
-
readonly type: "number";
|
|
16
|
-
readonly description: "Maximum number of results to return (default: 5).";
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
readonly required: readonly ["query"];
|
|
20
|
-
};
|
|
21
|
-
export interface DeferredToolInfo {
|
|
22
|
-
name: string;
|
|
23
|
-
description: string;
|
|
24
|
-
/** Optional search hint for better discovery */
|
|
25
|
-
searchHint?: string;
|
|
26
|
-
/** Compact parameter signature (e.g. "query, maxResults?") to disambiguate similar tools. */
|
|
27
|
-
paramSummary?: string;
|
|
28
|
-
score?: number;
|
|
29
|
-
matchedTerms?: string[];
|
|
30
|
-
matchedFields?: string[];
|
|
31
|
-
}
|
|
32
|
-
export interface ToolSearchOutput {
|
|
33
|
-
matches: DeferredToolInfo[];
|
|
34
|
-
query: string;
|
|
35
|
-
totalDeferred: number;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Host-provided deferred tool registry.
|
|
39
|
-
* The host manages which tools are loaded vs deferred,
|
|
40
|
-
* and handles activation when selected.
|
|
41
|
-
*/
|
|
42
|
-
export interface ToolSearchToolDeps {
|
|
43
|
-
/**
|
|
44
|
-
* Search deferred tools by query.
|
|
45
|
-
* Supports "select:name" for direct activation and keyword search.
|
|
46
|
-
*/
|
|
47
|
-
searchTools(query: string, options?: {
|
|
48
|
-
maxResults?: number;
|
|
49
|
-
}): Promise<ToolSearchOutput>;
|
|
50
|
-
/**
|
|
51
|
-
* Activate a deferred tool so it appears in subsequent turns.
|
|
52
|
-
* Returns true if activation succeeded.
|
|
53
|
-
*/
|
|
54
|
-
activateTool?(name: string): Promise<boolean>;
|
|
55
|
-
}
|
|
56
|
-
export interface ToolSearchCorpusEntry {
|
|
57
|
-
name: string;
|
|
58
|
-
description: string;
|
|
59
|
-
searchHint?: string;
|
|
60
|
-
paramSummary?: string;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Compact parameter signature for a JSON-Schema tool, e.g. "query, maxResults?".
|
|
64
|
-
* Required params are plain, optional ones suffixed "?". Surfacing this in search
|
|
65
|
-
* results raises tool-SELECTION accuracy: two lexically similar tools (e.g. two
|
|
66
|
-
* `search` tools) are told apart by their inputs, not guessed by name.
|
|
67
|
-
*/
|
|
68
|
-
export declare function summarizeToolParams(parameters: unknown): string;
|
|
69
|
-
/**
|
|
70
|
-
* Score a keyword query against a tool corpus (CC-aligned weights).
|
|
71
|
-
* Query syntax: plain terms rank, "+term" is required (must appear in
|
|
72
|
-
* name/description/searchHint). CJK terms match by substring.
|
|
73
|
-
*/
|
|
74
|
-
export declare function searchToolCorpus(entries: ToolSearchCorpusEntry[], query: string, maxResults: number): ToolSearchOutput;
|
|
75
|
-
export declare function createToolSearchTool(deps: ToolSearchToolDeps): PortableTool<ToolSearchToolParams>;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { type ToolSearchCorpusEntry } from "./tool-search-tool.js";
|
|
2
|
-
export type EvalLang = "en" | "zh";
|
|
3
|
-
export interface ToolSelectionCase {
|
|
4
|
-
id: string;
|
|
5
|
-
/** Natural-language / keyword intent issued to tool_search. */
|
|
6
|
-
query: string;
|
|
7
|
-
lang: EvalLang;
|
|
8
|
-
/** Tool names that count as a correct selection (one or more acceptable). */
|
|
9
|
-
expected: string[];
|
|
10
|
-
/** Optional note on what weakness this case probes. */
|
|
11
|
-
note?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface CaseResult {
|
|
14
|
-
id: string;
|
|
15
|
-
lang: EvalLang;
|
|
16
|
-
query: string;
|
|
17
|
-
expected: string[];
|
|
18
|
-
topMatch: string | null;
|
|
19
|
-
hitAt1: boolean;
|
|
20
|
-
hitAtK: boolean;
|
|
21
|
-
/** 1-based rank of the first expected tool among results, or null if absent. */
|
|
22
|
-
firstExpectedRank: number | null;
|
|
23
|
-
}
|
|
24
|
-
export interface EvalReport {
|
|
25
|
-
k: number;
|
|
26
|
-
total: number;
|
|
27
|
-
/** Share of cases whose #1 result is an expected tool. */
|
|
28
|
-
precisionAt1: number;
|
|
29
|
-
/** Share of cases with an expected tool anywhere in the top-k. */
|
|
30
|
-
recallAtK: number;
|
|
31
|
-
/** Mean reciprocal rank of the first expected tool. */
|
|
32
|
-
mrr: number;
|
|
33
|
-
byLang: Record<EvalLang, {
|
|
34
|
-
total: number;
|
|
35
|
-
precisionAt1: number;
|
|
36
|
-
recallAtK: number;
|
|
37
|
-
}>;
|
|
38
|
-
failures: CaseResult[];
|
|
39
|
-
results: CaseResult[];
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Run the deterministic search-ranking eval: feed each case's query through
|
|
43
|
-
* searchToolCorpus and score whether the expected tool is surfaced (and where).
|
|
44
|
-
*/
|
|
45
|
-
export declare function evalSearchSelection(corpus: ToolSearchCorpusEntry[], cases: ToolSelectionCase[], options?: {
|
|
46
|
-
k?: number;
|
|
47
|
-
}): EvalReport;
|
|
48
|
-
/** Human-readable report — printed on gate failure so CI logs name the regressed cases. */
|
|
49
|
-
export declare function formatEvalReport(report: EvalReport): string;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ToolSearchCorpusEntry } from "./tool-search-tool.js";
|
|
2
|
-
import type { ToolSelectionCase } from "./tool-selection-eval.js";
|
|
3
|
-
/** Representative deferred corpus: built-in media/dev tools + colliding MCP tools. */
|
|
4
|
-
export declare const SEED_CORPUS: ToolSearchCorpusEntry[];
|
|
5
|
-
export declare const SEED_CASES: ToolSelectionCase[];
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ToolSearchCorpusEntry } from "./tool-search-tool.js";
|
|
2
|
-
import type { ToolSelectionCase } from "./tool-selection-eval.js";
|
|
3
|
-
export declare const TASK_CORPUS: ToolSearchCorpusEntry[];
|
|
4
|
-
export declare const EN_CASES: ToolSelectionCase[];
|
|
5
|
-
export declare const CN_CASES: ToolSelectionCase[];
|
|
6
|
-
export declare const ALL_CASES: ToolSelectionCase[];
|
|
7
|
-
export declare const HELDOUT_CASES: ToolSelectionCase[];
|
|
8
|
-
export declare const NEGATIVE_CASES: ToolSelectionCase[];
|
|
9
|
-
export declare const DECIRC_CASES: ToolSelectionCase[];
|