@opensteer/protocol 0.7.1 → 0.7.3

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.cjs CHANGED
@@ -814,14 +814,10 @@ var networkRecordSchema = objectSchema(
814
814
  ]
815
815
  }
816
816
  );
817
- var networkQuerySourceSchema = enumSchema(["live", "saved"], {
818
- title: "NetworkQuerySource"
819
- });
820
817
  var networkQueryRecordSchema = objectSchema(
821
818
  {
822
819
  recordId: stringSchema({ minLength: 1 }),
823
- source: networkQuerySourceSchema,
824
- actionId: stringSchema({ minLength: 1 }),
820
+ capture: stringSchema({ minLength: 1 }),
825
821
  tags: arraySchema(stringSchema({ minLength: 1 }), {
826
822
  uniqueItems: true
827
823
  }),
@@ -830,7 +826,7 @@ var networkQueryRecordSchema = objectSchema(
830
826
  },
831
827
  {
832
828
  title: "NetworkQueryRecord",
833
- required: ["recordId", "source", "record"]
829
+ required: ["recordId", "record"]
834
830
  }
835
831
  );
836
832
  var orderedHeadersSchema = arraySchema(headerEntrySchema, {
@@ -1303,8 +1299,7 @@ var opensteerRecipeStepSchema = oneOfSchema(
1303
1299
  objectSchema(
1304
1300
  {
1305
1301
  kind: enumSchema(["goto"]),
1306
- url: stringSchema({ minLength: 1 }),
1307
- networkTag: stringSchema({ minLength: 1 })
1302
+ url: stringSchema({ minLength: 1 })
1308
1303
  },
1309
1304
  {
1310
1305
  title: "OpensteerAuthRecipeGotoStep",
@@ -1313,8 +1308,7 @@ var opensteerRecipeStepSchema = oneOfSchema(
1313
1308
  ),
1314
1309
  objectSchema(
1315
1310
  {
1316
- kind: enumSchema(["reload"]),
1317
- networkTag: stringSchema({ minLength: 1 })
1311
+ kind: enumSchema(["reload"])
1318
1312
  },
1319
1313
  {
1320
1314
  title: "OpensteerAuthRecipeReloadStep",
@@ -1530,13 +1524,10 @@ var opensteerRecipeRecordSchema = objectSchema(
1530
1524
  var opensteerAuthRecipeRecordSchema = opensteerRecipeRecordSchema;
1531
1525
  var opensteerNetworkQueryInputSchema = objectSchema(
1532
1526
  {
1533
- source: enumSchema(["live", "saved"], {
1534
- title: "OpensteerNetworkQuerySource"
1535
- }),
1536
1527
  pageRef: pageRefSchema,
1537
1528
  recordId: stringSchema({ minLength: 1 }),
1538
1529
  requestId: stringSchema({ minLength: 1 }),
1539
- actionId: stringSchema({ minLength: 1 }),
1530
+ capture: stringSchema({ minLength: 1 }),
1540
1531
  tag: stringSchema({ minLength: 1 }),
1541
1532
  url: stringSchema({ minLength: 1 }),
1542
1533
  hostname: stringSchema({ minLength: 1 }),
@@ -1560,12 +1551,12 @@ var opensteerNetworkQueryOutputSchema = objectSchema(
1560
1551
  required: ["records"]
1561
1552
  }
1562
1553
  );
1563
- var opensteerNetworkSaveInputSchema = objectSchema(
1554
+ var opensteerNetworkTagInputSchema = objectSchema(
1564
1555
  {
1565
1556
  pageRef: pageRefSchema,
1566
1557
  recordId: stringSchema({ minLength: 1 }),
1567
1558
  requestId: stringSchema({ minLength: 1 }),
1568
- actionId: stringSchema({ minLength: 1 }),
1559
+ capture: stringSchema({ minLength: 1 }),
1569
1560
  tag: stringSchema({ minLength: 1 }),
1570
1561
  url: stringSchema({ minLength: 1 }),
1571
1562
  hostname: stringSchema({ minLength: 1 }),
@@ -1575,21 +1566,22 @@ var opensteerNetworkSaveInputSchema = objectSchema(
1575
1566
  resourceType: networkResourceTypeSchema
1576
1567
  },
1577
1568
  {
1578
- title: "OpensteerNetworkSaveInput",
1569
+ title: "OpensteerNetworkTagInput",
1579
1570
  required: ["tag"]
1580
1571
  }
1581
1572
  );
1582
- var opensteerNetworkSaveOutputSchema = objectSchema(
1573
+ var opensteerNetworkTagOutputSchema = objectSchema(
1583
1574
  {
1584
- savedCount: integerSchema({ minimum: 0 })
1575
+ taggedCount: integerSchema({ minimum: 0 })
1585
1576
  },
1586
1577
  {
1587
- title: "OpensteerNetworkSaveOutput",
1588
- required: ["savedCount"]
1578
+ title: "OpensteerNetworkTagOutput",
1579
+ required: ["taggedCount"]
1589
1580
  }
1590
1581
  );
1591
1582
  var opensteerNetworkClearInputSchema = objectSchema(
1592
1583
  {
1584
+ capture: stringSchema({ minLength: 1 }),
1593
1585
  tag: stringSchema({ minLength: 1 })
1594
1586
  },
1595
1587
  {
@@ -2458,6 +2450,7 @@ var cloudActionMethods = [
2458
2450
  var cloudErrorCodes = [
2459
2451
  "CLOUD_AUTH_FAILED",
2460
2452
  "CLOUD_SESSION_NOT_FOUND",
2453
+ "CLOUD_ARTIFACT_NOT_FOUND",
2461
2454
  "CLOUD_SESSION_CLOSED",
2462
2455
  "CLOUD_UNSUPPORTED_METHOD",
2463
2456
  "CLOUD_INVALID_REQUEST",
@@ -3164,6 +3157,164 @@ function traceBundleSchema(dataSchema = {}) {
3164
3157
  );
3165
3158
  }
3166
3159
 
3160
+ // src/observability.ts
3161
+ var observabilityProfiles = ["off", "baseline", "diagnostic"];
3162
+ var observationEventPhases = [
3163
+ "started",
3164
+ "updated",
3165
+ "completed",
3166
+ "failed",
3167
+ "occurred"
3168
+ ];
3169
+ var observationEventKinds = [
3170
+ "session",
3171
+ "operation",
3172
+ "page",
3173
+ "console",
3174
+ "error",
3175
+ "network",
3176
+ "artifact",
3177
+ "annotation",
3178
+ "runtime",
3179
+ "observability"
3180
+ ];
3181
+ var observationArtifactKinds = [
3182
+ "screenshot",
3183
+ "dom-snapshot",
3184
+ "html-snapshot",
3185
+ "trace-bundle",
3186
+ "frame-buffer",
3187
+ "request-body",
3188
+ "response-body",
3189
+ "log",
3190
+ "other"
3191
+ ];
3192
+ var observabilityProfileSchema = enumSchema(observabilityProfiles, {
3193
+ title: "ObservabilityProfile"
3194
+ });
3195
+ var observabilityTraceContextSchema = objectSchema(
3196
+ {
3197
+ traceparent: stringSchema(),
3198
+ baggage: stringSchema()
3199
+ },
3200
+ {
3201
+ title: "ObservabilityTraceContext"
3202
+ }
3203
+ );
3204
+ var observabilityRedactionConfigSchema = objectSchema(
3205
+ {
3206
+ sensitiveKeys: arraySchema(stringSchema()),
3207
+ sensitiveValues: arraySchema(stringSchema())
3208
+ },
3209
+ {
3210
+ title: "ObservabilityRedactionConfig"
3211
+ }
3212
+ );
3213
+ var observabilityConfigSchema = objectSchema(
3214
+ {
3215
+ profile: observabilityProfileSchema,
3216
+ labels: recordSchema(stringSchema()),
3217
+ traceContext: observabilityTraceContextSchema,
3218
+ redaction: observabilityRedactionConfigSchema
3219
+ },
3220
+ {
3221
+ title: "ObservabilityConfig",
3222
+ required: ["profile"]
3223
+ }
3224
+ );
3225
+ var observationContextSchema = objectSchema(
3226
+ {
3227
+ sessionRef: sessionRefSchema,
3228
+ pageRef: pageRefSchema,
3229
+ frameRef: frameRefSchema,
3230
+ documentRef: documentRefSchema,
3231
+ documentEpoch: documentEpochSchema
3232
+ },
3233
+ {
3234
+ title: "ObservationContext"
3235
+ }
3236
+ );
3237
+ var observationEventErrorSchema = objectSchema(
3238
+ {
3239
+ code: stringSchema(),
3240
+ message: stringSchema(),
3241
+ retriable: {
3242
+ type: "boolean"
3243
+ },
3244
+ details: {}
3245
+ },
3246
+ {
3247
+ title: "ObservationEventError",
3248
+ required: ["message"]
3249
+ }
3250
+ );
3251
+ var observationEventSchema = objectSchema(
3252
+ {
3253
+ eventId: stringSchema(),
3254
+ sessionId: stringSchema(),
3255
+ sequence: integerSchema({ minimum: 1 }),
3256
+ kind: enumSchema(observationEventKinds),
3257
+ phase: enumSchema(observationEventPhases),
3258
+ createdAt: integerSchema({ minimum: 0 }),
3259
+ correlationId: stringSchema(),
3260
+ spanId: stringSchema(),
3261
+ parentSpanId: stringSchema(),
3262
+ context: observationContextSchema,
3263
+ data: {},
3264
+ error: observationEventErrorSchema,
3265
+ artifactIds: arraySchema(stringSchema())
3266
+ },
3267
+ {
3268
+ title: "ObservationEvent",
3269
+ required: ["eventId", "sessionId", "sequence", "kind", "phase", "createdAt", "correlationId"]
3270
+ }
3271
+ );
3272
+ var observationArtifactSchema = objectSchema(
3273
+ {
3274
+ artifactId: stringSchema(),
3275
+ sessionId: stringSchema(),
3276
+ kind: enumSchema(observationArtifactKinds),
3277
+ createdAt: integerSchema({ minimum: 0 }),
3278
+ context: observationContextSchema,
3279
+ mediaType: stringSchema(),
3280
+ byteLength: integerSchema({ minimum: 0 }),
3281
+ sha256: stringSchema(),
3282
+ opensteerArtifactId: stringSchema(),
3283
+ storageKey: stringSchema(),
3284
+ metadata: {}
3285
+ },
3286
+ {
3287
+ title: "ObservationArtifact",
3288
+ required: ["artifactId", "sessionId", "kind", "createdAt"]
3289
+ }
3290
+ );
3291
+ var observationSessionSchema = objectSchema(
3292
+ {
3293
+ sessionId: stringSchema(),
3294
+ profile: observabilityProfileSchema,
3295
+ labels: recordSchema(stringSchema()),
3296
+ traceContext: observabilityTraceContextSchema,
3297
+ openedAt: integerSchema({ minimum: 0 }),
3298
+ updatedAt: integerSchema({ minimum: 0 }),
3299
+ closedAt: integerSchema({ minimum: 0 }),
3300
+ currentSequence: integerSchema({ minimum: 0 }),
3301
+ eventCount: integerSchema({ minimum: 0 }),
3302
+ artifactCount: integerSchema({ minimum: 0 })
3303
+ },
3304
+ {
3305
+ title: "ObservationSession",
3306
+ required: [
3307
+ "sessionId",
3308
+ "profile",
3309
+ "openedAt",
3310
+ "updatedAt",
3311
+ "currentSequence",
3312
+ "eventCount",
3313
+ "artifactCount"
3314
+ ]
3315
+ }
3316
+ );
3317
+
3167
3318
  // src/envelopes.ts
3168
3319
  function createRequestEnvelope(operation, input, options) {
3169
3320
  return {
@@ -3276,7 +3427,7 @@ function responseEnvelopeSchema(dataSchema, operation) {
3276
3427
  }
3277
3428
 
3278
3429
  // src/session-info.ts
3279
- var opensteerSessionGrantKinds = ["automation", "view", "cdp"];
3430
+ var opensteerSessionGrantKinds = ["semantic", "automation", "view", "cdp"];
3280
3431
 
3281
3432
  // src/automation.ts
3282
3433
  var opensteerAutomationOperationNames = [
@@ -6239,7 +6390,7 @@ var opensteerSemanticOperationNames = [
6239
6390
  "dom.scroll",
6240
6391
  "dom.extract",
6241
6392
  "network.query",
6242
- "network.save",
6393
+ "network.tag",
6243
6394
  "network.clear",
6244
6395
  "network.minimize",
6245
6396
  "network.diff",
@@ -6300,7 +6451,7 @@ var opensteerPackageRunnableSemanticOperationNames = /* @__PURE__ */ new Set([
6300
6451
  "dom.scroll",
6301
6452
  "dom.extract",
6302
6453
  "network.query",
6303
- "network.save",
6454
+ "network.tag",
6304
6455
  "network.clear",
6305
6456
  "network.minimize",
6306
6457
  "network.diff",
@@ -6620,7 +6771,7 @@ var opensteerPageCloseOutputSchema = objectSchema(
6620
6771
  var opensteerPageGotoInputSchema = objectSchema(
6621
6772
  {
6622
6773
  url: stringSchema(),
6623
- networkTag: stringSchema({ minLength: 1 })
6774
+ captureNetwork: stringSchema({ minLength: 1 })
6624
6775
  },
6625
6776
  {
6626
6777
  title: "OpensteerPageGotoInput",
@@ -6767,11 +6918,25 @@ var opensteerInspectStorageInputSchema = objectSchema(
6767
6918
  title: "OpensteerInspectStorageInput"
6768
6919
  }
6769
6920
  );
6921
+ var opensteerComputerMouseButtonSchema = enumSchema(["left", "middle", "right"], {
6922
+ title: "OpensteerComputerMouseButton"
6923
+ });
6924
+ var opensteerComputerKeyModifierSchema = enumSchema(
6925
+ ["Shift", "Control", "Alt", "Meta"],
6926
+ {
6927
+ title: "OpensteerComputerKeyModifier"
6928
+ }
6929
+ );
6770
6930
  var opensteerDomClickInputSchema = objectSchema(
6771
6931
  {
6772
6932
  target: opensteerTargetInputSchema,
6933
+ button: opensteerComputerMouseButtonSchema,
6934
+ clickCount: integerSchema({ minimum: 1 }),
6935
+ modifiers: arraySchema(opensteerComputerKeyModifierSchema, {
6936
+ uniqueItems: true
6937
+ }),
6773
6938
  persistAsDescription: stringSchema(),
6774
- networkTag: stringSchema({ minLength: 1 })
6939
+ captureNetwork: stringSchema({ minLength: 1 })
6775
6940
  },
6776
6941
  {
6777
6942
  title: "OpensteerDomClickInput",
@@ -6782,7 +6947,7 @@ var opensteerDomHoverInputSchema = objectSchema(
6782
6947
  {
6783
6948
  target: opensteerTargetInputSchema,
6784
6949
  persistAsDescription: stringSchema(),
6785
- networkTag: stringSchema({ minLength: 1 })
6950
+ captureNetwork: stringSchema({ minLength: 1 })
6786
6951
  },
6787
6952
  {
6788
6953
  title: "OpensteerDomHoverInput",
@@ -6795,7 +6960,7 @@ var opensteerDomInputInputSchema = objectSchema(
6795
6960
  text: stringSchema(),
6796
6961
  pressEnter: { type: "boolean" },
6797
6962
  persistAsDescription: stringSchema(),
6798
- networkTag: stringSchema({ minLength: 1 })
6963
+ captureNetwork: stringSchema({ minLength: 1 })
6799
6964
  },
6800
6965
  {
6801
6966
  title: "OpensteerDomInputInput",
@@ -6808,7 +6973,7 @@ var opensteerDomScrollInputSchema = objectSchema(
6808
6973
  direction: enumSchema(["up", "down", "left", "right"]),
6809
6974
  amount: integerSchema({ minimum: 1 }),
6810
6975
  persistAsDescription: stringSchema(),
6811
- networkTag: stringSchema({ minLength: 1 })
6976
+ captureNetwork: stringSchema({ minLength: 1 })
6812
6977
  },
6813
6978
  {
6814
6979
  title: "OpensteerDomScrollInput",
@@ -6869,18 +7034,6 @@ var opensteerSessionCloseOutputSchema = objectSchema(
6869
7034
  required: ["closed"]
6870
7035
  }
6871
7036
  );
6872
- var opensteerComputerMouseButtonSchema = enumSchema(
6873
- ["left", "middle", "right"],
6874
- {
6875
- title: "OpensteerComputerMouseButton"
6876
- }
6877
- );
6878
- var opensteerComputerKeyModifierSchema = enumSchema(
6879
- ["Shift", "Control", "Alt", "Meta"],
6880
- {
6881
- title: "OpensteerComputerKeyModifier"
6882
- }
6883
- );
6884
7037
  var opensteerComputerAnnotationSchema = enumSchema(opensteerComputerAnnotationNames, {
6885
7038
  title: "OpensteerComputerAnnotation"
6886
7039
  });
@@ -7009,7 +7162,7 @@ var opensteerComputerExecuteInputSchema = objectSchema(
7009
7162
  {
7010
7163
  action: opensteerComputerActionSchema,
7011
7164
  screenshot: opensteerComputerScreenshotOptionsSchema,
7012
- networkTag: stringSchema({ minLength: 1 })
7165
+ captureNetwork: stringSchema({ minLength: 1 })
7013
7166
  },
7014
7167
  {
7015
7168
  title: "OpensteerComputerExecuteInput",
@@ -7213,18 +7366,17 @@ var opensteerSemanticOperationSpecificationsBase = [
7213
7366
  }),
7214
7367
  defineSemanticOperationSpec({
7215
7368
  name: "network.query",
7216
- description: "Query live or saved network records for reverse engineering workflows.",
7369
+ description: "Query persisted network records for reverse engineering workflows.",
7217
7370
  inputSchema: opensteerNetworkQueryInputSchema,
7218
7371
  outputSchema: opensteerNetworkQueryOutputSchema,
7219
- requiredCapabilities: [],
7220
- resolveRequiredCapabilities: (input) => input.source === "saved" ? [] : input.includeBodies === true ? ["inspect.network", "inspect.networkBodies"] : ["inspect.network"]
7372
+ requiredCapabilities: []
7221
7373
  }),
7222
7374
  defineSemanticOperationSpec({
7223
- name: "network.save",
7224
- description: "Persist filtered live network records into the saved network registry under a tag.",
7225
- inputSchema: opensteerNetworkSaveInputSchema,
7226
- outputSchema: opensteerNetworkSaveOutputSchema,
7227
- requiredCapabilities: ["inspect.network"]
7375
+ name: "network.tag",
7376
+ description: "Apply a tag to persisted network records matching the provided filters.",
7377
+ inputSchema: opensteerNetworkTagInputSchema,
7378
+ outputSchema: opensteerNetworkTagOutputSchema,
7379
+ requiredCapabilities: []
7228
7380
  }),
7229
7381
  defineSemanticOperationSpec({
7230
7382
  name: "network.clear",
@@ -7826,7 +7978,6 @@ exports.networkDiffFieldSchema = networkDiffFieldSchema;
7826
7978
  exports.networkInitiatorSchema = networkInitiatorSchema;
7827
7979
  exports.networkInitiatorTypeSchema = networkInitiatorTypeSchema;
7828
7980
  exports.networkQueryRecordSchema = networkQueryRecordSchema;
7829
- exports.networkQuerySourceSchema = networkQuerySourceSchema;
7830
7981
  exports.networkRecordKindSchema = networkRecordKindSchema;
7831
7982
  exports.networkRecordSchema = networkRecordSchema;
7832
7983
  exports.networkRequestIdSchema = networkRequestIdSchema;
@@ -7838,6 +7989,19 @@ exports.nodeLocatorSchema = nodeLocatorSchema;
7838
7989
  exports.nodeRefSchema = nodeRefSchema;
7839
7990
  exports.numberSchema = numberSchema;
7840
7991
  exports.objectSchema = objectSchema;
7992
+ exports.observabilityConfigSchema = observabilityConfigSchema;
7993
+ exports.observabilityProfileSchema = observabilityProfileSchema;
7994
+ exports.observabilityProfiles = observabilityProfiles;
7995
+ exports.observabilityRedactionConfigSchema = observabilityRedactionConfigSchema;
7996
+ exports.observabilityTraceContextSchema = observabilityTraceContextSchema;
7997
+ exports.observationArtifactKinds = observationArtifactKinds;
7998
+ exports.observationArtifactSchema = observationArtifactSchema;
7999
+ exports.observationContextSchema = observationContextSchema;
8000
+ exports.observationEventErrorSchema = observationEventErrorSchema;
8001
+ exports.observationEventKinds = observationEventKinds;
8002
+ exports.observationEventPhases = observationEventPhases;
8003
+ exports.observationEventSchema = observationEventSchema;
8004
+ exports.observationSessionSchema = observationSessionSchema;
7841
8005
  exports.oneOfSchema = oneOfSchema;
7842
8006
  exports.opensteerArtifactReadInputSchema = opensteerArtifactReadInputSchema;
7843
8007
  exports.opensteerArtifactReadOutputSchema = opensteerArtifactReadOutputSchema;
@@ -7897,8 +8061,8 @@ exports.opensteerNetworkMinimizeOutputSchema = opensteerNetworkMinimizeOutputSch
7897
8061
  exports.opensteerNetworkMinimizeSuccessPolicySchema = opensteerNetworkMinimizeSuccessPolicySchema;
7898
8062
  exports.opensteerNetworkQueryInputSchema = opensteerNetworkQueryInputSchema;
7899
8063
  exports.opensteerNetworkQueryOutputSchema = opensteerNetworkQueryOutputSchema;
7900
- exports.opensteerNetworkSaveInputSchema = opensteerNetworkSaveInputSchema;
7901
- exports.opensteerNetworkSaveOutputSchema = opensteerNetworkSaveOutputSchema;
8064
+ exports.opensteerNetworkTagInputSchema = opensteerNetworkTagInputSchema;
8065
+ exports.opensteerNetworkTagOutputSchema = opensteerNetworkTagOutputSchema;
7902
8066
  exports.opensteerObservationClusterRelationshipKindSchema = opensteerObservationClusterRelationshipKindSchema;
7903
8067
  exports.opensteerObservationClusterSchema = opensteerObservationClusterSchema;
7904
8068
  exports.opensteerOperationNames = opensteerOperationNames;