@byokit/herdr 0.7.2 → 0.8.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/dist/turns.js CHANGED
@@ -73,9 +73,11 @@ export function createTurns(kit) {
73
73
  if (!isAbsolute(o.cwd))
74
74
  throw fail('turn-cwd');
75
75
  const timeoutMs = positiveLimit(o.timeoutMs, 300000);
76
- // Fail invalid configuration before delivering a prompt.
77
- positiveLimit(o.files?.maxFiles, 10000);
78
- positiveLimit(o.files?.maxBytes, 128 * 1024 * 1024);
76
+ // Fail invalid configuration before delivering a prompt (no scan means no file limits to check).
77
+ if (o.files !== false) {
78
+ positiveLimit(o.files?.maxFiles, 10000);
79
+ positiveLimit(o.files?.maxBytes, 128 * 1024 * 1024);
80
+ }
79
81
  if (o.result)
80
82
  positiveLimit(o.result.maxBytes, 1024 * 1024);
81
83
  const schema = o.result ? JSON.stringify(o.result.schema) : undefined;
@@ -125,7 +127,7 @@ export function createTurns(kit) {
125
127
  const endSignal = new Promise((resolve) => { resolveEnd = resolve; });
126
128
  const watch = kit.subscribe([{ type: 'pane.agent_status_changed', pane_id: target.paneId }], (e) => {
127
129
  if (!armed) {
128
- if (e.agent_status !== 'idle')
130
+ if (e.agent_status !== 'idle' && e.agent_status !== 'done')
129
131
  abort('turn-busy');
130
132
  return;
131
133
  }
@@ -153,7 +155,7 @@ export function createTurns(kit) {
153
155
  throw fail('turn-watch-lost');
154
156
  const beforeAgent = await gate(kit.call('agent.get', { target: target.paneId }));
155
157
  const agent = beforeAgent.agent;
156
- if (agent.agent_status !== 'idle' || agent.launch_pending === true)
158
+ if ((agent.agent_status !== 'idle' && agent.agent_status !== 'done') || agent.launch_pending === true)
157
159
  throw fail('turn-not-idle');
158
160
  if (target.name && agent.name !== target.name)
159
161
  throw fail('turn-unavailable');
package/dist/types.d.ts CHANGED
@@ -98,6 +98,7 @@ export type AgentStartEvent = {
98
98
  export type AgentRef = {
99
99
  paneId: string;
100
100
  name?: string;
101
+ created?: boolean;
101
102
  };
102
103
  export type StartAgent = {
103
104
  kind: string;
@@ -106,6 +107,9 @@ export type StartAgent = {
106
107
  place: {
107
108
  workspace: 'new';
108
109
  label?: string;
110
+ } | {
111
+ workspace: string;
112
+ label?: string;
109
113
  } | {
110
114
  tab: 'new';
111
115
  workspaceId: string;
@@ -155,6 +159,7 @@ export type MoveToAccount = {
155
159
  provider: string;
156
160
  folder: string;
157
161
  env?: Record<string, string>;
162
+ name?: string;
158
163
  direction?: 'right' | 'down';
159
164
  timeoutMs?: number;
160
165
  whenBusy?: BusyHandoff;
@@ -164,7 +169,7 @@ export type MoveToAccountResult = {
164
169
  session: string;
165
170
  } | {
166
171
  ok: false;
167
- code: 'too_early' | 'busy' | 'unsupported' | 'env_mismatch' | 'close_failed' | 'start_failed' | 'blocked' | 'changed' | 'interrupt_unsupported';
172
+ code: 'too_early' | 'busy' | 'unsupported' | 'env_mismatch' | 'close_failed' | 'start_failed' | 'blocked' | 'changed' | 'interrupt_unsupported' | 'signed_out';
168
173
  message: string;
169
174
  live?: string;
170
175
  };
@@ -209,7 +214,8 @@ export type AgentTurnOptions<T = unknown> = {
209
214
  cwd: string;
210
215
  timeoutMs?: number;
211
216
  signal?: AbortSignal;
212
- files?: AgentTurnFiles;
217
+ /** Pass false to skip the file scan entirely (changedFiles is then always empty). */
218
+ files?: AgentTurnFiles | false;
213
219
  result?: AgentTurnResultPolicy<T>;
214
220
  onEnd?: (end: AgentTurnEnd<T>) => void;
215
221
  };
package/dist/words.json CHANGED
@@ -20,6 +20,7 @@
20
20
  "approval.stale": "That question already changed. Look again before answering.",
21
21
  "close.wouldWiden": "Closing this would close more than you picked. Close the bigger one instead.",
22
22
  "link.notAllowed": "This device can't do that. Ask the person at the computer.",
23
+ "move.signed_out": "Sign in to {name} first.",
23
24
  "move.too_early": "This conversation has not started yet. Try again in a moment.",
24
25
  "move.busy": "Wait for this conversation to finish before moving it.",
25
26
  "move.unsupported": "This conversation cannot move between these accounts.",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@byokit/herdr",
3
- "version": "0.7.2",
4
- "description": "Drive the Herdr on this computer — workspaces, tabs, panes, agents and blocked-approval answers — from an app, or hand it to a phone over @byokit/link.",
3
+ "version": "0.8.0",
4
+ "description": "Drive the Herdr on this computer — workspaces, tabs, panes, agents and blocked-approval answers — from an app, or hand it to a phone over @byokit/pair.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "repository": {
@@ -52,9 +52,9 @@
52
52
  "prepack": "tsc -b && node ../../scripts/fix-words-dts.cjs"
53
53
  },
54
54
  "dependencies": {
55
- "@byokit/link": "0.8.0",
56
- "@byokit/relay": "0.6.0",
57
- "@byokit/discover": "0.6.0",
55
+ "@byokit/pair": "0.10.0",
56
+ "@byokit/relay": "0.6.1",
57
+ "@byokit/discover": "0.8.0",
58
58
  "@byokit/seal": "0.3.0",
59
59
  "ws": "8.22.0"
60
60
  },