@kernel.chat/kbot 2.8.0 → 2.9.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.
@@ -0,0 +1,97 @@
1
+ export interface Handoff {
2
+ id: string;
3
+ from: string;
4
+ to: string;
5
+ reason: string;
6
+ context: string;
7
+ artifacts: string[];
8
+ priority: 'low' | 'normal' | 'high' | 'critical';
9
+ status: 'pending' | 'accepted' | 'rejected' | 'completed';
10
+ result?: string;
11
+ rejectionReason?: string;
12
+ created: string;
13
+ updated: string;
14
+ }
15
+ /** Create a handoff request from one agent to another */
16
+ export declare function createHandoff(from: string, to: string, reason: string, context: string, artifacts?: string[], priority?: Handoff['priority']): Handoff;
17
+ /** Accept a pending handoff */
18
+ export declare function acceptHandoff(id: string): Handoff;
19
+ /** Reject a pending handoff with a reason */
20
+ export declare function rejectHandoff(id: string, reason: string): Handoff;
21
+ /** Mark a handoff as completed with a result */
22
+ export declare function completeHandoff(id: string, result: string): Handoff;
23
+ /** Get all pending handoffs, optionally filtered by target agent */
24
+ export declare function getActiveHandoffs(agentId?: string): Handoff[];
25
+ /** Get full handoff history for analysis */
26
+ export declare function getHandoffHistory(): Handoff[];
27
+ export interface BlackboardEntry {
28
+ key: string;
29
+ value: unknown;
30
+ author: string;
31
+ type: 'fact' | 'hypothesis' | 'decision' | 'artifact' | 'question';
32
+ confidence: number;
33
+ timestamp: string;
34
+ subscribers: string[];
35
+ }
36
+ export interface Blackboard {
37
+ entries: Map<string, BlackboardEntry>;
38
+ }
39
+ type SubscriptionCallback = (entry: BlackboardEntry) => void;
40
+ /** Write an entry to the shared blackboard */
41
+ export declare function blackboardWrite(key: string, value: unknown, author: string, type: BlackboardEntry['type'], confidence?: number): BlackboardEntry;
42
+ /** Read an entry from the blackboard */
43
+ export declare function blackboardRead(key: string): BlackboardEntry | undefined;
44
+ /** Query all entries, optionally filtered by type */
45
+ export declare function blackboardQuery(type?: BlackboardEntry['type']): BlackboardEntry[];
46
+ /** Subscribe an agent to changes on a blackboard key */
47
+ export declare function blackboardSubscribe(key: string, agentId: string, callback?: SubscriptionCallback): void;
48
+ /** Get all decision-type entries (consensus view) */
49
+ export declare function blackboardGetDecisions(): BlackboardEntry[];
50
+ /** Clear the entire blackboard for a new task */
51
+ export declare function blackboardClear(): void;
52
+ export interface Proposal {
53
+ id: string;
54
+ author: string;
55
+ description: string;
56
+ rationale: string;
57
+ votes: Map<string, {
58
+ vote: 'agree' | 'disagree' | 'abstain';
59
+ reason?: string;
60
+ }>;
61
+ status: 'open' | 'accepted' | 'rejected' | 'compromised';
62
+ resolution?: string;
63
+ created: string;
64
+ }
65
+ /** Propose an approach for multi-agent negotiation */
66
+ export declare function propose(author: string, description: string, rationale: string): Proposal;
67
+ /** Cast a vote on a proposal */
68
+ export declare function vote(proposalId: string, agentId: string, v: 'agree' | 'disagree' | 'abstain', reason?: string): Proposal;
69
+ /** Resolve a proposal: majority wins, trust-weighted tiebreaking */
70
+ export declare function resolveProposal(proposalId: string): Proposal;
71
+ /** Get consensus state of all proposals */
72
+ export declare function getConsensus(): Proposal[];
73
+ export interface TrustProfile {
74
+ agentId: string;
75
+ domains: Map<string, number>;
76
+ overall: number;
77
+ history: {
78
+ task: string;
79
+ success: boolean;
80
+ domain: string;
81
+ timestamp: string;
82
+ }[];
83
+ }
84
+ /** Get trust score for an agent, optionally in a specific domain */
85
+ export declare function getTrust(agentId: string, domain?: string): number;
86
+ /** Update trust for an agent after task completion */
87
+ export declare function updateTrust(agentId: string, domain: string, success: boolean): void;
88
+ /** Get the most trusted agent for a specific domain */
89
+ export declare function getMostTrusted(domain: string): {
90
+ agentId: string;
91
+ trust: number;
92
+ } | null;
93
+ /** Get the full trust matrix for all agents */
94
+ export declare function getTrustReport(): string;
95
+ export declare function registerAgentProtocolTools(): void;
96
+ export {};
97
+ //# sourceMappingURL=agent-protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-protocol.d.ts","sourceRoot":"","sources":["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