@agentshouse/kit-wire 0.1.0-cc189684f4a10 → 0.1.0-ce269f317b0cb

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/acts.d.ts CHANGED
@@ -332,7 +332,7 @@ export declare const KIT_ACTS: {
332
332
  }, z.core.$strict>, {
333
333
  door: string;
334
334
  }>;
335
- 'transcripts/keep': KitActDeclaration<"conversation" | "message", z.ZodObject<{
335
+ 'agent_update.transcript_keep': KitActDeclaration<"conversation" | "message", z.ZodObject<{
336
336
  path: z.ZodString;
337
337
  text: z.ZodString;
338
338
  }, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
@@ -342,7 +342,7 @@ export declare const KIT_ACTS: {
342
342
  }, z.core.$strict>, {
343
343
  door: string;
344
344
  }>;
345
- 'conversations/interaction/ask': KitActDeclaration<"conversation" | "turn", z.ZodObject<{
345
+ 'agent_update.conversation_ask': KitActDeclaration<"conversation" | "turn", z.ZodObject<{
346
346
  interaction_id: z.ZodUUID;
347
347
  request: z.ZodJSONSchema;
348
348
  secret: z.ZodBoolean;
@@ -351,7 +351,11 @@ export declare const KIT_ACTS: {
351
351
  'kits/report-restart': KitActDeclaration<never, z.ZodObject<{
352
352
  planned: z.ZodOptional<z.ZodLiteral<true>>;
353
353
  }, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
354
- 'conversations/credentials/issue': KitActDeclaration<"conversation", z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
354
+ 'agent_update.credentials_issue': KitActDeclaration<never, z.ZodUnion<readonly [z.ZodObject<{
355
+ conversation: z.ZodString;
356
+ }, z.core.$strict>, z.ZodObject<{
357
+ run: z.ZodString;
358
+ }, z.core.$strict>]>, z.ZodObject<{
355
359
  credential: z.ZodString;
356
360
  }, z.core.$strict>>;
357
361
  'kits/log-out': KitActDeclaration<never, z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
@@ -366,10 +370,12 @@ export declare const KIT_ACTS: {
366
370
  }, z.core.$strict>>;
367
371
  }, z.core.$strict>;
368
372
  }, z.core.$strict>>;
369
- 'function-runs/credentials/issue': KitActDeclaration<"run", z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
370
- credential: z.ZodString;
371
- }, z.core.$strict>>;
372
373
  };
374
+ export interface KitActRoute {
375
+ readonly path: string;
376
+ readonly op: string | null;
377
+ }
378
+ export declare function kitActRoute(name: string): KitActRoute;
373
379
  export declare const FUNCTION_RUN_META_KEY = "agents.house/function-run";
374
380
  export type KitActName = keyof typeof KIT_ACTS;
375
381
  type Declared<Name extends KitActName> = (typeof KIT_ACTS)[Name];
package/dist/acts.js CHANGED
@@ -180,6 +180,7 @@ function act(ids, body, answer) {
180
180
  return { ids, body, answer };
181
181
  }
182
182
  const CONVERSATION_TURN = ['conversation', 'turn'];
183
+ const CREDENTIAL = z.strictObject({ credential: z.string().min(1) });
183
184
  export const KIT_ACTS = {
184
185
  'secret-inputs/await': act(['subject'], DECLARED_SECRET_CEREMONY, SECRET_RELAY_OUTCOME),
185
186
  'agents/report': act([], AGENT_CAPABILITY_DECLARATION, NOTHING),
@@ -189,16 +190,21 @@ export const KIT_ACTS = {
189
190
  'turns/activity/report': act(CONVERSATION_TURN, NOTHING, NOTHING),
190
191
  'turns/end': act(CONVERSATION_TURN, KIT_TURN_END, NOTHING),
191
192
  'turns/images/declare': act(CONVERSATION_TURN, KIT_TURN_IMAGE, { door: 'files/attach' }),
192
- 'transcripts/keep': act(['conversation', 'message'], TRANSCRIPT, NOTHING),
193
+ 'agent_update.transcript_keep': act(['conversation', 'message'], TRANSCRIPT, NOTHING),
193
194
  'uploads/finish': act([], KIT_UPLOAD_FINISH, { door: 'files/finish' }),
194
- 'conversations/interaction/ask': act(CONVERSATION_TURN, KIT_QUESTION, NOTHING),
195
+ 'agent_update.conversation_ask': act(CONVERSATION_TURN, KIT_QUESTION, NOTHING),
195
196
  'kits/report-idle': act([], NOTHING, NOTHING),
196
197
  'kits/report-restart': act([], KIT_RESTART, NOTHING),
197
- 'conversations/credentials/issue': act(['conversation'], NOTHING, z.strictObject({ credential: z.string().min(1) })),
198
+ 'agent_update.credentials_issue': act([], z.union([z.strictObject({ conversation: z.string() }), z.strictObject({ run: z.string() })]), CREDENTIAL),
198
199
  'kits/log-out': act([], NOTHING, z.strictObject({ environment: z.uuid(), revoked: z.literal(true) })),
199
200
  'local-copies/selection/read': act([], NOTHING, z.strictObject({ local_copy: z.strictObject({ rooms: z.array(LOCAL_COPY_ROOM) }) })),
200
- 'function-runs/credentials/issue': act(['run'], NOTHING, z.strictObject({ credential: z.string().min(1) })),
201
201
  };
202
+ export function kitActRoute(name) {
203
+ const dot = name.indexOf('.');
204
+ return dot < 0
205
+ ? { path: `/kit/${name}`, op: null }
206
+ : { path: `/kit/${name.slice(0, dot)}`, op: name.slice(dot + 1) };
207
+ }
202
208
  export const FUNCTION_RUN_META_KEY = 'agents.house/function-run';
203
209
  export const KIT_DOOR_ACTS = [
204
210
  'rooms/discover',
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { HOUSE_ONE_WAY_CALLS, KIT_CALL, KIT_CALL_RESULT, KIT_CALLS, KIT_CAUSE, KIT_CONNECTION_PATH, KIT_CONNECTION_PROTOCOL_PREFIX, KIT_ONE_WAY_CALLS, KIT_SETTINGS, SESSION_CHOICE_BYTES_MAX, STARTING_STEPS, } from './connection.ts';
2
2
  export type { HouseOneWayCall, HouseOneWayCallOf, KitCall, KitCallOf, KitCallResult, KitMethod, KitOneWayCall, KitOneWayCallOf, KitSettings, } from './connection.ts';
3
- export { AGENT_CAPABILITY_DECLARATION, DECLARED_SECRET_CEREMONY, DESIRED_AGENT_ROUTE, DESIRED_AGENTS, ENVIRONMENT_FORMS, FILE_BYTES, FILE_NAME, FILE_NAME_MAX, FUNCTION_RUN_META_KEY, KIT_ACTS, KIT_BINARY_CHANGE, KIT_DOOR_ACTS, KIT_QUESTION, KIT_REINSTALLS, KIT_TURN_END, KIT_TURN_IMAGE, KIT_UPLOAD_FINISH, LOCAL_COPY_ROOM, MEDIA_TYPE, PART_SHA256, REPORTED_AGENT_KIND, SECRET_CEREMONY_STEPS_MAX, SECRET_RELAY_OUTCOME, SECRET_RELAY_RELEASES, SHA256, TRANSCRIPT, } from './acts.ts';
4
- export type { AgentCapabilityDeclaration, DeclaredSecretCeremony, DesiredAgentRoute, KitActAnswer, KitActDeclaration, KitActName, KitActRequest, KitBinaryChange, KitDoorAct, KitDoorAnswer, KitQuestion, KitTurnEnd, KitTurnImage, LocalCopyRoom, ReportedAgentKind, SecretCeremonyStep, SecretRelayOutcome, Transcript, TranscriptionReport, } from './acts.ts';
3
+ export { AGENT_CAPABILITY_DECLARATION, DECLARED_SECRET_CEREMONY, DESIRED_AGENT_ROUTE, DESIRED_AGENTS, ENVIRONMENT_FORMS, FILE_BYTES, FILE_NAME, FILE_NAME_MAX, FUNCTION_RUN_META_KEY, KIT_ACTS, KIT_BINARY_CHANGE, KIT_DOOR_ACTS, KIT_QUESTION, KIT_REINSTALLS, KIT_TURN_END, KIT_TURN_IMAGE, KIT_UPLOAD_FINISH, kitActRoute, LOCAL_COPY_ROOM, MEDIA_TYPE, PART_SHA256, REPORTED_AGENT_KIND, SECRET_CEREMONY_STEPS_MAX, SECRET_RELAY_OUTCOME, SECRET_RELAY_RELEASES, SHA256, TRANSCRIPT, } from './acts.ts';
4
+ export type { AgentCapabilityDeclaration, DeclaredSecretCeremony, DesiredAgentRoute, KitActAnswer, KitActDeclaration, KitActName, KitActRequest, KitActRoute, KitBinaryChange, KitDoorAct, KitDoorAnswer, KitQuestion, KitTurnEnd, KitTurnImage, LocalCopyRoom, ReportedAgentKind, SecretCeremonyStep, SecretRelayOutcome, Transcript, TranscriptionReport, } from './acts.ts';
5
5
  export { ENVIRONMENT_REACHES, ENVIRONMENT_ROOM_LIMIT, ENVIRONMENT_ROOM_REFS, ENVIRONMENT_ROOMS, KIT_ENROLLMENT_ACTS, KIT_LOGIN_ISSUED, KIT_LOGIN_PATHS, KIT_LOGIN_POLL, KIT_LOGIN_START, KIT_LOGIN_STARTED, } from './enrollment.ts';
6
6
  export type { EnvironmentReach, EnvironmentRooms, KitEnrollmentAct } from './enrollment.ts';
7
7
  export { BUILDING_KIT, KIT_COMMANDS, KIT_DECLARATION, KIT_WIRE, KIT_WIRE_HEADER, kitWire, kitWireRefusal, } from './wire.ts';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export { HOUSE_ONE_WAY_CALLS, KIT_CALL, KIT_CALL_RESULT, KIT_CALLS, KIT_CAUSE, KIT_CONNECTION_PATH, KIT_CONNECTION_PROTOCOL_PREFIX, KIT_ONE_WAY_CALLS, KIT_SETTINGS, SESSION_CHOICE_BYTES_MAX, STARTING_STEPS, } from './connection.js';
2
- export { AGENT_CAPABILITY_DECLARATION, DECLARED_SECRET_CEREMONY, DESIRED_AGENT_ROUTE, DESIRED_AGENTS, ENVIRONMENT_FORMS, FILE_BYTES, FILE_NAME, FILE_NAME_MAX, FUNCTION_RUN_META_KEY, KIT_ACTS, KIT_BINARY_CHANGE, KIT_DOOR_ACTS, KIT_QUESTION, KIT_REINSTALLS, KIT_TURN_END, KIT_TURN_IMAGE, KIT_UPLOAD_FINISH, LOCAL_COPY_ROOM, MEDIA_TYPE, PART_SHA256, REPORTED_AGENT_KIND, SECRET_CEREMONY_STEPS_MAX, SECRET_RELAY_OUTCOME, SECRET_RELAY_RELEASES, SHA256, TRANSCRIPT, } from './acts.js';
2
+ export { AGENT_CAPABILITY_DECLARATION, DECLARED_SECRET_CEREMONY, DESIRED_AGENT_ROUTE, DESIRED_AGENTS, ENVIRONMENT_FORMS, FILE_BYTES, FILE_NAME, FILE_NAME_MAX, FUNCTION_RUN_META_KEY, KIT_ACTS, KIT_BINARY_CHANGE, KIT_DOOR_ACTS, KIT_QUESTION, KIT_REINSTALLS, KIT_TURN_END, KIT_TURN_IMAGE, KIT_UPLOAD_FINISH, kitActRoute, LOCAL_COPY_ROOM, MEDIA_TYPE, PART_SHA256, REPORTED_AGENT_KIND, SECRET_CEREMONY_STEPS_MAX, SECRET_RELAY_OUTCOME, SECRET_RELAY_RELEASES, SHA256, TRANSCRIPT, } from './acts.js';
3
3
  export { ENVIRONMENT_REACHES, ENVIRONMENT_ROOM_LIMIT, ENVIRONMENT_ROOM_REFS, ENVIRONMENT_ROOMS, KIT_ENROLLMENT_ACTS, KIT_LOGIN_ISSUED, KIT_LOGIN_PATHS, KIT_LOGIN_POLL, KIT_LOGIN_START, KIT_LOGIN_STARTED, } from './enrollment.js';
4
4
  export { BUILDING_KIT, KIT_COMMANDS, KIT_DECLARATION, KIT_WIRE, KIT_WIRE_HEADER, kitWire, kitWireRefusal, } from './wire.js';
package/dist/wire.d.ts CHANGED
@@ -406,7 +406,7 @@ export declare const KIT_DECLARATION: {
406
406
  }, z.core.$strict>, {
407
407
  door: string;
408
408
  }>;
409
- 'transcripts/keep': import("./acts.ts").KitActDeclaration<"conversation" | "message", z.ZodObject<{
409
+ 'agent_update.transcript_keep': import("./acts.ts").KitActDeclaration<"conversation" | "message", z.ZodObject<{
410
410
  path: z.ZodString;
411
411
  text: z.ZodString;
412
412
  }, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
@@ -416,7 +416,7 @@ export declare const KIT_DECLARATION: {
416
416
  }, z.core.$strict>, {
417
417
  door: string;
418
418
  }>;
419
- 'conversations/interaction/ask': import("./acts.ts").KitActDeclaration<"conversation" | "turn", z.ZodObject<{
419
+ 'agent_update.conversation_ask': import("./acts.ts").KitActDeclaration<"conversation" | "turn", z.ZodObject<{
420
420
  interaction_id: z.ZodUUID;
421
421
  request: z.ZodJSONSchema;
422
422
  secret: z.ZodBoolean;
@@ -425,7 +425,11 @@ export declare const KIT_DECLARATION: {
425
425
  'kits/report-restart': import("./acts.ts").KitActDeclaration<never, z.ZodObject<{
426
426
  planned: z.ZodOptional<z.ZodLiteral<true>>;
427
427
  }, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
428
- 'conversations/credentials/issue': import("./acts.ts").KitActDeclaration<"conversation", z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
428
+ 'agent_update.credentials_issue': import("./acts.ts").KitActDeclaration<never, z.ZodUnion<readonly [z.ZodObject<{
429
+ conversation: z.ZodString;
430
+ }, z.core.$strict>, z.ZodObject<{
431
+ run: z.ZodString;
432
+ }, z.core.$strict>]>, z.ZodObject<{
429
433
  credential: z.ZodString;
430
434
  }, z.core.$strict>>;
431
435
  'kits/log-out': import("./acts.ts").KitActDeclaration<never, z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
@@ -440,9 +444,6 @@ export declare const KIT_DECLARATION: {
440
444
  }, z.core.$strict>>;
441
445
  }, z.core.$strict>;
442
446
  }, z.core.$strict>>;
443
- 'function-runs/credentials/issue': import("./acts.ts").KitActDeclaration<"run", z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
444
- credential: z.ZodString;
445
- }, z.core.$strict>>;
446
447
  };
447
448
  door: readonly ["rooms/discover", "room-chunks/list", "changes/enumerate", "files/revisions/list", "update"];
448
449
  changes: {
package/dist/wire.js CHANGED
@@ -49,7 +49,7 @@ export function kitWire(declaration) {
49
49
  .digest('hex')
50
50
  .slice(0, WIRE_HEX_LENGTH);
51
51
  }
52
- export const KIT_WIRE = '4fd16810492940d7';
52
+ export const KIT_WIRE = '4e80010c084812cf';
53
53
  export function kitWireRefusal(named) {
54
54
  if (typeof named !== 'string')
55
55
  return 'kit_declaration_invalid';
package/package.json CHANGED
@@ -34,5 +34,5 @@
34
34
  "url": "git+https://github.com/agentshouse/core.git",
35
35
  "directory": "kit-wire"
36
36
  },
37
- "version": "0.1.0-cc189684f4a10"
37
+ "version": "0.1.0-ce269f317b0cb"
38
38
  }