@anhlp/alp-protocol 0.0.1-beta.7 → 0.0.1-beta.9

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/src/rpc.ts CHANGED
@@ -58,6 +58,8 @@ export type ErrorReason =
58
58
  | 'outside' | 'changed'
59
59
  // workspace.git.status and workspace.git.diff (§12.5).
60
60
  | 'not_repository' | 'unknown_ref' | 'invalid_compare' | 'stale_snapshot' | 'git_unavailable' | 'git_failed'
61
+ // session.prompt: a Claude command ALP does not follow (t-e906).
62
+ | 'native_command_unsupported'
61
63
  // Attachments (§12.6).
62
64
  | 'invalid_name' | 'invalid_data' | 'attachment_too_large' | 'offset_mismatch' | 'chunk_conflict' | 'upload_incomplete'
63
65
  | 'hash_mismatch' | 'upload_expired' | 'quota_exceeded' | 'attachment_referenced' | 'attachment_limit'
@@ -305,7 +307,7 @@ export type RpcMethodMap = {
305
307
  'settings.language.get': { params: Empty; result: LanguageSetting };
306
308
  'settings.language.set': { params: { language: string | null }; result: LanguageSetting };
307
309
  /** Capability `schedule`: a one-shot continuation of a root session, due at `dueAt` (UTC, ISO 8601). */
308
- 'schedule.create': { params: { projectRoot: string; sessionId: string; dueAt: string; prompt: string }; result: { job: ScheduleJob } };
310
+ 'schedule.create': { params: { projectRoot: string; sessionId: string; dueAt: string; prompt: string; keepsSession?: boolean }; result: { job: ScheduleJob } };
309
311
  'schedule.list': { params: { projectRoot: string; status?: ScheduleStatus }; result: { jobs: ScheduleJob[] } };
310
312
  'schedule.get': { params: { id: string; projectRoot: string }; result: { job: ScheduleJob } };
311
313
  'schedule.cancel': { params: { id: string; projectRoot: string }; result: { job: ScheduleJob } };
package/src/wire.js CHANGED
@@ -98,6 +98,11 @@ export const TERMINAL = Object.freeze({
98
98
  });
99
99
  /** The TERMINAL limits a daemon.hello `terminalLimits` carries (the size bounds are fixed). */
100
100
  export const TERMINAL_LIMIT_KEYS = Object.freeze(['maxPerPrincipal', 'maxPerDaemon', 'maxInputBytes', 'maxOutputFrameBytes', 'replayBytes', 'idleMs', 'maxLifetimeMs', 'reconnectMs']);
101
+ /**
102
+ * An agent's name: lower-case letters, digits and single hyphens, starting with a letter, 1 to 64
103
+ * characters. One pattern for `principal.agent` in daemon.hello and a gateway credential's agent.
104
+ */
105
+ export const AGENT_NAME = /^[a-z](?:[a-z0-9]|-(?=[a-z0-9])){0,63}$/;
101
106
  /** An opaque terminal id (§12.10). @param {unknown} id */
102
107
  export const isTerminalId = id => typeof id === 'string' && /^term_[0-9a-f]{32}$/.test(id);
103
108
  /** Room an attachment.chunk request needs besides its base64 data. */