arc-1 0.9.3 → 0.9.5

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.
Files changed (71) hide show
  1. package/README.md +4 -4
  2. package/dist/adt/client.d.ts +35 -1
  3. package/dist/adt/client.d.ts.map +1 -1
  4. package/dist/adt/client.js +194 -1
  5. package/dist/adt/client.js.map +1 -1
  6. package/dist/adt/devtools.d.ts.map +1 -1
  7. package/dist/adt/devtools.js +191 -51
  8. package/dist/adt/devtools.js.map +1 -1
  9. package/dist/adt/diagnostics.d.ts +21 -1
  10. package/dist/adt/diagnostics.d.ts.map +1 -1
  11. package/dist/adt/diagnostics.js +72 -0
  12. package/dist/adt/diagnostics.js.map +1 -1
  13. package/dist/adt/fm-signature.d.ts +77 -0
  14. package/dist/adt/fm-signature.d.ts.map +1 -0
  15. package/dist/adt/fm-signature.js +343 -0
  16. package/dist/adt/fm-signature.js.map +1 -0
  17. package/dist/adt/http.d.ts +9 -1
  18. package/dist/adt/http.d.ts.map +1 -1
  19. package/dist/adt/http.js +8 -7
  20. package/dist/adt/http.js.map +1 -1
  21. package/dist/adt/rap-generate.d.ts +110 -0
  22. package/dist/adt/rap-generate.d.ts.map +1 -0
  23. package/dist/adt/rap-generate.js +262 -0
  24. package/dist/adt/rap-generate.js.map +1 -0
  25. package/dist/adt/rap-handlers.d.ts +55 -0
  26. package/dist/adt/rap-handlers.d.ts.map +1 -1
  27. package/dist/adt/rap-handlers.js +119 -9
  28. package/dist/adt/rap-handlers.js.map +1 -1
  29. package/dist/adt/types.d.ts +81 -1
  30. package/dist/adt/types.d.ts.map +1 -1
  31. package/dist/adt/xml-parser.d.ts.map +1 -1
  32. package/dist/adt/xml-parser.js +14 -0
  33. package/dist/adt/xml-parser.js.map +1 -1
  34. package/dist/authz/policy.d.ts.map +1 -1
  35. package/dist/authz/policy.js +17 -0
  36. package/dist/authz/policy.js.map +1 -1
  37. package/dist/context/method-surgery.d.ts +27 -0
  38. package/dist/context/method-surgery.d.ts.map +1 -1
  39. package/dist/context/method-surgery.js +104 -7
  40. package/dist/context/method-surgery.js.map +1 -1
  41. package/dist/handlers/intent.d.ts.map +1 -1
  42. package/dist/handlers/intent.js +748 -80
  43. package/dist/handlers/intent.js.map +1 -1
  44. package/dist/handlers/schemas.d.ts +144 -28
  45. package/dist/handlers/schemas.d.ts.map +1 -1
  46. package/dist/handlers/schemas.js +182 -11
  47. package/dist/handlers/schemas.js.map +1 -1
  48. package/dist/handlers/tools.d.ts.map +1 -1
  49. package/dist/handlers/tools.js +155 -32
  50. package/dist/handlers/tools.js.map +1 -1
  51. package/dist/server/config.d.ts.map +1 -1
  52. package/dist/server/config.js +25 -8
  53. package/dist/server/config.js.map +1 -1
  54. package/dist/server/http.d.ts.map +1 -1
  55. package/dist/server/http.js +1 -0
  56. package/dist/server/http.js.map +1 -1
  57. package/dist/server/server.d.ts +1 -1
  58. package/dist/server/server.js +1 -1
  59. package/dist/server/stateless-client-store.d.ts +11 -3
  60. package/dist/server/stateless-client-store.d.ts.map +1 -1
  61. package/dist/server/stateless-client-store.js +39 -9
  62. package/dist/server/stateless-client-store.js.map +1 -1
  63. package/dist/server/types.d.ts +19 -5
  64. package/dist/server/types.d.ts.map +1 -1
  65. package/dist/server/types.js +1 -1
  66. package/dist/server/types.js.map +1 -1
  67. package/dist/server/xsuaa.d.ts +10 -1
  68. package/dist/server/xsuaa.d.ts.map +1 -1
  69. package/dist/server/xsuaa.js +38 -5
  70. package/dist/server/xsuaa.js.map +1 -1
  71. package/package.json +3 -3
@@ -10,32 +10,33 @@
10
10
  * (clients may send "100" as a string).
11
11
  */
12
12
  import { z } from 'zod';
13
+ export declare const SAPWRITE_CLAS_INCLUDES: readonly ["definitions", "implementations", "macros", "testclasses"];
13
14
  export declare const SAPReadSchema: z.ZodObject<{
14
15
  type: z.ZodEnum<{
15
16
  PROG: "PROG";
16
17
  CLAS: "CLAS";
17
18
  INTF: "INTF";
18
- FUNC: "FUNC";
19
19
  INCL: "INCL";
20
+ FUGR: "FUGR";
20
21
  DDLS: "DDLS";
21
22
  DCLS: "DCLS";
22
23
  BDEF: "BDEF";
23
24
  SRVD: "SRVD";
24
- DEVC: "DEVC";
25
- SRVB: "SRVB";
26
25
  DDLX: "DDLX";
27
- FUGR: "FUGR";
26
+ SRVB: "SRVB";
28
27
  TABL: "TABL";
29
- SKTD: "SKTD";
30
- VIEW: "VIEW";
31
28
  DOMA: "DOMA";
32
29
  DTEL: "DTEL";
30
+ MSAG: "MSAG";
31
+ DEVC: "DEVC";
33
32
  TRAN: "TRAN";
33
+ VIEW: "VIEW";
34
+ SKTD: "SKTD";
35
+ FUNC: "FUNC";
34
36
  TABLE_CONTENTS: "TABLE_CONTENTS";
35
37
  SOBJ: "SOBJ";
36
38
  SYSTEM: "SYSTEM";
37
39
  COMPONENTS: "COMPONENTS";
38
- MSAG: "MSAG";
39
40
  MESSAGES: "MESSAGES";
40
41
  TEXT_ELEMENTS: "TEXT_ELEMENTS";
41
42
  VARIANTS: "VARIANTS";
@@ -70,28 +71,29 @@ export declare const SAPReadSchema: z.ZodObject<{
70
71
  sqlFilter: z.ZodOptional<z.ZodString>;
71
72
  objectType: z.ZodOptional<z.ZodString>;
72
73
  versionUri: z.ZodOptional<z.ZodString>;
74
+ includeSignature: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
73
75
  }, z.core.$strip>;
74
76
  export declare const SAPReadSchemaBtp: z.ZodObject<{
75
77
  type: z.ZodEnum<{
76
78
  CLAS: "CLAS";
77
79
  INTF: "INTF";
78
- FUNC: "FUNC";
80
+ FUGR: "FUGR";
79
81
  DDLS: "DDLS";
80
82
  DCLS: "DCLS";
81
83
  BDEF: "BDEF";
82
84
  SRVD: "SRVD";
83
- DEVC: "DEVC";
84
- SRVB: "SRVB";
85
85
  DDLX: "DDLX";
86
- FUGR: "FUGR";
86
+ SRVB: "SRVB";
87
87
  TABL: "TABL";
88
- SKTD: "SKTD";
89
88
  DOMA: "DOMA";
90
89
  DTEL: "DTEL";
90
+ MSAG: "MSAG";
91
+ DEVC: "DEVC";
92
+ SKTD: "SKTD";
93
+ FUNC: "FUNC";
91
94
  TABLE_CONTENTS: "TABLE_CONTENTS";
92
95
  SYSTEM: "SYSTEM";
93
96
  COMPONENTS: "COMPONENTS";
94
- MSAG: "MSAG";
95
97
  MESSAGES: "MESSAGES";
96
98
  BSP: "BSP";
97
99
  BSP_DEPLOY: "BSP_DEPLOY";
@@ -117,20 +119,41 @@ export declare const SAPReadSchemaBtp: z.ZodObject<{
117
119
  sqlFilter: z.ZodOptional<z.ZodString>;
118
120
  objectType: z.ZodOptional<z.ZodString>;
119
121
  versionUri: z.ZodOptional<z.ZodString>;
122
+ includeSignature: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
120
123
  }, z.core.$strip>;
121
124
  export declare const SAPSearchSchema: z.ZodObject<{
122
- query: z.ZodString;
125
+ query: z.ZodOptional<z.ZodString>;
123
126
  maxResults: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
124
127
  searchType: z.ZodOptional<z.ZodEnum<{
125
128
  object: "object";
126
129
  source_code: "source_code";
130
+ tadir_lookup: "tadir_lookup";
127
131
  }>>;
128
132
  objectType: z.ZodOptional<z.ZodString>;
133
+ objectTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
129
134
  packageName: z.ZodOptional<z.ZodString>;
135
+ names: z.ZodOptional<z.ZodArray<z.ZodString>>;
136
+ source: z.ZodOptional<z.ZodEnum<{
137
+ adt: "adt";
138
+ db: "db";
139
+ both: "both";
140
+ }>>;
130
141
  }, z.core.$strip>;
131
142
  export declare const SAPSearchSchemaNoSource: z.ZodObject<{
132
- query: z.ZodString;
143
+ query: z.ZodOptional<z.ZodString>;
133
144
  maxResults: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
145
+ searchType: z.ZodOptional<z.ZodEnum<{
146
+ object: "object";
147
+ tadir_lookup: "tadir_lookup";
148
+ }>>;
149
+ objectType: z.ZodOptional<z.ZodString>;
150
+ objectTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
151
+ names: z.ZodOptional<z.ZodArray<z.ZodString>>;
152
+ source: z.ZodOptional<z.ZodEnum<{
153
+ adt: "adt";
154
+ db: "db";
155
+ both: "both";
156
+ }>>;
134
157
  }, z.core.$strip>;
135
158
  export declare const SAPQuerySchema: z.ZodObject<{
136
159
  sql: z.ZodString;
@@ -146,28 +169,35 @@ export declare const SAPWriteSchema: z.ZodObject<{
146
169
  edit_method: "edit_method";
147
170
  batch_create: "batch_create";
148
171
  scaffold_rap_handlers: "scaffold_rap_handlers";
172
+ generate_behavior_implementation: "generate_behavior_implementation";
149
173
  }>;
150
174
  type: z.ZodOptional<z.ZodEnum<{
151
175
  PROG: "PROG";
152
176
  CLAS: "CLAS";
153
177
  INTF: "INTF";
154
- FUNC: "FUNC";
155
178
  INCL: "INCL";
179
+ FUGR: "FUGR";
156
180
  DDLS: "DDLS";
157
181
  DCLS: "DCLS";
158
182
  BDEF: "BDEF";
159
183
  SRVD: "SRVD";
160
- SRVB: "SRVB";
161
184
  DDLX: "DDLX";
162
- FUGR: "FUGR";
185
+ SRVB: "SRVB";
163
186
  TABL: "TABL";
164
- SKTD: "SKTD";
165
187
  DOMA: "DOMA";
166
188
  DTEL: "DTEL";
167
189
  MSAG: "MSAG";
190
+ SKTD: "SKTD";
191
+ FUNC: "FUNC";
168
192
  }>>;
169
193
  name: z.ZodOptional<z.ZodString>;
170
194
  source: z.ZodOptional<z.ZodString>;
195
+ include: z.ZodOptional<z.ZodEnum<{
196
+ definitions: "definitions";
197
+ implementations: "implementations";
198
+ macros: "macros";
199
+ testclasses: "testclasses";
200
+ }>>;
171
201
  method: z.ZodOptional<z.ZodString>;
172
202
  description: z.ZodOptional<z.ZodString>;
173
203
  package: z.ZodOptional<z.ZodString>;
@@ -225,29 +255,49 @@ export declare const SAPWriteSchema: z.ZodObject<{
225
255
  bdefName: z.ZodOptional<z.ZodString>;
226
256
  autoApply: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
227
257
  targetAlias: z.ZodOptional<z.ZodString>;
258
+ activate: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
259
+ activateAtEnd: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
260
+ dryRun: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
261
+ parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
262
+ kind: z.ZodEnum<{
263
+ tables: "tables";
264
+ exceptions: "exceptions";
265
+ importing: "importing";
266
+ exporting: "exporting";
267
+ changing: "changing";
268
+ raising: "raising";
269
+ }>;
270
+ name: z.ZodString;
271
+ type: z.ZodOptional<z.ZodString>;
272
+ byValue: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
273
+ default: z.ZodOptional<z.ZodString>;
274
+ optional: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
275
+ }, z.core.$strip>>>;
228
276
  objects: z.ZodOptional<z.ZodArray<z.ZodObject<{
229
277
  type: z.ZodEnum<{
230
278
  PROG: "PROG";
231
279
  CLAS: "CLAS";
232
280
  INTF: "INTF";
233
- FUNC: "FUNC";
234
281
  INCL: "INCL";
282
+ FUGR: "FUGR";
235
283
  DDLS: "DDLS";
236
284
  DCLS: "DCLS";
237
285
  BDEF: "BDEF";
238
286
  SRVD: "SRVD";
239
- SRVB: "SRVB";
240
287
  DDLX: "DDLX";
241
- FUGR: "FUGR";
288
+ SRVB: "SRVB";
242
289
  TABL: "TABL";
243
- SKTD: "SKTD";
244
290
  DOMA: "DOMA";
245
291
  DTEL: "DTEL";
246
292
  MSAG: "MSAG";
293
+ SKTD: "SKTD";
294
+ FUNC: "FUNC";
247
295
  }>;
248
296
  name: z.ZodString;
249
297
  source: z.ZodOptional<z.ZodString>;
250
298
  description: z.ZodOptional<z.ZodString>;
299
+ package: z.ZodOptional<z.ZodString>;
300
+ transport: z.ZodOptional<z.ZodString>;
251
301
  dataType: z.ZodOptional<z.ZodString>;
252
302
  length: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
253
303
  decimals: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
@@ -291,6 +341,21 @@ export declare const SAPWriteSchema: z.ZodObject<{
291
341
  1: "1";
292
342
  }>>;
293
343
  version: z.ZodOptional<z.ZodString>;
344
+ parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
345
+ kind: z.ZodEnum<{
346
+ tables: "tables";
347
+ exceptions: "exceptions";
348
+ importing: "importing";
349
+ exporting: "exporting";
350
+ changing: "changing";
351
+ raising: "raising";
352
+ }>;
353
+ name: z.ZodString;
354
+ type: z.ZodOptional<z.ZodString>;
355
+ byValue: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
356
+ default: z.ZodOptional<z.ZodString>;
357
+ optional: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
358
+ }, z.core.$strip>>>;
294
359
  }, z.core.$strip>>>;
295
360
  }, z.core.$strip>;
296
361
  export declare const SAPWriteSchemaBtp: z.ZodObject<{
@@ -301,6 +366,7 @@ export declare const SAPWriteSchemaBtp: z.ZodObject<{
301
366
  edit_method: "edit_method";
302
367
  batch_create: "batch_create";
303
368
  scaffold_rap_handlers: "scaffold_rap_handlers";
369
+ generate_behavior_implementation: "generate_behavior_implementation";
304
370
  }>;
305
371
  type: z.ZodOptional<z.ZodEnum<{
306
372
  CLAS: "CLAS";
@@ -309,16 +375,22 @@ export declare const SAPWriteSchemaBtp: z.ZodObject<{
309
375
  DCLS: "DCLS";
310
376
  BDEF: "BDEF";
311
377
  SRVD: "SRVD";
312
- SRVB: "SRVB";
313
378
  DDLX: "DDLX";
379
+ SRVB: "SRVB";
314
380
  TABL: "TABL";
315
- SKTD: "SKTD";
316
381
  DOMA: "DOMA";
317
382
  DTEL: "DTEL";
318
383
  MSAG: "MSAG";
384
+ SKTD: "SKTD";
319
385
  }>>;
320
386
  name: z.ZodOptional<z.ZodString>;
321
387
  source: z.ZodOptional<z.ZodString>;
388
+ include: z.ZodOptional<z.ZodEnum<{
389
+ definitions: "definitions";
390
+ implementations: "implementations";
391
+ macros: "macros";
392
+ testclasses: "testclasses";
393
+ }>>;
322
394
  method: z.ZodOptional<z.ZodString>;
323
395
  description: z.ZodOptional<z.ZodString>;
324
396
  package: z.ZodOptional<z.ZodString>;
@@ -376,6 +448,24 @@ export declare const SAPWriteSchemaBtp: z.ZodObject<{
376
448
  bdefName: z.ZodOptional<z.ZodString>;
377
449
  autoApply: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
378
450
  targetAlias: z.ZodOptional<z.ZodString>;
451
+ activate: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
452
+ activateAtEnd: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
453
+ dryRun: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
454
+ parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
455
+ kind: z.ZodEnum<{
456
+ tables: "tables";
457
+ exceptions: "exceptions";
458
+ importing: "importing";
459
+ exporting: "exporting";
460
+ changing: "changing";
461
+ raising: "raising";
462
+ }>;
463
+ name: z.ZodString;
464
+ type: z.ZodOptional<z.ZodString>;
465
+ byValue: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
466
+ default: z.ZodOptional<z.ZodString>;
467
+ optional: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
468
+ }, z.core.$strip>>>;
379
469
  objects: z.ZodOptional<z.ZodArray<z.ZodObject<{
380
470
  type: z.ZodEnum<{
381
471
  CLAS: "CLAS";
@@ -384,17 +474,19 @@ export declare const SAPWriteSchemaBtp: z.ZodObject<{
384
474
  DCLS: "DCLS";
385
475
  BDEF: "BDEF";
386
476
  SRVD: "SRVD";
387
- SRVB: "SRVB";
388
477
  DDLX: "DDLX";
478
+ SRVB: "SRVB";
389
479
  TABL: "TABL";
390
- SKTD: "SKTD";
391
480
  DOMA: "DOMA";
392
481
  DTEL: "DTEL";
393
482
  MSAG: "MSAG";
483
+ SKTD: "SKTD";
394
484
  }>;
395
485
  name: z.ZodString;
396
486
  source: z.ZodOptional<z.ZodString>;
397
487
  description: z.ZodOptional<z.ZodString>;
488
+ package: z.ZodOptional<z.ZodString>;
489
+ transport: z.ZodOptional<z.ZodString>;
398
490
  dataType: z.ZodOptional<z.ZodString>;
399
491
  length: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
400
492
  decimals: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
@@ -438,6 +530,21 @@ export declare const SAPWriteSchemaBtp: z.ZodObject<{
438
530
  1: "1";
439
531
  }>>;
440
532
  version: z.ZodOptional<z.ZodString>;
533
+ parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
534
+ kind: z.ZodEnum<{
535
+ tables: "tables";
536
+ exceptions: "exceptions";
537
+ importing: "importing";
538
+ exporting: "exporting";
539
+ changing: "changing";
540
+ raising: "raising";
541
+ }>;
542
+ name: z.ZodString;
543
+ type: z.ZodOptional<z.ZodString>;
544
+ byValue: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
545
+ default: z.ZodOptional<z.ZodString>;
546
+ optional: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
547
+ }, z.core.$strip>>>;
441
548
  }, z.core.$strip>>>;
442
549
  }, z.core.$strip>;
443
550
  export declare const SAPActivateSchema: z.ZodObject<{
@@ -503,12 +610,14 @@ export declare const SAPDiagnoseSchema: z.ZodObject<{
503
610
  traces: "traces";
504
611
  system_messages: "system_messages";
505
612
  gateway_errors: "gateway_errors";
613
+ object_state: "object_state";
506
614
  quickfix: "quickfix";
507
615
  apply_quickfix: "apply_quickfix";
508
616
  }>;
509
617
  name: z.ZodOptional<z.ZodString>;
510
618
  type: z.ZodOptional<z.ZodString>;
511
619
  source: z.ZodOptional<z.ZodString>;
620
+ sourceUri: z.ZodOptional<z.ZodString>;
512
621
  line: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
513
622
  column: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
514
623
  version: z.ZodOptional<z.ZodEnum<{
@@ -517,6 +626,13 @@ export declare const SAPDiagnoseSchema: z.ZodObject<{
517
626
  }>>;
518
627
  proposalUri: z.ZodOptional<z.ZodString>;
519
628
  proposalUserContent: z.ZodOptional<z.ZodString>;
629
+ proposalAffectedObjects: z.ZodOptional<z.ZodArray<z.ZodObject<{
630
+ uri: z.ZodString;
631
+ type: z.ZodOptional<z.ZodString>;
632
+ name: z.ZodOptional<z.ZodString>;
633
+ description: z.ZodOptional<z.ZodString>;
634
+ content: z.ZodOptional<z.ZodString>;
635
+ }, z.core.$strip>>>;
520
636
  variant: z.ZodOptional<z.ZodString>;
521
637
  id: z.ZodOptional<z.ZodString>;
522
638
  detailUrl: z.ZodOptional<z.ZodString>;
@@ -609,8 +725,8 @@ export declare const SAPContextSchema: z.ZodObject<{
609
725
  PROG: "PROG";
610
726
  CLAS: "CLAS";
611
727
  INTF: "INTF";
612
- FUNC: "FUNC";
613
728
  DDLS: "DDLS";
729
+ FUNC: "FUNC";
614
730
  }>>;
615
731
  name: z.ZodString;
616
732
  source: z.ZodOptional<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/handlers/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA2JxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBsC,CAAC;AAEjE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiBmC,CAAC;AAIjE,eAAO,MAAM,eAAe;;;;;;;;;iBAM1B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;iBAGlC,CAAC;AAIH,eAAO,MAAM,cAAc;;;iBAGzB,CAAC;AAMH,eAAO,MAAM,qBAAqB,mJAkBxB,CAAC;AACX,eAAO,MAAM,kBAAkB,mHAcrB,CAAC;AAiFX,eAAO,MAAM,cAA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,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;iBAe5B,CAAC;AAIH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;iBAS5B,CAAC;AAIH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;iBAOxB,CAAC;AAYH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkC5B,CAAC;AAIH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;iBAW7B,CAAC;AAIH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4CvB,CAAC;AAgBH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;iBAW3B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;iBAU9B,CAAC;AAeH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmC1B,CAAC;AAIH,eAAO,MAAM,qBAAqB;;;;;iBAKhC,CAAC;AAIH;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,mBAAmB,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,OAAO,GAAG,SAAS,CA+BpH"}
@@ -85,6 +85,7 @@ const SAPREAD_TYPES_BTP = [
85
85
  ];
86
86
  const SAPREAD_CLAS_INCLUDES = ['main', 'testclasses', 'definitions', 'implementations', 'macros'];
87
87
  const SAPREAD_DDLS_INCLUDES = ['elements'];
88
+ export const SAPWRITE_CLAS_INCLUDES = ['definitions', 'implementations', 'macros', 'testclasses'];
88
89
  function validateSapReadInput(input, ctx) {
89
90
  if (input.include) {
90
91
  const include = input.include.toLowerCase();
@@ -164,6 +165,8 @@ export const SAPReadSchema = z
164
165
  sqlFilter: z.string().optional(),
165
166
  objectType: z.string().optional(),
166
167
  versionUri: z.string().optional(),
168
+ /** For type=FUNC: when true, response is JSON {source, signature: {importing, exporting, ...}}. */
169
+ includeSignature: z.coerce.boolean().optional(),
167
170
  })
168
171
  .superRefine((input, ctx) => validateSapReadInput(input, ctx));
169
172
  export const SAPReadSchemaBtp = z
@@ -182,19 +185,85 @@ export const SAPReadSchemaBtp = z
182
185
  sqlFilter: z.string().optional(),
183
186
  objectType: z.string().optional(),
184
187
  versionUri: z.string().optional(),
188
+ /** For type=FUNC: when true, response is JSON {source, signature: {importing, exporting, ...}}. */
189
+ includeSignature: z.coerce.boolean().optional(),
185
190
  })
186
191
  .superRefine((input, ctx) => validateSapReadInput(input, ctx));
187
192
  // ─── SAPSearch ──────────────────────────────────────────────────────
188
- export const SAPSearchSchema = z.object({
189
- query: z.string(),
193
+ export const SAPSearchSchema = z
194
+ .object({
195
+ query: z.string().optional(),
190
196
  maxResults: z.coerce.number().optional(),
191
- searchType: z.enum(['object', 'source_code']).optional(),
197
+ searchType: z.enum(['object', 'source_code', 'tadir_lookup']).optional(),
192
198
  objectType: z.string().optional(),
199
+ objectTypes: z.array(z.string()).optional(),
193
200
  packageName: z.string().optional(),
201
+ names: z.array(z.string()).optional(),
202
+ source: z
203
+ .enum(['adt', 'db', 'both'])
204
+ .optional()
205
+ .describe('tadir_lookup data source: "adt" (default) uses the ADT info-system endpoint (workbench-visible only); ' +
206
+ '"db" issues SQL against TADIR (also sees orphan "ghost" rows; requires sql scope and SAP_ALLOW_FREE_SQL=true); ' +
207
+ '"both" runs both and reports divergence via a splitBrain array (requires sql scope).'),
208
+ })
209
+ .superRefine((input, ctx) => {
210
+ const searchType = input.searchType ?? 'object';
211
+ if (searchType === 'tadir_lookup') {
212
+ const hasNames = Array.isArray(input.names) && input.names.some((n) => n.trim());
213
+ const hasQuery = typeof input.query === 'string' && input.query.trim().length > 0;
214
+ if (!hasNames && !hasQuery) {
215
+ ctx.addIssue({
216
+ code: 'custom',
217
+ path: ['names'],
218
+ message: 'tadir_lookup requires either names[] or query.',
219
+ });
220
+ }
221
+ return;
222
+ }
223
+ if (!input.query || input.query.trim().length === 0) {
224
+ ctx.addIssue({
225
+ code: 'custom',
226
+ path: ['query'],
227
+ message: `${searchType} search requires query.`,
228
+ });
229
+ }
194
230
  });
195
- export const SAPSearchSchemaNoSource = z.object({
196
- query: z.string(),
231
+ export const SAPSearchSchemaNoSource = z
232
+ .object({
233
+ query: z.string().optional(),
197
234
  maxResults: z.coerce.number().optional(),
235
+ searchType: z.enum(['object', 'tadir_lookup']).optional(),
236
+ objectType: z.string().optional(),
237
+ objectTypes: z.array(z.string()).optional(),
238
+ names: z.array(z.string()).optional(),
239
+ source: z
240
+ .enum(['adt', 'db', 'both'])
241
+ .optional()
242
+ .describe('tadir_lookup data source: "adt" (default) uses the ADT info-system endpoint (workbench-visible only); ' +
243
+ '"db" issues SQL against TADIR (also sees orphan "ghost" rows; requires sql scope and SAP_ALLOW_FREE_SQL=true); ' +
244
+ '"both" runs both and reports divergence via a splitBrain array (requires sql scope).'),
245
+ })
246
+ .superRefine((input, ctx) => {
247
+ const searchType = input.searchType ?? 'object';
248
+ if (searchType === 'tadir_lookup') {
249
+ const hasNames = Array.isArray(input.names) && input.names.some((n) => n.trim());
250
+ const hasQuery = typeof input.query === 'string' && input.query.trim().length > 0;
251
+ if (!hasNames && !hasQuery) {
252
+ ctx.addIssue({
253
+ code: 'custom',
254
+ path: ['names'],
255
+ message: 'tadir_lookup requires either names[] or query.',
256
+ });
257
+ }
258
+ return;
259
+ }
260
+ if (!input.query || input.query.trim().length === 0) {
261
+ ctx.addIssue({
262
+ code: 'custom',
263
+ path: ['query'],
264
+ message: 'object search requires query.',
265
+ });
266
+ }
198
267
  });
199
268
  // ─── SAPQuery ───────────────────────────────────────────────────────
200
269
  export const SAPQuerySchema = z.object({
@@ -247,11 +316,50 @@ const messageClassMessageSchema = z.object({
247
316
  number: z.string(),
248
317
  shortText: z.string(),
249
318
  });
319
+ function validateSapWriteInput(input, ctx) {
320
+ if (!input.include)
321
+ return;
322
+ // `edit_method` joins `update` as a valid action for include= so callers can
323
+ // surgically edit a method inside a class-local include (CCDEF/CCIMP/macros/
324
+ // testclasses). The handler in intent.ts also auto-detects the right include
325
+ // from `lhc_*~method` style specifiers, but explicit override remains valid.
326
+ if (input.action !== 'update' && input.action !== 'edit_method') {
327
+ ctx.addIssue({
328
+ code: 'custom',
329
+ path: ['include'],
330
+ message: 'SAPWrite include is only supported for action="update" or action="edit_method".',
331
+ });
332
+ }
333
+ if (input.type !== 'CLAS') {
334
+ ctx.addIssue({
335
+ code: 'custom',
336
+ path: ['include'],
337
+ message: 'SAPWrite include is only supported for type="CLAS".',
338
+ });
339
+ }
340
+ }
341
+ // FM signature parameter (issue #252). One entry per IMPORTING/EXPORTING/CHANGING/
342
+ // TABLES/EXCEPTIONS/RAISING line in the FUNCTION signature region. ARC-1 builds
343
+ // the ABAP source from this array; SAP's own signature lives inline in /source/main.
344
+ const fmParameterSchema = z.object({
345
+ kind: z.enum(['importing', 'exporting', 'changing', 'tables', 'exceptions', 'raising']),
346
+ name: z.string(),
347
+ /** ABAP type expression. Required for IMPORTING/EXPORTING/CHANGING/TABLES; ignored for EXCEPTIONS/RAISING. */
348
+ type: z.string().optional(),
349
+ /** Emit `VALUE(name)` wrapper. Default false (pass-by-reference). */
350
+ byValue: z.coerce.boolean().optional(),
351
+ /** Raw ABAP literal — IMPORTING/CHANGING only. Emitted verbatim. */
352
+ default: z.string().optional(),
353
+ /** Emit `OPTIONAL` keyword. */
354
+ optional: z.coerce.boolean().optional(),
355
+ });
250
356
  const batchObjectSchemaOnprem = z.object({
251
357
  type: z.enum(SAPWRITE_TYPES_ONPREM),
252
358
  name: z.string(),
253
359
  source: z.string().optional(),
254
360
  description: z.string().optional(),
361
+ package: z.string().optional(),
362
+ transport: z.string().optional(),
255
363
  dataType: z.string().optional(),
256
364
  length: z.coerce.number().optional(),
257
365
  decimals: z.coerce.number().optional(),
@@ -279,12 +387,16 @@ const batchObjectSchemaOnprem = z.object({
279
387
  odataVersion: z.enum(['V2', 'V4']).optional(),
280
388
  category: z.enum(['0', '1']).optional(),
281
389
  version: z.string().optional(),
390
+ /** FUNC structured signature parameters (issue #252). */
391
+ parameters: z.array(fmParameterSchema).optional(),
282
392
  });
283
393
  const batchObjectSchemaBtp = z.object({
284
394
  type: z.enum(SAPWRITE_TYPES_BTP),
285
395
  name: z.string(),
286
396
  source: z.string().optional(),
287
397
  description: z.string().optional(),
398
+ package: z.string().optional(),
399
+ transport: z.string().optional(),
288
400
  dataType: z.string().optional(),
289
401
  length: z.coerce.number().optional(),
290
402
  decimals: z.coerce.number().optional(),
@@ -312,12 +424,24 @@ const batchObjectSchemaBtp = z.object({
312
424
  odataVersion: z.enum(['V2', 'V4']).optional(),
313
425
  category: z.enum(['0', '1']).optional(),
314
426
  version: z.string().optional(),
427
+ /** FUNC structured signature parameters (issue #252). */
428
+ parameters: z.array(fmParameterSchema).optional(),
315
429
  });
316
- export const SAPWriteSchema = z.object({
317
- action: z.enum(['create', 'update', 'delete', 'edit_method', 'batch_create', 'scaffold_rap_handlers']),
430
+ export const SAPWriteSchema = z
431
+ .object({
432
+ action: z.enum([
433
+ 'create',
434
+ 'update',
435
+ 'delete',
436
+ 'edit_method',
437
+ 'batch_create',
438
+ 'scaffold_rap_handlers',
439
+ 'generate_behavior_implementation',
440
+ ]),
318
441
  type: z.enum(SAPWRITE_TYPES_ONPREM).optional(),
319
442
  name: z.string().optional(),
320
443
  source: z.string().optional(),
444
+ include: z.enum(SAPWRITE_CLAS_INCLUDES).optional(),
321
445
  method: z.string().optional(),
322
446
  description: z.string().optional(),
323
447
  package: z.string().optional(),
@@ -361,13 +485,40 @@ export const SAPWriteSchema = z.object({
361
485
  bdefName: z.string().optional(),
362
486
  autoApply: z.coerce.boolean().optional(),
363
487
  targetAlias: z.string().optional(),
488
+ activate: z.coerce.boolean().optional(),
489
+ /** Applies only to action='batch_create'. Default `false` keeps the existing per-object inline
490
+ * activation (each object is created → source written → activated, in sequence). When `true`,
491
+ * ARC-1 writes inactive drafts for every object then issues a single terminal `activateBatch`
492
+ * once the whole batch has been written. Use this for interdependent objects where parent →
493
+ * child cross-references would fail per-object activation (e.g. composition-linked DDLS,
494
+ * RAP behavior stacks where a BDEF references a not-yet-active SRVD). Has no effect on other
495
+ * actions. Partial-failure semantics are unchanged: a write-phase failure still breaks the
496
+ * loop and only the already-written subset is batch-activated. */
497
+ activateAtEnd: z.coerce.boolean().optional(),
498
+ dryRun: z.coerce.boolean().optional(),
499
+ /** FUNC structured signature parameters (issue #252). When provided, ARC-1 builds the
500
+ * IMPORTING/EXPORTING/CHANGING/TABLES/EXCEPTIONS/RAISING clause from the array and
501
+ * splices it into the FM source body. Backward-compatible: when omitted, the existing
502
+ * source-only path runs unchanged. */
503
+ parameters: z.array(fmParameterSchema).optional(),
364
504
  objects: z.array(batchObjectSchemaOnprem).optional(),
365
- });
366
- export const SAPWriteSchemaBtp = z.object({
367
- action: z.enum(['create', 'update', 'delete', 'edit_method', 'batch_create', 'scaffold_rap_handlers']),
505
+ })
506
+ .superRefine((input, ctx) => validateSapWriteInput(input, ctx));
507
+ export const SAPWriteSchemaBtp = z
508
+ .object({
509
+ action: z.enum([
510
+ 'create',
511
+ 'update',
512
+ 'delete',
513
+ 'edit_method',
514
+ 'batch_create',
515
+ 'scaffold_rap_handlers',
516
+ 'generate_behavior_implementation',
517
+ ]),
368
518
  type: z.enum(SAPWRITE_TYPES_BTP).optional(),
369
519
  name: z.string().optional(),
370
520
  source: z.string().optional(),
521
+ include: z.enum(SAPWRITE_CLAS_INCLUDES).optional(),
371
522
  method: z.string().optional(),
372
523
  description: z.string().optional(),
373
524
  package: z.string().optional(),
@@ -410,8 +561,18 @@ export const SAPWriteSchemaBtp = z.object({
410
561
  bdefName: z.string().optional(),
411
562
  autoApply: z.coerce.boolean().optional(),
412
563
  targetAlias: z.string().optional(),
564
+ activate: z.coerce.boolean().optional(),
565
+ /** Applies only to action='batch_create'. Default `false` keeps per-object inline activation;
566
+ * `true` defers to a single terminal `activateBatch` so SAP resolves cross-references in one
567
+ * pass. See SAPWriteSchema (on-prem) for the full contract. */
568
+ activateAtEnd: z.coerce.boolean().optional(),
569
+ dryRun: z.coerce.boolean().optional(),
570
+ /** FUNC structured signature parameters — same shape as on-prem. Harmless on BTP since FUNC write
571
+ * is on-prem-only. */
572
+ parameters: z.array(fmParameterSchema).optional(),
413
573
  objects: z.array(batchObjectSchemaBtp).optional(),
414
- });
574
+ })
575
+ .superRefine((input, ctx) => validateSapWriteInput(input, ctx));
415
576
  // ─── SAPActivate ────────────────────────────────────────────────────
416
577
  export const SAPActivateSchema = z.object({
417
578
  action: z.enum(['activate', 'publish_srvb', 'unpublish_srvb']).optional(),
@@ -448,6 +609,13 @@ export const SAPLintSchema = z.object({
448
609
  rules: z.record(z.string(), z.any()).optional(),
449
610
  });
450
611
  // ─── SAPDiagnose ────────────────────────────────────────────────────
612
+ const QuickfixAffectedObjectSchema = z.object({
613
+ uri: z.string(),
614
+ type: z.string().optional(),
615
+ name: z.string().optional(),
616
+ description: z.string().optional(),
617
+ content: z.string().optional(),
618
+ });
451
619
  export const SAPDiagnoseSchema = z.object({
452
620
  action: z.enum([
453
621
  'syntax',
@@ -457,17 +625,20 @@ export const SAPDiagnoseSchema = z.object({
457
625
  'traces',
458
626
  'system_messages',
459
627
  'gateway_errors',
628
+ 'object_state',
460
629
  'quickfix',
461
630
  'apply_quickfix',
462
631
  ]),
463
632
  name: z.string().optional(),
464
633
  type: z.string().optional(),
465
634
  source: z.string().optional(),
635
+ sourceUri: z.string().optional(),
466
636
  line: z.coerce.number().optional(),
467
637
  column: z.coerce.number().optional(),
468
638
  version: z.enum(['active', 'inactive']).optional(),
469
639
  proposalUri: z.string().optional(),
470
640
  proposalUserContent: z.string().optional(),
641
+ proposalAffectedObjects: z.array(QuickfixAffectedObjectSchema).optional(),
471
642
  variant: z.string().optional(),
472
643
  id: z.string().optional(),
473
644
  detailUrl: z.string().optional(),