@otto-code/protocol 0.6.3 → 0.6.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/dist/agent-teams.d.ts +10 -0
- package/dist/agent-teams.js +18 -0
- package/dist/agent-types.d.ts +7 -0
- package/dist/generated/validation/ws-outbound.aot.js +15400 -12953
- package/dist/messages.d.ts +2356 -8
- package/dist/messages.js +408 -1
- package/dist/provider-config.d.ts +12 -0
- package/dist/provider-config.js +15 -0
- package/dist/provider-manifest.js +13 -0
- package/dist/validation/ws-outbound-schema-metadata.d.ts +416 -1
- package/package.json +2 -1
package/dist/agent-teams.d.ts
CHANGED
|
@@ -36,6 +36,16 @@ export declare function resolveTeamMembers(team: Pick<AgentTeam, "memberIds"> |
|
|
|
36
36
|
* dangling ids don't accumulate; readers never require it.
|
|
37
37
|
*/
|
|
38
38
|
export declare function pruneTeamMemberIds(memberIds: readonly string[] | undefined, personalities: readonly AgentPersonality[] | undefined): string[];
|
|
39
|
+
/**
|
|
40
|
+
* The members a team owns exclusively: personalities on `team` that no team in
|
|
41
|
+
* `otherTeams` also lists. These are the ones deleting `team` would leave on no
|
|
42
|
+
* team at all, so the delete confirm can offer to clean them up. Dangling member
|
|
43
|
+
* ids resolve to nothing and drop out, same as everywhere else.
|
|
44
|
+
*
|
|
45
|
+
* Pass the teams that will REMAIN after the delete — the caller owns the filter,
|
|
46
|
+
* so this stays a pure set operation with no notion of "the team being deleted".
|
|
47
|
+
*/
|
|
48
|
+
export declare function resolveExclusiveTeamMembers(team: Pick<AgentTeam, "memberIds"> | null | undefined, otherTeams: readonly Pick<AgentTeam, "memberIds">[] | undefined, personalities: readonly AgentPersonality[] | undefined): AgentPersonality[];
|
|
39
49
|
/**
|
|
40
50
|
* The union of all members' roles, normalized and returned in canonical
|
|
41
51
|
* `PERSONALITY_ROLES` order — the team card's role-pill strip.
|
package/dist/agent-teams.js
CHANGED
|
@@ -80,6 +80,24 @@ export function pruneTeamMemberIds(memberIds, personalities) {
|
|
|
80
80
|
return true;
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* The members a team owns exclusively: personalities on `team` that no team in
|
|
85
|
+
* `otherTeams` also lists. These are the ones deleting `team` would leave on no
|
|
86
|
+
* team at all, so the delete confirm can offer to clean them up. Dangling member
|
|
87
|
+
* ids resolve to nothing and drop out, same as everywhere else.
|
|
88
|
+
*
|
|
89
|
+
* Pass the teams that will REMAIN after the delete — the caller owns the filter,
|
|
90
|
+
* so this stays a pure set operation with no notion of "the team being deleted".
|
|
91
|
+
*/
|
|
92
|
+
export function resolveExclusiveTeamMembers(team, otherTeams, personalities) {
|
|
93
|
+
const claimed = new Set();
|
|
94
|
+
for (const other of otherTeams ?? []) {
|
|
95
|
+
for (const memberId of other.memberIds ?? []) {
|
|
96
|
+
claimed.add(memberId);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return resolveTeamMembers(team, personalities).filter((personality) => !claimed.has(personality.id));
|
|
100
|
+
}
|
|
83
101
|
/**
|
|
84
102
|
* The union of all members' roles, normalized and returned in canonical
|
|
85
103
|
* `PERSONALITY_ROLES` order — the team card's role-pill strip.
|
package/dist/agent-types.d.ts
CHANGED
|
@@ -199,6 +199,13 @@ export interface ContextComposition {
|
|
|
199
199
|
export interface AgentUsage {
|
|
200
200
|
inputTokens?: number;
|
|
201
201
|
cachedInputTokens?: number;
|
|
202
|
+
/**
|
|
203
|
+
* Prompt tokens spent writing (not reading) the prompt cache this turn —
|
|
204
|
+
* Anthropic's `cache_creation_input_tokens`, billed above normal input.
|
|
205
|
+
* Disjoint from `inputTokens`/`cachedInputTokens`. Claude-specific today;
|
|
206
|
+
* other providers omit it. Optional/additive.
|
|
207
|
+
*/
|
|
208
|
+
cacheCreationInputTokens?: number;
|
|
202
209
|
outputTokens?: number;
|
|
203
210
|
totalCostUsd?: number;
|
|
204
211
|
contextWindowMaxTokens?: number;
|