@myagentroam/protocol 0.9.96 → 0.9.98

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/index.d.ts CHANGED
@@ -6223,20 +6223,20 @@ export declare const nodeWorkbenchCapabilitiesSchema: z.ZodObject<{
6223
6223
  export type NodeWorkbenchCapabilities = z.infer<typeof nodeWorkbenchCapabilitiesSchema>;
6224
6224
  export declare const sessionRuntimeCapabilitySchema: z.ZodEnum<["history.read", "events.live", "turn.start", "turn.queue", "turn.interrupt", "run.cancel", "approval.respond", "user-input.respond", "session.rename", "session.rewind", "session.rollback", "session.remove", "session.pin"]>;
6225
6225
  export declare const sessionRuntimeCapabilitiesSchema: z.ZodObject<{
6226
- level: z.ZodEnum<["MANAGED", "SHARED_CONTROL", "OBSERVE_ONLY", "RESUMABLE", "UNAVAILABLE"]>;
6226
+ level: z.ZodLiteral<"MANAGED">;
6227
6227
  capabilities: z.ZodArray<z.ZodEnum<["history.read", "events.live", "turn.start", "turn.queue", "turn.interrupt", "run.cancel", "approval.respond", "user-input.respond", "session.rename", "session.rewind", "session.rollback", "session.remove", "session.pin"]>, "many">;
6228
6228
  reasonCode: z.ZodNullable<z.ZodString>;
6229
6229
  }, "strip", z.ZodTypeAny, {
6230
6230
  reasonCode: string | null;
6231
6231
  capabilities: ("history.read" | "events.live" | "turn.start" | "turn.queue" | "turn.interrupt" | "run.cancel" | "approval.respond" | "user-input.respond" | "session.rename" | "session.rewind" | "session.rollback" | "session.remove" | "session.pin")[];
6232
- level: "UNAVAILABLE" | "MANAGED" | "SHARED_CONTROL" | "OBSERVE_ONLY" | "RESUMABLE";
6232
+ level: "MANAGED";
6233
6233
  }, {
6234
6234
  reasonCode: string | null;
6235
6235
  capabilities: ("history.read" | "events.live" | "turn.start" | "turn.queue" | "turn.interrupt" | "run.cancel" | "approval.respond" | "user-input.respond" | "session.rename" | "session.rewind" | "session.rollback" | "session.remove" | "session.pin")[];
6236
- level: "UNAVAILABLE" | "MANAGED" | "SHARED_CONTROL" | "OBSERVE_ONLY" | "RESUMABLE";
6236
+ level: "MANAGED";
6237
6237
  }>;
6238
6238
  export type SessionRuntimeCapabilities = z.infer<typeof sessionRuntimeCapabilitiesSchema>;
6239
- export declare const sessionActivityStateSchema: z.ZodEnum<["MANAGED_ACTIVE", "EXTERNAL_ACTIVE", "IDLE", "UNAVAILABLE"]>;
6239
+ export declare const sessionActivityStateSchema: z.ZodEnum<["MANAGED_ACTIVE", "IDLE"]>;
6240
6240
  export type SessionActivityState = z.infer<typeof sessionActivityStateSchema>;
6241
6241
  export declare const eventCursorSchema: z.ZodObject<{
6242
6242
  scope: z.ZodEnum<["RUN", "SESSION", "WORKSPACE_ACTIVITY"]>;
@@ -24600,6 +24600,84 @@ export declare const workspaceContentSearchSchema: z.ZodObject<{
24600
24600
  }>;
24601
24601
  export type WorkspaceContentMatch = z.infer<typeof workspaceContentMatchSchema>;
24602
24602
  export type WorkspaceContentSearch = z.infer<typeof workspaceContentSearchSchema>;
24603
+ export declare const workspaceFileReferenceSourceContextSchema: z.ZodObject<{
24604
+ text: z.ZodEffects<z.ZodString, string, string>;
24605
+ position: z.ZodNumber;
24606
+ }, "strict", z.ZodTypeAny, {
24607
+ text: string;
24608
+ position: number;
24609
+ }, {
24610
+ text: string;
24611
+ position: number;
24612
+ }>;
24613
+ export declare const workspaceFileReferenceSchema: z.ZodEffects<z.ZodObject<{
24614
+ languageId: z.ZodString;
24615
+ extractorId: z.ZodString;
24616
+ kind: z.ZodEnum<["relative-file", "module", "namespace", "include"]>;
24617
+ anchor: z.ZodOptional<z.ZodString>;
24618
+ value: z.ZodString;
24619
+ from: z.ZodNumber;
24620
+ to: z.ZodNumber;
24621
+ sourceContext: z.ZodObject<{
24622
+ text: z.ZodEffects<z.ZodString, string, string>;
24623
+ position: z.ZodNumber;
24624
+ }, "strict", z.ZodTypeAny, {
24625
+ text: string;
24626
+ position: number;
24627
+ }, {
24628
+ text: string;
24629
+ position: number;
24630
+ }>;
24631
+ }, "strict", z.ZodTypeAny, {
24632
+ value: string;
24633
+ kind: "namespace" | "relative-file" | "module" | "include";
24634
+ languageId: string;
24635
+ extractorId: string;
24636
+ from: number;
24637
+ to: number;
24638
+ sourceContext: {
24639
+ text: string;
24640
+ position: number;
24641
+ };
24642
+ anchor?: string | undefined;
24643
+ }, {
24644
+ value: string;
24645
+ kind: "namespace" | "relative-file" | "module" | "include";
24646
+ languageId: string;
24647
+ extractorId: string;
24648
+ from: number;
24649
+ to: number;
24650
+ sourceContext: {
24651
+ text: string;
24652
+ position: number;
24653
+ };
24654
+ anchor?: string | undefined;
24655
+ }>, {
24656
+ value: string;
24657
+ kind: "namespace" | "relative-file" | "module" | "include";
24658
+ languageId: string;
24659
+ extractorId: string;
24660
+ from: number;
24661
+ to: number;
24662
+ sourceContext: {
24663
+ text: string;
24664
+ position: number;
24665
+ };
24666
+ anchor?: string | undefined;
24667
+ }, {
24668
+ value: string;
24669
+ kind: "namespace" | "relative-file" | "module" | "include";
24670
+ languageId: string;
24671
+ extractorId: string;
24672
+ from: number;
24673
+ to: number;
24674
+ sourceContext: {
24675
+ text: string;
24676
+ position: number;
24677
+ };
24678
+ anchor?: string | undefined;
24679
+ }>;
24680
+ export type WorkspaceFileReference = z.infer<typeof workspaceFileReferenceSchema>;
24603
24681
  export declare const workspaceSymbolDefinitionTargetSchema: z.ZodObject<{
24604
24682
  path: z.ZodString;
24605
24683
  line: z.ZodNumber;
package/dist/index.js CHANGED
@@ -1378,16 +1378,11 @@ export const sessionRuntimeCapabilitySchema = z.enum([
1378
1378
  'session.pin'
1379
1379
  ]);
1380
1380
  export const sessionRuntimeCapabilitiesSchema = z.object({
1381
- level: z.enum(['MANAGED', 'SHARED_CONTROL', 'OBSERVE_ONLY', 'RESUMABLE', 'UNAVAILABLE']),
1381
+ level: z.literal('MANAGED'),
1382
1382
  capabilities: z.array(sessionRuntimeCapabilitySchema),
1383
1383
  reasonCode: z.string().min(1).max(80).nullable()
1384
1384
  });
1385
- export const sessionActivityStateSchema = z.enum([
1386
- 'MANAGED_ACTIVE',
1387
- 'EXTERNAL_ACTIVE',
1388
- 'IDLE',
1389
- 'UNAVAILABLE'
1390
- ]);
1385
+ export const sessionActivityStateSchema = z.enum(['MANAGED_ACTIVE', 'IDLE']);
1391
1386
  export const eventCursorSchema = z.object({
1392
1387
  scope: z.enum(['RUN', 'SESSION', 'WORKSPACE_ACTIVITY']),
1393
1388
  streamId: z.string().min(1).max(128),
@@ -2390,6 +2385,36 @@ export const workspaceContentSearchSchema = z.object({
2390
2385
  truncated: z.boolean(),
2391
2386
  skippedFiles: z.number().int().nonnegative()
2392
2387
  });
2388
+ export const workspaceFileReferenceSourceContextSchema = z
2389
+ .object({
2390
+ text: z
2391
+ .string()
2392
+ .min(1)
2393
+ .refine((value) => utf8ByteLength(value) <= 8 * 1024),
2394
+ position: z.number().int().nonnegative()
2395
+ })
2396
+ .strict();
2397
+ export const workspaceFileReferenceSchema = z
2398
+ .object({
2399
+ languageId: z.string().regex(/^[a-z][a-z0-9-]{0,63}$/u),
2400
+ extractorId: z.string().regex(/^[a-z][a-z0-9.-]{0,127}$/u),
2401
+ kind: z.enum(['relative-file', 'module', 'namespace', 'include']),
2402
+ anchor: z.string().min(1).max(1024).optional(),
2403
+ value: z.string().min(1).max(1024),
2404
+ from: z
2405
+ .number()
2406
+ .int()
2407
+ .nonnegative()
2408
+ .max(4 * 1024 * 1024),
2409
+ to: z
2410
+ .number()
2411
+ .int()
2412
+ .positive()
2413
+ .max(4 * 1024 * 1024),
2414
+ sourceContext: workspaceFileReferenceSourceContextSchema
2415
+ })
2416
+ .strict()
2417
+ .refine((reference) => reference.to > reference.from);
2393
2418
  export const workspaceSymbolDefinitionTargetSchema = z.object({
2394
2419
  path: z.string().min(1).max(4096),
2395
2420
  line: z.number().int().positive(),
@@ -2720,6 +2745,9 @@ const FIXED_PUBLIC_ERROR_MESSAGES = {
2720
2745
  GIT_CREDENTIAL_CONTEXT_EXPIRED: 'This Git credential context has expired. Start a new terminal or Agent execution.',
2721
2746
  GIT_CREDENTIAL_DIRECTORY_INVALID: 'A private directory for Git keys could not be secured on this Node.',
2722
2747
  TERMINAL_GIT_OWNER_REQUIRED: 'This terminal uses another user’s Git credentials. Open your own terminal.',
2748
+ EXTERNAL_SESSION_ACTIVE: 'This native session is currently active in another client. Try again later.',
2749
+ RUNNER_RESUME_FAILED: 'The native session could not be activated. Try again later.',
2750
+ SESSION_ACTIVATION_REQUIRED: 'Send a regular message before using this session command.',
2723
2751
  GIT_ENVIRONMENT_INVALID: 'The existing Git process configuration is invalid or exceeds its supported size.',
2724
2752
  INTERNAL_ERROR: 'An internal error occurred.',
2725
2753
  UNAUTHENTICATED: 'Authentication is required.',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/protocol",
3
- "version": "0.9.96",
3
+ "version": "0.9.98",
4
4
  "description": "Shared runtime protocol schemas for MyAgentRoam.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",