@leitwerk-dev/protocol 0.3.1 → 0.4.1

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 (52) hide show
  1. package/dist/{chunk-C7IMTOT4.js → chunk-6VYYJ4GN.js} +19 -2
  2. package/dist/chunk-6VYYJ4GN.js.map +1 -0
  3. package/dist/{chunk-LTIDCJFK.js → chunk-GOYGXRLL.js} +5 -1
  4. package/dist/chunk-GOYGXRLL.js.map +1 -0
  5. package/dist/config-snapshot.d.ts +4 -0
  6. package/dist/config-snapshot.d.ts.map +1 -1
  7. package/dist/dashboard-contracts.d.ts +111 -0
  8. package/dist/dashboard-contracts.d.ts.map +1 -0
  9. package/dist/execution-inspection.d.ts +178 -0
  10. package/dist/execution-inspection.d.ts.map +1 -0
  11. package/dist/form-contract.d.ts +10 -0
  12. package/dist/form-contract.d.ts.map +1 -1
  13. package/dist/{http-contracts-public-BiX2Og68.d.ts → http-contracts-DrTIVrNI.d.ts} +434 -7
  14. package/dist/http-contracts-public.d.ts +4 -1
  15. package/dist/http-contracts-public.d.ts.map +1 -1
  16. package/dist/http-contracts-public.js +6 -4
  17. package/dist/http-contracts.d.ts +82 -5
  18. package/dist/http-contracts.d.ts.map +1 -1
  19. package/dist/http-contracts.js +4 -2
  20. package/dist/index.d.ts +5 -3
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +267 -249
  23. package/dist/index.js.map +1 -1
  24. package/dist/live-turn-projection.d.ts +30 -37
  25. package/dist/live-turn-projection.d.ts.map +1 -1
  26. package/dist/protocol.d.ts +13 -0
  27. package/dist/protocol.d.ts.map +1 -1
  28. package/dist/protocol.js +1 -1
  29. package/dist/scoped-settings.d.ts +116 -0
  30. package/dist/scoped-settings.d.ts.map +1 -0
  31. package/dist/skill-pack.d.ts +66 -0
  32. package/dist/skill-pack.d.ts.map +1 -0
  33. package/dist/ticket-creation-contracts.d.ts +6 -0
  34. package/dist/ticket-creation-contracts.d.ts.map +1 -1
  35. package/package.json +2 -2
  36. package/src/config-snapshot.ts +4 -0
  37. package/src/dashboard-contracts.ts +111 -0
  38. package/src/execution-inspection.ts +204 -0
  39. package/src/form-contract.ts +10 -0
  40. package/src/http-contracts-public.ts +17 -0
  41. package/src/http-contracts.ts +98 -2
  42. package/src/index.ts +10 -6
  43. package/src/live-turn-projection.ts +177 -173
  44. package/src/protocol.ts +13 -0
  45. package/src/scoped-settings.ts +148 -0
  46. package/src/skill-pack.ts +93 -0
  47. package/src/ticket-creation-contracts.ts +6 -0
  48. package/dist/chunk-C7IMTOT4.js.map +0 -1
  49. package/dist/chunk-LTIDCJFK.js.map +0 -1
  50. package/dist/turn-trace-projection.d.ts +0 -5
  51. package/dist/turn-trace-projection.d.ts.map +0 -1
  52. package/src/turn-trace-projection.ts +0 -42
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  type Actor,
3
+ type AutomaticStartupRecoverySummary,
3
4
  type DurableModelSelection,
4
5
  type FutureExecutionBlockReason,
5
6
  type InstanceTurnConfigMap,
@@ -51,6 +52,7 @@ import {
51
52
  parseSchema,
52
53
  unknownRecordSchema,
53
54
  } from "./protocol.js";
55
+ import type { SkillRevisionProvenance } from "./skill-pack.js";
54
56
  import type { ToolCallRendererDefinition } from "./tool-renderer-contract.js";
55
57
  import type { UsageCostSnapshot, UsageTokenCounts } from "./usage-snapshot.js";
56
58
 
@@ -363,6 +365,13 @@ export interface ProcessSelectedTurnSummary {
363
365
  commentary: string | null;
364
366
  /** @internal */
365
367
  externalTriggers: ProcessExternalSourceSummary[];
368
+ /** Present while a server-side condition is holding this turn. @internal */
369
+ readiness?: {
370
+ /** @internal */
371
+ message: string | null;
372
+ /** @internal */
373
+ nextCheckAt: string | null;
374
+ };
366
375
  }
367
376
 
368
377
  /** @internal */
@@ -424,8 +433,36 @@ export interface ModelProviderOptionsResponseBody {
424
433
  choicesUnavailableReason: string | null;
425
434
  }
426
435
 
436
+ /** @internal */
437
+ export interface ProcessModelConfigPatch {
438
+ /** @internal */
439
+ defaultModelProfileId?: string | null;
440
+ /** @internal */
441
+ turnConfigs?: Record<
442
+ string,
443
+ {
444
+ /** @internal */
445
+ modelProfileId: string | null;
446
+ }
447
+ >;
448
+ }
449
+
450
+ /** @internal */
451
+ export interface ProcessModelConfigResponseBody {
452
+ /** @internal */
453
+ modelConfiguration: ProcessModelConfigurationView;
454
+ }
455
+
427
456
  /** @internal */
428
457
  export interface ProcessTurnModelConfigurationView {
458
+ /** A system-purpose model cannot be overridden per instance. @internal */
459
+ fixedModelProfileId?: string | null;
460
+ /** @internal */
461
+ effectiveModelProfileId?: string | null;
462
+ /** @internal */
463
+ effectiveSource?: ProcessActionModelResolutionSource;
464
+ /** @internal */
465
+ effectiveError?: string;
429
466
  /** @internal */
430
467
  turnId: string;
431
468
  /** @internal */
@@ -518,6 +555,10 @@ export type ProcessRunToolView = {
518
555
 
519
556
  /** @internal */
520
557
  export type ProcessRunTurnView = {
558
+ /** Current definition schema, not an execution snapshot. @internal */
559
+ definitionContract?: unknown;
560
+ /** @internal */
561
+ integrationToolNames?: readonly string[];
521
562
  /** @internal */
522
563
  turnId: string;
523
564
  /** @internal */
@@ -548,6 +589,8 @@ export type ProcessRunDetailsView = {
548
589
 
549
590
  /** @internal */
550
591
  export interface ProcessLaunchConfigurationParameterView {
592
+ /** Presentation-safe original value. @internal */
593
+ rawValue?: unknown;
551
594
  /** @internal */
552
595
  fieldId: string;
553
596
  /** @internal */
@@ -770,6 +813,8 @@ export interface LauncherTurnModelConfigPreview {
770
813
  description: string;
771
814
  /** @internal */
772
815
  effective: {
816
+ /** @internal */
817
+ error?: string;
773
818
  /** @internal */
774
819
  source: ProcessActionModelResolutionSource;
775
820
  /** @internal */
@@ -779,6 +824,10 @@ export interface LauncherTurnModelConfigPreview {
779
824
 
780
825
  /** @internal */
781
826
  export type LauncherModelConfigPreview = {
827
+ /** @internal */
828
+ settingsSubjectId?: string;
829
+ /** @internal */
830
+ settingsExplanations?: readonly string[];
782
831
  /** @internal */
783
832
  defaultModel: LauncherDefaultModelPreview;
784
833
  /** @internal */
@@ -917,10 +966,14 @@ export interface SkillCatalogItem {
917
966
  }
918
967
 
919
968
  /** @internal */
920
- export type SkillRegistrationKind = "configuration" | "catalog";
969
+ export type SkillRegistrationKind = "configuration" | "catalog" | "extension" | "bundled";
921
970
 
922
971
  /** @internal */
923
972
  export interface InstalledSkillCatalogItem {
973
+ /** @internal */
974
+ ownerExtensionId?: string | null;
975
+ /** @internal */
976
+ provenance?: SkillRevisionProvenance | null;
924
977
  /** @internal */
925
978
  id: string;
926
979
  /** @internal */
@@ -933,6 +986,8 @@ export interface InstalledSkillCatalogItem {
933
986
  activeSourceRevision: string | null;
934
987
  /** @internal */
935
988
  registrationKind: SkillRegistrationKind;
989
+ /** Owning extension for automatically available bundled skills. @internal */
990
+ sourceExtensionId?: string;
936
991
  /** @internal */
937
992
  sourceRepositoryId: string | null;
938
993
  /** @internal */
@@ -945,6 +1000,8 @@ export interface InstalledSkillCatalogItem {
945
1000
 
946
1001
  /** @internal */
947
1002
  export interface SkillRevisionSummary {
1003
+ /** @internal */
1004
+ provenance?: SkillRevisionProvenance | null;
948
1005
  /** @internal */
949
1006
  id: string;
950
1007
  /** @internal */
@@ -1322,6 +1379,11 @@ export interface ProcessExternalTriggerSignal {
1322
1379
 
1323
1380
  /** @internal */
1324
1381
  export interface ProcessTimelineSnapshot {
1382
+ /** Older retained turns are read in bounded pages. Missing means an unpaged snapshot. @internal */
1383
+ history?: {
1384
+ /** Cursor for the next older page; null when the beginning is reached. @internal */
1385
+ beforeTurnRecordId: string | null;
1386
+ };
1325
1387
  /** @internal */
1326
1388
  prompt: {
1327
1389
  /** @internal */
@@ -1369,6 +1431,8 @@ export interface CurrentTurnRecoverySummary extends CurrentErrorSummary {
1369
1431
 
1370
1432
  /** @internal */
1371
1433
  export interface StartupRecoverySummary extends CurrentErrorSummary {
1434
+ /** Automatic recovery policy for this current failed start. @internal */
1435
+ automaticRetry?: AutomaticStartupRecoverySummary;
1372
1436
  /** @internal */
1373
1437
  startRecordId: string;
1374
1438
  /** @internal */
@@ -1437,10 +1501,15 @@ export interface ProcessStartupSummary {
1437
1501
  }
1438
1502
 
1439
1503
  /** @internal */
1440
- export type CurrentProcessErrorSummary = CurrentErrorSummary;
1504
+ export interface CurrentProcessErrorSummary extends CurrentErrorSummary {
1505
+ /** Retry the waiting condition before starting an execution. @internal */
1506
+ canRetry?: boolean;
1507
+ }
1441
1508
 
1442
1509
  /** @internal */
1443
1510
  export interface ProcessUsageEstimateSnapshot {
1511
+ /** Totals cover the initial history page only. @internal */
1512
+ historyLimited?: boolean;
1444
1513
  /** @internal */
1445
1514
  usage: TurnUsageSnapshot;
1446
1515
  /** @internal */
@@ -1564,6 +1633,12 @@ export type InstanceTreeTurnResultState = "succeeded" | "failed" | "aborted" | "
1564
1633
 
1565
1634
  /** Redacted, semantic process history. Pi message/activity categories are never exposed. @internal */
1566
1635
  export interface InstanceTreeNodeSummary {
1636
+ /** @internal */
1637
+ turnId?: string;
1638
+ /** @internal */
1639
+ turnType?: ProcessTurnRecord["turnType"];
1640
+ /** @internal */
1641
+ origin?: import("./execution-inspection.js").ExecutionContextOrigin;
1567
1642
  /** @internal */
1568
1643
  id: string;
1569
1644
  /** @internal */
@@ -1692,6 +1767,12 @@ export type LauncherRecentValuesResponseBody = {
1692
1767
  values: Record<string, readonly string[]>;
1693
1768
  };
1694
1769
 
1770
+ /** @internal */
1771
+ export interface LauncherValidationResponseBody {
1772
+ /** Empty when the current launch request passes validation. @internal */
1773
+ errors: readonly LauncherValidationError[];
1774
+ }
1775
+
1695
1776
  /** @internal */
1696
1777
  export type LauncherModelConfigPreviewResponseBody = {
1697
1778
  /** @internal */
@@ -1863,6 +1944,7 @@ const futureLaunchPayloadInputSchema = v.object({
1863
1944
  "process_config_turn",
1864
1945
  "instance_default",
1865
1946
  "process_config_default",
1947
+ "scoped_purpose_default",
1866
1948
  "catalog_default",
1867
1949
  "legacy_persisted",
1868
1950
  ]),
@@ -2449,3 +2531,17 @@ export type {
2449
2531
  ApiTokensResponseBody,
2450
2532
  CreateApiTokenResponseBody,
2451
2533
  } from "./api-token-contracts.js";
2534
+ export type * from "./execution-inspection.js";
2535
+
2536
+ export type {
2537
+ NamedSelection,
2538
+ SettingChoice,
2539
+ SettingFieldView,
2540
+ SettingMetadata,
2541
+ SettingsOverviewResponse,
2542
+ SettingsPreview,
2543
+ SettingsScopeOverview,
2544
+ SettingsScopesResponse,
2545
+ } from "./scoped-settings.js";
2546
+
2547
+ export { settingSelectionValues } from "./scoped-settings.js";
package/src/index.ts CHANGED
@@ -9,6 +9,8 @@ export type {
9
9
  ConfigSnapshot,
10
10
  ModelProfileSnapshot,
11
11
  } from "./config-snapshot.js";
12
+ export type { DashboardConfigurationIssue, DashboardResponseBody } from "./dashboard-contracts.js";
13
+ export type * from "./execution-inspection.js";
12
14
  export type {
13
15
  BrowserUiExtensionDescriptor,
14
16
  LeafOutcomeRendererDescriptor,
@@ -96,14 +98,12 @@ export type {
96
98
  SkillOptionSummary,
97
99
  SkillSelection,
98
100
  } from "./launcher-contract.js";
99
- export type { MutableLiveTurnProjection } from "./live-turn-projection.js";
101
+ export type { LiveTurnProjection, TurnTraceProjection } from "./live-turn-projection.js";
100
102
  export {
101
- applyPiEventToLiveTurnProjection,
102
- buildLiveTurnProjectionFromEvents,
103
103
  buildPrimaryPathOperationalTraceItem,
104
- createMutableLiveTurnProjection,
104
+ createLiveTurnProjection,
105
105
  PRIMARY_PATH_OPERATIONAL_PI_EVENT_TYPES,
106
- snapshotLiveTurnProjection,
106
+ restoreTurnTraceProjection,
107
107
  } from "./live-turn-projection.js";
108
108
  export {
109
109
  extractPiSessionMessageText,
@@ -143,6 +143,11 @@ export {
143
143
  } from "./protocol.js";
144
144
  export type { ReadonlyEntryTree } from "./session-entry-tree.js";
145
145
  export { createReadonlyEntryTree } from "./session-entry-tree.js";
146
+ export {
147
+ parseSkillPackManifest,
148
+ type SkillPackManifest,
149
+ type SkillRevisionProvenance,
150
+ } from "./skill-pack.js";
146
151
  export { isStreamableEvent } from "./streamable-events.js";
147
152
  export { truncateTextPreview } from "./text-preview.js";
148
153
  export type {
@@ -165,7 +170,6 @@ export {
165
170
  resolveTurnContinuationLeafEntryId,
166
171
  resolveTurnContinuationUserPrompt,
167
172
  } from "./turn-continuation.js";
168
- export { snapshotTurnTrace } from "./turn-trace-projection.js";
169
173
  export { buildUsageSnapshotsByTurnRecordId } from "./usage-by-turn-record.js";
170
174
  export type { UsageCostSnapshot, UsageTokenCounts } from "./usage-snapshot.js";
171
175
  export {