@leitwerk-dev/protocol 0.3.1 → 0.4.0

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