@byok-sdk/bot-collaboration 0.42.0 → 0.43.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/README.md +21 -4
- package/dist/{chunk-XTZUCECQ.js → chunk-6Y2B2XCP.js} +5 -5
- package/dist/chunk-6Y2B2XCP.js.map +1 -0
- package/dist/{chunk-5J5SOWWI.js → chunk-QZRWFFHM.js} +6 -6
- package/dist/chunk-QZRWFFHM.js.map +1 -0
- package/dist/chunk-ZX6C5U2S.js +27 -0
- package/dist/chunk-ZX6C5U2S.js.map +1 -0
- package/dist/commit.d.ts +1 -0
- package/dist/host-kit.d.ts +20 -0
- package/dist/host-kit.js +8 -3
- package/dist/host-kit.js.map +1 -1
- package/dist/host.d.ts +47 -8
- package/dist/index.d.ts +1 -0
- package/dist/index.js +11 -8
- package/dist/index.js.map +1 -1
- package/dist/model.d.ts +6 -0
- package/dist/rules/delegation.d.ts +19 -6
- package/dist/rules/index.js +1 -1
- package/dist/store-compatibility.d.ts +3 -0
- package/dist/testing.js +2 -2
- package/package.json +8 -8
- package/dist/chunk-5J5SOWWI.js.map +0 -1
- package/dist/chunk-XTZUCECQ.js.map +0 -1
- package/dist/chunk-ZUFZCROA.js +0 -27
- package/dist/chunk-ZUFZCROA.js.map +0 -1
package/dist/model.d.ts
CHANGED
|
@@ -80,4 +80,10 @@ export interface CollaborationState extends AutonomyState {
|
|
|
80
80
|
*/
|
|
81
81
|
dreams?: DreamState;
|
|
82
82
|
}
|
|
83
|
+
/** A state version this build cannot adopt without a new ledger. */
|
|
84
|
+
export declare class OldCollaborationStateError extends Error {
|
|
85
|
+
readonly foundVersion: 1 | 2;
|
|
86
|
+
readonly code: 'collaboration_state_unsupported_old';
|
|
87
|
+
constructor(foundVersion: 1 | 2, message: string);
|
|
88
|
+
}
|
|
83
89
|
export declare function stateOf(application: Record<string, Json>): CollaborationState;
|
|
@@ -197,7 +197,10 @@ export declare function applyDelegate(state: DelegationState, turn: Turn, taskId
|
|
|
197
197
|
export declare function observeStart(state: DelegationState, turn: Turn, now: number, emit: Publish): void;
|
|
198
198
|
/** Presence is display evidence only. It never controls submit, expiry, or a verdict. */
|
|
199
199
|
export declare function observeDevices(state: DelegationState, facts: IntentFacts, devices: ReadonlyMap<string, boolean>, emit: Publish): void;
|
|
200
|
-
/**
|
|
200
|
+
/**
|
|
201
|
+
* The result of an owner cancel (#1405). `cancelled` confirms the cancel committed, not necessarily its settlement.
|
|
202
|
+
* Turn/delegation replays that return `cancel_pending` or `already_settled` write nothing and send no cancel.
|
|
203
|
+
*/
|
|
201
204
|
export type CancelOutcome = 'cancelled' | 'cancel_pending' | 'already_settled';
|
|
202
205
|
export interface TurnCancelResult {
|
|
203
206
|
turnId: string;
|
|
@@ -222,16 +225,26 @@ export declare class DelegationError extends Error {
|
|
|
222
225
|
/**
|
|
223
226
|
* A refused intent key. `cancelHostIntent` (#1320): `unknown_intent` for a key with no Host intent, or `not_host_intent` for a
|
|
224
227
|
* Bot Turn. `failStuckIntent` (#1405): `unknown_intent` for a key with no K4 intent, `already_settled`, or `not_stuck` for an
|
|
225
|
-
* intent whose terminal K8 did not refuse.
|
|
228
|
+
* intent whose terminal K8 did not refuse. `cancelHostIntents` (#2003) also refuses `inflight`, and `rejected` lists every
|
|
229
|
+
* refused key in input order. `key` and `code` name the first refusal.
|
|
226
230
|
*/
|
|
227
231
|
export declare class HostIntentError extends Error {
|
|
228
232
|
readonly key: string;
|
|
229
|
-
readonly code: 'unknown_intent' | 'not_host_intent' | 'already_settled' | 'not_stuck';
|
|
230
|
-
|
|
233
|
+
readonly code: 'unknown_intent' | 'not_host_intent' | 'already_settled' | 'not_stuck' | 'inflight';
|
|
234
|
+
readonly rejected: readonly {
|
|
235
|
+
key: string;
|
|
236
|
+
code: HostIntentError['code'];
|
|
237
|
+
}[];
|
|
238
|
+
constructor(key: string, code: 'unknown_intent' | 'not_host_intent' | 'already_settled' | 'not_stuck' | 'inflight', message: string, rejected?: readonly {
|
|
239
|
+
key: string;
|
|
240
|
+
code: HostIntentError['code'];
|
|
241
|
+
}[]);
|
|
231
242
|
}
|
|
232
243
|
/**
|
|
233
|
-
* `cancelled`: the intent was not submitted and
|
|
234
|
-
*
|
|
244
|
+
* `cancelled`: the intent was not submitted and its cancel committed. `conclusion` is optional: a `drainError` or
|
|
245
|
+
* `wakePending` result can precede settlement, which waits for a later successful drain. Replay then returns
|
|
246
|
+
* `already_settled` with the conclusion. `cancel_pending`: the SDK cancel was requested and K4 awaits its terminal;
|
|
247
|
+
* `conclusion` is absent until settlement. `already_settled`: no cancel was sent; `conclusion` is the earlier one.
|
|
235
248
|
*/
|
|
236
249
|
export interface IntentCancelResult<C extends string> {
|
|
237
250
|
key: string;
|
package/dist/rules/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { admitDeviceSlot, autonomousIntentIds, userFirst } from '../chunk-33YA66U7.js';
|
|
2
|
-
export { COALESCE_DEFAULTS, CONNECTOR_OUTCOME_UNKNOWN, DEVICE_NOT_BOUND, DEVICE_SWITCHING, OFFER_WAIT_MS, addTurn, admitBotToolsets, advanceRoomSeats, cardCallDue, checkReply, coalescePolicy, collaborationDue, commandBots, commitCommand, compactVeto, delegationCancelAnswer, hostIntentCancelAnswer, hostMessageDisposition, inactive, observeDevices, replyCheckDue, reportCardDecisions, requireMain, seatTurn, settleCardCall, settleDelegations, syncTurn, turnCancelAnswer } from '../chunk-
|
|
2
|
+
export { COALESCE_DEFAULTS, CONNECTOR_OUTCOME_UNKNOWN, DEVICE_NOT_BOUND, DEVICE_SWITCHING, OFFER_WAIT_MS, addTurn, admitBotToolsets, advanceRoomSeats, cardCallDue, checkReply, coalescePolicy, collaborationDue, commandBots, commitCommand, compactVeto, delegationCancelAnswer, hostIntentCancelAnswer, hostMessageDisposition, inactive, observeDevices, replyCheckDue, reportCardDecisions, requireMain, seatTurn, settleCardCall, settleDelegations, syncTurn, turnCancelAnswer } from '../chunk-ZX6C5U2S.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/testing.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { projectionRequestId, inboundKey, ROUTINE_WAIT_MS, RetentionRefused, ROUTINE_LATE_AFTER_MS } from './chunk-
|
|
2
|
-
import { outcomeSchema, wouldDoRows, syncTurn, OFFER_WAIT_MS, roomFields, roomInput, ROOM_GRACE_MS, archiveBot, RetiredIdentityError, CommitConflict, roomContext, json, TeamModeError } from './chunk-
|
|
1
|
+
import { projectionRequestId, inboundKey, ROUTINE_WAIT_MS, RetentionRefused, ROUTINE_LATE_AFTER_MS } from './chunk-6Y2B2XCP.js';
|
|
2
|
+
import { outcomeSchema, wouldDoRows, syncTurn, OFFER_WAIT_MS, roomFields, roomInput, ROOM_GRACE_MS, archiveBot, RetiredIdentityError, CommitConflict, roomContext, json, TeamModeError } from './chunk-ZX6C5U2S.js';
|
|
3
3
|
import { describe, it, expect } from 'vitest';
|
|
4
4
|
import { hash, taskId, HostLedger, MIN_TOMBSTONE_RETENTION_MS } from '@byok-sdk/server/execution-core';
|
|
5
5
|
import { BOT_TURN_OUTCOME_CONTRACT, nextRoutineOccurrence } from '@byok-sdk/protocol';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byok-sdk/bot-collaboration",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"description": "K8 Bot collaboration for BYOK Hosts: the local Host, the modules a Host composes, the pure rules and shared test vectors, on the K4 execution core.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"clean": "rm -rf dist"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@byok-sdk/client": "0.
|
|
58
|
-
"@byok-sdk/protocol": "0.
|
|
59
|
-
"@byok-sdk/server": "0.
|
|
57
|
+
"@byok-sdk/client": "0.43.0",
|
|
58
|
+
"@byok-sdk/protocol": "0.43.0",
|
|
59
|
+
"@byok-sdk/server": "0.43.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"@hono/node-server": "^2.1.
|
|
62
|
+
"@hono/node-server": "^2.1.6",
|
|
63
63
|
"vitest": "^5.1.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependenciesMeta": {
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@byok-sdk/cloud": "0.
|
|
75
|
-
"@byok-sdk/core": "0.
|
|
74
|
+
"@byok-sdk/cloud": "0.43.0",
|
|
75
|
+
"@byok-sdk/core": "0.43.0",
|
|
76
76
|
"@byok-sdk/example-host-execution-core": "0.0.1",
|
|
77
|
-
"@hono/node-server": "^2.1.
|
|
77
|
+
"@hono/node-server": "^2.1.6",
|
|
78
78
|
"@types/node": "^24",
|
|
79
79
|
"typescript": "^7.0.2",
|
|
80
80
|
"vitest": "^5.1.0"
|